vendor: 5,973 bytes, lines 1-9
1var cB=Object.defineProperty;var AP=e=>{throw TypeError(e)};var uB=(e,t,r)=>t in e?cB(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var To=(e,t,r)=>uB(e,typeof t!="symbol"?t+"":t,r),vy=(e,t,r)=>t.has(e)||AP("Cannot "+r);var B=(e,t,r)=>(vy(e,t,"read from private field"),r?r.call(e):t.get(e)),Pe=(e,t,r)=>t.has(e)?AP("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),pe=(e,t,r,n)=>(vy(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),De=(e,t,r)=>(vy(e,t,"access private method"),r);var sh=(e,t,r,n)=>({set _(i){pe(e,t,i,r)},get _(){return B(e,t,n)}});function dB(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const i in n)if(i!=="default"&&!(i in e)){const a=Object.getOwnPropertyDescriptor(n,i);a&&Object.defineProperty(e,i,a.get?a:{enumerable:!0,get:()=>n[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const o of a.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function r(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function n(i){if(i.ep)return;i.ep=!0;const a=r(i);fetch(i.href,a)}})();var lh=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ye(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var EA={exports:{}},Cg={},kA={exports:{}},Ve={};/** 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 Ef=Symbol.for("react.element"),fB=Symbol.for("react.portal"),hB=Symbol.for("react.fragment"),pB=Symbol.for("react.strict_mode"),mB=Symbol.for("react.profiler"),gB=Symbol.for("react.provider"),vB=Symbol.for("react.context"),yB=Symbol.for("react.forward_ref"),xB=Symbol.for("react.suspense"),bB=Symbol.for("react.memo"),wB=Symbol.for("react.lazy"),TP=Symbol.iterator;function SB(e){return e===null||typeof e!="object"?null:(e=TP&&e[TP]||e["@@iterator"],typeof e=="function"?e:null)}var CA={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},AA=Object.assign,TA={};function kc(e,t,r){this.props=e,this.context=t,this.refs=TA,this.updater=r||CA}kc.prototype.isReactComponent={};kc.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")};kc.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function MA(){}MA.prototype=kc.prototype;function m1(e,t,r){this.props=e,this.context=t,this.refs=TA,this.updater=r||CA}var g1=m1.prototype=new MA;g1.constructor=m1;AA(g1,kc.prototype);g1.isPureReactComponent=!0;var MP=Array.isArray,IA=Object.prototype.hasOwnProperty,v1={current:null},$A={key:!0,ref:!0,__self:!0,__source:!0};function RA(e,t,r){var n,i={},a=null,o=null;if(t!=null)for(n in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(a=""+t.key),t)IA.call(t,n)&&!$A.hasOwnProperty(n)&&(i[n]=t[n]);var s=arguments.length-2;if(s===1)i.children=r;else if(1<s){for(var c=Array(s),u=0;u<s;u++)c[u]=arguments[u+2];i.children=c}if(e&&e.defaultProps)for(n in s=e.defaultProps,s)i[n]===void 0&&(i[n]=s[n]);return{$$typeof:Ef,type:e,key:a,ref:o,props:i,_owner:v1.current}}function jB(e,t){return{$$typeof:Ef,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function y1(e){return typeof e=="object"&&e!==null&&e.$$typeof===Ef}function PB(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var IP=/\/+/g;function yy(e,t){return typeof e=="object"&&e!==null&&e.key!=null?PB(""+e.key):t.toString(36)}function Zh(e,t,r,n,i){var a=typeof e;(a==="undefined"||a==="boolean")&&(e=null);var o=!1;if(e===null)o=!0;else switch(a){case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case Ef:case fB:o=!0}}if(o)return o=e,i=i(o),e=n===""?"."+yy(o,0):n,MP(i)?(r="",e!=null&&(r=e.replace(IP,"$&/")+"/"),Zh(i,t,r,"",function(u){return u})):i!=null&&(y1(i)&&(i=jB(i,r+(!i.key||o&&o.key===i.key?"":(""+i.key).replace(IP,"$&/")+"/")+e)),t.push(i)),1;if(o=0,n=n===""?".":n+":",MP(e))for(var s=0;s<e.length;s++){a=e[s];var c=n+yy(a,s);o+=Zh(a,t,r,c,i)}else if(c=SB(e),typeof c=="function")for(e=c.call(e),s=0;!(a=e.next()).done;)a=a.value,c=n+yy(a,s++),o+=Zh(a,t,r,c,i);else if(a==="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 ch(e,t,r){if(e==null)return e;var n=[],i=0;return Zh(e,n,"","",function(a){return t.call(r,a,i++)}),n}function NB(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},Jh={transition:null},_B={ReactCurrentDispatcher:Tr,ReactCurrentBatchConfig:Jh,ReactCurrentOwner:v1};function DA(){throw Error("act(...) is not supported in production builds of React.")}
vendor: 5,106 bytes, lines 9-25
9Ve.Children={map:ch,forEach:function(e,t,r){ch(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return ch(e,function(){t++}),t},toArray:function(e){return ch(e,function(t){return t})||[]},only:function(e){if(!y1(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};Ve.Component=kc;Ve.Fragment=hB;Ve.Profiler=mB;Ve.PureComponent=m1;Ve.StrictMode=pB;Ve.Suspense=xB;Ve.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=_B;Ve.act=DA;Ve.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=AA({},e.props),i=e.key,a=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(a=t.ref,o=v1.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var s=e.type.defaultProps;for(c in t)IA.call(t,c)&&!$A.hasOwnProperty(c)&&(n[c]=t[c]===void 0&&s!==void 0?s[c]:t[c])}var c=arguments.length-2;if(c===1)n.children=r;else if(1<c){s=Array(c);for(var u=0;u<c;u++)s[u]=arguments[u+2];n.children=s}return{$$typeof:Ef,type:e.type,key:i,ref:a,props:n,_owner:o}};Ve.createContext=function(e){return e={$$typeof:vB,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:gB,_context:e},e.Consumer=e};Ve.createElement=RA;Ve.createFactory=function(e){var t=RA.bind(null,e);return t.type=e,t};Ve.createRef=function(){return{current:null}};Ve.forwardRef=function(e){return{$$typeof:yB,render:e}};Ve.isValidElement=y1;Ve.lazy=function(e){return{$$typeof:wB,_payload:{_status:-1,_result:e},_init:NB}};Ve.memo=function(e,t){return{$$typeof:bB,type:e,compare:t===void 0?null:t}};Ve.startTransition=function(e){var t=Jh.transition;Jh.transition={};try{e()}finally{Jh.transition=t}};Ve.unstable_act=DA;Ve.useCallback=function(e,t){return Tr.current.useCallback(e,t)};Ve.useContext=function(e){return Tr.current.useContext(e)};Ve.useDebugValue=function(){};Ve.useDeferredValue=function(e){return Tr.current.useDeferredValue(e)};Ve.useEffect=function(e,t){return Tr.current.useEffect(e,t)};Ve.useId=function(){return Tr.current.useId()};Ve.useImperativeHandle=function(e,t,r){return Tr.current.useImperativeHandle(e,t,r)};Ve.useInsertionEffect=function(e,t){return Tr.current.useInsertionEffect(e,t)};Ve.useLayoutEffect=function(e,t){return Tr.current.useLayoutEffect(e,t)};Ve.useMemo=function(e,t){return Tr.current.useMemo(e,t)};Ve.useReducer=function(e,t,r){return Tr.current.useReducer(e,t,r)};Ve.useRef=function(e){return Tr.current.useRef(e)};Ve.useState=function(e){return Tr.current.useState(e)};Ve.useSyncExternalStore=function(e,t,r){return Tr.current.useSyncExternalStore(e,t,r)};Ve.useTransition=function(){return Tr.current.useTransition()};Ve.version="18.3.1";kA.exports=Ve;var v=kA.exports;const M=Ye(v),LA=dB({__proto__:null,default:M},[v]);/** 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 OB=v,EB=Symbol.for("react.element"),kB=Symbol.for("react.fragment"),CB=Object.prototype.hasOwnProperty,AB=OB.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,TB={key:!0,ref:!0,__self:!0,__source:!0};function FA(e,t,r){var n,i={},a=null,o=null;r!==void 0&&(a=""+r),t.key!==void 0&&(a=""+t.key),t.ref!==void 0&&(o=t.ref);for(n in t)CB.call(t,n)&&!TB.hasOwnProperty(n)&&(i[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)i[n]===void 0&&(i[n]=t[n]);return{$$typeof:EB,type:e,key:a,ref:o,props:i,_owner:AB.current}}Cg.Fragment=kB;Cg.jsx=FA;Cg.jsxs=FA;EA.exports=Cg;var l=EA.exports,BA={exports:{}},sn={},UA={exports:{}},zA={};/** 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(A,D){var F=A.length;A.push(D);e:for(;0<F;){var z=F-1>>>1,H=A[z];if(0<i(H,D))A[z]=D,A[F]=H,F=z;else break e}}function r(A){return A.length===0?null:A[0]}function n(A){if(A.length===0)return null;var D=A[0],F=A.pop();if(F!==D){A[0]=F;e:for(var z=0,H=A.length,ue=H>>>1;z<ue;){var be=2*(z+1)-1,Le=A[be],Be=be+1,se=A[Be];if(0>i(Le,F))Be<H&&0>i(se,Le)?(A[z]=se,A[Be]=F,z=Be):(A[z]=Le,A[be]=F,z=be);else if(Be<H&&0>i(se,F))A[z]=se,A[Be]=F,z=Be;else break e}}return D}function i(A,D){var F=A.sortIndex-D.sortIndex;return F!==0?F:A.id-D.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],u=[],f=1,d=null,h=3,p=!1,g=!1,m=!1,y=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);
vendor: 9,544 bytes, lines 25-34
25function w(A){for(var D=r(u);D!==null;){if(D.callback===null)n(u);else if(D.startTime<=A)n(u),D.sortIndex=D.expirationTime,t(c,D);else break;D=r(u)}}function S(A){if(m=!1,w(A),!g)if(r(c)!==null)g=!0,R(j);else{var D=r(u);D!==null&&U(S,D.startTime-A)}}function j(A,D){g=!1,m&&(m=!1,x(_),_=-1),p=!0;var F=h;try{for(w(D),d=r(c);d!==null&&(!(d.expirationTime>D)||A&&!C());){var z=d.callback;if(typeof z=="function"){d.callback=null,h=d.priorityLevel;var H=z(d.expirationTime<=D);D=e.unstable_now(),typeof H=="function"?d.callback=H:d===r(c)&&n(c),w(D)}else n(c);d=r(c)}if(d!==null)var ue=!0;else{var be=r(u);be!==null&&U(S,be.startTime-D),ue=!1}return ue}finally{d=null,h=F,p=!1}}var P=!1,N=null,_=-1,O=5,k=-1;function C(){return!(e.unstable_now()-k<O)}function E(){if(N!==null){var A=e.unstable_now();k=A;var D=!0;try{D=N(!0,A)}finally{D?I():(P=!1,N=null)}}else P=!1}var I;if(typeof b=="function")I=function(){b(E)};else if(typeof MessageChannel<"u"){var T=new MessageChannel,$=T.port2;T.port1.onmessage=E,I=function(){$.postMessage(null)}}else I=function(){y(E,0)};function R(A){N=A,P||(P=!0,I())}function U(A,D){_=y(function(){A(e.unstable_now())},D)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(A){A.callback=null},e.unstable_continueExecution=function(){g||p||(g=!0,R(j))},e.unstable_forceFrameRate=function(A){0>A||125<A?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):O=0<A?Math.floor(1e3/A):5},e.unstable_getCurrentPriorityLevel=function(){return h},e.unstable_getFirstCallbackNode=function(){return r(c)},e.unstable_next=function(A){switch(h){case 1:case 2:case 3:var D=3;break;default:D=h}var F=h;h=D;try{return A()}finally{h=F}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(A,D){switch(A){case 1:case 2:case 3:case 4:case 5:break;default:A=3}var F=h;h=A;try{return D()}finally{h=F}},e.unstable_scheduleCallback=function(A,D,F){var z=e.unstable_now();switch(typeof F=="object"&&F!==null?(F=F.delay,F=typeof F=="number"&&0<F?z+F:z):F=z,A){case 1:var H=-1;break;case 2:H=250;break;case 5:H=1073741823;break;case 4:H=1e4;break;default:H=5e3}return H=F+H,A={id:f++,callback:D,priorityLevel:A,startTime:F,expirationTime:H,sortIndex:-1},F>z?(A.sortIndex=F,t(u,A),r(c)===null&&A===r(u)&&(m?(x(_),_=-1):m=!0,U(S,F-z))):(A.sortIndex=H,t(c,A),g||p||(g=!0,R(j))),A},e.unstable_shouldYield=C,e.unstable_wrapCallback=function(A){var D=h;return function(){var F=h;h=D;try{return A.apply(this,arguments)}finally{h=F}}}})(zA);UA.exports=zA;var MB=UA.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 IB=v,on=MB;function Q(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 WA=new Set,ld={};function As(e,t){Wl(e,t),Wl(e+"Capture",t)}function Wl(e,t){for(ld[e]=t,e=0;e<t.length;e++)WA.add(t[e])}var ca=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Hx=Object.prototype.hasOwnProperty,$B=/^[: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]*$/,$P={},RP={};function RB(e){return Hx.call(RP,e)?!0:Hx.call($P,e)?!1:$B.test(e)?RP[e]=!0:($P[e]=!0,!1)}function DB(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 LB(e,t,r,n){if(t===null||typeof t>"u"||DB(e,t,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Mr(e,t,r,n,i,a,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=i,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=o}var ur={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){ur[e]=new Mr(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];ur[t]=new Mr(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){ur[e]=new Mr(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ur[e]=new Mr(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){ur[e]=new Mr(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){ur[e]=new Mr(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){ur[e]=new Mr(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){ur[e]=new Mr(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){ur[e]=new Mr(e,5,!1,e.toLowerCase(),null,!1,!1)});var x1=/[\-:]([a-z])/g;function b1(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(x1,b1);ur[t]=new Mr(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(x1,b1);ur[t]=new Mr(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(x1,b1);ur[t]=new Mr(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){ur[e]=new Mr(e,1,!1,e.toLowerCase(),null,!1,!1)});ur.xlinkHref=new Mr("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){ur[e]=new Mr(e,1,!1,e.toLowerCase(),null,!0,!0)});function w1(e,t,r,n){var i=ur.hasOwnProperty(t)?ur[t]:null;(i!==null?i.type!==0:n||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(LB(t,r,i,n)&&(r=null),n||i===null?RB(t)&&(r===null?e.removeAttribute(t):e.setAttribute(t,""+r)):i.mustUseProperty?e[i.propertyName]=r===null?i.type===3?!1:"":r:(t=i.attributeName,n=i.attributeNamespace,r===null?e.removeAttribute(t):(i=i.type,r=i===3||i===4&&r===!0?"":""+r,n?e.setAttributeNS(n,t,r):e.setAttribute(t,r))))}var Sa=IB.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,uh=Symbol.for("react.element"),tl=Symbol.for("react.portal"),rl=Symbol.for("react.fragment"),S1=Symbol.for("react.strict_mode"),qx=Symbol.for("react.profiler"),VA=Symbol.for("react.provider"),HA=Symbol.for("react.context"),j1=Symbol.for("react.forward_ref"),Kx=Symbol.for("react.suspense"),Gx=Symbol.for("react.suspense_list"),P1=Symbol.for("react.memo"),Ma=Symbol.for("react.lazy"),qA=Symbol.for("react.offscreen"),DP=Symbol.iterator;function nu(e){return e===null||typeof e!="object"?null:(e=DP&&e[DP]||e["@@iterator"],typeof e=="function"?e:null)}var St=Object.assign,xy;function Eu(e){if(xy===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);xy=t&&t[1]||""}return` 34`+xy+e}var by=!1;function wy(e,t){if(!e||by)return"";by=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var n=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){n=u}e.call(t.prototype)}else{try{throw Error()}catch(u){n=u}e()}}
vendor: 15,802 bytes, lines 34-37
34catch(u){if(u&&n&&typeof u.stack=="string"){for(var i=u.stack.split(` 35`),a=n.stack.split(` 36`),o=i.length-1,s=a.length-1;1<=o&&0<=s&&i[o]!==a[s];)s--;for(;1<=o&&0<=s;o--,s--)if(i[o]!==a[s]){if(o!==1||s!==1)do if(o--,s--,0>s||i[o]!==a[s]){var c=` 37`+i[o].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}while(1<=o&&0<=s);break}}}finally{by=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?Eu(e):""}function FB(e){switch(e.tag){case 5:return Eu(e.type);case 16:return Eu("Lazy");case 13:return Eu("Suspense");case 19:return Eu("SuspenseList");case 0:case 2:case 15:return e=wy(e.type,!1),e;case 11:return e=wy(e.type.render,!1),e;case 1:return e=wy(e.type,!0),e;default:return""}}function Yx(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 rl:return"Fragment";case tl:return"Portal";case qx:return"Profiler";case S1:return"StrictMode";case Kx:return"Suspense";case Gx:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case HA:return(e.displayName||"Context")+".Consumer";case VA:return(e._context.displayName||"Context")+".Provider";case j1:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case P1:return t=e.displayName||null,t!==null?t:Yx(e.type)||"Memo";case Ma:t=e._payload,e=e._init;try{return Yx(e(t))}catch{}}return null}function BB(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 Yx(t);case 8:return t===S1?"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 po(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function KA(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function UB(e){var t=KA(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 i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(o){n=""+o,a.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 dh(e){e._valueTracker||(e._valueTracker=UB(e))}function GA(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=KA(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function bp(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 Xx(e,t){var r=t.checked;return St({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function LP(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=po(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 YA(e,t){t=t.checked,t!=null&&w1(e,"checked",t,!1)}function Qx(e,t){YA(e,t);var r=po(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")?Zx(e,t.type,r):t.hasOwnProperty("defaultValue")&&Zx(e,t.type,po(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function FP(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function Zx(e,t,r){(t!=="number"||bp(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var ku=Array.isArray;function gl(e,t,r,n){if(e=e.options,t){t={};for(var i=0;i<r.length;i++)t["$"+r[i]]=!0;for(r=0;r<e.length;r++)i=t.hasOwnProperty("$"+e[r].value),e[r].selected!==i&&(e[r].selected=i),i&&n&&(e[r].defaultSelected=!0)}else{for(r=""+po(r),t=null,i=0;i<e.length;i++){if(e[i].value===r){e[i].selected=!0,n&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Jx(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(Q(91));return St({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function BP(e,t){var r=t.value;if(r==null){if(r=t.children,t=t.defaultValue,r!=null){if(t!=null)throw Error(Q(92));if(ku(r)){if(1<r.length)throw Error(Q(93));r=r[0]}t=r}t==null&&(t=""),r=t}e._wrapperState={initialValue:po(r)}}function XA(e,t){var r=po(t.value),n=po(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 UP(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function QA(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 eb(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?QA(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var fh,ZA=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,r,n,i){MSApp.execUnsafeLocalFunction(function(){return e(t,r,n,i)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(fh=fh||document.createElement("div"),fh.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=fh.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function cd(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var Uu={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},zB=["Webkit","ms","Moz","O"];Object.keys(Uu).forEach(function(e){zB.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Uu[t]=Uu[e]})});function JA(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||Uu.hasOwnProperty(e)&&Uu[e]?(""+t).trim():t+"px"}function eT(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,i=JA(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,i):e[r]=i}}var WB=St({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 tb(e,t){if(t){if(WB[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Q(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Q(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Q(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Q(62))}}function rb(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 nb=null;function N1(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ib=null,vl=null,yl=null;function zP(e){if(e=Af(e)){if(typeof ib!="function")throw Error(Q(280));var t=e.stateNode;t&&(t=$g(t),ib(e.stateNode,e.type,t))}}function tT(e){vl?yl?yl.push(e):yl=[e]:vl=e}function rT(){if(vl){var e=vl,t=yl;if(yl=vl=null,zP(e),t)for(e=0;e<t.length;e++)zP(t[e])}}function nT(e,t){return e(t)}function iT(){}var Sy=!1;function aT(e,t,r){if(Sy)return e(t,r);Sy=!0;try{return nT(e,t,r)}finally{Sy=!1,(vl!==null||yl!==null)&&(iT(),rT())}}function ud(e,t){var r=e.stateNode;if(r===null)return null;var n=$g(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(Q(231,t,typeof r));return r}var ab=!1;if(ca)try{var iu={};Object.defineProperty(iu,"passive",{get:function(){ab=!0}}),window.addEventListener("test",iu,iu),window.removeEventListener("test",iu,iu)}catch{ab=!1}function VB(e,t,r,n,i,a,o,s,c){var u=Array.prototype.slice.call(arguments,3);try{t.apply(r,u)}catch(f){this.onError(f)}}var zu=!1,wp=null,Sp=!1,ob=null,HB={onError:function(e){zu=!0,wp=e}};function qB(e,t,r,n,i,a,o,s,c){zu=!1,wp=null,VB.apply(HB,arguments)}function KB(e,t,r,n,i,a,o,s,c){if(qB.apply(this,arguments),zu){if(zu){var u=wp;zu=!1,wp=null}else throw Error(Q(198));Sp||(Sp=!0,ob=u)}}function Ts(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 oT(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function WP(e){if(Ts(e)!==e)throw Error(Q(188))}function GB(e){var t=e.alternate;if(!t){if(t=Ts(e),t===null)throw Error(Q(188));return t!==e?null:e}for(var r=e,n=t;;){var i=r.return;if(i===null)break;var a=i.alternate;if(a===null){if(n=i.return,n!==null){r=n;continue}break}if(i.child===a.child){for(a=i.child;a;){if(a===r)return WP(i),e;if(a===n)return WP(i),t;a=a.sibling}throw Error(Q(188))}if(r.return!==n.return)r=i,n=a;else{for(var o=!1,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){for(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)throw Error(Q(189))}}if(r.alternate!==n)throw Error(Q(190))}if(r.tag!==3)throw Error(Q(188));return r.stateNode.current===r?e:t}function sT(e){return e=GB(e),e!==null?lT(e):null}function lT(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=lT(e);if(t!==null)return t;e=e.sibling}return null}var cT=on.unstable_scheduleCallback,VP=on.unstable_cancelCallback,YB=on.unstable_shouldYield,XB=on.unstable_requestPaint,At=on.unstable_now,QB=on.unstable_getCurrentPriorityLevel,_1=on.unstable_ImmediatePriority,uT=on.unstable_UserBlockingPriority,jp=on.unstable_NormalPriority,ZB=on.unstable_LowPriority,dT=on.unstable_IdlePriority,Ag=null,yi=null;function JB(e){if(yi&&typeof yi.onCommitFiberRoot=="function")try{yi.onCommitFiberRoot(Ag,e,void 0,(e.current.flags&128)===128)}catch{}}var Xn=Math.clz32?Math.clz32:r6,e6=Math.log,t6=Math.LN2;function r6(e){return e>>>=0,e===0?32:31-(e6(e)/t6|0)|0}var hh=64,ph=4194304;function Cu(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 Pp(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,i=e.suspendedLanes,a=e.pingedLanes,o=r&268435455;if(o!==0){var s=o&~i;s!==0?n=Cu(s):(a&=o,a!==0&&(n=Cu(a)))}else o=r&~i,o!==0?n=Cu(o):a!==0&&(n=Cu(a));if(n===0)return 0;if(t!==0&&t!==n&&!(t&i)&&(i=n&-n,a=t&-t,i>=a||i===16&&(a&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-Xn(t),i=1<<r,n|=e[r],t&=~i;return n}function n6(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 i6(e,t){for(var r=e.suspendedLanes,n=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes;0<a;){var o=31-Xn(a),s=1<<o,c=i[o];c===-1?(!(s&r)||s&n)&&(i[o]=n6(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}}function sb(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function fT(){var e=hh;return hh<<=1,!(hh&4194240)&&(hh=64),e}function jy(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function kf(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Xn(t),e[t]=r}function a6(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 i=31-Xn(r),a=1<<i;t[i]=0,n[i]=-1,e[i]=-1,r&=~a}}function O1(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var n=31-Xn(r),i=1<<n;i&t|e[n]&t&&(e[n]|=t),r&=~i}}var et=0;function hT(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var pT,E1,mT,gT,vT,lb=!1,mh=[],eo=null,to=null,ro=null,dd=new Map,fd=new Map,Ra=[],o6="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function HP(e,t){switch(e){case"focusin":case"focusout":eo=null;break;case"dragenter":case"dragleave":to=null;break;case"mouseover":case"mouseout":ro=null;break;case"pointerover":case"pointerout":dd.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":fd.delete(t.pointerId)}}function au(e,t,r,n,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:r,eventSystemFlags:n,nativeEvent:a,targetContainers:[i]},t!==null&&(t=Af(t),t!==null&&E1(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function s6(e,t,r,n,i){switch(t){case"focusin":return eo=au(eo,e,t,r,n,i),!0;case"dragenter":return to=au(to,e,t,r,n,i),!0;case"mouseover":return ro=au(ro,e,t,r,n,i),!0;case"pointerover":var a=i.pointerId;
vendor: 12,776 bytes, line 37
37return dd.set(a,au(dd.get(a)||null,e,t,r,n,i)),!0;case"gotpointercapture":return a=i.pointerId,fd.set(a,au(fd.get(a)||null,e,t,r,n,i)),!0}return!1}function yT(e){var t=Yo(e.target);if(t!==null){var r=Ts(t);if(r!==null){if(t=r.tag,t===13){if(t=oT(r),t!==null){e.blockedOn=t,vT(e.priority,function(){mT(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 ep(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=cb(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var n=new r.constructor(r.type,r);nb=n,r.target.dispatchEvent(n),nb=null}else return t=Af(r),t!==null&&E1(t),e.blockedOn=r,!1;t.shift()}return!0}function qP(e,t,r){ep(e)&&r.delete(t)}function l6(){lb=!1,eo!==null&&ep(eo)&&(eo=null),to!==null&&ep(to)&&(to=null),ro!==null&&ep(ro)&&(ro=null),dd.forEach(qP),fd.forEach(qP)}function ou(e,t){e.blockedOn===t&&(e.blockedOn=null,lb||(lb=!0,on.unstable_scheduleCallback(on.unstable_NormalPriority,l6)))}function hd(e){function t(i){return ou(i,e)}if(0<mh.length){ou(mh[0],e);for(var r=1;r<mh.length;r++){var n=mh[r];n.blockedOn===e&&(n.blockedOn=null)}}for(eo!==null&&ou(eo,e),to!==null&&ou(to,e),ro!==null&&ou(ro,e),dd.forEach(t),fd.forEach(t),r=0;r<Ra.length;r++)n=Ra[r],n.blockedOn===e&&(n.blockedOn=null);for(;0<Ra.length&&(r=Ra[0],r.blockedOn===null);)yT(r),r.blockedOn===null&&Ra.shift()}var xl=Sa.ReactCurrentBatchConfig,Np=!0;function c6(e,t,r,n){var i=et,a=xl.transition;xl.transition=null;try{et=1,k1(e,t,r,n)}finally{et=i,xl.transition=a}}function u6(e,t,r,n){var i=et,a=xl.transition;xl.transition=null;try{et=4,k1(e,t,r,n)}finally{et=i,xl.transition=a}}function k1(e,t,r,n){if(Np){var i=cb(e,t,r,n);if(i===null)My(e,t,n,_p,r),HP(e,n);else if(s6(i,e,t,r,n))n.stopPropagation();else if(HP(e,n),t&4&&-1<o6.indexOf(e)){for(;i!==null;){var a=Af(i);if(a!==null&&pT(a),a=cb(e,t,r,n),a===null&&My(e,t,n,_p,r),a===i)break;i=a}i!==null&&n.stopPropagation()}else My(e,t,n,null,r)}}var _p=null;function cb(e,t,r,n){if(_p=null,e=N1(n),e=Yo(e),e!==null)if(t=Ts(e),t===null)e=null;else if(r=t.tag,r===13){if(e=oT(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 _p=e,null}function xT(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(QB()){case _1:return 1;case uT:return 4;case jp:case ZB:return 16;case dT:return 536870912;default:return 16}default:return 16}}var Ya=null,C1=null,tp=null;function bT(){if(tp)return tp;var e,t=C1,r=t.length,n,i="value"in Ya?Ya.value:Ya.textContent,a=i.length;for(e=0;e<r&&t[e]===i[e];e++);var o=r-e;for(n=1;n<=o&&t[r-n]===i[a-n];n++);return tp=i.slice(e,1<n?1-n:void 0)}function rp(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 gh(){return!0}function KP(){return!1}function ln(e){function t(r,n,i,a,o){this._reactName=r,this._targetInst=i,this.type=n,this.nativeEvent=a,this.target=o,this.currentTarget=null;for(var s in e)e.hasOwnProperty(s)&&(r=e[s],this[s]=r?r(a):a[s]);return this.isDefaultPrevented=(a.defaultPrevented!=null?a.defaultPrevented:a.returnValue===!1)?gh:KP,this.isPropagationStopped=KP,this}return St(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=gh)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=gh)},persist:function(){},isPersistent:gh}),t}var Cc={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},A1=ln(Cc),Cf=St({},Cc,{view:0,detail:0}),d6=ln(Cf),Py,Ny,su,Tg=St({},Cf,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:T1,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!==su&&(su&&e.type==="mousemove"?(Py=e.screenX-su.screenX,Ny=e.screenY-su.screenY):Ny=Py=0,su=e),Py)},movementY:function(e){return"movementY"in e?e.movementY:Ny}}),GP=ln(Tg),f6=St({},Tg,{dataTransfer:0}),h6=ln(f6),p6=St({},Cf,{relatedTarget:0}),_y=ln(p6),m6=St({},Cc,{animationName:0,elapsedTime:0,pseudoElement:0}),g6=ln(m6),v6=St({},Cc,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),y6=ln(v6),x6=St({},Cc,{data:0}),YP=ln(x6),b6={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},w6={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"},S6={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function j6(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=S6[e])?!!t[e]:!1}function T1(){return j6}var P6=St({},Cf,{key:function(e){if(e.key){var t=b6[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=rp(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?w6[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:T1,charCode:function(e){return e.type==="keypress"?rp(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?rp(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),N6=ln(P6),_6=St({},Tg,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),XP=ln(_6),O6=St({},Cf,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:T1}),E6=ln(O6),k6=St({},Cc,{propertyName:0,elapsedTime:0,pseudoElement:0}),C6=ln(k6),A6=St({},Tg,{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}),T6=ln(A6),M6=[9,13,27,32],M1=ca&&"CompositionEvent"in window,Wu=null;ca&&"documentMode"in document&&(Wu=document.documentMode);var I6=ca&&"TextEvent"in window&&!Wu,wT=ca&&(!M1||Wu&&8<Wu&&11>=Wu),QP=" ",ZP=!1;function ST(e,t){switch(e){case"keyup":return M6.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function jT(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var nl=!1;function $6(e,t){switch(e){case"compositionend":return jT(t);case"keypress":return t.which!==32?null:(ZP=!0,QP);case"textInput":return e=t.data,e===QP&&ZP?null:e;default:return null}}function R6(e,t){if(nl)return e==="compositionend"||!M1&&ST(e,t)?(e=bT(),tp=C1=Ya=null,nl=!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 wT&&t.locale!=="ko"?null:t.data;default:return null}}var D6={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 JP(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!D6[e.type]:t==="textarea"}function PT(e,t,r,n){tT(n),t=Op(t,"onChange"),0<t.length&&(r=new A1("onChange","change",null,r,n),e.push({event:r,listeners:t}))}var Vu=null,pd=null;function L6(e){$T(e,0)}function Mg(e){var t=ol(e);if(GA(t))return e}function F6(e,t){if(e==="change")return t}var NT=!1;if(ca){var Oy;if(ca){var Ey="oninput"in document;if(!Ey){var eN=document.createElement("div");eN.setAttribute("oninput","return;"),Ey=typeof eN.oninput=="function"}Oy=Ey}else Oy=!1;NT=Oy&&(!document.documentMode||9<document.documentMode)}function tN(){Vu&&(Vu.detachEvent("onpropertychange",_T),pd=Vu=null)}function _T(e){if(e.propertyName==="value"&&Mg(pd)){var t=[];PT(t,pd,e,N1(e)),aT(L6,t)}}function B6(e,t,r){e==="focusin"?(tN(),Vu=t,pd=r,Vu.attachEvent("onpropertychange",_T)):e==="focusout"&&tN()}function U6(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Mg(pd)}function z6(e,t){if(e==="click")return Mg(t)}function W6(e,t){if(e==="input"||e==="change")return Mg(t)}function V6(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Zn=typeof Object.is=="function"?Object.is:V6;function md(e,t){if(Zn(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 i=r[n];if(!Hx.call(t,i)||!Zn(e[i],t[i]))return!1}return!0}function rN(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function nN(e,t){var r=rN(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=rN(r)}}function OT(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?OT(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function ET(){for(var e=window,t=bp();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=bp(e.document)}return t}function I1(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 H6(e){var t=ET(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&OT(r.ownerDocument.documentElement,r)){if(n!==null&&I1(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 i=r.textContent.length,a=Math.min(n.start,i);n=n.end===void 0?a:Math.min(n.end,i),!e.extend&&a>n&&(i=n,n=a,a=i),i=nN(r,a);var o=nN(r,n);i&&o&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),a>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 q6=ca&&"documentMode"in document&&11>=document.documentMode,il=null,ub=null,Hu=null,db=!1;function iN(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;db||il==null||il!==bp(n)||(n=il,"selectionStart"in n&&I1(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focu
vendor: 4,501 bytes, line 37
37sNode:n.focusNode,focusOffset:n.focusOffset}),Hu&&md(Hu,n)||(Hu=n,n=Op(ub,"onSelect"),0<n.length&&(t=new A1("onSelect","select",null,t,r),e.push({event:t,listeners:n}),t.target=il)))}function vh(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var al={animationend:vh("Animation","AnimationEnd"),animationiteration:vh("Animation","AnimationIteration"),animationstart:vh("Animation","AnimationStart"),transitionend:vh("Transition","TransitionEnd")},ky={},kT={};ca&&(kT=document.createElement("div").style,"AnimationEvent"in window||(delete al.animationend.animation,delete al.animationiteration.animation,delete al.animationstart.animation),"TransitionEvent"in window||delete al.transitionend.transition);function Ig(e){if(ky[e])return ky[e];if(!al[e])return e;var t=al[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in kT)return ky[e]=t[r];return e}var CT=Ig("animationend"),AT=Ig("animationiteration"),TT=Ig("animationstart"),MT=Ig("transitionend"),IT=new Map,aN="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 So(e,t){IT.set(e,t),As(t,[e])}for(var Cy=0;Cy<aN.length;Cy++){var Ay=aN[Cy],K6=Ay.toLowerCase(),G6=Ay[0].toUpperCase()+Ay.slice(1);So(K6,"on"+G6)}So(CT,"onAnimationEnd");So(AT,"onAnimationIteration");So(TT,"onAnimationStart");So("dblclick","onDoubleClick");So("focusin","onFocus");So("focusout","onBlur");So(MT,"onTransitionEnd");Wl("onMouseEnter",["mouseout","mouseover"]);Wl("onMouseLeave",["mouseout","mouseover"]);Wl("onPointerEnter",["pointerout","pointerover"]);Wl("onPointerLeave",["pointerout","pointerover"]);As("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));As("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));As("onBeforeInput",["compositionend","keypress","textInput","paste"]);As("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));As("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));As("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Au="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(" "),Y6=new Set("cancel close invalid load scroll toggle".split(" ").concat(Au));function oN(e,t,r){var n=e.type||"unknown-event";e.currentTarget=r,KB(n,t,void 0,e),e.currentTarget=null}function $T(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var n=e[r],i=n.event;n=n.listeners;e:{var a=void 0;if(t)for(var o=n.length-1;0<=o;o--){var s=n[o],c=s.instance,u=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break e;oN(i,s,u),a=c}else for(o=0;o<n.length;o++){if(s=n[o],c=s.instance,u=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break e;oN(i,s,u),a=c}}}if(Sp)throw e=ob,Sp=!1,ob=null,e}function ht(e,t){var r=t[gb];r===void 0&&(r=t[gb]=new Set);var n=e+"__bubble";r.has(n)||(RT(t,e,2,!1),r.add(n))}function Ty(e,t,r){var n=0;t&&(n|=4),RT(r,e,n,t)}var yh="_reactListening"+Math.random().toString(36).slice(2);function gd(e){if(!e[yh]){e[yh]=!0,WA.forEach(function(r){r!=="selectionchange"&&(Y6.has(r)||Ty(r,!1,e),Ty(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[yh]||(t[yh]=!0,Ty("selectionchange",!1,t))}}function RT(e,t,r,n){switch(xT(t)){case 1:var i=c6;break;case 4:i=u6;break;default:i=k1}r=i.bind(null,t,r,e),i=void 0,!ab||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),n?i!==void 0?e.addEventListener(t,r,{capture:!0,passive:i}):e.addEventListener(t,r,!0):i!==void 0?e.addEventListener(t,r,{passive:i}):e.addEventListener(t,r,!1)}function My(e,t,r,n,i){var a=n;if(!(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;
vendor: 4,502 bytes, line 37
37if(s===i||s.nodeType===8&&s.parentNode===i)break;if(o===4)for(o=n.return;o!==null;){var c=o.tag;if((c===3||c===4)&&(c=o.stateNode.containerInfo,c===i||c.nodeType===8&&c.parentNode===i))return;o=o.return}for(;s!==null;){if(o=Yo(s),o===null)return;if(c=o.tag,c===5||c===6){n=a=o;continue e}s=s.parentNode}}n=n.return}aT(function(){var u=a,f=N1(r),d=[];e:{var h=IT.get(e);if(h!==void 0){var p=A1,g=e;switch(e){case"keypress":if(rp(r)===0)break e;case"keydown":case"keyup":p=N6;break;case"focusin":g="focus",p=_y;break;case"focusout":g="blur",p=_y;break;case"beforeblur":case"afterblur":p=_y;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=GP;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=h6;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=E6;break;case CT:case AT:case TT:p=g6;break;case MT:p=C6;break;case"scroll":p=d6;break;case"wheel":p=T6;break;case"copy":case"cut":case"paste":p=y6;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=XP}var m=(t&4)!==0,y=!m&&e==="scroll",x=m?h!==null?h+"Capture":null:h;m=[];for(var b=u,w;b!==null;){w=b;var S=w.stateNode;if(w.tag===5&&S!==null&&(w=S,x!==null&&(S=ud(b,x),S!=null&&m.push(vd(b,S,w)))),y)break;b=b.return}0<m.length&&(h=new p(h,g,null,r,f),d.push({event:h,listeners:m}))}}if(!(t&7)){e:{if(h=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",h&&r!==nb&&(g=r.relatedTarget||r.fromElement)&&(Yo(g)||g[ua]))break e;if((p||h)&&(h=f.window===f?f:(h=f.ownerDocument)?h.defaultView||h.parentWindow:window,p?(g=r.relatedTarget||r.toElement,p=u,g=g?Yo(g):null,g!==null&&(y=Ts(g),g!==y||g.tag!==5&&g.tag!==6)&&(g=null)):(p=null,g=u),p!==g)){if(m=GP,S="onMouseLeave",x="onMouseEnter",b="mouse",(e==="pointerout"||e==="pointerover")&&(m=XP,S="onPointerLeave",x="onPointerEnter",b="pointer"),y=p==null?h:ol(p),w=g==null?h:ol(g),h=new m(S,b+"leave",p,r,f),h.target=y,h.relatedTarget=w,S=null,Yo(f)===u&&(m=new m(x,b+"enter",g,r,f),m.target=w,m.relatedTarget=y,S=m),y=S,p&&g)t:{for(m=p,x=g,b=0,w=m;w;w=Ws(w))b++;for(w=0,S=x;S;S=Ws(S))w++;for(;0<b-w;)m=Ws(m),b--;for(;0<w-b;)x=Ws(x),w--;for(;b--;){if(m===x||x!==null&&m===x.alternate)break t;m=Ws(m),x=Ws(x)}m=null}else m=null;p!==null&&sN(d,h,p,m,!1),g!==null&&y!==null&&sN(d,y,g,m,!0)}}e:{if(h=u?ol(u):window,p=h.nodeName&&h.nodeName.toLowerCase(),p==="select"||p==="input"&&h.type==="file")var j=F6;else if(JP(h))if(NT)j=W6;else{j=U6;var P=B6}else(p=h.nodeName)&&p.toLowerCase()==="input"&&(h.type==="checkbox"||h.type==="radio")&&(j=z6);if(j&&(j=j(e,u))){PT(d,j,r,f);break e}P&&P(e,h,u),e==="focusout"&&(P=h._wrapperState)&&P.controlled&&h.type==="number"&&Zx(h,"number",h.value)}switch(P=u?ol(u):window,e){case"focusin":(JP(P)||P.contentEditable==="true")&&(il=P,ub=u,Hu=null);break;case"focusout":Hu=ub=il=null;break;case"mousedown":db=!0;break;case"contextmenu":case"mouseup":case"dragend":db=!1,iN(d,r,f);break;case"selectionchange":if(q6)break;case"keydown":case"keyup":iN(d,r,f)}var N;if(M1)e:{switch(e){case"compositionstart":var _="onCompositionStart";break e;case"compositionend":_="onCompositionEnd";break e;case"compositionupdate":_="onCompositionUpdate";break e}_=void 0}else nl?ST(e,r)&&(_="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(_="onCompositionStart");_&&(wT&&r.locale!=="ko"&&(nl||_!=="onCompositionStart"?_==="onCompositionEnd"&&nl&&(N=bT()):(Ya=f,C1="value"in Ya?Ya.value:Ya.textContent,nl=!0)),P=Op(u,_),0<P.length&&(_=new YP(_,e,null,r,f),d.push({event:_,listeners:P}),N?_.data=N:(N=jT(r),N!==null&&(_.data=N)))),(N=I6?$6(e,r):R6(e,r))&&(u=Op(u,"onBeforeInput"),0<u.length&&(f=new YP("onBeforeInput","beforeinput",null,r,f),d.push({event:f,listeners:u}),f.data=N))}$T(d,t)})}function vd(e,t,r){return{instance:e,listener:t,currentTarget:r}}function Op(e,t){for(var r=t+"Capture",n=[];e!==null;){var i=e,a=i.stateNode;i.tag===5&&a!==null&&(i=a,a=ud(e,r),a!=null&&n.unshift(vd(e,a,i)),a=ud(e,t),a!=null&&n.push(vd(e,a,i))),e=e.return}return n}function Ws(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function sN(e,t,r,n,i){for(var a=t._reactName,o=[];r!==null&&r!==n;){var s=r,c=s.alternate,u=s.stateNode;if(c!==null&&c===n)break;s.tag===5&&u!==null&&(s=u,i?(c=ud(r,a),c!=null&&o.unshift(vd(r,c,s)
vendor: 4,397 bytes, lines 37-38
37)):i||(c=ud(r,a),c!=null&&o.push(vd(r,c,s)))),r=r.return}o.length!==0&&e.push({event:t,listeners:o})}var X6=/\r\n?/g,Q6=/\u0000|\uFFFD/g;function lN(e){return(typeof e=="string"?e:""+e).replace(X6,` 38`).replace(Q6,"")}function xh(e,t,r){if(t=lN(t),lN(e)!==t&&r)throw Error(Q(425))}function Ep(){}var fb=null,hb=null;function pb(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 mb=typeof setTimeout=="function"?setTimeout:void 0,Z6=typeof clearTimeout=="function"?clearTimeout:void 0,cN=typeof Promise=="function"?Promise:void 0,J6=typeof queueMicrotask=="function"?queueMicrotask:typeof cN<"u"?function(e){return cN.resolve(null).then(e).catch(eU)}:mb;function eU(e){setTimeout(function(){throw e})}function Iy(e,t){var r=t,n=0;do{var i=r.nextSibling;if(e.removeChild(r),i&&i.nodeType===8)if(r=i.data,r==="/$"){if(n===0){e.removeChild(i),hd(t);return}n--}else r!=="$"&&r!=="$?"&&r!=="$!"||n++;r=i}while(r);hd(t)}function no(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 uN(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 Ac=Math.random().toString(36).slice(2),pi="__reactFiber$"+Ac,yd="__reactProps$"+Ac,ua="__reactContainer$"+Ac,gb="__reactEvents$"+Ac,tU="__reactListeners$"+Ac,rU="__reactHandles$"+Ac;function Yo(e){var t=e[pi];if(t)return t;for(var r=e.parentNode;r;){if(t=r[ua]||r[pi]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=uN(e);e!==null;){if(r=e[pi])return r;e=uN(e)}return t}e=r,r=e.parentNode}return null}function Af(e){return e=e[pi]||e[ua],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function ol(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(Q(33))}function $g(e){return e[yd]||null}var vb=[],sl=-1;function jo(e){return{current:e}}function gt(e){0>sl||(e.current=vb[sl],vb[sl]=null,sl--)}function dt(e,t){sl++,vb[sl]=e.current,e.current=t}var mo={},xr=jo(mo),Wr=jo(!1),ms=mo;function Vl(e,t){var r=e.type.contextTypes;if(!r)return mo;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var i={},a;for(a in r)i[a]=t[a];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Vr(e){return e=e.childContextTypes,e!=null}function kp(){gt(Wr),gt(xr)}function dN(e,t,r){if(xr.current!==mo)throw Error(Q(168));dt(xr,t),dt(Wr,r)}function DT(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var i in n)if(!(i in t))throw Error(Q(108,BB(e)||"Unknown",i));return St({},r,n)}function Cp(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||mo,ms=xr.current,dt(xr,e),dt(Wr,Wr.current),!0}function fN(e,t,r){var n=e.stateNode;if(!n)throw Error(Q(169));r?(e=DT(e,t,ms),n.__reactInternalMemoizedMergedChildContext=e,gt(Wr),gt(xr),dt(xr,e)):gt(Wr),dt(Wr,r)}var Vi=null,Rg=!1,$y=!1;function LT(e){Vi===null?Vi=[e]:Vi.push(e)}function nU(e){Rg=!0,LT(e)}function Po(){if(!$y&&Vi!==null){$y=!0;var e=0,t=et;try{var r=Vi;for(et=1;e<r.length;e++){var n=r[e];do n=n(!0);while(n!==null)}Vi=null,Rg=!1}catch(i){throw Vi!==null&&(Vi=Vi.slice(e+1)),cT(_1,Po),i}finally{et=t,$y=!1}}return null}var ll=[],cl=0,Ap=null,Tp=0,yn=[],xn=0,gs=null,Gi=1,Yi="";function Ro(e,t){ll[cl++]=Tp,ll[cl++]=Ap,Ap=e,Tp=t}function FT(e,t,r){yn[xn++]=Gi,yn[xn++]=Yi,yn[xn++]=gs,gs=e;var n=Gi;e=Yi;var i=32-Xn(n)-1;n&=~(1<<i),r+=1;var a=32-Xn(t)+i;if(30<a){var o=i-i%5;a=(n&(1<<o)-1).toString(32),n>>=o,i-=o,Gi=1<<32-Xn(t)+i|r<<i|n,Yi=a+e}else Gi=1<<a|r<<i|n,Yi=e}function $1(e){e.return!==null&&(Ro(e,1),FT(e,1,0))}function R1(e){for(;e===Ap;)Ap=ll[--cl],ll[cl]=null,Tp=ll[--cl],ll[cl]=null;for(;e===gs;)gs=yn[--xn],yn[xn]=null,Yi=yn[--xn],yn[xn]=null,Gi=yn[--xn],yn[xn]=null}var rn=null,tn=null,vt=!1,Vn=null;function BT(e,t){var r=bn(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 hN(e,t){switch(e.tag){case 5:var r=e.type;
vendor: 14,506 bytes, line 38
38return t=t.nodeType!==1||r.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,rn=e,tn=no(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,rn=e,tn=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=gs!==null?{id:Gi,overflow:Yi}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=bn(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,rn=e,tn=null,!0):!1;default:return!1}}function yb(e){return(e.mode&1)!==0&&(e.flags&128)===0}function xb(e){if(vt){var t=tn;if(t){var r=t;if(!hN(e,t)){if(yb(e))throw Error(Q(418));t=no(r.nextSibling);var n=rn;t&&hN(e,t)?BT(n,r):(e.flags=e.flags&-4097|2,vt=!1,rn=e)}}else{if(yb(e))throw Error(Q(418));e.flags=e.flags&-4097|2,vt=!1,rn=e}}}function pN(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;rn=e}function bh(e){if(e!==rn)return!1;if(!vt)return pN(e),vt=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!pb(e.type,e.memoizedProps)),t&&(t=tn)){if(yb(e))throw UT(),Error(Q(418));for(;t;)BT(e,t),t=no(t.nextSibling)}if(pN(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(Q(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"){if(t===0){tn=no(e.nextSibling);break e}t--}else r!=="$"&&r!=="$!"&&r!=="$?"||t++}e=e.nextSibling}tn=null}}else tn=rn?no(e.stateNode.nextSibling):null;return!0}function UT(){for(var e=tn;e;)e=no(e.nextSibling)}function Hl(){tn=rn=null,vt=!1}function D1(e){Vn===null?Vn=[e]:Vn.push(e)}var iU=Sa.ReactCurrentBatchConfig;function lu(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(Q(309));var n=r.stateNode}if(!n)throw Error(Q(147,e));var i=n,a=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===a?t.ref:(t=function(o){var s=i.refs;o===null?delete s[a]:s[a]=o},t._stringRef=a,t)}if(typeof e!="string")throw Error(Q(284));if(!r._owner)throw Error(Q(290,e))}return e}function wh(e,t){throw e=Object.prototype.toString.call(t),Error(Q(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function mN(e){var t=e._init;return t(e._payload)}function zT(e){function t(x,b){if(e){var w=x.deletions;w===null?(x.deletions=[b],x.flags|=16):w.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 i(x,b){return x=so(x,b),x.index=0,x.sibling=null,x}function a(x,b,w){return x.index=w,e?(w=x.alternate,w!==null?(w=w.index,w<b?(x.flags|=2,b):w):(x.flags|=2,b)):(x.flags|=1048576,b)}function o(x){return e&&x.alternate===null&&(x.flags|=2),x}function s(x,b,w,S){return b===null||b.tag!==6?(b=zy(w,x.mode,S),b.return=x,b):(b=i(b,w),b.return=x,b)}function c(x,b,w,S){var j=w.type;return j===rl?f(x,b,w.props.children,S,w.key):b!==null&&(b.elementType===j||typeof j=="object"&&j!==null&&j.$$typeof===Ma&&mN(j)===b.type)?(S=i(b,w.props),S.ref=lu(x,b,w),S.return=x,S):(S=cp(w.type,w.key,w.props,null,x.mode,S),S.ref=lu(x,b,w),S.return=x,S)}function u(x,b,w,S){return b===null||b.tag!==4||b.stateNode.containerInfo!==w.containerInfo||b.stateNode.implementation!==w.implementation?(b=Wy(w,x.mode,S),b.return=x,b):(b=i(b,w.children||[]),b.return=x,b)}function f(x,b,w,S,j){return b===null||b.tag!==7?(b=ds(w,x.mode,S,j),b.return=x,b):(b=i(b,w),b.return=x,b)}function d(x,b,w){if(typeof b=="string"&&b!==""||typeof b=="number")return b=zy(""+b,x.mode,w),b.return=x,b;if(typeof b=="object"&&b!==null){switch(b.$$typeof){case uh:return w=cp(b.type,b.key,b.props,null,x.mode,w),w.ref=lu(x,null,b),w.return=x,w;case tl:return b=Wy(b,x.mode,w),b.return=x,b;case Ma:var S=b._init;return d(x,S(b._payload),w)}if(ku(b)||nu(b))return b=ds(b,x.mode,w,null),b.return=x,b;wh(x,b)}return null}function h(x,b,w,S){var j=b!==null?b.key:null;if(typeof w=="string"&&w!==""||typeof w=="number")return j!==null?null:s(x,b,""+w,S);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case uh:return w.key===j?c(x,b,w,S):null;case tl:return w.key===j?u(x,b,w,S):null;case Ma:return j=w._init,h(x,b,j(w._payload),S)}if(ku(w)||nu(w))return j!==null?null:f(x,b,w,S,null);wh(x,w)}return null}function p(x,b,w,S,j){if(typeof S=="string"&&S!==""||typeof S=="number")return x=x.get(w)||null,s(b,x,""+S,j);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case uh:return x=x.get(S.key===null?w:S.key)||null,c(b,x,S,j);case tl:return x=x.get(S.key===null?w:S.key)||null,u(b,x,S,j);case Ma:var P=S._init;return p(x,b,w,P(S._payload),j)}if(ku(S)||nu(S))return x=x.get(w)||null,f(b,x,S,j,null);wh(b,S)}return null}function g(x,b,w,S){for(var j=null,P=null,N=b,_=b=0,O=null;N!==null&&_<w.length;_++){N.index>_?(O=N,N=null):O=N.sibling;var k=h(x,N,w[_],S);if(k===null){N===null&&(N=O);break}e&&N&&k.alternate===null&&t(x,N),b=a(k,b,_),P===null?j=k:P.sibling=k,P=k,N=O}if(_===w.length)return r(x,N),vt&&Ro(x,_),j;if(N===null){for(;_<w.length;_++)N=d(x,w[_],S),N!==null&&(b=a(N,b,_),P===null?j=N:P.sibling=N,P=N);return vt&&Ro(x,_),j}for(N=n(x,N);_<w.length;_++)O=p(N,x,_,w[_],S),O!==null&&(e&&O.alternate!==null&&N.delete(O.key===null?_:O.key),b=a(O,b,_),P===null?j=O:P.sibling=O,P=O);return e&&N.forEach(function(C){return t(x,C)}),vt&&Ro(x,_),j}function m(x,b,w,S){var j=nu(w);if(typeof j!="function")throw Error(Q(150));if(w=j.call(w),w==null)throw Error(Q(151));for(var P=j=null,N=b,_=b=0,O=null,k=w.next();N!==null&&!k.done;_++,k=w.next()){N.index>_?(O=N,N=null):O=N.sibling;var C=h(x,N,k.value,S);if(C===null){N===null&&(N=O);break}e&&N&&C.alternate===null&&t(x,N),b=a(C,b,_),P===null?j=C:P.sibling=C,P=C,N=O}if(k.done)return r(x,N),vt&&Ro(x,_),j;if(N===null){for(;!k.done;_++,k=w.next())k=d(x,k.value,S),k!==null&&(b=a(k,b,_),P===null?j=k:P.sibling=k,P=k);return vt&&Ro(x,_),j}for(N=n(x,N);!k.done;_++,k=w.next())k=p(N,x,_,k.value,S),k!==null&&(e&&k.alternate!==null&&N.delete(k.key===null?_:k.key),b=a(k,b,_),P===null?j=k:P.sibling=k,P=k);return e&&N.forEach(function(E){return t(x,E)}),vt&&Ro(x,_),j}function y(x,b,w,S){if(typeof w=="object"&&w!==null&&w.type===rl&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case uh:e:{for(var j=w.key,P=b;P!==null;){if(P.key===j){if(j=w.type,j===rl){if(P.tag===7){r(x,P.sibling),b=i(P,w.props.children),b.return=x,x=b;break e}}else if(P.elementType===j||typeof j=="object"&&j!==null&&j.$$typeof===Ma&&mN(j)===P.type){r(x,P.sibling),b=i(P,w.props),b.ref=lu(x,P,w),b.return=x,x=b;break e}r(x,P);break}else t(x,P);P=P.sibling}w.type===rl?(b=ds(w.props.children,x.mode,S,w.key),b.return=x,x=b):(S=cp(w.type,w.key,w.props,null,x.mode,S),S.ref=lu(x,b,w),S.return=x,x=S)}return o(x);case tl:e:{for(P=w.key;b!==null;){if(b.key===P)if(b.tag===4&&b.stateNode.containerInfo===w.containerInfo&&b.stateNode.implementation===w.implementation){r(x,b.sibling),b=i(b,w.children||[]),b.return=x,x=b;break e}else{r(x,b);break}else t(x,b);b=b.sibling}b=Wy(w,x.mode,S),b.return=x,x=b}return o(x);case Ma:return P=w._init,y(x,b,P(w._payload),S)}if(ku(w))return g(x,b,w,S);if(nu(w))return m(x,b,w,S);wh(x,w)}return typeof w=="string"&&w!==""||typeof w=="number"?(w=""+w,b!==null&&b.tag===6?(r(x,b.sibling),b=i(b,w),b.return=x,x=b):(r(x,b),b=zy(w,x.mode,S),b.return=x,x=b),o(x)):r(x,b)}return y}var ql=zT(!0),WT=zT(!1),Mp=jo(null),Ip=null,ul=null,L1=null;function F1(){L1=ul=Ip=null}function B1(e){var t=Mp.current;gt(Mp),e._currentValue=t}function bb(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 bl(e,t){Ip=e,L1=ul=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Ur=!0),e.firstContext=null)}function En(e){var t=e._currentValue;if(L1!==e)if(e={context:e,memoizedValue:t,next:null},ul===null){if(Ip===null)throw Error(Q(308));ul=e,Ip.dependencies={lanes:0,firstContext:e}}else ul=ul.next=e;return t}var Xo=null;function U1(e){Xo===null?Xo=[e]:Xo.push(e)}function VT(e,t,r,n){var i=t.interleaved;return i===null?(r.next=r,U1(t)):(r.next=i.next,i.next=r),t.interleaved=r,da(e,n)}function da(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 Ia=!1;function z1(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function HT(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 ta(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function io(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,Ke&2){var i=n.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),n.pending=t,da(e,r)}return i=n.interleaved,i===null?(t.next=t,U1(n)):(t.next=i.next,i.next=t),n.interleaved=t,da(e,r)}function np(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,O1(e,r)}}function gN(e,t){var r=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var i=null,a=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};a===null?i=a=o:a=a.next=o,r=r.next}while(r!==null);a===null?i=a=t:a=a.next=t}else i=a=t;r={baseState:n.baseState,firstBaseUpdate:i,lastBaseUpdate:a,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 $p(e,t,r,n){var i=e.updateQueue;Ia=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,u=c.next;c.next=null,o===null?a=u:o.next=u,o=c;var f=e.alternate;f!==null&&(f=f.updateQueue,s=f.lastBaseUpdate,s!==o&&(s===null?f.firstBaseUpdate=u:s.next=u,f.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,f=u=c=null,s=a;do{var h=s.lane,p=s.eventTime;if((n&h)===h){f!==null&&(f=f.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"){d=g.call(p,d,h);break e}d=g;break e;case 3:g.flags=g.flags&-65537|128;case 0:if(g=m.payload,h=typeof g=="function"?g.call(p,d,h):g,h==null)break e;d=St({},d,h);break e;case 2:Ia=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,h=i.effects,h===null?i.effects=[s]:h.push(s))}else p={eventTime:p,lane:h,tag:s.tag,payload:s.payload,callback:s.callback,next:null},f===null?(u=f=p,c=d):f=f.next=p,o|=h;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;h=s,s=h.next,h.next=null,i.lastBaseUpdate=h,i.shared.pending=null}}while(!0);if(f===null&&(c=d),i.baseState=c,i.firstBaseUpdate=u,i.lastBaseUpdate=f,t=i.shared.interleaved,t!==null){i=t;do o|=i.lane,i=i.next;while(i!==t)}else a===null&&(i.shared.lanes=0);ys|=o,e.lanes=o,e.memoizedState=d}}function vN(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var n=e[t],i=n.callback;if(i!==null){if(n.callback=null,n=r,typeof i!="function")throw Error(Q(191,i));i.call(n)}}}var Tf={},xi=jo(Tf),xd=jo(Tf),bd=jo(Tf);function Qo(e){if(e===Tf)throw Error(Q(174));return e}function W1(e,t){switch(dt(bd,t),dt(xd,e),dt(xi,Tf),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:eb(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=eb(t,e)}gt(xi),dt(xi,t)}function Kl(){gt(xi),gt(xd),gt(bd)}function qT(e){Qo(bd.current);var t=Qo(xi.current),r=eb(t,e.type);t!==r&&(dt(xd,e),dt(xi,r))}function V1(e){xd.current===e&&(gt(xi),gt(xd))}var bt=jo(0);function Rp(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 Ry=[];function H1(){for(var e=0;e<Ry.length;e++)Ry[e]._workInProgressVersionPrimary=null;Ry.length=0}var ip=Sa.ReactCurrentDispatcher,Dy=Sa.ReactCurrentBatchConfig,vs=0,wt=null,Wt=null,er=null,Dp=!1,qu=!1,wd=0,aU=0;function dr(){throw Error(Q(321))}function q1(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!Zn(e[r],t[r]))return!1;return!0}function K1(e,t,r,n,i,a){if(vs=a,wt=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ip.current=e===null||e.memoizedState===null?cU:uU,e=r(n,i),qu){a=0;do{if(qu=!1,wd=0,25<=a)throw Error(Q(301));a+=1,er=Wt=null,t.updateQueue=null,ip.current=dU,e=r(n,i)}while(qu)}if(ip.current=Lp,t=Wt!==null&&Wt.next!==null,vs=0,er=Wt=wt=null,Dp=!1,t)throw Error(Q(300));return e}function G1(){var e=wd!==0;return wd=0,e}function li(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return er===null?wt.memoizedState=er=e:er=er.next=e,er}function kn(){if(Wt===null){var e=wt.alternate;e=e!==null?e.memoizedState:null}else e=Wt.next;var t=er===null?wt.memoizedState:er.next;if(t!==null)er=t,Wt=e;else{if(e===null)throw Error(Q(310));Wt=e,e={memoizedState:Wt.memoizedState,baseState:Wt.baseState,baseQueue:Wt.baseQueue,queue:Wt.queue,next:null},er===null?wt.memoizedState=er=e:er=er.next=e}return er}function Sd(e,t){return typeof t=="function"?t(e):t}function Ly(e){var t=kn(),r=t.queue;if(r===null)throw Error(Q(311));r.lastRenderedReducer=e;var n=Wt,i=n.baseQueue,a=r.pending;if(a!==null){if(i!==null){var o=i.next;i.next=a.next,a.next=o}n.baseQueue=i=a,r.pending=null}if(i!==null){a=i.next,n=n.baseState;var s=o=null,c=null,u=a;do{var f=u.lane;if((vs&f)===f)c!==null&&(c=c.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),n=u.hasEagerState?u.eagerState:e(n,u.action);else{var d={lane:f,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};c===null?(s=c=d,o=n):c=c.next=d,wt.lanes|=f,ys|=f}u=u.next}while(u!==null&&u!==a);c===null?o=n:c.next=s,Zn(n,t.memoizedState)||(Ur=!0),t.memoizedState=n,t.baseState=o,t.baseQueue=c,r.lastRenderedState=n}if(e=r.interleaved,e!==null){i=e;do a=i.lane,wt.lanes|=a,ys|=a,i=i.next;while(i!==e)}else i===null&&(r.lanes=0);
vendor: 4,900 bytes, line 38
38return[t.memoizedState,r.dispatch]}function Fy(e){var t=kn(),r=t.queue;if(r===null)throw Error(Q(311));r.lastRenderedReducer=e;var n=r.dispatch,i=r.pending,a=t.memoizedState;if(i!==null){r.pending=null;var o=i=i.next;do a=e(a,o.action),o=o.next;while(o!==i);Zn(a,t.memoizedState)||(Ur=!0),t.memoizedState=a,t.baseQueue===null&&(t.baseState=a),r.lastRenderedState=a}return[a,n]}function KT(){}function GT(e,t){var r=wt,n=kn(),i=t(),a=!Zn(n.memoizedState,i);if(a&&(n.memoizedState=i,Ur=!0),n=n.queue,Y1(QT.bind(null,r,n,e),[e]),n.getSnapshot!==t||a||er!==null&&er.memoizedState.tag&1){if(r.flags|=2048,jd(9,XT.bind(null,r,n,i,t),void 0,null),rr===null)throw Error(Q(349));vs&30||YT(r,t,i)}return i}function YT(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=wt.updateQueue,t===null?(t={lastEffect:null,stores:null},wt.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function XT(e,t,r,n){t.value=r,t.getSnapshot=n,ZT(t)&&JT(e)}function QT(e,t,r){return r(function(){ZT(t)&&JT(e)})}function ZT(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!Zn(e,r)}catch{return!0}}function JT(e){var t=da(e,1);t!==null&&Qn(t,e,1,-1)}function yN(e){var t=li();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Sd,lastRenderedState:e},t.queue=e,e=e.dispatch=lU.bind(null,wt,e),[t.memoizedState,e]}function jd(e,t,r,n){return e={tag:e,create:t,destroy:r,deps:n,next:null},t=wt.updateQueue,t===null?(t={lastEffect:null,stores:null},wt.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 e2(){return kn().memoizedState}function ap(e,t,r,n){var i=li();wt.flags|=e,i.memoizedState=jd(1|t,r,void 0,n===void 0?null:n)}function Dg(e,t,r,n){var i=kn();n=n===void 0?null:n;var a=void 0;if(Wt!==null){var o=Wt.memoizedState;if(a=o.destroy,n!==null&&q1(n,o.deps)){i.memoizedState=jd(t,r,a,n);return}}wt.flags|=e,i.memoizedState=jd(1|t,r,a,n)}function xN(e,t){return ap(8390656,8,e,t)}function Y1(e,t){return Dg(2048,8,e,t)}function t2(e,t){return Dg(4,2,e,t)}function r2(e,t){return Dg(4,4,e,t)}function n2(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 i2(e,t,r){return r=r!=null?r.concat([e]):null,Dg(4,4,n2.bind(null,t,e),r)}function X1(){}function a2(e,t){var r=kn();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&q1(t,n[1])?n[0]:(r.memoizedState=[e,t],e)}function o2(e,t){var r=kn();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&q1(t,n[1])?n[0]:(e=e(),r.memoizedState=[e,t],e)}function s2(e,t,r){return vs&21?(Zn(r,t)||(r=fT(),wt.lanes|=r,ys|=r,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Ur=!0),e.memoizedState=r)}function oU(e,t){var r=et;et=r!==0&&4>r?r:4,e(!0);var n=Dy.transition;Dy.transition={};try{e(!1),t()}finally{et=r,Dy.transition=n}}function l2(){return kn().memoizedState}function sU(e,t,r){var n=oo(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},c2(e))u2(t,r);else if(r=VT(e,t,r,n),r!==null){var i=kr();Qn(r,e,n,i),d2(r,t,n)}}function lU(e,t,r){var n=oo(e),i={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(c2(e))u2(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,r);if(i.hasEagerState=!0,i.eagerState=s,Zn(s,o)){var c=t.interleaved;c===null?(i.next=i,U1(t)):(i.next=c.next,c.next=i),t.interleaved=i;return}}catch{}finally{}r=VT(e,t,i,n),r!==null&&(i=kr(),Qn(r,e,n,i),d2(r,t,n))}}function c2(e){var t=e.alternate;return e===wt||t!==null&&t===wt}function u2(e,t){qu=Dp=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function d2(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,O1(e,r)}}var Lp={readContext:En,useCallback:dr,useContext:dr,useEffect:dr,useImperativeHandle:dr,useInsertionEffect:dr,useLayoutEffect:dr,useMemo:dr,useReducer:dr,useRef:dr,useState:dr,useDebugValue:dr,useDeferredValue:dr,useTransition:dr,useMutableSource:dr,useSyncExternalStore:dr,useId:dr,unstable_isNewReconciler:!1},cU={readContext:En,useCallback:function(e,t){return li().memoizedState=[e,t===void 0?null:t],e},useContext:En,useEffect:xN,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,ap(4194308,4,n2.bind(null,t,e),r)},useLayoutEffect:function(e,t){return ap(4194308,4,e,t)},useInsertionEffect:function(e,t){return ap(4,2,e,t)},useMemo:function(e,t){var r=li();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=li();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=sU.bind(null,wt,e),[n.memoizedState,e]}
vendor: 7,431 bytes, lines 38-40
38,useRef:function(e){var t=li();return e={current:e},t.memoizedState=e},useState:yN,useDebugValue:X1,useDeferredValue:function(e){return li().memoizedState=e},useTransition:function(){var e=yN(!1),t=e[0];return e=oU.bind(null,e[1]),li().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=wt,i=li();if(vt){if(r===void 0)throw Error(Q(407));r=r()}else{if(r=t(),rr===null)throw Error(Q(349));vs&30||YT(n,t,r)}i.memoizedState=r;var a={value:r,getSnapshot:t};return i.queue=a,xN(QT.bind(null,n,a,e),[e]),n.flags|=2048,jd(9,XT.bind(null,n,a,r,t),void 0,null),r},useId:function(){var e=li(),t=rr.identifierPrefix;if(vt){var r=Yi,n=Gi;r=(n&~(1<<32-Xn(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=wd++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=aU++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},uU={readContext:En,useCallback:a2,useContext:En,useEffect:Y1,useImperativeHandle:i2,useInsertionEffect:t2,useLayoutEffect:r2,useMemo:o2,useReducer:Ly,useRef:e2,useState:function(){return Ly(Sd)},useDebugValue:X1,useDeferredValue:function(e){var t=kn();return s2(t,Wt.memoizedState,e)},useTransition:function(){var e=Ly(Sd)[0],t=kn().memoizedState;return[e,t]},useMutableSource:KT,useSyncExternalStore:GT,useId:l2,unstable_isNewReconciler:!1},dU={readContext:En,useCallback:a2,useContext:En,useEffect:Y1,useImperativeHandle:i2,useInsertionEffect:t2,useLayoutEffect:r2,useMemo:o2,useReducer:Fy,useRef:e2,useState:function(){return Fy(Sd)},useDebugValue:X1,useDeferredValue:function(e){var t=kn();return Wt===null?t.memoizedState=e:s2(t,Wt.memoizedState,e)},useTransition:function(){var e=Fy(Sd)[0],t=kn().memoizedState;return[e,t]},useMutableSource:KT,useSyncExternalStore:GT,useId:l2,unstable_isNewReconciler:!1};function Ln(e,t){if(e&&e.defaultProps){t=St({},t),e=e.defaultProps;for(var r in e)t[r]===void 0&&(t[r]=e[r]);return t}return t}function wb(e,t,r,n){t=e.memoizedState,r=r(n,t),r=r==null?t:St({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var Lg={isMounted:function(e){return(e=e._reactInternals)?Ts(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var n=kr(),i=oo(e),a=ta(n,i);a.payload=t,r!=null&&(a.callback=r),t=io(e,a,i),t!==null&&(Qn(t,e,i,n),np(t,e,i))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var n=kr(),i=oo(e),a=ta(n,i);a.tag=1,a.payload=t,r!=null&&(a.callback=r),t=io(e,a,i),t!==null&&(Qn(t,e,i,n),np(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=kr(),n=oo(e),i=ta(r,n);i.tag=2,t!=null&&(i.callback=t),t=io(e,i,n),t!==null&&(Qn(t,e,n,r),np(t,e,n))}};function bN(e,t,r,n,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,a,o):t.prototype&&t.prototype.isPureReactComponent?!md(r,n)||!md(i,a):!0}function f2(e,t,r){var n=!1,i=mo,a=t.contextType;return typeof a=="object"&&a!==null?a=En(a):(i=Vr(t)?ms:xr.current,n=t.contextTypes,a=(n=n!=null)?Vl(e,i):mo),t=new t(r,a),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Lg,e.stateNode=t,t._reactInternals=e,n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=a),t}function wN(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&&Lg.enqueueReplaceState(t,t.state,null)}function Sb(e,t,r,n){var i=e.stateNode;i.props=r,i.state=e.memoizedState,i.refs={},z1(e);var a=t.contextType;typeof a=="object"&&a!==null?i.context=En(a):(a=Vr(t)?ms:xr.current,i.context=Vl(e,a)),i.state=e.memoizedState,a=t.getDerivedStateFromProps,typeof a=="function"&&(wb(e,t,a,r),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&Lg.enqueueReplaceState(i,i.state,null),$p(e,r,i,n),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function Gl(e,t){try{var r="",n=t;do r+=FB(n),n=n.return;while(n);var i=r}catch(a){i=` 39Error generating stack: `+a.message+` 40`+a.stack}return{value:e,source:t,stack:i,digest:null}}function By(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function jb(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var fU=typeof WeakMap=="function"?WeakMap:Map;function h2(e,t,r){r=ta(-1,r),r.tag=3,r.payload={element:null};var n=t.value;return r.callback=function(){Bp||(Bp=!0,Mb=n),jb(e,t)},r}function p2(e,t,r){r=ta(-1,r),r.tag=3;var n=e.type.getDerivedStateFromError;if(typeof n=="function"){var i=t.value;r.payload=function(){return n(i)},r.callback=function(){jb(e,t)}}var a=e.stateNode;return a!==null&&typeof a.componentDidCatch=="function"&&(r.callback=function(){jb(e,t),typeof n!="function"&&(ao===null?ao=new Set([this]):ao.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),r}function SN(e,t,r){var n=e.pingCache;if(n===null){n=e.pingCache=new fU;var i=new Set;n.set(t,i)}else i=n.get(t),i===void 0&&(i=new Set,n.set(t,i));i.has(r)||(i.add(r),e=_U.bind(null,e,t,r),t.then(e,e))}function jN(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 PN(e,t,r,n,i){return e.mode&1?(e.flags|=65536,e.lanes=i,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=ta(-1,1),t.tag=2,io(r,t,1))),r.lanes|=1),e)}var hU=Sa.ReactCurrentOwner,Ur=!1;function Nr(e,t,r,n){t.child=e===null?WT(t,null,r,n):ql(t,e.child,r,n)}function NN(e,t,r,n,i){r=r.render;var a=t.ref;return bl(t,i),n=K1(e,t,r,n,a,i),r=G1(),e!==null&&!Ur?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,fa(e,t,i)):(vt&&r&&$1(t),t.flags|=1,Nr(e,t,n,i),t.child)}function _N(e,t,r,n,i){if(e===null){var a=r.type;return typeof a=="function"&&!iS(a)&&a.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=a,m2(e,t,a,n,i)):(e=cp(r.type,null,n,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!(e.lanes&i)){var o=a.memoizedProps;if(r=r.compare,r=r!==null?r:md,r(o,n)&&e.ref===t.ref)return fa(e,t,i)}return t.flags|=1,e=so(a,n),e.ref=t.ref,e.return=t,t.child=e}function m2(e,t,r,n,i){if(e!==null){var a=e.memoizedProps;if(md(a,n)&&e.ref===t.ref)if(Ur=!1,t.pendingProps=n=a,(e.lanes&i)!==0)e.flags&131072&&(Ur=!0);else return t.lanes=e.lanes,fa(e,t,i)}return Pb(e,t,r,n,i)}function g2(e,t,r){var n=t.pendingProps,i=n.children,a=e!==null?e.memoizedState:null;if(n.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},dt(fl,Qr),Qr|=r;else{if(!(r&1073741824))return e=a!==null?a.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,dt(fl,Qr),Qr|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=a!==null?a.baseLanes:r,dt(fl,Qr),Qr|=n}else a!==null?(n=a.baseLanes|r,t.memoizedState=null):n=r,dt(fl,Qr),Qr|=n;return Nr(e,t,i,r),t.child}function v2(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}
vendor: 4,057 bytes, line 40
40function Pb(e,t,r,n,i){var a=Vr(r)?ms:xr.current;return a=Vl(t,a),bl(t,i),r=K1(e,t,r,n,a,i),n=G1(),e!==null&&!Ur?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,fa(e,t,i)):(vt&&n&&$1(t),t.flags|=1,Nr(e,t,r,i),t.child)}function ON(e,t,r,n,i){if(Vr(r)){var a=!0;Cp(t)}else a=!1;if(bl(t,i),t.stateNode===null)op(e,t),f2(t,r,n),Sb(t,r,n,i),n=!0;else if(e===null){var o=t.stateNode,s=t.memoizedProps;o.props=s;var c=o.context,u=r.contextType;typeof u=="object"&&u!==null?u=En(u):(u=Vr(r)?ms:xr.current,u=Vl(t,u));var f=r.getDerivedStateFromProps,d=typeof f=="function"||typeof o.getSnapshotBeforeUpdate=="function";d||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(s!==n||c!==u)&&wN(t,o,n,u),Ia=!1;var h=t.memoizedState;o.state=h,$p(t,n,o,i),c=t.memoizedState,s!==n||h!==c||Wr.current||Ia?(typeof f=="function"&&(wb(t,r,f,n),c=t.memoizedState),(s=Ia||bN(t,r,s,n,h,c,u))?(d||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=c),o.props=n,o.state=c,o.context=u,n=s):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{o=t.stateNode,HT(e,t),s=t.memoizedProps,u=t.type===t.elementType?s:Ln(t.type,s),o.props=u,d=t.pendingProps,h=o.context,c=r.contextType,typeof c=="object"&&c!==null?c=En(c):(c=Vr(r)?ms:xr.current,c=Vl(t,c));var p=r.getDerivedStateFromProps;(f=typeof p=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(s!==d||h!==c)&&wN(t,o,n,c),Ia=!1,h=t.memoizedState,o.state=h,$p(t,n,o,i);var g=t.memoizedState;s!==d||h!==g||Wr.current||Ia?(typeof p=="function"&&(wb(t,r,p,n),g=t.memoizedState),(u=Ia||bN(t,r,u,n,h,g,c)||!1)?(f||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(n,g,c),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(n,g,c)),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=c,n=u):(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 Nb(e,t,r,n,a,i)}function Nb(e,t,r,n,i,a){v2(e,t);var o=(t.flags&128)!==0;if(!n&&!o)return i&&fN(t,r,!1),fa(e,t,a);n=t.stateNode,hU.current=t;var s=o&&typeof r.getDerivedStateFromError!="function"?null:n.render();return t.flags|=1,e!==null&&o?(t.child=ql(t,e.child,null,a),t.child=ql(t,null,s,a)):Nr(e,t,s,a),t.memoizedState=n.state,i&&fN(t,r,!0),t.child}function y2(e){var t=e.stateNode;t.pendingContext?dN(e,t.pendingContext,t.pendingContext!==t.context):t.context&&dN(e,t.context,!1),W1(e,t.containerInfo)}function EN(e,t,r,n,i){return Hl(),D1(i),t.flags|=256,Nr(e,t,r,n),t.child}var _b={dehydrated:null,treeContext:null,retryLane:0};function Ob(e){return{baseLanes:e,cachePool:null,transitions:null}}function x2(e,t,r){var n=t.pendingProps,i=bt.current,a=!1,o=(t.flags&128)!==0,s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:(i&2)!==0),s?(a=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),dt(bt,i&1),e===null)return xb(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,a?(n=t.mode,a=t.child,o={mode:"hidden",children:o}
vendor: 5,458 bytes, line 40
40,!(n&1)&&a!==null?(a.childLanes=0,a.pendingProps=o):a=Ug(o,n,0,null),e=ds(e,n,r,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=Ob(r),t.memoizedState=_b,e):Q1(t,o));if(i=e.memoizedState,i!==null&&(s=i.dehydrated,s!==null))return pU(e,t,o,n,s,i,r);if(a){a=n.fallback,o=t.mode,i=e.child,s=i.sibling;var c={mode:"hidden",children:n.children};return!(o&1)&&t.child!==i?(n=t.child,n.childLanes=0,n.pendingProps=c,t.deletions=null):(n=so(i,c),n.subtreeFlags=i.subtreeFlags&14680064),s!==null?a=so(s,a):(a=ds(a,o,r,null),a.flags|=2),a.return=t,n.return=t,n.sibling=a,t.child=n,n=a,a=t.child,o=e.child.memoizedState,o=o===null?Ob(r):{baseLanes:o.baseLanes|r,cachePool:null,transitions:o.transitions},a.memoizedState=o,a.childLanes=e.childLanes&~r,t.memoizedState=_b,n}return a=e.child,e=a.sibling,n=so(a,{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 Q1(e,t){return t=Ug({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Sh(e,t,r,n){return n!==null&&D1(n),ql(t,e.child,null,r),e=Q1(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function pU(e,t,r,n,i,a,o){if(r)return t.flags&256?(t.flags&=-257,n=By(Error(Q(422))),Sh(e,t,o,n)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(a=n.fallback,i=t.mode,n=Ug({mode:"visible",children:n.children},i,0,null),a=ds(a,i,o,null),a.flags|=2,n.return=t,a.return=t,n.sibling=a,t.child=n,t.mode&1&&ql(t,e.child,null,o),t.child.memoizedState=Ob(o),t.memoizedState=_b,a);if(!(t.mode&1))return Sh(e,t,o,null);if(i.data==="$!"){if(n=i.nextSibling&&i.nextSibling.dataset,n)var s=n.dgst;return n=s,a=Error(Q(419)),n=By(a,n,void 0),Sh(e,t,o,n)}if(s=(o&e.childLanes)!==0,Ur||s){if(n=rr,n!==null){switch(o&-o){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(n.suspendedLanes|o)?0:i,i!==0&&i!==a.retryLane&&(a.retryLane=i,da(e,i),Qn(n,e,i,-1))}return nS(),n=By(Error(Q(421))),Sh(e,t,o,n)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=OU.bind(null,e),i._reactRetry=t,null):(e=a.treeContext,tn=no(i.nextSibling),rn=t,vt=!0,Vn=null,e!==null&&(yn[xn++]=Gi,yn[xn++]=Yi,yn[xn++]=gs,Gi=e.id,Yi=e.overflow,gs=t),t=Q1(t,n.children),t.flags|=4096,t)}function kN(e,t,r){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),bb(e.return,t,r)}function Uy(e,t,r,n,i){var a=e.memoizedState;a===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:i}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=n,a.tail=r,a.tailMode=i)}function b2(e,t,r){var n=t.pendingProps,i=n.revealOrder,a=n.tail;if(Nr(e,t,n.children,r),n=bt.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&&kN(e,r,t);else if(e.tag===19)kN(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(dt(bt,n),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(r=t.child,i=null;r!==null;)e=r.alternate,e!==null&&Rp(e)===null&&(i=r),r=r.sibling;r=i,r===null?(i=t.child,t.child=null):(i=r.sibling,r.sibling=null),Uy(t,!1,i,r,a);break;case"backwards":for(r=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Rp(e)===null){t.child=i;break}e=i.sibling,i.sibling=r,r=i,i=e}Uy(t,!0,r,null,a);break;case"together":Uy(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function op(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function fa(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),ys|=t.lanes,!(r&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(Q(153));if(t.child!==null){for(e=t.child,r=so(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=so(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function mU(e,t,r){switch(t.tag){case 3:y2(t),Hl();break;case 5:qT(t);break;case 1:Vr(t.type)&&Cp(t);break;case 4:W1(t,t.stateNode.containerInfo);break;case 10:var n=t.type._context,i=t.memoizedProps.value;dt(Mp,n._currentValue),n._currentValue=i;break;case 13:if(n=t.memoizedState,n!==null)return n.dehydrated!==null?(dt(bt,bt.current&1),t.flags|=128,null):r&t.child.childLanes?x2(e,t,r):(dt(bt,bt.current&1),e=fa(e,t,r),e!==null?e.sibling:null);dt(bt,bt.current&1);break;case 19:if(n=(r&t.childLanes)!==0,e.flags&128){if(n)return b2(e,t,r);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),dt(bt,bt.current),n)break;return null;case 22:case 23:return t.lanes=0,g2(e,t,r)}return fa(e,t,r)}var w2,Eb,S2,j2;w2=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}};Eb=function(){};S2=function(e,t,r,n){var i=e.memoizedProps;if(i!==n){e=t.stateNode,Qo(xi.current);var a=null;
vendor: 4,114 bytes, line 40
40switch(r){case"input":i=Xx(e,i),n=Xx(e,n),a=[];break;case"select":i=St({},i,{value:void 0}),n=St({},n,{value:void 0}),a=[];break;case"textarea":i=Jx(e,i),n=Jx(e,n),a=[];break;default:typeof i.onClick!="function"&&typeof n.onClick=="function"&&(e.onclick=Ep)}tb(r,n);var o;r=null;for(u in i)if(!n.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u==="style"){var s=i[u];for(o in s)s.hasOwnProperty(o)&&(r||(r={}),r[o]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(ld.hasOwnProperty(u)?a||(a=[]):(a=a||[]).push(u,null));for(u in n){var c=n[u];if(s=i!=null?i[u]:void 0,n.hasOwnProperty(u)&&c!==s&&(c!=null||s!=null))if(u==="style")if(s){for(o in s)!s.hasOwnProperty(o)||c&&c.hasOwnProperty(o)||(r||(r={}),r[o]="");for(o in c)c.hasOwnProperty(o)&&s[o]!==c[o]&&(r||(r={}),r[o]=c[o])}else r||(a||(a=[]),a.push(u,r)),r=c;else u==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,s=s?s.__html:void 0,c!=null&&s!==c&&(a=a||[]).push(u,c)):u==="children"?typeof c!="string"&&typeof c!="number"||(a=a||[]).push(u,""+c):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(ld.hasOwnProperty(u)?(c!=null&&u==="onScroll"&&ht("scroll",e),a||s===c||(a=[])):(a=a||[]).push(u,c))}r&&(a=a||[]).push("style",r);var u=a;(t.updateQueue=u)&&(t.flags|=4)}};j2=function(e,t,r,n){r!==n&&(t.flags|=4)};function cu(e,t){if(!vt)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 fr(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,n=0;if(t)for(var i=e.child;i!==null;)r|=i.lanes|i.childLanes,n|=i.subtreeFlags&14680064,n|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)r|=i.lanes|i.childLanes,n|=i.subtreeFlags,n|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=n,e.childLanes=r,t}function gU(e,t,r){var n=t.pendingProps;switch(R1(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return fr(t),null;case 1:return Vr(t.type)&&kp(),fr(t),null;case 3:return n=t.stateNode,Kl(),gt(Wr),gt(xr),H1(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(bh(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Vn!==null&&(Rb(Vn),Vn=null))),Eb(e,t),fr(t),null;case 5:V1(t);var i=Qo(bd.current);if(r=t.type,e!==null&&t.stateNode!=null)S2(e,t,r,n,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!n){if(t.stateNode===null)throw Error(Q(166));return fr(t),null}if(e=Qo(xi.current),bh(t)){n=t.stateNode,r=t.type;var a=t.memoizedProps;switch(n[pi]=t,n[yd]=a,e=(t.mode&1)!==0,r){case"dialog":ht("cancel",n),ht("close",n);break;case"iframe":case"object":case"embed":ht("load",n);break;case"video":case"audio":for(i=0;i<Au.length;i++)ht(Au[i],n);break;case"source":ht("error",n);break;case"img":case"image":case"link":ht("error",n),ht("load",n);break;case"details":ht("toggle",n);break;case"input":LP(n,a),ht("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!a.multiple},ht("invalid",n);break;case"textarea":BP(n,a),ht("invalid",n)}tb(r,a),i=null;for(var o in a)if(a.hasOwnProperty(o)){var s=a[o];o==="children"?typeof s=="string"?n.textContent!==s&&(a.suppressHydrationWarning!==!0&&xh(n.textContent,s,e),i=["children",s]):typeof s=="number"&&n.textContent!==""+s&&(a.suppressHydrationWarning!==!0&&xh(n.textContent,s,e),i=["children",""+s]):ld.hasOwnProperty(o)&&s!=null&&o==="onScroll"&&ht("scroll",n)}switch(r){case"input":dh(n),FP(n,a,!0);break;case"textarea":dh(n),UP(n);break;case"select":case"option":break;default:typeof a.onClick=="function"&&(n.onclick=Ep)}n=i,t.updateQueue=n,n!==null&&(t.flags|=4)}else{o=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=QA(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[pi]=t,e[yd]=n,w2(e,t,!1,!1),t.stateNode=e;e:{switch(o=rb(r,n),r){case"dialog":ht("cancel",e),ht("close",e),i=n;break;case"iframe":case"object":case"embed":ht("load",e),i=n;break;case"video":case"audio":for(i=0;i<Au.length;i++)ht(Au[i],e);i=n;break;case"source":ht("error",e),i=n;break;case"img":case"image":case"link":ht("error",e),ht("load",e),i=n;break;case"details":ht("toggle",e),i=n;break;case"input":LP(e,n),i=Xx(e,n),ht("invalid",e);break;case"option":i=n;break;case"select":e._wrapperState={wasMultiple:!!n.multiple},i=St({},n,{value:void 0}),ht("invalid",e);break;case"textarea":BP(e,n),i=Jx(e,n),ht("invalid",e);break;default:i=n}tb(r,i),s=i;for(a in s)if(s.hasOwnProperty(a)){var c=s[a];a==="style"?eT(e,c):a==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,c!=null&&ZA(e,c)):a==="children"?typeof c=="string"?(r!=="textarea"||c!=="")&&cd(e,c):typeof c=="number"&&cd(e,""+c):a!=="suppressContentEditableWarning"&&a!=="suppressHydrationWarning"&&a!=="autoFocus"&&(ld.hasOwnProperty(a)?c!=null&&a==="onScroll"&&ht("scroll",e):c!=null&&w1(e,a,c,o))}switch(r){case"input":dh(e),FP(e,n,!1);break;case"textarea":dh(e),UP(e);break;case"option":n.value!=null&&e.setAttribute("value",""+po(n.value));break;case"select":e.multiple=!!n.multiple,a=n.value,a!=null?gl(e,!!n.multiple,a,!1):n.defaultValue!=null&&gl(e,!!n.multiple,n.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=Ep)}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 fr(t),null;case 6:if(e&&t.stateNode!=null)j2(e,t,e.memoizedProps,n);else{if(typeof n!="string"&&t.stateNode===null)throw Error(Q(166));if(r=Qo(bd.current),Qo(xi.current),bh(t)){if(n=t.stateNode,r=t.memoizedProps,n[pi]=t,(a=n.nodeValue!==r)&&(e=rn,e!==null))switch(e.tag){case 3:xh(n.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&xh(n.nodeValue,r,(e.mode&1)!==0)}a&&(t.flags|=4)}else n=(r.nodeType===9?r:r.ownerDocument).createTextNode(n),n[pi]=t,t.stateNode=n}return fr(t),null;case 13:if(gt(bt),n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(vt&&tn!==null&&t.mode&1&&!(t.flags&128))UT(),Hl(),t.flags|=98560,a=!1;else if(a=bh(t),n!==null&&n.dehydrated!==null){if(e===null){if(!a)throw Error(Q(318));if(a=t.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(Q(317));a[pi]=t}else Hl(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;fr(t),a=!1}else Vn!==null&&(Rb(Vn),Vn=null),a=!0;if(!a)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||bt.current&1?Ht===0&&(Ht=3):nS())),t.updateQueue!==null&&(t.flags|=4),fr(t),null);case 4:return Kl(),Eb(e,t),e===null&&gd(t.stateNode.containerInfo),fr(t),null;case 10:return B1(t.type._context),fr(t),null;case 17:return Vr(t.type)&&kp(),fr(t),null;case 19:if(gt(bt),a=t.memoizedState,a===null)return fr(t),null;if(n=(t.flags&128)!==0,o=a.rendering,o===null)if(n)cu(a,!1);else{if(Ht!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Rp(e),o!==null){for(t.flags|=128,cu(a,!1),n=o.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),t.subtreeFlags=0,n=r,r=t.child;r!==null;)a=r,e=n,a.flags&=14680066,o=a.alternate,o===null?(a.childLanes=0,a.lanes=e,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=o.childLanes,a.lanes=o.lanes,a.child=o.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=o.memoizedProps,a.memoizedState=o.memoizedState,a.updateQueue=o.updateQueue,a.type=o.type,e=o.dependencies,a.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return dt(bt,bt.current&1|2),t.child}e=e.sibling}a.tail!==null&&At()>Yl&&(t.flags|=128,n=!0,cu(a,!1),t.lanes=4194304)}else{if(!n)if(e=Rp(o),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),cu(a,!0),a.tail===null&&a.tailMode==="hidden"&&!o.alternate&&!vt)return fr(t),null}else 2*At()-a.renderingStartTime>Yl&&r!==1073741824&&(t.flags|=128,n=!0,cu(a,!1),t.lanes=4194304);a.isBackwards?(o.sibling=t.child,t.child=o):(r=a.last,r!==null?r.sibling=o:t.child=o,a.last=o)}return a.tail!==null?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=At(),t.sibling=null,r=bt.current,dt(bt,n?r&1|2:r&1),t):(fr(t),null);case 22:case 23:return rS(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?Qr&1073741824&&(fr(t),t.subtreeFlags&6&&(t.flags|=8192)):fr(t),null;case 24:return null;case 25:return null}throw Error(Q(156,t.tag))}function vU(e,t){switch(R1(t),t.tag){case 1:return Vr(t.type)&&kp(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;
vendor: 26,010 bytes, line 40
40case 3:return Kl(),gt(Wr),gt(xr),H1(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return V1(t),null;case 13:if(gt(bt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Q(340));Hl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return gt(bt),null;case 4:return Kl(),null;case 10:return B1(t.type._context),null;case 22:case 23:return rS(),null;case 24:return null;default:return null}}var jh=!1,vr=!1,yU=typeof WeakSet=="function"?WeakSet:Set,ge=null;function dl(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){_t(e,t,n)}else r.current=null}function kb(e,t,r){try{r()}catch(n){_t(e,t,n)}}var CN=!1;function xU(e,t){if(fb=Np,e=ET(),I1(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 i=n.anchorOffset,a=n.focusNode;n=n.focusOffset;try{r.nodeType,a.nodeType}catch{r=null;break e}var o=0,s=-1,c=-1,u=0,f=0,d=e,h=null;t:for(;;){for(var p;d!==r||i!==0&&d.nodeType!==3||(s=o+i),d!==a||n!==0&&d.nodeType!==3||(c=o+n),d.nodeType===3&&(o+=d.nodeValue.length),(p=d.firstChild)!==null;)h=d,d=p;for(;;){if(d===e)break t;if(h===r&&++u===i&&(s=o),h===a&&++f===n&&(c=o),(p=d.nextSibling)!==null)break;d=h,h=d.parentNode}d=p}r=s===-1||c===-1?null:{start:s,end:c}}else r=null}r=r||{start:0,end:0}}else r=null;for(hb={focusedElem:e,selectionRange:r},Np=!1,ge=t;ge!==null;)if(t=ge,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ge=e;else for(;ge!==null;){t=ge;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,y=g.memoizedState,x=t.stateNode,b=x.getSnapshotBeforeUpdate(t.elementType===t.type?m:Ln(t.type,m),y);x.__reactInternalSnapshotBeforeUpdate=b}break;case 3:var w=t.stateNode.containerInfo;w.nodeType===1?w.textContent="":w.nodeType===9&&w.documentElement&&w.removeChild(w.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Q(163))}}catch(S){_t(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,ge=e;break}ge=t.return}return g=CN,CN=!1,g}function Ku(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var i=n=n.next;do{if((i.tag&e)===e){var a=i.destroy;i.destroy=void 0,a!==void 0&&kb(t,r,a)}i=i.next}while(i!==n)}}function Fg(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 Cb(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 P2(e){var t=e.alternate;t!==null&&(e.alternate=null,P2(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[pi],delete t[yd],delete t[gb],delete t[tU],delete t[rU])),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 N2(e){return e.tag===5||e.tag===3||e.tag===4}function AN(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||N2(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 Ab(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=Ep));else if(n!==4&&(e=e.child,e!==null))for(Ab(e,t,r),e=e.sibling;e!==null;)Ab(e,t,r),e=e.sibling}function Tb(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(Tb(e,t,r),e=e.sibling;e!==null;)Tb(e,t,r),e=e.sibling}var or=null,Bn=!1;function _a(e,t,r){for(r=r.child;r!==null;)_2(e,t,r),r=r.sibling}function _2(e,t,r){if(yi&&typeof yi.onCommitFiberUnmount=="function")try{yi.onCommitFiberUnmount(Ag,r)}catch{}switch(r.tag){case 5:vr||dl(r,t);case 6:var n=or,i=Bn;or=null,_a(e,t,r),or=n,Bn=i,or!==null&&(Bn?(e=or,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):or.removeChild(r.stateNode));break;case 18:or!==null&&(Bn?(e=or,r=r.stateNode,e.nodeType===8?Iy(e.parentNode,r):e.nodeType===1&&Iy(e,r),hd(e)):Iy(or,r.stateNode));break;case 4:n=or,i=Bn,or=r.stateNode.containerInfo,Bn=!0,_a(e,t,r),or=n,Bn=i;break;case 0:case 11:case 14:case 15:if(!vr&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){i=n=n.next;do{var a=i,o=a.destroy;a=a.tag,o!==void 0&&(a&2||a&4)&&kb(r,t,o),i=i.next}while(i!==n)}_a(e,t,r);break;case 1:if(!vr&&(dl(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(s){_t(r,t,s)}_a(e,t,r);break;case 21:_a(e,t,r);break;case 22:r.mode&1?(vr=(n=vr)||r.memoizedState!==null,_a(e,t,r),vr=n):_a(e,t,r);break;default:_a(e,t,r)}}function TN(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new yU),t.forEach(function(n){var i=EU.bind(null,e,n);r.has(n)||(r.add(n),n.then(i,i))})}}function $n(e,t){var r=t.deletions;if(r!==null)for(var n=0;n<r.length;n++){var i=r[n];try{var a=e,o=t,s=o;e:for(;s!==null;){switch(s.tag){case 5:or=s.stateNode,Bn=!1;break e;case 3:or=s.stateNode.containerInfo,Bn=!0;break e;case 4:or=s.stateNode.containerInfo,Bn=!0;break e}s=s.return}if(or===null)throw Error(Q(160));_2(a,o,i),or=null,Bn=!1;var c=i.alternate;c!==null&&(c.return=null),i.return=null}catch(u){_t(i,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)O2(t,e),t=t.sibling}function O2(e,t){var r=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if($n(t,e),si(e),n&4){try{Ku(3,e,e.return),Fg(3,e)}catch(m){_t(e,e.return,m)}try{Ku(5,e,e.return)}catch(m){_t(e,e.return,m)}}break;case 1:$n(t,e),si(e),n&512&&r!==null&&dl(r,r.return);break;case 5:if($n(t,e),si(e),n&512&&r!==null&&dl(r,r.return),e.flags&32){var i=e.stateNode;try{cd(i,"")}catch(m){_t(e,e.return,m)}}if(n&4&&(i=e.stateNode,i!=null)){var a=e.memoizedProps,o=r!==null?r.memoizedProps:a,s=e.type,c=e.updateQueue;if(e.updateQueue=null,c!==null)try{s==="input"&&a.type==="radio"&&a.name!=null&&YA(i,a),rb(s,o);var u=rb(s,a);for(o=0;o<c.length;o+=2){var f=c[o],d=c[o+1];f==="style"?eT(i,d):f==="dangerouslySetInnerHTML"?ZA(i,d):f==="children"?cd(i,d):w1(i,f,d,u)}switch(s){case"input":Qx(i,a);break;case"textarea":XA(i,a);break;case"select":var h=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!a.multiple;var p=a.value;p!=null?gl(i,!!a.multiple,p,!1):h!==!!a.multiple&&(a.defaultValue!=null?gl(i,!!a.multiple,a.defaultValue,!0):gl(i,!!a.multiple,a.multiple?[]:"",!1))}i[yd]=a}catch(m){_t(e,e.return,m)}}break;case 6:if($n(t,e),si(e),n&4){if(e.stateNode===null)throw Error(Q(162));i=e.stateNode,a=e.memoizedProps;try{i.nodeValue=a}catch(m){_t(e,e.return,m)}}break;case 3:if($n(t,e),si(e),n&4&&r!==null&&r.memoizedState.isDehydrated)try{hd(t.containerInfo)}catch(m){_t(e,e.return,m)}break;case 4:$n(t,e),si(e);break;case 13:$n(t,e),si(e),i=e.child,i.flags&8192&&(a=i.memoizedState!==null,i.stateNode.isHidden=a,!a||i.alternate!==null&&i.alternate.memoizedState!==null||(eS=At())),n&4&&TN(e);break;case 22:if(f=r!==null&&r.memoizedState!==null,e.mode&1?(vr=(u=vr)||f,$n(t,e),vr=u):$n(t,e),si(e),n&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!f&&e.mode&1)for(ge=e,f=e.child;f!==null;){for(d=ge=f;ge!==null;){switch(h=ge,p=h.child,h.tag){case 0:case 11:case 14:case 15:Ku(4,h,h.return);break;case 1:dl(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){_t(n,r,m)}}break;case 5:dl(h,h.return);break;case 22:if(h.memoizedState!==null){IN(d);continue}}p!==null?(p.return=h,ge=p):IN(d)}f=f.sibling}e:for(f=null,d=e;;){if(d.tag===5){if(f===null){f=d;try{i=d.stateNode,u?(a=i.style,typeof a.setProperty=="function"?a.setProperty("display","none","important"):a.display="none"):(s=d.stateNode,c=d.memoizedProps.style,o=c!=null&&c.hasOwnProperty("display")?c.display:null,s.style.display=JA("display",o))}catch(m){_t(e,e.return,m)}}}else if(d.tag===6){if(f===null)try{d.stateNode.nodeValue=u?"":d.memoizedProps}catch(m){_t(e,e.return,m)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===e)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;d.sibling===null;){if(d.return===null||d.return===e)break e;f===d&&(f=null),d=d.return}f===d&&(f=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:$n(t,e),si(e),n&4&&TN(e);break;case 21:break;default:$n(t,e),si(e)}}function si(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if(N2(r)){var n=r;break e}r=r.return}throw Error(Q(160))}switch(n.tag){case 5:var i=n.stateNode;n.flags&32&&(cd(i,""),n.flags&=-33);var a=AN(e);Tb(e,a,i);break;case 3:case 4:var o=n.stateNode.containerInfo,s=AN(e);Ab(e,s,o);break;default:throw Error(Q(161))}}catch(c){_t(e,e.return,c)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function bU(e,t,r){ge=e,E2(e)}function E2(e,t,r){for(var n=(e.mode&1)!==0;ge!==null;){var i=ge,a=i.child;if(i.tag===22&&n){var o=i.memoizedState!==null||jh;if(!o){var s=i.alternate,c=s!==null&&s.memoizedState!==null||vr;s=jh;var u=vr;if(jh=o,(vr=c)&&!u)for(ge=i;ge!==null;)o=ge,c=o.child,o.tag===22&&o.memoizedState!==null?$N(i):c!==null?(c.return=o,ge=c):$N(i);for(;a!==null;)ge=a,E2(a),a=a.sibling;ge=i,jh=s,vr=u}MN(e)}else i.subtreeFlags&8772&&a!==null?(a.return=i,ge=a):MN(e)}}function MN(e){for(;ge!==null;){var t=ge;if(t.flags&8772){var r=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:vr||Fg(5,t);break;case 1:var n=t.stateNode;if(t.flags&4&&!vr)if(r===null)n.componentDidMount();else{var i=t.elementType===t.type?r.memoizedProps:Ln(t.type,r.memoizedProps);n.componentDidUpdate(i,r.memoizedState,n.__reactInternalSnapshotBeforeUpdate)}var a=t.updateQueue;a!==null&&vN(t,a,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}vN(t,o,r)}break;case 5:var s=t.stateNode;if(r===null&&t.flags&4){r=s;var c=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&r.focus();break;case"img":c.src&&(r.src=c.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var f=u.memoizedState;if(f!==null){var d=f.dehydrated;d!==null&&hd(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(Q(163))}vr||t.flags&512&&Cb(t)}catch(h){_t(t,t.return,h)}}if(t===e){ge=null;break}if(r=t.sibling,r!==null){r.return=t.return,ge=r;break}ge=t.return}}function IN(e){for(;ge!==null;){var t=ge;if(t===e){ge=null;break}var r=t.sibling;if(r!==null){r.return=t.return,ge=r;break}ge=t.return}}function $N(e){for(;ge!==null;){var t=ge;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{Fg(4,t)}catch(c){_t(t,r,c)}break;case 1:var n=t.stateNode;if(typeof n.componentDidMount=="function"){var i=t.return;try{n.componentDidMount()}catch(c){_t(t,i,c)}}var a=t.return;try{Cb(t)}catch(c){_t(t,a,c)}break;case 5:var o=t.return;try{Cb(t)}catch(c){_t(t,o,c)}}}catch(c){_t(t,t.return,c)}if(t===e){ge=null;break}var s=t.sibling;if(s!==null){s.return=t.return,ge=s;break}ge=t.return}}var wU=Math.ceil,Fp=Sa.ReactCurrentDispatcher,Z1=Sa.ReactCurrentOwner,Sn=Sa.ReactCurrentBatchConfig,Ke=0,rr=null,Lt=null,cr=0,Qr=0,fl=jo(0),Ht=0,Pd=null,ys=0,Bg=0,J1=0,Gu=null,Br=null,eS=0,Yl=1/0,Ui=null,Bp=!1,Mb=null,ao=null,Ph=!1,Xa=null,Up=0,Yu=0,Ib=null,sp=-1,lp=0;function kr(){return Ke&6?At():sp!==-1?sp:sp=At()}function oo(e){return e.mode&1?Ke&2&&cr!==0?cr&-cr:iU.transition!==null?(lp===0&&(lp=fT()),lp):(e=et,e!==0||(e=window.event,e=e===void 0?16:xT(e.type)),e):1}function Qn(e,t,r,n){if(50<Yu)throw Yu=0,Ib=null,Error(Q(185));kf(e,r,n),(!(Ke&2)||e!==rr)&&(e===rr&&(!(Ke&2)&&(Bg|=r),Ht===4&&Da(e,cr)),Hr(e,n),r===1&&Ke===0&&!(t.mode&1)&&(Yl=At()+500,Rg&&Po()))}function Hr(e,t){var r=e.callbackNode;i6(e,t);var n=Pp(e,e===rr?cr:0);if(n===0)r!==null&&VP(r),e.callbackNode=null,e.callbackPriority=0;else if(t=n&-n,e.callbackPriority!==t){if(r!=null&&VP(r),t===1)e.tag===0?nU(RN.bind(null,e)):LT(RN.bind(null,e)),J6(function(){!(Ke&6)&&Po()}),r=null;else{switch(hT(n)){case 1:r=_1;break;case 4:r=uT;break;case 16:r=jp;break;case 536870912:r=dT;break;default:r=jp}r=R2(r,k2.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function k2(e,t){if(sp=-1,lp=0,Ke&6)throw Error(Q(327));var r=e.callbackNode;if(wl()&&e.callbackNode!==r)return null;var n=Pp(e,e===rr?cr:0);if(n===0)return null;if(n&30||n&e.expiredLanes||t)t=zp(e,n);else{t=n;var i=Ke;Ke|=2;var a=A2();(rr!==e||cr!==t)&&(Ui=null,Yl=At()+500,us(e,t));do try{PU();break}catch(s){C2(e,s)}while(!0);F1(),Fp.current=a,Ke=i,Lt!==null?t=0:(rr=null,cr=0,t=Ht)}if(t!==0){if(t===2&&(i=sb(e),i!==0&&(n=i,t=$b(e,i))),t===1)throw r=Pd,us(e,0),Da(e,n),Hr(e,At()),r;if(t===6)Da(e,n);else{if(i=e.current.alternate,!(n&30)&&!SU(i)&&(t=zp(e,n),t===2&&(a=sb(e),a!==0&&(n=a,t=$b(e,a))),t===1))throw r=Pd,us(e,0),Da(e,n),Hr(e,At()),r;switch(e.finishedWork=i,e.finishedLanes=n,t){case 0:case 1:throw Error(Q(345));case 2:Do(e,Br,Ui);break;case 3:if(Da(e,n),(n&130023424)===n&&(t=eS+500-At(),10<t)){if(Pp(e,0)!==0)break;if(i=e.suspendedLanes,(i&n)!==n){kr(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=mb(Do.bind(null,e,Br,Ui),t);break}Do(e,Br,Ui);break;case 4:if(Da(e,n),(n&4194240)===n)break;for(t=e.eventTimes,i=-1;0<n;){var o=31-Xn(n);a=1<<o,o=t[o],o>i&&(i=o),n&=~a}if(n=i,n=At()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*wU(n/1960))-n,10<n){e.timeoutHandle=mb(Do.bind(null,e,Br,Ui),n);break}Do(e,Br,Ui);break;case 5:Do(e,Br,Ui);break;default:throw Error(Q(329))}}}return Hr(e,At()),e.callbackNode===r?k2.bind(null,e):null}function $b(e,t){var r=Gu;return e.current.memoizedState.isDehydrated&&(us(e,t).flags|=256),e=zp(e,t),e!==2&&(t=Br,Br=r,t!==null&&Rb(t)),e}function Rb(e){Br===null?Br=e:Br.push.apply(Br,e)}function SU(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 i=r[n],a=i.getSnapshot;i=i.value;try{if(!Zn(a(),i))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 Da(e,t){for(t&=~J1,t&=~Bg,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-Xn(t),n=1<<r;e[r]=-1,t&=~n}}function RN(e){if(Ke&6)throw Error(Q(327));wl();var t=Pp(e,0);if(!(t&1))return Hr(e,At()),null;var r=zp(e,t);if(e.tag!==0&&r===2){var n=sb(e);n!==0&&(t=n,r=$b(e,n))}if(r===1)throw r=Pd,us(e,0),Da(e,t),Hr(e,At()),r;if(r===6)throw Error(Q(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Do(e,Br,Ui),Hr(e,At()),null}function tS(e,t){var r=Ke;Ke|=1;try{return e(t)}finally{Ke=r,Ke===0&&(Yl=At()+500,Rg&&Po())}}function xs(e){Xa!==null&&Xa.tag===0&&!(Ke&6)&&wl();var t=Ke;Ke|=1;var r=Sn.transition,n=et;try{if(Sn.transition=null,et=1,e)return e()}finally{et=n,Sn.transition=r,Ke=t,!(Ke&6)&&Po()}}function rS(){Qr=fl.current,gt(fl)}function us(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,Z6(r)),Lt!==null)for(r=Lt.return;r!==null;){var n=r;switch(R1(n),n.tag){case 1:n=n.type.childContextTypes,n!=null&&kp();break;case 3:Kl(),gt(Wr),gt(xr),H1();break;case 5:V1(n);break;case 4:Kl();break;case 13:gt(bt);break;case 19:gt(bt);break;case 10:B1(n.type._context);break;case 22:case 23:rS()}r=r.return}if(rr=e,Lt=e=so(e.current,null),cr=Qr=t,Ht=0,Pd=null,J1=Bg=ys=0,Br=Gu=null,Xo!==null){for(t=0;t<Xo.length;t++)if(r=Xo[t],n=r.interleaved,n!==null){r.interleaved=null;var i=n.next,a=r.pending;if(a!==null){var o=a.next;a.next=i,n.next=o}r.pending=n}Xo=null}return e}function C2(e,t){do{var r=Lt;try{if(F1(),ip.current=Lp,Dp){for(var n=wt.memoizedState;n!==null;){var i=n.queue;i!==null&&(i.pending=null),n=n.next}Dp=!1}if(vs=0,er=Wt=wt=null,qu=!1,wd=0,Z1.current=null,r===null||r.return===null){Ht=1,Pd=t,Lt=null;break}e:{var a=e,o=r.return,s=r,c=t;if(t=cr,s.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){var u=c,f=s,d=f.tag;if(!(f.mode&1)&&(d===0||d===11||d===15)){var h=f.alternate;h?(f.updateQueue=h.updateQueue,f.memoizedState=h.memoizedState,f.lanes=h.lanes):(f.updateQueue=null,f.memoizedState=null)}var p=jN(o);if(p!==null){p.flags&=-257,PN(p,o,s,a,t),p.mode&1&&SN(a,u,t),t=p,c=u;var g=t.updateQueue;if(g===null){var m=new Set;m.add(c),t.updateQueue=m}else g.add(c);break e}else{if(!(t&1)){SN(a,u,t),nS();break e}c=Error(Q(426))}}else if(vt&&s.mode&1){var y=jN(o);if(y!==null){!(y.flags&65536)&&(y.flags|=256),PN(y,o,s,a,t),D1(Gl(c,s));break e}}a=c=Gl(c,s),Ht!==4&&(Ht=2),Gu===null?Gu=[a]:Gu.push(a),a=o;do{switch(a.tag){case 3:a.flags|=65536,t&=-t,a.lanes|=t;var x=h2(a,c,t);gN(a,x);break e;case 1:s=c;var b=a.type,w=a.stateNode;if(!(a.flags&128)&&(typeof b.getDerivedStateFromError=="function"||w!==null&&typeof w.componentDidCatch=="function"&&(ao===null||!ao.has(w)))){a.flags|=65536,t&=-t,a.lanes|=t;var S=p2(a,s,t);gN(a,S);break e}}a=a.return}while(a!==null)}M2(r)}catch(j){t=j,Lt===r&&r!==null&&(Lt=r=r.return);continue}break}while(!0)}function A2(){var e=Fp.current;return Fp.current=Lp,e===null?Lp:e}function nS(){(Ht===0||Ht===3||Ht===2)&&(Ht=4),rr===null||!(ys&268435455)&&!(Bg&268435455)||Da(rr,cr)}function zp(e,t){var r=Ke;Ke|=2;var n=A2();(rr!==e||cr!==t)&&(Ui=null,us(e,t));do try{jU();break}catch(i){C2(e,i)}while(!0);if(F1(),Ke=r,Fp.current=n,Lt!==null)throw Error(Q(261));return rr=null,cr=0,Ht}function jU(){for(;Lt!==null;)T2(Lt)}function PU(){for(;Lt!==null&&!YB();)T2(Lt)}function T2(e){var t=$2(e.alternate,e,Qr);e.memoizedProps=e.pendingProps,t===null?M2(e):Lt=t,Z1.current=null}function M2(e){var t=e;do{var r=t.alternate;if(e=t.return,t.flags&32768){if(r=vU(r,t),r!==null){r.flags&=32767,Lt=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Ht=6,Lt=null;return}}else if(r=gU(r,t,Qr),r!==null){Lt=r;return}if(t=t.sibling,t!==null){Lt=t;return}Lt=t=e}while(t!==null);Ht===0&&(Ht=5)}function Do(e,t,r){var n=et,i=Sn.transition;try{Sn.transition=null,et=1,NU(e,t,r,n)}finally{Sn.transition=i,et=n}return null}function NU(e,t,r,n){do wl();while(Xa!==null);if(Ke&6)throw Error(Q(327));r=e.finishedWork;var i=e.finishedLanes;if(r===null)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(Q(177));e.callbackNode=null,e.callbackPriority=0;var a=r.lanes|r.childLanes;if(a6(e,a),e===rr&&(Lt=rr=null,cr=0),!(r.subtreeFlags&2064)&&!(r.flags&2064)||Ph||(Ph=!0,R2(jp,function(){return wl(),null})),a=(r.flags&15990)!==0,r.subtreeFlags&15990||a){a=Sn.transition,Sn.transition=null;var o=et;et=1;var s=Ke;Ke|=4,Z1.current=null,xU(e,r),O2(r,e),H6(hb),Np=!!fb,hb=fb=null,e.current=r,bU(r),XB(),Ke=s,et=o,Sn.transition=a}else e.current=r;if(Ph&&(Ph=!1,Xa=e,Up=i),a=e.pendingLanes,a===0&&(ao=null),JB(r.stateNode),Hr(e,At()),t!==null)for(n=e.onRecoverableError,r=0;r<t.length;r++)i=t[r],n(i.value,{componentStack:i.stack,digest:i.digest});if(Bp)throw Bp=!1,e=Mb,Mb=null,e;return Up&1&&e.tag!==0&&wl(),a=e.pendingLanes,a&1?e===Ib?Yu++:(Yu=0,Ib=e):Yu=0,Po(),null}function wl(){if(Xa!==null){var e=hT(Up),t=Sn.transition,r=et;try{if(Sn.transition=null,et=16>e?16:e,Xa===null)var n=!1;else{if(e=Xa,Xa=null,Up=0,Ke&6)throw Error(Q(331));var i=Ke;for(Ke|=4,ge=e.current;ge!==null;){var a=ge,o=a.child;if(ge.flags&16){var s=a.deletions;if(s!==null){for(var c=0;c<s.length;c++){var u=s[c];for(ge=u;ge!==null;){var f=ge;switch(f.tag){case 0:case 11:case 15:Ku(8,f,a)}var d=f.child;if(d!==null)d.return=f,ge=d;else for(;ge!==null;){f=ge;var h=f.sibling,p=f.return;if(P2(f),f===u){ge=null;break}if(h!==null){h.return=p,ge=h;break}ge=p}}}var g=a.alternate;if(g!==null){var m=g.child;if(m!==null){g.child=null;do{var y=m.sibling;m.sibling=null,m=y}while(m!==null)}}ge=a}}if(a.subtreeFlags&2064&&o!==null)o.return=a,ge=o;else e:for(;ge!==null;){if(a=ge,a.flags&2048)switch(a.tag){case 0:case 11:case 15:Ku(9,a,a.return)}var x=a.sibling;if(x!==null){x.return=a.return,ge=x;break e}ge=a.return}}var b=e.current;for(ge=b;ge!==null;){o=ge;var w=o.child;if(o.subtreeFlags&2064&&w!==null)w.return=o,ge=w;else e:for(o=b;ge!==null;){if(s=ge,s.flags&2048)try{switch(s.tag){case 0:case 11:case 15:Fg(9,s)}}catch(j){_t(s,s.return,j)}if(s===o){ge=null;break e}var S=s.sibling;if(S!==null){S.return=s.return,ge=S;break e}ge=s.return}}if(Ke=i,Po(),yi&&typeof yi.onPostCommitFiberRoot=="function")try{yi.onPostCommitFiberRoot(Ag,e)}catch{}n=!0}return n}finally{et=r,Sn.transition=t}}return!1}function DN(e,t,r){t=Gl(r,t),t=h2(e,t,1),e=io(e,t,1),t=kr(),e!==null&&(kf(e,1,t),Hr(e,t))}function _t(e,t,r){if(e.tag===3)DN(e,e,r);else for(;t!==null;){if(t.tag===3){DN(t,e,r);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(ao===null||!ao.has(n))){e=Gl(r,e),e=p2(t,e,1),t=io(t,e,1),e=kr(),t!==null&&(kf(t,1,e),Hr(t,e));break}}t=t.return}}function _U(e,t,r){var n=e.pingCache;n!==null&&n.delete(t),t=kr(),e.pingedLanes|=e.suspendedLanes&r,rr===e&&(cr&r)===r&&(Ht===4||Ht===3&&(cr&130023424)===cr&&500>At()-eS?us(e,0):J1|=r),Hr(e,t)}function I2(e,t){t===0&&(e.mode&1?(t=ph,ph<<=1,!(ph&130023424)&&(ph=4194304)):t=1);var r=kr();e=da(e,t),e!==null&&(kf(e,t,r),Hr(e,r))}function OU(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),I2(e,r)}function EU(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,i=e.memoizedState;i!==null&&(r=i.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(Q(314))}n!==null&&n.delete(t),I2(e,r)}var $2;$2=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||Wr.current)Ur=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return Ur=!1,mU(e,t,r);Ur=!!(e.flags&131072)}else Ur=!1,vt&&t.flags&1048576&&FT(t,Tp,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;op(e,t),e=t.pendingProps;var i=Vl(t,xr.current);bl(t,r),i=K1(null,t,n,e,i,r);var a=G1();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Vr(n)?(a=!0,Cp(t)):a=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,z1(t),i.updater=Lg,t.stateNode=i,i._reactInternals=t,Sb(t,n,e,r),t=Nb(null,t,n,!0,a,r)):(t.tag=0,vt&&a&&$1(t),Nr(null,t,i,r),t=t.child),t;case 16:n=t.elementType;e:{switch(op(e,t),e=t.pendingProps,i=n._init,n=i(n._payload),t.type=n,i=t.tag=CU(n),e=Ln(n,e),i){case 0:t=Pb(null,t,n,e,r);break e;case 1:t=ON(null,t,n,e,r);break e;case 11:t=NN(null,t,n,e,r);break e;case 14:t=_N(null,t,n,Ln(n.type,e),r);break e}throw Error(Q(306,n,""))}return t;case 0:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:Ln(n,i),Pb(e,t,n,i,r);case 1:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:Ln(n,i),ON(e,t,n,i,r);case 3:e:{if(y2(t),e===null)throw Error(Q(387));n=t.pendingProps,a=t.memoizedState,i=a.element,HT(e,t),$p(t,n,null,r);var o=t.memoizedState;if(n=o.element,a.isDehydrated)if(a={element:n,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){i=Gl(Error(Q(423)),t),t=EN(e,t,n,r,i);break e}else if(n!==i){i=Gl(Error(Q(424)),t),t=EN(e,t,n,r,i);break e}else for(tn=no(t.stateNode.containerInfo.firstChild),rn=t,vt=!0,Vn=null,r=WT(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Hl(),n===i){t=fa(e,t,r);break e}Nr(e,t,n,r)}t=t.child}return t;case 5:return qT(t),e===null&&xb(t),n=t.type,i=t.pendingProps,a=e!==null?e.memoizedProps:null,o=i.children,pb(n,i)?o=null:a!==null&&pb(n,a)&&(t.flags|=32),v2(e,t),Nr(e,t,o,r),t.child;case 6:return e===null&&xb(t),null;case 13:return x2(e,t,r);case 4:return W1(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=ql(t,null,n,r):Nr(e,t,n,r),t.child;case 11:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:Ln(n,i),NN(e,t,n,i,r);case 7:return Nr(e,t,t.pendingProps,r),t.child;case 8:return Nr(e,t,t.pendingProps.children,r),t.child;case 12:return Nr(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,i=t.pendingProps,a=t.memoizedProps,o=i.value,dt(Mp,n._currentValue),n._currentValue=o,a!==null)if(Zn(a.value,o)){if(a.children===i.children&&!Wr.current){t=fa(e,t,r);break e}}else for(a=t.child,a!==null&&(a.return=t);a!==null;){var s=a.dependencies;if(s!==null){o=a.child;for(var c=s.firstContext;c!==null;){if(c.context===n){if(a.tag===1){c=ta(-1,r&-r),c.tag=2;var u=a.updateQueue;if(u!==null){u=u.shared;var f=u.pending;f===null?c.next=c:(c.next=f.next,f.next=c),u.pending=c}}a.lanes|=r,c=a.alternate,c!==null&&(c.lanes|=r),bb(a.return,r,t),s.lanes|=r;break}c=c.next}}else if(a.tag===10)o=a.type===t.type?null:a.child;else if(a.tag===18){if(o=a.return,o===null)throw Error(Q(341));o.lanes|=r,s=o.alternate,s!==null&&(s.lanes|=r),bb(o,r,t),o=a.sibling}else o=a.child;if(o!==null)o.return=a;else for(o=a;o!==null;){if(o===t){o=null;break}if(a=o.sibling,a!==null){a.return=o.return,o=a;break}o=o.return}a=o}Nr(e,t,i.children,r),t=t.child}return t;case 9:return i=t.type,n=t.pendingProps.children,bl(t,r),i=En(i),n=n(i),t.flags|=1,Nr(e,t,n,r),t.child;case 14:return n=t.type,i=Ln(n,t.pendingProps),i=Ln(n.type,i),_N(e,t,n,i,r);case 15:return m2(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:Ln(n,i),op(e,t),t.tag=1,Vr(n)?(e=!0,Cp(t)):e=!1,bl(t,r),f2(t,n,i),Sb(t,n,i,r),Nb(null,t,n,!0,e,r);case 19:return b2(e,t,r);case 22:return g2(e,t,r)}throw Error(Q(156,t.tag))};function R2(e,t){return cT(e,t)}function kU(e,t,r,n){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.t
vendor: 7,566 bytes, line 40
40ype=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 bn(e,t,r,n){return new kU(e,t,r,n)}function iS(e){return e=e.prototype,!(!e||!e.isReactComponent)}function CU(e){if(typeof e=="function")return iS(e)?1:0;if(e!=null){if(e=e.$$typeof,e===j1)return 11;if(e===P1)return 14}return 2}function so(e,t){var r=e.alternate;return r===null?(r=bn(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function cp(e,t,r,n,i,a){var o=2;if(n=e,typeof e=="function")iS(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case rl:return ds(r.children,i,a,t);case S1:o=8,i|=8;break;case qx:return e=bn(12,r,t,i|2),e.elementType=qx,e.lanes=a,e;case Kx:return e=bn(13,r,t,i),e.elementType=Kx,e.lanes=a,e;case Gx:return e=bn(19,r,t,i),e.elementType=Gx,e.lanes=a,e;case qA:return Ug(r,i,a,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case VA:o=10;break e;case HA:o=9;break e;case j1:o=11;break e;case P1:o=14;break e;case Ma:o=16,n=null;break e}throw Error(Q(130,e==null?e:typeof e,""))}return t=bn(o,r,t,i),t.elementType=e,t.type=n,t.lanes=a,t}function ds(e,t,r,n){return e=bn(7,e,n,t),e.lanes=r,e}function Ug(e,t,r,n){return e=bn(22,e,n,t),e.elementType=qA,e.lanes=r,e.stateNode={isHidden:!1},e}function zy(e,t,r){return e=bn(6,e,null,t),e.lanes=r,e}function Wy(e,t,r){return t=bn(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function AU(e,t,r,n,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=jy(0),this.expirationTimes=jy(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=jy(0),this.identifierPrefix=n,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function aS(e,t,r,n,i,a,o,s,c){return e=new AU(e,t,r,s,c),t===1?(t=1,a===!0&&(t|=8)):t=0,a=bn(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},z1(a),e}function TU(e,t,r){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:tl,key:n==null?null:""+n,children:e,containerInfo:t,implementation:r}}function D2(e){if(!e)return mo;e=e._reactInternals;e:{if(Ts(e)!==e||e.tag!==1)throw Error(Q(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Vr(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(Q(171))}if(e.tag===1){var r=e.type;if(Vr(r))return DT(e,r,t)}return t}function L2(e,t,r,n,i,a,o,s,c){return e=aS(r,n,!0,e,i,a,o,s,c),e.context=D2(null),r=e.current,n=kr(),i=oo(r),a=ta(n,i),a.callback=t??null,io(r,a,i),e.current.lanes=i,kf(e,i,n),Hr(e,n),e}function zg(e,t,r,n){var i=t.current,a=kr(),o=oo(i);return r=D2(r),t.context===null?t.context=r:t.pendingContext=r,t=ta(a,o),t.payload={element:e},n=n===void 0?null:n,n!==null&&(t.callback=n),e=io(i,t,o),e!==null&&(Qn(e,i,o,a),np(e,i,o)),o}function Wp(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 LN(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function oS(e,t){LN(e,t),(e=e.alternate)&&LN(e,t)}function MU(){return null}var F2=typeof reportError=="function"?reportError:function(e){console.error(e)};function sS(e){this._internalRoot=e}Wg.prototype.render=sS.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(Q(409));zg(e,t,null,null)};Wg.prototype.unmount=sS.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;xs(function(){zg(null,e,null,null)}),t[ua]=null}};function Wg(e){this._internalRoot=e}Wg.prototype.unstable_scheduleHydration=function(e){if(e){var t=gT();e={blockedOn:null,target:e,priority:t};for(var r=0;r<Ra.length&&t!==0&&t<Ra[r].priority;r++);Ra.splice(r,0,e),r===0&&yT(e)}};function lS(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Vg(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function FN(){}function IU(e,t,r,n,i){if(i){if(typeof n=="function"){var a=n;n=function(){var u=Wp(o);a.call(u)}}var o=L2(t,n,e,0,null,!1,!1,"",FN);return e._reactRootContainer=o,e[ua]=o.current,gd(e.nodeType===8?e.parentNode:e),xs(),o}for(;i=e.lastChild;)e.removeChild(i);if(typeof n=="function"){var s=n;n=function(){var u=Wp(c);s.call(u)}}var c=aS(e,0,!1,null,null,!1,!1,"",FN);return e._reactRootContainer=c,e[ua]=c.current,gd(e.nodeType===8?e.parentNode:e),xs(function(){zg(t,c,r,n)}),c}function Hg(e,t,r,n,i){var a=r._reactRootContainer;if(a){var o=a;if(typeof i=="function"){var s=i;i=function(){var c=Wp(o);s.call(c)}}zg(t,o,e,i)}else o=IU(r,t,e,i,n);return Wp(o)}pT=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=Cu(t.pendingLanes);r!==0&&(O1(t,r|1),Hr(t,At()),!(Ke&6)&&(Yl=At()+500,Po()))}break;case 13:xs(function(){var n=da(e,1);if(n!==null){var i=kr();Qn(n,e,1,i)}}),oS(e,1)}};E1=function(e){if(e.tag===13){var t=da(e,134217728);if(t!==null){var r=kr();Qn(t,e,134217728,r)}oS(e,134217728)}};mT=function(e){if(e.tag===13){var t=oo(e),r=da(e,t);if(r!==null){var n=kr();Qn(r,e,t,n)}oS(e,t)}};gT=function(){return et};vT=function(e,t){var r=et;try{return et=e,t()}finally{et=r}};ib=function(e,t,r){switch(t){case"input":if(Qx(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 i=$g(n);if(!i)throw Error(Q(90));GA(n),Qx(n,i)}}}break;case"textarea":XA(e,r);break;case"select":t=r.value,t!=null&&gl(e,!!r.multiple,t,!1)}};nT=tS;iT=xs;var $U={usingClientEntryPoint:!1,Events:[Af,ol,$g,tT,rT,tS]},uu={findFiberByHostInstance:Yo,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},RU={bundleType:uu.bundleType,version:uu.version,rendererPackageName:uu.rendererPackageName,rendererConfig:uu.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Sa.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=sT(e),e===null?null:e.stateNode},findFiberByHostInstance:uu.findFiberByHostInstance||MU,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};
40if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Nh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Nh.isDisabled&&Nh.supportsFiber)try{Ag=Nh.inject(RU),yi=Nh}catch{}}sn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=$U;sn.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!lS(t))throw Error(Q(200));return TU(e,t,null,r)};sn.createRoot=function(e,t){if(!lS(e))throw Error(Q(299));var r=!1,n="",i=F2;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=aS(e,1,!1,null,null,r,!1,n,i),e[ua]=t.current,gd(e.nodeType===8?e.parentNode:e),new sS(t)};sn.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(Q(188)):(e=Object.keys(e).join(","),Error(Q(268,e)));return e=sT(t),e=e===null?null:e.stateNode,e};sn.flushSync=function(e){return xs(e)};sn.hydrate=function(e,t,r){if(!Vg(t))throw Error(Q(200));return Hg(null,e,t,!0,r)};sn.hydrateRoot=function(e,t,r){if(!lS(e))throw Error(Q(405));var n=r!=null&&r.hydratedSources||null,i=!1,a="",o=F2;if(r!=null&&(r.unstable_strictMode===!0&&(i=!0),r.identifierPrefix!==void 0&&(a=r.identifierPrefix),r.onRecoverableError!==void 0&&(o=r.onRecoverableError)),t=L2(t,null,e,1,r??null,i,!1,a,o),e[ua]=t.current,gd(e),n)for(e=0;e<n.length;e++)r=n[e],i=r._getVersion,i=i(r._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[r,i]:t.mutableSourceEagerHydrationData.push(r,i);return new Wg(t)};sn.render=function(e,t,r){if(!Vg(t))throw Error(Q(200));return Hg(null,e,t,!1,r)};sn.unmountComponentAtNode=function(e){if(!Vg(e))throw Error(Q(40));return e._reactRootContainer?(xs(function(){Hg(null,null,e,!1,function(){e._reactRootContainer=null,e[ua]=null})}),!0):!1};sn.unstable_batchedUpdates=tS;sn.unstable_renderSubtreeIntoContainer=function(e,t,r,n){if(!Vg(r))throw Error(Q(200));if(e==null||e._reactInternals===void 0)throw Error(Q(38));return Hg(e,t,r,!1,n)};sn.version="18.3.1-next-f1338f8080-20240426";function B2(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(B2)}catch(e){console.error(e)}}B2(),BA.exports=sn;var Ms=BA.exports;const DU=Ye(Ms);var U2,BN=Ms;U2=BN.createRoot,BN.hydrateRoot;/** 41 * @remix-run/router v1.20.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 Nd(){return Nd=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},Nd.apply(this,arguments)}var Qa;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(Qa||(Qa={}));const UN="popstate";function LU(e){e===void 0&&(e={});function t(n,i){let{pathname:a,search:o,hash:s}=n.location;return Db("",{pathname:a,search:o,hash:s},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function r(n,i){return typeof i=="string"?i:Vp(i)}return BU(t,r,null,e)}function Ft(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function z2(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function FU(){return Math.random().toString(36).substr(2,8)}function zN(e,t){return{usr:e.state,key:e.key,idx:t}}function Db(e,t,r,n){return r===void 0&&(r=null),Nd({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Tc(t):t,{state:r,key:t&&t.key||n||FU()})}function Vp(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 Tc(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 BU(e,t,r,n){n===void 0&&(n={});let{window:i=document.defaultView,v5Compat:a=!1}=n,o=i.history,s=Qa.Pop,c=null,u=f();u==null&&(u=0,o.replaceState(Nd({},o.state,{idx:u}),""));function f(){return(o.state||{idx:null}).idx}function d(){s=Qa.Pop;let y=f(),x=y==null?null:y-u;u=y,c&&c({action:s,location:m.location,delta:x})}function h(y,x){s=Qa.Push;let b=Db(m.location,y,x);u=f()+1;let w=zN(b,u),S=m.createHref(b);try{o.pushState(w,"",S)}catch(j){if(j instanceof DOMException&&j.name==="DataCloneError")throw j;i.location.assign(S)}a&&c&&c({action:s,location:m.location,delta:1})}function p(y,x){s=Qa.Replace;let b=Db(m.location,y,x);u=f();let w=zN(b,u),S=m.createHref(b);o.replaceState(w,"",S),a&&c&&c({action:s,location:m.location,delta:0})}function g(y){let x=i.location.origin!=="null"?i.location.origin:i.location.href,b=typeof y=="string"?y:Vp(y);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(i,o)},listen(y){if(c)throw new Error("A history only accepts one active listener");return i.addEventListener(UN,d),c=y,()=>{i.removeEventListener(UN,d),c=null}},createHref(y){return t(i,y)},createURL:g,encodeLocation(y){let x=g(y);return{pathname:x.pathname,search:x.search,hash:x.hash}},push:h,replace:p,go(y){return o.go(y)}};return m}var WN;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(WN||(WN={}));function UU(e,t,r){return r===void 0&&(r="/"),zU(e,t,r,!1)}function zU(e,t,r,n){let i=typeof t=="string"?Tc(t):t,a=cS(i.pathname||"/",r);if(a==null)return null;let o=W2(e);WU(o);let s=null;for(let c=0;s==null&&c<o.length;++c){let u=ez(a);s=ZU(o[c],u,n)}return s}function W2(e,t,r,n){t===void 0&&(t=[]),r===void 0&&(r=[]),n===void 0&&(n="");let i=(a,o,s)=>{let c={relativePath:s===void 0?a.path||"":s,caseSensitive:a.caseSensitive===!0,childrenIndex:o,route:a};c.relativePath.startsWith("/")&&(Ft(c.relativePath.startsWith(n),'Absolute route path "'+c.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."),c.relativePath=c.relativePath.slice(n.length));let u=lo([n,c.relativePath]),f=r.concat(c);a.children&&a.children.length>0&&(Ft(a.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),W2(a.children,t,f,u)),!(a.path==null&&!a.index)&&t.push({path:u,score:XU(u,a.index),routesMeta:f})};return e.forEach((a,o)=>{var s;if(a.path===""||!((s=a.path)!=null&&s.includes("?")))i(a,o);else for(let c of V2(a.path))i(a,o,c)}),t}function V2(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,i=r.endsWith("?"),a=r.replace(/\?$/,"");if(n.length===0)return i?[a,""]:[a];let o=V2(n.join("/")),s=[];return s.push(...o.map(c=>c===""?a:[a,c].join("/"))),i&&s.push(...o),s.map(c=>e.startsWith("/")&&c===""?"/":c)}function WU(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:QU(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const VU=/^:[\w-]+$/,HU=3,qU=2,KU=1,GU=10,YU=-2,VN=e=>e==="*";function XU(e,t){let r=e.split("/"),n=r.length;return r.some(VN)&&(n+=YU),t&&(n+=qU),r.filter(i=>!VN(i)).reduce((i,a)=>i+(VU.test(a)?HU:a===""?KU:GU),n)}function QU(e,t){return e.length===t.length&&e.slice(0,-1).every((n,i)=>n===t[i])?e[e.length-1]-t[t.length-1]:0}function ZU(e,t,r){let{routesMeta:n}=e,i={},a="/",o=[];for(let s=0;s<n.length;++s){let c=n[s],u=s===n.length-1,f=a==="/"?t:t.slice(a.length)||"/",d=HN({path:c.relativePath,caseSensitive:c.caseSensitive,end:u},f),h=c.route;if(!d&&u&&r&&!n[n.length-1].route.index&&(d=HN({path:c.relativePath,caseSensitive:c.caseSensitive,end:!1},f)),!d)return null;
vendor: 11,340 bytes, lines 49-58
49Object.assign(i,d.params),o.push({params:i,pathname:lo([a,d.pathname]),pathnameBase:iz(lo([a,d.pathnameBase])),route:h}),d.pathnameBase!=="/"&&(a=lo([a,d.pathnameBase]))}return o}function HN(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=JU(e.path,e.caseSensitive,e.end),i=t.match(r);if(!i)return null;let a=i[0],o=a.replace(/(.)\/+$/,"$1"),s=i.slice(1);return{params:n.reduce((u,f,d)=>{let{paramName:h,isOptional:p}=f;if(h==="*"){let m=s[d]||"";o=a.slice(0,a.length-m.length).replace(/(.)\/+$/,"$1")}const g=s[d];return p&&!g?u[h]=void 0:u[h]=(g||"").replace(/%2F/g,"/"),u},{}),pathname:a,pathnameBase:o,pattern:e}}function JU(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),z2(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=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,s,c)=>(n.push({paramName:s,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(n.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),n]}function ez(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return z2(!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 cS(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 tz(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:i=""}=typeof e=="string"?Tc(e):e;return{pathname:r?r.startsWith("/")?r:rz(r,t):t,search:az(n),hash:oz(i)}}function rz(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?r.length>1&&r.pop():i!=="."&&r.push(i)}),r.length>1?r.join("/"):"/"}function Vy(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 nz(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function H2(e,t){let r=nz(e);return t?r.map((n,i)=>i===r.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function q2(e,t,r,n){n===void 0&&(n=!1);let i;typeof e=="string"?i=Tc(e):(i=Nd({},e),Ft(!i.pathname||!i.pathname.includes("?"),Vy("?","pathname","search",i)),Ft(!i.pathname||!i.pathname.includes("#"),Vy("#","pathname","hash",i)),Ft(!i.search||!i.search.includes("#"),Vy("#","search","hash",i)));let a=e===""||i.pathname==="",o=a?"/":i.pathname,s;if(o==null)s=r;else{let d=t.length-1;if(!n&&o.startsWith("..")){let h=o.split("/");for(;h[0]==="..";)h.shift(),d-=1;i.pathname=h.join("/")}s=d>=0?t[d]:"/"}let c=tz(i,s),u=o&&o!=="/"&&o.endsWith("/"),f=(a||o===".")&&r.endsWith("/");return!c.pathname.endsWith("/")&&(u||f)&&(c.pathname+="/"),c}const lo=e=>e.join("/").replace(/\/\/+/g,"/"),iz=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),az=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,oz=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function sz(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const K2=["post","put","patch","delete"];new Set(K2);const lz=["get",...K2];new Set(lz);/** 50 * React Router v6.27.0 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 _d(){return _d=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},_d.apply(this,arguments)}const uS=v.createContext(null),cz=v.createContext(null),Is=v.createContext(null),qg=v.createContext(null),$s=v.createContext({outlet:null,matches:[],isDataRoute:!1}),G2=v.createContext(null);function uz(e,t){let{relative:r}=t===void 0?{}:t;Mf()||Ft(!1);let{basename:n,navigator:i}=v.useContext(Is),{hash:a,pathname:o,search:s}=X2(e,{relative:r}),c=o;return n!=="/"&&(c=o==="/"?n:lo([n,o])),i.createHref({pathname:c,search:s,hash:a})}function Mf(){return v.useContext(qg)!=null}function Mc(){return Mf()||Ft(!1),v.useContext(qg).location}function Y2(e){v.useContext(Is).static||v.useLayoutEffect(e)}function Ic(){let{isDataRoute:e}=v.useContext($s);return e?jz():dz()}function dz(){Mf()||Ft(!1);let e=v.useContext(uS),{basename:t,future:r,navigator:n}=v.useContext(Is),{matches:i}=v.useContext($s),{pathname:a}=Mc(),o=JSON.stringify(H2(i,r.v7_relativeSplatPath)),s=v.useRef(!1);return Y2(()=>{s.current=!0}),v.useCallback(function(u,f){if(f===void 0&&(f={}),!s.current)return;if(typeof u=="number"){n.go(u);return}let d=q2(u,JSON.parse(o),a,f.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:lo([t,d.pathname])),(f.replace?n.replace:n.push)(d,f.state,f)},[t,n,o,a,e])}function X2(e,t){let{relative:r}=t===void 0?{}:t,{future:n}=v.useContext(Is),{matches:i}=v.useContext($s),{pathname:a}=Mc(),o=JSON.stringify(H2(i,n.v7_relativeSplatPath));return v.useMemo(()=>q2(e,JSON.parse(o),a,r==="path"),[e,o,a,r])}function fz(e,t){return hz(e,t)}function hz(e,t,r,n){Mf()||Ft(!1);let{navigator:i}=v.useContext(Is),{matches:a}=v.useContext($s),o=a[a.length-1],s=o?o.params:{};o&&o.pathname;let c=o?o.pathnameBase:"/";o&&o.route;let u=Mc(),f;if(t){var d;let y=typeof t=="string"?Tc(t):t;c==="/"||(d=y.pathname)!=null&&d.startsWith(c)||Ft(!1),f=y}else f=u;let h=f.pathname||"/",p=h;if(c!=="/"){let y=c.replace(/^\//,"").split("/");p="/"+h.replace(/^\//,"").split("/").slice(y.length).join("/")}let g=UU(e,{pathname:p}),m=yz(g&&g.map(y=>Object.assign({},y,{params:Object.assign({},s,y.params),pathname:lo([c,i.encodeLocation?i.encodeLocation(y.pathname).pathname:y.pathname]),pathnameBase:y.pathnameBase==="/"?c:lo([c,i.encodeLocation?i.encodeLocation(y.pathnameBase).pathname:y.pathnameBase])})),a,r,n);return t&&m?v.createElement(qg.Provider,{value:{location:_d({pathname:"/",search:"",hash:"",state:null,key:"default"},f),navigationType:Qa.Pop}},m):m}function pz(){let e=Sz(),t=sz(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return v.createElement(v.Fragment,null,v.createElement("h2",null,"Unexpected Application Error!"),v.createElement("h3",{style:{fontStyle:"italic"}},t),r?v.createElement("pre",{style:i},r):null,null)}const mz=v.createElement(pz,null);class gz extends v.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?v.createElement($s.Provider,{value:this.props.routeContext},v.createElement(G2.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function vz(e){let{routeContext:t,match:r,children:n}=e,i=v.useContext(uS);return i&&i.static&&i.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=r.route.id),v.createElement($s.Provider,{value:t},n)}function yz(e,t,r,n){var i;if(t===void 0&&(t=[]),r===void 0&&(r=null),n===void 0&&(n=null),e==null){var a;if(!r)return null;if(r.errors)e=r.matches;else if((a=n)!=null&&a.v7_partialHydration&&t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let o=e,s=(i=r)==null?void 0:i.errors;if(s!=null){let f=o.findIndex(d=>d.route.id&&(s==null?void 0:s[d.route.id])!==void 0);f>=0||Ft(!1),o=o.slice(0,Math.min(o.length,f+1))}let c=!1,u=-1;if(r&&n&&n.v7_partialHydration)for(let f=0;f<o.length;f++){let d=o[f];if((d.route.HydrateFallback||d.route.hydrateFallbackElement)&&(u=f),d.route.id){let{loaderData:h,errors:p}=r,g=d.route.loader&&h[d.route.id]===void 0&&(!p||p[d.route.id]===void 0);if(d.route.lazy||g){c=!0,u>=0?o=o.slice(0,u+1):o=[o[0]];break}}}return o.reduceRight((f,d,h)=>{let p,g=!1,m=null,y=null;r&&(p=s&&d.route.id?s[d.route.id]:void 0,m=d.route.errorElement||mz,c&&(u<0&&h===0?(g=!0,y=null):u===h&&(g=!0,y=d.route.hydrateFallbackElement||null)));let x=t.concat(o.slice(0,h+1)),b=()=>{let w;return p?w=m:g?w=y:d.route.Component?w=v.createElement(d.route.Component,null):d.route.element?w=d.route.element:w=f,v.createElement(vz,{match:d,routeContext:{outlet:f,matches:x,isDataRoute:r!=null},children:w})};return r&&(d.route.ErrorBoundary||d.route.errorElement||h===0)?v.createElement(gz,{location:r.location,revalidation:r.revalidation,component:m,error:p,children:b(),routeContext:{outlet:null,matches:x,isDataRoute:!0}}):b()},null)}var Q2=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Q2||{}),Hp=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}(Hp||{});function xz(e){let t=v.useContext(uS);return t||Ft(!1),t}function bz(e){let t=v.useContext(cz);return t||Ft(!1),t}function wz(e){let t=v.useContext($s);return t||Ft(!1),t}function Z2(e){let t=wz(),r=t.matches[t.matches.length-1];return r.route.id||Ft(!1),r.route.id}function Sz(){var e;let t=v.useContext(G2),r=bz(Hp.UseRouteError),n=Z2(Hp.UseRouteError);return t!==void 0?t:(e=r.errors)==null?void 0:e[n]}function jz(){let{router:e}=xz(Q2.UseNavigateStable),t=Z2(Hp.UseNavigateStable),r=v.useRef(!1);return Y2(()=>{r.current=!0}),v.useCallback(function(i,a){a===void 0&&(a={}),r.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,_d({fromRouteId:t},a)))},[e,t])}function Zt(e){Ft(!1)}function Pz(e){let{basename:t="/",children:r=null,location:n,navigationType:i=Qa.Pop,navigator:a,static:o=!1,future:s}=e;Mf()&&Ft(!1);let c=t.replace(/^\/*/,"/"),u=v.useMemo(()=>({basename:c,navigator:a,static:o,future:_d({v7_relativeSplatPath:!1},s)}),[c,s,a,o]);typeof n=="string"&&(n=Tc(n));let{pathname:f="/",search:d="",hash:h="",state:p=null,key:g="default"}=n,m=v.useMemo(()=>{let y=cS(f,c);return y==null?null:{location:{pathname:y,search:d,hash:h,state:p,key:g},navigationType:i}},[c,f,d,h,p,g,i]);return m==null?null:v.createElement(Is.Provider,{value:u},v.createElement(qg.Provider,{children:r,value:m}))}function Nz(e){let{children:t,location:r}=e;return fz(Lb(t),r)}new Promise(()=>{});
58function Lb(e,t){t===void 0&&(t=[]);let r=[];return v.Children.forEach(e,(n,i)=>{if(!v.isValidElement(n))return;let a=[...t,i];if(n.type===v.Fragment){r.push.apply(r,Lb(n.props.children,a));return}n.type!==Zt&&Ft(!1),!n.props.index||!n.props.children||Ft(!1);let o={id:n.props.id||a.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=Lb(n.props.children,a)),r.push(o)}),r}/** 59 * React Router DOM v6.27.0 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 Fb(){return Fb=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},Fb.apply(this,arguments)}function _z(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,a;for(a=0;a<n.length;a++)i=n[a],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}function Oz(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Ez(e,t){return e.button===0&&(!t||t==="_self")&&!Oz(e)}const kz=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],Cz="6";try{window.__reactRouterVersion=Cz}catch{}const Az="startTransition",qN=LA[Az];function Tz(e){let{basename:t,children:r,future:n,window:i}=e,a=v.useRef();a.current==null&&(a.current=LU({window:i,v5Compat:!0}));let o=a.current,[s,c]=v.useState({action:o.action,location:o.location}),{v7_startTransition:u}=n||{},f=v.useCallback(d=>{u&&qN?qN(()=>c(d)):c(d)},[c,u]);return v.useLayoutEffect(()=>o.listen(f),[o,f]),v.createElement(Pz,{basename:t,children:r,location:s.location,navigationType:s.action,navigator:o,future:n})}const Mz=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Iz=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,$t=v.forwardRef(function(t,r){let{onClick:n,relative:i,reloadDocument:a,replace:o,state:s,target:c,to:u,preventScrollReset:f,viewTransition:d}=t,h=_z(t,kz),{basename:p}=v.useContext(Is),g,m=!1;if(typeof u=="string"&&Iz.test(u)&&(g=u,Mz))try{let w=new URL(window.location.href),S=u.startsWith("//")?new URL(w.protocol+u):new URL(u),j=cS(S.pathname,p);S.origin===w.origin&&j!=null?u=j+S.search+S.hash:m=!0}catch{}let y=uz(u,{relative:i}),x=$z(u,{replace:o,state:s,target:c,preventScrollReset:f,relative:i,viewTransition:d});function b(w){n&&n(w),w.defaultPrevented||x(w)}return v.createElement("a",Fb({},h,{href:g||y,onClick:m||a?n:b,ref:r,target:c}))});var KN;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(KN||(KN={}));var GN;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(GN||(GN={}));function $z(e,t){let{target:r,replace:n,state:i,preventScrollReset:a,relative:o,viewTransition:s}=t===void 0?{}:t,c=Ic(),u=Mc(),f=X2(e,{relative:o});return v.useCallback(d=>{if(Ez(d,r)){d.preventDefault();let h=n!==void 0?n:Vp(u)===Vp(f);c(e,{replace:h,state:i,preventScrollReset:a,relative:o,viewTransition:s})}},[u,c,f,n,i,r,e,a,o,s])}var qp=["light","dark"],dS="(prefers-color-scheme: dark)",Rz=typeof window>"u",J2=v.createContext(void 0),Dz=e=>v.useContext(J2)?e.children:v.createElement(Fz,{...e}),Lz=["light","dark"],Fz=({forcedTheme:e,disableTransitionOnChange:t=!1,enableSystem:r=!0,enableColorScheme:n=!0,storageKey:i="theme",themes:a=Lz,defaultTheme:o=r?"system":"light",attribute:s="data-theme",value:c,children:u,nonce:f})=>{let[d,h]=v.useState(()=>YN(i,o)),[p,g]=v.useState(()=>YN(i)),m=c?Object.values(c):a,y=v.useCallback(S=>{let j=S;if(!j)return;S==="system"&&r&&(j=XN());let P=c?c[j]:j,N=t?Uz():null,_=document.documentElement;if(s==="class"?(_.classList.remove(...m),P&&_.classList.add(P)):P?_.setAttribute(s,P):_.removeAttribute(s),n){let O=qp.includes(o)?o:null,k=qp.includes(j)?j:O;_.style.colorScheme=k}N==null||N()},[]),x=v.useCallback(S=>{let j=typeof S=="function"?S(S):S;h(j);try{localStorage.setItem(i,j)}catch{}},[e]),b=v.useCallback(S=>{let j=XN(S);g(j),d==="system"&&r&&!e&&y("system")},[d,e]);v.useEffect(()=>{let S=window.matchMedia(dS);return S.addListener(b),b(S),()=>S.removeListener(b)},[b]),v.useEffect(()=>{let S=j=>{if(j.key!==i)return;let P=j.newValue||o;x(P)};return window.addEventListener("storage",S),()=>window.removeEventListener("storage",S)},[x]),v.useEffect(()=>{y(e??d)},[e,d]);let w=v.useMemo(()=>({theme:d,setTheme:x,forcedTheme:e,resolvedTheme:d==="system"?p:d,themes:r?[...a,"system"]:a,systemTheme:r?p:void 0}),[d,x,e,p,r,a]);return v.createElement(J2.Provider,{value:w},v.createElement(Bz,{forcedTheme:e,disableTransitionOnChange:t,enableSystem:r,enableColorScheme:n,storageKey:i,themes:a,defaultTheme:o,attribute:s,value:c,children:u,attrs:m,nonce:f}),u)},Bz=v.memo(({forcedTheme:e,storageKey:t,attribute:r,enableSystem:n,enableColorScheme:i,defaultTheme:a,value:o,attrs:s,nonce:c})=>{let u=a==="system",f=r==="class"?`var d=document.documentElement,c=d.classList;${`c.remove(${s.map(g=>`'${g}'`).join(",")})`};`:`var d=document.documentElement,n='${r}',s='setAttribute';`,d=i?qp.includes(a)&&a?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${a}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",h=(g,m=!1,y=!0)=>{let x=o?o[g]:g,b=m?g+"|| ''":`'${x}'`,w="";return i&&y&&!m&&qp.includes(g)&&(w+=`d.style.colorScheme = '${g}';`),r==="class"?m||x?w+=`c.add(${b})`:w+="null":x&&(w+=`d[s](n,${b})`),w},p=e?`!function(){${f}${h(e)}}()`:n?`!function(){try{${f}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${u})){var t='${dS}',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)}}${u?"":"else{"+h(a,!1,!1)+"}"}${d}}catch(e){}}()`:`!function(){try{${f}var e=localStorage.getItem('${t}');if(e){${o?`var x=${JSON.stringify(o)};`:""}${h(o?"x[e]":"e",!0)}}else{${h(a,!1,!1)};}${d}}catch(t){}}();`;return v.createElement("script",{nonce:c,dangerouslySetInnerHTML:{__html:p}})}),YN=(e,t)=>{if(Rz)return;let r;try{r=localStorage.getItem(e)||void 0}catch{}return r||t},Uz=()=>{let e=document.createElement("style");return e.appendChild(document.createTextNode("*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(e),()=>{window.getComputedStyle(document.body),setTimeout(()=>{document.head.removeChild(e)},1)}},XN=e=>
vendor: 36,466 bytes, line 67
67(e||(e=window.matchMedia(dS)),e.matches?"dark":"light");function zz({children:e,...t}){return l.jsx(Dz,{...t,children:e})}var $c=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(){}},bs=typeof window>"u"||"Deno"in globalThis;function gn(){}function Wz(e,t){return typeof e=="function"?e(t):e}function Bb(e){return typeof e=="number"&&e>=0&&e!==1/0}function eM(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Sl(e,t){return typeof e=="function"?e(t):e}function Hn(e,t){return typeof e=="function"?e(t):e}function QN(e,t){const{type:r="all",exact:n,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(n){if(t.queryHash!==fS(o,t.options))return!1}else if(!Od(t.queryKey,o))return!1}if(r!=="all"){const c=t.isActive();if(r==="active"&&!c||r==="inactive"&&c)return!1}return!(typeof s=="boolean"&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function ZN(e,t){const{exact:r,status:n,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(r){if(ws(t.options.mutationKey)!==ws(a))return!1}else if(!Od(t.options.mutationKey,a))return!1}return!(n&&t.state.status!==n||i&&!i(t))}function fS(e,t){return((t==null?void 0:t.queryKeyHashFn)||ws)(e)}function ws(e){return JSON.stringify(e,(t,r)=>Ub(r)?Object.keys(r).sort().reduce((n,i)=>(n[i]=r[i],n),{}):r)}function Od(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(r=>!Od(e[r],t[r])):!1}function tM(e,t){if(e===t)return e;const r=JN(e)&&JN(t);if(r||Ub(e)&&Ub(t)){const n=r?e:Object.keys(e),i=n.length,a=r?t:Object.keys(t),o=a.length,s=r?[]:{};let c=0;for(let u=0;u<o;u++){const f=r?u:a[u];(!r&&n.includes(f)||r)&&e[f]===void 0&&t[f]===void 0?(s[f]=void 0,c++):(s[f]=tM(e[f],t[f]),s[f]===e[f]&&e[f]!==void 0&&c++)}return i===o&&c===i?e:s}return t}function Kp(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e)if(e[r]!==t[r])return!1;return!0}function JN(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Ub(e){if(!e_(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!e_(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function e_(e){return Object.prototype.toString.call(e)==="[object Object]"}function Vz(e){return new Promise(t=>{setTimeout(t,e)})}function zb(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?tM(e,t):t}function Hz(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function qz(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var hS=Symbol();function rM(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===hS?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var ns,Ba,Cl,yA,Kz=(yA=class extends $c{constructor(){super();Pe(this,ns);Pe(this,Ba);Pe(this,Cl);pe(this,Cl,t=>{if(!bs&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){B(this,Ba)||this.setEventListener(B(this,Cl))}onUnsubscribe(){var t;this.hasListeners()||((t=B(this,Ba))==null||t.call(this),pe(this,Ba,void 0))}setEventListener(t){var r;pe(this,Cl,t),(r=B(this,Ba))==null||r.call(this),pe(this,Ba,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){B(this,ns)!==t&&(pe(this,ns,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof B(this,ns)=="boolean"?B(this,ns):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},ns=new WeakMap,Ba=new WeakMap,Cl=new WeakMap,yA),pS=new Kz,Al,Ua,Tl,xA,Gz=(xA=class extends $c{constructor(){super();Pe(this,Al,!0);Pe(this,Ua);Pe(this,Tl);pe(this,Tl,t=>{if(!bs&&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(){B(this,Ua)||this.setEventListener(B(this,Tl))}onUnsubscribe(){var t;this.hasListeners()||((t=B(this,Ua))==null||t.call(this),pe(this,Ua,void 0))}setEventListener(t){var r;pe(this,Tl,t),(r=B(this,Ua))==null||r.call(this),pe(this,Ua,t(this.setOnline.bind(this)))}setOnline(t){B(this,Al)!==t&&(pe(this,Al,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return B(this,Al)}},Al=new WeakMap,Ua=new WeakMap,Tl=new WeakMap,xA),Gp=new Gz;function Wb(){let e,t;const r=new Promise((i,a)=>{e=i,t=a});r.status="pending",r.catch(()=>{});function n(i){Object.assign(r,i),delete r.resolve,delete r.reject}return r.resolve=i=>{n({status:"fulfilled",value:i}),e(i)},r.reject=i=>{n({status:"rejected",reason:i}),t(i)},r}function Yz(e){return Math.min(1e3*2**e,3e4)}function nM(e){return(e??"online")==="online"?Gp.isOnline():!0}var iM=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Hy(e){return e instanceof iM}function aM(e){let t=!1,r=0,n=!1,i;const a=Wb(),o=m=>{var y;n||(h(new iM(m)),(y=e.abort)==null||y.call(e))},s=()=>{t=!0},c=()=>{t=!1},u=()=>pS.isFocused()&&(e.networkMode==="always"||Gp.isOnline())&&e.canRun(),f=()=>nM(e.networkMode)&&e.canRun(),d=m=>{var y;n||(n=!0,(y=e.onSuccess)==null||y.call(e,m),i==null||i(),a.resolve(m))},h=m=>{var y;n||(n=!0,(y=e.onError)==null||y.call(e,m),i==null||i(),a.reject(m))},p=()=>new Promise(m=>{var y;i=x=>{(n||u())&&m(x)},(y=e.onPause)==null||y.call(e)}).then(()=>{var m;i=void 0,n||(m=e.onContinue)==null||m.call(e)}),g=()=>{if(n)return;let m;const y=r===0?e.initialPromise:void 0;try{m=y??e.fn()}catch(x){m=Promise.reject(x)}Promise.resolve(m).then(d).catch(x=>{var P;if(n)return;const b=e.retry??(bs?0:3),w=e.retryDelay??Yz,S=typeof w=="function"?w(r,x):w,j=b===!0||typeof b=="number"&&r<b||typeof b=="function"&&b(r,x);if(t||!j){h(x);return}r++,(P=e.onFail)==null||P.call(e,r,x),Vz(S).then(()=>u()?void 0:p()).then(()=>{t?h(x):g()})})};return{promise:a,cancel:o,continue:()=>(i==null||i(),a),cancelRetry:s,continueRetry:c,canStart:f,start:()=>(f()?g():p().then(g),a)}}function Xz(){let e=[],t=0,r=s=>{s()},n=s=>{s()},i=s=>setTimeout(s,0);const a=s=>{t?e.push(s):i(()=>{r(s)})},o=()=>{const s=e;e=[],s.length&&i(()=>{n(()=>{s.forEach(c=>{r(c)})})})};return{batch:s=>{let c;t++;try{c=s()}finally{t--,t||o()}return c},batchCalls:s=>(...c)=>{a(()=>{s(...c)})},schedule:a,setNotifyFunction:s=>{r=s},setBatchNotifyFunction:s=>{n=s},setScheduler:s=>{i=s}}}var Vt=Xz(),is,bA,oM=(bA=class{constructor(){Pe(this,is)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Bb(this.gcTime)&&pe(this,is,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(bs?1/0:5*60*1e3))}clearGcTimeout(){B(this,is)&&(clearTimeout(B(this,is)),pe(this,is,void 0))}},is=new WeakMap,bA),Ml,Il,mn,pr,Pf,as,Fn,Li,wA,Qz=(wA=class extends oM{constructor(t){super();Pe(this,Fn);Pe(this,Ml);Pe(this,Il);Pe(this,mn);Pe(this,pr);Pe(this,Pf);Pe(this,as);pe(this,as,!1),pe(this,Pf,t.defaultOptions),this.setOptions(t.options),this.observers=[],pe(this,mn,t.cache),this.queryKey=t.queryKey,this.queryHash=t.queryHash,pe(this,Ml,Zz(this.options)),this.state=t.state??B(this,Ml),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=B(this,pr))==null?void 0:t.promise}setOptions(t){this.options={...B(this,Pf),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&B(this,mn).remove(this)}setData(t,r){const n=zb(this.state.data,t,this.options);return De(this,Fn,Li).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t,r){De(this,Fn,Li).call(this,{type:"setState",state:t,setStateOptions:r})}cancel(t){var n,i;const r=(n=B(this,pr))==null?void 0:n.promise;return(i=B(this,pr))==null||i.cancel(t),r?r.then(gn).catch(gn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(B(this,Ml))}isActive(){return this.observers.some(t=>Hn(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===hS||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(t=0){return this.state.isInvalidated||this.state.data===void 0||!eM(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=B(this,pr))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=B(this,pr))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),B(this,mn).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(B(this,pr)&&(B(this,as)?B(this,pr).cancel({revert:!0}):B(this,pr).cancelRetry()),this.scheduleGc()),B(this,mn).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||De(this,Fn,Li).call(this,{type:"invalidate"})}fetch(t,r){var c,u,f;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(B(this,pr))return B(this,pr).continueRetry(),B(this,pr).promise}if(t&&this.setOptions(t),!this.options.queryFn){const d=this.observers.find(h=>h.options.queryFn);d&&this.setOptions(d.options)}const n=new AbortController,i=d=>{Object.defineProperty(d,"signal",{enumerable:!0,get:()=>(pe(this,as,!0),n.signal)})},a=()=>{const d=rM(this.options,r),h={queryKey:this.queryKey,meta:this.meta};return i(h),pe(this,as,!1),this.options.persister?this.options.persister(d,h,this):d(h)},o={fetchOptions:r,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:a};i(o),(c=this.options.behavior)==null||c.onFetch(o,this),pe(this,Il,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((u=o.fetchOptions)==null?void 0:u.meta))&&De(this,Fn,Li).call(this,{type:"fetch",meta:(f=o.fetchOptions)==null?void 0:f.meta});const s=d=>{var h,p,g,m;Hy(d)&&d.silent||De(this,Fn,Li).call(this,{type:"error",error:d}),Hy(d)||((p=(h=B(this,mn).config).onError)==null||p.call(h,d,this),(m=(g=B(this,mn).config).onSettled)==null||m.call(g,this.state.data,d,this)),this.scheduleGc()};return pe(this,pr,aM({initialPromise:r==null?void 0:r.initialPromise,fn:o.fetchFn,abort:n.abort.bind(n),onSuccess:d=>{var h,p,g,m;if(d===void 0){s(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(d)}catch(y){s(y);return}(p=(h=B(this,mn).config).onSuccess)==null||p.call(h,d,this),(m=(g=B(this,mn).config).onSettled)==null||m.call(g,d,this.state.error,this),this.scheduleGc()},onError:s,onFail:(d,h)=>{De(this,Fn,Li).call(this,{type:"failed",failureCount:d,error:h})},onPause:()=>{De(this,Fn,Li).call(this,{type:"pause"})},onContinue:()=>{De(this,Fn,Li).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0})),B(this,pr).start()}},Ml=new WeakMap,Il=new WeakMap,mn=new WeakMap,pr=new WeakMap,Pf=new WeakMap,as=new WeakMap,Fn=new WeakSet,Li=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,...sM(n.data,this.options),fetchMeta:t.meta??null};case"success":return{...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 i=t.error;return Hy(i)&&i.revert&&B(this,Il)?{...B(this,Il),fetchStatus:"idle"}:{...n,error:i,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=r(this.state),Vt.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),B(this,mn).notify({query:this,type:"updated",action:t})})},wA);function sM(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:nM(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Zz(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 ui,SA,Jz=(SA=class extends $c{constructor(t={}){super();Pe(this,ui);this.config=t,pe(this,ui,new Map)}build(t,r,n){const i=r.queryKey,a=r.queryHash??fS(i,r);let o=this.get(a);return o||(o=new Qz({cache:this,queryKey:i,queryHash:a,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(i)}),this.add(o)),o}add(t){B(this,ui).has(t.queryHash)||(B(this,ui).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=B(this,ui).get(t.queryHash);r&&(t.destroy(),r===t&&B(this,ui).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Vt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return B(this,ui).get(t)}getAll(){return[...B(this,ui).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>QN(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>QN(t,n)):r}notify(t){Vt.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){Vt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Vt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},ui=new WeakMap,SA),di,Sr,os,fi,Ca,jA,e8=(jA=class extends oM{constructor(t){super();Pe(this,fi);Pe(this,di);Pe(this,Sr);Pe(this,os);this.mutationId=t.mutationId,pe(this,Sr,t.mutationCache),pe(this,di,[]),this.state=t.state||lM(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){B(this,di).includes(t)||(B(this,di).push(t),this.clearGcTimeout(),B(this,Sr).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){pe(this,di,B(this,di).filter(r=>r!==t)),this.scheduleGc(),B(this,Sr).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){B(this,di).length||(this.state.status==="pending"?this.scheduleGc():B(this,Sr).remove(this))}continue(){var t;return((t=B(this,os))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var i,a,o,s,c,u,f,d,h,p,g,m,y,x,b,w,S,j,P,N;pe(this,os,aM({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(_,O)=>{De(this,fi,Ca).call(this,{type:"failed",failureCount:_,error:O})},onPause:()=>{De(this,fi,Ca).call(this,{type:"pause"})},onContinue:()=>{De(this,fi,Ca).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>B(this,Sr).canRun(this)}));const r=this.state.status==="pending",n=!B(this,os).canStart();try{if(!r){De(this,fi,Ca).call(this,{type:"pending",variables:t,isPaused:n}),await((a=(i=B(this,Sr).config).onMutate)==null?void 0:a.call(i,t,this));const O=await((s=(o=this.options).onMutate)==null?void 0:s.call(o,t));O!==this.state.context&&De(this,fi,Ca).call(this,{type:"pending",context:O,variables:t,isPaused:n})}const _=await B(this,os).start();return await((u=(c=B(this,Sr).config).onSuccess)==null?void 0:u.call(c,_,t,this.state.context,this)),await((d=(f=this.options).onSuccess)==null?void 0:d.call(f,_,t,this.state.context)),await((p=(h=B(this,Sr).config).onSettled)==null?void 0:p.call(h,_,null,this.state.variables,this.state.context,this)),await((m=(g=this.options).onSettled)==null?void 0:m.call(g,_,null,t,this.state.context)),De(this,fi,Ca).call(this,{type:"success",data:_}),_}catch(_){try{throw await((x=(y=B(this,Sr).config).onError)==null?void 0:x.call(y,_,t,this.state.context,this)),await((w=(b=this.options).onError)==null?void 0:w.call(b,_,t,this.state.context)),await((j=(S=B(this,Sr).config).onSettled)==null?void 0:j.call(S,void 0,_,this.state.variables,this.state.context,this)),await((N=(P=this.options).onSettled)==null?void 0:N.call(P,void 0,_,t,this.state.context)),_}finally{De(this,fi,Ca).call(this,{type:"error",error:_})}}finally{B(this,Sr).runNext(this)}}},di=new WeakMap,Sr=new WeakMap,os=new WeakMap,fi=new WeakSet,Ca=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),Vt.batch(()=>{B(this,di).forEach(n=>{n.onMutationUpdate(t)}),B(this,Sr).notify({mutation:this,type:"updated",action:t})})},jA);function lM(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Xr,Nf,PA,t8=(PA=class extends $c{constructor(t={}){super();Pe(this,Xr);Pe(this,Nf);this.config=t,pe(this,Xr,new Map),pe(this,Nf,Date.now())}build(t,r,n){const i=new e8({mutationCache:this,mutationId:++sh(this,Nf)._,options:t.defaultMutationOptions(r),state:n});return this.add(i),i}add(t){const r=_h(t),n=B(this,Xr).get(r)??[];n.push(t),B(this,Xr).set(r,n),this.notify({type:"added",mutation:t})}remove(t){var n;const r=_h(t);if(B(this,Xr).has(r)){const i=(n=B(this,Xr).get(r))==null?void 0:n.filter(a=>a!==t);i&&(i.length===0?B(this,Xr).delete(r):B(this,Xr).set(r,i))}this.notify({type:"removed",mutation:t})}canRun(t){var n;const r=(n=B(this,Xr).get(_h(t)))==null?void 0:n.find(i=>i.state.status==="pending");return!r||r===t}runNext(t){var n;const r=(n=B(this,Xr).get(_h(t)))==null?void 0:n.find(i=>i!==t&&i.state.isPaused);return(r==null?void 0:r.continue())??Promise.resolve()}clear(){Vt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}getAll(){return[...B(this,Xr).values()].flat()}find(t){const r={exact:!0,...t};return this.getAll().find(n=>ZN(r,n))}findAll(t={}){return this.getAll().filter(r=>ZN(t,r))}notify(t){Vt.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>r.state.isPaused);return Vt.batch(()=>Promise.all(t.map(r=>r.continue().catch(gn))))}},Xr=new WeakMap,Nf=new WeakMap,PA);function _h(e){var t;return((t=e.options.scope)==null?void 0:t.id)??String(e.mutationId)}function t_(e){return{onFetch:(t,r)=>{var f,d,h,p,g;const n=t.options,i=(h=(d=(f=t.fetchOptions)==null?void 0:f.meta)==null?void 0:d.fetchMore)==null?void 0:h.direction,a=((p=t.state.data)==null?void 0:p.pages)||[],o=((g=t.state.data)==null?void 0:g.pageParams)||[];let s={pages:[],pageParams:[]},c=0;const u=async()=>{let m=!1;const y=w=>{Object.defineProperty(w,"signal",{enumerable:!0,get:()=>(t.signal.aborted?m=!0:t.signal.addEventListener("abort",()=>{m=!0}),t.signal)})},x=rM(t.options,t.fetchOptions),b=async(w,S,j)=>{if(m)return Promise.reject();if(S==null&&w.pages.length)return Promise.resolve(w);const P={queryKey:t.queryKey,pageParam:S,direction:j?"backward":"forward",meta:t.options.meta};y(P);const N=await x(P),{maxPages:_}=t.options,O=j?qz:Hz;return{pages:O(w.pages,N,_),pageParams:O(w.pageParams,S,_)}};if(i&&a.length){const w=i==="backward",S=w?r8:r_,j={pages:a,pageParams:o},P=S(n,j);s=await b(j,P,w)}else{const w=e??a.length;do{const S=c===0?o[0]??n.initialPageParam:r_(n,s);if(c>0&&S==null)break;s=await b(s,S),c++}while(c<w)}return s};t.options.persister?t.fetchFn=()=>{var m,y;return(y=(m=t.options).persister)==null?void 0:y.call(m,u,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=u}}}function r_(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 r8(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 Pt,za,Wa,$l,Rl,Va,Dl,Ll,NA,n8=(NA=class{constructor(e={}){Pe(this,Pt);Pe(this,za);Pe(this,Wa);Pe(this,$l);Pe(this,Rl);Pe(this,Va);Pe(this,Dl);Pe(this,Ll);pe(this,Pt,e.queryCache||new Jz),pe(this,za,e.mutationCache||new t8),pe(this,Wa,e.defaultOptions||{}),pe(this,$l,new Map),pe(this,Rl,new Map),pe(this,Va,0)}mount(){sh(this,Va)._++,B(this,Va)===1&&(pe(this,Dl,pS.subscribe(async e=>{e&&(await this.resumePausedMutations(),B(this,Pt).onFocus())})),pe(this,Ll,Gp.subscribe(async e=>{e&&(await this.resumePausedMutations(),B(this,Pt).onOnline())})))}unmount(){var e,t;sh(this,Va)._--,B(this,Va)===0&&((e=B(this,Dl))==null||e.call(this),pe(this,Dl,void 0),(t=B(this,Ll))==null||t.call(this),pe(this,Ll,void 0))}isFetching(e){return B(this,Pt).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return B(this,za).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=B(this,Pt).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.getQueryData(e.queryKey);if(t===void 0)return this.fetchQuery(e);{const r=this.defaultQueryOptions(e),n=B(this,Pt).build(this,r);return e.revalidateIfStale&&n.isStaleByTime(Sl(r.staleTime,n))&&this.prefetchQuery(r),Promise.resolve(t)}}getQueriesData(e){return B(this,Pt).findAll(e).map(({queryKey:t,state:r})=>{const n=r.data;return[t,n]})}setQueryData(e,t,r){const n=this.defaultQueryOptions({queryKey:e}),i=B(this,Pt).get(n.queryHash),a=i==null?void 0:i.state.data,o=Wz(t,a);if(o!==void 0)return B(this,Pt).build(this,n).setData(o,{...r,manual:!0})}setQueriesData(e,t,r){return Vt.batch(()=>B(this,Pt).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=B(this,Pt).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=B(this,Pt);Vt.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=B(this,Pt),n={type:"active",...e};return Vt.batch(()=>(r.findAll(e).forEach(i=>{i.reset()}),this.refetchQueries(n,t)))}cancelQueries(e={},t={}){const r={revert:!0,...t},n=Vt.batch(()=>B(this,Pt).findAll(e).map(i=>i.cancel(r)));return Promise.all(n).then(gn).catch(gn)}invalidateQueries(e={},t={}){return Vt.batch(()=>{if(B(this,Pt).findAll(e).forEach(n=>{n.invalidate()}),e.refetchType==="none")return Promise.resolve();const r={...e,type:e.refetchType??e.type??"active"};return this.refetchQueries(r,t)})}refetchQueries(e={},t){const r={...t,cancelRefetch:(t==null?void 0:t.cancelRefetch)??!0},n=Vt.batch(()=>B(this,Pt).findAll(e).filter(i=>!i.isDisabled()).map(i=>{let a=i.fetch(void 0,r);return r.throwOnError||(a=a.catch(gn)),i.state.fetchStatus==="paused"?Promise.resolve():a}));return Promise.all(n).then(gn)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=B(this,Pt).build(this,t);return r.isStaleByTime(Sl(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(gn).catch(gn)}fetchInfiniteQuery(e){return e.behavior=t_(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(gn).catch(gn)}ensureInfiniteQueryData(e){return e.behavior=t_(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Gp.isOnline()?B(this,za).resumePausedMutations():Promise.resolve()}getQueryCache(){return B(this,Pt)}getMutationCache(){return B(this,za)}getDefaultOptions(){return B(this,Wa)}setDefaultOptions(e){pe(this,Wa,e)}setQueryDefaults(e,t){B(this,$l).set(ws(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...B(this,$l).values()];let r={};return t.forEach(n=>{Od(e,n.queryKey)&&(r={...r,...n.defaultOptions})}),r}setMutationDefaults(e,t){B(this,Rl).set(ws(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...B(this,Rl).values()];let r={};return t.forEach(n=>{Od(e,n.mutationKey)&&(r={...r,...n.defaultOptions})}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...B(this,Wa).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=fS(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.enabled!==!0&&t.queryFn===hS&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...B(this,Wa).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){B(this,Pt).clear(),B(this,za).clear()}},Pt=new WeakMap,za=new WeakMap,Wa=new WeakMap,$l=new WeakMap,Rl=new WeakMap,Va=new WeakMap,Dl=new WeakMap,Ll=new WeakMap,NA),Rr,He,_f,jr,ss,Fl,Ha,hi,Of,Bl,Ul,ls,cs,qa,zl,Ze,Tu,Vb,Hb,qb,Kb,Gb,Yb,Xb,cM,_A,i8=(_A=class extends $c{constructor(t,r){super();Pe(this,Ze);Pe(this,Rr);Pe(this,He);Pe(this,_f);Pe(this,jr);Pe(this,ss);Pe(this,Fl);Pe(this,Ha);Pe(this,hi);Pe(this,Of);Pe(this,Bl);Pe(this,Ul);Pe(this,ls);Pe(this,cs);Pe(this,qa);Pe(this,zl,new Set);this.options=r,pe(this,Rr,t),pe(this,hi,null),pe(this,Ha,Wb()),this.options.experimental_prefetchInRender||B(this,Ha).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(B(this,He).addObserver(this),n_(B(this,He),this.options)?De(this,Ze,Tu).call(this):this.updateResult(),De(this,Ze,Kb).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Qb(B(this,He),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Qb(B(this,He),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,De(this,Ze,Gb).call(this),De(this,Ze,Yb).call(this),B(this,He).removeObserver(this)}setOptions(t,r){const n=this.options,i=B(this,He);if(this.options=B(this,Rr).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Hn(this.options.enabled,B(this,He))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");De(this,Ze,Xb).call(this),B(this,He).setOptions(this.options),n._defaulted&&!Kp(this.options,n)&&B(this,Rr).getQueryCache().notify({type:"observerOptionsUpdated",query:B(this,He),observer:this});const a=this.hasListeners();a&&i_(B(this,He),i,this.options,n)&&De(this,Ze,Tu).call(this),this.updateResult(r),a&&(B(this,He)!==i||Hn(this.options.enabled,B(this,He))!==Hn(n.enabled,B(this,He))||Sl(this.options.staleTime,B(this,He))!==Sl(n.staleTime,B(this,He)))&&De(this,Ze,Vb).call(this);const o=De(this,Ze,Hb).call(this);a&&(B(this,He)!==i||Hn(this.options.enabled,B(this,He))!==Hn(n.enabled,B(this,He))||o!==B(this,qa))&&De(this,Ze,qb).call(this,o)}getOptimisticResult(t){const r=B(this,Rr).getQueryCache().build(B(this,Rr),t),n=this.createResult(r,t);return o8(this,n)&&(pe(this,jr,n),pe(this,Fl,this.options),pe(this,ss,B(this,He).state)),n}getCurrentResult(){return B(this,jr)}trackResult(t,r){const n={};return Object.keys(t).forEach(i=>{Object.defineProperty(n,i,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(i),r==null||r(i),t[i])})}),n}trackProp(t){B(this,zl).add(t)}getCurrentQuery(){return B(this,He)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=B(this,Rr).defaultQueryOptions(t),n=B(this,Rr).getQueryCache().build(B(this,Rr),r);return n.fetch().then(()=>this.createResult(n,r))}fetch(t){return De(this,Ze,Tu).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),B(this,jr)))}createResult(t,r){var _;const n=B(this,He),i=this.options,a=B(this,jr),o=B(this,ss),s=B(this,Fl),u=t!==n?t.state:B(this,_f),{state:f}=t;let d={...f},h=!1,p;if(r._optimisticResults){const O=this.hasListeners(),k=!O&&n_(t,r),C=O&&i_(t,n,r,i);(k||C)&&(d={...d,...sM(f.data,t.options)}),r._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:g,errorUpdatedAt:m,status:y}=d;if(r.select&&d.data!==void 0)if(a&&d.data===(o==null?void 0:o.data)&&r.select===B(this,Of))p=B(this,Bl);else try{pe(this,Of,r.select),p=r.select(d.data),p=zb(a==null?void 0:a.data,p,r),pe(this,Bl,p),pe(this,hi,null)}catch(O){pe(this,hi,O)}else p=d.data;if(r.placeholderData!==void 0&&p===void 0&&y==="pending"){let O;if(a!=null&&a.isPlaceholderData&&r.placeholderData===(s==null?void 0:s.placeholderData))O=a.data;else if(O=typeof r.placeholderData=="function"?r.placeholderData((_=B(this,Ul))==null?void 0:_.state.data,B(this,Ul)):r.placeholderData,r.select&&O!==void 0)try{O=r.select(O),pe(this,hi,null)}catch(k){pe(this,hi,k)}O!==void 0&&(y="success",p=zb(a==null?void 0:a.data,O,r),h=!0)}B(this,hi)&&(g=B(this,hi),p=B(this,Bl),m=Date.now(),y="error");const x=d.fetchStatus==="fetching",b=y==="pending",w=y==="error",S=b&&x,j=p!==void 0,N={status:y,fetchStatus:d.fetchStatus,isPending:b,isSuccess:y==="success",isError:w,isInitialLoading:S,isLoading:S,data:p,dataUpdatedAt:d.dataUpdatedAt,error:g,errorUpdatedAt:m,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:d.dataUpdateCount>0||d.errorUpdateCount>0,isFetchedAfterMount:d.dataUpdateCount>u.dataUpdateCount||d.errorUpdateCount>u.errorUpdateCount,isFetching:x,isRefetching:x&&!b,isLoadingError:w&&!j,isPaused:d.fetchStatus==="paused",isPlaceholderData:h,isRefetchError:w&&j,isStale:mS(t,r),refetch:this.refetch,promise:B(this,Ha)};if(this.options.experimental_prefetchInRender){const O=E=>{N.status==="error"?E.reject(N.error):N.data!==void 0&&E.resolve(N.data)},k=()=>{const E=pe(this,Ha,N.promise=Wb());O(E)},C=B(this,Ha);switch(C.status){case"pending":t.queryHash===n.queryHash&&O(C);break;case"fulfilled":(N.status==="error"||N.data!==C.value)&&k();break;case"rejected":(N.status!=="error"||N.error!==C.reason)&&k();break}}return N}updateResult(t){const r=B(this,jr),n=this.createResult(B(this,He),this.options);if(pe(this,ss,B(this,He).state),pe(this,Fl,this.options),B(this,ss).data!==void 0&&pe(this,Ul,B(this,He)),Kp(n,r))return;pe(this,jr,n);const i={},a=()=>{if(!r)return!0;const{notifyOnChangeProps:o}=this.options,s=typeof o=="function"?o():o;if(s==="all"||!s&&!B(this,zl).size)return!0;const c=new Set(s??B(this,zl));return this.options.throwOnError&&c.add("error"),Object.keys(B(this,jr)).some(u=>{const f=u;return B(this,jr)[f]!==r[f]&&c.has(f)})};(t==null?void 0:t.listeners)!==!1&&a()&&(i.listeners=!0),De(this,Ze,cM).call(this,{...i,...t})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&De(this,Ze,Kb).call(this)}},Rr=new WeakMap,He=new WeakMap,_f=new WeakMap,jr=new WeakMap,ss=new WeakMap,Fl=new WeakMap,Ha=new WeakMap,hi=new WeakMap,Of=new WeakMap,Bl=new WeakMap,Ul=new WeakMap,ls=new WeakMap,cs=new WeakMap,qa=new WeakMap,zl=new WeakMap,Ze=new WeakSet,Tu=function(t){De(this,Ze,Xb).call(this);let r=B(this,He).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(gn)),r},Vb=function(){De(this,Ze,Gb).call(this);const t=Sl(this.options.staleTime,B(this,He));if(bs||B(this,jr).isStale||!Bb(t))return;const n=eM(B(this,jr).dataUpdatedAt,t)+1;pe(this,ls,setTimeout(()=>{B(this,jr).isStale||this.updateResult()},n))},Hb=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(B(this,He)):this.options.refetchInterval)??!1},qb=function(t){De(this,Ze,Yb).call(this),pe(this,qa,t),!(bs||Hn(this.options.enabled,B(this,He))===!1||!Bb(B(this,qa))||B(this,qa)===0)&&pe(this,cs,setInterval(()=>{(this.options.refetchIntervalInBackground||pS.isFocused())&&De(this,Ze,Tu).call(this)},B(this,qa)))},Kb=function(){De(this,Ze,Vb).call(this),De(this,Ze,qb).call(this,De(this,Ze,Hb).call(this))},Gb=function(){B(this,ls)&&(clearTimeout(B(this,ls)),pe(this,ls,void 0))},Yb=function(){B(this,cs)&&(clearInterval(B(this,cs)),pe(this,cs,void 0))},Xb=function(){const t=B(this,Rr).getQueryCache().build(B(this,Rr),this.options);if(t===B(this,He))return;const r=B(this,He);pe(this,He,t),pe(this,_f,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},cM=function(t){Vt.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r(B(this,jr))}),B(this,Rr).getQueryCache().notify({query:B(this,He),type:"observerResultsUpdated"})})},_A);function a8(e,t){return Hn(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function n_(e,t){return a8(e,t)||e.state.data!==void 0&&Qb(e,t,t.refetchOnMount)}function Qb(e,t,r){if(Hn(t.enabled,e)!==!1){const n=typeof r=="function"?r(e):r;return n==="always"||n!==!1&&mS(e,t)}return!1}function i_(e,t,r,n){return(e!==t||Hn(n.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&mS(e,r)}function mS(e,t){return Hn(t.enabled,e)!==!1&&e.isStaleByTime(Sl(t.staleTime,e))}function o8(e,t){return!Kp(e.getCurrentResult(),t)}var Ka,Ga,Dr,Hi,la,up,Zb,OA,s8=(OA=class extends $c{constructor(r,n){super();Pe(this,la);Pe(this,Ka);Pe(this,Ga);Pe(this,Dr);Pe(this,Hi);pe(this,Ka,r),this.setOptions(n),this.bindMethods(),De(this,la,up).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(r){var i;const n=this.options;this.options=B(this,Ka).defaultMutationOptions(r),Kp(this.options,n)||B(this,Ka).getMutationCache().notify({type:"observerOptionsUpdated",mutation:B(this,Dr),observer:this}),n!=null&&n.mutationKey&&this.options.mutationKey&&ws(n.mutationKey)!==ws(this.options.mutationKey)?this.reset():((i=B(this,Dr))==null?void 0:i.state.status)==="pending"&&B(this,Dr).setOptions(this.options)}onUnsubscribe(){var r;this.hasListeners()||(r=B(this,Dr))==null||r.removeObserver(this)}onMutationUpdate(r){De(this,la,up).call(this),De(this,la,Zb).call(this,r)}getCurrentResult(){return B(this,Ga)}reset(){var r;(r=B(this,Dr))==null||r.removeObserver(this),pe(this,Dr,void 0),De(this,la,up).call(this),De(this,la,Zb).call(this)}mutate(r,n){var i;return pe(this,Hi,n),(i=B(this,Dr))==null||i.removeObserver(this),pe(this,Dr,B(this,Ka).getMutationCache().build(B(this,Ka),this.options)),B(this,Dr).addObserver(this),B(this,Dr).execute(r)}},Ka=new WeakMap,Ga=new WeakMap,Dr=new WeakMap,Hi=new WeakMap,la=new WeakSet,up=function(){var n;const r=((n=B(this,Dr))==null?void 0:n.state)??lM();pe(this,Ga,{...r,isPending:r.status==="pending",isSuccess:r.status==="success",isError:r.status==="error",isIdle:r.status==="idle",mutate:this.mutate,reset:this.reset})},Zb=function(r){Vt.batch(()=>{var n,i,a,o,s,c,u,f;if(B(this,Hi)&&this.hasListeners()){const d=B(this,Ga).variables,h=B(this,Ga).context;(r==null?void 0:r.type)==="success"?((i=(n=B(this,Hi)).onSuccess)==null||i.call(n,r.data,d,h),(o=(a=B(this,Hi)).onSettled)==null||o.call(a,r.data,null,d,h)):(r==null?void 0:r.type)==="error"&&((c=(s=B(this,Hi)).onError)==null||c.call(s,r.error,d,h),(f=(u=B(this,Hi)).onSettled)==null||f.call(u,void 0,r.error,d,h))}this.listeners.forEach(d=>{d(B(this,Ga))})})},OA),uM=v.createContext(void 0),gS=e=>{const t=v.useContext(uM);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},l8=({client:e,children:t})=>(v.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),l.jsx(uM.Provider,{value:e,children:t})),dM=v.createContext(!1),c8=()=>v.useContext(dM);dM.Provider;function u8(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}
67var d8=v.createContext(u8()),f8=()=>v.useContext(d8);function fM(e,t){return typeof e=="function"?e(...t):!!e}function hM(){}var h8=(e,t)=>{(e.suspense||e.throwOnError)&&(t.isReset()||(e.retryOnMount=!1))},p8=e=>{v.useEffect(()=>{e.clearReset()},[e])},m8=({result:e,errorResetBoundary:t,throwOnError:r,query:n})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&fM(r,[e.error,n]),g8=e=>{e.suspense&&(e.staleTime===void 0&&(e.staleTime=1e3),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3)))},v8=(e,t)=>e.isLoading&&e.isFetching&&!t,y8=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,a_=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function x8(e,t,r){var f,d,h,p,g;const n=gS(),i=c8(),a=f8(),o=n.defaultQueryOptions(e);(d=(f=n.getDefaultOptions().queries)==null?void 0:f._experimental_beforeQuery)==null||d.call(f,o),o._optimisticResults=i?"isRestoring":"optimistic",g8(o),h8(o,a),p8(a);const s=!n.getQueryCache().get(o.queryHash),[c]=v.useState(()=>new t(n,o)),u=c.getOptimisticResult(o);if(v.useSyncExternalStore(v.useCallback(m=>{const y=i?()=>{}:c.subscribe(Vt.batchCalls(m));return c.updateResult(),y},[c,i]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),v.useEffect(()=>{c.setOptions(o,{listeners:!1})},[o,c]),y8(o,u))throw a_(o,c,a);if(m8({result:u,errorResetBoundary:a,throwOnError:o.throwOnError,query:n.getQueryCache().get(o.queryHash)}))throw u.error;if((p=(h=n.getDefaultOptions().queries)==null?void 0:h._experimental_afterQuery)==null||p.call(h,o,u),o.experimental_prefetchInRender&&!bs&&v8(u,i)){const m=s?a_(o,c,a):(g=n.getQueryCache().get(o.queryHash))==null?void 0:g.promise;m==null||m.catch(hM).finally(()=>{c.updateResult()})}return o.notifyOnChangeProps?u:c.trackResult(u)}function co(e,t){return x8(e,i8)}function b8(e,t){const r=gS(),[n]=v.useState(()=>new s8(r,e));v.useEffect(()=>{n.setOptions(e)},[n,e]);const i=v.useSyncExternalStore(v.useCallback(o=>n.subscribe(Vt.batchCalls(o)),[n]),()=>n.getCurrentResult(),()=>n.getCurrentResult()),a=v.useCallback((o,s)=>{n.mutate(o,s).catch(hM)},[n]);if(i.error&&fM(n.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}const w8=1,S8=1e6;let qy=0;function j8(){return qy=(qy+1)%Number.MAX_SAFE_INTEGER,qy.toString()}const Ky=new Map,o_=e=>{if(Ky.has(e))return;const t=setTimeout(()=>{Ky.delete(e),Xu({type:"REMOVE_TOAST",toastId:e})},S8);Ky.set(e,t)},P8=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,w8)};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?o_(r):e.toasts.forEach(n=>{o_(n.id)}),{...e,toasts:e.toasts.map(n=>
67n.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)}}},dp=[];let fp={toasts:[]};function Xu(e){fp=P8(fp,e),dp.forEach(t=>{t(fp)})}function Yp({...e}){const t=j8(),r=i=>Xu({type:"UPDATE_TOAST",toast:{...i,id:t}}),n=()=>Xu({type:"DISMISS_TOAST",toastId:t});return Xu({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:i=>{i||n()}}}),{id:t,dismiss:n,update:r}}function Ct(){const[e,t]=v.useState(fp);return v.useEffect(()=>(dp.push(t),()=>{const r=dp.indexOf(t);r>-1&&dp.splice(r,1)}),[e]),{...e,toast:Yp,dismiss:r=>Xu({type:"DISMISS_TOAST",toastId:r})}}function ee(e,t,{checkForDefaultPrevented:r=!0}={}){return function(i){if(e==null||e(i),r===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function N8(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function Kg(...e){return t=>e.forEach(r=>N8(r,t))}function Ae(...e){return v.useCallback(Kg(...e),e)}function _8(e,t=[]){let r=[];function n(a,o){const s=v.createContext(o),c=r.length;r=[...r,o];function u(d){const{scope:h,children:p,...g}=d,m=(h==null?void 0:h[e][c])||s,y=v.useMemo(()=>g,Object.values(g));return l.jsx(m.Provider,{value:y,children:p})}function f(d,h){const p=(h==null?void 0:h[e][c])||s,g=v.useContext(p);if(g)return g;if(o!==void 0)return o;throw new Error(`\`${d}\` must be used within \`${a}\``)}return u.displayName=a+"Provider",[u,f]}const i=()=>{const a=r.map(o=>v.createContext(o));return function(s){const c=(s==null?void 0:s[e])||a;return v.useMemo(()=>({[`__scope${e}`]:{...s,[e]:c}}),[s,c])}};return i.scopeName=e,[n,O8(i,...t)]}function O8(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(a){const o=n.reduce((s,{useScope:c,scopeName:u})=>{const d=c(a)[`__scope${u}`];return{...s,...d}},{});return v.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return r.scopeName=t.scopeName,r}var ha=v.forwardRef((e,t)=>{const{children:r,...n}=e,i=v.Children.toArray(r),a=i.find(k8);if(a){const o=a.props.children,s=i.map(c=>c===a?v.Children.count(o)>1?v.Children.only(null):v.isValidElement(o)?o.props.children:null:c);return l.jsx(Jb,{...n,ref:t,children:v.isValidElement(o)?v.cloneElement(o,void 0,s):null})}return l.jsx(Jb,{...n,ref:t,children:r})});ha.displayName="Slot";var Jb=v.forwardRef((e,t)=>{const{children:r,...n}=e;if(v.isValidElement(r)){const i=A8(r);return v.cloneElement(r,{...C8(n,r.props),ref:t?Kg(t,i):i})}return v.Children.count(r)>1?v.Children.only(null):null});Jb.displayName="SlotClone";var E8=({children:e})=>l.jsx(l.Fragment,{children:e});function k8(e){return v.isValidElement(e)&&e.type===E8}function C8(e,t){const r={...t};for(const n in t){const i=e[n],a=t[n];/^on[A-Z]/.test(n)?i&&a?r[n]=(...s)=>{a(...s),i(...s)}:i&&(r[n]=i):n==="style"?r[n]={...i,...a}:n==="className"&&(r[n]=[i,a].filter(Boolean).join(" "))}return{...e,...r}}function A8(e){var n,i;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=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function If(e){const t=e+"CollectionProvider",[r,n]=_8(t),[i,a]=r(t,{collectionRef:{current:null},itemMap:new Map}),o=p=>{const{scope:g,children:m}=p,y=M.useRef(null),x=M.useRef(new Map).current;return l.jsx(i,{scope:g,itemMap:x,collectionRef:y,children:m})};o.displayName=t;const s=e+"CollectionSlot",c=M.forwardRef((p,g)=>{const{scope:m,children:y}=p,x=a(s,m),b=Ae(g,x.collectionRef);return l.jsx(ha,{ref:b,children:y})});c.displayName=s;const u=e+"CollectionItemSlot",f="data-radix-collection-item",d=M.forwardRef((p,g)=>{const{scope:m,children:y,...x}=p,b=M.useRef(null),w=Ae(g,b),S=a(u,m);return M.useEffect(()=>(S.itemMap.set(b,{ref:b,...x}),()=>void S.itemMap.delete(b))),l.jsx(ha,{[f]:"",ref:w,children:y})});d.displayName=u;function h(p){const g=a(e+"CollectionConsumer",p);return M.useCallback(()=>{const y=g.collectionRef.current;if(!y)return[];const x=Array.from(y.querySelectorAll(`[${f}]`));return Array.from(g.itemMap.values()).sort((S,j)=>x.indexOf(S.ref.current)-x.indexOf(j.ref.current))},[g.collectionRef,g.itemMap])}return[{Provider:o,Slot:c,ItemSlot:d},h,n]}function T8(e,t){const r=v.createContext(t),n=a=>{const{children:o,...s}=a,c=v.useMemo(()=>s,Object.values(s));return l.jsx(r.Provider,{value:c,children:o})};n.displayName=e+"Provider";function i(a){const o=v.useContext(r);if(o)return o;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[n,i]}function cn(e,t=[]){let r=[];function n(a,o){const s=v.createContext(o),c=r.length;r=[...r,o];const u=d=>{var x;const{scope:h,children:p,...g}=d,m=((x=h==null?void 0:h[e])==null?void 0:x[c])||s,y=v.useMemo(()=>g,Object.values(g));return l.jsx(m.Provider,{value:y,children:p})};u.displayName=a+"Provider";function f(d,h){var m;const p=((m=h==null?void 0:h[e])==null?void 0:m[c])||s,g=v.useContext(p);if(g)return g;if(o!==void 0)return o;throw new Error(`\`${d}\` must be used within \`${a}\``)}return[u,f]}const i=()=>{const a=r.map(o=>v.createContext(o));return function(s){const c=(s==null?void 0:s[e])||a;return v.useMemo(()=>({[`__scope${e}`]:{...s,[e]:c}}),[s,c])}};return i.scopeName=e,[n,M8(i,...t)]}function M8(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(a){const o=n.reduce((s,{useScope:c,scopeName:u})=>{const d=c(a)[`__scope${u}`];return{...s,...d}},{});return v.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return r.scopeName=t.scopeName,r}var I8=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],xe=I8.reduce((e,t)=>
vendor: 4,235 bytes, line 67
67{const r=v.forwardRef((n,i)=>{const{asChild:a,...o}=n,s=a?ha:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(s,{...o,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function vS(e,t){e&&Ms.flushSync(()=>e.dispatchEvent(t))}function yt(e){const t=v.useRef(e);return v.useEffect(()=>{t.current=e}),v.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function $8(e,t=globalThis==null?void 0:globalThis.document){const r=yt(e);v.useEffect(()=>{const n=i=>{i.key==="Escape"&&r(i)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var R8="DismissableLayer",e0="dismissableLayer.update",D8="dismissableLayer.pointerDownOutside",L8="dismissableLayer.focusOutside",s_,pM=v.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),$f=v.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,onDismiss:s,...c}=e,u=v.useContext(pM),[f,d]=v.useState(null),h=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,p]=v.useState({}),g=Ae(t,N=>d(N)),m=Array.from(u.layers),[y]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),x=m.indexOf(y),b=f?m.indexOf(f):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,S=b>=x,j=B8(N=>{const _=N.target,O=[...u.branches].some(k=>k.contains(_));!S||O||(i==null||i(N),o==null||o(N),N.defaultPrevented||s==null||s())},h),P=U8(N=>{const _=N.target;[...u.branches].some(k=>k.contains(_))||(a==null||a(N),o==null||o(N),N.defaultPrevented||s==null||s())},h);return $8(N=>{b===u.layers.size-1&&(n==null||n(N),!N.defaultPrevented&&s&&(N.preventDefault(),s()))},h),v.useEffect(()=>{if(f)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(s_=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),l_(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=s_)}},[f,h,r,u]),v.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),l_())},[f,u]),v.useEffect(()=>{const N=()=>p({});return document.addEventListener(e0,N),()=>document.removeEventListener(e0,N)},[]),l.jsx(xe.div,{...c,ref:g,style:{pointerEvents:w?S?"auto":"none":void 0,...e.style},onFocusCapture:ee(e.onFocusCapture,P.onFocusCapture),onBlurCapture:ee(e.onBlurCapture,P.onBlurCapture),onPointerDownCapture:ee(e.onPointerDownCapture,j.onPointerDownCapture)})});$f.displayName=R8;var F8="DismissableLayerBranch",mM=v.forwardRef((e,t)=>{const r=v.useContext(pM),n=v.useRef(null),i=Ae(t,n);return v.useEffect(()=>{const a=n.current;if(a)return r.branches.add(a),()=>{r.branches.delete(a)}},[r.branches]),l.jsx(xe.div,{...e,ref:i})});mM.displayName=F8;function B8(e,t=globalThis==null?void 0:globalThis.document){const r=yt(e),n=v.useRef(!1),i=v.useRef(()=>{});return v.useEffect(()=>{const a=s=>{if(s.target&&!n.current){let c=function(){gM(D8,r,u,{discrete:!0})};const u={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=c,t.addEventListener("click",i.current,{once:!0})):c()}else t.removeEventListener("click",i.current);n.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",a),t.removeEventListener("click",i.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function U8(e,t=globalThis==null?void 0:globalThis.document){const r=yt(e),n=v.useRef(!1);return v.useEffect(()=>{const i=a=>{a.target&&!n.current&&gM(L8,r,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function l_(){const e=new CustomEvent(e0);document.dispatchEvent(e)}function gM(e,t,r,{discrete:n}){const i=r.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&i.addEventListener(e,t,{once:!0}),n?vS(i,a):i.dispatchEvent(a)}var z8=$f,W8=mM,Gt=globalThis!=null&&globalThis.document?v.useLayoutEffect:()=>{},V8="Portal",Rf=v.forwardRef((e,t)=>
67{var s;const{container:r,...n}=e,[i,a]=v.useState(!1);Gt(()=>a(!0),[]);const o=r||i&&((s=globalThis==null?void 0:globalThis.document)==null?void 0:s.body);return o?DU.createPortal(l.jsx(xe.div,{...n,ref:t}),o):null});Rf.displayName=V8;function H8(e,t){return v.useReducer((r,n)=>t[r][n]??r,e)}var br=e=>{const{present:t,children:r}=e,n=q8(t),i=typeof r=="function"?r({present:n.isPresent}):v.Children.only(r),a=Ae(n.ref,K8(i));return typeof r=="function"||n.isPresent?v.cloneElement(i,{ref:a}):null};br.displayName="Presence";function q8(e){const[t,r]=v.useState(),n=v.useRef({}),i=v.useRef(e),a=v.useRef("none"),o=e?"mounted":"unmounted",[s,c]=H8(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return v.useEffect(()=>{const u=Oh(n.current);a.current=s==="mounted"?u:"none"},[s]),Gt(()=>{const u=n.current,f=i.current;if(f!==e){const h=a.current,p=Oh(u);e?c("MOUNT"):p==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(f&&h!==p?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,c]),Gt(()=>{if(t){let u;const f=t.ownerDocument.defaultView??window,d=p=>{const m=Oh(n.current).includes(p.animationName);if(p.target===t&&m&&(c("ANIMATION_END"),!i.current)){const y=t.style.animationFillMode;t.style.animationFillMode="forwards",u=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=y)})}},h=p=>{p.target===t&&(a.current=Oh(n.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{f.clearTimeout(u),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:v.useCallback(u=>{u&&(n.current=getComputedStyle(u)),r(u)},[])}}function Oh(e){return(e==null?void 0:e.animationName)||"none"}function K8(e){var n,i;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=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function Jn({prop:e,defaultProp:t,onChange:r=()=>{}}){const[n,i]=G8({defaultProp:t,onChange:r}),a=e!==void 0,o=a?e:n,s=yt(r),c=v.useCallback(u=>{if(a){const d=typeof u=="function"?u(e):u;d!==e&&s(d)}else i(u)},[a,e,i,s]);return[o,c]}function G8({defaultProp:e,onChange:t}){const r=v.useState(e),[n]=r,i=v.useRef(n),a=yt(t);return v.useEffect(()=>{i.current!==n&&(a(n),i.current=n)},[n,i,a]),r}var Y8="VisuallyHidden",Gg=v.forwardRef((e,t)=>l.jsx(xe.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));Gg.displayName=Y8;var yS="ToastProvider",[xS,X8,Q8]=If("Toast"),[vM,$Pe]=cn("Toast",[Q8]),[Z8,Yg]=vM(yS),yM=e=>{const{__scopeToast:t,label:r="Notification",duration:n=5e3,swipeDirection:i="right",swipeThreshold:a=50,children:o}=e,[s,c]=v.useState(null),[u,f]=v.useState(0),d=v.useRef(!1),h=v.useRef(!1);return r.trim()||console.error(`Invalid prop \`label\` supplied to \`${yS}\`. Expected non-empty \`string\`.`),l.jsx(xS.Provider,{scope:t,children:l.jsx(Z8,{scope:t,label:r,duration:n,swipeDirection:i,swipeThreshold:a,toastCount:u,viewport:s,onViewportChange:c,onToastAdd:v.useCallback(()=>f(p=>p+1),[]),onToastRemove:v.useCallback(()=>f(p=>p-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:h,children:o})})};yM.displayName=yS;var xM="ToastViewport",J8=["F8"],t0="toast.viewportPause",r0="toast.viewportResume",bM=v.forwardRef((e,t)=>{const{__scopeToast:r,hotkey:n=J8,label:i="Notifications ({hotkey})",...a}=e,o=Yg(xM,r),s=X8(r),c=v.useRef(null),u=v.useRef(null),f=v.useRef(null),d=v.useRef(null),h=Ae(t,d,o.onViewportChange),p=n.join("+").replace(/Key/g,"").replace(/Digit/g,""),g=o.toastCount>0;v.useEffect(()=>{const y=x=>{var w;n.length!==0&&n.every(S=>x[S]||x.code===S)&&((w=d.current)==null||w.focus())};return document.addEventListener("keydown",y),()=>document.removeEventListener("keydown",y)},[n]),v.useEffect(()=>{const y=c.current,x=d.current;if(g&&y&&x){const b=()=>{if(!o.isClosePausedRef.current){const P=new CustomEvent(t0);x.dispatchEvent(P),o.isClosePausedRef.current=!0}},w=()=>
67{if(o.isClosePausedRef.current){const P=new CustomEvent(r0);x.dispatchEvent(P),o.isClosePausedRef.current=!1}},S=P=>{!y.contains(P.relatedTarget)&&w()},j=()=>{y.contains(document.activeElement)||w()};return y.addEventListener("focusin",b),y.addEventListener("focusout",S),y.addEventListener("pointermove",b),y.addEventListener("pointerleave",j),window.addEventListener("blur",b),window.addEventListener("focus",w),()=>{y.removeEventListener("focusin",b),y.removeEventListener("focusout",S),y.removeEventListener("pointermove",b),y.removeEventListener("pointerleave",j),window.removeEventListener("blur",b),window.removeEventListener("focus",w)}}},[g,o.isClosePausedRef]);const m=v.useCallback(({tabbingDirection:y})=>{const b=s().map(w=>{const S=w.ref.current,j=[S,...fW(S)];return y==="forwards"?j:j.reverse()});return(y==="forwards"?b.reverse():b).flat()},[s]);return v.useEffect(()=>{const y=d.current;if(y){const x=b=>{var j,P,N;const w=b.altKey||b.ctrlKey||b.metaKey;if(b.key==="Tab"&&!w){const _=document.activeElement,O=b.shiftKey;if(b.target===y&&O){(j=u.current)==null||j.focus();return}const E=m({tabbingDirection:O?"backwards":"forwards"}),I=E.findIndex(T=>T===_);Gy(E.slice(I+1))?b.preventDefault():O?(P=u.current)==null||P.focus():(N=f.current)==null||N.focus()}};return y.addEventListener("keydown",x),()=>y.removeEventListener("keydown",x)}},[s,m]),l.jsxs(W8,{ref:c,role:"region","aria-label":i.replace("{hotkey}",p),tabIndex:-1,style:{pointerEvents:g?void 0:"none"},children:[g&&l.jsx(n0,{ref:u,onFocusFromOutsideViewport:()=>{const y=m({tabbingDirection:"forwards"});Gy(y)}}),l.jsx(xS.Slot,{scope:r,children:l.jsx(xe.ol,{tabIndex:-1,...a,ref:h})}),g&&l.jsx(n0,{ref:f,onFocusFromOutsideViewport:()=>{const y=m({tabbingDirection:"backwards"});Gy(y)}})]})});bM.displayName=xM;var wM="ToastFocusProxy",n0=v.forwardRef((e,t)=>{const{__scopeToast:r,onFocusFromOutsideViewport:n,...i}=e,a=Yg(wM,r);return l.jsx(Gg,{"aria-hidden":!0,tabIndex:0,...i,ref:t,style:{position:"fixed"},onFocus:o=>{var u;const s=o.relatedTarget;!((u=a.viewport)!=null&&u.contains(s))&&n()}})});n0.displayName=wM;var Xg="Toast",eW="toast.swipeStart",tW="toast.swipeMove",rW="toast.swipeCancel",nW="toast.swipeEnd",SM=v.forwardRef((e,t)=>{const{forceMount:r,open:n,defaultOpen:i,onOpenChange:a,...o}=e,[s=!0,c]=Jn({prop:n,defaultProp:i,onChange:a});return l.jsx(br,{present:r||s,children:l.jsx(oW,{open:s,...o,ref:t,onClose:()=>c(!1),onPause:yt(e.onPause),onResume:yt(e.onResume),onSwipeStart:ee(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:ee(e.onSwipeMove,u=>{const{x:f,y:d}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${f}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${d}px`)}),onSwipeCancel:ee(e.onSwipeCancel,u=>{u.currentTarget.setAttribute("data-swipe","cancel"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:ee(e.onSwipeEnd,u=>{const{x:f,y:d}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","end"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${f}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${d}px`),c(!1)})})})});SM.displayName=Xg;var[iW,aW]=vM(Xg,{onClose(){}}),oW=v.forwardRef((e,t)=>{const{__scopeToast:r,type:n="foreground",duration:i,open:a,onClose:o,onEscapeKeyDown:s,onPause:c,onResume:u,onSwipeStart:f,onSwipeMove:d,onSwipeCancel:h,onSwipeEnd:p,...g}=e,m=Yg(Xg,r),[y,x]=v.useState(null),b=Ae(t,T=>x(T)),w=v.useRef(null),S=v.useRef(null),j=i||m.duration,P=v.useRef(0),N=v.useRef(j),_=v.useRef(0),{onToastAdd:O,onToastRemove:k}=m,C=yt(()=>{var $;(y==null?void 0:y.contains(document.activeElement))&&(($=m.viewport)==null||$.focus()),o()}),E=v.useCallback(T=>
vendor: 4,529 bytes, line 67
67{!T||T===1/0||(window.clearTimeout(_.current),P.current=new Date().getTime(),_.current=window.setTimeout(C,T))},[C]);v.useEffect(()=>{const T=m.viewport;if(T){const $=()=>{E(N.current),u==null||u()},R=()=>{const U=new Date().getTime()-P.current;N.current=N.current-U,window.clearTimeout(_.current),c==null||c()};return T.addEventListener(t0,R),T.addEventListener(r0,$),()=>{T.removeEventListener(t0,R),T.removeEventListener(r0,$)}}},[m.viewport,j,c,u,E]),v.useEffect(()=>{a&&!m.isClosePausedRef.current&&E(j)},[a,j,m.isClosePausedRef,E]),v.useEffect(()=>(O(),()=>k()),[O,k]);const I=v.useMemo(()=>y?kM(y):null,[y]);return m.viewport?l.jsxs(l.Fragment,{children:[I&&l.jsx(sW,{__scopeToast:r,role:"status","aria-live":n==="foreground"?"assertive":"polite","aria-atomic":!0,children:I}),l.jsx(iW,{scope:r,onClose:C,children:Ms.createPortal(l.jsx(xS.ItemSlot,{scope:r,children:l.jsx(z8,{asChild:!0,onEscapeKeyDown:ee(s,()=>{m.isFocusedToastEscapeKeyDownRef.current||C(),m.isFocusedToastEscapeKeyDownRef.current=!1}),children:l.jsx(xe.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":a?"open":"closed","data-swipe-direction":m.swipeDirection,...g,ref:b,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:ee(e.onKeyDown,T=>{T.key==="Escape"&&(s==null||s(T.nativeEvent),T.nativeEvent.defaultPrevented||(m.isFocusedToastEscapeKeyDownRef.current=!0,C()))}),onPointerDown:ee(e.onPointerDown,T=>{T.button===0&&(w.current={x:T.clientX,y:T.clientY})}),onPointerMove:ee(e.onPointerMove,T=>{if(!w.current)return;const $=T.clientX-w.current.x,R=T.clientY-w.current.y,U=!!S.current,A=["left","right"].includes(m.swipeDirection),D=["left","up"].includes(m.swipeDirection)?Math.min:Math.max,F=A?D(0,$):0,z=A?0:D(0,R),H=T.pointerType==="touch"?10:2,ue={x:F,y:z},be={originalEvent:T,delta:ue};U?(S.current=ue,Eh(tW,d,be,{discrete:!1})):c_(ue,m.swipeDirection,H)?(S.current=ue,Eh(eW,f,be,{discrete:!1}),T.target.setPointerCapture(T.pointerId)):(Math.abs($)>H||Math.abs(R)>H)&&(w.current=null)}),onPointerUp:ee(e.onPointerUp,T=>{const $=S.current,R=T.target;if(R.hasPointerCapture(T.pointerId)&&R.releasePointerCapture(T.pointerId),S.current=null,w.current=null,$){const U=T.currentTarget,A={originalEvent:T,delta:$};c_($,m.swipeDirection,m.swipeThreshold)?Eh(nW,p,A,{discrete:!0}):Eh(rW,h,A,{discrete:!0}),U.addEventListener("click",D=>D.preventDefault(),{once:!0})}})})})}),m.viewport)})]}):null}),sW=e=>{const{__scopeToast:t,children:r,...n}=e,i=Yg(Xg,t),[a,o]=v.useState(!1),[s,c]=v.useState(!1);return uW(()=>o(!0)),v.useEffect(()=>{const u=window.setTimeout(()=>c(!0),1e3);return()=>window.clearTimeout(u)},[]),s?null:l.jsx(Rf,{asChild:!0,children:l.jsx(Gg,{...n,children:a&&l.jsxs(l.Fragment,{children:[i.label," ",r]})})})},lW="ToastTitle",jM=v.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return l.jsx(xe.div,{...n,ref:t})});jM.displayName=lW;var cW="ToastDescription",PM=v.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return l.jsx(xe.div,{...n,ref:t})});PM.displayName=cW;var NM="ToastAction",_M=v.forwardRef((e,t)=>{const{altText:r,...n}=e;return r.trim()?l.jsx(EM,{altText:r,asChild:!0,children:l.jsx(bS,{...n,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${NM}\`. Expected non-empty \`string\`.`),null)});_M.displayName=NM;var OM="ToastClose",bS=v.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e,i=aW(OM,r);return l.jsx(EM,{asChild:!0,children:l.jsx(xe.button,{type:"button",...n,ref:t,onClick:ee(e.onClick,i.onClose)})})});bS.displayName=OM;var EM=v.forwardRef((e,t)=>{const{__scopeToast:r,altText:n,...i}=e;return l.jsx(xe.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0,...i,ref:t})});function kM(e){const t=[];return Array.from(e.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&t.push(n.textContent),dW(n)){const i=n.ariaHidden||n.hidden||n.style.display==="none",a=n.dataset.radixToastAnnounceExclude==="";if(!i)if(a){const o=n.dataset.radixToastAnnounceAlt;o&&t.push(o)}else t.push(...kM(n))}}),t}function Eh(e,t,r,{discrete:n}){const i=r.originalEvent.currentTarget,a=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:r});t&&i.addEventListener(e,t,{once:!0}),n?vS(i,a):i.dispatchEvent(a)}var c_=(e,t,r=0)=>{const n=Math.abs(e.x),i=Math.abs(e.y),a=n>i;return t==="left"||t==="right"?a&&n>r:!a&&i>r};function uW(e=()=>{}){const t=yt(e);Gt(()=>{let r=0,n=0;return r=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(n)}},[t])}
vendor: 4,375 bytes, lines 67-106
67function dW(e){return e.nodeType===e.ELEMENT_NODE}function fW(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const i=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||i?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function Gy(e){const t=document.activeElement;return e.some(r=>r===t?!0:(r.focus(),document.activeElement!==t))}var hW=yM,CM=bM,AM=SM,TM=jM,MM=PM,IM=_M,$M=bS;function RM(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(r=RM(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Te(){for(var e,t,r=0,n="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=RM(e))&&(n&&(n+=" "),n+=t);return n}const u_=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,d_=Te,Df=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return d_(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:i,defaultVariants:a}=t,o=Object.keys(i).map(u=>{const f=r==null?void 0:r[u],d=a==null?void 0:a[u];if(f===null)return null;const h=u_(f)||u_(d);return i[u][h]}),s=r&&Object.entries(r).reduce((u,f)=>{let[d,h]=f;return h===void 0||(u[d]=h),u},{}),c=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((u,f)=>{let{class:d,className:h,...p}=f;return Object.entries(p).every(g=>{let[m,y]=g;return Array.isArray(y)?y.includes({...a,...s}[m]):{...a,...s}[m]===y})?[...u,d,h]:u},[]);return d_(e,o,c,r==null?void 0:r.class,r==null?void 0:r.className)};/** 68 * @license lucide-react v0.462.0 - ISC 69 * 70 * This source code is licensed under the ISC license. 71 * See the LICENSE file in the root directory of this source tree. 72 */const pW=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),DM=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim();/** 73 * @license lucide-react v0.462.0 - ISC 74 * 75 * This source code is licensed under the ISC license. 76 * See the LICENSE file in the root directory of this source tree. 77 */var mW={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"};/** 78 * @license lucide-react v0.462.0 - ISC 79 * 80 * This source code is licensed under the ISC license. 81 * See the LICENSE file in the root directory of this source tree. 82 */const gW=v.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:i="",children:a,iconNode:o,...s},c)=>v.createElement("svg",{ref:c,...mW,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:DM("lucide",i),...s},[...o.map(([u,f])=>v.createElement(u,f)),...Array.isArray(a)?a:[a]]));/** 83 * @license lucide-react v0.462.0 - ISC 84 * 85 * This source code is licensed under the ISC license. 86 * See the LICENSE file in the root directory of this source tree. 87 */const ye=(e,t)=>{const r=v.forwardRef(({className:n,...i},a)=>v.createElement(gW,{ref:a,iconNode:t,className:DM(`lucide-${pW(e)}`,n),...i}));return r.displayName=`${e}`,r};/** 88 * @license lucide-react v0.462.0 - ISC 89 * 90 * This source code is licensed under the ISC license. 91 * See the LICENSE file in the root directory of this source tree. 92 */const vW=ye("AudioWaveform",[["path",{d:"M2 13a2 2 0 0 0 2-2V7a2 2 0 0 1 4 0v13a2 2 0 0 0 4 0V4a2 2 0 0 1 4 0v13a2 2 0 0 0 4 0v-4a2 2 0 0 1 2-2",key:"57tc96"}]]);/** 93 * @license lucide-react v0.462.0 - ISC 94 * 95 * This source code is licensed under the ISC license. 96 * See the LICENSE file in the root directory of this source tree. 97 */const qi=ye("Award",[["path",{d:"m15.477 12.89 1.515 8.526a.5.5 0 0 1-.81.47l-3.58-2.687a1 1 0 0 0-1.197 0l-3.586 2.686a.5.5 0 0 1-.81-.469l1.514-8.526",key:"1yiouv"}],["circle",{cx:"12",cy:"8",r:"6",key:"1vp47v"}]]);/** 98 * @license lucide-react v0.462.0 - ISC 99 * 100 * This source code is licensed under the ISC license. 101 * See the LICENSE file in the root directory of this source tree. 102 */const yW=ye("Bell",[["path",{d:"M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9",key:"1qo2s2"}],["path",{d:"M10.3 21a1.94 1.94 0 0 0 3.4 0",key:"qgo35s"}]]);/** 103 * @license lucide-react v0.462.0 - ISC 104 * 105 * This source code is licensed under the ISC license. 106 * See the LICENSE file in the root directory of this source tree.
107 */const xW=ye("BookMarked",[["path",{d:"M10 2v8l3-3 3 3V2",key:"sqw3rj"}],["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20",key:"k3hazp"}]]);/** 108 * @license lucide-react v0.462.0 - ISC 109 * 110 * This source code is licensed under the ISC license. 111 * See the LICENSE file in the root directory of this source tree. 112 */const Rs=ye("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"}]]);/** 113 * @license lucide-react v0.462.0 - ISC 114 * 115 * This source code is licensed under the ISC license. 116 * See the LICENSE file in the root directory of this source tree. 117 */const bW=ye("BookText",[["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20",key:"k3hazp"}],["path",{d:"M8 11h8",key:"vwpz6n"}],["path",{d:"M8 7h6",key:"1f0q6e"}]]);/** 118 * @license lucide-react v0.462.0 - ISC 119 * 120 * This source code is licensed under the ISC license. 121 * See the LICENSE file in the root directory of this source tree. 122 */const i0=ye("Book",[["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20",key:"k3hazp"}]]);/** 123 * @license lucide-react v0.462.0 - ISC 124 * 125 * This source code is licensed under the ISC license. 126 * See the LICENSE file in the root directory of this source tree. 127 */const wW=ye("Bookmark",[["path",{d:"m19 21-7-4-7 4V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16z",key:"1fy3hk"}]]);/** 128 * @license lucide-react v0.462.0 - ISC 129 * 130 * This source code is licensed under the ISC license. 131 * See the LICENSE file in the root directory of this source tree. 132 */const Xl=ye("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);/** 133 * @license lucide-react v0.462.0 - ISC 134 * 135 * This source code is licensed under the ISC license. 136 * See the LICENSE file in the root directory of this source tree. 137 */const LM=ye("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"}]]);/** 138 * @license lucide-react v0.462.0 - ISC 139 * 140 * This source code is licensed under the ISC license. 141 * See the LICENSE file in the root directory of this source tree. 142 */const Xp=ye("Calendar",[["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"}]]);/** 143 * @license lucide-react v0.462.0 - ISC 144 * 145 * This source code is licensed under the ISC license. 146 * See the LICENSE file in the root directory of this source tree. 147 */const FM=ye("ChartLine",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"m19 9-5 5-4-4-3 3",key:"2osh9i"}]]);/** 148 * @license lucide-react v0.462.0 - ISC 149 * 150 * This source code is licensed under the ISC license. 151 * See the LICENSE file in the root directory of this source tree. 152 */const Qp=ye("ChartNoAxesColumnIncreasing",[["line",{x1:"12",x2:"12",y1:"20",y2:"10",key:"1vz5eb"}],["line",{x1:"18",x2:"18",y1:"20",y2:"4",key:"cun8e5"}
152],["line",{x1:"6",x2:"6",y1:"20",y2:"16",key:"hq0ia6"}]]);/** 153 * @license lucide-react v0.462.0 - ISC 154 * 155 * This source code is licensed under the ISC license. 156 * See the LICENSE file in the root directory of this source tree. 157 */const ra=ye("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** 158 * @license lucide-react v0.462.0 - ISC 159 * 160 * This source code is licensed under the ISC license. 161 * See the LICENSE file in the root directory of this source tree. 162 */const BM=ye("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** 163 * @license lucide-react v0.462.0 - ISC 164 * 165 * This source code is licensed under the ISC license. 166 * See the LICENSE file in the root directory of this source tree. 167 */const a0=ye("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/** 168 * @license lucide-react v0.462.0 - ISC 169 * 170 * This source code is licensed under the ISC license. 171 * See the LICENSE file in the root directory of this source tree. 172 */const SW=ye("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/** 173 * @license lucide-react v0.462.0 - ISC 174 * 175 * This source code is licensed under the ISC license. 176 * See the LICENSE file in the root directory of this source tree. 177 */const jW=ye("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/** 178 * @license lucide-react v0.462.0 - ISC 179 * 180 * This source code is licensed under the ISC license. 181 * See the LICENSE file in the root directory of this source tree. 182 */const wS=ye("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/** 183 * @license lucide-react v0.462.0 - ISC 184 * 185 * This source code is licensed under the ISC license. 186 * See the LICENSE file in the root directory of this source tree. 187 */const PW=ye("CircleHelp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/** 188 * @license lucide-react v0.462.0 - ISC 189 * 190 * This source code is licensed under the ISC license. 191 * See the LICENSE file in the root directory of this source tree. 192 */const NW=ye("CircleStop",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["rect",{x:"9",y:"9",width:"6",height:"6",rx:"1",key:"1ssd4o"}]]);/** 193 * @license lucide-react v0.462.0 - ISC 194 * 195 * This source code is licensed under the ISC license. 196 * See the LICENSE file in the root directory of this source tree. 197 */const _W=ye("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"}]]);/** 198 * @license lucide-react v0.462.0 - ISC 199 * 200 * This source code is licensed under the ISC license. 201 * See the LICENSE file in the root directory of this source tree. 202 */const UM=ye("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/** 203 * @license lucide-react v0.462.0 - ISC 204 * 205 * This source code is licensed under the ISC license. 206 * See the LICENSE file in the root directory of this source tree. 207 */const Zp=ye("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/** 208 * @license lucide-react v0.462.0 - ISC 209 * 210 * This source code is licensed under the ISC license. 211 * See the LICENSE file in the root directory of this source tree. 212 */const zM=ye("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/** 213 * @license lucide-react v0.462.0 - ISC 214 * 215 * This source code is licensed under the ISC license. 216 * See the LICENSE file in the root directory of this source tree. 217 */const OW=ye("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"}]]);/** 218 * @license lucide-react v0.462.0 - ISC 219 * 220 * This source code is licensed under the ISC license. 221 * See the LICENSE file in the root directory of this source tree. 222 */const WM=ye("Headphones",[["path",{d:"M3 14h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-7a9 9 0 0 1 18 0v7a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3",key:"1xhozi"}]]);/** 223 * @license lucide-react v0.462.0 - ISC 224 * 225 * This source code is licensed under the ISC license. 226 * See the LICENSE file in the root directory of this source tree. 227 */const EW=ye("Heart",[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}]]);/** 228 * @license lucide-react v0.462.0 - ISC 229 * 230 * This source code is licensed under the ISC license. 231 * See the LICENSE file in the root directory of this source tree. 232 */const VM=ye("Image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);/** 233 * @license lucide-react v0.462.0 - ISC 234 * 235 * This source code is licensed under the ISC license. 236 * See the LICENSE file in the root directory of this source tree. 237 */const kW=ye("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/** 238 * @license lucide-react v0.462.0 - ISC 239 * 240 * This source code is licensed under the ISC license. 241 * See the LICENSE file in the root directory of this source tree.
242 */const CW=ye("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"}]]);/** 243 * @license lucide-react v0.462.0 - ISC 244 * 245 * This source code is licensed under the ISC license. 246 * See the LICENSE file in the root directory of this source tree. 247 */const o0=ye("Lightbulb",[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]]);/** 248 * @license lucide-react v0.462.0 - ISC 249 * 250 * This source code is licensed under the ISC license. 251 * See the LICENSE file in the root directory of this source tree. 252 */const AW=ye("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"}]]);/** 253 * @license lucide-react v0.462.0 - ISC 254 * 255 * This source code is licensed under the ISC license. 256 * See the LICENSE file in the root directory of this source tree. 257 */const nn=ye("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/** 258 * @license lucide-react v0.462.0 - ISC 259 * 260 * This source code is licensed under the ISC license. 261 * See the LICENSE file in the root directory of this source tree. 262 */const TW=ye("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);/** 263 * @license lucide-react v0.462.0 - ISC 264 * 265 * This source code is licensed under the ISC license. 266 * See the LICENSE file in the root directory of this source tree. 267 */const MW=ye("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"}]]);/** 268 * @license lucide-react v0.462.0 - ISC 269 * 270 * This source code is licensed under the ISC license. 271 * See the LICENSE file in the root directory of this source tree. 272 */const f_=ye("Medal",[["path",{d:"M7.21 15 2.66 7.14a2 2 0 0 1 .13-2.2L4.4 2.8A2 2 0 0 1 6 2h12a2 2 0 0 1 1.6.8l1.6 2.14a2 2 0 0 1 .14 2.2L16.79 15",key:"143lza"}],["path",{d:"M11 12 5.12 2.2",key:"qhuxz6"}],["path",{d:"m13 12 5.88-9.8",key:"hbye0f"}],["path",{d:"M8 7h8",key:"i86dvs"}],["circle",{cx:"12",cy:"17",r:"5",key:"qbz8iq"}],["path",{d:"M12 18v-2h-.5",key:"fawc4q"}]]);/** 273 * @license lucide-react v0.462.0 - ISC 274 * 275 * This source code is licensed under the ISC license. 276 * See the LICENSE file in the root directory of this source tree. 277 */const IW=ye("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/** 278 * @license lucide-react v0.462.0 - ISC 279 * 280 * This source code is licensed under the ISC license. 281 * See the LICENSE file in the root directory of this source tree. 282 */const go=ye("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/** 283 * @license lucide-react v0.462.0 - ISC 284 * 285 * This source code is licensed under the ISC license. 286 * See the LICENSE file in the root directory of this source tree. 287 */const $W=ye("MicOff",[["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}],["path",{d:"M18.89 13.23A7.12 7.12 0 0 0 19 12v-2",key:"80xlxr"}],["path",{d:"M5 10v2a7 7 0 0 0 12 5",key:"p2k8kg"}],["path",{d:"M15 9.34V5a3 3 0 0 0-5.68-1.33",key:"1gzdoj"}],["path",{d:"M9 9v3a3 3 0 0 0 5.12 2.12",key:"r2i35w"}],["line",{x1:"12",x2:"12",y1:"19",y2:"22",key:"x3vr5v"}]]);/** 288 * @license lucide-react v0.462.0 - ISC 289 * 290 * This source code is licensed under the ISC license. 291 * See the LICENSE file in the root directory of this source tree. 292 */const ni=ye("Mic",[["path",{d:"M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z",key:"131961"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["line",{x1:"12",x2:"12",y1:"19",y2:"22",key:"x3vr5v"}]]);/** 293 * @license lucide-react v0.462.0 - ISC 294 * 295 * This source code is licensed under the ISC license. 296 * See the LICENSE file in the root directory of this source tree. 297 */const HM=ye("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"}]]);/** 298 * @license lucide-react v0.462.0 - ISC 299 * 300 * This source code is licensed under the ISC license. 301 * See the LICENSE file in the root directory of this source tree. 302 */const SS=ye("PenLine",[["path",{d:"M12 20h9",key:"t2du7b"}],["path",{d:"M16.376 3.622a1 1 0 0 1 3.002 3.002L7.368 18.635a2 2 0 0 1-.855.506l-2.872.838a.5.5 0 0 1-.62-.62l.838-2.872a2 2 0 0 1 .506-.854z",key:"1ykcvy"}]]);/** 303 * @license lucide-react v0.462.0 - ISC 304 * 305 * This source code is licensed under the ISC license. 306 * See the LICENSE file in the root directory of this source tree. 307 */const s0=ye("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/** 308 * @license lucide-react v0.462.0 - ISC 309 * 310 * This source code is licensed under the ISC license. 311 * See the LICENSE file in the root directory of this source tree. 312 */const RW=ye("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/** 313 * @license lucide-react v0.462.0 - ISC 314 * 315 * This source code is licensed under the ISC license. 316 * See the LICENSE file in the root directory of this source tree. 317 */const qM=ye("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/** 318 * @license lucide-react v0.462.0 - ISC 319 * 320 * This source code is licensed under the ISC license. 321 * See the LICENSE file in the root directory of this source tree. 322 */const jS=ye("RotateCw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]]);/** 323 * @license lucide-react v0.462.0 - ISC 324 * 325 * This source code is licensed under the ISC license. 326 * See the LICENSE file in the root directory of this source tree. 327 */const DW=ye("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"}]]);/** 328 * @license lucide-react v0.462.0 - ISC 329 * 330 * This source code is licensed under the ISC license. 331 * See the LICENSE file in the root directory of this source tree. 332 */const LW=ye("ScrollText",[["path",{d:"M15 12h-5",key:"r7krc0"}],["path",{d:"M15 8h-5",key:"1khuty"}],["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]]);/** 333 * @license lucide-react v0.462.0 - ISC 334 * 335 * This source code is licensed under the ISC license. 336 * See the LICENSE file in the root directory of this source tree. 337 */const PS=ye("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/** 338 * @license lucide-react v0.462.0 - ISC 339 * 340 * This source code is licensed under the ISC license. 341 * See the LICENSE file in the root directory of this source tree. 342 */const NS=ye("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);/** 343 * @license lucide-react v0.462.0 - ISC 344 * 345 * This source code is licensed under the ISC license. 346 * See the LICENSE file in the root directory of this source tree. 347 */const KM=ye("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"}]]);/** 348 * @license lucide-react v0.462.0 - ISC 349 * 350 * This source code is licensed under the ISC license. 351 * See the LICENSE file in the root directory of this source tree. 352 */const FW=ye("Share",[["path",{d:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8",key:"1b2hhj"}],["polyline",{points:"16 6 12 2 8 6",key:"m901s6"}],["line",{x1:"12",x2:"12",y1:"2",y2:"15",key:"1p0rca"}]]);/** 353 * @license lucide-react v0.462.0 - ISC 354 * 355 * This source code is licensed under the ISC license. 356 * See the LICENSE file in the root directory of this source tree. 357 */const BW=ye("Shuffle",[["path",{d:"m18 14 4 4-4 4",key:"10pe0f"}],["path",{d:"m18 2 4 4-4 4",key:"pucp1d"}],["path",{d:"M2 18h1.973a4 4 0 0 0 3.3-1.7l5.454-8.6a4 4 0 0 1 3.3-1.7H22",key:"1ailkh"}],["path",{d:"M2 6h1.972a4 4 0 0 1 3.6 2.2",key:"km57vx"}],["path",{d:"M22 18h-6.041a4 4 0 0 1-3.3-1.8l-.359-.45",key:"os18l9"}]]);/** 358 * @license lucide-react v0.462.0 - ISC 359 * 360 * This source code is licensed under the ISC license. 361 * See the LICENSE file in the root directory of this source tree. 362 */const UW=ye("SkipBack",[["polygon",{points:"19 20 9 12 19 4 19 20",key:"o2sva"}],["line",{x1:"5",x2:"5",y1:"19",y2:"5",key:"1ocqjk"}]]);/** 363 * @license lucide-react v0.462.0 - ISC 364 * 365 * This source code is licensed under the ISC license. 366 * See the LICENSE file in the root directory of this source tree. 367 */const zW=ye("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"}]]);/** 368 * @license lucide-react v0.462.0 - ISC 369 * 370 * This source code is licensed under the ISC license. 371 * See the LICENSE file in the root directory of this source tree. 372 */const GM=ye("Square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);/** 373 * @license lucide-react v0.462.0 - ISC 374 * 375 * This source code is licensed under the ISC license. 376 * See the LICENSE file in the root directory of this source tree. 377 */const WW=ye("Star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]);/** 378 * @license lucide-react v0.462.0 - ISC 379 * 380 * This source code is licensed under the ISC license. 381 * See the LICENSE file in the root directory of this source tree. 382 */const Ed=ye("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,932 bytes, lines 382-417
382],["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"}]]);/** 383 * @license lucide-react v0.462.0 - ISC 384 * 385 * This source code is licensed under the ISC license. 386 * See the LICENSE file in the root directory of this source tree. 387 */const zi=ye("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"}]]);/** 388 * @license lucide-react v0.462.0 - ISC 389 * 390 * This source code is licensed under the ISC license. 391 * See the LICENSE file in the root directory of this source tree. 392 */const _S=ye("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"}]]);/** 393 * @license lucide-react v0.462.0 - ISC 394 * 395 * This source code is licensed under the ISC license. 396 * See the LICENSE file in the root directory of this source tree. 397 */const Cn=ye("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"}]]);/** 398 * @license lucide-react v0.462.0 - ISC 399 * 400 * This source code is licensed under the ISC license. 401 * See the LICENSE file in the root directory of this source tree. 402 */const YM=ye("VolumeX",[["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"}],["line",{x1:"22",x2:"16",y1:"9",y2:"15",key:"1ewh16"}],["line",{x1:"16",x2:"22",y1:"9",y2:"15",key:"5ykzw1"}]]);/** 403 * @license lucide-react v0.462.0 - ISC 404 * 405 * This source code is licensed under the ISC license. 406 * See the LICENSE file in the root directory of this source tree. 407 */const Rc=ye("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/** 408 * @license lucide-react v0.462.0 - ISC 409 * 410 * This source code is licensed under the ISC license. 411 * See the LICENSE file in the root directory of this source tree. 412 */const h_=ye("Youtube",[["path",{d:"M2.5 17a24.12 24.12 0 0 1 0-10 2 2 0 0 1 1.4-1.4 49.56 49.56 0 0 1 16.2 0A2 2 0 0 1 21.5 7a24.12 24.12 0 0 1 0 10 2 2 0 0 1-1.4 1.4 49.55 49.55 0 0 1-16.2 0A2 2 0 0 1 2.5 17",key:"1q2vi4"}],["path",{d:"m10 15 5-3-5-3z",key:"1jp15x"}]]);/** 413 * @license lucide-react v0.462.0 - ISC 414 * 415 * This source code is licensed under the ISC license. 416 * See the LICENSE file in the root directory of this source tree. 417 */const p_=ye("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"}]]),OS="-",VW=e=>{const t=qW(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:o=>{const s=o.split(OS);return s[0]===""&&s.length!==1&&s.shift(),XM(s,t)||HW(o)},getConflictingClassGroupIds:(o,s)=>{const c=r[o]||[];return s&&n[o]?[...c,...n[o]]:c}}},XM=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),i=n?XM(e.slice(1),n):void 0;if(i)return i;if(t.validators.length===0)return;const a=e.join(OS);return(o=t.validators.find(({validator:s})=>s(a)))==null?void 0:o.classGroupId},m_=/^\[(.+)\]$/,HW=e=>{if(m_.test(e)){const t=m_.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},qW=e=>{const{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return GW(Object.entries(e.classGroups),r).forEach(([a,o])=>{l0(o,n,a,t)}),n},l0=(e,t,r,n)=>{e.forEach(i=>{if(typeof i=="string"){const a=i===""?t:g_(t,i);a.classGroupId=r;return}if(typeof i=="function"){if(KW(i)){l0(i(n),t,r,n);return}t.validators.push({validator:i,classGroupId:r});return}Object.entries(i).forEach(([a,o])=>{l0(o,g_(t,a),r,n)})})},g_=(e,t)=>{let r=e;return t.split(OS).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},KW=e=>e.isThemeGetter,GW=(e,t)=>t?e.map(([r,n])=>{const i=n.map(a=>typeof a=="string"?t+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([o,s])=>[t+o,s])):a);return[r,i]}):e,YW=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const i=(a,o)=>{r.set(a,o),t++,t>e&&(t=0,n=r,r=new Map)};return{get(a){let o=r.get(a);if(o!==void 0)return o;if((o=n.get(a))!==void 0)return i(a,o),o},set(a,o){r.has(a)?r.set(a,o):i(a,o)}}},QM="!",XW=e=>{const{separator:t,experimentalParseClassName:r}=e,n=t.length===1,i=t[0],a=t.length,o=s=>{const c=[];let u=0,f=0,d;for(let y=0;y<s.length;y++){let x=s[y];if(u===0){if(x===i&&(n||s.slice(y,y+a)===t)){c.push(s.slice(f,y)),f=y+a;continue}if(x==="/"){d=y;continue}}x==="["?u++:x==="]"&&u--}const h=c.length===0?s:s.substring(f),p=h.startsWith(QM),g=p?h.substring(1):h,m=d&&d>f?d-f:void 0;return{modifiers:c,hasImportantModifier:p,baseClassName:g,maybePostfixModifierPosition:m}};return r?s=>r({className:s,parseClassName:o}):o},QW=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},ZW=e=>({cache:YW(e.cacheSize),parseClassName:XW(e),...VW(e)}),JW=/\s+/,eV=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:i}=t,a=[],o=e.trim().split(JW);let s="";for(let c=o.length-1;c>=0;c-=1){const u=o[c],{modifiers:f,hasImportantModifier:d,baseClassName:h,maybePostfixModifierPosition:p}=r(u);let g=!!p,m=n(g?h.substring(0,p):h);if(!m){if(!g){s=u+(s.length>0?" "+s:s);continue}if(m=n(h),!m){s=u+(s.length>0?" "+s:s);continue}g=!1}const y=QW(f).join(":"),x=d?y+QM:y,b=x+m;if(a.includes(b))continue;a.push(b);const w=i(m,g);for(let S=0;S<w.length;++S){const j=w[S];a.push(x+j)}s=u+(s.length>0?" "+s:s)}return s};function tV(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=ZM(t))&&(n&&(n+=" "),n+=r);return n}const ZM=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=ZM(e[n]))&&(r&&(r+=" "),r+=t);return r};function rV(e,...t){let r,n,i,a=o;function o(c){const u=t.reduce((f,d)=>d(f),e());return r=ZW(u),n=r.cache.get,i=r.cache.set,a=s,s(c)}function s(c){const u=n(c);if(u)return u;const f=eV(c,r);return i(c,f),f}return function(){return a(tV.apply(null,arguments))}}const ft=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},JM=/^\[(?:([a-z-]+):)?(.+)\]$/i,nV=/^\d+\/\d+$/,iV=new Set(["px","full","screen"]),aV=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,oV=/\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$/,sV=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,lV=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,cV=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,$i=e=>jl(e)||iV.has(e)||nV.test(e),Oa=e=>Dc(e,"length",vV),jl=e=>!!e&&!Number.isNaN(Number(e)),Yy=e=>Dc(e,"number",jl),du=e=>!!e&&Number.isInteger(Number(e)),uV=e=>e.endsWith("%")&&jl(e.slice(0,-1)),$e=e=>JM.test(e),Ea=e=>aV.test(e),dV=new Set(["length","size","percentage"]),fV=e=>Dc(e,dV,eI),hV=e=>Dc(e,"position",eI),pV=new Set(["image","url"]),mV=e=>Dc(e,pV,xV),gV=e=>Dc(e,"",yV),fu=()=>!0,Dc=(e,t,r)=>{const n=JM.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1},vV=e=>oV.test(e)&&!sV.test(e),eI=()=>!1,yV=e=>lV.test(e),xV=e=>cV.test(e),bV=()=>{const e=ft("colors"),t=ft("spacing"),r=ft("blur"),n=ft("brightness"),i=ft("borderColor"),a=ft("borderRadius"),o=ft("borderSpacing"),s=ft("borderWidth"),c=ft("contrast"),u=ft("grayscale"),f=ft("hueRotate"),d=ft("invert"),h=ft("gap"),p=ft("gradientColorStops"),g=ft("gradientColorStopPositions"),m=ft("inset"),y=ft("margin"),x=ft("opacity"),b=ft("padding"),w=ft("saturate"),S=ft("scale"),j=ft("sepia"),P=ft("skew"),N=ft("space"),_=ft("translate"),O=()=>["auto","contain","none"],k=()=>["auto","hidden","clip","visible","scroll"],C=()=>["auto",$e,t],E=()=>[$e,t],I=()=>["",$i,Oa],T=()=>["auto",jl,$e],$=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],R=()=>["solid","dashed","dotted","double","none"],U=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],A=()=>["start","end","center","between","around","evenly","stretch"],D=()=>["","0",$e],F=()=>["auto","avoid","all","avoid-page","page","left","right","column"],z=()=>[jl,$e];return{cacheSize:500,separator:":",theme:{colors:[fu],spacing:[$i,Oa],blur:["none","",Ea,$e],brightness:z(),borderColor:[e],borderRadius:["n
417one","","full",Ea,$e],borderSpacing:E(),borderWidth:I(),contrast:z(),grayscale:D(),hueRotate:z(),invert:D(),gap:E(),gradientColorStops:[e],gradientColorStopPositions:[uV,Oa],inset:C(),margin:C(),opacity:z(),padding:E(),saturate:z(),scale:z(),sepia:D(),skew:z(),space:E(),translate:E()},classGroups:{aspect:[{aspect:["auto","square","video",$e]}],container:["container"],columns:[{columns:[Ea]}],"break-after":[{"break-after":F()}],"break-before":[{"break-before":F()}],"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:[...$(),$e]}],overflow:[{overflow:k()}],"overflow-x":[{"overflow-x":k()}],"overflow-y":[{"overflow-y":k()}],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",du,$e]}],basis:[{basis:C()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",$e]}],grow:[{grow:D()}],shrink:[{shrink:D()}],order:[{order:["first","last","none",du,$e]}],"grid-cols":[{"grid-cols":[fu]}],"col-start-end":[{col:["auto",{span:["full",du,$e]},$e]}],"col-start":[{"col-start":T()}],"col-end":[{"col-end":T()}],"grid-rows":[{"grid-rows":[fu]}],"row-start-end":[{row:["auto",{span:[du,$e]},$e]}],"row-start":[{"row-start":T()}],"row-end":[{"row-end":T()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",$e]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",$e]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...A()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...A(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...A(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[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:[y]}],mx:[{mx:[y]}],my:[{my:[y]}],ms:[{ms:[y]}],me:[{me:[y]}],mt:[{mt:[y]}],mr:[{mr:[y]}],mb:[{mb:[y]}],ml:[{ml:[y]}],"space-x":[{"space-x":[N]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[N]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",$e,t]}],"min-w":[{"min-w":[$e,t,"min","max","fit"]}],"max-w":[{"max-w":[$e,t,"none","full","min","max","fit","prose",{screen:[Ea]},Ea]}],h:[{h:[$e,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[$e,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[$e,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[$e,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Ea,Oa]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Yy]}],"font-family":[{font:[fu]}],"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-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",$e]}],"line-clamp":[{"line-clamp":["none",jl,Yy]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",$i,$e]}],"list-image":[{"list-image":["none",$e]}],"list-style-type":[{list:["none","disc","decimal",$e]}],"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:[...R(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",$i,Oa]}],"underline-offset":[{"underline-offset":["auto",$i,$e]}],"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:E()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",$e]}],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",$e]}],"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:[...$(),hV]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",fV]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},mV]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[g]}
vendor: 5,180 bytes, line 417
417],"gradient-via-pos":[{via:[g]}],"gradient-to-pos":[{to:[g]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"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:[...R(),"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:R()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...R()]}],"outline-offset":[{"outline-offset":[$i,$e]}],"outline-w":[{outline:[$i,Oa]}],"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":[$i,Oa]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Ea,gV]}],"shadow-color":[{shadow:[fu]}],opacity:[{opacity:[x]}],"mix-blend":[{"mix-blend":[...U(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":U()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",Ea,$e]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[f]}],invert:[{invert:[d]}],saturate:[{saturate:[w]}],sepia:[{sepia:[j]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[f]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[x]}],"backdrop-saturate":[{"backdrop-saturate":[w]}],"backdrop-sepia":[{"backdrop-sepia":[j]}],"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",$e]}],duration:[{duration:z()}],ease:[{ease:["linear","in","out","in-out",$e]}],delay:[{delay:z()}],animate:[{animate:["none","spin","ping","pulse","bounce",$e]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[du,$e]}],"translate-x":[{"translate-x":[_]}],"translate-y":[{"translate-y":[_]}],"skew-x":[{"skew-x":[P]}],"skew-y":[{"skew-y":[P]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",$e]}],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",$e]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":E()}],"scroll-mx":[{"scroll-mx":E()}],"scroll-my":[{"scroll-my":E()}],"scroll-ms":[{"scroll-ms":E()}],"scroll-me":[{"scroll-me":E()}],"scroll-mt":[{"scroll-mt":E()}],"scroll-mr":[{"scroll-mr":E()}],"scroll-mb":[{"scroll-mb":E()}],"scroll-ml":[{"scroll-ml":E()}],"scroll-p":[{"scroll-p":E()}],"scroll-px":[{"scroll-px":E()}],"scroll-py":[{"scroll-py":E()}],"scroll-ps":[{"scroll-ps":E()}],"scroll-pe":[{"scroll-pe":E()}],"scroll-pt":[{"scroll-pt":E()}],"scroll-pr":[{"scroll-pr":E()}],"scroll-pb":[{"scroll-pb":E()}],"scroll-pl":[{"scroll-pl":E()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}
vendor: 4,642 bytes, line 417
417],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",$e]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[$i,Oa,Yy]}],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"]}}},wV=rV(bV);function G(...e){return wV(Te(e))}const SV=hW,tI=v.forwardRef(({className:e,...t},r)=>l.jsx(CM,{ref:r,className:G("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));tI.displayName=CM.displayName;const jV=Df("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"}}),rI=v.forwardRef(({className:e,variant:t,...r},n)=>l.jsx(AM,{ref:n,className:G(jV({variant:t}),e),...r}));rI.displayName=AM.displayName;const PV=v.forwardRef(({className:e,...t},r)=>l.jsx(IM,{ref:r,className:G("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",e),...t}));PV.displayName=IM.displayName;const nI=v.forwardRef(({className:e,...t},r)=>l.jsx($M,{ref:r,className:G("absolute right-2 top-2 rounded-md p-1 text-foreground
vendor: 4,251 bytes, line 417
417/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:l.jsx(Rc,{className:"h-4 w-4"})}));nI.displayName=$M.displayName;const iI=v.forwardRef(({className:e,...t},r)=>l.jsx(TM,{ref:r,className:G("text-sm font-semibold",e),...t}));iI.displayName=TM.displayName;const aI=v.forwardRef(({className:e,...t},r)=>l.jsx(MM,{ref:r,className:G("text-sm opacity-90",e),...t}));aI.displayName=MM.displayName;function oI(){const{toasts:e}=Ct();return l.jsxs(SV,{children:[e.map(function({id:t,title:r,description:n,action:i,...a}){return l.jsxs(rI,{...a,children:[l.jsxs("div",{className:"grid gap-1",children:[r&&l.jsx(iI,{children:r}),n&&l.jsx(aI,{children:n})]}),i,l.jsx(nI,{})]},t)}),l.jsx(tI,{})]})}const c0=(e,t)=>t.some(r=>e instanceof r);let v_,y_;function NV(){return v_||(v_=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function _V(){return y_||(y_=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const u0=new WeakMap,Xy=new WeakMap,Qg=new WeakMap;function OV(e){const t=new Promise((r,n)=>{const i=()=>{e.removeEventListener("success",a),e.removeEventListener("error",o)},a=()=>{r(uo(e.result)),i()},o=()=>{n(e.error),i()};e.addEventListener("success",a),e.addEventListener("error",o)});return Qg.set(t,e),t}function EV(e){if(u0.has(e))return;const t=new Promise((r,n)=>{const i=()=>{e.removeEventListener("complete",a),e.removeEventListener("error",o),e.removeEventListener("abort",o)},a=()=>{r(),i()},o=()=>{n(e.error||new DOMException("AbortError","AbortError")),i()};e.addEventListener("complete",a),e.addEventListener("error",o),e.addEventListener("abort",o)});u0.set(e,t)}let d0={get(e,t,r){if(e instanceof IDBTransaction){if(t==="done")return u0.get(e);if(t==="store")return r.objectStoreNames[1]?void 0:r.objectStore(r.objectStoreNames[0])}return uo(e[t])},set(e,t,r){return e[t]=r,!0},has(e,t){return e instanceof IDBTransaction&&(t==="done"||t==="store")?!0:t in e}};function sI(e){d0=e(d0)}function kV(e){return _V().includes(e)?function(...t){return e.apply(f0(this),t),uo(this.request)}:function(...t){return uo(e.apply(f0(this),t))}}function CV(e){return typeof e=="function"?kV(e):(e instanceof IDBTransaction&&EV(e),c0(e,NV())?new Proxy(e,d0):e)}function uo(e){if(e instanceof IDBRequest)return OV(e);if(Xy.has(e))return Xy.get(e);const t=CV(e);return t!==e&&(Xy.set(e,t),Qg.set(t,e)),t}const f0=e=>Qg.get(e);function lI(e,t,{blocked:r,upgrade:n,blocking:i,terminated:a}={}){const o=indexedDB.open(e,t),s=uo(o);return n&&o.addEventListener("upgradeneeded",c=>{n(uo(o.result),c.oldVersion,c.newVersion,uo(o.transaction),c)}),r&&o.addEventListener("blocked",c=>r(c.oldVersion,c.newVersion,c)),s.then(c=>{a&&c.addEventListener("close",()=>a()),i&&c.addEventListener("versionchange",u=>i(u.oldVersion,u.newVersion,u))}).catch(()=>{}),s}function AV(e,{blocked:t}={}){const r=indexedDB.deleteDatabase(e);return t&&r.addEventListener("blocked",n=>t(n.oldVersion,n)),uo(r).then(()=>{})}const TV=["get","getKey","getAll","getAllKeys","count"],MV=["put","add","delete","clear"],Qy=new Map;function x_(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&typeof t=="string"))return;if(Qy.get(t))return Qy.get(t);const r=t.replace(/FromIndex$/,""),n=t!==r,i=MV.includes(r);if(!(r in(n?IDBIndex:IDBObjectStore).prototype)||!(i||TV.includes(r)))return;const a=async function(o,...s){const c=this.transaction(o,i?"readwrite":"readonly");let u=c.store;return n&&(u=u.index(s.shift())),(await Promise.all([u[r](...s),i&&c.done]))[0]};return Qy.set(t,a),a}sI(e=>({...e,get:(t,r,n)=>x_(t,r)||e.get(t,r,n),has:(t,r)=>!!x_(t,r)||e.has(t,r)}));const IV=["continue","continuePrimaryKey","advance"],b_={},h0=new WeakMap,cI=new WeakMap,$V={get(e,t){if(!IV.includes(t))return e[t];let r=b_[t];return r||(r=b_[t]=function(...n){h0.set(this,cI.get(this)[t](...n))}),r}};async function*RV(...e){let t=this;if(t instanceof IDBCursor||(t=await t.openCursor(...e)),!t)return;t=t;const r=new Proxy(t,$V);for(cI.set(r,t),Qg.set(r,f0(t));t;
417)yield r,t=await(h0.get(r)||t.continue()),h0.delete(r)}function w_(e,t){return t===Symbol.asyncIterator&&c0(e,[IDBIndex,IDBObjectStore,IDBCursor])||t==="iterate"&&c0(e,[IDBIndex,IDBObjectStore])}sI(e=>({...e,get(t,r,n){return w_(t,r)?RV:e.get(t,r,n)},has(t,r){return w_(t,r)||e.has(t,r)}}));const ir=[];for(let e=0;e<256;++e)ir.push((e+256).toString(16).slice(1));function DV(e,t=0){return(ir[e[t+0]]+ir[e[t+1]]+ir[e[t+2]]+ir[e[t+3]]+"-"+ir[e[t+4]]+ir[e[t+5]]+"-"+ir[e[t+6]]+ir[e[t+7]]+"-"+ir[e[t+8]]+ir[e[t+9]]+"-"+ir[e[t+10]]+ir[e[t+11]]+ir[e[t+12]]+ir[e[t+13]]+ir[e[t+14]]+ir[e[t+15]]).toLowerCase()}let Zy;const LV=new Uint8Array(16);function FV(){if(!Zy){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Zy=crypto.getRandomValues.bind(crypto)}return Zy(LV)}const BV=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),S_={randomUUID:BV};function Fr(e,t,r){var i;if(S_.randomUUID&&!t&&!e)return S_.randomUUID();e=e||{};const n=e.random??((i=e.rng)==null?void 0:i.call(e))??FV();if(n.length<16)throw new Error("Random bytes length must be >= 16");return n[6]=n[6]&15|64,n[8]=n[8]&63|128,DV(n)}class UV{constructor(){To(this,"db");this.db=this.initDatabase()}async initDatabase(){return lI("lingua-learner-db",1,{upgrade(t){t.objectStoreNames.contains("users")||t.createObjectStore("users",{keyPath:"id"}),t.objectStoreNames.contains("sessions")||t.createObjectStore("sessions",{keyPath:"id"}),t.objectStoreNames.contains("corrections")||t.createObjectStore("corrections",{keyPath:"id"}),t.objectStoreNames.contains("rewards")||t.createObjectStore("rewards",{keyPath:"id"}),t.objectStoreNames.contains("lessons")||t.createObjectStore("lessons",{keyPath:"id"}),t.objectStoreNames.contains("achievements")||t.createObjectStore("achievements",{keyPath:"id"}),t.objectStoreNames.contains("posts")||t.createObjectStore("posts",{keyPath:"id"}),t.objectStoreNames.contains("comments")||t.createObjectStore("comments",{keyPath:"id"})}})}async getUsers(){return(await this.db).getAll("users")}async getUserById(t){return(await this.db).get("users",t)}async createUser(t){const r={id:Fr(),...t,createdAt:new Date().toISOString(),lastLogin:new Date().toISOString(),points:t.points||0,level:t.level||1};return await(await this.db).put("users",r),r}async updateUser(t){return await(await this.db).put("users",t),t}async getSessions(){return(await this.db).getAll("sessions")}
417async getSessionsByUserId(t){return(await this.getSessions()).filter(n=>n.userId===t)}async createSession(t){const r={id:Fr(),...t};return await(await this.db).put("sessions",r),r}async updateSession(t){return await(await this.db).put("sessions",t),t}async getCorrections(){return(await this.db).getAll("corrections")}async getCorrectionsBySessionId(t){return(await this.getCorrections()).filter(n=>n.sessionId===t)}async createCorrection(t){const r={id:Fr(),...t};return await(await this.db).put("corrections",r),r}async getRewards(){return(await this.db).getAll("rewards")}async getRewardsByUserId(t){return(await this.getRewards()).filter(n=>n.userId===t)}async createReward(t){const r={id:Fr(),...t,date:new Date().toISOString()};return await(await this.db).put("rewards",r),r}getRewardTypes(){return{practice_complete:"Completed a practice session",streak:"Maintained a practice streak",grammar_mastery:"Achieved high grammar score",pronunciation_mastery:"Achieved high pronunciation score",vocabulary_mastery:"Achieved high vocabulary score",reading_mastery:"Achieved high reading score",writing_mastery:"Achieved high writing score",level_up:"Leveled up your English proficiency",login_bonus:"Daily login bonus"}}async getLeaderboard(){return(await this.getUsers()).sort((r,n)=>n.points-r.points)}async getLessons(){return(await this.db).getAll("lessons")}async createLesson(t){const r={id:Fr(),...t};return await(await this.db).put("lessons",r),r}async updateLesson(t){return await(await this.db).put("lessons",t),t}async getLessonById(t){return(await this.db).get("lessons",t)}async getAchievements(){return(await this.db).getAll("achievements")}async createAchievement(t){const r={id:Fr(),...t};return await(await this.db).put("achievements",r),r}async updateAchievement(t){return await(await this.db).put("achievements",t),t}async getPosts(){return(await this.db).getAll("posts")}async createPost(t){const r={id:Fr(),...t,date:new Date().toISOString()};return await(await this.db).put("posts",r),r}async getComments(){return(await this.db).getAll("comments")}async getCommentsByPostId(t){return(await this.getComments()).filter(n=>n.postId===t)}async createComment(t){const r={id:Fr(),...t,date:new Date().toISOString()};return await(await this.db).put("comments",r),r}async getUserSettings(t){const r=await this.getUserById(t);return(r==null?void 0:r.settings)||{dailyGoal:15,notificationsEnabled:!0,theme:"system",difficulty:"beginner",audioEnabled:!0,aiEnabled:!0,analyticsEnabled:!0,privacySettings:{showProfilePublic:!0,allowDataCollection:!0,emailMarketing:!1}}}async updateUserSettings(t,r){const n=await this.getUserById(t);if(n)return n.settings=r,await this.updateUser(n),r;throw new Error("User not found")}}const gr=new UV,zV=async()=>{if(console.log("Initializing database with default data..."),(await gr.getUsers()).length>0){console.log("Database already initialized");return}const t=await gr.createUser({name:"Sarah Johnson",email:"[email protected]",password:"defaultPassword",points:125,level:2,xp:0,streak:5,lastStreak:new Date().toISOString(),lastLogin:new Date().toISOString(),joined:new Date().toISOString(),lastActive:new Date().toISOString(),preferences:{theme:"light",language:"en",notifications:!0}});console.log("Created default user:",t.id);const r=[{title:"First Steps",description:"Complete your first practice session",icon:"footprints",category:"beginner",xpReward:10,isUnlocked:!0,requiredPoints:10,unlockedAt:new Date().toISOString()},{title:"Grammar Guru",description:"Master 5 grammar rules",icon:"book",category:"intermediate",xpReward:20,isUnlocked:!1,requiredPoints:100},{title:"Vocabulary Master",description:"Learn 50 new words",icon:"library",category:"advanced",xpReward:30,isUnlocked:!1,requiredPoints:200},{title:"Pronunciation Pro",description:"Achieve excellent pronunciation in 5 sessions",icon:"mic",category:"intermediate",xpReward:25,isUnlocked:!1,requiredPoints:150},{title:"Conversation Champion",description:"Complete 10 speaking practice sessions",icon:"message-square",category:"advanced",xpReward:40,isUnlocked:!1,requiredPoints:300},{title:"Dedicated Learner",description:"Practice for 7 consecutive days",icon:"calendar",category:"intermediate",xpReward:35,isUnlocked:!1,requiredPoints:250},{title:"Level 5 Achiever",description:"Reach level 5 in your English learning journey",icon:"award",category:"advanced",xpReward:50,isUnlocked:!1,requiredPoints:500},{title:"Perfect Score",description:"Get a perfect score in any practice session",icon:"trophy",category:"advanced",xpReward:45,isUnlocked:!1,requiredPoints:350},{title:"Community Helper",description:"Help 5 other learners in the community",icon:"users",category:"special",xpReward:4
4170,isUnlocked:!1,requiredPoints:400}];for(const h of r)await gr.createAchievement(h);console.log("Created default achievements");const n=["grammar","vocabulary","pronunciation","conversation","reading","writing"],i=["beginner","intermediate","advanced"],a=["https://images.unsplash.com/photo-1503676260728-1c00da094a0b?w=500&auto=format&fit=crop&q=60&ixlib=rb-4.0.3","https://images.unsplash.com/photo-1456513080510-7bf3a84b82f8?w=500&auto=format&fit=crop&q=60&ixlib=rb-4.0.3","https://images.unsplash.com/photo-1519389950473-47ba0277781c?w=500&auto=format&fit=crop&q=60&ixlib=rb-4.0.3","https://images.unsplash.com/photo-1523240795612-9a054b0db644?w=500&auto=format&fit=crop&q=60&ixlib=rb-4.0.3","https://images.unsplash.com/photo-1516979187457-637abb4f9353?w=500&auto=format&fit=crop&q=60&ixlib=rb-4.0.3"],o=[];let s=0;for(const h of n)for(let p=0;p<3;p++){const g=i[p%i.length],m=p===0?Math.floor(Math.random()*100):0,y=m===100,x=s%a.length;o.push({title:`${g.charAt(0).toUpperCase()+g.slice(1)} ${h.charAt(0).toUpperCase()+h.slice(1)} ${p+1}`,description:`Learn essential ${h} skills for ${g} English speakers`,level:g,duration:15+p*5,category:h,completed:y,progress:m,imageUrl:a[x]}),s++}for(const h of o)await gr.createLesson(h);console.log("Created default lessons");const c=["speaking","listening","pronunciation","vocabulary","reading","writing","grammar"],u=[];for(let h=0;h<30;h++){const p=new Date;if(p.setDate(p.getDate()-h),Math.random()>.3){const g=Math.floor(Math.random()*3)+1;for(let m=0;m<g;m++){const y=c[Math.floor(Math.random()*c.length)],x=Math.floor(Math.random()*40)+60;u.push({userId:t.id,type:y,score:x,duration:Math.floor(Math.random()*15)+5,date:p.toISOString(),feedback:`You did well! Your ${y} skills are improving.`})}}}for(const h of u)await gr.createSession(h);console.log("Created practice sessions");const f=Object.keys(gr.getRewardTypes());for(let h=0;h<20;h++){const p=f[Math.floor(Math.random()*f.length)],g=new Date;g.setDate(g.getDate()-Math.floor(Math.random()*30)),await gr.createReward({userId:t.id,type:p,description:`Reward for ${p.replace("_"," ")}`,points:Math.floor(Math.random()*20)+5})}console.log("Created rewards");const d=[{name:"John Smith",email:"[email protected]",password:"defaultPassword",points:320,level:4,xp:0,joined:new Date().toISOString(),lastActive:new Date().toISOString(),lastLogin:new Date().toISOString(),preferences:{theme:"light",language:"en",notifications:!0}},{name:"Emma Wilson",email:"[email protected]",password:"defaultPassword",points:450,level:5,xp:0,joined:new Date().toISOString(),lastActive:new Date().toISOString(),lastLogin:new Date().toISOString(),preferences:{theme:"light",language:"en",notifications:!0}},{name:"Michael Chen",email:"[email protected]",password:"defaultPassword",points:270,level:3,xp:0,joined:new Date().toISOString(),lastActive:new Date().toISOString(),lastLogin:new Date().toISOString(),preferences:{theme:"light",language:"en",notifications:!0}},{name:"Sophia Garcia",email:"[email protected]",password:"defaultPassword",points:190,level:2,xp:0,joined:new Date().toISOString(),lastActive:new Date().toISOString(),lastLogin:new Date().toISOString(),preferences:{theme:"light",language:"en",notifications:!0}},{name:"David Kim",email:"[email protected]",password:"defaultPassword",points:510,level:6,xp:0,joined:new Date().toISOString(),lastActive:new Date().toISOString(),lastLogin:new Date().toISOString(),preferences:{theme:"light",language:"en",notifications:!0}},{name:"Olivia Brown",email:"[email protected]",password:"defaultPassword",points:380,level:4,xp:0,joined:new Date().toISOString(),lastActive:new Date().toISOString(),lastLogin:new Date().toISOString(),preferences:{theme:"light",language:"en",notifications:!0}},{name:"James Lee",email:"[email protected]",password:"defaultPassword",points:150,level:2,xp:0,joined:new Date().toISOString(),lastActive:new Date().toISOString(),lastLogin:new Date().toISOString(),preferences:{theme:"light",language:"en",notifications:!0}},{name:"Emily Taylor",email:"[email protected]",password:"defaultPassword",points:420,level:5,xp:0,joined:new Date().toISOString(),lastActive:new Date().toISOString(),lastLogin:new Date().toISOString(),preferences:{theme:"light",language:"en",notifications:!0}},{name:"Robert Wang",email:"[email protected]",password:"defaultPassword",points:290,level:3,xp:0,joined:new Date().toISOString(),lastActive:new Date().toISOString(),lastLogin:new Date().toISOString(),preferences:{theme:"light",language:"en",notifications:!0}}];for(const h of d)await gr.createUser(h);console.log("Created additional users for leaderboard"),console.log("Database initialization complete!")}
417,Un={DEFAULT:"AIzaSyAmDT5Up2xciEHkFMYOez6ZLk5ZFIMWh74",SPEAKING_PRACTICE:"",WRITING_PRACTICE:"",LISTENING_PRACTICE:"",WRITING_ASSISTANT:""},p0={DEFAULT_LANGUAGE:"english",MAX_AUDIO_DURATION_SECONDS:60,TRANSCRIPTION_CONFIDENCE_THRESHOLD:.75,DEFAULT_VOICE_RATE:1,DEFAULT_VOICE_PITCH:1,DEFAULT_THEME:"system"},WV=Df("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"}}),Y=v.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...i},a)=>{const o=n?ha:"button";return l.jsx(o,{className:G(WV({variant:t,size:r,className:e})),ref:a,...i})});Y.displayName="Button";const VV=()=>{const e=Ic(),t=[{icon:ni,title:"Real-time speech analysis",description:"Practice your pronunciation with instant feedback and guidance for improvement."},{icon:go,title:"AI conversation partner",description:"Have natural conversations with our AI assistant to build confidence and fluency."},{icon:Xl,title:"Virtual AI Teacher",description:"Get personalized help from your AI teacher who can answer all your language questions."},{icon:Qp,title:"Personalized progress tracking",description:"Monitor your improvement over time with detailed analytics and insights."},{icon:qi,title:"Adaptive learning path",description:"Customized lessons and exercises based on your proficiency level and goals."}];return l.jsxs("div",{className:"min-h-screen bg-background",children:[l.jsxs("header",{className:"fixed top-0 left-0 right-0 z-50 glass-panel px-6 py-3 flex items-center justify-between",children:[l.jsxs("div",{className:"flex items-center space-x-2",children:[l.jsx("div",{className:"w-10 h-10 flex items-center justify-center rounded-xl overflow-hidden",children:l.jsx("img",{src:"/lovable-uploads/9d14be83-5efa-4dc0-8344-78c6b1195429.png",alt:"Echo.AI Logo",className:"w-full h-full object-cover"})}),l.jsx("span",{className:"font-display text-xl font-semibold text-foreground",children:"Echo.AI"})]}),l.jsxs("nav",{className:"hidden md:flex items-center space-x-8",children:[l.jsx("a",{href:"#features",className:"text-foreground hover:text-primary transition-colors",children:"Features"}),l.jsx("a",{href:"#how-it-works",className:"text-foreground hover:text-primary transition-colors",children:"How it works"})]}),l.jsxs("div",{className:"flex items-center space-x-2",children:[l.jsx(Y,{variant:"ghost",onClick:()=>e("/login"),children:"Log in"}),l.jsx(Y,{onClick:()=>e("/register"),className:"button-shine",children:"Sign up"})]})]}),l.jsxs("section",{className:"pt-32 pb-16 px-6 md:px-12 lg:px-24 max-w-7xl mx-auto",children:[l.jsxs("div",{className:"flex flex-col items-center text-center animate-slide-up",children:[l.jsx("div",{className:"inline-block px-3 py-1 mb-6 bg-primary/10 text-primary rounded-full text-sm font-medium",children:"AI-Powered Language Learning"}),l.jsx("h1",{className:"text-4xl md:text-5xl lg:text-6xl font-display font-semibold mb-6 max-w-4xl leading-tight",children:"Master English with the help of artificial intelligence"}),l.jsx("p",{className:"text-xl text-muted-foreground mb-8 max-w-2xl",children:"Echo.AI uses advanced AI to provide personalized English learning experiences. Practice speaking, improve your pronunciation, and track your progress all in one place."}),l.jsxs("div",{className:"flex flex-col sm:flex-row items-center gap-4",children:[l.jsxs(Y,{size:"lg",onClick:()=>e("/register"),className:"h-14 px-8 text-lg font-medium button-shine",children:["Get Started for Free",l.jsx(a0,{className:"ml-2 h-5 w-5"})]}),l.jsx(Y,{variant:"outline",size:"lg",onClick:()=>e("/virtual-teacher"),className:"h-14 px-8 text-lg font-medium",children:"Try Virtual Teacher"})]})]}),l.jsxs("div",{className:"mt-16 relative",children:[l.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-background to-transparent z-10 pointer-events-none h-20 bottom-0 top-auto"}
417),l.jsx("div",{className:"glass-panel rounded-2xl overflow-hidden animate-fade-in shadow-glass-hover"})]})]}),l.jsx("section",{id:"features",className:"py-24 px-6 md:px-12 lg:px-24 bg-secondary/20",children:l.jsxs("div",{className:"max-w-7xl mx-auto",children:[l.jsxs("div",{className:"text-center mb-16 animate-fade-in",children:[l.jsx("h2",{className:"text-3xl md:text-4xl font-display font-semibold mb-4",children:"Features designed for effective learning"}),l.jsx("p",{className:"text-lg text-muted-foreground max-w-2xl mx-auto",children:"Our platform combines cutting-edge AI with proven language learning methodologies to help you achieve fluency faster."})]}),l.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8 animate-slide-up",children:t.map((r,n)=>l.jsxs("div",{className:"glass-panel p-8",children:[l.jsx("div",{className:"w-12 h-12 flex items-center justify-center bg-primary/10 text-primary rounded-xl mb-6",children:l.jsx(r.icon,{className:"h-6 w-6"})}),l.jsx("h3",{className:"text-xl font-display font-medium mb-3",children:r.title}),l.jsx("p",{className:"text-muted-foreground",children:r.description})]},n))})]})}),l.jsx("section",{id:"how-it-works",className:"py-24 px-6 md:px-12 lg:px-24",children:l.jsxs("div",{className:"max-w-7xl mx-auto",children:[l.jsxs("div",{className:"text-center mb-16 animate-fade-in",children:[l.jsx("h2",{className:"text-3xl md:text-4xl font-display font-semibold mb-4",children:"How Echo works"}),l.jsx("p",{className:"text-lg text-muted-foreground max-w-2xl mx-auto",children:"A simple three-step process to improve your English skills with AI assistance."})]}),l.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-8 animate-slide-up",children:[{step:"01",title:"Practice Speaking",description:"Record your voice as you practice speaking English on various topics."},{step:"02",title:"Get AI Feedback",description:"Receive instant analysis on your pronunciation, grammar, and vocabulary."},{step:"03",title:"Track Progress",description:"Monitor your improvement over time with detailed performance metrics."}].map((r,n)=>l.jsxs("div",{className:"glass-panel p-8 relative overflow-hidden",children:[l.jsx("div",{className:"absolute -top-4 -left-4 text-7xl font-display font-bold text-primary/10",children:r.step}),l.jsxs("div",{className:"relative",children:[l.jsx("h3",{className:"text-xl font-display font-medium mb-3",children:r.title}),l.jsx("p",{className:"text-muted-foreground",children:r.description})]})]},n))})]})}),l.jsx("section",{className:"py-24 px-6 md:px-12 lg:px-24 bg-gradient-to-b from-primary/5 to-secondary/20",children:l.jsxs("div",{className:"max-w-4xl mx-auto text-center animate-fade-in",children:[l.jsx("h2",{className:"text-3xl md:text-4xl font-display font-semibold mb-6",children:"Ready to improve your English?"}),l.jsx("p",{className:"text-lg text-muted-foreground mb-8 max-w-2xl mx-auto",children:"Join thousands of learners who are already enhancing their English skills with Echo's AI-powered platform."}),l.jsxs("div",{className:"flex flex-col sm:flex-row items-center justify-center gap-4",children:[l.jsxs(Y,{size:"lg",onClick:()=>e("/register"),className:"h-14 px-8 text-lg font-medium button-shine",children:["Start Learning Now",l.jsx(a0,{className:"ml-2 h-5 w-5"})]}),l.jsx(Y,{variant:"outline",size:"lg",onClick:()=>e("/virtual-teacher"),className:"h-14 px-8 text-lg font-medium",children:"Try Virtual Teacher"})]})]})}),l.jsx("footer",{className:"py-12 px-6 md:px-12 lg:px-24 border-t border-border",children:l.jsx("div",{className:"max-w-7xl mx-auto",children:l.jsxs("div",{className:"flex flex-col md:flex-row justify-between items-center",children:[l.jsxs("div",{className:"flex items-center space-x-2 mb-6 md:mb-0",children:[l.jsx("div",{className:"w-10 h-10 flex items-center justify-center rounded-xl overflow-hidden",children:l.jsx("img",{src:"/lovable-uploads/9d14be83-5efa-4dc0-8344-78c6b1195429.png",alt:"Echo.AI Logo",className:"w-full h-full object-cover"})}),l.jsx("span",{className:"font-display text-xl font-semibold text-foreground",children:"Echo.AI"})]}),l.jsxs("nav",{className:"flex flex-wrap justify-center gap-x-8 gap-y-4 mb-6 md:mb-0",children:[l.jsx("a",{href:"#features",className:"text-muted-foreground hover:text-foreground transition-colors",children:"Features"}),l.jsx("a",{href:"#how-it-works",className:"text-muted-foreground hover:text-foreground transition-colors",children:"How it works"}),l.jsx("a",{href:"/privacy",className:"text-muted-foreground hover:text-foreground transition-colors",children:"Privacy"}),l.jsx("a",{href:"/terms",className:"text-muted-foreground hover:text-foreground transition-colors",children:"Terms"})]}),l.jsxs("div",{className:"text-sm text-muted-foreground",children:["© ",new Date().getFullYear()," Echo.AI. All rights reserved."]})]})})})]})},tr=v.forwardRef(({className:e,type:t,...r},n)=>l.jsx("input",{type:t,className:G("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:n,...r}));
vendor: 9,261 bytes, line 417
417tr.displayName="Input";const ne=v.forwardRef(({className:e,...t},r)=>l.jsx("div",{ref:r,className:G("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));ne.displayName="Card";const ce=v.forwardRef(({className:e,...t},r)=>l.jsx("div",{ref:r,className:G("flex flex-col space-y-1.5 p-6",e),...t}));ce.displayName="CardHeader";const he=v.forwardRef(({className:e,...t},r)=>l.jsx("h3",{ref:r,className:G("text-2xl font-semibold leading-none tracking-tight",e),...t}));he.displayName="CardTitle";const ke=v.forwardRef(({className:e,...t},r)=>l.jsx("p",{ref:r,className:G("text-sm text-muted-foreground",e),...t}));ke.displayName="CardDescription";const ie=v.forwardRef(({className:e,...t},r)=>l.jsx("div",{ref:r,className:G("p-6 pt-0",e),...t}));ie.displayName="CardContent";const jt=v.forwardRef(({className:e,...t},r)=>l.jsx("div",{ref:r,className:G("flex items-center p-6 pt-0",e),...t}));jt.displayName="CardFooter";function Lf(e){const t=v.useRef({value:e,previous:e});return v.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function Ff(e){const[t,r]=v.useState(void 0);return Gt(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const a=i[0];let o,s;if("borderBoxSize"in a){const c=a.borderBoxSize,u=Array.isArray(c)?c[0]:c;o=u.inlineSize,s=u.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 ES="Checkbox",[HV,RPe]=cn(ES),[qV,KV]=HV(ES),uI=v.forwardRef((e,t)=>{const{__scopeCheckbox:r,name:n,checked:i,defaultChecked:a,required:o,disabled:s,value:c="on",onCheckedChange:u,form:f,...d}=e,[h,p]=v.useState(null),g=Ae(t,S=>p(S)),m=v.useRef(!1),y=h?f||!!h.closest("form"):!0,[x=!1,b]=Jn({prop:i,defaultProp:a,onChange:u}),w=v.useRef(x);return v.useEffect(()=>{const S=h==null?void 0:h.form;if(S){const j=()=>b(w.current);return S.addEventListener("reset",j),()=>S.removeEventListener("reset",j)}},[h,b]),l.jsxs(qV,{scope:r,state:x,disabled:s,children:[l.jsx(xe.button,{type:"button",role:"checkbox","aria-checked":fo(x)?"mixed":x,"aria-required":o,"data-state":hI(x),"data-disabled":s?"":void 0,disabled:s,value:c,...d,ref:g,onKeyDown:ee(e.onKeyDown,S=>{S.key==="Enter"&&S.preventDefault()}),onClick:ee(e.onClick,S=>{b(j=>fo(j)?!0:!j),y&&(m.current=S.isPropagationStopped(),m.current||S.stopPropagation())})}),y&&l.jsx(GV,{control:h,bubbles:!m.current,name:n,value:c,checked:x,required:o,disabled:s,form:f,style:{transform:"translateX(-100%)"},defaultChecked:fo(a)?!1:a})]})});uI.displayName=ES;var dI="CheckboxIndicator",fI=v.forwardRef((e,t)=>{const{__scopeCheckbox:r,forceMount:n,...i}=e,a=KV(dI,r);return l.jsx(br,{present:n||fo(a.state)||a.state===!0,children:l.jsx(xe.span,{"data-state":hI(a.state),"data-disabled":a.disabled?"":void 0,...i,ref:t,style:{pointerEvents:"none",...e.style}})})});fI.displayName=dI;var GV=e=>{const{control:t,checked:r,bubbles:n=!0,defaultChecked:i,...a}=e,o=v.useRef(null),s=Lf(r),c=Ff(t);v.useEffect(()=>{const f=o.current,d=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(d,"checked").set;if(s!==r&&p){const g=new Event("click",{bubbles:n});f.indeterminate=fo(r),p.call(f,fo(r)?!1:r),f.dispatchEvent(g)}},[s,r,n]);const u=v.useRef(fo(r)?!1:r);return l.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:i??u.current,...a,tabIndex:-1,ref:o,style:{...e.style,...c,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function fo(e){return e==="indeterminate"}function hI(e){return fo(e)?"indeterminate":e?"checked":"unchecked"}var pI=uI,YV=fI;const kS=v.forwardRef(({className:e,...t},r)=>l.jsx(pI,{ref:r,className:G("peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),...t,children:l.jsx(YV,{className:G("flex items-center justify-center text-current"),children:l.jsx(ra,{className:"h-4 w-4"})})}));kS.displayName=pI.displayName;var XV="Label",mI=v.forwardRef((e,t)=>l.jsx(xe.label,{...e,ref:t,onMouseDown:r=>{var i;r.target.closest("button, input, select, textarea")||((i=e.onMouseDown)==null||i.call(e,r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));mI.displayName=XV;var gI=mI;const QV=Df("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Rt=v.forwardRef(({className:e,...t},r)=>l.jsx(gI,{ref:r,className:G(QV(),e),...t}));Rt.displayName=gI.displayName;function ZV(e,t=[]){let r=[];function n(a,o){const s=v.createContext(o),c=r.length;r=[...r,o];function u(d){const{scope:h,children:p,...g}=d,m=(h==null?void 0:h[e][c])||s,y=v.useMemo(()=>g,Object.values(g));return l.jsx(m.Provider,{value:y,children:p})}function f(d,h){const p=(h==null?void 0:h[e][c])||s,g=v.useContext(p);if(g)return g;if(o!==void 0)return o;throw new Error(`\`${d}\` must be used within \`${a}\``)}return u.displayName=a+"Provider",[u,f]}const i=()=>{const a=r.map(o=>v.createContext(o));return function(s){const c=(s==null?void 0:s[e])||a;return v.useMemo(()=>({[`__scope${e}`]:{...s,[e]:c}}),[s,c])}};return i.scopeName=e,[n,JV(i,...t)]}function JV(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(a){const o=n.reduce((s,{useScope:c,scopeName:u})=>{const d=c(a)[`__scope${u}`];return{...s,...d}},{});return v.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return r.scopeName=t.scopeName,r}var e9=LA.useId||(()=>{}),t9=0;function bi(e){const[t,r]=v.useState(e9());return Gt(()=>{e||r(n=>n??String(t9++))},[e]),e||(t?`radix-${t}`:"")}var r9=v.createContext(void 0);function Ds(e){const t=v.useContext(r9);return e||t||"ltr"}var Jy="rovingFocusGroup.onEntryFocus",n9={bubbles:!1,cancelable:!0},Zg="RovingFocusGroup",[m0,vI,i9]=If(Zg),[a9,Lc]=ZV(Zg,[i9]),[o9,s9]=a9(Zg),yI=v.forwardRef((e,t)=>l.jsx(m0.Provider,{scope:e.__scopeRovingFocusGroup,children:l.jsx(m0.Slot,{scope:e.__scopeRovingFocusGroup,children:l.jsx(l9,{...e,ref:t})})}));yI.displayName=Zg;var l9=v.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:i=!1,dir:a,currentTabStopId:o,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:f=!1,...d}=e,h=v.useRef(null),p=Ae(t,h),g=Ds(a),[m=null,y]=Jn({prop:o,defaultProp:s,onChange:c}),[x,b]=v.useState(!1),w=yt(u),S=vI(r),j=v.useRef(!1),[P,N]=v.useState(0);return v.useEffect(()=>{const _=h.current;if(_)return _.addEventListener(Jy,w),()=>_.removeEventListener(Jy,w)},[w]),l.jsx(o9,{scope:r,orientation:n,dir:g,loop:i,currentTabStopId:m,onItemFocus:v.useCallback(_=>y(_),[y]),onItemShiftTab:v.useCallback(()=>b(!0),[]),onFocusableItemAdd:v.useCallback(()=>N(_=>_+1),[]),onFocusableItemRemove:v.useCallback(()=>N(_=>_-1),[]),children:l.jsx(xe.div,{tabIndex:x||P===0?-1:0,"data-orientation":n,...d,ref:p,style:{outline:"none",...e.style},onMouseDown:ee(e.onMouseDown,()=>{j.current=!0}),onFocus:ee(e.onFocus,_=>{const O=!j.current;if(_.target===_.currentTarget&&O&&!x){const k=new CustomEvent(Jy,n9);if(_.currentTarget.dispatchEvent(k),!k.defaultPrevented){const C=S().filter(R=>R.focusable),E=C.find(R=>R.active),I=C.find(R=>R.id===m),$=[E,I,...C].filter(Boolean).map(R=>R.ref.current);wI($,f)}}j.current=!1}),onBlur:ee(e.onBlur,()=>b(!1))})})}),xI="RovingFocusGroupItem",bI=v.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:i=!1,tabStopId:a,...o}=e,s=bi(),c=a||s,u=s9(xI,r),f=u.currentTabStopId===c,d=vI(r),{onFocusableItemAdd:h,onFocusableItemRemove:p}=u;return v.useEffect(()=>{if(n)return h(),()=>p()},[n,h,p]),l.jsx(m0.ItemSlot,{scope:r,id:c,focusable:n,active:i,children:l.jsx(xe.span,{tabIndex:f?0:-1,"data-orientation":u.orientation,...o,ref:t,onMouseDown:ee(e.onMouseDown,g=>{n?u.onItemFocus(c):g.preventDefault()}),onFocus:ee(e.onFocus,()=>u.onItemFocus(c)),onKeyDown:ee(e.onKeyDown,g=>{if(g.key==="Tab"&&g.shiftKey){u.onItemShiftTab();return}if(g.target!==g.currentTarget)return;const m=d9(g,u.orientation,u.dir);if(m!==void 0){if(g.metaKey||g.ctrlKey||g.altKey||g.shiftKey)return;g.preventDefault();let x=d().filter(b=>b.focusable).map(b=>b.ref.current);if(m==="last")x.reverse();else if(m==="prev"||m==="next"){m==="prev"&&x.reverse();const b=x.indexOf(g.currentTarget);x=u.loop?f9(x,b+1):x.slice(b+1)}setTimeout(()=>wI(x))}})})})});bI.displayName=xI;var c9={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function u9(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function d9(e,t,r){const n=u9(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return c9[n]}function wI(e,t=!1){const r=document.activeElement;for(const n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}function f9(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var CS=yI,AS=bI,TS="Tabs",[h9,DPe]=cn(TS,[Lc]),SI=Lc(),[p9,MS]=h9(TS),jI=v.forwardRef((e,t)=>
417{const{__scopeTabs:r,value:n,onValueChange:i,defaultValue:a,orientation:o="horizontal",dir:s,activationMode:c="automatic",...u}=e,f=Ds(s),[d,h]=Jn({prop:n,onChange:i,defaultProp:a});return l.jsx(p9,{scope:r,baseId:bi(),value:d,onValueChange:h,orientation:o,dir:f,activationMode:c,children:l.jsx(xe.div,{dir:f,"data-orientation":o,...u,ref:t})})});jI.displayName=TS;var PI="TabsList",NI=v.forwardRef((e,t)=>{const{__scopeTabs:r,loop:n=!0,...i}=e,a=MS(PI,r),o=SI(r);return l.jsx(CS,{asChild:!0,...o,orientation:a.orientation,dir:a.dir,loop:n,children:l.jsx(xe.div,{role:"tablist","aria-orientation":a.orientation,...i,ref:t})})});NI.displayName=PI;var _I="TabsTrigger",OI=v.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,disabled:i=!1,...a}=e,o=MS(_I,r),s=SI(r),c=CI(o.baseId,n),u=AI(o.baseId,n),f=n===o.value;return l.jsx(AS,{asChild:!0,...s,focusable:!i,active:f,children:l.jsx(xe.button,{type:"button",role:"tab","aria-selected":f,"aria-controls":u,"data-state":f?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:c,...a,ref:t,onMouseDown:ee(e.onMouseDown,d=>{!i&&d.button===0&&d.ctrlKey===!1?o.onValueChange(n):d.preventDefault()}),onKeyDown:ee(e.onKeyDown,d=>{[" ","Enter"].includes(d.key)&&o.onValueChange(n)}),onFocus:ee(e.onFocus,()=>{const d=o.activationMode!=="manual";!f&&!i&&d&&o.onValueChange(n)})})})});OI.displayName=_I;var EI="TabsContent",kI=v.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,forceMount:i,children:a,...o}=e,s=MS(EI,r),c=CI(s.baseId,n),u=AI(s.baseId,n),f=n===s.value,d=v.useRef(f);return v.useEffect(()=>{const h=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(h)},[]),l.jsx(br,{present:i||f,children:({present:h})=>l.jsx(xe.div,{"data-state":f?"active":"inactive","data-orientation":s.orientation,role:"tabpanel","aria-labelledby":c,hidden:!h,id:u,tabIndex:0,...o,ref:t,style:{...e.style,animationDuration:d.current?"0s":void 0},children:h&&a})})});kI.displayName=EI;function CI(e,t){return`${e}-trigger-${t}`}function AI(e,t){return`${e}-content-${t}`}var m9=jI,TI=NI,MI=OI,II=kI;const ki=m9,Ci=v.forwardRef(({className:e,...t},r)=>l.jsx(TI,{ref:r,className:G("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...t}));Ci.displayName=TI.displayName;const at=v.forwardRef(({className:e,...t},r)=>l.jsx(MI,{ref:r,className:G("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",e),...t}));at.displayName=MI.displayName;const ot=v.forwardRef(({className:e,...t},r)=>l.jsx(II,{ref:r,className:G("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));ot.displayName=II.displayName;class g9{constructor(){To(this,"db");this.db=this.initDatabase()}async initDatabase(){try{return lI("echo-app-db",1,{upgrade(t){if(t.objectStoreNames.contains("users")||t.createObjectStore("users",{keyPath:"id"}).createIndex("by-email","email",{unique:!0}),!t.objectStoreNames.contains("vocabularyWords")){const r=t.createObjectStore("vocabularyWords",{keyPath:"id"});r.createIndex("by-difficulty","difficulty",{unique:!1}),r.createIndex("by-category","category",{unique:!1})}if(t.objectStoreNames.contains("lessonProgress")||t.createObjectStore("lessonProgress",{keyPath:["userId","lessonId"]}).createIndex("by-user","userId",{unique:!1}),!t.objectStoreNames.contains("performanceData")){const r=t.createObjectStore("performanceData",{autoIncrement:!0});r.createIndex("by-user","userId",{unique:!1}),r.createIndex("by-user-and-skill",["userId","skill"],{unique:!1})}if(!t.objectStoreNames.contains("activities")){const r=t.createObjectStore("activities",{autoIncrement:!0});r.createIndex("by-user","userId",{unique:!1}),r.createIndex("by-date","date",{unique:!1})}if(t.objectStoreNames.contains("achievements")||t.createObjectStore("achievements",{keyPath:"id"}).createIndex("by-category","category",{unique:!1}),t.objectStoreNames.contains("userAchievements")||t.createObjectStore("userAchievements",{keyPath:["userId","achievementId"]}).createIndex("by-user","userId",{unique:!1}),!t.objectStoreNames.contains("communityPosts")){const r=t.createObjectStore("communityPosts",{keyPath:"id"});r.createIndex("by-user","userId",{unique:!1}),r.createIndex("by-date","date",{unique:!1})}if(!t.objectStoreNames.contains("postComments")){const r=t.createObjectStore("postComments",{keyPath:"id"});r.createIndex("by-post","postId",{unique:!1}),r.createIndex("by-user","userId",{unique:!1})}if(!t.objectStoreNames.contains("lessons")){const r=t.createObjectStore("lessons",{keyPath:"id"});r.createIndex("by-level","level",{unique:!1}),r.createIndex("by-category","category",{unique:!1})}if(!t.objectStoreNames.contains("practiceSessions")){const r=t.createObjectStore("practiceSessions",{keyPath:"id"});r.createIndex("by-user","userId",{unique:!1}),r.createIndex("by-date","date",{unique:!1})}if(t.objectStoreNames.contains("grammarCorrections")||t.createObjectStore("grammarCorrections",{keyPath:"id"}).createIndex("by-session","sessionId",{unique:!1}),!t.objectStoreNames.contains("rewards")){const r=t.createObjectStore("rewards",{keyPath:"id"});r.createIndex("by-user","userId",{unique:!1}),r.createIndex("by-date","date",{unique:!1})}}})}catch(t){throw console.error("Failed to initialize database:",t),t}}async clearDatabase(){try{(await this.db).close(),await AV("echo-app-db"),this.db=this.initDatabase()}catch(t){throw console.error("Failed to clear database:",t),t}}async getUsers(){try{return(await this.db).getAll("users")}catch(t){throw console.error("Failed to get users:",t),t}}async getLessons(){try{const t=await this.db;return t.objectStoreNames.contains("lessons")?t.getAll("lessons"):[]}catch(t){throw console.error("Failed to get lessons:",t),t}}async getAchievementsByUserId(t){try{return await(await this.db).getAll("achievements")}catch(r){throw console.error("Failed to get achievements by user ID:",r),r}}async createSession(t){try{const r={...t,id:Fr()},n=await this.db;return n.objectStoreNames.contains("practiceSessions")&&await n.put("practiceSessions",r),r}catch(r){throw console.error("Failed to create session:",r),r}}async getSessions(){try{const t=await this.db;return t.objectStoreNames.contains("practiceSessions")?t.getAll("practiceSessions"):[]}catch(t){throw console.error("Failed to get sessions:",t),t}}async getSessionsByUserId(t){try{const r=await this.db;return r.objectStoreNames.contains("practiceSessions")?await r.getAllFromIndex("practiceSessions","by-user",t):[]}catch(r){throw console.error("Failed to get sessions by user ID:",r),r}}async updateSession(t){try{const r=await this.db;return r.objectStoreNames.contains("practiceSessions")&&await r.put("practiceSessions",t),t}catch(r){throw console.error("Failed to update session:",r),r}}async createCorrection(t){try{const r={...t,id:Fr()},n=await this.db;return n.objectStoreNames.contains("grammarCorrections")&&await n.put("grammarCorrections",r),r}catch(r){throw console.error("Failed to create correction:",r),r}}async getRewardsByUserId(t){try{const r=await this.db;return r.objectStoreNames.contains("rewards")?r.getAllFromIndex("rewards","by-user",t):[]}catch(r){throw console.error("Failed to get rewards by user ID:",r),r}}async getUserSettings(t){try{const r=await this.getUserById(t);return(r==null?void 0:r.settings)||{dailyGoal:15,notificationsEnabled:!0,theme:"system",difficulty:"beginner",audioEnabled:!0,aiEnabled:!0,analyticsEnabled:!0,privacySettings:{showProfilePublic:!0,allowDataCollection:!0,emailMarketing:!1}}}catch(r){throw console.error("Failed to get user settings:",r),r}}async updateUserSettings(t,r){try{const n=await this.getUserById(t);if(n)return n.settings=r,await this.updateUser({id:t,settings:r}),r;throw new Error("User not found")}catch(n){throw console.error("Failed to update user settings:",n),n}}async getLeaderboard(t=10){try{return(await this.getUsers()).sort((n,i)=>(i.points||0)-(n.points||0)).slice(0,t).map(n=>({userId:n.id,userName:n.name,points:n.points||0,level:n.level}))}catch(r){throw console.error("Failed to get leaderboard:",r),r}}async createUser(t){try{const r={...t,id:Fr(),joined:new Date().toISOString(),lastActive:new Date().toISOString(),password:t.password||"defaultPassword",xp:t.xp||0,preferences:t.preferences||{theme:"light",language:"en",notifications:!0}};return(await this.db).put("users",r),r}catch(r){throw console.error("Failed to create user:",r),r}}async getUserById(t){try{return(await this.db).get("users",t)}catch(r){throw console.error("Failed to get user by ID:",r),r}}async getUserByEmail(t){try{return(await this.db).getFromIndex("users","by-email",t)}catch(r){throw console.error("Failed to get user by email:",r),r}}async updateUser(t){try{const r=await this.getUserById(t.id);if(!r)throw new Error(`User with ID ${t.id} not found`);const n={...r,...t,lastActive:new Date().toISOString()};return(await this.db).put("users",n),n}catch(r){throw console.error("Failed to update user:",r),r}}async createCommunityPost(t){try{const r={...t,id:Fr(),date:new Date().toISOString()};return(await this.db).put("communityPosts",r),r}catch(r){throw console.error("Failed to create community post:",r),r}}async getCommunityPosts(){try{return(await(await this.db).transaction("c
417ommunityPosts","readonly").objectStore("communityPosts").index("by-date").getAll()).sort((o,s)=>new Date(s.date).getTime()-new Date(o.date).getTime())}catch(t){throw console.error("Failed to get community posts:",t),t}}async getUserCommunityPosts(t){try{return(await this.db).getAllFromIndex("communityPosts","by-user",t)}catch(r){throw console.error("Failed to get user community posts:",r),r}}async createPostComment(t){try{const r={...t,id:Fr(),date:new Date().toISOString()};(await this.db).put("postComments",r);const n=await(await this.db).get("communityPosts",t.postId);return n&&(n.comments+=1,(await this.db).put("communityPosts",n)),r}catch(r){throw console.error("Failed to create post comment:",r),r}}async getPostComments(t){try{return(await(await this.db).getAllFromIndex("postComments","by-post",t)).sort((n,i)=>new Date(n.date).getTime()-new Date(i.date).getTime())}catch(r){throw console.error("Failed to get post comments:",r),r}}}const ut=new g9,$I=async e=>{const t=new Date().getTime(),r=Math.floor(Math.random()*1e3);return await new Promise(n=>setTimeout(n,1500)),{voicePrint:`voice-${t}-${r}`,confidence:.75+Math.random()*.2}},v9=async e=>{const{voicePrint:t,confidence:r}=await $I(),i=(await ut.getUsers()).filter(a=>a.voicePrint);return i.length>0&&Math.random()>.2?{authenticated:!0,userId:i[Math.floor(Math.random()*i.length)].id,confidence:r}:{authenticated:!1}},y9=async(e,t)=>{try{const{voicePrint:r}=await $I(t),n=await ut.getUserById(e);return n?(n.voicePrint=r,await ut.updateUser(n),!0):!1}catch(r){return console.error("Error registering voice print:",r),!1}},x9=({onLoginSuccess:e,userId:t,registrationMode:r=!1})=>{const[n,i]=v.useState(!1),[a,o]=v.useState(!1),[s,c]=v.useState(null),u=v.useRef(null),f=v.useRef([]),{toast:d}=Ct(),h=async()=>{try{const m=await navigator.mediaDevices.getUserMedia({audio:!0}),y=new MediaRecorder(m);u.current=y,f.current=[],y.ondataavailable=x=>{x.data.size>0&&f.current.push(x.data)},y.onstop=async()=>{const x=new Blob(f.current,{type:"audio/wav"});g(x)},y.start(),i(!0),c(null)}catch(m){console.error("Error starting recording:",m),d({title:"Microphone Access Error",description:"Please allow microphone access to use voice login.",variant:"destructive"})}},p=()=>{u.current&&u.current.state!=="inactive"&&(u.current.stop(),i(!1),o(!0))},g=async m=>{try{if(r&&t)await y9(t,m)?(c({success:!0,message:"Voice print registered successfully!"}),d({title:"Voice Registration Complete",description:"Your voice print has been saved for future logins."})):c({success:!1,message:"Failed to register voice print. Please try again."});else{const y=await v9(m);y.authenticated&&y.userId?(c({success:!0,message:`Welcome back! Confidence: ${Math.round((y.confidence||0)*100)}%`}),e(y.userId),d({title:"Voice Login Successful",description:"You have been logged in with your voice."})):c({success:!1,message:"Voice not recognized. Please try again or use email login."})}}catch(y){console.error("Error processing audio:",y),c({success:!1,message:"An error occurred during voice processing."})}finally{o(!1)}};return l.jsxs(ne,{className:G("glass-panel",n&&"ring-2 ring-primary",a&&"ring-2 ring-yellow-500"),children:[l.jsxs(ce,{children:[l.jsx(he,{className:"text-xl font-display",children:r?"Register Your Voice":"Login with Your Voice"}),l.jsx(ke,{children:r?"Record your voice to set up voice authentication":"Speak naturally to identify yourself"})]}),l.jsx(ie,{className:"pt-4",children:l.jsx("div",{className:G("min-h-32 p-4 rounded-xl border border-border bg-background/50 flex flex-col items-center justify-center",n&&"animate-pulse-subtle ring-1 ring-primary",a&&"ring-1 ring-yellow-500"),children:a?l.jsxs("div",{className:"text-center",children:[l.jsx(nn,{className:"h-10 w-10 animate-spin mx-auto mb-4 text-primary"}),l.jsx("p",{className:"text-muted-foreground",children:"Analyzing your voice..."})]}):s?l.jsxs("div",{className:"text-center",children:[s.success?l.jsx(wS,{className:"h-10 w-10 text-green-500 mx-auto mb-4"}):l.jsx(_W,{className:"h-10 w-10 text-red-500 mx-auto mb-4"}),l.jsx("p",{className:s.success?"text-green-600":"text-red-600",children:s.message})]}):l.jsxs("div",{className:"text-center",children:[l.jsx(ni,{className:G("h-12 w-12 mx-auto mb-4",n?"text-primary animate-pulse":"text-primary/60")}),l.jsx("p",{className:"text-muted-foreground",children:n?"Listening...":"Click the button below to start recording"})]})})}),l.jsx(jt,{children:l.jsx(Y,{variant:n?"destructive":"default",className:G("w-full gap-2",n&&"animate-pulse"),onClick:n?p:h,disabled:a||(s==null?void 0:s.success)||!1,children:n?"Stop Recording":"Start Voice Login"})})]})},b9=()=>{const[e,t]=v.useState(""),[r,n]=v.useState(""),[i,a]=v.useState(!1),[o,s]=v.useState(!1),c=Ic(),{toast:u}=Ct(),f=async h=>{if(h.preventDefault(),!e||!r){u({title:"Please fill all fields",description:"Email and password are required",variant:"destructive"});return}s(!0);try{await new Promise(m=>setTimeout(m,1e3));const g=(await ut.getUsers()).find(m=>m.email===e);if(g)g.lastLogin=new Date().toISOString(),await ut.updateUser(g),u({title:"Login successful",description:"Welcome back!"}),c("/dashboard");else{const m=await ut.createUser({name:e.split("@")[0],email:e,password:r,points:0,level:1,xp:0,lastLogin:new Date().toISOString(),preferences:{theme:"light",language:"en",notifications:!0}});u({title:"Account created",description:"Welcome to Echo! Your account has been created."}),c("/dashboard")}}catch{u({title:"Login failed",description:"Please check your credentials and try again",variant:"destructive"})}finally{s(!1)}},d=h=>{u({title:"Voice login successful",description:"Welcome back!"}),c("/dashboard")};return l.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gradient-to-b from-background to-secondary/30 p-4",children:l.jsxs("div",{className:"w-full max-w-md animate-fade-in",children:[l.jsxs("div",{className:"text-center mb-8",children:[l.jsx("div",{className:"mx-auto w-16 h-16 flex items-center justify-center bg-primary rounded-2xl text-white font-display text-2xl font-bold mb-4",children:"E"}),l.jsx("h1",{className:"text-3xl font-display font-semibold mb-2",children:"Welcome to Echo"}),l.jsx("p",{className:"text-muted-foreground",children:"Your AI-powered English learning assistant"})]}),l.jsxs(ki,{defaultValue:"email",className:"w-full",children:[l.jsxs(Ci,{className:"grid w-full grid-cols-2 mb-8",children:[l.jsx(at,{value:"email",children:"Email Login"}),l.jsx(at,{value:"voice",children:"Voice Login"})]}),l.jsx(ot,{value:"email",children:l.jsx(ne,{className:"glass-panel",children:l.jsxs("form",{onSubmit:f,children:[l.jsxs(ce,{children:[l.jsx(he,{className:"text-xl font-display",children:"Log in to your account"}),l.jsx(ke,{children:"Enter your email and password to continue"})]}),l.jsxs(ie,{className:"space-y-4",children:[l.jsxs("div",{className:"space-y-2",children:[l.jsx(Rt,{htmlFor:"email",children:"Email"}),l.jsx(tr,{id:"email",type:"email",placeholder:"[email protected]",value:e,onCh
417ange:h=>t(h.target.value),required:!0,className:"h-12"})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx(Rt,{htmlFor:"password",children:"Password"}),l.jsx($t,{to:"/forgot-password",className:"text-sm text-primary hover:underline",children:"Forgot password?"})]}),l.jsx(tr,{id:"password",type:"password",placeholder:"â¢â¢â¢â¢â¢â¢â¢â¢",value:r,onChange:h=>n(h.target.value),required:!0,className:"h-12"})]}),l.jsxs("div",{className:"flex items-center space-x-2",children:[l.jsx(kS,{id:"remember",checked:i,onCheckedChange:h=>a(h===!0)}),l.jsx(Rt,{htmlFor:"remember",className:"text-sm cursor-pointer",children:"Remember me for 30 days"})]})]}),l.jsxs(jt,{className:"flex flex-col space-y-4",children:[l.jsx(Y,{type:"submit",className:"w-full h-12 button-shine",disabled:o,children:o?"Logging in...":"Log in"}),l.jsxs("p",{className:"text-center text-sm text-muted-foreground",children:["Don't have an account?"," ",l.jsx($t,{to:"/register",className:"text-primary hover:underline",children:"Sign up"})]})]})]})})}),l.jsxs(ot,{value:"voice",children:[l.jsx(x9,{onLoginSuccess:d}),l.jsxs("p",{className:"text-center text-sm text-muted-foreground mt-4",children:["First time here?"," ",l.jsx($t,{to:"/register",className:"text-primary hover:underline",children:"Sign up with email"})]})]})]})]})})},w9=()=>{const[e,t]=v.useState(""),[r,n]=v.useState(""),[i,a]=v.useState(""),[o,s]=v.useState(""),[c,u]=v.useState(!1),[f,d]=v.useState(!1),h=Ic(),{toast:p}=Ct(),g=async m=>{if(m.preventDefault(),!e||!r||!i||!o){p({title:"Please fill all fields",description:"All fields are required",variant:"destructive"});return}if(i!==o){p({title:"Passwords don't match",description:"Please ensure both passwords match",variant:"destructive"});return}if(!c){p({title:"Terms agreement required",description:"Please agree to the terms and privacy policy",variant:"destructive"});return}d(!0);try{await new Promise(y=>setTimeout(y,1e3)),p({title:"Registration successful",description:"Your account has been created"}),h("/dashboard")}catch{p({title:"Registration failed",description:"An error occurred while creating your account",variant:"destructive"})}finally{d(!1)}};return l.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gradient-to-b from-background to-secondary/30 p-4",children:l.jsxs("div",{className:"w-full max-w-md animate-fade-in",children:[l.jsxs("div",{className:"text-center mb-8",children:[l.jsx("div",{className:"mx-auto w-16 h-16 flex items-center justify-center bg-primary rounded-2xl text-white font-display text-2xl font-bold mb-4",children:"E"}),l.jsx("h1",{className:"text-3xl font-display font-semibold mb-2",children:"Welcome to Echo"}),l.jsx("p",{className:"text-muted-foreground",children:"Your AI-powered English learning assistant"})]}),l.jsx(ne,{className:"glass-panel",children:l.jsxs("form",{onSubmit:g,children:[l.jsxs(ce,{children:[l.jsx(he,{className:"text-xl font-display",children:"Create your account"}),l.jsx(ke,{children:"Enter your details to get started"})]}),l.jsxs(ie,{className:"space-y-4",children:[l.jsxs("div",{className:"space-y-2",children:[l.jsx(Rt,{htmlFor:"name",children:"Full Name"}),l.jsx(tr,{id:"name",placeholder:"John Doe",value:e,onChange:m=>t(m.target.value),required:!0,className:"h-12"})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx(Rt,{htmlFor:"email",children:"Email"}),l.jsx(tr,{id:"email",type:"email",placeholder:"[email protected]",value:r,onChange:m=>n(m.target.value),required:!0,className:"h-12"})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx(Rt,{htmlFor:"password",children:"Password"}),l.jsx(tr,{id:"password",type:"password",placeholder:"â¢â¢â¢â¢â¢â¢â¢â¢",value:i,onChange:m=>a(m.target.value),required:!0,className:"h-12"})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx(Rt,{htmlFor:"confirmPassword",children:"Confirm Password"}),l.jsx(tr,{id:"confirmPassword",type:"password",placeholder:"â¢â¢â¢â¢â¢â¢â¢â¢",value:o,onChange:m=>s(m.target.value),required:!0,className:"h-12"})]}),l.jsxs("div",{className:"flex items-center space-x-2",children:[l.jsx(kS,{id:"terms",checked:c,onCheckedChange:m=>u(m===!0),required:!0}),l.jsxs(Rt,{htmlFor:"terms",className:"text-sm cursor-pointer",children:["I agree to the ",l.jsx($t,{to:"/terms",className:"text-primary hover:underline",children:"Terms of Service"})," and"," ",l.jsx($t,{to:"/privacy",className:"text-primary hover:underline",children:"Privacy Policy"})]})]})]}),l.jsxs(jt,{className:"flex flex-col space-y-4",children:[l.jsx(Y,{type:"submit",className:"w-full h-12 button-shine",disabled:f,children:f?"Creating account...":"Create account"}),l.jsxs("p",{className:"text-center text-sm text-muted-foreground",children:["Already have an account?"," ",l.jsx($t,{to:"/login",className:"text-primary hover:underline",children:"Log in"})]})]})]})})]})})};var IS="Avatar",[S9,LPe]=cn(IS),[j9,RI]=S9(IS),DI=v.forwardRef((e,t)=>
vendor: 5,471 bytes, line 417
417{const{__scopeAvatar:r,...n}=e,[i,a]=v.useState("idle");return l.jsx(j9,{scope:r,imageLoadingStatus:i,onImageLoadingStatusChange:a,children:l.jsx(xe.span,{...n,ref:t})})});DI.displayName=IS;var LI="AvatarImage",FI=v.forwardRef((e,t)=>{const{__scopeAvatar:r,src:n,onLoadingStatusChange:i=()=>{},...a}=e,o=RI(LI,r),s=P9(n,a.referrerPolicy),c=yt(u=>{i(u),o.onImageLoadingStatusChange(u)});return Gt(()=>{s!=="idle"&&c(s)},[s,c]),s==="loaded"?l.jsx(xe.img,{...a,ref:t,src:n}):null});FI.displayName=LI;var BI="AvatarFallback",UI=v.forwardRef((e,t)=>{const{__scopeAvatar:r,delayMs:n,...i}=e,a=RI(BI,r),[o,s]=v.useState(n===void 0);return v.useEffect(()=>{if(n!==void 0){const c=window.setTimeout(()=>s(!0),n);return()=>window.clearTimeout(c)}},[n]),o&&a.imageLoadingStatus!=="loaded"?l.jsx(xe.span,{...i,ref:t}):null});UI.displayName=BI;function P9(e,t){const[r,n]=v.useState("idle");return Gt(()=>{if(!e){n("error");return}let i=!0;const a=new window.Image,o=s=>()=>{i&&n(s)};return n("loading"),a.onload=o("loaded"),a.onerror=o("error"),a.src=e,t&&(a.referrerPolicy=t),()=>{i=!1}},[e,t]),r}var zI=DI,WI=FI,VI=UI;const kd=v.forwardRef(({className:e,...t},r)=>l.jsx(zI,{ref:r,className:G("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));kd.displayName=zI.displayName;const Jg=v.forwardRef(({className:e,...t},r)=>l.jsx(WI,{ref:r,className:G("aspect-square h-full w-full",e),...t}));Jg.displayName=WI.displayName;const Cd=v.forwardRef(({className:e,...t},r)=>l.jsx(VI,{ref:r,className:G("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));Cd.displayName=VI.displayName;var ex=0;function $S(){v.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??j_()),document.body.insertAdjacentElement("beforeend",e[1]??j_()),ex++,()=>{ex===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),ex--}},[])}function j_(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var tx="focusScope.autoFocusOnMount",rx="focusScope.autoFocusOnUnmount",P_={bubbles:!1,cancelable:!0},N9="FocusScope",ev=v.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=v.useState(null),u=yt(i),f=yt(a),d=v.useRef(null),h=Ae(t,m=>c(m)),p=v.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;v.useEffect(()=>{if(n){let m=function(w){if(p.paused||!s)return;const S=w.target;s.contains(S)?d.current=S:Aa(d.current,{select:!0})},y=function(w){if(p.paused||!s)return;const S=w.relatedTarget;S!==null&&(s.contains(S)||Aa(d.current,{select:!0}))},x=function(w){if(document.activeElement===document.body)for(const j of w)j.removedNodes.length>0&&Aa(s)};document.addEventListener("focusin",m),document.addEventListener("focusout",y);const b=new MutationObserver(x);return s&&b.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",y),b.disconnect()}}},[n,s,p.paused]),v.useEffect(()=>{if(s){__.add(p);const m=document.activeElement;if(!s.contains(m)){const x=new CustomEvent(tx,P_);s.addEventListener(tx,u),s.dispatchEvent(x),x.defaultPrevented||(_9(A9(HI(s)),{select:!0}),document.activeElement===m&&Aa(s))}return()=>{s.removeEventListener(tx,u),setTimeout(()=>{const x=new CustomEvent(rx,P_);s.addEventListener(rx,f),s.dispatchEvent(x),x.defaultPrevented||Aa(m??document.body,{select:!0}),s.removeEventListener(rx,f),__.remove(p)},0)}}},[s,u,f,p]);const g=v.useCallback(m=>{if(!r&&!n||p.paused)return;const y=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,x=document.activeElement;if(y&&x){const b=m.currentTarget,[w,S]=O9(b);w&&S?!m.shiftKey&&x===S?(m.preventDefault(),r&&Aa(w,{select:!0})):m.shiftKey&&x===w&&(m.preventDefault(),r&&Aa(S,{select:!0})):x===b&&m.preventDefault()}},[r,n,p.paused]);return l.jsx(xe.div,{tabIndex:-1,...o,ref:h,onKeyDown:g})});ev.displayName=N9;function _9(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(Aa(n,{select:t}),document.activeElement!==r)return}function O9(e){const t=HI(e),r=N_(t,e),n=N_(t.reverse(),e);return[r,n]}function HI(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const i=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||i?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function N_(e,t){for(const r of e)if(!E9(r,{upTo:t}))return r}function E9(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 k9(e){return e instanceof HTMLInputElement&&"select"in e}function Aa(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&k9(e)&&t&&e.select()}}var __=C9();function C9(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=O_(e,t),e.unshift(t)},remove(t){var r;e=O_(e,t),(r=e[0])==null||r.resume()}}}function O_(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function A9(e){return e.filter(t=>t.tagName!=="A")}const T9=["top","right","bottom","left"],vo=Math.min,Jr=Math.max,Jp=Math.round,kh=Math.floor,yo=e=>({x:e,y:e}
vendor: 5,050 bytes, line 417
417),M9={left:"right",right:"left",bottom:"top",top:"bottom"},I9={start:"end",end:"start"};function g0(e,t,r){return Jr(e,vo(t,r))}function pa(e,t){return typeof e=="function"?e(t):e}function ma(e){return e.split("-")[0]}function Fc(e){return e.split("-")[1]}function RS(e){return e==="x"?"y":"x"}function DS(e){return e==="y"?"height":"width"}function xo(e){return["top","bottom"].includes(ma(e))?"y":"x"}function LS(e){return RS(xo(e))}function $9(e,t,r){r===void 0&&(r=!1);const n=Fc(e),i=LS(e),a=DS(i);let o=i==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(o=em(o)),[o,em(o)]}function R9(e){const t=em(e);return[v0(e),t,v0(t)]}function v0(e){return e.replace(/start|end/g,t=>I9[t])}function D9(e,t,r){const n=["left","right"],i=["right","left"],a=["top","bottom"],o=["bottom","top"];switch(e){case"top":case"bottom":return r?t?i:n:t?n:i;case"left":case"right":return t?a:o;default:return[]}}function L9(e,t,r,n){const i=Fc(e);let a=D9(ma(e),r==="start",n);return i&&(a=a.map(o=>o+"-"+i),t&&(a=a.concat(a.map(v0)))),a}function em(e){return e.replace(/left|right|bottom|top/g,t=>M9[t])}function F9(e){return{top:0,right:0,bottom:0,left:0,...e}}function qI(e){return typeof e!="number"?F9(e):{top:e,right:e,bottom:e,left:e}}function tm(e){const{x:t,y:r,width:n,height:i}=e;return{width:n,height:i,top:r,left:t,right:t+n,bottom:r+i,x:t,y:r}}function E_(e,t,r){let{reference:n,floating:i}=e;const a=xo(t),o=LS(t),s=DS(o),c=ma(t),u=a==="y",f=n.x+n.width/2-i.width/2,d=n.y+n.height/2-i.height/2,h=n[s]/2-i[s]/2;let p;switch(c){case"top":p={x:f,y:n.y-i.height};break;case"bottom":p={x:f,y:n.y+n.height};break;case"right":p={x:n.x+n.width,y:d};break;case"left":p={x:n.x-i.width,y:d};break;default:p={x:n.x,y:n.y}}switch(Fc(t)){case"start":p[o]-=h*(r&&u?-1:1);break;case"end":p[o]+=h*(r&&u?-1:1);break}return p}const B9=async(e,t,r)=>{const{placement:n="bottom",strategy:i="absolute",middleware:a=[],platform:o}=r,s=a.filter(Boolean),c=await(o.isRTL==null?void 0:o.isRTL(t));let u=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:f,y:d}=E_(u,n,c),h=n,p={},g=0;for(let m=0;m<s.length;m++){const{name:y,fn:x}=s[m],{x:b,y:w,data:S,reset:j}=await x({x:f,y:d,initialPlacement:n,placement:h,strategy:i,middlewareData:p,rects:u,platform:o,elements:{reference:e,floating:t}});f=b??f,d=w??d,p={...p,[y]:{...p[y],...S}},j&&g<=50&&(g++,typeof j=="object"&&(j.placement&&(h=j.placement),j.rects&&(u=j.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):j.rects),{x:f,y:d}=E_(u,h,c)),m=-1)}return{x:f,y:d,placement:h,strategy:i,middlewareData:p}};async function Ad(e,t){var r;t===void 0&&(t={});const{x:n,y:i,platform:a,rects:o,elements:s,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:d="floating",altBoundary:h=!1,padding:p=0}=pa(t,e),g=qI(p),y=s[h?d==="floating"?"reference":"floating":d],x=tm(await a.getClippingRect({element:(r=await(a.isElement==null?void 0:a.isElement(y)))==null||r?y:y.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(s.floating)),boundary:u,rootBoundary:f,strategy:c})),b=d==="floating"?{x:n,y:i,width:o.floating.width,height:o.floating.height}:o.reference,w=await(a.getOffsetParent==null?void 0:a.getOffsetParent(s.floating)),S=await(a.isElement==null?void 0:a.isElement(w))?await(a.getScale==null?void 0:a.getScale(w))||{x:1,y:1}:{x:1,y:1},j=tm(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:b,offsetParent:w,strategy:c}):b);return{top:(x.top-j.top+g.top)/S.y,bottom:(j.bottom-x.bottom+g.bottom)/S.y,left:(x.left-j.left+g.left)/S.x,right:(j.right-x.right+g.right)/S.x}}const U9=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:u,padding:f=0}=pa(e,t)||{};if(u==null)return{};const d=qI(f),h={x:r,y:n},p=LS(i),g=DS(p),m=await o.getDimensions(u),y=p==="y",x=y?"top":"left",b=y?"bottom":"right",w=y?"clientHeight":"clientWidth",S=a.reference[g]+a.reference[p]-h[p]-a.floating[g],j=h[p]-a.reference[p],P=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u));let N=P?P[w]:0;(!N||!await(o.isElement==null?void 0:o.isElement(P)))&&(N=s.floating[w]||a.floating[g]);const _=S/2-j/2,O=N/2-m[g]/2-1,k=vo(d[x],O),C=vo(d[b],O),E=k,I=N-m[g]-C,T=N/2-m[g]/2+_,$=g0(E,T,I),R=!c.arrow&&Fc(i)!=null&&T!==$&&a.reference[g]/2-(T<E?k:C)-m[g]/2<0,U=R?T<E?T-E:T-I:0;return{[p]:h[p]+U,data:{[p]:$,centerOffset:T-$-U,...R&&{alignmentOffset:U}},reset:R}}}),z9=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:i,middlewareData:a,rects:o,initialPlacement:s,platform:c,elements:u}=t,{mainAxis:f=!0,crossAxis:d=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:m=!0,...y}=pa(e,t);if((r=a.arrow)!=null&&r.alignmentOffset)return{};const x=ma(i),b=xo(s),w=ma(s)===s,S=await(c.isRTL==null?void 0:c.isRTL(u.floating)),j=h||(w||!m?[em(s)]:R9(s)),P=g
vendor: 6,602 bytes, line 417
417!=="none";!h&&P&&j.push(...L9(s,m,g,S));const N=[s,...j],_=await Ad(t,y),O=[];let k=((n=a.flip)==null?void 0:n.overflows)||[];if(f&&O.push(_[x]),d){const T=$9(i,o,S);O.push(_[T[0]],_[T[1]])}if(k=[...k,{placement:i,overflows:O}],!O.every(T=>T<=0)){var C,E;const T=(((C=a.flip)==null?void 0:C.index)||0)+1,$=N[T];if($)return{data:{index:T,overflows:k},reset:{placement:$}};let R=(E=k.filter(U=>U.overflows[0]<=0).sort((U,A)=>U.overflows[1]-A.overflows[1])[0])==null?void 0:E.placement;if(!R)switch(p){case"bestFit":{var I;const U=(I=k.filter(A=>{if(P){const D=xo(A.placement);return D===b||D==="y"}return!0}).map(A=>[A.placement,A.overflows.filter(D=>D>0).reduce((D,F)=>D+F,0)]).sort((A,D)=>A[1]-D[1])[0])==null?void 0:I[0];U&&(R=U);break}case"initialPlacement":R=s;break}if(i!==R)return{reset:{placement:R}}}return{}}}};function k_(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function C_(e){return T9.some(t=>e[t]>=0)}const W9=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...i}=pa(e,t);switch(n){case"referenceHidden":{const a=await Ad(t,{...i,elementContext:"reference"}),o=k_(a,r.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:C_(o)}}}case"escaped":{const a=await Ad(t,{...i,altBoundary:!0}),o=k_(a,r.floating);return{data:{escapedOffsets:o,escaped:C_(o)}}}default:return{}}}}};async function V9(e,t){const{placement:r,platform:n,elements:i}=e,a=await(n.isRTL==null?void 0:n.isRTL(i.floating)),o=ma(r),s=Fc(r),c=xo(r)==="y",u=["left","top"].includes(o)?-1:1,f=a&&c?-1:1,d=pa(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:g}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof g=="number"&&(p=s==="end"?g*-1:g),c?{x:p*f,y:h*u}:{x:h*u,y:p*f}}const H9=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:i,y:a,placement:o,middlewareData:s}=t,c=await V9(t,e);return o===((r=s.offset)==null?void 0:r.placement)&&(n=s.arrow)!=null&&n.alignmentOffset?{}:{x:i+c.x,y:a+c.y,data:{...c,placement:o}}}}},q9=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:i}=t,{mainAxis:a=!0,crossAxis:o=!1,limiter:s={fn:y=>{let{x,y:b}=y;return{x,y:b}}},...c}=pa(e,t),u={x:r,y:n},f=await Ad(t,c),d=xo(ma(i)),h=RS(d);let p=u[h],g=u[d];if(a){const y=h==="y"?"top":"left",x=h==="y"?"bottom":"right",b=p+f[y],w=p-f[x];p=g0(b,p,w)}if(o){const y=d==="y"?"top":"left",x=d==="y"?"bottom":"right",b=g+f[y],w=g-f[x];g=g0(b,g,w)}const m=s.fn({...t,[h]:p,[d]:g});return{...m,data:{x:m.x-r,y:m.y-n,enabled:{[h]:a,[d]:o}}}}}},K9=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:u=!0}=pa(e,t),f={x:r,y:n},d=xo(i),h=RS(d);let p=f[h],g=f[d];const m=pa(s,t),y=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(c){const w=h==="y"?"height":"width",S=a.reference[h]-a.floating[w]+y.mainAxis,j=a.reference[h]+a.reference[w]-y.mainAxis;p<S?p=S:p>j&&(p=j)}if(u){var x,b;const w=h==="y"?"width":"height",S=["top","left"].includes(ma(i)),j=a.reference[d]-a.floating[w]+(S&&((x=o.offset)==null?void 0:x[d])||0)+(S?0:y.crossAxis),P=a.reference[d]+a.reference[w]+(S?0:((b=o.offset)==null?void 0:b[d])||0)-(S?y.crossAxis:0);g<j?g=j:g>P&&(g=P)}return{[h]:p,[d]:g}}}},G9=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...u}=pa(e,t),f=await Ad(t,u),d=ma(i),h=Fc(i),p=xo(i)==="y",{width:g,height:m}=a.floating;let y,x;d==="top"||d==="bottom"?(y=d,x=h===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?"start":"end")?"left":"right"):(x=d,y=h==="end"?"top":"bottom");const b=m-f.top-f.bottom,w=g-f.left-f.right,S=vo(m-f[y],b),j=vo(g-f[x],w),P=!t.middlewareData.shift;let N=S,_=j;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(_=w),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(N=b),P&&!h){const k=Jr(f.left,0),C=Jr(f.right,0),E=Jr(f.top,0),I=Jr(f.bottom,0);p?_=g-2*(k!==0||C!==0?k+C:Jr(f.left,f.right)):N=m-2*(E!==0||I!==0?E+I:Jr(f.top,f.bottom))}await c({...t,availableWidth:_,availableHeight:N});const O=await o.getDimensions(s.floating);return g!==O.width||m!==O.height?{reset:{rects:!0}}:{}}}};function tv(){return typeof window<"u"}function Bc(e){return KI(e)?(e.nodeName||"").toLowerCase():"#document"}function an(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ai(e){var t;return(t=(KI(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function KI(e){return tv()?e instanceof Node||e instanceof an(e).Node:!1}function ei(e){return tv()?e instanceof Element||e instanceof an(e).Element:!1}function Ni(e){return tv()?e instanceof HTMLElement||e instanceof an(e).HTMLElement:!1}function A_(e){return!tv()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof an(e).ShadowRoot}function Bf(e){const{overflow:t,overflowX:r,overflowY:n,display:i}=ti(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(i)}function Y9(e){return["table","td","th"].includes(Bc(e))}function rv(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function FS(e){const t=BS(),r=ei(e)?ti(e):e;return r.transform!=="none"||r.perspective!=="none"||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||["transform","perspective","filter"].some(n=>(r.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(r.contain||"").includes(n))}function X9(e){let t=bo(e);for(;Ni(t)&&!Ql(t);){if(FS(t))return t;if(rv(t))return null;t=bo(t)}return null}function BS(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Ql(e){return["html","body","#document"].includes(Bc(e))}function ti(e){return an(e).getComputedStyle(e)}function nv(e){return ei(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function bo(e){if(Bc(e)==="html")return e;const t=e.assignedSlot||e.parentNode||A_(e)&&e.host||Ai(e);return A_(t)?t.host:t}function GI(e){const t=bo(e);return Ql(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ni(t)&&Bf(t)?t:GI(t)}function Td(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const i=GI(e),a=i===((n=e.ownerDocument)==null?void 0:n.body),o=an(i);if(a){const s=y0(o);
vendor: 5,525 bytes, line 417
417return t.concat(o,o.visualViewport||[],Bf(i)?i:[],s&&r?Td(s):[])}return t.concat(i,Td(i,[],r))}function y0(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function YI(e){const t=ti(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const i=Ni(e),a=i?e.offsetWidth:r,o=i?e.offsetHeight:n,s=Jp(r)!==a||Jp(n)!==o;return s&&(r=a,n=o),{width:r,height:n,$:s}}function US(e){return ei(e)?e:e.contextElement}function Pl(e){const t=US(e);if(!Ni(t))return yo(1);const r=t.getBoundingClientRect(),{width:n,height:i,$:a}=YI(t);let o=(a?Jp(r.width):r.width)/n,s=(a?Jp(r.height):r.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}const Q9=yo(0);function XI(e){const t=an(e);return!BS()||!t.visualViewport?Q9:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Z9(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==an(e)?!1:t}function Ss(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const i=e.getBoundingClientRect(),a=US(e);let o=yo(1);t&&(n?ei(n)&&(o=Pl(n)):o=Pl(e));const s=Z9(a,r,n)?XI(a):yo(0);let c=(i.left+s.x)/o.x,u=(i.top+s.y)/o.y,f=i.width/o.x,d=i.height/o.y;if(a){const h=an(a),p=n&&ei(n)?an(n):n;let g=h,m=y0(g);for(;m&&n&&p!==g;){const y=Pl(m),x=m.getBoundingClientRect(),b=ti(m),w=x.left+(m.clientLeft+parseFloat(b.paddingLeft))*y.x,S=x.top+(m.clientTop+parseFloat(b.paddingTop))*y.y;c*=y.x,u*=y.y,f*=y.x,d*=y.y,c+=w,u+=S,g=an(m),m=y0(g)}}return tm({width:f,height:d,x:c,y:u})}function J9(e){let{elements:t,rect:r,offsetParent:n,strategy:i}=e;const a=i==="fixed",o=Ai(n),s=t?rv(t.floating):!1;if(n===o||s&&a)return r;let c={scrollLeft:0,scrollTop:0},u=yo(1);const f=yo(0),d=Ni(n);if((d||!d&&!a)&&((Bc(n)!=="body"||Bf(o))&&(c=nv(n)),Ni(n))){const h=Ss(n);u=Pl(n),f.x=h.x+n.clientLeft,f.y=h.y+n.clientTop}return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-c.scrollLeft*u.x+f.x,y:r.y*u.y-c.scrollTop*u.y+f.y}}function e7(e){return Array.from(e.getClientRects())}function x0(e,t){const r=nv(e).scrollLeft;return t?t.left+r:Ss(Ai(e)).left+r}function t7(e){const t=Ai(e),r=nv(e),n=e.ownerDocument.body,i=Jr(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),a=Jr(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let o=-r.scrollLeft+x0(e);const s=-r.scrollTop;return ti(n).direction==="rtl"&&(o+=Jr(t.clientWidth,n.clientWidth)-i),{width:i,height:a,x:o,y:s}}function r7(e,t){const r=an(e),n=Ai(e),i=r.visualViewport;let a=n.clientWidth,o=n.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;const u=BS();(!u||u&&t==="fixed")&&(s=i.offsetLeft,c=i.offsetTop)}return{width:a,height:o,x:s,y:c}}function n7(e,t){const r=Ss(e,!0,t==="fixed"),n=r.top+e.clientTop,i=r.left+e.clientLeft,a=Ni(e)?Pl(e):yo(1),o=e.clientWidth*a.x,s=e.clientHeight*a.y,c=i*a.x,u=n*a.y;return{width:o,height:s,x:c,y:u}}function T_(e,t,r){let n;if(t==="viewport")n=r7(e,r);else if(t==="document")n=t7(Ai(e));else if(ei(t))n=n7(t,r);else{const i=XI(e);n={...t,x:t.x-i.x,y:t.y-i.y}}return tm(n)}function QI(e,t){const r=bo(e);return r===t||!ei(r)||Ql(r)?!1:ti(r).position==="fixed"||QI(r,t)}function i7(e,t){const r=t.get(e);if(r)return r;let n=Td(e,[],!1).filter(s=>ei(s)&&Bc(s)!=="body"),i=null;const a=ti(e).position==="fixed";let o=a?bo(e):e;for(;ei(o)&&!Ql(o);){const s=ti(o),c=FS(o);!c&&s.position==="fixed"&&(i=null),(a?!c&&!i:!c&&s.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||Bf(o)&&!c&&QI(e,o))?n=n.filter(f=>f!==o):i=s,o=bo(o)}return t.set(e,n),n}function a7(e){let{element:t,boundary:r,rootBoundary:n,strategy:i}=e;const o=[...r==="clippingAncestors"?rv(t)?[]:i7(t,this._c):[].concat(r),n],s=o[0],c=o.reduce((u,f)=>{const d=T_(t,f,i);return u.top=Jr(d.top,u.top),u.right=vo(d.right,u.right),u.bottom=vo(d.bottom,u.bottom),u.left=Jr(d.left,u.left),u},T_(t,s,i));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function o7(e){const{width:t,height:r}=YI(e);return{width:t,height:r}}function s7(e,t,r){const n=Ni(t),i=Ai(t),a=r==="fixed",o=Ss(e,!0,a,t);let s={scrollLeft:0,scrollTop:0};const c=yo(0);if(n||!n&&!a)if((Bc(t)!=="body"||Bf(i))&&(s=nv(t)),n){const p=Ss(t,!0,a,t);c.x=p.x+t.clientLeft,c.y=p.y+t.clientTop}else i&&(c.x=x0(i));let u=0,f=0;if(i&&!n&&!a){const p=i.getBoundingClientRect();f=p.top+s.scrollTop,u=p.left+s.scrollLeft-x0(i,p)}const d=o.left+s.scrollLeft-c.x-u,h=o.top+s.scrollTop-c.y-f;return{x:d,y:h,width:o.width,height:o.height}}function nx(e){return ti(e).position==="static"}function M_(e,t){if(!Ni(e)||ti(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Ai(e)===r&&(r=r.ownerDocument.body),r}function ZI(e,t){const r=an(e);if(rv(e))return r;if(!Ni(e)){let i=bo(e);for(;i&&!Ql(i);){if(ei(i)&&!nx(i))return i;i=bo(i)}return r}let n=M_(e,t);for(;n&&Y9(n)&&nx(n);)n=M_(n,t);return n&&Ql(n)&&nx(n)&&!FS(n)?r:n||X9(e)||r}const l7=async function(e){const t=this.getOffsetParent||ZI,r=this.getDimensions,n=await r(e.floating);return{reference:s7(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function c7(e){return ti(e).direction==="rtl"}const u7={convertOffsetParentRelativeRectToViewportRelativeRect:J9,getDocumentElement:Ai,getClippingRect:a7,getOffsetParent:ZI,getElementRects:l7,getClientRects:e7,getDimensions:o7,getScale:Pl,isElement:ei,isRTL:c7};function d7(e,t){let r=null,n;const i=Ai(e);function a(){var s;clearTimeout(n),(s=r)==null||s.disconnect(),r=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();const{left:u,top:f,width:d,height:h}=e.getBoundingClientRect();if(s||t(),!d||!h)return;
vendor: 8,653 bytes, line 417
417const p=kh(f),g=kh(i.clientWidth-(u+d)),m=kh(i.clientHeight-(f+h)),y=kh(u),b={rootMargin:-p+"px "+-g+"px "+-m+"px "+-y+"px",threshold:Jr(0,vo(1,c))||1};let w=!0;function S(j){const P=j[0].intersectionRatio;if(P!==c){if(!w)return o();P?o(!1,P):n=setTimeout(()=>{o(!1,1e-7)},1e3)}w=!1}try{r=new IntersectionObserver(S,{...b,root:i.ownerDocument})}catch{r=new IntersectionObserver(S,b)}r.observe(e)}return o(!0),a}function f7(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:c=!1}=n,u=US(e),f=i||a?[...u?Td(u):[],...Td(t)]:[];f.forEach(x=>{i&&x.addEventListener("scroll",r,{passive:!0}),a&&x.addEventListener("resize",r)});const d=u&&s?d7(u,r):null;let h=-1,p=null;o&&(p=new ResizeObserver(x=>{let[b]=x;b&&b.target===u&&p&&(p.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var w;(w=p)==null||w.observe(t)})),r()}),u&&!c&&p.observe(u),p.observe(t));let g,m=c?Ss(e):null;c&&y();function y(){const x=Ss(e);m&&(x.x!==m.x||x.y!==m.y||x.width!==m.width||x.height!==m.height)&&r(),m=x,g=requestAnimationFrame(y)}return r(),()=>{var x;f.forEach(b=>{i&&b.removeEventListener("scroll",r),a&&b.removeEventListener("resize",r)}),d==null||d(),(x=p)==null||x.disconnect(),p=null,c&&cancelAnimationFrame(g)}}const h7=H9,p7=q9,m7=z9,g7=G9,v7=W9,I_=U9,y7=K9,x7=(e,t,r)=>{const n=new Map,i={platform:u7,...r},a={...i.platform,_c:n};return B9(e,t,{...i,platform:a})};var hp=typeof document<"u"?v.useLayoutEffect:v.useEffect;function rm(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,i;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(!rm(e[n],t[n]))return!1;return!0}if(i=Object.keys(e),r=i.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,i[n]))return!1;for(n=r;n--!==0;){const a=i[n];if(!(a==="_owner"&&e.$$typeof)&&!rm(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function JI(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function $_(e,t){const r=JI(e);return Math.round(t*r)/r}function ix(e){const t=v.useRef(e);return hp(()=>{t.current=e}),t}function b7(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:u}=e,[f,d]=v.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[h,p]=v.useState(n);rm(h,n)||p(n);const[g,m]=v.useState(null),[y,x]=v.useState(null),b=v.useCallback(A=>{A!==P.current&&(P.current=A,m(A))},[]),w=v.useCallback(A=>{A!==N.current&&(N.current=A,x(A))},[]),S=a||g,j=o||y,P=v.useRef(null),N=v.useRef(null),_=v.useRef(f),O=c!=null,k=ix(c),C=ix(i),E=ix(u),I=v.useCallback(()=>{if(!P.current||!N.current)return;const A={placement:t,strategy:r,middleware:h};C.current&&(A.platform=C.current),x7(P.current,N.current,A).then(D=>{const F={...D,isPositioned:E.current!==!1};T.current&&!rm(_.current,F)&&(_.current=F,Ms.flushSync(()=>{d(F)}))})},[h,t,r,C,E]);hp(()=>{u===!1&&_.current.isPositioned&&(_.current.isPositioned=!1,d(A=>({...A,isPositioned:!1})))},[u]);const T=v.useRef(!1);hp(()=>(T.current=!0,()=>{T.current=!1}),[]),hp(()=>{if(S&&(P.current=S),j&&(N.current=j),S&&j){if(k.current)return k.current(S,j,I);I()}},[S,j,I,k,O]);const $=v.useMemo(()=>({reference:P,floating:N,setReference:b,setFloating:w}),[b,w]),R=v.useMemo(()=>({reference:S,floating:j}),[S,j]),U=v.useMemo(()=>{const A={position:r,left:0,top:0};if(!R.floating)return A;const D=$_(R.floating,f.x),F=$_(R.floating,f.y);return s?{...A,transform:"translate("+D+"px, "+F+"px)",...JI(R.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:D,top:F}},[r,s,R.floating,f.x,f.y]);return v.useMemo(()=>({...f,update:I,refs:$,elements:R,floatingStyles:U}),[f,I,$,R,U])}const w7=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:i}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?I_({element:n.current,padding:i}).fn(r):{}:n?I_({element:n,padding:i}).fn(r):{}}}},S7=(e,t)=>({...h7(e),options:[e,t]}),j7=(e,t)=>({...p7(e),options:[e,t]}),P7=(e,t)=>({...y7(e),options:[e,t]}),N7=(e,t)=>({...m7(e),options:[e,t]}),_7=(e,t)=>({...g7(e),options:[e,t]}),O7=(e,t)=>({...v7(e),options:[e,t]}),E7=(e,t)=>({...w7(e),options:[e,t]});var k7="Arrow",e$=v.forwardRef((e,t)=>{const{children:r,width:n=10,height:i=5,...a}=e;return l.jsx(xe.svg,{...a,ref:t,width:n,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:l.jsx("polygon",{points:"0,0 30,0 15,10"})})});e$.displayName=k7;var C7=e$;function A7(e,t=[]){let r=[];function n(a,o){const s=v.createContext(o),c=r.length;r=[...r,o];function u(d){const{scope:h,children:p,...g}=d,m=(h==null?void 0:h[e][c])||s,y=v.useMemo(()=>g,Object.values(g));return l.jsx(m.Provider,{value:y,children:p})}function f(d,h){const p=(h==null?void 0:h[e][c])||s,g=v.useContext(p);if(g)return g;if(o!==void 0)return o;throw new Error(`\`${d}\` must be used within \`${a}\``)}return u.displayName=a+"Provider",[u,f]}const i=()=>{const a=r.map(o=>v.createContext(o));return function(s){const c=(s==null?void 0:s[e])||a;return v.useMemo(()=>({[`__scope${e}`]:{...s,[e]:c}}),[s,c])}};return i.scopeName=e,[n,T7(i,...t)]}function T7(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(a){const o=n.reduce((s,{useScope:c,scopeName:u})=>{const d=c(a)[`__scope${u}`];return{...s,...d}},{});return v.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return r.scopeName=t.scopeName,r}var zS="Popper",[t$,iv]=A7(zS),[M7,r$]=t$(zS),n$=e=>{const{__scopePopper:t,children:r}=e,[n,i]=v.useState(null);return l.jsx(M7,{scope:t,anchor:n,onAnchorChange:i,children:r})};n$.displayName=zS;var i$="PopperAnchor",a$=v.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...i}=e,a=r$(i$,r),o=v.useRef(null),s=Ae(t,o);return v.useEffect(()=>{a.onAnchorChange((n==null?void 0:n.current)||o.current)}),n?null:l.jsx(xe.div,{...i,ref:s})});a$.displayName=i$;var WS="PopperContent",[I7,$7]=t$(WS),o$=v.forwardRef((e,t)=>{var se,Me,X,le,fe,q;const{__scopePopper:r,side:n="bottom",sideOffset:i=0,align:a="center",alignOffset:o=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:f=0,sticky:d="partial",hideWhenDetached:h=!1,updatePositionStrategy:p="optimized",onPlaced:g,...m}=e,y=r$(WS,r),[x,b]=v.useState(null),w=Ae(t,Ue=>b(Ue)),[S,j]=v.useState(null),P=Ff(S),N=(P==null?void 0:P.width)??0,_=(P==null?void 0:P.height)??0,O=n+(a!=="center"?"-"+a:""),k=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},C=Array.isArray(u)?u:[u],E=C.length>0,I={padding:k,boundary:C.filter(D7),altBoundary:E},{refs:T,floatingStyles:$,placement:R,isPositioned:U,middlewareData:A}=b7({strategy:"fixed",placement:O,whileElementsMounted:(...Ue)=>f7(...Ue,{animationFrame:p==="always"}),elements:{reference:y.anchor},middleware:[S7({mainAxis:i+_,alignmentAxis:o}),c&&j7({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?P7():void 0,...I}),c&&N7({...I}),_7({...I,apply:({elements:Ue,rects:Oe,availableWidth:lt,availableHeight:it})=>{const{width:Mt,height:L}=Oe.reference,W=Ue.floating.style;W.setProperty("--radix-popper-available-width",`${lt}px`),W.setProperty("--radix-popper-available-height",`${it}px`),W.setProperty("--radix-popper-anchor-width",`${Mt}px`),W.setProperty("--radix-popper-anchor-height",`${L}px`)}}),S&&E7({element:S,padding:s}),L7({arrowWidth:N,arrowHeight:_}),h&&O7({strategy:"referenceHidden",...I})]}),[D,F]=c$(R),z=yt(g);Gt(()=>{U&&(z==null||z())},[U,z]);const H=(se=A.arrow)==null?void 0:se.x,ue=(Me=A.arrow)==null?void 0:Me.y,be=((X=A.arrow)==null?void 0:X.centerOffset)!==0,[Le,Be]=v.useState();return Gt(()=>{x&&Be(window.getComputedStyle(x).zIndex)},[x]),l.jsx("div",{ref:T.setFloating,"data-radix-popper-content-wrapper":"",style:{...$,transform:U?$.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Le,"--radix-popper-transform-origin":[(le=A.transformOrigin)==null?void 0:le.x,(fe=A.transformOrigin)==null?void 0:fe.y].join(" "),...((q=A.hide)==null?void 0:q.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:l.jsx(I7,{scope:r,placedSide:D,onArrowChange:j,arrowX:H,arrowY:ue,shouldHideArrow:be,children:l.jsx(xe.div,{"data-side":D,"data-align":F,...m,ref:w,style:{...m.style,animation:U?void 0:"none"}})})})});o$.displayName=WS;var s$="PopperArrow",R7={top:"bottom",right:"left",bottom:"top",left:"r
417ight"},l$=v.forwardRef(function(t,r){const{__scopePopper:n,...i}=t,a=$7(s$,n),o=R7[a.placedSide];return l.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:l.jsx(C7,{...i,ref:r,style:{...i.style,display:"block"}})})});l$.displayName=s$;function D7(e){return e!==null}var L7=e=>({name:"transformOrigin",options:e,fn(t){var y,x,b;const{placement:r,rects:n,middlewareData:i}=t,o=((y=i.arrow)==null?void 0:y.centerOffset)!==0,s=o?0:e.arrowWidth,c=o?0:e.arrowHeight,[u,f]=c$(r),d={start:"0%",center:"50%",end:"100%"}[f],h=(((x=i.arrow)==null?void 0:x.x)??0)+s/2,p=(((b=i.arrow)==null?void 0:b.y)??0)+c/2;let g="",m="";return u==="bottom"?(g=o?d:`${h}px`,m=`${-c}px`):u==="top"?(g=o?d:`${h}px`,m=`${n.floating.height+c}px`):u==="right"?(g=`${-c}px`,m=o?d:`${p}px`):u==="left"&&(g=`${n.floating.width+c}px`,m=o?d:`${p}px`),{data:{x:g,y:m}}}});function c$(e){const[t,r="center"]=e.split("-");return[t,r]}var u$=n$,d$=a$,f$=o$,h$=l$,F7=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Vs=new WeakMap,Ch=new WeakMap,Ah={},ax=0,p$=function(e){return e&&(e.host||p$(e.parentNode))},B7=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=p$(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})},U7=function(e,t,r,n){var i=B7(t,Array.isArray(e)?e:[e]);Ah[r]||(Ah[r]=new WeakMap);var a=Ah[r],o=[],s=new Set,c=new Set(i),u=function(d){!d||s.has(d)||(s.add(d),u(d.parentNode))};i.forEach(u);var f=function(d){!d||c.has(d)||Array.prototype.forEach.call(d.children,function(h){if(s.has(h))f(h);else try{var p=h.getAttribute(n),g=p!==null&&p!=="false",m=(Vs.get(h)||0)+1,y=(a.get(h)||0)+1;Vs.set(h,m),a.set(h,y),o.push(h),m===1&&g&&Ch.set(h,!0),y===1&&h.setAttribute(r,"true"),g||h.setAttribute(n,"true")}catch(x){console.error("aria-hidden: cannot operate on ",h,x)}})};return f(t),s.clear(),ax++,function(){o.forEach(function(d){var h=Vs.get(d)-1,p=a.get(d)-1;Vs.set(d,h),a.set(d,p),h||(Ch.has(d)||d.removeAttribute(n),Ch.delete(d)),p||d.removeAttribute(r)}),ax--,ax||(Vs=new WeakMap,Vs=new WeakMap,Ch=new WeakMap,Ah={})}},VS=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),i=F7(e);return i?(n.push.apply(n,Array.from(i.querySelectorAll("[aria-live]"))),U7(n,i,r,"aria-hidden")):function(){return null}},mi=function(){return mi=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},mi.apply(this,arguments)};function m$(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 i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}function z7(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,a;n<i;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))}var pp="right-scroll-bar-position",mp="width-before-scroll-bar",W7="with-scroll-bars-hidden",V7="--removed-body-scroll-bar-size";function ox(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function H7(e,t){var r=v.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var i=r.value;i!==n&&(r.value=n,r.callback(n,i))}}}})[0];return r.callback=t,r.facade}var q7=typeof window<"u"?v.useLayoutEffect:v.useEffect,R_=new WeakMap;function K7(e,t){var r=H7(null,function(n){return e.forEach(function(i){return ox(i,n)})});return q7(function(){var n=R_.get(r);if(n){var i=new Set(n),a=new Set(e),o=r.current;
vendor: 4,155 bytes, lines 417-432
417i.forEach(function(s){a.has(s)||ox(s,null)}),a.forEach(function(s){i.has(s)||ox(s,o)})}R_.set(r,e)},[e]),r}function G7(e){return e}function Y7(e,t){t===void 0&&(t=G7);var r=[],n=!1,i={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(a){var o=t(a,n);return r.push(o),function(){r=r.filter(function(s){return s!==o})}},assignSyncMedium:function(a){for(n=!0;r.length;){var o=r;r=[],o.forEach(a)}r={push:function(s){return a(s)},filter:function(){return r}}},assignMedium:function(a){n=!0;var o=[];if(r.length){var s=r;r=[],s.forEach(a),o=r}var c=function(){var f=o;o=[],f.forEach(a)},u=function(){return Promise.resolve().then(c)};u(),r={push:function(f){o.push(f),u()},filter:function(f){return o=o.filter(f),r}}}};return i}function X7(e){e===void 0&&(e={});var t=Y7(null);return t.options=mi({async:!0,ssr:!1},e),t}var g$=function(e){var t=e.sideCar,r=m$(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 v.createElement(n,mi({},r))};g$.isSideCarExport=!0;function Q7(e,t){return e.useMedium(t),g$}var v$=X7(),sx=function(){},av=v.forwardRef(function(e,t){var r=v.useRef(null),n=v.useState({onScrollCapture:sx,onWheelCapture:sx,onTouchMoveCapture:sx}),i=n[0],a=n[1],o=e.forwardProps,s=e.children,c=e.className,u=e.removeScrollBar,f=e.enabled,d=e.shards,h=e.sideCar,p=e.noIsolation,g=e.inert,m=e.allowPinchZoom,y=e.as,x=y===void 0?"div":y,b=e.gapMode,w=m$(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=h,j=K7([r,t]),P=mi(mi({},w),i);return v.createElement(v.Fragment,null,f&&v.createElement(S,{sideCar:v$,removeScrollBar:u,shards:d,noIsolation:p,inert:g,setCallbacks:a,allowPinchZoom:!!m,lockRef:r,gapMode:b}),o?v.cloneElement(v.Children.only(s),mi(mi({},P),{ref:j})):v.createElement(x,mi({},P,{className:c,ref:j}),s))});av.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};av.classNames={fullWidth:mp,zeroRight:pp};var Z7=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function J7(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Z7();return t&&e.setAttribute("nonce",t),e}function eH(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function tH(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var rH=function(){var e=0,t=null;return{add:function(r){e==0&&(t=J7())&&(eH(t,r),tH(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},nH=function(){var e=rH();return function(t,r){v.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},y$=function(){var e=nH(),t=function(r){var n=r.styles,i=r.dynamic;return e(n,i),null};return t},iH={left:0,top:0,right:0,gap:0},lx=function(e){return parseInt(e||"",10)||0},aH=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[lx(r),lx(n),lx(i)]},oH=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return iH;var t=aH(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])}},sH=y$(),Nl="data-scroll-locked",lH=function(e,t,r,n){var i=e.left,a=e.top,o=e.right,s=e.gap;return r===void 0&&(r="margin"),` 418 .`.concat(W7,` { 419 overflow: hidden `).concat(n,`; 420 padding-right: `).concat(s,"px ").concat(n,`; 421 } 422 body[`).concat(Nl,`] { 423 overflow: hidden `).concat(n,`; 424 overscroll-behavior: contain; 425 `).concat([t&&"position: relative ".concat(n,";"),r==="margin"&&` 426 padding-left: `.concat(i,`px; 427 padding-top: `).concat(a,`px; 428 padding-right: `).concat(o,`px; 429 margin-left:0; 430 margin-top:0; 431 margin-right: `).concat(s,"px ").concat(n,`; 432 `),r==="padding"&&"padding-right: ".concat(s,"px ").concat(n,";
432")].filter(Boolean).join(""),` 433 } 434 435 .`).concat(pp,` { 436 right: `).concat(s,"px ").concat(n,`; 437 } 438 439 .`).concat(mp,` { 440 margin-right: `).concat(s,"px ").concat(n,`; 441 } 442 443 .`).concat(pp," .").concat(pp,` { 444 right: 0 `).concat(n,`; 445 } 446 447 .`).concat(mp," .").concat(mp,` { 448 margin-right: 0 `).concat(n,`; 449 } 450 451 body[`).concat(Nl,`] { 452 `).concat(V7,": ").concat(s,`px; 453 } 454`)},D_=function(){var e=parseInt(document.body.getAttribute(Nl)||"0",10);return isFinite(e)?e:0},cH=function(){v.useEffect(function(){return document.body.setAttribute(Nl,(D_()+1).toString()),function(){var e=D_()-1;e<=0?document.body.removeAttribute(Nl):document.body.setAttribute(Nl,e.toString())}},[])},uH=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,i=n===void 0?"margin":n;cH();var a=v.useMemo(function(){return oH(i)},[i]);return v.createElement(sH,{styles:lH(a,!t,i,r?"":"!important")})},b0=!1;if(typeof window<"u")try{var Th=Object.defineProperty({},"passive",{get:function(){return b0=!0,!0}});window.addEventListener("test",Th,Th),window.removeEventListener("test",Th,Th)}catch{b0=!1}var Hs=b0?{passive:!1}:!1,dH=function(e){return e.tagName==="TEXTAREA"},x$=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!dH(e)&&r[t]==="visible")},fH=function(e){return x$(e,"overflowY")},hH=function(e){return x$(e,"overflowX")},L_=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var i=b$(e,n);if(i){var a=w$(e,n),o=a[1],s=a[2];if(o>s)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},pH=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},mH=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},b$=function(e,t){return e==="v"?fH(t):hH(t)},w$=function(e,t){return e==="v"?pH(t):mH(t)},gH=function(e,t){return e==="h"&&t==="rtl"?-1:1},vH=function(e,t,r,n,i){var a=gH(e,window.getComputedStyle(t).direction),o=a*n,s=r.target,c=t.contains(s),u=!1,f=o>0,d=0,h=0;do{var p=w$(e,s),g=p[0],m=p[1],y=p[2],x=m-y-a*g;(g||x)&&b$(e,s)&&(d+=x,h+=g),s instanceof ShadowRoot?s=s.host:s=s.parentNode}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(f&&(Math.abs(d)<1||!i)||!f&&(Math.abs(h)<1||!i))&&(u=!0),u},Mh=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},F_=function(e){return[e.deltaX,e.deltaY]},B_=function(e){return e&&"current"in e?e.current:e},yH=function(e,t){return e[0]===t[0]&&e[1]===t[1]},xH=function(e){return` 455 .block-interactivity-`.concat(e,` {pointer-events: none;} 456 .allow-interactivity-`).concat(e,` {pointer-events: all;} 457`)},bH=0,qs=[];function wH(e){var t=v.useRef([]),r=v.useRef([0,0]),n=v.useRef(),i=v.useState(bH++)[0],a=v.useState(y$)[0],o=v.useRef(e);v.useEffect(function(){o.current=e},[e]),v.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var m=z7([e.lockRef.current],(e.shards||[]).map(B_),!0).filter(Boolean);return m.forEach(function(y){return y.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),m.forEach(function(y){return y.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var s=v.useCallback(function(m,y){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!o.current.allowPinchZoom;var x=Mh(m),b=r.current,w="deltaX"in m?m.deltaX:b[0]-x[0],S="deltaY"in m?m.deltaY:b[1]-x[1],j,P=m.target,N=Math.abs(w)>Math.abs(S)?"h":"v";if("touches"in m&&N==="h"&&P.type==="range")return!1;var _=L_(N,P);if(!_)return!0;if(_?j=N:(j=N==="v"?"h":"v",_=L_(N,P)),!_)return!1;if(!n.current&&"changedTouches"in m&&(w||S)&&(n.current=j),!j)return!0;var O=n.current||j;return vH(O,y,m,O==="h"?w:S,!0)},[]),c=v.useCallback(function(m){var y=m;if(!(!qs.length||qs[qs.length-1]!==a)){var x="deltaY"in y?F_(y):Mh(y),b=t.current.filter(function(j){return j.name===y.type&&(j.target===y.target||y.target===j.shadowParent)&&yH(j.delta,x)})[0];if(b&&b.should){y.cancelable&&y.preventDefault();return}
vendor: 4,190 bytes, line 457
457if(!b){var w=(o.current.shards||[]).map(B_).filter(Boolean).filter(function(j){return j.contains(y.target)}),S=w.length>0?s(y,w[0]):!o.current.noIsolation;S&&y.cancelable&&y.preventDefault()}}},[]),u=v.useCallback(function(m,y,x,b){var w={name:m,delta:y,target:x,should:b,shadowParent:SH(x)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(S){return S!==w})},1)},[]),f=v.useCallback(function(m){r.current=Mh(m),n.current=void 0},[]),d=v.useCallback(function(m){u(m.type,F_(m),m.target,s(m,e.lockRef.current))},[]),h=v.useCallback(function(m){u(m.type,Mh(m),m.target,s(m,e.lockRef.current))},[]);v.useEffect(function(){return qs.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:h}),document.addEventListener("wheel",c,Hs),document.addEventListener("touchmove",c,Hs),document.addEventListener("touchstart",f,Hs),function(){qs=qs.filter(function(m){return m!==a}),document.removeEventListener("wheel",c,Hs),document.removeEventListener("touchmove",c,Hs),document.removeEventListener("touchstart",f,Hs)}},[]);var p=e.removeScrollBar,g=e.inert;return v.createElement(v.Fragment,null,g?v.createElement(a,{styles:xH(i)}):null,p?v.createElement(uH,{gapMode:e.gapMode}):null)}function SH(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const jH=Q7(v$,wH);var ov=v.forwardRef(function(e,t){return v.createElement(av,mi({},e,{ref:t,sideCar:jH}))});ov.classNames=av.classNames;var w0=["Enter"," "],PH=["ArrowDown","PageUp","Home"],S$=["ArrowUp","PageDown","End"],NH=[...PH,...S$],_H={ltr:[...w0,"ArrowRight"],rtl:[...w0,"ArrowLeft"]},OH={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Uf="Menu",[Md,EH,kH]=If(Uf),[Ls,j$]=cn(Uf,[kH,iv,Lc]),sv=iv(),P$=Lc(),[CH,Fs]=Ls(Uf),[AH,zf]=Ls(Uf),N$=e=>{const{__scopeMenu:t,open:r=!1,children:n,dir:i,onOpenChange:a,modal:o=!0}=e,s=sv(t),[c,u]=v.useState(null),f=v.useRef(!1),d=yt(a),h=Ds(i);return v.useEffect(()=>{const p=()=>{f.current=!0,document.addEventListener("pointerdown",g,{capture:!0,once:!0}),document.addEventListener("pointermove",g,{capture:!0,once:!0})},g=()=>f.current=!1;return document.addEventListener("keydown",p,{capture:!0}),()=>{document.removeEventListener("keydown",p,{capture:!0}),document.removeEventListener("pointerdown",g,{capture:!0}),document.removeEventListener("pointermove",g,{capture:!0})}},[]),l.jsx(u$,{...s,children:l.jsx(CH,{scope:t,open:r,onOpenChange:d,content:c,onContentChange:u,children:l.jsx(AH,{scope:t,onClose:v.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:f,dir:h,modal:o,children:n})})})};N$.displayName=Uf;var TH="MenuAnchor",HS=v.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e,i=sv(r);return l.jsx(d$,{...i,...n,ref:t})});HS.displayName=TH;var qS="MenuPortal",[MH,_$]=Ls(qS,{forceMount:void 0}),O$=e=>{const{__scopeMenu:t,forceMount:r,children:n,container:i}=e,a=Fs(qS,t);return l.jsx(MH,{scope:t,forceMount:r,children:l.jsx(br,{present:r||a.open,children:l.jsx(Rf,{asChild:!0,container:i,children:n})})})};O$.displayName=qS;var jn="MenuContent",[IH,KS]=Ls(jn),E$=v.forwardRef((e,t)=>{const r=_$(jn,e.__scopeMenu),{forceMount:n=r.forceMount,...i}=e,a=Fs(jn,e.__scopeMenu),o=zf(jn,e.__scopeMenu);return l.jsx(Md.Provider,{scope:e.__scopeMenu,children:l.jsx(br,{present:n||a.open,children:l.jsx(Md.Slot,{scope:e.__scopeMenu,children:o.modal?l.jsx($H,{...i,ref:t}):l.jsx(RH,{...i,ref:t})})})})}),$H=v.forwardRef((e,t)=>{const r=Fs(jn,e.__scopeMenu),n=v.useRef(null),i=Ae(t,n);return v.useEffect(()=>{const a=n.current;if(a)return VS(a)},[]),l.jsx(GS,{...e,ref:i,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:ee(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})}),RH=v.forwardRef((e,t)=>{const r=Fs(jn,e.__scopeMenu);return l.jsx(GS,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})}),GS=v.forwardRef((e,t)=>{const{__scopeMenu:r,loop:n=!1,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:o,disableOutsidePointerEvents:s,onEntryFocus:c,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:d,onInteractOutside:h,onDismiss:p,disableOutsideScroll:g,...m}
vendor: 12,848 bytes, line 457
457=e,y=Fs(jn,r),x=zf(jn,r),b=sv(r),w=P$(r),S=EH(r),[j,P]=v.useState(null),N=v.useRef(null),_=Ae(t,N,y.onContentChange),O=v.useRef(0),k=v.useRef(""),C=v.useRef(0),E=v.useRef(null),I=v.useRef("right"),T=v.useRef(0),$=g?ov:v.Fragment,R=g?{as:ha,allowPinchZoom:!0}:void 0,U=D=>{var se,Me;const F=k.current+D,z=S().filter(X=>!X.disabled),H=document.activeElement,ue=(se=z.find(X=>X.ref.current===H))==null?void 0:se.textValue,be=z.map(X=>X.textValue),Le=GH(be,F,ue),Be=(Me=z.find(X=>X.textValue===Le))==null?void 0:Me.ref.current;(function X(le){k.current=le,window.clearTimeout(O.current),le!==""&&(O.current=window.setTimeout(()=>X(""),1e3))})(F),Be&&setTimeout(()=>Be.focus())};v.useEffect(()=>()=>window.clearTimeout(O.current),[]),$S();const A=v.useCallback(D=>{var z,H;return I.current===((z=E.current)==null?void 0:z.side)&&XH(D,(H=E.current)==null?void 0:H.area)},[]);return l.jsx(IH,{scope:r,searchRef:k,onItemEnter:v.useCallback(D=>{A(D)&&D.preventDefault()},[A]),onItemLeave:v.useCallback(D=>{var F;A(D)||((F=N.current)==null||F.focus(),P(null))},[A]),onTriggerLeave:v.useCallback(D=>{A(D)&&D.preventDefault()},[A]),pointerGraceTimerRef:C,onPointerGraceIntentChange:v.useCallback(D=>{E.current=D},[]),children:l.jsx($,{...R,children:l.jsx(ev,{asChild:!0,trapped:i,onMountAutoFocus:ee(a,D=>{var F;D.preventDefault(),(F=N.current)==null||F.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:l.jsx($f,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:d,onInteractOutside:h,onDismiss:p,children:l.jsx(CS,{asChild:!0,...w,dir:x.dir,orientation:"vertical",loop:n,currentTabStopId:j,onCurrentTabStopIdChange:P,onEntryFocus:ee(c,D=>{x.isUsingKeyboardRef.current||D.preventDefault()}),preventScrollOnEntryFocus:!0,children:l.jsx(f$,{role:"menu","aria-orientation":"vertical","data-state":V$(y.open),"data-radix-menu-content":"",dir:x.dir,...b,...m,ref:_,style:{outline:"none",...m.style},onKeyDown:ee(m.onKeyDown,D=>{const z=D.target.closest("[data-radix-menu-content]")===D.currentTarget,H=D.ctrlKey||D.altKey||D.metaKey,ue=D.key.length===1;z&&(D.key==="Tab"&&D.preventDefault(),!H&&ue&&U(D.key));const be=N.current;if(D.target!==be||!NH.includes(D.key))return;D.preventDefault();const Be=S().filter(se=>!se.disabled).map(se=>se.ref.current);S$.includes(D.key)&&Be.reverse(),qH(Be)}),onBlur:ee(e.onBlur,D=>{D.currentTarget.contains(D.target)||(window.clearTimeout(O.current),k.current="")}),onPointerMove:ee(e.onPointerMove,Id(D=>{const F=D.target,z=T.current!==D.clientX;if(D.currentTarget.contains(F)&&z){const H=D.clientX>T.current?"right":"left";I.current=H,T.current=D.clientX}}))})})})})})})});E$.displayName=jn;var DH="MenuGroup",YS=v.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return l.jsx(xe.div,{role:"group",...n,ref:t})});YS.displayName=DH;var LH="MenuLabel",k$=v.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return l.jsx(xe.div,{...n,ref:t})});k$.displayName=LH;var nm="MenuItem",U_="menu.itemSelect",lv=v.forwardRef((e,t)=>{const{disabled:r=!1,onSelect:n,...i}=e,a=v.useRef(null),o=zf(nm,e.__scopeMenu),s=KS(nm,e.__scopeMenu),c=Ae(t,a),u=v.useRef(!1),f=()=>{const d=a.current;if(!r&&d){const h=new CustomEvent(U_,{bubbles:!0,cancelable:!0});d.addEventListener(U_,p=>n==null?void 0:n(p),{once:!0}),vS(d,h),h.defaultPrevented?u.current=!1:o.onClose()}};return l.jsx(C$,{...i,ref:c,disabled:r,onClick:ee(e.onClick,f),onPointerDown:d=>{var h;(h=e.onPointerDown)==null||h.call(e,d),u.current=!0},onPointerUp:ee(e.onPointerUp,d=>{var h;u.current||(h=d.currentTarget)==null||h.click()}),onKeyDown:ee(e.onKeyDown,d=>{const h=s.searchRef.current!=="";r||h&&d.key===" "||w0.includes(d.key)&&(d.currentTarget.click(),d.preventDefault())})})});lv.displayName=nm;var C$=v.forwardRef((e,t)=>{const{__scopeMenu:r,disabled:n=!1,textValue:i,...a}=e,o=KS(nm,r),s=P$(r),c=v.useRef(null),u=Ae(t,c),[f,d]=v.useState(!1),[h,p]=v.useState("");return v.useEffect(()=>{const g=c.current;g&&p((g.textContent??"").trim())},[a.children]),l.jsx(Md.ItemSlot,{scope:r,disabled:n,textValue:i??h,children:l.jsx(AS,{asChild:!0,...s,focusable:!n,children:l.jsx(xe.div,{role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":n||void 0,"data-disabled":n?"":void 0,...a,ref:u,onPointerMove:ee(e.onPointerMove,Id(g=>{n?o.onItemLeave(g):(o.onItemEnter(g),g.defaultPrevented||g.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:ee(e.onPointerLeave,Id(g=>o.onItemLeave(g))),onFocus:ee(e.onFocus,()=>d(!0)),onBlur:ee(e.onBlur,()=>d(!1))})})})}),FH="MenuCheckboxItem",A$=v.forwardRef((e,t)=>{const{checked:r=!1,onCheckedChange:n,...i}=e;return l.jsx(R$,{scope:e.__scopeMenu,checked:r,children:l.jsx(lv,{role:"menuitemcheckbox","aria-checked":im(r)?"mixed":r,...i,ref:t,"data-state":QS(r),onSelect:ee(i.onSelect,()=>n==null?void 0:n(im(r)?!0:!r),{checkForDefaultPrevented:!1})})})});A$.displayName=FH;var T$="MenuRadioGroup",[BH,UH]=Ls(T$,{value:void 0,onValueChange:()=>{}}),M$=v.forwardRef((e,t)=>{const{value:r,onValueChange:n,...i}=e,a=yt(n);return l.jsx(BH,{scope:e.__scopeMenu,value:r,onValueChange:a,children:l.jsx(YS,{...i,ref:t})})});M$.displayName=T$;var I$="MenuRadioItem",$$=v.forwardRef((e,t)=>{const{value:r,...n}=e,i=UH(I$,e.__scopeMenu),a=r===i.value;return l.jsx(R$,{scope:e.__scopeMenu,checked:a,children:l.jsx(lv,{role:"menuitemradio","aria-checked":a,...n,ref:t,"data-state":QS(a),onSelect:ee(n.onSelect,()=>{var o;return(o=i.onValueChange)==null?void 0:o.call(i,r)},{checkForDefaultPrevented:!1})})})});$$.displayName=I$;var XS="MenuItemIndicator",[R$,zH]=Ls(XS,{checked:!1}),D$=v.forwardRef((e,t)=>{const{__scopeMenu:r,forceMount:n,...i}=e,a=zH(XS,r);return l.jsx(br,{present:n||im(a.checked)||a.checked===!0,children:l.jsx(xe.span,{...i,ref:t,"data-state":QS(a.checked)})})});D$.displayName=XS;var WH="MenuSeparator",L$=v.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return l.jsx(xe.div,{role:"separator","aria-orientation":"horizontal",...n,ref:t})});L$.displayName=WH;var VH="MenuArrow",F$=v.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e,i=sv(r);return l.jsx(h$,{...i,...n,ref:t})});F$.displayName=VH;var HH="MenuSub",[FPe,B$]=Ls(HH),Mu="MenuSubTrigger",U$=v.forwardRef((e,t)=>{const r=Fs(Mu,e.__scopeMenu),n=zf(Mu,e.__scopeMenu),i=B$(Mu,e.__scopeMenu),a=KS(Mu,e.__scopeMenu),o=v.useRef(null),{pointerGraceTimerRef:s,onPointerGraceIntentChange:c}=a,u={__scopeMenu:e.__scopeMenu},f=v.useCallback(()=>{o.current&&window.clearTimeout(o.current),o.current=null},[]);return v.useEffect(()=>f,[f]),v.useEffect(()=>{const d=s.current;return()=>{window.clearTimeout(d),c(null)}},[s,c]),l.jsx(HS,{asChild:!0,...u,children:l.jsx(C$,{id:i.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":i.contentId,"data-state":V$(r.open),...e,ref:Kg(t,i.onTriggerChange),onClick:d=>{var h;(h=e.onClick)==null||h.call(e,d),!(e.disabled||d.defaultPrevented)&&(d.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:ee(e.onPointerMove,Id(d=>{a.onItemEnter(d),!d.defaultPrevented&&!e.disabled&&!r.open&&!o.current&&(a.onPointerGraceIntentChange(null),o.current=window.setTimeout(()=>{r.onOpenChange(!0),f()},100))})),onPointerLeave:ee(e.onPointerLeave,Id(d=>{var p,g;f();const h=(p=r.content)==null?void 0:p.getBoundingClientRect();if(h){const m=(g=r.content)==null?void 0:g.dataset.side,y=m==="right",x=y?-5:5,b=h[y?"left":"right"],w=h[y?"right":"left"];a.onPointerGraceIntentChange({area:[{x:d.clientX+x,y:d.clientY},{x:b,y:h.top},{x:w,y:h.top},{x:w,y:h.bottom},{x:b,y:h.bottom}],side:m}),window.clearTimeout(s.current),s.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(d),d.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:ee(e.onKeyDown,d=>{var p;const h=a.searchRef.current!=="";e.disabled||h&&d.key===" "||_H[n.dir].includes(d.key)&&(r.onOpenChange(!0),(p=r.content)==null||p.focus(),d.preventDefault())})})})});U$.displayName=Mu;var z$="MenuSubContent",W$=v.forwardRef((e,t)=>{const r=_$(jn,e.__scopeMenu),{forceMount:n=r.forceMount,...i}=e,a=Fs(jn,e.__scopeMenu),o=zf(jn,e.__scopeMenu),s=B$(z$,e.__scopeMenu),c=v.useRef(null),u=Ae(t,c);return l.jsx(Md.Provider,{scope:e.__scopeMenu,children:l.jsx(br,{present:n||a.open,children:l.jsx(Md.Slot,{scope:e.__scopeMenu,children:l.jsx(GS,{id:s.contentId,"aria-labelledby":s.triggerId,...i,ref:u,align:"start",side:o.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:f=>{var d;o.isUsingKeyboardRef.current&&((d=c.current)==null||d.focus()),f.preventDefault()},onCloseAutoFocus:f=>f.preventDefault(),onFocusOutside:ee(e.onFocusOutside,f=>{f.target!==s.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:ee(e.onEscapeKeyDown,f=>{o.onClose(),f.preventDefault()}),onKeyDown:ee(e.onKeyDown,f=>{var p;const d=f.currentTarget.contains(f.target),h=OH[o.dir].includes(f.key);d&&h&&(a.onOpenChange(!1),(p=s.trigger)==null||p.focus(),f.preventDefault())})})})})})});W$.displayName=z$;function V$(e){return e?"open":"closed"}function im(e){return e==="indeterminate"}function QS(e){return im(e)?"indeterminate":e?"checked":"unchecked"}function qH(e){const t=document.activeElement;for(const r of e)if(r===t||(r.focus(),document.activeElement!==t))return}function KH(e,t){return e.map((r,n)=>e[(t+n)%e.length])}function GH(e,t,r){const i=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,a=r?e.indexOf(r):-1;let o=KH(e,Math.max(a,0));i.length===1&&(o=o.filter(u=>u!==r));const c=o.find(u=>u.toLowerCase().startsWith(i.toLowerCase()));return c!==r?c:void 0}function YH(e,t){const{x:r,y:n}=e;let i=!1;for(let a=0,o=t.length-1;a<t.length;o=a++){const s=t[a].x,c=t[a].y,u=t[o].x,f=t[o].y;c>n!=f>n&&r<(u-s)*(n-c)/(f-c)+s&&(i=!i)}return i}function XH(e,t){if(!t)return!1;const r={x:e.clientX,y:e.clientY};return YH(r,t)}function Id(e){return t=>t.pointerType==="mouse"?e(t):void 0}var QH=N$,ZH=HS,JH=O$,eq=E$,tq=YS,rq=k$,nq=lv,iq=A$,aq=M$,oq=$$,sq=D$,lq=L$,cq=F$,uq=U$,dq=W$,ZS="DropdownMenu",[fq,BPe]=cn(ZS,[j$]),Ir=j$(),[hq,H$]=fq(ZS),q$=e=>{const{__scopeDropdownMenu:t,children:r,dir:n,open:i,defaultOpen:a,onOpenChange:o,modal:s=!0}=e,c=Ir(t),u=v.useRef(null),[f=!1,d]=Jn({prop:i,defaultProp:a,onChange:o});return l.jsx(hq,{scope:t,triggerId:bi(),triggerRef:u,contentId:bi(),open:f,onOpenChange:d,onOpenToggle:v.useCallback(()=>d(h=>!h),[d]),modal:s,children:l.jsx(QH,{...c,open:f,onOpenChange:d,dir:n,modal:s,children:r})})};q$.displayName=ZS;var K$="DropdownMenuTrigger",G$=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,disabled:n=!1,...i}=e,a=H$(K$,r),o=Ir(r);return l.jsx(ZH,{asChild:!0,...o,children:l.jsx(xe.button,{type:"button",id:a.triggerId,"aria-haspopup":"menu","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?"open":"closed","data-disabled":n?"":void 0,disabled:n,...i,ref:Kg(t,a.triggerRef),onPointerDown:ee(e.onPointerDown,s=>{!n&&s.button===0&&s.ctrlKey===!1&&(a.onOpenToggle(),a.open||s.preventDefault())}),onKeyDown:ee(e.onKeyDown,s=>{n||(["Enter"," "].includes(s.key)&&a.onOpenToggle(),s.key==="ArrowDown"&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(s.key)&&s.preventDefault())})})})});G$.displayName=K$;var pq="DropdownMenuPortal",Y$=e=>{const{__scopeDropdownMenu:t,...r}=e,n=Ir(t);return l.jsx(JH,{...n,...r})};Y$.displayName=pq;var X$="DropdownMenuContent",Q$=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,i=H$(X$,r),a=Ir(r),o=v.useRef(!1);return l.jsx(eq,{id:i.contentId,"aria-labelledby":i.triggerId,...a,...n,ref:t,onCloseAutoFocus:ee(e.onCloseAutoFocus,s=>{var c;o.current||(c=i.triggerRef.current)==null||c.focus(),o.current=!1,s.preventDefault()}),onInteractOutside:ee(e.onInteractOutside,s=>{const c=s.detail.originalEvent,u=c.button===0&&c.ctrlKey===!0,f=c.button===2||u;(!i.modal||f)&&(o.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Q$.displayName=X$;var mq="DropdownMenuGroup",gq=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,i=Ir(r);return l.jsx(tq,{...i,...n,ref:t})});gq.displayName=mq;var vq="DropdownMenuLabel",Z$=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,i=Ir(r);return l.jsx(rq,{...i,...n,ref:t})});Z$.displayName=vq;var yq="DropdownMenuItem",J$=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,i=Ir(r);return l.jsx(nq,{...i,...n,ref:t})});J$.displayName=yq;var xq="DropdownMenuCheckboxItem",eR=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,i=Ir(r);return l.jsx(iq,{...i,...n,ref:t})});eR.displayName=xq;var bq="DropdownMenuRadioGroup",wq=v.forwardRef((e,t)=>
457{const{__scopeDropdownMenu:r,...n}=e,i=Ir(r);return l.jsx(aq,{...i,...n,ref:t})});wq.displayName=bq;var Sq="DropdownMenuRadioItem",tR=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,i=Ir(r);return l.jsx(oq,{...i,...n,ref:t})});tR.displayName=Sq;var jq="DropdownMenuItemIndicator",rR=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,i=Ir(r);return l.jsx(sq,{...i,...n,ref:t})});rR.displayName=jq;var Pq="DropdownMenuSeparator",nR=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,i=Ir(r);return l.jsx(lq,{...i,...n,ref:t})});nR.displayName=Pq;var Nq="DropdownMenuArrow",_q=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,i=Ir(r);return l.jsx(cq,{...i,...n,ref:t})});_q.displayName=Nq;var Oq="DropdownMenuSubTrigger",iR=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,i=Ir(r);return l.jsx(uq,{...i,...n,ref:t})});iR.displayName=Oq;var Eq="DropdownMenuSubContent",aR=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,i=Ir(r);return l.jsx(dq,{...i,...n,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});aR.displayName=Eq;var kq=q$,Cq=G$,Aq=Y$,oR=Q$,sR=Z$,lR=J$,cR=eR,uR=tR,dR=rR,fR=nR,hR=iR,pR=aR;const Tq=kq,Mq=Cq,Iq=v.forwardRef(({className:e,inset:t,children:r,...n},i)=>l.jsxs(hR,{ref:i,className:G("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",t&&"pl-8",e),...n,children:[r,l.jsx(a0,{className:"ml-auto h-4 w-4"})]}));Iq.displayName=hR.displayName;const $q=v.forwardRef(({className:e,...t},r)=>l.jsx(pR,{ref:r,className:G("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));$q.displayName=pR.displayName;const mR=v.forwardRef(({className:e,sideOffset:t=4,...r},n)=>l.jsx(Aq,{children:l.jsx(oR,{ref:n,sideOffset:t,className:G("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r})}));mR.displayName=oR.displayName;const gp=v.forwardRef(({className:e,inset:t,...r},n)=>l.jsx(lR,{ref:n,className:G("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-8",e),...r}));gp.displayName=lR.displayName;const Rq=v.forwardRef(({className:e,children:t,checked:r,...n},i)=>l.jsxs(cR,{ref:i,className:G("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:r,...n,children:[l.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:l.jsx(dR,{children:l.jsx(ra,{className:"h-4 w-4"})})}),t]}));Rq.displayName=cR.displayName;const Dq=v.forwardRef(({className:e,children:t,...r},n)=>l.jsxs(uR,{ref:n,className:G("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...r,children:[l.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:l.jsx(dR,{children:l.jsx(UM,{className:"h-2 w-2 fill-current"})})}),t]}));Dq.displayName=uR.displayName;const Lq=v.forwardRef(({className:e,inset:t,...r},n)=>l.jsx(sR,{ref:n,className:G("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...r}));Lq.displayName=sR.displayName;const Fq=v.forwardRef(({className:e,...t},r)=>l.jsx(fR,{ref:r,className:G("-mx-1 my-1 h-px bg-muted",e),...t}));Fq.displayName=fR.displayName;const un=({user:e})=>{const t=Ic();return l.jsxs("header",{className:"fixed top-0 left-0 right-0 z-50 glass-panel px-6 py-3 flex items-center justify-between",children:[l.jsxs($t,{to:"/dashboard",className:"flex items-center space-x-2",children:[l.jsx("div",{className:"w-10 h-10 flex items-center justify-center rounded-xl overflow-hidden",children:l.jsx("img",{src:"/lovable-uploads/9d14be83-5efa-4dc0-8344-78c6b1195429.png",alt:"Echo.AI Logo",className:"w-full h-full object-cover"})}),l.jsx("span",{className:"font-display text-xl font-semibold text-foreground",children:"Echo.AI"})]}),l.jsx("div",{className:"flex items-center space-x-4",children:e?l.jsxs(Tq,{children:[l.jsx(Mq,{asChild:!0,children:l.jsx(Y,{variant:"ghost",className:"rounded-full p-0 w-10 h-10",children:l.jsxs(kd,{children:[l.jsx(Jg,{src:e.avatar,alt:e.name}),l.jsx(Cd,{className:"bg-primary text-white",children:e.name.split(" ").map(r=>r[0]).join("")})]})})}),l.jsxs(mR,{align:"end",className:"w-56 glass-panel",children:[l.jsxs("div",{className:"p-2 border-b border-border",children:[l.jsx("p",{className:"font-medium",children:e.name}),l.jsx("p",{className:"text-sm text-muted-foreground",children:e.email})]}),l.jsxs(gp,{onClick:()=>t("/profile"),className:"cursor-pointer",children:[l.jsx(zi,{className:"mr-2 h-4 w-4"}),l.jsx("span",{children:"Profile"})]}),l.jsxs(gp,{onClick:()=>t("/settings"),className:"cursor-pointer",children:[l.jsx(KM,{className:"mr-2 h-4 w-4"}),l.jsx("span",{children:"Settings"})]}),l.jsxs(gp,{onClick:()=>
457t("/login"),className:"cursor-pointer text-destructive",children:[l.jsx(MW,{className:"mr-2 h-4 w-4"}),l.jsx("span",{children:"Log out"})]})]})]}):l.jsxs("div",{className:"flex items-center space-x-2",children:[l.jsx(Y,{variant:"ghost",onClick:()=>t("/login"),children:"Log in"}),l.jsx(Y,{onClick:()=>t("/register"),className:"button-shine",children:"Sign up"})]})})]})},cx=768;function Uc(){const[e,t]=v.useState(void 0);return v.useEffect(()=>{const r=window.matchMedia(`(max-width: ${cx-1}px)`),n=()=>{t(window.innerWidth<cx)};return r.addEventListener("change",n),t(window.innerWidth<cx),()=>r.removeEventListener("change",n)},[]),!!e}function $d(e,[t,r]){return Math.min(r,Math.max(t,e))}function Bq(e,t){return v.useReducer((r,n)=>t[r][n]??r,e)}var JS="ScrollArea",[gR,UPe]=cn(JS),[Uq,Tn]=gR(JS),vR=v.forwardRef((e,t)=>{const{__scopeScrollArea:r,type:n="hover",dir:i,scrollHideDelay:a=600,...o}=e,[s,c]=v.useState(null),[u,f]=v.useState(null),[d,h]=v.useState(null),[p,g]=v.useState(null),[m,y]=v.useState(null),[x,b]=v.useState(0),[w,S]=v.useState(0),[j,P]=v.useState(!1),[N,_]=v.useState(!1),O=Ae(t,C=>c(C)),k=Ds(i);return l.jsx(Uq,{scope:r,type:n,dir:k,scrollHideDelay:a,scrollArea:s,viewport:u,onViewportChange:f,content:d,onContentChange:h,scrollbarX:p,onScrollbarXChange:g,scrollbarXEnabled:j,onScrollbarXEnabledChange:P,scrollbarY:m,onScrollbarYChange:y,scrollbarYEnabled:N,onScrollbarYEnabledChange:_,onCornerWidthChange:b,onCornerHeightChange:S,children:l.jsx(xe.div,{dir:k,...o,ref:O,style:{position:"relative","--radix-scroll-area-corner-width":x+"px","--radix-scroll-area-corner-height":w+"px",...e.style}})})});vR.displayName=JS;var yR="ScrollAreaViewport",xR=v.forwardRef((e,t)=>{const{__scopeScrollArea:r,children:n,asChild:i,nonce:a,...o}=e,s=Tn(yR,r),c=v.useRef(null),u=Ae(t,c,s.onViewportChange);return l.jsxs(l.Fragment,{children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:` 458[data-radix-scroll-area-viewport] { 459 scrollbar-width: none; 460 -ms-overflow-style: none; 461 -webkit-overflow-scrolling: touch; 462} 463[data-radix-scroll-area-viewport]::-webkit-scrollbar {
464 display: none; 465} 466:where([data-radix-scroll-area-viewport]) { 467 display: flex; 468 flex-direction: column; 469 align-items: stretch; 470} 471:where([data-radix-scroll-area-content]) { 472 flex-grow: 1; 473} 474`},nonce:a}),l.jsx(xe.div,{"data-radix-scroll-area-viewport":"",...o,asChild:i,ref:u,style:{overflowX:s.scrollbarXEnabled?"scroll":"hidden",overflowY:s.scrollbarYEnabled?"scroll":"hidden",...e.style},children:Qq({asChild:i,children:n},f=>l.jsx("div",{"data-radix-scroll-area-content":"",ref:s.onContentChange,style:{minWidth:s.scrollbarXEnabled?"fit-content":void 0},children:f}))})]})});xR.displayName=yR;var Ti="ScrollAreaScrollbar",ej=v.forwardRef((e,t)=>{const{forceMount:r,...n}=e,i=Tn(Ti,e.__scopeScrollArea),{onScrollbarXEnabledChange:a,onScrollbarYEnabledChange:o}=i,s=e.orientation==="horizontal";return v.useEffect(()=>(s?a(!0):o(!0),()=>{s?a(!1):o(!1)}),[s,a,o]),i.type==="hover"?l.jsx(zq,{...n,ref:t,forceMount:r}):i.type==="scroll"?l.jsx(Wq,{...n,ref:t,forceMount:r}):i.type==="auto"?l.jsx(bR,{...n,ref:t,forceMount:r}):i.type==="always"?l.jsx(tj,{...n,ref:t}):null});ej.displayName=Ti;var zq=v.forwardRef((e,t)=>{const{forceMount:r,...n}=e,i=Tn(Ti,e.__scopeScrollArea),[a,o]=v.useState(!1);return v.useEffect(()=>{const s=i.scrollArea;let c=0;if(s){const u=()=>{window.clearTimeout(c),o(!0)},f=()=>{c=window.setTimeout(()=>o(!1),i.scrollHideDelay)};return s.addEventListener("pointerenter",u),s.addEventListener("pointerleave",f),()=>{window.clearTimeout(c),s.removeEventListener("pointerenter",u),s.removeEventListener("pointerleave",f)}}},[i.scrollArea,i.scrollHideDelay]),l.jsx(br,{present:r||a,children:l.jsx(bR,{"data-state":a?"visible":"hidden",...n,ref:t})})}),Wq=v.forwardRef((e,t)=>{const{forceMount:r,...n}=e,i=Tn(Ti,e.__scopeScrollArea),a=e.orientation==="horizontal",o=uv(()=>c("SCROLL_END"),100),[s,c]=Bq("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return v.useEffect(()=>{if(s==="idle"){const u=window.setTimeout(()=>c("HIDE"),i.scrollHideDelay);return()=>window.clearTimeout(u)}},[s,i.scrollHideDelay,c]),v.useEffect(()=>{const u=i.viewport,f=a?"scrollLeft":"scrollTop";if(u){let d=u[f];const h=()=>{const p=u[f];d!==p&&(c("SCROLL"),o()),d=p};return u.addEventListener("scroll",h),()=>u.removeEventListener("scroll",h)}},[i.viewport,a,c,o]),l.jsx(br,{present:r||s!=="hidden",children:l.jsx(tj,{"data-state":s==="hidden"?"hidden":"visible",...n,ref:t,onPointerEnter:ee(e.onPointerEnter,()=>c("POINTER_ENTER")),onPointerLeave:ee(e.onPointerLeave,()=>c("POINTER_LEAVE"))})})}),bR=v.forwardRef((e,t)=>{const r=Tn(Ti,e.__scopeScrollArea),{forceMount:n,...i}=e,[a,o]=v.useState(!1),s=e.orientation==="horizontal",c=uv(()=>{if(r.viewport){const u=r.viewport.offsetWidth<r.viewport.scrollWidth,f=r.viewport.offsetHeight<r.viewport.scrollHeight;o(s?u:f)}},10);return Zl(r.viewport,c),Zl(r.content,c),l.jsx(br,{present:n||a,children:l.jsx(tj,{"data-state":a?"visible":"hidden",...i,ref:t})})}),tj=v.forwardRef((e,t)=>{const{orientation:r="vertical",...n}=e,i=Tn(Ti,e.__scopeScrollArea),a=v.useRef(null),o=v.useRef(0),[s,c]=v.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=NR(s.viewport,s.content),f={...n,sizes:s,onSizesChange:c,hasThumb:u>0&&u<1,onThumbChange:h=>a.current=h,onThumbPointerUp:()=>o.current=0,onThumbPointerDown:h=>o.current=h};function d(h,p){return Yq(h,o.current,s,p)}return r==="horizontal"?l.jsx(Vq,{...f,ref:t,onThumbPositionChange:()=>{if(i.viewport&&a.current){const h=i.viewport.scrollLeft,p=z_(h,s,i.dir);a.current.style.transform=`translate3d(${p}px, 0, 0)`}},onWheelScroll:h=>{i.viewport&&(i.viewport.scrollLeft=h)},onDragScroll:h=>{i.viewport&&(i.viewport.scrollLeft=d(h,i.dir))}}):r==="vertical"?l.jsx(Hq,{...f,ref:t,onThumbPositionChange:()=>{if(i.viewport&&a.current){const h=i.viewport.scrollTop,p=z_(h,s);a.current.style.transform=`translate3d(0, ${p}px, 0)`}},onWheelScroll:h=>{i.viewport&&(i.viewport.scrollTop=h)},onDragScroll:h=>{i.viewport&&(i.viewport.scrollTop=d(h))}}):null}),Vq=v.forwardRef((e,t)=>
vendor: 13,646 bytes, lines 474-478
474{const{sizes:r,onSizesChange:n,...i}=e,a=Tn(Ti,e.__scopeScrollArea),[o,s]=v.useState(),c=v.useRef(null),u=Ae(t,c,a.onScrollbarXChange);return v.useEffect(()=>{c.current&&s(getComputedStyle(c.current))},[c]),l.jsx(SR,{"data-orientation":"horizontal",...i,ref:u,sizes:r,style:{bottom:0,left:a.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:a.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":cv(r)+"px",...e.style},onThumbPointerDown:f=>e.onThumbPointerDown(f.x),onDragScroll:f=>e.onDragScroll(f.x),onWheelScroll:(f,d)=>{if(a.viewport){const h=a.viewport.scrollLeft+f.deltaX;e.onWheelScroll(h),OR(h,d)&&f.preventDefault()}},onResize:()=>{c.current&&a.viewport&&o&&n({content:a.viewport.scrollWidth,viewport:a.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:om(o.paddingLeft),paddingEnd:om(o.paddingRight)}})}})}),Hq=v.forwardRef((e,t)=>{const{sizes:r,onSizesChange:n,...i}=e,a=Tn(Ti,e.__scopeScrollArea),[o,s]=v.useState(),c=v.useRef(null),u=Ae(t,c,a.onScrollbarYChange);return v.useEffect(()=>{c.current&&s(getComputedStyle(c.current))},[c]),l.jsx(SR,{"data-orientation":"vertical",...i,ref:u,sizes:r,style:{top:0,right:a.dir==="ltr"?0:void 0,left:a.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":cv(r)+"px",...e.style},onThumbPointerDown:f=>e.onThumbPointerDown(f.y),onDragScroll:f=>e.onDragScroll(f.y),onWheelScroll:(f,d)=>{if(a.viewport){const h=a.viewport.scrollTop+f.deltaY;e.onWheelScroll(h),OR(h,d)&&f.preventDefault()}},onResize:()=>{c.current&&a.viewport&&o&&n({content:a.viewport.scrollHeight,viewport:a.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:om(o.paddingTop),paddingEnd:om(o.paddingBottom)}})}})}),[qq,wR]=gR(Ti),SR=v.forwardRef((e,t)=>{const{__scopeScrollArea:r,sizes:n,hasThumb:i,onThumbChange:a,onThumbPointerUp:o,onThumbPointerDown:s,onThumbPositionChange:c,onDragScroll:u,onWheelScroll:f,onResize:d,...h}=e,p=Tn(Ti,r),[g,m]=v.useState(null),y=Ae(t,O=>m(O)),x=v.useRef(null),b=v.useRef(""),w=p.viewport,S=n.content-n.viewport,j=yt(f),P=yt(c),N=uv(d,10);function _(O){if(x.current){const k=O.clientX-x.current.left,C=O.clientY-x.current.top;u({x:k,y:C})}}return v.useEffect(()=>{const O=k=>{const C=k.target;(g==null?void 0:g.contains(C))&&j(k,S)};return document.addEventListener("wheel",O,{passive:!1}),()=>document.removeEventListener("wheel",O,{passive:!1})},[w,g,S,j]),v.useEffect(P,[n,P]),Zl(g,N),Zl(p.content,N),l.jsx(qq,{scope:r,scrollbar:g,hasThumb:i,onThumbChange:yt(a),onThumbPointerUp:yt(o),onThumbPositionChange:P,onThumbPointerDown:yt(s),children:l.jsx(xe.div,{...h,ref:y,style:{position:"absolute",...h.style},onPointerDown:ee(e.onPointerDown,O=>{O.button===0&&(O.target.setPointerCapture(O.pointerId),x.current=g.getBoundingClientRect(),b.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",p.viewport&&(p.viewport.style.scrollBehavior="auto"),_(O))}),onPointerMove:ee(e.onPointerMove,_),onPointerUp:ee(e.onPointerUp,O=>{const k=O.target;k.hasPointerCapture(O.pointerId)&&k.releasePointerCapture(O.pointerId),document.body.style.webkitUserSelect=b.current,p.viewport&&(p.viewport.style.scrollBehavior=""),x.current=null})})})}),am="ScrollAreaThumb",jR=v.forwardRef((e,t)=>{const{forceMount:r,...n}=e,i=wR(am,e.__scopeScrollArea);return l.jsx(br,{present:r||i.hasThumb,children:l.jsx(Kq,{ref:t,...n})})}),Kq=v.forwardRef((e,t)=>{const{__scopeScrollArea:r,style:n,...i}=e,a=Tn(am,r),o=wR(am,r),{onThumbPositionChange:s}=o,c=Ae(t,d=>o.onThumbChange(d)),u=v.useRef(),f=uv(()=>{u.current&&(u.current(),u.current=void 0)},100);return v.useEffect(()=>{const d=a.viewport;if(d){const h=()=>{if(f(),!u.current){const p=Xq(d,s);u.current=p,s()}};return s(),d.addEventListener("scroll",h),()=>d.removeEventListener("scroll",h)}},[a.viewport,f,s]),l.jsx(xe.div,{"data-state":o.hasThumb?"visible":"hidden",...i,ref:c,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...n},onPointerDownCapture:ee(e.onPointerDownCapture,d=>{const p=d.target.getBoundingClientRect(),g=d.clientX-p.left,m=d.clientY-p.top;o.onThumbPointerDown({x:g,y:m})}),onPointerUp:ee(e.onPointerUp,o.onThumbPointerUp)})});jR.displayName=am;var rj="ScrollAreaCorner",PR=v.forwardRef((e,t)=>{const r=Tn(rj,e.__scopeScrollArea),n=!!(r.scrollbarX&&r.scrollbarY);return r.type!=="scroll"&&n?l.jsx(Gq,{...e,ref:t}):null});PR.displayName=rj;var Gq=v.forwardRef((e,t)=>{const{__scopeScrollArea:r,...n}=e,i=Tn(rj,r),[a,o]=v.useState(0),[s,c]=v.useState(0),u=!!(a&&s);return Zl(i.scrollbarX,()=>{var d;const f=((d=i.scrollbarX)==null?void 0:d.offsetHeight)||0;i.onCornerHeightChange(f),c(f)}),Zl(i.scrollbarY,()=>{var d;const f=((d=i.scrollbarY)==null?void 0:d.offsetWidth)||0;i.onCornerWidthChange(f),o(f)}),u?l.jsx(xe.div,{...n,ref:t,style:{width:a,height:s,position:"absolute",right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function om(e){return e?parseInt(e,10):0}function NR(e,t){const r=e/t;return isNaN(r)?0:r}function cv(e){const t=NR(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,n=(e.scrollbar.size-r)*t;return Math.max(n,18)}function Yq(e,t,r,n="ltr"){const i=cv(r),a=i/2,o=t||a,s=i-o,c=r.scrollbar.paddingStart+o,u=r.scrollbar.size-r.scrollbar.paddingEnd-s,f=r.content-r.viewport,d=n==="ltr"?[0,f]:[f*-1,0];return _R([c,u],d)(e)}function z_(e,t,r="ltr"){const n=cv(t),i=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,a=t.scrollbar.size-i,o=t.content-t.viewport,s=a-n,c=r==="ltr"?[0,o]:[o*-1,0],u=$d(e,c);return _R([0,o],[0,s])(u)}function _R(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 OR(e,t){return e>0&&e<t}var Xq=(e,t=()=>{})=>{let r={left:e.scrollLeft,top:e.scrollTop},n=0;return function i(){const a={left:e.scrollLeft,top:e.scrollTop},o=r.left!==a.left,s=r.top!==a.top;(o||s)&&t(),r=a,n=window.requestAnimationFrame(i)}(),()=>window.cancelAnimationFrame(n)};function uv(e,t){const r=yt(e),n=v.useRef(0);return v.useEffect(()=>()=>window.clearTimeout(n.current),[]),v.useCallback(()=>{window.clearTimeout(n.current),n.current=window.setTimeout(r,t)},[r,t])}function Zl(e,t){const r=yt(t);Gt(()=>{let n=0;if(e){const i=new ResizeObserver(()=>{cancelAnimationFrame(n),n=window.requestAnimationFrame(r)});return i.observe(e),()=>{window.cancelAnimationFrame(n),i.unobserve(e)}}},[e,r])}function Qq(e,t){const{asChild:r,children:n}=e;if(!r)return typeof t=="function"?t(n):t;const i=v.Children.only(n);return v.cloneElement(i,{children:typeof t=="function"?t(i.props.children):t})}var ER=vR,Zq=xR,Jq=PR;const ri=v.forwardRef(({className:e,children:t,...r},n)=>l.jsxs(ER,{ref:n,className:G("relative overflow-hidden",e),...r,children:[l.jsx(Zq,{className:"h-full w-full rounded-[inherit]",children:t}),l.jsx(kR,{}),l.jsx(Jq,{})]}));ri.displayName=ER.displayName;const kR=v.forwardRef(({className:e,orientation:t="vertical",...r},n)=>l.jsx(ej,{ref:n,orientation:t,className:G("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...r,children:l.jsx(jR,{className:"relative flex-1 rounded-full bg-border"})}));kR.displayName=ej.displayName;var nj="Dialog",[CR,zPe]=cn(nj),[eK,ii]=CR(nj),AR=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=v.useRef(null),c=v.useRef(null),[u=!1,f]=Jn({prop:n,defaultProp:i,onChange:a});return l.jsx(eK,{scope:t,triggerRef:s,contentRef:c,contentId:bi(),titleId:bi(),descriptionId:bi(),open:u,onOpenChange:f,onOpenToggle:v.useCallback(()=>f(d=>!d),[f]),modal:o,children:r})};AR.displayName=nj;var TR="DialogTrigger",tK=v.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=ii(TR,r),a=Ae(t,i.triggerRef);return l.jsx(xe.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":oj(i.open),...n,ref:a,onClick:ee(e.onClick,i.onOpenToggle)})});tK.displayName=TR;var ij="DialogPortal",[rK,MR]=CR(ij,{forceMount:void 0}),IR=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:i}=e,a=ii(ij,t);return l.jsx(rK,{scope:t,forceMount:r,children:v.Children.map(n,o=>l.jsx(br,{present:r||a.open,children:l.jsx(Rf,{asChild:!0,container:i,children:o})}))})};IR.displayName=ij;var sm="DialogOverlay",$R=v.forwardRef((e,t)=>{const r=MR(sm,e.__scopeDialog),{forceMount:n=r.forceMount,...i}=e,a=ii(sm,e.__scopeDialog);return a.modal?l.jsx(br,{present:n||a.open,children:l.jsx(nK,{...i,ref:t})}):null});$R.displayName=sm;var nK=v.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=ii(sm,r);return l.jsx(ov,{as:ha,allowPinchZoom:!0,shards:[i.contentRef],children:l.jsx(xe.div,{"data-state":oj(i.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),js="DialogContent",RR=v.forwardRef((e,t)=>{const r=MR(js,e.__scopeDialog),{forceMount:n=r.forceMount,...i}=e,a=ii(js,e.__scopeDialog);return l.jsx(br,{present:n||a.open,children:a.modal?l.jsx(iK,{...i,ref:t}):l.jsx(aK,{...i,ref:t})})});RR.displayName=js;var iK=v.forwardRef((e,t)=>{const r=ii(js,e.__scopeDialog),n=v.useRef(null),i=Ae(t,r.contentRef,n);return v.useEffect(()=>{const a=n.current;if(a)return VS(a)},[]),l.jsx(DR,{...e,ref:i,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ee(e.onCloseAutoFocus,a=>{var o;a.preventDefault(),(o=r.triggerRef.current)==null||o.focus()}),onPointerDownOutside:ee(e.onPointerDownOutside,a=>{const o=a.detail.originalEvent,s=o.button===0&&o.ctrlKey===!0;(o.button===2||s)&&a.preventDefault()}),onFocusOutside:ee(e.onFocusOutside,a=>a.preventDefault())})}),aK=v.forwardRef((e,t)=>{const r=ii(js,e.__scopeDialog),n=v.useRef(!1),i=v.useRef(!1);return l.jsx(DR,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var o,s;(o=e.onCloseAutoFocus)==null||o.call(e,a),a.defaultPrevented||(n.current||(s=r.triggerRef.current)==null||s.focus(),a.preventDefault()),n.current=!1,i.current=!1},onInteractOutside:a=>{var c,u;(c=e.onInteractOutside)==null||c.call(e,a),a.defaultPrevented||(n.current=!0,a.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const o=a.target;((u=r.triggerRef.current)==null?void 0:u.contains(o))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&i.current&&a.preventDefault()}})}),DR=v.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=ii(js,r),c=v.useRef(null),u=Ae(t,c);return $S(),l.jsxs(l.Fragment,{children:[l.jsx(ev,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:i,onUnmountAutoFocus:a,children:l.jsx($f,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":oj(s.open),...o,ref:u,onDismiss:()=>s.onOpenChange(!1)})}),l.jsxs(l.Fragment,{children:[l.jsx(oK,{titleId:s.titleId}),l.jsx(lK,{contentRef:c,descriptionId:s.descriptionId})]})]})}),aj="DialogTitle",LR=v.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=ii(aj,r);return l.jsx(xe.h2,{id:i.titleId,...n,ref:t})});LR.displayName=aj;var FR="DialogDescription",BR=v.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=ii(FR,r);return l.jsx(xe.p,{id:i.descriptionId,...n,ref:t})});BR.displayName=FR;var UR="DialogClose",zR=v.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=ii(UR,r);return l.jsx(xe.button,{type:"button",...n,ref:t,onClick:ee(e.onClick,()=>i.onOpenChange(!1))})});zR.displayName=UR;function oj(e){return e?"open":"closed"}var WR="DialogTitleWarning",[WPe,VR]=T8(WR,{contentName:js,titleName:aj,docsSlug:"dialog"}),oK=({titleId:e})=>{const t=VR(WR),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users. 475 476If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component. 477 478For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return v.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},sK="DialogDescriptionWarning",lK=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${VR(sK).contentName}}.`;return v.useEffect(()=>{var a;const i=(a=e.current)==null?void 0:a.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},HR=AR,qR=IR,dv=$R,fv=RR,hv=LR,pv=BR,KR=zR;const cK=HR,uK=qR,GR=v.forwardRef(({className:e,...t},r)=>l.jsx(dv,{className:G("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:r}));GR.displayName=dv.displayName;const dK=Df("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),YR=v.forwardRef(({side:e="right",className:t,children:r,...n},i)=>l.jsxs(uK,{children:[l.jsx(GR,{}),l.jsxs(fv,{ref:i,className:G(dK({side:e}),t),...n,children:[r,l.jsxs(KR,{className:"absolute right-4 top-4 roun
478ded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[l.jsx(Rc,{className:"h-4 w-4"}),l.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));YR.displayName=fv.displayName;const fK=v.forwardRef(({className:e,...t},r)=>l.jsx(hv,{ref:r,className:G("text-lg font-semibold text-foreground",e),...t}));fK.displayName=hv.displayName;const hK=v.forwardRef(({className:e,...t},r)=>l.jsx(pv,{ref:r,className:G("text-sm text-muted-foreground",e),...t}));hK.displayName=pv.displayName;const dn=()=>{const e=Mc(),t=Uc(),[r,n]=v.useState(!1),i=l.jsx(ri,{className:"h-full",children:l.jsx("div",{className:"p-4 flex flex-col",children:l.jsxs("nav",{className:"space-y-1",children:[l.jsxs($t,{to:"/dashboard",className:G("flex items-center gap-3 rounded-lg px-3 py-2 text-muted-foreground transition-all hover:text-foreground",e.pathname==="/dashboard"&&"bg-muted text-foreground"),children:[l.jsx(CW,{className:"h-5 w-5"}),l.jsx("span",{children:"Dashboard"})]}),l.jsx("div",{className:"pt-4 pb-2",children:l.jsx("h3",{className:"px-3 text-xs font-medium text-muted-foreground uppercase tracking-wider",children:"Practice & Learn"})}),l.jsxs($t,{to:"/virtual-teacher",className:G("flex items-center gap-3 rounded-lg px-3 py-2 text-muted-foreground transition-all hover:text-foreground",e.pathname==="/virtual-teacher"&&"bg-muted text-foreground"),children:[l.jsx(OW,{className:"h-5 w-5"}),l.jsx("span",{children:"Virtual Teacher"})]}),l.jsxs($t,{to:"/speaking-practice",className:G("flex items-center gap-3 rounded-lg px-3 py-2 text-muted-foreground transition-all hover:text-foreground",e.pathname==="/speaking-practice"&&"bg-muted text-foreground"),children:[l.jsx(ni,{className:"h-5 w-5"}),l.jsx("span",{children:"Speaking Practice"})]}),l.jsxs($t,{to:"/word-pronunciation",className:G("flex items-center gap-3 rounded-lg px-3 py-2 text-muted-foreground transition-all hover:text-foreground",e.pathname==="/word-pronunciation"&&"bg-muted text-foreground"),children:[l.jsx(vW,{className:"h-5 w-5"}),l.jsx("span",{children:"Word Pronunciation"})]}),l.jsxs($t,{to:"/writing-practice",className:G("flex items-center gap-3 rounded-lg px-3 py-2 text-muted-foreground transition-all hover:text-foreground",e.pathname==="/writing-practice"&&"bg-muted text-foreground"),children:[l.jsx(SS,{className:"h-5 w-5"}),l.jsx("span",{children:"Writing Practice"})]}),l.jsxs($t,{to:"/listening-practice",className:G("flex items-center gap-3 rounded-lg px-3 py-2 text-muted-foreground transition-all hover:text-foreground",e.pathname==="/listening-practice"&&"bg-muted text-foreground"),children:[l.jsx(WM,{className:"h-5 w-5"}),l.jsx("span",{children:"Listening Practice"})]}),l.jsxs($t,{to:"/vocabulary",className:G("flex items-center gap-3 rounded-lg px-3 py-2 text-muted-foreground transition-all hover:text-foreground",e.pathname==="/vocabulary"&&"bg-muted text-foreground"),children:[l.jsx(LM,{className:"h-5 w-5"}),l.jsx("span",{children:"Vocabulary"})]}),l.jsxs($t,{to:"/conversation",className:G("flex items-center gap-3 rounded-lg px-3 py-2 text-muted-foreground transition-all hover:text-foreground",e.pathname==="/conversation"&&"bg-muted text-foreground"),children:[l.jsx(go,{className:"h-5 w-5"}),l.jsx("span",{children:"AI Conversation"})]}),l.jsxs($t,{to:"/lessons",className:G("flex items-center gap-3 rounded-lg px-3 py-2 text-muted-foreground transition-all hover:text-foreground",e.pathname==="/lessons"&&"bg-muted text-foreground"),children:[l.jsx(bW,{className:"h-5 w-5"}),l.jsx("span",{children:"Lessons"})]}),l.jsx("div",{className:"pt-4 pb-2",children:l.jsx("h3",{className:"px-3 text-xs font-medium text-muted-foreground uppercase tracking-wider",children:"Community & Progress"})}),l.jsxs($t,{to:"/community",className:G("flex items-center gap-3 rounded-lg px-3 py-2 text-muted-foreground transition-all hover:text-foreground",e.pathname==="/community"&&"bg-muted text-foreground"),children:[l.jsx(_S,{className:"h-5 w-5"}),l.jsx("span",{children:"Community"})]}),l.jsxs($t,{to:"/progress",className:G("flex items-center gap-3 rounded-lg px-3 py-2 text-muted-foreground transition-all hover:text-foreground",e.pathname==="/progress"&&"bg-muted text-foreground"),children:[l.jsx(Qp,{className:"h-5 w-5"}),l.jsx("span",{children:"Progress"})]}),l.jsxs($t,{to:"/achievements",className:G("flex items-center gap-3 rounded-lg px-3 py-2 text-muted-foreground transition-all hover:text-foreground",e.pathname==="/achievements"&&"bg-muted text-foreground"),children:[l.jsx(Ed,{className:"h-5 w-5"}),l.jsx("span",{children:"Achievements"})]}),l.jsx("div",{className:"mt-auto pt-4",children:l.jsxs($t,{to:"/settings",className:G("flex items-center gap-3 rounded-lg px-3 py-2 text-muted-foreground transition-all hover:text-foreground",e.pathname==="/settings"&&"bg-muted text-foreground"),children:[l.jsx(KM,{className:"h-5 w-5"}),l.jsx("span",{children:"Settings"})]})})]})})});return t?l.jsxs(l.Fragment,{children:[l.jsx(Y,{variant:"ghost",size:"icon",className:"fixed top-4 left-4 z-50 md:hidden",onClick:()=>n(!r),children:l.jsx(IW,{className:"h-6 w-6"})}),l.jsx(cK,{open:r,onOpenChange:n,children:l.jsxs(YR,{side:"left",className:"p-0 w-64 border-r",children:[l.jsx("div",{className:"flex justify-end p-2",children:l.jsx(Y,{variant:"ghost",size:"icon",onClick:()=>n(!1),children:l.jsx(Rc,{className:"h-5 w-5"})})}),i]})})]}):l.jsx("aside",{className:"fixed top-16 left-0 w-64 h-screen bg-background border-r z-10 hidden md:block",children:i})};var pK=Array.isArray,Kr=pK,mK=typeof lh=="object"&&lh&&lh.Object===Object&&lh,XR=mK,gK=XR,vK=typeof self=="object"&&self&&self.Object===Object&&self,yK=gK||vK||Function("return this")(),Mi=yK,xK=Mi,bK=xK.Symbol,Wf=bK,W_=Wf,QR=Object.prototype,wK=QR.hasOwnProperty,SK=QR.toString,hu=W_?W_.toStringTag:void 0;function jK(e){var t=wK.call(e,hu),r=e[hu];try{e[hu]=void 0;var n=!0}catch{}var i=SK.call(e);return n&&(t?e[hu]=r:delete e[hu]),i}var PK=jK,NK=Object.prototype,_K=NK.toString;function OK(e){return _K.call(e)}var EK=OK,V_=Wf,kK=PK,CK=EK,AK="[object Null]",TK="[object Undef
478ined]",H_=V_?V_.toStringTag:void 0;function MK(e){return e==null?e===void 0?TK:AK:H_&&H_ in Object(e)?kK(e):CK(e)}var ja=MK;function IK(e){return e!=null&&typeof e=="object"}var Pa=IK,$K=ja,RK=Pa,DK="[object Symbol]";function LK(e){return typeof e=="symbol"||RK(e)&&$K(e)==DK}var zc=LK,FK=Kr,BK=zc,UK=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,zK=/^\w*$/;function WK(e,t){if(FK(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||BK(e)?!0:zK.test(e)||!UK.test(e)||t!=null&&e in Object(t)}var sj=WK;function VK(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var No=VK;const Wc=Ye(No);var HK=ja,qK=No,KK="[object AsyncFunction]",GK="[object Function]",YK="[object GeneratorFunction]",XK="[object Proxy]";function QK(e){if(!qK(e))return!1;var t=HK(e);return t==GK||t==YK||t==KK||t==XK}var lj=QK;const Ce=Ye(lj);var ZK=Mi,JK=ZK["__core-js_shared__"],eG=JK,ux=eG,q_=function(){var e=/[^.]+$/.exec(ux&&ux.keys&&ux.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function tG(e){return!!q_&&q_ in e}var rG=tG,nG=Function.prototype,iG=nG.toString;function aG(e){if(e!=null){try{return iG.call(e)}catch{}try{return e+""}catch{}}return""}var ZR=aG,oG=lj,sG=rG,lG=No,cG=ZR,uG=/[\\^$.*+?()[\]{}|]/g,dG=/^\[object .+?Constructor\]$/,fG=Function.prototype,hG=Object.prototype,pG=fG.toString,mG=hG.hasOwnProperty,gG=RegExp("^"+pG.call(mG).replace(uG,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function vG(e){if(!lG(e)||sG(e))return!1;var t=oG(e)?gG:dG;return t.test(cG(e))}var yG=vG;function xG(e,t){return e==null?void 0:e[t]}var bG=xG,wG=yG,SG=bG;function jG(e,t){var r=SG(e,t);return wG(r)?r:void 0}var Bs=jG,PG=Bs,NG=PG(Object,"create"),mv=NG,K_=mv;function _G(){this.__data__=K_?K_(null):{},this.size=0}var OG=_G;function EG(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var kG=EG,CG=mv,AG="__lodash_hash_undefined__",TG=Object.prototype,MG=TG.hasOwnProperty;function IG(e){var t=this.__data__;if(CG){var r=t[e];return r===AG?void 0:r}return MG.call(t,e)?t[e]:void 0}var $G=IG,RG=mv,DG=Object.prototype,LG=DG.hasOwnProperty;function FG(e){var t=this.__data__;return RG?t[e]!==void 0:LG.call(t,e)}var BG=FG,UG=mv,zG="__lodash_hash_undefined__";function WG(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=UG&&t===void 0?zG:t,this}var VG=WG,HG=OG,qG=kG,KG=$G,GG=BG,YG=VG;function Vc(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])}}Vc.prototype.clear=HG;Vc.prototype.delete=qG;Vc.prototype.get=KG;Vc.prototype.has=GG;Vc.prototype.set=YG;var XG=Vc;function QG(){this.__data__=[],this.size=0}var ZG=QG;function JG(e,t){return e===t||e!==e&&t!==t}var cj=JG,eY=cj;function tY(e,t){for(var r=e.length;r--;)if(eY(e[r][0],t))return r;return-1}var gv=tY,rY=gv,nY=Array.prototype,iY=nY.splice;function aY(e){var t=this.__data__,r=rY(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():iY.call(t,r,1),--this.size,!0}var oY=aY,sY=gv;function lY(e){var t=this.__data__,r=sY(t,e);return r<0?void 0:t[r][1]}var cY=lY,uY=gv;function dY(e){return uY(this.__data__,e)>-1}var fY=dY,hY=gv;function pY(e,t){var r=this.__data__,n=hY(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var mY=pY,gY=ZG,vY=oY,yY=cY,xY=fY,bY=mY;function Hc(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])}}Hc.prototype.clear=gY;Hc.prototype.delete=vY;Hc.prototype.get=yY;Hc.prototype.has=xY;Hc.prototype.set=bY;var vv=Hc,wY=Bs,SY=Mi,jY=wY(SY,"Map"),uj=jY,G_=XG,PY=vv,NY=uj;function _Y(){this.size=0,this.__data__={hash:new G_,map:new(NY||PY),string:new G_}}var OY=_Y;function EY(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var kY=EY,CY=kY;function AY(e,t){var r=e.__data__;return CY(t)?r[typeof t=="string"?"string":"hash"]:r.map}var yv=AY,TY=yv;function MY(e){var t=TY(this,e).delete(e);return this.size-=t?1:0,t}var IY=MY,$Y=yv;function RY(e){return $Y(this,e).get(e)}var DY=RY,LY=yv;function FY(e){return LY(this,e).has(e)}var BY=FY,UY=yv;function zY(e,t){var r=UY(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var WY=zY,VY=OY,HY=IY,qY=DY,KY=BY,GY=WY;function qc(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])}}qc.prototype.clear=VY;qc.prototype.delete=HY;qc.prototype.get=qY;qc.prototype.has=KY;qc.prototype.set=GY;var dj=qc,JR=dj,YY="Expected a function";function fj(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(YY);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],a=r.cache;if(a.has(i))return a.get(i);var o=e.apply(this,n);return r.cache=a.set(i,o)||a,o};return r.cache=new(fj.Cache||JR),r}fj.Cache=JR;var eD=fj;const XY=Ye(eD);var QY=eD,ZY=500;function JY(e){var t=QY(e,function(n){return r.size===ZY&&r.clear(),n}
478),r=t.cache;return t}var eX=JY,tX=eX,rX=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,nX=/\\(\\)?/g,iX=tX(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(rX,function(r,n,i,a){t.push(i?a.replace(nX,"$1"):n||r)}),t}),aX=iX;function oX(e,t){for(var r=-1,n=e==null?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}var hj=oX,Y_=Wf,sX=hj,lX=Kr,cX=zc,uX=1/0,X_=Y_?Y_.prototype:void 0,Q_=X_?X_.toString:void 0;function tD(e){if(typeof e=="string")return e;if(lX(e))return sX(e,tD)+"";if(cX(e))return Q_?Q_.call(e):"";var t=e+"";return t=="0"&&1/e==-uX?"-0":t}var dX=tD,fX=dX;function hX(e){return e==null?"":fX(e)}var rD=hX,pX=Kr,mX=sj,gX=aX,vX=rD;function yX(e,t){return pX(e)?e:mX(e,t)?[e]:gX(vX(e))}var nD=yX,xX=zc,bX=1/0;function wX(e){if(typeof e=="string"||xX(e))return e;var t=e+"";return t=="0"&&1/e==-bX?"-0":t}var xv=wX,SX=nD,jX=xv;function PX(e,t){t=SX(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[jX(t[r++])];return r&&r==n?e:void 0}var pj=PX,NX=pj;function _X(e,t,r){var n=e==null?void 0:NX(e,t);return n===void 0?r:n}var iD=_X;const Pn=Ye(iD);function OX(e){return e==null}var EX=OX;const Fe=Ye(EX);var kX=ja,CX=Kr,AX=Pa,TX="[object String]";function MX(e){return typeof e=="string"||!CX(e)&&AX(e)&&kX(e)==TX}var IX=MX;const Vf=Ye(IX);var aD={exports:{}},tt={};/** 479 * @license React 480 * react-is.production.min.js 481 * 482 * Copyright (c) Facebook, Inc. and its affiliates. 483 * 484 * This source code is licensed under the MIT license found in the 485 * LICENSE file in the root directory of this source tree. 486 */var mj=Symbol.for("react.element"),gj=Symbol.for("react.portal"),bv=Symbol.for("react.fragment"),wv=Symbol.for("react.strict_mode"),Sv=Symbol.for("react.profiler"),jv=Symbol.for("react.provider"),Pv=Symbol.for("react.context"),$X=Symbol.for("react.server_context"),Nv=Symbol.for("react.forward_ref"),_v=Symbol.for("react.suspense"),Ov=Symbol.for("react.suspense_list"),Ev=Symbol.for("react.memo"),kv=Symbol.for("react.lazy"),RX=Symbol.for("react.offscreen"),oD;oD=Symbol.for("react.module.reference");function Mn(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case mj:switch(e=e.type,e){case bv:case Sv:case wv:case _v:case Ov:return e;default:switch(e=e&&e.$$typeof,e){case $X:case Pv:case Nv:case kv:case Ev:case jv:return e;default:return t}}case gj:return t}}}tt.ContextConsumer=Pv;tt.ContextProvider=jv;tt.Element=mj;tt.ForwardRef=Nv;tt.Fragment=bv;tt.Lazy=kv;tt.Memo=Ev;tt.Portal=gj;tt.Profiler=Sv;tt.StrictMode=wv;tt.Suspense=_v;tt.SuspenseList=Ov;tt.isAsyncMode=function(){return!1};tt.isConcurrentMode=function(){return!1};tt.isContextConsumer=function(e){return Mn(e)===Pv};tt.isContextProvider=function(e){return Mn(e)===jv};tt.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===mj};tt.isForwardRef=function(e){return Mn(e)===Nv};tt.isFragment=function(e){return Mn(e)===bv};tt.isLazy=function(e){return Mn(e)===kv};tt.isMemo=function(e){return Mn(e)===Ev};tt.isPortal=function(e){return Mn(e)===gj};tt.isProfiler=function(e){return Mn(e)===Sv};tt.isStrictMode=function(e){return Mn(e)===wv};tt.isSuspense=function(e){return Mn(e)===_v};tt.isSuspenseList=function(e){return Mn(e)===Ov};tt.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===bv||e===Sv||e===wv||e===_v||e===Ov||e===RX||typeof e=="object"&&e!==null&&(e.$$typeof===kv||e.$$typeof===Ev||e.$$typeof===jv||e.$$typeof===Pv||e.$$typeof===Nv||e.$$typeof===oD||e.getModuleId!==void 0)};tt.typeOf=Mn;aD.exports=tt;var sD=aD.exports,DX=ja,LX=Pa,FX="[object Number]";function BX(e){return typeof e=="number"||LX(e)&&DX(e)==FX}var lD=BX;const UX=Ye(lD);var zX=lD;function WX(e){return zX(e)&&e!=+e}var VX=WX;const Hf=Ye(VX);var Gn=function(t){return t===0?0:t>0?1:-1},Zo=function(t){return Vf(t)&&t.indexOf("%")===t.length-1},oe=function(t){return UX(t)&&!Hf(t)},qt=function(t){return oe(t)||Vf(t)},HX=0,qf=function(t){var r=++HX;return"".concat(t||"").concat(r)},Yn=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!oe(t)&&!Vf(t))return n;var a;if(Zo(t)){var o=t.indexOf("%");a=r*parseFloat(t.slice(0,o))/100}else a=+t;
vendor: 5,115 bytes, line 486
486return Hf(a)&&(a=n),i&&a>r&&(a=r),a},La=function(t){if(!t)return null;var r=Object.keys(t);return r&&r.length?t[r[0]]:null},qX=function(t){if(!Array.isArray(t))return!1;for(var r=t.length,n={},i=0;i<r;i++)if(!n[t[i]])n[t[i]]=!0;else return!0;return!1},Or=function(t,r){return oe(t)&&oe(r)?function(n){return t+n*(r-t)}:function(){return r}};function lm(e,t,r){return!e||!e.length?null:e.find(function(n){return n&&(typeof t=="function"?t(n):Pn(n,t))===r})}function _l(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 S0(e){"@babel/helpers - typeof";return S0=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},S0(e)}var KX=["viewBox","children"],GX=["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","colorRendering","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"],Z_=["points","pathLength"],dx={svg:KX,polygon:Z_,polyline:Z_},vj=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onF
486ocus","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","onDragCapture","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"],cm=function(t,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var n=t;if(v.isValidElement(t)&&(n=t.props),!Wc(n))return null;var i={};return Object.keys(n).forEach(function(a){vj.includes(a)&&(i[a]=r||function(o){return n[a](n,o)})}),i},YX=function(t,r,n){return function(i){return t(r,n,i),null}},Jl=function(t,r,n){if(!Wc(t)||S0(t)!=="object")return null;var i=null;return Object.keys(t).forEach(function(a){var o=t[a];vj.includes(a)&&typeof o=="function"&&(i||(i={}),i[a]=YX(o,r,n))}),i},XX=["children"],QX=["children"];function J_(e,t){if(e==null)return{};var r=ZX(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function ZX(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 j0(e){"@babel/helpers - typeof";return j0=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},j0(e)}var eO={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart"},na=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},tO=null,fx=null,yj=function e(t){if(t===tO&&Array.isArray(fx))return fx;var r=[];
vendor: 1,823 bytes, line 486
486return v.Children.forEach(t,function(n){Fe(n)||(sD.isFragment(n)?r=r.concat(e(n.props.children)):r.push(n))}),fx=r,tO=t,r};function Nn(e,t){var r=[],n=[];return Array.isArray(t)?n=t.map(function(i){return na(i)}):n=[na(t)],yj(e).forEach(function(i){var a=Pn(i,"type.displayName")||Pn(i,"type.name");n.indexOf(a)!==-1&&r.push(i)}),r}function Zr(e,t){var r=Nn(e,t);return r&&r[0]}var rO=function(t){if(!t||!t.props)return!1;var r=t.props,n=r.width,i=r.height;return!(!oe(n)||n<=0||!oe(i)||i<=0)},JX=["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"],eQ=function(t){return t&&t.type&&Vf(t.type)&&JX.indexOf(t.type)>=0},tQ=function(t){return t&&j0(t)==="object"&&"clipDot"in t},rQ=function(t,r,n,i){var a,o=(a=dx==null?void 0:dx[i])!==null&&a!==void 0?a:[];return!Ce(t)&&(i&&o.includes(r)||GX.includes(r))||n&&vj.includes(r)},je=function(t,r,n){if(!t||typeof t=="function"||typeof t=="boolean")return null;var i=t;if(v.isValidElement(t)&&(i=t.props),!Wc(i))return null;var a={};
486return Object.keys(i).forEach(function(o){var s;rQ((s=i)===null||s===void 0?void 0:s[o],o,r,n)&&(a[o]=i[o])}),a},P0=function e(t,r){if(t===r)return!0;var n=v.Children.count(t);if(n!==v.Children.count(r))return!1;if(n===0)return!0;if(n===1)return nO(Array.isArray(t)?t[0]:t,Array.isArray(r)?r[0]:r);for(var i=0;i<n;i++){var a=t[i],o=r[i];if(Array.isArray(a)||Array.isArray(o)){if(!e(a,o))return!1}else if(!nO(a,o))return!1}return!0},nO=function(t,r){if(Fe(t)&&Fe(r))return!0;if(!Fe(t)&&!Fe(r)){var n=t.props||{},i=n.children,a=J_(n,XX),o=r.props||{},s=o.children,c=J_(o,QX);return i&&s?_l(a,c)&&P0(i,s):!i&&!s?_l(a,c):!1}return!1},iO=function(t,r){var n=[],i={};return yj(t).forEach(function(a,o){if(eQ(a))n.push(a);else if(a){var s=na(a.type),c=r[s]||{},u=c.handler,f=c.once;if(u&&(!f||!i[s])){var d=u(a,s,o);n.push(d),i[s]=!0}}}),n},nQ=function(t){var r=t&&t.type;return r&&eO[r]?eO[r]:null},iQ=function(t,r){return yj(r).indexOf(t)},aQ=["children","width","height","viewBox","className","style","title","desc"];function N0(){return N0=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},N0.apply(this,arguments)}function oQ(e,t){if(e==null)return{};var r=sQ(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function sQ(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 _0(e){var t=e.children,r=e.width,n=e.height,i=e.viewBox,a=e.className,o=e.style,s=e.title,c=e.desc,u=oQ(e,aQ),f=i||{width:r,height:n,x:0,y:0},d=Te("recharts-surface",a);return M.createElement("svg",N0({},je(u,!0,"svg"),{className:d,width:r,height:n,style:o,viewBox:"".concat(f.x," ").concat(f.y," ").concat(f.width," ").concat(f.height)}),M.createElement("title",null,s),M.createElement("desc",null,c),t)}var lQ=["children","className"];function O0(){return O0=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},O0.apply(this,arguments)}function cQ(e,t){if(e==null)return{};var r=uQ(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function uQ(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 Qe=M.forwardRef(function(e,t){var r=e.children,n=e.className,i=cQ(e,lQ),a=Te("recharts-layer",n);return M.createElement("g",O0({className:a},je(i,!0),{ref:t}),r)}),ia=function(t,r){for(var n=arguments.length,i=new Array(n>2?n-2:0),a=2;a<n;a++)i[a-2]=arguments[a]};function dQ(e,t,r){var n=-1,i=e.length;t<0&&(t=-t>i?0:i+t),r=r>i?i:r,r<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var a=Array(i);++n<i;)a[n]=e[n+t];return a}var fQ=dQ,hQ=fQ;function pQ(e,t,r){var n=e.length;return r=r===void 0?n:r,!t&&r>=n?e:hQ(e,t,r)}var mQ=pQ,gQ="\\ud800-\\udfff",vQ="\\u0300-\\u036f",yQ="\\ufe20-\\ufe2f",xQ="\\u20d0-\\u20ff",bQ=vQ+yQ+xQ,wQ="\\ufe0e\\ufe0f",SQ="\\u200d",jQ=RegExp("["+SQ+gQ+bQ+wQ+"]");function PQ(e){return jQ.test(e)}var cD=PQ;function NQ(e){return e.split("")}var _Q=NQ,uD="\\ud800-\\udfff",OQ="\\u0300-\\u036f",EQ="\\ufe20-\\ufe2f",kQ="\\u20d0-\\u20ff",CQ=OQ+EQ+kQ,AQ="\\ufe0e\\ufe0f",TQ="["+uD+"]",E0="["+CQ+"]",k0="\\ud83c[\\udffb-\\udfff]",MQ="(?:"+E0+"|"+k0+")",dD="[^"+uD+"]",fD="(?:\\ud83c[\\udde6-\\uddff]){2}",hD="[\\ud800-\\udbff][\\udc00-\\udfff]",IQ="\\u200d",pD=MQ+"?",mD="["+AQ+"]?",$Q="(?:"+IQ+"(?:"+[dD,fD,hD].join("|")+")"+mD+pD+")*",RQ=mD+pD+$Q,DQ="(?:"+[dD+E0+"?",E0,fD,hD,TQ].join("|")+")",LQ=RegExp(k0+"(?="+k0+")|"+DQ+RQ,"g");function FQ(e){return e.match(LQ)||[]}var BQ=FQ,UQ=_Q,zQ=cD,WQ=BQ;function VQ(e){return zQ(e)?WQ(e):UQ(e)}var HQ=VQ,qQ=mQ,KQ=cD,GQ=HQ,YQ=rD;function XQ(e){return function(t){t=YQ(t);var r=KQ(t)?GQ(t):void 0,n=r?r[0]:t.charAt(0),i=r?qQ(r,1).join(""):t.slice(1);return n[e]()+i}}var QQ=XQ,ZQ=QQ,JQ=ZQ("toUpperCase"),eZ=JQ;const Cv=Ye(eZ);function ct(e){return function(){return e}}const gD=Math.cos,um=Math.sin,ai=Math.sqrt,dm=Math.PI,Av=2*dm,C0=Math.PI,A0=2*C0,Lo=1e-6,tZ=A0-Lo;function vD(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function rZ(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return vD;const r=10**t;return function(n){this._+=n[0];for(let i=1,a=n.length;i<a;++i)this._+=Math.round(arguments[i]*r)/r+n[i]}}class nZ{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?vD:rZ(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,i){this._append`Q${+t},${+r},${this._x1=+n},${this._y1=+i}`}bezierCurveTo(t,r,n,i,a,o){this._append`C${+t},${+r},${+n}
486,${+i},${this._x1=+a},${this._y1=+o}`}arcTo(t,r,n,i,a){if(t=+t,r=+r,n=+n,i=+i,a=+a,a<0)throw new Error(`negative radius: ${a}`);let o=this._x1,s=this._y1,c=n-t,u=i-r,f=o-t,d=s-r,h=f*f+d*d;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(h>Lo)if(!(Math.abs(d*c-u*f)>Lo)||!a)this._append`L${this._x1=t},${this._y1=r}`;else{let p=n-o,g=i-s,m=c*c+u*u,y=p*p+g*g,x=Math.sqrt(m),b=Math.sqrt(h),w=a*Math.tan((C0-Math.acos((m+h-y)/(2*x*b)))/2),S=w/b,j=w/x;Math.abs(S-1)>Lo&&this._append`L${t+S*f},${r+S*d}`,this._append`A${a},${a},0,0,${+(d*p>f*g)},${this._x1=t+j*c},${this._y1=r+j*u}`}}arc(t,r,n,i,a,o){if(t=+t,r=+r,n=+n,o=!!o,n<0)throw new Error(`negative radius: ${n}`);let s=n*Math.cos(i),c=n*Math.sin(i),u=t+s,f=r+c,d=1^o,h=o?i-a:a-i;this._x1===null?this._append`M${u},${f}`:(Math.abs(this._x1-u)>Lo||Math.abs(this._y1-f)>Lo)&&this._append`L${u},${f}`,n&&(h<0&&(h=h%A0+A0),h>tZ?this._append`A${n},${n},0,1,${d},${t-s},${r-c}A${n},${n},0,1,${d},${this._x1=u},${this._y1=f}`:h>Lo&&this._append`A${n},${n},0,${+(h>=C0)},${d},${this._x1=t+n*Math.cos(a)},${this._y1=r+n*Math.sin(a)}`)}rect(t,r,n,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${n=+n}v${+i}h${-n}Z`}toString(){return this._}}function xj(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 nZ(t)}function bj(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function yD(e){this._context=e}yD.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 Tv(e){return new yD(e)}function xD(e){return e[0]}function bD(e){return e[1]}function wD(e,t){var r=ct(!0),n=null,i=Tv,a=null,o=xj(s);e=typeof e=="function"?e:e===void 0?xD:ct(e),t=typeof t=="function"?t:t===void 0?bD:ct(t);function s(c){var u,f=(c=bj(c)).length,d,h=!1,p;for(n==null&&(a=i(p=o())),u=0;u<=f;++u)!(u<f&&r(d=c[u],u,c))===h&&((h=!h)?a.lineStart():a.lineEnd()),h&&a.point(+e(d,u,c),+t(d,u,c));if(p)return a=null,p+""||null}return s.x=function(c){return arguments.length?(e=typeof c=="function"?c:ct(+c),s):e},s.y=function(c){return arguments.length?(t=typeof c=="function"?c:ct(+c),s):t},s.defined=function(c){return arguments.length?(r=typeof c=="function"?c:ct(!!c),s):r},s.curve=function(c){return arguments.length?(i=c,n!=null&&(a=i(n)),s):i},s.context=function(c){return arguments.length?(c==null?n=a=null:a=i(n=c),s):n},s}function Ih(e,t,r){var n=null,i=ct(!0),a=null,o=Tv,s=null,c=xj(u);e=typeof e=="function"?e:e===void 0?xD:ct(+e),t=typeof t=="function"?t:ct(t===void 0?0:+t),r=typeof r=="function"?r:r===void 0?bD:ct(+r);function u(d){var h,p,g,m=(d=bj(d)).length,y,x=!1,b,w=new Array(m),S=new Array(m);for(a==null&&(s=o(b=c())),h=0;h<=m;++h){if(!(h<m&&i(y=d[h],h,d))===x)if(x=!x)p=h,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),g=h-1;g>=p;--g)s.point(w[g],S[g]);s.lineEnd(),s.areaEnd()}x&&(w[h]=+e(y,h,d),S[h]=+t(y,h,d),s.point(n?+n(y,h,d):w[h],r?+r(y,h,d):S[h]))}if(b)return s=null,b+""||null}function f(){return wD().defined(i).curve(o).context(a)}return u.x=function(d){return arguments.length?(e=typeof d=="function"?d:ct(+d),n=null,u):e},u.x0=function(d){return arguments.length?(e=typeof d=="function"?d:ct(+d),u):e},u.x1=function(d){return arguments.length?(n=d==null?null:typeof d=="function"?d:ct(+d),u):n},u.y=function(d){return arguments.length?(t=typeof d=="function"?d:ct(+d),r=null,u):t},u.y0=function(d){return arguments.length?(t=typeof d=="function"?d:ct(+d),u):t},u.y1=function(d){return arguments.length?(r=d==null?null:typeof d=="function"?d:ct(+d),u):r},u.lineX0=u.lineY0=function(){return f().x(e).y(t)},u.lineY1=function(){return f().x(e).y(r)},u.lineX1=function(){return f().x(n).y(t)},u.defined=function(d){return arguments.length?(i=typeof d=="function"?d:ct(!!d),u):i},u.curve=function(d){return arguments.length?(o=d,a!=null&&(s=o(a)),u):o},u.context=function(d){return arguments.length?(d==null?a=s=null:s=o(a=d),u):a},u}class SD{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 iZ(e){return new SD(e,!0)}function aZ(e){return new SD(e,!1)}const wj={draw(e,t){const r=ai(t/dm);e.moveTo(r,0),e.arc(0,0,r,0,Av)}},oZ={draw(e,t){const r=ai(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()}},jD=ai(1/3),sZ=jD*2,lZ={draw(e,t){const r=ai(t/sZ),n=r*jD;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}},cZ={draw(e,t){const r=ai(t),n=-r/2;e.rect(n,n,r,r)}},uZ=.8908130915292852,PD=um(dm/10)/um(7*dm/10),dZ=um(Av/10)*PD,fZ=-gD(Av/10)*PD,hZ={draw(e,t){const r=ai(t*uZ),n=dZ*r,i=fZ*r;e.moveTo(0,-r),e.lineTo(n,i);for(let a=1;a<5;++a){const o=Av*a/5,s=gD(o),c=um(o);e.lineTo(c*r,-s*r),e.lineTo(s*n-c*i,c*n+s*i)}e.closePath()}},hx=ai(3),pZ={draw(e,t){const r=-ai(t/(hx*3));
vendor: 7,183 bytes, line 486
486e.moveTo(0,r*2),e.lineTo(-hx*r,-r),e.lineTo(hx*r,-r),e.closePath()}},fn=-.5,hn=ai(3)/2,T0=1/ai(12),mZ=(T0/2+1)*3,gZ={draw(e,t){const r=ai(t/mZ),n=r/2,i=r*T0,a=n,o=r*T0+r,s=-a,c=o;e.moveTo(n,i),e.lineTo(a,o),e.lineTo(s,c),e.lineTo(fn*n-hn*i,hn*n+fn*i),e.lineTo(fn*a-hn*o,hn*a+fn*o),e.lineTo(fn*s-hn*c,hn*s+fn*c),e.lineTo(fn*n+hn*i,fn*i-hn*n),e.lineTo(fn*a+hn*o,fn*o-hn*a),e.lineTo(fn*s+hn*c,fn*c-hn*s),e.closePath()}};function vZ(e,t){let r=null,n=xj(i);e=typeof e=="function"?e:ct(e||wj),t=typeof t=="function"?t:ct(t===void 0?64:+t);function i(){let a;if(r||(r=a=n()),e.apply(this,arguments).draw(r,+t.apply(this,arguments)),a)return r=null,a+""||null}return i.type=function(a){return arguments.length?(e=typeof a=="function"?a:ct(a),i):e},i.size=function(a){return arguments.length?(t=typeof a=="function"?a:ct(+a),i):t},i.context=function(a){return arguments.length?(r=a??null,i):r},i}function fm(){}function hm(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 ND(e){this._context=e}ND.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:hm(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:hm(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function yZ(e){return new ND(e)}function _D(e){this._context=e}_D.prototype={areaStart:fm,areaEnd:fm,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:hm(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function xZ(e){return new _D(e)}function OD(e){this._context=e}OD.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:hm(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function bZ(e){return new OD(e)}function ED(e){this._context=e}ED.prototype={areaStart:fm,areaEnd:fm,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 wZ(e){return new ED(e)}function aO(e){return e<0?-1:1}function oO(e,t,r){var n=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(n||i<0&&-0),o=(r-e._y1)/(i||n<0&&-0),s=(a*i+o*n)/(n+i);return(aO(a)+aO(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function sO(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function px(e,t,r){var n=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-n)/3;e._context.bezierCurveTo(n+s,i+s*t,a-s,o-s*r,a,o)}function pm(e){this._context=e}pm.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:px(this,this._t0,sO(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,px(this,sO(this,r=oO(this,e,t)),r);break;default:px(this,this._t0,r=oO(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function kD(e){this._context=new CD(e)}(kD.prototype=Object.create(pm.prototype)).point=function(e,t){pm.prototype.point.call(this,t,e)};function CD(e){this._context=e}CD.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,i,a){this._context.bezierCurveTo(t,e,n,r,a,i)}};function SZ(e){return new pm(e)}function jZ(e){return new kD(e)}function AD(e){this._context=e}AD.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=lO(e),i=lO(t),a=0,o=1;o<r;++a,++o)this._context.bezierCurveTo(n[0][a],i[0][a],n[1][a],i[1][a],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 lO(e){var t,r=e.length-1,n,i=new Array(r),a=new Array(r),o=new Array(r);for(i[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<r-1;++t)i[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(i[r-1]=2,a[r-1]=7,o[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=i[t]/a[t-1],a[t]-=n,o[t]-=n*o[t-1];for(i[r-1]=o[r-1]/a[r-1],t=r-2;t>=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[r-1]=(e[r]+i[r-1])/2,t=0;t<r-1;++t)a[t]=2*e[t+1]-i[t+1];return[i,a]}function PZ(e){return new AD(e)}function Mv(e,t){this._context=e,this._t=t}Mv.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 486-489
486default:{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 NZ(e){return new Mv(e,.5)}function _Z(e){return new Mv(e,0)}function OZ(e){return new Mv(e,1)}function ec(e,t){if((o=e.length)>1)for(var r=1,n,i,a=e[t[0]],o,s=a.length;r<o;++r)for(i=a,a=e[t[r]],n=0;n<s;++n)a[n][1]+=a[n][0]=isNaN(i[n][1])?i[n][0]:i[n][1]}function M0(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}function EZ(e,t){return e[t]}function kZ(e){const t=[];return t.key=e,t}function CZ(){var e=ct([]),t=M0,r=ec,n=EZ;function i(a){var o=Array.from(e.apply(this,arguments),kZ),s,c=o.length,u=-1,f;for(const d of a)for(s=0,++u;s<c;++s)(o[s][u]=[0,+n(d,o[s].key,u,a)]).data=d;for(s=0,f=bj(t(o));s<c;++s)o[f[s]].index=s;return r(o,f),o}return i.keys=function(a){return arguments.length?(e=typeof a=="function"?a:ct(Array.from(a)),i):e},i.value=function(a){return arguments.length?(n=typeof a=="function"?a:ct(+a),i):n},i.order=function(a){return arguments.length?(t=a==null?M0:typeof a=="function"?a:ct(Array.from(a)),i):t},i.offset=function(a){return arguments.length?(r=a??ec,i):r},i}function AZ(e,t){if((n=e.length)>0){for(var r,n,i=0,a=e[0].length,o;i<a;++i){for(o=r=0;r<n;++r)o+=e[r][i][1]||0;if(o)for(r=0;r<n;++r)e[r][i][1]/=o}ec(e,t)}}function TZ(e,t){if((i=e.length)>0){for(var r=0,n=e[t[0]],i,a=n.length;r<a;++r){for(var o=0,s=0;o<i;++o)s+=e[o][r][1]||0;n[r][1]+=n[r][0]=-s/2}ec(e,t)}}function MZ(e,t){if(!(!((o=e.length)>0)||!((a=(i=e[t[0]]).length)>0))){for(var r=0,n=1,i,a,o;n<a;++n){for(var s=0,c=0,u=0;s<o;++s){for(var f=e[t[s]],d=f[n][1]||0,h=f[n-1][1]||0,p=(d-h)/2,g=0;g<s;++g){var m=e[t[g]],y=m[n][1]||0,x=m[n-1][1]||0;p+=y-x}c+=d,u+=p*d}i[n-1][1]+=i[n-1][0]=r,c&&(r-=u/c)}i[n-1][1]+=i[n-1][0]=r,ec(e,t)}}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)}var IZ=["type","size","sizeType"];function I0(){return I0=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},I0.apply(this,arguments)}function cO(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function uO(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?cO(Object(r),!0).forEach(function(n){$Z(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):cO(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function $Z(e,t,r){return t=RZ(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function RZ(e){var t=DZ(e,"string");return Rd(t)=="symbol"?t:t+""}function DZ(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 LZ(e,t){if(e==null)return{};var r=FZ(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function FZ(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 TD={symbolCircle:wj,symbolCross:oZ,symbolDiamond:lZ,symbolSquare:cZ,symbolStar:hZ,symbolTriangle:pZ,symbolWye:gZ},BZ=Math.PI/180,UZ=function(t){var r="symbol".concat(Cv(t));return TD[r]||wj},zZ=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 i=18*BZ;return 1.25*t*t*(Math.tan(i)-Math.tan(i*2)*Math.pow(Math.tan(i),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}},WZ=function(t,r){TD["symbol".concat(Cv(t))]=r},Sj=function(t){var r=t.type,n=r===void 0?"circle":r,i=t.size,a=i===void 0?64:i,o=t.sizeType,s=o===void 0?"area":o,c=LZ(t,IZ),u=uO(uO({},c),{},{type:n,size:a,sizeType:s}),f=function(){var y=UZ(n),x=vZ().type(y).size(zZ(a,s,n));return x()},d=u.className,h=u.cx,p=u.cy,g=je(u,!0);return h===+h&&p===+p&&a===+a?M.createElement("path",I0({},g,{className:Te("recharts-symbols",d),transform:"translate(".concat(h,", ").concat(p,")"),d:f()})):null};Sj.registerSymbol=WZ;function tc(e){"@babel/helpers - typeof";return tc=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},tc(e)}function $0(){return $0=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},$0.apply(this,arguments)}function dO(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function VZ(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?dO(Object(r),!0).forEach(function(n){Dd(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):dO(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function HZ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qZ(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,ID(n.key),n)}}function KZ(e,t,r){return t&&qZ(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function GZ(e,t,r){return t=mm(t),YZ(e,MD()?Reflect.construct(t,r||[],mm(e).constructor):t.apply(e,r))}function YZ(e,t){if(t&&(tc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return XZ(e)}function XZ(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 mm(e){return mm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},mm(e)}function QZ(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&&R0(e,t)}function R0(e,t){return R0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},R0(e,t)}function Dd(e,t,r){return t=ID(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ID(e){var t=ZZ(e,"string");return tc(t)=="symbol"?t:t+""}function ZZ(e,t){if(tc(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(tc(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var pn=32,jj=function(e){function t(){return HZ(this,t),GZ(this,t,arguments)}return QZ(t,e),KZ(t,[{key:"renderIcon",value:function(n){var i=this.props.inactiveColor,a=pn/2,o=pn/6,s=pn/3,c=n.inactive?i:n.color;if(n.type==="plainline")return M.createElement("line",{strokeWidth:4,fill:"none",stroke:c,strokeDasharray:n.payload.strokeDasharray,x1:0,y1:a,x2:pn,y2:a,className:"recharts-legend-icon"});if(n.type==="line")return M.createElement("path",{strokeWidth:4,fill:"none",stroke:c,d:"M0,".concat(a,"h").concat(s,` 487 A`).concat(o,",").concat(o,",0,1,1,").concat(2*s,",").concat(a,` 488 H`).concat(pn,"M").concat(2*s,",").concat(a,` 489 A`).concat(o,",").concat(o,",0,1,1,").concat(s,",").concat(a),className:"recharts-legend-icon"});if(n.type==="rect")return M.createElement("path",{stroke:"none",fill:c,d:"M0,".concat(pn/8,"h").concat(pn,"v").concat(pn*3/4,"h").concat(-pn,"z"),className:"recharts-legend-icon"});if(M.isValidElement(n.legendIcon)){var u=VZ({},n);return delete u.legendIcon,M.cloneElement(n.legendIcon,u)}return M.createElement(Sj,{fill:c,cx:a,cy:a,size:pn,sizeType:"diameter",type:n.type})}},{key:"renderItems",value:function(){var n=this,i=this.props,a=i.payload,o=i.iconSize,s=i.layout,c=i.formatter,u=i.inactiveColor,f={x:0,y:0,width:pn,height:pn},d={display:s==="horizontal"?"inline-block":"block",marginRight:10},h={display:"inline-block",verticalAlign:"middle",marginRight:4};return a.map(function(p,g){var m=p.formatter||c,y=Te(Dd(Dd({"recharts-legend-item":!0},"legend-item-".concat(g),!0),"inactive",p.inactive));if(p.type==="none")return null;var x=Ce(p.value)?null:p.value;ia(!Ce(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?u:p.color;return M.createElement("li",$0({className:y,style:d,key:"legend-item-".concat(g)},Jl(n.props,p,g)),M.createElement(_0,{width:o,height:o,viewBox:f,style:h},n.renderIcon(p)),M.createElement("span",{className:"recharts-legend-item-text",style:{color:b}},m?m(x,p,g):x))})}},{key:"render",value:function(){var n=this.props,i=n.payload,a=n.layout,o=n.align;if(!i||!i.length)return null;var s={padding:0,margin:0,textAlign:a==="horizontal"?o:"left"};return M.createElement("ul",{className:"recharts-default-legend",style:s},this.renderItems())}}])}(v.PureComponent);Dd(jj,"displayName","Legend");Dd(jj,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var JZ=vv;function eJ(){this.__data__=new JZ,this.size=0}var tJ=eJ;function rJ(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var nJ=rJ;function iJ(e){return this.__data__.get(e)}var aJ=iJ;function oJ(e){return this.__data__.has(e)}var sJ=oJ,lJ=vv,cJ=uj,uJ=dj,dJ=200;function fJ(e,t){var r=this.__data__;if(r instanceof lJ){var n=r.__data__;if(!cJ||n.length<dJ-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new uJ(n)}return r.set(e,t),this.size=r.size,this}var hJ=fJ,pJ=vv,mJ=tJ,gJ=nJ,vJ=aJ,yJ=sJ,xJ=hJ;function Kc(e){var t=this.__data__=new pJ(e);this.size=t.size}Kc.prototype.clear=mJ;Kc.prototype.delete=gJ;Kc.prototype.get=vJ;Kc.prototype.has=yJ;Kc.prototype.set=xJ;var $D=Kc,bJ="__lodash_hash_undefined__";function wJ(e){return this.__data__.set(e,bJ),this}var SJ=wJ;function jJ(e){return this.__data__.has(e)}var PJ=jJ,NJ=dj,_J=SJ,OJ=PJ;function gm(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new NJ;++t<r;)this.add(e[t])}gm.prototype.add=gm.prototype.push=_J;gm.prototype.has=OJ;var RD=gm;function EJ(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 DD=EJ;function kJ(e,t){return e.has(t)}var LD=kJ,CJ=RD,AJ=DD,TJ=LD,MJ=1,IJ=2;function $J(e,t,r,n,i,a){var o=r&MJ,s=e.length,c=t.length;if(s!=c&&!(o&&c>s))return!1;var u=a.get(e),f=a.get(t);if(u&&f)return u==t&&f==e;var d=-1,h=!0,p=r&IJ?new CJ:void 0;for(a.set(e,t),a.set(t,e);++d<s;){var g=e[d],m=t[d];if(n)var y=o?n(m,g,d,t,e,a):n(g,m,d,e,t,a);if(y!==void 0){if(y)continue;h=!1;break}
vendor: 7,023 bytes, line 489
489if(p){if(!AJ(t,function(x,b){if(!TJ(p,b)&&(g===x||i(g,x,r,n,a)))return p.push(b)})){h=!1;break}}else if(!(g===m||i(g,m,r,n,a))){h=!1;break}}return a.delete(e),a.delete(t),h}var FD=$J,RJ=Mi,DJ=RJ.Uint8Array,LJ=DJ;function FJ(e){var t=-1,r=Array(e.size);return e.forEach(function(n,i){r[++t]=[i,n]}),r}var BJ=FJ;function UJ(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var Pj=UJ,fO=Wf,hO=LJ,zJ=cj,WJ=FD,VJ=BJ,HJ=Pj,qJ=1,KJ=2,GJ="[object Boolean]",YJ="[object Date]",XJ="[object Error]",QJ="[object Map]",ZJ="[object Number]",JJ="[object RegExp]",eee="[object Set]",tee="[object String]",ree="[object Symbol]",nee="[object ArrayBuffer]",iee="[object DataView]",pO=fO?fO.prototype:void 0,mx=pO?pO.valueOf:void 0;function aee(e,t,r,n,i,a,o){switch(r){case iee:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case nee:return!(e.byteLength!=t.byteLength||!a(new hO(e),new hO(t)));case GJ:case YJ:case ZJ:return zJ(+e,+t);case XJ:return e.name==t.name&&e.message==t.message;case JJ:case tee:return e==t+"";case QJ:var s=VJ;case eee:var c=n&qJ;if(s||(s=HJ),e.size!=t.size&&!c)return!1;var u=o.get(e);if(u)return u==t;n|=KJ,o.set(e,t);var f=WJ(s(e),s(t),n,i,a,o);return o.delete(e),f;case ree:if(mx)return mx.call(e)==mx.call(t)}return!1}var oee=aee;function see(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}var BD=see,lee=BD,cee=Kr;function uee(e,t,r){var n=t(e);return cee(e)?n:lee(n,r(e))}var dee=uee;function fee(e,t){for(var r=-1,n=e==null?0:e.length,i=0,a=[];++r<n;){var o=e[r];t(o,r,e)&&(a[i++]=o)}return a}var hee=fee;function pee(){return[]}var mee=pee,gee=hee,vee=mee,yee=Object.prototype,xee=yee.propertyIsEnumerable,mO=Object.getOwnPropertySymbols,bee=mO?function(e){return e==null?[]:(e=Object(e),gee(mO(e),function(t){return xee.call(e,t)}))}:vee,wee=bee;function See(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var jee=See,Pee=ja,Nee=Pa,_ee="[object Arguments]";function Oee(e){return Nee(e)&&Pee(e)==_ee}var Eee=Oee,gO=Eee,kee=Pa,UD=Object.prototype,Cee=UD.hasOwnProperty,Aee=UD.propertyIsEnumerable,Tee=gO(function(){return arguments}())?gO:function(e){return kee(e)&&Cee.call(e,"callee")&&!Aee.call(e,"callee")},Nj=Tee,vm={exports:{}};function Mee(){return!1}var Iee=Mee;vm.exports;(function(e,t){var r=Mi,n=Iee,i=t&&!t.nodeType&&t,a=i&&!0&&e&&!e.nodeType&&e,o=a&&a.exports===i,s=o?r.Buffer:void 0,c=s?s.isBuffer:void 0,u=c||n;e.exports=u})(vm,vm.exports);var zD=vm.exports,$ee=9007199254740991,Ree=/^(?:0|[1-9]\d*)$/;function Dee(e,t){var r=typeof e;return t=t??$ee,!!t&&(r=="number"||r!="symbol"&&Ree.test(e))&&e>-1&&e%1==0&&e<t}var _j=Dee,Lee=9007199254740991;function Fee(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Lee}var Oj=Fee,Bee=ja,Uee=Oj,zee=Pa,Wee="[object Arguments]",Vee="[object Array]",Hee="[object Boolean]",qee="[object Date]",Kee="[object Error]",Gee="[object Function]",Yee="[object Map]",Xee="[object Number]",Qee="[object Object]",Zee="[object RegExp]",Jee="[object Set]",ete="[object String]",tte="[object WeakMap]",rte="[object ArrayBuffer]",nte="[object DataView]",ite="[object Float32Array]",ate="[object Float64Array]",ote="[object Int8Array]",ste="[object Int16Array]",lte="[object Int32Array]",cte="[object Uint8Array]",ute="[object Uint8ClampedArray]",dte="[object Uint16Array]",fte="[object Uint32Array]",pt={};pt[ite]=pt[ate]=pt[ote]=pt[ste]=pt[lte]=pt[cte]=pt[ute]=pt[dte]=pt[fte]=!0;pt[Wee]=pt[Vee]=pt[rte]=pt[Hee]=pt[nte]=pt[qee]=pt[Kee]=pt[Gee]=pt[Yee]=pt[Xee]=pt[Qee]=pt[Zee]=pt[Jee]=pt[ete]=pt[tte]=!1;function hte(e){return zee(e)&&Uee(e.length)&&!!pt[Bee(e)]}var pte=hte;function mte(e){return function(t){return e(t)}}var WD=mte,ym={exports:{}};ym.exports;(function(e,t){var r=XR,n=t&&!t.nodeType&&t,i=n&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===n,o=a&&r.process,s=function(){try{var c=i&&i.require&&i.require("util").types;return c||o&&o.binding&&o.binding("util")}catch{}}();e.exports=s})(ym,ym.exports);var gte=ym.exports,vte=pte,yte=WD,vO=gte,yO=vO&&vO.isTypedArray,xte=yO?yte(yO):vte,VD=xte,bte=jee,wte=Nj,Ste=Kr,jte=zD,Pte=_j,Nte=VD,_te=Object.prototype,Ote=_te.hasOwnProperty;function Ete(e,t){var r=Ste(e),n=!r&&wte(e),i=!r&&!n&&jte(e),a=!r&&!n&&!i&&Nte(e),o=r||n||i||a,s=o?bte(e.length,String):[],c=s.length;for(var u in e)(t||Ote.call(e,u))&&!(o&&(u=="length"||i&&(u=="offset"||u=="parent")||a&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||Pte(u,c)))&&s.push(u);return s}var kte=Ete,Cte=Object.prototype;function Ate(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||Cte;return e===r}var Tte=Ate;function Mte(e,t){return function(r){return e(t(r))}}var HD=Mte,Ite=HD,$te=Ite(Object.keys,Object),Rte=$te,Dte=Tte,Lte=Rte,Fte=Object.prototype,Bte=Fte.hasOwnProperty;function Ute(e){if(!Dte(e))return Lte(e);var t=[];for(var r in Object(e))Bte.call(e,r)&&r!="constructor"&&t.push(r);return t}var zte=Ute,Wte=lj,Vte=Oj;function Hte(e){return e!=null&&Vte(e.length)&&!Wte(e)}var Kf=Hte,qte=kte,Kte=zte,Gte=Kf;function Yte(e){return Gte(e)?qte(e):Kte(e)}var Iv=Yte,Xte=dee,Qte=wee,Zte=Iv;function Jte(e){return Xte(e,Zte,Qte)}var ere=Jte,xO=ere,tre=1,rre=Object.prototype,nre=rre.hasOwnProperty;function ire(e,t,r,n,i,a){var o=r&tre,s=xO(e),c=s.length,u=xO(t),f=u.length;if(c!=f&&!o)return!1;for(var d=c;d--;){var h=s[d];if(!(o?h in t:nre.call(t,h)))return!1}var p=a.get(e),g=a.get(t);if(p&&g)return p==t&&g==e;var m=!0;a.set(e,t),a.set(t,e);for(var y=o;++d<c;){h=s[d];var x=e[h],b=t[h];if(n)var w=o?n(b,x,h,t,e,a):n(x,b,h,e,t,a);if(!(w===void 0?x===b||i(x,b,r,n,a):w)){m=!1;break}y||(y=h=="constructor")}if(m&&!y){var S=e.constructor,j=t.constructor;S!=j&&"constructor"in e&&"constructor"in t&&!(typeof S=="function"&&S instanceof S&&typeof j=="function"&&j instanceof j)&&(m=!1)}return a.delete(e),a.delete(t),m}var are=ire,ore=Bs,sre=Mi,lre=ore(sre,"DataView"),cre=lre,ure=Bs,dre=Mi,fre=ure(dre,"Promise"),hre=fre,pre=Bs,mre=Mi,gre=pre(mre,"Set"),qD=gre,vre=Bs,yre=Mi,xre=vre(yre,"WeakMap"),bre=xre,D0=cre,L0=uj,F0=hre,B0=qD,U0=bre,KD=ja,Gc=ZR,bO="[object Map]",wre="[object Object]",wO="[object Promise]",SO="[object Set]",jO="[object WeakMap]",PO="[object DataView]",Sre=Gc(D0),jre=Gc(L0),Pre=Gc(F0),Nre=Gc(B0),_re=Gc(U0),Fo=KD;(D0&&Fo(new D0(new ArrayBuffer(1)))!=PO||L0&&Fo(new L0)!=bO||F0&&Fo(F0.resolve())!=wO||B0&&Fo(new B0)!=SO||U0&&Fo(new U0)!=jO)&&(Fo=function(e){var t=KD(e),r=t==wre?e.constructor:void 0,n=r?Gc(r):"";if(n)switch(n){case Sre:return PO;case jre:return bO;case Pre:return wO;case Nre:return SO;case _re:return jO}return t});var Ore=Fo,gx=$D,Ere=FD,kre=oee,Cre=are,NO=Ore,_O=Kr,OO=zD,Are=VD,Tre=1,EO="[object Arguments]",kO="[object Array]",$h="[object Object]",Mre=Object.prototype,CO=Mre.hasOwnProperty;function Ire(e,t,r,n,i,a){var o=_O(e),s=_O(t),c=o?kO:NO(e),u=s?kO:NO(t);c=c==EO?$h:c,u=u==EO?$h:u;var f=c==$h,d=u==$h,h=c==u;if(h&&OO(e)){if(!OO(t))return!1;o=!0,f=!1}if(h&&!f)return a||(a=new gx),o||Are(e)?Ere(e,t,r,n,i,a):kre(e,t,c,r,n,i,a);if(!(r&Tre)){var p=f&&CO.call(e,"__wrapped__"),g=d&&CO.call(t,"__wrapped__");
vendor: 4,112 bytes, line 489
489if(p||g){var m=p?e.value():e,y=g?t.value():t;return a||(a=new gx),i(m,y,r,n,a)}}return h?(a||(a=new gx),Cre(e,t,r,n,i,a)):!1}var $re=Ire,Rre=$re,AO=Pa;function GD(e,t,r,n,i){return e===t?!0:e==null||t==null||!AO(e)&&!AO(t)?e!==e&&t!==t:Rre(e,t,r,n,GD,i)}var Ej=GD,Dre=$D,Lre=Ej,Fre=1,Bre=2;function Ure(e,t,r,n){var i=r.length,a=i,o=!n;if(e==null)return!a;for(e=Object(e);i--;){var s=r[i];if(o&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++i<a;){s=r[i];var c=s[0],u=e[c],f=s[1];if(o&&s[2]){if(u===void 0&&!(c in e))return!1}else{var d=new Dre;if(n)var h=n(u,f,c,e,t,d);if(!(h===void 0?Lre(f,u,Fre|Bre,n,d):h))return!1}}return!0}var zre=Ure,Wre=No;function Vre(e){return e===e&&!Wre(e)}var YD=Vre,Hre=YD,qre=Iv;function Kre(e){for(var t=qre(e),r=t.length;r--;){var n=t[r],i=e[n];t[r]=[n,i,Hre(i)]}return t}var Gre=Kre;function Yre(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}var XD=Yre,Xre=zre,Qre=Gre,Zre=XD;function Jre(e){var t=Qre(e);return t.length==1&&t[0][2]?Zre(t[0][0],t[0][1]):function(r){return r===e||Xre(r,e,t)}}var ene=Jre;function tne(e,t){return e!=null&&t in Object(e)}var rne=tne,nne=nD,ine=Nj,ane=Kr,one=_j,sne=Oj,lne=xv;function cne(e,t,r){t=nne(t,e);for(var n=-1,i=t.length,a=!1;++n<i;){var o=lne(t[n]);if(!(a=e!=null&&r(e,o)))break;e=e[o]}return a||++n!=i?a:(i=e==null?0:e.length,!!i&&sne(i)&&one(o,i)&&(ane(e)||ine(e)))}var une=cne,dne=rne,fne=une;function hne(e,t){return e!=null&&fne(e,t,dne)}var pne=hne,mne=Ej,gne=iD,vne=pne,yne=sj,xne=YD,bne=XD,wne=xv,Sne=1,jne=2;function Pne(e,t){return yne(e)&&xne(t)?bne(wne(e),t):function(r){var n=gne(r,e);return n===void 0&&n===t?vne(r,e):mne(t,n,Sne|jne)}}var Nne=Pne;function _ne(e){return e}var Yc=_ne;function One(e){return function(t){return t==null?void 0:t[e]}}var Ene=One,kne=pj;function Cne(e){return function(t){return kne(t,e)}}var Ane=Cne,Tne=Ene,Mne=Ane,Ine=sj,$ne=xv;function Rne(e){return Ine(e)?Tne($ne(e)):Mne(e)}var Dne=Rne,Lne=ene,Fne=Nne,Bne=Yc,Une=Kr,zne=Dne;function Wne(e){return typeof e=="function"?e:e==null?Bne:typeof e=="object"?Une(e)?Fne(e[0],e[1]):Lne(e):zne(e)}var Ii=Wne;function Vne(e,t,r,n){for(var i=e.length,a=r+(n?1:-1);n?a--:++a<i;)if(t(e[a],a,e))return a;return-1}var QD=Vne;function Hne(e){return e!==e}var qne=Hne;function Kne(e,t,r){for(var n=r-1,i=e.length;++n<i;)if(e[n]===t)return n;return-1}var Gne=Kne,Yne=QD,Xne=qne,Qne=Gne;function Zne(e,t,r){return t===t?Qne(e,t,r):Yne(e,Xne,r)}var Jne=Zne,eie=Jne;function tie(e,t){var r=e==null?0:e.length;return!!r&&eie(e,t,0)>-1}var rie=tie;function nie(e,t,r){for(var n=-1,i=e==null?0:e.length;++n<i;)if(r(t,e[n]))return!0;return!1}var iie=nie;function aie(){}var oie=aie,vx=qD,sie=oie,lie=Pj,cie=1/0,uie=vx&&1/lie(new vx([,-0]))[1]==cie?function(e){return new vx(e)}:sie,die=uie,fie=RD,hie=rie,pie=iie,mie=LD,gie=die,vie=Pj,yie=200;function xie(e,t,r){var n=-1,i=hie,a=e.length,o=!0,s=[],c=s;if(r)o=!1,i=pie;else if(a>=yie){var u=t?null:gie(e);if(u)return vie(u);o=!1,i=mie,c=new fie}else c=t?[]:s;e:for(;++n<a;){var f=e[n],d=t?t(f):f;if(f=r||f!==0?f:0,o&&d===d){for(var h=c.length;h--;)if(c[h]===d)continue e;t&&c.push(d),s.push(f)}else i(c,d,r)||(c!==s&&c.push(d),s.push(f))}return s}var bie=xie,wie=Ii,Sie=bie;function jie(e,t){return e&&e.length?Sie(e,wie(t)):[]}var Pie=jie;const TO=Ye(Pie);function ZD(e,t,r){return t===!0?TO(e,r):Ce(t)?TO(e,t):e}function rc(e){"@babel/helpers - typeof";return rc=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},rc(e)}var Nie=["ref"];function MO(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Ri(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?MO(Object(r),!0).forEach(function(n){$v(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):MO(Object(r)).forEac
vendor: 4,282 bytes, line 489
489h(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function _ie(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function IO(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,eL(n.key),n)}}function Oie(e,t,r){return t&&IO(e.prototype,t),r&&IO(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Eie(e,t,r){return t=xm(t),kie(e,JD()?Reflect.construct(t,r||[],xm(e).constructor):t.apply(e,r))}function kie(e,t){if(t&&(rc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Cie(e)}function Cie(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 xm(e){return xm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},xm(e)}function Aie(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&&z0(e,t)}function z0(e,t){return z0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},z0(e,t)}function $v(e,t,r){return t=eL(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function eL(e){var t=Tie(e,"string");return rc(t)=="symbol"?t:t+""}function Tie(e,t){if(rc(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(rc(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Mie(e,t){if(e==null)return{};var r=Iie(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Iie(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 $ie(e){return e.value}function Rie(e,t){if(M.isValidElement(e))return M.cloneElement(e,t);if(typeof e=="function")return M.createElement(e,t);t.ref;var r=Mie(t,Nie);return M.createElement(jj,r)}var $O=1,fs=function(e){function t(){var r;_ie(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return r=Eie(this,t,[].concat(i)),$v(r,"lastBoundingBox",{width:-1,height:-1}),r}return Aie(t,e),Oie(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,i=this.getBBox();i?(Math.abs(i.width-this.lastBoundingBox.width)>$O||Math.abs(i.height-this.lastBoundingBox.height)>$O)&&(this.lastBoundingBox.width=i.width,this.lastBoundingBox.height=i.height,n&&n(i)):(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?Ri({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(n){var i=this.props,a=i.layout,o=i.align,s=i.verticalAlign,c=i.margin,u=i.chartWidth,f=i.chartHeight,d,h;if(!n||(n.left===void 0||n.left===null)&&(n.right===void 0||n.right===null))if(o==="center"&&a==="vertical"){var p=this.getBBoxSnapshot();d={left:((u||0)-p.width)/2}}else d=o==="right"?{right:c&&c.right||0}:{left:c&&c.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
489ot();h={top:((f||0)-g.height)/2}}else h=s==="bottom"?{bottom:c&&c.bottom||0}:{top:c&&c.top||0};return Ri(Ri({},d),h)}},{key:"render",value:function(){var n=this,i=this.props,a=i.content,o=i.width,s=i.height,c=i.wrapperStyle,u=i.payloadUniqBy,f=i.payload,d=Ri(Ri({position:"absolute",width:o||"auto",height:s||"auto"},this.getDefaultPosition(c)),c);return M.createElement("div",{className:"recharts-legend-wrapper",style:d,ref:function(p){n.wrapperNode=p}},Rie(a,Ri(Ri({},this.props),{},{payload:ZD(f,u,$ie)})))}}],[{key:"getWithHeight",value:function(n,i){var a=Ri(Ri({},this.defaultProps),n.props),o=a.layout;return o==="vertical"&&oe(n.props.height)?{height:n.props.height}:o==="horizontal"?{width:n.props.width||i}:null}}])}(v.PureComponent);$v(fs,"displayName","Legend");$v(fs,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var RO=Wf,Die=Nj,Lie=Kr,DO=RO?RO.isConcatSpreadable:void 0;function Fie(e){return Lie(e)||Die(e)||!!(DO&&e&&e[DO])}var Bie=Fie,Uie=BD,zie=Bie;function tL(e,t,r,n,i){var a=-1,o=e.length;for(r||(r=zie),i||(i=[]);++a<o;){var s=e[a];t>0&&r(s)?t>1?tL(s,t-1,r,n,i):Uie(i,s):n||(i[i.length]=s)}return i}var rL=tL;function Wie(e){return function(t,r,n){for(var i=-1,a=Object(t),o=n(t),s=o.length;s--;){var c=o[e?s:++i];if(r(a[c],c,a)===!1)break}return t}}var Vie=Wie,Hie=Vie,qie=Hie(),Kie=qie,Gie=Kie,Yie=Iv;function Xie(e,t){return e&&Gie(e,t,Yie)}var nL=Xie,Qie=Kf;function Zie(e,t){return function(r,n){if(r==null)return r;if(!Qie(r))return e(r,n);for(var i=r.length,a=t?i:-1,o=Object(r);(t?a--:++a<i)&&n(o[a],a,o)!==!1;);return r}}var Jie=Zie,eae=nL,tae=Jie,rae=tae(eae),kj=rae,nae=kj,iae=Kf;function aae(e,t){var r=-1,n=iae(e)?Array(e.length):[];return nae(e,function(i,a,o){n[++r]=t(i,a,o)}),n}var iL=aae;function oae(e,t){var r=e.length;for(e.sort(t);r--;)e[r]=e[r].value;return e}var sae=oae,LO=zc;function lae(e,t){if(e!==t){var r=e!==void 0,n=e===null,i=e===e,a=LO(e),o=t!==void 0,s=t===null,c=t===t,u=LO(t);if(!s&&!u&&!a&&e>t||a&&o&&c&&!s&&!u||n&&o&&c||!r&&c||!i)return 1;if(!n&&!a&&!u&&e<t||u&&r&&i&&!n&&!a||s&&r&&i||!o&&i||!c)return-1}return 0}var cae=lae,uae=cae;function dae(e,t,r){for(var n=-1,i=e.criteria,a=t.criteria,o=i.length,s=r.length;++n<o;){var c=uae(i[n],a[n]);if(c){if(n>=s)return c;var u=r[n];return c*(u=="desc"?-1:1)}}return e.index-t.index}var fae=dae,yx=hj,hae=pj,pae=Ii,mae=iL,gae=sae,vae=WD,yae=fae,xae=Yc,bae=Kr;function wae(e,t,r){t.length?t=yx(t,function(a){return bae(a)?function(o){return hae(o,a.length===1?a[0]:a)}:a}):t=[xae];var n=-1;t=yx(t,vae(pae));var i=mae(e,function(a,o,s){var c=yx(t,function(u){return u(a)});return{criteria:c,index:++n,value:a}});return gae(i,function(a,o){return yae(a,o,r)})}var Sae=wae;function jae(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 Pae=jae,Nae=Pae,FO=Math.max;function _ae(e,t,r){return t=FO(t===void 0?e.length-1:t,0),function(){for(var n=arguments,i=-1,a=FO(n.length-t,0),o=Array(a);++i<a;)o[i]=n[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=n[i];return s[t]=r(o),Nae(e,this,s)}}var Oae=_ae;function Eae(e){return function(){return e}}var kae=Eae,Cae=Bs,Aae=function(){try{var e=Cae(Object,"defineProperty");return e({},"",{}),e}catch{}}(),aL=Aae,Tae=kae,BO=aL,Mae=Yc,Iae=BO?function(e,t){return BO(e,"toString",{configurable:!0,enumerable:!1,value:Tae(t),writable:!0})}:Mae,$ae=Iae,Rae=800,Dae=16,Lae=Date.now;function Fae(e){var t=0,r=0;return function(){var n=Lae(),i=Dae-(n-r);if(r=n,i>0){if(++t>=Rae)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var Bae=Fae,Uae=$ae,zae=Bae,Wae=zae(Uae),Vae=Wae,Hae=Yc,qae=Oae,Kae=Vae;function Gae(e,t){return Kae(qae(e,t,Hae),e+"")}var Yae=Gae,Xae=cj,Qae=Kf,Zae=_j,Jae=No;function eoe(e,t,r){if(!Jae(r))return!1;var n=typeof t;return(n=="number"?Qae(r)&&Zae(t,r.length):n=="string"&&t in r)?Xae(r[t],e):!1}var Rv=eoe,toe=rL,roe=Sae,noe=Yae,UO=Rv,ioe=noe(function(e,t){if(e==null)return[];var r=t.length;return r>1&&UO(e,t[0],t[1])?t=[]:r>2&&UO(t[0],t[1],t[2])&&(t=[t[0]]),roe(e,toe(t,1),[])}),aoe=ioe;const Cj=Ye(aoe);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 W0(){return W0=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];
vendor: 10,905 bytes, lines 489-490
489for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},W0.apply(this,arguments)}function ooe(e,t){return uoe(e)||coe(e,t)||loe(e,t)||soe()}function soe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 490In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function loe(e,t){if(e){if(typeof e=="string")return zO(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 zO(e,t)}}function zO(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 coe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,s=[],c=!0,u=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(c=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);c=!0);}catch(f){u=!0,i=f}finally{try{if(!c&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function uoe(e){if(Array.isArray(e))return e}function WO(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function xx(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?WO(Object(r),!0).forEach(function(n){doe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):WO(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function doe(e,t,r){return t=foe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function foe(e){var t=hoe(e,"string");return Ld(t)=="symbol"?t:t+""}function hoe(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)}function poe(e){return Array.isArray(e)&&qt(e[0])&&qt(e[1])?e.join(" ~ "):e}var moe=function(t){var r=t.separator,n=r===void 0?" : ":r,i=t.contentStyle,a=i===void 0?{}:i,o=t.itemStyle,s=o===void 0?{}:o,c=t.labelStyle,u=c===void 0?{}:c,f=t.payload,d=t.formatter,h=t.itemSorter,p=t.wrapperClassName,g=t.labelClassName,m=t.label,y=t.labelFormatter,x=t.accessibilityLayer,b=x===void 0?!1:x,w=function(){if(f&&f.length){var E={padding:0,margin:0},I=(h?Cj(f,h):f).map(function(T,$){if(T.type==="none")return null;var R=xx({display:"block",paddingTop:4,paddingBottom:4,color:T.color||"#000"},s),U=T.formatter||d||poe,A=T.value,D=T.name,F=A,z=D;if(U&&F!=null&&z!=null){var H=U(A,D,T,$,f);if(Array.isArray(H)){var ue=ooe(H,2);F=ue[0],z=ue[1]}else F=H}return M.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat($),style:R},qt(z)?M.createElement("span",{className:"recharts-tooltip-item-name"},z):null,qt(z)?M.createElement("span",{className:"recharts-tooltip-item-separator"},n):null,M.createElement("span",{className:"recharts-tooltip-item-value"},F),M.createElement("span",{className:"recharts-tooltip-item-unit"},T.unit||""))});return M.createElement("ul",{className:"recharts-tooltip-item-list",style:E},I)}return null},S=xx({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},a),j=xx({margin:0},u),P=!Fe(m),N=P?m:"",_=Te("recharts-default-tooltip",p),O=Te("recharts-tooltip-label",g);P&&y&&f!==void 0&&f!==null&&(N=y(m,f));var k=b?{role:"status","aria-live":"assertive"}:{};return M.createElement("div",W0({className:_,style:S},k),M.createElement("p",{className:O,style:j},M.isValidElement(N)?N:"".concat(N)),w())};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)}function Rh(e,t,r){return t=goe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function goe(e){var t=voe(e,"string");return Fd(t)=="symbol"?t:t+""}function voe(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)}var pu="recharts-tooltip-wrapper",yoe={visibility:"hidden"};function xoe(e){var t=e.coordinate,r=e.translateX,n=e.translateY;return Te(pu,Rh(Rh(Rh(Rh({},"".concat(pu,"-right"),oe(r)&&t&&oe(t.x)&&r>=t.x),"".concat(pu,"-left"),oe(r)&&t&&oe(t.x)&&r<t.x),"".concat(pu,"-bottom"),oe(n)&&t&&oe(t.y)&&n>=t.y),"".concat(pu,"-top"),oe(n)&&t&&oe(t.y)&&n<t.y))}function VO(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.key,i=e.offsetTopLeft,a=e.position,o=e.reverseDirection,s=e.tooltipDimension,c=e.viewBox,u=e.viewBoxDimension;if(a&&oe(a[n]))return a[n];var f=r[n]-s-i,d=r[n]+i;if(t[n])return o[n]?f:d;if(o[n]){var h=f,p=c[n];return h<p?Math.max(d,c[n]):Math.max(f,c[n])}var g=d+s,m=c[n]+u;return g>m?Math.max(f,c[n]):Math.max(d,c[n])}function boe(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 woe(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.offsetTopLeft,i=e.position,a=e.reverseDirection,o=e.tooltipBox,s=e.useTranslate3d,c=e.viewBox,u,f,d;return o.height>0&&o.width>0&&r?(f=VO({allowEscapeViewBox:t,coordinate:r,key:"x",offsetTopLeft:n,position:i,reverseDirection:a,tooltipDimension:o.width,viewBox:c,viewBoxDimension:c.width}),d=VO({allowEscapeViewBox:t,coordinate:r,key:"y",offsetTopLeft:n,position:i,reverseDirection:a,tooltipDimension:o.height,viewBox:c,viewBoxDimension:c.height}),u=boe({translateX:f,translateY:d,useTranslate3d:s})):u=yoe,{cssProperties:u,cssClasses:xoe({translateX:f,translateY:d,coordinate:r})}}function nc(e){"@babel/helpers - typeof";return nc=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},nc(e)}function HO(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function qO(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?HO(Object(r),!0).forEach(function(n){H0(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):HO(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Soe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function joe(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,sL(n.key),n)}}function Poe(e,t,r){return t&&joe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Noe(e,t,r){return t=bm(t),_oe(e,oL()?Reflect.construct(t,r||[],bm(e).constructor):t.apply(e,r))}function _oe(e,t){if(t&&(nc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ooe(e)}function Ooe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function oL(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(oL=function(){return!!e})()}function bm(e){return bm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},bm(e)}function Eoe(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&&V0(e,t)}function V0(e,t){return V0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},V0(e,t)}function H0(e,t,r){return t=sL(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function sL(e){var t=koe(e,"string");return nc(t)=="symbol"?t:t+""}function koe(e,t){if(nc(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(nc(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var KO=1,Coe=function(e){function t(){var r;Soe(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return r=Noe(this,t,[].concat(i)),H0(r,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),H0(r,"handleKeyDown",function(o){if(o.key==="Escape"){var s,c,u,f;r.setState({dismissed:!0,dismissedAtCoordinate:{x:(s=(c=r.props.coordinate)===null||c===void 0?void 0:c.x)!==null&&s!==void 0?s:0,y:(u=(f=r.props.coordinate)===null||f===void 0?void 0:f.y)!==null&&u!==void 0?u:0}})}}),r}return Eoe(t,e),Poe(t,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var n=this.wrapperNode.getBoundingClientRect();(Math.abs(n.width-this.state.lastBoundingBox.width)>KO||Math.abs(n.height-this.state.lastBoundingBox.height)>KO)&&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,i;this.props.active&&this.updateBBox(),this.state.dismissed&&(((n=this.props.coordinate)===null||n===void 0?void 0:n.x)!==this.state.dismissedAtCoordinate.x||((i=this.props.coordinate)===null||i===void 0?void 0:i.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var n=this,i=this.props,a=i.active,o=i.allowEscapeViewBox,s=i.animationDuration,c=i.animationEasing,u=i.children,f=i.coordinate,d=i.hasPayload,h=i.isAnimationActive,p=i.offset,g=i.position,m=i.reverseDirection,y=i.useTranslate3d,x=i.viewBox,b=i.wrapperStyle,w=woe({allowEscapeViewBox:o,coordinate:f,offsetTopLeft:p,position:g,reverseDirection:m,tooltipBox:this.state.lastBoundingBox,useTranslate3d:y,viewBox:x}
490),S=w.cssClasses,j=w.cssProperties,P=qO(qO({transition:h&&a?"transform ".concat(s,"ms ").concat(c):void 0},j),{},{pointerEvents:"none",visibility:!this.state.dismissed&&a&&d?"visible":"hidden",position:"absolute",top:0,left:0},b);return M.createElement("div",{tabIndex:-1,className:S,style:P,ref:function(_){n.wrapperNode=_}},u)}}])}(v.PureComponent),Aoe=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},wi={isSsr:Aoe(),get:function(t){return wi[t]},set:function(t,r){if(typeof t=="string")wi[t]=r;else{var n=Object.keys(t);n&&n.length&&n.forEach(function(i){wi[i]=t[i]})}}};function ic(e){"@babel/helpers - typeof";return ic=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},ic(e)}function GO(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).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){Aj(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 Toe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Moe(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,cL(n.key),n)}}function Ioe(e,t,r){return t&&Moe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function $oe(e,t,r){return t=wm(t),Roe(e,lL()?Reflect.construct(t,r||[],wm(e).constructor):t.apply(e,r))}function Roe(e,t){if(t&&(ic(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Doe(e)}function Doe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function lL(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(lL=function(){return!!e})()}function wm(e){return wm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},wm(e)}function Loe(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&&q0(e,t)}function q0(e,t){return q0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},q0(e,t)}function Aj(e,t,r){return t=cL(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function cL(e){var t=Foe(e,"string");return ic(t)=="symbol"?t:t+""}function Foe(e,t){if(ic(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(ic(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Boe(e){return e.dataKey}function Uoe(e,t){return M.isValidElement(e)?M.cloneElement(e,t):typeof e=="function"?M.createElement(e,t):M.createElement(moe,t)}var ci=function(e){function t(){return Toe(this,t),$oe(this,t,arguments)}return Loe(t,e),Ioe(t,[{key:"render",value:function(){var n=this,i=this.props,a=i.active,o=i.allowEscapeViewBox,s=i.animationDuration,c=i.animationEasing,u=i.content,f=i.coordinate,d=i.filterNull,h=i.isAnimationActive,p=i.offset,g=i.payload,m=i.payloadUniqBy,y=i.position,x=i.reverseDirection,b=i.useTranslate3d,w=i.viewBox,S=i.wrapperStyle,j=g??[];d&&j.length&&(j=ZD(g.filter(function(N){return N.value!=null&&(N.hide!==!0||n.props.includeHidden)}),m,Boe));var P=j.length>0;return M.createElement(Coe,{allowEscapeViewBox:o,animationDuration:s,animationEasing:c,isAnimationActive:h,active:a,coordinate:f,hasPayload:P,offset:p,position:y,reverseDirection:x,useTranslate3d:b,viewBox:w,wrapperStyle:S},Uoe(u,YO(YO({},this.props),{},{payload:j})))}}])}(v.PureComponent);
vendor: 13,859 bytes, lines 490-496
490Aj(ci,"displayName","Tooltip");Aj(ci,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!wi.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 zoe=Mi,Woe=function(){return zoe.Date.now()},Voe=Woe,Hoe=/\s/;function qoe(e){for(var t=e.length;t--&&Hoe.test(e.charAt(t)););return t}var Koe=qoe,Goe=Koe,Yoe=/^\s+/;function Xoe(e){return e&&e.slice(0,Goe(e)+1).replace(Yoe,"")}var Qoe=Xoe,Zoe=Qoe,XO=No,Joe=zc,QO=NaN,ese=/^[-+]0x[0-9a-f]+$/i,tse=/^0b[01]+$/i,rse=/^0o[0-7]+$/i,nse=parseInt;function ise(e){if(typeof e=="number")return e;if(Joe(e))return QO;if(XO(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=XO(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Zoe(e);var r=tse.test(e);return r||rse.test(e)?nse(e.slice(2),r?2:8):ese.test(e)?QO:+e}var uL=ise,ase=No,bx=Voe,ZO=uL,ose="Expected a function",sse=Math.max,lse=Math.min;function cse(e,t,r){var n,i,a,o,s,c,u=0,f=!1,d=!1,h=!0;if(typeof e!="function")throw new TypeError(ose);t=ZO(t)||0,ase(r)&&(f=!!r.leading,d="maxWait"in r,a=d?sse(ZO(r.maxWait)||0,t):a,h="trailing"in r?!!r.trailing:h);function p(P){var N=n,_=i;return n=i=void 0,u=P,o=e.apply(_,N),o}function g(P){return u=P,s=setTimeout(x,t),f?p(P):o}function m(P){var N=P-c,_=P-u,O=t-N;return d?lse(O,a-_):O}function y(P){var N=P-c,_=P-u;return c===void 0||N>=t||N<0||d&&_>=a}function x(){var P=bx();if(y(P))return b(P);s=setTimeout(x,m(P))}function b(P){return s=void 0,h&&n?p(P):(n=i=void 0,o)}function w(){s!==void 0&&clearTimeout(s),u=0,n=c=i=s=void 0}function S(){return s===void 0?o:b(bx())}function j(){var P=bx(),N=y(P);if(n=arguments,i=this,c=P,N){if(s===void 0)return g(c);if(d)return clearTimeout(s),s=setTimeout(x,t),p(c)}return s===void 0&&(s=setTimeout(x,t)),o}return j.cancel=w,j.flush=S,j}var use=cse,dse=use,fse=No,hse="Expected a function";function pse(e,t,r){var n=!0,i=!0;if(typeof e!="function")throw new TypeError(hse);return fse(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),dse(e,t,{leading:n,maxWait:t,trailing:i})}var mse=pse;const dL=Ye(mse);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 JO(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Dh(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){gse(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 gse(e,t,r){return t=vse(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function vse(e){var t=yse(e,"string");return Bd(t)=="symbol"?t:t+""}function yse(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 xse(e,t){return jse(e)||Sse(e,t)||wse(e,t)||bse()}function bse(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 491In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function wse(e,t){if(e){if(typeof e=="string")return eE(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 eE(e,t)}}function eE(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 Sse(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,s=[],c=!0,u=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(c=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);c=!0);}catch(f){u=!0,i=f}finally{try{if(!c&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function jse(e){if(Array.isArray(e))return e}var fL=v.forwardRef(function(e,t){var r=e.aspect,n=e.initialDimension,i=n===void 0?{width:-1,height:-1}:n,a=e.width,o=a===void 0?"100%":a,s=e.height,c=s===void 0?"100%":s,u=e.minWidth,f=u===void 0?0:u,d=e.minHeight,h=e.maxHeight,p=e.children,g=e.debounce,m=g===void 0?0:g,y=e.id,x=e.className,b=e.onResize,w=e.style,S=w===void 0?{}:w,j=v.useRef(null),P=v.useRef();P.current=b,v.useImperativeHandle(t,function(){return Object.defineProperty(j.current,"current",{get:function(){return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),j.current},configurable:!0})});var N=v.useState({containerWidth:i.width,containerHeight:i.height}),_=xse(N,2),O=_[0],k=_[1],C=v.useCallback(function(I,T){k(function($){var R=Math.round(I),U=Math.round(T);return $.containerWidth===R&&$.containerHeight===U?$:{containerWidth:R,containerHeight:U}})},[]);v.useEffect(function(){var I=function(D){var F,z=D[0].contentRect,H=z.width,ue=z.height;C(H,ue),(F=P.current)===null||F===void 0||F.call(P,H,ue)};m>0&&(I=dL(I,m,{trailing:!0,leading:!1}));var T=new ResizeObserver(I),$=j.current.getBoundingClientRect(),R=$.width,U=$.height;return C(R,U),T.observe(j.current),function(){T.disconnect()}},[C,m]);var E=v.useMemo(function(){var I=O.containerWidth,T=O.containerHeight;if(I<0||T<0)return null;ia(Zo(o)||Zo(c),`The width(%s) and height(%s) are both fixed numbers, 492 maybe you don't need to use a ResponsiveContainer.`,o,c),ia(!r||r>0,"The aspect(%s) must be greater than zero.",r);var $=Zo(o)?I:o,R=Zo(c)?T:c;r&&r>0&&($?R=$/r:R&&($=R*r),h&&R>h&&(R=h)),ia($>0||R>0,`The width(%s) and height(%s) of chart should be greater than 0, 493 please check the style of container, or the props width(%s) and height(%s), 494 or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the 495 height and width.`,$,R,o,c,f,d,r);var U=!Array.isArray(p)&&na(p.type).endsWith("Chart");return M.Children.map(p,function(A){return sD.isElement(A)?v.cloneElement(A,Dh({width:$,height:R},U?{style:Dh({height:"100%",width:"100%",maxHeight:R,maxWidth:$},A.props.style)}:{})):A})},[r,p,c,h,d,f,O,o]);return M.createElement("div",{id:y?"".concat(y):void 0,className:Te("recharts-responsive-container",x),style:Dh(Dh({},S),{},{width:o,height:c,minWidth:f,minHeight:d,maxHeight:h}),ref:j},E)}),hL=function(t){return null};hL.displayName="Cell";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 tE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function K0(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?tE(Object(r),!0).forEach(function(n){Pse(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):tE(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Pse(e,t,r){return t=Nse(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Nse(e){var t=_se(e,"string");return Ud(t)=="symbol"?t:t+""}function _se(e,t){if(Ud(e)!="object"||!e)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)}var Ks={widthCache:{},cacheCount:0},Ose=2e3,Ese={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},rE="recharts_measurement_span";function kse(e){var t=K0({},e);return Object.keys(t).forEach(function(r){t[r]||delete t[r]}),t}var Qu=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||wi.isSsr)return{width:0,height:0};var n=kse(r),i=JSON.stringify({text:t,copyStyle:n});if(Ks.widthCache[i])return Ks.widthCache[i];try{var a=document.getElementById(rE);a||(a=document.createElement("span"),a.setAttribute("id",rE),a.setAttribute("aria-hidden","true"),document.body.appendChild(a));var o=K0(K0({},Ese),n);Object.assign(a.style,o),a.textContent="".concat(t);var s=a.getBoundingClientRect(),c={width:s.width,height:s.height};return Ks.widthCache[i]=c,++Ks.cacheCount>Ose&&(Ks.cacheCount=0,Ks.widthCache={}),c}catch{return{width:0,height:0}}},Cse=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function zd(e){"@babel/helpers - typeof";return zd=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},zd(e)}function Sm(e,t){return Ise(e)||Mse(e,t)||Tse(e,t)||Ase()}function Ase(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 496In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Tse(e,t){if(e){if(typeof e=="string")return nE(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 nE(e,t)}}function nE(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 Mse(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,s=[],c=!0,u=!1;try{if(a=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);c=!0);}catch(f){u=!0,i=f}finally{try{if(!c&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function Ise(e){if(Array.isArray(e))return e}function $se(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function iE(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,Dse(n.key),n)}}function Rse(e,t,r){return t&&iE(e.prototype,t),r&&iE(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Dse(e){var t=Lse(e,"string");return zd(t)=="symbol"?t:t+""}function Lse(e,t){if(zd(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(zd(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var aE=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,oE=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,Fse=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,Bse=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,pL={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},Use=Object.keys(pL),hl="NaN";function zse(e,t){return e*pL[t]}var Lh=function(){function e(t,r){$se(this,e),this.num=t,this.unit=r,this.num=t,this.unit=r,Number.isNaN(t)&&(this.unit=""),r!==""&&!Fse.test(r)&&(this.num=NaN,this.unit=""),Use.includes(r)&&(this.num=zse(t,r),this.unit="px")}return Rse(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,i=(n=Bse.exec(r))!==null&&n!==void 0?n:[],a=Sm(i,3),o=a[1],s=a[2];return new e(parseFloat(o),s??"")}}])}();function mL(e){if(e.includes(hl))return hl;for(var t=e;t.includes("*")||t.includes("/");){var r,n=(r=aE.exec(t))!==null&&r!==void 0?r:[],i=Sm(n,4),a=i[1],o=i[2],s=i[3],c=Lh.parse(a??""),u=Lh.parse(s??""),f=o==="*"?c.multiply(u):c.divide(u);if(f.isNaN())return hl;t=t.replace(aE,f.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var d,h=(d=oE.exec(t))!==null&&d!==void 0?d:[],p=Sm(h,4),g=p[1],m=p[2],y=p[3],x=Lh.parse(g??""),b=Lh.parse(y??""),w=m==="+"?x.add(b):x.subtract(b);if(w.isNaN())return hl;t=t.replace(oE,w.toString())}return t}var sE=/\(([^()]*)\)/;function Wse(e){for(var t=e;t.includes("(");){var r=sE.exec(t),n=Sm(r,2),i=n[1];t=t.replace(sE,mL(i))}return t}function Vse(e){var t=e.replace(/\s+/g,"");return t=Wse(t),t=mL(t),t}function Hse(e){try{return Vse(e)}catch{return hl}}function wx(e){var t=Hse(e.slice(5,-1));return t===hl?"":t}var qse=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],Kse=["dx","dy","angle","className","breakAll"];function G0(){return G0=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];
496for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},G0.apply(this,arguments)}function lE(e,t){if(e==null)return{};var r=Gse(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Gse(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 cE(e,t){return Zse(e)||Qse(e,t)||Xse(e,t)||Yse()}function Yse(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 497In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Xse(e,t){if(e){if(typeof e=="string")return uE(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 uE(e,t)}}function uE(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 Qse(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,s=[],c=!0,u=!1;try{if(a=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);c=!0);}catch(f){u=!0,i=f}finally{try{if(!c&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function Zse(e){if(Array.isArray(e))return e}var gL=/[ \f\n\r\t\v\u2028\u2029]+/,vL=function(t){var r=t.children,n=t.breakAll,i=t.style;try{var a=[];Fe(r)||(n?a=r.toString().split(""):a=r.toString().split(gL));var o=a.map(function(c){return{word:c,width:Qu(c,i).width}}),s=n?0:Qu(" ",i).width;return{wordsWithComputedWidth:o,spaceWidth:s}}catch{return null}},Jse=function(t,r,n,i,a){var o=t.maxLines,s=t.children,c=t.style,u=t.breakAll,f=oe(o),d=s,h=function(){var $=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return $.reduce(function(R,U){var A=U.word,D=U.width,F=R[R.length-1];if(F&&(i==null||a||F.width+D+n<Number(i)))F.words.push(A),F.width+=D+n;else{var z={words:[A],width:D};R.push(z)}return R},[])},p=h(r),g=function($){return $.reduce(function(R,U){return R.width>U.width?R:U})};if(!f)return p;for(var m="â¦",y=function($){var R=d.slice(0,$),U=vL({breakAll:u,style:c,children:R+m}).wordsWithComputedWidth,A=h(U),D=A.length>o||g(A).width>Number(i);return[D,A]},x=0,b=d.length-1,w=0,S;x<=b&&w<=d.length-1;){var j=Math.floor((x+b)/2),P=j-1,N=y(P),_=cE(N,2),O=_[0],k=_[1],C=y(j),E=cE(C,1),I=E[0];if(!O&&!I&&(x=j+1),O&&I&&(b=j-1),!O&&I){S=k;break}w++}return S||p},dE=function(t){var r=Fe(t)?[]:t.toString().split(gL);return[{words:r}]},ele=function(t){var r=t.width,n=t.scaleToFit,i=t.children,a=t.style,o=t.breakAll,s=t.maxLines;if((r||n)&&!wi.isSsr){var c,u,f=vL({breakAll:o,children:i,style:a});if(f){var d=f.wordsWithComputedWidth,h=f.spaceWidth;c=d,u=h}else return dE(i);return Jse({breakAll:o,children:i,maxLines:s,style:a},c,u,r,n)}return dE(i)},fE="#808080",ac=function(t){var r=t.x,n=r===void 0?0:r,i=t.y,a=i===void 0?0:i,o=t.lineHeight,s=o===void 0?"1em":o,c=t.capHeight,u=c===void 0?"0.71em":c,f=t.scaleToFit,d=f===void 0?!1:f,h=t.textAnchor,p=h===void 0?"start":h,g=t.verticalAnchor,m=g===void 0?"end":g,y=t.fill,x=y===void 0?fE:y,b=lE(t,qse),w=v.useMemo(function(){return ele({breakAll:b.breakAll,children:b.children,maxLines:b.maxLines,scaleToFit:d,style:b.style,width:b.width})},[b.breakAll,b.children,b.maxLines,d,b.style,b.width]),S=b.dx,j=b.dy,P=b.angle,N=b.className,_=b.breakAll,O=lE(b,Kse);if(!qt(n)||!qt(a))return null;var k=n+(oe(S)?S:0),C=a+(oe(j)?j:0),E;switch(m){case"start":E=wx("calc(".concat(u,")"));break;case"middle":E=wx("calc(".concat((w.length-1)/2," * -").concat(s," + (").concat(u," / 2))"));break;default:E=wx("calc(".concat(w.length-1," * -").concat(s,")"));break}var I=[];if(d){var T=w[0].width,$=b.width;I.push("scale(".concat((oe($)?$/T:1)/T,")"))}return P&&I.push("rotate(".concat(P,", ").concat(k,", ").concat(C,")")),I.length&&(O.transform=I.join(" ")),M.createElement("text",G0({},je(O,!0),{x:k,y:C,className:Te("recharts-text",N),textAnchor:p,fill:x.includes("url")?fE:x}),w.map(function(R,U){var A=R.words.join(_?"":" ");return M.createElement("tspan",{x:k,dy:U===0?E:s,key:"".concat(A,"-").concat(U)},A)}))};function ho(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function tle(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Tj(e){let t,r,n;e.length!==2?(t=ho,r=(s,c)=>ho(e(s),c),n=(s,c)=>e(s)-c):(t=e===ho||e===tle?e:rle,r=e,n=e);function i(s,c,u=0,f=s.length){if(u<f){if(t(c,c)!==0)return f;do{const d=u+f>>>1;r(s[d],c)<0?u=d+1:f=d}while(u<f)}return u}function a(s,c,u=0,f=s.length){if(u<f){if(t(c,c)!==0)return f;do{const d=u+f>>>1;r(s[d],c)<=0?u=d+1:f=d}while(u<f)}return u}function o(s,c,u=0,f=s.length){const d=i(s,c,u,f-1);return d>u&&n(s[d-1],c)>-n(s[d],c)?d-1:d}return{left:i,center:o,right:a}}function rle(){return 0}function yL(e){return e===null?NaN:+e}function*nle(e,t){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const ile=Tj(ho),Gf=ile.right;Tj(yL).center;class hE extends Map{constructor(t,r=sle){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(const[n,i]of t)this.set(n,i)}get(t){return super.get(pE(this,t))}has(t){return super.has(pE(this,t))}set(t,r){return super.set(ale(this,t),r)}delete(t){return super.delete(ole(this,t))}}function pE({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}
497function ale({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function ole({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function sle(e){return e!==null&&typeof e=="object"?e.valueOf():e}function lle(e=ho){if(e===ho)return xL;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 xL(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const cle=Math.sqrt(50),ule=Math.sqrt(10),dle=Math.sqrt(2);function jm(e,t,r){const n=(t-e)/Math.max(0,r),i=Math.floor(Math.log10(n)),a=n/Math.pow(10,i),o=a>=cle?10:a>=ule?5:a>=dle?2:1;let s,c,u;return i<0?(u=Math.pow(10,-i)/o,s=Math.round(e*u),c=Math.round(t*u),s/u<e&&++s,c/u>t&&--c,u=-u):(u=Math.pow(10,i)*o,s=Math.round(e/u),c=Math.round(t/u),s*u<e&&++s,c*u>t&&--c),c<s&&.5<=r&&r<2?jm(e,t,r*2):[s,c,u]}function Y0(e,t,r){if(t=+t,e=+e,r=+r,!(r>0))return[];if(e===t)return[e];const n=t<e,[i,a,o]=n?jm(t,e,r):jm(e,t,r);if(!(a>=i))return[];const s=a-i+1,c=new Array(s);if(n)if(o<0)for(let u=0;u<s;++u)c[u]=(a-u)/-o;else for(let u=0;u<s;++u)c[u]=(a-u)*o;else if(o<0)for(let u=0;u<s;++u)c[u]=(i+u)/-o;else for(let u=0;u<s;++u)c[u]=(i+u)*o;return c}function X0(e,t,r){return t=+t,e=+e,r=+r,jm(e,t,r)[2]}function Q0(e,t,r){t=+t,e=+e,r=+r;const n=t<e,i=n?X0(t,e,r):X0(e,t,r);return(n?-1:1)*(i<0?1/-i:i)}function mE(e,t){let r;for(const n of e)n!=null&&(r<n||r===void 0&&n>=n)&&(r=n);return r}function gE(e,t){let r;for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);return r}function bL(e,t,r=0,n=1/0,i){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(i=i===void 0?xL:lle(i);n>r;){if(n-r>600){const c=n-r+1,u=t-r+1,f=Math.log(c),d=.5*Math.exp(2*f/3),h=.5*Math.sqrt(f*d*(c-d)/c)*(u-c/2<0?-1:1),p=Math.max(r,Math.floor(t-u*d/c+h)),g=Math.min(n,Math.floor(t+(c-u)*d/c+h));bL(e,t,p,g,i)}const a=e[t];let o=r,s=n;for(mu(e,r,t),i(e[n],a)>0&&mu(e,r,n);o<s;){for(mu(e,o,s),++o,--s;i(e[o],a)<0;)++o;for(;i(e[s],a)>0;)--s}i(e[r],a)===0?mu(e,r,s):(++s,mu(e,s,n)),s<=t&&(r=s+1),t<=s&&(n=s-1)}return e}function mu(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function fle(e,t,r){if(e=Float64Array.from(nle(e)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return gE(e);if(t>=1)return mE(e);var n,i=(n-1)*t,a=Math.floor(i),o=mE(bL(e,a).subarray(0,a+1)),s=gE(e.subarray(a+1));return o+(s-o)*(i-a)}}function hle(e,t,r=yL){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,i=(n-1)*t,a=Math.floor(i),o=+r(e[a],a,e),s=+r(e[a+1],a+1,e);return o+(s-o)*(i-a)}}function ple(e,t,r){e=+e,t=+t,r=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+r;for(var n=-1,i=Math.max(0,Math.ceil((t-e)/r))|0,a=new Array(i);++n<i;)a[n]=e+n*r;return a}function In(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function Na(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}const Z0=Symbol("implicit");function Mj(){var e=new hE,t=[],r=[],n=Z0;function i(a){let o=e.get(a);if(o===void 0){if(n!==Z0)return n;e.set(a,o=t.push(a)-1)}return r[o%r.length]}return i.domain=function(a){if(!arguments.length)return t.slice();t=[],e=new hE;for(const o of a)e.has(o)||e.set(o,t.push(o)-1);return i},i.range=function(a){return arguments.length?(r=Array.from(a),i):r.slice()},i.unknown=function(a){return arguments.length?(n=a,i):n},i.copy=function(){return Mj(t,r).unknown(n)},In.apply(i,arguments),i}function Wd(){var e=Mj().unknown(void 0),t=e.domain,r=e.range,n=0,i=1,a,o,s=!1,c=0,u=0,f=.5;delete e.unknown;function d(){var h=t().length,p=i<n,g=p?i:n,m=p?n:i;a=(m-g)/Math.max(1,h-c+u*2),s&&(a=Math.floor(a)),g+=(m-g-a*(h-c))*f,o=a*(1-c),s&&(g=Math.round(g),o=Math.round(o));var y=ple(h).map(function(x){return g+a*x});return r(p?y.reverse():y)}return e.domain=function(h){return arguments.length?(t(h),d()):t()},e.range=function(h){return arguments.length?([n,i]=h,n=+n,i=+i,d()):[n,i]},e.rangeRound=function(h){return[n,i]=h,n=+n,i=+i,s=!0,d()},e.bandwidth=function(){return o},e.step=function(){return a},e.round=function(h){return arguments.length?(s=!!h,d()):s},e.padding=function(h){return arguments.length?(c=Math.min(1,u=+h),d()):c},e.paddingInner=function(h){return arguments.length?(c=Math.min(1,h),d()):c},e.paddingOuter=function(h){return arguments.length?(u=+h,d()):u},e.align=function(h){return arguments.length?(f=Math.max(0,Math.min(1,h)),d()):f},e.copy=function(){return Wd(t(),[n,i]).round(s).paddingInner(c).paddingOuter(u).align(f)},In.apply(d(),arguments)}function wL(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return wL(t())},e}function Zu(){return wL(Wd.apply(null,arguments).paddingInner(1))}function Ij(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function SL(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function Yf(){}var Vd=.7,Pm=1/Vd,Ol="\\s*([+-]?\\d+)\\s*",Hd="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Si="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",mle=/^#([0-9a-f]{3,8})$/,gle=new RegExp(`^rgb\\(${Ol},${Ol},${Ol}\\)$`),vle=new RegExp(`^rgb\\(${Si},${Si},${Si}\\)$`),yle=new RegExp(`^rgba\\(${Ol},${Ol},${Ol},${Hd}
497\\)$`),xle=new RegExp(`^rgba\\(${Si},${Si},${Si},${Hd}\\)$`),ble=new RegExp(`^hsl\\(${Hd},${Si},${Si}\\)$`),wle=new RegExp(`^hsla\\(${Hd},${Si},${Si},${Hd}\\)$`),vE={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};Ij(Yf,qd,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:yE,formatHex:yE,formatHex8:Sle,formatHsl:jle,formatRgb:xE,toString:xE});function yE(){return this.rgb().formatHex()}function Sle(){return this.rgb().formatHex8()}function jle(){return jL(this).formatHsl()}function xE(){return this.rgb().formatRgb()}function qd(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=mle.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?bE(t):r===3?new zr(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?Fh(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?Fh(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=gle.exec(e))?new zr(t[1],t[2],t[3],1):(t=vle.exec(e))?new zr(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=yle.exec(e))?Fh(t[1],t[2],t[3],t[4]):(t=xle.exec(e))?Fh(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=ble.exec(e))?jE(t[1],t[2]/100,t[3]/100,1):(t=wle.exec(e))?jE(t[1],t[2]/100,t[3]/100,t[4]):vE.hasOwnProperty(e)?bE(vE[e]):e==="transparent"?new zr(NaN,NaN,NaN,0):null}function bE(e){return new zr(e>>16&255,e>>8&255,e&255,1)}function Fh(e,t,r,n){return n<=0&&(e=t=r=NaN),new zr(e,t,r,n)}function Ple(e){return e instanceof Yf||(e=qd(e)),e?(e=e.rgb(),new zr(e.r,e.g,e.b,e.opacity)):new zr}function J0(e,t,r,n){return arguments.length===1?Ple(e):new zr(e,t,r,n??1)}function zr(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}Ij(zr,J0,SL(Yf,{brighter(e){return e=e==null?Pm:Math.pow(Pm,e),new zr(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Vd:Math.pow(Vd,e),new zr(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new zr(hs(this.r),hs(this.g),hs(this.b),Nm(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:wE,formatHex:wE,formatHex8:Nle,formatRgb:SE,toString:SE}));function wE(){return`#${Jo(this.r)}${Jo(this.g)}${Jo(this.b)}`}function Nle(){return`#${Jo(this.r)}${Jo(this.g)}${Jo(this.b)}${Jo((isNaN(this.opacity)?1:this.opacity)*255)}`}function SE(){const e=Nm(this.opacity);return`${e===1?"rgb(":"rgba("}${hs(this.r)}, ${hs(this.g)}, ${hs(this.b)}${e===1?")":`, ${e})`}`}function Nm(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function hs(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Jo(e){return e=hs(e),(e<16?"0":"")+e.toString(16)}function jE(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new qn(e,t,r,n)}function jL(e){if(e instanceof qn)return new qn(e.h,e.s,e.l,e.opacity);if(e instanceof Yf||(e=qd(e)),!e)return new qn;if(e instanceof qn)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),a=Math.max(t,r,n),o=NaN,s=a-i,c=(a+i)/2;return s?(t===a?o=(r-n)/s+(r<n)*6:r===a?o=(n-t)/s+2:o=(t-r)/s+4,s/=c<.5?a+i:2-a-i,o*=60):s=c>0&&c<1?0:o,new qn(o,s,c,e.opacity)}function _le(e,t,r,n){return arguments.length===1?jL(e):new qn(e,t,r,n??1)}function qn(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}Ij(qn,_le,SL(Yf,{brighter(e){return e=e==null?Pm:Math.pow(Pm,e),new qn(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Vd:Math.pow(Vd,e),new qn(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,i=2*r-n;return new zr(Sx(e>=240?e-240:e+120,i,n),Sx(e,i,n),Sx(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new qn(PE(this.h),Bh(this.s),Bh(this.l),Nm(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=Nm(this.opacity);return`${e===1?"hsl(":"hsla("}${PE(this.h)}, ${Bh(this.s)*100}%, ${Bh(this.l)*100}%${e===1?")":`, ${e})`}`}}));function PE(e){return e=(e||0)%360,e<0?e+360:e}function Bh(e){return Math.max(0,Math.min(1,e||0))}function Sx(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 $j=e=>()=>e;function Ole(e,t){return function(r){return e+r*t}}function Ele(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 kle(e){return(e=+e)==1?PL:function(t,r){return r-t?Ele(t,r,e):$j(isNaN(t)?r:t)}}function PL(e,t){var r=t-e;return r?Ole(e,r):$j(isNaN(e)?t:e)}const NE=function e(t){var r=kle(t);
vendor: 6,071 bytes, line 497
497function n(i,a){var o=r((i=J0(i)).r,(a=J0(a)).r),s=r(i.g,a.g),c=r(i.b,a.b),u=PL(i.opacity,a.opacity);return function(f){return i.r=o(f),i.g=s(f),i.b=c(f),i.opacity=u(f),i+""}}return n.gamma=e,n}(1);function Cle(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),i;return function(a){for(i=0;i<r;++i)n[i]=e[i]*(1-a)+t[i]*a;return n}}function Ale(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Tle(e,t){var r=t?t.length:0,n=e?Math.min(r,e.length):0,i=new Array(n),a=new Array(r),o;for(o=0;o<n;++o)i[o]=Xc(e[o],t[o]);for(;o<r;++o)a[o]=t[o];return function(s){for(o=0;o<n;++o)a[o]=i[o](s);return a}}function Mle(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}function _m(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function Ile(e,t){var r={},n={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?r[i]=Xc(e[i],t[i]):n[i]=t[i];return function(a){for(i in r)n[i]=r[i](a);return n}}var ew=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,jx=new RegExp(ew.source,"g");function $le(e){return function(){return e}}function Rle(e){return function(t){return e(t)+""}}function Dle(e,t){var r=ew.lastIndex=jx.lastIndex=0,n,i,a,o=-1,s=[],c=[];for(e=e+"",t=t+"";(n=ew.exec(e))&&(i=jx.exec(t));)(a=i.index)>r&&(a=t.slice(r,a),s[o]?s[o]+=a:s[++o]=a),(n=n[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,c.push({i:o,x:_m(n,i)})),r=jx.lastIndex;return r<t.length&&(a=t.slice(r),s[o]?s[o]+=a:s[++o]=a),s.length<2?c[0]?Rle(c[0].x):$le(t):(t=c.length,function(u){for(var f=0,d;f<t;++f)s[(d=c[f]).i]=d.x(u);return s.join("")})}function Xc(e,t){var r=typeof t,n;return t==null||r==="boolean"?$j(t):(r==="number"?_m:r==="string"?(n=qd(t))?(t=n,NE):Dle:t instanceof qd?NE:t instanceof Date?Mle:Ale(t)?Cle:Array.isArray(t)?Tle:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?Ile:_m)(e,t)}function Rj(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}function Lle(e,t){t===void 0&&(t=e,e=Xc);for(var r=0,n=t.length-1,i=t[0],a=new Array(n<0?0:n);r<n;)a[r]=e(i,i=t[++r]);return function(o){var s=Math.max(0,Math.min(n-1,Math.floor(o*=n)));return a[s](o-s)}}function Fle(e){return function(){return e}}function Om(e){return+e}var _E=[0,1];function Er(e){return e}function tw(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:Fle(isNaN(t)?NaN:.5)}function Ble(e,t){var r;return e>t&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function Ule(e,t,r){var n=e[0],i=e[1],a=t[0],o=t[1];return i<n?(n=tw(i,n),a=r(o,a)):(n=tw(n,i),a=r(a,o)),function(s){return a(n(s))}}function zle(e,t,r){var n=Math.min(e.length,t.length)-1,i=new Array(n),a=new Array(n),o=-1;for(e[n]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<n;)i[o]=tw(e[o],e[o+1]),a[o]=r(t[o],t[o+1]);return function(s){var c=Gf(e,s,1,n)-1;return a[c](i[c](s))}}function Xf(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Dv(){var e=_E,t=_E,r=Xc,n,i,a,o=Er,s,c,u;function f(){var h=Math.min(e.length,t.length);return o!==Er&&(o=Ble(e[0],e[h-1])),s=h>2?zle:Ule,c=u=null,d}function d(h){return h==null||isNaN(h=+h)?a:(c||(c=s(e.map(n),t,r)))(n(o(h)))}return d.invert=function(h){return o(i((u||(u=s(t,e.map(n),_m)))(h)))},d.domain=function(h){return arguments.length?(e=Array.from(h,Om),f()):e.slice()},d.range=function(h){return arguments.length?(t=Array.from(h),f()):t.slice()},d.rangeRound=function(h){return t=Array.from(h),r=Rj,f()},d.clamp=function(h){return arguments.length?(o=h?!0:Er,f()):o!==Er},d.interpolate=function(h){return arguments.length?(r=h,f()):r},d.unknown=function(h){return arguments.length?(a=h,d):a},function(h,p){return n=h,i=p,f()}}function Dj(){return Dv()(Er,Er)}function Wle(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Em(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 oc(e){return e=Em(Math.abs(e)),e?e[1]:NaN}function Vle(e,t){return function(r,n){for(var i=r.length,a=[],o=0,s=e[0],c=0;i>0&&s>0&&(c+s+1>n&&(s=Math.max(1,n-c)),a.push(r.substring(i-=s,i+s)),!((c+=s+1)>n));)s=e[o=(o+1)%e.length];return a.reverse().join(t)}}function Hle(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var qle=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Kd(e){if(!(t=qle.exec(e)))throw new Error("invalid format: "+e);var t;return new Lj({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]})}Kd.prototype=Lj.prototype;function Lj(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+""}Lj.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 Kle(e){e:for(var t=e.length,r=1,n=-1,i;r<t;++r)switch(e[r]){case".":n=i=r;break;case"0":n===0&&(n=r),i=r;break;default:if(!+e[r])break e;n>0&&(n=0);break}return n>0?e.slice(0,n)+e.slice(i+1):e}var NL;function Gle(e,t){var r=Em(e,t);if(!r)return e+"";var n=r[0],i=r[1],a=i-(NL=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=n.length;return a===o?n:a>o?n+new Array(a-o+1).join("0"):a>0?n.slice(0,a)+"."+n.slice(a):"0."+new Array(1-a).join("0")+Em(e,Math.max(0,t+a-1))[0]}function OE(e,t){var r=Em(e,t);if(!r)return e+"";var n=r[0],i=r[1];return i<0?"0."+new Array(-i).join("0")+n:n.length>i+1?n.slice(0,i+1)+"."+n.slice(i+1):n+new Array(i-n.length+2).join("0")}const EE={"%":(e,t)=>
vendor: 4,870 bytes, line 497
497(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:Wle,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)=>OE(e*100,t),r:OE,s:Gle,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function kE(e){return e}var CE=Array.prototype.map,AE=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Yle(e){var t=e.grouping===void 0||e.thousands===void 0?kE:Vle(CE.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",n=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",a=e.numerals===void 0?kE:Hle(CE.call(e.numerals,String)),o=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"â":e.minus+"",c=e.nan===void 0?"NaN":e.nan+"";function u(d){d=Kd(d);var h=d.fill,p=d.align,g=d.sign,m=d.symbol,y=d.zero,x=d.width,b=d.comma,w=d.precision,S=d.trim,j=d.type;j==="n"?(b=!0,j="g"):EE[j]||(w===void 0&&(w=12),S=!0,j="g"),(y||h==="0"&&p==="=")&&(y=!0,h="0",p="=");var P=m==="$"?r:m==="#"&&/[boxX]/.test(j)?"0"+j.toLowerCase():"",N=m==="$"?n:/[%p]/.test(j)?o:"",_=EE[j],O=/[defgprs%]/.test(j);w=w===void 0?6:/[gprs]/.test(j)?Math.max(1,Math.min(21,w)):Math.max(0,Math.min(20,w));function k(C){var E=P,I=N,T,$,R;if(j==="c")I=_(C)+I,C="";else{C=+C;var U=C<0||1/C<0;if(C=isNaN(C)?c:_(Math.abs(C),w),S&&(C=Kle(C)),U&&+C==0&&g!=="+"&&(U=!1),E=(U?g==="("?g:s:g==="-"||g==="("?"":g)+E,I=(j==="s"?AE[8+NL/3]:"")+I+(U&&g==="("?")":""),O){for(T=-1,$=C.length;++T<$;)if(R=C.charCodeAt(T),48>R||R>57){I=(R===46?i+C.slice(T+1):C.slice(T))+I,C=C.slice(0,T);break}}}b&&!y&&(C=t(C,1/0));var A=E.length+C.length+I.length,D=A<x?new Array(x-A+1).join(h):"";switch(b&&y&&(C=t(D+C,D.length?x-I.length:1/0),D=""),p){case"<":C=E+C+I+D;break;case"=":C=E+D+C+I;break;case"^":C=D.slice(0,A=D.length>>1)+E+C+I+D.slice(A);break;default:C=D+E+C+I;break}return a(C)}return k.toString=function(){return d+""},k}function f(d,h){var p=u((d=Kd(d),d.type="f",d)),g=Math.max(-8,Math.min(8,Math.floor(oc(h)/3)))*3,m=Math.pow(10,-g),y=AE[8+g/3];return function(x){return p(m*x)+y}}return{format:u,formatPrefix:f}}var Uh,Fj,_L;Xle({thousands:",",grouping:[3],currency:["$",""]});function Xle(e){return Uh=Yle(e),Fj=Uh.format,_L=Uh.formatPrefix,Uh}function Qle(e){return Math.max(0,-oc(Math.abs(e)))}function Zle(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(oc(t)/3)))*3-oc(Math.abs(e)))}function Jle(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,oc(t)-oc(e))+1}function OL(e,t,r,n){var i=Q0(e,t,r),a;switch(n=Kd(n??",f"),n.type){case"s":{var o=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(a=Zle(i,o))&&(n.precision=a),_L(n,o)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(a=Jle(i,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=a-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(a=Qle(i))&&(n.precision=a-(n.type==="%")*2);break}}return Fj(n)}function _o(e){var t=e.domain;return e.ticks=function(r){var n=t();return Y0(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var i=t();return OL(i[0],i[i.length-1],r??10,n)},e.nice=function(r){r==null&&(r=10);var n=t(),i=0,a=n.length-1,o=n[i],s=n[a],c,u,f=10;for(s<o&&(u=o,o=s,s=u,u=i,i=a,a=u);f-- >0;){if(u=X0(o,s,r),u===c)return n[i]=o,n[a]=s,t(n);if(u>0)o=Math.floor(o/u)*u,s=Math.ceil(s/u)*u;else if(u<0)o=Math.ceil(o*u)/u,s=Math.floor(s*u)/u;else break;c=u}return e},e}function km(){var e=Dj();return e.copy=function(){return Xf(e,km())},In.apply(e,arguments),_o(e)}function EL(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,Om),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return EL(e).unknown(t)},e=arguments.length?Array.from(e,Om):[0,1],_o(r)}function kL(e,t){e=e.slice();var r=0,n=e.length-1,i=e[r],a=e[n],o;return a<i&&(o=r,r=n,n=o,o=i,i=a,a=o),e[r]=t.floor(i),e[n]=t.ceil(a),e}function TE(e){return Math.log(e)}function ME(e){return Math.exp(e)}function ece(e){return-Math.log(-e)}function tce(e){return-Math.exp(-e)}function rce(e){return isFinite(e)?+("1e"+e):e<0?0:e}function nce(e){return e===10?rce:e===Math.E?Math.exp:t=>Math.pow(e,t)}function ice(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 IE(e){return(t,r)=>-e(-t,r)}function Bj(e){const t=e(TE,ME),r=t.domain;let n=10,i,a;function o(){return i=ice(n),a=nce(n),r()[0]<0?(i=IE(i),a=IE(a),e(ece,tce)):e(TE,ME),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 c=r();let u=c[0],f=c[c.length-1];const d=f<u;d&&([u,f]=[f,u]);let h=i(u),p=i(f),g,m;const y=s==null?10:+s;let x=[];if(!(n%1)&&p-h<y){if(h=Math.floor(h),p=Math.ceil(p),u>0){for(;h<=p;
vendor: 4,459 bytes, line 497
497++h)for(g=1;g<n;++g)if(m=h<0?g/a(-h):g*a(h),!(m<u)){if(m>f)break;x.push(m)}}else for(;h<=p;++h)for(g=n-1;g>=1;--g)if(m=h>0?g/a(-h):g*a(h),!(m<u)){if(m>f)break;x.push(m)}x.length*2<y&&(x=Y0(u,f,y))}else x=Y0(h,p,Math.min(p-h,y)).map(a);return d?x.reverse():x},t.tickFormat=(s,c)=>{if(s==null&&(s=10),c==null&&(c=n===10?"s":","),typeof c!="function"&&(!(n%1)&&(c=Kd(c)).precision==null&&(c.trim=!0),c=Fj(c)),s===1/0)return c;const u=Math.max(1,n*s/t.ticks().length);return f=>{let d=f/a(Math.round(i(f)));return d*n<n-.5&&(d*=n),d<=u?c(f):""}},t.nice=()=>r(kL(r(),{floor:s=>a(Math.floor(i(s))),ceil:s=>a(Math.ceil(i(s)))})),t}function CL(){const e=Bj(Dv()).domain([1,10]);return e.copy=()=>Xf(e,CL()).base(e.base()),In.apply(e,arguments),e}function $E(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function RE(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function Uj(e){var t=1,r=e($E(t),RE(t));return r.constant=function(n){return arguments.length?e($E(t=+n),RE(t)):t},_o(r)}function AL(){var e=Uj(Dv());return e.copy=function(){return Xf(e,AL()).constant(e.constant())},In.apply(e,arguments)}function DE(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function ace(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function oce(e){return e<0?-e*e:e*e}function zj(e){var t=e(Er,Er),r=1;function n(){return r===1?e(Er,Er):r===.5?e(ace,oce):e(DE(r),DE(1/r))}return t.exponent=function(i){return arguments.length?(r=+i,n()):r},_o(t)}function Wj(){var e=zj(Dv());return e.copy=function(){return Xf(e,Wj()).exponent(e.exponent())},In.apply(e,arguments),e}function sce(){return Wj.apply(null,arguments).exponent(.5)}function LE(e){return Math.sign(e)*e*e}function lce(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function TL(){var e=Dj(),t=[0,1],r=!1,n;function i(a){var o=lce(e(a));return isNaN(o)?n:r?Math.round(o):o}return i.invert=function(a){return e.invert(LE(a))},i.domain=function(a){return arguments.length?(e.domain(a),i):e.domain()},i.range=function(a){return arguments.length?(e.range((t=Array.from(a,Om)).map(LE)),i):t.slice()},i.rangeRound=function(a){return i.range(a).round(!0)},i.round=function(a){return arguments.length?(r=!!a,i):r},i.clamp=function(a){return arguments.length?(e.clamp(a),i):e.clamp()},i.unknown=function(a){return arguments.length?(n=a,i):n},i.copy=function(){return TL(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},In.apply(i,arguments),_o(i)}function ML(){var e=[],t=[],r=[],n;function i(){var o=0,s=Math.max(1,t.length);for(r=new Array(s-1);++o<s;)r[o-1]=hle(e,o/s);return a}function a(o){return o==null||isNaN(o=+o)?n:t[Gf(r,o)]}return a.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]]},a.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(ho),i()},a.range=function(o){return arguments.length?(t=Array.from(o),i()):t.slice()},a.unknown=function(o){return arguments.length?(n=o,a):n},a.quantiles=function(){return r.slice()},a.copy=function(){return ML().domain(e).range(t).unknown(n)},In.apply(a,arguments)}function IL(){var e=0,t=1,r=1,n=[.5],i=[0,1],a;function o(c){return c!=null&&c<=c?i[Gf(n,c,0,r)]:a}function s(){var c=-1;for(n=new Array(r);++c<r;)n[c]=((c+1)*t-(c-r)*e)/(r+1);return o}return o.domain=function(c){return arguments.length?([e,t]=c,e=+e,t=+t,s()):[e,t]},o.range=function(c){return arguments.length?(r=(i=Array.from(c)).length-1,s()):i.slice()},o.invertExtent=function(c){var u=i.indexOf(c);return u<0?[NaN,NaN]:u<1?[e,n[0]]:u>=r?[n[r-1],t]:[n[u-1],n[u]]},o.unknown=function(c){return arguments.length&&(a=c),o},o.thresholds=function(){return n.slice()},o.copy=function(){return IL().domain([e,t]).range(i).unknown(a)},In.apply(_o(o),arguments)}function $L(){var e=[.5],t=[0,1],r,n=1;function i(a){return a!=null&&a<=a?t[Gf(e,a,0,n)]:r}return i.domain=function(a){return arguments.length?(e=Array.from(a),n=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(a){return arguments.length?(t=Array.from(a),n=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(a){var o=t.indexOf(a);return[e[o-1],e[o]]},i.unknown=function(a){return arguments.length?(r=a,i):r},i.copy=function(){return $L().domain(e).range(t).unknown(r)},In.apply(i,arguments)}const Px=new Date,Nx=new Date;function Yt(e,t,r,n){function i(a){return e(a=arguments.length===0?new Date:new Date(+a)),a}return i.floor=a=>
vendor: 11,640 bytes, line 497
497(e(a=new Date(+a)),a),i.ceil=a=>(e(a=new Date(a-1)),t(a,1),e(a),a),i.round=a=>{const o=i(a),s=i.ceil(a);return a-o<s-a?o:s},i.offset=(a,o)=>(t(a=new Date(+a),o==null?1:Math.floor(o)),a),i.range=(a,o,s)=>{const c=[];if(a=i.ceil(a),s=s==null?1:Math.floor(s),!(a<o)||!(s>0))return c;let u;do c.push(u=new Date(+a)),t(a,s),e(a);while(u<a&&a<o);return c},i.filter=a=>Yt(o=>{if(o>=o)for(;e(o),!a(o);)o.setTime(o-1)},(o,s)=>{if(o>=o)if(s<0)for(;++s<=0;)for(;t(o,-1),!a(o););else for(;--s>=0;)for(;t(o,1),!a(o););}),r&&(i.count=(a,o)=>(Px.setTime(+a),Nx.setTime(+o),e(Px),e(Nx),Math.floor(r(Px,Nx))),i.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?i.filter(n?o=>n(o)%a===0:o=>i.count(0,o)%a===0):i)),i}const Cm=Yt(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Cm.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Yt(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):Cm);Cm.range;const Xi=1e3,wn=Xi*60,Qi=wn*60,ga=Qi*24,Vj=ga*7,FE=ga*30,_x=ga*365,es=Yt(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Xi)},(e,t)=>(t-e)/Xi,e=>e.getUTCSeconds());es.range;const Hj=Yt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Xi)},(e,t)=>{e.setTime(+e+t*wn)},(e,t)=>(t-e)/wn,e=>e.getMinutes());Hj.range;const qj=Yt(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*wn)},(e,t)=>(t-e)/wn,e=>e.getUTCMinutes());qj.range;const Kj=Yt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Xi-e.getMinutes()*wn)},(e,t)=>{e.setTime(+e+t*Qi)},(e,t)=>(t-e)/Qi,e=>e.getHours());Kj.range;const Gj=Yt(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Qi)},(e,t)=>(t-e)/Qi,e=>e.getUTCHours());Gj.range;const Qf=Yt(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*wn)/ga,e=>e.getDate()-1);Qf.range;const Lv=Yt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/ga,e=>e.getUTCDate()-1);Lv.range;const RL=Yt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/ga,e=>Math.floor(e/ga));RL.range;function Us(e){return Yt(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())*wn)/Vj)}const Fv=Us(0),Am=Us(1),cce=Us(2),uce=Us(3),sc=Us(4),dce=Us(5),fce=Us(6);Fv.range;Am.range;cce.range;uce.range;sc.range;dce.range;fce.range;function zs(e){return Yt(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)/Vj)}const Bv=zs(0),Tm=zs(1),hce=zs(2),pce=zs(3),lc=zs(4),mce=zs(5),gce=zs(6);Bv.range;Tm.range;hce.range;pce.range;lc.range;mce.range;gce.range;const Yj=Yt(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());Yj.range;const Xj=Yt(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());Xj.range;const va=Yt(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());va.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Yt(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)});va.range;const ya=Yt(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());ya.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Yt(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)});ya.range;function DL(e,t,r,n,i,a){const o=[[es,1,Xi],[es,5,5*Xi],[es,15,15*Xi],[es,30,30*Xi],[a,1,wn],[a,5,5*wn],[a,15,15*wn],[a,30,30*wn],[i,1,Qi],[i,3,3*Qi],[i,6,6*Qi],[i,12,12*Qi],[n,1,ga],[n,2,2*ga],[r,1,Vj],[t,1,FE],[t,3,3*FE],[e,1,_x]];function s(u,f,d){const h=f<u;h&&([u,f]=[f,u]);const p=d&&typeof d.range=="function"?d:c(u,f,d),g=p?p.range(u,+f+1):[];return h?g.reverse():g}function c(u,f,d){const h=Math.abs(f-u)/d,p=Tj(([,,y])=>y).right(o,h);if(p===o.length)return e.every(Q0(u/_x,f/_x,d));if(p===0)return Cm.every(Math.max(Q0(u,f,d),1));const[g,m]=o[h/o[p-1][2]<o[p][2]/h?p-1:p];return g.every(m)}return[s,c]}const[vce,yce]=DL(ya,Xj,Bv,RL,Gj,qj),[xce,bce]=DL(va,Yj,Fv,Qf,Kj,Hj);function Ox(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 Ex(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 gu(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function wce(e){var t=e.dateTime,r=e.date,n=e.time,i=e.periods,a=e.days,o=e.shortDays,s=e.months,c=e.shortMonths,u=vu(i),f=yu(i),d=vu(a),h=yu(a),p=vu(o),g=yu(o),m=vu(s),y=yu(s),x=vu(c),b=yu(c),w={a:U,A,b:D,B:F,c:null,d:HE,e:HE,f:Vce,g:eue,G:rue,H:Uce,I:zce,j:Wce,L:LL,m:Hce,M:qce,p:z,q:H,Q:GE,s:YE,S:Kce,u:Gce,U:Yce,V:Xce,w:Qce,W:Zce,x:null,X:null,y:Jce,Y:tue,Z:nue,"%":KE},S={a:ue,A:be,b:Le,B:Be,c:null,d:qE,e:qE,f:sue,g:vue,G:xue,H:iue,I:aue,j:oue,L:BL,m:lue,M:cue,p:se,q:Me,Q:GE,s:YE,S:uue,u:due,U:fue,V:hue,w:pue,W:mue,x:null,X:null,y:gue,Y:yue,Z:bue,"%":KE},j={a:k,A:C,b:E,B:I,c:T,d:WE,e:WE,f:Dce,g:zE,G:UE,H:VE,I:VE,j:Mce,L:Rce,m:Tce,M:Ice,p:O,q:Ace,Q:Fce,s:Bce,S:$ce,u:_ce,U:Oce,V:Ece,w:Nce,W:kce,x:$,X:R,y:zE,Y:UE,Z:Cce,"%":Lce};w.x=P(r,w),w.X=P(n,w),w.c=P(t,w),S.x=P(r,S),S.X=P(n,S),S.c=P(t,S);function P(X,le){return function(fe){var q=[],Ue=-1,Oe=0,lt=X.length,it,Mt,L;for(fe instanceof Date||(fe=new Date(+fe));++Ue<lt;)X.charCodeAt(Ue)===37&&(q.push(X.slice(Oe,Ue)),(Mt=BE[it=X.charAt(++Ue)])!=null?it=X.charAt(++Ue):Mt=it==="e"?" ":"0",(L=le[it])&&(it=L(fe,Mt)),q.push(it),Oe=Ue+1);return q.push(X.slice(Oe,Ue)),q.join("")}}function N(X,le){return function(fe){var q=gu(1900,void 0,1),Ue=_(q,X,fe+="",0),Oe,lt;if(Ue!=fe.length)return null;if("Q"in q)return new Date(q.Q);if("s"in q)return new Date(q.s*1e3+("L"in q?q.L:0));if(le&&!("Z"in q)&&(q.Z=0),"p"in q&&(q.H=q.H%12+q.p*12),q.m===void 0&&(q.m="q"in q?q.q:0),"V"in q){if(q.V<1||q.V>53)return null;"w"in q||(q.w=1),"Z"in q?(Oe=Ex(gu(q.y,0,1)),lt=Oe.getUTCDay(),Oe=lt>4||lt===0?Tm.ceil(Oe):Tm(Oe),Oe=Lv.offset(Oe,(q.V-1)*7),q.y=Oe.getUTCFullYear(),q.m=Oe.getUTCMonth(),q.d=Oe.getUTCDate()+(q.w+6)%7):(Oe=Ox(gu(q.y,0,1)),lt=Oe.getDay(),Oe=lt>4||lt===0?Am.ceil(Oe):Am(Oe),Oe=Qf.offset(Oe,(q.V-1)*7),q.y=Oe.getFullYear(),q.m=Oe.getMonth(),q.d=Oe.getDate()+(q.w+6)%7)}else("W"in q||"U"in q)&&("w"in q||(q.w="u"in q?q.u%7:"W"in q?1:0),lt="Z"in q?Ex(gu(q.y,0,1)).getUTCDay():Ox(gu(q.y,0,1)).getDay(),q.m=0,q.d="W"in q?(q.w+6)%7+q.W*7-(lt+5)%7:q.w+q.U*7-(lt+6)%7);return"Z"in q?(q.H+=q.Z/100|0,q.M+=q.Z%100,Ex(q)):Ox(q)}}function _(X,le,fe,q){for(var Ue=0,Oe=le.length,lt=fe.length,it,Mt;Ue<Oe;){if(q>=lt)return-1;if(it=le.charCodeAt(Ue++),it===37){if(it=le.charAt(Ue++),Mt=j[it in BE?le.charAt(Ue++):it],!Mt||(q=Mt(X,fe,q))<0)return-1}else if(it!=fe.charCodeAt(q++))return-1}return q}function O(X,le,fe){var q=u.exec(le.slice(fe));return q?(X.p=f.get(q[0].toLowerCase()),fe+q[0].length):-1}function k(X,le,fe){var q=p.exec(le.slice(fe));return q?(X.w=g.get(q[0].toLowerCase()),fe+q[0].length):-1}function C(X,le,fe){var q=d.exec(le.slice(fe));return q?(X.w=h.get(q[0].toLowerCase()),fe+q[0].length):-1}function E(X,le,fe){var q=x.exec(le.slice(fe));return q?(X.m=b.get(q[0].toLowerCase()),fe+q[0].length):-1}function I(X,le,fe){var q=m.exec(le.slice(fe));return q?(X.m=y.get(q[0].toLowerCase()),fe+q[0].length):-1}function T(X,le,fe){return _(X,t,le,fe)}function $(X,le,fe){return _(X,r,le,fe)}function R(X,le,fe){return _(X,n,le,fe)}function U(X){return o[X.getDay()]}function A(X){return a[X.getDay()]}function D(X){return c[X.getMonth()]}function F(X){return s[X.getMonth()]}function z(X){return i[+(X.getHours()>=12)]}function H(X){return 1+~~(X.getMonth()/3)}function ue(X){return o[X.getUTCDay()]}function be(X){return a[X.getUTCDay()]}function Le(X){return c[X.getUTCMonth()]}function Be(X){return s[X.getUTCMonth()]}function se(X){return i[+(X.getUTCHours()>=12)]}function Me(X){return 1+~~(X.getUTCMonth()/3)}return{format:function(X){var le=P(X+="",w);return le.toString=function(){return X},le},parse:function(X){var le=N(X+="",!1);return le.toString=function(){return X},le},utcFormat:function(X){var le=P(X+="",S);return le.toString=function(){return X},le},utcParse:function(X){var le=N(X+="",!0);return le.toString=function(){return X},le}}}var BE={"-":"",_:" ",0:"0"},nr=/^\s*\d+/,Sce=/^%/,jce=/[\\^$*+?|[\]().{}]/g;function Ge(e,t,r){var n=e<0?"-":"",i=(n?-e:e)+"",a=i.length;return n+(a<r?new Array(r-a+1).join(t)+i:i)}function Pce(e){return e.replace(jce,"\\$&")}function vu(e){return new RegExp("^(?:"+e.map(Pce).join("|")+")","i")}function yu(e){return new Map(e.map((t,r)=>[t.toLowerCase(),r]))}function Nce(e,t,r){var n=nr.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function _ce(e,t,r){var n=nr.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function Oce(e,t,r){var n=nr.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function Ece(e,t,r){var n=nr.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function kce(e,t,r){var n=nr.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function UE(e,t,r){var n=nr.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function zE(e,t,r){var n=nr.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function Cce(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 Ace(e,t,r){var n=nr.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function Tce(e,t,r){var n=nr.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function WE(e,t,r){var n=nr.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function Mce(e,t,r){var n=nr.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function VE(e,t,r){var n=nr.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function Ice(e,t,r){var n=nr.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function $ce(e,t,r){var n=nr.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function Rce(e,t,r){var n=nr.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function Dce(e,t,r){var n=nr.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function Lce(e,t,r){var n=Sce.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function Fce(e,t,r){var n=nr.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function Bce(e,t,r){var n=nr.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function HE(e,t){return Ge(e.getDate(),t,2)}function Uce(e,t){return Ge(e.getHours(),t,2)}function zce(e,t){return Ge(e.getHours()%12||12,t,2)}function Wce(e,t){return Ge(1+Qf.count(va(e),e),t,3)}function LL(e,t){return Ge(e.getMilliseconds(),t,3)}function Vce(e,t){return LL(e,t)+"000"}function Hce(e,t){return Ge(e.getMonth()+1,t,2)}function qce(e,t){return Ge(e.getMinutes(),t,2)}function Kce(e,t){return Ge(e.getSeconds(),t,2)}function Gce(e){var t=e.getDay();return t===0?7:t}function Yce(e,t){return Ge(Fv.count(va(e)-1,e),t,2)}function FL(e){var t=e.getDay();return t>=4||t===0?sc(e):sc.ceil(e)}function Xce(e,t){return e=FL(e),Ge(sc.count(va(e),e)+(va(e).getDay()===4),t,2)}function Qce(e){return e.getDay()}function Zce(e,t){return Ge(Am.count(va(e)-1,e),t,2)}
497function Jce(e,t){return Ge(e.getFullYear()%100,t,2)}function eue(e,t){return e=FL(e),Ge(e.getFullYear()%100,t,2)}function tue(e,t){return Ge(e.getFullYear()%1e4,t,4)}function rue(e,t){var r=e.getDay();return e=r>=4||r===0?sc(e):sc.ceil(e),Ge(e.getFullYear()%1e4,t,4)}function nue(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Ge(t/60|0,"0",2)+Ge(t%60,"0",2)}function qE(e,t){return Ge(e.getUTCDate(),t,2)}function iue(e,t){return Ge(e.getUTCHours(),t,2)}function aue(e,t){return Ge(e.getUTCHours()%12||12,t,2)}function oue(e,t){return Ge(1+Lv.count(ya(e),e),t,3)}function BL(e,t){return Ge(e.getUTCMilliseconds(),t,3)}function sue(e,t){return BL(e,t)+"000"}function lue(e,t){return Ge(e.getUTCMonth()+1,t,2)}function cue(e,t){return Ge(e.getUTCMinutes(),t,2)}function uue(e,t){return Ge(e.getUTCSeconds(),t,2)}function due(e){var t=e.getUTCDay();return t===0?7:t}function fue(e,t){return Ge(Bv.count(ya(e)-1,e),t,2)}function UL(e){var t=e.getUTCDay();return t>=4||t===0?lc(e):lc.ceil(e)}function hue(e,t){return e=UL(e),Ge(lc.count(ya(e),e)+(ya(e).getUTCDay()===4),t,2)}function pue(e){return e.getUTCDay()}function mue(e,t){return Ge(Tm.count(ya(e)-1,e),t,2)}function gue(e,t){return Ge(e.getUTCFullYear()%100,t,2)}function vue(e,t){return e=UL(e),Ge(e.getUTCFullYear()%100,t,2)}function yue(e,t){return Ge(e.getUTCFullYear()%1e4,t,4)}function xue(e,t){var r=e.getUTCDay();return e=r>=4||r===0?lc(e):lc.ceil(e),Ge(e.getUTCFullYear()%1e4,t,4)}function bue(){return"+0000"}function KE(){return"%"}function GE(e){return+e}function YE(e){return Math.floor(+e/1e3)}var Gs,zL,WL;wue({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 wue(e){return Gs=wce(e),zL=Gs.format,Gs.parse,WL=Gs.utcFormat,Gs.utcParse,Gs}function Sue(e){return new Date(e)}function jue(e){return e instanceof Date?+e:+new Date(+e)}function Qj(e,t,r,n,i,a,o,s,c,u){var f=Dj(),d=f.invert,h=f.domain,p=u(".%L"),g=u(":%S"),m=u("%I:%M"),y=u("%I %p"),x=u("%a %d"),b=u("%b %d"),w=u("%B"),S=u("%Y");function j(P){return(c(P)<P?p:s(P)<P?g:o(P)<P?m:a(P)<P?y:n(P)<P?i(P)<P?x:b:r(P)<P?w:S)(P)}return f.invert=function(P){return new Date(d(P))},f.domain=function(P){return arguments.length?h(Array.from(P,jue)):h().map(Sue)},f.ticks=function(P){var N=h();return e(N[0],N[N.length-1],P??10)},f.tickFormat=function(P,N){return N==null?j:u(N)},f.nice=function(P){var N=h();return(!P||typeof P.range!="function")&&(P=t(N[0],N[N.length-1],P??10)),P?h(kL(N,P)):f},f.copy=function(){return Xf(f,Qj(e,t,r,n,i,a,o,s,c,u))},f}function Pue(){return In.apply(Qj(xce,bce,va,Yj,Fv,Qf,Kj,Hj,es,zL).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function Nue(){return In.apply(Qj(vce,yce,ya,Xj,Bv,Lv,Gj,qj,es,WL).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Uv(){var e=0,t=1,r,n,i,a,o=Er,s=!1,c;function u(d){return d==null||isNaN(d=+d)?c:o(i===0?.5:(d=(a(d)-r)*i,s?Math.max(0,Math.min(1,d)):d))}u.domain=function(d){return arguments.length?([e,t]=d,r=a(e=+e),n=a(t=+t),i=r===n?0:1/(n-r),u):[e,t]},u.clamp=function(d){return arguments.length?(s=!!d,u):s},u.interpolator=function(d){return arguments.length?(o=d,u):o};function f(d){return function(h){var p,g;return arguments.length?([p,g]=h,o=d(p,g),u):[o(0),o(1)]}}return u.range=f(Xc),u.rangeRound=f(Rj),u.unknown=function(d){return arguments.length?(c=d,u):c},function(d){return a=d,r=d(e),n=d(t),i=r===n?0:1/(n-r),u}}function Oo(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function VL(){var e=_o(Uv()(Er));return e.copy=function(){return Oo(e,VL())},Na.apply(e,arguments)}function HL(){var e=Bj(Uv()).domain([1,10]);return e.copy=function(){return Oo(e,HL()).base(e.base())},Na.apply(e,arguments)}function qL(){var e=Uj(Uv());return e.copy=function(){return Oo(e,qL()).constant(e.constant())},Na.apply(e,arguments)}
vendor: 65,565 bytes, lines 497-524
497function Zj(){var e=zj(Uv());return e.copy=function(){return Oo(e,Zj()).exponent(e.exponent())},Na.apply(e,arguments)}function _ue(){return Zj.apply(null,arguments).exponent(.5)}function KL(){var e=[],t=Er;function r(n){if(n!=null&&!isNaN(n=+n))return t((Gf(e,n,1)-1)/(e.length-1))}return r.domain=function(n){if(!arguments.length)return e.slice();e=[];for(let i of n)i!=null&&!isNaN(i=+i)&&e.push(i);return e.sort(ho),r},r.interpolator=function(n){return arguments.length?(t=n,r):t},r.range=function(){return e.map((n,i)=>t(i/(e.length-1)))},r.quantiles=function(n){return Array.from({length:n+1},(i,a)=>fle(e,a/n))},r.copy=function(){return KL(t).domain(e)},Na.apply(r,arguments)}function zv(){var e=0,t=.5,r=1,n=1,i,a,o,s,c,u=Er,f,d=!1,h;function p(m){return isNaN(m=+m)?h:(m=.5+((m=+f(m))-a)*(n*m<n*a?s:c),u(d?Math.max(0,Math.min(1,m)):m))}p.domain=function(m){return arguments.length?([e,t,r]=m,i=f(e=+e),a=f(t=+t),o=f(r=+r),s=i===a?0:.5/(a-i),c=a===o?0:.5/(o-a),n=a<i?-1:1,p):[e,t,r]},p.clamp=function(m){return arguments.length?(d=!!m,p):d},p.interpolator=function(m){return arguments.length?(u=m,p):u};function g(m){return function(y){var x,b,w;return arguments.length?([x,b,w]=y,u=Lle(m,[x,b,w]),p):[u(0),u(.5),u(1)]}}return p.range=g(Xc),p.rangeRound=g(Rj),p.unknown=function(m){return arguments.length?(h=m,p):h},function(m){return f=m,i=m(e),a=m(t),o=m(r),s=i===a?0:.5/(a-i),c=a===o?0:.5/(o-a),n=a<i?-1:1,p}}function GL(){var e=_o(zv()(Er));return e.copy=function(){return Oo(e,GL())},Na.apply(e,arguments)}function YL(){var e=Bj(zv()).domain([.1,1,10]);return e.copy=function(){return Oo(e,YL()).base(e.base())},Na.apply(e,arguments)}function XL(){var e=Uj(zv());return e.copy=function(){return Oo(e,XL()).constant(e.constant())},Na.apply(e,arguments)}function Jj(){var e=zj(zv());return e.copy=function(){return Oo(e,Jj()).exponent(e.exponent())},Na.apply(e,arguments)}function Oue(){return Jj.apply(null,arguments).exponent(.5)}const XE=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:Wd,scaleDiverging:GL,scaleDivergingLog:YL,scaleDivergingPow:Jj,scaleDivergingSqrt:Oue,scaleDivergingSymlog:XL,scaleIdentity:EL,scaleImplicit:Z0,scaleLinear:km,scaleLog:CL,scaleOrdinal:Mj,scalePoint:Zu,scalePow:Wj,scaleQuantile:ML,scaleQuantize:IL,scaleRadial:TL,scaleSequential:VL,scaleSequentialLog:HL,scaleSequentialPow:Zj,scaleSequentialQuantile:KL,scaleSequentialSqrt:_ue,scaleSequentialSymlog:qL,scaleSqrt:sce,scaleSymlog:AL,scaleThreshold:$L,scaleTime:Pue,scaleUtc:Nue,tickFormat:OL},Symbol.toStringTag,{value:"Module"}));var Eue=zc;function kue(e,t,r){for(var n=-1,i=e.length;++n<i;){var a=e[n],o=t(a);if(o!=null&&(s===void 0?o===o&&!Eue(o):r(o,s)))var s=o,c=a}return c}var Wv=kue;function Cue(e,t){return e>t}var QL=Cue,Aue=Wv,Tue=QL,Mue=Yc;function Iue(e){return e&&e.length?Aue(e,Mue,Tue):void 0}var $ue=Iue;const Vv=Ye($ue);function Rue(e,t){return e<t}var ZL=Rue,Due=Wv,Lue=ZL,Fue=Yc;function Bue(e){return e&&e.length?Due(e,Fue,Lue):void 0}var Uue=Bue;const Hv=Ye(Uue);var zue=hj,Wue=Ii,Vue=iL,Hue=Kr;function que(e,t){var r=Hue(e)?zue:Vue;return r(e,Wue(t))}var Kue=que,Gue=rL,Yue=Kue;function Xue(e,t){return Gue(Yue(e,t),1)}var Que=Xue;const Zue=Ye(Que);var Jue=Ej;function ede(e,t){return Jue(e,t)}var tde=ede;const Zf=Ye(tde);var Qc=1e9,rde={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},tP,xt=!0,An="[DecimalError] ",ps=An+"Invalid argument: ",eP=An+"Exponent out of range: ",Zc=Math.floor,Bo=Math.pow,nde=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,en,Jt=1e7,mt=7,JL=9007199254740991,Mm=Zc(JL/mt),ve={};ve.absoluteValue=ve.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};ve.comparedTo=ve.cmp=function(e){var t,r,n,i,a=this;if(e=new a.constructor(e),a.s!==e.s)return a.s||-e.s;if(a.e!==e.e)return a.e>e.e^a.s<0?1:-1;for(n=a.d.length,i=e.d.length,t=0,r=n<i?n:i;t<r;++t)if(a.d[t]!==e.d[t])return a.d[t]>e.d[t]^a.s<0?1:-1;return n===i?0:n>i^a.s<0?1:-1};ve.decimalPlaces=ve.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*mt;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r};ve.dividedBy=ve.div=function(e){return aa(this,new this.constructor(e))};ve.dividedToIntegerBy=ve.idiv=function(e){var t=this,r=t.constructor;return st(aa(t,new r(e),0,1),r.precision)};ve.equals=ve.eq=function(e){return!this.cmp(e)};ve.exponent=function(){return Bt(this)};ve.greaterThan=ve.gt=function(e){return this.cmp(e)>0};ve.greaterThanOrEqualTo=ve.gte=function(e){return this.cmp(e)>=0};ve.isInteger=ve.isint=function(){return this.e>this.d.length-2};ve.isNegative=ve.isneg=function(){return this.s<0};ve.isPositive=ve.ispos=function(){return this.s>0};ve.isZero=function(){return this.s===0};ve.lessThan=ve.lt=function(e){return this.cmp(e)<0};ve.lessThanOrEqualTo=ve.lte=function(e){return this.cmp(e)<1};ve.logarithm=ve.log=function(e){var t,r=this,n=r.constructor,i=n.precision,a=i+5;if(e===void 0)e=new n(10);else if(e=new n(e),e.s<1||e.eq(en))throw Error(An+"NaN");if(r.s<1)throw Error(An+(r.s?"NaN":"-Infinity"));return r.eq(en)?new n(0):(xt=!1,t=aa(Gd(r,a),Gd(e,a),a),xt=!0,st(t,i))};ve.minus=ve.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?r4(t,e):e4(t,(e.s=-e.s,e))};ve.modulo=ve.mod=function(e){var t,r=this,n=r.constructor,i=n.precision;if(e=new n(e),!e.s)throw Error(An+"NaN");return r.s?(xt=!1,t=aa(r,e,0,1).times(e),xt=!0,r.minus(t)):st(new n(r),i)};ve.naturalExponential=ve.exp=function(){return t4(this)};ve.naturalLogarithm=ve.ln=function(){return Gd(this)};ve.negated=ve.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};ve.plus=ve.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?e4(t,e):r4(t,(e.s=-e.s,e))};ve.precision=ve.sd=function(e){var t,r,n,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(ps+e);if(t=Bt(i)+1,n=i.d.length-1,r=n*mt+1,n=i.d[n],n){for(;n%10==0;n/=10)r--;for(n=i.d[0];n>=10;n/=10)r++}return e&&t>r?t:r};ve.squareRoot=ve.sqrt=function(){var e,t,r,n,i,a,o,s=this,c=s.constructor;if(s.s<1){if(!s.s)return new c(0);throw Error(An+"NaN")}for(e=Bt(s),xt=!1,i=Math.sqrt(+s),i==0||i==1/0?(t=gi(s.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=Zc((e+1)/2)-(e<0||e%2),i==1/0?t="5e"+e:(t=i.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),n=new c(t)):n=new c(i.toString()),r=c.precision,i=o=r+3;;)if(a=n,n=a.plus(aa(s,a,o+2)).times(.5),gi(a.d).slice(0,o)===(t=gi(n.d)).slice(0,o)){if(t=t.slice(o-3,o+1),i==o&&t=="4999"){if(st(a,r+1,0),a.times(a).eq(s)){n=a;break}}else if(t!="9999")break;o+=4}return xt=!0,st(n,r)};ve.times=ve.mul=function(e){var t,r,n,i,a,o,s,c,u,f=this,d=f.constructor,h=f.d,p=(e=new d(e)).d;if(!f.s||!e.s)return new d(0);for(e.s*=f.s,r=f.e+e.e,c=h.length,u=p.length,c<u&&(a=h,h=p,p=a,o=c,c=u,u=o),a=[],o=c+u,n=o;n--;)a.push(0);for(n=u;--n>=0;){for(t=0,i=c+n;i>n;)s=a[i]+p[n]*h[i-n-1]+t,a[i--]=s%Jt|0,t=s/Jt|0;a[i]=(a[i]+t)%Jt|0}for(;!a[--o];)a.pop();return t?++r:a.shift(),e.d=a,e.e=r,xt?st(e,d.precision):e};ve.toDecimalPlaces=ve.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(_i(e,0,Qc),t===void 0?t=n.rounding:_i(t,0,8),st(r,e+Bt(r)+1,t))};ve.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=Ps(n,!0):(_i(e,0,Qc),t===void 0?t=i.rounding:_i(t,0,8),n=st(new i(n),e+1,t),r=Ps(n,!0,e+1)),r};ve.toFixed=function(e,t){var r,n,i=this,a=i.constructor;return e===void 0?Ps(i):(_i(e,0,Qc),t===void 0?t=a.rounding:_i(t,0,8),n=st(new a(i),e+Bt(i)+1,t),r=Ps(n.abs(),!1,e+Bt(n)+1),i.isneg()&&!i.isZero()?"-"+r:r)};ve.toInteger=ve.toint=function(){var e=this,t=e.constructor;return st(new t(e),Bt(e)+1,t.rounding)};ve.toNumber=function(){return+this};ve.toPower=ve.pow=function(e){var t,r,n,i,a,o,s=this,c=s.constructor,u=12,f=+(e=new c(e));if(!e.s)return new c(en);if(s=new c(s),!s.s){if(e.s<1)throw Error(An+"Infinity");return s}if(s.eq(en))return s;if(n=c.precision,e.eq(en))return st(s,n);if(t=e.e,r=e.d.length-1,o=t>=r,a=s.s,o){if((r=f<0?-f:f)<=JL){for(i=new c(en),t=Math.ceil(n/mt+4),xt=!1;r%2&&(i=i.times(s),ZE(i.d,t)),r=Zc(r/2),r!==0;)s=s.times(s),ZE(s.d,t);return xt=!0,e.s<0?new c(en).div(i):st(i,n)}}else if(a<0)throw Error(An+"NaN");return a=a<0&&e.d[Math.max(t,r)]&1?-1:1,s.s=1,xt=!1,i=e.times(Gd(s,n+u)),xt=!0,i=t4(i),i.s=a,i};ve.toPrecision=function(e,t){var r,n,i=this,a=i.constructor;return e===void 0?(r=Bt(i),n=Ps(i,r<=a.toExpNeg||r>=a.toExpPos)):(_i(e,1,Qc),t===void 0?t=a.rounding:_i(t,0,8),i=st(new a(i),e,t),r=Bt(i),n=Ps(i,e<=r||r<=a.toExpNeg,e)),n};ve.toSignificantDigits=ve.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(_i(e,1,Qc),t===void 0?t=n.rounding:_i(t,0,8)),st(new n(r),e,t)};ve.toString=ve.valueOf=ve.val=ve.toJSON=ve[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=Bt(e),r=e.constructor;return Ps(e,t<=r.toExpNeg||t>=r.toExpPos)};function e4(e,t){var r,n,i,a,o,s,c,u,f=e.constructor,d=f.precision;if(!e.s||!t.s)return t.s||(t=new f(e)),xt?st(t,d):t;if(c=e.d,u=t.d,o=e.e,i=t.e,c=c.slice(),a=o-i,a){for(a<0?(n=c,a=-a,s=u.length):(n=u,i=o,s=c.length),o=Math.ceil(d/mt),s=o>s?o+1:s+1,a>s&&(a=s,n.length=1),n.reverse();a--;)n.push(0);n.reverse()}for(s=c.length,a=u.length,s-a<0&&(a=s,n=u,u=c,c=n),r=0;a;)r=(c[--a]=c[a]+u[a]+r)/Jt|0,c[a]%=Jt;for(r&&(c.unshift(r),++i),s=c.length;c[--s]==0;)c.pop();return t.d=c,t.e=i,xt?st(t,d):t}function _i(e,t,r){if(e!==~~e||e<t||e>r)throw Error(ps+e)}function gi(e){var t,r,n,i=e.length-1,a="",o=e[0];if(i>0){for(a+=o,t=1;t<i;t++)n=e[t]+"",r=mt-n.length,r&&(a+=$a(r)),a+=n;o=e[t],n=o+"",r=mt-n.length,r&&(a+=$a(r))}else if(o===0)return"0";for(;o%10===0;)o/=10;return a+o}var aa=function(){function e(n,i){var a,o=0,s=n.length;for(n=n.slice();s--;)a=n[s]*i+o,n[s]=a%Jt|0,o=a/Jt|0;return o&&n.unshift(o),n}function t(n,i,a,o){var s,c;if(a!=o)c=a>o?1:-1;else for(s=c=0;s<a;s++)if(n[s]!=i[s]){c=n[s]>i[s]?1:-1;break}return c}function r(n,i,a){for(var o=0;a--;)n[a]-=o,o=n[a]<i[a]?1:0,n[a]=o*Jt+n[a]-i[a];for(;!n[0]&&n.length>1;)n.shift()}return function(n,i,a,o){var s,c,u,f,d,h,p,g,m,y,x,b,w,S,j,P,N,_,O=n.constructor,k=n.s==i.s?1:-1,C=n.d,E=i.d;if(!n.s)return new O(n);if(!i.s)throw Error(An+"Division by zero");for(c=n.e-i.e,N=E.length,j=C.length,p=new O(k),g=p.d=[],u=0;E[u]==(C[u]||0);)++u;if(E[u]>(C[u]||0)&&--c,a==null?b=a=O.precision:o?b=a+(Bt(n)-Bt(i))+1:b=a,b<0)return new O(0);if(b=b/mt+2|0,u=0,N==1)for(f=0,E=E[0],b++;(u<j||f)&&b--;u++)w=f*Jt+(C[u]||0),g[u]=w/E|0,f=w%E|0;else{for(f=Jt/(E[0]+1)|0,f>1&&(E=e(E,f),C=e(C,f),N=E.length,j=C.length),S=N,m=C.slice(0,N),y=m.length;y<N;)m[y++]=0;_=E.slice(),_.unshift(0),P=E[0],E[1]>=Jt/2&&++P;do f=0,s=t(E,m,N,y),s<0?(x=m[0],N!=y&&(x=x*Jt+(m[1]||0)),f=x/P|0,f>1?(f>=Jt&&(f=Jt-1),d=e(E,f),h=d.length,y=m.length,s=t(d,m,h,y),s==1&&(f--,r(d,N<h?_:E,h))):(f==0&&(s=f=1),d=E.slice()),h=d.length,h<y&&d.unshift(0),r(m,d,y),s==-1&&(y=m.length,s=t(E,m,N,y),s<1&&(f++,r(m,N<y?_:E,y))),y=m.length):s===0&&(f++,m=[0]),g[u++]=f,s&&m[0]?m[y++]=C[S]||0:(m=[C[S]],y=1);while((S++<j||m[0]!==void 0)&&b--)}return g[0]||g.shift(),p.e=c,st(p,o?a+Bt(p)+1:a)}}();function t4(e,t){var r,n,i,a,o,s,c=0,u=0,f=e.constructor,d=f.precision;if(Bt(e)>16)throw Error(eP+Bt(e));if(!e.s)return new f(en);for(t==null?(xt=!1,s=d):s=t,o=new f(.03125);e.abs().gte(.1);)e=e.times(o),u+=5;for(n=Math.log(Bo(2,u))/Math.LN10*2+5|0,s+=n,r=i=a=new f(en),f.precision=s;;){if(i=st(i.times(e),s),r=r.times(++c),o=a.plus(aa(i,r,s)),gi(o.d).slice(0,s)===gi(a.d).slice(0,s)){for(;u--;)a=st(a.times(a),s);return f.precision=d,t==null?(xt=!0,st(a,d)):a}a=o}}function Bt(e){for(var t=e.e*mt,r=e.d[0];r>=10;r/=10)t++;return t}function kx(e,t,r){if(t>e.LN10.sd())throw xt=!0,r&&(e.precision=r),Error(An+"LN10 precision limit exceeded");return st(new e(e.LN10),t)}function $a(e){for(var t="";e--;)t+="0";return t}function Gd(e,t){var r,n,i,a,o,s,c,u,f,d=1,h=10,p=e,g=p.d,m=p.constructor,y=m.precision;if(p.s<1)throw Error(An+(p.s?"NaN":"-Infinity"));if(p.eq(en))return new m(0);if(t==null?(xt=!1,u=y):u=t,p.eq(10))return t==null&&(xt=!0),kx(m,u);if(u+=h,m.precision=u,r=gi(g),n=r.charAt(0),a=Bt(p),Math.abs(a)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)p=p.times(e),r=gi(p.d),n=r.charAt(0),d++;a=Bt(p),n>1?(p=new m("0."+r),a++):p=new m(n+"."+r.slice(1))}else return c=kx(m,u+2,y).times(a+""),p=Gd(new m(n+"."+r.slice(1)),u-h).plus(c),m.precision=y,t==null?(xt=!0,st(p,y)):p;for(s=o=p=aa(p.minus(en),p.plus(en),u),f=st(p.times(p),u),i=3;;){if(o=st(o.times(f),u),c=s.plus(aa(o,new m(i),u)),gi(c.d).slice(0,u)===gi(s.d).slice(0,u))return s=s.times(2),a!==0&&(s=s.plus(kx(m,u+2,y).times(a+""))),s=aa(s,new m(d),u),m.precision=y,t==null?(xt=!0,st(s,y)):s;s=c,i+=2}}function QE(e,t){var r,n,i;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(i=t.length;t.charCodeAt(i-1)===48;)--i;if(t=t.slice(n,i),t){if(i-=n,r=r-n-1,e.e=Zc(r/mt),e.d=[],n=(r+1)%mt,r<0&&(n+=mt),n<i){for(n&&e.d.push(+t.slice(0,n)),i-=mt;n<i;)e.d.push(+t.slice(n,n+=mt));t=t.slice(n),n=mt-t.length}else n-=i;for(;n--;)t+="0";if(e.d.push(+t),xt&&(e.e>Mm||e.e<-Mm))throw Error(eP+r)}else e.s=0,e.e=0,e.d=[0];return e}function st(e,t,r){var n,i,a,o,s,c,u,f,d=e.d;for(o=1,a=d[0];a>=10;a/=10)o++;if(n=t-o,n<0)n+=mt,i=t,u=d[f=0];else{if(f=Math.ceil((n+1)/mt),a=d.length,f>=a)return e;for(u=a=d[f],o=1;a>=10;a/=10)o++;n%=mt,i=n-mt+o}if(r!==void 0&&(a=Bo(10,o-i-1),s=u/a%10|0,c=t<0||d[f+1]!==void 0||u%a,c=r<4?(s||c)&&(r==0||r==(e.s<0?3:2)):s>5||s==5&&(r==4||c||r==6&&(n>0?i>0?u/Bo(10,o-i):0:d[f-1])%10&1||r==(e.s<0?8:7))),t<1||!d[0])return c?(a=Bt(e),d.length=1,t=t-a-1,d[0]=Bo(10,(mt-t%mt)%mt),e.e=Zc(-t/mt)||0):(d.length=1,d[0]=e.e=e.s=0),e;if(n==0?(d.length=f,a=1,f--):(d.length=f+1,a=Bo(10,mt-n),d[f]=i>0?(u/Bo(10,o-i)%Bo(10,i)|0)*a:0),c)for(;;)if(f==0){(d[0]+=a)==Jt&&(d[0]=1,++e.e);break}else{if(d[f]+=a,d[f]!=Jt)break;d[f--]=0,a=1}for(n=d.length;d[--n]===0;)d.pop();if(xt&&(e.e>Mm||e.e<-Mm))throw Error(eP+Bt(e));return e}function r4(e,t){var r,n,i,a,o,s,c,u,f,d,h=e.constructor,p=h.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new h(e),xt?st(t,p):t;if(c=e.d,d=t.d,n=t.e,u=e.e,c=c.slice(),o=u-n,o){for(f=o<0,f?(r=c,o=-o,s=d.length):(r=d,n=u,s=c.length),i=Math.max(Math.ceil(p/mt),s)+2,o>i&&(o=i,r.length=1),r.reverse(),i=o;i--;)r.push(0);r.reverse()}else{for(i=c.length,s=d.length,f=i<s,f&&(s=i),i=0;i<s;i++)if(c[i]!=d[i]){f=c[i]<d[i];break}o=0}for(f&&(r=c,c=d,d=r,t.s=-t.s),s=c.length,i=d.length-s;i>0;--i)c[s++]=0;for(i=d.length;i>o;){if(c[--i]<d[i]){for(a=i;a&&c[--a]===0;)c[a]=Jt-1;--c[a],c[i]+=Jt}c[i]-=d[i]}for(;c[--s]===0;)c.pop();for(;c[0]===0;c.shift())--n;return c[0]?(t.d=c,t.e=n,xt?st(t,p):t):new h(0)}function Ps(e,t,r){var n,i=Bt(e),a=gi(e.d),o=a.length;return t?(r&&(n=r-o)>0?a=a.charAt(0)+"."+a.slice(1)+$a(n):o>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(i<0?"e":"e+")+i):i<0?(a="0."+$a(-i-1)+a,r&&(n=r-o)>0&&(a+=$a(n))):i>=o?(a+=$a(i+1-o),r&&(n=r-i-1)>0&&(a=a+"."+$a(n))):((n=i+1)<o&&(a=a.slice(0,n)+"."+a.slice(n)),r&&(n=r-o)>0&&(i+1===o&&(a+="."),a+=$a(n))),e.s<0?"-"+a:a}function ZE(e,t){if(e.length>t)return e.length=t,!0}function n4(e){var t,r,n;function i(a){var o=this;if(!(o instanceof i))return new i(a);if(o.constructor=i,a instanceof i){o.s=a.s,o.e=a.e,o.d=(a=a.d)?a.slice():a;return}if(typeof a=="number"){if(a*0!==0)throw Error(ps+a);if(a>0)o.s=1;else if(a<0)a=-a,o.s=-1;else{o.s=0,o.e=0,o.d=[0];return}if(a===~~a&&a<1e7){o.e=0,o.d=[a];return}return QE(o,a.toString())}else if(typeof a!="string")throw Error(ps+a);if(a.charCodeAt(0)===45?(a=a.slice(1),o.s=-1):o.s=1,nde.test(a))QE(o,a);else throw Error(ps+a)}if(i.prototype=ve,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=n4,i.config=i.set=ide,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 i.config(e),i}function ide(e){if(!e||typeof e!="object")throw Error(An+"Object expected");var t,r,n,i=["precision",1,Qc,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<i.length;t+=3)if((n=e[r=i[t]])!==void 0)if(Zc(n)===n&&n>=i[t+1]&&n<=i[t+2])this[r]=n;else throw Error(ps+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(ps+r+": "+n);return this}var tP=n4(rde);en=new tP(1);const rt=tP;function ade(e){return cde(e)||lde(e)||sde(e)||ode()}function ode(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 498In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function sde(e,t){if(e){if(typeof e=="string")return rw(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 rw(e,t)}}function lde(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function cde(e){if(Array.isArray(e))return rw(e)}function rw(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 ude=function(t){return t},i4={"@@functional/placeholder":!0},a4=function(t){return t===i4},JE=function(t){return function r(){return arguments.length===0||arguments.length===1&&a4(arguments.length<=0?void 0:arguments[0])?r:t.apply(void 0,arguments)}},dde=function e(t,r){return t===1?r:JE(function(){for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];var o=i.filter(function(s){return s!==i4}).length;return o>=t?r.apply(void 0,i):e(t-o,JE(function(){for(var s=arguments.length,c=new Array(s),u=0;u<s;u++)c[u]=arguments[u];var f=i.map(function(d){return a4(d)?c.shift():d});return r.apply(void 0,ade(f).concat(c))}))})},qv=function(t){return dde(t.length,t)},nw=function(t,r){for(var n=[],i=t;i<r;++i)n[i-t]=i;return n},fde=qv(function(e,t){return Array.isArray(t)?t.map(e):Object.keys(t).map(function(r){return t[r]}).map(e)}),hde=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];if(!r.length)return ude;var i=r.reverse(),a=i[0],o=i.slice(1);return function(){return o.reduce(function(s,c){return c(s)},a.apply(void 0,arguments))}},iw=function(t){return Array.isArray(t)?t.reverse():t.split("").reverse.join("")},o4=function(t){var r=null,n=null;return function(){for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return r&&a.every(function(s,c){return s===r[c]})||(r=a,n=t.apply(void 0,a)),n}};function pde(e){var t;return e===0?t=1:t=Math.floor(new rt(e).abs().log(10).toNumber())+1,t}function mde(e,t,r){for(var n=new rt(e),i=0,a=[];n.lt(t)&&i<1e5;)a.push(n.toNumber()),n=n.add(r),i++;return a}var gde=qv(function(e,t,r){var n=+e,i=+t;return n+r*(i-n)}),vde=qv(function(e,t,r){var n=t-+e;return n=n||1/0,(r-e)/n}),yde=qv(function(e,t,r){var n=t-+e;return n=n||1/0,Math.max(0,Math.min(1,(r-e)/n))});const Kv={rangeStep:mde,getDigitCount:pde,interpolateNumber:gde,uninterpolateNumber:vde,uninterpolateTruncation:yde};function aw(e){return wde(e)||bde(e)||s4(e)||xde()}function xde(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 499In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function bde(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function wde(e){if(Array.isArray(e))return ow(e)}function Yd(e,t){return Pde(e)||jde(e,t)||s4(e,t)||Sde()}function Sde(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 500In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function s4(e,t){if(e){if(typeof e=="string")return ow(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 ow(e,t)}}function ow(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 jde(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var r=[],n=!0,i=!1,a=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(c){i=!0,a=c}finally{try{!n&&o.return!=null&&o.return()}finally{if(i)throw a}}return r}}function Pde(e){if(Array.isArray(e))return e}function l4(e){var t=Yd(e,2),r=t[0],n=t[1],i=r,a=n;return r>n&&(i=n,a=r),[i,a]}function c4(e,t,r){if(e.lte(0))return new rt(0);var n=Kv.getDigitCount(e.toNumber()),i=new rt(10).pow(n),a=e.div(i),o=n!==1?.05:.1,s=new rt(Math.ceil(a.div(o).toNumber())).add(r).mul(o),c=s.mul(i);return t?c:new rt(Math.ceil(c))}function Nde(e,t,r){var n=1,i=new rt(e);if(!i.isint()&&r){var a=Math.abs(e);a<1?(n=new rt(10).pow(Kv.getDigitCount(e)-1),i=new rt(Math.floor(i.div(n).toNumber())).mul(n)):a>1&&(i=new rt(Math.floor(e)))}else e===0?i=new rt(Math.floor((t-1)/2)):r||(i=new rt(Math.floor(e)));var o=Math.floor((t-1)/2),s=hde(fde(function(c){return i.add(new rt(c-o).mul(n)).toNumber()}),nw);return s(0,t)}function u4(e,t,r,n){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((t-e)/(r-1)))return{step:new rt(0),tickMin:new rt(0),tickMax:new rt(0)};var a=c4(new rt(t).sub(e).div(r-1),n,i),o;e<=0&&t>=0?o=new rt(0):(o=new rt(e).add(t).div(2),o=o.sub(new rt(o).mod(a)));var s=Math.ceil(o.sub(e).div(a).toNumber()),c=Math.ceil(new rt(t).sub(o).div(a).toNumber()),u=s+c+1;return u>r?u4(e,t,r,n,i+1):(u<r&&(c=t>0?c+(r-u):c,s=t>0?s:s+(r-u)),{step:a,tickMin:o.sub(new rt(s).mul(a)),tickMax:o.add(new rt(c).mul(a))})}function _de(e){var t=Yd(e,2),r=t[0],n=t[1],i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=Math.max(i,2),s=l4([r,n]),c=Yd(s,2),u=c[0],f=c[1];if(u===-1/0||f===1/0){var d=f===1/0?[u].concat(aw(nw(0,i-1).map(function(){return 1/0}))):[].concat(aw(nw(0,i-1).map(function(){return-1/0})),[f]);return r>n?iw(d):d}if(u===f)return Nde(u,i,a);var h=u4(u,f,o,a),p=h.step,g=h.tickMin,m=h.tickMax,y=Kv.rangeStep(g,m.add(new rt(.1).mul(p)),p);return r>n?iw(y):y}function Ode(e,t){var r=Yd(e,2),n=r[0],i=r[1],a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=l4([n,i]),s=Yd(o,2),c=s[0],u=s[1];if(c===-1/0||u===1/0)return[n,i];if(c===u)return[c];var f=Math.max(t,2),d=c4(new rt(u).sub(c).div(f-1),a,0),h=[].concat(aw(Kv.rangeStep(new rt(c),new rt(u).sub(new rt(.99).mul(d)),d)),[u]);return n>i?iw(h):h}var Ede=o4(_de),kde=o4(Ode),Cde="Invariant failed";function Ns(e,t){throw new Error(Cde)}var Ade=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function cc(e){"@babel/helpers - typeof";return cc=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},cc(e)}function Im(){return Im=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},Im.apply(this,arguments)}function Tde(e,t){return Rde(e)||$de(e,t)||Ide(e,t)||Mde()}function Mde(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 501In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ide(e,t){if(e){if(typeof e=="string")return ek(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 ek(e,t)}}function ek(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 $de(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,s=[],c=!0,u=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(c=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);c=!0);}catch(f){u=!0,i=f}finally{try{if(!c&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function Rde(e){if(Array.isArray(e))return e}function Dde(e,t){if(e==null)return{};var r=Lde(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Lde(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 Fde(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Bde(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,h4(n.key),n)}}function Ude(e,t,r){return t&&Bde(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function zde(e,t,r){return t=$m(t),Wde(e,d4()?Reflect.construct(t,r||[],$m(e).constructor):t.apply(e,r))}function Wde(e,t){if(t&&(cc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Vde(e)}function Vde(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function d4(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(d4=function(){return!!e})()}function $m(e){return $m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},$m(e)}function Hde(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&&sw(e,t)}function sw(e,t){return sw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},sw(e,t)}function f4(e,t,r){return t=h4(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function h4(e){var t=qde(e,"string");return cc(t)=="symbol"?t:t+""}function qde(e,t){if(cc(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(cc(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Jf=function(e){function t(){return Fde(this,t),zde(this,t,arguments)}return Hde(t,e),Ude(t,[{key:"render",value:function(){var n=this.props,i=n.offset,a=n.layout,o=n.width,s=n.dataKey,c=n.data,u=n.dataPointFormatter,f=n.xAxis,d=n.yAxis,h=Dde(n,Ade),p=je(h,!1);this.props.direction==="x"&&f.type!=="number"&&Ns();var g=c.map(function(m){var y=u(m,s),x=y.x,b=y.y,w=y.value,S=y.errorVal;if(!S)return null;var j=[],P,N;if(Array.isArray(S)){var _=Tde(S,2);P=_[0],N=_[1]}else P=N=S;if(a==="vertical"){var O=f.scale,k=b+i,C=k+o,E=k-o,I=O(w-P),T=O(w+N);j.push({x1:T,y1:C,x2:T,y2:E}),j.push({x1:I,y1:k,x2:T,y2:k}),j.push({x1:I,y1:C,x2:I,y2:E})}else if(a==="horizontal"){var $=d.scale,R=x+i,U=R-o,A=R+o,D=$(w-P),F=$(w+N);j.push({x1:U,y1:F,x2:A,y2:F}),j.push({x1:R,y1:D,x2:R,y2:F}),j.push({x1:U,y1:D,x2:A,y2:D})}return M.createElement(Qe,Im({className:"recharts-errorBar",key:"bar-".concat(j.map(function(z){return"".concat(z.x1,"-").concat(z.x2,"-").concat(z.y1,"-").concat(z.y2)}))},p),j.map(function(z){return M.createElement("line",Im({},z,{key:"line-".concat(z.x1,"-").concat(z.x2,"-").concat(z.y1,"-").concat(z.y2)}))}))});return M.createElement(Qe,{className:"recharts-errorBars"},g)}}])}(M.Component);f4(Jf,"defaultProps",{stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"});f4(Jf,"displayName","ErrorBar");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 tk(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Mo(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?tk(Object(r),!0).forEach(function(n){Kde(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):tk(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Kde(e,t,r){return t=Gde(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Gde(e){var t=Yde(e,"string");return Xd(t)=="symbol"?t:t+""}function Yde(e,t){if(Xd(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Xd(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var p4=function(t){var r=t.children,n=t.formattedGraphicalItems,i=t.legendWidth,a=t.legendContent,o=Zr(r,fs);if(!o)return null;var s=fs.defaultProps,c=s!==void 0?Mo(Mo({},s),o.props):{},u;return o.props&&o.props.payload?u=o.props&&o.props.payload:a==="children"?u=(n||[]).reduce(function(f,d){var h=d.item,p=d.props,g=p.sectors||p.data||[];return f.concat(g.map(function(m){return{type:o.props.iconType||h.props.legendType,value:m.name,color:m.fill,payload:m}}))},[]):u=(n||[]).map(function(f){var d=f.item,h=d.type.defaultProps,p=h!==void 0?Mo(Mo({},h),d.props):{},g=p.dataKey,m=p.name,y=p.legendType,x=p.hide;return{inactive:x,dataKey:g,type:c.iconType||y||"square",color:rP(d),value:m||g,payload:p}}),Mo(Mo(Mo({},c),fs.getWithHeight(o,i)),{},{payload:u,item:o})};function Qd(e){"@babel/helpers - typeof";return Qd=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},Qd(e)}function rk(e){return Jde(e)||Zde(e)||Qde(e)||Xde()}function Xde(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 502In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Qde(e,t){if(e){if(typeof e=="string")return lw(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 lw(e,t)}}function Zde(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Jde(e){if(Array.isArray(e))return lw(e)}function lw(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 nk(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Et(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?nk(Object(r),!0).forEach(function(n){El(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):nk(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function El(e,t,r){return t=efe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function efe(e){var t=tfe(e,"string");return Qd(t)=="symbol"?t:t+""}function tfe(e,t){if(Qd(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Qd(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Cr(e,t,r){return Fe(e)||Fe(t)?r:qt(t)?Pn(e,t,r):Ce(t)?t(e):r}function Ju(e,t,r,n){var i=Zue(e,function(s){return Cr(s,t)});if(r==="number"){var a=i.filter(function(s){return oe(s)||parseFloat(s)});return a.length?[Hv(a),Vv(a)]:[1/0,-1/0]}var o=n?i.filter(function(s){return!Fe(s)}):i;return o.map(function(s){return qt(s)||s instanceof Date?s:""})}var rfe=function(t){var r,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0,a=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(a&&a.axisType==="angleAxis"&&Math.abs(Math.abs(a.range[1]-a.range[0])-360)<=1e-6)for(var c=a.range,u=0;u<s;u++){var f=u>0?i[u-1].coordinate:i[s-1].coordinate,d=i[u].coordinate,h=u>=s-1?i[0].coordinate:i[u+1].coordinate,p=void 0;if(Gn(d-f)!==Gn(h-d)){var g=[];if(Gn(h-d)===Gn(c[1]-c[0])){p=h;var m=d+c[1]-c[0];g[0]=Math.min(m,(m+f)/2),g[1]=Math.max(m,(m+f)/2)}else{p=f;var y=h+c[1]-c[0];g[0]=Math.min(d,(y+d)/2),g[1]=Math.max(d,(y+d)/2)}var x=[Math.min(d,(p+d)/2),Math.max(d,(p+d)/2)];if(t>x[0]&&t<=x[1]||t>=g[0]&&t<=g[1]){o=i[u].index;break}}else{var b=Math.min(f,h),w=Math.max(f,h);if(t>(b+d)/2&&t<=(w+d)/2){o=i[u].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},rP=function(t){var r,n=t,i=n.type.displayName,a=(r=t.type)!==null&&r!==void 0&&r.defaultProps?Et(Et({},t.type.defaultProps),t.props):t.props,o=a.stroke,s=a.fill,c;switch(i){case"Line":c=o;break;case"Area":case"Radar":c=o&&o!=="none"?o:s;break;default:c=s;break}return c},nfe=function(t){var r=t.barSize,n=t.totalSize,i=t.stackGroups,a=i===void 0?{}:i;if(!a)return{};for(var o={},s=Object.keys(a),c=0,u=s.length;c<u;c++)for(var f=a[s[c]].stackGroups,d=Object.keys(f),h=0,p=d.length;h<p;h++){var g=f[d[h]],m=g.items,y=g.cateAxisId,x=m.filter(function(N){return na(N.type).indexOf("Bar")>=0});if(x&&x.length){var b=x[0].type.defaultProps,w=b!==void 0?Et(Et({},b),x[0].props):x[0].props,S=w.barSize,j=w[y];o[j]||(o[j]=[]);var P=Fe(S)?r:S;o[j].push({item:x[0],stackList:x.slice(1),barSize:Fe(P)?void 0:Yn(P,n,0)})}}return o},ife=function(t){var r=t.barGap,n=t.barCategoryGap,i=t.bandSize,a=t.sizeList,o=a===void 0?[]:a,s=t.maxBarSize,c=o.length;if(c<1)return null;var u=Yn(r,i,0,!0),f,d=[];if(o[0].barSize===+o[0].barSize){var h=!1,p=i/c,g=o.reduce(function(S,j){return S+j.barSize||0},0);g+=(c-1)*u,g>=i&&(g-=(c-1)*u,u=0),g>=i&&p>0&&(h=!0,p*=.9,g=c*p);var m=(i-g)/2>>0,y={offset:m-u,size:0};f=o.reduce(function(S,j){var P={item:j.item,position:{offset:y.offset+y.size+u,size:h?p:j.barSize}},N=[].concat(rk(S),[P]);return y=N[N.length-1].position,j.stackList&&j.stackList.length&&j.stackList.forEach(function(_){N.push({item:_,position:y})}),N},d)}else{var x=Yn(n,i,0,!0);i-2*x-(c-1)*u<=0&&(u=0);var b=(i-2*x-(c-1)*u)/c;b>1&&(b>>=0);var w=s===+s?Math.min(b,s):b;f=o.reduce(function(S,j,P){var N=[].concat(rk(S),[{item:j.item,position:{offset:x+(b+u)*P+(b-w)/2,size:w}}]);return j.stackList&&j.stackList.length&&j.stackList.forEach(function(_){N.push({item:_,position:N[N.length-1].position})}),N},d)}return f},afe=function(t,r,n,i){var a=n.children,o=n.width,s=n.margin,c=o-(s.left||0)-(s.right||0),u=p4({children:a,legendWidth:c});if(u){var f=i||{},d=f.width,h=f.height,p=u.align,g=u.verticalAlign,m=u.layout;if((m==="vertical"||m==="horizontal"&&g==="middle")&&p!=="center"&&oe(t[p]))return Et(Et({},t),{},El({},p,t[p]+(d||0)));if((m==="horizontal"||m==="vertical"&&p==="center")&&g!=="middle"&&oe(t[g]))return Et(Et({},t),{},El({},g,t[g]+(h||0)))}return t},ofe=function(t,r,n){return Fe(r)?!0:t==="horizontal"?r==="yAxis":t==="vertical"||n==="x"?r==="xAxis":n==="y"?r==="yAxis":!0},m4=function(t,r,n,i,a){var o=r.props.children,s=Nn(o,Jf).filter(function(u){return ofe(i,a,u.props.direction)});if(s&&s.length){var c=s.map(function(u){return u.props.dataKey});return t.reduce(function(u,f){var d=Cr(f,n);if(Fe(d))return u;var h=Array.isArray(d)?[Hv(d),Vv(d)]:[d,d],p=c.reduce(function(g,m){var y=Cr(f,m,0),x=h[0]-Math.abs(Array.isArray(y)?y[0]:y),b=h[1]+Math.abs(Array.isArray(y)?y[1]:y);return[Math.min(x,g[0]),Math.max(b,g[1])]},[1/0,-1/0]);return[Math.min(p[0],u[0]),Math.max(p[1],u[1])]},[1/0,-1/0])}return null},sfe=function(t,r,n,i,a){var o=r.map(function(s){return m4(t,s,n,a,i)}).filter(function(s){return!Fe(s)});return o&&o.length?o.reduce(function(s,c){return[Math.min(s[0],c[0]),Math.max(s[1],c[1])]},[1/0,-1/0]):null},g4=function(t,r,n,i,a){var o=r.map(function(c){var u=c.props.dataKey;return n==="number"&&u&&m4(t,c,u,i)||Ju(t,u,n,a)});if(n==="number")return o.reduce(function(c,u){return[Math.min(c[0],u[0]),Math.max(c[1],u[1])]},[1/0,-1/0]);var s={};return o.reduce(function(c,u){for(var f=0,d=u.length;f<d;f++)s[u[f]]||(s[u[f]]=!0,c.push(u[f]));return c},[])},v4=function(t,r){return t==="horizontal"&&r==="xAxis"||t==="vertical"&&r==="yAxis"||t==="centric"&&r==="angleAxis"||t==="radial"&&r==="radiusAxis"},y4=function(t,r,n,i){if(i)return t.map(function(c){return c.coordinate});var a,o,s=t.map(function(c){return c.coordinate===r&&(a=!0),c.coordinate===n&&(o=!0),c.coordinate});return a||s.push(r),o||s.push(n),s},Zi=function(t,r,n){if(!t)return null;var i=t.scale,a=t.duplicateDomain,o=t.type,s=t.range,c=t.realScaleType==="scaleBand"?i.bandwidth()/2:2,u=(r||n)&&o==="category"&&i.bandwidth?i.bandwidth()/c:0;if(u=t.axisType==="angleAxis"&&(s==null?void 0:s.length)>=2?Gn(s[0]-s[1])*2*u:u,r&&(t.ticks||t.niceTicks)){var f=(t.ticks||t.niceTicks).map(function(d){var h=a?a.indexOf(d):d;return{coordinate:i(h)+u,value:d,offset:u}});return f.filter(function(d){return!Hf(d.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(d,h){return{coordinate:i(d)+u,value:d,index:h,offset:u}}):i.ticks&&!n?i.ticks(t.tickCount).map(function(d){return{coordinate:i(d)+u,value:d,offset:u}}):i.domain().map(function(d,h){return{coordinate:i(d)+u,value:a?a[d]:d,index:h,offset:u}})},Cx=new WeakMap,zh=function(t,r){if(typeof r!="function")return t;Cx.has(t)||Cx.set(t,new WeakMap);var n=Cx.get(t);if(n.has(r))return n.get(r);var i=function(){t.apply(void 0,arguments),r.apply(void 0,arguments)};return n.set(r,i),i},x4=function(t,r,n){var i=t.scale,a=t.type,o=t.layout,s=t.axisType;if(i==="auto")return o==="radial"&&s==="radiusAxis"?{scale:Wd(),realScaleType:"band"}:o==="radial"&&s==="angleAxis"?{scale:km(),realScaleType:"linear"}:a==="category"&&r&&(r.indexOf("LineChart")>=0||r.indexOf("AreaChart")>=0||r.indexOf("ComposedChart")>=0&&!n)?{scale:Zu(),realScaleType:"point"}:a==="category"?{scale:Wd(),realScaleType:"band"}:{scale:km(),realScaleType:"linear"};if(Vf(i)){var c="scale".concat(Cv(i));return{scale:(XE[c]||Zu)(),realScaleType:XE[c]?c:"point"}}return Ce(i)?{scale:i}:{scale:Zu(),realScaleType:"point"}},ik=1e-4,b4=function(t){var r=t.domain();if(!(!r||r.length<=2)){var n=r.length,i=t.range(),a=Math.min(i[0],i[1])-ik,o=Math.max(i[0],i[1])+ik,s=t(r[0]),c=t(r[n-1]);(s<a||s>o||c<a||c>o)&&t.domain([r[0],r[n-1]])}},lfe=function(t,r){if(!t)return null;for(var n=0,i=t.length;n<i;n++)if(t[n].item===r)return t[n].position;return null},cfe=function(t,r){if(!r||r.length!==2||!oe(r[0])||!oe(r[1]))return t;var n=Math.min(r[0],r[1]),i=Math.max(r[0],r[1]),a=[t[0],t[1]];return(!oe(t[0])||t[0]<n)&&(a[0]=n),(!oe(t[1])||t[1]>i)&&(a[1]=i),a[0]>i&&(a[0]=i),a[1]<n&&(a[1]=n),a},ufe=function(t){var r=t.length;if(!(r<=0))for(var n=0,i=t[0].length;n<i;++n)for(var a=0,o=0,s=0;s<r;++s){var c=Hf(t[s][n][1])?t[s][n][0]:t[s][n][1];c>=0?(t[s][n][0]=a,t[s][n][1]=a+c,a=t[s][n][1]):(t[s][n][0]=o,t[s][n][1]=o+c,o=t[s][n][1])}},dfe=function(t){var r=t.length;if(!(r<=0))for(var n=0,i=t[0].length;n<i;++n)for(var a=0,o=0;o<r;++o){var s=Hf(t[o][n][1])?t[o][n][0]:t[o][n][1];s>=0?(t[o][n][0]=a,t[o][n][1]=a+s,a=t[o][n][1]):(t[o][n][0]=0,t[o][n][1]=0)}},ffe={sign:ufe,expand:AZ,none:ec,silhouette:TZ,wiggle:MZ,positive:dfe},hfe=function(t,r,n){var i=r.map(function(s){return s.props.dataKey}),a=ffe[n],o=CZ().keys(i).value(function(s,c){return+Cr(s,c,0)}).order(M0).offset(a);return o(t)},pfe=function(t,r,n,i,a,o){if(!t)return null;var s=o?r.reverse():r,c={},u=s.reduce(function(d,h){var p,g=(p=h.type)!==null&&p!==void 0&&p.defaultProps?Et(Et({},h.type.defaultProps),h.props):h.props,m=g.stackId,y=g.hide;if(y)return d;var x=g[n],b=d[x]||{hasStack:!1,stackGroups:{}};if(qt(m)){var w=b.stackGroups[m]||{numericAxisId:n,cateAxisId:i,items:[]};w.items.push(h),b.hasStack=!0,b.stackGroups[m]=w}else b.stackGroups[qf("_stackId_")]={numericAxisId:n,cateAxisId:i,items:[h]};return Et(Et({},d),{},El({},x,b))},c),f={};return Object.keys(u).reduce(function(d,h){var p=u[h];if(p.hasStack){var g={};p.stackGroups=Object.keys(p.stackGroups).reduce(function(m,y){var x=p.stackGroups[y];return Et(Et({},m),{},El({},y,{numericAxisId:n,cateAxisId:i,items:x.items,stackedData:hfe(t,x.items,a)}))},g)}return Et(Et({},d),{},El({},h,p))},f)},w4=function(t,r){var n=r.realScaleType,i=r.type,a=r.tickCount,o=r.originalDomain,s=r.allowDecimals,c=n||r.scale;if(c!=="auto"&&c!=="linear")return null;if(a&&i==="number"&&o&&(o[0]==="auto"||o[1]==="auto")){var u=t.domain();if(!u.length)return null;var f=Ede(u,a,s);return t.domain([Hv(f),Vv(f)]),{niceTicks:f}}if(a&&i==="number"){var d=t.domain(),h=kde(d,a,s);return{niceTicks:h}}return null};function ak(e){var t=e.axis,r=e.ticks,n=e.bandSize,i=e.entry,a=e.index,o=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!Fe(i[t.dataKey])){var s=lm(r,"value",i[t.dataKey]);if(s)return s.coordinate+n/2}return r[a]?r[a].coordinate+n/2:null}var c=Cr(i,Fe(o)?t.dataKey:o);return Fe(c)?null:t.scale(c)}var ok=function(t){var r=t.axis,n=t.ticks,i=t.offset,a=t.bandSize,o=t.entry,s=t.index;if(r.type==="category")return n[s]?n[s].coordinate+i:null;var c=Cr(o,r.dataKey,r.domain[s]);return Fe(c)?null:r.scale(c)-a/2+i},mfe=function(t){var r=t.numericAxis,n=r.scale.domain();if(r.type==="number"){var i=Math.min(n[0],n[1]),a=Math.max(n[0],n[1]);return i<=0&&a>=0?0:a<0?a:i}return n[0]},gfe=function(t,r){var n,i=(n=t.type)!==null&&n!==void 0&&n.defaultProps?Et(Et({},t.type.defaultProps),t.props):t.props,a=i.stackId;if(qt(a)){var o=r[a];if(o){var s=o.items.indexOf(t);return s>=0?o.stackedData[s]:null}}return null},vfe=function(t){return t.reduce(function(r,n){return[Hv(n.concat([r[0]]).filter(oe)),Vv(n.concat([r[1]]).filter(oe))]},[1/0,-1/0])},S4=function(t,r,n){return Object.keys(t).reduce(function(i,a){var o=t[a],s=o.stackedData,c=s.reduce(function(u,f){var d=vfe(f.slice(r,n+1));return[Math.min(u[0],d[0]),Math.max(u[1],d[1])]},[1/0,-1/0]);return[Math.min(c[0],i[0]),Math.max(c[1],i[1])]},[1/0,-1/0]).map(function(i){return i===1/0||i===-1/0?0:i})},sk=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,lk=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,cw=function(t,r,n){if(Ce(t))return t(r,n);if(!Array.isArray(t))return r;var i=[];if(oe(t[0]))i[0]=n?t[0]:Math.min(t[0],r[0]);else if(sk.test(t[0])){var a=+sk.exec(t[0])[1];i[0]=r[0]-a}else Ce(t[0])?i[0]=t[0](r[0]):i[0]=r[0];if(oe(t[1]))i[1]=n?t[1]:Math.max(t[1],r[1]);else if(lk.test(t[1])){var o=+lk.exec(t[1])[1];i[1]=r[1]+o}else Ce(t[1])?i[1]=t[1](r[1]):i[1]=r[1];return i},Rm=function(t,r,n){if(t&&t.scale&&t.scale.bandwidth){var i=t.scale.bandwidth();if(!n||i>0)return i}if(t&&r&&r.length>=2){for(var a=Cj(r,function(d){return d.coordinate}),o=1/0,s=1,c=a.length;s<c;s++){var u=a[s],f=a[s-1];o=Math.min((u.coordinate||0)-(f.coordinate||0),o)}return o===1/0?0:o}return n?void 0:0},ck=function(t,r,n){return!t||!t.length||Zf(t,Pn(n,"type.defaultProps.domain"))?r:t},j4=function(t,r){var n=t.type.defaultProps?Et(Et({},t.type.defaultProps),t.props):t.props,i=n.dataKey,a=n.name,o=n.unit,s=n.formatter,c=n.tooltipType,u=n.chartType,f=n.hide;return Et(Et({},je(t,!1)),{},{dataKey:i,unit:o,formatter:s,name:a||i,color:rP(t),value:Cr(r,i),type:c,payload:r,chartType:u,hide:f})};function Zd(e){"@babel/helpers - typeof";return Zd=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},Zd(e)}function uk(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Wi(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?uk(Object(r),!0).forEach(function(n){P4(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):uk(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function P4(e,t,r){return t=yfe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function yfe(e){var t=xfe(e,"string");return Zd(t)=="symbol"?t:t+""}function xfe(e,t){if(Zd(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Zd(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function bfe(e,t){return Pfe(e)||jfe(e,t)||Sfe(e,t)||wfe()}function wfe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 503In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Sfe(e,t){if(e){if(typeof e=="string")return dk(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 dk(e,t)}}function dk(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 jfe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,s=[],c=!0,u=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(c=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);c=!0);}catch(f){u=!0,i=f}finally{try{if(!c&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function Pfe(e){if(Array.isArray(e))return e}var Dm=Math.PI/180,Nfe=function(t){return t*180/Math.PI},nt=function(t,r,n,i){return{x:t+Math.cos(-Dm*i)*n,y:r+Math.sin(-Dm*i)*n}},_fe=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(t-(n.left||0)-(n.right||0)),Math.abs(r-(n.top||0)-(n.bottom||0)))/2},Ofe=function(t,r,n,i,a){var o=t.width,s=t.height,c=t.startAngle,u=t.endAngle,f=Yn(t.cx,o,o/2),d=Yn(t.cy,s,s/2),h=_fe(o,s,n),p=Yn(t.innerRadius,h,0),g=Yn(t.outerRadius,h,h*.8),m=Object.keys(r);return m.reduce(function(y,x){var b=r[x],w=b.domain,S=b.reversed,j;if(Fe(b.range))i==="angleAxis"?j=[c,u]:i==="radiusAxis"&&(j=[p,g]),S&&(j=[j[1],j[0]]);else{j=b.range;var P=j,N=bfe(P,2);c=N[0],u=N[1]}var _=x4(b,a),O=_.realScaleType,k=_.scale;k.domain(w).range(j),b4(k);var C=w4(k,Wi(Wi({},b),{},{realScaleType:O})),E=Wi(Wi(Wi({},b),C),{},{range:j,radius:g,realScaleType:O,scale:k,cx:f,cy:d,innerRadius:p,outerRadius:g,startAngle:c,endAngle:u});return Wi(Wi({},y),{},P4({},x,E))},{})},Efe=function(t,r){var n=t.x,i=t.y,a=r.x,o=r.y;return Math.sqrt(Math.pow(n-a,2)+Math.pow(i-o,2))},kfe=function(t,r){var n=t.x,i=t.y,a=r.cx,o=r.cy,s=Efe({x:n,y:i},{x:a,y:o});if(s<=0)return{radius:s};var c=(n-a)/s,u=Math.acos(c);return i>o&&(u=2*Math.PI-u),{radius:s,angle:Nfe(u),angleInRadian:u}},Cfe=function(t){var r=t.startAngle,n=t.endAngle,i=Math.floor(r/360),a=Math.floor(n/360),o=Math.min(i,a);return{startAngle:r-o*360,endAngle:n-o*360}},Afe=function(t,r){var n=r.startAngle,i=r.endAngle,a=Math.floor(n/360),o=Math.floor(i/360),s=Math.min(a,o);return t+s*360},fk=function(t,r){var n=t.x,i=t.y,a=kfe({x:n,y:i},r),o=a.radius,s=a.angle,c=r.innerRadius,u=r.outerRadius;if(o<c||o>u)return!1;if(o===0)return!0;var f=Cfe(r),d=f.startAngle,h=f.endAngle,p=s,g;if(d<=h){for(;p>h;)p-=360;for(;p<d;)p+=360;g=p>=d&&p<=h}else{for(;p>d;)p-=360;for(;p<h;)p+=360;g=p>=h&&p<=d}return g?Wi(Wi({},r),{},{radius:o,angle:Afe(p,r)}):null},N4=function(t){return!v.isValidElement(t)&&!Ce(t)&&typeof t!="boolean"?t.className:""};function Jd(e){"@babel/helpers - typeof";return Jd=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},Jd(e)}var Tfe=["offset"];function Mfe(e){return Dfe(e)||Rfe(e)||$fe(e)||Ife()}function Ife(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 504In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $fe(e,t){if(e){if(typeof e=="string")return uw(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 uw(e,t)}}function Rfe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Dfe(e){if(Array.isArray(e))return uw(e)}function uw(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 Lfe(e,t){if(e==null)return{};var r=Ffe(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Ffe(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 hk(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Ut(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?hk(Object(r),!0).forEach(function(n){Bfe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):hk(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Bfe(e,t,r){return t=Ufe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ufe(e){var t=zfe(e,"string");return Jd(t)=="symbol"?t:t+""}function zfe(e,t){if(Jd(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Jd(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ef(){return ef=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},ef.apply(this,arguments)}var Wfe=function(t){var r=t.value,n=t.formatter,i=Fe(t.children)?r:t.children;return Ce(n)?n(i):i},Vfe=function(t,r){var n=Gn(r-t),i=Math.min(Math.abs(r-t),360);return n*i},Hfe=function(t,r,n){var i=t.position,a=t.viewBox,o=t.offset,s=t.className,c=a,u=c.cx,f=c.cy,d=c.innerRadius,h=c.outerRadius,p=c.startAngle,g=c.endAngle,m=c.clockWise,y=(d+h)/2,x=Vfe(p,g),b=x>=0?1:-1,w,S;i==="insideStart"?(w=p+b*o,S=m):i==="insideEnd"?(w=g-b*o,S=!m):i==="end"&&(w=g+b*o,S=m),S=x<=0?S:!S;var j=nt(u,f,y,w),P=nt(u,f,y,w+(S?1:-1)*359),N="M".concat(j.x,",").concat(j.y,` 505 A`).concat(y,",").concat(y,",0,1,").concat(S?0:1,`, 506 `).concat(P.x,",").concat(P.y),_=Fe(t.id)?qf("recharts-radial-line-"):t.id;return M.createElement("text",ef({},n,{dominantBaseline:"central",className:Te("recharts-radial-bar-label",s)}),M.createElement("defs",null,M.createElement("path",{id:_,d:N})),M.createElement("textPath",{xlinkHref:"#".concat(_)},r))},qfe=function(t){var r=t.viewBox,n=t.offset,i=t.position,a=r,o=a.cx,s=a.cy,c=a.innerRadius,u=a.outerRadius,f=a.startAngle,d=a.endAngle,h=(f+d)/2;if(i==="outside"){var p=nt(o,s,u+n,h),g=p.x,m=p.y;return{x:g,y:m,textAnchor:g>=o?"start":"end",verticalAnchor:"middle"}}if(i==="center")return{x:o,y:s,textAnchor:"middle",verticalAnchor:"middle"};if(i==="centerTop")return{x:o,y:s,textAnchor:"middle",verticalAnchor:"start"};if(i==="centerBottom")return{x:o,y:s,textAnchor:"middle",verticalAnchor:"end"};var y=(c+u)/2,x=nt(o,s,y,h),b=x.x,w=x.y;return{x:b,y:w,textAnchor:"middle",verticalAnchor:"middle"}},Kfe=function(t){var r=t.viewBox,n=t.parentViewBox,i=t.offset,a=t.position,o=r,s=o.x,c=o.y,u=o.width,f=o.height,d=f>=0?1:-1,h=d*i,p=d>0?"end":"start",g=d>0?"start":"end",m=u>=0?1:-1,y=m*i,x=m>0?"end":"start",b=m>0?"start":"end";if(a==="top"){var w={x:s+u/2,y:c-d*i,textAnchor:"middle",verticalAnchor:p};return Ut(Ut({},w),n?{height:Math.max(c-n.y,0),width:u}:{})}if(a==="bottom"){var S={x:s+u/2,y:c+f+h,textAnchor:"middle",verticalAnchor:g};return Ut(Ut({},S),n?{height:Math.max(n.y+n.height-(c+f),0),width:u}:{})}if(a==="left"){var j={x:s-y,y:c+f/2,textAnchor:x,verticalAnchor:"middle"};return Ut(Ut({},j),n?{width:Math.max(j.x-n.x,0),height:f}:{})}if(a==="right"){var P={x:s+u+y,y:c+f/2,textAnchor:b,verticalAnchor:"middle"};return Ut(Ut({},P),n?{width:Math.max(n.x+n.width-P.x,0),height:f}:{})}var N=n?{width:u,height:f}:{};return a==="insideLeft"?Ut({x:s+y,y:c+f/2,textAnchor:b,verticalAnchor:"middle"},N):a==="insideRight"?Ut({x:s+u-y,y:c+f/2,textAnchor:x,verticalAnchor:"middle"},N):a==="insideTop"?Ut({x:s+u/2,y:c+h,textAnchor:"middle",verticalAnchor:g},N):a==="insideBottom"?Ut({x:s+u/2,y:c+f-h,textAnchor:"middle",verticalAnchor:p},N):a==="insideTopLeft"?Ut({x:s+y,y:c+h,textAnchor:b,verticalAnchor:g},N):a==="insideTopRight"?Ut({x:s+u-y,y:c+h,textAnchor:x,verticalAnchor:g},N):a==="insideBottomLeft"?Ut({x:s+y,y:c+f-h,textAnchor:b,verticalAnchor:p},N):a==="insideBottomRight"?Ut({x:s+u-y,y:c+f-h,textAnchor:x,verticalAnchor:p},N):Wc(a)&&(oe(a.x)||Zo(a.x))&&(oe(a.y)||Zo(a.y))?Ut({x:s+Yn(a.x,u),y:c+Yn(a.y,f),textAnchor:"end",verticalAnchor:"end"},N):Ut({x:s+u/2,y:c+f/2,textAnchor:"middle",verticalAnchor:"middle"},N)},Gfe=function(t){return"cx"in t&&oe(t.cx)};function sr(e){var t=e.offset,r=t===void 0?5:t,n=Lfe(e,Tfe),i=Ut({offset:r},n),a=i.viewBox,o=i.position,s=i.value,c=i.children,u=i.content,f=i.className,d=f===void 0?"":f,h=i.textBreakAll;if(!a||Fe(s)&&Fe(c)&&!v.isValidElement(u)&&!Ce(u))return null;if(v.isValidElement(u))return v.cloneElement(u,i);var p;if(Ce(u)){if(p=v.createElement(u,i),v.isValidElement(p))return p}else p=Wfe(i);var g=Gfe(a),m=je(i,!0);if(g&&(o==="insideStart"||o==="insideEnd"||o==="end"))return Hfe(i,p,m);var y=g?qfe(i):Kfe(i);return M.createElement(ac,ef({className:Te("recharts-label",d)},m,y,{breakAll:h}),p)}sr.displayName="Label";var _4=function(t){var r=t.cx,n=t.cy,i=t.angle,a=t.startAngle,o=t.endAngle,s=t.r,c=t.radius,u=t.innerRadius,f=t.outerRadius,d=t.x,h=t.y,p=t.top,g=t.left,m=t.width,y=t.height,x=t.clockWise,b=t.labelViewBox;if(b)return b;if(oe(m)&&oe(y)){if(oe(d)&&oe(h))return{x:d,y:h,width:m,height:y};if(oe(p)&&oe(g))return{x:p,y:g,width:m,height:y}}return oe(d)&&oe(h)?{x:d,y:h,width:0,height:0}:oe(r)&&oe(n)?{cx:r,cy:n,startAngle:a||i||0,endAngle:o||i||0,innerRadius:u||0,outerRadius:f||c||s||0,clockWise:x}:t.viewBox?t.viewBox:{}},Yfe=function(t,r){return t?t===!0?M.createElement(sr,{key:"label-implicit",viewBox:r}):qt(t)?M.createElement(sr,{key:"label-implicit",viewBox:r,value:t}):v.isValidElement(t)?t.type===sr?v.cloneElement(t,{key:"label-implicit",viewBox:r}):M.createElement(sr,{key:"label-implicit",content:t,viewBox:r}):Ce(t)?M.createElement(sr,{key:"label-implicit",content:t,viewBox:r}):Wc(t)?M.createElement(sr,ef({viewBox:r},t,{key:"label-implicit"})):null:null},Xfe=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 i=t.children,a=_4(t),o=Nn(i,sr).map(function(c,u){return v.cloneElement(c,{viewBox:r||a,key:"label-".concat(u)})});if(!n)return o;var s=Yfe(t.label,r||a);return[s].concat(Mfe(o))};sr.parseViewBox=_4;sr.renderCallByParent=Xfe;function Qfe(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var Zfe=Qfe;const O4=Ye(Zfe);function tf(e){"@babel/helpers - typeof";return tf=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},tf(e)}var Jfe=["valueAccessor"],ehe=["data","dataKey","clockWise","id","textBreakAll"];function the(e){return ahe(e)||ihe(e)||nhe(e)||rhe()}function rhe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 507In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function nhe(e,t){if(e){if(typeof e=="string")return dw(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 dw(e,t)}}function ihe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function ahe(e){if(Array.isArray(e))return dw(e)}function dw(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 Lm(){return Lm=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},Lm.apply(this,arguments)}function pk(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function mk(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?pk(Object(r),!0).forEach(function(n){ohe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):pk(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ohe(e,t,r){return t=she(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function she(e){var t=lhe(e,"string");return tf(t)=="symbol"?t:t+""}function lhe(e,t){if(tf(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(tf(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function gk(e,t){if(e==null)return{};var r=che(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function che(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 uhe=function(t){return Array.isArray(t.value)?O4(t.value):t.value};function oa(e){var t=e.valueAccessor,r=t===void 0?uhe:t,n=gk(e,Jfe),i=n.data,a=n.dataKey,o=n.clockWise,s=n.id,c=n.textBreakAll,u=gk(n,ehe);return!i||!i.length?null:M.createElement(Qe,{className:"recharts-label-list"},i.map(function(f,d){var h=Fe(a)?r(f,d):Cr(f&&f.payload,a),p=Fe(s)?{}:{id:"".concat(s,"-").concat(d)};return M.createElement(sr,Lm({},je(f,!0),u,p,{parentViewBox:f.parentViewBox,value:h,textBreakAll:c,viewBox:sr.parseViewBox(Fe(o)?f:mk(mk({},f),{},{clockWise:o})),key:"label-".concat(d),index:d}))}))}oa.displayName="LabelList";function dhe(e,t){return e?e===!0?M.createElement(oa,{key:"labelList-implicit",data:t}):M.isValidElement(e)||Ce(e)?M.createElement(oa,{key:"labelList-implicit",data:t,content:e}):Wc(e)?M.createElement(oa,Lm({data:t},e,{key:"labelList-implicit"})):null:null}function fhe(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,i=Nn(n,oa).map(function(o,s){return v.cloneElement(o,{data:t,key:"labelList-".concat(s)})});if(!r)return i;var a=dhe(e.label,t);return[a].concat(the(i))}oa.renderCallByParent=fhe;function rf(e){"@babel/helpers - typeof";return rf=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},rf(e)}function fw(){return fw=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},fw.apply(this,arguments)}function vk(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).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?vk(Object(r),!0).forEach(function(n){hhe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):vk(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function hhe(e,t,r){return t=phe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function phe(e){var t=mhe(e,"string");return rf(t)=="symbol"?t:t+""}function mhe(e,t){if(rf(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(rf(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ghe=function(t,r){var n=Gn(r-t),i=Math.min(Math.abs(r-t),359.999);return n*i},Wh=function(t){var r=t.cx,n=t.cy,i=t.radius,a=t.angle,o=t.sign,s=t.isExternal,c=t.cornerRadius,u=t.cornerIsExternal,f=c*(s?1:-1)+i,d=Math.asin(c/f)/Dm,h=u?a:a+o*d,p=nt(r,n,f,h),g=nt(r,n,i,h),m=u?a-o*d:a,y=nt(r,n,f*Math.cos(d*Dm),m);return{center:p,circleTangency:g,lineTangency:y,theta:d}},E4=function(t){var r=t.cx,n=t.cy,i=t.innerRadius,a=t.outerRadius,o=t.startAngle,s=t.endAngle,c=ghe(o,s),u=o+c,f=nt(r,n,a,o),d=nt(r,n,a,u),h="M ".concat(f.x,",").concat(f.y,` 508 A `).concat(a,",").concat(a,`,0, 509 `).concat(+(Math.abs(c)>180),",").concat(+(o>u),`, 510 `).concat(d.x,",").concat(d.y,` 511 `);if(i>0){var p=nt(r,n,i,o),g=nt(r,n,i,u);h+="L ".concat(g.x,",").concat(g.y,` 512 A `).concat(i,",").concat(i,`,0, 513 `).concat(+(Math.abs(c)>180),",").concat(+(o<=u),`, 514 `).concat(p.x,",").concat(p.y," Z")}else h+="L ".concat(r,",").concat(n," Z");return h},vhe=function(t){var r=t.cx,n=t.cy,i=t.innerRadius,a=t.outerRadius,o=t.cornerRadius,s=t.forceCornerRadius,c=t.cornerIsExternal,u=t.startAngle,f=t.endAngle,d=Gn(f-u),h=Wh({cx:r,cy:n,radius:a,angle:u,sign:d,cornerRadius:o,cornerIsExternal:c}),p=h.circleTangency,g=h.lineTangency,m=h.theta,y=Wh({cx:r,cy:n,radius:a,angle:f,sign:-d,cornerRadius:o,cornerIsExternal:c}),x=y.circleTangency,b=y.lineTangency,w=y.theta,S=c?Math.abs(u-f):Math.abs(u-f)-m-w;if(S<0)return s?"M ".concat(g.x,",").concat(g.y,` 515 a`).concat(o,",").concat(o,",0,0,1,").concat(o*2,`,0 516 a`).concat(o,",").concat(o,",0,0,1,").concat(-o*2,`,0 517 `):E4({cx:r,cy:n,innerRadius:i,outerRadius:a,startAngle:u,endAngle:f});var j="M ".concat(g.x,",").concat(g.y,` 518 A`).concat(o,",").concat(o,",0,0,").concat(+(d<0),",").concat(p.x,",").concat(p.y,` 519 A`).concat(a,",").concat(a,",0,").concat(+(S>180),",").concat(+(d<0),",").concat(x.x,",").concat(x.y,` 520 A`).concat(o,",").concat(o,",0,0,").concat(+(d<0),",").concat(b.x,",").concat(b.y,` 521 `);if(i>0){var P=Wh({cx:r,cy:n,radius:i,angle:u,sign:d,isExternal:!0,cornerRadius:o,cornerIsExternal:c}),N=P.circleTangency,_=P.lineTangency,O=P.theta,k=Wh({cx:r,cy:n,radius:i,angle:f,sign:-d,isExternal:!0,cornerRadius:o,cornerIsExternal:c}),C=k.circleTangency,E=k.lineTangency,I=k.theta,T=c?Math.abs(u-f):Math.abs(u-f)-O-I;if(T<0&&o===0)return"".concat(j,"L").concat(r,",").concat(n,"Z");j+="L".concat(E.x,",").concat(E.y,` 522 A`).concat(o,",").concat(o,",0,0,").concat(+(d<0),",").concat(C.x,",").concat(C.y,` 523 A`).concat(i,",").concat(i,",0,").concat(+(T>180),",").concat(+(d>0),",").concat(N.x,",").concat(N.y,` 524 A`).concat(o,",").concat(o,",0,0,").concat(+(d<0),",").concat(_.x,",").concat(_.y,"Z")}else j+="L".concat(r,",").concat(n,"Z");return j},yhe={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},k4=function(t){var r=yk(yk({},yhe),t),n=r.cx,i=r.cy,a=r.innerRadius,o=r.outerRadius,s=r.cornerRadius,c=r.forceCornerRadius,u=r.cornerIsExternal,f=r.startAngle,d=r.endAngle,h=r.className;if(o<a||f===d)return null;var p=Te("recharts-sector",h),g=o-a,m=Yn(s,g,0,!0),y;return m>0&&Math.abs(f-d)<360?y=vhe({cx:n,cy:i,innerRadius:a,outerRadius:o,cornerRadius:Math.min(m,g/2),forceCornerRadius:c,cornerIsExternal:u,startAngle:f,endAngle:d}):y=E4({cx:n,cy:i,innerRadius:a,outerRadius:o,startAngle:f,endAngle:d}),M.createElement("path",fw({},je(r,!0),{className:p,d:y,role:"img"}))};function nf(e){"@babel/helpers - typeof";return nf=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},nf(e)}function hw(){return hw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];
524for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},hw.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(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function bk(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){xhe(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 xhe(e,t,r){return t=bhe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function bhe(e){var t=whe(e,"string");return nf(t)=="symbol"?t:t+""}function whe(e,t){if(nf(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(nf(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var wk={curveBasisClosed:xZ,curveBasisOpen:bZ,curveBasis:yZ,curveBumpX:iZ,curveBumpY:aZ,curveLinearClosed:wZ,curveLinear:Tv,curveMonotoneX:SZ,curveMonotoneY:jZ,curveNatural:PZ,curveStep:NZ,curveStepAfter:OZ,curveStepBefore:_Z},Vh=function(t){return t.x===+t.x&&t.y===+t.y},xu=function(t){return t.x},bu=function(t){return t.y},She=function(t,r){if(Ce(t))return t;var n="curve".concat(Cv(t));return(n==="curveMonotone"||n==="curveBump")&&r?wk["".concat(n).concat(r==="vertical"?"Y":"X")]:wk[n]||Tv},jhe=function(t){var r=t.type,n=r===void 0?"linear":r,i=t.points,a=i===void 0?[]:i,o=t.baseLine,s=t.layout,c=t.connectNulls,u=c===void 0?!1:c,f=She(n,s),d=u?a.filter(function(m){return Vh(m)}):a,h;if(Array.isArray(o)){var p=u?o.filter(function(m){return Vh(m)}):o,g=d.map(function(m,y){return bk(bk({},m),{},{base:p[y]})});return s==="vertical"?h=Ih().y(bu).x1(xu).x0(function(m){return m.base.x}):h=Ih().x(xu).y1(bu).y0(function(m){return m.base.y}),h.defined(Vh).curve(f),h(g)}return s==="vertical"&&oe(o)?h=Ih().y(bu).x1(xu).x0(o):oe(o)?h=Ih().x(xu).y1(bu).y0(o):h=wD().x(xu).y(bu),h.defined(Vh).curve(f),h(d)},pw=function(t){var r=t.className,n=t.points,i=t.path,a=t.pathRef;if((!n||!n.length)&&!i)return null;var o=n&&n.length?jhe(t):i;return M.createElement("path",hw({},je(t,!1),cm(t),{className:Te("recharts-curve",r),d:o,ref:a}))},C4={exports:{}},Phe="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",Nhe=Phe,_he=Nhe;function A4(){}function T4(){}T4.resetWarningCache=A4;var Ohe=function(){function e(n,i,a,o,s,c){if(c!==_he){var u=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 u.name="Invariant Violation",u}}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:T4,resetWarningCache:A4};return r.PropTypes=r,r};C4.exports=Ohe();var Ehe=C4.exports;const Re=Ye(Ehe);var khe=Object.getOwnPropertyNames,Che=Object.getOwnPropertySymbols,Ahe=Object.prototype.hasOwnProperty;function Sk(e,t){return function(n,i,a){return e(n,i,a)&&t(n,i,a)}}function Hh(e){return function(r,n,i){if(!r||!n||typeof r!="object"||typeof n!="object")return e(r,n,i);var a=i.cache,o=a.get(r),s=a.get(n);if(o&&s)return o===n&&s===r;a.set(r,n),a.set(n,r);var c=e(r,n,i);return a.delete(r),a.delete(n),c}}function jk(e){return khe(e).concat(Che(e))}var M4=Object.hasOwn||function(e,t){return Ahe.call(e,t)};function Jc(e,t){return e||t?e===t:e===t||e!==e&&t!==t}var I4="_owner",Pk=Object.getOwnPropertyDescriptor,Nk=Object.keys;function The(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 Mhe(e,t){return Jc(e.getTime(),t.getTime())}function _k(e,t,r){if(e.size!==t.size)return!1;for(var n={},i=e.entries(),a=0,o,s;(o=i.next())&&!o.done;){for(var c=t.entries(),u=!1,f=0;(s=c.next())&&!s.done;){var d=o.value,h=d[0],p=d[1],g=s.value,m=g[0],y=g[1];!u&&!n[f]&&(u=r.equals(h,m,a,f,e,t,r)&&r.equals(p,y,h,m,e,t,r))&&(n[f]=!0),f++}if(!u)return!1;a++}return!0}function Ihe(e,t,r){var n=Nk(e),i=n.length;if(Nk(t).length!==i)return!1;for(var a;i-- >0;)if(a=n[i],a===I4&&(e.$$typeof||t.$$typeof)&&e.$$typeof!==t.$$typeof||!M4(t,a)||!r.equals(e[a],t[a],a,a,e,t,r))return!1;return!0}function wu(e,t,r){var n=jk(e),i=n.length;if(jk(t).length!==i)return!1;for(var a,o,s;i-- >0;)if(a=n[i],a===I4&&(e.$$typeof||t.$$typeof)&&e.$$typeof!==t.$$typeof||!M4(t,a)||!r.equals(e[a],t[a],a,a,e,t,r)||(o=Pk(e,a),s=Pk(t,a),(o||s)&&(!o||!s||o.configurable!==s.configurable||o.enumerable!==s.enumerable||o.writable!==s.writable)))return!1;return!0}function $he(e,t){return Jc(e.valueOf(),t.valueOf())}function Rhe(e,t){return e.source===t.source&&e.flags===t.flags}function Ok(e,t,r){if(e.size!==t.size)return!1;for(var n={},i=e.values(),a,o;(a=i.next())&&!a.done;){for(var s=t.values(),c=!1,u=0;(o=s.next())&&!o.done;)!c&&!n[u]&&(c=r.equals(a.value,o.value,a.value,o.value,e,t,r))&&(n[u]=!0),u++;if(!c)return!1}return!0}function Dhe(e,t){var r=e.length;if(t.length!==r)return!1;for(;r-- >0;)if(e[r]!==t[r])return!1;return!0}var Lhe="[object Arguments]",Fhe="[object Boolean]",Bhe="[object Date]",Uhe="[object Map]",zhe="[object Number]",Whe="[object Object]",Vhe="[object RegExp]",Hhe="[object Set]",qhe="[object String]",Khe=Array.isArray,Ek=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,kk=Object.assign,Ghe=Object.prototype.toString.call.bind(Object.prototype.toString);function Yhe(e){var t=e.areArraysEqual,r=e.areDatesEqual,n=e.areMapsEqual,i=e.areObjectsEqual,a=e.arePrimitiveWrappersEqual,o=e.areRegExpsEqual,s=e.areSetsEqual,c=e.areTypedArraysEqual;return function(f,d,h){if(f===d)return!0;
524if(f==null||d==null||typeof f!="object"||typeof d!="object")return f!==f&&d!==d;var p=f.constructor;if(p!==d.constructor)return!1;if(p===Object)return i(f,d,h);if(Khe(f))return t(f,d,h);if(Ek!=null&&Ek(f))return c(f,d,h);if(p===Date)return r(f,d,h);if(p===RegExp)return o(f,d,h);if(p===Map)return n(f,d,h);if(p===Set)return s(f,d,h);var g=Ghe(f);return g===Bhe?r(f,d,h):g===Vhe?o(f,d,h):g===Uhe?n(f,d,h):g===Hhe?s(f,d,h):g===Whe?typeof f.then!="function"&&typeof d.then!="function"&&i(f,d,h):g===Lhe?i(f,d,h):g===Fhe||g===zhe||g===qhe?a(f,d,h):!1}}function Xhe(e){var t=e.circular,r=e.createCustomConfig,n=e.strict,i={areArraysEqual:n?wu:The,areDatesEqual:Mhe,areMapsEqual:n?Sk(_k,wu):_k,areObjectsEqual:n?wu:Ihe,arePrimitiveWrappersEqual:$he,areRegExpsEqual:Rhe,areSetsEqual:n?Sk(Ok,wu):Ok,areTypedArraysEqual:n?wu:Dhe};if(r&&(i=kk({},i,r(i))),t){var a=Hh(i.areArraysEqual),o=Hh(i.areMapsEqual),s=Hh(i.areObjectsEqual),c=Hh(i.areSetsEqual);i=kk({},i,{areArraysEqual:a,areMapsEqual:o,areObjectsEqual:s,areSetsEqual:c})}return i}function Qhe(e){return function(t,r,n,i,a,o,s){return e(t,r,s)}}function Zhe(e){var t=e.circular,r=e.comparator,n=e.createState,i=e.equals,a=e.strict;if(n)return function(c,u){var f=n(),d=f.cache,h=d===void 0?t?new WeakMap:void 0:d,p=f.meta;return r(c,u,{cache:h,equals:i,meta:p,strict:a})};if(t)return function(c,u){return r(c,u,{cache:new WeakMap,equals:i,meta:void 0,strict:a})};var o={cache:void 0,equals:i,meta:void 0,strict:a};return function(c,u){return r(c,u,o)}}var Jhe=Eo();Eo({strict:!0});Eo({circular:!0});Eo({circular:!0,strict:!0});Eo({createInternalComparator:function(){return Jc}});Eo({strict:!0,createInternalComparator:function(){return Jc}});Eo({circular:!0,createInternalComparator:function(){return Jc}});Eo({circular:!0,createInternalComparator:function(){return Jc},strict:!0});function Eo(e){e===void 0&&(e={});var t=e.circular,r=t===void 0?!1:t,n=e.createInternalComparator,i=e.createState,a=e.strict,o=a===void 0?!1:a,s=Xhe(e),c=Yhe(s),u=n?n(c):Qhe(c);return Zhe({circular:r,comparator:c,createState:i,equals:u,strict:o})}function epe(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function Ck(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=-1,n=function i(a){r<0&&(r=a),a-r>t?(e(a),r=-1):epe(i)};requestAnimationFrame(n)}function mw(e){"@babel/helpers - typeof";return mw=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},mw(e)}function tpe(e){return ape(e)||ipe(e)||npe(e)||rpe()}function rpe(){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 npe(e,t){if(e){if(typeof e=="string")return Ak(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 Ak(e,t)}}function Ak(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 ipe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function ape(e){if(Array.isArray(e))return e}function ope(){var e={},t=function(){return null},r=!1,n=function i(a){if(!r){if(Array.isArray(a)){if(!a.length)return;var o=a,s=tpe(o),c=s[0],u=s.slice(1);if(typeof c=="number"){Ck(i.bind(null,u),c);return}i(c),Ck(i.bind(null,u));return}mw(a)==="object"&&(e=a,t(e)),typeof a=="function"&&a()}};return{stop:function(){r=!0},start:function(a){r=!1,n(a)},subscribe:function(a){return t=a,function(){t=function(){return null}}}}}function af(e){"@babel/helpers - typeof";return af=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},af(e)}function Tk(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Mk(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};
vendor: 184,517 bytes, lines 525-548
525t%2?Tk(Object(r),!0).forEach(function(n){$4(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Tk(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function $4(e,t,r){return t=spe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function spe(e){var t=lpe(e,"string");return af(t)==="symbol"?t:String(t)}function lpe(e,t){if(af(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(af(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var cpe=function(t,r){return[Object.keys(t),Object.keys(r)].reduce(function(n,i){return n.filter(function(a){return i.includes(a)})})},upe=function(t){return t},dpe=function(t){return t.replace(/([A-Z])/g,function(r){return"-".concat(r.toLowerCase())})},ed=function(t,r){return Object.keys(r).reduce(function(n,i){return Mk(Mk({},n),{},$4({},i,t(i,r[i])))},{})},Ik=function(t,r,n){return t.map(function(i){return"".concat(dpe(i)," ").concat(r,"ms ").concat(n)}).join(",")};function fpe(e,t){return mpe(e)||ppe(e,t)||R4(e,t)||hpe()}function hpe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 526In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ppe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,s=[],c=!0,u=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(c=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);c=!0);}catch(f){u=!0,i=f}finally{try{if(!c&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function mpe(e){if(Array.isArray(e))return e}function gpe(e){return xpe(e)||ype(e)||R4(e)||vpe()}function vpe(){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 R4(e,t){if(e){if(typeof e=="string")return gw(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 gw(e,t)}}function ype(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function xpe(e){if(Array.isArray(e))return gw(e)}function gw(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 Fm=1e-4,D4=function(t,r){return[0,3*t,3*r-6*t,3*t-3*r+1]},L4=function(t,r){return t.map(function(n,i){return n*Math.pow(r,i)}).reduce(function(n,i){return n+i})},$k=function(t,r){return function(n){var i=D4(t,r);return L4(i,n)}},bpe=function(t,r){return function(n){var i=D4(t,r),a=[].concat(gpe(i.map(function(o,s){return o*s}).slice(1)),[0]);return L4(a,n)}},Rk=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var i=r[0],a=r[1],o=r[2],s=r[3];if(r.length===1)switch(r[0]){case"linear":i=0,a=0,o=1,s=1;break;case"ease":i=.25,a=.1,o=.25,s=1;break;case"ease-in":i=.42,a=0,o=1,s=1;break;case"ease-out":i=.42,a=0,o=.58,s=1;break;case"ease-in-out":i=0,a=0,o=.58,s=1;break;default:{var c=r[0].split("(");if(c[0]==="cubic-bezier"&&c[1].split(")")[0].split(",").length===4){var u=c[1].split(")")[0].split(",").map(function(y){return parseFloat(y)}),f=fpe(u,4);i=f[0],a=f[1],o=f[2],s=f[3]}}}var d=$k(i,o),h=$k(a,s),p=bpe(i,o),g=function(x){return x>1?1:x<0?0:x},m=function(x){for(var b=x>1?1:x,w=b,S=0;S<8;++S){var j=d(w)-b,P=p(w);if(Math.abs(j-b)<Fm||P<Fm)return h(w);w=g(w-j/P)}return h(w)};return m.isStepper=!1,m},wpe=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.stiff,n=r===void 0?100:r,i=t.damping,a=i===void 0?8:i,o=t.dt,s=o===void 0?17:o,c=function(f,d,h){var p=-(f-d)*n,g=h*a,m=h+(p-g)*s/1e3,y=h*s/1e3+f;return Math.abs(y-d)<Fm&&Math.abs(m)<Fm?[d,0]:[y,m]};return c.isStepper=!0,c.dt=s,c},Spe=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var i=r[0];if(typeof i=="string")switch(i){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return Rk(i);case"spring":return wpe();default:if(i.split("(")[0]==="cubic-bezier")return Rk(i)}return typeof i=="function"?i:null};function of(e){"@babel/helpers - typeof";return of=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},of(e)}function Dk(e){return Npe(e)||Ppe(e)||F4(e)||jpe()}function jpe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 528In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ppe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Npe(e){if(Array.isArray(e))return yw(e)}function Lk(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ar(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Lk(Object(r),!0).forEach(function(n){vw(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Lk(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function vw(e,t,r){return t=_pe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _pe(e){var t=Ope(e,"string");return of(t)==="symbol"?t:String(t)}function Ope(e,t){if(of(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(of(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Epe(e,t){return Ape(e)||Cpe(e,t)||F4(e,t)||kpe()}function kpe(){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 F4(e,t){if(e){if(typeof e=="string")return yw(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 yw(e,t)}}function yw(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 Cpe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,s=[],c=!0,u=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(c=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);c=!0);}catch(f){u=!0,i=f}finally{try{if(!c&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function Ape(e){if(Array.isArray(e))return e}var Bm=function(t,r,n){return t+(r-t)*n},xw=function(t){var r=t.from,n=t.to;return r!==n},Tpe=function e(t,r,n){var i=ed(function(a,o){if(xw(o)){var s=t(o.from,o.to,o.velocity),c=Epe(s,2),u=c[0],f=c[1];return ar(ar({},o),{},{from:u,velocity:f})}return o},r);return n<1?ed(function(a,o){return xw(o)?ar(ar({},o),{},{velocity:Bm(o.velocity,i[a].velocity,n),from:Bm(o.from,i[a].from,n)}):o},r):e(t,i,n-1)};const Mpe=function(e,t,r,n,i){var a=cpe(e,t),o=a.reduce(function(y,x){return ar(ar({},y),{},vw({},x,[e[x],t[x]]))},{}),s=a.reduce(function(y,x){return ar(ar({},y),{},vw({},x,{from:e[x],velocity:0,to:t[x]}))},{}),c=-1,u,f,d=function(){return null},h=function(){return ed(function(x,b){return b.from},s)},p=function(){return!Object.values(s).filter(xw).length},g=function(x){u||(u=x);var b=x-u,w=b/r.dt;s=Tpe(r,s,w),i(ar(ar(ar({},e),t),h())),u=x,p()||(c=requestAnimationFrame(d))},m=function(x){f||(f=x);var b=(x-f)/n,w=ed(function(j,P){return Bm.apply(void 0,Dk(P).concat([r(b)]))},o);if(i(ar(ar(ar({},e),t),w)),b<1)c=requestAnimationFrame(d);else{var S=ed(function(j,P){return Bm.apply(void 0,Dk(P).concat([r(1)]))},o);i(ar(ar(ar({},e),t),S))}};return d=r.isStepper?g:m,function(){return requestAnimationFrame(d),function(){cancelAnimationFrame(c)}}};function uc(e){"@babel/helpers - typeof";return uc=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},uc(e)}var Ipe=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function $pe(e,t){if(e==null)return{};var r=Rpe(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Rpe(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,a;for(a=0;a<n.length;a++)i=n[a],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}function Ax(e){return Bpe(e)||Fpe(e)||Lpe(e)||Dpe()}function Dpe(){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 Lpe(e,t){if(e){if(typeof e=="string")return bw(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 bw(e,t)}}function Fpe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Bpe(e){if(Array.isArray(e))return bw(e)}function bw(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 Fk(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).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?Fk(Object(r),!0).forEach(function(n){Iu(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Fk(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Iu(e,t,r){return t=B4(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Upe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function zpe(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,B4(n.key),n)}}function Wpe(e,t,r){return t&&zpe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function B4(e){var t=Vpe(e,"string");return uc(t)==="symbol"?t:String(t)}function Vpe(e,t){if(uc(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(uc(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Hpe(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&&ww(e,t)}function ww(e,t){return ww=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},ww(e,t)}function qpe(e){var t=Kpe();return function(){var n=Um(e),i;if(t){var a=Um(this).constructor;i=Reflect.construct(n,arguments,a)}else i=n.apply(this,arguments);return Sw(this,i)}}function Sw(e,t){if(t&&(uc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return jw(e)}function jw(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Kpe(){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 Um(e){return Um=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Um(e)}var Oi=function(e){Hpe(r,e);var t=qpe(r);function r(n,i){var a;Upe(this,r),a=t.call(this,n,i);var o=a.props,s=o.isActive,c=o.attributeName,u=o.from,f=o.to,d=o.steps,h=o.children,p=o.duration;if(a.handleStyleChange=a.handleStyleChange.bind(jw(a)),a.changeStyle=a.changeStyle.bind(jw(a)),!s||p<=0)return a.state={style:{}},typeof h=="function"&&(a.state={style:f}),Sw(a);if(d&&d.length)a.state={style:d[0].style};else if(u){if(typeof h=="function")return a.state={style:u},Sw(a);a.state={style:c?Iu({},c,u):u}}else a.state={style:{}};return a}return Wpe(r,[{key:"componentDidMount",value:function(){var i=this.props,a=i.isActive,o=i.canBegin;this.mounted=!0,!(!a||!o)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(i){var a=this.props,o=a.isActive,s=a.canBegin,c=a.attributeName,u=a.shouldReAnimate,f=a.to,d=a.from,h=this.state.style;if(s){if(!o){var p={style:c?Iu({},c,f):f};this.state&&h&&(c&&h[c]!==f||!c&&h!==f)&&this.setState(p);return}if(!(Jhe(i.to,f)&&i.canBegin&&i.isActive)){var g=!i.canBegin||!i.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var m=g||u?d:i.to;if(this.state&&h){var y={style:c?Iu({},c,m):m};(c&&h[c]!==m||!c&&h!==m)&&this.setState(y)}this.runAnimation(Rn(Rn({},this.props),{},{from:m,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var i=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),i&&i()}},{key:"handleStyleChange",value:function(i){this.changeStyle(i)}},{key:"changeStyle",value:function(i){this.mounted&&this.setState({style:i})}},{key:"runJSAnimation",value:function(i){var a=this,o=i.from,s=i.to,c=i.duration,u=i.easing,f=i.begin,d=i.onAnimationEnd,h=i.onAnimationStart,p=Mpe(o,s,Spe(u),c,this.changeStyle),g=function(){a.stopJSAnimation=p()};this.manager.start([h,f,g,c,d])}},{key:"runStepAnimation",value:function(i){var a=this,o=i.steps,s=i.begin,c=i.onAnimationStart,u=o[0],f=u.style,d=u.duration,h=d===void 0?0:d,p=function(m,y,x){if(x===0)return m;var b=y.duration,w=y.easing,S=w===void 0?"ease":w,j=y.style,P=y.properties,N=y.onAnimationEnd,_=x>0?o[x-1]:y,O=P||Object.keys(j);if(typeof S=="function"||S==="spring")return[].concat(Ax(m),[a.runJSAnimation.bind(a,{from:_.style,to:j,duration:b,easing:S}),b]);var k=Ik(O,b,S),C=Rn(Rn(Rn({},_.style),j),{},{transition:k});return[].concat(Ax(m),[C,b,N]).filter(upe)};return this.manager.start([c].concat(Ax(o.reduce(p,[f,Math.max(h,s)])),[i.onAnimationEnd]))}},{key:"runAnimation",value:function(i){this.manager||(this.manager=ope());var a=i.begin,o=i.duration,s=i.attributeName,c=i.to,u=i.easing,f=i.onAnimationStart,d=i.onAnimationEnd,h=i.steps,p=i.children,g=this.manager;if(this.unSubscribe=g.subscribe(this.handleStyleChange),typeof u=="function"||typeof p=="function"||u==="spring"){this.runJSAnimation(i);return}if(h.length>1){this.runStepAnimation(i);return}var m=s?Iu({},s,c):c,y=Ik(Object.keys(m),o,u);g.start([f,a,Rn(Rn({},m),{},{transition:y}),o,d])}},{key:"render",value:function(){var i=this.props,a=i.children;i.begin;var o=i.duration;i.attributeName,i.easing;var s=i.isActive;i.steps,i.from,i.to,i.canBegin,i.onAnimationEnd,i.shouldReAnimate,i.onAnimationReStart;var c=$pe(i,Ipe),u=v.Children.count(a),f=this.state.style;if(typeof a=="function")return a(f);if(!s||u===0||o<=0)return a;var d=function(p){var g=p.props,m=g.style,y=m===void 0?{}:m,x=g.className,b=v.cloneElement(p,Rn(Rn({},c),{},{style:Rn(Rn({},y),f),className:x}));return b};return u===1?d(v.Children.only(a)):M.createElement("div",null,v.Children.map(a,function(h){return d(h)}))}}]),r}(v.PureComponent);Oi.displayName="Animate";Oi.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};Oi.propTypes={from:Re.oneOfType([Re.object,Re.string]),to:Re.oneOfType([Re.object,Re.string]),attributeName:Re.string,duration:Re.number,begin:Re.number,easing:Re.oneOfType([Re.string,Re.func]),steps:Re.arrayOf(Re.shape({duration:Re.number.isRequired,style:Re.object.isRequired,easing:Re.oneOfType([Re.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),Re.func]),properties:Re.arrayOf("string"),onAnimationEnd:Re.func})),children:Re.oneOfType([Re.node,Re.func]),isActive:Re.bool,canBegin:Re.bool,onAnimationEnd:Re.func,shouldReAnimate:Re.bool,onAnimationStart:Re.func,onAnimationReStart:Re.func};Re.object,Re.object,Re.object,Re.element;Re.object,Re.object,Re.object,Re.oneOfType([Re.array,Re.element]),Re.any;function sf(e){"@babel/helpers - typeof";return sf=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},sf(e)}function zm(){return zm=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},zm.apply(this,arguments)}function Gpe(e,t){return Zpe(e)||Qpe(e,t)||Xpe(e,t)||Ype()}function Ype(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 531In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Xpe(e,t){if(e){if(typeof e=="string")return Bk(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 Bk(e,t)}}function Bk(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 Qpe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,s=[],c=!0,u=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(c=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);c=!0);}catch(f){u=!0,i=f}finally{try{if(!c&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function Zpe(e){if(Array.isArray(e))return e}function Uk(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function zk(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Uk(Object(r),!0).forEach(function(n){Jpe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Uk(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Jpe(e,t,r){return t=eme(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function eme(e){var t=tme(e,"string");return sf(t)=="symbol"?t:t+""}function tme(e,t){if(sf(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(sf(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Wk=function(t,r,n,i,a){var o=Math.min(Math.abs(n)/2,Math.abs(i)/2),s=i>=0?1:-1,c=n>=0?1:-1,u=i>=0&&n>=0||i<0&&n<0?1:0,f;if(o>0&&a instanceof Array){for(var d=[0,0,0,0],h=0,p=4;h<p;h++)d[h]=a[h]>o?o:a[h];f="M".concat(t,",").concat(r+s*d[0]),d[0]>0&&(f+="A ".concat(d[0],",").concat(d[0],",0,0,").concat(u,",").concat(t+c*d[0],",").concat(r)),f+="L ".concat(t+n-c*d[1],",").concat(r),d[1]>0&&(f+="A ".concat(d[1],",").concat(d[1],",0,0,").concat(u,`, 532 `).concat(t+n,",").concat(r+s*d[1])),f+="L ".concat(t+n,",").concat(r+i-s*d[2]),d[2]>0&&(f+="A ".concat(d[2],",").concat(d[2],",0,0,").concat(u,`, 533 `).concat(t+n-c*d[2],",").concat(r+i)),f+="L ".concat(t+c*d[3],",").concat(r+i),d[3]>0&&(f+="A ".concat(d[3],",").concat(d[3],",0,0,").concat(u,`, 534 `).concat(t,",").concat(r+i-s*d[3])),f+="Z"}else if(o>0&&a===+a&&a>0){var g=Math.min(o,a);f="M ".concat(t,",").concat(r+s*g,` 535 A `).concat(g,",").concat(g,",0,0,").concat(u,",").concat(t+c*g,",").concat(r,` 536 L `).concat(t+n-c*g,",").concat(r,` 537 A `).concat(g,",").concat(g,",0,0,").concat(u,",").concat(t+n,",").concat(r+s*g,` 538 L `).concat(t+n,",").concat(r+i-s*g,` 539 A `).concat(g,",").concat(g,",0,0,").concat(u,",").concat(t+n-c*g,",").concat(r+i,` 540 L `).concat(t+c*g,",").concat(r+i,` 541 A `).concat(g,",").concat(g,",0,0,").concat(u,",").concat(t,",").concat(r+i-s*g," Z")}else f="M ".concat(t,",").concat(r," h ").concat(n," v ").concat(i," h ").concat(-n," Z");return f},rme=function(t,r){if(!t||!r)return!1;var n=t.x,i=t.y,a=r.x,o=r.y,s=r.width,c=r.height;if(Math.abs(s)>0&&Math.abs(c)>0){var u=Math.min(a,a+s),f=Math.max(a,a+s),d=Math.min(o,o+c),h=Math.max(o,o+c);return n>=u&&n<=f&&i>=d&&i<=h}return!1},nme={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},nP=function(t){var r=zk(zk({},nme),t),n=v.useRef(),i=v.useState(-1),a=Gpe(i,2),o=a[0],s=a[1];v.useEffect(function(){if(n.current&&n.current.getTotalLength)try{var S=n.current.getTotalLength();S&&s(S)}catch{}},[]);var c=r.x,u=r.y,f=r.width,d=r.height,h=r.radius,p=r.className,g=r.animationEasing,m=r.animationDuration,y=r.animationBegin,x=r.isAnimationActive,b=r.isUpdateAnimationActive;if(c!==+c||u!==+u||f!==+f||d!==+d||f===0||d===0)return null;var w=Te("recharts-rectangle",p);return b?M.createElement(Oi,{canBegin:o>0,from:{width:f,height:d,x:c,y:u},to:{width:f,height:d,x:c,y:u},duration:m,animationEasing:g,isActive:b},function(S){var j=S.width,P=S.height,N=S.x,_=S.y;return M.createElement(Oi,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:y,duration:m,isActive:x,easing:g},M.createElement("path",zm({},je(r,!0),{className:w,d:Wk(N,_,j,P,h),ref:n})))}):M.createElement("path",zm({},je(r,!0),{className:w,d:Wk(c,u,f,d,h)}))},ime=["points","className","baseLinePoints","connectNulls"];function pl(){return pl=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},pl.apply(this,arguments)}function ame(e,t){if(e==null)return{};var r=ome(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function ome(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 Vk(e){return ume(e)||cme(e)||lme(e)||sme()}function sme(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 542In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function lme(e,t){if(e){if(typeof e=="string")return Pw(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 Pw(e,t)}}function cme(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function ume(e){if(Array.isArray(e))return Pw(e)}function Pw(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 Hk=function(t){return t&&t.x===+t.x&&t.y===+t.y},dme=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],r=[[]];return t.forEach(function(n){Hk(n)?r[r.length-1].push(n):r[r.length-1].length>0&&r.push([])}),Hk(t[0])&&r[r.length-1].push(t[0]),r[r.length-1].length<=0&&(r=r.slice(0,-1)),r},td=function(t,r){var n=dme(t);r&&(n=[n.reduce(function(a,o){return[].concat(Vk(a),Vk(o))},[])]);var i=n.map(function(a){return a.reduce(function(o,s,c){return"".concat(o).concat(c===0?"M":"L").concat(s.x,",").concat(s.y)},"")}).join("");return n.length===1?"".concat(i,"Z"):i},fme=function(t,r,n){var i=td(t,n);return"".concat(i.slice(-1)==="Z"?i.slice(0,-1):i,"L").concat(td(r.reverse(),n).slice(1))},U4=function(t){var r=t.points,n=t.className,i=t.baseLinePoints,a=t.connectNulls,o=ame(t,ime);if(!r||!r.length)return null;var s=Te("recharts-polygon",n);if(i&&i.length){var c=o.stroke&&o.stroke!=="none",u=fme(r,i,a);return M.createElement("g",{className:s},M.createElement("path",pl({},je(o,!0),{fill:u.slice(-1)==="Z"?o.fill:"none",stroke:"none",d:u})),c?M.createElement("path",pl({},je(o,!0),{fill:"none",d:td(r,a)})):null,c?M.createElement("path",pl({},je(o,!0),{fill:"none",d:td(i,a)})):null)}var f=td(r,a);return M.createElement("path",pl({},je(o,!0),{fill:f.slice(-1)==="Z"?o.fill:"none",className:s,d:f}))};function Nw(){return Nw=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},Nw.apply(this,arguments)}var eh=function(t){var r=t.cx,n=t.cy,i=t.r,a=t.className,o=Te("recharts-dot",a);return r===+r&&n===+n&&i===+i?M.createElement("circle",Nw({},je(t,!1),cm(t),{className:o,cx:r,cy:n,r:i})):null};function lf(e){"@babel/helpers - typeof";return lf=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},lf(e)}var hme=["x","y","top","left","width","height","className"];function _w(){return _w=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},_w.apply(this,arguments)}function qk(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function pme(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?qk(Object(r),!0).forEach(function(n){mme(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):qk(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function mme(e,t,r){return t=gme(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function gme(e){var t=vme(e,"string");return lf(t)=="symbol"?t:t+""}function vme(e,t){if(lf(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(lf(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function yme(e,t){if(e==null)return{};var r=xme(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function xme(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 bme=function(t,r,n,i,a,o){return"M".concat(t,",").concat(a,"v").concat(i,"M").concat(o,",").concat(r,"h").concat(n)},wme=function(t){var r=t.x,n=r===void 0?0:r,i=t.y,a=i===void 0?0:i,o=t.top,s=o===void 0?0:o,c=t.left,u=c===void 0?0:c,f=t.width,d=f===void 0?0:f,h=t.height,p=h===void 0?0:h,g=t.className,m=yme(t,hme),y=pme({x:n,y:a,top:s,left:u,width:d,height:p},m);return!oe(n)||!oe(a)||!oe(d)||!oe(p)||!oe(s)||!oe(u)?null:M.createElement("path",_w({},je(y,!0),{className:Te("recharts-cross",g),d:bme(n,a,d,p,s,u)}))},Sme=["cx","cy","innerRadius","outerRadius","gridType","radialLines"];function cf(e){"@babel/helpers - typeof";return cf=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},cf(e)}function jme(e,t){if(e==null)return{};var r=Pme(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Pme(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 xa(){return xa=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},xa.apply(this,arguments)}function Kk(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function uf(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Kk(Object(r),!0).forEach(function(n){Nme(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Kk(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Nme(e,t,r){return t=_me(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _me(e){var t=Ome(e,"string");return cf(t)=="symbol"?t:t+""}function Ome(e,t){if(cf(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(cf(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Eme=function(t,r,n,i){var a="";return i.forEach(function(o,s){var c=nt(r,n,t,o);s?a+="L ".concat(c.x,",").concat(c.y):a+="M ".concat(c.x,",").concat(c.y)}),a+="Z",a},kme=function(t){var r=t.cx,n=t.cy,i=t.innerRadius,a=t.outerRadius,o=t.polarAngles,s=t.radialLines;if(!o||!o.length||!s)return null;var c=uf({stroke:"#ccc"},je(t,!1));return M.createElement("g",{className:"recharts-polar-grid-angle"},o.map(function(u){var f=nt(r,n,i,u),d=nt(r,n,a,u);return M.createElement("line",xa({},c,{key:"line-".concat(u),x1:f.x,y1:f.y,x2:d.x,y2:d.y}))}))},Cme=function(t){var r=t.cx,n=t.cy,i=t.radius,a=t.index,o=uf(uf({stroke:"#ccc"},je(t,!1)),{},{fill:"none"});return M.createElement("circle",xa({},o,{className:Te("recharts-polar-grid-concentric-circle",t.className),key:"circle-".concat(a),cx:r,cy:n,r:i}))},Ame=function(t){var r=t.radius,n=t.index,i=uf(uf({stroke:"#ccc"},je(t,!1)),{},{fill:"none"});return M.createElement("path",xa({},i,{className:Te("recharts-polar-grid-concentric-polygon",t.className),key:"path-".concat(n),d:Eme(r,t.cx,t.cy,t.polarAngles)}))},Tme=function(t){var r=t.polarRadius,n=t.gridType;return!r||!r.length?null:M.createElement("g",{className:"recharts-polar-grid-concentric"},r.map(function(i,a){var o=a;return n==="circle"?M.createElement(Cme,xa({key:o},t,{radius:i,index:a})):M.createElement(Ame,xa({key:o},t,{radius:i,index:a}))}))},z4=function(t){var r=t.cx,n=r===void 0?0:r,i=t.cy,a=i===void 0?0:i,o=t.innerRadius,s=o===void 0?0:o,c=t.outerRadius,u=c===void 0?0:c,f=t.gridType,d=f===void 0?"polygon":f,h=t.radialLines,p=h===void 0?!0:h,g=jme(t,Sme);return u<=0?null:M.createElement("g",{className:"recharts-polar-grid"},M.createElement(kme,xa({cx:n,cy:a,innerRadius:s,outerRadius:u,gridType:d,radialLines:p},g)),M.createElement(Tme,xa({cx:n,cy:a,innerRadius:s,outerRadius:u,gridType:d,radialLines:p},g)))};z4.displayName="PolarGrid";var Mme=Wv,Ime=QL,$me=Ii;function Rme(e,t){return e&&e.length?Mme(e,$me(t),Ime):void 0}var Dme=Rme;const Lme=Ye(Dme);var Fme=Wv,Bme=Ii,Ume=ZL;function zme(e,t){return e&&e.length?Fme(e,Bme(t),Ume):void 0}var Wme=zme;const Vme=Ye(Wme);var Hme=["cx","cy","angle","ticks","axisLine"],qme=["ticks","tick","angle","tickFormatter","stroke"];function dc(e){"@babel/helpers - typeof";return dc=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},dc(e)}function rd(){return rd=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},rd.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(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Io(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){Gv(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 Yk(e,t){if(e==null)return{};var r=Kme(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Kme(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 Gme(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Xk(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,V4(n.key),n)}}function Yme(e,t,r){return t&&Xk(e.prototype,t),r&&Xk(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Xme(e,t,r){return t=Wm(t),Qme(e,W4()?Reflect.construct(t,r||[],Wm(e).constructor):t.apply(e,r))}function Qme(e,t){if(t&&(dc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Zme(e)}function Zme(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function W4(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(W4=function(){return!!e})()}function Wm(e){return Wm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Wm(e)}function Jme(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&&Ow(e,t)}function Ow(e,t){return Ow=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Ow(e,t)}function Gv(e,t,r){return t=V4(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function V4(e){var t=ege(e,"string");return dc(t)=="symbol"?t:t+""}function ege(e,t){if(dc(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(dc(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var th=function(e){function t(){return Gme(this,t),Xme(this,t,arguments)}return Jme(t,e),Yme(t,[{key:"getTickValueCoord",value:function(n){var i=n.coordinate,a=this.props,o=a.angle,s=a.cx,c=a.cy;return nt(s,c,i,o)}},{key:"getTickTextAnchor",value:function(){var n=this.props.orientation,i;switch(n){case"left":i="end";break;case"right":i="start";break;default:i="middle";break}return i}},{key:"getViewBox",value:function(){var n=this.props,i=n.cx,a=n.cy,o=n.angle,s=n.ticks,c=Lme(s,function(f){return f.coordinate||0}),u=Vme(s,function(f){return f.coordinate||0});return{cx:i,cy:a,startAngle:o,endAngle:o,innerRadius:u.coordinate||0,outerRadius:c.coordinate||0}}},{key:"renderAxisLine",value:function(){var n=this.props,i=n.cx,a=n.cy,o=n.angle,s=n.ticks,c=n.axisLine,u=Yk(n,Hme),f=s.reduce(function(g,m){return[Math.min(g[0],m.coordinate),Math.max(g[1],m.coordinate)]},[1/0,-1/0]),d=nt(i,a,f[0],o),h=nt(i,a,f[1],o),p=Io(Io(Io({},je(u,!1)),{},{fill:"none"},je(c,!1)),{},{x1:d.x,y1:d.y,x2:h.x,y2:h.y});return M.createElement("line",rd({className:"recharts-polar-radius-axis-line"},p))}},{key:"renderTicks",value:function(){var n=this,i=this.props,a=i.ticks,o=i.tick,s=i.angle,c=i.tickFormatter,u=i.stroke,f=Yk(i,qme),d=this.getTickTextAnchor(),h=je(f,!1),p=je(o,!1),g=a.map(function(m,y){var x=n.getTickValueCoord(m),b=Io(Io(Io(Io({textAnchor:d,transform:"rotate(".concat(90-s,", ").concat(x.x,", ").concat(x.y,")")},h),{},{stroke:"none",fill:u},p),{},{index:y},x),{},{payload:m});return M.createElement(Qe,rd({className:Te("recharts-polar-radius-axis-tick",N4(o)),key:"tick-".concat(m.coordinate)},Jl(n.props,m,y)),t.renderTickItem(o,b,c?c(m.value,y):m.value))});return M.createElement(Qe,{className:"recharts-polar-radius-axis-ticks"},g)}},{key:"render",value:function(){var n=this.props,i=n.ticks,a=n.axisLine,o=n.tick;return!i||!i.length?null:M.createElement(Qe,{className:Te("recharts-polar-radius-axis",this.props.className)},a&&this.renderAxisLine(),o&&this.renderTicks(),sr.renderCallByParent(this.props,this.getViewBox()))}}],[{key:"renderTickItem",value:function(n,i,a){var o;return M.isValidElement(n)?o=M.cloneElement(n,i):Ce(n)?o=n(i):o=M.createElement(ac,rd({},i,{className:"recharts-polar-radius-axis-tick-value"}),a),o}}])}(v.PureComponent);Gv(th,"displayName","PolarRadiusAxis");Gv(th,"axisType","radiusAxis");Gv(th,"defaultProps",{type:"number",radiusAxisId:0,cx:0,cy:0,angle:0,orientation:"right",stroke:"#ccc",axisLine:!0,tick:!0,tickCount:5,allowDataOverflow:!1,scale:"auto",allowDuplicatedCategory:!0});function fc(e){"@babel/helpers - typeof";return fc=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},fc(e)}function Ko(){return Ko=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},Ko.apply(this,arguments)}function Qk(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function $o(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Qk(Object(r),!0).forEach(function(n){Yv(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Qk(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function tge(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Zk(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,q4(n.key),n)}}function rge(e,t,r){return t&&Zk(e.prototype,t),r&&Zk(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function nge(e,t,r){return t=Vm(t),ige(e,H4()?Reflect.construct(t,r||[],Vm(e).constructor):t.apply(e,r))}function ige(e,t){if(t&&(fc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return age(e)}function age(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function H4(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(H4=function(){return!!e})()}function Vm(e){return Vm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Vm(e)}function oge(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&&Ew(e,t)}function Ew(e,t){return Ew=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Ew(e,t)}function Yv(e,t,r){return t=q4(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function q4(e){var t=sge(e,"string");return fc(t)=="symbol"?t:t+""}function sge(e,t){if(fc(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(fc(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var lge=Math.PI/180,Jk=1e-5,rh=function(e){function t(){return tge(this,t),nge(this,t,arguments)}return oge(t,e),rge(t,[{key:"getTickLineCoord",value:function(n){var i=this.props,a=i.cx,o=i.cy,s=i.radius,c=i.orientation,u=i.tickSize,f=u||8,d=nt(a,o,s,n.coordinate),h=nt(a,o,s+(c==="inner"?-1:1)*f,n.coordinate);return{x1:d.x,y1:d.y,x2:h.x,y2:h.y}}},{key:"getTickTextAnchor",value:function(n){var i=this.props.orientation,a=Math.cos(-n.coordinate*lge),o;return a>Jk?o=i==="outer"?"start":"end":a<-Jk?o=i==="outer"?"end":"start":o="middle",o}},{key:"renderAxisLine",value:function(){var n=this.props,i=n.cx,a=n.cy,o=n.radius,s=n.axisLine,c=n.axisLineType,u=$o($o({},je(this.props,!1)),{},{fill:"none"},je(s,!1));if(c==="circle")return M.createElement(eh,Ko({className:"recharts-polar-angle-axis-line"},u,{cx:i,cy:a,r:o}));var f=this.props.ticks,d=f.map(function(h){return nt(i,a,o,h.coordinate)});return M.createElement(U4,Ko({className:"recharts-polar-angle-axis-line"},u,{points:d}))}},{key:"renderTicks",value:function(){var n=this,i=this.props,a=i.ticks,o=i.tick,s=i.tickLine,c=i.tickFormatter,u=i.stroke,f=je(this.props,!1),d=je(o,!1),h=$o($o({},f),{},{fill:"none"},je(s,!1)),p=a.map(function(g,m){var y=n.getTickLineCoord(g),x=n.getTickTextAnchor(g),b=$o($o($o({textAnchor:x},f),{},{stroke:"none",fill:u},d),{},{index:m,payload:g,x:y.x2,y:y.y2});return M.createElement(Qe,Ko({className:Te("recharts-polar-angle-axis-tick",N4(o)),key:"tick-".concat(g.coordinate)},Jl(n.props,g,m)),s&&M.createElement("line",Ko({className:"recharts-polar-angle-axis-tick-line"},h,y)),o&&t.renderTickItem(o,b,c?c(g.value,m):g.value))});return M.createElement(Qe,{className:"recharts-polar-angle-axis-ticks"},p)}},{key:"render",value:function(){var n=this.props,i=n.ticks,a=n.radius,o=n.axisLine;return a<=0||!i||!i.length?null:M.createElement(Qe,{className:Te("recharts-polar-angle-axis",this.props.className)},o&&this.renderAxisLine(),this.renderTicks())}}],[{key:"renderTickItem",value:function(n,i,a){var o;return M.isValidElement(n)?o=M.cloneElement(n,i):Ce(n)?o=n(i):o=M.createElement(ac,Ko({},i,{className:"recharts-polar-angle-axis-tick-value"}),a),o}}])}(v.PureComponent);Yv(rh,"displayName","PolarAngleAxis");Yv(rh,"axisType","angleAxis");Yv(rh,"defaultProps",{type:"category",angleAxisId:0,scale:"auto",cx:0,cy:0,orientation:"outer",axisLine:!0,tickLine:!0,tickSize:8,tick:!0,hide:!1,allowDuplicatedCategory:!0});var cge=HD,uge=cge(Object.getPrototypeOf,Object),dge=uge,fge=ja,hge=dge,pge=Pa,mge="[object Object]",gge=Function.prototype,vge=Object.prototype,K4=gge.toString,yge=vge.hasOwnProperty,xge=K4.call(Object);function bge(e){if(!pge(e)||fge(e)!=mge)return!1;var t=hge(e);if(t===null)return!0;var r=yge.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&K4.call(r)==xge}var wge=bge;const Sge=Ye(wge);var jge=ja,Pge=Pa,Nge="[object Boolean]";function _ge(e){return e===!0||e===!1||Pge(e)&&jge(e)==Nge}var Oge=_ge;const Ege=Ye(Oge);function df(e){"@babel/helpers - typeof";return df=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},df(e)}function Hm(){return Hm=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},Hm.apply(this,arguments)}function kge(e,t){return Mge(e)||Tge(e,t)||Age(e,t)||Cge()}function Cge(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 543In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Age(e,t){if(e){if(typeof e=="string")return eC(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 eC(e,t)}}function eC(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 Tge(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,s=[],c=!0,u=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(c=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);c=!0);}catch(f){u=!0,i=f}finally{try{if(!c&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function Mge(e){if(Array.isArray(e))return e}function tC(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).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?tC(Object(r),!0).forEach(function(n){Ige(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):tC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ige(e,t,r){return t=$ge(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function $ge(e){var t=Rge(e,"string");return df(t)=="symbol"?t:t+""}function Rge(e,t){if(df(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(df(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var nC=function(t,r,n,i,a){var o=n-i,s;return s="M ".concat(t,",").concat(r),s+="L ".concat(t+n,",").concat(r),s+="L ".concat(t+n-o/2,",").concat(r+a),s+="L ".concat(t+n-o/2-i,",").concat(r+a),s+="L ".concat(t,",").concat(r," Z"),s},Dge={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},Lge=function(t){var r=rC(rC({},Dge),t),n=v.useRef(),i=v.useState(-1),a=kge(i,2),o=a[0],s=a[1];v.useEffect(function(){if(n.current&&n.current.getTotalLength)try{var w=n.current.getTotalLength();w&&s(w)}catch{}},[]);var c=r.x,u=r.y,f=r.upperWidth,d=r.lowerWidth,h=r.height,p=r.className,g=r.animationEasing,m=r.animationDuration,y=r.animationBegin,x=r.isUpdateAnimationActive;if(c!==+c||u!==+u||f!==+f||d!==+d||h!==+h||f===0&&d===0||h===0)return null;var b=Te("recharts-trapezoid",p);return x?M.createElement(Oi,{canBegin:o>0,from:{upperWidth:0,lowerWidth:0,height:h,x:c,y:u},to:{upperWidth:f,lowerWidth:d,height:h,x:c,y:u},duration:m,animationEasing:g,isActive:x},function(w){var S=w.upperWidth,j=w.lowerWidth,P=w.height,N=w.x,_=w.y;return M.createElement(Oi,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:y,duration:m,easing:g},M.createElement("path",Hm({},je(r,!0),{className:b,d:nC(N,_,S,j,P),ref:n})))}):M.createElement("g",null,M.createElement("path",Hm({},je(r,!0),{className:b,d:nC(c,u,f,d,h)})))},Fge=["option","shapeType","propTransformer","activeClassName","isActive"];function ff(e){"@babel/helpers - typeof";return ff=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},ff(e)}function Bge(e,t){if(e==null)return{};var r=Uge(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Uge(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 iC(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function qm(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?iC(Object(r),!0).forEach(function(n){zge(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):iC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function zge(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=Vge(e,"string");return ff(t)=="symbol"?t:t+""}function Vge(e,t){if(ff(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(ff(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Hge(e,t){return qm(qm({},t),e)}function qge(e,t){return e==="symbols"}function aC(e){var t=e.shapeType,r=e.elementProps;switch(t){case"rectangle":return M.createElement(nP,r);case"trapezoid":return M.createElement(Lge,r);case"sector":return M.createElement(k4,r);case"symbols":if(qge(t))return M.createElement(Sj,r);break;default:return null}}function Kge(e){return v.isValidElement(e)?e.props:e}function Gge(e){var t=e.option,r=e.shapeType,n=e.propTransformer,i=n===void 0?Hge:n,a=e.activeClassName,o=a===void 0?"recharts-active-shape":a,s=e.isActive,c=Bge(e,Fge),u;if(v.isValidElement(t))u=v.cloneElement(t,qm(qm({},c),Kge(t)));else if(Ce(t))u=t(c);else if(Sge(t)&&!Ege(t)){var f=i(t,c);u=M.createElement(aC,{shapeType:r,elementProps:f})}else{var d=c;u=M.createElement(aC,{shapeType:r,elementProps:d})}return s?M.createElement(Qe,{className:o},u):u}function Xv(e,t){return t!=null&&"trapezoids"in e.props}function Qv(e,t){return t!=null&&"sectors"in e.props}function hf(e,t){return t!=null&&"points"in e.props}function Yge(e,t){var r,n,i=e.x===(t==null||(r=t.labelViewBox)===null||r===void 0?void 0:r.x)||e.x===t.x,a=e.y===(t==null||(n=t.labelViewBox)===null||n===void 0?void 0:n.y)||e.y===t.y;return i&&a}function Xge(e,t){var r=e.endAngle===t.endAngle,n=e.startAngle===t.startAngle;return r&&n}function Qge(e,t){var r=e.x===t.x,n=e.y===t.y,i=e.z===t.z;return r&&n&&i}function Zge(e,t){var r;return Xv(e,t)?r=Yge:Qv(e,t)?r=Xge:hf(e,t)&&(r=Qge),r}function Jge(e,t){var r;return Xv(e,t)?r="trapezoids":Qv(e,t)?r="sectors":hf(e,t)&&(r="points"),r}function eve(e,t){if(Xv(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(Qv(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 hf(e,t)?t.payload:{}}function tve(e){var t=e.activeTooltipItem,r=e.graphicalItem,n=e.itemData,i=Jge(r,t),a=eve(r,t),o=n.filter(function(c,u){var f=Zf(a,c),d=r.props[i].filter(function(g){var m=Zge(r,t);return m(g,t)}),h=r.props[i].indexOf(d[d.length-1]),p=u===h;return f&&p}),s=n.indexOf(o[o.length-1]);return s}function rve(e){return e&&e.length?e[0]:void 0}var nve=rve,ive=nve;const ave=Ye(ive);var ove=["key"];function hc(e){"@babel/helpers - typeof";return hc=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},hc(e)}function sve(e,t){if(e==null)return{};var r=lve(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function lve(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 Km(){return Km=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},Km.apply(this,arguments)}function oC(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Pr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?oC(Object(r),!0).forEach(function(n){Ki(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):oC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function cve(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function sC(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,Y4(n.key),n)}}function uve(e,t,r){return t&&sC(e.prototype,t),r&&sC(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function dve(e,t,r){return t=Gm(t),fve(e,G4()?Reflect.construct(t,r||[],Gm(e).constructor):t.apply(e,r))}function fve(e,t){if(t&&(hc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return hve(e)}function hve(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function G4(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(G4=function(){return!!e})()}function Gm(e){return Gm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Gm(e)}function pve(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&&kw(e,t)}function kw(e,t){return kw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},kw(e,t)}function Ki(e,t,r){return t=Y4(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Y4(e){var t=mve(e,"string");return hc(t)=="symbol"?t:t+""}function mve(e,t){if(hc(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(hc(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var nh=function(e){function t(){var r;cve(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return r=dve(this,t,[].concat(i)),Ki(r,"state",{isAnimationFinished:!1}),Ki(r,"handleAnimationEnd",function(){var o=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),Ce(o)&&o()}),Ki(r,"handleAnimationStart",function(){var o=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),Ce(o)&&o()}),Ki(r,"handleMouseEnter",function(o){var s=r.props.onMouseEnter;s&&s(r.props,o)}),Ki(r,"handleMouseLeave",function(o){var s=r.props.onMouseLeave;s&&s(r.props,o)}),r}return pve(t,e),uve(t,[{key:"renderDots",value:function(n){var i=this.props,a=i.dot,o=i.dataKey,s=je(this.props,!1),c=je(a,!0),u=n.map(function(f,d){var h=Pr(Pr(Pr({key:"dot-".concat(d),r:3},s),c),{},{dataKey:o,cx:f.x,cy:f.y,index:d,payload:f});return t.renderDotItem(a,h)});return M.createElement(Qe,{className:"recharts-radar-dots"},u)}},{key:"renderPolygonStatically",value:function(n){var i=this.props,a=i.shape,o=i.dot,s=i.isRange,c=i.baseLinePoints,u=i.connectNulls,f;return M.isValidElement(a)?f=M.cloneElement(a,Pr(Pr({},this.props),{},{points:n})):Ce(a)?f=a(Pr(Pr({},this.props),{},{points:n})):f=M.createElement(U4,Km({},je(this.props,!0),{onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave,points:n,baseLinePoints:s?c:null,connectNulls:u})),M.createElement(Qe,{className:"recharts-radar-polygon"},f,o?this.renderDots(n):null)}},{key:"renderPolygonWithAnimation",value:function(){var n=this,i=this.props,a=i.points,o=i.isAnimationActive,s=i.animationBegin,c=i.animationDuration,u=i.animationEasing,f=i.animationId,d=this.state.prevPoints;return M.createElement(Oi,{begin:s,duration:c,isActive:o,easing:u,from:{t:0},to:{t:1},key:"radar-".concat(f),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(h){var p=h.t,g=d&&d.length/a.length,m=a.map(function(y,x){var b=d&&d[Math.floor(x*g)];if(b){var w=Or(b.x,y.x),S=Or(b.y,y.y);return Pr(Pr({},y),{},{x:w(p),y:S(p)})}var j=Or(y.cx,y.x),P=Or(y.cy,y.y);return Pr(Pr({},y),{},{x:j(p),y:P(p)})});return n.renderPolygonStatically(m)})}},{key:"renderPolygon",value:function(){var n=this.props,i=n.points,a=n.isAnimationActive,o=n.isRange,s=this.state.prevPoints;return a&&i&&i.length&&!o&&(!s||!Zf(s,i))?this.renderPolygonWithAnimation():this.renderPolygonStatically(i)}},{key:"render",value:function(){var n=this.props,i=n.hide,a=n.className,o=n.points,s=n.isAnimationActive;if(i||!o||!o.length)return null;var c=this.state.isAnimationFinished,u=Te("recharts-radar",a);return M.createElement(Qe,{className:u},this.renderPolygon(),(!s||c)&&oa.renderCallByParent(this.props,o))}}],[{key:"getDerivedStateFromProps",value:function(n,i){return n.animationId!==i.prevAnimationId?{prevAnimationId:n.animationId,curPoints:n.points,prevPoints:i.curPoints}:n.points!==i.curPoints?{curPoints:n.points}:null}},{key:"renderDotItem",value:function(n,i){var a;if(M.isValidElement(n))a=M.cloneElement(n,i);else if(Ce(n))a=n(i);else{var o=i.key,s=sve(i,ove);a=M.createElement(eh,Km({},s,{key:o,className:Te("recharts-radar-dot",typeof n!="boolean"?n.className:"")}))}return a}}])}(v.PureComponent);Ki(nh,"displayName","Radar");Ki(nh,"defaultProps",{angleAxisId:0,radiusAxisId:0,hide:!1,activeDot:!0,dot:!1,legendType:"rect",isAnimationActive:!wi.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"});Ki(nh,"getComposedData",function(e){var t=e.radiusAxis,r=e.angleAxis,n=e.displayedData,i=e.dataKey,a=e.bandSize,o=r.cx,s=r.cy,c=!1,u=[],f=r.type!=="number"?a??0:0;n.forEach(function(h,p){var g=Cr(h,r.dataKey,p),m=Cr(h,i),y=r.scale(g)+f,x=Array.isArray(m)?O4(m):m,b=Fe(x)?void 0:t.scale(x);Array.isArray(m)&&m.length>=2&&(c=!0),u.push(Pr(Pr({},nt(o,s,b,y)),{},{name:g,value:m,cx:o,cy:s,radius:b,angle:y,payload:h}))});var d=[];return c&&u.forEach(function(h){if(Array.isArray(h.value)){var p=ave(h.value),g=Fe(p)?void 0:t.scale(p);d.push(Pr(Pr({},h),{},{radius:g},nt(o,s,g,h.angle)))}else d.push(h)}),{points:u,isRange:c,baseLinePoints:d}});var gve=Math.ceil,vve=Math.max;function yve(e,t,r,n){for(var i=-1,a=vve(gve((t-e)/(r||1)),0),o=Array(a);a--;)o[n?a:++i]=e,e+=r;return o}var xve=yve,bve=uL,lC=1/0,wve=17976931348623157e292;function Sve(e){if(!e)return e===0?e:0;if(e=bve(e),e===lC||e===-lC){var t=e<0?-1:1;return t*wve}return e===e?e:0}var X4=Sve,jve=xve,Pve=Rv,Tx=X4;function Nve(e){return function(t,r,n){return n&&typeof n!="number"&&Pve(t,r,n)&&(r=n=void 0),t=Tx(t),r===void 0?(r=t,t=0):r=Tx(r),n=n===void 0?t<r?1:-1:Tx(n),jve(t,r,n,e)}}var _ve=Nve,Ove=_ve,Eve=Ove(),kve=Eve;const Ym=Ye(kve);function pf(e){"@babel/helpers - typeof";return pf=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},pf(e)}function cC(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function uC(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?cC(Object(r),!0).forEach(function(n){Q4(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):cC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Q4(e,t,r){return t=Cve(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Cve(e){var t=Ave(e,"string");return pf(t)=="symbol"?t:t+""}function Ave(e,t){if(pf(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(pf(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Tve=["Webkit","Moz","O","ms"],Mve=function(t,r){var n=t.replace(/(\w)/,function(a){return a.toUpperCase()}),i=Tve.reduce(function(a,o){return uC(uC({},a),{},Q4({},o+n,r))},{});return i[t]=r,i};function pc(e){"@babel/helpers - typeof";return pc=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},pc(e)}function Xm(){return Xm=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},Xm.apply(this,arguments)}function dC(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Mx(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?dC(Object(r),!0).forEach(function(n){Yr(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):dC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ive(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function fC(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,J4(n.key),n)}}function $ve(e,t,r){return t&&fC(e.prototype,t),r&&fC(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Rve(e,t,r){return t=Qm(t),Dve(e,Z4()?Reflect.construct(t,r||[],Qm(e).constructor):t.apply(e,r))}function Dve(e,t){if(t&&(pc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Lve(e)}function Lve(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Z4(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Z4=function(){return!!e})()}function Qm(e){return Qm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Qm(e)}function Fve(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&&Cw(e,t)}function Cw(e,t){return Cw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Cw(e,t)}function Yr(e,t,r){return t=J4(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function J4(e){var t=Bve(e,"string");return pc(t)=="symbol"?t:t+""}function Bve(e,t){if(pc(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(pc(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Uve=function(t){var r=t.data,n=t.startIndex,i=t.endIndex,a=t.x,o=t.width,s=t.travellerWidth;if(!r||!r.length)return{};var c=r.length,u=Zu().domain(Ym(0,c)).range([a,a+o-s]),f=u.domain().map(function(d){return u(d)});return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:u(n),endX:u(i),scale:u,scaleValues:f}},hC=function(t){return t.changedTouches&&!!t.changedTouches.length},mc=function(e){function t(r){var n;return Ive(this,t),n=Rve(this,t,[r]),Yr(n,"handleDrag",function(i){n.leaveTimer&&(clearTimeout(n.leaveTimer),n.leaveTimer=null),n.state.isTravellerMoving?n.handleTravellerMove(i):n.state.isSlideMoving&&n.handleSlideDrag(i)}),Yr(n,"handleTouchMove",function(i){i.changedTouches!=null&&i.changedTouches.length>0&&n.handleDrag(i.changedTouches[0])}),Yr(n,"handleDragEnd",function(){n.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var i=n.props,a=i.endIndex,o=i.onDragEnd,s=i.startIndex;o==null||o({endIndex:a,startIndex:s})}),n.detachDragEndListener()}),Yr(n,"handleLeaveWrapper",function(){(n.state.isTravellerMoving||n.state.isSlideMoving)&&(n.leaveTimer=window.setTimeout(n.handleDragEnd,n.props.leaveTimeOut))}),Yr(n,"handleEnterSlideOrTraveller",function(){n.setState({isTextActive:!0})}),Yr(n,"handleLeaveSlideOrTraveller",function(){n.setState({isTextActive:!1})}),Yr(n,"handleSlideDragStart",function(i){var a=hC(i)?i.changedTouches[0]:i;n.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:a.pageX}),n.attachDragEndListener()}),n.travellerDragStartHandlers={startX:n.handleTravellerDragStart.bind(n,"startX"),endX:n.handleTravellerDragStart.bind(n,"endX")},n.state={},n}return Fve(t,e),$ve(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(n){var i=n.startX,a=n.endX,o=this.state.scaleValues,s=this.props,c=s.gap,u=s.data,f=u.length-1,d=Math.min(i,a),h=Math.max(i,a),p=t.getIndexInRange(o,d),g=t.getIndexInRange(o,h);return{startIndex:p-p%c,endIndex:g===f?f:g-g%c}}},{key:"getTextOfTick",value:function(n){var i=this.props,a=i.data,o=i.tickFormatter,s=i.dataKey,c=Cr(a[n],s,n);return Ce(o)?o(c,n):c}},{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 i=this.state,a=i.slideMoveStartX,o=i.startX,s=i.endX,c=this.props,u=c.x,f=c.width,d=c.travellerWidth,h=c.startIndex,p=c.endIndex,g=c.onChange,m=n.pageX-a;m>0?m=Math.min(m,u+f-d-s,u+f-d-o):m<0&&(m=Math.max(m,u-o,u-s));var y=this.getIndex({startX:o+m,endX:s+m});(y.startIndex!==h||y.endIndex!==p)&&g&&g(y),this.setState({startX:o+m,endX:s+m,slideMoveStartX:n.pageX})}},{key:"handleTravellerDragStart",value:function(n,i){var a=hC(i)?i.changedTouches[0]:i;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:n,brushMoveStartX:a.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(n){var i=this.state,a=i.brushMoveStartX,o=i.movingTravellerId,s=i.endX,c=i.startX,u=this.state[o],f=this.props,d=f.x,h=f.width,p=f.travellerWidth,g=f.onChange,m=f.gap,y=f.data,x={startX:this.state.startX,endX:this.state.endX},b=n.pageX-a;b>0?b=Math.min(b,d+h-p-u):b<0&&(b=Math.max(b,d-u)),x[o]=u+b;var w=this.getIndex(x),S=w.startIndex,j=w.endIndex,P=function(){var _=y.length-1;return o==="startX"&&(s>c?S%m===0:j%m===0)||s<c&&j===_||o==="endX"&&(s>c?j%m===0:S%m===0)||s>c&&j===_};this.setState(Yr(Yr({},o,u+b),"brushMoveStartX",n.pageX),function(){g&&P()&&g(w)})}},{key:"handleTravellerMoveKeyboard",value:function(n,i){var a=this,o=this.state,s=o.scaleValues,c=o.startX,u=o.endX,f=this.state[i],d=s.indexOf(f);if(d!==-1){var h=d+n;if(!(h===-1||h>=s.length)){var p=s[h];i==="startX"&&p>=u||i==="endX"&&p<=c||this.setState(Yr({},i,p),function(){a.props.onChange(a.getIndex({startX:a.state.startX,endX:a.state.endX}))})}}}},{key:"renderBackground",value:function(){var n=this.props,i=n.x,a=n.y,o=n.width,s=n.height,c=n.fill,u=n.stroke;return M.createElement("rect",{stroke:u,fill:c,x:i,y:a,width:o,height:s})}},{key:"renderPanorama",value:function(){var n=this.props,i=n.x,a=n.y,o=n.width,s=n.height,c=n.data,u=n.children,f=n.padding,d=v.Children.only(u);return d?M.cloneElement(d,{x:i,y:a,width:o,height:s,margin:f,compact:!0,data:c}):null}},{key:"renderTravellerLayer",value:function(n,i){var a,o,s=this,c=this.props,u=c.y,f=c.travellerWidth,d=c.height,h=c.traveller,p=c.ariaLabel,g=c.data,m=c.startIndex,y=c.endIndex,x=Math.max(n,this.props.x),b=Mx(Mx({},je(this.props,!1)),{},{x,y:u,width:f,height:d}),w=p||"Min value: ".concat((a=g[m])===null||a===void 0?void 0:a.name,", Max value: ").concat((o=g[y])===null||o===void 0?void 0:o.name);return M.createElement(Qe,{tabIndex:0,role:"slider","aria-label":w,"aria-valuenow":n,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[i],onTouchStart:this.travellerDragStartHandlers[i],onKeyDown:function(j){["ArrowLeft","ArrowRight"].includes(j.key)&&(j.preventDefault(),j.stopPropagation(),s.handleTravellerMoveKeyboard(j.key==="ArrowRight"?1:-1,i))},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,i){var a=this.props,o=a.y,s=a.height,c=a.stroke,u=a.travellerWidth,f=Math.min(n,i)+u,d=Math.max(Math.abs(i-n)-u,0);return M.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:c,fillOpacity:.2,x:f,y:o,width:d,height:s})}},{key:"renderText",value:function(){var n=this.props,i=n.startIndex,a=n.endIndex,o=n.y,s=n.height,c=n.travellerWidth,u=n.stroke,f=this.state,d=f.startX,h=f.endX,p=5,g={pointerEvents:"none",fill:u};return M.createElement(Qe,{className:"recharts-brush-texts"},M.createElement(ac,Xm({textAnchor:"end",verticalAnchor:"middle",x:Math.min(d,h)-p,y:o+s/2},g),this.getTextOfTick(i)),M.createElement(ac,Xm({textAnchor:"start",verticalAnchor:"middle",x:Math.max(d,h)+c+p,y:o+s/2},g),this.getTextOfTick(a)))}},{key:"render",value:function(){var n=this.props,i=n.data,a=n.className,o=n.children,s=n.x,c=n.y,u=n.width,f=n.height,d=n.alwaysShowText,h=this.state,p=h.startX,g=h.endX,m=h.isTextActive,y=h.isSlideMoving,x=h.isTravellerMoving,b=h.isTravellerFocused;if(!i||!i.length||!oe(s)||!oe(c)||!oe(u)||!oe(f)||u<=0||f<=0)return null;var w=Te("recharts-brush",a),S=M.Children.count(o)===1,j=Mve("userSelect","none");return M.createElement(Qe,{className:w,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:j},this.renderBackground(),S&&this.renderPanorama(),this.renderSlide(p,g),this.renderTravellerLayer(p,"startX"),this.renderTravellerLayer(g,"endX"),(m||y||x||b||d)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(n){var i=n.x,a=n.y,o=n.width,s=n.height,c=n.stroke,u=Math.floor(a+s/2)-1;return M.createElement(M.Fragment,null,M.createElement("rect",{x:i,y:a,width:o,height:s,fill:c,stroke:"none"}),M.createElement("line",{x1:i+1,y1:u,x2:i+o-1,y2:u,fill:"none",stroke:"#fff"}),M.createElement("line",{x1:i+1,y1:u+2,x2:i+o-1,y2:u+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(n,i){var a;return M.isValidElement(n)?a=M.cloneElement(n,i):Ce(n)?a=n(i):a=t.renderDefaultTraveller(i),a}},{key:"getDerivedStateFromProps",value:function(n,i){var a=n.data,o=n.width,s=n.x,c=n.travellerWidth,u=n.updateId,f=n.startIndex,d=n.endIndex;if(a!==i.prevData||u!==i.prevUpdateId)return Mx({prevData:a,prevTravellerWidth:c,prevUpdateId:u,prevX:s,prevWidth:o},a&&a.length?Uve({data:a,width:o,x:s,travellerWidth:c,startIndex:f,endIndex:d}):{scale:null,scaleValues:null});if(i.scale&&(o!==i.prevWidth||s!==i.prevX||c!==i.prevTravellerWidth)){i.scale.range([s,s+o-c]);var h=i.scale.domain().map(function(p){return i.scale(p)});return{prevData:a,prevTravellerWidth:c,prevUpdateId:u,prevX:s,prevWidth:o,startX:i.scale(n.startIndex),endX:i.scale(n.endIndex),scaleValues:h}}return null}},{key:"getIndexInRange",value:function(n,i){for(var a=n.length,o=0,s=a-1;s-o>1;){var c=Math.floor((o+s)/2);n[c]>i?s=c:o=c}return i>=n[s]?s:o}}])}(v.PureComponent);Yr(mc,"displayName","Brush");Yr(mc,"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 zve=kj;function Wve(e,t){var r;return zve(e,function(n,i,a){return r=t(n,i,a),!r}),!!r}var Vve=Wve,Hve=DD,qve=Ii,Kve=Vve,Gve=Kr,Yve=Rv;function Xve(e,t,r){var n=Gve(e)?Hve:Kve;return r&&Yve(e,t,r)&&(t=void 0),n(e,qve(t))}var Qve=Xve;const Zve=Ye(Qve);var ji=function(t,r){var n=t.alwaysShow,i=t.ifOverflow;return n&&(i="extendDomain"),i===r},pC=aL;function Jve(e,t,r){t=="__proto__"&&pC?pC(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var eye=Jve,tye=eye,rye=nL,nye=Ii;function iye(e,t){var r={};return t=nye(t),rye(e,function(n,i,a){tye(r,i,t(n,i,a))}),r}var aye=iye;const oye=Ye(aye);function sye(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 lye=sye,cye=kj;function uye(e,t){var r=!0;return cye(e,function(n,i,a){return r=!!t(n,i,a),r}),r}var dye=uye,fye=lye,hye=dye,pye=Ii,mye=Kr,gye=Rv;function vye(e,t,r){var n=mye(e)?fye:hye;return r&&gye(e,t,r)&&(t=void 0),n(e,pye(t))}var yye=vye;const e3=Ye(yye);var xye=["x","y"];function mf(e){"@babel/helpers - typeof";return mf=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},mf(e)}function Aw(){return Aw=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},Aw.apply(this,arguments)}function mC(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Su(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?mC(Object(r),!0).forEach(function(n){bye(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):mC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function bye(e,t,r){return t=wye(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function wye(e){var t=Sye(e,"string");return mf(t)=="symbol"?t:t+""}function Sye(e,t){if(mf(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(mf(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function jye(e,t){if(e==null)return{};var r=Pye(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Pye(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 Nye(e,t){var r=e.x,n=e.y,i=jye(e,xye),a="".concat(r),o=parseInt(a,10),s="".concat(n),c=parseInt(s,10),u="".concat(t.height||i.height),f=parseInt(u,10),d="".concat(t.width||i.width),h=parseInt(d,10);return Su(Su(Su(Su(Su({},t),i),o?{x:o}:{}),c?{y:c}:{}),{},{height:f,width:h,name:t.name,radius:t.radius})}function gC(e){return M.createElement(Gge,Aw({shapeType:"rectangle",propTransformer:Nye,activeClassName:"recharts-active-bar"},e))}var _ye=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(n,i){if(typeof t=="number")return t;var a=typeof n=="number";return a?t(n,i):(a||Ns(),r)}},Oye=["value","background"],t3;function gc(e){"@babel/helpers - typeof";return gc=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},gc(e)}function Eye(e,t){if(e==null)return{};var r=kye(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function kye(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 Zm(){return Zm=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},Zm.apply(this,arguments)}function vC(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function It(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?vC(Object(r),!0).forEach(function(n){Za(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):vC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Cye(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function yC(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,n3(n.key),n)}}function Aye(e,t,r){return t&&yC(e.prototype,t),r&&yC(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Tye(e,t,r){return t=Jm(t),Mye(e,r3()?Reflect.construct(t,r||[],Jm(e).constructor):t.apply(e,r))}function Mye(e,t){if(t&&(gc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Iye(e)}function Iye(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function r3(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(r3=function(){return!!e})()}function Jm(e){return Jm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Jm(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&&Tw(e,t)}function Tw(e,t){return Tw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Tw(e,t)}function Za(e,t,r){return t=n3(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function n3(e){var t=Rye(e,"string");return gc(t)=="symbol"?t:t+""}function Rye(e,t){if(gc(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(gc(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ih=function(e){function t(){var r;Cye(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return r=Tye(this,t,[].concat(i)),Za(r,"state",{isAnimationFinished:!1}),Za(r,"id",qf("recharts-bar-")),Za(r,"handleAnimationEnd",function(){var o=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),o&&o()}),Za(r,"handleAnimationStart",function(){var o=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),o&&o()}),r}return $ye(t,e),Aye(t,[{key:"renderRectanglesStatically",value:function(n){var i=this,a=this.props,o=a.shape,s=a.dataKey,c=a.activeIndex,u=a.activeBar,f=je(this.props,!1);return n&&n.map(function(d,h){var p=h===c,g=p?u:o,m=It(It(It({},f),d),{},{isActive:p,option:g,index:h,dataKey:s,onAnimationStart:i.handleAnimationStart,onAnimationEnd:i.handleAnimationEnd});return M.createElement(Qe,Zm({className:"recharts-bar-rectangle"},Jl(i.props,d,h),{key:"rectangle-".concat(d==null?void 0:d.x,"-").concat(d==null?void 0:d.y,"-").concat(d==null?void 0:d.value)}),M.createElement(gC,m))})}},{key:"renderRectanglesWithAnimation",value:function(){var n=this,i=this.props,a=i.data,o=i.layout,s=i.isAnimationActive,c=i.animationBegin,u=i.animationDuration,f=i.animationEasing,d=i.animationId,h=this.state.prevData;return M.createElement(Oi,{begin:c,duration:u,isActive:s,easing:f,from:{t:0},to:{t:1},key:"bar-".concat(d),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(p){var g=p.t,m=a.map(function(y,x){var b=h&&h[x];if(b){var w=Or(b.x,y.x),S=Or(b.y,y.y),j=Or(b.width,y.width),P=Or(b.height,y.height);return It(It({},y),{},{x:w(g),y:S(g),width:j(g),height:P(g)})}if(o==="horizontal"){var N=Or(0,y.height),_=N(g);return It(It({},y),{},{y:y.y+y.height-_,height:_})}var O=Or(0,y.width),k=O(g);return It(It({},y),{},{width:k})});return M.createElement(Qe,null,n.renderRectanglesStatically(m))})}},{key:"renderRectangles",value:function(){var n=this.props,i=n.data,a=n.isAnimationActive,o=this.state.prevData;return a&&i&&i.length&&(!o||!Zf(o,i))?this.renderRectanglesWithAnimation():this.renderRectanglesStatically(i)}},{key:"renderBackground",value:function(){var n=this,i=this.props,a=i.data,o=i.dataKey,s=i.activeIndex,c=je(this.props.background,!1);return a.map(function(u,f){u.value;var d=u.background,h=Eye(u,Oye);if(!d)return null;var p=It(It(It(It(It({},h),{},{fill:"#eee"},d),c),Jl(n.props,u,f)),{},{onAnimationStart:n.handleAnimationStart,onAnimationEnd:n.handleAnimationEnd,dataKey:o,index:f,className:"recharts-bar-background-rectangle"});return M.createElement(gC,Zm({key:"background-bar-".concat(f),option:n.props.background,isActive:f===s},p))})}},{key:"renderErrorBar",value:function(n,i){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var a=this.props,o=a.data,s=a.xAxis,c=a.yAxis,u=a.layout,f=a.children,d=Nn(f,Jf);if(!d)return null;var h=u==="vertical"?o[0].height/2:o[0].width/2,p=function(y,x){var b=Array.isArray(y.value)?y.value[1]:y.value;return{x:y.x,y:y.y,value:b,errorVal:Cr(y,x)}},g={clipPath:n?"url(#clipPath-".concat(i,")"):null};return M.createElement(Qe,g,d.map(function(m){return M.cloneElement(m,{key:"error-bar-".concat(i,"-").concat(m.props.dataKey),data:o,xAxis:s,yAxis:c,layout:u,offset:h,dataPointFormatter:p})}))}},{key:"render",value:function(){var n=this.props,i=n.hide,a=n.data,o=n.className,s=n.xAxis,c=n.yAxis,u=n.left,f=n.top,d=n.width,h=n.height,p=n.isAnimationActive,g=n.background,m=n.id;if(i||!a||!a.length)return null;var y=this.state.isAnimationFinished,x=Te("recharts-bar",o),b=s&&s.allowDataOverflow,w=c&&c.allowDataOverflow,S=b||w,j=Fe(m)?this.id:m;return M.createElement(Qe,{className:x},b||w?M.createElement("defs",null,M.createElement("clipPath",{id:"clipPath-".concat(j)},M.createElement("rect",{x:b?u:u-d/2,y:w?f:f-h/2,width:b?d:d*2,height:w?h:h*2}))):null,M.createElement(Qe,{className:"recharts-bar-rectangles",clipPath:S?"url(#clipPath-".concat(j,")"):null},g?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(S,j),(!p||y)&&oa.renderCallByParent(this.props,a))}}],[{key:"getDerivedStateFromProps",value:function(n,i){return n.animationId!==i.prevAnimationId?{prevAnimationId:n.animationId,curData:n.data,prevData:i.curData}:n.data!==i.curData?{curData:n.data}:null}}])}(v.PureComponent);t3=ih;Za(ih,"displayName","Bar");Za(ih,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!wi.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"});Za(ih,"getComposedData",function(e){var t=e.props,r=e.item,n=e.barPosition,i=e.bandSize,a=e.xAxis,o=e.yAxis,s=e.xAxisTicks,c=e.yAxisTicks,u=e.stackedData,f=e.dataStartIndex,d=e.displayedData,h=e.offset,p=lfe(n,r);if(!p)return null;var g=t.layout,m=r.type.defaultProps,y=m!==void 0?It(It({},m),r.props):r.props,x=y.dataKey,b=y.children,w=y.minPointSize,S=g==="horizontal"?o:a,j=u?S.scale.domain():null,P=mfe({numericAxis:S}),N=Nn(b,hL),_=d.map(function(O,k){var C,E,I,T,$,R;u?C=cfe(u[f+k],j):(C=Cr(O,x),Array.isArray(C)||(C=[P,C]));var U=_ye(w,t3.defaultProps.minPointSize)(C[1],k);if(g==="horizontal"){var A,D=[o.scale(C[0]),o.scale(C[1])],F=D[0],z=D[1];E=ok({axis:a,ticks:s,bandSize:i,offset:p.offset,entry:O,index:k}),I=(A=z??F)!==null&&A!==void 0?A:void 0,T=p.size;var H=F-z;if($=Number.isNaN(H)?0:H,R={x:E,y:o.y,width:T,height:o.height},Math.abs(U)>0&&Math.abs($)<Math.abs(U)){var ue=Gn($||U)*(Math.abs(U)-Math.abs($));I-=ue,$+=ue}}else{var be=[a.scale(C[0]),a.scale(C[1])],Le=be[0],Be=be[1];if(E=Le,I=ok({axis:o,ticks:c,bandSize:i,offset:p.offset,entry:O,index:k}),T=Be-Le,$=p.size,R={x:a.x,y:I,width:a.width,height:$},Math.abs(U)>0&&Math.abs(T)<Math.abs(U)){var se=Gn(T||U)*(Math.abs(U)-Math.abs(T));T+=se}}return It(It(It({},O),{},{x:E,y:I,width:T,height:$,value:u?C:C[1],payload:O,background:R},N&&N[k]&&N[k].props),{},{tooltipPayload:[j4(r,O)],tooltipPosition:{x:E+T/2,y:I+$/2}})});return It({data:_,layout:g},h)});function gf(e){"@babel/helpers - typeof";return gf=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},gf(e)}function Dye(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xC(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,i3(n.key),n)}}function Lye(e,t,r){return t&&xC(e.prototype,t),r&&xC(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function bC(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function zn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?bC(Object(r),!0).forEach(function(n){Zv(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):bC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Zv(e,t,r){return t=i3(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i3(e){var t=Fye(e,"string");return gf(t)=="symbol"?t:t+""}function Fye(e,t){if(gf(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(gf(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Bye=function(t,r,n,i,a){var o=t.width,s=t.height,c=t.layout,u=t.children,f=Object.keys(r),d={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=!!Zr(u,ih);return f.reduce(function(p,g){var m=r[g],y=m.orientation,x=m.domain,b=m.padding,w=b===void 0?{}:b,S=m.mirror,j=m.reversed,P="".concat(y).concat(S?"Mirror":""),N,_,O,k,C;if(m.type==="number"&&(m.padding==="gap"||m.padding==="no-gap")){var E=x[1]-x[0],I=1/0,T=m.categoricalDomain.sort();if(T.forEach(function(be,Le){Le>0&&(I=Math.min((be||0)-(T[Le-1]||0),I))}),Number.isFinite(I)){var $=I/E,R=m.layout==="vertical"?n.height:n.width;if(m.padding==="gap"&&(N=$*R/2),m.padding==="no-gap"){var U=Yn(t.barCategoryGap,$*R),A=$*R/2;N=A-U-(A-U)/R*U}}}i==="xAxis"?_=[n.left+(w.left||0)+(N||0),n.left+n.width-(w.right||0)-(N||0)]:i==="yAxis"?_=c==="horizontal"?[n.top+n.height-(w.bottom||0),n.top+(w.top||0)]:[n.top+(w.top||0)+(N||0),n.top+n.height-(w.bottom||0)-(N||0)]:_=m.range,j&&(_=[_[1],_[0]]);var D=x4(m,a,h),F=D.scale,z=D.realScaleType;F.domain(x).range(_),b4(F);var H=w4(F,zn(zn({},m),{},{realScaleType:z}));i==="xAxis"?(C=y==="top"&&!S||y==="bottom"&&S,O=n.left,k=d[P]-C*m.height):i==="yAxis"&&(C=y==="left"&&!S||y==="right"&&S,O=d[P]-C*m.width,k=n.top);var ue=zn(zn(zn({},m),H),{},{realScaleType:z,x:O,y:k,scale:F,width:i==="xAxis"?n.width:m.width,height:i==="yAxis"?n.height:m.height});return ue.bandSize=Rm(ue,H),!m.hide&&i==="xAxis"?d[P]+=(C?-1:1)*ue.height:m.hide||(d[P]+=(C?-1:1)*ue.width),zn(zn({},p),{},Zv({},g,ue))},{})},a3=function(t,r){var n=t.x,i=t.y,a=r.x,o=r.y;return{x:Math.min(n,a),y:Math.min(i,o),width:Math.abs(a-n),height:Math.abs(o-i)}},Uye=function(t){var r=t.x1,n=t.y1,i=t.x2,a=t.y2;return a3({x:r,y:n},{x:i,y:a})},o3=function(){function e(t){Dye(this,e),this.scale=t}return Lye(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]:{},i=n.bandAware,a=n.position;if(r!==void 0){if(a)switch(a){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(i){var c=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+c}return this.scale(r)}}},{key:"isInRange",value:function(r){var n=this.range(),i=n[0],a=n[n.length-1];return i<=a?r>=i&&r<=a:r>=a&&r<=i}}],[{key:"create",value:function(r){return new e(r)}}])}();Zv(o3,"EPS",1e-4);var iP=function(t){var r=Object.keys(t).reduce(function(n,i){return zn(zn({},n),{},Zv({},i,o3.create(t[i])))},{});return zn(zn({},r),{},{apply:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=a.bandAware,s=a.position;return oye(i,function(c,u){return r[u].apply(c,{bandAware:o,position:s})})},isInRange:function(i){return e3(i,function(a,o){return r[o].isInRange(a)})}})};function zye(e){return(e%180+180)%180}var Wye=function(t){var r=t.width,n=t.height,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=zye(i),o=a*Math.PI/180,s=Math.atan(n/r),c=o>s&&o<Math.PI-s?n/Math.sin(o):r/Math.cos(o);return Math.abs(c)},Vye=Ii,Hye=Kf,qye=Iv;function Kye(e){return function(t,r,n){var i=Object(t);if(!Hye(t)){var a=Vye(r);t=qye(t),r=function(s){return a(i[s],s,i)}}var o=e(t,r,n);return o>-1?i[a?t[o]:o]:void 0}}var Gye=Kye,Yye=X4;function Xye(e){var t=Yye(e),r=t%1;return t===t?r?t-r:t:0}var Qye=Xye,Zye=QD,Jye=Ii,exe=Qye,txe=Math.max;function rxe(e,t,r){var n=e==null?0:e.length;if(!n)return-1;var i=r==null?0:exe(r);return i<0&&(i=txe(n+i,0)),Zye(e,Jye(t),i)}var nxe=rxe,ixe=Gye,axe=nxe,oxe=ixe(axe),sxe=oxe;const lxe=Ye(sxe);var cxe=XY(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("")}),aP=v.createContext(void 0),oP=v.createContext(void 0),s3=v.createContext(void 0),l3=v.createContext({}),c3=v.createContext(void 0),u3=v.createContext(0),d3=v.createContext(0),wC=function(t){var r=t.state,n=r.xAxisMap,i=r.yAxisMap,a=r.offset,o=t.clipPathId,s=t.children,c=t.width,u=t.height,f=cxe(a);return M.createElement(aP.Provider,{value:n},M.createElement(oP.Provider,{value:i},M.createElement(l3.Provider,{value:a},M.createElement(s3.Provider,{value:f},M.createElement(c3.Provider,{value:o},M.createElement(u3.Provider,{value:u},M.createElement(d3.Provider,{value:c},s)))))))},uxe=function(){return v.useContext(c3)},f3=function(t){var r=v.useContext(aP);r==null&&Ns();var n=r[t];return n==null&&Ns(),n},dxe=function(){var t=v.useContext(aP);return La(t)},fxe=function(){var t=v.useContext(oP),r=lxe(t,function(n){return e3(n.domain,Number.isFinite)});return r||La(t)},h3=function(t){var r=v.useContext(oP);r==null&&Ns();var n=r[t];return n==null&&Ns(),n},hxe=function(){var t=v.useContext(s3);return t},pxe=function(){return v.useContext(l3)},sP=function(){return v.useContext(d3)},lP=function(){return v.useContext(u3)};function vc(e){"@babel/helpers - typeof";return vc=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},vc(e)}function mxe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function gxe(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,m3(n.key),n)}}function vxe(e,t,r){return t&&gxe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function yxe(e,t,r){return t=eg(t),xxe(e,p3()?Reflect.construct(t,r||[],eg(e).constructor):t.apply(e,r))}function xxe(e,t){if(t&&(vc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return bxe(e)}function bxe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function p3(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(p3=function(){return!!e})()}function eg(e){return eg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},eg(e)}function wxe(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&&Mw(e,t)}function Mw(e,t){return Mw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Mw(e,t)}function SC(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function jC(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?SC(Object(r),!0).forEach(function(n){cP(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):SC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function cP(e,t,r){return t=m3(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function m3(e){var t=Sxe(e,"string");return vc(t)=="symbol"?t:t+""}function Sxe(e,t){if(vc(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(vc(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function jxe(e,t){return Oxe(e)||_xe(e,t)||Nxe(e,t)||Pxe()}function Pxe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 544In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Nxe(e,t){if(e){if(typeof e=="string")return PC(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 PC(e,t)}}function PC(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 _xe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,s=[],c=!0,u=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(c=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);c=!0);}catch(f){u=!0,i=f}finally{try{if(!c&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function Oxe(e){if(Array.isArray(e))return e}function Iw(){return Iw=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},Iw.apply(this,arguments)}var Exe=function(t,r){var n;return M.isValidElement(t)?n=M.cloneElement(t,r):Ce(t)?n=t(r):n=M.createElement("line",Iw({},r,{className:"recharts-reference-line-line"})),n},kxe=function(t,r,n,i,a,o,s,c,u){var f=a.x,d=a.y,h=a.width,p=a.height;if(n){var g=u.y,m=t.y.apply(g,{position:o});if(ji(u,"discard")&&!t.y.isInRange(m))return null;var y=[{x:f+h,y:m},{x:f,y:m}];return c==="left"?y.reverse():y}if(r){var x=u.x,b=t.x.apply(x,{position:o});if(ji(u,"discard")&&!t.x.isInRange(b))return null;var w=[{x:b,y:d+p},{x:b,y:d}];return s==="top"?w.reverse():w}if(i){var S=u.segment,j=S.map(function(P){return t.apply(P,{position:o})});return ji(u,"discard")&&Zve(j,function(P){return!t.isInRange(P)})?null:j}return null};function Cxe(e){var t=e.x,r=e.y,n=e.segment,i=e.xAxisId,a=e.yAxisId,o=e.shape,s=e.className,c=e.alwaysShow,u=uxe(),f=f3(i),d=h3(a),h=hxe();if(!u||!h)return null;ia(c===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var p=iP({x:f.scale,y:d.scale}),g=qt(t),m=qt(r),y=n&&n.length===2,x=kxe(p,g,m,y,h,e.position,f.orientation,d.orientation,e);if(!x)return null;var b=jxe(x,2),w=b[0],S=w.x,j=w.y,P=b[1],N=P.x,_=P.y,O=ji(e,"hidden")?"url(#".concat(u,")"):void 0,k=jC(jC({clipPath:O},je(e,!0)),{},{x1:S,y1:j,x2:N,y2:_});return M.createElement(Qe,{className:Te("recharts-reference-line",s)},Exe(o,k),sr.renderCallByParent(e,Uye({x1:S,y1:j,x2:N,y2:_})))}var uP=function(e){function t(){return mxe(this,t),yxe(this,t,arguments)}return wxe(t,e),vxe(t,[{key:"render",value:function(){return M.createElement(Cxe,this.props)}}])}(M.Component);cP(uP,"displayName","ReferenceLine");cP(uP,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});function $w(){return $w=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},$w.apply(this,arguments)}function yc(e){"@babel/helpers - typeof";return yc=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},yc(e)}function NC(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function _C(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?NC(Object(r),!0).forEach(function(n){Jv(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):NC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Axe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Txe(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,v3(n.key),n)}}function Mxe(e,t,r){return t&&Txe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ixe(e,t,r){return t=tg(t),$xe(e,g3()?Reflect.construct(t,r||[],tg(e).constructor):t.apply(e,r))}function $xe(e,t){if(t&&(yc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Rxe(e)}function Rxe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function g3(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(g3=function(){return!!e})()}function tg(e){return tg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},tg(e)}function Dxe(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&&Rw(e,t)}function Rw(e,t){return Rw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Rw(e,t)}function Jv(e,t,r){return t=v3(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function v3(e){var t=Lxe(e,"string");return yc(t)=="symbol"?t:t+""}function Lxe(e,t){if(yc(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(yc(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Fxe=function(t){var r=t.x,n=t.y,i=t.xAxis,a=t.yAxis,o=iP({x:i.scale,y:a.scale}),s=o.apply({x:r,y:n},{bandAware:!0});return ji(t,"discard")&&!o.isInRange(s)?null:s},ey=function(e){function t(){return Axe(this,t),Ixe(this,t,arguments)}return Dxe(t,e),Mxe(t,[{key:"render",value:function(){var n=this.props,i=n.x,a=n.y,o=n.r,s=n.alwaysShow,c=n.clipPathId,u=qt(i),f=qt(a);if(ia(s===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!u||!f)return null;var d=Fxe(this.props);if(!d)return null;var h=d.x,p=d.y,g=this.props,m=g.shape,y=g.className,x=ji(this.props,"hidden")?"url(#".concat(c,")"):void 0,b=_C(_C({clipPath:x},je(this.props,!0)),{},{cx:h,cy:p});return M.createElement(Qe,{className:Te("recharts-reference-dot",y)},t.renderDot(m,b),sr.renderCallByParent(this.props,{x:h-o,y:p-o,width:2*o,height:2*o}))}}])}(M.Component);Jv(ey,"displayName","ReferenceDot");Jv(ey,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1});Jv(ey,"renderDot",function(e,t){var r;return M.isValidElement(e)?r=M.cloneElement(e,t):Ce(e)?r=e(t):r=M.createElement(eh,$w({},t,{cx:t.cx,cy:t.cy,className:"recharts-reference-dot-dot"})),r});function Dw(){return Dw=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},Dw.apply(this,arguments)}function xc(e){"@babel/helpers - typeof";return xc=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},xc(e)}function OC(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function EC(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?OC(Object(r),!0).forEach(function(n){ty(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):OC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Bxe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Uxe(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,x3(n.key),n)}}function zxe(e,t,r){return t&&Uxe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Wxe(e,t,r){return t=rg(t),Vxe(e,y3()?Reflect.construct(t,r||[],rg(e).constructor):t.apply(e,r))}function Vxe(e,t){if(t&&(xc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Hxe(e)}function Hxe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function y3(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(y3=function(){return!!e})()}function rg(e){return rg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},rg(e)}function qxe(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&&Lw(e,t)}function Lw(e,t){return Lw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Lw(e,t)}function ty(e,t,r){return t=x3(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function x3(e){var t=Kxe(e,"string");return xc(t)=="symbol"?t:t+""}function Kxe(e,t){if(xc(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(xc(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Gxe=function(t,r,n,i,a){var o=a.x1,s=a.x2,c=a.y1,u=a.y2,f=a.xAxis,d=a.yAxis;if(!f||!d)return null;var h=iP({x:f.scale,y:d.scale}),p={x:t?h.x.apply(o,{position:"start"}):h.x.rangeMin,y:n?h.y.apply(c,{position:"start"}):h.y.rangeMin},g={x:r?h.x.apply(s,{position:"end"}):h.x.rangeMax,y:i?h.y.apply(u,{position:"end"}):h.y.rangeMax};return ji(a,"discard")&&(!h.isInRange(p)||!h.isInRange(g))?null:a3(p,g)},ry=function(e){function t(){return Bxe(this,t),Wxe(this,t,arguments)}return qxe(t,e),zxe(t,[{key:"render",value:function(){var n=this.props,i=n.x1,a=n.x2,o=n.y1,s=n.y2,c=n.className,u=n.alwaysShow,f=n.clipPathId;ia(u===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var d=qt(i),h=qt(a),p=qt(o),g=qt(s),m=this.props.shape;if(!d&&!h&&!p&&!g&&!m)return null;var y=Gxe(d,h,p,g,this.props);if(!y&&!m)return null;var x=ji(this.props,"hidden")?"url(#".concat(f,")"):void 0;return M.createElement(Qe,{className:Te("recharts-reference-area",c)},t.renderRect(m,EC(EC({clipPath:x},je(this.props,!0)),y)),sr.renderCallByParent(this.props,y))}}])}(M.Component);ty(ry,"displayName","ReferenceArea");ty(ry,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1});ty(ry,"renderRect",function(e,t){var r;return M.isValidElement(e)?r=M.cloneElement(e,t):Ce(e)?r=e(t):r=M.createElement(nP,Dw({},t,{className:"recharts-reference-area-rect"})),r});function b3(e,t,r){if(t<1)return[];if(t===1&&r===void 0)return e;for(var n=[],i=0;i<e.length;i+=t)n.push(e[i]);return n}function Yxe(e,t,r){var n={width:e.width+t.width,height:e.height+t.height};return Wye(n,r)}function Xxe(e,t,r){var n=r==="width",i=e.x,a=e.y,o=e.width,s=e.height;return t===1?{start:n?i:a,end:n?i+o:a+s}:{start:n?i+o:a+s,end:n?i:a}}function ng(e,t,r,n,i){if(e*t<e*n||e*t>e*i)return!1;var a=r();return e*(t-e*a/2-n)>=0&&e*(t+e*a/2-i)<=0}function Qxe(e,t){return b3(e,t+1)}function Zxe(e,t,r,n,i){for(var a=(n||[]).slice(),o=t.start,s=t.end,c=0,u=1,f=o,d=function(){var g=n==null?void 0:n[c];if(g===void 0)return{v:b3(n,u)};var m=c,y,x=function(){return y===void 0&&(y=r(g,m)),y},b=g.coordinate,w=c===0||ng(e,b,x,f,s);w||(c=0,f=o,u+=1),w&&(f=b+e*(x()/2+i),c+=u)},h;u<=a.length;)if(h=d(),h)return h.v;return[]}function vf(e){"@babel/helpers - typeof";return vf=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},vf(e)}function kC(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function mr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?kC(Object(r),!0).forEach(function(n){Jxe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):kC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Jxe(e,t,r){return t=ebe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ebe(e){var t=tbe(e,"string");return vf(t)=="symbol"?t:t+""}function tbe(e,t){if(vf(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(vf(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function rbe(e,t,r,n,i){for(var a=(n||[]).slice(),o=a.length,s=t.start,c=t.end,u=function(h){var p=a[h],g,m=function(){return g===void 0&&(g=r(p,h)),g};if(h===o-1){var y=e*(p.coordinate+e*m()/2-c);a[h]=p=mr(mr({},p),{},{tickCoord:y>0?p.coordinate-y*e:p.coordinate})}else a[h]=p=mr(mr({},p),{},{tickCoord:p.coordinate});var x=ng(e,p.tickCoord,m,s,c);x&&(c=p.tickCoord-e*(m()/2+i),a[h]=mr(mr({},p),{},{isShow:!0}))},f=o-1;f>=0;f--)u(f);return a}function nbe(e,t,r,n,i,a){var o=(n||[]).slice(),s=o.length,c=t.start,u=t.end;if(a){var f=n[s-1],d=r(f,s-1),h=e*(f.coordinate+e*d/2-u);o[s-1]=f=mr(mr({},f),{},{tickCoord:h>0?f.coordinate-h*e:f.coordinate});var p=ng(e,f.tickCoord,function(){return d},c,u);p&&(u=f.tickCoord-e*(d/2+i),o[s-1]=mr(mr({},f),{},{isShow:!0}))}for(var g=a?s-1:s,m=function(b){var w=o[b],S,j=function(){return S===void 0&&(S=r(w,b)),S};if(b===0){var P=e*(w.coordinate-e*j()/2-c);o[b]=w=mr(mr({},w),{},{tickCoord:P<0?w.coordinate-P*e:w.coordinate})}else o[b]=w=mr(mr({},w),{},{tickCoord:w.coordinate});var N=ng(e,w.tickCoord,j,c,u);N&&(c=w.tickCoord+e*(j()/2+i),o[b]=mr(mr({},w),{},{isShow:!0}))},y=0;y<g;y++)m(y);return o}function dP(e,t,r){var n=e.tick,i=e.ticks,a=e.viewBox,o=e.minTickGap,s=e.orientation,c=e.interval,u=e.tickFormatter,f=e.unit,d=e.angle;if(!i||!i.length||!n)return[];if(oe(c)||wi.isSsr)return Qxe(i,typeof c=="number"&&oe(c)?c:0);var h=[],p=s==="top"||s==="bottom"?"width":"height",g=f&&p==="width"?Qu(f,{fontSize:t,letterSpacing:r}):{width:0,height:0},m=function(w,S){var j=Ce(u)?u(w.value,S):w.value;return p==="width"?Yxe(Qu(j,{fontSize:t,letterSpacing:r}),g,d):Qu(j,{fontSize:t,letterSpacing:r})[p]},y=i.length>=2?Gn(i[1].coordinate-i[0].coordinate):1,x=Xxe(a,y,p);return c==="equidistantPreserveStart"?Zxe(y,x,m,i,o):(c==="preserveStart"||c==="preserveStartEnd"?h=nbe(y,x,m,i,o,c==="preserveStartEnd"):h=rbe(y,x,m,i,o),h.filter(function(b){return b.isShow}))}var ibe=["viewBox"],abe=["viewBox"],obe=["ticks"];function bc(e){"@babel/helpers - typeof";return bc=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},bc(e)}function ml(){return ml=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},ml.apply(this,arguments)}function CC(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function wr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?CC(Object(r),!0).forEach(function(n){fP(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):CC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ix(e,t){if(e==null)return{};var r=sbe(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function sbe(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 lbe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function AC(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,S3(n.key),n)}}function cbe(e,t,r){return t&&AC(e.prototype,t),r&&AC(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function ube(e,t,r){return t=ig(t),dbe(e,w3()?Reflect.construct(t,r||[],ig(e).constructor):t.apply(e,r))}function dbe(e,t){if(t&&(bc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return fbe(e)}function fbe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function w3(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(w3=function(){return!!e})()}function ig(e){return ig=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ig(e)}function hbe(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&&Fw(e,t)}function Fw(e,t){return Fw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Fw(e,t)}function fP(e,t,r){return t=S3(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function S3(e){var t=pbe(e,"string");return bc(t)=="symbol"?t:t+""}function pbe(e,t){if(bc(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(bc(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var eu=function(e){function t(r){var n;return lbe(this,t),n=ube(this,t,[r]),n.state={fontSize:"",letterSpacing:""},n}return hbe(t,e),cbe(t,[{key:"shouldComponentUpdate",value:function(n,i){var a=n.viewBox,o=Ix(n,ibe),s=this.props,c=s.viewBox,u=Ix(s,abe);return!_l(a,c)||!_l(o,u)||!_l(i,this.state)}},{key:"componentDidMount",value:function(){var n=this.layerReference;if(n){var i=n.getElementsByClassName("recharts-cartesian-axis-tick-value")[0];i&&this.setState({fontSize:window.getComputedStyle(i).fontSize,letterSpacing:window.getComputedStyle(i).letterSpacing})}}},{key:"getTickLineCoord",value:function(n){var i=this.props,a=i.x,o=i.y,s=i.width,c=i.height,u=i.orientation,f=i.tickSize,d=i.mirror,h=i.tickMargin,p,g,m,y,x,b,w=d?-1:1,S=n.tickSize||f,j=oe(n.tickCoord)?n.tickCoord:n.coordinate;switch(u){case"top":p=g=n.coordinate,y=o+ +!d*c,m=y-w*S,b=m-w*h,x=j;break;case"left":m=y=n.coordinate,g=a+ +!d*s,p=g-w*S,x=p-w*h,b=j;break;case"right":m=y=n.coordinate,g=a+ +d*s,p=g+w*S,x=p+w*h,b=j;break;default:p=g=n.coordinate,y=o+ +d*c,m=y+w*S,b=m+w*h,x=j;break}return{line:{x1:p,y1:m,x2:g,y2:y},tick:{x,y:b}}}},{key:"getTickTextAnchor",value:function(){var n=this.props,i=n.orientation,a=n.mirror,o;switch(i){case"left":o=a?"start":"end";break;case"right":o=a?"end":"start";break;default:o="middle";break}return o}},{key:"getTickVerticalAnchor",value:function(){var n=this.props,i=n.orientation,a=n.mirror,o="end";switch(i){case"left":case"right":o="middle";break;case"top":o=a?"start":"end";break;default:o=a?"end":"start";break}return o}},{key:"renderAxisLine",value:function(){var n=this.props,i=n.x,a=n.y,o=n.width,s=n.height,c=n.orientation,u=n.mirror,f=n.axisLine,d=wr(wr(wr({},je(this.props,!1)),je(f,!1)),{},{fill:"none"});if(c==="top"||c==="bottom"){var h=+(c==="top"&&!u||c==="bottom"&&u);d=wr(wr({},d),{},{x1:i,y1:a+h*s,x2:i+o,y2:a+h*s})}else{var p=+(c==="left"&&!u||c==="right"&&u);d=wr(wr({},d),{},{x1:i+p*o,y1:a,x2:i+p*o,y2:a+s})}return M.createElement("line",ml({},d,{className:Te("recharts-cartesian-axis-line",Pn(f,"className"))}))}},{key:"renderTicks",value:function(n,i,a){var o=this,s=this.props,c=s.tickLine,u=s.stroke,f=s.tick,d=s.tickFormatter,h=s.unit,p=dP(wr(wr({},this.props),{},{ticks:n}),i,a),g=this.getTickTextAnchor(),m=this.getTickVerticalAnchor(),y=je(this.props,!1),x=je(f,!1),b=wr(wr({},y),{},{fill:"none"},je(c,!1)),w=p.map(function(S,j){var P=o.getTickLineCoord(S),N=P.line,_=P.tick,O=wr(wr(wr(wr({textAnchor:g,verticalAnchor:m},y),{},{stroke:"none",fill:u},x),_),{},{index:j,payload:S,visibleTicksCount:p.length,tickFormatter:d});return M.createElement(Qe,ml({className:"recharts-cartesian-axis-tick",key:"tick-".concat(S.value,"-").concat(S.coordinate,"-").concat(S.tickCoord)},Jl(o.props,S,j)),c&&M.createElement("line",ml({},b,N,{className:Te("recharts-cartesian-axis-tick-line",Pn(c,"className"))})),f&&t.renderTickItem(f,O,"".concat(Ce(d)?d(S.value,j):S.value).concat(h||"")))});return M.createElement("g",{className:"recharts-cartesian-axis-ticks"},w)}},{key:"render",value:function(){var n=this,i=this.props,a=i.axisLine,o=i.width,s=i.height,c=i.ticksGenerator,u=i.className,f=i.hide;if(f)return null;var d=this.props,h=d.ticks,p=Ix(d,obe),g=h;return Ce(c)&&(g=h&&h.length>0?c(this.props):c(p)),o<=0||s<=0||!g||!g.length?null:M.createElement(Qe,{className:Te("recharts-cartesian-axis",u),ref:function(y){n.layerReference=y}},a&&this.renderAxisLine(),this.renderTicks(g,this.state.fontSize,this.state.letterSpacing),sr.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(n,i,a){var o;return M.isValidElement(n)?o=M.cloneElement(n,i):Ce(n)?o=n(i):o=M.createElement(ac,ml({},i,{className:"recharts-cartesian-axis-tick-value"}),a),o}}])}(v.Component);fP(eu,"displayName","CartesianAxis");fP(eu,"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 mbe=["x1","y1","x2","y2","key"],gbe=["offset"];function _s(e){"@babel/helpers - typeof";return _s=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},_s(e)}function TC(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function yr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?TC(Object(r),!0).forEach(function(n){vbe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):TC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function vbe(e,t,r){return t=ybe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ybe(e){var t=xbe(e,"string");return _s(t)=="symbol"?t:t+""}function xbe(e,t){if(_s(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(_s(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ts(){return ts=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},ts.apply(this,arguments)}function MC(e,t){if(e==null)return{};var r=bbe(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function bbe(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 wbe=function(t){var r=t.fill;if(!r||r==="none")return null;var n=t.fillOpacity,i=t.x,a=t.y,o=t.width,s=t.height,c=t.ry;return M.createElement("rect",{x:i,y:a,ry:c,width:o,height:s,stroke:"none",fill:r,fillOpacity:n,className:"recharts-cartesian-grid-bg"})};function j3(e,t){var r;if(M.isValidElement(e))r=M.cloneElement(e,t);else if(Ce(e))r=e(t);else{var n=t.x1,i=t.y1,a=t.x2,o=t.y2,s=t.key,c=MC(t,mbe),u=je(c,!1);u.offset;var f=MC(u,gbe);r=M.createElement("line",ts({},f,{x1:n,y1:i,x2:a,y2:o,fill:"none",key:s}))}return r}function Sbe(e){var t=e.x,r=e.width,n=e.horizontal,i=n===void 0?!0:n,a=e.horizontalPoints;if(!i||!a||!a.length)return null;var o=a.map(function(s,c){var u=yr(yr({},e),{},{x1:t,y1:s,x2:t+r,y2:s,key:"line-".concat(c),index:c});return j3(i,u)});return M.createElement("g",{className:"recharts-cartesian-grid-horizontal"},o)}function jbe(e){var t=e.y,r=e.height,n=e.vertical,i=n===void 0?!0:n,a=e.verticalPoints;if(!i||!a||!a.length)return null;var o=a.map(function(s,c){var u=yr(yr({},e),{},{x1:s,y1:t,x2:s,y2:t+r,key:"line-".concat(c),index:c});return j3(i,u)});return M.createElement("g",{className:"recharts-cartesian-grid-vertical"},o)}function Pbe(e){var t=e.horizontalFill,r=e.fillOpacity,n=e.x,i=e.y,a=e.width,o=e.height,s=e.horizontalPoints,c=e.horizontal,u=c===void 0?!0:c;if(!u||!t||!t.length)return null;var f=s.map(function(h){return Math.round(h+i-i)}).sort(function(h,p){return h-p});i!==f[0]&&f.unshift(0);var d=f.map(function(h,p){var g=!f[p+1],m=g?i+o-h:f[p+1]-h;if(m<=0)return null;var y=p%t.length;return M.createElement("rect",{key:"react-".concat(p),y:h,x:n,height:m,width:a,stroke:"none",fill:t[y],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return M.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},d)}function Nbe(e){var t=e.vertical,r=t===void 0?!0:t,n=e.verticalFill,i=e.fillOpacity,a=e.x,o=e.y,s=e.width,c=e.height,u=e.verticalPoints;if(!r||!n||!n.length)return null;var f=u.map(function(h){return Math.round(h+a-a)}).sort(function(h,p){return h-p});a!==f[0]&&f.unshift(0);var d=f.map(function(h,p){var g=!f[p+1],m=g?a+s-h:f[p+1]-h;if(m<=0)return null;var y=p%n.length;return M.createElement("rect",{key:"react-".concat(p),x:h,y:o,width:m,height:c,stroke:"none",fill:n[y],fillOpacity:i,className:"recharts-cartesian-grid-bg"})});return M.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},d)}var _be=function(t,r){var n=t.xAxis,i=t.width,a=t.height,o=t.offset;return y4(dP(yr(yr(yr({},eu.defaultProps),n),{},{ticks:Zi(n,!0),viewBox:{x:0,y:0,width:i,height:a}})),o.left,o.left+o.width,r)},Obe=function(t,r){var n=t.yAxis,i=t.width,a=t.height,o=t.offset;return y4(dP(yr(yr(yr({},eu.defaultProps),n),{},{ticks:Zi(n,!0),viewBox:{x:0,y:0,width:i,height:a}})),o.top,o.top+o.height,r)},Ys={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function P3(e){var t,r,n,i,a,o,s=sP(),c=lP(),u=pxe(),f=yr(yr({},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:(i=e.horizontalFill)!==null&&i!==void 0?i:Ys.horizontalFill,vertical:(a=e.vertical)!==null&&a!==void 0?a:Ys.vertical,verticalFill:(o=e.verticalFill)!==null&&o!==void 0?o:Ys.verticalFill,x:oe(e.x)?e.x:u.left,y:oe(e.y)?e.y:u.top,width:oe(e.width)?e.width:u.width,height:oe(e.height)?e.height:u.height}),d=f.x,h=f.y,p=f.width,g=f.height,m=f.syncWithTicks,y=f.horizontalValues,x=f.verticalValues,b=dxe(),w=fxe();if(!oe(p)||p<=0||!oe(g)||g<=0||!oe(d)||d!==+d||!oe(h)||h!==+h)return null;var S=f.verticalCoordinatesGenerator||_be,j=f.horizontalCoordinatesGenerator||Obe,P=f.horizontalPoints,N=f.verticalPoints;if((!P||!P.length)&&Ce(j)){var _=y&&y.length,O=j({yAxis:w?yr(yr({},w),{},{ticks:_?y:w.ticks}):void 0,width:s,height:c,offset:u},_?!0:m);ia(Array.isArray(O),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(_s(O),"]")),Array.isArray(O)&&(P=O)}if((!N||!N.length)&&Ce(S)){var k=x&&x.length,C=S({xAxis:b?yr(yr({},b),{},{ticks:k?x:b.ticks}):void 0,width:s,height:c,offset:u},k?!0:m);ia(Array.isArray(C),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(_s(C),"]")),Array.isArray(C)&&(N=C)}return M.createElement("g",{className:"recharts-cartesian-grid"},M.createElement(wbe,{fill:f.fill,fillOpacity:f.fillOpacity,x:f.x,y:f.y,width:f.width,height:f.height,ry:f.ry}),M.createElement(Sbe,ts({},f,{offset:u,horizontalPoints:P,xAxis:b,yAxis:w})),M.createElement(jbe,ts({},f,{offset:u,verticalPoints:N,xAxis:b,yAxis:w})),M.createElement(Pbe,ts({},f,{horizontalPoints:P})),M.createElement(Nbe,ts({},f,{verticalPoints:N})))}P3.displayName="CartesianGrid";var Ebe=["type","layout","connectNulls","ref"],kbe=["key"];function wc(e){"@babel/helpers - typeof";return wc=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},wc(e)}function IC(e,t){if(e==null)return{};var r=Cbe(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Cbe(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 nd(){return nd=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},nd.apply(this,arguments)}function $C(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Gr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?$C(Object(r),!0).forEach(function(n){Wn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$C(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Xs(e){return Ibe(e)||Mbe(e)||Tbe(e)||Abe()}function Abe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 545In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Tbe(e,t){if(e){if(typeof e=="string")return Bw(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 Bw(e,t)}}function Mbe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Ibe(e){if(Array.isArray(e))return Bw(e)}function Bw(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 $be(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function RC(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,_3(n.key),n)}}function Rbe(e,t,r){return t&&RC(e.prototype,t),r&&RC(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Dbe(e,t,r){return t=ag(t),Lbe(e,N3()?Reflect.construct(t,r||[],ag(e).constructor):t.apply(e,r))}function Lbe(e,t){if(t&&(wc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Fbe(e)}function Fbe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function N3(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(N3=function(){return!!e})()}function ag(e){return ag=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ag(e)}function Bbe(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&&Uw(e,t)}function Uw(e,t){return Uw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Uw(e,t)}function Wn(e,t,r){return t=_3(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _3(e){var t=Ube(e,"string");return wc(t)=="symbol"?t:t+""}function Ube(e,t){if(wc(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(wc(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Ja=function(e){function t(){var r;$be(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return r=Dbe(this,t,[].concat(i)),Wn(r,"state",{isAnimationFinished:!0,totalLength:0}),Wn(r,"generateSimpleStrokeDasharray",function(o,s){return"".concat(s,"px ").concat(o-s,"px")}),Wn(r,"getStrokeDasharray",function(o,s,c){var u=c.reduce(function(x,b){return x+b});if(!u)return r.generateSimpleStrokeDasharray(s,o);for(var f=Math.floor(o/u),d=o%u,h=s-o,p=[],g=0,m=0;g<c.length;m+=c[g],++g)if(m+c[g]>d){p=[].concat(Xs(c.slice(0,g)),[d-m]);break}var y=p.length%2===0?[0,h]:[h];return[].concat(Xs(t.repeat(c,f)),Xs(p),y).map(function(x){return"".concat(x,"px")}).join(", ")}),Wn(r,"id",qf("recharts-line-")),Wn(r,"pathRef",function(o){r.mainCurve=o}),Wn(r,"handleAnimationEnd",function(){r.setState({isAnimationFinished:!0}),r.props.onAnimationEnd&&r.props.onAnimationEnd()}),Wn(r,"handleAnimationStart",function(){r.setState({isAnimationFinished:!1}),r.props.onAnimationStart&&r.props.onAnimationStart()}),r}return Bbe(t,e),Rbe(t,[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var n=this.getTotalLength();this.setState({totalLength:n})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var n=this.getTotalLength();n!==this.state.totalLength&&this.setState({totalLength:n})}}},{key:"getTotalLength",value:function(){var n=this.mainCurve;try{return n&&n.getTotalLength&&n.getTotalLength()||0}catch{return 0}}},{key:"renderErrorBar",value:function(n,i){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var a=this.props,o=a.points,s=a.xAxis,c=a.yAxis,u=a.layout,f=a.children,d=Nn(f,Jf);if(!d)return null;var h=function(m,y){return{x:m.x,y:m.y,value:m.value,errorVal:Cr(m.payload,y)}},p={clipPath:n?"url(#clipPath-".concat(i,")"):null};return M.createElement(Qe,p,d.map(function(g){return M.cloneElement(g,{key:"bar-".concat(g.props.dataKey),data:o,xAxis:s,yAxis:c,layout:u,dataPointFormatter:h})}))}},{key:"renderDots",value:function(n,i,a){var o=this.props.isAnimationActive;if(o&&!this.state.isAnimationFinished)return null;var s=this.props,c=s.dot,u=s.points,f=s.dataKey,d=je(this.props,!1),h=je(c,!0),p=u.map(function(m,y){var x=Gr(Gr(Gr({key:"dot-".concat(y),r:3},d),h),{},{value:m.value,dataKey:f,cx:m.x,cy:m.y,index:y,payload:m.payload});return t.renderDotItem(c,x)}),g={clipPath:n?"url(#clipPath-".concat(i?"":"dots-").concat(a,")"):null};return M.createElement(Qe,nd({className:"recharts-line-dots",key:"dots"},g),p)}},{key:"renderCurveStatically",value:function(n,i,a,o){var s=this.props,c=s.type,u=s.layout,f=s.connectNulls;s.ref;var d=IC(s,Ebe),h=Gr(Gr(Gr({},je(d,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:i?"url(#clipPath-".concat(a,")"):null,points:n},o),{},{type:c,layout:u,connectNulls:f});return M.createElement(pw,nd({},h,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(n,i){var a=this,o=this.props,s=o.points,c=o.strokeDasharray,u=o.isAnimationActive,f=o.animationBegin,d=o.animationDuration,h=o.animationEasing,p=o.animationId,g=o.animateNewValues,m=o.width,y=o.height,x=this.state,b=x.prevPoints,w=x.totalLength;return M.createElement(Oi,{begin:f,duration:d,isActive:u,easing:h,from:{t:0},to:{t:1},key:"line-".concat(p),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(S){var j=S.t;if(b){var P=b.length/s.length,N=s.map(function(E,I){var T=Math.floor(I*P);if(b[T]){var $=b[T],R=Or($.x,E.x),U=Or($.y,E.y);return Gr(Gr({},E),{},{x:R(j),y:U(j)})}if(g){var A=Or(m*2,E.x),D=Or(y/2,E.y);return Gr(Gr({},E),{},{x:A(j),y:D(j)})}return Gr(Gr({},E),{},{x:E.x,y:E.y})});return a.renderCurveStatically(N,n,i)}var _=Or(0,w),O=_(j),k;if(c){var C="".concat(c).split(/[,\s]+/gim).map(function(E){return parseFloat(E)});k=a.getStrokeDasharray(O,w,C)}else k=a.generateSimpleStrokeDasharray(w,O);return a.renderCurveStatically(s,n,i,{strokeDasharray:k})})}},{key:"renderCurve",value:function(n,i){var a=this.props,o=a.points,s=a.isAnimationActive,c=this.state,u=c.prevPoints,f=c.totalLength;return s&&o&&o.length&&(!u&&f>0||!Zf(u,o))?this.renderCurveWithAnimation(n,i):this.renderCurveStatically(o,n,i)}},{key:"render",value:function(){var n,i=this.props,a=i.hide,o=i.dot,s=i.points,c=i.className,u=i.xAxis,f=i.yAxis,d=i.top,h=i.left,p=i.width,g=i.height,m=i.isAnimationActive,y=i.id;if(a||!s||!s.length)return null;var x=this.state.isAnimationFinished,b=s.length===1,w=Te("recharts-line",c),S=u&&u.allowDataOverflow,j=f&&f.allowDataOverflow,P=S||j,N=Fe(y)?this.id:y,_=(n=je(o,!1))!==null&&n!==void 0?n:{r:3,strokeWidth:2},O=_.r,k=O===void 0?3:O,C=_.strokeWidth,E=C===void 0?2:C,I=tQ(o)?o:{},T=I.clipDot,$=T===void 0?!0:T,R=k*2+E;return M.createElement(Qe,{className:w},S||j?M.createElement("defs",null,M.createElement("clipPath",{id:"clipPath-".concat(N)},M.createElement("rect",{x:S?h:h-p/2,y:j?d:d-g/2,width:S?p:p*2,height:j?g:g*2})),!$&&M.createElement("clipPath",{id:"clipPath-dots-".concat(N)},M.createElement("rect",{x:h-R/2,y:d-R/2,width:p+R,height:g+R}))):null,!b&&this.renderCurve(P,N),this.renderErrorBar(P,N),(b||o)&&this.renderDots(P,$,N),(!m||x)&&oa.renderCallByParent(this.props,s))}}],[{key:"getDerivedStateFromProps",value:function(n,i){return n.animationId!==i.prevAnimationId?{prevAnimationId:n.animationId,curPoints:n.points,prevPoints:i.curPoints}:n.points!==i.curPoints?{curPoints:n.points}:null}},{key:"repeat",value:function(n,i){for(var a=n.length%2!==0?[].concat(Xs(n),[0]):n,o=[],s=0;s<i;++s)o=[].concat(Xs(o),Xs(a));return o}},{key:"renderDotItem",value:function(n,i){var a;if(M.isValidElement(n))a=M.cloneElement(n,i);else if(Ce(n))a=n(i);else{var o=i.key,s=IC(i,kbe),c=Te("recharts-line-dot",typeof n!="boolean"?n.className:"");a=M.createElement(eh,nd({key:o},s,{className:c}))}return a}}])}(v.PureComponent);Wn(Ja,"displayName","Line");Wn(Ja,"defaultProps",{xAxisId:0,yAxisId:0,connectNulls:!1,activeDot:!0,dot:!0,legendType:"line",stroke:"#3182bd",strokeWidth:1,fill:"#fff",points:[],isAnimationActive:!wi.isSsr,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",hide:!1,label:!1});Wn(Ja,"getComposedData",function(e){var t=e.props,r=e.xAxis,n=e.yAxis,i=e.xAxisTicks,a=e.yAxisTicks,o=e.dataKey,s=e.bandSize,c=e.displayedData,u=e.offset,f=t.layout,d=c.map(function(h,p){var g=Cr(h,o);return f==="horizontal"?{x:ak({axis:r,ticks:i,bandSize:s,entry:h,index:p}),y:Fe(g)?null:n.scale(g),value:g,payload:h}:{x:Fe(g)?null:r.scale(g),y:ak({axis:n,ticks:a,bandSize:s,entry:h,index:p}),value:g,payload:h}});return Gr({points:d,layout:f},u)});function Sc(e){"@babel/helpers - typeof";return Sc=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},Sc(e)}function zbe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Wbe(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,k3(n.key),n)}}function Vbe(e,t,r){return t&&Wbe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Hbe(e,t,r){return t=og(t),qbe(e,O3()?Reflect.construct(t,r||[],og(e).constructor):t.apply(e,r))}function qbe(e,t){if(t&&(Sc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Kbe(e)}function Kbe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function O3(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(O3=function(){return!!e})()}function og(e){return og=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},og(e)}function Gbe(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&&zw(e,t)}function zw(e,t){return zw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},zw(e,t)}function E3(e,t,r){return t=k3(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function k3(e){var t=Ybe(e,"string");return Sc(t)=="symbol"?t:t+""}function Ybe(e,t){if(Sc(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Sc(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ww(){return Ww=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},Ww.apply(this,arguments)}function Xbe(e){var t=e.xAxisId,r=sP(),n=lP(),i=f3(t);return i==null?null:M.createElement(eu,Ww({},i,{className:Te("recharts-".concat(i.axisType," ").concat(i.axisType),i.className),viewBox:{x:0,y:0,width:r,height:n},ticksGenerator:function(o){return Zi(o,!0)}}))}var ny=function(e){function t(){return zbe(this,t),Hbe(this,t,arguments)}return Gbe(t,e),Vbe(t,[{key:"render",value:function(){return M.createElement(Xbe,this.props)}}])}(M.Component);E3(ny,"displayName","XAxis");E3(ny,"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 jc(e){"@babel/helpers - typeof";return jc=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},jc(e)}function Qbe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Zbe(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,T3(n.key),n)}}function Jbe(e,t,r){return t&&Zbe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function e0e(e,t,r){return t=sg(t),t0e(e,C3()?Reflect.construct(t,r||[],sg(e).constructor):t.apply(e,r))}function t0e(e,t){if(t&&(jc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return r0e(e)}function r0e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function C3(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(C3=function(){return!!e})()}function sg(e){return sg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},sg(e)}function n0e(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&&Vw(e,t)}function Vw(e,t){return Vw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Vw(e,t)}function A3(e,t,r){return t=T3(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function T3(e){var t=i0e(e,"string");return jc(t)=="symbol"?t:t+""}function i0e(e,t){if(jc(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(jc(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Hw(){return Hw=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},Hw.apply(this,arguments)}var a0e=function(t){var r=t.yAxisId,n=sP(),i=lP(),a=h3(r);return a==null?null:M.createElement(eu,Hw({},a,{className:Te("recharts-".concat(a.axisType," ").concat(a.axisType),a.className),viewBox:{x:0,y:0,width:n,height:i},ticksGenerator:function(s){return Zi(s,!0)}}))},iy=function(e){function t(){return Qbe(this,t),e0e(this,t,arguments)}return n0e(t,e),Jbe(t,[{key:"render",value:function(){return M.createElement(a0e,this.props)}}])}(M.Component);A3(iy,"displayName","YAxis");A3(iy,"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 DC(e){return c0e(e)||l0e(e)||s0e(e)||o0e()}function o0e(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 546In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function s0e(e,t){if(e){if(typeof e=="string")return qw(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 qw(e,t)}}function l0e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function c0e(e){if(Array.isArray(e))return qw(e)}function qw(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 Kw=function(t,r,n,i,a){var o=Nn(t,uP),s=Nn(t,ey),c=[].concat(DC(o),DC(s)),u=Nn(t,ry),f="".concat(i,"Id"),d=i[0],h=r;if(c.length&&(h=c.reduce(function(m,y){if(y.props[f]===n&&ji(y.props,"extendDomain")&&oe(y.props[d])){var x=y.props[d];return[Math.min(m[0],x),Math.max(m[1],x)]}return m},h)),u.length){var p="".concat(d,"1"),g="".concat(d,"2");h=u.reduce(function(m,y){if(y.props[f]===n&&ji(y.props,"extendDomain")&&oe(y.props[p])&&oe(y.props[g])){var x=y.props[p],b=y.props[g];return[Math.min(m[0],x,b),Math.max(m[1],x,b)]}return m},h)}return a&&a.length&&(h=a.reduce(function(m,y){return oe(y)?[Math.min(m[0],y),Math.max(m[1],y)]:m},h)),h},M3={exports:{}};(function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function i(c,u,f){this.fn=c,this.context=u,this.once=f||!1}function a(c,u,f,d,h){if(typeof f!="function")throw new TypeError("The listener must be a function");var p=new i(f,d||c,h),g=r?r+u:u;return c._events[g]?c._events[g].fn?c._events[g]=[c._events[g],p]:c._events[g].push(p):(c._events[g]=p,c._eventsCount++),c}function o(c,u){--c._eventsCount===0?c._events=new n:delete c._events[u]}function s(){this._events=new n,this._eventsCount=0}s.prototype.eventNames=function(){var u=[],f,d;if(this._eventsCount===0)return u;for(d in f=this._events)t.call(f,d)&&u.push(r?d.slice(1):d);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(f)):u},s.prototype.listeners=function(u){var f=r?r+u:u,d=this._events[f];if(!d)return[];if(d.fn)return[d.fn];for(var h=0,p=d.length,g=new Array(p);h<p;h++)g[h]=d[h].fn;return g},s.prototype.listenerCount=function(u){var f=r?r+u:u,d=this._events[f];return d?d.fn?1:d.length:0},s.prototype.emit=function(u,f,d,h,p,g){var m=r?r+u:u;if(!this._events[m])return!1;var y=this._events[m],x=arguments.length,b,w;if(y.fn){switch(y.once&&this.removeListener(u,y.fn,void 0,!0),x){case 1:return y.fn.call(y.context),!0;case 2:return y.fn.call(y.context,f),!0;case 3:return y.fn.call(y.context,f,d),!0;case 4:return y.fn.call(y.context,f,d,h),!0;case 5:return y.fn.call(y.context,f,d,h,p),!0;case 6:return y.fn.call(y.context,f,d,h,p,g),!0}for(w=1,b=new Array(x-1);w<x;w++)b[w-1]=arguments[w];y.fn.apply(y.context,b)}else{var S=y.length,j;for(w=0;w<S;w++)switch(y[w].once&&this.removeListener(u,y[w].fn,void 0,!0),x){case 1:y[w].fn.call(y[w].context);break;case 2:y[w].fn.call(y[w].context,f);break;case 3:y[w].fn.call(y[w].context,f,d);break;case 4:y[w].fn.call(y[w].context,f,d,h);break;default:if(!b)for(j=1,b=new Array(x-1);j<x;j++)b[j-1]=arguments[j];y[w].fn.apply(y[w].context,b)}}return!0},s.prototype.on=function(u,f,d){return a(this,u,f,d,!1)},s.prototype.once=function(u,f,d){return a(this,u,f,d,!0)},s.prototype.removeListener=function(u,f,d,h){var p=r?r+u:u;if(!this._events[p])return this;if(!f)return o(this,p),this;var g=this._events[p];if(g.fn)g.fn===f&&(!h||g.once)&&(!d||g.context===d)&&o(this,p);else{for(var m=0,y=[],x=g.length;m<x;m++)(g[m].fn!==f||h&&!g[m].once||d&&g[m].context!==d)&&y.push(g[m]);y.length?this._events[p]=y.length===1?y[0]:y:o(this,p)}return this},s.prototype.removeAllListeners=function(u){var f;return u?(f=r?r+u:u,this._events[f]&&o(this,f)):(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})(M3);var u0e=M3.exports;const d0e=Ye(u0e);var $x=new d0e,Rx="recharts.syncMouseEvents";function yf(e){"@babel/helpers - typeof";return yf=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},yf(e)}function f0e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h0e(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,I3(n.key),n)}}function p0e(e,t,r){return t&&h0e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Dx(e,t,r){return t=I3(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function I3(e){var t=m0e(e,"string");return yf(t)=="symbol"?t:t+""}function m0e(e,t){if(yf(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(yf(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var g0e=function(){function e(){f0e(this,e),Dx(this,"activeIndex",0),Dx(this,"coordinateList",[]),Dx(this,"layout","horizontal")}return p0e(e,[{key:"setDetails",value:function(r){var n,i=r.coordinateList,a=i===void 0?null:i,o=r.container,s=o===void 0?null:o,c=r.layout,u=c===void 0?null:c,f=r.offset,d=f===void 0?null:f,h=r.mouseHandlerCallback,p=h===void 0?null:h;this.coordinateList=(n=a??this.coordinateList)!==null&&n!==void 0?n:[],this.container=s??this.container,this.layout=u??this.layout,this.offset=d??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 i=this.container.getBoundingClientRect(),a=i.x,o=i.y,s=i.height,c=this.coordinateList[this.activeIndex].coordinate,u=((r=window)===null||r===void 0?void 0:r.scrollX)||0,f=((n=window)===null||n===void 0?void 0:n.scrollY)||0,d=a+c+u,h=o+this.offset.top+s/2+f;this.mouseHandlerCallback({pageX:d,pageY:h})}}}])}();function v0e(e,t,r){if(r==="number"&&t===!0&&Array.isArray(e)){var n=e==null?void 0:e[0],i=e==null?void 0:e[1];if(n&&i&&oe(n)&&oe(i))return!0}return!1}function y0e(e,t,r,n){var i=n/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-i:r.left+.5,y:e==="horizontal"?r.top+.5:t.y-i,width:e==="horizontal"?n:r.width-1,height:e==="horizontal"?r.height-1:n}}function $3(e){var t=e.cx,r=e.cy,n=e.radius,i=e.startAngle,a=e.endAngle,o=nt(t,r,n,i),s=nt(t,r,n,a);return{points:[o,s],cx:t,cy:r,radius:n,startAngle:i,endAngle:a}}function x0e(e,t,r){var n,i,a,o;if(e==="horizontal")n=t.x,a=n,i=r.top,o=r.top+r.height;else if(e==="vertical")i=t.y,o=i,n=r.left,a=r.left+r.width;else if(t.cx!=null&&t.cy!=null)if(e==="centric"){var s=t.cx,c=t.cy,u=t.innerRadius,f=t.outerRadius,d=t.angle,h=nt(s,c,u,d),p=nt(s,c,f,d);n=h.x,i=h.y,a=p.x,o=p.y}else return $3(t);return[{x:n,y:i},{x:a,y:o}]}function xf(e){"@babel/helpers - typeof";return xf=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},xf(e)}function LC(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function qh(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?LC(Object(r),!0).forEach(function(n){b0e(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):LC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function b0e(e,t,r){return t=w0e(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function w0e(e){var t=S0e(e,"string");return xf(t)=="symbol"?t:t+""}function S0e(e,t){if(xf(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(xf(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function j0e(e){var t,r,n=e.element,i=e.tooltipEventType,a=e.isActive,o=e.activeCoordinate,s=e.activePayload,c=e.offset,u=e.activeTooltipIndex,f=e.tooltipAxisBandSize,d=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||!a||!o||h!=="ScatterChart"&&i!=="axis")return null;var g,m=pw;if(h==="ScatterChart")g=o,m=wme;else if(h==="BarChart")g=y0e(d,o,c,f),m=nP;else if(d==="radial"){var y=$3(o),x=y.cx,b=y.cy,w=y.radius,S=y.startAngle,j=y.endAngle;g={cx:x,cy:b,startAngle:S,endAngle:j,innerRadius:w,outerRadius:w},m=k4}else g={points:x0e(d,o,c)},m=pw;var P=qh(qh(qh(qh({stroke:"#ccc",pointerEvents:"none"},c),g),je(p,!1)),{},{payload:s,payloadIndex:u,className:Te("recharts-tooltip-cursor",p.className)});return v.isValidElement(p)?v.cloneElement(p,P):v.createElement(m,P)}var P0e=["item"],N0e=["children","className","width","height","style","compact","title","desc"];function Pc(e){"@babel/helpers - typeof";return Pc=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},Pc(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)}function FC(e,t){return E0e(e)||O0e(e,t)||D3(e,t)||_0e()}function _0e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 547In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function O0e(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,s=[],c=!0,u=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(c=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);c=!0);}catch(f){u=!0,i=f}finally{try{if(!c&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function E0e(e){if(Array.isArray(e))return e}function BC(e,t){if(e==null)return{};var r=k0e(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function k0e(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 C0e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function A0e(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,L3(n.key),n)}}function T0e(e,t,r){return t&&A0e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function M0e(e,t,r){return t=lg(t),I0e(e,R3()?Reflect.construct(t,r||[],lg(e).constructor):t.apply(e,r))}function I0e(e,t){if(t&&(Pc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return $0e(e)}function $0e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function R3(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(R3=function(){return!!e})()}function lg(e){return lg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},lg(e)}function R0e(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&&Gw(e,t)}function Gw(e,t){return Gw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Gw(e,t)}function Nc(e){return F0e(e)||L0e(e)||D3(e)||D0e()}function D0e(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 548In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function D3(e,t){if(e){if(typeof e=="string")return Yw(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 Yw(e,t)}}function L0e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function F0e(e){if(Array.isArray(e))return Yw(e)}function Yw(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 UC(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function K(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?UC(Object(r),!0).forEach(function(n){Ne(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):UC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ne(e,t,r){return t=L3(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function L3(e){var t=B0e(e,"string");return Pc(t)=="symbol"?t:t+""}function B0e(e,t){if(Pc(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Pc(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var U0e={xAxis:["bottom","top"],yAxis:["left","right"]},z0e={width:"100%",height:"100%"},F3={x:0,y:0};function Kh(e){return e}var W0e=function(t,r){return r==="horizontal"?t.x:r==="vertical"?t.y:r==="centric"?t.angle:t.radius},V0e=function(t,r,n,i){var a=r.find(function(f){return f&&f.index===n});if(a){if(t==="horizontal")return{x:a.coordinate,y:i.y};if(t==="vertical")return{x:i.x,y:a.coordinate};if(t==="centric"){var o=a.coordinate,s=i.radius;return K(K(K({},i),nt(i.cx,i.cy,s,o)),{},{angle:o,radius:s})}var c=a.coordinate,u=i.angle;return K(K(K({},i),nt(i.cx,i.cy,c,u)),{},{angle:u,radius:c})}return F3},ay=function(t,r){var n=r.graphicalItems,i=r.dataStartIndex,a=r.dataEndIndex,o=(n??[]).reduce(function(s,c){var u=c.props.data;return u&&u.length?[].concat(Nc(s),Nc(u)):s},[]);return o.length>0?o:t&&t.length&&oe(i)&&oe(a)?t.slice(i,a+1):[]};function B3(e){return e==="number"?[0,"auto"]:void 0}var Xw=function(t,r,n,i){var a=t.graphicalItems,o=t.tooltipAxis,s=ay(r,t);return n<0||!a||!a.length||n>=s.length?null:a.reduce(function(c,u){var f,d=(f=u.props.data)!==null&&f!==void 0?f:r;d&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=n&&(d=d.slice(t.dataStartIndex,t.dataEndIndex+1));var h;if(o.dataKey&&!o.allowDuplicatedCategory){var p=d===void 0?s:d;h=lm(p,o.dataKey,i)}else h=d&&d[n]||s[n];return h?[].concat(Nc(c),[j4(u,h)]):c},[])},zC=function(t,r,n,i){var a=i||{x:t.chartX,y:t.chartY},o=W0e(a,n),s=t.orderedTooltipTicks,c=t.tooltipAxis,u=t.tooltipTicks,f=rfe(o,s,u,c);if(f>=0&&u){var d=u[f]&&u[f].value,h=Xw(t,r,f,d),p=V0e(n,s,f,a);return{activeTooltipIndex:f,activeLabel:d,activePayload:h,activeCoordinate:p}}return null},H0e=function(t,r){var n=r.axes,i=r.graphicalItems,a=r.axisType,o=r.axisIdKey,s=r.stackGroups,c=r.dataStartIndex,u=r.dataEndIndex,f=t.layout,d=t.children,h=t.stackOffset,p=v4(f,a);return n.reduce(function(g,m){var y,x=m.type.defaultProps!==void 0?K(K({},m.type.defaultProps),m.props):m.props,b=x.type,w=x.dataKey,S=x.allowDataOverflow,j=x.allowDuplicatedCategory,P=x.scale,N=x.ticks,_=x.includeHidden,O=x[o];if(g[O])return g;var k=ay(t.data,{graphicalItems:i.filter(function(H){var ue,be=o in H.props?H.props[o]:(ue=H.type.defaultProps)===null||ue===void 0?void 0:ue[o];return be===O}),dataStartIndex:c,dataEndIndex:u}),C=k.length,E,I,T;v0e(x.domain,S,b)&&(E=cw(x.domain,null,S),p&&(b==="number"||P!=="auto")&&(T=Ju(k,w,"category")));var $=B3(b);if(!E||E.length===0){var R,U=(R=x.domain)!==null&&R!==void 0?R:$;if(w){if(E=Ju(k,w,b),b==="category"&&p){var A=qX(E);j&&A?(I=E,E=Ym(0,C)):j||(E=ck(U,E,m).reduce(function(H,ue){return H.indexOf(ue)>=0?H:[].concat(Nc(H),[ue])},[]))}else if(b==="category")j?E=E.filter(function(H){return H!==""&&!Fe(H)}):E=ck(U,E,m).reduce(function(H,ue){return H.indexOf(ue)>=0||ue===""||Fe(ue)?H:[].concat(Nc(H),[ue])},[]);else if(b==="number"){var D=sfe(k,i.filter(function(H){var ue,be,Le=o in H.props?H.props[o]:(ue=H.type.defaultProps)===null||ue===void 0?void 0:ue[o],Be="hide"in H.props?H.props.hide:(be=H.type.defaultProps)===null||be===void 0?void 0:be.hide;return Le===O&&(_||!Be)}),w,a,f);D&&(E=D)}p&&(b==="number"||P!=="auto")&&(T=Ju(k,w,"category"))}else p?E=Ym(0,C):s&&s[O]&&s[O].hasStack&&b==="number"?E=h==="expand"?[0,1]:S4(s[O].stackGroups,c,u):E=g4(k,i.filter(function(H){var ue=o in H.props?H.props[o]:H.type.defaultProps[o],be="hide"in H.props?H.props.hide:H.type.defaultProps.hide;return ue===O&&(_||!be)}),b,f,!0);if(b==="number")E=Kw(d,E,O,a,N),U&&(E=cw(U,E,S));else if(b==="category"&&U){var F=U,z=E.every(function(H){return F.indexOf(H)>=0});z&&(E=F)}}return K(K({},g),{},Ne({},O,K(K({},x),{},{axisType:a,domain:E,categoricalDomain:T,duplicateDomain:I,originalDomain:(y=x.domain)!==null&&y!==void 0?y:$,isCategorical:p,layout:f})))},{})},q0e=function(t,r){var n=r.graphicalItems,i=r.Axis,a=r.axisType,o=r.axisIdKey,s=r.stackGroups,c=r.dataStartIndex,u=r.dataEndIndex,f=t.layout,d=t.children,h=ay(t.data,{graphicalItems:n,dataStartIndex:c,dataEndIndex:u}),p=h.length,g=v4(f,a),m=-1;return n.reduce(function(y,x){var b=x.type.defaultProps!==void 0?K(K({},x.type.defaultProps),x.props):x.props,w=b[o],S=B3("number");if(!y[w]){m++;var j;return g?j=Ym(0,p):s&&s[w]&&s[w].hasStack?(j=S4(s[w].stackGroups,c,u),j=Kw(d,j,w,a)):(j=cw(S,g4(h,n.filter(function(P){var N,_,O=o in P.props?P.props[o]:(N=P.type.defaultProps)===null||N===void 0?void 0:N[o],k="hide"in P.props?P.props.hide:(_=P.type.defaultProps)===null||_===void 0?void 0:_.hide;return O===w&&!k}),"number",f),i.defaultProps.allowDataOverflow),j=Kw(d,j,w,a)),K(K({},y),{},Ne({},w,K(K({axisType:a},i.defaultProps),{},{hide:!0,orientation:Pn(U0e,"".concat(a,".").concat(m%2),null),domain:j,originalDomain:S,isCategorical:g,layout:f})))}return y},{})},K0e=function(t,r){var n=r.axisType,i=n===void 0?"xAxis":n,a=r.AxisComp,o=r.graphicalItems,s=r.stackGroups,c=r.dataStartIndex,u=r.dataEndIndex,f=t.children,d="".concat(i,"Id"),h=Nn(f,a),p={};return h&&h.length?p=H0e(t,{axes:h,graphicalItems:o,axisType:i,axisIdKey:d,stackGroups:s,dataStartIndex:c,dataEndIndex:u}):o&&o.length&&(p=q0e(t,{Axis:a,graphicalItems:o,axisType:i,axisIdKey:d,stackGroups:s,dataStartIndex:c,dataEndIndex:u})),p},G0e=function(t){var r=La(t),n=Zi(r,!1,!0);return{tooltipTicks:n,orderedTooltipTicks:Cj(n,function(i){return i.coordinate}),tooltipAxis:r,tooltipAxisBandSize:Rm(r,n)}},WC=function(t){var r=t.children,n=t.defaultShowTooltip,i=Zr(r,mc),a=0,o=0;return t.data&&t.data.length!==0&&(o=t.data.length-1),i&&i.props&&(i.props.startIndex>=0&&(a=i.props.startIndex),i.props.endIndex>=0&&(o=i.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:a,dataEndIndex:o,activeTooltipIndex:-1,isTooltipActive:!!n}},Y0e=function(t){return!t||!t.length?!1:t.some(function(r){var n=na(r&&r.type);return n&&n.indexOf("Bar")>=0})},VC=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"}},X0e=function(t,r){var n=t.props,i=t.graphicalItems,a=t.xAxisMap,o=a===void 0?{}:a,s=t.yAxisMap,c=s===void 0?{}:s,u=n.width,f=n.height,d=n.children,h=n.margin||{},p=Zr(d,mc),g=Zr(d,fs),m=Object.keys(c).reduce(function(j,P){var N=c[P],_=N.orientation;return!N.mirror&&!N.hide?K(K({},j),{},Ne({},_,j[_]+N.width)):j},{left:h.left||0,right:h.right||0}),y=Object.keys(o).reduce(function(j,P){var N=o[P],_=N.orientation;return!N.mirror&&!N.hide?K(K({},j),{},Ne({},_,Pn(j,"".concat(_))+N.height)):j},{top:h.top||0,bottom:h.bottom||0}),x=K(K({},y),m),b=x.bottom;p&&(x.bottom+=p.props.height||mc.defaultProps.height),g&&r&&(x=afe(x,i,n,r));var w=u-x.left-x.right,S=f-x.top-x.bottom;return K(K({brushBottom:b},x),{},{width:Math.max(w,0),height:Math.max(S,0)})},Q0e=function(t,r){if(r==="xAxis")return t[r].width;if(r==="yAxis")return t[r].height},U3=function(t){var r=t.chartName,n=t.GraphicalChild,i=t.defaultTooltipEventType,a=i===void 0?"axis":i,o=t.validateTooltipEventTypes,s=o===void 0?["axis"]:o,c=t.axisComponents,u=t.legendContent,f=t.formatAxisMap,d=t.defaultProps,h=function(y,x){var b=x.graphicalItems,w=x.stackGroups,S=x.offset,j=x.updateId,P=x.dataStartIndex,N=x.dataEndIndex,_=y.barSize,O=y.layout,k=y.barGap,C=y.barCategoryGap,E=y.maxBarSize,I=VC(O),T=I.numericAxisName,$=I.cateAxisName,R=Y0e(b),U=[];return b.forEach(function(A,D){var F=ay(y.data,{graphicalItems:[A],dataStartIndex:P,dataEndIndex:N}),z=A.type.defaultProps!==void 0?K(K({},A.type.defaultProps),A.props):A.props,H=z.dataKey,ue=z.maxBarSize,be=z["".concat(T,"Id")],Le=z["".concat($,"Id")],Be={},se=c.reduce(function(V,ae){var te=x["".concat(ae.axisType,"Map")],J=z["".concat(ae.axisType,"Id")];te&&te[J]||ae.axisType==="zAxis"||Ns();var Se=te[J];return K(K({},V),{},Ne(Ne({},ae.axisType,Se),"".concat(ae.axisType,"Ticks"),Zi(Se)))},Be),Me=se[$],X=se["".concat($,"Ticks")],le=w&&w[be]&&w[be].hasStack&&gfe(A,w[be].stackGroups),fe=na(A.type).indexOf("Bar")>=0,q=Rm(Me,X),Ue=[],Oe=R&&nfe({barSize:_,stackGroups:w,totalSize:Q0e(se,$)});if(fe){var lt,it,Mt=Fe(ue)?E:ue,L=(lt=(it=Rm(Me,X,!0))!==null&&it!==void 0?it:Mt)!==null&<!==void 0?lt:0;Ue=ife({barGap:k,barCategoryGap:C,bandSize:L!==q?L:q,sizeList:Oe[Le],maxBarSize:Mt}),L!==q&&(Ue=Ue.map(function(V){return K(K({},V),{},{position:K(K({},V.position),{},{offset:V.position.offset-L/2})})}))}var W=A&&A.type&&A.type.getComposedData;W&&U.push({props:K(K({},W(K(K({},se),{},{displayedData:F,props:y,dataKey:H,item:A,bandSize:q,barPosition:Ue,offset:S,stackedData:le,layout:O,dataStartIndex:P,dataEndIndex:N}))),{},Ne(Ne(Ne({key:A.key||"item-".concat(D)},T,se[T]),$,se[$]),"animationId",j)),childIndex:iQ(A,y.children),item:A})}),U},p=function(y,x){var b=y.props,w=y.dataStartIndex,S=y.dataEndIndex,j=y.updateId;if(!rO({props:b}))return null;var P=b.children,N=b.layout,_=b.stackOffset,O=b.data,k=b.reverseStackOrder,C=VC(N),E=C.numericAxisName,I=C.cateAxisName,T=Nn(P,n),$=pfe(O,T,"".concat(E,"Id"),"".concat(I,"Id"),_,k),R=c.reduce(function(z,H){var ue="".concat(H.axisType,"Map");return K(K({},z),{},Ne({},ue,K0e(b,K(K({},H),{},{graphicalItems:T,stackGroups:H.axisType===E&&$,dataStartIndex:w,dataEndIndex:S}))))},{}),U=X0e(K(K({},R),{},{props:b,graphicalItems:T}),x==null?void 0:x.legendBBox);Object.keys(R).forEach(function(z){R[z]=f(b,R[z],U,z.replace("Map",""),r)});var A=R["".concat(I,"Map")],D=G0e(A),F=h(b,K(K({},R),{},{dataStartIndex:w,dataEndIndex:S,updateId:j,graphicalItems:T,stackGroups:$,offset:U}));return K(K({formattedGraphicalItems:F,graphicalItems:T,offset:U,stackGroups:$},D),R)},g=function(m){function y(x){var b,w,S;return C0e(this,y),S=M0e(this,y,[x]),Ne(S,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),Ne(S,"accessibilityManager",new g0e),Ne(S,"handleLegendBBoxUpdate",function(j){if(j){var P=S.state,N=P.dataStartIndex,_=P.dataEndIndex,O=P.updateId;S.setState(K({legendBBox:j},p({props:S.props,dataStartIndex:N,dataEndIndex:_,updateId:O},K(K({},S.state),{},{legendBBox:j}))))}}),Ne(S,"handleReceiveSyncEvent",function(j,P,N){if(S.props.syncId===j){if(N===S.eventEmitterSymbol&&typeof S.props.syncMethod!="function")return;S.applySyncEvent(P)}}),Ne(S,"handleBrushChange",function(j){var P=j.startIndex,N=j.endIndex;if(P!==S.state.dataStartIndex||N!==S.state.dataEndIndex){var _=S.state.updateId;S.setState(function(){return K({dataStartIndex:P,dataEndIndex:N},p({props:S.props,dataStartIndex:P,dataEndIndex:N,updateId:_},S.state))}),S.triggerSyncEvent({dataStartIndex:P,dataEndIndex:N})}}),Ne(S,"handleMouseEnter",function(j){var P=S.getMouseInfo(j);if(P){var N=K(K({},P),{},{isTooltipActive:!0});S.setState(N),S.triggerSyncEvent(N);var _=S.props.onMouseEnter;Ce(_)&&_(N,j)}}),Ne(S,"triggeredAfterMouseMove",function(j){var P=S.getMouseInfo(j),N=P?K(K({},P),{},{isTooltipActive:!0}):{isTooltipActive:!1};S.setState(N),S.triggerSyncEvent(N);var _=S.props.onMouseMove;Ce(_)&&_(N,j)}),Ne(S,"handleItemMouseEnter",function(j){S.setState(function(){return{isTooltipActive:!0,activeItem:j,activePayload:j.tooltipPayload,activeCoordinate:j.tooltipPosition||{x:j.cx,y:j.cy}}})}),Ne(S,"handleItemMouseLeave",function(){S.setState(function(){return{isTooltipActive:!1}})}),Ne(S,"handleMouseMove",function(j){j.persist(),S.throttleTriggeredAfterMouseMove(j)}),Ne(S,"handleMouseLeave",function(j){S.throttleTriggeredAfterMouseMove.cancel();var P={isTooltipActive:!1};S.setState(P),S.triggerSyncEvent(P);var N=S.props.onMouseLeave;Ce(N)&&N(P,j)}),Ne(S,"handleOuterEvent",function(j){var P=nQ(j),N=Pn(S.props,"".concat(P));if(P&&Ce(N)){var _,O;/.*touch.*/i.test(P)?O=S.getMouseInfo(j.changedTouches[0]):O=S.getMouseInfo(j),N((_=O)!==null&&_!==void 0?_:{},j)}}),Ne(S,"handleClick",function(j){var P=S.getMouseInfo(j);if(P){var N=K(K({},P),{},{isTooltipActive:!0});S.setState(N),S.triggerSyncEvent(N);var _=S.props.onClick;Ce(_)&&_(N,j)}}),Ne(S,"handleMouseDown",function(j){var P=S.props.onMouseDown;if(Ce(P)){var N=S.getMouseInfo(j);P(N,j)}}),Ne(S,"handleMouseUp",function(j){var P=S.props.onMouseUp;if(Ce(P)){var N=S.getMouseInfo(j);P(N,j)}}),Ne(S,"handleTouchMove",function(j){j.changedTouches!=null&&j.changedTouches.length>0&&S.throttleTriggeredAfterMouseMove(j.changedTouches[0])}),Ne(S,"handleTouchStart",function(j){j.changedTouches!=null&&j.changedTouches.length>0&&S.handleMouseDown(j.changedTouches[0])}),Ne(S,"handleTouchEnd",function(j){j.changedTouches!=null&&j.changedTouches.length>0&&S.handleMouseUp(j.changedTouches[0])}),Ne(S,"triggerSyncEvent",function(j){S.props.syncId!==void 0&&$x.emit(Rx,S.props.syncId,j,S.eventEmitterSymbol)}),Ne(S,"applySyncEvent",function(j){var P=S.props,N=P.layout,_=P.syncMethod,O=S.state.updateId,k=j.dataStartIndex,C=j.dataEndIndex;if(j.dataStartIndex!==void 0||j.dataEndIndex!==void 0)S.setState(K({dataStartIndex:k,dataEndIndex:C},p({props:S.props,dataStartIndex:k,dataEndIndex:C,updateId:O},S.state)));else if(j.activeTooltipIndex!==void 0){var E=j.chartX,I=j.chartY,T=j.activeTooltipIndex,$=S.state,R=$.offset,U=$.tooltipTicks;if(!R)return;if(typeof _=="function")T=_(U,j);else if(_==="value"){T=-1;for(var A=0;A<U.length;A++)if(U[A].value===j.activeLabel){T=A;break}}var D=K(K({},R),{},{x:R.left,y:R.top}),F=Math.min(E,D.x+D.width),z=Math.min(I,D.y+D.height),H=U[T]&&U[T].value,ue=Xw(S.state,S.props.data,T),be=U[T]?{x:N==="horizontal"?U[T].coordinate:F,y:N==="horizontal"?z:U[T].coordinate}:F3;S.setState(K(K({},j),{},{activeLabel:H,activeCoordinate:be,activePayload:ue,activeTooltipIndex:T}))}else S.setState(j)}),Ne(S,"renderCursor",function(j){var P,N=S.state,_=N.isTooltipActive,O=N.activeCoordinate,k=N.activePayload,C=N.offset,E=N.activeTooltipIndex,I=N.tooltipAxisBandSize,T=S.getTooltipEventType(),$=(P=j.props.active)!==null&&P!==void 0?P:_,R=S.props.layout,U=j.key||"_recharts-cursor";return M.createElement(j0e,{key:U,activeCoordinate:O,activePayload:k,activeTooltipIndex:E,chartName:r,element:j,isActive:$,layout:R,offset:C,tooltipAxisBandSize:I,tooltipEventType:T})}),Ne(S,"renderPolarAxis",function(j,P,N){var _=Pn(j,"type.axisType"),O=Pn(S.state,"".concat(_,"Map")),k=j.type.defaultProps,C=k!==void 0?K(K({},k),j.props):j.props,E=O&&O[C["".concat(_,"Id")]];return v.cloneElement(j,K(K({},E),{},{className:Te(_,E.className),key:j.key||"".concat(P,"-").concat(N),ticks:Zi(E,!0)}))}),Ne(S,"renderPolarGrid",function(j){var P=j.props,N=P.radialLines,_=P.polarAngles,O=P.polarRadius,k=S.state,C=k.radiusAxisMap,E=k.angleAxisMap,I=La(C),T=La(E),$=T.cx,R=T.cy,U=T.innerRadius,A=T.outerRadius;return v.cloneElement(j,{polarAngles:Array.isArray(_)?_:Zi(T,!0).map(function(D){return D.coordinate}),polarRadius:Array.isArray(O)?O:Zi(I,!0).map(function(D){return D.coordinate}),cx:$,cy:R,innerRadius:U,outerRadius:A,key:j.key||"polar-grid",radialLines:N})}),Ne(S,"renderLegend",function(){var j=S.state.formattedGraphicalItems,P=S.props,N=P.children,_=P.width,O=P.height,k=S.props.margin||{},C=_-(k.left||0)-(k.right||0),E=p4({children:N,formattedGraphicalItems:j,legendWidth:C,legendContent:u});if(!E)return null;var I=E.item,T=BC(E,P0e);return v.cloneElement(I,K(K({},T),{},{chartWidth:_,chartHeight:O,margin:k,onBBoxUpdate:S.handleLegendBBoxUpdate}))}),Ne(S,"renderTooltip",function(){var j,P=S.props,N=P.children,_=P.accessibilityLayer,O=Zr(N,ci);if(!O)return null;var k=S.state,C=k.isTooltipActive,E=k.activeCoordinate,I=k.activePayload,T=k.activeLabel,$=k.offset,R=(j=O.props.active)!==null&&j!==void 0?j:C;return v.cloneElement(O,{viewBox:K(K({},$),{},{x:$.left,y:$.top}),active:R,label:T,payload:R?I:[],coordinate:E,accessibilityLayer:_})}),Ne(S,"renderBrush",function(j){var P=S.props,N=P.margin,_=P.data,O=S.state,k=O.offset,C=O.dataStartIndex,E=O.dataEndIndex,I=O.updateId;return v.cloneElement(j,{key:j.key||"_recharts-brush",onChange:zh(S.handleBrushChange,j.props.onChange),data:_,x:oe(j.props.x)?j.props.x:k.left,y:oe(j.props.y)?j.props.y:k.top+k.height+k.brushBottom-(N.bottom||0),width:oe(j.props.width)?j.props.width:k.width,startIndex:C,endIndex:E,updateId:"brush-".concat(I)})}),Ne(S,"renderReferenceElement",function(j,P,N){if(!j)return null;var _=S,O=_.clipPathId,k=S.state,C=k.xAxisMap,E=k.yAxisMap,I=k.offset,T=j.type.defaultProps||{},$=j.props,R=$.xAxisId,U=R===void 0?T.xAxisId:R,A=$.yAxisId,D=A===void 0?T.yAxisId:A;return v.cloneElement(j,{key:j.key||"".concat(P,"-").concat(N),xAxis:C[U],yAxis:E[D],viewBox:{x:I.left,y:I.top,width:I.width,height:I.height},clipPathId:O})}),Ne(S,"renderActivePoints",function(j){var P=j.item,N=j.activePoint,_=j.basePoint,O=j.childIndex,k=j.isRange,C=[],E=P.props.key,I=P.item.type.defaultProps!==void 0?K(K({},P.item.type.defaultProps),P.item.props):P.item.props,T=I.activeDot,$=I.dataKey,R=K(K({index:O,dataKey:$,cx:N.x,cy:N.y,r:4,fill:rP(P.item),strokeWidth:2,stroke:"#fff",payload:N.payload,value:N.value},je(T,!1)),cm(T));return C.push(y.renderActiveDot(T,R,"".concat(E,"-activePoint-").concat(O))),_?C.push(y.renderActiveDot(T,K(K({},R),{},{cx:_.x,cy:_.y}),"".concat(E,"-basePoint-").concat(O))):k&&C.push(null),C}),Ne(S,"renderGraphicChild",function(j,P,N){var _=S.filterFormatItem(j,P,N);if(!_)return null;var O=S.getTooltipEventType(),k=S.state,C=k.isTooltipActive,E=k.tooltipAxis,I=k.activeTooltipIndex,T=k.activeLabel,$=S.props.children,R=Zr($,ci),U=_.props,A=U.points,D=U.isRange,F=U.baseLine,z=_.item.type.defaultProps!==void 0?K(K({},_.item.type.defaultProps),_.item.props):_.item.props,H=z.activeDot,ue=z.hide,be=z.activeBar,Le=z.activeShape,Be=!!(!ue&&C&&R&&(H||be||Le)),se={};O!=="axis"&&R&&R.props.trigger==="click"?se={onClick:zh(S.handleItemMouseEnter,j.props.onClick)}:O!=="axis"&&(se={onMouseLeave:zh(S.handleItemMouseLeave,j.props.onMouseLeave),onMouseEnter:zh(S.handleItemMouseEnter,j.props.onMouseEnter)});var Me=v.cloneElement(j,K(K({},_.props),se));function X(ae){return typeof E.dataKey=="function"?E.dataKey(ae.payload):null}if(Be)if(I>=0){var le,fe;if(E.dataKey&&!E.allowDuplicatedCategory){var q=typeof E.dataKey=="function"?X:"payload.".concat(E.dataKey.toString());le=lm(A,q,T),fe=D&&F&&lm(F,q,T)}else le=A==null?void 0:A[I],fe=D&&F&&F[I];if(Le||be){var Ue=j.props.activeIndex!==void 0?j.props.activeIndex:I;return[v.cloneElement(j,K(K(K({},_.props),se),{},{activeIndex:Ue})),null,null]}if(!Fe(le))return[Me].concat(Nc(S.renderActivePoints({item:_,activePoint:le,basePoint:fe,childIndex:I,isRange:D})))}else{var Oe,lt=(Oe=S.getItemByXY(S.state.activeCoordinate))!==null&&Oe!==void 0?Oe:{graphicalItem:Me},it=lt.graphicalItem,Mt=it.item,L=Mt===void 0?j:Mt,W=it.childIndex,V=K(K(K({},_.props),se),{},{activeIndex:W});return[v.cloneElement(L,V),null,null]}return D?[Me,null,null]:[Me,null]}),Ne(S,"renderCustomized",function(j,P,N){return v.cloneElement(j,K(K({key:"recharts-customized-".concat(N)},S.props),S.state))}),Ne(S,"renderMap",{CartesianGrid:{handler:Kh,once:!0},ReferenceArea:{handler:S.renderReferenceElement},ReferenceLine:{handler:Kh},ReferenceDot:{handler:S.renderReferenceElement},XAxis:{handler:Kh},YAxis:{handler:Kh},Brush:{handler:S.renderBrush,once:!0},Bar:{handler:S.renderGraphicChild},Line:{handler:S.renderGraphicChild},Area:{handler:S.renderGraphicChild},Radar:{handler:S.renderGraphicChild},RadialBar:{handler:S.renderGraphicChild},Scatter:{handler:S.renderGraphicChild},Pie:{handler:S.renderGraphicChild},Funnel:{handler:S.renderGraphicChild},Tooltip:{handler:S.renderCursor,once:!0},PolarGrid:{handler:S.renderPolarGrid,once:!0},PolarAngleAxis:{handler:S.renderPolarAxis},PolarRadiusAxis:{handler:S.renderPolarAxis},Customized:{handler:S.renderCustomized}}),S.clipPathId="".concat((b=x.id)!==null&&b!==void 0?b:qf("recharts"),"-clip"),S.throttleTriggeredAfterMouseMove=dL(S.triggeredAfterMouseMove,(w=x.throttleDelay)!==null&&w!==void 0?w:1e3/60),S.state={},S}return R0e(y,m),T0e(y,[{key:"componentDidMount",value:function(){var b,w;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(b=this.props.margin.left)!==null&&b!==void 0?b:0,top:(w=this.props.margin.top)!==null&&w!==void 0?w:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var b=this.props,w=b.children,S=b.data,j=b.height,P=b.layout,N=Zr(w,ci);if(N){var _=N.props.defaultIndex;if(!(typeof _!="number"||_<0||_>this.state.tooltipTicks.length-1)){var O=this.state.tooltipTicks[_]&&this.state.tooltipTicks[_].value,k=Xw(this.state,S,_,O),C=this.state.tooltipTicks[_].coordinate,E=(this.state.offset.top+j)/2,I=P==="horizontal",T=I?{x:C,y:E}:{y:C,x:E},$=this.state.formattedGraphicalItems.find(function(U){var A=U.item;return A.type.name==="Scatter"});$&&(T=K(K({},T),$.props.points[_].tooltipPosition),k=$.props.points[_].tooltipPayload);var R={activeTooltipIndex:_,isTooltipActive:!0,activeLabel:O,activePayload:k,activeCoordinate:T};this.setState(R),this.renderCursor(N),this.accessibilityManager.setIndex(_)}}}},{key:"getSnapshotBeforeUpdate",value:function(b,w){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==w.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==b.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==b.margin){var S,j;this.accessibilityManager.setDetails({offset:{left:(S=this.props.margin.left)!==null&&S!==void 0?S:0,top:(j=this.props.margin.top)!==null&&j!==void 0?j:0}})}return null}},{key:"componentDidUpdate",value:function(b){P0([Zr(b.children,ci)],[Zr(this.props.children,ci)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var b=Zr(this.props.children,ci);if(b&&typeof b.props.shared=="boolean"){var w=b.props.shared?"axis":"item";return s.indexOf(w)>=0?w:a}return a}},{key:"getMouseInfo",value:function(b){if(!this.container)return null;var w=this.container,S=w.getBoundingClientRect(),j=Cse(S),P={chartX:Math.round(b.pageX-j.left),chartY:Math.round(b.pageY-j.top)},N=S.width/w.offsetWidth||1,_=this.inRange(P.chartX,P.chartY,N);if(!_)return null;var O=this.state,k=O.xAxisMap,C=O.yAxisMap,E=this.getTooltipEventType();if(E!=="axis"&&k&&C){var I=La(k).scale,T=La(C).scale,$=I&&I.invert?I.invert(P.chartX):null,R=T&&T.invert?T.invert(P.chartY):null;return K(K({},P),{},{xValue:$,yValue:R})}var U=zC(this.state,this.props.data,this.props.layout,_);return U?K(K({},P),U):null}},{key:"inRange",value:function(b,w){var S=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,j=this.props.layout,P=b/S,N=w/S;if(j==="horizontal"||j==="vertical"){var _=this.state.offset,O=P>=_.left&&P<=_.left+_.width&&N>=_.top&&N<=_.top+_.height;return O?{x:P,y:N}:null}var k=this.state,C=k.angleAxisMap,E=k.radiusAxisMap;if(C&&E){var I=La(C);return fk({x:P,y:N},I)}return null}},{key:"parseEventsOfWrapper",value:function(){var b=this.props.children,w=this.getTooltipEventType(),S=Zr(b,ci),j={};S&&w==="axis"&&(S.props.trigger==="click"?j={onClick:this.handleClick}:j={onMouseEnter:this.handleMouseEnter,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd});var P=cm(this.props,this.handleOuterEvent);return K(K({},P),j)}},{key:"addListener",value:function(){$x.on(Rx,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){$x.removeListener(Rx,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(b,w,S){for(var j=this.state.formattedGraphicalItems,P=0,N=j.length;P<N;P++){var _=j[P];if(_.item===b||_.props.key===b.key||w===na(_.item.type)&&S===_.childIndex)return _}return null}},{key:"renderClipPath",value:function(){var b=this.clipPathId,w=this.state.offset,S=w.left,j=w.top,P=w.height,N=w.width;return M.createElement("defs",null,M.createElement("clipPath",{id:b},M.createElement("rect",{x:S,y:j,height:P,width:N})))}},{key:"getXScales",value:function(){var b=this.state.xAxisMap;return b?Object.entries(b).reduce(function(w,S){var j=FC(S,2),P=j[0],N=j[1];return K(K({},w),{},Ne({},P,N.scale))},{}):null}},{key:"getYScales",value:function(){var b=this.state.yAxisMap;return b?Object.entries(b).reduce(function(w,S){var j=FC(S,2),P=j[0],N=j[1];return K(K({},w),{},Ne({},P,N.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(b){var w;return(w=this.state.xAxisMap)===null||w===void 0||(w=w[b])===null||w===void 0?void 0:w.scale}},{key:"getYScaleByAxisId",value:function(b){var w;return(w=this.state.yAxisMap)===null||w===void 0||(w=w[b])===null||w===void 0?void 0:w.scale}},{key:"getItemByXY",value:function(b){var w=this.state,S=w.formattedGraphicalItems,j=w.activeItem;if(S&&S.length)for(var P=0,N=S.length;P<N;P++){var _=S[P],O=_.props,k=_.item,C=k.type.defaultProps!==void 0?K(K({},k.type.defaultProps),k.props):k.props,E=na(k.type);if(E==="Bar"){var I=(O.data||[]).find(function(U){return rme(b,U)});if(I)return{graphicalItem:_,payload:I}}else if(E==="RadialBar"){var T=(O.data||[]).find(function(U){return fk(b,U)});if(T)return{graphicalItem:_,payload:T}}else if(Xv(_,j)||Qv(_,j)||hf(_,j)){var $=tve({graphicalItem:_,activeTooltipItem:j,itemData:C.data}),R=C.activeIndex===void 0?$:C.activeIndex;return{graphicalItem:K(K({},_),{},{childIndex:R}),payload:hf(_,j)?C.data[$]:_.props.data[$]}}}return null}},{key:"render",value:function(){var b=this;if(!rO(this))return null;var w=this.props,S=w.children,j=w.className,P=w.width,N=w.height,_=w.style,O=w.compact,k=w.title,C=w.desc,E=BC(w,N0e),I=je(E,!1);if(O)return M.createElement(wC,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},M.createElement(_0,id({},I,{width:P,height:N,title:k,desc:C}),this.renderClipPath(),iO(S,this.renderMap)));if(this.props.accessibilityLayer){var T,$;I.tabIndex=(T=this.props.tabIndex)!==null&&T!==void 0?T:0,I.role=($=this.props.role)!==null&&$!==void 0?$:"application",I.onKeyDown=function(U){b.accessibilityManager.keyboardEvent(U)},I.onFocus=function(){b.accessibilityManager.focus()}}var R=this.parseEventsOfWrapper();return M.createElement(wC,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},M.createElement("div",id({className:Te("recharts-wrapper",j),style:K({position:"relative",curs
548or:"default",width:P,height:N},_)},R,{ref:function(A){b.container=A}}),M.createElement(_0,id({},I,{width:P,height:N,title:k,desc:C,style:z0e}),this.renderClipPath(),iO(S,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])}(v.Component);return Ne(g,"displayName",r),Ne(g,"defaultProps",K({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},d)),Ne(g,"getDerivedStateFromProps",function(m,y){var x=m.dataKey,b=m.data,w=m.children,S=m.width,j=m.height,P=m.layout,N=m.stackOffset,_=m.margin,O=y.dataStartIndex,k=y.dataEndIndex;if(y.updateId===void 0){var C=WC(m);return K(K(K({},C),{},{updateId:0},p(K(K({props:m},C),{},{updateId:0}),y)),{},{prevDataKey:x,prevData:b,prevWidth:S,prevHeight:j,prevLayout:P,prevStackOffset:N,prevMargin:_,prevChildren:w})}if(x!==y.prevDataKey||b!==y.prevData||S!==y.prevWidth||j!==y.prevHeight||P!==y.prevLayout||N!==y.prevStackOffset||!_l(_,y.prevMargin)){var E=WC(m),I={chartX:y.chartX,chartY:y.chartY,isTooltipActive:y.isTooltipActive},T=K(K({},zC(y,b,P)),{},{updateId:y.updateId+1}),$=K(K(K({},E),I),T);return K(K(K({},$),p(K({props:m},$),y)),{},{prevDataKey:x,prevData:b,prevWidth:S,prevHeight:j,prevLayout:P,prevStackOffset:N,prevMargin:_,prevChildren:w})}if(!P0(w,y.prevChildren)){var R,U,A,D,F=Zr(w,mc),z=F&&(R=(U=F.props)===null||U===void 0?void 0:U.startIndex)!==null&&R!==void 0?R:O,H=F&&(A=(D=F.props)===null||D===void 0?void 0:D.endIndex)!==null&&A!==void 0?A:k,ue=z!==O||H!==k,be=!Fe(b),Le=be&&!ue?y.updateId:y.updateId+1;return K(K({updateId:Le},p(K(K({props:m},y),{},{updateId:Le,dataStartIndex:z,dataEndIndex:H}),y)),{},{prevChildren:w,dataStartIndex:z,dataEndIndex:H})}return null}),Ne(g,"renderActiveDot",function(m,y,x){var b;return v.isValidElement(m)?b=v.cloneElement(m,y):Ce(m)?b=m(y):b=M.createElement(eh,y),M.createElement(Qe,{className:"recharts-active-dot",key:x},b)}),function(y){return M.createElement(g,y)}},Z0e=U3({chartName:"LineChart",GraphicalChild:Ja,axisComponents:[{axisType:"xAxis",AxisComp:ny},{axisType:"yAxis",AxisComp:iy}],formatAxisMap:Bye}),J0e=U3({chartName:"RadarChart",GraphicalChild:nh,axisComponents:[{axisType:"angleAxis",AxisComp:rh},{axisType:"radiusAxis",AxisComp:th}],formatAxisMap:Ofe,defaultProps:{layout:"centric",startAngle:90,endAngle:-270,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"}});const hP=({data:e,title:t="Speaking Performance",description:r="Your progress over time"})=>l.jsxs(ne,{className:"glass-panel overflow-hidden",children:[l.jsxs(ce,{className:"pb-0",children:[l.jsx(he,{className:"text-xl font-display",children:t}),l.jsx(ke,{children:r})]}),l.jsx(ie,{className:"pt-4",children:l.jsx("div",{className:"h-80 w-full",children:l.jsx(fL,{width:"100%",height:"100%",children:l.jsxs(Z0e,{data:e,margin:{top:20,right:30,left:0,bottom:10},children:[l.jsx(P3,{strokeDasharray:"3 3",stroke:"#f0f0f0"}),l.jsx(ny,{dataKey:"date",stroke:"#888888",fontSize:12,tickMargin:10}),l.jsx(iy,{stroke:"#888888",fontSize:12,tickMargin:10}),l.jsx(ci,{contentStyle:{backgroundColor:"rgba(255, 255, 255, 0.8)",borderRadius:"0.5rem",backdropFilter:"blur(8px)",border:"1px solid rgba(255, 255, 255, 0.2)",boxShadow:"0 4px 30px rgba(0, 0, 0, 0.1)"}}),l.jsx(fs,{verticalAlign:"bottom",height:36}),l.jsx(Ja,{type:"monotone",dataKey:"pronunciation",stroke:"#3b82f6",strokeWidth:2,dot:{r:4},activeDot:{r:6,strokeWidth:2}}),l.jsx(Ja,{type:"monotone",dataKey:"fluency",stroke:"#10b981",strokeWidth:2,dot:{r:4},activeDot:{r:6,strokeWidth:2}}),l.jsx(Ja,{type:"monotone",dataKey:"vocabulary",stroke:"#8b5cf6",strokeWidth:2,dot:{r:4},activeDot:{r:6,strokeWidth:2}}),l.jsx(Ja,{type:"monotone",dataKey:"grammar",stroke:"#f59e0b",strokeWidth:2,dot:{r:4},activeDot:{r:6,strokeWidth:2}})]})})})})]}),z3=({data:e,title:t="English Proficiency",description:r="Your current skill levels"})=>l.jsxs(ne,{className:"glass-panel overflow-hidden",children:[l.jsxs(ce,{className:"pb-0",children:[l.jsx(he,{className:"text-xl font-display",children:t}),l.jsx(ke,{children:r})]}),l.jsx(ie,{className:"pt-4",children:l.jsx("div",{className:"h-80 w-full",children:l.jsx(fL,{width:"100%",height:"100%",children:l.jsxs(J0e,{outerRadius:90,data:e,children:[l.jsx(z4,{stroke:"#f0f0f0"}),l.jsx(rh,{dataKey:"skill",fontSize:12}),l.jsx(th,{angle:90,domain:[0,100]}),l.jsx(nh,{name:"Current Level",dataKey:"value",stroke:"#3b82f6",fill:"#3b82f6",fillOpacity:.6})]})})})})]}),W3=({data:e,title:t="Activity Calendar",description:r="Your daily learning streak"})=>{const n=f=>f===0?"bg-muted":f<30?"bg-primary/30":f<60?"bg-primary/60":"bg-primary",i=Array.from({length:7}),a=Array.from({length:12}),o=e.reduce((f,d)=>(f[d.date]=d.count,f),{}),s=new Date().toISOString().split("T")[0],u=(()=>{const f=[],d=new Date;for(let h=0;h<84;h++){const p=new Date;
548p.setDate(d.getDate()-h),f.push(p.toISOString().split("T")[0])}return f.reverse()})();return l.jsxs(ne,{className:"glass-panel",children:[l.jsxs(ce,{className:"pb-0",children:[l.jsx(he,{className:"text-xl font-display",children:t}),l.jsx(ke,{children:r})]}),l.jsxs(ie,{className:"pt-4",children:[l.jsx("div",{className:"grid grid-cols-12 gap-2",children:a.map((f,d)=>l.jsx("div",{className:"grid grid-rows-7 gap-2",children:i.map((h,p)=>{const g=d*7+p,m=u[g],y=o[m]||0;return l.jsx("div",{className:G("w-4 h-4 rounded-sm transition-all duration-200",n(y),m===s&&"ring-2 ring-primary"),title:`${m}: ${y} minutes`},`day-${p}`)})},`week-${d}`))}),l.jsxs("div",{className:"flex items-center justify-end mt-4 space-x-2 text-xs",children:[l.jsxs("div",{className:"flex items-center space-x-1",children:[l.jsx("div",{className:"w-3 h-3 rounded-sm bg-muted"}),l.jsx("span",{children:"0 min"})]}),l.jsxs("div",{className:"flex items-center space-x-1",children:[l.jsx("div",{className:"w-3 h-3 rounded-sm bg-primary/30"}),l.jsx("span",{children:"<30 min"})]}),l.jsxs("div",{className:"flex items-center space-x-1",children:[l.jsx("div",{className:"w-3 h-3 rounded-sm bg-primary/60"}),l.jsx("span",{children:"<60 min"})]}),l.jsxs("div",{className:"flex items-center space-x-1",children:[l.jsx("div",{className:"w-3 h-3 rounded-sm bg-primary"}),l.jsx("span",{children:"60+ min"})]})]})]})]})},ewe=()=>{const e=Ic(),t=Uc(),[r,n]=v.useState([]),[i,a]=v.useState([]),[o,s]=v.useState([]),c={name:"Sarah Johnson",email:"[email protected]",avatar:"https://i.pravatar.cc/300?img=47"};v.useEffect(()=>{const f=Array.from({length:14}).map((p,g)=>{const m=new Date;return m.setDate(m.getDate()-(13-g)),{date:m.toLocaleDateString("en-US",{month:"short",day:"numeric"}),pronunciation:60+Math.floor(Math.random()*30),fluency:60+Math.floor(Math.random()*30),vocabulary:60+Math.floor(Math.random()*30),grammar:60+Math.floor(Math.random()*30)}}),d=[{skill:"Speaking",value:75,fullMark:100},{skill:"Listening",value:82,fullMark:100},{skill:"Reading",value:88,fullMark:100},{skill:"Writing",value:70,fullMark:100},{skill:"Vocabulary",value:65,fullMark:100},{skill:"Grammar",value:78,fullMark:100}],h=Array.from({length:84}).map((p,g)=>{const m=new Date;m.setDate(m.getDate()-(83-g));const y=m.toISOString().split("T")[0],x=m.getDay();let b=0;return x===0||x===6?b=Math.random()>.6?Math.floor(Math.random()*40):0:b=Math.random()>.3?20+Math.floor(Math.random()*60):0,{date:y,count:b}});n(f),a(d),s(h)},[]);const u=[{id:"speaking",title:"Speaking Practice",description:"Improve your pronunciation and fluency",icon:ni,path:"/practice/speaking",color:"bg-blue-500"},{id:"listening",title:"Listening Practice",description:"Enhance your comprehension skills",icon:WM,path:"/practice/listening",color:"bg-purple-500"},{id:"vocabulary",title:"Vocabulary Building",description:"Expand your English vocabulary",icon:Rs,path:"/lessons",color:"bg-green-500"},{id:"conversation",title:"AI Conversation",description:"Chat with our AI language partner",icon:go,path:"/practice/conversation",color:"bg-amber-500"}];return l.jsxs("div",{className:"min-h-screen bg-background",children:[l.jsx(un,{user:c}),l.jsx(dn,{}),l.jsx("main",{className:`pt-24 pb-16 ${t?"px-4":"pl-72 pr-6"}`,children:l.jsx(ri,{className:"h-[calc(100vh-6rem)]",children:l.jsxs("div",{className:"max-w-7xl mx-auto animate-fade-in pb-8",children:[l.jsxs("section",{className:"mb-8",children:[l.jsxs("h1",{className:"text-2xl md:text-3xl font-display font-semibold mb-2",children:["Welcome back, ",c.name.split(" ")[0]]}),l.jsx("p",{className:"text-muted-foreground mb-6",children:"Continue your English learning journey today."}),l.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4",children:u.map(f=>l.jsxs(ne,{className:"glass-panel overflow-hidden",children:[l.jsx("div",{className:`h-2 w-full ${f.color}`}),l.jsx(ce,{className:"pb-2",children:l.jsxs("div",{className:"flex items-start justify-between",children:[l.jsx(he,{className:"text-lg font-display",children:f.title}),l.jsx(f.icon,{className:"h-5 w-5 text-muted-foreground"})]})}),l.jsxs(ie,{className:"pb-4",children:[l.jsx("p",{className:"text-sm text-muted-foreground mb-4",children:f.description}),l.jsx(Y,{onClick:()=>e(f.path),className:"w-full button-shine",children:"Start Practice"})]})]},f.id))})]}),l.jsxs("section",{className:"mb-8",children:[l.jsx("h2",{className:"text-xl md:text-2xl font-display font-semibold mb-6",children:"Your Progress"}),l.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[l.jsx(hP,{data:r}),l.jsx(z3,{data:i})]})]}),l.jsxs("section",{children:[l.jsx("h2",{className:"text-xl md:text-2xl font-display font-semibold mb-6",children:"Learning Streak"}),l.jsx(W3,{data:o})]})]})})})]})},twe={practice_complete:10,streak:15,grammar_mastery:20,pronunciation_mastery:20,vocabulary_mastery:20,reading_mastery:20,writing_mastery:20,level_up:50,login_bonus:5},rwe={practice_complete:"Completed a practice session",streak:"Maintained a practice streak",grammar_mastery:"Achieved high grammar score",pronunciation_mastery:"Achieved high pronunciation score",vocabulary_mastery:"Achieved high vocabulary score",reading_mastery:"Achieved high reading score",writing_mastery:"Achieved high writing score",level_up:"Leveled up your English proficiency",login_bonus:"Daily login bonus"},V3=async e=>{var a;const t=twe[e.type]||5,r=rwe[e.type]||"Reward earned",n=await gr.createReward({userId:e.userId,type:e.type,description:r,points:t}),i=await gr.getUserById(e.userId);if(i){i.points+=t;const o=Math.floor(i.points/100)+1;o>i.level&&(i.level=o,e.type!=="level_up"&&(await V3({type:"level_up",userId:i.id}
548),Yp({title:"Level Up!",description:`Congratulations! You've reached level ${o}!`,variant:"default"}))),await gr.updateUser(i),(e.type!=="level_up"||((a=e.metadata)==null?void 0:a.showToast)!==!1)&&Yp({title:"Reward Earned!",description:`+${t} points: ${r}`,variant:"default"})}return nwe(e.userId),n},nwe=async e=>{const t=await gr.getUserById(e),r=await gr.getAchievements(),n=await gr.getRewardsByUserId(e),i=await gr.getSessionsByUserId(e);if(!t)return;let a=!1;for(const o of r){if(o.isUnlocked)continue;let s=!1;if(t.points>=o.requiredPoints&&(s=!0),o.title==="First Steps"&&i.length>=1&&(s=!0),o.title==="Grammar Guru"&&n.filter(c=>c.type==="grammar_mastery").length>=5&&(s=!0),o.title==="Vocabulary Master"&&n.filter(c=>c.type==="vocabulary_mastery").length>=5&&(s=!0),o.title==="Pronunciation Pro"&&n.filter(c=>c.type==="pronunciation_mastery").length>=5&&(s=!0),o.title==="Conversation Champion"&&i.filter(c=>c.type==="speaking").length>=10&&(s=!0),o.title==="Dedicated Learner"){const c=new Set,u=new Date;for(let d=0;d<7;d++){const h=new Date(u);h.setDate(h.getDate()-d);const p=h.toISOString().split("T")[0];c.add(p)}const f=new Set(i.map(d=>typeof d.date=="string"?d.date.split("T")[0]:"").filter(Boolean));[...c].every(d=>f.has(d))&&(s=!0)}s&&(o.isUnlocked=!0,o.unlockedAt=new Date().toISOString(),await gr.updateAchievement(o),a=!0,Yp({title:"Achievement Unlocked!",description:`${o.title}: ${o.description}`,variant:"default"}))}return a};function iwe(e,t=[]){let r=[];function n(a,o){const s=v.createContext(o),c=r.length;r=[...r,o];function u(d){const{scope:h,children:p,...g}=d,m=(h==null?void 0:h[e][c])||s,y=v.useMemo(()=>g,Object.values(g));return l.jsx(m.Provider,{value:y,children:p})}function f(d,h){const p=(h==null?void 0:h[e][c])||s,g=v.useContext(p);if(g)return g;if(o!==void 0)return o;throw new Error(`\`${d}\` must be used within \`${a}\``)}return u.displayName=a+"Provider",[u,f]}const i=()=>{const a=r.map(o=>v.createContext(o));return function(s){const c=(s==null?void 0:s[e])||a;return v.useMemo(()=>({[`__scope${e}`]:{...s,[e]:c}}),[s,c])}};return i.scopeName=e,[n,awe(i,...t)]}function awe(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(a){const o=n.reduce((s,{useScope:c,scopeName:u})=>{const d=c(a)[`__scope${u}`];return{...s,...d}},{});return v.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return r.scopeName=t.scopeName,r}var pP="Progress",mP=100,[owe,VPe]=iwe(pP),[swe,lwe]=owe(pP),H3=v.forwardRef((e,t)=>{const{__scopeProgress:r,value:n=null,max:i,getValueLabel:a=cwe,...o}=e;(i||i===0)&&!HC(i)&&console.error(uwe(`${i}`,"Progress"));const s=HC(i)?i:mP;n!==null&&!qC(n,s)&&console.error(dwe(`${n}`,"Progress"));const c=qC(n,s)?n:null,u=cg(c)?a(c,s):void 0;return l.jsx(swe,{scope:r,value:c,max:s,children:l.jsx(xe.div,{"aria-valuemax":s,"aria-valuemin":0,"aria-valuenow":cg(c)?c:void 0,"aria-valuetext":u,role:"progressbar","data-state":G3(c,s),"data-value":c??void 0,"data-max":s,...o,ref:t})})});H3.displayName=pP;var q3="ProgressIndicator",K3=v.forwardRef((e,t)=>{const{__scopeProgress:r,...n}=e,i=lwe(q3,r);return l.jsx(xe.div,{"data-state":G3(i.value,i.max),"data-value":i.value??void 0,"data-max":i.max,...n,ref:t})});K3.displayName=q3;function cwe(e,t){return`${Math.round(e/t*100)}%`}function G3(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function cg(e){return typeof e=="number"}function HC(e){return cg(e)&&!isNaN(e)&&e>0}function qC(e,t){return cg(e)&&!isNaN(e)&&e<=t&&e>=0}function uwe(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${mP}\`.`}function dwe(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be: 549 - a positive number 550 - less than the value passed to \`max\` (or ${mP} if no \`max\` prop is set) 551 - \`null\` or \`undefined\` if the progress is indeterminate. 552 553Defaulting to \`null\`.`}var Y3=H3,fwe=K3;const lr=v.forwardRef(({className:e,value:t,...r},n)=>l.jsx(Y3,{ref:n,className:G("relative h-4 w-full overflow-hidden rounded-full bg-secondary",e),...r,children:l.jsx(fwe,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));lr.displayName=Y3.displayName;const hwe=Df("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 Kt({className:e,variant:t,...r}){return l.jsx("div",{className:G(hwe({variant:t}),e),...r})}const pwe=()=>{const{toast:e}=Ct(),t="1",{data:r}=co({queryKey:["user",t],queryFn:()=>ut.getUserById(t)}),{data:n=[]}=co({queryKey:["sessions",t],queryFn:()=>ut.getSessionsByUserId(t)}),{data:i=[]}=co({queryKey:["rewards",t],queryFn:()=>ut.getRewardsByUserId(t)}),[a,o]=v.useState([]),[s,c]=v.useState([]),[u,f]=v.useState([]),[d,h]=v.useState({totalSessions:0,totalMinutes:0,avgScore:0,strongestSkill:"",weakestSkill:""});v.useEffect(()=>{n.length>0?p(n):g()},[n]);const p=x=>{const b=[];for(let F=0;F<14;F++){const z=new Date;
553z.setDate(z.getDate()-(13-F)),b.push(z.toISOString().split("T")[0])}const w={};b.forEach(F=>{w[F]={date:new Date(F).toLocaleDateString("en-US",{month:"short",day:"numeric"}),pronunciation:0,fluency:0,vocabulary:0,grammar:0,count:0}}),x.forEach(F=>{const z=F.date.split("T")[0];if(w[z]){w[z].count++;const H=F.score||70;switch(F.type){case"speaking":w[z].pronunciation+=H,w[z].fluency+=H;break;case"vocabulary":w[z].vocabulary+=H;break;case"grammar":w[z].grammar+=H;break;case"pronunciation":w[z].pronunciation+=H;break;default:w[z].pronunciation+=H,w[z].fluency+=H,w[z].vocabulary+=H,w[z].grammar+=H}}});const S=Object.values(w).map(F=>F.count>0?{date:F.date,pronunciation:Math.round(F.pronunciation/F.count),fluency:Math.round(F.fluency/F.count),vocabulary:Math.round(F.vocabulary/F.count),grammar:Math.round(F.grammar/F.count),count:F.count}:{date:F.date,pronunciation:0,fluency:0,vocabulary:0,grammar:0,count:0}),j={speaking:{sum:0,count:0},listening:{sum:0,count:0},reading:{sum:0,count:0},writing:{sum:0,count:0},vocabulary:{sum:0,count:0},grammar:{sum:0,count:0}};x.forEach(F=>
553{F.type in j&&(j[F.type].sum+=F.score||70,j[F.type].count++)});const P=Object.entries(j).map(([F,z])=>({skill:F.charAt(0).toUpperCase()+F.slice(1),value:z.count>0?Math.round(z.sum/z.count):50,fullMark:100})),N={},_=new Date,O=new Date(_);O.setDate(_.getDate()-90),x.forEach(F=>{const z=new Date(F.date);if(z>=O&&z<=_){const H=F.date.split("T")[0];N[H]||(N[H]=0),N[H]+=F.duration||10}});const k=Object.entries(N).map(([F,z])=>({date:F,count:z})),C=x.length,E=x.reduce((F,z)=>F+(z.duration||0),0),I={};x.forEach(F=>{I[F.type]||(I[F.type]=[]),I[F.type].push(F.score||0)});let T="",$="",R=0,U=100;Object.entries(I).forEach(([F,z])=>{const H=z.reduce((ue,be)=>ue+be,0)/z.length;H>R&&(R=H,T=F),H<U&&(U=H,$=F)});const A=Object.values(I).flat(),D=A.length>0?A.reduce((F,z)=>F+z,0)/A.length:0;o(S),c(P),f(k),h({totalSessions:C,totalMinutes:E,avgScore:Math.round(D),strongestSkill:T.charAt(0).toUpperCase()+T.slice(1),weakestSkill:$.charAt(0).toUpperCase()+$.slice(1)})},g=()=>{const x=Array.from({length:14}).map((S,j)=>{const P=new Date;return P.setDate(P.getDate()-(13-j)),{date:P.toLocaleDateString("en-US",{month:"short",day:"numeric"}),pronunciation:60+Math.floor(Math.random()*30),fluency:60+Math.floor(Math.random()*30),vocabulary:60+Math.floor(Math.random()*30),grammar:60+Math.floor(Math.random()*30),count:1}}),b=[{skill:"Speaking",value:75,fullMark:100},{skill:"Listening",value:82,fullMark:100},{skill:"Reading",value:88,fullMark:100},{skill:"Writing",value:70,fullMark:100},{skill:"Vocabulary",value:65,fullMark:100},{skill:"Grammar",value:78,fullMark:100}],w=Array.from({length:90}).map((S,j)=>{const P=new Date;P.setDate(P.getDate()-(89-j));const N=P.toISOString().split("T")[0],_=P.getDay();let O=0;return _===0||_===6?O=Math.random()>.6?Math.floor(Math.random()*40):0:O=Math.random()>.3?20+Math.floor(Math.random()*60):0,{date:N,count:O}});o(x),c(b),f(w),h({totalSessions:47,totalMinutes:820,avgScore:78,strongestSkill:"Reading",weakestSkill:"Vocabulary"})},m=()=>{e({title:"Progress Shared",description:"Your progress has been shared to the community feed"})},y=async()=>{if(r)try{await V3({type:"practice_complete",userId:r.id})}catch(x){console.error("Error granting reward:",x)}};return l.jsxs("div",{className:"min-h-screen bg-background",children:[l.jsx(un,{}),l.jsx(dn,{}),l.jsx("main",{className:"pt-24 pb-16 pl-72 pr-6",children:l.jsxs("div",{className:"max-w-7xl mx-auto",children:[l.jsxs("section",{className:"mb-8",children:[l.jsxs("div",{className:"flex items-center justify-between mb-6",children:[l.jsxs("div",{children:[l.jsx("h1",{className:"text-3xl font-display font-semibold",children:"My Progress"}),l.jsx("p",{className:"text-muted-foreground",children:"Track your English learning journey"})]}),l.jsxs("div",{className:"flex gap-3",children:[l.jsx(Y,{variant:"outline",onClick:m,children:"Share Progress"}),l.jsxs(Y,{onClick:y,children:[l.jsx(qi,{className:"mr-2 h-4 w-4"}),"Earn Points"]})]})]}),l.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4 mb-8",children:[l.jsxs(ne,{children:[l.jsx(ce,{className:"pb-2",children:l.jsxs(he,{className:"text-lg font-display flex items-center gap-2",children:[l.jsx(Rs,{className:"h-5 w-5 text-blue-500"}),"Total Sessions"]})}),l.jsxs(ie,{children:[l.jsx("div",{className:"text-3xl font-bold",children:d.totalSessions}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"practice sessions completed"})]})]}),l.jsxs(ne,{children:[l.jsx(ce,{className:"pb-2",children:l.jsxs(he,{className:"text-lg font-display flex items-center gap-2",children:[l.jsx(Xp,{className:"h-5 w-5 text-emerald-500"}),"Practice Time"]})}),l.jsxs(ie,{children:[l.jsx("div",{className:"text-3xl font-bold",children:d.totalMinutes}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"total minutes practiced"})]})]}),l.jsxs(ne,{children:[l.jsx(ce,{className:"pb-2",children:l.jsxs(he,{className:"text-lg font-display flex items-center gap-2",children:[l.jsx(Qp,{className:"h-5 w-5 text-purple-500"}),"Average Score"]})}),l.jsxs(ie,{children:[l.jsxs("div",{className:"text-3xl font-bold",children:[d.avgScore,l.jsx("span",{className:"text-lg",children:"/100"})]}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"across all exercises"})]})]}),l.jsxs(ne,{children:[l.jsx(ce,{className:"pb-2",children:l.jsxs(he,{className:"text-lg font-display flex items-center gap-2",children:[l.jsx(qi,{className:"h-5 w-5 text-amber-500"}),"Rewards Earned"]})}),l.jsxs(ie,{children:[l.jsx("div",{className:"text-3xl font-bold",children:i.length}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"rewards and achievements"})]})]})]})]}),l.jsx("section",{className:"mb-8",children:l.jsxs(ki,{defaultValue:"performance",children:[l.jsxs(Ci,{className:"mb-6",children:[l.jsxs(at,{value:"performance",children:[l.jsx(Qp,{className:"mr-2 h-4 w-4"}),"Performance"]}),l.jsxs(at,{value:"skills",children:[l.jsx(FM,{className:"mr-2 h-4 w-4"}),"Skills"]}),l.jsxs(at,{value:"activity",children:[l.jsx(Xp,{className:"mr-2 h-4 w-4"}),"Activity"]}),l.jsxs(at,{value:"rewards",children:[l.jsx(qi,{className:"mr-2 h-4 w-4"}),"Rewards"]})]}),l.jsxs(ot,{value:"performance",className:"space-y-6",children:[l.jsxs(ne,{children:[l.jsxs(ce,{children:[l.jsx(he,{children:"Performance Trends"}),l.jsx(ke,{children:"Your scores across different skills over the past 14 days"})]}),l.jsx(ie,{className:"h-[400px]",children:l.jsx(hP,{data:a})})]}),l.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[l.jsxs(ne,{children:[l.jsxs(ce,{children:[l.jsx(he,{children:"Strongest Skills"}),l.jsx(ke,{children:"Your best performing areas"})]}),l.jsx(ie,{children:l.jsxs("div",{className:"space-y-4",children:[d.strongestSkill&&l.jsxs("div",{children:[l.jsxs("div",{className:"flex justify-between items-center mb-1",children:[l.jsx("div",{className:"font-medium",children:d.strongestSkill}),l.jsx(Kt,{variant:"outline",className:"bg-green-50 text-green-700 border-green-200",children:"Strongest"})]}),l.jsx(lr,{value:85,className:"h-2"})]}),l.jsxs("div",{children:[l.jsxs("div",{className:"flex justify-between items-center mb-1",children:[l.jsx("div",{className:"font-medium",children:"Grammar"}),l.jsx("div",{className:"text-sm text-muted-foreground",children:"78%"})]}),l.jsx(lr,{value:78,className:"h-2"})]}),l.jsxs("div",{children:[l.jsxs("div",{className:"flex justify-between items-center mb-1",children:[l.jsx("div",{className:"font-medium",children:"Listening"}),l.jsx("div",{className:"text-sm text-muted-foreground",children:"82%"})]}),l.jsx(lr,{value:82,className:"h-2"})]})]})})]}),l.jsxs(ne,{children:[l.jsxs(ce,{children:[l.jsx(he,{children:"Areas to Improve"}),l.jsx(ke,{children:"Skills that need more attention"})]}),l.jsx(ie,{children:l.jsxs("div",{className:"space-y-4",children:[d.weakestSkill&&l.jsxs("div",{children:[l.jsxs("div",{className:"flex justify-between items-center mb-1",children:[l.jsx("div",{className:"font-medium",children:d.weakestSkill}),l.jsx(Kt,{variant:"outline",className:"bg-amber-50 text-amber-700 border-amber-200",children:"Focus Area"})]}),l.jsx(lr,{value:65,className:"h-2"})]}),l.jsxs("div",{children:[l.jsxs("div",{className:"flex justify-between items-center mb-1",children:[l.jsx("div",{className:"font-medium",children:"Pronunciation"}),l.jsx("div",{className:"text-sm text-muted-foreground",children:"70%"})]}),l.jsx(lr,{value:70,className:"h-2"})]}),l.jsxs("div",{children:[l.jsxs("div",{className:"flex justify-between items-center mb-1",children:[l.jsx("div",{className:"font-medium",children:"Speaking Fluency"}),l.jsx("div",{className:"text-sm text-muted-foreground",children:"68%"})]}),l.jsx(lr,{value:68,className:"h-2"})]})]})})]})]})]}),l.jsx(ot,{value:"skills",children:l.jsxs(ne,{children:[l.jsxs(ce,{children:[l.jsx(he,{children:"Skill Radar"}),l.jsx(ke,{children:"Visual representation of your skill levels"})]}),l.jsx(ie,{className:"h-[500px]",children:l.jsx(z3,{data:s})}),l.jsx(jt,{children:l.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-6 gap-3 w-full",children:s.map(x=>l.jsxs("div",{className:"text-center",children:[l.jsxs("div",{className:"text-xl font-bold",children:[x.value,l.jsx("span",{className:"text-sm",children:"/100"})]}),l.jsx("div",{className:"text-sm text-muted-foreground",children:x.skill})]},x.skill))})})]})}),l.jsx(ot,{value:"activity",children:l.jsxs(ne,{children:[l.jsxs(ce,{children:[l.jsx(he,{children:"Learning Activity"}),l.jsx(ke,{children:"Your practice patterns over time"})]}),l.jsx(ie,{children:l.jsx(W3,{data:u})}),l.jsxs(jt,{className:"flex flex-col sm:flex-row justify-between items-center gap-4",children:[l.jsxs("div",{className:"text-sm text-muted-foreground",children:[l.jsx("strong",{children:"Tip:"})," Consistency is key to language learning success"]}),l.jsx(Y,{variant:"outline",size:"sm",children:"Download Activity Report"})]})]})}),l.jsx(ot,{value:"rewards",children:l.jsxs(ne,{children:[l.jsxs(ce,{children:[l.jsx(he,{children:"Recent Re
553wards"}),l.jsx(ke,{children:"Points earned from your learning activities"})]}),l.jsx(ie,{children:i.length>0?l.jsx("div",{className:"space-y-4",children:i.slice(0,10).map(x=>l.jsxs("div",{className:"flex items-center justify-between p-3 rounded-lg border",children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("div",{className:"p-2 rounded-full bg-primary/10 text-primary",children:l.jsx(qi,{className:"h-5 w-5"})}),l.jsxs("div",{children:[l.jsx("div",{className:"font-medium",children:x.description}),l.jsx("div",{className:"text-sm text-muted-foreground",children:new Date(x.date).toLocaleDateString()})]})]}),l.jsxs(Kt,{className:"bg-primary",children:["+",x.points," pts"]})]},x.id))}):l.jsxs("div",{className:"text-center py-8",children:[l.jsx(qi,{className:"h-12 w-12 mx-auto text-muted-foreground opacity-50 mb-4"}),l.jsx("h3",{className:"text-lg font-medium mb-2",children:"No rewards yet"}),l.jsx("p",{className:"text-muted-foreground mb-4",children:"Complete lessons and practice sessions to earn rewards"}),l.jsx(Y,{onClick:y,children:"Earn Your First Reward"})]})})]})})]})}),l.jsxs("section",{children:[l.jsx("h2",{className:"text-2xl font-display font-semibold mb-6",children:"Recommended Next Steps"}),l.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[l.jsxs(ne,{className:"border-l-4 border-l-blue-500",children:[l.jsx(ce,{children:l.jsxs(he,{className:"flex items-center gap-2",children:[l.jsx(ni,{className:"h-5 w-5 text-blue-500"}),"Practice Speaking"]})}),l.jsxs(ie,{children:[l.jsx("p",{className:"mb-4",children:"Work on your pronunciation and fluency with guided exercises"}),l.jsx(Y,{className:"w-full",variant:"outline",children:"Start Speaking Practice"})]})]}),l.jsxs(ne,{className:"border-l-4 border-l-green-500",children:[l.jsx(ce,{children:l.jsxs(he,{className:"flex items-center gap-2",children:[l.jsx(xW,{className:"h-5 w-5 text-green-500"}),"Review Grammar"]})}),l.jsxs(ie,{children:[l.jsx("p",{className:"mb-4",children:"Review grammar rules that you've been struggling with recently"}),l.jsx(Y,{className:"w-full",variant:"outline",children:"Start Grammar Review"})]})]}),l.jsxs(ne,{className:"border-l-4 border-l-purple-500",children:[l.jsx(ce,{children:l.jsxs(he,{className:"flex items-center gap-2",children:[l.jsx(go,{className:"h-5 w-5 text-purple-500"}),"Conversation Practice"]})}),l.jsxs(ie,{children:[l.jsx("p",{className:"mb-4",children:"Practice natural English conversations with our AI language partner"}),l.jsx(Y,{className:"w-full",variant:"outline",children:"Start Conversation"})]})]})]})]})]})})]})},X3=e=>e>=90?"text-green-500":e>=80?"text-blue-500":e>=70?"text-yellow-500":"text-red-500",Gh=({label:e,score:t})=>t<=0?null:l.jsxs("div",{children:[l.jsx("div",{className:"text-sm font-medium mb-1",children:e}),l.jsxs("div",{className:"flex items-center",children:[l.jsx("div",{className:"w-full bg-secondary rounded-full h-2 mr-2",children:l.jsx("div",{className:"bg-primary rounded-full h-2",style:{width:`${t}%`}})}),l.jsx("span",{className:G("text-sm font-semibold",X3(t)),children:t})]})]}),mwe=({score:e})=>l.jsxs("div",{children:[l.jsx("div",{className:"text-sm font-medium mb-1",children:"Overall Score"}),l.jsxs("div",{className:"flex items-center",children:[l.jsx("div",{className:"w-full bg-secondary rounded-full h-3 mr-2",children:l.jsx("div",{className:"bg-primary rounded-full h-3",style:{width:`${e}%`}})}),l.jsx("span",{className:G("text-lg font-semibold",X3(e)),children:e})]})]}),gwe=({original:e,corrected:t,explanation:r,rule:n})=>e===t?l.jsxs("div",{className:"text-sm border-b border-border pb-2 last:border-0 last:pb-0",children:[l.jsx("span",{className:"text-green-500",children:e}),l.jsx("p",{className:"mt-1 text-muted-foreground",children:r})]}):l.jsxs("div",{className:"text-sm border-b border-border pb-2 last:border-0 last:pb-0",children:[l.jsxs("div",{className:"space-y-1",children:[l.jsxs("div",{children:[l.jsx("span",{className:"text-sm font-medium",children:"Original: "}),l.jsx("span",{className:"text-red-500",children:e})]}),l.jsxs("div",{children:[l.jsx("span",{className:"text-sm font-medium",children:"Corrected: "}),l.jsx("span",{className:"text-green-500",children:t})]})]}),l.jsx("p",{className:"mt-1 text-muted-foreground",children:r}),n&&l.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:["Rule: ",n]})]}),Q3=({suggestions:e})=>!e||e.length===0?null:l.jsxs("div",{children:[l.jsx("h4",{className:"font-semibold mb-2",children:"Suggestions for Improvement"}),l.jsx("ul",{className:"list-disc pl-5 space-y-1",children:e.map((t,r)=>l.jsx("li",{className:"text-sm",children:t},r))})]}),vwe=({loading:e,error:t,hasText:r,onGenerate:n,showButton:i=!0})=>l.jsxs(l.Fragment,{children:[t&&l.jsx("div",{className:"mb-4 p-3 bg-destructive/10 border border-destructive/20 text-destructive rounded-md",children:t}),l.jsxs("div",{className:"text-center p-6",children:[l.jsx(o0,{className:"h-12 w-12 mx-auto text-primary/60 mb-4"}),l.jsx("p",{className:"text-muted-foreground",children:r?"Use the Analyze button to get AI feedback on your speech.":"Record your speech first, then use the Analyze button."})]}),i&&l.jsx(Y,{onClick:n,disabled:e||!r,className:"w-full gap-2",children:e?l.jsxs(l.Fragment,{children:[l.jsx(nn,{className:"h-4 w-4 animate-spin"}),"Analyzing..."]}):l.jsxs(l.Fragment,{children:[l.jsx(o0,{className:"h-4 w-4"}),"Generate Feedback"]})})]});function ywe(e){const t=localStorage.getItem(`API_KEY_${e}`);if(t)return t;const r=Un[e];return r||Un.DEFAULT}class xwe{getApiKey(t="DEFAULT"){return ywe(t)}setApiKey(t,r="DEFAULT"){localStorage.setItem(`API_KEY_${r}`,t)}async request(t,r){const n=this.getApiKey(t);let i=r.endpoint;if(r.params){const s=new URLSearchParams(r.params);i+=`?${s.toString()}`}const a={"Content-Type":"application/json",...r.headers||{}};t!=="DEFAULT"&&(a["x-api-key"]=n);const o=await fetch(i,{method:r.method||"GET",headers:a,body:r.body?JSON.stringify(r.body):void 0});if(!o.ok)throw new Error(`API request failed: ${o.status}`);return await o.json()}async geminiRequest(t,r="DEFAULT",n={}){const i=this.getApiKey(r),o=await fetch(`https://generativelanguage.googleapis.com/v1/models/gemini-1.5-pro:generateContent?key=${i}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({contents:[{parts:[{text:t}]}],generationConfig:{temperature:n.temperature||.7,topK:n.topK||40,topP:n.topP||.95,maxOutputTokens:n.maxOutputTokens||1024}})});if(!o.ok)throw new Error(`API request failed: ${o.status}`);const s=await o.json();if(s.candidates&&s.candidates[0].content.parts&&s.candidates[0].content.parts[0].text)return s.candidates[0].content.parts[0].text;throw new Error("Invalid response format")}}const Dt=new xwe;class bwe{constructor(){To(this,"synth");To(this,"utterance",null);To(this,"elevenlabsAudio",null);To(this,"isSpeaking",!1);this.synth=window.speechSynthesis}async speak(t,r){this.stopSpeaking();const n=t.replace(/[^\w\s.,?!;:'"()-]/g," ").trim();if(!n){console.warn("Empty text after cleaning, nothing to speak");return}this.isSpeaking=!0;const i=Dt.getApiKey("elevenlabs");if(i)try{await this.speakWithElevenLabs(n,i);return}catch(a){console.error("ElevenLabs speech failed, falling back to browser TTS:",a)}return this.speakWithBrowserTTS(n,r)}speakWithBrowserTTS(t,r){return new Promise((n,i)=>{try{const o=this.splitTextIntoChunks(t,1e3);let s=0;const c=()=>
553{if(s>=o.length){this.isSpeaking=!1,n();return}const u=o[s];this.utterance=new SpeechSynthesisUtterance(u);let f=this.synth.getVoices();f.length===0?this.synth.addEventListener("voiceschanged",()=>{f=this.synth.getVoices(),this.setVoice(f,r==null?void 0:r.voice)},{once:!0}):this.setVoice(f,r==null?void 0:r.voice),r?(r.rate!==void 0&&(this.utterance.rate=r.rate),r.pitch!==void 0&&(this.utterance.pitch=r.pitch),r.volume!==void 0&&(this.utterance.volume=r.volume)):(this.utterance.rate=p0.DEFAULT_VOICE_RATE,this.utterance.pitch=p0.DEFAULT_VOICE_PITCH),this.utterance.onend=()=>{s++,c()},this.utterance.onerror=d=>{console.error(`Speech synthesis error on chunk ${s}:`,d.error),s++,c()},this.synth.speak(this.utterance)};c()}catch(a){this.isSpeaking=!1,i(a)}})}setVoice(t,r="female"){if(!this.utterance)return;const n=t.find(a=>a.lang.includes("en")&&a.name.toLowerCase().includes(r)),i=t.find(a=>a.lang.includes("en"));n?this.utterance.voice=n:i&&(this.utterance.voice=i)}async speakWithElevenLabs(t,r){return new Promise(async(n,i)=>{try{const o=this.splitTextForElevenLabs(t,3800);for(const s of o){const c=await fetch("https://api.elevenlabs.io/v1/text-to-speech/EXAVITQu4vr4xnSDxMaL/stream",{method:"POST",headers:{Accept:"audio/mpeg","Content-Type":"application/json","xi-api-key":r},body:JSON.stringify({text:s,model_id:"eleven_monolingual_v1",voice_settings:{stability:.5,similarity_boost:.75}})});if(!c.ok){const d=await c.text();throw new Error(`ElevenLabs API error: ${c.status} ${d}`)}const u=await c.blob(),f=URL.createObjectURL(u);await new Promise((d,h)=>{this.elevenlabsAudio=new Audio(f),this.elevenlabsAudio.onended=()=>{this.elevenlabsAudio&&(URL.revokeObjectURL(f),this.elevenlabsAudio=null,d())},this.elevenlabsAudio.onerror=p=>{this.elevenlabsAudio&&(URL.revokeObjectURL(f),this.elevenlabsAudio=null,h(new Error(`Audio playback error: ${p}`)))},this.elevenlabsAudio.play().catch(h)})}this.isSpeaking=!1,n()}catch(a){this.isSpeaking=!1,i(a)}})}splitTextIntoChunks(t,r){if(t.length<=r)return[t];const n=[],i=t.split(/\n\s*\n/);let a="";for(const o of i)(a+(a?` 554 555`:"")+o).length<=r?a+=(a?` 556 557`:"")+o:a?(n.push(a),a=o):(this.splitParagraphIntoChunks(o,r,n),a="");return a&&n.push(a),n}splitParagraphIntoChunks(t,r,n){const i=t.match(/[^.!?]+[.!?]+(?:\s+|$)/g)||[t];let a="";for(const o of i)if((a+o).length<=r)a+=o;else if(a&&n.push(a),o.length>r){let s="";const c=o.split(" ");for(const u of c)if((s+" "+u).length<=r)s+=(s?" ":"")+u;else if(s&&n.push(s),u.length>r){for(let f=0;f<u.length;f+=r)n.push(u.substring(f,f+r));s=""}else s=u;s?a=s:a=""}else a=o;a&&n.push(a)}splitTextForElevenLabs(t,r){return this.splitTextIntoChunks(t,r)}async transcribeAudio(t){try{const r=window.SpeechRecognition||window.webkitSpeechRecognition,n=new r;return n.lang="en-US",n.continuous=!1,n.interimResults=!1,new Promise((i,a)=>{n.onresult=s=>{const c=s.results[0][0].transcript;i(c)},n.onerror=s=>{console.error("Speech recognition error:",s),a(s)},new Audio(URL.createObjectURL(t)).play(),n.start()})}catch(r){throw console.error("Error transcribing audio:",r),r}}stopSpeaking(){this.synth&&this.utterance&&this.synth.cancel(),this.elevenlabsAudio&&(this.elevenlabsAudio.pause(),this.elevenlabsAudio.src="",this.elevenlabsAudio=null),this.isSpeaking=!1}stop(){this.stopSpeaking()}playAttentionSound(){new Audio("/sounds/attention.mp3").play().catch(r=>console.error("Error playing attention sound:",r))}playSuccessSound(){new Audio("/sounds/success.mp3").play().catch(r=>console.error("Error playing success sound:",r))}playErrorSound(){new Audio("/sounds/error.mp3").play().catch(r=>console.error("Error playing error sound:",r))}get isSpeakingNow(){return this.isSpeaking}}const kt=new bwe,Z3=({text:e,onFeedbackComplete:t,title:r="AI Feedback",description:n="Get analysis and improvements for your speech",customFeedback:i,autoAnalyze:a=!1})=>{const[o,s]=v.useState(!1),[c,u]=v.useState(i||null),[f,d]=v.useState(null);Ct(),v.useEffect(()=>{a&&e&&e.trim().length>0&&!c&&!o&&h()},[e,a]),v.useEffect(()=>{i&&u(i)},[i]);const h=async()=>{s(!0),d(null);try{console.log("Requesting feedback generation from parent component"),t&&t({pronunciation:0,grammar:0,vocabulary:0,fluency:0,overall:0,suggestions:[],corrections:[]})}catch(g){console.error("Error generating feedback",g),d("Failed to generate feedback. Please try again later.")}finally{s(!1)}},p=g=>{kt.speak(g)};return l.jsxs(ne,{className:"glass-panel",children:[l.jsxs(ce,{className:"pb-0",children:[l.jsx(he,{className:"text-xl font-display",children:r}),l.jsx(ke,{children:n})]}),l.jsx(ie,{className:"pt-4",children:c?l.jsxs("div",{className:"space-y-6",children:[l.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[l.jsxs("div",{className:"space-y-4",children:[l.jsx(Gh,{label:"Pronunciation",score:c.pronunciation}),l.jsx(Gh,{label:"Grammar",score:c.grammar})]}),l.jsxs("div",{className:"space-y-4",children:[l.jsx(Gh,{label:"Vocabulary",score:c.vocabulary}),l.jsx(Gh,{label:"Fluency",score:c.fluency})]})]}),l.jsx(mwe,{score:c.overall}),c.originalText&&l.jsxs("div",{className:"bg-muted/30 p-4 rounded-lg border border-border",children:[l.jsx("h4",{className:"font-semibold mb-2",children:"Your Speech"}),l.jsx("p",{className:"text-sm italic",children:c.originalText})]}),c.correctedText&&l.jsxs("div",{className:"bg-primary/10 p-4 rounded-lg border border-primary/20",children:[l.jsx("h4",{className:"font-semibold mb-2",children:"Corrected Version"}),l.jsx("p",{className:"text-sm",children:c.correctedText})]}),c.grammarAnalysis&&l.jsxs("div",{className:"bg-blue-500/10 p-4 rounded-lg border border-blue-500/20",children:[l.jsx("h4",{className:"font-semibold mb-2",children:"Grammar Analysis"}),l.jsx("p",{className:"text-sm",children:c.grammarAnalysis})]}),c.summary&&l.jsxs("div",{className:"bg-muted/30 p-4 rounded-lg border border-border",children:[l.jsx("h4",{className:"font-semibold mb-2",children:"Analysis Summary"}),l.jsx("p",{className:"text-sm",children:c.summary})]}),l.jsx(Q3,{suggestions:c.suggestions}),c.practiceExamples&&c.practiceExamples.length>0&&l.jsxs("div",{children:[l.jsx("h4",{className:"font-semibold mb-2",children:"Practice Examples"}),l.jsx("ul",{className:"list-disc pl-5 space-y-1",children:c.practiceExamples.map((g,m)=>l.jsx("li",{className:"text-sm",children:g},m))})]}),c.corrections&&c.corrections.some(g=>g.original||g.corrected)&&l.jsxs("div",{children:[l.jsx("h4",{className:"font-semibold mb-2",children:"Corrections & Analysis"}),l.jsx("div",{className:"space-y-3 p-3 bg-muted/30 rounded-md",children:c.corrections.map((g,m)=>l.jsx(gwe,{original:g.original,corrected:g.corrected,explanation:g.explanation,rule:g.rule||"Grammar Rule"},m))})]}),l.jsxs("div",{className:"flex justify-center gap-2",children:[c.correctedText&&l.jsxs(Y,{onClick:()=>p(c.correctedText||""),variant:"outline",className:"gap-2",children:[l.jsx(Cn,{className:"h-4 w-4"}),"Listen to Corrected Speech"]}),l.jsxs(Y,{onClick:h,variant:"outline",className:"gap-2",children:[l.jsx(jS,{className:"h-4 w-4"}),"Re-analyze"]})]})]}):l.jsx(vwe,{loading:o,error:f,hasText:!0,onGenerate:h,showButton:!1})})]})};var Yh={};class wwe{async generateFeedback(t,r="general"){try{const n=` 558 You are an AI language assessment expert. Analyze the following ${r} text and provide feedback: 559 560 Text: "${t}" 561 562 Provide scores (0-100) for pronunciation, grammar, vocabulary, and fluency. 563 Also, provide specific suggestions for improvement and corrections. 564 If the type is speaking, then provide a summary of the speech. 565 Include helpful practice examples for the user to improve. 566 567 Format your response as a valid JSON object with keys: 568 - scores (object): 569 - pronunciation (number) 570 - grammar (number) 571 - vocabulary (number) 572 - fluency (number) 573 - overall (number)
574 - suggestions (array of strings) 575 - corrections (array of objects with original, corrected, explanation, and rule) 576 - summary (string) 577 - correctedText (string) 578 - grammarAnalysis (string) 579 - practiceExamples (array of strings) 580 581 Only respond with the JSON object, nothing else. 582 `,i=Un.DEFAULT||Yh.VITE_DEFAULT_API_KEY,a=await Dt.geminiRequest(n);try{const o=a.match(/\{[\s\S]*\}/),s=o?o[0]:"{}";return JSON.parse(s)}catch(o){return console.error("Error parsing JSON response:",o),{scores:{pronunciation:70,grammar:70,vocabulary:70,fluency:70,overall:70,suggestions:["Keep practicing to improve your skills."],corrections:[],summary:"You've done a good job overall, but there's room for improvement.",practiceExamples:["Practice reading aloud.","Record yourself speaking.","Listen to native speakers."]}}}}catch(n){return console.error("Error generating feedback:",n),{scores:{pronunciation:70,grammar:70,vocabulary:70,fluency:70,overall:70,suggestions:["Keep practicing to improve your skills."],corrections:[],summary:"You've done a good job overall, but there's room for improvement.",practiceExamples:["Practice reading aloud.","Record yourself speaking.","Listen to native speakers."]}}}}async generateComparisonFeedback(t,r,n="pronunciation"){try{const i=` 583 You are an AI language assessment expert specializing in ${n} analysis. 584 585 Compare the following: 586 - User's input: "${t}" 587 - Reference phrase: "${r}" 588 589 Provide a detailed analysis focusing on pronunciation accuracy, grammatical differences, 590 vocabulary usage, and speaking fluency. 591 592 Provide scores (0-100) for: 593 - pronunciation (how accurately the sounds were produced) 594 - grammar (grammatical correctness) 595 - vocabulary (word choice accuracy) 596 - fluency (smoothness and natural flow) 597 598 Also provide: 599 1. A detailed summary of the user's performance 600 2. Specific corrections with explanations 601 3. Common pronunciation issues identified 602 4. Key areas for improvement 603 5. Practice examples focusing on problem areas 604 605 Format your response as a valid JSON object with keys: 606 - scores (object): 607 - pronunciation (number) 608 - grammar (number) 609 - vocabulary (number) 610 - fluency (number) 611 - overall (number) 612 - suggestions (array of strings) 613 - corrections (array of objects with original, corrected, explanation, and rule) 614 - summary (string) 615 - correctedText (string) 616 - grammarAnalysis (string) 617 - practiceExamples (array of strings with targeted practice phrases) 618 619 Only respond with the JSON object, nothing else. 620 `,a=Un.DEFAULT||Yh.VITE_DEFAULT_API_KEY,o=await Dt.geminiRequest(i);try{const s=o.match(/\{[\s\S]*\}/),c=s?s[0]:"{}";return JSON.parse(c)}catch(s){return console.error("Error parsing JSON response:",s),{scores:{pronunciation:70,grammar:70,vocabulary:70,fluency:70,overall:70,suggestions:["Focus on matching the exact words in the reference phrase.","Practice the specific sounds that are giving you trouble.","Listen carefully to the reference audio and try to mimic the intonation."],corrections:[{original:t,corrected:r,explanation:"The pronunciation differs from the reference phrase.",rule:"Pronunciation Accuracy"}
620],summary:"Your attempt shows some differences from the reference phrase. Keep practicing to improve accuracy.",correctedText:r,grammarAnalysis:"There are some grammatical differences between your speech and the reference.",practiceExamples:["Try breaking down the phrase into smaller parts and practice each part separately.","Focus on the specific sounds that you find challenging.","Record yourself and compare with the reference."]}}}}catch(i){return console.error("Error generating comparison feedback:",i),{scores:{pronunciation:70,grammar:70,vocabulary:70,fluency:70,overall:70,suggestions:["Keep practicing to improve your accuracy."],corrections:[],summary:"There are some differences between your pronunciation and the reference phrase.",practiceExamples:["Practice breaking down the phrase into smaller chunks."]}}}}async generateWritingPrompt(t){const r=` 621 You are an AI writing prompt generator. Generate a creative writing prompt of type ${t}. 622 623 Provide the prompt, type, minimum words, time limit, and tips. 624 625 Format your response as a valid JSON object with keys: 626 - prompt (string) 627 - type (string) 628 - minWords (number) 629 - timeLimit (number) 630 - tips (array of strings) 631 632 Only respond with the JSON object, nothing else. 633 `;try{const n=await Dt.geminiRequest(r);try{const i=n.match(/\{[\s\S]*\}/),a=i?i[0]:"{}";return JSON.parse(a)}catch(i){return console.error("Error parsing JSON response:",i),{prompt:"Write about a memorable experience.",type:"general",minWords:200,timeLimit:30,tips:["Plan your essay","Use descriptive language","Review and edit your work"]}}}catch(n){return console.error("Error generating writing prompt:",n),{prompt:"Write about a memorable experience.",type:"general",minWords:200,timeLimit:30,tips:["Plan your essay","Use descriptive language","Review and edit your work"]}}}async analyzePronunciation(t,r){try{console.log("Analyzing pronunciation:",{transcribedText:t,originalPhrase:r});const n=` 634 You are a pronunciation assessment expert. Analyze the following: 635 636 Original phrase: "${r}" 637 User's pronunciation (transcribed): "${t}" 638 639 Compare these and provide: 640 1. An accuracy score from 0-100 641 2. Brief, specific feedback on pronunciation 642 3. List the correctly pronounced sounds and the incorrectly pronounced sounds 643 4. Give detailed tips for improvement focusing on specific sounds or patterns 644 645 Format your response as a valid JSON object with keys: 646 - score (number) 647 - feedback (string with detailed analysis and specific errors) 648 - correctSounds (array of strings representing correctly pronounced sounds) 649 - incorrectSounds (array of strings representing incorrectly pronounced sounds) 650 - tips (array of 3-5 specific improvement suggestions) 651 652 Only respond with the JSON object, nothing else. 653 `,i=Un.DEFAULT||Yh.VITE_DEFAULT_API_KEY,a=await Dt.geminiRequest(n);try{const o=a.match(/\{[\s\S]*\}/),s=o?o[0]:"{}",c=JSON.parse(s);return console.log("Pronunciation analysis result:",c),c}catch(o){return console.error("Error parsing JSON response:",o),{score:70,feedback:"Your pronunciation is generally good, but there's room for improvement. Focus on clearer articulation of specific sounds.",correctSounds:[],incorrectSounds:[],tips:["Practice speaking slower to improve clarity","Focus on word endings and consonant clusters","Listen to native speakers and mimic their pronunciation","Record yourself and compare with reference audio","Practice individual problematic sounds in isolation"]}}}catch(n){return console.error("Error in analyzePronunciation:",n),{score:70,feedback:"Your pronunciation is good. Keep practicing for better results.",correctSounds:[],incorrectSounds:[],tips:["Practice speaking slower","Focus on word endings","Listen to native speakers"]}}}async generatePronunciationExercise(t="medium"){try{console.log("Generating pronunciation exercise with difficulty:",t);const r=` 654 Generate a pronunciation exercise phrase based on difficulty level: ${t}. 655 656 For "easy" difficulty: Use simple, everyday phrases with basic vocabulary and common sounds. 657 For "medium" difficulty: Include some challenging sounds but with familiar vocabulary. 658 For "hard" difficulty: Include challenging sounds, tongue twisters, or complex phonetic patterns. 659 660 Provide both the phrase and its IPA (International Phonetic Alphabet) pronunciation. 661 662 Format your response as a valid JSON object with keys: 663 - phrase (string) 664 - phonetics (string, IPA pronunciation) 665 666 Only respond with the JSON object, nothing else. Make sure the phrase is different each time. 667 `,n=Un.DEFAULT||Yh.VITE_DEFAULT_API_KEY,i=await Dt.geminiRequest(r);try{const a=i.match(/\{[\s\S]*\}/),o=a?a[0]:"{}",s=JSON.parse(o);return console.log("Generated pronunciation exercise:",s),s}catch(a){console.error("Error parsing JSON response:",a);
667const o={easy:{phrase:"Thank you for your help",phonetics:"/θæÅk juË fÉË jÉË hÉlp/"},medium:{phrase:"The quick brown fox jumps over the lazy dog",phonetics:"/Ã°É kwɪk braÊn fÉks dÊÊmps ËÉÊvÉ Ã°É Ëleɪzi dÉÉ¡/"},hard:{phrase:"She sells seashells by the seashore",phonetics:"/Êi sÉlz ËsiËÊÉlz baɪ Ã°É ËsiËÊÉË/"}};return o[t]||o.medium}}catch(r){return console.error("Error in generatePronunciationExercise:",r),{phrase:"The quick brown fox jumps over the lazy dog",phonetics:"/Ã°É kwɪk braÊn fÉks dÊÊmps ËÉÊvÉ Ã°É Ëleɪzi dÉÉ¡/"}}}async generateReadingPassage(t,r){var n,i,a,o,s;try{const c=` 668 Generate a reading comprehension passage about ${t} for ${r} level learners. 669 Include a title, content, and 3-5 multiple choice questions. 670 671 Format as JSON with: 672 - title (string) 673 - content (string) 674 - questions (array of objects with id, text, options array with id/text, and correctOption) 675 `,u=Un.DEFAULT||"AIzaSyAmDT5Up2xciEHkFMYOez6ZLk5ZFIMWh74",f=await fetch(`https://generativelanguage.googleapis.com/v1/models/gemini-1.5-pro:generateContent?key=${u}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({contents:[{parts:[{text:c}]}],generationConfig:{temperature:.7,topK:40,topP:.95,maxOutputTokens:1024}})});if(!f.ok)throw new Error(`API request failed: ${f.status}`);const h=((s=(o=(a=(i=(n=(await f.json()).candidates)==null?void 0:n[0])==null?void 0:i.content)==null?void 0:a.parts)==null?void 0:o[0])==null?void 0:s.text)||"";try{const p=h.match(/\{[\s\S]*\}/),g=p?p[0]:"{}";return JSON.parse(g)}catch(p){return console.error("Error parsing JSON response:",p),{title:"Default Reading",content:"Please try again to generate a reading passage.",questions:[]}}}catch(c){return console.error("Error generating reading passage:",c),{title:"Default Reading",content:"Please try again to generate a reading passage.",questions:[]}}}async generateVocabularyWords(t,r=5){var n,i,a,o,s;try{const c=` 676 Generate ${r} vocabulary words for ${t} level English learners. 677 Include the word and its definition. 678 679 Format as JSON with: 680 - words (array of objects with id, word, and definition) 681 `,u=Un.DEFAULT||"AIzaSyAmDT5Up2xciEHkFMYOez6ZLk5ZFIMWh74",f=await fetch(`https://generativelanguage.googleapis.com/v1/models/gemini-1.5-pro:generateContent?key=${u}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({contents:[{parts:[{text:c}]}],generationConfig:{temperature:.7,topK:40,topP:.95,maxOutputTokens:1024}})});if(!f.ok)throw new Error(`API request failed: ${f.status}`);const h=((s=(o=(a=(i=(n=(await f.json()).candidates)==null?void 0:n[0])==null?void 0:i.content)==null?void 0:a.parts)==null?void 0:o[0])==null?void 0:s.text)||"";try{const p=h.match(/\{[\s\S]*\}/),g=p?p[0]:"{}";return JSON.parse(g)}catch(p){return console.error("Error parsing JSON response:",p),{words:[]}}}catch(c){return console.error("Error generating vocabulary words:",c),{words:[]}}}async generateTeacherResponse(t,r){var n,i,a,o,s;try{const c=` 682 You are an AI English teacher. Respond to: "${t}" 683 Keep responses educational, concise, and encouraging. 684 Consider the conversation history for context. 685 `,u=Un.DEFAULT||"AIzaSyAmDT5Up2xciEHkFMYOez6ZLk5ZFIMWh74",f=await fetch(`https://generativelanguage.googleapis.com/v1/models/gemini-1.5-pro:generateContent?key=${u}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({contents:[{parts:[{text:c}]}],generationConfig:{temperature:.7,topK:40,topP:.95,maxOutputTokens:1024}})});if(!f.ok)throw new Error(`API request failed: ${f.status}`);return((s=(o=(a=(i=(n=(await f.json()).candidates)==null?void 0:n[0])==null?void 0:i.content)==null?void 0:a.parts)==null?void 0:o[0])==null?void 0:s.text)||""}catch(c){return console.error("Error generating teacher response:",c),"I'm sorry, I couldn't process that. Could you try rephrasing?"}}async evaluateWriting(t){const r=` 686 Evaluate this writing: 687 688 Text to evaluate: "${t}" 689 690 Provide a detailed analysis with: 691 - Overall score (0-100) 692 - Summary 693 - Strengths 694 - Areas to improve 695 696 Format as JSON with structure: 697 { 698 "overall": { 699 "score": number, 700 "summary": string, 701 "strengths": string[], 702 "areasToImprove": string[] 703 } 704 } 705 `;try{const n=await Dt.geminiRequest(r);try{const i=n.match(/\{[\s\S]*\}/),a=i?i[0]:"{}";return JSON.parse(a)}catch(i){return console.error("Error parsing JSON response:",i),{overall:{score:70,summary:"Unable to generate detailed feedback. Please try again.",strengths:[],areasToImprove:[]}}}}catch(n){return console.error("Error evaluating writing:",n),{overall:{score:70,summary:"Unable to generate feedback. Please try again.",strengths:[],areasToImprove:[]}}}}}const _n=new wwe,J3=({feedback:e,word:t})=>{const r=e.score>=90?"text-green-500":e.score>=75?"text-blue-500":e.score>=60?"text-amber-500":"text-red-500";return l.jsxs("div",{className:"mt-6 space-y-4",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("h3",{className:"text-lg font-semibold",children:"Your Pronunciation Results"}),l.jsxs("span",{className:`text-xl font-bold ${r}`,children:[e.score,"/100"]})]}),l.jsxs("div",{className:"bg-muted/30 p-4 rounded-lg",children:[l.jsx("p",{className:"mb-2",children:e.feedback}),l.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 mt-4",children:[e.correctSounds.length>0&&l.jsxs("div",{className:"bg-green-500/10 p-3 rounded-md border border-green-500/20",children:[l.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[l.jsx(ra,{className:"h-4 w-4 text-green-500"}),l.jsx("h4",{className:"font-medium",children:"Correct Sounds"})]}),l.jsx("ul",{className:"list-disc pl-5 space-y-1",children:e.correctSounds.map((n,i)=>l.jsx("li",{className:"text-sm",children:n},i))})]}),e.incorrectSounds.length>0&&l.jsxs("div",{className:"bg-red-500/10 p-3 rounded-md border border-red-500/20",children:[l.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[l.jsx(Rc,{className:"h-4 w-4 text-red-500"}),l.jsx("h4",{className:"font-medium",children:"Sounds to Improve"})]}),l.jsx("ul",{className:"list-disc pl-5 space-y-1",children:e.incorrectSounds.map((n,i)=>l.jsx("li",{className:"text-sm",children:n},i))})]})]}),l.jsxs("div",{className:"mt-4",children:[l.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[l.jsx(jW,{className:"h-4 w-4 text-amber-500"}),l.jsx("h4",{className:"font-medium",children:"Tips for Improvement"})]}),l.jsx("ul",{className:"list-disc pl-5 space-y-1",children:e.tips.map((n,i)=>l.jsx("li",{className:"text-sm",children:n},i))})]}),e.commonErrors&&e.commonErrors.length>0&&l.jsxs("div",{className:"mt-4 border-t border-border pt-4",children:[l.jsx("h4",{className:"font-medium mb-2",children:"Common Errors to Watch For"}),l.jsx("div",{className:"space-y-3",children:e.commonErrors.map((n,i)=>l.jsxs("div",{className:"bg-background p-3 rounded-md",children:[l.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:n.description}),l.jsx("p",{className:"text-sm mt-1",children:n.correction})]},i))})]}),l.jsx("div",{className:"mt-6 flex justify-center",children:l.jsxs(Y,{variant:"outline",className:"gap-2",onClick:()=>{kt.speak(t)},children:[l.jsx(Cn,{className:"h-4 w-4"}),"Hear Correct Pronunciation"]})})]})]})},eF=({isTranscribing:e,isAnalyzing:t,transcribedText:r,onToggleTranscription:n,onAnalyze:i,autoAnalyzeAfterStop:a=!1,referencePhrase:o,showAnalysisButton:s=!0})=>{const{toast:c}=Ct(),u=()=>{e&&a?(n(),setTimeout(()=>{r&&r.trim()!==""?i():c({title:"No Speech Detected",description:"Please speak the phrase before analyzing.",variant:"destructive"})},500)):n()};return l.jsxs("div",{className:"flex flex-col items-center space-y-4",children:[l.jsx("div",{className:"mb-2 text-center",children:e?l.jsx("div",{className:"text-lg font-semibold text-red-500 animate-pulse",children:"Listening... Speak clearly"}):l.jsx("div",{className:"text-lg font-semibold",children:t?"Analyzing speech...":"Ready to record"})}),o&&l.jsxs("div",{className:"p-3 bg-primary/10 rounded-md w-full mb-2 text-center",children:[l.jsx("p",{className:"text-sm font-medium",children:"Please pronounce:"}),l.jsx("p",{className:"text-lg font-semibold",children:o})]}),l.jsxs("div",{className:"flex gap-4",children:[l.jsx(Y,{onClick:u,disabled:t,size:"lg",variant:e?"destructive":"default",className:`rounded-full h-16 w-16 ${e?"animate-pulse":""}`,children:t?l.jsx(nn,{className:"h-8 w-8 animate-spin"}):e?l.jsx(GM,{className:"h-8 w-8"}):l.jsx(ni,{className:"h-8 w-8"})}),s&&!e&&r&&l.jsxs(Y,{onClick:i,disabled:t||!r||r.trim()==="",size:"lg",variant:"outline",className:"h-16 px-6",children:[t?l.jsx(nn,{className:"h-5 w-5 mr-2 animate-spin"}):l.jsx(FM,{className:"h-5 w-5 mr-2"}),"Analysis"]}),!e&&r&&!a&&!s&&l.jsxs(Y,{onClick:i,disabled:t||!r||r.trim()==="",size:"lg",variant:"outline",className:"h-16 px-6",children:[t?l.jsx(nn,{className:"h-5 w-5 mr-2 animate-spin"}):l.jsx(jS,{className:"h-5 w-5 mr-2"}),"Analyze"]})]}),l.jsx("div",{className:"mt-4 text-center text-sm text-muted-foreground",children:e?"Click to stop recording and analyze":t?"Processing your speech...":"Click to start recording"}),r&&l.jsxs("div",{className:"mt-4 p-4 border rounded-md w-full max-h-40 overflow-y-auto bg-muted/20",children:[l.jsx("h3",{className:"text-sm font-semibold mb-2",children:"Your speech:"}),l.jsx("p",{className:"text-sm",children:r})]})]})},Swe=({feedback:e})=>{const t=r=>r>=90?"text-green-500":r>
705=75?"text-blue-500":r>=60?"text-amber-500":"text-red-500";return l.jsxs(ne,{className:"border border-border",children:[l.jsx(ce,{className:"pb-2",children:l.jsx(he,{className:"text-lg font-display",children:"Detailed Speech Analysis"})}),l.jsxs(ie,{className:"space-y-4",children:[l.jsxs("div",{className:"flex justify-between items-center mb-2",children:[l.jsx("span",{className:"text-sm font-medium",children:"Overall Score"}),l.jsxs("span",{className:`font-semibold ${t(e.overall)}`,children:[e.overall,"/100"]})]}),l.jsx("div",{className:"grid grid-cols-1 gap-4",children:l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{className:"flex justify-between border-b pb-2",children:[l.jsx("span",{className:"text-sm font-medium",children:"Pronunciation"}),l.jsxs("span",{className:`text-sm ${t(e.pronunciation)}`,children:[e.pronunciation,"/100"]})]}),l.jsxs("div",{className:"flex justify-between border-b pb-2",children:[l.jsx("span",{className:"text-sm font-medium",children:"Grammar"}),l.jsxs("span",{className:`text-sm ${t(e.grammar)}`,children:[e.grammar,"/100"]})]}),l.jsxs("div",{className:"flex justify-between border-b pb-2",children:[l.jsx("span",{className:"text-sm font-medium",children:"Vocabulary"}),l.jsxs("span",{className:`text-sm ${t(e.vocabulary)}`,children:[e.vocabulary,"/100"]})]}),l.jsxs("div",{className:"flex justify-between border-b pb-2",children:[l.jsx("span",{className:"text-sm font-medium",children:"Fluency"}),l.jsxs("span",{className:`text-sm ${t(e.fluency)}`,children:[e.fluency,"/100"]})]})]})}),e.originalText&&l.jsxs("div",{className:"mt-4 p-3 bg-muted/30 rounded-md",children:[l.jsx("h4",{className:"text-sm font-medium mb-1",children:"What You Said"}),l.jsx("p",{className:"text-sm italic",children:e.originalText})]}),e.correctedText&&l.jsxs("div",{className:"mt-4 p-3 bg-primary/10 rounded-md",children:[l.jsx("h4",{className:"text-sm font-medium mb-1",children:"Corrected Version"}),l.jsx("p",{className:"text-sm",children:e.correctedText})]}),e.grammarAnalysis&&l.jsxs("div",{className:"mt-4 p-3 bg-blue-500/10 rounded-md",children:[l.jsx("h4",{className:"text-sm font-medium mb-1",children:"Grammar Analysis"}),l.jsx("p",{className:"text-sm",children:e.grammarAnalysis})]}),e.summary&&l.jsxs("div",{className:"mt-4 p-3 bg-muted/30 rounded-md",children:[l.jsx("h4",{className:"text-sm font-medium mb-1",children:"Analysis Summary"}),l.jsx("p",{className:"text-sm whitespace-pre-line",children:e.summary})]}),e.suggestions&&e.suggestions.length>0&&l.jsxs("div",{className:"mt-4 p-3 bg-amber-500/10 rounded-md",children:[l.jsx("h4",{className:"text-sm font-medium mb-1",children:"Improvement Suggestions"}),l.jsx("ul",{className:"text-sm list-disc pl-5 space-y-1",children:e.suggestions.map((r,n)=>l.jsx("li",{children:r},n))})]}),e.practiceExamples&&e.practiceExamples.length>0&&l.jsxs("div",{className:"mt-4 p-3 bg-green-500/10 rounded-md",children:[l.jsx("h4",{className:"text-sm font-medium mb-1",children:"Practice Examples"}),l.jsx("ul",{className:"text-sm list-disc pl-5 space-y-1",children:e.practiceExamples.map((r,n)=>l.jsx("li",{children:r},n))})]})]})]})},jwe=({onScoreUpdate:e})=>{const[t,r]=v.useState(!1),[n,i]=v.useState(!1),[a,o]=v.useState(null),[s,c]=v.useState(null),[u,f]=v.useState(""),[d,h]=v.useState(""),[p,g]=v.useState(!1),[m,y]=v.useState(""),[x,b]=v.useState("easy"),[w,S]=v.useState(0),[j,P]=v.useState(null),N=v.useRef(null),_=v.useRef([]),O=v.useRef(null),{toast:k}=Ct();v.useEffect(()=>{C()},[x]),v.useEffect(()=>{w>=10&&(b(x==="easy"?"medium":x==="medium"?"hard":"easy"),S(0))},[w,x]);const C=async()=>{g(!0),o(null),c(null),P(null),y("");try{k({title:`Generating ${x} level phrase`,description:"Fetching a new pronunciation challenge..."}),console.log("Requesting new phrase from Gemini API...");const A=await _n.generatePronunciationExercise(x);if(console.log("Received response from Gemini API:",A),A&&A.phrase)f(A.phrase),h(A.phonetics||""),k({title:"New Pronunciation Exercise",description:"Ready for you to practice!",variant:"default"});else throw new Error("Invalid response from API")}catch(A){console.error("Error loading pronunciation exercise:",A),k({title:"Error Loading Exercise",description:"Failed to load a new pronunciation exercise. Using fallback phrase.",variant:"destructive"});const D={easy:{phrase:"The weather is beautiful today.",phonetics:"/Ã°É ËwÉðÉr ɪz ËbjuËtɪfÉl tÉËdeɪ/"},medium:{phrase:"She sells seashells by the seashore.",phonetics:"/ÊiË sÉlz ËsiËÊÉlz baɪ Ã°É ËsiËÊÉËr/"},hard:{phrase:"The sixth sick sheik's sixth sheep's sick.",phonetics:"/Ã°É sɪksθ sɪk Êeɪks sɪksθ ÊiËps sɪk/"}};
705f(D[x].phrase),h(D[x].phonetics)}finally{g(!1)}},E=async()=>{try{await kt.speak(u,{voice:"female",rate:.9}),k({title:"Playing Pronunciation",description:"Listen carefully to the correct pronunciation."})}catch(A){console.error("Error playing audio:",A),k({title:"Playback Error",description:"Could not play the pronunciation. Please try again.",variant:"destructive"})}},I=()=>{t?$():T()},T=async()=>{try{y(""),r(!0);const A=await navigator.mediaDevices.getUserMedia({audio:!0}),D=new MediaRecorder(A);N.current=D,_.current=[],D.ondataavailable=z=>{z.data.size>0&&_.current.push(z.data)};const F=window.SpeechRecognition||window.webkitSpeechRecognition;if(F){const z=new F;z.lang="en-US",z.continuous=!0,z.interimResults=!0,O.current=z,z.onresult=H=>{let ue="",be="";for(let Le=H.resultIndex;Le<H.results.length;Le++){const Be=H.results[Le][0].transcript;H.results[Le].isFinal?be+=Be+" ":ue+=Be}y(Le=>be+ue)},z.onerror=H=>{console.error("Recognition error:",H.error)},z.start()}else{k({title:"Feature Not Supported",description:"Speech recognition is not supported in your browser. Please use Chrome or Edge.",variant:"destructive"});return}D.onstop=()=>{},D.start(),k({title:"Recording Started",description:"Speak the phrase clearly."})}catch(A){console.error("Error starting recording:",A),r(!1),k({title:"Microphone Access Error",description:"Please allow microphone access to use this feature.",variant:"destructive"})}},$=()=>{if(r(!1),N.current&&N.current.state!=="inactive"&&(N.current.stop(),N.current.stream&&N.current.stream.getTracks().forEach(A=>A.stop())),O.current)try{O.current.stop()}catch{}},R=async()=>{if(!m.trim()){k({title:"No Speech Detected",description:"Please speak the phrase before analyzing.",variant:"destructive"});return}i(!0);try{k({title:"Analyzing Pronunciation",description:"Comparing your speech to the reference phrase..."}),console.log("Sending to Gemini for pronunciation analysis:",{transcribedText:m.trim(),phrase:u});const A=await _n.analyzePronunciation(m.trim(),u);console.log("Pronunciation analysis received:",A),console.log("Requesting detailed language analysis for:",m.trim());const D=await _n.generateComparisonFeedback(m.trim(),u,"pronunciation");if(console.log("Detailed analysis received:",D),o(A.score),c(A),D.scores){const F={pronunciation:A.score||D.scores.pronunciation||0,grammar:D.scores.grammar||0,vocabulary:D.scores.vocabulary||0,fluency:D.scores.fluency||0,overall:Math.round((A.score+(D.scores.grammar||0)+(D.scores.vocabulary||0)+(D.scores.fluency||0))/4),suggestions:[...A.tips||[],...D.scores.suggestions||[]],corrections:(D.scores.corrections||[]).map(z=>({original:z.original||"",corrected:z.corrected||"",explanation:z.explanation||"",rule:z.rule||"Grammar Rule"})),summary:`${A.feedback} 706 707${D.scores.summary||""}`,originalText:m,correctedText:D.scores.correctedText||m,grammarAnalysis:D.scores.grammarAnalysis||"",practiceExamples:D.scores.practiceExamples||[]};P(F)}e&&A.score&&(e(A.score),S(F=>F+1)),k({title:"Analysis Complete",description:`Your pronunciation score: ${A.score}/100`})}catch(A){console.error("Error analyzing audio:",A),k({title:"Analysis Error",description:"Could not analyze your pronunciation. Please try again.",variant:"destructive"})}finally{i(!1)}},U={easy:"text-green-500",medium:"text-amber-500",hard:"text-red-500"}[x];return p?l.jsx(ne,{children:l.jsxs(ie,{className:"flex flex-col items-center justify-center py-12 space-y-4",children:[l.jsx(nn,{className:"h-12 w-12 animate-spin text-primary"}),l.jsx("p",{className:"text-muted-foreground",children:"Loading new pronunciation exercise..."})]})}):l.jsxs(ne,{className:"max-w-2xl mx-auto",children:[l.jsxs(ce,{children:[l.jsxs("div",{className:"flex justify-between items-center",children:[l.jsx(he,{children:"Pronunciation Practice"}),l.jsxs("span",{className:`text-xs uppercase font-semibold ${U}`,children:[x," (Exercise ",w+1,"/10)"]})]}),l.jsx(ke,{children:"Listen to the correct pronunciation, then practice speaking the phrase"})]}),l.jsxs(ie,{className:"space-y-4",children:[l.jsxs("div",{className:"p-4 rounded-lg bg-muted/40 text-center",children:[l.jsx("p",{className:"text-lg font-medium mb-1",children:u}),d&&l.jsx("p",{className:"text-sm text-muted-foreground",children:d})]}),l.jsxs(Y,{variant:"outline",className:"w-full flex items-center gap-2",onClick:E,disabled:t||n,children:[l.jsx(Cn,{className:"h-4 w-4"}),"Listen to Pronunciation"]}),l.jsx("div",{className:"border rounded-md p-4",children:l.jsx(eF,{isTranscribing:t,isAnalyzing:n,transcribedText:m,onToggleTranscription:I,onAnalyze:R,autoAnalyzeAfterStop:!1,referencePhrase:u,showAnalysisButton:!0})}),a!==null&&s&&l.jsx(J3,{feedback:s,word:u}),j&&l.jsx(Swe,{feedback:j})]}),l.jsx(jt,{className:"flex flex-col space-y-3",children:l.jsxs(Y,{variant:"outline",className:"w-full gap-2",onClick:C,disabled:t||n||p,children:[l.jsx(jS,{className:"h-4 w-4"}),"Get New Phrase"]})})]})},Pwe=({topics:e})=>l.jsxs(ne,{className:"glass-panel",children:[l.jsxs(ce,{children:[l.jsxs(he,{className:"text-xl font-display flex items-center gap-2",children:[l.jsx(Rs,{className:"h-5 w-5"}),"Suggested Topics"]}),l.jsx("p",{className:"text-muted-foreground",children:"Practice with these prompts to improve your speaking skills"})]}),l.jsx(ie,{children:l.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:e.map(t=>l.jsxs(ne,{className:"glass-panel",children:[l.jsx(ce,{className:"pb-2",children:l.jsx(he,{className:"text-lg font-display",children:t.title})}),l.jsx(ie,{children:l.jsx("p",{className:"text-muted-foreground",children:t.prompt})})]},t.id))})})]}),Nwe=({completedTasks:e})=>l.jsxs(ne,{children:[l.jsxs(ce,{children:[l.jsx(he,{className:"text-xl font-display",children:"Achievements"}),l.jsx(ke,{children:"Complete tasks to earn points"})]}),l.jsx(ie,{children:l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{className:"flex justify-between items-center",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(ra,{className:`h-5 w-5 ${e.includes("practice_complete")?"text-green-500":"text-muted-foreground"}`}),l.jsx("span",{children:"Complete a practice"})]}),l.jsx(Kt,{variant:e.includes("practice_complete")?"default":"outline",children:"10 pts"})]}),l.jsxs("div",{className:"flex justify-between items-center",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(ra,{className:`h-5 w-5 ${e.includes("grammar_mastery")?"text-green-500":"text-muted-foreground"}`}),l.jsx("span",{children:"Grammar mastery"})]}),l.jsx(Kt,{variant:e.includes("grammar_mastery")?"default":"outline",children:"20 pts"})]}),l.jsxs("div",{className:"flex justify-between items-center",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(ra,{className:`h-5 w-5 ${e.includes("pronunciation_mastery")?"text-green-500":"text-muted-foreground"}`}),l.jsx("span",{children:"Pronunciation mastery"})]}),l.jsx(Kt,{variant:e.includes("pronunciation_mastery")?"default":"outline",children:"20 pts"})]})]})})]}),tF=({limit:e=10,currentUserId:t})=>{const[r,n]=v.useState([]),[i,a]=v.useState(!0);v.useEffect(()=>{(async()=>{try{const c=await ut.getLeaderboard();n(c.slice(0,e))}catch(c){console.error("Error fetching leaderboard:",c)}finally{a(!1)}})()},[e]);const o=s=>{switch(s){case 1:return l.jsx(Ed,{className:"h-5 w-5 text-yellow-500"});case 2:return l.jsx(f_,{className:"h-5 w-5 text-gray-400"});case 3:return l.jsx(f_,{className:"h-5 w-5 text-amber-700"});default:return l.jsx(qi,{className:"h-5 w-5 text-blue-500"})}};return l.jsxs(ne,{children:[l.jsxs(ce,{children:[l.jsxs(he,{className:"flex items-center gap-2",children:[l.jsx(Ed,{className:"h-5 w-5 text-primary"}),"Leaderboard"]}),l.jsx(ke,{children:"See how you compare to other students"})]}),l.jsx(ie,{children:i?l.jsx("div",{className:"py-8 text-center text-muted-foreground",children:"Loading leaderboard..."}):r.length===0?l.jsx("div",{className:"py-8 text-center text-muted-foreground",children:"No data available yet"}):l.jsx("div",{className:"space-y-1",children:r.map((s,c)=>l.jsxs("div",{className:G("flex items-center justify-between p-3 rounded-lg",t===s.userId?"bg-primary/10":c%2===0?"bg-muted/50":""),children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("div",{className:"flex items-center justify-center w-8 h-8 rounded-full bg-primary/5",children:o(c+1)}),l.jsxs("div",{children:[l.jsx("p",{className:"font-medium",children:s.userName}),l.jsxs("p",{className:"text-xs text-muted-foreground",children:["Level ",s.level]})]})]}),l.jsxs("div",{className:"text-right",children:[l.jsx("p",{className:"font-semibold",children:s.points}),l.jsx("p",{className:"text-xs text-muted-foreground",children:"points"})]})]},s.userId))})})]})},rF=v.forwardRef(({className:e,...t},r)=>l.jsx("div",{className:"relative w-full overflow-auto",children:l.jsx("table",{ref:r,className:G("w-full caption-bottom text-sm",e),...t})}));rF.displayName="Table";const nF=v.forwardRef(({className:e,...t},r)=>l.jsx("thead",{ref:r,className:G("[&_tr]:border-b",e),...t}));nF.displayName="TableHeader";const iF=v.forwardRef(({className:e,...t},r)=>l.jsx("tbody",{ref:r,className:G("[&_tr:last-child]:border-0",e),...t}));iF.displayName="TableBody";const _we=v.forwardRef(({className:e,...t},r)=>l.jsx("tfoot",{ref:r,className:G("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));_we.displayName="TableFooter";const vp=v.forwardRef(({className:e,...t},r)=>l.jsx("tr",{ref:r,className:G("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));vp.displayName="TableRow";const Ta=v.forwardRef(({className:e,...t},r)=>l.jsx("th",{ref:r,className:G("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",e),...t}));Ta.displayName="TableHead";const Fi=v.forwardRef(({className:e,...t},r)=>l.jsx("td",{ref:r,className:G("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...t}));Fi.displayName="TableCell";const Owe=v.forwardRef(({className:e,...t},r)=>l.jsx("caption",{ref:r,className:G("mt-4 text-sm text-muted-foreground",e),...t}));
vendor: 4,771 bytes, line 707
707Owe.displayName="TableCaption";function oi(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 Os(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}const aF=6048e5,Ewe=864e5;let kwe={};function oy(){return kwe}function bf(e,t){var s,c,u,f;const r=oy(),n=(t==null?void 0:t.weekStartsOn)??((c=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:c.weekStartsOn)??r.weekStartsOn??((f=(u=r.locale)==null?void 0:u.options)==null?void 0:f.weekStartsOn)??0,i=oi(e),a=i.getDay(),o=(a<n?7:0)+a-n;return i.setDate(i.getDate()-o),i.setHours(0,0,0,0),i}function ug(e){return bf(e,{weekStartsOn:1})}function oF(e){const t=oi(e),r=t.getFullYear(),n=Os(e,0);n.setFullYear(r+1,0,4),n.setHours(0,0,0,0);const i=ug(n),a=Os(e,0);a.setFullYear(r,0,4),a.setHours(0,0,0,0);const o=ug(a);return t.getTime()>=i.getTime()?r+1:t.getTime()>=o.getTime()?r:r-1}function KC(e){const t=oi(e);return t.setHours(0,0,0,0),t}function GC(e){const t=oi(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 Cwe(e,t){const r=KC(e),n=KC(t),i=+r-GC(r),a=+n-GC(n);return Math.round((i-a)/Ewe)}function Awe(e){const t=oF(e),r=Os(e,0);return r.setFullYear(t,0,4),r.setHours(0,0,0,0),ug(r)}function Twe(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Mwe(e){if(!Twe(e)&&typeof e!="number")return!1;const t=oi(e);return!isNaN(Number(t))}function Iwe(e){const t=oi(e),r=Os(e,0);return r.setFullYear(t.getFullYear(),0,1),r.setHours(0,0,0,0),r}const $we={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"}},Rwe=(e,t,r)=>{let n;const i=$we[e];return typeof i=="string"?n=i:t===1?n=i.one:n=i.other.replace("{{count}}",t.toString()),r!=null&&r.addSuffix?r.comparison&&r.comparison>0?"in "+n:n+" ago":n};function Lx(e){return(t={})=>{const r=t.width?String(t.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}const Dwe={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Lwe={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Fwe={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Bwe={date:Lx({formats:Dwe,defaultWidth:"full"}),time:Lx({formats:Lwe,defaultWidth:"full"}),dateTime:Lx({formats:Fwe,defaultWidth:"full"})},Uwe={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},zwe=(e,t,r,n)=>Uwe[e];function ju(e){return(t,r)=>{const n=r!=null&&r.context?String(r.context):"standalone";let i;if(n==="formatting"&&e.formattingValues){const o=e.defaultFormattingWidth||e.defaultWidth,s=r!=null&&r.width?String(r.width):o;i=e.formattingValues[s]||e.formattingValues[o]}else{const o=e.defaultWidth,s=r!=null&&r.width?String(r.width):e.defaultWidth;i=e.values[s]||e.values[o]}const a=e.argumentCallback?e.argumentCallback(t):t;return i[a]}}const Wwe={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Vwe={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Hwe={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"]},qwe={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Frid
707ay","Saturday"]},Kwe={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"}},Gwe={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"}},Ywe=(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"},Xwe={ordinalNumber:Ywe,era:ju({values:Wwe,defaultWidth:"wide"}),quarter:ju({values:Vwe,defaultWidth:"wide",argumentCallback:e=>e-1}),month:ju({values:Hwe,defaultWidth:"wide"}),day:ju({values:qwe,defaultWidth:"wide"}),dayPeriod:ju({values:Kwe,defaultWidth:"wide",formattingValues:Gwe,defaultFormattingWidth:"wide"})};function Pu(e){return(t,r={})=>{const n=r.width,i=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],a=t.match(i);if(!a)return null;const o=a[0],s=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(s)?Zwe(s,d=>d.test(o)):Qwe(s,d=>d.test(o));let u;u=e.valueCallback?e.valueCallback(c):c,u=r.valueCallback?r.valueCallback(u):u;const f=t.slice(o.length);return{value:u,rest:f}}}function Qwe(e,t){for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t(e[r]))return r}function Zwe(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return r}function Jwe(e){return(t,r={})=>{const n=t.match(e.matchPattern);if(!n)return null;const i=n[0],a=t.match(e.parsePattern);if(!a)return null;let o=e.valueCallback?e.valueCallback(a[0]):a[0];o=r.valueCallback?r.valueCallback(o):o;const s=t.slice(i.length);return{value:o,rest:s}}}const e1e=/^(\d+)(th|st|nd|rd)?/i,t1e=/\d+/i,r1e={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},n1e={any:[/^b/i,/^(a|c)/i]},i1e={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},a1e={any:[/1/i,/2/i,/3/i,/4/i]},o1e={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},s1e={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]},l1e={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},c1e={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]},u1e={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},d1e={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}},f1e={ordinalNumber:Jwe({matchPattern:e1e,parsePattern:t1e,valueCallback:e=>parseInt(e,10)}),era:Pu({matchPatterns:r1e,defaultMatchWidth:"wide",parsePatterns:n1e,defaultParseWidth:"any"}),quarter:Pu({matchPatterns:i1e,defaultMatchWidth:"wide",parsePatterns:a1e,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Pu({matchPatterns:o1e,defaultMatchWidth:"wide",parsePatterns:s1e,defaultParseWidth:"any"}),day:Pu({matchPatterns:l1e,defaultMatchWidth:"wide",parsePatterns:c1e,defaultParseWidth:"any"}),dayPeriod:Pu({matchPatterns:u1e,defaultMatchWidth:"any",parsePatterns:d1e,defaultParseWidth:"any"})},h1e={code:"en-US",formatDistance:Rwe,formatLong:Bwe,formatRelative:zwe,localize:Xwe,match:f1e,options:{weekStartsOn:0,firstWeekContainsDate:1}};function p1e(e){const t=oi(e);return Cwe(t,Iwe(t))+1}function m1e(e){const t=oi(e),r=+ug(t)-+Awe(t);return Math.round(r/aF)+1}function sF(e,t){var f,d,h,p;const r=oi(e),n=r.getFullYear(),i=oy(),a=(t==null?void 0:t.firstWeekContainsDate)??((d=(f=t==null?void 0:t.locale)==null?void 0:f.options)==null?void 0:d.firstWeekContainsDate)??i.firstWeekContainsDate??((p=(h=i.locale)==null?void 0:h.options)==null?void 0:p.firstWeekContainsDate)??1,o=Os(e,0);o.setFullYear(n+1,0,a),o.setHours(0,0,0,0);const s=bf(o,t),c=Os(e,0);c.setFullYear(n,0,a),c.setHours(0,0,0,0);const u=bf(c,t);return r.getTime()>=s.getTime()?n+1:r.getTime()>=u.getTime()?n:n-1}function g1e(e,t){var s,c,u,f;const r=oy(),n=(t==null?void 0:t.firstWeekContainsDate)??((c=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:c.firstWeekContainsDate)??r.firstWeekContainsDate??((f=(u=r.locale)==null?void 0:u.options)==null?void 0:f.firstWeekContainsDate)??1,i=sF(e,t),a=Os(e,0);return a.setFullYear(i,0,n),a.setHours(0,0,0,0),bf(a,t)}function v1e(e,t){const r=oi(e),n=+bf(r,t)-+g1e(r,t);return Math.round(n/aF)+1}function Je(e,t){const r=e<0?"-":"",n=Math.abs(e).toString().padStart(t,"0");return r+n}const ka={y(e,t){const r=e.getFullYear(),n=r>0?r:1-r;return Je(t==="yy"?n%100:n,t.length)},M(e,t){const r=e.getMonth();return t==="M"?String(r+1):Je(r+1,2)},d(e,t){return Je(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 Je(e.getHours()%12||12,t.length)},H(e,t){return Je(e.getHours(),t.length)},m(e,t){return Je(e.getMinutes(),t.length)},s(e,t){return Je(e.getSeconds(),t.length)},S(e,t){const r=t.length,n=e.getMilliseconds(),i=Math.trunc(n*Math.pow(10,r-3));return Je(i,t.length)}},Qs={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},YC={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(),i=n>0?n:1-n;return r.ordinalNumber(i,{unit:"year"})}return ka.y(e,t)},Y:function(e,t,r,n){const i=sF(e,n),a=i>0?i:1-i;if(t==="YY"){const o=a%100;return Je(o,2)}return t==="Yo"?r.ordinalNumber(a,{unit:"year"}):Je(a,t.length)},R:function(e,t){const r=oF(e);return Je(r,t.length)},u:function(e,t){const r=e.getFullYear();return Je(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 Je(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 Je(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 ka.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 Je(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 i=v1e(e,n);return t==="wo"?r.ordinalNumber(i,{unit:"week"}):Je(i,t.length)},I:function(e,t,r){const n=m1e(e);return t==="Io"?r.ordinalNumber(n,{unit:"week"}):Je(n,t.length)},d:function(e,t,r){return t==="do"?r.ordinalNumber(e.getDate(),{unit:"date"}):ka.d(e,t)},D:function(e,t,r){const n=p1e(e);return t==="Do"?r.ordinalNumber(n,{unit:"dayOfYear"}):Je(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 i=e.getDay(),a=(i-n.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return Je(a,2);case"eo":return r.ordinalNumber(a,{unit:"day"});case"eee":return r.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(i,{width:"short",context:"formatting"});case"eeee":default:return r.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,r,n){const i=e.getDay(),a=(i-n.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return Je(a,t.length);case"co":return r.ordinalNumber(a,{unit:"day"});case"ccc":return r.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(i,{width:"narrow",context:"standalone"});case"cccccc":return r.day(i,{width:"short",context:"standalone"});case"cccc":default:return r.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,r){const n=e.getDay(),i=n===0?7:n;switch(t){case"i":return String(i);case"ii":return Je(i,t.length);case"io":return r.ordinalNumber(i,{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 i=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(e,t,r){const n=e.getHours();let i;switch(n===12?i=Qs.noon:n===0?i=Qs.midnight:i=n/12>
vendor: 4,427 bytes, line 707
707=1?"pm":"am",t){case"b":case"bb":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,r){const n=e.getHours();let i;switch(n>=17?i=Qs.evening:n>=12?i=Qs.afternoon:n>=4?i=Qs.morning:i=Qs.night,t){case"B":case"BB":case"BBB":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(i,{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 ka.h(e,t)},H:function(e,t,r){return t==="Ho"?r.ordinalNumber(e.getHours(),{unit:"hour"}):ka.H(e,t)},K:function(e,t,r){const n=e.getHours()%12;return t==="Ko"?r.ordinalNumber(n,{unit:"hour"}):Je(n,t.length)},k:function(e,t,r){let n=e.getHours();return n===0&&(n=24),t==="ko"?r.ordinalNumber(n,{unit:"hour"}):Je(n,t.length)},m:function(e,t,r){return t==="mo"?r.ordinalNumber(e.getMinutes(),{unit:"minute"}):ka.m(e,t)},s:function(e,t,r){return t==="so"?r.ordinalNumber(e.getSeconds(),{unit:"second"}):ka.s(e,t)},S:function(e,t){return ka.S(e,t)},X:function(e,t,r){const n=e.getTimezoneOffset();if(n===0)return"Z";switch(t){case"X":return QC(n);case"XXXX":case"XX":return Uo(n);case"XXXXX":case"XXX":default:return Uo(n,":")}},x:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"x":return QC(n);case"xxxx":case"xx":return Uo(n);case"xxxxx":case"xxx":default:return Uo(n,":")}},O:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+XC(n,":");case"OOOO":default:return"GMT"+Uo(n,":")}},z:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+XC(n,":");case"zzzz":default:return"GMT"+Uo(n,":")}},t:function(e,t,r){const n=Math.trunc(e.getTime()/1e3);return Je(n,t.length)},T:function(e,t,r){const n=e.getTime();return Je(n,t.length)}};function XC(e,t=""){const r=e>0?"-":"+",n=Math.abs(e),i=Math.trunc(n/60),a=n%60;return a===0?r+String(i):r+String(i)+t+Je(a,2)}function QC(e,t){return e%60===0?(e>0?"-":"+")+Je(Math.abs(e)/60,2):Uo(e,t)}function Uo(e,t=""){const r=e>0?"-":"+",n=Math.abs(e),i=Je(Math.trunc(n/60),2),a=Je(n%60,2);return r+i+t+a}const ZC=(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"})}},lF=(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"})}},y1e=(e,t)=>{const r=e.match(/(P+)(p+)?/)||[],n=r[1],i=r[2];if(!i)return ZC(e,t);let a;switch(n){case"P":a=t.dateTime({width:"short"});break;case"PP":a=t.dateTime({width:"medium"});break;case"PPP":a=t.dateTime({width:"long"});break;case"PPPP":default:a=t.dateTime({width:"full"});break}return a.replace("{{date}}",ZC(n,t)).replace("{{time}}",lF(i,t))},x1e={p:lF,P:y1e},b1e=/^D+$/,w1e=/^Y+$/,S1e=["D","DD","YY","YYYY"];function j1e(e){return b1e.test(e)}function P1e(e){return w1e.test(e)}function N1e(e,t,r){const n=_1e(e,t,r);if(console.warn(n),S1e.includes(e))throw new RangeError(n)}function _1e(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 O1e=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,E1e=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,k1e=/^'([^]*?)'?$/,C1e=/''/g,A1e=/[a-zA-Z]/;function Fx(e,t,r){var f,d,h,p;const n=oy(),i=n.locale??h1e,a=n.firstWeekContainsDate??((d=(f=n.locale)==null?void 0:f.options)==null?void 0:d.firstWeekContainsDate)??1,o=n.weekStartsOn??((p=(h=n.locale)==null?void 0:h.options)==null?void 0:p.weekStartsOn)??0,s=oi(e);if(!Mwe(s))throw new RangeError("Invalid time value");let c=t.match(E1e).map(g=>{const m=g[0];if(m==="p"||m==="P"){const y=x1e[m];return y(g,i.formatLong)}return g}).join("").match(O1e).map(g=>{if(g==="''")return{isToken:!1,value:"'"};const m=g[0];if(m==="'")return{isToken:!1,value:T1e(g)};if(YC[m])return{isToken:!0,value:g};
707if(m.match(A1e))throw new RangeError("Format string contains an unescaped latin alphabet character `"+m+"`");return{isToken:!1,value:g}});i.localize.preprocessor&&(c=i.localize.preprocessor(s,c));const u={firstWeekContainsDate:a,weekStartsOn:o,locale:i};return c.map(g=>{if(!g.isToken)return g.value;const m=g.value;(P1e(m)||j1e(m))&&N1e(m,t,String(e));const y=YC[m[0]];return y(s,m,i.localize,u)}).join("")}function T1e(e){const t=e.match(k1e);return t?t[1].replace(C1e,"'"):e}const M1e=({userId:e})=>{const[t,r]=v.useState([]),[n,i]=v.useState({grammar:0,vocabulary:0,pronunciation:0,fluency:0}),[a,o]=v.useState([]),[s,c]=v.useState(null);v.useEffect(()=>{(async()=>{if(e)try{const m=(await ut.getSessionsByUserId(e)).filter(y=>y.type==="speaking"||y.type==="pronunciation").sort((y,x)=>new Date(x.date).getTime()-new Date(y.date).getTime());if(r(m),m.length>0){const y=m.reduce((w,S)=>{if(S.feedback&&typeof S.feedback=="string")try{const j=JSON.parse(S.feedback);w.grammar+=j.grammar||0,w.vocabulary+=j.vocabulary||0,w.pronunciation+=j.pronunciation||0,w.fluency+=j.fluency||0,w.count++}catch(j){console.error("Error parsing feedback:",j)}return w},{grammar:0,vocabulary:0,pronunciation:0,fluency:0,count:0});y.count>0&&i({grammar:Math.round(y.grammar/y.count),vocabulary:Math.round(y.vocabulary/y.count),pronunciation:Math.round(y.pronunciation/y.count),fluency:Math.round(y.fluency/y.count)});const b=m.slice(0,7).reverse().map(w=>{let S=0,j=0,P=0,N=0;if(w.feedback&&typeof w.feedback=="string")try{const _=JSON.parse(w.feedback);S=_.grammar||0,j=_.vocabulary||0,P=_.pronunciation||0,N=_.fluency||0}catch(_){console.error("Error parsing feedback for chart:",_)}return{date:Fx(new Date(w.date),"MMM dd"),grammar:S,vocabulary:j,pronunciation:P,fluency:N}});o(b)}}catch(g){console.error("Error loading sessions:",g)}})()},[e]);const[u,f]=v.useState(null);v.useEffect(()=>{const p=new Audio;return p.addEventListener("ended",()=>c(null)),f(p),()=>{p.pause(),p.src="",p.removeEventListener("ended",()=>c(null))}},[]);const d=(p,g)=>{s&&(kt.stop(),u&&(u.pause(),u.src=""),c(null)),s!==g&&u&&p&&(u.src=p,u.play().catch(m=>console.error("Error playing audio:",m)),c(g))},h=(p,g)=>{if(p.feedback&&typeof p.feedback=="string")try{return JSON.parse(p.feedback)[g]||"-"}catch{return"-"}return"-"};return l.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[l.jsxs("div",{className:"lg:col-span-2",children:[l.jsxs(ne,{className:"glass-panel",children:[l.jsxs(ce,{children:[l.jsxs(he,{className:"text-xl font-display flex items-center gap-2",children:[l.jsx(zW,{className:"h-5 w-5"}),"Your Progress"]}),l.jsx(ke,{children:"Track your improvement over time"})]}),l.jsxs(ie,{className:"space-y-6",children:[l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{children:[l.jsxs("div",{className:"flex justify-between mb-1",children:[l.jsx("span",{className:"text-sm font-medium",children:"Grammar"}),l.jsxs("span",{className:"text-sm font-medium",children:[n.grammar,"%"]})]}),l.jsx(lr,{value:n.grammar,className:"h-2"})]}),l.jsxs("div",{children:[l.jsxs("div",{className:"flex justify-between mb-1",children:[l.jsx("span",{className:"text-sm font-medium",children:"Vocabulary"}),l.jsxs("span",{className:"text-sm font-medium",children:[n.vocabulary,"%"]})]}),l.jsx(lr,{value:n.vocabulary,className:"h-2"})]}),l.jsxs("div",{children:[l.jsxs("div",{className:"flex justify-between mb-1",children:[l.jsx("span",{className:"text-sm font-medium",children:"Pronunciation"}),l.jsxs("span",{className:"text-sm font-medium",children:[n.pronunciation,"%"]})]}),l.jsx(lr,{value:n.pronunciation,className:"h-2"})]}),l.jsxs("div",{children:[l.jsxs("div",{className:"flex justify-between mb-1",children:[l.jsx("span",{className:"text-sm font-medium",children:"Fluency"}),l.jsxs("span",{className:"text-sm font-medium",children:[n.fluency,"%"]})]}),l.jsx(lr,{value:n.fluency,className:"h-2"})]})]}),a.length>0&&l.jsx("div",{className:"pt-4",children:l.jsx(hP,{data:a,title:"Recent Performance",description:"Your last 7 practice sessions"})})]})]}),l.jsxs(ne,{className:"glass-panel mt-6",children:[l.jsxs(ce,{children:[l.jsxs(he,{className:"text-xl font-display flex items-center gap-2",children:[l.jsx(Xp,{className:"h-5 w-5"}),"Practice History"]}),l.jsx(ke,{children:"All your speaking practice sessions"})]}
707),l.jsx(ie,{children:l.jsxs(rF,{children:[l.jsx(nF,{children:l.jsxs(vp,{children:[l.jsx(Ta,{children:"Date"}),l.jsx(Ta,{children:"Type"}),l.jsx(Ta,{children:"Grammar"}),l.jsx(Ta,{children:"Vocabulary"}),l.jsx(Ta,{children:"Pronunciation"}),l.jsx(Ta,{children:"Fluency"}),l.jsx(Ta,{children:"Recording"})]})}),l.jsx(iF,{children:t.length>0?t.map(p=>l.jsxs(vp,{children:[l.jsxs(Fi,{className:"font-medium",children:[Fx(new Date(p.date),"MMM dd, yyyy"),l.jsx("div",{className:"text-xs text-muted-foreground",children:Fx(new Date(p.date),"h:mm a")})]}),l.jsx(Fi,{children:l.jsx("span",{className:"capitalize",children:p.type})}),l.jsx(Fi,{children:h(p,"grammar")}),l.jsx(Fi,{children:h(p,"vocabulary")}),l.jsx(Fi,{children:h(p,"pronunciation")}),l.jsx(Fi,{children:h(p,"fluency")}),l.jsx(Fi,{children:p.recordingUrl?l.jsx(Y,{variant:"ghost",size:"sm",onClick:()=>d(p.recordingUrl||"",p.id),className:s===p.id?"text-primary":"",children:s===p.id?l.jsxs(l.Fragment,{children:[l.jsx(HM,{className:"h-4 w-4 mr-1"}),"Playing..."]}):l.jsxs(l.Fragment,{children:[l.jsx(Cn,{className:"h-4 w-4 mr-1"}),"Play"]})}):l.jsx("span",{className:"text-xs text-muted-foreground",children:"No recording"})})]},p.id)):l.jsx(vp,{children:l.jsx(Fi,{colSpan:7,className:"text-center py-4 text-muted-foreground",children:"No practice sessions recorded yet. Complete some practice exercises to see your progress."})})})]})})]})]}),l.jsxs("div",{children:[l.jsx(tF,{currentUserId:e||void 0}),l.jsxs(ne,{className:"glass-panel mt-6",children:[l.jsx(ce,{children:l.jsxs(he,{className:"text-lg font-display flex items-center gap-2",children:[l.jsx(Zp,{className:"h-5 w-5"}),"Practice Statistics"]})}),l.jsx(ie,{children:l.jsxs("div",{className:"space-y-3",children:[l.jsxs("div",{className:"flex justify-between",children:[l.jsx("span",{className:"text-sm",children:"Total Sessions"}),l.jsx("span",{className:"font-medium",children:t.length})]}),l.jsxs("div",{className:"flex justify-between",children:[l.jsx("span",{className:"text-sm",children:"Speaking Sessions"}),l.jsx("span",{className:"font-medium",children:t.filter(p=>p.type==="speaking").length})]}),l.jsxs("div",{className:"flex justify-between",children:[l.jsx("span",{className:"text-sm",children:"Pronunciation Sessions"}),l.jsx("span",{className:"font-medium",children:t.filter(p=>p.type==="pronunciation").length})]}),l.jsxs("div",{className:"flex justify-between",children:[l.jsx("span",{className:"text-sm",children:"Average Score"}),l.jsxs("span",{className:"font-medium",children:[Math.round((n.grammar+n.vocabulary+n.pronunciation+n.fluency)/4),"%"]})]}),l.jsxs("div",{className:"flex justify-between",children:[l.jsx("span",{className:"text-sm",children:"Best Category"}),l.jsx("span",{className:"font-medium",children:Object.entries(n).sort((p,g)=>g[1]-p[1])[0][0].charAt(0).toUpperCase()+Object.entries(n).sort((p,g)=>g[1]-p[1])[0][0].slice(1)})]})]})})]})]})]})},I1e=({feedback:e})=>e?l.jsxs(ne,{className:"glass-panel mt-6",children:[l.jsxs(ce,{children:[l.jsx(he,{className:"text-xl font-display",children:"Grammar Rule Highlights"}),l.jsx(ke,{children:"Learn from the corrections in your speech"})]}),l.jsx(ie,{children:l.jsx(ri,{className:"max-h-64",children:l.jsx("div",{className:"space-y-4",children:e.corrections.map((t,r)=>l.jsxs("div",{className:"p-3 rounded-lg border border-border",children:[l.jsxs("div",{className:"flex items-start gap-3 mb-2",children:[l.jsx(Kt,{variant:"outline",className:"mt-1 whitespace-nowrap",children:t.rule||"Grammar Rule"}),l.jsxs("div",{children:[l.jsx("p",{className:"line-through text-muted-foreground",children:t.original}),l.jsx("p",{className:"font-medium text-green-600",children:t.corrected})]})]}),l.jsx("p",{className:"text-sm text-muted-foreground",children:t.explanation})]},r))})})})]}):null,$1e=()=>{const[e,t]=v.useState(null),[r,n]=v.useState(!1),[i,a]=v.useState(null),[o,s]=v.useState(null),[c,u]=v.useState([]),[f,d]=v.useState(null),[h,p]=v.useState(""),[g,m]=v.useState(!1),[y,x]=v.useState(null),b=v.useRef(null),w=v.useRef(null),S=v.useRef([]),{toast:j}=Ct();v.useEffect(()=>{(async()=>{const $=await ut.getUsers();if($.length>0)a($[0].id),s($[0].name);else{const R=await ut.createUser({name:"Demo User",email:"[email protected]",password:"password123",points:0,level:1,xp:0,lastLogin:new Date().toISOString(),preferences:{theme:"light",language:"en",notifications:!0}});a(R.id),s(R.name)}})()},[]),v.useEffect(()=>
707{i&&(async()=>{if(i){const $=await ut.createSession({userId:i,type:"speaking",score:0,duration:0,date:new Date().toISOString()});d($.id)}})()},[i]);const P=()=>{if(!("webkitSpeechRecognition"in window)&&!("SpeechRecognition"in window)){j({title:"Speech Recognition Not Supported",description:"Your browser doesn't support speech recognition. Please try a different browser.",variant:"destructive"});return}try{p(""),x(null),N();const T=window.SpeechRecognition||window.webkitSpeechRecognition;b.current=new T,b.current.continuous=!0,b.current.interimResults=!0,b.current.lang="en-US",b.current.onresult=$=>{let R="",U="";for(let A=$.resultIndex;A<$.results.length;++A)$.results[A].isFinal?U+=$.results[A][0].transcript:R+=$.results[A][0].transcript;p(U+R)},b.current.onerror=$=>{console.error("Speech recognition error",$.error),$.error!=="no-speech"&&j({title:"Recognition Error",description:`Error: ${$.error}. Please try again.`,variant:"destructive"})},b.current.onend=()=>{g&&b.current.start()},b.current.start(),m(!0),j({title:"Transcription Started",description:"Start speaking clearly. Your speech is being transcribed and recorded."})}catch(T){console.error("Error starting transcription:",T),j({title:"Transcription Error",description:"Could not start speech recognition",variant:"destructive"})}},N=async()=>{try{const T=await navigator.mediaDevices.getUserMedia({audio:!0}),$=new MediaRecorder(T);w.current=$,S.current=[],$.ondataavailable=R=>{R.data.size>0&&S.current.push(R.data)},$.onstop=()=>{const R=new Blob(S.current,{type:"audio/wav"}),U=URL.createObjectURL(R);x(U),T.getTracks().forEach(A=>A.stop())},$.start()}catch(T){console.error("Error starting audio recording:",T),j({title:"Recording Error",description:"Could not access your microphone",variant:"destructive"})}},_=()=>{b.current&&(b.current.stop(),m(!1),w.current&&w.current.state!=="inactive"&&w.current.stop(),j({title:"Transcription Stopped",description:"Your speech has been transcribed. Click 'Analyze' to get feedback."}))},O=()=>{g?_():P()},k=async()=>{if(!h||h.trim()===""){j({title:"No Speech Detected",description:"Please speak something before analyzing.",variant:"destructive"});return}try{n(!0),j({title:"Analyzing Speech",description:"Processing your transcription with Gemini AI..."});const T=Un.SPEAKING_PRACTICE||Un.DEFAULT||"AIzaSyAmDT5Up2xciEHkFMYOez6ZLk5ZFIMWh74";console.log("Sending transcription to Gemini API:",h);const $=await _n.generateFeedback(h,"speaking");if(console.log("Received response from Gemini API:",$),$.scores){const R={pronunciation:$.scores.pronunciation||0,grammar:$.scores.grammar||0,vocabulary:$.scores.vocabulary||0,fluency:$.scores.fluency||0,overall:$.scores.overall||0,suggestions:$.scores.suggestions||[],corrections:($.scores.corrections||[]).map(U=>({original:U.original||"",corrected:U.corrected||"",explanation:U.explanation||"",rule:U.rule||"Grammar Rule"})),summary:$.scores.summary||"You've done a good job overall, but there's room for improvement.",originalText:h,correctedText:$.scores.correctedText||h,grammarAnalysis:$.scores.grammarAnalysis||"Grammar analysis not available.",practiceExamples:$.scores.practiceExamples||[]};t(R),C(R)}else throw new Error("Invalid response format from Gemini API")}catch(T){console.error("Error analyzing speech:",T),j({title:"Analysis Error",description:"Could not analyze your speech with Gemini. Please try again.",variant:"destructive"}),kt.playErrorSound()}finally{n(!1)}},C=async T=>{if(j({title:"Analysis Complete",description:"Your speech has been analyzed successfully."}),f)try{const $=T.corrections.map(A=>({id:"",sessionId:f,original:A.original,corrected:A.corrected,rule:A.rule||"General",explanation:A.explanation}));for(const A of $)await ut.createCorrection(A);const U=(await ut.getSessions()).find(A=>A.id===f);U&&(U.score=T.overall,U.feedback=JSON.stringify({grammar:T.grammar,vocabulary:T.vocabulary,pronunciation:T.pronunciation,fluency:T.fluency,overall:T.overall,summary:T.summary}),y&&(U.recordingUrl=y),await ut.updateSession(U),i&&T.overall>=80&&!c.includes("practice_complete")&&(await I({type:"practice_complete",userId:i}),u(A=>[...A,"practice_complete"]),j({title:"Achievement Unlocked!",description:"You earned points for completing a practice session."}),kt.playSuccessSound()),i&&T.grammar>=85&&!c.includes("grammar_mastery")&&(await I({type:"grammar_mastery",userId:i}),u(A=>[...A,"grammar_mastery"]),j({title:"Grammar Mastery!",description:"You earned points for excellent grammar skills."})),i&&T.pronunciation>=85&&!c.includes("pronunciation_mastery")&&(await I({type:"pronunciation_mastery",userId:i}),u(A=>[...A,"pronunciation_mastery"]),j({title:"Pronunciation Master!",description:"Your excellent pronunciation earned you rewards!"})))}catch($){console.error("Error saving to database:",$)}},E=async T=>
707{i&&T>=85&&!c.includes("pronunciation_mastery")&&(await I({type:"pronunciation_mastery",userId:i}),u($=>[...$,"pronunciation_mastery"]),j({title:"Pronunciation Mastery!",description:"You earned points for excellent pronunciation."}))},I=async({type:T,userId:$})=>{try{const R=await ut.getUserById($);if(!R)return;let U=0;switch(T){case"practice_complete":U=50;break;case"grammar_mastery":U=75;break;case"pronunciation_mastery":U=75;break;default:U=10}R.points+=U,R.xp+=U;const A=Math.floor(R.xp/100)+1,D=A>R.level;R.level=A,await ut.updateUser(R),D&&(j({title:"Level Up!",description:`You've reached level ${A}!`}),kt.playSuccessSound()),await ut.createCommunityPost({userId:$,userName:R.name,userLevel:R.level,content:`Earned ${U} points for ${T}`,likes:0,comments:0})}catch(R){console.error("Error granting reward:",R)}};return{feedback:e,isAnalyzing:r,userId:i,userName:o,completedTasks:c,transcribedText:h,isTranscribing:g,audioRecording:y,handlePronunciationScoreUpdate:E,toggleTranscription:O,analyzeTranscription:k}},R1e=[{id:"introduction",title:"Self Introduction",prompt:"Introduce yourself. Talk about your name, where you're from, your job or studies, and your hobbies."},{id:"describe-home",title:"Describe Your Home",prompt:"Describe your home or apartment. Talk about its location, rooms, and what you like about it."},{id:"favorite-food",title:"Favorite Food",prompt:"Talk about your favorite food. Describe what it is, why you like it, and how it's prepared."},{id:"travel",title:"Travel Experience",prompt:"Describe a memorable trip or vacation. Where did you go? What did you do? Why was it special?"},{id:"future-plans",title:"Future Plans",prompt:"Discuss your plans for the future. What do you want to achieve in the next 5 years?"}],D1e=()=>{const{feedback:e,isAnalyzing:t,userId:r,userName:n,completedTasks:i,transcribedText:a,isTranscribing:o,handlePronunciationScoreUpdate:s,toggleTranscription:c,analyzeTranscription:u}=$1e();return l.jsxs("div",{className:"min-h-screen bg-background",children:[l.jsx(un,{user:{name:n||"User",email:"[email protected]",avatar:"https://i.pravatar.cc/300?img=47"}}),l.jsx(dn,{}),l.jsx("main",{className:"pt-24 pb-16 pl-72 pr-6 max-sm:pl-6",children:l.jsx(ri,{className:"h-[calc(100vh-10rem)]",children:l.jsx("div",{className:"max-w-7xl mx-auto animate-fade-in",children:l.jsxs("section",{className:"mb-8",children:[l.jsx("h1",{className:"text-3xl font-display font-semibold mb-2",children:"Speaking Practice"}),l.jsx("p",{className:"text-muted-foreground mb-6",children:"Improve your pronunciation and fluency through guided practice with AI feedback."}),l.jsxs(ki,{defaultValue:"practice",className:"w-full",children:[l.jsxs(Ci,{className:"grid w-full max-w-md grid-cols-3 mb-6",children:[l.jsx(at,{value:"practice",children:"Practice"}),l.jsx(at,{value:"pronunciation",children:"Pronunciation"}),l.jsx(at,{value:"progress",children:"Progress"})]}),l.jsxs(ot,{value:"practice",className:"space-y-6",children:[l.jsxs(ne,{className:"glass-panel mb-6",children:[l.jsx(ce,{className:"pb-2",children:l.jsxs(he,{className:"text-xl font-display flex items-center gap-2",children:[l.jsx(kW,{className:"h-5 w-5 text-primary"}),"How to Use Speaking Practice"]})}),l.jsx(ie,{children:l.jsxs("ol",{className:"list-decimal pl-5 space-y-2",children:[l.jsx("li",{children:"Choose a topic from the list below or speak freely on any subject."}),l.jsx("li",{children:"Click the microphone button to start transcribing your speech."}),l.jsx("li",{children:"Speak clearly about your chosen topic."}),l.jsx("li",{children:"Click the square button to stop transcribing when finished."}),l.jsx("li",{children:"Click the analyze button to get detailed AI feedback."}),l.jsx("li",{children:"Review the analysis of your pronunciation, grammar, vocabulary, and fluency."}),l.jsx("li",{children:"Use the suggestions to improve your speaking skills."})]})})]}),l.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[l.jsxs("div",{className:"lg:col-span-2",children:[l.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[l.jsxs(ne,{className:"border border-border p-6",children:[l.jsx(ce,{className:"pb-2 px-0",children:l.jsx(he,{className:"text-lg font-display",children:"Speak & Transcribe"})}),l.jsx(ie,{className:"px-0",children:l.jsx(eF,{isTranscribing:o,isAnalyzing:t,transcribedText:a,onToggleTranscription:c,onAnalyze:u})})]}),l.jsx(Z3,{text:"",customFeedback:e,autoAnalyze:!1,title:"Speech Analysis",description:"AI evaluation of your pronunciation, grammar, vocabulary, and fluency"})]}),l.jsx(I1e,{feedback:e})]}),l.jsxs("div",{className:"space-y-6",children:[l.jsx(tF,{currentUserId:r||void 0,limit:5}
707),l.jsx(Nwe,{completedTasks:i})]})]}),l.jsx(Pwe,{topics:R1e})]}),l.jsx(ot,{value:"pronunciation",className:"space-y-6",children:l.jsx("div",{className:"grid grid-cols-1 gap-6",children:l.jsx(jwe,{onScoreUpdate:s})})}),l.jsx(ot,{value:"progress",className:"space-y-6",children:l.jsx(M1e,{userId:r})})]})]})})})})]})},JC=[{id:"conversation-1",title:"Coffee Shop Conversation",description:"A conversation between a customer and barista at a coffee shop.",audioUrl:"https://storage.googleapis.com/media-session/elephants-dream/the-wires.mp3",transcript:`Customer: Hi, could I get a medium latte please? 708Barista: Sure, would you like that hot or iced? 709Customer: Hot, please. And could I also get a blueberry muffin? 710Barista: Of course. That'll be $7.50. Will that be all for today? 711Customer: Yes, that's it. Thank you. 712Barista: Your order will be ready in just a moment.`,difficulty:"beginner",questions:[{id:"q1",question:"What did the customer order?",options:["A small coffee","A medium latte","A large cappuccino","An iced tea"],correctAnswer:1},{id:"q2",question:"What food item did the customer request?",options:["A chocolate cookie","A croissant","A blueberry muffin","A sandwich"],correctAnswer:2},{id:"q3",question:"How much did the order cost?",options:["$5.50","$6.75","$7.50","$8.25"],correctAnswer:2}]},{id:"news-report",title:"Weather Report",description:"A brief weather forecast for the upcoming week.",audioUrl:"https://storage.googleapis.com/media-session/elephants-dream/the-wires.mp3",transcript:"Good evening! Here's your weather forecast for the week ahead. Tomorrow will be sunny with temperatures reaching 75 degrees. Tuesday brings a slight chance of rain in the afternoon, with temperatures cooling to around 68. By midweek, we're expecting cloudy conditions and possible thunderstorms. The weekend is looking clear and warm, perfect for outdoor activities. Back to you, Jim.",difficulty:"intermediate",questions:[{id:"q1",question:"What will the weather be like tomorrow?",options:["Rainy","Cloudy","Sunny","Snowy"],correctAnswer:2},{id:"q2",question:"When is there a chance of rain?",options:["Monday","Tuesday","Wednesday","Saturday"],correctAnswer:1},{id:"q3",question:"What kind of weather is expected for the weekend?",options:["Stormy","Clear and warm","Windy","Cold and cloudy"],correctAnswer:1}]},{id:"ted-talk",title:"The Importance of Learning",description:"An excerpt from an educational talk about lifelong learning.",audioUrl:"https://storage.googleapis.com/media-session/elephants-dream/the-wires.mp3",transcript:"Learning isn't just something we do in schoolâit's a lifelong journey. The brain is constantly changing, forming new connections when we learn new things. This neuroplasticity means that regardless of age, we can always enhance our cognitive abilities. Studies show that people who continuously learn throughout their lives have better mental health, more social connections, and even live longer. So I encourage you to never stop being curious, never stop questioning, and never stop learning.",difficulty:"advanced",questions:[{id:"q1",question:"According to the speaker, what is neuroplasticity related to?",options:["Physical exercise","Brain forming new connections","Aging process","School curriculum"],correctAnswer:1},{id:"q2",question:"What benefit of lifelong learning is NOT mentioned?",options:["Better mental health","More social connections","Increased wealth","Longer lifespan"],correctAnswer:2},{id:"q3",question:"What does the speaker encourage the audience to maintain?",options:["Financial stability","Curiosity","Physical health","Political awareness"],correctAnswer:1}]}],L1e=()=>{const e={name:"Sarah Johnson",email:"[email protected]",avatar:"https://i.pravatar.cc/300?img=47"},[t,r]=v.useState(null),[n,i]=v.useState(!1),[a,o]=v.useState(!1),[s,c]=v.useState(!1),[u,f]=v.useState(0),[d,h]=v.useState({}),[p,g]=v.useState(!1),[m,y]=v.useState(null),[x,b]=v.useState("all"),w=v.useRef(null),S=x==="all"?JC:JC.filter(E=>E.difficulty===x),j=E=>{r(E),i(!1),f(0),h({}),g(!1),c(!1),y(null)},P=()=>{w.current&&(n?w.current.pause():w.current.play(),i(!n))},N=()=>{w.current&&(w.current.muted=!a,o(!a))},_=()=>{w.current&&(w.current.currentTime=0,w.current.play(),i(!0))},O=()=>
712{if(w.current){const E=w.current.currentTime/w.current.duration*100;f(E)}},k=(E,I)=>{p||h({...d,[E]:I})},C=()=>{if(g(!0),t){const E=t.questions.length,I=t.questions.filter(R=>d[R.id]===R.correctAnswer).length,T=Math.round(I/E*100),$={pronunciation:0,grammar:0,vocabulary:75+Math.floor(Math.random()*15),fluency:0,overall:T,suggestions:["Try to listen for context clues when you're unsure about specific details.","Focus on understanding the main ideas first, then the details.","Practice with different accents to improve your comprehension."],corrections:[{original:"",corrected:"",explanation:`You answered ${I} out of ${E} questions correctly.`,rule:"Listening Comprehension"}]};y($)}};return l.jsxs("div",{className:"min-h-screen bg-background",children:[l.jsx(un,{user:e}),l.jsx(dn,{}),l.jsx("main",{className:"pt-24 pb-16 pl-72 pr-6",children:l.jsx("div",{className:"max-w-7xl mx-auto animate-fade-in",children:l.jsxs("section",{className:"mb-8",children:[l.jsx("h1",{className:"text-3xl font-display font-semibold mb-2",children:"Listening Practice"}),l.jsx("p",{className:"text-muted-foreground mb-6",children:"Improve your comprehension with audio exercises."}),l.jsxs(ki,{defaultValue:"exercises",className:"w-full",children:[l.jsxs(Ci,{className:"grid w-full max-w-md grid-cols-2 mb-6",children:[l.jsx(at,{value:"exercises",children:"Exercises"}),l.jsx(at,{value:"history",children:"Your History"})]}),l.jsx(ot,{value:"exercises",className:"space-y-6",children:t?l.jsxs("div",{className:"space-y-6",children:[l.jsxs(ne,{className:"glass-panel",children:[l.jsx(ce,{children:l.jsxs("div",{className:"flex justify-between items-start",children:[l.jsxs("div",{children:[l.jsx(he,{className:"text-xl font-display",children:t.title}),l.jsx(ke,{children:t.description})]}),l.jsx(Y,{variant:"outline",size:"sm",onClick:()=>r(null),children:"Back to List"})]})}),l.jsx(ie,{children:l.jsxs("div",{className:"space-y-4",children:[l.jsx("div",{className:"relative h-2 bg-secondary rounded-full overflow-hidden",children:l.jsx("div",{className:"absolute h-full bg-primary",style:{width:`${u}%`}})}),l.jsxs("div",{className:"flex justify-center space-x-4",children:[l.jsx(Y,{size:"icon",variant:"outline",onClick:_,children:l.jsx(UW,{className:"h-4 w-4"})}),l.jsx(Y,{size:"icon",onClick:P,children:n?l.jsx(HM,{className:"h-4 w-4"}):l.jsx(s0,{className:"h-4 w-4"})}),l.jsx(Y,{size:"icon",variant:"outline",onClick:N,children:a?l.jsx(YM,{className:"h-4 w-4"}):l.jsx(Cn,{className:"h-4 w-4"})}),l.jsx(Y,{size:"icon",variant:"outline",onClick:()=>c(!s),children:l.jsx(go,{className:"h-4 w-4"})})]}),l.jsx("audio",{ref:w,src:t.audioUrl,onTimeUpdate:O,onEnded:()=>i(!1),className:"hidden"})]})})]}),s&&l.jsxs(ne,{className:"glass-panel",children:[l.jsx(ce,{children:l.jsx(he,{className:"text-lg font-display",children:"Transcript"})}),l.jsx(ie,{children:l.jsx("div",{className:"p-4 rounded-xl border border-border bg-background/50 whitespace-pre-line",children:t.transcript})})]}),l.jsxs(ne,{className:"glass-panel",children:[l.jsx(ce,{children:l.jsx(he,{className:"text-lg font-display",children:"Comprehension Questions"})}),l.jsx(ie,{children:l.jsx("div",{className:"space-y-6",children:t.questions.map((E,I)=>l.jsxs("div",{className:"space-y-3",children:[l.jsxs("h4",{className:"font-medium",children:[I+1,". ",E.question]}),l.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-2",children:E.options.map((T,$)=>l.jsx("div",{className:G("p-3 rounded-lg border cursor-pointer transition-all",d[E.id]===$&&!p&&"border-primary bg-primary/10",p&&$===E.correctAnswer&&"border-green-500 bg-green-100 text-green-800",p&&d[E.id]===$&&$!==E.correctAnswer&&"border-red-500 bg-red-100 text-red-800"),onClick:()=>k(E.id,$),children:T},$))})]},E.id))})}),l.jsx(jt,{children:l.jsx(Y,{onClick:C,disabled:p||Object.keys(d).length<t.questions.length,className:"w-full",children:p?"Submitted":"Check Answers"})})]}),m&&l.jsxs("div",{className:"mt-6",children:[l.jsx("h3",{className:"text-xl font-display font-medium mb-4",children:"Performance Analysis"}),l.jsx(Z3,{text:"",onFeedbackComplete:()=>{},customFeedback:m})]})]}):l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"flex items-center justify-between mb-4",children:[l.jsx("h2",{className:"text-xl font-display font-medium",children:"Available Exercises"}),l.jsxs("div",{className:"flex space-x-2",children:[l.jsx(Y,{variant:x==="all"?"default":"outline",size:"sm",onClick:()=>b("all"),children:"All"}),l.jsx(Y,{variant:x==="beginner"?"default":"outline",size:"sm",onClick:()=>b("beginner"),children:"Beginner"}),l.jsx(Y,{variant:x==="intermediate"?"default":"outline",size:"sm",onClick:()=>b("intermediate"),children:"Intermediate"}),l.jsx(Y,{variant:x==="advanced"?"default":"outline",size:"sm",onClick:()=>b("advanced"),children:"Advanced"})]})]}),l.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:S.map(E=>l.jsxs(ne,{className:"glass-panel hover:shadow-lg transition-all",children:[l.jsxs(ce,{children:[l.jsxs("div",{className:"flex justify-between items-start",children:[l.jsx(he,{className:"text-lg font-display",children:E.title}),l.jsx("span",{className:G("text-xs px-2 py-1 rounded-full",E.difficulty==="beginner"&&"bg-green-100 text-green-800",E.difficulty==="intermediate"&&"bg-blue-100 text-blue-800",E.difficulty==="advanced"&&"bg-purple-100 text-purple-800"),children:E.difficulty.charAt(0).toUpperCase()+E.difficulty.slice(1)})]}),l.jsx(ke,{children:E.description})]}),l.jsx(jt,{children:l.jsx(Y,{className:"w-full",onClick:()=>j(E),children:"Start Exercise"})})]},E.id))})]})}),l.jsx(ot,{value:"history",children:l.jsxs(ne,{className:"glass-panel",children:[l.jsxs(ce,{children:[l.jsx(he,{className:"text-lg font-display",children:"Your Listening History"}),l.jsx(ke,{children:"Track your progress over time"})]}),l.jsx(ie,{children:l.jsx("div",{className:"text-center p-6 text-muted-foreground",children:l.jsx("p",{children:"Complete listening exercises to see your history and progress here."})})})]})})]})]})})})]})},gP=v.forwardRef(({className:e,...t},r)=>l.jsx("textarea",{className:G("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm r
712ing-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}));gP.displayName="Textarea";const F1e=()=>{var S;const[e,t]=v.useState(""),[r,n]=v.useState(null),[i,a]=v.useState(null),{toast:o}=Ct(),s=gS(),c="1",{data:u=[],isLoading:f}=co({queryKey:["community-posts"],queryFn:()=>ut.getCommunityPosts()}),{data:d}=co({queryKey:["user",c],queryFn:()=>ut.getUserById(c)}),h=b8({mutationFn:j=>{if(!d)throw new Error("User not logged in");return ut.createCommunityPost({userId:d.id,userName:d.name,userLevel:d.level,content:j,likes:0,comments:0,imageUrl:i||void 0})},onSuccess:()=>{s.invalidateQueries({queryKey:["community-posts"]}),t(""),n(null),a(null),o({title:"Post Created",description:"Your post has been shared with the community"})}}),p=()=>{if(!e.trim()&&!i){o({title:"Empty Post",description:"Please write something or add an image before posting",variant:"destructive"});return}h.mutate(e)},g=j=>{if(j.target.files&&j.target.files[0]){const P=j.target.files[0];n(P);const N=new FileReader;N.onloadend=()=>{a(N.result)},N.readAsDataURL(P)}},m=()=>{n(null),a(null)},y=j=>{const P=new Date(j);return new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}).format(P)},x=j=>{o({title:"Post Liked",description:"You liked this post"})},b=j=>{o({title:"Share Post",description:"Sharing functionality will be implemented soon"})},w=j=>{o({title:"Add Comment",description:"Commenting functionality will be implemented soon"})};return l.jsxs("div",{className:"min-h-screen flex flex-col",children:[l.jsx(un,{}),l.jsxs("div",{className:"flex flex-1",children:[l.jsx(dn,{}),l.jsx(ri,{className:"flex-1 h-[calc(100vh-4rem)]",children:l.jsx("main",{className:"pt-16 px-6 pb-8 ml-64",children:l.jsxs("div",{className:"max-w-3xl mx-auto",children:[l.jsxs("div",{className:"flex justify-between items-center mb-8",children:[l.jsxs("div",{children:[l.jsx("h1",{className:"text-3xl font-bold",children:"Community"}),l.jsx("p",{className:"text-muted-foreground",children:"Connect with other language learners"})]}),l.jsxs("div",{className:"flex gap-2",children:[l.jsxs(Y,{variant:"outline",size:"sm",children:[l.jsx(yW,{className:"h-4 w-4 mr-2"}),"Notifications"]}),l.jsxs(Y,{variant:"outline",size:"sm",children:[l.jsx(_S,{className:"h-4 w-4 mr-2"}),"Find Friends"]})]})]}),l.jsxs(ne,{className:"mb-8",children:[l.jsx(ce,{className:"pb-3",children:l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsxs(kd,{children:[l.jsx(Cd,{children:((S=d==null?void 0:d.name)==null?void 0:S.charAt(0))||"A"}),(d==null?void 0:d.avatar)&&l.jsx(Jg,{src:d.avatar})]}),l.jsxs("div",{children:[l.jsx("p",{className:"font-medium",children:(d==null?void 0:d.name)||"Anonymous"}),l.jsxs("p",{className:"text-xs text-muted-foreground",children:["Level ",(d==null?void 0:d.level)||1]})]})]})}),l.jsxs(ie,{className:"pb-3",children:[l.jsx(gP,{placeholder:"Share your language learning experience...",className:"resize-none",value:e,onChange:j=>t(j.target.value)}),i&&l.jsxs("div",{className:"mt-3 relative",children:[l.jsx("img",{src:i,alt:"Preview",className:"max-h-60 rounded-md object-contain"}),l.jsx(Y,{variant:"destructive",size:"icon",className:"absolute top-2 right-2 w-6 h-6",onClick:m,children:"â"})]})]}),l.jsxs(jt,{className:"flex justify-between",children:[l.jsx("div",{children:l.jsxs("label",{htmlFor:"image-upload",className:"cursor-pointer",children:[l.jsxs("div",{className:"flex items-center gap-1 text-primary hover:text-primary/80 transition-colors",children:[l.jsx(VM,{className:"h-5 w-5"}),l.jsx("span",{className:"text-sm",children:"Add Image"})]}),l.jsx("input",{id:"image-upload",type:"file",accept:"image/*",className:"hidden",onChange:g})]})}),l.jsxs(Y,{onClick:p,disabled:h.isPending,className:"flex items-center gap-2",children:[h.isPending?"Posting...":"Post to Community",l.jsx(NS,{className:"h-4 w-4"})]})]})]}),l.jsx("div",{className:"space-y-6",children:f?Array(3).fill(0).map((j,P)=>l.jsxs(ne,{className:"animate-pulse",children:[l.jsx(ce,{className:"pb-3",children:l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("div",{className:"w-10 h-10 rounded-full bg-muted"}),l.jsxs("div",{className:"space-y-2",children:[l.jsx("div",{className:"h-4 w-24 bg-muted rounded"}),l.jsx("div",{className:"h-3 w-12 bg-muted rounded"})]})]})}),l.jsx(ie,{children:l.jsxs("div",{className:"space-y-2",children:[l.jsx("div",{className:"h-4 w-full bg-muted rounded"}),l.jsx("div",{className:"h-4 w-3/4 bg-muted rounded"})]})})]},P)):u.length>0?u.map(j=>l.jsxs(ne,{className:"hover:shadow-md transition-shadow",children:[l.jsx(ce,{className:"pb-3",children:l.jsx("div",{className:"flex justify-between",children:l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx(kd,{children:l.jsx(Cd,{children:j.userName.charAt(0)})}),l.jsxs("div",{children:[l.jsx("p",{className:"font-medium",children:j.userName}),l.jsxs("p",{className:"text-xs text-muted-foreground",children:["Level ",j.userLevel," ⢠",
712y(j.date)]})]})]})})}),l.jsxs(ie,{className:"pb-3",children:[l.jsx("p",{className:"text-sm",children:j.content}),j.imageUrl&&l.jsx("div",{className:"mt-3",children:l.jsx("img",{src:j.imageUrl,alt:"Post content",className:"max-h-80 rounded-md object-contain"})})]}),l.jsx(jt,{className:"border-t pt-3",children:l.jsxs("div",{className:"flex items-center gap-6 text-muted-foreground text-sm w-full",children:[l.jsxs("button",{className:"flex items-center gap-1 hover:text-primary transition-colors",onClick:()=>x(j.id),children:[l.jsx(EW,{className:"h-4 w-4"}),l.jsx("span",{children:j.likes})]}),l.jsxs("button",{className:"flex items-center gap-1 hover:text-primary transition-colors",onClick:()=>w(j.id),children:[l.jsx(go,{className:"h-4 w-4"}),l.jsx("span",{children:j.comments})]}),l.jsxs("button",{className:"flex items-center gap-1 hover:text-primary transition-colors ml-auto",onClick:()=>b(j.id),children:[l.jsx(FW,{className:"h-4 w-4"}),l.jsx("span",{children:"Share"})]})]})})]},j.id)):l.jsxs("div",{className:"text-center py-12",children:[l.jsx(go,{className:"mx-auto h-12 w-12 text-muted-foreground mb-4"}),l.jsx("h3",{className:"text-lg font-medium",children:"No posts yet"}),l.jsx("p",{className:"text-muted-foreground",children:"Be the first to post in the community"})]})})]})})})]})]})},B1e="https://api.dictionaryapi.dev/api/v2/entries/en",vP={async getWordDefinition(e){try{const t=await fetch(`${B1e}/${e.toLowerCase()}`);if(!t.ok)throw new Error("Word not found");return t.json()}catch(t){throw console.error("Dictionary API error:",t),t}}},yp=[{id:"w1",word:"Ubiquitous",partOfSpeech:"adjective",definition:"Present, appearing, or found everywhere.",example:"Mobile phones are now ubiquitous in modern society.",pronunciation:"/juËËbɪkwɪtÉs/",difficulty:"advanced"},{id:"w2",word:"Eloquent",partOfSpeech:"adjective",definition:"Fluent or persuasive in speaking or writing.",example:"She gave an eloquent speech that moved the audience.",pronunciation:"/ËÉlÉkwÉnt/",difficulty:"intermediate"},{id:"w3",word:"Pragmatic",partOfSpeech:"adjective",definition:"Dealing with things sensibly and realistically.",example:"We need a pragmatic approach to solving this problem.",pronunciation:"/præɡËmætɪk/",difficulty:"intermediate"},{id:"w4",word:"Ambiguous",partOfSpeech:"adjective",definition:"Open to more than one interpretation; having a double meaning.",example:"The message was ambiguous and could be interpreted in different ways.",pronunciation:"/æmËbɪɡjuÉs/",difficulty:"intermediate"},{id:"w5",word:"Concise",partOfSpeech:"adjective",definition:"Giving a lot of information clearly and in a few words.",example:"Her writing is always clear and concise.",pronunciation:"/kÉnËsaɪs/",difficulty:"intermediate"},{id:"w6",word:"Enhance",partOfSpeech:"verb",definition:"Intensify, increase, or further improve the quality, value, or extent of.",example:"The new features will enhance the program's usefulness.",pronunciation:"/ɪnËhÉËns/",difficulty:"beginner"},{id:"w7",word:"Fundamental",partOfSpeech:"adjective",definition:"Forming a necessary base or core; of central importance.",example:"The right to free speech is fundamental in a democracy.",pronunciation:"/ËfÊndÉËmÉntl/",difficulty:"beginner"},{id:"w8",word:"Notorious",partOfSpeech:"adjective",definition:"Famous or well known, typically for some bad quality or deed.",example:"He was notorious for his bad temper.",pronunciation:"/noÊËtÉËriÉs/",difficulty:"intermediate"},{id:"w9",word:"Perseverance",partOfSpeech:"noun",definition:"Persistence in doing something despite difficulty or delay in achieving success.",example:"His perseverance was rewarded when he finally passed the exam.",pronunciation:"/ËpÉËrsÉËvɪÉrÉns/",difficulty:"advanced"}],U1e=[{id:"list1",name:"Business English",description:"Essential vocabulary for professional settings",words:yp.slice(0,3)},{id:"list2",name:"Academic Writing",description:"Words commonly used in research papers and essays",words:yp.slice(3,6)},{id:"list3",name:"Daily Conversations",description:"Useful vocabulary for everyday discussions",words:yp.slice(6,9)}],z1e=()=>{const[e,t]=v.useState(""),[r,n]=v.useState([]),[i,a]=v.useState(!1),[o,s]=v.useState([]),[c]=v.useState(U1e),[u,f]=v.useState("all"),[d,h]=v.useState(!1),{toast:p}=Ct(),g=x=>{const b=x.length;return b<=5?"beginner":b<=8?"intermediate":"advanced"};v.useEffect(()=>{const b=setTimeout(async()=>
712{if(!e.trim()){n([]);return}a(!0);try{const S=(await vP.getWordDefinition(e.trim())).map(j=>{var P,N,_,O,k,C,E;return{id:j.word,word:j.word,partOfSpeech:((P=j.meanings[0])==null?void 0:P.partOfSpeech)||"",definition:((_=(N=j.meanings[0])==null?void 0:N.definitions[0])==null?void 0:_.definition)||"",example:(k=(O=j.meanings[0])==null?void 0:O.definitions[0])==null?void 0:k.example,pronunciation:j.phonetic||((C=j.phonetics[0])==null?void 0:C.text)||"",audio:(E=j.phonetics.find(I=>I.audio))==null?void 0:E.audio,difficulty:g(j.word)}});n(S)}catch(w){console.error("Search error:",w),p({title:"Search Error",description:"Could not find the word. Please try again.",variant:"destructive"})}finally{a(!1)}},500);return()=>clearTimeout(b)},[e,p]);const m=x=>{if(x.audio){const b=x.audio.startsWith("//")?`https:${x.audio}`:x.audio;new Audio(b).play().catch(()=>{kt.speak(x.word,{rate:.9,pitch:1,volume:1})})}else kt.speak(x.word,{rate:.9,pitch:1,volume:1})},y=x=>{const b=yp.find(S=>S.id===x);if(!b)return;const w=o.some(S=>S.id===x);s(w?o.filter(S=>S.id!==x):[...o,{...b,isSaved:!0}])};return l.jsxs("div",{className:"min-h-screen bg-background",children:[l.jsx(un,{}),l.jsx(dn,{}),l.jsx("main",{className:"pt-24 pb-16 pl-72 pr-6",children:l.jsx("div",{className:"max-w-7xl mx-auto animate-fade-in",children:l.jsxs("section",{className:"mb-8",children:[l.jsx("h1",{className:"text-3xl font-display font-semibold mb-2",children:"Vocabulary Building"}),l.jsx("p",{className:"text-muted-foreground mb-6",children:"Expand your English vocabulary with our curated word lists."}),l.jsx("div",{className:"relative mb-6",children:l.jsxs("div",{className:G("relative flex items-center transition-all",d?"ring-2 ring-primary ring-offset-2":"ring-1 ring-input","rounded-lg overflow-hidden"),children:[l.jsx(PS,{className:"absolute left-3 h-4 w-4 text-muted-foreground"}),l.jsx(tr,{type:"search",placeholder:"Search for words...",className:"border-0 pl-10 h-12 focus-visible:ring-0 focus-visible:ring-offset-0",value:e,onChange:x=>t(x.target.value),onFocus:()=>h(!0),onBlur:()=>h(!1)})]})}),l.jsxs(ki,{defaultValue:"explore",className:"w-full",children:[l.jsxs(Ci,{className:"grid w-full max-w-md grid-cols-3 mb-6",children:[l.jsx(at,{value:"explore",children:"Explore"}),l.jsx(at,{value:"saved",children:"Saved Words"}),l.jsx(at,{value:"lists",children:"Word Lists"})]}),l.jsxs(ot,{value:"explore",className:"space-y-6",children:[l.jsxs("div",{className:"flex items-center justify-between mb-4",children:[l.jsx("h2",{className:"text-xl font-display font-medium",children:"Browse Vocabulary"}),l.jsxs("div",{className:"flex space-x-2",children:[l.jsx(Y,{variant:u==="all"?"default":"outline",size:"sm",onClick:()=>f("all"),children:"All"}),l.jsx(Y,{variant:u==="beginner"?"default":"outline",size:"sm",onClick:()=>f("beginner"),children:"Beginner"}),l.jsx(Y,{variant:u==="intermediate"?"default":"outline",size:"sm",onClick:()=>f("intermediate"),children:"Intermediate"}),l.jsx(Y,{variant:u==="advanced"?"default":"outline",size:"sm",onClick:()=>f("advanced"),children:"Advanced"})]})]}),l.jsx("div",{className:"grid grid-cols-1 gap-4",children:r.length>0?r.map(x=>l.jsxs(ne,{className:"glass-panel",children:[l.jsxs(ce,{className:"pb-2",children:[l.jsxs("div",{className:"flex justify-between items-start",children:[l.jsxs("div",{className:"flex items-center space-x-2",children:[l.jsx(he,{className:"text-xl font-display",children:x.word}),l.jsx(Y,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:()=>m(x),children:l.jsx(Cn,{className:"h-4 w-4"})})]}),l.jsxs("div",{className:"flex items-center space-x-2",children:[l.jsx("span",{className:G("text-xs px-2 py-1 rounded-full",x.difficulty==="beginner"&&"bg-green-100 text-green-800",x.difficulty==="intermediate"&&"bg-blue-100 text-blue-800",x.difficulty==="advanced"&&"bg-purple-100 text-purple-800"),children:x.difficulty.charAt(0).toUpperCase()+x.difficulty.slice(1)}),l.jsx(Y,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:()=>y(x.id),children:l.jsx(wW,{className:G("h-4 w-4",o.some(b=>b.id===x.id)?"fill-primary":"fill-none")})})]})]}),l.jsxs("div",{className:"text-sm text-muted-foreground italic",children:[x.partOfSpeech," | ",x.pronunciation]})]}),l.jsx(ie,{className:"pb-2",children:l.jsxs("div",{className:"space-y-2",children:[l.jsxs("div",{children:[l.jsx("div",{className:"font-medium text-sm",children:"Definition:"}),l.jsx("p",{children:x.definition})]}),l.jsxs("div",{children:[l.jsx("div",{className:"font-medium text-sm",children:"Example:"}),l.jsx("p",{className:"italic",children:x.example})]})]})}),l.jsx(jt,{children:l.jsx("div",{className:"text-sm text-muted-foreground",children:"Pro tip: Click the bookmark icon to save this word for later review."})})]},x.id)):l.jsx(ne,{className:"glass-panel",children:l.jsxs(ie,{className:"flex flex-col items-center justify-center py-8",children:[l.jsx("div",{className:"text-muted-foreground mb-2",children:"No words foun
712d matching your search criteria."}),l.jsx(Y,{variant:"outline",onClick:()=>{t(""),f("all")},children:"Clear filters"})]})})})]}),l.jsxs(ot,{value:"saved",className:"space-y-6",children:[l.jsx("h2",{className:"text-xl font-display font-medium mb-4",children:"Your Saved Words"}),o.length>0?l.jsx("div",{className:"grid grid-cols-1 gap-4",children:o.map(x=>l.jsxs(ne,{className:"glass-panel",children:[l.jsxs(ce,{className:"pb-2",children:[l.jsxs("div",{className:"flex justify-between items-start",children:[l.jsxs("div",{className:"flex items-center space-x-2",children:[l.jsx(he,{className:"text-xl font-display",children:x.word}),l.jsx(Y,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:()=>m(x),children:l.jsx(Cn,{className:"h-4 w-4"})})]}),l.jsx(Y,{variant:"ghost",size:"icon",className:"h-8 w-8 text-destructive hover:text-destructive",onClick:()=>y(x.id),children:l.jsx(Rc,{className:"h-4 w-4"})})]}),l.jsxs("div",{className:"text-sm text-muted-foreground italic",children:[x.partOfSpeech," | ",x.pronunciation]})]}),l.jsx(ie,{children:l.jsxs("div",{className:"space-y-2",children:[l.jsxs("div",{children:[l.jsx("div",{className:"font-medium text-sm",children:"Definition:"}),l.jsx("p",{children:x.definition})]}),l.jsxs("div",{children:[l.jsx("div",{className:"font-medium text-sm",children:"Example:"}),l.jsx("p",{className:"italic",children:x.example})]})]})})]},x.id))}):l.jsx(ne,{className:"glass-panel",children:l.jsxs(ie,{className:"flex flex-col items-center justify-center py-8",children:[l.jsx(Rs,{className:"h-12 w-12 text-muted-foreground mb-4"}),l.jsx("div",{className:"text-muted-foreground mb-2",children:"You haven't saved any words yet."}),l.jsx(Y,{variant:"outline",onClick:()=>{const x=document.querySelector('[data-value="explore"]');x instanceof HTMLElement&&x.click()},children:"Browse vocabulary"})]})})]}),l.jsxs(ot,{value:"lists",className:"space-y-6",children:[l.jsxs("div",{className:"flex justify-between items-center mb-4",children:[l.jsx("h2",{className:"text-xl font-display font-medium",children:"Vocabulary Lists"}),l.jsxs(Y,{children:[l.jsx(RW,{className:"h-4 w-4 mr-2"}),"Create New List"]})]}),l.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:c.map(x=>l.jsxs(ne,{className:"glass-panel",children:[l.jsxs(ce,{children:[l.jsx(he,{className:"text-lg font-display",children:x.name}),l.jsx(ke,{children:x.description})]}),l.jsxs(ie,{children:[l.jsxs("div",{className:"text-sm",children:[x.words.length," words"]}),l.jsxs("div",{className:"mt-2 flex flex-wrap gap-2",children:[x.words.slice(0,3).map(b=>l.jsx("div",{className:"text-xs px-2 py-1 bg-secondary rounded-full",children:b.word},b.id)),x.words.length>3&&l.jsxs("div",{className:"text-xs px-2 py-1 bg-secondary rounded-full",children:["+",x.words.length-3," more"]})]})]}),l.jsx(jt,{children:l.jsx(Y,{className:"w-full",children:"View List"})})]},x.id))})]})]})]})})})]})},W1e=HR,V1e=qR,cF=v.forwardRef(({className:e,...t},r)=>l.jsx(dv,{ref:r,className:G("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));cF.displayName=dv.displayName;const uF=v.forwardRef(({className:e,children:t,...r},n)=>l.jsxs(V1e,{children:[l.jsx(cF,{}),l.jsxs(fv,{ref:n,className:G("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...r,children:[t,l.jsxs(KR,{className:"absolute right-4 top-4 roun
712ded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[l.jsx(Rc,{className:"h-4 w-4"}),l.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));uF.displayName=fv.displayName;const dF=({className:e,...t})=>l.jsx("div",{className:G("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});dF.displayName="DialogHeader";const fF=({className:e,...t})=>l.jsx("div",{className:G("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});fF.displayName="DialogFooter";const hF=v.forwardRef(({className:e,...t},r)=>l.jsx(hv,{ref:r,className:G("text-lg font-semibold leading-none tracking-tight",e),...t}));hF.displayName=hv.displayName;const pF=v.forwardRef(({className:e,...t},r)=>l.jsx(pv,{ref:r,className:G("text-sm text-muted-foreground",e),...t}));pF.displayName=pv.displayName;const H1e=({video:e})=>{const[t,r]=v.useState(!1);Ct(),v.useState(!1);const n=()=>{window.open(`https://youtu.be/${e.videoId}`,"_blank")},i=`https://img.youtube.com/vi/${e.videoId}/hqdefault.jpg`;return l.jsxs(ne,{className:"h-full flex flex-col overflow-hidden hover:shadow-lg transition-shadow duration-300",children:[l.jsx("div",{className:"w-full h-48 bg-cover bg-center relative group cursor-pointer",style:{backgroundImage:`url(${i})`},onClick:()=>r(!0),children:l.jsx("div",{className:"absolute inset-0 bg-black bg-opacity-30 flex items-center justify-center opacity-80 group-hover:opacity-100 transition-opacity",children:l.jsx("div",{className:"rounded-full bg-primary p-2",children:l.jsx(s0,{className:"h-8 w-8 text-primary-foreground",fill:"white"})})})}),l.jsx(ce,{className:"pb-2",children:l.jsxs("div",{className:"flex justify-between items-start",children:[l.jsxs("div",{children:[l.jsx(he,{className:"text-xl",children:e.title}),l.jsx(ke,{className:"line-clamp-2",children:e.description})]}),l.jsx(Kt,{className:"capitalize whitespace-nowrap ml-2",variant:e.level==="beginner"?"default":e.level==="intermediate"?"secondary":"outline",children:e.level})]})}),l.jsxs(ie,{className:"pb-2 flex-grow",children:[l.jsxs("div",{className:"flex items-center text-sm text-muted-foreground mb-2",children:[l.jsx(Zp,{className:"mr-1 h-4 w-4"}),l.jsx("span",{children:e.duration})]}),l.jsx("div",{className:"flex items-center text-sm text-muted-foreground",children:l.jsx("span",{className:"capitalize",children:e.category})})]}),l.jsx(jt,{className:"pt-0",children:l.jsxs(Y,{className:"w-full",onClick:()=>r(!0),children:[l.jsx(s0,{className:"mr-2 h-4 w-4"})," Watch Lesson"]})}),l.jsx(W1e,{open:t,onOpenChange:r,children:l.jsxs(uF,{className:"max-w-4xl",children:[l.jsxs(dF,{children:[l.jsx(hF,{children:e.title}),l.jsx(pF,{children:e.description})]}),l.jsx("div",{className:"aspect-video w-full",children:l.jsx("iframe",{width:"100%",height:"100%",src:`https://www.youtube.com/embed/${e.videoId}`,title:e.title,frameBorder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0,className:"rounded-md"})}),l.jsx("div",{className:"flex items-center justify-between mt-4",children:l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(Kt,{className:"capitalize",variant:e.level==="beginner"?"default":e.level==="intermediate"?"secondary":"outline",children:e.level}),l.jsxs("div",{className:"flex items-center text-sm text-muted-foreground",children:[l.jsx(Zp,{className:"mr-1 h-4 w-4"}),l.jsx("span",{children:e.duration})]})]})}),l.jsxs(fF,{className:"gap-2 sm:gap-0",children:[l.jsx(Y,{variant:"outline",onClick:()=>r(!1),children:"Close"}),l.jsxs(Y,{onClick:n,children:[l.jsx(zM,{className:"mr-2 h-4 w-4"}),"Open on YouTube"]})]})]})})]})},q1e=[{id:"video1",title:"Learn English with Friends",description:"Perfect your English pronunciation with this fun lesson from Friends TV show",videoId:"ql9-75jhQxE",duration:"11:24",level:"beginner",category:"conversation"},{id:"video2",title:"English Conversation Practice",description:"Learn everyday English conversation with this practical lesson",videoId:"ZB4lOVRMt5I",duration:"26:06",level:"intermediate",category:"conversation"},{id:"video3",title:"Mastering English Prepositions",description:"A comprehensive lesson on using prepositions correctly in English",videoId:"mxzqCcoKKhM",duration:"16:29",level:"advanced",category:"grammar"}],K1e=()=>{const[e,t]=v.useState(""),[r,n]=v.useState(()=>{const a=localStorage.getItem("videoLessons");return a?JSON.parse(a):q1e}),i=r.filter(a=>a.title.toLowerCase().includes(e.toLowerCase())||a.description.toLowerCase().includes(e.toLowerCase())||a.category.toLowerCase().includes(e.toLowerCase()));return l.jsxs("div",{className:"min-h-screen flex flex-col",children:[l.jsx(un,{}),l.jsxs("div",{className:"flex flex-1",children:[l.jsx(dn,{}),l.jsx("main",{className:"flex-1 pt-16 px-6 pb-8 ml-64",children:l.jsxs("div",{className:"max-w-6xl mx-auto",children:[l.jsxs("div",{className:"flex flex-col md:flex-row justify-between items-start md:items-center gap-4 mb-8",children:[l.jsxs("div",{children:[l.jsx("h1",{className:"text-3xl font-bold",children:"Video Lessons"}),l.jsx("p",{className:"text-muted-foreground",children:"Learn English through engaging video content"})]}),l.jsxs("div",{className:"relative w-full md:w-auto",children:[l.jsx(PS,{className:"absolute left-2.5 top-2.5 h-4 w-4 text-muted-foreground"}),l.jsx(tr,{type:"search",placeholder:"Search video lessons...",className:"pl-8 w-full md:w-[250px]",value:e,onCh
712ange:a=>t(a.target.value)})]})]}),l.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:[i.map(a=>l.jsx(H1e,{video:a},a.id)),i.length===0&&l.jsxs("div",{className:"col-span-3 text-center py-12",children:[l.jsx(Rs,{className:"h-12 w-12 mx-auto text-muted-foreground opacity-50 mb-4"}),l.jsx("h3",{className:"text-lg font-medium mb-2",children:"No video lessons found"}),l.jsx("p",{className:"text-muted-foreground mb-4",children:"Try adjusting your search criteria"}),l.jsx(Y,{onClick:()=>t(""),children:"Clear Search"})]})]})]})})]})]})},eA=({achievement:e,userPoints:t})=>{const r=Math.min(100,t/e.requiredPoints*100),n=t>=e.requiredPoints,i={award:l.jsx(qi,{}),trophy:l.jsx(Ed,{}),star:l.jsx(WW,{}),zap:l.jsx(p_,{}),book:l.jsx(i0,{}),mic:l.jsx(ni,{}),"message-square":l.jsx(go,{}),users:l.jsx(_S,{}),calendar:l.jsx(Xp,{}),footprints:l.jsx(p_,{}),library:l.jsx(i0,{})};return l.jsxs(ne,{className:G("border relative overflow-hidden transition-all",n?"border-primary/50 shadow-md shadow-primary/10":"opacity-80 hover:opacity-100"),children:[n&&l.jsx("div",{className:"absolute -top-6 -right-6 w-16 h-16 bg-primary rotate-12"}),l.jsxs(ce,{className:"pb-2",children:[l.jsxs(he,{className:"flex items-center gap-2",children:[l.jsx("div",{className:G("p-2 rounded-full",n?"bg-primary/10 text-primary":"bg-muted text-muted-foreground"),children:i[e.icon]||l.jsx(qi,{})}),l.jsx("span",{children:e.title}),!n&&l.jsx(TW,{className:"h-4 w-4 ml-auto text-muted-foreground"})]}),l.jsx(ke,{children:e.description})]}),l.jsxs(ie,{className:"pb-2",children:[l.jsxs("div",{className:"flex justify-between text-sm mb-1",children:[l.jsx("span",{children:"Progress"}),l.jsxs("span",{className:"font-medium",children:[t,"/",e.requiredPoints," points"]})]}),l.jsx(lr,{value:r,className:"h-2"})]}),l.jsx(jt,{className:"pt-2 text-sm text-muted-foreground",children:n?`Unlocked ${e.unlockedAt?new Date(e.unlockedAt).toLocaleDateString():""}`:`Need ${e.requiredPoints-t} more points to unlock`})]})},G1e=()=>{const e="1",{data:t=[],isLoading:r}=co({queryKey:["achievements",e],queryFn:()=>ut.getAchievementsByUserId(e)}),{data:n}=co({queryKey:["user",e],queryFn:()=>ut.getUserById(e)}),i=(n==null?void 0:n.points)||0,a=t.filter(c=>c.isUnlocked).length,o=t.length,s=a/o*100;return l.jsxs("div",{className:"min-h-screen flex flex-col",children:[l.jsx(un,{}),l.jsxs("div",{className:"flex flex-1",children:[l.jsx(dn,{}),l.jsx("main",{className:"flex-1 pt-16 px-6 pb-8 ml-64",children:l.jsxs("div",{className:"max-w-4xl mx-auto",children:[l.jsxs("div",{className:"mb-8",children:[l.jsx("h1",{className:"text-3xl font-bold",children:"Achievements"}),l.jsx("p",{className:"text-muted-foreground",children:"Track your milestones and badges"})]}),l.jsx(ne,{className:"mb-8",children:l.jsx(ie,{className:"pt-6",children:l.jsxs("div",{className:"flex flex-col md:flex-row items-center gap-6",children:[l.jsxs("div",{className:"relative",children:[l.jsx("div",{className:"w-32 h-32 rounded-full border-8 border-primary-foreground bg-primary flex items-center justify-center",children:l.jsx(Ed,{className:"text-primary-foreground h-12 w-12"})}),l.jsx("div",{className:"absolute top-0 right-0 w-10 h-10 rounded-full bg-blue-500 flex items-center justify-center text-white font-bold",children:(n==null?void 0:n.level)||1})]}),l.jsxs("div",{className:"flex-1 text-center md:text-left",children:[l.jsxs("h2",{className:"text-2xl font-bold mb-2",children:[(n==null?void 0:n.name)||"User","'s Trophy Room"]}),l.jsxs("p",{className:"text-muted-foreground mb-4",children:["You've unlocked ",a," of ",o," achievements"]}),l.jsxs("div",{className:"space-y-2",children:[l.jsxs("div",{className:"flex justify-between text-sm",children:[l.jsx("span",{children:"Achievement Progress"}),l.jsxs("span",{children:[s.toFixed(0),"%"]})]}),l.jsx(lr,{value:s,className:"h-2"})]})]})]})})}),r?l.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:Array(6).fill(0).map((c,u)=>l.jsxs(ne,{className:"animate-pulse",children:[l.jsxs(ce,{children:[l.jsx("div",{className:"h-6 w-2/3 bg-muted rounded mb-2"}),l.jsx("div",{className:"h-4 w-full bg-muted rounded"})]}),l.jsx(ie,{children:l.jsx("div",{className:"h-4 w-full bg-muted rounded"})})]},u))}):l.jsxs(l.Fragment,{children:[a>0&&l.jsxs(l.Fragment,{children:[l.jsx("h2",{className:"text-xl font-bold mb-4",children:"Unlocked Achievements"}),l.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6 mb-8",children:t.filter(c=>c.isUnlocked).map(c=>l.jsx(eA,{achievement:c,userPoints:i},c.id))})]}),t.filter(c=>!c.isUnlocked).length>0&&l.jsxs(l.Fragment,{children:[l.jsx("h2",{className:"text-xl font-bold mb-4",children:"Achievements to Unlock"}),l.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:t.filter(c=>!c.isUnlocked).map(c=>l.jsx(eA,{achievement:c,userPoints:i},c.id))})]})]})]})})]})]})},Y1e=()=>{var P;const e={name:"Sarah Johnson",email:"[email protected]",avatar:"https://i.pravatar.cc/300?img=47"},[t,r]=v.useState([{id:"1",content:"Hi there! I'm your AI language partner. How can I help you practice your English today?",sender:"ai",timestamp:new Date}]),[n,i]=v.useState(""),[a,o]=v.useState(!1),[s,c]=v.useState(null),[u,f]=v.useState(!1),d=v.useRef(null),h=v.useRef(null),p=[{id:"daily-life",name:"Daily Life",description:"Talk about routines, hobbies, and everyday activities",icon:l.jsx(zi,{className:"h-5 w-5"})},{id:"travel",name:"Travel",description:"Discuss travel experiences, destinations, and plans",icon:l.jsx(zi,{className:"h-5 w-5"})},{id:"work",name:"Work & Career",description:"Practice professional conversations and interview skills",icon:l.jsx(zi,{className:"h-5 w-5"})},{id:"food",name:"Food & Dining",description:"Talk about favorite foods, restaurants, and cooking",icon:l.jsx(zi,{className:"h-5 w-5"})},{id:"culture",name:"Culture & Entertainment",description:"Discuss movies, music, books, and cultural topics",icon:l.jsx(zi,{className:"h-5 w-5"})},{id:"education",name:"Education",description:"Talk about learning, schools, and academic subjects",icon:l.jsx(zi,{className:"h-5 w-5"})}];v.useEffect(()=>{g()},[t]),v.useEffect(()=>{if(typeof window<"u"){const N=window.SpeechRecognition||window.webkitSpeechRecognition;
712N&&(h.current=new N,h.current.continuous=!0,h.current.interimResults=!0,h.current.lang="en-US",h.current.onresult=_=>{let O="";for(let k=_.resultIndex;k<_.results.length;++k){const C=_.results[k][0].transcript;_.results[k].isFinal&&(O+=C)}O&&i(k=>k+" "+O)},h.current.onerror=_=>{console.error("Speech recognition error",_.error),o(!1)})}return()=>{h.current&&h.current.stop()}},[]);const g=()=>{var N;(N=d.current)==null||N.scrollIntoView({behavior:"smooth"})},m=()=>{if(!n.trim())return;const N={id:Date.now().toString(),content:n.trim(),sender:"user",timestamp:new Date};r(_=>[..._,N]),i(""),f(!0),setTimeout(()=>{const _={id:(Date.now()+1).toString(),content:y(n),sender:"ai",timestamp:new Date};r(O=>[...O,_]),f(!1)},1500)},y=N=>{const _=N.toLowerCase();return _.includes("hello")||_.includes("hi")?"Hello! It's great to chat with you. How are you feeling today?":_.includes("how are you")?"I'm doing well, thank you for asking! I'm here to help you practice your English. What would you like to talk about?":_.includes("weather")?"The weather is an interesting topic for conversation! Can you tell me what the weather is like where you are? And do you have a favorite season?":_.includes("hobby")||_.includes("hobbies")?"Hobbies are great to talk about in English conversation! Some common hobbies include reading, cooking, gardening, and playing sports. What are some of your favorite activities in your free time?":"That's an interesting point! Could you tell me more about that? Remember, the more you practice speaking English, the more fluent you'll become."},x=()=>{a?(h.current&&h.current.stop(),o(!1)):(h.current&&h.current.start(),o(!0))},b=()=>{r([{id:Date.now().toString(),content:"Hi there! I'm your AI language partner. How can I help you practice your English today?",sender:"ai",timestamp:new Date}]),c(null)},w=N=>{c(N);const _=p.find(O=>O.id===N);if(_){const O={id:Date.now().toString(),content:`Let's talk about ${_.name}! ${_.description}. What would you like to discuss first?`,sender:"ai",timestamp:new Date};r([O])}},S=N=>{if("speechSynthesis"in window){const _=new SpeechSynthesisUtterance(N);_.lang="en-US",window.speechSynthesis.speak(_)}else console.log("Text-to-speech not supported in this browser")},j=N=>N.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"});return l.jsxs("div",{className:"min-h-screen bg-background",children:[l.jsx(un,{user:e}),l.jsx(dn,{}),l.jsx("main",{className:"pt-24 pb-16 pl-72 pr-6",children:l.jsx("div",{className:"max-w-7xl mx-auto animate-fade-in",children:l.jsxs("section",{className:"mb-8",children:[l.jsx("h1",{className:"text-3xl font-display font-semibold mb-2",children:"AI Conversation"}),l.jsx("p",{className:"text-muted-foreground mb-6",children:"Practice your English by chatting with our AI language partner."}),l.jsxs(ki,{defaultValue:"chat",className:"w-full",children:[l.jsxs(Ci,{className:"grid w-full max-w-md grid-cols-2 mb-6",children:[l.jsx(at,{value:"chat",children:"Chat"}),l.jsx(at,{value:"topics",children:"Conversation Topics"})]}),l.jsx(ot,{value:"chat",className:"space-y-6",children:l.jsxs(ne,{className:"glass-panel",children:[l.jsx(ce,{className:"border-b",children:l.jsxs("div",{className:"flex justify-between items-center",children:[l.jsx(he,{className:"text-xl font-display",children:s?`Topic: ${(P=p.find(N=>N.id===s))==null?void 0:P.name}`:"Open Conversation"}),l.jsxs("div",{className:"flex space-x-2",children:[l.jsxs(Y,{variant:"outline",size:"sm",onClick:b,children:[l.jsx(qM,{className:"h-4 w-4 mr-2"}),"New Chat"]}),l.jsxs(Y,{variant:"outline",size:"sm",children:[l.jsx(DW,{className:"h-4 w-4 mr-2"}),"Save"]})]})]})}),l.jsx(ie,{className:"p-0",children:l.jsxs("div",{className:"h-[500px] overflow-y-auto p-6 space-y-4",children:[t.map(N=>l.jsxs("div",{className:G("flex items-start space-x-2",N.sender==="user"&&"justify-end"),children:[N.sender==="ai"&&l.jsx("div",{className:"w-8 h-8 rounded-full bg-primary/20 flex items-center justify-center text-primary flex-shrink-0",children:l.jsx(Xl,{className:"h-4 w-4"})}),l.jsxs("div",{className:"flex flex-col space-y-1 max-w-[80%]",children:[l.jsx("div",{className:G("rounded-lg px-4 py-2 inline-block",N.sender==="user"?"bg-primary text-primary-foreground ml-auto":"bg-secondary text-secondary-foreground"),children:N.content}),l.jsxs("div",{className:G("text-xs text-muted-foreground flex items-center space-x-2",N.sender==="user"&&"ml-auto"),children:[l.jsx("span",{children:j(N.timestamp)}),N.sender==="ai"&&l.jsx(Y,{variant:"ghost",size:"icon",className:"h-6 w-6",onClick:()=>S(N.content),children:l.jsx(Cn,{className:"h-3 w-3"})})]})]}),N.sender==="user"&&l.jsx("div",{className:"w-8 h-8 rounded-full bg-primary flex items-center justify-center text-primary-foreground flex-shrink-0",children:l.jsx(zi,{className:"h-4 w-4"})})]},N.id)),u&&l.jsxs("div",{className:"flex items-start space-x-2",children:[l.jsx("div",{className:"w-8 h-8 rounded-full bg-primary/20 flex items-center justify-center text-primary flex-shrink-0",children:l.jsx(Xl,{className:"h-4 w-4"})}),l.jsxs("div",{className:"flex items-center space-x-1 px-4 py-2 bg-secondary rounded-lg text-secondary-foreground",children:[l.jsx("div",{className:"h-2 w-2 rounded-full bg-current animate-bounce"}),l.jsx("div",{className:"h-2 w-2 rounded-full bg-current animate-bounce [animation-delay:0.2s]"}),l.jsx("div",{className:"h-2 w-2 rounded-full bg-current animate-bounce [animation-delay:0.4s]"})]})]}),l.jsx("div",{ref:d})]})}),l.jsx(jt,{className:"border-t p-4",children:l.jsxs("div",{className:"flex items-center w-full space-x-2",children:[l.jsx(Y,{variant:a?"destructive":"outline",size:"icon",className:G(a&&"animate-pulse"),onClick:x,children:l.jsx(ni,{className:"h-4 w-4"})}),l.jsx(tr,{placeholder:"Type your message...",value:n,onChange:N=>i(N.target.value),onKeyDown:N=>
712{N.key==="Enter"&&!N.shiftKey&&(N.preventDefault(),m())},className:"flex-1"}),l.jsx(Y,{onClick:m,disabled:!n.trim()||u,children:l.jsx(NS,{className:"h-4 w-4"})})]})})]})}),l.jsx(ot,{value:"topics",children:l.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:p.map(N=>l.jsxs(ne,{className:"glass-panel hover:shadow-lg transition-all cursor-pointer",onClick:()=>{w(N.id);const _=document.querySelector('[data-value="chat"]');_ instanceof HTMLElement&&_.click()},children:[l.jsx(ce,{children:l.jsx(he,{className:"text-lg font-display",children:N.name})}),l.jsx(ie,{children:l.jsx("p",{className:"text-muted-foreground",children:N.description})}),l.jsx(jt,{children:l.jsx(Y,{variant:"outline",className:"w-full",children:"Select Topic"})})]},N.id))})})]})]})})})]})},X1e={async getWordDefinition(e){var t;try{const r=await vP.getWordDefinition(e);return this.formatDictionaryResult(r[0],e)}catch{console.log("Fallback to other dictionary APIs...")}try{const r=await Dt.request("wordnik",{endpoint:`/word/${e}/definitions`,params:{limit:"10",includeRelated:"true",sourceDictionaries:"all",useCanonical:"true",includeTags:"false"}}),n=await Dt.request("wordnik",{endpoint:`/word/${e}/examples`,params:{limit:"5",includeDuplicates:"false"}}).catch(()=>({examples:[]}));return{word:e,meanings:r.reduce((i,a)=>{const o=i.find(s=>s.partOfSpeech===a.partOfSpeech);return o?o.definitions.push({definition:a.text,example:""}):i.push({partOfSpeech:a.partOfSpeech||"unknown",definitions:[{definition:a.text,example:""}]}),i},[]),examples:((t=n.examples)==null?void 0:t.map(i=>i.text))||[]}}catch(r){console.error("Wordnik API failed, trying Datamuse:",r);try{const n=await Dt.request("datamuse",{endpoint:"/words",params:{ml:e,max:"10"}});return{word:e,meanings:[{partOfSpeech:"unknown",definitions:[{definition:"Definition not available",example:"",synonyms:n.map(i=>i.word)}]}]}}catch(n){return console.error("All dictionary services failed:",n),{word:e,meanings:[{partOfSpeech:"unknown",definitions:[{definition:"Definition not available",example:""}]}]}}}},formatDictionaryResult(e,t){return{word:e.word||t,phonetic:e.phonetic,phonetics:e.phonetics,meanings:e.meanings||[],examples:[],sourceUrls:[]}},async getRelatedWords(e,t="ml"){try{return(await Dt.request("datamuse",{endpoint:"/words",params:{[t]:e,max:"10"}})).map(n=>n.word)}catch(r){return console.error("Failed to get related words:",r),[]}},async getWordOfTheDay(){try{const e=await Dt.request("wordnik",{endpoint:"/words/randomWord",params:{hasDictionaryDef:"true",minCorpusCount:"10000",minDictionaryCount:"5",minLength:"5",maxLength:"10"}});return await this.getWordDefinition(e.word)}catch(e){console.error("Word of the day failed:",e);const t=["serendipity","eloquent","resilient","curiosity","perseverance"],r=Math.floor(Math.random()*t.length);return await this.getWordDefinition(t[r])}}},tA={async getTriviaQuestions(e=5,t=9,r="medium"){try{return(await Dt.request("trivia",{endpoint:"",params:{amount:e.toString(),category:t.toString(),difficulty:r,type:"multiple"}})).results.map(i=>({category:i.category,type:i.type,difficulty:i.difficulty,question:i.question,correctAnswer:i.correct_answer,incorrectAnswers:i.incorrect_answers}))}catch(n){return console.error("Failed to get trivia questions:",n),Array(e).fill(null).map((i,a)=>({category:"English Language",type:"multiple",difficulty:r,question:`Sample English question #${a+1}?`,correctAnswer:"Correct answer",incorrectAnswers:["Wrong 1","Wrong 2","Wrong 3"]}))}},async getRelatedImages(e,t=5){try{return(await Dt.request("unsplash",{endpoint:"/search/photos",params:{query:e,per_page:t.toString(),orientation:"landscape"}})).results.map(n=>({id:n.id,url:n.urls.regular,altText:n.alt_description||e,width:n.width,height:n.height,authorName:n.user.name,authorUrl:n.user.links.html}))}catch(r){return console.error("Failed to get images:",r),[]}},async getEducationalVideos(e,t=3){try{const r=await Dt.request("youtube",{endpoint:"/search",params:{part:"snippet",q:`${e} english learning`,maxResults:t.toString(),type:"video",relevanceLanguage:"en"}}),n=r.items.map(a=>a.id.videoId).join(","),i=await Dt.request("youtube",{endpoint:"/videos",params:{part:"contentDetails,statistics",id:n}});return r.items.map((a,o)=>{var c,u;const s=i.items[o];
712return{id:a.id.videoId,title:a.snippet.title,description:a.snippet.description,thumbnailUrl:a.snippet.thumbnails.high.url,channelTitle:a.snippet.channelTitle,publishedAt:a.snippet.publishedAt,duration:((c=s==null?void 0:s.contentDetails)==null?void 0:c.duration)||"Unknown",viewCount:parseInt(((u=s==null?void 0:s.statistics)==null?void 0:u.viewCount)||"0",10)}})}catch(r){return console.error("Failed to get YouTube videos:",r),[]}},async getVideoDetailsById(e){try{const t=await Dt.request("youtube",{endpoint:"/videos",params:{part:"snippet,contentDetails,statistics",id:e}});if(!t.items||t.items.length===0)return null;const r=t.items[0];return{id:r.id,title:r.snippet.title,description:r.snippet.description,thumbnailUrl:r.snippet.thumbnails.high.url,channelTitle:r.snippet.channelTitle,publishedAt:r.snippet.publishedAt,duration:r.contentDetails.duration,viewCount:parseInt(r.statistics.viewCount||"0",10)}}catch(t){return console.error("Failed to get video details:",t),null}}},Q1e=({hasElevenLabs:e})=>l.jsxs("section",{className:"mb-8",children:[l.jsx("h1",{className:"text-3xl font-display font-semibold mb-2",children:"Virtual AI Teacher"}),l.jsx("p",{className:"text-muted-foreground mb-6",children:"Ask questions and get real-time assistance from your AI English teacher. Speak naturally or type your questions."})]}),Z1e=({teacherImage:e="/lovable-uploads/f89ceb72-0c39-4750-b503-e35c3a9deb90.png"})=>l.jsxs(kd,{className:"w-56 h-56 border-2 border-primary/60 shadow-lg",children:[l.jsx(Jg,{src:"/lovable-uploads/f89ceb72-0c39-4750-b503-e35c3a9deb90.png",alt:"AI Teacher",className:"object-cover"}),l.jsx(Cd,{className:"bg-primary-foreground",children:l.jsx(Xl,{className:"h-24 w-24 text-primary"})})]}),rA=({isActive:e,color:t})=>e?l.jsxs("div",{className:"absolute inset-0 flex items-center justify-center",children:[l.jsx("div",{className:`w-40 h-40 bg-${t}-300/20 rounded-full animate-pulse`}),l.jsx("div",{className:`absolute w-48 h-48 bg-${t}-400/10 rounded-full animate-pulse`,style:{animationDelay:"300ms"}})]}):null,nA=({isActive:e,color:t,animationType:r})=>e?l.jsxs(l.Fragment,{children:[l.jsx("div",{className:`w-3 h-3 bg-${t} rounded-full animate-${r}`,style:{animationDelay:"0ms"}}),l.jsx("div",{className:`w-3 h-3 bg-${t} rounded-full animate-${r}`,style:{animationDelay:r==="bounce"?"300ms":"200ms"}}),l.jsx("div",{className:`w-3 h-3 bg-${t} rounded-full animate-${r}`,style:{animationDelay:r==="bounce"?"600ms":"400ms"}})]}):null,J1e=({isTeacherSpeaking:e,isListening:t})=>{let r="Ready to help";return e?r="Speaking...":t&&(r="Listening to you..."),l.jsxs("div",{className:"text-center mt-4",children:[l.jsx("h3",{className:"font-display font-semibold text-xl",children:"Virtual English Teacher"}),l.jsx("p",{className:"text-sm text-muted-foreground",children:r})]})},eSe=({isTeacherSpeaking:e,isListening:t,teacherImage:r})=>l.jsxs("div",{className:"flex flex-col items-center mb-4",children:[l.jsxs("div",{className:G("relative p-1 rounded-full transition-all duration-300",e?"animate-pulse ring-4 ring-primary":t?"ring-4 ring-green-500":"ring-2 ring-primary/40"),children:[l.jsx(Z1e,{teacherImage:r}),l.jsx(rA,{isActive:e,color:"blue"}),l.jsx(rA,{isActive:t,color:"green"}),l.jsx("div",{className:"absolute bottom-4 left-0 right-0 flex justify-center",children:l.jsxs("div",{className:"flex space-x-2",children:[l.jsx(nA,{isActive:e,color:"primary",animationType:"bounce"}),l.jsx(nA,{isActive:t,color:"green-500",animationType:"pulse"})]})})]}),l.jsx(J1e,{isTeacherSpeaking:e,isListening:t})]});function Bx({className:e,...t}){return l.jsx("div",{className:G("animate-pulse rounded-md bg-muted",e),...t})}const tSe=({content:e,isProcessing:t})=>t?e?l.jsx("p",{className:"text-muted-foreground italic",children:e}):l.jsxs("div",{className:"space-y-2",children:[l.jsx(Bx,{className:"h-4 w-[250px]"}),l.jsx(Bx,{className:"h-4 w-[200px]"}),l.jsx(Bx,{className:"h-4 w-[150px]"})]}):l.jsx("p",{className:"whitespace-pre-wrap",children:e}),rSe=({isSpeaking:e,onPlayMessage:t,onStopSpeaking:r})=>e?l.jsx(Y,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0 rounded-full text-destructive",onClick:r,title:"Stop speaking",children:l.jsx(YM,{className:"h-4 w-4"})}):l.jsx(Y,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0 rounded-full",onClick:t,title:"Play message",children:l.jsx(Cn,{className:"h-4 w-4"})}),nSe=({message:e,isTeacherSpeaking:t,speakMessage:r,stopSpeaking:n})=>
712{const i=e.sender==="user",a=e.timestamp instanceof Date?e.timestamp.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}):new Date(e.timestamp).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"});return l.jsxs("div",{className:G("flex flex-col gap-1",i?"items-end":"items-start"),children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("div",{className:G("rounded-full w-8 h-8 flex items-center justify-center",i?"bg-secondary":"bg-primary"),children:i?l.jsx(zi,{className:"h-4 w-4"}):l.jsx(Xl,{className:"h-4 w-4 text-primary-foreground"})}),l.jsx("span",{className:"text-xs text-muted-foreground",children:a})]}),l.jsxs("div",{className:G("max-w-[80%] px-4 py-3 rounded-xl",i?"bg-secondary text-secondary-foreground":"bg-primary/10 text-foreground"),children:[l.jsx(tSe,{content:e.content,isProcessing:!!e.isProcessing}),!i&&!e.isProcessing&&l.jsx("div",{className:"mt-2 flex justify-end",children:l.jsx(rSe,{isSpeaking:!!e.isSpeaking&&t,onPlayMessage:()=>r(e.content),onStopSpeaking:n})})]})]})},iSe=({messages:e,speakMessage:t,stopSpeaking:r,isTeacherSpeaking:n,autoScroll:i=!0})=>{const a=v.useRef(null);return Uc(),v.useEffect(()=>{i&&a.current&&a.current.scrollIntoView({behavior:"smooth"})},[e,i]),l.jsx(ri,{className:"h-full touch-scroll scrollbar",type:"always",children:l.jsxs("div",{className:"p-4 space-y-4",children:[e.map(o=>l.jsx(nSe,{message:o,isTeacherSpeaking:n,speakMessage:t,stopSpeaking:r},o.id)),l.jsx("div",{ref:a})]})})},mF=e=>{const[t,r]=v.useState(!1),n=v.useRef(null),i=v.useCallback(()=>{if(!("webkitSpeechRecognition"in window)&&!("SpeechRecognition"in window)){console.error("Speech recognition is not supported in your browser.");return}const s=window.SpeechRecognition||window.webkitSpeechRecognition;n.current=new s,n.current.lang="en-US",n.current.interimResults=!1,n.current.maxAlternatives=1,n.current.onresult=c=>{const u=c.results[0][0].transcript;e(u)},n.current.onerror=c=>{console.error("Speech recognition error",c.error)},n.current.onend=()=>{r(!1)},n.current.start(),r(!0)},[e]),a=v.useCallback(()=>{n.current&&(n.current.stop(),r(!1))},[]),o=v.useCallback(()=>{t?a():i()},[t,i,a]);return{isListening:t,startListening:i,stopListening:a,toggleListening:o}},gF=()=>{const[e,t]=v.useState(!1),r=v.useCallback(async i=>{try{t(!0);const a=i.replace(/[^\w\s.,?!;:'"()-]/gi," ").trim();await kt.speak(a)}catch(a){throw console.error("Speech synthesis error:",a),a}finally{t(!1)}},[]),n=v.useCallback(()=>{kt.stopSpeaking(),t(!1)},[]);return{isTeacherSpeaking:e,speakText:r,stopSpeaking:n}};function aSe(){Ct();const e=v.useRef(null),t=v.useCallback(h=>{e.current&&e.current(h)},[]),r=v.useCallback(h=>{e.current=h},[]),{isListening:n,startListening:i,stopListening:a,toggleListening:o}=mF(t),{isTeacherSpeaking:s,speakText:c,stopSpeaking:u}=gF(),f=v.useCallback(()=>{var h;kt.stopSpeaking(),kt.stop(),u();try{(h=window.speechSynthesis)==null||h.cancel()}catch(p){console.error("Error while trying to stop speech synthesis:",p)}document.querySelectorAll("audio").forEach(p=>{try{p.pause(),p.currentTime=0}catch(g){console.error("Error stopping audio element:",g)}})},[u]),d=v.useCallback(()=>{n&&a(),f()},[n,a,f]);return{isListening:n,isTeacherSpeaking:s,startListening:i,stopListening:a,toggleListening:o,speakText:c,stopSpeaking:f,stopAll:d,registerSpeechCallback:r}}const oSe=({inputText:e,setInputText:t,sendMessage:r,toggleMicrophone:n,isRecording:i,isProcessing:a,handleKeyDown:o})=>{const{toast:s}=Ct(),c=Uc(),{isListening:u,startListening:f,stopListening:d,registerSpeechCallback:h}=aSe();v.useEffect(()=>{h(g=>{const m=g.replace(/[^\w\s.,?!]/gi,"").trim();t(e?e+" "+m:m)})},[h,t,e]);const p=()=>{n(),i||s({title:"Listening",description:"Speak clearly and I'll transcribe what you say.",duration:3e3})};return l.jsxs("div",{className:`flex items-center w-full gap-2 ${c?"px-2 pb-2":""}`,children:[l.jsx(Y,{variant:i?"destructive":"outline",size:"icon",onClick:p,className:`${i?"animate-pulse":""} flex-shrink-0`,title:i?"Stop listening":"Start listening",children:i?l.jsx($W,{className:"h-4 w-4"}):l.jsx(ni,{className:"h-4 w-4"})}),l.jsx(tr,{placeholder:"Ask your question here...",value:e,onCh
712ange:g=>t(g.target.value),onKeyDown:o,disabled:a,className:"flex-grow"}),l.jsx(Y,{onClick:r,disabled:!e.trim()||a,className:`flex-shrink-0 ${c?"px-3":"gap-2"}`,children:a?l.jsxs(l.Fragment,{children:[l.jsx(nn,{className:"h-4 w-4 animate-spin"}),!c&&"Sending"]}):l.jsxs(l.Fragment,{children:[l.jsx(NS,{className:"h-4 w-4"}),!c&&"Send"]})})]})},sSe=()=>{const[e,t]=v.useState([]),[r,n]=v.useState(!1);return{messages:e,isProcessing:r,addUserMessage:u=>(t(f=>[...f,u]),u),addAssistantMessage:async u=>{n(!0);const f={id:(Date.now()+1).toString(),sender:"ai",role:"assistant",content:u,timestamp:new Date};return t(d=>[...d,f]),n(!1),f},addErrorMessage:u=>{const f={id:(Date.now()+1).toString(),sender:"ai",role:"assistant",content:u,timestamp:new Date,isError:!0};return t(d=>[...d,f]),n(!1),f},updateMessageSpeakingState:(u,f,d=!1)=>{t(h=>h.map(p=>p.id===u?{...p,isSpeaking:f,isError:d||p.isError}:{...p,isSpeaking:!1}))},clearMessages:()=>{t([]),n(!1)}}},lSe=e=>{const{toast:t}=Ct(),r=v.useRef(null),[n,i]=v.useState(""),{messages:a,isProcessing:o,addUserMessage:s,addAssistantMessage:c,addErrorMessage:u,updateMessageSpeakingState:f,clearMessages:d}=sSe(),h=v.useCallback(async k=>{if(!k.trim())return;const C={id:Date.now().toString(),sender:"user",role:"user",content:k,timestamp:new Date};s(C);try{const E=a.map($=>({role:$.role||($.sender==="user"?"user":"assistant"),content:$.content})),I=await _n.generateTeacherResponse(k,E),T=await c(I);T&&N(T)}catch(E){console.error("Error processing transcript:",E),u("I'm sorry, I had trouble understanding that. Could you please try again?")}},[a,s,c,u]),{isListening:p,startListening:g,stopListening:m,toggleListening:y}=mF(k=>{i(k),k.trim()&&h(k)}),{isTeacherSpeaking:x,speakText:b,stopSpeaking:w}=gF(),S=v.useCallback(()=>{if(e){const k={id:"0",sender:"ai",role:"assistant",content:e,timestamp:new Date};c(k.content),setTimeout(()=>{N(k)},1e3)}},[e,c]);v.useEffect(()=>(a.length===0&&S(),()=>{P()}),[S,a.length]);const j=v.useCallback(()=>{x&&w(),y()},[x,w,y]),P=v.useCallback(()=>{w(),m()},[w,m]),N=async k=>{const C=k.content,E=k.id;f(E,!0);try{await b(C)}catch(I){console.error("Failed to speak message:",I),f(E,!1,!0)}finally{f(E,!1)}},_=v.useCallback(()=>{const k=a.slice().reverse().find(C=>C.sender==="ai");k&&N(k)},[a]),O=v.useCallback(()=>{w(),m(),d(),i(""),S(),t({title:"Conversation Reset",description:"Starting a new conversation."})},[w,m,d,S,t]);return{messages:a,isProcessing:o,isListening:p,isTeacherSpeaking:x,currentTranscript:n,toggleListening:j,stopSpeaking:w,stopAll:P,speakMessage:N,replayLastResponse:_,messagesEndRef:r,processTranscript:h,resetConversation:O}},cSe=({initialGreeting:e="Hi, I am Ria. I'm your interactive AI English teacher. I can help you learn English through conversation. What would you like to know today?"})=>{const{messages:t,isProcessing:r,isListening:n,isTeacherSpeaking:i,currentTranscript:a,toggleListening:o,stopSpeaking:s,stopAll:c,speakMessage:u,replayLastResponse:f,messagesEndRef:d,processTranscript:h,resetConversation:p}=lSe(e),[g,m]=v.useState(""),[y,x]=v.useState(!0),b=N=>{const _={id:"temp-"+Date.now().toString(),content:N,sender:"ai",timestamp:new Date};u(_)},w=()=>{c(),kt.stopSpeaking()},S=()=>{kt.stopSpeaking(),s()};v.useEffect(()=>()=>{w()},[]),v.useEffect(()=>{const N=()=>{w()},_=()=>{document.visibilityState==="hidden"&&w()},O=()=>{w()};return window.addEventListener("beforeunload",N),window.addEventListener("popstate",O),document.addEventListener("visibilitychange",_),()=>{window.removeEventListener("beforeunload",N),window.removeEventListener("popstate",O),document.removeEventListener("visibilitychange",_),w()}},[]);const j=()=>{g.trim()&&(h(g),m(""))},P=N=>{N.key==="Enter"&&!N.shiftKey&&(N.preventDefault(),j())};return l.jsxs(ne,{className:"w-full h-[700px] flex flex-col glass-panel overflow-hidden",children:[l.jsx(ce,{className:"pb-2 border-b",children:l.jsxs("div",{className:"flex justify-between items-center",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("div",{className:"w-8 h-8 rounded-full bg-primary flex items-center justify-center",children:l.jsx("span",{className:"h-5 w-5 text-primary-foreground",children:"ð"})}),l.jsx("span",{className:"font-medium"})]}),l.jsxs("div",{className:"flex gap-2",children:[l.jsxs(Y,{variant:n?"destructive":"default",size:"sm",className:"flex items-center gap-1",onClick:()=>{i&&S(),o()},disabled:r,children:[l.jsx(ni,{className:"h-4 w-4"}),n?"Stop Talking":"Start Talking"]}),l.jsxs(Y,{variant:"destructive",size:"sm",className:"flex items-center gap-1",onClick:S,children:[l.jsx(GM,{className:"h-4 w-4"}),"Stop AI Speaking"]}),l.jsxs(Y,{variant:"secondary",size:"sm",className:"flex items-center gap-1",onClick:p,children:[l.jsx(qM,{className:"h-4 w-4"}),"Reset Conversation"]}),l.jsx(Y,{variant:"outline",size:"sm",onClick:()=>x(!y),children:y?"Disable Auto-Scroll":"Enable Auto-Scroll"})]})]})}),l.jsxs(ie,{className:"flex-grow overflow-auto p-4 flex flex-col",children:[l.jsxs("div",{className:"flex flex-col items-center justify-center mb-4",children:[l.jsx(eSe,{isTeacherSpeaking:i,isListening:n&&!i}),a&&n&&!i&&l.jsx("div",{className:"mt-2 px-4 py-2 bg-green-500/10 text-green-800 dark:text-green-300 rounded-full animate-pulse max-w-[80%] text-center",children:a})]}),l.jsx("div",{className:"flex-grow overflow-hidden bg-card/50 rounded-lg border shadow-sm",children:l.jsx(iSe,{messages:t,speakMessage:b,stopSpeaking:s,isTeacherSpeaking:i,autoScroll:y})})]}
712),l.jsx(jt,{className:"p-3 border-t mt-auto",children:l.jsx(oSe,{inputText:g,setInputText:m,sendMessage:j,toggleMicrophone:o,isRecording:n,isProcessing:r,handleKeyDown:P})})]})},uSe=()=>l.jsxs(ne,{className:"border-amber-200 bg-amber-50 dark:bg-amber-950/20",children:[l.jsx(ce,{className:"pb-2",children:l.jsxs("div",{className:"flex items-start justify-between",children:[l.jsxs("div",{children:[l.jsx(he,{className:"text-lg font-display",children:"Enhanced AI Features Available"}),l.jsx(ke,{children:"Get better AI responses and analysis"})]}),l.jsx(Xl,{className:"h-6 w-6 text-amber-500"})]})}),l.jsx(ie,{children:l.jsx("p",{className:"text-sm",children:"Add your Gemini API key in Settings to enable enhanced AI features for your learning experience."})}),l.jsx(jt,{children:l.jsx(Y,{variant:"outline",size:"sm",className:"w-full",asChild:!0,children:l.jsx("a",{href:"/settings?tab=api",children:"Add API Key"})})})]}),dSe=({hasElevenLabs:e})=>{const t=Uc();return l.jsx(ri,{className:`${t?"h-[calc(100vh-16rem)]":"h-full"} touch-scroll scrollbar`,children:l.jsxs("div",{className:`flex flex-col gap-4 ${t?"":"gap-6"} p-2`,children:[l.jsx(cSe,{initialGreeting:"Hi, I am Ria. I'm your interactive AI English teacher. I can help you learn English through conversation. What would you like to know today?"}),!e&&l.jsx(uSe,{})]})})},fSe=()=>l.jsxs(ne,{className:"glass-panel",children:[l.jsxs(ce,{children:[l.jsx(he,{className:"text-xl font-display",children:"How To Use"}),l.jsx(ke,{children:"Talk to me like a real English teacher"})]}),l.jsxs(ie,{className:"space-y-3",children:[l.jsxs("div",{className:"flex gap-3",children:[l.jsx("div",{className:"bg-primary/20 text-primary rounded-full w-6 h-6 flex items-center justify-center flex-shrink-0",children:"1"}),l.jsx("p",{className:"text-sm",children:'Click the "Start Listening" button and speak naturally'})]}),l.jsxs("div",{className:"flex gap-3",children:[l.jsx("div",{className:"bg-primary/20 text-primary rounded-full w-6 h-6 flex items-center justify-center flex-shrink-0",children:"2"}),l.jsx("p",{className:"text-sm",children:"I'll listen, analyze your question and provide a helpful response"})]}),l.jsxs("div",{className:"flex gap-3",children:[l.jsx("div",{className:"bg-primary/20 text-primary rounded-full w-6 h-6 flex items-center justify-center flex-shrink-0",children:"3"}),l.jsx("p",{className:"text-sm",children:`I'll speak my responses aloud. You can stop me anytime with the "Stop Speaking" button`})]}),l.jsxs("div",{className:"flex gap-3",children:[l.jsx("div",{className:"bg-primary/20 text-primary rounded-full w-6 h-6 flex items-center justify-center flex-shrink-0",children:"4"}),l.jsx("p",{className:"text-sm",children:"Each response can be replayed by clicking the speaker icon"})]})]})]}),hSe=({wordOfTheDay:e,setSearchTerm:t})=>l.jsxs(ne,{className:"glass-panel",children:[l.jsxs(ce,{className:"pb-2",children:[l.jsxs(he,{className:"text-xl font-display flex items-center gap-2",children:[l.jsx(i0,{className:"h-5 w-5"}),"Word of the Day"]}),e&&l.jsx(ke,{children:e.word})]}),l.jsx(ie,{className:"space-y-2",children:e?l.jsxs(l.Fragment,{children:[e.meanings.length>0&&l.jsxs("div",{children:[l.jsx(Kt,{className:"mb-1",children:e.meanings[0].partOfSpeech}),l.jsx("p",{className:"text-sm",children:e.meanings[0].definitions[0].definition}),e.meanings[0].definitions[0].example&&l.jsx("p",{className:"text-sm text-muted-foreground mt-1 italic",children:e.meanings[0].definitions[0].example})]}),l.jsx(Y,{size:"sm",variant:"outline",className:"w-full mt-2",onClick:()=>t(e.word),children:"Learn More"})]}):l.jsx("div",{className:"h-20 flex items-center justify-center",children:l.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading word of the day..."})})})]}),pSe=()=>l.jsxs(ne,{className:"glass-panel",children:[l.jsxs(ce,{children:[l.jsx(he,{className:"text-xl font-display",children:"Suggested Topics"}),l.jsx(ke,{children:"Try asking questions about these topics"})]}),l.jsxs(ie,{className:"space-y-4",children:[l.jsxs("div",{className:"bg-secondary/30 p-3 rounded-lg hover:bg-secondary cursor-pointer transition-colors",children:[l.jsx("h3",{className:"font-medium",children:"Grammar Rules"}),l.jsx("p",{className:"text-sm text-muted-foreground",children:`"What's the difference between 'a' and 'the'?"`})]}),l.jsxs("div",{className:"bg-secondary/30 p-3 rounded-lg hover:bg-secondary cursor-pointer transition-colors",children:[l.jsx("h3",{className:"font-medium",children:"Pronunciation Practice"}),l.jsx("p",{className:"text-sm text-muted-foreground",children:`"How do I pronounce 'thorough' correctly?"`})]}),l.jsxs("div",{className:"bg-secondary/30 p-3 rounded-lg hover:bg-secondary cursor-pointer transition-colors",children:[l.jsx("h3",{className:"font-medium",children:"Vocabulary Building"}),l.jsx("p",{className:"text-sm text-muted-foreground",children:`"Can you suggest synonyms for 'good'?"`})]}),l.jsxs("div",{className:"bg-secondary/30 p-3 rounded-lg hover:bg-secondary cursor-pointer transition-colors",children:[l.jsx("h3",{className:"font-medium",children:"Conversation Practice"}),l.jsx("p",{className:"text-sm text-muted-foreground",children:'"How do I politely disagree with someone?"'})]})]})]}),mSe=({wordOfTheDay:e,setSearchTerm:t})=>{const r=Uc();return l.jsx(ri,{className:`${r?"h-[60vh]":"h-full"} touch-scroll`,children:l.jsxs("div",{className:"space-y-4 md:space-y-6 p-2 md:p-4",children:[l.jsx(fSe,{}),l.jsx(hSe,{wordOfTheDay:e,setSearchTerm:t}),l.jsx(pSe,{})]})})}
712,gSe=({searchTerm:e,setSearchTerm:t,handleSearch:r,isLoadingResources:n,relatedImages:i,relatedVideos:a})=>l.jsxs("div",{className:"mt-8",children:[l.jsx("h2",{className:"text-2xl font-display font-semibold mb-4",children:"Learning Resources"}),l.jsx("div",{className:"flex gap-4 mb-4",children:l.jsxs("div",{className:"relative flex-grow",children:[l.jsx(tr,{type:"text",placeholder:"Search for learning materials...",value:e,onChange:o=>t(o.target.value),className:"pr-24",onKeyDown:o=>o.key==="Enter"&&r()}),l.jsx(Y,{className:"absolute right-0 top-0 rounded-l-none",onClick:r,children:"Search"})]})}),l.jsxs(ki,{defaultValue:"images",className:"mt-4",children:[l.jsxs(Ci,{className:"w-full max-w-md",children:[l.jsxs(at,{value:"images",className:"flex gap-2 items-center",children:[l.jsx(VM,{className:"h-4 w-4"}),"Images"]}),l.jsxs(at,{value:"videos",className:"flex gap-2 items-center",children:[l.jsx(h_,{className:"h-4 w-4"}),"Videos"]}),l.jsxs(at,{value:"examples",className:"flex gap-2 items-center",children:[l.jsx(o0,{className:"h-4 w-4"}),"Examples"]})]}),l.jsx(ot,{value:"images",className:"mt-4",children:n?l.jsx("div",{className:"h-40 flex items-center justify-center",children:l.jsx("p",{className:"text-muted-foreground",children:"Loading related images..."})}):i.length>0?l.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:i.map(o=>l.jsxs("div",{className:"overflow-hidden rounded-lg border",children:[l.jsx("img",{src:o.url,alt:o.altText,className:"w-full h-48 object-cover"}),l.jsxs("div",{className:"p-2 text-xs text-muted-foreground",children:["Photo by ",o.authorName]})]},o.id))}):l.jsx("div",{className:"h-40 flex items-center justify-center",children:l.jsx("p",{className:"text-muted-foreground",children:"No images found. Try a different search or add an Unsplash API key in settings."})})}),l.jsx(ot,{value:"videos",className:"mt-4",children:n?l.jsx("div",{className:"h-40 flex items-center justify-center",children:l.jsx("p",{className:"text-muted-foreground",children:"Loading related videos..."})}):a.length>0?l.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:a.map(o=>l.jsxs(ne,{className:"overflow-hidden",children:[l.jsx("img",{src:o.thumbnailUrl,alt:o.title,className:"w-full h-48 object-cover"}),l.jsxs(ie,{className:"p-3",children:[l.jsx("h3",{className:"font-medium line-clamp-1",children:o.title}),l.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2 mt-1",children:o.description})]}),l.jsx(jt,{className:"pt-0 pb-3 px-3",children:l.jsx(Y,{variant:"outline",size:"sm",className:"w-full",asChild:!0,children:l.jsxs("a",{href:`https://youtube.com/watch?v=${o.id}`,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1",children:[l.jsx(h_,{className:"h-4 w-4"}),"Watch Video",l.jsx(zM,{className:"h-3 w-3 ml-1"})]})})})]},o.id))}):l.jsx("div",{className:"h-40 flex items-center justify-center",children:l.jsx("p",{className:"text-muted-foreground",children:"No videos found. Try a different search or add a YouTube API key in settings."})})}),l.jsx(ot,{value:"examples",className:"mt-4",children:l.jsxs(ne,{children:[l.jsxs(ce,{children:[l.jsx(he,{children:"Example Sentences"}),l.jsx(ke,{children:"Real-world examples using this term"})]}),l.jsx(ie,{children:e?l.jsx("div",{className:"space-y-4",children:l.jsxs("div",{className:"border rounded-lg p-3",children:[l.jsx("p",{className:"font-medium",children:"Loading examples..."}),l.jsx("p",{className:"text-sm mt-1",children:"This feature requires a Dictionary API key. Add one in the Settings page."})]})}):l.jsx("p",{className:"text-muted-foreground",children:"Search for a word or phrase to see example sentences."})})]})})]})]}),vSe=()=>{const e={name:"Sarah Johnson",email:"[email protected]",avatar:"https://i.pravatar.cc/300?img=47"},[t,r]=v.useState(!1),[n,i]=v.useState(null),[a,o]=v.useState([]),[s,c]=v.useState([]),[u,f]=v.useState(!0),[d,h]=v.useState(""),p=()=>{kt.stopSpeaking()};v.useEffect(()=>{const y=Dt.getApiKey("elevenlabs");return r(!!y),(async()=>{try{const b=await X1e.getWordOfTheDay();i(b),g(b.word)}
712catch(b){console.error("Failed to load word of the day:",b),f(!1)}})(),()=>{p()}},[]),v.useEffect(()=>{const y=()=>{p()},x=()=>{document.visibilityState==="hidden"&&p()};return window.addEventListener("beforeunload",y),document.addEventListener("visibilitychange",x),()=>{window.removeEventListener("beforeunload",y),document.removeEventListener("visibilitychange",x),p()}},[]);const g=async y=>{f(!0);try{if(Dt.getApiKey("unsplash")){const x=await tA.getRelatedImages(y,3);o(x)}if(Dt.getApiKey("youtube")){const x=await tA.getEducationalVideos(`${y} english learning`,2);c(x)}}catch(x){console.error("Failed to load related resources:",x)}finally{f(!1)}},m=()=>{d.trim()&&g(d)};return l.jsxs("div",{className:"min-h-screen bg-background",children:[l.jsx(un,{user:e}),l.jsx(dn,{}),l.jsx("main",{className:"pt-24 pb-16 pl-72 pr-6",children:l.jsx("div",{className:"max-w-7xl mx-auto animate-fade-in",children:l.jsxs("section",{children:[l.jsx(Q1e,{hasElevenLabs:t}),l.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[l.jsx("div",{className:"lg:col-span-2",children:l.jsx(dSe,{hasElevenLabs:t})}),l.jsx("div",{children:l.jsx(mSe,{wordOfTheDay:n,setSearchTerm:h})})]}),l.jsx(gSe,{searchTerm:d,setSearchTerm:h,handleSearch:m,isLoadingResources:u,relatedImages:a,relatedVideos:s})]})})}),l.jsx(oI,{})]})};var yP="Switch",[ySe,HPe]=cn(yP),[xSe,bSe]=ySe(yP),vF=v.forwardRef((e,t)=>{const{__scopeSwitch:r,name:n,checked:i,defaultChecked:a,required:o,disabled:s,value:c="on",onCheckedChange:u,form:f,...d}=e,[h,p]=v.useState(null),g=Ae(t,w=>p(w)),m=v.useRef(!1),y=h?f||!!h.closest("form"):!0,[x=!1,b]=Jn({prop:i,defaultProp:a,onChange:u});return l.jsxs(xSe,{scope:r,checked:x,disabled:s,children:[l.jsx(xe.button,{type:"button",role:"switch","aria-checked":x,"aria-required":o,"data-state":bF(x),"data-disabled":s?"":void 0,disabled:s,value:c,...d,ref:g,onClick:ee(e.onClick,w=>{b(S=>!S),y&&(m.current=w.isPropagationStopped(),m.current||w.stopPropagation())})}),y&&l.jsx(wSe,{control:h,bubbles:!m.current,name:n,value:c,checked:x,required:o,disabled:s,form:f,style:{transform:"translateX(-100%)"}})]})});vF.displayName=yP;var yF="SwitchThumb",xF=v.forwardRef((e,t)=>{const{__scopeSwitch:r,...n}=e,i=bSe(yF,r);return l.jsx(xe.span,{"data-state":bF(i.checked),"data-disabled":i.disabled?"":void 0,...n,ref:t})});xF.displayName=yF;var wSe=e=>{const{control:t,checked:r,bubbles:n=!0,...i}=e,a=v.useRef(null),o=Lf(r),s=Ff(t);return v.useEffect(()=>{const c=a.current,u=window.HTMLInputElement.prototype,d=Object.getOwnPropertyDescriptor(u,"checked").set;if(o!==r&&d){const h=new Event("click",{bubbles:n});d.call(c,r),c.dispatchEvent(h)}},[o,r,n]),l.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...i,tabIndex:-1,ref:a,style:{...e.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function bF(e){return e?"checked":"unchecked"}var wF=vF,SSe=xF;const zo=v.forwardRef(({className:e,...t},r)=>l.jsx(wF,{className:G("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors 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 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...t,ref:r,children:l.jsx(SSe,{className:G("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));zo.displayName=wF.displayName;var SF=["PageUp","PageDown"],jF=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],PF={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},tu="Slider",[Qw,jSe,PSe]=If(tu),[NF,qPe]=cn(tu,[PSe]),[NSe,sy]=NF(tu),_F=v.forwardRef((e,t)=>{const{name:r,min:n=0,max:i=100,step:a=1,orientation:o="horizontal",disabled:s=!1,minStepsBetweenThumbs:c=0,defaultValue:u=[n],value:f,onValueChange:d=()=>{},onValueCommit:h=()=>{},inverted:p=!1,form:g,...m}=e,y=v.useRef(new Set),x=v.useRef(0),w=o==="horizontal"?_Se:OSe,[S=[],j]=Jn({prop:f,defaultProp:u,onChange:C=>{var I;(I=[...y.current][x.current])==null||I.focus(),d(C)}}),P=v.useRef(S);function N(C){const E=TSe(S,C);k(C,E)}function _(C){k(C,x.current)}function O(){const C=P.current[x.current];S[x.current]!==C&&h(S)}function k(C,E,{commit:I}={commit:!1}){const T=RSe(a),$=DSe(Math.round((C-n)/a)*a+n,T),R=$d($,[n,i]);j((U=[])=>{const A=CSe(U,R,E);
vendor: 4,186 bytes, line 712
712if($Se(A,c*a)){x.current=A.indexOf(R);const D=String(A)!==String(U);return D&&I&&h(A),D?A:U}else return U})}return l.jsx(NSe,{scope:e.__scopeSlider,name:r,disabled:s,min:n,max:i,valueIndexToChangeRef:x,thumbs:y.current,values:S,orientation:o,form:g,children:l.jsx(Qw.Provider,{scope:e.__scopeSlider,children:l.jsx(Qw.Slot,{scope:e.__scopeSlider,children:l.jsx(w,{"aria-disabled":s,"data-disabled":s?"":void 0,...m,ref:t,onPointerDown:ee(m.onPointerDown,()=>{s||(P.current=S)}),min:n,max:i,inverted:p,onSlideStart:s?void 0:N,onSlideMove:s?void 0:_,onSlideEnd:s?void 0:O,onHomeKeyDown:()=>!s&&k(n,0,{commit:!0}),onEndKeyDown:()=>!s&&k(i,S.length-1,{commit:!0}),onStepKeyDown:({event:C,direction:E})=>{if(!s){const $=SF.includes(C.key)||C.shiftKey&&jF.includes(C.key)?10:1,R=x.current,U=S[R],A=a*$*E;k(U+A,R,{commit:!0})}}})})})})});_F.displayName=tu;var[OF,EF]=NF(tu,{startEdge:"left",endEdge:"right",size:"width",direction:1}),_Se=v.forwardRef((e,t)=>{const{min:r,max:n,dir:i,inverted:a,onSlideStart:o,onSlideMove:s,onSlideEnd:c,onStepKeyDown:u,...f}=e,[d,h]=v.useState(null),p=Ae(t,w=>h(w)),g=v.useRef(),m=Ds(i),y=m==="ltr",x=y&&!a||!y&&a;function b(w){const S=g.current||d.getBoundingClientRect(),j=[0,S.width],N=xP(j,x?[r,n]:[n,r]);return g.current=S,N(w-S.left)}return l.jsx(OF,{scope:e.__scopeSlider,startEdge:x?"left":"right",endEdge:x?"right":"left",direction:x?1:-1,size:"width",children:l.jsx(kF,{dir:m,"data-orientation":"horizontal",...f,ref:p,style:{...f.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:w=>{const S=b(w.clientX);o==null||o(S)},onSlideMove:w=>{const S=b(w.clientX);s==null||s(S)},onSlideEnd:()=>{g.current=void 0,c==null||c()},onStepKeyDown:w=>{const j=PF[x?"from-left":"from-right"].includes(w.key);u==null||u({event:w,direction:j?-1:1})}})})}),OSe=v.forwardRef((e,t)=>{const{min:r,max:n,inverted:i,onSlideStart:a,onSlideMove:o,onSlideEnd:s,onStepKeyDown:c,...u}=e,f=v.useRef(null),d=Ae(t,f),h=v.useRef(),p=!i;function g(m){const y=h.current||f.current.getBoundingClientRect(),x=[0,y.height],w=xP(x,p?[n,r]:[r,n]);return h.current=y,w(m-y.top)}return l.jsx(OF,{scope:e.__scopeSlider,startEdge:p?"bottom":"top",endEdge:p?"top":"bottom",size:"height",direction:p?1:-1,children:l.jsx(kF,{"data-orientation":"vertical",...u,ref:d,style:{...u.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:m=>{const y=g(m.clientY);a==null||a(y)},onSlideMove:m=>{const y=g(m.clientY);o==null||o(y)},onSlideEnd:()=>{h.current=void 0,s==null||s()},onStepKeyDown:m=>{const x=PF[p?"from-bottom":"from-top"].includes(m.key);c==null||c({event:m,direction:x?-1:1})}})})}),kF=v.forwardRef((e,t)=>{const{__scopeSlider:r,onSlideStart:n,onSlideMove:i,onSlideEnd:a,onHomeKeyDown:o,onEndKeyDown:s,onStepKeyDown:c,...u}=e,f=sy(tu,r);return l.jsx(xe.span,{...u,ref:t,onKeyDown:ee(e.onKeyDown,d=>{d.key==="Home"?(o(d),d.preventDefault()):d.key==="End"?(s(d),d.preventDefault()):SF.concat(jF).includes(d.key)&&(c(d),d.preventDefault())}),onPointerDown:ee(e.onPointerDown,d=>{const h=d.target;h.setPointerCapture(d.pointerId),d.preventDefault(),f.thumbs.has(h)?h.focus():n(d)}),onPointerMove:ee(e.onPointerMove,d=>{d.target.hasPointerCapture(d.pointerId)&&i(d)}),onPointerUp:ee(e.onPointerUp,d=>{const h=d.target;h.hasPointerCapture(d.pointerId)&&(h.releasePointerCapture(d.pointerId),a(d))})})}),CF="SliderTrack",AF=v.forwardRef((e,t)=>{const{__scopeSlider:r,...n}=e,i=sy(CF,r);return l.jsx(xe.span,{"data-disabled":i.disabled?"":void 0,"data-orientation":i.orientation,...n,ref:t})});AF.displayName=CF;var Zw="SliderRange",TF=v.forwardRef((e,t)=>{const{__scopeSlider:r,...n}=e,i=sy(Zw,r),a=EF(Zw,r),o=v.useRef(null),s=Ae(t,o),c=i.values.length,u=i.values.map(h=>IF(h,i.min,i.max)),f=c>1?Math.min(...u):0,d=100-Math.max(...u);return l.jsx(xe.span,{"data-orientation":i.orientation,"data-disabled":i.disabled?"":void 0,...n,ref:s,style:{...e.style,[a.startEdge]:f+"%",[a.endEdge]:d+"%"}})});TF.displayName=Zw;var Jw="SliderThumb",MF=v.forwardRef((e,t)=>{const r=jSe(e.__scopeSlider),[n,i]=v.useState(null),a=Ae(t,s=>i(s)),o=v.useMemo(()=>n?r().findIndex(s=>s.ref.current===n):-1,[r,n]);return l.jsx(ESe,{...e,ref:a,index:o})}),ESe=v.forwardRef((e,t)=>
712{const{__scopeSlider:r,index:n,name:i,...a}=e,o=sy(Jw,r),s=EF(Jw,r),[c,u]=v.useState(null),f=Ae(t,b=>u(b)),d=c?o.form||!!c.closest("form"):!0,h=Ff(c),p=o.values[n],g=p===void 0?0:IF(p,o.min,o.max),m=ASe(n,o.values.length),y=h==null?void 0:h[s.size],x=y?MSe(y,g,s.direction):0;return v.useEffect(()=>{if(c)return o.thumbs.add(c),()=>{o.thumbs.delete(c)}},[c,o.thumbs]),l.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[s.startEdge]:`calc(${g}% + ${x}px)`},children:[l.jsx(Qw.ItemSlot,{scope:e.__scopeSlider,children:l.jsx(xe.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,...a,ref:f,style:p===void 0?{display:"none"}:e.style,onFocus:ee(e.onFocus,()=>{o.valueIndexToChangeRef.current=n})})}),d&&l.jsx(kSe,{name:i??(o.name?o.name+(o.values.length>1?"[]":""):void 0),form:o.form,value:p},n)]})});MF.displayName=Jw;var kSe=e=>{const{value:t,...r}=e,n=v.useRef(null),i=Lf(t);return v.useEffect(()=>{const a=n.current,o=window.HTMLInputElement.prototype,c=Object.getOwnPropertyDescriptor(o,"value").set;if(i!==t&&c){const u=new Event("input",{bubbles:!0});c.call(a,t),a.dispatchEvent(u)}},[i,t]),l.jsx("input",{style:{display:"none"},...r,ref:n,defaultValue:t})};function CSe(e=[],t,r){const n=[...e];return n[r]=t,n.sort((i,a)=>i-a)}function IF(e,t,r){const a=100/(r-t)*(e-t);return $d(a,[0,100])}function ASe(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function TSe(e,t){if(e.length===1)return 0;const r=e.map(i=>Math.abs(i-t)),n=Math.min(...r);return r.indexOf(n)}function MSe(e,t,r){const n=e/2,a=xP([0,50],[0,n]);return(n-a(t)*r)*r}function ISe(e){return e.slice(0,-1).map((t,r)=>e[r+1]-t)}function $Se(e,t){if(t>0){const r=ISe(e);return Math.min(...r)>=t}return!0}function xP(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 RSe(e){return(String(e).split(".")[1]||"").length}function DSe(e,t){const r=Math.pow(10,t);return Math.round(e*r)/r}var $F=_F,LSe=AF,FSe=TF,BSe=MF;const RF=v.forwardRef(({className:e,...t},r)=>l.jsxs($F,{ref:r,className:G("relative flex w-full touch-none select-none items-center",e),...t,children:[l.jsx(LSe,{className:"relative h-2 w-full grow overflow-hidden rounded-full bg-secondary",children:l.jsx(FSe,{className:"absolute h-full bg-primary"})}),l.jsx(BSe,{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"})]}));RF.displayName=$F.displayName;var USe=[" ","Enter","ArrowUp","ArrowDown"],zSe=[" ","Enter"],ah="Select",[ly,cy,WSe]=If(ah),[ru,KPe]=cn(ah,[WSe,iv]),uy=iv(),[VSe,ko]=ru(ah),[HSe,qSe]=ru(ah),DF=e=>{const{__scopeSelect:t,children:r,open:n,defaultOpen:i,onOpenChange:a,value:o,defaultValue:s,onValueChange:c,dir:u,name:f,autoComplete:d,disabled:h,required:p,form:g}=e,m=uy(t),[y,x]=v.useState(null),[b,w]=v.useState(null),[S,j]=v.useState(!1),P=Ds(u),[N=!1,_]=Jn({prop:n,defaultProp:i,onChange:a}),[O,k]=Jn({prop:o,defaultProp:s,onChange:c}),C=v.useRef(null),E=y?g||!!y.closest("form"):!0,[I,T]=v.useState(new Set),$=Array.from(I).map(R=>R.props.value).join(";");return l.jsx(u$,{...m,children:l.jsxs(VSe,{required:p,scope:t,trigger:y,onTriggerChange:x,valueNode:b,onValueNodeChange:w,valueNodeHasChildren:S,onValueNodeHasChildrenChange:j,contentId:bi(),value:O,onValueChange:k,open:N,onOpenChange:_,dir:P,triggerPointerDownPosRef:C,disabled:h,children:[l.jsx(ly.Provider,{scope:t,children:l.jsx(HSe,{scope:e.__scopeSelect,onNativeOptionAdd:v.useCallback(R=>{T(U=>new Set(U).add(R))},[]),onNativeOptionRemove:v.useCallback(R=>{T(U=>{const A=new Set(U);return A.delete(R),A})},[]),children:r})}),E?l.jsxs(l5,{"aria-hidden":!0,required:p,tabIndex:-1,name:f,autoComplete:d,value:O,onChange:R=>k(R.target.value),disabled:h,form:g,children:[O===void 0?l.jsx("option",{value:""}):null,Array.from(I)]},$):null]})})};DF.displayName=ah;var LF="SelectTrigger",FF=v.forwardRef((e,t)=>
vendor: 16,793 bytes, line 712
712{const{__scopeSelect:r,disabled:n=!1,...i}=e,a=uy(r),o=ko(LF,r),s=o.disabled||n,c=Ae(t,o.onTriggerChange),u=cy(r),f=v.useRef("touch"),[d,h,p]=c5(m=>{const y=u().filter(w=>!w.disabled),x=y.find(w=>w.value===o.value),b=u5(y,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 l.jsx(d$,{asChild:!0,...a,children:l.jsx(xe.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":s5(o.value)?"":void 0,...i,ref:c,onClick:ee(i.onClick,m=>{m.currentTarget.focus(),f.current!=="mouse"&&g(m)}),onPointerDown:ee(i.onPointerDown,m=>{f.current=m.pointerType;const y=m.target;y.hasPointerCapture(m.pointerId)&&y.releasePointerCapture(m.pointerId),m.button===0&&m.ctrlKey===!1&&m.pointerType==="mouse"&&(g(m),m.preventDefault())}),onKeyDown:ee(i.onKeyDown,m=>{const y=d.current!=="";!(m.ctrlKey||m.altKey||m.metaKey)&&m.key.length===1&&h(m.key),!(y&&m.key===" ")&&USe.includes(m.key)&&(g(),m.preventDefault())})})})});FF.displayName=LF;var BF="SelectValue",UF=v.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:i,children:a,placeholder:o="",...s}=e,c=ko(BF,r),{onValueNodeHasChildrenChange:u}=c,f=a!==void 0,d=Ae(t,c.onValueNodeChange);return Gt(()=>{u(f)},[u,f]),l.jsx(xe.span,{...s,ref:d,style:{pointerEvents:"none"},children:s5(c.value)?l.jsx(l.Fragment,{children:o}):a})});UF.displayName=BF;var KSe="SelectIcon",zF=v.forwardRef((e,t)=>{const{__scopeSelect:r,children:n,...i}=e;return l.jsx(xe.span,{"aria-hidden":!0,...i,ref:t,children:n||"â¼"})});zF.displayName=KSe;var GSe="SelectPortal",WF=e=>l.jsx(Rf,{asChild:!0,...e});WF.displayName=GSe;var Es="SelectContent",VF=v.forwardRef((e,t)=>{const r=ko(Es,e.__scopeSelect),[n,i]=v.useState();if(Gt(()=>{i(new DocumentFragment)},[]),!r.open){const a=n;return a?Ms.createPortal(l.jsx(HF,{scope:e.__scopeSelect,children:l.jsx(ly.Slot,{scope:e.__scopeSelect,children:l.jsx("div",{children:e.children})})}),a):null}return l.jsx(qF,{...e,ref:t})});VF.displayName=Es;var Dn=10,[HF,Co]=ru(Es),YSe="SelectContentImpl",qF=v.forwardRef((e,t)=>{const{__scopeSelect:r,position:n="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:a,onPointerDownOutside:o,side:s,sideOffset:c,align:u,alignOffset:f,arrowPadding:d,collisionBoundary:h,collisionPadding:p,sticky:g,hideWhenDetached:m,avoidCollisions:y,...x}=e,b=ko(Es,r),[w,S]=v.useState(null),[j,P]=v.useState(null),N=Ae(t,se=>S(se)),[_,O]=v.useState(null),[k,C]=v.useState(null),E=cy(r),[I,T]=v.useState(!1),$=v.useRef(!1);v.useEffect(()=>{if(w)return VS(w)},[w]),$S();const R=v.useCallback(se=>{const[Me,...X]=E().map(q=>q.ref.current),[le]=X.slice(-1),fe=document.activeElement;for(const q of se)if(q===fe||(q==null||q.scrollIntoView({block:"nearest"}),q===Me&&j&&(j.scrollTop=0),q===le&&j&&(j.scrollTop=j.scrollHeight),q==null||q.focus(),document.activeElement!==fe))return},[E,j]),U=v.useCallback(()=>R([_,w]),[R,_,w]);v.useEffect(()=>{I&&U()},[I,U]);const{onOpenChange:A,triggerPointerDownPosRef:D}=b;v.useEffect(()=>{if(w){let se={x:0,y:0};const Me=le=>{var fe,q;se={x:Math.abs(Math.round(le.pageX)-(((fe=D.current)==null?void 0:fe.x)??0)),y:Math.abs(Math.round(le.pageY)-(((q=D.current)==null?void 0:q.y)??0))}},X=le=>{se.x<=10&&se.y<=10?le.preventDefault():w.contains(le.target)||A(!1),document.removeEventListener("pointermove",Me),D.current=null};return D.current!==null&&(document.addEventListener("pointermove",Me),document.addEventListener("pointerup",X,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Me),document.removeEventListener("pointerup",X,{capture:!0})}}},[w,A,D]),v.useEffect(()=>{const se=()=>A(!1);return window.addEventListener("blur",se),window.addEventListener("resize",se),()=>{window.removeEventListener("blur",se),window.removeEventListener("resize",se)}},[A]);const[F,z]=c5(se=>{const Me=E().filter(fe=>!fe.disabled),X=Me.find(fe=>fe.ref.current===document.activeElement),le=u5(Me,se,X);le&&setTimeout(()=>le.ref.current.focus())}),H=v.useCallback((se,Me,X)=>{const le=!$.current&&!X;(b.value!==void 0&&b.value===Me||le)&&(O(se),le&&($.current=!0))},[b.value]),ue=v.useCallback(()=>w==null?void 0:w.focus(),[w]),be=v.useCallback((se,Me,X)=>{const le=!$.current&&!X;(b.value!==void 0&&b.value===Me||le)&&C(se)},[b.value]),Le=n==="popper"?e1:KF,Be=Le===e1?{side:s,sideOffset:c,align:u,alignOffset:f,arrowPadding:d,collisionBoundary:h,collisionPadding:p,sticky:g,hideWhenDetached:m,avoidCollisions:y}:{};return l.jsx(HF,{scope:r,content:w,viewport:j,onViewportChange:P,itemRefCallback:H,selectedItem:_,onItemLeave:ue,itemTextRefCallback:be,focusSelectedItem:U,selectedItemText:k,position:n,isPositioned:I,searchRef:F,children:l.jsx(ov,{as:ha,allowPinchZoom:!0,children:l.jsx(ev,{asChild:!0,trapped:b.open,onMountAutoFocus:se=>{se.preventDefault()},onUnmountAutoFocus:ee(i,se=>{var Me;(Me=b.trigger)==null||Me.focus({preventScroll:!0}),se.preventDefault()}),children:l.jsx($f,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:se=>se.preventDefault(),onDismiss:()=>b.onOpenChange(!1),children:l.jsx(Le,{role:"listbox",id:b.contentId,"data-state":b.open?"open":"closed",dir:b.dir,onContextMenu:se=>se.preventDefault(),...x,...Be,onPlaced:()=>T(!0),ref:N,style:{display:"flex",flexDirection:"column",outline:"none",...x.style},onKeyDown:ee(x.onKeyDown,se=>{const Me=se.ctrlKey||se.altKey||se.metaKey;if(se.key==="Tab"&&se.preventDefault(),!Me&&se.key.length===1&&z(se.key),["ArrowUp","ArrowDown","Home","End"].includes(se.key)){let le=E().filter(fe=>!fe.disabled).map(fe=>fe.ref.current);if(["ArrowUp","End"].includes(se.key)&&(le=le.slice().reverse()),["ArrowUp","ArrowDown"].includes(se.key)){const fe=se.target,q=le.indexOf(fe);le=le.slice(q+1)}setTimeout(()=>R(le)),se.preventDefault()}})})})})})})});qF.displayName=YSe;var XSe="SelectItemAlignedPosition",KF=v.forwardRef((e,t)=>{const{__scopeSelect:r,onPlaced:n,...i}=e,a=ko(Es,r),o=Co(Es,r),[s,c]=v.useState(null),[u,f]=v.useState(null),d=Ae(t,N=>f(N)),h=cy(r),p=v.useRef(!1),g=v.useRef(!0),{viewport:m,selectedItem:y,selectedItemText:x,focusSelectedItem:b}=o,w=v.useCallback(()=>{if(a.trigger&&a.valueNode&&s&&u&&m&&y&&x){const N=a.trigger.getBoundingClientRect(),_=u.getBoundingClientRect(),O=a.valueNode.getBoundingClientRect(),k=x.getBoundingClientRect();if(a.dir!=="rtl"){const fe=k.left-_.left,q=O.left-fe,Ue=N.left-q,Oe=N.width+Ue,lt=Math.max(Oe,_.width),it=window.innerWidth-Dn,Mt=$d(q,[Dn,Math.max(Dn,it-lt)]);s.style.minWidth=Oe+"px",s.style.left=Mt+"px"}else{const fe=_.right-k.right,q=window.innerWidth-O.right-fe,Ue=window.innerWidth-N.right-q,Oe=N.width+Ue,lt=Math.max(Oe,_.width),it=window.innerWidth-Dn,Mt=$d(q,[Dn,Math.max(Dn,it-lt)]);s.style.minWidth=Oe+"px",s.style.right=Mt+"px"}const C=h(),E=window.innerHeight-Dn*2,I=m.scrollHeight,T=window.getComputedStyle(u),$=parseInt(T.borderTopWidth,10),R=parseInt(T.paddingTop,10),U=parseInt(T.borderBottomWidth,10),A=parseInt(T.paddingBottom,10),D=$+R+I+A+U,F=Math.min(y.offsetHeight*5,D),z=window.getComputedStyle(m),H=parseInt(z.paddingTop,10),ue=parseInt(z.paddingBottom,10),be=N.top+N.height/2-Dn,Le=E-be,Be=y.offsetHeight/2,se=y.offsetTop+Be,Me=$+R+se,X=D-Me;if(Me<=be){const fe=C.length>0&&y===C[C.length-1].ref.current;s.style.bottom="0px";const q=u.clientHeight-m.offsetTop-m.offsetHeight,Ue=Math.max(Le,Be+(fe?ue:0)+q+U),Oe=Me+Ue;s.style.height=Oe+"px"}else{const fe=C.length>0&&y===C[0].ref.current;s.style.top="0px";const Ue=Math.max(be,$+m.offsetTop+(fe?H:0)+Be)+X;s.style.height=Ue+"px",m.scrollTop=Me-be+m.offsetTop}s.style.margin=`${Dn}px 0`,s.style.minHeight=F+"px",s.style.maxHeight=E+"px",n==null||n(),requestAnimationFrame(()=>p.current=!0)}},[h,a.trigger,a.valueNode,s,u,m,y,x,a.dir,n]);Gt(()=>w(),[w]);const[S,j]=v.useState();Gt(()=>{u&&j(window.getComputedStyle(u).zIndex)},[u]);const P=v.useCallback(N=>{N&&g.current===!0&&(w(),b==null||b(),g.current=!1)},[w,b]);return l.jsx(ZSe,{scope:r,contentWrapper:s,shouldExpandOnScrollRef:p,onScrollButtonChange:P,children:l.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:S},children:l.jsx(xe.div,{...i,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})});KF.displayName=XSe;var QSe="SelectPopperPosition",e1=v.forwardRef((e,t)=>{const{__scopeSelect:r,align:n="start",collisionPadding:i=Dn,...a}=e,o=uy(r);return l.jsx(f$,{...o,...a,ref:t,align:n,collisionPadding:i,style:{boxSizing:"border-box",...a.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)"}})});e1.displayName=QSe;var[ZSe,bP]=ru(Es,{}),t1="SelectViewport",GF=v.forwardRef((e,t)=>{const{__scopeSelect:r,nonce:n,...i}=e,a=Co(t1,r),o=bP(t1,r),s=Ae(t,a.onViewportChange),c=v.useRef(0);return l.jsxs(l.Fragment,{children:[l.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}),l.jsx(ly.Slot,{scope:r,children:l.jsx(xe.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:s,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:ee(i.onScroll,u=>{const f=u.currentTarget,{contentWrapper:d,shouldExpandOnScrollRef:h}=o;if(h!=null&&h.current&&d){const p=Math.abs(c.current-f.scrollTop);if(p>0){const g=window.innerHeight-Dn*2,m=parseFloat(d.style.minHeight),y=parseFloat(d.style.height),x=Math.max(m,y);if(x<g){const b=x+p,w=Math.min(g,b),S=b-w;d.style.height=w+"px",d.style.bottom==="0px"&&(f.scrollTop=S>0?S:0,d.style.justifyContent="flex-end")}}}c.current=f.scrollTop})})})]})});GF.displayName=t1;var YF="SelectGroup",[JSe,eje]=ru(YF),tje=v.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,i=bi();return l.jsx(JSe,{scope:r,id:i,children:l.jsx(xe.div,{role:"group","aria-labelledby":i,...n,ref:t})})});tje.displayName=YF;var XF="SelectLabel",QF=v.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,i=eje(XF,r);return l.jsx(xe.div,{id:i.id,...n,ref:t})});QF.displayName=XF;var dg="SelectItem",[rje,ZF]=ru(dg),JF=v.forwardRef((e,t)=>{const{__scopeSelect:r,value:n,disabled:i=!1,textValue:a,...o}=e,s=ko(dg,r),c=Co(dg,r),u=s.value===n,[f,d]=v.useState(a??""),[h,p]=v.useState(!1),g=Ae(t,b=>{var w;return(w=c.itemRefCallback)==null?void 0:w.call(c,b,n,i)}),m=bi(),y=v.useRef("touch"),x=()=>{i||(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 l.jsx(rje,{scope:r,value:n,disabled:i,textId:m,isSelected:u,onItemTextChange:v.useCallback(b=>{d(w=>w||((b==null?void 0:b.textContent)??"").trim())},[]),children:l.jsx(ly.ItemSlot,{scope:r,value:n,disabled:i,textValue:f,children:l.jsx(xe.div,{role:"option","aria-labelledby":m,"data-highlighted":h?"":void 0,"aria-selected":u&&h,"data-state":u?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...o,ref:g,onFocus:ee(o.onFocus,()=>p(!0)),onBlur:ee(o.onBlur,()=>p(!1)),onClick:ee(o.onClick,()=>{y.current!=="mouse"&&x()}),onPointerUp:ee(o.onPointerUp,()=>{y.current==="mouse"&&x()}),onPointerDown:ee(o.onPointerDown,b=>{y.current=b.pointerType}),onPointerMove:ee(o.onPointerMove,b=>{var w;y.current=b.pointerType,i?(w=c.onItemLeave)==null||w.call(c):y.current==="mouse"&&b.currentTarget.focus({preventScroll:!0})}),onPointerLeave:ee(o.onPointerLeave,b=>{var w;b.currentTarget===document.activeElement&&((w=c.onItemLeave)==null||w.call(c))}),onKeyDown:ee(o.onKeyDown,b=>{var S;((S=c.searchRef)==null?void 0:S.current)!==""&&b.key===" "||(zSe.includes(b.key)&&x(),b.key===" "&&b.preventDefault())})})})})});JF.displayName=dg;var $u="SelectItemText",e5=v.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:i,...a}=e,o=ko($u,r),s=Co($u,r),c=ZF($u,r),u=qSe($u,r),[f,d]=v.useState(null),h=Ae(t,x=>d(x),c.onItemTextChange,x=>{var b;return(b=s.itemTextRefCallback)==null?void 0:b.call(s,x,c.value,c.disabled)}),p=f==null?void 0:f.textContent,g=v.useMemo(()=>l.jsx("option",{value:c.value,disabled:c.disabled,children:p},c.value),[c.disabled,c.value,p]),{onNativeOptionAdd:m,onNativeOptionRemove:y}=u;return Gt(()=>(m(g),()=>y(g)),[m,y,g]),l.jsxs(l.Fragment,{children:[l.jsx(xe.span,{id:c.textId,...a,ref:h}),c.isSelected&&o.valueNode&&!o.valueNodeHasChildren?Ms.createPortal(a.children,o.valueNode):null]})});e5.displayName=$u;var t5="SelectItemIndicator",r5=v.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return ZF(t5,r).isSelected?l.jsx(xe.span,{"aria-hidden":!0,...n,ref:t}):null});r5.displayName=t5;var r1="SelectScrollUpButton",n5=v.forwardRef((e,t)=>{const r=Co(r1,e.__scopeSelect),n=bP(r1,e.__scopeSelect),[i,a]=v.useState(!1),o=Ae(t,n.onScrollButtonChange);return Gt(()=>{if(r.viewport&&r.isPositioned){let s=function(){const u=c.scrollTop>0;a(u)};const c=r.viewport;return s(),c.addEventListener("scroll",s),()=>c.removeEventListener("scroll",s)}},[r.viewport,r.isPositioned]),i?l.jsx(a5,{...e,ref:o,onAutoScroll:()=>{const{viewport:s,selectedItem:c}=r;s&&c&&(s.scrollTop=s.scrollTop-c.offsetHeight)}}):null});n5.displayName=r1;var n1="SelectScrollDownButton",i5=v.forwardRef((e,t)=>{const r=Co(n1,e.__scopeSelect),n=bP(n1,e.__scopeSelect),[i,a]=v.useState(!1),o=Ae(t,n.onScrollButtonChange);return Gt(()=>{if(r.viewport&&r.isPositioned){let s=function(){const u=c.scrollHeight-c.clientHeight,f=Math.ceil(c.scrollTop)<u;a(f)};const c=r.viewport;return s(),c.addEventListener("scroll",s),()=>c.removeEventListener("scroll",s)}},[r.viewport,r.isPositioned]),i?l.jsx(a5,{...e,ref:o,onAutoScroll:()=>{const{viewport:s,selectedItem:c}=r;s&&c&&(s.scrollTop=s.scrollTop+c.offsetHeight)}}):null});i5.displayName=n1;var a5=v.forwardRef((e,t)=>{const{__scopeSelect:r,onAutoScroll:n,...i}=e,a=Co("SelectScrollButton",r),o=v.useRef(null),s=cy(r),c=v.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return v.useEffect(()=>()=>c(),[c]),Gt(()=>{var f;const u=s().find(d=>d.ref.current===document.activeElement);(f=u==null?void 0:u.ref.current)==null||f.scrollIntoView({block:"nearest"})},[s]),l.jsx(xe.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:ee(i.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(n,50))}),onPointerMove:ee(i.onPointerMove,()=>{var u;(u=a.onItemLeave)==null||u.call(a),o.current===null&&(o.current=window.setInterval(n,50))}),onPointerLeave:ee(i.onPointerLeave,()=>{c()})})}),nje="SelectSeparator",o5=v.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return l.jsx(xe.div,{"aria-hidden":!0,...n,ref:t})});o5.displayName=nje;var i1="SelectArrow",ije=v.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,i=uy(r),a=ko(i1,r),o=Co(i1,r);return a.open&&o.position==="popper"?l.jsx(h$,{...i,...n,ref:t}):null});ije.displayName=i1;function s5(e){return e===""||e===void 0}var l5=v.forwardRef((e,t)=>{const{value:r,...n}=e,i=v.useRef(null),a=Ae(t,i),o=Lf(r);return v.useEffect(()=>{const s=i.current,c=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(c,"value").set;if(o!==r&&f){const d=new Event("change",{bubbles:!0});f.call(s,r),s.dispatchEvent(d)}},[o,r]),l.jsx(Gg,{asChild:!0,children:l.jsx("select",{...n,ref:a,defaultValue:r})})});l5.displayName="BubbleSelect";function c5(e){const t=yt(e),r=v.useRef(""),n=v.useRef(0),i=v.useCallback(o=>{const s=r.current+o;t(s),function c(u){r.current=u,window.clearTimeout(n.current),u!==""&&(n.current=window.setTimeout(()=>c(""),1e3))}(s)},[t]),a=v.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return v.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,i,a]}function u5(e,t,r){const i=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,a=r?e.indexOf(r):-1;let o=aje(e,Math.max(a,0));i.length===1&&(o=o.filter(u=>u!==r));const c=o.find(u=>u.textValue.toLowerCase().startsWith(i.toLowerCase()));return c!==r?c:void 0}function aje(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var oje=DF,d5=FF,sje=UF,lje=zF,cje=WF,f5=VF,uje=GF,h5=QF,p5=JF,dje=e5,fje=r5,m5=n5,g5=i5,v5=o5;const Xh=oje,Qh=sje,Ru=v.forwardRef(({className:e,children:t,...r},n)=>l.jsxs(d5,{ref:n,className:G("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm r
712ing-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,l.jsx(lje,{asChild:!0,children:l.jsx(BM,{className:"h-4 w-4 opacity-50"})})]}));Ru.displayName=d5.displayName;const y5=v.forwardRef(({className:e,...t},r)=>l.jsx(m5,{ref:r,className:G("flex cursor-default items-center justify-center py-1",e),...t,children:l.jsx(SW,{className:"h-4 w-4"})}));y5.displayName=m5.displayName;const x5=v.forwardRef(({className:e,...t},r)=>l.jsx(g5,{ref:r,className:G("flex cursor-default items-center justify-center py-1",e),...t,children:l.jsx(BM,{className:"h-4 w-4"})}));x5.displayName=g5.displayName;const Du=v.forwardRef(({className:e,children:t,position:r="popper",...n},i)=>l.jsx(cje,{children:l.jsxs(f5,{ref:i,className:G("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:[l.jsx(y5,{}),l.jsx(uje,{className:G("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),l.jsx(x5,{})]})}));Du.displayName=f5.displayName;const hje=v.forwardRef(({className:e,...t},r)=>l.jsx(h5,{ref:r,className:G("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));hje.displayName=h5.displayName;const hr=v.forwardRef(({className:e,children:t,...r},n)=>l.jsxs(p5,{ref:n,className:G("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...r,children:[l.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:l.jsx(fje,{children:l.jsx(ra,{className:"h-4 w-4"})})}),l.jsx(dje,{children:t})]}));hr.displayName=p5.displayName;const pje=v.forwardRef(({className:e,...t},r)=>l.jsx(v5,{ref:r,className:G("-mx-1 my-1 h-px bg-muted",e),...t}));pje.displayName=v5.displayName;var oh=e=>e.type==="checkbox",rs=e=>e instanceof Date,_r=e=>e==null;const b5=e=>typeof e=="object";var Tt=e=>!_r(e)&&!Array.isArray(e)&&b5(e)&&!rs(e),w5=e=>Tt(e)&&e.target?oh(e.target)?e.target.checked:e.target.value:e,mje=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,S5=(e,t)=>e.has(mje(t)),gje=e=>{const t=e.constructor&&e.constructor.prototype;return Tt(t)&&t.hasOwnProperty("isPrototypeOf")},wP=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function $r(e){let t;const r=Array.isArray(e);if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(wP&&(e instanceof Blob||e instanceof FileList))&&(r||Tt(e)))if(t=r?[]:{},!r&&!gje(e))t=e;else for(const n in e)e.hasOwnProperty(n)&&(t[n]=$r(e[n]));else return e;return t}var dy=e=>Array.isArray(e)?e.filter(Boolean):[],Ot=e=>e===void 0,re=(e,t,r)=>{if(!t||!Tt(e))return r;const n=dy(t.split(/[,[\].]+?/)).reduce((i,a)=>_r(i)?i:i[a],e);return Ot(n)||n===e?Ot(e[t])?r:e[t]:n},vn=e=>typeof e=="boolean",SP=e=>/^\w*$/.test(e),j5=e=>dy(e.replace(/["|']|\]/g,"").split(/\.|\[/)),Xe=(e,t,r)=>{let n=-1;const i=SP(t)?[t]:j5(t),a=i.length,o=a-1;for(;++n<a;){const s=i[n];let c=r;if(n!==o){const u=e[s];
vendor: 34,425 bytes, line 712
712c=Tt(u)||Array.isArray(u)?u:isNaN(+i[n+1])?{}:[]}if(s==="__proto__")return;e[s]=c,e=e[s]}return e};const fg={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Kn={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Di={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},P5=M.createContext(null),fy=()=>M.useContext(P5),vje=e=>{const{children:t,...r}=e;return M.createElement(P5.Provider,{value:r},t)};var N5=(e,t,r,n=!0)=>{const i={defaultValues:t._defaultValues};for(const a in e)Object.defineProperty(i,a,{get:()=>{const o=a;return t._proxyFormState[o]!==Kn.all&&(t._proxyFormState[o]=!n||Kn.all),r&&(r[o]=!0),e[o]}});return i},Lr=e=>Tt(e)&&!Object.keys(e).length,_5=(e,t,r,n)=>{r(e);const{name:i,...a}=e;return Lr(a)||Object.keys(a).length>=Object.keys(t).length||Object.keys(a).find(o=>t[o]===(!n||Kn.all))},ad=e=>Array.isArray(e)?e:[e],O5=(e,t,r)=>!e||!t||e===t||ad(e).some(n=>n&&(r?n===t:n.startsWith(t)||t.startsWith(n)));function jP(e){const t=M.useRef(e);t.current=e,M.useEffect(()=>{const r=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{r&&r.unsubscribe()}},[e.disabled])}function yje(e){const t=fy(),{control:r=t.control,disabled:n,name:i,exact:a}=e||{},[o,s]=M.useState(r._formState),c=M.useRef(!0),u=M.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),f=M.useRef(i);return f.current=i,jP({disabled:n,next:d=>c.current&&O5(f.current,d.name,a)&&_5(d,u.current,r._updateFormState)&&s({...r._formState,...d}),subject:r._subjects.state}),M.useEffect(()=>(c.current=!0,u.current.isValid&&r._updateValid(!0),()=>{c.current=!1}),[r]),N5(o,r,u.current,!1)}var vi=e=>typeof e=="string",E5=(e,t,r,n,i)=>vi(e)?(n&&t.watch.add(e),re(r,e,i)):Array.isArray(e)?e.map(a=>(n&&t.watch.add(a),re(r,a))):(n&&(t.watchAll=!0),r);function xje(e){const t=fy(),{control:r=t.control,name:n,defaultValue:i,disabled:a,exact:o}=e||{},s=M.useRef(n);s.current=n,jP({disabled:a,subject:r._subjects.values,next:f=>{O5(s.current,f.name,o)&&u($r(E5(s.current,r._names,f.values||r._formValues,!1,i)))}});const[c,u]=M.useState(r._getWatch(n,i));return M.useEffect(()=>r._removeUnmounted()),c}function bje(e){const t=fy(),{name:r,disabled:n,control:i=t.control,shouldUnregister:a}=e,o=S5(i._names.array,r),s=xje({control:i,name:r,defaultValue:re(i._formValues,r,re(i._defaultValues,r,e.defaultValue)),exact:!0}),c=yje({control:i,name:r,exact:!0}),u=M.useRef(i.register(r,{...e.rules,value:s,...vn(e.disabled)?{disabled:e.disabled}:{}}));return M.useEffect(()=>{const f=i._options.shouldUnregister||a,d=(h,p)=>{const g=re(i._fields,h);g&&g._f&&(g._f.mount=p)};if(d(r,!0),f){const h=$r(re(i._options.defaultValues,r));Xe(i._defaultValues,r,h),Ot(re(i._formValues,r))&&Xe(i._formValues,r,h)}return()=>{(o?f&&!i._state.action:f)?i.unregister(r):d(r,!1)}},[r,i,o,a]),M.useEffect(()=>{re(i._fields,r)&&i._updateDisabledField({disabled:n,fields:i._fields,name:r,value:re(i._fields,r)._f.value})},[n,r,i]),{field:{name:r,value:s,...vn(n)||c.disabled?{disabled:c.disabled||n}:{},onChange:M.useCallback(f=>u.current.onChange({target:{value:w5(f),name:r},type:fg.CHANGE}),[r]),onBlur:M.useCallback(()=>u.current.onBlur({target:{value:re(i._formValues,r),name:r},type:fg.BLUR}),[r,i]),ref:M.useCallback(f=>{const d=re(i._fields,r);d&&f&&(d._f.ref={focus:()=>f.focus(),select:()=>f.select(),setCustomValidity:h=>f.setCustomValidity(h),reportValidity:()=>f.reportValidity()})},[i._fields,r])},formState:c,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!re(c.errors,r)},isDirty:{enumerable:!0,get:()=>!!re(c.dirtyFields,r)},isTouched:{enumerable:!0,get:()=>!!re(c.touchedFields,r)},isValidating:{enumerable:!0,get:()=>!!re(c.validatingFields,r)},error:{enumerable:!0,get:()=>re(c.errors,r)}})}}const wje=e=>e.render(bje(e));var k5=(e,t,r,n,i)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[n]:i||!0}}:{},iA=e=>({isOnSubmit:!e||e===Kn.onSubmit,isOnBlur:e===Kn.onBlur,isOnChange:e===Kn.onChange,isOnAll:e===Kn.all,isOnTouch:e===Kn.onTouched}),aA=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(n=>e.startsWith(n)&&/^\.\w+/.test(e.slice(n.length))));const od=(e,t,r,n)=>{for(const i of r||Object.keys(e)){const a=re(e,i);if(a){const{_f:o,...s}=a;if(o){if(o.refs&&o.refs[0]&&t(o.refs[0],i)&&!n)return!0;if(o.ref&&t(o.ref,o.name)&&!n)return!0;if(od(s,t))break}else if(Tt(s)&&od(s,t))break}}};var Sje=(e,t,r)=>{const n=ad(re(e,r));return Xe(n,"root",t[r]),Xe(e,r,n),e},PP=e=>e.type==="file",Ji=e=>typeof e=="function",hg=e=>{if(!wP)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},xp=e=>vi(e),NP=e=>e.type==="radio",pg=e=>e instanceof RegExp;const oA={value:!1,isValid:!1},sA={value:!0,isValid:!0};var C5=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(r=>r&&r.checked&&!r.disabled).map(r=>r.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!Ot(e[0].attributes.value)?Ot(e[0].value)||e[0].value===""?sA:{value:e[0].value,isValid:!0}:sA:oA}return oA};const lA={isValid:!1,value:null};var A5=e=>Array.isArray(e)?e.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,lA):lA;function cA(e,t,r="validate"){if(xp(e)||Array.isArray(e)&&e.every(xp)||vn(e)&&!e)return{type:r,message:xp(e)?e:"",ref:t}}var Zs=e=>Tt(e)&&!pg(e)?e:{value:e,message:""},uA=async(e,t,r,n,i)=>{const{ref:a,refs:o,required:s,maxLength:c,minLength:u,min:f,max:d,pattern:h,validate:p,name:g,valueAsNumber:m,mount:y,disabled:x}=e._f,b=re(t,g);if(!y||x)return{};const w=o?o[0]:a,S=E=>{n&&w.reportValidity&&(w.setCustomValidity(vn(E)?"":E||""),w.reportValidity())},j={},P=NP(a),N=oh(a),_=P||N,O=(m||PP(a))&&Ot(a.value)&&Ot(b)||hg(a)&&a.value===""||b===""||Array.isArray(b)&&!b.length,k=k5.bind(null,g,r,j),C=(E,I,T,$=Di.maxLength,R=Di.minLength)=>{const U=E?I:T;j[g]={type:E?$:R,message:U,ref:a,...k(E?$:R,U)}};if(i?!Array.isArray(b)||!b.length:s&&(!_&&(O||_r(b))||vn(b)&&!b||N&&!C5(o).isValid||P&&!A5(o).isValid)){const{value:E,message:I}=xp(s)?{value:!!s,message:s}:Zs(s);if(E&&(j[g]={type:Di.required,message:I,ref:w,...k(Di.required,I)},!r))return S(I),j}if(!O&&(!_r(f)||!_r(d))){let E,I;const T=Zs(d),$=Zs(f);if(!_r(b)&&!isNaN(b)){const R=a.valueAsNumber||b&&+b;_r(T.value)||(E=R>T.value),_r($.value)||(I=R<$.value)}else{const R=a.valueAsDate||new Date(b),U=F=>new Date(new Date().toDateString()+" "+F),A=a.type=="time",D=a.type=="week";vi(T.value)&&b&&(E=A?U(b)>U(T.value):D?b>T.value:R>new Date(T.value)),vi($.value)&&b&&(I=A?U(b)<U($.value):D?b<$.value:R<new Date($.value))}if((E||I)&&(C(!!E,T.message,$.message,Di.max,Di.min),!r))return S(j[g].message),j}if((c||u)&&!O&&(vi(b)||i&&Array.isArray(b))){const E=Zs(c),I=Zs(u),T=!_r(E.value)&&b.length>+E.value,$=!_r(I.value)&&b.length<+I.value;if((T||$)&&(C(T,E.message,I.message),!r))return S(j[g].message),j}if(h&&!O&&vi(b)){const{value:E,message:I}=Zs(h);if(pg(E)&&!b.match(E)&&(j[g]={type:Di.pattern,message:I,ref:a,...k(Di.pattern,I)},!r))return S(I),j}if(p){if(Ji(p)){const E=await p(b,t),I=cA(E,w);if(I&&(j[g]={...I,...k(Di.validate,I.message)},!r))return S(I.message),j}else if(Tt(p)){let E={};for(const I in p){if(!Lr(E)&&!r)break;const T=cA(await p[I](b,t),w,I);T&&(E={...T,...k(I,T.message)},S(T.message),r&&(j[g]=E))}if(!Lr(E)&&(j[g]={ref:w,...E},!r))return j}}return S(!0),j};function jje(e,t){const r=t.slice(0,-1).length;let n=0;for(;n<r;)e=Ot(e)?n++:e[t[n++]];return e}function Pje(e){for(const t in e)if(e.hasOwnProperty(t)&&!Ot(e[t]))return!1;return!0}function zt(e,t){const r=Array.isArray(t)?t:SP(t)?[t]:j5(t),n=r.length===1?e:jje(e,r),i=r.length-1,a=r[i];return n&&delete n[a],i!==0&&(Tt(n)&&Lr(n)||Array.isArray(n)&&Pje(n))&&zt(e,r.slice(0,-1)),e}var Ux=()=>{let e=[];return{get observers(){return e},next:i=>{for(const a of e)a.next&&a.next(i)},subscribe:i=>(e.push(i),{unsubscribe:()=>{e=e.filter(a=>a!==i)}}),unsubscribe:()=>{e=[]}}},a1=e=>_r(e)||!b5(e);function Fa(e,t){if(a1(e)||a1(t))return e===t;if(rs(e)&&rs(t))return e.getTime()===t.getTime();const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(const i of r){const a=e[i];if(!n.includes(i))return!1;if(i!=="ref"){const o=t[i];if(rs(a)&&rs(o)||Tt(a)&&Tt(o)||Array.isArray(a)&&Array.isArray(o)?!Fa(a,o):a!==o)return!1}}return!0}var T5=e=>e.type==="select-multiple",Nje=e=>NP(e)||oh(e),zx=e=>hg(e)&&e.isConnected,M5=e=>{for(const t in e)if(Ji(e[t]))return!0;return!1};function mg(e,t={}){const r=Array.isArray(e);if(Tt(e)||r)for(const n in e)Array.isArray(e[n])||Tt(e[n])&&!M5(e[n])?(t[n]=Array.isArray(e[n])?[]:{},mg(e[n],t[n])):_r(e[n])||(t[n]=!0);return t}function I5(e,t,r){const n=Array.isArray(e);if(Tt(e)||n)for(const i in e)Array.isArray(e[i])||Tt(e[i])&&!M5(e[i])?Ot(t)||a1(r[i])?r[i]=Array.isArray(e[i])?mg(e[i],[]):{...mg(e[i])}:I5(e[i],_r(t)?{}:t[i],r[i]):r[i]=!Fa(e[i],t[i]);return r}var Nu=(e,t)=>I5(e,t,mg(t)),$5=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>Ot(e)?e:t?e===""?NaN:e&&+e:r&&vi(e)?new Date(e):n?n(e):e;function Wx(e){const t=e.ref;if(!(e.refs?e.refs.every(r=>r.disabled):t.disabled))return PP(t)?t.files:NP(t)?A5(e.refs).value:T5(t)?[...t.selectedOptions].map(({value:r})=>r):oh(t)?C5(e.refs).value:$5(Ot(t.value)?e.ref.value:t.value,e)}var _je=(e,t,r,n)=>{const i={};for(const a of e){const o=re(t,a);o&&Xe(i,a,o._f)}return{criteriaMode:r,names:[...e],fields:i,shouldUseNativeValidation:n}},_u=e=>Ot(e)?e:pg(e)?e.source:Tt(e)?pg(e.value)?e.value.source:e.value:e;const dA="AsyncFunction";var Oje=e=>(!e||!e.validate)&&!!(Ji(e.validate)&&e.validate.constructor.name===dA||Tt(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===dA)),Eje=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function fA(e,t,r){const n=re(e,r);if(n||SP(r))return{error:n,name:r};const i=r.split(".");for(;i.length;){const a=i.join("."),o=re(t,a),s=re(e,a);if(o&&!Array.isArray(o)&&r!==a)return{name:r};if(s&&s.type)return{name:a,error:s};i.pop()}return{name:r}}var kje=(e,t,r,n,i)=>i.isOnAll?!1:!r&&i.isOnTouch?!(t||e):(r?n.isOnBlur:i.isOnBlur)?!e:(r?n.isOnChange:i.isOnChange)?e:!0,Cje=(e,t)=>!dy(re(e,t)).length&&zt(e,t);const Aje={mode:Kn.onSubmit,reValidateMode:Kn.onChange,shouldFocusError:!0};function Tje(e={}){let t={...Aje,...e},r={submitCount:0,isDirty:!1,isLoading:Ji(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},n={},i=Tt(t.defaultValues)||Tt(t.values)?$r(t.defaultValues||t.values)||{}:{},a=t.shouldUnregister?{}:$r(i),o={action:!1,mount:!1,watch:!1},s={mount:new Set,unMount:new Set,array:new Set,watch:new Set},c,u=0;const f={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},d={values:Ux(),array:Ux(),state:Ux()},h=iA(t.mode),p=iA(t.reValidateMode),g=t.criteriaMode===Kn.all,m=L=>W=>{clearTimeout(u),u=setTimeout(L,W)},y=async L=>{if(!e.disabled&&(f.isValid||L)){const W=t.resolver?Lr((await _()).errors):await k(n,!0);W!==r.isValid&&d.state.next({isValid:W})}},x=(L,W)=>{!e.disabled&&(f.isValidating||f.validatingFields)&&((L||Array.from(s.mount)).forEach(V=>{V&&(W?Xe(r.validatingFields,V,W):zt(r.validatingFields,V))}),d.state.next({validatingFields:r.validatingFields,isValidating:!Lr(r.validatingFields)}))},b=(L,W=[],V,ae,te=!0,J=!0)=>{if(ae&&V&&!e.disabled){if(o.action=!0,J&&Array.isArray(re(n,L))){const Se=V(re(n,L),ae.argA,ae.argB);te&&Xe(n,L,Se)}if(J&&Array.isArray(re(r.errors,L))){const Se=V(re(r.errors,L),ae.argA,ae.argB);te&&Xe(r.errors,L,Se),Cje(r.errors,L)}if(f.touchedFields&&J&&Array.isArray(re(r.touchedFields,L))){const Se=V(re(r.touchedFields,L),ae.argA,ae.argB);te&&Xe(r.touchedFields,L,Se)}f.dirtyFields&&(r.dirtyFields=Nu(i,a)),d.state.next({name:L,isDirty:E(L,W),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else Xe(a,L,W)},w=(L,W)=>{Xe(r.errors,L,W),d.state.next({errors:r.errors})},S=L=>{r.errors=L,d.state.next({errors:r.errors,isValid:!1})},j=(L,W,V,ae)=>{const te=re(n,L);if(te){const J=re(a,L,Ot(V)?re(i,L):V);Ot(J)||ae&&ae.defaultChecked||W?Xe(a,L,W?J:Wx(te._f)):$(L,J),o.mount&&y()}},P=(L,W,V,ae,te)=>{let J=!1,Se=!1;const ze={name:L};if(!e.disabled){const Xt=!!(re(n,L)&&re(n,L)._f&&re(n,L)._f.disabled);if(!V||ae){f.isDirty&&(Se=r.isDirty,r.isDirty=ze.isDirty=E(),J=Se!==ze.isDirty);const Qt=Xt||Fa(re(i,L),W);Se=!!(!Xt&&re(r.dirtyFields,L)),Qt||Xt?zt(r.dirtyFields,L):Xe(r.dirtyFields,L,!0),ze.dirtyFields=r.dirtyFields,J=J||f.dirtyFields&&Se!==!Qt}if(V){const Qt=re(r.touchedFields,L);Qt||(Xe(r.touchedFields,L,V),ze.touchedFields=r.touchedFields,J=J||f.touchedFields&&Qt!==V)}J&&te&&d.state.next(ze)}return J?ze:{}},N=(L,W,V,ae)=>{const te=re(r.errors,L),J=f.isValid&&vn(W)&&r.isValid!==W;if(e.delayError&&V?(c=m(()=>w(L,V)),c(e.delayError)):(clearTimeout(u),c=null,V?Xe(r.errors,L,V):zt(r.errors,L)),(V?!Fa(te,V):te)||!Lr(ae)||J){const Se={...ae,...J&&vn(W)?{isValid:W}:{},errors:r.errors,name:L};r={...r,...Se},d.state.next(Se)}},_=async L=>{x(L,!0);const W=await t.resolver(a,t.context,_je(L||s.mount,n,t.criteriaMode,t.shouldUseNativeValidation));return x(L),W},O=async L=>{const{errors:W}=await _(L);if(L)for(const V of L){const ae=re(W,V);ae?Xe(r.errors,V,ae):zt(r.errors,V)}else r.errors=W;return W},k=async(L,W,V={valid:!0})=>{for(const ae in L){const te=L[ae];if(te){const{_f:J,...Se}=te;if(J){const ze=s.array.has(J.name),Xt=te._f&&Oje(te._f);Xt&&f.validatingFields&&x([ae],!0);const Qt=await uA(te,a,g,t.shouldUseNativeValidation&&!W,ze);if(Xt&&f.validatingFields&&x([ae]),Qt[J.name]&&(V.valid=!1,W))break;!W&&(re(Qt,J.name)?ze?Sje(r.errors,Qt,J.name):Xe(r.errors,J.name,Qt[J.name]):zt(r.errors,J.name))}!Lr(Se)&&await k(Se,W,V)}}return V.valid},C=()=>{for(const L of s.unMount){const W=re(n,L);W&&(W._f.refs?W._f.refs.every(V=>!zx(V)):!zx(W._f.ref))&&Be(L)}s.unMount=new Set},E=(L,W)=>!e.disabled&&(L&&W&&Xe(a,L,W),!Fa(z(),i)),I=(L,W,V)=>E5(L,s,{...o.mount?a:Ot(W)?i:vi(L)?{[L]:W}:W},V,W),T=L=>dy(re(o.mount?a:i,L,e.shouldUnregister?re(i,L,[]):[])),$=(L,W,V={})=>{const ae=re(n,L);let te=W;if(ae){const J=ae._f;J&&(!J.disabled&&Xe(a,L,$5(W,J)),te=hg(J.ref)&&_r(W)?"":W,T5(J.ref)?[...J.ref.options].forEach(Se=>Se.selected=te.includes(Se.value)):J.refs?oh(J.ref)?J.refs.length>1?J.refs.forEach(Se=>(!Se.defaultChecked||!Se.disabled)&&(Se.checked=Array.isArray(te)?!!te.find(ze=>ze===Se.value):te===Se.value)):J.refs[0]&&(J.refs[0].checked=!!te):J.refs.forEach(Se=>Se.checked=Se.value===te):PP(J.ref)?J.ref.value="":(J.ref.value=te,J.ref.type||d.values.next({name:L,values:{...a}})))}(V.shouldDirty||V.shouldTouch)&&P(L,te,V.shouldTouch,V.shouldDirty,!0),V.shouldValidate&&F(L)},R=(L,W,V)=>{for(const ae in W){const te=W[ae],J=`${L}.${ae}`,Se=re(n,J);(s.array.has(L)||Tt(te)||Se&&!Se._f)&&!rs(te)?R(J,te,V):$(J,te,V)}},U=(L,W,V={})=>{const ae=re(n,L),te=s.array.has(L),J=$r(W);Xe(a,L,J),te?(d.array.next({name:L,values:{...a}}),(f.isDirty||f.dirtyFields)&&V.shouldDirty&&d.state.next({name:L,dirtyFields:Nu(i,a),isDirty:E(L,J)})):ae&&!ae._f&&!_r(J)?R(L,J,V):$(L,J,V),aA(L,s)&&d.state.next({...r}),d.values.next({name:o.mount?L:void 0,values:{...a}})},A=async L=>{o.mount=!0;const W=L.target;let V=W.name,ae=!0;const te=re(n,V),J=()=>W.type?Wx(te._f):w5(L),Se=ze=>{ae=Number.isNaN(ze)||rs(ze)&&isNaN(ze.getTime())||Fa(ze,re(a,V,ze))};if(te){let ze,Xt;const Qt=J(),Ao=L.type===fg.BLUR||L.type===fg.FOCUS_OUT,oB=!Eje(te._f)&&!t.resolver&&!re(r.errors,V)&&!te._f.deps||kje(Ao,re(r.touchedFields,V),r.isSubmitted,p,h),my=aA(V,s,Ao);Xe(a,V,Qt),Ao?(te._f.onBlur&&te._f.onBlur(L),c&&c(0)):te._f.onChange&&te._f.onChange(L);const gy=P(V,Qt,Ao,!1),sB=!Lr(gy)||my;if(!Ao&&d.values.next({name:V,type:L.type,values:{...a}}),oB)return f.isValid&&(e.mode==="onBlur"?Ao&&y():y()),sB&&d.state.next({name:V,...my?{}:gy});if(!Ao&&my&&d.state.next({...r}),t.resolver){const{errors:kP}=await _([V]);if(Se(Qt),ae){const lB=fA(r.errors,n,V),CP=fA(kP,n,lB.name||V);ze=CP.error,V=CP.name,Xt=Lr(kP)}}else x([V],!0),ze=(await uA(te,a,g,t.shouldUseNativeValidation))[V],x([V]),Se(Qt),ae&&(ze?Xt=!1:f.isValid&&(Xt=await k(n,!0)));ae&&(te._f.deps&&F(te._f.deps),N(V,Xt,ze,gy))}},D=(L,W)=>{if(re(r.errors,W)&&L.focus)return L.focus(),1},F=async(L,W={})=>{let V,ae;const te=ad(L);if(t.resolver){const J=await O(Ot(L)?L:te);V=Lr(J),ae=L?!te.some(Se=>re(J,Se)):V}else L?(ae=(await Promise.all(te.map(async J=>{const Se=re(n,J);return await k(Se&&Se._f?{[J]:Se}:Se)}))).every(Boolean),!(!ae&&!r.isValid)&&y()):ae=V=await k(n);return d.state.next({...!vi(L)||f.isValid&&V!==r.isValid?{}:{name:L},...t.resolver||!L?{isValid:V}:{},errors:r.errors}),W.shouldFocus&&!ae&&od(n,D,L?te:s.mount),ae},z=L=>{const W={...o.mount?a:i};return Ot(L)?W:vi(L)?re(W,L):L.map(V=>re(W,V))},H=(L,W)=>({invalid:!!re((W||r).errors,L),isDirty:!!re((W||r).dirtyFields,L),error:re((W||r).errors,L),isValidating:!!re(r.validatingFields,L),isTouched:!!re((W||r).touchedFields,L)}),ue=L=>{L&&ad(L).forEach(W=>zt(r.errors,W)),d.state.next({errors:L?r.errors:{}})},be=(L,W,V)=>{const ae=(re(n,L,{_f:{}})._f||{}).ref,te=re(r.errors,L)||{},{ref:J,message:Se,type:ze,...Xt}=te;Xe(r.errors,L,{...Xt,...W,ref:ae}),d.state.next({name:L,errors:r.errors,isValid:!1}),V&&V.shouldFocus&&ae&&ae.focus&&ae.focus()},Le=(L,W)=>Ji(L)?d.values.subscribe({next:V=>L(I(void 0,W),V)}):I(L,W,!0),Be=(L,W={})=>{for(const V of L?ad(L):s.mount)s.mount.delete(V),s.array.delete(V),W.keepValue||(zt(n,V),zt(a,V)),!W.keepError&&zt(r.errors,V),!W.keepDirty&&zt(r.dirtyFields,V),!W.keepTouched&&zt(r.touchedFields,V),!W.keepIsValidating&&zt(r.validatingFields,V),!t.shouldUnregister&&!W.keepDefaultValue&&zt(i,V);d.values.next({values:{...a}}),d.state.next({...r,...W.keepDirty?{isDirty:E()}:{}}),!W.keepIsValid&&y()},se=({disabled:L,name:W,field:V,fields:ae,value:te})=>{if(vn(L)&&o.mount||L){const J=L?void 0:Ot(te)?Wx(V?V._f:re(ae,W)._f):te;Xe(a,W,J),P(W,J,!1,!1,!0)}},Me=(L,W={})=>{let V=re(n,L);const ae=vn(W.disabled)||vn(e.disabled);return Xe(n,L,{...V||{},_f:{...V&&V._f?V._f:{ref:{name:L}},name:L,mount:!0,...W}}),s.mount.add(L),V?se({field:V,disabled:vn(W.disabled)?W.disabled:e.disabled,name:L,value:W.value}):j(L,!0,W.value),{...ae?{disabled:W.disabled||e.disabled}:{},...t.progressive?{required:!!W.required,min:_u(W.min),max:_u(W.max),minLength:_u(W.minLength),maxLength:_u(W.maxLength),pattern:_u(W.pattern)}:{},name:L,onChange:A,onBlur:A,ref:te=>{if(te){Me(L,W),V=re(n,L);const J=Ot(te.value)&&te.querySelectorAll&&te.querySelectorAll("input,select,textarea")[0]||te,Se=Nje(J),ze=V._f.refs||[];if(Se?ze.find(Xt=>Xt===J):J===V._f.ref)return;Xe(n,L,{_f:{...V._f,...Se?{refs:[...ze.filter(zx),J,...Array.isArray(re(i,L))?[{}]:[]],ref:{type:J.type,name:L}}:{ref:J}}}),j(L,!1,void 0,J)}else V=re(n,L,{}),V._f&&(V._f.mount=!1),(t.shouldUnregister||W.shouldUnregister)&&!(S5(s.array,L)&&o.action)&&s.unMount.add(L)}}},X=()=>t.shouldFocusError&&od(n,D,s.mount),le=L=>{vn(L)&&(d.state.next({disabled:L}),od(n,(W,V)=>{const ae=re(n,V);ae&&(W.disabled=ae._f.disabled||L,Array.isArray(ae._f.refs)&&ae._f.refs.forEach(te=>{te.disabled=ae._f.disabled||L}))},0,!1))},fe=(L,W)=>async V=>{let ae;V&&(V.preventDefault&&V.preventDefault(),V.persist&&V.persist());let te=$r(a);if(d.state.next({isSubmitting:!0}),t.resolver){const{errors:J,values:Se}=await _();r.errors=J,te=Se}else await k(n);if(zt(r.errors,"root"),Lr(r.errors)){d.state.next({errors:{}});try{await L(te,V)}catch(J){ae=J}}else W&&await W({...r.errors},V),X(),setTimeout(X);if(d.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Lr(r.errors)&&!ae,submitCount:r.submitCount+1,errors:r.errors}),ae)throw ae},q=(L,W={})=>{re(n,L)&&(Ot(W.defaultValue)?U(L,$r(re(i,L))):(U(L,W.defaultValue),Xe(i,L,$r(W.defaultValue))),W.keepTouched||zt(r.touchedFields,L),W.keepDirty||(zt(r.dirtyFields,L),r.isDirty=W.defaultValue?E(L,$r(re(i,L))):E()),W.keepError||(zt(r.errors,L),f.isValid&&y()),d.state.next({...r}))},Ue=(L,W={})=>{const V=L?$r(L):i,ae=$r(V),te=Lr(L),J=te?i:ae;if(W.keepDefaultValues||(i=V),!W.keepValues){if(W.keepDirtyValues){const Se=new Set([...s.mount,...Object.keys(Nu(i,a))]);for(const ze of Array.from(Se))re(r.dirtyFields,ze)?Xe(J,ze,re(a,ze)):U(ze,re(J,ze))}else{if(wP&&Ot(L))for(const Se of s.mount){const ze=re(n,Se);if(ze&&ze._f){const Xt=Array.isArray(ze._f.refs)?ze._f.refs[0]:ze._f.ref;if(hg(Xt)){const Qt=Xt.closest("form");if(Qt){Qt.reset();break}}}}n={}}a=e.shouldUnregister?W.keepDefaultValues?$r(i):{}:$r(J),d.array.next({values:{...J}}),d.values.next({values:{...J}})}s={mount:W.keepDirtyValues?s.mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},o.mount=!f.isValid||!!W.keepIsValid||!!W.keepDirtyValues,o.watch=!!e.shouldUnregister,d.state.next({submitCount:W.keepSubmitCount?r.submitCount:0,isDirty:te?!1:W.keepDirty?r.isDirty:!!(W.keepDefaultValues&&!Fa(L,i)),isSubmitted:W.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:te?{}:W.keepDirtyValues?W.keepDefaultValues&&a?Nu(i,a):r.dirtyFields:W.keepDefaultValues&&L?Nu(i,L):W.keepDirty?r.dirtyFields:{},touchedFields:W.keepTouched?r.touchedFields:{},errors:W.keepErrors?r.errors:{},isSubmitSuccessful:W.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1})},Oe=(L,W)=>Ue(Ji(L)?L(a):L,W);return{control:{register:Me,unregister:Be,getFieldState:H,handleSubmit:fe,setError:be,_executeSchema:_,_getWatch:I,_getDirty:E,_updateValid:y,_removeUnmounted:C,_updateFieldArray:b,_updateDisabledField:se,_getFieldArray:T,_reset:Ue,_resetDefaultValues:()=>Ji(t.defaultValues)&&t.defaultValues().then(L=>{Oe(L,t.resetOptions),d.state.next({isLoading:!1})}),_updateFormState:L=>{r={...r,...L}},_disableForm:le,_subjects:d,_proxyFormState:f,_setErrors:S,get _fields(){return n},get _formValues(){return a},get _state(){return o},set _state(L){o=L},get _defaultValues(){return i},get _names(){return s},set _names(L){s=L},get _formState(){return r},set _formState(L){r=L},get _options(){return t},set _options(L){t={...t,...L}}},trigger:F,register:Me,handleSubmit:fe,watch:Le,setValue:U,getValues:z,reset:Oe,resetField:q,clearErrors:ue,unregister:Be,setError:be,setFocus:(L,W={})=>{const V=re(n,L),ae=V&&V._f;if(ae){const te=ae.refs?ae.refs[0]:ae.ref;te.focus&&(te.focus(),W.shouldSelect&&te.select())}},getFieldState:H}}function Mje(e={}){const t=M.useRef(),r=M.useRef(),[n,i]=M.useState({isDirty:!1,isValidating:!1,isLoading:Ji(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:Ji(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...Tje(e),formState:n});const a=t.current.control;return a._options=e,jP({subject:a._subjects.state,next:o=>{_5(o,a._proxyFormState,a._updateFormState,!0)&&i({...a._formState})}}),M.useEffect(()=>a._disableForm(e.disabled),[a,e.disabled]),M.useEffect(()=>{if(a._proxyFormState.isDirty){const o=a._getDirty();o!==n.isDirty&&a._subjects.state.next({isDirty:o})}},[a,n.isDirty]),M.useEffect(()=>{e.values&&!Fa(e.values,r.current)?(a._reset(e.values,a._options.resetOptions),r.current=e.values,i(o=>({...o}))):a._resetDefaultValues()},[e.values,a]),M.useEffect(()=>{e.errors&&a._setErrors(e.errors)},[e.errors,a]),M.useEffect(()=>{a._state.mount||(a._updateValid(),a._state.mount=!0),a._state.watch&&(a._state.watch=!1,a._subjects.state.next({...a._formState})),a._removeUnmounted()}),M.useEffect(()=>{e.shouldUnregister&&a._subjects.values.next({values:a._getWatch()})},[e.shouldUnregister,a]),M.useEffect(()=>{t.current&&(t.current.watch=t.current.watch.bind({}))},[n]),t.current.formState=N5(n,a),t.current}const Ije=vje,R5=v.createContext({}),Js=({...e})=>l.jsx(R5.Provider,{value:{name:e.name},children:l.jsx(wje,{...e})}),hy=()=>{const e=v.useContext(R5),t=v.useContext(D5),{getFieldState:r,formState:n}=fy(),i=r(e.name,n);if(!e)throw new Error("useFormField should be used within <FormField>");const{id:a}=t;return{id:a,name:e.name,formItemId:`${a}-form-item`,formDescriptionId:`${a}-form-item-description`,formMessageId:`${a}-form-item-message`,...i}},D5=v.createContext({}),Wo=v.forwardRef(({className:e,...t},r)=>{const n=v.useId();return l.jsx(D5.Provider,{value:{id:n},children:l.jsx("div",{ref:r,className:G("space-y-2",e),...t})})});Wo.displayName="FormItem";const Vo=v.forwardRef(({className:e,...t},r)=>{const{error:n,formItemId:i}=hy();return l.jsx(Rt,{ref:r,className:G(n&&"text-destructive",e),htmlFor:i,...t})});Vo.displayName="FormLabel";const Ho=v.forwardRef(({...e},t)=>{const{error:r,formItemId:n,formDescriptionId:i,formMessageId:a}=hy();return l.jsx(ha,{ref:t,id:n,"aria-describedby":r?`${i} ${a}`:`${i}`,"aria-invalid":!!r,...e})});Ho.displayName="FormControl";const L5=v.forwardRef(({className:e,...t},r)=>{const{formDescriptionId:n}=hy();return l.jsx("p",{ref:r,id:n,className:G("text-sm text-muted-foreground",e),...t})});L5.displayName="FormDescription";const qo=v.forwardRef(({className:e,children:t,...r},n)=>{const{error:i,formMessageId:a}=hy(),o=i?String(i==null?void 0:i.message):t;return o?l.jsx("p",{ref:n,id:a,className:G("text-sm font-medium text-destructive",e),...r,children:o}):null});qo.displayName="FormMessage";const hA=(e,t,r)=>{if(e&&"reportValidity"in e){const n=re(r,t);e.setCustomValidity(n&&n.message||""),e.reportValidity()}},F5=(e,t)=>{for(const r in t.fields){const n=t.fields[r];n&&n.ref&&"reportValidity"in n.ref?hA(n.ref,r,e):n.refs&&n.refs.forEach(i=>hA(i,r,e))}},$je=(e,t)=>{t.shouldUseNativeValidation&&F5(e,t);const r={};for(const n in e){const i=re(t.fields,n),a=Object.assign(e[n]||{},{ref:i&&i.ref});if(Rje(t.names||Object.keys(e),n)){const o=Object.assign({},re(r,n));Xe(o,"root",a),Xe(r,n,o)}else Xe(r,n,a)}return r},Rje=(e,t)=>e.some(r=>r.startsWith(t+"."));var Dje=function(e,t){for(var r={};e.length;){var n=e[0],i=n.code,a=n.message,o=n.path.join(".");if(!r[o])if("unionErrors"in n){var s=n.unionErrors[0].errors[0];r[o]={message:s.message,type:s.code}}else r[o]={message:a,type:i};if("unionErrors"in n&&n.unionErrors.forEach(function(f){return f.errors.forEach(function(d){return e.push(d)})}),t){var c=r[o].types,u=c&&c[n.code];r[o]=k5(o,t,r,i,u?[].concat(u,n.message):n.message)}e.shift()}return r},Lje=function(e,t,r){return r===void 0&&(r={}),function(n,i,a){try{return Promise.resolve(function(o,s){try{var c=Promise.resolve(e[r.mode==="sync"?"parse":"parseAsync"](n,t)).then(function(u){return a.shouldUseNativeValidation&&F5({},a),{errors:{},values:r.raw?n:u}})}catch(u){return s(u)}return c&&c.then?c.then(void 0,s):c}(0,function(o){if(function(s){return Array.isArray(s==null?void 0:s.errors)}(o))return{values:{},errors:$je(Dje(o.errors,!a.shouldUseNativeValidation&&a.criteriaMode==="all"),a)};throw o}))}catch(o){return Promise.reject(o)}}},qe;(function(e){e.assertEqual=i=>i;function t(i){}e.assertIs=t;function r(i){throw new Error}e.assertNever=r,e.arrayToEnum=i=>{const a={};for(const o of i)a[o]=o;return a},e.getValidEnumValues=i=>{const a=e.objectKeys(i).filter(s=>typeof i[i[s]]!="number"),o={};for(const s of a)o[s]=i[s];return e.objectValues(o)},e.objectValues=i=>e.objectKeys(i).map(function(a){return i[a]}),e.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const a=[];for(const o in i)Object.prototype.hasOwnProperty.call(i,o)&&a.push(o);return a},e.find=(i,a)=>{for(const o of i)if(a(o))return o},e.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function n(i,a=" | "){return i.map(o=>typeof o=="string"?`'${o}'`:o).join(a)}e.joinValues=n,e.jsonStringifyReplacer=(i,a)=>typeof a=="bigint"?a.toString():a})(qe||(qe={}));var pA;(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(pA||(pA={}));const me=qe.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Go=e=>{switch(typeof e){case"undefined":return me.undefined;case"string":return me.string;case"number":return isNaN(e)?me.nan:me.number;case"boolean":return me.boolean;case"function":return me.function;case"bigint":return me.bigint;case"symbol":return me.symbol;case"object":return Array.isArray(e)?me.array:e===null?me.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?me.promise:typeof Map<"u"&&e instanceof Map?me.map:typeof Set<"u"&&e instanceof Set?me.set:typeof Date<"u"&&e instanceof Date?me.date:me.object;default:return me.unknown}},Z=qe.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class On extends Error{constructor(t){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};const r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){const r=t||function(a){return a.message},n={_errors:[]},i=a=>{for(const o of a.issues)if(o.code==="invalid_union")o.unionErrors.map(i);else if(o.code==="invalid_return_type")i(o.returnTypeError);else if(o.code==="invalid_arguments")i(o.argumentsError);else if(o.path.length===0)n._errors.push(r(o));else{let s=n,c=0;for(;c<o.path.length;){const u=o.path[c];c===o.path.length-1?(s[u]=s[u]||{_errors:[]},s[u]._errors.push(r(o))):s[u]=s[u]||{_errors:[]},s=s[u],c++}}};return i(this),n}static assert(t){if(!(t instanceof On))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,qe.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=r=>r.message){const r={},n=[];for(const i of this.issues)i.path.length>0?(r[i.path[0]]=r[i.path[0]]||[],r[i.path[0]].push(t(i))):n.push(t(i));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}}On.create=e=>new On(e);const wf=(e,t)=>{let r;switch(e.code){case Z.invalid_type:e.received===me.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case Z.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,qe.jsonStringifyReplacer)}`;break;case Z.unrecognized_keys:r=`Unrecognized key(s) in object: ${qe.joinValues(e.keys,", ")}`;break;case Z.invalid_union:r="Invalid input";break;case Z.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${qe.joinValues(e.options)}`;break;case Z.invalid_enum_value:r=`Invalid enum value. Expected ${qe.joinValues(e.options)}, received '${e.received}'`;break;case Z.invalid_arguments:r="Invalid function arguments";break;case Z.invalid_return_type:r="Invalid function return type";break;case Z.invalid_date:r="Invalid date";break;case Z.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:qe.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case Z.too_small:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:r="Invalid input";break;case Z.too_big:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?r=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:r="Invalid input";break;case Z.custom:r="Invalid input";break;case Z.invalid_intersection_types:r="Intersection results could not be merged";break;case Z.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case Z.not_finite:r="Number must be finite";break;default:r=t.defaultError,qe.assertNever(e)}return{message:r}};let Fje=wf;function o1(){return Fje}const s1=e=>{const{data:t,path:r,errorMaps:n,issueData:i}=e,a=[...r,...i.path||[]],o={...i,path:a};if(i.message!==void 0)return{...i,path:a,message:i.message};let s="";const c=n.filter(u=>!!u).slice().reverse();for(const u of c)s=u(o,{data:t,defaultError:s}).message;return{...i,path:a,message:s}};function de(e,t){const r=o1(),n=s1({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===wf?void 0:wf].filter(i=>!!i)});e.common.issues.push(n)}class Ar{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,r){const n=[];for(const i of r){if(i.status==="aborted")return Ee;i.status==="dirty"&&t.dirty(),n.push(i.value)}return{status:t.value,value:n}}static async mergeObjectAsync(t,r){const n=[];for(const i of r){const a=await i.key,o=await i.value;n.push({key:a,value:o})}return Ar.mergeObjectSync(t,n)}static mergeObjectSync(t,r){const n={};for(const i of r){const{key:a,value:o}=i;if(a.status==="aborted"||o.status==="aborted")return Ee;a.status==="dirty"&&t.dirty(),o.status==="dirty"&&t.dirty(),a.value!=="__proto__"&&(typeof o.value<"u"||i.alwaysSet)&&(n[a.value]=o.value)}return{status:t.value,value:n}}}const Ee=Object.freeze({status:"aborted"}),Lu=e=>({status:"dirty",value:e}),qr=e=>
vendor: 5,699 bytes, line 712
712({status:"valid",value:e}),mA=e=>e.status==="aborted",gA=e=>e.status==="dirty",gg=e=>e.status==="valid",vg=e=>typeof Promise<"u"&&e instanceof Promise;function yg(e,t,r,n){if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function B5(e,t,r,n,i){if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,r),r}var we;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(we||(we={}));var Fu,Bu;class Ei{constructor(t,r,n,i){this._cachedPath=[],this.parent=t,this.data=r,this._path=n,this._key=i}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const vA=(e,t)=>{if(gg(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const r=new On(e.common.issues);return this._error=r,this._error}}};function Ie(e){if(!e)return{};const{errorMap:t,invalid_type_error:r,required_error:n,description:i}=e;if(t&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:(o,s)=>{var c,u;const{message:f}=e;return o.code==="invalid_enum_value"?{message:f??s.defaultError}:typeof s.data>"u"?{message:(c=f??n)!==null&&c!==void 0?c:s.defaultError}:o.code!=="invalid_type"?{message:s.defaultError}:{message:(u=f??r)!==null&&u!==void 0?u:s.defaultError}},description:i}}class We{constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(t){return Go(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:Go(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Ar,ctx:{common:t.parent.common,data:t.data,parsedType:Go(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const r=this._parse(t);if(vg(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(t){const r=this._parse(t);return Promise.resolve(r)}parse(t,r){const n=this.safeParse(t,r);if(n.success)return n.data;throw n.error}safeParse(t,r){var n;const i={common:{issues:[],async:(n=r==null?void 0:r.async)!==null&&n!==void 0?n:!1,contextualErrorMap:r==null?void 0:r.errorMap},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Go(t)},a=this._parseSync({data:t,path:i.path,parent:i});return vA(i,a)}async parseAsync(t,r){const n=await this.safeParseAsync(t,r);if(n.success)return n.data;throw n.error}async safeParseAsync(t,r){const n={common:{issues:[],contextualErrorMap:r==null?void 0:r.errorMap,async:!0},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Go(t)},i=this._parse({data:t,path:n.path,parent:n}),a=await(vg(i)?i:Promise.resolve(i));return vA(n,a)}refine(t,r){const n=i=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(i):r;return this._refinement((i,a)=>{const o=t(i),s=()=>a.addIssue({code:Z.custom,...n(i)});return typeof Promise<"u"&&o instanceof Promise?o.then(c=>c?!0:(s(),!1)):o?!0:(s(),!1)})}refinement(t,r){return this._refinement((n,i)=>t(n)?!0:(i.addIssue(typeof r=="function"?r(n,i):r),!1))}_refinement(t){return new wa({schema:this,typeName:_e.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return sa.create(this,this._def)}nullable(){return Cs.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Pi.create(this,this._def)}promise(){return jf.create(this,this._def)}or(t){return wg.create([this,t],this._def)}and(t){return Sg.create(this,t,this._def)}transform(t){return new wa({...Ie(this._def),schema:this,typeName:_e.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const r=typeof t=="function"?t:()=>t;return new Og({...Ie(this._def),innerType:this,defaultValue:r,typeName:_e.ZodDefault})}brand(){return new V5({typeName:_e.ZodBranded,type:this,...Ie(this._def)})}catch(t){const r=typeof t=="function"?t:()=>t;return new Eg({...Ie(this._def),innerType:this,catchValue:r,typeName:_e.ZodCatch})}describe(t){const r=this.constructor;return new r({...this._def,description:t})}pipe(t){return py.create(this,t)}readonly(){return kg.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Bje=/^c[^\s-]{8,}
vendor: 38,246 bytes, line 712
712$/i,Uje=/^[0-9a-z]+$/,zje=/^[0-9A-HJKMNP-TV-Z]{26}$/,Wje=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Vje=/^[a-z0-9_-]{21}$/i,Hje=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,qje=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Kje="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Vx;const Gje=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Yje=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,Xje=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,U5="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",Qje=new RegExp(`^${U5}$`);function z5(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`),t}function Zje(e){return new RegExp(`^${z5(e)}$`)}function Jje(e){let t=`${U5}T${z5(e)}`;const r=[];return r.push(e.local?"Z?":"Z"),e.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${r.join("|")})`,new RegExp(`^${t}$`)}function ePe(e,t){return!!((t==="v4"||!t)&&Gje.test(e)||(t==="v6"||!t)&&Yje.test(e))}class ea extends We{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==me.string){const a=this._getOrReturnCtx(t);return de(a,{code:Z.invalid_type,expected:me.string,received:a.parsedType}),Ee}const n=new Ar;let i;for(const a of this._def.checks)if(a.kind==="min")t.data.length<a.value&&(i=this._getOrReturnCtx(t,i),de(i,{code:Z.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),n.dirty());else if(a.kind==="max")t.data.length>a.value&&(i=this._getOrReturnCtx(t,i),de(i,{code:Z.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),n.dirty());else if(a.kind==="length"){const o=t.data.length>a.value,s=t.data.length<a.value;(o||s)&&(i=this._getOrReturnCtx(t,i),o?de(i,{code:Z.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):s&&de(i,{code:Z.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),n.dirty())}else if(a.kind==="email")qje.test(t.data)||(i=this._getOrReturnCtx(t,i),de(i,{validation:"email",code:Z.invalid_string,message:a.message}),n.dirty());else if(a.kind==="emoji")Vx||(Vx=new RegExp(Kje,"u")),Vx.test(t.data)||(i=this._getOrReturnCtx(t,i),de(i,{validation:"emoji",code:Z.invalid_string,message:a.message}),n.dirty());else if(a.kind==="uuid")Wje.test(t.data)||(i=this._getOrReturnCtx(t,i),de(i,{validation:"uuid",code:Z.invalid_string,message:a.message}),n.dirty());else if(a.kind==="nanoid")Vje.test(t.data)||(i=this._getOrReturnCtx(t,i),de(i,{validation:"nanoid",code:Z.invalid_string,message:a.message}),n.dirty());else if(a.kind==="cuid")Bje.test(t.data)||(i=this._getOrReturnCtx(t,i),de(i,{validation:"cuid",code:Z.invalid_string,message:a.message}),n.dirty());else if(a.kind==="cuid2")Uje.test(t.data)||(i=this._getOrReturnCtx(t,i),de(i,{validation:"cuid2",code:Z.invalid_string,message:a.message}),n.dirty());else if(a.kind==="ulid")zje.test(t.data)||(i=this._getOrReturnCtx(t,i),de(i,{validation:"ulid",code:Z.invalid_string,message:a.message}),n.dirty());else if(a.kind==="url")try{new URL(t.data)}catch{i=this._getOrReturnCtx(t,i),de(i,{validation:"url",code:Z.invalid_string,message:a.message}),n.dirty()}else a.kind==="regex"?(a.regex.lastIndex=0,a.regex.test(t.data)||(i=this._getOrReturnCtx(t,i),de(i,{validation:"regex",code:Z.invalid_string,message:a.message}),n.dirty())):a.kind==="trim"?t.data=t.data.trim():a.kind==="includes"?t.data.includes(a.value,a.position)||(i=this._getOrReturnCtx(t,i),de(i,{code:Z.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),n.dirty()):a.kind==="toLowerCase"?t.data=t.data.toLowerCase():a.kind==="toUpperCase"?t.data=t.data.toUpperCase():a.kind==="startsWith"?t.data.startsWith(a.value)||(i=this._getOrReturnCtx(t,i),de(i,{code:Z.invalid_string,validation:{startsWith:a.value},message:a.message}),n.dirty()):a.kind==="endsWith"?t.data.endsWith(a.value)||(i=this._getOrReturnCtx(t,i),de(i,{code:Z.invalid_string,validation:{endsWith:a.value},message:a.message}),n.dirty()):a.kind==="datetime"?Jje(a).test(t.data)||(i=this._getOrReturnCtx(t,i),de(i,{code:Z.invalid_string,validation:"datetime",message:a.message}),n.dirty()):a.kind==="date"?Qje.test(t.data)||(i=this._getOrReturnCtx(t,i),de(i,{code:Z.invalid_string,validation:"date",message:a.message}),n.dirty()):a.kind==="time"?Zje(a).test(t.data)||(i=this._getOrReturnCtx(t,i),de(i,{code:Z.invalid_string,validation:"time",message:a.message}),n.dirty()):a.kind==="duration"?Hje.test(t.data)||(i=this._getOrReturnCtx(t,i),de(i,{validation:"duration",code:Z.invalid_string,message:a.message}),n.dirty()):a.kind==="ip"?ePe(t.data,a.version)||(i=this._getOrReturnCtx(t,i),de(i,{validation:"ip",code:Z.invalid_string,message:a.message}),n.dirty()):a.kind==="base64"?Xje.test(t.data)||(i=this._getOrReturnCtx(t,i),de(i,{validation:"base64",code:Z.invalid_string,message:a.message}),n.dirty()):qe.assertNever(a);return{status:n.value,value:t.data}}_regex(t,r,n){return this.refinement(i=>t.test(i),{validation:r,code:Z.invalid_string,...we.errToObj(n)})}_addCheck(t){return new ea({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...we.errToObj(t)})}url(t){return this._addCheck({kind:"url",...we.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...we.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...we.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...we.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...we.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...we.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...we.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...we.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...we.errToObj(t)})}datetime(t){var r,n;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(r=t==null?void 0:t.offset)!==null&&r!==void 0?r:!1,local:(n=t==null?void 0:t.local)!==null&&n!==void 0?n:!1,...we.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...we.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...we.errToObj(t)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,...we.errToObj(r)})}includes(t,r){return this._addCheck({kind:"includes",value:t,position:r==null?void 0:r.position,...we.errToObj(r==null?void 0:r.message)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,...we.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,...we.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,...we.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,...we.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,...we.errToObj(r)})}nonempty(t){return this.min(1,we.errToObj(t))}trim(){return new ea({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new ea({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new ea({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get minLength(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxLength(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}}ea.create=e=>{var t;return new ea({checks:[],typeName:_e.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Ie(e)})};function tPe(e,t){const r=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,i=r>n?r:n,a=parseInt(e.toFixed(i).replace(".","")),o=parseInt(t.toFixed(i).replace(".",""));return a%o/Math.pow(10,i)}class _c extends We{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==me.number){const a=this._getOrReturnCtx(t);return de(a,{code:Z.invalid_type,expected:me.number,received:a.parsedType}),Ee}let n;const i=new Ar;for(const a of this._def.checks)a.kind==="int"?qe.isInteger(t.data)||(n=this._getOrReturnCtx(t,n),de(n,{code:Z.invalid_type,expected:"integer",received:"float",message:a.message}),i.dirty()):a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(n=this._getOrReturnCtx(t,n),de(n,{code:Z.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),i.dirty()):a.kind==="max"?(a.inclusive?t.data>a.value:t.data>=a.value)&&(n=this._getOrReturnCtx(t,n),de(n,{code:Z.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),i.dirty()):a.kind==="multipleOf"?tPe(t.data,a.value)!==0&&(n=this._getOrReturnCtx(t,n),de(n,{code:Z.not_multiple_of,multipleOf:a.value,message:a.message}),i.dirty()):a.kind==="finite"?Number.isFinite(t.data)||(n=this._getOrReturnCtx(t,n),de(n,{code:Z.not_finite,message:a.message}),i.dirty()):qe.assertNever(a);return{status:i.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,we.toString(r))}gt(t,r){return this.setLimit("min",t,!1,we.toString(r))}lte(t,r){return this.setLimit("max",t,!0,we.toString(r))}lt(t,r){return this.setLimit("max",t,!1,we.toString(r))}setLimit(t,r,n,i){return new _c({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:we.toString(i)}]})}_addCheck(t){return new _c({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:we.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:we.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:we.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:we.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:we.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:we.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:we.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:we.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:we.toString(t)})}get minValue(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&qe.isInteger(t.value))}get isFinite(){let t=null,r=null;for(const n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(t===null||n.value<t)&&(t=n.value)}return Number.isFinite(r)&&Number.isFinite(t)}}_c.create=e=>new _c({checks:[],typeName:_e.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Ie(e)});class Oc extends We{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce&&(t.data=BigInt(t.data)),this._getType(t)!==me.bigint){const a=this._getOrReturnCtx(t);return de(a,{code:Z.invalid_type,expected:me.bigint,received:a.parsedType}),Ee}let n;const i=new Ar;for(const a of this._def.checks)a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(n=this._getOrReturnCtx(t,n),de(n,{code:Z.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),i.dirty()):a.kind==="max"?(a.inclusive?t.data>a.value:t.data>=a.value)&&(n=this._getOrReturnCtx(t,n),de(n,{code:Z.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),i.dirty()):a.kind==="multipleOf"?t.data%a.value!==BigInt(0)&&(n=this._getOrReturnCtx(t,n),de(n,{code:Z.not_multiple_of,multipleOf:a.value,message:a.message}),i.dirty()):qe.assertNever(a);return{status:i.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,we.toString(r))}gt(t,r){return this.setLimit("min",t,!1,we.toString(r))}lte(t,r){return this.setLimit("max",t,!0,we.toString(r))}lt(t,r){return this.setLimit("max",t,!1,we.toString(r))}setLimit(t,r,n,i){return new Oc({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:we.toString(i)}]})}_addCheck(t){return new Oc({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:we.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:we.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:we.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:we.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:we.toString(r)})}get minValue(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}}Oc.create=e=>{var t;return new Oc({checks:[],typeName:_e.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Ie(e)})};class l1 extends We{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==me.boolean){const n=this._getOrReturnCtx(t);return de(n,{code:Z.invalid_type,expected:me.boolean,received:n.parsedType}),Ee}return qr(t.data)}}l1.create=e=>new l1({typeName:_e.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Ie(e)});class Sf extends We{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==me.date){const a=this._getOrReturnCtx(t);return de(a,{code:Z.invalid_type,expected:me.date,received:a.parsedType}),Ee}if(isNaN(t.data.getTime())){const a=this._getOrReturnCtx(t);return de(a,{code:Z.invalid_date}),Ee}const n=new Ar;let i;for(const a of this._def.checks)a.kind==="min"?t.data.getTime()<a.value&&(i=this._getOrReturnCtx(t,i),de(i,{code:Z.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),n.dirty()):a.kind==="max"?t.data.getTime()>a.value&&(i=this._getOrReturnCtx(t,i),de(i,{code:Z.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),n.dirty()):qe.assertNever(a);return{status:n.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Sf({...this._def,checks:[...this._def.checks,t]})}min(t,r){return this._addCheck({kind:"min",value:t.getTime(),message:we.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:we.toString(r)})}get minDate(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t!=null?new Date(t):null}}Sf.create=e=>new Sf({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:_e.ZodDate,...Ie(e)});class c1 extends We{_parse(t){if(this._getType(t)!==me.symbol){const n=this._getOrReturnCtx(t);return de(n,{code:Z.invalid_type,expected:me.symbol,received:n.parsedType}),Ee}return qr(t.data)}}c1.create=e=>new c1({typeName:_e.ZodSymbol,...Ie(e)});class xg extends We{_parse(t){if(this._getType(t)!==me.undefined){const n=this._getOrReturnCtx(t);return de(n,{code:Z.invalid_type,expected:me.undefined,received:n.parsedType}),Ee}return qr(t.data)}}xg.create=e=>new xg({typeName:_e.ZodUndefined,...Ie(e)});class bg extends We{_parse(t){if(this._getType(t)!==me.null){const n=this._getOrReturnCtx(t);return de(n,{code:Z.invalid_type,expected:me.null,received:n.parsedType}),Ee}return qr(t.data)}}bg.create=e=>new bg({typeName:_e.ZodNull,...Ie(e)});class u1 extends We{constructor(){super(...arguments),this._any=!0}_parse(t){return qr(t.data)}}u1.create=e=>new u1({typeName:_e.ZodAny,...Ie(e)});class kl extends We{constructor(){super(...arguments),this._unknown=!0}_parse(t){return qr(t.data)}}kl.create=e=>new kl({typeName:_e.ZodUnknown,...Ie(e)});class wo extends We{_parse(t){const r=this._getOrReturnCtx(t);return de(r,{code:Z.invalid_type,expected:me.never,received:r.parsedType}),Ee}}wo.create=e=>new wo({typeName:_e.ZodNever,...Ie(e)});class d1 extends We{_parse(t){if(this._getType(t)!==me.undefined){const n=this._getOrReturnCtx(t);return de(n,{code:Z.invalid_type,expected:me.void,received:n.parsedType}),Ee}return qr(t.data)}}d1.create=e=>new d1({typeName:_e.ZodVoid,...Ie(e)});class Pi extends We{_parse(t){const{ctx:r,status:n}=this._processInputParams(t),i=this._def;if(r.parsedType!==me.array)return de(r,{code:Z.invalid_type,expected:me.array,received:r.parsedType}),Ee;if(i.exactLength!==null){const o=r.data.length>i.exactLength.value,s=r.data.length<i.exactLength.value;(o||s)&&(de(r,{code:o?Z.too_big:Z.too_small,minimum:s?i.exactLength.value:void 0,maximum:o?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),n.dirty())}if(i.minLength!==null&&r.data.length<i.minLength.value&&(de(r,{code:Z.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),n.dirty()),i.maxLength!==null&&r.data.length>i.maxLength.value&&(de(r,{code:Z.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((o,s)=>i.type._parseAsync(new Ei(r,o,r.path,s)))).then(o=>Ar.mergeArray(n,o));const a=[...r.data].map((o,s)=>i.type._parseSync(new Ei(r,o,r.path,s)));return Ar.mergeArray(n,a)}get element(){return this._def.type}min(t,r){return new Pi({...this._def,minLength:{value:t,message:we.toString(r)}})}max(t,r){return new Pi({...this._def,maxLength:{value:t,message:we.toString(r)}})}length(t,r){return new Pi({...this._def,exactLength:{value:t,message:we.toString(r)}})}nonempty(t){return this.min(1,t)}}Pi.create=(e,t)=>new Pi({type:e,minLength:null,maxLength:null,exactLength:null,typeName:_e.ZodArray,...Ie(t)});function el(e){if(e instanceof Nt){const t={};for(const r in e.shape){const n=e.shape[r];t[r]=sa.create(el(n))}return new Nt({...e._def,shape:()=>t})}else return e instanceof Pi?new Pi({...e._def,type:el(e.element)}):e instanceof sa?sa.create(el(e.unwrap())):e instanceof Cs?Cs.create(el(e.unwrap())):e instanceof ba?ba.create(e.items.map(t=>el(t))):e}class Nt extends We{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),r=qe.objectKeys(t);return this._cached={shape:t,keys:r}}_parse(t){if(this._getType(t)!==me.object){const u=this._getOrReturnCtx(t);return de(u,{code:Z.invalid_type,expected:me.object,received:u.parsedType}),Ee}const{status:n,ctx:i}=this._processInputParams(t),{shape:a,keys:o}=this._getCached(),s=[];if(!(this._def.catchall instanceof wo&&this._def.unknownKeys==="strip"))for(const u in i.data)o.includes(u)||s.push(u);const c=[];for(const u of o){const f=a[u],d=i.data[u];c.push({key:{status:"valid",value:u},value:f._parse(new Ei(i,d,i.path,u)),alwaysSet:u in i.data})}if(this._def.catchall instanceof wo){const u=this._def.unknownKeys;if(u==="passthrough")for(const f of s)c.push({key:{status:"valid",value:f},value:{status:"valid",value:i.data[f]}});else if(u==="strict")s.length>0&&(de(i,{code:Z.unrecognized_keys,keys:s}),n.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const u=this._def.catchall;for(const f of s){const d=i.data[f];c.push({key:{status:"valid",value:f},value:u._parse(new Ei(i,d,i.path,f)),alwaysSet:f in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const u=[];for(const f of c){const d=await f.key,h=await f.value;u.push({key:d,value:h,alwaysSet:f.alwaysSet})}return u}).then(u=>Ar.mergeObjectSync(n,u)):Ar.mergeObjectSync(n,c)}get shape(){return this._def.shape()}strict(t){return we.errToObj,new Nt({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(r,n)=>{var i,a,o,s;const c=(o=(a=(i=this._def).errorMap)===null||a===void 0?void 0:a.call(i,r,n).message)!==null&&o!==void 0?o:n.defaultError;return r.code==="unrecognized_keys"?{message:(s=we.errToObj(t).message)!==null&&s!==void 0?s:c}:{message:c}}}:{}})}strip(){return new Nt({...this._def,unknownKeys:"strip"})}passthrough(){return new Nt({...this._def,unknownKeys:"passthrough"})}extend(t){return new Nt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new Nt({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:_e.ZodObject})}setKey(t,r){return this.augment({[t]:r})}catchall(t){return new Nt({...this._def,catchall:t})}pick(t){const r={};return qe.objectKeys(t).forEach(n=>{t[n]&&this.shape[n]&&(r[n]=this.shape[n])}),new Nt({...this._def,shape:()=>r})}omit(t){const r={};return qe.objectKeys(this.shape).forEach(n=>{t[n]||(r[n]=this.shape[n])}),new Nt({...this._def,shape:()=>r})}deepPartial(){return el(this)}partial(t){const r={};return qe.objectKeys(this.shape).forEach(n=>{const i=this.shape[n];t&&!t[n]?r[n]=i:r[n]=i.optional()}),new Nt({...this._def,shape:()=>r})}required(t){const r={};return qe.objectKeys(this.shape).forEach(n=>{if(t&&!t[n])r[n]=this.shape[n];else{let a=this.shape[n];for(;a instanceof sa;)a=a._def.innerType;r[n]=a}}),new Nt({...this._def,shape:()=>r})}keyof(){return W5(qe.objectKeys(this.shape))}}Nt.create=(e,t)=>new Nt({shape:()=>e,unknownKeys:"strip",catchall:wo.create(),typeName:_e.ZodObject,...Ie(t)});Nt.strictCreate=(e,t)=>new Nt({shape:()=>e,unknownKeys:"strict",catchall:wo.create(),typeName:_e.ZodObject,...Ie(t)});Nt.lazycreate=(e,t)=>new Nt({shape:e,unknownKeys:"strip",catchall:wo.create(),typeName:_e.ZodObject,...Ie(t)});class wg extends We{_parse(t){const{ctx:r}=this._processInputParams(t),n=this._def.options;function i(a){for(const s of a)if(s.result.status==="valid")return s.result;for(const s of a)if(s.result.status==="dirty")return r.common.issues.push(...s.ctx.common.issues),s.result;const o=a.map(s=>new On(s.ctx.common.issues));return de(r,{code:Z.invalid_union,unionErrors:o}),Ee}if(r.common.async)return Promise.all(n.map(async a=>{const o={...r,common:{...r.common,issues:[]},parent:null};return{result:await a._parseAsync({data:r.data,path:r.path,parent:o}),ctx:o}})).then(i);{let a;const o=[];for(const c of n){const u={...r,common:{...r.common,issues:[]},parent:null},f=c._parseSync({data:r.data,path:r.path,parent:u});if(f.status==="valid")return f;f.status==="dirty"&&!a&&(a={result:f,ctx:u}),u.common.issues.length&&o.push(u.common.issues)}if(a)return r.common.issues.push(...a.ctx.common.issues),a.result;const s=o.map(c=>new On(c));return de(r,{code:Z.invalid_union,unionErrors:s}),Ee}}get options(){return this._def.options}}wg.create=(e,t)=>new wg({options:e,typeName:_e.ZodUnion,...Ie(t)});const Bi=e=>e instanceof Pg?Bi(e.schema):e instanceof wa?Bi(e.innerType()):e instanceof Ng?[e.value]:e instanceof ks?e.options:e instanceof _g?qe.objectValues(e.enum):e instanceof Og?Bi(e._def.innerType):e instanceof xg?[void 0]:e instanceof bg?[null]:e instanceof sa?[void 0,...Bi(e.unwrap())]:e instanceof Cs?[null,...Bi(e.unwrap())]:e instanceof V5||e instanceof kg?Bi(e.unwrap()):e instanceof Eg?Bi(e._def.innerType):[];class _P extends We{_parse(t){const{ctx:r}=this._processInputParams(t);if(r.parsedType!==me.object)return de(r,{code:Z.invalid_type,expected:me.object,received:r.parsedType}),Ee;const n=this.discriminator,i=r.data[n],a=this.optionsMap.get(i);return a?r.common.async?a._parseAsync({data:r.data,path:r.path,parent:r}):a._parseSync({data:r.data,path:r.path,parent:r}):(de(r,{code:Z.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),Ee)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,r,n){const i=new Map;for(const a of r){const o=Bi(a.shape[t]);if(!o.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const s of o){if(i.has(s))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(s)}`);i.set(s,a)}}return new _P({typeName:_e.ZodDiscriminatedUnion,discriminator:t,options:r,optionsMap:i,...Ie(n)})}}function f1(e,t){const r=Go(e),n=Go(t);if(e===t)return{valid:!0,data:e};if(r===me.object&&n===me.object){const i=qe.objectKeys(t),a=qe.objectKeys(e).filter(s=>i.indexOf(s)!==-1),o={...e,...t};for(const s of a){const c=f1(e[s],t[s]);if(!c.valid)return{valid:!1};o[s]=c.data}return{valid:!0,data:o}}else if(r===me.array&&n===me.array){if(e.length!==t.length)return{valid:!1};const i=[];for(let a=0;a<e.length;a++){const o=e[a],s=t[a],c=f1(o,s);if(!c.valid)return{valid:!1};i.push(c.data)}return{valid:!0,data:i}}else return r===me.date&&n===me.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class Sg extends We{_parse(t){const{status:r,ctx:n}=this._processInputParams(t),i=(a,o)=>{if(mA(a)||mA(o))return Ee;const s=f1(a.value,o.value);return s.valid?((gA(a)||gA(o))&&r.dirty(),{status:r.value,value:s.data}):(de(n,{code:Z.invalid_intersection_types}),Ee)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([a,o])=>i(a,o)):i(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}Sg.create=(e,t,r)=>new Sg({left:e,right:t,typeName:_e.ZodIntersection,...Ie(r)});class ba extends We{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==me.array)return de(n,{code:Z.invalid_type,expected:me.array,received:n.parsedType}),Ee;if(n.data.length<this._def.items.length)return de(n,{code:Z.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Ee;!this._def.rest&&n.data.length>this._def.items.length&&(de(n,{code:Z.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());const a=[...n.data].map((o,s)=>{const c=this._def.items[s]||this._def.rest;return c?c._parse(new Ei(n,o,n.path,s)):null}).filter(o=>!!o);return n.common.async?Promise.all(a).then(o=>Ar.mergeArray(r,o)):Ar.mergeArray(r,a)}get items(){return this._def.items}rest(t){return new ba({...this._def,rest:t})}}ba.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ba({items:e,typeName:_e.ZodTuple,rest:null,...Ie(t)})};class jg extends We{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==me.object)return de(n,{code:Z.invalid_type,expected:me.object,received:n.parsedType}),Ee;const i=[],a=this._def.keyType,o=this._def.valueType;for(const s in n.data)i.push({key:a._parse(new Ei(n,s,n.path,s)),value:o._parse(new Ei(n,n.data[s],n.path,s)),alwaysSet:s in n.data});return n.common.async?Ar.mergeObjectAsync(r,i):Ar.mergeObjectSync(r,i)}get element(){return this._def.valueType}static create(t,r,n){return r instanceof We?new jg({keyType:t,valueType:r,typeName:_e.ZodRecord,...Ie(n)}):new jg({keyType:ea.create(),valueType:t,typeName:_e.ZodRecord,...Ie(r)})}}class h1 extends We{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==me.map)return de(n,{code:Z.invalid_type,expected:me.map,received:n.parsedType}),Ee;const i=this._def.keyType,a=this._def.valueType,o=[...n.data.entries()].map(([s,c],u)=>({key:i._parse(new Ei(n,s,n.path,[u,"key"])),value:a._parse(new Ei(n,c,n.path,[u,"value"]))}));if(n.common.async){const s=new Map;return Promise.resolve().then(async()=>{for(const c of o){const u=await c.key,f=await c.value;if(u.status==="aborted"||f.status==="aborted")return Ee;(u.status==="dirty"||f.status==="dirty")&&r.dirty(),s.set(u.value,f.value)}return{status:r.value,value:s}})}else{const s=new Map;for(const c of o){const u=c.key,f=c.value;if(u.status==="aborted"||f.status==="aborted")return Ee;(u.status==="dirty"||f.status==="dirty")&&r.dirty(),s.set(u.value,f.value)}return{status:r.value,value:s}}}}h1.create=(e,t,r)=>new h1({valueType:t,keyType:e,typeName:_e.ZodMap,...Ie(r)});class Ec extends We{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==me.set)return de(n,{code:Z.invalid_type,expected:me.set,received:n.parsedType}),Ee;const i=this._def;i.minSize!==null&&n.data.size<i.minSize.value&&(de(n,{code:Z.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),r.dirty()),i.maxSize!==null&&n.data.size>i.maxSize.value&&(de(n,{code:Z.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),r.dirty());const a=this._def.valueType;function o(c){const u=new Set;for(const f of c){if(f.status==="aborted")return Ee;f.status==="dirty"&&r.dirty(),u.add(f.value)}return{status:r.value,value:u}}const s=[...n.data.values()].map((c,u)=>a._parse(new Ei(n,c,n.path,u)));return n.common.async?Promise.all(s).then(c=>o(c)):o(s)}min(t,r){return new Ec({...this._def,minSize:{value:t,message:we.toString(r)}})}max(t,r){return new Ec({...this._def,maxSize:{value:t,message:we.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}}Ec.create=(e,t)=>new Ec({valueType:e,minSize:null,maxSize:null,typeName:_e.ZodSet,...Ie(t)});class sd extends We{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:r}=this._processInputParams(t);if(r.parsedType!==me.function)return de(r,{code:Z.invalid_type,expected:me.function,received:r.parsedType}),Ee;function n(s,c){return s1({data:s,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,o1(),wf].filter(u=>!!u),issueData:{code:Z.invalid_arguments,argumentsError:c}})}function i(s,c){return s1({data:s,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,o1(),wf].filter(u=>!!u),issueData:{code:Z.invalid_return_type,returnTypeError:c}})}const a={errorMap:r.common.contextualErrorMap},o=r.data;if(this._def.returns instanceof jf){const s=this;return qr(async function(...c){const u=new On([]),f=await s._def.args.parseAsync(c,a).catch(p=>{throw u.addIssue(n(c,p)),u}),d=await Reflect.apply(o,this,f);return await s._def.returns._def.type.parseAsync(d,a).catch(p=>{throw u.addIssue(i(d,p)),u})})}else{const s=this;return qr(function(...c){const u=s._def.args.safeParse(c,a);if(!u.success)throw new On([n(c,u.error)]);const f=Reflect.apply(o,this,u.data),d=s._def.returns.safeParse(f,a);if(!d.success)throw new On([i(f,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new sd({...this._def,args:ba.create(t).rest(kl.create())})}returns(t){return new sd({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,r,n){return new sd({args:t||ba.create([]).rest(kl.create()),returns:r||kl.create(),typeName:_e.ZodFunction,...Ie(n)})}}class Pg extends We{get schema(){return this._def.getter()}_parse(t){const{ctx:r}=this._processInputParams(t);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}}Pg.create=(e,t)=>new Pg({getter:e,typeName:_e.ZodLazy,...Ie(t)});class Ng extends We{_parse(t){if(t.data!==this._def.value){const r=this._getOrReturnCtx(t);return de(r,{received:r.data,code:Z.invalid_literal,expected:this._def.value}),Ee}return{status:"valid",value:t.data}}get value(){return this._def.value}}Ng.create=(e,t)=>new Ng({value:e,typeName:_e.ZodLiteral,...Ie(t)});function W5(e,t){return new ks({values:e,typeName:_e.ZodEnum,...Ie(t)})}class ks extends We{constructor(){super(...arguments),Fu.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const r=this._getOrReturnCtx(t),n=this._def.values;return de(r,{expected:qe.joinValues(n),received:r.parsedType,code:Z.invalid_type}),Ee}if(yg(this,Fu)||B5(this,Fu,new Set(this._def.values)),!yg(this,Fu).has(t.data)){const r=this._getOrReturnCtx(t),n=this._def.values;return de(r,{received:r.data,code:Z.invalid_enum_value,options:n}),Ee}return qr(t.data)}get options(){return this._def.values}get enum(){const t={};for(const r of this._def.values)t[r]=r;return t}get Values(){const t={};for(const r of this._def.values)t[r]=r;return t}get Enum(){const t={};for(const r of this._def.values)t[r]=r;return t}extract(t,r=this._def){return ks.create(t,{...this._def,...r})}exclude(t,r=this._def){return ks.create(this.options.filter(n=>!t.includes(n)),{...this._def,...r})}}Fu=new WeakMap;ks.create=W5;class _g extends We{constructor(){super(...arguments),Bu.set(this,void 0)}_parse(t){const r=qe.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(t);if(n.parsedType!==me.string&&n.parsedType!==me.number){const i=qe.objectValues(r);return de(n,{expected:qe.joinValues(i),received:n.parsedType,code:Z.invalid_type}),Ee}if(yg(this,Bu)||B5(this,Bu,new Set(qe.getValidEnumValues(this._def.values))),!yg(this,Bu).has(t.data)){const i=qe.objectValues(r);return de(n,{received:n.data,code:Z.invalid_enum_value,options:i}),Ee}return qr(t.data)}get enum(){return this._def.values}}Bu=new WeakMap;_g.create=(e,t)=>new _g({values:e,typeName:_e.ZodNativeEnum,...Ie(t)});class jf extends We{unwrap(){return this._def.type}_parse(t){const{ctx:r}=this._processInputParams(t);if(r.parsedType!==me.promise&&r.common.async===!1)return de(r,{code:Z.invalid_type,expected:me.promise,received:r.parsedType}),Ee;const n=r.parsedType===me.promise?r.data:Promise.resolve(r.data);return qr(n.then(i=>this._def.type.parseAsync(i,{path:r.path,errorMap:r.common.contextualErrorMap})))}}jf.create=(e,t)=>new jf({type:e,typeName:_e.ZodPromise,...Ie(t)});class wa extends We{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===_e.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:r,ctx:n}=this._processInputParams(t),i=this._def.effect||null,a={addIssue:o=>{de(n,o),o.fatal?r.abort():r.dirty()},get path(){return n.path}};if(a.addIssue=a.addIssue.bind(a),i.type==="preprocess"){const o=i.transform(n.data,a);if(n.common.async)return Promise.resolve(o).then(async s=>{if(r.value==="aborted")return Ee;const c=await this._def.schema._parseAsync({data:s,path:n.path,parent:n});return c.status==="aborted"?Ee:c.status==="dirty"||r.value==="dirty"?Lu(c.value):c});{if(r.value==="aborted")return Ee;const s=this._def.schema._parseSync({data:o,path:n.path,parent:n});return s.status==="aborted"?Ee:s.status==="dirty"||r.value==="dirty"?Lu(s.value):s}}if(i.type==="refinement"){const o=s=>{const c=i.refinement(s,a);if(n.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(n.common.async===!1){const s=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?Ee:(s.status==="dirty"&&r.dirty(),o(s.value),{status:r.value,value:s.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(s=>s.status==="aborted"?Ee:(s.status==="dirty"&&r.dirty(),o(s.value).then(()=>({status:r.value,value:s.value}))))}if(i.type==="transform")if(n.common.async===!1){const o=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!gg(o))return o;const s=i.transform(o.value,a);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:s}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(o=>gg(o)?Promise.resolve(i.transform(o.value,a)).then(s=>({status:r.value,value:s})):o);qe.assertNever(i)}}wa.create=(e,t,r)=>new wa({schema:e,typeName:_e.ZodEffects,effect:t,...Ie(r)});wa.createWithPreprocess=(e,t,r)=>new wa({schema:t,effect:{type:"preprocess",transform:e},typeName:_e.ZodEffects,...Ie(r)});class sa extends We{_parse(t){return this._getType(t)===me.undefined?qr(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}sa.create=(e,t)=>
712new sa({innerType:e,typeName:_e.ZodOptional,...Ie(t)});class Cs extends We{_parse(t){return this._getType(t)===me.null?qr(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Cs.create=(e,t)=>new Cs({innerType:e,typeName:_e.ZodNullable,...Ie(t)});class Og extends We{_parse(t){const{ctx:r}=this._processInputParams(t);let n=r.data;return r.parsedType===me.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}}Og.create=(e,t)=>new Og({innerType:e,typeName:_e.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Ie(t)});class Eg extends We{_parse(t){const{ctx:r}=this._processInputParams(t),n={...r,common:{...r.common,issues:[]}},i=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return vg(i)?i.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new On(n.common.issues)},input:n.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new On(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}Eg.create=(e,t)=>new Eg({innerType:e,typeName:_e.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Ie(t)});class p1 extends We{_parse(t){if(this._getType(t)!==me.nan){const n=this._getOrReturnCtx(t);return de(n,{code:Z.invalid_type,expected:me.nan,received:n.parsedType}),Ee}return{status:"valid",value:t.data}}}p1.create=e=>new p1({typeName:_e.ZodNaN,...Ie(e)});class V5 extends We{_parse(t){const{ctx:r}=this._processInputParams(t),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}}class py extends We{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.common.async)return(async()=>{const a=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return a.status==="aborted"?Ee:a.status==="dirty"?(r.dirty(),Lu(a.value)):this._def.out._parseAsync({data:a.value,path:n.path,parent:n})})();{const i=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?Ee:i.status==="dirty"?(r.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:n.path,parent:n})}}static create(t,r){return new py({in:t,out:r,typeName:_e.ZodPipeline})}}class kg extends We{_parse(t){const r=this._def.innerType._parse(t),n=i=>(gg(i)&&(i.value=Object.freeze(i.value)),i);return vg(r)?r.then(i=>n(i)):n(r)}unwrap(){return this._def.innerType}}kg.create=(e,t)=>new kg({innerType:e,typeName:_e.ZodReadonly,...Ie(t)});Nt.lazycreate;var _e;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(_e||(_e={}));const Ou=ea.create;_c.create;p1.create;Oc.create;l1.create;Sf.create;c1.create;xg.create;bg.create;u1.create;kl.create;wo.create;d1.create;Pi.create;const rPe=Nt.create;Nt.strictCreate;wg.create;_P.create;Sg.create;ba.create;jg.create;h1.create;Ec.create;sd.create;Pg.create;Ng.create;const nPe=ks.create;_g.create;jf.create;wa.create;sa.create;Cs.create;wa.createWithPreprocess;py.create;const iPe=rPe({title:Ou().min(3,"Title must be at least 3 characters"),description:Ou().min(10,"Description must be at least 10 characters"),videoId:Ou().min(5,"Invalid YouTube video ID"),duration:Ou().min(3,"Please provide video duration (e.g. 10:30)"),level:nPe(["beginner","intermediate","advanced"]),category:Ou().min(3,"Category is required")}),aPe=()=>{const{toast:e}=Ct(),[t,r]=v.useState({dailyGoal:30,notificationsEnabled:!0,audioEnabled:!0,aiEnabled:!0,analyticsEnabled:!0,theme:"system",difficulty:"intermediate",privacySettings:{saveHistory:!0,shareFeedback:!1}}),[n,i]=v.useState([]),a=Mje({resolver:Lje(iPe),defaultValues:{title:"",description:"",videoId:"",duration:"",level:"intermediate",category:"conversation"}});v.useEffect(()=>{const h=localStorage.getItem("userSettings");if(h)try{r(JSON.parse(h))}catch(g){console.error("Failed to parse settings:",g)}const p=localStorage.getItem("videoLessons");if(p)try{i(JSON.parse(p))}catch(g){console.error("Failed to parse video lessons:",g)}},[]);const o=(h,p)=>{r(g=>{const m={...g,[h]:p};return localStorage.setItem("userSettings",JSON.stringify(m)),m})},s=(h,p,g)=>{r(m=>{const y=m[h],x={...m,[h]:{...y,[p]:g}};return localStorage.setItem("userSettings",JSON.stringify(x)),x})},c=()=>{localStorage.setItem("userSettings",JSON.stringify(t)),e({title:"Settings Saved",description:"Your preferences have been updated successfully."})},u=()=>{const h={dailyGoal:30,notificationsEnabled:!0,audioEnabled:!0,aiEnabled:!0,analyticsEnabled:!0,theme:"system",difficulty:"intermediate",privacySettings:{saveHistory:!0,shareFeedback:!1}};r(h),localStorage.setItem("userSettings",JSON.stringify(h)),e({title:"Settings Reset",description:"Your preferences have been reset to defaults."})},f=h=>{let p=h.videoId;if(p.includes("youtube.com")||p.includes("youtu.be")){const y=new URL(p);p.includes("youtube.com/watch")?p=y.searchParams.get("v")||p:p.includes("youtu.be/")&&(p=y.pathname.substring(1)||p)}
712const g={id:Fr(),...h,videoId:p},m=[...n,g];i(m),localStorage.setItem("videoLessons",JSON.stringify(m)),e({title:"Video Lesson Added",description:"Your video lesson has been added successfully."}),a.reset()},d=h=>{const p=n.filter(g=>g.id!==h);i(p),localStorage.setItem("videoLessons",JSON.stringify(p)),e({title:"Video Lesson Removed",description:"The video lesson has been removed."})};return l.jsxs("div",{className:"min-h-screen bg-background",children:[l.jsx(un,{}),l.jsx(dn,{}),l.jsx("main",{className:"pt-24 pb-16 pl-72 pr-6",children:l.jsx("div",{className:"max-w-4xl mx-auto animate-fade-in",children:l.jsxs("section",{className:"mb-8",children:[l.jsx("h1",{className:"text-3xl font-display font-semibold mb-2",children:"Settings"}),l.jsx("p",{className:"text-muted-foreground mb-6",children:"Configure your preferences and personalize your learning experience."}),l.jsxs(ki,{defaultValue:"general",className:"w-full",children:[l.jsxs(Ci,{className:"grid w-full grid-cols-4 mb-6",children:[l.jsx(at,{value:"general",children:"General"}),l.jsx(at,{value:"appearance",children:"Appearance"}),l.jsx(at,{value:"privacy",children:"Privacy"}),l.jsx(at,{value:"lessons",children:"Lessons"})]}),l.jsxs(ot,{value:"general",children:[l.jsxs(ne,{children:[l.jsxs(ce,{children:[l.jsx(he,{children:"Learning Preferences"}),l.jsx(ke,{children:"Configure your daily goals and difficulty level"})]}),l.jsxs(ie,{className:"space-y-6",children:[l.jsxs("div",{className:"space-y-2",children:[l.jsxs("div",{className:"flex justify-between items-center",children:[l.jsx(Rt,{htmlFor:"dailyGoal",children:"Daily Study Goal (minutes)"}),l.jsxs("span",{className:"text-muted-foreground",children:[t.dailyGoal," min"]})]}),l.jsx(RF,{id:"dailyGoal",min:5,max:120,step:5,value:[t.dailyGoal],onValueChange:h=>o("dailyGoal",h[0])})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx(Rt,{htmlFor:"difficulty",children:"Difficulty Level"}),l.jsxs(Xh,{value:t.difficulty,onValueChange:h=>o("difficulty",h),children:[l.jsx(Ru,{id:"difficulty",children:l.jsx(Qh,{placeholder:"Select difficulty"})}),l.jsxs(Du,{children:[l.jsx(hr,{value:"beginner",children:"Beginner"}),l.jsx(hr,{value:"intermediate",children:"Intermediate"}),l.jsx(hr,{value:"advanced",children:"Advanced"})]})]})]})]})]}),l.jsxs(ne,{children:[l.jsxs(ce,{children:[l.jsx(he,{children:"Notifications"}),l.jsx(ke,{children:"Configure your notification preferences"})]}),l.jsx(ie,{className:"space-y-4",children:l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("div",{className:"space-y-0.5",children:[l.jsx(Rt,{htmlFor:"notifications",children:"Enable Notifications"}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"Receive reminders for daily practice"})]}),l.jsx(zo,{id:"notifications",checked:t.notificationsEnabled,onCheckedChange:h=>o("notificationsEnabled",h)})]})})]}),l.jsxs(ne,{children:[l.jsxs(ce,{children:[l.jsx(he,{children:"Features"}),l.jsx(ke,{children:"Toggle platform features"})]}),l.jsxs(ie,{className:"space-y-4",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("div",{className:"space-y-0.5",children:[l.jsx(Rt,{htmlFor:"audio",children:"Audio Feedback"}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"Enable audio playback and feedback"})]}),l.jsx(zo,{id:"audio",checked:t.audioEnabled,onCheckedChange:h=>o("audioEnabled",h)})]}),l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("div",{className:"space-y-0.5",children:[l.jsx(Rt,{htmlFor:"ai",children:"AI Assistance"}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"Enable AI-powered feedback and suggestions"})]}),l.jsx(zo,{id:"ai",checked:t.aiEnabled,onCheckedChange:h=>o("aiEnabled",h)})]})]})]})]}),l.jsx(ot,{value:"appearance",children:l.jsxs(ne,{children:[l.jsxs(ce,{children:[l.jsx(he,{children:"Theme Settings"}),l.jsx(ke,{children:"Customize how the application looks"})]}),l.jsx(ie,{className:"space-y-4",children:l.jsxs("div",{className:"space-y-2",children:[l.jsx(Rt,{htmlFor:"theme",children:"Color Theme"}),l.jsxs(Xh,{value:t.theme,onValueChange:h=>o("theme",h),children:[l.jsx(Ru,{id:"theme",children:l.jsx(Qh,{placeholder:"Select theme"})}),l.jsxs(Du,{children:[l.jsx(hr,{value:"light",children:"Light"}),l.jsx(hr,{value:"dark",children:"Dark"}),l.jsx(hr,{value:"system",children:"System"})]})]})]})})]})}),l.jsxs(ot,{value:"privacy",children:[l.jsxs(ne,{children:[l.jsxs(ce,{children:[l.jsx(he,{children:"Privacy Settings"}),l.jsx(ke,{children:"Manage your data and privacy preferences"})]}),l.jsxs(ie,{className:"space-y-4",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("div",{className:"space-y-0.5",children:[l.jsx(Rt,{htmlFor:"saveHistory",children:"Save Learning History"}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"Store your learning progress and activity"})]}),l.jsx(zo,{id:"saveHistory",checked:t.privacySettings.saveHistory,onCheckedChange:h=>s("privacySettings","saveHistory",h)})]}),l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("div",{className:"space-y-0.5",children:[l.jsx(Rt,{htmlFor:"analytics",children:"Usage Analytics"}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"Allow anonymous usage data collection to improve the platform"})]}),l.jsx(zo,{id:"analytics",checked:t.analyticsEnabled,onCheckedChange:h=>o("analyticsEnabled",h)})]}),l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("div",{className:"space-y-0.5",children:[l.jsx(Rt,{htmlFor:"shareFeedback",children:"Share Feedback"}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"Allow sharing your feedback for improving AI models"})]}),l.jsx(zo,{id:"shareFeedback",checked:t.privacySettings.shareFeedback,onCheckedChange:h=>s("privacySettings","shareFeedback",h)})]})]})]}),l.jsxs(ne,{children:[l.jsxs(ce,{children:[l.jsx(he,{children:"Data Management"}),l.jsx(ke,{children:"Manage your personal data"})]}),l.jsxs(ie,{className:"space-y-4",children:[l.jsx(Y,{variant:"outline",className:"w-full",children:"Export Your Data"}),l.jsx(Y,{variant:"destructive",className:"w-full",children:"Clear All Data"})]})]})]}),l.jsxs(ot,{value:"lessons",className:"space-y-6",children:[l.jsxs(ne,{children:[l.jsxs(ce,{children:[l.jsx(he,{children:"Video Lessons Management"}),l.jsx(ke,{children:"Add, edit, and remove video lessons from your library"})]}),l.jsx(ie,{className:"space-y-6",children:l.jsx(Ije,{...a,children:l.jsxs("form",{onSubmit:a.handleSubmit(f),className:"space-y-4",children:[l.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[l.jsx(Js,{control:a.control,name:"title",render:({field:h})=>l.jsxs(Wo,{children:[l.jsx(Vo,{children:"Title"}),l.jsx(Ho,{children:l.jsx(tr,{placeholder:"Lesson title...",...h})}),l.jsx(qo,{})]})}),l.jsx(Js,{control:a.control,name:"videoId",render:({field:h})=>l.jsxs(Wo,{children:[l.jsx(Vo,{children:"YouTube Video URL or ID"}),l.jsx(Ho,{children:l.jsx(tr,{placeholder:"https://youtu.be/...",...h})}),l.jsx(L5,{children:"Paste a YouTube URL or just the video ID"}),l.jsx(qo,{})]})})]}),l.jsx(Js,{control:a.control,name:"description",render:({field:h})=>l.jsxs(Wo,{children:[l.jsx(Vo,{children:"Description"}),l.jsx(Ho,{children:l.jsx(tr,{placeholder:"Brief description of the lesson...",...h})}),l.jsx(qo,{})]})}),l.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[l.jsx(Js,{control:a.control,name:"duration",render:({field:h})=>l.jsxs(Wo,{children:[l.jsx(Vo,{children:"Duration"}),l.jsx(Ho,{children:l.jsx(tr,{placeholder:"10:30",...h})}),l.jsx(qo,{})]})}),l.jsx(Js,{control:a.control,name:"level",render:({field:h})=>l.jsxs(Wo,{children:[l.jsx(Vo,{children:"Difficulty Level"}),l.jsxs(Xh,{onValueChange:h.onChange,defaultValue:h.value,children:[l.jsx(Ho,{children:l.jsx(Ru,{children:l.jsx(Qh,{placeholder:"Select level"})})}),l.jsxs(Du,{children:[l.jsx(hr,{value:"beginner",children:"Beginner"}),l.jsx(hr,{value:"intermediate",children:"Intermediate"}),l.jsx(hr,{value:"advanced",children:"Advanced"})]})]}),l.jsx(qo,{})]})}),l.jsx(Js,{control:a.control,name:"category",render:({field:h})=>l.jsxs(Wo,{children:[l.jsx(Vo,{children:"Category"}),l.jsxs(Xh,{onValueChange:h.onChange,defaultValue:h.value,children:[l.jsx(Ho,{children:l.jsx(Ru,{children:l.jsx(Qh,{placeholder:"Select category"})})}),l.jsxs(Du,{children:[l.jsx(hr,{value:"conversation",children:"Conversation"}),l.jsx(hr,{value:"grammar",children:"Grammar"}),l.jsx(hr,{value:"vocabulary",children:"Vocabulary"}),l.jsx(hr,{value:"pronunciation",children:"Pronunciation"}),l.jsx(hr,{value:"reading",children:"Reading"}),l.jsx(hr,{value:"writing",children:"Writing"})]})]}),l.jsx(qo,{})]})})]}),l.jsx(Y,{type:"submit",className:"w-full",children:"Add Video Lesson"})]})})})]}),l.jsxs(ne,{children:[l.jsxs(ce,{children:[l.jsx(he,{children:"Your Video Lessons"}),l.jsx(ke,{children:"Manage existing video lessons"})]}),l.jsx(ie,{children:n.length===0?l.jsx("div",{className:"text-center py-8 text-muted-foreground",children:"No video lessons added yet. Add your first lesson above."}):l.jsx("div",{className:"space-y-4",children:n.map(h=>l.jsxs("div",{className:"flex items-start justify-between border-b pb-4",children:[l.jsxs("div",{children:[l.jsx("h3",{className:"font-medium",children:h.title}),l.jsx("p",{className:"text-sm text-muted-foreground line-clamp-1",children:h.description}),l.jsxs("div",{className:"flex gap-2 mt-1",children:[l.jsx("span",{className:"text-xs bg-muted px-2 py-0.5 rounded-full",children:h.level}),l.jsx("span",{className:"text-xs bg-muted px-2 py-0.5 rounded-full",children:h.category}),l.jsx("span",{className:"text-xs bg-muted px-2 py-0.5 rounded-full",children:h.duration})]})]}),l.jsx(Y,{variant:"destructive",size:"sm",onClick:()=>d(h.id),children:"Remove"})]}
712,h.id))})})]})]})]}),l.jsxs("div",{className:"flex justify-between mt-8",children:[l.jsx(Y,{variant:"outline",onClick:u,children:"Reset to Defaults"}),l.jsx(Y,{onClick:c,children:"Save Changes"})]})]})})})]})},oPe=()=>{const e=Mc();return v.useEffect(()=>{console.error("404 Error: User attempted to access non-existent route:",e.pathname)},[e.pathname]),l.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gray-100",children:l.jsxs("div",{className:"text-center",children:[l.jsx("h1",{className:"text-4xl font-bold mb-4",children:"404"}),l.jsx("p",{className:"text-xl text-gray-600 mb-4",children:"Oops! Page not found"}),l.jsx("a",{href:"/",className:"text-blue-500 hover:text-blue-700 underline",children:"Return to Home"})]})})},sPe=({defaultTab:e})=>l.jsxs("div",{className:"mb-8",children:[l.jsx("h1",{className:"text-3xl font-display font-semibold mb-2",children:"Communication Skills Practice"}),l.jsx("p",{className:"text-muted-foreground mb-6",children:"Improve your reading, writing, and vocabulary skills through interactive exercises."}),l.jsx(ki,{defaultValue:e,className:"w-full",children:l.jsxs(Ci,{className:"grid w-full max-w-md grid-cols-3 mb-6",children:[l.jsxs(at,{value:"writing",children:[l.jsx(SS,{className:"h-4 w-4 mr-2"}),"Writing"]}),l.jsxs(at,{value:"reading",children:[l.jsx(Rs,{className:"h-4 w-4 mr-2"}),"Reading"]}),l.jsxs(at,{value:"vocabulary",children:[l.jsx(LM,{className:"h-4 w-4 mr-2"}),"Vocabulary"]})]})})]}),lPe=({prompt:e,type:t="essay",timeLimit:r,minWords:n,level:i="intermediate",onComplete:a})=>{var A,D;const[o,s]=v.useState(""),[c,u]=v.useState(""),[f,d]=v.useState(!1),[h,p]=v.useState(!1),[g,m]=v.useState(!1),[y,x]=v.useState(!1),[b,w]=v.useState(0),[S,j]=v.useState(!1),[P,N]=v.useState(null),[_,O]=v.useState(null),{toast:k}=Ct();v.useEffect(()=>{(async()=>{if(e)N({prompt:e,type:t,minWords:n||150,timeLimit:r||15,tips:[]}),w((r||15)*60);else{m(!0);try{const z=await _n.generateWritingPrompt(t);N({prompt:z.prompt,type:z.type,minWords:z.minWords||150,timeLimit:z.timeLimit||15,tips:z.tips||[]}),w(z.timeLimit*60||900)}catch(z){console.error("Error loading writing prompt:",z),k({title:"Error Loading Prompt",description:"Failed to load a writing prompt. Using default prompt instead.",variant:"destructive"}),N({prompt:"Write about your favorite hobby or interest.",type:t,minWords:150,timeLimit:15,tips:["Start with an outline","Use specific examples","Proofread your work"]}),w(900)}finally{m(!1)}}})()},[e,r,n,t,i,k]);const C=o.trim()?o.trim().split(/\s+/).length:0,E=P?Math.min(100,C/P.minWords*100):0;v.useEffect(()=>{let F;return S&&b>0?F=setInterval(()=>{w(z=>z-1)},1e3):b===0&&S&&(j(!1),k({title:"Time's up!",description:"Your writing time has ended."})),()=>clearInterval(F)},[S,b,k]);const I=F=>{const z=Math.floor(F/60),H=F%60;return`${z}:${H<10?"0":""}${H}`},T=()=>{P&&(d(!0),j(!0),k({title:"Exercise started",description:`You have ${P.timeLimit} minutes to complete this writing task.`}))},$=async()=>{if(P){if(C<P.minWords){k({title:"More words needed",description:`Please write at least ${P.minWords} words. You currently have ${C}.`,variant:"destructive"});return}p(!0),j(!1),x(!0);try{const F=await _n.evaluateWriting(o);O(F),k({title:"Writing Evaluated",description:`Overall score: ${F.overall.score}/100`})}catch(F){console.error("Error evaluating writing:",F),k({title:"Evaluation Error",description:"There was a problem evaluating your writing. Please try again.",variant:"destructive"})}finally{x(!1)}a&&a(o)}},R=async()=>{d(!1),p(!1),s(""),u(""),O(null),m(!0);try{const F=await _n.generateWritingPrompt(t);N({prompt:F.prompt,type:F.type,minWords:F.minWords||150,timeLimit:F.timeLimit||15,tips:F.tips||[]}),w(F.timeLimit*60||15*60),k({title:"New Writing Prompt",description:"A new writing prompt has been generated for you."})}catch(F){console.error("Error loading writing prompt:",F),k({title:"Error Loading Prompt",description:"Failed to load a new writing prompt.",variant:"destructive"})}finally{m(!1)}},U={essay:"Essay Writing",response:"Response Writing",creative:"Creative Writing"}[(P==null?void 0:P.type)||t];return g?l.jsxs(ne,{className:"glass-panel",children:[l.jsxs(ce,{children:[l.jsx(he,{className:"font-display text-xl",children:"Loading Exercise"}),l.jsx(ke,{children:"Preparing your writing exercise..."})]}),l.jsxs(ie,{className:"flex flex-col items-center justify-center py-12 space-y-4",children:[l.jsx(nn,{className:"h-12 w-12 animate-spin text-primary"}),l.jsx("p",{className:"text-muted-foreground",children:"Generating a writing prompt for you..."})]})]}):P?l.jsxs(ne,{className:"glass-panel",children:[l.jsx(ce,{children:l.jsxs("div",{className:"flex justify-between items-start",children:[l.jsxs("div",{children:[l.jsx(he,{className:"font-display text-xl",children:f?c||"Untitled":U}),l.jsx(ke,{children:f?`${C} words (minimum: ${P.minWords})`:P.prompt})]}),l.jsxs(Kt,{variant:f?"secondary":"outline",children:[l.jsx(Zp,{className:"h-3 w-3 mr-1"}),I(b)]})]})}),l.jsx(ie,{className:"space-y-4",children:f?l.jsxs(l.Fragment,{children:[(P==null?void 0:P.type)==="essay"&&!h&&l.jsx(tr,{placeholder:"Enter a title for your essay",value:c,onChange:F=>u(F.target.value),className:"mb-4"}),l.jsxs("div",{className:"relative",children:[l.jsx(gP,{placeholder:"Start writing here...",value:o,onChange:F=>s(F.target.value),className:"min-h-[200px] resize-y",disabled:h}),y&&l.jsx("div",{className:"absolute inset-0 bg-background/50 flex items-center justify-center rounded-md backdrop-blur-sm",children:l.jsxs("div",{className:"flex flex-col items-center justify-center space-y-3",children:[l.jsx(nn,{className:"h-10 w-10 animate-spin text-primary"}),l.jsx("p",{children:"Evaluating your writing..."})]})}),h&&!y&&l.jsx("div",{className:"absolute inset-0 bg-background/50 flex items-center justify-center rounded-md backdrop-blur-sm",children:l.jsxs("div",{className:"bg-background p-4 rounded-lg shadow-lg text-center",children:[l.jsx(wS,{className:"h-8 w-8 text-green-500 mx-auto mb-2"}),l.jsx("p",{className:"font-medium",children:"Submitted successfully!"})]})})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsxs("div",{className:"flex justify-between text-sm",children:[l.jsx("span",{children:"Progress"}),l.jsxs("span",{children:[C,"/",P==null?void 0:P.minWords," words"]})]}),l.jsx(lr,{value:E,className:"h-2"})]}),h&&_&&l.jsxs("div",{className:"space-y-4 p-4 bg-muted/30 rounded-lg mt-4",children:[l.jsx("h3",{className:"font-medium text-lg",children:"Feedback on Your Writing"}),_.overall&&l.jsxs("div",{className:"space-y-2",children:[l.jsxs("div",{className:"flex justify-between items-center",children:[l.jsx("span",{children:"Overall Score"}),l.jsxs("span",{className:"font-semibold",children:[_.overall.score,"/100"]})]}),l.jsx(lr,{value:_.overall.score,className:"h-2"}),l.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:_.overall.summary})]}),((A=_.overall)==null?void 0:A.strengths)&&l.jsxs("div",{className:"space-y-2",children:[l.jsx("h4",{className:"font-semibold mb-1",children:"Strengths"}),l.jsx("ul",{className:"list-disc pl-5 space-y-1",children:_.overall.strengths.map((F,z)=>l.jsx("li",{className:"text-sm",children:F},z))})]}),((D=_.overall)==null?void 0:D.areasToImprove)&&l.jsx(Q3,{suggestions:_.overall.areasToImprove})]})]}):l.jsxs("div",{className:"p-6 bg-muted/30 rounded-lg text-center space-y-4",children:[l.jsx(SS,{className:"h-12 w-12 mx-auto text-muted-foreground"}),l.jsxs("div",{children:[l.jsx("p",{className:"text-lg font-medium",children:U}),l.jsxs("p",{className:"text-muted-foreground mt-1",children:["Write at least ",P==null?void 0:P.minWords," words in ",P==null?void 0:P.timeLimit," minutes"]})]}),(P==null?void 0:P.tips)&&P.tips.length>0&&l.jsxs("div",{className:"pt-4 border-t border-border mt-4",children:[l.jsx("h4",{className:"font-medium mb-2",children:"Writing Tips:"}),l.jsx("ul",{className:"text-sm text-muted-foreground list-disc pl-5 text-left space-y-1",children:P.tips.map((F,z)=>l.jsx("li",{children:F},z))})]})]})}
vendor: 4,469 bytes, line 712
712),l.jsx(jt,{children:f?h?l.jsx(Y,{variant:"outline",className:"w-full",onClick:R,children:"Start New Exercise"}):l.jsx(Y,{className:"w-full",onClick:$,disabled:C<((P==null?void 0:P.minWords)||0),children:"Submit Writing"}):l.jsx(Y,{className:"w-full",onClick:T,children:"Start Writing"})})]}):null},cPe=({onWritingComplete:e,essayPrompts:t})=>l.jsxs("div",{className:"space-y-6",children:[l.jsxs(ne,{children:[l.jsxs(ce,{children:[l.jsxs(he,{className:"flex items-center gap-2",children:[l.jsx(LW,{className:"h-5 w-5"}),"Writing Exercises"]}),l.jsx(ke,{children:"Practice your writing skills with these prompts"})]}),l.jsx(ie,{children:l.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:t.map((r,n)=>l.jsx(lPe,{prompt:r.prompt,type:r.type,minWords:r.minWords,onComplete:e},n))})})]}),l.jsxs(ne,{className:"bg-muted/10",children:[l.jsx(ce,{children:l.jsxs(he,{className:"flex items-center gap-2",children:[l.jsx(AW,{className:"h-5 w-5"}),"Writing Tips"]})}),l.jsx(ie,{children:l.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[l.jsxs("div",{className:"space-y-3 p-4 bg-background rounded-lg shadow-sm",children:[l.jsx(Kt,{className:"bg-blue-500",children:"Structure"}),l.jsx("h3",{className:"font-medium",children:"Organize Your Thoughts"}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"Start with an outline: introduction, main points, and conclusion. This framework will help you maintain a logical flow."})]}),l.jsxs("div",{className:"space-y-3 p-4 bg-background rounded-lg shadow-sm",children:[l.jsx(Kt,{className:"bg-green-500",children:"Clarity"}),l.jsx("h3",{className:"font-medium",children:"Be Clear and Concise"}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"Use simple, direct language. Avoid unnecessary words and jargon that might confuse your reader."})]}),l.jsxs("div",{className:"space-y-3 p-4 bg-background rounded-lg shadow-sm",children:[l.jsx(Kt,{className:"bg-purple-500",children:"Revision"}),l.jsx("h3",{className:"font-medium",children:"Review and Edit"}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"Always take time to review your writing. Look for grammar errors, clarity issues, and opportunities to improve."})]})]})})]})]});var OP="Radio",[uPe,H5]=cn(OP),[dPe,fPe]=uPe(OP),q5=v.forwardRef((e,t)=>{const{__scopeRadio:r,name:n,checked:i=!1,required:a,disabled:o,value:s="on",onCheck:c,form:u,...f}=e,[d,h]=v.useState(null),p=Ae(t,y=>h(y)),g=v.useRef(!1),m=d?u||!!d.closest("form"):!0;return l.jsxs(dPe,{scope:r,checked:i,disabled:o,children:[l.jsx(xe.button,{type:"button",role:"radio","aria-checked":i,"data-state":Y5(i),"data-disabled":o?"":void 0,disabled:o,value:s,...f,ref:p,onClick:ee(e.onClick,y=>{i||c==null||c(),m&&(g.current=y.isPropagationStopped(),g.current||y.stopPropagation())})}),m&&l.jsx(hPe,{control:d,bubbles:!g.current,name:n,value:s,checked:i,required:a,disabled:o,form:u,style:{transform:"translateX(-100%)"}})]})});q5.displayName=OP;var K5="RadioIndicator",G5=v.forwardRef((e,t)=>{const{__scopeRadio:r,forceMount:n,...i}=e,a=fPe(K5,r);return l.jsx(br,{present:n||a.checked,children:l.jsx(xe.span,{"data-state":Y5(a.checked),"data-disabled":a.disabled?"":void 0,...i,ref:t})})});G5.displayName=K5;var hPe=e=>{const{control:t,checked:r,bubbles:n=!0,...i}=e,a=v.useRef(null),o=Lf(r),s=Ff(t);return v.useEffect(()=>{const c=a.current,u=window.HTMLInputElement.prototype,d=Object.getOwnPropertyDescriptor(u,"checked").set;if(o!==r&&d){const h=new Event("click",{bubbles:n});d.call(c,r),c.dispatchEvent(h)}},[o,r,n]),l.jsx("input",{type:"radio","aria-hidden":!0,defaultChecked:r,...i,tabIndex:-1,ref:a,style:{...e.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function Y5(e){return e?"checked":"unchecked"}var pPe=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],EP="RadioGroup",[mPe,GPe]=cn(EP,[Lc,H5]),X5=Lc(),Q5=H5(),[gPe,vPe]=mPe(EP),Z5=v.forwardRef((e,t)=>{const{__scopeRadioGroup:r,name:n,defaultValue:i,value:a,required:o=!1,disabled:s=!1,orientation:c,dir:u,loop:f=!0,onValueChange:d,...h}=e,p=X5(r),g=Ds(u),[m,y]=Jn({prop:a,defaultProp:i,onChange:d});return l.jsx(gPe,{scope:r,name:n,required:o,disabled:s,value:m,onValueChange:y,children:l.jsx(CS,{asChild:!0,...p,orientation:c,dir:g,loop:f,children:l.jsx(xe.div,{role:"radiogroup","aria-required":o,"aria-orientation":c,"data-disabled":s?"":void 0,dir:g,...h,ref:t})})})});Z5.displayName=EP;var J5="RadioGroupItem",eB=v.forwardRef((e,t)=>
712{const{__scopeRadioGroup:r,disabled:n,...i}=e,a=vPe(J5,r),o=a.disabled||n,s=X5(r),c=Q5(r),u=v.useRef(null),f=Ae(t,u),d=a.value===i.value,h=v.useRef(!1);return v.useEffect(()=>{const p=m=>{pPe.includes(m.key)&&(h.current=!0)},g=()=>h.current=!1;return document.addEventListener("keydown",p),document.addEventListener("keyup",g),()=>{document.removeEventListener("keydown",p),document.removeEventListener("keyup",g)}},[]),l.jsx(AS,{asChild:!0,...s,focusable:!o,active:d,children:l.jsx(q5,{disabled:o,required:a.required,checked:d,...c,...i,name:a.name,ref:f,onCheck:()=>a.onValueChange(i.value),onKeyDown:ee(p=>{p.key==="Enter"&&p.preventDefault()}),onFocus:ee(i.onFocus,()=>{var p;h.current&&((p=u.current)==null||p.click())})})})});eB.displayName=J5;var yPe="RadioGroupIndicator",tB=v.forwardRef((e,t)=>{const{__scopeRadioGroup:r,...n}=e,i=Q5(r);return l.jsx(G5,{...i,...n,ref:t})});tB.displayName=yPe;var rB=Z5,nB=eB,xPe=tB;const iB=v.forwardRef(({className:e,...t},r)=>l.jsx(rB,{className:G("grid gap-2",e),...t,ref:r}));iB.displayName=rB.displayName;const aB=v.forwardRef(({className:e,...t},r)=>l.jsx(nB,{ref:r,className:G("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:l.jsx(xPe,{className:"flex items-center justify-center",children:l.jsx(UM,{className:"h-2.5 w-2.5 fill-current text-current"})})}));aB.displayName=nB.displayName;const bPe=({title:e,level:t="intermediate",content:r,questions:n,topic:i="language learning",onComplete:a})=>{const[o,s]=v.useState({}),[c,u]=v.useState(!1),[f,d]=v.useState(!0),[h,p]=v.useState(!1),[g,m]=v.useState(e||""),[y,x]=v.useState(r||""),[b,w]=v.useState(n||[]),{toast:S}=Ct();v.useEffect(()=>{(async()=>{if(!r||!n){p(!0);try{const E=await _n.generateReadingPassage(i,t);m(E.title),x(E.content),w(E.questions),S({title:"New Reading Exercise",description:"A new reading passage has been generated for you."})}catch(E){console.error("Error loading reading content:",E),S({title:"Error Loading Content",description:"Failed to load the reading exercise. Please try again.",variant:"destructive"})}finally{p(!1)}}})()},[r,n,i,t,S]);const j=async()=>{s({}),u(!1),d(!0),p(!0);try{const C=await _n.generateReadingPassage(i,t);m(C.title),x(C.content),w(C.questions),S({title:"New Reading Exercise",description:"A new reading passage has been generated for you."})}catch(C){console.error("Error loading reading content:",C),S({title:"Error Loading Content",description:"Failed to load the reading exercise. Please try again.",variant:"destructive"})}finally{p(!1)}},P=(C,E)=>{c||s(I=>({...I,[C]:E}))},N=()=>{if(Object.keys(o).length<b.length){S({title:"Incomplete",description:"Please answer all questions before submitting.",variant:"destructive"});return}u(!0);const C=b.filter(I=>o[I.id]===I.correctOption).length,E=Math.round(C/b.length*100);a&&a(E),S({title:"Quiz Completed",description:`Your score: ${E}% (${C}/${b.length})`})},_=Object.keys(o).length,O=b.length>0?_/b.length*100:0,k={beginner:"text-green-500",intermediate:"text-blue-500",advanced:"text-purple-500"}[t];return h?l.jsxs(ne,{className:"glass-panel",children:[l.jsxs(ce,{children:[l.jsx(he,{className:"font-display text-xl",children:"Loading Reading Exercise"}),l.jsx(ke,{children:"Preparing your reading comprehension exercise..."})]}),l.jsxs(ie,{className:"py-12 flex flex-col items-center justify-center space-y-4",children:[l.jsx(nn,{className:"h-12 w-12 animate-spin text-primary"}),l.jsx("p",{className:"text-muted-foreground",children:"Generating a new passage for you to read..."})]})]}):l.jsxs(ne,{className:"glass-panel",children:[l.jsx(ce,{children:l.jsxs("div",{className:"flex justify-between items-start",children:[l.jsxs("div",{children:[l.jsx(he,{className:"font-display text-xl",children:g}),l.jsx(ke,{children:"Reading Comprehension Exercise"})]}),l.jsx(Kt,{variant:"outline",className:G(k),children:t.charAt(0).toUpperCase()+t.slice(1)})]})}),l.jsxs(ie,{className:"pb-0",children:[l.jsxs("div",{className:"flex justify-between mb-4",children:[l.jsxs(Y,{variant:f?"default":"outline",size:"sm",onClick:()=>d(!0),children:[l.jsx(Rs,{className:"h-4 w-4 mr-2"}),"Reading"]}),l.jsxs(Y,{variant:f?"outline":"default",size:"sm",onClick:()=>d(!1),children:[l.jsx(PW,{className:"h-4 w-4 mr-2"}),"Questions"]})]}),f?l.jsx(ri,{className:"h-[300px] rounded-md border p-4",children:l.jsx("div",{className:"prose prose-sm max-w-none",children:y.split(` 713`).map((C,E)=>l.jsx("p",{className:"mb-4",children:C},E))})}):l.jsx(ri,{className:"h-[300px] rounded-md border p-4",children:l.jsx("div",{className:"space-y-6",children:b.map((C,E)=>l.jsxs("div",{className:"space-y-3",children:[l.jsxs("h4",{className:"font-medium",children:["Question ",E+1,": ",C.text]}),l.jsx(iB,{value:o[C.id],onValueChange:I=>P(C.id,I),children:C.options.map(I=>l.jsxs("div",{className:"flex items-start space-x-2 p-2 rounded-md hover:bg-muted/40",children:[l.jsx(aB,{value:
713I.id,id:`${C.id}-${I.id}`,disabled:c,className:"mt-1"}),l.jsxs(Rt,{htmlFor:`${C.id}-${I.id}`,className:G("font-normal cursor-pointer",c&&I.id===C.correctOption&&"text-green-600 font-medium",c&&o[C.id]===I.id&&I.id!==C.correctOption&&"text-red-600 line-through"),children:[I.text,c&&I.id===C.correctOption&&l.jsx(wS,{className:"inline-block ml-2 h-4 w-4 text-green-600"})]})]},I.id))})]},C.id))})}),l.jsxs("div",{className:"mt-4 space-y-2",children:[l.jsxs("div",{className:"flex justify-between text-sm",children:[l.jsx("span",{children:"Progress"}),l.jsxs("span",{children:[_,"/",b.length," questions"]})]}),l.jsx(lr,{value:O,className:"h-2"})]})]}),l.jsx(jt,{className:"pt-6",children:c?l.jsx(Y,{variant:"outline",className:"w-full",onClick:j,children:"Try Another Passage"}):l.jsx(Y,{className:"w-full",onClick:N,disabled:_<b.length,children:"Submit Answers"})})]})},wPe=({readingPassage:e,readingQuestions:t,onReadingComplete:r})=>l.jsx("div",{className:"space-y-6",children:l.jsx(bPe,{title:"Understanding Language Learning",level:"intermediate",content:e,questions:t,onComplete:r})}),SPe=({words:e,gameType:t="matching",onComplete:r})=>{const[n,i]=v.useState([]),[a,o]=v.useState(!1),[s,c]=v.useState("intermediate"),[u,f]=v.useState(null),[d,h]=v.useState(null),[p,g]=v.useState([]),[m,y]=v.useState(0),[x,b]=v.useState(!1);v.useEffect(()=>{e&&e.length>0?i(e):w()},[e]);const w=async()=>{o(!0);try{const O=await _n.generateVocabularyWords(s,5);O&&O.words&&i(O.words)}catch(O){console.error("Error loading vocabulary words:",O)}finally{o(!1)}},S=O=>{p.includes(O)||(f(O),P(O,d))},j=O=>{p.includes(O)||(h(O),P(u,O))},P=(O,k)=>{O&&k&&(O===k&&(g([...p,O]),y(m+1),p.length+1===n.length&&(b(!0),r&&r(m+1))),setTimeout(()=>{f(null),h(null)},500))},N=()=>{f(null),h(null),g([]),y(0),b(!1),w()},_=[...n].sort(()=>Math.random()-.5);return l.jsxs(ne,{className:"w-full",children:[l.jsx(ce,{children:l.jsxs(he,{className:"flex justify-between items-center",children:[l.jsx("span",{children:"Vocabulary Game"}),l.jsx(Kt,{variant:"outline",children:s})]})}),l.jsx(ie,{children:a?l.jsx("div",{className:"flex justify-center my-6",children:l.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-primary"})}):x?l.jsxs("div",{className:"text-center my-6",children:[l.jsx("h3",{className:"text-xl font-semibold mb-2",children:"Game Complete!"}),l.jsxs("p",{className:"mb-4",children:["You scored ",m," out of ",n.length," points"]}),l.jsxs(Y,{onClick:N,className:"mx-auto",children:[l.jsx(BW,{className:"mr-2 h-4 w-4"})," Play Again"]})]}):l.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[l.jsxs("div",{className:"space-y-2",children:[l.jsx("h3",{className:"font-medium mb-2",children:"Words"}),n.map(O=>l.jsxs("div",{className:`p-3 rounded-md cursor-pointer transition-all ${p.includes(O.id)?"bg-green-100 dark:bg-green-900/20":u===O.id?"bg-blue-100 dark:bg-blue-900/20":"bg-muted hover:bg-muted/80"}`,onClick:()=>S(O.id),children:[O.word,p.includes(O.id)&&l.jsx(ra,{className:"inline ml-2 h-4 w-4 text-green-500"})]},`word-${O.id}`))]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx("h3",{className:"font-medium mb-2",children:"Definitions"}),_.map(O=>l.jsxs("div",{className:`p-3 rounded-md cursor-pointer transition-all ${p.includes(O.id)?"bg-green-100 dark:bg-green-900/20":d===O.id?"bg-blue-100 dark:bg-blue-900/20":"bg-muted hover:bg-muted/80"}`,onClick:()=>j(O.id),children:[O.definition,p.includes(O.id)&&l.jsx(ra,{className:"inline ml-2 h-4 w-4 text-green-500"})]},`def-${O.id}`))]})]})}),l.jsxs(jt,{className:"flex justify-between",children:[l.jsx(Y,{onClick:w,disabled:a,children:"Load New Words"}),l.jsxs("div",{className:"text-sm text-muted-foreground",children:["Matched: ",p.length,"/",n.length]})]})]})},jPe=({vocabularyWords:e,onVocabularyComplete:t})=>l.jsx("div",{className:"space-y-6",children:l.jsx(SPe,{words:e,gameType:"matching",onComplete:t})}),PPe=()=>{const e="1",{toast:t}=Ct(),{data:r}=co({queryKey:["user",e],queryFn:()=>ut.getUserById(e)}),n=f=>{t({title:"Writing Completed",description:`You completed a writing exercise with ${f.split(/\s+/).length} words.`})},i=f=>{t({title:"Reading Comprehension Complete",description:`You scored ${f}% on the reading exercise.`})},a=f=>{t({title:"Vocabulary Game Complete",description:`You scored ${f} points in the vocabulary game.`})},o=[{prompt:"Describe your ideal vacation destination. Include details about location, activities, and why you would enjoy it.",type:"essay",minWords:150},{prompt:"Write about a time when you had to overcome a challenge. What happened, and what did you learn from it?",type:"essay",minWords:200},{prompt:"Discuss the advantages and disadvantages of remote work compared to working in an office.",type:"essay",minWords:180}],s=`Language learning is a fascinating journey that transforms not just how we communicate, but how we think and perceive the world around us. When we learn a new language, we aren't simply memorizing vocabulary and grammar rules; we're adopting new cultural frameworks and perspectives. 714 715Research has shown that bilingual and multilingual individuals often demonstrate enhanced cognitive abilities. They typically exhibit better problem-solving skills, improved memory, and greater mental flexibility. This "cognitive reserve" even appears to delay the onset of dementia symptoms in older adults. 716
717Beyond the cognitive benefits, language learning opens doors to new cultures, literature, and human connections that would otherwise remain inaccessible. It allows us to engage with people from different backgrounds on a deeper level, fostering empathy and cross-cultural understanding. 718 719In today's interconnected global society, language skills are increasingly valuable in the job market. Employers often seek candidates who can communicate with international clients, partners, and colleagues. This skill can lead to better job opportunities and higher earning potential. 720 721The journey of language acquisition is not without challenges. It requires persistence, patience, and a willingness to make mistakes. Many learners experience plateaus or periods of frustration. However, these challenges are part of the process, and overcoming them leads to greater fluency and confidence. 722 723Modern technology has revolutionized how we learn languages. Mobile apps, online courses, and language exchange platforms make it easier than ever to practice consistently and connect with native speakers from anywhere in the world. 724 725Ultimately, language learning is more than an academic pursuitâit's a lifelong adventure that enriches our experiences and broadens our horizons in countless ways.`,c=[{id:"q1",text:"According to the passage, what do bilingual individuals often demonstrate?",options:[{id:"q1a",text:"Lower stress levels"},{id:"q1b",text:"Enhanced cognitive abilities"},{id:"q1c",text:"Improved physical health"},{id:"q1d",text:"Better musical talents"}],correctOption:"q1b"},{id:"q2",text:"What challenge of language learning does the passage mention?",options:[{id:"q2a",text:"High financial cost"},{id:"q2b",text:"Physical exhaustion"},{id:"q2c",text:"Need for special equipment"},{id:"q2d",text:"Periods of frustration"}],correctOption:"q2d"},{id:"q3",text:"How has modern technology affected language learning?",options:[{id:"q3a",text:"It has made it more expensive"},{id:"q3b",text:"It has made it easier to practice consistently"},{id:"q3c",text:"It has made languages obsolete"},{id:"q3d",text:"It has reduced the quality of learning"}],correctOption:"q3b"},{id:"q4",text:"What benefit of language learning related to aging is mentioned?",options:[{id:"q4a",text:"Improved vision"},{id:"q4b",text:"Faster reflexes"},{id:"q4c",text:"Delayed onset of dementia symptoms"},{id:"q4d",text:"Increased height"}],correctOption:"q4c"},{id:"q5",text:"According to the passage, what makes language learning valuable in today's job market?",options:[{id:"q5a",text:"The ability to write code"},{id:"q5b",text:"The ability to communicate with international contacts"},{id:"q5c",text:"Knowledge of ancient history"},{id:"q5d",text:"Skills in graphic design"}],correctOption:"q5b"}],u=[{id:"v1",word:"Eloquent",definition:"Fluent or persuasive in speaking or writing"},{id:"v2",word:"Diligent",definition:"Having or showing care and conscientiousness in one's work or duties"},{id:"v3",word:"Ambiguous",definition:"Open to more than one interpretation; not having one obvious meaning"},{id:"v4",word:"Pragmatic",definition:"Dealing with things sensibly and realistically"},{id:"v5",word:"Resilient",definition:"Able to withstand or recover quickly from difficult conditions"},{id:"v6",word:"Collaborate",definition:"Work jointly on an activity or project"},{id:"v7",word:"Innovative",definition:"Featuring new methods; advanced and original"},{id:"v8",word:"Meticulous",definition:"Showing great attention to detail; very careful and precise"},{id:"v9",word:"Versatile",definition:"Able to adapt or be adapted to many different functions or activities"},{id:"v10",word:"Tenacious",definition:"Tending to keep a firm hold of something; clinging or adhering closely"}];return l.jsxs("div",{className:"min-h-screen flex flex-col",children:[l.jsx(un,{user:{name:(r==null?void 0:r.name)||"User",email:"[email protected]",avatar:"https://i.pravatar.cc/300?img=47"}}),l.jsx(dn,{}),l.jsx("main",{className:"pt-24 pb-16 pl-72 pr-6",children:l.jsx("div",{className:"max-w-7xl mx-auto animate-fade-in",children:l.jsx("section",{children:l.jsxs(ki,{defaultValue:"writing",className:"w-full",children:[l.jsx(sPe,{defaultTab:"writing"}),l.jsx(ot,{value:"writing",children:l.jsx(cPe,{onWritingComplete:n,essayPrompts:o})}),l.jsx(ot,{value:"reading",children:l.jsx(wPe,{readingPassage:s,readingQuestions:c,onReadingComplete:i})}),l.jsx(ot,{value:"vocabulary",children:l.jsx(jPe,{vocabularyWords:u,onVocabularyComplete:a})})]})})})})]})},NPe=({word:e,syllables:t,phonetic:r})=>{const n=()=>{kt.speak(e)},i=a=>{kt.speak(a)};return l.jsxs(ne,{className:"h-full",children:[l.jsx(ce,{children:l.jsxs(he,{className:"flex justify-between items-center",children:[l.jsx("span",{children:"Word Breakdown"}),l.jsxs(Y,{variant:"outline",size:"sm",onClick:n,className:"flex items-center gap-2",children:[l.jsx(Cn,{className:"h-4 w-4"}),"Hear Pronunciation"]})]})}),l.jsxs(ie,{children:[l.jsxs("div",{className:"mb-6",children:[l.jsx("h3",{className:"text-lg font-semibold mb-2",children:e}),l.jsx("p",{className:"text-muted-foreground",children:r})]}),l.jsxs("div",{children:[l.jsx("h4",{className:"text-sm uppercase text-muted-foreground mb-3",children:"Syllable Breakdown"}),l.jsx("div",{className:"flex flex-wrap gap-2",children:t.map((a,o)=>l.jsxs(Y,{variant:"outline",size:"sm",onClick:()=>i(a),className:"flex items-center gap-1",children:[a,l.jsx(Cn,{className:"h-3 w-3 ml-1"})]},o))})]})]})]})},_Pe=e=>{const[t,r]=v.useState(!1),[n,i]=v.useState(!1),a=v.useRef(null),o=v.useRef([]),{toast:s}=Ct();return{isRecording:t,isAnalyzing:n,startRecording:async()=>{try{const f=await navigator.mediaDevices.getUserMedia({audio:!0}),d=new MediaRecorder(f);a.current=d,o.current=[],d.ondataavailable=h=>{h.data.size>0&&o.current.push(h.data)},d.onstop=async()=>{const h=new Blob(o.current,{type:"audio/wav"});i(!0),await e(h),i(!1)},d.start(),r(!0),kt.playAttentionSound(),s({title:"Recording Started",description:"Please speak clearly."})}catch(f){console.error("Error starting recording:",f),s({title:"Microphone Access Error",description:"Please allow microphone access to use this feature.",variant:"destructive"})}},stopRecording:()=>{a.current&&a.current.state!=="inactive"&&(a.current.stop(),r(!1),kt.playSuccessSound(),a.current.stream&&a.current.stream.getTracks().forEac
725h(f=>f.stop()))}}},OPe=({word:e,onFeedback:t})=>{const[r,n]=v.useState(null),{toast:i}=Ct(),a=async h=>{try{const p=d(e),m={...await _n.analyzePronunciation(p,e),commonErrors:[{description:"Common pronunciation error",correction:"Correct pronunciation guide"}]};n(m),t(m.feedback,m.score)}catch(p){console.error("Error analyzing audio:",p),i({title:"Analysis Error",description:"Could not analyze your pronunciation. Please try again.",variant:"destructive"});const g=f(e,e);n(g),t(g.feedback,g.score)}},{isRecording:o,isAnalyzing:s,startRecording:c,stopRecording:u}=_Pe(a),f=(h,p)=>{const g=h.toLowerCase()===p.toLowerCase(),m=g?90:60+Math.floor(Math.random()*20),y=h.length>3?[h.substring(0,2),h.substring(2,h.length-2),h.substring(h.length-2)]:[h];return{score:m,feedback:g?`Good job pronouncing "${h}"!`:`You pronounced "${p}" instead of "${h}". Let's keep practicing!`,correctSounds:g?y:[y[0]],incorrectSounds:g?[]:[y[y.length-1]],tips:["Speak slowly and clearly","Practice each syllable separately","Listen to native speakers"],commonErrors:[{description:"Stress on the wrong syllable",correction:`The correct stress in "${h}" is on the ${Math.floor(y.length/2)+1}${Math.floor(y.length/2)+1===1?"st":Math.floor(y.length/2)+1===2?"nd":Math.floor(y.length/2)+1===3?"rd":"th"} syllable`}]}},d=h=>{const p=Math.min(.7,h.length*.1);if(Math.random()>p)return h;let g=h;const m=[{pattern:/a/g,replacement:"uh"},{pattern:/e/g,replacement:"i"},{pattern:/i/g,replacement:"ee"},{pattern:/th/g,replacement:"z"},{pattern:/v/g,replacement:"f"},{pattern:/r/g,replacement:"w"},{pattern:/tion/g,replacement:"shun"},{pattern:/able/g,replacement:"ubl"},{pattern:/^(\w+)$/,replacement:"$1e"},{pattern:/(\w)(\w)(\w+)/,replacement:"$1$3"}],y=1+Math.floor(Math.random()*2);for(let x=0;x<y;x++){const b=m[Math.floor(Math.random()*m.length)];g.match(b.pattern)&&(g=g.replace(b.pattern,b.replacement))}return g};return l.jsxs(ne,{children:[l.jsx(ce,{children:l.jsx(he,{children:"Practice Pronunciation"})}),l.jsx(ie,{children:l.jsxs("div",{className:"space-y-4",children:[l.jsxs("p",{className:"text-muted-foreground",children:['Click the button below to record yourself saying "',l.jsx("span",{className:"font-medium",children:e}),'"']}),o&&l.jsxs("div",{className:"py-3",children:[l.jsx("div",{className:"mb-2 text-sm font-medium",children:"Recording in progress..."}),l.jsx(lr,{value:100,className:"h-2 animate-pulse"})]}),l.jsx(Y,{variant:o?"destructive":"default",className:"w-full gap-2",onClick:o?u:c,disabled:s,children:s?l.jsxs(l.Fragment,{children:[l.jsx(nn,{className:"h-4 w-4 animate-spin"}),"Analyzing your pronunciation..."]}):o?l.jsxs(l.Fragment,{children:[l.jsx(NW,{className:"h-4 w-4"}),"Stop Recording"]}):l.jsxs(l.Fragment,{children:[l.jsx(ni,{className:"h-4 w-4"}),"Record Your Pronunciation"]})}),r&&l.jsx(J3,{feedback:r,word:e})]})})]})},EPe=({meaning:e,grammar:t,opposite:r,rootWord:n,examples:i})=>{const a=(o,s)=>{const c=new RegExp(`(\\b${s}\\w*\\b)`,"gi"),u=o.split(c);return l.jsx(l.Fragment,{children:u.map((f,d)=>f.toLowerCase().includes(s.toLowerCase())?l.jsx("span",{className:"font-medium text-primary",children:f},d):f)})};return l.jsxs(ne,{className:"h-full",children:[l.jsx(ce,{children:l.jsxs(he,{className:"flex items-center gap-3",children:["Word Details",l.jsx(Kt,{variant:"outline",className:"ml-2 font-normal",children:t})]})}),l.jsxs(ie,{className:"space-y-4",children:[l.jsxs("div",{className:"p-3 bg-muted/50 rounded-md",children:[l.jsx("h4",{className:"text-sm uppercase text-muted-foreground mb-1",children:"Meaning"}),l.jsx("p",{children:e})]}),n&&l.jsxs("div",{className:"flex gap-4 items-center",children:[l.jsxs("div",{className:"min-w-24",children:[l.jsx("h4",{className:"text-sm uppercase text-muted-foreground mb-1",children:"Root Word"}),l.jsx(Kt,{variant:"secondary",className:"text-sm font-normal",children:n})]}),l.jsx("div",{className:"flex-1 border-l-2 border-muted pl-4",children:l.jsx("p",{className:"text-sm text-muted-foreground",children:"Understanding the root word can help with recognizing related words and their meanings."})})]}),r&&l.jsxs("div",{className:"flex gap-4 items-center",children:[l.jsxs("div",{className:"min-w-24",children:[l.jsx("h4",{className:"text-sm uppercase text-muted-foreground mb-1",children:"Opposite"}),l.jsx(Kt,{variant:"outline",className:"text-sm font-normal",children:r})]}),l.jsx("div",{className:"flex-1 border-l-2 border-muted pl-4",children:l.jsx("p",{className:"text-sm text-muted-foreground",children:"Learning opposites helps to better understand word meanings and expand vocabulary."})})]}),l.jsxs("div",{children:[l.jsx("h4",{className:"text-sm uppercase text-muted-foreground mb-2",children:"Examples"}),l.jsx("ul",{className:"list-none space-y-2",children:i.map((o,s)=>l.jsx("li",{className:"p-2 border-l-4 border-primary/30 pl-3 bg-background rounded",children:a(o,n||"")},s))})]})]})]})},kPe={name:"Sarah Johnson",email:"[email protected]",avatar:"https://i.pravatar.cc/300?img=47"},CPe=()=>{const[e,t]=v.useState(""),[r,n]=v.useState(!1),[i,a]=v.useState(null),[o,s]=v.useState(null),{toast:c}=Ct(),u=async d=>{var h,p,g,m,y,x,b,w,S;if(d.preventDefault(),!!e.trim()){n(!0),a(null),s(null);try{const P=(await vP.getWordDefinition(e.trim()))[0];if(!P)throw new Error("Word not found");const N={word:P.word,phonetic:P.phonetic||((h=P.phonetics[0])==null?void 0:h.text)||"",syllables:P.word.split("").filter(O=>/[aeiou]/i.test(O)),meaning:((g=(p=P.meanings[0])==null?void 0:p.definitions[0])==null?void 0:g.definition)||"",grammar:((m=P.meanings[0])==null?void 0:m.partOfSpeech)||"",examples:P.meanings.flatMap(O=>O.definitions.filter(k=>k.example).map(k=>k.example)).slice(0,4),opposite:(b=(x=(y=P.meanings[0])==null?void 0:y.definitions[0])==null?void 0:x.antonyms)==null?void 0:b[0],rootWord:((w=P.origin)==null?void 0:w.split(":")[0])||void 0};a(N);const _=(S=P.phonetics.find(O=>O.audio))==null?void 0:S.audio;_?new Audio(_.startsWith("//")?`https:${_}`:_).play().catch(console.error):kt.speak(P.word,{rate:.8,pitch:1,volume:1})}catch(j){console.error("Error fetching word data:",j),c({title:"Error",description:"Could not find information about this word. Please try again.",variant:"destructive"})}finally{n(!1)}}},f=(d,h)=>{s({text:d,score:h})};return l.jsxs("div",{className:"min-h-screen bg-background",children:[l.jsx(un,{user:kPe}),l.jsx(dn,{}),l.jsx("main",{className:"pt-24 pb-16 pl-72 pr-6",children:l.jsxs("div",{className:"max-w-5xl mx-auto animate-fade-in",children:[l.jsxs("div",{className:"flex items-center justify-between mb-6",children:[l.jsx("h1",{className:"text-3xl font-display font-semibold",children:"Word Pronunciation Practice"}),i&&l.jsxs(Y,{variant:"outline",size:"sm",className:"gap-2",onClick:()=>{i&&kt.speak(i.word,{rate:.8,pitch:1,volume:1})},children:[l.jsx(Cn,{className:"h-4 w-4"}),"Hear Pronunciation"]})]}),l.jsxs(ne,{className:"mb-6 overflow-hidden border-t-4 border-primary/70",children:[l.jsx(ce,{className:"pb-3 bg-muted/50",children:l.jsx(he,{children:"Find a Word to Practice"})}),l.jsx(ie,{className:"p-6",children:l.jsxs("form",{onSubmit:u,className:"flex gap-2",children:[l.jsx("div",{className:"flex-1",children:l.jsx(tr,{type:"text",placeholder:"Enter a word (e.g. contribution, excellent, opportunity)",value:e,onCh
725ange:d=>t(d.target.value),className:"w-full"})}),l.jsx(Y,{type:"submit",disabled:r,children:r?l.jsxs(l.Fragment,{children:[l.jsx(nn,{className:"mr-2 h-4 w-4 animate-spin"}),"Searching..."]}):l.jsxs(l.Fragment,{children:[l.jsx(PS,{className:"mr-2 h-4 w-4"}),"Search"]})})]})})]}),r&&l.jsx("div",{className:"flex justify-center py-12",children:l.jsxs("div",{className:"text-center",children:[l.jsx(nn,{className:"h-8 w-8 animate-spin mx-auto mb-4 text-primary"}),l.jsx("p",{className:"text-muted-foreground",children:"Looking up word details..."})]})}),!r&&!i&&!e&&l.jsx("div",{className:"text-center py-12 px-4",children:l.jsxs("div",{className:"max-w-md mx-auto",children:[l.jsx("h3",{className:"text-xl font-semibold mb-2",children:"Welcome to Word Pronunciation Practice"}),l.jsx("p",{className:"text-muted-foreground mb-4",children:"Search for any English word to see its details, hear its pronunciation, and practice saying it correctly."}),l.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 gap-2 mt-6",children:["contribution","fascinating","opportunity","enthusiastic","development","sophisticated"].map(d=>l.jsx(Y,{variant:"outline",size:"sm",className:"text-sm",onClick:()=>{t(d);const h={preventDefault:()=>{}};setTimeout(()=>u(h),100)},children:d},d))})]})}),i&&l.jsxs("div",{className:"space-y-6",children:[l.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[l.jsx(NPe,{word:i.word,syllables:i.syllables,phonetic:i.phonetic}),l.jsx(EPe,{meaning:i.meaning,grammar:i.grammar,opposite:i.opposite,rootWord:i.rootWord,examples:i.examples})]}),l.jsx(OPe,{word:i.word,onFeedback:f})]})]})})]})},APe=new n8({defaultOptions:{queries:{retry:1,refetchOnWindowFocus:!1}}});function TPe(){return v.useEffect(()=>{zV().catch(t=>{console.error("Failed to initialize database:",t)});const e=document.createElement("meta");e.name="viewport",e.content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no",document.head.appendChild(e)},[]),l.jsx(l8,{client:APe,children:l.jsx(zz,{defaultTheme:p0.DEFAULT_THEME,storageKey:"ui-theme",children:l.jsxs(Tz,{children:[l.jsxs(Nz,{children:[l.jsx(Zt,{path:"/",element:l.jsx(VV,{})}),l.jsx(Zt,{path:"/login",element:l.jsx(b9,{})}),l.jsx(Zt,{path:"/register",element:l.jsx(w9,{})}),l.jsx(Zt,{path:"/dashboard",element:l.jsx(ewe,{})}),l.jsx(Zt,{path:"/progress",element:l.jsx(pwe,{})}),l.jsx(Zt,{path:"/speaking-practice",element:l.jsx(D1e,{})}),l.jsx(Zt,{path:"/writing-practice",element:l.jsx(PPe,{})}),l.jsx(Zt,{path:"/listening-practice",element:l.jsx(L1e,{})}),l.jsx(Zt,{path:"/community",element:l.jsx(F1e,{})}),l.jsx(Zt,{path:"/vocabulary",element:l.jsx(z1e,{})}),l.jsx(Zt,{path:"/lessons",element:l.jsx(K1e,{})}),l.jsx(Zt,{path:"/achievements",element:l.jsx(G1e,{})}),l.jsx(Zt,{path:"/conversation",element:l.jsx(Y1e,{})}),l.jsx(Zt,{path:"/virtual-teacher",element:l.jsx(vSe,{})}),l.jsx(Zt,{path:"/word-pronunciation",element:l.jsx(CPe,{})}),l.jsx(Zt,{path:"/settings",element:l.jsx(aPe,{})}),l.jsx(Zt,{path:"*",element:l.jsx(oPe,{})})]}),l.jsx(oI,{})]})})})}U2(document.getElementById("root")).render(l.jsx(TPe,{}));
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.