PageSourceSearch

https://acerteinotema.lovable.app/assets/index-C9VqAjIc.js

js acerteinotema.lovable.app collected 2026-10-03 03:18:13 UTC 1,218,987 bytes, 577 lines download raw bytes

vendor: 5,808 bytes, lines 1-9
1var U_=e=>{throw TypeError(e)};var Kg=(e,t,r)=>t.has(e)||U_("Cannot "+r);var H=(e,t,r)=>(Kg(e,t,"read from private field"),r?r.call(e):t.get(e)),Oe=(e,t,r)=>t.has(e)?U_("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),me=(e,t,r,n)=>(Kg(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),Ft=(e,t,r)=>(Kg(e,t,"access private method"),r);var Jd=(e,t,r,n)=>({set _(a){me(e,t,a,r)},get _(){return H(e,t,n)}});function n4(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const a in n)if(a!=="default"&&!(a in e)){const i=Object.getOwnPropertyDescriptor(n,a);i&&Object.defineProperty(e,a,i.get?i:{enumerable:!0,get:()=>n[a]})}}}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 a of document.querySelectorAll('link[rel="modulepreload"]'))n(a);new MutationObserver(a=>{for(const i of a)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function r(a){const i={};return a.integrity&&(i.integrity=a.integrity),a.referrerPolicy&&(i.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?i.credentials="include":a.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function n(a){if(a.ep)return;a.ep=!0;const i=r(a);fetch(a.href,i)}})();var Qd=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Fe(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var CP={exports:{}},om={},TP={exports:{}},we={};/**
2 * @license React
3 * react.production.min.js
4 *
5 * Copyright (c) Facebook, Inc. and its affiliates.
6 *
7 * This source code is licensed under the MIT license found in the
8 * LICENSE file in the root directory of this source tree.
9 */var jd=Symbol.for("react.element"),a4=Symbol.for("react.portal"),i4=Symbol.for("react.fragment"),o4=Symbol.for("react.strict_mode"),s4=Symbol.for("react.profiler"),l4=Symbol.for("react.provider"),c4=Symbol.for("react.context"),u4=Symbol.for("react.forward_ref"),d4=Symbol.for("react.suspense"),f4=Symbol.for("react.memo"),h4=Symbol.for("react.lazy"),z_=Symbol.iterator;function p4(e){return e===null||typeof e!="object"?null:(e=z_&&e[z_]||e["@@iterator"],typeof e=="function"?e:null)}var AP={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},MP=Object.assign,$P={};function Wl(e,t,r){this.props=e,this.context=t,this.refs=$P,this.updater=r||AP}Wl.prototype.isReactComponent={};Wl.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")};Wl.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function RP(){}RP.prototype=Wl.prototype;function Ox(e,t,r){this.props=e,this.context=t,this.refs=$P,this.updater=r||AP}var Nx=Ox.prototype=new RP;Nx.constructor=Ox;MP(Nx,Wl.prototype);Nx.isPureReactComponent=!0;var W_=Array.isArray,IP=Object.prototype.hasOwnProperty,Px={current:null},DP={key:!0,ref:!0,__self:!0,__source:!0};function LP(e,t,r){var n,a={},i=null,o=null;if(t!=null)for(n in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(i=""+t.key),t)IP.call(t,n)&&!DP.hasOwnProperty(n)&&(a[n]=t[n]);var s=arguments.length-2;if(s===1)a.children=r;else if(1<s){for(var l=Array(s),c=0;c<s;c++)l[c]=arguments[c+2];a.children=l}if(e&&e.defaultProps)for(n in s=e.defaultProps,s)a[n]===void 0&&(a[n]=s[n]);return{$$typeof:jd,type:e,key:i,ref:o,props:a,_owner:Px.current}}function m4(e,t){return{$$typeof:jd,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Cx(e){return typeof e=="object"&&e!==null&&e.$$typeof===jd}function g4(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var H_=/\/+/g;function Gg(e,t){return typeof e=="object"&&e!==null&&e.key!=null?g4(""+e.key):t.toString(36)}function Jf(e,t,r,n,a){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var o=!1;if(e===null)o=!0;else switch(i){case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case jd:case a4:o=!0}}if(o)return o=e,a=a(o),e=n===""?"."+Gg(o,0):n,W_(a)?(r="",e!=null&&(r=e.replace(H_,"$&/")+"/"),Jf(a,t,r,"",function(c){return c})):a!=null&&(Cx(a)&&(a=m4(a,r+(!a.key||o&&o.key===a.key?"":(""+a.key).replace(H_,"$&/")+"/")+e)),t.push(a)),1;if(o=0,n=n===""?".":n+":",W_(e))for(var s=0;s<e.length;s++){i=e[s];var l=n+Gg(i,s);o+=Jf(i,t,r,l,a)}else if(l=p4(e),typeof l=="function")for(e=l.call(e),s=0;!(i=e.next()).done;)i=i.value,l=n+Gg(i,s++),o+=Jf(i,t,r,l,a);else if(i==="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 Zd(e,t,r){if(e==null)return e;var n=[],a=0;return Jf(e,n,"","",function(i){return t.call(r,i,a++)}),n}function v4(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(r){(e._status===0||e._status===-1)&&(e._status=1,e._result=r)},function(r){(e._status===0||e._status===-1)&&(e._status=2,e._result=r)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var tr={current:null},Qf={transition:null},y4={ReactCurrentDispatcher:tr,ReactCurrentBatchConfig:Qf,ReactCurrentOwner:Px};function BP(){throw Error("act(...) is not supported in production builds of React.")}
vendor: 9,432 bytes, lines 9-33
9we.Children={map:Zd,forEach:function(e,t,r){Zd(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return Zd(e,function(){t++}),t},toArray:function(e){return Zd(e,function(t){return t})||[]},only:function(e){if(!Cx(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};we.Component=Wl;we.Fragment=i4;we.Profiler=s4;we.PureComponent=Ox;we.StrictMode=o4;we.Suspense=d4;we.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=y4;we.act=BP;we.cloneElement=function(e,t,r){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var n=MP({},e.props),a=e.key,i=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,o=Px.current),t.key!==void 0&&(a=""+t.key),e.type&&e.type.defaultProps)var s=e.type.defaultProps;for(l in t)IP.call(t,l)&&!DP.hasOwnProperty(l)&&(n[l]=t[l]===void 0&&s!==void 0?s[l]:t[l])}var l=arguments.length-2;if(l===1)n.children=r;else if(1<l){s=Array(l);for(var c=0;c<l;c++)s[c]=arguments[c+2];n.children=s}return{$$typeof:jd,type:e.type,key:a,ref:i,props:n,_owner:o}};we.createContext=function(e){return e={$$typeof:c4,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:l4,_context:e},e.Consumer=e};we.createElement=LP;we.createFactory=function(e){var t=LP.bind(null,e);return t.type=e,t};we.createRef=function(){return{current:null}};we.forwardRef=function(e){return{$$typeof:u4,render:e}};we.isValidElement=Cx;we.lazy=function(e){return{$$typeof:h4,_payload:{_status:-1,_result:e},_init:v4}};we.memo=function(e,t){return{$$typeof:f4,type:e,compare:t===void 0?null:t}};we.startTransition=function(e){var t=Qf.transition;Qf.transition={};try{e()}finally{Qf.transition=t}};we.unstable_act=BP;we.useCallback=function(e,t){return tr.current.useCallback(e,t)};we.useContext=function(e){return tr.current.useContext(e)};we.useDebugValue=function(){};we.useDeferredValue=function(e){return tr.current.useDeferredValue(e)};we.useEffect=function(e,t){return tr.current.useEffect(e,t)};we.useId=function(){return tr.current.useId()};we.useImperativeHandle=function(e,t,r){return tr.current.useImperativeHandle(e,t,r)};we.useInsertionEffect=function(e,t){return tr.current.useInsertionEffect(e,t)};we.useLayoutEffect=function(e,t){return tr.current.useLayoutEffect(e,t)};we.useMemo=function(e,t){return tr.current.useMemo(e,t)};we.useReducer=function(e,t,r){return tr.current.useReducer(e,t,r)};we.useRef=function(e){return tr.current.useRef(e)};we.useState=function(e){return tr.current.useState(e)};we.useSyncExternalStore=function(e,t,r){return tr.current.useSyncExternalStore(e,t,r)};we.useTransition=function(){return tr.current.useTransition()};we.version="18.3.1";TP.exports=we;var w=TP.exports;const $=Fe(w),Tx=n4({__proto__:null,default:$},[w]);/**
10 * @license React
11 * react-jsx-runtime.production.min.js
12 *
13 * Copyright (c) Facebook, Inc. and its affiliates.
14 *
15 * This source code is licensed under the MIT license found in the
16 * LICENSE file in the root directory of this source tree.
17 */var b4=w,x4=Symbol.for("react.element"),w4=Symbol.for("react.fragment"),_4=Object.prototype.hasOwnProperty,S4=b4.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,j4={key:!0,ref:!0,__self:!0,__source:!0};function FP(e,t,r){var n,a={},i=null,o=null;r!==void 0&&(i=""+r),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(o=t.ref);for(n in t)_4.call(t,n)&&!j4.hasOwnProperty(n)&&(a[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)a[n]===void 0&&(a[n]=t[n]);return{$$typeof:x4,type:e,key:i,ref:o,props:a,_owner:S4.current}}om.Fragment=w4;om.jsx=FP;om.jsxs=FP;CP.exports=om;var u=CP.exports,UP={exports:{}},Ar={},zP={exports:{}},WP={};/**
18 * @license React
19 * scheduler.production.min.js
20 *
21 * Copyright (c) Facebook, Inc. and its affiliates.
22 *
23 * This source code is licensed under the MIT license found in the
24 * LICENSE file in the root directory of this source tree.
25 */(function(e){function t(C,P){var B=C.length;C.push(P);e:for(;0<B;){var U=B-1>>>1,F=C[U];if(0<a(F,P))C[U]=P,C[B]=F,B=U;else break e}}function r(C){return C.length===0?null:C[0]}function n(C){if(C.length===0)return null;var P=C[0],B=C.pop();if(B!==P){C[0]=B;e:for(var U=0,F=C.length,V=F>>>1;U<V;){var J=2*(U+1)-1,ue=C[J],_e=J+1,X=C[_e];if(0>a(ue,B))_e<F&&0>a(X,ue)?(C[U]=X,C[_e]=B,U=_e):(C[U]=ue,C[J]=B,U=J);else if(_e<F&&0>a(X,B))C[U]=X,C[_e]=B,U=_e;else break e}}return P}function a(C,P){var B=C.sortIndex-P.sortIndex;return B!==0?B:C.id-P.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var l=[],c=[],d=1,f=null,h=3,p=!1,g=!1,m=!1,v=typeof setTimeout=="function"?setTimeout:null,x=typeof clearTimeout=="function"?clearTimeout:null,b=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function y(C){for(var P=r(c);P!==null;){if(P.callback===null)n(c);else if(P.startTime<=C)n(c),P.sortIndex=P.expirationTime,t(l,P);else break;P=r(c)}}function S(C){if(m=!1,y(C),!g)if(r(l)!==null)g=!0,L(_);else{var P=r(c);P!==null&&M(S,P.startTime-C)}}function _(C,P){g=!1,m&&(m=!1,x(E),E=-1),p=!0;var B=h;try{for(y(P),f=r(l);f!==null&&(!(f.expirationTime>P)||C&&!T());){var U=f.callback;if(typeof U=="function"){f.callback=null,h=f.priorityLevel;var F=U(f.expirationTime<=P);P=e.unstable_now(),typeof F=="function"?f.callback=F:f===r(l)&&n(l),y(P)}else n(l);f=r(l)}if(f!==null)var V=!0;else{var J=r(c);J!==null&&M(S,J.startTime-P),V=!1}return V}finally{f=null,h=B,p=!1}}var j=!1,k=null,E=-1,O=5,A=-1;function T(){return!(e.unstable_now()-A<O)}function N(){if(k!==null){var C=e.unstable_now();A=C;var P=!0;try{P=k(!0,C)}finally{P?I():(j=!1,k=null)}}else j=!1}var I;if(typeof b=="function")I=function(){b(N)};else if(typeof MessageChannel<"u"){var R=new MessageChannel,D=R.port2;R.port1.onmessage=N,I=function(){D.postMessage(null)}}else I=function(){v(N,0)};function L(C){k=C,j||(j=!0,I())}function M(C,P){E=v(function(){C(e.unstable_now())},P)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(C){C.callback=null},e.unstable_continueExecution=function(){g||p||(g=!0,L(_))},e.unstable_forceFrameRate=function(C){0>C||125<C?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):O=0<C?Math.floor(1e3/C):5},e.unstable_getCurrentPriorityLevel=function(){return h},e.unstable_getFirstCallbackNode=function(){return r(l)},e.unstable_next=function(C){switch(h){case 1:case 2:case 3:var P=3;break;default:P=h}var B=h;h=P;try{return C()}finally{h=B}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(C,P){switch(C){case 1:case 2:case 3:case 4:case 5:break;default:C=3}var B=h;h=C;try{return P()}finally{h=B}},e.unstable_scheduleCallback=function(C,P,B){var U=e.unstable_now();switch(typeof B=="object"&&B!==null?(B=B.delay,B=typeof B=="number"&&0<B?U+B:U):B=U,C){case 1:var F=-1;break;case 2:F=250;break;case 5:F=1073741823;break;case 4:F=1e4;break;default:F=5e3}return F=B+F,C={id:d++,callback:P,priorityLevel:C,startTime:B,expirationTime:F,sortIndex:-1},B>U?(C.sortIndex=B,t(c,C),r(l)===null&&C===r(c)&&(m?(x(E),E=-1):m=!0,M(S,B-U))):(C.sortIndex=F,t(l,C),g||p||(g=!0,L(_))),C},e.unstable_shouldYield=T,e.unstable_wrapCallback=function(C){var P=h;return function(){var B=h;h=P;try{return C.apply(this,arguments)}finally{h=B}}}})(WP);zP.exports=WP;var k4=zP.exports;/**
26 * @license React
27 * react-dom.production.min.js
28 *
29 * Copyright (c) Facebook, Inc. and its affiliates.
30 *
31 * This source code is licensed under the MIT license found in the
32 * LICENSE file in the root directory of this source tree.
33 */var E4=w,Cr=k4;function G(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var HP=new Set,su={};function qo(e,t){cl(e,t),cl(e+"Capture",t)}function cl(e,t){for(su[e]=t,e=0;e<t.length;e++)HP.add(t[e])}var Oa=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Sy=Object.prototype.hasOwnProperty,O4=/^[: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]*$/,q_={},V_={};function N4(e){return Sy.call(V_,e)?!0:Sy.call(q_,e)?!1:O4.test(e)?V_[e]=!0:(q_[e]=!0,!1)}function P4(e,t,r,n){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function C4(e,t,r,n){if(t===null||typeof t>"u"||P4(e,t,r,n))return!0;
vendor: 5,200 bytes, lines 33-34
33if(n)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function rr(e,t,r,n,a,i,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=a,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=o}var Lt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Lt[e]=new rr(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Lt[t]=new rr(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Lt[e]=new rr(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Lt[e]=new rr(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){Lt[e]=new rr(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Lt[e]=new rr(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Lt[e]=new rr(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Lt[e]=new rr(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Lt[e]=new rr(e,5,!1,e.toLowerCase(),null,!1,!1)});var Ax=/[\-:]([a-z])/g;function Mx(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(Ax,Mx);Lt[t]=new rr(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(Ax,Mx);Lt[t]=new rr(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(Ax,Mx);Lt[t]=new rr(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Lt[e]=new rr(e,1,!1,e.toLowerCase(),null,!1,!1)});Lt.xlinkHref=new rr("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Lt[e]=new rr(e,1,!1,e.toLowerCase(),null,!0,!0)});function $x(e,t,r,n){var a=Lt.hasOwnProperty(t)?Lt[t]:null;(a!==null?a.type!==0:n||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(C4(t,r,a,n)&&(r=null),n||a===null?N4(t)&&(r===null?e.removeAttribute(t):e.setAttribute(t,""+r)):a.mustUseProperty?e[a.propertyName]=r===null?a.type===3?!1:"":r:(t=a.attributeName,n=a.attributeNamespace,r===null?e.removeAttribute(t):(a=a.type,r=a===3||a===4&&r===!0?"":""+r,n?e.setAttributeNS(n,t,r):e.setAttribute(t,r))))}var Da=E4.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,ef=Symbol.for("react.element"),Ss=Symbol.for("react.portal"),js=Symbol.for("react.fragment"),Rx=Symbol.for("react.strict_mode"),jy=Symbol.for("react.profiler"),qP=Symbol.for("react.provider"),VP=Symbol.for("react.context"),Ix=Symbol.for("react.forward_ref"),ky=Symbol.for("react.suspense"),Ey=Symbol.for("react.suspense_list"),Dx=Symbol.for("react.memo"),ti=Symbol.for("react.lazy"),KP=Symbol.for("react.offscreen"),K_=Symbol.iterator;function pc(e){return e===null||typeof e!="object"?null:(e=K_&&e[K_]||e["@@iterator"],typeof e=="function"?e:null)}var at=Object.assign,Yg;function Ic(e){if(Yg===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);Yg=t&&t[1]||""}return`
34`+Yg+e}var Xg=!1;function Jg(e,t){if(!e||Xg)return"";Xg=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(c){var n=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){n=c}e.call(t.prototype)}else{try{throw Error()}catch(c){n=c}e()}}
vendor: 14,090 bytes, lines 34-37
34catch(c){if(c&&n&&typeof c.stack=="string"){for(var a=c.stack.split(`
35`),i=n.stack.split(`
36`),o=a.length-1,s=i.length-1;1<=o&&0<=s&&a[o]!==i[s];)s--;for(;1<=o&&0<=s;o--,s--)if(a[o]!==i[s]){if(o!==1||s!==1)do if(o--,s--,0>s||a[o]!==i[s]){var l=`
37`+a[o].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=o&&0<=s);break}}}finally{Xg=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?Ic(e):""}function T4(e){switch(e.tag){case 5:return Ic(e.type);case 16:return Ic("Lazy");case 13:return Ic("Suspense");case 19:return Ic("SuspenseList");case 0:case 2:case 15:return e=Jg(e.type,!1),e;case 11:return e=Jg(e.type.render,!1),e;case 1:return e=Jg(e.type,!0),e;default:return""}}function Oy(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 js:return"Fragment";case Ss:return"Portal";case jy:return"Profiler";case Rx:return"StrictMode";case ky:return"Suspense";case Ey:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case VP:return(e.displayName||"Context")+".Consumer";case qP:return(e._context.displayName||"Context")+".Provider";case Ix:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Dx:return t=e.displayName||null,t!==null?t:Oy(e.type)||"Memo";case ti:t=e._payload,e=e._init;try{return Oy(e(t))}catch{}}return null}function A4(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 Oy(t);case 8:return t===Rx?"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 Pi(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function GP(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function M4(e){var t=GP(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var a=r.get,i=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return a.call(this)},set:function(o){n=""+o,i.call(this,o)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(o){n=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function tf(e){e._valueTracker||(e._valueTracker=M4(e))}function YP(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=GP(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function gh(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 Ny(e,t){var r=t.checked;return at({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function G_(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=Pi(t.value!=null?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function XP(e,t){t=t.checked,t!=null&&$x(e,"checked",t,!1)}function Py(e,t){XP(e,t);var r=Pi(t.value),n=t.type;if(r!=null)n==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Cy(e,t.type,r):t.hasOwnProperty("defaultValue")&&Cy(e,t.type,Pi(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Y_(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function Cy(e,t,r){(t!=="number"||gh(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var Dc=Array.isArray;function Bs(e,t,r,n){if(e=e.options,t){t={};for(var a=0;a<r.length;a++)t["$"+r[a]]=!0;for(r=0;r<e.length;r++)a=t.hasOwnProperty("$"+e[r].value),e[r].selected!==a&&(e[r].selected=a),a&&n&&(e[r].defaultSelected=!0)}else{for(r=""+Pi(r),t=null,a=0;a<e.length;a++){if(e[a].value===r){e[a].selected=!0,n&&(e[a].defaultSelected=!0);return}t!==null||e[a].disabled||(t=e[a])}t!==null&&(t.selected=!0)}}function Ty(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(G(91));return at({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function X_(e,t){var r=t.value;if(r==null){if(r=t.children,t=t.defaultValue,r!=null){if(t!=null)throw Error(G(92));if(Dc(r)){if(1<r.length)throw Error(G(93));r=r[0]}t=r}t==null&&(t=""),r=t}e._wrapperState={initialValue:Pi(r)}}function JP(e,t){var r=Pi(t.value),n=Pi(t.defaultValue);r!=null&&(r=""+r,r!==e.value&&(e.value=r),t.defaultValue==null&&e.defaultValue!==r&&(e.defaultValue=r)),n!=null&&(e.defaultValue=""+n)}function J_(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function QP(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 Ay(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?QP(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var rf,ZP=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,r,n,a){MSApp.execUnsafeLocalFunction(function(){return e(t,r,n,a)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(rf=rf||document.createElement("div"),rf.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=rf.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function lu(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var Hc={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},$4=["Webkit","ms","Moz","O"];Object.keys(Hc).forEach(function(e){$4.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Hc[t]=Hc[e]})});function eC(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||Hc.hasOwnProperty(e)&&Hc[e]?(""+t).trim():t+"px"}function tC(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,a=eC(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,a):e[r]=a}}var R4=at({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 My(e,t){if(t){if(R4[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(G(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(G(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(G(61))}if(t.style!=null&&typeof t.style!="object")throw Error(G(62))}}function $y(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 Ry=null;function Lx(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Iy=null,Fs=null,Us=null;function Q_(e){if(e=Od(e)){if(typeof Iy!="function")throw Error(G(280));var t=e.stateNode;t&&(t=dm(t),Iy(e.stateNode,e.type,t))}}function rC(e){Fs?Us?Us.push(e):Us=[e]:Fs=e}function nC(){if(Fs){var e=Fs,t=Us;if(Us=Fs=null,Q_(e),t)for(e=0;e<t.length;e++)Q_(t[e])}}function aC(e,t){return e(t)}function iC(){}var Qg=!1;function oC(e,t,r){if(Qg)return e(t,r);Qg=!0;try{return aC(e,t,r)}finally{Qg=!1,(Fs!==null||Us!==null)&&(iC(),nC())}}function cu(e,t){var r=e.stateNode;if(r===null)return null;var n=dm(r);if(n===null)return null;r=n[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(n=!n.disabled)||(e=e.type,n=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!n;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(G(231,t,typeof r));return r}var Dy=!1;if(Oa)try{var mc={};Object.defineProperty(mc,"passive",{get:function(){Dy=!0}}),window.addEventListener("test",mc,mc),window.removeEventListener("test",mc,mc)}catch{Dy=!1}function I4(e,t,r,n,a,i,o,s,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(r,c)}catch(d){this.onError(d)}}var qc=!1,vh=null,yh=!1,Ly=null,D4={onError:function(e){qc=!0,vh=e}};function L4(e,t,r,n,a,i,o,s,l){qc=!1,vh=null,I4.apply(D4,arguments)}function B4(e,t,r,n,a,i,o,s,l){if(L4.apply(this,arguments),qc){if(qc){var c=vh;qc=!1,vh=null}else throw Error(G(198));yh||(yh=!0,Ly=c)}}function Vo(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(r=t.return),e=t.return;while(e)}return t.tag===3?r:null}function sC(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 Z_(e){if(Vo(e)!==e)throw Error(G(188))}function F4(e){var t=e.alternate;if(!t){if(t=Vo(e),t===null)throw Error(G(188));return t!==e?null:e}for(var r=e,n=t;;){var a=r.return;if(a===null)break;var i=a.alternate;if(i===null){if(n=a.return,n!==null){r=n;continue}break}if(a.child===i.child){for(i=a.child;i;){if(i===r)return Z_(a),e;if(i===n)return Z_(a),t;i=i.sibling}throw Error(G(188))}if(r.return!==n.return)r=a,n=i;else{for(var o=!1,s=a.child;s;){if(s===r){o=!0,r=a,n=i;break}if(s===n){o=!0,n=a,r=i;break}s=s.sibling}if(!o){for(s=i.child;s;){if(s===r){o=!0,r=i,n=a;break}if(s===n){o=!0,n=i,r=a;break}s=s.sibling}if(!o)throw Error(G(189))}}if(r.alternate!==n)throw Error(G(190))}if(r.tag!==3)throw Error(G(188));return r.stateNode.current===r?e:t}function lC(e){return e=F4(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 uC=Cr.unstable_scheduleCallback,eS=Cr.unstable_cancelCallback,U4=Cr.unstable_shouldYield,z4=Cr.unstable_requestPaint,dt=Cr.unstable_now,W4=Cr.unstable_getCurrentPriorityLevel,Bx=Cr.unstable_ImmediatePriority,dC=Cr.unstable_UserBlockingPriority,bh=Cr.unstable_NormalPriority,H4=Cr.unstable_LowPriority,fC=Cr.unstable_IdlePriority,sm=null,Qn=null;function q4(e){if(Qn&&typeof Qn.onCommitFiberRoot=="function")try{Qn.onCommitFiberRoot(sm,e,void 0,(e.current.flags&128)===128)}catch{}}var wn=Math.clz32?Math.clz32:G4,V4=Math.log,K4=Math.LN2;function G4(e){return e>>>=0,e===0?32:31-(V4(e)/K4|0)|0}var nf=64,af=4194304;function Lc(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 xh(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,a=e.suspendedLanes,i=e.pingedLanes,o=r&268435455;if(o!==0){var s=o&~a;s!==0?n=Lc(s):(i&=o,i!==0&&(n=Lc(i)))}else o=r&~a,o!==0?n=Lc(o):i!==0&&(n=Lc(i));if(n===0)return 0;if(t!==0&&t!==n&&!(t&a)&&(a=n&-n,i=t&-t,a>=i||a===16&&(i&4194240)!==0))return t;if(n&4&&(n|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0<t;)r=31-wn(t),a=1<<r,n|=e[r],t&=~a;return n}function Y4(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 X4(e,t){for(var r=e.suspendedLanes,n=e.pingedLanes,a=e.expirationTimes,i=e.pendingLanes;0<i;){var o=31-wn(i),s=1<<o,l=a[o];l===-1?(!(s&r)||s&n)&&(a[o]=Y4(s,t)):l<=t&&(e.expiredLanes|=s),i&=~s}}function By(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function hC(){var e=nf;return nf<<=1,!(nf&4194240)&&(nf=64),e}function Zg(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}
vendor: 4,087 bytes, line 37
37function kd(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-wn(t),e[t]=r}function J4(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var n=e.eventTimes;for(e=e.expirationTimes;0<r;){var a=31-wn(r),i=1<<a;t[a]=0,n[a]=-1,e[a]=-1,r&=~i}}function Fx(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var n=31-wn(r),a=1<<n;a&t|e[n]&t&&(e[n]|=t),r&=~a}}var Re=0;function pC(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var mC,Ux,gC,vC,yC,Fy=!1,of=[],yi=null,bi=null,xi=null,uu=new Map,du=new Map,ai=[],Q4="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 tS(e,t){switch(e){case"focusin":case"focusout":yi=null;break;case"dragenter":case"dragleave":bi=null;break;case"mouseover":case"mouseout":xi=null;break;case"pointerover":case"pointerout":uu.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":du.delete(t.pointerId)}}function gc(e,t,r,n,a,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:r,eventSystemFlags:n,nativeEvent:i,targetContainers:[a]},t!==null&&(t=Od(t),t!==null&&Ux(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,a!==null&&t.indexOf(a)===-1&&t.push(a),e)}function Z4(e,t,r,n,a){switch(t){case"focusin":return yi=gc(yi,e,t,r,n,a),!0;case"dragenter":return bi=gc(bi,e,t,r,n,a),!0;case"mouseover":return xi=gc(xi,e,t,r,n,a),!0;case"pointerover":var i=a.pointerId;return uu.set(i,gc(uu.get(i)||null,e,t,r,n,a)),!0;case"gotpointercapture":return i=a.pointerId,du.set(i,gc(du.get(i)||null,e,t,r,n,a)),!0}return!1}function bC(e){var t=oo(e.target);if(t!==null){var r=Vo(t);if(r!==null){if(t=r.tag,t===13){if(t=sC(r),t!==null){e.blockedOn=t,yC(e.priority,function(){gC(r)});return}}else if(t===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Zf(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=Uy(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var n=new r.constructor(r.type,r);Ry=n,r.target.dispatchEvent(n),Ry=null}else return t=Od(r),t!==null&&Ux(t),e.blockedOn=r,!1;t.shift()}return!0}function rS(e,t,r){Zf(e)&&r.delete(t)}function e3(){Fy=!1,yi!==null&&Zf(yi)&&(yi=null),bi!==null&&Zf(bi)&&(bi=null),xi!==null&&Zf(xi)&&(xi=null),uu.forEach(rS),du.forEach(rS)}function vc(e,t){e.blockedOn===t&&(e.blockedOn=null,Fy||(Fy=!0,Cr.unstable_scheduleCallback(Cr.unstable_NormalPriority,e3)))}function fu(e){function t(a){return vc(a,e)}if(0<of.length){vc(of[0],e);for(var r=1;r<of.length;r++){var n=of[r];n.blockedOn===e&&(n.blockedOn=null)}}for(yi!==null&&vc(yi,e),bi!==null&&vc(bi,e),xi!==null&&vc(xi,e),uu.forEach(t),du.forEach(t),r=0;r<ai.length;r++)n=ai[r],n.blockedOn===e&&(n.blockedOn=null);for(;0<ai.length&&(r=ai[0],r.blockedOn===null);)bC(r),r.blockedOn===null&&ai.shift()}var zs=Da.ReactCurrentBatchConfig,wh=!0;function t3(e,t,r,n){var a=Re,i=zs.transition;zs.transition=null;try{Re=1,zx(e,t,r,n)}finally{Re=a,zs.transition=i}}function r3(e,t,r,n){var a=Re,i=zs.transition;zs.transition=null;try{Re=4,zx(e,t,r,n)}finally{Re=a,zs.transition=i}}function zx(e,t,r,n){if(wh){var a=Uy(e,t,r,n);if(a===null)cv(e,t,n,_h,r),tS(e,n);else if(Z4(a,e,t,r,n))n.stopPropagation();else if(tS(e,n),t&4&&-1<Q4.indexOf(e)){for(;a!==null;){var i=Od(a);if(i!==null&&mC(i),i=Uy(e,t,r,n),i===null&&cv(e,t,n,_h,r),i===a)break;a=i}a!==null&&n.stopPropagation()}else cv(e,t,n,null,r)}}var _h=null;function Uy(e,t,r,n){if(_h=null,e=Lx(n),e=oo(e),e!==null)if(t=Vo(e),t===null)e=null;else if(r=t.tag,r===13){if(e=sC(t),e!==null)return e;e=null}else if(r===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return _h=e,null}
vendor: 10,401 bytes, line 37
37function xC(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(W4()){case Bx:return 1;case dC:return 4;case bh:case H4:return 16;case fC:return 536870912;default:return 16}default:return 16}}var pi=null,Wx=null,eh=null;function wC(){if(eh)return eh;var e,t=Wx,r=t.length,n,a="value"in pi?pi.value:pi.textContent,i=a.length;for(e=0;e<r&&t[e]===a[e];e++);var o=r-e;for(n=1;n<=o&&t[r-n]===a[i-n];n++);return eh=a.slice(e,1<n?1-n:void 0)}function th(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 sf(){return!0}function nS(){return!1}function Mr(e){function t(r,n,a,i,o){this._reactName=r,this._targetInst=a,this.type=n,this.nativeEvent=i,this.target=o,this.currentTarget=null;for(var s in e)e.hasOwnProperty(s)&&(r=e[s],this[s]=r?r(i):i[s]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?sf:nS,this.isPropagationStopped=nS,this}return at(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=sf)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=sf)},persist:function(){},isPersistent:sf}),t}var Hl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Hx=Mr(Hl),Ed=at({},Hl,{view:0,detail:0}),n3=Mr(Ed),ev,tv,yc,lm=at({},Ed,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:qx,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!==yc&&(yc&&e.type==="mousemove"?(ev=e.screenX-yc.screenX,tv=e.screenY-yc.screenY):tv=ev=0,yc=e),ev)},movementY:function(e){return"movementY"in e?e.movementY:tv}}),aS=Mr(lm),a3=at({},lm,{dataTransfer:0}),i3=Mr(a3),o3=at({},Ed,{relatedTarget:0}),rv=Mr(o3),s3=at({},Hl,{animationName:0,elapsedTime:0,pseudoElement:0}),l3=Mr(s3),c3=at({},Hl,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),u3=Mr(c3),d3=at({},Hl,{data:0}),iS=Mr(d3),f3={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},h3={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"},p3={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function m3(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=p3[e])?!!t[e]:!1}function qx(){return m3}var g3=at({},Ed,{key:function(e){if(e.key){var t=f3[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=th(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?h3[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:qx,charCode:function(e){return e.type==="keypress"?th(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?th(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),v3=Mr(g3),y3=at({},lm,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),oS=Mr(y3),b3=at({},Ed,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:qx}),x3=Mr(b3),w3=at({},Hl,{propertyName:0,elapsedTime:0,pseudoElement:0}),_3=Mr(w3),S3=at({},lm,{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}),j3=Mr(S3),k3=[9,13,27,32],Vx=Oa&&"CompositionEvent"in window,Vc=null;Oa&&"documentMode"in document&&(Vc=document.documentMode);var E3=Oa&&"TextEvent"in window&&!Vc,_C=Oa&&(!Vx||Vc&&8<Vc&&11>=Vc),sS=" ",lS=!1;function SC(e,t){switch(e){case"keyup":return k3.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function jC(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ks=!1;function O3(e,t){switch(e){case"compositionend":return jC(t);case"keypress":return t.which!==32?null:(lS=!0,sS);case"textInput":return e=t.data,e===sS&&lS?null:e;default:return null}}function N3(e,t){if(ks)return e==="compositionend"||!Vx&&SC(e,t)?(e=wC(),eh=Wx=pi=null,ks=!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 _C&&t.locale!=="ko"?null:t.data;default:return null}}var P3={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 cS(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!P3[e.type]:t==="textarea"}function kC(e,t,r,n){rC(n),t=Sh(t,"onChange"),0<t.length&&(r=new Hx("onChange","change",null,r,n),e.push({event:r,listeners:t}))}var Kc=null,hu=null;function C3(e){IC(e,0)}function cm(e){var t=Ns(e);if(YP(t))return e}function T3(e,t){if(e==="change")return t}var EC=!1;if(Oa){var nv;if(Oa){var av="oninput"in document;if(!av){var uS=document.createElement("div");uS.setAttribute("oninput","return;"),av=typeof uS.oninput=="function"}nv=av}else nv=!1;EC=nv&&(!document.documentMode||9<document.documentMode)}function dS(){Kc&&(Kc.detachEvent("onpropertychange",OC),hu=Kc=null)}function OC(e){if(e.propertyName==="value"&&cm(hu)){var t=[];kC(t,hu,e,Lx(e)),oC(C3,t)}}function A3(e,t,r){e==="focusin"?(dS(),Kc=t,hu=r,Kc.attachEvent("onpropertychange",OC)):e==="focusout"&&dS()}function M3(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return cm(hu)}function $3(e,t){if(e==="click")return cm(t)}function R3(e,t){if(e==="input"||e==="change")return cm(t)}function I3(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var jn=typeof Object.is=="function"?Object.is:I3;function pu(e,t){if(jn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(n=0;n<r.length;n++){var a=r[n];if(!Sy.call(t,a)||!jn(e[a],t[a]))return!1}return!0}function fS(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function hS(e,t){var r=fS(e);e=0;for(var n;r;){if(r.nodeType===3){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=fS(r)}}function NC(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?NC(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function PC(){for(var e=window,t=gh();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=gh(e.document)}return t}function Kx(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 D3(e){var t=PC(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&NC(r.ownerDocument.documentElement,r)){if(n!==null&&Kx(r)){if(t=n.start,e=n.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var a=r.textContent.length,i=Math.min(n.start,a);n=n.end===void 0?i:Math.min(n.end,a),!e.extend&&i>n&&(a=n,n=i,i=a),a=hS(r,i);var o=hS(r,n);a&&o&&(e.rangeCount!==1||e.anchorNode!==a.node||e.anchorOffset!==a.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(a.node,a.offset),e.removeAllRanges(),i>n?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<t.length;r++)e=t[r],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var L3=Oa&&"documentMode"in document&&11>=document.documentMode,Es=null,zy=null,Gc=null,Wy=!1;function pS(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;Wy||Es==null||Es!==gh(n)||(n=Es,"selectionStart"in n&&Kx(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focu
vendor: 4,383 bytes, line 37
37sNode:n.focusNode,focusOffset:n.focusOffset}),Gc&&pu(Gc,n)||(Gc=n,n=Sh(zy,"onSelect"),0<n.length&&(t=new Hx("onSelect","select",null,t,r),e.push({event:t,listeners:n}),t.target=Es)))}function lf(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var Os={animationend:lf("Animation","AnimationEnd"),animationiteration:lf("Animation","AnimationIteration"),animationstart:lf("Animation","AnimationStart"),transitionend:lf("Transition","TransitionEnd")},iv={},CC={};Oa&&(CC=document.createElement("div").style,"AnimationEvent"in window||(delete Os.animationend.animation,delete Os.animationiteration.animation,delete Os.animationstart.animation),"TransitionEvent"in window||delete Os.transitionend.transition);function um(e){if(iv[e])return iv[e];if(!Os[e])return e;var t=Os[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in CC)return iv[e]=t[r];return e}var TC=um("animationend"),AC=um("animationiteration"),MC=um("animationstart"),$C=um("transitionend"),RC=new Map,mS="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 $i(e,t){RC.set(e,t),qo(t,[e])}for(var ov=0;ov<mS.length;ov++){var sv=mS[ov],B3=sv.toLowerCase(),F3=sv[0].toUpperCase()+sv.slice(1);$i(B3,"on"+F3)}$i(TC,"onAnimationEnd");$i(AC,"onAnimationIteration");$i(MC,"onAnimationStart");$i("dblclick","onDoubleClick");$i("focusin","onFocus");$i("focusout","onBlur");$i($C,"onTransitionEnd");cl("onMouseEnter",["mouseout","mouseover"]);cl("onMouseLeave",["mouseout","mouseover"]);cl("onPointerEnter",["pointerout","pointerover"]);cl("onPointerLeave",["pointerout","pointerover"]);qo("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));qo("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));qo("onBeforeInput",["compositionend","keypress","textInput","paste"]);qo("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));qo("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));qo("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Bc="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(" "),U3=new Set("cancel close invalid load scroll toggle".split(" ").concat(Bc));function gS(e,t,r){var n=e.type||"unknown-event";e.currentTarget=r,B4(n,t,void 0,e),e.currentTarget=null}function IC(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var n=e[r],a=n.event;n=n.listeners;e:{var i=void 0;if(t)for(var o=n.length-1;0<=o;o--){var s=n[o],l=s.instance,c=s.currentTarget;if(s=s.listener,l!==i&&a.isPropagationStopped())break e;gS(a,s,c),i=l}else for(o=0;o<n.length;o++){if(s=n[o],l=s.instance,c=s.currentTarget,s=s.listener,l!==i&&a.isPropagationStopped())break e;gS(a,s,c),i=l}}}if(yh)throw e=Ly,yh=!1,Ly=null,e}function Ge(e,t){var r=t[Gy];r===void 0&&(r=t[Gy]=new Set);var n=e+"__bubble";r.has(n)||(DC(t,e,2,!1),r.add(n))}function lv(e,t,r){var n=0;t&&(n|=4),DC(r,e,n,t)}var cf="_reactListening"+Math.random().toString(36).slice(2);function mu(e){if(!e[cf]){e[cf]=!0,HP.forEach(function(r){r!=="selectionchange"&&(U3.has(r)||lv(r,!1,e),lv(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[cf]||(t[cf]=!0,lv("selectionchange",!1,t))}}function DC(e,t,r,n){switch(xC(t)){case 1:var a=t3;break;case 4:a=r3;break;default:a=zx}r=a.bind(null,t,r,e),a=void 0,!Dy||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(a=!0),n?a!==void 0?e.addEventListener(t,r,{capture:!0,passive:a}):e.addEventListener(t,r,!0):a!==void 0?e.addEventListener(t,r,{passive:a}):e.addEventListener(t,r,!1)}function cv(e,t,r,n,a){var i=n;
vendor: 5,521 bytes, lines 37-38
37if(!(t&1)&&!(t&2)&&n!==null)e:for(;;){if(n===null)return;var o=n.tag;if(o===3||o===4){var s=n.stateNode.containerInfo;if(s===a||s.nodeType===8&&s.parentNode===a)break;if(o===4)for(o=n.return;o!==null;){var l=o.tag;if((l===3||l===4)&&(l=o.stateNode.containerInfo,l===a||l.nodeType===8&&l.parentNode===a))return;o=o.return}for(;s!==null;){if(o=oo(s),o===null)return;if(l=o.tag,l===5||l===6){n=i=o;continue e}s=s.parentNode}}n=n.return}oC(function(){var c=i,d=Lx(r),f=[];e:{var h=RC.get(e);if(h!==void 0){var p=Hx,g=e;switch(e){case"keypress":if(th(r)===0)break e;case"keydown":case"keyup":p=v3;break;case"focusin":g="focus",p=rv;break;case"focusout":g="blur",p=rv;break;case"beforeblur":case"afterblur":p=rv;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":p=aS;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=i3;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=x3;break;case TC:case AC:case MC:p=l3;break;case $C:p=_3;break;case"scroll":p=n3;break;case"wheel":p=j3;break;case"copy":case"cut":case"paste":p=u3;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=oS}var m=(t&4)!==0,v=!m&&e==="scroll",x=m?h!==null?h+"Capture":null:h;m=[];for(var b=c,y;b!==null;){y=b;var S=y.stateNode;if(y.tag===5&&S!==null&&(y=S,x!==null&&(S=cu(b,x),S!=null&&m.push(gu(b,S,y)))),v)break;b=b.return}0<m.length&&(h=new p(h,g,null,r,d),f.push({event:h,listeners:m}))}}if(!(t&7)){e:{if(h=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",h&&r!==Ry&&(g=r.relatedTarget||r.fromElement)&&(oo(g)||g[Na]))break e;if((p||h)&&(h=d.window===d?d:(h=d.ownerDocument)?h.defaultView||h.parentWindow:window,p?(g=r.relatedTarget||r.toElement,p=c,g=g?oo(g):null,g!==null&&(v=Vo(g),g!==v||g.tag!==5&&g.tag!==6)&&(g=null)):(p=null,g=c),p!==g)){if(m=aS,S="onMouseLeave",x="onMouseEnter",b="mouse",(e==="pointerout"||e==="pointerover")&&(m=oS,S="onPointerLeave",x="onPointerEnter",b="pointer"),v=p==null?h:Ns(p),y=g==null?h:Ns(g),h=new m(S,b+"leave",p,r,d),h.target=v,h.relatedTarget=y,S=null,oo(d)===c&&(m=new m(x,b+"enter",g,r,d),m.target=y,m.relatedTarget=v,S=m),v=S,p&&g)t:{for(m=p,x=g,b=0,y=m;y;y=as(y))b++;for(y=0,S=x;S;S=as(S))y++;for(;0<b-y;)m=as(m),b--;for(;0<y-b;)x=as(x),y--;for(;b--;){if(m===x||x!==null&&m===x.alternate)break t;m=as(m),x=as(x)}m=null}else m=null;p!==null&&vS(f,h,p,m,!1),g!==null&&v!==null&&vS(f,v,g,m,!0)}}e:{if(h=c?Ns(c):window,p=h.nodeName&&h.nodeName.toLowerCase(),p==="select"||p==="input"&&h.type==="file")var _=T3;else if(cS(h))if(EC)_=R3;else{_=M3;var j=A3}else(p=h.nodeName)&&p.toLowerCase()==="input"&&(h.type==="checkbox"||h.type==="radio")&&(_=$3);if(_&&(_=_(e,c))){kC(f,_,r,d);break e}j&&j(e,h,c),e==="focusout"&&(j=h._wrapperState)&&j.controlled&&h.type==="number"&&Cy(h,"number",h.value)}switch(j=c?Ns(c):window,e){case"focusin":(cS(j)||j.contentEditable==="true")&&(Es=j,zy=c,Gc=null);break;case"focusout":Gc=zy=Es=null;break;case"mousedown":Wy=!0;break;case"contextmenu":case"mouseup":case"dragend":Wy=!1,pS(f,r,d);break;case"selectionchange":if(L3)break;case"keydown":case"keyup":pS(f,r,d)}var k;if(Vx)e:{switch(e){case"compositionstart":var E="onCompositionStart";break e;case"compositionend":E="onCompositionEnd";break e;case"compositionupdate":E="onCompositionUpdate";break e}E=void 0}else ks?SC(e,r)&&(E="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(E="onCompositionStart");E&&(_C&&r.locale!=="ko"&&(ks||E!=="onCompositionStart"?E==="onCompositionEnd"&&ks&&(k=wC()):(pi=d,Wx="value"in pi?pi.value:pi.textContent,ks=!0)),j=Sh(c,E),0<j.length&&(E=new iS(E,e,null,r,d),f.push({event:E,listeners:j}),k?E.data=k:(k=jC(r),k!==null&&(E.data=k)))),(k=E3?O3(e,r):N3(e,r))&&(c=Sh(c,"onBeforeInput"),0<c.length&&(d=new iS("onBeforeInput","beforeinput",null,r,d),f.push({event:d,listeners:c}),d.data=k))}IC(f,t)})}function gu(e,t,r){return{instance:e,listener:t,currentTarget:r}}function Sh(e,t){for(var r=t+"Capture",n=[];e!==null;){var a=e,i=a.stateNode;a.tag===5&&i!==null&&(a=i,i=cu(e,r),i!=null&&n.unshift(gu(e,i,a)),i=cu(e,t),i!=null&&n.push(gu(e,i,a))),e=e.return}return n}function as(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function vS(e,t,r,n,a){for(var i=t._reactName,o=[];r!==null&&r!==n;){var s=r,l=s.alternate,c=s.stateNode;if(l!==null&&l===n)break;s.tag===5&&c!==null&&(s=c,a?(l=cu(r,i),l!=null&&o.unshift(gu(r,l,s))):a||(l=cu(r,i),l!=null&&o.push(gu(r,l,s)))),r=r.return}o.length!==0&&e.push({event:t,listeners:o})}var z3=/\r\n?/g,W3=/\u0000|\uFFFD/g;function yS(e){return(typeof e=="string"?e:""+e).replace(z3,`
38`).replace(W3,"")}function uf(e,t,r){if(t=yS(t),yS(e)!==t&&r)throw Error(G(425))}function jh(){}var Hy=null,qy=null;function Vy(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 Ky=typeof setTimeout=="function"?setTimeout:void 0,H3=typeof clearTimeout=="function"?clearTimeout:void 0,bS=typeof Promise=="function"?Promise:void 0,q3=typeof queueMicrotask=="function"?queueMicrotask:typeof bS<"u"?function(e){return bS.resolve(null).then(e).catch(V3)}:Ky;function V3(e){setTimeout(function(){throw e})}function uv(e,t){var r=t,n=0;
vendor: 4,827 bytes, line 38
38do{var a=r.nextSibling;if(e.removeChild(r),a&&a.nodeType===8)if(r=a.data,r==="/$"){if(n===0){e.removeChild(a),fu(t);return}n--}else r!=="$"&&r!=="$?"&&r!=="$!"||n++;r=a}while(r);fu(t)}function wi(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 xS(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"){if(t===0)return e;t--}else r==="/$"&&t++}e=e.previousSibling}return null}var ql=Math.random().toString(36).slice(2),Wn="__reactFiber$"+ql,vu="__reactProps$"+ql,Na="__reactContainer$"+ql,Gy="__reactEvents$"+ql,K3="__reactListeners$"+ql,G3="__reactHandles$"+ql;function oo(e){var t=e[Wn];if(t)return t;for(var r=e.parentNode;r;){if(t=r[Na]||r[Wn]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=xS(e);e!==null;){if(r=e[Wn])return r;e=xS(e)}return t}e=r,r=e.parentNode}return null}function Od(e){return e=e[Wn]||e[Na],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Ns(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(G(33))}function dm(e){return e[vu]||null}var Yy=[],Ps=-1;function Ri(e){return{current:e}}function Je(e){0>Ps||(e.current=Yy[Ps],Yy[Ps]=null,Ps--)}function qe(e,t){Ps++,Yy[Ps]=e.current,e.current=t}var Ci={},Yt=Ri(Ci),dr=Ri(!1),No=Ci;function ul(e,t){var r=e.type.contextTypes;if(!r)return Ci;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var a={},i;for(i in r)a[i]=t[i];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=a),a}function fr(e){return e=e.childContextTypes,e!=null}function kh(){Je(dr),Je(Yt)}function wS(e,t,r){if(Yt.current!==Ci)throw Error(G(168));qe(Yt,t),qe(dr,r)}function LC(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var a in n)if(!(a in t))throw Error(G(108,A4(e)||"Unknown",a));return at({},r,n)}function Eh(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ci,No=Yt.current,qe(Yt,e),qe(dr,dr.current),!0}function _S(e,t,r){var n=e.stateNode;if(!n)throw Error(G(169));r?(e=LC(e,t,No),n.__reactInternalMemoizedMergedChildContext=e,Je(dr),Je(Yt),qe(Yt,e)):Je(dr),qe(dr,r)}var ga=null,fm=!1,dv=!1;function BC(e){ga===null?ga=[e]:ga.push(e)}function Y3(e){fm=!0,BC(e)}function Ii(){if(!dv&&ga!==null){dv=!0;var e=0,t=Re;try{var r=ga;for(Re=1;e<r.length;e++){var n=r[e];do n=n(!0);while(n!==null)}ga=null,fm=!1}catch(a){throw ga!==null&&(ga=ga.slice(e+1)),uC(Bx,Ii),a}finally{Re=t,dv=!1}}return null}var Cs=[],Ts=0,Oh=null,Nh=0,Br=[],Fr=0,Po=null,ya=1,ba="";function Qi(e,t){Cs[Ts++]=Nh,Cs[Ts++]=Oh,Oh=e,Nh=t}function FC(e,t,r){Br[Fr++]=ya,Br[Fr++]=ba,Br[Fr++]=Po,Po=e;var n=ya;e=ba;var a=32-wn(n)-1;n&=~(1<<a),r+=1;var i=32-wn(t)+a;if(30<i){var o=a-a%5;i=(n&(1<<o)-1).toString(32),n>>=o,a-=o,ya=1<<32-wn(t)+a|r<<a|n,ba=i+e}else ya=1<<i|r<<a|n,ba=e}function Gx(e){e.return!==null&&(Qi(e,1),FC(e,1,0))}function Yx(e){for(;e===Oh;)Oh=Cs[--Ts],Cs[Ts]=null,Nh=Cs[--Ts],Cs[Ts]=null;for(;e===Po;)Po=Br[--Fr],Br[Fr]=null,ba=Br[--Fr],Br[Fr]=null,ya=Br[--Fr],Br[Fr]=null}var Or=null,kr=null,et=!1,gn=null;function UC(e,t){var r=zr(5,null,null,0);r.elementType="DELETED",r.stateNode=t,r.return=e,t=e.deletions,t===null?(e.deletions=[r],e.flags|=16):t.push(r)}function SS(e,t){switch(e.tag){case 5:var r=e.type;return t=t.nodeType!==1||r.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Or=e,kr=wi(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Or=e,kr=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=Po!==null?{id:ya,overflow:ba}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=zr(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,Or=e,kr=null,!0):!1;default:return!1}}function Xy(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Jy(e){if(et){var t=kr;if(t){var r=t;if(!SS(e,t)){if(Xy(e))throw Error(G(418));t=wi(r.nextSibling);var n=Or;t&&SS(e,t)?UC(n,r):(e.flags=e.flags&-4097|2,et=!1,Or=e)}}else{if(Xy(e))throw Error(G(418));e.flags=e.flags&-4097|2,et=!1,Or=e}}}function jS(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Or=e}function df(e){if(e!==Or)return!1;if(!et)return jS(e),et=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Vy(e.type,e.memoizedProps)),t&&(t=kr)){if(Xy(e))throw zC(),Error(G(418));for(;t;)UC(e,t),t=wi(t.nextSibling)}if(jS(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(G(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"){if(t===0){kr=wi(e.nextSibling);break e}t--}
vendor: 12,387 bytes, line 38
38else r!=="$"&&r!=="$!"&&r!=="$?"||t++}e=e.nextSibling}kr=null}}else kr=Or?wi(e.stateNode.nextSibling):null;return!0}function zC(){for(var e=kr;e;)e=wi(e.nextSibling)}function dl(){kr=Or=null,et=!1}function Xx(e){gn===null?gn=[e]:gn.push(e)}var X3=Da.ReactCurrentBatchConfig;function bc(e,t,r){if(e=r.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(r._owner){if(r=r._owner,r){if(r.tag!==1)throw Error(G(309));var n=r.stateNode}if(!n)throw Error(G(147,e));var a=n,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(o){var s=a.refs;o===null?delete s[i]:s[i]=o},t._stringRef=i,t)}if(typeof e!="string")throw Error(G(284));if(!r._owner)throw Error(G(290,e))}return e}function ff(e,t){throw e=Object.prototype.toString.call(t),Error(G(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function kS(e){var t=e._init;return t(e._payload)}function WC(e){function t(x,b){if(e){var y=x.deletions;y===null?(x.deletions=[b],x.flags|=16):y.push(b)}}function r(x,b){if(!e)return null;for(;b!==null;)t(x,b),b=b.sibling;return null}function n(x,b){for(x=new Map;b!==null;)b.key!==null?x.set(b.key,b):x.set(b.index,b),b=b.sibling;return x}function a(x,b){return x=ki(x,b),x.index=0,x.sibling=null,x}function i(x,b,y){return x.index=y,e?(y=x.alternate,y!==null?(y=y.index,y<b?(x.flags|=2,b):y):(x.flags|=2,b)):(x.flags|=1048576,b)}function o(x){return e&&x.alternate===null&&(x.flags|=2),x}function s(x,b,y,S){return b===null||b.tag!==6?(b=yv(y,x.mode,S),b.return=x,b):(b=a(b,y),b.return=x,b)}function l(x,b,y,S){var _=y.type;return _===js?d(x,b,y.props.children,S,y.key):b!==null&&(b.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===ti&&kS(_)===b.type)?(S=a(b,y.props),S.ref=bc(x,b,y),S.return=x,S):(S=lh(y.type,y.key,y.props,null,x.mode,S),S.ref=bc(x,b,y),S.return=x,S)}function c(x,b,y,S){return b===null||b.tag!==4||b.stateNode.containerInfo!==y.containerInfo||b.stateNode.implementation!==y.implementation?(b=bv(y,x.mode,S),b.return=x,b):(b=a(b,y.children||[]),b.return=x,b)}function d(x,b,y,S,_){return b===null||b.tag!==7?(b=_o(y,x.mode,S,_),b.return=x,b):(b=a(b,y),b.return=x,b)}function f(x,b,y){if(typeof b=="string"&&b!==""||typeof b=="number")return b=yv(""+b,x.mode,y),b.return=x,b;if(typeof b=="object"&&b!==null){switch(b.$$typeof){case ef:return y=lh(b.type,b.key,b.props,null,x.mode,y),y.ref=bc(x,null,b),y.return=x,y;case Ss:return b=bv(b,x.mode,y),b.return=x,b;case ti:var S=b._init;return f(x,S(b._payload),y)}if(Dc(b)||pc(b))return b=_o(b,x.mode,y,null),b.return=x,b;ff(x,b)}return null}function h(x,b,y,S){var _=b!==null?b.key:null;if(typeof y=="string"&&y!==""||typeof y=="number")return _!==null?null:s(x,b,""+y,S);if(typeof y=="object"&&y!==null){switch(y.$$typeof){case ef:return y.key===_?l(x,b,y,S):null;case Ss:return y.key===_?c(x,b,y,S):null;case ti:return _=y._init,h(x,b,_(y._payload),S)}if(Dc(y)||pc(y))return _!==null?null:d(x,b,y,S,null);ff(x,y)}return null}function p(x,b,y,S,_){if(typeof S=="string"&&S!==""||typeof S=="number")return x=x.get(y)||null,s(b,x,""+S,_);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case ef:return x=x.get(S.key===null?y:S.key)||null,l(b,x,S,_);case Ss:return x=x.get(S.key===null?y:S.key)||null,c(b,x,S,_);case ti:var j=S._init;return p(x,b,y,j(S._payload),_)}if(Dc(S)||pc(S))return x=x.get(y)||null,d(b,x,S,_,null);ff(b,S)}return null}function g(x,b,y,S){for(var _=null,j=null,k=b,E=b=0,O=null;k!==null&&E<y.length;E++){k.index>E?(O=k,k=null):O=k.sibling;var A=h(x,k,y[E],S);if(A===null){k===null&&(k=O);break}e&&k&&A.alternate===null&&t(x,k),b=i(A,b,E),j===null?_=A:j.sibling=A,j=A,k=O}if(E===y.length)return r(x,k),et&&Qi(x,E),_;if(k===null){for(;E<y.length;E++)k=f(x,y[E],S),k!==null&&(b=i(k,b,E),j===null?_=k:j.sibling=k,j=k);return et&&Qi(x,E),_}for(k=n(x,k);E<y.length;E++)O=p(k,x,E,y[E],S),O!==null&&(e&&O.alternate!==null&&k.delete(O.key===null?E:O.key),b=i(O,b,E),j===null?_=O:j.sibling=O,j=O);return e&&k.forEach(function(T){return t(x,T)}),et&&Qi(x,E),_}function m(x,b,y,S){var _=pc(y);if(typeof _!="function")throw Error(G(150));if(y=_.call(y),y==null)throw Error(G(151));for(var j=_=null,k=b,E=b=0,O=null,A=y.next();k!==null&&!A.done;E++,A=y.next()){k.index>E?(O=k,k=null):O=k.sibling;var T=h(x,k,A.value,S);if(T===null){k===null&&(k=O);break}e&&k&&T.alternate===null&&t(x,k),b=i(T,b,E),j===null?_=T:j.sibling=T,j=T,k=O}if(A.done)return r(x,k),et&&Qi(x,E),_;if(k===null){for(;!A.done;E++,A=y.next())A=f(x,A.value,S),A!==null&&(b=i(A,b,E),j===null?_=A:j.sibling=A,j=A);return et&&Qi(x,E),_}for(k=n(x,k);!A.done;E++,A=y.next())A=p(k,x,E,A.value,S),A!==null&&(e&&A.alternate!==null&&k.delete(A.key===null?E:A.key),b=i(A,b,E),j===null?_=A:j.sibling=A,j=A);return e&&k.forEach(function(N){return t(x,N)}),et&&Qi(x,E),_}function v(x,b,y,S){if(typeof y=="object"&&y!==null&&y.type===js&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case ef:e:{for(var _=y.key,j=b;j!==null;){if(j.key===_){if(_=y.type,_===js){if(j.tag===7){r(x,j.sibling),b=a(j,y.props.children),b.return=x,x=b;break e}}else if(j.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===ti&&kS(_)===j.type){r(x,j.sibling),b=a(j,y.props),b.ref=bc(x,j,y),b.return=x,x=b;break e}r(x,j);break}else t(x,j);j=j.sibling}y.type===js?(b=_o(y.props.children,x.mode,S,y.key),b.return=x,x=b):(S=lh(y.type,y.key,y.props,null,x.mode,S),S.ref=bc(x,b,y),S.return=x,x=S)}return o(x);case Ss:e:{for(j=y.key;b!==null;){if(b.key===j)if(b.tag===4&&b.stateNode.containerInfo===y.containerInfo&&b.stateNode.implementation===y.implementation){r(x,b.sibling),b=a(b,y.children||[]),b.return=x,x=b;break e}else{r(x,b);break}else t(x,b);b=b.sibling}b=bv(y,x.mode,S),b.return=x,x=b}return o(x);case ti:return j=y._init,v(x,b,j(y._payload),S)}if(Dc(y))return g(x,b,y,S);if(pc(y))return m(x,b,y,S);ff(x,y)}return typeof y=="string"&&y!==""||typeof y=="number"?(y=""+y,b!==null&&b.tag===6?(r(x,b.sibling),b=a(b,y),b.return=x,x=b):(r(x,b),b=yv(y,x.mode,S),b.return=x,x=b),o(x)):r(x,b)}return v}var fl=WC(!0),HC=WC(!1),Ph=Ri(null),Ch=null,As=null,Jx=null;function Qx(){Jx=As=Ch=null}function Zx(e){var t=Ph.current;Je(Ph),e._currentValue=t}function Qy(e,t,r){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===r)break;e=e.return}}function Ws(e,t){Ch=e,Jx=As=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(lr=!0),e.firstContext=null)}function Kr(e){var t=e._currentValue;if(Jx!==e)if(e={context:e,memoizedValue:t,next:null},As===null){if(Ch===null)throw Error(G(308));As=e,Ch.dependencies={lanes:0,firstContext:e}}else As=As.next=e;return t}var so=null;function ew(e){so===null?so=[e]:so.push(e)}function qC(e,t,r,n){var a=t.interleaved;return a===null?(r.next=r,ew(t)):(r.next=a.next,a.next=r),t.interleaved=r,Pa(e,n)}function Pa(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var ri=!1;function tw(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function VC(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 Sa(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function _i(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,je&2){var a=n.pending;return a===null?t.next=t:(t.next=a.next,a.next=t),n.pending=t,Pa(e,r)}return a=n.interleaved,a===null?(t.next=t,ew(n)):(t.next=a.next,a.next=t),n.interleaved=t,Pa(e,r)}function rh(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,Fx(e,r)}}function ES(e,t){var r=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var a=null,i=null;if(r=r.firstBaseUpdate,r!==null){do{var o={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};i===null?a=i=o:i=i.next=o,r=r.next}while(r!==null);i===null?a=i=t:i=i.next=t}else a=i=t;r={baseState:n.baseState,firstBaseUpdate:a,lastBaseUpdate:i,shared:n.shared,effects:n.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function Th(e,t,r,n){var a=e.updateQueue;ri=!1;var i=a.firstBaseUpdate,o=a.lastBaseUpdate,s=a.shared.pending;if(s!==null){a.shared.pending=null;var l=s,c=l.next;l.next=null,o===null?i=c:o.next=c,o=l;var d=e.alternate;d!==null&&(d=d.updateQueue,s=d.lastBaseUpdate,s!==o&&(s===null?d.firstBaseUpdate=c:s.next=c,d.lastBaseUpdate=l))}if(i!==null){var f=a.baseState;o=0,d=c=l=null,s=i;do{var h=s.lane,p=s.eventTime;if((n&h)===h){d!==null&&(d=d.next={eventTime:p,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var g=e,m=s;switch(h=t,p=r,m.tag){case 1:if(g=m.payload,typeof g=="function"){f=g.call(p,f,h);break e}f=g;break e;case 3:g.flags=g.flags&-65537|128;case 0:if(g=m.payload,h=typeof g=="function"?g.call(p,f,h):g,h==null)break e;f=at({},f,h);break e;case 2:ri=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,h=a.effects,h===null?a.effects=[s]:h.push(s))}else p={eventTime:p,lane:h,tag:s.tag,payload:s.payload,callback:s.callback,next:null},d===null?(c=d=p,l=f):d=d.next=p,o|=h;if(s=s.next,s===null){if(s=a.shared.pending,s===null)break;h=s,s=h.next,h.next=null,a.lastBaseUpdate=h,a.shared.pending=null}}while(!0);if(d===null&&(l=f),a.baseState=l,a.firstBaseUpdate=c,a.lastBaseUpdate=d,t=a.shared.interleaved,t!==null){a=t;do o|=a.lane,a=a.next;while(a!==t)}else i===null&&(a.shared.lanes=0);To|=o,e.lanes=o,e.memoizedState=f}}function OS(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var n=e[t],a=n.callback;if(a!==null){if(n.callback=null,n=r,typeof a!="function")throw Error(G(191,a));a.call(n)}}}var Nd={},Zn=Ri(Nd),yu=Ri(Nd),bu=Ri(Nd);function lo(e){if(e===Nd)throw Error(G(174));return e}function rw(e,t){switch(qe(bu,t),qe(yu,e),qe(Zn,Nd),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Ay(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Ay(t,e)}Je(Zn),qe(Zn,t)}function hl(){Je(Zn),Je(yu),Je(bu)}function KC(e){lo(bu.current);var t=lo(Zn.current),r=Ay(t,e.type);t!==r&&(qe(yu,e),qe(Zn,r))}function nw(e){yu.current===e&&(Je(Zn),Je(yu))}var rt=Ri(0);function Ah(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var fv=[];function aw(){for(var e=0;e<fv.length;e++)fv[e]._workInProgressVersionPrimary=null;fv.length=0}var nh=Da.ReactCurrentDispatcher,hv=Da.ReactCurrentBatchConfig,Co=0,nt=null,xt=null,kt=null,Mh=!1,Yc=!1,xu=0,J3=0;function Ut(){throw Error(G(321))}function iw(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!jn(e[r],t[r]))return!1;return!0}function ow(e,t,r,n,a,i){if(Co=i,nt=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,nh.current=e===null||e.memoizedState===null?tL:rL,e=r(n,a),Yc){i=0;do{if(Yc=!1,xu=0,25<=i)throw Error(G(301));i+=1,kt=xt=null,t.updateQueue=null,nh.current=nL,e=r(n,a)}while(Yc)}if(nh.current=$h,t=xt!==null&&xt.next!==null,Co=0,kt=xt=nt=null,Mh=!1,t)throw Error(G(300));return e}function sw(){var e=xu!==0;return xu=0,e}function In(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return kt===null?nt.memoizedState=kt=e:kt=kt.next=e,kt}function Gr(){if(xt===null){var e=nt.alternate;e=e!==null?e.memoizedState:null}else e=xt.next;var t=kt===null?nt.memoizedState:kt.next;if(t!==null)kt=t,xt=e;else{if(e===null)throw Error(G(310));xt=e,e={memoizedState:xt.memoizedState,baseState:xt.baseState,baseQueue:xt.baseQueue,queue:xt.queue,next:null},kt===null?nt.memoizedState=kt=e:kt=kt.next=e}return kt}function wu(e,t){return typeof t=="function"?t(e):t}function pv(e){var t=Gr(),r=t.queue;if(r===null)throw Error(G(311));r.lastRenderedReducer=e;
vendor: 5,688 bytes, line 38
38var n=xt,a=n.baseQueue,i=r.pending;if(i!==null){if(a!==null){var o=a.next;a.next=i.next,i.next=o}n.baseQueue=a=i,r.pending=null}if(a!==null){i=a.next,n=n.baseState;var s=o=null,l=null,c=i;do{var d=c.lane;if((Co&d)===d)l!==null&&(l=l.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),n=c.hasEagerState?c.eagerState:e(n,c.action);else{var f={lane:d,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};l===null?(s=l=f,o=n):l=l.next=f,nt.lanes|=d,To|=d}c=c.next}while(c!==null&&c!==i);l===null?o=n:l.next=s,jn(n,t.memoizedState)||(lr=!0),t.memoizedState=n,t.baseState=o,t.baseQueue=l,r.lastRenderedState=n}if(e=r.interleaved,e!==null){a=e;do i=a.lane,nt.lanes|=i,To|=i,a=a.next;while(a!==e)}else a===null&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function mv(e){var t=Gr(),r=t.queue;if(r===null)throw Error(G(311));r.lastRenderedReducer=e;var n=r.dispatch,a=r.pending,i=t.memoizedState;if(a!==null){r.pending=null;var o=a=a.next;do i=e(i,o.action),o=o.next;while(o!==a);jn(i,t.memoizedState)||(lr=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),r.lastRenderedState=i}return[i,n]}function GC(){}function YC(e,t){var r=nt,n=Gr(),a=t(),i=!jn(n.memoizedState,a);if(i&&(n.memoizedState=a,lr=!0),n=n.queue,lw(QC.bind(null,r,n,e),[e]),n.getSnapshot!==t||i||kt!==null&&kt.memoizedState.tag&1){if(r.flags|=2048,_u(9,JC.bind(null,r,n,a,t),void 0,null),Nt===null)throw Error(G(349));Co&30||XC(r,t,a)}return a}function XC(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=nt.updateQueue,t===null?(t={lastEffect:null,stores:null},nt.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function JC(e,t,r,n){t.value=r,t.getSnapshot=n,ZC(t)&&eT(e)}function QC(e,t,r){return r(function(){ZC(t)&&eT(e)})}function ZC(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!jn(e,r)}catch{return!0}}function eT(e){var t=Pa(e,1);t!==null&&_n(t,e,1,-1)}function NS(e){var t=In();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:wu,lastRenderedState:e},t.queue=e,e=e.dispatch=eL.bind(null,nt,e),[t.memoizedState,e]}function _u(e,t,r,n){return e={tag:e,create:t,destroy:r,deps:n,next:null},t=nt.updateQueue,t===null?(t={lastEffect:null,stores:null},nt.updateQueue=t,t.lastEffect=e.next=e):(r=t.lastEffect,r===null?t.lastEffect=e.next=e:(n=r.next,r.next=e,e.next=n,t.lastEffect=e)),e}function tT(){return Gr().memoizedState}function ah(e,t,r,n){var a=In();nt.flags|=e,a.memoizedState=_u(1|t,r,void 0,n===void 0?null:n)}function hm(e,t,r,n){var a=Gr();n=n===void 0?null:n;var i=void 0;if(xt!==null){var o=xt.memoizedState;if(i=o.destroy,n!==null&&iw(n,o.deps)){a.memoizedState=_u(t,r,i,n);return}}nt.flags|=e,a.memoizedState=_u(1|t,r,i,n)}function PS(e,t){return ah(8390656,8,e,t)}function lw(e,t){return hm(2048,8,e,t)}function rT(e,t){return hm(4,2,e,t)}function nT(e,t){return hm(4,4,e,t)}function aT(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 iT(e,t,r){return r=r!=null?r.concat([e]):null,hm(4,4,aT.bind(null,t,e),r)}function cw(){}function oT(e,t){var r=Gr();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&iw(t,n[1])?n[0]:(r.memoizedState=[e,t],e)}function sT(e,t){var r=Gr();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&iw(t,n[1])?n[0]:(e=e(),r.memoizedState=[e,t],e)}function lT(e,t,r){return Co&21?(jn(r,t)||(r=hC(),nt.lanes|=r,To|=r,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,lr=!0),e.memoizedState=r)}function Q3(e,t){var r=Re;Re=r!==0&&4>r?r:4,e(!0);var n=hv.transition;hv.transition={};try{e(!1),t()}finally{Re=r,hv.transition=n}}function cT(){return Gr().memoizedState}function Z3(e,t,r){var n=ji(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},uT(e))dT(t,r);else if(r=qC(e,t,r,n),r!==null){var a=er();_n(r,e,n,a),fT(r,t,n)}}function eL(e,t,r){var n=ji(e),a={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(uT(e))dT(t,a);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var o=t.lastRenderedState,s=i(o,r);if(a.hasEagerState=!0,a.eagerState=s,jn(s,o)){var l=t.interleaved;l===null?(a.next=a,ew(t)):(a.next=l.next,l.next=a),t.interleaved=a;return}}catch{}finally{}r=qC(e,t,a,n),r!==null&&(a=er(),_n(r,e,n,a),fT(r,t,n))}}function uT(e){var t=e.alternate;return e===nt||t!==null&&t===nt}function dT(e,t){Yc=Mh=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function fT(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,Fx(e,r)}}var $h={readContext:Kr,useCallback:Ut,useContext:Ut,useEffect:Ut,useImperativeHandle:Ut,useInsertionEffect:Ut,useLayoutEffect:Ut,useMemo:Ut,useReducer:Ut,useRef:Ut,useState:Ut,useDebugValue:Ut,useDeferredValue:Ut,useTransition:Ut,useMutableSource:Ut,useSyncExternalStore:Ut,useId:Ut,unstable_isNewReconciler:!1},tL={readContext:Kr,useCallback:function(e,t){return In().memoizedState=[e,t===void 0?null:t],e},useContext:Kr,useEffect:PS,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,ah(4194308,4,aT.bind(null,t,e),r)},useLayoutEffect:function(e,t){return ah(4194308,4,e,t)},useInsertionEffect:function(e,t){return ah(4,2,e,t)},useMemo:function(e,t){var r=In();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=In();return t=r!==void 0?r(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=Z3.bind(null,nt,e),[n.memoizedState,e]}
vendor: 4,424 bytes, lines 38-40
38,useRef:function(e){var t=In();return e={current:e},t.memoizedState=e},useState:NS,useDebugValue:cw,useDeferredValue:function(e){return In().memoizedState=e},useTransition:function(){var e=NS(!1),t=e[0];return e=Q3.bind(null,e[1]),In().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=nt,a=In();if(et){if(r===void 0)throw Error(G(407));r=r()}else{if(r=t(),Nt===null)throw Error(G(349));Co&30||XC(n,t,r)}a.memoizedState=r;var i={value:r,getSnapshot:t};return a.queue=i,PS(QC.bind(null,n,i,e),[e]),n.flags|=2048,_u(9,JC.bind(null,n,i,r,t),void 0,null),r},useId:function(){var e=In(),t=Nt.identifierPrefix;if(et){var r=ba,n=ya;r=(n&~(1<<32-wn(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=xu++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=J3++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},rL={readContext:Kr,useCallback:oT,useContext:Kr,useEffect:lw,useImperativeHandle:iT,useInsertionEffect:rT,useLayoutEffect:nT,useMemo:sT,useReducer:pv,useRef:tT,useState:function(){return pv(wu)},useDebugValue:cw,useDeferredValue:function(e){var t=Gr();return lT(t,xt.memoizedState,e)},useTransition:function(){var e=pv(wu)[0],t=Gr().memoizedState;return[e,t]},useMutableSource:GC,useSyncExternalStore:YC,useId:cT,unstable_isNewReconciler:!1},nL={readContext:Kr,useCallback:oT,useContext:Kr,useEffect:lw,useImperativeHandle:iT,useInsertionEffect:rT,useLayoutEffect:nT,useMemo:sT,useReducer:mv,useRef:tT,useState:function(){return mv(wu)},useDebugValue:cw,useDeferredValue:function(e){var t=Gr();return xt===null?t.memoizedState=e:lT(t,xt.memoizedState,e)},useTransition:function(){var e=mv(wu)[0],t=Gr().memoizedState;return[e,t]},useMutableSource:GC,useSyncExternalStore:YC,useId:cT,unstable_isNewReconciler:!1};function cn(e,t){if(e&&e.defaultProps){t=at({},t),e=e.defaultProps;for(var r in e)t[r]===void 0&&(t[r]=e[r]);return t}return t}function Zy(e,t,r,n){t=e.memoizedState,r=r(n,t),r=r==null?t:at({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var pm={isMounted:function(e){return(e=e._reactInternals)?Vo(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var n=er(),a=ji(e),i=Sa(n,a);i.payload=t,r!=null&&(i.callback=r),t=_i(e,i,a),t!==null&&(_n(t,e,a,n),rh(t,e,a))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var n=er(),a=ji(e),i=Sa(n,a);i.tag=1,i.payload=t,r!=null&&(i.callback=r),t=_i(e,i,a),t!==null&&(_n(t,e,a,n),rh(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=er(),n=ji(e),a=Sa(r,n);a.tag=2,t!=null&&(a.callback=t),t=_i(e,a,n),t!==null&&(_n(t,e,n,r),rh(t,e,n))}};function CS(e,t,r,n,a,i,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,i,o):t.prototype&&t.prototype.isPureReactComponent?!pu(r,n)||!pu(a,i):!0}function hT(e,t,r){var n=!1,a=Ci,i=t.contextType;return typeof i=="object"&&i!==null?i=Kr(i):(a=fr(t)?No:Yt.current,n=t.contextTypes,i=(n=n!=null)?ul(e,a):Ci),t=new t(r,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=pm,e.stateNode=t,t._reactInternals=e,n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=a,e.__reactInternalMemoizedMaskedChildContext=i),t}function TS(e,t,r,n){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(r,n),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(r,n),t.state!==e&&pm.enqueueReplaceState(t,t.state,null)}function e0(e,t,r,n){var a=e.stateNode;a.props=r,a.state=e.memoizedState,a.refs={},tw(e);var i=t.contextType;typeof i=="object"&&i!==null?a.context=Kr(i):(i=fr(t)?No:Yt.current,a.context=ul(e,i)),a.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(Zy(e,t,i,r),a.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof a.getSnapshotBeforeUpdate=="function"||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(t=a.state,typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount(),t!==a.state&&pm.enqueueReplaceState(a,a.state,null),Th(e,r,a,n),a.state=e.memoizedState),typeof a.componentDidMount=="function"&&(e.flags|=4194308)}function pl(e,t){try{var r="",n=t;do r+=T4(n),n=n.return;while(n);var a=r}catch(i){a=`
39Error generating stack: `+i.message+`
40`+i.stack}return{value:e,source:t,stack:a,digest:null}}
vendor: 9,552 bytes, line 40
40function gv(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function t0(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var aL=typeof WeakMap=="function"?WeakMap:Map;function pT(e,t,r){r=Sa(-1,r),r.tag=3,r.payload={element:null};var n=t.value;return r.callback=function(){Ih||(Ih=!0,d0=n),t0(e,t)},r}function mT(e,t,r){r=Sa(-1,r),r.tag=3;var n=e.type.getDerivedStateFromError;if(typeof n=="function"){var a=t.value;r.payload=function(){return n(a)},r.callback=function(){t0(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(r.callback=function(){t0(e,t),typeof n!="function"&&(Si===null?Si=new Set([this]):Si.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),r}function AS(e,t,r){var n=e.pingCache;if(n===null){n=e.pingCache=new aL;var a=new Set;n.set(t,a)}else a=n.get(t),a===void 0&&(a=new Set,n.set(t,a));a.has(r)||(a.add(r),e=yL.bind(null,e,t,r),t.then(e,e))}function MS(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 $S(e,t,r,n,a){return e.mode&1?(e.flags|=65536,e.lanes=a,e):(e===t?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(t=Sa(-1,1),t.tag=2,_i(r,t,1))),r.lanes|=1),e)}var iL=Da.ReactCurrentOwner,lr=!1;function Jt(e,t,r,n){t.child=e===null?HC(t,null,r,n):fl(t,e.child,r,n)}function RS(e,t,r,n,a){r=r.render;var i=t.ref;return Ws(t,a),n=ow(e,t,r,n,i,a),r=sw(),e!==null&&!lr?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a,Ca(e,t,a)):(et&&r&&Gx(t),t.flags|=1,Jt(e,t,n,a),t.child)}function IS(e,t,r,n,a){if(e===null){var i=r.type;return typeof i=="function"&&!vw(i)&&i.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=i,gT(e,t,i,n,a)):(e=lh(r.type,null,n,t,t.mode,a),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!(e.lanes&a)){var o=i.memoizedProps;if(r=r.compare,r=r!==null?r:pu,r(o,n)&&e.ref===t.ref)return Ca(e,t,a)}return t.flags|=1,e=ki(i,n),e.ref=t.ref,e.return=t,t.child=e}function gT(e,t,r,n,a){if(e!==null){var i=e.memoizedProps;if(pu(i,n)&&e.ref===t.ref)if(lr=!1,t.pendingProps=n=i,(e.lanes&a)!==0)e.flags&131072&&(lr=!0);else return t.lanes=e.lanes,Ca(e,t,a)}return r0(e,t,r,n,a)}function vT(e,t,r){var n=t.pendingProps,a=n.children,i=e!==null?e.memoizedState:null;if(n.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},qe($s,xr),xr|=r;else{if(!(r&1073741824))return e=i!==null?i.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,qe($s,xr),xr|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=i!==null?i.baseLanes:r,qe($s,xr),xr|=n}else i!==null?(n=i.baseLanes|r,t.memoizedState=null):n=r,qe($s,xr),xr|=n;return Jt(e,t,a,r),t.child}function yT(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function r0(e,t,r,n,a){var i=fr(r)?No:Yt.current;return i=ul(t,i),Ws(t,a),r=ow(e,t,r,n,i,a),n=sw(),e!==null&&!lr?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a,Ca(e,t,a)):(et&&n&&Gx(t),t.flags|=1,Jt(e,t,r,a),t.child)}function DS(e,t,r,n,a){if(fr(r)){var i=!0;Eh(t)}else i=!1;if(Ws(t,a),t.stateNode===null)ih(e,t),hT(t,r,n),e0(t,r,n,a),n=!0;else if(e===null){var o=t.stateNode,s=t.memoizedProps;o.props=s;var l=o.context,c=r.contextType;typeof c=="object"&&c!==null?c=Kr(c):(c=fr(r)?No:Yt.current,c=ul(t,c));var d=r.getDerivedStateFromProps,f=typeof d=="function"||typeof o.getSnapshotBeforeUpdate=="function";f||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(s!==n||l!==c)&&TS(t,o,n,c),ri=!1;var h=t.memoizedState;o.state=h,Th(t,n,o,a),l=t.memoizedState,s!==n||h!==l||dr.current||ri?(typeof d=="function"&&(Zy(t,r,d,n),l=t.memoizedState),(s=ri||CS(t,r,s,n,h,l,c))?(f||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=n,t.memoizedState=l),o.props=n,o.state=l,o.context=c,n=s):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{o=t.stateNode,VC(e,t),s=t.memoizedProps,c=t.type===t.elementType?s:cn(t.type,s),o.props=c,f=t.pendingProps,h=o.context,l=r.contextType,typeof l=="object"&&l!==null?l=Kr(l):(l=fr(r)?No:Yt.current,l=ul(t,l));var p=r.getDerivedStateFromProps;(d=typeof p=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(s!==f||h!==l)&&TS(t,o,n,l),ri=!1,h=t.memoizedState,o.state=h,Th(t,n,o,a);var g=t.memoizedState;s!==f||h!==g||dr.current||ri?(typeof p=="function"&&(Zy(t,r,p,n),g=t.memoizedState),(c=ri||CS(t,r,c,n,h,g,l)||!1)?(d||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(n,g,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(n,g,l)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=g),o.props=n,o.state=g,o.context=l,n=c):(typeof o.componentDidUpdate!="function"||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),n=!1)}return n0(e,t,r,n,i,a)}function n0(e,t,r,n,a,i){yT(e,t);var o=(t.flags&128)!==0;if(!n&&!o)return a&&_S(t,r,!1),Ca(e,t,i);n=t.stateNode,iL.current=t;var s=o&&typeof r.getDerivedStateFromError!="function"?null:n.render();return t.flags|=1,e!==null&&o?(t.child=fl(t,e.child,null,i),t.child=fl(t,null,s,i)):Jt(e,t,s,i),t.memoizedState=n.state,a&&_S(t,r,!0),t.child}function bT(e){var t=e.stateNode;t.pendingContext?wS(e,t.pendingContext,t.pendingContext!==t.context):t.context&&wS(e,t.context,!1),rw(e,t.containerInfo)}function LS(e,t,r,n,a){return dl(),Xx(a),t.flags|=256,Jt(e,t,r,n),t.child}var a0={dehydrated:null,treeContext:null,retryLane:0};function i0(e){return{baseLanes:e,cachePool:null,transitions:null}}function xT(e,t,r){var n=t.pendingProps,a=rt.current,i=!1,o=(t.flags&128)!==0,s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:(a&2)!==0),s?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(a|=1),qe(rt,a&1),e===null)return Jy(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=n.children,e=n.fallback,i?(n=t.mode,i=t.child,o={mode:"hidden",children:o},!(n&1)&&i!==null?(i.childLanes=0,i.pendingProps=o):i=vm(o,n,0,null),e=_o(e,n,r,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=i0(r),t.memoizedState=a0,e):uw(t,o));if(a=e.memoizedState,a!==null&&(s=a.dehydrated,s!==null))return oL(e,t,o,n,s,a,r);if(i){i=n.fallback,o=t.mode,a=e.child,s=a.sibling;var l={mode:"hidden",children:n.children};return!(o&1)&&t.child!==a?(n=t.child,n.childLanes=0,n.pendingProps=l,t.deletions=null):(n=ki(a,l),n.subtreeFlags=a.subtreeFlags&14680064),s!==null?i=ki(s,i):(i=_o(i,o,r,null),i.flags|=2),i.return=t,n.return=t,n.sibling=i,t.child=n,n=i,i=t.child,o=e.child.memoizedState,o=o===null?i0(r):{baseLanes:o.baseLanes|r,cachePool:null,transitions:o.transitions},i.memoizedState=o,i.childLanes=e.childLanes&~r,t.memoizedState=a0,n}return i=e.child,e=i.sibling,n=ki(i,{mode:"visible",children:n.children}),!(t.mode&1)&&(n.lanes=r),n.return=t,n.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=n,t.memoizedState=null,n}function uw(e,t){return t=vm({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function hf(e,t,r,n){return n!==null&&Xx(n),fl(t,e.child,null,r),e=uw(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function oL(e,t,r,n,a,i,o){if(r)return t.flags&256?(t.flags&=-257,n=gv(Error(G(422))),hf(e,t,o,n)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=n.fallback,a=t.mode,n=vm({mode:"visible",children:n.children},a,0,null),i=_o(i,a,o,null),i.flags|=2,n.return=t,i.return=t,n.sibling=i,t.child=n,t.mode&1&&fl(t,e.child,null,o),t.child.memoizedState=i0(o),t.memoizedState=a0,i);if(!(t.mode&1))return hf(e,t,o,null);if(a.data==="$!"){if(n=a.nextSibling&&a.nextSibling.dataset,n)var s=n.dgst;return n=s,i=Error(G(419)),n=gv(i,n,void 0),hf(e,t,o,n)}if(s=(o&e.childLanes)!==0,lr||s){if(n=Nt,n!==null){switch(o&-o){case 4:a=2;break;case 16:a=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:a=32;break;case 536870912:a=268435456;break;default:a=0}a=a&(n.suspendedLanes|o)?0:a,a!==0&&a!==i.retryLane&&(i.retryLane=a,Pa(e,a),_n(n,e,a,-1))}return gw(),n=gv(Error(G(421))),hf(e,t,o,n)}return a.data==="$?"?(t.flags|=128,t.child=e.child,t=bL.bind(null,e),a._reactRetry=t,null):(e=i.treeContext,kr=wi(a.nextSibling),Or=t,et=!0,gn=null,e!==null&&(Br[Fr++
vendor: 7,084 bytes, line 40
40]=ya,Br[Fr++]=ba,Br[Fr++]=Po,ya=e.id,ba=e.overflow,Po=t),t=uw(t,n.children),t.flags|=4096,t)}function BS(e,t,r){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),Qy(e.return,t,r)}function vv(e,t,r,n,a){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:a}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=n,i.tail=r,i.tailMode=a)}function wT(e,t,r){var n=t.pendingProps,a=n.revealOrder,i=n.tail;if(Jt(e,t,n.children,r),n=rt.current,n&2)n=n&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&BS(e,r,t);else if(e.tag===19)BS(e,r,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}n&=1}if(qe(rt,n),!(t.mode&1))t.memoizedState=null;else switch(a){case"forwards":for(r=t.child,a=null;r!==null;)e=r.alternate,e!==null&&Ah(e)===null&&(a=r),r=r.sibling;r=a,r===null?(a=t.child,t.child=null):(a=r.sibling,r.sibling=null),vv(t,!1,a,r,i);break;case"backwards":for(r=null,a=t.child,t.child=null;a!==null;){if(e=a.alternate,e!==null&&Ah(e)===null){t.child=a;break}e=a.sibling,a.sibling=r,r=a,a=e}vv(t,!0,r,null,i);break;case"together":vv(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function ih(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Ca(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),To|=t.lanes,!(r&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(G(153));if(t.child!==null){for(e=t.child,r=ki(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=ki(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function sL(e,t,r){switch(t.tag){case 3:bT(t),dl();break;case 5:KC(t);break;case 1:fr(t.type)&&Eh(t);break;case 4:rw(t,t.stateNode.containerInfo);break;case 10:var n=t.type._context,a=t.memoizedProps.value;qe(Ph,n._currentValue),n._currentValue=a;break;case 13:if(n=t.memoizedState,n!==null)return n.dehydrated!==null?(qe(rt,rt.current&1),t.flags|=128,null):r&t.child.childLanes?xT(e,t,r):(qe(rt,rt.current&1),e=Ca(e,t,r),e!==null?e.sibling:null);qe(rt,rt.current&1);break;case 19:if(n=(r&t.childLanes)!==0,e.flags&128){if(n)return wT(e,t,r);t.flags|=128}if(a=t.memoizedState,a!==null&&(a.rendering=null,a.tail=null,a.lastEffect=null),qe(rt,rt.current),n)break;return null;case 22:case 23:return t.lanes=0,vT(e,t,r)}return Ca(e,t,r)}var _T,o0,ST,jT;_T=function(e,t){for(var r=t.child;r!==null;){if(r.tag===5||r.tag===6)e.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}};o0=function(){};ST=function(e,t,r,n){var a=e.memoizedProps;if(a!==n){e=t.stateNode,lo(Zn.current);var i=null;switch(r){case"input":a=Ny(e,a),n=Ny(e,n),i=[];break;case"select":a=at({},a,{value:void 0}),n=at({},n,{value:void 0}),i=[];break;case"textarea":a=Ty(e,a),n=Ty(e,n),i=[];break;default:typeof a.onClick!="function"&&typeof n.onClick=="function"&&(e.onclick=jh)}My(r,n);var o;r=null;for(c in a)if(!n.hasOwnProperty(c)&&a.hasOwnProperty(c)&&a[c]!=null)if(c==="style"){var s=a[c];for(o in s)s.hasOwnProperty(o)&&(r||(r={}),r[o]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(su.hasOwnProperty(c)?i||(i=[]):(i=i||[]).push(c,null));for(c in n){var l=n[c];if(s=a!=null?a[c]:void 0,n.hasOwnProperty(c)&&l!==s&&(l!=null||s!=null))if(c==="style")if(s){for(o in s)!s.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(r||(r={}),r[o]="");for(o in l)l.hasOwnProperty(o)&&s[o]!==l[o]&&(r||(r={}),r[o]=l[o])}else r||(i||(i=[]),i.push(c,r)),r=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,s=s?s.__html:void 0,l!=null&&s!==l&&(i=i||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(i=i||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(su.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&Ge("scroll",e),i||s===l||(i=[])):(i=i||[]).push(c,l))}r&&(i=i||[]).push("style",r);var c=i;(t.updateQueue=c)&&(t.flags|=4)}};jT=function(e,t,r,n){r!==n&&(t.flags|=4)};function xc(e,t){if(!et)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var n=null;r!==null;)r.alternate!==null&&(n=r),r=r.sibling;n===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null}}function zt(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,n=0;if(t)for(var a=e.child;a!==null;)r|=a.lanes|a.childLanes,n|=a.subtreeFlags&14680064,n|=a.flags&14680064,a.return=e,a=a.sibling;else for(a=e.child;a!==null;)r|=a.lanes|a.childLanes,n|=a.subtreeFlags,n|=a.flags,a.return=e,a=a.sibling;return e.subtreeFlags|=n,e.childLanes=r,t}function lL(e,t,r){var n=t.pendingProps;switch(Yx(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return zt(t),null;case 1:return fr(t.type)&&kh(),zt(t),null;case 3:return n=t.stateNode,hl(),Je(dr),Je(Yt),aw(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(df(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,gn!==null&&(p0(gn),gn=null))),o0(e,t),zt(t),null;case 5:nw(t);var a=lo(bu.current);if(r=t.type,e!==null&&t.stateNode!=null)ST(e,t,r,n,a),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!n){if(t.stateNode===null)throw Error(G(166));return zt(t),null}if(e=lo(Zn.current),df(t)){n=t.stateNode,r=t.type;var i=t.memoizedProps;switch(n[Wn]=t,n[vu]=i,e=(t.mode&1)!==0,r){case"dialog":Ge("cancel",n),Ge("close",n);break;case"iframe":case"object":case"embed":Ge("load",n);break;case"video":case"audio":for(a=0;a<Bc.length;a++)Ge(Bc[a],n);break;case"source":Ge("error",n);break;case"img":case"image":case"link":Ge("error",n),Ge("load",n);break;case"details":Ge("toggle",n);break;case"input":G_(n,i),Ge("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!i.multiple},Ge("invalid",n);break;case"textarea":X_(n,i),Ge("invalid",n)}My(r,i),a=null;for(var o in i)if(i.hasOwnProperty(o)){var s=i[o];o==="children"?typeof s=="string"?n.textContent!==s&&(i.suppressHydrationWarning!==!0&&uf(n.textContent,s,e),a=["children",s]):typeof s=="number"&&n.textContent!==""+s&&(i.suppressHydrationWarning!==!0&&uf(n.textContent,s,e),a=["children",""+s]):su.hasOwnProperty(o)&&s!=null&&o==="onScroll"&&Ge("scroll",n)}switch(r){case"input":tf(n),Y_(n,i,!0);break;case"textarea":tf(n),J_(n);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(n.onclick=jh)}n=a,t.updateQueue=n,n!==null&&(t.flags|=4)}else{o=a.nodeType===9?a:a.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=QP(r)),e==="http://www.w3.org/1999/xhtml"?r==="script"?(e=o.createElement("div"),e.innerHTML="<script><\/script>
40",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=o.createElement(r,{is:n.is}):(e=o.createElement(r),r==="select"&&(o=e,n.multiple?o.multiple=!0:n.size&&(o.size=n.size))):e=o.createElementNS(e,r),e[Wn]=t,e[vu]=n,_T(e,t,!1,!1),t.stateNode=e;e:{switch(o=$y(r,n),r){case"dialog":Ge("cancel",e),Ge("close",e),a=n;break;case"iframe":case"object":case"embed":Ge("load",e),a=n;break;case"video":case"audio":for(a=0;a<Bc.length;a++)Ge(Bc[a],e);a=n;break;case"source":Ge("error",e),a=n;break;case"img":case"image":case"link":Ge("error",e),Ge("load",e),a=n;break;case"details":Ge("toggle",e),a=n;break;case"input":G_(e,n),a=Ny(e,n),Ge("invalid",e);break;case"option":a=n;break;case"select":e._wrapperState={wasMultiple:!!n.multiple},a=at({},n,{value:void 0}),Ge("invalid",e);break;case"textarea":X_(e,n),a=Ty(e,n),Ge("invalid",e);break;default:a=n}My(r,a),s=a;for(i in s)if(s.hasOwnProperty(i)){var l=s[i];i==="style"?tC(e,l):i==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&ZP(e,l)):i==="children"?typeof l=="string"?(r!=="textarea"||l!=="")&&lu(e,l):typeof l=="number"&&lu(e,""+l):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(su.hasOwnProperty(i)?l!=null&&i==="onScroll"&&Ge("scroll",e):l!=null&&$x(e,i,l,o))}switch(r){case"input":tf(e),Y_(e,n,!1);break;case"textarea":tf(e),J_(e);break;case"option":n.value!=null&&e.setAttribute("value",""+Pi(n.value));break;case"select":e.multiple=!!n.multiple,i=n.value,i!=null?Bs(e,!!n.multiple,i,!1):n.defaultValue!=null&&Bs(e,!!n.multiple,n.defaultValue,!0);break;default:typeof a.onClick=="function"&&(e.onclick=jh)}switch(r){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}}n&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return zt(t),null;case 6:if(e&&t.stateNode!=null)jT(e,t,e.memoizedProps,n);else{if(typeof n!="string"&&t.stateNode===null)throw Error(G(166));if(r=lo(bu.current),lo(Zn.current),df(t)){if(n=t.stateNode,r=t.memoizedProps,n[Wn]=t,(i=n.nodeValue!==r)&&(e=Or,e!==null))switch(e.tag){case 3:uf(n.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&uf(n.nodeValue,r,(e.mode&1)!==0)}i&&(t.flags|=4)}else n=(r.nodeType===9?r:r.ownerDocument).createTextNode(n),n[Wn]=t,t.stateNode=n}return zt(t),null;case 13:if(Je(rt),n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(et&&kr!==null&&t.mode&1&&!(t.flags&128))zC(),dl(),t.flags|=98560,i=!1;else if(i=df(t),n!==null&&n.dehydrated!==null){if(e===null){if(!i)throw Error(G(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(G(317));i[Wn]=t}else dl(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;zt(t),i=!1}else gn!==null&&(p0(gn),gn=null),i=!0;if(!i)return t.flags&65536?t:null}return t.flags&128?(t.lanes=r,t):(n=n!==null,n!==(e!==null&&e.memoizedState!==null)&&n&&(t.child.flags|=8192,t.mode&1&&(e===null||rt.current&1?wt===0&&(wt=3):gw())),t.updateQueue!==null&&(t.flags|=4),zt(t),null);case 4:return hl(),o0(e,t),e===null&&mu(t.stateNode.containerInfo),zt(t),null;case 10:return Zx(t.type._context),zt(t),null;case 17:return fr(t.type)&&kh(),zt(t),null;case 19:if(Je(rt),i=t.memoizedState,i===null)return zt(t),null;if(n=(t.flags&128)!==0,o=i.rendering,o===null)if(n)xc(i,!1);else{if(wt!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Ah(e),o!==null){for(t.flags|=128,xc(i,!1),n=o.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),t.subtreeFlags=0,n=r,r=t.child;r!==null;)i=r,e=n,i.flags&=14680066,o=i.alternate,o===null?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=o.childLanes,i.lanes=o.lanes,i.child=o.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=o.memoizedProps,i.memoizedState=o.memoizedState,i.updateQueue=o.updateQueue,i.type=o.type,e=o.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return qe(rt,rt.current&1|2),t.child}e=e.sibling}i.tail!==null&&dt()>ml&&(t.flags|=128,n=!0,xc(i,!1),t.lanes=4194304)}else{if(!n)if(e=Ah(o),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),xc(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!et)return zt(t),null}else 2*dt()-i.renderingStartTime>ml&&r!==1073741824&&(t.flags|=128,n=!0,xc(i,!1),t.lanes=4194304);i.isBackwards?(o.sibling=t.child,t.child=o):(r=i.last,r!==null?r.sibling=o:t.child=o,i.last=o)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=dt(),t.sibling=null,r=rt.current,qe(rt,n?r&1|2:r&1),t):(zt(t),null);case 22:case 23:return mw(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?xr&1073741824&&(zt(t),t.subtreeFlags&6&&(t.flags|=8192)):zt(t),null;case 24:return null;case 25:return null}throw Error(G(156,t.tag))}function cL(e,t){switch(Yx(t),t.tag){case 1:return fr(t.type)&&kh(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;
vendor: 26,945 bytes, line 40
40case 3:return hl(),Je(dr),Je(Yt),aw(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return nw(t),null;case 13:if(Je(rt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(G(340));dl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Je(rt),null;case 4:return hl(),null;case 10:return Zx(t.type._context),null;case 22:case 23:return mw(),null;case 24:return null;default:return null}}var pf=!1,qt=!1,uL=typeof WeakSet=="function"?WeakSet:Set,te=null;function Ms(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){lt(e,t,n)}else r.current=null}function s0(e,t,r){try{r()}catch(n){lt(e,t,n)}}var FS=!1;function dL(e,t){if(Hy=wh,e=PC(),Kx(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var a=n.anchorOffset,i=n.focusNode;n=n.focusOffset;try{r.nodeType,i.nodeType}catch{r=null;break e}var o=0,s=-1,l=-1,c=0,d=0,f=e,h=null;t:for(;;){for(var p;f!==r||a!==0&&f.nodeType!==3||(s=o+a),f!==i||n!==0&&f.nodeType!==3||(l=o+n),f.nodeType===3&&(o+=f.nodeValue.length),(p=f.firstChild)!==null;)h=f,f=p;for(;;){if(f===e)break t;if(h===r&&++c===a&&(s=o),h===i&&++d===n&&(l=o),(p=f.nextSibling)!==null)break;f=h,h=f.parentNode}f=p}r=s===-1||l===-1?null:{start:s,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(qy={focusedElem:e,selectionRange:r},wh=!1,te=t;te!==null;)if(t=te,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,te=e;else for(;te!==null;){t=te;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 m=g.memoizedProps,v=g.memoizedState,x=t.stateNode,b=x.getSnapshotBeforeUpdate(t.elementType===t.type?m:cn(t.type,m),v);x.__reactInternalSnapshotBeforeUpdate=b}break;case 3:var y=t.stateNode.containerInfo;y.nodeType===1?y.textContent="":y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(G(163))}}catch(S){lt(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,te=e;break}te=t.return}return g=FS,FS=!1,g}function Xc(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var a=n=n.next;do{if((a.tag&e)===e){var i=a.destroy;a.destroy=void 0,i!==void 0&&s0(t,r,i)}a=a.next}while(a!==n)}}function mm(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var n=r.create;r.destroy=n()}r=r.next}while(r!==t)}}function l0(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function kT(e){var t=e.alternate;t!==null&&(e.alternate=null,kT(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Wn],delete t[vu],delete t[Gy],delete t[K3],delete t[G3])),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 ET(e){return e.tag===5||e.tag===3||e.tag===4}function US(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||ET(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 c0(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=jh));else if(n!==4&&(e=e.child,e!==null))for(c0(e,t,r),e=e.sibling;e!==null;)c0(e,t,r),e=e.sibling}function u0(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(n!==4&&(e=e.child,e!==null))for(u0(e,t,r),e=e.sibling;e!==null;)u0(e,t,r),e=e.sibling}var $t=null,pn=!1;function Ya(e,t,r){for(r=r.child;r!==null;)OT(e,t,r),r=r.sibling}function OT(e,t,r){if(Qn&&typeof Qn.onCommitFiberUnmount=="function")try{Qn.onCommitFiberUnmount(sm,r)}catch{}switch(r.tag){case 5:qt||Ms(r,t);case 6:var n=$t,a=pn;$t=null,Ya(e,t,r),$t=n,pn=a,$t!==null&&(pn?(e=$t,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):$t.removeChild(r.stateNode));break;case 18:$t!==null&&(pn?(e=$t,r=r.stateNode,e.nodeType===8?uv(e.parentNode,r):e.nodeType===1&&uv(e,r),fu(e)):uv($t,r.stateNode));break;case 4:n=$t,a=pn,$t=r.stateNode.containerInfo,pn=!0,Ya(e,t,r),$t=n,pn=a;break;case 0:case 11:case 14:case 15:if(!qt&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){a=n=n.next;do{var i=a,o=i.destroy;i=i.tag,o!==void 0&&(i&2||i&4)&&s0(r,t,o),a=a.next}while(a!==n)}Ya(e,t,r);break;case 1:if(!qt&&(Ms(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(s){lt(r,t,s)}Ya(e,t,r);break;case 21:Ya(e,t,r);break;case 22:r.mode&1?(qt=(n=qt)||r.memoizedState!==null,Ya(e,t,r),qt=n):Ya(e,t,r);break;default:Ya(e,t,r)}}function zS(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new uL),t.forEach(function(n){var a=xL.bind(null,e,n);r.has(n)||(r.add(n),n.then(a,a))})}}function nn(e,t){var r=t.deletions;if(r!==null)for(var n=0;n<r.length;n++){var a=r[n];try{var i=e,o=t,s=o;e:for(;s!==null;){switch(s.tag){case 5:$t=s.stateNode,pn=!1;break e;case 3:$t=s.stateNode.containerInfo,pn=!0;break e;case 4:$t=s.stateNode.containerInfo,pn=!0;break e}s=s.return}if($t===null)throw Error(G(160));OT(i,o,a),$t=null,pn=!1;var l=a.alternate;l!==null&&(l.return=null),a.return=null}catch(c){lt(a,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)NT(t,e),t=t.sibling}function NT(e,t){var r=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(nn(t,e),$n(e),n&4){try{Xc(3,e,e.return),mm(3,e)}catch(m){lt(e,e.return,m)}try{Xc(5,e,e.return)}catch(m){lt(e,e.return,m)}}break;case 1:nn(t,e),$n(e),n&512&&r!==null&&Ms(r,r.return);break;case 5:if(nn(t,e),$n(e),n&512&&r!==null&&Ms(r,r.return),e.flags&32){var a=e.stateNode;try{lu(a,"")}catch(m){lt(e,e.return,m)}}if(n&4&&(a=e.stateNode,a!=null)){var i=e.memoizedProps,o=r!==null?r.memoizedProps:i,s=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{s==="input"&&i.type==="radio"&&i.name!=null&&XP(a,i),$y(s,o);var c=$y(s,i);for(o=0;o<l.length;o+=2){var d=l[o],f=l[o+1];d==="style"?tC(a,f):d==="dangerouslySetInnerHTML"?ZP(a,f):d==="children"?lu(a,f):$x(a,d,f,c)}switch(s){case"input":Py(a,i);break;case"textarea":JP(a,i);break;case"select":var h=a._wrapperState.wasMultiple;a._wrapperState.wasMultiple=!!i.multiple;var p=i.value;p!=null?Bs(a,!!i.multiple,p,!1):h!==!!i.multiple&&(i.defaultValue!=null?Bs(a,!!i.multiple,i.defaultValue,!0):Bs(a,!!i.multiple,i.multiple?[]:"",!1))}a[vu]=i}catch(m){lt(e,e.return,m)}}break;case 6:if(nn(t,e),$n(e),n&4){if(e.stateNode===null)throw Error(G(162));a=e.stateNode,i=e.memoizedProps;try{a.nodeValue=i}catch(m){lt(e,e.return,m)}}break;case 3:if(nn(t,e),$n(e),n&4&&r!==null&&r.memoizedState.isDehydrated)try{fu(t.containerInfo)}catch(m){lt(e,e.return,m)}break;case 4:nn(t,e),$n(e);break;case 13:nn(t,e),$n(e),a=e.child,a.flags&8192&&(i=a.memoizedState!==null,a.stateNode.isHidden=i,!i||a.alternate!==null&&a.alternate.memoizedState!==null||(hw=dt())),n&4&&zS(e);break;case 22:if(d=r!==null&&r.memoizedState!==null,e.mode&1?(qt=(c=qt)||d,nn(t,e),qt=c):nn(t,e),$n(e),n&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!d&&e.mode&1)for(te=e,d=e.child;d!==null;){for(f=te=d;te!==null;){switch(h=te,p=h.child,h.tag){case 0:case 11:case 14:case 15:Xc(4,h,h.return);break;case 1:Ms(h,h.return);var g=h.stateNode;if(typeof g.componentWillUnmount=="function"){n=h,r=h.return;try{t=n,g.props=t.memoizedProps,g.state=t.memoizedState,g.componentWillUnmount()}catch(m){lt(n,r,m)}}break;case 5:Ms(h,h.return);break;case 22:if(h.memoizedState!==null){HS(f);continue}}p!==null?(p.return=h,te=p):HS(f)}d=d.sibling}e:for(d=null,f=e;;){if(f.tag===5){if(d===null){d=f;try{a=f.stateNode,c?(i=a.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(s=f.stateNode,l=f.memoizedProps.style,o=l!=null&&l.hasOwnProperty("display")?l.display:null,s.style.display=eC("display",o))}catch(m){lt(e,e.return,m)}}}else if(f.tag===6){if(d===null)try{f.stateNode.nodeValue=c?"":f.memoizedProps}catch(m){lt(e,e.return,m)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===e)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===e)break e;for(;f.sibling===null;){if(f.return===null||f.return===e)break e;d===f&&(d=null),f=f.return}d===f&&(d=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:nn(t,e),$n(e),n&4&&zS(e);break;case 21:break;default:nn(t,e),$n(e)}}function $n(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if(ET(r)){var n=r;break e}r=r.return}throw Error(G(160))}switch(n.tag){case 5:var a=n.stateNode;n.flags&32&&(lu(a,""),n.flags&=-33);var i=US(e);u0(e,i,a);break;case 3:case 4:var o=n.stateNode.containerInfo,s=US(e);c0(e,s,o);break;default:throw Error(G(161))}}catch(l){lt(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function fL(e,t,r){te=e,PT(e)}function PT(e,t,r){for(var n=(e.mode&1)!==0;te!==null;){var a=te,i=a.child;if(a.tag===22&&n){var o=a.memoizedState!==null||pf;if(!o){var s=a.alternate,l=s!==null&&s.memoizedState!==null||qt;s=pf;var c=qt;if(pf=o,(qt=l)&&!c)for(te=a;te!==null;)o=te,l=o.child,o.tag===22&&o.memoizedState!==null?qS(a):l!==null?(l.return=o,te=l):qS(a);for(;i!==null;)te=i,PT(i),i=i.sibling;te=a,pf=s,qt=c}WS(e)}else a.subtreeFlags&8772&&i!==null?(i.return=a,te=i):WS(e)}}function WS(e){for(;te!==null;){var t=te;if(t.flags&8772){var r=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:qt||mm(5,t);break;case 1:var n=t.stateNode;if(t.flags&4&&!qt)if(r===null)n.componentDidMount();else{var a=t.elementType===t.type?r.memoizedProps:cn(t.type,r.memoizedProps);n.componentDidUpdate(a,r.memoizedState,n.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&OS(t,i,n);break;case 3:var o=t.updateQueue;if(o!==null){if(r=null,t.child!==null)switch(t.child.tag){case 5:r=t.child.stateNode;break;case 1:r=t.child.stateNode}OS(t,o,r)}break;case 5:var s=t.stateNode;if(r===null&&t.flags&4){r=s;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&r.focus();break;case"img":l.src&&(r.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var c=t.alternate;if(c!==null){var d=c.memoizedState;if(d!==null){var f=d.dehydrated;f!==null&&fu(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(G(163))}qt||t.flags&512&&l0(t)}catch(h){lt(t,t.return,h)}}if(t===e){te=null;break}if(r=t.sibling,r!==null){r.return=t.return,te=r;break}te=t.return}}function HS(e){for(;te!==null;){var t=te;if(t===e){te=null;break}var r=t.sibling;if(r!==null){r.return=t.return,te=r;break}te=t.return}}function qS(e){for(;te!==null;){var t=te;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{mm(4,t)}catch(l){lt(t,r,l)}break;case 1:var n=t.stateNode;if(typeof n.componentDidMount=="function"){var a=t.return;try{n.componentDidMount()}catch(l){lt(t,a,l)}}var i=t.return;try{l0(t)}catch(l){lt(t,i,l)}break;case 5:var o=t.return;try{l0(t)}catch(l){lt(t,o,l)}}}catch(l){lt(t,t.return,l)}if(t===e){te=null;break}var s=t.sibling;if(s!==null){s.return=t.return,te=s;break}te=t.return}}var hL=Math.ceil,Rh=Da.ReactCurrentDispatcher,dw=Da.ReactCurrentOwner,qr=Da.ReactCurrentBatchConfig,je=0,Nt=null,mt=null,Dt=0,xr=0,$s=Ri(0),wt=0,Su=null,To=0,gm=0,fw=0,Jc=null,sr=null,hw=0,ml=1/0,ha=null,Ih=!1,d0=null,Si=null,mf=!1,mi=null,Dh=0,Qc=0,f0=null,oh=-1,sh=0;function er(){return je&6?dt():oh!==-1?oh:oh=dt()}function ji(e){return e.mode&1?je&2&&Dt!==0?Dt&-Dt:X3.transition!==null?(sh===0&&(sh=hC()),sh):(e=Re,e!==0||(e=window.event,e=e===void 0?16:xC(e.type)),e):1}function _n(e,t,r,n){if(50<Qc)throw Qc=0,f0=null,Error(G(185));kd(e,r,n),(!(je&2)||e!==Nt)&&(e===Nt&&(!(je&2)&&(gm|=r),wt===4&&ii(e,Dt)),hr(e,n),r===1&&je===0&&!(t.mode&1)&&(ml=dt()+500,fm&&Ii()))}function hr(e,t){var r=e.callbackNode;X4(e,t);var n=xh(e,e===Nt?Dt:0);if(n===0)r!==null&&eS(r),e.callbackNode=null,e.callbackPriority=0;else if(t=n&-n,e.callbackPriority!==t){if(r!=null&&eS(r),t===1)e.tag===0?Y3(VS.bind(null,e)):BC(VS.bind(null,e)),q3(function(){!(je&6)&&Ii()}),r=null;else{switch(pC(n)){case 1:r=Bx;break;case 4:r=dC;break;case 16:r=bh;break;case 536870912:r=fC;break;default:r=bh}r=DT(r,CT.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function CT(e,t){if(oh=-1,sh=0,je&6)throw Error(G(327));var r=e.callbackNode;if(Hs()&&e.callbackNode!==r)return null;var n=xh(e,e===Nt?Dt:0);if(n===0)return null;if(n&30||n&e.expiredLanes||t)t=Lh(e,n);else{t=n;var a=je;je|=2;var i=AT();(Nt!==e||Dt!==t)&&(ha=null,ml=dt()+500,wo(e,t));do try{gL();break}catch(s){TT(e,s)}while(!0);Qx(),Rh.current=i,je=a,mt!==null?t=0:(Nt=null,Dt=0,t=wt)}if(t!==0){if(t===2&&(a=By(e),a!==0&&(n=a,t=h0(e,a))),t===1)throw r=Su,wo(e,0),ii(e,n),hr(e,dt()),r;if(t===6)ii(e,n);else{if(a=e.current.alternate,!(n&30)&&!pL(a)&&(t=Lh(e,n),t===2&&(i=By(e),i!==0&&(n=i,t=h0(e,i))),t===1))throw r=Su,wo(e,0),ii(e,n),hr(e,dt()),r;switch(e.finishedWork=a,e.finishedLanes=n,t){case 0:case 1:throw Error(G(345));case 2:Zi(e,sr,ha);break;case 3:if(ii(e,n),(n&130023424)===n&&(t=hw+500-dt(),10<t)){if(xh(e,0)!==0)break;if(a=e.suspendedLanes,(a&n)!==n){er(),e.pingedLanes|=e.suspendedLanes&a;break}e.timeoutHandle=Ky(Zi.bind(null,e,sr,ha),t);break}Zi(e,sr,ha);break;case 4:if(ii(e,n),(n&4194240)===n)break;for(t=e.eventTimes,a=-1;0<n;){var o=31-wn(n);i=1<<o,o=t[o],o>a&&(a=o),n&=~i}if(n=a,n=dt()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*hL(n/1960))-n,10<n){e.timeoutHandle=Ky(Zi.bind(null,e,sr,ha),n);break}Zi(e,sr,ha);break;case 5:Zi(e,sr,ha);break;default:throw Error(G(329))}}}return hr(e,dt()),e.callbackNode===r?CT.bind(null,e):null}function h0(e,t){var r=Jc;return e.current.memoizedState.isDehydrated&&(wo(e,t).flags|=256),e=Lh(e,t),e!==2&&(t=sr,sr=r,t!==null&&p0(t)),e}function p0(e){sr===null?sr=e:sr.push.apply(sr,e)}function pL(e){for(var t=e;;){if(t.flags&16384){var r=t.updateQueue;if(r!==null&&(r=r.stores,r!==null))for(var n=0;n<r.length;n++){var a=r[n],i=a.getSnapshot;a=a.value;try{if(!jn(i(),a))return!1}catch{return!1}}}if(r=t.child,t.subtreeFlags&16384&&r!==null)r.return=t,t=r;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function ii(e,t){for(t&=~fw,t&=~gm,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-wn(t),n=1<<r;e[r]=-1,t&=~n}}function VS(e){if(je&6)throw Error(G(327));Hs();var t=xh(e,0);if(!(t&1))return hr(e,dt()),null;var r=Lh(e,t);if(e.tag!==0&&r===2){var n=By(e);n!==0&&(t=n,r=h0(e,n))}if(r===1)throw r=Su,wo(e,0),ii(e,t),hr(e,dt()),r;if(r===6)throw Error(G(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Zi(e,sr,ha),hr(e,dt()),null}function pw(e,t){var r=je;je|=1;try{return e(t)}finally{je=r,je===0&&(ml=dt()+500,fm&&Ii())}}function Ao(e){mi!==null&&mi.tag===0&&!(je&6)&&Hs();var t=je;je|=1;var r=qr.transition,n=Re;try{if(qr.transition=null,Re=1,e)return e()}finally{Re=n,qr.transition=r,je=t,!(je&6)&&Ii()}}function mw(){xr=$s.current,Je($s)}function wo(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,H3(r)),mt!==null)for(r=mt.return;r!==null;){var n=r;switch(Yx(n),n.tag){case 1:n=n.type.childContextTypes,n!=null&&kh();break;case 3:hl(),Je(dr),Je(Yt),aw();break;case 5:nw(n);break;case 4:hl();break;case 13:Je(rt);break;case 19:Je(rt);break;case 10:Zx(n.type._context);break;case 22:case 23:mw()}r=r.return}if(Nt=e,mt=e=ki(e.current,null),Dt=xr=t,wt=0,Su=null,fw=gm=To=0,sr=Jc=null,so!==null){for(t=0;t<so.length;t++)if(r=so[t],n=r.interleaved,n!==null){r.interleaved=null;var a=n.next,i=r.pending;if(i!==null){var o=i.next;i.next=a,n.next=o}r.pending=n}so=null}return e}function TT(e,t){do{var r=mt;try{if(Qx(),nh.current=$h,Mh){for(var n=nt.memoizedState;n!==null;){var a=n.queue;a!==null&&(a.pending=null),n=n.next}Mh=!1}if(Co=0,kt=xt=nt=null,Yc=!1,xu=0,dw.current=null,r===null||r.return===null){wt=1,Su=t,mt=null;break}e:{var i=e,o=r.return,s=r,l=t;if(t=Dt,s.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var c=l,d=s,f=d.tag;if(!(d.mode&1)&&(f===0||f===11||f===15)){var h=d.alternate;h?(d.updateQueue=h.updateQueue,d.memoizedState=h.memoizedState,d.lanes=h.lanes):(d.updateQueue=null,d.memoizedState=null)}var p=MS(o);if(p!==null){p.flags&=-257,$S(p,o,s,i,t),p.mode&1&&AS(i,c,t),t=p,l=c;var g=t.updateQueue;if(g===null){var m=new Set;m.add(l),t.updateQueue=m}else g.add(l);break e}else{if(!(t&1)){AS(i,c,t),gw();break e}l=Error(G(426))}}else if(et&&s.mode&1){var v=MS(o);if(v!==null){!(v.flags&65536)&&(v.flags|=256),$S(v,o,s,i,t),Xx(pl(l,s));break e}}i=l=pl(l,s),wt!==4&&(wt=2),Jc===null?Jc=[i]:Jc.push(i),i=o;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var x=pT(i,l,t);ES(i,x);break e;case 1:s=l;var b=i.type,y=i.stateNode;if(!(i.flags&128)&&(typeof b.getDerivedStateFromError=="function"||y!==null&&typeof y.componentDidCatch=="function"&&(Si===null||!Si.has(y)))){i.flags|=65536,t&=-t,i.lanes|=t;var S=mT(i,s,t);ES(i,S);break e}}i=i.return}while(i!==null)}$T(r)}catch(_){t=_,mt===r&&r!==null&&(mt=r=r.return);continue}break}while(!0)}function AT(){var e=Rh.current;return Rh.current=$h,e===null?$h:e}function gw(){(wt===0||wt===3||wt===2)&&(wt=4),Nt===null||!(To&268435455)&&!(gm&268435455)||ii(Nt,Dt)}function Lh(e,t){var r=je;je|=2;var n=AT();(Nt!==e||Dt!==t)&&(ha=null,wo(e,t));do try{mL();break}catch(a){TT(e,a)}while(!0);if(Qx(),je=r,Rh.current=n,mt!==null)throw Error(G(261));return Nt=null,Dt=0,wt}function mL(){for(;mt!==null;)MT(mt)}function gL(){for(;mt!==null&&!U4();)MT(mt)}function MT(e){var t=IT(e.alternate,e,xr);e.memoizedProps=e.pendingProps,t===null?$T(e):mt=t,dw.current=null}function $T(e){var t=e;do{var r=t.alternate;if(e=t.return,t.flags&32768){if(r=cL(r,t),r!==null){r.flags&=32767,mt=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{wt=6,mt=null;return}}else if(r=lL(r,t,xr),r!==null){mt=r;return}if(t=t.sibling,t!==null){mt=t;return}mt=t=e}while(t!==null);wt===0&&(wt=5)}function Zi(e,t,r){var n=Re,a=qr.transition;try{qr.transition=null,Re=1,vL(e,t,r,n)}finally{qr.transition=a,Re=n}return null}function vL(e,t,r,n){do Hs();while(mi!==null);if(je&6)throw Error(G(327));r=e.finishedWork;var a=e.finishedLanes;if(r===null)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(G(177));e.callbackNode=null,e.callbackPriority=0;var i=r.lanes|r.childLanes;if(J4(e,i),e===Nt&&(mt=Nt=null,Dt=0),!(r.subtreeFlags&2064)&&!(r.flags&2064)||mf||(mf=!0,DT(bh,function(){return Hs(),null})),i=(r.flags&15990)!==0,r.subtreeFlags&15990||i){i=qr.transition,qr.transition=null;var o=Re;Re=1;var s=je;je|=4,dw.current=null,dL(e,r),NT(r,e),D3(qy),wh=!!Hy,qy=Hy=null,e.current=r,fL(r),z4(),je=s,Re=o,qr.transition=i}else e.current=r;if(mf&&(mf=!1,mi=e,Dh=a),i=e.pendingLanes,i===0&&(Si=null),q4(r.stateNode),hr(e,dt()),t!==null)for(n=e.onRecoverableError,r=0;r<t.length;r++)a=t[r],n(a.value,{componentStack:a.stack,digest:a.digest});if(Ih)throw Ih=!1,e=d0,d0=null,e;return Dh&1&&e.tag!==0&&Hs(),i=e.pendingLanes,i&1?e===f0?Qc++:(Qc=0,f0=e):Qc=0,Ii(),null}function Hs(){if(mi!==null){var e=pC(Dh),t=qr.transition,r=Re;try{if(qr.transition=null,Re=16>e?16:e,mi===null)var n=!1;else{if(e=mi,mi=null,Dh=0,je&6)throw Error(G(331));var a=je;for(je|=4,te=e.current;te!==null;){var i=te,o=i.child;if(te.flags&16){var s=i.deletions;if(s!==null){for(var l=0;l<s.length;l++){var c=s[l];for(te=c;te!==null;){var d=te;switch(d.tag){case 0:case 11:case 15:Xc(8,d,i)}var f=d.child;if(f!==null)f.return=d,te=f;else for(;te!==null;){d=te;var h=d.sibling,p=d.return;if(kT(d),d===c){te=null;break}if(h!==null){h.return=p,te=h;break}te=p}}}var g=i.alternate;if(g!==null){var m=g.child;if(m!==null){g.child=null;do{var v=m.sibling;m.sibling=null,m=v}while(m!==null)}}te=i}}if(i.subtreeFlags&2064&&o!==null)o.return=i,te=o;else e:for(;te!==null;){if(i=te,i.flags&2048)switch(i.tag){case 0:case 11:case 15:Xc(9,i,i.return)}var x=i.sibling;if(x!==null){x.return=i.return,te=x;break e}te=i.return}}var b=e.current;for(te=b;te!==null;){o=te;var y=o.child;if(o.subtreeFlags&2064&&y!==null)y.return=o,te=y;else e:for(o=b;te!==null;){if(s=te,s.flags&2048)try{switch(s.tag){case 0:case 11:case 15:mm(9,s)}}catch(_){lt(s,s.return,_)}if(s===o){te=null;break e}var S=s.sibling;if(S!==null){S.return=s.return,te=S;break e}te=s.return}}if(je=a,Ii(),Qn&&typeof Qn.onPostCommitFiberRoot=="function")try{Qn.onPostCommitFiberRoot(sm,e)}catch{}n=!0}return n}finally{Re=r,qr.transition=t}}return!1}function KS(e,t,r){t=pl(r,t),t=pT(e,t,1),e=_i(e,t,1),t=er(),e!==null&&(kd(e,1,t),hr(e,t))}function lt(e,t,r){if(e.tag===3)KS(e,e,r);else for(;t!==null;){if(t.tag===3){KS(t,e,r);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(Si===null||!Si.has(n))){e=pl(r,e),e=mT(t,e,1),t=_i(t,e,1),e=er(),t!==null&&(kd(t,1,e),hr(t,e));break}}t=t.return}}function yL(e,t,r){var n=e.pingCache;n!==null&&n.delete(t),t=er(),e.pingedLanes|=e.suspendedLanes&r,Nt===e&&(Dt&r)===r&&(wt===4||wt===3&&(Dt&130023424)===Dt&&500>dt()-hw?wo(e,0):fw|=r),hr(e,t)}function RT(e,t){t===0&&(e.mode&1?(t=af,af<<=1,!(af&130023424)&&(af=4194304)):t=1);var r=er();e=Pa(e,t),e!==null&&(kd(e,t,r),hr(e,r))}function bL(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),RT(e,r)}function xL(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,a=e.memoizedState;a!==null&&(r=a.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(G(314))}n!==null&&n.delete(t),RT(e,r)}var IT;IT=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||dr.current)lr=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return lr=!1,sL(e,t,r);lr=!!(e.flags&131072)}else lr=!1,et&&t.flags&1048576&&FC(t,Nh,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;ih(e,t),e=t.pendingProps;var a=ul(t,Yt.current);Ws(t,r),a=ow(null,t,n,e,a,r);var i=sw();return t.flags|=1,typeof a=="object"&&a!==null&&typeof a.render=="function"&&a.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,fr(n)?(i=!0,Eh(t)):i=!1,t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,tw(t),a.updater=pm,t.stateNode=a,a._reactInternals=t,e0(t,n,e,r),t=n0(null,t,n,!0,i,r)):(t.tag=0,et&&i&&Gx(t),Jt(null,t,a,r),t=t.child),t;case 16:n=t.elementType;e:{switch(ih(e,t),e=t.pendingProps,a=n._init,n=a(n._payload),t.type=n,a=t.tag=_L(n),e=cn(n,e),a){case 0:t=r0(null,t,n,e,r);break e;case 1:t=DS(null,t,n,e,r);break e;case 11:t=RS(null,t,n,e,r);break e;case 14:t=IS(null,t,n,cn(n.type,e),r);break e}throw Error(G(306,n,""))}return t;case 0:return n=t.type,a=t.pendingProps,a=t.elementType===n?a:cn(n,a),r0(e,t,n,a,r);case 1:return n=t.type,a=t.pendingProps,a=t.elementType===n?a:cn(n,a),DS(e,t,n,a,r);case 3:e:{if(bT(t),e===null)throw Error(G(387));n=t.pendingProps,i=t.memoizedState,a=i.element,VC(e,t),Th(t,n,null,r);var o=t.memoizedState;if(n=o.element,i.isDehydrated)if(i={element:n,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){a=pl(Error(G(423)),t),t=LS(e,t,n,r,a);break e}else if(n!==a){a=pl(Error(G(424)),t),t=LS(e,t,n,r,a);break e}else for(kr=wi(t.stateNode.containerInfo.firstChild),Or=t,et=!0,gn=null,r=HC(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(dl(),n===a){t=Ca(e,t,r);break e}Jt(e,t,n,r)}t=t.child}return t;case 5:return KC(t),e===null&&Jy(t),n=t.type,a=t.pendingProps,i=e!==null?e.memoizedProps:null,o=a.children,Vy(n,a)?o=null:i!==null&&Vy(n,i)&&(t.flags|=32),yT(e,t),Jt(e,t,o,r),t.child;case 6:return e===null&&Jy(t),null;case 13:return xT(e,t,r);case 4:return rw(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=fl(t,null,n,r):Jt(e,t,n,r),t.child;case 11:return n=t.type,a=t.pendingProps,a=t.elementType===n?a:cn(n,a),RS(e,t,n,a,r);case 7:return Jt(e,t,t.pendingProps,r),t.child;case 8:return Jt(e,t,t.pendingProps.children,r),t.child;case 12:return Jt(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,a=t.pendingProps,i=t.memoizedProps,o=a.value,qe(Ph,n._currentValue),n._currentValue=o,i!==null)if(jn(i.value,o)){if(i.children===a.children&&!dr.current){t=Ca(e,t,r);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var s=i.dependencies;if(s!==null){o=i.child;for(var l=s.firstContext;l!==null;){if(l.context===n){if(i.tag===1){l=Sa(-1,r&-r),l.tag=2;var c=i.updateQueue;if(c!==null){c=c.shared;var d=c.pending;d===null?l.next=l:(l.next=d.next,d.next=l),c.pending=l}}i.lanes|=r,l=i.alternate,l!==null&&(l.lanes|=r),Qy(i.return,r,t),s.lanes|=r;break}l=l.next}}else if(i.tag===10)o=i.type===t.type?null:i.child;else if(i.tag===18){if(o=i.return,o===null)throw Error(G(341));o.lanes|=r,s=o.alternate,s!==null&&(s.lanes|=r),Qy(o,r,t),o=i.sibling}else o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===t){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}Jt(e,t,a.children,r),t=t.child}return t;case 9:return a=t.type,n=t.pendingProps.children,Ws(t,r),a=Kr(a),n=n(a),t.flags|=1,Jt(e,t,n,r),t.child;case 14:return n=t.type,a=cn(n,t.pendingProps),a=cn(n.type,a),IS(e,t,n,a,r);case 15:return gT(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,a=t.pendingProps,a=t.elementType===n?a:cn(n,a),ih(e,t),t.tag=1,fr(n)?(e=!0,Eh(t)):e=!1,Ws(t,r),hT(t,n,a),e0(t,n,a,r),n0(null,t,n,!0,e,r);case 19:return wT(e,t,r);case 22:return vT(e,t,r)}throw Error(G(156,t.tag))};function DT(e,t){return uC(e,t)}function wL(e,t,r,n){this.tag=e,this.key=r,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=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function zr(e,t,r,n){return new wL(e,t,r,n)}function vw(e){return e=e.prototype,!(!e||!e.isReactComponent)}function _L(e){if(typeof e=="function")return vw(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Ix)return 11;if(e===Dx)return 14}return 2}function ki(e,t){var r=e.alternate;return r===null?(r=zr(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.depen
vendor: 8,747 bytes, line 40
40dencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function lh(e,t,r,n,a,i){var o=2;if(n=e,typeof e=="function")vw(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case js:return _o(r.children,a,i,t);case Rx:o=8,a|=8;break;case jy:return e=zr(12,r,t,a|2),e.elementType=jy,e.lanes=i,e;case ky:return e=zr(13,r,t,a),e.elementType=ky,e.lanes=i,e;case Ey:return e=zr(19,r,t,a),e.elementType=Ey,e.lanes=i,e;case KP:return vm(r,a,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case qP:o=10;break e;case VP:o=9;break e;case Ix:o=11;break e;case Dx:o=14;break e;case ti:o=16,n=null;break e}throw Error(G(130,e==null?e:typeof e,""))}return t=zr(o,r,t,a),t.elementType=e,t.type=n,t.lanes=i,t}function _o(e,t,r,n){return e=zr(7,e,n,t),e.lanes=r,e}function vm(e,t,r,n){return e=zr(22,e,n,t),e.elementType=KP,e.lanes=r,e.stateNode={isHidden:!1},e}function yv(e,t,r){return e=zr(6,e,null,t),e.lanes=r,e}function bv(e,t,r){return t=zr(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function SL(e,t,r,n,a){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=Zg(0),this.expirationTimes=Zg(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Zg(0),this.identifierPrefix=n,this.onRecoverableError=a,this.mutableSourceEagerHydrationData=null}function yw(e,t,r,n,a,i,o,s,l){return e=new SL(e,t,r,s,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=zr(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},tw(i),e}function jL(e,t,r){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Ss,key:n==null?null:""+n,children:e,containerInfo:t,implementation:r}}function LT(e){if(!e)return Ci;e=e._reactInternals;e:{if(Vo(e)!==e||e.tag!==1)throw Error(G(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(fr(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(G(171))}if(e.tag===1){var r=e.type;if(fr(r))return LC(e,r,t)}return t}function BT(e,t,r,n,a,i,o,s,l){return e=yw(r,n,!0,e,a,i,o,s,l),e.context=LT(null),r=e.current,n=er(),a=ji(r),i=Sa(n,a),i.callback=t??null,_i(r,i,a),e.current.lanes=a,kd(e,a,n),hr(e,n),e}function ym(e,t,r,n){var a=t.current,i=er(),o=ji(a);return r=LT(r),t.context===null?t.context=r:t.pendingContext=r,t=Sa(i,o),t.payload={element:e},n=n===void 0?null:n,n!==null&&(t.callback=n),e=_i(a,t,o),e!==null&&(_n(e,a,o,i),rh(e,a,o)),o}function Bh(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 GS(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function bw(e,t){GS(e,t),(e=e.alternate)&&GS(e,t)}function kL(){return null}var FT=typeof reportError=="function"?reportError:function(e){console.error(e)};function xw(e){this._internalRoot=e}bm.prototype.render=xw.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(G(409));ym(e,t,null,null)};bm.prototype.unmount=xw.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Ao(function(){ym(null,e,null,null)}),t[Na]=null}};function bm(e){this._internalRoot=e}bm.prototype.unstable_scheduleHydration=function(e){if(e){var t=vC();e={blockedOn:null,target:e,priority:t};for(var r=0;r<ai.length&&t!==0&&t<ai[r].priority;r++);ai.splice(r,0,e),r===0&&bC(e)}};function ww(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function xm(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function YS(){}function EL(e,t,r,n,a){if(a){if(typeof n=="function"){var i=n;n=function(){var c=Bh(o);i.call(c)}}var o=BT(t,n,e,0,null,!1,!1,"",YS);return e._reactRootContainer=o,e[Na]=o.current,mu(e.nodeType===8?e.parentNode:e),Ao(),o}for(;a=e.lastChild;)e.removeChild(a);if(typeof n=="function"){var s=n;n=function(){var c=Bh(l);s.call(c)}}var l=yw(e,0,!1,null,null,!1,!1,"",YS);return e._reactRootContainer=l,e[Na]=l.current,mu(e.nodeType===8?e.parentNode:e),Ao(function(){ym(t,l,r,n)}),l}function wm(e,t,r,n,a){var i=r._reactRootContainer;if(i){var o=i;if(typeof a=="function"){var s=a;a=function(){var l=Bh(o);s.call(l)}}ym(t,o,e,a)}else o=EL(r,t,e,a,n);return Bh(o)}mC=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=Lc(t.pendingLanes);r!==0&&(Fx(t,r|1),hr(t,dt()),!(je&6)&&(ml=dt()+500,Ii()))}break;case 13:Ao(function(){var n=Pa(e,1);if(n!==null){var a=er();_n(n,e,1,a)}}),bw(e,1)}};Ux=function(e){if(e.tag===13){var t=Pa(e,134217728);if(t!==null){var r=er();_n(t,e,134217728,r)}bw(e,134217728)}};gC=function(e){if(e.tag===13){var t=ji(e),r=Pa(e,t);if(r!==null){var n=er();_n(r,e,t,n)}bw(e,t)}};vC=function(){return Re};yC=function(e,t){var r=Re;try{return Re=e,t()}finally{Re=r}};Iy=function(e,t,r){switch(t){case"input":if(Py(e,r),t=r.name,r.type==="radio"&&t!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<r.length;t++){var n=r[t];if(n!==e&&n.form===e.form){var a=dm(n);if(!a)throw Error(G(90));YP(n),Py(n,a)}}}break;case"textarea":JP(e,r);break;case"select":t=r.value,t!=null&&Bs(e,!!r.multiple,t,!1)}};aC=pw;iC=Ao;var OL={usingClientEntryPoint:!1,Events:[Od,Ns,dm,rC,nC,pw]},wc={findFiberByHostInstance:oo,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},NL={bundleType:wc.bundleType,version:wc.version,rendererPackageName:wc.rendererPackageName,rendererConfig:wc.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Da.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=lC(e),e===null?null:e.stateNode},findFiberByHostInstance:wc.findFiberByHostInstance||kL,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 gf=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!gf.isDisabled&&gf.supportsFiber)try{sm=gf.inject(NL),Qn=gf}catch{}}Ar.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=OL;Ar.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!ww(t))throw Error(G(200));return jL(e,t,null,r)};Ar.createRoot=function(e,t){if(!ww(e))throw Error(G(299));var r=!1,n="",a=FT;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onRecoverableError!==void 0&&(a=t.onRecoverableError)),t=yw(e,1,!1,null,null,r,!1,n,a),e[Na]=t.current,mu(e.nodeType===8?e.parentNode:e),new xw(t)};Ar.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(G(188)):(e=Object.keys(e).join(","),Error(G(268,e)));return e=lC(t),e=e===null?null:e.stateNode,e};Ar.flushSync=function(e){return Ao(e)};Ar.hydrate=function(e,t,r){if(!xm(t))throw Error(G(200));return wm(null,e,t,!0,r)};Ar.hydrateRoot=function(e,t,r){if(!ww(e))throw Error(G(405));var n=r!=null&&r.hydratedSources||null,a=!1,i="",o=FT;if(r!=null&&(r.unstable_strictMode===!0&&(a=!0),r.identifierPrefix!==void 0&&(i=r.identifierPrefix),r.onRecoverableError!==void 0&&(o=r.onRecoverableError)),t=BT(t,null,e,1,r??null,a,!1,i,o),e[Na]=t.current,mu(e),n)for(e=0;e<n.length;e++)r=n[e],a=r._getVersion,a=a(r._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[r,a]:t.mutableSourceEagerHydrationData.push(r,a);return new bm(t)};Ar.render=function(e,t,r){if(!xm(t))throw Error(G(200));return wm(null,e,t,!1,r)};Ar.unmountComponentAtNode=function(e){if(!xm(e))throw Error(G(40));return e._reactRootContainer?(Ao(function(){wm(null,null,e,!1,function(){e._reactRootContainer=null,e[Na]=null})}),!0):!1};Ar.unstable_batchedUpdates=pw;Ar.unstable_renderSubtreeIntoContainer=function(e,t,r,n){if(!xm(r))throw Error(G(200));if(e==null||e._reactInternals===void 0)throw Error(G(38));return wm(e,t,r,!1,n)};Ar.version="18.3.1-next-f1338f8080-20240426";
vendor: 8,664 bytes, line 40
40function UT(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(UT)}catch(e){console.error(e)}}UT(),UP.exports=Ar;var Ko=UP.exports;const zT=Fe(Ko);var WT,XS=Ko;WT=XS.createRoot,XS.hydrateRoot;var _m=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Sm=typeof window>"u"||"Deno"in globalThis;function un(){}function PL(e,t){return typeof e=="function"?e(t):e}function CL(e){return typeof e=="number"&&e>=0&&e!==1/0}function TL(e,t){return Math.max(e+(t||0)-Date.now(),0)}function m0(e,t){return typeof e=="function"?e(t):e}function AL(e,t){return typeof e=="function"?e(t):e}function JS(e,t){const{type:r="all",exact:n,fetchStatus:a,predicate:i,queryKey:o,stale:s}=e;if(o){if(n){if(t.queryHash!==_w(o,t.options))return!1}else if(!ku(t.queryKey,o))return!1}if(r!=="all"){const l=t.isActive();if(r==="active"&&!l||r==="inactive"&&l)return!1}return!(typeof s=="boolean"&&t.isStale()!==s||a&&a!==t.state.fetchStatus||i&&!i(t))}function QS(e,t){const{exact:r,status:n,predicate:a,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(r){if(ju(t.options.mutationKey)!==ju(i))return!1}else if(!ku(t.options.mutationKey,i))return!1}return!(n&&t.state.status!==n||a&&!a(t))}function _w(e,t){return((t==null?void 0:t.queryKeyHashFn)||ju)(e)}function ju(e){return JSON.stringify(e,(t,r)=>g0(r)?Object.keys(r).sort().reduce((n,a)=>(n[a]=r[a],n),{}):r)}function ku(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>ku(e[r],t[r])):!1}function HT(e,t){if(e===t)return e;const r=ZS(e)&&ZS(t);if(r||g0(e)&&g0(t)){const n=r?e:Object.keys(e),a=n.length,i=r?t:Object.keys(t),o=i.length,s=r?[]:{},l=new Set(n);let c=0;for(let d=0;d<o;d++){const f=r?d:i[d];(!r&&l.has(f)||r)&&e[f]===void 0&&t[f]===void 0?(s[f]=void 0,c++):(s[f]=HT(e[f],t[f]),s[f]===e[f]&&e[f]!==void 0&&c++)}return a===o&&c===a?e:s}return t}function ZS(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function g0(e){if(!ej(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!ej(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function ej(e){return Object.prototype.toString.call(e)==="[object Object]"}function ML(e){return new Promise(t=>{setTimeout(t,e)})}function $L(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?HT(e,t):t}function RL(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function IL(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var Sw=Symbol();function qT(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Sw?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var mo,ci,tl,_P,DL=(_P=class extends _m{constructor(){super();Oe(this,mo);Oe(this,ci);Oe(this,tl);me(this,tl,t=>{if(!Sm&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){H(this,ci)||this.setEventListener(H(this,tl))}onUnsubscribe(){var t;this.hasListeners()||((t=H(this,ci))==null||t.call(this),me(this,ci,void 0))}setEventListener(t){var r;me(this,tl,t),(r=H(this,ci))==null||r.call(this),me(this,ci,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){H(this,mo)!==t&&(me(this,mo,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof H(this,mo)=="boolean"?H(this,mo):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},mo=new WeakMap,ci=new WeakMap,tl=new WeakMap,_P),VT=new DL,rl,ui,nl,SP,LL=(SP=class extends _m{constructor(){super();Oe(this,rl,!0);Oe(this,ui);Oe(this,nl);me(this,nl,t=>{if(!Sm&&window.addEventListener){const r=()=>t(!0),n=()=>t(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",n)}}})}onSubscribe(){H(this,ui)||this.setEventListener(H(this,nl))}onUnsubscribe(){var t;this.hasListeners()||((t=H(this,ui))==null||t.call(this),me(this,ui,void 0))}setEventListener(t){var r;me(this,nl,t),(r=H(this,ui))==null||r.call(this),me(this,ui,t(this.setOnline.bind(this)))}setOnline(t){H(this,rl)!==t&&(me(this,rl,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return H(this,rl)}},rl=new WeakMap,ui=new WeakMap,nl=new WeakMap,SP),Fh=new LL;function BL(){let e,t;const r=new Promise((a,i)=>{e=a,t=i});r.status="pending",r.catch(()=>{});function n(a){Object.assign(r,a),delete r.resolve,delete r.reject}return r.resolve=a=>{n({status:"fulfilled",value:a}),e(a)},r.reject=a=>{n({status:"rejected",reason:a}),t(a)},r}function FL(e){return Math.min(1e3*2**e,3e4)}function KT(e){return(e??"online")==="online"?Fh.isOnline():!0}var GT=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function xv(e){return e instanceof GT}function YT(e){let t=!1,r=0,n=!1,a;const i=BL(),o=m=>{var v;n||(h(new GT(m)),(v=e.abort)==null||v.call(e))},s=()=>{t=!0},l=()=>{t=!1},c=()=>VT.isFocused()&&(e.networkMode==="always"||Fh.isOnline())&&e.canRun(),d=()=>KT(e.networkMode)&&e.canRun(),f=m=>{var v;n||(n=!0,(v=e.onSuccess)==null||v.call(e,m),a==null||a(),i.resolve(m))},h=m=>{var v;n||(n=!0,(v=e.onError)==null||v.call(e,m),a==null||a(),i.reject(m))},p=()=>new Promise(m=>{var v;a=x=>{(n||c())&&m(x)},(v=e.onPause)==null||v.call(e)}).then(()=>{var m;a=void 0,n||(m=e.onContinue)==null||m.call(e)}),g=()=>{if(n)return;let m;const v=r===0?e.initialPromise:void 0;try{m=v??e.fn()}catch(x){m=Promise.reject(x)}Promise.resolve(m).then(f).catch(x=>{var j;if(n)return;const b=e.retry??(Sm?0:3),y=e.retryDelay??FL,S=typeof y=="function"?y(r,x):y,_=b===!0||typeof b=="number"&&r<b||typeof b=="function"&&b(r,x);if(t||!_){h(x);return}r++,(j=e.onFail)==null||j.call(e,r,x),ML(S).then(()=>c()?void 0:p()).then(()=>{t?h(x):g()})})};return{promise:i,cancel:o,continue:()=>(a==null||a(),i),cancelRetry:s,continueRetry:l,canStart:d,start:()=>(d()?g():p().then(g),i)}}var UL=e=>setTimeout(e,0);function zL(){let e=[],t=0,r=s=>{s()},n=s=>{s()},a=UL;const i=s=>{t?e.push(s):a(()=>{r(s)})},o=()=>{const s=e;e=[],s.length&&a(()=>{n(()=>{s.forEach(l=>{r(l)})})})};return{batch:s=>{let l;t++;try{l=s()}finally{t--,t||o()}return l},batchCalls:s=>(...l)=>{i(()=>{s(...l)})},schedule:i,setNotifyFunction:s=>{r=s},setBatchNotifyFunction:s=>{n=s},setScheduler:s=>{a=s}}}var Qt=zL(),go,jP,XT=(jP=class{constructor(){Oe(this,go)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),CL(this.gcTime)&&me(this,go,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Sm?1/0:5*60*1e3))}clearGcTimeout(){H(this,go)&&(clearTimeout(H(this,go)),me(this,go,void 0))}},go=new WeakMap,jP),al,vo,Lr,yo,Wt,_d,bo,fn,fa,kP,WL=(kP=class extends XT{constructor(t){super();Oe(this,fn);Oe(this,al);Oe(this,vo);Oe(this,Lr);Oe(this,yo);Oe(this,Wt);Oe(this,_d);Oe(this,bo);me(this,bo,!1),me(this,_d,t.defaultOptions),this.setOptions(t.options),this.observers=[],me(this,yo,t.client),me(this,Lr,H(this,yo).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,me(this,al,qL(this.options)),this.state=t.state??H(this,al),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=H(this,Wt))==null?void 0:t.promise}setOptions(t){this.options={...H(this,_d),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&H(this,Lr).remove(this)}setData(t,r){const n=$L(this.state.data,t,this.options);return Ft(this,fn,fa).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t,r){Ft(this,fn,fa).call(this,{type:"setState",state:t,setStateOptions:r})}cancel(t){var n,a;const r=(n=H(this,Wt))==null?void 0:n.promise;return(a=H(this,Wt))==null||a.cancel(t),r?r.then(un).catch(un):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(H(this,al))}isActive(){return this.observers.some(t=>AL(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Sw||this.state.dataUpdateCount+this.state.errorUpdate
40Count===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>m0(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!TL(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=H(this,Wt))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=H(this,Wt))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),H(this,Lr).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(H(this,Wt)&&(H(this,bo)?H(this,Wt).cancel({revert:!0}):H(this,Wt).cancelRetry()),this.scheduleGc()),H(this,Lr).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Ft(this,fn,fa).call(this,{type:"invalidate"})}fetch(t,r){var c,d,f;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(H(this,Wt))return H(this,Wt).continueRetry(),H(this,Wt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const h=this.observers.find(p=>p.options.queryFn);h&&this.setOptions(h.options)}const n=new AbortController,a=h=>{Object.defineProperty(h,"signal",{enumerable:!0,get:()=>(me(this,bo,!0),n.signal)})},i=()=>{const h=qT(this.options,r),g=(()=>{const m={client:H(this,yo),queryKey:this.queryKey,meta:this.meta};return a(m),m})();return me(this,bo,!1),this.options.persister?this.options.persister(h,g,this):h(g)},s=(()=>{const h={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:H(this,yo),state:this.state,fetchFn:i};return a(h),h})();(c=this.options.behavior)==null||c.onFetch(s,this),me(this,vo,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((d=s.fetchOptions)==null?void 0:d.meta))&&Ft(this,fn,fa).call(this,{type:"fetch",meta:(f=s.fetchOptions)==null?void 0:f.meta});const l=h=>{var p,g,m,v;xv(h)&&h.silent||Ft(this,fn,fa).call(this,{type:"error",error:h}),xv(h)||((g=(p=H(this,Lr).config).onError)==null||g.call(p,h,this),(v=(m=H(this,Lr).config).onSettled)==null||v.call(m,this.state.data,h,this)),this.scheduleGc()};return me(this,Wt,YT({initialPromise:r==null?void 0:r.initialPromise,fn:s.fetchFn,abort:n.abort.bind(n),onSuccess:h=>{var p,g,m,v;if(h===void 0){l(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(h)}catch(x){l(x);return}(g=(p=H(this,Lr).config).onSuccess)==null||g.call(p,h,this),(v=(m=H(this,Lr).config).onSettled)==null||v.call(m,h,this.state.error,this),this.scheduleGc()},onError:l,onFail:(h,p)=>{Ft(this,fn,fa).call(this,{type:"failed",failureCount:h,error:p})},onPause:()=>{Ft(this,fn,fa).call(this,{type:"pause"})},onContinue:()=>{Ft(this,fn,fa).call(this,{type:"continue"})},retry:s.options.retry,retryDelay:s.options.retryDelay,networkMode:s.options.networkMode,canRun:()=>!0})),H(this,Wt).start()}},al=new WeakMap,vo=new WeakMap,Lr=new WeakMap,yo=new WeakMap,Wt=new WeakMap,_d=new WeakMap,bo=new WeakMap,fn=new WeakSet,fa=function(t){const r=n=>{switch(t.type){case"failed":return{...n,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...HL(n.data,this.options),fetchMeta:t.meta??null};case"success":return me(this,vo,void 0),{...n,data:t.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const a=t.error;return xv(a)&&a.revert&&H(this,vo)?{...H(this,vo),fetchStatus:"idle"}
vendor: 3,703 bytes, line 40
40:{...n,error:a,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:a,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=r(this.state),Qt.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),H(this,Lr).notify({query:this,type:"updated",action:t})})},kP);function HL(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:KT(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function qL(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=t!==void 0,n=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var Bn,EP,VL=(EP=class extends _m{constructor(t={}){super();Oe(this,Bn);this.config=t,me(this,Bn,new Map)}build(t,r,n){const a=r.queryKey,i=r.queryHash??_w(a,r);let o=this.get(i);return o||(o=new WL({client:t,queryKey:a,queryHash:i,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(a)}),this.add(o)),o}add(t){H(this,Bn).has(t.queryHash)||(H(this,Bn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=H(this,Bn).get(t.queryHash);r&&(t.destroy(),r===t&&H(this,Bn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Qt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return H(this,Bn).get(t)}getAll(){return[...H(this,Bn).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>JS(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>JS(t,n)):r}notify(t){Qt.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){Qt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Qt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Bn=new WeakMap,EP),Fn,Xt,xo,Un,Za,OP,KL=(OP=class extends XT{constructor(t){super();Oe(this,Un);Oe(this,Fn);Oe(this,Xt);Oe(this,xo);this.mutationId=t.mutationId,me(this,Xt,t.mutationCache),me(this,Fn,[]),this.state=t.state||GL(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){H(this,Fn).includes(t)||(H(this,Fn).push(t),this.clearGcTimeout(),H(this,Xt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){me(this,Fn,H(this,Fn).filter(r=>r!==t)),this.scheduleGc(),H(this,Xt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){H(this,Fn).length||(this.state.status==="pending"?this.scheduleGc():H(this,Xt).remove(this))}continue(){var t;return((t=H(this,xo))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var i,o,s,l,c,d,f,h,p,g,m,v,x,b,y,S,_,j,k,E;const r=()=>{Ft(this,Un,Za).call(this,{type:"continue"})};me(this,xo,YT({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(O,A)=>{Ft(this,Un,Za).call(this,{type:"failed",failureCount:O,error:A})},onPause:()=>{Ft(this,Un,Za).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>H(this,Xt).canRun(this)}));const n=this.state.status==="pending",a=!H(this,xo).canStart();try{if(n)r();else{Ft(this,Un,Za).call(this,{type:"pending",variables:t,isPaused:a}),await((o=(i=H(this,Xt).config).onMutate)==null?void 0:o.call(i,t,this));
40const A=await((l=(s=this.options).onMutate)==null?void 0:l.call(s,t));A!==this.state.context&&Ft(this,Un,Za).call(this,{type:"pending",context:A,variables:t,isPaused:a})}const O=await H(this,xo).start();return await((d=(c=H(this,Xt).config).onSuccess)==null?void 0:d.call(c,O,t,this.state.context,this)),await((h=(f=this.options).onSuccess)==null?void 0:h.call(f,O,t,this.state.context)),await((g=(p=H(this,Xt).config).onSettled)==null?void 0:g.call(p,O,null,this.state.variables,this.state.context,this)),await((v=(m=this.options).onSettled)==null?void 0:v.call(m,O,null,t,this.state.context)),Ft(this,Un,Za).call(this,{type:"success",data:O}),O}catch(O){try{throw await((b=(x=H(this,Xt).config).onError)==null?void 0:b.call(x,O,t,this.state.context,this)),await((S=(y=this.options).onError)==null?void 0:S.call(y,O,t,this.state.context)),await((j=(_=H(this,Xt).config).onSettled)==null?void 0:j.call(_,void 0,O,this.state.variables,this.state.context,this)),await((E=(k=this.options).onSettled)==null?void 0:E.call(k,void 0,O,t,this.state.context)),O}finally{Ft(this,Un,Za).call(this,{type:"error",error:O})}}finally{H(this,Xt).runNext(this)}}},Fn=new WeakMap,Xt=new WeakMap,xo=new WeakMap,Un=new WeakSet,Za=function(t){const r=n=>{switch(t.type){case"failed":return{...n,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...n,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:t.error,failureCount:n.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=r(this.state),Qt.batch(()=>{H(this,Fn).forEach(n=>{n.onMutationUpdate(t)}),H(this,Xt).notify({mutation:this,type:"updated",action:t})})},OP);function GL(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var va,hn,Sd,NP,YL=(NP=class extends _m{constructor(t={}){super();Oe(this,va);Oe(this,hn);Oe(this,Sd);this.config=t,me(this,va,new Set),me(this,hn,new Map),me(this,Sd,0)}build(t,r,n){const a=new KL({mutationCache:this,mutationId:++Jd(this,Sd)._,options:t.defaultMutationOptions(r),state:n});return this.add(a),a}add(t){H(this,va).add(t);const r=vf(t);if(typeof r=="string"){const n=H(this,hn).get(r);n?n.push(t):H(this,hn).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(H(this,va).delete(t)){const r=vf(t);if(typeof r=="string"){const n=H(this,hn).get(r);if(n)if(n.length>1){const a=n.indexOf(t);a!==-1&&n.splice(a,1)}else n[0]===t&&H(this,hn).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=vf(t);if(typeof r=="string"){const n=H(this,hn).get(r),a=n==null?void 0:n.find(i=>i.state.status==="pending");return!a||a===t}else return!0}runNext(t){var n;const r=vf(t);if(typeof r=="string"){const a=(n=H(this,hn).get(r))==null?void 0:n.find(i=>i!==t&&i.state.isPaused);return(a==null?void 0:a.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Qt.batch(()=>{H(this,va).forEach(t=>{this.notify({type:"removed",mutation:t})}),H(this,va).clear(),H(this,hn).clear()})}getAll(){return Array.from(H(this,va))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>QS(r,n))}findAll(t={}){return this.getAll().filter(r=>QS(t,r))}notify(t){Qt.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>
vendor: 4,438 bytes, line 40
40r.state.isPaused);return Qt.batch(()=>Promise.all(t.map(r=>r.continue().catch(un))))}},va=new WeakMap,hn=new WeakMap,Sd=new WeakMap,NP);function vf(e){var t;return(t=e.options.scope)==null?void 0:t.id}function tj(e){return{onFetch:(t,r)=>{var d,f,h,p,g;const n=t.options,a=(h=(f=(d=t.fetchOptions)==null?void 0:d.meta)==null?void 0:f.fetchMore)==null?void 0:h.direction,i=((p=t.state.data)==null?void 0:p.pages)||[],o=((g=t.state.data)==null?void 0:g.pageParams)||[];let s={pages:[],pageParams:[]},l=0;const c=async()=>{let m=!1;const v=y=>{Object.defineProperty(y,"signal",{enumerable:!0,get:()=>(t.signal.aborted?m=!0:t.signal.addEventListener("abort",()=>{m=!0}),t.signal)})},x=qT(t.options,t.fetchOptions),b=async(y,S,_)=>{if(m)return Promise.reject();if(S==null&&y.pages.length)return Promise.resolve(y);const k=(()=>{const T={client:t.client,queryKey:t.queryKey,pageParam:S,direction:_?"backward":"forward",meta:t.options.meta};return v(T),T})(),E=await x(k),{maxPages:O}=t.options,A=_?IL:RL;return{pages:A(y.pages,E,O),pageParams:A(y.pageParams,S,O)}};if(a&&i.length){const y=a==="backward",S=y?XL:rj,_={pages:i,pageParams:o},j=S(n,_);s=await b(_,j,y)}else{const y=e??i.length;do{const S=l===0?o[0]??n.initialPageParam:rj(n,s);if(l>0&&S==null)break;s=await b(s,S),l++}while(l<y)}return s};t.options.persister?t.fetchFn=()=>{var m,v;return(v=(m=t.options).persister)==null?void 0:v.call(m,c,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=c}}}function rj(e,{pages:t,pageParams:r}){const n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,r[n],r):void 0}function XL(e,{pages:t,pageParams:r}){var n;return t.length>0?(n=e.getPreviousPageParam)==null?void 0:n.call(e,t[0],t,r[0],r):void 0}var ot,di,fi,il,ol,hi,sl,ll,PP,JL=(PP=class{constructor(e={}){Oe(this,ot);Oe(this,di);Oe(this,fi);Oe(this,il);Oe(this,ol);Oe(this,hi);Oe(this,sl);Oe(this,ll);me(this,ot,e.queryCache||new VL),me(this,di,e.mutationCache||new YL),me(this,fi,e.defaultOptions||{}),me(this,il,new Map),me(this,ol,new Map),me(this,hi,0)}mount(){Jd(this,hi)._++,H(this,hi)===1&&(me(this,sl,VT.subscribe(async e=>{e&&(await this.resumePausedMutations(),H(this,ot).onFocus())})),me(this,ll,Fh.subscribe(async e=>{e&&(await this.resumePausedMutations(),H(this,ot).onOnline())})))}unmount(){var e,t;Jd(this,hi)._--,H(this,hi)===0&&((e=H(this,sl))==null||e.call(this),me(this,sl,void 0),(t=H(this,ll))==null||t.call(this),me(this,ll,void 0))}isFetching(e){return H(this,ot).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return H(this,di).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=H(this,ot).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=H(this,ot).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(m0(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return H(this,ot).findAll(e).map(({queryKey:t,state:r})=>{const n=r.data;return[t,n]})}setQueryData(e,t,r){const n=this.defaultQueryOptions({queryKey:e}),a=H(this,ot).get(n.queryHash),i=a==null?void 0:a.state.data,o=PL(t,i);if(o!==void 0)return H(this,ot).build(this,n).setData(o,{...r,manual:!0})}setQueriesData(e,t,r){return Qt.batch(()=>H(this,ot).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=H(this,ot).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=H(this,ot);Qt.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=H(this,ot);return Qt.batch(()=>(r.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=Qt.batch(()=>H(this,ot).findAll(e).map(a=>a.cancel(r)));return Promise.all(n).then(un).catch(un)}invalidateQueries(e,t={}){return Qt.batch(()=>(H(this,ot).findAll(e).forEach(r=>{r.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const r={...t,cancelRefetch:t.cancelRefetch??!0},n=Qt.batch(()=>H(this,ot).findAll(e).filter(a=>!a.isDisabled()&&!a.isStatic()).map(a=>{let i=a.fetch(void 0,r);return r.throwOnError||(i=i.catch(un)),a.state.fetchStatus==="paused"?Promise.resolve():i}
40));return Promise.all(n).then(un)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=H(this,ot).build(this,t);return r.isStaleByTime(m0(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(un).catch(un)}fetchInfiniteQuery(e){return e.behavior=tj(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(un).catch(un)}ensureInfiniteQueryData(e){return e.behavior=tj(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Fh.isOnline()?H(this,di).resumePausedMutations():Promise.resolve()}getQueryCache(){return H(this,ot)}getMutationCache(){return H(this,di)}getDefaultOptions(){return H(this,fi)}setDefaultOptions(e){me(this,fi,e)}setQueryDefaults(e,t){H(this,il).set(ju(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...H(this,il).values()],r={};return t.forEach(n=>{ku(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){H(this,ol).set(ju(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...H(this,ol).values()],r={};return t.forEach(n=>{ku(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...H(this,fi).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=_w(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Sw&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...H(this,fi).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){H(this,ot).clear(),H(this,di).clear()}},ot=new WeakMap,di=new WeakMap,fi=new WeakMap,il=new WeakMap,ol=new WeakMap,hi=new WeakMap,sl=new WeakMap,ll=new WeakMap,PP),QL=w.createContext(void 0),ZL=({client:e,children:t})=>(w.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),u.jsx(QL.Provider,{value:e,children:t}));/**
41 * @remix-run/router v1.23.0
42 *
43 * Copyright (c) Remix Software Inc.
44 *
45 * This source code is licensed under the MIT license found in the
46 * LICENSE.md file in the root directory of this source tree.
47 *
48 * @license MIT
49 */function Eu(){return Eu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Eu.apply(this,arguments)}var gi;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(gi||(gi={}));const nj="popstate";function e6(e){e===void 0&&(e={});function t(n,a){let{pathname:i,search:o,hash:s}=n.location;return v0("",{pathname:i,search:o,hash:s},a.state&&a.state.usr||null,a.state&&a.state.key||"default")}function r(n,a){return typeof a=="string"?a:Uh(a)}return r6(t,r,null,e)}function ft(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function JT(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function t6(){return Math.random().toString(36).substr(2,8)}function aj(e,t){return{usr:e.state,key:e.key,idx:t}}function v0(e,t,r,n){return r===void 0&&(r=null),Eu({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Vl(t):t,{state:r,key:t&&t.key||n||t6()})}function Uh(e){let{pathname:t="/",search:r="",hash:n=""}=e;return r&&r!=="?"&&(t+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function Vl(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function r6(e,t,r,n){n===void 0&&(n={});let{window:a=document.defaultView,v5Compat:i=!1}=n,o=a.history,s=gi.Pop,l=null,c=d();c==null&&(c=0,o.replaceState(Eu({},o.state,{idx:c}),""));function d(){return(o.state||{idx:null}).idx}function f(){s=gi.Pop;let v=d(),x=v==null?null:v-c;c=v,l&&l({action:s,location:m.location,delta:x})}function h(v,x){s=gi.Push;let b=v0(m.location,v,x);c=d()+1;let y=aj(b,c),S=m.createHref(b);try{o.pushState(y,"",S)}catch(_){if(_ instanceof DOMException&&_.name==="DataCloneError")throw _;a.location.assign(S)}i&&l&&l({action:s,location:m.location,delta:1})}function p(v,x){s=gi.Replace;let b=v0(m.location,v,x);c=d();let y=aj(b,c),S=m.createHref(b);o.replaceState(y,"",S),i&&l&&l({action:s,location:m.location,delta:0})}function g(v){let x=a.location.origin!=="null"?a.location.origin:a.location.href,b=typeof v=="string"?v:Uh(v);return b=b.replace(/ $/,"%20"),ft(x,"No window.location.(origin|href) available to create URL for href: "+b),new URL(b,x)}let m={get action(){return s},get location(){return e(a,o)},listen(v){if(l)throw new Error("A history only accepts one active listener");return a.addEventListener(nj,f),l=v,()=>{a.removeEventListener(nj,f),l=null}},createHref(v){return t(a,v)},createURL:g,encodeLocation(v){let x=g(v);return{pathname:x.pathname,search:x.search,hash:x.hash}},push:h,replace:p,go(v){return o.go(v)}};return m}var ij;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(ij||(ij={}));function n6(e,t,r){return r===void 0&&(r="/"),a6(e,t,r,!1)}function a6(e,t,r,n){let a=typeof t=="string"?Vl(t):t,i=jw(a.pathname||"/",r);if(i==null)return null;let o=QT(e);i6(o);let s=null;for(let l=0;s==null&&l<o.length;++l){let c=g6(i);s=p6(o[l],c,n)}return s}function QT(e,t,r,n){t===void 0&&(t=[]),r===void 0&&(r=[]),n===void 0&&(n="");let a=(i,o,s)=>{let l={relativePath:s===void 0?i.path||"":s,caseSensitive:i.caseSensitive===!0,childrenIndex:o,route:i};l.relativePath.startsWith("/")&&(ft(l.relativePath.startsWith(n),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+n+'" is not val
49id. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(n.length));let c=Ei([n,l.relativePath]),d=r.concat(l);i.children&&i.children.length>0&&(ft(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),QT(i.children,t,d,c)),!(i.path==null&&!i.index)&&t.push({path:c,score:f6(c,i.index),routesMeta:d})};return e.forEach((i,o)=>{var s;if(i.path===""||!((s=i.path)!=null&&s.includes("?")))a(i,o);else for(let l of ZT(i.path))a(i,o,l)}),t}function ZT(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,a=r.endsWith("?"),i=r.replace(/\?$/,"");if(n.length===0)return a?[i,""]:[i];let o=ZT(n.join("/")),s=[];return s.push(...o.map(l=>l===""?i:[i,l].join("/"))),a&&s.push(...o),s.map(l=>e.startsWith("/")&&l===""?"/":l)}function i6(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:h6(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const o6=/^:[\w-]+$/,s6=3,l6=2,c6=1,u6=10,d6=-2,oj=e=>e==="*";function f6(e,t){let r=e.split("/"),n=r.length;return r.some(oj)&&(n+=d6),t&&(n+=l6),r.filter(a=>!oj(a)).reduce((a,i)=>a+(o6.test(i)?s6:i===""?c6:u6),n)}function h6(e,t){return e.length===t.length&&e.slice(0,-1).every((n,a)=>n===t[a])?e[e.length-1]-t[t.length-1]:0}function p6(e,t,r){let{routesMeta:n}=e,a={},i="/",o=[];for(let s=0;s<n.length;++s){let l=n[s],c=s===n.length-1,d=i==="/"?t:t.slice(i.length)||"/",f=sj({path:l.relativePath,caseSensitive:l.caseSensitive,end:c},d),h=l.route;if(!f&&c&&r&&!n[n.length-1].route.index&&(f=sj({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},d)),!f)return null;
vendor: 9,495 bytes, lines 49-58
49Object.assign(a,f.params),o.push({params:a,pathname:Ei([i,f.pathname]),pathnameBase:x6(Ei([i,f.pathnameBase])),route:h}),f.pathnameBase!=="/"&&(i=Ei([i,f.pathnameBase]))}return o}function sj(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=m6(e.path,e.caseSensitive,e.end),a=t.match(r);if(!a)return null;let i=a[0],o=i.replace(/(.)\/+$/,"$1"),s=a.slice(1);return{params:n.reduce((c,d,f)=>{let{paramName:h,isOptional:p}=d;if(h==="*"){let m=s[f]||"";o=i.slice(0,i.length-m.length).replace(/(.)\/+$/,"$1")}const g=s[f];return p&&!g?c[h]=void 0:c[h]=(g||"").replace(/%2F/g,"/"),c},{}),pathname:i,pathnameBase:o,pattern:e}}function m6(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),JT(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let n=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,s,l)=>(n.push({paramName:s,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(n.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),n]}function g6(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return JT(!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 jw(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}function v6(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:a=""}=typeof e=="string"?Vl(e):e;return{pathname:r?r.startsWith("/")?r:y6(r,t):t,search:w6(n),hash:_6(a)}}function y6(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(a=>{a===".."?r.length>1&&r.pop():a!=="."&&r.push(a)}),r.length>1?r.join("/"):"/"}function wv(e,t,r,n){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(n)+"].  Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function b6(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function kw(e,t){let r=b6(e);return t?r.map((n,a)=>a===r.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function Ew(e,t,r,n){n===void 0&&(n=!1);let a;typeof e=="string"?a=Vl(e):(a=Eu({},e),ft(!a.pathname||!a.pathname.includes("?"),wv("?","pathname","search",a)),ft(!a.pathname||!a.pathname.includes("#"),wv("#","pathname","hash",a)),ft(!a.search||!a.search.includes("#"),wv("#","search","hash",a)));let i=e===""||a.pathname==="",o=i?"/":a.pathname,s;if(o==null)s=r;else{let f=t.length-1;if(!n&&o.startsWith("..")){let h=o.split("/");for(;h[0]==="..";)h.shift(),f-=1;a.pathname=h.join("/")}s=f>=0?t[f]:"/"}let l=v6(a,s),c=o&&o!=="/"&&o.endsWith("/"),d=(i||o===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(c||d)&&(l.pathname+="/"),l}const Ei=e=>e.join("/").replace(/\/\/+/g,"/"),x6=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),w6=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,_6=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function S6(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const e2=["post","put","patch","delete"];new Set(e2);const j6=["get",...e2];new Set(j6);/**
50 * React Router v6.30.1
51 *
52 * Copyright (c) Remix Software Inc.
53 *
54 * This source code is licensed under the MIT license found in the
55 * LICENSE.md file in the root directory of this source tree.
56 *
57 * @license MIT
58 */function Ou(){return Ou=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ou.apply(this,arguments)}const Ow=w.createContext(null),k6=w.createContext(null),Di=w.createContext(null),jm=w.createContext(null),La=w.createContext({outlet:null,matches:[],isDataRoute:!1}),t2=w.createContext(null);function E6(e,t){let{relative:r}=t===void 0?{}:t;Kl()||ft(!1);let{basename:n,navigator:a}=w.useContext(Di),{hash:i,pathname:o,search:s}=n2(e,{relative:r}),l=o;return n!=="/"&&(l=o==="/"?n:Ei([n,o])),a.createHref({pathname:l,search:s,hash:i})}function Kl(){return w.useContext(jm)!=null}function oa(){return Kl()||ft(!1),w.useContext(jm).location}function r2(e){w.useContext(Di).static||w.useLayoutEffect(e)}function Ba(){let{isDataRoute:e}=w.useContext(La);return e?F6():O6()}function O6(){Kl()||ft(!1);let e=w.useContext(Ow),{basename:t,future:r,navigator:n}=w.useContext(Di),{matches:a}=w.useContext(La),{pathname:i}=oa(),o=JSON.stringify(kw(a,r.v7_relativeSplatPath)),s=w.useRef(!1);return r2(()=>{s.current=!0}),w.useCallback(function(c,d){if(d===void 0&&(d={}),!s.current)return;if(typeof c=="number"){n.go(c);return}let f=Ew(c,JSON.parse(o),i,d.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:Ei([t,f.pathname])),(d.replace?n.replace:n.push)(f,d.state,d)},[t,n,o,i,e])}function N6(){let{matches:e}=w.useContext(La),t=e[e.length-1];return t?t.params:{}}function n2(e,t){let{relative:r}=t===void 0?{}:t,{future:n}=w.useContext(Di),{matches:a}=w.useContext(La),{pathname:i}=oa(),o=JSON.stringify(kw(a,n.v7_relativeSplatPath));return w.useMemo(()=>Ew(e,JSON.parse(o),i,r==="path"),[e,o,i,r])}function P6(e,t){return C6(e,t)}function C6(e,t,r,n){Kl()||ft(!1);let{navigator:a}=w.useContext(Di),{matches:i}=w.useContext(La),o=i[i.length-1],s=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let c=oa(),d;if(t){var f;let v=typeof t=="string"?Vl(t):t;l==="/"||(f=v.pathname)!=null&&f.startsWith(l)||ft(!1),d=v}else d=c;let h=d.pathname||"/",p=h;if(l!=="/"){let v=l.replace(/^\//,"").split("/");p="/"+h.replace(/^\//,"").split("/").slice(v.length).join("/")}let g=n6(e,{pathname:p}),m=R6(g&&g.map(v=>Object.assign({},v,{params:Object.assign({},s,v.params),pathname:Ei([l,a.encodeLocation?a.encodeLocation(v.pathname).pathname:v.pathname]),pathnameBase:v.pathnameBase==="/"?l:Ei([l,a.encodeLocation?a.encodeLocation(v.pathnameBase).pathname:v.pathnameBase])})),i,r,n);return t&&m?w.createElement(jm.Provider,{value:{location:Ou({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:gi.Pop}},m):m}function T6(){let e=B6(),t=S6(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,a={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return w.createElement(w.Fragment,null,w.createElement("h2",null,"Unexpected Application Error!"),w.createElement("h3",{style:{fontStyle:"italic"}},t),r?w.createElement("pre",{style:a},r):null,null)}const A6=w.createElement(T6,null);class M6 extends w.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,r){return r.location!==t.location||r.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:r.error,location:r.location,revalidation:t.revalidation||r.revalidation}}componentDidCatch(t,r){console.error("React Router caught the following error during render",t,r)}render(){return this.state.error!==void 0?w.createElement(La.Provider,{value:this.props.routeContext},w.createElement(t2.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function $6(e){let{routeContext:t,match:r,children:n}=e,a=w.useContext(Ow);return a&&a.static&&a.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=r.route.id),w.createElement(La.Provider,{value:t},n)}function R6(e,t,r,n){var a;if(t===void 0&&(t=[]),r===void 0&&(r=null),n===void 0&&(n=null),e==null){var i;if(!r)return null;if(r.errors)e=r.matches;else if((i=n)!=null&&i.v7_partialHydration&&t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let o=e,s=(a=r)==null?void 0:a.errors;if(s!=null){let d=o.findIndex(f=>f.route.id&&(s==null?void 0:s[f.route.id])!==void 0);d>=0||ft(!1),o=o.slice(0,Math.min(o.length,d+1))}let l=!1,c=-1;if(r&&n&&n.v7_partialHydration)for(let d=0;d<o.length;d++){let f=o[d];if((f.route.HydrateFallback||f.route.hydrateFallbackElement)&&(c=d),f.route.id){let{loaderData:h,errors:p}=r,g=f.route.loader&&h[f.route.id]===void 0&&(!p||p[f.route.id]===void 0);if(f.route.lazy||g){l=!0,c>=0?o=o.slice(0,c+1):o=[o[0]];break}}}return o.reduceRight((d,f,h)=>{let p,g=!1,m=null,v=null;r&&(p=s&&f.route.id?s[f.route.id]:void 0,m=f.route.errorElement||A6,l&&(c<0&&h===0?(g=!0,v=null):c===h&&(g=!0,v=f.route.hydrateFallbackElement||null)));let x=t.concat(o.slice(0,h+1)),b=()=>{let y;return p?y=m:g?y=v:f.route.Component?y=w.createElement(f.route.Component,null):f.route.element?y=f.route.element:y=d,w.createElement($6,{match:f,routeContext:{outlet:d,matches:x,isDataRoute:r!=null},children:y})};return r&&(f.route.ErrorBoundary||f.route.errorElement||h===0)?w.createElement(M6,{location:r.location,revalidation:r.revalidation,component:m,error:p,children:b(),routeC
vendor: 2,329 bytes, line 58
58ontext:{outlet:null,matches:x,isDataRoute:!0}}):b()},null)}var a2=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(a2||{}),zh=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}(zh||{});function I6(e){let t=w.useContext(Ow);return t||ft(!1),t}function D6(e){let t=w.useContext(k6);return t||ft(!1),t}function L6(e){let t=w.useContext(La);return t||ft(!1),t}function i2(e){let t=L6(),r=t.matches[t.matches.length-1];return r.route.id||ft(!1),r.route.id}function B6(){var e;let t=w.useContext(t2),r=D6(zh.UseRouteError),n=i2(zh.UseRouteError);return t!==void 0?t:(e=r.errors)==null?void 0:e[n]}function F6(){let{router:e}=I6(a2.UseNavigateStable),t=i2(zh.UseNavigateStable),r=w.useRef(!1);return r2(()=>{r.current=!0}),w.useCallback(function(a,i){i===void 0&&(i={}),r.current&&(typeof a=="number"?e.navigate(a):e.navigate(a,Ou({fromRouteId:t},i)))},[e,t])}function U6(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function y0(e){let{to:t,replace:r,state:n,relative:a}=e;Kl()||ft(!1);let{future:i,static:o}=w.useContext(Di),{matches:s}=w.useContext(La),{pathname:l}=oa(),c=Ba(),d=Ew(t,kw(s,i.v7_relativeSplatPath),l,a==="path"),f=JSON.stringify(d);return w.useEffect(()=>c(JSON.parse(f),{replace:r,state:n,relative:a}),[c,f,a,r,n]),null}function ut(e){ft(!1)}function z6(e){let{basename:t="/",children:r=null,location:n,navigationType:a=gi.Pop,navigator:i,static:o=!1,future:s}=e;Kl()&&ft(!1);let l=t.replace(/^\/*/,"/"),c=w.useMemo(()=>({basename:l,navigator:i,static:o,future:Ou({v7_relativeSplatPath:!1},s)}),[l,s,i,o]);typeof n=="string"&&(n=Vl(n));let{pathname:d="/",search:f="",hash:h="",state:p=null,key:g="default"}=n,m=w.useMemo(()=>{let v=jw(d,l);return v==null?null:{location:{pathname:v,search:f,hash:h,state:p,key:g},navigationType:a}},[l,d,f,h,p,g,a]);return m==null?null:w.createElement(Di.Provider,{value:c},w.createElement(jm.Provider,{children:r,value:m}))}function W6(e){let{children:t,location:r}=e;return P6(b0(t),r)}new Promise(()=>{});
58function b0(e,t){t===void 0&&(t=[]);let r=[];return w.Children.forEach(e,(n,a)=>{if(!w.isValidElement(n))return;let i=[...t,a];if(n.type===w.Fragment){r.push.apply(r,b0(n.props.children,i));return}n.type!==ut&&ft(!1),!n.props.index||!n.props.children||ft(!1);let o={id:n.props.id||i.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,loader:n.props.loader,action:n.props.action,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(o.children=b0(n.props.children,i)),r.push(o)}),r}/**
59 * React Router DOM v6.30.1
60 *
61 * Copyright (c) Remix Software Inc.
62 *
63 * This source code is licensed under the MIT license found in the
64 * LICENSE.md file in the root directory of this source tree.
65 *
66 * @license MIT
67 */function x0(){return x0=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},x0.apply(this,arguments)}function H6(e,t){if(e==null)return{};var r={},n=Object.keys(e),a,i;for(i=0;i<n.length;i++)a=n[i],!(t.indexOf(a)>=0)&&(r[a]=e[a]);return r}function q6(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function V6(e,t){return e.button===0&&(!t||t==="_self")&&!q6(e)}function w0(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,r)=>{let n=e[r];return t.concat(Array.isArray(n)?n.map(a=>[r,a]):[[r,n]])},[]))}function K6(e,t){let r=w0(e);return t&&t.forEach((n,a)=>{r.has(a)||t.getAll(a).forEach(i=>{r.append(a,i)})}),r}const G6=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],Y6="6";try{window.__reactRouterVersion=Y6}catch{}const X6="startTransition",lj=Tx[X6];function J6(e){let{basename:t,children:r,future:n,window:a}=e,i=w.useRef();i.current==null&&(i.current=e6({window:a,v5Compat:!0}));let o=i.current,[s,l]=w.useState({action:o.action,location:o.location}),{v7_startTransition:c}=n||{},d=w.useCallback(f=>{c&&lj?lj(()=>l(f)):l(f)},[l,c]);return w.useLayoutEffect(()=>o.listen(d),[o,d]),w.useEffect(()=>U6(n),[n]),w.createElement(z6,{basename:t,children:r,location:s.location,navigationType:s.action,navigator:o,future:n})}const Q6=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Z6=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Nr=w.forwardRef(function(t,r){let{onClick:n,relative:a,reloadDocument:i,replace:o,state:s,target:l,to:c,preventScrollReset:d,viewTransition:f}=t,h=H6(t,G6),{basename:p}=w.useContext(Di),g,m=!1;if(typeof c=="string"&&Z6.test(c)&&(g=c,Q6))try{let y=new URL(window.location.href),S=c.startsWith("//")?new URL(y.protocol+c):new URL(c),_=jw(S.pathname,p);S.origin===y.origin&&_!=null?c=_+S.search+S.hash:m=!0}catch{}let v=E6(c,{relative:a}),x=e8(c,{replace:o,state:s,target:l,preventScrollReset:d,relative:a,viewTransition:f});function b(y){n&&n(y),y.defaultPrevented||x(y)}return w.createElement("a",x0({},h,{href:g||v,onClick:m||i?n:b,ref:r,target:l}))});var cj;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(cj||(cj={}));var uj;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(uj||(uj={}));function e8(e,t){let{target:r,replace:n,state:a,preventScrollReset:i,relative:o,viewTransition:s}=t===void 0?{}:t,l=Ba(),c=oa(),d=n2(e,{relative:o});return w.useCallback(f=>{if(V6(f,r)){f.preventDefault();let h=n!==void 0?n:Uh(c)===Uh(d);l(e,{replace:h,state:a,preventScrollReset:i,relative:o,viewTransition:s})}},[c,l,d,n,a,r,e,i,o,s])}function t8(e){let t=w.useRef(w0(e)),r=w.useRef(!1),n=oa(),a=w.useMemo(()=>K6(n.search,r.current?null:t.current),[n.search]),i=Ba(),o=w.useCallback((s,l)=>{const c=w0(typeof s=="function"?s(a):s);r.current=!0,i("?"+c,l)},[i,a]);return[a,o]}var dj=["light","dark"],r8="(prefers-color-scheme: dark)",n8=w.createContext(void 0),a8={setTheme:e=>{},themes:[]},i8=()=>{var e;return(e=w.useContext(n8))!=null?e:a8};w.memo(({forcedTheme:e,storageKey:t,attribute:r,enableSystem:n,enableColorScheme:a,defaultTheme:i,value:o,attrs:s,nonce:l})=>{let c=i==="system",d=r==="class"?`var d=document.documentElement,c=d.classList;${`c.remove(${s.map(g=>`'${g}'`).join(",")})`};`:`var d=document.documentElement,n='${r}',s='setAttribute';`,f=a?dj.includes(i)&&i?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${i}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",h=(g,m=!1,v=!0)=>{let x=o?o[g]:g,b=m?g+"|| ''":`'${x}'`,y="";return a&&v&&!m&&dj.includes(g)&&(y+=`d.style.colorScheme = '${g}';`),r==="class"?m||x?y+=`c.add(${b})`:y+="null":x&&(y+=`d[s](n,${b})`),y},p=e?`!function(){${d}${h(e)}}()`:n?`!function(){try{${d}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${c})){var t='${r8}',m=window.matchMedia(t);if(m.media!==t||m.matches){${h("dark")}}else{${h("light")}}}else if(e){${o?`var x=${JSON.stringify(o)};`:""}${h(o?"x[e]":"e",!0)}}
67${c?"":"else{"+h(i,!1,!1)+"}"}${f}}catch(e){}}()`:`!function(){try{${d}var e=localStorage.getItem('${t}');if(e){${o?`var x=${JSON.stringify(o)};`:""}${h(o?"x[e]":"e",!0)}}else{${h(i,!1,!1)};}${f}}catch(t){}}();`;return w.createElement("script",{nonce:l,dangerouslySetInnerHTML:{__html:p}})});var o8=e=>{switch(e){case"success":return c8;case"info":return d8;case"warning":return u8;case"error":return f8;default:return null}},s8=Array(12).fill(0),l8=({visible:e,className:t})=>$.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},$.createElement("div",{className:"sonner-spinner"},s8.map((r,n)=>$.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${n}`})))),c8=$.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},$.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),u8=$.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},$.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),d8=$.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},$.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),f8=$.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},$.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),h8=$.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},$.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),$.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),p8=()=>{let[e,t]=$.useState(document.hidden);return $.useEffect(()=>{let r=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",r),()=>window.removeEventListener("visibilitychange",r)},[]),e},_0=1,m8=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:r,...n}=e,a=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:_0++,i=this.toasts.find(s=>s.id===a),o=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(a)&&this.dismissedToasts.delete(a),i?this.toasts=this.toasts.map(s=>s.id===a?(this.publish({...s,...e,id:a,title:r}),{...s,...e,id:a,dismissible:o,title:r}):s):this.addToast({title:r,...n,dismissible:o,id:a}),a},this.dismiss=e=>(this.dismissedToasts.add(e),e||this.toasts.forEach(t=>{this.subscribers.forEach(r=>r({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>
67this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let r;t.loading!==void 0&&(r=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let n=e instanceof Promise?e:e(),a=r!==void 0,i,o=n.then(async l=>{if(i=["resolve",l],$.isValidElement(l))a=!1,this.create({id:r,type:"default",message:l});else if(v8(l)&&!l.ok){a=!1;let c=typeof t.error=="function"?await t.error(`HTTP error! status: ${l.status}`):t.error,d=typeof t.description=="function"?await t.description(`HTTP error! status: ${l.status}`):t.description;this.create({id:r,type:"error",message:c,description:d})}else if(t.success!==void 0){a=!1;let c=typeof t.success=="function"?await t.success(l):t.success,d=typeof t.description=="function"?await t.description(l):t.description;this.create({id:r,type:"success",message:c,description:d})}}).catch(async l=>{if(i=["reject",l],t.error!==void 0){a=!1;let c=typeof t.error=="function"?await t.error(l):t.error,d=typeof t.description=="function"?await t.description(l):t.description;this.create({id:r,type:"error",message:c,description:d})}}).finally(()=>{var l;a&&(this.dismiss(r),r=void 0),(l=t.finally)==null||l.call(t)}),s=()=>new Promise((l,c)=>o.then(()=>i[0]==="reject"?c(i[1]):l(i[1])).catch(c));return typeof r!="string"&&typeof r!="number"?{unwrap:s}:Object.assign(r,{unwrap:s})},this.custom=(e,t)=>{let r=(t==null?void 0:t.id)||_0++;return this.create({jsx:e(r),id:r,...t}),r},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},ir=new m8,g8=(e,t)=>{let r=(t==null?void 0:t.id)||_0++;return ir.addToast({title:e,...t,id:r}),r},v8=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",y8=g8,b8=()=>ir.toasts,x8=()=>ir.getActiveToasts(),ve=Object.assign(y8,{success:ir.success,info:ir.info,warning:ir.warning,error:ir.error,custom:ir.custom,message:ir.message,promise:ir.promise,dismiss:ir.dismiss,loading:ir.loading},{getHistory:b8,getToasts:x8});function w8(e,{insertAt:t}={}){if(typeof document>"u")return;let r=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t==="top"&&r.firstChild?r.insertBefore(n,r.firstChild):r.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}w8(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;
67left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}
67:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);
67--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}
68`);function yf(e){return e.label!==void 0}var _8=3,S8="32px",j8="16px",fj=4e3,k8=356,E8=14,O8=20,N8=200;function an(...e){return e.filter(Boolean).join(" ")}function P8(e){let[t,r]=e.split("-"),n=[];return t&&n.push(t),r&&n.push(r),n}var C8=e=>{var t,r,n,a,i,o,s,l,c,d,f;let{invert:h,toast:p,unstyled:g,interacting:m,setHeights:v,visibleToasts:x,heights:b,index:y,toasts:S,expanded:_,removeToast:j,defaultRichColors:k,closeButton:E,style:O,cancelButtonStyle:A,actionButtonStyle:T,className:N="",descriptionClassName:I="",duration:R,position:D,gap:L,loadingIcon:M,expandByDefault:C,classNames:P,icons:B,closeButtonAriaLabel:U="Close toast",pauseWhenPageIsHidden:F}=e,[V,J]=$.useState(null),[ue,_e]=$.useState(null),[X,he]=$.useState(!1),[K,Z]=$.useState(!1),[Q,z]=$.useState(!1),[be,fe]=$.useState(!1),[Ue,De]=$.useState(!1),[it,nr]=$.useState(0),[gr,Ki]=$.useState(0),vr=$.useRef(p.duration||R||fj),Mn=$.useRef(null),Zr=$.useRef(null),Gd=y===0,Yd=y+1<=x,$r=p.type,ts=p.dismissible!==!1,X5=p.className||"",J5=p.descriptionClassName||"",Xd=$.useMemo(()=>b.findIndex(pe=>pe.toastId===p.id)||0,[b,p.id]),Q5=$.useMemo(()=>{var pe;
68return(pe=p.closeButton)!=null?pe:E},[p.closeButton,E]),D_=$.useMemo(()=>p.duration||R||fj,[p.duration,R]),qg=$.useRef(0),rs=$.useRef(0),L_=$.useRef(0),ns=$.useRef(null),[Z5,e4]=D.split("-"),B_=$.useMemo(()=>b.reduce((pe,Le,Ze)=>Ze>=Xd?pe:pe+Le.height,0),[b,Xd]),F_=p8(),t4=p.invert||h,Vg=$r==="loading";rs.current=$.useMemo(()=>Xd*L+B_,[Xd,B_]),$.useEffect(()=>{vr.current=D_},[D_]),$.useEffect(()=>{he(!0)},[]),$.useEffect(()=>{let pe=Zr.current;if(pe){let Le=pe.getBoundingClientRect().height;return Ki(Le),v(Ze=>[{toastId:p.id,height:Le,position:p.position},...Ze]),()=>v(Ze=>Ze.filter(en=>en.toastId!==p.id))}},[v,p.id]),$.useLayoutEffect(()=>{if(!X)return;let pe=Zr.current,Le=pe.style.height;pe.style.height="auto";let Ze=pe.getBoundingClientRect().height;pe.style.height=Le,Ki(Ze),v(en=>en.find(tn=>tn.toastId===p.id)?en.map(tn=>tn.toastId===p.id?{...tn,height:Ze}:tn):[{toastId:p.id,height:Ze,position:p.position},...en])},[X,p.title,p.description,v,p.id]);let Va=$.useCallback(()=>{Z(!0),nr(rs.current),v(pe=>pe.filter(Le=>Le.toastId!==p.id)),setTimeout(()=>{j(p)},N8)},[p,j,v,rs]);$.useEffect(()=>{if(p.promise&&$r==="loading"||p.duration===1/0||p.type==="loading")return;let pe;return _||m||F&&F_?(()=>{if(L_.current<qg.current){let Le=new Date().getTime()-qg.current;vr.current=vr.current-Le}L_.current=new Date().getTime()})():vr.current!==1/0&&(qg.current=new Date().getTime(),pe=setTimeout(()=>{var Le;(Le=p.onAutoClose)==null||Le.call(p,p),Va()},vr.current)),()=>clearTimeout(pe)},[_,m,p,$r,F,F_,Va]),$.useEffect(()=>{p.delete&&Va()},[Va,p.delete]);function r4(){var pe,Le,Ze;return B!=null&&B.loading?$.createElement("div",{className:an(P==null?void 0:P.loader,(pe=p==null?void 0:p.classNames)==null?void 0:pe.loader,"sonner-loader"),"data-visible":$r==="loading"},B.loading):M?$.createElement("div",{className:an(P==null?void 0:P.loader,(Le=p==null?void 0:p.classNames)==null?void 0:Le.loader,"sonner-loader"),"data-visible":$r==="loading"},M):$.createElement(l8,{className:an(P==null?void 0:P.loader,(Ze=p==null?void 0:p.classNames)==null?void 0:Ze.loader),visible:$r==="loading"})}return $.createElement("li",{tabIndex:0,ref:Zr,className:an(N,X5,P==null?void 0:P.toast,(t=p==null?void 0:p.classNames)==null?void 0:t.toast,P==null?void 0:P.default,P==null?void 0:P[$r],(r=p==null?void 0:p.classNames)==null?void 0:r[$r]),"data-sonner-toast":"","data-rich-colors":(n=p.richColors)!=null?n:k,"data-styled":!(p.jsx||p.unstyled||g),"data-mounted":X,"data-promise":!!p.promise,"data-swiped":Ue,"data-removed":K,"data-visible":Yd,"data-y-position":Z5,"data-x-position":e4,"data-index":y,"data-front":Gd,"data-swiping":Q,"data-dismissible":ts,"data-type":$r,"data-invert":t4,"data-swipe-out":be,"data-swipe-direction":ue,"data-expanded":!!(_||C&&X),style:{"--index":y,"--toasts-before":y,"--z-index":S.length-y,"--offset":`${K?it:rs.current}px`,"--initial-height":C?"auto":`${gr}px`,...O,...p.style},onDragEnd:()=>{z(!1),J(null),ns.current=null},onPointerDown:pe=>{Vg||!ts||(Mn.current=new Date,nr(rs.current),pe.target.setPointerCapture(pe.pointerId),pe.target.tagName!=="BUTTON"&&(z(!0),ns.current={x:pe.clientX,y:pe.clientY}))},onPointerUp:()=>{var pe,Le,Ze,en;if(be||!ts)return;ns.current=null;let tn=Number(((pe=Zr.current)==null?void 0:pe.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Ka=Number(((Le=Zr.current)==null?void 0:Le.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Gi=new Date().getTime()-((Ze=Mn.current)==null?void 0:Ze.getTime()),rn=V==="x"?tn:Ka,Ga=Math.abs(rn)/Gi;if(Math.abs(rn)>=O8||Ga>.11){nr(rs.current),(en=p.onDismiss)==null||en.call(p,p),_e(V==="x"?tn>0?"right":"left":Ka>0?"down":"up"),Va(),fe(!0),De(!1);return}z(!1),J(null)},onPointerMove:pe=>{var Le,Ze,en,tn;if(!ns.current||!ts||((Le=window.getSelection())==null?void 0:Le.toString().length)>0)return;let Ka=pe.clientY-ns.current.y,Gi=pe.clientX-ns.current.x,rn=(Ze=e.swipeDirections)!=null?Ze:P8(D);!V&&(Math.abs(Gi)>1||Math.abs(Ka)>1)&&J(Math.abs(Gi)>Math.abs(Ka)?"x":"y");let Ga={x:0,y:0};V==="y"?(rn.includes("top")||rn.includes("bottom"))&&(rn.includes("top")&&Ka<0||rn.includes("bottom")&&Ka>0)&&(Ga.y=Ka):V==="x"&&(rn.includes("left")||rn.includes("right"))&&(rn.includes("left")&&Gi<0||rn.includes("right")&&Gi>0)&&(Ga.x=Gi),(Math.abs(Ga.x)>0||Math.abs(Ga.y)>0)&&De(!0),(en=Zr.current)==null||en.style.setProperty("--swipe-amount-x",`${Ga.x}px`),(tn=Zr.current)==null||tn.style.setProperty("--swipe-amount-y",`${Ga.y}px`)}},Q5&&!p.jsx?$.createElement("button",{"aria-label":U,"data-disabled":Vg,"data-close-button":!0,onClick:Vg||!ts?()=>{}:()=>{var pe;Va(),(pe=p.onDismiss)==null||pe.call(p,p)},className:an(P==null?void 0:P.closeButton,(a=p==null?void 0:p.classNames)==null?void 0:a.closeButton)},(i=B==null?void 0:B.close)!=null?i:h8):null,p.jsx||w.isValidElement(p.title)?p.jsx?p.jsx:typeof p.title=="function"?p.title():p.title:$.createElement($.Fragment,null,$r||p.icon||p.promise?$.createElement("div",{"data-icon":"",className:an(P==null?void 0:P.icon,(o=p==null?void 0:p.classNames)==null?void 0:o.icon)}
vendor: 6,060 bytes, line 68
68,p.promise||p.type==="loading"&&!p.icon?p.icon||r4():null,p.type!=="loading"?p.icon||(B==null?void 0:B[$r])||o8($r):null):null,$.createElement("div",{"data-content":"",className:an(P==null?void 0:P.content,(s=p==null?void 0:p.classNames)==null?void 0:s.content)},$.createElement("div",{"data-title":"",className:an(P==null?void 0:P.title,(l=p==null?void 0:p.classNames)==null?void 0:l.title)},typeof p.title=="function"?p.title():p.title),p.description?$.createElement("div",{"data-description":"",className:an(I,J5,P==null?void 0:P.description,(c=p==null?void 0:p.classNames)==null?void 0:c.description)},typeof p.description=="function"?p.description():p.description):null),w.isValidElement(p.cancel)?p.cancel:p.cancel&&yf(p.cancel)?$.createElement("button",{"data-button":!0,"data-cancel":!0,style:p.cancelButtonStyle||A,onClick:pe=>{var Le,Ze;yf(p.cancel)&&ts&&((Ze=(Le=p.cancel).onClick)==null||Ze.call(Le,pe),Va())},className:an(P==null?void 0:P.cancelButton,(d=p==null?void 0:p.classNames)==null?void 0:d.cancelButton)},p.cancel.label):null,w.isValidElement(p.action)?p.action:p.action&&yf(p.action)?$.createElement("button",{"data-button":!0,"data-action":!0,style:p.actionButtonStyle||T,onClick:pe=>{var Le,Ze;yf(p.action)&&((Ze=(Le=p.action).onClick)==null||Ze.call(Le,pe),!pe.defaultPrevented&&Va())},className:an(P==null?void 0:P.actionButton,(f=p==null?void 0:p.classNames)==null?void 0:f.actionButton)},p.action.label):null))};function hj(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function T8(e,t){let r={};return[e,t].forEach((n,a)=>{let i=a===1,o=i?"--mobile-offset":"--offset",s=i?j8:S8;function l(c){["top","right","bottom","left"].forEach(d=>{r[`${o}-${d}`]=typeof c=="number"?`${c}px`:c})}typeof n=="number"||typeof n=="string"?l(n):typeof n=="object"?["top","right","bottom","left"].forEach(c=>{n[c]===void 0?r[`${o}-${c}`]=s:r[`${o}-${c}`]=typeof n[c]=="number"?`${n[c]}px`:n[c]}):l(s)}),r}var A8=w.forwardRef(function(e,t){let{invert:r,position:n="bottom-right",hotkey:a=["altKey","KeyT"],expand:i,closeButton:o,className:s,offset:l,mobileOffset:c,theme:d="light",richColors:f,duration:h,style:p,visibleToasts:g=_8,toastOptions:m,dir:v=hj(),gap:x=E8,loadingIcon:b,icons:y,containerAriaLabel:S="Notifications",pauseWhenPageIsHidden:_}=e,[j,k]=$.useState([]),E=$.useMemo(()=>Array.from(new Set([n].concat(j.filter(F=>F.position).map(F=>F.position)))),[j,n]),[O,A]=$.useState([]),[T,N]=$.useState(!1),[I,R]=$.useState(!1),[D,L]=$.useState(d!=="system"?d:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),M=$.useRef(null),C=a.join("+").replace(/Key/g,"").replace(/Digit/g,""),P=$.useRef(null),B=$.useRef(!1),U=$.useCallback(F=>{k(V=>{var J;return(J=V.find(ue=>ue.id===F.id))!=null&&J.delete||ir.dismiss(F.id),V.filter(({id:ue})=>ue!==F.id)})},[]);return $.useEffect(()=>ir.subscribe(F=>{if(F.dismiss){k(V=>V.map(J=>J.id===F.id?{...J,delete:!0}:J));return}setTimeout(()=>{zT.flushSync(()=>{k(V=>{let J=V.findIndex(ue=>ue.id===F.id);return J!==-1?[...V.slice(0,J),{...V[J],...F},...V.slice(J+1)]:[F,...V]})})})}),[]),$.useEffect(()=>{if(d!=="system"){L(d);return}if(d==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?L("dark"):L("light")),typeof window>"u")return;let F=window.matchMedia("(prefers-color-scheme: dark)");try{F.addEventListener("change",({matches:V})=>{L(V?"dark":"light")})}catch{F.addListener(({matches:J})=>{try{L(J?"dark":"light")}catch(ue){console.error(ue)}})}},[d]),$.useEffect(()=>{j.length<=1&&N(!1)},[j]),$.useEffect(()=>{let F=V=>{var J,ue;a.every(_e=>V[_e]||V.code===_e)&&(N(!0),(J=M.current)==null||J.focus()),V.code==="Escape"&&(document.activeElement===M.current||(ue=M.current)!=null&&ue.contains(document.activeElement))&&N(!1)};return document.addEventListener("keydown",F),()=>document.removeEventListener("keydown",F)},[a]),$.useEffect(()=>{if(M.current)return()=>{P.current&&(P.current.focus({preventScroll:!0}),P.current=null,B.current=!1)}},[M.current]),$.createElement("section",{ref:t,"aria-label":`${S} ${C}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},E.map((F,V)=>{var J;let[ue,_e]=F.split("-");return j.length?$.createElement("ol",{key:F,dir:v==="auto"?hj():v,tabIndex:-1,ref:M,className:s,"data-sonner-toaster":!0,"data-theme":D,"data-y-position":ue,"data-lifted":T&&j.length>1&&!i,"data-x-position":_e,style:{"--front-toast-height":`${((J=O[0])==null?void 0:J.height)||0}px`,"--width":`${k8}px`,"--gap":`${x}px`,...p,...T8(l,c)},onBlur:X=>{B.current&&!X.currentTarget.contains(X.relatedTarget)&&(B.current=!1,P.current&&(P.current.focus({preventScroll:!0}),P.current=null))},onFocus:X=>{X.target instanceof HTMLElement&&X.target.dataset.dismissible==="false"||B.current||(B.current=!0,P.current=X.relatedTarget)},onMouseEnter:()=>N(!0),onMouseMove:()=>N(!0),onMouseLeave:()=>{I||N(!1)},onDragEnd:()=>N(!1),onPointerDown:X=>{X.target instanceof HTMLElement&&X.target.dataset.dismissible==="false"||R(!0)},onPointerUp:()=>R(!1)},j.filter(X=>!X.position&&V===0||X.position===F).map((X,he)=>{var K,Z;return $.createElement(C8,{key:X.id,icons:y,index:he,toast:X,defaultRichColors:f,duration:(K=m==null?void 0:m.duration)!=null?K:h,className:m==null?void 0:m.className,descriptionClassName:m==null?void 0:m.descriptionClassName,invert:r,visibleToasts:g,closeButton:(Z=m==null?void 0:m.closeButton)!=null?Z:o,interacting:I,position:F,style:m==null?void 0:m.style,unstyled:m==null?void 0:m.unstyled,classNames:m==null?void 0:m.classNames,cancelButtonStyle:m==null?void 0:m.cancelButtonStyle,actionButtonStyle:m==null?void 0:m.actionButtonStyle,removeToast:U,toasts:j.filter(Q=>Q.position==X.position),heights:O.filter(Q=>Q.position==X.position),setHeights:A,expandByDefault:i,gap:x,loadingIcon:b,expanded:T,pauseWhenPageIsHidden:_,swipeDirections:e.swipeDirections})})):null}))});
68const M8=({...e})=>{const{theme:t="system"}=i8();return u.jsx(A8,{theme:t,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...e})},$8=1,R8=1e6;let _v=0;function I8(){return _v=(_v+1)%Number.MAX_SAFE_INTEGER,_v.toString()}const Sv=new Map,pj=e=>{if(Sv.has(e))return;const t=setTimeout(()=>{Sv.delete(e),Zc({type:"REMOVE_TOAST",toastId:e})},R8);Sv.set(e,t)},D8=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,$8)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(r=>r.id===t.toast.id?{...r,...t.toast}:r)};case"DISMISS_TOAST":{const{toastId:r}=t;return r?pj(r):e.toasts.forEach(n=>{pj(n.id)}),{...e,toasts:e.toasts.map(n=>n.id===r||r===void 0?{...n,open:!1}:n)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(r=>r.id!==t.toastId)}}},ch=[];let uh={toasts:[]};function Zc(e){uh=D8(uh,e),ch.forEach(t=>{t(uh)})}function L8({...e}){const t=I8(),r=a=>Zc({type:"UPDATE_TOAST",toast:{...a,id:t}}),n=()=>Zc({type:"DISMISS_TOAST",toastId:t});return Zc({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:a=>{a||n()}}}),{id:t,dismiss:n,update:r}}function B8(){const[e,t]=w.useState(uh);return w.useEffect(()=>(ch.push(t),()=>{const r=ch.indexOf(t);r>-1&&ch.splice(r,1)}),[e]),{...e,toast:L8,dismiss:r=>Zc({type:"DISMISS_TOAST",toastId:r})}}function oe(e,t,{checkForDefaultPrevented:r=!0}={}){return function(a){if(e==null||e(a),r===!1||!a.defaultPrevented)return t==null?void 0:t(a)}}function mj(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function o2(...e){return t=>{let r=!1;const n=e.map(a=>{const i=mj(a,t);return!r&&typeof i=="function"&&(r=!0),i});if(r)return()=>{for(let a=0;a<n.length;a++){const i=n[a];typeof i=="function"?i():mj(e[a],null)}}}}function Se(...e){return w.useCallback(o2(...e),e)}function F8(e,t){const r=w.createContext(t),n=i=>{const{children:o,...s}=i,l=w.useMemo(()=>s,Object.values(s));return u.jsx(r.Provider,{value:l,children:o})};n.displayName=e+"Provider";function a(i){const o=w.useContext(r);if(o)return o;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[n,a]}function Fa(e,t=[]){let r=[];function n(i,o){const s=w.createContext(o),l=r.length;r=[...r,o];const c=f=>{var x;const{scope:h,children:p,...g}=f,m=((x=h==null?void 0:h[e])==null?void 0:x[l])||s,v=w.useMemo(()=>g,Object.values(g));return u.jsx(m.Provider,{value:v,children:p})};c.displayName=i+"Provider";function d(f,h){var m;const p=((m=h==null?void 0:h[e])==null?void 0:m[l])||s,g=w.useContext(p);if(g)return g;if(o!==void 0)return o;throw new Error(`\`${f}\` must be used within \`${i}\``)}return[c,d]}const a=()=>{const i=r.map(o=>w.createContext(o));return function(s){const l=(s==null?void 0:s[e])||i;return w.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return a.scopeName=e,[n,U8(a,...t)]}function U8(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(i){const o=n.reduce((s,{useScope:l,scopeName:c})=>{const f=l(i)[`__scope${c}`];return{...s,...f}},{});return w.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return r.scopeName=t.scopeName,r}function Mo(e){const t=W8(e),r=w.forwardRef((n,a)=>{const{children:i,...o}=n,s=w.Children.toArray(i),l=s.find(q8);if(l){const c=l.props.children,d=s.map(f=>f===l?w.Children.count(c)>1?w.Children.only(null):w.isValidElement(c)?c.props.children:null:f);return u.jsx(t,{...o,ref:a,children:w.isValidElement(c)?w.cloneElement(c,void 0,d):null})}return u.jsx(t,{...o,ref:a,children:i})});return r.displayName=`${e}.Slot`,r}var z8=Mo("Slot");function W8(e){const t=w.forwardRef((r,n)=>{const{children:a,...i}=r;if(w.isValidElement(a)){const o=K8(a),s=V8(i,a.props);return a.type!==w.Fragment&&(s.ref=n?o2(n,o):o),w.cloneElement(a,s)}return w.Children.count(a)>1?w.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var s2=Symbol("radix.slottable");function H8(e){const t=({children:r})=>u.jsx(u.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=s2,t}function q8(e){return w.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===s2}function V8(e,t){const r={...t};for(const n in t){const a=e[n],i=t[n];/^on[A-Z]/.test(n)?a&&i?r[n]=(...s)=>{const l=i(...s);return a(...s),l}:a&&(r[n]=a):n==="style"?r[n]={...a,...i}
vendor: 9,308 bytes, line 68
68:n==="className"&&(r[n]=[a,i].filter(Boolean).join(" "))}return{...e,...r}}function K8(e){var n,a;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function Nw(e){const t=e+"CollectionProvider",[r,n]=Fa(t),[a,i]=r(t,{collectionRef:{current:null},itemMap:new Map}),o=m=>{const{scope:v,children:x}=m,b=$.useRef(null),y=$.useRef(new Map).current;return u.jsx(a,{scope:v,itemMap:y,collectionRef:b,children:x})};o.displayName=t;const s=e+"CollectionSlot",l=Mo(s),c=$.forwardRef((m,v)=>{const{scope:x,children:b}=m,y=i(s,x),S=Se(v,y.collectionRef);return u.jsx(l,{ref:S,children:b})});c.displayName=s;const d=e+"CollectionItemSlot",f="data-radix-collection-item",h=Mo(d),p=$.forwardRef((m,v)=>{const{scope:x,children:b,...y}=m,S=$.useRef(null),_=Se(v,S),j=i(d,x);return $.useEffect(()=>(j.itemMap.set(S,{ref:S,...y}),()=>void j.itemMap.delete(S))),u.jsx(h,{[f]:"",ref:_,children:b})});p.displayName=d;function g(m){const v=i(e+"CollectionConsumer",m);return $.useCallback(()=>{const b=v.collectionRef.current;if(!b)return[];const y=Array.from(b.querySelectorAll(`[${f}]`));return Array.from(v.itemMap.values()).sort((j,k)=>y.indexOf(j.ref.current)-y.indexOf(k.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:o,Slot:c,ItemSlot:p},g,n]}var G8=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ge=G8.reduce((e,t)=>{const r=Mo(`Primitive.${t}`),n=w.forwardRef((a,i)=>{const{asChild:o,...s}=a,l=o?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),u.jsx(l,{...s,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function l2(e,t){e&&Ko.flushSync(()=>e.dispatchEvent(t))}function kn(e){const t=w.useRef(e);return w.useEffect(()=>{t.current=e}),w.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function Y8(e,t=globalThis==null?void 0:globalThis.document){const r=kn(e);w.useEffect(()=>{const n=a=>{a.key==="Escape"&&r(a)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var X8="DismissableLayer",S0="dismissableLayer.update",J8="dismissableLayer.pointerDownOutside",Q8="dismissableLayer.focusOutside",gj,c2=w.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Gl=w.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:a,onFocusOutside:i,onInteractOutside:o,onDismiss:s,...l}=e,c=w.useContext(c2),[d,f]=w.useState(null),h=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,p]=w.useState({}),g=Se(t,k=>f(k)),m=Array.from(c.layers),[v]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),x=m.indexOf(v),b=d?m.indexOf(d):-1,y=c.layersWithOutsidePointerEventsDisabled.size>0,S=b>=x,_=eB(k=>{const E=k.target,O=[...c.branches].some(A=>A.contains(E));!S||O||(a==null||a(k),o==null||o(k),k.defaultPrevented||s==null||s())},h),j=tB(k=>{const E=k.target;[...c.branches].some(A=>A.contains(E))||(i==null||i(k),o==null||o(k),k.defaultPrevented||s==null||s())},h);return Y8(k=>{b===c.layers.size-1&&(n==null||n(k),!k.defaultPrevented&&s&&(k.preventDefault(),s()))},h),w.useEffect(()=>{if(d)return r&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(gj=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(d)),c.layers.add(d),vj(),()=>{r&&c.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=gj)}},[d,h,r,c]),w.useEffect(()=>()=>{d&&(c.layers.delete(d),c.layersWithOutsidePointerEventsDisabled.delete(d),vj())},[d,c]),w.useEffect(()=>{const k=()=>p({});return document.addEventListener(S0,k),()=>document.removeEventListener(S0,k)},[]),u.jsx(ge.div,{...l,ref:g,style:{pointerEvents:y?S?"auto":"none":void 0,...e.style},onFocusCapture:oe(e.onFocusCapture,j.onFocusCapture),onBlurCapture:oe(e.onBlurCapture,j.onBlurCapture),onPointerDownCapture:oe(e.onPointerDownCapture,_.onPointerDownCapture)})});Gl.displayName=X8;var Z8="DismissableLayerBranch",u2=w.forwardRef((e,t)=>{const r=w.useContext(c2),n=w.useRef(null),a=Se(t,n);return w.useEffect(()=>{const i=n.current;if(i)return r.branches.add(i),()=>{r.branches.delete(i)}},[r.branches]),u.jsx(ge.div,{...e,ref:a})});u2.displayName=Z8;function eB(e,t=globalThis==null?void 0:globalThis.document){const r=kn(e),n=w.useRef(!1),a=w.useRef(()=>{});return w.useEffect(()=>{const i=s=>{if(s.target&&!n.current){let l=function(){d2(J8,r,c,{discrete:!0})};const c={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",a.current),a.current=l,t.addEventListener("click",a.current,{once:!0})):l()}else t.removeEventListener("click",a.current);n.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",i),t.removeEventListener("click",a.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function tB(e,t=globalThis==null?void 0:globalThis.document){const r=kn(e),n=w.useRef(!1);return w.useEffect(()=>{const a=i=>{i.target&&!n.current&&d2(Q8,r,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",a),()=>t.removeEventListener("focusin",a)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function vj(){const e=new CustomEvent(S0);document.dispatchEvent(e)}function d2(e,t,r,{discrete:n}){const a=r.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&a.addEventListener(e,t,{once:!0}),n?l2(a,i):a.dispatchEvent(i)}var rB=Gl,nB=u2,Bt=globalThis!=null&&globalThis.document?w.useLayoutEffect:()=>{},aB="Portal",Pd=w.forwardRef((e,t)=>{var s;const{container:r,...n}=e,[a,i]=w.useState(!1);Bt(()=>i(!0),[]);const o=r||a&&((s=globalThis==null?void 0:globalThis.document)==null?void 0:s.body);return o?zT.createPortal(u.jsx(ge.div,{...n,ref:t}),o):null});Pd.displayName=aB;function iB(e,t){return w.useReducer((r,n)=>t[r][n]??r,e)}var Li=e=>{const{present:t,children:r}=e,n=oB(t),a=typeof r=="function"?r({present:n.isPresent}):w.Children.only(r),i=Se(n.ref,sB(a));return typeof r=="function"||n.isPresent?w.cloneElement(a,{ref:i}):null};Li.displayName="Presence";function oB(e){const[t,r]=w.useState(),n=w.useRef(null),a=w.useRef(e),i=w.useRef("none"),o=e?"mounted":"unmounted",[s,l]=iB(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return w.useEffect(()=>{const c=bf(n.current);i.current=s==="mounted"?c:"none"},[s]),Bt(()=>{const c=n.current,d=a.current;if(d!==e){const h=i.current,p=bf(c);e?l("MOUNT"):p==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(d&&h!==p?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,l]),Bt(()=>{if(t){let c;const d=t.ownerDocument.defaultView??window,f=p=>{const m=bf(n.current).includes(p.animationName);if(p.target===t&&m&&(l("ANIMATION_END"),!a.current)){const v=t.style.animationFillMode;t.style.animationFillMode="forwards",c=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},h=p=>{p.target===t&&(i.current=bf(n.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{d.clearTimeout(c),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:w.useCallback(c=>{n.current=c?getComputedStyle(c):null,r(c)},[])}}function bf(e){return(e==null?void 0:e.animationName)||"none"}function sB(e){var n,a;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var lB=Tx[" useInsertionEffect ".trim().toString()]||Bt;function $o({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[a,i,o]=cB({defaultProp:t,onChange:r}),s=e!==void 0,l=s?e:a;{const d=w.useRef(e!==void 0);w.useEffect(()=>{const f=d.current;f!==s&&console.warn(`${n} is changing from ${f?"controlled":"uncontrolled"} to ${s?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),d.current=s},[s,n])}const c=w.useCallback(d=>{var f;if(s){const h=uB(d)?d(e):d;h!==e&&((f=o.current)==null||f.call(o,h))}else i(d)},[s,e,i,o]);return[l,c]}function cB({defaultProp:e,onChange:t}){const[r,n]=w.useState(e),a=w.useRef(r),i=w.useRef(t);return lB(()=>{i.current=t},[t]),w.useEffect(()=>{var o;a.current!==r&&((o=i.current)==null||o.call(i,r),a.current=r)},[r,a]),[r,n,i]}function uB(e){return typeof e=="function"}var f2=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),dB="VisuallyHidden",km=w.forwardRef((e,t)=>
68u.jsx(ge.span,{...e,ref:t,style:{...f2,...e.style}}));km.displayName=dB;var fB=km,Pw="ToastProvider",[Cw,hB,pB]=Nw("Toast"),[h2,u_e]=Fa("Toast",[pB]),[mB,Em]=h2(Pw),p2=e=>{const{__scopeToast:t,label:r="Notification",duration:n=5e3,swipeDirection:a="right",swipeThreshold:i=50,children:o}=e,[s,l]=w.useState(null),[c,d]=w.useState(0),f=w.useRef(!1),h=w.useRef(!1);return r.trim()||console.error(`Invalid prop \`label\` supplied to \`${Pw}\`. Expected non-empty \`string\`.`),u.jsx(Cw.Provider,{scope:t,children:u.jsx(mB,{scope:t,label:r,duration:n,swipeDirection:a,swipeThreshold:i,toastCount:c,viewport:s,onViewportChange:l,onToastAdd:w.useCallback(()=>d(p=>p+1),[]),onToastRemove:w.useCallback(()=>d(p=>p-1),[]),isFocusedToastEscapeKeyDownRef:f,isClosePausedRef:h,children:o})})};p2.displayName=Pw;var m2="ToastViewport",gB=["F8"],j0="toast.viewportPause",k0="toast.viewportResume",g2=w.forwardRef((e,t)=>{const{__scopeToast:r,hotkey:n=gB,label:a="Notifications ({hotkey})",...i}=e,o=Em(m2,r),s=hB(r),l=w.useRef(null),c=w.useRef(null),d=w.useRef(null),f=w.useRef(null),h=Se(t,f,o.onViewportChange),p=n.join("+").replace(/Key/g,"").replace(/Digit/g,""),g=o.toastCount>0;w.useEffect(()=>{const v=x=>{var y;n.length!==0&&n.every(S=>x[S]||x.code===S)&&((y=f.current)==null||y.focus())};return document.addEventListener("keydown",v),()=>document.removeEventListener("keydown",v)},[n]),w.useEffect(()=>{const v=l.current,x=f.current;if(g&&v&&x){const b=()=>{if(!o.isClosePausedRef.current){const j=new CustomEvent(j0);x.dispatchEvent(j),o.isClosePausedRef.current=!0}},y=()=>{if(o.isClosePausedRef.current){const j=new CustomEvent(k0);x.dispatchEvent(j),o.isClosePausedRef.current=!1}},S=j=>{!v.contains(j.relatedTarget)&&y()},_=()=>{v.contains(document.activeElement)||y()};return v.addEventListener("focusin",b),v.addEventListener("focusout",S),v.addEventListener("pointermove",b),v.addEventListener("pointerleave",_),window.addEventListener("blur",b),window.addEventListener("focus",y),()=>{v.removeEventListener("focusin",b),v.removeEventListener("focusout",S),v.removeEventListener("pointermove",b),v.removeEventListener("pointerleave",_),window.removeEventListener("blur",b),window.removeEventListener("focus",y)}}},[g,o.isClosePausedRef]);const m=w.useCallback(({tabbingDirection:v})=>{const b=s().map(y=>{const S=y.ref.current,_=[S,...PB(S)];return v==="forwards"?_:_.reverse()});return(v==="forwards"?b.reverse():b).flat()},[s]);return w.useEffect(()=>{const v=f.current;if(v){const x=b=>{var _,j,k;const y=b.altKey||b.ctrlKey||b.metaKey;if(b.key==="Tab"&&!y){const E=document.activeElement,O=b.shiftKey;if(b.target===v&&O){(_=c.current)==null||_.focus();return}const N=m({tabbingDirection:O?"backwards":"forwards"}),I=N.findIndex(R=>R===E);jv(N.slice(I+1))?b.preventDefault():O?(j=c.current)==null||j.focus():(k=d.current)==null||k.focus()}};return v.addEventListener("keydown",x),()=>v.removeEventListener("keydown",x)}},[s,m]),u.jsxs(nB,{ref:l,role:"region","aria-label":a.replace("{hotkey}",p),tabIndex:-1,style:{pointerEvents:g?void 0:"none"},children:[g&&u.jsx(E0,{ref:c,onFocusFromOutsideViewport:()=>{const v=m({tabbingDirection:"forwards"});jv(v)}}),u.jsx(Cw.Slot,{scope:r,children:u.jsx(ge.ol,{tabIndex:-1,...i,ref:h})}),g&&u.jsx(E0,{ref:d,onFocusFromOutsideViewport:()=>{const v=m({tabbingDirection:"backwards"});jv(v)}})]})});g2.displayName=m2;var v2="ToastFocusProxy",E0=w.forwardRef((e,t)=>{const{__scopeToast:r,onFocusFromOutsideViewport:n,...a}=e,i=Em(v2,r);return u.jsx(km,{"aria-hidden":!0,tabIndex:0,...a,ref:t,style:{position:"fixed"},onFocus:o=>{var c;const s=o.relatedTarget;!((c=i.viewport)!=null&&c.contains(s))&&n()}})});E0.displayName=v2;var Cd="Toast",vB="toast.swipeStart",yB="toast.swipeMove",bB="toast.swipeCancel",xB="toast.swipeEnd",y2=w.forwardRef((e,t)=>{const{forceMount:r,open:n,defaultOpen:a,onOpenChange:i,...o}=e,[s,l]=$o({prop:n,defaultProp:a??!0,onChange:i,caller:Cd});return u.jsx(Li,{present:r||s,children:u.jsx(SB,{open:s,...o,ref:t,onClose:()=>l(!1),onPause:kn(e.onPause),onResume:kn(e.onResume),onSwipeStart:oe(e.onSwipeStart,c=>{c.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:oe(e.onSwipeMove,c=>{const{x:d,y:f}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","move"),c.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${d}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${f}px`)}),onSwipeCancel:oe(e.onSwipeCancel,c=>{c.currentTarget.setAttribute("data-swipe","cancel"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:oe(e.onSwipeEnd,c=>{const{x:d,y:f}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","end"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${d}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${f}px`),l(!1)})})})});y2.displayName=Cd;var[wB,_B]=h2(Cd,{onClose(){}}),SB=w.forwardRef((e,t)=>
68{const{__scopeToast:r,type:n="foreground",duration:a,open:i,onClose:o,onEscapeKeyDown:s,onPause:l,onResume:c,onSwipeStart:d,onSwipeMove:f,onSwipeCancel:h,onSwipeEnd:p,...g}=e,m=Em(Cd,r),[v,x]=w.useState(null),b=Se(t,R=>x(R)),y=w.useRef(null),S=w.useRef(null),_=a||m.duration,j=w.useRef(0),k=w.useRef(_),E=w.useRef(0),{onToastAdd:O,onToastRemove:A}=m,T=kn(()=>{var D;(v==null?void 0:v.contains(document.activeElement))&&((D=m.viewport)==null||D.focus()),o()}),N=w.useCallback(R=>{!R||R===1/0||(window.clearTimeout(E.current),j.current=new Date().getTime(),E.current=window.setTimeout(T,R))},[T]);w.useEffect(()=>{const R=m.viewport;if(R){const D=()=>{N(k.current),c==null||c()},L=()=>{const M=new Date().getTime()-j.current;k.current=k.current-M,window.clearTimeout(E.current),l==null||l()};return R.addEventListener(j0,L),R.addEventListener(k0,D),()=>{R.removeEventListener(j0,L),R.removeEventListener(k0,D)}}},[m.viewport,_,l,c,N]),w.useEffect(()=>{i&&!m.isClosePausedRef.current&&N(_)},[i,_,m.isClosePausedRef,N]),w.useEffect(()=>(O(),()=>A()),[O,A]);const I=w.useMemo(()=>v?k2(v):null,[v]);return m.viewport?u.jsxs(u.Fragment,{children:[I&&u.jsx(jB,{__scopeToast:r,role:"status","aria-live":n==="foreground"?"assertive":"polite","aria-atomic":!0,children:I}),u.jsx(wB,{scope:r,onClose:T,children:Ko.createPortal(u.jsx(Cw.ItemSlot,{scope:r,children:u.jsx(rB,{asChild:!0,onEscapeKeyDown:oe(s,()=>{m.isFocusedToastEscapeKeyDownRef.current||T(),m.isFocusedToastEscapeKeyDownRef.current=!1}),children:u.jsx(ge.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":m.swipeDirection,...g,ref:b,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:oe(e.onKeyDown,R=>{R.key==="Escape"&&(s==null||s(R.nativeEvent),R.nativeEvent.defaultPrevented||(m.isFocusedToastEscapeKeyDownRef.current=!0,T()))}),onPointerDown:oe(e.onPointerDown,R=>{R.button===0&&(y.current={x:R.clientX,y:R.clientY})}),onPointerMove:oe(e.onPointerMove,R=>{if(!y.current)return;const D=R.clientX-y.current.x,L=R.clientY-y.current.y,M=!!S.current,C=["left","right"].includes(m.swipeDirection),P=["left","up"].includes(m.swipeDirection)?Math.min:Math.max,B=C?P(0,D):0,U=C?0:P(0,L),F=R.pointerType==="touch"?10:2,V={x:B,y:U},J={originalEvent:R,delta:V};M?(S.current=V,xf(yB,f,J,{discrete:!1})):yj(V,m.swipeDirection,F)?(S.current=V,xf(vB,d,J,{discrete:!1}),R.target.setPointerCapture(R.pointerId)):(Math.abs(D)>F||Math.abs(L)>F)&&(y.current=null)}),onPointerUp:oe(e.onPointerUp,R=>{const D=S.current,L=R.target;if(L.hasPointerCapture(R.pointerId)&&L.releasePointerCapture(R.pointerId),S.current=null,y.current=null,D){const M=R.currentTarget,C={originalEvent:R,delta:D};yj(D,m.swipeDirection,m.swipeThreshold)?xf(xB,p,C,{discrete:!0}):xf(bB,h,C,{discrete:!0}),M.addEventListener("click",P=>P.preventDefault(),{once:!0})}})})})}),m.viewport)})]}):null}),jB=e=>{const{__scopeToast:t,children:r,...n}=e,a=Em(Cd,t),[i,o]=w.useState(!1),[s,l]=w.useState(!1);return OB(()=>o(!0)),w.useEffect(()=>{const c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),s?null:u.jsx(Pd,{asChild:!0,children:u.jsx(km,{...n,children:i&&u.jsxs(u.Fragment,{children:[a.label," ",r]})})})},kB="ToastTitle",b2=w.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return u.jsx(ge.div,{...n,ref:t})});b2.displayName=kB;var EB="ToastDescription",x2=w.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return u.jsx(ge.div,{...n,ref:t})});x2.displayName=EB;var w2="ToastAction",_2=w.forwardRef((e,t)=>{const{altText:r,...n}=e;return r.trim()?u.jsx(j2,{altText:r,asChild:!0,children:u.jsx(Tw,{...n,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${w2}\`. Expected non-empty \`string\`.`),null)});_2.displayName=w2;var S2="ToastClose",Tw=w.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e,a=_B(S2,r);return u.jsx(j2,{asChild:!0,children:u.jsx(ge.button,{type:"button",...n,ref:t,onClick:oe(e.onClick,a.onClose)})})});Tw.displayName=S2;var j2=w.forwardRef((e,t)=>{const{__scopeToast:r,altText:n,...a}=e;return u.jsx(ge.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0,...a,ref:t})});function k2(e){const t=[];
vendor: 4,279 bytes, lines 68-93
68return Array.from(e.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&t.push(n.textContent),NB(n)){const a=n.ariaHidden||n.hidden||n.style.display==="none",i=n.dataset.radixToastAnnounceExclude==="";if(!a)if(i){const o=n.dataset.radixToastAnnounceAlt;o&&t.push(o)}else t.push(...k2(n))}}),t}function xf(e,t,r,{discrete:n}){const a=r.originalEvent.currentTarget,i=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:r});t&&a.addEventListener(e,t,{once:!0}),n?l2(a,i):a.dispatchEvent(i)}var yj=(e,t,r=0)=>{const n=Math.abs(e.x),a=Math.abs(e.y),i=n>a;return t==="left"||t==="right"?i&&n>r:!i&&a>r};function OB(e=()=>{}){const t=kn(e);Bt(()=>{let r=0,n=0;return r=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(n)}},[t])}function NB(e){return e.nodeType===e.ELEMENT_NODE}function PB(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const a=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||a?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function jv(e){const t=document.activeElement;return e.some(r=>r===t?!0:(r.focus(),document.activeElement!==t))}var CB=p2,E2=g2,O2=y2,N2=b2,P2=x2,C2=_2,T2=Tw;function A2(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(r=A2(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function ke(){for(var e,t,r=0,n="",a=arguments.length;r<a;r++)(e=arguments[r])&&(t=A2(e))&&(n&&(n+=" "),n+=t);return n}const bj=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,xj=ke,Om=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return xj(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:a,defaultVariants:i}=t,o=Object.keys(a).map(c=>{const d=r==null?void 0:r[c],f=i==null?void 0:i[c];if(d===null)return null;const h=bj(d)||bj(f);return a[c][h]}),s=r&&Object.entries(r).reduce((c,d)=>{let[f,h]=d;return h===void 0||(c[f]=h),c},{}),l=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((c,d)=>{let{class:f,className:h,...p}=d;return Object.entries(p).every(g=>{let[m,v]=g;return Array.isArray(v)?v.includes({...i,...s}[m]):{...i,...s}[m]===v})?[...c,f,h]:c},[]);return xj(e,o,l,r==null?void 0:r.class,r==null?void 0:r.className)};/**
69 * @license lucide-react v0.462.0 - ISC
70 *
71 * This source code is licensed under the ISC license.
72 * See the LICENSE file in the root directory of this source tree.
73 */const TB=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),M2=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim();/**
74 * @license lucide-react v0.462.0 - ISC
75 *
76 * This source code is licensed under the ISC license.
77 * See the LICENSE file in the root directory of this source tree.
78 */var AB={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
79 * @license lucide-react v0.462.0 - ISC
80 *
81 * This source code is licensed under the ISC license.
82 * See the LICENSE file in the root directory of this source tree.
83 */const MB=w.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:a="",children:i,iconNode:o,...s},l)=>w.createElement("svg",{ref:l,...AB,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:M2("lucide",a),...s},[...o.map(([c,d])=>w.createElement(c,d)),...Array.isArray(i)?i:[i]]));/**
84 * @license lucide-react v0.462.0 - ISC
85 *
86 * This source code is licensed under the ISC license.
87 * See the LICENSE file in the root directory of this source tree.
88 */const ee=(e,t)=>{const r=w.forwardRef(({className:n,...a},i)=>w.createElement(MB,{ref:i,iconNode:t,className:M2(`lucide-${TB(e)}`,n),...a}));return r.displayName=`${e}`,r};/**
89 * @license lucide-react v0.462.0 - ISC
90 *
91 * This source code is licensed under the ISC license.
92 * See the LICENSE file in the root directory of this source tree.
93 */const $B=ee("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l
93-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/**
94 * @license lucide-react v0.462.0 - ISC
95 *
96 * This source code is licensed under the ISC license.
97 * See the LICENSE file in the root directory of this source tree.
98 */const Nm=ee("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
99 * @license lucide-react v0.462.0 - ISC
100 *
101 * This source code is licensed under the ISC license.
102 * See the LICENSE file in the root directory of this source tree.
103 */const RB=ee("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
104 * @license lucide-react v0.462.0 - ISC
105 *
106 * This source code is licensed under the ISC license.
107 * See the LICENSE file in the root directory of this source tree.
108 */const Nu=ee("ArrowUpRight",[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]);/**
109 * @license lucide-react v0.462.0 - ISC
110 *
111 * This source code is licensed under the ISC license.
112 * See the LICENSE file in the root directory of this source tree.
113 */const IB=ee("Ban",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m4.9 4.9 14.2 14.2",key:"1m5liu"}]]);/**
114 * @license lucide-react v0.462.0 - ISC
115 *
116 * This source code is licensed under the ISC license.
117 * See the LICENSE file in the root directory of this source tree.
118 */const Go=ee("BookOpen",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]);/**
119 * @license lucide-react v0.462.0 - ISC
120 *
121 * This source code is licensed under the ISC license.
122 * See the LICENSE file in the root directory of this source tree.
123 */const $2=ee("Brain",[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z",key:"ep3f8r"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4",key:"1p4c4q"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}]]);/**
124 * @license lucide-react v0.462.0 - ISC
125 *
126 * This source code is licensed under the ISC license.
127 * See the LICENSE file in the root directory of this source tree.
128 */const Td=ee("CalendarDays",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 18h.01",key:"lrp35t"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M16 18h.01",key:"kzsmim"}]]);/**
129 * @license lucide-react v0.462.0 - ISC
130 *
131 * This source code is licensed under the ISC license.
132 * See the LICENSE file in the root directory of this source tree.
133 */const R2=ee("ChartColumn",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);/**
134 * @license lucide-react v0.462.0 - ISC
135 *
136 * This source code is licensed under the ISC license.
137 * See the LICENSE file in the root directory of this source tree.
138 */const Pm=ee("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
139 * @license lucide-react v0.462.0 - ISC
140 *
141 * This source code is licensed under the ISC license.
142 * See the LICENSE file in the root directory of this source tree.
143 */const Ad=ee("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
144 * @license lucide-react v0.462.0 - ISC
145 *
146 * This source code is licensed under the ISC license.
147 * See the LICENSE file in the root directory of this source tree.
148 */const Cm=ee("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
149 * @license lucide-react v0.462.0 - ISC
150 *
151 * This source code is licensed under the ISC license.
152 * See the LICENSE file in the root directory of this source tree.
153 */const Tm=ee("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
154 * @license lucide-react v0.462.0 - ISC
155 *
156 * This source code is licensed under the ISC license.
157 * See the LICENSE file in the root directory of this source tree.
158 */const I2=ee("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
159 * @license lucide-react v0.462.0 - ISC
160 *
161 * This source code is licensed under the ISC license.
162 * See the LICENSE file in the root directory of this source tree.
163 */const DB=ee("ChevronsLeft",[["path",{d:"m11 17-5-5 5-5",key:"13zhaf"}],["path",{d:"m18 17-5-5 5-5",key:"h8a8et"}]]);/**
164 * @license lucide-react v0.462.0 - ISC
165 *
166 * This source code is licensed under the ISC license.
167 * See the LICENSE file in the root directory of this source tree.
168 */const LB=ee("ChevronsRight",[["path",{d:"m6 17 5-5-5-5",key:"xnjwq"}],["path",{d:"m13 17 5-5-5-5",key:"17xmmf"}]]);/**
169 * @license lucide-react v0.462.0 - ISC
170 *
171 * This source code is licensed under the ISC license.
172 * See the LICENSE file in the root directory of this source tree.
173 */const Md=ee("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
174 * @license lucide-react v0.462.0 - ISC
175 *
176 * This source code is licensed under the ISC license.
177 * See the LICENSE file in the root directory of this source tree.
178 */const BB=ee("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
179 * @license lucide-react v0.462.0 - ISC
180 *
181 * This source code is licensed under the ISC license.
182 * See the LICENSE file in the root directory of this source tree.
183 */const D2=ee("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
184 * @license lucide-react v0.462.0 - ISC
185 *
186 * This source code is licensed under the ISC license.
187 * See the LICENSE file in the root directory of this source tree.
188 */const FB=ee("ClipboardList",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"M12 11h4",key:"1jrz19"}],["path",{d:"M12 16h4",key:"n85exb"}],["path",{d:"M8 11h.01",key:"1dfujw"}],["path",{d:"M8 16h.01",key:"18s6g9"}]]);/**
189 * @license lucide-react v0.462.0 - ISC
190 *
191 * This source code is licensed under the ISC license.
192 * See the LICENSE file in the root directory of this source tree.
193 */const UB=ee("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
194 * @license lucide-react v0.462.0 - ISC
195 *
196 * This source code is licensed under the ISC license.
197 * See the LICENSE file in the root directory of this source tree.
198 */const L2=ee("Coffee",[["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M14 2v2",key:"6buw04"}],["path",{d:"M16 8a1 1 0 0 1 1 1v8a4 4 0 0 1-4 4H7a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1h14a4 4 0 1 1 0 8h-1",key:"pwadti"}],["path",{d:"M6 2v2",key:"colzsn"}]]);/**
199 * @license lucide-react v0.462.0 - ISC
200 *
201 * This source code is licensed under the ISC license.
202 * See the LICENSE file in the root directory of this source tree.
203 */const gl=ee("Crown",[["path",{d:"M11.562 3.266a.5.5 0 0 1 .876 0L15.39 8.87a1 1 0 0 0 1.516.294L21.183 5.5a.5.5 0 0 1 .798.519l-2.834 10.246a1 1 0 0 1-.956.734H5.81a1 1 0 0 1-.957-.734L2.02 6.02a.5.5 0 0 1 .798-.519l4.276 3.664a1 1 0 0 0 1.516-.294z",key:"1vdc57"}],["path",{d:"M5 21h14",key:"11awu3"}]]);/**
204 * @license lucide-react v0.462.0 - ISC
205 *
206 * This source code is licensed under the ISC license.
207 * See the LICENSE file in the root directory of this source tree.
208 */const zB=ee("DollarSign",[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]]);/**
209 * @license lucide-react v0.462.0 - ISC
210 *
211 * This source code is licensed under the ISC license.
212 * See the LICENSE file in the root directory of this source tree.
213 */const WB=ee("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
214 * @license lucide-react v0.462.0 - ISC
215 *
216 * This source code is licensed under the ISC license.
217 * See the LICENSE file in the root directory of this source tree.
218 */const B2=ee("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
219 * @license lucide-react v0.462.0 - ISC
220 *
221 * This source code is licensed under the ISC license.
222 * See the LICENSE file in the root directory of this source tree.
223 */const Yo=ee("Flame",[["path",{d:"M8.5 14.5A2.5 2.5 0 0 0 11 12c0-1.38-.5-2-1-3-1.072-2.143-.224-4.054 2-6 .5 2.5 2 4.9 4 6.5 2 1.6 3 3.5 3 5.5a7 7 0 1 1-14 0c0-1.153.433-2.294 1-3a2.5 2.5 0 0 0 2.5 2.5z",key:"96xj49"}]]);/**
224 * @license lucide-react v0.462.0 - ISC
225 *
226 * This source code is licensed under the ISC license.
227 * See the LICENSE file in the root directory of this source tree.
228 */const Am=ee("Gift",[["rect",{x:"3",y:"8",width:"18",height:"4",rx:"1",key:"bkv52"}],["path",{d:"M12 8v13",key:"1c76mn"}],["path",{d:"M19 12v7a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-7",key:"6wjy6b"}],["path",{d:"M7.5 8a2.5 2.5 0 0 1 0-5A4.8 8 0 0 1 12 8a4.8 8 0 0 1 4.5-5 2.5 2.5 0 0 1 0 5",key:"1ihvrl"}]]);/**
229 * @license lucide-react v0.462.0 - ISC
230 *
231 * This source code is licensed under the ISC license.
232 * See the LICENSE file in the root directory of this source tree.
233 */const F2=ee("GraduationCap",[["path",{d:"M21.42 10.922a1 1 0 0 0-.019-1.838L12.83 5.18a2 2 0 0 0-1.66 0L2.6 9.08a1 1 0 0 0 0 1.832l8.57 3.908a2 2 0 0 0 1.66 0z",key:"j76jl0"}],["path",{d:"M22 10v6",key:"1lu8f3"}],["path",{d:"M6 12.5V16a6 3 0 0 0 12 0v-3.5",key:"1r8lef"}]]);/**
234 * @license lucide-react v0.462.0 - ISC
235 *
236 * This source code is licensed under the ISC license.
237 * See the LICENSE file in the root directory of this source tree.
238 */const HB=ee("History",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);/**
239 * @license lucide-react v0.462.0 - ISC
240 *
241 * This source code is licensed under the ISC license.
242 * See the LICENSE file in the root directory of this source tree.
243 */const qB=ee("House",[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"1d0kgt"}]]);/**
244 * @license lucide-react v0.462.0 - ISC
245 *
246 * This source code is licensed under the ISC license.
247 * See the LICENSE file in the root directory of this source tree.
248 */const VB=ee("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
249 * @license lucide-react v0.462.0 - ISC
250 *
251 * This source code is licensed under the ISC license.
252 * See the LICENSE file in the root directory of this source tree.
253 */const KB=ee("LayoutDashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]);/**
254 * @license lucide-react v0.462.0 - ISC
255 *
256 * This source code is licensed under the ISC license.
257 * See the LICENSE file in the root directory of this source tree.
258 */const Aw=ee("ListChecks",[["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}],["path",{d:"M13 6h8",key:"15sg57"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 18h8",key:"oe0vm4"}]]);/**
259 * @license lucide-react v0.462.0 - ISC
260 *
261 * This source code is licensed under the ISC license.
262 * See the LICENSE file in the root directory of this source tree.
263 */const Qe=ee("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
264 * @license lucide-react v0.462.0 - ISC
265 *
266 * This source code is licensed under the ISC license.
267 * See the LICENSE file in the root directory of this source tree.
268 */const O0=ee("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);/**
269 * @license lucide-react v0.462.0 - ISC
270 *
271 * This source code is licensed under the ISC license.
272 * See the LICENSE file in the root directory of this source tree.
273 */const Wh=ee("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);/**
274 * @license lucide-react v0.462.0 - ISC
275 *
276 * This source code is licensed under the ISC license.
277 * See the LICENSE file in the root directory of this source tree.
278 */const Hh=ee("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/**
279 * @license lucide-react v0.462.0 - ISC
280 *
281 * This source code is licensed under the ISC license.
282 * See the LICENSE file in the root directory of this source tree.
283 */const GB=ee("Package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["path",{d:"m3.3 7 7.703 4.734a2 2 0 0 0 1.994 0L20.7 7",key:"yx3hmr"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]);/**
284 * @license lucide-react v0.462.0 - ISC
285 *
286 * This source code is licensed under the ISC license.
287 * See the LICENSE file in the root directory of this source tree.
288 */const U2=ee("Pause",[["rect",{x:"14",y:"4",width:"4",height:"16",rx:"1",key:"zuxfzm"}],["rect",{x:"6",y:"4",width:"4",height:"16",rx:"1",key:"1okwgv"}]]);/**
289 * @license lucide-react v0.462.0 - ISC
290 *
291 * This source code is licensed under the ISC license.
292 * See the LICENSE file in the root directory of this source tree.
293 */const Mw=ee("PenTool",[["path",{d:"M15.707 21.293a1 1 0 0 1-1.414 0l-1.586-1.586a1 1 0 0 1 0-1.414l5.586-5.586a1 1 0 0 1 1.414 0l1.586 1.586a1 1 0 0 1 0 1.414z",key:"nt11vn"}],["path",{d:"m18 13-1.375-6.874a1 1 0 0 0-.746-.776L3.235 2.028a1 1 0 0 0-1.207 1.207L5.35 15.879a1 1 0 0 0 .776.746L13 18",key:"15qc1e"}],["path",{d:"m2.3 2.3 7.286 7.286",key:"1wuzzi"}],["circle",{cx:"11",cy:"11",r:"2",key:"xmgehs"}]]);/**
294 * @license lucide-react v0.462.0 - ISC
295 *
296 * This source code is licensed under the ISC license.
297 * See the LICENSE file in the root directory of this source tree.
298 */const z2=ee("Pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);/**
299 * @license lucide-react v0.462.0 - ISC
300 *
301 * This source code is licensed under the ISC license.
302 * See the LICENSE file in the root directory of this source tree.
303 */const W2=ee("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
304 * @license lucide-react v0.462.0 - ISC
305 *
306 * This source code is licensed under the ISC license.
307 * See the LICENSE file in the root directory of this source tree.
308 */const $w=ee("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
309 * @license lucide-react v0.462.0 - ISC
310 *
311 * This source code is licensed under the ISC license.
312 * See the LICENSE file in the root directory of this source tree.
313 */const H2=ee("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/**
314 * @license lucide-react v0.462.0 - ISC
315 *
316 * This source code is licensed under the ISC license.
317 * See the LICENSE file in the root directory of this source tree.
318 */const YB=ee("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);/**
319 * @license lucide-react v0.462.0 - ISC
320 *
321 * This source code is licensed under the ISC license.
322 * See the LICENSE file in the root directory of this source tree.
323 */const Rw=ee("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
324 * @license lucide-react v0.462.0 - ISC
325 *
326 * This source code is licensed under the ISC license.
327 * See the LICENSE file in the root directory of this source tree.
328 */const XB=ee("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
329 * @license lucide-react v0.462.0 - ISC
330 *
331 * This source code is licensed under the ISC license.
332 * See the LICENSE file in the root directory of this source tree.
333 */const wj=ee("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",ke
333y:"oel41y"}]]);/**
334 * @license lucide-react v0.462.0 - ISC
335 *
336 * This source code is licensed under the ISC license.
337 * See the LICENSE file in the root directory of this source tree.
338 */const JB=ee("ShoppingBag",[["path",{d:"M6 2 3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4Z",key:"hou9p0"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M16 10a4 4 0 0 1-8 0",key:"1ltviw"}]]);/**
339 * @license lucide-react v0.462.0 - ISC
340 *
341 * This source code is licensed under the ISC license.
342 * See the LICENSE file in the root directory of this source tree.
343 */const QB=ee("ShoppingCart",[["circle",{cx:"8",cy:"21",r:"1",key:"jimo8o"}],["circle",{cx:"19",cy:"21",r:"1",key:"13723u"}],["path",{d:"M2.05 2.05h2l2.66 12.42a2 2 0 0 0 2 1.58h9.78a2 2 0 0 0 1.95-1.57l1.65-7.43H5.12",key:"9zh506"}]]);/**
344 * @license lucide-react v0.462.0 - ISC
345 *
346 * This source code is licensed under the ISC license.
347 * See the LICENSE file in the root directory of this source tree.
348 */const ZB=ee("SkipForward",[["polygon",{points:"5 4 15 12 5 20 5 4",key:"16p6eg"}],["line",{x1:"19",x2:"19",y1:"5",y2:"19",key:"futhcm"}]]);/**
349 * @license lucide-react v0.462.0 - ISC
350 *
351 * This source code is licensed under the ISC license.
352 * See the LICENSE file in the root directory of this source tree.
353 */const eF=ee("Skull",[["path",{d:"m12.5 17-.5-1-.5 1h1z",key:"3me087"}],["path",{d:"M15 22a1 1 0 0 0 1-1v-1a2 2 0 0 0 1.56-3.25 8 8 0 1 0-11.12 0A2 2 0 0 0 8 20v1a1 1 0 0 0 1 1z",key:"1o5pge"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}]]);/**
354 * @license lucide-react v0.462.0 - ISC
355 *
356 * This source code is licensed under the ISC license.
357 * See the LICENSE file in the root directory of this source tree.
358 */const Ta=ee("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/**
359 * @license lucide-react v0.462.0 - ISC
360 *
361 * This source code is licensed under the ISC license.
362 * See the LICENSE file in the root directory of this source tree.
363 */const N0=ee("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);/**
364 * @license lucide-react v0.462.0 - ISC
365 *
366 * This source code is licensed under the ISC license.
367 * See the LICENSE file in the root directory of this source tree.
368 */const qh=ee("Target",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]]);/**
369 * @license lucide-react v0.462.0 - ISC
370 *
371 * This source code is licensed under the ISC license.
372 * See the LICENSE file in the root directory of this source tree.
373 */const Iw=ee("Timer",[["line",{x1:"10",x2:"14",y1:"2",y2:"2",key:"14vaq8"}],["line",{x1:"12",x2:"15",y1:"14",y2:"11",key:"17fdiu"}],["circle",{cx:"12",cy:"14",r:"8",key:"1e1u0o"}]]);/**
374 * @license lucide-react v0.462.0 - ISC
375 *
376 * This source code is licensed under the ISC license.
377 * See the LICENSE file in the root directory of this source tree.
378 */const q2=ee("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
379 * @license lucide-react v0.462.0 - ISC
380 *
381 * This source code is licensed under the ISC license.
382 * See the LICENSE file in the root directory of this source tree.
383 */const tF=ee("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]]);/**
384 * @license lucide-react v0.462.0 - ISC
385 *
386 * This source code is licensed under the ISC license.
387 * See the LICENSE file in the root directory of this source tree.
388 */const V2=ee("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
389 * @license lucide-react v0.462.0 - ISC
390 *
391 * This source code is licensed under the ISC license.
392 * See the LICENSE file in the root directory of this source tree.
393 */const K2=ee("Trophy",[["path",{d:"M6 9H4.5a2.5 2.5 0 0 1 0-5H6",key:"17hqa7"}],["path",{d:"M18 9h1.5a2.5 2.5 0 0 0 0-5H18",key:"lmptdp"}],["path",{d:"M4 22h16",key:"57wxv0"}
vendor: 8,701 bytes, lines 393-423
393],["path",{d:"M10 14.66V17c0 .55-.47.98-.97 1.21C7.85 18.75 7 20.24 7 22",key:"1nw9bq"}],["path",{d:"M14 14.66V17c0 .55.47.98.97 1.21C16.15 18.75 17 20.24 17 22",key:"1np0yb"}],["path",{d:"M18 2H6v7a6 6 0 0 0 12 0V2Z",key:"u46fv3"}]]);/**
394 * @license lucide-react v0.462.0 - ISC
395 *
396 * This source code is licensed under the ISC license.
397 * See the LICENSE file in the root directory of this source tree.
398 */const rF=ee("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/**
399 * @license lucide-react v0.462.0 - ISC
400 *
401 * This source code is licensed under the ISC license.
402 * See the LICENSE file in the root directory of this source tree.
403 */const nF=ee("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/**
404 * @license lucide-react v0.462.0 - ISC
405 *
406 * This source code is licensed under the ISC license.
407 * See the LICENSE file in the root directory of this source tree.
408 */const G2=ee("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/**
409 * @license lucide-react v0.462.0 - ISC
410 *
411 * This source code is licensed under the ISC license.
412 * See the LICENSE file in the root directory of this source tree.
413 */const aF=ee("Volume2",[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["path",{d:"M16 9a5 5 0 0 1 0 6",key:"1q6k2b"}],["path",{d:"M19.364 18.364a9 9 0 0 0 0-12.728",key:"ijwkga"}]]);/**
414 * @license lucide-react v0.462.0 - ISC
415 *
416 * This source code is licensed under the ISC license.
417 * See the LICENSE file in the root directory of this source tree.
418 */const Pu=ee("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
419 * @license lucide-react v0.462.0 - ISC
420 *
421 * This source code is licensed under the ISC license.
422 * See the LICENSE file in the root directory of this source tree.
423 */const iF=ee("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]),Dw="-",oF=e=>{const t=lF(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:o=>{const s=o.split(Dw);return s[0]===""&&s.length!==1&&s.shift(),Y2(s,t)||sF(o)},getConflictingClassGroupIds:(o,s)=>{const l=r[o]||[];return s&&n[o]?[...l,...n[o]]:l}}},Y2=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),a=n?Y2(e.slice(1),n):void 0;if(a)return a;if(t.validators.length===0)return;const i=e.join(Dw);return(o=t.validators.find(({validator:s})=>s(i)))==null?void 0:o.classGroupId},_j=/^\[(.+)\]$/,sF=e=>{if(_j.test(e)){const t=_j.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},lF=e=>{const{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return uF(Object.entries(e.classGroups),r).forEach(([i,o])=>{P0(o,n,i,t)}),n},P0=(e,t,r,n)=>{e.forEach(a=>{if(typeof a=="string"){const i=a===""?t:Sj(t,a);i.classGroupId=r;return}if(typeof a=="function"){if(cF(a)){P0(a(n),t,r,n);return}t.validators.push({validator:a,classGroupId:r});return}Object.entries(a).forEach(([i,o])=>{P0(o,Sj(t,i),r,n)})})},Sj=(e,t)=>{let r=e;return t.split(Dw).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},cF=e=>e.isThemeGetter,uF=(e,t)=>t?e.map(([r,n])=>{const a=n.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([o,s])=>[t+o,s])):i);return[r,a]}):e,dF=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const a=(i,o)=>{r.set(i,o),t++,t>e&&(t=0,n=r,r=new Map)};return{get(i){let o=r.get(i);if(o!==void 0)return o;if((o=n.get(i))!==void 0)return a(i,o),o},set(i,o){r.has(i)?r.set(i,o):a(i,o)}}},X2="!",fF=e=>{const{separator:t,experimentalParseClassName:r}=e,n=t.length===1,a=t[0],i=t.length,o=s=>{const l=[];let c=0,d=0,f;for(let v=0;v<s.length;v++){let x=s[v];if(c===0){if(x===a&&(n||s.slice(v,v+i)===t)){l.push(s.slice(d,v)),d=v+i;continue}if(x==="/"){f=v;continue}}x==="["?c++:x==="]"&&c--}const h=l.length===0?s:s.substring(d),p=h.startsWith(X2),g=p?h.substring(1):h,m=f&&f>d?f-d:void 0;return{modifiers:l,hasImportantModifier:p,baseClassName:g,maybePostfixModifierPosition:m}};return r?s=>r({className:s,parseClassName:o}):o},hF=e=>{if(e.length<=1)return e;const t=[];let r=[];return e.forEach(n=>{n[0]==="["?(t.push(...r.sort(),n),r=[]):r.push(n)}),t.push(...r.sort()),t},pF=e=>({cache:dF(e.cacheSize),parseClassName:fF(e),...oF(e)}),mF=/\s+/,gF=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:a}=t,i=[],o=e.trim().split(mF);let s="";for(let l=o.length-1;l>=0;l-=1){const c=o[l],{modifiers:d,hasImportantModifier:f,baseClassName:h,maybePostfixModifierPosition:p}=r(c);let g=!!p,m=n(g?h.substring(0,p):h);if(!m){if(!g){s=c+(s.length>0?" "+s:s);continue}if(m=n(h),!m){s=c+(s.length>0?" "+s:s);continue}g=!1}const v=hF(d).join(":"),x=f?v+X2:v,b=x+m;if(i.includes(b))continue;i.push(b);const y=a(m,g);for(let S=0;S<y.length;++S){const _=y[S];i.push(x+_)}s=c+(s.length>0?" "+s:s)}return s};function vF(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=J2(t))&&(n&&(n+=" "),n+=r);return n}const J2=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=J2(e[n]))&&(r&&(r+=" "),r+=t);return r};function yF(e,...t){let r,n,a,i=o;function o(l){const c=t.reduce((d,f)=>f(d),e());return r=pF(c),n=r.cache.get,a=r.cache.set,i=s,s(l)}function s(l){const c=n(l);if(c)return c;const d=gF(l,r);return a(l,d),d}return function(){return i(vF.apply(null,arguments))}}const Ke=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},Q2=/^\[(?:([a-z-]+):)?(.+)\]$/i,bF=/^\d+\/\d+$/,xF=new Set(["px","full","screen"]),wF=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,_F=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,SF=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,jF=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,kF=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ca=e=>qs(e)||xF.has(e)||bF.test(e),Xa=e=>Yl(e,"length",MF),qs=e=>!!e&&!Number.isNaN(Number(e)),kv=e=>Yl(e,"number",qs),_c=e=>!!e&&Number.isInteger(Number(e)),EF=e=>e.endsWith("%")&&qs(e.slice(0,-1)),ye=e=>Q2.test(e),Ja=e=>wF.test(e),OF=new Set(["length","size","percentage"]),NF=e=>Yl(e,OF,Z2),PF=e=>Yl(e,"position",Z2),CF=new Set(["image","url"]),TF=e=>Yl(e,CF,RF),AF=e=>Yl(e,"",$F),Sc=()=>!0,Yl=(e,t,r)=>{const n=Q2.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1},MF=e=>_F.test(e)&&!SF.test(e),Z2=()=>!1,$F=e=>jF.test(e),RF=e=>kF.test(e),IF=()=>{const e=Ke("colors"),t=Ke("spacing"),r=Ke("blur"),n=Ke("brightness"),a=Ke("borderColor"),i=Ke("borderRadius"),o=Ke("borderSpacing"),s=Ke("borderWidth"),l=Ke("contrast"),c=Ke("grayscale"),d=Ke("hueRotate"),f=Ke("invert"),h=Ke("gap"),p=Ke("gradientColorStops"),g=Ke("gradientColorStopPositions"),m=Ke("inset"),v=Ke("margin"),x=Ke("opacity"),b=Ke("padding"),y=Ke("saturate"),S=Ke("scale"),_=Ke("sepia"),j=Ke("skew"),k=Ke("space"),E=Ke("translate"),O=()=>["auto","contain","none"],A=()=>["auto","hidden","clip","visible","scroll"],T=()=>["auto",ye,t],N=()=>[ye,t],I=()=>["",ca,Xa],R=()=>["auto",qs,ye],D=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],L=()=>["solid","dashed","dotted","double","none"],M=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],C=()=>["start","end","center","between","around","evenly","stretch"],P=()=>["","0",ye],B=()=>["auto","avoid","all","avoid-page","page","left","right","column"],U=()=>[qs,ye];return{cacheSize:500,separator:":",theme:{colors:[Sc],spacing:[ca,Xa],blur:["none","",Ja,ye],brightness:U(),borderColor:[e],borderRadius:["none","","full",Ja,ye],borderSpacing:N(),borderWidth:I(),contrast:U(),grayscale:P(),hueRotate:U(),invert:P(),gap:N(),gradientColorStops:[e],gradientColorStopPositions:[EF,Xa],inset:T(),margin:T(),opacity:U(),padding:N(),saturate:U(),scale:U(),sepia:P(),skew:U(),space:N(),translate:N()},classGroups:{aspect:[{aspect:["auto","square","video",ye]}
vendor: 11,179 bytes, line 423
423],container:["container"],columns:[{columns:[Ja]}],"break-after":[{"break-after":B()}],"break-before":[{"break-before":B()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...D(),ye]}],overflow:[{overflow:A()}],"overflow-x":[{"overflow-x":A()}],"overflow-y":[{"overflow-y":A()}],overscroll:[{overscroll:O()}],"overscroll-x":[{"overscroll-x":O()}],"overscroll-y":[{"overscroll-y":O()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",_c,ye]}],basis:[{basis:T()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ye]}],grow:[{grow:P()}],shrink:[{shrink:P()}],order:[{order:["first","last","none",_c,ye]}],"grid-cols":[{"grid-cols":[Sc]}],"col-start-end":[{col:["auto",{span:["full",_c,ye]},ye]}],"col-start":[{"col-start":R()}],"col-end":[{"col-end":R()}],"grid-rows":[{"grid-rows":[Sc]}],"row-start-end":[{row:["auto",{span:[_c,ye]},ye]}],"row-start":[{"row-start":R()}],"row-end":[{"row-end":R()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ye]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ye]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...C()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...C(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...C(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[b]}],px:[{px:[b]}],py:[{py:[b]}],ps:[{ps:[b]}],pe:[{pe:[b]}],pt:[{pt:[b]}],pr:[{pr:[b]}],pb:[{pb:[b]}],pl:[{pl:[b]}],m:[{m:[v]}],mx:[{mx:[v]}],my:[{my:[v]}],ms:[{ms:[v]}],me:[{me:[v]}],mt:[{mt:[v]}],mr:[{mr:[v]}],mb:[{mb:[v]}],ml:[{ml:[v]}],"space-x":[{"space-x":[k]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[k]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",ye,t]}],"min-w":[{"min-w":[ye,t,"min","max","fit"]}],"max-w":[{"max-w":[ye,t,"none","full","min","max","fit","prose",{screen:[Ja]},Ja]}],h:[{h:[ye,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ye,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ye,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ye,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Ja,Xa]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",kv]}],"font-family":[{font:[Sc]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",ye]}],"line-clamp":[{"line-clamp":["none",qs,kv]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",ca,ye]}],"list-image":[{"list-image":["none",ye]}],"list-style-type":[{list:["none","disc","decimal",ye]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[x]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[x]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...L(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",ca,Xa]}],"underline-offset":[{"underline-offset":["auto",ca,ye]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:N()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ye]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ye]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[x]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...D(),PF]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",NF]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},TF]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[g]}],"gradient-via-pos":[{via:[g]}],"gradient-to-pos":[{to:[g]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[x]}],"border-style":[{border:[...L(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[x]}],"divide-style":[{divide:L()}],"border-color":[{border:[a]}],"border-color-x":[{"border-x":[a]}],"border-color-y":[{"border-y":[a]}],"border-color-s":[{"border-s":[a]}],"border-color-e":[{"border-e":[a]}],"border-color-t":[{"border-t":[a]}],"border-color-r":[{"border-r":[a]}],"border-color-b":[{"border-b":[a]}],"border-color-l":[{"border-l":[a]}],"divide-color":[{divide:[a]}],"outline-style":[{outline:["",...L()]}],"outline-offset":[{"outline-offset":[ca,ye]}],"outline-w":[{outline:[ca,Xa]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:I()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[x]}],"ring-offset-w":[{"ring-offset":[ca,Xa]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Ja,AF]}],"shadow-color":[{shadow:[Sc]}],opacity:[{opacity:[x]}],"mix-blend":[{"mix-blend":[...M(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":M()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Ja,ye]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[f]}],saturate:[{saturate:[y]}],sepia:[{sepia:[_]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[x]}],"backdrop-saturate":[{"backdrop-saturate":[y]}],"backdrop-sepia":[{"backdrop-sepia":[_]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",ye]}],duration:[{duration:U()}],ease:[{ease:["linear","in","out","in-out",ye]}],delay:[{delay:U()}],animate:[{animate:["none","spin","ping","pulse","bounce",ye]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[_c,ye]}],"translate-x":[{"translate-x":[E]}],"translate-y":[{"translate-y":[E]}],"skew-x":[{"skew-x":[j]}],"skew-y":[{"skew-y":[j]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ye]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ye]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":N()}],"scroll-mx":[{"scroll-mx":N()}],"scroll-my":[{"scroll-my":N()}],"scroll-ms":[{"scroll-ms":N()}],"scroll-me":[{"scroll-me":N()}],"scroll-mt":[{"scroll-mt":N()}],"scroll-mr":[{"scroll-mr":N()}],"scroll-mb":[{"scroll-mb":N()}],"scroll-ml":[{"scroll-ml":N()}],"scroll-p":[{"scroll-p":N()}],"scroll-px":[{"scroll-px":N()}],"scroll-py":[{"scroll-py":N()}],"scroll-ps":[{"scroll-ps":N()}],"scroll-pe":[{"scroll-pe":N()}],"scroll-pt":[{"scroll-pt":N()}],"scroll-pr":[{"scroll-pr":N()}],"scroll-pb":[{"scroll-pb":N()}],"scroll-pl":[{"scroll-pl":N()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}
vendor: 3,852 bytes, line 423
423],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ye]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[ca,Xa,kv]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},DF=yF(IF);function q(...e){return DF(ke(e))}const LF=CB,eA=w.forwardRef(({className:e,...t},r)=>u.jsx(E2,{ref:r,className:q("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));eA.displayName=E2.displayName;const BF=Om("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),tA=w.forwardRef(({className:e,variant:t,...r},n)=>u.jsx(O2,{ref:n,className:q(BF({variant:t}),e),...r}));
vendor: 4,006 bytes, line 423
423tA.displayName=O2.displayName;const FF=w.forwardRef(({className:e,...t},r)=>u.jsx(C2,{ref:r,className:q("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors group-[.destructive]:border-muted/40 hover:bg-secondary group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 group-[.destructive]:focus:ring-destructive disabled:pointer-events-none disabled:opacity-50",e),...t}));FF.displayName=C2.displayName;const rA=w.forwardRef(({className:e,...t},r)=>u.jsx(T2,{ref:r,className:q("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity group-hover:opacity-100 group-[.destructive]:text-red-300 hover:text-foreground group-[.destructive]:hover:text-red-50 focus:opacity-100 focus:outline-none focus:ring-2 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:u.jsx(Pu,{className:"h-4 w-4"})}));rA.displayName=T2.displayName;const nA=w.forwardRef(({className:e,...t},r)=>u.jsx(N2,{ref:r,className:q("text-sm font-semibold",e),...t}));nA.displayName=N2.displayName;const aA=w.forwardRef(({className:e,...t},r)=>u.jsx(P2,{ref:r,className:q("text-sm opacity-90",e),...t}));aA.displayName=P2.displayName;function UF(){const{toasts:e}=B8();return u.jsxs(LF,{children:[e.map(function({id:t,title:r,description:n,action:a,...i}){return u.jsxs(tA,{...i,children:[u.jsxs("div",{className:"grid gap-1",children:[r&&u.jsx(nA,{children:r}),n&&u.jsx(aA,{children:n})]}),a,u.jsx(rA,{})]},t)}),u.jsx(eA,{})]})}var zF=Tx[" useId ".trim().toString()]||(()=>{}),WF=0;function So(e){const[t,r]=w.useState(zF());return Bt(()=>{r(n=>n??String(WF++))},[e]),t?`radix-${t}`:""}const HF=["top","right","bottom","left"],Ti=Math.min,_r=Math.max,Vh=Math.round,wf=Math.floor,ea=e=>({x:e,y:e}),qF={left:"right",right:"left",bottom:"top",top:"bottom"},VF={start:"end",end:"start"};function C0(e,t,r){return _r(e,Ti(t,r))}function Aa(e,t){return typeof e=="function"?e(t):e}function Ma(e){return e.split("-")[0]}function Xl(e){return e.split("-")[1]}function Lw(e){return e==="x"?"y":"x"}function Bw(e){return e==="y"?"height":"width"}const KF=new Set(["top","bottom"]);function Kn(e){return KF.has(Ma(e))?"y":"x"}function Fw(e){return Lw(Kn(e))}function GF(e,t,r){r===void 0&&(r=!1);const n=Xl(e),a=Fw(e),i=Bw(a);let o=a==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(o=Kh(o)),[o,Kh(o)]}function YF(e){const t=Kh(e);return[T0(e),t,T0(t)]}function T0(e){return e.replace(/start|end/g,t=>VF[t])}const jj=["left","right"],kj=["right","left"],XF=["top","bottom"],JF=["bottom","top"];function QF(e,t,r){switch(e){case"top":case"bottom":return r?t?kj:jj:t?jj:kj;case"left":case"right":return t?XF:JF;default:return[]}}function ZF(e,t,r,n){const a=Xl(e);let i=QF(Ma(e),r==="start",n);return a&&(i=i.map(o=>o+"-"+a),t&&(i=i.concat(i.map(T0)))),i}function Kh(e){return e.replace(/left|right|bottom|top/g,t=>qF[t])}function eU(e){return{top:0,right:0,bottom:0,left:0,...e}}function iA(e){return typeof e!="number"?eU(e):{top:e,right:e,bottom:e,left:e}}function Gh(e){const{x:t,y:r,width:n,height:a}=e;return{width:n,height:a,top:r,left:t,right:t+n,bottom:r+a,x:t,y:r}}function Ej(e,t,r){let{reference:n,floating:a}=e;const i=Kn(t),o=Fw(t),s=Bw(o),l=Ma(t),c=i==="y",d=n.x+n.width/2-a.width/2,f=n.y+n.height/2-a.height/2,h=n[s]/2-a[s]/2;let p;switch(l){case"top":p={x:d,y:n.y-a.height};break;case"bottom":p={x:d,y:n.y+n.height};break;case"right":p={x:n.x+n.width,y:f};break;case"left":p={x:n.x-a.width,y:f};break;default:p={x:n.x,y:n.y}}switch(Xl(t)){case"start":p[o]-=h*(r&&c?-1:1);break;case"end":p[o]+=h*(r&&c?-1:1);break}return p}const tU=async(e,t,r)=>{const{placement:n="bottom",strategy:a="absolute",middleware:i=[],platform:o}
vendor: 9,925 bytes, line 423
423=r,s=i.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(t));let c=await o.getElementRects({reference:e,floating:t,strategy:a}),{x:d,y:f}=Ej(c,n,l),h=n,p={},g=0;for(let m=0;m<s.length;m++){const{name:v,fn:x}=s[m],{x:b,y,data:S,reset:_}=await x({x:d,y:f,initialPlacement:n,placement:h,strategy:a,middlewareData:p,rects:c,platform:o,elements:{reference:e,floating:t}});d=b??d,f=y??f,p={...p,[v]:{...p[v],...S}},_&&g<=50&&(g++,typeof _=="object"&&(_.placement&&(h=_.placement),_.rects&&(c=_.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:a}):_.rects),{x:d,y:f}=Ej(c,h,l)),m=-1)}return{x:d,y:f,placement:h,strategy:a,middlewareData:p}};async function Cu(e,t){var r;t===void 0&&(t={});const{x:n,y:a,platform:i,rects:o,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:h=!1,padding:p=0}=Aa(t,e),g=iA(p),v=s[h?f==="floating"?"reference":"floating":f],x=Gh(await i.getClippingRect({element:(r=await(i.isElement==null?void 0:i.isElement(v)))==null||r?v:v.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:c,rootBoundary:d,strategy:l})),b=f==="floating"?{x:n,y:a,width:o.floating.width,height:o.floating.height}:o.reference,y=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),S=await(i.isElement==null?void 0:i.isElement(y))?await(i.getScale==null?void 0:i.getScale(y))||{x:1,y:1}:{x:1,y:1},_=Gh(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:b,offsetParent:y,strategy:l}):b);return{top:(x.top-_.top+g.top)/S.y,bottom:(_.bottom-x.bottom+g.bottom)/S.y,left:(x.left-_.left+g.left)/S.x,right:(_.right-x.right+g.right)/S.x}}const rU=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:a,rects:i,platform:o,elements:s,middlewareData:l}=t,{element:c,padding:d=0}=Aa(e,t)||{};if(c==null)return{};const f=iA(d),h={x:r,y:n},p=Fw(a),g=Bw(p),m=await o.getDimensions(c),v=p==="y",x=v?"top":"left",b=v?"bottom":"right",y=v?"clientHeight":"clientWidth",S=i.reference[g]+i.reference[p]-h[p]-i.floating[g],_=h[p]-i.reference[p],j=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c));let k=j?j[y]:0;(!k||!await(o.isElement==null?void 0:o.isElement(j)))&&(k=s.floating[y]||i.floating[g]);const E=S/2-_/2,O=k/2-m[g]/2-1,A=Ti(f[x],O),T=Ti(f[b],O),N=A,I=k-m[g]-T,R=k/2-m[g]/2+E,D=C0(N,R,I),L=!l.arrow&&Xl(a)!=null&&R!==D&&i.reference[g]/2-(R<N?A:T)-m[g]/2<0,M=L?R<N?R-N:R-I:0;return{[p]:h[p]+M,data:{[p]:D,centerOffset:R-D-M,...L&&{alignmentOffset:M}},reset:L}}}),nU=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:a,middlewareData:i,rects:o,initialPlacement:s,platform:l,elements:c}=t,{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:m=!0,...v}=Aa(e,t);if((r=i.arrow)!=null&&r.alignmentOffset)return{};const x=Ma(a),b=Kn(s),y=Ma(s)===s,S=await(l.isRTL==null?void 0:l.isRTL(c.floating)),_=h||(y||!m?[Kh(s)]:YF(s)),j=g!=="none";!h&&j&&_.push(...ZF(s,m,g,S));const k=[s,..._],E=await Cu(t,v),O=[];let A=((n=i.flip)==null?void 0:n.overflows)||[];if(d&&O.push(E[x]),f){const R=GF(a,o,S);O.push(E[R[0]],E[R[1]])}if(A=[...A,{placement:a,overflows:O}],!O.every(R=>R<=0)){var T,N;const R=(((T=i.flip)==null?void 0:T.index)||0)+1,D=k[R];if(D&&(!(f==="alignment"?b!==Kn(D):!1)||A.every(C=>C.overflows[0]>0&&Kn(C.placement)===b)))return{data:{index:R,overflows:A},reset:{placement:D}};let L=(N=A.filter(M=>M.overflows[0]<=0).sort((M,C)=>M.overflows[1]-C.overflows[1])[0])==null?void 0:N.placement;if(!L)switch(p){case"bestFit":{var I;const M=(I=A.filter(C=>{if(j){const P=Kn(C.placement);return P===b||P==="y"}return!0}).map(C=>[C.placement,C.overflows.filter(P=>P>0).reduce((P,B)=>P+B,0)]).sort((C,P)=>C[1]-P[1])[0])==null?void 0:I[0];M&&(L=M);break}case"initialPlacement":L=s;break}if(a!==L)return{reset:{placement:L}}}return{}}}};function Oj(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Nj(e){return HF.some(t=>e[t]>=0)}const aU=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...a}=Aa(e,t);switch(n){case"referenceHidden":{const i=await Cu(t,{...a,elementContext:"reference"}),o=Oj(i,r.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:Nj(o)}}}case"escaped":{const i=await Cu(t,{...a,altBoundary:!0}),o=Oj(i,r.floating);return{data:{escapedOffsets:o,escaped:Nj(o)}}}default:return{}}}}},oA=new Set(["left","top"]);async function iU(e,t){const{placement:r,platform:n,elements:a}=e,i=await(n.isRTL==null?void 0:n.isRTL(a.floating)),o=Ma(r),s=Xl(r),l=Kn(r)==="y",c=oA.has(o)?-1:1,d=i&&l?-1:1,f=Aa(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:g}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return s&&typeof g=="number"&&(p=s==="end"?g*-1:g),l?{x:p*d,y:h*c}:{x:h*c,y:p*d}}const oU=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:a,y:i,placement:o,middlewareData:s}=t,l=await iU(t,e);return o===((r=s.offset)==null?void 0:r.placement)&&(n=s.arrow)!=null&&n.alignmentOffset?{}:{x:a+l.x,y:i+l.y,data:{...l,placement:o}}}}},sU=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:a}=t,{mainAxis:i=!0,crossAxis:o=!1,limiter:s={fn:v=>{let{x,y:b}=v;return{x,y:b}}},...l}=Aa(e,t),c={x:r,y:n},d=await Cu(t,l),f=Kn(Ma(a)),h=Lw(f);let p=c[h],g=c[f];if(i){const v=h==="y"?"top":"left",x=h==="y"?"bottom":"right",b=p+d[v],y=p-d[x];p=C0(b,p,y)}if(o){const v=f==="y"?"top":"left",x=f==="y"?"bottom":"right",b=g+d[v],y=g-d[x];g=C0(b,g,y)}const m=s.fn({...t,[h]:p,[f]:g});return{...m,data:{x:m.x-r,y:m.y-n,enabled:{[h]:i,[f]:o}}}}}},lU=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:a,rects:i,middlewareData:o}=t,{offset:s=0,mainAxis:l=!0,crossAxis:c=!0}=Aa(e,t),d={x:r,y:n},f=Kn(a),h=Lw(f);let p=d[h],g=d[f];const m=Aa(s,t),v=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const y=h==="y"?"height":"width",S=i.reference[h]-i.floating[y]+v.mainAxis,_=i.reference[h]+i.reference[y]-v.mainAxis;p<S?p=S:p>_&&(p=_)}if(c){var x,b;const y=h==="y"?"width":"height",S=oA.has(Ma(a)),_=i.reference[f]-i.floating[y]+(S&&((x=o.offset)==null?void 0:x[f])||0)+(S?0:v.crossAxis),j=i.reference[f]+i.reference[y]+(S?0:((b=o.offset)==null?void 0:b[f])||0)-(S?v.crossAxis:0);g<_?g=_:g>j&&(g=j)}return{[h]:p,[f]:g}}}},cU=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:a,rects:i,platform:o,elements:s}=t,{apply:l=()=>{},...c}=Aa(e,t),d=await Cu(t,c),f=Ma(a),h=Xl(a),p=Kn(a)==="y",{width:g,height:m}=i.floating;let v,x;f==="top"||f==="bottom"?(v=f,x=h===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?"start":"end")?"left":"right"):(x=f,v=h==="end"?"top":"bottom");const b=m-d.top-d.bottom,y=g-d.left-d.right,S=Ti(m-d[v],b),_=Ti(g-d[x],y),j=!t.middlewareData.shift;let k=S,E=_;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(E=y),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(k=b),j&&!h){const A=_r(d.left,0),T=_r(d.right,0),N=_r(d.top,0),I=_r(d.bottom,0);p?E=g-2*(A!==0||T!==0?A+T:_r(d.left,d.right)):k=m-2*(N!==0||I!==0?N+I:_r(d.top,d.bottom))}await l({...t,availableWidth:E,availableHeight:k});const O=await o.getDimensions(s.floating);return g!==O.width||m!==O.height?{reset:{rects:!0}}:{}}}};function Mm(){return typeof window<"u"}function Jl(e){return sA(e)?(e.nodeName||"").toLowerCase():"#document"}function Pr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function sa(e){var t;return(t=(sA(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function sA(e){return Mm()?e instanceof Node||e instanceof Pr(e).Node:!1}function En(e){return Mm()?e instanceof Element||e instanceof Pr(e).Element:!1}function na(e){return Mm()?e instanceof HTMLElement||e instanceof Pr(e).HTMLElement:!1}function Pj(e){return!Mm()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Pr(e).ShadowRoot}const uU=new Set(["inline","contents"]);function $d(e){const{overflow:t,overflowX:r,overflowY:n,display:a}=On(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!uU.has(a)}const dU=new Set(["table","td","th"]);function fU(e){return dU.has(Jl(e))}const hU=[":popover-open",":modal"];function $m(e){return hU.some(t=>{try{return e.matches(t)}catch{return!1}})}const pU=["transform","translate","scale","rotate","perspective"],mU=["transform","translate","scale","rotate","perspective","filter"],gU=["paint","layout","strict","content"];function Uw(e){const t=zw(),r=En(e)?On(e):e;return pU.some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||mU.some(n=>(r.willChange||"").includes(n))||gU.some(n=>(r.contain||"").includes(n))}function vU(e){let t=Ai(e);for(;na(t)&&!vl(t);){if(Uw(t))return t;if($m(t))return null;t=Ai(t)}return null}function zw(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const yU=new Set(["html","body","#document"]);function vl(e){return yU.has(Jl(e))}function On(e){return Pr(e).getComputedStyle(e)}function Rm(e){return En(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ai(e){if(Jl(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Pj(e)&&e.host||sa(e);return Pj(t)?t.host:t}function lA(e){const t=Ai(e);return vl(t)?e.ownerDocument?e.ownerDocument.body:e.body:na(t)&&$d(t)?t:lA(t)}function Tu(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const a=lA(e),i=a===((n=e.ownerDocument)==null?void 0:n.body),o=Pr(a);if(i){const s=A0(o);
vendor: 4,409 bytes, line 423
423return t.concat(o,o.visualViewport||[],$d(a)?a:[],s&&r?Tu(s):[])}return t.concat(a,Tu(a,[],r))}function A0(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function cA(e){const t=On(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const a=na(e),i=a?e.offsetWidth:r,o=a?e.offsetHeight:n,s=Vh(r)!==i||Vh(n)!==o;return s&&(r=i,n=o),{width:r,height:n,$:s}}function Ww(e){return En(e)?e:e.contextElement}function Vs(e){const t=Ww(e);if(!na(t))return ea(1);const r=t.getBoundingClientRect(),{width:n,height:a,$:i}=cA(t);let o=(i?Vh(r.width):r.width)/n,s=(i?Vh(r.height):r.height)/a;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}const bU=ea(0);function uA(e){const t=Pr(e);return!zw()||!t.visualViewport?bU:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function xU(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==Pr(e)?!1:t}function Ro(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const a=e.getBoundingClientRect(),i=Ww(e);let o=ea(1);t&&(n?En(n)&&(o=Vs(n)):o=Vs(e));const s=xU(i,r,n)?uA(i):ea(0);let l=(a.left+s.x)/o.x,c=(a.top+s.y)/o.y,d=a.width/o.x,f=a.height/o.y;if(i){const h=Pr(i),p=n&&En(n)?Pr(n):n;let g=h,m=A0(g);for(;m&&n&&p!==g;){const v=Vs(m),x=m.getBoundingClientRect(),b=On(m),y=x.left+(m.clientLeft+parseFloat(b.paddingLeft))*v.x,S=x.top+(m.clientTop+parseFloat(b.paddingTop))*v.y;l*=v.x,c*=v.y,d*=v.x,f*=v.y,l+=y,c+=S,g=Pr(m),m=A0(g)}}return Gh({width:d,height:f,x:l,y:c})}function Hw(e,t){const r=Rm(e).scrollLeft;return t?t.left+r:Ro(sa(e)).left+r}function dA(e,t,r){r===void 0&&(r=!1);const n=e.getBoundingClientRect(),a=n.left+t.scrollLeft-(r?0:Hw(e,n)),i=n.top+t.scrollTop;return{x:a,y:i}}function wU(e){let{elements:t,rect:r,offsetParent:n,strategy:a}=e;const i=a==="fixed",o=sa(n),s=t?$m(t.floating):!1;if(n===o||s&&i)return r;let l={scrollLeft:0,scrollTop:0},c=ea(1);const d=ea(0),f=na(n);if((f||!f&&!i)&&((Jl(n)!=="body"||$d(o))&&(l=Rm(n)),na(n))){const p=Ro(n);c=Vs(n),d.x=p.x+n.clientLeft,d.y=p.y+n.clientTop}const h=o&&!f&&!i?dA(o,l,!0):ea(0);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-l.scrollLeft*c.x+d.x+h.x,y:r.y*c.y-l.scrollTop*c.y+d.y+h.y}}function _U(e){return Array.from(e.getClientRects())}function SU(e){const t=sa(e),r=Rm(e),n=e.ownerDocument.body,a=_r(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=_r(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let o=-r.scrollLeft+Hw(e);const s=-r.scrollTop;return On(n).direction==="rtl"&&(o+=_r(t.clientWidth,n.clientWidth)-a),{width:a,height:i,x:o,y:s}}function jU(e,t){const r=Pr(e),n=sa(e),a=r.visualViewport;let i=n.clientWidth,o=n.clientHeight,s=0,l=0;if(a){i=a.width,o=a.height;const c=zw();(!c||c&&t==="fixed")&&(s=a.offsetLeft,l=a.offsetTop)}return{width:i,height:o,x:s,y:l}}const kU=new Set(["absolute","fixed"]);function EU(e,t){const r=Ro(e,!0,t==="fixed"),n=r.top+e.clientTop,a=r.left+e.clientLeft,i=na(e)?Vs(e):ea(1),o=e.clientWidth*i.x,s=e.clientHeight*i.y,l=a*i.x,c=n*i.y;return{width:o,height:s,x:l,y:c}}function Cj(e,t,r){let n;if(t==="viewport")n=jU(e,r);else if(t==="document")n=SU(sa(e));else if(En(t))n=EU(t,r);else{const a=uA(e);n={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}return Gh(n)}function fA(e,t){const r=Ai(e);return r===t||!En(r)||vl(r)?!1:On(r).position==="fixed"||fA(r,t)}function OU(e,t){const r=t.get(e);if(r)return r;let n=Tu(e,[],!1).filter(s=>En(s)&&Jl(s)!=="body"),a=null;const i=On(e).position==="fixed";let o=i?Ai(e):e;for(;En(o)&&!vl(o);){const s=On(o),l=Uw(o);!l&&s.position==="fixed"&&(a=null),(i?!l&&!a:!l&&s.position==="static"&&!!a&&kU.has(a.position)||$d(o)&&!l&&fA(e,o))?n=n.filter(d=>d!==o):a=s,o=Ai(o)}return t.set(e,n),n}function NU(e){let{element:t,boundary:r,rootBoundary:n,strategy:a}=e;const o=[...r==="clippingAncestors"?$m(t)?[]:OU(t,this._c):[].concat(r),n],s=o[0],l=o.reduce((c,d)=>{const f=Cj(t,d,a);return c.top=_r(f.top,c.top),c.right=Ti(f.right,c.right),c.bottom=Ti(f.bottom,c.bottom),c.left=_r(f.left,c.left),c},Cj(t,s,a));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function PU(e){const{width:t,height:r}=cA(e);return{width:t,height:r}}function CU(e,t,r){const n=na(t),a=sa(t),i=r==="fixed",o=Ro(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l=ea(0);function c(){l.x=Hw(a)}if(n||!n&&!i)if((Jl(t)!=="body"||$d(a))&&(s=Rm(t)),n){const p=Ro(t,!0,i,t);l.x=p.x+t.clientLeft,l.y=p.y+t.clientTop}else a&&c();i&&!n&&a&&c();
vendor: 8,379 bytes, line 423
423const d=a&&!n&&!i?dA(a,s):ea(0),f=o.left+s.scrollLeft-l.x-d.x,h=o.top+s.scrollTop-l.y-d.y;return{x:f,y:h,width:o.width,height:o.height}}function Ev(e){return On(e).position==="static"}function Tj(e,t){if(!na(e)||On(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return sa(e)===r&&(r=r.ownerDocument.body),r}function hA(e,t){const r=Pr(e);if($m(e))return r;if(!na(e)){let a=Ai(e);for(;a&&!vl(a);){if(En(a)&&!Ev(a))return a;a=Ai(a)}return r}let n=Tj(e,t);for(;n&&fU(n)&&Ev(n);)n=Tj(n,t);return n&&vl(n)&&Ev(n)&&!Uw(n)?r:n||vU(e)||r}const TU=async function(e){const t=this.getOffsetParent||hA,r=this.getDimensions,n=await r(e.floating);return{reference:CU(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function AU(e){return On(e).direction==="rtl"}const MU={convertOffsetParentRelativeRectToViewportRelativeRect:wU,getDocumentElement:sa,getClippingRect:NU,getOffsetParent:hA,getElementRects:TU,getClientRects:_U,getDimensions:PU,getScale:Vs,isElement:En,isRTL:AU};function pA(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function $U(e,t){let r=null,n;const a=sa(e);function i(){var s;clearTimeout(n),(s=r)==null||s.disconnect(),r=null}function o(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),i();const c=e.getBoundingClientRect(),{left:d,top:f,width:h,height:p}=c;if(s||t(),!h||!p)return;const g=wf(f),m=wf(a.clientWidth-(d+h)),v=wf(a.clientHeight-(f+p)),x=wf(d),y={rootMargin:-g+"px "+-m+"px "+-v+"px "+-x+"px",threshold:_r(0,Ti(1,l))||1};let S=!0;function _(j){const k=j[0].intersectionRatio;if(k!==l){if(!S)return o();k?o(!1,k):n=setTimeout(()=>{o(!1,1e-7)},1e3)}k===1&&!pA(c,e.getBoundingClientRect())&&o(),S=!1}try{r=new IntersectionObserver(_,{...y,root:a.ownerDocument})}catch{r=new IntersectionObserver(_,y)}r.observe(e)}return o(!0),i}function RU(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:a=!0,ancestorResize:i=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,c=Ww(e),d=a||i?[...c?Tu(c):[],...Tu(t)]:[];d.forEach(x=>{a&&x.addEventListener("scroll",r,{passive:!0}),i&&x.addEventListener("resize",r)});const f=c&&s?$U(c,r):null;let h=-1,p=null;o&&(p=new ResizeObserver(x=>{let[b]=x;b&&b.target===c&&p&&(p.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var y;(y=p)==null||y.observe(t)})),r()}),c&&!l&&p.observe(c),p.observe(t));let g,m=l?Ro(e):null;l&&v();function v(){const x=Ro(e);m&&!pA(m,x)&&r(),m=x,g=requestAnimationFrame(v)}return r(),()=>{var x;d.forEach(b=>{a&&b.removeEventListener("scroll",r),i&&b.removeEventListener("resize",r)}),f==null||f(),(x=p)==null||x.disconnect(),p=null,l&&cancelAnimationFrame(g)}}const IU=oU,DU=sU,LU=nU,BU=cU,FU=aU,Aj=rU,UU=lU,zU=(e,t,r)=>{const n=new Map,a={platform:MU,...r},i={...a.platform,_c:n};return tU(e,t,{...a,platform:i})};var WU=typeof document<"u",HU=function(){},dh=WU?w.useLayoutEffect:HU;function Yh(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,a;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!Yh(e[n],t[n]))return!1;return!0}if(a=Object.keys(e),r=a.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,a[n]))return!1;for(n=r;n--!==0;){const i=a[n];if(!(i==="_owner"&&e.$$typeof)&&!Yh(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function mA(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Mj(e,t){const r=mA(e);return Math.round(t*r)/r}function Ov(e){const t=w.useRef(e);return dh(()=>{t.current=e}),t}function qU(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:a,elements:{reference:i,floating:o}={},transform:s=!0,whileElementsMounted:l,open:c}=e,[d,f]=w.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[h,p]=w.useState(n);Yh(h,n)||p(n);const[g,m]=w.useState(null),[v,x]=w.useState(null),b=w.useCallback(C=>{C!==j.current&&(j.current=C,m(C))},[]),y=w.useCallback(C=>{C!==k.current&&(k.current=C,x(C))},[]),S=i||g,_=o||v,j=w.useRef(null),k=w.useRef(null),E=w.useRef(d),O=l!=null,A=Ov(l),T=Ov(a),N=Ov(c),I=w.useCallback(()=>{if(!j.current||!k.current)return;const C={placement:t,strategy:r,middleware:h};T.current&&(C.platform=T.current),zU(j.current,k.current,C).then(P=>{const B={...P,isPositioned:N.current!==!1};R.current&&!Yh(E.current,B)&&(E.current=B,Ko.flushSync(()=>{f(B)}))})},[h,t,r,T,N]);dh(()=>{c===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,f(C=>({...C,isPositioned:!1})))},[c]);const R=w.useRef(!1);dh(()=>(R.current=!0,()=>{R.current=!1}),[]),dh(()=>{if(S&&(j.current=S),_&&(k.current=_),S&&_){if(A.current)return A.current(S,_,I);I()}},[S,_,I,A,O]);const D=w.useMemo(()=>({reference:j,floating:k,setReference:b,setFloating:y}),[b,y]),L=w.useMemo(()=>({reference:S,floating:_}),[S,_]),M=w.useMemo(()=>{const C={position:r,left:0,top:0};if(!L.floating)return C;const P=Mj(L.floating,d.x),B=Mj(L.floating,d.y);return s?{...C,transform:"translate("+P+"px, "+B+"px)",...mA(L.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:P,top:B}},[r,s,L.floating,d.x,d.y]);return w.useMemo(()=>({...d,update:I,refs:D,elements:L,floatingStyles:M}),[d,I,D,L,M])}const VU=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:a}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?Aj({element:n.current,padding:a}).fn(r):{}:n?Aj({element:n,padding:a}).fn(r):{}}}},KU=(e,t)=>({...IU(e),options:[e,t]}),GU=(e,t)=>({...DU(e),options:[e,t]}),YU=(e,t)=>({...UU(e),options:[e,t]}),XU=(e,t)=>({...LU(e),options:[e,t]}),JU=(e,t)=>({...BU(e),options:[e,t]}),QU=(e,t)=>({...FU(e),options:[e,t]}),ZU=(e,t)=>({...VU(e),options:[e,t]});var ez="Arrow",gA=w.forwardRef((e,t)=>{const{children:r,width:n=10,height:a=5,...i}=e;return u.jsx(ge.svg,{...i,ref:t,width:n,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:u.jsx("polygon",{points:"0,0 30,0 15,10"})})});gA.displayName=ez;var tz=gA;function qw(e){const[t,r]=w.useState(void 0);return Bt(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(a=>{if(!Array.isArray(a)||!a.length)return;const i=a[0];let o,s;if("borderBoxSize"in i){const l=i.borderBoxSize,c=Array.isArray(l)?l[0]:l;o=c.inlineSize,s=c.blockSize}else o=e.offsetWidth,s=e.offsetHeight;r({width:o,height:s})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var Vw="Popper",[vA,Ql]=Fa(Vw),[rz,yA]=vA(Vw),bA=e=>{const{__scopePopper:t,children:r}=e,[n,a]=w.useState(null);return u.jsx(rz,{scope:t,anchor:n,onAnchorChange:a,children:r})};bA.displayName=Vw;var xA="PopperAnchor",wA=w.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...a}=e,i=yA(xA,r),o=w.useRef(null),s=Se(t,o);return w.useEffect(()=>{i.onAnchorChange((n==null?void 0:n.current)||o.current)}),n?null:u.jsx(ge.div,{...a,ref:s})});wA.displayName=xA;var Kw="PopperContent",[nz,az]=vA(Kw),_A=w.forwardRef((e,t)=>{var X,he,K,Z,Q,z;const{__scopePopper:r,side:n="bottom",sideOffset:a=0,align:i="center",alignOffset:o=0,arrowPadding:s=0,avoidCollisions:l=!0,collisionBoundary:c=[],collisionPadding:d=0,sticky:f="partial",hideWhenDetached:h=!1,updatePositionStrategy:p="optimized",onPlaced:g,...m}=e,v=yA(Kw,r),[x,b]=w.useState(null),y=Se(t,be=>b(be)),[S,_]=w.useState(null),j=qw(S),k=(j==null?void 0:j.width)??0,E=(j==null?void 0:j.height)??0,O=n+(i!=="center"?"-"+i:""),A=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},T=Array.isArray(c)?c:[c],N=T.length>0,I={padding:A,boundary:T.filter(oz),altBoundary:N},{refs:R,floatingStyles:D,placement:L,isPositioned:M,middlewareData:C}=qU({strategy:"fixed",placement:O,whileElementsMounted:(...be)=>RU(...be,{animationFrame:p==="always"}),elements:{reference:v.anchor},middleware:[KU({mainAxis:a+E,alignmentAxis:o}),l&&GU({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?YU():void 0,...I}),l&&XU({...I}),JU({...I,apply:({elements:be,rects:fe,availableWidth:Ue,availableHeight:De})=>{const{width:it,height:nr}=fe.reference,gr=be.floating.style;gr.setProperty("--radix-popper-available-width",`${Ue}px`),gr.setProperty("--radix-popper-available-height",`${De}px`),gr.setProperty("--radix-popper-anchor-width",`${it}
423px`),gr.setProperty("--radix-popper-anchor-height",`${nr}px`)}}),S&&ZU({element:S,padding:s}),sz({arrowWidth:k,arrowHeight:E}),h&&QU({strategy:"referenceHidden",...I})]}),[P,B]=kA(L),U=kn(g);Bt(()=>{M&&(U==null||U())},[M,U]);const F=(X=C.arrow)==null?void 0:X.x,V=(he=C.arrow)==null?void 0:he.y,J=((K=C.arrow)==null?void 0:K.centerOffset)!==0,[ue,_e]=w.useState();return Bt(()=>{x&&_e(window.getComputedStyle(x).zIndex)},[x]),u.jsx("div",{ref:R.setFloating,"data-radix-popper-content-wrapper":"",style:{...D,transform:M?D.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ue,"--radix-popper-transform-origin":[(Z=C.transformOrigin)==null?void 0:Z.x,(Q=C.transformOrigin)==null?void 0:Q.y].join(" "),...((z=C.hide)==null?void 0:z.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:u.jsx(nz,{scope:r,placedSide:P,onArrowChange:_,arrowX:F,arrowY:V,shouldHideArrow:J,children:u.jsx(ge.div,{"data-side":P,"data-align":B,...m,ref:y,style:{...m.style,animation:M?void 0:"none"}})})})});_A.displayName=Kw;var SA="PopperArrow",iz={top:"bottom",right:"left",bottom:"top",left:"right"},jA=w.forwardRef(function(t,r){const{__scopePopper:n,...a}=t,i=az(SA,n),o=iz[i.placedSide];return u.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:u.jsx(tz,{...a,ref:r,style:{...a.style,display:"block"}})})});jA.displayName=SA;function oz(e){return e!==null}var sz=e=>({name:"transformOrigin",options:e,fn(t){var v,x,b;const{placement:r,rects:n,middlewareData:a}=t,o=((v=a.arrow)==null?void 0:v.centerOffset)!==0,s=o?0:e.arrowWidth,l=o?0:e.arrowHeight,[c,d]=kA(r),f={start:"0%",center:"50%",end:"100%"}[d],h=(((x=a.arrow)==null?void 0:x.x)??0)+s/2,p=(((b=a.arrow)==null?void 0:b.y)??0)+l/2;let g="",m="";return c==="bottom"?(g=o?f:`${h}px`,m=`${-l}px`):c==="top"?(g=o?f:`${h}px`,m=`${n.floating.height+l}px`):c==="right"?(g=`${-l}px`,m=o?f:`${p}px`):c==="left"&&(g=`${n.floating.width+l}px`,m=o?f:`${p}px`),{data:{x:g,y:m}}}});function kA(e){const[t,r="center"]=e.split("-");return[t,r]}var EA=bA,Im=wA,Gw=_A,Yw=jA,[Dm,d_e]=Fa("Tooltip",[Ql]),Xw=Ql(),OA="TooltipProvider",lz=700,$j="tooltip.open",[cz,NA]=Dm(OA),PA=e=>{const{__scopeTooltip:t,delayDuration:r=lz,skipDelayDuration:n=300,disableHoverableContent:a=!1,children:i}=e,o=w.useRef(!0),s=w.useRef(!1),l=w.useRef(0);return w.useEffect(()=>{const c=l.current;return()=>window.clearTimeout(c)},[]),u.jsx(cz,{scope:t,isOpenDelayedRef:o,delayDuration:r,onOpen:w.useCallback(()=>{window.clearTimeout(l.current),o.current=!1},[]),onClose:w.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>o.current=!0,n)},[n]),isPointerInTransitRef:s,onPointerInTransitChange:w.useCallback(c=>{s.current=c},[]),disableHoverableContent:a,children:i})};PA.displayName=OA;var CA="Tooltip",[f_e,Lm]=Dm(CA),M0="TooltipTrigger",uz=w.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,a=Lm(M0,r),i=NA(M0,r),o=Xw(r),s=w.useRef(null),l=Se(t,s,a.onTriggerChange),c=w.useRef(!1),d=w.useRef(!1),f=w.useCallback(()=>c.current=!1,[]);return w.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),u.jsx(Im,{asChild:!0,...o,children:u.jsx(ge.button,{"aria-describedby":a.open?a.contentId:void 0,"data-state":a.stateAttribute,...n,ref:l,onPointerMove:oe(e.onPointerMove,h=>{h.pointerType!=="touch"&&!d.current&&!i.isPointerInTransitRef.current&&(a.onTriggerEnter(),d.current=!0)}),onPointerLeave:oe(e.onPointerLeave,()=>{a.onTriggerLeave(),d.current=!1}),onPointerDown:oe(e.onPointerDown,()=>{a.open&&a.onClose(),c.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:oe(e.onFocus,()=>{c.current||a.onOpen()}),onBlur:oe(e.onBlur,a.onClose),onClick:oe(e.onClick,a.onClose)})})});uz.displayName=M0;var dz="TooltipPortal",[h_e,fz]=Dm(dz,{forceMount:void 0}),yl="TooltipContent",TA=w.forwardRef((e,t)=>
vendor: 4,192 bytes, line 423
423{const r=fz(yl,e.__scopeTooltip),{forceMount:n=r.forceMount,side:a="top",...i}=e,o=Lm(yl,e.__scopeTooltip);return u.jsx(Li,{present:n||o.open,children:o.disableHoverableContent?u.jsx(AA,{side:a,...i,ref:t}):u.jsx(hz,{side:a,...i,ref:t})})}),hz=w.forwardRef((e,t)=>{const r=Lm(yl,e.__scopeTooltip),n=NA(yl,e.__scopeTooltip),a=w.useRef(null),i=Se(t,a),[o,s]=w.useState(null),{trigger:l,onClose:c}=r,d=a.current,{onPointerInTransitChange:f}=n,h=w.useCallback(()=>{s(null),f(!1)},[f]),p=w.useCallback((g,m)=>{const v=g.currentTarget,x={x:g.clientX,y:g.clientY},b=yz(x,v.getBoundingClientRect()),y=bz(x,b),S=xz(m.getBoundingClientRect()),_=_z([...y,...S]);s(_),f(!0)},[f]);return w.useEffect(()=>()=>h(),[h]),w.useEffect(()=>{if(l&&d){const g=v=>p(v,d),m=v=>p(v,l);return l.addEventListener("pointerleave",g),d.addEventListener("pointerleave",m),()=>{l.removeEventListener("pointerleave",g),d.removeEventListener("pointerleave",m)}}},[l,d,p,h]),w.useEffect(()=>{if(o){const g=m=>{const v=m.target,x={x:m.clientX,y:m.clientY},b=(l==null?void 0:l.contains(v))||(d==null?void 0:d.contains(v)),y=!wz(x,o);b?h():y&&(h(),c())};return document.addEventListener("pointermove",g),()=>document.removeEventListener("pointermove",g)}},[l,d,o,c,h]),u.jsx(AA,{...e,ref:i})}),[pz,mz]=Dm(CA,{isInside:!1}),gz=H8("TooltipContent"),AA=w.forwardRef((e,t)=>{const{__scopeTooltip:r,children:n,"aria-label":a,onEscapeKeyDown:i,onPointerDownOutside:o,...s}=e,l=Lm(yl,r),c=Xw(r),{onClose:d}=l;return w.useEffect(()=>(document.addEventListener($j,d),()=>document.removeEventListener($j,d)),[d]),w.useEffect(()=>{if(l.trigger){const f=h=>{const p=h.target;p!=null&&p.contains(l.trigger)&&d()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[l.trigger,d]),u.jsx(Gl,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:f=>f.preventDefault(),onDismiss:d,children:u.jsxs(Gw,{"data-state":l.stateAttribute,...c,...s,ref:t,style:{...s.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[u.jsx(gz,{children:n}),u.jsx(pz,{scope:r,isInside:!0,children:u.jsx(fB,{id:l.contentId,role:"tooltip",children:a||n})})]})})});TA.displayName=yl;var MA="TooltipArrow",vz=w.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,a=Xw(r);return mz(MA,r).isInside?null:u.jsx(Yw,{...a,...n,ref:t})});vz.displayName=MA;function yz(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),a=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(r,n,a,i)){case i:return"left";case a:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function bz(e,t,r=5){const n=[];switch(t){case"top":n.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":n.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":n.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":n.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return n}function xz(e){const{top:t,right:r,bottom:n,left:a}=e;return[{x:a,y:t},{x:r,y:t},{x:r,y:n},{x:a,y:n}]}function wz(e,t){const{x:r,y:n}=e;let a=!1;for(let i=0,o=t.length-1;i<t.length;o=i++){const s=t[i],l=t[o],c=s.x,d=s.y,f=l.x,h=l.y;d>n!=h>n&&r<(f-c)*(n-d)/(h-d)+c&&(a=!a)}return a}function _z(e){const t=e.slice();return t.sort((r,n)=>r.x<n.x?-1:r.x>n.x?1:r.y<n.y?-1:r.y>n.y?1:0),Sz(t)}function Sz(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const a=e[n];for(;t.length>=2;){const i=t[t.length-1],o=t[t.length-2];if((i.x-o.x)*(a.y-o.y)>=(i.y-o.y)*(a.x-o.x))t.pop();else break}t.push(a)}t.pop();const r=[];for(let n=e.length-1;n>=0;n--){const a=e[n];for(;r.length>=2;){const i=r[r.length-1],o=r[r.length-2];if((i.x-o.x)*(a.y-o.y)>=(i.y-o.y)*(a.x-o.x))r.pop();else break}r.push(a)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}var jz=PA,$A=TA;
423const kz=jz,Ez=w.forwardRef(({className:e,sideOffset:t=4,...r},n)=>u.jsx($A,{ref:n,sideOffset:t,className:q("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r}));Ez.displayName=$A.displayName;function Oz(e,t,r,n){function a(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function s(d){try{c(n.next(d))}catch(f){o(f)}}function l(d){try{c(n.throw(d))}catch(f){o(f)}}function c(d){d.done?i(d.value):a(d.value).then(s,l)}c((n=n.apply(e,t||[])).next())})}const Nz=e=>e?(...t)=>e(...t):(...t)=>fetch(...t);class Jw extends Error{constructor(t,r="FunctionsError",n){super(t),this.name=r,this.context=n}toJSON(){return{name:this.name,message:this.message,context:this.context}}}class Pz extends Jw{constructor(t){super("Failed to send a request to the Edge Function","FunctionsFetchError",t)}}class Rj extends Jw{constructor(t){super("Relay Error invoking the Edge Function","FunctionsRelayError",t)}}class Ij extends Jw{constructor(t){super("Edge Function returned a non-2xx status code","FunctionsHttpError",t)}}var $0;(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"})($0||($0={}));class Cz{constructor(t,{headers:r={},customFetch:n,region:a=$0.Any}={}){this.url=t,this.headers=r,this.region=a,this.fetch=Nz(n)}setAuth(t){this.headers.Authorization=`Bearer ${t}`}invoke(t){return Oz(this,arguments,void 0,function*(r,n={}){var a;let i,o;try{const{headers:s,method:l,body:c,signal:d,timeout:f}=n;let h={},{region:p}=n;p||(p=this.region);const g=new URL(`${this.url}/${r}`);p&&p!=="any"&&(h["x-region"]=p,g.searchParams.set("forceFunctionRegion",p));let m;c&&(s&&!Object.prototype.hasOwnProperty.call(s,"Content-Type")||!s)?typeof Blob<"u"&&c instanceof Blob||c instanceof ArrayBuffer?(h["Content-Type"]="application/octet-stream",m=c):typeof c=="string"?(h["Content-Type"]="text/plain",m=c):typeof FormData<"u"&&c instanceof FormData?m=c:(h["Content-Type"]="application/json",m=JSON.stringify(c)):c&&typeof c!="string"&&!(typeof Blob<"u"&&c instanceof Blob)&&!(c instanceof ArrayBuffer)&&!(typeof FormData<"u"&&c instanceof FormData)?m=JSON.stringify(c):m=c;let v=d;f&&(o=new AbortController,i=setTimeout(()=>o.abort(),f),d?(v=o.signal,d.addEventListener("abort",()=>o.abort())):v=o.signal);const x=yield this.fetch(g.toString(),{method:l||"POST",headers:Object.assign(Object.assign(Object.assign({},h),this.headers),s),body:m,signal:v}).catch(_=>{throw new Pz(_)}),b=x.headers.get("x-relay-error");if(b&&b==="true")throw new Rj(x);if(!x.ok)throw new Ij(x);let y=((a=x.headers.get("Content-Type"))!==null&&a!==void 0?a:"text/plain").split(";")[0].trim(),S;return y==="application/json"?S=yield x.json():y==="application/octet-stream"||y==="application/pdf"?S=yield x.blob():y==="text/event-stream"?S=x:y==="multipart/form-data"?S=yield x.formData():S=yield x.text(),{data:S,error:null,response:x}}catch(s){return{data:null,error:s,response:s instanceof Ij||s instanceof Rj?s.context:void 0}}finally{i&&clearTimeout(i)}})}}const RA=3,Dj=e=>Math.min(1e3*2**e,3e4),Tz=[520,503],IA=["GET","HEAD","OPTIONS"];var Az=class extends Error{constructor(e){super(e.message),this.name="PostgrestError",this.details=e.details,this.hint=e.hint,this.co
423de=e.code}toJSON(){return{name:this.name,message:this.message,details:this.details,hint:this.hint,code:this.code}}};function Lj(e,t){return new Promise(r=>{if(t!=null&&t.aborted){r();return}const n=setTimeout(()=>{t==null||t.removeEventListener("abort",a),r()},e);function a(){clearTimeout(n),r()}t==null||t.addEventListener("abort",a)})}function Mz(e,t,r,n){return!(!n||r>=RA||!IA.includes(e)||!Tz.includes(t))}var $z=class{constructor(e){var t,r,n,a,i;this.shouldThrowOnError=!1,this.retryEnabled=!0,this.method=e.method,this.url=e.url,this.headers=new Headers(e.headers),this.schema=e.schema,this.body=e.body,this.shouldThrowOnError=(t=e.shouldThrowOnError)!==null&&t!==void 0?t:!1,this.signal=e.signal,this.isMaybeSingle=(r=e.isMaybeSingle)!==null&&r!==void 0?r:!1,this.shouldStripNulls=(n=e.shouldStripNulls)!==null&&n!==void 0?n:!1,this.urlLengthLimit=(a=e.urlLengthLimit)!==null&&a!==void 0?a:8e3,this.retryEnabled=(i=e.retry)!==null&&i!==void 0?i:!0,e.fetch?this.fetch=e.fetch:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}stripNulls(){if(this.headers.get("Accept")==="text/csv")throw new Error("stripNulls() cannot be used with csv()");return this.shouldStripNulls=!0,this}setHeader(e,t){return this.headers=new Headers(this.headers),this.headers.set(e,t),this}retry(e){return this.retryEnabled=e,this}then(e,t){var r=this;if(this.schema===void 0||(["GET","HEAD"].includes(this.method)?this.headers.set("Accept-Profile",this.schema):this.headers.set("Content-Profile",this.schema)),this.method!=="GET"&&this.method!=="HEAD"&&this.headers.set("Content-Type","application/json"),this.shouldStripNulls){const o=this.headers.get("Accept");o==="application/vnd.pgrst.object+json"?this.headers.set("Accept","application/vnd.pgrst.object+json;nulls=stripped"):(!o||o==="application/json")&&this.headers.set("Accept","application/vnd.pgrst.array+json;nulls=stripped")}const n=this.fetch;let i=(async()=>{let o=0;for(;;){const c=new Headers(r.headers);o>0&&c.set("X-Retry-Count",String(o));let d;try{d=await n(r.url.toString(),{method:r.method,headers:c,body:JSON.stringify(r.body,(f,h)=>typeof h=="bigint"?h.toString():h),signal:r.signal})}catch(f){if((f==null?void 0:f.name)==="AbortError"||(f==null?void 0:f.code)==="ABORT_ERR"||!IA.includes(r.method))throw f;if(r.retryEnabled&&o<RA){const h=Dj(o);o++,await Lj(h,r.signal);continue}throw f}if(Mz(r.method,d.status,o,r.retryEnabled)){var s,l;const f=(s=(l=d.headers)===null||l===void 0?void 0:l.get("Retry-After"))!==null&&s!==void 0?s:null,h=f!==null?Math.max(0,parseInt(f,10)||0)*1e3:Dj(o);await d.text(),o++,await Lj(h,r.signal);continue}return await r.processResponse(d)}})();return this.shouldThrowOnError||(i=i.catch(o=>{var s;let l="",c="",d="";const f=o==null?void 0:o.cause;if(f){var h,p,g,m;const b=(h=f==null?void 0:f.message)!==null&&h!==void 0?h:"",y=(p=f==null?void 0:f.code)!==null&&p!==void 0?p:"";l=`${(g=o==null?void 0:o.name)!==null&&g!==void 0?g:"FetchError"}: ${o==null?void 0:o.message}`,l+=`
424
425Caused by: ${(m=f==null?void 0:f.name)!==null&&m!==void 0?m:"Error"}: ${b}`,y&&(l+=` (${y})`),f!=null&&f.stack&&(l+=`
426${f.stack}`)}else{var v;l=(v=o==null?void 0:o.stack)!==null&&v!==void 0?v:""}const x=this.url.toString().length;return(o==null?void 0:o.name)==="AbortError"||(o==null?void 0:o.code)==="ABORT_ERR"?(d="",c="Request was aborted (timeout or manual cancellation)",x>this.urlLengthLimit&&(c+=`. Note: Your request URL is ${x} characters, which may exceed server limits. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [many IDs])), consider using an RPC function to pass values server-side.`)):((f==null?void 0:f.name)==="HeadersOverflowError"||(f==null?void 0:f.code)==="UND_ERR_HEADERS_OVERFLOW")&&(d="",c="HTTP headers exceeded server limits (typically 16KB)",x>this.urlLengthLimit&&(c+=`. Your request URL is ${x} characters. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [200+ IDs])), consider using an RPC function instead.`)),{success:!1,error:{message:`${(s=o==null?void 0:o.name)!==null&&s!==void 0?s:"FetchError"}: ${o==null?void 0:o.message}`,details:l,hint:c,code:d},data:null,count:null,status:0,statusText:""}}
426)),i.then(e,t)}async processResponse(e){var t=this;let r=null,n=null,a=null,i=e.status,o=e.statusText;if(e.ok){var s,l;if(t.method!=="HEAD"){var c;const h=await e.text();h===""||(t.headers.get("Accept")==="text/csv"||t.headers.get("Accept")&&(!((c=t.headers.get("Accept"))===null||c===void 0)&&c.includes("application/vnd.pgrst.plan+text"))?n=h:n=JSON.parse(h))}const d=(s=t.headers.get("Prefer"))===null||s===void 0?void 0:s.match(/count=(exact|planned|estimated)/),f=(l=e.headers.get("content-range"))===null||l===void 0?void 0:l.split("/");d&&f&&f.length>1&&(a=parseInt(f[1])),t.isMaybeSingle&&Array.isArray(n)&&(n.length>1?(r={code:"PGRST116",details:`Results contain ${n.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},n=null,a=null,i=406,o="Not Acceptable"):n.length===1?n=n[0]:n=null)}else{const d=await e.text();try{r=JSON.parse(d),Array.isArray(r)&&e.status===404&&(n=[],r=null,i=200,o="OK")}catch{e.status===404&&d===""?(i=204,o="No Content"):r={message:d}}if(r&&t.shouldThrowOnError)throw new Az(r)}return{success:r===null,error:r,data:n,count:a,status:i,statusText:o}}returns(){return this}overrideTypes(){return this}},Rz=class extends $z{select(e){let t=!1;const r=(e??"*").split("").map(n=>/\s/.test(n)&&!t?"":(n==='"'&&(t=!t),n)).join("");return this.url.searchParams.set("select",r),this.headers.append("Prefer","return=representation"),this}order(e,{ascending:t=!0,nullsFirst:r,foreignTable:n,referencedTable:a=n}={}){const i=a?`${a}.order`:"order",o=this.url.searchParams.get(i);return this.url.searchParams.set(i,`${o?`${o},`:""}${e}.${t?"asc":"desc"}${r===void 0?"":r?".nullsfirst":".nullslast"}`),this}limit(e,{foreignTable:t,referencedTable:r=t}={}){const n=typeof r>"u"?"limit":`${r}.limit`;return this.url.searchParams.set(n,`${e}`),this}range(e,t,{foreignTable:r,referencedTable:n=r}={}){const a=typeof n>"u"?"offset":`${n}.offset`,i=typeof n>"u"?"limit":`${n}.limit`;return this.url.searchParams.set(a,`${e}`),this.url.searchParams.set(i,`${t-e+1}`),this}abortSignal(e){return this.signal=e,this}single(){return this.headers.set("Accept","application/vnd.pgrst.object+json"),this}maybeSingle(){return this.isMaybeSingle=!0,this}csv(){return this.headers.set("Accept","text/csv"),this}geojson(){return this.headers.set("Accept","application/geo+json"),this}explain({analyze:e=!1,verbose:t=!1,settings:r=!1,buffers:n=!1,wal:a=!1,format:i="text"}={}){var o;const s=[e?"analyze":null,t?"verbose":null,r?"settings":null,n?"buffers":null,a?"wal":null].filter(Boolean).join("|"),l=(o=this.headers.get("Accept"))!==null&&o!==void 0?o:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${i}; for="${l}"; options=${s};`),i==="json"?this:this}rollback(){return this.headers.append("Prefer","tx=rollback"),this}returns(){return this}maxAffected(e){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer",`max-affected=${e}`),this}};const Bj=new RegExp("[,()]");var bs=class extends Rz{eq(e,t){return this.url.searchParams.append(e,`eq.${t}`),this}neq(e,t){return this.url.searchParams.append(e,`neq.${t}`),this}gt(e,t){return this.url.searchParams.append(e,`gt.${t}`),this}gte(e,t){return this.url.searchParams.append(e,`gte.${t}`),this}lt(e,t){return this.url.searchParams.append(e,`lt.${t}`),this}lte(e,t){return this.url.searchParams.append(e,`lte.${t}`),this}like(e,t){return this.url.searchParams.append(e,`like.${t}`),this}likeAllOf(e,t){return this.url.searchParams.append(e,`like(all).{${t.join(",")}}`),this}likeAnyOf(e,t){return this.url.searchParams.append(e,`like(any).{${t.join(",")}}`),this}ilike(e,t){return this.url.searchParams.append(e,`ilike.${t}`),this}ilikeAllOf(e,t){return this.url.searchParams.append(e,`ilike(all).{${t.join(",")}}`),this}ilikeAnyOf(e,t){return this.url.searchParams.append(e,`ilike(any).{${t.join(",")}}`),this}regexMatch(e,t){return this.url.searchParams.append(e,`match.${t}`),this}regexIMatch(e,t){return this.url.searchParams.append(e,`imatch.${t}`),this}is(e,t){return this.url.searchParams.append(e,`is.${t}`),this}isDistinct(e,t){return this.url.searchParams.append(e,`isdistinct.${t}`),this}in(e,t){const r=Array.from(new Set(t)).map(n=>typeof n=="string"&&Bj.test(n)?`"${n}"`:`${n}`).join(",");return this.url.searchParams.append(e,`in.(${r})`),this}notIn(e,t){const r=Array.from(new Set(t)).map(n=>typeof n=="string"&&Bj.test(n)?`"${n}"`:`${n}`).join(",");return this.url.searchParams.append(e,`not.in.(${r})`),this}contains(e,t){return typeof t=="string"?this.url.searchParams.append(e,`cs.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cs.{${t.join(",")}}`):this.url.searchParams.append(e,`cs.${JSON.stringify(t)}`),this}containedBy(e,t){return typeof t=="string"?this.url.searchParams.append(e,`cd.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cd.{${t.join(",")}}`):this.url.searchParams.append(e,`cd.${JSON.stringify(t)}`),this}rangeGt(e,t){return this.url.searchParams.append(e,`sr.${t}`),this}rangeGte(e,t){return this.url.searchParams.append(e,`nxl.${t}`),this}rangeLt(e,t){return this.url.searchParams.append(e,`sl.${t}`),this}rangeLte(e,t){return this.url.searchParams.append(e,`nxr.${t}`),this}rangeAdjacent(e,t){return this.url.searchParams.append(e,`adj.${t}`),this}overlaps(e,t){return typeof t=="string"?this.url.searchParams.append(e,`ov.${t}`):this.url.searchParams.append(e,`ov.{${t.join(",")}}`),this}textSearch(e,t,{config:r,type:n}={}){let a="";n==="plain"?a="pl":n==="phrase"?a="ph":n==="websearch"&&(a="w");const i=r===void 0?"":`(${r})`;return this.url.searchParams.append(e,`${a}fts${i}.${t}`),this}match(e){return Object.entries(e).filter(([t,r])=>
426r!==void 0).forEach(([t,r])=>{this.url.searchParams.append(t,`eq.${r}`)}),this}not(e,t,r){return this.url.searchParams.append(e,`not.${t}.${r}`),this}or(e,{foreignTable:t,referencedTable:r=t}={}){const n=r?`${r}.or`:"or";return this.url.searchParams.append(n,`(${e})`),this}filter(e,t,r){return this.url.searchParams.append(e,`${t}.${r}`),this}},Iz=class{constructor(e,{headers:t={},schema:r,fetch:n,urlLengthLimit:a=8e3,retry:i}){this.url=e,this.headers=new Headers(t),this.schema=r,this.fetch=n,this.urlLengthLimit=a,this.retry=i}cloneRequestState(){return{url:new URL(this.url.toString()),headers:new Headers(this.headers)}}select(e,t){const{head:r=!1,count:n}=t??{},a=r?"HEAD":"GET";let i=!1;const o=(e??"*").split("").map(c=>/\s/.test(c)&&!i?"":(c==='"'&&(i=!i),c)).join(""),{url:s,headers:l}=this.cloneRequestState();return s.searchParams.set("select",o),n&&l.append("Prefer",`count=${n}`),new bs({method:a,url:s,headers:l,schema:this.schema,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}insert(e,{count:t,defaultToNull:r=!0}={}){var n;const a="POST",{url:i,headers:o}=this.cloneRequestState();if(t&&o.append("Prefer",`count=${t}`),r||o.append("Prefer","missing=default"),Array.isArray(e)){const s=e.reduce((l,c)=>l.concat(Object.keys(c)),[]);if(s.length>0){const l=[...new Set(s)].map(c=>`"${c}"`);i.searchParams.set("columns",l.join(","))}}return new bs({method:a,url:i,headers:o,schema:this.schema,body:e,fetch:(n=this.fetch)!==null&&n!==void 0?n:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}upsert(e,{onConflict:t,ignoreDuplicates:r=!1,count:n,defaultToNull:a=!0}={}){var i;const o="POST",{url:s,headers:l}=this.cloneRequestState();if(l.append("Prefer",`resolution=${r?"ignore":"merge"}-duplicates`),t!==void 0&&s.searchParams.set("on_conflict",t),n&&l.append("Prefer",`count=${n}`),a||l.append("Prefer","missing=default"),Array.isArray(e)){const c=e.reduce((d,f)=>d.concat(Object.keys(f)),[]);if(c.length>0){const d=[...new Set(c)].map(f=>`"${f}"`);s.searchParams.set("columns",d.join(","))}}return new bs({method:o,url:s,headers:l,schema:this.schema,body:e,fetch:(i=this.fetch)!==null&&i!==void 0?i:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}update(e,{count:t}={}){var r;const n="PATCH",{url:a,headers:i}=this.cloneRequestState();return t&&i.append("Prefer",`count=${t}`),new bs({method:n,url:a,headers:i,schema:this.schema,body:e,fetch:(r=this.fetch)!==null&&r!==void 0?r:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}delete({count:e}={}){var t;const r="DELETE",{url:n,headers:a}=this.cloneRequestState();return e&&a.append("Prefer",`count=${e}`),new bs({method:r,url:n,headers:a,schema:this.schema,fetch:(t=this.fetch)!==null&&t!==void 0?t:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};function Au(e){"@babel/helpers - typeof";return Au=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Au(e)}function Dz(e,t){if(Au(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Au(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Lz(e){var t=Dz(e,"string");return Au(t)=="symbol"?t:t+""}function Bz(e,t,r){return(t=Lz(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Fj(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function _f(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Fj(Object(r),!0).forEach(function(n){Bz(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Fj(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Fz=class DA{constructor(t,{headers:r={},schema:n,fetch:a,timeout:i,urlLengthLimit:o=8e3,retry:s}={}){this.url=t,this.headers=new Headers(r),this.schemaName=n,this.urlLengthLimit=o;const l=a??globalThis.fetch;i!==void 0&&i>0?this.fetch=(c,d)=>{const f=new AbortController,h=setTimeout(()=>f.abort(),i),p=d==null?void 0:d.signal;if(p){if(p.aborted)return clearTimeout(h),l(c,d);const g=()=>{clearTimeout(h),f.abort()};return p.addEventListener("abort",g,{once:!0}),l(c,_f(_f({},d),{}
426,{signal:f.signal})).finally(()=>{clearTimeout(h),p.removeEventListener("abort",g)})}return l(c,_f(_f({},d),{},{signal:f.signal})).finally(()=>clearTimeout(h))}:this.fetch=l,this.retry=s}from(t){if(!t||typeof t!="string"||t.trim()==="")throw new Error("Invalid relation name: relation must be a non-empty string.");return new Iz(new URL(`${this.url}/${t}`),{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}schema(t){return new DA(this.url,{headers:this.headers,schema:t,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}rpc(t,r={},{head:n=!1,get:a=!1,count:i}={}){var o;let s;const l=new URL(`${this.url}/rpc/${t}`);let c;const d=p=>p!==null&&typeof p=="object"&&(!Array.isArray(p)||p.some(d)),f=n&&Object.values(r).some(d);f?(s="POST",c=r):n||a?(s=n?"HEAD":"GET",Object.entries(r).filter(([p,g])=>g!==void 0).map(([p,g])=>[p,Array.isArray(g)?`{${g.join(",")}}`:`${g}`]).forEach(([p,g])=>{l.searchParams.append(p,g)})):(s="POST",c=r);const h=new Headers(this.headers);return f?h.set("Prefer",i?`count=${i},return=minimal`:"return=minimal"):i&&h.set("Prefer",`count=${i}`),new bs({method:s,url:l,headers:h,schema:this.schemaName,body:c,fetch:(o=this.fetch)!==null&&o!==void 0?o:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};class Uz{constructor(){}static detectEnvironment(){var t;if(typeof WebSocket<"u")return{type:"native",constructor:WebSocket};if(typeof globalThis<"u"&&typeof globalThis.WebSocket<"u")return{type:"native",constructor:globalThis.WebSocket};if(typeof global<"u"&&typeof global.WebSocket<"u")return{type:"native",constructor:global.WebSocket};if(typeof globalThis<"u"&&typeof globalThis.WebSocketPair<"u"&&typeof globalThis.WebSocket>"u")return{type:"cloudflare",error:"Cloudflare Workers detected. WebSocket clients are not supported in Cloudflare Workers.",workaround:"Use Cloudflare Workers WebSocket API for server-side WebSocket handling, or deploy to a different runtime."};if(typeof globalThis<"u"&&globalThis.EdgeRuntime||typeof navigator<"u"&&(!((t=navigator.userAgent)===null||t===void 0)&&t.includes("Vercel-Edge")))return{type:"unsupported",error:"Edge runtime detected (Vercel Edge/Netlify Edge). WebSockets are not supported in edge functions.",workaround:"Use serverless functions or a different deployment target for WebSocket functionality."};const r=globalThis.process;if(r){const n=r.versions;if(n&&n.node){const a=n.node,i=parseInt(a.replace(/^v/,"").split(".")[0]);return i>=22?typeof globalThis.WebSocket<"u"?{type:"native",constructor:globalThis.WebSocket}:{type:"unsupported",error:`Node.js ${i} detected but native WebSocket not found.`,workaround:"Provide a WebSocket implementation via the transport option."}:{type:"unsupported",error:`Node.js ${i} detected without native WebSocket support.`,workaround:`For Node.js < 22, install "ws" package and provide it via the transport option:
427import ws from "ws"
428new RealtimeClient(url, { transport: ws })`}}}return{type:"unsupported",error:"Unknown JavaScript runtime without WebSocket support.",workaround:"Ensure you're running in a supported environment (browser, Node.js, Deno) or provide a custom WebSocket implementation."}}static getWebSocketConstructor(){const t=this.detectEnvironment();if(t.constructor)return t.constructor;let r=t.error||"WebSocket not supported in this environment.";throw t.workaround&&(r+=`
429
430Suggested solution: ${t.workaround}`),new Error(r)}static isWebSocketSupported(){try{const t=this.detectEnvironment();return t.type==="native"||t.type==="ws"}catch{return!1}}}const zz="2.104.1",Wz=`realtime-js/${zz}`,Hz="1.0.0",LA="2.0.0",qz=LA,Vz=1e4,Kz=100,oi={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},BA={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave",access_token:"access_token"},R0={connecting:"connecting",open:"open",closing:"closing",closed:"closed"};class Gz{constructor(t){this.HEADER_LENGTH=1,this.USER_BROADCAST_PUSH_META_LENGTH=6,this.KINDS={userBroadcastPush:3,userBroadcast:4},this.BINARY_ENCODING=0,this.JSON_ENCODING=1,this.BROADCAST_EVENT="broadcast",this.allowedMetadataKeys=[],this.allowedMetadataKeys=t??[]}encode(t,r){if(t.event===this.BROADCAST_EVENT&&!(t.payload instanceof ArrayBuffer)&&typeof t.payload.event=="string")return r(this._binaryEncodeUserBroadcastPush(t));let n=[t.join_ref,t.ref,t.topic,t.event,t.payload];return r(JSON.stringify(n))}_binaryEncodeUserBroadcastPush(t){var r;return this._isArrayBuffer((r=t.payload)===null||r===void 0?void 0:r.payload)?this._encodeBinaryUserBroadcastPush(t):this._encodeJsonUserBroadcastPush(t)}_encodeBinaryUserBroadcastPush(t){var r,n;const a=(n=(r=t.payload)===null||r===void 0?void 0:r.payload)!==null&&n!==void 0?n:new ArrayBuffer(0);return this._encodeUserBroadcastPush(t,this.BINARY_ENCODING,a)}_encodeJsonUserBroadcastPush(t){var r,n;const a=(n=(r=t.payload)===null||r===void 0?void 0:r.payload)!==null&&n!==void 0?n:{},o=new TextEncoder().encode(JSON.stringify(a)).buffer;return this._encodeUserBroadcastPush(t,this.JSON_ENCODING,o)}_encodeUserBroadcastPush(t,r,n){var a,i;const o=t.topic,s=(a=t.ref)!==null&&a!==void 0?a:"",l=(i=t.join_ref)!==null&&i!==void 0?i:"",c=t.payload.event,d=this.allowedMetadataKeys?this._pick(t.payload,this.allowedMetadataKeys):{},f=Object.keys(d).length===0?"":JSON.stringify(d);if(l.length>255)throw new Error(`joinRef length ${l.length} exceeds maximum of 255`);if(s.length>255)throw new Error(`ref length ${s.length} exceeds maximum of 255`);if(o.length>255)throw new Error(`topic length ${o.length} exceeds maximum of 255`);if(c.length>255)throw new Error(`userEvent length ${c.length} exceeds maximum of 255`);if(f.length>255)throw new Error(`metadata length ${f.length} exceeds maximum of 255`);const h=this.USER_BROADCAST_PUSH_META_LENGTH+l.length+s.length+o.length+c.length+f.length,p=new ArrayBuffer(this.HEADER_LENGTH+h);let g=new DataView(p),m=0;g.setUint8(m++,this.KINDS.userBroadcastPush),g.setUint8(m++,l.length),g.setUint8(m++,s.length),g.setUint8(m++,o.length),g.setUint8(m++,c.length),g.setUint8(m++,f.length),g.setUint8(m++,r),Array.from(l,x=>g.setUint8(m++,x.charCodeAt(0))),Array.from(s,x=>g.setUint8(m++,x.charCodeAt(0))),Array.from(o,x=>g.setUint8(m++,x.charCodeAt(0))),Array.from(c,x=>g.setUint8(m++,x.charCodeAt(0))),Array.from(f,x=>g.setUint8(m++,x.charCodeAt(0)));var v=new Uint8Array(p.byteLength+n.byteLength);return v.set(new Uint8Array(p),0),v.set(new Uint8Array(n),p.byteLength),v.buffer}decode(t,r){if(this._isArrayBuffer(t)){let n=this._binaryDecode(t);return r(n)}if(typeof t=="string"){const n=JSON.parse(t),[a,i,o,s,l]=n;return r({join_ref:a,ref:i,topic:o,event:s,payload:l})}return r({})}_binaryDecode(t){const r=new DataView(t),n=r.getUint8(0),a=new TextDecoder;switch(n){case this.KINDS.userBroadcast:return this._decodeUserBroadcast(t,r,a)}}_decodeUserBroadcast(t,r,n){const a=r.getUint8(1),i=r.getUint8(2),o=r.getUint8(3),s=r.getUint8(4);let l=this.HEADER_LENGTH+4;const c=n.decode(t.slice(l,l+a));l=l+a;const d=n.decode(t.slice(l,l+i));l=l+i;
430const f=n.decode(t.slice(l,l+o));l=l+o;const h=t.slice(l,t.byteLength),p=s===this.JSON_ENCODING?JSON.parse(n.decode(h)):h,g={type:this.BROADCAST_EVENT,event:d,payload:p};return o>0&&(g.meta=JSON.parse(f)),{join_ref:null,ref:null,topic:c,event:this.BROADCAST_EVENT,payload:g}}_isArrayBuffer(t){var r;return t instanceof ArrayBuffer||((r=t==null?void 0:t.constructor)===null||r===void 0?void 0:r.name)==="ArrayBuffer"}_pick(t,r){return!t||typeof t!="object"?{}:Object.fromEntries(Object.entries(t).filter(([n])=>r.includes(n)))}}var We;(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"})(We||(We={}));const Uj=(e,t,r={})=>{var n;const a=(n=r.skipTypes)!==null&&n!==void 0?n:[];return t?Object.keys(t).reduce((i,o)=>(i[o]=Yz(o,e,t,a),i),{}):{}},Yz=(e,t,r,n)=>{const a=t.find(s=>s.name===e),i=a==null?void 0:a.type,o=r[e];return i&&!n.includes(i)?FA(i,o):I0(o)},FA=(e,t)=>{if(e.charAt(0)==="_"){const r=e.slice(1,e.length);return Zz(t,r)}switch(e){case We.bool:return Xz(t);case We.float4:case We.float8:case We.int2:case We.int4:case We.int8:case We.numeric:case We.oid:return Jz(t);case We.json:case We.jsonb:return Qz(t);case We.timestamp:return eW(t);case We.abstime:case We.date:case We.daterange:case We.int4range:case We.int8range:case We.money:case We.reltime:case We.text:case We.time:case We.timestamptz:case We.timetz:case We.tsrange:case We.tstzrange:return I0(t);default:return I0(t)}},I0=e=>e,Xz=e=>{switch(e){case"t":return!0;case"f":return!1;default:return e}},Jz=e=>{if(typeof e=="string"){const t=parseFloat(e);if(!Number.isNaN(t))return t}return e},Qz=e=>{if(typeof e=="string")try{return JSON.parse(e)}catch{return e}return e},Zz=(e,t)=>{if(typeof e!="string")return e;const r=e.length-1,n=e[r];if(e[0]==="{"&&n==="}"){let i;const o=e.slice(1,r);try{i=JSON.parse("["+o+"]")}catch{i=o?o.split(","):[]}return i.map(s=>FA(t,s))}return e},eW=e=>typeof e=="string"?e.replace(" ","T"):e,UA=e=>{const t=new URL(e);return t.protocol=t.protocol.replace(/^ws/i,"http"),t.pathname=t.pathname.replace(/\/+$/,"").replace(/\/socket\/websocket$/i,"").replace(/\/socket$/i,"").replace(/\/websocket$/i,""),t.pathname===""||t.pathname==="/"?t.pathname="/api/broadcast":t.pathname=t.pathname+"/api/broadcast",t.href};var eu=e=>typeof e=="function"?e:function(){return e},tW=typeof self<"u"?self:null,xs=typeof window<"u"?window:null,Dn=tW||xs||globalThis,rW="2.0.0",nW=1e4,aW=1e3,zn={connecting:0,open:1,closing:2,closed:3},ar={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},pa={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave"},D0={longpoll:"longpoll",websocket:"websocket"},iW={complete:4},L0="base64url.bearer.phx.",Sf=class{constructor(e,t,r,n){this.channel=e,this.event=t,this.payload=r||function(){return{}},this.receivedResp=null,this.timeout=n,this.timeoutTimer=null,this.recHooks=[],this.sent=!1,this.ref=void 0}resend(e){this.timeout=e,this.reset(),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()}))}receive(e,t){return this.hasReceived(e)&&t(this.receivedResp.response),this.recHooks.push({status:e,callback:t}),this}reset(){this.cancelRefEvent(),this.ref=null,this.refEvent=null,this.receivedResp=null,this.sent=!1}destroy(){this.cancelRefEvent(),this.cancelTimeout()}matchReceive({status:e,response:t,_ref:r}){this.recHooks.filter(n=>n.status===e).forEach(n=>n.callback(t))}cancelRefEvent(){this.refEvent&&this.channel.off(this.refEvent)}cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=null}startTimeout(){this.timeoutTimer&&this.cancelTimeout(),this.ref=this.channel.socket.makeRef(),this.refEvent=this.channel.replyEventName(this.ref),this.channel.on(this.refEvent,e=>{this.cancelRefEvent(),this.cancelTimeout(),this.receivedResp=e,this.matchReceive(e)}),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}hasReceived(e){return this.receivedResp&&this.receivedResp.status===e}trigger(e,t){this.channel.trigger(this.refEvent,{status:e,response:t})}},zA=class{constructor(e,t){this.callback=e,this.timerCalc=t,this.timer=void 0,this.tries=0}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))}},oW=class{constructor(e,t,r){this.state=ar.closed,this.topic=e,this.params=eu(t||{}),this.socket=r,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new Sf(this,pa.join,this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new zA(()=>{this.socket.isConnected()&&this.rejoin()},this.socket.rejoinAfterMs),this.stateChangeRefs.push(this.socket.onError(()=>this.rejoinTimer.reset())),this.stateChangeRefs.push(this.socket.onOpen(()=>{this.rejoinTimer.reset(),this.isErrored()&&this.rejoin()})),this.joinPush.receive("ok",()=>{this.state=ar.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(n=>n.send()),this.pushBuffer=[]}),this.joinPush.receive("error",n=>{this.state=ar.errored,this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,n),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.onClose(()=>{this.rejoinTimer.reset(),this.socket.hasLogger()&&this.socket.log("channel",`close ${this.topic}`),this.state=ar.closed,this.socket.remove(this)}),this.onError(n=>{this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,n),this.isJoining()&&this.joinPush.reset(),this.state=ar.errored,this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.joinPush.receive("timeout",()=>{this.socket.hasLogger()&&this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),new Sf(this,pa.leave,eu({}),this.timeout).send(),this.state=ar.errored,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.on(pa.reply,(n,a)=>{this.trigger(this.replyEventName(a),n)})}join(e=this.timeout){if(this.joinedOnce)throw new Error("tried to join multiple times. 'join' can only be called a single time per channel instance");return this.timeout=e,this.joinedOnce=!0,this.rejoin(),this.joinPush}
vendor: 5,263 bytes, line 430
430teardown(){this.pushBuffer.forEach(e=>e.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=ar.closed,this.bindings=[]}onClose(e){this.on(pa.close,e)}onError(e){return this.on(pa.error,t=>e(t))}on(e,t){let r=this.bindingRef++;return this.bindings.push({event:e,ref:r,callback:t}),r}off(e,t){this.bindings=this.bindings.filter(r=>!(r.event===e&&(typeof t>"u"||t===r.ref)))}canPush(){return this.socket.isConnected()&&this.isJoined()}push(e,t,r=this.timeout){if(t=t||{},!this.joinedOnce)throw new Error(`tried to push '${e}' to '${this.topic}' before joining. Use channel.join() before pushing events`);let n=new Sf(this,e,function(){return t},r);return this.canPush()?n.send():(n.startTimeout(),this.pushBuffer.push(n)),n}leave(e=this.timeout){this.rejoinTimer.reset(),this.joinPush.cancelTimeout(),this.state=ar.leaving;let t=()=>{this.socket.hasLogger()&&this.socket.log("channel",`leave ${this.topic}`),this.trigger(pa.close,"leave")},r=new Sf(this,pa.leave,eu({}),e);return r.receive("ok",()=>t()).receive("timeout",()=>t()),r.send(),this.canPush()||r.trigger("ok",{}),r}onMessage(e,t,r){return t}filterBindings(e,t,r){return!0}isMember(e,t,r,n){return this.topic!==e?!1:n&&n!==this.joinRef()?(this.socket.hasLogger()&&this.socket.log("channel","dropping outdated message",{topic:e,event:t,payload:r,joinRef:n}),!1):!0}joinRef(){return this.joinPush.ref}rejoin(e=this.timeout){this.isLeaving()||(this.socket.leaveOpenTopic(this.topic),this.state=ar.joining,this.joinPush.resend(e))}trigger(e,t,r,n){let a=this.onMessage(e,t,r,n);if(t&&!a)throw new Error("channel onMessage callbacks must return the payload, modified or unmodified");let i=this.bindings.filter(o=>o.event===e&&this.filterBindings(o,t,r));for(let o=0;o<i.length;o++)i[o].callback(a,r,n||this.joinRef())}replyEventName(e){return`chan_reply_${e}`}isClosed(){return this.state===ar.closed}isErrored(){return this.state===ar.errored}isJoined(){return this.state===ar.joined}isJoining(){return this.state===ar.joining}isLeaving(){return this.state===ar.leaving}},Xh=class{static request(e,t,r,n,a,i,o){if(Dn.XDomainRequest){let s=new Dn.XDomainRequest;return this.xdomainRequest(s,e,t,n,a,i,o)}else if(Dn.XMLHttpRequest){let s=new Dn.XMLHttpRequest;return this.xhrRequest(s,e,t,r,n,a,i,o)}else{if(Dn.fetch&&Dn.AbortController)return this.fetchRequest(e,t,r,n,a,i,o);throw new Error("No suitable XMLHttpRequest implementation found")}}static fetchRequest(e,t,r,n,a,i,o){let s={method:e,headers:r,body:n},l=null;return a&&(l=new AbortController,setTimeout(()=>l.abort(),a),s.signal=l.signal),Dn.fetch(t,s).then(c=>c.text()).then(c=>this.parseJSON(c)).then(c=>o&&o(c)).catch(c=>{c.name==="AbortError"&&i?i():o&&o(null)}),l}static xdomainRequest(e,t,r,n,a,i,o){return e.timeout=a,e.open(t,r),e.onload=()=>{let s=this.parseJSON(e.responseText);o&&o(s)},i&&(e.ontimeout=i),e.onprogress=()=>{},e.send(n),e}static xhrRequest(e,t,r,n,a,i,o,s){e.open(t,r,!0),e.timeout=i;for(let[l,c]of Object.entries(n))e.setRequestHeader(l,c);return e.onerror=()=>s&&s(null),e.onreadystatechange=()=>{if(e.readyState===iW.complete&&s){let l=this.parseJSON(e.responseText);s(l)}},o&&(e.ontimeout=o),e.send(a),e}static parseJSON(e){if(!e||e==="")return null;try{return JSON.parse(e)}catch{return console&&console.log("failed to parse JSON response",e),null}}static serialize(e,t){let r=[];for(var n in e){if(!Object.prototype.hasOwnProperty.call(e,n))continue;let a=t?`${t}[${n}]`:n,i=e[n];typeof i=="object"?r.push(this.serialize(i,a)):r.push(encodeURIComponent(a)+"="+encodeURIComponent(i))}return r.join("&")}static appendParams(e,t){if(Object.keys(t).length===0)return e;let r=e.match(/\?/)?"&":"?";return`${e}${r}${this.serialize(t)}`}},sW=e=>{let t="",r=new Uint8Array(e),n=r.byteLength;for(let a=0;a<n;a++)t+=String.fromCharCode(r[a]);return btoa(t)},is=class{constructor(e,t){t&&t.length===2&&t[1].startsWith(L0)&&(this.authToken=atob(t[1].slice(L0.length))),this.endPoint=null,this.token=null,this.skipHeartbeat=!0,this.reqs=new Set,this.awaitingBatchAck=!1,this.currentBatch=null,this.currentBatchTimer=null,this.batchBuffer=[],this.onopen=function(){},this.onerror=function(){},this.onmessage=function(){},this.onclose=function(){},this.pollEndpoint=this.normalizeEndpoint(e),this.readyState=zn.connecting,setTimeout(()=>this.poll(),0)}normalizeEndpoint(e){return e.replace("ws://","http://").replace("wss://","https://").replace(new RegExp("(.*)/"+D0.websocket),"$1/"+D0.longpoll)}endpointURL(){return Xh.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(e,t,r){this.close(e,t,r),this.readyState=zn.connecting}ontimeout(){this.onerror("timeout"),this.closeAndRetry(1005,"timeout",!1)}isActive(){return this.readyState===zn.open||this.readyState===zn.connecting}poll(){const e={Accept:"application/json"};this.authToken&&(e["X-Phoenix-AuthToken"]=this.authToken),this.ajax("GET",e,null,()=>this.ontimeout(),t=>{if(t){var{status:r,token:n,messages:a}=t;if(r===410&&this.token!==null){this.onerror(410),this.closeAndRetry(3410,"session_gone",!1);return}this.token=n}else r=0;switch(r){case 200:a.forEach(i=>{setTimeout(()=>this.onmessage({data:i}),0)}),this.poll();break;case 204:this.poll();break;case 410:this.readyState=zn.open,this.onopen({}),this.poll();break;
430case 403:this.onerror(403),this.close(1008,"forbidden",!1);break;case 0:case 500:this.onerror(500),this.closeAndRetry(1011,"internal server error",500);break;default:throw new Error(`unhandled poll status ${r}`)}})}send(e){typeof e!="string"&&(e=sW(e)),this.currentBatch?this.currentBatch.push(e):this.awaitingBatchAck?this.batchBuffer.push(e):(this.currentBatch=[e],this.currentBatchTimer=setTimeout(()=>{this.batchSend(this.currentBatch),this.currentBatch=null},0))}batchSend(e){this.awaitingBatchAck=!0,this.ajax("POST",{"Content-Type":"application/x-ndjson"},e.join(`
431`),()=>this.onerror("timeout"),t=>{this.awaitingBatchAck=!1,!t||t.status!==200?(this.onerror(t&&t.status),this.closeAndRetry(1011,"internal server error",!1)):this.batchBuffer.length>0&&(this.batchSend(this.batchBuffer),this.batchBuffer=[])})}close(e,t,r){for(let a of this.reqs)a.abort();this.readyState=zn.closed;let n=Object.assign({code:1e3,reason:void 0,wasClean:!0},{code:e,reason:t,wasClean:r});this.batchBuffer=[],clearTimeout(this.currentBatchTimer),this.currentBatchTimer=null,typeof CloseEvent<"u"?this.onclose(new CloseEvent("close",n)):this.onclose(n)}ajax(e,t,r,n,a){let i,o=()=>{this.reqs.delete(i),n()};i=Xh.request(e,this.endpointURL(),t,r,this.timeout,o,s=>{this.reqs.delete(i),this.isActive()&&a(s)}),this.reqs.add(i)}},lW=class Fc{constructor(t,r={}){let n=r.events||{state:"presence_state",diff:"presence_diff"};this.state={},this.pendingDiffs=[],this.channel=t,this.joinRef=null,this.caller={onJoin:function(){},onLeave:function(){},onSync:function(){}},this.channel.on(n.state,a=>{let{onJoin:i,onLeave:o,onSync:s}=this.caller;this.joinRef=this.channel.joinRef(),this.state=Fc.syncState(this.state,a,i,o),this.pendingDiffs.forEach(l=>{this.state=Fc.syncDiff(this.state,l,i,o)}),this.pendingDiffs=[],s()}),this.channel.on(n.diff,a=>{let{onJoin:i,onLeave:o,onSync:s}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(a):(this.state=Fc.syncDiff(this.state,a,i,o),s())})}onJoin(t){this.caller.onJoin=t}onLeave(t){this.caller.onLeave=t}onSync(t){this.caller.onSync=t}list(t){return Fc.list(this.state,t)}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel.joinRef()}static syncState(t,r,n,a){let i=this.clone(t),o={},s={};return this.map(i,(l,c)=>{r[l]||(s[l]=c)}),this.map(r,(l,c)=>{let d=i[l];if(d){let f=c.metas.map(m=>m.phx_ref),h=d.metas.map(m=>m.phx_ref),p=c.metas.filter(m=>h.indexOf(m.phx_ref)<0),g=d.metas.filter(m=>f.indexOf(m.phx_ref)<0);p.length>0&&(o[l]=c,o[l].metas=p),g.length>0&&(s[l]=this.clone(d),s[l].metas=g)}else o[l]=c}),this.syncDiff(i,{joins:o,leaves:s},n,a)}static syncDiff(t,r,n,a){let{joins:i,leaves:o}=this.clone(r);return n||(n=function(){}),a||(a=function(){}),this.map(i,(s,l)=>{let c=t[s];if(t[s]=this.clone(l),c){let d=t[s].metas.map(h=>h.phx_ref),f=c.metas.filter(h=>d.indexOf(h.phx_ref)<0);t[s].metas.unshift(...f)}n(s,c,l)}),this.map(o,(s,l)=>{let c=t[s];if(!c)return;let d=l.metas.map(f=>f.phx_ref);c.metas=c.metas.filter(f=>d.indexOf(f.phx_ref)<0),a(s,c,l),c.metas.length===0&&delete t[s]}),t}static list(t,r){return r||(r=function(n,a){return a}),this.map(t,(n,a)=>r(n,a))}static map(t,r){return Object.getOwnPropertyNames(t).map(n=>r(n,t[n]))}static clone(t){return JSON.parse(JSON.stringify(t))}},jf={HEADER_LENGTH:1,META_LENGTH:4,KINDS:{push:0,reply:1,broadcast:2},encode(e,t){if(e.payload.constructor===ArrayBuffer)return t(this.binaryEncode(e));{let r=[e.join_ref,e.ref,e.topic,e.event,e.payload];return t(JSON.stringify(r))}},decode(e,t){if(e.constructor===ArrayBuffer)return t(this.binaryDecode(e));{let[r,n,a,i,o]=JSON.parse(e);return t({join_ref:r,ref:n,topic:a,event:i,payload:o})}},binaryEncode(e){let{join_ref:t,ref:r,event:n,topic:a,payload:i}=e,o=this.META_LENGTH+t.length+r.length+a.length+n.length,s=new ArrayBuffer(this.HEADER_LENGTH+o),l=new DataView(s),c=0;l.setUint8(c++,this.KINDS.push),l.setUint8(c++,t.length),l.setUint8(c++,r.length),l.setUint8(c++,a.length),l.setUint8(c++,n.length),Array.from(t,f=>l.setUint8(c++,f.charCodeAt(0))),Array.from(r,f=>l.setUint8(c++,f.charCodeAt(0))),Array.from(a,f=>l.setUint8(c++,f.charCodeAt(0))),Array.from(n,f=>l.setUint8(c++,f.charCodeAt(0)));var d=new Uint8Array(s.byteLength+i.byteLength);return d.set(new Uint8Array(s),0),d.set(new Uint8Array(i),s.byteLength),d.buffer},binaryDecode(e){let t=new DataView(e),r=t.getUint8(0),n=new TextDecoder;
vendor: 8,595 bytes, line 431
431switch(r){case this.KINDS.push:return this.decodePush(e,t,n);case this.KINDS.reply:return this.decodeReply(e,t,n);case this.KINDS.broadcast:return this.decodeBroadcast(e,t,n)}},decodePush(e,t,r){let n=t.getUint8(1),a=t.getUint8(2),i=t.getUint8(3),o=this.HEADER_LENGTH+this.META_LENGTH-1,s=r.decode(e.slice(o,o+n));o=o+n;let l=r.decode(e.slice(o,o+a));o=o+a;let c=r.decode(e.slice(o,o+i));o=o+i;let d=e.slice(o,e.byteLength);return{join_ref:s,ref:null,topic:l,event:c,payload:d}},decodeReply(e,t,r){let n=t.getUint8(1),a=t.getUint8(2),i=t.getUint8(3),o=t.getUint8(4),s=this.HEADER_LENGTH+this.META_LENGTH,l=r.decode(e.slice(s,s+n));s=s+n;let c=r.decode(e.slice(s,s+a));s=s+a;let d=r.decode(e.slice(s,s+i));s=s+i;let f=r.decode(e.slice(s,s+o));s=s+o;let h=e.slice(s,e.byteLength),p={status:f,response:h};return{join_ref:l,ref:c,topic:d,event:pa.reply,payload:p}},decodeBroadcast(e,t,r){let n=t.getUint8(1),a=t.getUint8(2),i=this.HEADER_LENGTH+2,o=r.decode(e.slice(i,i+n));i=i+n;let s=r.decode(e.slice(i,i+a));i=i+a;let l=e.slice(i,e.byteLength);return{join_ref:null,ref:null,topic:o,event:s,payload:l}}},cW=class{constructor(e,t={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.fallbackRef=null,this.timeout=t.timeout||nW,this.transport=t.transport||Dn.WebSocket||is,this.conn=void 0,this.primaryPassedHealthCheck=!1,this.longPollFallbackMs=t.longPollFallbackMs,this.fallbackTimer=null,this.sessionStore=t.sessionStorage||Dn&&Dn.sessionStorage,this.establishedConnections=0,this.defaultEncoder=jf.encode.bind(jf),this.defaultDecoder=jf.decode.bind(jf),this.closeWasClean=!0,this.disconnecting=!1,this.binaryType=t.binaryType||"arraybuffer",this.connectClock=1,this.pageHidden=!1,this.encode=void 0,this.decode=void 0,this.transport!==is?(this.encode=t.encode||this.defaultEncoder,this.decode=t.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder);let r=null;xs&&xs.addEventListener&&(xs.addEventListener("pagehide",n=>{this.conn&&(this.disconnect(),r=this.connectClock)}),xs.addEventListener("pageshow",n=>{r===this.connectClock&&(r=null,this.connect())}),xs.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"?this.pageHidden=!0:(this.pageHidden=!1,!this.isConnected()&&!this.closeWasClean&&this.teardown(()=>this.connect()))})),this.heartbeatIntervalMs=t.heartbeatIntervalMs||3e4,this.autoSendHeartbeat=t.autoSendHeartbeat??!0,this.heartbeatCallback=t.heartbeatCallback??(()=>{}),this.rejoinAfterMs=n=>t.rejoinAfterMs?t.rejoinAfterMs(n):[1e3,2e3,5e3][n-1]||1e4,this.reconnectAfterMs=n=>t.reconnectAfterMs?t.reconnectAfterMs(n):[10,50,100,150,200,250,500,1e3,2e3][n-1]||5e3,this.logger=t.logger||null,!this.logger&&t.debug&&(this.logger=(n,a,i)=>{console.log(`${n}: ${a}`,i)}),this.longpollerTimeout=t.longpollerTimeout||2e4,this.params=eu(t.params||{}),this.endPoint=`${e}/${D0.websocket}`,this.vsn=t.vsn||rW,this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.heartbeatSentAt=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new zA(()=>{if(this.pageHidden){this.log("Not reconnecting as page is hidden!"),this.teardown();return}this.teardown(async()=>{t.beforeReconnect&&await t.beforeReconnect(),this.connect()})},this.reconnectAfterMs),this.authToken=t.authToken}getLongPollTransport(){return is}replaceTransport(e){this.connectClock++,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.conn&&(this.conn.close(),this.conn=null),this.transport=e}protocol(){return location.protocol.match(/^https/)?"wss":"ws"}endPointURL(){let e=Xh.appendParams(Xh.appendParams(this.endPoint,this.params()),{vsn:this.vsn});return e.charAt(0)!=="/"?e:e.charAt(1)==="/"?`${this.protocol()}:${e}`:`${this.protocol()}://${location.host}${e}`}disconnect(e,t,r){this.connectClock++,this.disconnecting=!0,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.teardown(()=>{this.disconnecting=!1,e&&e()},t,r)}connect(e){e&&(console&&console.log("passing params to connect is deprecated. Instead pass :params to the Socket constructor"),this.params=eu(e)),!(this.conn&&!this.disconnecting)&&(this.longPollFallbackMs&&this.transport!==is?this.connectWithFallback(is,this.longPollFallbackMs):this.transportConnect())}log(e,t,r){this.logger&&this.logger(e,t,r)}hasLogger(){return this.logger!==null}onOpen(e){let t=this.makeRef();return this.stateChangeCallbacks.open.push([t,e]),t}onClose(e){let t=this.makeRef();return this.stateChangeCallbacks.close.push([t,e]),t}onError(e){let t=this.makeRef();return this.stateChangeCallbacks.error.push([t,e]),t}onMessage(e){let t=this.makeRef();return this.stateChangeCallbacks.message.push([t,e]),t}onHeartbeat(e){this.heartbeatCallback=e}ping(e){if(!this.isConnected())return!1;let t=this.makeRef(),r=Date.now();this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:t});let n=this.onMessage(a=>{a.ref===t&&(this.off([n]),e(Date.now()-r))});return!0}transportName(e){switch(e){case is:return"LongPoll";default:return e.name}}transportConnect(){this.connectClock++,this.closeWasClean=!1;let e;this.authToken&&(e=["phoenix",`${L0}${btoa(this.authToken).replace(/=/g,"")}`]),this.conn=new this.transport(this.endPointURL(),e),this.conn.binaryType=this.binaryType,this.conn.timeout=this.longpollerTimeout,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)}getSession(e){return this.sessionStore&&this.sessionStore.getItem(e)}storeSession(e,t){this.sessionStore&&this.sessionStore.setItem(e,t)}connectWithFallback(e,t=2500){clearTimeout(this.fallbackTimer);let r=!1,n=!0,a,i,o=this.transportName(e),s=l=>{this.log("transport",`falling back to ${o}...`,l),this.off([a,i]),n=!1,this.replaceTransport(e),this.transportConnect()};if(this.getSession(`phx:fallback:${o}`))return s("memorized");this.fallbackTimer=setTimeout(s,t),i=this.onError(l=>{this.log("transport","error",l),n&&!r&&(clearTimeout(this.fallbackTimer),s(l))}),this.fallbackRef&&this.off([this.fallbackRef]),this.fallbackRef=this.onOpen(()=>{if(r=!0,!n){let l=this.transportName(e);return this.primaryPassedHealthCheck||this.storeSession(`phx:fallback:${l}`,"true"),this.log("transport",`established ${l} fallback`)}clearTimeout(this.fallbackTimer),this.fallbackTimer=setTimeout(s,t),this.ping(l=>{this.log("transport","connected to primary after",l),this.primaryPassedHealthCheck=!0,clearTimeout(this.fallbackTimer)})}),this.transportConnect()}clearHeartbeats(){clearTimeout(this.heartbeatTimer),clearTimeout(this.heartbeatTimeoutTimer)}onConnOpen(){this.hasLogger()&&this.log("transport",`connected to ${this.endPointURL()}`),this.closeWasClean=!1,this.disconnecting=!1,this.establishedConnections++,this.flushSendBuffer(),this.reconnectTimer.reset(),this.autoSendHeartbeat&&this.resetHeartbeat(),this.triggerStateCallbacks("open")}heartbeatTimeout(){if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.hasLogger()&&this.log("transport","heartbeat timeout. Attempting to re-establish connection");try{this.heartbeatCallback("timeout")}catch(e){this.log("error","error in heartbeat callback",e)}this.triggerChanError(),this.closeWasClean=!1,this.teardown(()=>this.reconnectTimer.scheduleTimeout(),aW,"heartbeat timeout")}}resetHeartbeat(){this.conn&&this.conn.skipHeartbeat||(this.pendingHeartbeatRef=null,this.clearHeartbeats(),this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}teardown(e,t,r){if(!this.conn)return e&&e();const n=this.conn;this.waitForBufferDone(n,()=>{t?n.close(t,r||""):n.close(),this.waitForSocketClosed(n,()=>{this.conn===n&&(this.conn.onopen=function(){},this.conn.onerror=function(){},this.conn.onmessage=function(){},this.conn.onclose=function(){},this.conn=null),e&&e()})})}waitForBufferDone(e,t,r=1){if(r===5||!e.bufferedAmount){t();return}setTimeout(()=>{this.waitForBufferDone(e,t,r+1)},150*r)}waitForSocketClosed(e,t,r=1){if(r===5||e.readyState===zn.closed){t();return}setTimeout(()=>{this.waitForSocketClosed(e,t,r+1)},150*r)}onConnClose(e){this.conn&&(this.conn.onclose=()=>{}),this.hasLogger()&&this.log("transport","close",e),this.triggerChanError(),this.clearHeartbeats(),this.closeWasClean||this.reconnectTimer.scheduleTimeout(),this.triggerStateCallbacks("close",e)}onConnError(e){this.hasLogger()&&this.log("transport",e);let t=this.transport,r=this.establishedConnections;this.triggerStateCallbacks("error",e,t,r),(t===this.transport||r>0)&&this.triggerChanError()}
431triggerChanError(){this.channels.forEach(e=>{e.isErrored()||e.isLeaving()||e.isClosed()||e.trigger(pa.error)})}connectionState(){switch(this.conn&&this.conn.readyState){case zn.connecting:return"connecting";case zn.open:return"open";case zn.closing:return"closing";default:return"closed"}}isConnected(){return this.connectionState()==="open"}remove(e){this.off(e.stateChangeRefs),this.channels=this.channels.filter(t=>t!==e)}off(e){for(let t in this.stateChangeCallbacks)this.stateChangeCallbacks[t]=this.stateChangeCallbacks[t].filter(([r])=>e.indexOf(r)===-1)}channel(e,t={}){let r=new oW(e,t,this);return this.channels.push(r),r}push(e){if(this.hasLogger()){let{topic:t,event:r,payload:n,ref:a,join_ref:i}=e;this.log("push",`${t} ${r} (${i}, ${a})`,n)}this.isConnected()?this.encode(e,t=>this.conn.send(t)):this.sendBuffer.push(()=>this.encode(e,t=>this.conn.send(t)))}makeRef(){let e=this.ref+1;return e===this.ref?this.ref=0:this.ref=e,this.ref.toString()}sendHeartbeat(){if(!this.isConnected()){try{this.heartbeatCallback("disconnected")}catch(e){this.log("error","error in heartbeat callback",e)}return}if(this.pendingHeartbeatRef){this.heartbeatTimeout();return}this.pendingHeartbeatRef=this.makeRef(),this.heartbeatSentAt=Date.now(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef});try{this.heartbeatCallback("sent")}catch(e){this.log("error","error in heartbeat callback",e)}this.heartbeatTimeoutTimer=setTimeout(()=>this.heartbeatTimeout(),this.heartbeatIntervalMs)}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(e=>e()),this.sendBuffer=[])}onConnMessage(e){this.decode(e.data,t=>{let{topic:r,event:n,payload:a,ref:i,join_ref:o}=t;if(i&&i===this.pendingHeartbeatRef){const s=this.heartbeatSentAt?Date.now()-this.heartbeatSentAt:void 0;this.clearHeartbeats();try{this.heartbeatCallback(a.status==="ok"?"ok":"error",s)}catch(l){this.log("error","error in heartbeat callback",l)}this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.autoSendHeartbeat&&(this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}this.hasLogger()&&this.log("receive",`${a.status||""} ${r} ${n} ${i&&"("+i+")"||""}`.trim(),a);for(let s=0;s<this.channels.length;s++){const l=this.channels[s];l.isMember(r,n,a,o)&&l.trigger(n,a,i,o)}this.triggerStateCallbacks("message",t)})}triggerStateCallbacks(e,...t){try{this.stateChangeCallbacks[e].forEach(([r,n])=>{try{n(...t)}catch(a){this.log("error",`error in ${e} callback`,a)}})}catch(r){this.log("error",`error triggering ${e} callbacks`,r)}}leaveOpenTopic(e){let t=this.channels.find(r=>r.topic===e&&(r.isJoined()||r.isJoining()));t&&(this.hasLogger()&&this.log("transport",`leaving duplicate topic "${e}"`),t.leave())}};class tu{constructor(t,r){const n=dW(r);this.presence=new lW(t.getChannel(),n),this.presence.onJoin((a,i,o)=>{const s=tu.onJoinPayload(a,i,o);t.getChannel().trigger("presence",s)}),this.presence.onLeave((a,i,o)=>{const s=tu.onLeavePayload(a,i,o);t.getChannel().trigger("presence",s)}),this.presence.onSync(()=>{t.getChannel().trigger("presence",{event:"sync"})})}get state(){return tu.transformState(this.presence.state)}static transformState(t){return t=uW(t),Object.getOwnPropertyNames(t).reduce((r,n)=>{const a=t[n];return r[n]=fh(a),r},{})}static onJoinPayload(t,r,n){const a=zj(r),i=fh(n);return{event:"join",key:t,currentPresences:a,newPresences:i}}static onLeavePayload(t,r,n){const a=zj(r),i=fh(n);return{event:"leave",key:t,currentPresences:a,leftPresences:i}}}function fh(e){return e.metas.map(t=>(t.presence_ref=t.phx_ref,delete t.phx_ref,delete t.phx_ref_prev,t))}function uW(e){return JSON.parse(JSON.stringify(e))}function dW(e){return(e==null?void 0:e.events)&&{events:e.events}}function zj(e){return e!=null&&e.metas?fh(e):[]}var Wj;(function(e){e.SYNC="sync",e.JOIN="join",e.LEAVE="leave"})(Wj||(Wj={}));class fW{get state(){return this.presenceAdapter.state}constructor(t,r){this.channel=t,this.presenceAdapter=new tu(this.channel.channelAdapter,r)}}class hW{constructor(t,r,n){const a=pW(n);this.channel=t.getSocket().channel(r,a),this.socket=t}get state(){return this.channel.state}set state(t){this.channel.state=t}get joinedOnce(){return this.channel.joinedOnce}get joinPush(){return this.channel.joinPush}get rejoinTimer(){return this.channel.rejoinTimer}on(t,r){return this.channel.on(t,r)}off(t,r){this.channel.off(t,r)}subscribe(t){return this.channel.join(t)}unsubscribe(t){return this.channel.leave(t)}teardown(){this.channel.teardown()}onClose(t){this.channel.onClose(t)}onError(t){return this.channel.onError(t)}push(t,r,n){let a;try{a=this.channel.push(t,r,n)}catch{throw new Error(`tried to push '${t}' to '${this.channel.topic}' before joining. Use channel.subscribe() before pushing events`)}if(this.channel.pushBuffer.length>Kz){const i=this.channel.pushBuffer.shift();i.cancelTimeout(),this.socket.log("channel",`discarded push due to buffer overflow: ${i.event}`,i.payload())}return a}updateJoinPayload(t){const r=this.channel.joinPush.payload();this.channel.joinPush.payload=()=>Object.assign(Object.assign({},r),t)}canPush(){return this.socket.isConnected()&&this.state===oi.joined}isJoined(){return this.state===oi.joined}isJoining(){return this.state===oi.joining}isClosed(){return this.state===oi.closed}isLeaving(){return this.state===oi.leaving}updateFilterBindings(t){this.channel.filterBindings=t}updatePayloadTransform(t){this.channel.onMessage=t}getChannel(){return this.channel}}function pW(e){return{config:Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},e.config)}}var Hj;(function(e){e.ALL="*",e.INSERT="INSERT",e.UPDATE="UPDATE",e.DELETE="DELETE"})(Hj||(Hj={}));var Rs;(function(e){e.BROADCAST="broadcast",e.PRESENCE="presence",e.POSTGRES_CHANGES="postgres_changes",e.SYSTEM="system"})(Rs||(Rs={}));var ma;(function(e){e.SUBSCRIBED="SUBSCRIBED",e.TIMED_OUT="TIMED_OUT",e.CLOSED="CLOSED",e.CHANNEL_ERROR="CHANNEL_ERROR"})(ma||(ma={}));class ru{get state(){return this.channelAdapter.state}set state(t){this.channelAdapter.state=t}get joinedOnce(){return this.channelAdapter.joinedOnce}get timeout(){return this.socket.timeout}get joinPush(){return this.channelAdapter.joinPush}get rejoinTimer(){return this.channelAdapter.rejoinTimer}constructor(t,r={config:{}},n){var a,i;if(this.topic=t,this.params=r,this.socket=n,this.bindings={},this.subTopic=t.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},r.config),this.channelAdapter=new hW(this.socket.socketAdapter,t,this.params),this.presence=new fW(this),this._onClose(()=>{this.socket._remove(this)}),this._updateFilterTransform(),this.broadcastEndpointURL=UA(this.socket.socketAdapter.endPointURL()),this.private=this.params.config.private||!1,!this.private&&(!((i=(a=this.params.config)===null||a===void 0?void 0:a.broadcast)===null||i===void 0)&&i.replay))throw new Error(`tried to use replay on public channel '${this.topic}'. It must be a private channel.`)}subscribe(t,r=this.timeout){var n,a,i;if(this.socket.isConnected()||this.socket.connect(),this.channelAdapter.isClosed()){const{config:{broadcast:o,presence:s,private:l}}=this.params,c=(a=(n=this.bindings.postgres_changes)===null||n===void 0?void 0:n.map(p=>p.filter))!==null&&a!==void 0?a:[],d=!!this.bindings[Rs.PRESENCE]&&this.bindings[Rs.PRESENCE].length>0||((i=this.params.config.presence)===null||i===void 0?void 0:i.enabled)===!0,f={},h={broadcast:o,presence:Object.assign(Object.assign({},s),{enabled:d}),postgres_changes:c,private:l};this.socket.accessTokenValue&&(f.access_token=this.socket.accessTokenValue),this._onError(p=>{t==null||t(ma.CHANNEL_ERROR,p)}),this._onClose(()=>t==null?void 0:t(ma.CLOSED)),this.updateJoinPayload(Object.assign({config:h},f)),this._updateFilterMessage(),this.channelAdapter.subscribe(r).receive("ok",async({postgres_changes:p})=>{if(this.socket._isManualToken()||this.socket.setAuth(),p===void 0){t==null||t(ma.SUBSCRIBED);return}this._updatePostgresBindings(p,t)}
431).receive("error",p=>{this.state=oi.errored,t==null||t(ma.CHANNEL_ERROR,new Error(JSON.stringify(Object.values(p).join(", ")||"error")))}).receive("timeout",()=>{t==null||t(ma.TIMED_OUT)})}return this}_updatePostgresBindings(t,r){var n;const a=this.bindings.postgres_changes,i=(n=a==null?void 0:a.length)!==null&&n!==void 0?n:0,o=[];for(let s=0;s<i;s++){const l=a[s],{filter:{event:c,schema:d,table:f,filter:h}}=l,p=t&&t[s];if(p&&p.event===c&&ru.isFilterValueEqual(p.schema,d)&&ru.isFilterValueEqual(p.table,f)&&ru.isFilterValueEqual(p.filter,h))o.push(Object.assign(Object.assign({},l),{id:p.id}));else{this.unsubscribe(),this.state=oi.errored,r==null||r(ma.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=o,this.state!=oi.errored&&r&&r(ma.SUBSCRIBED)}presenceState(){return this.presence.state}async track(t,r={}){return await this.send({type:"presence",event:"track",payload:t},r.timeout||this.timeout)}async untrack(t={}){return await this.send({type:"presence",event:"untrack"},t)}on(t,r,n){const a=this.channelAdapter.isJoined()||this.channelAdapter.isJoining(),i=t===Rs.PRESENCE||t===Rs.POSTGRES_CHANGES;if(a&&i)throw this.socket.log("channel",`cannot add \`${t}\` callbacks for ${this.topic} after \`subscribe()\`.`),new Error(`cannot add \`${t}\` callbacks for ${this.topic} after \`subscribe()\`.`);return this._on(t,r,n)}async httpSend(t,r,n={}){var a;if(r==null)return Promise.reject(new Error("Payload is required for httpSend()"));const i={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(i.Authorization=`Bearer ${this.socket.accessTokenValue}`);const o={method:"POST",headers:i,body:JSON.stringify({messages:[{topic:this.subTopic,event:t,payload:r,private:this.private}]})},s=await this._fetchWithTimeout(this.broadcastEndpointURL,o,(a=n.timeout)!==null&&a!==void 0?a:this.timeout);if(s.status===202)return{success:!0};let l=s.statusText;try{const c=await s.json();l=c.error||c.message||l}catch{}return Promise.reject(new Error(l))}async send(t,r={}){var n,a;if(!this.channelAdapter.canPush()&&t.type==="broadcast"){console.warn("Realtime send() is automatically falling back to REST API. This behavior will be deprecated 
431in the future. Please use httpSend() explicitly for REST delivery.");const{event:i,payload:o}=t,s={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(s.Authorization=`Bearer ${this.socket.accessTokenValue}`);const l={method:"POST",headers:s,body:JSON.stringify({messages:[{topic:this.subTopic,event:i,payload:o,private:this.private}]})};try{const c=await this._fetchWithTimeout(this.broadcastEndpointURL,l,(n=r.timeout)!==null&&n!==void 0?n:this.timeout);return await((a=c.body)===null||a===void 0?void 0:a.cancel()),c.ok?"ok":"error"}catch(c){return c.name==="AbortError"?"timed out":"error"}}else return new Promise(i=>{var o,s,l;const c=this.channelAdapter.push(t.type,t,r.timeout||this.timeout);t.type==="broadcast"&&!(!((l=(s=(o=this.params)===null||o===void 0?void 0:o.config)===null||s===void 0?void 0:s.broadcast)===null||l===void 0)&&l.ack)&&i("ok"),c.receive("ok",()=>i("ok")),c.receive("error",()=>i("error")),c.receive("timeout",()=>i("timed out"))})}updateJoinPayload(t){this.channelAdapter.updateJoinPayload(t)}async unsubscribe(t=this.timeout){return new Promise(r=>{this.channelAdapter.unsubscribe(t).receive("ok",()=>r("ok")).receive("timeout",()=>r("timed out")).receive("error",()=>r("error"))})}teardown(){this.channelAdapter.teardown()}async _fetchWithTimeout(t,r,n){const a=new AbortController,i=setTimeout(()=>a.abort(),n),o=await this.socket.fetch(t,Object.assign(Object.assign({},r),{signal:a.signal}));return clearTimeout(i),o}_on(t,r,n){const a=t.toLocaleLowerCase(),i=this.channelAdapter.on(t,n),o={type:a,filter:r,callback:n,ref:i};return this.bindings[a]?this.bindings[a].push(o):this.bindings[a]=[o],this._updateFilterMessage(),this}_onClose(t){this.channelAdapter.onClose(t)}_onError(t){this.channelAdapter.onError(t)}_updateFilterMessage(){this.channelAdapter.updateFilterBindings((t,r,n)=>{var a,i,o,s,l,c,d;const f=t.event.toLocaleLowerCase();if(this._notThisChannelEvent(f,n))return!1;const h=(a=this.bindings[f])===null||a===void 0?void 0:a.find(p=>p.ref===t.ref);if(!h)return!0;if(["broadcast","presence","postgres_changes"].includes(f))if("id"in h){const p=h.id,g=(i=h.filter)===null||i===void 0?void 0:i.event;return p&&((o=r.ids)===null||o===void 0?void 0:o.includes(p))&&(g==="*"||(g==null?void 0:g.toLocaleLowerCase())===((s=r.data)===null||s===void 0?void 0:s.type.toLocaleLowerCase()))}else{const p=(c=(l=h==null?void 0:h.filter)===null||l===void 0?void 0:l.event)===null||c===void 0?void 0:c.toLocaleLowerCase();return p==="*"||p===((d=r==null?void 0:r.event)===null||d===void 0?void 0:d.toLocaleLowerCase())}else return h.type.toLocaleLowerCase()===f})}_notThisChannelEvent(t,r){const{close:n,error:a,leave:i,join:o}=BA;return r&&[n,a,i,o].includes(t)&&r!==this.joinPush.ref}_updateFilterTransform(){this.channelAdapter.updatePayloadTransform((t,r,n)=>{if(typeof r=="object"&&"ids"in r){const a=r.data,{schema:i,table:o,commit_timestamp:s,type:l,errors:c}=a;return Object.assign(Object.assign({},{schema:i,table:o,commit_timestamp:s,eventType:l,new:{},old:{},errors:c}),this._getPayloadRecords(a))}return r})}copyBindings(t){if(this.joinedOnce)throw new Error("cannot copy bindings into joined channel");for(const r in t.bindings)for(const n of t.bindings[r])this._on(n.type,n.filter,n.callback)}static isFilterValueEqual(t,r){return(t??void 0)===(r??void 0)}_getPayloadRecords(t){const r={new:{},old:{}};return(t.type==="INSERT"||t.type==="UPDATE")&&(r.new=Uj(t.columns,t.record)),(t.type==="UPDATE"||t.type==="DELETE")&&(r.old=Uj(t.columns,t.old_record)),r}}class mW{constructor(t,r){this.socket=new cW(t,r)}get timeout(){return this.socket.timeout}get endPoint(){return this.socket.endPoint}get transport(){return this.socket.transport}get heartbeatIntervalMs(){return this.socket.heartbeatIntervalMs}get heartbeatCallback(){return this.socket.heartbeatCallback}set heartbeatCallback(t){this.socket.heartbeatCallback=t}get heartbeatTimer(){return this.socket.heartbeatTimer}get pendingHeartbeatRef(){return this.socket.pendingHeartbeatRef}get reconnectTimer(){return this.socket.reconnectTimer}get vsn(){return this.socket.vsn}get encode(){return this.socket.encode}get decode(){return this.socket.decode}get reconnectAfterMs(){return this.socket.reconnectAfterMs}get sendBuffer(){return this.socket.sendBuffer}get stateChangeCallbacks(){return this.socket.stateChangeCallbacks}connect(){this.socket.connect()}disconnect(t,r,n,a=1e4){return new Promise(i=>{setTimeout(()=>i("timeout"),a),this.socket.disconnect(()=>{t(),i("ok")},r,n)})}push(t){this.socket.push(t)}log(t,r,n){this.socket.log(t,r,n)}makeRef(){return this.socket.makeRef()}onOpen(t){this.socket.onOpen(t)}onClose(t){this.socket.onClose(t)}onError(t){this.socket.onError(t)}onMessage(t){this.socket.onMessage(t)}isConnected(){return this.socket.isConnected()}isConnecting(){return this.socket.connectionState()==R0.connecting}isDisconnecting(){return this.socket.connectionState()==R0.closing}connectionState(){return this.socket.connectionState()}endPointURL(){return this.socket.endPointURL()}sendHeartbeat(){this.socket.sendHeartbeat()}getSocket(){return this.socket}}const gW={HEARTBEAT_INTERVAL:25e3,RECONNECT_DELAY:10,HEARTBEAT_TIMEOUT_FALLBACK:100},vW=[1e3,2e3,5e3,1e4],yW=1e4,bW=`
432  addEventListener("message", (e) => {
433    if (e.data.event === "start") {
434      setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval);
435    }
436  });`;class xW{get endPoint(){return this.socketAdapter.endPoint}get timeout(){return this.socketAdapter.timeout}get transport(){return this.socketAdapter.transport}get heartbeatCallback(){return this.socketAdapter.heartbeatCallback}get heartbeatIntervalMs(){return this.socketAdapter.heartbeatIntervalMs}get heartbeatTimer(){return this.worker?this._workerHeartbeatTimer:this.socketAdapter.heartbeatTimer}get pendingHeartbeatRef(){return this.worker?this._pendingWorkerHeartbeatRef:this.socketAdapter.pendingHeartbeatRef}get reconnectTimer(){return this.socketAdapter.reconnectTimer}get vsn(){return this.socketAdapter.vsn}get encode(){return this.socketAdapter.encode}get decode(){return this.socketAdapter.decode}get reconnectAfterMs(){return this.socketAdapter.reconnectAfterMs}get sendBuffer(){return this.socketAdapter.sendBuffer}get stateChangeCallbacks(){return this.socketAdapter.stateChangeCallbacks}constructor(t,r){var n;if(this.channels=new Array,this.accessTokenValue=null,this.accessToken=null,this.apiKey=null,this.httpEndpoint="",this.headers={},this.params={}
436,this.ref=0,this.serializer=new Gz,this._manuallySetToken=!1,this._authPromise=null,this._workerHeartbeatTimer=void 0,this._pendingWorkerHeartbeatRef=null,this._resolveFetch=i=>i?(...o)=>i(...o):(...o)=>fetch(...o),!(!((n=r==null?void 0:r.params)===null||n===void 0)&&n.apikey))throw new Error("API key is required to connect to Realtime");this.apiKey=r.params.apikey;const a=this._initializeOptions(r);this.socketAdapter=new mW(t,a),this.httpEndpoint=UA(t),this.fetch=this._resolveFetch(r==null?void 0:r.fetch)}connect(){if(!(this.isConnecting()||this.isDisconnecting()||this.isConnected())){this.accessToken&&!this._authPromise&&this._setAuthSafely("connect"),this._setupConnectionHandlers();try{this.socketAdapter.connect()}catch(t){const r=t.message;throw r.includes("Node.js")?new Error(`${r}
437
438To use Realtime in Node.js, you need to provide a WebSocket implementation:
439
440Option 1: Use Node.js 22+ which has native WebSocket support
441Option 2: Install and provide the "ws" package:
442
443  npm install ws
444
445  import ws from "ws"
446  const client = new RealtimeClient(url, {
447    ...options,
448    transport: ws
449  })`):new Error(`WebSocket not available: ${r}`)}this._handleNodeJsRaceCondition()}}endpointURL(){return this.socketAdapter.endPointURL()}async disconnect(t,r){return this.isDisconnecting()?"ok":await this.socketAdapter.disconnect(()=>{clearInterval(this._workerHeartbeatTimer),this._terminateWorker()},t,r)}getChannels(){return this.channels}async removeChannel(t){const r=await t.unsubscribe();return r==="ok"&&t.teardown(),this.channels.length===0&&this.disconnect(),r}async removeAllChannels(){const t=this.channels.map(async n=>{const a=await n.unsubscribe();return n.teardown(),a}),r=await Promise.all(t);return this.disconnect(),r}log(t,r,n){this.socketAdapter.log(t,r,n)}connectionState(){return this.socketAdapter.connectionState()||R0.closed}isConnected(){return this.socketAdapter.isConnected()}isConnecting(){return this.socketAdapter.isConnecting()}isDisconnecting(){return this.socketAdapter.isDisconnecting()}channel(t,r={config:{}}){const n=`realtime:${t}`,a=this.getChannels().find(i=>i.topic===n);if(a)return a;{const i=new ru(`realtime:${t}`,r,this);return this.channels.push(i),i}}push(t){this.socketAdapter.push(t)}async setAuth(t=null){this._authPromise=this._performAuth(t);try{await this._authPromise}finally{this._authPromise=null}}_isManualToken(){return this._manuallySetToken}async sendHeartbeat(){this.socketAdapter.sendHeartbeat()}onHeartbeat(t){this.socketAdapter.heartbeatCallback=this._wrapHeartbeatCallback(t)}_makeRef(){return this.socketAdapter.makeRef()}_remove(t){this.channels=this.channels.filter(r=>r.topic!==t.topic)}async _performAuth(t=null){let r,n=!1;if(t)r=t,n=!0;else if(this.accessToken)try{r=await this.accessToken()}catch(a){this.log("error","Error fetching access token from callback",a),r=this.accessTokenValue}else r=this.accessTokenValue;n?this._manuallySetToken=!0:this.accessToken&&(this._manuallySetToken=!1),this.accessTokenValue!=r&&(this.accessTokenValue=r,this.channels.forEach(a=>{const i={access_token:r,version:Wz};r&&a.updateJoinPayload(i),a.joinedOnce&&a.channelAdapter.isJoined()&&a.channelAdapter.push(BA.access_token,{access_token:r})}))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(t="general"){this._isManualToken()||this.setAuth().catch(r=>{this.log("error",`Error setting auth in ${t}`,r)})}_setupConnectionHandlers(){this.socketAdapter.onOpen(()=>{(this._authPromise||(this.accessToken&&!this.accessTokenValue?this.setAuth():Promise.resolve())).catch(r=>{this.log("error","error waiting for auth on connect",r)}),this.worker&&!this.workerRef&&this._startWorkerHeartbeat()}),this.socketAdapter.onClose(()=>{this.worker&&this.workerRef&&this._terminateWorker()}),this.socketAdapter.onMessage(t=>{t.ref&&t.ref===this._pendingWorkerHeartbeatRef&&(this._pendingWorkerHeartbeatRef=null)})}_handleNodeJsRaceCondition(){this.socketAdapter.isConnected()&&this.socketAdapter.getSocket().onConnOpen()}_wrapHeartbeatCallback(t){return(r,n)=>{r=="sent"&&this._setAuthSafely(),t&&t(r,n)}}_startWorkerHeartbeat(){this.workerUrl?this.log("worker",`starting worker for from ${this.workerUrl}`):this.log("worker","starting default worker");const t=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(t),this.workerRef.onerror=r=>{this.log("worker","worker error",r.message),this._terminateWorker(),this.disconnect()},this.workerRef.onmessage=r=>{r.data.event==="keepAlive"&&this.sendHeartbeat()},this.workerRef.postMessage({event:"start",interval:this.heartbeatIntervalMs})}_terminateWorker(){this.workerRef&&(this.log("worker","terminating worker"),this.workerRef.terminate(),this.workerRef=void 0)}_workerObjectUrl(t){let r;if(t)r=t;else{const n=new Blob([bW],{type:"application/javascript"});r=URL.createObjectURL(n)}return r}_initializeOptions(t){var r,n,a,i,o,s,l,c,d;this.worker=(r=t==null?void 0:t.worker)!==null&&r!==void 0?r:!1,this.accessToken=(n=t==null?void 0:t.accessToken)!==null&&n!==void 0?n:null;const f={};
449f.timeout=(a=t==null?void 0:t.timeout)!==null&&a!==void 0?a:Vz,f.heartbeatIntervalMs=(i=t==null?void 0:t.heartbeatIntervalMs)!==null&&i!==void 0?i:gW.HEARTBEAT_INTERVAL,f.transport=(o=t==null?void 0:t.transport)!==null&&o!==void 0?o:Uz.getWebSocketConstructor(),f.params=t==null?void 0:t.params,f.logger=t==null?void 0:t.logger,f.heartbeatCallback=this._wrapHeartbeatCallback(t==null?void 0:t.heartbeatCallback),f.reconnectAfterMs=(s=t==null?void 0:t.reconnectAfterMs)!==null&&s!==void 0?s:m=>vW[m-1]||yW;let h,p;const g=(l=t==null?void 0:t.vsn)!==null&&l!==void 0?l:qz;switch(g){case Hz:h=(m,v)=>v(JSON.stringify(m)),p=(m,v)=>v(JSON.parse(m));break;case LA:h=this.serializer.encode.bind(this.serializer),p=this.serializer.decode.bind(this.serializer);break;default:throw new Error(`Unsupported serializer version: ${f.vsn}`)}if(f.vsn=g,f.encode=(c=t==null?void 0:t.encode)!==null&&c!==void 0?c:h,f.decode=(d=t==null?void 0:t.decode)!==null&&d!==void 0?d:p,f.beforeReconnect=this._reconnectAuth.bind(this),(t!=null&&t.logLevel||t!=null&&t.log_level)&&(this.logLevel=t.logLevel||t.log_level,f.params=Object.assign(Object.assign({},f.params),{log_level:this.logLevel})),this.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.workerUrl=t==null?void 0:t.workerUrl,f.autoSendHeartbeat=!this.worker}return f}async _reconnectAuth(){await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()}}var Mu=class extends Error{constructor(e,t){var r;super(e),this.name="IcebergError",this.status=t.status,this.icebergType=t.icebergType,this.icebergCode=t.icebergCode,this.details=t.details,this.isCommitStateUnknown=t.icebergType==="CommitStateUnknownException"||[500,502,504].includes(t.status)&&((r=t.icebergType)==null?void 0:r.includes("CommitState"))===!0}isNotFound(){return this.status===404}isConflict(){return this.status===409}isAuthenticationTimeout(){return this.status===419}};function wW(e,t,r){const n=new URL(t,e);if(r)for(const[a,i]of Object.entries(r))i!==void 0&&n.searchParams.set(a,i);return n.toString()}async function _W(e){return!e||e.type==="none"?{}:e.type==="bearer"?{Authorization:`Bearer ${e.token}`}:e.type==="header"?{[e.name]:e.value}:e.type==="custom"?await e.getHeaders():{}}function SW(e){const t=e.fetchImpl??globalThis.fetch;return{async request({method:r,path:n,query:a,body:i,headers:o}){const s=wW(e.baseUrl,n,a),l=await _W(e.auth),c=await t(s,{method:r,headers:{...i?{"Content-Type":"application/json"}:{},...l,...o},body:i?JSON.stringify(i):void 0}),d=await c.text(),f=(c.headers.get("content-type")||"").includes("application/json"),h=f&&d?JSON.parse(d):d;if(!c.ok){const p=f?h:void 0,g=p==null?void 0:p.error;throw new Mu((g==null?void 0:g.message)??`Request failed with status ${c.status}`,{status:c.status,icebergType:g==null?void 0:g.type,icebergCode:g==null?void 0:g.code,details:p})}return{status:c.status,headers:c.headers,data:h}}}}function kf(e){return e.join("�")}var jW=class{constructor(e,t=""){this.client=e,this.prefix=t}async listNamespaces(e){const t=e?{parent:kf(e.namespace)}:void 0;return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces`,query:t})).data.namespaces.map(n=>({namespace:n}))}async createNamespace(e,t){const r={namespace:e.namespace,properties:t==null?void 0:t.properties};return(await this.client.request({method:"POST",path:`${this.prefix}/namespaces`,body:r})).data}async dropNamespace(e){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${kf(e.namespace)}`})}async loadNamespaceMetadata(e){return{properties:(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${kf(e.namespace)}`})).data.properties}}async namespaceExists(e){try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${kf(e.namespace)}`}),!0}catch(t){if(t instanceof Mu&&t.status===404)return!1;throw t}}async createNamespaceIfNotExists(e,t){try{return await this.createNamespace(e,t)}catch(r){if(r instanceof Mu&&r.status===409)return;throw r}}};function os(e){return e.join("�")}var kW=class{constructor(e,t="",r){this.client=e,this.prefix=t,this.accessDelegation=r}async listTables(e){return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${os(e.namespace)}/tables`})).data.identifiers}async createTable(e,t){const r={};return this.accessDelegation&&(r["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${os(e.namespace)}/tables`,body:t,headers:r})).data.metadata}async updateTable(e,t){const r=await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${os(e.namespace)}/tables/${e.name}`,body:t});return{"metadata-location":r.data["metadata-location"],metadata:r.data.metadata}}async dropTable(e,t){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${os(e.namespace)}/tables/${e.name}`,query:{purgeRequested:String((t==null?void 0:t.purge)??!1)}})}async loadTable(e){const t={};return this.accessDelegation&&(t["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${os(e.namespace)}/tables/${e.name}`,headers:t})).data.metadata}async tableExists(e){const t={};this.accessDelegation&&(t["X-Iceberg-Access-Delegation"]=this.accessDelegation);try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${os(e.namespace)}/tables/${e.name}`,headers:t}),!0}catch(r){if(r instanceof Mu&&r.status===404)return!1;throw r}}async createTableIfNotExists(e,t){try{return await this.createTable(e,t)}catch(r){if(r instanceof Mu&&r.status===409)return await this.loadTable({namespace:e.namespace,name:t.name});throw r}}},EW=class{constructor(e){var n;let t="v1";e.catalogName&&(t+=`/${e.catalogName}`);const r=e.baseUrl.endsWith("/")?e.baseUrl:`${e.baseUrl}/`;this.client=SW({baseUrl:r,auth:e.auth,fetchImpl:e.fetch}),this.accessDelegation=(n=e.accessDelegation)==null?void 0:n.join(","),this.namespaceOps=new jW(this.client,t),this.tableOps=new kW(this.client,t,this.accessDelegation)}async listNamespaces(e){return this.namespaceOps.listNamespaces(e)}async createNamespace(e,t){return this.namespaceOps.createNamespace(e,t)}async dropNamespace(e){await this.namespaceOps.dropNamespace(e)}async loadNamespaceMetadata(e){return this.namespaceOps.loadNamespaceMetadata(e)}async listTables(e){return this.tableOps.listTables(e)}
449async createTable(e,t){return this.tableOps.createTable(e,t)}async updateTable(e,t){return this.tableOps.updateTable(e,t)}async dropTable(e,t){await this.tableOps.dropTable(e,t)}async loadTable(e){return this.tableOps.loadTable(e)}async namespaceExists(e){return this.namespaceOps.namespaceExists(e)}async tableExists(e){return this.tableOps.tableExists(e)}async createNamespaceIfNotExists(e,t){return this.namespaceOps.createNamespaceIfNotExists(e,t)}async createTableIfNotExists(e,t){return this.tableOps.createTableIfNotExists(e,t)}};function $u(e){"@babel/helpers - typeof";return $u=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$u(e)}function OW(e,t){if($u(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if($u(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function NW(e){var t=OW(e,"string");return $u(t)=="symbol"?t:t+""}function PW(e,t,r){return(t=NW(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function qj(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function ce(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?qj(Object(r),!0).forEach(function(n){PW(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):qj(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Bm=class extends Error{constructor(e,t="storage",r,n){super(e),this.__isStorageError=!0,this.namespace=t,this.name=t==="vectors"?"StorageVectorsError":"StorageError",this.status=r,this.statusCode=n}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}};function Fm(e){return typeof e=="object"&&e!==null&&"__isStorageError"in e}var B0=class extends Bm{constructor(e,t,r,n="storage"){super(e,n,t,r),this.name=n==="vectors"?"StorageVectorsApiError":"StorageApiError",this.status=t,this.statusCode=r}toJSON(){return ce({},super.toJSON())}},WA=class extends Bm{constructor(e,t,r="storage"){super(e,r),this.name=r==="vectors"?"StorageVectorsUnknownError":"StorageUnknownError",this.originalError=t}};function Qw(e,t,r){const n=ce({},e),a=t.toLowerCase();for(const i of Object.keys(n))i.toLowerCase()===a&&delete n[i];return n[a]=r,n}function CW(e){const t={};for(const[r,n]of Object.entries(e))t[r.toLowerCase()]=n;return t}const TW=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),AW=e=>{if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},F0=e=>{if(Array.isArray(e))return e.map(r=>F0(r));if(typeof e=="function"||e!==Object(e))return e;const t={};return Object.entries(e).forEach(([r,n])=>{const a=r.replace(/([-_][a-z])/gi,i=>i.toUpperCase().replace(/[-_]/g,""));t[a]=F0(n)}),t},MW=e=>!e||typeof e!="string"||e.length===0||e.length>100||e.trim()!==e||e.includes("/")||e.includes("\\")?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(e),Vj=e=>{var t;return e.msg||e.message||e.error_description||(typeof e.error=="string"?e.error:(t=e.error)===null||t===void 0?void 0:t.message)||JSON.stringify(e)},$W=async(e,t,r,n)=>{if(e!==null&&typeof e=="object"&&typeof e.json=="function"){const a=e;let i=parseInt(a.status,10);Number.isFinite(i)||(i=500),a.json().then(o=>{const s=(o==null?void 0:o.statusCode)||(o==null?void 0:o.code)||i+"";t(new B0(Vj(o),i,s,n))}).catch(()=>{const o=i+"";t(new B0(a.statusText||`HTTP ${i} error`,i,o,n))})}else t(new WA(Vj(e),e,n))},RW=(e,t,r,n)=>{const a={method:e,headers:(t==null?void 0:t.headers)||{}};if(e==="GET"||e==="HEAD"||!n)return ce(ce({},a),r);if(AW(n)){var i;const o=(t==null?void 0:t.headers)||{};let s;for(const[l,c]of Object.entries(o))l.toLowerCase()==="content-type"&&(s=c);a.headers=Qw(o,"Content-Type",(i=s)!==null&&i!==void 0?i:"application/json"),a.body=JSON.stringify(n)}else a.body=n;return t!=null&&t.duplex&&(a.duplex=t.duplex),ce(ce({},a),r)};async function jc(e,t,r,n,a,i,o){return new Promise((s,l)=>{e(r,RW(t,n,a,i)).then(c=>{if(!c.ok)throw c;if(n!=null&&n.noResolveJson)return c;if(o==="vectors"){const d=c.headers.get("content-type");if(c.headers.get("content-length")==="0"||c.status===204)return{};if(!d||!d.includes("application/json"))return{}}return c.json()}).then(c=>s(c)).catch(c=>$W(c,l,n,o))})}function HA(e="storage"){return{get:async(t,r,n,a)=>jc(t,"GET",r,n,a,void 0,e),post:async(t,r,n,a,i)=>jc(t,"POST",r,a,i,n,e),put:async(t,r,n,a,i)=>jc(t,"PUT",r,a,i,n,e),head:async(t,r,n,a)=>jc(t,"HEAD",r,ce(ce({},n),{},{noResolveJson:!0}),a,void 0,e),remove:async(t,r,n,a,i)=>jc(t,"DELETE",r,a,i,n,e)}}const IW=HA("storage"),{get:Ru,post:dn,put:U0,head:DW,remove:Zw}=IW,Sr=HA("vectors");var Zl=class{constructor(e,t={},r,n="storage"){this.shouldThrowOnError=!1,this.url=e,this.headers=CW(t),this.fetch=TW(r),this.namespace=n}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(e,t){return this.headers=Qw(this.headers,e,t),this}async handleOperation(e){var t=this;try{return{data:await e(),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(Fm(r))return{data:null,error:r};throw r}}},LW=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t}then(e,t){return this.execute().then(e,t)}async execute(){var e=this;try{return{data:(await e.downloadFn()).body,error:null}}catch(t){if(e.shouldThrowOnError)throw t;if(Fm(t))return{data:null,error:t};throw t}}};let qA;qA=Symbol.toStringTag;var BW=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t,this[qA]="BlobDownloadBuilder",this.promise=null}asStream(){return new LW(this.downloadFn,this.shouldThrowOnError)}then(e,t){return this.getPromise().then(e,t)}catch(e){return this.getPromise().catch(e)}finally(e){return this.getPromise().finally(e)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}async execute(){var e=this;try{return{data:await(await e.downloadFn()).blob(),error:null}}catch(t){if(e.shouldThrowOnError)throw t;if(Fm(t))return{data:null,error:t};throw t}}};const FW={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},Kj={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};var UW=class extends Zl{constructor(e,t={},r,n){super(e,t,n,"storage"),this.bucketId=r}async uploadOrUpdate(e,t,r,n){var a=this;return a.handleOperation(async()=>{let i;const o=ce(ce({},Kj),n);let s=ce(ce({},a.headers),e==="POST"&&{"x-upsert":String(o.upsert)});const l=o.metadata;if(typeof Blob<"u"&&r instanceof Blob?(i=new FormData,i.append("cacheControl",o.cacheControl),l&&i.append("metadata",a.encodeMetadata(l)),i.append("",r)):typeof FormData<"u"&&r instanceof FormData?(i=r,i.has("cacheControl")||i.append("cacheControl",o.cacheControl),l&&!i.has("metadata")&&i.append("metadata",a.encodeMetadata(l))):(i=r,s["cache-control"]=`max-age=${o.cacheControl}`,s["content-type"]=o.contentType,l&&(s["x-metadata"]=a.toBase64(a.encodeMetadata(l))),(typeof ReadableStream<"u"&&i instanceof ReadableStream||i&&typeof i=="object"&&"pipe"in i&&typeof i.pipe=="function")&&!o.duplex&&(o.duplex="half")),n!=null&&n.headers)for(const[h,p]of Object.entries(n.headers))s=Qw(s,h,p);const c=a._removeEmptyFolders(t),d=a._getFinalPath(c),f=await(e=="PUT"?U0:dn)(a.fetch,`${a.url}/object/${d}`,i,ce({headers:s},o!=null&&o.duplex?{duplex:o.duplex}:{}));return{path:c,id:f.Id,fullPath:f.Key}})}async upload(e,t,r){return this.uploadOrUpdate("POST",e,t,r)}async uploadToSignedUrl(e,t,r,n){var a=this;const i=a._removeEmptyFolders(e),o=a._getFinalPath(i),s=new URL(a.url+`/object/upload/sign/${o}`);return s.searchParams.set("token",t),a.handleOperation(async()=>{let l;const c=ce(ce({},Kj),n),d=ce(ce({},a.headers),{"x-upsert":String(c.upsert)});return typeof Blob<"u"&&r instanceof Blob?(l=new FormData,l.append("cacheControl",c.cacheControl),l.append("",r)):typeof FormData<"u"&&r instanceof FormData?(l=r,l.append("cacheControl",c.cacheControl)):(l=r,d["cache-control"]=`max-age=${c.cacheControl}`,d["content-type"]=c.contentType),{path:i,fullPath:(await U0(a.fetch,s.toString(),l,{headers:d})).Key}})}async createSignedUploadUrl(e,t){var r=this;return r.handleOperation(async()=>{let n=r._getFinalPath(e);const a=ce({},r.headers);t!=null&&t.upsert&&(a["x-upsert"]="true");const i=await dn(r.fetch,`${r.url}/object/upload/sign/${n}`,{},{headers:a}),o=new URL(r.url+i.url),s=o.searchParams.get("token");if(!s)throw new Bm("No token returned by API");return{signedUrl:o.toString(),path:e,token:s}})}async update(e,t,r){return this.uploadOrUpdate("PUT",e,t,r)}async move(e,t,r){var n=this;return n.handleOperation(async()=>await dn(n.fetch,`${n.url}/object/move`,{bucketId:n.bucketId,sourceKey:e,destinationKey:t,de
449stinationBucket:r==null?void 0:r.destinationBucket},{headers:n.headers}))}async copy(e,t,r){var n=this;return n.handleOperation(async()=>({path:(await dn(n.fetch,`${n.url}/object/copy`,{bucketId:n.bucketId,sourceKey:e,destinationKey:t,destinationBucket:r==null?void 0:r.destinationBucket},{headers:n.headers})).Key}))}async createSignedUrl(e,t,r){var n=this;return n.handleOperation(async()=>{let a=n._getFinalPath(e);const i=typeof(r==null?void 0:r.transform)=="object"&&r.transform!==null&&Object.keys(r.transform).length>0;let o=await dn(n.fetch,`${n.url}/object/sign/${a}`,ce({expiresIn:t},i?{transform:r.transform}:{}),{headers:n.headers});const s=new URLSearchParams;r!=null&&r.download&&s.set("download",r.download===!0?"":r.download),(r==null?void 0:r.cacheNonce)!=null&&s.set("cacheNonce",String(r.cacheNonce));const l=s.toString();return{signedUrl:encodeURI(`${n.url}${o.signedURL}${l?`&${l}`:""}`)}})}async createSignedUrls(e,t,r){var n=this;return n.handleOperation(async()=>{const a=await dn(n.fetch,`${n.url}/object/sign/${n.bucketId}`,{expiresIn:t,paths:e},{headers:n.headers}),i=new URLSearchParams;r!=null&&r.download&&i.set("download",r.download===!0?"":r.download),(r==null?void 0:r.cacheNonce)!=null&&i.set("cacheNonce",String(r.cacheNonce));const o=i.toString();return a.map(s=>ce(ce({},s),{},{signedUrl:s.signedURL?encodeURI(`${n.url}${s.signedURL}${o?`&${o}`:""}`):null}))})}download(e,t,r){const n=typeof(t==null?void 0:t.transform)=="object"&&t.transform!==null&&Object.keys(t.transform).length>0?"render/image/authenticated":"object",a=new URLSearchParams;t!=null&&t.transform&&this.applyTransformOptsToQuery(a,t.transform),(t==null?void 0:t.cacheNonce)!=null&&a.set("cacheNonce",String(t.cacheNonce));const i=a.toString(),o=this._getFinalPath(e),s=()=>Ru(this.fetch,`${this.url}/${n}/${o}${i?`?${i}`:""}`,{headers:this.headers,noResolveJson:!0},r);return new BW(s,this.shouldThrowOnError)}async info(e){var t=this;const r=t._getFinalPath(e);return t.handleOperation(async()=>F0(await Ru(t.fetch,`${t.url}/object/info/${r}`,{headers:t.headers})))}async exists(e){var t=this;const r=t._getFinalPath(e);try{return await DW(t.fetch,`${t.url}/object/${r}`,{headers:t.headers}),{data:!0,error:null}}catch(a){if(t.shouldThrowOnError)throw a;if(Fm(a)){var n;const i=a instanceof B0?a.status:a instanceof WA?(n=a.originalError)===null||n===void 0?void 0:n.status:void 0;if(i!==void 0&&[400,404].includes(i))return{data:!1,error:a}}throw a}}getPublicUrl(e,t){const r=this._getFinalPath(e),n=new URLSearchParams;t!=null&&t.download&&n.set("download",t.download===!0?"":t.download),t!=null&&t.transform&&this.applyTransformOptsToQuery(n,t.transform),(t==null?void 0:t.cacheNonce)!=null&&n.set("cacheNonce",String(t.cacheNonce));const a=n.toString(),i=typeof(t==null?void 0:t.transform)=="object"&&t.transform!==null&&Object.keys(t.transform).length>0?"render/image":"object";return{data:{publicUrl:encodeURI(`${this.url}/${i}/public/${r}`)+(a?`?${a}`:"")}}}async remove(e){var t=this;return t.handleOperation(async()=>await Zw(t.fetch,`${t.url}/object/${t.bucketId}`,{prefixes:e},{headers:t.headers}))}async list(e,t,r){var n=this;return n.handleOperation(async()=>{const a=ce(ce(ce({},FW),t),{},{prefix:e||""});return await dn(n.fetch,`${n.url}/object/list/${n.bucketId}`,a,{headers:n.headers},r)})}async listV2(e,t){var r=this;return r.handleOperation(async()=>{const n=ce({},e);return await dn(r.fetch,`${r.url}/object/list-v2/${r.bucketId}`,n,{headers:r.headers},t)})}encodeMetadata(e){return JSON.stringify(e)}toBase64(e){return typeof Buffer<"u"?Buffer.from(e).toString("base64"):btoa(e)}_getFinalPath(e){return`${this.bucketId}/${e.replace(/^\/+/,"")}`}_removeEmptyFolders(e){return e.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}applyTransformOptsToQuery(e,t){return t.width&&e.set("width",t.width.toString()),t.height&&e.set("height",t.height.toString()),t.resize&&e.set("resize",t.resize),t.format&&e.set("format",t.format),t.quality&&e.set("quality",t.quality.toString()),e}};const zW="2.104.1",Rd={"X-Client-Info":`storage-js/${zW}`};var WW=class extends Zl{constructor(e,t={},r,n){const a=new URL(e);n!=null&&n.useNewHostname&&/supabase\.(co|in|red)$/.test(a.hostname)&&!a.hostname.includes("storage.supabase.")&&(a.hostname=a.hostname.replace("supabase.","storage.supabase."));const i=a.href.replace(/\/$/,""),o=ce(ce({},Rd),t);super(i,o,r,"storage")}async listBuckets(e){var t=this;return t.handleOperation(async()=>{const r=t.listBucketOptionsToQueryString(e);return await Ru(t.fetch,`${t.url}/bucket${r}`,{headers:t.headers})})}async getBucket(e){var t=this;return t.handleOperation(async()=>await Ru(t.fetch,`${t.url}/bucket/${e}`,{headers:t.headers}))}async createBucket(e,t={public:!1}){var r=this;return r.handleOperation(async()=>await dn(r.fetch,`${r.url}/bucket`,{id:e,name:e,type:t.type,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:r.headers}))}async updateBucket(e,t){var r=this;return r.handleOperation(async()=>await U0(r.fetch,`${r.url}/bucket/${e}`,{id:e,name:e,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:r.headers}))}async emptyBucket(e){var t=this;return t.handleOperation(async()=>await dn(t.fetch,`${t.url}/bucket/${e}/empty`,{},{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await Zw(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}listBucketOptionsToQueryString(e){const t={};return e&&("limit"in e&&(t.limit=String(e.limit)),"offset"in e&&(t.offset=String(e.offset)),e.search&&(t.search=e.search),e.sortColumn&&(t.sortColumn=e.sortColumn),e.sortOrder&&(t.sortOrder=e.sortOrder)),Object.keys(t).length>0?"?"+new URLSearchParams(t).toString():""}},HW=class extends Zl{constructor(e,t={},r){const n=e.replace(/\/$/,""),a=ce(ce({},Rd),t);super(n,a,r,"storage")}async createBucket(e){var t=this;return t.handleOperation(async()=>await dn(t.fetch,`${t.url}/bucket`,{name:e},{headers:t.headers}))}async listBuckets(e){var t=this;return t.handleOperation(async()=>
449{const r=new URLSearchParams;(e==null?void 0:e.limit)!==void 0&&r.set("limit",e.limit.toString()),(e==null?void 0:e.offset)!==void 0&&r.set("offset",e.offset.toString()),e!=null&&e.sortColumn&&r.set("sortColumn",e.sortColumn),e!=null&&e.sortOrder&&r.set("sortOrder",e.sortOrder),e!=null&&e.search&&r.set("search",e.search);const n=r.toString(),a=n?`${t.url}/bucket?${n}`:`${t.url}/bucket`;return await Ru(t.fetch,a,{headers:t.headers})})}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await Zw(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}from(e){var t=this;if(!MW(e))throw new Bm("Invalid bucket name: File, folder, and bucket names must follow AWS object key naming guidelines and should avoid the use of any other characters.");const r=new EW({baseUrl:this.url,catalogName:e,auth:{type:"custom",getHeaders:async()=>t.headers},fetch:this.fetch}),n=this.shouldThrowOnError;return new Proxy(r,{get(a,i){const o=a[i];return typeof o!="function"?o:async(...s)=>{try{return{data:await o.apply(a,s),error:null}}catch(l){if(n)throw l;return{data:null,error:l}}}}})}},qW=class extends Zl{constructor(e,t={},r){const n=e.replace(/\/$/,""),a=ce(ce({},Rd),{},{"Content-Type":"application/json"},t);super(n,a,r,"vectors")}async createIndex(e){var t=this;return t.handleOperation(async()=>await Sr.post(t.fetch,`${t.url}/CreateIndex`,e,{headers:t.headers})||{})}async getIndex(e,t){var r=this;return r.handleOperation(async()=>await Sr.post(r.fetch,`${r.url}/GetIndex`,{vectorBucketName:e,indexName:t},{headers:r.headers}))}async listIndexes(e){var t=this;return t.handleOperation(async()=>await Sr.post(t.fetch,`${t.url}/ListIndexes`,e,{headers:t.headers}))}async deleteIndex(e,t){var r=this;return r.handleOperation(async()=>await Sr.post(r.fetch,`${r.url}/DeleteIndex`,{vectorBucketName:e,indexName:t},{headers:r.headers})||{})}},VW=class extends Zl{constructor(e,t={},r){const n=e.replace(/\/$/,""),a=ce(ce({},Rd),{},{"Content-Type":"application/json"},t);super(n,a,r,"vectors")}async putVectors(e){var t=this;if(e.vectors.length<1||e.vectors.length>500)throw new Error("Vector batch size must be between 1 and 500 items");return t.handleOperation(async()=>await Sr.post(t.fetch,`${t.url}/PutVectors`,e,{headers:t.headers})||{})}async getVectors(e){var t=this;return t.handleOperation(async()=>await Sr.post(t.fetch,`${t.url}/GetVectors`,e,{headers:t.headers}))}async listVectors(e){var t=this;if(e.segmentCount!==void 0){if(e.segmentCount<1||e.segmentCount>16)throw new Error("segmentCount must be between 1 and 16");if(e.segmentIndex!==void 0&&(e.segmentIndex<0||e.segmentIndex>=e.segmentCount))throw new Error(`segmentIndex must be between 0 and ${e.segmentCount-1}`)}return t.handleOperation(async()=>await Sr.post(t.fetch,`${t.url}/ListVectors`,e,{headers:t.headers}))}async queryVectors(e){var t=this;return t.handleOperation(async()=>await Sr.post(t.fetch,`${t.url}/QueryVectors`,e,{headers:t.headers}))}async deleteVectors(e){var t=this;if(e.keys.length<1||e.keys.length>500)throw new Error("Keys batch size must be between 1 and 500 items");return t.handleOperation(async()=>await Sr.post(t.fetch,`${t.url}/DeleteVectors`,e,{headers:t.headers})||{})}},KW=class extends Zl{constructor(e,t={},r){const n=e.replace(/\/$/,""),a=ce(ce({},Rd),{},{"Content-Type":"application/json"},t);super(n,a,r,"vectors")}async createBucket(e){var t=this;return t.handleOperation(async()=>await Sr.post(t.fetch,`${t.url}/CreateVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}async getBucket(e){var t=this;return t.handleOperation(async()=>await Sr.post(t.fetch,`${t.url}/GetVectorBucket`,{vectorBucketName:e},{headers:t.headers}))}async listBuckets(e={}){var t=this;return t.handleOperation(async()=>await Sr.post(t.fetch,`${t.url}/ListVectorBuckets`,e,{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await Sr.post(t.fetch,`${t.url}/DeleteVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}},GW=class extends KW{constructor(e,t={}){super(e,t.headers||{},t.fetch)}from(e){return new YW(this.url,this.headers,e,this.fetch)}async createBucket(e){var t=()=>super.createBucket,r=this;return t().call(r,e)}async getBucket(e){var t=()=>super.getBucket,r=this;return t().call(r,e)}async listBuckets(e={}){var t=()=>super.listBuckets,r=this;return t().call(r,e)}async deleteBucket(e){var t=()=>super.deleteBucket,r=this;return t().call(r,e)}},YW=class extends qW{constructor(e,t,r,n){super(e,t,n),this.vectorBucketName=r}async createIndex(e){var t=()=>super.createIndex,r=this;return t().call(r,ce(ce({},e),{},{vectorBucketName:r.vectorBucketName}))}
449async listIndexes(e={}){var t=()=>super.listIndexes,r=this;return t().call(r,ce(ce({},e),{},{vectorBucketName:r.vectorBucketName}))}async getIndex(e){var t=()=>super.getIndex,r=this;return t().call(r,r.vectorBucketName,e)}async deleteIndex(e){var t=()=>super.deleteIndex,r=this;return t().call(r,r.vectorBucketName,e)}index(e){return new XW(this.url,this.headers,this.vectorBucketName,e,this.fetch)}},XW=class extends VW{constructor(e,t,r,n,a){super(e,t,a),this.vectorBucketName=r,this.indexName=n}async putVectors(e){var t=()=>super.putVectors,r=this;return t().call(r,ce(ce({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async getVectors(e){var t=()=>super.getVectors,r=this;return t().call(r,ce(ce({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async listVectors(e={}){var t=()=>super.listVectors,r=this;return t().call(r,ce(ce({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async queryVectors(e){var t=()=>super.queryVectors,r=this;return t().call(r,ce(ce({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async deleteVectors(e){var t=()=>super.deleteVectors,r=this;return t().call(r,ce(ce({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}},JW=class extends WW{constructor(e,t={},r,n){super(e,t,r,n)}from(e){return new UW(this.url,this.headers,e,this.fetch)}get vectors(){return new GW(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new HW(this.url+"/iceberg",this.headers,this.fetch)}};function Um(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r}const VA="2.104.1",ws=30*1e3,z0=3,Nv=z0*ws,QW="http://localhost:9999",ZW="supabase.auth.token",e7={"X-Client-Info":`gotrue-js/${VA}`},W0="X-Supabase-Api-Version",KA={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},t7=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,r7=10*60*1e3;class Iu extends Error{constructor(t,r,n){super(t),this.__isAuthError=!0,this.name="AuthError",this.status=r,this.code=n}toJSON(){return{name:this.name,message:this.message,status:this.status,code:this.code}}}function ne(e){return typeof e=="object"&&e!==null&&"__isAuthError"in e}class n7 extends Iu{constructor(t,r,n){super(t,r,n),this.name="AuthApiError",this.status=r,this.code=n}}function a7(e){return ne(e)&&e.name==="AuthApiError"}class io extends Iu{constructor(t,r){super(t),this.name="AuthUnknownError",this.originalError=r}}class Ua extends Iu{constructor(t,r,n,a){super(t,n,a),this.name=r,this.status=n}}class yr extends Ua{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function Ef(e){return ne(e)&&e.name==="AuthSessionMissingError"}class ss extends Ua{constructor(){super("Auth session or user missing","AuthInvalidToken
449ResponseError",500,void 0)}}class Of extends Ua{constructor(t){super(t,"AuthInvalidCredentialsError",400,void 0)}}class Nf extends Ua{constructor(t,r=null){super(t,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=r}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}function i7(e){return ne(e)&&e.name==="AuthImplicitGrantRedirectError"}class Gj extends Ua{constructor(t,r=null){super(t,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=r}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}class o7 extends Ua{constructor(){super("PKCE code verifier not found in storage. This can happen if the auth flow was initiated in a different browser or device, or if the storage was cleared. For SSR frameworks (Next.js, SvelteKit, etc.), use @supabase/ssr on both the server and client to store the code verifier in cookies.","AuthPKCECodeVerifierMissingError",400,"pkce_code_verifier_not_found")}}class H0 extends Ua{constructor(t,r){super(t,"AuthRetryableFetchError",r,void 0)}}function Pv(e){return ne(e)&&e.name==="AuthRetryableFetchError"}class Yj extends Ua{constructor(t,r,n){super(t,"AuthWeakPasswordError",r,"weak_password"),this.reasons=n}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{reasons:this.reasons})}}class q0 extends Ua{constructor(t){super(t,"AuthInvalidJwtError",400,"invalid_jwt")}}const Jh="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),Xj=` 	
450\r=`.split(""),s7=(()=>{const e=new Array(128);for(let t=0;t<e.length;t+=1)e[t]=-1;for(let t=0;t<Xj.length;t+=1)e[Xj[t].charCodeAt(0)]=-2;for(let t=0;t<Jh.length;t+=1)e[Jh[t].charCodeAt(0)]=t;return e})();function Jj(e,t,r){if(e!==null)for(t.queue=t.queue<<8|e,t.queuedBits+=8;t.queuedBits>=6;){const n=t.queue>>t.queuedBits-6&63;r(Jh[n]),t.queuedBits-=6}else if(t.queuedBits>0)for(t.queue=t.queue<<6-t.queuedBits,t.queuedBits=6;t.queuedBits>=6;){const n=t.queue>>t.queuedBits-6&63;r(Jh[n]),t.queuedBits-=6}}function GA(e,t,r){const n=s7[e];if(n>-1)for(t.queue=t.queue<<6|n,t.queuedBits+=6;t.queuedBits>=8;)r(t.queue>>t.queuedBits-8&255),t.queuedBits-=8;else{if(n===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(e)}"`)}}function Qj(e){const t=[],r=o=>{t.push(String.fromCodePoint(o))},n={utf8seq:0,codepoint:0},a={queue:0,queuedBits:0},i=o=>{u7(o,n,r)};for(let o=0;o<e.length;o+=1)GA(e.charCodeAt(o),a,i);return t.join("")}function l7(e,t){if(e<=127){t(e);return}else if(e<=2047){t(192|e>>6),t(128|e&63);return}else if(e<=65535){t(224|e>>12),t(128|e>>6&63),t(128|e&63);return}else if(e<=1114111){t(240|e>>18),t(128|e>>12&63),t(128|e>>6&63),t(128|e&63);return}throw new Error(`Unrecognized Unicode codepoint: ${e.toString(16)}`)}function c7(e,t){for(let r=0;r<e.length;r+=1){let n=e.charCodeAt(r);if(n>55295&&n<=56319){const a=(n-55296)*1024&65535;n=(e.charCodeAt(r+1)-56320&65535|a)+65536,r+=1}l7(n,t)}}function u7(e,t,r){if(t.utf8seq===0){if(e<=127){r(e);return}for(let n=1;n<6;n+=1)if(!(e>>7-n&1)){t.utf8seq=n;break}if(t.utf8seq===2)t.codepoint=e&31;else if(t.utf8seq===3)t.codepoint=e&15;else if(t.utf8seq===4)t.codepoint=e&7;else throw new Error("Invalid UTF-8 sequence");t.utf8seq-=1}else if(t.utf8seq>0){if(e<=127)throw new Error("Invalid UTF-8 sequence");t.codepoint=t.codepoint<<6|e&63,t.utf8seq-=1,t.utf8seq===0&&r(t.codepoint)}}function Ks(e){const t=[],r={queue:0,queuedBits:0},n=a=>{t.push(a)};for(let a=0;a<e.length;a+=1)GA(e.charCodeAt(a),r,n);return new Uint8Array(t)}function d7(e){const t=[];return c7(e,r=>t.push(r)),new Uint8Array(t)}function co(e){const t=[],r={queue:0,queuedBits:0},n=a=>{t.push(a)};return e.forEach(a=>Jj(a,r,n)),Jj(null,r,n),t.join("")}function f7(e){return Math.round(Date.now()/1e3)+e}function h7(){return Symbol("auth-callback")}const At=()=>typeof window<"u"&&typeof document<"u",Yi={tested:!1,writable:!1},YA=()=>{if(!At())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(Yi.tested)return Yi.writable;const e=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),Yi.tested=!0,Yi.writable=!0}catch{Yi.tested=!0,Yi.writable=!1}return Yi.writable};function p7(e){const t={},r=new URL(e);if(r.hash&&r.hash[0]==="#")try{new URLSearchParams(r.hash.substring(1)).forEac
450h((a,i)=>{t[i]=a})}catch{}return r.searchParams.forEach((n,a)=>{t[a]=n}),t}const XA=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),m7=e=>typeof e=="object"&&e!==null&&"status"in e&&"ok"in e&&"json"in e&&typeof e.json=="function",_s=async(e,t,r)=>{await e.setItem(t,JSON.stringify(r))},Xi=async(e,t)=>{const r=await e.getItem(t);if(!r)return null;try{return JSON.parse(r)}catch{return r}},Tt=async(e,t)=>{await e.removeItem(t)};class zm{constructor(){this.promise=new zm.promiseConstructor((t,r)=>{this.resolve=t,this.reject=r})}}zm.promiseConstructor=Promise;function Pf(e){const t=e.split(".");if(t.length!==3)throw new q0("Invalid JWT structure");for(let n=0;n<t.length;n++)if(!t7.test(t[n]))throw new q0("JWT not in base64url format");return{header:JSON.parse(Qj(t[0])),payload:JSON.parse(Qj(t[1])),signature:Ks(t[2]),raw:{header:t[0],payload:t[1]}}}async function g7(e){return await new Promise(t=>{setTimeout(()=>t(null),e)})}function v7(e,t){return new Promise((n,a)=>{(async()=>{for(let i=0;i<1/0;i++)try{const o=await e(i);if(!t(i,null,o)){n(o);return}}catch(o){if(!t(i,o)){a(o);return}}})()})}function y7(e){return("0"+e.toString(16)).substr(-2)}function b7(){const t=new Uint32Array(56);if(typeof crypto>"u"){const r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",n=r.length;let a="";for(let i=0;i<56;i++)a+=r.charAt(Math.floor(Math.random()*n));return a}return crypto.getRandomValues(t),Array.from(t,y7).join("")}async function x7(e){const r=new TextEncoder().encode(e),n=await crypto.subtle.digest("SHA-256",r),a=new Uint8Array(n);return Array.from(a).map(i=>String.fromCharCode(i)).join("")}async function w7(e){if(!(typeof crypto<"u"&&typeof crypto.subtle<"u"&&typeof TextEncoder<"u"))return console.warn("WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256."),e;const r=await x7(e);return btoa(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function ls(e,t,r=!1){const n=b7();let a=n;r&&(a+="/recovery"),await _s(e,`${t}-code-verifier`,a);const i=await w7(n);return[i,n===i?"plain":"s256"]}const _7=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function S7(e){const t=e.headers.get(W0);if(!t||!t.match(_7))return null;try{return new Date(`${t}T00:00:00.0Z`)}catch{return null}}function j7(e){if(!e)throw new Error("Missing exp claim");const t=Math.floor(Date.now()/1e3);if(e<=t)throw new Error("JWT has expired")}function k7(e){switch(e){case"RS256":return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};case"ES256":return{name:"ECDSA",namedCurve:"P-256",hash:{name:"SHA-256"}};default:throw new Error("Invalid alg claim")}}const E7=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function cs(e){if(!E7.test(e))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function Cv(){const e={};return new Proxy(e,{get:(t,r)=>{if(r==="__isUserNotAvailableProxy")return!0;if(typeof r=="symbol"){const n=r.toString();if(n==="Symbol(Symbol.toPrimitive)"||n==="Symbol(Symbol.toStringTag)"||n==="Symbol(util.inspect.custom)")return}throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Accessing the "${r}" property of the session object is not supported. Please use getUser() instead.`)},set:(t,r)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Setting the "${r}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)},deleteProperty:(t,r)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Deleting the "${r}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)}})}function O7(e,t){return new Proxy(e,{get:(r,n,a)=>{if(n==="__isInsecureUserWarningProxy")return!0;if(typeof n=="symbol"){const i=n.toString();if(i==="Symbol(Symbol.toPrimitive)"||i==="Symbol(Symbol.toStringTag)"||i==="Symbol(util.inspect.custom)"||i==="Symbol(nodejs.util.inspect.custom)")return Reflect.get(r,n,a)}return!t.value&&typeof n=="string"&&(console.warn("Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server."),t.value=!0),Reflect.get(r,n,a)}})}function Zj(e){return JSON.parse(JSON.stringify(e))}const eo=e=>e.msg||e.message||e.error_description||e.error||JSON.stringify(e),N7=[502,503,504,520,521,522,523,524,530];async function ek(e){var t;if(!m7(e))throw new H0(eo(e),0);if(N7.includes(e.status))throw new H0(eo(e),e.status);let r;try{r=await e.json()}
450catch(i){throw new io(eo(i),i)}let n;const a=S7(e);if(a&&a.getTime()>=KA["2024-01-01"].timestamp&&typeof r=="object"&&r&&typeof r.code=="string"?n=r.code:typeof r=="object"&&r&&typeof r.error_code=="string"&&(n=r.error_code),n){if(n==="weak_password")throw new Yj(eo(r),e.status,((t=r.weak_password)===null||t===void 0?void 0:t.reasons)||[]);if(n==="session_not_found")throw new yr}else if(typeof r=="object"&&r&&typeof r.weak_password=="object"&&r.weak_password&&Array.isArray(r.weak_password.reasons)&&r.weak_password.reasons.length&&r.weak_password.reasons.reduce((i,o)=>i&&typeof o=="string",!0))throw new Yj(eo(r),e.status,r.weak_password.reasons);throw new n7(eo(r),e.status||500,n)}const P7=(e,t,r,n)=>{const a={method:e,headers:(t==null?void 0:t.headers)||{}};return e==="GET"?a:(a.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},t==null?void 0:t.headers),a.body=JSON.stringify(n),Object.assign(Object.assign({},a),r))};async function ie(e,t,r,n){var a;const i=Object.assign({},n==null?void 0:n.headers);i[W0]||(i[W0]=KA["2024-01-01"].name),n!=null&&n.jwt&&(i.Authorization=`Bearer ${n.jwt}`);const o=(a=n==null?void 0:n.query)!==null&&a!==void 0?a:{};n!=null&&n.redirectTo&&(o.redirect_to=n.redirectTo);const s=Object.keys(o).length?"?"+new URLSearchParams(o).toString():"",l=await C7(e,t,r+s,{headers:i,noResolveJson:n==null?void 0:n.noResolveJson},{},n==null?void 0:n.body);return n!=null&&n.xform?n==null?void 0:n.xform(l):{data:Object.assign({},l),error:null}}async function C7(e,t,r,n,a,i){const o=P7(t,n,a,i);let s;try{s=await e(r,Object.assign({},o))}catch(l){throw console.error(l),new H0(eo(l),0)}if(s.ok||await ek(s),n!=null&&n.noResolveJson)return s;try{return await s.json()}catch(l){await ek(l)}}function sn(e){var t;let r=null;M7(e)&&(r=Object.assign({},e),e.expires_at||(r.expires_at=f7(e.expires_in)));const n=(t=e.user)!==null&&t!==void 0?t:e;return{data:{session:r,user:n},error:null}}function tk(e){const t=sn(e);return!t.error&&e.weak_password&&typeof e.weak_password=="object"&&Array.isArray(e.weak_password.reasons)&&e.weak_password.reasons.length&&e.weak_password.message&&typeof e.weak_password.message=="string"&&e.weak_password.reasons.reduce((r,n)=>r&&typeof n=="string",!0)&&(t.data.weak_password=e.weak_password),t}function si(e){var t;return{data:{user:(t=e.user)!==null&&t!==void 0?t:e},error:null}}function T7(e){return{data:e,error:null}}function A7(e){const{action_link:t,email_otp:r,hashed_token:n,redirect_to:a,verification_type:i}=e,o=Um(e,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),s={action_link:t,email_otp:r,hashed_token:n,redirect_to:a,verification_type:i},l=Object.assign({},o);return{data:{properties:s,user:l},error:null}}function rk(e){return e}function M7(e){return e.access_token&&e.refresh_token&&e.expires_in}const Tv=["global","local","others"];class $7{constructor({url:t="",headers:r={},fetch:n}){this.url=t,this.headers=r,this.fetch=XA(n),this.mfa={listFactors:this._listFactors.bind(this),deleteFactor:this._deleteFactor.bind(this)},this.oauth={listClients:this._listOAuthClients.bind(this),createClient:this._createOAuthClient.bind(this),getClient:this._getOAuthClient.bind(this),updateClient:this._updateOAuthClient.bind(this),deleteClient:this._deleteOAuthClient.bind(this),regenerateClientSecret:this._regenerateOAuthClientSecret.bind(this)},this.customProviders={listProviders:this._listCustomProviders.bind(this),createProvider:this._createCustomProvider.bind(this),getProvider:this._getCustomProvider.bind(this),updateProvider:this._updateCustomProvider.bind(this),deleteProvider:this._deleteCustomProvider.bind(this)}}async signOut(t,r=Tv[0]){if(Tv.indexOf(r)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${Tv.join(", ")}`);try{return await ie(this.fetch,"POST",`${this.url}/logout?scope=${r}`,{headers:this.headers,jwt:t,noResolveJson:!0}),{data:null,error:null}}catch(n){if(ne(n))return{data:null,error:n};throw n}}async inviteUserByEmail(t,r={}){try{return await ie(this.fetch,"POST",`${this.url}/invite`,{body:{email:t,data:r.data},headers:this.headers,redirectTo:r.redirectTo,xform:si})}catch(n){if(ne(n))return{data:{user:null},error:n};throw n}}async generateLink(t){try{const{options:r}=t,n=Um(t,["options"]),a=Object.assign(Object.assign({},n),r);return"newEmail"in n&&(a.new_email=n==null?void 0:n.newEmail,delete a.newEmail),await ie(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:a,headers:this.headers,xform:A7,redirectTo:r==null?void 0:r.redirectTo})}catch(r){if(ne(r))return{data:{properties:null,user:null},error:r};throw r}}async createUser(t){try{return await ie(this.fetch,"POST",`${this.url}/admin/users`,{body:t,headers:this.headers,xform:si})}catch(r){if(ne(r))return{data:{user:null},error:r};throw r}}async listUsers(t){var r,n,a,i,o,s,l;try{const c={nextPage:null,lastPage:0,total:0},d=await ie(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(n=(r=t==null?void 0:t.page)===null||r===void 0?void 0:r.toString())!==null&&n!==void 0?n:"",per_page:(i=(a=t==null?void 0:t.perPage)===null||a===void 0?void 0:a.toString())!==null&&i!==void 0?i:""},xform:rk});if(d.error)throw d.error;const f=await d.json(),h=(o=d.headers.get("x-total-count"))!==null&&o!==void 0?o:0,p=(l=(s=d.headers.get("link"))===null||s===void 0?void 0:s.split(","))!==null&&l!==void 0?l:[];return p.length>
4500&&(p.forEach(g=>{const m=parseInt(g.split(";")[0].split("=")[1].substring(0,1)),v=JSON.parse(g.split(";")[1].split("=")[1]);c[`${v}Page`]=m}),c.total=parseInt(h)),{data:Object.assign(Object.assign({},f),c),error:null}}catch(c){if(ne(c))return{data:{users:[]},error:c};throw c}}async getUserById(t){cs(t);try{return await ie(this.fetch,"GET",`${this.url}/admin/users/${t}`,{headers:this.headers,xform:si})}catch(r){if(ne(r))return{data:{user:null},error:r};throw r}}async updateUserById(t,r){cs(t);try{return await ie(this.fetch,"PUT",`${this.url}/admin/users/${t}`,{body:r,headers:this.headers,xform:si})}catch(n){if(ne(n))return{data:{user:null},error:n};throw n}}async deleteUser(t,r=!1){cs(t);try{return await ie(this.fetch,"DELETE",`${this.url}/admin/users/${t}`,{headers:this.headers,body:{should_soft_delete:r},xform:si})}catch(n){if(ne(n))return{data:{user:null},error:n};throw n}}async _listFactors(t){cs(t.userId);try{const{data:r,error:n}=await ie(this.fetch,"GET",`${this.url}/admin/users/${t.userId}/factors`,{headers:this.headers,xform:a=>({data:{factors:a},error:null})});return{data:r,error:n}}catch(r){if(ne(r))return{data:null,error:r};throw r}}async _deleteFactor(t){cs(t.userId),cs(t.id);try{return{data:await ie(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/factors/${t.id}`,{headers:this.headers}),error:null}}catch(r){if(ne(r))return{data:null,error:r};throw r}}async _listOAuthClients(t){var r,n,a,i,o,s,l;try{const c={nextPage:null,lastPage:0,total:0},d=await ie(this.fetch,"GET",`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:(n=(r=t==null?void 0:t.page)===null||r===void 0?void 0:r.toString())!==null&&n!==void 0?n:"",per_page:(i=(a=t==null?void 0:t.perPage)===null||a===void 0?void 0:a.toString())!==null&&i!==void 0?i:""},xform:rk});if(d.error)throw d.error;const f=await d.json(),h=(o=d.headers.get("x-total-count"))!==null&&o!==void 0?o:0,p=(l=(s=d.headers.get("link"))===null||s===void 0?void 0:s.split(","))!==null&&l!==void 0?l:[];return p.length>0&&(p.forEach(g=>{const m=parseInt(g.split(";")[0].split("=")[1].substring(0,1)),v=JSON.parse(g.split(";")[1].split("=")[1]);c[`${v}Page`]=m}),c.total=parseInt(h)),{data:Object.assign(Object.assign({},f),c),error:null}}catch(c){if(ne(c))return{data:{clients:[]},error:c};throw c}}async _createOAuthClient(t){try{return await ie(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:t,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(ne(r))return{data:null,error:r};throw r}}async _getOAuthClient(t){try{return await ie(this.fetch,"GET",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(ne(r))return{data:null,error:r};throw r}}async _updateOAuthClient(t,r){try{return await ie(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${t}`,{body:r,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(ne(n))return{data:null,error:n};throw n}}async _deleteOAuthClient(t){try{return await ie(this.fetch,"DELETE",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if(ne(r))return{data:null,error:r};throw r}}async _regenerateOAuthClientSecret(t){try{return await ie(this.fetch,"POST",`${this.url}/admin/oauth/clients/${t}/regenerate_secret`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(ne(r))return{data:null,error:r};throw r}}async _listCustomProviders(t){try{const r={};return t!=null&&t.type&&(r.type=t.type),await ie(this.fetch,"GET",`${this.url}/admin/custom-providers`,{headers:this.headers,query:r,xform:n=>{var a;return{data:{providers:(a=n==null?void 0:n.providers)!==null&&a!==void 0?a:[]},error:null}}})}catch(r){if(ne(r))return{data:{providers:[]},error:r};throw r}}async _createCustomProvider(t){try{return await ie(this.fetch,"POST",`${this.url}/admin/custom-providers`,{body:t,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(ne(r))return{data:null,error:r};throw r}}async _getCustomProvider(t){try{return await ie(this.fetch,"GET",`${this.url}/admin/custom-providers/${t}`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(ne(r))return{data:null,error:r};throw r}}async _updateCustomProvider(t,r){try{return await ie(this.fetch,"PUT",`${this.url}/admin/custom-providers/${t}`,{body:r,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(ne(n))return{data:null,error:n};throw n}}async _deleteCustomProvider(t){try{return await ie(this.fetch,"DELET
450E",`${this.url}/admin/custom-providers/${t}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if(ne(r))return{data:null,error:r};throw r}}}function nk(e={}){return{getItem:t=>e[t]||null,setItem:(t,r)=>{e[t]=r},removeItem:t=>{delete e[t]}}}const Rn={debug:!!(globalThis&&YA()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};class JA extends Error{constructor(t){super(t),this.isAcquireTimeout=!0}}class ak extends JA{}async function R7(e,t,r){Rn.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",e,t);const n=new globalThis.AbortController;let a;t>0&&(a=setTimeout(()=>{n.abort(),Rn.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",e)},t)),await Promise.resolve();try{return await globalThis.navigator.locks.request(e,t===0?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:n.signal},async i=>{if(i){clearTimeout(a),Rn.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",e,i.name);try{return await r()}finally{Rn.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",e,i.name)}}else{if(t===0)throw Rn.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",e),new ak(`Acquiring an exclusive Navigator LockManager lock "${e}" immediately failed`);if(Rn.debug)try{const o=await globalThis.navigator.locks.query();console.log("@supabase/gotrue-js: Navigator LockManager state",JSON.stringify(o,null,"  "))}catch(o){console.warn("@supabase/gotrue-js: Error when querying Navigator LockManager state",o)}return console.warn("@supabase/gotrue-js: Navigator LockManager returned a null lock when using #request without ifAvailable set to true, it appears this browser is not following the LockManager spec https://developer.mozilla.org/en-US/docs/Web/API/LockManager/request"),clearTimeout(a),await r()}})}catch(i){if(t>0&&clearTimeout(a),(i==null?void 0:i.name)==="AbortError"&&t>0){if(n.signal.aborted)return Rn.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire timeout, recovering by stealing lock",e),console.warn(`@supabase/gotrue-js: Lock "${e}" was not released within ${t}ms. This may indicate an orphaned lock from a component unmount (e.g., React Strict Mode). Forcefully acquiring the lock to recover.`),await Promise.resolve().then(()=>globalThis.navigator.locks.request(e,{mode:"exclusive",steal:!0},async o=>{if(o){Rn.debug&&console.log("@supabase/gotrue-js: navigatorLock: recovered (stolen)",e,o.name);try{return await r()}finally{Rn.debug&&console.log("@supabase/gotrue-js: navigatorLock: released (stolen)",e,o.name)}}else return console.warn("@supabase/gotrue-js: Navigator LockManager returned null lock even with steal: true"),await r()}));throw Rn.debug&&console.log("@supabase/gotrue-js: navigatorLock: lock was stolen by another request",e),new ak(`Lock "${e}" was released because another request stole it`)}throw i}}function I7(){if(typeof globalThis!="object")try{Object.defineProperty(Object.prototype,"__magic__",{get:function(){return this},configurable:!0}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__}catch{typeof self<"u"&&(self.globalThis=self)}}function QA(e){if(!/^0x[a-fA-F0-9]{40}$/.test(e))throw new Error(`@supabase/auth-js: Address "${e}" is invalid.`);return e.toLowerCase()}function D7(e){return parseInt(e,16)}function L7(e){const t=new TextEncoder().encode(e);return"0x"+Array.from(t,n=>n.toString(16).padStart(2,"0")).join("")}function B7(e){var t;const{chainId:r,domain:n,expirationTime:a,issuedAt:i=new Date,nonce:o,notBefore:s,requestId:l,resources:c,scheme:d,uri:f,version:h}=e;{if(!Number.isInteger(r))throw new Error(`@supabase/auth-js: Invalid SIWE message field "chainId". Chain ID must be a EIP-155 chain ID. Provided value: ${r}`);if(!n)throw new Error('@supabase/auth-js: Invalid SIWE message field "domain". Domain must be provided.');if(o&&o.length<8)throw new Error(`@supabase/auth-js: Invalid SIWE message field "nonce". Nonce must be at least 8 characters. Provided value: ${o}`);if(!f)throw new Error('@supabase/auth-js: Invalid SIWE message field "uri". URI must be provided.');if(h!=="1")throw new Error(`@supabase/auth-js: Invalid SIWE message field "version". Version must be '1'. Provided value: ${h}`);
450if(!((t=e.statement)===null||t===void 0)&&t.includes(`
451`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${e.statement}`)}const p=QA(e.address),g=d?`${d}://${n}`:n,m=e.statement?`${e.statement}
452`:"",v=`${g} wants you to sign in with your Ethereum account:
453${p}
454
455${m}`;let x=`URI: ${f}
456Version: ${h}
457Chain ID: ${r}${o?`
458Nonce: ${o}`:""}
459Issued At: ${i.toISOString()}`;if(a&&(x+=`
460Expiration Time: ${a.toISOString()}`),s&&(x+=`
461Not Before: ${s.toISOString()}`),l&&(x+=`
462Request ID: ${l}`),c){let b=`
463Resources:`;for(const y of c){if(!y||typeof y!="string")throw new Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${y}`);b+=`
464- ${y}`}x+=b}return`${v}
465${x}`}class pt extends Error{constructor({message:t,code:r,cause:n,name:a}){var i;super(t,{cause:n}),this.__isWebAuthnError=!0,this.name=(i=a??(n instanceof Error?n.name:void 0))!==null&&i!==void 0?i:"Unknown Error",this.code=r}}class Qh extends pt{constructor(t,r){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:r,message:t}),this.name="WebAuthnUnknownError",this.originalError=r}}function F7({error:e,options:t}){var r,n,a;const{publicKey:i}=t;if(!i)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new pt({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else if(e.name==="ConstraintError"){if(((r=i.authenticatorSelection)===null||r===void 0?void 0:r.requireResidentKey)===!0)return new pt({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:e});if(t.mediation==="conditional"&&((n=i.authenticatorSelection)===null||n===void 0?void 0:n.userVerification)==="required")return new pt({message:"User verification was required during automatic registration but it could not be performed",code:"ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",cause:e});if(((a=i.authenticatorSelection)===null||a===void 0?void 0:a.userVerification)==="required")return new pt({message:"User verification was required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",cause:e})}else{if(e.name==="InvalidStateError")return new pt({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:e});if(e.name==="NotAllowedError")return new pt({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="NotSupportedError")return i.pubKeyCredParams.filter(s=>s.type==="public-key").length===0?new pt({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:e}):new pt({message:"No available authenticator supported any of the specified pubKeyCredParams algorithms",code:"ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",cause:e});if(e.name==="SecurityError"){const o=window.location.hostname;if(ZA(o)){if(i.rp.id!==o)return new pt({message:`The RP ID "${i.rp.id}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new pt({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="TypeError"){if(i.user.id.byteLength<1||i.user.id.byteLength>64)return new pt({message:"User ID was not between 1 and 64 characters",code:"ERROR_INVALID_USER_ID_LENGTH",cause:e})}else if(e.name==="UnknownError")return new pt({message:"The authenticator was unable to process the specified options, or could not create a new credential",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return new pt({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}function U7({error:e,options:t}){const{publicKey:r}=t;if(!r)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new pt({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else{if(e.name==="NotAllowedError")return new pt({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="SecurityError"){const n=window.location.hostname;if(ZA(n)){if(r.rpId!==n)return new pt({message:`The RP ID "${r.rpId}
465" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new pt({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="UnknownError")return new pt({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return new pt({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}class z7{createNewAbortSignal(){if(this.controller){const r=new Error("Cancelling existing WebAuthn API call for new one");r.name="AbortError",this.controller.abort(r)}const t=new AbortController;return this.controller=t,t.signal}cancelCeremony(){if(this.controller){const t=new Error("Manually cancelling existing WebAuthn API call");t.name="AbortError",this.controller.abort(t),this.controller=void 0}}}const W7=new z7;function H7(e){if(!e)throw new Error("Credential creation options are required");if(typeof PublicKeyCredential<"u"&&"parseCreationOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseCreationOptionsFromJSON=="function")return PublicKeyCredential.parseCreationOptionsFromJSON(e);const{challenge:t,user:r,excludeCredentials:n}=e,a=Um(e,["challenge","user","excludeCredentials"]),i=Ks(t).buffer,o=Object.assign(Object.assign({},r),{id:Ks(r.id).buffer}),s=Object.assign(Object.assign({},a),{challenge:i,user:o});if(n&&n.length>0){s.excludeCredentials=new Array(n.length);for(let l=0;l<n.length;l++){const c=n[l];s.excludeCredentials[l]=Object.assign(Object.assign({},c),{id:Ks(c.id).buffer,type:c.type||"public-key",transports:c.transports})}}return s}function q7(e){if(!e)throw new Error("Credential request options are required");if(typeof PublicKeyCredential<"u"&&"parseRequestOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseRequestOptionsFromJSON=="function")return PublicKeyCredential.parseRequestOptionsFromJSON(e);const{challenge:t,allowCredentials:r}=e,n=Um(e,["challenge","allowCredentials"]),a=Ks(t).buffer,i=Object.assign(Object.assign({},n),{challenge:a});if(r&&r.length>0){i.allowCredentials=new Array(r.length);for(let o=0;o<r.length;o++){const s=r[o];i.allowCredentials[o]=Object.assign(Object.assign({},s),{id:Ks(s.id).buffer,type:s.type||"public-key",transports:s.transports})}}return i}function V7(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const r=e;return{id:e.id,rawId:e.id,response:{attestationObject:co(new Uint8Array(e.response.attestationObject)),clientDataJSON:co(new Uint8Array(e.response.clientDataJSON))},type:"public-key",clientExtensionResults:e.getClientExtensionResults(),authenticatorAttachment:(t=r.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function K7(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const r=e,n=e.getClientExtensionResults(),a=e.response;return{id:e.id,rawId:e.id,response:{authenticatorData:co(new Uint8Array(a.authenticatorData)),clientDataJSON:co(new Uint8Array(a.clientDataJSON)),signature:co(new Uint8Array(a.signature)),userHandle:a.userHandle?co(new Uint8Array(a.userHandle)):void 0},type:"public-key",clientExtensionResults:n,authenticatorAttachment:(t=r.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function ZA(e){return e==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}function ik(){var e,t;return!!(At()&&"PublicKeyCredential"in window&&window.PublicKeyCredential&&"credentials"in navigator&&typeof((e=navigator==null?void 0:navigator.credentials)===null||e===void 0?void 0:e.create)=="function"&&typeof((t=navigator==null?void 0:navigator.credentials)===null||t===void 0?void 0:t.get)=="function")}async function G7(e){try{const t=await navigator.credentials.create(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new Qh("Browser returned unexpected credential type",t)}:{data:null,error:new Qh("Empty credential response",t)}}catch(t){return{data:null,error:F7({error:t,options:e})}}}async function Y7(e){try{const t=await navigator.credentials.get(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new Qh("Browser returned unexpected credential type",t)}:{data:null,error:new Qh("Empty credential response",t)}}
465catch(t){return{data:null,error:U7({error:t,options:e})}}}const X7={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},J7={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function Zh(...e){const t=a=>a!==null&&typeof a=="object"&&!Array.isArray(a),r=a=>a instanceof ArrayBuffer||ArrayBuffer.isView(a),n={};for(const a of e)if(a)for(const i in a){const o=a[i];if(o!==void 0)if(Array.isArray(o))n[i]=o;else if(r(o))n[i]=o;else if(t(o)){const s=n[i];t(s)?n[i]=Zh(s,o):n[i]=Zh(o)}else n[i]=o}return n}function Q7(e,t){return Zh(X7,e,t||{})}function Z7(e,t){return Zh(J7,e,t||{})}class e9{constructor(t){this.client=t,this.enroll=this._enroll.bind(this),this.challenge=this._challenge.bind(this),this.verify=this._verify.bind(this),this.authenticate=this._authenticate.bind(this),this.register=this._register.bind(this)}async _enroll(t){return this.client.mfa.enroll(Object.assign(Object.assign({},t),{factorType:"webauthn"}))}async _challenge({factorId:t,webauthn:r,friendlyName:n,signal:a},i){var o;try{const{data:s,error:l}=await this.client.mfa.challenge({factorId:t,webauthn:r});if(!s)return{data:null,error:l};const c=a??W7.createNewAbortSignal();if(s.webauthn.type==="create"){const{user:d}=s.webauthn.credential_options.publicKey;if(!d.name){const f=n;if(f)d.name=`${d.id}:${f}`;else{const p=(await this.client.getUser()).data.user,g=((o=p==null?void 0:p.user_metadata)===null||o===void 0?void 0:o.name)||(p==null?void 0:p.email)||(p==null?void 0:p.id)||"User";d.name=`${d.id}:${g}`}}d.displayName||(d.displayName=d.name)}switch(s.webauthn.type){case"create":{const d=Q7(s.webauthn.credential_options.publicKey,i==null?void 0:i.create),{data:f,error:h}=await G7({publicKey:d,signal:c});return f?{data:{factorId:t,challengeId:s.id,webauthn:{type:s.webauthn.type,credential_response:f}},error:null}:{data:null,error:h}}case"request":{const d=Z7(s.webauthn.credential_options.publicKey,i==null?void 0:i.request),{data:f,error:h}=await Y7(Object.assign(Object.assign({},s.webauthn.credential_options),{publicKey:d,signal:c}));return f?{data:{factorId:t,challengeId:s.id,webauthn:{type:s.webauthn.type,credential_response:f}},error:null}:{data:null,error:h}}}}catch(s){return ne(s)?{data:null,error:s}:{data:null,error:new io("Unexpected error in challenge",s)}}}async _verify({challengeId:t,factorId:r,webauthn:n}){return this.client.mfa.verify({factorId:r,challengeId:t,webauthn:n})}async _authenticate({factorId:t,webauthn:{rpId:r=typeof window<"u"?window.location.hostname:void 0,rpOrigins:n=typeof window<"u"?[window.location.origin]:void 0,signal:a}={}},i){if(!r)return{data:null,error:new Iu("rpId is required for WebAuthn authentication")};try{if(!ik())return{data:null,error:new io("Browser does not support WebAuthn",null)};const{data:o,error:s}=await this.challenge({factorId:t,webauthn:{rpId:r,rpOrigins:n},signal:a},{request:i});if(!o)return{data:null,error:s};const{webauthn:l}=o;return this._verify({factorId:t,challengeId:o.challengeId,webauthn:{type:l.type,rpId:r,rpOrigins:n,credential_response:l.credential_response}})}catch(o){return ne(o)?{data:null,error:o}:{data:null,error:new io("Unexpected error in authenticate",o)}}}async _register({friendlyName:t,webauthn:{rpId:r=typeof window<"u"?window.location.hostname:void 0,rpOrigins:n=typeof window<"u"?[window.location.origin]:void 0,signal:a}={}},i){if(!r)return{data:null,error:new Iu("rpId is required for WebAuthn registration")};try{if(!ik())return{data:null,error:new io("Browser does not support WebAuthn",null)};const{data:o,error:s}=await this._enroll({friendlyName:t});if(!o)return await this.client.mfa.listFactors().then(d=>{var f;return(f=d.data)===null||f===void 0?void 0:f.all.find(h=>h.factor_type==="webauthn"&&h.friendly_name===t&&h.status!=="unverified")}).then(d=>d?this.client.mfa.unenroll({factorId:d==null?void 0:d.id}):void 0),{data:null,error:s};const{data:l,error:c}=await this._challenge({factorId:o.id,friendlyName:o.friendly_name,webauthn:{rpId:r,rpOrigins:n},signal:a},{create:i});return l?this._verify({factorId:o.id,challengeId:l.challengeId,webauthn:{rpId:r,rpOrigins:n,type:l.webauthn.type,credential_response:l.webauthn.credential_response}}):{data:null,error:c}}catch(o){return ne(o)?{data:null,error:o}:{data:null,error:new io("Unexpected error in register",o)}}}}I7();const t9={url:QW,storageKey:ZW,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:e7,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:5e3,skipAutoInitialize:!1};async function ok(e,t,r){return await r()}const us={};class Du{get jwks(){var t,r;return(r=(t=us[this.storageKey])===null||t===void 0?void 0:t.jwks)!==null&&r!==void 0?r:{keys:[]}}set jwks(t){us[this.storageKey]=Object.assign(Object.assign({},us[this.storageKey]),{jwks:t})}get jwks_cached_at(){var t,r;return(r=(t=us[this.storageKey])===null||t===void 0?void 0:t.cachedAt)!==null&&r!==void 0?r:Number.MIN_SAFE_INTEGER}set jwks_cached_at(t){us[this.storageKey]=Object.assign(Object.assign({},us[this.storageKey]),{cachedAt:t})}constructor(t){var r,n,a;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.autoRefreshTickTimeout=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.initializePromise=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log;const i=Object.assign(Object.assign({},t9),t);if(this.storageKey=i.storageKey,this.instanceID=(r=Du.nextInstanceID[this.storageKey])!==null&&r!==void 0?r:0,Du.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!i.debug,typeof i.debug=="function"&&(this.logger=i.debug),this.instanceID>0&&At()){const o=`${this._logPrefix()} Multiple GoTrueClient instances detected in the same browser context. It is not an error, but this should be avoided as it may produce undefined behavior when used concurrently under the same storage key.`;console.warn(o),this.logDebugMessages&&console.trace(o)}if(this.persistSession=i.persistSession,this.autoRefreshToken=i.autoRefreshToken,this.admin=new $7({url:i.url,headers:i.headers,fetch:i.fetch}),this.url=i.url,this.headers=i.headers,this.fetch=XA(i.fetch),this.lock=i.lock||ok,this.detectSessionInUrl=i.detectSessionInUrl,this.flowType=i.flowType,this.hasCustomAuthorizationHeader=i.hasCustomAuthorizationHeader,this.throwOnError=i.throwOnError,this.lockAcquireTimeout=i.lockAcquireTimeout,i.lock?this.lock=i.lock:this.persistSession&&At()&&(!((n=globalThis==null?void 0:globalThis.navigator)===null||n===void 0)&&n.locks)?this.lock=R7:this.lock=ok,this.jwks||(this.jwks={keys:[]},this.jwks_cached_at=Number.MIN_SAFE_INTEGER),this.mfa={verify:this._verify.bind(this),enroll:this._enroll.bind(this),unenroll:this._unenroll.bind(this),challenge:this._challenge.bind(this),listFactors:this._listFactors.bind(this),challengeAndVerify:this._challengeAndVerify.bind(this),getAuthenticatorAssuranceLevel:this._getAuthenticatorAssuranceLevel.bind(this),webauthn:new e9(this)}
465,this.oauth={getAuthorizationDetails:this._getAuthorizationDetails.bind(this),approveAuthorization:this._approveAuthorization.bind(this),denyAuthorization:this._denyAuthorization.bind(this),listGrants:this._listOAuthGrants.bind(this),revokeGrant:this._revokeOAuthGrant.bind(this)},this.persistSession?(i.storage?this.storage=i.storage:YA()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=nk(this.memoryStorage)),i.userStorage&&(this.userStorage=i.userStorage)):(this.memoryStorage={},this.storage=nk(this.memoryStorage)),At()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(o){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",o)}(a=this.broadcastChannel)===null||a===void 0||a.addEventListener("message",async o=>{this._debug("received broadcast notification from other tab or client",o);try{await this._notifyAllSubscribers(o.data.event,o.data.session,!1)}catch(s){this._debug("#broadcastChannel","error",s)}})}i.skipAutoInitialize||this.initialize().catch(o=>{this._debug("#initialize()","error",o)})}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(t){if(this.throwOnError&&t&&t.error)throw t.error;return t}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${VA}) ${new Date().toISOString()}`}_debug(...t){return this.logDebugMessages&&this.logger(this._logPrefix(),...t),this}async initialize(){return this.initializePromise?await this.initializePromise:(this.initializePromise=(async()=>await this._acquireLock(this.lockAcquireTimeout,async()=>await this._initialize()))(),await this.initializePromise)}async _initialize(){var t;try{let r={},n="none";if(At()&&(r=p7(window.location.href),this._isImplicitGrantCallback(r)?n="implicit":await this._isPKCECallback(r)&&(n="pkce")),At()&&this.detectSessionInUrl&&n!=="none"){const{data:a,error:i}=await this._getSessionFromURL(r,n);if(i){if(this._debug("#_initialize()","error detecting session from URL",i),i7(i)){const l=(t=i.details)===null||t===void 0?void 0:t.code;if(l==="identity_already_exists"||l==="identity_not_found"||l==="single_identity_not_deletable")return{error:i}}return{error:i}}const{session:o,redirectType:s}=a;return this._debug("#_initialize()","detected session in URL",o,"redirect type",s),await this._saveSession(o),setTimeout(async()=>{s==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",o):await this._notifyAllSubscribers("SIGNED_IN",o)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(r){return ne(r)?this._returnResult({error:r}):this._returnResult({error:new io("Unexpected error during initialization",r)})}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(t){var r,n,a;try{const i=await ie(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(n=(r=t==null?void 0:t.options)===null||r===void 0?void 0:r.data)!==null&&n!==void 0?n:{},gotrue_meta_security:{captcha_token:(a=t==null?void 0:t.options)===null||a===void 0?void 0:a.captchaToken}},xform:sn}),{data:o,error:s}=i;if(s||!o)return this._returnResult({data:{user:null,session:null},error:s});const l=o.session,c=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",l)),this._returnResult({data:{user:c,session:l},error:null})}catch(i){if(ne(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}}async signUp(t){var r,n,a;try{let i;if("email"in t){const{email:d,password:f,options:h}=t;let p=null,g=null;this.flowType==="pkce"&&([p,g]=await ls(this.storage,this.storageKey)),i=await ie(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:h==null?void 0:h.emailRedirectTo,body:{email:d,password:f,data:(r=h==null?void 0:h.data)!==null&&r!==void 0?r:{},gotrue_meta_security:{captcha_token:h==null?void 0:h.captchaToken},code_challenge:p,code_challenge_method:g},xform:sn})}else if("phone"in t){const{phone:d,password:f,options:h}=t;i=await ie(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:d,password:f,data:(n=h==null?void 0:h.data)!==null&&n!==void 0?n:{},channel:(a=h==null?void 0:h.channel)!==null&&a!==void 0?a:"sms",gotrue_meta_security:{captcha_token:h==null?void 0:h.captchaToken}},xform:sn})}else throw new Of("You must provide either an email or phone number and a password");const{data:o,error:s}=i;if(s||!o)return await Tt(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:s});const l=o.session,c=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",l)),this._returnResult({data:{user:c,session:l},error:null})}catch(i){if(await Tt(this.storage,`${this.storageKey}-code-verifier`),ne(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}}async signInWithPassword(t){try{let r;if("email"in t){const{email:i,password:o,options:s}=t;r=await ie(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:i,password:o,gotrue_meta_security:{captcha_token:s==null?void 0:s.captchaToken}},xform:tk})}else if("phone"in t){const{phone:i,password:o,options:s}=t;r=await ie(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:i,password:o,gotrue_meta_security:{captcha_token:s==null?void 0:s.captchaToken}},xform:tk})}else throw new Of("You must provide either an email or phone number and a password");const{data:n,error:a}=r;if(a)return this._returnResult({data:{user:null,session:null},error:a});if(!n||!n.session||!n.user){const i=new ss;return this._returnResult({data:{user:null,session:null},error:i})}return n.session&&(await this._saveSession(n.session),await this._notifyAllSubscribers("SIGNED_IN",n.session)),this._returnResult({data:Object.assign({user:n.user,session:n.session},n.weak_password?{weakPassword:n.weak_password}:null),error:a})}catch(r){if(ne(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async signInWithOAuth(t){var r,n,a,i;return await this._handleProviderSignIn(t.provider,{redirectTo:(r=t.options)===null||r===void 0?void 0:r.redirectTo,scopes:(n=t.options)===null||n===void 0?void 0:n.scopes,queryParams:(a=t.options)===null||a===void 0?void 0:a.queryParams,skipBrowserRedirect:(i=t.options)===null||i===void 0?void 0:i.skipBrowserRedirect})}async exchangeCodeForSession(t){return await this.initializePromise,this._acquireLock(this.lockAcquireTimeout,async()=>this._exchangeCodeForSession(t))}async signInWithWeb3(t){const{chain:r}=t;switch(r){case"ethereum":return await this.signInWithEthereum(t);case"solana":return await this.signInWithSolana(t);default:throw new Error(`@supabase/auth-js: Unsupported chain "${r}"`)}}async signInWithEthereum(t){var r,n,a,i,o,s,l,c,d,f,h;let p,g;if("message"in t)p=t.message,g=t.signature;else{const{chain:m,wallet:v,statement:x,options:b}=t;let y;if(At())if(typeof v=="object")y=v;else{const O=window;if("ethereum"in O&&typeof O.ethereum=="object"&&"request"in O.ethereum&&typeof O.ethereum.request=="function")y=O.ethereum;else throw new Error("@supabase/auth-js: No compatible Ethereum wallet interface on the window object (window.ethereum) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'ethereum', wallet: resolvedUserWallet }) instead.")}else{if(typeof v!="object"||!(b!=null&&b.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");y=v}const S=new URL((r=b==null?void 0:b.url)!==null&&r!==void 0?r:window.location.href),_=await y.request({method:"eth_requestAccounts"}).then(O=>O).catch(()=>{throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!_||_.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const j=QA(_[0]);let k=(n=b==null?void 0:b.signInWithEthereum)===null||n===void 0?void 0:n.chainId;if(!k){const O=await y.request({method:"eth_chainId"});k=D7(O)}const E={domain:S.host,address:j,statement:x,uri:S.href,version:"1",chainId:k,nonce:(a=b==null?void 0:b.signInWithEthereum)===null||a===void 0?void 0:a.nonce,issuedAt:(o=(i=b==null?void 0:b.signInWithEthereum)===null||i===void 0?void 0:i.issuedAt)!==null&&o!==void 0?o:new Date,expirationTime:(s=b==null?void 0:b.signInWithEthereum)===null||s===void 0?void 0:s.expirationTime,notBefore:(l=b==null?void 0:b.signInWithEthereum)===null||l===void 0?void 0:l.notBefore,requestId:(c=b==null?void 0:b.signInWithEthereum)===null||c===void 0?void 0:c.requestId,resources:(d=b==null?void 0:b.signInWithEthereum)===null||d===void 0?void 0:d.resources};p=B7(E),g=await y.request({method:"personal_sign",params:[L7(p),j]})}try{const{data:m,error:v}=await ie(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:p,signature:g},!((f=t.options)===null||f===void 0)&&f.captchaToken?{gotrue_meta_security:{captcha_token:(h=t.options)===null||h===void 0?void 0:h.captchaToken}}:null),xform:sn});if(v)throw v;if(!m||!m.session||!m.user){const x=new ss;return this._returnResult({data:{user:null,session:null},error:x})}return m.session&&(await this._saveSession(m.session),await this._notifyAllSubscribers("SIGNED_IN",m.session)),this._returnResult({data:Object.assign({},m),error:v})}catch(m){if(ne(m))return this._returnResult({data:{user:null,session:null},error:m});throw m}}async signInWithSolana(t){var r,n,a,i,o,s,l,c,d,f,h,p;let g,m;if("message"in t)g=t.message,m=t.signature;else{const{chain:v,wallet:x,statement:b,options:y}=t;let S;if(At())if(typeof x=="object")S=x;else{const j=window;if("solana"in j&&typeof j.solana=="object"&&("signIn"in j.solana&&typeof j.solana.signIn=="function"||"signMessage"in j.solana&&typeof j.solana.signMessage=="function"))S=j.solana;else throw new Error("@supabase/auth-js: No compatible Solana wallet interface on the window object (window.solana) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'solana', wallet: resolvedUserWallet }) instead.")}else{if(typeof x!="object"||!(y!=null&&y.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");S=x}const _=new URL((r=y==null?void 0:y.url)!==null&&r!==void 0?r:window.location.href);if("signIn"in S&&S.signIn){const j=await S.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},y==null?void 0:y.signInWithSolana),{version:"1",domain:_.host,uri:_.href}),b?{statement:b}:null));let k;if(Array.isArray(j)&&j[0]&&typeof j[0]=="object")k=j[0];else if(j&&typeof j=="object"&&"signedMessage"in j&&"signature"in j)k=j;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in k&&"signature"in k&&(typeof k.signedMessage=="string"||k.signedMessage instanceof Uint8Array)&&k.signature instanceof Uint8Array)g=typeof k.signedMessage=="string"?k.signedMessage:new TextDecoder().decode(k.signedMessage),m=k.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in S)||typeof S.signMessage!="function"||!("publicKey"in S)||typeof S!="object"||!S.publicKey||!("toBase58"in S.publicKey)||typeof S.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");g=[`${_.host} wants you to sign in with your Solana account:`,S.publicKey.toBase58(),...b?["",b,""]:[""],"Version: 1",`URI: ${_.href}`,`Issued At: ${(a=(n=y==null?void 0:y.signInWithSolana)===null||n===void 0?void 0:n.issuedAt)!==null&&a!==void 0?a:new Date().toISOString()}`,...!((i=y==null?void 0:y.signInWithSolana)===null||i===void 0)&&i.notBefore?[`Not Before: ${y.signInWithSolana.notBefore}`]:[],...!((o=y==null?void 0:y.signInWithSolana)===null||o===void 0)&&o.expirationTime?[`Expiration Time: ${y.signInWithSolana.expirationTime}`]:[],...!((s=y==null?void 0:y.signInWithSolana)===null||s===void 0)&&s.chainId?[`Chain ID: ${y.signInWithSolana.chainId}`]:[],...!((l=y==null?void 0:y.signInWithSolana)===null||l===void 0)&&l.nonce?[`Nonce: ${y.signInWithSolana.nonce}`]:[],...!((c=y==null?void 0:y.signInWithSolana)===null||c===void 0)&&c.requestId?[`Request ID: ${y.signInWithSolana.requestId}`]:[],...!((f=(d=y==null?void 0:y.signInWithSolana)===null||d===void 0?void 0:d.resources)===null||f===void 0)&&f.length?["Resources",...y.signInWithSolana.resources.map(k=>`- ${k}`)]:[]].join(`
466`);const j=await S.signMessage(new TextEncoder().encode(g),"utf8");if(!j||!(j instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");m=j}}try{const{data:v,error:x}=await ie(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:g,signature:co(m)}
466,!((h=t.options)===null||h===void 0)&&h.captchaToken?{gotrue_meta_security:{captcha_token:(p=t.options)===null||p===void 0?void 0:p.captchaToken}}:null),xform:sn});if(x)throw x;if(!v||!v.session||!v.user){const b=new ss;return this._returnResult({data:{user:null,session:null},error:b})}return v.session&&(await this._saveSession(v.session),await this._notifyAllSubscribers("SIGNED_IN",v.session)),this._returnResult({data:Object.assign({},v),error:x})}catch(v){if(ne(v))return this._returnResult({data:{user:null,session:null},error:v});throw v}}async _exchangeCodeForSession(t){const r=await Xi(this.storage,`${this.storageKey}-code-verifier`),[n,a]=(r??"").split("/");try{if(!n&&this.flowType==="pkce")throw new o7;const{data:i,error:o}=await ie(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:t,code_verifier:n},xform:sn});if(await Tt(this.storage,`${this.storageKey}-code-verifier`),o)throw o;if(!i||!i.session||!i.user){const s=new ss;return this._returnResult({data:{user:null,session:null,redirectType:null},error:s})}return i.session&&(await this._saveSession(i.session),await this._notifyAllSubscribers(a==="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",i.session)),this._returnResult({data:Object.assign(Object.assign({},i),{redirectType:a??null}),error:o})}catch(i){if(await Tt(this.storage,`${this.storageKey}-code-verifier`),ne(i))return this._returnResult({data:{user:null,session:null,redirectType:null},error:i});throw i}}async signInWithIdToken(t){try{const{options:r,provider:n,token:a,access_token:i,nonce:o}=t,s=await ie(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:n,id_token:a,access_token:i,nonce:o,gotrue_meta_security:{captcha_token:r==null?void 0:r.captchaToken}},xform:sn}),{data:l,error:c}=s;if(c)return this._returnResult({data:{user:null,session:null},error:c});if(!l||!l.session||!l.user){const d=new ss;return this._returnResult({data:{user:null,session:null},error:d})}return l.session&&(await this._saveSession(l.session),await this._notifyAllSubscribers("SIGNED_IN",l.session)),this._returnResult({data:l,error:c})}catch(r){if(ne(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async signInWithOtp(t){var r,n,a,i,o;try{if("email"in t){const{email:s,options:l}=t;let c=null,d=null;this.flowType==="pkce"&&([c,d]=await ls(this.storage,this.storageKey));const{error:f}=await ie(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:s,data:(r=l==null?void 0:l.data)!==null&&r!==void 0?r:{},create_user:(n=l==null?void 0:l.shouldCreateUser)!==null&&n!==void 0?n:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},code_challenge:c,code_challenge_method:d},redirectTo:l==null?void 0:l.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:f})}if("phone"in t){const{phone:s,options:l}=t,{data:c,error:d}=await ie(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:s,data:(a=l==null?void 0:l.data)!==null&&a!==void 0?a:{},create_user:(i=l==null?void 0:l.shouldCreateUser)!==null&&i!==void 0?i:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},channel:(o=l==null?void 0:l.channel)!==null&&o!==void 0?o:"sms"}});return this._returnResult({data:{user:null,session:null,messageId:c==null?void 0:c.message_id},error:d})}throw new Of("You must provide either an email or phone number.")}catch(s){if(await Tt(this.storage,`${this.storageKey}-code-verifier`),ne(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}}async verifyOtp(t){var r,n;try{let a,i;"options"in t&&(a=(r=t.options)===null||r===void 0?void 0:r.redirectTo,i=(n=t.options)===null||n===void 0?void 0:n.captchaToken);const{data:o,error:s}=await ie(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},t),{gotrue_meta_security:{captcha_token:i}}),redirectTo:a,xform:sn});if(s)throw s;if(!o)throw new Error("An error occurred on token verification.");const l=o.session,c=o.user;return l!=null&&l.access_token&&(await this._saveSession(l),await this._notifyAllSubscribers(t.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",l)),this._returnResult({data:{user:c,session:l},error:null})}catch(a){if(ne(a))return this._returnResult({data:{user:null,session:null},error:a});throw a}}async signInWithSSO(t){var r,n,a,i,o;try{let s=null,l=null;this.flowType==="pkce"&&([s,l]=await ls(this.storage,this.storageKey));const c=await ie(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in t?{provider_id:t.providerId}:null),"domain"in t?{domain:t.domain}:null),{redirect_to:(n=(r=t.options)===null||r===void 0?void 0:r.redirectTo)!==null&&n!==void 0?n:void 0}),!((a=t==null?void 0:t.options)===null||a===void 0)&&a.captchaToken?{gotrue_meta_security:{captcha_token:t.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:s,code_challenge_method:l}),headers:this.headers,xform:T7});return!((i=c.data)===null||i===void 0)&&i.url&&At()&&!(!((o=t.options)===null||o===void 0)&&o.skipBrowserRedirect)&&window.location.assign(c.data.url),this._returnResult(c)}catch(s){if(await Tt(this.storage,`${this.storageKey}-code-verifier`),ne(s))return this._returnResult({data:null,error:s});throw s}}async reauthenticate(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._reauthenticate())}async _reauthenticate(){try{return await this._useSession(async t=>{const{data:{session:r},error:n}=t;if(n)throw n;if(!r)throw new yr;const{error:a}=await ie(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:r.access_token});return this._returnResult({data:{user:null,session:null},error:a})})}catch(t){if(ne(t))return this._returnResult({data:{user:null,session:null},error:t});throw t}}async resend(t){try{const r=`${this.url}/resend`;if("email"in t){const{email:n,type:a,options:i}=t,{error:o}=await ie(this.fetch,"POST",r,{headers:this.headers,body:{email:n,type:a,gotrue_meta_security:{captcha_token:i==null?void 0:i.captchaToken}},redirectTo:i==null?void 0:i.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:o})}else if("phone"in t){const{phone:n,type:a,options:i}=t,{data:o,error:s}=await ie(this.fetch,"POST",r,{headers:this.headers,body:{phone:n,type:a,gotrue_meta_security:{captcha_token:i==null?void 0:i.captchaToken}}});return this._returnResult({data:{user:null,session:null,messageId:o==null?void 0:o.message_id},error:s})}throw new Of("You must provide either an email or phone number and a type")}catch(r){if(ne(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async getSession(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>this._useSession(async r=>r))}async _acquireLock(t,r){this._debug("#_acquireLock","begin",t);try{if(this.lockAcquired){const n=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),a=(async()=>(await n,await r()))();return this.pendingInLock.push((async()=>{try{await a}catch{}})()),a}return await this.lock(`lock:${this.storageKey}`,t,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const n=r();for(this.pendingInLock.push((async()=>{try{await n}catch{}})()),await n;this.pendingInLock.length;){const a=[...this.pendingInLock];await Promise.all(a),this.pendingInLock.splice(0,a.length)}return await n}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(t){this._debug("#_useSession","begin");try{const r=await this.__loadSession();return await t(r)}finally{this._debug("#_useSession","end")}}async __loadSession(){this._debug("#__loadSession()","begin"),this.lockAcquired||this._debug("#__loadSession()","used outside of an acquired lock!",new Error().stack);try{let t=null;const r=await Xi(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",r),r!==null&&(this._isValidSession(r)?t=r:(this._debug("#getSession()","session from storage is not val
466id"),await this._removeSession())),!t)return{data:{session:null},error:null};const n=t.expires_at?t.expires_at*1e3-Date.now()<Nv:!1;if(this._debug("#__loadSession()",`session has${n?"":" not"} expired`,"expires_at",t.expires_at),!n){if(this.userStorage){const o=await Xi(this.userStorage,this.storageKey+"-user");o!=null&&o.user?t.user=o.user:t.user=Cv()}if(this.storage.isServer&&t.user&&!t.user.__isUserNotAvailableProxy){const o={value:this.suppressGetSessionWarning};t.user=O7(t.user,o),o.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:t},error:null}}const{data:a,error:i}=await this._callRefreshToken(t.refresh_token);return i?this._returnResult({data:{session:null},error:i}):this._returnResult({data:{session:a},error:null})}finally{this._debug("#__loadSession()","end")}}async getUser(t){if(t)return await this._getUser(t);await this.initializePromise;const r=await this._acquireLock(this.lockAcquireTimeout,async()=>await this._getUser());return r.data.user&&(this.suppressGetSessionWarning=!0),r}async _getUser(t){try{return t?await ie(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:t,xform:si}):await this._useSession(async r=>{var n,a,i;const{data:o,error:s}=r;if(s)throw s;return!(!((n=o.session)===null||n===void 0)&&n.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new yr}:await ie(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(i=(a=o.session)===null||a===void 0?void 0:a.access_token)!==null&&i!==void 0?i:void 0,xform:si})})}catch(r){if(ne(r))return Ef(r)&&(await this._removeSession(),await Tt(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({data:{user:null},error:r});throw r}}async updateUser(t,r={}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._updateUser(t,r))}async _updateUser(t,r={}){try{return await this._useSession(async n=>{const{data:a,error:i}=n;if(i)throw i;if(!a.session)throw new yr;const o=a.session;let s=null,l=null;this.flowType==="pkce"&&t.email!=null&&([s,l]=await ls(this.storage,this.storageKey));const{data:c,error:d}=await ie(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:r==null?void 0:r.emailRedirectTo,body:Object.assign(Object.assign({},t),{code_challenge:s,code_challenge_method:l}),jwt:o.access_token,xform:si});if(d)throw d;return o.user=c.user,await this._saveSession(o),await this._notifyAllSubscribers("USER_UPDATED",o),this._returnResult({data:{user:o.user},error:null})})}catch(n){if(await Tt(this.storage,`${this.storageKey}-code-verifier`),ne(n))return this._returnResult({data:{user:null},error:n});throw n}}async setSession(t){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._setSession(t))}async _setSession(t){try{if(!t.access_token||!t.refresh_token)throw new yr;const r=Date.now()/1e3;let n=r,a=!0,i=null;const{payload:o}=Pf(t.access_token);if(o.exp&&(n=o.exp,a=n<=r),a){const{data:s,error:l}=await this._callRefreshToken(t.refresh_token);if(l)return this._returnResult({data:{user:null,session:null},error:l});if(!s)return{data:{user:null,session:null},error:null};i=s}else{const{data:s,error:l}=await this._getUser(t.access_token);if(l)return this._returnResult({data:{user:null,session:null},error:l});i={access_token:t.access_token,refresh_token:t.refresh_token,user:s.user,token_type:"bearer",expires_in:n-r,expires_at:n},await this._saveSession(i),await this._notifyAllSubscribers("SIGNED_IN",i)}return this._returnResult({data:{user:i.user,session:i},error:null})}catch(r){if(ne(r))return this._returnResult({data:{session:null,user:null},error:r});throw r}}async refreshSession(t){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._refreshSession(t))}async _refreshSession(t){try{return await this._useSession(async r=>{var n;if(!t){const{data:o,error:s}=r;if(s)throw s;t=(n=o.session)!==null&&n!==void 0?n:void 0}if(!(t!=null&&t.refresh_token))throw new yr;const{data:a,error:i}=await this._callRefreshToken(t.refresh_token);return i?this._returnResult({data:{user:null,session:null},error:i}):a?this._returnResult({data:{user:a.user,session:a},error:null}):this._returnResult({data:{user:null,session:null},error:null})})}catch(r){if(ne(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async _getSessionFromURL(t,r){var n;try{if(!At())throw new Nf("No browser detected.");
466if(t.error||t.error_description||t.error_code)throw new Nf(t.error_description||"Error in URL with unspecified error_description",{error:t.error||"unspecified_error",code:t.error_code||"unspecified_code"});switch(r){case"implicit":if(this.flowType==="pkce")throw new Gj("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new Nf("Not a valid implicit grant flow url.");break;default:}if(r==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!t.code)throw new Gj("No code detected.");const{data:y,error:S}=await this._exchangeCodeForSession(t.code);if(S)throw S;const _=new URL(window.location.href);return _.searchParams.delete("code"),window.history.replaceState(window.history.state,"",_.toString()),{data:{session:y.session,redirectType:(n=y.redirectType)!==null&&n!==void 0?n:null},error:null}}const{provider_token:a,provider_refresh_token:i,access_token:o,refresh_token:s,expires_in:l,expires_at:c,token_type:d}=t;if(!o||!l||!s||!d)throw new Nf("No session defined in URL");const f=Math.round(Date.now()/1e3),h=parseInt(l);let p=f+h;c&&(p=parseInt(c));const g=p-f;g*1e3<=ws&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${g}s, should have been closer to ${h}s`);const m=p-h;f-m>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",m,p,f):f-m<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",m,p,f);const{data:v,error:x}=await this._getUser(o);if(x)throw x;const b={provider_token:a,provider_refresh_token:i,access_token:o,expires_in:h,expires_at:p,refresh_token:s,token_type:d,user:v.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:b,redirectType:t.type},error:null})}catch(a){if(ne(a))return this._returnResult({data:{session:null,redirectType:null},error:a});throw a}}_isImplicitGrantCallback(t){return typeof this.detectSessionInUrl=="function"?this.detectSessionInUrl(new URL(window.location.href),t):!!(t.access_token||t.error_description)}async _isPKCECallback(t){const r=await Xi(this.storage,`${this.storageKey}-code-verifier`);return!!(t.code&&r)}async signOut(t={scope:"global"}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._signOut(t))}async _signOut({scope:t}={scope:"global"}){return await this._useSession(async r=>{var n;const{data:a,error:i}=r;if(i&&!Ef(i))return this._returnResult({error:i});const o=(n=a.session)===null||n===void 0?void 0:n.access_token;if(o){const{error:s}=await this.admin.signOut(o,t);if(s&&!(a7(s)&&(s.status===404||s.status===401||s.status===403)||Ef(s)))return this._returnResult({error:s})}return t!=="others"&&(await this._removeSession(),await Tt(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({error:null})})}onAuthStateChange(t){const r=h7(),n={id:r,callback:t,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",r),this.stateChangeEmitters.delete(r)}};return this._debug("#onAuthStateChange()","registered callback with id",r),this.stateChangeEmitters.set(r,n),(async()=>(await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{this._emitInitialSession(r)})))(),{data:{subscription:n}}}async _emitInitialSession(t){return await this._useSession(async r=>{var n,a;try{const{data:{session:i},error:o}=r;if(o)throw o;await((n=this.stateChangeEmitters.get(t))===null||n===void 0?void 0:n.callback("INITIAL_SESSION",i)),this._debug("INITIAL_SESSION","callback id",t,"session",i)}catch(i){await((a=this.stateChangeEmitters.get(t))===null||a===void 0?void 0:a.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",t,"error",i),Ef(i)?console.warn(i):console.error(i)}})}async resetPasswordForEmail(t,r={}){let n=null,a=null;this.flowType==="pkce"&&([n,a]=await ls(this.storage,this.storageKey,!0));try{return await ie(this.fetch,"POST",`${this.url}/recover`,{body:{email:t,code_challenge:n,code_challenge_method:a,gotrue_meta_security:{captcha_token:r.captchaToken}},headers:this.headers,redirectTo:r.redirectTo})}catch(i){if(await Tt(this.storage,`${this.storageKey}-code-verifier`),ne(i))return this._returnResult({data:null,error:i});throw i}}async getUserIdentities(){var t;try{const{data:r,error:n}=await this.getUser();if(n)throw n;return this._returnResult({data:{identities:(t=r.user.identities)!==null&&t!==void 0?t:[]},error:null})}catch(r){if(ne(r))return this._returnResult({data:null,error:r});throw r}}async linkIdentity(t){return"token"in t?this.linkIdentityIdToken(t):this.linkIdentityOAuth(t)}async linkIdentityOAuth(t){var r;try{const{data:n,error:a}=await this._useSession(async i=>{var o,s,l,c,d;const{data:f,error:h}=i;if(h)throw h;const p=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,t.provider,{redirectTo:(o=t.options)===null||o===void 0?void 0:o.redirectTo,scopes:(s=t.options)===null||s===void 0?void 0:s.scopes,queryParams:(l=t.options)===null||l===void 0?void 0:l.queryParams,skipBrowserRedirect:!0});return await ie(this.fetch,"GET",p,{headers:this.headers,jwt:(d=(c=f.session)===null||c===void 0?void 0:c.access_token)!==null&&d!==void 0?d:void 0})});if(a)throw a;return At()&&!(!((r=t.options)===null||r===void 0)&&r.skipBrowserRedirect)&&window.location.assign(n==null?void 0:n.url),this._returnResult({data:{provider:t.provider,url:n==null?void 0:n.url},error:null})}catch(n){if(ne(n))return this._returnResult({data:{provider:t.provider,url:null},error:n});throw n}}async linkIdentityIdToken(t){return await this._useSession(async r=>{var n;try{const{error:a,data:{session:i}}=r;if(a)throw a;const{options:o,provider:s,token:l,access_token:c,nonce:d}=t,f=await ie(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,jwt:(n=i==null?void 0:i.access_token)!==null&&n!==void 0?n:void 0,body:{provider:s,id_token:l,access_token:c,nonce:d,link_identity:!0,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}},xform:sn}),{data:h,error:p}=f;return p?this._returnResult({data:{user:null,session:null},error:p}):!h||!h.session||!h.user?this._returnResult({data:{user:null,session:null},error:new ss}):(h.session&&(await this._saveSession(h.session),await this._notifyAllSubscribers("USER_UPDATED",h.session)),this._returnResult({data:h,error:p}))}catch(a){if(await Tt(this.storage,`${this.storageKey}-code-verifier`),ne(a))return this._returnResult({data:{user:null,session:null},error:a});throw a}})}async unlinkIdentity(t){try{return await this._useSession(async r=>{var n,a;const{data:i,error:o}=r;if(o)throw o;
466return await ie(this.fetch,"DELETE",`${this.url}/user/identities/${t.identity_id}`,{headers:this.headers,jwt:(a=(n=i.session)===null||n===void 0?void 0:n.access_token)!==null&&a!==void 0?a:void 0})})}catch(r){if(ne(r))return this._returnResult({data:null,error:r});throw r}}async _refreshAccessToken(t){const r=`#_refreshAccessToken(${t.substring(0,5)}...)`;this._debug(r,"begin");try{const n=Date.now();return await v7(async a=>(a>0&&await g7(200*Math.pow(2,a-1)),this._debug(r,"refreshing attempt",a),await ie(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:t},headers:this.headers,xform:sn})),(a,i)=>{const o=200*Math.pow(2,a);return i&&Pv(i)&&Date.now()+o-n<ws})}catch(n){if(this._debug(r,"error",n),ne(n))return this._returnResult({data:{session:null,user:null},error:n});throw n}finally{this._debug(r,"end")}}_isValidSession(t){return typeof t=="object"&&t!==null&&"access_token"in t&&"refresh_token"in t&&"expires_at"in t}async _handleProviderSignIn(t,r){const n=await this._getUrlForProvider(`${this.url}/authorize`,t,{redirectTo:r.redirectTo,scopes:r.scopes,queryParams:r.queryParams});return this._debug("#_handleProviderSignIn()","provider",t,"options",r,"url",n),At()&&!r.skipBrowserRedirect&&window.location.assign(n),{data:{provider:t,url:n},error:null}}async _recoverAndRefresh(){var t,r;const n="#_recoverAndRefresh()";this._debug(n,"begin");try{const a=await Xi(this.storage,this.storageKey);if(a&&this.userStorage){let o=await Xi(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!o&&(o={user:a.user},await _s(this.userStorage,this.storageKey+"-user",o)),a.user=(t=o==null?void 0:o.user)!==null&&t!==void 0?t:Cv()}else if(a&&!a.user&&!a.user){const o=await Xi(this.storage,this.storageKey+"-user");o&&(o!=null&&o.user)?(a.user=o.user,await Tt(this.storage,this.storageKey+"-user"),await _s(this.storage,this.storageKey,a)):a.user=Cv()}if(this._debug(n,"session from storage",a),!this._isValidSession(a)){this._debug(n,"session is not valid"),a!==null&&await this._removeSession();return}const i=((r=a.expires_at)!==null&&r!==void 0?r:1/0)*1e3-Date.now()<Nv;if(this._debug(n,`session has${i?"":" not"} expired with margin of ${Nv}s`),i){if(this.autoRefreshToken&&a.refresh_token){const{error:o}=await this._callRefreshToken(a.refresh_token);o&&(console.error(o),Pv(o)||(this._debug(n,"refresh failed with a non-retryable error, removing the session",o),await this._removeSession()))}}else if(a.user&&a.user.__isUserNotAvailableProxy===!0)try{const{data:o,error:s}=await this._getUser(a.access_token);!s&&(o!=null&&o.user)?(a.user=o.user,await this._saveSession(a),await this._notifyAllSubscribers("SIGNED_IN",a)):this._debug(n,"could not get user data, skipping SIGNED_IN notification")}catch(o){console.error("Error getting user data:",o),this._debug(n,"error getting user data, skipping SIGNED_IN notification",o)}else await this._notifyAllSubscribers("SIGNED_IN",a)}catch(a){this._debug(n,"error",a),console.error(a);return}finally{this._debug(n,"end")}}async _callRefreshToken(t){var r,n;if(!t)throw new yr;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const a=`#_callRefreshToken(${t.substring(0,5)}...)`;this._debug(a,"begin");try{this.refreshingDeferred=new zm;const{data:i,error:o}=await this._refreshAccessToken(t);if(o)throw o;if(!i.session)throw new yr;await this._saveSession(i.session),await this._notifyAllSubscribers("TOKEN_REFRESHED",i.session);const s={data:i.session,error:null};return this.refreshingDeferred.resolve(s),s}catch(i){if(this._debug(a,"error",i),ne(i)){const o={data:null,error:i};return Pv(i)||await this._removeSession(),(r=this.refreshingDeferred)===null||r===void 0||r.resolve(o),o}throw(n=this.refreshingDeferred)===null||n===void 0||n.reject(i),i}finally{this.refreshingDeferred=null,this._debug(a,"end")}}async _notifyAllSubscribers(t,r,n=!0){const a=`#_notifyAllSubscribers(${t})`;this._debug(a,"begin",r,`broadcast = ${n}`);try{this.broadcastChannel&&n&&this.broadcastChannel.postMessage({event:t,session:r});const i=[],o=Array.from(this.stateChangeEmitters.values()).map(async s=>{try{await s.callback(t,r)}catch(l){i.push(l)}});if(await Promise.all(o),i.length>0){for(let s=0;s<i.length;s+=1)console.error(i[s]);throw i[0]}}finally{this._debug(a,"end")}}async _saveSession(t){this._debug("#_saveSession()",t),this.suppressGetSessionWarning=!0,await Tt(this.storage,`${this.storageKey}-code-verifier`);const r=Object.assign({},t),n=r.user&&r.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!n&&r.user&&await _s(this.userStorage,this.storageKey+"-user",{user:r.user});const a=Object.assign({},r);delete a.user;const i=Zj(a);await _s(this.storage,this.storageKey,i)}else{const a=Zj(r);await _s(this.storage,this.storageKey,a)}}async _removeSession(){this._debug("#_removeSession()"),this.suppressGetSessionWarning=!1,await Tt(this.storage,this.storageKey),await Tt(this.storage,this.storageKey+"-code-verifier"),await Tt(this.storage,this.storageKey+"-user"),this.userStorage&&await Tt(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const t=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{t&&At()&&(window!=null&&window.removeEventListener)&&window.removeEventListener("visibilitychange",t)}
466catch(r){console.error("removing visibilitychange callback failed",r)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const t=setInterval(()=>this._autoRefreshTokenTick(),ws);this.autoRefreshTicker=t,t&&typeof t=="object"&&typeof t.unref=="function"?t.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(t);const r=setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0);this.autoRefreshTickTimeout=r,r&&typeof r=="object"&&typeof r.unref=="function"?r.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(r)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const t=this.autoRefreshTicker;this.autoRefreshTicker=null,t&&clearInterval(t);const r=this.autoRefreshTickTimeout;this.autoRefreshTickTimeout=null,r&&clearTimeout(r)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async _autoRefreshTokenTick(){this._debug("#_autoRefreshTokenTick()","begin");try{await this._acquireLock(0,async()=>{try{const t=Date.now();try{return await this._useSession(async r=>{const{data:{session:n}}=r;if(!n||!n.refresh_token||!n.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const a=Math.floor((n.expires_at*1e3-t)/ws);this._debug("#_autoRefreshTokenTick()",`access token expires in ${a} ticks, a tick lasts ${ws}ms, refresh threshold is ${z0} ticks`),a<=z0&&await this._callRefreshToken(n.refresh_token)})}catch(r){console.error("Auto refresh tick failed with error. This is likely a transient error.",r)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(t){if(t.isAcquireTimeout||t instanceof JA)this._debug("auto refresh token tick lock not available");else throw t}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!At()||!(window!=null&&window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>{try{await this._onVisibilityChanged(!1)}catch(t){this._debug("#visibilityChangedCallback","error",t)}},window==null||window.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(t){console.error("_handleVisibilityChange",t)}}async _onVisibilityChanged(t){const r=`#_onVisibilityChanged(${t})`;this._debug(r,"visibilityState",document.visibilityState),document.visibilityState==="visible"?(this.autoRefreshToken&&this._startAutoRefresh(),t||(await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{if(document.visibilityState!=="visible"){this._debug(r,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}await this._recoverAndRefresh()}))):document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(t,r,n){const a=[`provider=${encodeURIComponent(r)}`];if(n!=null&&n.redirectTo&&a.push(`redirect_to=${encodeURIComponent(n.redirectTo)}`),n!=null&&n.scopes&&a.push(`scopes=${encodeURIComponent(n.scopes)}`),this.flowType==="pkce"){const[i,o]=await ls(this.storage,this.storageKey),s=new URLSearchParams({code_challenge:`${encodeURIComponent(i)}`,code_challenge_method:`${encodeURIComponent(o)}`});a.push(s.toString())}if(n!=null&&n.queryParams){const i=new URLSearchParams(n.queryParams);a.push(i.toString())}return n!=null&&n.skipBrowserRedirect&&a.push(`skip_http_redirect=${n.skipBrowserRedirect}`),`${t}?${a.join("&")}`}async _unenroll(t){try{return await this._useSession(async r=>{var n;const{data:a,error:i}=r;return i?this._returnResult({data:null,error:i}):await ie(this.fetch,"DELETE",`${this.url}/factors/${t.factorId}`,{headers:this.headers,jwt:(n=a==null?void 0:a.session)===null||n===void 0?void 0:n.access_token})})}catch(r){if(ne(r))return this._returnResult({data:null,error:r});throw r}}async _enroll(t){try{return await this._useSession(async r=>{var n,a;const{data:i,error:o}=r;if(o)return this._returnResult({data:null,error:o});const s=Object.assign({friendly_name:t.friendlyName,factor_type:t.factorType},t.factorType==="phone"?{phone:t.phone}:t.factorType==="totp"?{issuer:t.issuer}:{}),{data:l,error:c}=await ie(this.fetch,"POST",`${this.url}/factors`,{body:s,headers:this.headers,jwt:(n=i==null?void 0:i.session)===null||n===void 0?void 0:n.access_token});return c?this._returnResult({data:null,error:c}):(t.factorType==="totp"&&l.type==="totp"&&(!((a=l==null?void 0:l.totp)===null||a===void 0)&&a.qr_code)&&(l.totp.qr_code=`data:image/svg+xml;utf-8,${l.totp.qr_code}`),this._returnResult({data:l,error:null}))})}catch(r){if(ne(r))return this._returnResult({data:null,error:r});throw r}}async _verify(t){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async r=>{var n;const{data:a,error:i}=r;if(i)return this._returnResult({data:null,error:i});const o=Object.assign({challenge_id:t.challengeId},"webauthn"in t?{webauthn:Object.assign(Object.assign({},t.webauthn),{credential_response:t.webauthn.type==="create"?V7(t.webauthn.credential_response):K7(t.webauthn.credential_response)})}:{code:t.code}),{data:s,error:l}=await ie(this.fetch,"POST",`${this.url}/factors/${t.factorId}/verify`,{body:o,headers:this.headers,jwt:(n=a==null?void 0:a.session)===null||n===void 0?void 0:n.access_token});return l?this._returnResult({data:null,error:l}):(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+s.expires_in},s)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",s),this._returnResult({data:s,error:l}))})}catch(r){if(ne(r))return this._returnResult({data:null,error:r});throw r}})}async _challenge(t){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async r=>{var n;const{data:a,error:i}=r;if(i)return this._returnResult({data:null,error:i});const o=await ie(this.fetch,"POST",`${this.url}/factors/${t.factorId}/challenge`,{body:t,headers:this.headers,jwt:(n=a==null?void 0:a.session)===null||n===void 0?void 0:n.access_token});if(o.error)return o;const{data:s}=o;if(s.type!=="webauthn")return{data:s,error:null};switch(s.webauthn.type){case"create":return{data:Object.assign(Object.assign({},s),{webauthn:Object.assign(Object.assign({},s.webauthn),{credential_options:Object.assign(Object.assign({},s.webauthn.credential_options),{publicKey:H7(s.webauthn.credential_options.publicKey)})})}),error:null};case"request":return{data:Object.assign(Object.assign({},s),{webauthn:Object.assign(Object.assign({},s.webauthn),{credential_options:Object.assign(Object.assign({},s.webauthn.credential_options),{publicKey:q7(s.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(r){if(ne(r))return this._returnResult({data:null,error:r});throw r}})}async _challengeAndVerify(t){const{data:r,error:n}=await this._challenge({factorId:t.factorId});return n?this._returnResult({data:null,error:n}):await this._verify({factorId:t.factorId,challengeId:r.id,code:t.code})}async _listFactors(){var t;const{data:{user:r},error:n}=await this.getUser();if(n)return{data:null,error:n};const a={all:[],phone:[],totp:[],webauthn:[]};for(const i of(t=r==null?void 0:r.factors)!==null&&t!==void 0?t:[])a.all.push(i),i.status==="verified"&&a[i.factor_type].push(i);return{data:a,error:null}}async _getAuthenticatorAssuranceLevel(t){var r,n,a,i;if(t)try{const{payload:p}=Pf(t);let g=null;p.aal&&(g=p.aal);let m=g;const{data:{user:v},error:x}=await this.getUser(t);if(x)return this._returnResult({data:null,error:x});((n=(r=v==null?void 0:v.factors)===null||r===void 0?void 0:r.filter(S=>S.status==="verified"))!==null&&n!==void 0?n:[]).length>0&&(m="aal2");const y=p.amr||[];return{data:{currentLevel:g,nextLevel:m,currentAuthenticationMethods:y},error:null}}catch(p){if(ne(p))return this._returnResult({data:null,error:p});throw p}const{data:{session:o},error:s}
466=await this.getSession();if(s)return this._returnResult({data:null,error:s});if(!o)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:l}=Pf(o.access_token);let c=null;l.aal&&(c=l.aal);let d=c;((i=(a=o.user.factors)===null||a===void 0?void 0:a.filter(p=>p.status==="verified"))!==null&&i!==void 0?i:[]).length>0&&(d="aal2");const h=l.amr||[];return{data:{currentLevel:c,nextLevel:d,currentAuthenticationMethods:h},error:null}}async _getAuthorizationDetails(t){try{return await this._useSession(async r=>{const{data:{session:n},error:a}=r;return a?this._returnResult({data:null,error:a}):n?await ie(this.fetch,"GET",`${this.url}/oauth/authorizations/${t}`,{headers:this.headers,jwt:n.access_token,xform:i=>({data:i,error:null})}):this._returnResult({data:null,error:new yr})})}catch(r){if(ne(r))return this._returnResult({data:null,error:r});throw r}}async _approveAuthorization(t,r){try{return await this._useSession(async n=>{const{data:{session:a},error:i}=n;if(i)return this._returnResult({data:null,error:i});if(!a)return this._returnResult({data:null,error:new yr});const o=await ie(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:a.access_token,body:{action:"approve"},xform:s=>({data:s,error:null})});return o.data&&o.data.redirect_url&&At()&&!(r!=null&&r.skipBrowserRedirect)&&window.location.assign(o.data.redirect_url),o})}catch(n){if(ne(n))return this._returnResult({data:null,error:n});throw n}}async _denyAuthorization(t,r){try{return await this._useSession(async n=>{const{data:{session:a},error:i}=n;if(i)return this._returnResult({data:null,error:i});if(!a)return this._returnResult({data:null,error:new yr});const o=await ie(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:a.access_token,body:{action:"deny"},xform:s=>({data:s,error:null})});return o.data&&o.data.redirect_url&&At()&&!(r!=null&&r.skipBrowserRedirect)&&window.location.assign(o.data.redirect_url),o})}catch(n){if(ne(n))return this._returnResult({data:null,error:n});throw n}}async _listOAuthGrants(){try{return await this._useSession(async t=>{const{data:{session:r},error:n}=t;return n?this._returnResult({data:null,error:n}):r?await ie(this.fetch,"GET",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:r.access_token,xform:a=>({data:a,error:null})}):this._returnResult({data:null,error:new yr})})}catch(t){if(ne(t))return this._returnResult({data:null,error:t});throw t}}async _revokeOAuthGrant(t){try{return await this._useSession(async r=>{const{data:{session:n},error:a}=r;return a?this._returnResult({data:null,error:a}):n?(await ie(this.fetch,"DELETE",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:n.access_token,query:{client_id:t.clientId},noResolveJson:!0}),{data:{},error:null}):this._returnResult({data:null,error:new yr})})}catch(r){if(ne(r))return this._returnResult({data:null,error:r});throw r}}async fetchJwk(t,r={keys:[]}){let n=r.keys.find(s=>s.kid===t);if(n)return n;const a=Date.now();if(n=this.jwks.keys.find(s=>s.kid===t),n&&this.jwks_cached_at+r7>a)return n;const{data:i,error:o}=await ie(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(o)throw o;return!i.keys||i.keys.length===0||(this.jwks=i,this.jwks_cached_at=a,n=i.keys.find(s=>s.kid===t),!n)?null:n}async getClaims(t,r={}){try{let n=t;if(!n){const{data:p,error:g}
466=await this.getSession();if(g||!p.session)return this._returnResult({data:null,error:g});n=p.session.access_token}const{header:a,payload:i,signature:o,raw:{header:s,payload:l}}=Pf(n);r!=null&&r.allowExpired||j7(i.exp);const c=!a.alg||a.alg.startsWith("HS")||!a.kid||!("crypto"in globalThis&&"subtle"in globalThis.crypto)?null:await this.fetchJwk(a.kid,r!=null&&r.keys?{keys:r.keys}:r==null?void 0:r.jwks);if(!c){const{error:p}=await this.getUser(n);if(p)throw p;return{data:{claims:i,header:a,signature:o},error:null}}const d=k7(a.alg),f=await crypto.subtle.importKey("jwk",c,d,!0,["verify"]);if(!await crypto.subtle.verify(d,f,o,d7(`${s}.${l}`)))throw new q0("Invalid JWT signature");return{data:{claims:i,header:a,signature:o},error:null}}catch(n){if(ne(n))return this._returnResult({data:null,error:n});throw n}}}Du.nextInstanceID={};const r9=Du,n9="2.104.1";let Uc="";typeof Deno<"u"?Uc="deno":typeof document<"u"?Uc="web":typeof navigator<"u"&&navigator.product==="ReactNative"?Uc="react-native":Uc="node";const a9={"X-Client-Info":`supabase-js-${Uc}/${n9}`},i9={headers:a9},o9={schema:"public"},s9={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},l9={};function Lu(e){"@babel/helpers - typeof";return Lu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Lu(e)}function c9(e,t){if(Lu(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Lu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function u9(e){var t=c9(e,"string");return Lu(t)=="symbol"?t:t+""}function d9(e,t,r){return(t=u9(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function sk(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function st(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?sk(Object(r),!0).forEach(function(n){d9(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):sk(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}const f9=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),h9=()=>Headers,p9=(e,t,r)=>{const n=f9(r),a=h9();return async(i,o)=>{var s;const l=(s=await t())!==null&&s!==void 0?s:e;let c=new a(o==null?void 0:o.headers);return c.has("apikey")||c.set("apikey",e),c.has("Authorization")||c.set("Authorization",`Bearer ${l}`),n(i,st(st({},o),{},{headers:c}))}};function m9(e){return e.endsWith("/")?e:e+"/"}function g9(e,t){var r,n;const{db:a,auth:i,realtime:o,global:s}=e,{db:l,auth:c,realtime:d,global:f}=t,h={db:st(st({},l),a),auth:st(st({},c),i),realtime:st(st({},d),o),storage:{},global:st(st(st({},f),s),{},{headers:st(st({},(r=f==null?void 0:f.headers)!==null&&r!==void 0?r:{}),(n=s==null?void 0:s.headers)!==null&&n!==void 0?n:{})}),accessToken:async()=>""};return e.accessToken?h.accessToken=e.accessToken:delete h.accessToken,h}function v9(e){const t=e==null?void 0:e.trim();if(!t)throw new Error("supabaseUrl is required.");if(!t.match(/^https?:\/\//i))throw new Error("Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.");try{return new URL(m9(t))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}var y9=class extends r9{constructor(e){super(e)}},b9=class{constructor(e,t,r){var n,a;this.supabaseUrl=e,this.supabaseKey=t;const i=v9(e);if(!t)throw new Error("supabaseKey is required.");this.realtimeUrl=new URL("realtime/v1",i),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",i),this.storageUrl=new URL("storage/v1",i),this.functionsUrl=new URL("functions/v1",i);const o=`sb-${i.hostname.split(".")[0]}-auth-token`,s={db:o9,realtime:l9,auth:st(st({},s9),{},{storageKey:o}),global:i9},l=g9(r??{},s);if(this.storageKey=(n=l.auth.storageKey)!==null&&n!==void 0?n:"",this.headers=(a=l.global.headers)!==null&&a!==void 0?a:{},l.accessToken)this.accessToken=l.accessToken,this.auth=new Proxy({},{get:(d,f)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(f)} is not possible`)}});else{var c;this.auth=this._initSupabaseAuthClient((c=l.auth)!==null&&c!==void 0?c:{},this.headers,l.global.fetch)}this.fetch=p9(t,this._getAccessToken.bind(this),l.global.fetch),this.realtime=this._initRealtimeClient(st({headers:this.headers,accessToken:this._getAccessToken.bind(this),fetch:this.fetch},l.realtime)),this.accessToken&&Promise.resolve(this.accessToken()).then(d=>this.realtime.setAuth(d)).catch(d=>console.warn("Failed to set initial Realtime auth token:",d)),this.rest=new Fz(new URL("rest/v1",i).href,{headers:this.headers,schema:l.db.schema,fetch:this.fetch,timeout:l.db.timeout,urlLengthLimit:l.db.urlLengthLimit}),this.storage=new JW(this.storageUrl.href,this.headers,this.fetch,r==null?void 0:r.storage),l.accessToken||this._listenForAuthEvents()}get functions(){return new Cz(this.functionsUrl.href,{headers:this.headers,customFetch:this.fetch})}from(e){return this.rest.from(e)}schema(e){return this.rest.schema(e)}rpc(e,t={},r={head:!1,get:!1,count:void 0}){return this.rest.rpc(e,t,r)}
466channel(e,t={config:{}}){return this.realtime.channel(e,t)}getChannels(){return this.realtime.getChannels()}removeChannel(e){return this.realtime.removeChannel(e)}removeAllChannels(){return this.realtime.removeAllChannels()}async _getAccessToken(){var e=this,t,r;if(e.accessToken)return await e.accessToken();const{data:n}=await e.auth.getSession();return(t=(r=n.session)===null||r===void 0?void 0:r.access_token)!==null&&t!==void 0?t:e.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:e,persistSession:t,detectSessionInUrl:r,storage:n,userStorage:a,storageKey:i,flowType:o,lock:s,debug:l,throwOnError:c},d,f){const h={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new y9({url:this.authUrl.href,headers:st(st({},h),d),storageKey:i,autoRefreshToken:e,persistSession:t,detectSessionInUrl:r,storage:n,userStorage:a,flowType:o,lock:s,debug:l,throwOnError:c,fetch:f,hasCustomAuthorizationHeader:Object.keys(this.headers).some(p=>p.toLowerCase()==="authorization")})}_initRealtimeClient(e){return new xW(this.realtimeUrl.href,st(st({},e),{},{params:st(st({},{apikey:this.supabaseKey}),e==null?void 0:e.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((e,t)=>{this._handleTokenChanged(e,"CLIENT",t==null?void 0:t.access_token)})}_handleTokenChanged(e,t,r){(e==="TOKEN_REFRESHED"||e==="SIGNED_IN")&&this.changedAccessToken!==r?(this.changedAccessToken=r,this.realtime.setAuth(r)):e==="SIGNED_OUT"&&(this.realtime.setAuth(),t=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}};const x9=(e,t,r)=>new b9(e,t,r);function w9(){if(typeof window<"u")return!1;const e=globalThis.process;if(!e)return!1;const t=e.version;if(t==null)return!1;const r=t.match(/^v(\d+)\./);return r?parseInt(r[1],10)<=18:!1}w9()&&console.warn("⚠️  Node.js 18 and below are deprecated and will no longer be supported in future versions of @supabase/supabase-js. Please upgrade to Node.js 20 or later. For more information, visit: https://github.com/orgs/supabase/discussions/37217");const _9="https://laphjllsupmdkevxqgqg.supabase.co",S9="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImxhcGhqbGxzdXBtZGtldnhxZ3FnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NzY3MzU4NDEsImV4cCI6MjA5MjMxMTg0MX0.RK9TU1eSl8_Mi6qYNbULWgrSPe29HstVVa_sw7emSUI",ae=x9(_9,S9,{auth:{storage:localStorage,persistSession:!0,autoRefreshToken:!0}}),eM=w.createContext({user:null,session:null,loading:!0,signOut:async()=>{}}),j9=({children:e})=>{const[t,r]=w.useState(null),[n,a]=w.useState(null),[i,o]=w.useState(!0);w.useEffect(()=>{const{data:l}=ae.auth.onAuthStateChange((c,d)=>{r(d),a((d==null?void 0:d.user)??null),c==="SIGNED_IN"&&d&&setTimeout(async()=>{try{const{data:f}=await ae.functions.invoke("validate-session",{body:{action:"claim"}});f!=null&&f.session_token&&localStorage.setItem("session_token",f.session_token)}catch{}},0)});return ae.auth.getSession().then(({data:{session:c}})=>{r(c),a((c==null?void 0:c.user)??null),o(!1)}),()=>l.subscription.unsubscribe()},[]);const s=async()=>{try{await ae.functions.invoke("validate-session",{body:{action:"release"}})}catch{}localStorage.removeItem("session_token"),await ae.auth.signOut()};return u.jsx(eM.Provider,{value:{user:n,session:t,loading:i,signOut:s},children:e})},Pt=()=>w.useContext(eM),tM=w.createContext({theme:"light",setTheme:()=>{},toggleTheme:()=>{}}),lk="aluno_theme",k9=e=>{const t=document.documentElement;e==="dark"?t.classList.add("dark"):t.classList.remove("dark")},E9=({children:e})=>{const{user:t}=Pt(),[r,n]=w.useState(()=>typeof window>"u"?"light":localStorage.getItem(lk)||"light");w.useEffect(()=>{k9(r),localStorage.setItem(lk,r)},[r]),w.useEffect(()=>{if(!t)return;let o=!1;return(async()=>{const{data:s}=await ae.from("user_preferences").select("theme").eq("user_id",t.id).maybeSingle();o||((s==null?void 0:s.theme)==="dark"||(s==null?void 0:s.theme)==="light")&&n(s.theme)})(),()=>{o=!0}},[t]);const a=w.useCallback(o=>{n(o),t&&ae.from("user_preferences").upsert({user_id:t.id,theme:o},{onConflict:"user_id"}).then(()=>{})},[t]),i=w.useCallback(()=>{a(r==="dark"?"light":"dark")},[r,a]);return u.jsx(tM.Provider,{value:{theme:r,setTheme:a,toggleTheme:i},children:e})},rM=()=>w.useContext(tM),ep=[{key:"pomodoro_25",title:"Pomodoro Clássico",focus:25,break:5,cycles:4,description:"25 min de foco, 5 min de descanso. Ideal pra quem está começando.",emoji:"🍅"},{key:"pomodoro_50",title:"Pomodoro Longo",focus:50,break:10,cycles:3,description:"50 min de foco, 10 min de pausa. Pra quem rende mais em blocos maiores.",emoji:"⏱️"},{key:"deep_work_90",title:"Deep Work",focus:90,break:20,cycles:2,de
466scription:"Bloco único de 90 min de foco profundo. Sem distrações.",emoji:"🧠"},{key:"free",title:"Livre",focus:30,break:5,description:"Você define quanto tempo de foco e descanso quer.",emoji:"🎯"}],nM=e=>ep.find(t=>t.key===e)??ep[0],aM=w.createContext(void 0),O9=e=>{if(e)try{const t=new(window.AudioContext||window.webkitAudioContext),r=t.createOscillator(),n=t.createGain();r.connect(n),n.connect(t.destination),r.frequency.value=880,n.gain.setValueAtTime(.001,t.currentTime),n.gain.exponentialRampToValueAtTime(.4,t.currentTime+.05),n.gain.exponentialRampToValueAtTime(.001,t.currentTime+1.2),r.start(),r.stop(t.currentTime+1.3)}catch{}},N9=({children:e})=>{const{user:t}=Pt(),[r,n]=w.useState("pomodoro_25"),[a,i]=w.useState(!0),[o,s]=w.useState(30),[l,c]=w.useState(5),d=nM(r),f=d.key==="free"?o:d.focus,h=d.key==="free"?l:d.break,[p,g]=w.useState("focus"),[m,v]=w.useState(f*60),[x,b]=w.useState(!1),[y,S]=w.useState(0),_=w.useRef(null),j=w.useRef(p),k=w.useRef(f),E=w.useRef(h),O=w.useRef(r),A=w.useRef(a),T=w.useRef(t);w.useEffect(()=>{j.current=p},[p]),w.useEffect(()=>{k.current=f},[f]),w.useEffect(()=>{E.current=h},[h]),w.useEffect(()=>{O.current=r},[r]),w.useEffect(()=>{A.current=a},[a]),w.useEffect(()=>{T.current=t},[t]),w.useEffect(()=>{t&&(async()=>{const{data:P}=await ae.from("user_preferences").select("default_method, sound_enabled").eq("user_id",t.id).maybeSingle();P&&(P.default_method&&n(P.default_method),typeof P.sound_enabled=="boolean"&&i(P.sound_enabled))})()},[t]),w.useEffect(()=>{x||(g("focus"),v(f*60))},[r,f,x]);const N=w.useCallback(async P=>{const B=T.current;if(!B)return;const U=new Date().toISOString().slice(0,10);await ae.from("study_sessions").insert({user_id:B.id,method_key:O.current,focus_minutes:P,break_minutes:E.current});const{data:F}=await ae.from("study_logs").select("id, minutes_studied").eq("user_id",B.id).eq("study_date",U).maybeSingle();F?await ae.from("study_logs").update({minutes_studied:(F.minutes_studied??0)+P}).eq("id",F.id):await ae.from("study_logs").insert({user_id:B.id,study_date:U,minutes_studied:P})},[]),I=w.useCallback(async()=>{O9(A.current),j.current==="focus"?(S(P=>P+1),await N(k.current),ve.success("⏰ Bloco de foco concluído! Hora do descanso.",{description:`Descanso de ${E.current} min começou.`}),g("break"),v(E.current*60),b(!0)):(ve.info("☕ Descanso terminou. Pronto para mais um bloco?"),g("focus"),v(k.current*60),b(!1))},[N]);w.useEffect(()=>{if(!x){_.current&&window.clearInterval(_.current),_.current=null;return}return _.current=window.setInterval(()=>{v(P=>P<=1?(_.current&&window.clearInterval(_.current),_.current=null,I(),0):P-1)},1e3),()=>{_.current&&window.clearInterval(_.current)}},[x,I]);const R=w.useCallback(()=>b(!0),[]),D=w.useCallback(()=>b(!1),[]),L=w.useCallback(()=>b(P=>!P),[]),M=w.useCallback(()=>{b(!1),g("focus"),v(k.current*60)},[]),C=w.useCallback(()=>{b(!1),I()},[I]);return u.jsx(aM.Provider,{value:{methodKey:r,setMethodKey:n,freeFocus:o,setFreeFocus:s,freeBreak:l,setFreeBreak:c,soundEnabled:a,setSoundEnabled:i,phase:p,secondsLeft:m,running:x,completedFocus:y,focusMin:f,breakMin:h,start:R,pause:D,toggle:L,reset:M,skip:C},children:e})},iM=()=>{const e=w.useContext(aM);if(!e)throw new Error("useStudyTimer must be used within StudyTimerProvider");return e},V0=Om("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),se=w.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...a},i)=>{const o=n?z8:"button";return u.jsx(o,{className:q(V0({variant:t,size:r,className:e})),ref:i,...a})});
466se.displayName="Button";const P9=e=>{const t=Math.floor(e/60).toString().padStart(2,"0"),r=(e%60).toString().padStart(2,"0");return`${t}:${r}`},C9=()=>{const{user:e}=Pt(),{running:t,secondsLeft:r,phase:n,toggle:a,reset:i,focusMin:o,breakMin:s}=iM(),l=oa(),c=Ba(),d=(n==="focus"?o:s)*60,f=r>0&&r<d;if(!(!!e&&(t||f)&&l.pathname!=="/aluno/metodos"))return null;const p=d>0?(d-r)/d*100:0,g=n==="focus"?"hsl(var(--primary))":"hsl(var(--amber))";return u.jsx("div",{className:"fixed top-3 right-3 z-50 animate-in fade-in slide-in-from-top-2",children:u.jsxs("div",{className:"bg-card/95 backdrop-blur border shadow-lg rounded-full pl-2 pr-1 py-1 flex items-center gap-2",children:[u.jsxs("button",{onClick:()=>c("/aluno/metodos"),className:"relative w-10 h-10 shrink-0 flex items-center justify-center","aria-label":"Abrir métodos",children:[u.jsxs("svg",{className:"absolute inset-0 -rotate-90",viewBox:"0 0 36 36",children:[u.jsx("circle",{cx:"18",cy:"18",r:"16",fill:"none",stroke:"hsl(var(--muted))",strokeWidth:"3"}),u.jsx("circle",{cx:"18",cy:"18",r:"16",fill:"none",stroke:g,strokeWidth:"3",strokeLinecap:"round",strokeDasharray:`${p*2*Math.PI*16/100} ${2*Math.PI*16}`,className:"transition-all duration-500"})]}),n==="focus"?u.jsx($2,{className:"w-3.5 h-3.5 text-primary"}):u.jsx(L2,{className:"w-3.5 h-3.5 text-amber-dark"})]}),u.jsx("button",{onClick:()=>c("/aluno/metodos"),className:"text-sm font-bold tabular-nums leading-none",children:P9(r)}),u.jsx(se,{size:"icon",variant:"ghost",className:"h-8 w-8 rounded-full",onClick:a,"aria-label":t?"Pausar":"Retomar",children:t?u.jsx(U2,{className:"w-3.5 h-3.5"}):u.jsx(W2,{className:"w-3.5 h-3.5"})}),u.jsx(se,{size:"icon",variant:"ghost",className:q("h-8 w-8 rounded-full text-muted-foreground"),onClick:i,"aria-label":"Encerrar",children:u.jsx(Pu,{className:"w-3.5 h-3.5"})})]})})},ck="landing_theme",T9=()=>{const[e,t]=w.useState(()=>typeof window>"u"?"light":localStorage.getItem(ck)||"light");w.useEffect(()=>{const n=document.documentElement,a=n.classList.contains("dark");return e==="dark"?n.classList.add("dark"):n.classList.remove("dark"),localStorage.setItem(ck,e),()=>{a?n.classList.add("dark"):n.classList.remove("dark")}},[e]);const r=w.useCallback(()=>{t(n=>n==="dark"?"light":"dark")},[]);return{theme:e,toggle:r}},A9=()=>{const{theme:e,toggle:t}=T9(),r=e==="dark";return u.jsx("nav",{className:"sticky top-0 z-50 bg-background/90 backdrop-blur-md border-b border-border py-3.5",children:u.jsxs("div",{className:"container-x flex items-center justify-between gap-3",children:[u.jsxs("div",{className:"font-display text-base sm:text-xl font-extrabold text-purple whitespace-nowrap shrink-0",children:["Acertei ",u.jsx("span",{className:"text-coral",children:"no Tema"})," 🎯"]}),u.jsxs("div",{className:"flex items-center gap-2 sm:gap-3 shrink-0",children:[u.jsx("a",{href:"#oferta",className:"bg-purple text-primary-foreground rounded-full px-4 sm:px-5 py-2 sm:py-2.5 text-xs sm:text-sm font-bold transition-all hover:-translate-y-0.5 hover:shadow-purple-glow whitespace-nowrap",children:"Quero me preparar →"}),u.jsx("button",{type:"button",onClick:t,"aria-label":r?"Ativar tema claro":"Ativar tema escuro",title:r?"Tema claro":"Tema escuro",className:"grid place-items-center w-9 h-9 sm:w-10 sm:h-10 rounded-full border border-border bg-card text-foreground transition-all hover:-translate-y-0.5 hover:border-purple hover:text-purple",children:r?u.jsx(N0,{className:"w-4 h-4"}):u.jsx(Hh,{className:"w-4 h-4"})})]})]})})},Cf=({className:e,emoji:t,label:r,value:n,valueClass:a="",sub:i,progress:o,stars:s})=>u.jsxs("div",{className:`absolute bg-card rounded-2xl px-5 py-4 shadow-card animate-float ${e}`,children:[u.jsx("div",{className:"text-3xl mb-1.5",children:t}),u.jsx("div",{className:"text-[11px] font-bold uppercase tracking-wider text-muted-foreground",children:r}),u.jsx("div",{className:`font-display text-[22px] font-extrabold ${a}`,children:n}),i&&u.jsx("div",{className:"text-xs text-muted-foreground mt-0.5",children:i}),s&&u.jsx("div",{className:"text-amber tracking-widest text-base",children:"★★★★★"}),o!==void 0&&u.jsx("div",{className:"h-2 bg-purple-light rounded-full mt-2.5 overflow-hidden",children:u.jsx("div",{className:"h-full rounded-full bg-gradient-mix animate-grow",style:{width:`${o}%`}})})]}),M9=()=>u.jsxs("section",{className:"relative overflow-hidden py-24 md:py-28",children:[u.jsx("div",{className:"absolute inset-0 bg-hero-radial z-0"}),u.jsx("div",{className:"container-x relative z-10",children:u.jsxs("div",{className:"grid md:grid-cols-2 gap-10 md:gap-14 items-center",children:[u.jsxs("div",{children:[u.jsxs("div",{className:"flex items-center gap-2 text-coral text-sm font-bold uppercase tracking-widest mb-4",children:[u.jsx("span",{className:"block w-6 h-[3px] bg-coral rounded"}),"Para o ENEM, vestibulares e bolsas"]}),u.jsxs("h1",{className:"font-display font-extrabold text-[clamp(34px,5.5vw,58px)] leading-[1.1] mb-5",children:["Estude ",u.jsx(uk,{children:"menos"}),u.jsx("br",{}),"e aprenda ",u.jsx(uk,{children:"muito mais"})]}),u.jsx("p",{className:"text-[17px] leading-relaxed text-muted-foreground mb-9 max-w-lg",children:"Métodos comprovados, rotina real e estratég
466ias que funcionam — mesmo se você tem ansiedade, pouco tempo ou já tentou de tudo."}),u.jsxs("div",{className:"flex flex-wrap gap-3.5",children:[u.jsx("a",{href:"#metodos",className:"bg-gradient-primary text-primary-foreground rounded-full px-8 py-3.5 font-bold transition-all hover:-translate-y-1 hover:shadow-purple-glow",children:"Ver os métodos 🚀"}),u.jsx("a",{href:"#oferta",className:"border-2 border-purple text-purple rounded-full px-8 py-3.5 font-bold transition-all hover:bg-purple hover:text-primary-foreground hover:-translate-y-1",children:"Acesso Premium"})]})]}),u.jsxs("div",{className:"relative h-[420px] hidden sm:block",children:[u.jsx(Cf,{className:"top-[10%] left-0 w-[220px] [animation-delay:0s]",emoji:"🍅",label:"Pomodoro ativo",value:"25 min",sub:"Foco total, sem culpa",progress:68}),u.jsx(Cf,{className:"top-[35%] right-0 w-[200px] [animation-delay:1.2s]",emoji:"📈",label:"Retenção de memória",value:"+87%",valueClass:"text-teal",sub:"Repetição espaçada"}),u.jsx(Cf,{className:"bottom-[8%] left-[15%] w-[240px] [animation-delay:2.1s]",emoji:"🏆",label:"Redação ENEM",value:"980/1000",valueClass:"text-coral",stars:!0}),u.jsx(Cf,{className:"top-[5%] right-[10%] w-[160px] [animation-delay:.7s] hidden md:block",emoji:"📅",label:"Meta da semana",value:"5/7 dias ✓",valueClass:"!text-base !font-bold text-purple",progress:71})]})]})})]}),uk=({children:e})=>u.jsxs("span",{className:"relative text-purple",children:[e,u.jsx("span",{className:"absolute left-0 -bottom-1 w-full h-1 bg-gradient-mix rounded"})]}),$9=[{num:"+200",suffix:"",label:"Alunos beneficiados"},{num:"91",suffix:"%",label:"Relatam melhora nos estudos"},{num:"+80",suffix:"%",label:"Média de melhoria no ENEM"},{num:"4.7",suffix:"★",label:"Avaliação dos estudantes"}],R9=()=>u.jsx("div",{className:"bg-dark py-10",children:u.jsx("div",{className:"container-x",children:u.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-x-4 gap-y-8 text-center",children:$9.map(e=>u.jsxs("div",{className:"min-w-0",children:[u.jsxs("div",{className:"font-display text-[28px] sm:text-[32px] md:text-[38px] font-extrabold text-white leading-tight whitespace-nowrap",children:[e.num,u.jsx("span",{className:"text-coral",children:e.suffix})]}),u.jsx("div",{className:"text-xs sm:text-sm text-white/60 mt-1.5 leading-snug",children:e.label})]},e.label))})})}),e1=({tag:e,tagClass:t,title:r,sub:n})=>u.jsxs(u.Fragment,{children:[u.jsx("div",{className:`inline-block text-xs font-bold uppercase tracking-widest px-3.5 py-1.5 rounded-full mb-3 ${t}`,children:e}),u.jsx("h2",{className:"font-display font-extrabold text-[clamp(28px,5vw,44px)] leading-tight mb-3.5",children:r}),u.jsx("p",{className:"text-[17px] text-muted-foreground max-w-xl leading-relaxed mb-12",children:n})]}),I9=[{color:"purple",badge:"⏱ Foco Total",icon:"🍅",title:"Técnica Pomodoro",text:"25 minutos de foco intenso + 5 de pausa. Após 4 ciclos, descanse 30 min. Evita o cansaço mental e mantém a produtividade alta.",tips:["Celular no modo avião","Uma tarefa por vez","Anote distrações, não siga","Use o Cronômetro + lista física"]},{color:"teal",badge:"🔁 Memória Longa",icon:"📆",title:"Repetição Espaçada",text:"Revise no dia 1, dia 3, dia 7, dia 14. O cérebro retém 87% mais do que na leitura linear. Use flashcards com Anki (gratuito!).",tips:["Crie cartões com perguntas curtas","Revise todo dia, 15 minutos","Marque o que errou para revisar"]},{color:"coral",badge:"🧑‍🏫 Domínio Real",icon:"🪄",title:"Método Feynman",text:"Explique o conteúdo como se estivesse ensinando uma criança. Se travar, você encontrou exatamente o que precisa revisar.",tips:["Escolha o tema e explique em voz alta","Sem olhar o livro","Simplifique até a criança entender","Volte ao material nos pontos falhos"]},{color:"amber",badge:"❓ Aprendizado Ativo",icon:"📝",title:"Active Recall",text:"Feche o livro e tente lembrar o que leu. Questione-se antes de rever o material. Estudos mostram 2x mais retenção que releitura.",tips:["Após cada página: O que aprendi?","Faça questões de provas antigas","Marque, não grife — crie perguntas"]}
466,{color:"pink",badge:"✍️ Organização",icon:"🗂️",title:"Método Cornell",text:"Divide a página em 3 áreas: notas, palavras-chave e resumo. Ideal para aulas, vídeos e leituras densas como os textos do ENEM.",tips:["Área direita: anotações principais","Área esquerda: perguntas e chaves","Rodapé: resumo em 2 linhas"]},{color:"blue",badge:"🗺️ Conexões",icon:"🧩",title:"Mapa Mental",text:"Visualmente conecta conceitos e faz o cérebro enxergar o todo antes das partes. Perfeito para história, sociologia e filosofia.",tips:["Tema central ao meio","Ramifique em cores por subtema","Use ícones e palavras-chave","Revise sem o livro primeiro"]}],D9={purple:{bg:"bg-purple-light",text:"text-purple",badge:"bg-purple/15 text-purple"},coral:{bg:"bg-coral-light",text:"text-coral",badge:"bg-coral/15 text-coral"},teal:{bg:"bg-teal-light",text:"text-teal-dark",badge:"bg-teal/15 text-teal-dark"},amber:{bg:"bg-amber-light",text:"text-amber-dark",badge:"bg-amber/20 text-amber-dark"},pink:{bg:"bg-pink-light",text:"text-pink-dark",badge:"bg-pink/15 text-pink-dark"},blue:{bg:"bg-blue-light",text:"text-blue-dark",badge:"bg-blue/15 text-blue-dark"}},L9=()=>u.jsx("section",{id:"metodos",className:"py-20 md:py-24",children:u.jsxs("div",{className:"container-x",children:[u.jsx(e1,{tag:"🧠 Métodos Comprovados",tagClass:"bg-purple-light text-purple",title:u.jsxs(u.Fragment,{children:["Como os melhores alunos",u.jsx("br",{}),"realmente estudam"]}),sub:"Esqueça decorar tudo. Estes métodos são usados por aprovados em medicina, direito e bolsas integrais."}),u.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6",children:I9.map(e=>{const t=D9[e.color];return u.jsxs("div",{className:`${t.bg} rounded-3xl p-7 transition-all hover:-translate-y-1.5 hover:shadow-elegant`,children:[u.jsx("div",{className:`inline-block text-[11px] font-bold uppercase tracking-wider px-3 py-1 rounded-full mb-3 ${t.badge}`,children:e.badge}),u.jsx("div",{className:"text-4xl mb-3.5",children:e.icon}),u.jsx("h3",{className:`font-display text-xl font-extrabold mb-2 ${t.text}`,children:e.title}),u.jsx("p",{className:"text-sm leading-relaxed text-foreground/80",children:e.text}),u.jsx("ul",{className:"mt-3 space-y-1",children:e.tips.map(r=>u.jsxs("li",{className:"text-[13px] flex gap-2",children:[u.jsx("span",{className:"font-bold",children:"→"}),r]},r))})]},e.title)})})]})}),B9=[{color:"purple",icon:"🌅",title:"Comece com um bloco sagrado de 45 min",sub:"Escolha o horário em que seu cérebro está no pico. Para a maioria, entre 9h e 11h ou 19h e 21h."},{color:"coral",icon:"🎯",title:"3 metas diárias — nada mais",sub:'Exemplo: "Resolver 20 questões de Matemática", "Ler capítulo 3 de Biologia", "Revisar flashcards".'},{color:"teal",icon:"🔁",title:"Domingo é dia de planejar, não de estudar",sub:"Reserve 30 min para distribuir os temas da semana, revisar o que não foi feito e recarregar."},{color:"amber",icon:"📵",title:"Bloqueie o celular. De verdade.",sub:"Apps como Forest, FocusTo-Do e Opal bloqueiam redes sociais por tempo determinado."}],F9={purple:"border-l-purple",coral:"border-l-coral",teal:"border-l-teal",amber:"border-l-amber"},dk=[{time:"07:30",task:"Revisão flashcards (Anki)",done:!0,pill:{label:"✓ Feito",cls:"bg-teal-light text-teal-dark"}},{time:"09:00",task:"Matemática — Funções (20 q.)",done:!0,pill:{label:"✓ Feito",cls:"bg-teal-light text-teal-dark"}},{time:"10:30",task:"Pausa + lanche",done:!0,pill:{label:"Pausa",cls:"bg-amber-light text-amber-dark"}},{time:"14:00",task:"Redação — rascunho tema",done:!1,pill:{label:"Pendente",cls:"bg-coral-light text-coral"}},{time:"16:00",task:"Inglês — reading comprehension",done:!1,pill:{label:"Pendente",cls:"bg-purple-light text-purple"}},{time:"19:30",task:"Mapa mental — Biologia",done:!1,pill:{label:"Pendente",cls:"bg-blue-light text-blue-dark"}}],U9=()=>u.jsx("section",{id:"rotina",className:"py-20 md:py-24 bg-background",children:u.jsx("div",{className:"container-x",children:u.jsxs("div",{className:"grid md:grid-cols-2 gap-12 items-start",children:[u.jsxs("div",{children:[u.jsx("div",{className:"inline-block text-xs font-bold uppercase tracking-widest px-3.5 py-1.5 rounded-full mb-3 bg-teal-light text-teal-dark",children:"📅 Rotina Real"}),u.jsxs("h2",{className:"font-display font-extrabold text-[clamp(28px,5vw,44px)] leading-tight mb-3.5",children:["Uma rotina que",u.jsx("br",{}),"você realmente consegue seguir"]}),u.jsx("p",{className:"text-[17px] text-muted-foreground leading-relaxed mb-7",children:"Nada de acordar às 5h se você odeia manhãs. Construa sua rotina a partir da sua realidade."}),u.jsx("div",{className:"flex flex-col gap-3.5",children:B9.map(e=>u.jsxs("div",{className:`flex gap-3.5 items-start bg-card rounded-2xl p-4 border-l-4 shadow-soft ${F9[e.color]}`,children:[u.jsx("div",{className:"text-[22px] flex-shrink-0",children:e.icon}),u.jsxs("div",{children:[u.jsx("div",{className:"font-bold text-[15px]",children:e.title}),u.jsx("div",{className:"text-[13px] text-muted-foreground mt-0.5",children:e.sub})]})]},e.title))})]}),u.jsxs("div",{className:"bg-card rounded-3xl p-7 shadow-[0_8px_40px_hsl(var(--purple)/0.12)] order-first md:order-last",children:[u.jsxs("div",{className:"flex items-center justify-between mb-5",children:[u.jsx("h3",{className:"font-display text-lg font-extrabold",children:"📋 Meu Planner de Hoje"}),u.jsx("span",{className:"text-[13px] text-muted-foreground",children:"Segunda, 13 Abr"})]}),dk.map((e,t)=>u.jsxs("div",{className:`flex items-center gap-3 py-2.5 ${t<dk.length-1?"border-b border-dashed border-border":""}`,children:[u.jsx("span",{className:"text-xs font-bold text-muted-foreground min-w-[55px] tracking-wide",children:e.time}),u.jsx("div",{className:`w-5 h-5 rounded-md flex items-center justify-center text-[13px] flex-shrink-0 ${e.done?"bg-teal-light text-teal":"border-[1.5px] border-dashed border-border"}`,children:e.done?"✓":""}),u.jsx("span",{className:`text-sm font-semibold ${e.done?"line-through text-muted-foreground":""}`,children:e.task}),u.jsx("span",{className:`ml-auto text-[11px] font-bold uppercase tracking-wider px-2.5 py-1 rounded-full ${e.pill.cls}`,children:e.pill.label})]},t)),u.jsxs("div",{className:"flex gap-1 mt-4 pt-3.5 border-t border-border items-center",children:[[!0,!0,!0,!1,!1,!1].map((e,t)=>u.jsx("div",{className:`w-7 h-7 rounded-lg flex items-center justify-center text-sm ${e?"bg-coral-light":"bg-muted opacity-40"}`,children:"🍅"},t)),u.jsx("span",{className:"text-xs text-muted-foreground ml-2",children:"3 de 6 pomodoros concluídos"})]})]})]})})}),z9=[{color:"purple",icon:"🫁",title:"Respiração 4-7-8",text:"A técnica que reduz cortisol em minutos. Usada por atletas de elite antes de competições. Funciona antes da prova.",steps:[{num:"1",text:"Inspire pelo nariz por 4 segundos"},{num:"2",text:"Segure o ar por 7 segundos"},{num:"3",text:"Expire pela boca por 8 segundos"},{num:"4",text:"Repita 3 a 4 vezes"}]},{color:"teal",icon:"🏃",title:"Movimento é remédio",text:"30 minutos de caminhada aumentam BDNF — o hormônio do aprendizado. Não é treino pesado, é movimento intencional.",steps:[{num:"→",text:"Caminhe após blocos de estudo"},{num:"→",text:"Dança, bike, pular corda — vale tudo"},{num:"→",text:"Só 20 min já fazem diferença"}]},{color:"amber",icon:"😴",title:"Sono é estudo",text:"Durante o sono, o cérebro consolida as memórias do dia. Estudar às 2h da manhã apaga o que você aprendeu antes.",steps:[{num:"→",text:"Durma 7–9 horas regularmente"},{num:"→",text:"Sem tela 1h antes de dormir"},{num:"→",text:"Power nap de 20 min recarrega tudo"}]},{color:"coral",icon:"📓",title:"Journaling anti-ansiedade",text:"Escrever seus medos tira o poder deles. Pesquisas mostram que 10 min de diário reduzem a ansiedade pré-prova em até 30%.",steps:[{num:"1",text:'"O que me preocupa hoje é..."'},{num:"2",text:'"O que eu já sei e posso controlar..."'},{num:"3",text:'"Minha pequena vitória de hoje foi..."'}]},{color:"pink",icon:"🎵",title:"Música certa, foco certo",text:"Não é qualquer música. Ruído branco, lo-fi sem letra e sons da natureza aumentam concentração sem distrair.",steps:[{num:"→",text:"Lo-fi hip hop para leitura e revisão"},{num:"→",text:"Ruído branco para exercícios"},{num:"→",text:"Silêncio total para redação"}]},{color:"blue",icon:"🧘",title:"Mindfulness de 5 minutos",text:"Você não precisa meditar 1 hora. 5 minutos de atenção plena antes de estudar aumentam foco e reduzem erros.",steps:[{num:"1",text:"Sente-se, feche os olhos"},{num:"2",text:"Observe a respiração sem controlar"},{num:"3",text:"Quando a mente vagar, só volte — sem julgamento"}]}],W9={purple:"bg-purple-light text-purple border-purple-light",teal:"bg-teal-light text-teal-dark border-teal-light",amber:"bg-amber-light text-amber-dark border-amber-light",coral:"bg-coral-light text-coral border-coral-light",pink:"bg-pink-light text-pink-dark border-pink-light",blue:"bg-blue-light text-blue-dark border-blue-light"},H9={purple:"border-purple-light",teal:"border-teal-light",amber:"border-amber-light",coral:"border-coral-light",pink:"border-pink-light",blue:"border-blue-light"},q9=()=>u.jsx("section",{id:"bemestar",className:"py-20 md:py-24 bg-card",children:u.jsxs("div",{className:"container-x",children:[u.jsx(e1,{tag:"🧘 Bem-estar Mental",tagClass:"bg-coral-light text-coral",title:u.jsxs(u.Fragment,{children:["Ansiedade não é fraqueza —",u.jsx("br",{}),"é sinal de que você se importa"]}),sub:"A diferença entre o candidato que trava na prova e o que vai bem é aprender a regular a ansiedade, não eliminá-la."}),u.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-7",children:z9.map(e=>u.jsxs("div",{className:`bg-card rounded-3xl p-7 border-[1.5px] transition-transform hover:-translate-y-1 ${H9[e.color]}`,children:[u.jsx("span",{className:"text-4xl block mb-3.5",children:e.icon}),u.jsx("h3",{className:"font-display text-[19px] font-extrabold mb-2",children:e.title}),u.jsx("p",{className:"text-sm leading-relaxed text-muted-foreground",children:e.text}),u.jsx("div",{className:"mt-3.5 flex flex-col gap-1.5",children:e.steps.map((t,r)=>u.jsxs("div",{className:"flex gap-2.5 items-start text-[13px] font-semibold",children:[u.jsx("div",{className:`w-[22px] h-[22px] rounded-full flex items-center justify-center text-[11px] font-extrabold flex-shrink-0 mt-0.5 ${W9[e.color]}`,children:t.num}),t.text]},r))})]},e.title))})]})}),V9=["Acesso completo à plataforma do aluno","Simulados ENEM ilimitados com correção","Correção de redação por IA — nota e feedback","E-books e materiais densos atualizados","Métodos de estudo + Pomodoro integrado","Calendário, estatísticas e streak diário","Notas de corte SISU por curso e estado","Cancelamento a qualquer momento"],K9=()=>{const e=[{l:"S",d:"21",studied:!0},{l:"T",d:"22",studied:!0},{l:"Q",d:"23",studied:!0},{l:"Q",d:"24",studied:!0},{l:"S",d:"25",studied:!1,today:!0},{l:"S",d:"26",studied:!1},{l:"D",d:"27",studied:!1}],t=[{icon:Aw,label:"Simulado ENEM",desc:"Treino por matéria",gold:!1}
466,{icon:Mw,label:"Corretor de redação",desc:"Correção com IA",gold:!1},{icon:Go,label:"Ebooks",desc:"Sua biblioteca",gold:!0},{icon:Am,label:"Materiais extras",desc:"Bônus liberados",gold:!0}];return u.jsxs("div",{className:"relative p-5 sm:p-7 space-y-6 h-[680px] overflow-hidden",children:[u.jsx("div",{className:"absolute inset-0 pointer-events-none opacity-80",style:{background:"radial-gradient(ellipse 90% 60% at 15% 0%, hsl(258 90% 66% / 0.18) 0%, transparent 60%), radial-gradient(ellipse 70% 60% at 100% 100%, hsl(36 45% 61% / 0.14) 0%, transparent 60%)"}}),u.jsxs("div",{className:"relative space-y-6",children:[u.jsxs("div",{className:"space-y-2",children:[u.jsxs("div",{className:"flex items-center gap-2 text-[10px] font-semibold uppercase tracking-[0.22em] text-white/50",children:[u.jsx("span",{className:"inline-block w-7 h-px bg-gradient-to-r from-transparent via-[hsl(36_70%_70%)] to-transparent"}),"Sexta-feira, 25 de abril"]}),u.jsxs("h3",{className:"font-display text-2xl sm:text-3xl font-bold tracking-tight leading-[1.05] text-white",children:["Bem-vindo,"," ",u.jsx("span",{className:"bg-clip-text text-transparent bg-[linear-gradient(135deg,hsl(258_90%_75%)_0%,hsl(36_70%_75%)_100%)]",children:"Estudante"})]}),u.jsx("p",{className:"text-xs sm:text-sm text-white/55",children:"Sua jornada de excelência continua. Foco hoje, conquista amanhã."})]}),u.jsxs("div",{className:"relative rounded-2xl border border-white/10 bg-white/[0.04] p-5 overflow-hidden",children:[u.jsx("div",{className:"absolute -top-10 -right-10 w-40 h-40 rounded-full bg-[hsl(258_90%_66%/0.25)] blur-2xl"}),u.jsxs("div",{className:"relative flex items-center gap-3 mb-5",children:[u.jsxs("div",{className:"relative",children:[u.jsx("div",{className:"absolute inset-0 rounded-xl bg-[linear-gradient(135deg,hsl(36_50%_55%),hsl(36_70%_75%))] blur-md opacity-60"}),u.jsx("div",{className:"relative w-11 h-11 rounded-xl bg-[linear-gradient(135deg,hsl(36_50%_55%),hsl(36_70%_75%))] grid place-items-center",children:u.jsx(Ta,{className:"w-5 h-5 text-white"})})]}),u.jsxs("div",{children:[u.jsx("p",{className:"text-[9px] font-bold uppercase tracking-[0.22em] text-white/50",children:"Hora do foco"}),u.jsx("p",{className:"font-display font-semibold text-sm text-white mt-0.5",children:"Estude hoje pra manter o ritmo"})]})]}),u.jsxs("div",{className:"relative rounded-xl border border-[hsl(36_45%_61%/0.35)] bg-gradient-to-br from-[hsl(36_45%_61%/0.12)] via-transparent to-[hsl(258_90%_66%/0.12)] p-4 overflow-hidden",children:[u.jsx("div",{className:"absolute -top-8 -left-8 w-32 h-32 rounded-full bg-[hsl(36_45%_61%/0.25)] blur-2xl"}),u.jsxs("div",{className:"relative flex items-center gap-4",children:[u.jsxs("div",{className:"relative shrink-0",children:[u.jsx("div",{className:"absolute inset-0 rounded-full bg-[hsl(36_45%_61%/0.4)] blur-md"}),u.jsx("div",{className:"relative w-14 h-14 rounded-full bg-[linear-gradient(135deg,hsl(36_50%_55%),hsl(41_100%_48%))] grid place-items-center shadow-[0_0_24px_hsl(36_70%_60%/0.5)]",children:u.jsx(Yo,{className:"w-7 h-7 text-white drop-shadow"})})]}),u.jsxs("div",{className:"flex-1 min-w-0",children:[u.jsxs("div",{className:"flex items-center gap-1.5 text-[9px] font-bold uppercase tracking-[0.2em] text-[hsl(36_70%_70%)]",children:[u.jsx(gl,{className:"w-3 h-3"})," Sua sequência"]}),u.jsxs("div",{className:"flex items-baseline gap-1.5 mt-0.5",children:[u.jsx("span",{className:"font-display text-4xl sm:text-5xl font-bold tabular-nums bg-clip-text text-transparent bg-[linear-gradient(135deg,hsl(36_50%_60%),hsl(36_85%_80%))]",children:"12"}),u.jsx("span",{className:"text-xs text-white/60 font-medium",children:"dias consecutivos"})]})]})]})]}),u.jsx("div",{className:"mt-5 grid grid-cols-7 gap-1.5",children:e.map((r,n)=>u.jsxs("div",{className:"flex flex-col items-center gap-1.5",children:[u.jsx("span",{className:"text-[9px] font-bold text-white/40 uppercase tracking-widest",children:r.l}),u.jsx("div",{className:r.studied?"w-8 h-8 rounded-lg grid place-items-center bg-[linear-gradient(135deg,hsl(258_90%_66%),hsl(258_100%_75%))] border border-[hsl(258_90%_66%/0.4)] text-white shadow-[0_0_16px_hsl(258_90%_66%/0.5)]":r.today?"w-8 h-8 rounded-lg grid place-items-center border border-[hsl(36_45%_61%/0.6)] text-[hsl(36_70%_70%)] bg-[hsl(36_45%_61%/0.08)]":"w-8 h-8 rounded-lg grid place-items-center border border-white/10 text-white/30 bg-white/[0.02]",children:r.studied?u.jsx(Md,{className:"w-3.5 h-3.5"}):u.jsx(D2,{className:"w-2.5 h-2.5"})}),u.jsx("span",{className:"text-[9px] tabular-nums text-white/40 font-medium",children:r.d})]},n))}),u.jsxs("div",{className:"mt-5 flex gap-2",children:[u.jsxs("div",{className:"flex-1 text-center rounded-lg py-2 px-3 text-xs font-bold bg-[linear-gradient(135deg,hsl(258_90%_66%),hsl(258_100%_75%))] text-white shadow-[0_0_18px_hsl(258_90%_66%/0.4)] flex items-center justify-center gap-1",children:["Iniciar foco ",u.jsx(Nu,{className:"w-3 h-3"})]}),u.jsx("div",{className:"flex-1 text-center rounded-lg py-2 px-3 text-xs font-semibold border border-white/15 text-white/80",children:"Calendário"})]})]}),u.jsxs("div",{children:[u.jsx("p",{className:"text-[9px] font-bold uppercase tracking-[0.22em] text-white/45 mb-1.5",children:"Acessos rápidos"}),u.jsx("h4",{className:"font-display text-base font-bold text-white mb-3 tracking-tight",children:"Continue de onde parou"}),u.jsx("div",{className:"grid grid-cols-2 gap-2.5",children:t.map((r,n)=>{const a=r.icon;return u.jsxs("div",{className:"relative rounded-xl border border-white/10 bg-white/[0.04] p-3 overflow-hidden",style:{animation:`fade-in 0.6s ease-out ${n*.12}s both`},children:[u.jsx("div",{className:r.gold?"absolute -top-6 -right-6 w-16 h-16 rounded-full bg-[hsl(36_45%_61%/0.25)] blur-xl":"absolute -top-6 -right-6 w-16 h-16 rounded-full bg-[hsl(258_90%_66%/0.25)] blur-xl"}),u.jsxs("div",{className:"relative flex items-start justify-between mb-2",children:[u.jsx("div",{className:r.gold?"w-8 h-8 rounded-lg grid place-items-center bg-[linear-gradient(135deg,hsl(36_50%_55%),hsl(36_70%_75%))] shadow-[0_0_14px_hsl(36_70%_60%/0.4)]":"w-8 h-8 rounded-lg grid place-items-center bg-[linear-gradient(135deg,hsl(258_90%_66%),hsl(258_100%_75%))] shadow-[0_0_14px_hsl(258_90%_66%/0.4)]",children:u.jsx(a,{className:"w-4 h-4 text-white"})}),u.jsx(Nu,{className:"w-3 h-3 text-white/30"})]}),u.jsxs("div",{className:"relative",children:[u.jsx("p",{className:"font-display font-semibold text-xs text-white leading-tight",children:r.label}),u.jsx("p",{className:"text-[10px] text-white/45 mt-0.5 leading-snug",children:r.desc})]})]},r.label)})})]})]}),u.jsx("div",{className:"absolute left-0 right-0 bottom-0 h-20 bg-gradient-to-t from-[hsl(240_22%_10%)] via-[hsl(240_22%_10%/0.7)] to-transparent pointer-events-none"})]})},G9=()=>{const e=[{tema:"Educação digital no Brasil",nota:980,data:"23/04",open:!0},{tema:"Os desafios do envelhecimento populacional",nota:880,data:"16/04"},{tema:"Cultura do cancelamento na era das redes",nota:760,data:"09/04"}],t=[{l:"C1",v:200},{l:"C2",v:200},{l:"C3",v:200},{l:"C4",v:200},{l:"C5",v:180}];return u.jsxs("div",{className:"relative p-5 sm:p-7 space-y-5 h-[680px] overflow-hidden",children:[u.jsx("div",{className:"absolute inset-0 pointer-events-none opacity-80",style:{background:"radial-gradient(ellipse 90% 60% at 80% 0%, hsl(258 90% 66% / 0.2) 0%, transparent 60%), radial-gradient(ellipse 70% 60% at 0% 100%, hsl(36 45% 61% / 0.14) 0%, transparent 60%)"}}),u.jsxs("div",{className:"relative space-y-5",children:[u.jsxs("div",{className:"space-y-2",children:[u.jsxs("div",{className:"flex items-center gap-2 text-[10px] font-semibold uppercase tracking-[0.22em] text-white/50",children:[u.jsx("span",{className:"inline-block w-7 h-px bg-gradient-to-r from-transparent via-[hsl(258_90%_75%)] to-transparent"}),"Correção pelos critérios do ENEM"]}),u.jsxs("h3",{className:"font-display text-2xl sm:text-3xl font-bold tracking-tight leading-[1.05] text-white",children:["Corretor de"," ",u.jsx("span",{className:"bg-clip-text text-transparent bg-[linear-gradient(135deg,hsl(258_90%_75%)_0%,hsl(36_70%_75%)_100%)]",children:"redação"})]}),u.jsx("p",{className:"text-xs sm:text-sm text-white/55",children:"Receba uma correção pelos 5 critérios do ENEM em segundos, com feedback construtivo."})]}),u.jsxs("div",{className:"relative rounded-2xl border border-white/10 bg-white/[0.04] p-4 space-y-3 overflow-hidden",children:[u.jsx("div",{className:"absolute -top-12 -right-12 w-40 h-40 rounded-full bg-[hsl(258_90%_66%/0.18)] blur-3xl"}),u.jsxs("div",{className:"relative",children:[u.jsx("p",{className:"text-[9px] font-bold uppercase tracking-[0.22em] text-white/45 mb-1.5",children:"Tema da redação"}),u.jsx("div",{className:"rounded-lg border border-white/15 bg-white/[0.03] px-3 py-2 text-[12px] text-white/80",children:"Os desafios da educação digital no Brasil"})]}),u.jsxs("div",{className:"relative",children:[u.jsxs("div",{className:"flex justify-between items-center mb-1.5",children:[u.jsx("p",{className:"text-[9px] font-bold uppercase tracking-[0.22em] text-white/45",children:"Sua redação"}),u.jsx("span",{className:"text-[10px] tabular-nums text-white/45 font-medium",children:"312 palavras"})]}),u.jsx("div",{className:"rounded-lg border border-white/15 bg-white/[0.03] px-3 py-2.5 text-[11px] text-white/55 leading-relaxed font-serif italic",children:'"A democratização do acesso à internet escancarou um paradoxo: nunca tivemos tanta informação disponível, e ainda assim..."'})]}),u.jsxs("div",{className:"relative inline-flex items-center gap-1.5 rounded-lg px-3 py-1.5 text-[11px] font-bold text-white bg-[linear-gradient(135deg,hsl(258_90%_66%),hsl(258_100%_75%))] shadow-[0_0_18px_hsl(258_90%_66%/0.4)]",children:[u.jsx(Ta,{className:"w-3 h-3"}
466)," Enviar para correção"]})]}),u.jsxs("div",{children:[u.jsx("p",{className:"text-[9px] font-bold uppercase tracking-[0.22em] text-white/45 mb-2",children:"Suas redações"}),u.jsx("div",{className:"space-y-2",children:e.map((r,n)=>u.jsxs("div",{className:"rounded-xl border border-white/10 bg-white/[0.04] overflow-hidden",style:{animation:`fade-in 0.5s ease-out ${n*.1}s both`},children:[u.jsxs("div",{className:"flex items-center gap-3 p-3",children:[u.jsxs("div",{className:"flex-1 min-w-0",children:[u.jsx("p",{className:"font-display text-[12px] font-semibold text-white truncate",children:r.tema}),u.jsxs("p",{className:"text-[10px] text-white/45 font-medium mt-0.5",children:[r.data,"/2025"]})]}),u.jsxs("div",{className:"text-right",children:[u.jsx("p",{className:r.nota>=800?"font-display text-2xl font-bold tabular-nums bg-clip-text text-transparent bg-[linear-gradient(135deg,hsl(36_50%_60%),hsl(36_85%_80%))]":"font-display text-2xl font-bold tabular-nums bg-clip-text text-transparent bg-[linear-gradient(135deg,hsl(258_90%_75%),hsl(258_100%_82%))]",children:r.nota}),u.jsx("p",{className:"text-[9px] text-white/40 font-bold uppercase tracking-wider",children:"/1000"})]}),u.jsx(Ad,{className:r.open?"w-3.5 h-3.5 text-white/40 rotate-180 transition-transform":"w-3.5 h-3.5 text-white/40 transition-transform"})]}),r.open&&u.jsx("div",{className:"px-3 pb-3 pt-2 border-t border-white/10 bg-white/[0.02]",children:u.jsx("div",{className:"grid grid-cols-5 gap-1.5",children:t.map((a,i)=>{const o=i%2===1;return u.jsxs("div",{className:o?"rounded-lg border border-[hsl(36_45%_61%/0.3)] bg-[hsl(36_45%_61%/0.08)] p-1.5 text-center":"rounded-lg border border-[hsl(258_90%_66%/0.3)] bg-[hsl(258_90%_66%/0.08)] p-1.5 text-center",children:[u.jsx("p",{className:o?"text-[8px] font-bold uppercase tracking-wider text-[hsl(36_70%_70%)]":"text-[8px] font-bold uppercase tracking-wider text-[hsl(258_100%_82%)]",children:a.l}),u.jsx("p",{className:"font-display text-[12px] font-bold tabular-nums text-white mt-0.5",children:a.v})]},a.l)})})})]},n))})]})]}),u.jsx("div",{className:"absolute left-0 right-0 bottom-0 h-20 bg-gradient-to-t from-[hsl(240_22%_10%)] via-[hsl(240_22%_10%/0.7)] to-transparent pointer-events-none"})]})},Y9=()=>{const e=[{l:"A",t:"A intensificação da industrialização gerou melhoria imediata nas condições sanitárias urbanas."},{l:"B",t:"A formação dos cortiços e a precariedade do saneamento favoreceram a propagação de epidemias.",correct:!0},{l:"C",t:"Houve estagnação demográfica das cidades europeias durante o século XIX."},{l:"D",t:"A jornada de trabalho foi reduzida espontaneamente pelos industriais."},{l:"E",t:"O êxodo rural foi contido por políticas estatais de fixação no campo."}];return u.jsxs("div",{className:"relative p-5 sm:p-7 space-y-5 h-[680px] overflow-hidden",children:[u.jsx("div",{className:"absolute inset-0 pointer-events-none opacity-80",style:{background:"radial-gradient(ellipse 80% 60% at 50% 0%, hsl(258 90% 66% / 0.18) 0%, transparent 60%), radial-gradient(ellipse 70% 60% at 100% 100%, hsl(36 45% 61% / 0.14) 0%, transparent 60%)"}}),u.jsxs("div",{className:"relative space-y-5",children:[u.jsxs("div",{className:"space-y-2",children:[u.jsxs("div",{className:"flex items-center gap-2 text-[10px] font-semibold uppercase tracking-[0.22em] text-white/50",children:[u.jsx("span",{className:"inline-block w-7 h-px bg-gradient-to-r from-transparent via-[hsl(258_90%_75%)] to-transparent"}),"Treine como na prova real"]}),u.jsxs("h3",{className:"font-display text-2xl sm:text-3xl font-bold tracking-tight leading-[1.05] text-white",children:["Simulado"," ",u.jsx("span",{className:"bg-clip-text text-transparent bg-[linear-gradient(135deg,hsl(258_90%_75%)_0%,hsl(36_70%_75%)_100%)]",children:"ENEM"})]}),u.jsx("p",{className:"text-xs sm:text-sm text-white/55",children:"Escolha matéria, ano e dificuldade. Questões reais do banco do ENEM."})]}),u.jsxs("div",{className:"relative rounded-2xl border border-white/10 bg-white/[0.04] p-4 overflow-hidden",children:[u.jsx("div",{className:"absolute -top-10 -right-10 w-32 h-32 rounded-full bg-[hsl(258_90%_66%/0.22)] blur-2xl"}),u.jsx("div",{className:"relative grid grid-cols-2 gap-2.5",children:[{l:"Matéria",v:"Ciências Humanas"},{l:"Ano",v:"2022"},{l:"Quantidade",v:"10 questões"},{l:"Dificuldade",v:"Média"}].map(t=>u.jsxs("div",{className:"rounded-lg border border-white/10 bg-white/[0.03] px-3 py-2",children:[u.jsx("p",{className:"text-[8px] font-bold uppercase tracking-[0.2em] text-white/45",children:t.l}),u.jsxs("div",{className:"flex items-center justify-between mt-0.5",children:[u.jsx("p",{className:"text-[12px] font-semibold text-white truncate",children:t.v}),u.jsx(Ad,{className:"w-3 h-3 text-white/40 shrink-0 ml-1"})]})]},t.l))})]}),u.jsxs("div",{className:"relative rounded-2xl border border-white/10 bg-white/[0.04] p-4 overflow-hidden",children:[u.jsx("div",{className:"absolute -bottom-10 -left-10 w-32 h-32 rounded-full bg-[hsl(36_45%_61%/0.18)] blur-2xl"}),u.jsxs("div",{className:"relative mb-3",children:[u.jsxs("div",{className:"flex items-center justify-between mb-1.5 flex-wrap gap-1.5",children:[u.jsx("span",{className:"text-[9px] font-bold uppercase tracking-[0.22em] text-white/55",children:"Questão 4 de 10 · ENEM 2022"}),u.jsxs("span",{className:"inline-flex items-center gap-1 text-[9px] font-bold uppercase tracking-wider px-1.5 py-0.5 rounded border border-[hsl(36_45%_61%/0.4)] bg-[hsl(36_45%_61%/0.1)] text-[hsl(36_70%_70%)]",children:[u.jsx(Yo,{className:"w-2.5 h-2.5"})," Médio"]})]}),u.jsx("div",{className:"h-1 bg-white/[0.06] rounded-full overflow-hidden",children:u.jsx("div",{className:"h-full rounded-full bg-[linear-gradient(90deg,hsl(258_90%_66%),hsl(258_100%_75%))] shadow-[0_0_10px_hsl(258_90%_66%/0.5)]",style:{width:"40%"}})})]}),u.jsx("p",{className:"relative text-[11px] text-white/80 leading-relaxed mb-3",children:"Sobre os impactos sociais da Revolução Industrial nas cidades europeias do século XIX, é correto afirmar que:"}),u.jsx("div",{className:"relative space-y-1.5",children:e.map(t=>{const r=t.correct;return u.jsxs("div",{className:r?"flex items-start gap-2 rounded-lg border border-[hsl(258_90%_66%/0.5)] bg-[hsl(258_90%_66%/0.1)] px-2.5 py-1.5 
466shadow-[0_0_12px_hsl(258_90%_66%/0.25)]":"flex items-start gap-2 rounded-lg border border-white/10 bg-white/[0.02] px-2.5 py-1.5",children:[u.jsx("span",{className:r?"w-5 h-5 rounded grid place-items-center text-[10px] font-bold bg-[linear-gradient(135deg,hsl(258_90%_66%),hsl(258_100%_75%))] text-white shrink-0":"w-5 h-5 rounded grid place-items-center text-[10px] font-bold border border-white/15 text-white/55 shrink-0",children:t.l}),u.jsx("span",{className:"text-[10.5px] text-white/75 leading-snug",children:t.t})]},t.l)})}),u.jsxs("div",{className:"relative flex items-center justify-between mt-3",children:[u.jsxs("div",{className:"text-[10px] font-semibold text-white/40 inline-flex items-center gap-1",children:[u.jsx(Cm,{className:"w-3 h-3"})," Anterior"]}),u.jsxs("div",{className:"inline-flex items-center gap-1 rounded-md px-2.5 py-1 text-[10px] font-bold text-white bg-[linear-gradient(135deg,hsl(258_90%_66%),hsl(258_100%_75%))] shadow-[0_0_12px_hsl(258_90%_66%/0.4)]",children:["Próxima ",u.jsx(Tm,{className:"w-3 h-3"})]})]})]})]}),u.jsx("div",{className:"absolute left-0 right-0 bottom-0 h-20 bg-gradient-to-t from-[hsl(240_22%_10%)] via-[hsl(240_22%_10%/0.7)] to-transparent pointer-events-none"})]})},X9=()=>{const e=[1,0,4,6,3,0,8,5,2,7,9,4,0,3,6,10,8,5,0,6,11,7,4,9,12,8,6,14,9,11],t=[{icon:qh,l:"Hoje",v:"11",sub:"meta: 10 · 100%",gold:!1,bar:100},{icon:Td,l:"Semana",v:"62",sub:"média 9/dia",gold:!0},{icon:K2,l:"Mês",v:"243",sub:"total 1.284",gold:!1},{icon:Yo,l:"Sequência",v:"12d",sub:"Continue assim 🔥",gold:!0}],r=[{label:"Linguagens",pct:32,color:"hsl(258 90% 66%)"},{label:"Humanas",pct:28,color:"hsl(36 70% 65%)"},{label:"Natureza",pct:22,color:"hsl(174 65% 55%)"},{label:"Matemática",pct:18,color:"hsl(340 80% 65%)"}];let n=0;const a=r.map(i=>{const o=n;return n+=i.pct,`${i.color} ${o}% ${n}%`}).join(", ");return u.jsxs("div",{className:"relative p-5 sm:p-7 space-y-5 h-[680px] overflow-hidden",children:[u.jsx("div",{className:"absolute inset-0 pointer-events-none opacity-80",style:{background:"radial-gradient(ellipse 80% 60% at 0% 0%, hsl(36 45% 61% / 0.18) 0%, transparent 60%), radial-gradient(ellipse 80% 60% at 100% 100%, hsl(258 90% 66% / 0.18) 0%, transparent 60%)"}}),u.jsxs("div",{className:"relative space-y-5",children:[u.jsxs("div",{className:"space-y-2",children:[u.jsxs("div",{className:"flex items-center gap-2 text-[10px] font-semibold uppercase tracking-[0.22em] text-white/50",children:[u.jsx("span",{className:"inline-block w-7 h-px bg-gradient-to-r from-transparent via-[hsl(36_70%_70%)] to-transparent"}),"Sua performance"]}),u.jsxs("h3",{className:"font-display text-2xl sm:text-3xl font-bold tracking-tight leading-[1.05] text-white",children:["Suas"," ",u.jsx("span",{className:"bg-clip-text text-transparent bg-[linear-gradient(135deg,hsl(258_90%_75%)_0%,hsl(36_70%_75%)_100%)]",children:"estatísticas"})]}),u.jsx("p",{className:"text-xs sm:text-sm text-white/55",children:"Acompanhe quantos exercícios você resolveu nos simulados ENEM. Métricas que importam."})]}),u.jsx("div",{className:"grid grid-cols-2 gap-2.5",children:t.map(i=>{const o=i.icon;return u.jsxs("div",{className:"relative rounded-xl border border-white/10 bg-white/[0.04] p-3 overflow-hidden",children:[u.jsx("div",{className:i.gold?"absolute -top-6 -right-6 w-20 h-20 rounded-full bg-[hsl(36_45%_61%/0.22)] blur-xl":"absolute -top-6 -right-6 w-20 h-20 rounded-full bg-[hsl(258_90%_66%/0.22)] blur-xl"}),u.jsxs("div",{className:"relative flex items-center gap-2 mb-2",children:[u.jsx("div",{className:i.gold?"w-7 h-7 rounded-md grid place-items-center border border-[hsl(36_45%_61%/0.4)] bg-[hsl(36_45%_61%/0.12)] text-[hsl(36_70%_70%)]":"w-7 h-7 rounded-md grid place-items-center border border-[hsl(258_90%_66%/0.4)] bg-[hsl(258_90%_66%/0.12)] text-[hsl(258_100%_82%)]",children:u.jsx(o,{className:"w-3.5 h-3.5"})}),u.jsx("span",{className:"text-[9px] font-bold uppercase tracking-wider text-white/50",children:i.l})]}),u.jsx("p",{className:i.gold?"relative font-display text-3xl font-bold tabular-nums bg-clip-text text-transparent bg-[linear-gradient(135deg,hsl(36_50%_60%),hsl(36_85%_80%))]":"relative font-display text-3xl font-bold tabular-nums bg-clip-text text-transparent bg-[linear-gradient(135deg,hsl(258_90%_75%),hsl(258_100%_82%)
466)]",children:i.v}),u.jsx("p",{className:"relative text-[10px] text-white/45 mt-0.5",children:i.sub}),i.bar!==void 0&&u.jsx("div",{className:"relative h-1 bg-white/[0.06] rounded-full mt-2 overflow-hidden",children:u.jsx("div",{className:"h-full rounded-full bg-[linear-gradient(90deg,hsl(258_90%_66%),hsl(258_100%_75%))] shadow-[0_0_8px_hsl(258_90%_66%/0.5)]",style:{width:`${i.bar}%`}})})]},i.l)})}),u.jsxs("div",{className:"relative rounded-2xl border border-white/10 bg-white/[0.04] p-4 overflow-hidden",children:[u.jsx("div",{className:"absolute -bottom-10 -right-10 w-32 h-32 rounded-full bg-[hsl(258_90%_66%/0.2)] blur-2xl"}),u.jsxs("div",{className:"relative flex items-center justify-between mb-3",children:[u.jsxs("p",{className:"font-display text-xs font-bold text-white",children:["Exercícios por dia",u.jsx("span",{className:"text-white/40 font-medium",children:" · últimos 30 dias"})]}),u.jsx("span",{className:"text-[10px] font-extrabold text-[hsl(36_70%_70%)]",children:"+18%"})]}),u.jsx("div",{className:"relative flex items-end gap-[3px] h-20",children:e.map((i,o)=>{const l=i/14*100;return u.jsx("div",{className:"flex-1 rounded-t-sm bg-[linear-gradient(180deg,hsl(258_100%_75%),hsl(258_90%_66%/0.5))] shadow-[0_0_4px_hsl(258_90%_66%/0.3)]",style:{height:`${Math.max(l,4)}%`,animation:`grow-bar 1.6s ease-out ${o*.025}s both`}},o)})})]}),u.jsxs("div",{className:"relative rounded-2xl border border-white/10 bg-white/[0.04] p-4 overflow-hidden",children:[u.jsx("p",{className:"relative font-display text-xs font-bold text-white mb-3",children:"Distribuição por matéria"}),u.jsxs("div",{className:"relative flex items-center gap-4",children:[u.jsx("div",{className:"w-20 h-20 rounded-full shrink-0 grid place-items-center",style:{background:`conic-gradient(${a})`,animation:"fade-in 0.6s ease-out both"},children:u.jsx("div",{className:"w-11 h-11 rounded-full bg-[hsl(240_22%_10%)] grid place-items-center",children:u.jsx("span",{className:"font-display text-[10px] font-bold text-white tabular-nums",children:"100%"})})}),u.jsx("div",{className:"flex-1 grid grid-cols-2 gap-x-3 gap-y-1.5",children:r.map(i=>u.jsxs("div",{className:"flex items-center gap-1.5 min-w-0",children:[u.jsx("span",{className:"w-2 h-2 rounded-sm shrink-0",style:{background:i.color}}),u.jsx("span",{className:"text-[10px] text-white/65 truncate",children:i.label}),u.jsxs("span",{className:"text-[10px] tabular-nums font-bold text-white/85 ml-auto",children:[i.pct,"%"]})]},i.label))})]})]})]}),u.jsx("div",{className:"absolute left-0 right-0 bottom-0 h-20 bg-gradient-to-t from-[hsl(240_22%_10%)] via-[hsl(240_22%_10%/0.7)] to-transparent pointer-events-none"})]})},kc=[{id:"home",label:"Início",url:"app.acerteinotema.com/aluno",Component:K9},{id:"redacao",label:"Redação",url:"app.acerteinotema.com/aluno/redacao",Component:G9},{id:"simulado",label:"Simulado",url:"app.acerteinotema.com/aluno/simulado",Component:Y9},{id:"stats",label:"Estatísticas",url:"app.acerteinotema.com/aluno/estatisticas",Component:X9}],J9=()=>{const[e,t]=w.useState(0),[r,n]=w.useState(!1);w.useEffect(()=>{if(r)return;const o=setInterval(()=>t(s=>(s+1)%kc.length),5e3);return()=>clearInterval(o)},[r]);const a=o=>t((o+kc.length)%kc.length),i=kc[e];return u.jsxs("div",{className:"relative w-full",onMouseEnter:()=>n(!0),onMouseLeave:()=>n(!1),children:[u.jsx("div",{className:"absolute -inset-8 bg-gradient-to-br from-electric/30 via-purple/20 to-gold/25 rounded-[2.5rem] blur-3xl opacity-60"}),u.jsxs("div",{className:"relative rounded-[1.75rem] border border-white/15 bg-[hsl(240_22%_10%)] shadow-elegant overflow-hidden",children:[u.jsxs("div",{className:"flex items-center gap-1.5 px-4 py-3 border-b border-white/10 bg-white/[0.03]",children:[u.jsx("span",{className:"w-2.5 h-2.5 rounded-full bg-coral/80"}),u.jsx("span",{className:"w-2.5 h-2.5 rounded-full bg-amber/80"}),u.jsx("span",{className:"w-2.5 h-2.5 rounded-full bg-teal/80"}),u.jsxs("div",{className:"flex-1 mx-3 px-3 py-1 rounded-md bg-white/5 text-[10px] text-white/50 font-mono truncate",children:["🔒 ",i.url]})]}),u.jsx("div",{className:"animate-fade-in",children:u.jsx(i.Component,{})},i.id),u.jsx("button",{onClick:()=>a(e-1),"aria-label":"Anterior",className:"absolute left-3 top-1/2 -translate-y-1/2 z-20 w-9 h-9 rounded-full grid place-items-center bg-black/50 backdrop-blur border border-white/15 text-white/80 hover:text-white hover:bg-black/70 transition-all",children:u.jsx(Cm,{className:"w-5 h-5"})}),u.jsx("button",{onClick:()=>a(e+1),"aria-label":"Próximo",className:"absolute right-3 top-1/2 -translate-y-1/2 z-20 w-9 h-9 rounded-full grid place-items-center bg-black/50 backdrop-blur border border-white/15 text-white/80 hover:text-white hover:bg-black/70 transition-all",children:u.jsx(Tm,{className:"w-5 h-5"})})]}),u.jsx("div",{className:"relative mt-5 flex items-center justify-center gap-2 flex-wrap",children:kc.map((o,s)=>{const l=s===e;return u.jsx("button",{onClick:()=>a(s),className:l?"px-3 py-1.5 rounded-full text-[11px] font-bold uppercase tracking-wider bg-gradient-to-r from-purple to-amber text-white shadow-[0_0_18px_hsl(258_90%_66%/0.4)] transition-all":"px-3 py-1.5 rounded-full text-[11px] font-bold uppercase tracking-wider bg-white/5 text-white/50 border border-white/10 hover:text-white/80 hover:bg-white/10 transition-all",children:o.label},o.id)})}),u.jsxs("div",{className:"hidden sm:flex absolute -top-4 -right-4 items-center gap-2 bg-card text-foreground rounded-2xl px-3.5 py-2.5 shadow-card border border-border animate-float z-10",children:[u.jsx("div",{className:"w-9 h-9 rounded-xl bg-gradient-to-br from-purple to-coral grid place-items-center shrink-0",children:u.jsx(Ta,{className:"w-4 h-4 text-white"})}),u.jsxs("div",{children:[u.jsx("div",{className:"text-[9px] uppercase tracking-widest text-muted-foreground font-bold",children:"Última redação"}),u.jsxs("div",{className:"font-display text-base font-extrabold text-coral leading-none",children:["980",u.jsx("span",{className:"text-xs text-muted-foreground",children:"/1000"})]})]})]}),u.jsxs("div",{className:"hidden sm:flex absolute -bottom-5 -left-5 items-center gap-2 bg-card text-foreground rounded-2xl px-3.5 py-2.5 shadow-card border border-border animate-float [animation-delay:1.2s] z-10",children:[u.jsx("div",{className:"w-9 h-9 rounded-xl bg-gradient-to-br from-teal to-blue grid place-items-center shrink-0",children:u.jsx(F2,{className:"w-4 h-4 text-white"})}),u.jsxs("div",{children:[u.jsx("div",{className:"text-[9px] uppercase tracking-widest text-muted-foreground font-bold",children:"Meta SISU"}),u.jsx("div",{className:"font-display text-sm font-extrabold text-teal-dark leading-none",children:"Medicina UFMG"})]})]}),u.jsx("style",{children:"@keyframes grow-bar { from { width: 0%; } }"})]})},Q9=()=>u.jsxs("section",{id:"oferta",className:"relative overflow-hidden py-24 md:py-28 bg-gradient-dark",children:[u.jsx("div",{className:"absolute -top-32 -right-32 w-[500px] h-[500px] rounded-full bg-[radial-gradient(circle,hsl(var(--purple)/0.3)_0%,transparent_70%)]"}),u.jsx("div",{className:"absolute -bottom-24 -left-24 w-[400px] h-[400px] rounded-full bg-[radial-gradient(circle,hsl(var(--coral)/0.2)_0%,transparent_70%)]"}),u.jsxs("div",{className:"container-x relative z-10",children:[u.jsxs("div",{className:"text-center mb-14",children:[u.jsx("div",{className:"inline-block text-xs font-bold uppercase tracking-widest px-3.5 py-1.5 rounded-full mb-3 bg-white/10 text-amber",children:"⭐ Acesso Premium · Mensalidade"}),u.jsxs("h2",{className:"font-display font-extrabold text-[clamp(28px,5vw,44px)] leading-tight mb-3.5 text-white",children:["Tudo o que você precisa",u.jsx("br",{}),"em uma só plataforma"]}),u.jsx("p",{className:"text-[17px] text-white/65 max-w-xl mx-auto leading-relaxed",children:"Material denso, simulados, redação corrigida e uma rotina que realmente funciona — por menos do que um lanche por mês."})]}),u.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-10 lg:gap-12 items-center max-w-6xl mx-auto",children:[u.jsxs("div",{className:"relative overflow-hidden rounded-3xl p-8 sm:p-10 border-2 border-amber bg-gradient-to-br from-amber/15 via-white/5 to-purple/10 shadow-elegant",children:[u.jsx("div",{className:"absolute -top-px right-6 bg-amber text-dark text-[11px] font-extrabold uppercase tracking-wider px-3.5 py-1 rounded-b-xl",children:"🔥 Mais escolhido"}),u.jsxs("div",{className:"flex items-center gap-3 mb-5",children:[u.jsx("div",{className:"grid place-items-center w-14 h-14 roun
466ded-2xl bg-gradient-to-br from-amber to-coral shadow-lg",children:u.jsx(gl,{className:"w-7 h-7 text-white"})}),u.jsxs("div",{children:[u.jsx("h3",{className:"font-display text-2xl font-extrabold text-white leading-tight",children:"Acesso Completo"}),u.jsx("p",{className:"text-xs text-white/60 font-bold uppercase tracking-widest",children:"Plano mensal"})]})]}),u.jsx("p",{className:"text-sm text-white/70 leading-relaxed mb-6",children:"Liberação total da plataforma, atualizações constantes e suporte. Sem fidelidade — cancele quando quiser."}),u.jsx("ul",{className:"flex flex-col gap-2.5 mb-7",children:V9.map(e=>u.jsxs("li",{className:"flex gap-2.5 text-sm text-white/90",children:[u.jsx("span",{className:"grid place-items-center w-5 h-5 rounded-full bg-teal/20 text-teal flex-shrink-0 mt-0.5",children:u.jsx(Pm,{className:"w-3 h-3",strokeWidth:3})}),e]},e))}),u.jsxs("div",{className:"flex items-baseline gap-2 mb-2",children:[u.jsx("span",{className:"text-sm text-white/40 line-through",children:"R$ 97"}),u.jsx("span",{className:"font-display text-5xl font-extrabold text-white",children:"R$ 47"}),u.jsx("span",{className:"text-base text-white/60 font-bold",children:"/mês"})]}),u.jsx("div",{className:"text-xs text-amber font-bold mb-6",children:"Menos de R$ 1,57 por dia"}),u.jsx("a",{href:"https://pay.kirvano.com/910e345c-958d-451c-ad45-cb24072b78b9",target:"_blank",rel:"noopener noreferrer",className:"block text-center rounded-2xl py-4 font-extrabold text-base bg-gradient-amber text-dark transition-all hover:-translate-y-0.5 hover:opacity-95 shadow-lg",children:"Quero meu acesso agora 🚀"}),u.jsx("p",{className:"text-center text-xs text-white/45 mt-3",children:"Pagamento seguro · Cancele quando quiser"})]}),u.jsxs("div",{className:"relative",children:[u.jsxs("div",{className:"text-center lg:text-left mb-5",children:[u.jsx("div",{className:"inline-block text-[11px] font-bold uppercase tracking-widest px-3 py-1 rounded-full bg-purple/20 text-purple-light mb-2",children:"👀 Vej
466a por dentro"}),u.jsx("p",{className:"text-sm text-white/70",children:"Um gostinho das áreas que você terá acesso:"})]}),u.jsx(J9,{})]})]})]})]}),Z9=[{text:"Eu já tinha tentado o ENEM duas vezes e não passava de 600 pontos. Com o método Pomodoro e o Active Recall, cheguei a 820 em 4 meses. Entrei em Medicina!",initials:"JF",avatarCls:"bg-purple-light text-purple",name:"João Felipe, 21",meta:"Fortaleza, CE",result:"✓ Aprovado em Medicina — UFC"},{text:"Minha redação estava uma bagunça. Sem conectivos, sem repertório. Depois do curso, tirei 960 na redação. Minha maior nota do ENEM!",initials:"MA",avatarCls:"bg-coral-light text-coral",name:"Marina Alves, 19",meta:"São Paulo, SP",result:"✓ Bolsa integral via ProUni — Direito"},{text:"Eu tinha muita ansiedade antes das provas. As técnicas de respiração e o journaling mudaram meu desempenho. Fui com calma e clareza na prova.",initials:"RS",avatarCls:"bg-teal-light text-teal-dark",name:"Rafaela Souza, 22",meta:"Belo Horizonte, MG",result:"✓ Aprovada em Psicologia — UFMG"},{text:"Trabalhava o dia todo e estudava à noite. Com o planner e os blocos de 45 min, consegui manter consistência. Em 6 meses passei no vestibular.",initials:"LM",avatarCls:"bg-amber-light text-amber-dark",name:"Lucas Melo, 24",meta:"Recife, PE",result:"✓ Aprovado em Engenharia Civil — UFPE"}],eH=()=>u.jsx("section",{className:"py-20 md:py-24",children:u.jsxs("div",{className:"container-x",children:[u.jsx(e1,{tag:"💬 Depoimentos Reais",tagClass:"bg-amber-light text-amber-dark",title:u.jsxs(u.Fragment,{children:["Quem aplicou",u.jsx("br",{}),"e passou"]}),sub:"Estudantes reais, resultados reais. Sem marketing, sem foto comprada."}),u.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-
4665",children:Z9.map(e=>u.jsxs("div",{className:"bg-card rounded-3xl p-6 border-[1.5px] border-border transition-all hover:-translate-y-1 hover:shadow-card",children:[u.jsx("div",{className:"text-amber text-[15px] mb-2.5",children:"★★★★★"}),u.jsxs("p",{className:"text-sm leading-relaxed text-muted-foreground italic mb-4",children:[u.jsx("span",{className:"text-purple not-italic font-display text-3xl leading-none align-bottom mr-0.5",children:'"'}),e.text]}),u.jsxs("div",{className:"flex items-center gap-2.5",children:[u.jsx("div",{className:`w-10 h-10 rounded-full flex items-center justify-center font-extrabold text-[15px] ${e.avatarCls}`,children:e.initials}),u.jsxs("div",{children:[u.jsx("div",{className:"font-bold text-sm",children:e.name}),u.jsx("div",{className:"text-xs text-muted-foreground",children:e.meta}),u.jsx("div",{className:"text-[11px] font-bold uppercase tracking-wider text-teal-dark",children:e.result})]})]})]},e.name))})]})}),tH=()=>u.jsx("section",{className:"py-24 text-center bg-gradient-mix",children:u.jsxs("div",{className:"container-x",children:[u.jsxs("h2",{className:"font-display font-extrabold text-[clamp(28px,5vw,48px)] text-white mb-4 leading-tight",children:["Sua aprovação começa",u.jsx("br",{}),"com uma decisão"]}),u.jsx("p",{className:"text-[17px] text-white/80 mb-9 max-w-xl mx-auto",children:"Cada dia sem método certo é um dia perdido. Você já tem o que precisa — agora é só aplicar."}),u.jsx("a",{href:"#oferta",className:"inline-block bg-white text-purple rounded-full px-10 py-4 font-extrabold text-[17px] transition-all hover:-translate-y-1 hover:shadow-elegant",children:"Começar agora — vale cada centavo 🎯"}),u.jsx("div",{className:"text-[13px] text-white/60 mt-3.5",children:"✓ Acesso imediato  ·  ✓ Garantia de 7 dias  ·  ✓ Pagamento seguro"})]})}),rH=()=>u.jsx("footer",{className:"bg-dark py-10 text-center",children:u.jsxs("div",{className:"container-x",children:[u.jsxs("div",{className:"font-display text-lg font-extrabold text-white mb-2.5",children:["Acertei ",u.jsx("span",{className:"text-coral",children:"no Tema"})]}),u.jsx("p",{className:"text-[13px] text-white/35",children:"Feito por quem já esteve do outro lado da prova. Para quem vai passar. 💜"}),u.jsx("p",{className:"text-[13px] text-white/35 mt-3",children:"© 2025 Acertei no Tema. Todos os direitos reservados."})]})}),nH=()=>u.jsxs("main",{className:"min-h-screen",children:[u.jsx(A9,{}),u.jsx(M9,{}),u.jsx(R9,{}),u.jsx(L9,{}),u.jsx(U9,{}),u.jsx(q9,{}),u.jsx(Q9,{}),u.jsx(eH,{}),u.jsx(tH,{}),u.jsx(rH,{})]}),aH=()=>{const e=oa();return w.useEffect(()=>{console.error("404 Error: User attempted to access non-existent route:",e.pathname)},[e.pathname]),u.jsx("div",{className:"flex min-h-screen items-center justify-center bg-muted",children:u.jsxs("div",{className:"text-center",children:[u.jsx("h1",{className:"mb-4 text-4xl font-bold",children:"404"}),u.jsx("p",{className:"mb-4 text-xl text-muted-foreground",children:"Oops! Page not found"}),u.jsx("a",{href:"/",className:"text-primary underline hover:text-primary/90",children:"Return to Home"})]})})},gt=w.forwardRef(({className:e,type:t,...r},n)=>u.jsx("input",{type:t,className:q("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:n,...r}));gt.displayName="Input";var iH="Label",oM=w.forwardRef((e,t)=>u.jsx(ge.label,{...e,ref:t,onMouseDown:r=>{var a;r.target.closest("button, input, select, textarea")||((a=e.onMouseDown)==null||a.call(e,r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));oM.displayName=iH;var sM=oM;const oH=Om("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Me=w.forwardRef(({className:e,...t},r)=>u.jsx(sM,{ref:r,className:q(oH(),e),...t}));Me.displayName=sM.displayName;const Yr=w.forwardRef(({className:e,...t},r)=>u.jsx("div",{ref:r,className:q("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));
466Yr.displayName="Card";const sH=w.forwardRef(({className:e,...t},r)=>u.jsx("div",{ref:r,className:q("flex flex-col space-y-1.5 p-6",e),...t}));sH.displayName="CardHeader";const lH=w.forwardRef(({className:e,...t},r)=>u.jsx("h3",{ref:r,className:q("text-2xl font-semibold leading-none tracking-tight",e),...t}));lH.displayName="CardTitle";const cH=w.forwardRef(({className:e,...t},r)=>u.jsx("p",{ref:r,className:q("text-sm text-muted-foreground",e),...t}));cH.displayName="CardDescription";const uH=w.forwardRef(({className:e,...t},r)=>u.jsx("div",{ref:r,className:q("p-6 pt-0",e),...t}));uH.displayName="CardContent";const dH=w.forwardRef(({className:e,...t},r)=>u.jsx("div",{ref:r,className:q("flex items-center p-6 pt-0",e),...t}));dH.displayName="CardFooter";const fH=()=>{const[e,t]=w.useState(""),[r,n]=w.useState(!1),[a,i]=w.useState(!1),o=Ba(),{user:s,loading:l}=Pt();w.useEffect(()=>{!l&&s&&o("/aluno",{replace:!0})},[s,l,o]);const c=async d=>{if(d.preventDefault(),!e)return;n(!0);const f=`${window.location.origin}/aluno`,{error:h}=await ae.auth.signInWithOtp({email:e,options:{emailRedirectTo:f}});if(n(!1),h){ve.error("Erro ao enviar link",{description:h.message});return}i(!0),ve.success("Link enviado!",{description:"Verifique seu email para acessar o conteúdo."})};return u.jsxs("div",{className:"min-h-screen bg-background flex flex-col",children:[u.jsx("header",{className:"container mx-auto py-6",children:u.jsxs(Nr,{to:"/",className:"inline-flex items-center gap-2 text-sm text-muted-foreground hover:text-foreground transition-colors",children:[u.jsx(Nm,{className:"w-4 h-4"})," Voltar para o site"]})}),u.jsx("main",{className:"flex-1 flex items-center justify-center px-4 py-12",children:u.jsxs(Yr,{className:"w-full max-w-md p-8 space-y-6",children:[u.jsxs("div",{className:"text-center space-y-2",children:[u.jsx("div",{className:"w-12 h-12 rounded-full bg-primary/10 flex items-center justify-center mx-auto",children:u.jsx(Wh,{className:"w-6 h-6 text-primary"})}),u.jsx("h1",{className:"text-2xl font-bold",children:"Acesso do aluno"}),u.jsx("p",{className:"text-sm text-muted-foreground",children:"Use o email da sua compra. Enviaremos um link mágico para entrar — sem senha."})]}),a?u.jsxs("div",{className:"text-center space-y-3 py-4",children:[u.jsx("p",{className:"font-medium",children:"Verifique seu email 📬"}),u.jsxs("p",{className:"text-sm text-muted-foreground",children:["Enviamos um link para ",u.jsx("strong",{children:e}),". Pode demorar 1-2 minutos."]}),u.jsx(se,{variant:"ghost",onClick:()=>i(!1),children:"Usar outro email"})]}):u.jsxs("form",{onSubmit:c,className:"space-y-4",children:[u.jsxs("div",{className:"space-y-2",children:[u.jsx(Me,{htmlFor:"email",children:"Email"}),u.jsx(gt,{id:"email",type:"email",required:!0,placeholder:"[email protected]",value:e,onChange:d=>t(d.target.value)})]}),u.jsxs(se,{type:"submit",className:"w-full",disabled:r,children:[r&&u.jsx(Qe,{className:"w-4 h-4 mr-2 animate-spin"}),"Enviar link de acesso"]}),u.jsxs("p",{className:"text-xs text-muted-foreground text-center",children:["Ainda não comprou?"," ",u.jsx(Nr,{to:"/#oferta",className:"text-primary hover:underline",children:"Ver ofertas"})]})]})]})})]})};function lM(){const{user:e,loading:t}=Pt(),[r,n]=w.useState(null),[a,i]=w.useState(!0);return w.useEffect(()=>{if(t)return;if(!e){n(!1),i(!1);return}let o=!1;return(async()=>{const{data:s,error:l}=await ae.from("user_roles").select("role").eq("user_id",e.id).eq("role","admin").maybeSingle();o||(n(!l&&!!s),i(!1))})(),()=>{o=!0}},[e,t]),{isAdmin:!!r,loading:a||t}}const fk=[{to:"/aluno",label:"Início",icon:qB,end:!0,accent:"electric"},{to:"/aluno/ebooks",label:"Ebooks",icon:Go,accent:"gold"},{to:"/aluno/simulado",label:"Simulado",icon:Aw,accent:"electric"},{to:"/aluno/estatisticas",label:"Estatísticas",icon:R2,accent:"gold"},{to:"/aluno/redacao",label:"Redação",icon:Mw,accent:"electric"},{to:"/aluno/extras",label:"Materiais extras",icon:Am,accent:"gold"},{to:"/aluno/metodos",label:"Métodos",icon:Iw,accent:"electric"},{to:"/aluno/planner",label:"Planner",icon:FB,accent:"electric"},{to:"/aluno/calendario",label:"Calendário",icon:Td,accent:"gold"},{to:"/aluno/config",label:"Configurações",icon:XB,accent:"electric"}],cr=({children:e})=>{const{user:t,loading:r,signOut:n}=Pt(),{isAdmin:a}=lM(),{theme:i,toggleTheme:o}=rM(),s=oa(),l=Ba();if(r)return u.jsx("div",{className:"min-h-screen flex items-center justify-center bg-premium-radial",children:u.jsx(Qe,{className:"w-6 h-6 animate-spin text-electric"})});if(!t)return u.jsx(y0,{to:"/login",replace:!0});const c=(d,f)=>f?s.pathname===d:s.pathname.startsWith(d);return u.jsxs("div",{className:"min-h-screen bg-background flex flex-col md:flex-row",children:[u.jsxs("aside",{className:"hidden md:flex w-64 border-r border-border/40 flex-col shrink-0 relative bg-card/80",children:[u.jsxs("div",{className:"relative p-6 border-b border-border/40 flex items-center gap-2.5",children:[u.jsxs("div",{className:"relative",children:[u.jsx("div",{className:"absolute inset-0 rounded-lg bg-gradient-to-br from-electric to-gold blur-md opacity-60"}),u.jsx("div",{className:"relative w-9 h-9 rounded-lg bg-gradient-to-br from-electric to-gold flex items-center justify-center",children:u.jsx(gl,{className:"w-4 h-4 text-white"})})]}),u.jsxs("div",{children:[u.jsx("span",{className:"block font-display font-bold text-base tracking-tight",children:"Minha Área"}),u.jsx("span",{className:"block text-[10px] uppercase tracking-[0.2em] text-muted-foreground font-semibold",children:"Premium"})]})]}),u.jsx("nav",{className:"relative flex-1 p-3 space-y-1 overflow-y-auto",children:fk.map(d=>{const f=d.icon,h=c(d.to,d.end),p=d.accent==="gold";return u.jsxs(Nr,{to:d.to,className:q("group relative flex items-center gap-3 px-3 py-2.5 rounded-xl text-sm transition-all",h?q("font-semibold",p?"bg-gold/10 text-gold border border-gold/30":"bg-electric/10 text-electric border border-electric/30"):"text-muted-foreground hover:bg-muted/40 hover:text-foreground border border-transparent"),children:[h&&u.jsx("span",{"aria-hidden":!0,
466className:q("absolute left-0 top-1/2 -translate-y-1/2 w-1 h-6 rounded-r-full",p?"bg-gold shadow-gold-glow":"bg-electric shadow-electric-glow")}),u.jsx(f,{className:q("w-4 h-4 transition-all",h&&(p?"drop-shadow-[0_0_6px_hsl(var(--gold-glow))]":"drop-shadow-[0_0_6px_hsl(var(--electric-glow))]"))}),d.label]},d.to)})}),u.jsxs("div",{className:"relative p-3 border-t border-border/40 space-y-2",children:[u.jsx("p",{className:"text-[11px] text-muted-foreground px-2 truncate font-medium",children:t.email}),a&&u.jsxs(se,{variant:"ghost",size:"sm",className:"w-full justify-start hover:bg-electric/10 hover:text-electric",onClick:()=>l("/admin"),children:[u.jsx(wj,{className:"w-4 h-4 mr-2"})," Admin"]}),u.jsx(se,{variant:"ghost",size:"sm",className:"w-full justify-start hover:bg-gold/10 hover:text-gold",onClick:o,children:i==="dark"?u.jsxs(u.Fragment,{children:[u.jsx(N0,{className:"w-4 h-4 mr-2"})," Tema claro"]}):u.jsxs(u.Fragment,{children:[u.jsx(Hh,{className:"w-4 h-4 mr-2"})," Tema escuro"]})}),u.jsxs(se,{variant:"ghost",size:"sm",className:"w-full justify-start hover:bg-destructive/10 hover:text-destructive",onClick:n,children:[u.jsx(O0,{className:"w-4 h-4 mr-2"})," Sair"]})]})]}),u.jsxs("header",{className:"md:hidden sticky top-0 z-30 border-b border-border/40 bg-card/90",children:[u.jsxs("div",{className:"px-4 py-3 flex items-center justify-between",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsxs("div",{className:"relative",children:[u.jsx("div",{className:"absolute inset-0 rounded-md bg-gradient-to-br from-electric to-gold blur-sm opacity-60"}),u.jsx("div",{className:"relative w-7 h-7 rounded-md bg-gradient-to-br from-electric to-gold flex items-center justify-center",children:u.jsx(gl,{className:"w-3.5 h-3.5 text-white"})})]}),u.jsx("span",{className:"font-display font-bold text-[15px] tracking-tight",children:"Minha Área"})]}),u.jsxs("div",{className:"flex items-center gap-1",children:[u.jsx(se,{size:"icon",variant:"ghost",onClick:o,"aria-label":"Tema",children:i==="dark"?u.jsx(N0,{className:"w-4 h-4"}):u.jsx(Hh,{className:"w-4 h-4"})}),a&&u.jsx(se,{size:"icon",variant:"ghost",onClick:()=>l("/admin"),"aria-label":"Admin",children:u.jsx(wj,{className:"w-4 h-4"})}),u.jsx(se,{size:"icon",variant:"ghost",onClick:n,"aria-label":"Sair",children:u.jsx(O0,{className:"w-4 h-4"})})]})]}),u.jsx("nav",{className:"flex overflow-x-auto border-t border-border/40 no-scrollbar",children:fk.map(d=>{const f=d.icon,h=c(d.to,d.end),p=d.accent==="gold";return u.jsxs(Nr,{to:d.to,className:q("shrink-0 min-w-[80px] flex flex-col items-center justify-center gap-1 py-2.5 px-2 text-[11px] font-semibold border-b-2 transition-colors",h?p?"border-gold text-gold":"border-electric text-electric":"border-transparent text-muted-foreground"),children:[u.jsx(f,{className:"w-4 h-4"}),d.label]},d.to)})})]}),u.jsx("main",{className:"flex-1 min-w-0 overflow-auto",children:e})]})},hH=Om("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function Bu({className:e,variant:t,...r}){return u.jsx("div",{className:q(hH({variant:t}),e),...r})}function tp(e,[t,r]){return Math.min(r,Math.max(t,e))}var pH=w.createContext(void 0);function cM(e){const t=w.useContext(pH);return e||t||"ltr"}var Av=0;function t1(){w.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??hk()),document.body.insertAdjacentElement("beforeend",e[1]??hk()),Av++,()=>{Av===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Av--}},[])}function hk(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.
vendor: 6,342 bytes, line 466
466style.position="fixed",e.style.pointerEvents="none",e}var Mv="focusScope.autoFocusOnMount",$v="focusScope.autoFocusOnUnmount",pk={bubbles:!1,cancelable:!0},mH="FocusScope",Wm=w.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:a,onUnmountAutoFocus:i,...o}=e,[s,l]=w.useState(null),c=kn(a),d=kn(i),f=w.useRef(null),h=Se(t,m=>l(m)),p=w.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;w.useEffect(()=>{if(n){let m=function(y){if(p.paused||!s)return;const S=y.target;s.contains(S)?f.current=S:ei(f.current,{select:!0})},v=function(y){if(p.paused||!s)return;const S=y.relatedTarget;S!==null&&(s.contains(S)||ei(f.current,{select:!0}))},x=function(y){if(document.activeElement===document.body)for(const _ of y)_.removedNodes.length>0&&ei(s)};document.addEventListener("focusin",m),document.addEventListener("focusout",v);const b=new MutationObserver(x);return s&&b.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",v),b.disconnect()}}},[n,s,p.paused]),w.useEffect(()=>{if(s){gk.add(p);const m=document.activeElement;if(!s.contains(m)){const x=new CustomEvent(Mv,pk);s.addEventListener(Mv,c),s.dispatchEvent(x),x.defaultPrevented||(gH(wH(uM(s)),{select:!0}),document.activeElement===m&&ei(s))}return()=>{s.removeEventListener(Mv,c),setTimeout(()=>{const x=new CustomEvent($v,pk);s.addEventListener($v,d),s.dispatchEvent(x),x.defaultPrevented||ei(m??document.body,{select:!0}),s.removeEventListener($v,d),gk.remove(p)},0)}}},[s,c,d,p]);const g=w.useCallback(m=>{if(!r&&!n||p.paused)return;const v=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,x=document.activeElement;if(v&&x){const b=m.currentTarget,[y,S]=vH(b);y&&S?!m.shiftKey&&x===S?(m.preventDefault(),r&&ei(y,{select:!0})):m.shiftKey&&x===y&&(m.preventDefault(),r&&ei(S,{select:!0})):x===b&&m.preventDefault()}},[r,n,p.paused]);return u.jsx(ge.div,{tabIndex:-1,...o,ref:h,onKeyDown:g})});Wm.displayName=mH;function gH(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(ei(n,{select:t}),document.activeElement!==r)return}function vH(e){const t=uM(e),r=mk(t,e),n=mk(t.reverse(),e);return[r,n]}function uM(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const a=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||a?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function mk(e,t){for(const r of e)if(!yH(r,{upTo:t}))return r}function yH(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function bH(e){return e instanceof HTMLInputElement&&"select"in e}function ei(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&bH(e)&&t&&e.select()}}var gk=xH();function xH(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=vk(e,t),e.unshift(t)},remove(t){var r;e=vk(e,t),(r=e[0])==null||r.resume()}}}function vk(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function wH(e){return e.filter(t=>t.tagName!=="A")}function r1(e){const t=w.useRef({value:e,previous:e});return w.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var _H=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},ds=new WeakMap,Tf=new WeakMap,Af={},Rv=0,dM=function(e){return e&&(e.host||dM(e.parentNode))},SH=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=dM(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},jH=function(e,t,r,n){var a=SH(t,Array.isArray(e)?e:[e]);Af[r]||(Af[r]=new WeakMap);var i=Af[r],o=[],s=new Set,l=new Set(a),c=function(f){!f||s.has(f)||(s.add(f),c(f.parentNode))};a.forEach(c);var d=function(f){!f||l.has(f)||Array.prototype.forEach.call(f.children,function(h){if(s.has(h))d(h);else try{var p=h.getAttribute(n),g=p!==null&&p!=="false",m=(ds.get(h)||0)+1,v=(i.get(h)||0)+1;ds.set(h,m),i.set(h,v),o.push(h),m===1&&g&&Tf.set(h,!0),v===1&&h.setAttribute(r,"true"),g||h.setAttribute(n,"true")}catch(x){console.error("aria-hidden: cannot operate on ",h,x)}})};return d(t),s.clear(),Rv++,function(){o.forEach(function(f){var h=ds.get(f)-1,p=i.get(f)-1;ds.set(f,h),i.set(f,p),h||(Tf.has(f)||f.removeAttribute(n),Tf.delete(f)),p||f.removeAttribute(r)}),Rv--,Rv||(ds=new WeakMap,ds=new WeakMap,Tf=new WeakMap,Af={})}},n1=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),a=_H(e);return a?(n.push.apply(n,Array.from(a.querySelectorAll("[aria-live]"))),jH(n,a,r,"aria-hidden")):function(){return null}},Hn=function(){return Hn=Object.assign||function(t){for(var r,n=1,a=arguments.length;n<a;n++){r=arguments[n];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},Hn.apply(this,arguments)};function fM(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r}function kH(e,t,r){if(r||arguments.length===2)for(var n=0,a=t.length,i;n<a;n++)(i||!(n in t))&&(i||(i=Array.prototype.slice.call(t,0,n)),i[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))}var hh="right-scroll-bar-position",ph="width-before-scroll-bar",EH="with-scroll-bars-hidden",OH="--removed-body-scroll-bar-size";function Iv(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function NH(e,t){var r=w.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var a=r.value;a!==n&&(r.value=n,r.callback(n,a))}}}})[0];return r.callback=t,r.facade}var PH=typeof window<"u"?w.useLayoutEffect:w.useEffect,yk=new WeakMap;function CH(e,t){var r=NH(null,function(n){return e.forEach(function(a){return Iv(a,n)})});return PH(function(){var n=yk.get(r);if(n){var a=new Set(n),i=new Set(e),o=r.current;a.forEach(function(s){i.has(s)||Iv(s,null)}
vendor: 4,153 bytes, lines 466-481
466),i.forEach(function(s){a.has(s)||Iv(s,o)})}yk.set(r,e)},[e]),r}function TH(e){return e}function AH(e,t){t===void 0&&(t=TH);var r=[],n=!1,a={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(i){var o=t(i,n);return r.push(o),function(){r=r.filter(function(s){return s!==o})}},assignSyncMedium:function(i){for(n=!0;r.length;){var o=r;r=[],o.forEach(i)}r={push:function(s){return i(s)},filter:function(){return r}}},assignMedium:function(i){n=!0;var o=[];if(r.length){var s=r;r=[],s.forEach(i),o=r}var l=function(){var d=o;o=[],d.forEach(i)},c=function(){return Promise.resolve().then(l)};c(),r={push:function(d){o.push(d),c()},filter:function(d){return o=o.filter(d),r}}}};return a}function MH(e){e===void 0&&(e={});var t=AH(null);return t.options=Hn({async:!0,ssr:!1},e),t}var hM=function(e){var t=e.sideCar,r=fM(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return w.createElement(n,Hn({},r))};hM.isSideCarExport=!0;function $H(e,t){return e.useMedium(t),hM}var pM=MH(),Dv=function(){},Hm=w.forwardRef(function(e,t){var r=w.useRef(null),n=w.useState({onScrollCapture:Dv,onWheelCapture:Dv,onTouchMoveCapture:Dv}),a=n[0],i=n[1],o=e.forwardProps,s=e.children,l=e.className,c=e.removeScrollBar,d=e.enabled,f=e.shards,h=e.sideCar,p=e.noRelative,g=e.noIsolation,m=e.inert,v=e.allowPinchZoom,x=e.as,b=x===void 0?"div":x,y=e.gapMode,S=fM(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),_=h,j=CH([r,t]),k=Hn(Hn({},S),a);return w.createElement(w.Fragment,null,d&&w.createElement(_,{sideCar:pM,removeScrollBar:c,shards:f,noRelative:p,noIsolation:g,inert:m,setCallbacks:i,allowPinchZoom:!!v,lockRef:r,gapMode:y}),o?w.cloneElement(w.Children.only(s),Hn(Hn({},k),{ref:j})):w.createElement(b,Hn({},k,{className:l,ref:j}),s))});Hm.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Hm.classNames={fullWidth:ph,zeroRight:hh};var RH=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function IH(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=RH();return t&&e.setAttribute("nonce",t),e}function DH(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function LH(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var BH=function(){var e=0,t=null;return{add:function(r){e==0&&(t=IH())&&(DH(t,r),LH(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},FH=function(){var e=BH();return function(t,r){w.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},mM=function(){var e=FH(),t=function(r){var n=r.styles,a=r.dynamic;return e(n,a),null};return t},UH={left:0,top:0,right:0,gap:0},Lv=function(e){return parseInt(e||"",10)||0},zH=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],a=t[e==="padding"?"paddingRight":"marginRight"];return[Lv(r),Lv(n),Lv(a)]},WH=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return UH;var t=zH(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},HH=mM(),Gs="data-scroll-locked",qH=function(e,t,r,n){var a=e.left,i=e.top,o=e.right,s=e.gap;return r===void 0&&(r="margin"),`
467  .`.concat(EH,` {
468   overflow: hidden `).concat(n,`;
469   padding-right: `).concat(s,"px ").concat(n,`;
470  }
471  body[`).concat(Gs,`] {
472    overflow: hidden `).concat(n,`;
473    overscroll-behavior: contain;
474    `).concat([t&&"position: relative ".concat(n,";"),r==="margin"&&`
475    padding-left: `.concat(a,`px;
476    padding-top: `).concat(i,`px;
477    padding-right: `).concat(o,`px;
478    margin-left:0;
479    margin-top:0;
480    margin-right: `).concat(s,"px ").concat(n,`;
481    `),r==="padding"&&"padding-right: ".concat(s,"px ").concat(n,";
481")].filter(Boolean).join(""),`
482  }
483  
484  .`).concat(hh,` {
485    right: `).concat(s,"px ").concat(n,`;
486  }
487  
488  .`).concat(ph,` {
489    margin-right: `).concat(s,"px ").concat(n,`;
490  }
491  
492  .`).concat(hh," .").concat(hh,` {
493    right: 0 `).concat(n,`;
494  }
495  
496  .`).concat(ph," .").concat(ph,` {
497    margin-right: 0 `).concat(n,`;
498  }
499  
500  body[`).concat(Gs,`] {
501    `).concat(OH,": ").concat(s,`px;
502  }
503`)},bk=function(){var e=parseInt(document.body.getAttribute(Gs)||"0",10);return isFinite(e)?e:0},VH=function(){w.useEffect(function(){return document.body.setAttribute(Gs,(bk()+1).toString()),function(){var e=bk()-1;e<=0?document.body.removeAttribute(Gs):document.body.setAttribute(Gs,e.toString())}},[])},KH=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,a=n===void 0?"margin":n;VH();var i=w.useMemo(function(){return WH(a)},[a]);return w.createElement(HH,{styles:qH(i,!t,a,r?"":"!important")})},K0=!1;if(typeof window<"u")try{var Mf=Object.defineProperty({},"passive",{get:function(){return K0=!0,!0}});window.addEventListener("test",Mf,Mf),window.removeEventListener("test",Mf,Mf)}catch{K0=!1}var fs=K0?{passive:!1}:!1,GH=function(e){return e.tagName==="TEXTAREA"},gM=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!GH(e)&&r[t]==="visible")},YH=function(e){return gM(e,"overflowY")},XH=function(e){return gM(e,"overflowX")},xk=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var a=vM(e,n);if(a){var i=yM(e,n),o=i[1],s=i[2];if(o>s)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},JH=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},QH=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},vM=function(e,t){return e==="v"?YH(t):XH(t)},yM=function(e,t){return e==="v"?JH(t):QH(t)},ZH=function(e,t){return e==="h"&&t==="rtl"?-1:1},eq=function(e,t,r,n,a){var i=ZH(e,window.getComputedStyle(t).direction),o=i*n,s=r.target,l=t.contains(s),c=!1,d=o>0,f=0,h=0;do{if(!s)break;var p=yM(e,s),g=p[0],m=p[1],v=p[2],x=m-v-i*g;(g||x)&&vM(e,s)&&(f+=x,h+=g);var b=s.parentNode;s=b&&b.nodeType===Node.DOCUMENT_FRAGMENT_NODE?b.host:b}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(d&&(Math.abs(f)<1||!a)||!d&&(Math.abs(h)<1||!a))&&(c=!0),c},$f=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},wk=function(e){return[e.deltaX,e.deltaY]},_k=function(e){return e&&"current"in e?e.current:e},tq=function(e,t){return e[0]===t[0]&&e[1]===t[1]},rq=function(e){return`
504  .block-interactivity-`.concat(e,` {pointer-events: none;}
505  .allow-interactivity-`).concat(e,` {pointer-events: all;}
506`)},nq=0,hs=[];function aq(e){var t=w.useRef([]),r=w.useRef([0,0]),n=w.useRef(),a=w.useState(nq++)[0],i=w.useState(mM)[0],o=w.useRef(e);w.useEffect(function(){o.current=e},[e]),w.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var m=kH([e.lockRef.current],(e.shards||[]).map(_k),!0).filter(Boolean);return m.forEach(function(v){return v.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),m.forEach(function(v){return v.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var s=w.useCallback(function(m,v){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!o.current.allowPinchZoom;var x=$f(m),b=r.current,y="deltaX"in m?m.deltaX:b[0]-x[0],S="deltaY"in m?m.deltaY:b[1]-x[1],_,j=m.target,k=Math.abs(y)>Math.abs(S)?"h":"v";if("touches"in m&&k==="h"&&j.type==="range")return!1;var E=xk(k,j);if(!E)return!0;if(E?_=k:(_=k==="v"?"h":"v",E=xk(k,j)),!E)return!1;if(!n.current&&"changedTouches"in m&&(y||S)&&(n.current=_),!_)return!0;var O=n.current||_;return eq(O,v,m,O==="h"?y:S,!0)},[]),l=w.useCallback(function(m){var v=m;if(!(!hs.length||hs[hs.length-1]!==i)){var x="deltaY"in v?wk(v):$f(v),b=t.current.filter(function(_){return _.name===v.type&&(_.target===v.target||v.target===_.shadowParent)&&tq(_.delta,x)})[0];if(b&&b.should){v.cancelable&&v.preventDefault();return}
vendor: 4,126 bytes, line 506
506if(!b){var y=(o.current.shards||[]).map(_k).filter(Boolean).filter(function(_){return _.contains(v.target)}),S=y.length>0?s(v,y[0]):!o.current.noIsolation;S&&v.cancelable&&v.preventDefault()}}},[]),c=w.useCallback(function(m,v,x,b){var y={name:m,delta:v,target:x,should:b,shadowParent:iq(x)};t.current.push(y),setTimeout(function(){t.current=t.current.filter(function(S){return S!==y})},1)},[]),d=w.useCallback(function(m){r.current=$f(m),n.current=void 0},[]),f=w.useCallback(function(m){c(m.type,wk(m),m.target,s(m,e.lockRef.current))},[]),h=w.useCallback(function(m){c(m.type,$f(m),m.target,s(m,e.lockRef.current))},[]);w.useEffect(function(){return hs.push(i),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:h}),document.addEventListener("wheel",l,fs),document.addEventListener("touchmove",l,fs),document.addEventListener("touchstart",d,fs),function(){hs=hs.filter(function(m){return m!==i}),document.removeEventListener("wheel",l,fs),document.removeEventListener("touchmove",l,fs),document.removeEventListener("touchstart",d,fs)}},[]);var p=e.removeScrollBar,g=e.inert;return w.createElement(w.Fragment,null,g?w.createElement(i,{styles:rq(a)}):null,p?w.createElement(KH,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function iq(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const oq=$H(pM,aq);var qm=w.forwardRef(function(e,t){return w.createElement(Hm,Hn({},e,{ref:t,sideCar:oq}))});qm.classNames=Hm.classNames;var sq=[" ","Enter","ArrowUp","ArrowDown"],lq=[" ","Enter"],Io="Select",[Vm,Km,cq]=Nw(Io),[ec,p_e]=Fa(Io,[cq,Ql]),Gm=Ql(),[uq,Bi]=ec(Io),[dq,fq]=ec(Io),bM=e=>{const{__scopeSelect:t,children:r,open:n,defaultOpen:a,onOpenChange:i,value:o,defaultValue:s,onValueChange:l,dir:c,name:d,autoComplete:f,disabled:h,required:p,form:g}=e,m=Gm(t),[v,x]=w.useState(null),[b,y]=w.useState(null),[S,_]=w.useState(!1),j=cM(c),[k,E]=$o({prop:n,defaultProp:a??!1,onChange:i,caller:Io}),[O,A]=$o({prop:o,defaultProp:s,onChange:l,caller:Io}),T=w.useRef(null),N=v?g||!!v.closest("form"):!0,[I,R]=w.useState(new Set),D=Array.from(I).map(L=>L.props.value).join(";");return u.jsx(EA,{...m,children:u.jsxs(uq,{required:p,scope:t,trigger:v,onTriggerChange:x,valueNode:b,onValueNodeChange:y,valueNodeHasChildren:S,onValueNodeHasChildrenChange:_,contentId:So(),value:O,onValueChange:A,open:k,onOpenChange:E,dir:j,triggerPointerDownPosRef:T,disabled:h,children:[u.jsx(Vm.Provider,{scope:t,children:u.jsx(dq,{scope:e.__scopeSelect,onNativeOptionAdd:w.useCallback(L=>{R(M=>new Set(M).add(L))},[]),onNativeOptionRemove:w.useCallback(L=>{R(M=>{const C=new Set(M);return C.delete(L),C})},[]),children:r})}),N?u.jsxs(WM,{"aria-hidden":!0,required:p,tabIndex:-1,name:d,autoComplete:f,value:O,onChange:L=>A(L.target.value),disabled:h,form:g,children:[O===void 0?u.jsx("option",{value:""}):null,Array.from(I)]},D):null]})})};bM.displayName=Io;var xM="SelectTrigger",wM=w.forwardRef((e,t)=>{const{__scopeSelect:r,disabled:n=!1,...a}=e,i=Gm(r),o=Bi(xM,r),s=o.disabled||n,l=Se(t,o.onTriggerChange),c=Km(r),d=w.useRef("touch"),[f,h,p]=qM(m=>{const v=c().filter(y=>!y.disabled),x=v.find(y=>y.value===o.value),b=VM(v,m,x);b!==void 0&&o.onValueChange(b.value)}),g=m=>{s||(o.onOpenChange(!0),p()),m&&(o.triggerPointerDownPosRef.current={x:Math.round(m.pageX),y:Math.round(m.pageY)})};return u.jsx(Im,{asChild:!0,...i,children:u.jsx(ge.button,{type:"button",role:"combobox","aria-controls":o.contentId,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":"none",dir:o.dir,"data-state":o.open?"open":"closed",disabled:s,"data-disabled":s?"":void 0,"data-placeholder":HM(o.value)?"":void 0,...a,ref:l,onClick:oe(a.onClick,m=>{m.currentTarget.focus(),d.current!=="mouse"&&g(m)}),onPointerDown:oe(a.onPointerDown,m=>{d.current=m.pointerType;const v=m.target;v.hasPointerCapture(m.pointerId)&&v.releasePointerCapture(m.pointerId),m.button===0&&m.ctrlKey===!1&&m.pointerType==="mouse"&&(g(m),m.preventDefault())}),onKeyDown:oe(a.onKeyDown,m=>{const v=f.current!=="";!(m.ctrlKey||m.altKey||m.metaKey)&&m.key.length===1&&h(m.key),!(v&&m.key===" ")&&sq.includes(m.key)&&
vendor: 15,548 bytes, line 506
506(g(),m.preventDefault())})})})});wM.displayName=xM;var _M="SelectValue",SM=w.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:a,children:i,placeholder:o="",...s}=e,l=Bi(_M,r),{onValueNodeHasChildrenChange:c}=l,d=i!==void 0,f=Se(t,l.onValueNodeChange);return Bt(()=>{c(d)},[c,d]),u.jsx(ge.span,{...s,ref:f,style:{pointerEvents:"none"},children:HM(l.value)?u.jsx(u.Fragment,{children:o}):i})});SM.displayName=_M;var hq="SelectIcon",jM=w.forwardRef((e,t)=>{const{__scopeSelect:r,children:n,...a}=e;return u.jsx(ge.span,{"aria-hidden":!0,...a,ref:t,children:n||"▼"})});jM.displayName=hq;var pq="SelectPortal",kM=e=>u.jsx(Pd,{asChild:!0,...e});kM.displayName=pq;var Do="SelectContent",EM=w.forwardRef((e,t)=>{const r=Bi(Do,e.__scopeSelect),[n,a]=w.useState();if(Bt(()=>{a(new DocumentFragment)},[]),!r.open){const i=n;return i?Ko.createPortal(u.jsx(OM,{scope:e.__scopeSelect,children:u.jsx(Vm.Slot,{scope:e.__scopeSelect,children:u.jsx("div",{children:e.children})})}),i):null}return u.jsx(NM,{...e,ref:t})});EM.displayName=Do;var ln=10,[OM,Fi]=ec(Do),mq="SelectContentImpl",gq=Mo("SelectContent.RemoveScroll"),NM=w.forwardRef((e,t)=>{const{__scopeSelect:r,position:n="item-aligned",onCloseAutoFocus:a,onEscapeKeyDown:i,onPointerDownOutside:o,side:s,sideOffset:l,align:c,alignOffset:d,arrowPadding:f,collisionBoundary:h,collisionPadding:p,sticky:g,hideWhenDetached:m,avoidCollisions:v,...x}=e,b=Bi(Do,r),[y,S]=w.useState(null),[_,j]=w.useState(null),k=Se(t,X=>S(X)),[E,O]=w.useState(null),[A,T]=w.useState(null),N=Km(r),[I,R]=w.useState(!1),D=w.useRef(!1);w.useEffect(()=>{if(y)return n1(y)},[y]),t1();const L=w.useCallback(X=>{const[he,...K]=N().map(z=>z.ref.current),[Z]=K.slice(-1),Q=document.activeElement;for(const z of X)if(z===Q||(z==null||z.scrollIntoView({block:"nearest"}),z===he&&_&&(_.scrollTop=0),z===Z&&_&&(_.scrollTop=_.scrollHeight),z==null||z.focus(),document.activeElement!==Q))return},[N,_]),M=w.useCallback(()=>L([E,y]),[L,E,y]);w.useEffect(()=>{I&&M()},[I,M]);const{onOpenChange:C,triggerPointerDownPosRef:P}=b;w.useEffect(()=>{if(y){let X={x:0,y:0};const he=Z=>{var Q,z;X={x:Math.abs(Math.round(Z.pageX)-(((Q=P.current)==null?void 0:Q.x)??0)),y:Math.abs(Math.round(Z.pageY)-(((z=P.current)==null?void 0:z.y)??0))}},K=Z=>{X.x<=10&&X.y<=10?Z.preventDefault():y.contains(Z.target)||C(!1),document.removeEventListener("pointermove",he),P.current=null};return P.current!==null&&(document.addEventListener("pointermove",he),document.addEventListener("pointerup",K,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",he),document.removeEventListener("pointerup",K,{capture:!0})}}},[y,C,P]),w.useEffect(()=>{const X=()=>C(!1);return window.addEventListener("blur",X),window.addEventListener("resize",X),()=>{window.removeEventListener("blur",X),window.removeEventListener("resize",X)}},[C]);const[B,U]=qM(X=>{const he=N().filter(Q=>!Q.disabled),K=he.find(Q=>Q.ref.current===document.activeElement),Z=VM(he,X,K);Z&&setTimeout(()=>Z.ref.current.focus())}),F=w.useCallback((X,he,K)=>{const Z=!D.current&&!K;(b.value!==void 0&&b.value===he||Z)&&(O(X),Z&&(D.current=!0))},[b.value]),V=w.useCallback(()=>y==null?void 0:y.focus(),[y]),J=w.useCallback((X,he,K)=>{const Z=!D.current&&!K;(b.value!==void 0&&b.value===he||Z)&&T(X)},[b.value]),ue=n==="popper"?G0:PM,_e=ue===G0?{side:s,sideOffset:l,align:c,alignOffset:d,arrowPadding:f,collisionBoundary:h,collisionPadding:p,sticky:g,hideWhenDetached:m,avoidCollisions:v}:{};return u.jsx(OM,{scope:r,content:y,viewport:_,onViewportChange:j,itemRefCallback:F,selectedItem:E,onItemLeave:V,itemTextRefCallback:J,focusSelectedItem:M,selectedItemText:A,position:n,isPositioned:I,searchRef:B,children:u.jsx(qm,{as:gq,allowPinchZoom:!0,children:u.jsx(Wm,{asChild:!0,trapped:b.open,onMountAutoFocus:X=>{X.preventDefault()},onUnmountAutoFocus:oe(a,X=>{var he;(he=b.trigger)==null||he.focus({preventScroll:!0}),X.preventDefault()}),children:u.jsx(Gl,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:X=>X.preventDefault(),onDismiss:()=>b.onOpenChange(!1),children:u.jsx(ue,{role:"listbox",id:b.contentId,"data-state":b.open?"open":"closed",dir:b.dir,onContextMenu:X=>X.preventDefault(),...x,..._e,onPlaced:()=>R(!0),ref:k,style:{display:"flex",flexDirection:"column",outline:"none",...x.style},onKeyDown:oe(x.onKeyDown,X=>{const he=X.ctrlKey||X.altKey||X.metaKey;if(X.key==="Tab"&&X.preventDefault(),!he&&X.key.length===1&&U(X.key),["ArrowUp","ArrowDown","Home","End"].includes(X.key)){let Z=N().filter(Q=>!Q.disabled).map(Q=>Q.ref.current);if(["ArrowUp","End"].includes(X.key)&&(Z=Z.slice().reverse()),["ArrowUp","ArrowDown"].includes(X.key)){const Q=X.target,z=Z.indexOf(Q);Z=Z.slice(z+1)}setTimeout(()=>L(Z)),X.preventDefault()}})})})})})})});NM.displayName=mq;var vq="SelectItemAlignedPosition",PM=w.forwardRef((e,t)=>{const{__scopeSelect:r,onPlaced:n,...a}=e,i=Bi(Do,r),o=Fi(Do,r),[s,l]=w.useState(null),[c,d]=w.useState(null),f=Se(t,k=>d(k)),h=Km(r),p=w.useRef(!1),g=w.useRef(!0),{viewport:m,selectedItem:v,selectedItemText:x,focusSelectedItem:b}=o,y=w.useCallback(()=>{if(i.trigger&&i.valueNode&&s&&c&&m&&v&&x){const k=i.trigger.getBoundingClientRect(),E=c.getBoundingClientRect(),O=i.valueNode.getBoundingClientRect(),A=x.getBoundingClientRect();if(i.dir!=="rtl"){const Q=A.left-E.left,z=O.left-Q,be=k.left-z,fe=k.width+be,Ue=Math.max(fe,E.width),De=window.innerWidth-ln,it=tp(z,[ln,Math.max(ln,De-Ue)]);s.style.minWidth=fe+"px",s.style.left=it+"px"}else{const Q=E.right-A.right,z=window.innerWidth-O.right-Q,be=window.innerWidth-k.right-z,fe=k.width+be,Ue=Math.max(fe,E.width),De=window.innerWidth-ln,it=tp(z,[ln,Math.max(ln,De-Ue)]);s.style.minWidth=fe+"px",s.style.right=it+"px"}const T=h(),N=window.innerHeight-ln*2,I=m.scrollHeight,R=window.getComputedStyle(c),D=parseInt(R.borderTopWidth,10),L=parseInt(R.paddingTop,10),M=parseInt(R.borderBottomWidth,10),C=parseInt(R.paddingBottom,10),P=D+L+I+C+M,B=Math.min(v.offsetHeight*5,P),U=window.getComputedStyle(m),F=parseInt(U.paddingTop,10),V=parseInt(U.paddingBottom,10),J=k.top+k.height/2-ln,ue=N-J,_e=v.offsetHeight/2,X=v.offsetTop+_e,he=D+L+X,K=P-he;if(he<=J){const Q=T.length>0&&v===T[T.length-1].ref.current;s.style.bottom="0px";const z=c.clientHeight-m.offsetTop-m.offsetHeight,be=Math.max(ue,_e+(Q?V:0)+z+M),fe=he+be;s.style.height=fe+"px"}else{const Q=T.length>0&&v===T[0].ref.current;s.style.top="0px";const be=Math.max(J,D+m.offsetTop+(Q?F:0)+_e)+K;s.style.height=be+"px",m.scrollTop=he-J+m.offsetTop}s.style.margin=`${ln}px 0`,s.style.minHeight=B+"px",s.style.maxHeight=N+"px",n==null||n(),requestAnimationFrame(()=>p.current=!0)}},[h,i.trigger,i.valueNode,s,c,m,v,x,i.dir,n]);Bt(()=>y(),[y]);const[S,_]=w.useState();Bt(()=>{c&&_(window.getComputedStyle(c).zIndex)},[c]);const j=w.useCallback(k=>{k&&g.current===!0&&(y(),b==null||b(),g.current=!1)},[y,b]);return u.jsx(bq,{scope:r,contentWrapper:s,shouldExpandOnScrollRef:p,onScrollButtonChange:j,children:u.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:S},children:u.jsx(ge.div,{...a,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...a.style}})})})});PM.displayName=vq;var yq="SelectPopperPosition",G0=w.forwardRef((e,t)=>{const{__scopeSelect:r,align:n="start",collisionPadding:a=ln,...i}=e,o=Gm(r);return u.jsx(Gw,{...o,...i,ref:t,align:n,collisionPadding:a,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});G0.displayName=yq;var[bq,a1]=ec(Do,{}),Y0="SelectViewport",CM=w.forwardRef((e,t)=>{const{__scopeSelect:r,nonce:n,...a}=e,i=Fi(Y0,r),o=a1(Y0,r),s=Se(t,i.onViewportChange),l=w.useRef(0);return u.jsxs(u.Fragment,{children:[u.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:n}),u.jsx(Vm.Slot,{scope:r,children:u.jsx(ge.div,{"data-radix-select-viewport":"",role:"presentation",...a,ref:s,style:{position:"relative",flex:1,overflow:"hidden auto",...a.style},onScroll:oe(a.onScroll,c=>{const d=c.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:h}=o;if(h!=null&&h.current&&f){const p=Math.abs(l.current-d.scrollTop);if(p>0){const g=window.innerHeight-ln*2,m=parseFloat(f.style.minHeight),v=parseFloat(f.style.height),x=Math.max(m,v);if(x<g){const b=x+p,y=Math.min(g,b),S=b-y;f.style.height=y+"px",f.style.bottom==="0px"&&(d.scrollTop=S>0?S:0,f.style.justifyContent="flex-end")}}}l.current=d.scrollTop})})})]})});CM.displayName=Y0;var TM="SelectGroup",[xq,wq]=ec(TM),_q=w.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,a=So();return u.jsx(xq,{scope:r,id:a,children:u.jsx(ge.div,{role:"group","aria-labelledby":a,...n,ref:t})})});_q.displayName=TM;var AM="SelectLabel",MM=w.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,a=wq(AM,r);return u.jsx(ge.div,{id:a.id,...n,ref:t})});MM.displayName=AM;var rp="SelectItem",[Sq,$M]=ec(rp),RM=w.forwardRef((e,t)=>{const{__scopeSelect:r,value:n,disabled:a=!1,textValue:i,...o}=e,s=Bi(rp,r),l=Fi(rp,r),c=s.value===n,[d,f]=w.useState(i??""),[h,p]=w.useState(!1),g=Se(t,b=>{var y;return(y=l.itemRefCallback)==null?void 0:y.call(l,b,n,a)}),m=So(),v=w.useRef("touch"),x=()=>{a||(s.onValueChange(n),s.onOpenChange(!1))};if(n==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return u.jsx(Sq,{scope:r,value:n,disabled:a,textId:m,isSelected:c,onItemTextChange:w.useCallback(b=>{f(y=>y||((b==null?void 0:b.textContent)??"").trim())},[]),children:u.jsx(Vm.ItemSlot,{scope:r,value:n,disabled:a,textValue:d,children:u.jsx(ge.div,{role:"option","aria-labelledby":m,"data-highlighted":h?"":void 0,"aria-selected":c&&h,"data-state":c?"checked":"unchecked","aria-disabled":a||void 0,"data-disabled":a?"":void 0,tabIndex:a?void 0:-1,...o,ref:g,onFocus:oe(o.onFocus,()=>p(!0)),onBlur:oe(o.onBlur,()=>p(!1)),onClick:oe(o.onClick,()=>{v.current!=="mouse"&&x()}),onPointerUp:oe(o.onPointerUp,()=>{v.current==="mouse"&&x()}),onPointerDown:oe(o.onPointerDown,b=>{v.current=b.pointerType}),onPointerMove:oe(o.onPointerMove,b=>{var y;v.current=b.pointerType,a?(y=l.onItemLeave)==null||y.call(l):v.current==="mouse"&&b.currentTarget.focus({preventScroll:!0})}),onPointerLeave:oe(o.onPointerLeave,b=>{var y;b.currentTarget===document.activeElement&&((y=l.onItemLeave)==null||y.call(l))}),onKeyDown:oe(o.onKeyDown,b=>{var S;((S=l.searchRef)==null?void 0:S.current)!==""&&b.key===" "||(lq.includes(b.key)&&x(),b.key===" "&&b.preventDefault())})})})})});RM.displayName=rp;var zc="SelectItemText",IM=w.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:a,...i}=e,o=Bi(zc,r),s=Fi(zc,r),l=$M(zc,r),c=fq(zc,r),[d,f]=w.useState(null),h=Se(t,x=>f(x),l.onItemTextChange,x=>{var b;return(b=s.itemTextRefCallback)==null?void 0:b.call(s,x,l.value,l.disabled)}),p=d==null?void 0:d.textContent,g=w.useMemo(()=>u.jsx("option",{value:l.value,disabled:l.disabled,children:p},l.value),[l.disabled,l.value,p]),{onNativeOptionAdd:m,onNativeOptionRemove:v}=c;return Bt(()=>(m(g),()=>v(g)),[m,v,g]),u.jsxs(u.Fragment,{children:[u.jsx(ge.span,{id:l.textId,...i,ref:h}),l.isSelected&&o.valueNode&&!o.valueNodeHasChildren?Ko.createPortal(i.children,o.valueNode):null]})});IM.displayName=zc;var DM="SelectItemIndicator",LM=w.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return $M(DM,r).isSelected?u.jsx(ge.span,{"aria-hidden":!0,...n,ref:t}):null});LM.displayName=DM;var X0="SelectScrollUpButton",BM=w.forwardRef((e,t)=>{const r=Fi(X0,e.__scopeSelect),n=a1(X0,e.__scopeSelect),[a,i]=w.useState(!1),o=Se(t,n.onScrollButtonChange);return Bt(()=>{if(r.viewport&&r.isPositioned){let s=function(){const c=l.scrollTop>0;i(c)};const l=r.viewport;return s(),l.addEventListener("scroll",s),()=>l.removeEventListener("scroll",s)}},[r.viewport,r.isPositioned]),a?u.jsx(UM,{...e,ref:o,onAutoScroll:()=>{const{viewport:s,selectedItem:l}=r;s&&l&&(s.scrollTop=s.scrollTop-l.offsetHeight)}}):null});BM.displayName=X0;var J0="SelectScrollDownButton",FM=w.forwardRef((e,t)=>{const r=Fi(J0,e.__scopeSelect),n=a1(J0,e.__scopeSelect),[a,i]=w.useState(!1),o=Se(t,n.onScrollButtonChange);return Bt(()=>{if(r.viewport&&r.isPositioned){let s=function(){const c=l.scrollHeight-l.clientHeight,d=Math.ceil(l.scrollTop)<c;i(d)};const l=r.viewport;return s(),l.addEventListener("scroll",s),()=>l.removeEventListener("scroll",s)}},[r.viewport,r.isPositioned]),a?u.jsx(UM,{...e,ref:o,onAutoScroll:()=>{const{viewport:s,selectedItem:l}=r;s&&l&&(s.scrollTop=s.scrollTop+l.offsetHeight)}}):null});FM.displayName=J0;var UM=w.forwardRef((e,t)=>{const{__scopeSelect:r,onAutoScroll:n,...a}=e,i=Fi("SelectScrollButton",r),o=w.useRef(null),s=Km(r),l=w.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return w.useEffect(()=>()=>l(),[l]),Bt(()=>{var d;const c=s().find(f=>f.ref.current===document.activeElement);(d=c==null?void 0:c.ref.current)==null||d.scrollIntoView({block:"nearest"})},[s]),u.jsx(ge.div,{"aria-hidden":!0,...a,ref:t,style:{flexShrink:0,...a.style},onPointerDown:oe(a.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(n,50))}),onPointerMove:oe(a.onPointerMove,()=>{var c;(c=i.onItemLeave)==null||c.call(i),o.current===null&&(o.current=window.setInterval(n,50))}),onPointerLeave:oe(a.onPointerLeave,()=>{l()})})}),jq="SelectSeparator",zM=w.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return u.jsx(ge.div,{"aria-hidden":!0,...n,ref:t})});zM.displayName=jq;var Q0="SelectArrow",kq=w.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,a=Gm(r),i=Bi(Q0,r),o=Fi(Q0,r);return i.open&&o.position==="popper"?u.jsx(Yw,{...a,...n,ref:t}):null});kq.displayName=Q0;var Eq="SelectBubbleInput",WM=w.forwardRef(({__scopeSelect:e,value:t,...r},n)=>{const a=w.useRef(null),i=Se(n,a),o=r1(t);return w.useEffect(()=>{const s=a.current;if(!s)return;const l=window.HTMLSelectElement.prototype,d=Object.getOwnPropertyDescriptor(l,"value").set;if(o!==t&&d){const f=new Event("change",{bubbles:!0});d.call(s,t),s.dispatchEvent(f)}},[o,t]),u.jsx(ge.select,{...r,style:{...f2,...r.style},ref:i,defaultValue:t})});WM.displayName=Eq;function HM(e){return e===""||e===void 0}function qM(e){const t=kn(e),r=w.useRef(""),n=w.useRef(0),a=w.useCallback(o=>{const s=r.current+o;t(s),function l(c){r.current=c,window.clearTimeout(n.current),c!==""&&(n.current=window.setTimeout(()=>l(""),1e3))}(s)},[t]),i=w.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return w.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,a,i]}function VM(e,t,r){const a=t.length>1&&Array.from(t).every(c=>c===t[0])?t[0]:t,i=r?e.indexOf(r):-1;let o=Oq(e,Math.max(i,0));a.length===1&&(o=o.filter(c=>c!==r));const l=o.find(c=>c.textValue.toLowerCase().startsWith(a.toLowerCase()));return l!==r?l:void 0}function Oq(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var Nq=bM,KM=wM,Pq=SM,Cq=jM,Tq=kM,GM=EM,Aq=CM,YM=MM,XM=RM,Mq=IM,$q=LM,JM=BM,QM=FM,ZM=zM;const Gn=Nq,Yn=Pq,yn=w.forwardRef(({className:e,children:t,...r},n)=>u.jsxs(KM,{ref:n,className:q("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm r
506ing-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...r,children:[t,u.jsx(Cq,{asChild:!0,children:u.jsx(Ad,{className:"h-4 w-4 opacity-50"})})]}));yn.displayName=KM.displayName;const e$=w.forwardRef(({className:e,...t},r)=>u.jsx(JM,{ref:r,className:q("flex cursor-default items-center justify-center py-1",e),...t,children:u.jsx(I2,{className:"h-4 w-4"})}));e$.displayName=JM.displayName;const t$=w.forwardRef(({className:e,...t},r)=>u.jsx(QM,{ref:r,className:q("flex cursor-default items-center justify-center py-1",e),...t,children:u.jsx(Ad,{className:"h-4 w-4"})}));t$.displayName=QM.displayName;const bn=w.forwardRef(({className:e,children:t,position:r="popper",...n},a)=>u.jsx(Tq,{children:u.jsxs(GM,{ref:a,className:q("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",r==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:r,...n,children:[u.jsx(e$,{}),u.jsx(Aq,{className:q("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),u.jsx(t$,{})]})}));bn.displayName=GM.displayName;const Rq=w.forwardRef(({className:e,...t},r)=>u.jsx(YM,{ref:r,className:q("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));Rq.displayName=YM.displayName;const Wr=w.forwardRef(({className:e,children:t,...r},n)=>u.jsxs(XM,{ref:n,className:q("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",e),...r,children:[u.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:u.jsx($q,{children:u.jsx(Pm,{className:"h-4 w-4"})})}),u.jsx(Mq,{children:t})]}));Wr.displayName=XM.displayName;const Iq=w.forwardRef(({className:e,...t},r)=>u.jsx(ZM,{ref:r,className:q("-mx-1 my-1 h-px bg-muted",e),...t}));Iq.displayName=ZM.displayName;function Ee(e){const t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new e.constructor(+e):typeof e=="number"||t==="[object Number]"||typeof e=="string"||t==="[object String]"?new Date(e):new Date(NaN)}function Tr(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function Et(e,t){const r=Ee(e);return isNaN(t)?Tr(e,NaN):(t&&r.setDate(r.getDate()+t),r)}function Nn(e,t){const r=Ee(e);if(isNaN(t))return Tr(e,NaN);if(!t)return r;const n=r.getDate(),a=Tr(e,r.getTime());a.setMonth(r.getMonth()+t+1,0);const i=a.getDate();return n>=i?a:(r.setFullYear(a.getFullYear(),a.getMonth(),n),r)}const i1=6048e5,Dq=864e5;let Lq={};function Id(){return Lq}function Pn(e,t){var s,l,c,d;const r=Id(),n=(t==null?void 0:t.weekStartsOn)??((l=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:l.weekStartsOn)??r.weekStartsOn??((d=(c=r.locale)==null?void 0:c.options)==null?void 0:d.weekStartsOn)??0,a=Ee(e),i=a.getDay(),o=(i<n?7:0)+i-n;return a.setDate(a.getDate()-o),a.setHours(0,0,0,0),a}function Lo(e){return Pn(e,{weekStartsOn:1})}function r$(e){const t=Ee(e),r=t.getFullYear(),n=Tr(e,0);n.setFullYear(r+1,0,4),n.setHours(0,0,0,0);const a=Lo(n),i=Tr(e,0);i.setFullYear(r,0,4),i.setHours(0,0,0,0);const o=Lo(i);return t.getTime()>=a.getTime()?r+1:t.getTime()>=o.getTime()?r:r-1}function bl(e){const t=Ee(e);return t.setHours(0,0,0,0),t}function np(e){const t=Ee(e),r=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return r.setUTCFullYear(t.getFullYear()),+e-+r}function Xn(e,t){const r=bl(e),n=bl(t),a=+r-np(r),i=+n-np(n);return Math.round((a-i)/Dq)}function Bq(e){const t=r$(e),r=Tr(e,0);return r.setFullYear(t,0,4),r.setHours(0,0,0,0),Lo(r)}function Z0(e,t){const r=t*7;return Et(e,r)}function Fq(e,t){return Nn(e,t*12)}function Uq(e){let t;return e.forEach(function(r){const n=Ee(r);(t===void 0||t<n||isNaN(Number(n)))&&(t=n)}),t||new Date(NaN)}function zq(e){let t;return e.forEach(r=>{const n=Ee(r);(!t||t>n||isNaN(+n))&&(t=n)}),t||new Date(NaN)}function Gt(e,t){const r=bl(e),n=bl(t);return+r==+n}function o1(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Wq(e){if(!o1(e)&&typeof e!="number")return!1;const t=Ee(e);return!isNaN(Number(t))}function Fu(e,t){const r=Ee(e),n=Ee(t),a=r.getFullYear()-n.getFullYear(),i=r.getMonth()-n.getMonth();return a*12+i}function Hq(e,t,r){const n=Pn(e,r),a=Pn(t,r),i=+n-np(n),o=+a-np(a);return Math.round((i-o)/i1)}function s1(e){const t=Ee(e),r=t.getMonth();return t.setFullYear(t.getFullYear(),r+1,0),t.setHours(23,59,59,999),t}function pr(e){const t=Ee(e);return t.setDate(1),t.setHours(0,0,0,0),t}function n$(e){const t=Ee(e),r=Tr(e,0);return r.setFullYear(t.getFullYear(),0,1),r.setHours(0,0,0,0),r}function l1(e,t){var s,l,c,d;const r=Id(),n=(t==null?void 0:t.weekStartsOn)??((l=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:l.weekStartsOn)??r.weekStartsOn??((d=(c=r.locale)==null?void 0:c.options)==null?void 0:d.weekStartsOn)??0,a=Ee(e),i=a.getDay(),o=(i<n?-7:0)+6-(i-n);return a.setDate(a.getDate()+o),a.setHours(23,59,59,999),a}function a$(e){return l1(e,{weekStartsOn:1}
vendor: 9,061 bytes, line 506
506)}const qq={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Vq=(e,t,r)=>{let n;const a=qq[e];return typeof a=="string"?n=a:t===1?n=a.one:n=a.other.replace("{{count}}",t.toString()),r!=null&&r.addSuffix?r.comparison&&r.comparison>0?"in "+n:n+" ago":n};function Ys(e){return(t={})=>{const r=t.width?String(t.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}const Kq={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Gq={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Yq={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Xq={date:Ys({formats:Kq,defaultWidth:"full"}),time:Ys({formats:Gq,defaultWidth:"full"}),dateTime:Ys({formats:Yq,defaultWidth:"full"})},Jq={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Qq=(e,t,r,n)=>Jq[e];function qn(e){return(t,r)=>{const n=r!=null&&r.context?String(r.context):"standalone";let a;if(n==="formatting"&&e.formattingValues){const o=e.defaultFormattingWidth||e.defaultWidth,s=r!=null&&r.width?String(r.width):o;a=e.formattingValues[s]||e.formattingValues[o]}else{const o=e.defaultWidth,s=r!=null&&r.width?String(r.width):e.defaultWidth;a=e.values[s]||e.values[o]}const i=e.argumentCallback?e.argumentCallback(t):t;return a[i]}}const Zq={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},eV={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},tV={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},rV={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},nV={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},aV={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},iV=(e,t)=>{const r=Number(e),n=r%100;if(n>20||n<10)switch(n%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},oV={ordinalNumber:iV,era:qn({values:Zq,defaultWidth:"wide"}),quarter:qn({values:eV,defaultWidth:"wide",argumentCallback:e=>e-1}),month:qn({values:tV,defaultWidth:"wide"}),day:qn({values:rV,defaultWidth:"wide"}),dayPeriod:qn({values:nV,defaultWidth:"wide",formattingValues:aV,defaultFormattingWidth:"wide"})};function Vn(e){return(t,r={})=>{const n=r.width,a=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],i=t.match(a);if(!i)return null;const o=i[0],s=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?lV(s,f=>f.test(o)):sV(s,f=>f.test(o));let c;c=e.valueCallback?e.valueCallback(l):l,c=r.valueCallback?r.valueCallback(c):c;const d=t.slice(o.length);return{value:c,rest:d}}}function sV(e,t){for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t(e[r]))return r}function lV(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return r}function i$(e){return(t,r={})=>{const n=t.match(e.matchPattern);if(!n)return null;const a=n[0],i=t.match(e.parsePattern);if(!i)return null;let o=e.valueCallback?e.valueCallback(i[0]):i[0];o=r.valueCallback?r.valueCallback(o):o;const s=t.slice(a.length);return{value:o,rest:s}}}const cV=/^(\d+)(th|st|nd|rd)?/i,uV=/\d+/i,dV={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},fV={any:[/^b/i,/^(a|c)/i]},hV={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},pV={any:[/1/i,/2/i,/3/i,/4/i]},mV={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},gV={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},vV={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},yV={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},bV={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},xV={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},wV={ordinalNumber:i$({matchPattern:cV,parsePattern:uV,valueCallback:e=>parseInt(e,10)}),era:Vn({matchPatterns:dV,defaultMatchWidth:"wide",parsePatterns:fV,defaultParseWidth:"any"}),quarter:Vn({matchPatterns:hV,defaultMatchWidth:"wide",parsePatterns:pV,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Vn({matchPatterns:mV,defaultMatchWidth:"wide",parsePatterns:gV,defaultParseWidth:"any"}),day:Vn({matchPatterns:vV,defaultMatchWidth:"wide",parsePatterns:yV,defaultParseWidth:"any"}),dayPeriod:Vn({matchPatterns:bV,defaultMatchWidth:"any",parsePatterns:xV,defaultParseWidth:"any"})},o$={code:"en-US",formatDistance:Vq,formatLong:Xq,formatRelative:Qq,localize:oV,match:wV,options:{weekStartsOn:0,firstWeekContainsDate:1}};function _V(e){const t=Ee(e);return Xn(t,n$(t))+1}function s$(e){const t=Ee(e),r=+Lo(t)-+Bq(t);return Math.round(r/i1)+1}function l$(e,t){var d,f,h,p;const r=Ee(e),n=r.getFullYear(),a=Id(),i=(t==null?void 0:t.firstWeekContainsDate)??((f=(d=t==null?void 0:t.locale)==null?void 0:d.options)==null?void 0:f.firstWeekContainsDate)??a.firstWeekContainsDate??((p=(h=a.locale)==null?void 0:h.options)==null?void 0:p.firstWeekContainsDate)??1,o=Tr(e,0);o.setFullYear(n+1,0,i),o.setHours(0,0,0,0);const s=Pn(o,t),l=Tr(e,0);l.setFullYear(n,0,i),l.setHours(0,0,0,0);const c=Pn(l,t);return r.getTime()>=s.getTime()?n+1:r.getTime()>=c.getTime()?n:n-1}function SV(e,t){var s,l,c,d;const r=Id(),n=(t==null?void 0:t.firstWeekContainsDate)??((l=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:l.firstWeekContainsDate)??r.firstWeekContainsDate??((d=(c=r.locale)==null?void 0:c.options)==null?void 0:d.firstWeekContainsDate)??1,a=l$(e,t),i=Tr(e,0);return i.setFullYear(a,0,n),i.setHours(0,0,0,0),Pn(i,t)}function c$(e,t){const r=Ee(e),n=+Pn(r,t)-+SV(r,t);return Math.round(n/i1)+1}function Ae(e,t){const r=e<0?"-":"",n=Math.abs(e).toString().padStart(t,"0");return r+n}const Qa={y(e,t){const r=e.getFullYear(),n=r>0?r:1-r;return Ae(t==="yy"?n%100:n,t.length)},M(e,t){const r=e.getMonth();return t==="M"?String(r+1):Ae(r+1,2)},d(e,t){return Ae(e.getDate(),t.length)},a(e,t){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];case"aaaa":default:return r==="am"?"a.m.":"p.m."}},h(e,t){return Ae(e.getHours()%12||12,t.length)},H(e,t){return Ae(e.getHours(),t.length)},m(e,t){return Ae(e.getMinutes(),t.length)},s(e,t){return Ae(e.getSeconds(),t.length)},S(e,t){const r=t.length,n=e.getMilliseconds(),a=Math.trunc(n*Math.pow(10,r-3));return Ae(a,t.length)}},ps={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}
vendor: 4,610 bytes, line 506
506,Sk={G:function(e,t,r){const n=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return r.era(n,{width:"abbreviated"});case"GGGGG":return r.era(n,{width:"narrow"});case"GGGG":default:return r.era(n,{width:"wide"})}},y:function(e,t,r){if(t==="yo"){const n=e.getFullYear(),a=n>0?n:1-n;return r.ordinalNumber(a,{unit:"year"})}return Qa.y(e,t)},Y:function(e,t,r,n){const a=l$(e,n),i=a>0?a:1-a;if(t==="YY"){const o=i%100;return Ae(o,2)}return t==="Yo"?r.ordinalNumber(i,{unit:"year"}):Ae(i,t.length)},R:function(e,t){const r=r$(e);return Ae(r,t.length)},u:function(e,t){const r=e.getFullYear();return Ae(r,t.length)},Q:function(e,t,r){const n=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(n);case"QQ":return Ae(n,2);case"Qo":return r.ordinalNumber(n,{unit:"quarter"});case"QQQ":return r.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(n,{width:"wide",context:"formatting"})}},q:function(e,t,r){const n=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(n);case"qq":return Ae(n,2);case"qo":return r.ordinalNumber(n,{unit:"quarter"});case"qqq":return r.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(n,{width:"wide",context:"standalone"})}},M:function(e,t,r){const n=e.getMonth();switch(t){case"M":case"MM":return Qa.M(e,t);case"Mo":return r.ordinalNumber(n+1,{unit:"month"});case"MMM":return r.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(n,{width:"wide",context:"formatting"})}},L:function(e,t,r){const n=e.getMonth();switch(t){case"L":return String(n+1);case"LL":return Ae(n+1,2);case"Lo":return r.ordinalNumber(n+1,{unit:"month"});case"LLL":return r.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(n,{width:"wide",context:"standalone"})}},w:function(e,t,r,n){const a=c$(e,n);return t==="wo"?r.ordinalNumber(a,{unit:"week"}):Ae(a,t.length)},I:function(e,t,r){const n=s$(e);return t==="Io"?r.ordinalNumber(n,{unit:"week"}):Ae(n,t.length)},d:function(e,t,r){return t==="do"?r.ordinalNumber(e.getDate(),{unit:"date"}):Qa.d(e,t)},D:function(e,t,r){const n=_V(e);return t==="Do"?r.ordinalNumber(n,{unit:"dayOfYear"}):Ae(n,t.length)},E:function(e,t,r){const n=e.getDay();switch(t){case"E":case"EE":case"EEE":return r.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(n,{width:"short",context:"formatting"});case"EEEE":default:return r.day(n,{width:"wide",context:"formatting"})}},e:function(e,t,r,n){const a=e.getDay(),i=(a-n.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return Ae(i,2);case"eo":return r.ordinalNumber(i,{unit:"day"});case"eee":return r.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(a,{width:"short",context:"formatting"});case"eeee":default:return r.day(a,{width:"wide",context:"formatting"})}},c:function(e,t,r,n){const a=e.getDay(),i=(a-n.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return Ae(i,t.length);case"co":return r.ordinalNumber(i,{unit:"day"});case"ccc":return r.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(a,{width:"narrow",context:"standalone"});case"cccccc":return r.day(a,{width:"short",context:"standalone"});case"cccc":default:return r.day(a,{width:"wide",context:"standalone"})}},i:function(e,t,r){const n=e.getDay(),a=n===0?7:n;switch(t){case"i":return String(a);case"ii":return Ae(a,t.length);case"io":return r.ordinalNumber(a,{unit:"day"});case"iii":return r.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(n,{width:"short",context:"formatting"});case"iiii":default:return r.day(n,{width:"wide",context:"formatting"})}},a:function(e,t,r){const a=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(e,t,r){const n=e.getHours();let a;
vendor: 2,426 bytes, line 506
506switch(n===12?a=ps.noon:n===0?a=ps.midnight:a=n/12>=1?"pm":"am",t){case"b":case"bb":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(e,t,r){const n=e.getHours();let a;switch(n>=17?a=ps.evening:n>=12?a=ps.afternoon:n>=4?a=ps.morning:a=ps.night,t){case"B":case"BB":case"BBB":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(e,t,r){if(t==="ho"){let n=e.getHours()%12;return n===0&&(n=12),r.ordinalNumber(n,{unit:"hour"})}return Qa.h(e,t)},H:function(e,t,r){return t==="Ho"?r.ordinalNumber(e.getHours(),{unit:"hour"}):Qa.H(e,t)},K:function(e,t,r){const n=e.getHours()%12;return t==="Ko"?r.ordinalNumber(n,{unit:"hour"}):Ae(n,t.length)},k:function(e,t,r){let n=e.getHours();return n===0&&(n=24),t==="ko"?r.ordinalNumber(n,{unit:"hour"}):Ae(n,t.length)},m:function(e,t,r){return t==="mo"?r.ordinalNumber(e.getMinutes(),{unit:"minute"}):Qa.m(e,t)},s:function(e,t,r){return t==="so"?r.ordinalNumber(e.getSeconds(),{unit:"second"}):Qa.s(e,t)},S:function(e,t){return Qa.S(e,t)},X:function(e,t,r){const n=e.getTimezoneOffset();if(n===0)return"Z";switch(t){case"X":return kk(n);case"XXXX":case"XX":return to(n);case"XXXXX":case"XXX":default:return to(n,":")}},x:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"x":return kk(n);case"xxxx":case"xx":return to(n);case"xxxxx":case"xxx":default:return to(n,":")}},O:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+jk(n,":");case"OOOO":default:return"GMT"+to(n,":")}},z:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+jk(n,":");case"zzzz":default:return"GMT"+to(n,":")}},t:function(e,t,r){const n=Math.trunc(e.getTime()/1e3);return Ae(n,t.length)},T:function(e,t,r){const n=e.getTime();return Ae(n,t.length)}};function jk(e,t=""){const r=e>0?"-":"+",n=Math.abs(e),a=Math.trunc(n/60),i=n%60;return i===0?r+String(a):r+String(a)+t+Ae(i,2)}function kk(e,t){return e%60===0?(e>0?"-":"+")+Ae(Math.abs(e)/60,2):to(e,t)}function to(e,t=""){const r=e>
vendor: 4,768 bytes, line 506
5060?"-":"+",n=Math.abs(e),a=Ae(Math.trunc(n/60),2),i=Ae(n%60,2);return r+a+t+i}const Ek=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},u$=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},jV=(e,t)=>{const r=e.match(/(P+)(p+)?/)||[],n=r[1],a=r[2];if(!a)return Ek(e,t);let i;switch(n){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;case"PPPP":default:i=t.dateTime({width:"full"});break}return i.replace("{{date}}",Ek(n,t)).replace("{{time}}",u$(a,t))},kV={p:u$,P:jV},EV=/^D+$/,OV=/^Y+$/,NV=["D","DD","YY","YYYY"];function PV(e){return EV.test(e)}function CV(e){return OV.test(e)}function TV(e,t,r){const n=AV(e,t,r);if(console.warn(n),NV.includes(e))throw new RangeError(n)}function AV(e,t,r){const n=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${n} to the input \`${r}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const MV=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,$V=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,RV=/^'([^]*?)'?$/,IV=/''/g,DV=/[a-zA-Z]/;function Rt(e,t,r){var d,f,h,p,g,m,v,x;const n=Id(),a=(r==null?void 0:r.locale)??n.locale??o$,i=(r==null?void 0:r.firstWeekContainsDate)??((f=(d=r==null?void 0:r.locale)==null?void 0:d.options)==null?void 0:f.firstWeekContainsDate)??n.firstWeekContainsDate??((p=(h=n.locale)==null?void 0:h.options)==null?void 0:p.firstWeekContainsDate)??1,o=(r==null?void 0:r.weekStartsOn)??((m=(g=r==null?void 0:r.locale)==null?void 0:g.options)==null?void 0:m.weekStartsOn)??n.weekStartsOn??((x=(v=n.locale)==null?void 0:v.options)==null?void 0:x.weekStartsOn)??0,s=Ee(e);if(!Wq(s))throw new RangeError("Invalid time value");let l=t.match($V).map(b=>{const y=b[0];if(y==="p"||y==="P"){const S=kV[y];return S(b,a.formatLong)}return b}).join("").match(MV).map(b=>{if(b==="''")return{isToken:!1,value:"'"};const y=b[0];if(y==="'")return{isToken:!1,value:LV(b)};if(Sk[y])return{isToken:!0,value:b};if(y.match(DV))throw new RangeError("Format string contains an unescaped latin alphabet character `"+y+"`");return{isToken:!1,value:b}});a.localize.preprocessor&&(l=a.localize.preprocessor(s,l));const c={firstWeekContainsDate:i,weekStartsOn:o,locale:a};return l.map(b=>{if(!b.isToken)return b.value;const y=b.value;(!(r!=null&&r.useAdditionalWeekYearTokens)&&CV(y)||!(r!=null&&r.useAdditionalDayOfYearTokens)&&PV(y))&&TV(y,t,String(e));const S=Sk[y[0]];return S(s,y,a.localize,c)}).join("")}function LV(e){const t=e.match(RV);return t?t[1].replace(IV,"'"):e}function BV(e){const t=Ee(e),r=t.getFullYear(),n=t.getMonth(),a=Tr(e,0);return a.setFullYear(r,n+1,0),a.setHours(0,0,0,0),a.getDate()}function FV(e){return Math.trunc(+Ee(e)/1e3)}function UV(e){const t=Ee(e),r=t.getMonth();return t.setFullYear(t.getFullYear(),r+1,0),t.setHours(0,0,0,0),t}function zV(e,t){return Hq(UV(e),pr(e),t)+1}function eb(e,t){const r=Ee(e),n=Ee(t);return r.getTime()>n.getTime()}function d$(e,t){const r=Ee(e),n=Ee(t);return+r<+n}function c1(e,t){const r=Ee(e),n=Ee(t);return r.getFullYear()===n.getFullYear()&&r.getMonth()===n.getMonth()}function WV(e,t){const r=Ee(e),n=Ee(t);return r.getFullYear()===n.getFullYear()}function Bv(e,t){return Et(e,-t)}function Fv(e,t){const r=Ee(e),n=r.getFullYear(),a=r.getDate(),i=Tr(e,0);i.setFullYear(n,t,15),i.setHours(0,0,0,0);const o=BV(i);return r.setMonth(t,Math.min(a,o)),r}function Ok(e,t){const r=Ee(e);return isNaN(+r)?Tr(e,NaN):(r.setFullYear(t),r)}const HV={lessThanXSeconds:{one:"menos de um segundo",other:"menos de {{count}} segundos"},xSeconds:{one:"1 segundo",other:"{{count}} segundos"},halfAMinute:"meio minuto",lessThanXMinutes:{one:"menos de um minuto",other:"menos de {{count}} minutos"},xMinutes:{one:"1 minuto",other:"{{count}} minutos"},aboutXHours:{one:"cerca de 1 hora",other:"cerca de {{count}} horas"},xHours:{one:"1 hora",other:"{{count}} horas"},xDays:{one:"1 dia",other:"{{count}} dias"},aboutXWeeks:{one:"cerca de 1 semana",other:"cerca de {{count}} semanas"},xWeeks:{one:"1 semana",other:"{{count}} semanas"},aboutXMonths:{one:"cerca de 1 mês",other:"cerca de {{count}} meses"},xMonths:{one:"1 mês",other:"{{count}} meses"},aboutXYears:{one:"cerca de 1 ano",other:"cerca de {{count}} anos"},xYears:{one:"1 ano",other:"{{count}} anos"},overXYears:{one:"mais de 1 ano",other:"mais de {{count}} anos"},almostXYears:{one:"quase 1 ano",other:"quase {{count}} anos"}},qV=(e,t,r)=>{let n;const a=HV[e];
506return typeof a=="string"?n=a:t===1?n=a.one:n=a.other.replace("{{count}}",String(t)),r!=null&&r.addSuffix?r.comparison&&r.comparison>0?"em "+n:"há "+n:n},VV={full:"EEEE, d 'de' MMMM 'de' y",long:"d 'de' MMMM 'de' y",medium:"d MMM y",short:"dd/MM/yyyy"},KV={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},GV={full:"{{date}} 'às' {{time}}",long:"{{date}} 'às' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},YV={date:Ys({formats:VV,defaultWidth:"full"}),time:Ys({formats:KV,defaultWidth:"full"}),dateTime:Ys({formats:GV,defaultWidth:"full"})},XV={lastWeek:e=>{const t=e.getDay();return"'"+(t===0||t===6?"último":"última")+"' eeee 'às' p"},yesterday:"'ontem às' p",today:"'hoje às' p",tomorrow:"'amanhã às' p",nextWeek:"eeee 'às' p",other:"P"},JV=(e,t,r,n)=>{const a=XV[e];return typeof a=="function"?a(t):a},QV={narrow:["AC","DC"],abbreviated:["AC","DC"],wide:["antes de cristo","depois de cristo"]},ZV={narrow:["1","2","3","4"],abbreviated:["T1","T2","T3","T4"],wide:["1º trimestre","2º trimestre","3º trimestre","4º trimestre"]},eK={narrow:["j","f","m","a","m","j","j","a","s","o","n","d"],abbreviated:["jan","fev","mar","abr","mai","jun","jul","ago","set","out","nov","dez"],wide:["janeiro","fevereiro","março","abril","maio","junho","julho","agosto","setembro","outubro","novembro","dezembro"]},tK={narrow:["D","S","T","Q","Q","S","S"],short:["dom","seg","ter","qua","qui","sex","sab"],abbreviated:["domingo","segunda","terça","quarta","quinta","sexta","sábado"],wide:["domingo","segunda-feira","terça-feira","quarta-feira","quinta-feira","sexta-feira","sábado"]},rK={narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"manhã",afternoon:"tarde",evening:"tarde",night:"noite"},abbreviated:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"manhã",afternoon:"tarde",evening:"tarde",night:"noite"},wide:{am:"a.m.",pm:"p.m.",midnight:"meia-noite",noon:"meio-dia",morning:"manhã",afternoon:"tarde",evening:"tarde",night:"noite"}},nK={narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"da manhã",afternoon:"da tarde",evening:"da tarde",night:"da noite"},abbreviated:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"da manhã",afternoon:"da tarde",evening:"da tarde",night:"da noite"},wide:{am:"a.m.",pm:"p.m.",midnight:"meia-noite",noon:"meio-dia",morning:"da manhã",afternoon:"da tarde",evening:"da tarde",night:"da noite"}},aK=(e,t)=>{const r=Number(e);return(t==null?void 0:t.unit)==="week"?r+"ª":r+"º"},iK={ordinalNumber:aK,era:qn({values:QV,defaultWidth:"wide"}),quarter:qn({values:ZV,defaultWidth:"wide",argumentCallback:e=>e-1}),month:qn({values:eK,defaultWidth:"wide"}),day:qn({values:tK,defaultWidth:"wide"}),dayPeriod:qn({values:rK,defaultWidth:"wide",formattingValues:nK,defaultFormattingWidth:"wide"})},oK=/^(\d+)[ºªo]?/i,sK=/\d+/i,lK={narrow:/^(ac|dc|a|d)/i,abbreviated:/^(a\.?\s?c\.?|d\.?\s?c\.?)/i,wide:/^(antes de cristo|depois de cristo)/i},cK={any:[/^ac/i,/^dc/i],wide:[/^antes de cristo/i,/^depois de cristo/i]},uK={narrow:/^[1234]/i,abbreviated:/^T[1234]/i,wide:/^[1234](º)? trimestre/i},dK={any:[/1/i,/2/i,/3/i,/4/i]},fK={narrow:/^[jfmajsond]/i,abbreviated:/^(jan|fev|mar|abr|mai|jun|jul|ago|set|out|nov|dez)/i,wide:/^(janeiro|fevereiro|março|abril|maio|junho|julho|agosto|setembro|outubro|novembro|dezembro)/i},hK={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^fev/i,/^mar/i,/^abr/i,/^mai/i,/^jun/i,/^jul/i,/^ago/i,/^set/i,/^out/i,/^nov/i,/^dez/i]},pK={narrow:/^(dom|[23456]ª?|s[aá]b)/i,short:/^(dom|[23456]ª?|s[aá]b)/i,abbreviated:/^(dom|seg|ter|qua|qui|sex|s[aá]b)/i,wide:/^(domingo|(segunda|ter[cç]a|quarta|quinta|sexta)([- ]feira)?|s[aá]bado)/i},mK={short:[/^d/i,/^2/i,/^3/i,/^4/i,/^5/i,/^6/i,/^s[aá]/i],narrow:[/^d/i,/^2/i,/^3/i,/^4/i,/^5/i,/^6/i,/^s[aá]/i],any:[/^d/i,/^seg/i,/^t/i,/^qua/i,/^qui/i,/^sex/i,/^s[aá]b/i]},gK={narrow:/^(a|p|mn|md|(da) (manhã|tarde|noite))/i,any:/^([ap]\.?\s?m\.?|meia[-\s]noite|meio[-\s]dia|(d
506a) (manhã|tarde|noite))/i},vK={any:{am:/^a/i,pm:/^p/i,midnight:/^mn|^meia[-\s]noite/i,noon:/^md|^meio[-\s]dia/i,morning:/manhã/i,afternoon:/tarde/i,evening:/tarde/i,night:/noite/i}},yK={ordinalNumber:i$({matchPattern:oK,parsePattern:sK,valueCallback:e=>parseInt(e,10)}),era:Vn({matchPatterns:lK,defaultMatchWidth:"wide",parsePatterns:cK,defaultParseWidth:"any"}),quarter:Vn({matchPatterns:uK,defaultMatchWidth:"wide",parsePatterns:dK,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Vn({matchPatterns:fK,defaultMatchWidth:"wide",parsePatterns:hK,defaultParseWidth:"any"}),day:Vn({matchPatterns:pK,defaultMatchWidth:"wide",parsePatterns:mK,defaultParseWidth:"any"}),dayPeriod:Vn({matchPatterns:gK,defaultMatchWidth:"any",parsePatterns:vK,defaultParseWidth:"any"})},Xs={code:"pt-BR",formatDistance:qV,formatLong:YV,formatRelative:JV,localize:iK,match:yK,options:{weekStartsOn:0,firstWeekContainsDate:1}},bK=[{to:"/aluno/simulado",label:"Simulado ENEM",desc:"Treino livre por matéria",icon:Aw,accent:"electric"},{to:"/aluno/redacao",label:"Corretor de redação",desc:"Correção com IA pelos critérios",icon:Mw,accent:"electric"},{to:"/aluno/ebooks",label:"Ebooks",desc:"Sua biblioteca de materiais",icon:Go,accent:"gold"},{to:"/aluno/extras",label:"Materiais extras",desc:"Bônus e conteúdos liberados",icon:Am,accent:"gold"},{to:"/aluno/metodos",label:"Métodos de estudo",desc:"Pomodoro, Deep Work e mais",icon:Iw,accent:"electric"},{to:"/aluno/calendario",label:"Calendário",desc:"Marque seus dias estudados",icon:Td,accent:"gold"}],xK=()=>{var N,I,R,D,L;const{user:e}=Pt(),[t,r]=w.useState([]),[n,a]=w.useState(0),[i,o]=w.useState({objetivo:"Passar no Enem",faculdade_sonho:"",curso_interesse:""}),[s,l]=w.useState(!1),[c,d]=w.useState(i),[f,h]=w.useState(!1),[p,g]=w.useState(null),[m,v]=w.useState(!1),[x,b]=w.useState(null),[y,S]=w.useState("all");w.useEffect(()=>{e&&(async()=>{const M=Pn(new Date,{weekStartsOn:1}),C=Array.from({length:7},(J,ue)=>Et(M,ue)),P=Rt(Et(new Date,-60),"yyyy-MM-dd"),{data:B}=await ae.from("study_logs").select("study_date, minutes_studied").eq("user_id",e.id).gte("study_date",P).order("study_date",{ascending:!1}),U=new Set((B??[]).filter(J=>(J.minutes_studied??0)>0).map(J=>J.study_date));r(C.map(J=>({date:J,studied:U.has(Rt(J,"yyyy-MM-dd"))})));let F=0,V=new Date;for(;U.has(Rt(V,"yyyy-MM-dd"));)F++,V=Et(V,-1);a(F)})()},[e]),w.useEffect(()=>{e&&(async()=>{const{data:M}=await ae.from("aluno_objetivo").select("objetivo, faculdade_sonho, curso_interesse").eq("user_id",e.id).maybeSingle();if(M){const C={objetivo:M.objetivo??"Passar no Enem",faculdade_sonho:M.faculdade_sonho??"",curso_interesse:M.curso_interesse??""};o(C),d(C)}})()},[e]),w.useEffect(()=>{var P;const M=(P=i.curso_interesse)==null?void 0:P.trim();if(!M){g(null),b(null);return}let C=!1;return v(!0),b(null),S("all"),(async()=>{try{const B=`https://laphjllsupmdkevxqgqg.supabase.co/functions/v1/notas-corte-sisu?curso=${encodeURIComponent(M)}`,F=await(await fetch(B,{headers:{Authorization:"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImxhcGhqbGxzdXBtZGtldnhxZ3FnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NzY3MzU4NDEsImV4cCI6MjA5MjMxMTg0MX0.RK9TU1eSl8_Mi6qYNbULWgrSPe29HstVVa_sw7emSUI"}})).json();if(C)return;F.aviso&&b(F.aviso),g(F.resultados??[])}catch{C||(g([]),b("Não foi possível carregar as notas de corte agora."))}finally{C||v(!1)}})(),()=>{C=!0}},[i.curso_interesse]);const _=new Date,j=(N=t.find(M=>Gt(M.date,_)))==null?void 0:N.studied,k=((R=(I=e==null?void 0:e.user_metadata)==null?void 0:I.full_name)==null?void 0:R.split(" ")[0])??((D=e==null?void 0:e.email)==null?void 0:D.split("@")[0])??"",E=()=>{d(i),l(!0)},O=()=>{d(i),l(!1)},A=async()=>{var P,B,U;if(!e)return;h(!0);const M={user_id:e.id,objetivo:((P=c.objetivo)==null?void 0:P.trim())||null,faculdade_sonho:((B=c.faculdade_sonho)==null?void 0:B.trim())||null,curso_interesse:((U=c.curso_interesse)==null?void 0:U.trim())||null},{error:C}=await ae.from("aluno_objetivo").upsert(M,{onConflict:"user_id"});if(h(!1),C){ve.error("Erro ao salvar");return}o({objetivo:M.objetivo,faculdade_sonho:M.faculdade_sonho,curso_interesse:M.curso_interesse}),l(!1),ve.success("Objetivo atualizado")},T=(L=i.faculdade_sonho)==null?void 0:L.trim().toLowerCase();return u.jsx(cr,{children:u.jsx("div",{className:"relative min-h-full bg-premium-radial",children:u.jsxs("div",{className:"relative container mx-auto px-5 md:px-8 py-10 md:py-14 max-w-6xl space-y-10 md:space-y-12",children:[u.jsxs("header",{className:"space-y-3 animate-fade-up",children:[u.jsxs("div",{className:"flex items-center gap-2 text-[11px] font-semibold uppercase tracking-[0.22em] text-muted-foreground",children:[u.jsx("span",{className:"inline-block w-8 h-px bg-gradient-to-r from-transparent via-gold to-transparent"}),Rt(_,"EEEE, d 'de' MMMM",{locale:Xs})]}),u.jsxs("h1",{className:"font-display text-4xl md:text-6xl font-bold tracking-tight leading-[1.05]",children:["Bem-vindo",k?",":""," ",k&&u.jsx("span",{className:"text-gradient-premium",children:k})]}),u.jsx("p",{className:"text-base md:text-lg text-muted-foreground max-w-2xl",children:"Sua jornada de excelência continua. Foco hoje, conquista amanhã."})]}),u.jsxs("section",{className:"grid lg:grid-cols-[1.4fr_1fr] gap-6",children:[u.jsxs("div",{className:"glass-card rounded-3xl p-7 md:p-9 overflow-hidden relative",children:[u.jsx("div",{"aria-hidden":!0,
506className:"absolute -top-12 -right-12 w-48 h-48 rounded-full bg-electric/20 blur-3xl"}),u.jsx("div",{className:"flex items-start justify-between gap-4 flex-wrap relative",children:u.jsxs("div",{className:"flex items-center gap-4",children:[u.jsxs("div",{className:"relative",children:[u.jsx("div",{className:"absolute inset-0 rounded-2xl bg-gradient-gold blur-xl opacity-50"}),u.jsx("div",{className:"relative w-14 h-14 rounded-2xl bg-gradient-gold flex items-center justify-center shadow-gold-glow",children:u.jsx(Ta,{className:"w-6 h-6 text-white"})})]}),u.jsxs("div",{children:[u.jsx("p",{className:"text-[10px] font-bold uppercase tracking-[0.22em] text-muted-foreground",children:"Hora do foco"}),u.jsx("p",{className:"font-display font-semibold text-lg mt-1",children:j?"Meta de hoje conquistada":"Estude hoje pra manter o ritmo"})]})]})}),u.jsxs("div",{className:"mt-7 relative rounded-2xl border border-gold/30 bg-gradient-to-br from-gold/10 via-transparent to-electric/10 p-5 overflow-hidden",children:[u.jsx("div",{"aria-hidden":!0,className:"absolute -top-10 -left-10 w-40 h-40 rounded-full bg-gold/20 blur-3xl"}),u.jsxs("div",{className:"relative flex items-center gap-5 flex-wrap",children:[u.jsxs("div",{className:"relative shrink-0",children:[u.jsx("div",{className:"absolute inset-0 rounded-full bg-gold/30 blur-md"}),u.jsx("div",{className:"relative w-16 h-16 rounded-full bg-gradient-to-br from-gold to-amber flex items-center justify-center shadow-gold-glow",children:u.jsx(Yo,{className:"w-8 h-8 text-white drop-shadow"})})]}),u.jsxs("div",{className:"flex-1 min-w-[140px]",children:[u.jsxs("div",{className:"flex items-center gap-2 text-[10px] font-bold uppercase tracking-[0.2em] text-gold",children:[u.jsx(gl,{className:"w-3 h-3"})," Sua sequência"]}),u.jsxs("div",{className:"flex items-baseline gap-2 mt-1",children:[u.jsx("span",{className:"font-display text-5xl md:text-6xl font-bold tabular-nums text-gradient-gold",children:n}),u.jsx("span",{className:"text-sm text-muted-foreground font-medium",children:n===1?"dia consecutivo":"dias consecutivos"})]})]})]})]}),u.jsx("div",{className:"mt-7 grid grid-cols-7 gap-2",children:t.map((M,C)=>{const P=["S","T","Q","Q","S","S","D"][C],B=Gt(M.date,_);return u.jsxs("div",{className:"flex flex-col items-center gap-2",children:[u.jsx("span",{className:"text-[10px] font-bold text-muted-foreground uppercase tracking-widest",children:P}),u.jsx("div",{className:q("w-10 h-10 rounded-xl flex items-center justify-center border transition-all",M.studied?"bg-gradient-to-br from-electric to-electric-glow border-electric/40 text-white shadow-electric-glow":B?"border-gold/60 text-gold bg-gold/5":"border-border/60 text-muted-foreground/60 bg-card/40"),children:M.studied?u.jsx(Md,{className:"w-4 h-4"}):u.jsx(D2,{className:"w-3 h-3"})}),u.jsx("span",{className:"text-[10px] tabular-nums text-muted-foreground font-medium",children:Rt(M.date,"dd")})]},C)})}),u.jsxs("div",{className:"mt-7 flex gap-3 flex-wrap",children:[u.jsx(se,{asChild:!0,size:"lg",className:"bg-gradient-to-r from-electric to-electric-glow hover:opacity-90 text-white border-0 shadow-electric-glow",children:u.jsxs(Nr,{to:"/aluno/metodos",children:["Iniciar foco ",u.jsx(Nu,{className:"w-4 h-4"})]})}),u.jsx(se,{asChild:!0,size:"lg",variant:"outline",className:"border-border/60 backdrop-blur",children:u.jsx(Nr,{to:"/aluno/calendario",children:"Anotar no calendário"})})]})]}),u.jsxs("div",{className:"glass-card rounded-3xl p-7 md:p-8 relative overflow-hidden",children:[u.jsx("div",{"aria-hidden":!0,className:"absolute -bottom-16 -right-16 w-48 h-48 rounded-full bg-gold/15 blur-3xl"}),u.jsxs("div",{className:"flex items-start justify-between gap-3 relative",children:[u.jsxs("div",{children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("div",{className:"w-8 h-8 rounded-lg bg-electric/10 text-electric flex items-center justify-center shadow-electric-glow/30",children:u.jsx(qh,{className:"w-4 h-4"})}),u.jsx("h2",{className:"font-display font-semibold text-lg",children:"Sua jornada"})]}),u.jsx("p",{className:"text-xs text-muted-foreground mt-1.5 ml-10",children:"Personalize seu objetivo"})]}),s?u.jsxs("div",{className:"flex gap-1",children:[u.jsx(se,{size:"sm",variant:"ghost",onClick:O,disabled:f,children:u.jsx(Pu,{className:"w-4 h-4"})}),u.jsx(se,{size:"sm",onClick:A,disabled:f,className:"bg-gradient-to-r from-electric to-electric-glow text-white",children:f?u.jsx(Qe,{className:"w-4 h-4 animate-spin"}):u.jsx(Pm,{className:"w-4 h-4"})})]}):u.jsx(se,{size:"sm",variant:"ghost",onClick:E,className:"hover:bg-electric/10 hover:text-electric",children:u.jsx(z2,{className:"w-3.5 h-3.5"})})]}),s?u.jsxs("div",{className:"mt-6 space-y-3",children:[u.jsxs("div",{className:"space-y-1.5",children:[u.jsx(Me,{className:"text-[11px] uppercase tracking-wider font-bold text-muted-foreground",children:"Objetivo"}),u.jsx(gt,{value:c.objetivo??"",onChange:M=>d({...c,objetivo:M.target.value}),placeholder:"Ex: Passar no Enem"})]}),u.jsxs("div",{className:"space-y-1.5",children:[u.jsx(Me,{className:"text-[11px] uppercase tracking-wider font-bold text-muted-foreground",children:"Faculdade dos sonhos"}),u.jsx(gt,{value:c.faculdade_sonho??"",onChange:M=>d({...c,faculdade_sonho:M.target.value}),placeholder:"Ex: UFMG"})]}),u.jsxs("div",{className:"space-y-1.5",children:[u.jsx(Me,{className:"text-[11px] uppercase tracking-wider font-bold text-muted-foreground",children:"Curso de interesse"}),u.jsx(gt,{value:c.curso_interesse??"",onChange:M=>d({...c,curso_interesse:M.target.value}),placeholder:"Ex: Medicina"})]})]}):u.jsxs("div",{className:"mt-6 space-y-4 relative",children:[u.jsx(Uv,{icon:qh,accent:"electric",label:"Objetivo",value:i.objetivo}),u.jsx(Uv,{icon:F2,accent:"gold",label:"Faculdade dos sonhos",value:i.faculdade_sonho}),u.jsx(Uv,{icon:Go,accent:"electric",label:"Curso de interesse",value:i.curso_interesse})]})]})]}),u.jsxs("section",{children:[u.jsx("div",{className:"flex items-end justify-between mb-6",children:u.jsxs("div",{children:[u.jsx("p",{className:"text-[11px] font-bold uppercase tracking-[0.22em] text-muted-foreground",children:"Acessos rápidos"}),u.jsx("h2",{className:"font-display text-2xl md:text-3xl font-bold mt-2 tracking-tight",children:"Continue de onde parou"})]})}),u.jsx("div",{className:"grid gap-5 sm:grid-cols-2 lg:grid-cols-3",children:bK.map(M=>{const C=M.icon,P=M.accent==="gold";return u.jsxs(Nr,{to:M.to,className:q("group relative glass-card rounded-2xl p-6 overflow-hidden transition-all duration-500","hover:-translate-y-1.5",P?"hover:shadow-gold-glow":"hover:shadow-electric-glow"),children:[u.jsx("div",{"aria-hidden":!0,
506className:q("absolute -inset-px rounded-2xl opacity-0 group-hover:opacity-100 transition-opacity duration-500 pointer-events-none",P?"bg-gradient-to-br from-gold/15 via-transparent to-transparent":"bg-gradient-to-br from-electric/15 via-transparent to-transparent")}),u.jsx("div",{"aria-hidden":!0,className:q("absolute -top-12 -right-12 w-32 h-32 rounded-full blur-3xl opacity-0 group-hover:opacity-100 transition-opacity duration-700",P?"bg-gold/30":"bg-electric/30")}),u.jsxs("div",{className:"relative flex items-start justify-between mb-5",children:[u.jsx("div",{className:q("w-12 h-12 rounded-xl flex items-center justify-center transition-all duration-500","border",P?"bg-gold/10 border-gold/30 text-gold group-hover:shadow-gold-glow group-hover:scale-110":"bg-electric/10 border-electric/30 text-electric group-hover:shadow-electric-glow group-hover:scale-110"),children:u.jsx(C,{className:"w-5 h-5"})}),u.jsx(Nu,{className:q("w-5 h-5 text-muted-foreground/40 transition-all duration-500","group-hover:translate-x-0.5 group-hover:-translate-y-0.5",P?"group-hover:text-gold":"group-hover:text-electric")})]}),u.jsx("p",{className:"relative font-display font-semibold text-base tracking-tight",children:M.label}),u.jsx("p",{className:"relative text-sm text-muted-foreground mt-1.5 line-clamp-2 leading-relaxed",children:M.desc})]},M.to)})})]}),i.curso_interesse&&u.jsxs("section",{className:"glass-card rounded-3xl p-7 md:p-9 relative overflow-hidden",children:[u.jsx("div",{"aria-hidden":!0,className:"absolute -top-16 -left-16 w-48 h-48 rounded-full bg-electric/15 blur-3xl"}),u.jsxs("div",{className:"relative flex items-center justify-between gap-3 flex-wrap",children:[u.jsx("div",{children:u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx("div",{className:"w-10 h-10 rounded-xl bg-electric/10 border border-electric/30 text-electric flex items-center justify-center shadow-electric-glow/40",children:u.jsx(tF,{className:"w-5 h-5"})}),u.jsxs("div",{children:[u.jsxs("h2",{className:"font-display font-semibold text-xl tracking-tight",children:["Notas de corte · ",u.jsx("span",{className:"text-gradient-premium",children:i.curso_interesse})]}),u.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:"Comparativo nas principais universidades · SISU 2024.1"})]})]})}),u.jsx(Bu,{variant:"outline",className:"text-[10px] border-gold/40 text-gold bg-gold/5",children:"Ampla concorrência"})]}),m?u.jsx("div",{className:"mt-8 flex items-center justify-center py-10",children:u.jsx(Qe,{className:"w-6 h-6 animate-spin text-electric"})}):x?u.jsx("p",{className:"mt-5 text-sm text-muted-foreground",children:x}):p&&p.length>0?(()=>{const M=Array.from(new Set(p.map(P=>P.uf))).sort(),C=y==="all"?p:p.filter(P=>P.uf===y);return u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"mt-6 flex items-center gap-2 flex-wrap",children:[u.jsx(Me,{className:"text-xs text-muted-foreground font-semibold",children:"Filtrar por estado:"}),u.jsxs(Gn,{value:y,onValueChange:S,children:[u.jsx(yn,{className:"h-9 w-[200px] text-xs bg-card/50 backdrop-blur border-border/60",children:u.jsx(Yn,{placeholder:"Todos os estados"})}),u.jsxs(bn,{children:[u.jsx(Wr,{value:"all",children:"Todos os estados"}),M.map(P=>u.jsx(Wr,{value:P,children:P},P))]})]}),y!=="all"&&u.jsxs(se,{size:"sm",variant:"ghost",className:"h-9 text-xs",onClick:()=>S("all"),children:[u.jsx(Pu,{className:"w-3 h-3 mr-1"})," limpar"]}),u.jsxs("span",{className:"text-[11px] text-muted-foreground ml-auto font-medium",children:[C.length," ",C.length===1?"faculdade":"faculdades"]})]}),C.length===0?u.jsxs("p",{className:"mt-8 text-sm text-muted-foreground text-center py-6",children:["Nenhuma faculdade encontrada em ",y," para este curso."]}):u.jsx("div",{className:"mt-6 -mx-7 md:-mx-9",children:u.jsx("div",{className:"overflow-x-auto",children:u.jsxs("table",{className:"w-full text-sm",children:[u.jsx("thead",{children:u.jsxs("tr",{className:"text-left text-[10px] font-bold uppercase tracking-[0.18em] text-muted-foreground border-y border-border/60",children:[u.jsx("th",{className:"px-7 md:px-9 py-3",children:"Faculdade"}),u.jsx("th",{className:"px-3 py-3",children:"Cidade/UF"}),u.jsx("th",{className:"px-3 py-3",children:"Modalidade"}),u.jsx("th",{className:"px-7 md:px-9 py-3 text-right",children:"Nota de corte"})]})}),u.jsx("tbody",{children:C.map((P,B)=>{const U=T?P.sigla.toLowerCase()===T||P.faculdade.toLowerCase().includes(T):!1;return u.jsxs("tr",{className:q("border-b border-border/40 last:border-0 transition-colors",U?"bg-gold/5":"hover:bg-electric/5"),children:[u.jsx("td",{className:"px-7 md:px-9 py-4",children:u.jsxs("div",{className:"flex items-center gap-2.5",children:[u.jsx("span",{className:q("font-bold text-[11px] px-2 py-0.5 rounded-md border",U?"bg-gold/10 border-gold/40 text-gold":"bg-muted border-transparent"),children:P.sigla}),u.jsx("span",{className:"text-xs text-muted-foreground line-clamp-1",children:P.faculdade}),U&&u.jsxs(Bu,{className:"text-[9px] h-4 bg-gradient-gold border-0 text-white",children:[u.jsx(gl,{className:"w-2.5 h-2.5 mr-0.5"})," Sua escolha"]})]})}),u.jsxs("td",{className:"px-3 py-4 text-xs text-muted-foreground whitespace-nowrap",children:[P.cidade,"/",P.uf]}),u.jsx("td",{className:"px-3 py-4 text-xs text-muted-foreground",children:P.modalidade}),u.jsx("td",{className:"px-7 md:px-9 py-4 text-right",children:u.jsx("span",{className:q("font-display font-bold tabular-nums text-base",U?"text-gradient-gold":""),children:P.nota.toFixed(2)})})]},B)})})]})})})]})})():u.jsx("p",{className:"mt-5 text-sm text-muted-foreground",children:"Sem dados para este curso ainda."}
506),u.jsxs("p",{className:"mt-5 text-[11px] text-muted-foreground/80 flex items-center gap-1.5",children:[u.jsx(VB,{className:"w-3 h-3"}),"Fonte: dados consolidados do SISU 2024.1. Valores podem variar a cada edição."]})]})]})})})},Uv=({icon:e,accent:t,label:r,value:n})=>{const a=t==="gold";return u.jsxs("div",{className:"flex items-start gap-3",children:[u.jsx("div",{className:q("w-9 h-9 shrink-0 rounded-lg border flex items-center justify-center mt-0.5",a?"bg-gold/10 border-gold/30 text-gold":"bg-electric/10 border-electric/30 text-electric"),children:u.jsx(e,{className:"w-4 h-4"})}),u.jsxs("div",{className:"min-w-0 flex-1",children:[u.jsx("p",{className:"text-[10px] font-bold uppercase tracking-[0.18em] text-muted-foreground",children:r}),u.jsx("p",{className:"font-display font-semibold text-base mt-0.5 truncate",children:n||"—"})]})]})},wK={sm:"max-w-2xl",md:"max-w-3xl",lg:"max-w-4xl",xl:"max-w-6xl",full:"max-w-7xl"},Er=({children:e,className:t,maxWidth:r="xl"})=>u.jsx("div",{className:"relative min-h-full bg-premium-radial",children:u.jsx("div",{className:q("relative container mx-auto px-5 md:px-8 py-10 md:py-14",wK[r],t),children:e})}),za=({eyebrow:e,title:t,description:r,actions:n})=>u.jsxs("header",{className:"space-y-3 animate-fade-up mb-10 md:mb-12",children:[e&&u.jsxs("div",{className:"flex items-center gap-2 text-[11px] font-semibold uppercase tracking-[0.22em] text-muted-foreground",children:[u.jsx("span",{className:"inline-block w-8 h-px bg-gradient-to-r from-transparent via-gold to-transparent"}),e]}),u.jsxs("div",{className:"flex items-end justify-between gap-4 flex-wrap",children:[u.jsx("h1",{className:"font-display text-3xl md:text-5xl font-bold tracking-tight leading-[1.05]",children:t}),n&&u.jsx("div",{className:"flex gap-2",children:n})]}),r&&u.jsx("p",{className:"text-base md:text-lg text-muted-foreground max-w-2xl",children:r})]}),$e=({children:e,className:t,glow:r,...n})=>u.jsx("div",{...n,className:q("glass-card rounded-3xl relative overflow-hidden",r==="gold"&&"shadow-gold-glow",r==="electric"&&"shadow-electric-glow",t),children:e}),ap=[{value:"geral",label:"Geral",emoji:"📚"},{value:"matematica",label:"Matemática",emoji:"🔢"},{value:"linguagens",label:"Linguagens",emoji:"📖"},{value:"humanas",label:"Humanas",emoji:"🌎"},{value:"natureza",label:"Natureza",emoji:"🧪"},{value:"redacao",label:"Redação",emoji:"✍️"},{value:"metodo",label:"Método",emoji:"🎯"}],ip=e=>ap.find(t=>t.value===e)??ap[0],Rf=new Map,_K=({productId:e,title:t,category:r,coverImage:n,className:a})=>{const[i,o]=w.useState(n||Rf.get(e)||null),s=ip(r||"geral");return w.useEffect(()=>{if(n){o(n);return}if(Rf.has(e)){o(Rf.get(e));return}let l=!1;return(async()=>{const c=localStorage.getItem("session_token")||"",{data:d,error:f}=await ae.functions.invoke("get-ebook-page",{body:{product_id:e,page:1,preview:!0},headers:{"x-session-token":c}});!l&&!f&&(d!=null&&d.url)&&(Rf.set(e,d.url),o(d.url))})(),()=>{l=!0}},[e,n]),i?u.jsx("img",{src:i,alt:t,className:a,loading:"lazy"}):u.jsxs("div",{className:"w-full h-full relative flex flex-col justify-between p-4 bg-gradient-to-br from-electric/30 via-background to-gold/20",children:[u.jsx("div",{className:"absolute inset-0 bg-[radial-gradient(circle_at_30%_20%,hsl(var(--gold)/0.18),transparent_60%),radial-gradient(circle_at_80%_85%,hsl(var(--electric)/0.22),transparent_55%)]"}),u.jsx("div",{className:"absolute inset-x-4 top-1/2 -translate-y-1/2 h-px bg-gradient-to-r from-transparent via-gold/40 to-transparent"}),u.jsxs("div",{className:"relative flex items-center gap-1.5 text-[9px] font-bold uppercase tracking-[0.2em] text-gold/80",children:[u.jsx("span",{children:s.emoji}),u.jsx("span",{children:s.label})]}),u.jsxs("div",{className:"relative space-y-2",children:[u.jsx(Go,{className:"w-7 h-7 text-electric/50"}),u.jsx("p",{className:"font-display font-bold text-base leading-tight text-foreground/90 line-clamp-3",children:t})]})]})},SK=()=>{const{user:e}=Pt(),[t,r]=w.useState([]),[n,a]=w.useState(!0),[i,o]=w.useState("all"),[s,l]=w.useState("");w.useEffect(()=>{e&&(async()=>{const{data:h,error:p}=await ae.from("purchases").select("id, purchased_at, product:products(id, slug, title, description, cover_image, total_pages, category)").eq("user_id",e.id).eq("status","active").order("purchased_at",{ascending:!1});!p&&h&&r(h),a(!1)})()},[e]);const c=w.useMemo(()=>{const h=new Map;return t.forEach(p=>{const g=p.product.category||"geral";h.set(g,(h.get(g)||0)+1)}),h},[t]),d=w.useMemo(()=>{const h=s.trim().toLowerCase();return t.filter(p=>{const g=p.product.category||"geral";return i!=="all"&&g!==i?!1:h?p.product.title.toLowerCase().includes(h)||(p.product.description||"").toLowerCase().includes(h):!0})},[t,i,s]),f=ap.filter(h=>(c.get(h.value)||0)>0);return u.jsx(cr,{children:u.jsxs(Er,{children:[u.jsx(za,{eyebrow:"Sua biblioteca",title:u.jsxs(u.Fragment,{children:["Seus ",u.jsx("span",{className:"text-gradient-premium",children:"ebooks"})]}),description:"Acesse os materiais que você liberou. Cada obra é uma chave para o seu próximo passo."}),n?u.jsx("div",{className:"py-16 flex justify-center",children:u.jsx(Qe,{className:"w-6 h-6 animate-spin text-electric"})}):t.length===0?u.jsxs($e,{className:"p-12 text-center space-y-4",children:[u.jsx("div",{className:"w-16 h-16 mx-auto rounded-2xl bg-gold/10 border border-gold/30 flex items-center justify-center shadow-gold-glow",children:u.jsx(JB,{className:"w-7 h-7 text-gold"})}),u.jsxs("div",{children:[u.jsx("p",{className:"font-display font-semibold text-lg",children:"Sua biblioteca está vazia"}),u.jsx("p",{className:"text-sm text-muted-foreground mt-1.5 max-w-md mx-auto",children:"Após a confirmação do pagamento, seus ebooks aparecem aqui automaticamente."})]}),u.jsx(se,{asChild:!0,size:"lg",className:"bg-gradient-to-r from-electric to-electric-glow hover:opacity-90 text-white border-0 shadow-electric-glow",children:u.jsx(Nr,{to:"/#oferta",children:"Ver ofertas"})})]}):u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"space-y-4 mb-8 md:mb-10",children:[u.jsxs("div",{className:"relative max-w-md group",children:[u.jsx(Rw,{className:"absolute left-4 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground group-focus-within:text-electric transition-colors z-10"}),u.jsx(gt,{value:s,onChange:h=>l(h.target.value),placeholder:"Buscar ebook...",className:"pl-11 h-11 rounded-full bg-card/40 border-border/40 backdrop-blur-md focus-visible:ring-1 focus-visible:ring-electric/40 focu
506s-visible:ring-offset-0 focus-visible:border-electric/40 transition-all"})]}),f.length>1&&u.jsxs("div",{className:"flex flex-wrap gap-2",children:[u.jsxs("button",{onClick:()=>o("all"),className:q("px-4 py-1.5 rounded-full text-sm font-medium border transition-all",i==="all"?"bg-gradient-to-r from-electric to-electric-glow text-white border-transparent shadow-electric-glow":"bg-card/60 border-border/60 hover:border-electric/40 text-muted-foreground hover:text-foreground"),children:["Todos ",u.jsxs("span",{className:"opacity-70 ml-1",children:["(",t.length,")"]})]}),f.map(h=>{const p=i===h.value;return u.jsxs("button",{onClick:()=>o(h.value),className:q("px-4 py-1.5 rounded-full text-sm font-medium border transition-all",p?"bg-gradient-to-r from-electric to-electric-glow text-white border-transparent shadow-electric-glow":"bg-card/60 border-border/60 hover:border-electric/40 text-muted-foreground hover:text-foreground"),children:[u.jsx("span",{className:"mr-1",children:h.emoji}),h.label,u.jsxs("span",{className:"opacity-70 ml-1",children:["(",c.get(h.value),")"]})]},h.value)})]})]}),d.length===0?u.jsx($e,{className:"p-10 text-center",children:u.jsx("p",{className:"text-muted-foreground",children:"Nenhum ebook encontrado com esse filtro."})}):u.jsx("div",{className:"grid gap-5 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4",children:d.map(h=>{const p=ip(h.product.category||"geral");return u.jsxs($e,{className:"group flex flex-col transition-all duration-500 hover:-translate-y-1.5 hover:shadow-gold-glow",children:[u.jsx("div",{"aria-hidden":!0,className:"absolute -top-12 -right-12 w-32 h-32 rounded-full bg-gold/20 blur-3xl opacity-0 group-hover:opacity-100 transition-opacity duration-700"}),u.jsxs("div",{className:"aspect-[3/4] bg-muted relative overflow-hidden rounded-t-3xl",children:[u.jsx(_K,{productId:h.product.id,title:h.product.title,category:h.product.category||"geral",coverImage:h.product.cover_image,className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-700"}),u.jsx("div",{className:"absolute inset-x-0 bottom-0 h-20 bg-gradient-to-t from-black/40 to-transparent pointer-events-none"}),u.jsx("div",{className:"absolute top-2.5 left-2.5 z-10",children:u.jsxs("span",{className:"inline-flex items-center gap-1.5 px-2 py-0.5 rounded-full bg-background/70 backdrop-blur-md border border-white/10 text-[9px] font-semibold uppercase tracking-[0.14em] text-foreground/90 shadow-lg",children:[u.jsx("span",{className:"w-1 h-1 rounded-full bg-gold shadow-gold-glow"}),p.label]})})]}),u.jsxs("div",{className:"relative p-4 space-y-2.5 flex-1 flex flex-col",children:[u.jsxs("div",{className:"flex-1 min-h-0",children:[u.jsx("h3",{className:"font-display font-semibold text-sm leading-tight tracking-tight line-clamp-2",children:h.product.title}),u.jsxs("p",{className:"text-[10px] uppercase tracking-[0.18em] font-bold text-gold mt-2",children:[h.product.total_pages," páginas"]})]}),u.jsx(se,{asChild:!0,size:"sm",className:"w-full h-8 text-xs bg-gradient-to-r from-electric to-electric-glow hover:opacity-90 text-white border-0 group-hover:shadow-electric-glow",children:u.jsxs(Nr,{to:`/aluno/ler/${h.product.slug}`,children:["Ler agora ",u.jsx(Nu,{className:"w-3.5 h-3.5"})]})})]})]},h.id)})})]})]})})};var jK=Array.isArray,mr=jK,kK=typeof Qd=="object"&&Qd&&Qd.Object===Object&&Qd,f$=kK,EK=f$,OK=typeof self=="object"&&self&&self.Object===Object&&self,NK=EK||OK||Function("return this")(),la=NK,PK=la,CK=PK.Symbol,Dd=CK,Nk=Dd,h$=Object.prototype,TK=h$.hasOwnProperty,AK=h$.toString,Ec=Nk?Nk.toStringTag:void 0;
vendor: 5,356 bytes, line 506
506function MK(e){var t=TK.call(e,Ec),r=e[Ec];try{e[Ec]=void 0;var n=!0}catch{}var a=AK.call(e);return n&&(t?e[Ec]=r:delete e[Ec]),a}var $K=MK,RK=Object.prototype,IK=RK.toString;function DK(e){return IK.call(e)}var LK=DK,Pk=Dd,BK=$K,FK=LK,UK="[object Null]",zK="[object Undefined]",Ck=Pk?Pk.toStringTag:void 0;function WK(e){return e==null?e===void 0?zK:UK:Ck&&Ck in Object(e)?BK(e):FK(e)}var Wa=WK;function HK(e){return e!=null&&typeof e=="object"}var Ha=HK,qK=Wa,VK=Ha,KK="[object Symbol]";function GK(e){return typeof e=="symbol"||VK(e)&&qK(e)==KK}var tc=GK,YK=mr,XK=tc,JK=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,QK=/^\w*$/;function ZK(e,t){if(YK(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||XK(e)?!0:QK.test(e)||!JK.test(e)||t!=null&&e in Object(t)}var u1=ZK;function eG(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Ui=eG;const rc=Fe(Ui);var tG=Wa,rG=Ui,nG="[object AsyncFunction]",aG="[object Function]",iG="[object GeneratorFunction]",oG="[object Proxy]";function sG(e){if(!rG(e))return!1;var t=tG(e);return t==aG||t==iG||t==nG||t==oG}var d1=sG;const xe=Fe(d1);var lG=la,cG=lG["__core-js_shared__"],uG=cG,zv=uG,Tk=function(){var e=/[^.]+$/.exec(zv&&zv.keys&&zv.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function dG(e){return!!Tk&&Tk in e}var fG=dG,hG=Function.prototype,pG=hG.toString;function mG(e){if(e!=null){try{return pG.call(e)}catch{}try{return e+""}catch{}}return""}var p$=mG,gG=d1,vG=fG,yG=Ui,bG=p$,xG=/[\\^$.*+?()[\]{}|]/g,wG=/^\[object .+?Constructor\]$/,_G=Function.prototype,SG=Object.prototype,jG=_G.toString,kG=SG.hasOwnProperty,EG=RegExp("^"+jG.call(kG).replace(xG,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function OG(e){if(!yG(e)||vG(e))return!1;var t=gG(e)?EG:wG;return t.test(bG(e))}var NG=OG;function PG(e,t){return e==null?void 0:e[t]}var CG=PG,TG=NG,AG=CG;function MG(e,t){var r=AG(e,t);return TG(r)?r:void 0}var Xo=MG,$G=Xo,RG=$G(Object,"create"),Ym=RG,Ak=Ym;function IG(){this.__data__=Ak?Ak(null):{},this.size=0}var DG=IG;function LG(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var BG=LG,FG=Ym,UG="__lodash_hash_undefined__",zG=Object.prototype,WG=zG.hasOwnProperty;function HG(e){var t=this.__data__;if(FG){var r=t[e];return r===UG?void 0:r}return WG.call(t,e)?t[e]:void 0}var qG=HG,VG=Ym,KG=Object.prototype,GG=KG.hasOwnProperty;function YG(e){var t=this.__data__;return VG?t[e]!==void 0:GG.call(t,e)}var XG=YG,JG=Ym,QG="__lodash_hash_undefined__";function ZG(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=JG&&t===void 0?QG:t,this}var eY=ZG,tY=DG,rY=BG,nY=qG,aY=XG,iY=eY;function nc(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}nc.prototype.clear=tY;nc.prototype.delete=rY;nc.prototype.get=nY;nc.prototype.has=aY;nc.prototype.set=iY;var oY=nc;function sY(){this.__data__=[],this.size=0}var lY=sY;function cY(e,t){return e===t||e!==e&&t!==t}var f1=cY,uY=f1;function dY(e,t){for(var r=e.length;r--;)if(uY(e[r][0],t))return r;return-1}var Xm=dY,fY=Xm,hY=Array.prototype,pY=hY.splice;function mY(e){var t=this.__data__,r=fY(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():pY.call(t,r,1),--this.size,!0}var gY=mY,vY=Xm;function yY(e){var t=this.__data__,r=vY(t,e);return r<0?void 0:t[r][1]}var bY=yY,xY=Xm;function wY(e){return xY(this.__data__,e)>-1}var _Y=wY,SY=Xm;function jY(e,t){var r=this.__data__,n=SY(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var kY=jY,EY=lY,OY=gY,NY=bY,PY=_Y,CY=kY;function ac(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}ac.prototype.clear=EY;ac.prototype.delete=OY;ac.prototype.get=NY;ac.prototype.has=PY;ac.prototype.set=CY;var Jm=ac,TY=Xo,AY=la,MY=TY(AY,"Map"),h1=MY,Mk=oY,$Y=Jm,RY=h1;function IY(){this.size=0,this.__data__={hash:new Mk,map:new(RY||$Y),string:new Mk}}var DY=IY;function LY(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var BY=LY,FY=BY;function UY(e,t){var r=e.__data__;return FY(t)?r[typeof t=="string"?"string":"hash"]:r.map}var Qm=UY,zY=Qm;function WY(e){var t=zY(this,e).delete(e);return this.size-=t?1:0,t}var HY=WY,qY=Qm;function VY(e){return qY(this,e).get(e)}var KY=VY,GY=Qm;function YY(e){return GY(this,e).has(e)}var XY=YY,JY=Qm;function QY(e,t){var r=JY(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var ZY=QY,eX=DY,tX=HY,rX=KY,nX=XY,aX=ZY;function ic(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}ic.prototype.clear=eX;ic.prototype.delete=tX;ic.prototype.get=rX;ic.prototype.has=nX;ic.prototype.set=aX;var p1=ic,m$=p1,iX="Expected a function";function m1(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(iX);var r=function(){var n=arguments,a=t?t.apply(this,n):n[0],i=r.cache;if(i.has(a))return i.get(a);var o=e.apply(this,n);return r.cache=i.set(a,o)||i,o};return r.cache=new(m1.Cache||m$),r}m1.Cache=m$;var g$=m1;const oX=Fe(g$);var sX=g$,lX=500;function cX(e){var t=sX(e,function(n){return r.size===lX&&r.clear(),n}),r=t.cache;return t}var uX=cX,dX=uX,fX=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,hX=/\\(\\)?/g,pX=dX(function(e){var t=[];return e.charCodeAt(0)===46&&t.pu
vendor: 6,431 bytes, lines 506-514
506sh(""),e.replace(fX,function(r,n,a,i){t.push(a?i.replace(hX,"$1"):n||r)}),t}),mX=pX;function gX(e,t){for(var r=-1,n=e==null?0:e.length,a=Array(n);++r<n;)a[r]=t(e[r],r,e);return a}var g1=gX,$k=Dd,vX=g1,yX=mr,bX=tc,xX=1/0,Rk=$k?$k.prototype:void 0,Ik=Rk?Rk.toString:void 0;function v$(e){if(typeof e=="string")return e;if(yX(e))return vX(e,v$)+"";if(bX(e))return Ik?Ik.call(e):"";var t=e+"";return t=="0"&&1/e==-xX?"-0":t}var wX=v$,_X=wX;function SX(e){return e==null?"":_X(e)}var y$=SX,jX=mr,kX=u1,EX=mX,OX=y$;function NX(e,t){return jX(e)?e:kX(e,t)?[e]:EX(OX(e))}var b$=NX,PX=tc,CX=1/0;function TX(e){if(typeof e=="string"||PX(e))return e;var t=e+"";return t=="0"&&1/e==-CX?"-0":t}var Zm=TX,AX=b$,MX=Zm;function $X(e,t){t=AX(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[MX(t[r++])];return r&&r==n?e:void 0}var v1=$X,RX=v1;function IX(e,t,r){var n=e==null?void 0:RX(e,t);return n===void 0?r:n}var x$=IX;const Vr=Fe(x$);function DX(e){return e==null}var LX=DX;const Ce=Fe(LX);var BX=Wa,FX=mr,UX=Ha,zX="[object String]";function WX(e){return typeof e=="string"||!FX(e)&&UX(e)&&BX(e)==zX}var HX=WX;const Bo=Fe(HX);var w$={exports:{}},Ie={};/**
507 * @license React
508 * react-is.production.min.js
509 *
510 * Copyright (c) Facebook, Inc. and its affiliates.
511 *
512 * This source code is licensed under the MIT license found in the
513 * LICENSE file in the root directory of this source tree.
514 */var y1=Symbol.for("react.element"),b1=Symbol.for("react.portal"),eg=Symbol.for("react.fragment"),tg=Symbol.for("react.strict_mode"),rg=Symbol.for("react.profiler"),ng=Symbol.for("react.provider"),ag=Symbol.for("react.context"),qX=Symbol.for("react.server_context"),ig=Symbol.for("react.forward_ref"),og=Symbol.for("react.suspense"),sg=Symbol.for("react.suspense_list"),lg=Symbol.for("react.memo"),cg=Symbol.for("react.lazy"),VX=Symbol.for("react.offscreen"),_$;_$=Symbol.for("react.module.reference");function Jr(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case y1:switch(e=e.type,e){case eg:case rg:case tg:case og:case sg:return e;default:switch(e=e&&e.$$typeof,e){case qX:case ag:case ig:case cg:case lg:case ng:return e;default:return t}}case b1:return t}}}Ie.ContextConsumer=ag;Ie.ContextProvider=ng;Ie.Element=y1;Ie.ForwardRef=ig;Ie.Fragment=eg;Ie.Lazy=cg;Ie.Memo=lg;Ie.Portal=b1;Ie.Profiler=rg;Ie.StrictMode=tg;Ie.Suspense=og;Ie.SuspenseList=sg;Ie.isAsyncMode=function(){return!1};Ie.isConcurrentMode=function(){return!1};Ie.isContextConsumer=function(e){return Jr(e)===ag};Ie.isContextProvider=function(e){return Jr(e)===ng};Ie.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===y1};Ie.isForwardRef=function(e){return Jr(e)===ig};Ie.isFragment=function(e){return Jr(e)===eg};Ie.isLazy=function(e){return Jr(e)===cg};Ie.isMemo=function(e){return Jr(e)===lg};Ie.isPortal=function(e){return Jr(e)===b1};Ie.isProfiler=function(e){return Jr(e)===rg};Ie.isStrictMode=function(e){return Jr(e)===tg};Ie.isSuspense=function(e){return Jr(e)===og};Ie.isSuspenseList=function(e){return Jr(e)===sg};Ie.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===eg||e===rg||e===tg||e===og||e===sg||e===VX||typeof e=="object"&&e!==null&&(e.$$typeof===cg||e.$$typeof===lg||e.$$typeof===ng||e.$$typeof===ag||e.$$typeof===ig||e.$$typeof===_$||e.getModuleId!==void 0)};Ie.typeOf=Jr;w$.exports=Ie;var KX=w$.exports,GX=Wa,YX=Ha,XX="[object Number]";function JX(e){return typeof e=="number"||YX(e)&&GX(e)==XX}var S$=JX;const QX=Fe(S$);var ZX=S$;function eJ(e){return ZX(e)&&e!=+e}var tJ=eJ;const Ld=Fe(tJ);var xn=function(t){return t===0?0:t>0?1:-1},uo=function(t){return Bo(t)&&t.indexOf("%")===t.length-1},Y=function(t){return QX(t)&&!Ld(t)},rJ=function(t){return Ce(t)},_t=function(t){return Y(t)||Bo(t)},nJ=0,ug=function(t){var r=++nJ;return"".concat(t||"").concat(r)},Fo=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!Y(t)&&!Bo(t))return n;var i;if(uo(t)){var o=t.indexOf("%");i=r*parseFloat(t.slice(0,o))/100}else i=+t;return Ld(i)&&(i=n),a&&i>r&&(i=r),i},li=function(t){if(!t)return null;var r=Object.keys(t);return r&&r.length?t[r[0]]:null},aJ=function(t){if(!Array.isArray(t))return!1;for(var r=t.length,n={},a=0;a<r;a++)if(!n[t[a]])n[t[a]]=!0;else return!0;return!1},ms=function(t,r){return Y(t)&&Y(r)?function(n){return t+n*(r-t)}:function(){return r}};function tb(e,t,r){return!e||!e.length?null:e.find(function(n){return n&&(typeof t=="function"?t(n):Vr(n,t))===r})}var iJ=function(t,r){return Y(t)&&Y(r)?t-r:Bo(t)&&Bo(r)?t.localeCompare(r):t instanceof Date&&r instanceof Date?t.getTime()-r.getTime():String(t).localeCompare(String(r))};function Js(e,t){for(var r in e)if({}.hasOwnProperty.call(e,r)&&(!{}.hasOwnProperty.call(t,r)||e[r]!==t[r]))return!1;for(var n in t)if({}.hasOwnProperty.call(t,n)&&!{}.hasOwnProperty.call(e,n))return!1;return!0}function rb(e){"@babel/helpers - typeof";return rb=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},rb(e)}var oJ=["viewBox","children"],sJ=["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRen
514dering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"],Dk=["points","pathLength"],Wv={svg:oJ,polygon:Dk,polyline:Dk},x1=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDrag
514Capture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"],op=function(t,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var n=t;if(w.isValidElement(t)&&(n=t.props),!rc(n))return null;var a={};return Object.keys(n).forEach(function(i){x1.includes(i)&&(a[i]=r||function(o){return n[i](n,o)})}),a},lJ=function(t,r,n){return function(a){return t(r,n,a),null}},sp=function(t,r,n){if(!rc(t)||rb(t)!=="object")return null;var a=null;return Object.keys(t).forEach(function(i){var o=t[i];x1.includes(i)&&typeof o=="function"&&(a||(a={}),a[i]=lJ(o,r,n))}),a},cJ=["children"],uJ=["children"];function Lk(e,t){if(e==null)return{};var r=dJ(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function dJ(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var Bk={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart",contextmenu:"onContextMenu",dblclick:"onDoubleClick"},ja=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},Fk=null,Hv=null,w1=function e(t){if(t===Fk&&Array.isArray(Hv))return Hv;var r=[];return w.Children.forEach(t,function(n){Ce(n)||(KX.isFragment(n)?r=r.concat(e(n.props.children)):r.push(n))}),Hv=r,Fk=t,r};function Sn(e,t){var r=[],n=[];return Array.isArray(t)?n=t.map(function(a){return ja(a)}):n=[ja(t)],w1(e).forEach(function(a){var i=Vr(a,"type.displayName")||Vr(a,"type.name");n.indexOf(i)!==-1&&r.push(a)}),r}function wr(e,t){var r=Sn(e,t);return r&&r[0]}var Uk=function(t){if(!t||!t.props)return!1;var r=t.props,n=r.width,a=r.height;return!(!Y(n)||n<=0||!Y(a)||a<=0)},fJ=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],hJ=function(t){return t&&t.type&&Bo(t.type)&&fJ.indexOf(t.type)>=0},pJ=function(t,r,n,a){var i,o=(i=Wv==null?void 0:Wv[a])!==null&&i!==void 0?i:[];return r.startsWith("data-")||!xe(t)&&(a&&o.includes(r)||sJ.includes(r))||n&&x1.includes(r)},Pe=function(t,r,n){if(!t||typeof t=="function"||typeof t=="boolean")return null;var a=t;if(w.isValidElement(t)&&(a=t.props),!rc(a))return null;var i={};
vendor: 3,708 bytes, line 514
514return Object.keys(a).forEach(function(o){var s;pJ((s=a)===null||s===void 0?void 0:s[o],o,r,n)&&(i[o]=a[o])}),i},nb=function e(t,r){if(t===r)return!0;var n=w.Children.count(t);if(n!==w.Children.count(r))return!1;if(n===0)return!0;if(n===1)return zk(Array.isArray(t)?t[0]:t,Array.isArray(r)?r[0]:r);for(var a=0;a<n;a++){var i=t[a],o=r[a];if(Array.isArray(i)||Array.isArray(o)){if(!e(i,o))return!1}else if(!zk(i,o))return!1}return!0},zk=function(t,r){if(Ce(t)&&Ce(r))return!0;if(!Ce(t)&&!Ce(r)){var n=t.props||{},a=n.children,i=Lk(n,cJ),o=r.props||{},s=o.children,l=Lk(o,uJ);return a&&s?Js(i,l)&&nb(a,s):!a&&!s?Js(i,l):!1}return!1},Wk=function(t,r){var n=[],a={};return w1(t).forEach(function(i,o){if(hJ(i))n.push(i);else if(i){var s=ja(i.type),l=r[s]||{},c=l.handler,d=l.once;if(c&&(!d||!a[s])){var f=c(i,s,o);n.push(f),a[s]=!0}}}),n},mJ=function(t){var r=t&&t.type;return r&&Bk[r]?Bk[r]:null},gJ=function(t,r){return w1(r).indexOf(t)},vJ=["children","width","height","viewBox","className","style","title","desc"];function ab(){return ab=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ab.apply(this,arguments)}function yJ(e,t){if(e==null)return{};var r=bJ(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function bJ(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function ib(e){var t=e.children,r=e.width,n=e.height,a=e.viewBox,i=e.className,o=e.style,s=e.title,l=e.desc,c=yJ(e,vJ),d=a||{width:r,height:n,x:0,y:0},f=ke("recharts-surface",i);return $.createElement("svg",ab({},Pe(c,!0,"svg"),{className:f,width:r,height:n,style:o,viewBox:"".concat(d.x," ").concat(d.y," ").concat(d.width," ").concat(d.height)}),$.createElement("title",null,s),$.createElement("desc",null,l),t)}var xJ=["children","className"];function ob(){return ob=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ob.apply(this,arguments)}function wJ(e,t){if(e==null)return{};var r=_J(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function _J(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var Ot=$.forwardRef(function(e,t){var r=e.children,n=e.className,a=wJ(e,xJ),i=ke("recharts-layer",n);return $.createElement("g",ob({className:i},Pe(a,!0),{ref:t}),r)}),ka=function(t,r){for(var n=arguments.length,a=new Array(n>2?n-2:0),i=2;i<n;i++)a[i-2]=arguments[i]};function SJ(e,t,r){var n=-1,a=e.length;t<0&&(t=-t>a?0:a+t),r=r>a?a:r,r<0&&(r+=a),a=t>r?0:r-t>>>0,t>>>=0;for(var i=Array(a);++n<a;)i[n]=e[n+t];return i}var jJ=SJ,kJ=jJ;function EJ(e,t,r){var n=e.length;return r=r===void 0?n:r,!t&&r>=n?e:kJ(e,t,r)}var OJ=EJ,NJ="\\ud800-\\udfff",PJ="\\u0300-\\u036f",CJ="\\ufe20-\\ufe2f",TJ="\\u20d0-\\u20ff",AJ=PJ+CJ+TJ,MJ="\\ufe0e\\ufe0f",$J="\\u200d",RJ=RegExp("["+$J+NJ+AJ+MJ+"]");function IJ(e){return RJ.test(e)}var j$=IJ;function DJ(e){return e.split("")}var LJ=DJ,k$="\\ud800-\\udfff",BJ="\\u0300-\\u036f",FJ="\\ufe20-\\ufe2f",UJ="\\u20d0-\\u20ff",zJ=BJ+FJ+UJ,WJ="\\ufe0e\\ufe0f",HJ="["+k$+"]",sb="["+zJ+"]",lb="\\ud83c[\\udffb-\\udfff]",qJ="(?:"+sb+"|"+lb+")",E$="[^"+k$+"]",O$="
514(?:\\ud83c[\\udde6-\\uddff]){2}",N$="[\\ud800-\\udbff][\\udc00-\\udfff]",VJ="\\u200d",P$=qJ+"?",C$="["+WJ+"]?",KJ="(?:"+VJ+"(?:"+[E$,O$,N$].join("|")+")"+C$+P$+")*",GJ=C$+P$+KJ,YJ="(?:"+[E$+sb+"?",sb,O$,N$,HJ].join("|")+")",XJ=RegExp(lb+"(?="+lb+")|"+YJ+GJ,"g");function JJ(e){return e.match(XJ)||[]}var QJ=JJ,ZJ=LJ,eQ=j$,tQ=QJ;function rQ(e){return eQ(e)?tQ(e):ZJ(e)}var nQ=rQ,aQ=OJ,iQ=j$,oQ=nQ,sQ=y$;function lQ(e){return function(t){t=sQ(t);var r=iQ(t)?oQ(t):void 0,n=r?r[0]:t.charAt(0),a=r?aQ(r,1).join(""):t.slice(1);return n[e]()+a}}var cQ=lQ,uQ=cQ,dQ=uQ("toUpperCase"),fQ=dQ;const dg=Fe(fQ);function He(e){return function(){return e}}const T$=Math.cos,lp=Math.sin,Tn=Math.sqrt,cp=Math.PI,fg=2*cp,cb=Math.PI,ub=2*cb,ro=1e-6,hQ=ub-ro;function A$(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function pQ(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return A$;const r=10**t;return function(n){this._+=n[0];for(let a=1,i=n.length;a<i;++a)this._+=Math.round(arguments[a]*r)/r+n[a]}}class mQ{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?A$:pQ(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,n,a){this._append`Q${+t},${+r},${this._x1=+n},${this._y1=+a}`}bezierCurveTo(t,r,n,a,i,o){this._append`C${+t},${+r},${+n},${+a},${this._x1=+i},${this._y1=+o}`}arcTo(t,r,n,a,i){if(t=+t,r=+r,n=+n,a=+a,i=+i,i<0)throw new Error(`negative radius: ${i}`);let o=this._x1,s=this._y1,l=n-t,c=a-r,d=o-t,f=s-r,h=d*d+f*f;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(h>ro)if(!(Math.abs(f*l-c*d)>ro)||!i)this._append`L${this._x1=t},${this._y1=r}`;else{let p=n-o,g=a-s,m=l*l+c*c,v=p*p+g*g,x=Math.sqrt(m),b=Math.sqrt(h),y=i*Math.tan((cb-Math.acos((m+h-v)/(2*x*b)))/2),S=y/b,_=y/x;Math.abs(S-1)>ro&&this._append`L${t+S*d},${r+S*f}`,this._append`A${i},${i},0,0,${+(f*p>d*g)},${this._x1=t+_*l},${this._y1=r+_*c}`}}arc(t,r,n,a,i,o){if(t=+t,r=+r,n=+n,o=!!o,n<0)throw new Error(`negative radius: ${n}`);let s=n*Math.cos(a),l=n*Math.sin(a),c=t+s,d=r+l,f=1^o,h=o?a-i:i-a;this._x1===null?this._append`M${c},${d}`:(Math.abs(this._x1-c)>ro||Math.abs(this._y1-d)>ro)&&this._append`L${c},${d}`,n&&(h<0&&(h=h%ub+ub),h>hQ?this._append`A${n},${n},0,1,${f},${t-s},${r-l}A${n},${n},0,1,${f},${this._x1=c},${this._y1=d}`:h>ro&&this._append`A${n},${n},0,${+(h>=cb)},${f},${this._x1=t+n*Math.cos(i)},${this._y1=r+n*Math.sin(i)}`)}rect(t,r,n,a){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${n=+n}v${+a}h${-n}Z`}toString(){return this._}}function _1(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);t=n}return e},()=>new mQ(t)}function S1(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function M$(e){this._context=e}M$.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function hg(e){return new M$(e)}function $$(e){return e[0]}function R$(e){return e[1]}function I$(e,t){var r=He(!0),n=null,a=hg,i=null,o=_1(s);e=typeof e=="function"?e:e===void 0?$$:He(e),t=typeof t=="function"?t:t===void 0?R$:He(t);function s(l){var c,d=(l=S1(l)).length,f,h=!1,p;for(n==null&&(i=a(p=o())),c=0;c<=d;++c)!(c<d&&r(f=l[c],c,l))===h&&((h=!h)?i.lineStart():i.lineEnd()),h&&i.point(+e(f,c,l),+t(f,c,l));if(p)return i=null,p+""||null}return s.x=function(l){return arguments.length?(e=typeof l=="function"?l:He(+l),s):e},s.y=function(l){return arguments.length?(t=typeof l=="function"?l:He(+l),s):t},s.defined=function(l){return arguments.length?(r=typeof l=="function"?l:He(!!l),s):r},s.curve=function(l){return arguments.length?(a=l,n!=null&&(i=a(n)),s):a},s.context=function(l){return arguments.length?(l==null?n=i=null:i=a(n=l),s):n},s}function If(e,t,r){var n=null,a=He(!0),i=null,o=hg,s=null,l=_1(c);e=typeof e=="function"?e:e===void 0?$$:He(+e),t=typeof t=="function"?t:He(t===void 0?0:+t),r=typeof r=="function"?r:r===void 0?R$:He(+r);function c(f){var h,p,g,m=(f=S1(f)).length,v,x=!1,b,y=new Array(m),S=new Array(m);for(i==null&&(s=o(b=l())),h=0;h<=m;++h){if(!(h<m&&a(v=f[h],h,f))===x)if(x=!x)p=h,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),g=h-1;g>=p;--g)s.point(y[g],S[g]);s.lineEnd(),s.areaEnd()}x&&(y[h]=+e(v,h,f),S[h]=+t(v,h,f),s.point(n?+n(v,h,f):y[h],r?+r(v,h,f):S[h]))}if(b)return s=null,b+""||null}function d(){return I$().defined(a).curve(o).context(i)}return c.x=function(f){return arguments.length?(e=typeof f=="function"?f:He(+f),n=null,c):e},c.x0=function(f){return arguments.length?(e=typeof f=="function"?f:He(+f),c):e},c.x1=function(f){return arguments.length?(n=f==null?null:typeof f=="function"?f:He(+f),c):n},c.y=function(f){return arguments.length?(t=typeof f=="function"?f:He(+f),r=null,c):t},c.y0=function(f){return arguments.length?(t=typeof f=="function"?f:He(+f),c):t},c.y1=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:He(+f),c):r},c.lineX0=c.lineY0=function(){return d().x(e).y(t)},c.lineY1=function(){return d().x(e).y(r)},c.lineX1=function(){return d().x(n).y(t)},c.defined=function(f){return arguments.length?(a=typeof f=="function"?f:He(!!f),
vendor: 8,812 bytes, line 514
514c):a},c.curve=function(f){return arguments.length?(o=f,i!=null&&(s=o(i)),c):o},c.context=function(f){return arguments.length?(f==null?i=s=null:s=o(i=f),c):i},c}class D${constructor(t,r){this._context=t,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function gQ(e){return new D$(e,!0)}function vQ(e){return new D$(e,!1)}const j1={draw(e,t){const r=Tn(t/cp);e.moveTo(r,0),e.arc(0,0,r,0,fg)}},yQ={draw(e,t){const r=Tn(t/5)/2;e.moveTo(-3*r,-r),e.lineTo(-r,-r),e.lineTo(-r,-3*r),e.lineTo(r,-3*r),e.lineTo(r,-r),e.lineTo(3*r,-r),e.lineTo(3*r,r),e.lineTo(r,r),e.lineTo(r,3*r),e.lineTo(-r,3*r),e.lineTo(-r,r),e.lineTo(-3*r,r),e.closePath()}},L$=Tn(1/3),bQ=L$*2,xQ={draw(e,t){const r=Tn(t/bQ),n=r*L$;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}},wQ={draw(e,t){const r=Tn(t),n=-r/2;e.rect(n,n,r,r)}},_Q=.8908130915292852,B$=lp(cp/10)/lp(7*cp/10),SQ=lp(fg/10)*B$,jQ=-T$(fg/10)*B$,kQ={draw(e,t){const r=Tn(t*_Q),n=SQ*r,a=jQ*r;e.moveTo(0,-r),e.lineTo(n,a);for(let i=1;i<5;++i){const o=fg*i/5,s=T$(o),l=lp(o);e.lineTo(l*r,-s*r),e.lineTo(s*n-l*a,l*n+s*a)}e.closePath()}},qv=Tn(3),EQ={draw(e,t){const r=-Tn(t/(qv*3));e.moveTo(0,r*2),e.lineTo(-qv*r,-r),e.lineTo(qv*r,-r),e.closePath()}},Rr=-.5,Ir=Tn(3)/2,db=1/Tn(12),OQ=(db/2+1)*3,NQ={draw(e,t){const r=Tn(t/OQ),n=r/2,a=r*db,i=n,o=r*db+r,s=-i,l=o;e.moveTo(n,a),e.lineTo(i,o),e.lineTo(s,l),e.lineTo(Rr*n-Ir*a,Ir*n+Rr*a),e.lineTo(Rr*i-Ir*o,Ir*i+Rr*o),e.lineTo(Rr*s-Ir*l,Ir*s+Rr*l),e.lineTo(Rr*n+Ir*a,Rr*a-Ir*n),e.lineTo(Rr*i+Ir*o,Rr*o-Ir*i),e.lineTo(Rr*s+Ir*l,Rr*l-Ir*s),e.closePath()}};function PQ(e,t){let r=null,n=_1(a);e=typeof e=="function"?e:He(e||j1),t=typeof t=="function"?t:He(t===void 0?64:+t);function a(){let i;if(r||(r=i=n()),e.apply(this,arguments).draw(r,+t.apply(this,arguments)),i)return r=null,i+""||null}return a.type=function(i){return arguments.length?(e=typeof i=="function"?i:He(i),a):e},a.size=function(i){return arguments.length?(t=typeof i=="function"?i:He(+i),a):t},a.context=function(i){return arguments.length?(r=i??null,a):r},a}function up(){}function dp(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function F$(e){this._context=e}F$.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:dp(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:dp(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function CQ(e){return new F$(e)}function U$(e){this._context=e}U$.prototype={areaStart:up,areaEnd:up,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:dp(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function TQ(e){return new U$(e)}function z$(e){this._context=e}z$.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,n=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:dp(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function AQ(e){return new z$(e)}function W$(e){this._context=e}W$.prototype={areaStart:up,areaEnd:up,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function MQ(e){return new W$(e)}function Hk(e){return e<0?-1:1}function qk(e,t,r){var n=e._x1-e._x0,a=t-e._x1,i=(e._y1-e._y0)/(n||a<0&&-0),o=(r-e._y1)/(a||n<0&&-0),s=(i*a+o*n)/(n+a);return(Hk(i)+Hk(o))*Math.min(Math.abs(i),Math.abs(o),.5*Math.abs(s))||0}function Vk(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function Vv(e,t,r){var n=e._x0,a=e._y0,i=e._x1,o=e._y1,s=(i-n)/3;e._context.bezierCurveTo(n+s,a+s*t,i-s,o-s*r,i,o)}function fp(e){this._context=e}fp.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Vv(this,this._t0,Vk(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,Vv(this,Vk(this,r=qk(this,e,t)),r);break;default:Vv(this,this._t0,r=qk(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function H$(e){this._context=new q$(e)}(H$.prototype=Object.create(fp.prototype)).point=function(e,t){fp.prototype.point.call(this,t,e)};function q$(e){this._context=e}q$.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,n,a,i){this._context.bezierCurveTo(t,e,n,r,i,a)}};function $Q(e){return new fp(e)}function RQ(e){return new H$(e)}function V$(e){this._context=e}V$.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var n=Kk(e),a=Kk(t),i=0,o=1;o<r;++i,++o)this._context.bezierCurveTo(n[0][i],a[0][i],n[1][i],a[1][i],e[o],t[o]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function Kk(e){var t,r=e.length-1,n,a=new Array(r),i=new Array(r),o=new Array(r);for(a[0]=0,i[0]=2,o[0]=e[0]+2*e[1],t=1;t<r-1;++t)a[t]=1,i[t]=4,o[t]=4*e[t]+2*e[t+1];for(a[r-1]=2,i[r-1]=7,o[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=a[t]/i[t-1],i[t]-=n,o[t]-=n*o[t-1];for(a[r-1]=o[r-1]/i[r-1],t=r-2;t>=0;--t)a[t]=(o[t]-a[t+1])/i[t];for(i[r-1]=(e[r]+a[r-1])/2,t=0;t<r-1;++t)i[t]=2*e[t+1]-a[t+1];return[a,i]}function IQ(e){return new V$(e)}function pg(e,t){this._context=e,this._t=t}pg.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;
vendor: 11,873 bytes, lines 514-517
514default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function DQ(e){return new pg(e,.5)}function LQ(e){return new pg(e,0)}function BQ(e){return new pg(e,1)}function xl(e,t){if((o=e.length)>1)for(var r=1,n,a,i=e[t[0]],o,s=i.length;r<o;++r)for(a=i,i=e[t[r]],n=0;n<s;++n)i[n][1]+=i[n][0]=isNaN(a[n][1])?a[n][0]:a[n][1]}function fb(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}function FQ(e,t){return e[t]}function UQ(e){const t=[];return t.key=e,t}function zQ(){var e=He([]),t=fb,r=xl,n=FQ;function a(i){var o=Array.from(e.apply(this,arguments),UQ),s,l=o.length,c=-1,d;for(const f of i)for(s=0,++c;s<l;++s)(o[s][c]=[0,+n(f,o[s].key,c,i)]).data=f;for(s=0,d=S1(t(o));s<l;++s)o[d[s]].index=s;return r(o,d),o}return a.keys=function(i){return arguments.length?(e=typeof i=="function"?i:He(Array.from(i)),a):e},a.value=function(i){return arguments.length?(n=typeof i=="function"?i:He(+i),a):n},a.order=function(i){return arguments.length?(t=i==null?fb:typeof i=="function"?i:He(Array.from(i)),a):t},a.offset=function(i){return arguments.length?(r=i??xl,a):r},a}function WQ(e,t){if((n=e.length)>0){for(var r,n,a=0,i=e[0].length,o;a<i;++a){for(o=r=0;r<n;++r)o+=e[r][a][1]||0;if(o)for(r=0;r<n;++r)e[r][a][1]/=o}xl(e,t)}}function HQ(e,t){if((a=e.length)>0){for(var r=0,n=e[t[0]],a,i=n.length;r<i;++r){for(var o=0,s=0;o<a;++o)s+=e[o][r][1]||0;n[r][1]+=n[r][0]=-s/2}xl(e,t)}}function qQ(e,t){if(!(!((o=e.length)>0)||!((i=(a=e[t[0]]).length)>0))){for(var r=0,n=1,a,i,o;n<i;++n){for(var s=0,l=0,c=0;s<o;++s){for(var d=e[t[s]],f=d[n][1]||0,h=d[n-1][1]||0,p=(f-h)/2,g=0;g<s;++g){var m=e[t[g]],v=m[n][1]||0,x=m[n-1][1]||0;p+=v-x}l+=f,c+=p*f}a[n-1][1]+=a[n-1][0]=r,l&&(r-=c/l)}a[n-1][1]+=a[n-1][0]=r,xl(e,t)}}function Uu(e){"@babel/helpers - typeof";return Uu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Uu(e)}var VQ=["type","size","sizeType"];function hb(){return hb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},hb.apply(this,arguments)}function Gk(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Yk(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Gk(Object(r),!0).forEach(function(n){KQ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Gk(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function KQ(e,t,r){return t=GQ(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function GQ(e){var t=YQ(e,"string");return Uu(t)=="symbol"?t:t+""}function YQ(e,t){if(Uu(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Uu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function XQ(e,t){if(e==null)return{};var r=JQ(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function JQ(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var K$={symbolCircle:j1,symbolCross:yQ,symbolDiamond:xQ,symbolSquare:wQ,symbolStar:kQ,symbolTriangle:EQ,symbolWye:NQ},QQ=Math.PI/180,ZQ=function(t){var r="symbol".concat(dg(t));return K$[r]||j1},eZ=function(t,r,n){if(r==="area")return t;switch(n){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var a=18*QQ;return 1.25*t*t*(Math.tan(a)-Math.tan(a*2)*Math.pow(Math.tan(a),2))}case"triangle":return Math.sqrt(3)*t*t/4;case"wye":return(21-10*Math.sqrt(3))*t*t/8;default:return Math.PI*t*t/4}},tZ=function(t,r){K$["symbol".concat(dg(t))]=r},k1=function(t){var r=t.type,n=r===void 0?"circle":r,a=t.size,i=a===void 0?64:a,o=t.sizeType,s=o===void 0?"area":o,l=XQ(t,VQ),c=Yk(Yk({},l),{},{type:n,size:i,sizeType:s}),d=function(){var v=ZQ(n),x=PQ().type(v).size(eZ(i,s,n));return x()},f=c.className,h=c.cx,p=c.cy,g=Pe(c,!0);return h===+h&&p===+p&&i===+i?$.createElement("path",hb({},g,{className:ke("recharts-symbols",f),transform:"translate(".concat(h,", ").concat(p,")"),d:d()})):null};k1.registerSymbol=tZ;function wl(e){"@babel/helpers - typeof";return wl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},wl(e)}function pb(){return pb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},pb.apply(this,arguments)}function Xk(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function rZ(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Xk(Object(r),!0).forEach(function(n){zu(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Xk(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function nZ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function aZ(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Y$(n.key),n)}}function iZ(e,t,r){return t&&aZ(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function oZ(e,t,r){return t=hp(t),sZ(e,G$()?Reflect.construct(t,r||[],hp(e).constructor):t.apply(e,r))}function sZ(e,t){if(t&&(wl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return lZ(e)}function lZ(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function G$(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(G$=function(){return!!e})()}function hp(e){return hp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},hp(e)}function cZ(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&mb(e,t)}function mb(e,t){return mb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},mb(e,t)}function zu(e,t,r){return t=Y$(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Y$(e){var t=uZ(e,"string");return wl(t)=="symbol"?t:t+""}function uZ(e,t){if(wl(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(wl(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Dr=32,E1=function(e){function t(){return nZ(this,t),oZ(this,t,arguments)}return cZ(t,e),iZ(t,[{key:"renderIcon",value:function(n){var a=this.props.inactiveColor,i=Dr/2,o=Dr/6,s=Dr/3,l=n.inactive?a:n.color;if(n.type==="plainline")return $.createElement("line",{strokeWidth:4,fill:"none",stroke:l,strokeDasharray:n.payload.strokeDasharray,x1:0,y1:i,x2:Dr,y2:i,className:"recharts-legend-icon"});if(n.type==="line")return $.createElement("path",{strokeWidth:4,fill:"none",stroke:l,d:"M0,".concat(i,"h").concat(s,`
515            A`).concat(o,",").concat(o,",0,1,1,").concat(2*s,",").concat(i,`
516            H`).concat(Dr,"M").concat(2*s,",").concat(i,`
517            A`).concat(o,",").concat(o,",0,1,1,").concat(s,",").concat(i),className:"recharts-legend-icon"});if(n.type==="rect")return $.createElement("path",{stroke:"none",fill:l,d:"M0,".concat(Dr/8,"h").concat(Dr,"v").concat(Dr*3/4,"h").concat(-Dr,"z"),className:"recharts-legend-icon"});if($.isValidElement(n.legendIcon)){var c=rZ({},n);return delete c.legendIcon,$.cloneElement(n.legendIcon,c)}return $.createElement(k1,{fill:l,cx:i,cy:i,size:Dr,sizeType:"diameter",type:n.type})}},{key:"renderItems",value:function(){var n=this,a=this.props,i=a.payload,o=a.iconSize,s=a.layout,l=a.formatter,c=a.inactiveColor,d={x:0,y:0,width:Dr,height:Dr},f={display:s==="horizontal"?"inline-block":"block",marginRight:10},h={display:"inline-block",verticalAlign:"middle",marginRight:4};return i.map(function(p,g){var m=p.formatter||l,v=ke(zu(zu({"recharts-legend-item":!0},"legend-item-".concat(g),!0),"inactive",p.inactive));if(p.type==="none")return null;var x=xe(p.value)?null:p.value;ka(!xe(p.value),`The name property is also required when using a function for the dataKey of a chart's cartesian components. Ex: <Bar name="Name of my Data"/>`);var b=p.inactive?c:p.color;return $.createElement("li",pb({className:v,style:f,key:"legend-item-".concat(g)},sp(n.props,p,g)),$.createElement(ib,{width:o,height:o,viewBox:d,style:h},n.renderIcon(p)),$.createElement("span",{className:"recharts-legend-item-text",style:{color:b}},m?m(x,p,g):x))})}},{key:"render",value:function(){var n=this.props,a=n.payload,i=n.layout,o=n.align;if(!a||!a.length)return null;var s={padding:0,margin:0,textAlign:i==="horizontal"?o:"left"};return $.createElement("ul",{className:"recharts-default-legend",style:s},this.renderItems())}}])}(w.PureComponent);zu(E1,"displayName","Legend");zu(E1,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var dZ=Jm;function fZ(){this.__data__=new dZ,this.size=0}var hZ=fZ;function pZ(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var mZ=pZ;function gZ(e){return this.__data__.get(e)}var vZ=gZ;function yZ(e){return this.__data__.has(e)}var bZ=yZ,xZ=Jm,wZ=h1,_Z=p1,SZ=200;function jZ(e,t){var r=this.__data__;if(r instanceof xZ){var n=r.__data__;if(!wZ||n.length<SZ-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new _Z(n)}return r.set(e,t),this.size=r.size,this}var kZ=jZ,EZ=Jm,OZ=hZ,NZ=mZ,PZ=vZ,CZ=bZ,TZ=kZ;function oc(e){var t=this.__data__=new EZ(e);this.size=t.size}oc.prototype.clear=OZ;oc.prototype.delete=NZ;oc.prototype.get=PZ;oc.prototype.has=CZ;oc.prototype.set=TZ;var X$=oc,AZ="__lodash_hash_undefined__";function MZ(e){return this.__data__.set(e,AZ),this}var $Z=MZ;function RZ(e){return this.__data__.has(e)}var IZ=RZ,DZ=p1,LZ=$Z,BZ=IZ;function pp(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new DZ;++t<r;)this.add(e[t])}pp.prototype.add=pp.prototype.push=LZ;pp.prototype.has=BZ;var J$=pp;function FZ(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}var Q$=FZ;function UZ(e,t){return e.has(t)}var Z$=UZ,zZ=J$,WZ=Q$,HZ=Z$,qZ=1,VZ=2;function KZ(e,t,r,n,a,i){var o=r&qZ,s=e.length,l=t.length;if(s!=l&&!(o&&l>s))return!1;var c=i.get(e),d=i.get(t);if(c&&d)return c==t&&d==e;var f=-1,h=!0,p=r&VZ?new zZ:void 0;for(i.set(e,t),i.set(t,e);++f<s;){var g=e[f],m=t[f];if(n)var v=o?n(m,g,f,t,e,i):n(g,m,f,e,t,i);if(v!==void 0){if(v)continue;h=!1;break}
vendor: 7,047 bytes, line 517
517if(p){if(!WZ(t,function(x,b){if(!HZ(p,b)&&(g===x||a(g,x,r,n,i)))return p.push(b)})){h=!1;break}}else if(!(g===m||a(g,m,r,n,i))){h=!1;break}}return i.delete(e),i.delete(t),h}var eR=KZ,GZ=la,YZ=GZ.Uint8Array,XZ=YZ;function JZ(e){var t=-1,r=Array(e.size);return e.forEach(function(n,a){r[++t]=[a,n]}),r}var QZ=JZ;function ZZ(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var O1=ZZ,Jk=Dd,Qk=XZ,eee=f1,tee=eR,ree=QZ,nee=O1,aee=1,iee=2,oee="[object Boolean]",see="[object Date]",lee="[object Error]",cee="[object Map]",uee="[object Number]",dee="[object RegExp]",fee="[object Set]",hee="[object String]",pee="[object Symbol]",mee="[object ArrayBuffer]",gee="[object DataView]",Zk=Jk?Jk.prototype:void 0,Kv=Zk?Zk.valueOf:void 0;function vee(e,t,r,n,a,i,o){switch(r){case gee:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case mee:return!(e.byteLength!=t.byteLength||!i(new Qk(e),new Qk(t)));case oee:case see:case uee:return eee(+e,+t);case lee:return e.name==t.name&&e.message==t.message;case dee:case hee:return e==t+"";case cee:var s=ree;case fee:var l=n&aee;if(s||(s=nee),e.size!=t.size&&!l)return!1;var c=o.get(e);if(c)return c==t;n|=iee,o.set(e,t);var d=tee(s(e),s(t),n,a,i,o);return o.delete(e),d;case pee:if(Kv)return Kv.call(e)==Kv.call(t)}return!1}var yee=vee;function bee(e,t){for(var r=-1,n=t.length,a=e.length;++r<n;)e[a+r]=t[r];return e}var tR=bee,xee=tR,wee=mr;function _ee(e,t,r){var n=t(e);return wee(e)?n:xee(n,r(e))}var See=_ee;function jee(e,t){for(var r=-1,n=e==null?0:e.length,a=0,i=[];++r<n;){var o=e[r];t(o,r,e)&&(i[a++]=o)}return i}var kee=jee;function Eee(){return[]}var Oee=Eee,Nee=kee,Pee=Oee,Cee=Object.prototype,Tee=Cee.propertyIsEnumerable,eE=Object.getOwnPropertySymbols,Aee=eE?function(e){return e==null?[]:(e=Object(e),Nee(eE(e),function(t){return Tee.call(e,t)}))}:Pee,Mee=Aee;function $ee(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var Ree=$ee,Iee=Wa,Dee=Ha,Lee="[object Arguments]";function Bee(e){return Dee(e)&&Iee(e)==Lee}var Fee=Bee,tE=Fee,Uee=Ha,rR=Object.prototype,zee=rR.hasOwnProperty,Wee=rR.propertyIsEnumerable,Hee=tE(function(){return arguments}())?tE:function(e){return Uee(e)&&zee.call(e,"callee")&&!Wee.call(e,"callee")},N1=Hee,mp={exports:{}};function qee(){return!1}var Vee=qee;mp.exports;(function(e,t){var r=la,n=Vee,a=t&&!t.nodeType&&t,i=a&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===a,s=o?r.Buffer:void 0,l=s?s.isBuffer:void 0,c=l||n;e.exports=c})(mp,mp.exports);var nR=mp.exports,Kee=9007199254740991,Gee=/^(?:0|[1-9]\d*)$/;function Yee(e,t){var r=typeof e;return t=t??Kee,!!t&&(r=="number"||r!="symbol"&&Gee.test(e))&&e>-1&&e%1==0&&e<t}var P1=Yee,Xee=9007199254740991;function Jee(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Xee}var C1=Jee,Qee=Wa,Zee=C1,ete=Ha,tte="[object Arguments]",rte="[object Array]",nte="[object Boolean]",ate="[object Date]",ite="[object Error]",ote="[object Function]",ste="[object Map]",lte="[object Number]",cte="[object Object]",ute="[object RegExp]",dte="[object Set]",fte="[object String]",hte="[object WeakMap]",pte="[object ArrayBuffer]",mte="[object DataView]",gte="[object Float32Array]",vte="[object Float64Array]",yte="[object Int8Array]",bte="[object Int16Array]",xte="[object Int32Array]",wte="[object Uint8Array]",_te="[object Uint8ClampedArray]",Ste="[object Uint16Array]",jte="[object Uint32Array]",Ye={};Ye[gte]=Ye[vte]=Ye[yte]=Ye[bte]=Ye[xte]=Ye[wte]=Ye[_te]=Ye[Ste]=Ye[jte]=!0;Ye[tte]=Ye[rte]=Ye[pte]=Ye[nte]=Ye[mte]=Ye[ate]=Ye[ite]=Ye[ote]=Ye[ste]=Ye[lte]=Ye[cte]=Ye[ute]=Ye[dte]=Ye[fte]=Ye[hte]=!1;function kte(e){return ete(e)&&Zee(e.length)&&!!Ye[Qee(e)]}var Ete=kte;function Ote(e){return function(t){return e(t)}}var aR=Ote,gp={exports:{}};gp.exports;(function(e,t){var r=f$,n=t&&!t.nodeType&&t,a=n&&!0&&e&&!e.nodeType&&e,i=a&&a.exports===n,o=i&&r.process,s=function(){try{var l=a&&a.require&&a.require("util").types;return l||o&&o.binding&&o.binding("util")}catch{}}();e.exports=s})(gp,gp.exports);var Nte=gp.exports,Pte=Ete,Cte=aR,rE=Nte,nE=rE&&rE.isTypedArray,Tte=nE?Cte(nE):Pte,iR=Tte,Ate=Ree,Mte=N1,$te=mr,Rte=nR,Ite=P1,Dte=iR,Lte=Object.prototype,Bte=Lte.hasOwnProperty;function Fte(e,t){var r=$te(e),n=!r&&Mte(e),a=!r&&!n&&Rte(e),i=!r&&!n&&!a&&Dte(e),o=r||n||a||i,s=o?Ate(e.length,String):[],l=s.length;for(var c in e)(t||Bte.call(e,c))&&!(o&&(c=="length"||a&&(c=="offset"||c=="parent")||i&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Ite(c,l)))&&s.push(c);return s}var Ute=Fte,zte=Object.prototype;function Wte(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||zte;return e===r}var Hte=Wte;function qte(e,t){return function(r){return e(t(r))}}var oR=qte,Vte=oR,Kte=Vte(Object.keys,Object),Gte=Kte,Yte=Hte,Xte=Gte,Jte=Object.prototype,Qte=Jte.hasOwnProperty;function Zte(e){if(!Yte(e))return Xte(e);var t=[];for(var r in Object(e))Qte.call(e,r)&&r!="constructor"&&t.push(r);return t}var ere=Zte,tre=d1,rre=C1;function nre(e){return e!=null&&rre(e.length)&&!tre(e)}var Bd=nre,are=Ute,ire=ere,ore=Bd;function sre(e){return ore(e)?are(e):ire(e)}var mg=sre,lre=See,cre=Mee,ure=mg;function dre(e){return lre(e,ure,cre)}var fre=dre,aE=fre,hre=1,pre=Object.prototype,mre=pre.hasOwnProperty;function gre(e,t,r,n,a,i){var o=r&hre,s=aE(e),l=s.length,c=aE(t),d=c.length;if(l!=d&&!o)return!1;for(var f=l;f--;){var h=s[f];if(!(o?h in t:mre.call(t,h)))return!1}var p=i.get(e),g=i.get(t);if(p&&g)return p==t&&g==e;var m=!0;i.set(e,t),i.set(t,e);for(var v=o;++f<l;){h=s[f];var x=e[h],b=t[h];if(n)var y=o?n(b,x,h,t,e,i):n(x,b,h,e,t,i);if(!(y===void 0?x===b||a(x,b,r,n,i):y)){m=!1;break}v||(v=h=="constructor")}if(m&&!v){var S=e.constructor,_=t.constructor;S!=_&&"constructor"in e&&"constructor"in t&&!(typeof S=="function"&&S instanceof S&&typeof _=="function"&&_ instanceof _)&&(m=!1)}return i.delete(e),i.delete(t),m}var vre=gre,yre=Xo,bre=la,xre=yre(bre,"DataView"),wre=xre,_re=Xo,Sre=la,jre=_re(Sre,"Promise"),kre=jre,Ere=Xo,Ore=la,Nre=Ere(Ore,"Set"),sR=Nre,Pre=Xo,Cre=la,Tre=Pre(Cre,"WeakMap"),Are=Tre,gb=wre,vb=h1,yb=kre,bb=sR,xb=Are,lR=Wa,sc=p$,iE="[object Map]",Mre="[object Object]",oE="[object Promise]",sE="[object Set]",lE="[object WeakMap]",cE="[object DataView]",$re=sc(gb),Rre=sc(vb),Ire=sc(yb),Dre=sc(bb),Lre=sc(xb),no=lR;(gb&&no(new gb(new ArrayBuffer(1)))!=cE||vb&&no(new vb)!=iE||yb&&no(yb.resolve())!=oE||bb&&no(new bb)!=sE||xb&&no(new xb)!=lE)&&(no=function(e){var t=lR(e),r=t==Mre?e.constructor:void 0,n=r?sc(r):"";if(n)switch(n){case $re:return cE;case Rre:return iE;case Ire:return oE;case Dre:return sE;case Lre:return lE}return t});var Bre=no,Gv=X$,Fre=eR,Ure=yee,zre=vre,uE=Bre,dE=mr,fE=nR,Wre=iR,Hre=1,hE="[object Arguments]",pE="[object Array]",Df="[object Object]",qre=Object.prototype,mE=qre.hasOwnProperty;function Vre(e,t,r,n,a,i){var o=dE(e),s=dE(t),l=o?pE:uE(e),c=s?pE:uE(t);l=l==hE?Df:l,c=c==hE?Df:c;var d=l==Df,f=c==Df,h=l==c;if(h&&fE(e)){if(!fE(t))return!1;o=!0,d=!1}if(h&&!d)return i||(i=new Gv),o||Wre(e)?Fre(e,t,r,n,a,i):Ure(e,t,l,r,n,a,i);if(!(r&Hre)){var p=d&&mE.call(e,"__wrapped__"),g=f&&mE.call(t,"__wrapped__");
vendor: 4,112 bytes, line 517
517if(p||g){var m=p?e.value():e,v=g?t.value():t;return i||(i=new Gv),a(m,v,r,n,i)}}return h?(i||(i=new Gv),zre(e,t,r,n,a,i)):!1}var Kre=Vre,Gre=Kre,gE=Ha;function cR(e,t,r,n,a){return e===t?!0:e==null||t==null||!gE(e)&&!gE(t)?e!==e&&t!==t:Gre(e,t,r,n,cR,a)}var T1=cR,Yre=X$,Xre=T1,Jre=1,Qre=2;function Zre(e,t,r,n){var a=r.length,i=a,o=!n;if(e==null)return!i;for(e=Object(e);a--;){var s=r[a];if(o&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++a<i;){s=r[a];var l=s[0],c=e[l],d=s[1];if(o&&s[2]){if(c===void 0&&!(l in e))return!1}else{var f=new Yre;if(n)var h=n(c,d,l,e,t,f);if(!(h===void 0?Xre(d,c,Jre|Qre,n,f):h))return!1}}return!0}var ene=Zre,tne=Ui;function rne(e){return e===e&&!tne(e)}var uR=rne,nne=uR,ane=mg;function ine(e){for(var t=ane(e),r=t.length;r--;){var n=t[r],a=e[n];t[r]=[n,a,nne(a)]}return t}var one=ine;function sne(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}var dR=sne,lne=ene,cne=one,une=dR;function dne(e){var t=cne(e);return t.length==1&&t[0][2]?une(t[0][0],t[0][1]):function(r){return r===e||lne(r,e,t)}}var fne=dne;function hne(e,t){return e!=null&&t in Object(e)}var pne=hne,mne=b$,gne=N1,vne=mr,yne=P1,bne=C1,xne=Zm;function wne(e,t,r){t=mne(t,e);for(var n=-1,a=t.length,i=!1;++n<a;){var o=xne(t[n]);if(!(i=e!=null&&r(e,o)))break;e=e[o]}return i||++n!=a?i:(a=e==null?0:e.length,!!a&&bne(a)&&yne(o,a)&&(vne(e)||gne(e)))}var _ne=wne,Sne=pne,jne=_ne;function kne(e,t){return e!=null&&jne(e,t,Sne)}var Ene=kne,One=T1,Nne=x$,Pne=Ene,Cne=u1,Tne=uR,Ane=dR,Mne=Zm,$ne=1,Rne=2;function Ine(e,t){return Cne(e)&&Tne(t)?Ane(Mne(e),t):function(r){var n=Nne(r,e);return n===void 0&&n===t?Pne(r,e):One(t,n,$ne|Rne)}}var Dne=Ine;function Lne(e){return e}var lc=Lne;function Bne(e){return function(t){return t==null?void 0:t[e]}}var Fne=Bne,Une=v1;function zne(e){return function(t){return Une(t,e)}}var Wne=zne,Hne=Fne,qne=Wne,Vne=u1,Kne=Zm;function Gne(e){return Vne(e)?Hne(Kne(e)):qne(e)}var Yne=Gne,Xne=fne,Jne=Dne,Qne=lc,Zne=mr,eae=Yne;function tae(e){return typeof e=="function"?e:e==null?Qne:typeof e=="object"?Zne(e)?Jne(e[0],e[1]):Xne(e):eae(e)}var zi=tae;function rae(e,t,r,n){for(var a=e.length,i=r+(n?1:-1);n?i--:++i<a;)if(t(e[i],i,e))return i;return-1}var fR=rae;function nae(e){return e!==e}var aae=nae;function iae(e,t,r){for(var n=r-1,a=e.length;++n<a;)if(e[n]===t)return n;return-1}var oae=iae,sae=fR,lae=aae,cae=oae;function uae(e,t,r){return t===t?cae(e,t,r):sae(e,lae,r)}var dae=uae,fae=dae;function hae(e,t){var r=e==null?0:e.length;return!!r&&fae(e,t,0)>-1}var pae=hae;function mae(e,t,r){for(var n=-1,a=e==null?0:e.length;++n<a;)if(r(t,e[n]))return!0;return!1}var gae=mae;function vae(){}var yae=vae,Yv=sR,bae=yae,xae=O1,wae=1/0,_ae=Yv&&1/xae(new Yv([,-0]))[1]==wae?function(e){return new Yv(e)}:bae,Sae=_ae,jae=J$,kae=pae,Eae=gae,Oae=Z$,Nae=Sae,Pae=O1,Cae=200;function Tae(e,t,r){var n=-1,a=kae,i=e.length,o=!0,s=[],l=s;if(r)o=!1,a=Eae;else if(i>=Cae){var c=t?null:Nae(e);if(c)return Pae(c);o=!1,a=Oae,l=new jae}else l=t?[]:s;e:for(;++n<i;){var d=e[n],f=t?t(d):d;if(d=r||d!==0?d:0,o&&f===f){for(var h=l.length;h--;)if(l[h]===f)continue e;t&&l.push(f),s.push(d)}else a(l,f,r)||(l!==s&&l.push(f),s.push(d))}return s}var Aae=Tae,Mae=zi,$ae=Aae;function Rae(e,t){return e&&e.length?$ae(e,Mae(t)):[]}var Iae=Rae;const vE=Fe(Iae);function hR(e,t,r){return t===!0?vE(e,r):xe(t)?vE(e,t):e}function _l(e){"@babel/helpers - typeof";return _l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_l(e)}var Dae=["ref"];function yE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function ua(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?yE(Object(r),!0).forEach(function(n){gg(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):yE(Object(r)).forEac
vendor: 4,282 bytes, line 517
517h(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Lae(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function bE(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,mR(n.key),n)}}function Bae(e,t,r){return t&&bE(e.prototype,t),r&&bE(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Fae(e,t,r){return t=vp(t),Uae(e,pR()?Reflect.construct(t,r||[],vp(e).constructor):t.apply(e,r))}function Uae(e,t){if(t&&(_l(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return zae(e)}function zae(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function pR(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(pR=function(){return!!e})()}function vp(e){return vp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},vp(e)}function Wae(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&wb(e,t)}function wb(e,t){return wb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},wb(e,t)}function gg(e,t,r){return t=mR(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function mR(e){var t=Hae(e,"string");return _l(t)=="symbol"?t:t+""}function Hae(e,t){if(_l(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(_l(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function qae(e,t){if(e==null)return{};var r=Vae(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Vae(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Kae(e){return e.value}function Gae(e,t){if($.isValidElement(e))return $.cloneElement(e,t);if(typeof e=="function")return $.createElement(e,t);t.ref;var r=qae(t,Dae);return $.createElement(E1,r)}var xE=1,Qs=function(e){function t(){var r;Lae(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=Fae(this,t,[].concat(a)),gg(r,"lastBoundingBox",{width:-1,height:-1}),r}return Wae(t,e),Bae(t,[{key:"componentDidMount",value:function(){this.updateBBox()}},{key:"componentDidUpdate",value:function(){this.updateBBox()}},{key:"getBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var n=this.wrapperNode.getBoundingClientRect();return n.height=this.wrapperNode.offsetHeight,n.width=this.wrapperNode.offsetWidth,n}return null}},{key:"updateBBox",value:function(){var n=this.props.onBBoxUpdate,a=this.getBBox();a?(Math.abs(a.width-this.lastBoundingBox.width)>xE||Math.abs(a.height-this.lastBoundingBox.height)>xE)&&(this.lastBoundingBox.width=a.width,this.lastBoundingBox.height=a.height,n&&n(a)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,n&&n(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?ua({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(n){var a=this.props,i=a.layout,o=a.align,s=a.verticalAlign,l=a.margin,c=a.chartWidth,d=a.chartHeight,f,h;if(!n||(n.left===void 0||n.left===null)&&(n.right===void 0||n.right===null))if(o==="center"&&i==="vertical"){var p=this.getBBoxSnapshot();f={left:((c||0)-p.width)/2}}else f=o==="right"?{right:l&&l.right||0}:{left:l&&l.left||0};if(!n||(n.top===void 0||n.top===null)&&(n.bottom===void 0||n.bottom===null))if(s==="middle"){var g=this.getBBoxSnapsh
517ot();h={top:((d||0)-g.height)/2}}else h=s==="bottom"?{bottom:l&&l.bottom||0}:{top:l&&l.top||0};return ua(ua({},f),h)}},{key:"render",value:function(){var n=this,a=this.props,i=a.content,o=a.width,s=a.height,l=a.wrapperStyle,c=a.payloadUniqBy,d=a.payload,f=ua(ua({position:"absolute",width:o||"auto",height:s||"auto"},this.getDefaultPosition(l)),l);return $.createElement("div",{className:"recharts-legend-wrapper",style:f,ref:function(p){n.wrapperNode=p}},Gae(i,ua(ua({},this.props),{},{payload:hR(d,c,Kae)})))}}],[{key:"getWithHeight",value:function(n,a){var i=ua(ua({},this.defaultProps),n.props),o=i.layout;return o==="vertical"&&Y(n.props.height)?{height:n.props.height}:o==="horizontal"?{width:n.props.width||a}:null}}])}(w.PureComponent);gg(Qs,"displayName","Legend");gg(Qs,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var wE=Dd,Yae=N1,Xae=mr,_E=wE?wE.isConcatSpreadable:void 0;function Jae(e){return Xae(e)||Yae(e)||!!(_E&&e&&e[_E])}var Qae=Jae,Zae=tR,eie=Qae;function gR(e,t,r,n,a){var i=-1,o=e.length;for(r||(r=eie),a||(a=[]);++i<o;){var s=e[i];t>0&&r(s)?t>1?gR(s,t-1,r,n,a):Zae(a,s):n||(a[a.length]=s)}return a}var vR=gR;function tie(e){return function(t,r,n){for(var a=-1,i=Object(t),o=n(t),s=o.length;s--;){var l=o[e?s:++a];if(r(i[l],l,i)===!1)break}return t}}var rie=tie,nie=rie,aie=nie(),iie=aie,oie=iie,sie=mg;function lie(e,t){return e&&oie(e,t,sie)}var yR=lie,cie=Bd;function uie(e,t){return function(r,n){if(r==null)return r;if(!cie(r))return e(r,n);for(var a=r.length,i=t?a:-1,o=Object(r);(t?i--:++i<a)&&n(o[i],i,o)!==!1;);return r}}var die=uie,fie=yR,hie=die,pie=hie(fie),A1=pie,mie=A1,gie=Bd;function vie(e,t){var r=-1,n=gie(e)?Array(e.length):[];return mie(e,function(a,i,o){n[++r]=t(a,i,o)}),n}var bR=vie;function yie(e,t){var r=e.length;for(e.sort(t);r--;)e[r]=e[r].value;return e}var bie=yie,SE=tc;function xie(e,t){if(e!==t){var r=e!==void 0,n=e===null,a=e===e,i=SE(e),o=t!==void 0,s=t===null,l=t===t,c=SE(t);if(!s&&!c&&!i&&e>t||i&&o&&l&&!s&&!c||n&&o&&l||!r&&l||!a)return 1;if(!n&&!i&&!c&&e<t||c&&r&&a&&!n&&!i||s&&r&&a||!o&&a||!l)return-1}return 0}var wie=xie,_ie=wie;function Sie(e,t,r){for(var n=-1,a=e.criteria,i=t.criteria,o=a.length,s=r.length;++n<o;){var l=_ie(a[n],i[n]);if(l){if(n>=s)return l;var c=r[n];return l*(c=="desc"?-1:1)}}return e.index-t.index}var jie=Sie,Xv=g1,kie=v1,Eie=zi,Oie=bR,Nie=bie,Pie=aR,Cie=jie,Tie=lc,Aie=mr;function Mie(e,t,r){t.length?t=Xv(t,function(i){return Aie(i)?function(o){return kie(o,i.length===1?i[0]:i)}:i}):t=[Tie];var n=-1;t=Xv(t,Pie(Eie));var a=Oie(e,function(i,o,s){var l=Xv(t,function(c){return c(i)});return{criteria:l,index:++n,value:i}});return Nie(a,function(i,o){return Cie(i,o,r)})}var $ie=Mie;function Rie(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}var Iie=Rie,Die=Iie,jE=Math.max;function Lie(e,t,r){return t=jE(t===void 0?e.length-1:t,0),function(){for(var n=arguments,a=-1,i=jE(n.length-t,0),o=Array(i);++a<i;)o[a]=n[t+a];a=-1;for(var s=Array(t+1);++a<t;)s[a]=n[a];return s[t]=r(o),Die(e,this,s)}}var Bie=Lie;function Fie(e){return function(){return e}}var Uie=Fie,zie=Xo,Wie=function(){try{var e=zie(Object,"defineProperty");return e({},"",{}),e}catch{}}(),xR=Wie,Hie=Uie,kE=xR,qie=lc,Vie=kE?function(e,t){return kE(e,"toString",{configurable:!0,enumerable:!1,value:Hie(t),writable:!0})}:qie,Kie=Vie,Gie=800,Yie=16,Xie=Date.now;function Jie(e){var t=0,r=0;return function(){var n=Xie(),a=Yie-(n-r);if(r=n,a>0){if(++t>=Gie)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var Qie=Jie,Zie=Kie,eoe=Qie,toe=eoe(Zie),roe=toe,noe=lc,aoe=Bie,ioe=roe;function ooe(e,t){return ioe(aoe(e,t,noe),e+"")}var soe=ooe,loe=f1,coe=Bd,uoe=P1,doe=Ui;function foe(e,t,r){if(!doe(r))return!1;var n=typeof t;return(n=="number"?coe(r)&&uoe(t,r.length):n=="string"&&t in r)?loe(r[t],e):!1}var vg=foe,hoe=vR,poe=$ie,moe=soe,EE=vg,goe=moe(function(e,t){if(e==null)return[];var r=t.length;return r>1&&EE(e,t[0],t[1])?t=[]:r>2&&EE(t[0],t[1],t[2])&&(t=[t[0]]),poe(e,hoe(t,1),[])}),voe=goe;const M1=Fe(voe);function Wu(e){"@babel/helpers - typeof";return Wu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wu(e)}function _b(){return _b=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];
vendor: 33,544 bytes, lines 517-525
517for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},_b.apply(this,arguments)}function yoe(e,t){return _oe(e)||woe(e,t)||xoe(e,t)||boe()}function boe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
518In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function xoe(e,t){if(e){if(typeof e=="string")return OE(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return OE(e,t)}}function OE(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function woe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,s=[],l=!0,c=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(d){c=!0,a=d}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw a}}return s}}function _oe(e){if(Array.isArray(e))return e}function NE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Jv(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?NE(Object(r),!0).forEach(function(n){Soe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):NE(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Soe(e,t,r){return t=joe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function joe(e){var t=koe(e,"string");return Wu(t)=="symbol"?t:t+""}function koe(e,t){if(Wu(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Wu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Eoe(e){return Array.isArray(e)&&_t(e[0])&&_t(e[1])?e.join(" ~ "):e}var Ooe=function(t){var r=t.separator,n=r===void 0?" : ":r,a=t.contentStyle,i=a===void 0?{}:a,o=t.itemStyle,s=o===void 0?{}:o,l=t.labelStyle,c=l===void 0?{}:l,d=t.payload,f=t.formatter,h=t.itemSorter,p=t.wrapperClassName,g=t.labelClassName,m=t.label,v=t.labelFormatter,x=t.accessibilityLayer,b=x===void 0?!1:x,y=function(){if(d&&d.length){var N={padding:0,margin:0},I=(h?M1(d,h):d).map(function(R,D){if(R.type==="none")return null;var L=Jv({display:"block",paddingTop:4,paddingBottom:4,color:R.color||"#000"},s),M=R.formatter||f||Eoe,C=R.value,P=R.name,B=C,U=P;if(M&&B!=null&&U!=null){var F=M(C,P,R,D,d);if(Array.isArray(F)){var V=yoe(F,2);B=V[0],U=V[1]}else B=F}return $.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(D),style:L},_t(U)?$.createElement("span",{className:"recharts-tooltip-item-name"},U):null,_t(U)?$.createElement("span",{className:"recharts-tooltip-item-separator"},n):null,$.createElement("span",{className:"recharts-tooltip-item-value"},B),$.createElement("span",{className:"recharts-tooltip-item-unit"},R.unit||""))});return $.createElement("ul",{className:"recharts-tooltip-item-list",style:N},I)}return null},S=Jv({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},i),_=Jv({margin:0},c),j=!Ce(m),k=j?m:"",E=ke("recharts-default-tooltip",p),O=ke("recharts-tooltip-label",g);j&&v&&d!==void 0&&d!==null&&(k=v(m,d));var A=b?{role:"status","aria-live":"assertive"}:{};return $.createElement("div",_b({className:E,style:S},A),$.createElement("p",{className:O,style:_},$.isValidElement(k)?k:"".concat(k)),y())};function Hu(e){"@babel/helpers - typeof";return Hu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Hu(e)}function Lf(e,t,r){return t=Noe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Noe(e){var t=Poe(e,"string");return Hu(t)=="symbol"?t:t+""}function Poe(e,t){if(Hu(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Hu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Oc="recharts-tooltip-wrapper",Coe={visibility:"hidden"};function Toe(e){var t=e.coordinate,r=e.translateX,n=e.translateY;return ke(Oc,Lf(Lf(Lf(Lf({},"".concat(Oc,"-right"),Y(r)&&t&&Y(t.x)&&r>=t.x),"".concat(Oc,"-left"),Y(r)&&t&&Y(t.x)&&r<t.x),"".concat(Oc,"-bottom"),Y(n)&&t&&Y(t.y)&&n>=t.y),"".concat(Oc,"-top"),Y(n)&&t&&Y(t.y)&&n<t.y))}function PE(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.key,a=e.offsetTopLeft,i=e.position,o=e.reverseDirection,s=e.tooltipDimension,l=e.viewBox,c=e.viewBoxDimension;if(i&&Y(i[n]))return i[n];var d=r[n]-s-a,f=r[n]+a;if(t[n])return o[n]?d:f;if(o[n]){var h=d,p=l[n];return h<p?Math.max(f,l[n]):Math.max(d,l[n])}var g=f+s,m=l[n]+c;return g>m?Math.max(d,l[n]):Math.max(f,l[n])}function Aoe(e){var t=e.translateX,r=e.translateY,n=e.useTranslate3d;return{transform:n?"translate3d(".concat(t,"px, ").concat(r,"px, 0)"):"translate(".concat(t,"px, ").concat(r,"px)")}}function Moe(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.offsetTopLeft,a=e.position,i=e.reverseDirection,o=e.tooltipBox,s=e.useTranslate3d,l=e.viewBox,c,d,f;return o.height>0&&o.width>0&&r?(d=PE({allowEscapeViewBox:t,coordinate:r,key:"x",offsetTopLeft:n,position:a,reverseDirection:i,tooltipDimension:o.width,viewBox:l,viewBoxDimension:l.width}),f=PE({allowEscapeViewBox:t,coordinate:r,key:"y",offsetTopLeft:n,position:a,reverseDirection:i,tooltipDimension:o.height,viewBox:l,viewBoxDimension:l.height}),c=Aoe({translateX:d,translateY:f,useTranslate3d:s})):c=Coe,{cssProperties:c,cssClasses:Toe({translateX:d,translateY:f,coordinate:r})}}function Sl(e){"@babel/helpers - typeof";return Sl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Sl(e)}function CE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function TE(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?CE(Object(r),!0).forEach(function(n){jb(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):CE(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function $oe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Roe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,_R(n.key),n)}}function Ioe(e,t,r){return t&&Roe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Doe(e,t,r){return t=yp(t),Loe(e,wR()?Reflect.construct(t,r||[],yp(e).constructor):t.apply(e,r))}function Loe(e,t){if(t&&(Sl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Boe(e)}function Boe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function wR(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(wR=function(){return!!e})()}function yp(e){return yp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},yp(e)}function Foe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Sb(e,t)}function Sb(e,t){return Sb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Sb(e,t)}function jb(e,t,r){return t=_R(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _R(e){var t=Uoe(e,"string");return Sl(t)=="symbol"?t:t+""}function Uoe(e,t){if(Sl(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Sl(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var AE=1,zoe=function(e){function t(){var r;$oe(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=Doe(this,t,[].concat(a)),jb(r,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),jb(r,"handleKeyDown",function(o){if(o.key==="Escape"){var s,l,c,d;r.setState({dismissed:!0,dismissedAtCoordinate:{x:(s=(l=r.props.coordinate)===null||l===void 0?void 0:l.x)!==null&&s!==void 0?s:0,y:(c=(d=r.props.coordinate)===null||d===void 0?void 0:d.y)!==null&&c!==void 0?c:0}})}}),r}return Foe(t,e),Ioe(t,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var n=this.wrapperNode.getBoundingClientRect();(Math.abs(n.width-this.state.lastBoundingBox.width)>AE||Math.abs(n.height-this.state.lastBoundingBox.height)>AE)&&this.setState({lastBoundingBox:{width:n.width,height:n.height}})}else(this.state.lastBoundingBox.width!==-1||this.state.lastBoundingBox.height!==-1)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var n,a;this.props.active&&this.updateBBox(),this.state.dismissed&&(((n=this.props.coordinate)===null||n===void 0?void 0:n.x)!==this.state.dismissedAtCoordinate.x||((a=this.props.coordinate)===null||a===void 0?void 0:a.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var n=this,a=this.props,i=a.active,o=a.allowEscapeViewBox,s=a.animationDuration,l=a.animationEasing,c=a.children,d=a.coordinate,f=a.hasPayload,h=a.isAnimationActive,p=a.offset,g=a.position,m=a.reverseDirection,v=a.useTranslate3d,x=a.viewBox,b=a.wrapperStyle,y=Moe({allowEscapeViewBox:o,coordinate:d,offsetTopLeft:p,position:g,reverseDirection:m,tooltipBox:this.state.lastBoundingBox,useTranslate3d:v,viewBox:x}),S=y.cssClasses,_=y.cssProperties,j=TE(TE({transition:h&&i?"transform ".concat(s,"ms ").concat(l):void 0},_),{},{pointerEvents:"none",visibility:!this.state.dismissed&&i&&f?"visible":"hidden",position:"absolute",top:0,left:0},b);return $.createElement("div",{tabIndex:-1,className:S,style:j,ref:function(E){n.wrapperNode=E}},c)}}])}(w.PureComponent),Woe=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},Oi={isSsr:Woe(),get:function(t){return Oi[t]},set:function(t,r){if(typeof t=="string")Oi[t]=r;else{var n=Object.keys(t);n&&n.length&&n.forEach(function(a){Oi[a]=t[a]})}}};function jl(e){"@babel/helpers - typeof";return jl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},jl(e)}function ME(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function $E(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ME(Object(r),!0).forEach(function(n){$1(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ME(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Hoe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qoe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,jR(n.key),n)}}function Voe(e,t,r){return t&&qoe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Koe(e,t,r){return t=bp(t),Goe(e,SR()?Reflect.construct(t,r||[],bp(e).constructor):t.apply(e,r))}function Goe(e,t){if(t&&(jl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Yoe(e)}function Yoe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function SR(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(SR=function(){return!!e})()}function bp(e){return bp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},bp(e)}function Xoe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&kb(e,t)}function kb(e,t){return kb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},kb(e,t)}function $1(e,t,r){return t=jR(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function jR(e){var t=Joe(e,"string");return jl(t)=="symbol"?t:t+""}function Joe(e,t){if(jl(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(jl(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Qoe(e){return e.dataKey}function Zoe(e,t){return $.isValidElement(e)?$.cloneElement(e,t):typeof e=="function"?$.createElement(e,t):$.createElement(Ooe,t)}var Ln=function(e){function t(){return Hoe(this,t),Koe(this,t,arguments)}return Xoe(t,e),Voe(t,[{key:"render",value:function(){var n=this,a=this.props,i=a.active,o=a.allowEscapeViewBox,s=a.animationDuration,l=a.animationEasing,c=a.content,d=a.coordinate,f=a.filterNull,h=a.isAnimationActive,p=a.offset,g=a.payload,m=a.payloadUniqBy,v=a.position,x=a.reverseDirection,b=a.useTranslate3d,y=a.viewBox,S=a.wrapperStyle,_=g??[];f&&_.length&&(_=hR(g.filter(function(k){return k.value!=null&&(k.hide!==!0||n.props.includeHidden)}),m,Qoe));var j=_.length>0;return $.createElement(zoe,{allowEscapeViewBox:o,animationDuration:s,animationEasing:l,isAnimationActive:h,active:i,coordinate:d,hasPayload:j,offset:p,position:v,reverseDirection:x,useTranslate3d:b,viewBox:y,wrapperStyle:S},Zoe(c,$E($E({},this.props),{},{payload:_})))}}])}(w.PureComponent);$1(Ln,"displayName","Tooltip");$1(Ln,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!Oi.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var ese=la,tse=function(){return ese.Date.now()},rse=tse,nse=/\s/;function ase(e){for(var t=e.length;t--&&nse.test(e.charAt(t)););return t}var ise=ase,ose=ise,sse=/^\s+/;function lse(e){return e&&e.slice(0,ose(e)+1).replace(sse,"")}var cse=lse,use=cse,RE=Ui,dse=tc,IE=NaN,fse=/^[-+]0x[0-9a-f]+$/i,hse=/^0b[01]+$/i,pse=/^0o[0-7]+$/i,mse=parseInt;function gse(e){if(typeof e=="number")return e;if(dse(e))return IE;if(RE(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=RE(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=use(e);var r=hse.test(e);return r||pse.test(e)?mse(e.slice(2),r?2:8):fse.test(e)?IE:+e}var kR=gse,vse=Ui,Qv=rse,DE=kR,yse="Expected a function",bse=Math.max,xse=Math.min;function wse(e,t,r){var n,a,i,o,s,l,c=0,d=!1,f=!1,h=!0;if(typeof e!="function")throw new TypeError(yse);t=DE(t)||0,vse(r)&&(d=!!r.leading,f="maxWait"in r,i=f?bse(DE(r.maxWait)||0,t):i,h="trailing"in r?!!r.trailing:h);function p(j){var k=n,E=a;return n=a=void 0,c=j,o=e.apply(E,k),o}function g(j){return c=j,s=setTimeout(x,t),d?p(j):o}function m(j){var k=j-l,E=j-c,O=t-k;return f?xse(O,i-E):O}function v(j){var k=j-l,E=j-c;return l===void 0||k>=t||k<0||f&&E>=i}function x(){var j=Qv();if(v(j))return b(j);s=setTimeout(x,m(j))}function b(j){return s=void 0,h&&n?p(j):(n=a=void 0,o)}function y(){s!==void 0&&clearTimeout(s),c=0,n=l=a=s=void 0}function S(){return s===void 0?o:b(Qv())}function _(){var j=Qv(),k=v(j);if(n=arguments,a=this,l=j,k){if(s===void 0)return g(l);if(f)return clearTimeout(s),s=setTimeout(x,t),p(l)}return s===void 0&&(s=setTimeout(x,t)),o}return _.cancel=y,_.flush=S,_}var _se=wse,Sse=_se,jse=Ui,kse="Expected a function";function Ese(e,t,r){var n=!0,a=!0;if(typeof e!="function")throw new TypeError(kse);return jse(r)&&(n="leading"in r?!!r.leading:n,a="trailing"in r?!!r.trailing:a),Sse(e,t,{leading:n,maxWait:t,trailing:a})}var Ose=Ese;const ER=Fe(Ose);function qu(e){"@babel/helpers - typeof";return qu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qu(e)}function LE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Bf(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?LE(Object(r),!0).forEach(function(n){Nse(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):LE(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Nse(e,t,r){return t=Pse(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Pse(e){var t=Cse(e,"string");return qu(t)=="symbol"?t:t+""}function Cse(e,t){if(qu(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(qu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Tse(e,t){return Rse(e)||$se(e,t)||Mse(e,t)||Ase()}function Ase(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
519In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Mse(e,t){if(e){if(typeof e=="string")return BE(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return BE(e,t)}}function BE(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function $se(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,s=[],l=!0,c=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(d){c=!0,a=d}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw a}}return s}}function Rse(e){if(Array.isArray(e))return e}var Ise=w.forwardRef(function(e,t){var r=e.aspect,n=e.initialDimension,a=n===void 0?{width:-1,height:-1}:n,i=e.width,o=i===void 0?"100%":i,s=e.height,l=s===void 0?"100%":s,c=e.minWidth,d=c===void 0?0:c,f=e.minHeight,h=e.maxHeight,p=e.children,g=e.debounce,m=g===void 0?0:g,v=e.id,x=e.className,b=e.onResize,y=e.style,S=y===void 0?{}:y,_=w.useRef(null),j=w.useRef();j.current=b,w.useImperativeHandle(t,function(){return Object.defineProperty(_.current,"current",{get:function(){return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),_.current},configurable:!0})});var k=w.useState({containerWidth:a.width,containerHeight:a.height}),E=Tse(k,2),O=E[0],A=E[1],T=w.useCallback(function(I,R){A(function(D){var L=Math.round(I),M=Math.round(R);return D.containerWidth===L&&D.containerHeight===M?D:{containerWidth:L,containerHeight:M}})},[]);w.useEffect(function(){var I=function(P){var B,U=P[0].contentRect,F=U.width,V=U.height;T(F,V),(B=j.current)===null||B===void 0||B.call(j,F,V)};m>0&&(I=ER(I,m,{trailing:!0,leading:!1}));var R=new ResizeObserver(I),D=_.current.getBoundingClientRect(),L=D.width,M=D.height;return T(L,M),R.observe(_.current),function(){R.disconnect()}},[T,m]);var N=w.useMemo(function(){var I=O.containerWidth,R=O.containerHeight;if(I<0||R<0)return null;ka(uo(o)||uo(l),`The width(%s) and height(%s) are both fixed numbers,
520       maybe you don't need to use a ResponsiveContainer.`,o,l),ka(!r||r>0,"The aspect(%s) must be greater than zero.",r);var D=uo(o)?I:o,L=uo(l)?R:l;r&&r>0&&(D?L=D/r:L&&(D=L*r),h&&L>h&&(L=h)),ka(D>0||L>0,`The width(%s) and height(%s) of chart should be greater than 0,
521       please check the style of container, or the props width(%s) and height(%s),
522       or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
523       height and width.`,D,L,o,l,d,f,r);var M=!Array.isArray(p)&&ja(p.type).endsWith("Chart");return $.Children.map(p,function(C){return $.isValidElement(C)?w.cloneElement(C,Bf({width:D,height:L},M?{style:Bf({height:"100%",width:"100%",maxHeight:L,maxWidth:D},C.props.style)}:{})):C})},[r,p,l,h,f,d,O,o]);return $.createElement("div",{id:v?"".concat(v):void 0,className:ke("recharts-responsive-container",x),style:Bf(Bf({},S),{},{width:o,height:l,minWidth:d,minHeight:f,maxHeight:h}),ref:_},N)}),OR=function(t){return null};OR.displayName="Cell";function Vu(e){"@babel/helpers - typeof";return Vu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Vu(e)}function FE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Eb(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?FE(Object(r),!0).forEach(function(n){Dse(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):FE(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Dse(e,t,r){return t=Lse(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Lse(e){var t=Bse(e,"string");return Vu(t)=="symbol"?t:t+""}function Bse(e,t){if(Vu(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Vu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var gs={widthCache:{},cacheCount:0},Fse=2e3,Use={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},UE="recharts_measurement_span";function zse(e){var t=Eb({},e);return Object.keys(t).forEach(function(r){t[r]||delete t[r]}),t}var nu=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||Oi.isSsr)return{width:0,height:0};var n=zse(r),a=JSON.stringify({text:t,copyStyle:n});if(gs.widthCache[a])return gs.widthCache[a];try{var i=document.getElementById(UE);i||(i=document.createElement("span"),i.setAttribute("id",UE),i.setAttribute("aria-hidden","true"),document.body.appendChild(i));var o=Eb(Eb({},Use),n);Object.assign(i.style,o),i.textContent="".concat(t);var s=i.getBoundingClientRect(),l={width:s.width,height:s.height};return gs.widthCache[a]=l,++gs.cacheCount>Fse&&(gs.cacheCount=0,gs.widthCache={}),l}catch{return{width:0,height:0}}},Wse=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function Ku(e){"@babel/helpers - typeof";return Ku=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ku(e)}function xp(e,t){return Kse(e)||Vse(e,t)||qse(e,t)||Hse()}function Hse(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
524In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qse(e,t){if(e){if(typeof e=="string")return zE(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return zE(e,t)}}function zE(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Vse(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,s=[],l=!0,c=!1;try{if(i=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(d){c=!0,a=d}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw a}}return s}}function Kse(e){if(Array.isArray(e))return e}function Gse(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function WE(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Xse(n.key),n)}}function Yse(e,t,r){return t&&WE(e.prototype,t),r&&WE(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Xse(e){var t=Jse(e,"string");return Ku(t)=="symbol"?t:t+""}function Jse(e,t){if(Ku(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Ku(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var HE=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,qE=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,Qse=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,Zse=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,NR={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},ele=Object.keys(NR),Is="NaN";function tle(e,t){return e*NR[t]}var Ff=function(){function e(t,r){Gse(this,e),this.num=t,this.unit=r,this.num=t,this.unit=r,Number.isNaN(t)&&(this.unit=""),r!==""&&!Qse.test(r)&&(this.num=NaN,this.unit=""),ele.includes(r)&&(this.num=tle(t,r),this.unit="px")}return Yse(e,[{key:"add",value:function(r){return this.unit!==r.unit?new e(NaN,""):new e(this.num+r.num,this.unit)}},{key:"subtract",value:function(r){return this.unit!==r.unit?new e(NaN,""):new e(this.num-r.num,this.unit)}},{key:"multiply",value:function(r){return this.unit!==""&&r.unit!==""&&this.unit!==r.unit?new e(NaN,""):new e(this.num*r.num,this.unit||r.unit)}},{key:"divide",value:function(r){return this.unit!==""&&r.unit!==""&&this.unit!==r.unit?new e(NaN,""):new e(this.num/r.num,this.unit||r.unit)}},{key:"toString",value:function(){return"".concat(this.num).concat(this.unit)}},{key:"isNaN",value:function(){return Number.isNaN(this.num)}}],[{key:"parse",value:function(r){var n,a=(n=Zse.exec(r))!==null&&n!==void 0?n:[],i=xp(a,3),o=i[1],s=i[2];return new e(parseFloat(o),s??"")}}])}();function PR(e){if(e.includes(Is))return Is;for(var t=e;t.includes("*")||t.includes("/");){var r,n=(r=HE.exec(t))!==null&&r!==void 0?r:[],a=xp(n,4),i=a[1],o=a[2],s=a[3],l=Ff.parse(i??""),c=Ff.parse(s??""),d=o==="*"?l.multiply(c):l.divide(c);if(d.isNaN())return Is;t=t.replace(HE,d.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var f,h=(f=qE.exec(t))!==null&&f!==void 0?f:[],p=xp(h,4),g=p[1],m=p[2],v=p[3],x=Ff.parse(g??""),b=Ff.parse(v??""),y=m==="+"?x.add(b):x.subtract(b);if(y.isNaN())return Is;t=t.replace(qE,y.toString())}return t}var VE=/\(([^()]*)\)/;function rle(e){for(var t=e;t.includes("(");){var r=VE.exec(t),n=xp(r,2),a=n[1];t=t.replace(VE,PR(a))}return t}function nle(e){var t=e.replace(/\s+/g,"");return t=rle(t),t=PR(t),t}function ale(e){try{return nle(e)}catch{return Is}}function Zv(e){var t=ale(e.slice(5,-1));return t===Is?"":t}var ile=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],ole=["dx","dy","angle","className","breakAll"];function Ob(){return Ob=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ob.apply(this,arguments)}function KE(e,t){if(e==null)return{};var r=sle(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function sle(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function GE(e,t){return dle(e)||ule(e,t)||cle(e,t)||lle()}function lle(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
525In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function cle(e,t){if(e){if(typeof e=="string")return YE(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return YE(e,t)}}function YE(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function ule(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,s=[],l=!0,c=!1;try{if(i=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(d){c=!0,a=d}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw a}}return s}}function dle(e){if(Array.isArray(e))return e}var CR=/[ \f\n\r\t\v\u2028\u2029]+/,TR=function(t){var r=t.children,n=t.breakAll,a=t.style;try{var i=[];Ce(r)||(n?i=r.toString().split(""):i=r.toString().split(CR));var o=i.map(function(l){return{word:l,width:nu(l,a).width}}),s=n?0:nu(" ",a).width;return{wordsWithComputedWidth:o,spaceWidth:s}}catch{return null}},fle=function(t,r,n,a,i){var o=t.maxLines,s=t.children,l=t.style,c=t.breakAll,d=Y(o),f=s,h=function(){var D=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return D.reduce(function(L,M){var C=M.word,P=M.width,B=L[L.length-1];if(B&&(a==null||i||B.width+P+n<Number(a)))B.words.push(C),B.width+=P+n;else{var U={words:[C],width:P};L.push(U)}return L},[])},p=h(r),g=function(D){return D.reduce(function(L,M){return L.width>M.width?L:M})};if(!d)return p;for(var m="…",v=function(D){var L=f.slice(0,D),M=TR({breakAll:c,style:l,children:L+m}).wordsWithComputedWidth,C=h(M),P=C.length>o||g(C).width>Number(a);return[P,C]},x=0,b=f.length-1,y=0,S;x<=b&&y<=f.length-1;){var _=Math.floor((x+b)/2),j=_-1,k=v(j),E=GE(k,2),O=E[0],A=E[1],T=v(_),N=GE(T,1),I=N[0];if(!O&&!I&&(x=_+1),O&&I&&(b=_-1),!O&&I){S=A;break}y++}return S||p},XE=function(t){var r=Ce(t)?[]:t.toString().split(CR);return[{words:r}]},hle=function(t){var r=t.width,n=t.scaleToFit,a=t.children,i=t.style,o=t.breakAll,s=t.maxLines;if((r||n)&&!Oi.isSsr){var l,c,d=TR({breakAll:o,children:a,style:i});if(d){var f=d.wordsWithComputedWidth,h=d.spaceWidth;l=f,c=h}else return XE(a);return fle({breakAll:o,children:a,maxLines:s,style:i},l,c,r,n)}return XE(a)},JE="#808080",wp=function(t){var r=t.x,n=r===void 0?0:r,a=t.y,i=a===void 0?0:a,o=t.lineHeight,s=o===void 0?"1em":o,l=t.capHeight,c=l===void 0?"0.71em":l,d=t.scaleToFit,f=d===void 0?!1:d,h=t.textAnchor,p=h===void 0?"start":h,g=t.verticalAnchor,m=g===void 0?"end":g,v=t.fill,x=v===void 0?JE:v,b=KE(t,ile),y=w.useMemo(function(){return hle({breakAll:b.breakAll,children:b.children,maxLines:b.maxLines,scaleToFit:f,style:b.style,width:b.width})},[b.breakAll,b.children,b.maxLines,f,b.style,b.width]),S=b.dx,_=b.dy,j=b.angle,k=b.className,E=b.breakAll,O=KE(b,ole);if(!_t(n)||!_t(i))return null;var A=n+(Y(S)?S:0),T=i+(Y(_)?_:0),N;switch(m){case"start":N=Zv("calc(".concat(c,")"));break;case"middle":N=Zv("calc(".concat((y.length-1)/2," * -").concat(s," + (").concat(c," / 2))"));break;default:N=Zv("calc(".concat(y.length-1," * -").concat(s,")"));break}var I=[];if(f){var R=y[0].width,D=b.width;I.push("scale(".concat((Y(D)?D/R:1)/R,")"))}return j&&I.push("rotate(".concat(j,", ").concat(A,", ").concat(T,")")),I.length&&(O.transform=I.join(" ")),$.createElement("text",Ob({},Pe(O,!0),{x:A,y:T,className:ke("recharts-text",k),textAnchor:p,fill:x.includes("url")?JE:x}),y.map(function(L,M){var C=L.words.join(E?"":" ");return $.createElement("tspan",{x:A,dy:M===0?N:s,key:"".concat(C,"-").concat(M)},C)}
525))};function Ni(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function ple(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function R1(e){let t,r,n;e.length!==2?(t=Ni,r=(s,l)=>Ni(e(s),l),n=(s,l)=>e(s)-l):(t=e===Ni||e===ple?e:mle,r=e,n=e);function a(s,l,c=0,d=s.length){if(c<d){if(t(l,l)!==0)return d;do{const f=c+d>>>1;r(s[f],l)<0?c=f+1:d=f}while(c<d)}return c}function i(s,l,c=0,d=s.length){if(c<d){if(t(l,l)!==0)return d;do{const f=c+d>>>1;r(s[f],l)<=0?c=f+1:d=f}while(c<d)}return c}function o(s,l,c=0,d=s.length){const f=a(s,l,c,d-1);return f>c&&n(s[f-1],l)>-n(s[f],l)?f-1:f}return{left:a,center:o,right:i}}function mle(){return 0}function AR(e){return e===null?NaN:+e}function*gle(e,t){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const vle=R1(Ni),Fd=vle.right;R1(AR).center;class QE extends Map{constructor(t,r=xle){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(const[n,a]of t)this.set(n,a)}get(t){return super.get(ZE(this,t))}has(t){return super.has(ZE(this,t))}set(t,r){return super.set(yle(this,t),r)}delete(t){return super.delete(ble(this,t))}}function ZE({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function yle({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function ble({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function xle(e){return e!==null&&typeof e=="object"?e.valueOf():e}function wle(e=Ni){if(e===Ni)return MR;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,r)=>{const n=e(t,r);return n||n===0?n:(e(r,r)===0)-(e(t,t)===0)}}function MR(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const _le=Math.sqrt(50),Sle=Math.sqrt(10),jle=Math.sqrt(2);function _p(e,t,r){const n=(t-e)/Math.max(0,r),a=Math.floor(Math.log10(n)),i=n/Math.pow(10,a),o=i>=_le?10:i>=Sle?5:i>=jle?2:1;let s,l,c;return a<0?(c=Math.pow(10,-a)/o,s=Math.round(e*c),l=Math.round(t*c),s/c<e&&++s,l/c>t&&--l,c=-c):(c=Math.pow(10,a)*o,s=Math.round(e/c),l=Math.round(t/c),s*c<e&&++s,l*c>t&&--l),l<s&&.5<=r&&r<2?_p(e,t,r*2):[s,l,c]}function Nb(e,t,r){if(t=+t,e=+e,r=+r,!(r>0))return[];if(e===t)return[e];const n=t<e,[a,i,o]=n?_p(t,e,r):_p(e,t,r);if(!(i>=a))return[];const s=i-a+1,l=new Array(s);if(n)if(o<0)for(let c=0;c<s;++c)l[c]=(i-c)/-o;else for(let c=0;c<s;++c)l[c]=(i-c)*o;else if(o<0)for(let c=0;c<s;++c)l[c]=(a+c)/-o;else for(let c=0;c<s;++c)l[c]=(a+c)*o;return l}function Pb(e,t,r){return t=+t,e=+e,r=+r,_p(e,t,r)[2]}function Cb(e,t,r){t=+t,e=+e,r=+r;const n=t<e,a=n?Pb(t,e,r):Pb(e,t,r);return(n?-1:1)*(a<0?1/-a:a)}function eO(e,t){let r;for(const n of e)n!=null&&(r<n||r===void 0&&n>=n)&&(r=n);return r}function tO(e,t){let r;for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);return r}function $R(e,t,r=0,n=1/0,a){if(t=Math.floor(t),r=Math.floor(Math.max(0,r)),n=Math.floor(Math.min(e.length-1,n)),!(r<=t&&t<=n))return e;for(a=a===void 0?MR:wle(a);n>r;){if(n-r>600){const l=n-r+1,c=t-r+1,d=Math.log(l),f=.5*Math.exp(2*d/3),h=.5*Math.sqrt(d*f*(l-f)/l)*(c-l/2<0?-1:1),p=Math.max(r,Math.floor(t-c*f/l+h)),g=Math.min(n,Math.floor(t+(l-c)*f/l+h));$R(e,t,p,g,a)}const i=e[t];let o=r,s=n;for(Nc(e,r,t),a(e[n],i)>0&&Nc(e,r,n);o<s;){for(Nc(e,o,s),++o,--s;a(e[o],i)<0;)++o;for(;a(e[s],i)>0;)--s}a(e[r],i)===0?Nc(e,r,s):(++s,Nc(e,s,n)),s<=t&&(r=s+1),t<=s&&(n=s-1)}return e}function Nc(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function kle(e,t,r){if(e=Float64Array.from(gle(e)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return tO(e);if(t>=1)return eO(e);var n,a=(n-1)*t,i=Math.floor(a),o=eO($R(e,i).subarray(0,i+1)),s=tO(e.subarray(i+1));return o+(s-o)*(a-i)}}function Ele(e,t,r=AR){if(!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return+r(e[0],0,e);if(t>=1)return+r(e[n-1],n-1,e);var n,a=(n-1)*t,i=Math.floor(a),o=+r(e[i],i,e),s=+r(e[i+1],i+1,e);return o+(s-o)*(a-i)}}function Ole(e,t,r){e=+e,t=+t,r=(a=arguments.length)<2?(t=e,e=0,1):a<3?1:+r;for(var n=-1,a=Math.max(0,Math.ceil((t-e)/r))|0,i=new Array(a);++n<a;)i[n]=e+n*r;return i}function Qr(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function qa(e,t){switch(arguments.length){case 0:break;case 1:{typeof e=="function"?this.interpolator(e):this.range(e);break}default:{this.domain(e),typeof t=="function"?this.interpolator(t):this.range(t);break}}return this}
vendor: 10,011 bytes, line 525
525const Tb=Symbol("implicit");function I1(){var e=new QE,t=[],r=[],n=Tb;function a(i){let o=e.get(i);if(o===void 0){if(n!==Tb)return n;e.set(i,o=t.push(i)-1)}return r[o%r.length]}return a.domain=function(i){if(!arguments.length)return t.slice();t=[],e=new QE;for(const o of i)e.has(o)||e.set(o,t.push(o)-1);return a},a.range=function(i){return arguments.length?(r=Array.from(i),a):r.slice()},a.unknown=function(i){return arguments.length?(n=i,a):n},a.copy=function(){return I1(t,r).unknown(n)},Qr.apply(a,arguments),a}function Gu(){var e=I1().unknown(void 0),t=e.domain,r=e.range,n=0,a=1,i,o,s=!1,l=0,c=0,d=.5;delete e.unknown;function f(){var h=t().length,p=a<n,g=p?a:n,m=p?n:a;i=(m-g)/Math.max(1,h-l+c*2),s&&(i=Math.floor(i)),g+=(m-g-i*(h-l))*d,o=i*(1-l),s&&(g=Math.round(g),o=Math.round(o));var v=Ole(h).map(function(x){return g+i*x});return r(p?v.reverse():v)}return e.domain=function(h){return arguments.length?(t(h),f()):t()},e.range=function(h){return arguments.length?([n,a]=h,n=+n,a=+a,f()):[n,a]},e.rangeRound=function(h){return[n,a]=h,n=+n,a=+a,s=!0,f()},e.bandwidth=function(){return o},e.step=function(){return i},e.round=function(h){return arguments.length?(s=!!h,f()):s},e.padding=function(h){return arguments.length?(l=Math.min(1,c=+h),f()):l},e.paddingInner=function(h){return arguments.length?(l=Math.min(1,h),f()):l},e.paddingOuter=function(h){return arguments.length?(c=+h,f()):c},e.align=function(h){return arguments.length?(d=Math.max(0,Math.min(1,h)),f()):d},e.copy=function(){return Gu(t(),[n,a]).round(s).paddingInner(l).paddingOuter(c).align(d)},Qr.apply(f(),arguments)}function RR(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return RR(t())},e}function au(){return RR(Gu.apply(null,arguments).paddingInner(1))}function D1(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function IR(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function Ud(){}var Yu=.7,Sp=1/Yu,Zs="\\s*([+-]?\\d+)\\s*",Xu="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",ta="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Nle=/^#([0-9a-f]{3,8})$/,Ple=new RegExp(`^rgb\\(${Zs},${Zs},${Zs}\\)$`),Cle=new RegExp(`^rgb\\(${ta},${ta},${ta}\\)$`),Tle=new RegExp(`^rgba\\(${Zs},${Zs},${Zs},${Xu}\\)$`),Ale=new RegExp(`^rgba\\(${ta},${ta},${ta},${Xu}\\)$`),Mle=new RegExp(`^hsl\\(${Xu},${ta},${ta}\\)$`),$le=new RegExp(`^hsla\\(${Xu},${ta},${ta},${Xu}\\)$`),rO={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};D1(Ud,Ju,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:nO,formatHex:nO,formatHex8:Rle,formatHsl:Ile,formatRgb:aO,toString:aO});function nO(){return this.rgb().formatHex()}function Rle(){return this.rgb().formatHex8()}function Ile(){return DR(this).formatHsl()}function aO(){return this.rgb().formatRgb()}function Ju(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=Nle.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?iO(t):r===3?new ur(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?Uf(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?Uf(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=Ple.exec(e))?new ur(t[1],t[2],t[3],1):(t=Cle.exec(e))?new ur(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Tle.exec(e))?Uf(t[1],t[2],t[3],t[4]):(t=Ale.exec(e))?Uf(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Mle.exec(e))?lO(t[1],t[2]/100,t[3]/100,1):(t=$le.exec(e))?lO(t[1],t[2]/100,t[3]/100,t[4]):rO.hasOwnProperty(e)?iO(rO[e]):e==="transparent"?new ur(NaN,NaN,NaN,0):null}function iO(e){return new ur(e>>16&255,e>>8&255,e&255,1)}function Uf(e,t,r,n){return n<=0&&(e=t=r=NaN),new ur(e,t,r,n)}function Dle(e){return e instanceof Ud||(e=Ju(e)),e?(e=e.rgb(),new ur(e.r,e.g,e.b,e.opacity)):new ur}function Ab(e,t,r,n){return arguments.length===1?Dle(e):new ur(e,t,r,n??1)}function ur(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}D1(ur,Ab,IR(Ud,{brighter(e){return e=e==null?Sp:Math.pow(Sp,e),new ur(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Yu:Math.pow(Yu,e),new ur(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new ur(jo(this.r),jo(this.g),jo(this.b),jp(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:oO,formatHex:oO,formatHex8:Lle,formatRgb:sO,toString:sO}));function oO(){return`#${fo(this.r)}${fo(this.g)}${fo(this.b)}`}function Lle(){return`#${fo(this.r)}${fo(this.g)}${fo(this.b)}${fo((isNaN(this.opacity)?1:this.opacity)*255)}`}function sO(){const e=jp(this.opacity);return`${e===1?"rgb(":"rgba("}${jo(this.r)}, ${jo(this.g)}, ${jo(this.b)}${e===1?")":`, ${e})`}`}function jp(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function jo(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function fo(e){return e=jo(e),(e<16?"0":"")+e.toString(16)}function lO(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new vn(e,t,r,n)}function DR(e){if(e instanceof vn)return new vn(e.h,e.s,e.l,e.opacity);if(e instanceof Ud||(e=Ju(e)),!e)return new vn;if(e instanceof vn)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,a=Math.min(t,r,n),i=Math.max(t,r,n),o=NaN,s=i-a,l=(i+a)/2;return s?(t===i?o=(r-n)/s+(r<n)*6:r===i?o=(n-t)/s+2:o=(t-r)/s+4,s/=l<.5?i+a:2-i-a,o*=60):s=l>0&&l<1?0:o,new vn(o,s,l,e.opacity)}function Ble(e,t,r,n){return arguments.length===1?DR(e):new vn(e,t,r,n??1)}function vn(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}D1(vn,Ble,IR(Ud,{brighter(e){return e=e==null?Sp:Math.pow(Sp,e),new vn(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Yu:Math.pow(Yu,e),new vn(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,a=2*r-n;return new ur(ey(e>=240?e-240:e+120,a,n),ey(e,a,n),ey(e<120?e+240:e-120,a,n),this.opacity)},clamp(){return new vn(cO(this.h),zf(this.s),zf(this.l),jp(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=jp(this.opacity);return`${e===1?"hsl(":"hsla("}${cO(this.h)}, ${zf(this.s)*100}%, ${zf(this.l)*100}%${e===1?")":`, ${e})`}`}}));function cO(e){return e=(e||0)%360,e<0?e+360:e}function zf(e){return Math.max(0,Math.min(1,e||0))}function ey(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const L1=e=>()=>e;function Fle(e,t){return function(r){return e+r*t}}function Ule(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function zle(e){return(e=+e)==1?LR:function(t,r){return r-t?Ule(t,r,e):L1(isNaN(t)?r:t)}}function LR(e,t){var r=t-e;return r?Fle(e,r):L1(isNaN(e)?t:e)}const uO=function e(t){var r=zle(t);function n(a,i){var o=r((a=Ab(a)).r,(i=Ab(i)).r),s=r(a.g,i.g),l=r(a.b,i.b),c=LR(a.opacity,i.opacity);return function(d){return a.r=o(d),a.g=s(d),a.b=l(d),a.opacity=c(d),a+""}}return n.gamma=e,n}(1);function Wle(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),a;return function(i){for(a=0;a<r;++a)n[a]=e[a]*(1-i)+t[a]*i;return n}}function Hle(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function qle(e,t){var r=t?t.length:0,n=e?Math.min(r,e.length):0,a=new Array(n),i=new Array(r),o;for(o=0;o<n;++o)a[o]=cc(e[o],t[o]);for(;o<r;
vendor: 9,972 bytes, line 525
525++o)i[o]=t[o];return function(s){for(o=0;o<n;++o)i[o]=a[o](s);return i}}function Vle(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}function kp(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function Kle(e,t){var r={},n={},a;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(a in t)a in e?r[a]=cc(e[a],t[a]):n[a]=t[a];return function(i){for(a in r)n[a]=r[a](i);return n}}var Mb=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ty=new RegExp(Mb.source,"g");function Gle(e){return function(){return e}}function Yle(e){return function(t){return e(t)+""}}function Xle(e,t){var r=Mb.lastIndex=ty.lastIndex=0,n,a,i,o=-1,s=[],l=[];for(e=e+"",t=t+"";(n=Mb.exec(e))&&(a=ty.exec(t));)(i=a.index)>r&&(i=t.slice(r,i),s[o]?s[o]+=i:s[++o]=i),(n=n[0])===(a=a[0])?s[o]?s[o]+=a:s[++o]=a:(s[++o]=null,l.push({i:o,x:kp(n,a)})),r=ty.lastIndex;return r<t.length&&(i=t.slice(r),s[o]?s[o]+=i:s[++o]=i),s.length<2?l[0]?Yle(l[0].x):Gle(t):(t=l.length,function(c){for(var d=0,f;d<t;++d)s[(f=l[d]).i]=f.x(c);return s.join("")})}function cc(e,t){var r=typeof t,n;return t==null||r==="boolean"?L1(t):(r==="number"?kp:r==="string"?(n=Ju(t))?(t=n,uO):Xle:t instanceof Ju?uO:t instanceof Date?Vle:Hle(t)?Wle:Array.isArray(t)?qle:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?Kle:kp)(e,t)}function B1(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}function Jle(e,t){t===void 0&&(t=e,e=cc);for(var r=0,n=t.length-1,a=t[0],i=new Array(n<0?0:n);r<n;)i[r]=e(a,a=t[++r]);return function(o){var s=Math.max(0,Math.min(n-1,Math.floor(o*=n)));return i[s](o-s)}}function Qle(e){return function(){return e}}function Ep(e){return+e}var dO=[0,1];function Zt(e){return e}function $b(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:Qle(isNaN(t)?NaN:.5)}function Zle(e,t){var r;return e>t&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function ece(e,t,r){var n=e[0],a=e[1],i=t[0],o=t[1];return a<n?(n=$b(a,n),i=r(o,i)):(n=$b(n,a),i=r(i,o)),function(s){return i(n(s))}}function tce(e,t,r){var n=Math.min(e.length,t.length)-1,a=new Array(n),i=new Array(n),o=-1;for(e[n]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<n;)a[o]=$b(e[o],e[o+1]),i[o]=r(t[o],t[o+1]);return function(s){var l=Fd(e,s,1,n)-1;return i[l](a[l](s))}}function zd(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function yg(){var e=dO,t=dO,r=cc,n,a,i,o=Zt,s,l,c;function d(){var h=Math.min(e.length,t.length);return o!==Zt&&(o=Zle(e[0],e[h-1])),s=h>2?tce:ece,l=c=null,f}function f(h){return h==null||isNaN(h=+h)?i:(l||(l=s(e.map(n),t,r)))(n(o(h)))}return f.invert=function(h){return o(a((c||(c=s(t,e.map(n),kp)))(h)))},f.domain=function(h){return arguments.length?(e=Array.from(h,Ep),d()):e.slice()},f.range=function(h){return arguments.length?(t=Array.from(h),d()):t.slice()},f.rangeRound=function(h){return t=Array.from(h),r=B1,d()},f.clamp=function(h){return arguments.length?(o=h?!0:Zt,d()):o!==Zt},f.interpolate=function(h){return arguments.length?(r=h,d()):r},f.unknown=function(h){return arguments.length?(i=h,f):i},function(h,p){return n=h,a=p,d()}}function F1(){return yg()(Zt,Zt)}function rce(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Op(e,t){if((r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var r,n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function kl(e){return e=Op(Math.abs(e)),e?e[1]:NaN}function nce(e,t){return function(r,n){for(var a=r.length,i=[],o=0,s=e[0],l=0;a>0&&s>0&&(l+s+1>n&&(s=Math.max(1,n-l)),i.push(r.substring(a-=s,a+s)),!((l+=s+1)>n));)s=e[o=(o+1)%e.length];return i.reverse().join(t)}}function ace(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var ice=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Qu(e){if(!(t=ice.exec(e)))throw new Error("invalid format: "+e);var t;return new U1({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}Qu.prototype=U1.prototype;function U1(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}U1.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function oce(e){e:for(var t=e.length,r=1,n=-1,a;r<t;++r)switch(e[r]){case".":n=a=r;break;case"0":n===0&&(n=r),a=r;break;default:if(!+e[r])break e;n>0&&(n=0);break}return n>0?e.slice(0,n)+e.slice(a+1):e}var BR;function sce(e,t){var r=Op(e,t);if(!r)return e+"";var n=r[0],a=r[1],i=a-(BR=Math.max(-8,Math.min(8,Math.floor(a/3)))*3)+1,o=n.length;return i===o?n:i>o?n+new Array(i-o+1).join("0"):i>0?n.slice(0,i)+"."+n.slice(i):"0."+new Array(1-i).join("0")+Op(e,Math.max(0,t+i-1))[0]}function fO(e,t){var r=Op(e,t);if(!r)return e+"";var n=r[0],a=r[1];return a<0?"0."+new Array(-a).join("0")+n:n.length>a+1?n.slice(0,a+1)+"."+n.slice(a+1):n+new Array(a-n.length+2).join("0")}const hO={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:rce,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>fO(e*100,t),r:fO,s:sce,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function pO(e){return e}var mO=Array.prototype.map,gO=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function lce(e){var t=e.grouping===void 0||e.thousands===void 0?pO:nce(mO.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",n=e.currency===void 0?"":e.currency[1]+"",a=e.decimal===void 0?".":e.decimal+"",i=e.numerals===void 0?pO:ace(mO.call(e.numerals,String)),o=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"−":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function c(f){f=Qu(f);var h=f.fill,p=f.align,g=f.sign,m=f.symbol,v=f.zero,x=f.width,b=f.comma,y=f.precision,S=f.trim,_=f.type;_==="n"?(b=!0,_="g"):hO[_]||(y===void 0&&(y=12),S=!0,_="g"),(v||h==="0"&&p==="=")&&(v=!0,h="0",p="=");var j=m==="$"?r:m==="#"&&/[boxX]/.test(_)?"0"+_.toLowerCase():"",k=m==="$"?n:/[%p]/.test(_)?o:"",E=hO[_],O=/[defgprs%]/.test(_);y=y===void 0?6:/[gprs]/.test(_)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y));function A(T){var N=j,I=k,R,D,L;if(_==="c")I=E(T)+I,T="";else{T=+T;var M=T<0||1/T<0;if(T=isNaN(T)?l:E(Math.abs(T),y),S&&(T=oce(T)),M&&+T==0&&g!=="+"&&(M=!1),N=(M?g==="("?g:s:g==="-"||g==="("?"":g)+N,I=(_==="s"?gO[8+BR/3]:"")+I+(M&&g==="("?")":""),O){for(R=-1,D=T.length;++R<D;)if(L=T.charCodeAt(R),48>L||L>57){I=(L===46?a+T.slice(R+1):T.slice(R))+I,T=T.slice(0,R);break}}}b&&!v&&(T=t(T,1/0));var C=N.length+T.length+I.length,P=C<x?new Array(x-C+1).join(h):"";switch(b&&v&&(T=t(P+T,P.length?x-I.length:1/0),P=""),p){case"<":T=N+T+I+P;break;case"=":T=N+P+T+I;break;case"^":T=P.slice(0,C=P.length>>1)+N+T+I+P.slice(C);break;default:T=P+N+T+I;break}return i(T)}return A.toString=function(){return f+""},A}function d(f,h){var p=c((f=Qu(f),f.type="f",f)),g=Math.max(-8,Math.min(8,Math.floor(kl(h)/3)))*3,m=Math.pow(10,-g),v=gO[8+g/3];return function(x){return p(m*x)+v}}return{format:c,formatPrefix:d}}var Wf,z1,FR;cce({thousands:",",grouping:[3],currency:["$",""]});function cce(e){return Wf=lce(e),z1=Wf.format,FR=Wf.formatPrefix,Wf}function uce(e){return Math.max(0,-kl(Math.abs(e)))}function dce(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(kl(t)/3)))*3-kl(Math.abs(e)))}function fce(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,kl(t)-kl(e))+1}function UR(e,t,r,n){var a=Cb(e,t,r),i;switch(n=Qu(n??",f"),n.type){case"s":{var o=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(i=dce(a,o))&&(n.precision=i),FR(n,o)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(i=fce(a,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=i-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(i=uce(a))&&(n.precision=i-(n.type==="%")*2);break}}return z1(n)}function Wi(e){var t=e.domain;return e.ticks=function(r){var n=t();return Nb(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var a=t();return UR(a[0],a[a.length-1],r??10,n)},e.nice=function(r){r==null&&(r=10);var n=t(),a=0,i=n.length-1,o=n[a],s=n[i],l,c,d=10;for(s<o&&(c=o,o=s,s=c,c=a,a=i,i=c);d-- >0;){if(c=Pb(o,s,r),c===l)return n[a]=o,n[i]=s,t(n);if(c>0)o=Math.floor(o/c)*c,s=Math.ceil(s/c)*c;else if(c<0)o=Math.ceil(o*c)/c,s=Math.floor(s*c)/c;else break;l=c}return e},e}function Np(){var e=F1();return e.copy=function(){return zd(e,Np())},Qr.apply(e,arguments),Wi(e)}function zR(e){var t;function r(n){return n==null||isNaN(n=+n)?t:n}return r.invert=r,r.domain=r.range=function(n){return arguments.length?(e=Array.from(n,Ep),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return zR(e).unknown(t)},e=arguments.length?Array.from(e,Ep):[0,1],Wi(r)}function WR(e,t){e=e.slice();var r=0,n=e.length-1,a=e[r],i=e[n],o;return i<a&&(o=r,r=n,n=o,o=a,a=i,i=o),e[r]=t.floor(a),e[n]=t.ceil(i),e}function vO(e){return Math.log(e)}function yO(e){return Math.exp(e)}function hce(e){return-Math.log(-e)}function pce(e){return-Math.exp(-e)}function mce(e){return isFinite(e)?+("1e"+e):e<0?0:e}function gce(e){return e===10?mce:e===Math.E?Math.exp:t=>Math.pow(e,t)}function vce(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function bO(e){return(t,r)=>-e(-t,r)}function W1(e){const t=e(vO,yO),r=t.domain;let n=10,a,i;
vendor: 5,086 bytes, line 525
525function o(){return a=vce(n),i=gce(n),r()[0]<0?(a=bO(a),i=bO(i),e(hce,pce)):e(vO,yO),t}return t.base=function(s){return arguments.length?(n=+s,o()):n},t.domain=function(s){return arguments.length?(r(s),o()):r()},t.ticks=s=>{const l=r();let c=l[0],d=l[l.length-1];const f=d<c;f&&([c,d]=[d,c]);let h=a(c),p=a(d),g,m;const v=s==null?10:+s;let x=[];if(!(n%1)&&p-h<v){if(h=Math.floor(h),p=Math.ceil(p),c>0){for(;h<=p;++h)for(g=1;g<n;++g)if(m=h<0?g/i(-h):g*i(h),!(m<c)){if(m>d)break;x.push(m)}}else for(;h<=p;++h)for(g=n-1;g>=1;--g)if(m=h>0?g/i(-h):g*i(h),!(m<c)){if(m>d)break;x.push(m)}x.length*2<v&&(x=Nb(c,d,v))}else x=Nb(h,p,Math.min(p-h,v)).map(i);return f?x.reverse():x},t.tickFormat=(s,l)=>{if(s==null&&(s=10),l==null&&(l=n===10?"s":","),typeof l!="function"&&(!(n%1)&&(l=Qu(l)).precision==null&&(l.trim=!0),l=z1(l)),s===1/0)return l;const c=Math.max(1,n*s/t.ticks().length);return d=>{let f=d/i(Math.round(a(d)));return f*n<n-.5&&(f*=n),f<=c?l(d):""}},t.nice=()=>r(WR(r(),{floor:s=>i(Math.floor(a(s))),ceil:s=>i(Math.ceil(a(s)))})),t}function HR(){const e=W1(yg()).domain([1,10]);return e.copy=()=>zd(e,HR()).base(e.base()),Qr.apply(e,arguments),e}function xO(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function wO(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function H1(e){var t=1,r=e(xO(t),wO(t));return r.constant=function(n){return arguments.length?e(xO(t=+n),wO(t)):t},Wi(r)}function qR(){var e=H1(yg());return e.copy=function(){return zd(e,qR()).constant(e.constant())},Qr.apply(e,arguments)}function _O(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function yce(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function bce(e){return e<0?-e*e:e*e}function q1(e){var t=e(Zt,Zt),r=1;function n(){return r===1?e(Zt,Zt):r===.5?e(yce,bce):e(_O(r),_O(1/r))}return t.exponent=function(a){return arguments.length?(r=+a,n()):r},Wi(t)}function V1(){var e=q1(yg());return e.copy=function(){return zd(e,V1()).exponent(e.exponent())},Qr.apply(e,arguments),e}function xce(){return V1.apply(null,arguments).exponent(.5)}function SO(e){return Math.sign(e)*e*e}function wce(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function VR(){var e=F1(),t=[0,1],r=!1,n;function a(i){var o=wce(e(i));return isNaN(o)?n:r?Math.round(o):o}return a.invert=function(i){return e.invert(SO(i))},a.domain=function(i){return arguments.length?(e.domain(i),a):e.domain()},a.range=function(i){return arguments.length?(e.range((t=Array.from(i,Ep)).map(SO)),a):t.slice()},a.rangeRound=function(i){return a.range(i).round(!0)},a.round=function(i){return arguments.length?(r=!!i,a):r},a.clamp=function(i){return arguments.length?(e.clamp(i),a):e.clamp()},a.unknown=function(i){return arguments.length?(n=i,a):n},a.copy=function(){return VR(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},Qr.apply(a,arguments),Wi(a)}function KR(){var e=[],t=[],r=[],n;function a(){var o=0,s=Math.max(1,t.length);for(r=new Array(s-1);++o<s;)r[o-1]=Ele(e,o/s);return i}function i(o){return o==null||isNaN(o=+o)?n:t[Fd(r,o)]}return i.invertExtent=function(o){var s=t.indexOf(o);return s<0?[NaN,NaN]:[s>0?r[s-1]:e[0],s<r.length?r[s]:e[e.length-1]]},i.domain=function(o){if(!arguments.length)return e.slice();e=[];for(let s of o)s!=null&&!isNaN(s=+s)&&e.push(s);return e.sort(Ni),a()},i.range=function(o){return arguments.length?(t=Array.from(o),a()):t.slice()},i.unknown=function(o){return arguments.length?(n=o,i):n},i.quantiles=function(){return r.slice()},i.copy=function(){return KR().domain(e).range(t).unknown(n)},Qr.apply(i,arguments)}function GR(){var e=0,t=1,r=1,n=[.5],a=[0,1],i;function o(l){return l!=null&&l<=l?a[Fd(n,l,0,r)]:i}function s(){var l=-1;for(n=new Array(r);++l<r;)n[l]=((l+1)*t-(l-r)*e)/(r+1);return o}return o.domain=function(l){return arguments.length?([e,t]=l,e=+e,t=+t,s()):[e,t]},o.range=function(l){return arguments.length?(r=(a=Array.from(l)).length-1,s()):a.slice()},o.invertExtent=function(l){var c=a.indexOf(l);return c<0?[NaN,NaN]:c<1?[e,n[0]]:c>=r?[n[r-1],t]:[n[c-1],n[c]]},o.unknown=function(l){return arguments.length&&(i=l),o},o.thresholds=function(){return n.slice()},o.copy=function(){return GR().domain([e,t]).range(a).unknown(i)},Qr.apply(Wi(o),arguments)}function YR(){var e=[.5],t=[0,1],r,n=1;function a(i){return i!=null&&i<=i?t[Fd(e,i,0,n)]:r}return a.domain=function(i){return arguments.length?(e=Array.from(i),n=Math.min(e.length,t.length-1),a):e.slice()},a.range=function(i){return arguments.length?(t=Array.from(i),n=Math.min(e.length,t.length-1),a):t.slice()},a.invertExtent=function(i){var o=t.indexOf(i);return[e[o-1],e[o]]},a.unknown=function(i){return arguments.length?(r=i,a):r},a.copy=function(){return YR().domain(e).range(t).unknown(r)},Qr.apply(a,arguments)}const ry=new Date,ny=new Date;function St(e,t,r,n){function a(i){return e(i=arguments.length===0?new Date:new Date(+i)),i}return a.floor=i=>(e(i=new Date(+i)),i),a.ceil=i=>(e(i=new Date(i-1)),t(i,1),e(i),i),a.round=i=>{const o=a(i),s=a.ceil(i);return i-o<s-i?o:s},a.offset=(i,o)=>(t(i=new Date(+i),o==null?1:Math.floor(o)),i),a.range=(i,o,s)=>{const l=[];
vendor: 5,973 bytes, line 525
525if(i=a.ceil(i),s=s==null?1:Math.floor(s),!(i<o)||!(s>0))return l;let c;do l.push(c=new Date(+i)),t(i,s),e(i);while(c<i&&i<o);return l},a.filter=i=>St(o=>{if(o>=o)for(;e(o),!i(o);)o.setTime(o-1)},(o,s)=>{if(o>=o)if(s<0)for(;++s<=0;)for(;t(o,-1),!i(o););else for(;--s>=0;)for(;t(o,1),!i(o););}),r&&(a.count=(i,o)=>(ry.setTime(+i),ny.setTime(+o),e(ry),e(ny),Math.floor(r(ry,ny))),a.every=i=>(i=Math.floor(i),!isFinite(i)||!(i>0)?null:i>1?a.filter(n?o=>n(o)%i===0:o=>a.count(0,o)%i===0):a)),a}const Pp=St(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Pp.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?St(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):Pp);Pp.range;const xa=1e3,Hr=xa*60,wa=Hr*60,$a=wa*24,K1=$a*7,jO=$a*30,ay=$a*365,ho=St(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*xa)},(e,t)=>(t-e)/xa,e=>e.getUTCSeconds());ho.range;const G1=St(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*xa)},(e,t)=>{e.setTime(+e+t*Hr)},(e,t)=>(t-e)/Hr,e=>e.getMinutes());G1.range;const Y1=St(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Hr)},(e,t)=>(t-e)/Hr,e=>e.getUTCMinutes());Y1.range;const X1=St(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*xa-e.getMinutes()*Hr)},(e,t)=>{e.setTime(+e+t*wa)},(e,t)=>(t-e)/wa,e=>e.getHours());X1.range;const J1=St(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*wa)},(e,t)=>(t-e)/wa,e=>e.getUTCHours());J1.range;const Wd=St(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Hr)/$a,e=>e.getDate()-1);Wd.range;const bg=St(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/$a,e=>e.getUTCDate()-1);bg.range;const XR=St(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/$a,e=>Math.floor(e/$a));XR.range;function Jo(e){return St(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,r)=>{t.setDate(t.getDate()+r*7)},(t,r)=>(r-t-(r.getTimezoneOffset()-t.getTimezoneOffset())*Hr)/K1)}const xg=Jo(0),Cp=Jo(1),_ce=Jo(2),Sce=Jo(3),El=Jo(4),jce=Jo(5),kce=Jo(6);xg.range;Cp.range;_ce.range;Sce.range;El.range;jce.range;kce.range;function Qo(e){return St(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCDate(t.getUTCDate()+r*7)},(t,r)=>(r-t)/K1)}const wg=Qo(0),Tp=Qo(1),Ece=Qo(2),Oce=Qo(3),Ol=Qo(4),Nce=Qo(5),Pce=Qo(6);wg.range;Tp.range;Ece.range;Oce.range;Ol.range;Nce.range;Pce.range;const Q1=St(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());Q1.range;const Z1=St(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());Z1.range;const Ra=St(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());Ra.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:St(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,r)=>{t.setFullYear(t.getFullYear()+r*e)});Ra.range;const Ia=St(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());Ia.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:St(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCFullYear(t.getUTCFullYear()+r*e)});Ia.range;function JR(e,t,r,n,a,i){const o=[[ho,1,xa],[ho,5,5*xa],[ho,15,15*xa],[ho,30,30*xa],[i,1,Hr],[i,5,5*Hr],[i,15,15*Hr],[i,30,30*Hr],[a,1,wa],[a,3,3*wa],[a,6,6*wa],[a,12,12*wa],[n,1,$a],[n,2,2*$a],[r,1,K1],[t,1,jO],[t,3,3*jO],[e,1,ay]];function s(c,d,f){const h=d<c;h&&([c,d]=[d,c]);const p=f&&typeof f.range=="function"?f:l(c,d,f),g=p?p.range(c,+d+1):[];return h?g.reverse():g}function l(c,d,f){const h=Math.abs(d-c)/f,p=R1(([,,v])=>v).right(o,h);if(p===o.length)return e.every(Cb(c/ay,d/ay,f));if(p===0)return Pp.every(Math.max(Cb(c,d,f),1));const[g,m]=o[h/o[p-1][2]<o[p][2]/h?p-1:p];return g.every(m)}return[s,l]}const[Cce,Tce]=JR(Ia,Z1,wg,XR,J1,Y1),[Ace,Mce]=JR(Ra,Q1,xg,Wd,X1,G1);function iy(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function oy(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function Pc(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function $ce(e){var t=e.dateTime,r=e.date,n=e.time,a=e.periods,i=e.days,o=e.shortDays,s=e.months,l=e.shortMonths,c=Cc(a),d=Tc(a),f=Cc(i),h=Tc(i),p=Cc(o),g=Tc(o),m=Cc(s),v=Tc(s),x=Cc(l),b=Tc(l),y={a:M,A:C,b:P,B,c:null,d:CO,e:CO,f:nue,g:hue,G:mue,H:eue,I:tue,j:rue,L:QR,m:aue,M:iue,p:U,q:F,Q:MO,s:$O,S:oue,u:sue,U:lue,V:cue,w:uue,W:due,x:null,X:null,y:fue,Y:pue,Z:gue,"%":AO},S={a:V,A:J,b:ue,B:_e,c:null,d:TO,e:TO,f:xue,g:Cue,G:Aue,H:vue,I:yue,j:bue,L:eI,m:wue,M:_ue,p:X,q:he,Q:MO,s:$O,S:Sue,u:jue,U:kue,V:Eue,w:Oue,W:Nue,x:null,X:null,y:Pue,Y:Tue,Z:Mue,"%":AO},_={a:A,A:T,b:N,B:I,c:R,d:NO,e:NO,f:Xce,g:OO,G:EO,H:PO,I:PO,j:Vce,L:Yce,m:qce,M:Kce,p:O,q:Hce,Q:Qce,s:Zce,S:Gce,u:Bce,U:Fce,V:Uce,w:Lce,W:zce,x:D,X:L,y:OO,Y:EO,Z:Wce,"%":Jce};y.x=j(r,y),y.X=j(n,y),y.c=j(t,y),S.x=j(r,S),S.X=j(n,S),S.c=j(t,S);function j(K,Z){return function(Q){var z=[],be=-1,fe=0,Ue=K.length,De,it,nr;for(Q instanceof Date||(Q=new Date(+Q));++be<Ue;)K.charCodeAt(be)===37&&(z.push(K.slice(fe,be)),(it=kO[De=K.charAt(++be)])!=null?De=K.charAt(++be):it=De==="e"?" ":"0",(nr=Z[De])&&(De=nr(Q,it)),z.push(De),fe=be+1);return z.push(K.slice(fe,be)),z.join("")}}function k(K,Z){return function(Q){var z=Pc(1900,void 0,1),be=E(z,K,Q+="",0),fe,Ue;if(be!=Q.length)return null;if("Q"in z)return new Date(z.Q);if("s"in z)return new Date(z.s*1e3+("L"in z?z.L:0));
vendor: 4,365 bytes, line 525
525if(Z&&!("Z"in z)&&(z.Z=0),"p"in z&&(z.H=z.H%12+z.p*12),z.m===void 0&&(z.m="q"in z?z.q:0),"V"in z){if(z.V<1||z.V>53)return null;"w"in z||(z.w=1),"Z"in z?(fe=oy(Pc(z.y,0,1)),Ue=fe.getUTCDay(),fe=Ue>4||Ue===0?Tp.ceil(fe):Tp(fe),fe=bg.offset(fe,(z.V-1)*7),z.y=fe.getUTCFullYear(),z.m=fe.getUTCMonth(),z.d=fe.getUTCDate()+(z.w+6)%7):(fe=iy(Pc(z.y,0,1)),Ue=fe.getDay(),fe=Ue>4||Ue===0?Cp.ceil(fe):Cp(fe),fe=Wd.offset(fe,(z.V-1)*7),z.y=fe.getFullYear(),z.m=fe.getMonth(),z.d=fe.getDate()+(z.w+6)%7)}else("W"in z||"U"in z)&&("w"in z||(z.w="u"in z?z.u%7:"W"in z?1:0),Ue="Z"in z?oy(Pc(z.y,0,1)).getUTCDay():iy(Pc(z.y,0,1)).getDay(),z.m=0,z.d="W"in z?(z.w+6)%7+z.W*7-(Ue+5)%7:z.w+z.U*7-(Ue+6)%7);return"Z"in z?(z.H+=z.Z/100|0,z.M+=z.Z%100,oy(z)):iy(z)}}function E(K,Z,Q,z){for(var be=0,fe=Z.length,Ue=Q.length,De,it;be<fe;){if(z>=Ue)return-1;if(De=Z.charCodeAt(be++),De===37){if(De=Z.charAt(be++),it=_[De in kO?Z.charAt(be++):De],!it||(z=it(K,Q,z))<0)return-1}else if(De!=Q.charCodeAt(z++))return-1}return z}function O(K,Z,Q){var z=c.exec(Z.slice(Q));return z?(K.p=d.get(z[0].toLowerCase()),Q+z[0].length):-1}function A(K,Z,Q){var z=p.exec(Z.slice(Q));return z?(K.w=g.get(z[0].toLowerCase()),Q+z[0].length):-1}function T(K,Z,Q){var z=f.exec(Z.slice(Q));return z?(K.w=h.get(z[0].toLowerCase()),Q+z[0].length):-1}function N(K,Z,Q){var z=x.exec(Z.slice(Q));return z?(K.m=b.get(z[0].toLowerCase()),Q+z[0].length):-1}function I(K,Z,Q){var z=m.exec(Z.slice(Q));return z?(K.m=v.get(z[0].toLowerCase()),Q+z[0].length):-1}function R(K,Z,Q){return E(K,t,Z,Q)}function D(K,Z,Q){return E(K,r,Z,Q)}function L(K,Z,Q){return E(K,n,Z,Q)}function M(K){return o[K.getDay()]}function C(K){return i[K.getDay()]}function P(K){return l[K.getMonth()]}function B(K){return s[K.getMonth()]}function U(K){return a[+(K.getHours()>=12)]}function F(K){return 1+~~(K.getMonth()/3)}function V(K){return o[K.getUTCDay()]}function J(K){return i[K.getUTCDay()]}function ue(K){return l[K.getUTCMonth()]}function _e(K){return s[K.getUTCMonth()]}function X(K){return a[+(K.getUTCHours()>=12)]}function he(K){return 1+~~(K.getUTCMonth()/3)}return{format:function(K){var Z=j(K+="",y);return Z.toString=function(){return K},Z},parse:function(K){var Z=k(K+="",!1);return Z.toString=function(){return K},Z},utcFormat:function(K){var Z=j(K+="",S);return Z.toString=function(){return K},Z},utcParse:function(K){var Z=k(K+="",!0);return Z.toString=function(){return K},Z}}}var kO={"-":"",_:" ",0:"0"},Ct=/^\s*\d+/,Rce=/^%/,Ice=/[\\^$*+?|[\]().{}]/g;function Ne(e,t,r){var n=e<0?"-":"",a=(n?-e:e)+"",i=a.length;return n+(i<r?new Array(r-i+1).join(t)+a:a)}function Dce(e){return e.replace(Ice,"\\$&")}function Cc(e){return new RegExp("^(?:"+e.map(Dce).join("|")+")","i")}function Tc(e){return new Map(e.map((t,r)=>[t.toLowerCase(),r]))}function Lce(e,t,r){var n=Ct.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function Bce(e,t,r){var n=Ct.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function Fce(e,t,r){var n=Ct.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function Uce(e,t,r){var n=Ct.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function zce(e,t,r){var n=Ct.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function EO(e,t,r){var n=Ct.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function OO(e,t,r){var n=Ct.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function Wce(e,t,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function Hce(e,t,r){var n=Ct.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function qce(e,t,r){var n=Ct.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function NO(e,t,r){var n=Ct.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function Vce(e,t,r){var n=Ct.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function PO(e,t,r){var n=Ct.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function Kce(e,t,r){var n=Ct.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function Gce(e,t,r){var n=Ct.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function Yce(e,t,r){var n=Ct.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function Xce(e,t,r){var n=Ct.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}
525function Jce(e,t,r){var n=Rce.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function Qce(e,t,r){var n=Ct.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function Zce(e,t,r){var n=Ct.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function CO(e,t){return Ne(e.getDate(),t,2)}function eue(e,t){return Ne(e.getHours(),t,2)}function tue(e,t){return Ne(e.getHours()%12||12,t,2)}function rue(e,t){return Ne(1+Wd.count(Ra(e),e),t,3)}function QR(e,t){return Ne(e.getMilliseconds(),t,3)}function nue(e,t){return QR(e,t)+"000"}function aue(e,t){return Ne(e.getMonth()+1,t,2)}function iue(e,t){return Ne(e.getMinutes(),t,2)}function oue(e,t){return Ne(e.getSeconds(),t,2)}function sue(e){var t=e.getDay();return t===0?7:t}function lue(e,t){return Ne(xg.count(Ra(e)-1,e),t,2)}function ZR(e){var t=e.getDay();return t>=4||t===0?El(e):El.ceil(e)}function cue(e,t){return e=ZR(e),Ne(El.count(Ra(e),e)+(Ra(e).getDay()===4),t,2)}function uue(e){return e.getDay()}function due(e,t){return Ne(Cp.count(Ra(e)-1,e),t,2)}function fue(e,t){return Ne(e.getFullYear()%100,t,2)}function hue(e,t){return e=ZR(e),Ne(e.getFullYear()%100,t,2)}function pue(e,t){return Ne(e.getFullYear()%1e4,t,4)}function mue(e,t){var r=e.getDay();return e=r>=4||r===0?El(e):El.ceil(e),Ne(e.getFullYear()%1e4,t,4)}function gue(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Ne(t/60|0,"0",2)+Ne(t%60,"0",2)}function TO(e,t){return Ne(e.getUTCDate(),t,2)}function vue(e,t){return Ne(e.getUTCHours(),t,2)}function yue(e,t){return Ne(e.getUTCHours()%12||12,t,2)}function bue(e,t){return Ne(1+bg.count(Ia(e),e),t,3)}function eI(e,t){return Ne(e.getUTCMilliseconds(),t,3)}function xue(e,t){return eI(e,t)+"000"}function wue(e,t){return Ne(e.getUTCMonth()+1,t,2)}function _ue(e,t){return Ne(e.getUTCMinutes(),t,2)}function Sue(e,t){return Ne(e.getUTCSeconds(),t,2)}function jue(e){var t=e.getUTCDay();return t===0?7:t}function kue(e,t){return Ne(wg.count(Ia(e)-1,e),t,2)}function tI(e){var t=e.getUTCDay();return t>=4||t===0?Ol(e):Ol.ceil(e)}function Eue(e,t){return e=tI(e),Ne(Ol.count(Ia(e),e)+(Ia(e).getUTCDay()===4),t,2)}function Oue(e){return e.getUTCDay()}function Nue(e,t){return Ne(Tp.count(Ia(e)-1,e),t,2)}function Pue(e,t){return Ne(e.getUTCFullYear()%100,t,2)}function Cue(e,t){return e=tI(e),Ne(e.getUTCFullYear()%100,t,2)}function Tue(e,t){return Ne(e.getUTCFullYear()%1e4,t,4)}function Aue(e,t){var r=e.getUTCDay();return e=r>=4||r===0?Ol(e):Ol.ceil(e),Ne(e.getUTCFullYear()%1e4,t,4)}function Mue(){return"+0000"}function AO(){return"%"}function MO(e){return+e}function $O(e){return Math.floor(+e/1e3)}var vs,rI,nI;$ue({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function $ue(e){return vs=$ce(e),rI=vs.format,vs.parse,nI=vs.utcFormat,vs.utcParse,vs}function Rue(e){return new Date(e)}function Iue(e){return e instanceof Date?+e:+new Date(+e)}function e_(e,t,r,n,a,i,o,s,l,c){var d=F1(),f=d.invert,h=d.domain,p=c(".%L"),g=c(":%S"),m=c("%I:%M"),v=c("%I %p"),x=c("%a %d"),b=c("%b %d"),y=c("%B"),S=c("%Y");function _(j){return(l(j)<j?p:s(j)<j?g:o(j)<j?m:i(j)<j?v:n(j)<j?a(j)<j?x:b:r(j)<j?y:S)(j)}return d.invert=function(j){return new Date(f(j))},d.domain=function(j){return arguments.length?h(Array.from(j,Iue)):h().map(Rue)},d.ticks=function(j){var k=h();return e(k[0],k[k.length-1],j??10)},d.tickFormat=function(j,k){return k==null?_:c(k)},d.nice=function(j){var k=h();return(!j||typeof j.range!="function")&&(j=t(k[0],k[k.length-1],j??10)),j?h(WR(k,j)):d},d.copy=function(){return zd(d,e_(e,t,r,n,a,i,o,s,l,c))},d}function Due(){return Qr.apply(e_(Ace,Mce,Ra,Q1,xg,Wd,X1,G1,ho,rI).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function Lue(){return Qr.apply(e_(Cce,Tce,Ia,Z1,wg,bg,J1,Y1,ho,nI).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function _g(){var e=0,t=1,r,n,a,i,o=Zt,s=!1,l;function c(f){return f==null||isNaN(f=+f)?l:o(a===0?.5:(f=(i(f)-r)*a,s?Math.max(0,Math.min(1,f)):f))}c.domain=function(f){return arguments.length?([e,t]=f,r=i(e=+e),n=i(t=+t),a=r===n?0:1/(n-r),c):[e,t]},c.clamp=function(f){return arguments.length?(s=!!f,c):s},c.interpolator=function(f){return arguments.length?(o=f,c):o};function d(f){return function(h){var p,g;return arguments.length?([p,g]=h,o=f(p,g),c):[o(0),o(1)]}}return c.range=d(cc),c.rangeRound=d(B1),c.unknown=function(f){return arguments.length?(l=f,c):l},function(f){return i=f,r=f(e),n=f(t),a=r===n?0:1/(n-r),c}}function Hi(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function aI(){var e=Wi(_g()(Zt));return e.copy=function(){return Hi(e,aI())},qa.apply(e,arguments)}function iI(){var e=W1(_g()).domain([1,10]);return e.copy=function(){return Hi(e,iI()).base(e.base())},qa.apply(e,arguments)}function oI(){var e=H1(_g());return e.copy=function(){return Hi(e,oI()).constant(e.constant())},qa.apply(e,arguments)}function t_(){var e=q1(_g());return e.copy=function(){return Hi(e,t_()).exponent(e.exponent())},qa.apply(e,arguments)}function Bue(){return t_.apply(null,arguments).exponent(.5)}function sI(){var e=[],t=Zt;function r(n){if(n!=null&&!isNaN(n=+n))return t((Fd(e,n,1)-1)/(e.length-1))}return r.domain=function(n){if(!arguments.length)return e.slice();e=[];
vendor: 65,330 bytes, lines 525-551
525for(let a of n)a!=null&&!isNaN(a=+a)&&e.push(a);return e.sort(Ni),r},r.interpolator=function(n){return arguments.length?(t=n,r):t},r.range=function(){return e.map((n,a)=>t(a/(e.length-1)))},r.quantiles=function(n){return Array.from({length:n+1},(a,i)=>kle(e,i/n))},r.copy=function(){return sI(t).domain(e)},qa.apply(r,arguments)}function Sg(){var e=0,t=.5,r=1,n=1,a,i,o,s,l,c=Zt,d,f=!1,h;function p(m){return isNaN(m=+m)?h:(m=.5+((m=+d(m))-i)*(n*m<n*i?s:l),c(f?Math.max(0,Math.min(1,m)):m))}p.domain=function(m){return arguments.length?([e,t,r]=m,a=d(e=+e),i=d(t=+t),o=d(r=+r),s=a===i?0:.5/(i-a),l=i===o?0:.5/(o-i),n=i<a?-1:1,p):[e,t,r]},p.clamp=function(m){return arguments.length?(f=!!m,p):f},p.interpolator=function(m){return arguments.length?(c=m,p):c};function g(m){return function(v){var x,b,y;return arguments.length?([x,b,y]=v,c=Jle(m,[x,b,y]),p):[c(0),c(.5),c(1)]}}return p.range=g(cc),p.rangeRound=g(B1),p.unknown=function(m){return arguments.length?(h=m,p):h},function(m){return d=m,a=m(e),i=m(t),o=m(r),s=a===i?0:.5/(i-a),l=i===o?0:.5/(o-i),n=i<a?-1:1,p}}function lI(){var e=Wi(Sg()(Zt));return e.copy=function(){return Hi(e,lI())},qa.apply(e,arguments)}function cI(){var e=W1(Sg()).domain([.1,1,10]);return e.copy=function(){return Hi(e,cI()).base(e.base())},qa.apply(e,arguments)}function uI(){var e=H1(Sg());return e.copy=function(){return Hi(e,uI()).constant(e.constant())},qa.apply(e,arguments)}function r_(){var e=q1(Sg());return e.copy=function(){return Hi(e,r_()).exponent(e.exponent())},qa.apply(e,arguments)}function Fue(){return r_.apply(null,arguments).exponent(.5)}const RO=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:Gu,scaleDiverging:lI,scaleDivergingLog:cI,scaleDivergingPow:r_,scaleDivergingSqrt:Fue,scaleDivergingSymlog:uI,scaleIdentity:zR,scaleImplicit:Tb,scaleLinear:Np,scaleLog:HR,scaleOrdinal:I1,scalePoint:au,scalePow:V1,scaleQuantile:KR,scaleQuantize:GR,scaleRadial:VR,scaleSequential:aI,scaleSequentialLog:iI,scaleSequentialPow:t_,scaleSequentialQuantile:sI,scaleSequentialSqrt:Bue,scaleSequentialSymlog:oI,scaleSqrt:xce,scaleSymlog:qR,scaleThreshold:YR,scaleTime:Due,scaleUtc:Lue,tickFormat:UR},Symbol.toStringTag,{value:"Module"}));var Uue=tc;function zue(e,t,r){for(var n=-1,a=e.length;++n<a;){var i=e[n],o=t(i);if(o!=null&&(s===void 0?o===o&&!Uue(o):r(o,s)))var s=o,l=i}return l}var dI=zue;function Wue(e,t){return e>t}var Hue=Wue,que=dI,Vue=Hue,Kue=lc;function Gue(e){return e&&e.length?que(e,Kue,Vue):void 0}var Yue=Gue;const jg=Fe(Yue);function Xue(e,t){return e<t}var Jue=Xue,Que=dI,Zue=Jue,ede=lc;function tde(e){return e&&e.length?Que(e,ede,Zue):void 0}var rde=tde;const kg=Fe(rde);var nde=g1,ade=zi,ide=bR,ode=mr;function sde(e,t){var r=ode(e)?nde:ide;return r(e,ade(t))}var lde=sde,cde=vR,ude=lde;function dde(e,t){return cde(ude(e,t),1)}var fde=dde;const hde=Fe(fde);var pde=T1;function mde(e,t){return pde(e,t)}var gde=mde;const n_=Fe(gde);var uc=1e9,vde={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},i_,tt=!0,Xr="[DecimalError] ",ko=Xr+"Invalid argument: ",a_=Xr+"Exponent out of range: ",dc=Math.floor,ao=Math.pow,yde=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,jr,jt=1e7,Xe=7,fI=9007199254740991,Ap=dc(fI/Xe),re={};re.absoluteValue=re.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};re.comparedTo=re.cmp=function(e){var t,r,n,a,i=this;if(e=new i.constructor(e),i.s!==e.s)return i.s||-e.s;if(i.e!==e.e)return i.e>e.e^i.s<0?1:-1;for(n=i.d.length,a=e.d.length,t=0,r=n<a?n:a;t<r;++t)if(i.d[t]!==e.d[t])return i.d[t]>e.d[t]^i.s<0?1:-1;return n===a?0:n>a^i.s<0?1:-1};re.decimalPlaces=re.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*Xe;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r};re.dividedBy=re.div=function(e){return Ea(this,new this.constructor(e))};re.dividedToIntegerBy=re.idiv=function(e){var t=this,r=t.constructor;return ze(Ea(t,new r(e),0,1),r.precision)};re.equals=re.eq=function(e){return!this.cmp(e)};re.exponent=function(){return vt(this)};re.greaterThan=re.gt=function(e){return this.cmp(e)>0};re.greaterThanOrEqualTo=re.gte=function(e){return this.cmp(e)>=0};re.isInteger=re.isint=function(){return this.e>this.d.length-2};re.isNegative=re.isneg=function(){return this.s<0};re.isPositive=re.ispos=function(){return this.s>0};re.isZero=function(){return this.s===0};re.lessThan=re.lt=function(e){return this.cmp(e)<0};re.lessThanOrEqualTo=re.lte=function(e){return this.cmp(e)<1};re.logarithm=re.log=function(e){var t,r=this,n=r.constructor,a=n.precision,i=a+5;if(e===void 0)e=new n(10);else if(e=new n(e),e.s<1||e.eq(jr))throw Error(Xr+"NaN");if(r.s<1)throw Error(Xr+(r.s?"NaN":"-Infinity"));return r.eq(jr)?new n(0):(tt=!1,t=Ea(Zu(r,i),Zu(e,i),i),tt=!0,ze(t,a))};re.minus=re.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?mI(t,e):hI(t,(e.s=-e.s,e))};re.modulo=re.mod=function(e){var t,r=this,n=r.constructor,a=n.precision;if(e=new n(e),!e.s)throw Error(Xr+"NaN");return r.s?(tt=!1,t=Ea(r,e,0,1).times(e),tt=!0,r.minus(t)):ze(new n(r),a)};re.naturalExponential=re.exp=function(){return pI(this)};re.naturalLogarithm=re.ln=function(){return Zu(this)};re.negated=re.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};re.plus=re.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?hI(t,e):mI(t,(e.s=-e.s,e))};re.precision=re.sd=function(e){var t,r,n,a=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(ko+e);if(t=vt(a)+1,n=a.d.length-1,r=n*Xe+1,n=a.d[n],n){for(;n%10==0;n/=10)r--;for(n=a.d[0];n>=10;n/=10)r++}return e&&t>r?t:r};re.squareRoot=re.sqrt=function(){var e,t,r,n,a,i,o,s=this,l=s.constructor;if(s.s<1){if(!s.s)return new l(0);throw Error(Xr+"NaN")}for(e=vt(s),tt=!1,a=Math.sqrt(+s),a==0||a==1/0?(t=Jn(s.d),(t.length+e)%2==0&&(t+="0"),a=Math.sqrt(t),e=dc((e+1)/2)-(e<0||e%2),a==1/0?t="5e"+e:(t=a.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),n=new l(t)):n=new l(a.toString()),r=l.precision,a=o=r+3;;)if(i=n,n=i.plus(Ea(s,i,o+2)).times(.5),Jn(i.d).slice(0,o)===(t=Jn(n.d)).slice(0,o)){if(t=t.slice(o-3,o+1),a==o&&t=="4999"){if(ze(i,r+1,0),i.times(i).eq(s)){n=i;break}}else if(t!="9999")break;o+=4}return tt=!0,ze(n,r)};re.times=re.mul=function(e){var t,r,n,a,i,o,s,l,c,d=this,f=d.constructor,h=d.d,p=(e=new f(e)).d;if(!d.s||!e.s)return new f(0);for(e.s*=d.s,r=d.e+e.e,l=h.length,c=p.length,l<c&&(i=h,h=p,p=i,o=l,l=c,c=o),i=[],o=l+c,n=o;n--;)i.push(0);for(n=c;--n>=0;){for(t=0,a=l+n;a>n;)s=i[a]+p[n]*h[a-n-1]+t,i[a--]=s%jt|0,t=s/jt|0;i[a]=(i[a]+t)%jt|0}for(;!i[--o];)i.pop();return t?++r:i.shift(),e.d=i,e.e=r,tt?ze(e,f.precision):e};re.toDecimalPlaces=re.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(aa(e,0,uc),t===void 0?t=n.rounding:aa(t,0,8),ze(r,e+vt(r)+1,t))};re.toExponential=function(e,t){var r,n=this,a=n.constructor;return e===void 0?r=Uo(n,!0):(aa(e,0,uc),t===void 0?t=a.rounding:aa(t,0,8),n=ze(new a(n),e+1,t),r=Uo(n,!0,e+1)),r};re.toFixed=function(e,t){var r,n,a=this,i=a.constructor;return e===void 0?Uo(a):(aa(e,0,uc),t===void 0?t=i.rounding:aa(t,0,8),n=ze(new i(a),e+vt(a)+1,t),r=Uo(n.abs(),!1,e+vt(n)+1),a.isneg()&&!a.isZero()?"-"+r:r)};re.toInteger=re.toint=function(){var e=this,t=e.constructor;return ze(new t(e),vt(e)+1,t.rounding)};re.toNumber=function(){return+this};re.toPower=re.pow=function(e){var t,r,n,a,i,o,s=this,l=s.constructor,c=12,d=+(e=new l(e));if(!e.s)return new l(jr);if(s=new l(s),!s.s){if(e.s<1)throw Error(Xr+"Infinity");return s}if(s.eq(jr))return s;if(n=l.precision,e.eq(jr))return ze(s,n);if(t=e.e,r=e.d.length-1,o=t>=r,i=s.s,o){if((r=d<0?-d:d)<=fI){for(a=new l(jr),t=Math.ceil(n/Xe+4),tt=!1;r%2&&(a=a.times(s),DO(a.d,t)),r=dc(r/2),r!==0;)s=s.times(s),DO(s.d,t);return tt=!0,e.s<0?new l(jr).div(a):ze(a,n)}}else if(i<0)throw Error(Xr+"NaN");return i=i<0&&e.d[Math.max(t,r)]&1?-1:1,s.s=1,tt=!1,a=e.times(Zu(s,n+c)),tt=!0,a=pI(a),a.s=i,a};re.toPrecision=function(e,t){var r,n,a=this,i=a.constructor;return e===void 0?(r=vt(a),n=Uo(a,r<=i.toExpNeg||r>=i.toExpPos)):(aa(e,1,uc),t===void 0?t=i.rounding:aa(t,0,8),a=ze(new i(a),e,t),r=vt(a),n=Uo(a,e<=r||r<=i.toExpNeg,e)),n};re.toSignificantDigits=re.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(aa(e,1,uc),t===void 0?t=n.rounding:aa(t,0,8)),ze(new n(r),e,t)};re.toString=re.valueOf=re.val=re.toJSON=re[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=vt(e),r=e.constructor;return Uo(e,t<=r.toExpNeg||t>=r.toExpPos)};function hI(e,t){var r,n,a,i,o,s,l,c,d=e.constructor,f=d.precision;if(!e.s||!t.s)return t.s||(t=new d(e)),tt?ze(t,f):t;if(l=e.d,c=t.d,o=e.e,a=t.e,l=l.slice(),i=o-a,i){for(i<0?(n=l,i=-i,s=c.length):(n=c,a=o,s=l.length),o=Math.ceil(f/Xe),s=o>s?o+1:s+1,i>s&&(i=s,n.length=1),n.reverse();i--;)n.push(0);n.reverse()}for(s=l.length,i=c.length,s-i<0&&(i=s,n=c,c=l,l=n),r=0;i;)r=(l[--i]=l[i]+c[i]+r)/jt|0,l[i]%=jt;for(r&&(l.unshift(r),++a),s=l.length;l[--s]==0;)l.pop();return t.d=l,t.e=a,tt?ze(t,f):t}function aa(e,t,r){if(e!==~~e||e<t||e>r)throw Error(ko+e)}function Jn(e){var t,r,n,a=e.length-1,i="",o=e[0];if(a>0){for(i+=o,t=1;t<a;t++)n=e[t]+"",r=Xe-n.length,r&&(i+=ni(r)),i+=n;o=e[t],n=o+"",r=Xe-n.length,r&&(i+=ni(r))}else if(o===0)return"0";for(;o%10===0;)o/=10;return i+o}var Ea=function(){function e(n,a){var i,o=0,s=n.length;for(n=n.slice();s--;)i=n[s]*a+o,n[s]=i%jt|0,o=i/jt|0;return o&&n.unshift(o),n}function t(n,a,i,o){var s,l;if(i!=o)l=i>o?1:-1;else for(s=l=0;s<i;s++)if(n[s]!=a[s]){l=n[s]>a[s]?1:-1;break}return l}function r(n,a,i){for(var o=0;i--;)n[i]-=o,o=n[i]<a[i]?1:0,n[i]=o*jt+n[i]-a[i];for(;!n[0]&&n.length>1;)n.shift()}return function(n,a,i,o){var s,l,c,d,f,h,p,g,m,v,x,b,y,S,_,j,k,E,O=n.constructor,A=n.s==a.s?1:-1,T=n.d,N=a.d;if(!n.s)return new O(n);if(!a.s)throw Error(Xr+"Division by zero");for(l=n.e-a.e,k=N.length,_=T.length,p=new O(A),g=p.d=[],c=0;N[c]==(T[c]||0);)++c;if(N[c]>(T[c]||0)&&--l,i==null?b=i=O.precision:o?b=i+(vt(n)-vt(a))+1:b=i,b<0)return new O(0);if(b=b/Xe+2|0,c=0,k==1)for(d=0,N=N[0],b++;(c<_||d)&&b--;c++)y=d*jt+(T[c]||0),g[c]=y/N|0,d=y%N|0;else{for(d=jt/(N[0]+1)|0,d>1&&(N=e(N,d),T=e(T,d),k=N.length,_=T.length),S=k,m=T.slice(0,k),v=m.length;v<k;)m[v++]=0;E=N.slice(),E.unshift(0),j=N[0],N[1]>=jt/2&&++j;do d=0,s=t(N,m,k,v),s<0?(x=m[0],k!=v&&(x=x*jt+(m[1]||0)),d=x/j|0,d>1?(d>=jt&&(d=jt-1),f=e(N,d),h=f.length,v=m.length,s=t(f,m,h,v),s==1&&(d--,r(f,k<h?E:N,h))):(d==0&&(s=d=1),f=N.slice()),h=f.length,h<v&&f.unshift(0),r(m,f,v),s==-1&&(v=m.length,s=t(N,m,k,v),s<1&&(d++,r(m,k<v?E:N,v))),v=m.length):s===0&&(d++,m=[0]),g[c++]=d,s&&m[0]?m[v++]=T[S]||0:(m=[T[S]],v=1);while((S++<_||m[0]!==void 0)&&b--)}return g[0]||g.shift(),p.e=l,ze(p,o?i+vt(p)+1:i)}}();function pI(e,t){var r,n,a,i,o,s,l=0,c=0,d=e.constructor,f=d.precision;if(vt(e)>16)throw Error(a_+vt(e));if(!e.s)return new d(jr);for(t==null?(tt=!1,s=f):s=t,o=new d(.03125);e.abs().gte(.1);)e=e.times(o),c+=5;for(n=Math.log(ao(2,c))/Math.LN10*2+5|0,s+=n,r=a=i=new d(jr),d.precision=s;;){if(a=ze(a.times(e),s),r=r.times(++l),o=i.plus(Ea(a,r,s)),Jn(o.d).slice(0,s)===Jn(i.d).slice(0,s)){for(;c--;)i=ze(i.times(i),s);return d.precision=f,t==null?(tt=!0,ze(i,f)):i}i=o}}function vt(e){for(var t=e.e*Xe,r=e.d[0];r>=10;r/=10)t++;return t}function sy(e,t,r){if(t>e.LN10.sd())throw tt=!0,r&&(e.precision=r),Error(Xr+"LN10 precision limit exceeded");return ze(new e(e.LN10),t)}function ni(e){for(var t="";e--;)t+="0";return t}function Zu(e,t){var r,n,a,i,o,s,l,c,d,f=1,h=10,p=e,g=p.d,m=p.constructor,v=m.precision;if(p.s<1)throw Error(Xr+(p.s?"NaN":"-Infinity"));if(p.eq(jr))return new m(0);if(t==null?(tt=!1,c=v):c=t,p.eq(10))return t==null&&(tt=!0),sy(m,c);if(c+=h,m.precision=c,r=Jn(g),n=r.charAt(0),i=vt(p),Math.abs(i)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)p=p.times(e),r=Jn(p.d),n=r.charAt(0),f++;i=vt(p),n>1?(p=new m("0."+r),i++):p=new m(n+"."+r.slice(1))}else return l=sy(m,c+2,v).times(i+""),p=Zu(new m(n+"."+r.slice(1)),c-h).plus(l),m.precision=v,t==null?(tt=!0,ze(p,v)):p;for(s=o=p=Ea(p.minus(jr),p.plus(jr),c),d=ze(p.times(p),c),a=3;;){if(o=ze(o.times(d),c),l=s.plus(Ea(o,new m(a),c)),Jn(l.d).slice(0,c)===Jn(s.d).slice(0,c))return s=s.times(2),i!==0&&(s=s.plus(sy(m,c+2,v).times(i+""))),s=Ea(s,new m(f),c),m.precision=v,t==null?(tt=!0,ze(s,v)):s;s=l,a+=2}}function IO(e,t){var r,n,a;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;)++n;for(a=t.length;t.charCodeAt(a-1)===48;)--a;if(t=t.slice(n,a),t){if(a-=n,r=r-n-1,e.e=dc(r/Xe),e.d=[],n=(r+1)%Xe,r<0&&(n+=Xe),n<a){for(n&&e.d.push(+t.slice(0,n)),a-=Xe;n<a;)e.d.push(+t.slice(n,n+=Xe));t=t.slice(n),n=Xe-t.length}else n-=a;for(;n--;)t+="0";if(e.d.push(+t),tt&&(e.e>Ap||e.e<-Ap))throw Error(a_+r)}else e.s=0,e.e=0,e.d=[0];return e}function ze(e,t,r){var n,a,i,o,s,l,c,d,f=e.d;for(o=1,i=f[0];i>=10;i/=10)o++;if(n=t-o,n<0)n+=Xe,a=t,c=f[d=0];else{if(d=Math.ceil((n+1)/Xe),i=f.length,d>=i)return e;for(c=i=f[d],o=1;i>=10;i/=10)o++;n%=Xe,a=n-Xe+o}if(r!==void 0&&(i=ao(10,o-a-1),s=c/i%10|0,l=t<0||f[d+1]!==void 0||c%i,l=r<4?(s||l)&&(r==0||r==(e.s<0?3:2)):s>5||s==5&&(r==4||l||r==6&&(n>0?a>0?c/ao(10,o-a):0:f[d-1])%10&1||r==(e.s<0?8:7))),t<1||!f[0])return l?(i=vt(e),f.length=1,t=t-i-1,f[0]=ao(10,(Xe-t%Xe)%Xe),e.e=dc(-t/Xe)||0):(f.length=1,f[0]=e.e=e.s=0),e;if(n==0?(f.length=d,i=1,d--):(f.length=d+1,i=ao(10,Xe-n),f[d]=a>0?(c/ao(10,o-a)%ao(10,a)|0)*i:0),l)for(;;)if(d==0){(f[0]+=i)==jt&&(f[0]=1,++e.e);break}else{if(f[d]+=i,f[d]!=jt)break;f[d--]=0,i=1}for(n=f.length;f[--n]===0;)f.pop();if(tt&&(e.e>Ap||e.e<-Ap))throw Error(a_+vt(e));return e}function mI(e,t){var r,n,a,i,o,s,l,c,d,f,h=e.constructor,p=h.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new h(e),tt?ze(t,p):t;if(l=e.d,f=t.d,n=t.e,c=e.e,l=l.slice(),o=c-n,o){for(d=o<0,d?(r=l,o=-o,s=f.length):(r=f,n=c,s=l.length),a=Math.max(Math.ceil(p/Xe),s)+2,o>a&&(o=a,r.length=1),r.reverse(),a=o;a--;)r.push(0);r.reverse()}else{for(a=l.length,s=f.length,d=a<s,d&&(s=a),a=0;a<s;a++)if(l[a]!=f[a]){d=l[a]<f[a];break}o=0}for(d&&(r=l,l=f,f=r,t.s=-t.s),s=l.length,a=f.length-s;a>0;--a)l[s++]=0;for(a=f.length;a>o;){if(l[--a]<f[a]){for(i=a;i&&l[--i]===0;)l[i]=jt-1;--l[i],l[a]+=jt}l[a]-=f[a]}for(;l[--s]===0;)l.pop();for(;l[0]===0;l.shift())--n;return l[0]?(t.d=l,t.e=n,tt?ze(t,p):t):new h(0)}function Uo(e,t,r){var n,a=vt(e),i=Jn(e.d),o=i.length;return t?(r&&(n=r-o)>0?i=i.charAt(0)+"."+i.slice(1)+ni(n):o>1&&(i=i.charAt(0)+"."+i.slice(1)),i=i+(a<0?"e":"e+")+a):a<0?(i="0."+ni(-a-1)+i,r&&(n=r-o)>0&&(i+=ni(n))):a>=o?(i+=ni(a+1-o),r&&(n=r-a-1)>0&&(i=i+"."+ni(n))):((n=a+1)<o&&(i=i.slice(0,n)+"."+i.slice(n)),r&&(n=r-o)>0&&(a+1===o&&(i+="."),i+=ni(n))),e.s<0?"-"+i:i}function DO(e,t){if(e.length>t)return e.length=t,!0}function gI(e){var t,r,n;function a(i){var o=this;if(!(o instanceof a))return new a(i);if(o.constructor=a,i instanceof a){o.s=i.s,o.e=i.e,o.d=(i=i.d)?i.slice():i;return}if(typeof i=="number"){if(i*0!==0)throw Error(ko+i);if(i>0)o.s=1;else if(i<0)i=-i,o.s=-1;else{o.s=0,o.e=0,o.d=[0];return}if(i===~~i&&i<1e7){o.e=0,o.d=[i];return}return IO(o,i.toString())}else if(typeof i!="string")throw Error(ko+i);if(i.charCodeAt(0)===45?(i=i.slice(1),o.s=-1):o.s=1,yde.test(i))IO(o,i);else throw Error(ko+i)}if(a.prototype=re,a.ROUND_UP=0,a.ROUND_DOWN=1,a.ROUND_CEIL=2,a.ROUND_FLOOR=3,a.ROUND_HALF_UP=4,a.ROUND_HALF_DOWN=5,a.ROUND_HALF_EVEN=6,a.ROUND_HALF_CEIL=7,a.ROUND_HALF_FLOOR=8,a.clone=gI,a.config=a.set=bde,e===void 0&&(e={}),e)for(n=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t<n.length;)e.hasOwnProperty(r=n[t++])||(e[r]=this[r]);return a.config(e),a}function bde(e){if(!e||typeof e!="object")throw Error(Xr+"Object expected");var t,r,n,a=["precision",1,uc,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<a.length;t+=3)if((n=e[r=a[t]])!==void 0)if(dc(n)===n&&n>=a[t+1]&&n<=a[t+2])this[r]=n;else throw Error(ko+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(ko+r+": "+n);return this}var i_=gI(vde);jr=new i_(1);const Be=i_;function xde(e){return jde(e)||Sde(e)||_de(e)||wde()}function wde(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
526In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _de(e,t){if(e){if(typeof e=="string")return Rb(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Rb(e,t)}}function Sde(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function jde(e){if(Array.isArray(e))return Rb(e)}function Rb(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var kde=function(t){return t},vI={"@@functional/placeholder":!0},yI=function(t){return t===vI},LO=function(t){return function r(){return arguments.length===0||arguments.length===1&&yI(arguments.length<=0?void 0:arguments[0])?r:t.apply(void 0,arguments)}},Ede=function e(t,r){return t===1?r:LO(function(){for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];var o=a.filter(function(s){return s!==vI}).length;return o>=t?r.apply(void 0,a):e(t-o,LO(function(){for(var s=arguments.length,l=new Array(s),c=0;c<s;c++)l[c]=arguments[c];var d=a.map(function(f){return yI(f)?l.shift():f});return r.apply(void 0,xde(d).concat(l))}))})},Eg=function(t){return Ede(t.length,t)},Ib=function(t,r){for(var n=[],a=t;a<r;++a)n[a-t]=a;return n},Ode=Eg(function(e,t){return Array.isArray(t)?t.map(e):Object.keys(t).map(function(r){return t[r]}).map(e)}),Nde=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];if(!r.length)return kde;var a=r.reverse(),i=a[0],o=a.slice(1);return function(){return o.reduce(function(s,l){return l(s)},i.apply(void 0,arguments))}},Db=function(t){return Array.isArray(t)?t.reverse():t.split("").reverse.join("")},bI=function(t){var r=null,n=null;return function(){for(var a=arguments.length,i=new Array(a),o=0;o<a;o++)i[o]=arguments[o];return r&&i.every(function(s,l){return s===r[l]})||(r=i,n=t.apply(void 0,i)),n}};function Pde(e){var t;return e===0?t=1:t=Math.floor(new Be(e).abs().log(10).toNumber())+1,t}function Cde(e,t,r){for(var n=new Be(e),a=0,i=[];n.lt(t)&&a<1e5;)i.push(n.toNumber()),n=n.add(r),a++;return i}var Tde=Eg(function(e,t,r){var n=+e,a=+t;return n+r*(a-n)}),Ade=Eg(function(e,t,r){var n=t-+e;return n=n||1/0,(r-e)/n}),Mde=Eg(function(e,t,r){var n=t-+e;return n=n||1/0,Math.max(0,Math.min(1,(r-e)/n))});const Og={rangeStep:Cde,getDigitCount:Pde,interpolateNumber:Tde,uninterpolateNumber:Ade,uninterpolateTruncation:Mde};function Lb(e){return Ide(e)||Rde(e)||xI(e)||$de()}function $de(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
527In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Rde(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function Ide(e){if(Array.isArray(e))return Bb(e)}function ed(e,t){return Bde(e)||Lde(e,t)||xI(e,t)||Dde()}function Dde(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
528In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function xI(e,t){if(e){if(typeof e=="string")return Bb(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Bb(e,t)}}function Bb(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Lde(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var r=[],n=!0,a=!1,i=void 0;try{for(var o=e[Symbol.iterator](),s;!(n=(s=o.next()).done)&&(r.push(s.value),!(t&&r.length===t));n=!0);}catch(l){a=!0,i=l}finally{try{!n&&o.return!=null&&o.return()}finally{if(a)throw i}}return r}}function Bde(e){if(Array.isArray(e))return e}function wI(e){var t=ed(e,2),r=t[0],n=t[1],a=r,i=n;return r>n&&(a=n,i=r),[a,i]}function _I(e,t,r){if(e.lte(0))return new Be(0);var n=Og.getDigitCount(e.toNumber()),a=new Be(10).pow(n),i=e.div(a),o=n!==1?.05:.1,s=new Be(Math.ceil(i.div(o).toNumber())).add(r).mul(o),l=s.mul(a);return t?l:new Be(Math.ceil(l))}function Fde(e,t,r){var n=1,a=new Be(e);if(!a.isint()&&r){var i=Math.abs(e);i<1?(n=new Be(10).pow(Og.getDigitCount(e)-1),a=new Be(Math.floor(a.div(n).toNumber())).mul(n)):i>1&&(a=new Be(Math.floor(e)))}else e===0?a=new Be(Math.floor((t-1)/2)):r||(a=new Be(Math.floor(e)));var o=Math.floor((t-1)/2),s=Nde(Ode(function(l){return a.add(new Be(l-o).mul(n)).toNumber()}),Ib);return s(0,t)}function SI(e,t,r,n){var a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((t-e)/(r-1)))return{step:new Be(0),tickMin:new Be(0),tickMax:new Be(0)};var i=_I(new Be(t).sub(e).div(r-1),n,a),o;e<=0&&t>=0?o=new Be(0):(o=new Be(e).add(t).div(2),o=o.sub(new Be(o).mod(i)));var s=Math.ceil(o.sub(e).div(i).toNumber()),l=Math.ceil(new Be(t).sub(o).div(i).toNumber()),c=s+l+1;return c>r?SI(e,t,r,n,a+1):(c<r&&(l=t>0?l+(r-c):l,s=t>0?s:s+(r-c)),{step:i,tickMin:o.sub(new Be(s).mul(i)),tickMax:o.add(new Be(l).mul(i))})}function Ude(e){var t=ed(e,2),r=t[0],n=t[1],a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=Math.max(a,2),s=wI([r,n]),l=ed(s,2),c=l[0],d=l[1];if(c===-1/0||d===1/0){var f=d===1/0?[c].concat(Lb(Ib(0,a-1).map(function(){return 1/0}))):[].concat(Lb(Ib(0,a-1).map(function(){return-1/0})),[d]);return r>n?Db(f):f}if(c===d)return Fde(c,a,i);var h=SI(c,d,o,i),p=h.step,g=h.tickMin,m=h.tickMax,v=Og.rangeStep(g,m.add(new Be(.1).mul(p)),p);return r>n?Db(v):v}function zde(e,t){var r=ed(e,2),n=r[0],a=r[1],i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=wI([n,a]),s=ed(o,2),l=s[0],c=s[1];if(l===-1/0||c===1/0)return[n,a];if(l===c)return[l];var d=Math.max(t,2),f=_I(new Be(c).sub(l).div(d-1),i,0),h=[].concat(Lb(Og.rangeStep(new Be(l),new Be(c).sub(new Be(.99).mul(f)),f)),[c]);return n>a?Db(h):h}var Wde=bI(Ude),Hde=bI(zde),qde="Invariant failed";function zo(e,t){throw new Error(qde)}var Vde=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function Nl(e){"@babel/helpers - typeof";return Nl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Nl(e)}function Mp(){return Mp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Mp.apply(this,arguments)}function Kde(e,t){return Jde(e)||Xde(e,t)||Yde(e,t)||Gde()}function Gde(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
529In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Yde(e,t){if(e){if(typeof e=="string")return BO(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return BO(e,t)}}function BO(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Xde(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,s=[],l=!0,c=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(d){c=!0,a=d}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw a}}return s}}function Jde(e){if(Array.isArray(e))return e}function Qde(e,t){if(e==null)return{};var r=Zde(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Zde(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function efe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function tfe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,EI(n.key),n)}}function rfe(e,t,r){return t&&tfe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function nfe(e,t,r){return t=$p(t),afe(e,jI()?Reflect.construct(t,r||[],$p(e).constructor):t.apply(e,r))}function afe(e,t){if(t&&(Nl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ife(e)}function ife(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function jI(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(jI=function(){return!!e})()}function $p(e){return $p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},$p(e)}function ofe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Fb(e,t)}function Fb(e,t){return Fb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Fb(e,t)}function kI(e,t,r){return t=EI(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function EI(e){var t=sfe(e,"string");return Nl(t)=="symbol"?t:t+""}function sfe(e,t){if(Nl(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Nl(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Ng=function(e){function t(){return efe(this,t),nfe(this,t,arguments)}return ofe(t,e),rfe(t,[{key:"render",value:function(){var n=this.props,a=n.offset,i=n.layout,o=n.width,s=n.dataKey,l=n.data,c=n.dataPointFormatter,d=n.xAxis,f=n.yAxis,h=Qde(n,Vde),p=Pe(h,!1);this.props.direction==="x"&&d.type!=="number"&&zo();var g=l.map(function(m){var v=c(m,s),x=v.x,b=v.y,y=v.value,S=v.errorVal;if(!S)return null;var _=[],j,k;if(Array.isArray(S)){var E=Kde(S,2);j=E[0],k=E[1]}else j=k=S;if(i==="vertical"){var O=d.scale,A=b+a,T=A+o,N=A-o,I=O(y-j),R=O(y+k);_.push({x1:R,y1:T,x2:R,y2:N}),_.push({x1:I,y1:A,x2:R,y2:A}),_.push({x1:I,y1:T,x2:I,y2:N})}else if(i==="horizontal"){var D=f.scale,L=x+a,M=L-o,C=L+o,P=D(y-j),B=D(y+k);_.push({x1:M,y1:B,x2:C,y2:B}),_.push({x1:L,y1:P,x2:L,y2:B}),_.push({x1:M,y1:P,x2:C,y2:P})}return $.createElement(Ot,Mp({className:"recharts-errorBar",key:"bar-".concat(_.map(function(U){return"".concat(U.x1,"-").concat(U.x2,"-").concat(U.y1,"-").concat(U.y2)}))},p),_.map(function(U){return $.createElement("line",Mp({},U,{key:"line-".concat(U.x1,"-").concat(U.x2,"-").concat(U.y1,"-").concat(U.y2)}))}))});return $.createElement(Ot,{className:"recharts-errorBars"},g)}}])}($.Component);kI(Ng,"defaultProps",{stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"});kI(Ng,"displayName","ErrorBar");function td(e){"@babel/helpers - typeof";return td=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},td(e)}function FO(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Ji(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?FO(Object(r),!0).forEach(function(n){lfe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):FO(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function lfe(e,t,r){return t=cfe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function cfe(e){var t=ufe(e,"string");return td(t)=="symbol"?t:t+""}function ufe(e,t){if(td(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(td(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var OI=function(t){var r=t.children,n=t.formattedGraphicalItems,a=t.legendWidth,i=t.legendContent,o=wr(r,Qs);if(!o)return null;var s=Qs.defaultProps,l=s!==void 0?Ji(Ji({},s),o.props):{},c;return o.props&&o.props.payload?c=o.props&&o.props.payload:i==="children"?c=(n||[]).reduce(function(d,f){var h=f.item,p=f.props,g=p.sectors||p.data||[];return d.concat(g.map(function(m){return{type:o.props.iconType||h.props.legendType,value:m.name,color:m.fill,payload:m}}))},[]):c=(n||[]).map(function(d){var f=d.item,h=f.type.defaultProps,p=h!==void 0?Ji(Ji({},h),f.props):{},g=p.dataKey,m=p.name,v=p.legendType,x=p.hide;return{inactive:x,dataKey:g,type:l.iconType||v||"square",color:o_(f),value:m||g,payload:p}}),Ji(Ji(Ji({},l),Qs.getWithHeight(o,a)),{},{payload:c,item:o})};function rd(e){"@babel/helpers - typeof";return rd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},rd(e)}function UO(e){return pfe(e)||hfe(e)||ffe(e)||dfe()}function dfe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
530In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ffe(e,t){if(e){if(typeof e=="string")return Ub(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ub(e,t)}}function hfe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function pfe(e){if(Array.isArray(e))return Ub(e)}function Ub(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function zO(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function ct(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?zO(Object(r),!0).forEach(function(n){el(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):zO(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function el(e,t,r){return t=mfe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function mfe(e){var t=gfe(e,"string");return rd(t)=="symbol"?t:t+""}function gfe(e,t){if(rd(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(rd(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ia(e,t,r){return Ce(e)||Ce(t)?r:_t(t)?Vr(e,t,r):xe(t)?t(e):r}function iu(e,t,r,n){var a=hde(e,function(s){return ia(s,t)});if(r==="number"){var i=a.filter(function(s){return Y(s)||parseFloat(s)});return i.length?[kg(i),jg(i)]:[1/0,-1/0]}var o=n?a.filter(function(s){return!Ce(s)}):a;return o.map(function(s){return _t(s)||s instanceof Date?s:""})}var vfe=function(t){var r,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],a=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,o=-1,s=(r=n==null?void 0:n.length)!==null&&r!==void 0?r:0;if(s<=1)return 0;if(i&&i.axisType==="angleAxis"&&Math.abs(Math.abs(i.range[1]-i.range[0])-360)<=1e-6)for(var l=i.range,c=0;c<s;c++){var d=c>0?a[c-1].coordinate:a[s-1].coordinate,f=a[c].coordinate,h=c>=s-1?a[0].coordinate:a[c+1].coordinate,p=void 0;if(xn(f-d)!==xn(h-f)){var g=[];if(xn(h-f)===xn(l[1]-l[0])){p=h;var m=f+l[1]-l[0];g[0]=Math.min(m,(m+d)/2),g[1]=Math.max(m,(m+d)/2)}else{p=d;var v=h+l[1]-l[0];g[0]=Math.min(f,(v+f)/2),g[1]=Math.max(f,(v+f)/2)}var x=[Math.min(f,(p+f)/2),Math.max(f,(p+f)/2)];if(t>x[0]&&t<=x[1]||t>=g[0]&&t<=g[1]){o=a[c].index;break}}else{var b=Math.min(d,h),y=Math.max(d,h);if(t>(b+f)/2&&t<=(y+f)/2){o=a[c].index;break}}}else for(var S=0;S<s;S++)if(S===0&&t<=(n[S].coordinate+n[S+1].coordinate)/2||S>0&&S<s-1&&t>(n[S].coordinate+n[S-1].coordinate)/2&&t<=(n[S].coordinate+n[S+1].coordinate)/2||S===s-1&&t>(n[S].coordinate+n[S-1].coordinate)/2){o=n[S].index;break}return o},o_=function(t){var r,n=t,a=n.type.displayName,i=(r=t.type)!==null&&r!==void 0&&r.defaultProps?ct(ct({},t.type.defaultProps),t.props):t.props,o=i.stroke,s=i.fill,l;switch(a){case"Line":l=o;break;case"Area":case"Radar":l=o&&o!=="none"?o:s;break;default:l=s;break}return l},yfe=function(t){var r=t.barSize,n=t.totalSize,a=t.stackGroups,i=a===void 0?{}:a;if(!i)return{};for(var o={},s=Object.keys(i),l=0,c=s.length;l<c;l++)for(var d=i[s[l]].stackGroups,f=Object.keys(d),h=0,p=f.length;h<p;h++){var g=d[f[h]],m=g.items,v=g.cateAxisId,x=m.filter(function(k){return ja(k.type).indexOf("Bar")>=0});if(x&&x.length){var b=x[0].type.defaultProps,y=b!==void 0?ct(ct({},b),x[0].props):x[0].props,S=y.barSize,_=y[v];o[_]||(o[_]=[]);var j=Ce(S)?r:S;o[_].push({item:x[0],stackList:x.slice(1),barSize:Ce(j)?void 0:Fo(j,n,0)})}}return o},bfe=function(t){var r=t.barGap,n=t.barCategoryGap,a=t.bandSize,i=t.sizeList,o=i===void 0?[]:i,s=t.maxBarSize,l=o.length;if(l<1)return null;var c=Fo(r,a,0,!0),d,f=[];if(o[0].barSize===+o[0].barSize){var h=!1,p=a/l,g=o.reduce(function(S,_){return S+_.barSize||0},0);g+=(l-1)*c,g>=a&&(g-=(l-1)*c,c=0),g>=a&&p>0&&(h=!0,p*=.9,g=l*p);var m=(a-g)/2>>0,v={offset:m-c,size:0};d=o.reduce(function(S,_){var j={item:_.item,position:{offset:v.offset+v.size+c,size:h?p:_.barSize}},k=[].concat(UO(S),[j]);return v=k[k.length-1].position,_.stackList&&_.stackList.length&&_.stackList.forEach(function(E){k.push({item:E,position:v})}),k},f)}else{var x=Fo(n,a,0,!0);a-2*x-(l-1)*c<=0&&(c=0);var b=(a-2*x-(l-1)*c)/l;b>1&&(b>>=0);var y=s===+s?Math.min(b,s):b;d=o.reduce(function(S,_,j){var k=[].concat(UO(S),[{item:_.item,position:{offset:x+(b+c)*j+(b-y)/2,size:y}}]);return _.stackList&&_.stackList.length&&_.stackList.forEach(function(E){k.push({item:E,position:k[k.length-1].position})}),k},f)}return d},xfe=function(t,r,n,a){var i=n.children,o=n.width,s=n.margin,l=o-(s.left||0)-(s.right||0),c=OI({children:i,legendWidth:l});if(c){var d=a||{},f=d.width,h=d.height,p=c.align,g=c.verticalAlign,m=c.layout;if((m==="vertical"||m==="horizontal"&&g==="middle")&&p!=="center"&&Y(t[p]))return ct(ct({},t),{},el({},p,t[p]+(f||0)));if((m==="horizontal"||m==="vertical"&&p==="center")&&g!=="middle"&&Y(t[g]))return ct(ct({},t),{},el({},g,t[g]+(h||0)))}return t},wfe=function(t,r,n){return Ce(r)?!0:t==="horizontal"?r==="yAxis":t==="vertical"||n==="x"?r==="xAxis":n==="y"?r==="yAxis":!0},NI=function(t,r,n,a,i){var o=r.props.children,s=Sn(o,Ng).filter(function(c){return wfe(a,i,c.props.direction)});if(s&&s.length){var l=s.map(function(c){return c.props.dataKey});return t.reduce(function(c,d){var f=ia(d,n);if(Ce(f))return c;var h=Array.isArray(f)?[kg(f),jg(f)]:[f,f],p=l.reduce(function(g,m){var v=ia(d,m,0),x=h[0]-Math.abs(Array.isArray(v)?v[0]:v),b=h[1]+Math.abs(Array.isArray(v)?v[1]:v);return[Math.min(x,g[0]),Math.max(b,g[1])]},[1/0,-1/0]);return[Math.min(p[0],c[0]),Math.max(p[1],c[1])]},[1/0,-1/0])}return null},_fe=function(t,r,n,a,i){var o=r.map(function(s){return NI(t,s,n,i,a)}).filter(function(s){return!Ce(s)});return o&&o.length?o.reduce(function(s,l){return[Math.min(s[0],l[0]),Math.max(s[1],l[1])]},[1/0,-1/0]):null},PI=function(t,r,n,a,i){var o=r.map(function(l){var c=l.props.dataKey;return n==="number"&&c&&NI(t,l,c,a)||iu(t,c,n,i)});if(n==="number")return o.reduce(function(l,c){return[Math.min(l[0],c[0]),Math.max(l[1],c[1])]},[1/0,-1/0]);var s={};return o.reduce(function(l,c){for(var d=0,f=c.length;d<f;d++)s[c[d]]||(s[c[d]]=!0,l.push(c[d]));return l},[])},CI=function(t,r){return t==="horizontal"&&r==="xAxis"||t==="vertical"&&r==="yAxis"||t==="centric"&&r==="angleAxis"||t==="radial"&&r==="radiusAxis"},TI=function(t,r,n,a){if(a)return t.map(function(l){return l.coordinate});var i,o,s=t.map(function(l){return l.coordinate===r&&(i=!0),l.coordinate===n&&(o=!0),l.coordinate});return i||s.push(r),o||s.push(n),s},_a=function(t,r,n){if(!t)return null;var a=t.scale,i=t.duplicateDomain,o=t.type,s=t.range,l=t.realScaleType==="scaleBand"?a.bandwidth()/2:2,c=(r||n)&&o==="category"&&a.bandwidth?a.bandwidth()/l:0;if(c=t.axisType==="angleAxis"&&(s==null?void 0:s.length)>=2?xn(s[0]-s[1])*2*c:c,r&&(t.ticks||t.niceTicks)){var d=(t.ticks||t.niceTicks).map(function(f){var h=i?i.indexOf(f):f;return{coordinate:a(h)+c,value:f,offset:c}});return d.filter(function(f){return!Ld(f.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(f,h){return{coordinate:a(f)+c,value:f,index:h,offset:c}}):a.ticks&&!n?a.ticks(t.tickCount).map(function(f){return{coordinate:a(f)+c,value:f,offset:c}}):a.domain().map(function(f,h){return{coordinate:a(f)+c,value:i?i[f]:f,index:h,offset:c}})},ly=new WeakMap,Hf=function(t,r){if(typeof r!="function")return t;ly.has(t)||ly.set(t,new WeakMap);var n=ly.get(t);if(n.has(r))return n.get(r);var a=function(){t.apply(void 0,arguments),r.apply(void 0,arguments)};return n.set(r,a),a},Sfe=function(t,r,n){var a=t.scale,i=t.type,o=t.layout,s=t.axisType;if(a==="auto")return o==="radial"&&s==="radiusAxis"?{scale:Gu(),realScaleType:"band"}:o==="radial"&&s==="angleAxis"?{scale:Np(),realScaleType:"linear"}:i==="category"&&r&&(r.indexOf("LineChart")>=0||r.indexOf("AreaChart")>=0||r.indexOf("ComposedChart")>=0&&!n)?{scale:au(),realScaleType:"point"}:i==="category"?{scale:Gu(),realScaleType:"band"}:{scale:Np(),realScaleType:"linear"};if(Bo(a)){var l="scale".concat(dg(a));return{scale:(RO[l]||au)(),realScaleType:RO[l]?l:"point"}}return xe(a)?{scale:a}:{scale:au(),realScaleType:"point"}},WO=1e-4,jfe=function(t){var r=t.domain();if(!(!r||r.length<=2)){var n=r.length,a=t.range(),i=Math.min(a[0],a[1])-WO,o=Math.max(a[0],a[1])+WO,s=t(r[0]),l=t(r[n-1]);(s<i||s>o||l<i||l>o)&&t.domain([r[0],r[n-1]])}},kfe=function(t,r){if(!t)return null;for(var n=0,a=t.length;n<a;n++)if(t[n].item===r)return t[n].position;return null},Efe=function(t,r){if(!r||r.length!==2||!Y(r[0])||!Y(r[1]))return t;var n=Math.min(r[0],r[1]),a=Math.max(r[0],r[1]),i=[t[0],t[1]];return(!Y(t[0])||t[0]<n)&&(i[0]=n),(!Y(t[1])||t[1]>a)&&(i[1]=a),i[0]>a&&(i[0]=a),i[1]<n&&(i[1]=n),i},Ofe=function(t){var r=t.length;if(!(r<=0))for(var n=0,a=t[0].length;n<a;++n)for(var i=0,o=0,s=0;s<r;++s){var l=Ld(t[s][n][1])?t[s][n][0]:t[s][n][1];l>=0?(t[s][n][0]=i,t[s][n][1]=i+l,i=t[s][n][1]):(t[s][n][0]=o,t[s][n][1]=o+l,o=t[s][n][1])}},Nfe=function(t){var r=t.length;if(!(r<=0))for(var n=0,a=t[0].length;n<a;++n)for(var i=0,o=0;o<r;++o){var s=Ld(t[o][n][1])?t[o][n][0]:t[o][n][1];s>=0?(t[o][n][0]=i,t[o][n][1]=i+s,i=t[o][n][1]):(t[o][n][0]=0,t[o][n][1]=0)}},Pfe={sign:Ofe,expand:WQ,none:xl,silhouette:HQ,wiggle:qQ,positive:Nfe},Cfe=function(t,r,n){var a=r.map(function(s){return s.props.dataKey}),i=Pfe[n],o=zQ().keys(a).value(function(s,l){return+ia(s,l,0)}).order(fb).offset(i);return o(t)},Tfe=function(t,r,n,a,i,o){if(!t)return null;var s=o?r.reverse():r,l={},c=s.reduce(function(f,h){var p,g=(p=h.type)!==null&&p!==void 0&&p.defaultProps?ct(ct({},h.type.defaultProps),h.props):h.props,m=g.stackId,v=g.hide;if(v)return f;var x=g[n],b=f[x]||{hasStack:!1,stackGroups:{}};if(_t(m)){var y=b.stackGroups[m]||{numericAxisId:n,cateAxisId:a,items:[]};y.items.push(h),b.hasStack=!0,b.stackGroups[m]=y}else b.stackGroups[ug("_stackId_")]={numericAxisId:n,cateAxisId:a,items:[h]};return ct(ct({},f),{},el({},x,b))},l),d={};return Object.keys(c).reduce(function(f,h){var p=c[h];if(p.hasStack){var g={};p.stackGroups=Object.keys(p.stackGroups).reduce(function(m,v){var x=p.stackGroups[v];return ct(ct({},m),{},el({},v,{numericAxisId:n,cateAxisId:a,items:x.items,stackedData:Cfe(t,x.items,i)}))},g)}return ct(ct({},f),{},el({},h,p))},d)},Afe=function(t,r){var n=r.realScaleType,a=r.type,i=r.tickCount,o=r.originalDomain,s=r.allowDecimals,l=n||r.scale;if(l!=="auto"&&l!=="linear")return null;if(i&&a==="number"&&o&&(o[0]==="auto"||o[1]==="auto")){var c=t.domain();if(!c.length)return null;var d=Wde(c,i,s);return t.domain([kg(d),jg(d)]),{niceTicks:d}}if(i&&a==="number"){var f=t.domain(),h=Hde(f,i,s);return{niceTicks:h}}return null},HO=function(t){var r=t.axis,n=t.ticks,a=t.offset,i=t.bandSize,o=t.entry,s=t.index;if(r.type==="category")return n[s]?n[s].coordinate+a:null;var l=ia(o,r.dataKey,r.domain[s]);return Ce(l)?null:r.scale(l)-i/2+a},Mfe=function(t){var r=t.numericAxis,n=r.scale.domain();if(r.type==="number"){var a=Math.min(n[0],n[1]),i=Math.max(n[0],n[1]);return a<=0&&i>=0?0:i<0?i:a}return n[0]},$fe=function(t,r){var n,a=(n=t.type)!==null&&n!==void 0&&n.defaultProps?ct(ct({},t.type.defaultProps),t.props):t.props,i=a.stackId;if(_t(i)){var o=r[i];if(o){var s=o.items.indexOf(t);return s>=0?o.stackedData[s]:null}}return null},Rfe=function(t){return t.reduce(function(r,n){return[kg(n.concat([r[0]]).filter(Y)),jg(n.concat([r[1]]).filter(Y))]},[1/0,-1/0])},AI=function(t,r,n){return Object.keys(t).reduce(function(a,i){var o=t[i],s=o.stackedData,l=s.reduce(function(c,d){var f=Rfe(d.slice(r,n+1));return[Math.min(c[0],f[0]),Math.max(c[1],f[1])]},[1/0,-1/0]);return[Math.min(l[0],a[0]),Math.max(l[1],a[1])]},[1/0,-1/0]).map(function(a){return a===1/0||a===-1/0?0:a})},qO=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,VO=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,zb=function(t,r,n){if(xe(t))return t(r,n);if(!Array.isArray(t))return r;var a=[];if(Y(t[0]))a[0]=n?t[0]:Math.min(t[0],r[0]);else if(qO.test(t[0])){var i=+qO.exec(t[0])[1];a[0]=r[0]-i}else xe(t[0])?a[0]=t[0](r[0]):a[0]=r[0];if(Y(t[1]))a[1]=n?t[1]:Math.max(t[1],r[1]);else if(VO.test(t[1])){var o=+VO.exec(t[1])[1];a[1]=r[1]+o}else xe(t[1])?a[1]=t[1](r[1]):a[1]=r[1];return a},Rp=function(t,r,n){if(t&&t.scale&&t.scale.bandwidth){var a=t.scale.bandwidth();if(!n||a>0)return a}if(t&&r&&r.length>=2){for(var i=M1(r,function(f){return f.coordinate}),o=1/0,s=1,l=i.length;s<l;s++){var c=i[s],d=i[s-1];o=Math.min((c.coordinate||0)-(d.coordinate||0),o)}return o===1/0?0:o}return n?void 0:0},KO=function(t,r,n){return!t||!t.length||n_(t,Vr(n,"type.defaultProps.domain"))?r:t},MI=function(t,r){var n=t.type.defaultProps?ct(ct({},t.type.defaultProps),t.props):t.props,a=n.dataKey,i=n.name,o=n.unit,s=n.formatter,l=n.tooltipType,c=n.chartType,d=n.hide;return ct(ct({},Pe(t,!1)),{},{dataKey:a,unit:o,formatter:s,name:i||a,color:o_(t),value:ia(r,a),type:l,payload:r,chartType:c,hide:d})};function nd(e){"@babel/helpers - typeof";return nd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},nd(e)}function GO(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function YO(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?GO(Object(r),!0).forEach(function(n){Ife(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):GO(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ife(e,t,r){return t=Dfe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Dfe(e){var t=Lfe(e,"string");return nd(t)=="symbol"?t:t+""}function Lfe(e,t){if(nd(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(nd(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Ip=Math.PI/180,Bfe=function(t){return t*180/Math.PI},It=function(t,r,n,a){return{x:t+Math.cos(-Ip*a)*n,y:r+Math.sin(-Ip*a)*n}},Ffe=function(t,r){var n=t.x,a=t.y,i=r.x,o=r.y;return Math.sqrt(Math.pow(n-i,2)+Math.pow(a-o,2))},Ufe=function(t,r){var n=t.x,a=t.y,i=r.cx,o=r.cy,s=Ffe({x:n,y:a},{x:i,y:o});if(s<=0)return{radius:s};var l=(n-i)/s,c=Math.acos(l);return a>o&&(c=2*Math.PI-c),{radius:s,angle:Bfe(c),angleInRadian:c}},zfe=function(t){var r=t.startAngle,n=t.endAngle,a=Math.floor(r/360),i=Math.floor(n/360),o=Math.min(a,i);return{startAngle:r-o*360,endAngle:n-o*360}},Wfe=function(t,r){var n=r.startAngle,a=r.endAngle,i=Math.floor(n/360),o=Math.floor(a/360),s=Math.min(i,o);return t+s*360},XO=function(t,r){var n=t.x,a=t.y,i=Ufe({x:n,y:a},r),o=i.radius,s=i.angle,l=r.innerRadius,c=r.outerRadius;if(o<l||o>c)return!1;if(o===0)return!0;var d=zfe(r),f=d.startAngle,h=d.endAngle,p=s,g;if(f<=h){for(;p>h;)p-=360;for(;p<f;)p+=360;g=p>=f&&p<=h}else{for(;p>f;)p-=360;for(;p<h;)p+=360;g=p>=h&&p<=f}return g?YO(YO({},r),{},{radius:o,angle:Wfe(p,r)}):null};function ad(e){"@babel/helpers - typeof";return ad=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ad(e)}var Hfe=["offset"];function qfe(e){return Yfe(e)||Gfe(e)||Kfe(e)||Vfe()}function Vfe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
531In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Kfe(e,t){if(e){if(typeof e=="string")return Wb(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Wb(e,t)}}function Gfe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Yfe(e){if(Array.isArray(e))return Wb(e)}function Wb(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Xfe(e,t){if(e==null)return{};var r=Jfe(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Jfe(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function JO(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function bt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?JO(Object(r),!0).forEach(function(n){Qfe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):JO(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Qfe(e,t,r){return t=Zfe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Zfe(e){var t=ehe(e,"string");return ad(t)=="symbol"?t:t+""}function ehe(e,t){if(ad(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(ad(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function id(){return id=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},id.apply(this,arguments)}var the=function(t){var r=t.value,n=t.formatter,a=Ce(t.children)?r:t.children;return xe(n)?n(a):a},rhe=function(t,r){var n=xn(r-t),a=Math.min(Math.abs(r-t),360);return n*a},nhe=function(t,r,n){var a=t.position,i=t.viewBox,o=t.offset,s=t.className,l=i,c=l.cx,d=l.cy,f=l.innerRadius,h=l.outerRadius,p=l.startAngle,g=l.endAngle,m=l.clockWise,v=(f+h)/2,x=rhe(p,g),b=x>=0?1:-1,y,S;a==="insideStart"?(y=p+b*o,S=m):a==="insideEnd"?(y=g-b*o,S=!m):a==="end"&&(y=g+b*o,S=m),S=x<=0?S:!S;var _=It(c,d,v,y),j=It(c,d,v,y+(S?1:-1)*359),k="M".concat(_.x,",").concat(_.y,`
532    A`).concat(v,",").concat(v,",0,1,").concat(S?0:1,`,
533    `).concat(j.x,",").concat(j.y),E=Ce(t.id)?ug("recharts-radial-line-"):t.id;return $.createElement("text",id({},n,{dominantBaseline:"central",className:ke("recharts-radial-bar-label",s)}),$.createElement("defs",null,$.createElement("path",{id:E,d:k})),$.createElement("textPath",{xlinkHref:"#".concat(E)},r))},ahe=function(t){var r=t.viewBox,n=t.offset,a=t.position,i=r,o=i.cx,s=i.cy,l=i.innerRadius,c=i.outerRadius,d=i.startAngle,f=i.endAngle,h=(d+f)/2;if(a==="outside"){var p=It(o,s,c+n,h),g=p.x,m=p.y;return{x:g,y:m,textAnchor:g>=o?"start":"end",verticalAnchor:"middle"}}if(a==="center")return{x:o,y:s,textAnchor:"middle",verticalAnchor:"middle"};if(a==="centerTop")return{x:o,y:s,textAnchor:"middle",verticalAnchor:"start"};if(a==="centerBottom")return{x:o,y:s,textAnchor:"middle",verticalAnchor:"end"};var v=(l+c)/2,x=It(o,s,v,h),b=x.x,y=x.y;return{x:b,y,textAnchor:"middle",verticalAnchor:"middle"}},ihe=function(t){var r=t.viewBox,n=t.parentViewBox,a=t.offset,i=t.position,o=r,s=o.x,l=o.y,c=o.width,d=o.height,f=d>=0?1:-1,h=f*a,p=f>0?"end":"start",g=f>0?"start":"end",m=c>=0?1:-1,v=m*a,x=m>0?"end":"start",b=m>0?"start":"end";if(i==="top"){var y={x:s+c/2,y:l-f*a,textAnchor:"middle",verticalAnchor:p};return bt(bt({},y),n?{height:Math.max(l-n.y,0),width:c}:{})}if(i==="bottom"){var S={x:s+c/2,y:l+d+h,textAnchor:"middle",verticalAnchor:g};return bt(bt({},S),n?{height:Math.max(n.y+n.height-(l+d),0),width:c}:{})}if(i==="left"){var _={x:s-v,y:l+d/2,textAnchor:x,verticalAnchor:"middle"};return bt(bt({},_),n?{width:Math.max(_.x-n.x,0),height:d}:{})}if(i==="right"){var j={x:s+c+v,y:l+d/2,textAnchor:b,verticalAnchor:"middle"};return bt(bt({},j),n?{width:Math.max(n.x+n.width-j.x,0),height:d}:{})}var k=n?{width:c,height:d}:{};return i==="insideLeft"?bt({x:s+v,y:l+d/2,textAnchor:b,verticalAnchor:"middle"},k):i==="insideRight"?bt({x:s+c-v,y:l+d/2,textAnchor:x,verticalAnchor:"middle"},k):i==="insideTop"?bt({x:s+c/2,y:l+h,textAnchor:"middle",verticalAnchor:g},k):i==="insideBottom"?bt({x:s+c/2,y:l+d-h,textAnchor:"middle",verticalAnchor:p},k):i==="insideTopLeft"?bt({x:s+v,y:l+h,textAnchor:b,verticalAnchor:g},k):i==="insideTopRight"?bt({x:s+c-v,y:l+h,textAnchor:x,verticalAnchor:g},k):i==="insideBottomLeft"?bt({x:s+v,y:l+d-h,textAnchor:b,verticalAnchor:p},k):i==="insideBottomRight"?bt({x:s+c-v,y:l+d-h,textAnchor:x,verticalAnchor:p},k):rc(i)&&(Y(i.x)||uo(i.x))&&(Y(i.y)||uo(i.y))?bt({x:s+Fo(i.x,c),y:l+Fo(i.y,d),textAnchor:"end",verticalAnchor:"end"},k):bt({x:s+c/2,y:l+d/2,textAnchor:"middle",verticalAnchor:"middle"},k)},ohe=function(t){return"cx"in t&&Y(t.cx)};function Vt(e){var t=e.offset,r=t===void 0?5:t,n=Xfe(e,Hfe),a=bt({offset:r},n),i=a.viewBox,o=a.position,s=a.value,l=a.children,c=a.content,d=a.className,f=d===void 0?"":d,h=a.textBreakAll;if(!i||Ce(s)&&Ce(l)&&!w.isValidElement(c)&&!xe(c))return null;if(w.isValidElement(c))return w.cloneElement(c,a);var p;if(xe(c)){if(p=w.createElement(c,a),w.isValidElement(p))return p}else p=the(a);var g=ohe(i),m=Pe(a,!0);if(g&&(o==="insideStart"||o==="insideEnd"||o==="end"))return nhe(a,p,m);var v=g?ahe(a):ihe(a);return $.createElement(wp,id({className:ke("recharts-label",f)},m,v,{breakAll:h}),p)}Vt.displayName="Label";var $I=function(t){var r=t.cx,n=t.cy,a=t.angle,i=t.startAngle,o=t.endAngle,s=t.r,l=t.radius,c=t.innerRadius,d=t.outerRadius,f=t.x,h=t.y,p=t.top,g=t.left,m=t.width,v=t.height,x=t.clockWise,b=t.labelViewBox;if(b)return b;if(Y(m)&&Y(v)){if(Y(f)&&Y(h))return{x:f,y:h,width:m,height:v};if(Y(p)&&Y(g))return{x:p,y:g,width:m,height:v}}return Y(f)&&Y(h)?{x:f,y:h,width:0,height:0}:Y(r)&&Y(n)?{cx:r,cy:n,startAngle:i||a||0,endAngle:o||a||0,innerRadius:c||0,outerRadius:d||l||s||0,clockWise:x}:t.viewBox?t.viewBox:{}},she=function(t,r){return t?t===!0?$.createElement(Vt,{key:"label-implicit",viewBox:r}):_t(t)?$.createElement(Vt,{key:"label-implicit",viewBox:r,value:t}):w.isValidElement(t)?t.type===Vt?w.cloneElement(t,{key:"label-implicit",viewBox:r}):$.createElement(Vt,{key:"label-implicit",content:t,viewBox:r}):xe(t)?$.createElement(Vt,{key:"label-implicit",content:t,viewBox:r}):rc(t)?$.createElement(Vt,id({viewBox:r},t,{key:"label-implicit"})):null:null},lhe=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&n&&!t.label)return null;var a=t.children,i=$I(t),o=Sn(a,Vt).map(function(l,c){return w.cloneElement(l,{viewBox:r||i,key:"label-".concat(c)})});if(!n)return o;var s=she(t.label,r||i);return[s].concat(qfe(o))};Vt.parseViewBox=$I;Vt.renderCallByParent=lhe;function che(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var uhe=che;const dhe=Fe(uhe);function od(e){"@babel/helpers - typeof";return od=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},od(e)}var fhe=["valueAccessor"],hhe=["data","dataKey","clockWise","id","textBreakAll"];function phe(e){return yhe(e)||vhe(e)||ghe(e)||mhe()}function mhe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
534In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ghe(e,t){if(e){if(typeof e=="string")return Hb(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Hb(e,t)}}function vhe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function yhe(e){if(Array.isArray(e))return Hb(e)}function Hb(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Dp(){return Dp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Dp.apply(this,arguments)}function QO(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function ZO(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?QO(Object(r),!0).forEach(function(n){bhe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):QO(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function bhe(e,t,r){return t=xhe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function xhe(e){var t=whe(e,"string");return od(t)=="symbol"?t:t+""}function whe(e,t){if(od(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(od(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function eN(e,t){if(e==null)return{};var r=_he(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function _he(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var She=function(t){return Array.isArray(t.value)?dhe(t.value):t.value};function Eo(e){var t=e.valueAccessor,r=t===void 0?She:t,n=eN(e,fhe),a=n.data,i=n.dataKey,o=n.clockWise,s=n.id,l=n.textBreakAll,c=eN(n,hhe);return!a||!a.length?null:$.createElement(Ot,{className:"recharts-label-list"},a.map(function(d,f){var h=Ce(i)?r(d,f):ia(d&&d.payload,i),p=Ce(s)?{}:{id:"".concat(s,"-").concat(f)};return $.createElement(Vt,Dp({},Pe(d,!0),c,p,{parentViewBox:d.parentViewBox,value:h,textBreakAll:l,viewBox:Vt.parseViewBox(Ce(o)?d:ZO(ZO({},d),{},{clockWise:o})),key:"label-".concat(f),index:f}))}))}Eo.displayName="LabelList";function jhe(e,t){return e?e===!0?$.createElement(Eo,{key:"labelList-implicit",data:t}):$.isValidElement(e)||xe(e)?$.createElement(Eo,{key:"labelList-implicit",data:t,content:e}):rc(e)?$.createElement(Eo,Dp({data:t},e,{key:"labelList-implicit"})):null:null}function khe(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&r&&!e.label)return null;var n=e.children,a=Sn(n,Eo).map(function(o,s){return w.cloneElement(o,{data:t,key:"labelList-".concat(s)})});if(!r)return a;var i=jhe(e.label,t);return[i].concat(phe(a))}Eo.renderCallByParent=khe;function sd(e){"@babel/helpers - typeof";return sd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},sd(e)}function qb(){return qb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},qb.apply(this,arguments)}function tN(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function rN(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?tN(Object(r),!0).forEach(function(n){Ehe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):tN(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ehe(e,t,r){return t=Ohe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ohe(e){var t=Nhe(e,"string");return sd(t)=="symbol"?t:t+""}function Nhe(e,t){if(sd(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(sd(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Phe=function(t,r){var n=xn(r-t),a=Math.min(Math.abs(r-t),359.999);return n*a},qf=function(t){var r=t.cx,n=t.cy,a=t.radius,i=t.angle,o=t.sign,s=t.isExternal,l=t.cornerRadius,c=t.cornerIsExternal,d=l*(s?1:-1)+a,f=Math.asin(l/d)/Ip,h=c?i:i+o*f,p=It(r,n,d,h),g=It(r,n,a,h),m=c?i-o*f:i,v=It(r,n,d*Math.cos(f*Ip),m);return{center:p,circleTangency:g,lineTangency:v,theta:f}},RI=function(t){var r=t.cx,n=t.cy,a=t.innerRadius,i=t.outerRadius,o=t.startAngle,s=t.endAngle,l=Phe(o,s),c=o+l,d=It(r,n,i,o),f=It(r,n,i,c),h="M ".concat(d.x,",").concat(d.y,`
535    A `).concat(i,",").concat(i,`,0,
536    `).concat(+(Math.abs(l)>180),",").concat(+(o>c),`,
537    `).concat(f.x,",").concat(f.y,`
538  `);if(a>0){var p=It(r,n,a,o),g=It(r,n,a,c);h+="L ".concat(g.x,",").concat(g.y,`
539            A `).concat(a,",").concat(a,`,0,
540            `).concat(+(Math.abs(l)>180),",").concat(+(o<=c),`,
541            `).concat(p.x,",").concat(p.y," Z")}else h+="L ".concat(r,",").concat(n," Z");return h},Che=function(t){var r=t.cx,n=t.cy,a=t.innerRadius,i=t.outerRadius,o=t.cornerRadius,s=t.forceCornerRadius,l=t.cornerIsExternal,c=t.startAngle,d=t.endAngle,f=xn(d-c),h=qf({cx:r,cy:n,radius:i,angle:c,sign:f,cornerRadius:o,cornerIsExternal:l}),p=h.circleTangency,g=h.lineTangency,m=h.theta,v=qf({cx:r,cy:n,radius:i,angle:d,sign:-f,cornerRadius:o,cornerIsExternal:l}),x=v.circleTangency,b=v.lineTangency,y=v.theta,S=l?Math.abs(c-d):Math.abs(c-d)-m-y;if(S<0)return s?"M ".concat(g.x,",").concat(g.y,`
542        a`).concat(o,",").concat(o,",0,0,1,").concat(o*2,`,0
543        a`).concat(o,",").concat(o,",0,0,1,").concat(-o*2,`,0
544      `):RI({cx:r,cy:n,innerRadius:a,outerRadius:i,startAngle:c,endAngle:d});var _="M ".concat(g.x,",").concat(g.y,`
545    A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(p.x,",").concat(p.y,`
546    A`).concat(i,",").concat(i,",0,").concat(+(S>180),",").concat(+(f<0),",").concat(x.x,",").concat(x.y,`
547    A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(b.x,",").concat(b.y,`
548  `);if(a>0){var j=qf({cx:r,cy:n,radius:a,angle:c,sign:f,isExternal:!0,cornerRadius:o,cornerIsExternal:l}),k=j.circleTangency,E=j.lineTangency,O=j.theta,A=qf({cx:r,cy:n,radius:a,angle:d,sign:-f,isExternal:!0,cornerRadius:o,cornerIsExternal:l}),T=A.circleTangency,N=A.lineTangency,I=A.theta,R=l?Math.abs(c-d):Math.abs(c-d)-O-I;if(R<0&&o===0)return"".concat(_,"L").concat(r,",").concat(n,"Z");_+="L".concat(N.x,",").concat(N.y,`
549      A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(T.x,",").concat(T.y,`
550      A`).concat(a,",").concat(a,",0,").concat(+(R>180),",").concat(+(f>0),",").concat(k.x,",").concat(k.y,`
551      A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(E.x,",").concat(E.y,"Z")}else _+="L".concat(r,",").concat(n,"Z");return _},The={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},II=function(t){var r=rN(rN({},The),t),n=r.cx,a=r.cy,i=r.innerRadius,o=r.outerRadius,s=r.cornerRadius,l=r.forceCornerRadius,c=r.cornerIsExternal,d=r.startAngle,f=r.endAngle,h=r.className;if(o<i||d===f)return null;var p=ke("recharts-sector",h),g=o-i,m=Fo(s,g,0,!0),v;return m>0&&Math.abs(d-f)<360?v=Che({cx:n,cy:a,innerRadius:i,outerRadius:o,cornerRadius:Math.min(m,g/2),forceCornerRadius:l,cornerIsExternal:c,startAngle:d,endAngle:f}):v=RI({cx:n,cy:a,innerRadius:i,outerRadius:o,startAngle:d,endAngle:f}),$.createElement("path",qb({},Pe(r,!0),{className:p,d:v,role:"img"}))};function ld(e){"@babel/helpers - typeof";return ld=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ld(e)}function Vb(){return Vb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Vb.apply(this,arguments)}function nN(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function aN(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?nN(Object(r),!0).forEach(function(n){Ahe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):nN(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ahe(e,t,r){return t=Mhe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Mhe(e){var t=$he(e,"string");return ld(t)=="symbol"?t:t+""}function $he(e,t){if(ld(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(ld(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var iN={curveBasisClosed:TQ,curveBasisOpen:AQ,curveBasis:CQ,curveBumpX:gQ,curveBumpY:vQ,curveLinearClosed:MQ,curveLinear:hg,curveMonotoneX:$Q,curveMonotoneY:RQ,curveNatural:IQ,curveStep:DQ,curveStepAfter:BQ,curveStepBefore:LQ},Vf=function(t){return t.x===+t.x&&t.y===+t.y},Ac=function(t){return t.x},Mc=function(t){return t.y},Rhe=function(t,r){if(xe(t))return t;var n="curve".concat(dg(t));return(n==="curveMonotone"||n==="curveBump")&&r?iN["".concat(n).concat(r==="vertical"?"Y":"X")]:iN[n]||hg},Ihe=function(t){var r=t.type,n=r===void 0?"linear":r,a=t.points,i=a===void 0?[]:a,o=t.baseLine,s=t.layout,l=t.connectNulls,c=l===void 0?!1:l,d=Rhe(n,s),f=c?i.filter(function(m){return Vf(m)}):i,h;if(Array.isArray(o)){var p=c?o.filter(function(m){return Vf(m)}):o,g=f.map(function(m,v){return aN(aN({},m),{},{base:p[v]})});return s==="vertical"?h=If().y(Mc).x1(Ac).x0(function(m){return m.base.x}):h=If().x(Ac).y1(Mc).y0(function(m){return m.base.y}),h.defined(Vf).curve(d),h(g)}return s==="vertical"&&Y(o)?h=If().y(Mc).x1(Ac).x0(o):Y(o)?h=If().x(Ac).y1(Mc).y0(o):h=I$().x(Ac).y(Mc),h.defined(Vf).curve(d),h(f)},oN=function(t){var r=t.className,n=t.points,a=t.path,i=t.pathRef;if((!n||!n.length)&&!a)return null;var o=n&&n.length?Ihe(t):a;return w.createElement("path",Vb({},Pe(t,!1),op(t),{className:ke("recharts-curve",r),d:o,ref:i}))}
551,DI={exports:{}},Dhe="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",Lhe=Dhe,Bhe=Lhe;function LI(){}function BI(){}BI.resetWarningCache=LI;var Fhe=function(){function e(n,a,i,o,s,l){if(l!==Bhe){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}e.isRequired=e;function t(){return e}var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:BI,resetWarningCache:LI};return r.PropTypes=r,r};DI.exports=Fhe();var Uhe=DI.exports;const Te=Fe(Uhe);var zhe=Object.getOwnPropertyNames,Whe=Object.getOwnPropertySymbols,Hhe=Object.prototype.hasOwnProperty;function sN(e,t){return function(n,a,i){return e(n,a,i)&&t(n,a,i)}}function Kf(e){return function(r,n,a){if(!r||!n||typeof r!="object"||typeof n!="object")return e(r,n,a);var i=a.cache,o=i.get(r),s=i.get(n);if(o&&s)return o===n&&s===r;i.set(r,n),i.set(n,r);var l=e(r,n,a);return i.delete(r),i.delete(n),l}}function lN(e){return zhe(e).concat(Whe(e))}var qhe=Object.hasOwn||function(e,t){return Hhe.call(e,t)};function Zo(e,t){return e===t||!e&&!t&&e!==e&&t!==t}var Vhe="__v",Khe="__o",Ghe="_owner",cN=Object.getOwnPropertyDescriptor,uN=Object.keys;function Yhe(e,t,r){var n=e.length;if(t.length!==n)return!1;for(;n-- >0;)if(!r.equals(e[n],t[n],n,n,e,t,r))return!1;return!0}function Xhe(e,t){return Zo(e.getTime(),t.getTime())}function Jhe(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function Qhe(e,t){return e===t}function dN(e,t,r){var n=e.size;if(n!==t.size)return!1;if(!n)return!0;for(var a=new Array(n),i=e.entries(),o,s,l=0;(o=i.next())&&!o.done;){for(var c=t.entries(),d=!1,f=0;(s=c.next())&&!s.done;){if(a[f]){f++;continue}var h=o.value,p=s.value;if(r.equals(h[0],p[0],l,f,e,t,r)&&r.equals(h[1],p[1],h[0],p[0],e,t,r)){d=a[f]=!0;break}f++}if(!d)return!1;l++}return!0}var Zhe=Zo;function epe(e,t,r){var n=uN(e),a=n.length;if(uN(t).length!==a)return!1;for(;a-- >0;)if(!FI(e,t,r,n[a]))return!1;return!0}function $c(e,t,r){var n=lN(e),a=n.length;if(lN(t).length!==a)return!1;for(var i,o,s;a-- >0;)if(i=n[a],!FI(e,t,r,i)||(o=cN(e,i),s=cN(t,i),(o||s)&&(!o||!s||o.configurable!==s.configurable||o.enumerable!==s.enumerable||o.writable!==s.writable)))return!1;return!0}function tpe(e,t){return Zo(e.valueOf(),t.valueOf())}function rpe(e,t){return e.source===t.source&&e.flags===t.flags}function fN(e,t,r){var n=e.size;if(n!==t.size)return!1;if(!n)return!0;for(var a=new Array(n),i=e.values(),o,s;(o=i.next())&&!o.done;){for(var l=t.values(),c=!1,d=0;(s=l.next())&&!s.done;){if(!a[d]&&r.equals(o.value,s.value,o.value,s.value,e,t,r)){c=a[d]=!0;break}d++}if(!c)return!1}return!0}function npe(e,t){var r=e.length;if(t.length!==r)return!1;for(;r-- >0;)if(e[r]!==t[r])return!1;return!0}function ape(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function FI(e,t,r,n){return(n===Ghe||n===Khe||n===Vhe)&&(e.$$typeof||t.$$typeof)?!0:qhe(t,n)&&r.equals(e[n],t[n],n,n,e,t,r)}var ipe="[object Arguments]",ope="[object Boolean]",spe="[object Date]",lpe="[object Error]",cpe="[object Map]",upe="[object Number]",dpe="[object Object]",fpe="[object RegExp]",hpe="[object Set]",ppe="[object String]",mpe="[object URL]",gpe=Array.isArray,hN=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,pN=Object.assign,vpe=Object.prototype.toString.call.bind(Object.prototype.toString);function ype(e){var t=e.areArraysEqual,r=e.areDatesEqual,n=e.areErrorsEqual,a=e.areFunctionsEqual,i=e.areMapsEqual,o=e.areNumbersEqual,s=e.areObjectsEqual,l=e.arePrimitiveWrappersEqual,c=e.areRegExpsEqual,d=e.areSetsEqual,f=e.areTypedArraysEqual,h=e.areUrlsEqual;return function(g,m,v){if(g===m)return!0;if(g==null||m==null)return!1;var x=typeof g;if(x!==typeof m)return!1;if(x!=="object")return x==="number"?o(g,m,v):x==="function"?a(g,m,v):!1;var b=g.constructor;if(b!==m.constructor)return!1;if(b===Object)return s(g,m,v);if(gpe(g))return t(g,m,v);if(hN!=null&&hN(g))return f(g,m,v);if(b===Date)return r(g,m,v);if(b===RegExp)return c(g,m,v);if(b===Map)return i(g,m,v);if(b===Set)return d(g,m,v);var y=vpe(g);return y===spe?r(g,m,v):y===fpe?c(g,m,v):y===cpe?i(g,m,v):y===hpe?d(g,m,v):y===dpe?typeof g.then!="function"&&typeof m.then!="function"&&s(g,m,v):y===mpe?h(g,m,v):y===lpe?n(g,m,v):y===ipe?s(g,m,v):y===ope||y===upe||y===ppe?l(g,m,v):!1}}
vendor: 151,356 bytes, lines 551-573
551function bpe(e){var t=e.circular,r=e.createCustomConfig,n=e.strict,a={areArraysEqual:n?$c:Yhe,areDatesEqual:Xhe,areErrorsEqual:Jhe,areFunctionsEqual:Qhe,areMapsEqual:n?sN(dN,$c):dN,areNumbersEqual:Zhe,areObjectsEqual:n?$c:epe,arePrimitiveWrappersEqual:tpe,areRegExpsEqual:rpe,areSetsEqual:n?sN(fN,$c):fN,areTypedArraysEqual:n?$c:npe,areUrlsEqual:ape};if(r&&(a=pN({},a,r(a))),t){var i=Kf(a.areArraysEqual),o=Kf(a.areMapsEqual),s=Kf(a.areObjectsEqual),l=Kf(a.areSetsEqual);a=pN({},a,{areArraysEqual:i,areMapsEqual:o,areObjectsEqual:s,areSetsEqual:l})}return a}function xpe(e){return function(t,r,n,a,i,o,s){return e(t,r,s)}}function wpe(e){var t=e.circular,r=e.comparator,n=e.createState,a=e.equals,i=e.strict;if(n)return function(l,c){var d=n(),f=d.cache,h=f===void 0?t?new WeakMap:void 0:f,p=d.meta;return r(l,c,{cache:h,equals:a,meta:p,strict:i})};if(t)return function(l,c){return r(l,c,{cache:new WeakMap,equals:a,meta:void 0,strict:i})};var o={cache:void 0,equals:a,meta:void 0,strict:i};return function(l,c){return r(l,c,o)}}var _pe=qi();qi({strict:!0});qi({circular:!0});qi({circular:!0,strict:!0});qi({createInternalComparator:function(){return Zo}});qi({strict:!0,createInternalComparator:function(){return Zo}});qi({circular:!0,createInternalComparator:function(){return Zo}});qi({circular:!0,createInternalComparator:function(){return Zo},strict:!0});function qi(e){e===void 0&&(e={});var t=e.circular,r=t===void 0?!1:t,n=e.createInternalComparator,a=e.createState,i=e.strict,o=i===void 0?!1:i,s=bpe(e),l=ype(s),c=n?n(l):xpe(l);return wpe({circular:r,comparator:l,createState:a,equals:c,strict:o})}function Spe(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function mN(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=-1,n=function a(i){r<0&&(r=i),i-r>t?(e(i),r=-1):Spe(a)};requestAnimationFrame(n)}function Kb(e){"@babel/helpers - typeof";return Kb=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Kb(e)}function jpe(e){return Npe(e)||Ope(e)||Epe(e)||kpe()}function kpe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
552In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Epe(e,t){if(e){if(typeof e=="string")return gN(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return gN(e,t)}}function gN(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Ope(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Npe(e){if(Array.isArray(e))return e}function Ppe(){var e={},t=function(){return null},r=!1,n=function a(i){if(!r){if(Array.isArray(i)){if(!i.length)return;var o=i,s=jpe(o),l=s[0],c=s.slice(1);if(typeof l=="number"){mN(a.bind(null,c),l);return}a(l),mN(a.bind(null,c));return}Kb(i)==="object"&&(e=i,t(e)),typeof i=="function"&&i()}};return{stop:function(){r=!0},start:function(i){r=!1,n(i)},subscribe:function(i){return t=i,function(){t=function(){return null}}}}}function cd(e){"@babel/helpers - typeof";return cd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},cd(e)}function vN(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function yN(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?vN(Object(r),!0).forEach(function(n){UI(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):vN(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function UI(e,t,r){return t=Cpe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Cpe(e){var t=Tpe(e,"string");return cd(t)==="symbol"?t:String(t)}function Tpe(e,t){if(cd(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(cd(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Ape=function(t,r){return[Object.keys(t),Object.keys(r)].reduce(function(n,a){return n.filter(function(i){return a.includes(i)})})},Mpe=function(t){return t},$pe=function(t){return t.replace(/([A-Z])/g,function(r){return"-".concat(r.toLowerCase())})},ou=function(t,r){return Object.keys(r).reduce(function(n,a){return yN(yN({},n),{},UI({},a,t(a,r[a])))},{})},bN=function(t,r,n){return t.map(function(a){return"".concat($pe(a)," ").concat(r,"ms ").concat(n)}).join(",")};function Rpe(e,t){return Lpe(e)||Dpe(e,t)||zI(e,t)||Ipe()}function Ipe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
553In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Dpe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,s=[],l=!0,c=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(d){c=!0,a=d}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw a}}return s}}function Lpe(e){if(Array.isArray(e))return e}function Bpe(e){return zpe(e)||Upe(e)||zI(e)||Fpe()}function Fpe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
554In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function zI(e,t){if(e){if(typeof e=="string")return Gb(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Gb(e,t)}}function Upe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function zpe(e){if(Array.isArray(e))return Gb(e)}function Gb(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var Lp=1e-4,WI=function(t,r){return[0,3*t,3*r-6*t,3*t-3*r+1]},HI=function(t,r){return t.map(function(n,a){return n*Math.pow(r,a)}).reduce(function(n,a){return n+a})},xN=function(t,r){return function(n){var a=WI(t,r);return HI(a,n)}},Wpe=function(t,r){return function(n){var a=WI(t,r),i=[].concat(Bpe(a.map(function(o,s){return o*s}).slice(1)),[0]);return HI(i,n)}},wN=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var a=r[0],i=r[1],o=r[2],s=r[3];if(r.length===1)switch(r[0]){case"linear":a=0,i=0,o=1,s=1;break;case"ease":a=.25,i=.1,o=.25,s=1;break;case"ease-in":a=.42,i=0,o=1,s=1;break;case"ease-out":a=.42,i=0,o=.58,s=1;break;case"ease-in-out":a=0,i=0,o=.58,s=1;break;default:{var l=r[0].split("(");if(l[0]==="cubic-bezier"&&l[1].split(")")[0].split(",").length===4){var c=l[1].split(")")[0].split(",").map(function(v){return parseFloat(v)}),d=Rpe(c,4);a=d[0],i=d[1],o=d[2],s=d[3]}}}var f=xN(a,o),h=xN(i,s),p=Wpe(a,o),g=function(x){return x>1?1:x<0?0:x},m=function(x){for(var b=x>1?1:x,y=b,S=0;S<8;++S){var _=f(y)-b,j=p(y);if(Math.abs(_-b)<Lp||j<Lp)return h(y);y=g(y-_/j)}return h(y)};return m.isStepper=!1,m},Hpe=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.stiff,n=r===void 0?100:r,a=t.damping,i=a===void 0?8:a,o=t.dt,s=o===void 0?17:o,l=function(d,f,h){var p=-(d-f)*n,g=h*i,m=h+(p-g)*s/1e3,v=h*s/1e3+d;return Math.abs(v-f)<Lp&&Math.abs(m)<Lp?[f,0]:[v,m]};return l.isStepper=!0,l.dt=s,l},qpe=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var a=r[0];if(typeof a=="string")switch(a){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return wN(a);case"spring":return Hpe();default:if(a.split("(")[0]==="cubic-bezier")return wN(a)}return typeof a=="function"?a:null};function ud(e){"@babel/helpers - typeof";return ud=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ud(e)}function _N(e){return Gpe(e)||Kpe(e)||qI(e)||Vpe()}function Vpe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
555In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Kpe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Gpe(e){if(Array.isArray(e))return Xb(e)}function SN(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Mt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?SN(Object(r),!0).forEach(function(n){Yb(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):SN(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Yb(e,t,r){return t=Ype(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ype(e){var t=Xpe(e,"string");return ud(t)==="symbol"?t:String(t)}function Xpe(e,t){if(ud(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(ud(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Jpe(e,t){return eme(e)||Zpe(e,t)||qI(e,t)||Qpe()}function Qpe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
556In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qI(e,t){if(e){if(typeof e=="string")return Xb(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Xb(e,t)}}function Xb(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Zpe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,s=[],l=!0,c=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(d){c=!0,a=d}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw a}}return s}}function eme(e){if(Array.isArray(e))return e}var Bp=function(t,r,n){return t+(r-t)*n},Jb=function(t){var r=t.from,n=t.to;return r!==n},tme=function e(t,r,n){var a=ou(function(i,o){if(Jb(o)){var s=t(o.from,o.to,o.velocity),l=Jpe(s,2),c=l[0],d=l[1];return Mt(Mt({},o),{},{from:c,velocity:d})}return o},r);return n<1?ou(function(i,o){return Jb(o)?Mt(Mt({},o),{},{velocity:Bp(o.velocity,a[i].velocity,n),from:Bp(o.from,a[i].from,n)}):o},r):e(t,a,n-1)};const rme=function(e,t,r,n,a){var i=Ape(e,t),o=i.reduce(function(v,x){return Mt(Mt({},v),{},Yb({},x,[e[x],t[x]]))},{}),s=i.reduce(function(v,x){return Mt(Mt({},v),{},Yb({},x,{from:e[x],velocity:0,to:t[x]}))},{}),l=-1,c,d,f=function(){return null},h=function(){return ou(function(x,b){return b.from},s)},p=function(){return!Object.values(s).filter(Jb).length},g=function(x){c||(c=x);var b=x-c,y=b/r.dt;s=tme(r,s,y),a(Mt(Mt(Mt({},e),t),h())),c=x,p()||(l=requestAnimationFrame(f))},m=function(x){d||(d=x);var b=(x-d)/n,y=ou(function(_,j){return Bp.apply(void 0,_N(j).concat([r(b)]))},o);if(a(Mt(Mt(Mt({},e),t),y)),b<1)l=requestAnimationFrame(f);else{var S=ou(function(_,j){return Bp.apply(void 0,_N(j).concat([r(1)]))},o);a(Mt(Mt(Mt({},e),t),S))}};return f=r.isStepper?g:m,function(){return requestAnimationFrame(f),function(){cancelAnimationFrame(l)}}};function Pl(e){"@babel/helpers - typeof";return Pl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Pl(e)}var nme=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function ame(e,t){if(e==null)return{};var r=ime(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function ime(e,t){if(e==null)return{};var r={},n=Object.keys(e),a,i;for(i=0;i<n.length;i++)a=n[i],!(t.indexOf(a)>=0)&&(r[a]=e[a]);return r}function cy(e){return cme(e)||lme(e)||sme(e)||ome()}function ome(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
557In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function sme(e,t){if(e){if(typeof e=="string")return Qb(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Qb(e,t)}}function lme(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function cme(e){if(Array.isArray(e))return Qb(e)}function Qb(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function jN(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function on(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?jN(Object(r),!0).forEach(function(n){Wc(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):jN(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Wc(e,t,r){return t=VI(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ume(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function dme(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,VI(n.key),n)}}function fme(e,t,r){return t&&dme(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function VI(e){var t=hme(e,"string");return Pl(t)==="symbol"?t:String(t)}function hme(e,t){if(Pl(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Pl(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function pme(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Zb(e,t)}function Zb(e,t){return Zb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Zb(e,t)}function mme(e){var t=gme();return function(){var n=Fp(e),a;if(t){var i=Fp(this).constructor;a=Reflect.construct(n,arguments,i)}else a=n.apply(this,arguments);return ex(this,a)}}function ex(e,t){if(t&&(Pl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return tx(e)}function tx(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function gme(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Fp(e){return Fp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Fp(e)}var Mi=function(e){pme(r,e);var t=mme(r);function r(n,a){var i;ume(this,r),i=t.call(this,n,a);var o=i.props,s=o.isActive,l=o.attributeName,c=o.from,d=o.to,f=o.steps,h=o.children,p=o.duration;if(i.handleStyleChange=i.handleStyleChange.bind(tx(i)),i.changeStyle=i.changeStyle.bind(tx(i)),!s||p<=0)return i.state={style:{}},typeof h=="function"&&(i.state={style:d}),ex(i);if(f&&f.length)i.state={style:f[0].style};else if(c){if(typeof h=="function")return i.state={style:c},ex(i);i.state={style:l?Wc({},l,c):c}}else i.state={style:{}};return i}return fme(r,[{key:"componentDidMount",value:function(){var a=this.props,i=a.isActive,o=a.canBegin;this.mounted=!0,!(!i||!o)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(a){var i=this.props,o=i.isActive,s=i.canBegin,l=i.attributeName,c=i.shouldReAnimate,d=i.to,f=i.from,h=this.state.style;if(s){if(!o){var p={style:l?Wc({},l,d):d};this.state&&h&&(l&&h[l]!==d||!l&&h!==d)&&this.setState(p);return}if(!(_pe(a.to,d)&&a.canBegin&&a.isActive)){var g=!a.canBegin||!a.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var m=g||c?f:a.to;if(this.state&&h){var v={style:l?Wc({},l,m):m};(l&&h[l]!==m||!l&&h!==m)&&this.setState(v)}this.runAnimation(on(on({},this.props),{},{from:m,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var a=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),a&&a()}},{key:"handleStyleChange",value:function(a){this.changeStyle(a)}},{key:"changeStyle",value:function(a){this.mounted&&this.setState({style:a})}},{key:"runJSAnimation",value:function(a){var i=this,o=a.from,s=a.to,l=a.duration,c=a.easing,d=a.begin,f=a.onAnimationEnd,h=a.onAnimationStart,p=rme(o,s,qpe(c),l,this.changeStyle),g=function(){i.stopJSAnimation=p()};this.manager.start([h,d,g,l,f])}},{key:"runStepAnimation",value:function(a){var i=this,o=a.steps,s=a.begin,l=a.onAnimationStart,c=o[0],d=c.style,f=c.duration,h=f===void 0?0:f,p=function(m,v,x){if(x===0)return m;var b=v.duration,y=v.easing,S=y===void 0?"ease":y,_=v.style,j=v.properties,k=v.onAnimationEnd,E=x>0?o[x-1]:v,O=j||Object.keys(_);if(typeof S=="function"||S==="spring")return[].concat(cy(m),[i.runJSAnimation.bind(i,{from:E.style,to:_,duration:b,easing:S}),b]);var A=bN(O,b,S),T=on(on(on({},E.style),_),{},{transition:A});return[].concat(cy(m),[T,b,k]).filter(Mpe)};return this.manager.start([l].concat(cy(o.reduce(p,[d,Math.max(h,s)])),[a.onAnimationEnd]))}},{key:"runAnimation",value:function(a){this.manager||(this.manager=Ppe());var i=a.begin,o=a.duration,s=a.attributeName,l=a.to,c=a.easing,d=a.onAnimationStart,f=a.onAnimationEnd,h=a.steps,p=a.children,g=this.manager;if(this.unSubscribe=g.subscribe(this.handleStyleChange),typeof c=="function"||typeof p=="function"||c==="spring"){this.runJSAnimation(a);return}if(h.length>1){this.runStepAnimation(a);return}var m=s?Wc({},s,l):l,v=bN(Object.keys(m),o,c);g.start([d,i,on(on({},m),{},{transition:v}),o,f])}},{key:"render",value:function(){var a=this.props,i=a.children;a.begin;var o=a.duration;a.attributeName,a.easing;var s=a.isActive;a.steps,a.from,a.to,a.canBegin,a.onAnimationEnd,a.shouldReAnimate,a.onAnimationReStart;var l=ame(a,nme),c=w.Children.count(i),d=this.state.style;if(typeof i=="function")return i(d);if(!s||c===0||o<=0)return i;var f=function(p){var g=p.props,m=g.style,v=m===void 0?{}:m,x=g.className,b=w.cloneElement(p,on(on({},l),{},{style:on(on({},v),d),className:x}));return b};return c===1?f(w.Children.only(i)):$.createElement("div",null,w.Children.map(i,function(h){return f(h)}))}}]),r}(w.PureComponent);Mi.displayName="Animate";Mi.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};Mi.propTypes={from:Te.oneOfType([Te.object,Te.string]),to:Te.oneOfType([Te.object,Te.string]),attributeName:Te.string,duration:Te.number,begin:Te.number,easing:Te.oneOfType([Te.string,Te.func]),steps:Te.arrayOf(Te.shape({duration:Te.number.isRequired,style:Te.object.isRequired,easing:Te.oneOfType([Te.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),Te.func]),properties:Te.arrayOf("string"),onAnimationEnd:Te.func})),children:Te.oneOfType([Te.node,Te.func]),isActive:Te.bool,canBegin:Te.bool,onAnimationEnd:Te.func,shouldReAnimate:Te.bool,onAnimationStart:Te.func,onAnimationReStart:Te.func};function dd(e){"@babel/helpers - typeof";return dd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},dd(e)}function Up(){return Up=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Up.apply(this,arguments)}function vme(e,t){return wme(e)||xme(e,t)||bme(e,t)||yme()}function yme(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
558In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function bme(e,t){if(e){if(typeof e=="string")return kN(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return kN(e,t)}}function kN(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function xme(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,s=[],l=!0,c=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(d){c=!0,a=d}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw a}}return s}}function wme(e){if(Array.isArray(e))return e}function EN(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function ON(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?EN(Object(r),!0).forEach(function(n){_me(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):EN(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function _me(e,t,r){return t=Sme(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Sme(e){var t=jme(e,"string");return dd(t)=="symbol"?t:t+""}function jme(e,t){if(dd(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(dd(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var NN=function(t,r,n,a,i){var o=Math.min(Math.abs(n)/2,Math.abs(a)/2),s=a>=0?1:-1,l=n>=0?1:-1,c=a>=0&&n>=0||a<0&&n<0?1:0,d;if(o>0&&i instanceof Array){for(var f=[0,0,0,0],h=0,p=4;h<p;h++)f[h]=i[h]>o?o:i[h];d="M".concat(t,",").concat(r+s*f[0]),f[0]>0&&(d+="A ".concat(f[0],",").concat(f[0],",0,0,").concat(c,",").concat(t+l*f[0],",").concat(r)),d+="L ".concat(t+n-l*f[1],",").concat(r),f[1]>0&&(d+="A ".concat(f[1],",").concat(f[1],",0,0,").concat(c,`,
559        `).concat(t+n,",").concat(r+s*f[1])),d+="L ".concat(t+n,",").concat(r+a-s*f[2]),f[2]>0&&(d+="A ".concat(f[2],",").concat(f[2],",0,0,").concat(c,`,
560        `).concat(t+n-l*f[2],",").concat(r+a)),d+="L ".concat(t+l*f[3],",").concat(r+a),f[3]>0&&(d+="A ".concat(f[3],",").concat(f[3],",0,0,").concat(c,`,
561        `).concat(t,",").concat(r+a-s*f[3])),d+="Z"}else if(o>0&&i===+i&&i>0){var g=Math.min(o,i);d="M ".concat(t,",").concat(r+s*g,`
562            A `).concat(g,",").concat(g,",0,0,").concat(c,",").concat(t+l*g,",").concat(r,`
563            L `).concat(t+n-l*g,",").concat(r,`
564            A `).concat(g,",").concat(g,",0,0,").concat(c,",").concat(t+n,",").concat(r+s*g,`
565            L `).concat(t+n,",").concat(r+a-s*g,`
566            A `).concat(g,",").concat(g,",0,0,").concat(c,",").concat(t+n-l*g,",").concat(r+a,`
567            L `).concat(t+l*g,",").concat(r+a,`
568            A `).concat(g,",").concat(g,",0,0,").concat(c,",").concat(t,",").concat(r+a-s*g," Z")}else d="M ".concat(t,",").concat(r," h ").concat(n," v ").concat(a," h ").concat(-n," Z");return d},kme=function(t,r){if(!t||!r)return!1;var n=t.x,a=t.y,i=r.x,o=r.y,s=r.width,l=r.height;if(Math.abs(s)>0&&Math.abs(l)>0){var c=Math.min(i,i+s),d=Math.max(i,i+s),f=Math.min(o,o+l),h=Math.max(o,o+l);return n>=c&&n<=d&&a>=f&&a<=h}return!1},Eme={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},s_=function(t){var r=ON(ON({},Eme),t),n=w.useRef(),a=w.useState(-1),i=vme(a,2),o=i[0],s=i[1];w.useEffect(function(){if(n.current&&n.current.getTotalLength)try{var S=n.current.getTotalLength();S&&s(S)}catch{}},[]);var l=r.x,c=r.y,d=r.width,f=r.height,h=r.radius,p=r.className,g=r.animationEasing,m=r.animationDuration,v=r.animationBegin,x=r.isAnimationActive,b=r.isUpdateAnimationActive;if(l!==+l||c!==+c||d!==+d||f!==+f||d===0||f===0)return null;var y=ke("recharts-rectangle",p);return b?$.createElement(Mi,{canBegin:o>0,from:{width:d,height:f,x:l,y:c},to:{width:d,height:f,x:l,y:c},duration:m,animationEasing:g,isActive:b},function(S){var _=S.width,j=S.height,k=S.x,E=S.y;return $.createElement(Mi,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:v,duration:m,isActive:x,easing:g},$.createElement("path",Up({},Pe(r,!0),{className:y,d:NN(k,E,_,j,h),ref:n})))}):$.createElement("path",Up({},Pe(r,!0),{className:y,d:NN(l,c,d,f,h)}))};function rx(){return rx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},rx.apply(this,arguments)}var KI=function(t){var r=t.cx,n=t.cy,a=t.r,i=t.className,o=ke("recharts-dot",i);return r===+r&&n===+n&&a===+a?w.createElement("circle",rx({},Pe(t,!1),op(t),{className:o,cx:r,cy:n,r:a})):null};function fd(e){"@babel/helpers - typeof";return fd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fd(e)}var Ome=["x","y","top","left","width","height","className"];function nx(){return nx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},nx.apply(this,arguments)}function PN(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Nme(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?PN(Object(r),!0).forEach(function(n){Pme(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):PN(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Pme(e,t,r){return t=Cme(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Cme(e){var t=Tme(e,"string");return fd(t)=="symbol"?t:t+""}function Tme(e,t){if(fd(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(fd(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ame(e,t){if(e==null)return{};var r=Mme(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Mme(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var $me=function(t,r,n,a,i,o){return"M".concat(t,",").concat(i,"v").concat(a,"M").concat(o,",").concat(r,"h").concat(n)},Rme=function(t){var r=t.x,n=r===void 0?0:r,a=t.y,i=a===void 0?0:a,o=t.top,s=o===void 0?0:o,l=t.left,c=l===void 0?0:l,d=t.width,f=d===void 0?0:d,h=t.height,p=h===void 0?0:h,g=t.className,m=Ame(t,Ome),v=Nme({x:n,y:i,top:s,left:c,width:f,height:p},m);return!Y(n)||!Y(i)||!Y(f)||!Y(p)||!Y(s)||!Y(c)?null:$.createElement("path",nx({},Pe(v,!0),{className:ke("recharts-cross",g),d:$me(n,i,f,p,s,c)}))},Ime=oR,Dme=Ime(Object.getPrototypeOf,Object),Lme=Dme,Bme=Wa,Fme=Lme,Ume=Ha,zme="[object Object]",Wme=Function.prototype,Hme=Object.prototype,GI=Wme.toString,qme=Hme.hasOwnProperty,Vme=GI.call(Object);function Kme(e){if(!Ume(e)||Bme(e)!=zme)return!1;var t=Fme(e);if(t===null)return!0;var r=qme.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&GI.call(r)==Vme}var Gme=Kme;const Yme=Fe(Gme);var Xme=Wa,Jme=Ha,Qme="[object Boolean]";function Zme(e){return e===!0||e===!1||Jme(e)&&Xme(e)==Qme}var ege=Zme;const tge=Fe(ege);function hd(e){"@babel/helpers - typeof";return hd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},hd(e)}function zp(){return zp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},zp.apply(this,arguments)}function rge(e,t){return oge(e)||ige(e,t)||age(e,t)||nge()}function nge(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
569In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function age(e,t){if(e){if(typeof e=="string")return CN(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return CN(e,t)}}function CN(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function ige(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,s=[],l=!0,c=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(d){c=!0,a=d}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw a}}return s}}function oge(e){if(Array.isArray(e))return e}function TN(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function AN(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?TN(Object(r),!0).forEach(function(n){sge(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):TN(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function sge(e,t,r){return t=lge(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function lge(e){var t=cge(e,"string");return hd(t)=="symbol"?t:t+""}function cge(e,t){if(hd(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(hd(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var MN=function(t,r,n,a,i){var o=n-a,s;return s="M ".concat(t,",").concat(r),s+="L ".concat(t+n,",").concat(r),s+="L ".concat(t+n-o/2,",").concat(r+i),s+="L ".concat(t+n-o/2-a,",").concat(r+i),s+="L ".concat(t,",").concat(r," Z"),s},uge={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},dge=function(t){var r=AN(AN({},uge),t),n=w.useRef(),a=w.useState(-1),i=rge(a,2),o=i[0],s=i[1];w.useEffect(function(){if(n.current&&n.current.getTotalLength)try{var y=n.current.getTotalLength();y&&s(y)}catch{}},[]);var l=r.x,c=r.y,d=r.upperWidth,f=r.lowerWidth,h=r.height,p=r.className,g=r.animationEasing,m=r.animationDuration,v=r.animationBegin,x=r.isUpdateAnimationActive;if(l!==+l||c!==+c||d!==+d||f!==+f||h!==+h||d===0&&f===0||h===0)return null;var b=ke("recharts-trapezoid",p);return x?$.createElement(Mi,{canBegin:o>0,from:{upperWidth:0,lowerWidth:0,height:h,x:l,y:c},to:{upperWidth:d,lowerWidth:f,height:h,x:l,y:c},duration:m,animationEasing:g,isActive:x},function(y){var S=y.upperWidth,_=y.lowerWidth,j=y.height,k=y.x,E=y.y;return $.createElement(Mi,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:v,duration:m,easing:g},$.createElement("path",zp({},Pe(r,!0),{className:b,d:MN(k,E,S,_,j),ref:n})))}):$.createElement("g",null,$.createElement("path",zp({},Pe(r,!0),{className:b,d:MN(l,c,d,f,h)})))},fge=["option","shapeType","propTransformer","activeClassName","isActive"];function pd(e){"@babel/helpers - typeof";return pd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pd(e)}function hge(e,t){if(e==null)return{};var r=pge(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function pge(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function $N(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Wp(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?$N(Object(r),!0).forEach(function(n){mge(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$N(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function mge(e,t,r){return t=gge(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function gge(e){var t=vge(e,"string");return pd(t)=="symbol"?t:t+""}function vge(e,t){if(pd(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(pd(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function yge(e,t){return Wp(Wp({},t),e)}function bge(e,t){return e==="symbols"}function RN(e){var t=e.shapeType,r=e.elementProps;switch(t){case"rectangle":return $.createElement(s_,r);case"trapezoid":return $.createElement(dge,r);case"sector":return $.createElement(II,r);case"symbols":if(bge(t))return $.createElement(k1,r);break;default:return null}}function xge(e){return w.isValidElement(e)?e.props:e}function wge(e){var t=e.option,r=e.shapeType,n=e.propTransformer,a=n===void 0?yge:n,i=e.activeClassName,o=i===void 0?"recharts-active-shape":i,s=e.isActive,l=hge(e,fge),c;if(w.isValidElement(t))c=w.cloneElement(t,Wp(Wp({},l),xge(t)));else if(xe(t))c=t(l);else if(Yme(t)&&!tge(t)){var d=a(t,l);c=$.createElement(RN,{shapeType:r,elementProps:d})}else{var f=l;c=$.createElement(RN,{shapeType:r,elementProps:f})}return s?$.createElement(Ot,{className:o},c):c}function Pg(e,t){return t!=null&&"trapezoids"in e.props}function Cg(e,t){return t!=null&&"sectors"in e.props}function md(e,t){return t!=null&&"points"in e.props}function _ge(e,t){var r,n,a=e.x===(t==null||(r=t.labelViewBox)===null||r===void 0?void 0:r.x)||e.x===t.x,i=e.y===(t==null||(n=t.labelViewBox)===null||n===void 0?void 0:n.y)||e.y===t.y;return a&&i}function Sge(e,t){var r=e.endAngle===t.endAngle,n=e.startAngle===t.startAngle;return r&&n}function jge(e,t){var r=e.x===t.x,n=e.y===t.y,a=e.z===t.z;return r&&n&&a}function kge(e,t){var r;return Pg(e,t)?r=_ge:Cg(e,t)?r=Sge:md(e,t)&&(r=jge),r}function Ege(e,t){var r;return Pg(e,t)?r="trapezoids":Cg(e,t)?r="sectors":md(e,t)&&(r="points"),r}function Oge(e,t){if(Pg(e,t)){var r;return(r=t.tooltipPayload)===null||r===void 0||(r=r[0])===null||r===void 0||(r=r.payload)===null||r===void 0?void 0:r.payload}if(Cg(e,t)){var n;return(n=t.tooltipPayload)===null||n===void 0||(n=n[0])===null||n===void 0||(n=n.payload)===null||n===void 0?void 0:n.payload}return md(e,t)?t.payload:{}}function Nge(e){var t=e.activeTooltipItem,r=e.graphicalItem,n=e.itemData,a=Ege(r,t),i=Oge(r,t),o=n.filter(function(l,c){var d=n_(i,l),f=r.props[a].filter(function(g){var m=kge(r,t);return m(g,t)}),h=r.props[a].indexOf(f[f.length-1]),p=c===h;return d&&p}),s=n.indexOf(o[o.length-1]);return s}var Pge=Math.ceil,Cge=Math.max;function Tge(e,t,r,n){for(var a=-1,i=Cge(Pge((t-e)/(r||1)),0),o=Array(i);i--;)o[n?i:++a]=e,e+=r;return o}var Age=Tge,Mge=kR,IN=1/0,$ge=17976931348623157e292;function Rge(e){if(!e)return e===0?e:0;if(e=Mge(e),e===IN||e===-IN){var t=e<0?-1:1;return t*$ge}return e===e?e:0}var YI=Rge,Ige=Age,Dge=vg,uy=YI;function Lge(e){return function(t,r,n){return n&&typeof n!="number"&&Dge(t,r,n)&&(r=n=void 0),t=uy(t),r===void 0?(r=t,t=0):r=uy(r),n=n===void 0?t<r?1:-1:uy(n),Ige(t,r,n,e)}}var Bge=Lge,Fge=Bge,Uge=Fge(),zge=Uge;const Hp=Fe(zge);function gd(e){"@babel/helpers - typeof";return gd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gd(e)}function DN(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function LN(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?DN(Object(r),!0).forEach(function(n){XI(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):DN(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function XI(e,t,r){return t=Wge(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Wge(e){var t=Hge(e,"string");return gd(t)=="symbol"?t:t+""}function Hge(e,t){if(gd(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(gd(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var qge=["Webkit","Moz","O","ms"],Vge=function(t,r){var n=t.replace(/(\w)/,function(i){return i.toUpperCase()}),a=qge.reduce(function(i,o){return LN(LN({},i),{},XI({},o+n,r))},{});return a[t]=r,a};function Cl(e){"@babel/helpers - typeof";return Cl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Cl(e)}function qp(){return qp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},qp.apply(this,arguments)}function BN(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function dy(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?BN(Object(r),!0).forEach(function(n){br(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):BN(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Kge(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function FN(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,QI(n.key),n)}}function Gge(e,t,r){return t&&FN(e.prototype,t),r&&FN(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Yge(e,t,r){return t=Vp(t),Xge(e,JI()?Reflect.construct(t,r||[],Vp(e).constructor):t.apply(e,r))}function Xge(e,t){if(t&&(Cl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Jge(e)}function Jge(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function JI(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(JI=function(){return!!e})()}function Vp(e){return Vp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Vp(e)}function Qge(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ax(e,t)}function ax(e,t){return ax=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},ax(e,t)}function br(e,t,r){return t=QI(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function QI(e){var t=Zge(e,"string");return Cl(t)=="symbol"?t:t+""}function Zge(e,t){if(Cl(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Cl(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var eve=function(t){var r=t.data,n=t.startIndex,a=t.endIndex,i=t.x,o=t.width,s=t.travellerWidth;if(!r||!r.length)return{};var l=r.length,c=au().domain(Hp(0,l)).range([i,i+o-s]),d=c.domain().map(function(f){return c(f)});return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:c(n),endX:c(a),scale:c,scaleValues:d}},UN=function(t){return t.changedTouches&&!!t.changedTouches.length},Tl=function(e){function t(r){var n;return Kge(this,t),n=Yge(this,t,[r]),br(n,"handleDrag",function(a){n.leaveTimer&&(clearTimeout(n.leaveTimer),n.leaveTimer=null),n.state.isTravellerMoving?n.handleTravellerMove(a):n.state.isSlideMoving&&n.handleSlideDrag(a)}),br(n,"handleTouchMove",function(a){a.changedTouches!=null&&a.changedTouches.length>0&&n.handleDrag(a.changedTouches[0])}),br(n,"handleDragEnd",function(){n.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var a=n.props,i=a.endIndex,o=a.onDragEnd,s=a.startIndex;o==null||o({endIndex:i,startIndex:s})}),n.detachDragEndListener()}),br(n,"handleLeaveWrapper",function(){(n.state.isTravellerMoving||n.state.isSlideMoving)&&(n.leaveTimer=window.setTimeout(n.handleDragEnd,n.props.leaveTimeOut))}),br(n,"handleEnterSlideOrTraveller",function(){n.setState({isTextActive:!0})}),br(n,"handleLeaveSlideOrTraveller",function(){n.setState({isTextActive:!1})}),br(n,"handleSlideDragStart",function(a){var i=UN(a)?a.changedTouches[0]:a;n.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:i.pageX}),n.attachDragEndListener()}),n.travellerDragStartHandlers={startX:n.handleTravellerDragStart.bind(n,"startX"),endX:n.handleTravellerDragStart.bind(n,"endX")},n.state={},n}return Qge(t,e),Gge(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(n){var a=n.startX,i=n.endX,o=this.state.scaleValues,s=this.props,l=s.gap,c=s.data,d=c.length-1,f=Math.min(a,i),h=Math.max(a,i),p=t.getIndexInRange(o,f),g=t.getIndexInRange(o,h);return{startIndex:p-p%l,endIndex:g===d?d:g-g%l}}},{key:"getTextOfTick",value:function(n){var a=this.props,i=a.data,o=a.tickFormatter,s=a.dataKey,l=ia(i[n],s,n);return xe(o)?o(l,n):l}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(n){var a=this.state,i=a.slideMoveStartX,o=a.startX,s=a.endX,l=this.props,c=l.x,d=l.width,f=l.travellerWidth,h=l.startIndex,p=l.endIndex,g=l.onChange,m=n.pageX-i;m>0?m=Math.min(m,c+d-f-s,c+d-f-o):m<0&&(m=Math.max(m,c-o,c-s));var v=this.getIndex({startX:o+m,endX:s+m});(v.startIndex!==h||v.endIndex!==p)&&g&&g(v),this.setState({startX:o+m,endX:s+m,slideMoveStartX:n.pageX})}},{key:"handleTravellerDragStart",value:function(n,a){var i=UN(a)?a.changedTouches[0]:a;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:n,brushMoveStartX:i.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(n){var a=this.state,i=a.brushMoveStartX,o=a.movingTravellerId,s=a.endX,l=a.startX,c=this.state[o],d=this.props,f=d.x,h=d.width,p=d.travellerWidth,g=d.onChange,m=d.gap,v=d.data,x={startX:this.state.startX,endX:this.state.endX},b=n.pageX-i;b>0?b=Math.min(b,f+h-p-c):b<0&&(b=Math.max(b,f-c)),x[o]=c+b;var y=this.getIndex(x),S=y.startIndex,_=y.endIndex,j=function(){var E=v.length-1;return o==="startX"&&(s>l?S%m===0:_%m===0)||s<l&&_===E||o==="endX"&&(s>l?_%m===0:S%m===0)||s>l&&_===E};this.setState(br(br({},o,c+b),"brushMoveStartX",n.pageX),function(){g&&j()&&g(y)})}},{key:"handleTravellerMoveKeyboard",value:function(n,a){var i=this,o=this.state,s=o.scaleValues,l=o.startX,c=o.endX,d=this.state[a],f=s.indexOf(d);if(f!==-1){var h=f+n;if(!(h===-1||h>=s.length)){var p=s[h];a==="startX"&&p>=c||a==="endX"&&p<=l||this.setState(br({},a,p),function(){i.props.onChange(i.getIndex({startX:i.state.startX,endX:i.state.endX}))})}}}},{key:"renderBackground",value:function(){var n=this.props,a=n.x,i=n.y,o=n.width,s=n.height,l=n.fill,c=n.stroke;return $.createElement("rect",{stroke:c,fill:l,x:a,y:i,width:o,height:s})}},{key:"renderPanorama",value:function(){var n=this.props,a=n.x,i=n.y,o=n.width,s=n.height,l=n.data,c=n.children,d=n.padding,f=w.Children.only(c);return f?$.cloneElement(f,{x:a,y:i,width:o,height:s,margin:d,compact:!0,data:l}):null}},{key:"renderTravellerLayer",value:function(n,a){var i,o,s=this,l=this.props,c=l.y,d=l.travellerWidth,f=l.height,h=l.traveller,p=l.ariaLabel,g=l.data,m=l.startIndex,v=l.endIndex,x=Math.max(n,this.props.x),b=dy(dy({},Pe(this.props,!1)),{},{x,y:c,width:d,height:f}),y=p||"Min value: ".concat((i=g[m])===null||i===void 0?void 0:i.name,", Max value: ").concat((o=g[v])===null||o===void 0?void 0:o.name);return $.createElement(Ot,{tabIndex:0,role:"slider","aria-label":y,"aria-valuenow":n,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[a],onTouchStart:this.travellerDragStartHandlers[a],onKeyDown:function(_){["ArrowLeft","ArrowRight"].includes(_.key)&&(_.preventDefault(),_.stopPropagation(),s.handleTravellerMoveKeyboard(_.key==="ArrowRight"?1:-1,a))},onFocus:function(){s.setState({isTravellerFocused:!0})},onBlur:function(){s.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(h,b))}},{key:"renderSlide",value:function(n,a){var i=this.props,o=i.y,s=i.height,l=i.stroke,c=i.travellerWidth,d=Math.min(n,a)+c,f=Math.max(Math.abs(a-n)-c,0);return $.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:l,fillOpacity:.2,x:d,y:o,width:f,height:s})}},{key:"renderText",value:function(){var n=this.props,a=n.startIndex,i=n.endIndex,o=n.y,s=n.height,l=n.travellerWidth,c=n.stroke,d=this.state,f=d.startX,h=d.endX,p=5,g={pointerEvents:"none",fill:c};return $.createElement(Ot,{className:"recharts-brush-texts"},$.createElement(wp,qp({textAnchor:"end",verticalAnchor:"middle",x:Math.min(f,h)-p,y:o+s/2},g),this.getTextOfTick(a)),$.createElement(wp,qp({textAnchor:"start",verticalAnchor:"middle",x:Math.max(f,h)+l+p,y:o+s/2},g),this.getTextOfTick(i)))}},{key:"render",value:function(){var n=this.props,a=n.data,i=n.className,o=n.children,s=n.x,l=n.y,c=n.width,d=n.height,f=n.alwaysShowText,h=this.state,p=h.startX,g=h.endX,m=h.isTextActive,v=h.isSlideMoving,x=h.isTravellerMoving,b=h.isTravellerFocused;if(!a||!a.length||!Y(s)||!Y(l)||!Y(c)||!Y(d)||c<=0||d<=0)return null;var y=ke("recharts-brush",i),S=$.Children.count(o)===1,_=Vge("userSelect","none");return $.createElement(Ot,{className:y,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:_},this.renderBackground(),S&&this.renderPanorama(),this.renderSlide(p,g),this.renderTravellerLayer(p,"startX"),this.renderTravellerLayer(g,"endX"),(m||v||x||b||f)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(n){var a=n.x,i=n.y,o=n.width,s=n.height,l=n.stroke,c=Math.floor(i+s/2)-1;return $.createElement($.Fragment,null,$.createElement("rect",{x:a,y:i,width:o,height:s,fill:l,stroke:"none"}),$.createElement("line",{x1:a+1,y1:c,x2:a+o-1,y2:c,fill:"none",stroke:"#fff"}),$.createElement("line",{x1:a+1,y1:c+2,x2:a+o-1,y2:c+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(n,a){var i;return $.isValidElement(n)?i=$.cloneElement(n,a):xe(n)?i=n(a):i=t.renderDefaultTraveller(a),i}},{key:"getDerivedStateFromProps",value:function(n,a){var i=n.data,o=n.width,s=n.x,l=n.travellerWidth,c=n.updateId,d=n.startIndex,f=n.endIndex;if(i!==a.prevData||c!==a.prevUpdateId)return dy({prevData:i,prevTravellerWidth:l,prevUpdateId:c,prevX:s,prevWidth:o},i&&i.length?eve({data:i,width:o,x:s,travellerWidth:l,startIndex:d,endIndex:f}):{scale:null,scaleValues:null});if(a.scale&&(o!==a.prevWidth||s!==a.prevX||l!==a.prevTravellerWidth)){a.scale.range([s,s+o-l]);var h=a.scale.domain().map(function(p){return a.scale(p)});return{prevData:i,prevTravellerWidth:l,prevUpdateId:c,prevX:s,prevWidth:o,startX:a.scale(n.startIndex),endX:a.scale(n.endIndex),scaleValues:h}}return null}},{key:"getIndexInRange",value:function(n,a){for(var i=n.length,o=0,s=i-1;s-o>1;){var l=Math.floor((o+s)/2);n[l]>a?s=l:o=l}return a>=n[s]?s:o}}])}(w.PureComponent);br(Tl,"displayName","Brush");br(Tl,"defaultProps",{height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var tve=A1;function rve(e,t){var r;return tve(e,function(n,a,i){return r=t(n,a,i),!r}),!!r}var nve=rve,ave=Q$,ive=zi,ove=nve,sve=mr,lve=vg;function cve(e,t,r){var n=sve(e)?ave:ove;return r&&lve(e,t,r)&&(t=void 0),n(e,ive(t))}var uve=cve;const dve=Fe(uve);var ra=function(t,r){var n=t.alwaysShow,a=t.ifOverflow;return n&&(a="extendDomain"),a===r},zN=xR;function fve(e,t,r){t=="__proto__"&&zN?zN(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var hve=fve,pve=hve,mve=yR,gve=zi;function vve(e,t){var r={};return t=gve(t),mve(e,function(n,a,i){pve(r,a,t(n,a,i))}),r}var yve=vve;const bve=Fe(yve);function xve(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(!t(e[r],r,e))return!1;return!0}var wve=xve,_ve=A1;function Sve(e,t){var r=!0;return _ve(e,function(n,a,i){return r=!!t(n,a,i),r}),r}var jve=Sve,kve=wve,Eve=jve,Ove=zi,Nve=mr,Pve=vg;function Cve(e,t,r){var n=Nve(e)?kve:Eve;return r&&Pve(e,t,r)&&(t=void 0),n(e,Ove(t))}var Tve=Cve;const ZI=Fe(Tve);var Ave=["x","y"];function vd(e){"@babel/helpers - typeof";return vd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vd(e)}function ix(){return ix=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ix.apply(this,arguments)}function WN(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Rc(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?WN(Object(r),!0).forEach(function(n){Mve(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):WN(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Mve(e,t,r){return t=$ve(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function $ve(e){var t=Rve(e,"string");return vd(t)=="symbol"?t:t+""}function Rve(e,t){if(vd(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(vd(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ive(e,t){if(e==null)return{};var r=Dve(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Dve(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Lve(e,t){var r=e.x,n=e.y,a=Ive(e,Ave),i="".concat(r),o=parseInt(i,10),s="".concat(n),l=parseInt(s,10),c="".concat(t.height||a.height),d=parseInt(c,10),f="".concat(t.width||a.width),h=parseInt(f,10);return Rc(Rc(Rc(Rc(Rc({},t),a),o?{x:o}:{}),l?{y:l}:{}),{},{height:d,width:h,name:t.name,radius:t.radius})}function HN(e){return $.createElement(wge,ix({shapeType:"rectangle",propTransformer:Lve,activeClassName:"recharts-active-bar"},e))}var Bve=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(n,a){if(typeof t=="number")return t;var i=Y(n)||rJ(n);return i?t(n,a):(i||zo(),r)}},Fve=["value","background"],eD;function Al(e){"@babel/helpers - typeof";return Al=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Al(e)}function Uve(e,t){if(e==null)return{};var r=zve(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function zve(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Kp(){return Kp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Kp.apply(this,arguments)}function qN(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function ht(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?qN(Object(r),!0).forEach(function(n){vi(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):qN(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Wve(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function VN(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,rD(n.key),n)}}function Hve(e,t,r){return t&&VN(e.prototype,t),r&&VN(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function qve(e,t,r){return t=Gp(t),Vve(e,tD()?Reflect.construct(t,r||[],Gp(e).constructor):t.apply(e,r))}function Vve(e,t){if(t&&(Al(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Kve(e)}function Kve(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function tD(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(tD=function(){return!!e})()}function Gp(e){return Gp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Gp(e)}function Gve(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ox(e,t)}function ox(e,t){return ox=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},ox(e,t)}function vi(e,t,r){return t=rD(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function rD(e){var t=Yve(e,"string");return Al(t)=="symbol"?t:t+""}function Yve(e,t){if(Al(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Al(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var es=function(e){function t(){var r;Wve(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=qve(this,t,[].concat(a)),vi(r,"state",{isAnimationFinished:!1}),vi(r,"id",ug("recharts-bar-")),vi(r,"handleAnimationEnd",function(){var o=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),o&&o()}),vi(r,"handleAnimationStart",function(){var o=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),o&&o()}),r}return Gve(t,e),Hve(t,[{key:"renderRectanglesStatically",value:function(n){var a=this,i=this.props,o=i.shape,s=i.dataKey,l=i.activeIndex,c=i.activeBar,d=Pe(this.props,!1);return n&&n.map(function(f,h){var p=h===l,g=p?c:o,m=ht(ht(ht({},d),f),{},{isActive:p,option:g,index:h,dataKey:s,onAnimationStart:a.handleAnimationStart,onAnimationEnd:a.handleAnimationEnd});return $.createElement(Ot,Kp({className:"recharts-bar-rectangle"},sp(a.props,f,h),{key:"rectangle-".concat(f==null?void 0:f.x,"-").concat(f==null?void 0:f.y,"-").concat(f==null?void 0:f.value,"-").concat(h)}),$.createElement(HN,m))})}},{key:"renderRectanglesWithAnimation",value:function(){var n=this,a=this.props,i=a.data,o=a.layout,s=a.isAnimationActive,l=a.animationBegin,c=a.animationDuration,d=a.animationEasing,f=a.animationId,h=this.state.prevData;return $.createElement(Mi,{begin:l,duration:c,isActive:s,easing:d,from:{t:0},to:{t:1},key:"bar-".concat(f),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(p){var g=p.t,m=i.map(function(v,x){var b=h&&h[x];if(b){var y=ms(b.x,v.x),S=ms(b.y,v.y),_=ms(b.width,v.width),j=ms(b.height,v.height);return ht(ht({},v),{},{x:y(g),y:S(g),width:_(g),height:j(g)})}if(o==="horizontal"){var k=ms(0,v.height),E=k(g);return ht(ht({},v),{},{y:v.y+v.height-E,height:E})}var O=ms(0,v.width),A=O(g);return ht(ht({},v),{},{width:A})});return $.createElement(Ot,null,n.renderRectanglesStatically(m))})}},{key:"renderRectangles",value:function(){var n=this.props,a=n.data,i=n.isAnimationActive,o=this.state.prevData;return i&&a&&a.length&&(!o||!n_(o,a))?this.renderRectanglesWithAnimation():this.renderRectanglesStatically(a)}},{key:"renderBackground",value:function(){var n=this,a=this.props,i=a.data,o=a.dataKey,s=a.activeIndex,l=Pe(this.props.background,!1);return i.map(function(c,d){c.value;var f=c.background,h=Uve(c,Fve);if(!f)return null;var p=ht(ht(ht(ht(ht({},h),{},{fill:"#eee"},f),l),sp(n.props,c,d)),{},{onAnimationStart:n.handleAnimationStart,onAnimationEnd:n.handleAnimationEnd,dataKey:o,index:d,className:"recharts-bar-background-rectangle"});return $.createElement(HN,Kp({key:"background-bar-".concat(d),option:n.props.background,isActive:d===s},p))})}},{key:"renderErrorBar",value:function(n,a){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var i=this.props,o=i.data,s=i.xAxis,l=i.yAxis,c=i.layout,d=i.children,f=Sn(d,Ng);if(!f)return null;var h=c==="vertical"?o[0].height/2:o[0].width/2,p=function(v,x){var b=Array.isArray(v.value)?v.value[1]:v.value;return{x:v.x,y:v.y,value:b,errorVal:ia(v,x)}},g={clipPath:n?"url(#clipPath-".concat(a,")"):null};return $.createElement(Ot,g,f.map(function(m){return $.cloneElement(m,{key:"error-bar-".concat(a,"-").concat(m.props.dataKey),data:o,xAxis:s,yAxis:l,layout:c,offset:h,dataPointFormatter:p})}))}},{key:"render",value:function(){var n=this.props,a=n.hide,i=n.data,o=n.className,s=n.xAxis,l=n.yAxis,c=n.left,d=n.top,f=n.width,h=n.height,p=n.isAnimationActive,g=n.background,m=n.id;if(a||!i||!i.length)return null;var v=this.state.isAnimationFinished,x=ke("recharts-bar",o),b=s&&s.allowDataOverflow,y=l&&l.allowDataOverflow,S=b||y,_=Ce(m)?this.id:m;return $.createElement(Ot,{className:x},b||y?$.createElement("defs",null,$.createElement("clipPath",{id:"clipPath-".concat(_)},$.createElement("rect",{x:b?c:c-f/2,y:y?d:d-h/2,width:b?f:f*2,height:y?h:h*2}))):null,$.createElement(Ot,{className:"recharts-bar-rectangles",clipPath:S?"url(#clipPath-".concat(_,")"):null},g?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(S,_),(!p||v)&&Eo.renderCallByParent(this.props,i))}}],[{key:"getDerivedStateFromProps",value:function(n,a){return n.animationId!==a.prevAnimationId?{prevAnimationId:n.animationId,curData:n.data,prevData:a.curData}:n.data!==a.curData?{curData:n.data}:null}}])}(w.PureComponent);eD=es;vi(es,"displayName","Bar");vi(es,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!Oi.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"});vi(es,"getComposedData",function(e){var t=e.props,r=e.item,n=e.barPosition,a=e.bandSize,i=e.xAxis,o=e.yAxis,s=e.xAxisTicks,l=e.yAxisTicks,c=e.stackedData,d=e.dataStartIndex,f=e.displayedData,h=e.offset,p=kfe(n,r);if(!p)return null;var g=t.layout,m=r.type.defaultProps,v=m!==void 0?ht(ht({},m),r.props):r.props,x=v.dataKey,b=v.children,y=v.minPointSize,S=g==="horizontal"?o:i,_=c?S.scale.domain():null,j=Mfe({numericAxis:S}),k=Sn(b,OR),E=f.map(function(O,A){var T,N,I,R,D,L;c?T=Efe(c[d+A],_):(T=ia(O,x),Array.isArray(T)||(T=[j,T]));var M=Bve(y,eD.defaultProps.minPointSize)(T[1],A);if(g==="horizontal"){var C,P=[o.scale(T[0]),o.scale(T[1])],B=P[0],U=P[1];N=HO({axis:i,ticks:s,bandSize:a,offset:p.offset,entry:O,index:A}),I=(C=U??B)!==null&&C!==void 0?C:void 0,R=p.size;var F=B-U;if(D=Number.isNaN(F)?0:F,L={x:N,y:o.y,width:R,height:o.height},Math.abs(M)>0&&Math.abs(D)<Math.abs(M)){var V=xn(D||M)*(Math.abs(M)-Math.abs(D));I-=V,D+=V}}else{var J=[i.scale(T[0]),i.scale(T[1])],ue=J[0],_e=J[1];if(N=ue,I=HO({axis:o,ticks:l,bandSize:a,offset:p.offset,entry:O,index:A}),R=_e-ue,D=p.size,L={x:i.x,y:I,width:i.width,height:D},Math.abs(M)>0&&Math.abs(R)<Math.abs(M)){var X=xn(R||M)*(Math.abs(M)-Math.abs(R));R+=X}}return ht(ht(ht({},O),{},{x:N,y:I,width:R,height:D,value:c?T:T[1],payload:O,background:L},k&&k[A]&&k[A].props),{},{tooltipPayload:[MI(r,O)],tooltipPosition:{x:N+R/2,y:I+D/2}})});return ht({data:E,layout:g},h)});function yd(e){"@babel/helpers - typeof";return yd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},yd(e)}function Xve(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function KN(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,nD(n.key),n)}}function Jve(e,t,r){return t&&KN(e.prototype,t),r&&KN(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function GN(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function mn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?GN(Object(r),!0).forEach(function(n){Tg(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):GN(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Tg(e,t,r){return t=nD(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function nD(e){var t=Qve(e,"string");return yd(t)=="symbol"?t:t+""}function Qve(e,t){if(yd(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(yd(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Zve=function(t,r,n,a,i){var o=t.width,s=t.height,l=t.layout,c=t.children,d=Object.keys(r),f={left:n.left,leftMirror:n.left,right:o-n.right,rightMirror:o-n.right,top:n.top,topMirror:n.top,bottom:s-n.bottom,bottomMirror:s-n.bottom},h=!!wr(c,es);return d.reduce(function(p,g){var m=r[g],v=m.orientation,x=m.domain,b=m.padding,y=b===void 0?{}:b,S=m.mirror,_=m.reversed,j="".concat(v).concat(S?"Mirror":""),k,E,O,A,T;if(m.type==="number"&&(m.padding==="gap"||m.padding==="no-gap")){var N=x[1]-x[0],I=1/0,R=m.categoricalDomain.sort(iJ);if(R.forEach(function(J,ue){ue>0&&(I=Math.min((J||0)-(R[ue-1]||0),I))}),Number.isFinite(I)){var D=I/N,L=m.layout==="vertical"?n.height:n.width;if(m.padding==="gap"&&(k=D*L/2),m.padding==="no-gap"){var M=Fo(t.barCategoryGap,D*L),C=D*L/2;k=C-M-(C-M)/L*M}}}a==="xAxis"?E=[n.left+(y.left||0)+(k||0),n.left+n.width-(y.right||0)-(k||0)]:a==="yAxis"?E=l==="horizontal"?[n.top+n.height-(y.bottom||0),n.top+(y.top||0)]:[n.top+(y.top||0)+(k||0),n.top+n.height-(y.bottom||0)-(k||0)]:E=m.range,_&&(E=[E[1],E[0]]);var P=Sfe(m,i,h),B=P.scale,U=P.realScaleType;B.domain(x).range(E),jfe(B);var F=Afe(B,mn(mn({},m),{},{realScaleType:U}));a==="xAxis"?(T=v==="top"&&!S||v==="bottom"&&S,O=n.left,A=f[j]-T*m.height):a==="yAxis"&&(T=v==="left"&&!S||v==="right"&&S,O=f[j]-T*m.width,A=n.top);var V=mn(mn(mn({},m),F),{},{realScaleType:U,x:O,y:A,scale:B,width:a==="xAxis"?n.width:m.width,height:a==="yAxis"?n.height:m.height});return V.bandSize=Rp(V,F),!m.hide&&a==="xAxis"?f[j]+=(T?-1:1)*V.height:m.hide||(f[j]+=(T?-1:1)*V.width),mn(mn({},p),{},Tg({},g,V))},{})},aD=function(t,r){var n=t.x,a=t.y,i=r.x,o=r.y;return{x:Math.min(n,i),y:Math.min(a,o),width:Math.abs(i-n),height:Math.abs(o-a)}},eye=function(t){var r=t.x1,n=t.y1,a=t.x2,i=t.y2;return aD({x:r,y:n},{x:a,y:i})},iD=function(){function e(t){Xve(this,e),this.scale=t}return Jve(e,[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=n.bandAware,i=n.position;if(r!==void 0){if(i)switch(i){case"start":return this.scale(r);case"middle":{var o=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+o}case"end":{var s=this.bandwidth?this.bandwidth():0;return this.scale(r)+s}default:return this.scale(r)}if(a){var l=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+l}return this.scale(r)}}},{key:"isInRange",value:function(r){var n=this.range(),a=n[0],i=n[n.length-1];return a<=i?r>=a&&r<=i:r>=i&&r<=a}}],[{key:"create",value:function(r){return new e(r)}}])}();Tg(iD,"EPS",1e-4);var l_=function(t){var r=Object.keys(t).reduce(function(n,a){return mn(mn({},n),{},Tg({},a,iD.create(t[a])))},{});return mn(mn({},r),{},{apply:function(a){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=i.bandAware,s=i.position;return bve(a,function(l,c){return r[c].apply(l,{bandAware:o,position:s})})},isInRange:function(a){return ZI(a,function(i,o){return r[o].isInRange(i)})}})};function tye(e){return(e%180+180)%180}var rye=function(t){var r=t.width,n=t.height,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,i=tye(a),o=i*Math.PI/180,s=Math.atan(n/r),l=o>s&&o<Math.PI-s?n/Math.sin(o):r/Math.cos(o);return Math.abs(l)},nye=zi,aye=Bd,iye=mg;function oye(e){return function(t,r,n){var a=Object(t);if(!aye(t)){var i=nye(r);t=iye(t),r=function(s){return i(a[s],s,a)}}var o=e(t,r,n);return o>-1?a[i?t[o]:o]:void 0}}var sye=oye,lye=YI;function cye(e){var t=lye(e),r=t%1;return t===t?r?t-r:t:0}var uye=cye,dye=fR,fye=zi,hye=uye,pye=Math.max;function mye(e,t,r){var n=e==null?0:e.length;if(!n)return-1;var a=r==null?0:hye(r);return a<0&&(a=pye(n+a,0)),dye(e,fye(t),a)}var gye=mye,vye=sye,yye=gye,bye=vye(yye),xye=bye;const wye=Fe(xye);var _ye=oX(function(e){return{x:e.left,y:e.top,width:e.width,height:e.height}},function(e){return["l",e.left,"t",e.top,"w",e.width,"h",e.height].join("")}),c_=w.createContext(void 0),u_=w.createContext(void 0),oD=w.createContext(void 0),sD=w.createContext({}),lD=w.createContext(void 0),cD=w.createContext(0),uD=w.createContext(0),YN=function(t){var r=t.state,n=r.xAxisMap,a=r.yAxisMap,i=r.offset,o=t.clipPathId,s=t.children,l=t.width,c=t.height,d=_ye(i);return $.createElement(c_.Provider,{value:n},$.createElement(u_.Provider,{value:a},$.createElement(sD.Provider,{value:i},$.createElement(oD.Provider,{value:d},$.createElement(lD.Provider,{value:o},$.createElement(cD.Provider,{value:c},$.createElement(uD.Provider,{value:l},s)))))))},Sye=function(){return w.useContext(lD)},dD=function(t){var r=w.useContext(c_);r==null&&zo();var n=r[t];return n==null&&zo(),n},jye=function(){var t=w.useContext(c_);return li(t)},kye=function(){var t=w.useContext(u_),r=wye(t,function(n){return ZI(n.domain,Number.isFinite)});return r||li(t)},fD=function(t){var r=w.useContext(u_);r==null&&zo();var n=r[t];return n==null&&zo(),n},Eye=function(){var t=w.useContext(oD);return t},Oye=function(){return w.useContext(sD)},d_=function(){return w.useContext(uD)},f_=function(){return w.useContext(cD)};function Ml(e){"@babel/helpers - typeof";return Ml=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ml(e)}function Nye(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Pye(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,pD(n.key),n)}}function Cye(e,t,r){return t&&Pye(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Tye(e,t,r){return t=Yp(t),Aye(e,hD()?Reflect.construct(t,r||[],Yp(e).constructor):t.apply(e,r))}function Aye(e,t){if(t&&(Ml(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Mye(e)}function Mye(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function hD(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(hD=function(){return!!e})()}function Yp(e){return Yp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Yp(e)}function $ye(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&sx(e,t)}function sx(e,t){return sx=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},sx(e,t)}function XN(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function JN(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?XN(Object(r),!0).forEach(function(n){h_(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):XN(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function h_(e,t,r){return t=pD(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function pD(e){var t=Rye(e,"string");return Ml(t)=="symbol"?t:t+""}function Rye(e,t){if(Ml(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Ml(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Iye(e,t){return Fye(e)||Bye(e,t)||Lye(e,t)||Dye()}function Dye(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
570In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Lye(e,t){if(e){if(typeof e=="string")return QN(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return QN(e,t)}}function QN(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Bye(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,s=[],l=!0,c=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(d){c=!0,a=d}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw a}}return s}}function Fye(e){if(Array.isArray(e))return e}function lx(){return lx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},lx.apply(this,arguments)}var Uye=function(t,r){var n;return $.isValidElement(t)?n=$.cloneElement(t,r):xe(t)?n=t(r):n=$.createElement("line",lx({},r,{className:"recharts-reference-line-line"})),n},zye=function(t,r,n,a,i,o,s,l,c){var d=i.x,f=i.y,h=i.width,p=i.height;if(n){var g=c.y,m=t.y.apply(g,{position:o});if(ra(c,"discard")&&!t.y.isInRange(m))return null;var v=[{x:d+h,y:m},{x:d,y:m}];return l==="left"?v.reverse():v}if(r){var x=c.x,b=t.x.apply(x,{position:o});if(ra(c,"discard")&&!t.x.isInRange(b))return null;var y=[{x:b,y:f+p},{x:b,y:f}];return s==="top"?y.reverse():y}if(a){var S=c.segment,_=S.map(function(j){return t.apply(j,{position:o})});return ra(c,"discard")&&dve(_,function(j){return!t.isInRange(j)})?null:_}return null};function Wye(e){var t=e.x,r=e.y,n=e.segment,a=e.xAxisId,i=e.yAxisId,o=e.shape,s=e.className,l=e.alwaysShow,c=Sye(),d=dD(a),f=fD(i),h=Eye();if(!c||!h)return null;ka(l===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var p=l_({x:d.scale,y:f.scale}),g=_t(t),m=_t(r),v=n&&n.length===2,x=zye(p,g,m,v,h,e.position,d.orientation,f.orientation,e);if(!x)return null;var b=Iye(x,2),y=b[0],S=y.x,_=y.y,j=b[1],k=j.x,E=j.y,O=ra(e,"hidden")?"url(#".concat(c,")"):void 0,A=JN(JN({clipPath:O},Pe(e,!0)),{},{x1:S,y1:_,x2:k,y2:E});return $.createElement(Ot,{className:ke("recharts-reference-line",s)},Uye(o,A),Vt.renderCallByParent(e,eye({x1:S,y1:_,x2:k,y2:E})))}var p_=function(e){function t(){return Nye(this,t),Tye(this,t,arguments)}return $ye(t,e),Cye(t,[{key:"render",value:function(){return $.createElement(Wye,this.props)}}])}($.Component);h_(p_,"displayName","ReferenceLine");h_(p_,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});function cx(){return cx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},cx.apply(this,arguments)}function $l(e){"@babel/helpers - typeof";return $l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$l(e)}function ZN(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function eP(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ZN(Object(r),!0).forEach(function(n){Ag(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ZN(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Hye(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qye(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,gD(n.key),n)}}function Vye(e,t,r){return t&&qye(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Kye(e,t,r){return t=Xp(t),Gye(e,mD()?Reflect.construct(t,r||[],Xp(e).constructor):t.apply(e,r))}function Gye(e,t){if(t&&($l(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Yye(e)}function Yye(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function mD(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(mD=function(){return!!e})()}function Xp(e){return Xp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Xp(e)}function Xye(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ux(e,t)}function ux(e,t){return ux=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},ux(e,t)}function Ag(e,t,r){return t=gD(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function gD(e){var t=Jye(e,"string");return $l(t)=="symbol"?t:t+""}function Jye(e,t){if($l(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if($l(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Qye=function(t){var r=t.x,n=t.y,a=t.xAxis,i=t.yAxis,o=l_({x:a.scale,y:i.scale}),s=o.apply({x:r,y:n},{bandAware:!0});return ra(t,"discard")&&!o.isInRange(s)?null:s},Mg=function(e){function t(){return Hye(this,t),Kye(this,t,arguments)}return Xye(t,e),Vye(t,[{key:"render",value:function(){var n=this.props,a=n.x,i=n.y,o=n.r,s=n.alwaysShow,l=n.clipPathId,c=_t(a),d=_t(i);if(ka(s===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!c||!d)return null;var f=Qye(this.props);if(!f)return null;var h=f.x,p=f.y,g=this.props,m=g.shape,v=g.className,x=ra(this.props,"hidden")?"url(#".concat(l,")"):void 0,b=eP(eP({clipPath:x},Pe(this.props,!0)),{},{cx:h,cy:p});return $.createElement(Ot,{className:ke("recharts-reference-dot",v)},t.renderDot(m,b),Vt.renderCallByParent(this.props,{x:h-o,y:p-o,width:2*o,height:2*o}))}}])}($.Component);Ag(Mg,"displayName","ReferenceDot");Ag(Mg,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1});Ag(Mg,"renderDot",function(e,t){var r;return $.isValidElement(e)?r=$.cloneElement(e,t):xe(e)?r=e(t):r=$.createElement(KI,cx({},t,{cx:t.cx,cy:t.cy,className:"recharts-reference-dot-dot"})),r});function dx(){return dx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},dx.apply(this,arguments)}function Rl(e){"@babel/helpers - typeof";return Rl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Rl(e)}function tP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function rP(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?tP(Object(r),!0).forEach(function(n){$g(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):tP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Zye(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function e0e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,yD(n.key),n)}}function t0e(e,t,r){return t&&e0e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function r0e(e,t,r){return t=Jp(t),n0e(e,vD()?Reflect.construct(t,r||[],Jp(e).constructor):t.apply(e,r))}function n0e(e,t){if(t&&(Rl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return a0e(e)}function a0e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function vD(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(vD=function(){return!!e})()}function Jp(e){return Jp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Jp(e)}function i0e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&fx(e,t)}function fx(e,t){return fx=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},fx(e,t)}function $g(e,t,r){return t=yD(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function yD(e){var t=o0e(e,"string");return Rl(t)=="symbol"?t:t+""}function o0e(e,t){if(Rl(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Rl(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var s0e=function(t,r,n,a,i){var o=i.x1,s=i.x2,l=i.y1,c=i.y2,d=i.xAxis,f=i.yAxis;if(!d||!f)return null;var h=l_({x:d.scale,y:f.scale}),p={x:t?h.x.apply(o,{position:"start"}):h.x.rangeMin,y:n?h.y.apply(l,{position:"start"}):h.y.rangeMin},g={x:r?h.x.apply(s,{position:"end"}):h.x.rangeMax,y:a?h.y.apply(c,{position:"end"}):h.y.rangeMax};return ra(i,"discard")&&(!h.isInRange(p)||!h.isInRange(g))?null:aD(p,g)},Rg=function(e){function t(){return Zye(this,t),r0e(this,t,arguments)}return i0e(t,e),t0e(t,[{key:"render",value:function(){var n=this.props,a=n.x1,i=n.x2,o=n.y1,s=n.y2,l=n.className,c=n.alwaysShow,d=n.clipPathId;ka(c===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var f=_t(a),h=_t(i),p=_t(o),g=_t(s),m=this.props.shape;if(!f&&!h&&!p&&!g&&!m)return null;var v=s0e(f,h,p,g,this.props);if(!v&&!m)return null;var x=ra(this.props,"hidden")?"url(#".concat(d,")"):void 0;return $.createElement(Ot,{className:ke("recharts-reference-area",l)},t.renderRect(m,rP(rP({clipPath:x},Pe(this.props,!0)),v)),Vt.renderCallByParent(this.props,v))}}])}($.Component);$g(Rg,"displayName","ReferenceArea");$g(Rg,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1});$g(Rg,"renderRect",function(e,t){var r;return $.isValidElement(e)?r=$.cloneElement(e,t):xe(e)?r=e(t):r=$.createElement(s_,dx({},t,{className:"recharts-reference-area-rect"})),r});function bD(e,t,r){if(t<1)return[];if(t===1&&r===void 0)return e;for(var n=[],a=0;a<e.length;a+=t)n.push(e[a]);return n}function l0e(e,t,r){var n={width:e.width+t.width,height:e.height+t.height};return rye(n,r)}function c0e(e,t,r){var n=r==="width",a=e.x,i=e.y,o=e.width,s=e.height;return t===1?{start:n?a:i,end:n?a+o:i+s}:{start:n?a+o:i+s,end:n?a:i}}function Qp(e,t,r,n,a){if(e*t<e*n||e*t>e*a)return!1;var i=r();return e*(t-e*i/2-n)>=0&&e*(t+e*i/2-a)<=0}function u0e(e,t){return bD(e,t+1)}function d0e(e,t,r,n,a){for(var i=(n||[]).slice(),o=t.start,s=t.end,l=0,c=1,d=o,f=function(){var g=n==null?void 0:n[l];if(g===void 0)return{v:bD(n,c)};var m=l,v,x=function(){return v===void 0&&(v=r(g,m)),v},b=g.coordinate,y=l===0||Qp(e,b,x,d,s);y||(l=0,d=o,c+=1),y&&(d=b+e*(x()/2+a),l+=c)},h;c<=i.length;)if(h=f(),h)return h.v;return[]}function bd(e){"@babel/helpers - typeof";return bd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bd(e)}function nP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Ht(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?nP(Object(r),!0).forEach(function(n){f0e(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):nP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function f0e(e,t,r){return t=h0e(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function h0e(e){var t=p0e(e,"string");return bd(t)=="symbol"?t:t+""}function p0e(e,t){if(bd(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(bd(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function m0e(e,t,r,n,a){for(var i=(n||[]).slice(),o=i.length,s=t.start,l=t.end,c=function(h){var p=i[h],g,m=function(){return g===void 0&&(g=r(p,h)),g};if(h===o-1){var v=e*(p.coordinate+e*m()/2-l);i[h]=p=Ht(Ht({},p),{},{tickCoord:v>0?p.coordinate-v*e:p.coordinate})}else i[h]=p=Ht(Ht({},p),{},{tickCoord:p.coordinate});var x=Qp(e,p.tickCoord,m,s,l);x&&(l=p.tickCoord-e*(m()/2+a),i[h]=Ht(Ht({},p),{},{isShow:!0}))},d=o-1;d>=0;d--)c(d);return i}function g0e(e,t,r,n,a,i){var o=(n||[]).slice(),s=o.length,l=t.start,c=t.end;if(i){var d=n[s-1],f=r(d,s-1),h=e*(d.coordinate+e*f/2-c);o[s-1]=d=Ht(Ht({},d),{},{tickCoord:h>0?d.coordinate-h*e:d.coordinate});var p=Qp(e,d.tickCoord,function(){return f},l,c);p&&(c=d.tickCoord-e*(f/2+a),o[s-1]=Ht(Ht({},d),{},{isShow:!0}))}for(var g=i?s-1:s,m=function(b){var y=o[b],S,_=function(){return S===void 0&&(S=r(y,b)),S};if(b===0){var j=e*(y.coordinate-e*_()/2-l);o[b]=y=Ht(Ht({},y),{},{tickCoord:j<0?y.coordinate-j*e:y.coordinate})}else o[b]=y=Ht(Ht({},y),{},{tickCoord:y.coordinate});var k=Qp(e,y.tickCoord,_,l,c);k&&(l=y.tickCoord+e*(_()/2+a),o[b]=Ht(Ht({},y),{},{isShow:!0}))},v=0;v<g;v++)m(v);return o}function m_(e,t,r){var n=e.tick,a=e.ticks,i=e.viewBox,o=e.minTickGap,s=e.orientation,l=e.interval,c=e.tickFormatter,d=e.unit,f=e.angle;if(!a||!a.length||!n)return[];if(Y(l)||Oi.isSsr)return u0e(a,typeof l=="number"&&Y(l)?l:0);var h=[],p=s==="top"||s==="bottom"?"width":"height",g=d&&p==="width"?nu(d,{fontSize:t,letterSpacing:r}):{width:0,height:0},m=function(y,S){var _=xe(c)?c(y.value,S):y.value;return p==="width"?l0e(nu(_,{fontSize:t,letterSpacing:r}),g,f):nu(_,{fontSize:t,letterSpacing:r})[p]},v=a.length>=2?xn(a[1].coordinate-a[0].coordinate):1,x=c0e(i,v,p);return l==="equidistantPreserveStart"?d0e(v,x,m,a,o):(l==="preserveStart"||l==="preserveStartEnd"?h=g0e(v,x,m,a,o,l==="preserveStartEnd"):h=m0e(v,x,m,a,o),h.filter(function(b){return b.isShow}))}var v0e=["viewBox"],y0e=["viewBox"],b0e=["ticks"];function Il(e){"@babel/helpers - typeof";return Il=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Il(e)}function Ds(){return Ds=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ds.apply(this,arguments)}function aP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function yt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?aP(Object(r),!0).forEach(function(n){g_(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):aP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function fy(e,t){if(e==null)return{};var r=x0e(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function x0e(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function w0e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function iP(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,wD(n.key),n)}}function _0e(e,t,r){return t&&iP(e.prototype,t),r&&iP(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function S0e(e,t,r){return t=Zp(t),j0e(e,xD()?Reflect.construct(t,r||[],Zp(e).constructor):t.apply(e,r))}function j0e(e,t){if(t&&(Il(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return k0e(e)}function k0e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function xD(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(xD=function(){return!!e})()}function Zp(e){return Zp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Zp(e)}function E0e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&hx(e,t)}function hx(e,t){return hx=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},hx(e,t)}function g_(e,t,r){return t=wD(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function wD(e){var t=O0e(e,"string");return Il(t)=="symbol"?t:t+""}function O0e(e,t){if(Il(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Il(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var fc=function(e){function t(r){var n;return w0e(this,t),n=S0e(this,t,[r]),n.state={fontSize:"",letterSpacing:""},n}return E0e(t,e),_0e(t,[{key:"shouldComponentUpdate",value:function(n,a){var i=n.viewBox,o=fy(n,v0e),s=this.props,l=s.viewBox,c=fy(s,y0e);return!Js(i,l)||!Js(o,c)||!Js(a,this.state)}},{key:"componentDidMount",value:function(){var n=this.layerReference;if(n){var a=n.getElementsByClassName("recharts-cartesian-axis-tick-value")[0];a&&this.setState({fontSize:window.getComputedStyle(a).fontSize,letterSpacing:window.getComputedStyle(a).letterSpacing})}}},{key:"getTickLineCoord",value:function(n){var a=this.props,i=a.x,o=a.y,s=a.width,l=a.height,c=a.orientation,d=a.tickSize,f=a.mirror,h=a.tickMargin,p,g,m,v,x,b,y=f?-1:1,S=n.tickSize||d,_=Y(n.tickCoord)?n.tickCoord:n.coordinate;switch(c){case"top":p=g=n.coordinate,v=o+ +!f*l,m=v-y*S,b=m-y*h,x=_;break;case"left":m=v=n.coordinate,g=i+ +!f*s,p=g-y*S,x=p-y*h,b=_;break;case"right":m=v=n.coordinate,g=i+ +f*s,p=g+y*S,x=p+y*h,b=_;break;default:p=g=n.coordinate,v=o+ +f*l,m=v+y*S,b=m+y*h,x=_;break}return{line:{x1:p,y1:m,x2:g,y2:v},tick:{x,y:b}}}},{key:"getTickTextAnchor",value:function(){var n=this.props,a=n.orientation,i=n.mirror,o;switch(a){case"left":o=i?"start":"end";break;case"right":o=i?"end":"start";break;default:o="middle";break}return o}},{key:"getTickVerticalAnchor",value:function(){var n=this.props,a=n.orientation,i=n.mirror,o="end";switch(a){case"left":case"right":o="middle";break;case"top":o=i?"start":"end";break;default:o=i?"end":"start";break}return o}},{key:"renderAxisLine",value:function(){var n=this.props,a=n.x,i=n.y,o=n.width,s=n.height,l=n.orientation,c=n.mirror,d=n.axisLine,f=yt(yt(yt({},Pe(this.props,!1)),Pe(d,!1)),{},{fill:"none"});if(l==="top"||l==="bottom"){var h=+(l==="top"&&!c||l==="bottom"&&c);f=yt(yt({},f),{},{x1:a,y1:i+h*s,x2:a+o,y2:i+h*s})}else{var p=+(l==="left"&&!c||l==="right"&&c);f=yt(yt({},f),{},{x1:a+p*o,y1:i,x2:a+p*o,y2:i+s})}return $.createElement("line",Ds({},f,{className:ke("recharts-cartesian-axis-line",Vr(d,"className"))}))}},{key:"renderTicks",value:function(n,a,i){var o=this,s=this.props,l=s.tickLine,c=s.stroke,d=s.tick,f=s.tickFormatter,h=s.unit,p=m_(yt(yt({},this.props),{},{ticks:n}),a,i),g=this.getTickTextAnchor(),m=this.getTickVerticalAnchor(),v=Pe(this.props,!1),x=Pe(d,!1),b=yt(yt({},v),{},{fill:"none"},Pe(l,!1)),y=p.map(function(S,_){var j=o.getTickLineCoord(S),k=j.line,E=j.tick,O=yt(yt(yt(yt({textAnchor:g,verticalAnchor:m},v),{},{stroke:"none",fill:c},x),E),{},{index:_,payload:S,visibleTicksCount:p.length,tickFormatter:f});return $.createElement(Ot,Ds({className:"recharts-cartesian-axis-tick",key:"tick-".concat(S.value,"-").concat(S.coordinate,"-").concat(S.tickCoord)},sp(o.props,S,_)),l&&$.createElement("line",Ds({},b,k,{className:ke("recharts-cartesian-axis-tick-line",Vr(l,"className"))})),d&&t.renderTickItem(d,O,"".concat(xe(f)?f(S.value,_):S.value).concat(h||"")))});return $.createElement("g",{className:"recharts-cartesian-axis-ticks"},y)}},{key:"render",value:function(){var n=this,a=this.props,i=a.axisLine,o=a.width,s=a.height,l=a.ticksGenerator,c=a.className,d=a.hide;if(d)return null;var f=this.props,h=f.ticks,p=fy(f,b0e),g=h;return xe(l)&&(g=h&&h.length>0?l(this.props):l(p)),o<=0||s<=0||!g||!g.length?null:$.createElement(Ot,{className:ke("recharts-cartesian-axis",c),ref:function(v){n.layerReference=v}},i&&this.renderAxisLine(),this.renderTicks(g,this.state.fontSize,this.state.letterSpacing),Vt.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(n,a,i){var o,s=ke(a.className,"recharts-cartesian-axis-tick-value");return $.isValidElement(n)?o=$.cloneElement(n,yt(yt({},a),{},{className:s})):xe(n)?o=n(yt(yt({},a),{},{className:s})):o=$.createElement(wp,Ds({},a,{className:"recharts-cartesian-axis-tick-value"}),i),o}}])}(w.Component);g_(fc,"displayName","CartesianAxis");g_(fc,"defaultProps",{x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"});var N0e=["x1","y1","x2","y2","key"],P0e=["offset"];function Wo(e){"@babel/helpers - typeof";return Wo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wo(e)}function oP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Kt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?oP(Object(r),!0).forEach(function(n){C0e(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):oP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function C0e(e,t,r){return t=T0e(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function T0e(e){var t=A0e(e,"string");return Wo(t)=="symbol"?t:t+""}function A0e(e,t){if(Wo(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Wo(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function po(){return po=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},po.apply(this,arguments)}function sP(e,t){if(e==null)return{};var r=M0e(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function M0e(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var $0e=function(t){var r=t.fill;if(!r||r==="none")return null;var n=t.fillOpacity,a=t.x,i=t.y,o=t.width,s=t.height,l=t.ry;return $.createElement("rect",{x:a,y:i,ry:l,width:o,height:s,stroke:"none",fill:r,fillOpacity:n,className:"recharts-cartesian-grid-bg"})};function _D(e,t){var r;if($.isValidElement(e))r=$.cloneElement(e,t);else if(xe(e))r=e(t);else{var n=t.x1,a=t.y1,i=t.x2,o=t.y2,s=t.key,l=sP(t,N0e),c=Pe(l,!1);c.offset;var d=sP(c,P0e);r=$.createElement("line",po({},d,{x1:n,y1:a,x2:i,y2:o,fill:"none",key:s}))}return r}function R0e(e){var t=e.x,r=e.width,n=e.horizontal,a=n===void 0?!0:n,i=e.horizontalPoints;if(!a||!i||!i.length)return null;var o=i.map(function(s,l){var c=Kt(Kt({},e),{},{x1:t,y1:s,x2:t+r,y2:s,key:"line-".concat(l),index:l});return _D(a,c)});return $.createElement("g",{className:"recharts-cartesian-grid-horizontal"},o)}function I0e(e){var t=e.y,r=e.height,n=e.vertical,a=n===void 0?!0:n,i=e.verticalPoints;if(!a||!i||!i.length)return null;var o=i.map(function(s,l){var c=Kt(Kt({},e),{},{x1:s,y1:t,x2:s,y2:t+r,key:"line-".concat(l),index:l});return _D(a,c)});return $.createElement("g",{className:"recharts-cartesian-grid-vertical"},o)}function D0e(e){var t=e.horizontalFill,r=e.fillOpacity,n=e.x,a=e.y,i=e.width,o=e.height,s=e.horizontalPoints,l=e.horizontal,c=l===void 0?!0:l;if(!c||!t||!t.length)return null;var d=s.map(function(h){return Math.round(h+a-a)}).sort(function(h,p){return h-p});a!==d[0]&&d.unshift(0);var f=d.map(function(h,p){var g=!d[p+1],m=g?a+o-h:d[p+1]-h;if(m<=0)return null;var v=p%t.length;return $.createElement("rect",{key:"react-".concat(p),y:h,x:n,height:m,width:i,stroke:"none",fill:t[v],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return $.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},f)}function L0e(e){var t=e.vertical,r=t===void 0?!0:t,n=e.verticalFill,a=e.fillOpacity,i=e.x,o=e.y,s=e.width,l=e.height,c=e.verticalPoints;if(!r||!n||!n.length)return null;var d=c.map(function(h){return Math.round(h+i-i)}).sort(function(h,p){return h-p});i!==d[0]&&d.unshift(0);var f=d.map(function(h,p){var g=!d[p+1],m=g?i+s-h:d[p+1]-h;if(m<=0)return null;var v=p%n.length;return $.createElement("rect",{key:"react-".concat(p),x:h,y:o,width:m,height:l,stroke:"none",fill:n[v],fillOpacity:a,className:"recharts-cartesian-grid-bg"})});return $.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},f)}var B0e=function(t,r){var n=t.xAxis,a=t.width,i=t.height,o=t.offset;return TI(m_(Kt(Kt(Kt({},fc.defaultProps),n),{},{ticks:_a(n,!0),viewBox:{x:0,y:0,width:a,height:i}})),o.left,o.left+o.width,r)},F0e=function(t,r){var n=t.yAxis,a=t.width,i=t.height,o=t.offset;return TI(m_(Kt(Kt(Kt({},fc.defaultProps),n),{},{ticks:_a(n,!0),viewBox:{x:0,y:0,width:a,height:i}})),o.top,o.top+o.height,r)},ys={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function SD(e){var t,r,n,a,i,o,s=d_(),l=f_(),c=Oye(),d=Kt(Kt({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:ys.stroke,fill:(r=e.fill)!==null&&r!==void 0?r:ys.fill,horizontal:(n=e.horizontal)!==null&&n!==void 0?n:ys.horizontal,horizontalFill:(a=e.horizontalFill)!==null&&a!==void 0?a:ys.horizontalFill,vertical:(i=e.vertical)!==null&&i!==void 0?i:ys.vertical,verticalFill:(o=e.verticalFill)!==null&&o!==void 0?o:ys.verticalFill,x:Y(e.x)?e.x:c.left,y:Y(e.y)?e.y:c.top,width:Y(e.width)?e.width:c.width,height:Y(e.height)?e.height:c.height}),f=d.x,h=d.y,p=d.width,g=d.height,m=d.syncWithTicks,v=d.horizontalValues,x=d.verticalValues,b=jye(),y=kye();if(!Y(p)||p<=0||!Y(g)||g<=0||!Y(f)||f!==+f||!Y(h)||h!==+h)return null;var S=d.verticalCoordinatesGenerator||B0e,_=d.horizontalCoordinatesGenerator||F0e,j=d.horizontalPoints,k=d.verticalPoints;if((!j||!j.length)&&xe(_)){var E=v&&v.length,O=_({yAxis:y?Kt(Kt({},y),{},{ticks:E?v:y.ticks}):void 0,width:s,height:l,offset:c},E?!0:m);ka(Array.isArray(O),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(Wo(O),"]")),Array.isArray(O)&&(j=O)}if((!k||!k.length)&&xe(S)){var A=x&&x.length,T=S({xAxis:b?Kt(Kt({},b),{},{ticks:A?x:b.ticks}):void 0,width:s,height:l,offset:c},A?!0:m);ka(Array.isArray(T),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(Wo(T),"]")),Array.isArray(T)&&(k=T)}return $.createElement("g",{className:"recharts-cartesian-grid"},$.createElement($0e,{fill:d.fill,fillOpacity:d.fillOpacity,x:d.x,y:d.y,width:d.width,height:d.height,ry:d.ry}),$.createElement(R0e,po({},d,{offset:c,horizontalPoints:j,xAxis:b,yAxis:y})),$.createElement(I0e,po({},d,{offset:c,verticalPoints:k,xAxis:b,yAxis:y})),$.createElement(D0e,po({},d,{horizontalPoints:j})),$.createElement(L0e,po({},d,{verticalPoints:k})))}SD.displayName="CartesianGrid";function Dl(e){"@babel/helpers - typeof";return Dl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Dl(e)}function U0e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function z0e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,ED(n.key),n)}}function W0e(e,t,r){return t&&z0e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function H0e(e,t,r){return t=em(t),q0e(e,jD()?Reflect.construct(t,r||[],em(e).constructor):t.apply(e,r))}function q0e(e,t){if(t&&(Dl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return V0e(e)}function V0e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function jD(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(jD=function(){return!!e})()}function em(e){return em=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},em(e)}function K0e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&px(e,t)}function px(e,t){return px=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},px(e,t)}function kD(e,t,r){return t=ED(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ED(e){var t=G0e(e,"string");return Dl(t)=="symbol"?t:t+""}function G0e(e,t){if(Dl(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Dl(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function mx(){return mx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},mx.apply(this,arguments)}function Y0e(e){var t=e.xAxisId,r=d_(),n=f_(),a=dD(t);return a==null?null:w.createElement(fc,mx({},a,{className:ke("recharts-".concat(a.axisType," ").concat(a.axisType),a.className),viewBox:{x:0,y:0,width:r,height:n},ticksGenerator:function(o){return _a(o,!0)}}))}var Ig=function(e){function t(){return U0e(this,t),H0e(this,t,arguments)}return K0e(t,e),W0e(t,[{key:"render",value:function(){return w.createElement(Y0e,this.props)}}])}(w.Component);kD(Ig,"displayName","XAxis");kD(Ig,"defaultProps",{allowDecimals:!0,hide:!1,orientation:"bottom",width:0,height:30,mirror:!1,xAxisId:0,tickCount:5,type:"category",padding:{left:0,right:0},allowDataOverflow:!1,scale:"auto",reversed:!1,allowDuplicatedCategory:!0});function Ll(e){"@babel/helpers - typeof";return Ll=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ll(e)}function X0e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function J0e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,PD(n.key),n)}}function Q0e(e,t,r){return t&&J0e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Z0e(e,t,r){return t=tm(t),ebe(e,OD()?Reflect.construct(t,r||[],tm(e).constructor):t.apply(e,r))}function ebe(e,t){if(t&&(Ll(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return tbe(e)}function tbe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function OD(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(OD=function(){return!!e})()}function tm(e){return tm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},tm(e)}function rbe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&gx(e,t)}function gx(e,t){return gx=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},gx(e,t)}function ND(e,t,r){return t=PD(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function PD(e){var t=nbe(e,"string");return Ll(t)=="symbol"?t:t+""}function nbe(e,t){if(Ll(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Ll(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function vx(){return vx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},vx.apply(this,arguments)}var abe=function(t){var r=t.yAxisId,n=d_(),a=f_(),i=fD(r);return i==null?null:w.createElement(fc,vx({},i,{className:ke("recharts-".concat(i.axisType," ").concat(i.axisType),i.className),viewBox:{x:0,y:0,width:n,height:a},ticksGenerator:function(s){return _a(s,!0)}}))},Dg=function(e){function t(){return X0e(this,t),Z0e(this,t,arguments)}return rbe(t,e),Q0e(t,[{key:"render",value:function(){return w.createElement(abe,this.props)}}])}(w.Component);ND(Dg,"displayName","YAxis");ND(Dg,"defaultProps",{allowDuplicatedCategory:!0,allowDecimals:!0,hide:!1,orientation:"left",width:60,height:0,mirror:!1,yAxisId:0,tickCount:5,type:"number",padding:{top:0,bottom:0},allowDataOverflow:!1,scale:"auto",reversed:!1});function lP(e){return lbe(e)||sbe(e)||obe(e)||ibe()}function ibe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
571In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function obe(e,t){if(e){if(typeof e=="string")return yx(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return yx(e,t)}}function sbe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function lbe(e){if(Array.isArray(e))return yx(e)}function yx(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var bx=function(t,r,n,a,i){var o=Sn(t,p_),s=Sn(t,Mg),l=[].concat(lP(o),lP(s)),c=Sn(t,Rg),d="".concat(a,"Id"),f=a[0],h=r;if(l.length&&(h=l.reduce(function(m,v){if(v.props[d]===n&&ra(v.props,"extendDomain")&&Y(v.props[f])){var x=v.props[f];return[Math.min(m[0],x),Math.max(m[1],x)]}return m},h)),c.length){var p="".concat(f,"1"),g="".concat(f,"2");h=c.reduce(function(m,v){if(v.props[d]===n&&ra(v.props,"extendDomain")&&Y(v.props[p])&&Y(v.props[g])){var x=v.props[p],b=v.props[g];return[Math.min(m[0],x,b),Math.max(m[1],x,b)]}return m},h)}return i&&i.length&&(h=i.reduce(function(m,v){return Y(v)?[Math.min(m[0],v),Math.max(m[1],v)]:m},h)),h},CD={exports:{}};(function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function a(l,c,d){this.fn=l,this.context=c,this.once=d||!1}function i(l,c,d,f,h){if(typeof d!="function")throw new TypeError("The listener must be a function");var p=new a(d,f||l,h),g=r?r+c:c;return l._events[g]?l._events[g].fn?l._events[g]=[l._events[g],p]:l._events[g].push(p):(l._events[g]=p,l._eventsCount++),l}function o(l,c){--l._eventsCount===0?l._events=new n:delete l._events[c]}function s(){this._events=new n,this._eventsCount=0}s.prototype.eventNames=function(){var c=[],d,f;if(this._eventsCount===0)return c;for(f in d=this._events)t.call(d,f)&&c.push(r?f.slice(1):f);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(d)):c},s.prototype.listeners=function(c){var d=r?r+c:c,f=this._events[d];if(!f)return[];if(f.fn)return[f.fn];for(var h=0,p=f.length,g=new Array(p);h<p;h++)g[h]=f[h].fn;return g},s.prototype.listenerCount=function(c){var d=r?r+c:c,f=this._events[d];return f?f.fn?1:f.length:0},s.prototype.emit=function(c,d,f,h,p,g){var m=r?r+c:c;if(!this._events[m])return!1;var v=this._events[m],x=arguments.length,b,y;if(v.fn){switch(v.once&&this.removeListener(c,v.fn,void 0,!0),x){case 1:return v.fn.call(v.context),!0;case 2:return v.fn.call(v.context,d),!0;case 3:return v.fn.call(v.context,d,f),!0;case 4:return v.fn.call(v.context,d,f,h),!0;case 5:return v.fn.call(v.context,d,f,h,p),!0;case 6:return v.fn.call(v.context,d,f,h,p,g),!0}for(y=1,b=new Array(x-1);y<x;y++)b[y-1]=arguments[y];v.fn.apply(v.context,b)}else{var S=v.length,_;for(y=0;y<S;y++)switch(v[y].once&&this.removeListener(c,v[y].fn,void 0,!0),x){case 1:v[y].fn.call(v[y].context);break;case 2:v[y].fn.call(v[y].context,d);break;case 3:v[y].fn.call(v[y].context,d,f);break;case 4:v[y].fn.call(v[y].context,d,f,h);break;default:if(!b)for(_=1,b=new Array(x-1);_<x;_++)b[_-1]=arguments[_];v[y].fn.apply(v[y].context,b)}}return!0},s.prototype.on=function(c,d,f){return i(this,c,d,f,!1)},s.prototype.once=function(c,d,f){return i(this,c,d,f,!0)},s.prototype.removeListener=function(c,d,f,h){var p=r?r+c:c;if(!this._events[p])return this;if(!d)return o(this,p),this;var g=this._events[p];if(g.fn)g.fn===d&&(!h||g.once)&&(!f||g.context===f)&&o(this,p);else{for(var m=0,v=[],x=g.length;m<x;m++)(g[m].fn!==d||h&&!g[m].once||f&&g[m].context!==f)&&v.push(g[m]);v.length?this._events[p]=v.length===1?v[0]:v:o(this,p)}return this},s.prototype.removeAllListeners=function(c){var d;return c?(d=r?r+c:c,this._events[d]&&o(this,d)):(this._events=new n,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=r,s.EventEmitter=s,e.exports=s})(CD);var cbe=CD.exports;const ube=Fe(cbe);var hy=new ube,py="recharts.syncMouseEvents";function xd(e){"@babel/helpers - typeof";return xd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xd(e)}function dbe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function fbe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,TD(n.key),n)}}function hbe(e,t,r){return t&&fbe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function my(e,t,r){return t=TD(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function TD(e){var t=pbe(e,"string");return xd(t)=="symbol"?t:t+""}function pbe(e,t){if(xd(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(xd(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var mbe=function(){function e(){dbe(this,e),my(this,"activeIndex",0),my(this,"coordinateList",[]),my(this,"layout","horizontal")}return hbe(e,[{key:"setDetails",value:function(r){var n,a=r.coordinateList,i=a===void 0?null:a,o=r.container,s=o===void 0?null:o,l=r.layout,c=l===void 0?null:l,d=r.offset,f=d===void 0?null:d,h=r.mouseHandlerCallback,p=h===void 0?null:h;this.coordinateList=(n=i??this.coordinateList)!==null&&n!==void 0?n:[],this.container=s??this.container,this.layout=c??this.layout,this.offset=f??this.offset,this.mouseHandlerCallback=p??this.mouseHandlerCallback,this.activeIndex=Math.min(Math.max(this.activeIndex,0),this.coordinateList.length-1)}},{key:"focus",value:function(){this.spoofMouse()}},{key:"keyboardEvent",value:function(r){if(this.coordinateList.length!==0)switch(r.key){case"ArrowRight":{if(this.layout!=="horizontal")return;this.activeIndex=Math.min(this.activeIndex+1,this.coordinateList.length-1),this.spoofMouse();break}case"ArrowLeft":{if(this.layout!=="horizontal")return;this.activeIndex=Math.max(this.activeIndex-1,0),this.spoofMouse();break}}}},{key:"setIndex",value:function(r){this.activeIndex=r}},{key:"spoofMouse",value:function(){var r,n;if(this.layout==="horizontal"&&this.coordinateList.length!==0){var a=this.container.getBoundingClientRect(),i=a.x,o=a.y,s=a.height,l=this.coordinateList[this.activeIndex].coordinate,c=((r=window)===null||r===void 0?void 0:r.scrollX)||0,d=((n=window)===null||n===void 0?void 0:n.scrollY)||0,f=i+l+c,h=o+this.offset.top+s/2+d;this.mouseHandlerCallback({pageX:f,pageY:h})}}}])}();function gbe(e,t,r){if(r==="number"&&t===!0&&Array.isArray(e)){var n=e==null?void 0:e[0],a=e==null?void 0:e[1];if(n&&a&&Y(n)&&Y(a))return!0}return!1}function vbe(e,t,r,n){var a=n/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-a:r.left+.5,y:e==="horizontal"?r.top+.5:t.y-a,width:e==="horizontal"?n:r.width-1,height:e==="horizontal"?r.height-1:n}}function AD(e){var t=e.cx,r=e.cy,n=e.radius,a=e.startAngle,i=e.endAngle,o=It(t,r,n,a),s=It(t,r,n,i);return{points:[o,s],cx:t,cy:r,radius:n,startAngle:a,endAngle:i}}function ybe(e,t,r){var n,a,i,o;if(e==="horizontal")n=t.x,i=n,a=r.top,o=r.top+r.height;else if(e==="vertical")a=t.y,o=a,n=r.left,i=r.left+r.width;else if(t.cx!=null&&t.cy!=null)if(e==="centric"){var s=t.cx,l=t.cy,c=t.innerRadius,d=t.outerRadius,f=t.angle,h=It(s,l,c,f),p=It(s,l,d,f);n=h.x,a=h.y,i=p.x,o=p.y}else return AD(t);return[{x:n,y:a},{x:i,y:o}]}function wd(e){"@babel/helpers - typeof";return wd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},wd(e)}function cP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Gf(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?cP(Object(r),!0).forEach(function(n){bbe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):cP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function bbe(e,t,r){return t=xbe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function xbe(e){var t=wbe(e,"string");return wd(t)=="symbol"?t:t+""}function wbe(e,t){if(wd(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(wd(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function _be(e){var t,r,n=e.element,a=e.tooltipEventType,i=e.isActive,o=e.activeCoordinate,s=e.activePayload,l=e.offset,c=e.activeTooltipIndex,d=e.tooltipAxisBandSize,f=e.layout,h=e.chartName,p=(t=n.props.cursor)!==null&&t!==void 0?t:(r=n.type.defaultProps)===null||r===void 0?void 0:r.cursor;if(!n||!p||!i||!o||h!=="ScatterChart"&&a!=="axis")return null;var g,m=oN;if(h==="ScatterChart")g=o,m=Rme;else if(h==="BarChart")g=vbe(f,o,l,d),m=s_;else if(f==="radial"){var v=AD(o),x=v.cx,b=v.cy,y=v.radius,S=v.startAngle,_=v.endAngle;g={cx:x,cy:b,startAngle:S,endAngle:_,innerRadius:y,outerRadius:y},m=II}else g={points:ybe(f,o,l)},m=oN;var j=Gf(Gf(Gf(Gf({stroke:"#ccc",pointerEvents:"none"},l),g),Pe(p,!1)),{},{payload:s,payloadIndex:c,className:ke("recharts-tooltip-cursor",p.className)});return w.isValidElement(p)?w.cloneElement(p,j):w.createElement(m,j)}var Sbe=["item"],jbe=["children","className","width","height","style","compact","title","desc"];function Bl(e){"@babel/helpers - typeof";return Bl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bl(e)}function Ls(){return Ls=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ls.apply(this,arguments)}function uP(e,t){return Obe(e)||Ebe(e,t)||$D(e,t)||kbe()}function kbe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
572In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ebe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,s=[],l=!0,c=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(d){c=!0,a=d}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw a}}return s}}function Obe(e){if(Array.isArray(e))return e}function dP(e,t){if(e==null)return{};var r=Nbe(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Nbe(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Pbe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Cbe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,RD(n.key),n)}}function Tbe(e,t,r){return t&&Cbe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Abe(e,t,r){return t=rm(t),Mbe(e,MD()?Reflect.construct(t,r||[],rm(e).constructor):t.apply(e,r))}function Mbe(e,t){if(t&&(Bl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return $be(e)}function $be(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function MD(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(MD=function(){return!!e})()}function rm(e){return rm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},rm(e)}function Rbe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&xx(e,t)}function xx(e,t){return xx=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},xx(e,t)}function Fl(e){return Lbe(e)||Dbe(e)||$D(e)||Ibe()}function Ibe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
573In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $D(e,t){if(e){if(typeof e=="string")return wx(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return wx(e,t)}}function Dbe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Lbe(e){if(Array.isArray(e))return wx(e)}function wx(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function fP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function W(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?fP(Object(r),!0).forEach(function(n){le(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):fP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function le(e,t,r){return t=RD(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function RD(e){var t=Bbe(e,"string");return Bl(t)=="symbol"?t:t+""}function Bbe(e,t){if(Bl(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Bl(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Fbe={xAxis:["bottom","top"],yAxis:["left","right"]},Ube={width:"100%",height:"100%"},ID={x:0,y:0};function Yf(e){return e}var zbe=function(t,r){return r==="horizontal"?t.x:r==="vertical"?t.y:r==="centric"?t.angle:t.radius},Wbe=function(t,r,n,a){var i=r.find(function(d){return d&&d.index===n});if(i){if(t==="horizontal")return{x:i.coordinate,y:a.y};if(t==="vertical")return{x:a.x,y:i.coordinate};if(t==="centric"){var o=i.coordinate,s=a.radius;return W(W(W({},a),It(a.cx,a.cy,s,o)),{},{angle:o,radius:s})}var l=i.coordinate,c=a.angle;return W(W(W({},a),It(a.cx,a.cy,l,c)),{},{angle:c,radius:l})}return ID},Lg=function(t,r){var n=r.graphicalItems,a=r.dataStartIndex,i=r.dataEndIndex,o=(n??[]).reduce(function(s,l){var c=l.props.data;return c&&c.length?[].concat(Fl(s),Fl(c)):s},[]);return o.length>0?o:t&&t.length&&Y(a)&&Y(i)?t.slice(a,i+1):[]};function DD(e){return e==="number"?[0,"auto"]:void 0}var _x=function(t,r,n,a){var i=t.graphicalItems,o=t.tooltipAxis,s=Lg(r,t);return n<0||!i||!i.length||n>=s.length?null:i.reduce(function(l,c){var d,f=(d=c.props.data)!==null&&d!==void 0?d:r;f&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=n&&(f=f.slice(t.dataStartIndex,t.dataEndIndex+1));var h;if(o.dataKey&&!o.allowDuplicatedCategory){var p=f===void 0?s:f;h=tb(p,o.dataKey,a)}else h=f&&f[n]||s[n];return h?[].concat(Fl(l),[MI(c,h)]):l},[])},hP=function(t,r,n,a){var i=a||{x:t.chartX,y:t.chartY},o=zbe(i,n),s=t.orderedTooltipTicks,l=t.tooltipAxis,c=t.tooltipTicks,d=vfe(o,s,c,l);if(d>=0&&c){var f=c[d]&&c[d].value,h=_x(t,r,d,f),p=Wbe(n,s,d,i);return{activeTooltipIndex:d,activeLabel:f,activePayload:h,activeCoordinate:p}}return null},Hbe=function(t,r){var n=r.axes,a=r.graphicalItems,i=r.axisType,o=r.axisIdKey,s=r.stackGroups,l=r.dataStartIndex,c=r.dataEndIndex,d=t.layout,f=t.children,h=t.stackOffset,p=CI(d,i);return n.reduce(function(g,m){var v,x=m.type.defaultProps!==void 0?W(W({},m.type.defaultProps),m.props):m.props,b=x.type,y=x.dataKey,S=x.allowDataOverflow,_=x.allowDuplicatedCategory,j=x.scale,k=x.ticks,E=x.includeHidden,O=x[o];if(g[O])return g;var A=Lg(t.data,{graphicalItems:a.filter(function(F){var V,J=o in F.props?F.props[o]:(V=F.type.defaultProps)===null||V===void 0?void 0:V[o];return J===O}),dataStartIndex:l,dataEndIndex:c}),T=A.length,N,I,R;gbe(x.domain,S,b)&&(N=zb(x.domain,null,S),p&&(b==="number"||j!=="auto")&&(R=iu(A,y,"category")));var D=DD(b);if(!N||N.length===0){var L,M=(L=x.domain)!==null&&L!==void 0?L:D;if(y){if(N=iu(A,y,b),b==="category"&&p){var C=aJ(N);_&&C?(I=N,N=Hp(0,T)):_||(N=KO(M,N,m).reduce(function(F,V){return F.indexOf(V)>=0?F:[].concat(Fl(F),[V])},[]))}else if(b==="category")_?N=N.filter(function(F){return F!==""&&!Ce(F)}):N=KO(M,N,m).reduce(function(F,V){return F.indexOf(V)>=0||V===""||Ce(V)?F:[].concat(Fl(F),[V])},[]);else if(b==="number"){var P=_fe(A,a.filter(function(F){var V,J,ue=o in F.props?F.props[o]:(V=F.type.defaultProps)===null||V===void 0?void 0:V[o],_e="hide"in F.props?F.props.hide:(J=F.type.defaultProps)===null||J===void 0?void 0:J.hide;return ue===O&&(E||!_e)}),y,i,d);P&&(N=P)}p&&(b==="number"||j!=="auto")&&(R=iu(A,y,"category"))}else p?N=Hp(0,T):s&&s[O]&&s[O].hasStack&&b==="number"?N=h==="expand"?[0,1]:AI(s[O].stackGroups,l,c):N=PI(A,a.filter(function(F){var V=o in F.props?F.props[o]:F.type.defaultProps[o],J="hide"in F.props?F.props.hide:F.type.defaultProps.hide;return V===O&&(E||!J)}),b,d,!0);if(b==="number")N=bx(f,N,O,i,k),M&&(N=zb(M,N,S));else if(b==="category"&&M){var B=M,U=N.every(function(F){return B.indexOf(F)>=0});U&&(N=B)}}return W(W({},g),{},le({},O,W(W({},x),{},{axisType:i,domain:N,categoricalDomain:R,duplicateDomain:I,originalDomain:(v=x.domain)!==null&&v!==void 0?v:D,isCategorical:p,layout:d})))},{})},qbe=function(t,r){var n=r.graphicalItems,a=r.Axis,i=r.axisType,o=r.axisIdKey,s=r.stackGroups,l=r.dataStartIndex,c=r.dataEndIndex,d=t.layout,f=t.children,h=Lg(t.data,{graphicalItems:n,dataStartIndex:l,dataEndIndex:c}),p=h.length,g=CI(d,i),m=-1;return n.reduce(function(v,x){var b=x.type.defaultProps!==void 0?W(W({},x.type.defaultProps),x.props):x.props,y=b[o],S=DD("number");if(!v[y]){m++;var _;return g?_=Hp(0,p):s&&s[y]&&s[y].hasStack?(_=AI(s[y].stackGroups,l,c),_=bx(f,_,y,i)):(_=zb(S,PI(h,n.filter(function(j){var k,E,O=o in j.props?j.props[o]:(k=j.type.defaultProps)===null||k===void 0?void 0:k[o],A="hide"in j.props?j.props.hide:(E=j.type.defaultProps)===null||E===void 0?void 0:E.hide;return O===y&&!A}),"number",d),a.defaultProps.allowDataOverflow),_=bx(f,_,y,i)),W(W({},v),{},le({},y,W(W({axisType:i},a.defaultProps),{},{hide:!0,orientation:Vr(Fbe,"".concat(i,".").concat(m%2),null),domain:_,originalDomain:S,isCategorical:g,layout:d})))}return v},{})},Vbe=function(t,r){var n=r.axisType,a=n===void 0?"xAxis":n,i=r.AxisComp,o=r.graphicalItems,s=r.stackGroups,l=r.dataStartIndex,c=r.dataEndIndex,d=t.children,f="".concat(a,"Id"),h=Sn(d,i),p={};return h&&h.length?p=Hbe(t,{axes:h,graphicalItems:o,axisType:a,axisIdKey:f,stackGroups:s,dataStartIndex:l,dataEndIndex:c}):o&&o.length&&(p=qbe(t,{Axis:i,graphicalItems:o,axisType:a,axisIdKey:f,stackGroups:s,dataStartIndex:l,dataEndIndex:c})),p},Kbe=function(t){var r=li(t),n=_a(r,!1,!0);return{tooltipTicks:n,orderedTooltipTicks:M1(n,function(a){return a.coordinate}),tooltipAxis:r,tooltipAxisBandSize:Rp(r,n)}},pP=function(t){var r=t.children,n=t.defaultShowTooltip,a=wr(r,Tl),i=0,o=0;return t.data&&t.data.length!==0&&(o=t.data.length-1),a&&a.props&&(a.props.startIndex>=0&&(i=a.props.startIndex),a.props.endIndex>=0&&(o=a.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:i,dataEndIndex:o,activeTooltipIndex:-1,isTooltipActive:!!n}},Gbe=function(t){return!t||!t.length?!1:t.some(function(r){var n=ja(r&&r.type);return n&&n.indexOf("Bar")>=0})},mP=function(t){return t==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:t==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:t==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},Ybe=function(t,r){var n=t.props,a=t.graphicalItems,i=t.xAxisMap,o=i===void 0?{}:i,s=t.yAxisMap,l=s===void 0?{}:s,c=n.width,d=n.height,f=n.children,h=n.margin||{},p=wr(f,Tl),g=wr(f,Qs),m=Object.keys(l).reduce(function(_,j){var k=l[j],E=k.orientation;return!k.mirror&&!k.hide?W(W({},_),{},le({},E,_[E]+k.width)):_},{left:h.left||0,right:h.right||0}),v=Object.keys(o).reduce(function(_,j){var k=o[j],E=k.orientation;return!k.mirror&&!k.hide?W(W({},_),{},le({},E,Vr(_,"".concat(E))+k.height)):_},{top:h.top||0,bottom:h.bottom||0}),x=W(W({},v),m),b=x.bottom;p&&(x.bottom+=p.props.height||Tl.defaultProps.height),g&&r&&(x=xfe(x,a,n,r));var y=c-x.left-x.right,S=d-x.top-x.bottom;return W(W({brushBottom:b},x),{},{width:Math.max(y,0),height:Math.max(S,0)})},Xbe=function(t,r){if(r==="xAxis")return t[r].width;if(r==="yAxis")return t[r].height},Jbe=function(t){var r=t.chartName,n=t.GraphicalChild,a=t.defaultTooltipEventType,i=a===void 0?"axis":a,o=t.validateTooltipEventTypes,s=o===void 0?["axis"]:o,l=t.axisComponents,c=t.legendContent,d=t.formatAxisMap,f=t.defaultProps,h=function(x,b){var y=b.graphicalItems,S=b.stackGroups,_=b.offset,j=b.updateId,k=b.dataStartIndex,E=b.dataEndIndex,O=x.barSize,A=x.layout,T=x.barGap,N=x.barCategoryGap,I=x.maxBarSize,R=mP(A),D=R.numericAxisName,L=R.cateAxisName,M=Gbe(y),C=[];return y.forEach(function(P,B){var U=Lg(x.data,{graphicalItems:[P],dataStartIndex:k,dataEndIndex:E}),F=P.type.defaultProps!==void 0?W(W({},P.type.defaultProps),P.props):P.props,V=F.dataKey,J=F.maxBarSize,ue=F["".concat(D,"Id")],_e=F["".concat(L,"Id")],X={},he=l.reduce(function(vr,Mn){var Zr=b["".concat(Mn.axisType,"Map")],Gd=F["".concat(Mn.axisType,"Id")];Zr&&Zr[Gd]||Mn.axisType==="zAxis"||zo();var Yd=Zr[Gd];return W(W({},vr),{},le(le({},Mn.axisType,Yd),"".concat(Mn.axisType,"Ticks"),_a(Yd)))},X),K=he[L],Z=he["".concat(L,"Ticks")],Q=S&&S[ue]&&S[ue].hasStack&&$fe(P,S[ue].stackGroups),z=ja(P.type).indexOf("Bar")>=0,be=Rp(K,Z),fe=[],Ue=M&&yfe({barSize:O,stackGroups:S,totalSize:Xbe(he,L)});if(z){var De,it,nr=Ce(J)?I:J,gr=(De=(it=Rp(K,Z,!0))!==null&&it!==void 0?it:nr)!==null&&De!==void 0?De:0;fe=bfe({barGap:T,barCategoryGap:N,bandSize:gr!==be?gr:be,sizeList:Ue[_e],maxBarSize:nr}),gr!==be&&(fe=fe.map(function(vr){return W(W({},vr),{},{position:W(W({},vr.position),{},{offset:vr.position.offset-gr/2})})}))}var Ki=P&&P.type&&P.type.getComposedData;Ki&&C.push({props:W(W({},Ki(W(W({},he),{},{displayedData:U,props:x,dataKey:V,item:P,bandSize:be,barPosition:fe,offset:_,stackedData:Q,layout:A,dataStartIndex:k,dataEndIndex:E}))),{},le(le(le({key:P.key||"item-".concat(B)},D,he[D]),L,he[L]),"animationId",j)),childIndex:gJ(P,x.children),item:P})}),C},p=function(x,b){var y=x.props,S=x.dataStartIndex,_=x.dataEndIndex,j=x.updateId;if(!Uk({props:y}))return null;var k=y.children,E=y.layout,O=y.stackOffset,A=y.data,T=y.reverseStackOrder,N=mP(E),I=N.numericAxisName,R=N.cateAxisName,D=Sn(k,n),L=Tfe(A,D,"".concat(I,"Id"),"".concat(R,"Id"),O,T),M=l.reduce(function(F,V){var J="".concat(V.axisType,"Map");return W(W({},F),{},le({},J,Vbe(y,W(W({},V),{},{graphicalItems:D,stackGroups:V.axisType===I&&L,dataStartIndex:S,dataEndIndex:_}))))},{}),C=Ybe(W(W({},M),{},{props:y,graphicalItems:D}),b==null?void 0:b.legendBBox);Object.keys(M).forEach(function(F){M[F]=d(y,M[F],C,F.replace("Map",""),r)});var P=M["".concat(R,"Map")],B=Kbe(P),U=h(y,W(W({},M),{},{dataStartIndex:S,dataEndIndex:_,updateId:j,graphicalItems:D,stackGroups:L,offset:C}));return W(W({formattedGraphicalItems:U,graphicalItems:D,offset:C,stackGroups:L},B),M)},g=function(v){function x(b){var y,S,_;return Pbe(this,x),_=Abe(this,x,[b]),le(_,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),le(_,"accessibilityManager",new mbe),le(_,"handleLegendBBoxUpdate",function(j){if(j){var k=_.state,E=k.dataStartIndex,O=k.dataEndIndex,A=k.updateId;_.setState(W({legendBBox:j},p({props:_.props,dataStartIndex:E,dataEndIndex:O,updateId:A},W(W({},_.state),{},{legendBBox:j}))))}}),le(_,"handleReceiveSyncEvent",function(j,k,E){if(_.props.syncId===j){if(E===_.eventEmitterSymbol&&typeof _.props.syncMethod!="function")return;_.applySyncEvent(k)}}),le(_,"handleBrushChange",function(j){var k=j.startIndex,E=j.endIndex;if(k!==_.state.dataStartIndex||E!==_.state.dataEndIndex){var O=_.state.updateId;_.setState(function(){return W({dataStartIndex:k,dataEndIndex:E},p({props:_.props,dataStartIndex:k,dataEndIndex:E,updateId:O},_.state))}),_.triggerSyncEvent({dataStartIndex:k,dataEndIndex:E})}}),le(_,"handleMouseEnter",function(j){var k=_.getMouseInfo(j);if(k){var E=W(W({},k),{},{isTooltipActive:!0});_.setState(E),_.triggerSyncEvent(E);var O=_.props.onMouseEnter;xe(O)&&O(E,j)}}),le(_,"triggeredAfterMouseMove",function(j){var k=_.getMouseInfo(j),E=k?W(W({},k),{},{isTooltipActive:!0}):{isTooltipActive:!1};_.setState(E),_.triggerSyncEvent(E);var O=_.props.onMouseMove;xe(O)&&O(E,j)}),le(_,"handleItemMouseEnter",function(j){_.setState(function(){return{isTooltipActive:!0,activeItem:j,activePayload:j.tooltipPayload,activeCoordinate:j.tooltipPosition||{x:j.cx,y:j.cy}}})}),le(_,"handleItemMouseLeave",function(){_.setState(function(){return{isTooltipActive:!1}})}),le(_,"handleMouseMove",function(j){j.persist(),_.throttleTriggeredAfterMouseMove(j)}),le(_,"handleMouseLeave",function(j){_.throttleTriggeredAfterMouseMove.cancel();var k={isTooltipActive:!1};_.setState(k),_.triggerSyncEvent(k);var E=_.props.onMouseLeave;xe(E)&&E(k,j)}),le(_,"handleOuterEvent",function(j){var k=mJ(j),E=Vr(_.props,"".concat(k));if(k&&xe(E)){var O,A;/.*touch.*/i.test(k)?A=_.getMouseInfo(j.changedTouches[0]):A=_.getMouseInfo(j),E((O=A)!==null&&O!==void 0?O:{},j)}}),le(_,"handleClick",function(j){var k=_.getMouseInfo(j);if(k){var E=W(W({},k),{},{isTooltipActive:!0});_.setState(E),_.triggerSyncEvent(E);var O=_.props.onClick;xe(O)&&O(E,j)}}),le(_,"handleMouseDown",function(j){var k=_.props.onMouseDown;if(xe(k)){var E=_.getMouseInfo(j);k(E,j)}}),le(_,"handleMouseUp",function(j){var k=_.props.onMouseUp;if(xe(k)){var E=_.getMouseInfo(j);k(E,j)}}),le(_,"handleTouchMove",function(j){j.changedTouches!=null&&j.changedTouches.length>0&&_.throttleTriggeredAfterMouseMove(j.changedTouches[0])}),le(_,"handleTouchStart",function(j){j.changedTouches!=null&&j.changedTouches.length>0&&_.handleMouseDown(j.changedTouches[0])}),le(_,"handleTouchEnd",function(j){j.changedTouches!=null&&j.changedTouches.length>0&&_.handleMouseUp(j.changedTouches[0])}),le(_,"handleDoubleClick",function(j){var k=_.props.onDoubleClick;if(xe(k)){var E=_.getMouseInfo(j);k(E,j)}}),le(_,"handleContextMenu",function(j){var k=_.props.onContextMenu;if(xe(k)){var E=_.getMouseInfo(j);k(E,j)}}),le(_,"triggerSyncEvent",function(j){_.props.syncId!==void 0&&hy.emit(py,_.props.syncId,j,_.eventEmitterSymbol)}),le(_,"applySyncEvent",function(j){var k=_.props,E=k.layout,O=k.syncMethod,A=_.state.updateId,T=j.dataStartIndex,N=j.dataEndIndex;if(j.dataStartIndex!==void 0||j.dataEndIndex!==void 0)_.setState(W({dataStartIndex:T,dataEndIndex:N},p({props:_.props,dataStartIndex:T,dataEndIndex:N,updateId:A},_.state)));else if(j.activeTooltipIndex!==void 0){var I=j.chartX,R=j.chartY,D=j.activeTooltipIndex,L=_.state,M=L.offset,C=L.tooltipTicks;if(!M)return;if(typeof O=="function")D=O(C,j);else if(O==="value"){D=-1;for(var P=0;P<C.length;P++)if(C[P].value===j.activeLabel){D=P;break}}var B=W(W({},M),{},{x:M.left,y:M.top}),U=Math.min(I,B.x+B.width),F=Math.min(R,B.y+B.height),V=C[D]&&C[D].value,J=_x(_.state,_.props.data,D),ue=C[D]?{x:E==="horizontal"?C[D].coordinate:U,y:E==="horizontal"?F:C[D].coordinate}:ID;_.setState(W(W({},j),{},{activeLabel:V,activeCoordinate:ue,activePayload:J,activeTooltipIndex:D}))}else _.setState(j)}),le(_,"renderCursor",function(j){var k,E=_.state,O=E.isTooltipActive,A=E.activeCoordinate,T=E.activePayload,N=E.offset,I=E.activeTooltipIndex,R=E.tooltipAxisBandSize,D=_.getTooltipEventType(),L=(k=j.props.active)!==null&&k!==void 0?k:O,M=_.props.layout,C=j.key||"_recharts-cursor";return $.createElement(_be,{key:C,activeCoordinate:A,activePayload:T,activeTooltipIndex:I,chartName:r,element:j,isActive:L,layout:M,offset:N,tooltipAxisBandSize:R,tooltipEventType:D})}),le(_,"renderPolarAxis",function(j,k,E){var O=Vr(j,"type.axisType"),A=Vr(_.state,"".concat(O,"Map")),T=j.type.defaultProps,N=T!==void 0?W(W({},T),j.props):j.props,I=A&&A[N["".concat(O,"Id")]];return w.cloneElement(j,W(W({},I),{},{className:ke(O,I.className),key:j.key||"".concat(k,"-").concat(E),ticks:_a(I,!0)}))}),le(_,"renderPolarGrid",function(j){var k=j.props,E=k.radialLines,O=k.polarAngles,A=k.polarRadius,T=_.state,N=T.radiusAxisMap,I=T.angleAxisMap,R=li(N),D=li(I),L=D.cx,M=D.cy,C=D.innerRadius,P=D.outerRadius;return w.cloneElement(j,{polarAngles:Array.isArray(O)?O:_a(D,!0).map(function(B){return B.coordinate}),polarRadius:Array.isArray(A)?A:_a(R,!0).map(function(B){return B.coordinate}),cx:L,cy:M,innerRadius:C,outerRadius:P,key:j.key||"polar-grid",radialLines:E})}),le(_,"renderLegend",function(){var j=_.state.formattedGraphicalItems,k=_.props,E=k.children,O=k.width,A=k.height,T=_.props.margin||{},N=O-(T.left||0)-(T.right||0),I=OI({children:E,formattedGraphicalItems:j,legendWidth:N,legendContent:c});if(!I)return null;var R=I.item,D=dP(I,Sbe);return w.cloneElement(R,W(W({},D),{},{chartWidth:O,chartHeight:A,margin:T,onBBoxUpdate:_.handleLegendBBoxUpdate}))}),le(_,"renderTooltip",function(){var j,k=_.props,E=k.children,O=k.accessibilityLayer,A=wr(E,Ln);if(!A)return null;var T=_.state,N=T.isTooltipActive,I=T.activeCoordinate,R=T.activePayload,D=T.activeLabel,L=T.offset,M=(j=A.props.active)!==null&&j!==void 0?j:N;return w.cloneElement(A,{viewBox:W(W({},L),{},{x:L.left,y:L.top}),active:M,label:D,payload:M?R:[],coordinate:I,accessibilityLayer:O})}),le(_,"renderBrush",function(j){var k=_.props,E=k.margin,O=k.data,A=_.state,T=A.offset,N=A.dataStartIndex,I=A.dataEndIndex,R=A.updateId;return w.cloneElement(j,{key:j.key||"_recharts-brush",onChange:Hf(_.handleBrushChange,j.props.onChange),data:O,x:Y(j.props.x)?j.props.x:T.left,y:Y(j.props.y)?j.props.y:T.top+T.height+T.brushBottom-(E.bottom||0),width:Y(j.props.width)?j.props.width:T.width,startIndex:N,endIndex:I,updateId:"brush-".concat(R)})}),le(_,"renderReferenceElement",function(j,k,E){if(!j)return null;var O=_,A=O.clipPathId,T=_.state,N=T.xAxisMap,I=T.yAxisMap,R=T.offset,D=j.type.defaultProps||{},L=j.props,M=L.xAxisId,C=M===void 0?D.xAxisId:M,P=L.yAxisId,B=P===void 0?D.yAxisId:P;return w.cloneElement(j,{key:j.key||"".concat(k,"-").concat(E),xAxis:N[C],yAxis:I[B],viewBox:{x:R.left,y:R.top,width:R.width,height:R.height},clipPathId:A})}),le(_,"renderActivePoints",function(j){var k=j.item,E=j.activePoint,O=j.basePoint,A=j.childIndex,T=j.isRange,N=[],I=k.props.key,R=k.item.type.defaultProps!==void 0?W(W({},k.item.type.defaultProps),k.item.props):k.item.props,D=R.activeDot,L=R.dataKey,M=W(W({index:A,dataKey:L,cx:E.x,cy:E.y,r:4,fill:o_(k.item),strokeWidth:2,stroke:"#fff",payload:E.payload,value:E.value},Pe(D,!1)),op(D));return N.push(x.renderActiveDot(D,M,"".concat(I,"-activePoint-").concat(A))),O?N.push(x.renderActiveDot(D,W(W({},M),{},{cx:O.x,cy:O.y}),"".concat(I,"-basePoint-").concat(A))):T&&N.push(null),N}),le(_,"renderGraphicChild",function(j,k,E){var O=_.filterFormatItem(j,k,E);if(!O)return null;var A=_.getTooltipEventType(),T=_.state,N=T.isTooltipActive,I=T.tooltipAxis,R=T.activeTooltipIndex,D=T.activeLabel,L=_.props.children,M=wr(L,Ln),C=O.props,P=C.points,B=C.isRange,U=C.baseLine,F=O.item.type.defaultProps!==void 0?W(W({},O.item.type.defaultProps),O.item.props):O.item.props,V=F.activeDot,J=F.hide,ue=F.activeBar,_e=F.activeShape,X=!!(!J&&N&&M&&(V||ue||_e)),he={};A!=="axis"&&M&&M.props.trigger==="click"?he={onClick:Hf(_.handleItemMouseEnter,j.props.onClick)}:A!=="axis"&&(he={onMouseLeave:Hf(_.handleItemMouseLeave,j.props.onMouseLeave),onMouseEnter:Hf(_.handleItemMouseEnter,j.props.onMouseEnter)});var K=w.cloneElement(j,W(W({},O.props),he));function Z(Mn){return typeof I.dataKey=="function"?I.dataKey(Mn.payload):null}if(X)if(R>=0){var Q,z;if(I.dataKey&&!I.allowDuplicatedCategory){var be=typeof I.dataKey=="function"?Z:"payload.".concat(I.dataKey.toString());Q=tb(P,be,D),z=B&&U&&tb(U,be,D)}else Q=P==null?void 0:P[R],z=B&&U&&U[R];if(_e||ue){var fe=j.props.activeIndex!==void 0?j.props.activeIndex:R;return[w.cloneElement(j,W(W(W({},O.props),he),{},{activeIndex:fe})),null,null]}if(!Ce(Q))return[K].concat(Fl(_.renderActivePoints({item:O,activePoint:Q,basePoint:z,childIndex:R,isRange:B})))}else{var Ue,De=(Ue=_.getItemByXY(_.state.activeCoordinate))!==null&&Ue!==void 0?Ue:{graphicalItem:K},it=De.graphicalItem,nr=it.item,gr=nr===void 0?j:nr,Ki=it.childIndex,vr=W(W(W({},O.props),he),{},{activeIndex:Ki});return[w.cloneElement(gr,vr),null,null]}return B?[K,null,null]:[K,null]}),le(_,"renderCustomized",function(j,k,E){return w.cloneElement(j,W(W({key:"recharts-customized-".concat(E)},_.props),_.state))}),le(_,"renderMap",{CartesianGrid:{handler:Yf,once:!0},ReferenceArea:{handler:_.renderReferenceElement},ReferenceLine:{handler:Yf},ReferenceDot:{handler:_.renderReferenceElement},XAxis:{handler:Yf},YAxis:{handler:Yf},Brush:{handler:_.renderBrush,once:!0},Bar:{handler:_.renderGraphicChild},Line:{handler:_.renderGraphicChild},Area:{handler:_.renderGraphicChild},Radar:{handler:_.renderGraphicChild},RadialBar:{handler:_.renderGraphicChild},Scatter:{handler:_.renderGraphicChild},Pie:{handler:_.renderGraphicChild},Funnel:{handler:_.renderGraphicChild},Tooltip:{handler:_.renderCursor,once:!0},PolarGrid:{handler:_.renderPolarGrid,once:!0},PolarAngleAxis:{handler:_.renderPolarAxis},PolarRadiusAxis:{handler:_.renderPolarAxis},Customized:{handler:_.renderCustomized}}),_.clipPathId="".concat((y=b.id)!==null&&y!==void 0?y:ug("recharts"),"-clip"),_.throttleTriggeredAfterMouseMove=ER(_.triggeredAfterMouseMove,(S=b.throttleDelay)!==null&&S!==void 0?S:1e3/60),_.state={},_}return Rbe(x,v),Tbe(x,[{key:"componentDidMount",value:function(){var y,S;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(y=this.props.margin.left)!==null&&y!==void 0?y:0,top:(S=this.props.margin.top)!==null&&S!==void 0?S:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var y=this.props,S=y.children,_=y.data,j=y.height,k=y.layout,E=wr(S,Ln);if(E){var O=E.props.defaultIndex;if(!(typeof O!="number"||O<0||O>this.state.tooltipTicks.length-1)){var A=this.state.tooltipTicks[O]&&this.state.tooltipTicks[O].value,T=_x(this.state,_,O,A),N=this.state.tooltipTicks[O].coordinate,I=(this.state.offset.top+j)/2,R=k==="horizontal",D=R?{x:N,y:I}:{y:N,x:I},L=this.state.formattedGraphicalItems.find(function(C){var P=C.item;return P.type.name==="Scatter"});L&&(D=W(W({},D),L.props.points[O].tooltipPosition),T=L.props.points[O].tooltipPayload);var M={activeTooltipIndex:O,isTooltipActive:!0,activeLabel:A,activePayload:T,activeCoordinate:D};this.setState(M),this.renderCursor(E),this.accessibilityManager.setIndex(O)}}}},{key:"getSnapshotBeforeUpdate",value:function(y,S){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==S.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==y.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==y.margin){var _,j;this.accessibilityManager.setDetails({offset:{left:(_=this.props.margin.left)!==null&&_!==void 0?_:0,top:(j=this.props.margin.top)!==null&&j!==void 0?j:0}})}return null}},{key:"componentDidUpdate",value:function(y){nb([wr(y.children,Ln)],[wr(this.props.children,Ln)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var y=wr(this.props.children,Ln);if(y&&typeof y.props.shared=="boolean"){var S=y.props.shared?"axis":"item";return s.indexOf(S)>=0?S:i}return i}},{key:"getMouseInfo",value:function(y){if(!this.container)return null;var S=this.container,_=S.getBoundingClientRect(),j=Wse(_),k={chartX:Math.round(y.pageX-j.left),chartY:Math.round(y.pageY-j.top)},E=_.width/S.offsetWidth||1,O=this.inRange(k.chartX,k.chartY,E);if(!O)return null;var A=this.state,T=A.xAxisMap,N=A.yAxisMap,I=this.getTooltipEventType(),R=hP(this.state,this.props.data,this.props.layout,O);if(I!=="axis"&&T&&N){var D=li(T).scale,L=li(N).scale,M=D&&D.invert?D.invert(k.chartX):null,C=L&&L.invert?L.invert(k.chartY):null;return W(W({},k),{},{xValue:M,yValue:C},R)}return R?W(W({},k),R):null}},{key:"inRange",value:function(y,S){var _=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,j=this.props.layout,k=y/_,E=S/_;if(j==="horizontal"||j==="vertical"){var O=this.state.offset,A=k>=O.left&&k<=O.left+O.width&&E>=O.top&&E<=O.top+O.height;return A?{x:k,y:E}:null}var T=this.state,N=T.angleAxisMap,I=T.radiusAxisMap;if(N&&I){var R=li(N);return XO({x:k,y:E},R)}return null}},{key:"parseEventsOfWrapper",value:function(){var y=this.props.children,S=this.getTooltipEventType(),_=wr(y,Ln),j={};_&&S==="axis"&&(_.props.trigger==="click"?j={onClick:this.handleClick}:j={onMouseEnter:this.handleMouseEnter,onDoubleClick:this.handleDoubleClick,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onContextMenu:this.handleContextMenu});var k=op(this.props,this.handleOuterEvent);return W(W({},k),j)}},{key:"addListener",value:function(){hy.on(py,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){hy.removeListener(py,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(y,S,_){for(var j=this.state.formattedGraphicalItems,k=0,E=j.length;k<E;k++){var O=j[k];if(O.item===y||O.props.key===y.key||S===ja(O.item.type)&&_===O.childIndex)return O}return null}},{key:"renderClipPath",value:function(){var y=this.clipPathId,S=this.state.offset,_=S.left,j=S.top,k=S.height,E=S.width;return $.createElement("defs",null,$.createElement("clipPath",{id:y},$.createElement("rect",{x:_,y:j,height:k,width:E})))}},{key:"getXScales",value:function(){var y=this.state.xAxisMap;return y?Object.entries(y).reduce(function(S,_){var j=uP(_,2),k=j[0],E=j[1];return W(W({},S),{},le({},k,E.scale))},{}):null}},{key:"getYScales",value:function(){var y=this.state.yAxisMap;return y?Object.entries(y).reduce(function(S,_){var j=uP(_,2),k=j[0],E=j[1];return W(W({},S),{},le({},k,E.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(y){var S;return(S=this.state.xAxisMap)===null||S===void 0||(S=S[y])===null||S===void 0?void 0:S.scale}},{key:"getYScaleByAxisId",value:function(y){var S;return(S=this.state.yAxisMap)===null||S===void 0||(S=S[y])===null||S===void 0?void 0:S.scale}},{key:"getItemByXY",value:function(y){var S=this.state,_=S.formattedGraphicalItems,j=S.activeItem;if(_&&_.length)for(var k=0,E=_.length;k<E;k++){var O=_[k],A=O.props,T=O.item,N=T.type.defaultProps!==void 0?W(W({},T.type.defaultProps),T.props):T.props,I=ja(T.type);if(I==="Bar"){var R=(A.data||[]).find(function(C){return kme(y,C)});if(R)return{graphicalItem:O,payload:R}}else if(I==="RadialBar"){var D=(A.data||[]).find(function(C){return XO(y,C)});if(D)return{graphicalItem:O,payload:D}}else if(Pg(O,j)||Cg(O,j)||md(O,j)){var L=Nge({graphicalItem:O,activeTooltipItem:j,itemData:N.data}),M=N.activeIndex===void 0?L:N.activeIndex;return{graphicalItem:W(W({},O),{},{childIndex:M}),payload:md(O,j)?N.data[L]:O.props.data[L]}}}return null}},{key:"render",value:function(){var y=this;if(!Uk(this))return null;var S=this.props,_=S.children,j=S.className,k=S.width,E=S.height,O=S.style,A=S.compact,T=S.title,N=S.desc,I=dP(S,jbe),R=Pe(I,!1);if(A)return $.createElement(YN,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},$.createElement(ib,Ls({},R,{width:k,height:E,title:T,desc:N}
573),this.renderClipPath(),Wk(_,this.renderMap)));if(this.props.accessibilityLayer){var D,L;R.tabIndex=(D=this.props.tabIndex)!==null&&D!==void 0?D:0,R.role=(L=this.props.role)!==null&&L!==void 0?L:"application",R.onKeyDown=function(C){y.accessibilityManager.keyboardEvent(C)},R.onFocus=function(){y.accessibilityManager.focus()}}var M=this.parseEventsOfWrapper();return $.createElement(YN,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},$.createElement("div",Ls({className:ke("recharts-wrapper",j),style:W({position:"relative",cursor:"default",width:k,height:E},O)},M,{ref:function(P){y.container=P}}),$.createElement(ib,Ls({},R,{width:k,height:E,title:T,desc:N,style:Ube}),this.renderClipPath(),Wk(_,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])}(w.Component);le(g,"displayName",r),le(g,"defaultProps",W({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},f)),le(g,"getDerivedStateFromProps",function(v,x){var b=v.dataKey,y=v.data,S=v.children,_=v.width,j=v.height,k=v.layout,E=v.stackOffset,O=v.margin,A=x.dataStartIndex,T=x.dataEndIndex;if(x.updateId===void 0){var N=pP(v);return W(W(W({},N),{},{updateId:0},p(W(W({props:v},N),{},{updateId:0}),x)),{},{prevDataKey:b,prevData:y,prevWidth:_,prevHeight:j,prevLayout:k,prevStackOffset:E,prevMargin:O,prevChildren:S})}if(b!==x.prevDataKey||y!==x.prevData||_!==x.prevWidth||j!==x.prevHeight||k!==x.prevLayout||E!==x.prevStackOffset||!Js(O,x.prevMargin)){var I=pP(v),R={chartX:x.chartX,chartY:x.chartY,isTooltipActive:x.isTooltipActive},D=W(W({},hP(x,y,k)),{},{updateId:x.updateId+1}),L=W(W(W({},I),R),D);return W(W(W({},L),p(W({props:v},L),x)),{},{prevDataKey:b,prevData:y,prevWidth:_,prevHeight:j,prevLayout:k,prevStackOffset:E,prevMargin:O,prevChildren:S})}if(!nb(S,x.prevChildren)){var M,C,P,B,U=wr(S,Tl),F=U&&(M=(C=U.props)===null||C===void 0?void 0:C.startIndex)!==null&&M!==void 0?M:A,V=U&&(P=(B=U.props)===null||B===void 0?void 0:B.endIndex)!==null&&P!==void 0?P:T,J=F!==A||V!==T,ue=!Ce(y),_e=ue&&!J?x.updateId:x.updateId+1;return W(W({updateId:_e},p(W(W({props:v},x),{},{updateId:_e,dataStartIndex:F,dataEndIndex:V}),x)),{},{prevChildren:S,dataStartIndex:F,dataEndIndex:V})}return null}),le(g,"renderActiveDot",function(v,x,b){var y;return w.isValidElement(v)?y=w.cloneElement(v,x):xe(v)?y=v(x):y=$.createElement(KI,x),$.createElement(Ot,{className:"recharts-active-dot",key:b},y)});var m=w.forwardRef(function(x,b){return $.createElement(g,Ls({},x,{ref:b}))});return m.displayName=g.displayName,m},Qbe=Jbe({chartName:"BarChart",GraphicalChild:es,defaultTooltipEventType:"axis",validateTooltipEventTypes:["axis","item"],axisComponents:[{axisType:"xAxis",AxisComp:Ig},{axisType:"yAxis",AxisComp:Dg}],formatAxisMap:Zve});const gy=[{key:"matematica",label:"Matemática"},{key:"ciencias-natureza",label:"Ciências da Natureza"},{key:"ciencias-humanas",label:"Ciências Humanas"},{key:"linguagens",label:"Linguagens"}],Zbe=[5,10,15,20],exe=[{key:"any",label:"Todas"},{key:"facil",label:"Fácil"},{key:"medio",label:"Médio"},{key:"dificil",label:"Difícil"}],txe=["logaritmo","exponencial","matriz","determinante","trigonom","vetor","probabilidade condicional","binomial","poisson","derivada","integral","estequiometria","termodinâmica","eletromagn","cinética","equilíbrio","geopolítica","epistemolog","dialética","hermenêutica","metalinguagem","intertextualidade","denotativo","conotativo"];function rxe(e){var d;const t=(e.context??"").toLowerCase(),r=(e.alternativesIntroduction??"").toLowerCase(),n=e.alternatives.map(f=>f.text??"").join(" ").toLowerCase(),a=`${t} ${r} ${n}`,i=a.trim().split(/\s+/).filter(Boolean).length,o=(((d=e.files)==null?void 0:d.length)??0)>0||e.alternatives.some(f=>!!f.file),s=txe.reduce((f,h)=>f+(a.includes(h)?1:0),0),l=(a.match(/\b\w{12,}\b/g)??[]).length;let c=0;return i>350?c+=3:i>200?c+=2:i>120&&(c+=1),o&&(c+=1),c+=Math.min(s*2,4),l>8?c+=2:l>4&&(c+=1),c>=6?"dificil":c>=3?"medio":"facil"}const vy={facil:{label:"Fácil",color:"bg-teal/10 text-teal border-teal/40",Icon:iF},medio:{label:"Médio",color:"bg-gold/10 text-gold border-gold/40",Icon:Yo},dificil:{label:"Difícil",color:"bg-pink/10 text-pink border-pink/40",Icon:eF}},nxe=()=>{var T;const{user:e}=Pt(),t=w.useMemo(()=>{const N=["any"];for(let I=2023;I>=2009;I--)N.push(I);return N},[]),[r,n]=w.useState("matematica"),[a,i]=w.useState("any"),[o,s]=w.useState(10),[l,c]=w.useState("any"),[d,f]=w.useState(!1),[h,p]=w.useState([]),[g,m]=w.useState(0),[v,x]=w.useState({}),[b,y]=w.useState(!1),[S,_]=w.useState(null),[j,k]=w.useState([]);w.useEffect(()=>{e&&(async()=>{const{data:N}=await ae.from("simulado_attempts").select("id, discipline, year, total_questions, correct_answers, created_at").eq("user_id",e.id).order("created_at",{ascending:!1}).limit(20);N&&k(N)})()},[e,b]);const E=async()=>{var N;f(!0),p([]),x({}),m(0),y(!1);try{const I=a==="any"?String(2009+Math.floor(Math.random()*15)):a,R=Math.min(l==="any"?o*2+5:o*4,45),D=`https://laphjllsupmdkevxqgqg.supabase.co/functions/v1/enem-questions?action=questions&year=${I}&discipline=${r}&limit=${R}`,L=await fetch(D,{headers:{apikey:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImxhcGhqbGxzdXBtZGtldnhxZ3FnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NzY3MzU4NDEsImV4cCI6MjA5MjMxMTg0MX0.RK9TU1eSl8_Mi6qYNbULWgrSPe29HstVVa_sw7emSUI"}}),M=await L.json();if(!L.ok||!((N=M.questions)!=null&&N.length))throw new Error(M.error||"Não foi possível carregar questões");const P=M.questions.map(F=>({...F,difficulty:rxe(F)})).filter(F=>F.discipline===r),U=(l==="any"?P:P.filter(F=>F.difficulty===l)).slice(0,o);if(U.length===0)throw new Error(l==="any"?"Nenhuma questão foi carregada. Tente outro ano ou matéria.":`Nenhuma questão de nível "${l}" foi encontrada nessa amostra. Tente outro ano ou outro nível.`);
573U.length<o&&ve.info(`Encontramos apenas ${U.length} de ${o} questões nessa amostra.`),p(U),_(Date.now())}catch(I){ve.error("Erro ao carregar questões",{description:I instanceof Error?I.message:"Tente outro ano ou matéria."})}finally{f(!1)}},O=async()=>{if(!e)return;const N=h.reduce((R,D)=>R+(v[D.index]===D.correctAlternative?1:0),0),I=S?Math.round((Date.now()-S)/1e3):0;y(!0),await ae.from("simulado_attempts").insert({user_id:e.id,discipline:r,year:a==="any"?null:Number(a),total_questions:h.length,correct_answers:N,time_seconds:I,answers:h.map(R=>({index:R.index,chosen:v[R.index]??null,correct:R.correctAlternative,discipline:R.discipline}))}),ve.success(`Você acertou ${N} de ${h.length}!`)},A=w.useMemo(()=>{const N={};for(const I of j){const R=I.discipline;N[R]=N[R]??{discipline:R,total:0,correct:0},N[R].total+=I.total_questions,N[R].correct+=I.correct_answers}return Object.values(N).map(I=>{var R;return{mat:((R=gy.find(D=>D.key===I.discipline))==null?void 0:R.label.split(" ")[0])??I.discipline,acertos:I.total?Math.round(I.correct/I.total*100):0}})},[j]);if(d)return u.jsx(cr,{children:u.jsx(Er,{children:u.jsxs("div",{className:"py-32 flex flex-col items-center gap-4",children:[u.jsxs("div",{className:"relative",children:[u.jsx("div",{className:"absolute inset-0 rounded-full bg-electric/30 blur-md"}),u.jsx(Qe,{className:"relative w-10 h-10 animate-spin text-electric"})]}),u.jsx("p",{className:"text-sm text-muted-foreground font-medium",children:"Sorteando questões da prova…"})]})})});if(b&&h.length){const N=h.reduce((D,L)=>D+(v[L.index]===L.correctAlternative?1:0),0),I=Math.round(N/h.length*100),R={facil:{total:0,correct:0},medio:{total:0,correct:0},dificil:{total:0,correct:0}};for(const D of h)R[D.difficulty].total+=1,v[D.index]===D.correctAlternative&&(R[D.difficulty].c
573orrect+=1);return u.jsx(cr,{children:u.jsxs(Er,{maxWidth:"md",children:[u.jsxs($e,{className:"p-8 md:p-10 text-center relative",children:[u.jsx("div",{"aria-hidden":!0,className:"absolute -top-20 -left-20 w-64 h-64 rounded-full bg-electric/20 blur-3xl"}),u.jsx("div",{"aria-hidden":!0,className:"absolute -bottom-20 -right-20 w-64 h-64 rounded-full bg-gold/20 blur-3xl"}),u.jsxs("div",{className:"relative inline-flex items-center gap-2 px-3 py-1.5 rounded-full border border-gold/30 bg-gold/5 text-[10px] font-bold uppercase tracking-[0.22em] text-gold mb-4",children:[u.jsx(Ta,{className:"w-3 h-3"})," Resultado"]}),u.jsxs("p",{className:"relative font-display text-7xl md:text-8xl font-bold tabular-nums text-gradient-premium tracking-tight",children:[N,u.jsxs("span",{className:"text-3xl text-muted-foreground font-semibold",children:["/",h.length]})]}),u.jsxs("p",{className:"relative text-base text-muted-foreground mt-2",children:[I,"% de aproveitamento"]}),u.jsx("div",{className:"relative flex gap-2 justify-center mt-6",children:u.jsx(se,{onClick:()=>{p([]),y(!1)},size:"lg",className:"bg-gradient-to-r from-electric to-electric-glow text-white border-0 hover:opacity-90 shadow-electric-glow",children:"Novo simulado"})})]}),u.jsxs($e,{className:"p-6 md:p-7 mt-6",children:[u.jsx("h3",{className:"font-display font-semibold text-base tracking-tight mb-4",children:"Aproveitamento por dificuldade"}),u.jsx("div",{className:"grid grid-cols-3 gap-3",children:Object.keys(R).map(D=>{const{total:L,correct:M}=R[D],C=L?Math.round(M/L*100):0,P=vy[D],B=P.Icon;return u.jsxs("div",{className:q("rounded-2xl border p-4 text-center",P.color),children:[u.jsx(B,{className:"w-5 h-5 mx-auto mb-2"}),u.jsx("p",{className:"text-[10px] font-bold uppercase tracking-wider",children:P.label}),u.jsxs("p",{className:"font-display text-xl font-bold mt-1.5 tabular-nums",children:[M,"/",L]}),u.jsx("p",{className:"text-xs opacity-80 font-medium mt-0.5",children:L?`${C}%`:"—"})]},D)})})]}),u.jsx("p",{className:"text-[11px] font-bold uppercase tracking-[0.22em] text-muted-foreground mt-8 mb-4",children:"Gabarito"}),u.jsx("div",{className:"space-y-3",children:h.map(D=>{const L=v[D.index],M=L===D.correctAlternative,C=vy[D.difficulty];return u.jsx($e,{className:"p-4",children:u.jsxs("div",{className:"flex items-center gap-2 text-sm flex-wrap",children:[M?u.jsx(Md,{className:"w-4 h-4 text-teal"}):u.jsx(BB,{className:"w-4 h-4 text-destructive"}),u.jsxs("span",{className:"font-semibold",children:["Questão ",D.index," · ",D.year]}),u.jsx(Bu,{variant:"outline",className:q("text-[10px] px-1.5 py-0",C.color),children:C.label}),u.jsxs("span",{className:"ml-auto text-xs text-muted-foreground",children:["Sua resposta: ",u.jsx("b",{children:L??"—"})," · Correta: ",u.jsx("b",{children:D.correctAlternative})]})]})},D.index)})})]})})}if(h.length){const N=h[g],I=v[N.index],R=vy[N.difficulty],D=R.Icon,L=(g+1)/h.length*100;return u.jsx(cr,{children:u.jsxs(Er,{maxWidth:"md",children:[u.jsxs("div",{className:"mb-6",children:[u.jsxs("div",{className:"flex items-center justify-between mb-2 gap-2 flex-wrap",children:[u.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[u.jsxs("span",{className:"text-[10px] font-bold uppercase tracking-[0.22em] text-muted-foreground",children:["Questão ",g+1," de ",h.length," · ENEM ",N.year]}),u.jsxs(Bu,{variant:"outline",className:q("text-[10px] gap-1",R.color),children:[u.jsx(D,{className:"w-3 h-3"}),R.label]})]}),u.jsx(se,{variant:"outline",size:"sm",onClick:O,className:"border-border/60",children:"Encerrar"})]}),u.jsx("div",{className:"h-1.5 bg-muted/40 rounded-full overflow-hidden",children:u.jsx("div",{className:"h-full bg-gradient-to-r from-electric to-electric-glow shadow-electric-glow transition-all duration-300",style:{width:`${L}%`}})})]}),u.jsxs($e,{className:"p-6 md:p-8 space-y-5",children:[N.context&&u.jsx("div",{className:"prose prose-sm dark:prose-invert max-w-none whitespace-pre-wrap leading-relaxed",children:N.context}),(T=N.files)==null?void 0:T.map((M,C)=>u.jsx("img",{src:M,alt:"",className:"max-w-full rounded-xl border border-border/40"},C)),N.alternativesIntroduction&&u.jsx("p",{className:"text-sm font-medium leading-relaxed",children:N.alternativesIntroduction}),u.jsx("div",{className:"space-y-2.5",children:N.alternatives.map(M=>{const C=I===M.letter;return u.jsxs("button",{onClick:()=>x(P=>({...P,[N.index]:M.letter})),className:q("w-full text-left p-4 rounded-xl border transition-all flex gap-3 group",C?"border-electric/60 bg-electric/5 shadow-electric-glow":"border-border/60 bg-card/40 backdrop-blur hover:border-electric/40 hover:-translate-y-0.5"),children:[u.jsx("span",{className:q("w-8 h-8 rounded-lg border flex items-center justify-center text-sm font-bold shrink-0 transition-all",C?"bg-gradient-to-br from-electric to-electric-glow text-white border-electric/40 shadow-electric-glow":"border-border/60 bg-card group-hover:border-electric/40"),children:M.letter}),u.jsxs("div",{className:"text-sm flex-1 leading-relaxed",children:[M.text,M.file&&u.jsx("img",{src:M.file,alt:"",className:"mt-2 max-w-xs rounded-lg border border-border/40"})]})]},M.letter)})})]}),u.jsxs("div",{className:"flex justify-between mt-5",children:[u.jsxs(se,{variant:"outline",onClick:()=>m(M=>Math.max(0,M-1)),disabled:g===0,className:"border-border/60",children:[u.jsx(Nm,{className:"w-4 h-4 mr-2"})," Anterior"]}),g<h.length-1?u.jsxs(se,{onClick:()=>m(M=>M+1),className:"bg-gradient-to-r from-electric to-electric-glow text-white border-0 hover:opacity-90 shadow-electric-glow",children:["Próxima ",u.jsx(RB,{className:"w-4 h-4 ml-2"})]}):u.jsx(se,{onClick:O,className:"bg-gradient-gold text-white border-0 hover:opacity-90 shadow-gold-glow",children:"Finalizar"})]})]})})}return u.jsx(cr,{children:u.jsxs(Er,{children:[u.jsx(za,{eyebrow:"Treine como na prova real",title:u.jsxs(u.Fragment,{children:["Simulado ",u.jsx("span",{className:"text-gradient-premium",children:"ENEM"})]}),description:"Treine com questões reais das provas oficiais do ENEM (2009 a 2023). As provas de 2024/2025 ainda não foram liberadas pelo INEP em formato aberto."}),u.jsxs($e,{className:"p-6 md:p-7 mb-6",children:[u.jsxs("div",{className:"grid gap-3 grid-cols-1 md:grid-cols-2",children:[u.jsxs("div",{children:[u.jsx(Me,{className:"text-[10px] uppercase tracking-wider font-bold text-muted-foreground",children:"Matéria"}),u.jsxs(Gn,{value:r,onValueChange:n,children:[u.jsx(yn,{className:"mt-1.5 bg-card/40 backdrop-blur border-border/60",children:u.jsx(Yn,{})}),u.jsx(bn,{children:gy.map(N=>u.jsx(Wr,{value:N.key,children:N.label},N.key))})]})]}),u.jsxs("div",{children:[u.jsx(Me,{className:"text-[10px] uppercase tracking-wider font-bold text-muted-foreground",children:"Ano"}),u.jsxs(Gn,{value:a,onValueChange:i,children:[u.jsx(yn,{className:"mt-1.5 bg-card/40 backdrop-blur border-border/60",children:u.jsx(Yn,{})}),u.jsx(bn,{children:t.map(N=>u.jsx(Wr,{value:String(N),children:N==="any"?"Aleatório":N}
573,String(N)))})]})]}),u.jsxs("div",{children:[u.jsx(Me,{className:"text-[10px] uppercase tracking-wider font-bold text-muted-foreground",children:"Quantidade"}),u.jsxs(Gn,{value:String(o),onValueChange:N=>s(Number(N)),children:[u.jsx(yn,{className:"mt-1.5 bg-card/40 backdrop-blur border-border/60",children:u.jsx(Yn,{})}),u.jsx(bn,{children:Zbe.map(N=>u.jsxs(Wr,{value:String(N),children:[N," questões"]},N))})]})]}),u.jsxs("div",{children:[u.jsx(Me,{className:"text-[10px] uppercase tracking-wider font-bold text-muted-foreground",children:"Dificuldade"}),u.jsxs(Gn,{value:l,onValueChange:c,children:[u.jsx(yn,{className:"mt-1.5 bg-card/40 backdrop-blur border-border/60",children:u.jsx(Yn,{})}),u.jsx(bn,{children:exe.map(N=>u.jsx(Wr,{value:N.key,children:N.label},N.key))})]})]})]}),u.jsxs("div",{className:"mt-5 flex items-center justify-between gap-3 flex-wrap",children:[u.jsx("p",{className:"text-xs text-muted-foreground",children:l!=="any"&&"Filtramos uma amostra maior pra encontrar questões do nível escolhido."}),u.jsxs(se,{size:"lg",onClick:E,className:"bg-gradient-to-r from-electric to-electric-glow text-white border-0 hover:opacity-90 shadow-electric-glow",children:[u.jsx(Ta,{className:"w-4 h-4 mr-2"})," Iniciar simulado"]})]})]}),A.length>0&&u.jsxs($e,{className:"p-6 md:p-7 mb-6",children:[u.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[u.jsx("div",{className:"w-9 h-9 rounded-xl bg-gold/10 border border-gold/30 text-gold flex items-center justify-center",children:u.jsx(R2,{className:"w-4.5 h-4.5"})}),u.jsx("h2",{className:"font-display font-semibold text-lg tracking-tight",children:"Aproveitamento por matéria"})]}),u.jsx("div",{className:"h-56",children:u.jsx(Ise,{width:"100%",height:"100%",children:u.jsxs(Qbe,{data:A,children:[u.jsx("defs",{children:u.jsxs("linearGradient",{id:"goldGrad",x1:"0",y1:"0",x2:"0",y2:"1",children:[u.jsx("stop",{offset:"0%",stopColor:"hsl(var(--gold))",stopOpacity:1}),u.jsx("stop",{offset:"100%",stopColor:"hsl(var(--gold))",stopOpacity:.4})]})}),u.jsx(SD,{strokeDasharray:"3 3",stroke:"hsl(var(--border) / 0.4)"}),u.jsx(Ig,{dataKey:"mat",stroke:"hsl(var(--muted-foreground))",fontSize:12}),u.jsx(Dg,{domain:[0,100],stroke:"hsl(var(--muted-foreground))",fontSize:12}),u.jsx(Ln,{contentStyle:{background:"hsl(var(--card))",border:"1px solid hsl(var(--border))",borderRadius:12},formatter:N=>[`${N}%`,"Acertos"]}),u.jsx(es,{dataKey:"acertos",fill:"url(#goldGrad)",radius:[6,6,0,0]})]})})})]}),u.jsxs($e,{className:"p-6 md:p-7",children:[u.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[u.jsx("div",{className:"w-9 h-9 rounded-xl bg-electric/10 border border-electric/30 text-electric flex items-center justify-center",children:u.jsx(HB,{className:"w-4.5 h-4.5"})}),u.jsx("h2",{className:"font-display font-semibold text-lg tracking-tight",children:"Histórico"})]}),j.length===0?u.jsx("p",{className:"text-sm text-muted-foreground",children:"Nenhum simulado ainda. Comece o primeiro!"}):u.jsx("div",{className:"divide-y divide-border/40",children:j.map(N=>{var D;const I=N.total_questions?Math.round(N.correct_answers/N.total_questions*100):0,R=((D=gy.find(L=>L.key===N.discipline))==null?void 0:D.label)??N.discipline;return u.jsxs("div",{className:"py-3 flex items-center justify-between text-sm",children:[u.jsxs("div",{children:[u.jsxs("p",{className:"font-display font-semibold tracking-tight",children:[R," ",N.year?`· ${N.year}`:""]}),u.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:new Date(N.created_at).toLocaleDateString("pt-BR")})]}),u.jsxs("div",{className:"text-right",children:[u.jsxs("p",{className:"font-display font-bold tabular-nums",children:[N.correct_answers,"/",N.total_questions]}),u.jsxs("p",{className:q("text-xs font-bold tabular-nums",I>=60?"text-gold":"text-muted-foreground"),children:[I,"%"]})]})]},N.id)})})]})]})})},Bg=w.forwardRef(({className:e,...t},r)=>u.jsx("textarea",{className:q("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm r
573ing-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:r,...t}));Bg.displayName="Textarea";const axe=()=>{const{user:e}=Pt(),[t,r]=w.useState(""),[n,a]=w.useState(""),[i,o]=w.useState(!1),[s,l]=w.useState([]),[c,d]=w.useState(null),f=async()=>{if(!e)return;const{data:g}=await ae.from("redacoes").select("*").eq("user_id",e.id).order("created_at",{ascending:!1});g&&l(g)};w.useEffect(()=>{f()},[e]);const h=async()=>{if(e){if(!t.trim()||n.trim().length<100){ve.error("Preencha o tema e escreva pelo menos 100 caracteres.");return}o(!0);try{const{data:g,error:m}=await ae.functions.invoke("corrigir-redacao",{body:{tema:t,texto:n}});if(m||g!=null&&g.error)throw new Error((g==null?void 0:g.error)||(m==null?void 0:m.message));await ae.from("redacoes").insert({user_id:e.id,tema:t,texto:n,nota_total:g.total,nota_c1:g.c1,nota_c2:g.c2,nota_c3:g.c3,nota_c4:g.c4,nota_c5:g.c5,feedback:g.feedback}),ve.success(`Nota ${g.total}/1000`),r(""),a(""),f()}catch(g){ve.error("Erro ao corrigir",{description:g instanceof Error?g.message:"Tente novamente"})}finally{o(!1)}}},p=n.trim().split(/\s+/).filter(Boolean).length;return u.jsx(cr,{children:u.jsxs(Er,{maxWidth:"md",children:[u.jsx(za,{eyebrow:"Correção pelos critérios do ENEM",title:u.jsxs(u.Fragment,{children:["Corretor de ",u.jsx("span",{className:"text-gradient-premium",children:"redação"})]}),description:"Receba uma correção pelos 5 critérios do ENEM em segundos, com feedback construtivo e personalizado."}),u.jsxs($e,{className:"p-6 md:p-7 space-y-5 mb-8 relative",children:[u.jsx("div",{"aria-hidden":!0,className:"absolute -top-16 -right-16 w-48 h-48 rounded-full bg-electric/15 blur-3xl"}),u.jsxs("div",{className:"relative",children:[u.jsx(Me,{htmlFor:"tema",className:"text-[10px] uppercase tracking-[0.18em] font-bold text-muted-foreground",children:"Tema da redação"}),u.jsx(gt,{id:"tema",value:t,onChange:g=>r(g.target.value),placeholder:"Ex: Os desafios da educação digital no Brasil",className:"mt-2 bg-card/40 backdrop-blur border-border/60 h-11"})]}),u.jsxs("div",{className:"relative",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx(Me,{htmlFor:"texto",className:"text-[10px] uppercase tracking-[0.18em] font-bold text-muted-foreground",children:"Sua redação"}),u.jsxs("span",{className:"text-xs text-muted-foreground font-medium tabular-nums",children:[p," palavras"]})]}),u.jsx(Bg,{id:"texto",value:n,onChange:g=>a(g.target.value),placeholder:"Cole ou digite sua redação aqui...",className:"mt-2 min-h-[280px] font-serif text-[15px] leading-relaxed bg-card/40 backdrop-blur border-border/60"})]}),u.jsx(se,{onClick:h,disabled:i,size:"lg",className:"w-full sm:w-auto bg-gradient-to-r from-electric to-electric-glow text-white border-0 hover:opacity-90 shadow-electric-glow",children:i?u.jsxs(u.Fragment,{children:[u.jsx(Qe,{className:"w-4 h-4 mr-2 animate-spin"})," Corrigindo…"]}):u.jsxs(u.Fragment,{children:[u.jsx(Ta,{className:"w-4 h-4 mr-2"})," Enviar para correção"]})})]}),u.jsxs("div",{children:[u.jsx("p",{className:"text-[11px] font-bold uppercase tracking-[0.22em] text-muted-foreground mb-4",children:"Suas redações"}),s.length===0?u.jsxs($e,{className:"p-10 text-center",children:[u.jsx("div",{className:"w-12 h-12 mx-auto rounded-xl bg-gold/10 border border-gold/30 text-gold flex items-center justify-center mb-3",children:u.jsx(B2,{className:"w-5 h-5"})}),u.jsx("p",{className:"text-sm text-muted-foreground",children:"Nenhuma redação enviada ainda."})]}):u.jsx("div",{className:"space-y-3",children:s.map(g=>{const m=c===g.id,v=g.nota_total??0,x=v>=800?"text-gradient-gold":v>=600?"text-gradient-premium":"text-muted-foreground";return u.jsxs($e,{className:"overflow-hidden",children:[u.jsxs("button",{onClick:()=>d(m?null:g.id),className:"w-full p-5 flex items-center gap-4 text-left hover:bg-electric/5 transition-colors",children:[u.jsxs("div",{className:"flex-1 min-w-0",children:[u.jsx("p",{className:"font-display font-semibold tracking-tight truncate",children:g.tema}),u.jsx("p",{className:"text-xs text-muted-foreground mt-1 font-medium",children:new Date(g.created_at).toLocaleDateString("pt-BR")})]}),u.jsxs("div",{className:"text-right",children:[u.jsx("p",{className:q("font-display text-3xl font-bold tabular-nums tracking-tight",x),children:g.nota_total??"—"}),u.jsx("p",{className:"text-[10px] text-muted-foreground font-bold uppercase tracking-wider",children:"/1000"})]}),m?u.jsx(I2,{className:"w-4 h-4 text-muted-foreground"}):u.jsx(Ad,{className:"w-4 h-4 text-muted-foreground"})]}),m&&u.jsxs("div",{className:"px-5 pb-5 space-y-4 border-t border-border/40 pt-5",children:[u.jsx("div",{className:"grid grid-cols-5 ga
573p-2",children:["c1","c2","c3","c4","c5"].map((b,y)=>{const S=g[`nota_${b}`],_=y%2===1;return u.jsxs("div",{className:q("text-center p-3 rounded-xl border",_?"bg-gold/5 border-gold/20":"bg-electric/5 border-electric/20"),children:[u.jsxs("p",{className:q("text-[10px] font-bold uppercase tracking-wider",_?"text-gold":"text-electric"),children:["C",y+1]}),u.jsx("p",{className:"font-display text-base font-bold tabular-nums mt-1",children:S??"—"})]},b)})}),g.feedback&&u.jsx("div",{className:"text-sm whitespace-pre-wrap leading-relaxed bg-muted/30 p-4 rounded-xl border border-border/40",children:g.feedback})]})]},g.id)})})]})]})})},ixe=()=>u.jsx(cr,{children:u.jsxs(Er,{maxWidth:"lg",children:[u.jsx(za,{eyebrow:"Bônus exclusivos",title:u.jsxs(u.Fragment,{children:["Materiais ",u.jsx("span",{className:"text-gradient-premium",children:"extras"})]}),description:"Bônus, planilhas, mapas mentais e outros materiais selecionados a dedo para acelerar seus estudos."}),u.jsxs($e,{className:"p-12 text-center space-y-4 relative",children:[u.jsx("div",{"aria-hidden":!0,className:"absolute -top-16 -right-16 w-48 h-48 rounded-full bg-gold/15 blur-3xl"}),u.jsx("div",{"aria-hidden":!0,className:"absolute -bottom-16 -left-16 w-48 h-48 rounded-full bg-electric/15 blur-3xl"}),u.jsx("div",{className:"relative w-16 h-16 mx-auto rounded-2xl bg-gradient-to-br from-gold to-amber flex items-center justify-center shadow-gold-glow",children:u.jsx(Ta,{className:"w-7 h-7 text-white"})}),u.jsx("p",{className:"relative font-display font-semibold text-2xl tracking-tight",children:"Em breve"}),u.jsx("p",{className:"relative text-sm text-muted-foreground max-w-md mx-auto leading-relaxed",children:"Estamos preparando uma seleção premium de materiais extras pra acelerar seus estudos. Acompanhe por aqui — você será o primeiro a saber."}),u.jsxs("div",{className:"relative inline-flex items-center gap-2 px-3 py-1.5 rounded-full border border-gold/30 bg-gold/5 text-[10px] font-bold uppercase tracking-[0.2em] text-gold",children:[u.jsx(Am,{className:"w-3 h-3"})," Liberação em breve"]})]})]})}),oxe=e=>{const t=Math.floor(e/60).toString().padStart(2,"0"),r=(e%60).toString().padStart(2,"0");return`${t}:${r}`},sxe=()=>{const{methodKey:e,setMethodKey:t,freeFocus:r,setFreeFocus:n,freeBreak:a,setFreeBreak:i,phase:o,secondsLeft:s,running:l,completedFocus:c,focusMin:d,breakMin:f,toggle:h,reset:p,skip:g}=iM(),m=nM(e),v=(o==="focus"?d:f)*60,x=v>0?(v-s)/v*100:0,b=o==="focus";return u.jsx(cr,{children:u.jsxs(Er,{children:[u.jsx(za,{eyebrow:"Disciplina é liberdade",title:u.jsxs(u.Fragment,{children:["Métodos de ",u.jsx("span",{className:"text-gradient-premium",children:"estudo"})]}),description:"Escolha um método e comece o cronômetro. O timer continua rodando mesmo se você sair desta tela."}),u.jsxs("div",{className:"grid gap-6 lg:grid-cols-[1fr_340px]",children:[u.jsxs($e,{className:"p-8 md:p-10 flex flex-col items-center text-center relative",children:[u.jsx("div",{"aria-hidden":!0,className:q("absolute -top-20 -left-20 w-64 h-64 rounded-full blur-3xl transition-colors duration-700",b?"bg-electric/15":"bg-gold/15")}),u.jsx("div",{"aria-hidden":!0,className:q("absolute -bottom-20 -right-20 w-64 h-64 rounded-full blur-3xl transition-colors duration-700",b?"bg-electric/10":"bg-gold/10")}),u.jsxs("div",{className:q("relative inline-flex items-center gap-2 text-[10px] font-bold uppercase tracking-[0.22em] px-4 py-2 rounded-full mb-3 border",b?"bg-electric/10 text-electric border-electric/30":"bg-gold/10 text-gold border-gold/30"),children:[b?u.jsx($2,{className:"w-3.5 h-3.5"}):u.jsx(L2,{className:"w-3.5 h-3.5"}),b?"Modo foco":"Descanso"]}),u.jsx("p",{className:"relative text-sm text-muted-foreground font-medium",children:m.title}),u.jsxs("div",{className:"relative my-8",children:[u.jsx("div",{className:q("absolute inset-0 rounded-full blur-2xl opacity-40 transition-colors duration-700",b?"bg-electric/40":"bg-gold/40")}),u.jsxs("svg",{className:"relative w-60 h-60 md:w-80 md:h-80 -rotate-90",viewBox:"0 0 100 100",children:[u.jsx("circle",{cx:"50",cy:"50",r:"45",fill:"none",stroke:"hsl(var(--border) / 0.5)",strokeWidth:"4"}),u.jsx("circle",{cx:"50",cy:"50",r:"45",fill:"none",stroke:b?"hsl(var(--electric))":"hsl(var(--gold))",strokeWidth:"5",strokeLinecap:"round",strokeDasharray:`${x*2*Math.PI*45/100} ${2*Math.PI*45}`,className:"transition-all duration-500",style:{filter:`drop-shadow(0 0 8px ${b?"hsl(var(--electric-glow) / 0.6)":"hsl(var(--gold-glow) / 0.6)"})`}})]}),u.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center",children:[u.jsx("span",{className:q("font-display text-6xl md:text-7xl font-bold tabular-nums tracking-tight",b?"text-gradient-premium":"text-gradient-gold"),children:oxe(s)}),u.jsxs("span",{className:"text-[10px] uppercase tracking-[0.2em] text-muted-foreground font-semibold mt-3",children:[c," ciclo",c===1?"":"s"," hoje"]})]})]}),u.jsxs("div",{className:"relative flex gap-2 flex-wrap justify-center",children:[u.jsx(se,{size:"lg",onClick:h,className:q("min-w-[150px] text-white border-0 hover:opacity-90",b?"bg-gradient-to-r from-electric to-electric-glow shadow-electric-glow":"bg-gradient-gold 
573shadow-gold-glow"),children:l?u.jsxs(u.Fragment,{children:[u.jsx(U2,{className:"w-4 h-4 mr-2"})," Pausar"]}):u.jsxs(u.Fragment,{children:[u.jsx(W2,{className:"w-4 h-4 mr-2"})," Iniciar"]})}),u.jsxs(se,{size:"lg",variant:"outline",onClick:p,className:"border-border/60",children:[u.jsx(H2,{className:"w-4 h-4 mr-2"})," Reiniciar"]}),u.jsxs(se,{size:"lg",variant:"ghost",onClick:g,children:[u.jsx(ZB,{className:"w-4 h-4 mr-2"})," Pular fase"]})]})]}),u.jsxs("div",{className:"space-y-3",children:[u.jsx("p",{className:"text-[11px] font-bold uppercase tracking-[0.22em] text-muted-foreground px-1",children:"Métodos"}),ep.map((y,S)=>{const _=y.key===e,j=S%2===1;return u.jsx("button",{onClick:()=>t(y.key),className:q("w-full text-left p-4 rounded-2xl border transition-all glass-card",_?j?"border-gold/40 shadow-gold-glow":"border-electric/40 shadow-electric-glow":"hover:-translate-y-0.5"),children:u.jsxs("div",{className:"flex items-start gap-3",children:[u.jsx("div",{className:q("w-10 h-10 shrink-0 rounded-xl flex items-center justify-center text-lg border",_?j?"bg-gold/15 border-gold/40":"bg-electric/15 border-electric/40":"bg-muted/40 border-border/40"),children:y.emoji}),u.jsxs("div",{className:"flex-1 min-w-0",children:[u.jsx("div",{className:"font-display font-semibold text-sm tracking-tight",children:y.title}),u.jsxs("div",{className:q("text-[10px] font-bold uppercase tracking-wider mt-0.5",_?j?"text-gold":"text-electric":"text-muted-foreground"),children:[y.focus," min foco · ",y.break," min pausa"]}),u.jsx("div",{className:"text-xs text-muted-foreground mt-1.5 line-clamp-2 leading-relaxed",children:y.description})]})]})},y.key)}),m.key==="free"&&u.jsxs($e,{className:"p-4 space-y-3",children:[u.jsxs("div",{children:[u.jsx(Me,{htmlFor:"free-focus",className:"text-[10px] uppercase tracking-wider font-bold text-muted-foreground",children:"Foco (min)"}),u.jsx(gt,{id:"free-focus",type:"number",min:1,max:180,value:r,onChange:y=>n(Math.max(1,Number(y.target.value))),className:"mt-1.5 bg-card/40 backdrop-blur border-border/60"})]}),u.jsxs("div",{children:[u.jsx(Me,{htmlFor:"free-break",className:"text-[10px] uppercase tracking-wider font-bold text-muted-foreground",children:"Descanso (min)"}),u.jsx(gt,{id:"free-break",type:"number",min:1,max:60,value:a,onChange:y=>i(Math.max(1,Number(y.target.value))),className:"mt-1.5 bg-card/40 backdrop-blur border-border/60"})]})]})]})]})]})})};var de=function(){return de=Object.assign||function(t){for(var r,n=1,a=arguments.length;n<a;n++){r=arguments[n];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},de.apply(this,arguments)};function lxe(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r}function LD(e,t,r){for(var n=0,a=t.length,i;n<a;n++)(i||!(n in t))&&(i||(i=Array.prototype.slice.call(t,0,n)),i[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))}function Hd(e){return e.mode==="multiple"}function qd(e){return e.mode==="range"}function Fg(e){return e.mode==="single"}var cxe={root:"rdp",multiple_months:"rdp-multiple_months",with_weeknumber:"rdp-with_weeknumber",vhidden:"rdp-vhidden",button_reset:"rdp-button_reset",button:"rdp-button",caption:"rdp-caption",caption_start:"rdp-caption_start",caption_end:"rdp-caption_end",caption_between:"rdp-caption_between",caption_label:"rdp-caption_label",caption_dropdowns:"rdp-caption_dropdowns",dropdown:"rdp-dropdown",dropdown_month:"rdp-dropdown_month",dropdown_year:"rdp-dropdown_year",dropdown_icon:"rdp-dropdown_icon",months:"rdp-months",month:"rdp-month",table:"rdp-table",tbody:"rdp-tbody",tfoot:"rdp-tfoot",head:"rdp-head",head_row:"rdp-head_row",head_cell:"rdp-head_cell",nav:"rdp-nav",nav_button:"rdp-nav_button",nav_button_previous:"rdp-nav_button_previous",nav_button_next:"rdp-nav_button_next",nav_icon:"rdp-nav_icon",row:"rdp-row",weeknumber:"rdp-weeknumber",cell:"rdp-cell",day:"rdp-day",day_today:"rdp-day_today",day_outside:"rdp-day_outside",day_selected:"rdp-day_selected",day_disabled:"rdp-day_disabled",day_hidden:"rdp-day_hidden",day_range_start:"rdp-day_range_start",day_range_end:"rdp-day_range_end",day_range_middle:"rdp-day_range_middle"};function uxe(e,t){return Rt(e,"LLLL y",t)}function dxe(e,t){return Rt(e,"d",t)}function fxe(e,t){return Rt(e,"LLLL",t)}function hxe(e){return"".concat(e)}function pxe(e,t){return Rt(e,"cccccc",t)}function mxe(e,t){return Rt(e,"yyyy",t)}var gxe=Object.freeze({__proto__:null,formatCaption:uxe,formatDay:dxe,formatMonthCaption:fxe,formatWeekNumber:hxe,formatWeekdayName:pxe,formatYearC
573aption:mxe}),vxe=function(e,t,r){return Rt(e,"do MMMM (EEEE)",r)},yxe=function(){return"Month: "},bxe=function(){return"Go to next month"},xxe=function(){return"Go to previous month"},wxe=function(e,t){return Rt(e,"cccc",t)},_xe=function(e){return"Week n. ".concat(e)},Sxe=function(){return"Year: "},jxe=Object.freeze({__proto__:null,labelDay:vxe,labelMonthDropdown:yxe,labelNext:bxe,labelPrevious:xxe,labelWeekNumber:_xe,labelWeekday:wxe,labelYearDropdown:Sxe});function kxe(){var e="buttons",t=cxe,r=o$,n={},a={},i=1,o={},s=new Date;return{captionLayout:e,classNames:t,formatters:gxe,labels:jxe,locale:r,modifiersClassNames:n,modifiers:a,numberOfMonths:i,styles:o,today:s,mode:"default"}}function Exe(e){var t=e.fromYear,r=e.toYear,n=e.fromMonth,a=e.toMonth,i=e.fromDate,o=e.toDate;return n?i=pr(n):t&&(i=new Date(t,0,1)),a?o=s1(a):r&&(o=new Date(r,11,31)),{fromDate:i?bl(i):void 0,toDate:o?bl(o):void 0}}var BD=w.createContext(void 0);function Oxe(e){var t,r=e.initialProps,n=kxe(),a=Exe(r),i=a.fromDate,o=a.toDate,s=(t=r.captionLayout)!==null&&t!==void 0?t:n.captionLayout;s!=="buttons"&&(!i||!o)&&(s="buttons");var l;(Fg(r)||Hd(r)||qd(r))&&(l=r.onSelect);var c=de(de(de({},n),r),{captionLayout:s,classNames:de(de({},n.classNames),r.classNames),components:de({},r.components),formatters:de(de({},n.formatters),r.formatters),fromDate:i,labels:de(de({},n.labels),r.labels),mode:r.mode||n.mode,modifiers:de(de({},n.modifiers),r.modifiers),modifiersClassNames:de(de({},n.modifiersClassNames),r.modifiersClassNames),onSelect:l,styles:de(de({},n.styles),r.styles),toDate:o});return u.jsx(BD.Provider,{value:c,children:e.children})}function Ve(){var e=w.useContext(BD);if(!e)throw new Error("useDayPicker must be used within a DayPickerProvider.");return e}function FD(e){var t=Ve(),r=t.locale,n=t.classNames,a=t.styles,i=t.formatters.formatCaption;return u.jsx("div",{className:n.caption_label,style:a.caption_label,"aria-live":"polite",role:"presentation",id:e.id,children:i(e.displayMonth,{locale:r})})}function Nxe(e){return u.jsx("svg",de({width:"8px",height:"8px",viewBox:"0 0 120 120","data-testid":"iconDropdown"},e,{children:u.jsx("path",{d:"M4.22182541,48.2218254 C8.44222828,44.0014225 15.2388494,43.9273804 19.5496459,47.9996989 L19.7781746,48.2218254 L60,88.443 L100.221825,48.2218254 C104.442228,44.0014225 111.238849,43.9273804 115.549646,47.9996989 L115.778175,48.2218254 C119.998577,52.4422283 120.07262,59.2388494 116.000301,63.5496459 L115.778175,63.7781746 L67.7781746,111.778175 C63.5577717,115.998577 56.7611506,116.07262 52.4503541,112.000301 L52.2218254,111.778175 L4.22182541,63.7781746 C-0.0739418023,59.4824074 -0.0739418023,52.5175926 4.22182541,48.2218254 Z",fill:"currentColor",fillRule:"nonzero"})}))}function UD(e){var t,r,n=e.onChange,a=e.value,i=e.children,o=e.caption,s=e.className,l=e.style,c=Ve(),d=(r=(t=c.components)===null||t===void 0?void 0:t.IconDropdown)!==null&&r!==void 0?r:Nxe;return u.jsxs("div",{className:s,style:l,children:[u.jsx("span",{className:c.classNames.vhidden,children:e["aria-label"]}),u.jsx("select",{name:e.name,"aria-label":e["aria-label"],className:c.classNames.dropdown,style:c.styles.dropdown,value:a,onChange:n,children:i}),u.jsxs("div",{className:c.classNames.caption_label,style:c.styles.caption_label,"aria-hidden":"true",children:[o,u.jsx(d,{className:c.classNames.dropdown_icon,style:c.styles.dropdown_icon})]})]})}function Pxe(e){var t,r=Ve(),n=r.fromDate,a=r.toDate,i=r.styles,o=r.locale,s=r.formatters.formatMonthCaption,l=r.classNames,c=r.components,d=r.labels.labelMonthDropdown;if(!n)return u.jsx(u.Fragment,{});if(!a)return u.jsx(u.Fragment,{});var f=[];if(WV(n,a))for(var h=pr(n),p=n.getMonth();p<=a.getMonth();p++)f.push(Fv(h,p));else for(var h=pr(new Date),p=0;p<=11;p++)f.push(Fv(h,p));var g=function(v){var x=Number(v.target.value),b=Fv(pr(e.displayMonth),x);e.onChange(b)},m=(t=c==null?void 0:c.Dropdown)!==null&&t!==void 0?t:UD;return u.jsx(m,{name:"months","aria-label":d(),className:l.dropdown_month,style:i.dropdown_month,onChange:g,value:e.displayMonth.getMonth(),caption:s(e.displayMonth,{locale:o}),children:f.map(function(v){return u.jsx("option",{value:v.getMonth(),children:s(v,{locale:o})},v.getMonth())})})}
573function Cxe(e){var t,r=e.displayMonth,n=Ve(),a=n.fromDate,i=n.toDate,o=n.locale,s=n.styles,l=n.classNames,c=n.components,d=n.formatters.formatYearCaption,f=n.labels.labelYearDropdown,h=[];if(!a)return u.jsx(u.Fragment,{});if(!i)return u.jsx(u.Fragment,{});for(var p=a.getFullYear(),g=i.getFullYear(),m=p;m<=g;m++)h.push(Ok(n$(new Date),m));var v=function(b){var y=Ok(pr(r),Number(b.target.value));e.onChange(y)},x=(t=c==null?void 0:c.Dropdown)!==null&&t!==void 0?t:UD;return u.jsx(x,{name:"years","aria-label":f(),className:l.dropdown_year,style:s.dropdown_year,onChange:v,value:r.getFullYear(),caption:d(r,{locale:o}),children:h.map(function(b){return u.jsx("option",{value:b.getFullYear(),children:d(b,{locale:o})},b.getFullYear())})})}function Txe(e,t){var r=w.useState(e),n=r[0],a=r[1],i=t===void 0?n:t;return[i,a]}function Axe(e){var t=e.month,r=e.defaultMonth,n=e.today,a=t||r||n||new Date,i=e.toDate,o=e.fromDate,s=e.numberOfMonths,l=s===void 0?1:s;if(i&&Fu(i,a)<0){var c=-1*(l-1);a=Nn(i,c)}return o&&Fu(a,o)<0&&(a=o),pr(a)}function Mxe(){var e=Ve(),t=Axe(e),r=Txe(t,e.month),n=r[0],a=r[1],i=function(o){var s;if(!e.disableNavigation){var l=pr(o);a(l),(s=e.onMonthChange)===null||s===void 0||s.call(e,l)}};return[n,i]}function $xe(e,t){for(var r=t.reverseMonths,n=t.numberOfMonths,a=pr(e),i=pr(Nn(a,n)),o=Fu(i,a),s=[],l=0;l<o;l++){var c=Nn(a,l);s.push(c)}return r&&(s=s.reverse()),s}function Rxe(e,t){if(!t.disableNavigation){var r=t.toDate,n=t.pagedNavigation,a=t.numberOfMonths,i=a===void 0?1:a,o=n?i:1,s=pr(e);if(!r)return Nn(s,o);var l=Fu(r,e);if(!(l<i))return Nn(s,o)}}function Ixe(e,t){if(!t.disableNavigation){var r=t.fromDate,n=t.pagedNavigation,a=t.numberOfMonths,i=a===void 0?1:a,o=n?i:1,s=pr(e);if(!r)return Nn(s,-o);var l=Fu(s,r);if(!(l<=0))return Nn(s,-o)}}var zD=w.createContext(void 0);function Dxe(e){var t=Ve(),r=Mxe(),n=r[0],a=r[1],i=$xe(n,t),o=Rxe(n,t),s=Ixe(n,t),l=function(f){return i.some(function(h){return c1(f,h)})},c=function(f,h){l(f)||(h&&d$(f,h)?a(Nn(f,1+t.numberOfMonths*-1)):a(f))},d={currentMonth:n,displayMonths:i,goToMonth:a,goToDate:c,previousMonth:s,nextMonth:o,isDateDisplayed:l};return u.jsx(zD.Provider,{value:d,children:e.children})}function Vd(){var e=w.useContext(zD);if(!e)throw new Error("useNavigation must be used within a NavigationProvider");return e}function gP(e){var t,r=Ve(),n=r.classNames,a=r.styles,i=r.components,o=Vd().goToMonth,s=function(d){o(Nn(d,e.displayIndex?-e.dis
573playIndex:0))},l=(t=i==null?void 0:i.CaptionLabel)!==null&&t!==void 0?t:FD,c=u.jsx(l,{id:e.id,displayMonth:e.displayMonth});return u.jsxs("div",{className:n.caption_dropdowns,style:a.caption_dropdowns,children:[u.jsx("div",{className:n.vhidden,children:c}),u.jsx(Pxe,{onChange:s,displayMonth:e.displayMonth}),u.jsx(Cxe,{onChange:s,displayMonth:e.displayMonth})]})}function Lxe(e){return u.jsx("svg",de({width:"16px",height:"16px",viewBox:"0 0 120 120"},e,{children:u.jsx("path",{d:"M69.490332,3.34314575 C72.6145263,0.218951416 77.6798462,0.218951416 80.8040405,3.34314575 C83.8617626,6.40086786 83.9268205,11.3179931 80.9992143,14.4548388 L80.8040405,14.6568542 L35.461,60 L80.8040405,105.343146 C83.8617626,108.400868 83.9268205,113.317993 80.9992143,116.454839 L80.8040405,116.656854 C77.7463184,119.714576 72.8291931,119.779634 69.6923475,116.852028 L69.490332,116.656854 L18.490332,65.6568542 C15.4326099,62.5991321 15.367552,57.6820069 18.2951583,54.5451612 L18.490332,54.3431458 L69.490332,3.34314575 Z",fill:"currentColor",fillRule:"nonzero"})}))}function Bxe(e){return u.jsx("svg",de({width:"16px",height:"16px",viewBox:"0 0 120 120"},e,{children:u.jsx("path",{d:"M49.8040405,3.34314575 C46.6798462,0.218951416 41.6145263,0.218951416 38.490332,3.34314575 C35.4326099,6.40086786 35.367552,11.3179931 38.2951583,14.4548388 L38.490332,14.6568542 L83.8333725,60 L38.490332,105.343146 C35.4326099,108.400868 35.367552,113.317993 38.2951583,116.454839 L38.490332,116.656854 C41.5480541,119.714576 46.4651794,119.779634 49.602025,116.852028 L49.8040405,116.656854 L100.804041,65.6568542 C103.861763,62.5991321 103.926821,57.6820069 100.999214,54.5451612 L100.804041,54.3431458 L49.8040405,3.34314575 Z",fill:"currentColor"})}))}var nm=w.forwardRef(function(e,t){var r=Ve(),n=r.classNames,a=r.styles,i=[n.button_reset,n.button];e.className&&i.push(e.className);var o=i.join(" "),s=de(de({},a.button_reset),a.button);return e.style&&Object.assign(s,e.style),u.jsx("button",de({},e,{ref:t,type:"button",className:o,style:s}))});function Fxe(e){var t,r,n=Ve(),a=n.dir,i=n.locale,o=n.classNames,s=n.styles,l=n.labels,c=l.labelPrevious,d=l.labelNext,f=n.components;if(!e.nextMonth&&!e.previousMonth)return u.jsx(u.Fragment,{});var h=c(e.previousMonth,{locale:i}),p=[o.nav_button,o.nav_button_previous].join(" "),g=d(e.nextMonth,{locale:i}),m=[o.nav_button,o.nav_button_next].join(" "),v=(t=f==null?void 0:f.IconRight)!==null&&t!==void 0?t:Bxe,x=(r=f==null?void 0:f.IconLeft)!==null&&r!==void 0?r:Lxe;return u.jsxs("div",{className:o.nav,style:s.nav,children:[!e.hidePrevious&&u.jsx(nm,{name:"previous-month","aria-label":h,className:p,style:s.nav_button_previous,disabled:!e.previousMonth,onClick:e.onPreviousClick,children:a==="rtl"?u.jsx(v,{className:o.nav_icon,style:s.nav_icon}):u.jsx(x,{className:o.nav_icon,style:s.nav_icon})}),!e.hideNext&&u.jsx(nm,{name:"next-month","aria-label":g,className:m,style:s.nav_button_next,disabled:!e.nextMonth,onClick:e.onNextClick,children:a==="rtl"?u.jsx(x,{className:o.nav_icon,style:s.nav_icon}):u.jsx(v,{className:o.nav_icon,style:s.nav_icon})})]})}function vP(e){var t=Ve().numberOfMonths,r=Vd(),n=r.previousMonth,a=r.nextMonth,i=r.goToMonth,o=r.displayMonths,s=o.findIndex(function(g){return c1(e.displayMonth,g)}),l=s===0,c=s===o.length-1,d=t>1&&(l||!c),f=t>1&&(c||!l),h=function(){n&&i(n)},p=function(){a&&i(a)};return u.jsx(Fxe,{displayMonth:e.displayMonth,hideNext:d,hidePrevious:f,nextMonth:a,previousMonth:n,onPreviousClick:h,onNextClick:p})}function Uxe(e){var t,r=Ve(),n=r.classNames,a=r.disableNavigation,i=r.styles,o=r.captionLayout,s=r.components,l=(t=s==null?void 0:s.CaptionLabel)!==null&&t!==void 0?t:FD,c;return a?c=u.jsx(l,{id:e.id,displayMonth:e.displayMonth}):o==="dropdown"?c=u.jsx(gP,{displayMonth:e.displayMonth,id:e.id}):o==="dropdown-buttons"?c=u.jsxs(u.Fragment,{children:[u.jsx(gP,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id}),u.jsx(vP,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id})]}):c=u.jsxs(u.Fragment,{children:[u.jsx(l,{id:e.id,displayMonth:e.displayMonth,displayIndex:e.displayIndex}),u.jsx(vP,{displayMonth:e.displayMonth,id:e.id})]}),u.jsx("div",{className:n.caption,style:i.caption,children:c})}function zxe(e){var t=Ve(),r=t.footer,n=t.styles,a=t.classNames.tfoot;return r?u.jsx("tfoot",{className:a,style:n.tfoot,children:u.jsx("tr",{children:u.jsx("td",{colSpan:8,children:r})})}):u.jsx(u.Fragment,{})}function Wxe(e,t,r){for(var n=r?Lo(new Date):Pn(new Date,{locale:e,weekStartsOn:t}),a=[],i=0;i<7;i++){var o=Et(n,i);a.push(o)}return a}function Hxe(){var e=Ve(),t=e.classNames,r=e.styles,n=e.showWeekNumber,a=e.locale,i=e.weekStartsOn,o=e.ISOWeek,s=e.formatters.formatWeekdayName,l=e.labels.labelWeekday,c=Wxe(a,i,o);return u.jsxs("tr",{style:r.head_row,className:t.head_row,children:[n&&u.jsx("td",{style:r.head_cell,className:t.head_cell}),c.map(function(d,f){return u.jsx("th",{scope:"col",className:t.head_cell,style:r.head_cell,"aria-label":l(d,{locale:a}),children:s(d,{locale:a})},f)})]})}function qxe(){var e,t=Ve(),r=t.classNames,n=t.styles,a=t.components,i=(e=a==null?void 0:a.HeadRow)!==null&&e!==void 0?e:Hxe;return u.jsx("thead",{style:n.head,className:r.head,children:u.jsx(i,{})})}function Vxe(e){var t=Ve(),r=t.locale,n=t.formatters.formatDay;return u.jsx(u.Fragment,{children:n(e.date,{locale:r})})}var v_=w.createContext(void 0);function Kxe(e){if(!Hd(e.initialProps)){var t={selected:void 0,modifiers:{disabled:[]}};return u.jsx(v_.Provider,{value:t,children:e.children})}return u.jsx(Gxe,{initialProps:e.initialProps,children:e.children})}function Gxe(e){var t=e.initialProps,r=e.children,n=t.selected,a=t.min,i=t.max,o=function(c,d,f){var h,p;(h=t.onDayClick)===null||h===void 0||h.call(t,c,d,f);var g=!!(d.selected&&a&&(n==null?void 0:n.length)===a);if(!g){var m=!!(!d.selected&&i&&(n==null?void 0:n.length)===i);if(!m){var v=n?LD([],n):[];if(d.selected){var x=v.findIndex(function(b){return Gt(c,b)});v.splice(x,1)}else v.push(c);(p=t.onSelect)===null||p===void 0||p.call(t,v,c,d,f)}}},s={disabled:[]};n&&s.disabled.push(function(c){var d=i&&n.length>i-1,f=n.some(function(h){return Gt(h,c)});return!!(d&&!f)});
573var l={selected:n,onDayClick:o,modifiers:s};return u.jsx(v_.Provider,{value:l,children:r})}function y_(){var e=w.useContext(v_);if(!e)throw new Error("useSelectMultiple must be used within a SelectMultipleProvider");return e}function Yxe(e,t){var r=t||{},n=r.from,a=r.to;return n&&a?Gt(a,e)&&Gt(n,e)?void 0:Gt(a,e)?{from:a,to:void 0}:Gt(n,e)?void 0:eb(n,e)?{from:e,to:a}:{from:n,to:e}:a?eb(e,a)?{from:a,to:e}:{from:e,to:a}:n?d$(e,n)?{from:e,to:n}:{from:n,to:e}:{from:e,to:void 0}}var b_=w.createContext(void 0);function Xxe(e){if(!qd(e.initialProps)){var t={selected:void 0,modifiers:{range_start:[],range_end:[],range_middle:[],disabled:[]}};return u.jsx(b_.Provider,{value:t,children:e.children})}return u.jsx(Jxe,{initialProps:e.initialProps,children:e.children})}function Jxe(e){var t=e.initialProps,r=e.children,n=t.selected,a=n||{},i=a.from,o=a.to,s=t.min,l=t.max,c=function(p,g,m){var v,x;(v=t.onDayClick)===null||v===void 0||v.call(t,p,g,m);var b=Yxe(p,n);(x=t.onSelect)===null||x===void 0||x.call(t,b,p,g,m)},d={range_start:[],range_end:[],range_middle:[],disabled:[]};if(i?(d.range_start=[i],o?(d.range_end=[o],Gt(i,o)||(d.range_middle=[{after:i,before:o}])):d.range_end=[i]):o&&(d.range_start=[o],d.range_end=[o]),s&&(i&&!o&&d.disabled.push({after:Bv(i,s-1),before:Et(i,s-1)}),i&&o&&d.disabled.push({after:i,before:Et(i,s-1)}),!i&&o&&d.disabled.push({after:Bv(o,s-1),before:Et(o,s-1)})),l){if(i&&!o&&(d.disabled.push({before:Et(i,-l+1)}),d.disabled.push({after:Et(i,l-1)})),i&&o){var f=Xn(o,i)+1,h=l-f;d.disabled.push({before:Bv(i,h)}),d.disabled.push({after:Et(o,h)})}!i&&o&&(d.disabled.push({before:Et(o,-l+1)}),d.disabled.push({after:Et(o,l-1)}))}return u.jsx(b_.Provider,{value:{selected:n,onDayClick:c,modifiers:d},children:r})}function x_(){var e=w.useContext(b_);if(!e)throw new Error("useSelectRange must be used within a SelectRangeProvider");return e}function mh(e){return Array.isArray(e)?LD([],e):e!==void 0?[e]:[]}function Qxe(e){var t={};return Object.entries(e).forEach(function(r){var n=r[0],a=r[1];t[n]=mh(a)}),t}var Cn;(function(e){e.Outside="outside",e.Disabled="disabled",e.Selected="selected",e.Hidden="hidden",e.Today="today",e.RangeStart="range_start",e.RangeEnd="range_end",e.RangeMiddle="range_middle"})(Cn||(Cn={}));var Zxe=Cn.Selected,da=Cn.Disabled,ewe=Cn.Hidden,twe=Cn.Today,yy=Cn.RangeEnd,by=Cn.RangeMiddle,xy=Cn.RangeStart,rwe=Cn.Outside;function nwe(e,t,r){var n,a=(n={},n[Zxe]=mh(e.selected),n[da]=mh(e.disabled),n[ewe]=mh(e.hidden),n[twe]=[e.today],n[yy]=[],n[by]=[],n[xy]=[],n[rwe]=[],n);return e.fromDate&&a[da].push({before:e.fromDate}),e.toDate&&a[da].push({after:e.toDate}),Hd(e)?a[da]=a[da].concat(t.modifiers[da]):qd(e)&&(a[da]=a[da].concat(r.modifiers[da]),a[xy]=r.modifiers[xy],a[by]=r.modifiers[by],a[yy]=r.modifiers[yy]),a}var WD=w.createContext(void 0);function awe(e){var t=Ve(),r=y_(),n=x_(),a=nwe(t,r,n),i=Qxe(t.modifiers),o=de(de({},a),i);return u.jsx(WD.Provider,{value:o,children:e.children})}function HD(){var e=w.useContext(WD);if(!e)throw new Error("useModifiers must be used within a ModifiersProvider");return e}function iwe(e){return!!(e&&typeof e=="object"&&"before"in e&&"after"in e)}function owe(e){return!!(e&&typeof e=="object"&&"from"in e)}function swe(e){return!!(e&&typeof e=="object"&&"after"in e)}function lwe(e){return!!(e&&typeof e=="object"&&"before"in e)}function cwe(e){return!!(e&&typeof e=="object"&&"dayOfWeek"in e)}function uwe(e,t){var r,n=t.from,a=t.to;if(n&&a){var i=Xn(a,n)<0;i&&(r=[a,n],n=r[0],a=r[1]);var o=Xn(e,n)>=0&&Xn(a,e)>=0;return o}return a?Gt(a,e):n?Gt(n,e):!1}function dwe(e){return o1(e)}function fwe(e){return Array.isArray(e)&&e.every(o1)}function hwe(e,t){return t.some(function(r){if(typeof r=="boolean")return r;if(dwe(r))return Gt(e,r);if(fwe(r))return r.includes(e);if(owe(r))return uwe(e,r);if(cwe(r))return r.dayOfWeek.includes(e.getDay());if(iwe(r)){var n=Xn(r.before,e),a=Xn(r.after,e),i=n>0,o=a<0,s=eb(r.before,r.after);return s?o&&i:i||o}return swe(r)?Xn(e,r.after)>0:lwe(r)?Xn(r.before,e)>0:typeof r=="function"?r(e):!1})}function w_(e,t,r){var n=Object.keys(t).reduce(function(i,o){var s=t[o];return hwe(e,s)&&i.push(o),i},[]),a={};
573return n.forEach(function(i){return a[i]=!0}),r&&!c1(e,r)&&(a.outside=!0),a}function pwe(e,t){for(var r=pr(e[0]),n=s1(e[e.length-1]),a,i,o=r;o<=n;){var s=w_(o,t),l=!s.disabled&&!s.hidden;if(!l){o=Et(o,1);continue}if(s.selected)return o;s.today&&!i&&(i=o),a||(a=o),o=Et(o,1)}return i||a}var mwe=365;function qD(e,t){var r=t.moveBy,n=t.direction,a=t.context,i=t.modifiers,o=t.retry,s=o===void 0?{count:0,lastFocused:e}:o,l=a.weekStartsOn,c=a.fromDate,d=a.toDate,f=a.locale,h={day:Et,week:Z0,month:Nn,year:Fq,startOfWeek:function(v){return a.ISOWeek?Lo(v):Pn(v,{locale:f,weekStartsOn:l})},endOfWeek:function(v){return a.ISOWeek?a$(v):l1(v,{locale:f,weekStartsOn:l})}},p=h[r](e,n==="after"?1:-1);n==="before"&&c?p=Uq([c,p]):n==="after"&&d&&(p=zq([d,p]));var g=!0;if(i){var m=w_(p,i);g=!m.disabled&&!m.hidden}return g?p:s.count>mwe?s.lastFocused:qD(p,{moveBy:r,direction:n,context:a,modifiers:i,retry:de(de({},s),{count:s.count+1})})}var VD=w.createContext(void 0);function gwe(e){var t=Vd(),r=HD(),n=w.useState(),a=n[0],i=n[1],o=w.useState(),s=o[0],l=o[1],c=pwe(t.displayMonths,r),d=a??(s&&t.isDateDisplayed(s))?s:c,f=function(){l(a),i(void 0)},h=function(v){i(v)},p=Ve(),g=function(v,x){if(a){var b=qD(a,{moveBy:v,direction:x,context:p,modifiers:r});Gt(a,b)||(t.goToDate(b,a),h(b))}},m={focusedDay:a,focusTarget:d,blur:f,focus:h,focusDayAfter:function(){return g("day","after")},focusDayBefore:function(){return g("day","before")},focusWeekAfter:function(){return g("week","after")},focusWeekBefore:function(){return g("week","before")},focusMonthBefore:function(){return g("month","before")},focusMonthAfter:function(){return g("month","after")},focusYearBefore:function(){return g("year","before")},focusYearAfter:function(){return g("year","after")},focusStartOfWeek:function(){return g("startOfWeek","before")},focusEndOfWeek:function(){return g("endOfWeek","after")}};return u.jsx(VD.Provider,{value:m,children:e.children})}function __(){var e=w.useContext(VD);if(!e)throw new Error("useFocusContext must be used within a FocusProvider");return e}function vwe(e,t){var r=HD(),n=w_(e,r,t);return n}var S_=w.createContext(void 0);function ywe(e){if(!Fg(e.initialProps)){var t={selected:void 0};return u.jsx(S_.Provider,{value:t,children:e.children})}return u.jsx(bwe,{initialProps:e.initialProps,children:e.children})}function bwe(e){var t=e.initialProps,r=e.children,n=function(i,o,s){var l,c,d;if((l=t.onDayClick)===null||l===void 0||l.call(t,i,o,s),o.selected&&!t.required){(c=t.onSelect)===null||c===void 0||c.call(t,void 0,i,o,s);return}(d=t.onSelect)===null||d===void 0||d.call(t,i,i,o,s)},a={selected:t.selected,onDayClick:n};return u.jsx(S_.Provider,{value:a,children:r})}function KD(){var e=w.useContext(S_);if(!e)throw new Error("useSelectSingle must be used within a SelectSingleProvider");return e}function xwe(e,t){var r=Ve(),n=KD(),a=y_(),i=x_(),o=__(),s=o.focusDayAfter,l=o.focusDayBefore,c=o.focusWeekAfter,d=o.focusWeekBefore,f=o.blur,h=o.focus,p=o.focusMonthBefore,g=o.focusMonthAfter,m=o.focusYearBefore,v=o.focusYearAfter,x=o.focusStartOfWeek,b=o.focusEndOfWeek,y=function(M){var C,P,B,U;Fg(r)?(C=n.onDayClick)===null||C===void 0||C.call(n,e,t,M):Hd(r)?(P=a.onDayClick)===null||P===void 0||P.call(a,e,t,M):qd(r)?(B=i.onDayClick)===null||B===void 0||B.call(i,e,t,M):(U=r.onDayClick)===null||U===void 0||U.call(r,e,t,M)},S=function(M){var C;h(e),(C=r.onDayFocus)===null||C===void 0||C.call(r,e,t,M)},_=function(M){var C;f(),(C=r.onDayBlur)===null||C===void 0||C.call(r,e,t,M)},j=function(M){var C;(C=r.onDayMouseEnter)===null||C===void 0||C.call(r,e,t,M)},k=function(M){var C;(C=r.onDayMouseLeave)===null||C===void 0||C.call(r,e,t,M)},E=function(M){var C;(C=r.onDayPointerEnter)===null||C===void 0||C.call(r,e,t,M)},O=function(M){var C;(C=r.onDayPointerLeave)===null||C===void 0||C.call(r,e,t,M)},A=function(M){var C;(C=r.onDayTouchCancel)===null||C===void 0||C.call(r,e,t,M)},T=function(M){var C;(C=r.onDayTouchEnd)===null||C===void 0||C.call(r,e,t,M)},N=function(M){var C;(C=r.onDayTouchMove)===null||C===void 0||C.call(r,e,t,M)},I=function(M){var C;(C=r.onDayTouchStart)===null||C===void 0||C.call(r,e,t,M)},R=function(M){var C;(C=r.onDayKeyUp)===null||C===void 0||C.call(r,e,t,M)},D=function(M){var C;switch(M.key){case"ArrowLeft":M.preventDefault(),M.stopPropagation(),r.dir==="rtl"?s():l();break;case"ArrowRight":M.preventDefault(),M.stopPropagation(),r.dir==="rtl"?l(
573):s();break;case"ArrowDown":M.preventDefault(),M.stopPropagation(),c();break;case"ArrowUp":M.preventDefault(),M.stopPropagation(),d();break;case"PageUp":M.preventDefault(),M.stopPropagation(),M.shiftKey?m():p();break;case"PageDown":M.preventDefault(),M.stopPropagation(),M.shiftKey?v():g();break;case"Home":M.preventDefault(),M.stopPropagation(),x();break;case"End":M.preventDefault(),M.stopPropagation(),b();break}(C=r.onDayKeyDown)===null||C===void 0||C.call(r,e,t,M)},L={onClick:y,onFocus:S,onBlur:_,onKeyDown:D,onKeyUp:R,onMouseEnter:j,onMouseLeave:k,onPointerEnter:E,onPointerLeave:O,onTouchCancel:A,onTouchEnd:T,onTouchMove:N,onTouchStart:I};return L}function wwe(){var e=Ve(),t=KD(),r=y_(),n=x_(),a=Fg(e)?t.selected:Hd(e)?r.selected:qd(e)?n.selected:void 0;return a}function _we(e){return Object.values(Cn).includes(e)}function Swe(e,t){var r=[e.classNames.day];return Object.keys(t).forEach(function(n){var a=e.modifiersClassNames[n];if(a)r.push(a);else if(_we(n)){var i=e.classNames["day_".concat(n)];i&&r.push(i)}}),r}function jwe(e,t){var r=de({},e.styles.day);return Object.keys(t).forEach(function(n){var a;r=de(de({},r),(a=e.modifiersStyles)===null||a===void 0?void 0:a[n])}),r}function kwe(e,t,r){var n,a,i,o=Ve(),s=__(),l=vwe(e,t),c=xwe(e,l),d=wwe(),f=!!(o.onDayCl
573ick||o.mode!=="default");w.useEffect(function(){var j;l.outside||s.focusedDay&&f&&Gt(s.focusedDay,e)&&((j=r.current)===null||j===void 0||j.focus())},[s.focusedDay,e,r,f,l.outside]);var h=Swe(o,l).join(" "),p=jwe(o,l),g=!!(l.outside&&!o.showOutsideDays||l.hidden),m=(i=(a=o.components)===null||a===void 0?void 0:a.DayContent)!==null&&i!==void 0?i:Vxe,v=u.jsx(m,{date:e,displayMonth:t,activeModifiers:l}),x={style:p,className:h,children:v,role:"gridcell"},b=s.focusTarget&&Gt(s.focusTarget,e)&&!l.outside,y=s.focusedDay&&Gt(s.focusedDay,e),S=de(de(de({},x),(n={disabled:l.disabled,role:"gridcell"},n["aria-selected"]=l.selected,n.tabIndex=y||b?0:-1,n)),c),_={isButton:f,isHidden:g,activeModifiers:l,selectedDays:d,buttonProps:S,divProps:x};return _}function Ewe(e){var t=w.useRef(null),r=kwe(e.date,e.displayMonth,t);return r.isHidden?u.jsx("div",{role:"gridcell"}):r.isButton?u.jsx(nm,de({name:"day",ref:t},r.buttonProps)):u.jsx("div",de({},r.divProps))}function Owe(e){var t=e.number,r=e.dates,n=Ve(),a=n.onWeekNumberClick,i=n.styles,o=n.classNames,s=n.locale,l=n.labels.labelWeekNumber,c=n.formatters.formatWeekNumber,d=c(Number(t),{locale:s});if(!a)return u.jsx("span",{className:o.weeknumber,style:i.weeknumber,children:d});var f=l(Number(t),{locale:s}),h=function(p){a(t,r,p)};return u.jsx(nm,{name:"week-number","aria-label":f,className:o.weeknumber,style:i.weeknumber,onClick:h,children:d})}function Nwe(e){var t,r,n=Ve(),a=n.styles,i=n.classNames,o=n.showWeekNumber,s=n.components,l=(t=s==null?void 0:s.Day)!==null&&t!==void 0?t:Ewe,c=(r=s==null?void 0:s.WeekNumber)!==null&&r!==void 0?r:Owe,d;return o&&(d=u.jsx("td",{className:i.cell,style:a.cell,children:u.jsx(c,{number:e.weekNumber,dates:e.dates})})),u.jsxs("tr",{className:i.row,style:a.row,children:[d,e.dates.map(function(f){return u.jsx("td",{className:i.cell,style:a.cell,role:"presentation",children:u.jsx(l,{displayMonth:e.displayMonth,date:f})},FV(f))})]})}function yP(e,t,r){for(var n=r!=null&&r.ISOWeek?a$(t):l1(t,r),a=r!=null&&r.ISOWeek?Lo(e):Pn(e,r),i=Xn(n,a),o=[],s=0;s<=i;s++)o.push(Et(a,s));var l=o.reduce(function(c,d){var f=r!=null&&r.ISOWeek?s$(d):c$(d,r),h=c.find(function(p){return p.weekNumber===f});return h?(h.dates.push(d),c):(c.push({weekNumber:f,dates:[d]}),c)},[]);return l}function Pwe(e,t){var r=yP(pr(e),s1(e),t);if(t!=null&&t.useFixedWeeks){var n=zV(e,t);if(n<6){var a=r[r.length-1],i=a.dates[a.dates.length-1],o=Z0(i,6-n),s=yP(Z0(i,1),o,t);r.push.apply(r,s)}}return r}function Cwe(e){var t,r,n,a=Ve(),i=a.locale,o=a.classNames,s=a.styles,l=a.hideHead,c=a.fixedWeeks,d=a.components,f=a.weekStartsOn,h=a.firstWeekContainsDate,p=a.ISOWeek,g=Pwe(e.displayMonth,{useFixedWeeks:!!c,ISOWeek:p,locale:i,weekStartsOn:f,firstWeekContainsDate:h}),m=(t=d==null?void 0:d.Head)!==null&&t!==void 0?t:qxe,v=(r=d==null?void 0:d.Row)!==null&&r!==void 0?r:Nwe,x=(n=d==null?void 0:d.Footer)!==null&&n!==void 0?n:zxe;return u.jsxs("table",{id:e.id,className:o.table,style:s.table,role:"grid","aria-labelledby":e["aria-labelledby"],children:[!l&&u.jsx(m,{}),u.jsx("tbody",{className:o.tbody,style:s.tbody,children:g.map(function(b){return u.jsx(v,{displayMonth:e.displayMonth,dates:b.dates,weekNumber:b.weekNumber},b.weekNumber)})}),u.jsx(x,{displayMonth:e.displayMonth})]})}function Twe(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var Awe=Twe()?w.useLayoutEffect:w.useEffect,wy=!1,Mwe=0;function bP(){return"react-day-picker-".concat(++Mwe)}function $we(e){var t,r=e??(wy?bP():null),n=w.useState(r),a=n[0],i=n[1];return Awe(function(){a===null&&i(bP())},[]),w.useEffect(function(){wy===!1&&(wy=!0)},[]),(t=e??a)!==null&&t!==void 0?t:void 0}function Rwe(e){var t,r,n=Ve(),a=n.dir,i=n.classNames,o=n.styles,s=n.components,l=Vd().displayMonths,c=$we(n.id?"".concat(n.id,"-").concat(e.displayIndex):void 0),d=n.id?"".concat(n.id,"-grid-").concat(e.displayIndex):void 0,f=[i.month],h=o.month,p=e.displayIndex===0,g=e.displayIndex===l.length-1,m=!p&&!g;a==="rtl"&&(t=[p,g],g=t[0],p=t[1]),p&&(f.push(i.caption_start),h=de(de({},h),o.caption_start)),g&&(f.push(i.caption_end),h=de(de({},h),o.caption_end)),m&&(f.push(i.caption_between),h=de(de({},h),o.caption_between));var v=(r=s==null?void 0:s.Caption)!==null&&r!==void 0?r:Uxe;return u.jsxs("div",{className:f.join(" "),style:h,children:[u.jsx(v,{id:c,displayMonth:e.displayMonth,displayIndex:e.displayIndex}),u.jsx(Cwe,{id:d,"aria-labelledby":c,displayMonth:e.displayMonth})]},e.displayIndex)}function Iwe(e){var t=Ve(),r=t.classNames,n=t.styles;return u.jsx("div",{className:r.months,style:n.months,children:e.children})}function Dwe(e){var t,r,n=e.initialProps,a=Ve(),i=__(),o=Vd(),s=w.useState(!1),l=s[0],c=s[1];w.useEffect(function(){a.initialFocus&&i.focusTarget&&(l||(i.focus(i.focusTarget),c(!0)))},[a.initialFocus,l,i.focus,i.focusTarget,i]);var d=[a.classNames.root,a.className];a.numberOfMonths>1&&d.push(a.classNames.multiple_months),a.showWeekNumber&&d.push(a.classNames.with_weeknumber);var f=de(de({},a.styles.root),a.style),h=Object.keys(n).filter(function(g){return g.startsWith("data-")}).reduce(function(g,m){var v;return de(de({},g),(v={},v[m]=n[m],v))},{}),p=(r=(t=n.components)===null||t===void 0?void 0:t.Months)!==null&&r!==void 0?r:Iwe;return u.jsx("div",de({className:d.join(" "),style:f,dir:a.dir,id:a.id,nonce:n.nonce,title:n.title,lang:n.lang},h,{children:u.jsx(p,{children:o.displayMonths.map(function(g,m){return u.jsx(Rwe,{displayIndex:m,displayMonth:g},m)})})}))}function Lwe(e){var t=e.children,r=lxe(e,["children"]);return u.jsx(Oxe,{initialProps:r,children:u.jsx(Dxe,{children:u.jsx(ywe,{initialProps:r,children:u.jsx(Kxe,{initialProps:r,children:u.jsx(Xxe,{initialProps:r,children:u.jsx(awe,{children:u.jsx(gwe,{children:t})})})})})})})}function Bwe(e){return u.jsx(Lwe,de({},e,{children:u.jsx(Dwe,{initialProps:e})}))}function j_({className:e,classNames:t,showOutsideDays:r=!0,...n}){return u.jsx(Bwe,{showOutsideDays:r,className:q("p-3",e),classNames:{months:"flex flex-col sm:flex-row space-y-4 sm:sp
573ace-x-4 sm:space-y-0",month:"space-y-4",caption:"flex justify-center pt-1 relative items-center",caption_label:"text-sm font-medium",nav:"space-x-1 flex items-center",nav_button:q(V0({variant:"outline"}),"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"),nav_button_previous:"absolute left-1",nav_button_next:"absolute right-1",table:"w-full border-collapse space-y-1",head_row:"flex",head_cell:"text-muted-foreground rounded-md w-9 font-normal text-[0.8rem]",row:"flex w-full mt-2",cell:"h-9 w-9 text-center text-sm p-0 relative [&:has([aria-selected].day-range-end)]:rounded-r-md [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected])]:bg-accent first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md focus-within:relative focus-within:z-20",day:q(V0({variant:"ghost"}),"h-9 w-9 p-0 font-normal aria-selected:opacity-100"),day_range_end:"day-range-end",day_selected:"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",day_today:"bg-accent text-accent-foreground",day_outside:"day-outside text-muted-foreground opacity-50 aria-selected:bg-accent/50 aria-selected:text-muted-foreground aria-selected:opacity-30",day_disabled:"text-muted-foreground opacity-50",day_range_middle:"aria-selected:bg-accent aria-selected:text-accent-foreground",day_hidden:"invisible",...t},components:{IconLeft:({...a})=>u.jsx(Cm,{className:"h-4 w-4"}),IconRight:({...a})=>u.jsx(Tm,{className:"h-4 w-4"})},...n})}j_.displayName="Calendar";const xP=e=>Rt(e,"yyyy-MM-dd"),Fwe=()=>{const{user:e}=Pt(),[t,r]=w.useState({}),[n,a]=w.useState(new Date),[i,o]=w.useState(""),[s,l]=w.useState(!0),[c,d]=w.useState(!1);w.useEffect(()=>{e&&(async()=>{const{data:y}=await ae.from("study_logs").select("id, study_date, notes, minutes_studied").eq("user_id",e.id).order("study_date",{ascending:!1}),S={};(y??[]).forEach(_=>S[_.study_date]=_),r(S),l(!1)})()},[e]),w.useEffect(()=>{var S;const y=xP(n);o(((S=t[y])==null?void 0:S.notes)??"")},[n,t]);const f=w.useMemo(()=>Object.values(t).map(y=>new Date(y.study_date+"T00:00:00")),[t]),h=xP(n),p=t[h],g=!!p,m=Object.keys(t).length,v=Object.values(t).reduce((y,S)=>y+(S.minutes_studied??0),0),x=async()=>{if(!e)return;d(!0);const y={user_id:e.id,study_date:h,notes:i.trim()||null,minutes_studied:(p==null?void 0:p.minutes_studied)??0},{data:S,error:_}=await ae.from("study_logs").upsert(y,{onConflict:"user_id,study_date"}).select().single();if(d(!1),_||!S){ve.error("Erro ao salvar",{description:_==null?void 0:_.message});return}r(j=>({...j,[h]:S})),ve.success("Dia marcado e anotação salva!")},b=async()=>{if(e){if(g&&!i.trim()&&(p.minutes_studied??0)===0){await ae.from("study_logs").delete().eq("id",p.id),r(y=>{const S={...y};return delete S[h],S}),ve.success("Dia desmarcado.");return}await x()}};return u.jsx(cr,{children:u.jsxs(Er,{children:[u.jsx(za,{eyebrow:"Sua jornada diária",title:u.jsxs(u.Fragment,{children:["Calendário de ",u.jsx("span",{className:"text-gradient-premium",children:"estudos"})]}),description:"Marque os dias que você estudou e escreva o que aprendeu. Constância vence intensidade."}),u.jsxs("div",{className:"grid grid-cols-2 gap-4 mb-8",children:[u.jsx($e,{className:"p-5",children:u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx("div",{className:"w-10 h-10 rounded-xl bg-gold/10 border border-gold/30 text-gold flex items-center justify-center",children:u.jsx(Yo,{className:"w-5 h-5"})}),u.jsxs("div",{children:[u.jsx("p",{className:"text-[10px] font-bold uppercase tracking-[0.18em] text-muted-foreground",children:"Dias estudados"}),u.jsx("p",{className:"font-display text-2xl font-bold mt-0.5 text-gradient-gold",children:m})]})]})}),u.jsx($e,{className:"p-5",children:u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx("div",{className:"w-10 h-10 rounded-xl bg-electric/10 border border-electric/30 text-electric flex items-center justify-center",children:u.jsx(UB,{className:"w-5 h-5"})}),u.jsxs("div",{children:[u.jsx("p",{className:"text-[10px] font-bold uppercase tracking-[0.18em] text-muted-foreground",children:"Tempo total"}),u.jsxs("p",{className:"font-display text-2xl font-bold mt-0.5 text-gradient-premium",children:[Math.round(v/60),"h"]})]})]})})]}),s?u.jsx("div",{className:"py-16 flex justify-center",children:u.jsx(Qe,{className:"w-6 h-6 animate-spin text-electric"})}):u.jsxs("div",{className:"grid gap-6 lg:grid-cols-[auto_1fr]",children:[u.jsx($e,{className:"p-4 self-start",children:u.jsx(j_,{mode:"single",selected:n,onSelect:y=>y&&a(y),locale:Xs,modifiers:{studied:f},modifiersClassNames:{studied:"relative after:content-[''] after:absolute after:bottom-1 after:left-1/2 after:-translate-x-1/2 after:w-1.5 after:h-1.5 after:rounded-full after:bg-electric after:shadow-electric-glow"},className:q("p-3 pointer-events-auto")})}),u.jsxs($e,{className:"p-6 md:p-7 flex flex-col",children:[u.jsxs("div",{className:"flex items-center justify-between gap-3 mb-4 flex-wrap",children:[u.jsxs("div",{children:[u.jsx("p",{className:"text-[10px] font-bold uppercase tracking-[0.18em] text-muted-foreground",children:Rt(n,"EEEE",{locale:Xs})}),u.jsx("h2",{className:"font-display font-semibold text-xl tracking-tight mt-1",children:Rt(n,"dd 'de' MMMM",{locale:Xs})}),u.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:p!=null&&p.minutes_studied?`${p.minutes_studied} min registrados via cronômetro`:"Sem tempo registrado pelo cronômetro"})]}),g&&u.jsxs(Bu,{className:"bg-gradient-gold border-0 text-white",children:[u.jsx(Md,{className:"w-3.5 h-3.5 mr-1"})," Estudado"]})]}
vendor: 4,900 bytes, line 573
573),u.jsx(Bg,{placeholder:"O que você estudou hoje? Tópicos, dúvidas, próximos passos…",value:i,onChange:y=>o(y.target.value),rows:10,className:"flex-1 min-h-[200px] text-[15px] leading-relaxed bg-card/40 backdrop-blur border-border/60"}),u.jsxs("div",{className:"flex gap-2 mt-4 flex-wrap",children:[u.jsxs(se,{onClick:x,disabled:c,className:"bg-gradient-to-r from-electric to-electric-glow text-white border-0 hover:opacity-90 shadow-electric-glow",children:[c?u.jsx(Qe,{className:"w-4 h-4 mr-2 animate-spin"}):u.jsx(YB,{className:"w-4 h-4 mr-2"}),"Salvar dia"]}),g&&u.jsx(se,{variant:"outline",onClick:b,className:"border-border/60",children:!i.trim()&&(p.minutes_studied??0)===0?"Desmarcar dia":"Atualizar"})]})]})]})]})})};var Ug="Popover",[GD,m_e]=Fa(Ug,[Ql]),Kd=Ql(),[Uwe,Vi]=GD(Ug),YD=e=>{const{__scopePopover:t,children:r,open:n,defaultOpen:a,onOpenChange:i,modal:o=!1}=e,s=Kd(t),l=w.useRef(null),[c,d]=w.useState(!1),[f,h]=$o({prop:n,defaultProp:a??!1,onChange:i,caller:Ug});return u.jsx(EA,{...s,children:u.jsx(Uwe,{scope:t,contentId:So(),triggerRef:l,open:f,onOpenChange:h,onOpenToggle:w.useCallback(()=>h(p=>!p),[h]),hasCustomAnchor:c,onCustomAnchorAdd:w.useCallback(()=>d(!0),[]),onCustomAnchorRemove:w.useCallback(()=>d(!1),[]),modal:o,children:r})})};YD.displayName=Ug;var XD="PopoverAnchor",zwe=w.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,a=Vi(XD,r),i=Kd(r),{onCustomAnchorAdd:o,onCustomAnchorRemove:s}=a;return w.useEffect(()=>(o(),()=>s()),[o,s]),u.jsx(Im,{...i,...n,ref:t})});zwe.displayName=XD;var JD="PopoverTrigger",QD=w.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,a=Vi(JD,r),i=Kd(r),o=Se(t,a.triggerRef),s=u.jsx(ge.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":n5(a.open),...n,ref:o,onClick:oe(e.onClick,a.onOpenToggle)});return a.hasCustomAnchor?s:u.jsx(Im,{asChild:!0,...i,children:s})});QD.displayName=JD;var k_="PopoverPortal",[Wwe,Hwe]=GD(k_,{forceMount:void 0}),ZD=e=>{const{__scopePopover:t,forceMount:r,children:n,container:a}=e,i=Vi(k_,t);return u.jsx(Wwe,{scope:t,forceMount:r,children:u.jsx(Li,{present:r||i.open,children:u.jsx(Pd,{asChild:!0,container:a,children:n})})})};ZD.displayName=k_;var Ul="PopoverContent",e5=w.forwardRef((e,t)=>{const r=Hwe(Ul,e.__scopePopover),{forceMount:n=r.forceMount,...a}=e,i=Vi(Ul,e.__scopePopover);return u.jsx(Li,{present:n||i.open,children:i.modal?u.jsx(Vwe,{...a,ref:t}):u.jsx(Kwe,{...a,ref:t})})});e5.displayName=Ul;var qwe=Mo("PopoverContent.RemoveScroll"),Vwe=w.forwardRef((e,t)=>{const r=Vi(Ul,e.__scopePopover),n=w.useRef(null),a=Se(t,n),i=w.useRef(!1);return w.useEffect(()=>{const o=n.current;if(o)return n1(o)},[]),u.jsx(qm,{as:qwe,allowPinchZoom:!0,children:u.jsx(t5,{...e,ref:a,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:oe(e.onCloseAutoFocus,o=>{var s;o.preventDefault(),i.current||(s=r.triggerRef.current)==null||s.focus()}),onPointerDownOutside:oe(e.onPointerDownOutside,o=>{const s=o.detail.originalEvent,l=s.button===0&&s.ctrlKey===!0,c=s.button===2||l;i.current=c},{checkForDefaultPrevented:!1}),onFocusOutside:oe(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1})})})}),Kwe=w.forwardRef((e,t)=>{const r=Vi(Ul,e.__scopePopover),n=w.useRef(!1),a=w.useRef(!1);return u.jsx(t5,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var o,s;(o=e.onCloseAutoFocus)==null||o.call(e,i),i.defaultPrevented||(n.current||(s=r.triggerRef.current)==null||s.focus(),i.preventDefault()),n.current=!1,a.current=!1},onInteractOutside:i=>{var l,c;(l=e.onInteractOutside)==null||l.call(e,i),i.defaultPrevented||(n.current=!0,i.detail.originalEvent.type==="pointerdown"&&(a.current=!0));const o=i.target;((c=r.triggerRef.current)==null?void 0:c.contains(o))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&a.current&&i.preventDefault()}})}),t5=w.forwardRef((e,t)=>{const{__scopePopover:r,trapFocus:n,onOpenAutoFocus:a,onCloseAutoFocus:i,disableOutsidePointerEvents:o,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:c,onInteractOutside:d,...f}=e,h=Vi(Ul,r),p=Kd(r);return t1(),u.jsx(Wm,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:a,onUnmountAutoFocus:i,children:u.jsx(Gl,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:d,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:c,onDismiss:()=>h.onOpenChange(!1),children:u.jsx(Gw,{"data-state":n5(h.open),role:"dialog",id:h.contentId,...p,...f,ref:t,style:{...f.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),r5="PopoverClose",Gwe=w.forwardRef((e,t)=>
573{const{__scopePopover:r,...n}=e,a=Vi(r5,r);return u.jsx(ge.button,{type:"button",...n,ref:t,onClick:oe(e.onClick,()=>a.onOpenChange(!1))})});Gwe.displayName=r5;var Ywe="PopoverArrow",Xwe=w.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,a=Kd(r);return u.jsx(Yw,{...a,...n,ref:t})});Xwe.displayName=Ywe;function n5(e){return e?"open":"closed"}var Jwe=YD,Qwe=QD,Zwe=ZD,a5=e5;const e1e=Jwe,t1e=Qwe,i5=w.forwardRef(({className:e,align:t="center",sideOffset:r=4,...n},a)=>u.jsx(Zwe,{children:u.jsx(a5,{ref:a,align:t,sideOffset:r,className:q("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));i5.displayName=a5.displayName;const Sx=[{key:"purple",label:"Estudo",pillCls:"bg-purple/15 text-purple border-purple/30",borderCls:"border-l-purple"},{key:"coral",label:"Redação",pillCls:"bg-coral/15 text-coral border-coral/30",borderCls:"border-l-coral"},{key:"teal",label:"Revisão",pillCls:"bg-teal/15 text-teal border-teal/30",borderCls:"border-l-teal"},{key:"amber",label:"Pausa",pillCls:"bg-amber/15 text-amber border-amber/30",borderCls:"border-l-amber"},{key:"blue",label:"Outro",pillCls:"bg-electric/15 text-electric border-electric/30",borderCls:"border-l-electric"}],r1e=e=>Sx.find(t=>t.key===e)??Sx[0],n1e=e=>Rt(e,"yyyy-MM-dd"),a1e=()=>{const{user:e}=Pt(),[t,r]=w.useState(new Date),[n,a]=w.useState([]),[i,o]=w.useState(!0),[s,l]=w.useState(!1),[c,d]=w.useState("08:00"),[f,h]=w.useState(""),[p,g]=w.useState("purple"),m=n1e(t),v=async()=>{if(!e)return;o(!0);const{data:j}=await ae.from("planner_tasks").select("*").eq("user_id",e.id).eq("task_date",m).order("time_label",{ascending:!0}).order("position",{ascending:!0});a(j??[]),o(!1)};w.useEffect(()=>{v()},[e,m]);const x=async()=>{if(!e)return;const j=f.trim();if(!j){ve.error("Escreva a tarefa");return}l(!0);const{data:k,error:E}=await ae.from("planner_tasks").insert({user_id:e.id,task_date:m,time_label:c,title:j,category:p,position:n.length}).select().single();if(l(!1),E||!k){ve.error("Erro ao adicionar");return}a(O=>[...O,k].sort((A,T)=>A.time_label.localeCompare(T.time_label))),h(""),ve.success("Tarefa adicionada")},b=async j=>{const k=!j.done;a(E=>E.map(O=>O.id===j.id?{...O,done:k}:O)),await ae.from("planner_tasks").update({done:k}).eq("id",j.id)},y=async j=>{a(k=>k.filter(E=>E.id!==j)),await ae.from("planner_tasks").delete().eq("id",j)},S=w.useMemo(()=>n.filter(j=>j.done).length,[n]),_=n.length?Math.round(S/n.length*100):0;return u.jsx(cr,{children:u.jsxs(Er,{children:[u.jsx(za,{eyebrow:"Sua rotina diária",title:u.jsxs(u.Fragment,{children:["Planner de ",u.jsx("span",{className:"text-gradient-premium",children:"hoje"})]}),description:"Organize seus blocos de estudo, revisão e pausas. Constância vence intensidade."}),u.jsxs("div",{className:"grid gap-6 lg:grid-cols-[1.4fr_1fr]",children:[u.jsxs($e,{className:"p-6 md:p-7",children:[u.jsxs("div",{className:"flex items-center justify-between gap-3 flex-wrap mb-5",children:[u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx("div",{className:"w-10 h-10 rounded-xl bg-electric/10 border border-electric/30 text-electric flex items-center justify-center",children:u.jsx(Ta,{className:"w-5 h-5"})}),u.jsxs("div",{children:[u.jsx("p",{className:"text-[10px] font-bold uppercase tracking-[0.18em] text-muted-foreground",children:"Meu planner"}),u.jsx("h2",{className:"font-display font-semibold text-lg tracking-tight capitalize",children:Rt(t,"EEEE, dd 'de' MMM",{locale:Xs})})]})]}),u.jsxs(e1e,{children:[u.jsx(t1e,{asChild:!0,children:u.jsxs(se,{variant:"outline",size:"sm",className:"border-border/60",children:[u.jsx(Td,{className:"w-4 h-4 mr-2"})," Trocar dia"]})}),u.jsx(i5,{className:"w-auto p-0",align:"end",children:u.jsx(j_,{mode:"single",selected:t,onSelect:j=>j&&r(j),locale:Xs,className:"p-3 pointer-events-auto"})})]})]}),u.jsxs("div",{className:"mb-5",children:[u.jsxs("div",{className:"flex items-center justify-between text-xs mb-2",children:[u.jsxs("span",{className:"text-muted-foreground font-medium",children:[S," de ",n.length," concluídas"]}),u.jsxs("span",{className:"font-bold text-gradient-premium tabular-nums",children:[_,"%"]})]}),u.jsx("div",{className:"h-2 rounded-full bg-muted/50 overflow-hidden",children:u.jsx("div",{className:"h-full bg-gradient-to-r from-electric to-electric-glow shadow-electric-glow transition-all duration-500",style:{width:`${_}%`}})})]}
573),i?u.jsx("div",{className:"py-12 flex justify-center",children:u.jsx(Qe,{className:"w-5 h-5 animate-spin text-electric"})}):n.length===0?u.jsx("div",{className:"py-10 text-center text-sm text-muted-foreground",children:"Nenhuma tarefa pra esse dia ainda. Adicione a primeira abaixo 👇"}):u.jsx("div",{className:"space-y-2.5",children:n.map(j=>{const k=r1e(j.category);return u.jsxs("div",{className:q("group flex items-center gap-3 p-3.5 rounded-xl bg-card/40 backdrop-blur border border-border/50 border-l-4 transition-all hover:bg-card/70",k.borderCls,j.done&&"opacity-60"),children:[u.jsx("span",{className:"text-xs font-bold text-muted-foreground tabular-nums min-w-[48px]",children:j.time_label}),u.jsx("button",{onClick:()=>b(j),"aria-label":j.done?"Desmarcar":"Concluir",className:q("w-6 h-6 rounded-md flex items-center justify-center flex-shrink-0 transition-all border",j.done?"bg-gradient-to-br from-electric to-electric-glow border-electric text-white shadow-electric-glow":"border-dashed border-border hover:border-electric/60"),children:j.done&&u.jsx(Pm,{className:"w-3.5 h-3.5"})}),u.jsx("span",{className:q("flex-1 text-sm font-medium",j.done&&"line-through text-muted-foreground"),children:j.title}),u.jsx("span",{className:q("text-[10px] font-bold uppercase tracking-wider px-2.5 py-1 rounded-full border",k.pillCls),children:k.label}),u.jsx("button",{onClick:()=>y(j.id),className:"opacity-0 group-hover:opacity-100 text-muted-foreground hover:text-destructive transition","aria-label":"Remover",children:u.jsx(q2,{className:"w-4 h-4"})})]},j.id)})})]}),u.jsxs($e,{className:"p-6 md:p-7 self-start",children:[u.jsx("h3",{className:"font-display font-semibold text-lg tracking-tight mb-1",children:"Nova tarefa"}),u.jsx("p",{className:"text-xs text-muted-foreground mb-5",children:"Adicione um bloco no seu dia"}),u.jsxs("div",{className:"space-y-3.5",children:[u.jsxs("div",{children:[u.jsx("label",{className:"text-[11px] uppercase tracking-wider font-bold text-muted-foreground",children:"Horário"}),u.jsx(gt,{type:"time",value:c,onChange:j=>d(j.target.value),className:"mt-1.5 bg-card/40 backdrop-blur border-border/60"})]}),u.jsxs("div",{children:[u.jsx("label",{className:"text-[11px] uppercase tracking-wider font-bold text-muted-foreground",children:"Tarefa"}),u.jsx(gt,{value:f,onChange:j=>h(j.target.value),onKeyDown:j=>j.key==="Enter"&&x(),placeholder:"Ex: Matemática — Funções (20 q.)",className:"mt-1.5 bg-card/40 backdrop-blur border-border/60"})]}),u.jsxs("div",{children:[u.jsx("label",{className:"text-[11px] uppercase tracking-wider font-bold text-muted-foreground",children:"Categoria"}),u.jsxs(Gn,{value:p,onValueChange:g,children:[u.jsx(yn,{className:"mt-1.5 bg-card/40 backdrop-blur border-border/60",children:u.jsx(Yn,{})}),u.jsx(bn,{children:Sx.map(j=>u.jsx(Wr,{value:j.key,children:j.label},j.key))})]})]}),u.jsxs(se,{onClick:x,disabled:s,className:"w-full bg-gradient-to-r from-electric to-electric-glow text-white border-0 hover:opacity-90 shadow-electric-glow",children:[s?u.jsx(Qe,{className:"w-4 h-4 mr-2 animate-spin"}):u.jsx($w,{className:"w-4 h-4 mr-2"}),"Adicionar ao planner"]})]})]})]})]})})},i1e={matematica:"Matemática","ciencias-natureza":"Ciências da Natureza","ciencias-humanas":"Ciências Humanas",linguagens:"Linguagens"},wP=["hsl(var(--electric))","hsl(var(--gold))","hsl(var(--teal))","hsl(var(--pink))"],E_=e=>{const t=new Date(e);return t.setHours(0,0,0,0),t},o1e=e=>{const t=E_(e),r=t.getDay(),n=r===0?-6:1-r;return t.setDate(t.getDate()+n),t},s1e=e=>{const t=E_(e);return t.setDate(1),t},l1e=e=>e.toLocaleDateString("pt-BR",{day:"2-digit",month:"2-digit"}),Xf=({icon:e,label:t,value:r,hint:n,accent:a,progress:i})=>{const o=a==="gold";return u.jsxs($e,{className:"p-5 relative",children:[u.jsx("div",{"aria-hidden":!0,className:q("absolute -top-12 -right-12 w-32 h-32 rounded-full blur-3xl",o?"bg-gold/15":"bg-electric/15")}),u.jsxs("div",{className:"relative flex items-center gap-3 mb-3",children:[u.jsx("div",{className:q("w-10 h-10 rounded-xl flex items-center justify-center border",o?"bg-gold/10 border-gold/30 text-gold":"bg-electric/10 border-electric/30 text-electric"),children:u.jsx(e,{className:"w-5 h-5"})}),u.jsx("p",{className:"text-[10px] font-bold uppercase tracking-[0.18em] text-muted-foreground",children:t})]}),u.jsx("p",{className:q("relative font-display text-4xl font-bold tabular-nums tracking-tight",o?"text-gradient-gold":"text-gradient-premium"),children:r}),n&&u.jsx("p",{className:"relative text-xs text-muted-foreground mt-1.5",children:n}),i!==void 0&&u.jsx("div",{className:"relative h-1.5 bg-muted/40 rounded-full mt-3 overflow-hidden",children:u.jsx("div",{className:q("h-full transition-all rounded-full",o?"bg-gradient-gold 
573shadow-gold-glow":"bg-gradient-to-r from-electric to-electric-glow shadow-electric-glow"),style:{width:`${Math.min(100,i)}%`}})})]})},c1e=()=>{const{user:e}=Pt(),[t,r]=w.useState([]),[n,a]=w.useState(!0);w.useEffect(()=>{e&&(async()=>{a(!0);const{data:s}=await ae.from("simulado_attempts").select("id, discipline, total_questions, correct_answers, created_at").eq("user_id",e.id).order("created_at",{ascending:!1});r(s??[]),a(!1)})()},[e]);const i=w.useMemo(()=>{const s=new Date,l=E_(s),c=o1e(s),d=s1e(s);let f=0,h=0,p=0,g=0;for(const P of t){const B=new Date(P.created_at),U=P.total_questions??0;g+=U,B>=d&&(p+=U),B>=c&&(h+=U),B>=l&&(f+=U)}const m=[];for(let P=29;P>=0;P--){const B=new Date(l);B.setDate(B.getDate()-P),m.push({day:l1e(B),date:B.toISOString().slice(0,10),exercicios:0})}const v=new Map(m.map((P,B)=>[P.date,B]));for(const P of t){const B=new Date(P.created_at).toISOString().slice(0,10),U=v.get(B);U!==void 0&&(m[U].exercicios+=P.total_questions??0)}const x={};for(const P of t)x[P.discipline]=(x[P.discipline]??0)+(P.total_questions??0);const b=Object.values(x).reduce((P,B)=>P+B,0),S=Object.entries(x).sort((P,B)=>B[1]-P[1]).map(([P,B],U)=>({name:i1e[P]??P,value:B,ratio:b?B/b*100:0,color:wP[U%wP.length]})).map(P=>({...P,floor:Math.floor(P.ratio),rem:P.ratio-Math.floor(P.ratio)}));let _=b?100-S.reduce((P,B)=>P+B.floor,0):0;const j=[...S].sort((P,B)=>B.rem-P.rem),k=new Set;for(const P of j){if(_<=0)break;k.add(P.name),_-=1}const E=S.map(P=>({name:P.name,value:P.value,ratio:P.ratio,pct:P.floor+(k.has(P.name)?1:0),color:P.color})),O=new Set(t.map(P=>new Date(P.created_at).toISOString().slice(0,10)));let A=0;const T=new Date(l);for(O.has(T.toISOString().slice(0,10))||T.setDate(T.getDate()-1);O.has(T.toISOString().slice(0,10));)A+=1,T.setDate(T.getDate()-1);const N=m.slice(-7),I=m.slice(-14,-7),R=N.reduce((P,B)=>P+B.exercicios,0),D=I.reduce((P,B)=>P+B.exercicios,0),L=Math.round(R/7),M=D?Math.round((R-D)/D*100):R>0?100:0,C=Math.max(1,...m.map(P=>P.exercicios));return{countToday:f,countWeek:h,countMonth:p,countTotal:g,last30:m,pieData:E,streak:A,avgPerDay:L,growth:M,last30Max:C}},[t]),o=10;return n?u.jsx(cr,{children:u.jsx(Er,{children:u.jsx("div",{className:"py-24 flex justify-center",children:u.jsx(Qe,{className:"w-6 h-6 animate-spin text-electric"})})})}):u.jsx(cr,{children:u.jsxs(Er,{children:[u.jsx(za,{eyebrow:"Sua performance",title:u.jsxs(u.Fragment,{children:["Suas ",u.jsx("span",{className:"text-gradient-premium",children:"estatísticas"})]}),description:"Acompanhe quantos exercícios você resolveu nos simulados ENEM. Métricas que importam."}),u.jsxs("div",{className:"grid gap-4 grid-cols-1 sm:grid-cols-2 mb-6",children:[u.jsx(Xf,{icon:qh,label:"Hoje",value:i.countToday,accent:"electric",progress:i.countToday/o*100,hint:u.jsxs(u.Fragment,{children:["meta: ",o," · ",Math.min(100,Math.round(i.countToday/o*100)),"%"]})}),u.jsx(Xf,{icon:Td,label:"Semana",value:i.countWeek,accent:"gold",hint:`média ${i.avgPerDay}/dia`}),u.jsx(Xf,{icon:K2,label:"Mês",value:i.countMonth,accent:"electric",hint:`total ${i.countTotal}`}),u.jsx(Xf,{icon:Yo,label:"Sequência",value:`${i.streak}d`,accent:"gold",hint:i.streak>0?"Continue assim 🔥":"Comece um simulado hoje"})]}),u.jsxs($e,{className:"p-6 md:p-7 mb-6 relative overflow-hidden",children:[u.jsx("div",{"aria-hidden":!0,className:"absolute -bottom-16 -right-16 w-48 h-48 rounded-full bg-electric/15 blur-3xl"}),u.jsxs("div",{className:"relative flex items-center justify-between mb-5 gap-3 flex-wrap",children:[u.jsxs("h2",{className:"font-display font-semibold text-base md:text-lg tracking-tight",children:["Exercícios por dia",u.jsx("span",{className:"text-muted-foreground text-sm font-medium",children:" · últimos 30 dias"})]}),i.countTotal>0&&u.jsxs("span",{className:q("text-[11px] font-extrabold tabular-nums px-2 py-0.5 rounded-md",i.growth>=0?"text-gold bg-gold/10":"text-muted-foreground bg-muted/40"),children:[i.growth>=0?"+":"",i.growth,"%"]})]}),u.jsx("div",{className:"relative flex items-end gap-[3px] sm:gap-1 h-28",children:i.last30.map(s=>{const l=s.exercicios/i.last30Max*100;return u.jsx("div",{className:"group relative flex-1 flex flex-col justify-end h-full",title:`${s.day} · ${s.exercicios} exercícios`,children:u.jsx("div",{className:"w-full rounded-full bg-[linear-gradient(180deg,hsl(var(--electric))_0%,hsl(var(--electric)/0.5)_100%)] shadow-[0_0_8px_hsl(var(--electric)/0.35)]",style:{height:`${Math.max(l,s.exercicios>0?8:3)}%`,minHeight:s.exercicios>0?"6px":"3px",opacity:s.exercicios>0?1:.25}})},s.date)})})]}),u.jsxs($e,{className:"p-6 md:p-7 relative overflow-hidden",children:[u.jsx("div",{"aria-hidden":!0,
573className:"absolute -top-12 -left-12 w-44 h-44 rounded-full bg-gold/10 blur-3xl"}),u.jsx("h2",{className:"relative font-display font-semibold text-base md:text-lg tracking-tight mb-5",children:"Distribuição por matéria"}),i.pieData.length===0?u.jsx("p",{className:"relative text-sm text-muted-foreground",children:"Faça seu primeiro simulado pra ver as estatísticas aqui."}):u.jsxs("div",{className:"relative flex items-center gap-6 md:gap-8 flex-wrap sm:flex-nowrap",children:[u.jsx("div",{className:"w-36 h-36 rounded-full shrink-0 grid place-items-center mx-auto sm:mx-0",style:{background:`conic-gradient(${i.pieData.reduce((s,l)=>{const c=s.acc,d=s.acc+l.ratio;return s.stops.push(`${l.color} ${c.toFixed(3)}% ${d.toFixed(3)}%`),s.acc=d,s},{stops:[],acc:0}).stops.join(", ")})`},children:u.jsx("div",{className:"w-24 h-24 rounded-full bg-card grid place-items-center border border-border/40 shadow-inner",children:u.jsxs("div",{className:"text-center",children:[u.jsx("p",{className:"font-display text-2xl font-bold tabular-nums text-gradient-premium leading-none",children:i.countTotal}),u.jsx("p",{className:"text-[9px] uppercase tracking-wider text-muted-foreground font-bold mt-1",children:"total"})]})})}
573),u.jsx("div",{className:"flex-1 min-w-0 w-full flex flex-col gap-2.5",children:i.pieData.map(s=>u.jsxs("div",{className:"flex items-center gap-3 text-sm",children:[u.jsx("span",{className:"w-2.5 h-2.5 rounded-sm shrink-0",style:{background:s.color}}),u.jsx("span",{className:"text-foreground/85 truncate flex-1",children:s.name}),u.jsxs("span",{className:"text-[11px] text-muted-foreground tabular-nums shrink-0",children:[s.value," ",s.value===1?"ex.":"exs."]}),u.jsxs("span",{className:"text-xs font-bold tabular-nums text-foreground w-10 text-right shrink-0",children:[s.pct,"%"]})]},s.name))})]})]})]})})};var zg="Switch",[u1e,g_e]=Fa(zg),[d1e,f1e]=u1e(zg),o5=w.forwardRef((e,t)=>{const{__scopeSwitch:r,name:n,checked:a,defaultChecked:i,required:o,disabled:s,value:l="on",onCheckedChange:c,form:d,...f}=e,[h,p]=w.useState(null),g=Se(t,y=>p(y)),m=w.useRef(!1),v=h?d||!!h.closest("form"):!0,[x,b]=$o({prop:a,defaultProp:i??!1,onChange:c,caller:zg});return u.jsxs(d1e,{scope:r,checked:x,disabled:s,children:[u.jsx(ge.button,{type:"button",role:"switch","aria-checked":x,"aria-required":o,"data-state":u5(x),"data-disabled":s?"":void 0,disabled:s,value:l,...f,ref:g,onClick:oe(e.onClick,y=>{b(S=>!S),v&&(m.current=y.isPropagationStopped(),m.current||y.stopPropagation())})}),v&&u.jsx(c5,{control:h,bubbles:!m.current,name:n,value:l,checked:x,required:o,disabled:s,form:d,style:{transform:"translateX(-100%)"}})]})});o5.displayName=zg;var s5="SwitchThumb",l5=w.forwardRef((e,t)=>{const{__scopeSwitch:r,...n}=e,a=f1e(s5,r);return u.jsx(ge.span,{"data-state":u5(a.checked),"data-disabled":a.disabled?"":void 0,...n,ref:t})});l5.displayName=s5;var h1e="SwitchBubbleInput",c5=w.forwardRef(({__scopeSwitch:e,control:t,checked:r,bubbles:n=!0,...a},i)=>{const o=w.useRef(null),s=Se(o,i),l=r1(r),c=qw(t);return w.useEffect(()=>{const d=o.current;if(!d)return;const f=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(f,"checked").set;if(l!==r&&p){const g=new Event("click",{bubbles:n});p.call(d,r),d.dispatchEvent(g)}},[l,r,n]),u.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...a,tabIndex:-1,ref:s,style:{...a.style,...c,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});c5.displayName=h1e;function u5(e){return e?"checked":"unchecked"}var d5=o5,p1e=l5;const am=w.forwardRef(({className:e,...t},r)=>u.jsx(d5,{className:q("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50",e),...t,ref:r,children:u.jsx(p1e,{className:q("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));am.displayName=d5.displayName;const m1e=()=>{const{user:e}=Pt(),{theme:t,setTheme:r}=rM(),[n,a]=w.useState("pomodoro_25"),[i,o]=w.useState(!0);w.useEffect(()=>{e&&(async()=>{const{data:c}=await ae.from("user_preferences").select("default_method, sound_enabled").eq("user_id",e.id).maybeSingle();c&&(c.default_method&&a(c.default_method),typeof c.sound_enabled=="boolean"&&o(c.sound_enabled))})()},[e]);const s=async c=>{if(!e)return;const{error:d}=await ae.from("user_preferences").upsert({user_id:e.id,...c},{onConflict:"user_id"});d&&ve.error("Erro ao salvar preferência")},l=({icon:c,accent:d="electric"})=>u.jsx("div",{className:q("w-10 h-10 rounded-xl flex items-center justify-center border shrink-0",d==="gold"?"bg-gold/10 border-gold/30 text-gold":"bg-electric/10 border-electric/30 text-electric"),children:u.jsx(c,{className:"w-4.5 h-4.5"})});return u.jsx(cr,{children:u.jsxs(Er,{maxWidth:"md",children:[u.jsx(za,{eyebrow:"Personalize sua experiência",title:u.jsxs(u.Fragment,{children:["Suas ",u.jsx("span",{className:"text-gradient-premium",children:"configurações"})]}),description:"Ajuste o painel do jeito que você gosta de estudar."}),u.jsxs("div",{className:"space-y-5",children:[u.jsx($e,{className:"p-6",children:u.jsxs("div",{className:"flex items-center justify-between gap-4",children:[u.jsxs("div",{className:"flex items-start gap-4",children:[u.jsx(l,{icon:Hh,accent:"electric"}),u.jsxs("div",{children:[u.jsx(Me,{className:"font-display font-semibold text-base",children:"Tema escuro"}),u.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Mais confortável pra estudar à noite."})]})]}),u.jsx(am,{checked:t==="dark",onCheckedChange:c=>r(c?"dark":"light")})]})}),u.jsx($e,{className:"p-6",children:u.jsxs("div",{className:"flex items-center justify-between gap-4",children:[u.jsxs("div",{className:"flex items-start gap-4",children:[u.jsx(l,{icon:aF,accent:"gold"}),u.jsxs("div",{children:[u.jsx(Me,{className:"font-display font-semibold text-base",children:"Alerta sonoro do cronômetro"}),u.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Toca um som quando termina o foco ou descanso."})]})]}),u.jsx(am,{checked:i,onCheckedChange:c=>{o(c),s({sound_enabled:c})}})]})}),u.jsxs($e,{className:"p-6",children:[u.jsxs("div",{className:"flex items-start gap-4 mb-4",children:[u.jsx(l,{icon:Iw,accent:"electric"}),u.jsxs("div",{className:"flex-1",children:[u.jsx(Me,{className:"font-display font-semibold text-base",children:"Método padrão"}),u.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Será selecionado automaticamente ao abrir a tela de Métodos."})]})]}),u.jsxs(Gn,{value:n,onValueChange:c=>{a(c),s({default_method:c})},children:[u.jsx(yn,{className:"bg-card/40 backdrop-blur border-border/60",children:u.jsx(Yn,{})}),u.jsx(bn,{children:ep.map(c=>u.jsxs(Wr,{value:c.key,children:[c.emoji," ",c.title," — ",c.focus,"/",c.break," min"]},c.key))})]})]}),u.jsx($e,{className:"p-6",children:u.jsxs("div",{className:"flex items-center gap-4",children:[u.jsx(l,{icon:nF,accent:"gold"}),u.jsxs("div",{children:[u.jsx(Me,{className:"font-display font-semibold text-base",children:"Conta"}),u.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:e==null?void 0:e.email})]})]})})]})]})})};var f5=["PageUp","PageDown"],h5=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],p5={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},hc="Slider",[jx,g1e,v1e]=Nw(hc),[m5,v_e]=Fa(hc,[v1e]),[y1e,Wg]=m5(hc),g5=w.forwardRef((e,t)=>
573{const{name:r,min:n=0,max:a=100,step:i=1,orientation:o="horizontal",disabled:s=!1,minStepsBetweenThumbs:l=0,defaultValue:c=[n],value:d,onValueChange:f=()=>{},onValueCommit:h=()=>{},inverted:p=!1,form:g,...m}=e,v=w.useRef(new Set),x=w.useRef(0),y=o==="horizontal"?b1e:x1e,[S=[],_]=$o({prop:d,defaultProp:c,onChange:T=>{var I;(I=[...v.current][x.current])==null||I.focus(),f(T)}}),j=w.useRef(S);function k(T){const N=k1e(S,T);A(T,N)}function E(T){A(T,x.current)}function O(){const T=j.current[x.current];S[x.current]!==T&&h(S)}function A(T,N,{commit:I}={commit:!1}){const R=P1e(i),D=C1e(Math.round((T-n)/i)*i+n,R),L=tp(D,[n,a]);_((M=[])=>{const C=S1e(M,L,N);if(N1e(C,l*i)){x.current=C.indexOf(L);const P=String(C)!==String(M);return P&&I&&h(C),P?C:M}else return M})}return u.jsx(y1e,{scope:e.__scopeSlider,name:r,disabled:s,min:n,max:a,valueIndexToChangeRef:x,thumbs:v.current,values:S,orientation:o,form:g,children:u.jsx(jx.Provider,{scope:e.__scopeSlider,children:u.jsx(jx.Slot,{scope:e.__scopeSlider,children:u.jsx(y,{"aria-disabled":s,"data-disabled":s?"":void 0,...m,ref:t,onPointerDown:oe(m.onPointerDown,()=>{s||(j.current=S)}),min:n,max:a,inverted:p,onSlideStart:s?void 0:k,onSlideMove:s?void 0:E,onSlideEnd:s?void 0:O,onHomeKeyDown:()=>!s&&A(n,0,{commit:!0}),onEndKeyDown:()=>!s&&A(a,S.length-1,{commit:!0}),onStepKeyDown:({event:T,direction:N})=>{if(!s){const D=f5.includes(T.key)||T.shiftKey&&h5.includes(T.key)?10:1,L=x.current,M=S[L],C=i*D*N;A(M+C,L,{commit:!0})}}})})})})});g5.displayName=hc;var[v5,y5]=m5(hc,{startEdge:"left",endEdge:"right",size:"width",direction:1}),b1e=w.forwardRef((e,t)=>{const{min:r,max:n,dir:a,inverted:i,onSlideStart:o,onSlideMove:s,onSlideEnd:l,onStepKeyDown:c,...d}=e,[f,h]=w.useState(null),p=Se(t,y=>h(y)),g=w.useRef(void 0),m=cM(a),v=m==="ltr",x=v&&!i||!v&&i;function b(y){const S=g.current||f.getBoundingClientRect(),_=[0,S.width],k=O_(_,x?[r,n]:[n,r]);return g.current=S,k(y-S.left)}return u.jsx(v5,{scope:e.__scopeSlider,startEdge:x?"left":"right",endEdge:x?"right":"left",direction:x?1:-1,size:"width",children:u.jsx(b5,{dir:m,"data-orientation":"horizontal",...d,ref:p,style:{...d.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:y=>{const S=b(y.clientX);o==null||o(S)},onSlideMove:y=>{const S=b(y.clientX);s==null||s(S)},onSlideEnd:()=>{g.current=void 0,l==null||l()},onStepKeyDown:y=>{const _=p5[x?"from-left":"from-right"].includes(y.key);c==null||c({event:y,direction:_?-1:1})}})})}),x1e=w.forwardRef((e,t)=>{const{min:r,max:n,inverted:a,onSlideStart:i,onSlideMove:o,onSlideEnd:s,onStepKeyDown:l,...c}=e,d=w.useRef(null),f=Se(t,d),h=w.useRef(void 0),p=!a;function g(m){const v=h.current||d.current.getBoundingClientRect(),x=[0,v.height],y=O_(x,p?[n,r]:[r,n]);return h.current=v,y(m-v.top)}return u.jsx(v5,{scope:e.__scopeSlider,startEdge:p?"bottom":"top",endEdge:p?"top":"bottom",size:"height",direction:p?1:-1,children:u.jsx(b5,{"data-orientation":"vertical",...c,ref:f,style:{...c.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:m=>{const v=g(m.clientY);i==null||i(v)},onSlideMove:m=>{const v=g(m.clientY);o==null||o(v)},onSlideEnd:()=>{h.current=void 0,s==null||s()},onStepKeyDown:m=>{const x=p5[p?"from-bottom":"from-top"].includes(m.key);l==null||l({event:m,direction:x?-1:1})}})})}),b5=w.forwardRef((e,t)=>{const{__scopeSlider:r,onSlideStart:n,onSlideMove:a,onSlideEnd:i,onHomeKeyDown:o,onEndKeyDown:s,onStepKeyDown:l,...c}=e,d=Wg(hc,r);return u.jsx(ge.span,{...c,ref:t,onKeyDown:oe(e.onKeyDown,f=>{f.key==="Home"?(o(f),f.preventDefault()):f.key==="End"?(s(f),f.preventDefault()):f5.concat(h5).includes(f.key)&&(l(f),f.preventDefault())}),onPointerDown:oe(e.onPointerDown,f=>{const h=f.target;h.setPointerCapture(f.pointerId),f.preventDefault(),d.thumbs.has(h)?h.focus():n(f)}),onPointerMove:oe(e.onPointerMove,f=>{f.target.hasPointerCapture(f.pointerId)&&a(f)}),onPointerUp:oe(e.onPointerUp,f=>{const h=f.target;h.hasPointerCapture(f.pointerId)&&(h.releasePointerCapture(f.pointerId),i(f))})})}),x5="SliderTrack",w5=w.forwardRef((e,t)=>{const{__scopeSlider:r,...n}=e,a=Wg(x5,r);return u.jsx(ge.span,{"data-disabled":a.disabled?"":void 0,"data-orientation":a.orientation,...n,ref:t})});w5.displayName=x5;var kx="SliderRange",_5=w.forwardRef((e,t)=>
573{const{__scopeSlider:r,...n}=e,a=Wg(kx,r),i=y5(kx,r),o=w.useRef(null),s=Se(t,o),l=a.values.length,c=a.values.map(h=>k5(h,a.min,a.max)),d=l>1?Math.min(...c):0,f=100-Math.max(...c);return u.jsx(ge.span,{"data-orientation":a.orientation,"data-disabled":a.disabled?"":void 0,...n,ref:s,style:{...e.style,[i.startEdge]:d+"%",[i.endEdge]:f+"%"}})});_5.displayName=kx;var Ex="SliderThumb",S5=w.forwardRef((e,t)=>{const r=g1e(e.__scopeSlider),[n,a]=w.useState(null),i=Se(t,s=>a(s)),o=w.useMemo(()=>n?r().findIndex(s=>s.ref.current===n):-1,[r,n]);return u.jsx(w1e,{...e,ref:i,index:o})}),w1e=w.forwardRef((e,t)=>{const{__scopeSlider:r,index:n,name:a,...i}=e,o=Wg(Ex,r),s=y5(Ex,r),[l,c]=w.useState(null),d=Se(t,b=>c(b)),f=l?o.form||!!l.closest("form"):!0,h=qw(l),p=o.values[n],g=p===void 0?0:k5(p,o.min,o.max),m=j1e(n,o.values.length),v=h==null?void 0:h[s.size],x=v?E1e(v,g,s.direction):0;return w.useEffect(()=>{if(l)return o.thumbs.add(l),()=>{o.thumbs.delete(l)}},[l,o.thumbs]),u.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[s.startEdge]:`calc(${g}% + ${x}px)`},children:[u.jsx(jx.ItemSlot,{scope:e.__scopeSlider,children:u.jsx(ge.span,{role:"slider","aria-label":e["aria-label"]||m,"aria-valuemin":o.min,"aria-valuenow":p,"aria-valuemax":o.max,"aria-orientation":o.orientation,"data-orientation":o.orientation,"data-disabled":o.disabled?"":void 0,tabIndex:o.disabled?void 0:0,...i,ref:d,style:p===void 0?{display:"none"}:e.style,onFocus:oe(e.onFocus,()=>{o.valueIndexToChangeRef.current=n})})}),f&&u.jsx(j5,{name:a??(o.name?o.name+(o.values.length>1?"[]":""):void 0),form:o.form,value:p},n)]})});S5.displayName=Ex;var _1e="RadioBubbleInput",j5=w.forwardRef(({__scopeSlider:e,value:t,...r},n)=>{const a=w.useRef(null),i=Se(a,n),o=r1(t);return w.useEffect(()=>{const s=a.current;if(!s)return;const l=window.HTMLInputElement.prototype,d=Object.getOwnPropertyDescriptor(l,"value").set;if(o!==t&&d){const f=new Event("input",{bubbles:!0});d.call(s,t),s.dispatchEvent(f)}},[o,t]),u.jsx(ge.input,{style:{display:"none"},...r,ref:i,defaultValue:t})});j5.displayName=_1e;function S1e(e=[],t,r){const n=[...e];return n[r]=t,n.sort((a,i)=>a-i)}function k5(e,t,r){const i=100/(r-t)*(e-t);return tp(i,[0,100])}function j1e(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function k1e(e,t){if(e.length===1)return 0;const r=e.map(a=>Math.abs(a-t)),n=Math.min(...r);return r.indexOf(n)}function E1e(e,t,r){const n=e/2,i=O_([0,50],[0,n]);return(n-i(t)*r)*r}function O1e(e){return e.slice(0,-1).map((t,r)=>e[r+1]-t)}function N1e(e,t){if(t>0){const r=O1e(e);return Math.min(...r)>=t}return!0}function O_(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(r-e[0])}}function P1e(e){return(String(e).split(".")[1]||"").length}function C1e(e,t){const r=Math.pow(10,t);return Math.round(e*r)/r}var E5=g5,T1e=w5,A1e=_5,M1e=S5;const O5=w.forwardRef(({className:e,...t},r)=>u.jsxs(E5,{ref:r,className:q("relative flex w-full touch-none select-none items-center",e),...t,children:[u.jsx(T1e,{className:"relative h-2 w-full grow overflow-hidden rounded-full bg-secondary",children:u.jsx(A1e,{className:"absolute h-full bg-primary"})}),u.jsx(M1e,{className:"block h-5 w-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"})]}));O5.displayName=E5.displayName;const $1e=()=>{const{slug:e}=N6(),t=Ba(),{user:r,loading:n}=Pt(),[a,i]=w.useState(null),[o,s]=w.useState(1),[l,c]=w.useState(null),[d,f]=w.useState(!1),[h,p]=w.useState("");w.useEffect(()=>{!n&&!r&&t("/login",{replace:!0})},[r,n,t]),w.useEffect(()=>{!r||!e||(async()=>{const{data:E,error:O}=await ae.from("products").select("id, title, total_pages").eq("slug",e).maybeSingle();if(O||!E){ve.error("Ebook não encontrado"),t("/aluno",{replace:!0});return}const{data:A}=await ae.from("purchases").select("id").eq("user_id",r.id).eq("product_id",E.id).eq("status","active").maybeSingle();if(!A){ve.error("Você não tem acesso a este ebook"),t("/aluno",{replace:!0});return}i(E),p(`${r.email}
573 • ${new Date().toLocaleString("pt-BR")}`)})()},[r,e,t]);const g=w.useCallback(async E=>{var O;if(a){f(!0);try{const A=localStorage.getItem("session_token")||"",{data:T,error:N}=await ae.functions.invoke("get-ebook-page",{body:{product_id:a.id,page:E},headers:{"x-session-token":A}});if(N||!(T!=null&&T.url)){ve.error("Erro ao carregar página",{description:(N==null?void 0:N.message)||(T==null?void 0:T.error)||"Tente novamente"}),(O=T==null?void 0:T.error)!=null&&O.includes("session")&&(ve.error("Sua conta foi acessada em outro dispositivo"),await ae.auth.signOut(),t("/login",{replace:!0}));return}c(T.url),T.watermark&&p(T.watermark)}finally{f(!1)}}},[a,t]);w.useEffect(()=>{a&&g(o)},[a,o,g]),w.useEffect(()=>{const E=N=>(N.preventDefault(),!1),O=N=>{var R;const I=N.key.toLowerCase();(N.ctrlKey||N.metaKey)&&["p","s","u","c","a"].includes(I)&&(N.preventDefault(),ve.warning("Ação bloqueada para proteger o conteúdo")),I==="printscreen"&&((R=navigator.clipboard)==null||R.writeText("").catch(()=>{}),ve.warning("Captura de tela detectada"))},A=()=>{ve.warning("Impressão bloqueada")};document.addEventListener("contextmenu",E),document.addEventListener("dragstart",E),document.addEventListener("selectstart",E),document.addEventListener("copy",E),document.addEventListener("keydown",O),window.addEventListener("beforeprint",A);const T=document.createElement("style");return T.id="reader-print-block",T.innerHTML='@media print { body * { visibility: hidden !important; } body::after { content: "Impressão bloqueada — conteúdo protegido"; visibility: visible; display: block; padding: 2rem; font-size: 24px; } }',document.head.appendChild(T),()=>{document.removeEventListener("contextmenu",E),document.removeEventListener("dragstart",E),document.removeEventListener("selectstart",E),document.removeEventListener("copy",E),document.removeEventListener("keydown",O),window.removeEventListener("beforeprint",A),T.remove()}},[]);const m=()=>s(E=>Math.max(1,E-1)),v=()=>s(E=>Math.min((a==null?void 0:a.total_pages)??E,E+1)),x=()=>s(1),b=()=>s((a==null?void 0:a.total_pages)??1),y=()=>s(E=>Math.max(1,E-10)),S=()=>s(E=>Math.min((a==null?void 0:a.total_pages)??E,E+10)),[_,j]=w.useState("");w.useEffect(()=>{j(String(o))},[o]);const k=()=>{const E=parseInt(_,10);if(!Number.isFinite(E)||!a){j(String(o));return}const O=Math.min(a.total_pages,Math.max(1,E));s(O)};return w.useEffect(()=>{const E=O=>{const A=O.target;A&&(A.tagName==="INPUT"||A.tagName==="TEXTAREA")||(O.key==="ArrowRight"?(O.preventDefault(),v()):O.key==="ArrowLeft"?(O.preventDefault(),m()):O.key==="Home"?(O.preventDefault(),x()):O.key==="End"?(O.preventDefault(),b()):O.key==="PageDown"?(O.preventDefault(),S()):O.key==="PageUp"&&(O.preventDefault(),y()))};return window.addEventListener("keydown",E),()=>window.removeEventListener("keydown",E)},[a]),n||!a?u.jsx("div",{className:"min-h-screen flex items-center justify-center",children:u.jsx(Qe,{className:"w-6 h-6 animate-spin text-muted-foreground"})}):u.jsxs("div",{className:"min-h-screen bg-muted/30 flex flex-col select-none",style:{fontFamily:"'Inter', 'Nunito', system-ui, -apple-system, sans-serif"},children:[u.jsx("header",{className:"border-b bg-background sticky top-0 z-30",children:u.jsxs("div",{className:"container mx-auto px-3 sm:px-4 py-2.5 sm:py-3 flex items-center justify-between gap-2 sm:gap-4",children:[u.jsx(se,{variant:"ghost",size:"sm",asChild:!0,className:"shrink-0 px-2 sm:px-3",children:u.jsxs(Nr,{to:"/aluno","aria-label":"Voltar para biblioteca",children:[u.jsx(Nm,{className:"w-4 h-4 sm:mr-2"}),u.jsx("span",{className:"hidden sm:inline",children:"Biblioteca"})]})}),u.jsx("h1",{className:"font-semibold text-[15px] sm:text-base truncate flex-1 text-center tracking-tight",children:a.title}),u.jsxs("span",{className:"text-xs sm:text-sm text-muted-foreground tabular-nums shrink-0 font-medium",children:[o,"/",a.total_pages]})]})}),u.jsxs("main",{className:"flex-1 container mx-auto px-2 sm:px-4 py-3 sm:py-6 flex flex-col items-center",children:[u.jsxs("div",{className:"relative w-full max-w-3xl bg-white shadow-lg rounded-lg overflow-hidden text-[17px] sm:text-base leading-relaxed",style:{aspectRatio:"3/4"},onContextMenu:E=>E.preventDefault(),children:[d&&u.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-white/80 z-10",children:u.jsx(Qe,{className:"w-6 h-6 animate-spin text-muted-foreground"})}),l&&u.jsx("img",{src:l,alt:`Página ${o}`,className:"w-full h-full object-contain pointer-events-none",draggable:!1}
573),u.jsx("div",{"aria-hidden":!0,className:"pointer-events-none absolute inset-0 flex items-center justify-center",style:{backgroundImage:"repeating-linear-gradient(-30deg, transparent 0 140px, rgba(0,0,0,0.04) 140px 141px)"},children:u.jsx("div",{className:"grid grid-cols-2 grid-rows-4 gap-8 w-full h-full p-8 opacity-30",children:Array.from({length:8}).map((E,O)=>u.jsx("div",{className:"text-[10px] md:text-xs font-mono text-foreground/60 flex items-center justify-center text-center break-all",style:{transform:"rotate(-30deg)"},children:h},O))})})]}),u.jsx("div",{className:"sticky bottom-0 left-0 right-0 w-full sm:static mt-4 sm:mt-6 bg-background/95 sm:bg-transparent backdrop-blur sm:backdrop-blur-0 border-t sm:border-0 -mx-2 sm:mx-0 px-3 py-3 sm:py-0 sm:px-0 z-20",children:u.jsxs("div",{className:"max-w-3xl mx-auto flex flex-col gap-3",children:[u.jsxs("div",{className:"flex items-center gap-3 px-1",children:[u.jsx(O5,{value:[o],min:1,max:a.total_pages,step:1,onValueChange:E=>s(E[0]),className:"flex-1","aria-label":"Selecionar página"}),u.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[u.jsx(gt,{type:"number",inputMode:"numeric",min:1,max:a.total_pages,value:_,onChange:E=>j(E.target.value),onBlur:k,onKeyDown:E=>{E.key==="Enter"&&(E.preventDefault(),k(),E.target.blur())},className:"w-16 h-9 text-center text-sm tabular-nums","aria-label":"Ir para página"}),u.jsxs("span",{className:"text-xs text-muted-foreground tabular-nums",children:["/ ",a.total_pages]})]})]}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(se,{variant:"outline",size:"icon",onClick:x,disabled:o===1,className:"h-12 sm:h-10 w-11 sm:w-10 shrink-0","aria-label":"Primeira página",title:"Primeira página",children:u.jsx(DB,{className:"w-5 h-5 sm:w-4 sm:h-4"})}),u.jsxs(se,{variant:"outline",onClick:m,disabled:o===1,className:"flex-1 h-12 sm:h-10 text-base sm:text-sm font-semibold",children:[u.jsx(Cm,{className:"w-5 h-5 sm:w-4 sm:h-4 sm:mr-1"}),u.jsx("span",{className:"hidden sm:inline",children:"Anterior"})]}),u.jsxs(se,{onClick:v,disabled:o>=a.total_pages,className:"flex-1 h-12 sm:h-10 text-base sm:text-sm font-semibold",children:[u.jsx("span",{className:"hidden sm:inline",children:"Próxima"}),u.jsx(Tm,{className:"w-5 h-5 sm:w-4 sm:h-4 sm:ml-1"})]}),u.jsx(se,{variant:"outline",size:"icon",onClick:b,disabled:o>=a.total_pages,className:"h-12 sm:h-10 w-11 sm:w-10 shrink-0","aria-label":"Última página",title:"Última página",children:u.jsx(LB,{className:"w-5 h-5 sm:w-4 sm:h-4"})})]})]})}),u.jsxs("div",{className:"mt-4 mb-2 flex items-center gap-2 text-[11px] sm:text-xs text-muted-foreground max-w-md text-center px-2",children:[u.jsx(V2,{className:"w-3 h-3 shrink-0"}),u.jsx("span",{className:"leading-snug",children:"Conteúdo protegido. Compartilhar acesso pode resultar em bloqueio permanente."})]})]})]})},R1e=()=>{const[e]=t8(),t=e.get("email")||"",[r,n]=w.useState(t),[a,i]=w.useState(!1),[o,s]=w.useState(!1),l=Ba(),{user:c,loading:d}=Pt();w.useEffect(()=>{!d&&c&&l("/aluno",{replace:!0})},[c,d,l]),w.useEffect(()=>{t&&!o&&!a&&f(t)},[]);const f=async p=>{if(!p)return;i(!0);const g=`${window.location.origin}/aluno`,{error:m}=await ae.auth.signInWithOtp({email:p,options:{emailRedirectTo:g}});if(i(!1),m){ve.error("Erro ao enviar link",{description:m.message});return}s(!0),ve.success("Link enviado!",{description:"Verifique seu email para acessar o conteúdo."})},h=p=>{p.preventDefault(),f(r)};return u.jsxs("div",{className:"min-h-screen bg-background flex flex-col",children:[u.jsx("header",{className:"container mx-auto py-6",children:u.jsxs(Nr,{to:"/",className:"inline-flex items-center gap-2 font-semibold",children:[u.jsx(Go,{className:"w-5 h-5 text-primary"}),u.jsx("span",{children:"Acertei no Tema"})]})}),u.jsx("main",{className:"flex-1 flex items-center justify-center px-4 py-12",children:u.jsxs(Yr,{className:"w-full max-w-md p-8 space-y-6",children:[u.jsxs("div",{className:"text-center space-y-3",children:[u.jsx("div",{className:"w-14 h-14 rounded-full bg-primary/10 flex items-center justify-center mx-auto",children:u.jsx(Md,{className:"w-7 h-7 text-primary"})}),u.jsx("h1",{className:"text-2xl font-bold",children:"Compra confirmada! 🎉"}),u.jsx("p",{className:"text-sm text-muted-foreground",children:"Para acessar seu material, confirme o email que você usou na compra. Vamos enviar um link mágico de acesso — sem senha."})]}),o?u.jsxs("div",{className:"text-center space-y-3 py-4 border-t",children:[u.jsx(Wh,{className:"w-10 h-10 mx-auto text-primary"}),u.jsx("p",{className:"font-medium",children:"Verifique seu email 📬"}),u.jsxs("p",{className:"text-sm text-muted-foreground",children:["Enviamos o link de acesso para ",u.jsx("strong",{children:r}),".",u.jsx("br",{}),"Pode levar 1-2 minutos. Confira também a caixa de spam."]}),u.jsx(se,{variant:"ghost",onClick:()=>s(!1),children:"Usar outro email"})]}):u.jsxs("form",{onSubmit:h,className:"space-y-4",children:[u.jsxs("div",{className:"space-y-2",children:[u.jsx(Me,{htmlFor:"email",children:"Email da compra"}),u.jsx(gt,{id:"email",type:"email",required:!0,placeholder:"[email protected]",value:r,onChange:p=>n(p.target.value)}),u.jsx("p",{className:"text-xs text-muted-foreground",children:"Use o mesmo email informado no checkout do Kirvano."})]}),u.jsxs(se,{type:"submit",className:"w-full",disabled:a,children:[a&&u.jsx(Qe,{className:"w-4 h-4 mr-2 animate-spin"}),"Receber link de acesso"]})]}),u.jsxs("div",{className:"text-center text-xs text-muted-foreground border-t pt-4",children:["Já tem acesso?"," ",u.jsx(Nr,{to:"/login",className:"text-primary hover:underline",children:"Entrar"})]})]})})]})},I1e=[{to:"/admin",label:"Dashboard",icon:KB,end:!0},{to:"/admin/alunos",label:"Alunos",icon:G2},{to:"/admin/produtos",label:"Produtos",icon:GB},{to:"/admin/paginas",label:"Páginas",icon:B2},{to:"/admin/logs",label:"Logs de Acesso",icon:$B}],zl=({children:e})=>{const{user:t,signOut:r}=Pt(),{isAdmin:n,loading:a}=lM(),i=oa(),o=Ba();if(a)return u.jsx("div",{className:"min-h-screen flex items-center justify-center",children:u.jsx(Qe,{className:"w-6 h-6 animate-spin text-muted-foreground"})});if(!t)return u.jsx(y0,{to:"/login",replace:!0});if(!n)return u.jsx(y0,{to:"/aluno",replace:!0});const s=(l,c)=>c?i.pathname===l:i.pathname.startsWith(l);return u.jsxs("div",{className:"min-h-screen flex bg-background",children:[u.jsxs("aside",{className:"w-60 border-r bg-card flex flex-col",children:[u.jsxs("div",{className:"p-5 border-b",children:[u.jsx("p",{className:"text-xs uppercase tracking-wider text-muted-foreground mb-1",children:"Painel"}),u.jsx("p",{className:"font-semibold",children:"Admin"})]}),u.jsx("nav",{className:"flex-1 p-3 space-y-1",children:I1e.map(l=>{const c=l.icon,d=s(l.to,l.end);return u.jsxs(Nr,{to:l.to,className:q("flex items-center gap-3 px-3 py-2 rounded-md text-sm transition-colors",d?"bg-primary/10 text-primary font-medium":"text-muted-foreground hover:bg-muted hover:text-foreground"),children:[u.jsx(c,{className:"w-4 h-4"}),l.label]},l.to)})}),u.jsxs("div",{className:"p-3 border-t space-y-2",children:[u.jsx("p",{className:"text-xs text-muted-foreground px-2 truncate",children:t.email}),u.jsxs(se,{variant:"ghost",size:"sm",className:"w-full justify-start",onClick:()=>o("/aluno"),children:[u.jsx(Nm,{className:"w-4 h-4 mr-2"})," Ver como aluno"]}),u.jsxs(se,{variant:"ghost",size:"sm",className:"w-full justify-start",onClick:r,children:[u.jsx(O0,{className:"w-4 h-4 mr-2"})," Sair"]})]})]}),u.jsx("main",{className:"flex-1 overflow-auto",children:e})]})},_y=e=>
573(e/100).toLocaleString("pt-BR",{style:"currency",currency:"BRL"}),D1e=()=>{const[e,t]=w.useState(null),[r,n]=w.useState([]);if(w.useEffect(()=>{(async()=>{const i=new Date;i.setHours(0,0,0,0);const[{data:o},{count:s},{count:l}]=await Promise.all([ae.from("purchases").select("amount_cents, purchased_at, user_id, product_id").eq("status","active"),ae.from("profiles").select("*",{count:"exact",head:!0}),ae.from("products").select("*",{count:"exact",head:!0}).eq("active",!0)]),c=o||[],d=c.filter(h=>new Date(h.purchased_at)>=i);t({totalRevenueCents:c.reduce((h,p)=>h+(p.amount_cents||0),0),todayRevenueCents:d.reduce((h,p)=>h+(p.amount_cents||0),0),totalSales:c.length,todaySales:d.length,totalStudents:s||0,totalProducts:l||0});const{data:f}=await ae.from("purchases").select("amount_cents, purchased_at, user_id, product:products(title)").eq("status","active").order("purchased_at",{ascending:!1}).limit(10);if(f&&f.length){const h=[...new Set(f.map(m=>m.user_id))],{data:p}=await ae.from("profiles").select("user_id, email").in("user_id",h),g=new Map((p||[]).map(m=>[m.user_id,m.email]));n(f.map(m=>{var v;return{email:g.get(m.user_id)||"—",title:((v=m.product)==null?void 0:v.title)||"—",amount_cents:m.amount_cents,purchased_at:m.purchased_at}}))}})()},[]),!e)return u.jsx(zl,{children:u.jsx("div",{className:"p-8 flex items-center justify-center",children:u.jsx(Qe,{className:"w-6 h-6 animate-spin text-muted-foreground"})})});const a=[{label:"Receita total",value:_y(e.totalRevenueCents),sub:`${e.totalSales} vendas`,icon:zB},{label:"Receita hoje",value:_y(e.todayRevenueCents),sub:`${e.todaySales} vendas hoje`,icon:QB},{label:"Total de alunos",value:e.totalStudents.toString(),sub:"cadastrados",icon:G2},{label:"Produtos ativos",value:e.totalProducts.toString(),sub:"no catálogo",icon:Go}];return u.jsx(zl,{children:u.jsxs("div",{className:"p-8 space-y-8",children:[u.jsxs("div",{children:[u.jsx("h1",{className:"text-3xl font-bold",children:"Dashboard"}),u.jsx("p",{className:"text-muted-foreground mt-1",children:"Visão geral do negócio"})]}),u.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4",children:a.map(i=>{const o=i.icon;return u.jsxs(Yr,{className:"p-5",children:[u.jsxs("div",{className:"flex items-center justify-between mb-3",children:[u.jsx("span",{className:"text-sm text-muted-foreground",children:i.label}),u.jsx(o,{className:"w-4 h-4 text-muted-foreground"})]}),u.jsx("p",{className:"text-2xl font-bold",children:i.value}),u.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:i.sub})]},i.label)})}),u.jsxs(Yr,{className:"p-5",children:[u.jsx("h2",{className:"font-semibold mb-4",children:"Últimas vendas"}),r.length===0?u.jsx("p",{className:"text-sm text-muted-foreground",children:"Nenhuma venda ainda."}):u.jsx("div",{className:"space-y-2",children:r.map((i,o)=>u.jsxs("div",{className:"flex items-center justify-between py-2 border-b last:border-0 text-sm",children:[u.jsxs("div",{children:[u.jsx("p",{className:"font-medium",children:i.email}),u.jsx("p",{className:"text-xs text-muted-foreground",children:i.title})]}),u.jsxs("div",{className:"text-right",children:[u.jsx("p",{className:"font-medium",children:_y(i.amount_cents)}),u.jsx("p",{className:"text-xs text-muted-foreground",children:new Date(i.purchased_at).toLocaleString("pt-BR")})]})]},o))})]})]})})},N_=w.forwardRef(({className:e,...t},r)=>u.jsx("div",{className:"relative w-full overflow-auto",children:u.jsx("table",{ref:r,className:q("w-full caption-bottom text-sm",e),...t})}));N_.displayName="Table";const P_=w.forwardRef(({className:e,...t},r)=>u.jsx("thead",{ref:r,className:q("[&_tr]:border-b",e),...t}));P_.displayName="TableHeader";const C_=w.forwardRef(({className:e,...t},r)=>u.jsx("tbody",{ref:r,className:q("[&_tr:last-child]:border-0",e),...t}));C_.displayName="TableBody";const L1e=w.forwardRef(({className:e,...t},r)=>u.jsx("tfoot",{ref:r,className:q("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));L1e.displayName="TableFooter";const Oo=w.forwardRef(({className:e,...t},r)=>u.jsx("tr",{ref:r,className:q("border-b transition-colors data-[state=selected]:bg-muted hover:bg-muted/50",e),...t}));Oo.displayName="TableRow";const Ur=w.forwardRef(({className:e,...t},r)=>u.jsx("th",{ref:r,className:q("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",e),...t}));Ur.displayName="TableHead";const or=w.forwardRef(({className:e,...t},r)=>u.jsx("td",{ref:r,className:q("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...t}));or.displayName="TableCell";const B1e=w.forwardRef(({className:e,...t},r)=>u.jsx("caption",{ref:r,className:q("mt-4 text-sm text-muted-foreground",e),...t}));B1e.displayName="TableCaption";var Hg="Dialog",[N5,y_e]=Fa(Hg),[F1e,An]=N5(Hg),P5=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:a,onOpenChange:i,modal:o=!0}=e,s=w.useRef(null),l=w.useRef(null),[c,d]=$o({prop:n,defaultProp:a??!1,onChange:i,caller:Hg});return u.jsx(F1e,{scope:t,triggerRef:s,contentRef:l,contentId:So(),titleId:So(),descriptionId:So(),open:c,onOpenChange:d,onOpenToggle:w.useCallback(()=>d(f=>!f),[d]),modal:o,children:r})};P5.displayName=Hg;var C5="DialogTrigger",T5=w.forwardRef((e,t)=>
vendor: 5,549 bytes, lines 573-577
573{const{__scopeDialog:r,...n}=e,a=An(C5,r),i=Se(t,a.triggerRef);return u.jsx(ge.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":M_(a.open),...n,ref:i,onClick:oe(e.onClick,a.onOpenToggle)})});T5.displayName=C5;var T_="DialogPortal",[U1e,A5]=N5(T_,{forceMount:void 0}),M5=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:a}=e,i=An(T_,t);return u.jsx(U1e,{scope:t,forceMount:r,children:w.Children.map(n,o=>u.jsx(Li,{present:r||i.open,children:u.jsx(Pd,{asChild:!0,container:a,children:o})}))})};M5.displayName=T_;var im="DialogOverlay",$5=w.forwardRef((e,t)=>{const r=A5(im,e.__scopeDialog),{forceMount:n=r.forceMount,...a}=e,i=An(im,e.__scopeDialog);return i.modal?u.jsx(Li,{present:n||i.open,children:u.jsx(W1e,{...a,ref:t})}):null});$5.displayName=im;var z1e=Mo("DialogOverlay.RemoveScroll"),W1e=w.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,a=An(im,r);return u.jsx(qm,{as:z1e,allowPinchZoom:!0,shards:[a.contentRef],children:u.jsx(ge.div,{"data-state":M_(a.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),Ho="DialogContent",R5=w.forwardRef((e,t)=>{const r=A5(Ho,e.__scopeDialog),{forceMount:n=r.forceMount,...a}=e,i=An(Ho,e.__scopeDialog);return u.jsx(Li,{present:n||i.open,children:i.modal?u.jsx(H1e,{...a,ref:t}):u.jsx(q1e,{...a,ref:t})})});R5.displayName=Ho;var H1e=w.forwardRef((e,t)=>{const r=An(Ho,e.__scopeDialog),n=w.useRef(null),a=Se(t,r.contentRef,n);return w.useEffect(()=>{const i=n.current;if(i)return n1(i)},[]),u.jsx(I5,{...e,ref:a,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:oe(e.onCloseAutoFocus,i=>{var o;i.preventDefault(),(o=r.triggerRef.current)==null||o.focus()}),onPointerDownOutside:oe(e.onPointerDownOutside,i=>{const o=i.detail.originalEvent,s=o.button===0&&o.ctrlKey===!0;(o.button===2||s)&&i.preventDefault()}),onFocusOutside:oe(e.onFocusOutside,i=>i.preventDefault())})}),q1e=w.forwardRef((e,t)=>{const r=An(Ho,e.__scopeDialog),n=w.useRef(!1),a=w.useRef(!1);return u.jsx(I5,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var o,s;(o=e.onCloseAutoFocus)==null||o.call(e,i),i.defaultPrevented||(n.current||(s=r.triggerRef.current)==null||s.focus(),i.preventDefault()),n.current=!1,a.current=!1},onInteractOutside:i=>{var l,c;(l=e.onInteractOutside)==null||l.call(e,i),i.defaultPrevented||(n.current=!0,i.detail.originalEvent.type==="pointerdown"&&(a.current=!0));const o=i.target;((c=r.triggerRef.current)==null?void 0:c.contains(o))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&a.current&&i.preventDefault()}})}),I5=w.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:a,onCloseAutoFocus:i,...o}=e,s=An(Ho,r),l=w.useRef(null),c=Se(t,l);return t1(),u.jsxs(u.Fragment,{children:[u.jsx(Wm,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:a,onUnmountAutoFocus:i,children:u.jsx(Gl,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":M_(s.open),...o,ref:c,onDismiss:()=>s.onOpenChange(!1)})}),u.jsxs(u.Fragment,{children:[u.jsx(V1e,{titleId:s.titleId}),u.jsx(G1e,{contentRef:l,descriptionId:s.descriptionId})]})]})}),A_="DialogTitle",D5=w.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,a=An(A_,r);return u.jsx(ge.h2,{id:a.titleId,...n,ref:t})});D5.displayName=A_;var L5="DialogDescription",B5=w.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,a=An(L5,r);return u.jsx(ge.p,{id:a.descriptionId,...n,ref:t})});B5.displayName=L5;var F5="DialogClose",U5=w.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,a=An(F5,r);return u.jsx(ge.button,{type:"button",...n,ref:t,onClick:oe(e.onClick,()=>a.onOpenChange(!1))})});U5.displayName=F5;function M_(e){return e?"open":"closed"}var z5="DialogTitleWarning",[b_e,W5]=F8(z5,{contentName:Ho,titleName:A_,docsSlug:"dialog"}),V1e=({titleId:e})=>{const t=W5(z5),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
574
575If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
576
577For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return w.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},K1e="DialogDescriptionWarning",G1e=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${W5(K1e).contentName}}.`;return w.useEffect(()=>{var i;const a=(i=e.current)==null?void 0:i.getAttribute("aria-describedby");t&&a&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},Y1e=P5,X1e=T5,J1e=M5,H5=$5,q5=R5,V5=D5,K5=B5,Q1e=U5;const G5=Y1e,Z1e=X1e,e_e=J1e,Y5=w.forwardRef(({className:e,...t},r)=>u.jsx(H5,{ref:r,className:q("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));Y5.displayName=H5.displayName;const $_=w.forwardRef(({className:e,children:t,...r},n)=>u.jsxs(e_e,{children:[u.jsx(Y5,{}),u.jsxs(q5,{ref:n,className:q("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rou
577nded-lg",e),...r,children:[t,u.jsxs(Q1e,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity data-[state=open]:bg-accent data-[state=open]:text-muted-foreground hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",children:[u.jsx(Pu,{className:"h-4 w-4"}),u.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));$_.displayName=q5.displayName;const R_=({className:e,...t})=>u.jsx("div",{className:q("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});R_.displayName="DialogHeader";const I_=w.forwardRef(({className:e,...t},r)=>u.jsx(V5,{ref:r,className:q("text-lg font-semibold leading-none tracking-tight",e),...t}));I_.displayName=V5.displayName;const t_e=w.forwardRef(({className:e,...t},r)=>u.jsx(K5,{ref:r,className:q("text-sm text-muted-foreground",e),...t}));t_e.displayName=K5.displayName;const r_e=()=>{const{user:e}=Pt(),[t,r]=w.useState([]),[n,a]=w.useState([]),[i,o]=w.useState(!0),[s,l]=w.useState(""),[c,d]=w.useState(null),[f,h]=w.useState([]),[p,g]=w.useState(!1),[m,v]=w.useState(""),[x,b]=w.useState(!1);w.useEffect(()=>{(async()=>{const[{data:A},{data:T}]=await Promise.all([ae.from("profiles").select("user_id, email, full_name, cpf, created_at").order("created_at",{ascending:!1}),ae.from("products").select("id, title").order("title")]);A&&r(A),T&&a(T),o(!1)})()},[]);const y=w.useMemo(()=>{const A=s.trim().toLowerCase();return A?t.filter(T=>T.email.toLowerCase().includes(A)||(T.full_name||"").toLowerCase().includes(A)||(T.cpf||"").includes(A)):t},[t,s]),S=async A=>{g(!0);const{data:T}=await ae.from("purchases").select("id, amount_cents, purchased_at, status, kirvano_transaction_id, product_id, product:products(title)").eq("user_id",A).order("purchased_at",{ascending:!1});h(T||[]),g(!1)},_=async A=>{d(A),v(""),await S(A.user_id)},j=async A=>{const T=`${window.location.origin}/aluno`,{error:N}=await ae.auth.signInWithOtp({email:A,options:{emailRedirectTo:T}});N?ve.error("Erro ao enviar",{description:N.message}):ve.success(`Link enviado para ${A}`)},k=async()=>{if(!c||!m||!e)return;if(f.find(I=>I.product_id===m&&I.status==="active")){ve.error("Aluno já tem acesso ativo a esse produto");return}b(!0);const T=`manual:${e.email}:${Date.now()}`,{error:N}=await ae.from("purchases").insert({user_id:c.user_id,product_id:m,amount_cents:0,status:"active",kirvano_transaction_id:T});if(b(!1),N){ve.error("Erro ao liberar",{description:N.message});return}ve.success("Acesso liberado!"),v(""),S(c.user_id)},E=async A=>{var R;const T=A.status==="active"?"cancelled":"active";if(!confirm(`Deseja ${T==="active"?"reativar":"cancelar"} o acesso a "${(R=A.product)==null?void 0:R.title}"?`))return;const{error:I}=await ae.from("purchases").update({status:T}).eq("id",A.id);I?ve.error("Erro",{description:I.message}):(ve.success(`Acesso ${T==="active"?"reativado":"cancelado"}`),c&&S(c.user_id))},O=A=>A==null?void 0:A.startsWith("manual:");return u.jsxs(zl,{children:[u.jsxs("div",{className:"p-8 space-y-6",children:[u.jsxs("div",{children:[u.jsx("h1",{className:"text-3xl font-bold",children:"Alunos"}),u.jsxs("p",{className:"text-muted-foreground mt-1",children:[t.length," alunos cadastrados"]})]}),u.jsx(Yr,{className:"p-4",children:u.jsxs("div",{className:"relative",children:[u.jsx(Rw,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),u.jsx(gt,{placeholder:"Buscar por email, nome ou CPF…",value:s,onChange:A=>l(A.target.value),className:"pl-9"})]})}),u.jsx(Yr,{children:i?u.jsx("div",{className:"p-8 flex justify-center",children:u.jsx(Qe,{className:"w-5 h-5 animate-spin text-muted-foreground"})}):u.jsxs(N_,{children:[u.jsx(P_,{children:u.jsxs(Oo,{children:[u.jsx(Ur,{children:"Email"}),u.jsx(Ur,{children:"Nome"}),u.jsx(Ur,{children:"CPF"}),u.jsx(Ur,{children:"Cadastro"}),u.jsx(Ur,{className:"text-right",children:"Ações"})]})}),u.jsxs(C_,{children:[y.map(A=>u.jsxs(Oo,{children:[u.jsx(or,{className:"font-medium",children:A.email}),u.jsx(or,{children:A.full_name||"—"}),u.jsx(or,{className:"text-muted-foreground",children:A.cpf||"—"}),u.jsx(or,{className:"text-muted-foreground",children:new Date(A.created_at).toLocaleDateString("pt-BR")}),u.jsxs(or,{className:"text-right space-x-1",children:[u.jsx(se,{variant:"ghost",size:"sm",onClick:()=>_(A),children:u.jsx(WB,{className:"w-4 h-4"})}),u.jsx(se,{variant:"ghost",size:"sm",onClick:()=>j(A.email),children:u.jsx(Wh,{className:"w-4 h-4"})})]})]},A.user_id)),y.length===0&&u.jsx(Oo,{children:u.jsx(or,{colSpan:5,className:"text-center py-8 text-muted-foreground",children:"Nenhum aluno encontrado."})})]})]})})]}),u.jsx(G5,{open:!!c,onOpenChange:A=>!A&&d(null),children:u.jsxs($_,{className:"max-w-2xl max-h-[90vh] overflow-y-auto",children:[u.jsx(R_,{children:u.jsx(I_,{children:c==null?void 0:c.email})}),c&&u.jsxs("div",{className:"space-y-5",children:[u.jsxs("div",{className:"grid grid-cols-2 gap-4 text-sm",children:[u.jsxs("div",{children:[u.jsx("p",{className:"text-muted-foreground",children:"Nome"}),u.jsx("p",{className:"font-medium",children:c.full_name||"—"})]}),u.jsxs("div",{children:[u.jsx("p",{className:"text-muted-foreground",children:"CPF"}),u.jsx("p",{className:"font-medium",children:c.cpf||"—"})]})]}),u.jsxs("div",{className:"border rounded-lg p-4 space-y-3 bg-muted/30",children:[u.jsxs("div",{children:[u.jsxs("p",{className:"text-sm font-semibold flex items-center gap-2",children:[u.jsx($w,{className:"w-4 h-4"})," Liberar ebook manualmente"]}),u.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:"Use em caso de falha do webhook Kirvano ou cortesia."})]}),u.jsxs("div",{className:"flex gap-2",children:[u.jsxs(Gn,{value:m,onValueChange:v,children:[u.jsx(yn,{className:"flex-1",children:u.jsx(Yn,{placeholder:"Escolha o produto…"})}),u.jsx(bn,{children:n.map(A=>u.jsx(Wr,{value:A.id,children:A.title},A.id))})]}),u.jsxs(se,{onClick:k,disabled:!m||x,children:[x&&u.jsx(Qe,{className:"w-4 h-4 mr-2 animate-spin"}),"Liberar"]})]})]}),u.jsxs("div",{children:[u.jsx("p",{className:"text-sm font-semibold mb-2",children:"Compras"}),p?u.jsx(Qe,{className:"w-4 h-4 animate-spin"}):f.length===0?u.jsx("p",{className:"text-sm text-muted-foreground",children:"Sem compras."}):u.jsx("div",{className:"space-y-2",children:f.map(A=>{var T,N;return u.jsxs("div",{className:"flex items-center justify-between text-sm border rounded-md px-3 py-2",children:[u.jsxs("div",{className:"min-w-0 flex-1",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("p",{className:"font-medium truncate",children:((T=A.product)==null?void 0:T.title)||"—"}),O(A.kirvano_transaction_id)&&u.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded bg-accent text-accent-foreground font-medium",children:"MANUAL"}),u.jsx("span",{className:`text-[10px] px-1.5 py-0.5 rounded font-medium ${A.status==="active"?"bg-primary/10 text-primary":"bg-muted text-muted-foreground"}`,children:A.status})]}),u.jsxs("p",{className:"text-xs text-muted-foreground mt-0.5",children:[new Date(A.purchased_at).toLocaleStr
577ing("pt-BR"),O(A.kirvano_transaction_id)&&u.jsxs(u.Fragment,{children:[" · por ",(N=A.kirvano_transaction_id)==null?void 0:N.split(":")[1]]})]})]}),u.jsxs("div",{className:"flex items-center gap-2 ml-2",children:[u.jsx("p",{className:"font-medium text-sm whitespace-nowrap",children:(A.amount_cents/100).toLocaleString("pt-BR",{style:"currency",currency:"BRL"})}),u.jsx(se,{variant:"ghost",size:"sm",onClick:()=>E(A),title:A.status==="active"?"Cancelar acesso":"Reativar acesso",children:A.status==="active"?u.jsx(IB,{className:"w-3.5 h-3.5 text-destructive"}):u.jsx(H2,{className:"w-3.5 h-3.5"})})]})]},A.id)})})]}),u.jsxs(se,{variant:"outline",onClick:()=>j(c.email),className:"w-full",children:[u.jsx(Wh,{className:"w-4 h-4 mr-2"})," Reenviar link de acesso"]})]})]})})]})},n_e={slug:"",title:"",description:"",cover_image:"",price_cents:0,kirvano_product_id:"",active:!0,category:"geral"},a_e=()=>{const[e,t]=w.useState([]),[r,n]=w.useState(!0),[a,i]=w.useState(null),[o,s]=w.useState(!1),l=async()=>{n(!0);const{data:d}=await ae.from("products").select("*").order("created_at",{ascending:!1});t(d||[]),n(!1)};w.useEffect(()=>{l()},[]);const c=async()=>{if(!a)return;if(!a.slug||!a.title){ve.error("Slug e título são obrigatórios");return}s(!0);const d={slug:a.slug,title:a.title,description:a.description||null,cover_image:a.cover_image||null,price_cents:a.price_cents||0,kirvano_product_id:a.kirvano_product_id||null,active:a.active??!0,category:a.category||"geral"},{error:f}=a.id?await ae.from("products").update(d).eq("id",a.id):await ae.from("products").insert(d);s(!1),f?ve.error("Erro ao salvar",{description:f.message}):(ve.success("Produto salvo"),i(null),l())};return u.jsx(zl,{children:u.jsxs("div",{className:"p-8 space-y-6",children:[u.jsxs("div",{className:"flex items-start justify-between",children:[u.jsxs("div",{children:[u.jsx("h1",{className:"text-3xl font-bold",children:"Produtos"}),u.jsxs("p",{className:"text-muted-foreground mt-1",children:[e.length," produtos cadastrados"]})]}),u.jsxs(G5,{open:!!a,onOpenChange:d=>!d&&i(null),children:[u.jsx(Z1e,{asChild:!0,children:u.jsxs(se,{onClick:()=>i(n_e),children:[u.jsx($w,{className:"w-4 h-4 mr-2"})," Novo produto"]})}),u.jsxs($_,{className:"max-w-2xl",children:[u.jsx(R_,{children:u.jsx(I_,{children:a!=null&&a.id?"Editar produto":"Novo produto"})}),a&&u.jsxs("div",{className:"space-y-4",children:[u.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[u.jsxs("div",{className:"space-y-1.5",children:[u.jsx(Me,{children:"Título"}),u.jsx(gt,{value:a.title||"",onChange:d=>i({...a,title:d.target.value})})]}),u.jsxs("div",{className:"space-y-1.5",children:[u.jsx(Me,{children:"Slug (URL)"}),u.jsx(gt,{value:a.slug||"",onChange:d=>i({...a,slug:d.target.value}),placeholder:"redacao-1000"})]})]}),u.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[u.jsxs("div",{className:"space-y-1.5",children:[u.jsx(Me,{children:"Categoria"}),u.jsxs(Gn,{value:a.category||"geral",onValueChange:d=>i({...a,category:d}),children:[u.jsx(yn,{children:u.jsx(Yn,{})}),u.jsx(bn,{children:ap.map(d=>u.jsxs(Wr,{value:d.value,children:[d.emoji," ",d.label]},d.value))})]})]}),u.jsxs("div",{className:"space-y-1.5",children:[u.jsx(Me,{children:"URL da capa"}),u.jsx(gt,{value:a.cover_image||"",onChange:d=>i({...a,cover_image:d.target.value}),placeholder:"https://…"})]})]}),u.jsxs("div",{className:"space-y-1.5",children:[u.jsx(Me,{children:"Descrição"}),u.jsx(Bg,{value:a.description||"",onChange:d=>i({...a,description:d.target.value})})]}),u.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[u.jsxs("div",{className:"space-y-1.5",children:[u.jsx(Me,{children:"Preço (centavos)"}),u.jsx(gt,{type:"number",value:a.price_cents??0,onChange:d=>i({...a,price_cents:parseInt(d.target.value)||0})}),u.jsx("p",{className:"text-xs text-muted-foreground",children:((a.price_cents||0)/100).toLocaleString("pt-BR",{style:"currency",currency:"BRL"})})]}),u.jsxs("div",{className:"space-y-1.5",children:[u.jsx(Me,{children:"Kirvano Product ID"}),u.jsx(gt,{value:a.kirvano_product_id||"",onChange:d=>i({...a,kirvano_product_id:d.target.value})})]})]}),u.jsxs("div",{className:"flex items-center justify-between border rounded-md px-3 py-2",children:[u.jsx(Me,{children:"Ativo (visível para alunos)"}),u.jsx(am,{checked:a.active??!0,onCheckedChange:d=>i({...a,active:d})})]}),u.jsxs(se,{onClick:c,disabled:o,className:"w-full",children:[o&&u.jsx(Qe,{className:"w-4 h-4 mr-2 animate-spin"}),"Salvar"]})]})]})]})]}),r?u.jsx("div",{className:"p-8 flex justify-center",children:u.jsx(Qe,{className:"w-5 h-5 animate-spin text-muted-foreground"})}):u.jsx("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3",children:e.map(d=>u.jsxs(Yr,{className:"p-5 space-y-3",children:[u.jsxs("div",{className:"flex items-start justify-between gap-2",children:[u.jsxs("div",{className:"flex-1 min-w-0",children:[u.jsx("h3",{className:"font-semibold truncate",children:d.title}),u.jsxs("p",{className:"text-xs text-muted-foreground truncate",children:["/",d.slug]})]}),u.jsx("span",{className:`text-xs px-2 py-0.5 rounded-full ${d.active?"bg-primary/10 text-primary":"bg-muted text-muted-foreground"}`,children:d.active?"ativo":"inativo"})]}),u.jsxs("div",{className:"text-sm text-muted-foreground space-y-1",children:[u.jsx("p",{className:"text-xs",children:u.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 rounded-full bg-muted text-foreground font-medium",children:[ip(d.category).emoji," ",ip(d.category).label]})}
577),u.jsx("p",{children:(d.price_cents/100).toLocaleString("pt-BR",{style:"currency",currency:"BRL"})}),u.jsxs("p",{children:[d.total_pages," páginas"]}),u.jsxs("p",{className:"truncate text-xs",children:["Kirvano: ",d.kirvano_product_id||"—"]})]}),u.jsxs(se,{variant:"outline",size:"sm",className:"w-full",onClick:()=>i(d),children:[u.jsx(z2,{className:"w-3.5 h-3.5 mr-2"})," Editar"]})]},d.id))})]})})},i_e=()=>{const[e,t]=w.useState([]),[r,n]=w.useState(""),[a,i]=w.useState([]),[o,s]=w.useState(!1),[l,c]=w.useState(!1);w.useEffect(()=>{(async()=>{const{data:p}=await ae.from("products").select("id, title, total_pages").order("title");t(p||[])})()},[]);const d=async p=>{s(!0);const{data:g}=await ae.from("ebook_pages").select("id, page_number, storage_path").eq("product_id",p).order("page_number");i(g||[]),s(!1)};w.useEffect(()=>{r?d(r):i([])},[r]);const f=async p=>{if(!p||!r)return;c(!0);const g=a.length>0?Math.max(...a.map(x=>x.page_number))+1:1;let m=0;for(let x=0;x<p.length;x++){const b=p[x],y=g+x,S=b.name.split(".").pop()||"jpg",_=`${r}/page-${String(y).padStart(4,"0")}.${S}`,{error:j}=await ae.storage.from("ebook-pages").upload(_,b,{upsert:!0});if(j){ve.error(`Erro p. ${y}`,{description:j.message});continue}const{error:k}=await ae.from("ebook_pages").insert({product_id:r,page_number:y,storage_path:_});if(k){ve.error(`Erro DB p. ${y}`,{description:k.message});continue}m++}const v=a.length+m>0?a.length+m:0;await ae.from("products").update({total_pages:v}).eq("id",r),c(!1),ve.success(`${m} páginas enviadas`),d(r)},h=async p=>{if(!confirm(`Remover página ${p.page_number}?`))return;await ae.storage.from("ebook-pages").remove([p.storage_path]),await ae.from("ebook_pages").delete().eq("id",p.id);const g=a.length-1;await ae.from("products").update({total_pages:g}).eq("id",r),ve.success("Página removida"),d(r)};return u.jsx(zl,{children:u.jsxs("div",{className:"p-8 space-y-6",children:[u.jsxs("div",{children:[u.jsx("h1",{className:"text-3xl font-bold",children:"Páginas dos Ebooks"}),u.jsx("p",{className:"text-muted-foreground mt-1",children:"Faça upload das páginas em ordem (PDF convertido em imagens, ou imagens diretas)."})]}),u.jsxs(Yr,{className:"p-5 space-y-4",children:[u.jsxs("div",{className:"space-y-2",children:[u.jsx(Me,{children:"Produto"}),u.jsxs(Gn,{value:r,onValueChange:n,children:[u.jsx(yn,{children:u.jsx(Yn,{placeholder:"Selecione um produto"})}),u.jsx(bn,{children:e.map(p=>u.jsxs(Wr,{value:p.id,children:[p.title," (",p.total_pages," páginas)"]},p.id))})]})]}),r&&u.jsxs("div",{className:"space-y-2",children:[u.jsx(Me,{children:"Adicionar páginas (selecione múltiplos arquivos em ordem)"}),u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx("input",{type:"file",multiple:!0,accept:"image/*",disabled:l,onChange:p=>f(p.target.files),className:"block text-sm file:mr-4 file:py-2 file:px-4 file:rounded-md file:border-0 file:text-sm file:font-medium file:bg-primary file:text-primary-foreground hover:file:bg-primary/90"}),l&&u.jsx(Qe,{className:"w-4 h-4 animate-spin text-muted-foreground"})]}),u.jsxs("p",{className:"text-xs text-muted-foreground",children:[u.jsx(rF,{className:"w-3 h-3 inline mr-1"}),"Continuam a partir da página ",a.length+1,"."]})]})]}),r&&u.jsx(Yr,{children:o?u.jsx("div",{className:"p-8 flex justify-center",children:u.jsx(Qe,{className:"w-5 h-5 animate-spin text-muted-foreground"})}):a.length===0?u.jsx("div",{className:"p-8 text-center text-sm text-muted-foreground",children:"Nenhuma página enviada ainda."}):u.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-4 md:grid-cols-6 gap-3 p-4",children:a.map(p=>u.jsxs("div",{className:"border rounded-md p-2 text-xs space-y-1",children:[u.jsxs("div",{className:"aspect-[3/4] bg-muted rounded flex items-center justify-center text-muted-foreground",children:["p. ",p.page_number]}),u.jsx("p",{className:"truncate text-muted-foreground",children:p.storage_path.split("/").pop()}),u.jsxs(se,{variant:"ghost",size:"sm",className:"w-full h-7 text-destructive hover:text-destructive",onClick:()=>h(p),children:[u.jsx(q2,{className:"w-3 h-3 mr-1"})," Remover"]})]}
577,p.id))})})]})})},o_e=()=>{const[e,t]=w.useState([]),[r,n]=w.useState(new Map),[a,i]=w.useState(new Map),[o,s]=w.useState(!0),[l,c]=w.useState("");w.useEffect(()=>{(async()=>{const{data:h}=await ae.from("access_logs").select("*").order("created_at",{ascending:!1}).limit(500),p=h||[];t(p);const g=[...new Set(p.map(v=>v.user_id).filter(Boolean))],m=[...new Set(p.map(v=>v.product_id).filter(Boolean))];if(g.length){const{data:v}=await ae.from("profiles").select("user_id, email").in("user_id",g);n(new Map((v||[]).map(x=>[x.user_id,x.email])))}if(m.length){const{data:v}=await ae.from("products").select("id, title").in("id",m);i(new Map((v||[]).map(x=>[x.id,x.title])))}s(!1)})()},[]);const d=w.useMemo(()=>{const h=new Map;e.forEach(g=>{!g.user_id||!g.ip_address||(h.has(g.user_id)||h.set(g.user_id,new Set),h.get(g.user_id).add(g.ip_address))});const p=new Set;return h.forEach((g,m)=>{g.size>=3&&p.add(m)}),p},[e]),f=w.useMemo(()=>{const h=l.trim().toLowerCase();return h?e.filter(p=>{const g=p.user_id&&r.get(p.user_id)||"",m=p.product_id&&a.get(p.product_id)||"";return g.toLowerCase().includes(h)||m.toLowerCase().includes(h)||p.action.toLowerCase().includes(h)||(p.ip_address||"").includes(h)}):e},[e,r,a,l]);return u.jsx(zl,{children:u.jsxs("div",{className:"p-8 space-y-6",children:[u.jsxs("div",{children:[u.jsx("h1",{className:"text-3xl font-bold",children:"Logs de Acesso"}),u.jsxs("p",{className:"text-muted-foreground mt-1",children:["Últimos 500 eventos · ",d.size," alunos com 3+ IPs distintos"]})]}),u.jsx(Yr,{className:"p-4",children:u.jsxs("div",{className:"relative",children:[u.jsx(Rw,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),u.jsx(gt,{placeholder:"Buscar por email, produto, ação ou IP…",value:l,onChange:h=>c(h.target.value),className:"pl-9"})]})}),u.jsx(Yr,{children:o?u.jsx("div",{className:"p-8 flex justify-center",children:u.jsx(Qe,{className:"w-5 h-5 animate-spin text-muted-foreground"})}):u.jsxs(N_,{children:[u.jsx(P_,{children:u.jsxs(Oo,{children:[u.jsx(Ur,{children:"Quando"}),u.jsx(Ur,{children:"Aluno"}),u.jsx(Ur,{children:"Produto"}),u.jsx(Ur,{children:"Ação"}),u.jsx(Ur,{children:"Pág."}),u.jsx(Ur,{children:"IP"})]})}),u.jsxs(C_,{children:[f.map(h=>{const p=h.user_id&&d.has(h.user_id);return u.jsxs(Oo,{children:[u.jsx(or,{className:"text-xs text-muted-foreground whitespace-nowrap",children:new Date(h.created_at).toLocaleString("pt-BR")}),u.jsx(or,{className:"text-sm",children:u.jsxs("div",{className:"flex items-center gap-1.5",children:[p&&u.jsx(V2,{className:"w-3.5 h-3.5 text-destructive"}),h.user_id&&r.get(h.user_id)||"—"]})}),u.jsx(or,{className:"text-sm",children:h.product_id&&a.get(h.product_id)||"—"}),u.jsx(or,{className:"text-xs",children:h.action}),u.jsx(or,{className:"text-xs",children:h.page_number??"—"}),u.jsx(or,{className:"text-xs text-muted-foreground",children:h.ip_address||"—"})]},h.id)}),f.length===0&&u.jsx(Oo,{children:u.jsx(or,{colSpan:6,className:"text-center py-8 text-muted-foreground",children:"Sem logs."})})]})]})})]})})},s_e=new JL,l_e=()=>u.jsx(ZL,{client:s_e,children:u.jsxs(kz,{children:[u.jsx(UF,{}),u.jsx(M8,{}),u.jsx(J6,{children:u.jsx(j9,{children:u.jsx(E9,{children:u.jsxs(N9,{children:[u.jsx(C9,{}),u.jsxs(W6,{children:[u.jsx(ut,{path:"/",element:u.jsx(nH,{})}),u.jsx(ut,{path:"/login",element:u.jsx(fH,{})}),u.jsx(ut,{path:"/acesso",element:u.jsx(R1e,{})}),u.jsx(ut,{path:"/aluno",element:u.jsx(xK,{})}),u.jsx(ut,{path:"/aluno/ebooks",element:u.jsx(SK,{})}),u.jsx(ut,{path:"/aluno/simulado",element:u.jsx(nxe,{})}),u.jsx(ut,{path:"/aluno/redacao",element:u.jsx(axe,{})}),u.jsx(ut,{path:"/aluno/extras",element:u.jsx(ixe,{})}),u.jsx(ut,{path:"/aluno/metodos",element:u.jsx(sxe,{})}),u.jsx(ut,{path:"/aluno/calendario",element:u.jsx(Fwe,{})}),u.jsx(ut,{path:"/aluno/planner",element:u.jsx(a1e,{})}),u.jsx(ut,{path:"/aluno/estatisticas",element:u.jsx(c1e,{})}),u.jsx(ut,{path:"/aluno/config",element:u.jsx(m1e,{})}),u.jsx(ut,{path:"/aluno/ler/:slug",element:u.jsx($1e,{})}),u.jsx(ut,{path:"/admin",element:u.jsx(D1e,{})}),u.jsx(ut,{path:"/admin/alunos",element:u.jsx(r_e,{})}),u.jsx(ut,{path:"/admin/produtos",element:u.jsx(a_e,{})}),u.jsx(ut,{path:"/admin/paginas",element:u.jsx(i_e,{})}),u.jsx(ut,{path:"/admin/logs",element:u.jsx(o_e,{})}),u.jsx(ut,{path:"*",element:u.jsx(aH,{})})]})]})})})})]})});WT(document.getElementById("root")).render(u.jsx(l_e,{}));

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