PageSourceSearch

https://data-control.lovable.app/assets/index-DUX0ljTq.js

js data-control.lovable.app collected 2026-10-03 05:35:16 UTC 1,088,120 bytes, 368 lines download raw bytes

vendor: 6,236 bytes, lines 1-9
1var XS=e=>{throw TypeError(e)};var hg=(e,t,r)=>t.has(e)||XS("Cannot "+r);var R=(e,t,r)=>(hg(e,t,"read from private field"),r?r.call(e):t.get(e)),ce=(e,t,r)=>t.has(e)?XS("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),ee=(e,t,r,n)=>(hg(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),be=(e,t,r)=>(hg(e,t,"access private method"),r);var yf=(e,t,r,n)=>({set _(i){ee(e,t,i,r)},get _(){return R(e,t,n)}});function CB(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 o=Object.getOwnPropertyDescriptor(n,i);o&&Object.defineProperty(e,i,o.get?o:{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 o of i)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&n(a)}).observe(document,{childList:!0,subtree:!0});function r(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function n(i){if(i.ep)return;i.ep=!0;const o=r(i);fetch(i.href,o)}})();var bf=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ue(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var LC={exports:{}},Tm={},BC={exports:{}},_e={};/**
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 Ud=Symbol.for("react.element"),jB=Symbol.for("react.portal"),kB=Symbol.for("react.fragment"),NB=Symbol.for("react.strict_mode"),RB=Symbol.for("react.profiler"),$B=Symbol.for("react.provider"),MB=Symbol.for("react.context"),IB=Symbol.for("react.forward_ref"),DB=Symbol.for("react.suspense"),LB=Symbol.for("react.memo"),BB=Symbol.for("react.lazy"),QS=Symbol.iterator;function FB(e){return e===null||typeof e!="object"?null:(e=QS&&e[QS]||e["@@iterator"],typeof e=="function"?e:null)}var FC={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},UC=Object.assign,zC={};function oc(e,t,r){this.props=e,this.context=t,this.refs=zC,this.updater=r||FC}oc.prototype.isReactComponent={};oc.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")};oc.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function WC(){}WC.prototype=oc.prototype;function Xw(e,t,r){this.props=e,this.context=t,this.refs=zC,this.updater=r||FC}var Qw=Xw.prototype=new WC;Qw.constructor=Xw;UC(Qw,oc.prototype);Qw.isPureReactComponent=!0;var JS=Array.isArray,HC=Object.prototype.hasOwnProperty,Jw={current:null},qC={key:!0,ref:!0,__self:!0,__source:!0};function VC(e,t,r){var n,i={},o=null,a=null;if(t!=null)for(n in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(o=""+t.key),t)HC.call(t,n)&&!qC.hasOwnProperty(n)&&(i[n]=t[n]);var s=arguments.length-2;if(s===1)i.children=r;else if(1<s){for(var l=Array(s),c=0;c<s;c++)l[c]=arguments[c+2];i.children=l}if(e&&e.defaultProps)for(n in s=e.defaultProps,s)i[n]===void 0&&(i[n]=s[n]);return{$$typeof:Ud,type:e,key:o,ref:a,props:i,_owner:Jw.current}}function UB(e,t){return{$$typeof:Ud,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Zw(e){return typeof e=="object"&&e!==null&&e.$$typeof===Ud}function zB(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var ZS=/\/+/g;function pg(e,t){return typeof e=="object"&&e!==null&&e.key!=null?zB(""+e.key):t.toString(36)}function mh(e,t,r,n,i){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var a=!1;if(e===null)a=!0;else switch(o){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case Ud:case jB:a=!0}}if(a)return a=e,i=i(a),e=n===""?"."+pg(a,0):n,JS(i)?(r="",e!=null&&(r=e.replace(ZS,"$&/")+"/"),mh(i,t,r,"",function(c){return c})):i!=null&&(Zw(i)&&(i=UB(i,r+(!i.key||a&&a.key===i.key?"":(""+i.key).replace(ZS,"$&/")+"/")+e)),t.push(i)),1;if(a=0,n=n===""?".":n+":",JS(e))for(var s=0;s<e.length;s++){o=e[s];var l=n+pg(o,s);a+=mh(o,t,r,l,i)}else if(l=FB(e),typeof l=="function")for(e=l.call(e),s=0;!(o=e.next()).done;)o=o.value,l=n+pg(o,s++),a+=mh(o,t,r,l,i);else if(o==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return a}function wf(e,t,r){if(e==null)return e;var n=[],i=0;return mh(e,n,"","",function(o){return t.call(r,o,i++)}),n}function WB(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 rr={current:null},vh={transition:null},HB={ReactCurrentDispatcher:rr,ReactCurrentBatchConfig:vh,ReactCurrentOwner:Jw};function KC(){throw Error("act(...) is not supported in production builds of React.")}_e.Children={map:wf,forEach:function(e,t,r){wf(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return wf(e,function(){t++}),t},toArray:function(e){return wf(e,function(t){return t})||[]},only:function(e){if(!Zw(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};_e.Component=oc;_e.Fragment=kB;_e.Profiler=RB;_e.PureComponent=Xw;_e.StrictMode=NB;_e.Suspense=DB;
vendor: 5,057 bytes, lines 9-25
9_e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=HB;_e.act=KC;_e.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=UC({},e.props),i=e.key,o=e.ref,a=e._owner;if(t!=null){if(t.ref!==void 0&&(o=t.ref,a=Jw.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var s=e.type.defaultProps;for(l in t)HC.call(t,l)&&!qC.hasOwnProperty(l)&&(n[l]=t[l]===void 0&&s!==void 0?s[l]:t[l])}var l=arguments.length-2;if(l===1)n.children=r;else if(1<l){s=Array(l);for(var c=0;c<l;c++)s[c]=arguments[c+2];n.children=s}return{$$typeof:Ud,type:e.type,key:i,ref:o,props:n,_owner:a}};_e.createContext=function(e){return e={$$typeof:MB,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:$B,_context:e},e.Consumer=e};_e.createElement=VC;_e.createFactory=function(e){var t=VC.bind(null,e);return t.type=e,t};_e.createRef=function(){return{current:null}};_e.forwardRef=function(e){return{$$typeof:IB,render:e}};_e.isValidElement=Zw;_e.lazy=function(e){return{$$typeof:BB,_payload:{_status:-1,_result:e},_init:WB}};_e.memo=function(e,t){return{$$typeof:LB,type:e,compare:t===void 0?null:t}};_e.startTransition=function(e){var t=vh.transition;vh.transition={};try{e()}finally{vh.transition=t}};_e.unstable_act=KC;_e.useCallback=function(e,t){return rr.current.useCallback(e,t)};_e.useContext=function(e){return rr.current.useContext(e)};_e.useDebugValue=function(){};_e.useDeferredValue=function(e){return rr.current.useDeferredValue(e)};_e.useEffect=function(e,t){return rr.current.useEffect(e,t)};_e.useId=function(){return rr.current.useId()};_e.useImperativeHandle=function(e,t,r){return rr.current.useImperativeHandle(e,t,r)};_e.useInsertionEffect=function(e,t){return rr.current.useInsertionEffect(e,t)};_e.useLayoutEffect=function(e,t){return rr.current.useLayoutEffect(e,t)};_e.useMemo=function(e,t){return rr.current.useMemo(e,t)};_e.useReducer=function(e,t,r){return rr.current.useReducer(e,t,r)};_e.useRef=function(e){return rr.current.useRef(e)};_e.useState=function(e){return rr.current.useState(e)};_e.useSyncExternalStore=function(e,t,r){return rr.current.useSyncExternalStore(e,t,r)};_e.useTransition=function(){return rr.current.useTransition()};_e.version="18.3.1";BC.exports=_e;var x=BC.exports;const A=Ue(x),ex=CB({__proto__:null,default:A},[x]);/**
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 qB=x,VB=Symbol.for("react.element"),KB=Symbol.for("react.fragment"),GB=Object.prototype.hasOwnProperty,YB=qB.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,XB={key:!0,ref:!0,__self:!0,__source:!0};function GC(e,t,r){var n,i={},o=null,a=null;r!==void 0&&(o=""+r),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(a=t.ref);for(n in t)GB.call(t,n)&&!XB.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:VB,type:e,key:o,ref:a,props:i,_owner:YB.current}}Tm.Fragment=KB;Tm.jsx=GC;Tm.jsxs=GC;LC.exports=Tm;var p=LC.exports,YC={exports:{}},Nr={},XC={exports:{}},QC={};/**
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($,I){var U=$.length;$.push(I);e:for(;0<U;){var H=U-1>>>1,z=$[H];if(0<i(z,I))$[H]=I,$[U]=z,U=H;else break e}}function r($){return $.length===0?null:$[0]}function n($){if($.length===0)return null;var I=$[0],U=$.pop();if(U!==I){$[0]=U;e:for(var H=0,z=$.length,K=z>>>1;H<K;){var te=2*(H+1)-1,fe=$[te],Ee=te+1,Y=$[Ee];if(0>i(fe,U))Ee<z&&0>i(Y,fe)?($[H]=Y,$[Ee]=U,H=Ee):($[H]=fe,$[te]=U,H=te);else if(Ee<z&&0>i(Y,U))$[H]=Y,$[Ee]=U,H=Ee;else break e}}return I}function i($,I){var U=$.sortIndex-I.sortIndex;return U!==0?U:$.id-I.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var a=Date,s=a.now();e.unstable_now=function(){return a.now()-s}}var l=[],c=[],u=1,d=null,f=3,h=!1,v=!1,m=!1,y=typeof setTimeout=="function"?setTimeout:null,w=typeof clearTimeout=="function"?clearTimeout:null,b=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function g($){for(var I=r(c);I!==null;){if(I.callback===null)n(c);else if(I.startTime<=$)n(c),I.sortIndex=I.expirationTime,t(l,I);else break;I=r(c)}}function _($){if(m=!1,g($),!v)if(r(l)!==null)v=!0,D(S);else{var I=r(c);I!==null&&B(_,I.startTime-$)}}function S($,I){v=!1,m&&(m=!1,w(P),P=-1),h=!0;var U=f;try{for(g(I),d=r(l);d!==null&&(!(d.expirationTime>I)||$&&!C());){var H=d.callback;
vendor: 9,155 bytes, lines 25-34
25if(typeof H=="function"){d.callback=null,f=d.priorityLevel;var z=H(d.expirationTime<=I);I=e.unstable_now(),typeof z=="function"?d.callback=z:d===r(l)&&n(l),g(I)}else n(l);d=r(l)}if(d!==null)var K=!0;else{var te=r(c);te!==null&&B(_,te.startTime-I),K=!1}return K}finally{d=null,f=U,h=!1}}var E=!1,O=null,P=-1,T=5,j=-1;function C(){return!(e.unstable_now()-j<T)}function k(){if(O!==null){var $=e.unstable_now();j=$;var I=!0;try{I=O(!0,$)}finally{I?L():(E=!1,O=null)}}else E=!1}var L;if(typeof b=="function")L=function(){b(k)};else if(typeof MessageChannel<"u"){var M=new MessageChannel,N=M.port2;M.port1.onmessage=k,L=function(){N.postMessage(null)}}else L=function(){y(k,0)};function D($){O=$,E||(E=!0,L())}function B($,I){P=y(function(){$(e.unstable_now())},I)}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($){$.callback=null},e.unstable_continueExecution=function(){v||h||(v=!0,D(S))},e.unstable_forceFrameRate=function($){0>$||125<$?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):T=0<$?Math.floor(1e3/$):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return r(l)},e.unstable_next=function($){switch(f){case 1:case 2:case 3:var I=3;break;default:I=f}var U=f;f=I;try{return $()}finally{f=U}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function($,I){switch($){case 1:case 2:case 3:case 4:case 5:break;default:$=3}var U=f;f=$;try{return I()}finally{f=U}},e.unstable_scheduleCallback=function($,I,U){var H=e.unstable_now();switch(typeof U=="object"&&U!==null?(U=U.delay,U=typeof U=="number"&&0<U?H+U:H):U=H,$){case 1:var z=-1;break;case 2:z=250;break;case 5:z=1073741823;break;case 4:z=1e4;break;default:z=5e3}return z=U+z,$={id:u++,callback:I,priorityLevel:$,startTime:U,expirationTime:z,sortIndex:-1},U>H?($.sortIndex=U,t(c,$),r(l)===null&&$===r(c)&&(m?(w(P),P=-1):m=!0,B(_,U-H))):($.sortIndex=z,t(l,$),v||h||(v=!0,D(S))),$},e.unstable_shouldYield=C,e.unstable_wrapCallback=function($){var I=f;return function(){var U=f;f=I;try{return $.apply(this,arguments)}finally{f=U}}}})(QC);XC.exports=QC;var QB=XC.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 JB=x,jr=QB;function V(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 JC=new Set,Eu={};function os(e,t){Ol(e,t),Ol(e+"Capture",t)}function Ol(e,t){for(Eu[e]=t,e=0;e<t.length;e++)JC.add(t[e])}var Ai=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Iy=Object.prototype.hasOwnProperty,ZB=/^[: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]*$/,e_={},t_={};function eF(e){return Iy.call(t_,e)?!0:Iy.call(e_,e)?!1:ZB.test(e)?t_[e]=!0:(e_[e]=!0,!1)}function tF(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 rF(e,t,r,n){if(t===null||typeof t>"u"||tF(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 nr(e,t,r,n,i,o,a){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=o,this.removeEmptyString=a}var Bt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Bt[e]=new nr(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Bt[t]=new nr(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Bt[e]=new nr(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Bt[e]=new nr(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){Bt[e]=new nr(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Bt[e]=new nr(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Bt[e]=new nr(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Bt[e]=new nr(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Bt[e]=new nr(e,5,!1,e.toLowerCase(),null,!1,!1)});var tx=/[\-:]([a-z])/g;function rx(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(tx,rx);Bt[t]=new nr(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(tx,rx);Bt[t]=new nr(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(tx,rx);Bt[t]=new nr(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Bt[e]=new nr(e,1,!1,e.toLowerCase(),null,!1,!1)});Bt.xlinkHref=new nr("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Bt[e]=new nr(e,1,!1,e.toLowerCase(),null,!0,!0)});function nx(e,t,r,n){var i=Bt.hasOwnProperty(t)?Bt[t]:null;(i!==null?i.type!==0:n||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(rF(t,r,i,n)&&(r=null),n||i===null?eF(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 Fi=JB.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,xf=Symbol.for("react.element"),Is=Symbol.for("react.portal"),Ds=Symbol.for("react.fragment"),ix=Symbol.for("react.strict_mode"),Dy=Symbol.for("react.profiler"),ZC=Symbol.for("react.provider"),ej=Symbol.for("react.context"),ox=Symbol.for("react.forward_ref"),Ly=Symbol.for("react.suspense"),By=Symbol.for("react.suspense_list"),ax=Symbol.for("react.memo"),eo=Symbol.for("react.lazy"),tj=Symbol.for("react.offscreen"),r_=Symbol.iterator;function Ac(e){return e===null||typeof e!="object"?null:(e=r_&&e[r_]||e["@@iterator"],typeof e=="function"?e:null)}var ot=Object.assign,mg;function Qc(e){if(mg===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);mg=t&&t[1]||""}return`
34`+mg+e}var vg=!1;function gg(e,t){if(!e||vg)return"";vg=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(c){var n=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){n=c}e.call(t.prototype)}else{try{throw Error()}catch(c){n=c}e()}}
vendor: 6,580 bytes, lines 34-37
34catch(c){if(c&&n&&typeof c.stack=="string"){for(var i=c.stack.split(`
35`),o=n.stack.split(`
36`),a=i.length-1,s=o.length-1;1<=a&&0<=s&&i[a]!==o[s];)s--;for(;1<=a&&0<=s;a--,s--)if(i[a]!==o[s]){if(a!==1||s!==1)do if(a--,s--,0>s||i[a]!==o[s]){var l=`
37`+i[a].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=a&&0<=s);break}}}finally{vg=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?Qc(e):""}function nF(e){switch(e.tag){case 5:return Qc(e.type);case 16:return Qc("Lazy");case 13:return Qc("Suspense");case 19:return Qc("SuspenseList");case 0:case 2:case 15:return e=gg(e.type,!1),e;case 11:return e=gg(e.type.render,!1),e;case 1:return e=gg(e.type,!0),e;default:return""}}function Fy(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 Ds:return"Fragment";case Is:return"Portal";case Dy:return"Profiler";case ix:return"StrictMode";case Ly:return"Suspense";case By:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case ej:return(e.displayName||"Context")+".Consumer";case ZC:return(e._context.displayName||"Context")+".Provider";case ox:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ax:return t=e.displayName||null,t!==null?t:Fy(e.type)||"Memo";case eo:t=e._payload,e=e._init;try{return Fy(e(t))}catch{}}return null}function iF(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 Fy(t);case 8:return t===ix?"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 Do(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function rj(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function oF(e){var t=rj(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,o=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(a){n=""+a,o.call(this,a)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(a){n=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Sf(e){e._valueTracker||(e._valueTracker=oF(e))}function nj(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=rj(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function Mh(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 Uy(e,t){var r=t.checked;return ot({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function n_(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=Do(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 ij(e,t){t=t.checked,t!=null&&nx(e,"checked",t,!1)}function zy(e,t){ij(e,t);var r=Do(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")?Wy(e,t.type,r):t.hasOwnProperty("defaultValue")&&Wy(e,t.type,Do(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function i_(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 Wy(e,t,r){(t!=="number"||Mh(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var Jc=Array.isArray;function Js(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=""+Do(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 Hy(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(V(91));return ot({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function o_(e,t){var r=t.value;if(r==null){if(r=t.children,t=t.defaultValue,r!=null){if(t!=null)throw Error(V(92));if(Jc(r)){if(1<r.length)throw Error(V(93));r=r[0]}t=r}t==null&&(t=""),r=t}e._wrapperState={initialValue:Do(r)}}function oj(e,t){var r=Do(t.value),n=Do(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 a_(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function aj(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 qy(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?aj(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var _f,sj=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(_f=_f||document.createElement("div"),_f.innerHTML="<svg>"+t.valueOf().toString()+"</svg>
37",t=_f.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Ou(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var au={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},aF=["Webkit","ms","Moz","O"];Object.keys(au).forEach(function(e){aF.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),au[t]=au[e]})});function lj(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||au.hasOwnProperty(e)&&au[e]?(""+t).trim():t+"px"}function cj(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,i=lj(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,i):e[r]=i}}var sF=ot({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 Vy(e,t){if(t){if(sF[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(V(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(V(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(V(61))}if(t.style!=null&&typeof t.style!="object")throw Error(V(62))}}function Ky(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 Gy=null;function sx(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Yy=null,Zs=null,el=null;function s_(e){if(e=Hd(e)){if(typeof Yy!="function")throw Error(V(280));var t=e.stateNode;t&&(t=Nm(t),Yy(e.stateNode,e.type,t))}}function uj(e){Zs?el?el.push(e):el=[e]:Zs=e}function dj(){if(Zs){var e=Zs,t=el;if(el=Zs=null,s_(e),t)for(e=0;e<t.length;e++)s_(t[e])}}function fj(e,t){return e(t)}function hj(){}var yg=!1;function pj(e,t,r){if(yg)return e(t,r);yg=!0;try{return fj(e,t,r)}finally{yg=!1,(Zs!==null||el!==null)&&(hj(),dj())}}function Pu(e,t){var r=e.stateNode;if(r===null)return null;var n=Nm(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(V(231,t,typeof r));return r}var Xy=!1;if(Ai)try{var Cc={};Object.defineProperty(Cc,"passive",{get:function(){Xy=!0}}),window.addEventListener("test",Cc,Cc),window.removeEventListener("test",Cc,Cc)}catch{Xy=!1}function lF(e,t,r,n,i,o,a,s,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(r,c)}catch(u){this.onError(u)}}var su=!1,Ih=null,Dh=!1,Qy=null,cF={onError:function(e){su=!0,Ih=e}};function uF(e,t,r,n,i,o,a,s,l){su=!1,Ih=null,lF.apply(cF,arguments)}function dF(e,t,r,n,i,o,a,s,l){if(uF.apply(this,arguments),su){if(su){var c=Ih;su=!1,Ih=null}else throw Error(V(198));Dh||(Dh=!0,Qy=c)}}function as(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 mj(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 l_(e){if(as(e)!==e)throw Error(V(188))}function fF(e){var t=e.alternate;if(!t){if(t=as(e),t===null)throw Error(V(188));return t!==e?null:e}for(var r=e,n=t;;){var i=r.return;if(i===null)break;var o=i.alternate;if(o===null){if(n=i.return,n!==null){r=n;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===r)return l_(i),e;if(o===n)return l_(i),t;o=o.sibling}throw Error(V(188))}if(r.return!==n.return)r=i,n=o;else{for(var a=!1,s=i.child;s;){if(s===r){a=!0,r=i,n=o;break}if(s===n){a=!0,n=i,r=o;break}s=s.sibling}if(!a){for(s=o.child;s;){if(s===r){a=!0,r=o,n=i;break}if(s===n){a=!0,n=o,r=i;break}s=s.sibling}if(!a)throw Error(V(189))}}if(r.alternate!==n)throw Error(V(190))}if(r.tag!==3)throw Error(V(188));return r.stateNode.current===r?e:t}function vj(e){return e=fF(e),e!==null?gj(e):null}function gj(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=gj(e);if(t!==null)return t;e=e.sibling}return null}var yj=jr.unstable_scheduleCallback,c_=jr.unstable_cancelCallback,hF=jr.unstable_shouldYield,pF=jr.unstable_requestPaint,ht=jr.unstable_now,mF=jr.unstable_getCurrentPriorityLevel,lx=jr.unstable_ImmediatePriority,bj=jr.unstable_UserBlockingPriority,Lh=jr.unstable_NormalPriority,vF=jr.unstable_LowPriority,wj=jr.unstable_IdlePriority,Am=null,Kn=null;function gF(e){if(Kn&&typeof Kn.onCommitFiberRoot=="function")try{Kn.onCommitFiberRoot(Am,e,void 0,(e.current.flags&128)===128)}catch{}}var Tn=Math.clz32?Math.clz32:wF,yF=Math.log,bF=Math.LN2;function wF(e){return e>>>=0,e===0?32:31-(yF(e)/bF|0)|0}var Ef=64,Of=4194304;function Zc(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 Bh(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,i=e.suspendedLanes,o=e.pingedLanes,a=r&268435455;if(a!==0){var s=a&~i;
vendor: 5,223 bytes, line 37
37s!==0?n=Zc(s):(o&=a,o!==0&&(n=Zc(o)))}else a=r&~i,a!==0?n=Zc(a):o!==0&&(n=Zc(o));if(n===0)return 0;if(t!==0&&t!==n&&!(t&i)&&(i=n&-n,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if(n&4&&(n|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0<t;)r=31-Tn(t),i=1<<r,n|=e[r],t&=~i;return n}function xF(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 SF(e,t){for(var r=e.suspendedLanes,n=e.pingedLanes,i=e.expirationTimes,o=e.pendingLanes;0<o;){var a=31-Tn(o),s=1<<a,l=i[a];l===-1?(!(s&r)||s&n)&&(i[a]=xF(s,t)):l<=t&&(e.expiredLanes|=s),o&=~s}}function Jy(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function xj(){var e=Ef;return Ef<<=1,!(Ef&4194240)&&(Ef=64),e}function bg(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function zd(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Tn(t),e[t]=r}function _F(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-Tn(r),o=1<<i;t[i]=0,n[i]=-1,e[i]=-1,r&=~o}}function cx(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var n=31-Tn(r),i=1<<n;i&t|e[n]&t&&(e[n]|=t),r&=~i}}var Ie=0;function Sj(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var _j,ux,Ej,Oj,Pj,Zy=!1,Pf=[],Oo=null,Po=null,To=null,Tu=new Map,Au=new Map,no=[],EF="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 u_(e,t){switch(e){case"focusin":case"focusout":Oo=null;break;case"dragenter":case"dragleave":Po=null;break;case"mouseover":case"mouseout":To=null;break;case"pointerover":case"pointerout":Tu.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Au.delete(t.pointerId)}}function jc(e,t,r,n,i,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:r,eventSystemFlags:n,nativeEvent:o,targetContainers:[i]},t!==null&&(t=Hd(t),t!==null&&ux(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function OF(e,t,r,n,i){switch(t){case"focusin":return Oo=jc(Oo,e,t,r,n,i),!0;case"dragenter":return Po=jc(Po,e,t,r,n,i),!0;case"mouseover":return To=jc(To,e,t,r,n,i),!0;case"pointerover":var o=i.pointerId;return Tu.set(o,jc(Tu.get(o)||null,e,t,r,n,i)),!0;case"gotpointercapture":return o=i.pointerId,Au.set(o,jc(Au.get(o)||null,e,t,r,n,i)),!0}return!1}function Tj(e){var t=ga(e.target);if(t!==null){var r=as(t);if(r!==null){if(t=r.tag,t===13){if(t=mj(r),t!==null){e.blockedOn=t,Pj(e.priority,function(){Ej(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 gh(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=e0(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var n=new r.constructor(r.type,r);Gy=n,r.target.dispatchEvent(n),Gy=null}else return t=Hd(r),t!==null&&ux(t),e.blockedOn=r,!1;t.shift()}return!0}function d_(e,t,r){gh(e)&&r.delete(t)}function PF(){Zy=!1,Oo!==null&&gh(Oo)&&(Oo=null),Po!==null&&gh(Po)&&(Po=null),To!==null&&gh(To)&&(To=null),Tu.forEach(d_),Au.forEach(d_)}function kc(e,t){e.blockedOn===t&&(e.blockedOn=null,Zy||(Zy=!0,jr.unstable_scheduleCallback(jr.unstable_NormalPriority,PF)))}function Cu(e){function t(i){return kc(i,e)}if(0<Pf.length){kc(Pf[0],e);for(var r=1;r<Pf.length;r++){var n=Pf[r];n.blockedOn===e&&(n.blockedOn=null)}}for(Oo!==null&&kc(Oo,e),Po!==null&&kc(Po,e),To!==null&&kc(To,e),Tu.forEach(t),Au.forEach(t),r=0;r<no.length;r++)n=no[r],n.blockedOn===e&&(n.blockedOn=null);for(;0<no.length&&(r=no[0],r.blockedOn===null);)Tj(r),r.blockedOn===null&&no.shift()}var tl=Fi.ReactCurrentBatchConfig,Fh=!0;function TF(e,t,r,n){var i=Ie,o=tl.transition;tl.transition=null;try{Ie=1,dx(e,t,r,n)}finally{Ie=i,tl.transition=o}}function AF(e,t,r,n){var i=Ie,o=tl.transition;tl.transition=null;try{Ie=4,dx(e,t,r,n)}finally{Ie=i,tl.transition=o}}function dx(e,t,r,n){if(Fh){var i=e0(e,t,r,n);if(i===null)Cg(e,t,n,Uh,r),u_(e,n);else if(OF(i,e,t,r,n))n.stopPropagation();else if(u_(e,n),t&4&&-1<EF.indexOf(e)){for(;i!==null;){var o=Hd(i);if(o!==null&&_j(o),o=e0(e,t,r,n),o===null&&Cg(e,t,n,Uh,r),o===i)break;i=o}i!==null&&n.stopPropagation()}else Cg(e,t,n,null,r)}}var Uh=null;function e0(e,t,r,n){if(Uh=null,e=sx(n),e=ga(e),e!==null)if(t=as(e),t===null)e=null;else if(r=t.tag,r===13){if(e=mj(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 Uh=e,null}
vendor: 10,401 bytes, line 37
37function Aj(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(mF()){case lx:return 1;case bj:return 4;case Lh:case vF:return 16;case wj:return 536870912;default:return 16}default:return 16}}var bo=null,fx=null,yh=null;function Cj(){if(yh)return yh;var e,t=fx,r=t.length,n,i="value"in bo?bo.value:bo.textContent,o=i.length;for(e=0;e<r&&t[e]===i[e];e++);var a=r-e;for(n=1;n<=a&&t[r-n]===i[o-n];n++);return yh=i.slice(e,1<n?1-n:void 0)}function bh(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 Tf(){return!0}function f_(){return!1}function Rr(e){function t(r,n,i,o,a){this._reactName=r,this._targetInst=i,this.type=n,this.nativeEvent=o,this.target=a,this.currentTarget=null;for(var s in e)e.hasOwnProperty(s)&&(r=e[s],this[s]=r?r(o):o[s]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?Tf:f_,this.isPropagationStopped=f_,this}return ot(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=Tf)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=Tf)},persist:function(){},isPersistent:Tf}),t}var ac={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},hx=Rr(ac),Wd=ot({},ac,{view:0,detail:0}),CF=Rr(Wd),wg,xg,Nc,Cm=ot({},Wd,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:px,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!==Nc&&(Nc&&e.type==="mousemove"?(wg=e.screenX-Nc.screenX,xg=e.screenY-Nc.screenY):xg=wg=0,Nc=e),wg)},movementY:function(e){return"movementY"in e?e.movementY:xg}}),h_=Rr(Cm),jF=ot({},Cm,{dataTransfer:0}),kF=Rr(jF),NF=ot({},Wd,{relatedTarget:0}),Sg=Rr(NF),RF=ot({},ac,{animationName:0,elapsedTime:0,pseudoElement:0}),$F=Rr(RF),MF=ot({},ac,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),IF=Rr(MF),DF=ot({},ac,{data:0}),p_=Rr(DF),LF={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},BF={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"},FF={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function UF(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=FF[e])?!!t[e]:!1}function px(){return UF}var zF=ot({},Wd,{key:function(e){if(e.key){var t=LF[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=bh(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?BF[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:px,charCode:function(e){return e.type==="keypress"?bh(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?bh(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),WF=Rr(zF),HF=ot({},Cm,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),m_=Rr(HF),qF=ot({},Wd,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:px}),VF=Rr(qF),KF=ot({},ac,{propertyName:0,elapsedTime:0,pseudoElement:0}),GF=Rr(KF),YF=ot({},Cm,{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}),XF=Rr(YF),QF=[9,13,27,32],mx=Ai&&"CompositionEvent"in window,lu=null;Ai&&"documentMode"in document&&(lu=document.documentMode);var JF=Ai&&"TextEvent"in window&&!lu,jj=Ai&&(!mx||lu&&8<lu&&11>=lu),v_=" ",g_=!1;function kj(e,t){switch(e){case"keyup":return QF.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Nj(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ls=!1;function ZF(e,t){switch(e){case"compositionend":return Nj(t);case"keypress":return t.which!==32?null:(g_=!0,v_);case"textInput":return e=t.data,e===v_&&g_?null:e;default:return null}}function eU(e,t){if(Ls)return e==="compositionend"||!mx&&kj(e,t)?(e=Cj(),yh=fx=bo=null,Ls=!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 jj&&t.locale!=="ko"?null:t.data;default:return null}}var tU={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 y_(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!tU[e.type]:t==="textarea"}function Rj(e,t,r,n){uj(n),t=zh(t,"onChange"),0<t.length&&(r=new hx("onChange","change",null,r,n),e.push({event:r,listeners:t}))}var cu=null,ju=null;function rU(e){Hj(e,0)}function jm(e){var t=Us(e);if(nj(t))return e}function nU(e,t){if(e==="change")return t}var $j=!1;if(Ai){var _g;if(Ai){var Eg="oninput"in document;if(!Eg){var b_=document.createElement("div");b_.setAttribute("oninput","return;"),Eg=typeof b_.oninput=="function"}_g=Eg}else _g=!1;$j=_g&&(!document.documentMode||9<document.documentMode)}function w_(){cu&&(cu.detachEvent("onpropertychange",Mj),ju=cu=null)}function Mj(e){if(e.propertyName==="value"&&jm(ju)){var t=[];Rj(t,ju,e,sx(e)),pj(rU,t)}}function iU(e,t,r){e==="focusin"?(w_(),cu=t,ju=r,cu.attachEvent("onpropertychange",Mj)):e==="focusout"&&w_()}function oU(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return jm(ju)}function aU(e,t){if(e==="click")return jm(t)}function sU(e,t){if(e==="input"||e==="change")return jm(t)}function lU(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Cn=typeof Object.is=="function"?Object.is:lU;function ku(e,t){if(Cn(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(!Iy.call(t,i)||!Cn(e[i],t[i]))return!1}return!0}function x_(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function S_(e,t){var r=x_(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=x_(r)}}function Ij(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Ij(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Dj(){for(var e=window,t=Mh();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=Mh(e.document)}return t}function vx(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 cU(e){var t=Dj(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&Ij(r.ownerDocument.documentElement,r)){if(n!==null&&vx(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,o=Math.min(n.start,i);n=n.end===void 0?o:Math.min(n.end,i),!e.extend&&o>n&&(i=n,n=o,o=i),i=S_(r,o);var a=S_(r,n);i&&a&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>n?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.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 uU=Ai&&"documentMode"in document&&11>=document.documentMode,Bs=null,t0=null,uu=null,r0=!1;function __(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;r0||Bs==null||Bs!==Mh(n)||(n=Bs,"selectionStart"in n&&vx(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}),uu&&ku(uu,n)||(uu=n,n=zh(t0,"onSelect"),0<n.length&&(t=new hx("onSelect","select",null,t,r),e.push({event:t,listeners:n}),t.target=Bs)))}function Af(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var Fs={animationend:Af("Animation","AnimationEnd"),animationiteration:Af("Animation","AnimationIteration"),animationstart:Af("Animation","AnimationStart"),transitionend:Af("Transition","TransitionEnd")},Og={},Lj={};Ai&&(Lj=document.createElement("div").style,"AnimationEvent"in window||(delete Fs.animationend.animation,delete Fs.animationiteration.animation,delete Fs.animationstart.animation),"TransitionEvent"in window||delete Fs.transitionend.transition);function km(e){if(Og[e])return Og[e];if(!Fs[e])return e;var t=Fs[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in Lj)return Og[e]=t[r];return e}var Bj=km("animationend"),Fj=km("animationiteration"),Uj=km("animationstart"),zj=km("transitionend"),Wj=new Map,E_="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 Vo(e,t){Wj.set(e,t),os(t,[e])}for(var Pg=0;Pg<E_.length;Pg++){var Tg=E_[Pg],dU=Tg.toLowerCase(),fU=Tg[0].toUpperCase()+Tg.slice(1);Vo(dU,"on"+fU)}Vo(Bj,"onAnimationEnd");Vo(Fj,"onAnimationIteration");Vo(Uj,"onAnimationStart");Vo("dblclick","onDoubleClick");Vo("focusin","onFocus");Vo("focusout","onBlur");Vo(zj,"onTransitionEnd");Ol("onMouseEnter",["mouseout","mouseover"]);Ol("onMouseLeave",["mouseout","mouseover"]);Ol("onPointerEnter",["pointerout","pointerover"]);Ol("onPointerLeave",["pointerout","pointerover"]);os("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));os("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));os("onBeforeInput",["compositionend","keypress","textInput","paste"]);os("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));os("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));os("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var eu="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(" "),hU=new Set("cancel close invalid load scroll toggle".split(" ").concat(eu));function O_(e,t,r){var n=e.type||"unknown-event";e.currentTarget=r,dF(n,t,void 0,e),e.currentTarget=null}function Hj(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 o=void 0;if(t)for(var a=n.length-1;0<=a;a--){var s=n[a],l=s.instance,c=s.currentTarget;if(s=s.listener,l!==o&&i.isPropagationStopped())break e;O_(i,s,c),o=l}else for(a=0;a<n.length;a++){if(s=n[a],l=s.instance,c=s.currentTarget,s=s.listener,l!==o&&i.isPropagationStopped())break e;O_(i,s,c),o=l}}}if(Dh)throw e=Qy,Dh=!1,Qy=null,e}function Xe(e,t){var r=t[s0];r===void 0&&(r=t[s0]=new Set);var n=e+"__bubble";r.has(n)||(qj(t,e,2,!1),r.add(n))}function Ag(e,t,r){var n=0;t&&(n|=4),qj(r,e,n,t)}var Cf="_reactListening"+Math.random().toString(36).slice(2);function Nu(e){if(!e[Cf]){e[Cf]=!0,JC.forEach(function(r){r!=="selectionchange"&&(hU.has(r)||Ag(r,!1,e),Ag(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Cf]||(t[Cf]=!0,Ag("selectionchange",!1,t))}}function qj(e,t,r,n){switch(Aj(t)){case 1:var i=TF;break;case 4:i=AF;break;default:i=dx}r=i.bind(null,t,r,e),i=void 0,!Xy||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 Cg(e,t,r,n,i){var o=n;if(!(t&1)&&!(t&2)&&n!==null)e:for(;;){if(n===null)return;var a=n.tag;if(a===3||a===4){var s=n.stateNode.containerInfo;
vendor: 5,572 bytes, lines 37-38
37if(s===i||s.nodeType===8&&s.parentNode===i)break;if(a===4)for(a=n.return;a!==null;){var l=a.tag;if((l===3||l===4)&&(l=a.stateNode.containerInfo,l===i||l.nodeType===8&&l.parentNode===i))return;a=a.return}for(;s!==null;){if(a=ga(s),a===null)return;if(l=a.tag,l===5||l===6){n=o=a;continue e}s=s.parentNode}}n=n.return}pj(function(){var c=o,u=sx(r),d=[];e:{var f=Wj.get(e);if(f!==void 0){var h=hx,v=e;switch(e){case"keypress":if(bh(r)===0)break e;case"keydown":case"keyup":h=WF;break;case"focusin":v="focus",h=Sg;break;case"focusout":v="blur",h=Sg;break;case"beforeblur":case"afterblur":h=Sg;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":h=h_;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=kF;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=VF;break;case Bj:case Fj:case Uj:h=$F;break;case zj:h=GF;break;case"scroll":h=CF;break;case"wheel":h=XF;break;case"copy":case"cut":case"paste":h=IF;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=m_}var m=(t&4)!==0,y=!m&&e==="scroll",w=m?f!==null?f+"Capture":null:f;m=[];for(var b=c,g;b!==null;){g=b;var _=g.stateNode;if(g.tag===5&&_!==null&&(g=_,w!==null&&(_=Pu(b,w),_!=null&&m.push(Ru(b,_,g)))),y)break;b=b.return}0<m.length&&(f=new h(f,v,null,r,u),d.push({event:f,listeners:m}))}}if(!(t&7)){e:{if(f=e==="mouseover"||e==="pointerover",h=e==="mouseout"||e==="pointerout",f&&r!==Gy&&(v=r.relatedTarget||r.fromElement)&&(ga(v)||v[Ci]))break e;if((h||f)&&(f=u.window===u?u:(f=u.ownerDocument)?f.defaultView||f.parentWindow:window,h?(v=r.relatedTarget||r.toElement,h=c,v=v?ga(v):null,v!==null&&(y=as(v),v!==y||v.tag!==5&&v.tag!==6)&&(v=null)):(h=null,v=c),h!==v)){if(m=h_,_="onMouseLeave",w="onMouseEnter",b="mouse",(e==="pointerout"||e==="pointerover")&&(m=m_,_="onPointerLeave",w="onPointerEnter",b="pointer"),y=h==null?f:Us(h),g=v==null?f:Us(v),f=new m(_,b+"leave",h,r,u),f.target=y,f.relatedTarget=g,_=null,ga(u)===c&&(m=new m(w,b+"enter",v,r,u),m.target=g,m.relatedTarget=y,_=m),y=_,h&&v)t:{for(m=h,w=v,b=0,g=m;g;g=gs(g))b++;for(g=0,_=w;_;_=gs(_))g++;for(;0<b-g;)m=gs(m),b--;for(;0<g-b;)w=gs(w),g--;for(;b--;){if(m===w||w!==null&&m===w.alternate)break t;m=gs(m),w=gs(w)}m=null}else m=null;h!==null&&P_(d,f,h,m,!1),v!==null&&y!==null&&P_(d,y,v,m,!0)}}e:{if(f=c?Us(c):window,h=f.nodeName&&f.nodeName.toLowerCase(),h==="select"||h==="input"&&f.type==="file")var S=nU;else if(y_(f))if($j)S=sU;else{S=oU;var E=iU}else(h=f.nodeName)&&h.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(S=aU);if(S&&(S=S(e,c))){Rj(d,S,r,u);break e}E&&E(e,f,c),e==="focusout"&&(E=f._wrapperState)&&E.controlled&&f.type==="number"&&Wy(f,"number",f.value)}switch(E=c?Us(c):window,e){case"focusin":(y_(E)||E.contentEditable==="true")&&(Bs=E,t0=c,uu=null);break;case"focusout":uu=t0=Bs=null;break;case"mousedown":r0=!0;break;case"contextmenu":case"mouseup":case"dragend":r0=!1,__(d,r,u);break;case"selectionchange":if(uU)break;case"keydown":case"keyup":__(d,r,u)}var O;if(mx)e:{switch(e){case"compositionstart":var P="onCompositionStart";break e;case"compositionend":P="onCompositionEnd";break e;case"compositionupdate":P="onCompositionUpdate";break e}P=void 0}else Ls?kj(e,r)&&(P="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(P="onCompositionStart");P&&(jj&&r.locale!=="ko"&&(Ls||P!=="onCompositionStart"?P==="onCompositionEnd"&&Ls&&(O=Cj()):(bo=u,fx="value"in bo?bo.value:bo.textContent,Ls=!0)),E=zh(c,P),0<E.length&&(P=new p_(P,e,null,r,u),d.push({event:P,listeners:E}),O?P.data=O:(O=Nj(r),O!==null&&(P.data=O)))),(O=JF?ZF(e,r):eU(e,r))&&(c=zh(c,"onBeforeInput"),0<c.length&&(u=new p_("onBeforeInput","beforeinput",null,r,u),d.push({event:u,listeners:c}),u.data=O))}Hj(d,t)})}function Ru(e,t,r){return{instance:e,listener:t,currentTarget:r}}function zh(e,t){for(var r=t+"Capture",n=[];e!==null;){var i=e,o=i.stateNode;i.tag===5&&o!==null&&(i=o,o=Pu(e,r),o!=null&&n.unshift(Ru(e,o,i)),o=Pu(e,t),o!=null&&n.push(Ru(e,o,i))),e=e.return}return n}function gs(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function P_(e,t,r,n,i){for(var o=t._reactName,a=[];r!==null&&r!==n;){var s=r,l=s.alternate,c=s.stateNode;if(l!==null&&l===n)break;s.tag===5&&c!==null&&(s=c,i?(l=Pu(r,o),l!=null&&a.unshift(Ru(r,l,s))):i||(l=Pu(r,o),l!=null&&a.push(Ru(r,l,s)))),r=r.return}a.length!==0&&e.push({event:t,listeners:a})}var pU=/\r\n?/g,mU=/\u0000|\uFFFD/g;function T_(e){return(typeof e=="string"?e:""+e).replace(pU,`
38`).replace(mU,"")}function jf(e,t,r){if(t=T_(t),T_(e)!==t&&r)throw Error(V(425))}function Wh(){}var n0=null,i0=null;function o0(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 a0=typeof setTimeout=="function"?setTimeout:void 0,vU=typeof clearTimeout=="function"?clearTimeout:void 0,A_=typeof Promise=="function"?Promise:void 0,gU=typeof queueMicrotask=="function"?queueMicrotask:typeof A_<"u"?function(e){return A_.resolve(null).then(e).catch(yU)}:a0;function yU(e){setTimeout(function(){throw e})}function jg(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),Cu(t);return}n--}else r!=="$"&&r!=="$?"&&r!=="$!"||n++;r=i}
vendor: 4,658 bytes, line 38
38while(r);Cu(t)}function Ao(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 C_(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 sc=Math.random().toString(36).slice(2),Wn="__reactFiber$"+sc,$u="__reactProps$"+sc,Ci="__reactContainer$"+sc,s0="__reactEvents$"+sc,bU="__reactListeners$"+sc,wU="__reactHandles$"+sc;function ga(e){var t=e[Wn];if(t)return t;for(var r=e.parentNode;r;){if(t=r[Ci]||r[Wn]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=C_(e);e!==null;){if(r=e[Wn])return r;e=C_(e)}return t}e=r,r=e.parentNode}return null}function Hd(e){return e=e[Wn]||e[Ci],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Us(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(V(33))}function Nm(e){return e[$u]||null}var l0=[],zs=-1;function Ko(e){return{current:e}}function Ze(e){0>zs||(e.current=l0[zs],l0[zs]=null,zs--)}function Ge(e,t){zs++,l0[zs]=e.current,e.current=t}var Lo={},Gt=Ko(Lo),hr=Ko(!1),Ba=Lo;function Pl(e,t){var r=e.type.contextTypes;if(!r)return Lo;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in r)i[o]=t[o];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function pr(e){return e=e.childContextTypes,e!=null}function Hh(){Ze(hr),Ze(Gt)}function j_(e,t,r){if(Gt.current!==Lo)throw Error(V(168));Ge(Gt,t),Ge(hr,r)}function Vj(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(V(108,iF(e)||"Unknown",i));return ot({},r,n)}function qh(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Lo,Ba=Gt.current,Ge(Gt,e),Ge(hr,hr.current),!0}function k_(e,t,r){var n=e.stateNode;if(!n)throw Error(V(169));r?(e=Vj(e,t,Ba),n.__reactInternalMemoizedMergedChildContext=e,Ze(hr),Ze(Gt),Ge(Gt,e)):Ze(hr),Ge(hr,r)}var ui=null,Rm=!1,kg=!1;function Kj(e){ui===null?ui=[e]:ui.push(e)}function xU(e){Rm=!0,Kj(e)}function Go(){if(!kg&&ui!==null){kg=!0;var e=0,t=Ie;try{var r=ui;for(Ie=1;e<r.length;e++){var n=r[e];do n=n(!0);while(n!==null)}ui=null,Rm=!1}catch(i){throw ui!==null&&(ui=ui.slice(e+1)),yj(lx,Go),i}finally{Ie=t,kg=!1}}return null}var Ws=[],Hs=0,Vh=null,Kh=0,Ur=[],zr=0,Fa=null,hi=1,pi="";function ca(e,t){Ws[Hs++]=Kh,Ws[Hs++]=Vh,Vh=e,Kh=t}function Gj(e,t,r){Ur[zr++]=hi,Ur[zr++]=pi,Ur[zr++]=Fa,Fa=e;var n=hi;e=pi;var i=32-Tn(n)-1;n&=~(1<<i),r+=1;var o=32-Tn(t)+i;if(30<o){var a=i-i%5;o=(n&(1<<a)-1).toString(32),n>>=a,i-=a,hi=1<<32-Tn(t)+i|r<<i|n,pi=o+e}else hi=1<<o|r<<i|n,pi=e}function gx(e){e.return!==null&&(ca(e,1),Gj(e,1,0))}function yx(e){for(;e===Vh;)Vh=Ws[--Hs],Ws[Hs]=null,Kh=Ws[--Hs],Ws[Hs]=null;for(;e===Fa;)Fa=Ur[--zr],Ur[zr]=null,pi=Ur[--zr],Ur[zr]=null,hi=Ur[--zr],Ur[zr]=null}var Ar=null,Tr=null,tt=!1,_n=null;function Yj(e,t){var r=Wr(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 N_(e,t){switch(e.tag){case 5:var r=e.type;return t=t.nodeType!==1||r.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Ar=e,Tr=Ao(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Ar=e,Tr=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=Fa!==null?{id:hi,overflow:pi}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=Wr(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,Ar=e,Tr=null,!0):!1;default:return!1}}function c0(e){return(e.mode&1)!==0&&(e.flags&128)===0}function u0(e){if(tt){var t=Tr;if(t){var r=t;if(!N_(e,t)){if(c0(e))throw Error(V(418));t=Ao(r.nextSibling);var n=Ar;t&&N_(e,t)?Yj(n,r):(e.flags=e.flags&-4097|2,tt=!1,Ar=e)}}else{if(c0(e))throw Error(V(418));e.flags=e.flags&-4097|2,tt=!1,Ar=e}}}function R_(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Ar=e}function kf(e){if(e!==Ar)return!1;if(!tt)return R_(e),tt=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!o0(e.type,e.memoizedProps)),t&&(t=Tr)){if(c0(e))throw Xj(),Error(V(418));for(;t;)Yj(e,t),t=Ao(t.nextSibling)}if(R_(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(V(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"){if(t===0){Tr=Ao(e.nextSibling);break e}t--}
vendor: 11,483 bytes, line 38
38else r!=="$"&&r!=="$!"&&r!=="$?"||t++}e=e.nextSibling}Tr=null}}else Tr=Ar?Ao(e.stateNode.nextSibling):null;return!0}function Xj(){for(var e=Tr;e;)e=Ao(e.nextSibling)}function Tl(){Tr=Ar=null,tt=!1}function bx(e){_n===null?_n=[e]:_n.push(e)}var SU=Fi.ReactCurrentBatchConfig;function Rc(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(V(309));var n=r.stateNode}if(!n)throw Error(V(147,e));var i=n,o=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===o?t.ref:(t=function(a){var s=i.refs;a===null?delete s[o]:s[o]=a},t._stringRef=o,t)}if(typeof e!="string")throw Error(V(284));if(!r._owner)throw Error(V(290,e))}return e}function Nf(e,t){throw e=Object.prototype.toString.call(t),Error(V(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function $_(e){var t=e._init;return t(e._payload)}function Qj(e){function t(w,b){if(e){var g=w.deletions;g===null?(w.deletions=[b],w.flags|=16):g.push(b)}}function r(w,b){if(!e)return null;for(;b!==null;)t(w,b),b=b.sibling;return null}function n(w,b){for(w=new Map;b!==null;)b.key!==null?w.set(b.key,b):w.set(b.index,b),b=b.sibling;return w}function i(w,b){return w=No(w,b),w.index=0,w.sibling=null,w}function o(w,b,g){return w.index=g,e?(g=w.alternate,g!==null?(g=g.index,g<b?(w.flags|=2,b):g):(w.flags|=2,b)):(w.flags|=1048576,b)}function a(w){return e&&w.alternate===null&&(w.flags|=2),w}function s(w,b,g,_){return b===null||b.tag!==6?(b=Lg(g,w.mode,_),b.return=w,b):(b=i(b,g),b.return=w,b)}function l(w,b,g,_){var S=g.type;return S===Ds?u(w,b,g.props.children,_,g.key):b!==null&&(b.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===eo&&$_(S)===b.type)?(_=i(b,g.props),_.ref=Rc(w,b,g),_.return=w,_):(_=Ph(g.type,g.key,g.props,null,w.mode,_),_.ref=Rc(w,b,g),_.return=w,_)}function c(w,b,g,_){return b===null||b.tag!==4||b.stateNode.containerInfo!==g.containerInfo||b.stateNode.implementation!==g.implementation?(b=Bg(g,w.mode,_),b.return=w,b):(b=i(b,g.children||[]),b.return=w,b)}function u(w,b,g,_,S){return b===null||b.tag!==7?(b=Ma(g,w.mode,_,S),b.return=w,b):(b=i(b,g),b.return=w,b)}function d(w,b,g){if(typeof b=="string"&&b!==""||typeof b=="number")return b=Lg(""+b,w.mode,g),b.return=w,b;if(typeof b=="object"&&b!==null){switch(b.$$typeof){case xf:return g=Ph(b.type,b.key,b.props,null,w.mode,g),g.ref=Rc(w,null,b),g.return=w,g;case Is:return b=Bg(b,w.mode,g),b.return=w,b;case eo:var _=b._init;return d(w,_(b._payload),g)}if(Jc(b)||Ac(b))return b=Ma(b,w.mode,g,null),b.return=w,b;Nf(w,b)}return null}function f(w,b,g,_){var S=b!==null?b.key:null;if(typeof g=="string"&&g!==""||typeof g=="number")return S!==null?null:s(w,b,""+g,_);if(typeof g=="object"&&g!==null){switch(g.$$typeof){case xf:return g.key===S?l(w,b,g,_):null;case Is:return g.key===S?c(w,b,g,_):null;case eo:return S=g._init,f(w,b,S(g._payload),_)}if(Jc(g)||Ac(g))return S!==null?null:u(w,b,g,_,null);Nf(w,g)}return null}function h(w,b,g,_,S){if(typeof _=="string"&&_!==""||typeof _=="number")return w=w.get(g)||null,s(b,w,""+_,S);if(typeof _=="object"&&_!==null){switch(_.$$typeof){case xf:return w=w.get(_.key===null?g:_.key)||null,l(b,w,_,S);case Is:return w=w.get(_.key===null?g:_.key)||null,c(b,w,_,S);case eo:var E=_._init;return h(w,b,g,E(_._payload),S)}if(Jc(_)||Ac(_))return w=w.get(g)||null,u(b,w,_,S,null);Nf(b,_)}return null}function v(w,b,g,_){for(var S=null,E=null,O=b,P=b=0,T=null;O!==null&&P<g.length;P++){O.index>P?(T=O,O=null):T=O.sibling;var j=f(w,O,g[P],_);if(j===null){O===null&&(O=T);break}e&&O&&j.alternate===null&&t(w,O),b=o(j,b,P),E===null?S=j:E.sibling=j,E=j,O=T}if(P===g.length)return r(w,O),tt&&ca(w,P),S;if(O===null){for(;P<g.length;P++)O=d(w,g[P],_),O!==null&&(b=o(O,b,P),E===null?S=O:E.sibling=O,E=O);return tt&&ca(w,P),S}for(O=n(w,O);P<g.length;P++)T=h(O,w,P,g[P],_),T!==null&&(e&&T.alternate!==null&&O.delete(T.key===null?P:T.key),b=o(T,b,P),E===null?S=T:E.sibling=T,E=T);return e&&O.forEach(function(C){return t(w,C)}),tt&&ca(w,P),S}function m(w,b,g,_){var S=Ac(g);if(typeof S!="function")throw Error(V(150));if(g=S.call(g),g==null)throw Error(V(151));for(var E=S=null,O=b,P=b=0,T=null,j=g.next();O!==null&&!j.done;P++,j=g.next()){O.index>P?(T=O,O=null):T=O.sibling;var C=f(w,O,j.value,_);if(C===null){O===null&&(O=T);break}e&&O&&C.alternate===null&&t(w,O),b=o(C,b,P),E===null?S=C:E.sibling=C,E=C,O=T}if(j.done)return r(w,O),tt&&ca(w,P),S;if(O===null){for(;!j.done;P++,j=g.next())j=d(w,j.value,_),j!==null&&(b=o(j,b,P),E===null?S=j:E.sibling=j,E=j);return tt&&ca(w,P),S}for(O=n(w,O);!j.done;P++,j=g.next())j=h(O,w,P,j.value,_),j!==null&&(e&&j.alternate!==null&&O.delete(j.key===null?P:j.key),b=o(j,b,P),E===null?S=j:E.sibling=j,E=j);return e&&O.forEach(function(k){return t(w,k)}),tt&&ca(w,P),S}function y(w,b,g,_){if(typeof g=="object"&&g!==null&&g.type===Ds&&g.key===null&&(g=g.props.children),typeof g=="object"&&g!==null){switch(g.$$typeof){case xf:e:{for(var S=g.key,E=b;E!==null;){if(E.key===S){if(S=g.type,S===Ds){if(E.tag===7){r(w,E.sibling),b=i(E,g.props.children),b.return=w,w=b;break e}}else if(E.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===eo&&$_(S)===E.type){r(w,E.sibling),b=i(E,g.props),b.ref=Rc(w,E,g),b.return=w,w=b;break e}r(w,E);break}else t(w,E);E=E.sibling}g.type===Ds?(b=Ma(g.props.children,w.mode,_,g.key),b.return=w,w=b):(_=Ph(g.type,g.key,g.props,null,w.mode,_),_.ref=Rc(w,b,g),_.return=w,w=_)}return a(w);case Is:e:{for(E=g.key;b!==null;){if(b.key===E)if(b.tag===4&&b.stateNode.containerInfo===g.containerInfo&&b.stateNode.implementation===g.implementation){r(w,b.sibling),b=i(b,g.children||[]),b.return=w,w=b;break e}else{r(w,b);break}else t(w,b);b=b.sibling}b=Bg(g,w.mode,_),b.return=w,w=b}return a(w);case eo:return E=g._init,y(w,b,E(g._payload),_)}if(Jc(g))return v(w,b,g,_);if(Ac(g))return m(w,b,g,_);Nf(w,g)}return typeof g=="string"&&g!==""||typeof g=="number"?(g=""+g,b!==null&&b.tag===6?(r(w,b.sibling),b=i(b,g),b.return=w,w=b):(r(w,b),b=Lg(g,w.mode,_),b.return=w,w=b),a(w)):r(w,b)}return y}var Al=Qj(!0),Jj=Qj(!1),Gh=Ko(null),Yh=null,qs=null,wx=null;function xx(){wx=qs=Yh=null}function Sx(e){var t=Gh.current;Ze(Gh),e._currentValue=t}function d0(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 rl(e,t){Yh=e,wx=qs=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(dr=!0),e.firstContext=null)}function Jr(e){var t=e._currentValue;if(wx!==e)if(e={context:e,memoizedValue:t,next:null},qs===null){if(Yh===null)throw Error(V(308));qs=e,Yh.dependencies={lanes:0,firstContext:e}}else qs=qs.next=e;return t}var ya=null;function _x(e){ya===null?ya=[e]:ya.push(e)}function Zj(e,t,r,n){var i=t.interleaved;return i===null?(r.next=r,_x(t)):(r.next=i.next,i.next=r),t.interleaved=r,ji(e,n)}function ji(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 to=!1;function Ex(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function ek(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 wi(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Co(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,ji(e,r)}return i=n.interleaved,i===null?(t.next=t,_x(n)):(t.next=i.next,i.next=t),n.interleaved=t,ji(e,r)}function wh(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,cx(e,r)}}function M_(e,t){var r=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var i=null,o=null;if(r=r.firstBaseUpdate,r!==null){do{var a={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};o===null?i=o=a:o=o.next=a,r=r.next}while(r!==null);o===null?i=o=t:o=o.next=t}else i=o=t;r={baseState:n.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:n.shared,effects:n.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function Xh(e,t,r,n){var i=e.updateQueue;to=!1;var o=i.firstBaseUpdate,a=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var l=s,c=l.next;l.next=null,a===null?o=c:a.next=c,a=l;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==a&&(s===null?u.firstBaseUpdate=c:s.next=c,u.lastBaseUpdate=l))}if(o!==null){var d=i.baseState;a=0,u=c=l=null,s=o;do{var f=s.lane,h=s.eventTime;if((n&f)===f){u!==null&&(u=u.next={eventTime:h,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var v=e,m=s;switch(f=t,h=r,m.tag){case 1:if(v=m.payload,typeof v=="function"){d=v.call(h,d,f);break e}d=v;break e;case 3:v.flags=v.flags&-65537|128;case 0:if(v=m.payload,f=typeof v=="function"?v.call(h,d,f):v,f==null)break e;d=ot({},d,f);break e;case 2:to=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,f=i.effects,f===null?i.effects=[s]:f.push(s))}else h={eventTime:h,lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(c=u=h,l=d):u=u.next=h,a|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;f=s,s=f.next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}while(!0);if(u===null&&(l=d),i.baseState=l,i.firstBaseUpdate=c,i.lastBaseUpdate=u,t=i.shared.interleaved,t!==null){i=t;do a|=i.lane,i=i.next;while(i!==t)}else o===null&&(i.shared.lanes=0);za|=a,e.lanes=a,e.memoizedState=d}}function I_(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(V(191,i));i.call(n)}}}var qd={},Gn=Ko(qd),Mu=Ko(qd),Iu=Ko(qd);function ba(e){if(e===qd)throw Error(V(174));return e}function Ox(e,t){switch(Ge(Iu,t),Ge(Mu,e),Ge(Gn,qd),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:qy(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=qy(t,e)}Ze(Gn),Ge(Gn,t)}function Cl(){Ze(Gn),Ze(Mu),Ze(Iu)}function tk(e){ba(Iu.current);var t=ba(Gn.current),r=qy(t,e.type);t!==r&&(Ge(Mu,e),Ge(Gn,r))}function Px(e){Mu.current===e&&(Ze(Gn),Ze(Mu))}var nt=Ko(0);function Qh(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 Ng=[];function Tx(){for(var e=0;e<Ng.length;e++)Ng[e]._workInProgressVersionPrimary=null;Ng.length=0}var xh=Fi.ReactCurrentDispatcher,Rg=Fi.ReactCurrentBatchConfig,Ua=0,it=null,xt=null,Ct=null,Jh=!1,du=!1,Du=0,_U=0;function Ft(){throw Error(V(321))}function Ax(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!Cn(e[r],t[r]))return!1;return!0}function Cx(e,t,r,n,i,o){if(Ua=o,it=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,xh.current=e===null||e.memoizedState===null?TU:AU,e=r(n,i),du){o=0;
vendor: 5,553 bytes, line 38
38do{if(du=!1,Du=0,25<=o)throw Error(V(301));o+=1,Ct=xt=null,t.updateQueue=null,xh.current=CU,e=r(n,i)}while(du)}if(xh.current=Zh,t=xt!==null&&xt.next!==null,Ua=0,Ct=xt=it=null,Jh=!1,t)throw Error(V(300));return e}function jx(){var e=Du!==0;return Du=0,e}function Dn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ct===null?it.memoizedState=Ct=e:Ct=Ct.next=e,Ct}function Zr(){if(xt===null){var e=it.alternate;e=e!==null?e.memoizedState:null}else e=xt.next;var t=Ct===null?it.memoizedState:Ct.next;if(t!==null)Ct=t,xt=e;else{if(e===null)throw Error(V(310));xt=e,e={memoizedState:xt.memoizedState,baseState:xt.baseState,baseQueue:xt.baseQueue,queue:xt.queue,next:null},Ct===null?it.memoizedState=Ct=e:Ct=Ct.next=e}return Ct}function Lu(e,t){return typeof t=="function"?t(e):t}function $g(e){var t=Zr(),r=t.queue;if(r===null)throw Error(V(311));r.lastRenderedReducer=e;var n=xt,i=n.baseQueue,o=r.pending;if(o!==null){if(i!==null){var a=i.next;i.next=o.next,o.next=a}n.baseQueue=i=o,r.pending=null}if(i!==null){o=i.next,n=n.baseState;var s=a=null,l=null,c=o;do{var u=c.lane;if((Ua&u)===u)l!==null&&(l=l.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),n=c.hasEagerState?c.eagerState:e(n,c.action);else{var d={lane:u,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};l===null?(s=l=d,a=n):l=l.next=d,it.lanes|=u,za|=u}c=c.next}while(c!==null&&c!==o);l===null?a=n:l.next=s,Cn(n,t.memoizedState)||(dr=!0),t.memoizedState=n,t.baseState=a,t.baseQueue=l,r.lastRenderedState=n}if(e=r.interleaved,e!==null){i=e;do o=i.lane,it.lanes|=o,za|=o,i=i.next;while(i!==e)}else i===null&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function Mg(e){var t=Zr(),r=t.queue;if(r===null)throw Error(V(311));r.lastRenderedReducer=e;var n=r.dispatch,i=r.pending,o=t.memoizedState;if(i!==null){r.pending=null;var a=i=i.next;do o=e(o,a.action),a=a.next;while(a!==i);Cn(o,t.memoizedState)||(dr=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),r.lastRenderedState=o}return[o,n]}function rk(){}function nk(e,t){var r=it,n=Zr(),i=t(),o=!Cn(n.memoizedState,i);if(o&&(n.memoizedState=i,dr=!0),n=n.queue,kx(ak.bind(null,r,n,e),[e]),n.getSnapshot!==t||o||Ct!==null&&Ct.memoizedState.tag&1){if(r.flags|=2048,Bu(9,ok.bind(null,r,n,i,t),void 0,null),kt===null)throw Error(V(349));Ua&30||ik(r,t,i)}return i}function ik(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=it.updateQueue,t===null?(t={lastEffect:null,stores:null},it.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function ok(e,t,r,n){t.value=r,t.getSnapshot=n,sk(t)&&lk(e)}function ak(e,t,r){return r(function(){sk(t)&&lk(e)})}function sk(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!Cn(e,r)}catch{return!0}}function lk(e){var t=ji(e,1);t!==null&&An(t,e,1,-1)}function D_(e){var t=Dn();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Lu,lastRenderedState:e},t.queue=e,e=e.dispatch=PU.bind(null,it,e),[t.memoizedState,e]}function Bu(e,t,r,n){return e={tag:e,create:t,destroy:r,deps:n,next:null},t=it.updateQueue,t===null?(t={lastEffect:null,stores:null},it.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 ck(){return Zr().memoizedState}function Sh(e,t,r,n){var i=Dn();it.flags|=e,i.memoizedState=Bu(1|t,r,void 0,n===void 0?null:n)}function $m(e,t,r,n){var i=Zr();n=n===void 0?null:n;var o=void 0;if(xt!==null){var a=xt.memoizedState;if(o=a.destroy,n!==null&&Ax(n,a.deps)){i.memoizedState=Bu(t,r,o,n);return}}it.flags|=e,i.memoizedState=Bu(1|t,r,o,n)}function L_(e,t){return Sh(8390656,8,e,t)}function kx(e,t){return $m(2048,8,e,t)}function uk(e,t){return $m(4,2,e,t)}function dk(e,t){return $m(4,4,e,t)}function fk(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 hk(e,t,r){return r=r!=null?r.concat([e]):null,$m(4,4,fk.bind(null,t,e),r)}function Nx(){}function pk(e,t){var r=Zr();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&Ax(t,n[1])?n[0]:(r.memoizedState=[e,t],e)}function mk(e,t){var r=Zr();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&Ax(t,n[1])?n[0]:(e=e(),r.memoizedState=[e,t],e)}function vk(e,t,r){return Ua&21?(Cn(r,t)||(r=xj(),it.lanes|=r,za|=r,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,dr=!0),e.memoizedState=r)}function EU(e,t){var r=Ie;Ie=r!==0&&4>r?r:4,e(!0);var n=Rg.transition;Rg.transition={};try{e(!1),t()}finally{Ie=r,Rg.transition=n}}function gk(){return Zr().memoizedState}function OU(e,t,r){var n=ko(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},yk(e))bk(t,r);else if(r=Zj(e,t,r,n),r!==null){var i=er();An(r,e,n,i),wk(r,t,n)}}function PU(e,t,r){var n=ko(e),i={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(yk(e))bk(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var a=t.lastRenderedState,s=o(a,r);if(i.hasEagerState=!0,i.eagerState=s,Cn(s,a)){var l=t.interleaved;l===null?(i.next=i,_x(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}r=Zj(e,t,i,n),r!==null&&(i=er(),An(r,e,n,i),wk(r,t,n))}}function yk(e){var t=e.alternate;return e===it||t!==null&&t===it}function bk(e,t){du=Jh=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function wk(e,t,r){if(r&4194240){var n=t.lanes;
vendor: 6,844 bytes, lines 38-40
38n&=e.pendingLanes,r|=n,t.lanes=r,cx(e,r)}}var Zh={readContext:Jr,useCallback:Ft,useContext:Ft,useEffect:Ft,useImperativeHandle:Ft,useInsertionEffect:Ft,useLayoutEffect:Ft,useMemo:Ft,useReducer:Ft,useRef:Ft,useState:Ft,useDebugValue:Ft,useDeferredValue:Ft,useTransition:Ft,useMutableSource:Ft,useSyncExternalStore:Ft,useId:Ft,unstable_isNewReconciler:!1},TU={readContext:Jr,useCallback:function(e,t){return Dn().memoizedState=[e,t===void 0?null:t],e},useContext:Jr,useEffect:L_,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,Sh(4194308,4,fk.bind(null,t,e),r)},useLayoutEffect:function(e,t){return Sh(4194308,4,e,t)},useInsertionEffect:function(e,t){return Sh(4,2,e,t)},useMemo:function(e,t){var r=Dn();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=Dn();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=OU.bind(null,it,e),[n.memoizedState,e]},useRef:function(e){var t=Dn();return e={current:e},t.memoizedState=e},useState:D_,useDebugValue:Nx,useDeferredValue:function(e){return Dn().memoizedState=e},useTransition:function(){var e=D_(!1),t=e[0];return e=EU.bind(null,e[1]),Dn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=it,i=Dn();if(tt){if(r===void 0)throw Error(V(407));r=r()}else{if(r=t(),kt===null)throw Error(V(349));Ua&30||ik(n,t,r)}i.memoizedState=r;var o={value:r,getSnapshot:t};return i.queue=o,L_(ak.bind(null,n,o,e),[e]),n.flags|=2048,Bu(9,ok.bind(null,n,o,r,t),void 0,null),r},useId:function(){var e=Dn(),t=kt.identifierPrefix;if(tt){var r=pi,n=hi;r=(n&~(1<<32-Tn(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=Du++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=_U++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},AU={readContext:Jr,useCallback:pk,useContext:Jr,useEffect:kx,useImperativeHandle:hk,useInsertionEffect:uk,useLayoutEffect:dk,useMemo:mk,useReducer:$g,useRef:ck,useState:function(){return $g(Lu)},useDebugValue:Nx,useDeferredValue:function(e){var t=Zr();return vk(t,xt.memoizedState,e)},useTransition:function(){var e=$g(Lu)[0],t=Zr().memoizedState;return[e,t]},useMutableSource:rk,useSyncExternalStore:nk,useId:gk,unstable_isNewReconciler:!1},CU={readContext:Jr,useCallback:pk,useContext:Jr,useEffect:kx,useImperativeHandle:hk,useInsertionEffect:uk,useLayoutEffect:dk,useMemo:mk,useReducer:Mg,useRef:ck,useState:function(){return Mg(Lu)},useDebugValue:Nx,useDeferredValue:function(e){var t=Zr();return xt===null?t.memoizedState=e:vk(t,xt.memoizedState,e)},useTransition:function(){var e=Mg(Lu)[0],t=Zr().memoizedState;return[e,t]},useMutableSource:rk,useSyncExternalStore:nk,useId:gk,unstable_isNewReconciler:!1};function mn(e,t){if(e&&e.defaultProps){t=ot({},t),e=e.defaultProps;for(var r in e)t[r]===void 0&&(t[r]=e[r]);return t}return t}function f0(e,t,r,n){t=e.memoizedState,r=r(n,t),r=r==null?t:ot({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var Mm={isMounted:function(e){return(e=e._reactInternals)?as(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var n=er(),i=ko(e),o=wi(n,i);o.payload=t,r!=null&&(o.callback=r),t=Co(e,o,i),t!==null&&(An(t,e,i,n),wh(t,e,i))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var n=er(),i=ko(e),o=wi(n,i);o.tag=1,o.payload=t,r!=null&&(o.callback=r),t=Co(e,o,i),t!==null&&(An(t,e,i,n),wh(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=er(),n=ko(e),i=wi(r,n);i.tag=2,t!=null&&(i.callback=t),t=Co(e,i,n),t!==null&&(An(t,e,n,r),wh(t,e,n))}};function B_(e,t,r,n,i,o,a){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,o,a):t.prototype&&t.prototype.isPureReactComponent?!ku(r,n)||!ku(i,o):!0}function xk(e,t,r){var n=!1,i=Lo,o=t.contextType;return typeof o=="object"&&o!==null?o=Jr(o):(i=pr(t)?Ba:Gt.current,n=t.contextTypes,o=(n=n!=null)?Pl(e,i):Lo),t=new t(r,o),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Mm,e.stateNode=t,t._reactInternals=e,n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function F_(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&&Mm.enqueueReplaceState(t,t.state,null)}function h0(e,t,r,n){var i=e.stateNode;i.props=r,i.state=e.memoizedState,i.refs={},Ex(e);var o=t.contextType;typeof o=="object"&&o!==null?i.context=Jr(o):(o=pr(t)?Ba:Gt.current,i.context=Pl(e,o)),i.state=e.memoizedState,o=t.getDerivedStateFromProps,typeof o=="function"&&(f0(e,t,o,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&&Mm.enqueueReplaceState(i,i.state,null),Xh(e,r,i,n),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function jl(e,t){try{var r="",n=t;do r+=nF(n),n=n.return;while(n);var i=r}catch(o){i=`
39Error generating stack: `+o.message+`
40`+o.stack}return{value:e,source:t,stack:i,digest:null}}function Ig(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function p0(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var jU=typeof WeakMap=="function"?WeakMap:Map;function Sk(e,t,r){r=wi(-1,r),r.tag=3,r.payload={element:null};var n=t.value;return r.callback=function(){tp||(tp=!0,E0=n),p0(e,t)},r}function _k(e,t,r){r=wi(-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(){p0(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(r.callback=function(){p0(e,t),typeof n!="function"&&(jo===null?jo=new Set([this]):jo.add(this));var a=t.stack;this.componentDidCatch(t.value,{componentStack:a!==null?a:""})}),r}function U_(e,t,r){var n=e.pingCache;if(n===null){n=e.pingCache=new jU;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=HU.bind(null,e,t,r),t.then(e,e))}function z_(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 W_(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=wi(-1,1),t.tag=2,Co(r,t,1))),r.lanes|=1),e)}var kU=Fi.ReactCurrentOwner,dr=!1;
vendor: 4,312 bytes, line 40
40function Qt(e,t,r,n){t.child=e===null?Jj(t,null,r,n):Al(t,e.child,r,n)}function H_(e,t,r,n,i){r=r.render;var o=t.ref;return rl(t,i),n=Cx(e,t,r,n,o,i),r=jx(),e!==null&&!dr?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,ki(e,t,i)):(tt&&r&&gx(t),t.flags|=1,Qt(e,t,n,i),t.child)}function q_(e,t,r,n,i){if(e===null){var o=r.type;return typeof o=="function"&&!Fx(o)&&o.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=o,Ek(e,t,o,n,i)):(e=Ph(r.type,null,n,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&i)){var a=o.memoizedProps;if(r=r.compare,r=r!==null?r:ku,r(a,n)&&e.ref===t.ref)return ki(e,t,i)}return t.flags|=1,e=No(o,n),e.ref=t.ref,e.return=t,t.child=e}function Ek(e,t,r,n,i){if(e!==null){var o=e.memoizedProps;if(ku(o,n)&&e.ref===t.ref)if(dr=!1,t.pendingProps=n=o,(e.lanes&i)!==0)e.flags&131072&&(dr=!0);else return t.lanes=e.lanes,ki(e,t,i)}return m0(e,t,r,n,i)}function Ok(e,t,r){var n=t.pendingProps,i=n.children,o=e!==null?e.memoizedState:null;if(n.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ge(Ks,Sr),Sr|=r;else{if(!(r&1073741824))return e=o!==null?o.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Ge(Ks,Sr),Sr|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=o!==null?o.baseLanes:r,Ge(Ks,Sr),Sr|=n}else o!==null?(n=o.baseLanes|r,t.memoizedState=null):n=r,Ge(Ks,Sr),Sr|=n;return Qt(e,t,i,r),t.child}function Pk(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function m0(e,t,r,n,i){var o=pr(r)?Ba:Gt.current;return o=Pl(t,o),rl(t,i),r=Cx(e,t,r,n,o,i),n=jx(),e!==null&&!dr?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,ki(e,t,i)):(tt&&n&&gx(t),t.flags|=1,Qt(e,t,r,i),t.child)}function V_(e,t,r,n,i){if(pr(r)){var o=!0;qh(t)}else o=!1;if(rl(t,i),t.stateNode===null)_h(e,t),xk(t,r,n),h0(t,r,n,i),n=!0;else if(e===null){var a=t.stateNode,s=t.memoizedProps;a.props=s;var l=a.context,c=r.contextType;typeof c=="object"&&c!==null?c=Jr(c):(c=pr(r)?Ba:Gt.current,c=Pl(t,c));var u=r.getDerivedStateFromProps,d=typeof u=="function"||typeof a.getSnapshotBeforeUpdate=="function";d||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(s!==n||l!==c)&&F_(t,a,n,c),to=!1;var f=t.memoizedState;a.state=f,Xh(t,n,a,i),l=t.memoizedState,s!==n||f!==l||hr.current||to?(typeof u=="function"&&(f0(t,r,u,n),l=t.memoizedState),(s=to||B_(t,r,s,n,f,l,c))?(d||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(t.flags|=4194308)):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=l),a.props=n,a.state=l,a.context=c,n=s):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{a=t.stateNode,ek(e,t),s=t.memoizedProps,c=t.type===t.elementType?s:mn(t.type,s),a.props=c,d=t.pendingProps,f=a.context,l=r.contextType,typeof l=="object"&&l!==null?l=Jr(l):(l=pr(r)?Ba:Gt.current,l=Pl(t,l));var h=r.getDerivedStateFromProps;(u=typeof h=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(s!==d||f!==l)&&F_(t,a,n,l),to=!1,f=t.memoizedState,a.state=f,Xh(t,n,a,i);var v=t.memoizedState;s!==d||f!==v||hr.current||to?(typeof h=="function"&&(f0(t,r,h,n),v=t.memoizedState),(c=to||B_(t,r,c,n,f,v,l)||!1)?(u||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(n,v,l),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(n,v,l)),typeof a.componentDidUpdate=="function"&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof a.componentDidUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=v),a.props=n,a.state=v,a.
vendor: 8,081 bytes, line 40
40context=l,n=c):(typeof a.componentDidUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),n=!1)}return v0(e,t,r,n,o,i)}function v0(e,t,r,n,i,o){Pk(e,t);var a=(t.flags&128)!==0;if(!n&&!a)return i&&k_(t,r,!1),ki(e,t,o);n=t.stateNode,kU.current=t;var s=a&&typeof r.getDerivedStateFromError!="function"?null:n.render();return t.flags|=1,e!==null&&a?(t.child=Al(t,e.child,null,o),t.child=Al(t,null,s,o)):Qt(e,t,s,o),t.memoizedState=n.state,i&&k_(t,r,!0),t.child}function Tk(e){var t=e.stateNode;t.pendingContext?j_(e,t.pendingContext,t.pendingContext!==t.context):t.context&&j_(e,t.context,!1),Ox(e,t.containerInfo)}function K_(e,t,r,n,i){return Tl(),bx(i),t.flags|=256,Qt(e,t,r,n),t.child}var g0={dehydrated:null,treeContext:null,retryLane:0};function y0(e){return{baseLanes:e,cachePool:null,transitions:null}}function Ak(e,t,r){var n=t.pendingProps,i=nt.current,o=!1,a=(t.flags&128)!==0,s;if((s=a)||(s=e!==null&&e.memoizedState===null?!1:(i&2)!==0),s?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),Ge(nt,i&1),e===null)return u0(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):(a=n.children,e=n.fallback,o?(n=t.mode,o=t.child,a={mode:"hidden",children:a},!(n&1)&&o!==null?(o.childLanes=0,o.pendingProps=a):o=Lm(a,n,0,null),e=Ma(e,n,r,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=y0(r),t.memoizedState=g0,e):Rx(t,a));if(i=e.memoizedState,i!==null&&(s=i.dehydrated,s!==null))return NU(e,t,a,n,s,i,r);if(o){o=n.fallback,a=t.mode,i=e.child,s=i.sibling;var l={mode:"hidden",children:n.children};return!(a&1)&&t.child!==i?(n=t.child,n.childLanes=0,n.pendingProps=l,t.deletions=null):(n=No(i,l),n.subtreeFlags=i.subtreeFlags&14680064),s!==null?o=No(s,o):(o=Ma(o,a,r,null),o.flags|=2),o.return=t,n.return=t,n.sibling=o,t.child=n,n=o,o=t.child,a=e.child.memoizedState,a=a===null?y0(r):{baseLanes:a.baseLanes|r,cachePool:null,transitions:a.transitions},o.memoizedState=a,o.childLanes=e.childLanes&~r,t.memoizedState=g0,n}return o=e.child,e=o.sibling,n=No(o,{mode:"visible",children:n.children}),!(t.mode&1)&&(n.lanes=r),n.return=t,n.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=n,t.memoizedState=null,n}function Rx(e,t){return t=Lm({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Rf(e,t,r,n){return n!==null&&bx(n),Al(t,e.child,null,r),e=Rx(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function NU(e,t,r,n,i,o,a){if(r)return t.flags&256?(t.flags&=-257,n=Ig(Error(V(422))),Rf(e,t,a,n)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=n.fallback,i=t.mode,n=Lm({mode:"visible",children:n.children},i,0,null),o=Ma(o,i,a,null),o.flags|=2,n.return=t,o.return=t,n.sibling=o,t.child=n,t.mode&1&&Al(t,e.child,null,a),t.child.memoizedState=y0(a),t.memoizedState=g0,o);if(!(t.mode&1))return Rf(e,t,a,null);if(i.data==="$!"){if(n=i.nextSibling&&i.nextSibling.dataset,n)var s=n.dgst;return n=s,o=Error(V(419)),n=Ig(o,n,void 0),Rf(e,t,a,n)}if(s=(a&e.childLanes)!==0,dr||s){if(n=kt,n!==null){switch(a&-a){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|a)?0:i,i!==0&&i!==o.retryLane&&(o.retryLane=i,ji(e,i),An(n,e,i,-1))}return Bx(),n=Ig(Error(V(421))),Rf(e,t,a,n)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=qU.bind(null,e),i._reactRetry=t,null):(e=o.treeContext,Tr=Ao(i.nextSibling),Ar=t,tt=!0,_n=null,e!==null&&(Ur[zr++]=hi,Ur[zr++]=pi,Ur[zr++]=Fa,hi=e.id,pi=e.overflow,Fa=t),t=Rx(t,n.children),t.flags|=4096,t)}function G_(e,t,r){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),d0(e.return,t,r)}function Dg(e,t,r,n,i){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=n,o.tail=r,o.tailMode=i)}function Ck(e,t,r){var n=t.pendingProps,i=n.revealOrder,o=n.tail;if(Qt(e,t,n.children,r),n=nt.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&&G_(e,r,t);else if(e.tag===19)G_(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(Ge(nt,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&&Qh(e)===null&&(i=r),r=r.sibling;r=i,r===null?(i=t.child,t.child=null):(i=r.sibling,r.sibling=null),Dg(t,!1,i,r,o);break;case"backwards":for(r=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Qh(e)===null){t.child=i;break}e=i.sibling,i.sibling=r,r=i,i=e}Dg(t,!0,r,null,o);break;case"together":Dg(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function _h(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function ki(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),za|=t.lanes,!(r&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(V(153));if(t.child!==null){for(e=t.child,r=No(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=No(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function RU(e,t,r){switch(t.tag){case 3:Tk(t),Tl();break;case 5:tk(t);break;case 1:pr(t.type)&&qh(t);break;case 4:Ox(t,t.stateNode.containerInfo);break;case 10:var n=t.type._context,i=t.memoizedProps.value;Ge(Gh,n._currentValue),n._currentValue=i;break;case 13:if(n=t.memoizedState,n!==null)return n.dehydrated!==null?(Ge(nt,nt.current&1),t.flags|=128,null):r&t.child.childLanes?Ak(e,t,r):(Ge(nt,nt.current&1),e=ki(e,t,r),e!==null?e.sibling:null);Ge(nt,nt.current&1);break;case 19:if(n=(r&t.childLanes)!==0,e.flags&128){if(n)return Ck(e,t,r);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Ge(nt,nt.current),n)break;return null;case 22:case 23:return t.lanes=0,Ok(e,t,r)}return ki(e,t,r)}var jk,b0,kk,Nk;jk=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}};b0=function(){};kk=function(e,t,r,n){var i=e.memoizedProps;if(i!==n){e=t.stateNode,ba(Gn.current);var o=null;switch(r){case"input":i=Uy(e,i),n=Uy(e,n),o=[];break;case"select":i=ot({},i,{value:void 0}),n=ot({},n,{value:void 0}),o=[];break;case"textarea":i=Hy(e,i),n=Hy(e,n),o=[];break;default:typeof i.onClick!="function"&&typeof n.onClick=="function"&&(e.onclick=Wh)}Vy(r,n);var a;r=null;for(c in i)if(!n.hasOwnProperty(c)&&i.hasOwnProperty(c)&&i[c]!=null)if(c==="style"){var s=i[c];for(a in s)s.hasOwnProperty(a)&&(r||(r={}),r[a]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(Eu.hasOwnProperty(c)?o||(o=[]):(o=o||[]).push(c,null));for(c in n){var l=n[c];if(s=i!=null?i[c]:void 0,n.hasOwnProperty(c)&&l!==s&&(l!=null||s!=null))if(c==="style")if(s){for(a in s)!s.hasOwnProperty(a)||l&&l.hasOwnProperty(a)||(r||(r={}),r[a]="");for(a in l)l.hasOwnProperty(a)&&s[a]!==l[a]&&(r||(r={}),r[a]=l[a])}else r||(o||(o=[]),o.push(c,r)),r=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,s=s?s.__html:void 0,l!=null&&s!==l&&(o=o||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(o=o||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(Eu.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&Xe("scroll",e),o||s===l||(
vendor: 4,658 bytes, line 40
40o=[])):(o=o||[]).push(c,l))}r&&(o=o||[]).push("style",r);var c=o;(t.updateQueue=c)&&(t.flags|=4)}};Nk=function(e,t,r,n){r!==n&&(t.flags|=4)};function $c(e,t){if(!tt)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 Ut(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 $U(e,t,r){var n=t.pendingProps;switch(yx(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ut(t),null;case 1:return pr(t.type)&&Hh(),Ut(t),null;case 3:return n=t.stateNode,Cl(),Ze(hr),Ze(Gt),Tx(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(kf(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,_n!==null&&(T0(_n),_n=null))),b0(e,t),Ut(t),null;case 5:Px(t);var i=ba(Iu.current);if(r=t.type,e!==null&&t.stateNode!=null)kk(e,t,r,n,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!n){if(t.stateNode===null)throw Error(V(166));return Ut(t),null}if(e=ba(Gn.current),kf(t)){n=t.stateNode,r=t.type;var o=t.memoizedProps;switch(n[Wn]=t,n[$u]=o,e=(t.mode&1)!==0,r){case"dialog":Xe("cancel",n),Xe("close",n);break;case"iframe":case"object":case"embed":Xe("load",n);break;case"video":case"audio":for(i=0;i<eu.length;i++)Xe(eu[i],n);break;case"source":Xe("error",n);break;case"img":case"image":case"link":Xe("error",n),Xe("load",n);break;case"details":Xe("toggle",n);break;case"input":n_(n,o),Xe("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!o.multiple},Xe("invalid",n);break;case"textarea":o_(n,o),Xe("invalid",n)}Vy(r,o),i=null;for(var a in o)if(o.hasOwnProperty(a)){var s=o[a];a==="children"?typeof s=="string"?n.textContent!==s&&(o.suppressHydrationWarning!==!0&&jf(n.textContent,s,e),i=["children",s]):typeof s=="number"&&n.textContent!==""+s&&(o.suppressHydrationWarning!==!0&&jf(n.textContent,s,e),i=["children",""+s]):Eu.hasOwnProperty(a)&&s!=null&&a==="onScroll"&&Xe("scroll",n)}switch(r){case"input":Sf(n),i_(n,o,!0);break;case"textarea":Sf(n),a_(n);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(n.onclick=Wh)}n=i,t.updateQueue=n,n!==null&&(t.flags|=4)}else{a=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=aj(r)),e==="http://www.w3.org/1999/xhtml"?r==="script"?(e=a.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=a.createElement(r,{is:n.is}):(e=a.createElement(r),r==="select"&&(a=e,n.multiple?a.multiple=!0:n.size&&(a.size=n.size))):e=a.createElementNS(e,r),e[Wn]=t,e[$u]=n,jk(e,t,!1,!1),t.stateNode=e;e:{switch(a=Ky(r,n),r){case"dialog":Xe("cancel",e),Xe("close",e),i=n;break;case"iframe":case"object":case"embed":Xe("load",e),i=n;break;case"video":case"audio":for(i=0;i<eu.length;i++)Xe(eu[i],e);i=n;break;case"source":Xe("error",e),i=n;break;case"img":case"image":case"link":Xe("error",e),Xe("load",e),i=n;break;case"details":Xe("toggle",e),i=n;break;case"input":n_(e,n),i=Uy(e,n),Xe("invalid",e);break;case"option":i=n;break;case"select":e._wrapperState={wasMultiple:!!n.multiple},i=ot({},n,{value:void 0}),Xe("invalid",e);break;case"textarea":o_(e,n),i=Hy(e,n),Xe("invalid",e);break;default:i=n}Vy(r,i),s=i;for(o in s)if(s.hasOwnProperty(o)){var l=s[o];o==="style"?cj(e,l):o==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&sj(e,l)):o==="children"?typeof l=="string"?(r!=="textarea"||l!=="")&&Ou(e,l):typeof l=="number"&&Ou(e,""+l):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(Eu.hasOwnProperty(o)?l!=null&&o==="onScroll"&&Xe("scroll",e):l!=null&&nx(e,o,l,a))}switch(r){case"input":Sf(e),i_(e,n,!1);break;case"textarea":Sf(e),a_(e);break;case"option":n.value!=null&&e.setAttribute("value",""+Do(n.value));break;case"select":e.multiple=!!n.multiple,o=n.value,o!=null?Js(e,!!n.multiple,o,!1):n.defaultValue!=null&&Js(e,!!n.multiple,n.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=Wh)}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)}
vendor: 30,196 bytes, line 40
40return Ut(t),null;case 6:if(e&&t.stateNode!=null)Nk(e,t,e.memoizedProps,n);else{if(typeof n!="string"&&t.stateNode===null)throw Error(V(166));if(r=ba(Iu.current),ba(Gn.current),kf(t)){if(n=t.stateNode,r=t.memoizedProps,n[Wn]=t,(o=n.nodeValue!==r)&&(e=Ar,e!==null))switch(e.tag){case 3:jf(n.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&jf(n.nodeValue,r,(e.mode&1)!==0)}o&&(t.flags|=4)}else n=(r.nodeType===9?r:r.ownerDocument).createTextNode(n),n[Wn]=t,t.stateNode=n}return Ut(t),null;case 13:if(Ze(nt),n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(tt&&Tr!==null&&t.mode&1&&!(t.flags&128))Xj(),Tl(),t.flags|=98560,o=!1;else if(o=kf(t),n!==null&&n.dehydrated!==null){if(e===null){if(!o)throw Error(V(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(V(317));o[Wn]=t}else Tl(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Ut(t),o=!1}else _n!==null&&(T0(_n),_n=null),o=!0;if(!o)return t.flags&65536?t:null}return t.flags&128?(t.lanes=r,t):(n=n!==null,n!==(e!==null&&e.memoizedState!==null)&&n&&(t.child.flags|=8192,t.mode&1&&(e===null||nt.current&1?Et===0&&(Et=3):Bx())),t.updateQueue!==null&&(t.flags|=4),Ut(t),null);case 4:return Cl(),b0(e,t),e===null&&Nu(t.stateNode.containerInfo),Ut(t),null;case 10:return Sx(t.type._context),Ut(t),null;case 17:return pr(t.type)&&Hh(),Ut(t),null;case 19:if(Ze(nt),o=t.memoizedState,o===null)return Ut(t),null;if(n=(t.flags&128)!==0,a=o.rendering,a===null)if(n)$c(o,!1);else{if(Et!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(a=Qh(e),a!==null){for(t.flags|=128,$c(o,!1),n=a.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),t.subtreeFlags=0,n=r,r=t.child;r!==null;)o=r,e=n,o.flags&=14680066,a=o.alternate,a===null?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=a.childLanes,o.lanes=a.lanes,o.child=a.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=a.memoizedProps,o.memoizedState=a.memoizedState,o.updateQueue=a.updateQueue,o.type=a.type,e=a.dependencies,o.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return Ge(nt,nt.current&1|2),t.child}e=e.sibling}o.tail!==null&&ht()>kl&&(t.flags|=128,n=!0,$c(o,!1),t.lanes=4194304)}else{if(!n)if(e=Qh(a),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),$c(o,!0),o.tail===null&&o.tailMode==="hidden"&&!a.alternate&&!tt)return Ut(t),null}else 2*ht()-o.renderingStartTime>kl&&r!==1073741824&&(t.flags|=128,n=!0,$c(o,!1),t.lanes=4194304);o.isBackwards?(a.sibling=t.child,t.child=a):(r=o.last,r!==null?r.sibling=a:t.child=a,o.last=a)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=ht(),t.sibling=null,r=nt.current,Ge(nt,n?r&1|2:r&1),t):(Ut(t),null);case 22:case 23:return Lx(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?Sr&1073741824&&(Ut(t),t.subtreeFlags&6&&(t.flags|=8192)):Ut(t),null;case 24:return null;case 25:return null}throw Error(V(156,t.tag))}function MU(e,t){switch(yx(t),t.tag){case 1:return pr(t.type)&&Hh(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Cl(),Ze(hr),Ze(Gt),Tx(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Px(t),null;case 13:if(Ze(nt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(V(340));Tl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ze(nt),null;case 4:return Cl(),null;case 10:return Sx(t.type._context),null;case 22:case 23:return Lx(),null;case 24:return null;default:return null}}var $f=!1,qt=!1,IU=typeof WeakSet=="function"?WeakSet:Set,re=null;function Vs(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){ut(e,t,n)}else r.current=null}function w0(e,t,r){try{r()}catch(n){ut(e,t,n)}}var Y_=!1;function DU(e,t){if(n0=Fh,e=Dj(),vx(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,o=n.focusNode;n=n.focusOffset;try{r.nodeType,o.nodeType}catch{r=null;break e}var a=0,s=-1,l=-1,c=0,u=0,d=e,f=null;t:for(;;){for(var h;d!==r||i!==0&&d.nodeType!==3||(s=a+i),d!==o||n!==0&&d.nodeType!==3||(l=a+n),d.nodeType===3&&(a+=d.nodeValue.length),(h=d.firstChild)!==null;)f=d,d=h;for(;;){if(d===e)break t;if(f===r&&++c===i&&(s=a),f===o&&++u===n&&(l=a),(h=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=h}r=s===-1||l===-1?null:{start:s,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(i0={focusedElem:e,selectionRange:r},Fh=!1,re=t;re!==null;)if(t=re,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,re=e;else for(;re!==null;){t=re;try{var v=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var m=v.memoizedProps,y=v.memoizedState,w=t.stateNode,b=w.getSnapshotBeforeUpdate(t.elementType===t.type?m:mn(t.type,m),y);w.__reactInternalSnapshotBeforeUpdate=b}break;case 3:var g=t.stateNode.containerInfo;g.nodeType===1?g.textContent="":g.nodeType===9&&g.documentElement&&g.removeChild(g.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(V(163))}}catch(_){ut(t,t.return,_)}if(e=t.sibling,e!==null){e.return=t.return,re=e;break}re=t.return}return v=Y_,Y_=!1,v}function fu(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 o=i.destroy;i.destroy=void 0,o!==void 0&&w0(t,r,o)}i=i.next}while(i!==n)}}function Im(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 x0(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 Rk(e){var t=e.alternate;t!==null&&(e.alternate=null,Rk(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Wn],delete t[$u],delete t[s0],delete t[bU],delete t[wU])),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 $k(e){return e.tag===5||e.tag===3||e.tag===4}function X_(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||$k(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 S0(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=Wh));else if(n!==4&&(e=e.child,e!==null))for(S0(e,t,r),e=e.sibling;e!==null;)S0(e,t,r),e=e.sibling}function _0(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(_0(e,t,r),e=e.sibling;e!==null;)_0(e,t,r),e=e.sibling}var It=null,bn=!1;function Gi(e,t,r){for(r=r.child;r!==null;)Mk(e,t,r),r=r.sibling}function Mk(e,t,r){if(Kn&&typeof Kn.onCommitFiberUnmount=="function")try{Kn.onCommitFiberUnmount(Am,r)}catch{}switch(r.tag){case 5:qt||Vs(r,t);case 6:var n=It,i=bn;It=null,Gi(e,t,r),It=n,bn=i,It!==null&&(bn?(e=It,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):It.removeChild(r.stateNode));break;case 18:It!==null&&(bn?(e=It,r=r.stateNode,e.nodeType===8?jg(e.parentNode,r):e.nodeType===1&&jg(e,r),Cu(e)):jg(It,r.stateNode));break;case 4:n=It,i=bn,It=r.stateNode.containerInfo,bn=!0,Gi(e,t,r),It=n,bn=i;break;case 0:case 11:case 14:case 15:if(!qt&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){i=n=n.next;do{var o=i,a=o.destroy;o=o.tag,a!==void 0&&(o&2||o&4)&&w0(r,t,a),i=i.next}while(i!==n)}Gi(e,t,r);break;case 1:if(!qt&&(Vs(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(s){ut(r,t,s)}Gi(e,t,r);break;case 21:Gi(e,t,r);break;case 22:r.mode&1?(qt=(n=qt)||r.memoizedState!==null,Gi(e,t,r),qt=n):Gi(e,t,r);break;default:Gi(e,t,r)}}function Q_(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new IU),t.forEach(function(n){var i=VU.bind(null,e,n);r.has(n)||(r.add(n),n.then(i,i))})}}function un(e,t){var r=t.deletions;if(r!==null)for(var n=0;n<r.length;n++){var i=r[n];try{var o=e,a=t,s=a;e:for(;s!==null;){switch(s.tag){case 5:It=s.stateNode,bn=!1;break e;case 3:It=s.stateNode.containerInfo,bn=!0;break e;case 4:It=s.stateNode.containerInfo,bn=!0;break e}s=s.return}if(It===null)throw Error(V(160));Mk(o,a,i),It=null,bn=!1;var l=i.alternate;l!==null&&(l.return=null),i.return=null}catch(c){ut(i,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Ik(t,e),t=t.sibling}function Ik(e,t){var r=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(un(t,e),Mn(e),n&4){try{fu(3,e,e.return),Im(3,e)}catch(m){ut(e,e.return,m)}try{fu(5,e,e.return)}catch(m){ut(e,e.return,m)}}break;case 1:un(t,e),Mn(e),n&512&&r!==null&&Vs(r,r.return);break;case 5:if(un(t,e),Mn(e),n&512&&r!==null&&Vs(r,r.return),e.flags&32){var i=e.stateNode;try{Ou(i,"")}catch(m){ut(e,e.return,m)}}if(n&4&&(i=e.stateNode,i!=null)){var o=e.memoizedProps,a=r!==null?r.memoizedProps:o,s=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{s==="input"&&o.type==="radio"&&o.name!=null&&ij(i,o),Ky(s,a);var c=Ky(s,o);for(a=0;a<l.length;a+=2){var u=l[a],d=l[a+1];u==="style"?cj(i,d):u==="dangerouslySetInnerHTML"?sj(i,d):u==="children"?Ou(i,d):nx(i,u,d,c)}switch(s){case"input":zy(i,o);break;case"textarea":oj(i,o);break;case"select":var f=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!o.multiple;var h=o.value;h!=null?Js(i,!!o.multiple,h,!1):f!==!!o.multiple&&(o.defaultValue!=null?Js(i,!!o.multiple,o.defaultValue,!0):Js(i,!!o.multiple,o.multiple?[]:"",!1))}i[$u]=o}catch(m){ut(e,e.return,m)}}break;case 6:if(un(t,e),Mn(e),n&4){if(e.stateNode===null)throw Error(V(162));i=e.stateNode,o=e.memoizedProps;try{i.nodeValue=o}catch(m){ut(e,e.return,m)}}break;case 3:if(un(t,e),Mn(e),n&4&&r!==null&&r.memoizedState.isDehydrated)try{Cu(t.containerInfo)}catch(m){ut(e,e.return,m)}break;case 4:un(t,e),Mn(e);break;case 13:un(t,e),Mn(e),i=e.child,i.flags&8192&&(o=i.memoizedState!==null,i.stateNode.isHidden=o,!o||i.alternate!==null&&i.alternate.memoizedState!==null||(Ix=ht())),n&4&&Q_(e);break;case 22:if(u=r!==null&&r.memoizedState!==null,e.mode&1?(qt=(c=qt)||u,un(t,e),qt=c):un(t,e),Mn(e),n&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!u&&e.mode&1)for(re=e,u=e.child;u!==null;){for(d=re=u;re!==null;){switch(f=re,h=f.child,f.tag){case 0:case 11:case 14:case 15:fu(4,f,f.return);break;case 1:Vs(f,f.return);var v=f.stateNode;if(typeof v.componentWillUnmount=="function"){n=f,r=f.return;try{t=n,v.props=t.memoizedProps,v.state=t.memoizedState,v.componentWillUnmount()}catch(m){ut(n,r,m)}}break;case 5:Vs(f,f.return);break;case 22:if(f.memoizedState!==null){Z_(d);continue}}h!==null?(h.return=f,re=h):Z_(d)}u=u.sibling}e:for(u=null,d=e;;){if(d.tag===5){if(u===null){u=d;try{i=d.stateNode,c?(o=i.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"):(s=d.stateNode,l=d.memoizedProps.style,a=l!=null&&l.hasOwnProperty("display")?l.display:null,s.style.display=lj("display",a))}catch(m){ut(e,e.return,m)}}}else if(d.tag===6){if(u===null)try{d.stateNode.nodeValue=c?"":d.memoizedProps}catch(m){ut(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;u===d&&(u=null),d=d.return}u===d&&(u=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:un(t,e),Mn(e),n&4&&Q_(e);break;case 21:break;default:un(t,e),Mn(e)}}function Mn(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if($k(r)){var n=r;break e}r=r.return}throw Error(V(160))}switch(n.tag){case 5:var i=n.stateNode;n.flags&32&&(Ou(i,""),n.flags&=-33);var o=X_(e);_0(e,o,i);break;case 3:case 4:var a=n.stateNode.containerInfo,s=X_(e);S0(e,s,a);break;default:throw Error(V(161))}}catch(l){ut(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function LU(e,t,r){re=e,Dk(e)}function Dk(e,t,r){for(var n=(e.mode&1)!==0;re!==null;){var i=re,o=i.child;if(i.tag===22&&n){var a=i.memoizedState!==null||$f;if(!a){var s=i.alternate,l=s!==null&&s.memoizedState!==null||qt;s=$f;var c=qt;if($f=a,(qt=l)&&!c)for(re=i;re!==null;)a=re,l=a.child,a.tag===22&&a.memoizedState!==null?eE(i):l!==null?(l.return=a,re=l):eE(i);for(;o!==null;)re=o,Dk(o),o=o.sibling;re=i,$f=s,qt=c}J_(e)}else i.subtreeFlags&8772&&o!==null?(o.return=i,re=o):J_(e)}}function J_(e){for(;re!==null;){var t=re;if(t.flags&8772){var r=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:qt||Im(5,t);break;case 1:var n=t.stateNode;if(t.flags&4&&!qt)if(r===null)n.componentDidMount();else{var i=t.elementType===t.type?r.memoizedProps:mn(t.type,r.memoizedProps);n.componentDidUpdate(i,r.memoizedState,n.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&I_(t,o,n);break;case 3:var a=t.updateQueue;if(a!==null){if(r=null,t.child!==null)switch(t.child.tag){case 5:r=t.child.stateNode;break;case 1:r=t.child.stateNode}I_(t,a,r)}break;case 5:var s=t.stateNode;if(r===null&&t.flags&4){r=s;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&r.focus();break;case"img":l.src&&(r.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var c=t.alternate;if(c!==null){var u=c.memoizedState;if(u!==null){var d=u.dehydrated;d!==null&&Cu(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(V(163))}qt||t.flags&512&&x0(t)}catch(f){ut(t,t.return,f)}}if(t===e){re=null;break}if(r=t.sibling,r!==null){r.return=t.return,re=r;break}re=t.return}}function Z_(e){for(;re!==null;){var t=re;if(t===e){re=null;break}var r=t.sibling;if(r!==null){r.return=t.return,re=r;break}re=t.return}}function eE(e){for(;re!==null;){var t=re;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{Im(4,t)}catch(l){ut(t,r,l)}break;case 1:var n=t.stateNode;if(typeof n.componentDidMount=="function"){var i=t.return;try{n.componentDidMount()}catch(l){ut(t,i,l)}}var o=t.return;try{x0(t)}catch(l){ut(t,o,l)}break;case 5:var a=t.return;try{x0(t)}catch(l){ut(t,a,l)}}}catch(l){ut(t,t.return,l)}if(t===e){re=null;break}var s=t.sibling;if(s!==null){s.return=t.return,re=s;break}re=t.return}}var BU=Math.ceil,ep=Fi.ReactCurrentDispatcher,$x=Fi.ReactCurrentOwner,Yr=Fi.ReactCurrentBatchConfig,ke=0,kt=null,gt=null,Lt=0,Sr=0,Ks=Ko(0),Et=0,Fu=null,za=0,Dm=0,Mx=0,hu=null,ur=null,Ix=0,kl=1/0,si=null,tp=!1,E0=null,jo=null,Mf=!1,wo=null,rp=0,pu=0,O0=null,Eh=-1,Oh=0;function er(){return ke&6?ht():Eh!==-1?Eh:Eh=ht()}function ko(e){return e.mode&1?ke&2&&Lt!==0?Lt&-Lt:SU.transition!==null?(Oh===0&&(Oh=xj()),Oh):(e=Ie,e!==0||(e=window.event,e=e===void 0?16:Aj(e.type)),e):1}function An(e,t,r,n){if(50<pu)throw pu=0,O0=null,Error(V(185));zd(e,r,n),(!(ke&2)||e!==kt)&&(e===kt&&(!(ke&2)&&(Dm|=r),Et===4&&io(e,Lt)),mr(e,n),r===1&&ke===0&&!(t.mode&1)&&(kl=ht()+500,Rm&&Go()))}function mr(e,t){var r=e.callbackNode;SF(e,t);var n=Bh(e,e===kt?Lt:0);if(n===0)r!==null&&c_(r),e.callbackNode=null,e.callbackPriority=0;else if(t=n&-n,e.callbackPriority!==t){if(r!=null&&c_(r),t===1)e.tag===0?xU(tE.bind(null,e)):Kj(tE.bind(null,e)),gU(function(){!(ke&6)&&Go()}),r=null;else{switch(Sj(n)){case 1:r=lx;break;case 4:r=bj;break;case 16:r=Lh;break;case 536870912:r=wj;break;default:r=Lh}r=qk(r,Lk.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function Lk(e,t){if(Eh=-1,Oh=0,ke&6)throw Error(V(327));var r=e.callbackNode;if(nl()&&e.callbackNode!==r)return null;var n=Bh(e,e===kt?Lt:0);if(n===0)return null;if(n&30||n&e.expiredLanes||t)t=np(e,n);else{t=n;var i=ke;ke|=2;var o=Fk();(kt!==e||Lt!==t)&&(si=null,kl=ht()+500,$a(e,t));do try{zU();break}catch(s){Bk(e,s)}while(!0);xx(),ep.current=o,ke=i,gt!==null?t=0:(kt=null,Lt=0,t=Et)}if(t!==0){if(t===2&&(i=Jy(e),i!==0&&(n=i,t=P0(e,i))),t===1)throw r=Fu,$a(e,0),io(e,n),mr(e,ht()),r;if(t===6)io(e,n);else{if(i=e.current.alternate,!(n&30)&&!FU(i)&&(t=np(e,n),t===2&&(o=Jy(e),o!==0&&(n=o,t=P0(e,o))),t===1))throw r=Fu,$a(e,0),io(e,n),mr(e,ht()),r;switch(e.finishedWork=i,e.finishedLanes=n,t){case 0:case 1:throw Error(V(345));case 2:ua(e,ur,si);break;case 3:if(io(e,n),(n&130023424)===n&&(t=Ix+500-ht(),10<t)){if(Bh(e,0)!==0)break;if(i=e.suspendedLanes,(i&n)!==n){er(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=a0(ua.bind(null,e,ur,si),t);break}ua(e,ur,si);break;case 4:if(io(e,n),(n&4194240)===n)break;for(t=e.eventTimes,i=-1;0<n;){var a=31-Tn(n);o=1<<a,a=t[a],a>i&&(i=a),n&=~o}if(n=i,n=ht()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*BU(n/1960))-n,10<n){e.timeoutHandle=a0(ua.bind(null,e,ur,si),n);break}ua(e,ur,si);break;case 5:ua(e,ur,si);break;default:throw Error(V(329))}}}return mr(e,ht()),e.callbackNode===r?Lk.bind(null,e):null}function P0(e,t){var r=hu;return e.current.memoizedState.isDehydrated&&($a(e,t).flags|=256),e=np(e,t),e!==2&&(t=ur,ur=r,t!==null&&T0(t)),e}function T0(e){ur===null?ur=e:ur.push.apply(ur,e)}function FU(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],o=i.getSnapshot;i=i.value;try{if(!Cn(o(),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 io(e,t){for(t&=~Mx,t&=~Dm,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-Tn(t),n=1<<r;e[r]=-1,t&=~n}}function tE(e){if(ke&6)throw Error(V(327));nl();var t=Bh(e,0);if(!(t&1))return mr(e,ht()),null;var r=np(e,t);if(e.tag!==0&&r===2){var n=Jy(e);n!==0&&(t=n,r=P0(e,n))}if(r===1)throw r=Fu,$a(e,0),io(e,t),mr(e,ht()),r;if(r===6)throw Error(V(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,ua(e,ur,si),mr(e,ht()),null}function Dx(e,t){var r=ke;ke|=1;try{return e(t)}finally{ke=r,ke===0&&(kl=ht()+500,Rm&&Go())}}function Wa(e){wo!==null&&wo.tag===0&&!(ke&6)&&nl();var t=ke;ke|=1;var r=Yr.transition,n=Ie;try{if(Yr.transition=null,Ie=1,e)return e()}finally{Ie=n,Yr.transition=r,ke=t,!(ke&6)&&Go()}}function Lx(){Sr=Ks.current,Ze(Ks)}function $a(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,vU(r)),gt!==null)for(r=gt.return;r!==null;){var n=r;switch(yx(n),n.tag){case 1:n=n.type.childContextTypes,n!=null&&Hh();break;case 3:Cl(),Ze(hr),Ze(Gt),Tx();break;case 5:Px(n);break;case 4:Cl();break;case 13:Ze(nt);break;case 19:Ze(nt);break;case 10:Sx(n.type._context);break;case 22:case 23:Lx()}r=r.return}if(kt=e,gt=e=No(e.current,null),Lt=Sr=t,Et=0,Fu=null,Mx=Dm=za=0,ur=hu=null,ya!==null){for(t=0;t<ya.length;t++)if(r=ya[t],n=r.interleaved,n!==null){r.interleaved=null;var i=n.next,o=r.pending;if(o!==null){var a=o.next;o.next=i,n.next=a}r.pending=n}ya=null}return e}function Bk(e,t){do{var r=gt;try{if(xx(),xh.current=Zh,Jh){for(var n=it.memoizedState;n!==null;){var i=n.queue;i!==null&&(i.pending=null),n=n.next}Jh=!1}if(Ua=0,Ct=xt=it=null,du=!1,Du=0,$x.current=null,r===null||r.return===null){Et=1,Fu=t,gt=null;break}e:{var o=e,a=r.return,s=r,l=t;if(t=Lt,s.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var c=l,u=s,d=u.tag;if(!(u.mode&1)&&(d===0||d===11||d===15)){var f=u.alternate;f?(u.updateQueue=f.updateQueue,u.memoizedState=f.memoizedState,u.lanes=f.lanes):(u.updateQueue=null,u.memoizedState=null)}var h=z_(a);if(h!==null){h.flags&=-257,W_(h,a,s,o,t),h.mode&1&&U_(o,c,t),t=h,l=c;var v=t.updateQueue;if(v===null){var m=new Set;m.add(l),t.updateQueue=m}else v.add(l);break e}else{if(!(t&1)){U_(o,c,t),Bx();break e}l=Error(V(426))}}else if(tt&&s.mode&1){var y=z_(a);if(y!==null){!(y.flags&65536)&&(y.flags|=256),W_(y,a,s,o,t),bx(jl(l,s));break e}}o=l=jl(l,s),Et!==4&&(Et=2),hu===null?hu=[o]:hu.push(o),o=a;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var w=Sk(o,l,t);M_(o,w);break e;case 1:s=l;var b=o.type,g=o.stateNode;if(!(o.flags&128)&&(typeof b.getDerivedStateFromError=="function"||g!==null&&typeof g.componentDidCatch=="function"&&(jo===null||!jo.has(g)))){o.flags|=65536,t&=-t,o.lanes|=t;var _=_k(o,s,t);M_(o,_);break e}}o=o.return}while(o!==null)}zk(r)}catch(S){t=S,gt===r&&r!==null&&(gt=r=r.return);continue}break}while(!0)}function Fk(){var e=ep.current;return ep.current=Zh,e===null?Zh:e}function Bx(){(Et===0||Et===3||Et===2)&&(Et=4),kt===null||!(za&268435455)&&!(Dm&268435455)||io(kt,Lt)}function np(e,t){var r=ke;ke|=2;var n=Fk();(kt!==e||Lt!==t)&&(si=null,$a(e,t));do try{UU();break}catch(i){Bk(e,i)}while(!0);if(xx(),ke=r,ep.current=n,gt!==null)throw Error(V(261));return kt=null,Lt=0,Et}function UU(){for(;gt!==null;)Uk(gt)}function zU(){for(;gt!==null&&!hF();)Uk(gt)}function Uk(e){var t=Hk(e.alternate,e,Sr);e.memoizedProps=e.pendingProps,t===null?zk(e):gt=t,$x.current=null}function zk(e){var t=e;do{var r=t.alternate;if(e=t.return,t.flags&32768){if(r=MU(r,t),r!==null){r.flags&=32767,gt=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Et=6,gt=null;return}}else if(r=$U(r,t,Sr),r!==null){gt=r;return}if(t=t.sibling,t!==null){gt=t;return}gt=t=e}while(t!==null);Et===0&&(Et=5)}function ua(e,t,r){var n=Ie,i=Yr.transition;try{Yr.transition=null,Ie=1,WU(e,t,r,n)}finally{Yr.transition=i,Ie=n}return null}function WU(e,t,r,n){do nl();while(wo!==null);if(ke&6)throw Error(V(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(V(177));e.callbackNode=null,e.callbackPriority=0;var o=r.lanes|r.childLanes;if(_F(e,o),e===kt&&(gt=kt=null,Lt=0),!(r.subtreeFlags&2064)&&!(r.flags&2064)||Mf||(Mf=!0,qk(Lh,function(){return nl(),null})),o=(r.flags&15990)!==0,r.subtreeFlags&15990||o){o=Yr.transition,Yr.transition=null;var a=Ie;Ie=1;var s=ke;ke|=4,$x.current=null,DU(e,r),Ik(r,e),cU(i0),Fh=!!n0,i0=n0=null,e.current=r,LU(r),pF(),ke=s,Ie=a,Yr.transition=o}else e.current=r;if(Mf&&(Mf=!1,wo=e,rp=i),o=e.pendingLanes,o===0&&(jo=null),gF(r.stateNode),mr(e,ht()),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(tp)throw tp=!1,e=E0,E0=null,e;return rp&1&&e.tag!==0&&nl(),o=e.pendingLanes,o&1?e===O0?pu++:(pu=0,O0=e):pu=0,Go(),null}function nl(){if(wo!==null){var e=Sj(rp),t=Yr.transition,r=Ie;try{if(Yr.transition=null,Ie=16>e?16:e,wo===null)var n=!1;else{if(e=wo,wo=null,rp=0,ke&6)throw Error(V(331));var i=ke;for(ke|=4,re=e.current;re!==null;){var o=re,a=o.child;if(re.flags&16){var s=o.deletions;if(s!==null){for(var l=0;l<s.length;l++){var c=s[l];for(re=c;re!==null;){var u=re;switch(u.tag){case 0:case 11:case 15:fu(8,u,o)}var d=u.child;if(d!==null)d.return=u,re=d;else for(;re!==null;){u=re;var f=u.sibling,h=u.return;if(Rk(u),u===c){re=null;break}if(f!==null){f.return=h,re=f;break}re=h}}}var v=o.alternate;if(v!==null){var m=v.child;if(m!==null){v.child=null;do{var y=m.sibling;m.sibling=null,m=y}while(m!==null)}}re=o}}if(o.subtreeFlags&2064&&a!==null)a.return=o,re=a;else e:for(;re!==null;){if(o=re,o.flags&2048)switch(o.tag){case 0:case 11:case 15:fu(9,o,o.return)}var w=o.sibling;if(w!==null){w.return=o.return,re=w;break e}re=o.return}}var b=e.current;for(re=b;re!==null;){a=re;var g=a.child;if(a.subtreeFlags&2064&&g!==null)g.return=a,re=g;else e:for(a=b;re!==null;){if(s=re,s.flags&2048)try{switch(s.tag){case 0:case 11:case 15:Im(9,s)}}catch(S){ut(s,s.return,S)}if(s===a){re=null;break e}var _=s.sibling;if(_!==null){_.return=s.return,re=_;break e}re=s.return}}if(ke=i,Go(),Kn&&typeof Kn.onPostCommitFiberRoot=="function")try{Kn.onPostCommitFiberRoot(Am,e)}catch{}n=!0}return n}finally{Ie=r,Yr.transition=t}}return!1}function rE(e,t,r){t=jl(r,t),t=Sk(e,t,1),e=Co(e,t,1),t=er(),e!==null&&(zd(e,1,t),mr(e,t))}function ut(e,t,r){if(e.tag===3)rE(e,e,r);else for(;t!==null;){if(t.tag===3){rE(t,e,r);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(jo===null||!jo.has(n))){e=jl(r,e),e=_k(t,e,1),t=Co(t,e,1),e=er(),t!==null&&(zd(t,1,e),mr(t,e));break}}t=t.return}}function HU(e,t,r){var n=e.pingCache;n!==null&&n.delete(t),t=er(),e.pingedLanes|=e.suspendedLanes&r,kt===e&&(Lt&r)===r&&(Et===4||Et===3&&(Lt&130023424)===Lt&&500>ht()-Ix?$a(e,0):Mx|=r),mr(e,t)}function Wk(e,t){t===0&&(e.mode&1?(t=Of,Of<<=1,!(Of&130023424)&&(Of=4194304)):t=1);var r=er();e=ji(e,t),e!==null&&(zd(e,t,r),mr(e,r))}function qU(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),Wk(e,r)}function VU(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(V(314))}n!==null&&n.delete(t),Wk(e,r)}var Hk;Hk=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||hr.current)dr=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return dr=!1,RU(e,t,r);dr=!!(e.flags&131072)}else dr=!1,tt&&t.flags&1048576&&Gj(t,Kh,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;_h(e,t),e=t.pendingProps;var i=Pl(t,Gt.current);rl(t,r),i=Cx(null,t,n,e,i,r);var o=jx();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,pr(n)?(o=!0,qh(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Ex(t),i.updater=Mm,t.stateNode=i,i._reactInternals=t,h0(t,n,e,r),t=v0(null,t,n,!0,o,r)):(t.tag=0,tt&&o&&gx(t),Qt(null,t,i,r),t=t.child),t;case 16:n=t.elementType;e:{switch(_h(e,t),e=t.pendingProps,i=n._init,n=i(n._payload),t.type=n,i=t.tag=GU(n),e=mn(n,e),i){case 0:t=m0(null,t,n,e,r);break e;case 1:t=V_(null,t,n,e,r);break e;case 11:t=H_(null,t,n,e,r);break e;case 14:t=q_(null,t,n,mn(n.type,e),r);break e}throw Error(V(306,n,""))}return t;case 0:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:mn(n,i),m0(e,t,n,i,r);case 1:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:mn(n,i),V_(e,t,n,i,r);case 3:e:{if(Tk(t),e===null)throw Error(V(387));n=t.pendingProps,o=t.memoizedState,i=o.element,ek(e,t),Xh(t,n,null,r);var a=t.memoizedState;if(n=a.element,o.isDehydrated)if(o={element:n,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=jl(Error(V(423)),t),t=K_(e,t,n,r,i);break e}else if(n!==i){i=jl(Error(V(424)),t),t=K_(e,t,n,r,i);break e}else for(Tr=Ao(t.stateNode.containerInfo.firstChild),Ar=t,tt=!0,_n=null,r=Jj(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Tl(),n===i){t=ki(e,t,r);break e}Qt(e,t,n,r)}t=t.child}return t;case 5:return tk(t),e===null&&u0(t),n=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,a=i.children,o0(n,i)?a=null:o!==null&&o0(n,o)&&(t.flags|=32),Pk(e,t),Qt(e,t,a,r),t.child;case 6:return e===null&&u0(t),null;case 13:return Ak(e,t,r);case 4:return Ox(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=Al(t,null,n,r):Qt(e,t,n,r),t.child;case 11:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:mn(n,i),H_(e,t,n,i,r);case 7:return Qt(e,t,t.pendingProps,r),t.child;case 8:return Qt(e,t,t.pendingProps.children,r),t.child;case 12:return Qt(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,i=t.pendingProps,o=t.memoizedProps,a=i.value,Ge(Gh,n._currentValue),n._currentValue=a,o!==null)if(Cn(o.value,a)){if(o.children===i.children&&!hr.current){t=ki(e,t,r);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var s=o.dependencies;if(s!==null){a=o.child;for(var l=s.firstContext;l!==null;){if(l.context===n){if(o.tag===1){l=wi(-1,r&-r),l.tag=2;var c=o.updateQueue;if(c!==null){c=c.shared;var u=c.pending;u===null?l.next=l:(l.next=u.next,u.next=l),c.pending=l}}o.lanes|=r,l=o.alternate,l!==null&&(l.lanes|=r),d0(o.return,r,t),s.lanes|=r;break}l=l.next}}else if(o.tag===10)a=o.type===t.type?null:o.child;else if(o.tag===18){if(a=o.return,a===null)throw Error(V(341));a.lanes|=r,s=a.alternate,s!==null&&(s.lanes|=r),d0(a,r,t),a=o.sibling}else a=o.child;if(a!==null)a.return=o;else for(a=o;a!==null;){if(a===t){a=null;break}if(o=a.sibling,o!==null){o.return=a.return,a=o;break}a=a.return}o=a}Qt(e,t,i.children,r),t=t.child}return t;case 9:return i=t.type,n=t.pendingProps.children,rl(t,r),i=Jr(i),n=n(i),t.flags|=1,Qt(e,t,n,r),t.child;case 14:return n=t.type,i=mn(n,t.pendingProps),i=mn(n.type,i),q_(e,t,n,i,r);case 15:return Ek(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:mn(n,i),_h(e,t),t.tag=1,pr(n)?(e=!0,qh(t)):e=!1,rl(t,r),xk(t,n,i),h0(t,n,i,r),v0(null,t,n,!0,e,r);case 19:return Ck(e,t,r);case 22:return Ok(e,t,r)}throw Error(V(156,t.tag))};function qk(e,t){return yj(e,t)}function KU(e,t,r,n){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Wr(e,t,r,n){return new KU(e,t,r,n)}function Fx(e){return e=e.prototype,!(!e||!e.isReactComponent)}function GU(e){if(typeof e=="function")return Fx(e)?1:0;if(e!=null){if(e=e.$$typeof,e===ox)return 11;if(e===ax)return 14}return 2}function No(e,t){var r=e.alternate;return r===null?(r=Wr(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.depen
vendor: 7,616 bytes, line 40
40dencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function Ph(e,t,r,n,i,o){var a=2;if(n=e,typeof e=="function")Fx(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case Ds:return Ma(r.children,i,o,t);case ix:a=8,i|=8;break;case Dy:return e=Wr(12,r,t,i|2),e.elementType=Dy,e.lanes=o,e;case Ly:return e=Wr(13,r,t,i),e.elementType=Ly,e.lanes=o,e;case By:return e=Wr(19,r,t,i),e.elementType=By,e.lanes=o,e;case tj:return Lm(r,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case ZC:a=10;break e;case ej:a=9;break e;case ox:a=11;break e;case ax:a=14;break e;case eo:a=16,n=null;break e}throw Error(V(130,e==null?e:typeof e,""))}return t=Wr(a,r,t,i),t.elementType=e,t.type=n,t.lanes=o,t}function Ma(e,t,r,n){return e=Wr(7,e,n,t),e.lanes=r,e}function Lm(e,t,r,n){return e=Wr(22,e,n,t),e.elementType=tj,e.lanes=r,e.stateNode={isHidden:!1},e}function Lg(e,t,r){return e=Wr(6,e,null,t),e.lanes=r,e}function Bg(e,t,r){return t=Wr(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function YU(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=bg(0),this.expirationTimes=bg(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=bg(0),this.identifierPrefix=n,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Ux(e,t,r,n,i,o,a,s,l){return e=new YU(e,t,r,s,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Wr(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ex(o),e}function XU(e,t,r){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Is,key:n==null?null:""+n,children:e,containerInfo:t,implementation:r}}function Vk(e){if(!e)return Lo;e=e._reactInternals;e:{if(as(e)!==e||e.tag!==1)throw Error(V(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(pr(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(V(171))}if(e.tag===1){var r=e.type;if(pr(r))return Vj(e,r,t)}return t}function Kk(e,t,r,n,i,o,a,s,l){return e=Ux(r,n,!0,e,i,o,a,s,l),e.context=Vk(null),r=e.current,n=er(),i=ko(r),o=wi(n,i),o.callback=t??null,Co(r,o,i),e.current.lanes=i,zd(e,i,n),mr(e,n),e}function Bm(e,t,r,n){var i=t.current,o=er(),a=ko(i);return r=Vk(r),t.context===null?t.context=r:t.pendingContext=r,t=wi(o,a),t.payload={element:e},n=n===void 0?null:n,n!==null&&(t.callback=n),e=Co(i,t,a),e!==null&&(An(e,i,a,o),wh(e,i,a)),a}function ip(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 nE(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function zx(e,t){nE(e,t),(e=e.alternate)&&nE(e,t)}function QU(){return null}var Gk=typeof reportError=="function"?reportError:function(e){console.error(e)};function Wx(e){this._internalRoot=e}Fm.prototype.render=Wx.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(V(409));Bm(e,t,null,null)};Fm.prototype.unmount=Wx.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Wa(function(){Bm(null,e,null,null)}),t[Ci]=null}};function Fm(e){this._internalRoot=e}Fm.prototype.unstable_scheduleHydration=function(e){if(e){var t=Oj();e={blockedOn:null,target:e,priority:t};for(var r=0;r<no.length&&t!==0&&t<no[r].priority;r++);no.splice(r,0,e),r===0&&Tj(e)}};function Hx(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Um(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function iE(){}function JU(e,t,r,n,i){if(i){if(typeof n=="function"){var o=n;n=function(){var c=ip(a);o.call(c)}}var a=Kk(t,n,e,0,null,!1,!1,"",iE);return e._reactRootContainer=a,e[Ci]=a.current,Nu(e.nodeType===8?e.parentNode:e),Wa(),a}for(;i=e.lastChild;)e.removeChild(i);if(typeof n=="function"){var s=n;n=function(){var c=ip(l);s.call(c)}}var l=Ux(e,0,!1,null,null,!1,!1,"",iE);return e._reactRootContainer=l,e[Ci]=l.current,Nu(e.nodeType===8?e.parentNode:e),Wa(function(){Bm(t,l,r,n)}),l}function zm(e,t,r,n,i){var o=r._reactRootContainer;if(o){var a=o;if(typeof i=="function"){var s=i;i=function(){var l=ip(a);s.call(l)}}Bm(t,a,e,i)}else a=JU(r,t,e,i,n);return ip(a)}_j=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=Zc(t.pendingLanes);r!==0&&(cx(t,r|1),mr(t,ht()),!(ke&6)&&(kl=ht()+500,Go()))}break;case 13:Wa(function(){var n=ji(e,1);if(n!==null){var i=er();An(n,e,1,i)}}),zx(e,1)}};ux=function(e){if(e.tag===13){var t=ji(e,134217728);if(t!==null){var r=er();An(t,e,134217728,r)}zx(e,134217728)}};Ej=function(e){if(e.tag===13){var t=ko(e),r=ji(e,t);if(r!==null){var n=er();An(r,e,t,n)}zx(e,t)}};Oj=function(){return Ie};Pj=function(e,t){var r=Ie;try{return Ie=e,t()}finally{Ie=r}};Yy=function(e,t,r){switch(t){case"input":if(zy(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=Nm(n);if(!i)throw Error(V(90));nj(n),zy(n,i)}}}break;case"textarea":oj(e,r);break;case"select":t=r.value,t!=null&&Js(e,!!r.multiple,t,!1)}};fj=Dx;hj=Wa;var ZU={usingClientEntryPoint:!1,Events:[Hd,Us,Nm,uj,dj,Dx]},Mc={findFiberByHostInstance:ga,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},e3={bundleType:Mc.bundleType,version:Mc.version,rendererPackageName:Mc.rendererPackageName,rendererConfig:Mc.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Fi.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=vj(e),e===null?null:e.stateNode},findFiberByHostInstance:Mc.findFiberByHostInstance||QU,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var If=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!If.isDisabled&&If.supportsFiber)try{Am=If.inject(e3),Kn=If}catch{}}Nr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ZU;Nr.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Hx(t))throw Error(V(200));return XU(e,t,null,r)};Nr.createRoot=function(e,t){if(!Hx(e))throw Error(V(299));var r=!1,n="",i=Gk;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=Ux(e,1,!1,null,null,r,!1,n,i),e[Ci]=t.current,Nu(e.nodeType===8?e.parentNode:e),new Wx(t)};Nr.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(V(188)):(e=Object.keys(e).join(","),Error(V(268,e)));return e=vj(t),e=e===null?null:e.stateNode,e};Nr.flushSync=function(e){return Wa(e)};
40Nr.hydrate=function(e,t,r){if(!Um(t))throw Error(V(200));return zm(null,e,t,!0,r)};Nr.hydrateRoot=function(e,t,r){if(!Hx(e))throw Error(V(405));var n=r!=null&&r.hydratedSources||null,i=!1,o="",a=Gk;if(r!=null&&(r.unstable_strictMode===!0&&(i=!0),r.identifierPrefix!==void 0&&(o=r.identifierPrefix),r.onRecoverableError!==void 0&&(a=r.onRecoverableError)),t=Kk(t,null,e,1,r??null,i,!1,o,a),e[Ci]=t.current,Nu(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 Fm(t)};Nr.render=function(e,t,r){if(!Um(t))throw Error(V(200));return zm(null,e,t,!1,r)};Nr.unmountComponentAtNode=function(e){if(!Um(e))throw Error(V(40));return e._reactRootContainer?(Wa(function(){zm(null,null,e,!1,function(){e._reactRootContainer=null,e[Ci]=null})}),!0):!1};Nr.unstable_batchedUpdates=Dx;Nr.unstable_renderSubtreeIntoContainer=function(e,t,r,n){if(!Um(r))throw Error(V(200));if(e==null||e._reactInternals===void 0)throw Error(V(38));return zm(e,t,r,!1,n)};Nr.version="18.3.1-next-f1338f8080-20240426";function Yk(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Yk)}catch(e){console.error(e)}}Yk(),YC.exports=Nr;var ss=YC.exports;const Xk=Ue(ss);var Qk,oE=ss;Qk=oE.createRoot,oE.hydrateRoot;var lc=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(){}},Ha=typeof window>"u"||"Deno"in globalThis;function Jt(){}function t3(e,t){return typeof e=="function"?e(t):e}function A0(e){return typeof e=="number"&&e>=0&&e!==1/0}function Jk(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Ro(e,t){return typeof e=="function"?e(t):e}function Fr(e,t){return typeof e=="function"?e(t):e}function aE(e,t){const{type:r="all",exact:n,fetchStatus:i,predicate:o,queryKey:a,stale:s}=e;if(a){if(n){if(t.queryHash!==qx(a,t.options))return!1}else if(!Uu(t.queryKey,a))return!1}if(r!=="all"){const l=t.isActive();if(r==="active"&&!l||r==="inactive"&&l)return!1}return!(typeof s=="boolean"&&t.isStale()!==s||i&&i!==t.state.fetchStatus||o&&!o(t))}function sE(e,t){const{exact:r,status:n,predicate:i,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(r){if(qa(t.options.mutationKey)!==qa(o))return!1}else if(!Uu(t.options.mutationKey,o))return!1}return!(n&&t.state.status!==n||i&&!i(t))}function qx(e,t){return((t==null?void 0:t.queryKeyHashFn)||qa)(e)}function qa(e){return JSON.stringify(e,(t,r)=>C0(r)?Object.keys(r).sort().reduce((n,i)=>(n[i]=r[i],n),{}):r)}function Uu(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>Uu(e[r],t[r])):!1}function Zk(e,t){if(e===t)return e;const r=lE(e)&&lE(t);if(r||C0(e)&&C0(t)){const n=r?e:Object.keys(e),i=n.length,o=r?t:Object.keys(t),a=o.length,s=r?[]:{},l=new Set(n);let c=0;for(let u=0;u<a;u++){const d=r?u:o[u];(!r&&l.has(d)||r)&&e[d]===void 0&&t[d]===void 0?(s[d]=void 0,c++):(s[d]=Zk(e[d],t[d]),s[d]===e[d]&&e[d]!==void 0&&c++)}return i===a&&c===i?e:s}return t}function op(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 lE(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function C0(e){if(!cE(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!cE(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function cE(e){return Object.prototype.toString.call(e)==="[object Object]"}function r3(e){return new Promise(t=>{setTimeout(t,e)})}function j0(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?Zk(e,t):t}function n3(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function i3(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var Vx=Symbol();function eN(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Vx?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function tN(e,t){return typeof e=="function"?e(...t):!!e}var Oa,lo,hl,AC,o3=(AC=class extends lc{constructor(){super();ce(this,Oa);ce(this,lo);ce(this,hl);ee(this,hl,t=>{if(!Ha&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){R(this,lo)||this.setEventListener(R(this,hl))}onUnsubscribe(){var t;this.hasListeners()||((t=R(this,lo))==null||t.call(this),ee(this,lo,void 0))}setEventListener(t){var r;ee(this,hl,t),(r=R(this,lo))==null||r.call(this),ee(this,lo,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){R(this,Oa)!==t&&(ee(this,Oa,t),this.onFocus())}onFocus(){const t=this.isFocused();
vendor: 4,924 bytes, line 40
40this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof R(this,Oa)=="boolean"?R(this,Oa):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Oa=new WeakMap,lo=new WeakMap,hl=new WeakMap,AC),Kx=new o3,pl,co,ml,CC,a3=(CC=class extends lc{constructor(){super();ce(this,pl,!0);ce(this,co);ce(this,ml);ee(this,ml,t=>{if(!Ha&&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(){R(this,co)||this.setEventListener(R(this,ml))}onUnsubscribe(){var t;this.hasListeners()||((t=R(this,co))==null||t.call(this),ee(this,co,void 0))}setEventListener(t){var r;ee(this,ml,t),(r=R(this,co))==null||r.call(this),ee(this,co,t(this.setOnline.bind(this)))}setOnline(t){R(this,pl)!==t&&(ee(this,pl,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return R(this,pl)}},pl=new WeakMap,co=new WeakMap,ml=new WeakMap,CC),ap=new a3;function k0(){let e,t;const r=new Promise((i,o)=>{e=i,t=o});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 s3(e){return Math.min(1e3*2**e,3e4)}function rN(e){return(e??"online")==="online"?ap.isOnline():!0}var nN=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Fg(e){return e instanceof nN}function iN(e){let t=!1,r=0,n=!1,i;const o=k0(),a=m=>{var y;n||(f(new nN(m)),(y=e.abort)==null||y.call(e))},s=()=>{t=!0},l=()=>{t=!1},c=()=>Kx.isFocused()&&(e.networkMode==="always"||ap.isOnline())&&e.canRun(),u=()=>rN(e.networkMode)&&e.canRun(),d=m=>{var y;n||(n=!0,(y=e.onSuccess)==null||y.call(e,m),i==null||i(),o.resolve(m))},f=m=>{var y;n||(n=!0,(y=e.onError)==null||y.call(e,m),i==null||i(),o.reject(m))},h=()=>new Promise(m=>{var y;i=w=>{(n||c())&&m(w)},(y=e.onPause)==null||y.call(e)}).then(()=>{var m;i=void 0,n||(m=e.onContinue)==null||m.call(e)}),v=()=>{if(n)return;let m;const y=r===0?e.initialPromise:void 0;try{m=y??e.fn()}catch(w){m=Promise.reject(w)}Promise.resolve(m).then(d).catch(w=>{var E;if(n)return;const b=e.retry??(Ha?0:3),g=e.retryDelay??s3,_=typeof g=="function"?g(r,w):g,S=b===!0||typeof b=="number"&&r<b||typeof b=="function"&&b(r,w);if(t||!S){f(w);return}r++,(E=e.onFail)==null||E.call(e,r,w),r3(_).then(()=>c()?void 0:h()).then(()=>{t?f(w):v()})})};return{promise:o,cancel:a,continue:()=>(i==null||i(),o),cancelRetry:s,continueRetry:l,canStart:u,start:()=>(u()?v():h().then(v),o)}}var l3=e=>setTimeout(e,0);function c3(){let e=[],t=0,r=s=>{s()},n=s=>{s()},i=l3;const o=s=>{t?e.push(s):i(()=>{r(s)})},a=()=>{const s=e;e=[],s.length&&i(()=>{n(()=>{s.forEach(l=>{r(l)})})})};return{batch:s=>{let l;t++;try{l=s()}finally{t--,t||a()}return l},batchCalls:s=>(...l)=>{o(()=>{s(...l)})},schedule:o,setNotifyFunction:s=>{r=s},setBatchNotifyFunction:s=>{n=s},setScheduler:s=>{i=s}}}var St=c3(),Pa,jC,oN=(jC=class{constructor(){ce(this,Pa)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),A0(this.gcTime)&&ee(this,Pa,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Ha?1/0:5*60*1e3))}clearGcTimeout(){R(this,Pa)&&(clearTimeout(R(this,Pa)),ee(this,Pa,void 0))}},Pa=new WeakMap,jC),vl,Ta,Br,Aa,zt,Dd,Ca,gn,oi,kC,u3=(kC=class extends oN{constructor(t){super();ce(this,gn);ce(this,vl);ce(this,Ta);ce(this,Br);ce(this,Aa);ce(this,zt);ce(this,Dd);ce(this,Ca);ee(this,Ca,!1),ee(this,Dd,t.defaultOptions),this.setOptions(t.options),this.observers=[],ee(this,Aa,t.client),ee(this,Br,R(this,Aa).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,ee(this,vl,d3(this.options)),this.state=t.state??R(this,vl),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=R(this,zt))==null?void 0:t.promise}setOptions(t){this.options={...R(this,Dd),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&R(this,Br).remove(this)}setData(t,r){const n=j0(this.state.data,t,this.options);return be(this,gn,oi).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t,r){be(this,gn,oi).call(this,{type:"setState",state:t,setStateOptions:r})}cancel(t){var n,i;const r=(n=R(this,zt))==null?void 0:n.promise;return(i=R(this,zt))==null||i.cancel(t),r?r.then(Jt).catch(Jt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(R(this,vl))}isActive(){return this.observers.some(t=>Fr(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Vx||this.state.dataUpdateCount+this.state.errorUpdate
40Count===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Ro(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!Jk(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=R(this,zt))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=R(this,zt))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),R(this,Br).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(R(this,zt)&&(R(this,Ca)?R(this,zt).cancel({revert:!0}):R(this,zt).cancelRetry()),this.scheduleGc()),R(this,Br).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||be(this,gn,oi).call(this,{type:"invalidate"})}fetch(t,r){var c,u,d;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(R(this,zt))return R(this,zt).continueRetry(),R(this,zt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const f=this.observers.find(h=>h.options.queryFn);f&&this.setOptions(f.options)}const n=new AbortController,i=f=>{Object.defineProperty(f,"signal",{enumerable:!0,get:()=>(ee(this,Ca,!0),n.signal)})},o=()=>{const f=eN(this.options,r),v=(()=>{const m={client:R(this,Aa),queryKey:this.queryKey,meta:this.meta};return i(m),m})();return ee(this,Ca,!1),this.options.persister?this.options.persister(f,v,this):f(v)},s=(()=>{const f={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:R(this,Aa),state:this.state,fetchFn:o};return i(f),f})();(c=this.options.behavior)==null||c.onFetch(s,this),ee(this,Ta,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((u=s.fetchOptions)==null?void 0:u.meta))&&be(this,gn,oi).call(this,{type:"fetch",meta:(d=s.fetchOptions)==null?void 0:d.meta});const l=f=>{var h,v,m,y;Fg(f)&&f.silent||be(this,gn,oi).call(this,{type:"error",error:f}),Fg(f)||((v=(h=R(this,Br).config).onError)==null||v.call(h,f,this),(y=(m=R(this,Br).config).onSettled)==null||y.call(m,this.state.data,f,this)),this.scheduleGc()};return ee(this,zt,iN({initialPromise:r==null?void 0:r.initialPromise,fn:s.fetchFn,abort:n.abort.bind(n),onSuccess:f=>{var h,v,m,y;if(f===void 0){l(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(f)}catch(w){l(w);return}(v=(h=R(this,Br).config).onSuccess)==null||v.call(h,f,this),(y=(m=R(this,Br).config).onSettled)==null||y.call(m,f,this.state.error,this),this.scheduleGc()},onError:l,onFail:(f,h)=>{be(this,gn,oi).call(this,{type:"failed",failureCount:f,error:h})},onPause:()=>{be(this,gn,oi).call(this,{type:"pause"})},onContinue:()=>{be(this,gn,oi).call(this,{type:"continue"})},retry:s.options.retry,retryDelay:s.options.retryDelay,networkMode:s.options.networkMode,canRun:()=>!0})),R(this,zt).start()}},vl=new WeakMap,Ta=new WeakMap,Br=new WeakMap,Aa=new WeakMap,zt=new WeakMap,Dd=new WeakMap,Ca=new WeakMap,gn=new WeakSet,oi=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,...aN(n.data,this.options),fetchMeta:t.meta??null};case"success":return ee(this,Ta,void 0),{...n,data:t.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const i=t.error;return Fg(i)&&i.revert&&R(this,Ta)?{...R(this,Ta),fetchStatus:"idle"}
vendor: 4,600 bytes, line 40
40:{...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),St.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),R(this,Br).notify({query:this,type:"updated",action:t})})},kC);function aN(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:rN(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function d3(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=t!==void 0,n=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var Bn,NC,f3=(NC=class extends lc{constructor(t={}){super();ce(this,Bn);this.config=t,ee(this,Bn,new Map)}build(t,r,n){const i=r.queryKey,o=r.queryHash??qx(i,r);let a=this.get(o);return a||(a=new u3({client:t,queryKey:i,queryHash:o,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(i)}),this.add(a)),a}add(t){R(this,Bn).has(t.queryHash)||(R(this,Bn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=R(this,Bn).get(t.queryHash);r&&(t.destroy(),r===t&&R(this,Bn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){St.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return R(this,Bn).get(t)}getAll(){return[...R(this,Bn).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>aE(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>aE(t,n)):r}notify(t){St.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){St.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){St.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Bn=new WeakMap,NC),Fn,Yt,ja,Un,Ji,RC,h3=(RC=class extends oN{constructor(t){super();ce(this,Un);ce(this,Fn);ce(this,Yt);ce(this,ja);this.mutationId=t.mutationId,ee(this,Yt,t.mutationCache),ee(this,Fn,[]),this.state=t.state||sN(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){R(this,Fn).includes(t)||(R(this,Fn).push(t),this.clearGcTimeout(),R(this,Yt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){ee(this,Fn,R(this,Fn).filter(r=>r!==t)),this.scheduleGc(),R(this,Yt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){R(this,Fn).length||(this.state.status==="pending"?this.scheduleGc():R(this,Yt).remove(this))}continue(){var t;return((t=R(this,ja))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var o,a,s,l,c,u,d,f,h,v,m,y,w,b,g,_,S,E,O,P;const r=()=>{be(this,Un,Ji).call(this,{type:"continue"})};ee(this,ja,iN({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(T,j)=>{be(this,Un,Ji).call(this,{type:"failed",failureCount:T,error:j})},onPause:()=>{be(this,Un,Ji).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>R(this,Yt).canRun(this)}));const n=this.state.status==="pending",i=!R(this,ja).canStart();try{if(n)r();else{be(this,Un,Ji).call(this,{type:"pending",variables:t,isPaused:i}),await((a=(o=R(this,Yt).config).onMutate)==null?void 0:a.call(o,t,this));const j=await((l=(s=this.options).onMutate)==null?void 0:l.call(s,t));j!==this.state.context&&be(this,Un,Ji).call(this,{type:"pending",context:j,variables:t,isPaused:i})}const T=await R(this,ja).start();return await((u=(c=R(this,Yt).config).onSuccess)==null?void 0:u.call(c,T,t,this.state.context,this)),await((f=(d=this.options).onSuccess)==null?void 0:f.call(d,T,t,this.state.context)),await((v=(h=R(this,Yt).config).onSettled)==null?void 0:v.call(h,T,null,this.state.variables,this.state.context,this)),await((y=(m=this.options).onSettled)==null?void 0:y.call(m,T,null,t,this.state.context)),be(this,Un,Ji).call(this,{type:"success",data:T}),T}catch(T){try{throw await((b=(w=R(this,Yt).config).onError)==null?void 0:b.call(w,T,t,this.state.context,this)),await((_=(g=this.options).onError)==null?void 0:_.call(g,T,t,this.state.context)),await((E=(S=R(this,Yt).config).onSettled)==null?void 0:E.
40call(S,void 0,T,this.state.variables,this.state.context,this)),await((P=(O=this.options).onSettled)==null?void 0:P.call(O,void 0,T,t,this.state.context)),T}finally{be(this,Un,Ji).call(this,{type:"error",error:T})}}finally{R(this,Yt).runNext(this)}}},Fn=new WeakMap,Yt=new WeakMap,ja=new WeakMap,Un=new WeakSet,Ji=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),St.batch(()=>{R(this,Fn).forEach(n=>{n.onMutationUpdate(t)}),R(this,Yt).notify({mutation:this,type:"updated",action:t})})},RC);function sN(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var di,yn,Ld,$C,p3=($C=class extends lc{constructor(t={}){super();ce(this,di);ce(this,yn);ce(this,Ld);this.config=t,ee(this,di,new Set),ee(this,yn,new Map),ee(this,Ld,0)}build(t,r,n){const i=new h3({mutationCache:this,mutationId:++yf(this,Ld)._,options:t.defaultMutationOptions(r),state:n});return this.add(i),i}add(t){R(this,di).add(t);const r=Df(t);if(typeof r=="string"){const n=R(this,yn).get(r);n?n.push(t):R(this,yn).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(R(this,di).delete(t)){const r=Df(t);if(typeof r=="string"){const n=R(this,yn).get(r);if(n)if(n.length>1){const i=n.indexOf(t);i!==-1&&n.splice(i,1)}else n[0]===t&&R(this,yn).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=Df(t);if(typeof r=="string"){const n=R(this,yn).get(r),i=n==null?void 0:n.find(o=>o.state.status==="pending");return!i||i===t}else return!0}runNext(t){var n;const r=Df(t);if(typeof r=="string"){const i=(n=R(this,yn).get(r))==null?void 0:n.find(o=>o!==t&&o.state.isPaused);return(i==null?void 0:i.continue())??Promise.resolve()}else return Promise.resolve()}clear(){St.batch(()=>
vendor: 16,774 bytes, line 40
40{R(this,di).forEach(t=>{this.notify({type:"removed",mutation:t})}),R(this,di).clear(),R(this,yn).clear()})}getAll(){return Array.from(R(this,di))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>sE(r,n))}findAll(t={}){return this.getAll().filter(r=>sE(t,r))}notify(t){St.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>r.state.isPaused);return St.batch(()=>Promise.all(t.map(r=>r.continue().catch(Jt))))}},di=new WeakMap,yn=new WeakMap,Ld=new WeakMap,$C);function Df(e){var t;return(t=e.options.scope)==null?void 0:t.id}function uE(e){return{onFetch:(t,r)=>{var u,d,f,h,v;const n=t.options,i=(f=(d=(u=t.fetchOptions)==null?void 0:u.meta)==null?void 0:d.fetchMore)==null?void 0:f.direction,o=((h=t.state.data)==null?void 0:h.pages)||[],a=((v=t.state.data)==null?void 0:v.pageParams)||[];let s={pages:[],pageParams:[]},l=0;const c=async()=>{let m=!1;const y=g=>{Object.defineProperty(g,"signal",{enumerable:!0,get:()=>(t.signal.aborted?m=!0:t.signal.addEventListener("abort",()=>{m=!0}),t.signal)})},w=eN(t.options,t.fetchOptions),b=async(g,_,S)=>{if(m)return Promise.reject();if(_==null&&g.pages.length)return Promise.resolve(g);const O=(()=>{const C={client:t.client,queryKey:t.queryKey,pageParam:_,direction:S?"backward":"forward",meta:t.options.meta};return y(C),C})(),P=await w(O),{maxPages:T}=t.options,j=S?i3:n3;return{pages:j(g.pages,P,T),pageParams:j(g.pageParams,_,T)}};if(i&&o.length){const g=i==="backward",_=g?m3:dE,S={pages:o,pageParams:a},E=_(n,S);s=await b(S,E,g)}else{const g=e??o.length;do{const _=l===0?a[0]??n.initialPageParam:dE(n,s);if(l>0&&_==null)break;s=await b(s,_),l++}while(l<g)}return s};t.options.persister?t.fetchFn=()=>{var m,y;return(y=(m=t.options).persister)==null?void 0:y.call(m,c,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=c}}}function dE(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 m3(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 lt,uo,fo,gl,yl,ho,bl,wl,MC,v3=(MC=class{constructor(e={}){ce(this,lt);ce(this,uo);ce(this,fo);ce(this,gl);ce(this,yl);ce(this,ho);ce(this,bl);ce(this,wl);ee(this,lt,e.queryCache||new f3),ee(this,uo,e.mutationCache||new p3),ee(this,fo,e.defaultOptions||{}),ee(this,gl,new Map),ee(this,yl,new Map),ee(this,ho,0)}mount(){yf(this,ho)._++,R(this,ho)===1&&(ee(this,bl,Kx.subscribe(async e=>{e&&(await this.resumePausedMutations(),R(this,lt).onFocus())})),ee(this,wl,ap.subscribe(async e=>{e&&(await this.resumePausedMutations(),R(this,lt).onOnline())})))}unmount(){var e,t;yf(this,ho)._--,R(this,ho)===0&&((e=R(this,bl))==null||e.call(this),ee(this,bl,void 0),(t=R(this,wl))==null||t.call(this),ee(this,wl,void 0))}isFetching(e){return R(this,lt).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return R(this,uo).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=R(this,lt).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=R(this,lt).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(Ro(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return R(this,lt).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=R(this,lt).get(n.queryHash),o=i==null?void 0:i.state.data,a=t3(t,o);if(a!==void 0)return R(this,lt).build(this,n).setData(a,{...r,manual:!0})}setQueriesData(e,t,r){return St.batch(()=>R(this,lt).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=R(this,lt).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=R(this,lt);St.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=R(this,lt);return St.batch(()=>(r.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=St.batch(()=>R(this,lt).findAll(e).map(i=>i.cancel(r)));return Promise.all(n).then(Jt).catch(Jt)}invalidateQueries(e,t={}){return St.batch(()=>(R(this,lt).findAll(e).forEach(r=>{r.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const r={...t,cancelRefetch:t.cancelRefetch??!0},n=St.batch(()=>R(this,lt).findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let o=i.fetch(void 0,r);return r.throwOnError||(o=o.catch(Jt)),i.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(n).then(Jt)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=R(this,lt).build(this,t);return r.isStaleByTime(Ro(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Jt).catch(Jt)}fetchInfiniteQuery(e){return e.behavior=uE(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Jt).catch(Jt)}ensureInfiniteQueryData(e){return e.behavior=uE(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return ap.isOnline()?R(this,uo).resumePausedMutations():Promise.resolve()}getQueryCache(){return R(this,lt)}getMutationCache(){return R(this,uo)}getDefaultOptions(){return R(this,fo)}setDefaultOptions(e){ee(this,fo,e)}setQueryDefaults(e,t){R(this,gl).set(qa(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...R(this,gl).values()],r={};return t.forEach(n=>{Uu(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){R(this,yl).set(qa(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...R(this,yl).values()],r={};return t.forEach(n=>{Uu(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...R(this,fo).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=qx(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Vx&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...R(this,fo).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){R(this,lt).clear(),R(this,uo).clear()}},lt=new WeakMap,uo=new WeakMap,fo=new WeakMap,gl=new WeakMap,yl=new WeakMap,ho=new WeakMap,bl=new WeakMap,wl=new WeakMap,MC),ar,Oe,Bd,Xt,ka,xl,po,mo,Fd,Sl,_l,Na,Ra,vo,El,$e,tu,N0,R0,$0,M0,I0,D0,L0,lN,IC,g3=(IC=class extends lc{constructor(t,r){super();ce(this,$e);ce(this,ar);ce(this,Oe);ce(this,Bd);ce(this,Xt);ce(this,ka);ce(this,xl);ce(this,po);ce(this,mo);ce(this,Fd);ce(this,Sl);ce(this,_l);ce(this,Na);ce(this,Ra);ce(this,vo);ce(this,El,new Set);this.options=r,ee(this,ar,t),ee(this,mo,null),ee(this,po,k0()),this.options.experimental_prefetchInRender||R(this,po).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&&(R(this,Oe).addObserver(this),fE(R(this,Oe),this.options)?be(this,$e,tu).call(this):this.updateResult(),be(this,$e,M0).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return B0(R(this,Oe),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return B0(R(this,Oe),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,be(this,$e,I0).call(this),be(this,$e,D0).call(this),R(this,Oe).removeObserver(this)}setOptions(t){const r=this.options,n=R(this,Oe);if(this.options=R(this,ar).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Fr(this.options.enabled,R(this,Oe))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");be(this,$e,L0).call(this),R(this,Oe).setOptions(this.options),r._defaulted&&!op(this.options,r)&&R(this,ar).getQueryCache().notify({type:"observerOptionsUpdated",query:R(this,Oe),observer:this});const i=this.hasListeners();i&&hE(R(this,Oe),n,this.options,r)&&be(this,$e,tu).call(this),this.updateResult(),i&&(R(this,Oe)!==n||Fr(this.options.enabled,R(this,Oe))!==Fr(r.enabled,R(this,Oe))||Ro(this.options.staleTime,R(this,Oe))!==Ro(r.staleTime,R(this,Oe)))&&be(this,$e,N0).call(this);const o=be(this,$e,R0).call(this);i&&(R(this,Oe)!==n||Fr(this.options.enabled,R(this,Oe))!==Fr(r.enabled,R(this,Oe))||o!==R(this,vo))&&be(this,$e,$0).call(this,o)}getOptimisticResult(t){const r=R(this,ar).getQueryCache().build(R(this,ar),t),n=this.createResult(r,t);return b3(this,n)&&(ee(this,Xt,n),ee(this,xl,this.options),ee(this,ka,R(this,Oe).state)),n}getCurrentResult(){return R(this,Xt)}trackResult(t,r){return new Proxy(t,{get:(n,i)=>(this.trackProp(i),r==null||r(i),Reflect.get(n,i))})}trackProp(t){R(this,El).add(t)}getCurrentQuery(){return R(this,Oe)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=R(this,ar).defaultQueryOptions(t),n=R(this,ar).getQueryCache().build(R(this,ar),r);return n.fetch().then(()=>this.createResult(n,r))}fetch(t){return be(this,$e,tu).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),R(this,Xt)))}createResult(t,r){var T;const n=R(this,Oe),i=this.options,o=R(this,Xt),a=R(this,ka),s=R(this,xl),c=t!==n?t.state:R(this,Bd),{state:u}=t;let d={...u},f=!1,h;if(r._optimisticResults){const j=this.hasListeners(),C=!j&&fE(t,r),k=j&&hE(t,n,r,i);(C||k)&&(d={...d,...aN(u.data,t.options)}),r._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:v,errorUpdatedAt:m,status:y}=d;h=d.data;let w=!1;if(r.placeholderData!==void 0&&h===void 0&&y==="pending"){let j;o!=null&&o.isPlaceholderData&&r.placeholderData===(s==null?void 0:s.placeholderData)?(j=o.data,w=!0):j=typeof r.placeholderData=="function"?r.placeholderData((T=R(this,_l))==null?void 0:T.state.data,R(this,_l)):r.placeholderData,j!==void 0&&(y="success",h=j0(o==null?void 0:o.data,j,r),f=!0)}if(r.select&&h!==void 0&&!w)if(o&&h===(a==null?void 0:a.data)&&r.select===R(this,Fd))h=R(this,Sl);else try{ee(this,Fd,r.select),h=r.select(h),h=j0(o==null?void 0:o.data,h,r),ee(this,Sl,h),ee(this,mo,null)}catch(j){ee(this,mo,j)}R(this,mo)&&(v=R(this,mo),h=R(this,Sl),m=Date.now(),y="error");const b=d.fetchStatus==="fetching",g=y==="pending",_=y==="error",S=g&&b,E=h!==void 0,P={status:y,fetchStatus:d.fetchStatus,isPending:g,isSuccess:y==="success",isError:_,isInitialLoading:S,isLoading:S,data:h,dataUpdatedAt:d.dataUpdatedAt,error:v,errorUpdatedAt:m,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:d.dataUpdateCount>0||d.errorUpdateCount>0,isFetchedAfterMount:d.dataUpdateCount>c.dataUpdateCount||d.errorUpdateCount>c.errorUpdateCount,isFetching:b,isRefetching:b&&!g,isLoadingError:_&&!E,isPaused:d.fetchStatus==="paused",isPlaceholderData:f,isRefetchError:_&&E,isStale:Gx(t,r),refetch:this.refetch,promise:R(this,po),isEnabled:Fr(r.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const j=L=>{P.status==="error"?L.reject(P.error):P.data!==void 0&&L.resolve(P.data)},C=()=>{const L=ee(this,po,P.promise=k0());j(L)},k=R(this,po);switch(k.status){case"pending":t.queryHash===n.queryHash&&j(k);break;case"fulfilled":(P.status==="error"||P.data!==k.value)&&C();break;case"rejected":(P.status!=="error"||P.error!==k.reason)&&C();break}}return P}updateResult(){const t=R(this,Xt),r=this.createResult(R(this,Oe),this.options);if(ee(this,ka,R(this,Oe).state),ee(this,xl,this.options),R(this,ka).data!==void 0&&ee(this,_l,R(this,Oe)),op(r,t))return;ee(this,Xt,r);const n=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,o=typeof i=="function"?i():i;if(o==="all"||!o&&!R(this,El).size)return!0;const a=new Set(o??R(this,El));return this.options.throwOnError&&a.add("error"),Object.keys(R(this,Xt)).some(s=>{const l=s;return R(this,Xt)[l]!==t[l]&&a.has(l)})};be(this,$e,lN).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&be(this,$e,M0).call(this)}},ar=new WeakMap,Oe=new WeakMap,Bd=new WeakMap,Xt=new WeakMap,ka=new WeakMap,xl=new WeakMap,po=new WeakMap,mo=new WeakMap,Fd=new WeakMap,Sl=new WeakMap,_l=new WeakMap,Na=new WeakMap,Ra=new WeakMap,vo=new WeakMap,El=new WeakMap,$e=new WeakSet,tu=function(t){be(this,$e,L0).call(this);let r=R(this,Oe).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(Jt)),r},N0=function(){be(this,$e,I0).call(this);const t=Ro(this.options.staleTime,R(this,Oe));if(Ha||R(this,Xt).isStale||!A0(t))return;const n=Jk(R(this,Xt).dataUpdatedAt,t)+1;ee(this,Na,setTimeout(()=>{R(this,Xt).isStale||this.updateResult()},n))},R0=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(R(this,Oe)):this.options.refetchInterval)??!1},$0=function(t){be(this,$e,D0).call(this),ee(this,vo,t),!(Ha||Fr(this.options.enabled,R(this,Oe))===!1||!A0(R(this,vo))||R(this,vo)===0)&&ee(this,Ra,setInterval(()=>{(this.options.refetchIntervalInBackground||Kx.isFocused())&&be(this,$e,tu).call(this)},R(this,vo)))},M0=function(){be(this,$e,N0).call(this),be(this,$e,$0).call(this,be(this,$e,R0).call(this))},I0=function(){R(this,Na)&&(clearTimeout(R(this,Na)),ee(this,Na,void 0))},D0=function(){R(this,Ra)&&(clearInterval(R(this,Ra)),ee(this,Ra,void 0))},L0=function(){const t=R(this,ar).getQueryCache().build(R(this,ar),this.options);if(t===R(this,Oe))return;const r=R(this,Oe);ee(this,Oe,t),ee(this,Bd,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},lN=function(t){St.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r(R(this,Xt))}),R(this,ar).getQueryCache().notify({query:R(this,Oe),type:"observerResultsUpdated"})})},IC);function y3(e,t){return Fr(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function fE(e,t){return y3(e,t)||e.state.data!==void 0&&B0(e,t,t.refetchOnMount)}function B0(e,t,r){if(Fr(t.enabled,e)!==!1&&Ro(t.staleTime,e)!=="static"){const n=typeof r=="function"?r(e):r;return n==="always"||n!==!1&&Gx(e,t)}return!1}function hE(e,t,r,n){return(e!==t||Fr(n.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&Gx(e,r)}function Gx(e,t){return Fr(t.enabled,e)!==!1&&e.isStaleByTime(Ro(t.staleTime,e))}function b3(e,t){return!op(e.getCurrentResult(),t)}var go,yo,sr,fi,Ti,Th,F0,DC,w3=(DC=class extends lc{constructor(r,n){super();ce(this,Ti);ce(this,go);ce(this,yo);ce(this,sr);ce(this,fi);ee(this,go,r),this.setOptions(n),this.bindMethods(),be(this,Ti,Th).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=R(this,go).defaultMutationOptions(r),op(this.options,n)||R(this,go).getMutationCache().notify({type:"observerOptionsUpdated",mutation:R(this,sr),observer:this}),n!=null&&n.mutationKey&&this.options.mutationKey&&qa(n.mutationKey)!==qa(this.options.mutationKey)?this.reset():((i=R(this,sr))==null?void 0:i.state.status)==="pending"&&R(this,sr).setOptions(this.options)}onUnsubscribe(){var r;this.hasListeners()||(r=R(this,sr))==null||r.removeObserver(this)}onMutationUpdate(r){be(this,Ti,Th).call(this),be(this,Ti,F0).call(this,r)}getCurrentResult(){return R(this,yo)}reset(){var r;(r=R(this,sr))==null||r.removeObserver(this),ee(this,sr,void 0),be(this,Ti,Th).call(this),be(this,Ti,F0).call(this)}mutate(r,n){var i;return ee(this,fi,n),(i=R(this,sr))==null||i.removeObserver(this),ee(this,sr,R(this,go).getMutationCache().build(R(this,go),this.options)),R(this,sr).addObserver(this),R(this,sr).execute(r)}},go=new WeakMap,yo=new WeakMap,sr=new WeakMap,fi=new WeakMap,Ti=new WeakSet,Th=function(){var n;const r=((n=R(this,sr))==null?void 0:n.state)??sN();ee(this,yo,{...r,isPending:r.status==="pending",isSuccess:r.status==="success",isError:r.status==="error",isIdle:r.status==="idle",mutate:this.mutate,reset:this.reset})},F0=function(r){St.batch(()=>{var n,i,o,a,s,l,c,u;if(R(this,fi)&&this.hasListeners()){const d=R(this,yo).variables,f=R(this,yo).context;(r==null?void 0:r.type)==="success"?((i=(n=R(this,fi)).onSuccess)==null||i.call(n,r.data,d,f),(a=(o=R(this,fi)).onSettled)==null||a.call(o,r.data,null,d,f)):(r==null?void 0:r.type)==="error"&&((l=(s=R(this,fi)).onError)==null||l.call(s,r.error,d,f),(u=(c=R(this,fi)).onSettled)==null||u.call(c,void 0,r.error,d,f))}
40this.listeners.forEach(d=>{d(R(this,yo))})})},DC),cN=x.createContext(void 0),Vd=e=>{const t=x.useContext(cN);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},x3=({client:e,children:t})=>(x.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),p.jsx(cN.Provider,{value:e,children:t})),uN=x.createContext(!1),S3=()=>x.useContext(uN);uN.Provider;function _3(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var E3=x.createContext(_3()),O3=()=>x.useContext(E3),P3=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},T3=e=>{x.useEffect(()=>{e.clearReset()},[e])},A3=({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(i&&e.data===void 0||tN(r,[e.error,n])),C3=e=>{if(e.suspense){const t=n=>n==="static"?n:Math.max(n??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...n)=>t(r(...n)):t(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},j3=(e,t)=>e.isLoading&&e.isFetching&&!t,k3=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,pE=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function N3(e,t,r){var d,f,h,v,m;const n=S3(),i=O3(),o=Vd(),a=o.defaultQueryOptions(e);(f=(d=o.getDefaultOptions().queries)==null?void 0:d._experimental_beforeQuery)==null||f.call(d,a),a._optimisticResults=n?"isRestoring":"optimistic",C3(a),P3(a,i),T3(i);const s=!o.getQueryCache().get(a.queryHash),[l]=x.useState(()=>new t(o,a)),c=l.getOptimisticResult(a),u=!n&&e.subscribed!==!1;if(x.useSyncExternalStore(x.useCallback(y=>{const w=u?l.subscribe(St.batchCalls(y)):Jt;return l.updateResult(),w},[l,u]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),x.useEffect(()=>{l.setOptions(a)},[a,l]),k3(a,c))throw pE(a,l,i);if(A3({result:c,errorResetBoundary:i,throwOnError:a.throwOnError,query:o.getQueryCache().get(a.queryHash),suspense:a.suspense}))throw c.error;if((v=(h=o.getDefaultOptions().queries)==null?void 0:h._experimental_afterQuery)==null||v.call(h,a,c),a.experimental_prefetchInRender&&!Ha&&j3(c,n)){const y=s?pE(a,l,i):(m=o.getQueryCache().get(a.queryHash))==null?void 0:m.promise;y==null||y.catch(Jt).finally(()=>{l.updateResult()})}return a.notifyOnChangeProps?c:l.trackResult(c)}function We(e,t){return N3(e,g3)}function Ia(e,t){const r=Vd(),[n]=x.useState(()=>new w3(r,e));x.useEffect(()=>{n.setOptions(e)},[n,e]);const i=x.useSyncExternalStore(x.useCallback(a=>n.subscribe(St.batchCalls(a)),[n]),()=>n.getCurrentResult(),()=>n.getCurrentResult()),o=x.useCallback((a,s)=>{n.mutate(a,s).catch(Jt)},[n]);if(i.error&&tN(n.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:o,mutateAsync:i.mutate}}/**
41 * @remix-run/router v1.23.0
42 *
43 * Copyright (c) Remix Software Inc.
44 *
45 * This source code is licensed under the MIT license found in the
46 * LICENSE.md file in the root directory of this source tree.
47 *
48 * @license MIT
49 */function zu(){return zu=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},zu.apply(this,arguments)}var xo;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(xo||(xo={}));const mE="popstate";function R3(e){e===void 0&&(e={});function t(n,i){let{pathname:o,search:a,hash:s}=n.location;return U0("",{pathname:o,search:a,hash:s},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function r(n,i){return typeof i=="string"?i:sp(i)}return M3(t,r,null,e)}function ft(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function dN(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function $3(){return Math.random().toString(36).substr(2,8)}function vE(e,t){return{usr:e.state,key:e.key,idx:t}}function U0(e,t,r,n){return r===void 0&&(r=null),zu({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?cc(t):t,{state:r,key:t&&t.key||n||$3()})}function sp(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 cc(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 M3(e,t,r,n){n===void 0&&(n={});let{window:i=document.defaultView,v5Compat:o=!1}=n,a=i.history,s=xo.Pop,l=null,c=u();c==null&&(c=0,a.replaceState(zu({},a.state,{idx:c}),""));function u(){return(a.state||{idx:null}).idx}function d(){s=xo.Pop;let y=u(),w=y==null?null:y-c;c=y,l&&l({action:s,location:m.location,delta:w})}function f(y,w){s=xo.Push;let b=U0(m.location,y,w);c=u()+1;let g=vE(b,c),_=m.createHref(b);try{a.pushState(g,"",_)}catch(S){if(S instanceof DOMException&&S.name==="DataCloneError")throw S;i.location.assign(_)}o&&l&&l({action:s,location:m.location,delta:1})}function h(y,w){s=xo.Replace;let b=U0(m.location,y,w);c=u();let g=vE(b,c),_=m.createHref(b);a.replaceState(g,"",_),o&&l&&l({action:s,location:m.location,delta:0})}function v(y){let w=i.location.origin!=="null"?i.location.origin:i.location.href,b=typeof y=="string"?y:sp(y);return b=b.replace(/ $/,"%20"),ft(w,"No window.location.(origin|href) available to create URL for href: "+b),new URL(b,w)}let m={get action(){return s},get location(){return e(i,a)},listen(y){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(mE,d),l=y,()=>{i.removeEventListener(mE,d),l=null}},createHref(y){return t(i,y)},createURL:v,encodeLocation(y){let w=v(y);return{pathname:w.pathname,search:w.search,hash:w.hash}},push:f,replace:h,go(y){return a.go(y)}};return m}var gE;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(gE||(gE={}));function I3(e,t,r){return r===void 0&&(r="/"),D3(e,t,r,!1)}function D3(e,t,r,n){let i=typeof t=="string"?cc(t):t,o=Nl(i.pathname||"/",r);if(o==null)return null;let a=fN(e);L3(a);let s=null;for(let l=0;s==null&&l<a.length;++l){let c=Y3(o);s=K3(a[l],c,n)}return s}function fN(e,t,r,n){t===void 0&&(t=[]),r===void 0&&(r=[]),n===void 0&&(n="");let i=(o,a,s)=>{let l={relativePath:s===void 0?o.path||"":s,caseSensitive:o.caseSensitive===!0,childrenIndex:a,route:o};l.relativePath.startsWith("/")&&(ft(l.relativePath.startsWith(n),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+n+'" is not val
49id. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(n.length));let c=$o([n,l.relativePath]),u=r.concat(l);o.children&&o.children.length>0&&(ft(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),fN(o.children,t,u,c)),!(o.path==null&&!o.index)&&t.push({path:c,score:q3(c,o.index),routesMeta:u})};return e.forEach((o,a)=>{var s;if(o.path===""||!((s=o.path)!=null&&s.includes("?")))i(o,a);else for(let l of hN(o.path))i(o,a,l)}),t}function hN(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,i=r.endsWith("?"),o=r.replace(/\?$/,"");if(n.length===0)return i?[o,""]:[o];let a=hN(n.join("/")),s=[];return s.push(...a.map(l=>l===""?o:[o,l].join("/"))),i&&s.push(...a),s.map(l=>e.startsWith("/")&&l===""?"/":l)}function L3(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:V3(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const B3=/^:[\w-]+$/,F3=3,U3=2,z3=1,W3=10,H3=-2,yE=e=>e==="*";function q3(e,t){let r=e.split("/"),n=r.length;return r.some(yE)&&(n+=H3),t&&(n+=U3),r.filter(i=>!yE(i)).reduce((i,o)=>i+(B3.test(o)?F3:o===""?z3:W3),n)}function V3(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 K3(e,t,r){let{routesMeta:n}=e,i={},o="/",a=[];for(let s=0;s<n.length;++s){let l=n[s],c=s===n.length-1,u=o==="/"?t:t.slice(o.length)||"/",d=lp({path:l.relativePath,caseSensitive:l.caseSensitive,end:c},u),f=l.route;if(!d&&c&&r&&!n[n.length-1].route.index&&(d=lp({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},u)),!d)return null;
vendor: 11,463 bytes, lines 49-58
49Object.assign(i,d.params),a.push({params:i,pathname:$o([o,d.pathname]),pathnameBase:Z3($o([o,d.pathnameBase])),route:f}),d.pathnameBase!=="/"&&(o=$o([o,d.pathnameBase]))}return a}function lp(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=G3(e.path,e.caseSensitive,e.end),i=t.match(r);if(!i)return null;let o=i[0],a=o.replace(/(.)\/+$/,"$1"),s=i.slice(1);return{params:n.reduce((c,u,d)=>{let{paramName:f,isOptional:h}=u;if(f==="*"){let m=s[d]||"";a=o.slice(0,o.length-m.length).replace(/(.)\/+$/,"$1")}const v=s[d];return h&&!v?c[f]=void 0:c[f]=(v||"").replace(/%2F/g,"/"),c},{}),pathname:o,pathnameBase:a,pattern:e}}function G3(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),dN(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,(a,s,l)=>(n.push({paramName:s,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(n.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),n]}function Y3(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return dN(!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 Nl(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 X3(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:i=""}=typeof e=="string"?cc(e):e;return{pathname:r?r.startsWith("/")?r:Q3(r,t):t,search:e4(n),hash:t4(i)}}function Q3(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 Ug(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 J3(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function pN(e,t){let r=J3(e);return t?r.map((n,i)=>i===r.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function mN(e,t,r,n){n===void 0&&(n=!1);let i;typeof e=="string"?i=cc(e):(i=zu({},e),ft(!i.pathname||!i.pathname.includes("?"),Ug("?","pathname","search",i)),ft(!i.pathname||!i.pathname.includes("#"),Ug("#","pathname","hash",i)),ft(!i.search||!i.search.includes("#"),Ug("#","search","hash",i)));let o=e===""||i.pathname==="",a=o?"/":i.pathname,s;if(a==null)s=r;else{let d=t.length-1;if(!n&&a.startsWith("..")){let f=a.split("/");for(;f[0]==="..";)f.shift(),d-=1;i.pathname=f.join("/")}s=d>=0?t[d]:"/"}let l=X3(i,s),c=a&&a!=="/"&&a.endsWith("/"),u=(o||a===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(c||u)&&(l.pathname+="/"),l}const $o=e=>e.join("/").replace(/\/\/+/g,"/"),Z3=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),e4=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,t4=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function r4(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const vN=["post","put","patch","delete"];new Set(vN);const n4=["get",...vN];new Set(n4);/**
50 * React Router v6.30.1
51 *
52 * Copyright (c) Remix Software Inc.
53 *
54 * This source code is licensed under the MIT license found in the
55 * LICENSE.md file in the root directory of this source tree.
56 *
57 * @license MIT
58 */function Wu(){return Wu=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},Wu.apply(this,arguments)}const Wm=x.createContext(null),gN=x.createContext(null),Yo=x.createContext(null),Hm=x.createContext(null),Xo=x.createContext({outlet:null,matches:[],isDataRoute:!1}),yN=x.createContext(null);function i4(e,t){let{relative:r}=t===void 0?{}:t;Kd()||ft(!1);let{basename:n,navigator:i}=x.useContext(Yo),{hash:o,pathname:a,search:s}=qm(e,{relative:r}),l=a;return n!=="/"&&(l=a==="/"?n:$o([n,a])),i.createHref({pathname:l,search:s,hash:o})}function Kd(){return x.useContext(Hm)!=null}function ls(){return Kd()||ft(!1),x.useContext(Hm).location}function bN(e){x.useContext(Yo).static||x.useLayoutEffect(e)}function o4(){let{isDataRoute:e}=x.useContext(Xo);return e?b4():a4()}function a4(){Kd()||ft(!1);let e=x.useContext(Wm),{basename:t,future:r,navigator:n}=x.useContext(Yo),{matches:i}=x.useContext(Xo),{pathname:o}=ls(),a=JSON.stringify(pN(i,r.v7_relativeSplatPath)),s=x.useRef(!1);return bN(()=>{s.current=!0}),x.useCallback(function(c,u){if(u===void 0&&(u={}),!s.current)return;if(typeof c=="number"){n.go(c);return}let d=mN(c,JSON.parse(a),o,u.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:$o([t,d.pathname])),(u.replace?n.replace:n.push)(d,u.state,u)},[t,n,a,o,e])}function s4(){let{matches:e}=x.useContext(Xo),t=e[e.length-1];return t?t.params:{}}function qm(e,t){let{relative:r}=t===void 0?{}:t,{future:n}=x.useContext(Yo),{matches:i}=x.useContext(Xo),{pathname:o}=ls(),a=JSON.stringify(pN(i,n.v7_relativeSplatPath));return x.useMemo(()=>mN(e,JSON.parse(a),o,r==="path"),[e,a,o,r])}function l4(e,t){return c4(e,t)}function c4(e,t,r,n){Kd()||ft(!1);let{navigator:i}=x.useContext(Yo),{matches:o}=x.useContext(Xo),a=o[o.length-1],s=a?a.params:{};a&&a.pathname;let l=a?a.pathnameBase:"/";a&&a.route;let c=ls(),u;if(t){var d;let y=typeof t=="string"?cc(t):t;l==="/"||(d=y.pathname)!=null&&d.startsWith(l)||ft(!1),u=y}else u=c;let f=u.pathname||"/",h=f;if(l!=="/"){let y=l.replace(/^\//,"").split("/");h="/"+f.replace(/^\//,"").split("/").slice(y.length).join("/")}let v=I3(e,{pathname:h}),m=p4(v&&v.map(y=>Object.assign({},y,{params:Object.assign({},s,y.params),pathname:$o([l,i.encodeLocation?i.encodeLocation(y.pathname).pathname:y.pathname]),pathnameBase:y.pathnameBase==="/"?l:$o([l,i.encodeLocation?i.encodeLocation(y.pathnameBase).pathname:y.pathnameBase])})),o,r,n);return t&&m?x.createElement(Hm.Provider,{value:{location:Wu({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:xo.Pop}},m):m}function u4(){let e=y4(),t=r4(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 x.createElement(x.Fragment,null,x.createElement("h2",null,"Unexpected Application Error!"),x.createElement("h3",{style:{fontStyle:"italic"}},t),r?x.createElement("pre",{style:i},r):null,null)}const d4=x.createElement(u4,null);class f4 extends x.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?x.createElement(Xo.Provider,{value:this.props.routeContext},x.createElement(yN.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function h4(e){let{routeContext:t,match:r,children:n}=e,i=x.useContext(Wm);return i&&i.static&&i.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=r.route.id),x.createElement(Xo.Provider,{value:t},n)}function p4(e,t,r,n){var i;if(t===void 0&&(t=[]),r===void 0&&(r=null),n===void 0&&(n=null),e==null){var o;if(!r)return null;if(r.errors)e=r.matches;else if((o=n)!=null&&o.v7_partialHydration&&t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let a=e,s=(i=r)==null?void 0:i.errors;if(s!=null){let u=a.findIndex(d=>d.route.id&&(s==null?void 0:s[d.route.id])!==void 0);u>=0||ft(!1),a=a.slice(0,Math.min(a.length,u+1))}let l=!1,c=-1;if(r&&n&&n.v7_partialHydration)for(let u=0;u<a.length;u++){let d=a[u];if((d.route.HydrateFallback||d.route.hydrateFallbackElement)&&(c=u),d.route.id){let{loaderData:f,errors:h}=r,v=d.route.loader&&f[d.route.id]===void 0&&(!h||h[d.route.id]===void 0);if(d.route.lazy||v){l=!0,c>=0?a=a.slice(0,c+1):a=[a[0]];break}}}return a.reduceRight((u,d,f)=>{let h,v=!1,m=null,y=null;r&&(h=s&&d.route.id?s[d.route.id]:void 0,m=d.route.errorElement||d4,l&&(c<0&&f===0?(v=!0,y=null):c===f&&(v=!0,y=d.route.hydrateFallbackElement||null)));let w=t.concat(a.slice(0,f+1)),b=()=>{let g;return h?g=m:v?g=y:d.route.Component?g=x.createElement(d.route.Component,null):d.route.element?g=d.route.element:g=u,x.createElement(h4,{match:d,routeContext:{outlet:u,matches:w,isDataRoute:r!=null},children:g})};return r&&(d.route.ErrorBoundary||d.route.errorElement||f===0)?x.createElement(f4,{location:r.location,revalidation:r.revalidation,component:m,error:h,children:b(),routeContext:{outlet:null,matches:w,isDataRoute:!0}}):b()},null)}var wN=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(wN||{}),cp=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}(cp||{});function m4(e){let t=x.useContext(Wm);return t||ft(!1),t}function v4(e){let t=x.useContext(gN);return t||ft(!1),t}function g4(e){let t=x.useContext(Xo);return t||ft(!1),t}function xN(e){let t=g4(),r=t.matches[t.matches.length-1];return r.route.id||ft(!1),r.route.id}function y4(){var e;let t=x.useContext(yN),r=v4(cp.UseRouteError),n=xN(cp.UseRouteError);return t!==void 0?t:(e=r.errors)==null?void 0:e[n]}function b4(){let{router:e}=m4(wN.UseNavigateStable),t=xN(cp.UseNavigateStable),r=x.useRef(!1);return bN(()=>{r.current=!0}),x.useCallback(function(i,o){o===void 0&&(o={}),r.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,Wu({fromRouteId:t},o)))},[e,t])}function w4(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function ai(e){ft(!1)}function x4(e){let{basename:t="/",children:r=null,location:n,navigationType:i=xo.Pop,navigator:o,static:a=!1,future:s}=e;Kd()&&ft(!1);let l=t.replace(/^\/*/,"/"),c=x.useMemo(()=>({basename:l,navigator:o,static:a,future:Wu({v7_relativeSplatPath:!1},s)}),[l,s,o,a]);typeof n=="string"&&(n=cc(n));let{pathname:u="/",search:d="",hash:f="",state:h=null,key:v="default"}=n,m=x.useMemo(()=>{let y=Nl(u,l);return y==null?null:{location:{pathname:y,search:d,hash:f,state:h,key:v},navigationType:i}},[l,u,d,f,h,v,i]);return m==null?null:x.createElement(Yo.Provider,{value:c},x.createElement(Hm.Provider,{children:r,value:m}))}function S4(e){let{children:t,location:r}=e;
58return l4(z0(t),r)}new Promise(()=>{});function z0(e,t){t===void 0&&(t=[]);let r=[];return x.Children.forEach(e,(n,i)=>{if(!x.isValidElement(n))return;let o=[...t,i];if(n.type===x.Fragment){r.push.apply(r,z0(n.props.children,o));return}n.type!==ai&&ft(!1),!n.props.index||!n.props.children||ft(!1);let a={id:n.props.id||o.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,loader:n.props.loader,action:n.props.action,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(a.children=z0(n.props.children,o)),r.push(a)}),r}/**
59 * React Router DOM v6.30.1
60 *
61 * Copyright (c) Remix Software Inc.
62 *
63 * This source code is licensed under the MIT license found in the
64 * LICENSE.md file in the root directory of this source tree.
65 *
66 * @license MIT
67 */function up(){return up=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},up.apply(this,arguments)}function SN(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,o;for(o=0;o<n.length;o++)i=n[o],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}function _4(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function E4(e,t){return e.button===0&&(!t||t==="_self")&&!_4(e)}const O4=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],P4=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],T4="6";try{window.__reactRouterVersion=T4}catch{}const A4=x.createContext({isTransitioning:!1}),C4="startTransition",bE=ex[C4];function j4(e){let{basename:t,children:r,future:n,window:i}=e,o=x.useRef();o.current==null&&(o.current=R3({window:i,v5Compat:!0}));let a=o.current,[s,l]=x.useState({action:a.action,location:a.location}),{v7_startTransition:c}=n||{},u=x.useCallback(d=>{c&&bE?bE(()=>l(d)):l(d)},[l,c]);return x.useLayoutEffect(()=>a.listen(u),[a,u]),x.useEffect(()=>w4(n),[n]),x.createElement(x4,{basename:t,children:r,location:s.location,navigationType:s.action,navigator:a,future:n})}const k4=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",N4=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,dp=x.forwardRef(function(t,r){let{onClick:n,relative:i,reloadDocument:o,replace:a,state:s,target:l,to:c,preventScrollReset:u,viewTransition:d}=t,f=SN(t,O4),{basename:h}=x.useContext(Yo),v,m=!1;if(typeof c=="string"&&N4.test(c)&&(v=c,k4))try{let g=new URL(window.location.href),_=c.startsWith("//")?new URL(g.protocol+c):new URL(c),S=Nl(_.pathname,h);_.origin===g.origin&&S!=null?c=S+_.search+_.hash:m=!0}catch{}let y=i4(c,{relative:i}),w=M4(c,{replace:a,state:s,target:l,preventScrollReset:u,relative:i,viewTransition:d});function b(g){n&&n(g),g.defaultPrevented||w(g)}return x.createElement("a",up({},f,{href:v||y,onClick:m||o?n:b,ref:r,target:l}))}),R4=x.forwardRef(function(t,r){let{"aria-current":n="page",caseSensitive:i=!1,className:o="",end:a=!1,style:s,to:l,viewTransition:c,children:u}=t,d=SN(t,P4),f=qm(l,{relative:d.relative}),h=ls(),v=x.useContext(gN),{navigator:m,basename:y}=x.useContext(Yo),w=v!=null&&I4(f)&&c===!0,b=m.encodeLocation?m.encodeLocation(f).pathname:f.pathname,g=h.pathname,_=v&&v.navigation&&v.navigation.location?v.navigation.location.pathname:null;i||(g=g.toLowerCase(),_=_?_.toLowerCase():null,b=b.toLowerCase()),_&&y&&(_=Nl(_,y)||_);const S=b!=="/"&&b.endsWith("/")?b.length-1:b.length;let E=g===b||!a&&g.startsWith(b)&&g.charAt(S)==="/",O=_!=null&&(_===b||!a&&_.startsWith(b)&&_.charAt(b.length)==="/"),P={isActive:E,isPending:O,isTransitioning:w},T=E?n:void 0,j;typeof o=="function"?j=o(P):j=[o,E?"active":null,O?"pending":null,w?"transitioning":null].filter(Boolean).join(" ");let C=typeof s=="function"?s(P):s;return x.createElement(dp,up({},d,{"aria-current":T,className:j,ref:r,style:C,to:l,viewTransition:c}),typeof u=="function"?u(P):u)});var W0;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(W0||(W0={}));var wE;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(wE||(wE={}));function $4(e){let t=x.useContext(Wm);return t||ft(!1),t}function M4(e,t){let{target:r,replace:n,state:i,preventScrollReset:o,relative:a,viewTransition:s}=t===void 0?{}:t,l=o4(),c=ls(),u=qm(e,{relative:a});return x.useCallback(d=>
67{if(E4(d,r)){d.preventDefault();let f=n!==void 0?n:sp(c)===sp(u);l(e,{replace:f,state:i,preventScrollReset:o,relative:a,viewTransition:s})}},[c,l,u,n,i,r,e,o,a,s])}function I4(e,t){t===void 0&&(t={});let r=x.useContext(A4);r==null&&ft(!1);let{basename:n}=$4(W0.useViewTransitionState),i=qm(e,{relative:t.relative});if(!r.isTransitioning)return!1;let o=Nl(r.currentLocation.pathname,n)||r.currentLocation.pathname,a=Nl(r.nextLocation.pathname,n)||r.nextLocation.pathname;return lp(i.pathname,a)!=null||lp(i.pathname,o)!=null}var xE=["light","dark"],D4="(prefers-color-scheme: dark)",L4=x.createContext(void 0),B4={setTheme:e=>{},themes:[]},F4=()=>{var e;return(e=x.useContext(L4))!=null?e:B4};x.memo(({forcedTheme:e,storageKey:t,attribute:r,enableSystem:n,enableColorScheme:i,defaultTheme:o,value:a,attrs:s,nonce:l})=>{let c=o==="system",u=r==="class"?`var d=document.documentElement,c=d.classList;${`c.remove(${s.map(v=>`'${v}'`).join(",")})`};`:`var d=document.documentElement,n='${r}',s='setAttribute';`,d=i?xE.includes(o)&&o?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${o}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",f=(v,m=!1,y=!0)=>{let w=a?a[v]:v,b=m?v+"|| ''":`'${w}'`,g="";return i&&y&&!m&&xE.includes(v)&&(g+=`d.style.colorScheme = '${v}';`),r==="class"?m||w?g+=`c.add(${b})`:g+="null":w&&(g+=`d[s](n,${b})`),g},h=e?`!function(){${u}${f(e)}}()`:n?`!function(){try{${u}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${c})){var t='${D4}',m=window.matchMedia(t);if(m.media!==t||m.matches){${f("dark")}}else{${f("light")}}}else if(e){${a?`var x=${JSON.stringify(a)};`:""}${f(a?"x[e]":"e",!0)}}${c?"":"else{"+f(o,!1,!1)+"}"}${d}}catch(e){}}()`:`!function(){try{${u}var e=localStorage.getItem('${t}');if(e){${a?`var x=${JSON.stringify(a)};`:""}${f(a?"x[e]":"e",!0)}}else{${f(o,!1,!1)};}${d}}catch(t){}}();`;return x.createElement("script",{nonce:l,dangerouslySetInnerHTML:{__html:h}})});var U4=e=>{switch(e){case"success":return H4;case"info":return V4;case"warning":return q4;case"error":return K4;default:return null}},z4=Array(12).fill(0),W4=({visible:e,className:t})=>A.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},A.createElement("div",{className:"sonner-spinner"},z4.map((r,n)=>A.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${n}`})))),H4=A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},A.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),q4=A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},A.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),V4=A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},A.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),K4=A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},A.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),G4=A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},A.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),A.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),Y4=()=>{let[e,t]=A.useState(document.hidden);return A.useEffect(()=>{let r=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",r),()=>window.removeEventListener("visibilitychange",r)},[]),e},H0=1,X4=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>
vendor: 1,050 bytes, line 67
67{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:r,...n}=e,i=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:H0++,o=this.toasts.find(s=>s.id===i),a=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(i)&&this.dismissedToasts.delete(i),o?this.toasts=this.toasts.map(s=>s.id===i?(this.publish({...s,...e,id:i,title:r}),{...s,...e,id:i,dismissible:a,title:r}):s):this.addToast({title:r,...n,dismissible:a,id:i}),i},this.dismiss=e=>(this.dismissedToasts.add(e),e||this.toasts.forEach(t=>{this.subscribers.forEach(r=>r({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>
67this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let r;t.loading!==void 0&&(r=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let n=e instanceof Promise?e:e(),i=r!==void 0,o,a=n.then(async l=>{if(o=["resolve",l],A.isValidElement(l))i=!1,this.create({id:r,type:"default",message:l});else if(J4(l)&&!l.ok){i=!1;let c=typeof t.error=="function"?await t.error(`HTTP error! status: ${l.status}`):t.error,u=typeof t.description=="function"?await t.description(`HTTP error! status: ${l.status}`):t.description;this.create({id:r,type:"error",message:c,description:u})}else if(t.success!==void 0){i=!1;let c=typeof t.success=="function"?await t.success(l):t.success,u=typeof t.description=="function"?await t.description(l):t.description;this.create({id:r,type:"success",message:c,description:u})}}).catch(async l=>{if(o=["reject",l],t.error!==void 0){i=!1;let c=typeof t.error=="function"?await t.error(l):t.error,u=typeof t.description=="function"?await t.description(l):t.description;this.create({id:r,type:"error",message:c,description:u})}}).finally(()=>{var l;i&&(this.dismiss(r),r=void 0),(l=t.finally)==null||l.call(t)}),s=()=>new Promise((l,c)=>a.then(()=>o[0]==="reject"?c(o[1]):l(o[1])).catch(c));return typeof r!="string"&&typeof r!="number"?{unwrap:s}:Object.assign(r,{unwrap:s})},this.custom=(e,t)=>{let r=(t==null?void 0:t.id)||H0++;return this.create({jsx:e(r),id:r,...t}),r},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},lr=new X4,Q4=(e,t)=>{let r=(t==null?void 0:t.id)||H0++;return lr.addToast({title:e,...t,id:r}),r},J4=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",Z4=Q4,e5=()=>lr.toasts,t5=()=>lr.getActiveToasts(),Ht=Object.assign(Z4,{success:lr.success,info:lr.info,warning:lr.warning,error:lr.error,custom:lr.custom,message:lr.message,promise:lr.promise,dismiss:lr.dismiss,loading:lr.loading},{getHistory:e5,getToasts:t5});function r5(e,{insertAt:t}={}){if(typeof document>"u")return;let r=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t==="top"&&r.firstChild?r.insertBefore(n,r.firstChild):r.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}r5(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;
67left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}
67:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);
67--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}
68`);function Lf(e){return e.label!==void 0}var n5=3,i5="32px",o5="16px",SE=4e3,a5=356,s5=14,l5=20,c5=200;function dn(...e){return e.filter(Boolean).join(" ")}function u5(e){let[t,r]=e.split("-"),n=[];return t&&n.push(t),r&&n.push(r),n}var d5=e=>{var t,r,n,i,o,a,s,l,c,u,d;let{invert:f,toast:h,unstyled:v,interacting:m,setHeights:y,visibleToasts:w,heights:b,index:g,toasts:_,expanded:S,removeToast:E,defaultRichColors:O,closeButton:P,style:T,cancelButtonStyle:j,actionButtonStyle:C,className:k="",descriptionClassName:L="",duration:M,position:N,gap:D,loadingIcon:B,expandByDefault:$,classNames:I,icons:U,closeButtonAriaLabel:H="Close toast",pauseWhenPageIsHidden:z}=e,[K,te]=A.useState(null),[fe,Ee]=A.useState(null),[Y,pe]=A.useState(!1),[q,Q]=A.useState(!1),[X,F]=A.useState(!1),[we,he]=A.useState(!1),[ze,Le]=A.useState(!1),[st,ir]=A.useState(0),[gr,ia]=A.useState(0),yr=A.useRef(h.duration||M||SE),$n=A.useRef(null),an=A.useRef(null),mf=g===0,vf=g+1<=w,Mr=h.type,ps=h.dism
68issible!==!1,SB=h.className||"",_B=h.descriptionClassName||"",gf=A.useMemo(()=>b.findIndex(me=>me.toastId===h.id)||0,[b,h.id]),EB=A.useMemo(()=>{var me;return(me=h.closeButton)!=null?me:P},[h.closeButton,P]),VS=A.useMemo(()=>h.duration||M||SE,[h.duration,M]),dg=A.useRef(0),ms=A.useRef(0),KS=A.useRef(0),vs=A.useRef(null),[OB,PB]=N.split("-"),GS=A.useMemo(()=>b.reduce((me,Be,et)=>et>=gf?me:me+Be.height,0),[b,gf]),YS=Y4(),TB=h.invert||f,fg=Mr==="loading";ms.current=A.useMemo(()=>gf*D+GS,[gf,GS]),A.useEffect(()=>{yr.current=VS},[VS]),A.useEffect(()=>{pe(!0)},[]),A.useEffect(()=>{let me=an.current;if(me){let Be=me.getBoundingClientRect().height;return ia(Be),y(et=>[{toastId:h.id,height:Be,position:h.position},...et]),()=>y(et=>et.filter(sn=>sn.toastId!==h.id))}},[y,h.id]),A.useLayoutEffect(()=>{if(!Y)return;let me=an.current,Be=me.style.height;me.style.height="auto";let et=me.getBoundingClientRect().height;me.style.height=Be,ia(et),y(sn=>sn.find(ln=>ln.toastId===h.id)?sn.map(ln=>ln.toastId===h.id?{...ln,height:et}:ln):[{toastId:h.id,height:et,position:h.position},...sn])},[Y,h.title,h.description,y,h.id]);let qi=A.useCallback(()=>{Q(!0),ir(ms.current),y(me=>me.filter(Be=>Be.toastId!==h.id)),setTimeout(()=>{E(h)},c5)},[h,E,y,ms]);A.useEffect(()=>{if(h.promise&&Mr==="loading"||h.duration===1/0||h.type==="loading")return;let me;return S||m||z&&YS?(()=>{if(KS.current<dg.current){let Be=new Date().getTime()-dg.current;yr.current=yr.current-Be}KS.current=new Date().getTime()})():yr.current!==1/0&&(dg.current=new Date().getTime(),me=setTimeout(()=>{var Be;(Be=h.onAutoClose)==null||Be.call(h,h),qi()},yr.current)),()=>clearTimeout(me)},[S,m,h,Mr,z,YS,qi]),A.useEffect(()=>{h.delete&&qi()},[qi,h.delete]);function AB(){var me,Be,et;return U!=null&&U.loading?A.createElement("div",{className:dn(I==null?void 0:I.loader,(me=h==null?void 0:h.classNames)==null?void 0:me.loader,"sonner-loader"),"data-visible":Mr==="loading"},U.loading):B?A.createElement("div",{className:dn(I==null?void 0:I.loader,(Be=h==null?void 0:h.classNames)==null?void 0:Be.loader,"sonner-loader"),"data-visible":Mr==="loading"},B):A.createElement(W4,{className:dn(I==null?void 0:I.loader,(et=h==null?void 0:h.classNames)==null?void 0:et.loader),visible:Mr==="loading"})}return A.createElement("li",{tabIndex:0,ref:an,className:dn(k,SB,I==null?void 0:I.toast,(t=h==null?void 0:h.classNames)==null?void 0:t.toast,I==null?void 0:I.default,I==null?void 0:I[Mr],(r=h==null?void 0:h.classNames)==null?void 0:r[Mr]),"data-sonner-toast":"","data-rich-colors":(n=h.richColors)!=null?n:O,"data-styled":!(h.jsx||h.unstyled||v),"data-mounted":Y,"data-promise":!!h.promise,"data-swiped":ze,"data-removed":q,"data-visible":vf,"data-y-position":OB,"data-x-position":PB,"data-index":g,"data-front":mf,"data-swiping":X,"data-dismissible":ps,"data-type":Mr,"data-invert":TB,"data-swipe-out":we,"data-swipe-direction":fe,"data-expanded":!!(S||$&&Y),style:{"--index":g,"--toasts-before":g,"--z-index":_.length-g,"--offset":`${q?st:ms.current}px`,"--initial-height":$?"auto":`${gr}px`,...T,...h.style},onDragEnd:()=>{F(!1),te(null),vs.current=null},onPointerDown:me=>{fg||!ps||($n.current=new Date,ir(ms.current),me.target.setPointerCapture(me.pointerId),me.target.tagName!=="BUTTON"&&(F(!0),vs.current={x:me.clientX,y:me.clientY}))},onPointerUp:()=>{var me,Be,et,sn;if(we||!ps)return;vs.current=null;let ln=Number(((me=an.current)==null?void 0:me.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Vi=Number(((Be=an.current)==null?void 0:Be.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),oa=new Date().getTime()-((et=$n.current)==null?void 0:et.getTime()),cn=K==="x"?ln:Vi,Ki=Math.abs(cn)/oa;if(Math.abs(cn)>=l5||Ki>.11){ir(ms.current),(sn=h.onDismiss)==null||sn.call(h,h),Ee(K==="x"?ln>0?"right":"left":Vi>0?"down":"up"),qi(),he(!0),Le(!1);return}F(!1),te(null)},onPointerMove:me=>{var Be,et,sn,ln;if(!vs.current||!ps||((Be=window.getSelection())==null?void 0:Be.toString().length)>0)return;let Vi=me.clientY-vs.current.y,oa=me.clientX-vs.current.x,cn=(et=e.swipeDirections)!=null?et:u5(N);!K&&(Math.abs(oa)>1||Math.abs(Vi)>1)&&te(Math.abs(oa)>Math.abs(Vi)?"x":"y");let Ki={x:0,y:0};
vendor: 6,333 bytes, line 68
68K==="y"?(cn.includes("top")||cn.includes("bottom"))&&(cn.includes("top")&&Vi<0||cn.includes("bottom")&&Vi>0)&&(Ki.y=Vi):K==="x"&&(cn.includes("left")||cn.includes("right"))&&(cn.includes("left")&&oa<0||cn.includes("right")&&oa>0)&&(Ki.x=oa),(Math.abs(Ki.x)>0||Math.abs(Ki.y)>0)&&Le(!0),(sn=an.current)==null||sn.style.setProperty("--swipe-amount-x",`${Ki.x}px`),(ln=an.current)==null||ln.style.setProperty("--swipe-amount-y",`${Ki.y}px`)}},EB&&!h.jsx?A.createElement("button",{"aria-label":H,"data-disabled":fg,"data-close-button":!0,onClick:fg||!ps?()=>{}:()=>{var me;qi(),(me=h.onDismiss)==null||me.call(h,h)},className:dn(I==null?void 0:I.closeButton,(i=h==null?void 0:h.classNames)==null?void 0:i.closeButton)},(o=U==null?void 0:U.close)!=null?o:G4):null,h.jsx||x.isValidElement(h.title)?h.jsx?h.jsx:typeof h.title=="function"?h.title():h.title:A.createElement(A.Fragment,null,Mr||h.icon||h.promise?A.createElement("div",{"data-icon":"",className:dn(I==null?void 0:I.icon,(a=h==null?void 0:h.classNames)==null?void 0:a.icon)},h.promise||h.type==="loading"&&!h.icon?h.icon||AB():null,h.type!=="loading"?h.icon||(U==null?void 0:U[Mr])||U4(Mr):null):null,A.createElement("div",{"data-content":"",className:dn(I==null?void 0:I.content,(s=h==null?void 0:h.classNames)==null?void 0:s.content)},A.createElement("div",{"data-title":"",className:dn(I==null?void 0:I.title,(l=h==null?void 0:h.classNames)==null?void 0:l.title)},typeof h.title=="function"?h.title():h.title),h.description?A.createElement("div",{"data-description":"",className:dn(L,_B,I==null?void 0:I.description,(c=h==null?void 0:h.classNames)==null?void 0:c.description)},typeof h.description=="function"?h.description():h.description):null),x.isValidElement(h.cancel)?h.cancel:h.cancel&&Lf(h.cancel)?A.createElement("button",{"data-button":!0,"data-cancel":!0,style:h.cancelButtonStyle||j,onClick:me=>{var Be,et;Lf(h.cancel)&&ps&&((et=(Be=h.cancel).onClick)==null||et.call(Be,me),qi())},className:dn(I==null?void 0:I.cancelButton,(u=h==null?void 0:h.classNames)==null?void 0:u.cancelButton)},h.cancel.label):null,x.isValidElement(h.action)?h.action:h.action&&Lf(h.action)?A.createElement("button",{"data-button":!0,"data-action":!0,style:h.actionButtonStyle||C,onClick:me=>{var Be,et;Lf(h.action)&&((et=(Be=h.action).onClick)==null||et.call(Be,me),!me.defaultPrevented&&qi())},className:dn(I==null?void 0:I.actionButton,(d=h==null?void 0:h.classNames)==null?void 0:d.actionButton)},h.action.label):null))};function _E(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function f5(e,t){let r={};return[e,t].forEach((n,i)=>{let o=i===1,a=o?"--mobile-offset":"--offset",s=o?o5:i5;function l(c){["top","right","bottom","left"].forEach(u=>{r[`${a}-${u}`]=typeof c=="number"?`${c}px`:c})}typeof n=="number"||typeof n=="string"?l(n):typeof n=="object"?["top","right","bottom","left"].forEach(c=>{n[c]===void 0?r[`${a}-${c}`]=s:r[`${a}-${c}`]=typeof n[c]=="number"?`${n[c]}px`:n[c]}):l(s)}),r}var h5=x.forwardRef(function(e,t){let{invert:r,position:n="bottom-right",hotkey:i=["altKey","KeyT"],expand:o,closeButton:a,className:s,offset:l,mobileOffset:c,theme:u="light",richColors:d,duration:f,style:h,visibleToasts:v=n5,toastOptions:m,dir:y=_E(),gap:w=s5,loadingIcon:b,icons:g,containerAriaLabel:_="Notifications",pauseWhenPageIsHidden:S}=e,[E,O]=A.useState([]),P=A.useMemo(()=>Array.from(new Set([n].concat(E.filter(z=>z.position).map(z=>z.position)))),[E,n]),[T,j]=A.useState([]),[C,k]=A.useState(!1),[L,M]=A.useState(!1),[N,D]=A.useState(u!=="system"?u:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),B=A.useRef(null),$=i.join("+").replace(/Key/g,"").replace(/Digit/g,""),I=A.useRef(null),U=A.useRef(!1),H=A.useCallback(z=>{O(K=>{var te;return(te=K.find(fe=>fe.id===z.id))!=null&&te.delete||lr.dismiss(z.id),K.filter(({id:fe})=>fe!==z.id)})},[]);return A.useEffect(()=>lr.subscribe(z=>{if(z.dismiss){O(K=>K.map(te=>te.id===z.id?{...te,delete:!0}:te));return}setTimeout(()=>{Xk.flushSync(()=>{O(K=>{let te=K.findIndex(fe=>fe.id===z.id);return te!==-1?[...K.slice(0,te),{...K[te],...z},...K.slice(te+1)]:[z,...K]})})})}),[]),A.useEffect(()=>{if(u!=="system"){D(u);return}if(u==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?D("dark"):D("light")),typeof window>"u")return;let z=window.matchMedia("(prefers-color-scheme: dark)");try{z.addEventListener("change",({matches:K})=>{D(K?"dark":"light")})}catch{z.addListener(({matches:te})=>{try{D(te?"dark":"light")}catch(fe){console.error(fe)}})}},[u]),A.useEffect(()=>{E.length<=1&&k(!1)},[E]),A.useEffect(()=>{let z=K=>{var te,fe;i.every(Ee=>K[Ee]||K.code===Ee)&&(k(!0),(te=B.current)==null||te.focus()),K.code==="Escape"&&(document.activeElement===B.current||(fe=B.current)!=null&&fe.contains(document.activeElement))&&k(!1)};return document.addEventListener("keydown",z),()=>document.removeEventListener("keydown",z)},[i]),A.useEffect(()=>{if(B.current)return()=>{I.current&&(I.current.focus({preventScroll:!0}),I.current=null,U.current=!1)}},[B.current]),A.createElement("section",{ref:t,"aria-label":`${_} ${$}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},P.map((z,K)=>{var te;let[fe,Ee]=z.split("-");return E.length?A.createElement("ol",{key:z,dir:y==="auto"?_E():y,tabIndex:-1,ref:B,className:s,"data-sonner-toaster":!0,"data-theme":N,"data-y-position":fe,"data-lifted":C&&E.length>1&&!o,"data-x-position":Ee,style:{"--front-toast-height":`${((te=T[0])==null?void 0:te.height)||0}px`,"--width":`${a5}px`,"--gap":`${w}px`,...h,...f5(l,c)},onBlur:Y=>{U.current&&!Y.currentTarget.contains(Y.relatedTarget)&&(U.current=!1,I.current&&(I.current.focus({preventScroll:!0}),I.current=null))},onFocus:Y=>{Y.target instanceof HTMLElement&&Y.target.dataset.dismissible==="false"||U.current||(U.current=!0,I.current=Y.relatedTarget)},onMouseEnter:()=>k(!0),onMouseMove:()=>k(!0),onMouseLeave:()=>{L||k(!1)},onDragEnd:()=>k(!1),onPointerDown:Y=>{Y.target instanceof HTMLElement&&Y.target.dataset.dismissible==="false"||M(!0)},onPointerUp:()=>M(!1)},E.filter(Y=>!Y.position&&K===0||Y.position===z).map((Y,pe)=>{var q,Q;
68return A.createElement(d5,{key:Y.id,icons:g,index:pe,toast:Y,defaultRichColors:d,duration:(q=m==null?void 0:m.duration)!=null?q:f,className:m==null?void 0:m.className,descriptionClassName:m==null?void 0:m.descriptionClassName,invert:r,visibleToasts:v,closeButton:(Q=m==null?void 0:m.closeButton)!=null?Q:a,interacting:L,position:z,style:m==null?void 0:m.style,unstyled:m==null?void 0:m.unstyled,classNames:m==null?void 0:m.classNames,cancelButtonStyle:m==null?void 0:m.cancelButtonStyle,actionButtonStyle:m==null?void 0:m.actionButtonStyle,removeToast:H,toasts:E.filter(X=>X.position==Y.position),heights:T.filter(X=>X.position==Y.position),setHeights:j,expandByDefault:o,gap:w,loadingIcon:b,expanded:C,pauseWhenPageIsHidden:S,swipeDirections:e.swipeDirections})})):null}))});const p5=({...e})=>{const{theme:t="system"}=F4();return p.jsx(h5,{theme:t,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...e})},m5=1,v5=1e6;let zg=0;function g5(){return zg=(zg+1)%Number.MAX_SAFE_INTEGER,zg.toString()}const Wg=new Map,EE=e=>{if(Wg.has(e))return;const t=setTimeout(()=>{Wg.delete(e),mu({type:"REMOVE_TOAST",toastId:e})},v5);Wg.set(e,t)},y5=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,m5)};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?EE(r):e.toasts.forEach(n=>{EE(n.id)}),{...e,toasts:e.toasts.map(n=>
vendor: 14,230 bytes, line 68
68n.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)}}},Ah=[];let Ch={toasts:[]};function mu(e){Ch=y5(Ch,e),Ah.forEach(t=>{t(Ch)})}function b5({...e}){const t=g5(),r=i=>mu({type:"UPDATE_TOAST",toast:{...i,id:t}}),n=()=>mu({type:"DISMISS_TOAST",toastId:t});return mu({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:i=>{i||n()}}}),{id:t,dismiss:n,update:r}}function w5(){const[e,t]=x.useState(Ch);return x.useEffect(()=>(Ah.push(t),()=>{const r=Ah.indexOf(t);r>-1&&Ah.splice(r,1)}),[e]),{...e,toast:b5,dismiss:r=>mu({type:"DISMISS_TOAST",toastId:r})}}function ie(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 OE(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function _N(...e){return t=>{let r=!1;const n=e.map(i=>{const o=OE(i,t);return!r&&typeof o=="function"&&(r=!0),o});if(r)return()=>{for(let i=0;i<n.length;i++){const o=n[i];typeof o=="function"?o():OE(e[i],null)}}}}function ye(...e){return x.useCallback(_N(...e),e)}function x5(e,t){const r=x.createContext(t),n=o=>{const{children:a,...s}=o,l=x.useMemo(()=>s,Object.values(s));return p.jsx(r.Provider,{value:l,children:a})};n.displayName=e+"Provider";function i(o){const a=x.useContext(r);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${o}\` must be used within \`${e}\``)}return[n,i]}function $r(e,t=[]){let r=[];function n(o,a){const s=x.createContext(a),l=r.length;r=[...r,a];const c=d=>{var w;const{scope:f,children:h,...v}=d,m=((w=f==null?void 0:f[e])==null?void 0:w[l])||s,y=x.useMemo(()=>v,Object.values(v));return p.jsx(m.Provider,{value:y,children:h})};c.displayName=o+"Provider";function u(d,f){var m;const h=((m=f==null?void 0:f[e])==null?void 0:m[l])||s,v=x.useContext(h);if(v)return v;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${o}\``)}return[c,u]}const i=()=>{const o=r.map(a=>x.createContext(a));return function(s){const l=(s==null?void 0:s[e])||o;return x.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return i.scopeName=e,[n,S5(i,...t)]}function S5(...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(o){const a=n.reduce((s,{useScope:l,scopeName:c})=>{const d=l(o)[`__scope${c}`];return{...s,...d}},{});return x.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return r.scopeName=t.scopeName,r}function Rl(e){const t=E5(e),r=x.forwardRef((n,i)=>{const{children:o,...a}=n,s=x.Children.toArray(o),l=s.find(P5);if(l){const c=l.props.children,u=s.map(d=>d===l?x.Children.count(c)>1?x.Children.only(null):x.isValidElement(c)?c.props.children:null:d);return p.jsx(t,{...a,ref:i,children:x.isValidElement(c)?x.cloneElement(c,void 0,u):null})}return p.jsx(t,{...a,ref:i,children:o})});return r.displayName=`${e}.Slot`,r}var _5=Rl("Slot");function E5(e){const t=x.forwardRef((r,n)=>{const{children:i,...o}=r;if(x.isValidElement(i)){const a=A5(i),s=T5(o,i.props);return i.type!==x.Fragment&&(s.ref=n?_N(n,a):a),x.cloneElement(i,s)}return x.Children.count(i)>1?x.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var EN=Symbol("radix.slottable");function O5(e){const t=({children:r})=>p.jsx(p.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=EN,t}function P5(e){return x.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===EN}function T5(e,t){const r={...t};for(const n in t){const i=e[n],o=t[n];/^on[A-Z]/.test(n)?i&&o?r[n]=(...s)=>{const l=o(...s);return i(...s),l}:i&&(r[n]=i):n==="style"?r[n]={...i,...o}:n==="className"&&(r[n]=[i,o].filter(Boolean).join(" "))}return{...e,...r}}function A5(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 Vm(e){const t=e+"CollectionProvider",[r,n]=$r(t),[i,o]=r(t,{collectionRef:{current:null},itemMap:new Map}),a=m=>{const{scope:y,children:w}=m,b=A.useRef(null),g=A.useRef(new Map).current;return p.jsx(i,{scope:y,itemMap:g,collectionRef:b,children:w})};a.displayName=t;const s=e+"CollectionSlot",l=Rl(s),c=A.forwardRef((m,y)=>{const{scope:w,children:b}=m,g=o(s,w),_=ye(y,g.collectionRef);return p.jsx(l,{ref:_,children:b})});c.displayName=s;const u=e+"CollectionItemSlot",d="data-radix-collection-item",f=Rl(u),h=A.forwardRef((m,y)=>{const{scope:w,children:b,...g}=m,_=A.useRef(null),S=ye(y,_),E=o(u,w);return A.useEffect(()=>(E.itemMap.set(_,{ref:_,...g}),()=>void E.itemMap.delete(_))),p.jsx(f,{[d]:"",ref:S,children:b})});h.displayName=u;function v(m){const y=o(e+"CollectionConsumer",m);return A.useCallback(()=>{const b=y.collectionRef.current;if(!b)return[];const g=Array.from(b.querySelectorAll(`[${d}]`));return Array.from(y.itemMap.values()).sort((E,O)=>g.indexOf(E.ref.current)-g.indexOf(O.ref.current))},[y.collectionRef,y.itemMap])}return[{Provider:a,Slot:c,ItemSlot:h},v,n]}var C5=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],se=C5.reduce((e,t)=>{const r=Rl(`Primitive.${t}`),n=x.forwardRef((i,o)=>{const{asChild:a,...s}=i,l=a?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(l,{...s,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function ON(e,t){e&&ss.flushSync(()=>e.dispatchEvent(t))}function _t(e){const t=x.useRef(e);return x.useEffect(()=>{t.current=e}),x.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function j5(e,t=globalThis==null?void 0:globalThis.document){const r=_t(e);x.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 k5="DismissableLayer",q0="dismissableLayer.update",N5="dismissableLayer.pointerDownOutside",R5="dismissableLayer.focusOutside",PE,PN=x.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Gd=x.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:a,onDismiss:s,...l}=e,c=x.useContext(PN),[u,d]=x.useState(null),f=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=x.useState({}),v=ye(t,O=>d(O)),m=Array.from(c.layers),[y]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),w=m.indexOf(y),b=u?m.indexOf(u):-1,g=c.layersWithOutsidePointerEventsDisabled.size>0,_=b>=w,S=M5(O=>{const P=O.target,T=[...c.branches].some(j=>j.contains(P));!_||T||(i==null||i(O),a==null||a(O),O.defaultPrevented||s==null||s())},f),E=I5(O=>{const P=O.target;[...c.branches].some(j=>j.contains(P))||(o==null||o(O),a==null||a(O),O.defaultPrevented||s==null||s())},f);return j5(O=>{b===c.layers.size-1&&(n==null||n(O),!O.defaultPrevented&&s&&(O.preventDefault(),s()))},f),x.useEffect(()=>{if(u)return r&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(PE=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),TE(),()=>{r&&c.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=PE)}},[u,f,r,c]),x.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),TE())},[u,c]),x.useEffect(()=>{const O=()=>h({});return document.addEventListener(q0,O),()=>document.removeEventListener(q0,O)},[]),p.jsx(se.div,{...l,ref:v,style:{pointerEvents:g?_?"auto":"none":void 0,...e.style},onFocusCapture:ie(e.onFocusCapture,E.onFocusCapture),onBlurCapture:ie(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:ie(e.onPointerDownCapture,S.onPointerDownCapture)})});Gd.displayName=k5;var $5="DismissableLayerBranch",TN=x.forwardRef((e,t)=>{const r=x.useContext(PN),n=x.useRef(null),i=ye(t,n);return x.useEffect(()=>{const o=n.current;if(o)return r.branches.add(o),()=>{r.branches.delete(o)}},[r.branches]),p.jsx(se.div,{...e,ref:i})});TN.displayName=$5;function M5(e,t=globalThis==null?void 0:globalThis.document){const r=_t(e),n=x.useRef(!1),i=x.useRef(()=>{});return x.useEffect(()=>{const o=s=>{if(s.target&&!n.current){let l=function(){AN(N5,r,c,{discrete:!0})};const c={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=l,t.addEventListener("click",i.current,{once:!0})):l()}else t.removeEventListener("click",i.current);n.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function I5(e,t=globalThis==null?void 0:globalThis.document){const r=_t(e),n=x.useRef(!1);return x.useEffect(()=>{const i=o=>{o.target&&!n.current&&AN(R5,r,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function TE(){const e=new CustomEvent(q0);document.dispatchEvent(e)}function AN(e,t,r,{discrete:n}){const i=r.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&i.addEventListener(e,t,{once:!0}),n?ON(i,o):i.dispatchEvent(o)}var D5=Gd,L5=TN,Pt=globalThis!=null&&globalThis.document?x.useLayoutEffect:()=>{},B5="Portal",Km=x.forwardRef((e,t)=>{var s;const{container:r,...n}=e,[i,o]=x.useState(!1);Pt(()=>o(!0),[]);const a=r||i&&((s=globalThis==null?void 0:globalThis.document)==null?void 0:s.body);return a?Xk.createPortal(p.jsx(se.div,{...n,ref:t}),a):null});Km.displayName=B5;function F5(e,t){return x.useReducer((r,n)=>t[r][n]??r,e)}var tn=e=>{const{present:t,children:r}=e,n=U5(t),i=typeof r=="function"?r({present:n.isPresent}):x.Children.only(r),o=ye(n.ref,z5(i));return typeof r=="function"||n.isPresent?x.cloneElement(i,{ref:o}):null};tn.displayName="Presence";function U5(e){const[t,r]=x.useState(),n=x.useRef(null),i=x.useRef(e),o=x.useRef("none"),a=e?"mounted":"unmounted",[s,l]=F5(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return x.useEffect(()=>{const c=Bf(n.current);o.current=s==="mounted"?c:"none"},[s]),Pt(()=>{const c=n.current,u=i.current;if(u!==e){const f=o.current,h=Bf(c);e?l("MOUNT"):h==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(u&&f!==h?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),Pt(()=>{if(t){let c;const u=t.ownerDocument.defaultView??window,d=h=>{const m=Bf(n.current).includes(h.animationName);if(h.target===t&&m&&(l("ANIMATION_END"),!i.current)){const y=t.style.animationFillMode;t.style.animationFillMode="forwards",c=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=y)})}},f=h=>{h.target===t&&(o.current=Bf(n.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{u.clearTimeout(c),t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:x.useCallback(c=>{n.current=c?getComputedStyle(c):null,r(c)},[])}}function Bf(e){return(e==null?void 0:e.animationName)||"none"}function z5(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)}var W5=ex[" useInsertionEffect ".trim().toString()]||Pt;function Ni({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[i,o,a]=H5({defaultProp:t,onChange:r}),s=e!==void 0,l=s?e:i;{const u=x.useRef(e!==void 0);x.useEffect(()=>{const d=u.current;d!==s&&console.warn(`${n} is changing from ${d?"controlled":"uncontrolled"} to ${s?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),u.current=s},[s,n])}const c=x.useCallback(u=>{var d;if(s){const f=q5(u)?u(e):u;f!==e&&((d=a.current)==null||d.call(a,f))}else o(u)},[s,e,o,a]);return[l,c]}function H5({defaultProp:e,onChange:t}){const[r,n]=x.useState(e),i=x.useRef(r),o=x.useRef(t);return W5(()=>{o.current=t},[t]),x.useEffect(()=>{var a;i.current!==r&&((a=o.current)==null||a.call(o,r),i.current=r)},[r,i]),[r,n,o]}function q5(e){return typeof e=="function"}var CN=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),V5="VisuallyHidden",Gm=x.forwardRef((e,t)=>p.jsx(se.span,{...e,ref:t,style:{...CN,...e.style}}));Gm.displayName=V5;var K5=Gm,Yx="ToastProvider",[Xx,G5,Y5]=Vm("Toast"),[jN,Hxe]=$r("Toast",[Y5]),[X5,Ym]=jN(Yx),kN=e=>{const{__scopeToast:t,label:r="Notification",duration:n=5e3,swipeDirection:i="right",swipeThreshold:o=50,children:a}=e,[s,l]=x.useState(null),[c,u]=x.useState(0),d=x.useRef(!1),f=x.useRef(!1);return r.trim()||console.error(`Invalid prop \`label\` supplied to \`${Yx}\`. Expected non-empty \`string\`.`),p.jsx(Xx.Provider,{scope:t,children:p.jsx(X5,{scope:t,label:r,duration:n,swipeDirection:i,swipeThreshold:o,toastCount:c,viewport:s,onViewportChange:l,onToastAdd:x.useCallback(()=>u(h=>h+1),[]),onToastRemove:x.useCallback(()=>u(h=>h-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:f,children:a})})};kN.displayName=Yx;var NN="ToastViewport",Q5=["F8"],V0="toast.viewportPause",K0="toast.viewportResume",RN=x.forwardRef((e,t)=>{const{__scopeToast:r,hotkey:n=Q5,label:i="Notifications ({hotkey})",...o}=e,a=Ym(NN,r),s=G5(r),l=x.useRef(null),c=x.useRef(null),u=x.useRef(null),d=x.useRef(null),f=ye(t,d,a.onViewportChange),h=n.join("+").replace(/Key/g,"").replace(/Digit/g,""),v=a.toastCount>0;x.useEffect(()=>{const y=w=>{var g;n.length!==0&&n.every(_=>
68w[_]||w.code===_)&&((g=d.current)==null||g.focus())};return document.addEventListener("keydown",y),()=>document.removeEventListener("keydown",y)},[n]),x.useEffect(()=>{const y=l.current,w=d.current;if(v&&y&&w){const b=()=>{if(!a.isClosePausedRef.current){const E=new CustomEvent(V0);w.dispatchEvent(E),a.isClosePausedRef.current=!0}},g=()=>{if(a.isClosePausedRef.current){const E=new CustomEvent(K0);w.dispatchEvent(E),a.isClosePausedRef.current=!1}},_=E=>{!y.contains(E.relatedTarget)&&g()},S=()=>{y.contains(document.activeElement)||g()};return y.addEventListener("focusin",b),y.addEventListener("focusout",_),y.addEventListener("pointermove",b),y.addEventListener("pointerleave",S),window.addEventListener("blur",b),window.addEventListener("focus",g),()=>{y.removeEventListener("focusin",b),y.removeEventListener("focusout",_),y.removeEventListener("pointermove",b),y.removeEventListener("pointerleave",S),window.removeEventListener("blur",b),window.removeEventListener("focus",g)}}},[v,a.isClosePausedRef]);const m=x.useCallback(({tabbingDirection:y})=>{const b=s().map(g=>{const _=g.ref.current,S=[_,...uz(_)];return y==="forwards"?S:S.reverse()});return(y==="forwards"?b.reverse():b).flat()},[s]);return x.useEffect(()=>{const y=d.current;if(y){const w=b=>{var S,E,O;const g=b.altKey||b.ctrlKey||b.metaKey;if(b.key==="Tab"&&!g){const P=document.activeElement,T=b.shiftKey;if(b.target===y&&T){(S=c.current)==null||S.focus();return}const k=m({tabbingDirection:T?"backwards":"forwards"}),L=k.findIndex(M=>M===P);Hg(k.slice(L+1))?b.preventDefault():T?(E=c.current)==null||E.focus():(O=u.current)==null||O.focus()}};return y.addEventListener("keydown",w),()=>y.removeEventListener("keydown",w)}},[s,m]),p.jsxs(L5,{ref:l,role:"region","aria-label":i.replace("{hotkey}",h),tabIndex:-1,style:{pointerEvents:v?void 0:"none"},children:[v&&p.jsx(G0,{ref:c,onFocusFromOutsideViewport:()=>{const y=m({tabbingDirection:"forwards"});Hg(y)}}),p.jsx(Xx.Slot,{scope:r,children:p.jsx(se.ol,{tabIndex:-1,...o,ref:f})}),v&&p.jsx(G0,{ref:u,onFocusFromOutsideViewport:()=>{const y=m({tabbingDirection:"backwards"});Hg(y)}})]})});RN.displayName=NN;var $N="ToastFocusProxy",G0=x.forwardRef((e,t)=>{const{__scopeToast:r,onFocusFromOutsideViewport:n,...i}=e,o=Ym($N,r);return p.jsx(Gm,{"aria-hidden":!0,tabIndex:0,...i,ref:t,style:{position:"fixed"},onFocus:a=>{var c;const s=a.relatedTarget;!((c=o.viewport)!=null&&c.contains(s))&&n()}})});G0.displayName=$N;var Yd="Toast",J5="toast.swipeStart",Z5="toast.swipeMove",ez="toast.swipeCancel",tz="toast.swipeEnd",MN=x.forwardRef((e,t)=>{const{forceMount:r,open:n,defaultOpen:i,onOpenChange:o,...a}=e,[s,l]=Ni({prop:n,defaultProp:i??!0,onChange:o,caller:Yd});return p.jsx(tn,{present:r||s,children:p.jsx(iz,{open:s,...a,ref:t,onClose:()=>l(!1),onPause:_t(e.onPause),onResume:_t(e.onResume),onSwipeStart:ie(e.onSwipeStart,c=>{c.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:ie(e.onSwipeMove,c=>{const{x:u,y:d}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","move"),c.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${d}px`)}),onSwipeCancel:ie(e.onSwipeCancel,c=>{c.currentTarget.setAttribute("data-swipe","cancel"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:ie(e.onSwipeEnd,c=>{const{x:u,y:d}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","end"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${d}px`),l(!1)})})})});MN.displayName=Yd;var[rz,nz]=jN(Yd,{onClose(){}}),iz=x.forwardRef((e,t)=>{const{__scopeToast:r,type:n="foreground",duration:i,open:o,onClose:a,onEscapeKeyDown:s,onPause:l,onResume:c,onSwipeStart:u,onSwipeMove:d,onSwipeCancel:f,onSwipeEnd:h,...v}=e,m=Ym(Yd,r),[y,w]=x.useState(null),b=ye(t,M=>w(M)),g=x.useRef(null),_=x.useRef(null),S=i||m.duration,E=x.useRef(0),O=x.useRef(S),P=x.useRef(0),{onToastAdd:T,onToastRemove:j}=m,C=_t(()=>{var N;(y==null?void 0:y.contains(document.activeElement))&&((N=m.viewport)==null||N.focus()),a()}),k=x.useCallback(M=>
vendor: 4,524 bytes, line 68
68{!M||M===1/0||(window.clearTimeout(P.current),E.current=new Date().getTime(),P.current=window.setTimeout(C,M))},[C]);x.useEffect(()=>{const M=m.viewport;if(M){const N=()=>{k(O.current),c==null||c()},D=()=>{const B=new Date().getTime()-E.current;O.current=O.current-B,window.clearTimeout(P.current),l==null||l()};return M.addEventListener(V0,D),M.addEventListener(K0,N),()=>{M.removeEventListener(V0,D),M.removeEventListener(K0,N)}}},[m.viewport,S,l,c,k]),x.useEffect(()=>{o&&!m.isClosePausedRef.current&&k(S)},[o,S,m.isClosePausedRef,k]),x.useEffect(()=>(T(),()=>j()),[T,j]);const L=x.useMemo(()=>y?zN(y):null,[y]);return m.viewport?p.jsxs(p.Fragment,{children:[L&&p.jsx(oz,{__scopeToast:r,role:"status","aria-live":n==="foreground"?"assertive":"polite","aria-atomic":!0,children:L}),p.jsx(rz,{scope:r,onClose:C,children:ss.createPortal(p.jsx(Xx.ItemSlot,{scope:r,children:p.jsx(D5,{asChild:!0,onEscapeKeyDown:ie(s,()=>{m.isFocusedToastEscapeKeyDownRef.current||C(),m.isFocusedToastEscapeKeyDownRef.current=!1}),children:p.jsx(se.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":o?"open":"closed","data-swipe-direction":m.swipeDirection,...v,ref:b,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:ie(e.onKeyDown,M=>{M.key==="Escape"&&(s==null||s(M.nativeEvent),M.nativeEvent.defaultPrevented||(m.isFocusedToastEscapeKeyDownRef.current=!0,C()))}),onPointerDown:ie(e.onPointerDown,M=>{M.button===0&&(g.current={x:M.clientX,y:M.clientY})}),onPointerMove:ie(e.onPointerMove,M=>{if(!g.current)return;const N=M.clientX-g.current.x,D=M.clientY-g.current.y,B=!!_.current,$=["left","right"].includes(m.swipeDirection),I=["left","up"].includes(m.swipeDirection)?Math.min:Math.max,U=$?I(0,N):0,H=$?0:I(0,D),z=M.pointerType==="touch"?10:2,K={x:U,y:H},te={originalEvent:M,delta:K};B?(_.current=K,Ff(Z5,d,te,{discrete:!1})):AE(K,m.swipeDirection,z)?(_.current=K,Ff(J5,u,te,{discrete:!1}),M.target.setPointerCapture(M.pointerId)):(Math.abs(N)>z||Math.abs(D)>z)&&(g.current=null)}),onPointerUp:ie(e.onPointerUp,M=>{const N=_.current,D=M.target;if(D.hasPointerCapture(M.pointerId)&&D.releasePointerCapture(M.pointerId),_.current=null,g.current=null,N){const B=M.currentTarget,$={originalEvent:M,delta:N};AE(N,m.swipeDirection,m.swipeThreshold)?Ff(tz,h,$,{discrete:!0}):Ff(ez,f,$,{discrete:!0}),B.addEventListener("click",I=>I.preventDefault(),{once:!0})}})})})}),m.viewport)})]}):null}),oz=e=>{const{__scopeToast:t,children:r,...n}=e,i=Ym(Yd,t),[o,a]=x.useState(!1),[s,l]=x.useState(!1);return lz(()=>a(!0)),x.useEffect(()=>{const c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),s?null:p.jsx(Km,{asChild:!0,children:p.jsx(Gm,{...n,children:o&&p.jsxs(p.Fragment,{children:[i.label," ",r]})})})},az="ToastTitle",IN=x.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return p.jsx(se.div,{...n,ref:t})});IN.displayName=az;var sz="ToastDescription",DN=x.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return p.jsx(se.div,{...n,ref:t})});DN.displayName=sz;var LN="ToastAction",BN=x.forwardRef((e,t)=>{const{altText:r,...n}=e;return r.trim()?p.jsx(UN,{altText:r,asChild:!0,children:p.jsx(Qx,{...n,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${LN}\`. Expected non-empty \`string\`.`),null)});BN.displayName=LN;var FN="ToastClose",Qx=x.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e,i=nz(FN,r);return p.jsx(UN,{asChild:!0,children:p.jsx(se.button,{type:"button",...n,ref:t,onClick:ie(e.onClick,i.onClose)})})});Qx.displayName=FN;var UN=x.forwardRef((e,t)=>{const{__scopeToast:r,altText:n,...i}=e;return p.jsx(se.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0,...i,ref:t})});function zN(e){const t=[];return Array.from(e.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&t.push(n.textContent),cz(n)){const i=n.ariaHidden||n.hidden||n.style.display==="none",o=n.dataset.radixToastAnnounceExclude==="";if(!i)if(o){const a=n.dataset.radixToastAnnounceAlt;a&&t.push(a)}else t.push(...zN(n))}}),t}function Ff(e,t,r,{discrete:n}){const i=r.originalEvent.currentTarget,o=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:r});t&&i.addEventListener(e,t,{once:!0}),n?ON(i,o):i.dispatchEvent(o)}var AE=(e,t,r=0)=>{const n=Math.abs(e.x),i=Math.abs(e.y),o=n>i;return t==="left"||t==="right"?o&&n>r:!o&&i>r};function lz(e=()=>{}){const t=_t(e);Pt(()=>{let r=0,n=0;return r=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(n)}},[t])}
vendor: 5,650 bytes, lines 68-132
68function cz(e){return e.nodeType===e.ELEMENT_NODE}function uz(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 Hg(e){const t=document.activeElement;return e.some(r=>r===t?!0:(r.focus(),document.activeElement!==t))}var dz=kN,WN=RN,HN=MN,qN=IN,VN=DN,KN=BN,GN=Qx;function YN(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=YN(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Ce(){for(var e,t,r=0,n="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=YN(e))&&(n&&(n+=" "),n+=t);return n}const CE=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,jE=Ce,Xd=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return jE(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:i,defaultVariants:o}=t,a=Object.keys(i).map(c=>{const u=r==null?void 0:r[c],d=o==null?void 0:o[c];if(u===null)return null;const f=CE(u)||CE(d);return i[c][f]}),s=r&&Object.entries(r).reduce((c,u)=>{let[d,f]=u;return f===void 0||(c[d]=f),c},{}),l=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((c,u)=>{let{class:d,className:f,...h}=u;return Object.entries(h).every(v=>{let[m,y]=v;return Array.isArray(y)?y.includes({...o,...s}[m]):{...o,...s}[m]===y})?[...c,d,f]:c},[]);return jE(e,a,l,r==null?void 0:r.class,r==null?void 0:r.className)};/**
69 * @license lucide-react v0.462.0 - ISC
70 *
71 * This source code is licensed under the ISC license.
72 * See the LICENSE file in the root directory of this source tree.
73 */const fz=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),XN=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim();/**
74 * @license lucide-react v0.462.0 - ISC
75 *
76 * This source code is licensed under the ISC license.
77 * See the LICENSE file in the root directory of this source tree.
78 */var hz={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
79 * @license lucide-react v0.462.0 - ISC
80 *
81 * This source code is licensed under the ISC license.
82 * See the LICENSE file in the root directory of this source tree.
83 */const pz=x.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:i="",children:o,iconNode:a,...s},l)=>x.createElement("svg",{ref:l,...hz,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:XN("lucide",i),...s},[...a.map(([c,u])=>x.createElement(c,u)),...Array.isArray(o)?o:[o]]));/**
84 * @license lucide-react v0.462.0 - ISC
85 *
86 * This source code is licensed under the ISC license.
87 * See the LICENSE file in the root directory of this source tree.
88 */const at=(e,t)=>{const r=x.forwardRef(({className:n,...i},o)=>x.createElement(pz,{ref:o,iconNode:t,className:XN(`lucide-${fz(e)}`,n),...i}));return r.displayName=`${e}`,r};/**
89 * @license lucide-react v0.462.0 - ISC
90 *
91 * This source code is licensed under the ISC license.
92 * See the LICENSE file in the root directory of this source tree.
93 */const mz=at("CheckCheck",[["path",{d:"M18 6 7 17l-5-5",key:"116fxf"}],["path",{d:"m22 10-7.5 7.5L13 16",key:"ke71qq"}]]);/**
94 * @license lucide-react v0.462.0 - ISC
95 *
96 * This source code is licensed under the ISC license.
97 * See the LICENSE file in the root directory of this source tree.
98 */const vz=at("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
99 * @license lucide-react v0.462.0 - ISC
100 *
101 * This source code is licensed under the ISC license.
102 * See the LICENSE file in the root directory of this source tree.
103 */const Jx=at("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
104 * @license lucide-react v0.462.0 - ISC
105 *
106 * This source code is licensed under the ISC license.
107 * See the LICENSE file in the root directory of this source tree.
108 */const kE=at("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
109 * @license lucide-react v0.462.0 - ISC
110 *
111 * This source code is licensed under the ISC license.
112 * See the LICENSE file in the root directory of this source tree.
113 */const gz=at("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
114 * @license lucide-react v0.462.0 - ISC
115 *
116 * This source code is licensed under the ISC license.
117 * See the LICENSE file in the root directory of this source tree.
118 */const yz=at("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
119 * @license lucide-react v0.462.0 - ISC
120 *
121 * This source code is licensed under the ISC license.
122 * See the LICENSE file in the root directory of this source tree.
123 */const bz=at("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"}]]);/**
124 * @license lucide-react v0.462.0 - ISC
125 *
126 * This source code is licensed under the ISC license.
127 * See the LICENSE file in the root directory of this source tree.
128 */const wz=at("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
129 * @license lucide-react v0.462.0 - ISC
130 *
131 * This source code is licensed under the ISC license.
132 * See the LICENSE file in the root directory of this source tree.
133 */const fp=at("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
134 * @license lucide-react v0.462.0 - ISC
135 *
136 * This source code is licensed under the ISC license.
137 * See the LICENSE file in the root directory of this source tree.
138 */const xz=at("Network",[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]]);/**
139 * @license lucide-react v0.462.0 - ISC
140 *
141 * This source code is licensed under the ISC license.
142 * See the LICENSE file in the root directory of this source tree.
143 */const QN=at("Newspaper",[["path",{d:"M4 22h16a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2H8a2 2 0 0 0-2 2v16a2 2 0 0 1-2 2Zm0 0a2 2 0 0 1-2-2v-9c0-1.1.9-2 2-2h2",key:"7pis2x"}],["path",{d:"M18 14h-8",key:"sponae"}],["path",{d:"M15 18h-5",key:"95g1m2"}],["path",{d:"M10 6h8v4h-8V6Z",key:"smlsk5"}]]);/**
144 * @license lucide-react v0.462.0 - ISC
145 *
146 * This source code is licensed under the ISC license.
147 * See the LICENSE file in the root directory of this source tree.
148 */const Sz=at("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
149 * @license lucide-react v0.462.0 - ISC
150 *
151 * This source code is licensed under the ISC license.
152 * See the LICENSE file in the root directory of this source tree.
153 */const _z=at("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
154 * @license lucide-react v0.462.0 - ISC
155 *
156 * This source code is licensed under the ISC license.
157 * See the LICENSE file in the root directory of this source tree.
158 */const Y0=at("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"}]]);/**
159 * @license lucide-react v0.462.0 - ISC
160 *
161 * This source code is licensed under the ISC license.
162 * See the LICENSE file in the root directory of this source tree.
163 */const Ez=at("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"}]]);/**
164 * @license lucide-react v0.462.0 - ISC
165 *
166 * This source code is licensed under the ISC license.
167 * See the LICENSE file in the root directory of this source tree.
168 */const Oz=at("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"}]]);/**
169 * @license lucide-react v0.462.0 - ISC
170 *
171 * This source code is licensed under the ISC license.
172 * See the LICENSE file in the root directory of this source tree.
173 */const Pz=at("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);/**
174 * @license lucide-react v0.462.0 - ISC
175 *
176 * This source code is licensed under the ISC license.
177 * See the LICENSE file in the root directory of this source tree.
178 */const Tz=at("Target",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]]);/**
179 * @license lucide-react v0.462.0 - ISC
180 *
181 * This source code is licensed under the ISC license.
182 * See the LICENSE file in the root directory of this source tree.
183 */const Az=at("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}
vendor: 13,772 bytes, lines 183-203
183],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
184 * @license lucide-react v0.462.0 - ISC
185 *
186 * This source code is licensed under the ISC license.
187 * See the LICENSE file in the root directory of this source tree.
188 */const JN=at("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
189 * @license lucide-react v0.462.0 - ISC
190 *
191 * This source code is licensed under the ISC license.
192 * See the LICENSE file in the root directory of this source tree.
193 */const Cz=at("Twitter",[["path",{d:"M22 4s-.7 2.1-2 3.4c1.6 10-9.4 17.3-18 11.6 2.2.1 4.4-.6 6-2C3 15.5.5 9.6 3 5c2.2 2.6 5.6 4.1 9 4-.9-4.2 4-6.6 7-3.8 1.1 0 3-1.2 3-1.2z",key:"pff0z6"}]]);/**
194 * @license lucide-react v0.462.0 - ISC
195 *
196 * This source code is licensed under the ISC license.
197 * See the LICENSE file in the root directory of this source tree.
198 */const jz=at("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/**
199 * @license lucide-react v0.462.0 - ISC
200 *
201 * This source code is licensed under the ISC license.
202 * See the LICENSE file in the root directory of this source tree.
203 */const Zx=at("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),e1="-",kz=e=>{const t=Rz(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:a=>{const s=a.split(e1);return s[0]===""&&s.length!==1&&s.shift(),ZN(s,t)||Nz(a)},getConflictingClassGroupIds:(a,s)=>{const l=r[a]||[];return s&&n[a]?[...l,...n[a]]:l}}},ZN=(e,t)=>{var a;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),i=n?ZN(e.slice(1),n):void 0;if(i)return i;if(t.validators.length===0)return;const o=e.join(e1);return(a=t.validators.find(({validator:s})=>s(o)))==null?void 0:a.classGroupId},NE=/^\[(.+)\]$/,Nz=e=>{if(NE.test(e)){const t=NE.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},Rz=e=>{const{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return Mz(Object.entries(e.classGroups),r).forEach(([o,a])=>{X0(a,n,o,t)}),n},X0=(e,t,r,n)=>{e.forEach(i=>{if(typeof i=="string"){const o=i===""?t:RE(t,i);o.classGroupId=r;return}if(typeof i=="function"){if($z(i)){X0(i(n),t,r,n);return}t.validators.push({validator:i,classGroupId:r});return}Object.entries(i).forEach(([o,a])=>{X0(a,RE(t,o),r,n)})})},RE=(e,t)=>{let r=e;return t.split(e1).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},$z=e=>e.isThemeGetter,Mz=(e,t)=>t?e.map(([r,n])=>{const i=n.map(o=>typeof o=="string"?t+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([a,s])=>[t+a,s])):o);return[r,i]}):e,Iz=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const i=(o,a)=>{r.set(o,a),t++,t>e&&(t=0,n=r,r=new Map)};return{get(o){let a=r.get(o);if(a!==void 0)return a;if((a=n.get(o))!==void 0)return i(o,a),a},set(o,a){r.has(o)?r.set(o,a):i(o,a)}}},eR="!",Dz=e=>{const{separator:t,experimentalParseClassName:r}=e,n=t.length===1,i=t[0],o=t.length,a=s=>{const l=[];let c=0,u=0,d;for(let y=0;y<s.length;y++){let w=s[y];if(c===0){if(w===i&&(n||s.slice(y,y+o)===t)){l.push(s.slice(u,y)),u=y+o;continue}if(w==="/"){d=y;continue}}w==="["?c++:w==="]"&&c--}const f=l.length===0?s:s.substring(u),h=f.startsWith(eR),v=h?f.substring(1):f,m=d&&d>u?d-u:void 0;return{modifiers:l,hasImportantModifier:h,baseClassName:v,maybePostfixModifierPosition:m}};return r?s=>r({className:s,parseClassName:a}):a},Lz=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},Bz=e=>({cache:Iz(e.cacheSize),parseClassName:Dz(e),...kz(e)}),Fz=/\s+/,Uz=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:i}=t,o=[],a=e.trim().split(Fz);let s="";for(let l=a.length-1;l>=0;l-=1){const c=a[l],{modifiers:u,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:h}=r(c);let v=!!h,m=n(v?f.substring(0,h):f);if(!m){if(!v){s=c+(s.length>0?" "+s:s);continue}if(m=n(f),!m){s=c+(s.length>0?" "+s:s);continue}v=!1}const y=Lz(u).join(":"),w=d?y+eR:y,b=w+m;if(o.includes(b))continue;o.push(b);const g=i(m,v);for(let _=0;_<g.length;++_){const S=g[_];o.push(w+S)}s=c+(s.length>0?" "+s:s)}return s};function zz(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=tR(t))&&(n&&(n+=" "),n+=r);return n}const tR=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=tR(e[n]))&&(r&&(r+=" "),r+=t);return r};function Wz(e,...t){let r,n,i,o=a;function a(l){const c=t.reduce((u,d)=>d(u),e());return r=Bz(c),n=r.cache.get,i=r.cache.set,o=s,s(l)}function s(l){const c=n(l);if(c)return c;const u=Uz(l,r);return i(l,u),u}return function(){return o(zz.apply(null,arguments))}}const Ye=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},rR=/^\[(?:([a-z-]+):)?(.+)\]$/i,Hz=/^\d+\/\d+$/,qz=new Set(["px","full","screen"]),Vz=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Kz=/\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$/,Gz=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Yz=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Xz=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ni=e=>il(e)||qz.has(e)||Hz.test(e),Yi=e=>uc(e,"length",iW),il=e=>!!e&&!Number.isNaN(Number(e)),qg=e=>uc(e,"number",il),Ic=e=>!!e&&Number.isInteger(Number(e)),Qz=e=>e.endsWith("%")&&il(e.slice(0,-1)),ge=e=>rR.test(e),Xi=e=>Vz.test(e),Jz=new Set(["length","size","percentage"]),Zz=e=>uc(e,Jz,nR),eW=e=>uc(e,"position",nR),tW=new Set(["image","url"]),rW=e=>uc(e,tW,aW),nW=e=>uc(e,"",oW),Dc=()=>!0,uc=(e,t,r)=>{const n=rR.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1},iW=e=>Kz.test(e)&&!Gz.test(e),nR=()=>!1,oW=e=>Yz.test(e),aW=e=>Xz.test(e),sW=()=>{const e=Ye("colors"),t=Ye("spacing"),r=Ye("blur"),n=Ye("brightness"),i=Ye("borderColor"),o=Ye("borderRadius"),a=Ye("borderSpacing"),s=Ye("borderWidth"),l=Ye("contrast"),c=Ye("grayscale"),u=Ye("hueRotate"),d=Ye("invert"),f=Ye("gap"),h=Ye("gradientColorStops"),v=Ye("gradientColorStopPositions"),m=Ye("inset"),y=Ye("margin"),w=Ye("opacity"),b=Ye("padding"),g=Ye("saturate"),_=Ye("scale"),S=Ye("sepia"),E=Ye("skew"),O=Ye("space"),P=Ye("translate"),T=()=>["auto","contain","none"],j=()=>["auto","hidden","clip","visible","scroll"],C=()=>["auto",ge,t],k=()=>[ge,t],L=()=>["",ni,Yi],M=()=>["auto",il,ge],N=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],D=()=>["solid","dashed","dotted","double","none"],B=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],$=()=>["start","end","center","between","around","evenly","stretch"],I=()=>["","0",ge],U=()=>["auto","avoid","all","avoid-page","page","left","right","column"],H=()=>[il,ge];return{cacheSize:500,separator:":",theme:{colors:[Dc],spacing:[ni,Yi],blur:["none","",Xi,ge],brightness:H(),borderColor:[e],borderRadius:["none","","full",Xi,ge],borderSpacing:k(),borderWidth:L(),contrast:H(),grayscale:I(),hueRotate:H(),invert:I(),gap:k(),gradientColorStops:[e],gradientColorStopPositions:[Qz,Yi],inset:C(),margin:C(),opacity:H(),padding:k(),saturate:H(),scale:H(),sepia:I(),skew:H(),space:k(),translate:k()},classGroups:{aspect:[{aspect:["auto","square","video",ge]}],container:["container"],columns:[{columns:[Xi]}],"break-after":[{"break-after":U()}],"break-before":[{"break-before":U()}],"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:[...N(),ge]}],overflow:[{overflow:j()}],"overflow-x":[{"overflow-x":j()}],"overflow-y":[{"overflow-y":j()}],overscroll:[{overscroll:T()}],"overscroll-x":[{"overscroll-x":T()}],"overscroll-y":[{"overscroll-y":T()}],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",Ic,ge]}],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",ge]}],grow:[{grow:I()}],shrink:[{shrink:I()}],order:[{order:["first","last","none",Ic,ge]}],"grid-cols":[{"grid-cols":[Dc]}],"col-start-end":[{col:["auto",{span:["full",Ic,ge]},ge]}],"col-start":[{"col-start":M()}],"col-end":[{"col-end":M()}],"grid-rows":[{"grid-rows":[Dc]}],"row-start-end":[{row:["auto",{span:[Ic,ge]},ge]}],"row-start":[{"row-start":M()}],"row-end":[{"row-end":M()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ge]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ge]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...$()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...$(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...$(),"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":[O]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[O]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",ge,t]}],"min-w":[{"min-w":[ge,t,"min","max","fit"]}],"max-w":[{"max-w":[ge,t,"none","full","min","max","fit","prose",{screen:[Xi]},Xi]}],h:[{h:[ge,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ge,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ge,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ge,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Xi,Yi]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",qg]}],"font-family":[{font:[Dc]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",ge]}],"line-clamp":[{"line-clamp":["none",il,qg]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",ni,ge]}],"list-image":[{"list-image":["none",ge]}],"list-style-type":[{list:["none","disc","decimal",ge]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[w]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[w]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...D(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",ni,Yi]}],"underline-offset":[{"underline-offset":["auto",ni,ge]}],"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:k()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ge]}],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",ge]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[w]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...N(),eW]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Zz]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},rW]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[v]}
vendor: 5,180 bytes, line 203
203],"gradient-via-pos":[{via:[v]}],"gradient-to-pos":[{to:[v]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[o]}],"rounded-s":[{"rounded-s":[o]}],"rounded-e":[{"rounded-e":[o]}],"rounded-t":[{"rounded-t":[o]}],"rounded-r":[{"rounded-r":[o]}],"rounded-b":[{"rounded-b":[o]}],"rounded-l":[{"rounded-l":[o]}],"rounded-ss":[{"rounded-ss":[o]}],"rounded-se":[{"rounded-se":[o]}],"rounded-ee":[{"rounded-ee":[o]}],"rounded-es":[{"rounded-es":[o]}],"rounded-tl":[{"rounded-tl":[o]}],"rounded-tr":[{"rounded-tr":[o]}],"rounded-br":[{"rounded-br":[o]}],"rounded-bl":[{"rounded-bl":[o]}],"border-w":[{border:[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":[w]}],"border-style":[{border:[...D(),"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":[w]}],"divide-style":[{divide:D()}],"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:["",...D()]}],"outline-offset":[{"outline-offset":[ni,ge]}],"outline-w":[{outline:[ni,Yi]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:L()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[w]}],"ring-offset-w":[{"ring-offset":[ni,Yi]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Xi,nW]}],"shadow-color":[{shadow:[Dc]}],opacity:[{opacity:[w]}],"mix-blend":[{"mix-blend":[...B(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":B()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Xi,ge]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],saturate:[{saturate:[g]}],sepia:[{sepia:[S]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[w]}],"backdrop-saturate":[{"backdrop-saturate":[g]}],"backdrop-sepia":[{"backdrop-sepia":[S]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",ge]}],duration:[{duration:H()}],ease:[{ease:["linear","in","out","in-out",ge]}],delay:[{delay:H()}],animate:[{animate:["none","spin","ping","pulse","bounce",ge]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[_]}],"scale-x":[{"scale-x":[_]}],"scale-y":[{"scale-y":[_]}],rotate:[{rotate:[Ic,ge]}],"translate-x":[{"translate-x":[P]}],"translate-y":[{"translate-y":[P]}],"skew-x":[{"skew-x":[E]}],"skew-y":[{"skew-y":[E]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ge]}],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",ge]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":k()}],"scroll-mx":[{"scroll-mx":k()}],"scroll-my":[{"scroll-my":k()}],"scroll-ms":[{"scroll-ms":k()}],"scroll-me":[{"scroll-me":k()}],"scroll-mt":[{"scroll-mt":k()}],"scroll-mr":[{"scroll-mr":k()}],"scroll-mb":[{"scroll-mb":k()}],"scroll-ml":[{"scroll-ml":k()}],"scroll-p":[{"scroll-p":k()}],"scroll-px":[{"scroll-px":k()}],"scroll-py":[{"scroll-py":k()}],"scroll-ps":[{"scroll-ps":k()}],"scroll-pe":[{"scroll-pe":k()}],"scroll-pt":[{"scroll-pt":k()}],"scroll-pr":[{"scroll-pr":k()}],"scroll-pb":[{"scroll-pb":k()}],"scroll-pl":[{"scroll-pl":k()}],"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 203
203],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",ge]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[ni,Yi,qg]}],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"]}}},lW=Wz(sW);function Z(...e){return lW(Ce(e))}const cW=dz,iR=x.forwardRef(({className:e,...t},r)=>p.jsx(WN,{ref:r,className:Z("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}));iR.displayName=WN.displayName;const uW=Xd("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"}}),oR=x.forwardRef(({className:e,variant:t,...r},n)=>p.jsx(HN,{ref:n,className:Z(uW({variant:t}),e),...r}));oR.displayName=HN.displayName;const dW=x.forwardRef(({className:e,...t},r)=>p.jsx(KN,{ref:r,className:Z("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors group-[.destructive]:border-muted/40 hover:bg-secondary group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 group-[.destructive]:focus:ring-destructive disabled:pointer-events-none disabled:opacity-50",e),...t}));dW.displayName=KN.displayName;const aR=x.forwardRef(({className:e,...t},r)=>p.jsx(GN,{ref:r,className:Z("absolute right-2 top-2 rounded-md p-1 text-foreground
203/50 opacity-0 transition-opacity group-hover:opacity-100 group-[.destructive]:text-red-300 hover:text-foreground group-[.destructive]:hover:text-red-50 focus:opacity-100 focus:outline-none focus:ring-2 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:p.jsx(Zx,{className:"h-4 w-4"})}));aR.displayName=GN.displayName;const sR=x.forwardRef(({className:e,...t},r)=>p.jsx(qN,{ref:r,className:Z("text-sm font-semibold",e),...t}));sR.displayName=qN.displayName;const lR=x.forwardRef(({className:e,...t},r)=>p.jsx(VN,{ref:r,className:Z("text-sm opacity-90",e),...t}));lR.displayName=VN.displayName;function fW(){const{toasts:e}=w5();return p.jsxs(cW,{children:[e.map(function({id:t,title:r,description:n,action:i,...o}){return p.jsxs(oR,{...o,children:[p.jsxs("div",{className:"grid gap-1",children:[r&&p.jsx(sR,{children:r}),n&&p.jsx(lR,{children:n})]}),i,p.jsx(aR,{})]},t)}),p.jsx(iR,{})]})}var hW=ex[" useId ".trim().toString()]||(()=>{}),pW=0;function xi(e){const[t,r]=x.use
vendor: 10,702 bytes, line 203
203State(hW());return Pt(()=>{r(n=>n??String(pW++))},[e]),t?`radix-${t}`:""}const mW=["top","right","bottom","left"],Bo=Math.min,Er=Math.max,hp=Math.round,Uf=Math.floor,Yn=e=>({x:e,y:e}),vW={left:"right",right:"left",bottom:"top",top:"bottom"},gW={start:"end",end:"start"};function Q0(e,t,r){return Er(e,Bo(t,r))}function Ri(e,t){return typeof e=="function"?e(t):e}function $i(e){return e.split("-")[0]}function dc(e){return e.split("-")[1]}function t1(e){return e==="x"?"y":"x"}function r1(e){return e==="y"?"height":"width"}const yW=new Set(["top","bottom"]);function qn(e){return yW.has($i(e))?"y":"x"}function n1(e){return t1(qn(e))}function bW(e,t,r){r===void 0&&(r=!1);const n=dc(e),i=n1(e),o=r1(i);let a=i==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=pp(a)),[a,pp(a)]}function wW(e){const t=pp(e);return[J0(e),t,J0(t)]}function J0(e){return e.replace(/start|end/g,t=>gW[t])}const $E=["left","right"],ME=["right","left"],xW=["top","bottom"],SW=["bottom","top"];function _W(e,t,r){switch(e){case"top":case"bottom":return r?t?ME:$E:t?$E:ME;case"left":case"right":return t?xW:SW;default:return[]}}function EW(e,t,r,n){const i=dc(e);let o=_W($i(e),r==="start",n);return i&&(o=o.map(a=>a+"-"+i),t&&(o=o.concat(o.map(J0)))),o}function pp(e){return e.replace(/left|right|bottom|top/g,t=>vW[t])}function OW(e){return{top:0,right:0,bottom:0,left:0,...e}}function cR(e){return typeof e!="number"?OW(e):{top:e,right:e,bottom:e,left:e}}function mp(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 IE(e,t,r){let{reference:n,floating:i}=e;const o=qn(t),a=n1(t),s=r1(a),l=$i(t),c=o==="y",u=n.x+n.width/2-i.width/2,d=n.y+n.height/2-i.height/2,f=n[s]/2-i[s]/2;let h;switch(l){case"top":h={x:u,y:n.y-i.height};break;case"bottom":h={x:u,y:n.y+n.height};break;case"right":h={x:n.x+n.width,y:d};break;case"left":h={x:n.x-i.width,y:d};break;default:h={x:n.x,y:n.y}}switch(dc(t)){case"start":h[a]-=f*(r&&c?-1:1);break;case"end":h[a]+=f*(r&&c?-1:1);break}return h}const PW=async(e,t,r)=>{const{placement:n="bottom",strategy:i="absolute",middleware:o=[],platform:a}=r,s=o.filter(Boolean),l=await(a.isRTL==null?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=IE(c,n,l),f=n,h={},v=0;for(let m=0;m<s.length;m++){const{name:y,fn:w}=s[m],{x:b,y:g,data:_,reset:S}=await w({x:u,y:d,initialPlacement:n,placement:f,strategy:i,middlewareData:h,rects:c,platform:a,elements:{reference:e,floating:t}});u=b??u,d=g??d,h={...h,[y]:{...h[y],..._}},S&&v<=50&&(v++,typeof S=="object"&&(S.placement&&(f=S.placement),S.rects&&(c=S.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:i}):S.rects),{x:u,y:d}=IE(c,f,l)),m=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:h}};async function Hu(e,t){var r;t===void 0&&(t={});const{x:n,y:i,platform:o,rects:a,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:h=0}=Ri(t,e),v=cR(h),y=s[f?d==="floating"?"reference":"floating":d],w=mp(await o.getClippingRect({element:(r=await(o.isElement==null?void 0:o.isElement(y)))==null||r?y:y.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),b=d==="floating"?{x:n,y:i,width:a.floating.width,height:a.floating.height}:a.reference,g=await(o.getOffsetParent==null?void 0:o.getOffsetParent(s.floating)),_=await(o.isElement==null?void 0:o.isElement(g))?await(o.getScale==null?void 0:o.getScale(g))||{x:1,y:1}:{x:1,y:1},S=mp(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:b,offsetParent:g,strategy:l}):b);return{top:(w.top-S.top+v.top)/_.y,bottom:(S.bottom-w.bottom+v.bottom)/_.y,left:(w.left-S.left+v.left)/_.x,right:(S.right-w.right+v.right)/_.x}}const TW=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:i,rects:o,platform:a,elements:s,middlewareData:l}=t,{element:c,padding:u=0}=Ri(e,t)||{};if(c==null)return{};const d=cR(u),f={x:r,y:n},h=n1(i),v=r1(h),m=await a.getDimensions(c),y=h==="y",w=y?"top":"left",b=y?"bottom":"right",g=y?"clientHeight":"clientWidth",_=o.reference[v]+o.reference[h]-f[h]-o.floating[v],S=f[h]-o.reference[h],E=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c));let O=E?E[g]:0;(!O||!await(a.isElement==null?void 0:a.isElement(E)))&&(O=s.floating[g]||o.floating[v]);const P=_/2-S/2,T=O/2-m[v]/2-1,j=Bo(d[w],T),C=Bo(d[b],T),k=j,L=O-m[v]-C,M=O/2-m[v]/2+P,N=Q0(k,M,L),D=!l.arrow&&dc(i)!=null&&M!==N&&o.reference[v]/2-(M<k?j:C)-m[v]/2<0,B=D?M<k?M-k:M-L:0;return{[h]:f[h]+B,data:{[h]:N,centerOffset:M-N-B,...D&&{alignmentOffset:B}},reset:D}}}),AW=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:i,middlewareData:o,rects:a,initialPlacement:s,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:m=!0,...y}=Ri(e,t);if((r=o.arrow)!=null&&r.alignmentOffset)return{};const w=$i(i),b=qn(s),g=$i(s)===s,_=await(l.isRTL==null?void 0:l.isRTL(c.floating)),S=f||(g||!m?[pp(s)]:wW(s)),E=v!=="none";!f&&E&&S.push(...EW(s,m,v,_));const O=[s,...S],P=await Hu(t,y),T=[];let j=((n=o.flip)==null?void 0:n.overflows)||[];if(u&&T.push(P[w]),d){const M=bW(i,a,_);T.push(P[M[0]],P[M[1]])}if(j=[...j,{placement:i,overflows:T}],!T.every(M=>M<=0)){var C,k;const M=(((C=o.flip)==null?void 0:C.index)||0)+1,N=O[M];if(N&&(!(d==="alignment"?b!==qn(N):!1)||j.every($=>$.overflows[0]>0&&qn($.placement)===b)))return{data:{index:M,overflows:j},reset:{placement:N}};let D=(k=j.filter(B=>B.overflows[0]<=0).sort((B,$)=>B.overflows[1]-$.overflows[1])[0])==null?void 0:k.placement;if(!D)switch(h){case"bestFit":{var L;const B=(L=j.filter($=>{if(E){const I=qn($.placement);return I===b||I==="y"}return!0}).map($=>[$.placement,$.overflows.filter(I=>I>0).reduce((I,U)=>I+U,0)]).sort(($,I)=>$[1]-I[1])[0])==null?void 0:L[0];B&&(D=B);break}case"initialPlacement":D=s;break}if(i!==D)return{reset:{placement:D}}}return{}}}};function DE(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function LE(e){return mW.some(t=>e[t]>=0)}const CW=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...i}=Ri(e,t);switch(n){case"referenceHidden":{const o=await Hu(t,{...i,elementContext:"reference"}),a=DE(o,r.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:LE(a)}}}case"escaped":{const o=await Hu(t,{...i,altBoundary:!0}),a=DE(o,r.floating);return{data:{escapedOffsets:a,escaped:LE(a)}}}default:return{}}}}},uR=new Set(["left","top"]);async function jW(e,t){const{placement:r,platform:n,elements:i}=e,o=await(n.isRTL==null?void 0:n.isRTL(i.floating)),a=$i(r),s=dc(r),l=qn(r)==="y",c=uR.has(a)?-1:1,u=o&&l?-1:1,d=Ri(t,e);let{mainAxis:f,crossAxis:h,alignmentAxis:v}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof v=="number"&&(h=s==="end"?v*-1:v),l?{x:h*u,y:f*c}:{x:f*c,y:h*u}}const kW=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:i,y:o,placement:a,middlewareData:s}=t,l=await jW(t,e);return a===((r=s.offset)==null?void 0:r.placement)&&(n=s.arrow)!=null&&n.alignmentOffset?{}:{x:i+l.x,y:o+l.y,data:{...l,placement:a}}}}},NW=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:i}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:s={fn:y=>{let{x:w,y:b}=y;return{x:w,y:b}}},...l}=Ri(e,t),c={x:r,y:n},u=await Hu(t,l),d=qn($i(i)),f=t1(d);let h=c[f],v=c[d];if(o){const y=f==="y"?"top":"left",w=f==="y"?"bottom":"right",b=h+u[y],g=h-u[w];h=Q0(b,h,g)}if(a){const y=d==="y"?"top":"left",w=d==="y"?"bottom":"right",b=v+u[y],g=v-u[w];v=Q0(b,v,g)}const m=s.fn({...t,[f]:h,[d]:v});return{...m,data:{x:m.x-r,y:m.y-n,enabled:{[f]:o,[d]:a}}}}}},RW=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:i,rects:o,middlewareData:a}=t,{offset:s=0,mainAxis:l=!0,crossAxis:c=!0}=Ri(e,t),u={x:r,y:n},d=qn(i),f=t1(d);let h=u[f],v=u[d];const m=Ri(s,t),y=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const g=f==="y"?"height":"width",_=o.reference[f]-o.floating[g]+y.mainAxis,S=o.reference[f]+o.reference[g]-y.mainAxis;h<_?h=_:h>S&&(h=S)}if(c){var w,b;const g=f==="y"?"width":"height",_=uR.has($i(i)),S=o.reference[d]-o.floating[g]+(_&&((w=a.offset)==null?void 0:w[d])||0)+(_?0:y.crossAxis),E=o.reference[d]+o.reference[g]+(_?0:((b=a.offset)==null?void 0:b[d])||0)-(_?y.crossAxis:0);v<S?v=S:v>E&&(v=E)}return{[f]:h,[d]:v}}}},$W=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:i,rects:o,platform:a,elements:s}=t,{apply:l=()=>{},...c}=Ri(e,t),u=await Hu(t,c),d=$i(i),f=dc(i),h=qn(i)==="y",{width:v,height:m}=o.floating;let y,w;d==="top"||d==="bottom"?(y=d,w=f===(await(a.isRTL==null?void 0:a.isRTL(s.floating))?"start":"end")?"left":"right"):(w=d,y=f==="end"?"top":"bottom");const b=m-u.top-u.bottom,g=v-u.left-u.right,_=Bo(m-u[y],b),S=Bo(v-u[w],g),E=!t.middlewareData.shift;let O=_,P=S;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(P=g),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(O=b),E&&!f){const j=Er(u.left,0),C=Er(u.right,0),k=Er(u.top,0),L=Er(u.bottom,0);h?P=v-2*(j!==0||C!==0?j+C:Er(u.left,u.right)):O=m-2*(k!==0||L!==0?k+L:Er(u.top,u.bottom))}await l({...t,availableWidth:P,availableHeight:O});const T=await a.getDimensions(s.floating);return v!==T.width||m!==T.height?{reset:{rects:!0}}:{}}}};function Xm(){return typeof window<"u"}function fc(e){return dR(e)?(e.nodeName||"").toLowerCase():"#document"}function Cr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ei(e){var t;return(t=(dR(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function dR(e){return Xm()?e instanceof Node||e instanceof Cr(e).Node:!1}function jn(e){return Xm()?e instanceof Element||e instanceof Cr(e).Element:!1}function Jn(e){return Xm()?e instanceof HTMLElement||e instanceof Cr(e).HTMLElement:!1}function BE(e){return!Xm()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Cr(e).ShadowRoot}const MW=new Set(["inline","contents"]);function Qd(e){const{overflow:t,overflowX:r,overflowY:n,display:i}=kn(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!MW.has(i)}const IW=new Set(["table","td","th"]);function DW(e){return IW.has(fc(e))}const LW=[":popover-open",":modal"];
vendor: 4,176 bytes, line 203
203function Qm(e){return LW.some(t=>{try{return e.matches(t)}catch{return!1}})}const BW=["transform","translate","scale","rotate","perspective"],FW=["transform","translate","scale","rotate","perspective","filter"],UW=["paint","layout","strict","content"];function i1(e){const t=o1(),r=jn(e)?kn(e):e;return BW.some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||FW.some(n=>(r.willChange||"").includes(n))||UW.some(n=>(r.contain||"").includes(n))}function zW(e){let t=Fo(e);for(;Jn(t)&&!$l(t);){if(i1(t))return t;if(Qm(t))return null;t=Fo(t)}return null}function o1(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const WW=new Set(["html","body","#document"]);function $l(e){return WW.has(fc(e))}function kn(e){return Cr(e).getComputedStyle(e)}function Jm(e){return jn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Fo(e){if(fc(e)==="html")return e;const t=e.assignedSlot||e.parentNode||BE(e)&&e.host||ei(e);return BE(t)?t.host:t}function fR(e){const t=Fo(e);return $l(t)?e.ownerDocument?e.ownerDocument.body:e.body:Jn(t)&&Qd(t)?t:fR(t)}function qu(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const i=fR(e),o=i===((n=e.ownerDocument)==null?void 0:n.body),a=Cr(i);if(o){const s=Z0(a);return t.concat(a,a.visualViewport||[],Qd(i)?i:[],s&&r?qu(s):[])}return t.concat(i,qu(i,[],r))}function Z0(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function hR(e){const t=kn(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const i=Jn(e),o=i?e.offsetWidth:r,a=i?e.offsetHeight:n,s=hp(r)!==o||hp(n)!==a;return s&&(r=o,n=a),{width:r,height:n,$:s}}function a1(e){return jn(e)?e:e.contextElement}function ol(e){const t=a1(e);if(!Jn(t))return Yn(1);const r=t.getBoundingClientRect(),{width:n,height:i,$:o}=hR(t);let a=(o?hp(r.width):r.width)/n,s=(o?hp(r.height):r.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const HW=Yn(0);function pR(e){const t=Cr(e);return!o1()||!t.visualViewport?HW:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function qW(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==Cr(e)?!1:t}function Va(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const i=e.getBoundingClientRect(),o=a1(e);let a=Yn(1);t&&(n?jn(n)&&(a=ol(n)):a=ol(e));const s=qW(o,r,n)?pR(o):Yn(0);let l=(i.left+s.x)/a.x,c=(i.top+s.y)/a.y,u=i.width/a.x,d=i.height/a.y;if(o){const f=Cr(o),h=n&&jn(n)?Cr(n):n;let v=f,m=Z0(v);for(;m&&n&&h!==v;){const y=ol(m),w=m.getBoundingClientRect(),b=kn(m),g=w.left+(m.clientLeft+parseFloat(b.paddingLeft))*y.x,_=w.top+(m.clientTop+parseFloat(b.paddingTop))*y.y;l*=y.x,c*=y.y,u*=y.x,d*=y.y,l+=g,c+=_,v=Cr(m),m=Z0(v)}}return mp({width:u,height:d,x:l,y:c})}function s1(e,t){const r=Jm(e).scrollLeft;return t?t.left+r:Va(ei(e)).left+r}function mR(e,t,r){r===void 0&&(r=!1);const n=e.getBoundingClientRect(),i=n.left+t.scrollLeft-(r?0:s1(e,n)),o=n.top+t.scrollTop;return{x:i,y:o}}function VW(e){let{elements:t,rect:r,offsetParent:n,strategy:i}=e;const o=i==="fixed",a=ei(n),s=t?Qm(t.floating):!1;if(n===a||s&&o)return r;let l={scrollLeft:0,scrollTop:0},c=Yn(1);const u=Yn(0),d=Jn(n);if((d||!d&&!o)&&((fc(n)!=="body"||Qd(a))&&(l=Jm(n)),Jn(n))){const h=Va(n);c=ol(n),u.x=h.x+n.clientLeft,u.y=h.y+n.clientTop}const f=a&&!d&&!o?mR(a,l,!0):Yn(0);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-l.scrollLeft*c.x+u.x+f.x,y:r.y*c.y-l.scrollTop*c.y+u.y+f.y}}function KW(e){return Array.from(e.getClientRects())}function GW(e){const t=ei(e),r=Jm(e),n=e.ownerDocument.body,i=Er(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),o=Er(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let a=-r.scrollLeft+s1(e);const s=-r.scrollTop;return kn(n).direction==="rtl"&&(a+=Er(t.clientWidth,n.clientWidth)-i),{width:i,height:o,x:a,y:s}}function YW(e,t){const r=Cr(e),n=ei(e),i=r.visualViewport;let o=n.clientWidth,a=n.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;const c=o1();(!c||c&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s,y:l}}
vendor: 4,621 bytes, line 203
203const XW=new Set(["absolute","fixed"]);function QW(e,t){const r=Va(e,!0,t==="fixed"),n=r.top+e.clientTop,i=r.left+e.clientLeft,o=Jn(e)?ol(e):Yn(1),a=e.clientWidth*o.x,s=e.clientHeight*o.y,l=i*o.x,c=n*o.y;return{width:a,height:s,x:l,y:c}}function FE(e,t,r){let n;if(t==="viewport")n=YW(e,r);else if(t==="document")n=GW(ei(e));else if(jn(t))n=QW(t,r);else{const i=pR(e);n={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return mp(n)}function vR(e,t){const r=Fo(e);return r===t||!jn(r)||$l(r)?!1:kn(r).position==="fixed"||vR(r,t)}function JW(e,t){const r=t.get(e);if(r)return r;let n=qu(e,[],!1).filter(s=>jn(s)&&fc(s)!=="body"),i=null;const o=kn(e).position==="fixed";let a=o?Fo(e):e;for(;jn(a)&&!$l(a);){const s=kn(a),l=i1(a);!l&&s.position==="fixed"&&(i=null),(o?!l&&!i:!l&&s.position==="static"&&!!i&&XW.has(i.position)||Qd(a)&&!l&&vR(e,a))?n=n.filter(u=>u!==a):i=s,a=Fo(a)}return t.set(e,n),n}function ZW(e){let{element:t,boundary:r,rootBoundary:n,strategy:i}=e;const a=[...r==="clippingAncestors"?Qm(t)?[]:JW(t,this._c):[].concat(r),n],s=a[0],l=a.reduce((c,u)=>{const d=FE(t,u,i);return c.top=Er(d.top,c.top),c.right=Bo(d.right,c.right),c.bottom=Bo(d.bottom,c.bottom),c.left=Er(d.left,c.left),c},FE(t,s,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function eH(e){const{width:t,height:r}=hR(e);return{width:t,height:r}}function tH(e,t,r){const n=Jn(t),i=ei(t),o=r==="fixed",a=Va(e,!0,o,t);let s={scrollLeft:0,scrollTop:0};const l=Yn(0);function c(){l.x=s1(i)}if(n||!n&&!o)if((fc(t)!=="body"||Qd(i))&&(s=Jm(t)),n){const h=Va(t,!0,o,t);l.x=h.x+t.clientLeft,l.y=h.y+t.clientTop}else i&&c();o&&!n&&i&&c();const u=i&&!n&&!o?mR(i,s):Yn(0),d=a.left+s.scrollLeft-l.x-u.x,f=a.top+s.scrollTop-l.y-u.y;return{x:d,y:f,width:a.width,height:a.height}}function Vg(e){return kn(e).position==="static"}function UE(e,t){if(!Jn(e)||kn(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return ei(e)===r&&(r=r.ownerDocument.body),r}function gR(e,t){const r=Cr(e);if(Qm(e))return r;if(!Jn(e)){let i=Fo(e);for(;i&&!$l(i);){if(jn(i)&&!Vg(i))return i;i=Fo(i)}return r}let n=UE(e,t);for(;n&&DW(n)&&Vg(n);)n=UE(n,t);return n&&$l(n)&&Vg(n)&&!i1(n)?r:n||zW(e)||r}const rH=async function(e){const t=this.getOffsetParent||gR,r=this.getDimensions,n=await r(e.floating);return{reference:tH(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function nH(e){return kn(e).direction==="rtl"}const iH={convertOffsetParentRelativeRectToViewportRelativeRect:VW,getDocumentElement:ei,getClippingRect:ZW,getOffsetParent:gR,getElementRects:rH,getClientRects:KW,getDimensions:eH,getScale:ol,isElement:jn,isRTL:nH};function yR(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function oH(e,t){let r=null,n;const i=ei(e);function o(){var s;clearTimeout(n),(s=r)==null||s.disconnect(),r=null}function a(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),o();const c=e.getBoundingClientRect(),{left:u,top:d,width:f,height:h}=c;if(s||t(),!f||!h)return;const v=Uf(d),m=Uf(i.clientWidth-(u+f)),y=Uf(i.clientHeight-(d+h)),w=Uf(u),g={rootMargin:-v+"px "+-m+"px "+-y+"px "+-w+"px",threshold:Er(0,Bo(1,l))||1};let _=!0;function S(E){const O=E[0].intersectionRatio;if(O!==l){if(!_)return a();O?a(!1,O):n=setTimeout(()=>{a(!1,1e-7)},1e3)}O===1&&!yR(c,e.getBoundingClientRect())&&a(),_=!1}try{r=new IntersectionObserver(S,{...g,root:i.ownerDocument})}catch{r=new IntersectionObserver(S,g)}r.observe(e)}return a(!0),o}function aH(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,c=a1(e),u=i||o?[...c?qu(c):[],...qu(t)]:[];u.forEach(w=>{i&&w.addEventListener("scroll",r,{passive:!0}),o&&w.addEventListener("resize",r)});const d=c&&s?oH(c,r):null;let f=-1,h=null;a&&(h=new ResizeObserver(w=>{let[b]=w;b&&b.target===c&&h&&(h.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var g;(g=h)==null||g.observe(t)})),r()}),c&&!l&&h.observe(c),h.observe(t));let v,m=l?Va(e):null;l&&y();function y(){const w=Va(e);m&&!yR(m,w)&&r(),m=w,v=requestAnimationFrame(y)}return r(),()=>{var w;u.forEach(b=>{i&&b.removeEventListener("scroll",r),o&&b.removeEventListener("resize",r)}),d==null||d(),(w=h)==null||w.disconnect(),h=null,l&&cancelAnimationFrame(v)}}const sH=kW,lH=NW,cH=AW,uH=$W,dH=CW,zE=TW,fH=RW,hH=(e,t,r)=>{const n=new Map,i={platform:iH,...r},o={...i.platform,_c:n};return PW(e,t,{...i,platform:o})};var pH=typeof document<"u",mH=function(){},jh=pH?x.useLayoutEffect:mH;function vp(e,t){if(e===t)return!0;
vendor: 3,174 bytes, line 203
203if(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(!vp(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 o=i[n];if(!(o==="_owner"&&e.$$typeof)&&!vp(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function bR(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function WE(e,t){const r=bR(e);return Math.round(t*r)/r}function Kg(e){const t=x.useRef(e);return jh(()=>{t.current=e}),t}function vH(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:i,elements:{reference:o,floating:a}={},transform:s=!0,whileElementsMounted:l,open:c}=e,[u,d]=x.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[f,h]=x.useState(n);vp(f,n)||h(n);const[v,m]=x.useState(null),[y,w]=x.useState(null),b=x.useCallback($=>{$!==E.current&&(E.current=$,m($))},[]),g=x.useCallback($=>{$!==O.current&&(O.current=$,w($))},[]),_=o||v,S=a||y,E=x.useRef(null),O=x.useRef(null),P=x.useRef(u),T=l!=null,j=Kg(l),C=Kg(i),k=Kg(c),L=x.useCallback(()=>{if(!E.current||!O.current)return;const $={placement:t,strategy:r,middleware:f};C.current&&($.platform=C.current),hH(E.current,O.current,$).then(I=>{const U={...I,isPositioned:k.current!==!1};M.current&&!vp(P.current,U)&&(P.current=U,ss.flushSync(()=>{d(U)}))})},[f,t,r,C,k]);jh(()=>{c===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,d($=>({...$,isPositioned:!1})))},[c]);const M=x.useRef(!1);jh(()=>(M.current=!0,()=>{M.current=!1}),[]),jh(()=>{if(_&&(E.current=_),S&&(O.current=S),_&&S){if(j.current)return j.current(_,S,L);L()}},[_,S,L,j,T]);const N=x.useMemo(()=>({reference:E,floating:O,setReference:b,setFloating:g}),[b,g]),D=x.useMemo(()=>({reference:_,floating:S}),[_,S]),B=x.useMemo(()=>{const $={position:r,left:0,top:0};if(!D.floating)return $;const I=WE(D.floating,u.x),U=WE(D.floating,u.y);return s?{...$,transform:"translate("+I+"px, "+U+"px)",...bR(D.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:I,top:U}},[r,s,D.floating,u.x,u.y]);return x.useMemo(()=>({...u,update:L,refs:N,elements:D,floatingStyles:B}),[u,L,N,D,B])}const gH=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?zE({element:n.current,padding:i}).fn(r):{}:n?zE({element:n,padding:i}).fn(r):{}}}},yH=(e,t)=>({...sH(e),options:[e,t]}),bH=(e,t)=>({...lH(e),options:[e,t]}),wH=(e,t)=>({...fH(e),options:[e,t]}),xH=(e,t)=>({...cH(e),options:[e,t]}),SH=(e,t)=>({...uH(e),options:[e,t]}),_H=(e,t)=>({...dH(e),options:[e,t]}),EH=(e,t)=>({...gH(e),options:[e,t]});var OH="Arrow",wR=x.forwardRef((e,t)=>{const{children:r,width:n=10,height:i=5,...o}=e;return p.jsx(se.svg,{...o,ref:t,width:n,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:p.jsx("polygon",{points:"0,0 30,0 15,10"})})});wR.displayName=OH;var PH=wR;
vendor: 5,272 bytes, line 203
203function l1(e){const[t,r]=x.useState(void 0);return Pt(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const o=i[0];let a,s;if("borderBoxSize"in o){const l=o.borderBoxSize,c=Array.isArray(l)?l[0]:l;a=c.inlineSize,s=c.blockSize}else a=e.offsetWidth,s=e.offsetHeight;r({width:a,height:s})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var c1="Popper",[xR,Zm]=$r(c1),[TH,SR]=xR(c1),_R=e=>{const{__scopePopper:t,children:r}=e,[n,i]=x.useState(null);return p.jsx(TH,{scope:t,anchor:n,onAnchorChange:i,children:r})};_R.displayName=c1;var ER="PopperAnchor",OR=x.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...i}=e,o=SR(ER,r),a=x.useRef(null),s=ye(t,a);return x.useEffect(()=>{o.onAnchorChange((n==null?void 0:n.current)||a.current)}),n?null:p.jsx(se.div,{...i,ref:s})});OR.displayName=ER;var u1="PopperContent",[AH,CH]=xR(u1),PR=x.forwardRef((e,t)=>{var Y,pe,q,Q,X,F;const{__scopePopper:r,side:n="bottom",sideOffset:i=0,align:o="center",alignOffset:a=0,arrowPadding:s=0,avoidCollisions:l=!0,collisionBoundary:c=[],collisionPadding:u=0,sticky:d="partial",hideWhenDetached:f=!1,updatePositionStrategy:h="optimized",onPlaced:v,...m}=e,y=SR(u1,r),[w,b]=x.useState(null),g=ye(t,we=>b(we)),[_,S]=x.useState(null),E=l1(_),O=(E==null?void 0:E.width)??0,P=(E==null?void 0:E.height)??0,T=n+(o!=="center"?"-"+o:""),j=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},C=Array.isArray(c)?c:[c],k=C.length>0,L={padding:j,boundary:C.filter(kH),altBoundary:k},{refs:M,floatingStyles:N,placement:D,isPositioned:B,middlewareData:$}=vH({strategy:"fixed",placement:T,whileElementsMounted:(...we)=>aH(...we,{animationFrame:h==="always"}),elements:{reference:y.anchor},middleware:[yH({mainAxis:i+P,alignmentAxis:a}),l&&bH({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?wH():void 0,...L}),l&&xH({...L}),SH({...L,apply:({elements:we,rects:he,availableWidth:ze,availableHeight:Le})=>{const{width:st,height:ir}=he.reference,gr=we.floating.style;gr.setProperty("--radix-popper-available-width",`${ze}px`),gr.setProperty("--radix-popper-available-height",`${Le}px`),gr.setProperty("--radix-popper-anchor-width",`${st}px`),gr.setProperty("--radix-popper-anchor-height",`${ir}px`)}}),_&&EH({element:_,padding:s}),NH({arrowWidth:O,arrowHeight:P}),f&&_H({strategy:"referenceHidden",...L})]}),[I,U]=CR(D),H=_t(v);Pt(()=>{B&&(H==null||H())},[B,H]);const z=(Y=$.arrow)==null?void 0:Y.x,K=(pe=$.arrow)==null?void 0:pe.y,te=((q=$.arrow)==null?void 0:q.centerOffset)!==0,[fe,Ee]=x.useState();return Pt(()=>{w&&Ee(window.getComputedStyle(w).zIndex)},[w]),p.jsx("div",{ref:M.setFloating,"data-radix-popper-content-wrapper":"",style:{...N,transform:B?N.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:fe,"--radix-popper-transform-origin":[(Q=$.transformOrigin)==null?void 0:Q.x,(X=$.transformOrigin)==null?void 0:X.y].join(" "),...((F=$.hide)==null?void 0:F.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:p.jsx(AH,{scope:r,placedSide:I,onArrowChange:S,arrowX:z,arrowY:K,shouldHideArrow:te,children:p.jsx(se.div,{"data-side":I,"data-align":U,...m,ref:g,style:{...m.style,animation:B?void 0:"none"}})})})});PR.displayName=u1;var TR="PopperArrow",jH={top:"bottom",right:"left",bottom:"top",left:"right"},AR=x.forwardRef(function(t,r){const{__scopePopper:n,...i}=t,o=CH(TR,n),a=jH[o.placedSide];return p.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:p.jsx(PH,{...i,ref:r,style:{...i.style,display:"block"}})})});AR.displayName=TR;function kH(e){return e!==null}var NH=e=>({name:"transformOrigin",options:e,fn(t){var y,w,b;const{placement:r,rects:n,middlewareData:i}=t,a=((y=i.arrow)==null?void 0:y.centerOffset)!==0,s=a?0:e.arrowWidth,l=a?0:e.arrowHeight,[c,u]=CR(r),d={start:"0%",center:"50%",end:"100%"}[u],f=(((w=i.arrow)==null?void 0:w.x)??0)+s/2,h=(((b=i.arrow)==null?void 0:b.y)??0)+l/2;let v="",m="";return c==="bottom"?(v=a?d:`${f}px`,m=`${-l}px`):c==="top"?(v=a?d:`${f}px`,m=`${n.floating.height+l}px`):c==="right"?(v=`${-l}px`,m=a?d:`${h}px`):c==="left"&&(v=`${n.floating.width+l}px`,m=a?d:`${h}px`),{data:{x:v,y:m}}}});function CR(e){const[t,r="center"]=e.split("-");return[t,r]}var RH=_R,jR=OR,kR=PR,NR=AR,[ev,qxe]=$r("Tooltip",[Zm]),d1=Zm(),RR="TooltipProvider",$H=700,HE="tooltip.open",[MH,$R]=ev(RR),MR=e=>{const{__scopeTooltip:t,delayDuration:r=$H,skipDelayDuration:n=300,disableHoverableContent:i=!1,children:o}=e,a=x.useRef(!0),s=x.useRef(!1),l=x.useRef(0);return x.useEffect(()=>{const c=l.current;return()=>window.clearTimeout(c)},[]),p.jsx(MH,{scope:t,isOpenDelayedRef:a,delayDuration:r,onOpen:x.useCallback(()=>{window.clearTimeout(l.current),a.current=!1},[]),onClose:x.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>a.current=!0,n)},[n]),isPointerInTransitRef:s,onPointerInTransitChange:x.useCallback(c=>{s.current=c}
vendor: 4,120 bytes, line 203
203,[]),disableHoverableContent:i,children:o})};MR.displayName=RR;var IR="Tooltip",[Vxe,tv]=ev(IR),eb="TooltipTrigger",IH=x.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,i=tv(eb,r),o=$R(eb,r),a=d1(r),s=x.useRef(null),l=ye(t,s,i.onTriggerChange),c=x.useRef(!1),u=x.useRef(!1),d=x.useCallback(()=>c.current=!1,[]);return x.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),p.jsx(jR,{asChild:!0,...a,children:p.jsx(se.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...n,ref:l,onPointerMove:ie(e.onPointerMove,f=>{f.pointerType!=="touch"&&!u.current&&!o.isPointerInTransitRef.current&&(i.onTriggerEnter(),u.current=!0)}),onPointerLeave:ie(e.onPointerLeave,()=>{i.onTriggerLeave(),u.current=!1}),onPointerDown:ie(e.onPointerDown,()=>{i.open&&i.onClose(),c.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:ie(e.onFocus,()=>{c.current||i.onOpen()}),onBlur:ie(e.onBlur,i.onClose),onClick:ie(e.onClick,i.onClose)})})});IH.displayName=eb;var DH="TooltipPortal",[Kxe,LH]=ev(DH,{forceMount:void 0}),Ml="TooltipContent",DR=x.forwardRef((e,t)=>{const r=LH(Ml,e.__scopeTooltip),{forceMount:n=r.forceMount,side:i="top",...o}=e,a=tv(Ml,e.__scopeTooltip);return p.jsx(tn,{present:n||a.open,children:a.disableHoverableContent?p.jsx(LR,{side:i,...o,ref:t}):p.jsx(BH,{side:i,...o,ref:t})})}),BH=x.forwardRef((e,t)=>{const r=tv(Ml,e.__scopeTooltip),n=$R(Ml,e.__scopeTooltip),i=x.useRef(null),o=ye(t,i),[a,s]=x.useState(null),{trigger:l,onClose:c}=r,u=i.current,{onPointerInTransitChange:d}=n,f=x.useCallback(()=>{s(null),d(!1)},[d]),h=x.useCallback((v,m)=>{const y=v.currentTarget,w={x:v.clientX,y:v.clientY},b=HH(w,y.getBoundingClientRect()),g=qH(w,b),_=VH(m.getBoundingClientRect()),S=GH([...g,..._]);s(S),d(!0)},[d]);return x.useEffect(()=>()=>f(),[f]),x.useEffect(()=>{if(l&&u){const v=y=>h(y,u),m=y=>h(y,l);return l.addEventListener("pointerleave",v),u.addEventListener("pointerleave",m),()=>{l.removeEventListener("pointerleave",v),u.removeEventListener("pointerleave",m)}}},[l,u,h,f]),x.useEffect(()=>{if(a){const v=m=>{const y=m.target,w={x:m.clientX,y:m.clientY},b=(l==null?void 0:l.contains(y))||(u==null?void 0:u.contains(y)),g=!KH(w,a);b?f():g&&(f(),c())};return document.addEventListener("pointermove",v),()=>document.removeEventListener("pointermove",v)}},[l,u,a,c,f]),p.jsx(LR,{...e,ref:o})}),[FH,UH]=ev(IR,{isInside:!1}),zH=O5("TooltipContent"),LR=x.forwardRef((e,t)=>{const{__scopeTooltip:r,children:n,"aria-label":i,onEscapeKeyDown:o,onPointerDownOutside:a,...s}=e,l=tv(Ml,r),c=d1(r),{onClose:u}=l;return x.useEffect(()=>(document.addEventListener(HE,u),()=>document.removeEventListener(HE,u)),[u]),x.useEffect(()=>{if(l.trigger){const d=f=>{const h=f.target;h!=null&&h.contains(l.trigger)&&u()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[l.trigger,u]),p.jsx(Gd,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:d=>d.preventDefault(),onDismiss:u,children:p.jsxs(kR,{"data-state":l.stateAttribute,...c,...s,ref:t,style:{...s.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[p.jsx(zH,{children:n}),p.jsx(FH,{scope:r,isInside:!0,children:p.jsx(K5,{id:l.contentId,role:"tooltip",children:i||n})})]})})});DR.displayName=Ml;var BR="TooltipArrow",WH=x.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,i=d1(r);return UH(BR,r).isInside?null:p.jsx(NR,{...i,...n,ref:t})});WH.displayName=BR;function HH(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(r,n,i,o)){case o:return"left";case i:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function qH(e,t,r=5){const n=[];
203switch(t){case"top":n.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":n.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":n.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":n.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return n}function VH(e){const{top:t,right:r,bottom:n,left:i}=e;return[{x:i,y:t},{x:r,y:t},{x:r,y:n},{x:i,y:n}]}function KH(e,t){const{x:r,y:n}=e;let i=!1;for(let o=0,a=t.length-1;o<t.length;a=o++){const s=t[o],l=t[a],c=s.x,u=s.y,d=l.x,f=l.y;u>n!=f>n&&r<(d-c)*(n-u)/(f-u)+c&&(i=!i)}return i}function GH(e){const t=e.slice();return t.sort((r,n)=>r.x<n.x?-1:r.x>n.x?1:r.y<n.y?-1:r.y>n.y?1:0),YH(t)}function YH(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const i=e[n];for(;t.length>=2;){const o=t[t.length-1],a=t[t.length-2];if((o.x-a.x)*(i.y-a.y)>=(o.y-a.y)*(i.x-a.x))t.pop();else break}t.push(i)}t.pop();const r=[];for(let n=e.length-1;n>=0;n--){const i=e[n];for(;r.length>=2;){const o=r[r.length-1],a=r[r.length-2];if((o.x-a.x)*(i.y-a.y)>=(o.y-a.y)*(i.x-a.x))r.pop();else break}r.push(i)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}var XH=MR,FR=DR;const QH=XH,JH=x.forwardRef(({className:e,sideOffset:t=4,...r},n)=>p.jsx(FR,{ref:n,sideOffset:t,className:Z("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r}));JH.displayName=FR.displayName;function He(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 Uo(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}const UR=6048e5,ZH=864e5,zf=43200,qE=1440;let e8={};function Jd(){return e8}function Vu(e,t){var s,l,c,u;const r=Jd(),n=(t==null?void 0:t.weekStartsOn)??((l=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:l.weekStartsOn)??r.weekStartsOn??((u=(c=r.locale)==null?void 0:c.options)==null?void 0:u.weekStartsOn)??0,i=He(e),o=i.getDay(),a=(o<n?7:0)+o-n;return i.setDate(i.getDate()-a),i.setHours(0,0,0,0),i}function gp(e){return Vu(e,{weekStartsOn:1})}function zR(e){const t=He(e),r=t.getFullYear(),n=Uo(e,0);n.setFullYear(r+1,0,4),n.setHours(0,0,0,0);const i=gp(n),o=Uo(e,0);o.setFullYear(r,0,4),o.setHours(0,0,0,0);const a=gp(o);return t.getTime()>=i.getTime()?r+1:t.getTime()>=a.getTime()?r:r-1}function VE(e){const t=He(e);return t.setHours(0,0,0,0),t}function yp(e){const t=He(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 t8(e,t){const r=VE(e),n=VE(t),i=+r-yp(r),o=+n-yp(n);return Math.round((i-o)/ZH)}function r8(e){const t=zR(e),r=Uo(e,0);return r.setFullYear(t,0,4),r.setHours(0,0,0,0),gp(r)}function kh(e,t){const r=He(e),n=He(t),i=r.getTime()-n.getTime();return i<0?-1:i>0?1:i}function n8(e){return Uo(e,Date.now())}function i8(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function o8(e){if(!i8(e)&&typeof e!="number")return!1;const t=He(e);return!isNaN(Number(t))}function a8(e,t){const r=He(e),n=He(t),i=r.getFullYear()-n.getFullYear(),o=r.getMonth()-n.getMonth();return i*12+o}function s8(e){return t=>{const n=(e?Math[e]:Math.trunc)(t);return n===0?0:n}}function l8(e,t){return+He(e)-+He(t)}function c8(e){const t=He(e);return t.setHours(23,59,59,999),t}function u8(e){const t=He(e),r=t.getMonth();return t.setFullYear(t.getFullYear(),r+1,0),t.setHours(23,59,59,999),t}function d8(e){const t=He(e);return+c8(t)==+u8(t)}function f8(e,t){const r=He(e),n=He(t),i=kh(r,n),o=Math.abs(a8(r,n));let a;if(o<1)a=0;else{r.getMonth()===1&&r.getDate()>27&&r.setDate(30),r.setMonth(r.getMonth()-i*o);let s=kh(r,n)===-i;d8(He(e))&&o===1&&kh(e,n)===1&&(s=!1),a=i*(o-Number(s))}return a===0?0:a}function h8(e,t,r){const n=l8(e,t)/1e3;return s8(r==null?void 0:r.roundingMethod)(n)}function p8(e){const t=He(e),r=Uo(e,0);return r.setFullYear(t.getFullYear(),0,1),r.setHours(0,0,0,0),r}const m8={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"}},v8=(e,t,r)=>{let n;const i=m8[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 Gg(e){return(t={})=>{const r=t.width?String(t.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}const g8={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},y8={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},b8={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},w8={date:Gg({formats:g8,defaultWidth:"full"}),time:Gg({formats:y8,defaultWidth:"full"}),dateTime:Gg({formats:b8,defaultWidth:"full"})},x8={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},S8=(e,t,r,n)=>x8[e];function Lc(e){return(t,r)=>{const n=r!=null&&r.context?String(r.context):"standalone";let i;if(n==="formatting"&&e.formattingValues){const a=e.defaultFormattingWidth||e.defaultWidth,s=r!=null&&r.width?String(r.width):a;i=e.formattingValues[s]||e.formattingValues[a]}else{const a=e.defaultWidth,s=r!=null&&r.width?String(r.width):e.defaultWidth;i=e.values[s]||e.values[a]}const o=e.argumentCallback?e.argumentCallback(t):t;return i[o]}}const _8={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},E8={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},O8={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"]},P8={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
203ay","Saturday"]},T8={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"}},A8={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"}},C8=(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"},j8={ordinalNumber:C8,era:Lc({values:_8,defaultWidth:"wide"}),quarter:Lc({values:E8,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Lc({values:O8,defaultWidth:"wide"}),day:Lc({values:P8,defaultWidth:"wide"}),dayPeriod:Lc({values:T8,defaultWidth:"wide",formattingValues:A8,defaultFormattingWidth:"wide"})};function Bc(e){return(t,r={})=>{const n=r.width,i=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],o=t.match(i);if(!o)return null;const a=o[0],s=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?N8(s,d=>d.test(a)):k8(s,d=>d.test(a));let c;c=e.valueCallback?e.valueCallback(l):l,c=r.valueCallback?r.valueCallback(c):c;const u=t.slice(a.length);return{value:c,rest:u}}}function k8(e,t){for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t(e[r]))return r}function N8(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return r}function R8(e){return(t,r={})=>{const n=t.match(e.matchPattern);if(!n)return null;const i=n[0],o=t.match(e.parsePattern);if(!o)return null;let a=e.valueCallback?e.valueCallback(o[0]):o[0];a=r.valueCallback?r.valueCallback(a):a;const s=t.slice(i.length);return{value:a,rest:s}}}const $8=/^(\d+)(th|st|nd|rd)?/i,M8=/\d+/i,I8={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},D8={any:[/^b/i,/^(a|c)/i]},L8={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},B8={any:[/1/i,/2/i,/3/i,/4/i]},F8={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},U8={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]},z8={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},W8={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]},H8={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},q8={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}},V8={ordinalNumber:R8({matchPattern:$8,parsePattern:M8,valueCallback:e=>parseInt(e,10)}),era:Bc({matchPatterns:I8,defaultMatchWidth:"wide",parsePatterns:D8,defaultParseWidth:"any"}),quarter:Bc({matchPatterns:L8,defaultMatchWidth:"wide",parsePatterns:B8,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Bc({matchPatterns:F8,defaultMatchWidth:"wide",parsePatterns:U8,defaultParseWidth:"any"}),day:Bc({matchPatterns:z8,defaultMatchWidth:"wide",parsePatterns:W8,defaultParseWidth:"any"}),dayPeriod:Bc({matchPatterns:H8,defaultMatchWidth:"any",parsePatterns:q8,defaultParseWidth:"any"})},WR={code:"en-US",formatDistance:v8,formatLong:w8,formatRelative:S8,localize:j8,match:V8,options:{weekStartsOn:0,firstWeekContainsDate:1}};function K8(e){const t=He(e);return t8(t,p8(t))+1}function G8(e){const t=He(e),r=+gp(t)-+r8(t);return Math.round(r/UR)+1}function HR(e,t){var u,d,f,h;const r=He(e),n=r.getFullYear(),i=Jd(),o=(t==null?void 0:t.firstWeekContainsDate)??((d=(u=t==null?void 0:t.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??i.firstWeekContainsDate??((h=(f=i.locale)==null?void 0:f.options)==null?void 0:h.firstWeekContainsDate)??1,a=Uo(e,0);a.setFullYear(n+1,0,o),a.setHours(0,0,0,0);const s=Vu(a,t),l=Uo(e,0);l.setFullYear(n,0,o),l.setHours(0,0,0,0);const c=Vu(l,t);return r.getTime()>=s.getTime()?n+1:r.getTime()>=c.getTime()?n:n-1}function Y8(e,t){var s,l,c,u;const r=Jd(),n=(t==null?void 0:t.firstWeekContainsDate)??((l=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:l.firstWeekContainsDate)??r.firstWeekContainsDate??((u=(c=r.locale)==null?void 0:c.options)==null?void 0:u.firstWeekContainsDate)??1,i=HR(e,t),o=Uo(e,0);return o.setFullYear(i,0,n),o.setHours(0,0,0,0),Vu(o,t)}function X8(e,t){const r=He(e),n=+Vu(r,t)-+Y8(r,t);return Math.round(n/UR)+1}function Me(e,t){const r=e<0?"-":"",n=Math.abs(e).toString().padStart(t,"0");return r+n}const Qi={y(e,t){const r=e.getFullYear(),n=r>0?r:1-r;return Me(t==="yy"?n%100:n,t.length)},M(e,t){const r=e.getMonth();return t==="M"?String(r+1):Me(r+1,2)},d(e,t){return Me(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 Me(e.getHours()%12||12,t.length)},H(e,t){return Me(e.getHours(),t.length)},m(e,t){return Me(e.getMinutes(),t.length)},s(e,t){return Me(e.getSeconds(),t.length)},S(e,t){const r=t.length,n=e.getMilliseconds(),i=Math.trunc(n*Math.pow(10,r-3));return Me(i,t.length)}},ys={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},KE={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 Qi.y(e,t)},Y:function(e,t,r,n){const i=HR(e,n),o=i>0?i:1-i;if(t==="YY"){const a=o%100;return Me(a,2)}return t==="Yo"?r.ordinalNumber(o,{unit:"year"}):Me(o,t.length)},R:function(e,t){const r=zR(e);return Me(r,t.length)},u:function(e,t){const r=e.getFullYear();return Me(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 Me(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 Me(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 Qi.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 Me(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=X8(e,n);return t==="wo"?r.ordinalNumber(i,{unit:"week"}):Me(i,t.length)},I:function(e,t,r){const n=G8(e);return t==="Io"?r.ordinalNumber(n,{unit:"week"}):Me(n,t.length)},d:function(e,t,r){return t==="do"?r.ordinalNumber(e.getDate(),{unit:"date"}):Qi.d(e,t)},D:function(e,t,r){const n=K8(e);return t==="Do"?r.ordinalNumber(n,{unit:"dayOfYear"}):Me(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(),o=(i-n.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return Me(o,2);case"eo":return r.ordinalNumber(o,{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(),o=(i-n.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return Me(o,t.length);case"co":return r.ordinalNumber(o,{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 Me(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=ys.noon:n===0?i=ys.midnight:i=n/12>
vendor: 4,402 bytes, line 203
203=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=ys.evening:n>=12?i=ys.afternoon:n>=4?i=ys.morning:i=ys.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 Qi.h(e,t)},H:function(e,t,r){return t==="Ho"?r.ordinalNumber(e.getHours(),{unit:"hour"}):Qi.H(e,t)},K:function(e,t,r){const n=e.getHours()%12;return t==="Ko"?r.ordinalNumber(n,{unit:"hour"}):Me(n,t.length)},k:function(e,t,r){let n=e.getHours();return n===0&&(n=24),t==="ko"?r.ordinalNumber(n,{unit:"hour"}):Me(n,t.length)},m:function(e,t,r){return t==="mo"?r.ordinalNumber(e.getMinutes(),{unit:"minute"}):Qi.m(e,t)},s:function(e,t,r){return t==="so"?r.ordinalNumber(e.getSeconds(),{unit:"second"}):Qi.s(e,t)},S:function(e,t){return Qi.S(e,t)},X:function(e,t,r){const n=e.getTimezoneOffset();if(n===0)return"Z";switch(t){case"X":return YE(n);case"XXXX":case"XX":return da(n);case"XXXXX":case"XXX":default:return da(n,":")}},x:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"x":return YE(n);case"xxxx":case"xx":return da(n);case"xxxxx":case"xxx":default:return da(n,":")}},O:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+GE(n,":");case"OOOO":default:return"GMT"+da(n,":")}},z:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+GE(n,":");case"zzzz":default:return"GMT"+da(n,":")}},t:function(e,t,r){const n=Math.trunc(e.getTime()/1e3);return Me(n,t.length)},T:function(e,t,r){const n=e.getTime();return Me(n,t.length)}};function GE(e,t=""){const r=e>0?"-":"+",n=Math.abs(e),i=Math.trunc(n/60),o=n%60;return o===0?r+String(i):r+String(i)+t+Me(o,2)}function YE(e,t){return e%60===0?(e>0?"-":"+")+Me(Math.abs(e)/60,2):da(e,t)}function da(e,t=""){const r=e>0?"-":"+",n=Math.abs(e),i=Me(Math.trunc(n/60),2),o=Me(n%60,2);return r+i+t+o}const XE=(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"})}},qR=(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"})}},Q8=(e,t)=>{const r=e.match(/(P+)(p+)?/)||[],n=r[1],i=r[2];if(!i)return XE(e,t);let o;switch(n){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;case"PPPP":default:o=t.dateTime({width:"full"});break}return o.replace("{{date}}",XE(n,t)).replace("{{time}}",qR(i,t))},J8={p:qR,P:Q8},Z8=/^D+$/,e6=/^Y+$/,t6=["D","DD","YY","YYYY"];function r6(e){return Z8.test(e)}function n6(e){return e6.test(e)}function i6(e,t,r){const n=o6(e,t,r);if(console.warn(n),t6.includes(e))throw new RangeError(n)}function o6(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 a6=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,s6=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,l6=/^'([^]*?)'?$/,c6=/''/g,u6=/[a-zA-Z]/;function cr(e,t,r){var u,d,f,h;const n=Jd(),i=n.locale??WR,o=n.firstWeekContainsDate??((d=(u=n.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??1,a=n.weekStartsOn??((h=(f=n.locale)==null?void 0:f.options)==null?void 0:h.weekStartsOn)??0,s=He(e);if(!o8(s))throw new RangeError("Invalid time value");let l=t.match(s6).map(v=>{const m=v[0];if(m==="p"||m==="P"){const y=J8[m];return y(v,i.formatLong)}return v}).join("").match(a6).map(v=>{if(v==="''")return{isToken:!1,value:"'"};const m=v[0];if(m==="'")return{isToken:!1,value:d6(v)};if(KE[m])return{isToken:!0,value:v};
203if(m.match(u6))throw new RangeError("Format string contains an unescaped latin alphabet character `"+m+"`");return{isToken:!1,value:v}});i.localize.preprocessor&&(l=i.localize.preprocessor(s,l));const c={firstWeekContainsDate:o,weekStartsOn:a,locale:i};return l.map(v=>{if(!v.isToken)return v.value;const m=v.value;(n6(m)||r6(m))&&i6(m,t,String(e));const y=KE[m[0]];return y(s,m,i.localize,c)}).join("")}function d6(e){const t=e.match(l6);return t?t[1].replace(c6,"'"):e}function f6(e,t,r){const n=Jd(),i=(r==null?void 0:r.locale)??n.locale??WR,o=2520,a=kh(e,t);if(isNaN(a))throw new RangeError("Invalid time value");const s=Object.assign({},r,{addSuffix:r==null?void 0:r.addSuffix,comparison:a});let l,c;a>0?(l=He(t),c=He(e)):(l=He(e),c=He(t));const u=h8(c,l),d=(yp(c)-yp(l))/1e3,f=Math.round((u-d)/60);let h;if(f<2)return r!=null&&r.includeSeconds?u<5?i.formatDistance("lessThanXSeconds",5,s):u<10?i.formatDistance("lessThanXSeconds",10,s):u<20?i.formatDistance("lessThanXSeconds",20,s):u<40?i.formatDistance("halfAMinute",0,s):u<60?i.formatDistance("lessThanXMinutes",1,s):i.formatDistance("xMinutes",1,s):f===0?i.formatDistance("lessThanXMinutes",1,s):i.formatDistance("xMinutes",f,s);if(f<45)return i.formatDistance("xMinutes",f,s);if(f<90)return i.formatDistance("aboutXHours",1,s);if(f<qE){const v=Math.round(f/60);return i.formatDistance("aboutXHours",v,s)}else{if(f<o)return i.formatDistance("xDays",1,s);if(f<zf){const v=Math.round(f/qE);return i.formatDistance("xDays",v,s)}else if(f<zf*2)return h=Math.round(f/zf),i.formatDistance("aboutXMonths",h,s)}if(h=f8(c,l),h<12){const v=Math.round(f/zf);return i.formatDistance("xMonths",v,s)}else{const v=h%12,m=Math.trunc(h/12);return v<3?i.formatDistance("aboutXYears",m,s):v<9?i.formatDistance("overXYears",m,s):i.formatDistance("almostXYears",m+1,s)}}function zo(e,t){return f6(e,n8(e),t)}const h6=[{to:"/",icon:QN,label:"Feed"},{to:"/sources",icon:Pz,label:"Sources"},{to:"/predictions",icon:Tz,label:"Predictions"},{to:"/confirmations",icon:xz,label:"Confirmations"},{to:"/twitter",icon:Cz,label:"Twitter"},{to:"/admin",icon:Oz,label:"Admin"}];function p6(){const e=ls();return p.jsxs("aside",{className:"fixed left-0 top-0 z-40 h-screen w-16 lg:w-56 flex flex-col border-r border-border bg-card",children:[p.jsxs("div",{className:"flex h-14 items-center gap-2 border-b border-border px-4",children:[p.jsx("div",{className:"h-7 w-7 rounded-lg bg-primary flex items-center justify-center",children:p.jsx(QN,{className:"h-4 w-4 text-primary-foreground"})}),p.jsx("span",{className:"hidden lg:block font-heading font-semibold text-sm tracking-tight",children:"NewsIntel"})]}),p.jsx("nav",{className:"flex-1 flex flex-col gap-1 p-2 pt-4",children:h6.map(({to:t,icon:r,label:n})=>{const i=e.pathname===t;return p.jsxs(R4,{to:t,className:Z("flex items-center gap-3 rounded-lg px-3 py-2 text-sm font-medium transition-colors",i?"bg-primary/10 text-primary":"text-muted-foreground hover:text-foreground hover:bg-muted"),children:[p.jsx(r,{className:"h-4 w-4 shrink-0"}),p.jsx("span",{className:"hidden lg:block",children:n})]},t)})})]})}function cs({children:e}){return p.jsxs("div",{className:"min-h-screen bg-background",children:[p.jsx(p6,{}),p.jsx("main",{className:"pl-16 lg:pl-56",children:p.jsx("div",{className:"p-6 max-w-[1400px]",children:e})})]})}const Pe=x.forwardRef(({className:e,...t},r)=>p.jsx("div",{ref:r,className:Z("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));Pe.displayName="Card";const mi=x.forwardRef(({className:e,...t},r)=>p.jsx("div",{ref:r,className:Z("flex flex-col space-y-1.5 p-6",e),...t}));mi.displayName="CardHeader";const vi=x.forwardRef(({className:e,...t},r)=>p.jsx("h3",{ref:r,className:Z("text-2xl font-semibold leading-none tracking-tight",e),...t}));vi.displayName="CardTitle";const m6=x.forwardRef(({className:e,...t},r)=>p.jsx("p",{ref:r,className:Z("text-sm text-muted-foreground",e),...t}));m6.displayName="CardDescription";const Te=x.forwardRef(({className:e,...t},r)=>p.jsx("div",{ref:r,className:Z("p-6 pt-0",e),...t}));Te.displayName="CardContent";const v6=x.forwardRef(({className:e,...t},r)=>p.jsx("div",{ref:r,className:Z("flex items-center p-6 pt-0",e),...t}));
vendor: 4,703 bytes, line 203
203v6.displayName="CardFooter";function Ku(e,[t,r]){return Math.min(r,Math.max(t,e))}var g6=x.createContext(void 0);function Zd(e){const t=x.useContext(g6);return e||t||"ltr"}var Yg=0;function VR(){x.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??QE()),document.body.insertAdjacentElement("beforeend",e[1]??QE()),Yg++,()=>{Yg===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Yg--}},[])}function QE(){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 Xg="focusScope.autoFocusOnMount",Qg="focusScope.autoFocusOnUnmount",JE={bubbles:!1,cancelable:!0},y6="FocusScope",f1=x.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...a}=e,[s,l]=x.useState(null),c=_t(i),u=_t(o),d=x.useRef(null),f=ye(t,m=>l(m)),h=x.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;x.useEffect(()=>{if(n){let m=function(g){if(h.paused||!s)return;const _=g.target;s.contains(_)?d.current=_:Zi(d.current,{select:!0})},y=function(g){if(h.paused||!s)return;const _=g.relatedTarget;_!==null&&(s.contains(_)||Zi(d.current,{select:!0}))},w=function(g){if(document.activeElement===document.body)for(const S of g)S.removedNodes.length>0&&Zi(s)};document.addEventListener("focusin",m),document.addEventListener("focusout",y);const b=new MutationObserver(w);return s&&b.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",y),b.disconnect()}}},[n,s,h.paused]),x.useEffect(()=>{if(s){eO.add(h);const m=document.activeElement;if(!s.contains(m)){const w=new CustomEvent(Xg,JE);s.addEventListener(Xg,c),s.dispatchEvent(w),w.defaultPrevented||(b6(E6(KR(s)),{select:!0}),document.activeElement===m&&Zi(s))}return()=>{s.removeEventListener(Xg,c),setTimeout(()=>{const w=new CustomEvent(Qg,JE);s.addEventListener(Qg,u),s.dispatchEvent(w),w.defaultPrevented||Zi(m??document.body,{select:!0}),s.removeEventListener(Qg,u),eO.remove(h)},0)}}},[s,c,u,h]);const v=x.useCallback(m=>{if(!r&&!n||h.paused)return;const y=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,w=document.activeElement;if(y&&w){const b=m.currentTarget,[g,_]=w6(b);g&&_?!m.shiftKey&&w===_?(m.preventDefault(),r&&Zi(g,{select:!0})):m.shiftKey&&w===g&&(m.preventDefault(),r&&Zi(_,{select:!0})):w===b&&m.preventDefault()}},[r,n,h.paused]);return p.jsx(se.div,{tabIndex:-1,...a,ref:f,onKeyDown:v})});f1.displayName=y6;function b6(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(Zi(n,{select:t}),document.activeElement!==r)return}function w6(e){const t=KR(e),r=ZE(t,e),n=ZE(t.reverse(),e);return[r,n]}function KR(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 ZE(e,t){for(const r of e)if(!x6(r,{upTo:t}))return r}function x6(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 S6(e){return e instanceof HTMLInputElement&&"select"in e}function Zi(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&S6(e)&&t&&e.select()}}var eO=_6();function _6(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=tO(e,t),e.unshift(t)},remove(t){var r;e=tO(e,t),(r=e[0])==null||r.resume()}}}function tO(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function E6(e){return e.filter(t=>t.tagName!=="A")}function h1(e){const t=x.useRef({value:e,previous:e});return x.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var O6=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},bs=new WeakMap,Wf=new WeakMap,Hf={},Jg=0,GR=function(e){return e&&(e.host||GR(e.parentNode))},P6=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=GR(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})},T6=function(e,t,r,n){var i=P6(t,Array.isArray(e)?e:[e]);Hf[r]||(Hf[r]=new WeakMap);var o=Hf[r],a=[],s=new Set,l=new Set(i),c=function(d){!d||s.has(d)||(s.add(d),c(d.parentNode))};
vendor: 6,462 bytes, lines 203-218
203i.forEach(c);var u=function(d){!d||l.has(d)||Array.prototype.forEach.call(d.children,function(f){if(s.has(f))u(f);else try{var h=f.getAttribute(n),v=h!==null&&h!=="false",m=(bs.get(f)||0)+1,y=(o.get(f)||0)+1;bs.set(f,m),o.set(f,y),a.push(f),m===1&&v&&Wf.set(f,!0),y===1&&f.setAttribute(r,"true"),v||f.setAttribute(n,"true")}catch(w){console.error("aria-hidden: cannot operate on ",f,w)}})};return u(t),s.clear(),Jg++,function(){a.forEach(function(d){var f=bs.get(d)-1,h=o.get(d)-1;bs.set(d,f),o.set(d,h),f||(Wf.has(d)||d.removeAttribute(n),Wf.delete(d)),h||d.removeAttribute(r)}),Jg--,Jg||(bs=new WeakMap,bs=new WeakMap,Wf=new WeakMap,Hf={})}},YR=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),i=O6(e);return i?(n.push.apply(n,Array.from(i.querySelectorAll("[aria-live]"))),T6(n,i,r,"aria-hidden")):function(){return null}},Hn=function(){return Hn=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},Hn.apply(this,arguments)};function XR(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 A6(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,o;n<i;n++)(o||!(n in t))&&(o||(o=Array.prototype.slice.call(t,0,n)),o[n]=t[n]);return e.concat(o||Array.prototype.slice.call(t))}var Nh="right-scroll-bar-position",Rh="width-before-scroll-bar",C6="with-scroll-bars-hidden",j6="--removed-body-scroll-bar-size";function Zg(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function k6(e,t){var r=x.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 N6=typeof window<"u"?x.useLayoutEffect:x.useEffect,rO=new WeakMap;function R6(e,t){var r=k6(null,function(n){return e.forEach(function(i){return Zg(i,n)})});return N6(function(){var n=rO.get(r);if(n){var i=new Set(n),o=new Set(e),a=r.current;i.forEach(function(s){o.has(s)||Zg(s,null)}),o.forEach(function(s){i.has(s)||Zg(s,a)})}rO.set(r,e)},[e]),r}function $6(e){return e}function M6(e,t){t===void 0&&(t=$6);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(o){var a=t(o,n);return r.push(a),function(){r=r.filter(function(s){return s!==a})}},assignSyncMedium:function(o){for(n=!0;r.length;){var a=r;r=[],a.forEach(o)}r={push:function(s){return o(s)},filter:function(){return r}}},assignMedium:function(o){n=!0;var a=[];if(r.length){var s=r;r=[],s.forEach(o),a=r}var l=function(){var u=a;a=[],u.forEach(o)},c=function(){return Promise.resolve().then(l)};c(),r={push:function(u){a.push(u),c()},filter:function(u){return a=a.filter(u),r}}}};return i}function I6(e){e===void 0&&(e={});var t=M6(null);return t.options=Hn({async:!0,ssr:!1},e),t}var QR=function(e){var t=e.sideCar,r=XR(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 x.createElement(n,Hn({},r))};QR.isSideCarExport=!0;function D6(e,t){return e.useMedium(t),QR}var JR=I6(),ey=function(){},rv=x.forwardRef(function(e,t){var r=x.useRef(null),n=x.useState({onScrollCapture:ey,onWheelCapture:ey,onTouchMoveCapture:ey}),i=n[0],o=n[1],a=e.forwardProps,s=e.children,l=e.className,c=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,h=e.noRelative,v=e.noIsolation,m=e.inert,y=e.allowPinchZoom,w=e.as,b=w===void 0?"div":w,g=e.gapMode,_=XR(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=f,E=R6([r,t]),O=Hn(Hn({},_),i);return x.createElement(x.Fragment,null,u&&x.createElement(S,{sideCar:JR,removeScrollBar:c,shards:d,noRelative:h,noIsolation:v,inert:m,setCallbacks:o,allowPinchZoom:!!y,lockRef:r,gapMode:g}),a?x.cloneElement(x.Children.only(s),Hn(Hn({},O),{ref:E})):x.createElement(b,Hn({},O,{className:l,ref:E}),s))});rv.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};rv.classNames={fullWidth:Rh,zeroRight:Nh};var L6=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function B6(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=L6();return t&&e.setAttribute("nonce",t),e}function F6(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function U6(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var z6=function(){var e=0,t=null;return{add:function(r){e==0&&(t=B6())&&(F6(t,r),U6(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},W6=function(){var e=z6();return function(t,r){x.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},ZR=function(){var e=W6(),t=function(r){var n=r.styles,i=r.dynamic;return e(n,i),null};return t},H6={left:0,top:0,right:0,gap:0},ty=function(e){return parseInt(e||"",10)||0},q6=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[ty(r),ty(n),ty(i)]},V6=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return H6;var t=q6(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])}},K6=ZR(),al="data-scroll-locked",G6=function(e,t,r,n){var i=e.left,o=e.top,a=e.right,s=e.gap;return r===void 0&&(r="margin"),`
204  .`.concat(C6,` {
205   overflow: hidden `).concat(n,`;
206   padding-right: `).concat(s,"px ").concat(n,`;
207  }
208  body[`).concat(al,`] {
209    overflow: hidden `).concat(n,`;
210    overscroll-behavior: contain;
211    `).concat([t&&"position: relative ".concat(n,";"),r==="margin"&&`
212    padding-left: `.concat(i,`px;
213    padding-top: `).concat(o,`px;
214    padding-right: `).concat(a,`px;
215    margin-left:0;
216    margin-top:0;
217    margin-right: `).concat(s,"px ").concat(n,`;
218    `),r==="padding"&&"padding-right: ".concat(s,"px ").concat(n,";
218")].filter(Boolean).join(""),`
219  }
220  
221  .`).concat(Nh,` {
222    right: `).concat(s,"px ").concat(n,`;
223  }
224  
225  .`).concat(Rh,` {
226    margin-right: `).concat(s,"px ").concat(n,`;
227  }
228  
229  .`).concat(Nh," .").concat(Nh,` {
230    right: 0 `).concat(n,`;
231  }
232  
233  .`).concat(Rh," .").concat(Rh,` {
234    margin-right: 0 `).concat(n,`;
235  }
236  
237  body[`).concat(al,`] {
238    `).concat(j6,": ").concat(s,`px;
239  }
240`)},nO=function(){var e=parseInt(document.body.getAttribute(al)||"0",10);return isFinite(e)?e:0},Y6=function(){x.useEffect(function(){return document.body.setAttribute(al,(nO()+1).toString()),function(){var e=nO()-1;e<=0?document.body.removeAttribute(al):document.body.setAttribute(al,e.toString())}},[])},X6=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,i=n===void 0?"margin":n;Y6();var o=x.useMemo(function(){return V6(i)},[i]);return x.createElement(K6,{styles:G6(o,!t,i,r?"":"!important")})},tb=!1;if(typeof window<"u")try{var qf=Object.defineProperty({},"passive",{get:function(){return tb=!0,!0}});window.addEventListener("test",qf,qf),window.removeEventListener("test",qf,qf)}catch{tb=!1}var ws=tb?{passive:!1}:!1,Q6=function(e){return e.tagName==="TEXTAREA"},e$=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!Q6(e)&&r[t]==="visible")},J6=function(e){return e$(e,"overflowY")},Z6=function(e){return e$(e,"overflowX")},iO=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var i=t$(e,n);if(i){var o=r$(e,n),a=o[1],s=o[2];if(a>s)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},eq=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},tq=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},t$=function(e,t){return e==="v"?J6(t):Z6(t)},r$=function(e,t){return e==="v"?eq(t):tq(t)},rq=function(e,t){return e==="h"&&t==="rtl"?-1:1},nq=function(e,t,r,n,i){var o=rq(e,window.getComputedStyle(t).direction),a=o*n,s=r.target,l=t.contains(s),c=!1,u=a>0,d=0,f=0;do{if(!s)break;var h=r$(e,s),v=h[0],m=h[1],y=h[2],w=m-y-o*v;(v||w)&&t$(e,s)&&(d+=w,f+=v);var b=s.parentNode;s=b&&b.nodeType===Node.DOCUMENT_FRAGMENT_NODE?b.host:b}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(u&&(Math.abs(d)<1||!i)||!u&&(Math.abs(f)<1||!i))&&(c=!0),c},Vf=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},oO=function(e){return[e.deltaX,e.deltaY]},aO=function(e){return e&&"current"in e?e.current:e},iq=function(e,t){return e[0]===t[0]&&e[1]===t[1]},oq=function(e){return`
241  .block-interactivity-`.concat(e,` {pointer-events: none;}
242  .allow-interactivity-`).concat(e,` {pointer-events: all;}
243`)},aq=0,xs=[];function sq(e){var t=x.useRef([]),r=x.useRef([0,0]),n=x.useRef(),i=x.useState(aq++)[0],o=x.use
vendor: 4,291 bytes, line 243
243State(ZR)[0],a=x.useRef(e);x.useEffect(function(){a.current=e},[e]),x.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var m=A6([e.lockRef.current],(e.shards||[]).map(aO),!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=x.useCallback(function(m,y){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!a.current.allowPinchZoom;var w=Vf(m),b=r.current,g="deltaX"in m?m.deltaX:b[0]-w[0],_="deltaY"in m?m.deltaY:b[1]-w[1],S,E=m.target,O=Math.abs(g)>Math.abs(_)?"h":"v";if("touches"in m&&O==="h"&&E.type==="range")return!1;var P=iO(O,E);if(!P)return!0;if(P?S=O:(S=O==="v"?"h":"v",P=iO(O,E)),!P)return!1;if(!n.current&&"changedTouches"in m&&(g||_)&&(n.current=S),!S)return!0;var T=n.current||S;return nq(T,y,m,T==="h"?g:_,!0)},[]),l=x.useCallback(function(m){var y=m;if(!(!xs.length||xs[xs.length-1]!==o)){var w="deltaY"in y?oO(y):Vf(y),b=t.current.filter(function(S){return S.name===y.type&&(S.target===y.target||y.target===S.shadowParent)&&iq(S.delta,w)})[0];if(b&&b.should){y.cancelable&&y.preventDefault();return}if(!b){var g=(a.current.shards||[]).map(aO).filter(Boolean).filter(function(S){return S.contains(y.target)}),_=g.length>0?s(y,g[0]):!a.current.noIsolation;_&&y.cancelable&&y.preventDefault()}}},[]),c=x.useCallback(function(m,y,w,b){var g={name:m,delta:y,target:w,should:b,shadowParent:lq(w)};t.current.push(g),setTimeout(function(){t.current=t.current.filter(function(_){return _!==g})},1)},[]),u=x.useCallback(function(m){r.current=Vf(m),n.current=void 0},[]),d=x.useCallback(function(m){c(m.type,oO(m),m.target,s(m,e.lockRef.current))},[]),f=x.useCallback(function(m){c(m.type,Vf(m),m.target,s(m,e.lockRef.current))},[]);x.useEffect(function(){return xs.push(o),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",l,ws),document.addEventListener("touchmove",l,ws),document.addEventListener("touchstart",u,ws),function(){xs=xs.filter(function(m){return m!==o}),document.removeEventListener("wheel",l,ws),document.removeEventListener("touchmove",l,ws),document.removeEventListener("touchstart",u,ws)}},[]);var h=e.removeScrollBar,v=e.inert;return x.createElement(x.Fragment,null,v?x.createElement(o,{styles:oq(i)}):null,h?x.createElement(X6,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function lq(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const cq=D6(JR,sq);var p1=x.forwardRef(function(e,t){return x.createElement(rv,Hn({},e,{ref:t,sideCar:cq}))});p1.classNames=rv.classNames;var uq=[" ","Enter","ArrowUp","ArrowDown"],dq=[" ","Enter"],Ka="Select",[nv,iv,fq]=Vm(Ka),[hc,Gxe]=$r(Ka,[fq,Zm]),ov=Zm(),[hq,Qo]=hc(Ka),[pq,mq]=hc(Ka),n$=e=>{const{__scopeSelect:t,children:r,open:n,defaultOpen:i,onOpenChange:o,value:a,defaultValue:s,onValueChange:l,dir:c,name:u,autoComplete:d,disabled:f,required:h,form:v}=e,m=ov(t),[y,w]=x.useState(null),[b,g]=x.useState(null),[_,S]=x.useState(!1),E=Zd(c),[O,P]=Ni({prop:n,defaultProp:i??!1,onChange:o,caller:Ka}),[T,j]=Ni({prop:a,defaultProp:s,onChange:l,caller:Ka}),C=x.useRef(null),k=y?v||!!y.closest("form"):!0,[L,M]=x.useState(new Set),N=Array.from(L).map(D=>D.props.value).join(";");return p.jsx(RH,{...m,children:p.jsxs(hq,{required:h,scope:t,trigger:y,onTriggerChange:w,valueNode:b,onValueNodeChange:g,valueNodeHasChildren:_,onValueNodeHasChildrenChange:S,contentId:xi(),value:T,onValueChange:j,open:O,onOpenChange:P,dir:E,triggerPointerDownPosRef:C,disabled:f,children:[p.jsx(nv.Provider,{scope:t,children:p.jsx(pq,{scope:e.__scopeSelect,onNativeOptionAdd:x.useCallback(D=>{M(B=>new Set(B).add(D))},[]),onNativeOptionRemove:x.useCallback(D=>{M(B=>{const $=new Set(B);return $.delete(D),$})},[]),children:r})}),k?p.jsxs(T$,{"aria-hidden":!0,required:h,tabIndex:-1,name:u,autoComplete:d,value:T,onChange:D=>j(D.target.value),disabled:f,form:v,children:[T===void 0?p.jsx("option",{value:""}):null,Array.from(L)]},N):null]})})};n$.displayName=Ka;var i$="SelectTrigger",o$=x.forwardRef((e,t)=>
vendor: 16,735 bytes, line 243
243{const{__scopeSelect:r,disabled:n=!1,...i}=e,o=ov(r),a=Qo(i$,r),s=a.disabled||n,l=ye(t,a.onTriggerChange),c=iv(r),u=x.useRef("touch"),[d,f,h]=C$(m=>{const y=c().filter(g=>!g.disabled),w=y.find(g=>g.value===a.value),b=j$(y,m,w);b!==void 0&&a.onValueChange(b.value)}),v=m=>{s||(a.onOpenChange(!0),h()),m&&(a.triggerPointerDownPosRef.current={x:Math.round(m.pageX),y:Math.round(m.pageY)})};return p.jsx(jR,{asChild:!0,...o,children:p.jsx(se.button,{type:"button",role:"combobox","aria-controls":a.contentId,"aria-expanded":a.open,"aria-required":a.required,"aria-autocomplete":"none",dir:a.dir,"data-state":a.open?"open":"closed",disabled:s,"data-disabled":s?"":void 0,"data-placeholder":A$(a.value)?"":void 0,...i,ref:l,onClick:ie(i.onClick,m=>{m.currentTarget.focus(),u.current!=="mouse"&&v(m)}),onPointerDown:ie(i.onPointerDown,m=>{u.current=m.pointerType;const y=m.target;y.hasPointerCapture(m.pointerId)&&y.releasePointerCapture(m.pointerId),m.button===0&&m.ctrlKey===!1&&m.pointerType==="mouse"&&(v(m),m.preventDefault())}),onKeyDown:ie(i.onKeyDown,m=>{const y=d.current!=="";!(m.ctrlKey||m.altKey||m.metaKey)&&m.key.length===1&&f(m.key),!(y&&m.key===" ")&&uq.includes(m.key)&&(v(),m.preventDefault())})})})});o$.displayName=i$;var a$="SelectValue",s$=x.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:i,children:o,placeholder:a="",...s}=e,l=Qo(a$,r),{onValueNodeHasChildrenChange:c}=l,u=o!==void 0,d=ye(t,l.onValueNodeChange);return Pt(()=>{c(u)},[c,u]),p.jsx(se.span,{...s,ref:d,style:{pointerEvents:"none"},children:A$(l.value)?p.jsx(p.Fragment,{children:a}):o})});s$.displayName=a$;var vq="SelectIcon",l$=x.forwardRef((e,t)=>{const{__scopeSelect:r,children:n,...i}=e;return p.jsx(se.span,{"aria-hidden":!0,...i,ref:t,children:n||"▼"})});l$.displayName=vq;var gq="SelectPortal",c$=e=>p.jsx(Km,{asChild:!0,...e});c$.displayName=gq;var Ga="SelectContent",u$=x.forwardRef((e,t)=>{const r=Qo(Ga,e.__scopeSelect),[n,i]=x.useState();if(Pt(()=>{i(new DocumentFragment)},[]),!r.open){const o=n;return o?ss.createPortal(p.jsx(d$,{scope:e.__scopeSelect,children:p.jsx(nv.Slot,{scope:e.__scopeSelect,children:p.jsx("div",{children:e.children})})}),o):null}return p.jsx(f$,{...e,ref:t})});u$.displayName=Ga;var pn=10,[d$,Jo]=hc(Ga),yq="SelectContentImpl",bq=Rl("SelectContent.RemoveScroll"),f$=x.forwardRef((e,t)=>{const{__scopeSelect:r,position:n="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:o,onPointerDownOutside:a,side:s,sideOffset:l,align:c,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:h,sticky:v,hideWhenDetached:m,avoidCollisions:y,...w}=e,b=Qo(Ga,r),[g,_]=x.useState(null),[S,E]=x.useState(null),O=ye(t,Y=>_(Y)),[P,T]=x.useState(null),[j,C]=x.useState(null),k=iv(r),[L,M]=x.useState(!1),N=x.useRef(!1);x.useEffect(()=>{if(g)return YR(g)},[g]),VR();const D=x.useCallback(Y=>{const[pe,...q]=k().map(F=>F.ref.current),[Q]=q.slice(-1),X=document.activeElement;for(const F of Y)if(F===X||(F==null||F.scrollIntoView({block:"nearest"}),F===pe&&S&&(S.scrollTop=0),F===Q&&S&&(S.scrollTop=S.scrollHeight),F==null||F.focus(),document.activeElement!==X))return},[k,S]),B=x.useCallback(()=>D([P,g]),[D,P,g]);x.useEffect(()=>{L&&B()},[L,B]);const{onOpenChange:$,triggerPointerDownPosRef:I}=b;x.useEffect(()=>{if(g){let Y={x:0,y:0};const pe=Q=>{var X,F;Y={x:Math.abs(Math.round(Q.pageX)-(((X=I.current)==null?void 0:X.x)??0)),y:Math.abs(Math.round(Q.pageY)-(((F=I.current)==null?void 0:F.y)??0))}},q=Q=>{Y.x<=10&&Y.y<=10?Q.preventDefault():g.contains(Q.target)||$(!1),document.removeEventListener("pointermove",pe),I.current=null};return I.current!==null&&(document.addEventListener("pointermove",pe),document.addEventListener("pointerup",q,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",pe),document.removeEventListener("pointerup",q,{capture:!0})}}},[g,$,I]),x.useEffect(()=>{const Y=()=>$(!1);return window.addEventListener("blur",Y),window.addEventListener("resize",Y),()=>{window.removeEventListener("blur",Y),window.removeEventListener("resize",Y)}},[$]);const[U,H]=C$(Y=>{const pe=k().filter(X=>!X.disabled),q=pe.find(X=>X.ref.current===document.activeElement),Q=j$(pe,Y,q);Q&&setTimeout(()=>Q.ref.current.focus())}),z=x.useCallback((Y,pe,q)=>{const Q=!N.current&&!q;(b.value!==void 0&&b.value===pe||Q)&&(T(Y),Q&&(N.current=!0))},[b.value]),K=x.useCallback(()=>g==null?void 0:g.focus(),[g]),te=x.useCallback((Y,pe,q)=>{const Q=!N.current&&!q;(b.value!==void 0&&b.value===pe||Q)&&C(Y)},[b.value]),fe=n==="popper"?rb:h$,Ee=fe===rb?{side:s,sideOffset:l,align:c,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:h,sticky:v,hideWhenDetached:m,avoidCollisions:y}:{};return p.jsx(d$,{scope:r,content:g,viewport:S,onViewportChange:E,itemRefCallback:z,selectedItem:P,onItemLeave:K,itemTextRefCallback:te,focusSelectedItem:B,selectedItemText:j,position:n,isPositioned:L,searchRef:U,children:p.jsx(p1,{as:bq,allowPinchZoom:!0,children:p.jsx(f1,{asChild:!0,trapped:b.open,onMountAutoFocus:Y=>{Y.preventDefault()},onUnmountAutoFocus:ie(i,Y=>{var pe;(pe=b.trigger)==null||pe.focus({preventScroll:!0}),Y.preventDefault()}),children:p.jsx(Gd,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:Y=>Y.preventDefault(),onDismiss:()=>b.onOpenChange(!1),children:p.jsx(fe,{role:"listbox",id:b.contentId,"data-state":b.open?"open":"closed",dir:b.dir,onContextMenu:Y=>Y.preventDefault(),...w,...Ee,onPlaced:()=>M(!0),ref:O,style:{display:"flex",flexDirection:"column",outline:"none",...w.style},onKeyDown:ie(w.onKeyDown,Y=>{const pe=Y.ctrlKey||Y.altKey||Y.metaKey;if(Y.key==="Tab"&&Y.preventDefault(),!pe&&Y.key.length===1&&H(Y.key),["ArrowUp","ArrowDown","Home","End"].includes(Y.key)){let Q=k().filter(X=>!X.disabled).map(X=>X.ref.current);if(["ArrowUp","End"].includes(Y.key)&&(Q=Q.slice().reverse()),["ArrowUp","ArrowDown"].includes(Y.key)){const X=Y.target,F=Q.indexOf(X);Q=Q.slice(F+1)}setTimeout(()=>D(Q)),Y.preventDefault()}})})})})})})});f$.displayName=yq;var wq="SelectItemAlignedPosition",h$=x.forwardRef((e,t)=>{const{__scopeSelect:r,onPlaced:n,...i}=e,o=Qo(Ga,r),a=Jo(Ga,r),[s,l]=x.useState(null),[c,u]=x.useState(null),d=ye(t,O=>u(O)),f=iv(r),h=x.useRef(!1),v=x.useRef(!0),{viewport:m,selectedItem:y,selectedItemText:w,focusSelectedItem:b}=a,g=x.useCallback(()=>{if(o.trigger&&o.valueNode&&s&&c&&m&&y&&w){const O=o.trigger.getBoundingClientRect(),P=c.getBoundingClientRect(),T=o.valueNode.getBoundingClientRect(),j=w.getBoundingClientRect();if(o.dir!=="rtl"){const X=j.left-P.left,F=T.left-X,we=O.left-F,he=O.width+we,ze=Math.max(he,P.width),Le=window.innerWidth-pn,st=Ku(F,[pn,Math.max(pn,Le-ze)]);s.style.minWidth=he+"px",s.style.left=st+"px"}else{const X=P.right-j.right,F=window.innerWidth-T.right-X,we=window.innerWidth-O.right-F,he=O.width+we,ze=Math.max(he,P.width),Le=window.innerWidth-pn,st=Ku(F,[pn,Math.max(pn,Le-ze)]);s.style.minWidth=he+"px",s.style.right=st+"px"}const C=f(),k=window.innerHeight-pn*2,L=m.scrollHeight,M=window.getComputedStyle(c),N=parseInt(M.borderTopWidth,10),D=parseInt(M.paddingTop,10),B=parseInt(M.borderBottomWidth,10),$=parseInt(M.paddingBottom,10),I=N+D+L+$+B,U=Math.min(y.offsetHeight*5,I),H=window.getComputedStyle(m),z=parseInt(H.paddingTop,10),K=parseInt(H.paddingBottom,10),te=O.top+O.height/2-pn,fe=k-te,Ee=y.offsetHeight/2,Y=y.offsetTop+Ee,pe=N+D+Y,q=I-pe;if(pe<=te){const X=C.length>0&&y===C[C.length-1].ref.current;s.style.bottom="0px";const F=c.clientHeight-m.offsetTop-m.offsetHeight,we=Math.max(fe,Ee+(X?K:0)+F+B),he=pe+we;s.style.height=he+"px"}else{const X=C.length>0&&y===C[0].ref.current;s.style.top="0px";const we=Math.max(te,N+m.offsetTop+(X?z:0)+Ee)+q;s.style.height=we+"px",m.scrollTop=pe-te+m.offsetTop}s.style.margin=`${pn}px 0`,s.style.minHeight=U+"px",s.style.maxHeight=k+"px",n==null||n(),requestAnimationFrame(()=>h.current=!0)}},[f,o.trigger,o.valueNode,s,c,m,y,w,o.dir,n]);Pt(()=>g(),[g]);const[_,S]=x.useState();Pt(()=>{c&&S(window.getComputedStyle(c).zIndex)},[c]);const E=x.useCallback(O=>{O&&v.current===!0&&(g(),b==null||b(),v.current=!1)},[g,b]);return p.jsx(Sq,{scope:r,contentWrapper:s,shouldExpandOnScrollRef:h,onScrollButtonChange:E,children:p.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:_},children:p.jsx(se.div,{...i,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})});h$.displayName=wq;var xq="SelectPopperPosition",rb=x.forwardRef((e,t)=>{const{__scopeSelect:r,align:n="start",collisionPadding:i=pn,...o}=e,a=ov(r);return p.jsx(kR,{...a,...o,ref:t,align:n,collisionPadding:i,style:{boxSizing:"border-box",...o.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)"}})});rb.displayName=xq;var[Sq,m1]=hc(Ga,{}),nb="SelectViewport",p$=x.forwardRef((e,t)=>{const{__scopeSelect:r,nonce:n,...i}=e,o=Jo(nb,r),a=m1(nb,r),s=ye(t,o.onViewportChange),l=x.useRef(0);return p.jsxs(p.Fragment,{children:[p.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}),p.jsx(nv.Slot,{scope:r,children:p.jsx(se.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:s,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:ie(i.onScroll,c=>{const u=c.currentTarget,{contentWrapper:d,shouldExpandOnScrollRef:f}=a;if(f!=null&&f.current&&d){const h=Math.abs(l.current-u.scrollTop);if(h>0){const v=window.innerHeight-pn*2,m=parseFloat(d.style.minHeight),y=parseFloat(d.style.height),w=Math.max(m,y);if(w<v){const b=w+h,g=Math.min(v,b),_=b-g;d.style.height=g+"px",d.style.bottom==="0px"&&(u.scrollTop=_>0?_:0,d.style.justifyContent="flex-end")}}}l.current=u.scrollTop})})})]})});p$.displayName=nb;var m$="SelectGroup",[_q,Eq]=hc(m$),Oq=x.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,i=xi();return p.jsx(_q,{scope:r,id:i,children:p.jsx(se.div,{role:"group","aria-labelledby":i,...n,ref:t})})});Oq.displayName=m$;var v$="SelectLabel",g$=x.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,i=Eq(v$,r);return p.jsx(se.div,{id:i.id,...n,ref:t})});g$.displayName=v$;var bp="SelectItem",[Pq,y$]=hc(bp),b$=x.forwardRef((e,t)=>{const{__scopeSelect:r,value:n,disabled:i=!1,textValue:o,...a}=e,s=Qo(bp,r),l=Jo(bp,r),c=s.value===n,[u,d]=x.useState(o??""),[f,h]=x.useState(!1),v=ye(t,b=>{var g;return(g=l.itemRefCallback)==null?void 0:g.call(l,b,n,i)}),m=xi(),y=x.useRef("touch"),w=()=>{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 p.jsx(Pq,{scope:r,value:n,disabled:i,textId:m,isSelected:c,onItemTextChange:x.useCallback(b=>{d(g=>g||((b==null?void 0:b.textContent)??"").trim())},[]),children:p.jsx(nv.ItemSlot,{scope:r,value:n,disabled:i,textValue:u,children:p.jsx(se.div,{role:"option","aria-labelledby":m,"data-highlighted":f?"":void 0,"aria-selected":c&&f,"data-state":c?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...a,ref:v,onFocus:ie(a.onFocus,()=>h(!0)),onBlur:ie(a.onBlur,()=>h(!1)),onClick:ie(a.onClick,()=>{y.current!=="mouse"&&w()}),onPointerUp:ie(a.onPointerUp,()=>{y.current==="mouse"&&w()}),onPointerDown:ie(a.onPointerDown,b=>{y.current=b.pointerType}),onPointerMove:ie(a.onPointerMove,b=>{var g;y.current=b.pointerType,i?(g=l.onItemLeave)==null||g.call(l):y.current==="mouse"&&b.currentTarget.focus({preventScroll:!0})}),onPointerLeave:ie(a.onPointerLeave,b=>{var g;b.currentTarget===document.activeElement&&((g=l.onItemLeave)==null||g.call(l))}),onKeyDown:ie(a.onKeyDown,b=>{var _;((_=l.searchRef)==null?void 0:_.current)!==""&&b.key===" "||(dq.includes(b.key)&&w(),b.key===" "&&b.preventDefault())})})})})});b$.displayName=bp;var ru="SelectItemText",w$=x.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:i,...o}=e,a=Qo(ru,r),s=Jo(ru,r),l=y$(ru,r),c=mq(ru,r),[u,d]=x.useState(null),f=ye(t,w=>d(w),l.onItemTextChange,w=>{var b;return(b=s.itemTextRefCallback)==null?void 0:b.call(s,w,l.value,l.disabled)}),h=u==null?void 0:u.textContent,v=x.useMemo(()=>p.jsx("option",{value:l.value,disabled:l.disabled,children:h},l.value),[l.disabled,l.value,h]),{onNativeOptionAdd:m,onNativeOptionRemove:y}=c;return Pt(()=>(m(v),()=>y(v)),[m,y,v]),p.jsxs(p.Fragment,{children:[p.jsx(se.span,{id:l.textId,...o,ref:f}),l.isSelected&&a.valueNode&&!a.valueNodeHasChildren?ss.createPortal(o.children,a.valueNode):null]})});w$.displayName=ru;var x$="SelectItemIndicator",S$=x.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return y$(x$,r).isSelected?p.jsx(se.span,{"aria-hidden":!0,...n,ref:t}):null});S$.displayName=x$;var ib="SelectScrollUpButton",_$=x.forwardRef((e,t)=>{const r=Jo(ib,e.__scopeSelect),n=m1(ib,e.__scopeSelect),[i,o]=x.useState(!1),a=ye(t,n.onScrollButtonChange);return Pt(()=>{if(r.viewport&&r.isPositioned){let s=function(){const c=l.scrollTop>0;o(c)};const l=r.viewport;return s(),l.addEventListener("scroll",s),()=>l.removeEventListener("scroll",s)}},[r.viewport,r.isPositioned]),i?p.jsx(O$,{...e,ref:a,onAutoScroll:()=>{const{viewport:s,selectedItem:l}=r;s&&l&&(s.scrollTop=s.scrollTop-l.offsetHeight)}}):null});_$.displayName=ib;var ob="SelectScrollDownButton",E$=x.forwardRef((e,t)=>{const r=Jo(ob,e.__scopeSelect),n=m1(ob,e.__scopeSelect),[i,o]=x.useState(!1),a=ye(t,n.onScrollButtonChange);return Pt(()=>{if(r.viewport&&r.isPositioned){let s=function(){const c=l.scrollHeight-l.clientHeight,u=Math.ceil(l.scrollTop)<c;o(u)};const l=r.viewport;return s(),l.addEventListener("scroll",s),()=>l.removeEventListener("scroll",s)}},[r.viewport,r.isPositioned]),i?p.jsx(O$,{...e,ref:a,onAutoScroll:()=>{const{viewport:s,selectedItem:l}=r;s&&l&&(s.scrollTop=s.scrollTop+l.offsetHeight)}}):null});E$.displayName=ob;var O$=x.forwardRef((e,t)=>{const{__scopeSelect:r,onAutoScroll:n,...i}=e,o=Jo("SelectScrollButton",r),a=x.useRef(null),s=iv(r),l=x.useCallback(()=>{a.current!==null&&(window.clearInterval(a.current),a.current=null)},[]);return x.useEffect(()=>()=>l(),[l]),Pt(()=>{var u;const c=s().find(d=>d.ref.current===document.activeElement);(u=c==null?void 0:c.ref.current)==null||u.scrollIntoView({block:"nearest"})},[s]),p.jsx(se.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:ie(i.onPointerDown,()=>{a.current===null&&(a.current=window.setInterval(n,50))}),onPointerMove:ie(i.onPointerMove,()=>{var c;(c=o.onItemLeave)==null||c.call(o),a.current===null&&(a.current=window.setInterval(n,50))}),onPointerLeave:ie(i.onPointerLeave,()=>{l()})})}),Tq="SelectSeparator",P$=x.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return p.jsx(se.div,{"aria-hidden":!0,...n,ref:t})});P$.displayName=Tq;var ab="SelectArrow",Aq=x.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,i=ov(r),o=Qo(ab,r),a=Jo(ab,r);return o.open&&a.position==="popper"?p.jsx(NR,{...i,...n,ref:t}):null});Aq.displayName=ab;var Cq="SelectBubbleInput",T$=x.forwardRef(({__scopeSelect:e,value:t,...r},n)=>{const i=x.useRef(null),o=ye(n,i),a=h1(t);return x.useEffect(()=>{const s=i.current;if(!s)return;const l=window.HTMLSelectElement.prototype,u=Object.getOwnPropertyDescriptor(l,"value").set;if(a!==t&&u){const d=new Event("change",{bubbles:!0});u.call(s,t),s.dispatchEvent(d)}},[a,t]),p.jsx(se.select,{...r,style:{...CN,...r.style},ref:o,defaultValue:t})});T$.displayName=Cq;function A$(e){return e===""||e===void 0}function C$(e){const t=_t(e),r=x.useRef(""),n=x.useRef(0),i=x.useCallback(a=>{const s=r.current+a;t(s),function l(c){r.current=c,window.clearTimeout(n.current),c!==""&&(n.current=window.setTimeout(()=>l(""),1e3))}(s)},[t]),o=x.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return x.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,i,o]}function j$(e,t,r){const i=t.length>1&&Array.from(t).every(c=>c===t[0])?t[0]:t,o=r?e.indexOf(r):-1;let a=jq(e,Math.max(o,0));i.length===1&&(a=a.filter(c=>c!==r));const l=a.find(c=>c.textValue.toLowerCase().startsWith(i.toLowerCase()));return l!==r?l:void 0}function jq(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var kq=n$,k$=o$,Nq=s$,Rq=l$,$q=c$,N$=u$,Mq=p$,R$=g$,$$=b$,Iq=w$,Dq=S$,M$=_$,I$=E$,D$=P$;const Ya=kq,Xa=Nq,Wo=x.forwardRef(({className:e,children:t,...r},n)=>p.jsxs(k$,{ref:n,className:Z("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm r
243ing-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,p.jsx(Rq,{asChild:!0,children:p.jsx(Jx,{className:"h-4 w-4 opacity-50"})})]}));Wo.displayName=k$.displayName;const L$=x.forwardRef(({className:e,...t},r)=>p.jsx(M$,{ref:r,className:Z("flex cursor-default items-center justify-center py-1",e),...t,children:p.jsx(gz,{className:"h-4 w-4"})}));L$.displayName=M$.displayName;const B$=x.forwardRef(({className:e,...t},r)=>p.jsx(I$,{ref:r,className:Z("flex cursor-default items-center justify-center py-1",e),...t,children:p.jsx(Jx,{className:"h-4 w-4"})}));B$.displayName=I$.displayName;const Ho=x.forwardRef(({className:e,children:t,position:r="popper",...n},i)=>p.jsx($q,{children:p.jsxs(N$,{ref:i,className:Z("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:[p.jsx(L$,{}),p.jsx(Mq,{className:Z("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),p.jsx(B$,{})]})}));Ho.displayName=N$.displayName;const Lq=x.forwardRef(({className:e,...t},r)=>p.jsx(R$,{ref:r,className:Z("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));Lq.displayName=R$.displayName;const Si=x.forwardRef(({className:e,children:t,...r},n)=>p.jsxs($$,{ref:n,className:Z("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",e),...r,children:[p.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:p.jsx(Dq,{children:p.jsx(vz,{className:"h-4 w-4"})})}),p.jsx(Iq,{children:t})]}));Si.displayName=$$.displayName;const Bq=x.forwardRef(({className:e,...t},r)=>p.jsx(D$,{ref:r,className:Z("-mx-1 my-1 h-px bg-muted",e),...t}));Bq.displayName=D$.displayName;var av="Switch",[Fq,Yxe]=$r(av),[Uq,zq]=Fq(av),F$=x.forwardRef((e,t)=>{const{__scopeSwitch:r,name:n,checked:i,defaultChecked:o,required:a,disabled:s,value:l="on",onCheckedChange:c,form:u,...d}=e,[f,h]=x.useState(null),v=ye(t,g=>h(g)),m=x.useRef(!1),y=f?u||!!f.closest("form"):!0,[w,b]=Ni({prop:i,defaultProp:o??!1,onChange:c,caller:av});return p.jsxs(Uq,{scope:r,checked:w,disabled:s,children:[p.jsx(se.button,{type:"button",role:"switch","aria-checked":w,"aria-required":a,"data-state":H$(w),"data-disabled":s?"":void 0,disabled:s,value:l,...d,ref:v,onClick:ie(e.onClick,g=>{b(_=>!_),y&&(m.current=g.isPropagationStopped(),m.current||g.stopPropagation())})}),y&&p.jsx(W$,{control:f,bubbles:!m.current,name:n,value:l,checked:w,required:a,disabled:s,form:u,style:{transform:"translateX(-100%)"}})]})});F$.displayName=av;var U$="SwitchThumb",z$=x.forwardRef((e,t)=>{const{__scopeSwitch:r,...n}=e,i=zq(U$,r);return p.jsx(se.span,{"data-state":H$(i.checked),"data-disabled":i.disabled?"":void 0,...n,ref:t})});z$.displayName=U$;var Wq="SwitchBubbleInput",W$=x.forwardRef(({__scopeSwitch:e,control:t,checked:r,bubbles:n=!0,...i},o)=>{const a=x.useRef(null),s=ye(a,o),l=h1(r),c=l1(t);return x.useEffect(()=>{const u=a.current;if(!u)return;const d=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(d,"checked").set;if(l!==r&&h){const v=new Event("click",{bubbles:n});h.call(u,r),u.dispatchEvent(v)}},[l,r,n]),p.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...i,tabIndex:-1,ref:s,style:{...i.style,...c,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});W$.displayName=Wq;function H$(e){return e?"checked":"unchecked"}var q$=F$,Hq=z$;const sv=x.forwardRef(({className:e,...t},r)=>p.jsx(q$,{className:Z("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50",e),...t,ref:r,children:p.jsx(Hq,{className:Z("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")})}
243));sv.displayName=q$.displayName;var qq="Label",V$=x.forwardRef((e,t)=>p.jsx(se.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())}}));V$.displayName=qq;var K$=V$;const Vq=Xd("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Hr=x.forwardRef(({className:e,...t},r)=>p.jsx(K$,{ref:r,className:Z(Vq(),e),...t}));Hr.displayName=K$.displayName;var G$=["PageUp","PageDown"],Y$=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],X$={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},pc="Slider",[sb,Kq,Gq]=Vm(pc),[Q$,Xxe]=$r(pc,[Gq]),[Yq,lv]=Q$(pc),J$=x.forwardRef((e,t)=>{const{name:r,min:n=0,max:i=100,step:o=1,orientation:a="horizontal",disabled:s=!1,minStepsBetweenThumbs:l=0,defaultValue:c=[n],value:u,onValueChange:d=()=>{},onValueCommit:f=()=>{},inverted:h=!1,form:v,...m}=e,y=x.useRef(new Set),w=x.useRef(0),g=a==="horizontal"?Xq:Qq,[_=[],S]=Ni({prop:u,defaultProp:c,onChange:C=>{var L;(L=[...y.current][w.current])==null||L.focus(),d(C)}}),E=x.useRef(_);function O(C){const k=rV(_,C);j(C,k)}function P(C){j(C,w.current)}function T(){const C=E.current[w.current];_[w.current]!==C&&f(_)}function j(C,k,{commit:L}={commit:!1}){const M=aV(o),N=sV(Math.round((C-n)/o)*o+n,M),D=Ku(N,[n,i]);S((B=[])=>{const $=eV(B,D,k);if(oV($,l*o)){w.current=$.indexOf(D);const I=String($)!==String(B);return I&&L&&f($),I?$:B}else return B})}return p.jsx(Yq,{scope:e.__scopeSlider,name:r,disabled:s,min:n,max:i,valueIndexToChangeRef:w,thumbs:y.current,values:_,orientation:a,form:v,children:p.jsx(sb.Provider,{scope:e.__scopeSlider,children:p.jsx(sb.Slot,{scope:e.__scopeSlider,children:p.jsx(g,{"aria-disabled":s,"data-disabled":s?"":void 0,...m,ref:t,onPointerDown:ie(m.onPointerDown,()=>{s||(E.current=_)}),min:n,max:i,inverted:h,onSlideStart:s?void 0:O,onSlideMove:s?void 0:P,onSlideEnd:s?void 0:T,onHomeKeyDown:()=>!s&&j(n,0,{commit:!0}),onEndKeyDown:()=>!s&&j(i,_.length-1,{commit:!0}),onStepKeyDown:({event:C,direction:k})=>{if(!s){const N=G$.includes(C.key)||C.shiftKey&&Y$.includes(C.key)?10:1,D=w.current,B=_[D],$=o*N*k;j(B+$,D,{commit:!0})}}})})})})});J$.displayName=pc;var[Z$,eM]=Q$(pc,{startEdge:"left",endEdge:"right",size:"width",direction:1}),Xq=x.forwardRef((e,t)=>{const{min:r,max:n,dir:i,inverted:o,onSlideStart:a,onSlideMove:s,onSlideEnd:l,onStepKeyDown:c,...u}=e,[d,f]=x.useState(null),h=ye(t,g=>f(g)),v=x.useRef(void 0),m=Zd(i),y=m==="ltr",w=y&&!o||!y&&o;function b(g){const _=v.current||d.getBoundingClientRect(),S=[0,_.width],O=v1(S,w?[r,n]:[n,r]);return v.current=_,O(g-_.left)}return p.jsx(Z$,{scope:e.__scopeSlider,startEdge:w?"left":"right",endEdge:w?"right":"left",direction:w?1:-1,size:"width",children:p.jsx(tM,{dir:m,"data-orientation":"horizontal",...u,ref:h,style:{...u.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:g=>{const _=b(g.clientX);a==null||a(_)},onSlideMove:g=>{const _=b(g.clientX);s==null||s(_)},onSlideEnd:()=>{v.current=void 0,l==null||l()},onStepKeyDown:g=>{const S=X$[w?"from-left":"from-right"].includes(g.key);c==null||c({event:g,direction:S?-1:1})}})})}),Qq=x.forwardRef((e,t)=>{const{min:r,max:n,inverted:i,onSlideStart:o,onSlideMove:a,onSlideEnd:s,onStepKeyDown:l,...c}=e,u=x.useRef(null),d=ye(t,u),f=x.useRef(void 0),h=!i;function v(m){const y=f.current||u.current.getBoundingClientRect(),w=[0,y.height],g=v1(w,h?[n,r]:[r,n]);return f.current=y,g(m-y.top)}return p.jsx(Z$,{scope:e.__scopeSlider,startEdge:h?"bottom":"top",endEdge:h?"top":"bottom",size:"height",direction:h?1:-1,children:p.jsx(tM,{"data-orientation":"vertical",...c,ref:d,style:{...c.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:m=>{const y=v(m.clientY);o==null||o(y)},onSlideMove:m=>{const y=v(m.clientY);a==null||a(y)},onSlideEnd:()=>{f.current=void 0,s==null||s()},onStepKeyDown:m=>{const w=X$[h?"from-bottom":"from-top"].includes(m.key);l==null||l({event:m,direction:w?-1:1})}})})}),tM=x.forwardRef((e,t)=>
243{const{__scopeSlider:r,onSlideStart:n,onSlideMove:i,onSlideEnd:o,onHomeKeyDown:a,onEndKeyDown:s,onStepKeyDown:l,...c}=e,u=lv(pc,r);return p.jsx(se.span,{...c,ref:t,onKeyDown:ie(e.onKeyDown,d=>{d.key==="Home"?(a(d),d.preventDefault()):d.key==="End"?(s(d),d.preventDefault()):G$.concat(Y$).includes(d.key)&&(l(d),d.preventDefault())}),onPointerDown:ie(e.onPointerDown,d=>{const f=d.target;f.setPointerCapture(d.pointerId),d.preventDefault(),u.thumbs.has(f)?f.focus():n(d)}),onPointerMove:ie(e.onPointerMove,d=>{d.target.hasPointerCapture(d.pointerId)&&i(d)}),onPointerUp:ie(e.onPointerUp,d=>{const f=d.target;f.hasPointerCapture(d.pointerId)&&(f.releasePointerCapture(d.pointerId),o(d))})})}),rM="SliderTrack",nM=x.forwardRef((e,t)=>{const{__scopeSlider:r,...n}=e,i=lv(rM,r);return p.jsx(se.span,{"data-disabled":i.disabled?"":void 0,"data-orientation":i.orientation,...n,ref:t})});nM.displayName=rM;var lb="SliderRange",iM=x.forwardRef((e,t)=>{const{__scopeSlider:r,...n}=e,i=lv(lb,r),o=eM(lb,r),a=x.useRef(null),s=ye(t,a),l=i.values.length,c=i.values.map(f=>sM(f,i.min,i.max)),u=l>1?Math.min(...c):0,d=100-Math.max(...c);return p.jsx(se.span,{"data-orientation":i.orientation,"data-disabled":i.disabled?"":void 0,...n,ref:s,style:{...e.style,[o.startEdge]:u+"%",[o.endEdge]:d+"%"}})});iM.displayName=lb;var cb="SliderThumb",oM=x.forwardRef((e,t)=>{const r=Kq(e.__scopeSlider),[n,i]=x.useState(null),o=ye(t,s=>i(s)),a=x.useMemo(()=>n?r().findIndex(s=>s.ref.current===n):-1,[r,n]);return p.jsx(Jq,{...e,ref:o,index:a})}),Jq=x.forwardRef((e,t)=>{const{__scopeSlider:r,index:n,name:i,...o}=e,a=lv(cb,r),s=eM(cb,r),[l,c]=x.useState(null),u=ye(t,b=>c(b)),d=l?a.form||!!l.closest("form"):!0,f=l1(l),h=a.values[n],v=h===void 0?0:sM(h,a.min,a.max),m=tV(n,a.values.length),y=f==null?void 0:f[s.size],w=y?nV(y,v,s.direction):0;return x.useEffect(()=>{if(l)return a.thumbs.add(l),()=>{a.thumbs.delete(l)}},[l,a.thumbs]),p.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[s.startEdge]:`calc(${v}% + ${w}px)`},children:[p.jsx(sb.ItemSlot,{scope:e.__scopeSlider,children:p.jsx(se.span,{role:"slider","aria-label":e["aria-label"]||m,"aria-valuemin":a.min,"aria-valuenow":h,"aria-valuemax":a.max,"aria-orientation":a.orientation,"data-orientation":a.orientation,"data-disabled":a.disabled?"":void 0,tabIndex:a.disabled?void 0:0,...o,ref:u,style:h===void 0?{display:"none"}:e.style,onFocus:ie(e.onFocus,()=>{a.valueIndexToChangeRef.current=n})})}),d&&p.jsx(aM,{name:i??(a.name?a.name+(a.values.length>1?"[]":""):void 0),form:a.form,value:h},n)]})});oM.displayName=cb;var Zq="RadioBubbleInput",aM=x.forwardRef(({__scopeSlider:e,value:t,...r},n)=>{const i=x.useRef(null),o=ye(i,n),a=h1(t);return x.useEffect(()=>{const s=i.current;if(!s)return;const l=window.HTMLInputElement.prototype,u=Object.getOwnPropertyDescriptor(l,"value").set;if(a!==t&&u){const d=new Event("input",{bubbles:!0});u.call(s,t),s.dispatchEvent(d)}},[a,t]),p.jsx(se.input,{style:{display:"none"},...r,ref:o,defaultValue:t})});aM.displayName=Zq;function eV(e=[],t,r){const n=[...e];return n[r]=t,n.sort((i,o)=>i-o)}function sM(e,t,r){const o=100/(r-t)*(e-t);return Ku(o,[0,100])}function tV(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function rV(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 nV(e,t,r){const n=e/2,o=v1([0,50],[0,n]);return(n-o(t)*r)*r}function iV(e){return e.slice(0,-1).map((t,r)=>e[r+1]-t)}function oV(e,t){if(t>0){const r=iV(e);return Math.min(...r)>=t}return!0}function v1(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 aV(e){return(String(e).split(".")[1]||"").length}function sV(e,t){const r=Math.pow(10,t);return Math.round(e*r)/r}var lM=J$,lV=nM,cV=iM,uV=oM;const ub=x.forwardRef(({className:e,...t},r)=>p.jsxs(lM,{ref:r,className:Z("relative flex w-full touch-none select-none items-center",e),...t,children:[p.jsx(lV,{className:"relative h-2 w-full grow overflow-hidden rounded-full bg-secondary",children:p.jsx(cV,{className:"absolute h-full bg-primary"})}),p.jsx(uV,{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"})]}));ub.displayName=lM.displayName;var cv="Dialog",[cM,Qxe]=$r(cv),[dV,Nn]=cM(cv),uM=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:i,onOpenChange:o,modal:a=!0}=e,s=x.useRef(null),l=x.useRef(null),[c,u]=Ni({prop:n,defaultProp:i??!1,onChange:o,caller:cv});return p.jsx(dV,{scope:t,triggerRef:s,contentRef:l,contentId:xi(),titleId:xi(),descriptionId:xi(),open:c,onOpenChange:u,onOpenToggle:x.useCallback(()=>u(d=>!d),[u]),modal:a,children:r})};uM.displayName=cv;var dM="DialogTrigger",fV=x.forwardRef((e,t)=>
vendor: 5,851 bytes, lines 243-247
243{const{__scopeDialog:r,...n}=e,i=Nn(dM,r),o=ye(t,i.triggerRef);return p.jsx(se.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":b1(i.open),...n,ref:o,onClick:ie(e.onClick,i.onOpenToggle)})});fV.displayName=dM;var g1="DialogPortal",[hV,fM]=cM(g1,{forceMount:void 0}),hM=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:i}=e,o=Nn(g1,t);return p.jsx(hV,{scope:t,forceMount:r,children:x.Children.map(n,a=>p.jsx(tn,{present:r||o.open,children:p.jsx(Km,{asChild:!0,container:i,children:a})}))})};hM.displayName=g1;var wp="DialogOverlay",pM=x.forwardRef((e,t)=>{const r=fM(wp,e.__scopeDialog),{forceMount:n=r.forceMount,...i}=e,o=Nn(wp,e.__scopeDialog);return o.modal?p.jsx(tn,{present:n||o.open,children:p.jsx(mV,{...i,ref:t})}):null});pM.displayName=wp;var pV=Rl("DialogOverlay.RemoveScroll"),mV=x.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=Nn(wp,r);return p.jsx(p1,{as:pV,allowPinchZoom:!0,shards:[i.contentRef],children:p.jsx(se.div,{"data-state":b1(i.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),Qa="DialogContent",mM=x.forwardRef((e,t)=>{const r=fM(Qa,e.__scopeDialog),{forceMount:n=r.forceMount,...i}=e,o=Nn(Qa,e.__scopeDialog);return p.jsx(tn,{present:n||o.open,children:o.modal?p.jsx(vV,{...i,ref:t}):p.jsx(gV,{...i,ref:t})})});mM.displayName=Qa;var vV=x.forwardRef((e,t)=>{const r=Nn(Qa,e.__scopeDialog),n=x.useRef(null),i=ye(t,r.contentRef,n);return x.useEffect(()=>{const o=n.current;if(o)return YR(o)},[]),p.jsx(vM,{...e,ref:i,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ie(e.onCloseAutoFocus,o=>{var a;o.preventDefault(),(a=r.triggerRef.current)==null||a.focus()}),onPointerDownOutside:ie(e.onPointerDownOutside,o=>{const a=o.detail.originalEvent,s=a.button===0&&a.ctrlKey===!0;(a.button===2||s)&&o.preventDefault()}),onFocusOutside:ie(e.onFocusOutside,o=>o.preventDefault())})}),gV=x.forwardRef((e,t)=>{const r=Nn(Qa,e.__scopeDialog),n=x.useRef(!1),i=x.useRef(!1);return p.jsx(vM,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var a,s;(a=e.onCloseAutoFocus)==null||a.call(e,o),o.defaultPrevented||(n.current||(s=r.triggerRef.current)==null||s.focus(),o.preventDefault()),n.current=!1,i.current=!1},onInteractOutside:o=>{var l,c;(l=e.onInteractOutside)==null||l.call(e,o),o.defaultPrevented||(n.current=!0,o.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const a=o.target;((c=r.triggerRef.current)==null?void 0:c.contains(a))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&i.current&&o.preventDefault()}})}),vM=x.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:i,onCloseAutoFocus:o,...a}=e,s=Nn(Qa,r),l=x.useRef(null),c=ye(t,l);return VR(),p.jsxs(p.Fragment,{children:[p.jsx(f1,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:i,onUnmountAutoFocus:o,children:p.jsx(Gd,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":b1(s.open),...a,ref:c,onDismiss:()=>s.onOpenChange(!1)})}),p.jsxs(p.Fragment,{children:[p.jsx(yV,{titleId:s.titleId}),p.jsx(wV,{contentRef:l,descriptionId:s.descriptionId})]})]})}),y1="DialogTitle",gM=x.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=Nn(y1,r);return p.jsx(se.h2,{id:i.titleId,...n,ref:t})});gM.displayName=y1;var yM="DialogDescription",bM=x.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=Nn(yM,r);return p.jsx(se.p,{id:i.descriptionId,...n,ref:t})});bM.displayName=yM;var wM="DialogClose",xM=x.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=Nn(wM,r);return p.jsx(se.button,{type:"button",...n,ref:t,onClick:ie(e.onClick,()=>i.onOpenChange(!1))})});xM.displayName=wM;function b1(e){return e?"open":"closed"}var SM="DialogTitleWarning",[Jxe,_M]=x5(SM,{contentName:Qa,titleName:y1,docsSlug:"dialog"}),yV=({titleId:e})=>{const t=_M(SM),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
244
245If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
246
247For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return x.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},bV="DialogDescriptionWarning",wV=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${_M(bV).contentName}}.`;return x.useEffect(()=>{var o;const i=(o=e.current)==null?void 0:o.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},EM=uM,OM=hM,uv=pM,dv=mM,fv=gM,hv=bM,PM=xM;const TM=EM,xV=OM,AM=x.forwardRef(({className:e,...t},r)=>p.jsx(uv,{className:Z("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}));AM.displayName=uv.displayName;const SV=Xd("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"}}),w1=x.forwardRef(({side:e="right",className:t,children:r,...n},i)=>p.jsxs(xV,{children:[p.jsx(AM,{}),p.jsxs(dv,{ref:i,className:Z(SV({side:e}),t),...n,children:[r,p.jsxs(PM,{className:"absolute right-4 top-4 roun
247ded-sm opacity-70 ring-offset-background transition-opacity data-[state=open]:bg-secondary hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",children:[p.jsx(Zx,{className:"h-4 w-4"}),p.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));w1.displayName=dv.displayName;const x1=({className:e,...t})=>p.jsx("div",{className:Z("flex flex-col space-y-2 text-center sm:text-left",e),...t});x1.displayName="SheetHeader";const S1=x.forwardRef(({className:e,...t},r)=>p.jsx(fv,{ref:r,className:Z("text-lg font-semibold text-foreground",e),...t}));S1.displayName=fv.displayName;const _V=x.forwardRef(({className:e,...t},r)=>p.jsx(hv,{ref:r,className:Z("text-sm text-muted-foreground",e),...t}));_V.displayName=hv.displayName;const EV=Xd("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 tr({className:e,variant:t,...r}){return p.jsx("div",{className:Z(EV({variant:t}),e),...r})}function OV(e,t){return x.useReducer((r,n)=>t[r][n]??r,e)}var _1="ScrollArea",[CM,Zxe]=$r(_1),[PV,rn]=CM(_1),jM=x.forwardRef((e,t)=>{const{__scopeScrollArea:r,type:n="hover",dir:i,scrollHideDelay:o=600,...a}=e,[s,l]=x.useState(null),[c,u]=x.useState(null),[d,f]=x.useState(null),[h,v]=x.useState(null),[m,y]=x.useState(null),[w,b]=x.useState(0),[g,_]=x.useState(0),[S,E]=x.useState(!1),[O,P]=x.useState(!1),T=ye(t,C=>l(C)),j=Zd(i);return p.jsx(PV,{scope:r,type:n,dir:j,scrollHideDelay:o,scrollArea:s,viewport:c,onViewportChange:u,content:d,onContentChange:f,scrollbarX:h,onScrollbarXChange:v,scrollbarXEnabled:S,onScrollbarXEnabledChange:E,scrollbarY:m,onScrollbarYChange:y,scrollbarYEnabled:O,onScrollbarYEnabledChange:P,onCornerWidthChange:b,onCornerHeightChange:_,children:p.jsx(se.div,{dir:j,...a,ref:T,style:{position:"relative","--radix-scroll-area-corner-width":w+"px","--radix-scroll-area-corner-height":g+"px",...e.style}})})});jM.displayName=_1;var kM="ScrollAreaViewport",NM=x.forwardRef((e,t)=>{const{__scopeScrollArea:r,children:n,nonce:i,...o}=e,a=rn(kM,r),s=x.useRef(null),l=ye(t,s,a.onViewportChange);return p.jsxs(p.Fragment,{children:[p.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:i}),p.jsx(se.div,{"data-radix-scroll-area-viewport":"",...o,ref:l,style:{overflowX:a.scrollbarXEnabled?"scroll":"hidden",overflowY:a.scrollbarYEnabled?"scroll":"hidden",...e.style},children:p.jsx("div",{ref:a.onContentChange,style:{minWidth:"100%",display:"table"},children:n})})]})});NM.displayName=kM;var ti="ScrollAreaScrollbar",E1=x.forwardRef((e,t)=>{const{forceMount:r,...n}=e,i=rn(ti,e.__scopeScrollArea),{onScrollbarXEnabledChange:o,onScrollbarYEnabledChange:a}=i,s=e.orientation==="horizontal";return x.useEffect(()=>(s?o(!0):a(!0),()=>{s?o(!1):a(!1)}),[s,o,a]),i.type==="hover"?p.jsx(TV,{...n,ref:t,forceMount:r}):i.type==="scroll"?p.jsx(AV,{...n,ref:t,forceMount:r}):i.type==="auto"?p.jsx(RM,{...n,ref:t,forceMount:r}):i.type==="always"?p.jsx(O1,{...n,ref:t}):null});E1.displayName=ti;var TV=x.forwardRef((e,t)=>{const{forceMount:r,...n}=e,i=rn(ti,e.__scopeScrollArea),[o,a]=x.useState(!1);return x.useEffect(()=>{const s=i.scrollArea;let l=0;if(s){const c=()=>{window.clearTimeout(l),a(!0)},u=()=>{l=window.setTimeout(()=>a(!1),i.scrollHideDelay)};return s.addEventListener("pointerenter",c),s.addEventListener("pointerleave",u),()=>{window.clearTimeout(l),s.removeEventListener("pointerenter",c),s.removeEventListener("pointerleave",u)}}},[i.scrollArea,i.scrollHideDelay]),p.jsx(tn,{present:r||o,children:p.jsx(RM,{"data-state":o?"visible":"hidden",...n,ref:t})})}),AV=x.forwardRef((e,t)=>
vendor: 8,432 bytes, line 247
247{const{forceMount:r,...n}=e,i=rn(ti,e.__scopeScrollArea),o=e.orientation==="horizontal",a=mv(()=>l("SCROLL_END"),100),[s,l]=OV("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 x.useEffect(()=>{if(s==="idle"){const c=window.setTimeout(()=>l("HIDE"),i.scrollHideDelay);return()=>window.clearTimeout(c)}},[s,i.scrollHideDelay,l]),x.useEffect(()=>{const c=i.viewport,u=o?"scrollLeft":"scrollTop";if(c){let d=c[u];const f=()=>{const h=c[u];d!==h&&(l("SCROLL"),a()),d=h};return c.addEventListener("scroll",f),()=>c.removeEventListener("scroll",f)}},[i.viewport,o,l,a]),p.jsx(tn,{present:r||s!=="hidden",children:p.jsx(O1,{"data-state":s==="hidden"?"hidden":"visible",...n,ref:t,onPointerEnter:ie(e.onPointerEnter,()=>l("POINTER_ENTER")),onPointerLeave:ie(e.onPointerLeave,()=>l("POINTER_LEAVE"))})})}),RM=x.forwardRef((e,t)=>{const r=rn(ti,e.__scopeScrollArea),{forceMount:n,...i}=e,[o,a]=x.useState(!1),s=e.orientation==="horizontal",l=mv(()=>{if(r.viewport){const c=r.viewport.offsetWidth<r.viewport.scrollWidth,u=r.viewport.offsetHeight<r.viewport.scrollHeight;a(s?c:u)}},10);return Il(r.viewport,l),Il(r.content,l),p.jsx(tn,{present:n||o,children:p.jsx(O1,{"data-state":o?"visible":"hidden",...i,ref:t})})}),O1=x.forwardRef((e,t)=>{const{orientation:r="vertical",...n}=e,i=rn(ti,e.__scopeScrollArea),o=x.useRef(null),a=x.useRef(0),[s,l]=x.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),c=LM(s.viewport,s.content),u={...n,sizes:s,onSizesChange:l,hasThumb:c>0&&c<1,onThumbChange:f=>o.current=f,onThumbPointerUp:()=>a.current=0,onThumbPointerDown:f=>a.current=f};function d(f,h){return $V(f,a.current,s,h)}return r==="horizontal"?p.jsx(CV,{...u,ref:t,onThumbPositionChange:()=>{if(i.viewport&&o.current){const f=i.viewport.scrollLeft,h=sO(f,s,i.dir);o.current.style.transform=`translate3d(${h}px, 0, 0)`}},onWheelScroll:f=>{i.viewport&&(i.viewport.scrollLeft=f)},onDragScroll:f=>{i.viewport&&(i.viewport.scrollLeft=d(f,i.dir))}}):r==="vertical"?p.jsx(jV,{...u,ref:t,onThumbPositionChange:()=>{if(i.viewport&&o.current){const f=i.viewport.scrollTop,h=sO(f,s);o.current.style.transform=`translate3d(0, ${h}px, 0)`}},onWheelScroll:f=>{i.viewport&&(i.viewport.scrollTop=f)},onDragScroll:f=>{i.viewport&&(i.viewport.scrollTop=d(f))}}):null}),CV=x.forwardRef((e,t)=>{const{sizes:r,onSizesChange:n,...i}=e,o=rn(ti,e.__scopeScrollArea),[a,s]=x.useState(),l=x.useRef(null),c=ye(t,l,o.onScrollbarXChange);return x.useEffect(()=>{l.current&&s(getComputedStyle(l.current))},[l]),p.jsx(MM,{"data-orientation":"horizontal",...i,ref:c,sizes:r,style:{bottom:0,left:o.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:o.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":pv(r)+"px",...e.style},onThumbPointerDown:u=>e.onThumbPointerDown(u.x),onDragScroll:u=>e.onDragScroll(u.x),onWheelScroll:(u,d)=>{if(o.viewport){const f=o.viewport.scrollLeft+u.deltaX;e.onWheelScroll(f),FM(f,d)&&u.preventDefault()}},onResize:()=>{l.current&&o.viewport&&a&&n({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:Sp(a.paddingLeft),paddingEnd:Sp(a.paddingRight)}})}})}),jV=x.forwardRef((e,t)=>{const{sizes:r,onSizesChange:n,...i}=e,o=rn(ti,e.__scopeScrollArea),[a,s]=x.useState(),l=x.useRef(null),c=ye(t,l,o.onScrollbarYChange);return x.useEffect(()=>{l.current&&s(getComputedStyle(l.current))},[l]),p.jsx(MM,{"data-orientation":"vertical",...i,ref:c,sizes:r,style:{top:0,right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":pv(r)+"px",...e.style},onThumbPointerDown:u=>e.onThumbPointerDown(u.y),onDragScroll:u=>e.onDragScroll(u.y),onWheelScroll:(u,d)=>{if(o.viewport){const f=o.viewport.scrollTop+u.deltaY;e.onWheelScroll(f),FM(f,d)&&u.preventDefault()}},onResize:()=>{l.current&&o.viewport&&a&&n({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:Sp(a.paddingTop),paddingEnd:Sp(a.paddingBottom)}})}})}),[kV,$M]=CM(ti),MM=x.forwardRef((e,t)=>{const{__scopeScrollArea:r,sizes:n,hasThumb:i,onThumbChange:o,onThumbPointerUp:a,onThumbPointerDown:s,onThumbPositionChange:l,onDragScroll:c,onWheelScroll:u,onResize:d,...f}=e,h=rn(ti,r),[v,m]=x.useState(null),y=ye(t,T=>m(T)),w=x.useRef(null),b=x.useRef(""),g=h.viewport,_=n.content-n.viewport,S=_t(u),E=_t(l),O=mv(d,10);function P(T){if(w.current){const j=T.clientX-w.current.left,C=T.clientY-w.current.top;c({x:j,y:C})}}return x.useEffect(()=>{const T=j=>{const C=j.target;(v==null?void 0:v.contains(C))&&S(j,_)};return document.addEventListener("wheel",T,{passive:!1}),()=>document.removeEventListener("wheel",T,{passive:!1})},[g,v,_,S]),x.useEffect(E,[n,E]),Il(v,O),Il(h.content,O),p.jsx(kV,{scope:r,scrollbar:v,hasThumb:i,onThumbChange:_t(o),onThumbPointerUp:_t(a),onThumbPositionChange:E,onThumbPointerDown:_t(s),children:p.jsx(se.div,{...f,ref:y,style:{position:"absolute",...f.style},onPointerDown:ie(e.onPointerDown,T=>{T.button===0&&(T.target.setPointerCapture(T.pointerId),w.current=v.getBoundingClientRect(),b.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",h.viewport&&(h.viewport.style.scrollBehavior="auto"),P(T))}),onPointerMove:ie(e.onPointerMove,P),onPointerUp:ie(e.onPointerUp,T=>{const j=T.target;j.hasPointerCapture(T.pointerId)&&j.releasePointerCapture(T.pointerId),document.body.style.webkitUserSelect=b.current,h.viewport&&(h.viewport.style.scrollBehavior=""),w.current=null})})})}),xp="ScrollAreaThumb",IM=x.forwardRef((e,t)=>{const{forceMount:r,...n}=e,i=$M(xp,e.__scopeScrollArea);return p.jsx(tn,{present:r||i.hasThumb,children:p.jsx(NV,{ref:t,...n})})}),NV=x.forwardRef((e,t)=>{const{__scopeScrollArea:r,style:n,...i}=e,o=rn(xp,r),a=$M(xp,r),{onThumbPositionChange:s}=a,l=ye(t,d=>a.onThumbChange(d)),c=x.useRef(void 0),u=mv(()=>{c.current&&(c.current(),c.current=void 0)},100);return x.useEffect(()=>{const d=o.viewport;if(d){const f=()=>{if(u(),!c.current){const h=MV(d,s);c.current=h,s()}};return s(),d.addEventListener("scroll",f),()=>d.removeEventListener("scroll",f)}},[o.viewport,u,s]),p.jsx(se.div,{"data-state":a.hasThumb?"visible":"hidden",...i,ref:l,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...n},onPointerDownCapture:ie(e.onPointerDownCapture,d=>{const h=d.target.getBoundingClientRect(),v=d.clientX-h.left,m=d.clientY-h.top;a.onThumbPointerDown({x:v,y:m})}),onPointerUp:ie(e.onPointerUp,a.onThumbPointerUp)})});IM.displayName=xp;var P1="ScrollAreaCorner",DM=x.forwardRef((e,t)=>{const r=rn(P1,e.__scopeScrollArea),n=!!(r.scrollbarX&&r.scrollbarY);return r.type!=="scroll"&&n?p.jsx(RV,{...e,ref:t}):null});DM.displayName=P1;var RV=x.forwardRef((e,t)=>{const{__scopeScrollArea:r,...n}=e,i=rn(P1,r),[o,a]=x.useState(0),[s,l]=x.useState(0),c=!!(o&&s);return Il(i.scrollbarX,()=>{var d;const u=((d=i.scrollbarX)==null?void 0:d.offsetHeight)||0;i.onCornerHeightChange(u),l(u)}),Il(i.scrollbarY,()=>{var d;const u=((d=i.scrollbarY)==null?void 0:d.offsetWidth)||0;i.onCornerWidthChange(u),a(u)}),c?p.jsx(se.div,{...n,ref:t,style:{width:o,height:s,position:"absolute",right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function Sp(e){return e?parseInt(e,10):0}function LM(e,t){const r=e/t;return isNaN(r)?0:r}function pv(e){const t=LM(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,n=(e.scrollbar.size-r)*t;return Math.max(n,18)}function $V(e,t,r,n="ltr"){const i=pv(r),o=i/2,a=t||o,s=i-a,l=r.scrollbar.paddingStart+a,c=r.scrollbar.size-r.scrollbar.paddingEnd-s,u=r.content-r.viewport,d=n==="ltr"?[0,u]:[u*-1,0];return BM([l,c],d)(e)}function sO(e,t,r="ltr"){const n=pv(t),i=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,o=t.scrollbar.size-i,a=t.content-t.viewport,s=o-n,l=r==="ltr"?[0,a]:[a*-1,0],c=Ku(e,l);return BM([0,a],[0,s])(c)}function BM(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 FM(e,t){return e>0&&e<t}var MV=(e,t=()=>{})=>{let r={left:e.scrollLeft,top:e.scrollTop},n=0;return function i(){const o={left:e.scrollLeft,top:e.scrollTop},a=r.left!==o.left,s=r.top!==o.top;
247(a||s)&&t(),r=o,n=window.requestAnimationFrame(i)}(),()=>window.cancelAnimationFrame(n)};function mv(e,t){const r=_t(e),n=x.useRef(0);return x.useEffect(()=>()=>window.clearTimeout(n.current),[]),x.useCallback(()=>{window.clearTimeout(n.current),n.current=window.setTimeout(r,t)},[r,t])}function Il(e,t){const r=_t(t);Pt(()=>{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])}var UM=jM,IV=NM,DV=DM;const T1=x.forwardRef(({className:e,children:t,...r},n)=>p.jsxs(UM,{ref:n,className:Z("relative overflow-hidden",e),...r,children:[p.jsx(IV,{className:"h-full w-full rounded-[inherit]",children:t}),p.jsx(zM,{}),p.jsx(DV,{})]}));T1.displayName=UM.displayName;const zM=x.forwardRef(({className:e,orientation:t="vertical",...r},n)=>p.jsx(E1,{ref:n,orientation:t,className:Z("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:p.jsx(IM,{className:"relative flex-1 rounded-full bg-border"})}));zM.displayName=E1.displayName;function Ja({score:e}){const t=e>.75?"high":e>.4?"medium":"low";return p.jsxs(tr,{variant:"outline",className:Z("text-xs font-medium border",t==="high"&&"border-success/50 bg-success/10 text-success",t==="medium"&&"border-warning/50 bg-warning/10 text-warning",t==="low"&&"border-danger/50 bg-danger/10 text-danger"),children:[(e*100).toFixed(0),"%"]})}function qo({category:e}){const t={Markets:"bg-primary/20 text-primary border-primary/30",Crypto:"bg-purple-500/20 text-purple-400 border-purple-500/30",Macro:"bg-blue-500/20 text-blue-400 border-blue-500/30",Geopolitical:"bg-red-500/20 text-red-400 border-red-500/30",Earnings:"bg-green-500/20 text-green-400 border-green-500/30",Energy:"bg-amber-500/20 text-amber-400 border-amber-500/30"};return p.jsx(tr,{variant:"outline",className:Z("text-xs",t[e]||"bg-muted text-muted-foreground"),children:e})}function vv({status:e}){return p.jsx(tr,{variant:"outline",className:Z("text-xs",e==="Confirmed"&&"border-success/50 bg-success/10 text-success",e==="Refuted"&&"border-danger/50 bg-danger/10 text-danger",e==="Pending"&&"border-muted-foreground/50 bg-muted text-muted-foreground",e==="Unresolved"&&"border-warning/50 bg-warning/10 text-warning"),children:e})}function gv({score:e}){const t=Math.round(e*100);return p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("div",{className:"h-1.5 w-16 rounded-full bg-muted overflow-hidden",children:p.jsx("div",{className:Z("h-full rounded-full transition-all",e>.85?"bg-danger":e>.6?"bg-warning":"bg-primary"),style:{width:`${t}%`}})}),p.jsx("span",{className:"text-xs text-muted-foreground",children:t})]})}function LV(e,t,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(u){try{c(n.next(u))}catch(d){a(d)}}function l(u){try{c(n.throw(u))}catch(d){a(d)}}function c(u){u.done?o(u.value):i(u.value).then(s,l)}c((n=n.apply(e,t||[])).next())})}const BV=e=>e?(...t)=>e(...t):(...t)=>fetch(...t);class A1 extends Error{constructor(t,r="FunctionsError",n){super(t),this.name=r,this.context=n}toJSON(){return{name:this.name,message:this.message,context:this.context}}}class FV extends A1{constructor(t){super("Failed to send a request to the Edge Function","FunctionsFetchError",t)}}class lO extends A1{constructor(t){super("Relay Error invoking the Edge Function","FunctionsRelayError",t)}}class cO extends A1{constructor(t){super("Edge Function returned a non-2xx status code","FunctionsHttpError",t)}}var db;(function(e){e.Any="any",e.ApNortheast1="ap-northeast-1",e.ApNortheast2="ap-northeast-2",e.ApSouth1="ap-south-1",e.ApSoutheast1="ap-southeast-1",e.ApSoutheast2="ap-southeast-2",e.CaCentral1="ca-central-1",e.EuCentral1="eu-central-1",e.EuWest1="eu-west-1",e.EuWest2="eu-west-2",e.EuWest3="eu-west-3",e.SaEast1="sa-east-1",e.UsEast1="us-east-1",e.UsWest1="us-west-1",e.UsWest2="us-west-2"})(db||(db={}));class UV{constructor(t,{headers:r={},customFetch:n,region:i=db.Any}={}){this.url=t,this.headers=r,this.region=i,this.fetch=BV(n)}setAuth(t){this.headers.Authorization=`Bearer ${t}`}invoke(t){return LV(this,arguments,void 0,function*(r,n={}){var i;let o,a;try{const{headers:s,method:l,body:c,signal:u,timeout:d}=n;let f={},{region:h}=n;h||(h=this.region);const v=new URL(`${this.url}/${r}`);h&&h!=="any"&&(f["x-region"]=h,v.searchParams.set("forceFunctionRegion",h));let m;c&&(s&&!Object.prototype.hasOwnProperty.call(s,"Content-Type")||!s)?typeof Blob<"u"&&c instanceof Blob||c instanceof ArrayBuffer?(f["Content-Type"]="application/octet-stream",m=c):typeof c=="string"?(f["Content-Type"]="text/plain",m=c):typeof FormData<"u"&&c instanceof FormData?m=c:(f["Content-Type"]="application/json",m=JSON.stringify(c)):c&&typeof c!="string"&&!(typeof Blob<"u"&&c instanceof Blob)&&!(c instanceof ArrayBuffer)&&!(typeof FormData<"u"&&c instanceof FormData)?m=JSON.stringify(c):m=c;let y=u;d&&(a=new AbortController,o=setTimeout(()=>a.abort(),d),u?(y=a.signal,u.addEventListener("abort",()=>a.abort())):y=a.signal);const w=yield this.fetch(v.toString(),{method:l||"POST",headers:Object.assign(Object.assign(Object.assign({},f),this.headers),s),body:m,signal:y}
247).catch(S=>{throw new FV(S)}),b=w.headers.get("x-relay-error");if(b&&b==="true")throw new lO(w);if(!w.ok)throw new cO(w);let g=((i=w.headers.get("Content-Type"))!==null&&i!==void 0?i:"text/plain").split(";")[0].trim(),_;return g==="application/json"?_=yield w.json():g==="application/octet-stream"||g==="application/pdf"?_=yield w.blob():g==="text/event-stream"?_=w:g==="multipart/form-data"?_=yield w.formData():_=yield w.text(),{data:_,error:null,response:w}}catch(s){return{data:null,error:s,response:s instanceof cO||s instanceof lO?s.context:void 0}}finally{o&&clearTimeout(o)}})}}const WM=3,uO=e=>Math.min(1e3*2**e,3e4),zV=[520,503],HM=["GET","HEAD","OPTIONS"];var WV=class extends Error{constructor(e){super(e.message),this.name="PostgrestError",this.details=e.details,this.hint=e.hint,this.code=e.code}toJSON(){return{name:this.name,message:this.message,details:this.details,hint:this.hint,code:this.code}}};function dO(e,t){return new Promise(r=>{if(t!=null&&t.aborted){r();return}const n=setTimeout(()=>{t==null||t.removeEventListener("abort",i),r()},e);function i(){clearTimeout(n),r()}t==null||t.addEventListener("abort",i)})}function HV(e,t,r,n){return!(!n||r>=WM||!HM.includes(e)||!zV.includes(t))}var qV=class{constructor(e){var t,r,n,i,o;this.shouldThrowOnError=!1,this.retryEnabled=!0,this.method=e.method,this.url=e.url,this.headers=new Headers(e.headers),this.schema=e.schema,this.body=e.body,this.shouldThrowOnError=(t=e.shouldThrowOnError)!==null&&t!==void 0?t:!1,this.signal=e.signal,this.isMaybeSingle=(r=e.isMaybeSingle)!==null&&r!==void 0?r:!1,this.shouldStripNulls=(n=e.shouldStripNulls)!==null&&n!==void 0?n:!1,this.urlLengthLimit=(i=e.urlLengthLimit)!==null&&i!==void 0?i:8e3,this.retryEnabled=(o=e.retry)!==null&&o!==void 0?o:!0,e.fetch?this.fetch=e.fetch:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}stripNulls(){if(this.headers.get("Accept")==="text/csv")throw new Error("stripNulls() cannot be used with csv()");return this.shouldStripNulls=!0,this}setHeader(e,t){return this.headers=new Headers(this.headers),this.headers.set(e,t),this}retry(e){return this.retryEnabled=e,this}then(e,t){var r=this;if(this.schema===void 0||(["GET","HEAD"].includes(this.method)?this.headers.set("Accept-Profile",this.schema):this.headers.set("Content-Profile",this.schema)),this.method!=="GET"&&this.method!=="HEAD"&&this.headers.set("Content-Type","application/json"),this.shouldStripNulls){const a=this.headers.get("Accept");a==="application/vnd.pgrst.object+json"?this.headers.set("Accept","application/vnd.pgrst.object+json;nulls=stripped"):(!a||a==="application/json")&&this.headers.set("Accept","application/vnd.pgrst.array+json;nulls=stripped")}const n=this.fetch;let o=(async()=>{let a=0;for(;;){const c=new Headers(r.headers);a>0&&c.set("X-Retry-Count",String(a));let u;try{u=await n(r.url.toString(),{method:r.method,headers:c,body:JSON.stringify(r.body),signal:r.signal})}catch(d){if((d==null?void 0:d.name)==="AbortError"||(d==null?void 0:d.code)==="ABORT_ERR"||!HM.includes(r.method))throw d;if(r.retryEnabled&&a<WM){const f=uO(a);a++,await dO(f,r.signal);continue}throw d}if(HV(r.method,u.status,a,r.retryEnabled)){var s,l;const d=(s=(l=u.headers)===null||l===void 0?void 0:l.get("Retry-After"))!==null&&s!==void 0?s:null,f=d!==null?Math.max(0,parseInt(d,10)||0)*1e3:uO(a);await u.text(),a++,await dO(f,r.signal);continue}return await r.processResponse(u)}})();return this.shouldThrowOnError||(o=o.catch(a=>{var s;let l="",c="",u="";const d=a==null?void 0:a.cause;if(d){var f,h,v,m;const b=(f=d==null?void 0:d.message)!==null&&f!==void 0?f:"",g=(h=d==null?void 0:d.code)!==null&&h!==void 0?h:"";l=`${(v=a==null?void 0:a.name)!==null&&v!==void 0?v:"FetchError"}: ${a==null?void 0:a.message}`,l+=`
248
249Caused by: ${(m=d==null?void 0:d.name)!==null&&m!==void 0?m:"Error"}: ${b}`,g&&(l+=` (${g})`),d!=null&&d.stack&&(l+=`
250${d.stack}`)}else{var y;l=(y=a==null?void 0:a.stack)!==null&&y!==void 0?y:""}const w=this.url.toString().length;return(a==null?void 0:a.name)==="AbortError"||(a==null?void 0:a.code)==="ABORT_ERR"?(u="",c="Request was aborted (timeout or manual cancellation)",w>this.urlLengthLimit&&(c+=`. Note: Your request URL is ${w} characters, which may exceed server limits. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [many IDs])), consider using an RPC function to pass values server-side.`)):((d==null?void 0:d.name)==="HeadersOverflowError"||(d==null?void 0:d.code)==="UND_ERR_HEADERS_OVERFLOW")&&(u="",c="HTTP headers exceeded server limits (typically 16KB)",w>this.urlLengthLimit&&(c+=`. Your request URL is ${w} characters. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [200+ IDs])), consider using an RPC function instead.`)),{success:!1,error:{message:`${(s=a==null?void 0:a.name)!==null&&s!==void 0?s:"FetchError"}: ${a==null?void 0:a.message}`,details:l,hint:c,code:u},data:null,count:null,status:0,statusText:""}}
250)),o.then(e,t)}async processResponse(e){var t=this;let r=null,n=null,i=null,o=e.status,a=e.statusText;if(e.ok){var s,l;if(t.method!=="HEAD"){var c;const f=await e.text();f===""||(t.headers.get("Accept")==="text/csv"||t.headers.get("Accept")&&(!((c=t.headers.get("Accept"))===null||c===void 0)&&c.includes("application/vnd.pgrst.plan+text"))?n=f:n=JSON.parse(f))}const u=(s=t.headers.get("Prefer"))===null||s===void 0?void 0:s.match(/count=(exact|planned|estimated)/),d=(l=e.headers.get("content-range"))===null||l===void 0?void 0:l.split("/");u&&d&&d.length>1&&(i=parseInt(d[1])),t.isMaybeSingle&&Array.isArray(n)&&(n.length>1?(r={code:"PGRST116",details:`Results contain ${n.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},n=null,i=null,o=406,a="Not Acceptable"):n.length===1?n=n[0]:n=null)}else{const u=await e.text();try{r=JSON.parse(u),Array.isArray(r)&&e.status===404&&(n=[],r=null,o=200,a="OK")}catch{e.status===404&&u===""?(o=204,a="No Content"):r={message:u}}if(r&&t.shouldThrowOnError)throw new WV(r)}return{success:r===null,error:r,data:n,count:i,status:o,statusText:a}}returns(){return this}overrideTypes(){return this}},VV=class extends qV{select(e){let t=!1;const r=(e??"*").split("").map(n=>/\s/.test(n)&&!t?"":(n==='"'&&(t=!t),n)).join("");return this.url.searchParams.set("select",r),this.headers.append("Prefer","return=representation"),this}order(e,{ascending:t=!0,nullsFirst:r,foreignTable:n,referencedTable:i=n}={}){const o=i?`${i}.order`:"order",a=this.url.searchParams.get(o);return this.url.searchParams.set(o,`${a?`${a},`:""}${e}.${t?"asc":"desc"}${r===void 0?"":r?".nullsfirst":".nullslast"}`),this}limit(e,{foreignTable:t,referencedTable:r=t}={}){const n=typeof r>"u"?"limit":`${r}.limit`;return this.url.searchParams.set(n,`${e}`),this}range(e,t,{foreignTable:r,referencedTable:n=r}={}){const i=typeof n>"u"?"offset":`${n}.offset`,o=typeof n>"u"?"limit":`${n}.limit`;return this.url.searchParams.set(i,`${e}`),this.url.searchParams.set(o,`${t-e+1}`),this}abortSignal(e){return this.signal=e,this}single(){return this.headers.set("Accept","application/vnd.pgrst.object+json"),this}maybeSingle(){return this.isMaybeSingle=!0,this}csv(){return this.headers.set("Accept","text/csv"),this}geojson(){return this.headers.set("Accept","application/geo+json"),this}explain({analyze:e=!1,verbose:t=!1,settings:r=!1,buffers:n=!1,wal:i=!1,format:o="text"}={}){var a;const s=[e?"analyze":null,t?"verbose":null,r?"settings":null,n?"buffers":null,i?"wal":null].filter(Boolean).join("|"),l=(a=this.headers.get("Accept"))!==null&&a!==void 0?a:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${o}; for="${l}"; options=${s};`),o==="json"?this:this}rollback(){return this.headers.append("Prefer","tx=rollback"),this}returns(){return this}maxAffected(e){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer",`max-affected=${e}`),this}};const fO=new RegExp("[,()]");var Ns=class extends VV{eq(e,t){return this.url.searchParams.append(e,`eq.${t}`),this}neq(e,t){return this.url.searchParams.append(e,`neq.${t}`),this}gt(e,t){return this.url.searchParams.append(e,`gt.${t}`),this}gte(e,t){return this.url.searchParams.append(e,`gte.${t}`),this}lt(e,t){return this.url.searchParams.append(e,`lt.${t}`),this}lte(e,t){return this.url.searchParams.append(e,`lte.${t}`),this}like(e,t){return this.url.searchParams.append(e,`like.${t}`),this}likeAllOf(e,t){return this.url.searchParams.append(e,`like(all).{${t.join(",")}}`),this}likeAnyOf(e,t){return this.url.searchParams.append(e,`like(any).{${t.join(",")}}`),this}ilike(e,t){return this.url.searchParams.append(e,`ilike.${t}`),this}ilikeAllOf(e,t){return this.url.searchParams.append(e,`ilike(all).{${t.join(",")}}`),this}ilikeAnyOf(e,t){return this.url.searchParams.append(e,`ilike(any).{${t.join(",")}}`),this}regexMatch(e,t){return this.url.searchParams.append(e,`match.${t}`),this}regexIMatch(e,t){return this.url.searchParams.append(e,`imatch.${t}`),this}is(e,t){return this.url.searchParams.append(e,`is.${t}`),this}isDistinct(e,t){return this.url.searchParams.append(e,`isdistinct.${t}`),this}in(e,t){const r=Array.from(new Set(t)).map(n=>typeof n=="string"&&fO.test(n)?`"${n}"`:`${n}`).join(",");return this.url.searchParams.append(e,`in.(${r})`),this}notIn(e,t){const r=Array.from(new Set(t)).map(n=>typeof n=="string"&&fO.test(n)?`"${n}"`:`${n}`).join(",");return this.url.searchParams.append(e,`not.in.(${r})`),this}contains(e,t){return typeof t=="string"?this.url.searchParams.append(e,`cs.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cs.{${t.join(",")}}`):this.url.searchParams.append(e,`cs.${JSON.stringify(t)}`),this}containedBy(e,t){return typeof t=="string"?this.url.searchParams.append(e,`cd.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cd.{${t.join(",")}}`):this.url.searchParams.append(e,`cd.${JSON.stringify(t)}`),this}rangeGt(e,t){return this.url.searchParams.append(e,`sr.${t}`),this}rangeGte(e,t){return this.url.searchParams.append(e,`nxl.${t}`),this}rangeLt(e,t){return this.url.searchParams.append(e,`sl.${t}`),this}rangeLte(e,t){return this.url.searchParams.append(e,`nxr.${t}`),this}rangeAdjacent(e,t){return this.url.searchParams.append(e,`adj.${t}`),this}overlaps(e,t){return typeof t=="string"?this.url.searchParams.append(e,`ov.${t}`):this.url.searchParams.append(e,`ov.{${t.join(",")}}`),this}textSearch(e,t,{config:r,type:n}={}){let i="";n==="plain"?i="pl":n==="phrase"?i="ph":n==="websearch"&&(i="w");const o=r===void 0?"":`(${r})`;return this.url.searchParams.append(e,`${i}fts${o}.${t}`),this}match(e){return Object.entries(e).filter(([t,r])=>
250r!==void 0).forEach(([t,r])=>{this.url.searchParams.append(t,`eq.${r}`)}),this}not(e,t,r){return this.url.searchParams.append(e,`not.${t}.${r}`),this}or(e,{foreignTable:t,referencedTable:r=t}={}){const n=r?`${r}.or`:"or";return this.url.searchParams.append(n,`(${e})`),this}filter(e,t,r){return this.url.searchParams.append(e,`${t}.${r}`),this}},KV=class{constructor(e,{headers:t={},schema:r,fetch:n,urlLengthLimit:i=8e3,retry:o}){this.url=e,this.headers=new Headers(t),this.schema=r,this.fetch=n,this.urlLengthLimit=i,this.retry=o}cloneRequestState(){return{url:new URL(this.url.toString()),headers:new Headers(this.headers)}}select(e,t){const{head:r=!1,count:n}=t??{},i=r?"HEAD":"GET";let o=!1;const a=(e??"*").split("").map(c=>/\s/.test(c)&&!o?"":(c==='"'&&(o=!o),c)).join(""),{url:s,headers:l}=this.cloneRequestState();return s.searchParams.set("select",a),n&&l.append("Prefer",`count=${n}`),new Ns({method:i,url:s,headers:l,schema:this.schema,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}insert(e,{count:t,defaultToNull:r=!0}={}){var n;const i="POST",{url:o,headers:a}=this.cloneRequestState();if(t&&a.append("Prefer",`count=${t}`),r||a.append("Prefer","missing=default"),Array.isArray(e)){const s=e.reduce((l,c)=>l.concat(Object.keys(c)),[]);if(s.length>0){const l=[...new Set(s)].map(c=>`"${c}"`);o.searchParams.set("columns",l.join(","))}}return new Ns({method:i,url:o,headers:a,schema:this.schema,body:e,fetch:(n=this.fetch)!==null&&n!==void 0?n:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}upsert(e,{onConflict:t,ignoreDuplicates:r=!1,count:n,defaultToNull:i=!0}={}){var o;const a="POST",{url:s,headers:l}=this.cloneRequestState();if(l.append("Prefer",`resolution=${r?"ignore":"merge"}-duplicates`),t!==void 0&&s.searchParams.set("on_conflict",t),n&&l.append("Prefer",`count=${n}`),i||l.append("Prefer","missing=default"),Array.isArray(e)){const c=e.reduce((u,d)=>u.concat(Object.keys(d)),[]);if(c.length>0){const u=[...new Set(c)].map(d=>`"${d}"`);s.searchParams.set("columns",u.join(","))}}return new Ns({method:a,url:s,headers:l,schema:this.schema,body:e,fetch:(o=this.fetch)!==null&&o!==void 0?o:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}update(e,{count:t}={}){var r;const n="PATCH",{url:i,headers:o}=this.cloneRequestState();return t&&o.append("Prefer",`count=${t}`),new Ns({method:n,url:i,headers:o,schema:this.schema,body:e,fetch:(r=this.fetch)!==null&&r!==void 0?r:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}delete({count:e}={}){var t;const r="DELETE",{url:n,headers:i}=this.cloneRequestState();return e&&i.append("Prefer",`count=${e}`),new Ns({method:r,url:n,headers:i,schema:this.schema,fetch:(t=this.fetch)!==null&&t!==void 0?t:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};function Gu(e){"@babel/helpers - typeof";return Gu=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},Gu(e)}function GV(e,t){if(Gu(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Gu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function YV(e){var t=GV(e,"string");return Gu(t)=="symbol"?t:t+""}function XV(e,t,r){return(t=YV(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,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 Kf(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){XV(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}var QV=class qM{constructor(t,{headers:r={},schema:n,fetch:i,timeout:o,urlLengthLimit:a=8e3,retry:s}={}){this.url=t,this.headers=new Headers(r),this.schemaName=n,this.urlLengthLimit=a;const l=i??globalThis.fetch;o!==void 0&&o>0?this.fetch=(c,u)=>{const d=new AbortController,f=setTimeout(()=>d.abort(),o),h=u==null?void 0:u.signal;if(h){if(h.aborted)return clearTimeout(f),l(c,u);const v=()=>{clearTimeout(f),d.abort()};return h.addEventListener("abort",v,{once:!0}),l(c,Kf(Kf({},u),{},{signal:d.signal})).finally(()=>{clearTimeout(f),h.removeEventListener("abort",v)})}return l(c,Kf(Kf({},u),{},{signal:d.signal})).finally(()=>clearTimeout(f))}:this.fetch=l,this.retry=s}from(t){if(!t||typeof t!="string"||t.trim()==="")throw new Error("Invalid relation name: relation must be a non-empty string.");return new KV(new URL(`${this.url}/${t}`),{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}schema(t){return new qM(this.url,{headers:this.headers,schema:t,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}rpc(t,r={},{head:n=!1,get:i=!1,count:o}={}){var a;let s;const l=new URL(`${this.url}/rpc/${t}`);let c;const u=h=>h!==null&&typeof h=="object"&&(!Array.isArray(h)||h.some(u)),d=n&&Object.values(r).some(u);d?(s="POST",c=r):n||i?(s=n?"HEAD":"GET",Object.entries(r).filter(([h,v])=>v!==void 0).map(([h,v])=>[h,Array.isArray(v)?`{${v.join(",")}}`:`${v}
250`]).forEach(([h,v])=>{l.searchParams.append(h,v)})):(s="POST",c=r);const f=new Headers(this.headers);return d?f.set("Prefer",o?`count=${o},return=minimal`:"return=minimal"):o&&f.set("Prefer",`count=${o}`),new Ns({method:s,url:l,headers:f,schema:this.schemaName,body:c,fetch:(a=this.fetch)!==null&&a!==void 0?a:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};class JV{constructor(){}static detectEnvironment(){var t;if(typeof WebSocket<"u")return{type:"native",constructor:WebSocket};if(typeof globalThis<"u"&&typeof globalThis.WebSocket<"u")return{type:"native",constructor:globalThis.WebSocket};if(typeof global<"u"&&typeof global.WebSocket<"u")return{type:"native",constructor:global.WebSocket};if(typeof globalThis<"u"&&typeof globalThis.WebSocketPair<"u"&&typeof globalThis.WebSocket>"u")return{type:"cloudflare",error:"Cloudflare Workers detected. WebSocket clients are not supported in Cloudflare Workers.",workaround:"Use Cloudflare Workers WebSocket API for server-side WebSocket handling, or deploy to a different runtime."};if(typeof globalThis<"u"&&globalThis.EdgeRuntime||typeof navigator<"u"&&(!((t=navigator.userAgent)===null||t===void 0)&&t.includes("Vercel-Edge")))return{type:"unsupported",error:"Edge runtime detected (Vercel Edge/Netlify Edge). WebSockets are not supported in edge functions.",workaround:"Use serverless functions or a different deployment target for WebSocket functionality."};const r=globalThis.process;if(r){const n=r.versions;if(n&&n.node){const i=n.node,o=parseInt(i.replace(/^v/,"").split(".")[0]);return o>=22?typeof globalThis.WebSocket<"u"?{type:"native",constructor:globalThis.WebSocket}:{type:"unsupported",error:`Node.js ${o} detected but native WebSocket not found.`,workaround:"Provide a WebSocket implementation via the transport option."}:{type:"unsupported",error:`Node.js ${o} detected without native WebSocket support.`,workaround:`For Node.js < 22, install "ws" package and provide it via the transport option:
251import ws from "ws"
252new RealtimeClient(url, { transport: ws })`}}}return{type:"unsupported",error:"Unknown JavaScript runtime without WebSocket support.",workaround:"Ensure you're running in a supported environment (browser, Node.js, Deno) or provide a custom WebSocket implementation."}}static getWebSocketConstructor(){const t=this.detectEnvironment();if(t.constructor)return t.constructor;let r=t.error||"WebSocket not supported in this environment.";throw t.workaround&&(r+=`
253
254Suggested solution: ${t.workaround}`),new Error(r)}static isWebSocketSupported(){try{const t=this.detectEnvironment();return t.type==="native"||t.type==="ws"}catch{return!1}}}const ZV="2.103.0",eK=`realtime-js/${ZV}`,tK="1.0.0",VM="2.0.0",rK=VM,nK=1e4,iK=100,oo={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},KM={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave",access_token:"access_token"},fb={connecting:"connecting",open:"open",closing:"closing",closed:"closed"};class oK{constructor(t){this.HEADER_LENGTH=1,this.USER_BROADCAST_PUSH_META_LENGTH=6,this.KINDS={userBroadcastPush:3,userBroadcast:4},this.BINARY_ENCODING=0,this.JSON_ENCODING=1,this.BROADCAST_EVENT="broadcast",this.allowedMetadataKeys=[],this.allowedMetadataKeys=t??[]}encode(t,r){if(t.event===this.BROADCAST_EVENT&&!(t.payload instanceof ArrayBuffer)&&typeof t.payload.event=="string")return r(this._binaryEncodeUserBroadcastPush(t));let n=[t.join_ref,t.ref,t.topic,t.event,t.payload];return r(JSON.stringify(n))}_binaryEncodeUserBroadcastPush(t){var r;return this._isArrayBuffer((r=t.payload)===null||r===void 0?void 0:r.payload)?this._encodeBinaryUserBroadcastPush(t):this._encodeJsonUserBroadcastPush(t)}_encodeBinaryUserBroadcastPush(t){var r,n;const i=(n=(r=t.payload)===null||r===void 0?void 0:r.payload)!==null&&n!==void 0?n:new ArrayBuffer(0);return this._encodeUserBroadcastPush(t,this.BINARY_ENCODING,i)}_encodeJsonUserBroadcastPush(t){var r,n;const i=(n=(r=t.payload)===null||r===void 0?void 0:r.payload)!==null&&n!==void 0?n:{},a=new TextEncoder().encode(JSON.stringify(i)).buffer;return this._encodeUserBroadcastPush(t,this.JSON_ENCODING,a)}_encodeUserBroadcastPush(t,r,n){var i,o;const a=t.topic,s=(i=t.ref)!==null&&i!==void 0?i:"",l=(o=t.join_ref)!==null&&o!==void 0?o:"",c=t.payload.event,u=this.allowedMetadataKeys?this._pick(t.payload,this.allowedMetadataKeys):{},d=Object.keys(u).length===0?"":JSON.stringify(u);if(l.length>255)throw new Error(`joinRef length ${l.length} exceeds maximum of 255`);if(s.length>255)throw new Error(`ref length ${s.length} exceeds maximum of 255`);if(a.length>255)throw new Error(`topic length ${a.length} exceeds maximum of 255`);if(c.length>255)throw new Error(`userEvent length ${c.length} exceeds maximum of 255`);if(d.length>255)throw new Error(`metadata length ${d.length} exceeds maximum of 255`);const f=this.USER_BROADCAST_PUSH_META_LENGTH+l.length+s.length+a.length+c.length+d.length,h=new ArrayBuffer(this.HEADER_LENGTH+f);
254let v=new DataView(h),m=0;v.setUint8(m++,this.KINDS.userBroadcastPush),v.setUint8(m++,l.length),v.setUint8(m++,s.length),v.setUint8(m++,a.length),v.setUint8(m++,c.length),v.setUint8(m++,d.length),v.setUint8(m++,r),Array.from(l,w=>v.setUint8(m++,w.charCodeAt(0))),Array.from(s,w=>v.setUint8(m++,w.charCodeAt(0))),Array.from(a,w=>v.setUint8(m++,w.charCodeAt(0))),Array.from(c,w=>v.setUint8(m++,w.charCodeAt(0))),Array.from(d,w=>v.setUint8(m++,w.charCodeAt(0)));var y=new Uint8Array(h.byteLength+n.byteLength);return y.set(new Uint8Array(h),0),y.set(new Uint8Array(n),h.byteLength),y.buffer}decode(t,r){if(this._isArrayBuffer(t)){let n=this._binaryDecode(t);return r(n)}if(typeof t=="string"){const n=JSON.parse(t),[i,o,a,s,l]=n;return r({join_ref:i,ref:o,topic:a,event:s,payload:l})}return r({})}_binaryDecode(t){const r=new DataView(t),n=r.getUint8(0),i=new TextDecoder;switch(n){case this.KINDS.userBroadcast:return this._decodeUserBroadcast(t,r,i)}}_decodeUserBroadcast(t,r,n){const i=r.getUint8(1),o=r.getUint8(2),a=r.getUint8(3),s=r.getUint8(4);let l=this.HEADER_LENGTH+4;const c=n.decode(t.slice(l,l+i));l=l+i;const u=n.decode(t.slice(l,l+o));l=l+o;const d=n.decode(t.slice(l,l+a));l=l+a;const f=t.slice(l,t.byteLength),h=s===this.JSON_ENCODING?JSON.parse(n.decode(f)):f,v={type:this.BROADCAST_EVENT,event:u,payload:h};return a>0&&(v.meta=JSON.parse(d)),{join_ref:null,ref:null,topic:c,event:this.BROADCAST_EVENT,payload:v}}_isArrayBuffer(t){var r;return t instanceof ArrayBuffer||((r=t==null?void 0:t.constructor)===null||r===void 0?void 0:r.name)==="ArrayBuffer"}_pick(t,r){return!t||typeof t!="object"?{}:Object.fromEntries(Object.entries(t).filter(([n])=>r.includes(n)))}}var Ve;(function(e){e.abstime="abstime",e.bool="bool",e.date="date",e.daterange="daterange",e.float4="float4",e.float8="float8",e.int2="int2",e.int4="int4",e.int4range="int4range",e.int8="int8",e.int8range="int8range",e.json="json",e.jsonb="jsonb",e.money="money",e.numeric="numeric",e.oid="oid",e.reltime="reltime",e.text="text",e.time="time",e.timestamp="timestamp",e.timestamptz="timestamptz",e.timetz="timetz",e.tsrange="tsrange",e.tstzrange="tstzrange"})(Ve||(Ve={}));const pO=(e,t,r={})=>{var n;const i=(n=r.skipTypes)!==null&&n!==void 0?n:[];return t?Object.keys(t).reduce((o,a)=>(o[a]=aK(a,e,t,i),o),{}):{}},aK=(e,t,r,n)=>{const i=t.find(s=>s.name===e),o=i==null?void 0:i.type,a=r[e];return o&&!n.includes(o)?GM(o,a):hb(a)},GM=(e,t)=>{if(e.charAt(0)==="_"){const r=e.slice(1,e.length);return uK(t,r)}switch(e){case Ve.bool:return sK(t);case Ve.float4:case Ve.float8:case Ve.int2:case Ve.int4:case Ve.int8:case Ve.numeric:case Ve.oid:return lK(t);case Ve.json:case Ve.jsonb:return cK(t);case Ve.timestamp:return dK(t);case Ve.abstime:case Ve.date:case Ve.daterange:case Ve.int4range:case Ve.int8range:case Ve.money:case Ve.reltime:case Ve.text:case Ve.time:case Ve.timestamptz:case Ve.timetz:case Ve.tsrange:case Ve.tstzrange:return hb(t);default:return hb(t)}},hb=e=>e,sK=e=>{switch(e){case"t":return!0;case"f":return!1;default:return e}},lK=e=>{if(typeof e=="string"){const t=parseFloat(e);if(!Number.isNaN(t))return t}return e},cK=e=>{if(typeof e=="string")try{return JSON.parse(e)}catch{return e}return e},uK=(e,t)=>{if(typeof e!="string")return e;const r=e.length-1,n=e[r];if(e[0]==="{"&&n==="}"){let o;const a=e.slice(1,r);try{o=JSON.parse("["+a+"]")}catch{o=a?a.split(","):[]}return o.map(s=>GM(t,s))}return e},dK=e=>typeof e=="string"?e.replace(" ","T"):e,YM=e=>{const t=new URL(e);return t.protocol=t.protocol.replace(/^ws/i,"http"),t.pathname=t.pathname.replace(/\/+$/,"").replace(/\/socket\/websocket$/i,"").replace(/\/socket$/i,"").replace(/\/websocket$/i,""),t.pathname===""||t.pathname==="/"?t.pathname="/api/broadcast":t.pathname=t.pathname+"/api/broadcast",t.href};var vu=e=>typeof e=="function"?e:function(){return e},fK=typeof self<"u"?self:null,Rs=typeof window<"u"?window:null,Ln=fK||Rs||globalThis,hK="2.0.0",pK=1e4,mK=1e3,zn={connecting:0,open:1,closing:2,closed:3},or={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},li={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave"},pb={longpoll:"longpoll",websocket:"websocket"},vK={complete:4},mb="base64url.bearer.phx.",Gf=class{constructor(e,t,r,n){this.channel=e,this.event=t,this.payload=r||function(){return{}},this.receivedResp=null,this.timeout=n,this.timeoutTimer=null,this.recHo
vendor: 8,700 bytes, line 254
254oks=[],this.sent=!1,this.ref=void 0}resend(e){this.timeout=e,this.reset(),this.send()}send(){this.hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload(),ref:this.ref,join_ref:this.channel.joinRef()}))}receive(e,t){return this.hasReceived(e)&&t(this.receivedResp.response),this.recHooks.push({status:e,callback:t}),this}reset(){this.cancelRefEvent(),this.ref=null,this.refEvent=null,this.receivedResp=null,this.sent=!1}destroy(){this.cancelRefEvent(),this.cancelTimeout()}matchReceive({status:e,response:t,_ref:r}){this.recHooks.filter(n=>n.status===e).forEach(n=>n.callback(t))}cancelRefEvent(){this.refEvent&&this.channel.off(this.refEvent)}cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=null}startTimeout(){this.timeoutTimer&&this.cancelTimeout(),this.ref=this.channel.socket.makeRef(),this.refEvent=this.channel.replyEventName(this.ref),this.channel.on(this.refEvent,e=>{this.cancelRefEvent(),this.cancelTimeout(),this.receivedResp=e,this.matchReceive(e)}),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}hasReceived(e){return this.receivedResp&&this.receivedResp.status===e}trigger(e,t){this.channel.trigger(this.refEvent,{status:e,response:t})}},XM=class{constructor(e,t){this.callback=e,this.timerCalc=t,this.timer=void 0,this.tries=0}reset(){this.tries=0,clearTimeout(this.timer)}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}},gK=class{constructor(e,t,r){this.state=or.closed,this.topic=e,this.params=vu(t||{}),this.socket=r,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new Gf(this,li.join,this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new XM(()=>{this.socket.isConnected()&&this.rejoin()},this.socket.rejoinAfterMs),this.stateChangeRefs.push(this.socket.onError(()=>this.rejoinTimer.reset())),this.stateChangeRefs.push(this.socket.onOpen(()=>{this.rejoinTimer.reset(),this.isErrored()&&this.rejoin()})),this.joinPush.receive("ok",()=>{this.state=or.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(n=>n.send()),this.pushBuffer=[]}),this.joinPush.receive("error",n=>{this.state=or.errored,this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,n),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.onClose(()=>{this.rejoinTimer.reset(),this.socket.hasLogger()&&this.socket.log("channel",`close ${this.topic}`),this.state=or.closed,this.socket.remove(this)}),this.onError(n=>{this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,n),this.isJoining()&&this.joinPush.reset(),this.state=or.errored,this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.joinPush.receive("timeout",()=>{this.socket.hasLogger()&&this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),new Gf(this,li.leave,vu({}),this.timeout).send(),this.state=or.errored,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.on(li.reply,(n,i)=>{this.trigger(this.replyEventName(i),n)})}join(e=this.timeout){if(this.joinedOnce)throw new Error("tried to join multiple times. 'join' can only be called a single time per channel instance");return this.timeout=e,this.joinedOnce=!0,this.rejoin(),this.joinPush}teardown(){this.pushBuffer.forEach(e=>e.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=or.closed,this.bindings=[]}onClose(e){this.on(li.close,e)}onError(e){return this.on(li.error,t=>e(t))}on(e,t){let r=this.bindingRef++;return this.bindings.push({event:e,ref:r,callback:t}),r}off(e,t){this.bindings=this.bindings.filter(r=>!(r.event===e&&(typeof t>"u"||t===r.ref)))}canPush(){return this.socket.isConnected()&&this.isJoined()}push(e,t,r=this.timeout){if(t=t||{},!this.joinedOnce)throw new Error(`tried to push '${e}' to '${this.topic}' before joining. Use channel.join() before pushing events`);let n=new Gf(this,e,function(){return t},r);return this.canPush()?n.send():(n.startTimeout(),this.pushBuffer.push(n)),n}leave(e=this.timeout){this.rejoinTimer.reset(),this.joinPush.cancelTimeout(),this.state=or.leaving;let t=()=>{this.socket.hasLogger()&&this.socket.log("channel",`leave ${this.topic}`),this.trigger(li.close,"leave")},r=new Gf(this,li.leave,vu({}),e);return r.receive("ok",()=>t()).receive("timeout",()=>t()),r.send(),this.canPush()||r.trigger("ok",{}),r}onMessage(e,t,r){return t}filterBindings(e,t,r){return!0}isMember(e,t,r,n){return this.topic!==e?!1:n&&n!==this.joinRef()?(this.socket.hasLogger()&&this.socket.log("channel","dropping outdated message",{topic:e,event:t,payload:r,joinRef:n}),!1):!0}joinRef(){return this.joinPush.ref}rejoin(e=this.timeout){this.isLeaving()||(this.socket.leaveOpenTopic(this.topic),this.state=or.joining,this.joinPush.resend(e))}trigger(e,t,r,n){let i=this.onMessage(e,t,r,n);if(t&&!i)throw new Error("channel onMessage callbacks must return the payload, modified or unmodified");let o=this.bindings.filter(a=>a.event===e&&this.filterBindings(a,t,r));for(let a=0;a<o.length;a++)o[a].callback(i,r,n||this.joinRef())}replyEventName(e){return`chan_reply_${e}`}isClosed(){return this.state===or.closed}isErrored(){return this.state===or.errored}isJoined(){return this.state===or.joined}isJoining(){return this.state===or.joining}isLeaving(){return this.state===or.leaving}},_p=class{static request(e,t,r,n,i,o,a){if(Ln.XDomainRequest){let s=new Ln.XDomainRequest;return this.xdomainRequest(s,e,t,n,i,o,a)}else if(Ln.XMLHttpRequest){let s=new Ln.XMLHttpRequest;return this.xhrRequest(s,e,t,r,n,i,o,a)}else{if(Ln.fetch&&Ln.AbortController)return this.fetchRequest(e,t,r,n,i,o,a);throw new Error("No suitable XMLHttpRequest implementation found")}}static fetchRequest(e,t,r,n,i,o,a){let s={method:e,headers:r,body:n},l=null;return i&&(l=new AbortController,setTimeout(()=>l.abort(),i),s.signal=l.signal),Ln.fetch(t,s).then(c=>c.text()).then(c=>this.parseJSON(c)).then(c=>a&&a(c)).catch(c=>{c.name==="AbortError"&&o?o():a&&a(null)}),l}static xdomainRequest(e,t,r,n,i,o,a){return e.timeout=i,e.open(t,r),e.onload=()=>{let s=this.parseJSON(e.responseText);a&&a(s)},o&&(e.ontimeout=o),e.onprogress=()=>{},e.send(n),e}static xhrRequest(e,t,r,n,i,o,a,s){e.open(t,r,!0),e.timeout=o;for(let[l,c]of Object.entries(n))e.setRequestHeader(l,c);return e.onerror=()=>s&&s(null),e.onreadystatechange=()=>{if(e.readyState===vK.complete&&s){let l=this.parseJSON(e.responseText);s(l)}},a&&(e.ontimeout=a),e.send(i),e}static parseJSON(e){if(!e||e==="")return null;try{return JSON.parse(e)}catch{return console&&console.log("failed to parse JSON response",e),null}}static serialize(e,t){let r=[];for(var n in e){if(!Object.prototype.hasOwnProperty.call(e,n))continue;let i=t?`${t}[${n}]`:n,o=e[n];typeof o=="object"?r.push(this.serialize(o,i)):r.push(encodeURIComponent(i)+"="+encodeURIComponent(o))}return r.join("&")}static appendParams(e,t){if(Object.keys(t).length===0)return e;let r=e.match(/\?/)?"&":"?";return`${e}${r}${this.serialize(t)}`}},yK=e=>{let t="",r=new Uint8Array(e),n=r.byteLength;for(let i=0;i<n;i++)t+=String.fromCharCode(r[i]);return btoa(t)},Ss=class{constructor(e,t){t&&t.length===2&&t[1].startsWith(mb)&&(this.authToken=atob(t[1].slice(mb.length))),this.endPoint=null,this.token=null,this.skipHeartbeat=!0,this.reqs=new Set,this.awaitingBatchAck=!1,this.currentBatch=null,this.currentBatchTimer=null,this.batchBuffer=[],this.onopen=function(){},this.onerror=function(){},this.onmessage=function(){},this.onclose=function(){},this.pollEndpoint=this.normalizeEndpoint(e),this.readyState=zn.connecting,setTimeout(()=>this.poll(),0)}normalizeEndpoint(e){return e.replace("ws://","http://").replace("wss://","https://").replace(new RegExp("(.*)/"+pb.websocket),"$1/"+pb.longpoll)}endpointURL(){return _p.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(e,t,r){this.close(e,t,r),this.readyState=zn.connecting}ontimeout(){this.onerror("timeout"),this.closeAndRetry(1005,"timeout",!1)}isActive(){return this.readyState===zn.open||this.readyState===zn.connecting}poll(){const e={Accept:"application/json"};this.authToken&&(e["X-Phoenix-AuthToken"]=this.authToken),this.ajax("GET",e,null,()=>this.ontimeout(),t=>{if(t){var{status:r,token:n,messages:i}=t;if(r===410&&this.token!==null){this.onerror(410),this.closeAndRetry(3410,"session_gone",!1);return}this.token=n}else r=0;switch(r){case 200:i.forEach(o=>{setTimeout(()=>this.onmessage({data:o}),0)}),this.poll();break;case 204:this.poll();break;case 410:this.readyState=zn.open,this.onopen({}),this.poll();break;
254case 403:this.onerror(403),this.close(1008,"forbidden",!1);break;case 0:case 500:this.onerror(500),this.closeAndRetry(1011,"internal server error",500);break;default:throw new Error(`unhandled poll status ${r}`)}})}send(e){typeof e!="string"&&(e=yK(e)),this.currentBatch?this.currentBatch.push(e):this.awaitingBatchAck?this.batchBuffer.push(e):(this.currentBatch=[e],this.currentBatchTimer=setTimeout(()=>{this.batchSend(this.currentBatch),this.currentBatch=null},0))}batchSend(e){this.awaitingBatchAck=!0,this.ajax("POST",{"Content-Type":"application/x-ndjson"},e.join(`
255`),()=>this.onerror("timeout"),t=>{this.awaitingBatchAck=!1,!t||t.status!==200?(this.onerror(t&&t.status),this.closeAndRetry(1011,"internal server error",!1)):this.batchBuffer.length>0&&(this.batchSend(this.batchBuffer),this.batchBuffer=[])})}close(e,t,r){for(let i of this.reqs)i.abort();this.readyState=zn.closed;let n=Object.assign({code:1e3,reason:void 0,wasClean:!0},{code:e,reason:t,wasClean:r});this.batchBuffer=[],clearTimeout(this.currentBatchTimer),this.currentBatchTimer=null,typeof CloseEvent<"u"?this.onclose(new CloseEvent("close",n)):this.onclose(n)}ajax(e,t,r,n,i){let o,a=()=>{this.reqs.delete(o),n()};o=_p.request(e,this.endpointURL(),t,r,this.timeout,a,s=>{this.reqs.delete(o),this.isActive()&&i(s)}),this.reqs.add(o)}},bK=class nu{constructor(t,r={}){let n=r.events||{state:"presence_state",diff:"presence_diff"};this.state={},this.pendingDiffs=[],this.channel=t,this.joinRef=null,this.caller={onJoin:function(){},onLeave:function(){},onSync:function(){}},this.channel.on(n.state,i=>{let{onJoin:o,onLeave:a,onSync:s}=this.caller;this.joinRef=this.channel.joinRef(),this.state=nu.syncState(this.state,i,o,a),this.pendingDiffs.forEach(l=>{this.state=nu.syncDiff(this.state,l,o,a)}),this.pendingDiffs=[],s()}),this.channel.on(n.diff,i=>{let{onJoin:o,onLeave:a,onSync:s}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(i):(this.state=nu.syncDiff(this.state,i,o,a),s())})}onJoin(t){this.caller.onJoin=t}onLeave(t){this.caller.onLeave=t}onSync(t){this.caller.onSync=t}list(t){return nu.list(this.state,t)}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel.joinRef()}static syncState(t,r,n,i){let o=this.clone(t),a={},s={};return this.map(o,(l,c)=>{r[l]||(s[l]=c)}),this.map(r,(l,c)=>{let u=o[l];if(u){let d=c.metas.map(m=>m.phx_ref),f=u.metas.map(m=>m.phx_ref),h=c.metas.filter(m=>f.indexOf(m.phx_ref)<0),v=u.metas.filter(m=>d.indexOf(m.phx_ref)<0);h.length>0&&(a[l]=c,a[l].metas=h),v.length>0&&(s[l]=this.clone(u),s[l].metas=v)}else a[l]=c}),this.syncDiff(o,{joins:a,leaves:s},n,i)}static syncDiff(t,r,n,i){let{joins:o,leaves:a}=this.clone(r);return n||(n=function(){}),i||(i=function(){}),this.map(o,(s,l)=>{let c=t[s];if(t[s]=this.clone(l),c){let u=t[s].metas.map(f=>f.phx_ref),d=c.metas.filter(f=>u.indexOf(f.phx_ref)<0);t[s].metas.unshift(...d)}n(s,c,l)}),this.map(a,(s,l)=>{let c=t[s];if(!c)return;let u=l.metas.map(d=>d.phx_ref);c.metas=c.metas.filter(d=>u.indexOf(d.phx_ref)<0),i(s,c,l),c.metas.length===0&&delete t[s]}),t}static list(t,r){return r||(r=function(n,i){return i}),this.map(t,(n,i)=>r(n,i))}static map(t,r){return Object.getOwnPropertyNames(t).map(n=>r(n,t[n]))}static clone(t){return JSON.parse(JSON.stringify(t))}},Yf={HEADER_LENGTH:1,META_LENGTH:4,KINDS:{push:0,reply:1,broadcast:2},encode(e,t){if(e.payload.constructor===ArrayBuffer)return t(this.binaryEncode(e));{let r=[e.join_ref,e.ref,e.topic,e.event,e.payload];return t(JSON.stringify(r))}},decode(e,t){if(e.constructor===ArrayBuffer)return t(this.binaryDecode(e));{let[r,n,i,o,a]=JSON.parse(e);return t({join_ref:r,ref:n,topic:i,event:o,payload:a})}},binaryEncode(e){let{join_ref:t,ref:r,event:n,topic:i,payload:o}=e,a=this.META_LENGTH+t.length+r.length+i.length+n.length,s=new ArrayBuffer(this.HEADER_LENGTH+a),l=new DataView(s),c=0;l.setUint8(c++,this.KINDS.push),l.setUint8(c++,t.length),l.setUint8(c++,r.length),l.setUint8(c++,i.length),l.setUint8(c++,n.length),Array.from(t,d=>l.setUint8(c++,d.charCodeAt(0))),Array.from(r,d=>l.setUint8(c++,d.charCodeAt(0))),Array.from(i,d=>l.setUint8(c++,d.charCodeAt(0))),Array.from(n,d=>l.setUint8(c++,d.charCodeAt(0)));var u=new Uint8Array(s.byteLength+o.byteLength);return u.set(new Uint8Array(s),0),u.set(new Uint8Array(o),s.byteLength),u.buffer},binaryDecode(e){let t=new DataView(e),r=t.getUint8(0),n=new TextDecoder;
vendor: 8,595 bytes, line 255
255switch(r){case this.KINDS.push:return this.decodePush(e,t,n);case this.KINDS.reply:return this.decodeReply(e,t,n);case this.KINDS.broadcast:return this.decodeBroadcast(e,t,n)}},decodePush(e,t,r){let n=t.getUint8(1),i=t.getUint8(2),o=t.getUint8(3),a=this.HEADER_LENGTH+this.META_LENGTH-1,s=r.decode(e.slice(a,a+n));a=a+n;let l=r.decode(e.slice(a,a+i));a=a+i;let c=r.decode(e.slice(a,a+o));a=a+o;let u=e.slice(a,e.byteLength);return{join_ref:s,ref:null,topic:l,event:c,payload:u}},decodeReply(e,t,r){let n=t.getUint8(1),i=t.getUint8(2),o=t.getUint8(3),a=t.getUint8(4),s=this.HEADER_LENGTH+this.META_LENGTH,l=r.decode(e.slice(s,s+n));s=s+n;let c=r.decode(e.slice(s,s+i));s=s+i;let u=r.decode(e.slice(s,s+o));s=s+o;let d=r.decode(e.slice(s,s+a));s=s+a;let f=e.slice(s,e.byteLength),h={status:d,response:f};return{join_ref:l,ref:c,topic:u,event:li.reply,payload:h}},decodeBroadcast(e,t,r){let n=t.getUint8(1),i=t.getUint8(2),o=this.HEADER_LENGTH+2,a=r.decode(e.slice(o,o+n));o=o+n;let s=r.decode(e.slice(o,o+i));o=o+i;let l=e.slice(o,e.byteLength);return{join_ref:null,ref:null,topic:a,event:s,payload:l}}},wK=class{constructor(e,t={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.fallbackRef=null,this.timeout=t.timeout||pK,this.transport=t.transport||Ln.WebSocket||Ss,this.conn=void 0,this.primaryPassedHealthCheck=!1,this.longPollFallbackMs=t.longPollFallbackMs,this.fallbackTimer=null,this.sessionStore=t.sessionStorage||Ln&&Ln.sessionStorage,this.establishedConnections=0,this.defaultEncoder=Yf.encode.bind(Yf),this.defaultDecoder=Yf.decode.bind(Yf),this.closeWasClean=!0,this.disconnecting=!1,this.binaryType=t.binaryType||"arraybuffer",this.connectClock=1,this.pageHidden=!1,this.encode=void 0,this.decode=void 0,this.transport!==Ss?(this.encode=t.encode||this.defaultEncoder,this.decode=t.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder);let r=null;Rs&&Rs.addEventListener&&(Rs.addEventListener("pagehide",n=>{this.conn&&(this.disconnect(),r=this.connectClock)}),Rs.addEventListener("pageshow",n=>{r===this.connectClock&&(r=null,this.connect())}),Rs.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"?this.pageHidden=!0:(this.pageHidden=!1,!this.isConnected()&&!this.closeWasClean&&this.teardown(()=>this.connect()))})),this.heartbeatIntervalMs=t.heartbeatIntervalMs||3e4,this.autoSendHeartbeat=t.autoSendHeartbeat??!0,this.heartbeatCallback=t.heartbeatCallback??(()=>{}),this.rejoinAfterMs=n=>t.rejoinAfterMs?t.rejoinAfterMs(n):[1e3,2e3,5e3][n-1]||1e4,this.reconnectAfterMs=n=>t.reconnectAfterMs?t.reconnectAfterMs(n):[10,50,100,150,200,250,500,1e3,2e3][n-1]||5e3,this.logger=t.logger||null,!this.logger&&t.debug&&(this.logger=(n,i,o)=>{console.log(`${n}: ${i}`,o)}),this.longpollerTimeout=t.longpollerTimeout||2e4,this.params=vu(t.params||{}),this.endPoint=`${e}/${pb.websocket}`,this.vsn=t.vsn||hK,this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.heartbeatSentAt=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new XM(()=>{if(this.pageHidden){this.log("Not reconnecting as page is hidden!"),this.teardown();return}this.teardown(async()=>{t.beforeReconnect&&await t.beforeReconnect(),this.connect()})},this.reconnectAfterMs),this.authToken=t.authToken}getLongPollTransport(){return Ss}replaceTransport(e){this.connectClock++,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.conn&&(this.conn.close(),this.conn=null),this.transport=e}protocol(){return location.protocol.match(/^https/)?"wss":"ws"}endPointURL(){let e=_p.appendParams(_p.appendParams(this.endPoint,this.params()),{vsn:this.vsn});return e.charAt(0)!=="/"?e:e.charAt(1)==="/"?`${this.protocol()}:${e}`:`${this.protocol()}://${location.host}${e}`}disconnect(e,t,r){this.connectClock++,this.disconnecting=!0,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.teardown(()=>{this.disconnecting=!1,e&&e()},t,r)}connect(e){e&&(console&&console.log("passing params to connect is deprecated. Instead pass :params to the Socket constructor"),this.params=vu(e)),!(this.conn&&!this.disconnecting)&&(this.longPollFallbackMs&&this.transport!==Ss?this.connectWithFallback(Ss,this.longPollFallbackMs):this.transportConnect())}log(e,t,r){this.logger&&this.logger(e,t,r)}hasLogger(){return this.logger!==null}onOpen(e){let t=this.makeRef();return this.stateChangeCallbacks.open.push([t,e]),t}onClose(e){let t=this.makeRef();return this.stateChangeCallbacks.close.push([t,e]),t}onError(e){let t=this.makeRef();return this.stateChangeCallbacks.error.push([t,e]),t}onMessage(e){let t=this.makeRef();return this.stateChangeCallbacks.message.push([t,e]),t}onHeartbeat(e){this.heartbeatCallback=e}ping(e){if(!this.isConnected())return!1;let t=this.makeRef(),r=Date.now();this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:t});let n=this.onMessage(i=>{i.ref===t&&(this.off([n]),e(Date.now()-r))});return!0}transportName(e){switch(e){case Ss:return"LongPoll";default:return e.name}}transportConnect(){this.connectClock++,this.closeWasClean=!1;let e;this.authToken&&(e=["phoenix",`${mb}${btoa(this.authToken).replace(/=/g,"")}`]),this.conn=new this.transport(this.endPointURL(),e),this.conn.binaryType=this.binaryType,this.conn.timeout=this.longpollerTimeout,this.conn.onopen=()=>this.onConnOpen(),this.conn.onerror=t=>this.onConnError(t),this.conn.onmessage=t=>this.onConnMessage(t),this.conn.onclose=t=>this.onConnClose(t)}getSession(e){return this.sessionStore&&this.sessionStore.getItem(e)}storeSession(e,t){this.sessionStore&&this.sessionStore.setItem(e,t)}connectWithFallback(e,t=2500){clearTimeout(this.fallbackTimer);let r=!1,n=!0,i,o,a=this.transportName(e),s=l=>{this.log("transport",`falling back to ${a}...`,l),this.off([i,o]),n=!1,this.replaceTransport(e),this.transportConnect()};if(this.getSession(`phx:fallback:${a}`))return s("memorized");this.fallbackTimer=setTimeout(s,t),o=this.onError(l=>{this.log("transport","error",l),n&&!r&&(clearTimeout(this.fallbackTimer),s(l))}),this.fallbackRef&&this.off([this.fallbackRef]),this.fallbackRef=this.onOpen(()=>{if(r=!0,!n){let l=this.transportName(e);return this.primaryPassedHealthCheck||this.storeSession(`phx:fallback:${l}`,"true"),this.log("transport",`established ${l} fallback`)}clearTimeout(this.fallbackTimer),this.fallbackTimer=setTimeout(s,t),this.ping(l=>{this.log("transport","connected to primary after",l),this.primaryPassedHealthCheck=!0,clearTimeout(this.fallbackTimer)})}),this.transportConnect()}clearHeartbeats(){clearTimeout(this.heartbeatTimer),clearTimeout(this.heartbeatTimeoutTimer)}onConnOpen(){this.hasLogger()&&this.log("transport",`connected to ${this.endPointURL()}`),this.closeWasClean=!1,this.disconnecting=!1,this.establishedConnections++,this.flushSendBuffer(),this.reconnectTimer.reset(),this.autoSendHeartbeat&&this.resetHeartbeat(),this.triggerStateCallbacks("open")}heartbeatTimeout(){if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.hasLogger()&&this.log("transport","heartbeat timeout. Attempting to re-establish connection");try{this.heartbeatCallback("timeout")}catch(e){this.log("error","error in heartbeat callback",e)}this.triggerChanError(),this.closeWasClean=!1,this.teardown(()=>this.reconnectTimer.scheduleTimeout(),mK,"heartbeat timeout")}}resetHeartbeat(){this.conn&&this.conn.skipHeartbeat||(this.pendingHeartbeatRef=null,this.clearHeartbeats(),this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}teardown(e,t,r){if(!this.conn)return e&&e();const n=this.conn;this.waitForBufferDone(n,()=>{t?n.close(t,r||""):n.close(),this.waitForSocketClosed(n,()=>{this.conn===n&&(this.conn.onopen=function(){},this.conn.onerror=function(){},this.conn.onmessage=function(){},this.conn.onclose=function(){},this.conn=null),e&&e()})})}waitForBufferDone(e,t,r=1){if(r===5||!e.bufferedAmount){t();return}setTimeout(()=>{this.waitForBufferDone(e,t,r+1)},150*r)}waitForSocketClosed(e,t,r=1){if(r===5||e.readyState===zn.closed){t();return}setTimeout(()=>{this.waitForSocketClosed(e,t,r+1)},150*r)}onConnClose(e){this.conn&&(this.conn.onclose=()=>{}),this.hasLogger()&&this.log("transport","close",e),this.triggerChanError(),this.clearHeartbeats(),this.closeWasClean||this.reconnectTimer.scheduleTimeout(),this.triggerStateCallbacks("close",e)}onConnError(e){this.hasLogger()&&this.log("transport",e);let t=this.transport,r=this.establishedConnections;this.triggerStateCallbacks("error",e,t,r),(t===this.transport||r>0)&&this.triggerChanError()}
255triggerChanError(){this.channels.forEach(e=>{e.isErrored()||e.isLeaving()||e.isClosed()||e.trigger(li.error)})}connectionState(){switch(this.conn&&this.conn.readyState){case zn.connecting:return"connecting";case zn.open:return"open";case zn.closing:return"closing";default:return"closed"}}isConnected(){return this.connectionState()==="open"}remove(e){this.off(e.stateChangeRefs),this.channels=this.channels.filter(t=>t!==e)}off(e){for(let t in this.stateChangeCallbacks)this.stateChangeCallbacks[t]=this.stateChangeCallbacks[t].filter(([r])=>e.indexOf(r)===-1)}channel(e,t={}){let r=new gK(e,t,this);return this.channels.push(r),r}push(e){if(this.hasLogger()){let{topic:t,event:r,payload:n,ref:i,join_ref:o}=e;this.log("push",`${t} ${r} (${o}, ${i})`,n)}this.isConnected()?this.encode(e,t=>this.conn.send(t)):this.sendBuffer.push(()=>this.encode(e,t=>this.conn.send(t)))}makeRef(){let e=this.ref+1;return e===this.ref?this.ref=0:this.ref=e,this.ref.toString()}sendHeartbeat(){if(!this.isConnected()){try{this.heartbeatCallback("disconnected")}catch(e){this.log("error","error in heartbeat callback",e)}return}if(this.pendingHeartbeatRef){this.heartbeatTimeout();return}this.pendingHeartbeatRef=this.makeRef(),this.heartbeatSentAt=Date.now(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef});try{this.heartbeatCallback("sent")}catch(e){this.log("error","error in heartbeat callback",e)}this.heartbeatTimeoutTimer=setTimeout(()=>this.heartbeatTimeout(),this.heartbeatIntervalMs)}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(e=>e()),this.sendBuffer=[])}onConnMessage(e){this.decode(e.data,t=>{let{topic:r,event:n,payload:i,ref:o,join_ref:a}=t;if(o&&o===this.pendingHeartbeatRef){const s=this.heartbeatSentAt?Date.now()-this.heartbeatSentAt:void 0;this.clearHeartbeats();try{this.heartbeatCallback(i.status==="ok"?"ok":"error",s)}catch(l){this.log("error","error in heartbeat callback",l)}this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.autoSendHeartbeat&&(this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}this.hasLogger()&&this.log("receive",`${i.status||""} ${r} ${n} ${o&&"("+o+")"||""}`.trim(),i);for(let s=0;s<this.channels.length;s++){const l=this.channels[s];l.isMember(r,n,i,a)&&l.trigger(n,i,o,a)}this.triggerStateCallbacks("message",t)})}triggerStateCallbacks(e,...t){try{this.stateChangeCallbacks[e].forEach(([r,n])=>{try{n(...t)}catch(i){this.log("error",`error in ${e} callback`,i)}})}catch(r){this.log("error",`error triggering ${e} callbacks`,r)}}leaveOpenTopic(e){let t=this.channels.find(r=>r.topic===e&&(r.isJoined()||r.isJoining()));t&&(this.hasLogger()&&this.log("transport",`leaving duplicate topic "${e}"`),t.leave())}};class gu{constructor(t,r){const n=SK(r);this.presence=new bK(t.getChannel(),n),this.presence.onJoin((i,o,a)=>{const s=gu.onJoinPayload(i,o,a);t.getChannel().trigger("presence",s)}),this.presence.onLeave((i,o,a)=>{const s=gu.onLeavePayload(i,o,a);t.getChannel().trigger("presence",s)}),this.presence.onSync(()=>{t.getChannel().trigger("presence",{event:"sync"})})}get state(){return gu.transformState(this.presence.state)}static transformState(t){return t=xK(t),Object.getOwnPropertyNames(t).reduce((r,n)=>{const i=t[n];return r[n]=$h(i),r},{})}static onJoinPayload(t,r,n){const i=mO(r),o=$h(n);return{event:"join",key:t,currentPresences:i,newPresences:o}}static onLeavePayload(t,r,n){const i=mO(r),o=$h(n);return{event:"leave",key:t,currentPresences:i,leftPresences:o}}}function $h(e){return e.metas.map(t=>(t.presence_ref=t.phx_ref,delete t.phx_ref,delete t.phx_ref_prev,t))}function xK(e){return JSON.parse(JSON.stringify(e))}function SK(e){return(e==null?void 0:e.events)&&{events:e.events}}function mO(e){return e!=null&&e.metas?$h(e):[]}var vO;(function(e){e.SYNC="sync",e.JOIN="join",e.LEAVE="leave"})(vO||(vO={}));class _K{get state(){return this.presenceAdapter.state}constructor(t,r){this.channel=t,this.presenceAdapter=new gu(this.channel.channelAdapter,r)}}class EK{constructor(t,r,n){const i=OK(n);this.channel=t.getSocket().channel(r,i),this.socket=t}get state(){return this.channel.state}set state(t){this.channel.state=t}get joinedOnce(){return this.channel.joinedOnce}get joinPush(){return this.channel.joinPush}get rejoinTimer(){return this.channel.rejoinTimer}on(t,r){return this.channel.on(t,r)}off(t,r){this.channel.off(t,r)}subscribe(t){return this.channel.join(t)}unsubscribe(t){return this.channel.leave(t)}teardown(){this.channel.teardown()}onClose(t){this.channel.onClose(t)}onError(t){return this.channel.onError(t)}push(t,r,n){let i;try{i=this.channel.push(t,r,n)}catch{throw`tried to push '${t}' to '${this.channel.topic}' before joining. Use channel.subscribe() before pushing events`}if(this.channel.pushBuffer.length>iK){const o=this.channel.pushBuffer.shift();o.cancelTimeout(),this.socket.log("channel",`discarded push due to buffer overflow: ${o.event}`,o.payload())}return i}updateJoinPayload(t){const r=this.channel.joinPush.payload();this.channel.joinPush.payload=()=>Object.assign(Object.assign({},r),t)}canPush(){return this.socket.isConnected()&&this.state===oo.joined}isJoined(){return this.state===oo.joined}isJoining(){return this.state===oo.joining}isClosed(){return this.state===oo.closed}isLeaving(){return this.state===oo.leaving}updateFilterBindings(t){this.channel.filterBindings=t}updatePayloadTransform(t){this.channel.onMessage=t}getChannel(){return this.channel}}function OK(e){return{config:Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},e.config)}}var gO;(function(e){e.ALL="*",e.INSERT="INSERT",e.UPDATE="UPDATE",e.DELETE="DELETE"})(gO||(gO={}));var Gs;(function(e){e.BROADCAST="broadcast",e.PRESENCE="presence",e.POSTGRES_CHANGES="postgres_changes",e.SYSTEM="system"})(Gs||(Gs={}));var ci;(function(e){e.SUBSCRIBED="SUBSCRIBED",e.TIMED_OUT="TIMED_OUT",e.CLOSED="CLOSED",e.CHANNEL_ERROR="CHANNEL_ERROR"})(ci||(ci={}));class yu{get state(){return this.channelAdapter.state}set state(t){this.channelAdapter.state=t}get joinedOnce(){return this.channelAdapter.joinedOnce}get timeout(){return this.socket.timeout}get joinPush(){return this.channelAdapter.joinPush}get rejoinTimer(){return this.channelAdapter.rejoinTimer}constructor(t,r={config:{}},n){var i,o;if(this.topic=t,this.params=r,this.socket=n,this.bindings={},this.subTopic=t.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},r.config),this.channelAdapter=new EK(this.socket.socketAdapter,t,this.params),this.presence=new _K(this),this._onClose(()=>{this.socket._remove(this)}),this._updateFilterTransform(),this.broadcastEndpointURL=YM(this.socket.socketAdapter.endPointURL()),this.private=this.params.config.private||!1,!this.private&&(!((o=(i=this.params.config)===null||i===void 0?void 0:i.broadcast)===null||o===void 0)&&o.replay))throw`tried to use replay on public channel '${this.topic}'. It must be a private channel.`}subscribe(t,r=this.timeout){var n,i,o;if(this.socket.isConnected()||this.socket.connect(),this.channelAdapter.isClosed()){const{config:{broadcast:a,presence:s,private:l}}=this.params,c=(i=(n=this.bindings.postgres_changes)===null||n===void 0?void 0:n.map(h=>h.filter))!==null&&i!==void 0?i:[],u=!!this.bindings[Gs.PRESENCE]&&this.bindings[Gs.PRESENCE].length>0||((o=this.params.config.presence)===null||o===void 0?void 0:o.enabled)===!0,d={},f={broadcast:a,presence:Object.assign(Object.assign({},s),{enabled:u}),postgres_changes:c,private:l};this.socket.accessTokenValue&&(d.access_token=this.socket.accessTokenValue),this._onError(h=>{t==null||t(ci.CHANNEL_ERROR,h)}),this._onClose(()=>t==null?void 0:t(ci.CLOSED)),this.updateJoinPayload(Object.assign({config:f},d)),this._updateFilterMessage(),this.channelAdapter.subscribe(r).receive("ok",async({postgres_changes:h})=>{if(this.socket._isManualToken()||this.socket.setAuth(),h===void 0){t==null||t(ci.SUBSCRIBED);return}this._updatePostgresBindings(h,t)}
255).receive("error",h=>{this.state=oo.errored,t==null||t(ci.CHANNEL_ERROR,new Error(JSON.stringify(Object.values(h).join(", ")||"error")))}).receive("timeout",()=>{t==null||t(ci.TIMED_OUT)})}return this}_updatePostgresBindings(t,r){var n;const i=this.bindings.postgres_changes,o=(n=i==null?void 0:i.length)!==null&&n!==void 0?n:0,a=[];for(let s=0;s<o;s++){const l=i[s],{filter:{event:c,schema:u,table:d,filter:f}}=l,h=t&&t[s];if(h&&h.event===c&&yu.isFilterValueEqual(h.schema,u)&&yu.isFilterValueEqual(h.table,d)&&yu.isFilterValueEqual(h.filter,f))a.push(Object.assign(Object.assign({},l),{id:h.id}));else{this.unsubscribe(),this.state=oo.errored,r==null||r(ci.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=a,this.state!=oo.errored&&r&&r(ci.SUBSCRIBED)}presenceState(){return this.presence.state}async track(t,r={}){return await this.send({type:"presence",event:"track",payload:t},r.timeout||this.timeout)}async untrack(t={}){return await this.send({type:"presence",event:"untrack"},t)}on(t,r,n){const i=this.channelAdapter.isJoined()||this.channelAdapter.isJoining(),o=t===Gs.PRESENCE||t===Gs.POSTGRES_CHANGES;if(i&&o)throw this.socket.log("channel",`cannot add \`${t}\` callbacks for ${this.topic} after \`subscribe()\`.`),new Error(`cannot add \`${t}\` callbacks for ${this.topic} after \`subscribe()\`.`);return this._on(t,r,n)}async httpSend(t,r,n={}){var i;if(r==null)return Promise.reject("Payload is required for httpSend()");const o={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(o.Authorization=`Bearer ${this.socket.accessTokenValue}`);const a={method:"POST",headers:o,body:JSON.stringify({messages:[{topic:this.subTopic,event:t,payload:r,private:this.private}]})},s=await this._fetchWithTimeout(this.broadcastEndpointURL,a,(i=n.timeout)!==null&&i!==void 0?i:this.timeout);if(s.status===202)return{success:!0};let l=s.statusText;try{const c=await s.json();l=c.error||c.message||l}catch{}return Promise.reject(new Error(l))}async send(t,r={}){var n,i;if(!this.channelAdapter.canPush()&&t.type==="broadcast"){console.warn("Realtime send() is automatically falling back to REST API. This behavior will be deprecated 
255in the future. Please use httpSend() explicitly for REST delivery.");const{event:o,payload:a}=t,s={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(s.Authorization=`Bearer ${this.socket.accessTokenValue}`);const l={method:"POST",headers:s,body:JSON.stringify({messages:[{topic:this.subTopic,event:o,payload:a,private:this.private}]})};try{const c=await this._fetchWithTimeout(this.broadcastEndpointURL,l,(n=r.timeout)!==null&&n!==void 0?n:this.timeout);return await((i=c.body)===null||i===void 0?void 0:i.cancel()),c.ok?"ok":"error"}catch(c){return c.name==="AbortError"?"timed out":"error"}}else return new Promise(o=>{var a,s,l;const c=this.channelAdapter.push(t.type,t,r.timeout||this.timeout);t.type==="broadcast"&&!(!((l=(s=(a=this.params)===null||a===void 0?void 0:a.config)===null||s===void 0?void 0:s.broadcast)===null||l===void 0)&&l.ack)&&o("ok"),c.receive("ok",()=>o("ok")),c.receive("error",()=>o("error")),c.receive("timeout",()=>o("timed out"))})}updateJoinPayload(t){this.channelAdapter.updateJoinPayload(t)}async unsubscribe(t=this.timeout){return new Promise(r=>{this.channelAdapter.unsubscribe(t).receive("ok",()=>r("ok")).receive("timeout",()=>r("timed out")).receive("error",()=>r("error"))})}teardown(){this.channelAdapter.teardown()}async _fetchWithTimeout(t,r,n){const i=new AbortController,o=setTimeout(()=>i.abort(),n),a=await this.socket.fetch(t,Object.assign(Object.assign({},r),{signal:i.signal}));return clearTimeout(o),a}_on(t,r,n){const i=t.toLocaleLowerCase(),o=this.channelAdapter.on(t,n),a={type:i,filter:r,callback:n,ref:o};return this.bindings[i]?this.bindings[i].push(a):this.bindings[i]=[a],this._updateFilterMessage(),this}_onClose(t){this.channelAdapter.onClose(t)}_onError(t){this.channelAdapter.onError(t)}_updateFilterMessage(){this.channelAdapter.updateFilterBindings((t,r,n)=>{var i,o,a,s,l,c,u;const d=t.event.toLocaleLowerCase();if(this._notThisChannelEvent(d,n))return!1;const f=(i=this.bindings[d])===null||i===void 0?void 0:i.find(h=>h.ref===t.ref);if(!f)return!0;if(["broadcast","presence","postgres_changes"].includes(d))if("id"in f){const h=f.id,v=(o=f.filter)===null||o===void 0?void 0:o.event;return h&&((a=r.ids)===null||a===void 0?void 0:a.includes(h))&&(v==="*"||(v==null?void 0:v.toLocaleLowerCase())===((s=r.data)===null||s===void 0?void 0:s.type.toLocaleLowerCase()))}else{const h=(c=(l=f==null?void 0:f.filter)===null||l===void 0?void 0:l.event)===null||c===void 0?void 0:c.toLocaleLowerCase();return h==="*"||h===((u=r==null?void 0:r.event)===null||u===void 0?void 0:u.toLocaleLowerCase())}else return f.type.toLocaleLowerCase()===d})}_notThisChannelEvent(t,r){const{close:n,error:i,leave:o,join:a}=KM;return r&&[n,i,o,a].includes(t)&&r!==this.joinPush.ref}_updateFilterTransform(){this.channelAdapter.updatePayloadTransform((t,r,n)=>{if(typeof r=="object"&&"ids"in r){const i=r.data,{schema:o,table:a,commit_timestamp:s,type:l,errors:c}=i;return Object.assign(Object.assign({},{schema:o,table:a,commit_timestamp:s,eventType:l,new:{},old:{},errors:c}),this._getPayloadRecords(i))}return r})}copyBindings(t){if(this.joinedOnce)throw new Error("cannot copy bindings into joined channel");for(const r in t.bindings)for(const n of t.bindings[r])this._on(n.type,n.filter,n.callback)}static isFilterValueEqual(t,r){return(t??void 0)===(r??void 0)}_getPayloadRecords(t){const r={new:{},old:{}};return(t.type==="INSERT"||t.type==="UPDATE")&&(r.new=pO(t.columns,t.record)),(t.type==="UPDATE"||t.type==="DELETE")&&(r.old=pO(t.columns,t.old_record)),r}}class PK{constructor(t,r){this.socket=new wK(t,r)}get timeout(){return this.socket.timeout}get endPoint(){return this.socket.endPoint}get transport(){return this.socket.transport}get heartbeatIntervalMs(){return this.socket.heartbeatIntervalMs}get heartbeatCallback(){return this.socket.heartbeatCallback}set heartbeatCallback(t){this.socket.heartbeatCallback=t}get heartbeatTimer(){return this.socket.heartbeatTimer}get pendingHeartbeatRef(){return this.socket.pendingHeartbeatRef}get reconnectTimer(){return this.socket.reconnectTimer}get vsn(){return this.socket.vsn}get encode(){return this.socket.encode}get decode(){return this.socket.decode}get reconnectAfterMs(){return this.socket.reconnectAfterMs}get sendBuffer(){return this.socket.sendBuffer}get stateChangeCallbacks(){return this.socket.stateChangeCallbacks}connect(){this.socket.connect()}disconnect(t,r,n,i=1e4){return new Promise(o=>{setTimeout(()=>
255o("timeout"),i),this.socket.disconnect(()=>{t(),o("ok")},r,n)})}push(t){this.socket.push(t)}log(t,r,n){this.socket.log(t,r,n)}makeRef(){return this.socket.makeRef()}onOpen(t){this.socket.onOpen(t)}onClose(t){this.socket.onClose(t)}onError(t){this.socket.onError(t)}onMessage(t){this.socket.onMessage(t)}isConnected(){return this.socket.isConnected()}isConnecting(){return this.socket.connectionState()==fb.connecting}isDisconnecting(){return this.socket.connectionState()==fb.closing}connectionState(){return this.socket.connectionState()}endPointURL(){return this.socket.endPointURL()}sendHeartbeat(){this.socket.sendHeartbeat()}getSocket(){return this.socket}}const TK={HEARTBEAT_INTERVAL:25e3,RECONNECT_DELAY:10,HEARTBEAT_TIMEOUT_FALLBACK:100},AK=[1e3,2e3,5e3,1e4],CK=1e4,jK=`
256  addEventListener("message", (e) => {
257    if (e.data.event === "start") {
258      setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval);
259    }
260  });`;class kK{get endPoint(){return this.socketAdapter.endPoint}get timeout(){return this.socketAdapter.timeout}get transport(){return this.socketAdapter.transport}get heartbeatCallback(){return this.socketAdapter.heartbeatCallback}get heartbeatIntervalMs(){return this.socketAdapter.heartbeatIntervalMs}get heartbeatTimer(){return this.worker?this._workerHeartbeatTimer:this.socketAdapter.heartbeatTimer}get pendingHeartbeatRef(){return this.worker?this._pendingWorkerHeartbeatRef:this.socketAdapter.pendingHeartbeatRef}get reconnectTimer(){return this.socketAdapter.reconnectTimer}get vsn(){return this.socketAdapter.vsn}get encode(){return this.socketAdapter.encode}get decode(){return this.socketAdapter.decode}get reconnectAfterMs(){return this.socketAdapter.reconnectAfterMs}get sendBuffer(){return this.socketAdapter.sendBuffer}get stateChangeCallbacks(){return this.socketAdapter.stateChangeCallbacks}constructor(t,r){var n;if(this.channels=new Array,this.accessTokenValue=null,this.accessToken=null,this.apiKey=null,this.httpEndpoint="",this.headers={},this.params={},this.ref=0,this.serializer=new oK,this._manuallySetToken=!1,this._authPromise=null,this._workerHeartbeatTimer=void 0,this._pendingWorkerHeartbeatRef=null,this._resolveFetch=o=>o?(...a)=>o(...a):(...a)=>fetch(...a),!(!((n=r==null?void 0:r.params)===null||n===void 0)&&n.apikey))throw new Error("API key is required to connect to Realtime");this.apiKey=r.params.apikey;const i=this._initializeOptions(r);this.socketAdapter=new PK(t,i),this.httpEndpoint=YM(t),this.fetch=this._resolveFetch(r==null?void 0:r.fetch)}connect(){if(!(this.isConnecting()||this.isDisconnecting()||this.isConnected())){this.accessToken&&!this._authPromise&&this._setAuthSafely("connect"),this._setupConnectionHandlers();try{this.socketAdapter.connect()}catch(t){const r=t.message;throw r.includes("Node.js")?new Error(`${r}
261
262To use Realtime in Node.js, you need to provide a WebSocket implementation:
263
264Option 1: Use Node.js 22+ which has native WebSocket support
265Option 2: Install and provide the "ws" package:
266
267  npm install ws
268
269  import ws from "ws"
270  const client = new RealtimeClient(url, {
271    ...options,
272    transport: ws
273  })`):new Error(`WebSocket not available: ${r}`)}this._handleNodeJsRaceCondition()}}endpointURL(){return this.socketAdapter.endPointURL()}async disconnect(t,r){return this.isDisconnecting()?"ok":await this.socketAdapter.disconnect(()=>{clearInterval(this._workerHeartbeatTimer),this._terminateWorker()},t,r)}getChannels(){return this.channels}async removeChannel(t){const r=await t.unsubscribe();return r==="ok"&&t.teardown(),this.channels.length===0&&this.disconnect(),r}async removeAllChannels(){const t=this.channels.map(async n=>{const i=await n.unsubscribe();return n.teardown(),i}),r=await Promise.all(t);return this.disconnect(),r}log(t,r,n){this.socketAdapter.log(t,r,n)}connectionState(){return this.socketAdapter.connectionState()||fb.closed}isConnected(){return this.socketAdapter.isConnected()}isConnecting(){return this.socketAdapter.isConnecting()}isDisconnecting(){return this.socketAdapter.isDisconnecting()}channel(t,r={config:{}}){const n=`realtime:${t}`,i=this.getChannels().find(o=>o.topic===n);if(i)return i;{const o=new yu(`realtime:${t}`,r,this);return this.channels.push(o),o}}push(t){this.socketAdapter.push(t)}async setAuth(t=null){this._authPromise=this._performAuth(t);try{await this._authPromise}finally{this._authPromise=null}}_isManualToken(){return this._manuallySetToken}async sendHeartbeat(){this.socketAdapter.sendHeartbeat()}onHeartbeat(t){this.socketAdapter.heartbeatCallback=this._wrapHeartbeatCallback(t)}_makeRef(){return this.socketAdapter.makeRef()}_remove(t){this.channels=this.channels.filter(r=>r.topic!==t.topic)}async _performAuth(t=null){let r,n=!1;if(t)r=t,n=!0;else if(this.accessToken)try{r=await this.accessToken()}catch(i){this.log("error","Error fetching access token from callback",i),r=this.accessTokenValue}else r=this.accessTokenValue;n?this._manuallySetToken=!0:this.accessToken&&(this._manuallySetToken=!1),this.accessTokenValue!=r&&(this.accessTokenValue=r,this.channels.forEac
273h(i=>{const o={access_token:r,version:eK};r&&i.updateJoinPayload(o),i.joinedOnce&&i.channelAdapter.isJoined()&&i.channelAdapter.push(KM.access_token,{access_token:r})}))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(t="general"){this._isManualToken()||this.setAuth().catch(r=>{this.log("error",`Error setting auth in ${t}`,r)})}_setupConnectionHandlers(){this.socketAdapter.onOpen(()=>{(this._authPromise||(this.accessToken&&!this.accessTokenValue?this.setAuth():Promise.resolve())).catch(r=>{this.log("error","error waiting for auth on connect",r)}),this.worker&&!this.workerRef&&this._startWorkerHeartbeat()}),this.socketAdapter.onClose(()=>{this.worker&&this.workerRef&&this._terminateWorker()}),this.socketAdapter.onMessage(t=>{t.ref&&t.ref===this._pendingWorkerHeartbeatRef&&(this._pendingWorkerHeartbeatRef=null)})}_handleNodeJsRaceCondition(){this.socketAdapter.isConnected()&&this.socketAdapter.getSocket().onConnOpen()}_wrapHeartbeatCallback(t){return(r,n)=>{r=="sent"&&this._setAuthSafely(),t&&t(r,n)}}_startWorkerHeartbeat(){this.workerUrl?this.log("worker",`starting worker for from ${this.workerUrl}`):this.log("worker","starting default worker");const t=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(t),this.workerRef.onerror=r=>{this.log("worker","worker error",r.message),this._terminateWorker(),this.disconnect()},this.workerRef.onmessage=r=>{r.data.event==="keepAlive"&&this.sendHeartbeat()},this.workerRef.postMessage({event:"start",interval:this.heartbeatIntervalMs})}_terminateWorker(){this.workerRef&&(this.log("worker","terminating worker"),this.workerRef.terminate(),this.workerRef=void 0)}_workerObjectUrl(t){let r;if(t)r=t;else{const n=new Blob([jK],{type:"application/javascript"});r=URL.createObjectURL(n)}return r}_initializeOptions(t){var r,n,i,o,a,s,l,c,u;this.worker=(r=t==null?void 0:t.worker)!==null&&r!==void 0?r:!1,this.accessToken=(n=t==null?void 0:t.accessToken)!==null&&n!==void 0?n:null;const d={};d.timeout=(i=t==null?void 0:t.timeout)!==null&&i!==void 0?i:nK,d.heartbeatIntervalMs=(o=t==null?void 0:t.heartbeatIntervalMs)!==null&&o!==void 0?o:TK.HEARTBEAT_INTERVAL,d.transport=(a=t==null?void 0:t.transport)!==null&&a!==void 0?a:JV.getWebSocketConstructor(),d.params=t==null?void 0:t.params,d.logger=t==null?void 0:t.logger,d.heartbeatCallback=this._wrapHeartbeatCallback(t==null?void 0:t.heartbeatCallback),d.reconnectAfterMs=(s=t==null?void 0:t.reconnectAfterMs)!==null&&s!==void 0?s:m=>AK[m-1]||CK;let f,h;const v=(l=t==null?void 0:t.vsn)!==null&&l!==void 0?l:rK;switch(v){case tK:f=(m,y)=>y(JSON.stringify(m)),h=(m,y)=>y(JSON.parse(m));break;case VM:f=this.serializer.encode.bind(this.serializer),h=this.serializer.decode.bind(this.serializer);break;default:throw new Error(`Unsupported serializer version: ${d.vsn}`)}if(d.vsn=v,d.encode=(c=t==null?void 0:t.encode)!==null&&c!==void 0?c:f,d.decode=(u=t==null?void 0:t.decode)!==null&&u!==void 0?u:h,d.beforeReconnect=this._reconnectAuth.bind(this),(t!=null&&t.logLevel||t!=null&&t.log_level)&&(this.logLevel=t.logLevel||t.log_level,d.params=Object.assign(Object.assign({},d.params),{log_level:this.logLevel})),this.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.workerUrl=t==null?void 0:t.workerUrl,d.autoSendHeartbeat=!this.worker}return d}async _reconnectAuth(){await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()}}var Yu=class extends Error{constructor(e,t){var r;super(e),this.name="IcebergError",this.status=t.status,this.icebergType=t.icebergType,this.icebergCode=t.icebergCode,this.details=t.details,this.isCommitStateUnknown=t.icebergType==="CommitStateUnknownException"||[500,502,504].includes(t.status)&&((r=t.icebergType)==null?void 0:r.includes("CommitState"))===!0}isNotFound(){return this.status===404}isConflict(){return this.status===409}isAuthenticationTimeout(){return this.status===419}};function NK(e,t,r){const n=new URL(t,e);if(r)for(const[i,o]of Object.entries(r))o!==void 0&&n.searchParams.set(i,o);return n.toString()}async function RK(e){return!e||e.type==="none"?{}:e.type==="bearer"?{Authorization:`Bearer ${e.token}`}:e.type==="header"?{[e.name]:e.value}:e.type==="custom"?await e.getHeaders():{}}function $K(e){const t=e.fetchImpl??globalThis.fetch;return{async request({method:r,path:n,query:i,body:o,headers:a}){const s=NK(e.baseUrl,n,i),l=await RK(e.auth),c=await t(s,{method:r,headers:{...o?{"Content-Type":"application/json"}:{},...l,...a},body:o?JSON.stringify(o):void 0}),u=await c.text(),d=(c.headers.get("content-type")||"").includes("application/json"),f=d&&u?JSON.parse(u):u;if(!c.ok){const h=d?f:void 0,v=h==null?void 0:h.error;throw new Yu((v==null?void 0:v.message)??`Request failed with status ${c.status}`,{status:c.status,icebergType:v==null?void 0:v.type,icebergCode:v==null?void 0:v.code,details:h})}return{status:c.status,headers:c.headers,data:f}}}}function Xf(e){return e.join("�")}var MK=class{constructor(e,t=""){this.client=e,this.prefix=t}async listNamespaces(e){const t=e?{parent:Xf(e.namespace)}:void 0;return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces`,query:t})).data.namespaces.map(n=>({namespace:n}))}async createNamespace(e,t){const r={namespace:e.namespace,properties:t==null?void 0:t.properties};return(await this.client.request({method:"POST",path:`${this.prefix}/namespaces`,body:r})).data}async dropNamespace(e){await this.client.request({method:"DELETE",path:`${this.prefix}
273/namespaces/${Xf(e.namespace)}`})}async loadNamespaceMetadata(e){return{properties:(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Xf(e.namespace)}`})).data.properties}}async namespaceExists(e){try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${Xf(e.namespace)}`}),!0}catch(t){if(t instanceof Yu&&t.status===404)return!1;throw t}}async createNamespaceIfNotExists(e,t){try{return await this.createNamespace(e,t)}catch(r){if(r instanceof Yu&&r.status===409)return;throw r}}};function _s(e){return e.join("�")}var IK=class{constructor(e,t="",r){this.client=e,this.prefix=t,this.accessDelegation=r}async listTables(e){return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${_s(e.namespace)}/tables`})).data.identifiers}async createTable(e,t){const r={};return this.accessDelegation&&(r["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${_s(e.namespace)}/tables`,body:t,headers:r})).data.metadata}async updateTable(e,t){const r=await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${_s(e.namespace)}/tables/${e.name}`,body:t});return{"metadata-location":r.data["metadata-location"],metadata:r.data.metadata}}async dropTable(e,t){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${_s(e.namespace)}/tables/${e.name}`,query:{purgeRequested:String((t==null?void 0:t.purge)??!1)}})}async loadTable(e){const t={};return this.accessDelegation&&(t["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${_s(e.namespace)}/tables/${e.name}`,headers:t})).data.metadata}async tableExists(e){const t={};this.accessDelegation&&(t["X-Iceberg-Access-Delegation"]=this.accessDelegation);try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${_s(e.namespace)}/tables/${e.name}`,headers:t}),!0}catch(r){if(r instanceof Yu&&r.status===404)return!1;throw r}}async createTableIfNotExists(e,t){try{return await this.createTable(e,t)}catch(r){if(r instanceof Yu&&r.status===409)return await this.loadTable({namespace:e.namespace,name:t.name});throw r}}},DK=class{constructor(e){var n;let t="v1";e.catalogName&&(t+=`/${e.catalogName}`);const r=e.baseUrl.endsWith("/")?e.baseUrl:`${e.baseUrl}/`;this.client=$K({baseUrl:r,auth:e.auth,fetchImpl:e.fetch}),this.accessDelegation=(n=e.accessDelegation)==null?void 0:n.join(","),this.namespaceOps=new MK(this.client,t),this.tableOps=new IK(this.client,t,this.accessDelegation)}async listNamespaces(e){return this.namespaceOps.listNamespaces(e)}async createNamespace(e,t){return this.namespaceOps.createNamespace(e,t)}async dropNamespace(e){await this.namespaceOps.dropNamespace(e)}async loadNamespaceMetadata(e){return this.namespaceOps.loadNamespaceMetadata(e)}async listTables(e){return this.tableOps.listTables(e)}async createTable(e,t){return this.tableOps.createTable(e,t)}async updateTable(e,t){return this.tableOps.updateTable(e,t)}async dropTable(e,t){await this.tableOps.dropTable(e,t)}async loadTable(e){return this.tableOps.loadTable(e)}async namespaceExists(e){return this.namespaceOps.namespaceExists(e)}async tableExists(e){return this.tableOps.tableExists(e)}async createNamespaceIfNotExists(e,t){return this.namespaceOps.createNamespaceIfNotExists(e,t)}async createTableIfNotExists(e,t){return this.tableOps.createTableIfNotExists(e,t)}},yv=class extends Error{constructor(e,t="storage",r,n){super(e),this.__isStorageError=!0,this.namespace=t,this.name=t==="vectors"?"StorageVectorsError":"StorageError",this.status=r,this.statusCode=n}};function bv(e){return typeof e=="object"&&e!==null&&"__isStorageError"in e}var vb=class extends yv{constructor(e,t,r,n="storage"){super(e,n,t,r),this.name=n==="vectors"?"StorageVectorsApiError":"StorageApiError",this.status=t,this.statusCode=r}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}},QM=class extends yv{constructor(e,t,r="storage"){super(e,r),this.name=r==="vectors"?"StorageVectorsUnknownError":"StorageUnknownError",this.originalError=t}};const LK=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),BK=e=>{if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);
273return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},gb=e=>{if(Array.isArray(e))return e.map(r=>gb(r));if(typeof e=="function"||e!==Object(e))return e;const t={};return Object.entries(e).forEach(([r,n])=>{const i=r.replace(/([-_][a-z])/gi,o=>o.toUpperCase().replace(/[-_]/g,""));t[i]=gb(n)}),t},FK=e=>!e||typeof e!="string"||e.length===0||e.length>100||e.trim()!==e||e.includes("/")||e.includes("\\")?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(e);function Xu(e){"@babel/helpers - typeof";return Xu=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},Xu(e)}function UK(e,t){if(Xu(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Xu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function zK(e){var t=UK(e,"string");return Xu(t)=="symbol"?t:t+""}function WK(e,t,r){return(t=zK(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function yO(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 ue(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?yO(Object(r),!0).forEach(function(n){WK(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):yO(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}const bO=e=>{var t;return e.msg||e.message||e.error_description||(typeof e.error=="string"?e.error:(t=e.error)===null||t===void 0?void 0:t.message)||JSON.stringify(e)},HK=async(e,t,r,n)=>{if(e!==null&&typeof e=="object"&&typeof e.json=="function"){const i=e;let o=parseInt(i.status,10);Number.isFinite(o)||(o=500),i.json().then(a=>{const s=(a==null?void 0:a.statusCode)||(a==null?void 0:a.code)||o+"";t(new vb(bO(a),o,s,n))}).catch(()=>{const a=o+"";t(new vb(i.statusText||`HTTP ${o} error`,o,a,n))})}else t(new QM(bO(e),e,n))},qK=(e,t,r,n)=>{const i={method:e,headers:(t==null?void 0:t.headers)||{}};if(e==="GET"||e==="HEAD"||!n)return ue(ue({},i),r);if(BK(n)){var o;const a=(t==null?void 0:t.headers)||{};let s;for(const[l,c]of Object.entries(a))l.toLowerCase()==="content-type"&&(s=c);i.headers=VK(a,"Content-Type",(o=s)!==null&&o!==void 0?o:"application/json"),i.body=JSON.stringify(n)}else i.body=n;return t!=null&&t.duplex&&(i.duplex=t.duplex),ue(ue({},i),r)};function VK(e,t,r){const n=ue({},e);for(const i of Object.keys(n))i.toLowerCase()===t.toLowerCase()&&delete n[i];return n[t]=r,n}async function Fc(e,t,r,n,i,o,a){return new Promise((s,l)=>{e(r,qK(t,n,i,o)).then(c=>{if(!c.ok)throw c;if(n!=null&&n.noResolveJson)return c;if(a==="vectors"){const u=c.headers.get("content-type");if(c.headers.get("content-length")==="0"||c.status===204)return{};if(!u||!u.includes("application/json"))return{}}return c.json()}).then(c=>s(c)).catch(c=>HK(c,l,n,a))})}function JM(e="storage"){return{get:async(t,r,n,i)=>Fc(t,"GET",r,n,i,void 0,e),post:async(t,r,n,i,o)=>Fc(t,"POST",r,i,o,n,e),put:async(t,r,n,i,o)=>Fc(t,"PUT",r,i,o,n,e),head:async(t,r,n,i)=>Fc(t,"HEAD",r,ue(ue({},n),{},{noResolveJson:!0}),i,void 0,e),remove:async(t,r,n,i,o)=>Fc(t,"DELETE",r,i,o,n,e)}}const KK=JM("storage"),{get:Qu,post:vn,put:yb,head:GK,remove:C1}=KK,Or=JM("vectors");var mc=class{constructor(e,t={},r,n="storage"){this.shouldThrowOnError=!1,this.url=e,this.headers=Object.fromEntries(Object.entries(t).map(([i,o])=>[i.toLowerCase(),o])),this.fetch=LK(r),this.namespace=n}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(e,t){return this.headers=ue(ue({},this.headers),{},{[e.toLowerCase()]:t}),this}async handleOperation(e){var t=this;try{return{data:await e(),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(bv(r))return{data:null,error:r};throw r}}},YK=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t}then(e,t){return this.execute().then(e,t)}async execute(){var e=this;try{return{data:(await e.downloadFn()).body,error:null}}catch(t){if(e.shouldThrowOnError)throw t;if(bv(t))return{data:null,error:t};throw t}}};let ZM;ZM=Symbol.toStringTag;var XK=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t,this[ZM]="BlobDownloadBuilder",this.promise=null}asStream(){return new YK(this.downloadFn,this.shouldThrowOnError)}then(e,t){return this.getPromise().then(e,t)}catch(e){return this.getPromise().catch(e)}finally(e){return this.getPromise().finally(e)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}async execute(){var e=this;try{return{data:await(await e.downloadFn()).blob(),error:null}}catch(t){if(e.shouldThrowOnError)throw t;if(bv(t))return{data:null,error:t};throw t}}};const QK={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},wO={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};
273var JK=class extends mc{constructor(e,t={},r,n){super(e,t,n,"storage"),this.bucketId=r}async uploadOrUpdate(e,t,r,n){var i=this;return i.handleOperation(async()=>{let o;const a=ue(ue({},wO),n);let s=ue(ue({},i.headers),e==="POST"&&{"x-upsert":String(a.upsert)});const l=a.metadata;typeof Blob<"u"&&r instanceof Blob?(o=new FormData,o.append("cacheControl",a.cacheControl),l&&o.append("metadata",i.encodeMetadata(l)),o.append("",r)):typeof FormData<"u"&&r instanceof FormData?(o=r,o.has("cacheControl")||o.append("cacheControl",a.cacheControl),l&&!o.has("metadata")&&o.append("metadata",i.encodeMetadata(l))):(o=r,s["cache-control"]=`max-age=${a.cacheControl}`,s["content-type"]=a.contentType,l&&(s["x-metadata"]=i.toBase64(i.encodeMetadata(l))),(typeof ReadableStream<"u"&&o instanceof ReadableStream||o&&typeof o=="object"&&"pipe"in o&&typeof o.pipe=="function")&&!a.duplex&&(a.duplex="half")),n!=null&&n.headers&&(s=ue(ue({},s),n.headers));const c=i._removeEmptyFolders(t),u=i._getFinalPath(c),d=await(e=="PUT"?yb:vn)(i.fetch,`${i.url}/object/${u}`,o,ue({headers:s},a!=null&&a.duplex?{duplex:a.duplex}:{}));return{path:c,id:d.Id,fullPath:d.Key}})}async upload(e,t,r){return this.uploadOrUpdate("POST",e,t,r)}async uploadToSignedUrl(e,t,r,n){var i=this;const o=i._removeEmptyFolders(e),a=i._getFinalPath(o),s=new URL(i.url+`/object/upload/sign/${a}`);return s.searchParams.set("token",t),i.handleOperation(async()=>{let l;const c=ue(ue({},wO),n),u=ue(ue({},i.headers),{"x-upsert":String(c.upsert)});return typeof Blob<"u"&&r instanceof Blob?(l=new FormData,l.append("cacheControl",c.cacheControl),l.append("",r)):typeof FormData<"u"&&r instanceof FormData?(l=r,l.append("cacheControl",c.cacheControl)):(l=r,u["cache-control"]=`max-age=${c.cacheControl}`,u["content-type"]=c.contentType),{path:o,fullPath:(await yb(i.fetch,s.toString(),l,{headers:u})).Key}})}async createSignedUploadUrl(e,t){var r=this;return r.handleOperation(async()=>{let n=r._getFinalPath(e);const i=ue({},r.headers);t!=null&&t.upsert&&(i["x-upsert"]="true");const o=await vn(r.fetch,`${r.url}/object/upload/sign/${n}`,{},{headers:i}),a=new URL(r.url+o.url),s=a.searchParams.get("token");if(!s)throw new yv("No token returned by API");return{signedUrl:a.toString(),path:e,token:s}})}async update(e,t,r){return this.uploadOrUpdate("PUT",e,t,r)}async move(e,t,r){var n=this;return n.handleOperation(async()=>await vn(n.fetch,`${n.url}/object/move`,{bucketId:n.bucketId,sourceKey:e,destinationKey:t,de
273stinationBucket:r==null?void 0:r.destinationBucket},{headers:n.headers}))}async copy(e,t,r){var n=this;return n.handleOperation(async()=>({path:(await vn(n.fetch,`${n.url}/object/copy`,{bucketId:n.bucketId,sourceKey:e,destinationKey:t,destinationBucket:r==null?void 0:r.destinationBucket},{headers:n.headers})).Key}))}async createSignedUrl(e,t,r){var n=this;return n.handleOperation(async()=>{let i=n._getFinalPath(e);const o=typeof(r==null?void 0:r.transform)=="object"&&r.transform!==null&&Object.keys(r.transform).length>0;let a=await vn(n.fetch,`${n.url}/object/sign/${i}`,ue({expiresIn:t},o?{transform:r.transform}:{}),{headers:n.headers});const s=new URLSearchParams;r!=null&&r.download&&s.set("download",r.download===!0?"":r.download),(r==null?void 0:r.cacheNonce)!=null&&s.set("cacheNonce",String(r.cacheNonce));const l=s.toString(),c=o&&a.signedURL.includes("/object/sign/")?a.signedURL.replace("/object/sign/","/render/image/sign/"):a.signedURL;return{signedUrl:encodeURI(`${n.url}${c}${l?`&${l}`:""}`)}})}async createSignedUrls(e,t,r){var n=this;return n.handleOperation(async()=>{const i=await vn(n.fetch,`${n.url}/object/sign/${n.bucketId}`,{expiresIn:t,paths:e},{headers:n.headers}),o=new URLSearchParams;r!=null&&r.download&&o.set("download",r.download===!0?"":r.download),(r==null?void 0:r.cacheNonce)!=null&&o.set("cacheNonce",String(r.cacheNonce));const a=o.toString();return i.map(s=>ue(ue({},s),{},{signedUrl:s.signedURL?encodeURI(`${n.url}${s.signedURL}${a?`&${a}`:""}`):null}))})}download(e,t,r){const n=typeof(t==null?void 0:t.transform)<"u"?"render/image/authenticated":"object",i=new URLSearchParams;t!=null&&t.transform&&this.applyTransformOptsToQuery(i,t.transform),(t==null?void 0:t.cacheNonce)!=null&&i.set("cacheNonce",String(t.cacheNonce));const o=i.toString(),a=this._getFinalPath(e),s=()=>Qu(this.fetch,`${this.url}/${n}/${a}${o?`?${o}`:""}`,{headers:this.headers,noResolveJson:!0},r);return new XK(s,this.shouldThrowOnError)}async info(e){var t=this;const r=t._getFinalPath(e);return t.handleOperation(async()=>gb(await Qu(t.fetch,`${t.url}/object/info/${r}`,{headers:t.headers})))}async exists(e){var t=this;const r=t._getFinalPath(e);try{return await GK(t.fetch,`${t.url}/object/${r}`,{headers:t.headers}),{data:!0,error:null}}catch(i){if(t.shouldThrowOnError)throw i;if(bv(i)){var n;const o=i instanceof vb?i.status:i instanceof QM?(n=i.originalError)===null||n===void 0?void 0:n.status:void 0;if(o!==void 0&&[400,404].includes(o))return{data:!1,error:i}}throw i}}getPublicUrl(e,t){const r=this._getFinalPath(e),n=new URLSearchParams;t!=null&&t.download&&n.set("download",t.download===!0?"":t.download),t!=null&&t.transform&&this.applyTransformOptsToQuery(n,t.transform),(t==null?void 0:t.cacheNonce)!=null&&n.set("cacheNonce",String(t.cacheNonce));const i=n.toString(),o=typeof(t==null?void 0:t.transform)<"u"?"render/image":"object";return{data:{publicUrl:encodeURI(`${this.url}/${o}/public/${r}`)+(i?`?${i}`:"")}}}async remove(e){var t=this;return t.handleOperation(async()=>await C1(t.fetch,`${t.url}/object/${t.bucketId}`,{prefixes:e},{headers:t.headers}))}async list(e,t,r){var n=this;return n.handleOperation(async()=>{const i=ue(ue(ue({},QK),t),{},{prefix:e||""});return await vn(n.fetch,`${n.url}/object/list/${n.bucketId}`,i,{headers:n.headers},r)})}async listV2(e,t){var r=this;return r.handleOperation(async()=>{const n=ue({},e);return await vn(r.fetch,`${r.url}/object/list-v2/${r.bucketId}`,n,{headers:r.headers},t)})}encodeMetadata(e){return JSON.stringify(e)}toBase64(e){return typeof Buffer<"u"?Buffer.from(e).toString("base64"):btoa(e)}_getFinalPath(e){return`${this.bucketId}/${e.replace(/^\/+/,"")}`}_removeEmptyFolders(e){return e.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}applyTransformOptsToQuery(e,t){return t.width&&e.set("width",t.width.toString()),t.height&&e.set("height",t.height.toString()),t.resize&&e.set("resize",t.resize),t.format&&e.set("format",t.format),t.quality&&e.set("quality",t.quality.toString()),e}};const ZK="2.103.0",ef={"X-Client-Info":`storage-js/${ZK}`};var eG=class extends mc{constructor(e,t={},r,n){const i=new URL(e);n!=null&&n.useNewHostname&&/supabase\.(co|in|red)$/.test(i.hostname)&&!i.hostname.includes("storage.supabase.")&&(i.hostname=i.hostname.replace("supabase.","storage.supabase."));const o=i.href.replace(/\/$/,""),a=ue(ue({},ef),t);super(o,a,r,"storage")}async listBuckets(e){var t=this;return t.handleOperation(async()=>{const r=t.listBucketOptionsToQueryString(e);return await Qu(t.fetch,`${t.url}/bucket${r}`,{headers:t.headers})})}async getBucket(e){var t=this;return t.handleOperation(async()=>await Qu(t.fetch,`${t.url}/bucket/${e}`,{headers:t.headers}))}async createBucket(e,t={public:!1}){var r=this;return r.handleOperation(async()=>await vn(r.fetch,`${r.url}/bucket`,{id:e,name:e,type:t.type,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:r.headers}))}async updateBucket(e,t){var r=this;return r.handleOperation(async()=>await yb(r.fetch,`${r.url}/bucket/${e}`,{id:e,name:e,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:r.headers}))}async emptyBucket(e){var t=this;return t.handleOperation(async()=>await vn(t.fetch,`${t.url}/bucket/${e}/empty`,{},{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await C1(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}listBucketOptionsToQueryString(e){const t={};return e&&("limit"in e&&(t.limit=String(e.limit)),"offset"in e&&(t.offset=String(e.offset)),e.search&&(t.search=e.search),e.sortColumn&&(t.sortColumn=e.sortColumn),e.sortOrder&&(t.sortOrder=e.sortOrder)),Object.keys(t).length>0?"?"+new URLSearchParams(t).toString():""}}
273,tG=class extends mc{constructor(e,t={},r){const n=e.replace(/\/$/,""),i=ue(ue({},ef),t);super(n,i,r,"storage")}async createBucket(e){var t=this;return t.handleOperation(async()=>await vn(t.fetch,`${t.url}/bucket`,{name:e},{headers:t.headers}))}async listBuckets(e){var t=this;return t.handleOperation(async()=>{const r=new URLSearchParams;(e==null?void 0:e.limit)!==void 0&&r.set("limit",e.limit.toString()),(e==null?void 0:e.offset)!==void 0&&r.set("offset",e.offset.toString()),e!=null&&e.sortColumn&&r.set("sortColumn",e.sortColumn),e!=null&&e.sortOrder&&r.set("sortOrder",e.sortOrder),e!=null&&e.search&&r.set("search",e.search);const n=r.toString(),i=n?`${t.url}/bucket?${n}`:`${t.url}/bucket`;return await Qu(t.fetch,i,{headers:t.headers})})}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await C1(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}from(e){var t=this;if(!FK(e))throw new yv("Invalid bucket name: File, folder, and bucket names must follow AWS object key naming guidelines and should avoid the use of any other characters.");const r=new DK({baseUrl:this.url,catalogName:e,auth:{type:"custom",getHeaders:async()=>t.headers},fetch:this.fetch}),n=this.shouldThrowOnError;return new Proxy(r,{get(i,o){const a=i[o];return typeof a!="function"?a:async(...s)=>{try{return{data:await a.apply(i,s),error:null}}catch(l){if(n)throw l;return{data:null,error:l}}}}})}},rG=class extends mc{constructor(e,t={},r){const n=e.replace(/\/$/,""),i=ue(ue({},ef),{},{"Content-Type":"application/json"},t);super(n,i,r,"vectors")}async createIndex(e){var t=this;return t.handleOperation(async()=>await Or.post(t.fetch,`${t.url}/CreateIndex`,e,{headers:t.headers})||{})}async getIndex(e,t){var r=this;return r.handleOperation(async()=>await Or.post(r.fetch,`${r.url}/GetIndex`,{vectorBucketName:e,indexName:t},{headers:r.headers}))}async listIndexes(e){var t=this;return t.handleOperation(async()=>await Or.post(t.fetch,`${t.url}/ListIndexes`,e,{headers:t.headers}))}async deleteIndex(e,t){var r=this;return r.handleOperation(async()=>await Or.post(r.fetch,`${r.url}/DeleteIndex`,{vectorBucketName:e,indexName:t},{headers:r.headers})||{})}},nG=class extends mc{constructor(e,t={},r){const n=e.replace(/\/$/,""),i=ue(ue({},ef),{},{"Content-Type":"application/json"},t);super(n,i,r,"vectors")}async putVectors(e){var t=this;if(e.vectors.length<1||e.vectors.length>500)throw new Error("Vector batch size must be between 1 and 500 items");return t.handleOperation(async()=>await Or.post(t.fetch,`${t.url}/PutVectors`,e,{headers:t.headers})||{})}async getVectors(e){var t=this;return t.handleOperation(async()=>await Or.post(t.fetch,`${t.url}/GetVectors`,e,{headers:t.headers}))}async listVectors(e){var t=this;if(e.segmentCount!==void 0){if(e.segmentCount<1||e.segmentCount>16)throw new Error("segmentCount must be between 1 and 16");if(e.segmentIndex!==void 0&&(e.segmentIndex<0||e.segmentIndex>=e.segmentCount))throw new Error(`segmentIndex must be between 0 and ${e.segmentCount-1}`)}return t.handleOperation(async()=>await Or.post(t.fetch,`${t.url}/ListVectors`,e,{headers:t.headers}))}async queryVectors(e){var t=this;return t.handleOperation(async()=>await Or.post(t.fetch,`${t.url}/QueryVectors`,e,{headers:t.headers}))}async deleteVectors(e){var t=this;if(e.keys.length<1||e.keys.length>500)throw new Error("Keys batch size must be between 1 and 500 items");return t.handleOperation(async()=>await Or.post(t.fetch,`${t.url}/DeleteVectors`,e,{headers:t.headers})||{})}},iG=class extends mc{constructor(e,t={},r){const n=e.replace(/\/$/,""),i=ue(ue({},ef),{},{"Content-Type":"application/json"},t);super(n,i,r,"vectors")}async createBucket(e){var t=this;return t.handleOperation(async()=>await Or.post(t.fetch,`${t.url}/CreateVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}async getBucket(e){var t=this;return t.handleOperation(async()=>await Or.post(t.fetch,`${t.url}/GetVectorBucket`,{vectorBucketName:e},{headers:t.headers}))}async listBuckets(e={}){var t=this;return t.handleOperation(async()=>await Or.post(t.fetch,`${t.url}/ListVectorBuckets`,e,{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await Or.post(t.fetch,`${t.url}/DeleteVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}},oG=class extends iG{constructor(e,t={}){super(e,t.headers||{},t.fetch)}from(e){return new aG(this.url,this.headers,e,this.fetch)}async createBucket(e){var t=()=>super.createBucket,r=this;return t().call(r,e)}async getBucket(e){var t=()=>super.getBucket,r=this;return t().call(r,e)}async listBuckets(e={}){var t=()=>super.listBuckets,r=this;return t().call(r,e)}async deleteBucket(e){var t=()=>super.deleteBucket,r=this;return t().call(r,e)}},aG=class extends rG{constructor(e,t,r,n){super(e,t,n),this.vectorBucketName=r}async createIndex(e){var t=()=>super.createIndex,r=this;return t().call(r,ue(ue({},e),{},{vectorBucketName:r.vectorBucketName}))}
273async listIndexes(e={}){var t=()=>super.listIndexes,r=this;return t().call(r,ue(ue({},e),{},{vectorBucketName:r.vectorBucketName}))}async getIndex(e){var t=()=>super.getIndex,r=this;return t().call(r,r.vectorBucketName,e)}async deleteIndex(e){var t=()=>super.deleteIndex,r=this;return t().call(r,r.vectorBucketName,e)}index(e){return new sG(this.url,this.headers,this.vectorBucketName,e,this.fetch)}},sG=class extends nG{constructor(e,t,r,n,i){super(e,t,i),this.vectorBucketName=r,this.indexName=n}async putVectors(e){var t=()=>super.putVectors,r=this;return t().call(r,ue(ue({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async getVectors(e){var t=()=>super.getVectors,r=this;return t().call(r,ue(ue({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async listVectors(e={}){var t=()=>super.listVectors,r=this;return t().call(r,ue(ue({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async queryVectors(e){var t=()=>super.queryVectors,r=this;return t().call(r,ue(ue({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async deleteVectors(e){var t=()=>super.deleteVectors,r=this;return t().call(r,ue(ue({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}},lG=class extends eG{constructor(e,t={},r,n){super(e,t,r,n)}from(e){return new JK(this.url,this.headers,e,this.fetch)}get vectors(){return new oG(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new tG(this.url+"/iceberg",this.headers,this.fetch)}};function wv(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}const eI="2.103.0",$s=30*1e3,bb=3,ry=bb*$s,cG="http://localhost:9999",uG="supabase.auth.token",dG={"X-Client-Info":`gotrue-js/${eI}`},wb="X-Supabase-Api-Version",tI={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},fG=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,hG=10*60*1e3;class Ju extends Error{constructor(t,r,n){super(t),this.__isAuthError=!0,this.name="AuthError",this.status=r,this.code=n}}function oe(e){return typeof e=="object"&&e!==null&&"__isAuthError"in e}class pG extends Ju{constructor(t,r,n){super(t,r,n),this.name="AuthApiError",this.status=r,this.code=n}}function mG(e){return oe(e)&&e.name==="AuthApiError"}class va extends Ju{constructor(t,r){super(t),this.name="AuthUnknownError",this.originalError=r}}class Ui extends Ju{constructor(t,r,n,i){super(t,n,i),this.name=r,this.status=n}}class br extends Ui{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function Qf(e){return oe(e)&&e.name==="AuthSessionMissingError"}class Es extends Ui{constructor(){super("Auth session or user missing","AuthInvalidToken
273ResponseError",500,void 0)}}class Jf extends Ui{constructor(t){super(t,"AuthInvalidCredentialsError",400,void 0)}}class Zf extends Ui{constructor(t,r=null){super(t,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=r}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}function vG(e){return oe(e)&&e.name==="AuthImplicitGrantRedirectError"}class xO extends Ui{constructor(t,r=null){super(t,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=r}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}class gG extends Ui{constructor(){super("PKCE code verifier not found in storage. This can happen if the auth flow was initiated in a different browser or device, or if the storage was cleared. For SSR frameworks (Next.js, SvelteKit, etc.), use @supabase/ssr on both the server and client to store the code verifier in cookies.","AuthPKCECodeVerifierMissingError",400,"pkce_code_verifier_not_found")}}class xb extends Ui{constructor(t,r){super(t,"AuthRetryableFetchError",r,void 0)}}function ny(e){return oe(e)&&e.name==="AuthRetryableFetchError"}class SO extends Ui{constructor(t,r,n){super(t,"AuthWeakPasswordError",r,"weak_password"),this.reasons=n}}class Sb extends Ui{constructor(t){super(t,"AuthInvalidJwtError",400,"invalid_jwt")}}const Ep="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),_O=` 	
274\r=`.split(""),yG=(()=>{const e=new Array(128);for(let t=0;t<e.length;t+=1)e[t]=-1;for(let t=0;t<_O.length;t+=1)e[_O[t].charCodeAt(0)]=-2;for(let t=0;t<Ep.length;t+=1)e[Ep[t].charCodeAt(0)]=t;return e})();function EO(e,t,r){if(e!==null)for(t.queue=t.queue<<8|e,t.queuedBits+=8;t.queuedBits>=6;){const n=t.queue>>t.queuedBits-6&63;r(Ep[n]),t.queuedBits-=6}else if(t.queuedBits>0)for(t.queue=t.queue<<6-t.queuedBits,t.queuedBits=6;t.queuedBits>=6;){const n=t.queue>>t.queuedBits-6&63;r(Ep[n]),t.queuedBits-=6}}function rI(e,t,r){const n=yG[e];if(n>-1)for(t.queue=t.queue<<6|n,t.queuedBits+=6;t.queuedBits>=8;)r(t.queue>>t.queuedBits-8&255),t.queuedBits-=8;else{if(n===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(e)}"`)}}function OO(e){const t=[],r=a=>{t.push(String.fromCodePoint(a))},n={utf8seq:0,codepoint:0},i={queue:0,queuedBits:0},o=a=>{xG(a,n,r)};for(let a=0;a<e.length;a+=1)rI(e.charCodeAt(a),i,o);return t.join("")}function bG(e,t){if(e<=127){t(e);return}else if(e<=2047){t(192|e>>6),t(128|e&63);return}else if(e<=65535){t(224|e>>12),t(128|e>>6&63),t(128|e&63);return}else if(e<=1114111){t(240|e>>18),t(128|e>>12&63),t(128|e>>6&63),t(128|e&63);return}throw new Error(`Unrecognized Unicode codepoint: ${e.toString(16)}`)}function wG(e,t){for(let r=0;r<e.length;r+=1){let n=e.charCodeAt(r);if(n>55295&&n<=56319){const i=(n-55296)*1024&65535;n=(e.charCodeAt(r+1)-56320&65535|i)+65536,r+=1}bG(n,t)}}function xG(e,t,r){if(t.utf8seq===0){if(e<=127){r(e);return}for(let n=1;n<6;n+=1)if(!(e>>7-n&1)){t.utf8seq=n;break}if(t.utf8seq===2)t.codepoint=e&31;else if(t.utf8seq===3)t.codepoint=e&15;else if(t.utf8seq===4)t.codepoint=e&7;else throw new Error("Invalid UTF-8 sequence");t.utf8seq-=1}else if(t.utf8seq>0){if(e<=127)throw new Error("Invalid UTF-8 sequence");t.codepoint=t.codepoint<<6|e&63,t.utf8seq-=1,t.utf8seq===0&&r(t.codepoint)}}function sl(e){const t=[],r={queue:0,queuedBits:0},n=i=>{t.push(i)};for(let i=0;i<e.length;i+=1)rI(e.charCodeAt(i),r,n);return new Uint8Array(t)}function SG(e){const t=[];return wG(e,r=>t.push(r)),new Uint8Array(t)}function wa(e){const t=[],r={queue:0,queuedBits:0},n=i=>{t.push(i)};return e.forEach(i=>EO(i,r,n)),EO(null,r,n),t.join("")}function _G(e){return Math.round(Date.now()/1e3)+e}function EG(){return Symbol("auth-callback")}const $t=()=>typeof window<"u"&&typeof document<"u",aa={tested:!1,writable:!1},nI=()=>{if(!$t())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(aa.tested)return aa.writable;const e=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),aa.tested=!0,aa.writable=!0}catch{aa.tested=!0,aa.writable=!1}return aa.writable};function OG(e){const t={},r=new URL(e);if(r.hash&&r.hash[0]==="#")try{new URLSearchParams(r.hash.substring(1)).forEac
274h((i,o)=>{t[o]=i})}catch{}return r.searchParams.forEach((n,i)=>{t[i]=n}),t}const iI=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),PG=e=>typeof e=="object"&&e!==null&&"status"in e&&"ok"in e&&"json"in e&&typeof e.json=="function",Ms=async(e,t,r)=>{await e.setItem(t,JSON.stringify(r))},sa=async(e,t)=>{const r=await e.getItem(t);if(!r)return null;try{return JSON.parse(r)}catch{return r}},Rt=async(e,t)=>{await e.removeItem(t)};class xv{constructor(){this.promise=new xv.promiseConstructor((t,r)=>{this.resolve=t,this.reject=r})}}xv.promiseConstructor=Promise;function eh(e){const t=e.split(".");if(t.length!==3)throw new Sb("Invalid JWT structure");for(let n=0;n<t.length;n++)if(!fG.test(t[n]))throw new Sb("JWT not in base64url format");return{header:JSON.parse(OO(t[0])),payload:JSON.parse(OO(t[1])),signature:sl(t[2]),raw:{header:t[0],payload:t[1]}}}async function TG(e){return await new Promise(t=>{setTimeout(()=>t(null),e)})}function AG(e,t){return new Promise((n,i)=>{(async()=>{for(let o=0;o<1/0;o++)try{const a=await e(o);if(!t(o,null,a)){n(a);return}}catch(a){if(!t(o,a)){i(a);return}}})()})}function CG(e){return("0"+e.toString(16)).substr(-2)}function jG(){const t=new Uint32Array(56);if(typeof crypto>"u"){const r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",n=r.length;let i="";for(let o=0;o<56;o++)i+=r.charAt(Math.floor(Math.random()*n));return i}return crypto.getRandomValues(t),Array.from(t,CG).join("")}async function kG(e){const r=new TextEncoder().encode(e),n=await crypto.subtle.digest("SHA-256",r),i=new Uint8Array(n);return Array.from(i).map(o=>String.fromCharCode(o)).join("")}async function NG(e){if(!(typeof crypto<"u"&&typeof crypto.subtle<"u"&&typeof TextEncoder<"u"))return console.warn("WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256."),e;const r=await kG(e);return btoa(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function Os(e,t,r=!1){const n=jG();let i=n;r&&(i+="/PASSWORD_RECOVERY"),await Ms(e,`${t}-code-verifier`,i);const o=await NG(n);return[o,n===o?"plain":"s256"]}const RG=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function $G(e){const t=e.headers.get(wb);if(!t||!t.match(RG))return null;try{return new Date(`${t}T00:00:00.0Z`)}catch{return null}}function MG(e){if(!e)throw new Error("Missing exp claim");const t=Math.floor(Date.now()/1e3);if(e<=t)throw new Error("JWT has expired")}function IG(e){switch(e){case"RS256":return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};case"ES256":return{name:"ECDSA",namedCurve:"P-256",hash:{name:"SHA-256"}};default:throw new Error("Invalid alg claim")}}const DG=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function Ps(e){if(!DG.test(e))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function iy(){const e={};return new Proxy(e,{get:(t,r)=>{if(r==="__isUserNotAvailableProxy")return!0;if(typeof r=="symbol"){const n=r.toString();if(n==="Symbol(Symbol.toPrimitive)"||n==="Symbol(Symbol.toStringTag)"||n==="Symbol(util.inspect.custom)")return}throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Accessing the "${r}" property of the session object is not supported. Please use getUser() instead.`)},set:(t,r)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Setting the "${r}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)},deleteProperty:(t,r)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Deleting the "${r}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)}})}function LG(e,t){return new Proxy(e,{get:(r,n,i)=>{if(n==="__isInsecureUserWarningProxy")return!0;if(typeof n=="symbol"){const o=n.toString();if(o==="Symbol(Symbol.toPrimitive)"||o==="Symbol(Symbol.toStringTag)"||o==="Symbol(util.inspect.custom)"||o==="Symbol(nodejs.util.inspect.custom)")return Reflect.get(r,n,i)}return!t.value&&typeof n=="string"&&(console.warn("Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server."),t.value=!0),Reflect.get(r,n,i)}})}function PO(e){return JSON.parse(JSON.stringify(e))}const fa=e=>e.msg||e.message||e.error_description||e.error||JSON.stringify(e),BG=[502,503,504];async function TO(e){var t;if(!PG(e))throw new xb(fa(e),0);if(BG.includes(e.status))throw new xb(fa(e),e.status);let r;try{r=await e.json()}catch(o){throw new va(fa(o),o)}let n;const i=$G(e);if(i&&i.getTime()>=tI["2024-01-01"].timestamp&&typeof r=="object"&&r&&typeof r.code=="string"?n=r.code:typeof r=="object"&&r&&typeof r.error_code=="string"&&(n=r.error_code),n){if(n==="weak_password")throw new SO(fa(r),e.status,((t=r.weak_password)===null||t===void 0?void 0:t.reasons)||[]);if(n==="session_not_found")throw new br}else if(typeof r=="object"&&r&&typeof r.weak_password=="object"&&r.weak_password&&Array.isArray(r.weak_password.reasons)&&r.weak_password.reasons.length&&r.weak_password.reasons.reduce((o,a)=>
274o&&typeof a=="string",!0))throw new SO(fa(r),e.status,r.weak_password.reasons);throw new pG(fa(r),e.status||500,n)}const FG=(e,t,r,n)=>{const i={method:e,headers:(t==null?void 0:t.headers)||{}};return e==="GET"?i:(i.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},t==null?void 0:t.headers),i.body=JSON.stringify(n),Object.assign(Object.assign({},i),r))};async function le(e,t,r,n){var i;const o=Object.assign({},n==null?void 0:n.headers);o[wb]||(o[wb]=tI["2024-01-01"].name),n!=null&&n.jwt&&(o.Authorization=`Bearer ${n.jwt}`);const a=(i=n==null?void 0:n.query)!==null&&i!==void 0?i:{};n!=null&&n.redirectTo&&(a.redirect_to=n.redirectTo);const s=Object.keys(a).length?"?"+new URLSearchParams(a).toString():"",l=await UG(e,t,r+s,{headers:o,noResolveJson:n==null?void 0:n.noResolveJson},{},n==null?void 0:n.body);return n!=null&&n.xform?n==null?void 0:n.xform(l):{data:Object.assign({},l),error:null}}async function UG(e,t,r,n,i,o){const a=FG(t,n,i,o);let s;try{s=await e(r,Object.assign({},a))}catch(l){throw console.error(l),new xb(fa(l),0)}if(s.ok||await TO(s),n!=null&&n.noResolveJson)return s;try{return await s.json()}catch(l){await TO(l)}}function hn(e){var t;let r=null;HG(e)&&(r=Object.assign({},e),e.expires_at||(r.expires_at=_G(e.expires_in)));const n=(t=e.user)!==null&&t!==void 0?t:e;return{data:{session:r,user:n},error:null}}function AO(e){const t=hn(e);return!t.error&&e.weak_password&&typeof e.weak_password=="object"&&Array.isArray(e.weak_password.reasons)&&e.weak_password.reasons.length&&e.weak_password.message&&typeof e.weak_password.message=="string"&&e.weak_password.reasons.reduce((r,n)=>r&&typeof n=="string",!0)&&(t.data.weak_password=e.weak_password),t}function ao(e){var t;return{data:{user:(t=e.user)!==null&&t!==void 0?t:e},error:null}}function zG(e){return{data:e,error:null}}function WG(e){const{action_link:t,email_otp:r,hashed_token:n,redirect_to:i,verification_type:o}=e,a=wv(e,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),s={action_link:t,email_otp:r,hashed_token:n,redirect_to:i,verification_type:o},l=Object.assign({},a);return{data:{properties:s,user:l},error:null}}function CO(e){return e}function HG(e){return e.access_token&&e.refresh_token&&e.expires_in}const oy=["global","local","others"];class qG{constructor({url:t="",headers:r={},fetch:n}){this.url=t,this.headers=r,this.fetch=iI(n),this.mfa={listFactors:this._listFactors.bind(this),deleteFactor:this._deleteFactor.bind(this)},this.oauth={listClients:this._listOAuthClients.bind(this),createClient:this._createOAuthClient.bind(this),getClient:this._getOAuthClient.bind(this),updateClient:this._updateOAuthClient.bind(this),deleteClient:this._deleteOAuthClient.bind(this),regenerateClientSecret:this._regenerateOAuthClientSecret.bind(this)},this.customProviders={listProviders:this._listCustomProviders.bind(this),createProvider:this._createCustomProvider.bind(this),getProvider:this._getCustomProvider.bind(this),updateProvider:this._updateCustomProvider.bind(this),deleteProvider:this._deleteCustomProvider.bind(this)}}async signOut(t,r=oy[0]){if(oy.indexOf(r)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${oy.join(", ")}`);try{return await le(this.fetch,"POST",`${this.url}/logout?scope=${r}`,{headers:this.headers,jwt:t,noResolveJson:!0}),{data:null,error:null}}catch(n){if(oe(n))return{data:null,error:n};throw n}}async inviteUserByEmail(t,r={}){try{return await le(this.fetch,"POST",`${this.url}/invite`,{body:{email:t,data:r.data},headers:this.headers,redirectTo:r.redirectTo,xform:ao})}catch(n){if(oe(n))return{data:{user:null},error:n};throw n}}async generateLink(t){try{const{options:r}=t,n=wv(t,["options"]),i=Object.assign(Object.assign({},n),r);return"newEmail"in n&&(i.new_email=n==null?void 0:n.newEmail,delete i.newEmail),await le(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:i,headers:this.headers,xform:WG,redirectTo:r==null?void 0:r.redirectTo})}catch(r){if(oe(r))return{data:{properties:null,user:null},error:r};throw r}}async createUser(t){try{return await le(this.fetch,"POST",`${this.url}/admin/users`,{body:t,headers:this.headers,xform:ao})}catch(r){if(oe(r))return{data:{user:null},error:r};throw r}}async listUsers(t){var r,n,i,o,a,s,l;try{const c={nextPage:null,lastPage:0,total:0},u=await le(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(n=(r=t==null?void 0:t.page)===null||r===void 0?void 0:r.toString())!==null&&n!==void 0?n:"",per_page:(o=(i=t==null?void 0:t.perPage)===null||i===void 0?void 0:i.toString())!==null&&o!==void 0?o:""},xform:CO});if(u.error)throw u.error;const d=await u.json(),f=(a=u.headers.get("x-total-count"))!==null&&a!==void 0?a:0,h=(l=(s=u.headers.get("link"))===null||s===void 0?void 0:s.split(","))!==null&&l!==void 0?l:[];return h.length>
2740&&(h.forEach(v=>{const m=parseInt(v.split(";")[0].split("=")[1].substring(0,1)),y=JSON.parse(v.split(";")[1].split("=")[1]);c[`${y}Page`]=m}),c.total=parseInt(f)),{data:Object.assign(Object.assign({},d),c),error:null}}catch(c){if(oe(c))return{data:{users:[]},error:c};throw c}}async getUserById(t){Ps(t);try{return await le(this.fetch,"GET",`${this.url}/admin/users/${t}`,{headers:this.headers,xform:ao})}catch(r){if(oe(r))return{data:{user:null},error:r};throw r}}async updateUserById(t,r){Ps(t);try{return await le(this.fetch,"PUT",`${this.url}/admin/users/${t}`,{body:r,headers:this.headers,xform:ao})}catch(n){if(oe(n))return{data:{user:null},error:n};throw n}}async deleteUser(t,r=!1){Ps(t);try{return await le(this.fetch,"DELETE",`${this.url}/admin/users/${t}`,{headers:this.headers,body:{should_soft_delete:r},xform:ao})}catch(n){if(oe(n))return{data:{user:null},error:n};throw n}}async _listFactors(t){Ps(t.userId);try{const{data:r,error:n}=await le(this.fetch,"GET",`${this.url}/admin/users/${t.userId}/factors`,{headers:this.headers,xform:i=>({data:{factors:i},error:null})});return{data:r,error:n}}catch(r){if(oe(r))return{data:null,error:r};throw r}}async _deleteFactor(t){Ps(t.userId),Ps(t.id);try{return{data:await le(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/factors/${t.id}`,{headers:this.headers}),error:null}}catch(r){if(oe(r))return{data:null,error:r};throw r}}async _listOAuthClients(t){var r,n,i,o,a,s,l;try{const c={nextPage:null,lastPage:0,total:0},u=await le(this.fetch,"GET",`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:(n=(r=t==null?void 0:t.page)===null||r===void 0?void 0:r.toString())!==null&&n!==void 0?n:"",per_page:(o=(i=t==null?void 0:t.perPage)===null||i===void 0?void 0:i.toString())!==null&&o!==void 0?o:""},xform:CO});if(u.error)throw u.error;const d=await u.json(),f=(a=u.headers.get("x-total-count"))!==null&&a!==void 0?a:0,h=(l=(s=u.headers.get("link"))===null||s===void 0?void 0:s.split(","))!==null&&l!==void 0?l:[];return h.length>0&&(h.forEach(v=>{const m=parseInt(v.split(";")[0].split("=")[1].substring(0,1)),y=JSON.parse(v.split(";")[1].split("=")[1]);c[`${y}Page`]=m}),c.total=parseInt(f)),{data:Object.assign(Object.assign({},d),c),error:null}}catch(c){if(oe(c))return{data:{clients:[]},error:c};throw c}}async _createOAuthClient(t){try{return await le(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:t,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(oe(r))return{data:null,error:r};throw r}}async _getOAuthClient(t){try{return await le(this.fetch,"GET",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(oe(r))return{data:null,error:r};throw r}}async _updateOAuthClient(t,r){try{return await le(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${t}`,{body:r,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(oe(n))return{data:null,error:n};throw n}}async _deleteOAuthClient(t){try{return await le(this.fetch,"DELETE",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if(oe(r))return{data:null,error:r};throw r}}async _regenerateOAuthClientSecret(t){try{return await le(this.fetch,"POST",`${this.url}/admin/oauth/clients/${t}/regenerate_secret`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(oe(r))return{data:null,error:r};throw r}}async _listCustomProviders(t){try{const r={};return t!=null&&t.type&&(r.type=t.type),await le(this.fetch,"GET",`${this.url}/admin/custom-providers`,{headers:this.headers,query:r,xform:n=>{var i;return{data:{providers:(i=n==null?void 0:n.providers)!==null&&i!==void 0?i:[]},error:null}}})}catch(r){if(oe(r))return{data:{providers:[]},error:r};throw r}}async _createCustomProvider(t){try{return await le(this.fetch,"POST",`${this.url}/admin/custom-providers`,{body:t,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(oe(r))return{data:null,error:r};throw r}}async _getCustomProvider(t){try{return await le(this.fetch,"GET",`${this.url}/admin/custom-providers/${t}`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(oe(r))return{data:null,error:r};throw r}}async _updateCustomProvider(t,r){try{return await le(this.fetch,"PUT",`${this.url}/admin/custom-providers/${t}`,{body:r,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(oe(n))return{data:null,error:n};throw n}}async _deleteCustomProvider(t){try{return await le(this.fetch,"DELET
274E",`${this.url}/admin/custom-providers/${t}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if(oe(r))return{data:null,error:r};throw r}}}function jO(e={}){return{getItem:t=>e[t]||null,setItem:(t,r)=>{e[t]=r},removeItem:t=>{delete e[t]}}}const In={debug:!!(globalThis&&nI()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};class oI extends Error{constructor(t){super(t),this.isAcquireTimeout=!0}}class kO extends oI{}async function VG(e,t,r){In.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",e,t);const n=new globalThis.AbortController;let i;t>0&&(i=setTimeout(()=>{n.abort(),In.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",e)},t)),await Promise.resolve();try{return await globalThis.navigator.locks.request(e,t===0?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:n.signal},async o=>{if(o){clearTimeout(i),In.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",e,o.name);try{return await r()}finally{In.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",e,o.name)}}else{if(t===0)throw In.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",e),new kO(`Acquiring an exclusive Navigator LockManager lock "${e}" immediately failed`);if(In.debug)try{const a=await globalThis.navigator.locks.query();console.log("@supabase/gotrue-js: Navigator LockManager state",JSON.stringify(a,null,"  "))}catch(a){console.warn("@supabase/gotrue-js: Error when querying Navigator LockManager state",a)}return console.warn("@supabase/gotrue-js: Navigator LockManager returned a null lock when using #request without ifAvailable set to true, it appears this browser is not following the LockManager spec https://developer.mozilla.org/en-US/docs/Web/API/LockManager/request"),clearTimeout(i),await r()}})}catch(o){if(t>0&&clearTimeout(i),(o==null?void 0:o.name)==="AbortError"&&t>0){if(n.signal.aborted)return In.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire timeout, recovering by stealing lock",e),console.warn(`@supabase/gotrue-js: Lock "${e}" was not released within ${t}ms. This may indicate an orphaned lock from a component unmount (e.g., React Strict Mode). Forcefully acquiring the lock to recover.`),await Promise.resolve().then(()=>globalThis.navigator.locks.request(e,{mode:"exclusive",steal:!0},async a=>{if(a){In.debug&&console.log("@supabase/gotrue-js: navigatorLock: recovered (stolen)",e,a.name);try{return await r()}finally{In.debug&&console.log("@supabase/gotrue-js: navigatorLock: released (stolen)",e,a.name)}}else return console.warn("@supabase/gotrue-js: Navigator LockManager returned null lock even with steal: true"),await r()}));throw In.debug&&console.log("@supabase/gotrue-js: navigatorLock: lock was stolen by another request",e),new kO(`Lock "${e}" was released because another request stole it`)}throw o}}function KG(){if(typeof globalThis!="object")try{Object.defineProperty(Object.prototype,"__magic__",{get:function(){return this},configurable:!0}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__}catch{typeof self<"u"&&(self.globalThis=self)}}function aI(e){if(!/^0x[a-fA-F0-9]{40}$/.test(e))throw new Error(`@supabase/auth-js: Address "${e}" is invalid.`);return e.toLowerCase()}function GG(e){return parseInt(e,16)}function YG(e){const t=new TextEncoder().encode(e);return"0x"+Array.from(t,n=>n.toString(16).padStart(2,"0")).join("")}function XG(e){var t;const{chainId:r,domain:n,expirationTime:i,issuedAt:o=new Date,nonce:a,notBefore:s,requestId:l,resources:c,scheme:u,uri:d,version:f}=e;{if(!Number.isInteger(r))throw new Error(`@supabase/auth-js: Invalid SIWE message field "chainId". Chain ID must be a EIP-155 chain ID. Provided value: ${r}`);if(!n)throw new Error('@supabase/auth-js: Invalid SIWE message field "domain". Domain must be provided.');if(a&&a.length<8)throw new Error(`@supabase/auth-js: Invalid SIWE message field "nonce". Nonce must be at least 8 characters. Provided value: ${a}`);if(!d)throw new Error('@supabase/auth-js: Invalid SIWE message field "uri". URI must be provided.');if(f!=="1")throw new Error(`@supabase/auth-js: Invalid SIWE message field "version". Version must be '1'. Provided value: ${f}`);if(!((t=e.statement)===null||t===void 0)&&t.includes(`
275`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${e.statement}`)}const h=aI(e.address),v=u?`${u}://${n}`:n,m=e.statement?`${e.statement}
276`:"",y=`${v} wants you to sign in with your Ethereum account:
277${h}
278
279${m}`;let w=`URI: ${d}
280Version: ${f}
281Chain ID: ${r}${a?`
282Nonce: ${a}`:""}
283Issued At: ${o.toISOString()}`;if(i&&(w+=`
284Expiration Time: ${i.toISOString()}`),s&&(w+=`
285Not Before: ${s.toISOString()}`),l&&(w+=`
286Request ID: ${l}`),c){let b=`
287Resources:`;for(const g of c){if(!g||typeof g!="string")throw new Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${g}`);b+=`
288- ${g}`}w+=b}return`${y}
289${w}`}
289class vt extends Error{constructor({message:t,code:r,cause:n,name:i}){var o;super(t,{cause:n}),this.__isWebAuthnError=!0,this.name=(o=i??(n instanceof Error?n.name:void 0))!==null&&o!==void 0?o:"Unknown Error",this.code=r}}class Op extends vt{constructor(t,r){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:r,message:t}),this.name="WebAuthnUnknownError",this.originalError=r}}function QG({error:e,options:t}){var r,n,i;const{publicKey:o}=t;if(!o)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new vt({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else if(e.name==="ConstraintError"){if(((r=o.authenticatorSelection)===null||r===void 0?void 0:r.requireResidentKey)===!0)return new vt({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:e});if(t.mediation==="conditional"&&((n=o.authenticatorSelection)===null||n===void 0?void 0:n.userVerification)==="required")return new vt({message:"User verification was required during automatic registration but it could not be performed",code:"ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",cause:e});if(((i=o.authenticatorSelection)===null||i===void 0?void 0:i.userVerification)==="required")return new vt({message:"User verification was required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",cause:e})}else{if(e.name==="InvalidStateError")return new vt({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:e});if(e.name==="NotAllowedError")return new vt({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="NotSupportedError")return o.pubKeyCredParams.filter(s=>s.type==="public-key").length===0?new vt({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:e}):new vt({message:"No available authenticator supported any of the specified pubKeyCredParams algorithms",code:"ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",cause:e});if(e.name==="SecurityError"){const a=window.location.hostname;if(sI(a)){if(o.rp.id!==a)return new vt({message:`The RP ID "${o.rp.id}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new vt({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="TypeError"){if(o.user.id.byteLength<1||o.user.id.byteLength>64)return new vt({message:"User ID was not between 1 and 64 characters",code:"ERROR_INVALID_USER_ID_LENGTH",cause:e})}else if(e.name==="UnknownError")return new vt({message:"The authenticator was unable to process the specified options, or could not create a new credential",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return new vt({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}function JG({error:e,options:t}){const{publicKey:r}=t;if(!r)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new vt({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else{if(e.name==="NotAllowedError")return new vt({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="SecurityError"){const n=window.location.hostname;if(sI(n)){if(r.rpId!==n)return new vt({message:`The RP ID "${r.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new vt({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="UnknownError")return new vt({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return new vt({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}class ZG{createNewAbortSignal(){if(this.controller){const r=new Error("Cancelling existing WebAuthn API call for new one");r.name="AbortError",this.controller.abort(r)}const t=new AbortController;return this.controller=t,t.signal}cancelCeremony(){if(this.controller){const t=new Error("Manually cancelling existing WebAuthn API call");t.name="AbortError",this.controller.abort(t),this.controller=void 0}}}const e9=new ZG;function t9(e){if(!e)throw new Error("Credential creation options are required");if(typeof PublicKeyCredential<"u"&&"parseCreationOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseCreationOptionsFromJSON=="function")return PublicKeyCredential.parseCreationOptionsFromJSON(e);const{challenge:t,user:r,excludeCredentials:n}=e,i=wv(e,["challenge","user","excludeCredentials"]),o=sl(t).buffer,a=Object.assign(Object.assign({},r),{id:sl(r.id).buffer}),s=Object.assign(Object.assign({},i),{challenge:o,user:a});if(n&&n.length>0){s.excludeCredentials=new Array(n.length);for(let l=0;l<n.length;l++){const c=n[l];
289s.excludeCredentials[l]=Object.assign(Object.assign({},c),{id:sl(c.id).buffer,type:c.type||"public-key",transports:c.transports})}}return s}function r9(e){if(!e)throw new Error("Credential request options are required");if(typeof PublicKeyCredential<"u"&&"parseRequestOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseRequestOptionsFromJSON=="function")return PublicKeyCredential.parseRequestOptionsFromJSON(e);const{challenge:t,allowCredentials:r}=e,n=wv(e,["challenge","allowCredentials"]),i=sl(t).buffer,o=Object.assign(Object.assign({},n),{challenge:i});if(r&&r.length>0){o.allowCredentials=new Array(r.length);for(let a=0;a<r.length;a++){const s=r[a];o.allowCredentials[a]=Object.assign(Object.assign({},s),{id:sl(s.id).buffer,type:s.type||"public-key",transports:s.transports})}}return o}function n9(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const r=e;return{id:e.id,rawId:e.id,response:{attestationObject:wa(new Uint8Array(e.response.attestationObject)),clientDataJSON:wa(new Uint8Array(e.response.clientDataJSON))},type:"public-key",clientExtensionResults:e.getClientExtensionResults(),authenticatorAttachment:(t=r.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function i9(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const r=e,n=e.getClientExtensionResults(),i=e.response;return{id:e.id,rawId:e.id,response:{authenticatorData:wa(new Uint8Array(i.authenticatorData)),clientDataJSON:wa(new Uint8Array(i.clientDataJSON)),signature:wa(new Uint8Array(i.signature)),userHandle:i.userHandle?wa(new Uint8Array(i.userHandle)):void 0},type:"public-key",clientExtensionResults:n,authenticatorAttachment:(t=r.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function sI(e){return e==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}function NO(){var e,t;return!!($t()&&"PublicKeyCredential"in window&&window.PublicKeyCredential&&"credentials"in navigator&&typeof((e=navigator==null?void 0:navigator.credentials)===null||e===void 0?void 0:e.create)=="function"&&typeof((t=navigator==null?void 0:navigator.credentials)===null||t===void 0?void 0:t.get)=="function")}async function o9(e){try{const t=await navigator.credentials.create(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new Op("Browser returned unexpected credential type",t)}:{data:null,error:new Op("Empty credential response",t)}}catch(t){return{data:null,error:QG({error:t,options:e})}}}async function a9(e){try{const t=await navigator.credentials.get(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new Op("Browser returned unexpected credential type",t)}:{data:null,error:new Op("Empty credential response",t)}}catch(t){return{data:null,error:JG({error:t,options:e})}}}const s9={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},l9={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function Pp(...e){const t=i=>i!==null&&typeof i=="object"&&!Array.isArray(i),r=i=>i instanceof ArrayBuffer||ArrayBuffer.isView(i),n={};for(const i of e)if(i)for(const o in i){const a=i[o];if(a!==void 0)if(Array.isArray(a))n[o]=a;else if(r(a))n[o]=a;else if(t(a)){const s=n[o];t(s)?n[o]=Pp(s,a):n[o]=Pp(a)}else n[o]=a}return n}function c9(e,t){return Pp(s9,e,t||{})}function u9(e,t){return Pp(l9,e,t||{})}class d9{constructor(t){this.client=t,this.enroll=this._enroll.bind(this),this.challenge=this._challenge.bind(this),this.verify=this._verify.bind(this),this.authenticate=this._authenticate.bind(this),this.register=this._register.bind(this)}async _enroll(t){return this.client.mfa.enroll(Object.assign(Object.assign({},t),{factorType:"webauthn"}))}async _challenge({factorId:t,webauthn:r,friendlyName:n,signal:i},o){var a;try{const{data:s,error:l}=await this.client.mfa.challenge({factorId:t,webauthn:r});if(!s)return{data:null,error:l};const c=i??e9.createNewAbortSignal();if(s.webauthn.type==="create"){const{user:u}=s.webauthn.credential_options.publicKey;if(!u.name){const d=n;if(d)u.name=`${u.id}:${d}`;else{const h=(await this.client.getUser()).data.user,v=((a=h==null?void 0:h.user_metadata)===null||a===void 0?void 0:a.name)||(h==null?void 0:h.email)||(h==null?void 0:h.id)||"User";u.name=`${u.id}:${v}`}}u.displayName||(u.displayName=u.name)}
289switch(s.webauthn.type){case"create":{const u=c9(s.webauthn.credential_options.publicKey,o==null?void 0:o.create),{data:d,error:f}=await o9({publicKey:u,signal:c});return d?{data:{factorId:t,challengeId:s.id,webauthn:{type:s.webauthn.type,credential_response:d}},error:null}:{data:null,error:f}}case"request":{const u=u9(s.webauthn.credential_options.publicKey,o==null?void 0:o.request),{data:d,error:f}=await a9(Object.assign(Object.assign({},s.webauthn.credential_options),{publicKey:u,signal:c}));return d?{data:{factorId:t,challengeId:s.id,webauthn:{type:s.webauthn.type,credential_response:d}},error:null}:{data:null,error:f}}}}catch(s){return oe(s)?{data:null,error:s}:{data:null,error:new va("Unexpected error in challenge",s)}}}async _verify({challengeId:t,factorId:r,webauthn:n}){return this.client.mfa.verify({factorId:r,challengeId:t,webauthn:n})}async _authenticate({factorId:t,webauthn:{rpId:r=typeof window<"u"?window.location.hostname:void 0,rpOrigins:n=typeof window<"u"?[window.location.origin]:void 0,signal:i}={}},o){if(!r)return{data:null,error:new Ju("rpId is required for WebAuthn authentication")};try{if(!NO())return{data:null,error:new va("Browser does not support WebAuthn",null)};const{data:a,error:s}=await this.challenge({factorId:t,webauthn:{rpId:r,rpOrigins:n},signal:i},{request:o});if(!a)return{data:null,error:s};const{webauthn:l}=a;return this._verify({factorId:t,challengeId:a.challengeId,webauthn:{type:l.type,rpId:r,rpOrigins:n,credential_response:l.credential_response}})}catch(a){return oe(a)?{data:null,error:a}:{data:null,error:new va("Unexpected error in authenticate",a)}}}async _register({friendlyName:t,webauthn:{rpId:r=typeof window<"u"?window.location.hostname:void 0,rpOrigins:n=typeof window<"u"?[window.location.origin]:void 0,signal:i}={}},o){if(!r)return{data:null,error:new Ju("rpId is required for WebAuthn registration")};try{if(!NO())return{data:null,error:new va("Browser does not support WebAuthn",null)};const{data:a,error:s}=await this._enroll({friendlyName:t});if(!a)return await this.client.mfa.listFactors().then(u=>{var d;return(d=u.data)===null||d===void 0?void 0:d.all.find(f=>f.factor_type==="webauthn"&&f.friendly_name===t&&f.status!=="unverified")}).then(u=>u?this.client.mfa.unenroll({factorId:u==null?void 0:u.id}):void 0),{data:null,error:s};const{data:l,error:c}=await this._challenge({factorId:a.id,friendlyName:a.friendly_name,webauthn:{rpId:r,rpOrigins:n},signal:i},{create:o});return l?this._verify({factorId:a.id,challengeId:l.challengeId,webauthn:{rpId:r,rpOrigins:n,type:l.webauthn.type,credential_response:l.webauthn.credential_response}}):{data:null,error:c}}catch(a){return oe(a)?{data:null,error:a}:{data:null,error:new va("Unexpected error in register",a)}}}}KG();const f9={url:cG,storageKey:uG,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:dG,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:5e3,skipAutoInitialize:!1};async function RO(e,t,r){return await r()}const Ts={};class Zu{get jwks(){var t,r;return(r=(t=Ts[this.storageKey])===null||t===void 0?void 0:t.jwks)!==null&&r!==void 0?r:{keys:[]}}set jwks(t){Ts[this.storageKey]=Object.assign(Object.assign({},Ts[this.storageKey]),{jwks:t})}get jwks_cached_at(){var t,r;return(r=(t=Ts[this.storageKey])===null||t===void 0?void 0:t.cachedAt)!==null&&r!==void 0?r:Number.MIN_SAFE_INTEGER}set jwks_cached_at(t){Ts[this.storageKey]=Object.assign(Object.assign({},Ts[this.storageKey]),{cachedAt:t})}constructor(t){var r,n,i;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.autoRefreshTickTimeout=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.initializePromise=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log;const o=Object.assign(Object.assign({},f9),t);if(this.storageKey=o.storageKey,this.instanceID=(r=Zu.nextInstanceID[this.storageKey])!==null&&r!==void 0?r:0,Zu.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!o.debug,typeof o.debug=="function"&&(this.logger=o.debug),this.instanceID>0&&$t()){const a=`${this._logPrefix()} Multiple GoTrueClient instances detected in the same browser context. It is not an error, but this should be avoided as it may produce undefined behavior when used concurrently under the same storage key.`;console.warn(a),this.logDebugMessages&&console.trace(a)}if(this.persistSession=o.persistSession,this.autoRefreshToken=o.autoRefreshToken,this.admin=new qG({url:o.url,headers:o.headers,fetch:o.fetch}),this.url=o.url,this.headers=o.headers,this.fetch=iI(o.fetch),this.lock=o.lock||RO,this.detectSessionInUrl=o.detectSessionInUrl,this.flowType=o.flowType,this.hasCustomAuthorizationHeader=o.hasCustomAuthorizationHeader,this.throwOnError=o.throwOnError,this.lockAcquireTimeout=o.lockAcquireTimeout,o.lock?this.lock=o.lock:this.persistSession&&$t()&&(!((n=globalThis==null?void 0:globalThis.navigator)===null||n===void 0)&&n.locks)?this.lock=VG:this.lock=RO,this.jwks||(this.jwks={keys:[]},this.jwks_cached_at=Number.MIN_SAFE_INTEGER),this.mfa={verify:this._verify.bind(this),enroll:this._enroll.bind(this),unenroll:this._unenroll.bind(this),challenge:this._challenge.bind(this),listFactors:this._listFactors.bind(this),challengeAndVerify:this._challengeAndVerify.bind(this),getAuthenticatorAssuranceLevel:this._getAuthenticatorAssuranceLevel.bind(this),webauthn:new d9(this)}
289,this.oauth={getAuthorizationDetails:this._getAuthorizationDetails.bind(this),approveAuthorization:this._approveAuthorization.bind(this),denyAuthorization:this._denyAuthorization.bind(this),listGrants:this._listOAuthGrants.bind(this),revokeGrant:this._revokeOAuthGrant.bind(this)},this.persistSession?(o.storage?this.storage=o.storage:nI()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=jO(this.memoryStorage)),o.userStorage&&(this.userStorage=o.userStorage)):(this.memoryStorage={},this.storage=jO(this.memoryStorage)),$t()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(a){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",a)}(i=this.broadcastChannel)===null||i===void 0||i.addEventListener("message",async a=>{this._debug("received broadcast notification from other tab or client",a);try{await this._notifyAllSubscribers(a.data.event,a.data.session,!1)}catch(s){this._debug("#broadcastChannel","error",s)}})}o.skipAutoInitialize||this.initialize().catch(a=>{this._debug("#initialize()","error",a)})}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(t){if(this.throwOnError&&t&&t.error)throw t.error;return t}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${eI}) ${new Date().toISOString()}`}_debug(...t){return this.logDebugMessages&&this.logger(this._logPrefix(),...t),this}async initialize(){return this.initializePromise?await this.initializePromise:(this.initializePromise=(async()=>await this._acquireLock(this.lockAcquireTimeout,async()=>await this._initialize()))(),await this.initializePromise)}async _initialize(){var t;try{let r={},n="none";if($t()&&(r=OG(window.location.href),this._isImplicitGrantCallback(r)?n="implicit":await this._isPKCECallback(r)&&(n="pkce")),$t()&&this.detectSessionInUrl&&n!=="none"){const{data:i,error:o}=await this._getSessionFromURL(r,n);if(o){if(this._debug("#_initialize()","error detecting session from URL",o),vG(o)){const l=(t=o.details)===null||t===void 0?void 0:t.code;if(l==="identity_already_exists"||l==="identity_not_found"||l==="single_identity_not_deletable")return{error:o}}return{error:o}}const{session:a,redirectType:s}=i;return this._debug("#_initialize()","detected session in URL",a,"redirect type",s),await this._saveSession(a),setTimeout(async()=>{s==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",a):await this._notifyAllSubscribers("SIGNED_IN",a)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(r){return oe(r)?this._returnResult({error:r}):this._returnResult({error:new va("Unexpected error during initialization",r)})}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(t){var r,n,i;try{const o=await le(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(n=(r=t==null?void 0:t.options)===null||r===void 0?void 0:r.data)!==null&&n!==void 0?n:{},gotrue_meta_security:{captcha_token:(i=t==null?void 0:t.options)===null||i===void 0?void 0:i.captchaToken}},xform:hn}),{data:a,error:s}=o;if(s||!a)return this._returnResult({data:{user:null,session:null},error:s});const l=a.session,c=a.user;return a.session&&(await this._saveSession(a.session),await this._notifyAllSubscribers("SIGNED_IN",l)),this._returnResult({data:{user:c,session:l},error:null})}catch(o){if(oe(o))return this._returnResult({data:{user:null,session:null},error:o});throw o}}async signUp(t){var r,n,i;try{let o;if("email"in t){const{email:u,password:d,options:f}=t;let h=null,v=null;this.flowType==="pkce"&&([h,v]=await Os(this.storage,this.storageKey)),o=await le(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:f==null?void 0:f.emailRedirectTo,body:{email:u,password:d,data:(r=f==null?void 0:f.data)!==null&&r!==void 0?r:{},gotrue_meta_security:{captcha_token:f==null?void 0:f.captchaToken},code_challenge:h,code_challenge_method:v},xform:hn})}else if("phone"in t){const{phone:u,password:d,options:f}=t;o=await le(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:u,password:d,data:(n=f==null?void 0:f.data)!==null&&n!==void 0?n:{},channel:(i=f==null?void 0:f.channel)!==null&&i!==void 0?i:"sms",gotrue_meta_security:{captcha_token:f==null?void 0:f.captchaToken}},xform:hn})}else throw new Jf("You must provide either an email or phone number and a password");const{data:a,error:s}=o;if(s||!a)return await Rt(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:s});const l=a.session,c=a.user;return a.session&&(await this._saveSession(a.session),await this._notifyAllSubscribers("SIGNED_IN",l)),this._returnResult({data:{user:c,session:l},error:null})}catch(o){if(await Rt(this.storage,`${this.storageKey}-code-verifier`),oe(o))return this._returnResult({data:{user:null,session:null},error:o});throw o}}async signInWithPassword(t){try{let r;if("email"in t){const{email:o,password:a,options:s}=t;r=await le(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:o,password:a,gotrue_meta_security:{captcha_token:s==null?void 0:s.captchaToken}},xform:AO})}else if("phone"in t){const{phone:o,password:a,options:s}=t;r=await le(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:o,password:a,gotrue_meta_security:{captcha_token:s==null?void 0:s.captchaToken}},xform:AO})}else throw new Jf("You must provide either an email or phone number and a password");const{data:n,error:i}=r;if(i)return this._returnResult({data:{user:null,session:null},error:i});if(!n||!n.session||!n.user){const o=new Es;return this._returnResult({data:{user:null,session:null},error:o})}return n.session&&(await this._saveSession(n.session),await this._notifyAllSubscribers("SIGNED_IN",n.session)),this._returnResult({data:Object.assign({user:n.user,session:n.session},n.weak_password?{weakPassword:n.weak_password}:null),error:i})}catch(r){if(oe(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async signInWithOAuth(t){var r,n,i,o;return await this._handleProviderSignIn(t.provider,{redirectTo:(r=t.options)===null||r===void 0?void 0:r.redirectTo,scopes:(n=t.options)===null||n===void 0?void 0:n.scopes,queryParams:(i=t.options)===null||i===void 0?void 0:i.queryParams,skipBrowserRedirect:(o=t.o
289ptions)===null||o===void 0?void 0:o.skipBrowserRedirect})}async exchangeCodeForSession(t){return await this.initializePromise,this._acquireLock(this.lockAcquireTimeout,async()=>this._exchangeCodeForSession(t))}async signInWithWeb3(t){const{chain:r}=t;switch(r){case"ethereum":return await this.signInWithEthereum(t);case"solana":return await this.signInWithSolana(t);default:throw new Error(`@supabase/auth-js: Unsupported chain "${r}"`)}}async signInWithEthereum(t){var r,n,i,o,a,s,l,c,u,d,f;let h,v;if("message"in t)h=t.message,v=t.signature;else{const{chain:m,wallet:y,statement:w,options:b}=t;let g;if($t())if(typeof y=="object")g=y;else{const T=window;if("ethereum"in T&&typeof T.ethereum=="object"&&"request"in T.ethereum&&typeof T.ethereum.request=="function")g=T.ethereum;else throw new Error("@supabase/auth-js: No compatible Ethereum wallet interface on the window object (window.ethereum) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'ethereum', wallet: resolvedUserWallet }) instead.")}else{if(typeof y!="object"||!(b!=null&&b.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");g=y}const _=new URL((r=b==null?void 0:b.url)!==null&&r!==void 0?r:window.location.href),S=await g.request({method:"eth_requestAccounts"}).then(T=>T).catch(()=>{throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!S||S.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const E=aI(S[0]);let O=(n=b==null?void 0:b.signInWithEthereum)===null||n===void 0?void 0:n.chainId;if(!O){const T=await g.request({method:"eth_chainId"});O=GG(T)}const P={domain:_.host,address:E,statement:w,uri:_.href,version:"1",chainId:O,nonce:(i=b==null?void 0:b.signInWithEthereum)===null||i===void 0?void 0:i.nonce,issuedAt:(a=(o=b==null?void 0:b.signInWithEthereum)===null||o===void 0?void 0:o.issuedAt)!==null&&a!==void 0?a:new Date,expirationTime:(s=b==null?void 0:b.signInWithEthereum)===null||s===void 0?void 0:s.expirationTime,notBefore:(l=b==null?void 0:b.signInWithEthereum)===null||l===void 0?void 0:l.notBefore,requestId:(c=b==null?void 0:b.signInWithEthereum)===null||c===void 0?void 0:c.requestId,resources:(u=b==null?void 0:b.signInWithEthereum)===null||u===void 0?void 0:u.resources};h=XG(P),v=await g.request({method:"personal_sign",params:[YG(h),E]})}try{const{data:m,error:y}=await le(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:h,signature:v},!((d=t.options)===null||d===void 0)&&d.captchaToken?{gotrue_meta_security:{captcha_token:(f=t.options)===null||f===void 0?void 0:f.captchaToken}}:null),xform:hn});if(y)throw y;if(!m||!m.session||!m.user){const w=new Es;return this._returnResult({data:{user:null,session:null},error:w})}return m.session&&(await this._saveSession(m.session),await this._notifyAllSubscribers("SIGNED_IN",m.session)),this._returnResult({data:Object.assign({},m),error:y})}catch(m){if(oe(m))return this._returnResult({data:{user:null,session:null},error:m});throw m}}async signInWithSolana(t){var r,n,i,o,a,s,l,c,u,d,f,h;let v,m;if("message"in t)v=t.message,m=t.signature;else{const{chain:y,wallet:w,statement:b,options:g}=t;let _;if($t())if(typeof w=="object")_=w;else{const E=window;if("solana"in E&&typeof E.solana=="object"&&("signIn"in E.solana&&typeof E.solana.signIn=="function"||"signMessage"in E.solana&&typeof E.solana.signMessage=="function"))_=E.solana;else throw new Error("@supabase/auth-js: No compatible Solana wallet interface on the window object (window.solana) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'solana', wallet: resolvedUserWallet }) instead.")}else{if(typeof w!="object"||!(g!=null&&g.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");_=w}const S=new URL((r=g==null?void 0:g.url)!==null&&r!==void 0?r:window.location.href);if("signIn"in _&&_.signIn){const E=await _.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},g==null?void 0:g.signInWithSolana),{version:"1",domain:S.host,uri:S.href}),b?{statement:b}:null));let O;if(Array.isArray(E)&&E[0]&&typeof E[0]=="object")O=E[0];else if(E&&typeof E=="object"&&"signedMessage"in E&&"signature"in E)O=E;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in O&&"signature"in O&&(typeof O.signedMessage=="string"||O.signedMessage instanceof Uint8Array)&&O.signature instanceof Uint8Array)v=typeof O.signedMessage=="string"?O.signedMessage:new TextDecoder().decode(O.signedMessage),m=O.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in _)||typeof _.signMessage!="function"||!("publicKey"in _)||typeof _!="object"||!_.publicKey||!("toBase58"in _.publicKey)||typeof _.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");v=[`${S.host} wants you to sign in with your Solana account:`,_.publicKey.toBase58(),...b?["",b,""]:[""],"Version: 1",`URI: ${S.href}`,`Issued At: ${(i=(n=g==null?void 0:g.signInWithSolana)===null||n===void 0?void 0:n.issuedAt)!==null&&i!==void 0?i:new Date().toISOString()}`,...!((o=g==null?void 0:g.signInWithSolana)===null||o===void 0)&&o.notBefore?[`Not Before: ${g.signInWithSolana.notBefore}`]:[],...!((a=g==null?void 0:g.signInWithSolana)===null||a===void 0)&&a.expirationTime?[`Expiration Time: ${g.signInWithSolana.expirationTime}`]:[],...!((s=g==null?void 0:g.signInWithSolana)===null||s===void 0)&&s.chainId?[`Chain ID: ${g.signInWithSolana.chainId}`]:[],...!((l=g==null?void 0:g.signInWithSolana)===null||l===void 0)&&l.nonce?[`Nonce: ${g.signInWithSolana.nonce}`]:[],...!((c=g==null?void 0:g.signInWithSolana)===null||c===void 0)&&c.requestId?[`Request ID: ${g.signInWithSolana.requestId}`]:[],...!((d=(u=g==null?void 0:g.signInWithSolana)===null||u===void 0?void 0:u.resources)===null||d===void 0)&&d.length?["Resources",...g.signInWithSolana.resources.map(O=>`- ${O}`)]:[]].join(`
290`);const E=await _.signMessage(new TextEncoder().encode(v),"utf8");if(!E||!(E instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");m=E}}try{const{data:y,error:w}=await le(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:v,signature:wa(m)},!((f=t.options)===null||f===void 0)&&f.captchaToken?{gotrue_meta_security:{captcha_token:(h=t.options)===null||h===void 0?void 0:h.captchaToken}}:null),xform:hn});if(w)throw w;if(!y||!y.session||!y.user){const b=new Es;return this._returnResult({data:{user:null,session:null},error:b})}return y.session&&(await this._saveSession(y.session),await this._notifyAllSubscribers("SIGNED_IN",y.session)),this._returnResult({data:Object.assign({},y),error:w})}catch(y){if(oe(y))return this._returnResult({data:{user:null,session:null},error:y});throw y}}async _exchangeCodeForSession(t){const r=await sa(this.storage,`${this.storageKey}-code-verifier`),[n,i]=(r??"").split("/");try{if(!n&&this.flowType==="pkce")throw new gG;const{data:o,error:a}=await le(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:t,code_verifier:n},xform:hn});if(await Rt(this.storage,`${this.storageKey}-code-verifier`),a)throw a;if(!o||!o.session||!o.user){const s=new Es;return this._returnResult({data:{user:null,session:null,redirectType:null},error:s})}return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",o.session)),this._returnResult({data:Object.assign(Object.assign({},o),{redirectType:i??null}),error:a})}catch(o){if(await Rt(this.storage,`${this.storageKey}-code-verifier`),oe(o))return this._returnResult({data:{user:null,session:null,redirectType:null},error:o});throw o}}async signInWithIdToken(t){try{const{options:r,provider:n,token:i,access_token:o,nonce:a}=t,s=await le(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:n,id_token:i,access_token:o,nonce:a,gotrue_meta_security:{captcha_token:r==null?void 0:r.captchaToken}},xform:hn}),{data:l,error:c}=s;if(c)return this._returnResult({data:{user:null,session:null},error:c});if(!l||!l.session||!l.user){const u=new Es;return this._returnResult({data:{user:null,session:null},error:u})}return l.session&&(await this._saveSession(l.session),await this._notifyAllSubscribers("SIGNED_IN",l.session)),this._returnResult({data:l,error:c})}catch(r){if(oe(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async signInWithOtp(t){var r,n,i,o,a;try{if("email"in t){const{email:s,options:l}=t;
290let c=null,u=null;this.flowType==="pkce"&&([c,u]=await Os(this.storage,this.storageKey));const{error:d}=await le(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:s,data:(r=l==null?void 0:l.data)!==null&&r!==void 0?r:{},create_user:(n=l==null?void 0:l.shouldCreateUser)!==null&&n!==void 0?n:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},code_challenge:c,code_challenge_method:u},redirectTo:l==null?void 0:l.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:d})}if("phone"in t){const{phone:s,options:l}=t,{data:c,error:u}=await le(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:s,data:(i=l==null?void 0:l.data)!==null&&i!==void 0?i:{},create_user:(o=l==null?void 0:l.shouldCreateUser)!==null&&o!==void 0?o:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},channel:(a=l==null?void 0:l.channel)!==null&&a!==void 0?a:"sms"}});return this._returnResult({data:{user:null,session:null,messageId:c==null?void 0:c.message_id},error:u})}throw new Jf("You must provide either an email or phone number.")}catch(s){if(await Rt(this.storage,`${this.storageKey}-code-verifier`),oe(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}}async verifyOtp(t){var r,n;try{let i,o;"options"in t&&(i=(r=t.options)===null||r===void 0?void 0:r.redirectTo,o=(n=t.options)===null||n===void 0?void 0:n.captchaToken);const{data:a,error:s}=await le(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},t),{gotrue_meta_security:{captcha_token:o}}),redirectTo:i,xform:hn});if(s)throw s;if(!a)throw new Error("An error occurred on token verification.");const l=a.session,c=a.user;return l!=null&&l.access_token&&(await this._saveSession(l),await this._notifyAllSubscribers(t.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",l)),this._returnResult({data:{user:c,session:l},error:null})}catch(i){if(oe(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}}async signInWithSSO(t){var r,n,i,o,a;try{let s=null,l=null;this.flowType==="pkce"&&([s,l]=await Os(this.storage,this.storageKey));const c=await le(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in t?{provider_id:t.providerId}:null),"domain"in t?{domain:t.domain}:null),{redirect_to:(n=(r=t.options)===null||r===void 0?void 0:r.redirectTo)!==null&&n!==void 0?n:void 0}),!((i=t==null?void 0:t.options)===null||i===void 0)&&i.captchaToken?{gotrue_meta_security:{captcha_token:t.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:s,code_challenge_method:l}),headers:this.headers,xform:zG});return!((o=c.data)===null||o===void 0)&&o.url&&$t()&&!(!((a=t.options)===null||a===void 0)&&a.skipBrowserRedirect)&&window.location.assign(c.data.url),this._returnResult(c)}catch(s){if(await Rt(this.storage,`${this.storageKey}-code-verifier`),oe(s))return this._returnResult({data:null,error:s});throw s}}async reauthenticate(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._reauthenticate())}async _reauthenticate(){try{return await this._useSession(async t=>{const{data:{session:r},error:n}=t;if(n)throw n;if(!r)throw new br;const{error:i}=await le(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:r.access_token});return this._returnResult({data:{user:null,session:null},error:i})})}catch(t){if(oe(t))return this._returnResult({data:{user:null,session:null},error:t});throw t}}async resend(t){try{const r=`${this.url}/resend`;if("email"in t){const{email:n,type:i,options:o}=t,{error:a}=await le(this.fetch,"POST",r,{headers:this.headers,body:{email:n,type:i,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}},redirectTo:o==null?void 0:o.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:a})}else if("phone"in t){const{phone:n,type:i,options:o}=t,{data:a,error:s}=await le(this.fetch,"POST",r,{headers:this.headers,body:{phone:n,type:i,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}}});return this._returnResult({data:{user:null,session:null,messageId:a==null?void 0:a.message_id},error:s})}throw new Jf("You must provide either an email or phone number and a type")}catch(r){if(oe(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async getSession(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>this._useSession(async r=>r))}async _acquireLock(t,r){this._debug("#_acquireLock","begin",t);try{if(this.lockAcquired){const n=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),i=(async()=>(await n,await r()))();return this.pendingInLock.push((async()=>{try{await i}catch{}})()),i}return await this.lock(`lock:${this.storageKey}`,t,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const n=r();for(this.pendingInLock.push((async()=>{try{await n}catch{}})()),await n;this.pendingInLock.length;){const i=[...this.pendingInLock];await Promise.all(i),this.pendingInLock.splice(0,i.length)}return await n}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(t){this._debug("#_useSession","begin");try{const r=await this.__loadSession();return await t(r)}finally{this._debug("#_useSession","end")}}async __loadSession(){this._debug("#__loadSession()","begin"),this.lockAcquired||this._debug("#__loadSession()","used outside of an acquired lock!",new Error().stack);try{let t=null;const r=await sa(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",r),r!==null&&(this._isValidSession(r)?t=r:(this._debug("#getSession()","session from storage is not val
290id"),await this._removeSession())),!t)return{data:{session:null},error:null};const n=t.expires_at?t.expires_at*1e3-Date.now()<ry:!1;if(this._debug("#__loadSession()",`session has${n?"":" not"} expired`,"expires_at",t.expires_at),!n){if(this.userStorage){const a=await sa(this.userStorage,this.storageKey+"-user");a!=null&&a.user?t.user=a.user:t.user=iy()}if(this.storage.isServer&&t.user&&!t.user.__isUserNotAvailableProxy){const a={value:this.suppressGetSessionWarning};t.user=LG(t.user,a),a.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:t},error:null}}const{data:i,error:o}=await this._callRefreshToken(t.refresh_token);return o?this._returnResult({data:{session:null},error:o}):this._returnResult({data:{session:i},error:null})}finally{this._debug("#__loadSession()","end")}}async getUser(t){if(t)return await this._getUser(t);await this.initializePromise;const r=await this._acquireLock(this.lockAcquireTimeout,async()=>await this._getUser());return r.data.user&&(this.suppressGetSessionWarning=!0),r}async _getUser(t){try{return t?await le(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:t,xform:ao}):await this._useSession(async r=>{var n,i,o;const{data:a,error:s}=r;if(s)throw s;return!(!((n=a.session)===null||n===void 0)&&n.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new br}:await le(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(o=(i=a.session)===null||i===void 0?void 0:i.access_token)!==null&&o!==void 0?o:void 0,xform:ao})})}catch(r){if(oe(r))return Qf(r)&&(await this._removeSession(),await Rt(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({data:{user:null},error:r});throw r}}async updateUser(t,r={}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._updateUser(t,r))}async _updateUser(t,r={}){try{return await this._useSession(async n=>{const{data:i,error:o}=n;if(o)throw o;if(!i.session)throw new br;const a=i.session;let s=null,l=null;this.flowType==="pkce"&&t.email!=null&&([s,l]=await Os(this.storage,this.storageKey));const{data:c,error:u}=await le(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:r==null?void 0:r.emailRedirectTo,body:Object.assign(Object.assign({},t),{code_challenge:s,code_challenge_method:l}),jwt:a.access_token,xform:ao});if(u)throw u;return a.user=c.user,await this._saveSession(a),await this._notifyAllSubscribers("USER_UPDATED",a),this._returnResult({data:{user:a.user},error:null})})}catch(n){if(await Rt(this.storage,`${this.storageKey}-code-verifier`),oe(n))return this._returnResult({data:{user:null},error:n});throw n}}async setSession(t){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._setSession(t))}async _setSession(t){try{if(!t.access_token||!t.refresh_token)throw new br;const r=Date.now()/1e3;let n=r,i=!0,o=null;const{payload:a}=eh(t.access_token);if(a.exp&&(n=a.exp,i=n<=r),i){const{data:s,error:l}=await this._callRefreshToken(t.refresh_token);if(l)return this._returnResult({data:{user:null,session:null},error:l});if(!s)return{data:{user:null,session:null},error:null};o=s}else{const{data:s,error:l}=await this._getUser(t.access_token);if(l)return this._returnResult({data:{user:null,session:null},error:l});o={access_token:t.access_token,refresh_token:t.refresh_token,user:s.user,token_type:"bearer",expires_in:n-r,expires_at:n},await this._saveSession(o),await this._notifyAllSubscribers("SIGNED_IN",o)}return this._returnResult({data:{user:o.user,session:o},error:null})}catch(r){if(oe(r))return this._returnResult({data:{session:null,user:null},error:r});throw r}}async refreshSession(t){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._refreshSession(t))}async _refreshSession(t){try{return await this._useSession(async r=>{var n;if(!t){const{data:a,error:s}=r;if(s)throw s;t=(n=a.session)!==null&&n!==void 0?n:void 0}if(!(t!=null&&t.refresh_token))throw new br;const{data:i,error:o}=await this._callRefreshToken(t.refresh_token);return o?this._returnResult({data:{user:null,session:null},error:o}):i?this._returnResult({data:{user:i.user,session:i},error:null}):this._returnResult({data:{user:null,session:null},error:null})})}catch(r){if(oe(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async _getSessionFromURL(t,r){try{if(!$t())throw new Zf("No browser detected.");
290if(t.error||t.error_description||t.error_code)throw new Zf(t.error_description||"Error in URL with unspecified error_description",{error:t.error||"unspecified_error",code:t.error_code||"unspecified_code"});switch(r){case"implicit":if(this.flowType==="pkce")throw new xO("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new Zf("Not a valid implicit grant flow url.");break;default:}if(r==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!t.code)throw new xO("No code detected.");const{data:b,error:g}=await this._exchangeCodeForSession(t.code);if(g)throw g;const _=new URL(window.location.href);return _.searchParams.delete("code"),window.history.replaceState(window.history.state,"",_.toString()),{data:{session:b.session,redirectType:null},error:null}}const{provider_token:n,provider_refresh_token:i,access_token:o,refresh_token:a,expires_in:s,expires_at:l,token_type:c}=t;if(!o||!s||!a||!c)throw new Zf("No session defined in URL");const u=Math.round(Date.now()/1e3),d=parseInt(s);let f=u+d;l&&(f=parseInt(l));const h=f-u;h*1e3<=$s&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${h}s, should have been closer to ${d}s`);const v=f-d;u-v>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",v,f,u):u-v<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",v,f,u);const{data:m,error:y}=await this._getUser(o);if(y)throw y;const w={provider_token:n,provider_refresh_token:i,access_token:o,expires_in:d,expires_at:f,refresh_token:a,token_type:c,user:m.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:w,redirectType:t.type},error:null})}catch(n){if(oe(n))return this._returnResult({data:{session:null,redirectType:null},error:n});throw n}}_isImplicitGrantCallback(t){return typeof this.detectSessionInUrl=="function"?this.detectSessionInUrl(new URL(window.location.href),t):!!(t.access_token||t.error_description)}async _isPKCECallback(t){const r=await sa(this.storage,`${this.storageKey}-code-verifier`);return!!(t.code&&r)}async signOut(t={scope:"global"}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._signOut(t))}async _signOut({scope:t}={scope:"global"}){return await this._useSession(async r=>{var n;const{data:i,error:o}=r;if(o&&!Qf(o))return this._returnResult({error:o});const a=(n=i.session)===null||n===void 0?void 0:n.access_token;if(a){const{error:s}=await this.admin.signOut(a,t);if(s&&!(mG(s)&&(s.status===404||s.status===401||s.status===403)||Qf(s)))return this._returnResult({error:s})}return t!=="others"&&(await this._removeSession(),await Rt(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({error:null})})}onAuthStateChange(t){const r=EG(),n={id:r,callback:t,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",r),this.stateChangeEmitters.delete(r)}};return this._debug("#onAuthStateChange()","registered callback with id",r),this.stateChangeEmitters.set(r,n),(async()=>(await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{this._emitInitialSession(r)})))(),{data:{subscription:n}}}async _emitInitialSession(t){return await this._useSession(async r=>{var n,i;try{const{data:{session:o},error:a}=r;if(a)throw a;await((n=this.stateChangeEmitters.get(t))===null||n===void 0?void 0:n.callback("INITIAL_SESSION",o)),this._debug("INITIAL_SESSION","callback id",t,"session",o)}catch(o){await((i=this.stateChangeEmitters.get(t))===null||i===void 0?void 0:i.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",t,"error",o),Qf(o)?console.warn(o):console.error(o)}})}async resetPasswordForEmail(t,r={}){let n=null,i=null;this.flowType==="pkce"&&([n,i]=await Os(this.storage,this.storageKey,!0));try{return await le(this.fetch,"POST",`${this.url}/recover`,{body:{email:t,code_challenge:n,code_challenge_method:i,gotrue_meta_security:{captcha_token:r.captchaToken}},headers:this.headers,redirectTo:r.redirectTo})}catch(o){if(await Rt(this.storage,`${this.storageKey}-code-verifier`),oe(o))return this._returnResult({data:null,error:o});throw o}}async getUserIdentities(){var t;try{const{data:r,error:n}=await this.getUser();if(n)throw n;return this._returnResult({data:{identities:(t=r.user.identities)!==null&&t!==void 0?t:[]},error:null})}catch(r){if(oe(r))return this._returnResult({data:null,error:r});throw r}}async linkIdentity(t){return"token"in t?this.linkIdentityIdToken(t):this.linkIdentityOAuth(t)}async linkIdentityOAuth(t){var r;try{const{data:n,error:i}=await this._useSession(async o=>{var a,s,l,c,u;const{data:d,error:f}=o;if(f)throw f;const h=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,t.provider,{redirectTo:(a=t.options)===null||a===void 0?void 0:a.redirectTo,scopes:(s=t.options)===null||s===void 0?void 0:s.scopes,queryParams:(l=t.options)===null||l===void 0?void 0:l.queryParams,skipBrowserRedirect:!0});return await le(this.fetch,"GET",h,{headers:this.headers,jwt:(u=(c=d.session)===null||c===void 0?void 0:c.access_token)!==null&&u!==void 0?u:void 0})});if(i)throw i;return $t()&&!(!((r=t.options)===null||r===void 0)&&r.skipBrowserRedirect)&&window.location.assign(n==null?void 0:n.url),this._returnResult({data:{provider:t.provider,url:n==null?void 0:n.url},error:null})}catch(n){if(oe(n))return this._returnResult({data:{provider:t.provider,url:null},error:n});throw n}}async linkIdentityIdToken(t){return await this._useSession(async r=>{var n;try{const{error:i,data:{session:o}}=r;if(i)throw i;const{options:a,provider:s,token:l,access_token:c,nonce:u}=t,d=await le(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,jwt:(n=o==null?void 0:o.access_token)!==null&&n!==void 0?n:void 0,body:{provider:s,id_token:l,access_token:c,nonce:u,link_identity:!0,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},xform:hn}),{data:f,error:h}=d;return h?this._returnResult({data:{user:null,session:null},error:h}):!f||!f.session||!f.user?this._returnResult({data:{user:null,session:null},error:new Es}):(f.session&&(await this._saveSession(f.session),await this._notifyAllSubscribers("USER_UPDATED",f.session)),this._returnResult({data:f,error:h}))}catch(i){if(await Rt(this.storage,`${this.storageKey}-code-verifier`),oe(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}})}async unlinkIdentity(t){try{return await this._useSession(async r=>{var n,i;const{data:o,error:a}=r;if(a)throw a;
290return await le(this.fetch,"DELETE",`${this.url}/user/identities/${t.identity_id}`,{headers:this.headers,jwt:(i=(n=o.session)===null||n===void 0?void 0:n.access_token)!==null&&i!==void 0?i:void 0})})}catch(r){if(oe(r))return this._returnResult({data:null,error:r});throw r}}async _refreshAccessToken(t){const r=`#_refreshAccessToken(${t.substring(0,5)}...)`;this._debug(r,"begin");try{const n=Date.now();return await AG(async i=>(i>0&&await TG(200*Math.pow(2,i-1)),this._debug(r,"refreshing attempt",i),await le(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:t},headers:this.headers,xform:hn})),(i,o)=>{const a=200*Math.pow(2,i);return o&&ny(o)&&Date.now()+a-n<$s})}catch(n){if(this._debug(r,"error",n),oe(n))return this._returnResult({data:{session:null,user:null},error:n});throw n}finally{this._debug(r,"end")}}_isValidSession(t){return typeof t=="object"&&t!==null&&"access_token"in t&&"refresh_token"in t&&"expires_at"in t}async _handleProviderSignIn(t,r){const n=await this._getUrlForProvider(`${this.url}/authorize`,t,{redirectTo:r.redirectTo,scopes:r.scopes,queryParams:r.queryParams});return this._debug("#_handleProviderSignIn()","provider",t,"options",r,"url",n),$t()&&!r.skipBrowserRedirect&&window.location.assign(n),{data:{provider:t,url:n},error:null}}async _recoverAndRefresh(){var t,r;const n="#_recoverAndRefresh()";this._debug(n,"begin");try{const i=await sa(this.storage,this.storageKey);if(i&&this.userStorage){let a=await sa(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!a&&(a={user:i.user},await Ms(this.userStorage,this.storageKey+"-user",a)),i.user=(t=a==null?void 0:a.user)!==null&&t!==void 0?t:iy()}else if(i&&!i.user&&!i.user){const a=await sa(this.storage,this.storageKey+"-user");a&&(a!=null&&a.user)?(i.user=a.user,await Rt(this.storage,this.storageKey+"-user"),await Ms(this.storage,this.storageKey,i)):i.user=iy()}if(this._debug(n,"session from storage",i),!this._isValidSession(i)){this._debug(n,"session is not valid"),i!==null&&await this._removeSession();return}const o=((r=i.expires_at)!==null&&r!==void 0?r:1/0)*1e3-Date.now()<ry;if(this._debug(n,`session has${o?"":" not"} expired with margin of ${ry}s`),o){if(this.autoRefreshToken&&i.refresh_token){const{error:a}=await this._callRefreshToken(i.refresh_token);a&&(console.error(a),ny(a)||(this._debug(n,"refresh failed with a non-retryable error, removing the session",a),await this._removeSession()))}}else if(i.user&&i.user.__isUserNotAvailableProxy===!0)try{const{data:a,error:s}=await this._getUser(i.access_token);!s&&(a!=null&&a.user)?(i.user=a.user,await this._saveSession(i),await this._notifyAllSubscribers("SIGNED_IN",i)):this._debug(n,"could not get user data, skipping SIGNED_IN notification")}catch(a){console.error("Error getting user data:",a),this._debug(n,"error getting user data, skipping SIGNED_IN notification",a)}else await this._notifyAllSubscribers("SIGNED_IN",i)}catch(i){this._debug(n,"error",i),console.error(i);return}finally{this._debug(n,"end")}}async _callRefreshToken(t){var r,n;if(!t)throw new br;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const i=`#_callRefreshToken(${t.substring(0,5)}...)`;this._debug(i,"begin");try{this.refreshingDeferred=new xv;const{data:o,error:a}=await this._refreshAccessToken(t);if(a)throw a;if(!o.session)throw new br;await this._saveSession(o.session),await this._notifyAllSubscribers("TOKEN_REFRESHED",o.session);const s={data:o.session,error:null};return this.refreshingDeferred.resolve(s),s}catch(o){if(this._debug(i,"error",o),oe(o)){const a={data:null,error:o};return ny(o)||await this._removeSession(),(r=this.refreshingDeferred)===null||r===void 0||r.resolve(a),a}throw(n=this.refreshingDeferred)===null||n===void 0||n.reject(o),o}finally{this.refreshingDeferred=null,this._debug(i,"end")}}async _notifyAllSubscribers(t,r,n=!0){const i=`#_notifyAllSubscribers(${t})`;this._debug(i,"begin",r,`broadcast = ${n}`);try{this.broadcastChannel&&n&&this.broadcastChannel.postMessage({event:t,session:r});const o=[],a=Array.from(this.stateChangeEmitters.values()).map(async s=>{try{await s.callback(t,r)}catch(l){o.push(l)}});if(await Promise.all(a),o.length>0){for(let s=0;s<o.length;s+=1)console.error(o[s]);throw o[0]}}finally{this._debug(i,"end")}}async _saveSession(t){this._debug("#_saveSession()",t),this.suppressGetSessionWarning=!0,await Rt(this.storage,`${this.storageKey}-code-verifier`);const r=Object.assign({},t),n=r.user&&r.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!n&&r.user&&await Ms(this.userStorage,this.storageKey+"-user",{user:r.user});const i=Object.assign({},r);delete i.user;const o=PO(i);await Ms(this.storage,this.storageKey,o)}else{const i=PO(r);await Ms(this.storage,this.storageKey,i)}}async _removeSession(){this._debug("#_removeSession()"),this.suppressGetSessionWarning=!1,await Rt(this.storage,this.storageKey),await Rt(this.storage,this.storageKey+"-code-verifier"),await Rt(this.storage,this.storageKey+"-user"),this.userStorage&&await Rt(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const t=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{t&&$t()&&(window!=null&&window.removeEventListener)&&window.removeEventListener("visibilitychange",t)}
290catch(r){console.error("removing visibilitychange callback failed",r)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const t=setInterval(()=>this._autoRefreshTokenTick(),$s);this.autoRefreshTicker=t,t&&typeof t=="object"&&typeof t.unref=="function"?t.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(t);const r=setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0);this.autoRefreshTickTimeout=r,r&&typeof r=="object"&&typeof r.unref=="function"?r.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(r)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const t=this.autoRefreshTicker;this.autoRefreshTicker=null,t&&clearInterval(t);const r=this.autoRefreshTickTimeout;this.autoRefreshTickTimeout=null,r&&clearTimeout(r)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async _autoRefreshTokenTick(){this._debug("#_autoRefreshTokenTick()","begin");try{await this._acquireLock(0,async()=>{try{const t=Date.now();try{return await this._useSession(async r=>{const{data:{session:n}}=r;if(!n||!n.refresh_token||!n.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const i=Math.floor((n.expires_at*1e3-t)/$s);this._debug("#_autoRefreshTokenTick()",`access token expires in ${i} ticks, a tick lasts ${$s}ms, refresh threshold is ${bb} ticks`),i<=bb&&await this._callRefreshToken(n.refresh_token)})}catch(r){console.error("Auto refresh tick failed with error. This is likely a transient error.",r)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(t){if(t.isAcquireTimeout||t instanceof oI)this._debug("auto refresh token tick lock not available");else throw t}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!$t()||!(window!=null&&window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>{try{await this._onVisibilityChanged(!1)}catch(t){this._debug("#visibilityChangedCallback","error",t)}},window==null||window.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(t){console.error("_handleVisibilityChange",t)}}async _onVisibilityChanged(t){const r=`#_onVisibilityChanged(${t})`;this._debug(r,"visibilityState",document.visibilityState),document.visibilityState==="visible"?(this.autoRefreshToken&&this._startAutoRefresh(),t||(await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{if(document.visibilityState!=="visible"){this._debug(r,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}await this._recoverAndRefresh()}))):document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(t,r,n){const i=[`provider=${encodeURIComponent(r)}`];if(n!=null&&n.redirectTo&&i.push(`redirect_to=${encodeURIComponent(n.redirectTo)}`),n!=null&&n.scopes&&i.push(`scopes=${encodeURIComponent(n.scopes)}`),this.flowType==="pkce"){const[o,a]=await Os(this.storage,this.storageKey),s=new URLSearchParams({code_challenge:`${encodeURIComponent(o)}`,code_challenge_method:`${encodeURIComponent(a)}`});i.push(s.toString())}if(n!=null&&n.queryParams){const o=new URLSearchParams(n.queryParams);i.push(o.toString())}return n!=null&&n.skipBrowserRedirect&&i.push(`skip_http_redirect=${n.skipBrowserRedirect}`),`${t}?${i.join("&")}`}async _unenroll(t){try{return await this._useSession(async r=>{var n;const{data:i,error:o}=r;return o?this._returnResult({data:null,error:o}):await le(this.fetch,"DELETE",`${this.url}/factors/${t.factorId}`,{headers:this.headers,jwt:(n=i==null?void 0:i.session)===null||n===void 0?void 0:n.access_token})})}catch(r){if(oe(r))return this._returnResult({data:null,error:r});throw r}}async _enroll(t){try{return await this._useSession(async r=>{var n,i;const{data:o,error:a}=r;if(a)return this._returnResult({data:null,error:a});const s=Object.assign({friendly_name:t.friendlyName,factor_type:t.factorType},t.factorType==="phone"?{phone:t.phone}:t.factorType==="totp"?{issuer:t.issuer}:{}),{data:l,error:c}=await le(this.fetch,"POST",`${this.url}/factors`,{body:s,headers:this.headers,jwt:(n=o==null?void 0:o.session)===null||n===void 0?void 0:n.access_token});return c?this._returnResult({data:null,error:c}):(t.factorType==="totp"&&l.type==="totp"&&(!((i=l==null?void 0:l.totp)===null||i===void 0)&&i.qr_code)&&(l.totp.qr_code=`data:image/svg+xml;utf-8,${l.totp.qr_code}`),this._returnResult({data:l,error:null}))})}catch(r){if(oe(r))return this._returnResult({data:null,error:r});throw r}}async _verify(t){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async r=>{var n;const{data:i,error:o}=r;if(o)return this._returnResult({data:null,error:o});const a=Object.assign({challenge_id:t.challengeId},"webauthn"in t?{webauthn:Object.assign(Object.assign({},t.webauthn),{credential_response:t.webauthn.type==="create"?n9(t.webauthn.credential_response):i9(t.webauthn.credential_response)})}:{code:t.code}),{data:s,error:l}=await le(this.fetch,"POST",`${this.url}/factors/${t.factorId}/verify`,{body:a,headers:this.headers,jwt:(n=i==null?void 0:i.session)===null||n===void 0?void 0:n.access_token});return l?this._returnResult({data:null,error:l}):(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+s.expires_in},s)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",s),this._returnResult({data:s,error:l}))})}catch(r){if(oe(r))return this._returnResult({data:null,error:r});throw r}})}async _challenge(t){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async r=>{var n;const{data:i,error:o}=r;if(o)return this._returnResult({data:null,error:o});const a=await le(this.fetch,"POST",`${this.url}/factors/${t.factorId}/challenge`,{body:t,headers:this.headers,jwt:(n=i==null?void 0:i.session)===null||n===void 0?void 0:n.access_token});if(a.error)return a;const{data:s}=a;if(s.type!=="webauthn")return{data:s,error:null};switch(s.webauthn.type){case"create":return{data:Object.assign(Object.assign({},s),{webauthn:Object.assign(Object.assign({},s.webauthn),{credential_options:Object.assign(Object.assign({},s.webauthn.credential_options),{publicKey:t9(s.webauthn.credential_options.publicKey)})})}),error:null};case"request":return{data:Object.assign(Object.assign({},s),{webauthn:Object.assign(Object.assign({},s.webauthn),{credential_options:Object.assign(Object.assign({},s.webauthn.credential_options),{publicKey:r9(s.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(r){if(oe(r))return this._returnResult({data:null,error:r});throw r}})}async _challengeAndVerify(t){const{data:r,error:n}=await this._challenge({factorId:t.factorId});return n?this._returnResult({data:null,error:n}):await this._verify({factorId:t.factorId,challengeId:r.id,code:t.code})}async _listFactors(){var t;const{data:{user:r},error:n}=await this.getUser();if(n)return{data:null,error:n};const i={all:[],phone:[],totp:[],webauthn:[]};for(const o of(t=r==null?void 0:r.factors)!==null&&t!==void 0?t:[])i.all.push(o),o.status==="verified"&&i[o.factor_type].push(o);return{data:i,error:null}}async _getAuthenticatorAssuranceLevel(t){var r,n,i,o;if(t)try{const{payload:h}=eh(t);let v=null;h.aal&&(v=h.aal);let m=v;const{data:{user:y},error:w}=await this.getUser(t);if(w)return this._returnResult({data:null,error:w});((n=(r=y==null?void 0:y.factors)===null||r===void 0?void 0:r.filter(_=>_.status==="verified"))!==null&&n!==void 0?n:[]).length>0&&(m="aal2");const g=h.amr||[];return{data:{currentLevel:v,nextLevel:m,currentAuthenticationMethods:g},error:null}}catch(h){if(oe(h))return this._returnResult({data:null,error:h});throw h}const{data:{session:a},error:s}
290=await this.getSession();if(s)return this._returnResult({data:null,error:s});if(!a)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:l}=eh(a.access_token);let c=null;l.aal&&(c=l.aal);let u=c;((o=(i=a.user.factors)===null||i===void 0?void 0:i.filter(h=>h.status==="verified"))!==null&&o!==void 0?o:[]).length>0&&(u="aal2");const f=l.amr||[];return{data:{currentLevel:c,nextLevel:u,currentAuthenticationMethods:f},error:null}}async _getAuthorizationDetails(t){try{return await this._useSession(async r=>{const{data:{session:n},error:i}=r;return i?this._returnResult({data:null,error:i}):n?await le(this.fetch,"GET",`${this.url}/oauth/authorizations/${t}`,{headers:this.headers,jwt:n.access_token,xform:o=>({data:o,error:null})}):this._returnResult({data:null,error:new br})})}catch(r){if(oe(r))return this._returnResult({data:null,error:r});throw r}}async _approveAuthorization(t,r){try{return await this._useSession(async n=>{const{data:{session:i},error:o}=n;if(o)return this._returnResult({data:null,error:o});if(!i)return this._returnResult({data:null,error:new br});const a=await le(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:i.access_token,body:{action:"approve"},xform:s=>({data:s,error:null})});return a.data&&a.data.redirect_url&&$t()&&!(r!=null&&r.skipBrowserRedirect)&&window.location.assign(a.data.redirect_url),a})}catch(n){if(oe(n))return this._returnResult({data:null,error:n});throw n}}async _denyAuthorization(t,r){try{return await this._useSession(async n=>{const{data:{session:i},error:o}=n;if(o)return this._returnResult({data:null,error:o});if(!i)return this._returnResult({data:null,error:new br});const a=await le(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:i.access_token,body:{action:"deny"},xform:s=>({data:s,error:null})});return a.data&&a.data.redirect_url&&$t()&&!(r!=null&&r.skipBrowserRedirect)&&window.location.assign(a.data.redirect_url),a})}catch(n){if(oe(n))return this._returnResult({data:null,error:n});throw n}}async _listOAuthGrants(){try{return await this._useSession(async t=>{const{data:{session:r},error:n}=t;return n?this._returnResult({data:null,error:n}):r?await le(this.fetch,"GET",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:r.access_token,xform:i=>({data:i,error:null})}):this._returnResult({data:null,error:new br})})}catch(t){if(oe(t))return this._returnResult({data:null,error:t});throw t}}async _revokeOAuthGrant(t){try{return await this._useSession(async r=>{const{data:{session:n},error:i}=r;return i?this._returnResult({data:null,error:i}):n?(await le(this.fetch,"DELETE",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:n.access_token,query:{client_id:t.clientId},noResolveJson:!0}),{data:{},error:null}):this._returnResult({data:null,error:new br})})}catch(r){if(oe(r))return this._returnResult({data:null,error:r});throw r}}async fetchJwk(t,r={keys:[]}){let n=r.keys.find(s=>s.kid===t);if(n)return n;const i=Date.now();if(n=this.jwks.keys.find(s=>s.kid===t),n&&this.jwks_cached_at+hG>i)return n;const{data:o,error:a}=await le(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(a)throw a;return!o.keys||o.keys.length===0||(this.jwks=o,this.jwks_cached_at=i,n=o.keys.find(s=>s.kid===t),!n)?null:n}async getClaims(t,r={}){try{let n=t;if(!n){const{data:h,error:v}
290=await this.getSession();if(v||!h.session)return this._returnResult({data:null,error:v});n=h.session.access_token}const{header:i,payload:o,signature:a,raw:{header:s,payload:l}}=eh(n);r!=null&&r.allowExpired||MG(o.exp);const c=!i.alg||i.alg.startsWith("HS")||!i.kid||!("crypto"in globalThis&&"subtle"in globalThis.crypto)?null:await this.fetchJwk(i.kid,r!=null&&r.keys?{keys:r.keys}:r==null?void 0:r.jwks);if(!c){const{error:h}=await this.getUser(n);if(h)throw h;return{data:{claims:o,header:i,signature:a},error:null}}const u=IG(i.alg),d=await crypto.subtle.importKey("jwk",c,u,!0,["verify"]);if(!await crypto.subtle.verify(u,d,a,SG(`${s}.${l}`)))throw new Sb("Invalid JWT signature");return{data:{claims:o,header:i,signature:a},error:null}}catch(n){if(oe(n))return this._returnResult({data:null,error:n});throw n}}}Zu.nextInstanceID={};const h9=Zu,p9="2.103.0";let iu="";typeof Deno<"u"?iu="deno":typeof document<"u"?iu="web":typeof navigator<"u"&&navigator.product==="ReactNative"?iu="react-native":iu="node";const m9={"X-Client-Info":`supabase-js-${iu}/${p9}`},v9={headers:m9},g9={schema:"public"},y9={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},b9={};function ed(e){"@babel/helpers - typeof";return ed=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},ed(e)}function w9(e,t){if(ed(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(ed(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function x9(e){var t=w9(e,"string");return ed(t)=="symbol"?t:t+""}function S9(e,t,r){return(t=x9(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function $O(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 ct(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?$O(Object(r),!0).forEach(function(n){S9(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$O(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}const _9=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),E9=()=>Headers,O9=(e,t,r)=>{const n=_9(r),i=E9();return async(o,a)=>{var s;const l=(s=await t())!==null&&s!==void 0?s:e;let c=new i(a==null?void 0:a.headers);return c.has("apikey")||c.set("apikey",e),c.has("Authorization")||c.set("Authorization",`Bearer ${l}`),n(o,ct(ct({},a),{},{headers:c}))}};function P9(e){return e.endsWith("/")?e:e+"/"}function T9(e,t){var r,n;const{db:i,auth:o,realtime:a,global:s}=e,{db:l,auth:c,realtime:u,global:d}=t,f={db:ct(ct({},l),i),auth:ct(ct({},c),o),realtime:ct(ct({},u),a),storage:{},global:ct(ct(ct({},d),s),{},{headers:ct(ct({},(r=d==null?void 0:d.headers)!==null&&r!==void 0?r:{}),(n=s==null?void 0:s.headers)!==null&&n!==void 0?n:{})}),accessToken:async()=>""};return e.accessToken?f.accessToken=e.accessToken:delete f.accessToken,f}function A9(e){const t=e==null?void 0:e.trim();if(!t)throw new Error("supabaseUrl is required.");if(!t.match(/^https?:\/\//i))throw new Error("Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.");try{return new URL(P9(t))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}var C9=class extends h9{constructor(e){super(e)}},j9=class{constructor(e,t,r){var n,i;this.supabaseUrl=e,this.supabaseKey=t;const o=A9(e);if(!t)throw new Error("supabaseKey is required.");this.realtimeUrl=new URL("realtime/v1",o),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",o),this.storageUrl=new URL("storage/v1",o),this.functionsUrl=new URL("functions/v1",o);const a=`sb-${o.hostname.split(".")[0]}-auth-token`,s={db:g9,realtime:b9,auth:ct(ct({},y9),{},{storageKey:a}),global:v9},l=T9(r??{},s);if(this.storageKey=(n=l.auth.storageKey)!==null&&n!==void 0?n:"",this.headers=(i=l.global.headers)!==null&&i!==void 0?i:{},l.accessToken)this.accessToken=l.accessToken,this.auth=new Proxy({},{get:(u,d)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(d)} is not possible`)}});else{var c;this.auth=this._initSupabaseAuthClient((c=l.auth)!==null&&c!==void 0?c:{},this.headers,l.global.fetch)}this.fetch=O9(t,this._getAccessToken.bind(this),l.global.fetch),this.realtime=this._initRealtimeClient(ct({headers:this.headers,accessToken:this._getAccessToken.bind(this)},l.realtime)),this.accessToken&&Promise.resolve(this.accessToken()).then(u=>this.realtime.setAuth(u)).catch(u=>console.warn("Failed to set initial Realtime auth token:",u)),this.rest=new QV(new URL("rest/v1",o).href,{headers:this.headers,schema:l.db.schema,fetch:this.fetch,timeout:l.db.timeout,urlLengthLimit:l.db.urlLengthLimit}),this.storage=new lG(this.storageUrl.href,this.headers,this.fetch,r==null?void 0:r.storage),l.accessToken||this._listenForAuthEvents()}get functions(){return new UV(this.functionsUrl.href,{headers:this.headers,customFetch:this.fetch})}from(e){return this.rest.from(e)}schema(e){return this.rest.schema(e)}rpc(e,t={},r={head:!1,get:!1,count:void 0}){return this.rest.rpc(e,t,r)}
290channel(e,t={config:{}}){return this.realtime.channel(e,t)}getChannels(){return this.realtime.getChannels()}removeChannel(e){return this.realtime.removeChannel(e)}removeAllChannels(){return this.realtime.removeAllChannels()}async _getAccessToken(){var e=this,t,r;if(e.accessToken)return await e.accessToken();const{data:n}=await e.auth.getSession();return(t=(r=n.session)===null||r===void 0?void 0:r.access_token)!==null&&t!==void 0?t:e.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:e,persistSession:t,detectSessionInUrl:r,storage:n,userStorage:i,storageKey:o,flowType:a,lock:s,debug:l,throwOnError:c},u,d){const f={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new C9({url:this.authUrl.href,headers:ct(ct({},f),u),storageKey:o,autoRefreshToken:e,persistSession:t,detectSessionInUrl:r,storage:n,userStorage:i,flowType:a,lock:s,debug:l,throwOnError:c,fetch:d,hasCustomAuthorizationHeader:Object.keys(this.headers).some(h=>h.toLowerCase()==="authorization")})}_initRealtimeClient(e){return new kK(this.realtimeUrl.href,ct(ct({},e),{},{params:ct(ct({},{apikey:this.supabaseKey}),e==null?void 0:e.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((e,t)=>{this._handleTokenChanged(e,"CLIENT",t==null?void 0:t.access_token)})}_handleTokenChanged(e,t,r){(e==="TOKEN_REFRESHED"||e==="SIGNED_IN")&&this.changedAccessToken!==r?(this.changedAccessToken=r,this.realtime.setAuth(r)):e==="SIGNED_OUT"&&(this.realtime.setAuth(),t=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}};const k9=(e,t,r)=>new j9(e,t,r);function N9(){if(typeof window<"u")return!1;const e=globalThis.process;if(!e)return!1;const t=e.version;if(t==null)return!1;const r=t.match(/^v(\d+)\./);return r?parseInt(r[1],10)<=18:!1}N9()&&console.warn("⚠️  Node.js 18 and below are deprecated and will no longer be supported in future versions of @supabase/supabase-js. Please upgrade to Node.js 20 or later. For more information, visit: https://github.com/orgs/supabase/discussions/37217");const R9="https://driqbtmlakkljurpqeik.supabase.co",$9="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImRyaXFidG1sYWtrbGp1cnBxZWlrIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NzYwODc0NzEsImV4cCI6MjA5MTY2MzQ3MX0.M4_k2Yasojiic6yKJVmdkoVhwX0y6jC_GZg2QtR72_s",ve=k9(R9,$9,{auth:{storage:localStorage,persistSession:!0,autoRefreshToken:!0}}),M9=async e=>{let t=ve.from("news_articles").select("*").order("importance_score",{ascending:!1});e!=null&&e.category&&(t=t.eq("category",e.category)),e!=null&&e.predictionsOnly&&(t=t.eq("is_prediction",!0)),e!=null&&e.minImportance&&(t=t.gte("importance_score",e.minImportance)),e!=null&&e.dateFrom&&(t=t.gte("published_at",e.dateFrom)),e!=null&&e.dateTo&&(t=t.lte("published_at",e.dateTo)),e!=null&&e.sourceType&&(t=t.eq("source_type",e.sourceType));const{data:r,error:n}=await t;if(n)throw n;if(e!=null&&e.minReliability&&e.minReliability>0){const{data:i}=await ve.from("source_reliability").select("source_name, reliability_score").gte("reliability_score",e.minReliability),o=new Set((i==null?void 0:i.map(a=>a.source_name))||[]);return r.filter(a=>o.has(a.source_name))}return r},I9=async e=>{const{data:t,error:r}=await ve.from("article_confirmations").select("*").or(`original_article_id.eq.${e},confirming_article_id.eq.${e}`);if(r)throw r;const n=t.map(o=>o.original_article_id===e?o.confirming_article_id:o.original_article_id);if(n.length===0)return{confirmations:t,relatedArticles:[]};const{data:i}=await ve.from("news_articles").select("*").in("id",n);return{confirmations:t,relatedArticles:i||[]}},lI=async()=>{const{data:e,error:t}=await ve.from("source_reliability").select("*").order("reliability_score",{ascending:!1});if(t)throw t;return e},D9=async e=>{let t=ve.from("prediction_outcomes").select("*, news_articles!inner(headline, source_name, importance_score)").order("resolved_at",{ascending:!1,nullsFirst:!0});e&&e!=="All"&&(t=t.eq("outcome",e));const{data:r,error:n}=await t;if(n)throw n;return r},L9=async(e,t)=>{const{data:r,error:n}=await ve.functions.invoke("resolve-prediction",{body:{article_id:e,outcome:t}});if(n)throw n;return r},B9=async(e=50)=>{const{data:t,error:r}=await ve.from("automation_logs").select("*").order("run_at",{ascending:!1}).limit(e);
290if(r)throw r;return t},F9=async()=>{const{data:e,error:t}=await ve.from("app_settings").select("*");if(t)throw t;return e},ay=async(e,t)=>{const{error:r}=await ve.from("app_settings").update({value:t,updated_at:new Date().toISOString()}).eq("key",e);if(r)throw r},U9=async()=>{const{data:e,error:t}=await ve.functions.invoke("manual-fetch");if(t)throw t;return e},z9=async()=>{const{data:e,error:t}=await ve.from("article_confirmations").select("*, original:news_articles!original_article_id(id, headline, source_name, published_at, category), confirming:news_articles!confirming_article_id(id, headline, source_name, published_at, category)").order("confirmed_at",{ascending:!1});if(t)throw t;return e},j1=async()=>{const{data:e}=await ve.from("source_reliability").select("source_name, reliability_score"),t={};return(e||[]).forEach(r=>{t[r.source_name]=r.reliability_score}),t},W9=async e=>{const{data:t,error:r}=await ve.from("source_reliability").select("*").eq("source_name",e).maybeSingle();if(r)throw r;return t},cI=async e=>{const{data:t,error:r}=await ve.from("source_reliability_history").select("*").eq("source_name",e).order("recorded_at",{ascending:!0});if(r)throw r;return t},H9=async(e,t)=>{const r=(t==null?void 0:t.page)||0,n=(t==null?void 0:t.pageSize)||20;let i=ve.from("news_articles").select("*",{count:"exact"}).eq("source_name",e).order("published_at",{ascending:!1}).range(r*n,(r+1)*n-1);t!=null&&t.category&&(i=i.eq("category",t.category)),t!=null&&t.predictionsOnly&&(i=i.eq("is_prediction",!0)),t!=null&&t.dateFrom&&(i=i.gte("published_at",t.dateFrom)),t!=null&&t.dateTo&&(i=i.lte("published_at",t.dateTo));const{data:o,error:a,count:s}=await i;if(a)throw a;return{articles:o,total:s||0}},q9=async e=>{const{data:t,error:r}=await ve.from("prediction_outcomes").select("*, news_articles!inner(headline, source_name, importance_score, published_at)").eq("news_articles.source_name",e).order("resolved_at",{ascending:!1,nullsFirst:!0});if(r)throw r;return t},V9=async e=>{const{data:t}=await ve.from("news_articles").select("id").eq("source_name",e),r=(t==null?void 0:t.map(o=>o.id))||[];if(r.length===0)return{confirmedByOthers:[],confirmedOthers:[]};const{data:n}=await ve.from("article_confirmations").select("*, original:news_articles!original_article_id(id, headline, source_name), confirming:news_articles!confirming_article_id(id, headline, source_name)").in("original_article_id",r),{data:i}=await ve.from("article_confirmations").select("*, original:news_articles!original_article_id(id, headline, source_name), confirming:news_articles!confirming_article_id(id, headline, source_name)").in("confirming_article_id",r);return{confirmedByOthers:n||[],confirmedOthers:i||[]}},K9=async e=>{const{data:t}=await ve.from("news_articles").select("published_at").eq("source_name",e).order("published_at",{ascending:!0}).limit(1).maybeSingle();return(t==null?void 0:t.published_at)||null},_b=async e=>{const{data:t}=await ve.from("news_articles").select("importance_score").eq("source_name",e);return!t||t.length===0?0:t.reduce((r,n)=>r+(n.importance_score||0),0)/t.length},uI=async e=>{let t=ve.from("monitored_x_accounts").select("*").order("added_at",{ascending:!1});const{data:r,error:n}=await t;if(n)throw n;return r},G9=async()=>{const{data:e,error:t}=await ve.from("tweet_evaluation_queue").select("*").order("queued_at",{ascending:!1});if(t)throw t;return e},dI=async(e,t)=>{let r=ve.from("historical_tweets").select("*").order("tweeted_at",{ascending:!1});e&&(r=r.eq("handle",e)),r=r.eq("is_prediction",!0);const{data:n,error:i}=await r;if(i)throw i;return n},Y9=async e=>{let t=ve.from("news_articles").select("*").eq("source_type","twitter").order("importance_score",{ascending:!1});e!=null&&e.category&&(t=t.eq("category",e.category)),e!=null&&e.marketMovingOnly&&(t=t.gte("importance_score",.85));const{data:r,error:n}=await t;if(n)throw n;return r},fI=async(e,t,r="manual")=>{const{data:n,error:i}=await ve.from("monitored_x_accounts").insert({handle:e.replace("@",""),category:t,added_via:r,reliability_status:"Queued"}).select().single();if(i)throw i;const{data:o,error:a}=await ve.from("tweet_evaluation_queue").insert({handle:e.replace("@",""),status:"Queued"}).select().single();if(a)throw a;return ve.functions.invoke("evaluate-x-account",{body:{handle:e.replace("@",""),queue_id:o.id}}).catch(s=>console.error("Evaluation trigger failed:",s)),n},X9=async e=>{const t=[];for(const r of e)try{const{data:n}=await ve.from("monitored_x_accounts").select("id").eq("handle",r.handle.replace("@","")).maybeSingle();if(n)continue;const i=await fI(r.handle,r.category,"csv");t.push(i),await new Promise(o=>setTimeout(o,5e3))}catch(n){console.error(`Failed to add ${r.handle}
290:`,n)}return t},Q9=async(e,t)=>{const{error:r}=await ve.from("monitored_x_accounts").update({is_active:t}).eq("handle",e);if(r)throw r},J9=async e=>{const{error:t}=await ve.from("monitored_x_accounts").delete().eq("handle",e);if(t)throw t},Z9=async e=>{const{data:t,error:r}=await ve.functions.invoke("re-evaluate-x-account",{body:{handle:e}});if(r)throw r;return t},e7=async()=>{const{data:e,error:t}=await ve.functions.invoke("re-evaluate-x-account",{body:{all:!0}});if(t)throw t;return e};function Mi({name:e,className:t}){return p.jsx(dp,{to:`/source/${encodeURIComponent(e)}`,className:Z("hover:text-primary hover:underline underline-offset-2 transition-colors cursor-pointer",t),onClick:r=>r.stopPropagation(),children:e})}const t7=["All","Markets","Crypto","Macro","Geopolitical","Earnings","Energy"];function r7(){const[e,t]=x.useState("All"),[r,n]=x.useState([0]),[i,o]=x.useState([0]),[a,s]=x.useState(!1),[l,c]=x.useState(null),{data:u=[],refetch:d}=We({queryKey:["articles",e,r[0],i[0],a],queryFn:()=>M9({category:e==="All"?void 0:e,minImportance:r[0],minReliability:i[0],predictionsOnly:a})}),{data:f={}}=We({queryKey:["reliabilityMap"],queryFn:j1});x.useEffect(()=>{const m=ve.channel("news-feed").on("postgres_changes",{event:"*",schema:"public",table:"news_articles"},()=>{d()}).subscribe();return()=>{ve.removeChannel(m)}},[d]);const h=new Date(Date.now()-60*60*1e3).toISOString(),v=u.filter(m=>m.importance_score>.85&&m.created_at>h);return p.jsxs(cs,{children:[p.jsxs("div",{className:"space-y-6",children:[p.jsxs("div",{children:[p.jsx("h1",{className:"font-heading text-2xl font-bold tracking-tight",children:"News Feed"}),p.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Intelligence-ranked financial news"})]}),v.length>0&&p.jsxs("div",{className:"rounded-lg border border-danger/50 bg-danger/10 p-3 flex items-center gap-3",children:[p.jsx(JN,{className:"h-5 w-5 text-danger shrink-0"}),p.jsxs("div",{children:[p.jsx("p",{className:"text-sm font-medium text-danger",children:"High Priority Alert"}),p.jsxs("p",{className:"text-xs text-danger/80",children:[v.length," article(s) with importance > 85% in the last hour"]})]})]}),p.jsx(Pe,{children:p.jsx(Te,{className:"p-4",children:p.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-5 gap-4 items-end",children:[p.jsxs("div",{children:[p.jsx(Hr,{className:"text-xs text-muted-foreground mb-1.5 block",children:"Category"}),p.jsxs(Ya,{value:e,onValueChange:t,children:[p.jsx(Wo,{children:p.jsx(Xa,{})}),p.jsx(Ho,{children:t7.map(m=>p.jsx(Si,{value:m,children:m},m))})]})]}),p.jsxs("div",{children:[p.jsxs(Hr,{className:"text-xs text-muted-foreground mb-1.5 block",children:["Min Importance: ",Math.round(r[0]*100),"%"]}),p.jsx(ub,{value:r,onValueChange:n,min:0,max:1,step:.05})]}),p.jsxs("div",{children:[p.jsxs(Hr,{className:"text-xs text-muted-foreground mb-1.5 block",children:["Min Reliability: ",Math.round(i[0]*100),"%"]}),p.jsx(ub,{value:i,onValueChange:o,min:0,max:1,step:.05})]}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(sv,{checked:a,onCheckedChange:s}),p.jsx(Hr,{className:"text-xs",children:"Predictions only"})]})]})})}),u.length===0?p.jsx(Pe,{children:p.jsx(Te,{className:"p-12 text-center",children:p.jsx("p",{className:"text-muted-foreground",children:"No articles yet. Ingest articles via the edge function or admin panel."})})}):p.jsx("div",{className:"grid gap-3",children:u.map(m=>{const y=f[m.source_name]??.5,w=y<.4;return p.jsx(Pe,{className:Z("cursor-pointer transition-all hover:border-primary/30",w&&"opacity-60"),onClick:()=>c(m),children:p.jsx(Te,{className:"p-4",children:p.jsxs("div",{className:"flex items-start justify-between gap-4",children:[p.jsxs("div",{className:"flex-1 min-w-0",children:[p.jsxs("div",{className:"flex items-center gap-2 mb-1 flex-wrap",children:[p.jsx(qo,{category:m.category}),p.jsxs("span",{className:"text-xs text-muted-foreground flex items-center gap-1",children:[p.jsx(Mi,{name:m.source_name,className:"text-xs text-muted-foreground"}),p.jsx(Ja,{score:y})]}),w&&p.jsx(tr,{variant:"outline",className:"text-[10px] border-danger/30 text-danger bg-danger/5",children:"Low Reliability"}),m.is_prediction&&p.jsx(tr,{variant:"outline",className:"text-[10px] border-purple-500/30 text-purple-400 bg-purple-500/5",children:"Prediction"})]}),p.jsx("h3",{className:"font-heading font-semibold text-sm leading-tight",children:m.headline}),m.summary&&p.jsx("p",{className:"text-xs text-muted-foreground mt-1 line-clamp-2",children:m.summary}),p.jsxs("div",{className:"flex items-center gap-3 mt-2",children:[m.published_at&&p.jsx("span",{className:"text-[11px] text-muted-foreground",children:zo(new Date(m.published_at),{addSuffix:!0})}),m.entities.slice(0,3).map(b=>p.jsx(tr,{variant:"secondary",className:"text-[10px]",children:b},b))]})]}),p.jsx("div",{className:"shrink-0",children:p.jsx(gv,{score:m.importance_score})})]})})},m.id)})})]}),p.jsx(n7,{article:l,reliabilityMap:f,onClose:()=>c(null)})]})}function n7({article:e,reliabilityMap:t,onClose:r}){const{data:n}=We({queryKey:["confirmations",e==null?void 0:e.id],queryFn:()=>I9(e.id),enabled:!!e});if(!e)return null;const i=(n==null?void 0:n.confirmations)||[],o=(n==null?void 0:n.relatedArticles)||[];return p.jsx(TM,{open:!!e,onOpenChange:()=>r(),children:p.jsxs(w1,{className:"w-[480px] sm:max-w-[480px] bg-card border-border",children:[p.jsx(x1,{children:p.jsx(S1,{className:"font-heading text-base pr-4",children:e.headline})}),p.jsx(T1,{className:"h-[calc(100vh-120px)] mt-4",children:p.jsxs("div",{className:"space-y-6 pr-4",children:[p.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[p.jsx(qo,{category:e.category}),p.jsx(Ja,{score:t[e.source_name]??.5}),p.jsx(gv,{score:e.importance_score})]}),e.source_url&&p.jsxs("a",{href:e.source_url,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-primary hover:underline flex items-center gap-1",children:[p.jsx(bz,{className:"h-3 w-3"})," ",e.source_name]}),e.summary&&p.jsxs("div",{children:[p.jsx("h4",{className:"text-xs font-medium text-muted-foreground mb-1",children:"Summary"}),p.jsx("p",{className:"text-sm",children:e.summary})]}),e.entities.length>0&&p.jsxs("div",{children:[p.jsx("h4",{className:"text-xs font-medium text-muted-foreground mb-1",children:"Entities"}),p.jsx("div",{className:"flex flex-wrap gap-1",children:e.entities.map(a=>p.jsx(tr,{variant:"secondary",className:"text-xs",children:a},a))})]}),e.is_prediction&&e.prediction_text&&p.jsxs("div",{className:"rounded-lg border border-purple-500/30 bg-purple-500/5 p-3",children:[p.jsx("h4",{className:"text-xs font-medium text-purple-400 mb-1",children:"Prediction"}),p.jsx("p",{className:"text-sm",children:e.prediction_text})]}),i.length>0&&p.jsxs("div",{children:[p.jsxs("h4",{className:"text-xs font-medium text-muted-foreground mb-2 flex items-center gap-1",children:[p.jsx(mz,{className:"h-3 w-3 text-success"}),"Confirmed by ",i.length," source(s)"]}),p.jsx("div",{className:"space-y-2",children:o.map(a=>p.jsxs("div",{className:"rounded-lg border border-border p-2",children:[p.jsx("p",{className:"text-xs font-medium",children:a.headline}),p.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[p.jsx("span",{className:"text-[10px] text-muted-foreground",children:a.source_name}),p.jsx(Ja,{score:t[a.source_name]??.5})]})]},a.id))})]})]})})]})})}const qr=x.forwardRef(({className:e,...t},r)=>p.jsx("div",{className:"relative w-full overflow-auto",children:p.jsx("table",{ref:r,className:Z("w-full caption-bottom text-sm",e),...t})}));qr.displayName="Table";const Vr=x.forwardRef(({className:e,...t},r)=>p.jsx("thead",{ref:r,className:Z("[&_tr]:border-b",e),...t}));Vr.displayName="TableHeader";const Kr=x.forwardRef(({className:e,...t},r)=>p.jsx("tbody",{ref:r,className:Z("[&_tr:last-child]:border-0",e),...t}));Kr.displayName="TableBody";const i7=x.forwardRef(({className:e,...t},r)=>p.jsx("tfoot",{ref:r,className:Z("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));i7.displayName="TableFooter";const je=x.forwardRef(({className:e,...t},r)=>p.jsx("tr",{ref:r,className:Z("border-b transition-colors data-[state=selected]:bg-muted hover:bg-muted/50",e),...t}));
290je.displayName="TableRow";const ae=x.forwardRef(({className:e,...t},r)=>p.jsx("th",{ref:r,className:Z("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",e),...t}));ae.displayName="TableHead";const J=x.forwardRef(({className:e,...t},r)=>p.jsx("td",{ref:r,className:Z("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...t}));J.displayName="TableCell";const o7=x.forwardRef(({className:e,...t},r)=>p.jsx("caption",{ref:r,className:Z("mt-4 text-sm text-muted-foreground",e),...t}));o7.displayName="TableCaption";var k1="Progress",N1=100,[a7,e1e]=$r(k1),[s7,l7]=a7(k1),hI=x.forwardRef((e,t)=>{const{__scopeProgress:r,value:n=null,max:i,getValueLabel:o=c7,...a}=e;(i||i===0)&&!MO(i)&&console.error(u7(`${i}`,"Progress"));const s=MO(i)?i:N1;n!==null&&!IO(n,s)&&console.error(d7(`${n}`,"Progress"));const l=IO(n,s)?n:null,c=Tp(l)?o(l,s):void 0;return p.jsx(s7,{scope:r,value:l,max:s,children:p.jsx(se.div,{"aria-valuemax":s,"aria-valuemin":0,"aria-valuenow":Tp(l)?l:void 0,"aria-valuetext":c,role:"progressbar","data-state":vI(l,s),"data-value":l??void 0,"data-max":s,...a,ref:t})})});hI.displayName=k1;var pI="ProgressIndicator",mI=x.forwardRef((e,t)=>{const{__scopeProgress:r,...n}=e,i=l7(pI,r);return p.jsx(se.div,{"data-state":vI(i.value,i.max),"data-value":i.value??void 0,"data-max":i.max,...n,ref:t})});mI.displayName=pI;function c7(e,t){return`${Math.round(e/t*100)}%`}function vI(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function Tp(e){return typeof e=="number"}function MO(e){return Tp(e)&&!isNaN(e)&&e>0}function IO(e,t){return Tp(e)&&!isNaN(e)&&e<=t&&e>=0}function u7(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${N1}\`.`}function d7(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
291  - a positive number
292  - less than the value passed to \`max\` (or ${N1} if no \`max\` prop is set)
293  - \`null\` or \`undefined\` if the progress is indeterminate.
294
295Defaulting to \`null\`.`}var gI=hI,f7=mI;const td=x.forwardRef(({className:e,value:t,...r},n)=>p.jsx(gI,{ref:n,className:Z("relative h-4 w-full overflow-hidden rounded-full bg-secondary",e),...r,children:p.jsx(f7,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));td.displayName=gI.displayName;function h7(){const{data:e=[]}=We({queryKey:["sources"],queryFn:lI});return p.jsx(cs,{children:p.jsxs("div",{className:"space-y-6",children:[p.jsxs("div",{children:[p.jsx("h1",{className:"font-heading text-2xl font-bold tracking-tight",children:"Source Reliability"}),p.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Track source accuracy and prediction performance"})]}),p.jsx(Pe,{children:p.jsx(Te,{className:"p-0",children:p.jsxs(qr,{children:[p.jsx(Vr,{children:p.jsxs(je,{children:[p.jsx(ae,{children:"Source"}),p.jsx(ae,{className:"text-right",children:"Articles"}),p.jsx(ae,{className:"text-right",children:"Confirmed"}),p.jsx(ae,{className:"text-right",children:"Pred. Accuracy"}),p.jsx(ae,{children:"Reliability"}),p.jsx(ae,{className:"text-right",children:"Last Updated"})]})}),p.jsx(Kr,{children:e.length===0?p.jsx(je,{children:p.jsx(J,{colSpan:6,className:"text-center text-muted-foreground py-8",children:"No sources tracked yet"})}):e.map(t=>{const r=t.reliability_score>.75?"high":t.reliability_score>.4?"medium":"low";return p.jsxs(je,{className:Z("hover:bg-muted/50",r==="low"&&"opacity-60"),children:[p.jsx(J,{className:"font-medium",children:p.jsx(Mi,{name:t.source_name})}),p.jsx(J,{className:"text-right",children:t.total_articles}),p.jsx(J,{className:"text-right",children:t.confirmed_count}),p.jsx(J,{className:"text-right",children:t.prediction_total>0?`${Math.round(t.prediction_confirmed/t.prediction_total*100)}%`:"N/A"}),p.jsx(J,{children:p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(td,{value:t.reliability_score*100,className:Z("h-2 w-20",r==="high"&&"[&>div]:bg-success",r==="medium"&&"[&>div]:bg-warning",r==="low"&&"[&>div]:bg-danger")}),p.jsx(Ja,{score:t.reliability_score})]})}),p.jsx(J,{className:"text-right text-xs text-muted-foreground",children:t.last_updated?zo(new Date(t.last_updated),{addSuffix:!0}):"—"})]},t.id)})})]})})})]})})}var sy="rovingFocusGroup.onEntryFocus",p7={bubbles:!1,cancelable:!0},tf="RovingFocusGroup",[Eb,yI,m7]=Vm(tf),[v7,bI]=$r(tf,[m7]),[g7,y7]=v7(tf),wI=x.forwardRef((e,t)=>
vendor: 4,673 bytes, line 295
295p.jsx(Eb.Provider,{scope:e.__scopeRovingFocusGroup,children:p.jsx(Eb.Slot,{scope:e.__scopeRovingFocusGroup,children:p.jsx(b7,{...e,ref:t})})}));wI.displayName=tf;var b7=x.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:i=!1,dir:o,currentTabStopId:a,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:l,onEntryFocus:c,preventScrollOnEntryFocus:u=!1,...d}=e,f=x.useRef(null),h=ye(t,f),v=Zd(o),[m,y]=Ni({prop:a,defaultProp:s??null,onChange:l,caller:tf}),[w,b]=x.useState(!1),g=_t(c),_=yI(r),S=x.useRef(!1),[E,O]=x.useState(0);return x.useEffect(()=>{const P=f.current;if(P)return P.addEventListener(sy,g),()=>P.removeEventListener(sy,g)},[g]),p.jsx(g7,{scope:r,orientation:n,dir:v,loop:i,currentTabStopId:m,onItemFocus:x.useCallback(P=>y(P),[y]),onItemShiftTab:x.useCallback(()=>b(!0),[]),onFocusableItemAdd:x.useCallback(()=>O(P=>P+1),[]),onFocusableItemRemove:x.useCallback(()=>O(P=>P-1),[]),children:p.jsx(se.div,{tabIndex:w||E===0?-1:0,"data-orientation":n,...d,ref:h,style:{outline:"none",...e.style},onMouseDown:ie(e.onMouseDown,()=>{S.current=!0}),onFocus:ie(e.onFocus,P=>{const T=!S.current;if(P.target===P.currentTarget&&T&&!w){const j=new CustomEvent(sy,p7);if(P.currentTarget.dispatchEvent(j),!j.defaultPrevented){const C=_().filter(D=>D.focusable),k=C.find(D=>D.active),L=C.find(D=>D.id===m),N=[k,L,...C].filter(Boolean).map(D=>D.ref.current);_I(N,u)}}S.current=!1}),onBlur:ie(e.onBlur,()=>b(!1))})})}),xI="RovingFocusGroupItem",SI=x.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:i=!1,tabStopId:o,children:a,...s}=e,l=xi(),c=o||l,u=y7(xI,r),d=u.currentTabStopId===c,f=yI(r),{onFocusableItemAdd:h,onFocusableItemRemove:v,currentTabStopId:m}=u;return x.useEffect(()=>{if(n)return h(),()=>v()},[n,h,v]),p.jsx(Eb.ItemSlot,{scope:r,id:c,focusable:n,active:i,children:p.jsx(se.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...s,ref:t,onMouseDown:ie(e.onMouseDown,y=>{n?u.onItemFocus(c):y.preventDefault()}),onFocus:ie(e.onFocus,()=>u.onItemFocus(c)),onKeyDown:ie(e.onKeyDown,y=>{if(y.key==="Tab"&&y.shiftKey){u.onItemShiftTab();return}if(y.target!==y.currentTarget)return;const w=S7(y,u.orientation,u.dir);if(w!==void 0){if(y.metaKey||y.ctrlKey||y.altKey||y.shiftKey)return;y.preventDefault();let g=f().filter(_=>_.focusable).map(_=>_.ref.current);if(w==="last")g.reverse();else if(w==="prev"||w==="next"){w==="prev"&&g.reverse();const _=g.indexOf(y.currentTarget);g=u.loop?_7(g,_+1):g.slice(_+1)}setTimeout(()=>_I(g))}}),children:typeof a=="function"?a({isCurrentTabStop:d,hasTabStop:m!=null}):a})})});SI.displayName=xI;var w7={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function x7(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function S7(e,t,r){const n=x7(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return w7[n]}function _I(e,t=!1){const r=document.activeElement;for(const n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}function _7(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var E7=wI,O7=SI,Sv="Tabs",[P7,t1e]=$r(Sv,[bI]),EI=bI(),[T7,R1]=P7(Sv),OI=x.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,onValueChange:i,defaultValue:o,orientation:a="horizontal",dir:s,activationMode:l="automatic",...c}=e,u=Zd(s),[d,f]=Ni({prop:n,onChange:i,defaultProp:o??"",caller:Sv});return p.jsx(T7,{scope:r,baseId:xi(),value:d,onValueChange:f,orientation:a,dir:u,activationMode:l,children:p.jsx(se.div,{dir:u,"data-orientation":a,...c,ref:t})})});OI.displayName=Sv;var PI="TabsList",TI=x.forwardRef((e,t)=>{const{__scopeTabs:r,loop:n=!0,...i}=e,o=R1(PI,r),a=EI(r);return p.jsx(E7,{asChild:!0,...a,orientation:o.orientation,dir:o.dir,loop:n,children:p.jsx(se.div,{role:"tablist","aria-orientation":o.orientation,...i,ref:t})})});TI.displayName=PI;var AI="TabsTrigger",CI=x.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,disabled:i=!1,...o}=e,a=R1(AI,r),s=EI(r),l=NI(a.baseId,n),c=RI(a.baseId,n),u=n===a.value;return p.jsx(O7,{asChild:!0,...s,focusable:!i,active:u,children:p.jsx(se.button,{type:"button",role:"tab","aria-selected":u,"aria-controls":c,"data-state":u?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:l,...o,ref:t,onMouseDown:ie(e.onMouseDown,d=>{!i&&d.button===0&&d.ctrlKey===!1?a.onValueChange(n):d.preventDefault()}),onKeyDown:ie(e.onKeyDown,d=>{[" ","Enter"].includes(d.key)&&a.onValueChange(n)}),onFocus:ie(e.onFocus,()=>{const d=a.activationMode!=="manual";!u&&!i&&d&&a.onValueChange(n)})})})});CI.displayName=AI;var jI="TabsContent",kI=x.forwardRef((e,t)=>
295{const{__scopeTabs:r,value:n,forceMount:i,children:o,...a}=e,s=R1(jI,r),l=NI(s.baseId,n),c=RI(s.baseId,n),u=n===s.value,d=x.useRef(u);return x.useEffect(()=>{const f=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(f)},[]),p.jsx(tn,{present:i||u,children:({present:f})=>p.jsx(se.div,{"data-state":u?"active":"inactive","data-orientation":s.orientation,role:"tabpanel","aria-labelledby":l,hidden:!f,id:c,tabIndex:0,...a,ref:t,style:{...e.style,animationDuration:d.current?"0s":void 0},children:f&&o})})});kI.displayName=jI;function NI(e,t){return`${e}-trigger-${t}`}function RI(e,t){return`${e}-content-${t}`}var A7=OI,$I=TI,MI=CI,II=kI;const DI=A7,$1=x.forwardRef(({className:e,...t},r)=>p.jsx($I,{ref:r,className:Z("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...t}));$1.displayName=$I.displayName;const So=x.forwardRef(({className:e,...t},r)=>p.jsx(MI,{ref:r,className:Z("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",e),...t}));So.displayName=MI.displayName;const _o=x.forwardRef(({className:e,...t},r)=>p.jsx(II,{ref:r,className:Z("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));_o.displayName=II.displayName;const C7=Xd("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"}}),jt=x.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...i},o)=>{const a=n?_5:"button";return p.jsx(a,{className:Z(C7({variant:t,size:r,className:e})),ref:o,...i})});jt.displayName="Button";const ll=x.forwardRef(({className:e,type:t,...r},n)=>p.jsx("input",{type:t,className:Z("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}));ll.displayName="Input";var j7=Array.isArray,vr=j7,k7=typeof bf=="object"&&bf&&bf.Object===Object&&bf,LI=k7,N7=LI,R7=typeof self=="object"&&self&&self.Object===Object&&self,$7=N7||R7||Function("return this")(),ri=$7,M7=ri,I7=M7.Symbol,rf=I7,DO=rf,BI=Object.prototype,D7=BI.hasOwnProperty,L7=BI.toString,Uc=DO?DO.toStringTag:void 0;function B7(e){var t=D7.call(e,Uc),r=e[Uc];try{e[Uc]=void 0;var n=!0}catch{}var i=L7.call(e);return n&&(t?e[Uc]=r:delete e[Uc]),i}var F7=B7,U7=Object.prototype,z7=U7.toString;function W7(e){return z7.call(e)}var H7=W7,LO=rf,q7=F7,V7=H7,K7="[object Null]",G7="[object Undefined]",BO=LO?LO.toStringTag:void 0;function Y7(e){return e==null?e===void 0?G7:K7:BO&&BO in Object(e)?q7(e):V7(e)}var zi=Y7;function X7(e){return e!=null&&typeof e=="object"}var Wi=X7,Q7=zi,J7=Wi,Z7="[object Symbol]";function eY(e){return typeof e=="symbol"||J7(e)&&Q7(e)==Z7}var vc=eY,tY=vr,rY=vc,nY=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,iY=/^\w*$/;function oY(e,t){if(tY(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||rY(e)?!0:iY.test(e)||!nY.test(e)||t!=null&&e in Object(t)}var M1=oY;function aY(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Zo=aY;const gc=Ue(Zo);var sY=zi,lY=Zo,cY="[object AsyncFunction]",uY="[object Function]",dY="[object GeneratorFunction]",fY="[object Proxy]";function hY(e){if(!lY(e))return!1;var t=sY(e);return t==uY||t==dY||t==cY||t==fY}var I1=hY;
vendor: 4,024 bytes, line 295
295const xe=Ue(I1);var pY=ri,mY=pY["__core-js_shared__"],vY=mY,ly=vY,FO=function(){var e=/[^.]+$/.exec(ly&&ly.keys&&ly.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function gY(e){return!!FO&&FO in e}var yY=gY,bY=Function.prototype,wY=bY.toString;function xY(e){if(e!=null){try{return wY.call(e)}catch{}try{return e+""}catch{}}return""}var FI=xY,SY=I1,_Y=yY,EY=Zo,OY=FI,PY=/[\\^$.*+?()[\]{}|]/g,TY=/^\[object .+?Constructor\]$/,AY=Function.prototype,CY=Object.prototype,jY=AY.toString,kY=CY.hasOwnProperty,NY=RegExp("^"+jY.call(kY).replace(PY,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function RY(e){if(!EY(e)||_Y(e))return!1;var t=SY(e)?NY:TY;return t.test(OY(e))}var $Y=RY;function MY(e,t){return e==null?void 0:e[t]}var IY=MY,DY=$Y,LY=IY;function BY(e,t){var r=LY(e,t);return DY(r)?r:void 0}var us=BY,FY=us,UY=FY(Object,"create"),_v=UY,UO=_v;function zY(){this.__data__=UO?UO(null):{},this.size=0}var WY=zY;function HY(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var qY=HY,VY=_v,KY="__lodash_hash_undefined__",GY=Object.prototype,YY=GY.hasOwnProperty;function XY(e){var t=this.__data__;if(VY){var r=t[e];return r===KY?void 0:r}return YY.call(t,e)?t[e]:void 0}var QY=XY,JY=_v,ZY=Object.prototype,eX=ZY.hasOwnProperty;function tX(e){var t=this.__data__;return JY?t[e]!==void 0:eX.call(t,e)}var rX=tX,nX=_v,iX="__lodash_hash_undefined__";function oX(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=nX&&t===void 0?iX:t,this}var aX=oX,sX=WY,lX=qY,cX=QY,uX=rX,dX=aX;function yc(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])}}yc.prototype.clear=sX;yc.prototype.delete=lX;yc.prototype.get=cX;yc.prototype.has=uX;yc.prototype.set=dX;var fX=yc;function hX(){this.__data__=[],this.size=0}var pX=hX;function mX(e,t){return e===t||e!==e&&t!==t}var D1=mX,vX=D1;function gX(e,t){for(var r=e.length;r--;)if(vX(e[r][0],t))return r;return-1}var Ev=gX,yX=Ev,bX=Array.prototype,wX=bX.splice;function xX(e){var t=this.__data__,r=yX(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():wX.call(t,r,1),--this.size,!0}var SX=xX,_X=Ev;function EX(e){var t=this.__data__,r=_X(t,e);return r<0?void 0:t[r][1]}var OX=EX,PX=Ev;function TX(e){return PX(this.__data__,e)>-1}var AX=TX,CX=Ev;function jX(e,t){var r=this.__data__,n=CX(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var kX=jX,NX=pX,RX=SX,$X=OX,MX=AX,IX=kX;function bc(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])}}bc.prototype.clear=NX;bc.prototype.delete=RX;bc.prototype.get=$X;bc.prototype.has=MX;bc.prototype.set=IX;var Ov=bc,DX=us,LX=ri,BX=DX(LX,"Map"),L1=BX,zO=fX,FX=Ov,UX=L1;function zX(){this.size=0,this.__data__={hash:new zO,map:new(UX||FX),string:new zO}}var WX=zX;function HX(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var qX=HX,VX=qX;function KX(e,t){var r=e.__data__;return VX(t)?r[typeof t=="string"?"string":"hash"]:r.map}var Pv=KX,GX=Pv;function YX(e){var t=GX(this,e).delete(e);return this.size-=t?1:0,t}var XX=YX,QX=Pv;function JX(e){return QX(this,e).get(e)}var ZX=JX,eQ=Pv;function tQ(e){return eQ(this,e).has(e)}var rQ=tQ,nQ=Pv;function iQ(e,t){var r=nQ(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var oQ=iQ,aQ=WX,sQ=XX,lQ=ZX,cQ=rQ,uQ=oQ;function wc(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])}}wc.prototype.clear=aQ;wc.prototype.delete=sQ;wc.prototype.get=lQ;wc.prototype.has=cQ;wc.prototype.set=uQ;var B1=wc,UI=B1,dQ="Expected a function";function F1(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(dQ);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var a=e.apply(this,n);return r.cache=o.set(i,a)||o,a};return r.cache=new(F1.Cache||UI),r}F1.Cache=UI;var zI=F1;const fQ=Ue(zI);var hQ=zI,pQ=500;function mQ(e){var t=hQ(e,function(n){return r.size===pQ&&r.clear(),n}
vendor: 6,644 bytes, lines 295-303
295),r=t.cache;return t}var vQ=mQ,gQ=vQ,yQ=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,bQ=/\\(\\)?/g,wQ=gQ(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(yQ,function(r,n,i,o){t.push(i?o.replace(bQ,"$1"):n||r)}),t}),xQ=wQ;function SQ(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 U1=SQ,WO=rf,_Q=U1,EQ=vr,OQ=vc,PQ=1/0,HO=WO?WO.prototype:void 0,qO=HO?HO.toString:void 0;function WI(e){if(typeof e=="string")return e;if(EQ(e))return _Q(e,WI)+"";if(OQ(e))return qO?qO.call(e):"";var t=e+"";return t=="0"&&1/e==-PQ?"-0":t}var TQ=WI,AQ=TQ;function CQ(e){return e==null?"":AQ(e)}var HI=CQ,jQ=vr,kQ=M1,NQ=xQ,RQ=HI;function $Q(e,t){return jQ(e)?e:kQ(e,t)?[e]:NQ(RQ(e))}var qI=$Q,MQ=vc,IQ=1/0;function DQ(e){if(typeof e=="string"||MQ(e))return e;var t=e+"";return t=="0"&&1/e==-IQ?"-0":t}var Tv=DQ,LQ=qI,BQ=Tv;function FQ(e,t){t=LQ(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[BQ(t[r++])];return r&&r==n?e:void 0}var z1=FQ,UQ=z1;function zQ(e,t,r){var n=e==null?void 0:UQ(e,t);return n===void 0?r:n}var VI=zQ;const Xr=Ue(VI);function WQ(e){return e==null}var HQ=WQ;const Se=Ue(HQ);var qQ=zi,VQ=vr,KQ=Wi,GQ="[object String]";function YQ(e){return typeof e=="string"||!VQ(e)&&KQ(e)&&qQ(e)==GQ}var XQ=YQ;const Za=Ue(XQ);var KI={exports:{}},De={};/**
296 * @license React
297 * react-is.production.min.js
298 *
299 * Copyright (c) Facebook, Inc. and its affiliates.
300 *
301 * This source code is licensed under the MIT license found in the
302 * LICENSE file in the root directory of this source tree.
303 */var W1=Symbol.for("react.element"),H1=Symbol.for("react.portal"),Av=Symbol.for("react.fragment"),Cv=Symbol.for("react.strict_mode"),jv=Symbol.for("react.profiler"),kv=Symbol.for("react.provider"),Nv=Symbol.for("react.context"),QQ=Symbol.for("react.server_context"),Rv=Symbol.for("react.forward_ref"),$v=Symbol.for("react.suspense"),Mv=Symbol.for("react.suspense_list"),Iv=Symbol.for("react.memo"),Dv=Symbol.for("react.lazy"),JQ=Symbol.for("react.offscreen"),GI;GI=Symbol.for("react.module.reference");function nn(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case W1:switch(e=e.type,e){case Av:case jv:case Cv:case $v:case Mv:return e;default:switch(e=e&&e.$$typeof,e){case QQ:case Nv:case Rv:case Dv:case Iv:case kv:return e;default:return t}}case H1:return t}}}De.ContextConsumer=Nv;De.ContextProvider=kv;De.Element=W1;De.ForwardRef=Rv;De.Fragment=Av;De.Lazy=Dv;De.Memo=Iv;De.Portal=H1;De.Profiler=jv;De.StrictMode=Cv;De.Suspense=$v;De.SuspenseList=Mv;De.isAsyncMode=function(){return!1};De.isConcurrentMode=function(){return!1};De.isContextConsumer=function(e){return nn(e)===Nv};De.isContextProvider=function(e){return nn(e)===kv};De.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===W1};De.isForwardRef=function(e){return nn(e)===Rv};De.isFragment=function(e){return nn(e)===Av};De.isLazy=function(e){return nn(e)===Dv};De.isMemo=function(e){return nn(e)===Iv};De.isPortal=function(e){return nn(e)===H1};De.isProfiler=function(e){return nn(e)===jv};De.isStrictMode=function(e){return nn(e)===Cv};De.isSuspense=function(e){return nn(e)===$v};De.isSuspenseList=function(e){return nn(e)===Mv};De.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Av||e===jv||e===Cv||e===$v||e===Mv||e===JQ||typeof e=="object"&&e!==null&&(e.$$typeof===Dv||e.$$typeof===Iv||e.$$typeof===kv||e.$$typeof===Nv||e.$$typeof===Rv||e.$$typeof===GI||e.getModuleId!==void 0)};De.typeOf=nn;KI.exports=De;var ZQ=KI.exports,eJ=zi,tJ=Wi,rJ="[object Number]";function nJ(e){return typeof e=="number"||tJ(e)&&eJ(e)==rJ}var YI=nJ;const iJ=Ue(YI);var oJ=YI;function aJ(e){return oJ(e)&&e!=+e}var sJ=aJ;const nf=Ue(sJ);var Pn=function(t){return t===0?0:t>0?1:-1},xa=function(t){return Za(t)&&t.indexOf("%")===t.length-1},G=function(t){return iJ(t)&&!nf(t)},lJ=function(t){return Se(t)},Ot=function(t){return G(t)||Za(t)},cJ=0,of=function(t){var r=++cJ;return"".concat(t||"").concat(r)},es=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(!G(t)&&!Za(t))return n;var o;if(xa(t)){var a=t.indexOf("%");o=r*parseFloat(t.slice(0,a))/100}else o=+t;return nf(o)&&(o=n),i&&o>r&&(o=r),o},so=function(t){if(!t)return null;var r=Object.keys(t);return r&&r.length?t[r[0]]:null},uJ=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},En=function(t,r){return G(t)&&G(r)?function(n){return t+n*(r-t)}:function(){return r}};function Ap(e,t,r){return!e||!e.length?null:e.find(function(n){return n&&(typeof t=="function"?t(n):Xr(n,t))===r})}var dJ=function(t,r){return G(t)&&G(r)?t-r:Za(t)&&Za(r)?t.localeCompare(r):t instanceof Date&&r instanceof Date?t.getTime()-r.getTime():String(t).localeCompare(String(r))};function cl(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 Ob(e){"@babel/helpers - typeof";return Ob=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},Ob(e)}var fJ=["viewBox","children"],hJ=["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRen
303dering","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"],VO=["points","pathLength"],cy={svg:fJ,polygon:VO,polyline:VO},q1=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDrag
303Capture","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"],Cp=function(t,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var n=t;if(x.isValidElement(t)&&(n=t.props),!gc(n))return null;var i={};return Object.keys(n).forEach(function(o){q1.includes(o)&&(i[o]=r||function(a){return n[o](n,a)})}),i},pJ=function(t,r,n){return function(i){return t(r,n,i),null}},jp=function(t,r,n){if(!gc(t)||Ob(t)!=="object")return null;var i=null;return Object.keys(t).forEach(function(o){var a=t[o];q1.includes(o)&&typeof a=="function"&&(i||(i={}),i[o]=pJ(a,r,n))}),i},mJ=["children"],vJ=["children"];function KO(e,t){if(e==null)return{};var r=gJ(e,t),n,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)n=o[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function gJ(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 Pb(e){"@babel/helpers - typeof";return Pb=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},Pb(e)}var GO={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart",contextmenu:"onContextMenu",dblclick:"onDoubleClick"},_i=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},YO=null,uy=null,V1=function e(t){if(t===YO&&Array.isArray(uy))return uy;var r=[];return x.Children.forEach(t,function(n){Se(n)||(ZQ.isFragment(n)?r=r.concat(e(n.props.children)):r.push(n))}),uy=r,YO=t,r};function Qr(e,t){var r=[],n=[];return Array.isArray(t)?n=t.map(function(i){return _i(i)}):n=[_i(t)],V1(e).forEach(function(i){var o=Xr(i,"type.displayName")||Xr(i,"type.name");n.indexOf(o)!==-1&&r.push(i)}),r}function _r(e,t){var r=Qr(e,t);return r&&r[0]}var XO=function(t){if(!t||!t.props)return!1;var r=t.props,n=r.width,i=r.height;return!(!G(n)||n<=0||!G(i)||i<=0)},yJ=["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"],bJ=function(t){return t&&t.type&&Za(t.type)&&yJ.indexOf(t.type)>=0},wJ=function(t){return t&&Pb(t)==="object"&&"clipDot"in t},xJ=function(t,r,n,i){var o,a=(o=cy==null?void 0:cy[i])!==null&&o!==void 0?o:[];return r.startsWith("data-")||!xe(t)&&(i&&a.includes(r)||hJ.includes(r))||n&&q1.includes(r)},Ae=function(t,r,n){if(!t||typeof t=="function"||typeof t=="boolean")return null;var i=t;if(x.isValidElement(t)&&(i=t.props),!gc(i))return null;var o={};
303return Object.keys(i).forEach(function(a){var s;xJ((s=i)===null||s===void 0?void 0:s[a],a,r,n)&&(o[a]=i[a])}),o},Tb=function e(t,r){if(t===r)return!0;var n=x.Children.count(t);if(n!==x.Children.count(r))return!1;if(n===0)return!0;if(n===1)return QO(Array.isArray(t)?t[0]:t,Array.isArray(r)?r[0]:r);for(var i=0;i<n;i++){var o=t[i],a=r[i];if(Array.isArray(o)||Array.isArray(a)){if(!e(o,a))return!1}else if(!QO(o,a))return!1}return!0},QO=function(t,r){if(Se(t)&&Se(r))return!0;if(!Se(t)&&!Se(r)){var n=t.props||{},i=n.children,o=KO(n,mJ),a=r.props||{},s=a.children,l=KO(a,vJ);return i&&s?cl(o,l)&&Tb(i,s):!i&&!s?cl(o,l):!1}return!1},JO=function(t,r){var n=[],i={};return V1(t).forEach(function(o,a){if(bJ(o))n.push(o);else if(o){var s=_i(o.type),l=r[s]||{},c=l.handler,u=l.once;if(c&&(!u||!i[s])){var d=c(o,s,a);n.push(d),i[s]=!0}}}),n},SJ=function(t){var r=t&&t.type;return r&&GO[r]?GO[r]:null},_J=function(t,r){return V1(r).indexOf(t)},EJ=["children","width","height","viewBox","className","style","title","desc"];function Ab(){return Ab=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ab.apply(this,arguments)}function OJ(e,t){if(e==null)return{};var r=PJ(e,t),n,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)n=o[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function PJ(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 Cb(e){var t=e.children,r=e.width,n=e.height,i=e.viewBox,o=e.className,a=e.style,s=e.title,l=e.desc,c=OJ(e,EJ),u=i||{width:r,height:n,x:0,y:0},d=Ce("recharts-surface",o);return A.createElement("svg",Ab({},Ae(c,!0,"svg"),{className:d,width:r,height:n,style:a,viewBox:"".concat(u.x," ").concat(u.y," ").concat(u.width," ").concat(u.height)}),A.createElement("title",null,s),A.createElement("desc",null,l),t)}var TJ=["children","className"];function jb(){return jb=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},jb.apply(this,arguments)}function AJ(e,t){if(e==null)return{};var r=CJ(e,t),n,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)n=o[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function CJ(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 pt=A.forwardRef(function(e,t){var r=e.children,n=e.className,i=AJ(e,TJ),o=Ce("recharts-layer",n);return A.createElement("g",jb({className:o},Ae(i,!0),{ref:t}),r)}),Ei=function(t,r){for(var n=arguments.length,i=new Array(n>2?n-2:0),o=2;o<n;o++)i[o-2]=arguments[o]};function jJ(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 o=Array(i);++n<i;)o[n]=e[n+t];return o}var kJ=jJ,NJ=kJ;function RJ(e,t,r){var n=e.length;return r=r===void 0?n:r,!t&&r>=n?e:NJ(e,t,r)}var $J=RJ,MJ="\\ud800-\\udfff",IJ="\\u0300-\\u036f",DJ="\\ufe20-\\ufe2f",LJ="\\u20d0-\\u20ff",BJ=IJ+DJ+LJ,FJ="\\ufe0e\\ufe0f",UJ="\\u200d",zJ=RegExp("["+UJ+MJ+BJ+FJ+"]");function WJ(e){return zJ.test(e)}var XI=WJ;function HJ(e){return e.split("")}var qJ=HJ,QI="\\ud800-\\udfff",VJ="\\u0300-\\u036f",KJ="\\ufe20-\\ufe2f",GJ="\\u20d0-\\u20ff",YJ=VJ+KJ+GJ,XJ="\\ufe0e\\ufe0f",QJ="["+QI+"]",kb="["+YJ+"]",Nb="\\ud83c[\\udffb-\\udfff]",JJ="(?:"+kb+"|"+Nb+")",JI="[^"+QI+"]",ZI="(?:\\ud83c[\\udde6-\\uddff]){2}",e2="[\\ud800-\\udbff][\\udc00-\\udfff]",ZJ="\\u200d",t2=JJ+"?",r2="["+XJ+"]?",eZ="(?:"+ZJ+"(?:"+[JI,ZI,e2].join("|")+")"+r2+t2+")*",tZ=r2+t2+eZ,rZ="(?:"+[JI+kb+"?",kb,ZI,e2,QJ].join("|")+")",nZ=RegExp(Nb+"(?="+Nb+")|"+rZ+tZ,"g");function iZ(e){return e.match(nZ)||[]}var oZ=iZ,aZ=qJ,sZ=XI,lZ=oZ;function cZ(e){return sZ(e)?lZ(e):aZ(e)}var uZ=cZ,dZ=$J,fZ=XI,hZ=uZ,pZ=HI;function mZ(e){return function(t){t=pZ(t);var r=fZ(t)?hZ(t):void 0,n=r?r[0]:t.charAt(0),i=r?dZ(r,1).join(""):t.slice(1);return n[e]()+i}}var vZ=mZ,gZ=vZ,yZ=gZ("toUpperCase"),bZ=yZ;const Lv=Ue(bZ);function Ke(e){return function(){return e}}const n2=Math.cos,kp=Math.sin,Rn=Math.sqrt,Np=Math.PI,Bv=2*Np,Rb=Math.PI,$b=2*Rb,ha=1e-6,wZ=$b-ha;function i2(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function xZ(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return i2;const r=10**t;return function(n){this._+=n[0];for(let i=1,o=n.length;i<o;++i)this._+=Math.round(arguments[i]*r)/r+n[i]}}class SZ{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?i2:xZ(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,o,a){this._append`C${+t},${+r},${+n}
303,${+i},${this._x1=+o},${this._y1=+a}`}arcTo(t,r,n,i,o){if(t=+t,r=+r,n=+n,i=+i,o=+o,o<0)throw new Error(`negative radius: ${o}`);let a=this._x1,s=this._y1,l=n-t,c=i-r,u=a-t,d=s-r,f=u*u+d*d;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(f>ha)if(!(Math.abs(d*l-c*u)>ha)||!o)this._append`L${this._x1=t},${this._y1=r}`;else{let h=n-a,v=i-s,m=l*l+c*c,y=h*h+v*v,w=Math.sqrt(m),b=Math.sqrt(f),g=o*Math.tan((Rb-Math.acos((m+f-y)/(2*w*b)))/2),_=g/b,S=g/w;Math.abs(_-1)>ha&&this._append`L${t+_*u},${r+_*d}`,this._append`A${o},${o},0,0,${+(d*h>u*v)},${this._x1=t+S*l},${this._y1=r+S*c}`}}arc(t,r,n,i,o,a){if(t=+t,r=+r,n=+n,a=!!a,n<0)throw new Error(`negative radius: ${n}`);let s=n*Math.cos(i),l=n*Math.sin(i),c=t+s,u=r+l,d=1^a,f=a?i-o:o-i;this._x1===null?this._append`M${c},${u}`:(Math.abs(this._x1-c)>ha||Math.abs(this._y1-u)>ha)&&this._append`L${c},${u}`,n&&(f<0&&(f=f%$b+$b),f>wZ?this._append`A${n},${n},0,1,${d},${t-s},${r-l}A${n},${n},0,1,${d},${this._x1=c},${this._y1=u}`:f>ha&&this._append`A${n},${n},0,${+(f>=Rb)},${d},${this._x1=t+n*Math.cos(o)},${this._y1=r+n*Math.sin(o)}`)}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 K1(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 SZ(t)}function G1(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function o2(e){this._context=e}o2.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 Fv(e){return new o2(e)}function a2(e){return e[0]}function s2(e){return e[1]}function l2(e,t){var r=Ke(!0),n=null,i=Fv,o=null,a=K1(s);e=typeof e=="function"?e:e===void 0?a2:Ke(e),t=typeof t=="function"?t:t===void 0?s2:Ke(t);function s(l){var c,u=(l=G1(l)).length,d,f=!1,h;for(n==null&&(o=i(h=a())),c=0;c<=u;++c)!(c<u&&r(d=l[c],c,l))===f&&((f=!f)?o.lineStart():o.lineEnd()),f&&o.point(+e(d,c,l),+t(d,c,l));if(h)return o=null,h+""||null}return s.x=function(l){return arguments.length?(e=typeof l=="function"?l:Ke(+l),s):e},s.y=function(l){return arguments.length?(t=typeof l=="function"?l:Ke(+l),s):t},s.defined=function(l){return arguments.length?(r=typeof l=="function"?l:Ke(!!l),s):r},s.curve=function(l){return arguments.length?(i=l,n!=null&&(o=i(n)),s):i},s.context=function(l){return arguments.length?(l==null?n=o=null:o=i(n=l),s):n},s}function th(e,t,r){var n=null,i=Ke(!0),o=null,a=Fv,s=null,l=K1(c);e=typeof e=="function"?e:e===void 0?a2:Ke(+e),t=typeof t=="function"?t:Ke(t===void 0?0:+t),r=typeof r=="function"?r:r===void 0?s2:Ke(+r);function c(d){var f,h,v,m=(d=G1(d)).length,y,w=!1,b,g=new Array(m),_=new Array(m);for(o==null&&(s=a(b=l())),f=0;f<=m;++f){if(!(f<m&&i(y=d[f],f,d))===w)if(w=!w)h=f,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),v=f-1;v>=h;--v)s.point(g[v],_[v]);s.lineEnd(),s.areaEnd()}w&&(g[f]=+e(y,f,d),_[f]=+t(y,f,d),s.point(n?+n(y,f,d):g[f],r?+r(y,f,d):_[f]))}if(b)return s=null,b+""||null}function u(){return l2().defined(i).curve(a).context(o)}return c.x=function(d){return arguments.length?(e=typeof d=="function"?d:Ke(+d),n=null,c):e},c.x0=function(d){return arguments.length?(e=typeof d=="function"?d:Ke(+d),c):e},c.x1=function(d){return arguments.length?(n=d==null?null:typeof d=="function"?d:Ke(+d),c):n},c.y=function(d){return arguments.length?(t=typeof d=="function"?d:Ke(+d),r=null,c):t},c.y0=function(d){return arguments.length?(t=typeof d=="function"?d:Ke(+d),c):t},c.y1=function(d){return arguments.length?(r=d==null?null:typeof d=="function"?d:Ke(+d),c):r},c.lineX0=c.lineY0=function(){return u().x(e).y(t)},c.lineY1=function(){return u().x(e).y(r)},c.lineX1=function(){return u().x(n).y(t)},c.defined=function(d){return arguments.length?(i=typeof d=="function"?d:Ke(!!d),c):i},c.curve=function(d){return arguments.length?(a=d,o!=null&&(s=a(o)),c):a},c.context=function(d){return arguments.length?(d==null?o=s=null:s=a(o=d),c):o},c}class c2{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 _Z(e){return new c2(e,!0)}function EZ(e){return new c2(e,!1)}const Y1={draw(e,t){const r=Rn(t/Np);e.moveTo(r,0),e.arc(0,0,r,0,Bv)}},OZ={draw(e,t){const r=Rn(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()}},u2=Rn(1/3),PZ=u2*2,TZ={draw(e,t){const r=Rn(t/PZ),n=r*u2;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}},AZ={draw(e,t){const r=Rn(t),n=-r/2;e.rect(n,n,r,r)}}
vendor: 7,495 bytes, line 303
303,CZ=.8908130915292852,d2=kp(Np/10)/kp(7*Np/10),jZ=kp(Bv/10)*d2,kZ=-n2(Bv/10)*d2,NZ={draw(e,t){const r=Rn(t*CZ),n=jZ*r,i=kZ*r;e.moveTo(0,-r),e.lineTo(n,i);for(let o=1;o<5;++o){const a=Bv*o/5,s=n2(a),l=kp(a);e.lineTo(l*r,-s*r),e.lineTo(s*n-l*i,l*n+s*i)}e.closePath()}},dy=Rn(3),RZ={draw(e,t){const r=-Rn(t/(dy*3));e.moveTo(0,r*2),e.lineTo(-dy*r,-r),e.lineTo(dy*r,-r),e.closePath()}},Ir=-.5,Dr=Rn(3)/2,Mb=1/Rn(12),$Z=(Mb/2+1)*3,MZ={draw(e,t){const r=Rn(t/$Z),n=r/2,i=r*Mb,o=n,a=r*Mb+r,s=-o,l=a;e.moveTo(n,i),e.lineTo(o,a),e.lineTo(s,l),e.lineTo(Ir*n-Dr*i,Dr*n+Ir*i),e.lineTo(Ir*o-Dr*a,Dr*o+Ir*a),e.lineTo(Ir*s-Dr*l,Dr*s+Ir*l),e.lineTo(Ir*n+Dr*i,Ir*i-Dr*n),e.lineTo(Ir*o+Dr*a,Ir*a-Dr*o),e.lineTo(Ir*s+Dr*l,Ir*l-Dr*s),e.closePath()}};function IZ(e,t){let r=null,n=K1(i);e=typeof e=="function"?e:Ke(e||Y1),t=typeof t=="function"?t:Ke(t===void 0?64:+t);function i(){let o;if(r||(r=o=n()),e.apply(this,arguments).draw(r,+t.apply(this,arguments)),o)return r=null,o+""||null}return i.type=function(o){return arguments.length?(e=typeof o=="function"?o:Ke(o),i):e},i.size=function(o){return arguments.length?(t=typeof o=="function"?o:Ke(+o),i):t},i.context=function(o){return arguments.length?(r=o??null,i):r},i}function Rp(){}function $p(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 f2(e){this._context=e}f2.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:$p(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:$p(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function DZ(e){return new f2(e)}function h2(e){this._context=e}h2.prototype={areaStart:Rp,areaEnd:Rp,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:$p(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function LZ(e){return new h2(e)}function p2(e){this._context=e}p2.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:$p(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function BZ(e){return new p2(e)}function m2(e){this._context=e}m2.prototype={areaStart:Rp,areaEnd:Rp,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 FZ(e){return new m2(e)}function ZO(e){return e<0?-1:1}function eP(e,t,r){var n=e._x1-e._x0,i=t-e._x1,o=(e._y1-e._y0)/(n||i<0&&-0),a=(r-e._y1)/(i||n<0&&-0),s=(o*i+a*n)/(n+i);return(ZO(o)+ZO(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function tP(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function fy(e,t,r){var n=e._x0,i=e._y0,o=e._x1,a=e._y1,s=(o-n)/3;e._context.bezierCurveTo(n+s,i+s*t,o-s,a-s*r,o,a)}function Mp(e){this._context=e}Mp.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:fy(this,this._t0,tP(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,fy(this,tP(this,r=eP(this,e,t)),r);break;default:fy(this,this._t0,r=eP(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function v2(e){this._context=new g2(e)}(v2.prototype=Object.create(Mp.prototype)).point=function(e,t){Mp.prototype.point.call(this,t,e)};function g2(e){this._context=e}g2.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,o){this._context.bezierCurveTo(t,e,n,r,o,i)}};function UZ(e){return new Mp(e)}function zZ(e){return new v2(e)}function y2(e){this._context=e}y2.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=rP(e),i=rP(t),o=0,a=1;a<r;++o,++a)this._context.bezierCurveTo(n[0][o],i[0][o],n[1][o],i[1][o],e[a],t[a]);(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 rP(e){var t,r=e.length-1,n,i=new Array(r),o=new Array(r),a=new Array(r);for(i[0]=0,o[0]=2,a[0]=e[0]+2*e[1],t=1;t<r-1;++t)i[t]=1,o[t]=4,a[t]=4*e[t]+2*e[t+1];for(i[r-1]=2,o[r-1]=7,a[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=i[t]/o[t-1],o[t]-=n,a[t]-=n*a[t-1];for(i[r-1]=a[r-1]/o[r-1],t=r-2;t>=0;--t)i[t]=(a[t]-i[t+1])/o[t];for(o[r-1]=(e[r]+i[r-1])/2,t=0;t<r-1;++t)o[t]=2*e[t+1]-i[t+1];return[i,o]}function WZ(e){return new y2(e)}function Uv(e,t){this._context=e,this._t=t}Uv.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: 10,230 bytes, lines 303-306
303default:{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 HZ(e){return new Uv(e,.5)}function qZ(e){return new Uv(e,0)}function VZ(e){return new Uv(e,1)}function Dl(e,t){if((a=e.length)>1)for(var r=1,n,i,o=e[t[0]],a,s=o.length;r<a;++r)for(i=o,o=e[t[r]],n=0;n<s;++n)o[n][1]+=o[n][0]=isNaN(i[n][1])?i[n][0]:i[n][1]}function Ib(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}function KZ(e,t){return e[t]}function GZ(e){const t=[];return t.key=e,t}function YZ(){var e=Ke([]),t=Ib,r=Dl,n=KZ;function i(o){var a=Array.from(e.apply(this,arguments),GZ),s,l=a.length,c=-1,u;for(const d of o)for(s=0,++c;s<l;++s)(a[s][c]=[0,+n(d,a[s].key,c,o)]).data=d;for(s=0,u=G1(t(a));s<l;++s)a[u[s]].index=s;return r(a,u),a}return i.keys=function(o){return arguments.length?(e=typeof o=="function"?o:Ke(Array.from(o)),i):e},i.value=function(o){return arguments.length?(n=typeof o=="function"?o:Ke(+o),i):n},i.order=function(o){return arguments.length?(t=o==null?Ib:typeof o=="function"?o:Ke(Array.from(o)),i):t},i.offset=function(o){return arguments.length?(r=o??Dl,i):r},i}function XZ(e,t){if((n=e.length)>0){for(var r,n,i=0,o=e[0].length,a;i<o;++i){for(a=r=0;r<n;++r)a+=e[r][i][1]||0;if(a)for(r=0;r<n;++r)e[r][i][1]/=a}Dl(e,t)}}function QZ(e,t){if((i=e.length)>0){for(var r=0,n=e[t[0]],i,o=n.length;r<o;++r){for(var a=0,s=0;a<i;++a)s+=e[a][r][1]||0;n[r][1]+=n[r][0]=-s/2}Dl(e,t)}}function JZ(e,t){if(!(!((a=e.length)>0)||!((o=(i=e[t[0]]).length)>0))){for(var r=0,n=1,i,o,a;n<o;++n){for(var s=0,l=0,c=0;s<a;++s){for(var u=e[t[s]],d=u[n][1]||0,f=u[n-1][1]||0,h=(d-f)/2,v=0;v<s;++v){var m=e[t[v]],y=m[n][1]||0,w=m[n-1][1]||0;h+=y-w}l+=d,c+=h*d}i[n-1][1]+=i[n-1][0]=r,l&&(r-=c/l)}i[n-1][1]+=i[n-1][0]=r,Dl(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 ZZ=["type","size","sizeType"];function Db(){return Db=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},Db.apply(this,arguments)}function nP(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 iP(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?nP(Object(r),!0).forEach(function(n){eee(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):nP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function eee(e,t,r){return t=tee(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function tee(e){var t=ree(e,"string");return rd(t)=="symbol"?t:t+""}function ree(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 nee(e,t){if(e==null)return{};var r=iee(e,t),n,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)n=o[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function iee(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 b2={symbolCircle:Y1,symbolCross:OZ,symbolDiamond:TZ,symbolSquare:AZ,symbolStar:NZ,symbolTriangle:RZ,symbolWye:MZ},oee=Math.PI/180,aee=function(t){var r="symbol".concat(Lv(t));return b2[r]||Y1},see=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*oee;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}},lee=function(t,r){b2["symbol".concat(Lv(t))]=r},X1=function(t){var r=t.type,n=r===void 0?"circle":r,i=t.size,o=i===void 0?64:i,a=t.sizeType,s=a===void 0?"area":a,l=nee(t,ZZ),c=iP(iP({},l),{},{type:n,size:o,sizeType:s}),u=function(){var y=aee(n),w=IZ().type(y).size(see(o,s,n));return w()},d=c.className,f=c.cx,h=c.cy,v=Ae(c,!0);return f===+f&&h===+h&&o===+o?A.createElement("path",Db({},v,{className:Ce("recharts-symbols",d),transform:"translate(".concat(f,", ").concat(h,")"),d:u()})):null};X1.registerSymbol=lee;function Ll(e){"@babel/helpers - typeof";return Ll=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ll(e)}function Lb(){return Lb=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},Lb.apply(this,arguments)}function oP(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 cee(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?oP(Object(r),!0).forEach(function(n){nd(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):oP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function uee(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function dee(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,x2(n.key),n)}}function fee(e,t,r){return t&&dee(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function hee(e,t,r){return t=Ip(t),pee(e,w2()?Reflect.construct(t,r||[],Ip(e).constructor):t.apply(e,r))}function pee(e,t){if(t&&(Ll(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return mee(e)}function mee(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function w2(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(w2=function(){return!!e})()}function Ip(e){return Ip=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ip(e)}function vee(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&&Bb(e,t)}function Bb(e,t){return Bb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Bb(e,t)}function nd(e,t,r){return t=x2(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function x2(e){var t=gee(e,"string");return Ll(t)=="symbol"?t:t+""}function gee(e,t){if(Ll(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Ll(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Lr=32,Q1=function(e){function t(){return uee(this,t),hee(this,t,arguments)}return vee(t,e),fee(t,[{key:"renderIcon",value:function(n){var i=this.props.inactiveColor,o=Lr/2,a=Lr/6,s=Lr/3,l=n.inactive?i:n.color;if(n.type==="plainline")return A.createElement("line",{strokeWidth:4,fill:"none",stroke:l,strokeDasharray:n.payload.strokeDasharray,x1:0,y1:o,x2:Lr,y2:o,className:"recharts-legend-icon"});if(n.type==="line")return A.createElement("path",{strokeWidth:4,fill:"none",stroke:l,d:"M0,".concat(o,"h").concat(s,`
304            A`).concat(a,",").concat(a,",0,1,1,").concat(2*s,",").concat(o,`
305            H`).concat(Lr,"M").concat(2*s,",").concat(o,`
306            A`).concat(a,",").concat(a,",0,1,1,").concat(s,",").concat(o),className:"recharts-legend-icon"});if(n.type==="rect")return A.createElement("path",{stroke:"none",fill:l,d:"M0,".concat(Lr/8,"h").concat(Lr,"v").concat(Lr*3/4,"h").concat(-Lr,"z"),className:"recharts-legend-icon"});if(A.isValidElement(n.legendIcon)){var c=cee({},n);return delete c.legendIcon,A.cloneElement(n.legendIcon,c)}return A.createElement(X1,{fill:l,cx:o,cy:o,size:Lr,sizeType:"diameter",type:n.type})}},{key:"renderItems",value:function(){var n=this,i=this.props,o=i.payload,a=i.iconSize,s=i.layout,l=i.formatter,c=i.inactiveColor,u={x:0,y:0,width:Lr,height:Lr},d={display:s==="horizontal"?"inline-block":"block",marginRight:10},f={display:"inline-block",verticalAlign:"middle",marginRight:4};return o.map(function(h,v){var m=h.formatter||l,y=Ce(nd(nd({"recharts-legend-item":!0},"legend-item-".concat(v),!0),"inactive",h.inactive));if(h.type==="none")return null;var w=xe(h.value)?null:h.value;Ei(!xe(h.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=h.inactive?c:h.color;return A.createElement("li",Lb({className:y,style:d,key:"legend-item-".concat(v)},jp(n.props,h,v)),A.createElement(Cb,{width:a,height:a,viewBox:u,style:f},n.renderIcon(h)),A.createElement("span",{className:"recharts-legend-item-text",style:{color:b}},m?m(w,h,v):w))})}},{key:"render",value:function(){var n=this.props,i=n.payload,o=n.layout,a=n.align;if(!i||!i.length)return null;var s={padding:0,margin:0,textAlign:o==="horizontal"?a:"left"};return A.createElement("ul",{className:"recharts-default-legend",style:s},this.renderItems())}}])}
vendor: 8,812 bytes, line 306
306(x.PureComponent);nd(Q1,"displayName","Legend");nd(Q1,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var yee=Ov;function bee(){this.__data__=new yee,this.size=0}var wee=bee;function xee(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var See=xee;function _ee(e){return this.__data__.get(e)}var Eee=_ee;function Oee(e){return this.__data__.has(e)}var Pee=Oee,Tee=Ov,Aee=L1,Cee=B1,jee=200;function kee(e,t){var r=this.__data__;if(r instanceof Tee){var n=r.__data__;if(!Aee||n.length<jee-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Cee(n)}return r.set(e,t),this.size=r.size,this}var Nee=kee,Ree=Ov,$ee=wee,Mee=See,Iee=Eee,Dee=Pee,Lee=Nee;function xc(e){var t=this.__data__=new Ree(e);this.size=t.size}xc.prototype.clear=$ee;xc.prototype.delete=Mee;xc.prototype.get=Iee;xc.prototype.has=Dee;xc.prototype.set=Lee;var S2=xc,Bee="__lodash_hash_undefined__";function Fee(e){return this.__data__.set(e,Bee),this}var Uee=Fee;function zee(e){return this.__data__.has(e)}var Wee=zee,Hee=B1,qee=Uee,Vee=Wee;function Dp(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new Hee;++t<r;)this.add(e[t])}Dp.prototype.add=Dp.prototype.push=qee;Dp.prototype.has=Vee;var _2=Dp;function Kee(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 E2=Kee;function Gee(e,t){return e.has(t)}var O2=Gee,Yee=_2,Xee=E2,Qee=O2,Jee=1,Zee=2;function ete(e,t,r,n,i,o){var a=r&Jee,s=e.length,l=t.length;if(s!=l&&!(a&&l>s))return!1;var c=o.get(e),u=o.get(t);if(c&&u)return c==t&&u==e;var d=-1,f=!0,h=r&Zee?new Yee:void 0;for(o.set(e,t),o.set(t,e);++d<s;){var v=e[d],m=t[d];if(n)var y=a?n(m,v,d,t,e,o):n(v,m,d,e,t,o);if(y!==void 0){if(y)continue;f=!1;break}if(h){if(!Xee(t,function(w,b){if(!Qee(h,b)&&(v===w||i(v,w,r,n,o)))return h.push(b)})){f=!1;break}}else if(!(v===m||i(v,m,r,n,o))){f=!1;break}}return o.delete(e),o.delete(t),f}var P2=ete,tte=ri,rte=tte.Uint8Array,nte=rte;function ite(e){var t=-1,r=Array(e.size);return e.forEach(function(n,i){r[++t]=[i,n]}),r}var ote=ite;function ate(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var J1=ate,aP=rf,sP=nte,ste=D1,lte=P2,cte=ote,ute=J1,dte=1,fte=2,hte="[object Boolean]",pte="[object Date]",mte="[object Error]",vte="[object Map]",gte="[object Number]",yte="[object RegExp]",bte="[object Set]",wte="[object String]",xte="[object Symbol]",Ste="[object ArrayBuffer]",_te="[object DataView]",lP=aP?aP.prototype:void 0,hy=lP?lP.valueOf:void 0;function Ete(e,t,r,n,i,o,a){switch(r){case _te:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Ste:return!(e.byteLength!=t.byteLength||!o(new sP(e),new sP(t)));case hte:case pte:case gte:return ste(+e,+t);case mte:return e.name==t.name&&e.message==t.message;case yte:case wte:return e==t+"";case vte:var s=cte;case bte:var l=n&dte;if(s||(s=ute),e.size!=t.size&&!l)return!1;var c=a.get(e);if(c)return c==t;n|=fte,a.set(e,t);var u=lte(s(e),s(t),n,i,o,a);return a.delete(e),u;case xte:if(hy)return hy.call(e)==hy.call(t)}return!1}var Ote=Ete;function Pte(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}var T2=Pte,Tte=T2,Ate=vr;function Cte(e,t,r){var n=t(e);return Ate(e)?n:Tte(n,r(e))}var jte=Cte;function kte(e,t){for(var r=-1,n=e==null?0:e.length,i=0,o=[];++r<n;){var a=e[r];t(a,r,e)&&(o[i++]=a)}return o}var Nte=kte;function Rte(){return[]}var $te=Rte,Mte=Nte,Ite=$te,Dte=Object.prototype,Lte=Dte.propertyIsEnumerable,cP=Object.getOwnPropertySymbols,Bte=cP?function(e){return e==null?[]:(e=Object(e),Mte(cP(e),function(t){return Lte.call(e,t)}))}:Ite,Fte=Bte;function Ute(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var zte=Ute,Wte=zi,Hte=Wi,qte="[object Arguments]";function Vte(e){return Hte(e)&&Wte(e)==qte}var Kte=Vte,uP=Kte,Gte=Wi,A2=Object.prototype,Yte=A2.hasOwnProperty,Xte=A2.propertyIsEnumerable,Qte=uP(function(){return arguments}())?uP:function(e){return Gte(e)&&Yte.call(e,"callee")&&!Xte.call(e,"callee")},Z1=Qte,Lp={exports:{}};function Jte(){return!1}var Zte=Jte;Lp.exports;(function(e,t){var r=ri,n=Zte,i=t&&!t.nodeType&&t,o=i&&!0&&e&&!e.nodeType&&e,a=o&&o.exports===i,s=a?r.Buffer:void 0,l=s?s.isBuffer:void 0,c=l||n;e.exports=c})(Lp,Lp.exports);var C2=Lp.exports,ere=9007199254740991,tre=/^(?:0|[1-9]\d*)$/;function rre(e,t){var r=typeof e;return t=t??ere,!!t&&(r=="number"||r!="symbol"&&tre.test(e))&&e>-1&&e%1==0&&e<t}var eS=rre,nre=9007199254740991;function ire(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=nre}var tS=ire,ore=zi,are=tS,sre=Wi,lre="[object Arguments]",cre="[object Array]",ure="[object Boolean]",dre="[object Date]",fre="[object Error]",hre="[object Function]",pre="[object Map]",mre="[object Number]",vre="[object Object]",gre="[object RegExp]",yre="[object Set]",bre="[object String]",wre="[object WeakMap]",xre="[object ArrayBuffer]",Sre="[object DataView]",_re="[object Float32Array]",Ere="[object Float64Array]",Ore="[object Int8Array]",Pre="[object Int16Array]",Tre="[object Int32Array]",Are="[object Uint8Array]",Cre="[object Uint8ClampedArray]",jre="[object Uint16Array]",kre="[object Uint32Array]",Qe={};Qe[_re]=Qe[Ere]=Qe[Ore]=Qe[Pre]=Qe[Tre]=Qe[Are]=Qe[Cre]=Qe[jre]=Qe[kre]=!0;Qe[lre]=Qe[cre]=Qe[xre]=Qe[ure]=Qe[Sre]=Qe[dre]=Qe[fre]=Qe[hre]=Qe[pre]=Qe[mre]=Qe[vre]=Qe[gre]=Qe[yre]=Qe[bre]=Qe[wre]=!1;function Nre(e){return sre(e)&&are(e.length)&&!!Qe[ore(e)]}var Rre=Nre;function $re(e){return function(t){return e(t)}}var j2=$re,Bp={exports:{}};Bp.exports;(function(e,t){var r=LI,n=t&&!t.nodeType&&t,i=n&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===n,a=o&&r.process,s=function(){try{var l=i&&i.require&&i.require("util").types;return l||a&&a.binding&&a.binding("util")}catch{}}();e.exports=s})(Bp,Bp.exports);var Mre=Bp.exports,Ire=Rre,Dre=j2,dP=Mre,fP=dP&&dP.isTypedArray,Lre=fP?Dre(fP):Ire,k2=Lre,Bre=zte,Fre=Z1,Ure=vr,zre=C2,Wre=eS,Hre=k2,qre=Object.prototype,Vre=qre.hasOwnProperty;function Kre(e,t){var r=Ure(e),n=!r&&Fre(e),i=!r&&!n&&zre(e),o=!r&&!n&&!i&&Hre(e),a=r||n||i||o,s=a?Bre(e.length,String):[],l=s.length;for(var c in e)(t||Vre.call(e,c))&&!(a&&(c=="length"||i&&(c=="offset"||c=="parent")||o&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Wre(c,l)))&&s.push(c);return s}var Gre=Kre,Yre=Object.prototype;function Xre(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||Yre;return e===r}var Qre=Xre;function Jre(e,t){return function(r){return e(t(r))}}var N2=Jre,Zre=N2,ene=Zre(Object.keys,Object),tne=ene,rne=Qre,nne=tne,ine=Object.prototype,one=ine.hasOwnProperty;function ane(e){if(!rne(e))return nne(e);var t=[];for(var r in Object(e))one.call(e,r)&&r!="constructor"&&t.push(r);return t}var sne=ane,lne=I1,cne=tS;function une(e){return e!=null&&cne(e.length)&&!lne(e)}var af=une,dne=Gre,fne=sne,hne=af;function pne(e){return hne(e)?dne(e):fne(e)}var zv=pne,mne=jte,vne=Fte,gne=zv;function yne(e){return mne(e,gne,vne)}var bne=yne,hP=bne,wne=1,xne=Object.prototype,Sne=xne.hasOwnProperty;function _ne(e,t,r,n,i,o){var a=r&wne,s=hP(e),l=s.length,c=hP(t),u=c.length;if(l!=u&&!a)return!1;for(var d=l;d--;){var f=s[d];if(!(a?f in t:Sne.call(t,f)))return!1}var h=o.get(e),v=o.get(t);if(h&&v)return h==t&&v==e;var m=!0;o.set(e,t),o.set(t,e);for(var y=a;++d<l;){f=s[d];var w=e[f],b=t[f];if(n)var g=a?n(b,w,f,t,e,o):n(w,b,f,e,t,o);if(!(g===void 0?w===b||i(w,b,r,n,o):g)){m=!1;break}y||(y=f=="constructor")}if(m&&!y){var _=e.constructor,S=t.constructor;_!=S&&"constructor"in e&&"constructor"in t&&!(typeof _=="function"&&_ instanceof _&&typeof S=="function"&&S instanceof S)&&(m=!1)}return o.delete(e),o.delete(t),m}var Ene=_ne,One=us,Pne=ri,Tne=One(Pne,"DataView"),Ane=Tne,Cne=us,jne=ri,kne=Cne(jne,"Promise"),Nne=kne,Rne=us,$ne=ri,Mne=Rne($ne,"Set"),R2=Mne,Ine=us,Dne=ri,Lne=Ine(Dne,"WeakMap"),Bne=Lne,Fb=Ane,Ub=L1,zb=Nne,Wb=R2,Hb=Bne,$2=zi,Sc=FI,pP="[object Map]",Fne="[object Object]",mP="[object Promise]",vP="[object Set]",gP="[object WeakMap]",yP="[object DataView]",Une=Sc(Fb),zne=Sc(Ub),Wne=Sc(zb),Hne=Sc(Wb),qne=Sc(Hb),pa=$2;(Fb&&pa(new Fb(new ArrayBuffer(1)))!=yP||Ub&&pa(new Ub)!=pP||zb&&pa(zb.resolve())!=mP||Wb&&pa(new Wb)!=vP||Hb&&pa(new Hb)!=gP)&&(pa=function(e){var t=$2(e),r=t==Fne?e.constructor:void 0,n=r?Sc(r):"";if(n)switch(n){case Une:return yP;case zne:return pP;case Wne:return mP;case Hne:return vP;case qne:return gP}return t});var Vne=pa,py=S2,Kne=P2,Gne=Ote,Yne=Ene,bP=Vne,wP=vr,xP=C2,Xne=k2,Qne=1,SP="[object Arguments]",_P="[object Array]",rh="[object Object]",Jne=Object.prototype,EP=Jne.hasOwnProperty;function Zne(e,t,r,n,i,o){var a=wP(e),s=wP(t),l=a?_P:bP(e),c=s?_P:bP(t);l=l==SP?rh:l,c=c==SP?rh:c;var u=l==rh,d=c==rh,f=l==c;if(f&&xP(e)){if(!xP(t))return!1;a=!0,u=!1}if(f&&!u)return o||(o=new py),a||Xne(e)?Kne(e,t,r,n,i,o):Gne(e,t,l,r,n,i,o);if(!(r&Qne)){var h=u&&EP.call(e,"__wrapped__"),v=d&&EP.call(t,"__wrapped__");
vendor: 4,112 bytes, line 306
306if(h||v){var m=h?e.value():e,y=v?t.value():t;return o||(o=new py),i(m,y,r,n,o)}}return f?(o||(o=new py),Yne(e,t,r,n,i,o)):!1}var eie=Zne,tie=eie,OP=Wi;function M2(e,t,r,n,i){return e===t?!0:e==null||t==null||!OP(e)&&!OP(t)?e!==e&&t!==t:tie(e,t,r,n,M2,i)}var rS=M2,rie=S2,nie=rS,iie=1,oie=2;function aie(e,t,r,n){var i=r.length,o=i,a=!n;if(e==null)return!o;for(e=Object(e);i--;){var s=r[i];if(a&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++i<o;){s=r[i];var l=s[0],c=e[l],u=s[1];if(a&&s[2]){if(c===void 0&&!(l in e))return!1}else{var d=new rie;if(n)var f=n(c,u,l,e,t,d);if(!(f===void 0?nie(u,c,iie|oie,n,d):f))return!1}}return!0}var sie=aie,lie=Zo;function cie(e){return e===e&&!lie(e)}var I2=cie,uie=I2,die=zv;function fie(e){for(var t=die(e),r=t.length;r--;){var n=t[r],i=e[n];t[r]=[n,i,uie(i)]}return t}var hie=fie;function pie(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}var D2=pie,mie=sie,vie=hie,gie=D2;function yie(e){var t=vie(e);return t.length==1&&t[0][2]?gie(t[0][0],t[0][1]):function(r){return r===e||mie(r,e,t)}}var bie=yie;function wie(e,t){return e!=null&&t in Object(e)}var xie=wie,Sie=qI,_ie=Z1,Eie=vr,Oie=eS,Pie=tS,Tie=Tv;function Aie(e,t,r){t=Sie(t,e);for(var n=-1,i=t.length,o=!1;++n<i;){var a=Tie(t[n]);if(!(o=e!=null&&r(e,a)))break;e=e[a]}return o||++n!=i?o:(i=e==null?0:e.length,!!i&&Pie(i)&&Oie(a,i)&&(Eie(e)||_ie(e)))}var Cie=Aie,jie=xie,kie=Cie;function Nie(e,t){return e!=null&&kie(e,t,jie)}var Rie=Nie,$ie=rS,Mie=VI,Iie=Rie,Die=M1,Lie=I2,Bie=D2,Fie=Tv,Uie=1,zie=2;function Wie(e,t){return Die(e)&&Lie(t)?Bie(Fie(e),t):function(r){var n=Mie(r,e);return n===void 0&&n===t?Iie(r,e):$ie(t,n,Uie|zie)}}var Hie=Wie;function qie(e){return e}var _c=qie;function Vie(e){return function(t){return t==null?void 0:t[e]}}var Kie=Vie,Gie=z1;function Yie(e){return function(t){return Gie(t,e)}}var Xie=Yie,Qie=Kie,Jie=Xie,Zie=M1,eoe=Tv;function toe(e){return Zie(e)?Qie(eoe(e)):Jie(e)}var roe=toe,noe=bie,ioe=Hie,ooe=_c,aoe=vr,soe=roe;function loe(e){return typeof e=="function"?e:e==null?ooe:typeof e=="object"?aoe(e)?ioe(e[0],e[1]):noe(e):soe(e)}var ea=loe;function coe(e,t,r,n){for(var i=e.length,o=r+(n?1:-1);n?o--:++o<i;)if(t(e[o],o,e))return o;return-1}var L2=coe;function uoe(e){return e!==e}var doe=uoe;function foe(e,t,r){for(var n=r-1,i=e.length;++n<i;)if(e[n]===t)return n;return-1}var hoe=foe,poe=L2,moe=doe,voe=hoe;function goe(e,t,r){return t===t?voe(e,t,r):poe(e,moe,r)}var yoe=goe,boe=yoe;function woe(e,t){var r=e==null?0:e.length;return!!r&&boe(e,t,0)>-1}var xoe=woe;function Soe(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 _oe=Soe;function Eoe(){}var Ooe=Eoe,my=R2,Poe=Ooe,Toe=J1,Aoe=1/0,Coe=my&&1/Toe(new my([,-0]))[1]==Aoe?function(e){return new my(e)}:Poe,joe=Coe,koe=_2,Noe=xoe,Roe=_oe,$oe=O2,Moe=joe,Ioe=J1,Doe=200;function Loe(e,t,r){var n=-1,i=Noe,o=e.length,a=!0,s=[],l=s;if(r)a=!1,i=Roe;else if(o>=Doe){var c=t?null:Moe(e);if(c)return Ioe(c);a=!1,i=$oe,l=new koe}else l=t?[]:s;e:for(;++n<o;){var u=e[n],d=t?t(u):u;if(u=r||u!==0?u:0,a&&d===d){for(var f=l.length;f--;)if(l[f]===d)continue e;t&&l.push(d),s.push(u)}else i(l,d,r)||(l!==s&&l.push(d),s.push(u))}return s}var Boe=Loe,Foe=ea,Uoe=Boe;function zoe(e,t){return e&&e.length?Uoe(e,Foe(t)):[]}var Woe=zoe;const PP=Ue(Woe);function B2(e,t,r){return t===!0?PP(e,r):xe(t)?PP(e,t):e}function Bl(e){"@babel/helpers - typeof";return Bl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bl(e)}var Hoe=["ref"];function TP(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 ii(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?TP(Object(r),!0).forEach(function(n){Wv(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):TP(Object(r)).forEac
vendor: 5,877 bytes, line 306
306h(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function qoe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function AP(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,U2(n.key),n)}}function Voe(e,t,r){return t&&AP(e.prototype,t),r&&AP(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Koe(e,t,r){return t=Fp(t),Goe(e,F2()?Reflect.construct(t,r||[],Fp(e).constructor):t.apply(e,r))}function Goe(e,t){if(t&&(Bl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Yoe(e)}function Yoe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function F2(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(F2=function(){return!!e})()}function Fp(e){return Fp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Fp(e)}function Xoe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&qb(e,t)}function qb(e,t){return qb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},qb(e,t)}function Wv(e,t,r){return t=U2(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function U2(e){var t=Qoe(e,"string");return Bl(t)=="symbol"?t:t+""}function Qoe(e,t){if(Bl(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Bl(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Joe(e,t){if(e==null)return{};var r=Zoe(e,t),n,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)n=o[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Zoe(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 eae(e){return e.value}function tae(e,t){if(A.isValidElement(e))return A.cloneElement(e,t);if(typeof e=="function")return A.createElement(e,t);t.ref;var r=Joe(t,Hoe);return A.createElement(Q1,r)}var CP=1,ul=function(e){function t(){var r;qoe(this,t);for(var n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];return r=Koe(this,t,[].concat(i)),Wv(r,"lastBoundingBox",{width:-1,height:-1}),r}return Xoe(t,e),Voe(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)>CP||Math.abs(i.height-this.lastBoundingBox.height)>CP)&&(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?ii({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(n){var i=this.props,o=i.layout,a=i.align,s=i.verticalAlign,l=i.margin,c=i.chartWidth,u=i.chartHeight,d,f;if(!n||(n.left===void 0||n.left===null)&&(n.right===void 0||n.right===null))if(a==="center"&&o==="vertical"){var h=this.getBBoxSnapshot();d={left:((c||0)-h.width)/2}}else d=a==="right"?{right:l&&l.right||0}:{left:l&&l.left||0};if(!n||(n.top===void 0||n.top===null)&&(n.bottom===void 0||n.bottom===null))if(s==="middle"){var v=this.getBBoxSnapshot();f={top:((u||0)-v.height)/2}}else f=s==="bottom"?{bottom:l&&l.bottom||0}:{top:l&&l.top||0};return ii(ii({},d),f)}},{key:"render",value:function(){var n=this,i=this.props,o=i.content,a=i.width,s=i.height,l=i.wrapperStyle,c=i.payloadUniqBy,u=i.payload,d=ii(ii({position:"absolute",width:a||"auto",height:s||"auto"},this.getDefaultPosition(l)),l);return A.createElement("div",{className:"recharts-legend-wrapper",style:d,ref:function(h){n.wrapperNode=h}},tae(o,ii(ii({},this.props),{},{payload:B2(u,c,eae)})))}}],[{key:"getWithHeight",value:function(n,i){var o=ii(ii({},this.defaultProps),n.props),a=o.layout;return a==="vertical"&&G(n.props.height)?{height:n.props.height}:a==="horizontal"?{width:n.props.width||i}:null}}])}(x.PureComponent);Wv(ul,"displayName","Legend");Wv(ul,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var jP=rf,rae=Z1,nae=vr,kP=jP?jP.isConcatSpreadable:void 0;function iae(e){return nae(e)||rae(e)||!!(kP&&e&&e[kP])}var oae=iae,aae=T2,sae=oae;function z2(e,t,r,n,i){var o=-1,a=e.length;for(r||(r=sae),i||(i=[]);++o<a;){var s=e[o];t>0&&r(s)?t>1?z2(s,t-1,r,n,i):aae(i,s):n||(i[i.length]=s)}return i}var W2=z2;function lae(e){return function(t,r,n){for(var i=-1,o=Object(t),a=n(t),s=a.length;s--;){var l=a[e?s:++i];if(r(o[l],l,o)===!1)break}return t}}var cae=lae,uae=cae,dae=uae(),fae=dae,hae=fae,pae=zv;function mae(e,t){return e&&hae(e,t,pae)}var H2=mae,vae=af;function gae(e,t){return function(r,n){if(r==null)return r;if(!vae(r))return e(r,n);for(var i=r.length,o=t?i:-1,a=Object(r);(t?o--:++o<i)&&n(a[o],o,a)!==!1;);return r}}
306var yae=gae,bae=H2,wae=yae,xae=wae(bae),nS=xae,Sae=nS,_ae=af;function Eae(e,t){var r=-1,n=_ae(e)?Array(e.length):[];return Sae(e,function(i,o,a){n[++r]=t(i,o,a)}),n}var q2=Eae;function Oae(e,t){var r=e.length;for(e.sort(t);r--;)e[r]=e[r].value;return e}var Pae=Oae,NP=vc;function Tae(e,t){if(e!==t){var r=e!==void 0,n=e===null,i=e===e,o=NP(e),a=t!==void 0,s=t===null,l=t===t,c=NP(t);if(!s&&!c&&!o&&e>t||o&&a&&l&&!s&&!c||n&&a&&l||!r&&l||!i)return 1;if(!n&&!o&&!c&&e<t||c&&r&&i&&!n&&!o||s&&r&&i||!a&&i||!l)return-1}return 0}var Aae=Tae,Cae=Aae;function jae(e,t,r){for(var n=-1,i=e.criteria,o=t.criteria,a=i.length,s=r.length;++n<a;){var l=Cae(i[n],o[n]);if(l){if(n>=s)return l;var c=r[n];return l*(c=="desc"?-1:1)}}return e.index-t.index}var kae=jae,vy=U1,Nae=z1,Rae=ea,$ae=q2,Mae=Pae,Iae=j2,Dae=kae,Lae=_c,Bae=vr;function Fae(e,t,r){t.length?t=vy(t,function(o){return Bae(o)?function(a){return Nae(a,o.length===1?o[0]:o)}:o}):t=[Lae];var n=-1;t=vy(t,Iae(Rae));var i=$ae(e,function(o,a,s){var l=vy(t,function(c){return c(o)});return{criteria:l,index:++n,value:o}});return Mae(i,function(o,a){return Dae(o,a,r)})}var Uae=Fae;function zae(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 Wae=zae,Hae=Wae,RP=Math.max;function qae(e,t,r){return t=RP(t===void 0?e.length-1:t,0),function(){for(var n=arguments,i=-1,o=RP(n.length-t,0),a=Array(o);++i<o;)a[i]=n[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=n[i];return s[t]=r(a),Hae(e,this,s)}}var Vae=qae;function Kae(e){return function(){return e}}var Gae=Kae,Yae=us,Xae=function(){try{var e=Yae(Object,"defineProperty");return e({},"",{}),e}catch{}}(),V2=Xae,Qae=Gae,$P=V2,Jae=_c,Zae=$P?function(e,t){return $P(e,"toString",{configurable:!0,enumerable:!1,value:Qae(t),writable:!0})}:Jae,ese=Zae,tse=800,rse=16,nse=Date.now;function ise(e){var t=0,r=0;return function(){var n=nse(),i=rse-(n-r);if(r=n,i>0){if(++t>=tse)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var ose=ise,ase=ese,sse=ose,lse=sse(ase),cse=lse,use=_c,dse=Vae,fse=cse;function hse(e,t){return fse(dse(e,t,use),e+"")}var pse=hse,mse=D1,vse=af,gse=eS,yse=Zo;function bse(e,t,r){if(!yse(r))return!1;var n=typeof t;return(n=="number"?vse(r)&&gse(t,r.length):n=="string"&&t in r)?mse(r[t],e):!1}var Hv=bse,wse=W2,xse=Uae,Sse=pse,MP=Hv,_se=Sse(function(e,t){if(e==null)return[];var r=t.length;return r>1&&MP(e,t[0],t[1])?t=[]:r>2&&MP(t[0],t[1],t[2])&&(t=[t[0]]),xse(e,wse(t,1),[])}),Ese=_se;const iS=Ue(Ese);function id(e){"@babel/helpers - typeof";return id=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},id(e)}function Vb(){return Vb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Vb.apply(this,arguments)}function Ose(e,t){return Cse(e)||Ase(e,t)||Tse(e,t)||Pse()}function Pse(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
307In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Tse(e,t){if(e){if(typeof e=="string")return IP(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 IP(e,t)}}function IP(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 Ase(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,o,a,s=[],l=!0,c=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(l=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(u){c=!0,i=u}finally{try{if(!l&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}function Cse(e){if(Array.isArray(e))return e}function DP(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 gy(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};
vendor: 27,687 bytes, lines 307-313
307t%2?DP(Object(r),!0).forEach(function(n){jse(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):DP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function jse(e,t,r){return t=kse(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function kse(e){var t=Nse(e,"string");return id(t)=="symbol"?t:t+""}function Nse(e,t){if(id(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(id(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Rse(e){return Array.isArray(e)&&Ot(e[0])&&Ot(e[1])?e.join(" ~ "):e}var $se=function(t){var r=t.separator,n=r===void 0?" : ":r,i=t.contentStyle,o=i===void 0?{}:i,a=t.itemStyle,s=a===void 0?{}:a,l=t.labelStyle,c=l===void 0?{}:l,u=t.payload,d=t.formatter,f=t.itemSorter,h=t.wrapperClassName,v=t.labelClassName,m=t.label,y=t.labelFormatter,w=t.accessibilityLayer,b=w===void 0?!1:w,g=function(){if(u&&u.length){var k={padding:0,margin:0},L=(f?iS(u,f):u).map(function(M,N){if(M.type==="none")return null;var D=gy({display:"block",paddingTop:4,paddingBottom:4,color:M.color||"#000"},s),B=M.formatter||d||Rse,$=M.value,I=M.name,U=$,H=I;if(B&&U!=null&&H!=null){var z=B($,I,M,N,u);if(Array.isArray(z)){var K=Ose(z,2);U=K[0],H=K[1]}else U=z}return A.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(N),style:D},Ot(H)?A.createElement("span",{className:"recharts-tooltip-item-name"},H):null,Ot(H)?A.createElement("span",{className:"recharts-tooltip-item-separator"},n):null,A.createElement("span",{className:"recharts-tooltip-item-value"},U),A.createElement("span",{className:"recharts-tooltip-item-unit"},M.unit||""))});return A.createElement("ul",{className:"recharts-tooltip-item-list",style:k},L)}return null},_=gy({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},o),S=gy({margin:0},c),E=!Se(m),O=E?m:"",P=Ce("recharts-default-tooltip",h),T=Ce("recharts-tooltip-label",v);E&&y&&u!==void 0&&u!==null&&(O=y(m,u));var j=b?{role:"status","aria-live":"assertive"}:{};return A.createElement("div",Vb({className:P,style:_},j),A.createElement("p",{className:T,style:S},A.isValidElement(O)?O:"".concat(O)),g())};function od(e){"@babel/helpers - typeof";return od=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},od(e)}function nh(e,t,r){return t=Mse(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Mse(e){var t=Ise(e,"string");return od(t)=="symbol"?t:t+""}function Ise(e,t){if(od(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(od(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var zc="recharts-tooltip-wrapper",Dse={visibility:"hidden"};function Lse(e){var t=e.coordinate,r=e.translateX,n=e.translateY;return Ce(zc,nh(nh(nh(nh({},"".concat(zc,"-right"),G(r)&&t&&G(t.x)&&r>=t.x),"".concat(zc,"-left"),G(r)&&t&&G(t.x)&&r<t.x),"".concat(zc,"-bottom"),G(n)&&t&&G(t.y)&&n>=t.y),"".concat(zc,"-top"),G(n)&&t&&G(t.y)&&n<t.y))}function LP(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.key,i=e.offsetTopLeft,o=e.position,a=e.reverseDirection,s=e.tooltipDimension,l=e.viewBox,c=e.viewBoxDimension;if(o&&G(o[n]))return o[n];var u=r[n]-s-i,d=r[n]+i;if(t[n])return a[n]?u:d;if(a[n]){var f=u,h=l[n];return f<h?Math.max(d,l[n]):Math.max(u,l[n])}var v=d+s,m=l[n]+c;return v>m?Math.max(u,l[n]):Math.max(d,l[n])}function Bse(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 Fse(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.offsetTopLeft,i=e.position,o=e.reverseDirection,a=e.tooltipBox,s=e.useTranslate3d,l=e.viewBox,c,u,d;return a.height>0&&a.width>0&&r?(u=LP({allowEscapeViewBox:t,coordinate:r,key:"x",offsetTopLeft:n,position:i,reverseDirection:o,tooltipDimension:a.width,viewBox:l,viewBoxDimension:l.width}),d=LP({allowEscapeViewBox:t,coordinate:r,key:"y",offsetTopLeft:n,position:i,reverseDirection:o,tooltipDimension:a.height,viewBox:l,viewBoxDimension:l.height}),c=Bse({translateX:u,translateY:d,useTranslate3d:s})):c=Dse,{cssProperties:c,cssClasses:Lse({translateX:u,translateY:d,coordinate:r})}}function Fl(e){"@babel/helpers - typeof";return Fl=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},Fl(e)}function BP(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 FP(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?BP(Object(r),!0).forEach(function(n){Gb(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):BP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Use(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function zse(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,G2(n.key),n)}}function Wse(e,t,r){return t&&zse(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Hse(e,t,r){return t=Up(t),qse(e,K2()?Reflect.construct(t,r||[],Up(e).constructor):t.apply(e,r))}function qse(e,t){if(t&&(Fl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Vse(e)}function Vse(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function K2(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(K2=function(){return!!e})()}function Up(e){return Up=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Up(e)}function Kse(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Kb(e,t)}function Kb(e,t){return Kb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Kb(e,t)}function Gb(e,t,r){return t=G2(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function G2(e){var t=Gse(e,"string");return Fl(t)=="symbol"?t:t+""}function Gse(e,t){if(Fl(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Fl(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var UP=1,Yse=function(e){function t(){var r;Use(this,t);for(var n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];return r=Hse(this,t,[].concat(i)),Gb(r,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),Gb(r,"handleKeyDown",function(a){if(a.key==="Escape"){var s,l,c,u;r.setState({dismissed:!0,dismissedAtCoordinate:{x:(s=(l=r.props.coordinate)===null||l===void 0?void 0:l.x)!==null&&s!==void 0?s:0,y:(c=(u=r.props.coordinate)===null||u===void 0?void 0:u.y)!==null&&c!==void 0?c:0}})}}),r}return Kse(t,e),Wse(t,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var n=this.wrapperNode.getBoundingClientRect();(Math.abs(n.width-this.state.lastBoundingBox.width)>UP||Math.abs(n.height-this.state.lastBoundingBox.height)>UP)&&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,o=i.active,a=i.allowEscapeViewBox,s=i.animationDuration,l=i.animationEasing,c=i.children,u=i.coordinate,d=i.hasPayload,f=i.isAnimationActive,h=i.offset,v=i.position,m=i.reverseDirection,y=i.useTranslate3d,w=i.viewBox,b=i.wrapperStyle,g=Fse({allowEscapeViewBox:a,coordinate:u,offsetTopLeft:h,position:v,reverseDirection:m,tooltipBox:this.state.lastBoundingBox,useTranslate3d:y,viewBox:w}),_=g.cssClasses,S=g.cssProperties,E=FP(FP({transition:f&&o?"transform ".concat(s,"ms ").concat(l):void 0},S),{},{pointerEvents:"none",visibility:!this.state.dismissed&&o&&d?"visible":"hidden",position:"absolute",top:0,left:0},b);return A.createElement("div",{tabIndex:-1,className:_,style:E,ref:function(P){n.wrapperNode=P}},c)}}])}(x.PureComponent),Xse=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},Oi={isSsr:Xse(),get:function(t){return Oi[t]},set:function(t,r){if(typeof t=="string")Oi[t]=r;else{var n=Object.keys(t);n&&n.length&&n.forEach(function(i){Oi[i]=t[i]})}}};function Ul(e){"@babel/helpers - typeof";return Ul=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},Ul(e)}function zP(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 WP(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?zP(Object(r),!0).forEach(function(n){oS(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):zP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Qse(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Jse(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,X2(n.key),n)}}function Zse(e,t,r){return t&&Jse(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function ele(e,t,r){return t=zp(t),tle(e,Y2()?Reflect.construct(t,r||[],zp(e).constructor):t.apply(e,r))}function tle(e,t){if(t&&(Ul(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return rle(e)}function rle(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Y2(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Y2=function(){return!!e})()}function zp(e){return zp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},zp(e)}function nle(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&&Yb(e,t)}function Yb(e,t){return Yb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Yb(e,t)}function oS(e,t,r){return t=X2(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function X2(e){var t=ile(e,"string");return Ul(t)=="symbol"?t:t+""}function ile(e,t){if(Ul(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Ul(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ole(e){return e.dataKey}function ale(e,t){return A.isValidElement(e)?A.cloneElement(e,t):typeof e=="function"?A.createElement(e,t):A.createElement($se,t)}var wn=function(e){function t(){return Qse(this,t),ele(this,t,arguments)}return nle(t,e),Zse(t,[{key:"render",value:function(){var n=this,i=this.props,o=i.active,a=i.allowEscapeViewBox,s=i.animationDuration,l=i.animationEasing,c=i.content,u=i.coordinate,d=i.filterNull,f=i.isAnimationActive,h=i.offset,v=i.payload,m=i.payloadUniqBy,y=i.position,w=i.reverseDirection,b=i.useTranslate3d,g=i.viewBox,_=i.wrapperStyle,S=v??[];d&&S.length&&(S=B2(v.filter(function(O){return O.value!=null&&(O.hide!==!0||n.props.includeHidden)}),m,ole));var E=S.length>0;return A.createElement(Yse,{allowEscapeViewBox:a,animationDuration:s,animationEasing:l,isAnimationActive:f,active:o,coordinate:u,hasPayload:E,offset:h,position:y,reverseDirection:w,useTranslate3d:b,viewBox:g,wrapperStyle:_},ale(c,WP(WP({},this.props),{},{payload:S})))}}])}(x.PureComponent);oS(wn,"displayName","Tooltip");oS(wn,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!Oi.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var sle=ri,lle=function(){return sle.Date.now()},cle=lle,ule=/\s/;function dle(e){for(var t=e.length;t--&&ule.test(e.charAt(t)););return t}var fle=dle,hle=fle,ple=/^\s+/;function mle(e){return e&&e.slice(0,hle(e)+1).replace(ple,"")}var vle=mle,gle=vle,HP=Zo,yle=vc,qP=NaN,ble=/^[-+]0x[0-9a-f]+$/i,wle=/^0b[01]+$/i,xle=/^0o[0-7]+$/i,Sle=parseInt;function _le(e){if(typeof e=="number")return e;if(yle(e))return qP;if(HP(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=HP(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=gle(e);var r=wle.test(e);return r||xle.test(e)?Sle(e.slice(2),r?2:8):ble.test(e)?qP:+e}var Q2=_le,Ele=Zo,yy=cle,VP=Q2,Ole="Expected a function",Ple=Math.max,Tle=Math.min;function Ale(e,t,r){var n,i,o,a,s,l,c=0,u=!1,d=!1,f=!0;if(typeof e!="function")throw new TypeError(Ole);t=VP(t)||0,Ele(r)&&(u=!!r.leading,d="maxWait"in r,o=d?Ple(VP(r.maxWait)||0,t):o,f="trailing"in r?!!r.trailing:f);function h(E){var O=n,P=i;return n=i=void 0,c=E,a=e.apply(P,O),a}function v(E){return c=E,s=setTimeout(w,t),u?h(E):a}function m(E){var O=E-l,P=E-c,T=t-O;return d?Tle(T,o-P):T}function y(E){var O=E-l,P=E-c;return l===void 0||O>=t||O<0||d&&P>=o}function w(){var E=yy();if(y(E))return b(E);s=setTimeout(w,m(E))}function b(E){return s=void 0,f&&n?h(E):(n=i=void 0,a)}function g(){s!==void 0&&clearTimeout(s),c=0,n=l=i=s=void 0}function _(){return s===void 0?a:b(yy())}function S(){var E=yy(),O=y(E);if(n=arguments,i=this,l=E,O){if(s===void 0)return v(l);if(d)return clearTimeout(s),s=setTimeout(w,t),h(l)}return s===void 0&&(s=setTimeout(w,t)),a}return S.cancel=g,S.flush=_,S}var Cle=Ale,jle=Cle,kle=Zo,Nle="Expected a function";function Rle(e,t,r){var n=!0,i=!0;if(typeof e!="function")throw new TypeError(Nle);return kle(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),jle(e,t,{leading:n,maxWait:t,trailing:i})}var $le=Rle;const J2=Ue($le);function ad(e){"@babel/helpers - typeof";return ad=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ad(e)}function KP(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 ih(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?KP(Object(r),!0).forEach(function(n){Mle(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):KP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Mle(e,t,r){return t=Ile(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ile(e){var t=Dle(e,"string");return ad(t)=="symbol"?t:t+""}function Dle(e,t){if(ad(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(ad(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Lle(e,t){return zle(e)||Ule(e,t)||Fle(e,t)||Ble()}function Ble(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
308In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Fle(e,t){if(e){if(typeof e=="string")return GP(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 GP(e,t)}}function GP(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Ule(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,o,a,s=[],l=!0,c=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(l=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(u){c=!0,i=u}finally{try{if(!l&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}function zle(e){if(Array.isArray(e))return e}var Z2=x.forwardRef(function(e,t){var r=e.aspect,n=e.initialDimension,i=n===void 0?{width:-1,height:-1}:n,o=e.width,a=o===void 0?"100%":o,s=e.height,l=s===void 0?"100%":s,c=e.minWidth,u=c===void 0?0:c,d=e.minHeight,f=e.maxHeight,h=e.children,v=e.debounce,m=v===void 0?0:v,y=e.id,w=e.className,b=e.onResize,g=e.style,_=g===void 0?{}:g,S=x.useRef(null),E=x.useRef();E.current=b,x.useImperativeHandle(t,function(){return Object.defineProperty(S.current,"current",{get:function(){return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),S.current},configurable:!0})});var O=x.useState({containerWidth:i.width,containerHeight:i.height}),P=Lle(O,2),T=P[0],j=P[1],C=x.useCallback(function(L,M){j(function(N){var D=Math.round(L),B=Math.round(M);return N.containerWidth===D&&N.containerHeight===B?N:{containerWidth:D,containerHeight:B}})},[]);x.useEffect(function(){var L=function(I){var U,H=I[0].contentRect,z=H.width,K=H.height;C(z,K),(U=E.current)===null||U===void 0||U.call(E,z,K)};m>0&&(L=J2(L,m,{trailing:!0,leading:!1}));var M=new ResizeObserver(L),N=S.current.getBoundingClientRect(),D=N.width,B=N.height;return C(D,B),M.observe(S.current),function(){M.disconnect()}},[C,m]);var k=x.useMemo(function(){var L=T.containerWidth,M=T.containerHeight;if(L<0||M<0)return null;Ei(xa(a)||xa(l),`The width(%s) and height(%s) are both fixed numbers,
309       maybe you don't need to use a ResponsiveContainer.`,a,l),Ei(!r||r>0,"The aspect(%s) must be greater than zero.",r);var N=xa(a)?L:a,D=xa(l)?M:l;r&&r>0&&(N?D=N/r:D&&(N=D*r),f&&D>f&&(D=f)),Ei(N>0||D>0,`The width(%s) and height(%s) of chart should be greater than 0,
310       please check the style of container, or the props width(%s) and height(%s),
311       or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
312       height and width.`,N,D,a,l,u,d,r);var B=!Array.isArray(h)&&_i(h.type).endsWith("Chart");return A.Children.map(h,function($){return A.isValidElement($)?x.cloneElement($,ih({width:N,height:D},B?{style:ih({height:"100%",width:"100%",maxHeight:D,maxWidth:N},$.props.style)}:{})):$})},[r,h,l,f,d,u,T,a]);return A.createElement("div",{id:y?"".concat(y):void 0,className:Ce("recharts-responsive-container",w),style:ih(ih({},_),{},{width:a,height:l,minWidth:u,minHeight:d,maxHeight:f}),ref:S},k)}),eD=function(t){return null};eD.displayName="Cell";function sd(e){"@babel/helpers - typeof";return sd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},sd(e)}function YP(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 Xb(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?YP(Object(r),!0).forEach(function(n){Wle(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):YP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Wle(e,t,r){return t=Hle(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Hle(e){var t=qle(e,"string");return sd(t)=="symbol"?t:t+""}function qle(e,t){if(sd(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(sd(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var As={widthCache:{},cacheCount:0},Vle=2e3,Kle={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},XP="recharts_measurement_span";function Gle(e){var t=Xb({},e);return Object.keys(t).forEach(function(r){t[r]||delete t[r]}),t}var bu=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||Oi.isSsr)return{width:0,height:0};var n=Gle(r),i=JSON.stringify({text:t,copyStyle:n});if(As.widthCache[i])return As.widthCache[i];try{var o=document.getElementById(XP);o||(o=document.createElement("span"),o.setAttribute("id",XP),o.setAttribute("aria-hidden","true"),document.body.appendChild(o));var a=Xb(Xb({},Kle),n);Object.assign(o.style,a),o.textContent="".concat(t);var s=o.getBoundingClientRect(),l={width:s.width,height:s.height};return As.widthCache[i]=l,++As.cacheCount>Vle&&(As.cacheCount=0,As.widthCache={}),l}catch{return{width:0,height:0}}},Yle=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};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 Wp(e,t){return Zle(e)||Jle(e,t)||Qle(e,t)||Xle()}function Xle(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
313In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Qle(e,t){if(e){if(typeof e=="string")return QP(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 QP(e,t)}}function QP(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 Jle(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,o,a,s=[],l=!0,c=!1;try{if(o=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(u){c=!0,i=u}finally{try{if(!l&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}function Zle(e){if(Array.isArray(e))return e}function ece(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function JP(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,rce(n.key),n)}}function tce(e,t,r){return t&&JP(e.prototype,t),r&&JP(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function rce(e){var t=nce(e,"string");return ld(t)=="symbol"?t:t+""}function nce(e,t){if(ld(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ld(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var ZP=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,eT=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,ice=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,oce=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,tD={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},ace=Object.keys(tD),Ys="NaN";function sce(e,t){return e*tD[t]}var oh=function(){function e(t,r){ece(this,e),this.num=t,this.unit=r,this.num=t,this.unit=r,Number.isNaN(t)&&(this.unit=""),r!==""&&!ice.test(r)&&(this.num=NaN,this.unit=""),ace.includes(r)&&(this.num=sce(t,r),this.unit="px")}return tce(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=oce.exec(r))!==null&&n!==void 0?n:[],o=Wp(i,3),a=o[1],s=o[2];return new e(parseFloat(a),s??"")}}])}();function rD(e){if(e.includes(Ys))return Ys;for(var t=e;t.includes("*")||t.includes("/");){var r,n=(r=ZP.exec(t))!==null&&r!==void 0?r:[],i=Wp(n,4),o=i[1],a=i[2],s=i[3],l=oh.parse(o??""),c=oh.parse(s??""),u=a==="*"?l.multiply(c):l.divide(c);if(u.isNaN())return Ys;t=t.replace(ZP,u.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var d,f=(d=eT.exec(t))!==null&&d!==void 0?d:[],h=Wp(f,4),v=h[1],m=h[2],y=h[3],w=oh.parse(v??""),b=oh.parse(y??""),g=m==="+"?w.add(b):w.subtract(b);if(g.isNaN())return Ys;t=t.replace(eT,g.toString())}return t}var tT=/\(([^()]*)\)/;function lce(e){for(var t=e;t.includes("(");){var r=tT.exec(t),n=Wp(r,2),i=n[1];t=t.replace(tT,rD(i))}return t}function cce(e){var t=e.replace(/\s+/g,"");return t=lce(t),t=rD(t),t}function uce(e){try{return cce(e)}catch{return Ys}}function by(e){var t=uce(e.slice(5,-1));return t===Ys?"":t}var dce=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],fce=["dx","dy","angle","className","breakAll"];function Qb(){return Qb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];
313for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Qb.apply(this,arguments)}function rT(e,t){if(e==null)return{};var r=hce(e,t),n,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)n=o[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function hce(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 nT(e,t){return gce(e)||vce(e,t)||mce(e,t)||pce()}function pce(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
314In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function mce(e,t){if(e){if(typeof e=="string")return iT(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 iT(e,t)}}function iT(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 vce(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,o,a,s=[],l=!0,c=!1;try{if(o=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(u){c=!0,i=u}finally{try{if(!l&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}function gce(e){if(Array.isArray(e))return e}var nD=/[ \f\n\r\t\v\u2028\u2029]+/,iD=function(t){var r=t.children,n=t.breakAll,i=t.style;try{var o=[];Se(r)||(n?o=r.toString().split(""):o=r.toString().split(nD));var a=o.map(function(l){return{word:l,width:bu(l,i).width}}),s=n?0:bu(" ",i).width;return{wordsWithComputedWidth:a,spaceWidth:s}}catch{return null}},yce=function(t,r,n,i,o){var a=t.maxLines,s=t.children,l=t.style,c=t.breakAll,u=G(a),d=s,f=function(){var N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return N.reduce(function(D,B){var $=B.word,I=B.width,U=D[D.length-1];if(U&&(i==null||o||U.width+I+n<Number(i)))U.words.push($),U.width+=I+n;else{var H={words:[$],width:I};D.push(H)}return D},[])},h=f(r),v=function(N){return N.reduce(function(D,B){return D.width>B.width?D:B})};if(!u)return h;for(var m="…",y=function(N){var D=d.slice(0,N),B=iD({breakAll:c,style:l,children:D+m}).wordsWithComputedWidth,$=f(B),I=$.length>a||v($).width>Number(i);return[I,$]},w=0,b=d.length-1,g=0,_;w<=b&&g<=d.length-1;){var S=Math.floor((w+b)/2),E=S-1,O=y(E),P=nT(O,2),T=P[0],j=P[1],C=y(S),k=nT(C,1),L=k[0];if(!T&&!L&&(w=S+1),T&&L&&(b=S-1),!T&&L){_=j;break}g++}return _||h},oT=function(t){var r=Se(t)?[]:t.toString().split(nD);return[{words:r}]},bce=function(t){var r=t.width,n=t.scaleToFit,i=t.children,o=t.style,a=t.breakAll,s=t.maxLines;if((r||n)&&!Oi.isSsr){var l,c,u=iD({breakAll:a,children:i,style:o});if(u){var d=u.wordsWithComputedWidth,f=u.spaceWidth;l=d,c=f}else return oT(i);return yce({breakAll:a,children:i,maxLines:s,style:o},l,c,r,n)}return oT(i)},aT="#808080",Hp=function(t){var r=t.x,n=r===void 0?0:r,i=t.y,o=i===void 0?0:i,a=t.lineHeight,s=a===void 0?"1em":a,l=t.capHeight,c=l===void 0?"0.71em":l,u=t.scaleToFit,d=u===void 0?!1:u,f=t.textAnchor,h=f===void 0?"start":f,v=t.verticalAnchor,m=v===void 0?"end":v,y=t.fill,w=y===void 0?aT:y,b=rT(t,dce),g=x.useMemo(function(){return bce({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]),_=b.dx,S=b.dy,E=b.angle,O=b.className,P=b.breakAll,T=rT(b,fce);if(!Ot(n)||!Ot(o))return null;var j=n+(G(_)?_:0),C=o+(G(S)?S:0),k;switch(m){case"start":k=by("calc(".concat(c,")"));break;case"middle":k=by("calc(".concat((g.length-1)/2," * -").concat(s," + (").concat(c," / 2))"));break;default:k=by("calc(".concat(g.length-1," * -").concat(s,")"));break}var L=[];if(d){var M=g[0].width,N=b.width;L.push("scale(".concat((G(N)?N/M:1)/M,")"))}return E&&L.push("rotate(".concat(E,", ").concat(j,", ").concat(C,")")),L.length&&(T.transform=L.join(" ")),A.createElement("text",Qb({},Ae(T,!0),{x:j,y:C,className:Ce("recharts-text",O),textAnchor:h,fill:w.includes("url")?aT:w}),g.map(function(D,B){var $=D.words.join(P?"":" ");return A.createElement("tspan",{x:j,dy:B===0?k:s,key:"".concat($,"-").concat(B)},$)}))};function Mo(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function wce(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function aS(e){let t,r,n;e.length!==2?(t=Mo,r=(s,l)=>Mo(e(s),l),n=(s,l)=>e(s)-l):(t=e===Mo||e===wce?e:xce,r=e,n=e);function i(s,l,c=0,u=s.length){if(c<u){if(t(l,l)!==0)return u;do{const d=c+u>>>1;r(s[d],l)<0?c=d+1:u=d}while(c<u)}return c}function o(s,l,c=0,u=s.length){if(c<u){if(t(l,l)!==0)return u;do{const d=c+u>>>1;r(s[d],l)<=0?c=d+1:u=d}while(c<u)}return c}function a(s,l,c=0,u=s.length){const d=i(s,l,c,u-1);return d>c&&n(s[d-1],l)>-n(s[d],l)?d-1:d}return{left:i,center:a,right:o}}function xce(){return 0}function oD(e){return e===null?NaN:+e}function*Sce(e,t){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const _ce=aS(Mo),sf=_ce.right;aS(oD).center;class sT extends Map{constructor(t,r=Pce){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(const[n,i]of t)this.set(n,i)}
314get(t){return super.get(lT(this,t))}has(t){return super.has(lT(this,t))}set(t,r){return super.set(Ece(this,t),r)}delete(t){return super.delete(Oce(this,t))}}function lT({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function Ece({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function Oce({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function Pce(e){return e!==null&&typeof e=="object"?e.valueOf():e}function Tce(e=Mo){if(e===Mo)return aD;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 aD(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const Ace=Math.sqrt(50),Cce=Math.sqrt(10),jce=Math.sqrt(2);function qp(e,t,r){const n=(t-e)/Math.max(0,r),i=Math.floor(Math.log10(n)),o=n/Math.pow(10,i),a=o>=Ace?10:o>=Cce?5:o>=jce?2:1;let s,l,c;return i<0?(c=Math.pow(10,-i)/a,s=Math.round(e*c),l=Math.round(t*c),s/c<e&&++s,l/c>t&&--l,c=-c):(c=Math.pow(10,i)*a,s=Math.round(e/c),l=Math.round(t/c),s*c<e&&++s,l*c>t&&--l),l<s&&.5<=r&&r<2?qp(e,t,r*2):[s,l,c]}function Jb(e,t,r){if(t=+t,e=+e,r=+r,!(r>0))return[];if(e===t)return[e];const n=t<e,[i,o,a]=n?qp(t,e,r):qp(e,t,r);if(!(o>=i))return[];const s=o-i+1,l=new Array(s);if(n)if(a<0)for(let c=0;c<s;++c)l[c]=(o-c)/-a;else for(let c=0;c<s;++c)l[c]=(o-c)*a;else if(a<0)for(let c=0;c<s;++c)l[c]=(i+c)/-a;else for(let c=0;c<s;++c)l[c]=(i+c)*a;return l}function Zb(e,t,r){return t=+t,e=+e,r=+r,qp(e,t,r)[2]}function ew(e,t,r){t=+t,e=+e,r=+r;const n=t<e,i=n?Zb(t,e,r):Zb(e,t,r);return(n?-1:1)*(i<0?1/-i:i)}function cT(e,t){let r;for(const n of e)n!=null&&(r<n||r===void 0&&n>=n)&&(r=n);return r}function uT(e,t){let r;for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);return r}function sD(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?aD:Tce(i);n>r;){if(n-r>600){const l=n-r+1,c=t-r+1,u=Math.log(l),d=.5*Math.exp(2*u/3),f=.5*Math.sqrt(u*d*(l-d)/l)*(c-l/2<0?-1:1),h=Math.max(r,Math.floor(t-c*d/l+f)),v=Math.min(n,Math.floor(t+(l-c)*d/l+f));sD(e,t,h,v,i)}const o=e[t];let a=r,s=n;for(Wc(e,r,t),i(e[n],o)>0&&Wc(e,r,n);a<s;){for(Wc(e,a,s),++a,--s;i(e[a],o)<0;)++a;for(;i(e[s],o)>0;)--s}i(e[r],o)===0?Wc(e,r,s):(++s,Wc(e,s,n)),s<=t&&(r=s+1),t<=s&&(n=s-1)}return e}function Wc(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function kce(e,t,r){if(e=Float64Array.from(Sce(e)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return uT(e);if(t>=1)return cT(e);var n,i=(n-1)*t,o=Math.floor(i),a=cT(sD(e,o).subarray(0,o+1)),s=uT(e.subarray(o+1));return a+(s-a)*(i-o)}}function Nce(e,t,r=oD){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,o=Math.floor(i),a=+r(e[o],o,e),s=+r(e[o+1],o+1,e);return a+(s-a)*(i-o)}}function Rce(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,o=new Array(i);++n<i;)o[n]=e+n*r;return o}function on(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function Hi(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 tw=Symbol("implicit");function sS(){var e=new sT,t=[],r=[],n=tw;function i(o){let a=e.get(o);if(a===void 0){if(n!==tw)return n;e.set(o,a=t.push(o)-1)}return r[a%r.length]}return i.domain=function(o){if(!arguments.length)return t.slice();t=[],e=new sT;for(const a of o)e.has(a)||e.set(a,t.push(a)-1);return i},i.range=function(o){return arguments.length?(r=Array.from(o),i):r.slice()},i.unknown=function(o){return arguments.length?(n=o,i):n},i.copy=function(){return sS(t,r).unknown(n)},on.apply(i,arguments),i}function cd(){var e=sS().unknown(void 0),t=e.domain,r=e.range,n=0,i=1,o,a,s=!1,l=0,c=0,u=.5;delete e.unknown;function d(){var f=t().length,h=i<n,v=h?i:n,m=h?n:i;o=(m-v)/Math.max(1,f-l+c*2),s&&(o=Math.floor(o)),v+=(m-v-o*(f-l))*u,a=o*(1-l),s&&(v=Math.round(v),a=Math.round(a));var y=Rce(f).map(function(w){return v+o*w});return r(h?y.reverse():y)}return e.domain=function(f){return arguments.length?(t(f),d()):t()},e.range=function(f){return arguments.length?([n,i]=f,n=+n,i=+i,d()):[n,i]},e.rangeRound=function(f){return[n,i]=f,n=+n,i=+i,s=!0,d()},e.bandwidth=function(){return a},e.step=function(){return o},e.round=function(f){return arguments.length?(s=!!f,d()):s},e.padding=function(f){return arguments.length?(l=Math.min(1,c=+f),d()):l},e.paddingInner=function(f){return arguments.length?(l=Math.min(1,f),d()):l},e.paddingOuter=function(f){return arguments.length?(c=+f,d()):c},e.align=function(f){return arguments.length?(u=Math.max(0,Math.min(1,f)),d()):u},e.copy=function(){return cd(t(),[n,i]).round(s).paddingInner(l).paddingOuter(c).align(u)},on.apply(d(),arguments)}function lD(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return lD(t())},e}function wu(){return lD(cd.apply(null,arguments).paddingInner(1))}function lS(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function cD(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function lf(){}var ud=.7,Vp=1/ud,dl="\\s*([+-]?\\d+)\\s*",dd="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Xn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",$ce=/^#([0-9a-f]{3,8})$/,Mce=new RegExp(`^rgb\\(${dl},${dl},${dl}\\)$`),Ice=new RegExp(`^rgb\\(${Xn},${Xn},${Xn}\\)$`),Dce=new RegExp(`^rgba\\(${dl},${dl},${dl},${dd}\\)$`),Lce=new RegExp(`^rgba\\(${Xn},${Xn},${Xn},${dd}\\)$`),Bce=new RegExp(`^hsl\\(${dd},${Xn},${Xn}\\)$`),Fce=new RegExp(`^hsla\\(${dd},${Xn},${Xn},${dd}\\)$`),dT={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};lS(lf,fd,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:fT,formatHex:fT,formatHex8:Uce,formatHsl:zce,formatRgb:hT,toString:hT});function fT(){return this.rgb().formatHex()}function Uce(){return this.rgb().formatHex8()}function zce(){return uD(this).formatHsl()}function hT(){return this.rgb().formatRgb()}function fd(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=$ce.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?pT(t):r===3?new fr(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?ah(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?ah(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=Mce.exec(e))?new fr(t[1],t[2],t[3],1):(t=Ice.exec(e))?new fr(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Dce.exec(e))?ah(t[1],t[2],t[3],t[4]):(t=Lce.exec(e))?ah(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Bce.exec(e))?gT(t[1],t[2]/100,t[3]/100,1):(t=Fce.exec(e))?gT(t[1],t[2]/100,t[3]/100,t[4]):dT.hasOwnProperty(e)?pT(dT[e]):e==="transparent"?new fr(NaN,NaN,NaN,0):null}function pT(e){return new fr(e>>16&255,e>>8&255,e&255,1)}function ah(e,t,r,n){return n<=0&&(e=t=r=NaN),new fr(e,t,r,n)}function Wce(e){return e instanceof lf||(e=fd(e)),e?(e=e.rgb(),new fr(e.r,e.g,e.b,e.opacity)):new fr}function rw(e,t,r,n){return arguments.length===1?Wce(e):new fr(e,t,r,n??1)}function fr(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}lS(fr,rw,cD(lf,{brighter(e){return e=e==null?Vp:Math.pow(Vp,e),new fr(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?ud:Math.pow(ud,e),new fr(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new fr(Da(this.r),Da(this.g),Da(this.b),Kp(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:mT,formatHex:mT,formatHex8:Hce,formatRgb:vT,toString:vT}));function mT(){return`#${Sa(this.r)}${Sa(this.g)}${Sa(this.b)}`}function Hce(){return`#${Sa(this.r)}${Sa(this.g)}${Sa(this.b)}${Sa((isNaN(this.opacity)?1:this.opacity)*255)}`}function vT(){const e=Kp(this.opacity);return`${e===1?"rgb(":"rgba("}${Da(this.r)}, ${Da(this.g)}, ${Da(this.b)}${e===1?")":`, ${e})`}`}function Kp(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Da(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Sa(e){return e=Da(e),(e<16?"0":"")+e.toString(16)}function gT(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new On(e,t,r,n)}function uD(e){if(e instanceof On)return new On(e.h,e.s,e.l,e.opacity);if(e instanceof lf||(e=fd(e)),!e)return new On;if(e instanceof On)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),o=Math.max(t,r,n),a=NaN,s=o-i,l=(o+i)/2;return s?(t===o?a=(r-n)/s+(r<n)*6:r===o?a=(n-t)/s+2:a=(t-r)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new On(a,s,l,e.opacity)}function qce(e,t,r,n){return arguments.length===1?uD(e):new On(e,t,r,n??1)}function On(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}lS(On,qce,cD(lf,{brighter(e){return e=e==null?Vp:Math.pow(Vp,e),new On(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?ud:Math.pow(ud,e),new On(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 fr(wy(e>=240?e-240:e+120,i,n),wy(e,i,n),wy(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new On(yT(this.h),sh(this.s),sh(this.l),Kp(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=Kp(this.opacity);return`${e===1?"hsl(":"hsla("}${yT(this.h)}, ${sh(this.s)*100}%, ${sh(this.l)*100}%${e===1?")":`, ${e})`}`}}));function yT(e){return e=(e||0)%360,e<0?e+360:e}function sh(e){return Math.max(0,Math.min(1,e||0))}function wy(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 cS=e=>()=>e;function Vce(e,t){return function(r){return e+r*t}}function Kce(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 Gce(e){return(e=+e)==1?dD:function(t,r){return r-t?Kce(t,r,e):cS(isNaN(t)?r:t)}}function dD(e,t){var r=t-e;return r?Vce(e,r):cS(isNaN(e)?t:e)}const bT=function e(t){var r=Gce(t);function n(i,o){var a=r((i=rw(i)).r,(o=rw(o)).r),s=r(i.g,o.g),l=r(i.b,o.b),c=dD(i.opacity,o.opacity);return function(u){return i.r=a(u),i.g=s(u),i.b=l(u),i.opacity=c(u),i+""}}return n.gamma=e,n}(1);function Yce(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),i;return function(o){for(i=0;i<r;++i)n[i]=e[i]*(1-o)+t[i]*o;return n}}function Xce(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Qce(e,t){var r=t?t.length:0,n=e?Math.min(r,e.length):0,i=new Array(n),o=new Array(r),a;for(a=0;a<n;++a)i[a]=Ec(e[a],t[a]);for(;a<r;++a)o[a]=t[a];return function(s){for(a=0;a<n;++a)o[a]=i[a](s);return o}}
vendor: 5,442 bytes, line 314
314function Jce(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}function Gp(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function Zce(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]=Ec(e[i],t[i]):n[i]=t[i];return function(o){for(i in r)n[i]=r[i](o);return n}}var nw=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,xy=new RegExp(nw.source,"g");function eue(e){return function(){return e}}function tue(e){return function(t){return e(t)+""}}function rue(e,t){var r=nw.lastIndex=xy.lastIndex=0,n,i,o,a=-1,s=[],l=[];for(e=e+"",t=t+"";(n=nw.exec(e))&&(i=xy.exec(t));)(o=i.index)>r&&(o=t.slice(r,o),s[a]?s[a]+=o:s[++a]=o),(n=n[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,l.push({i:a,x:Gp(n,i)})),r=xy.lastIndex;return r<t.length&&(o=t.slice(r),s[a]?s[a]+=o:s[++a]=o),s.length<2?l[0]?tue(l[0].x):eue(t):(t=l.length,function(c){for(var u=0,d;u<t;++u)s[(d=l[u]).i]=d.x(c);return s.join("")})}function Ec(e,t){var r=typeof t,n;return t==null||r==="boolean"?cS(t):(r==="number"?Gp:r==="string"?(n=fd(t))?(t=n,bT):rue:t instanceof fd?bT:t instanceof Date?Jce:Xce(t)?Yce:Array.isArray(t)?Qce:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?Zce:Gp)(e,t)}function uS(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}function nue(e,t){t===void 0&&(t=e,e=Ec);for(var r=0,n=t.length-1,i=t[0],o=new Array(n<0?0:n);r<n;)o[r]=e(i,i=t[++r]);return function(a){var s=Math.max(0,Math.min(n-1,Math.floor(a*=n)));return o[s](a-s)}}function iue(e){return function(){return e}}function Yp(e){return+e}var wT=[0,1];function Zt(e){return e}function iw(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:iue(isNaN(t)?NaN:.5)}function oue(e,t){var r;return e>t&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function aue(e,t,r){var n=e[0],i=e[1],o=t[0],a=t[1];return i<n?(n=iw(i,n),o=r(a,o)):(n=iw(n,i),o=r(o,a)),function(s){return o(n(s))}}function sue(e,t,r){var n=Math.min(e.length,t.length)-1,i=new Array(n),o=new Array(n),a=-1;for(e[n]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<n;)i[a]=iw(e[a],e[a+1]),o[a]=r(t[a],t[a+1]);return function(s){var l=sf(e,s,1,n)-1;return o[l](i[l](s))}}function cf(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function qv(){var e=wT,t=wT,r=Ec,n,i,o,a=Zt,s,l,c;function u(){var f=Math.min(e.length,t.length);return a!==Zt&&(a=oue(e[0],e[f-1])),s=f>2?sue:aue,l=c=null,d}function d(f){return f==null||isNaN(f=+f)?o:(l||(l=s(e.map(n),t,r)))(n(a(f)))}return d.invert=function(f){return a(i((c||(c=s(t,e.map(n),Gp)))(f)))},d.domain=function(f){return arguments.length?(e=Array.from(f,Yp),u()):e.slice()},d.range=function(f){return arguments.length?(t=Array.from(f),u()):t.slice()},d.rangeRound=function(f){return t=Array.from(f),r=uS,u()},d.clamp=function(f){return arguments.length?(a=f?!0:Zt,u()):a!==Zt},d.interpolate=function(f){return arguments.length?(r=f,u()):r},d.unknown=function(f){return arguments.length?(o=f,d):o},function(f,h){return n=f,i=h,u()}}function dS(){return qv()(Zt,Zt)}function lue(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Xp(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 zl(e){return e=Xp(Math.abs(e)),e?e[1]:NaN}function cue(e,t){return function(r,n){for(var i=r.length,o=[],a=0,s=e[0],l=0;i>0&&s>0&&(l+s+1>n&&(s=Math.max(1,n-l)),o.push(r.substring(i-=s,i+s)),!((l+=s+1)>n));)s=e[a=(a+1)%e.length];return o.reverse().join(t)}}function uue(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var due=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function hd(e){if(!(t=due.exec(e)))throw new Error("invalid format: "+e);var t;return new fS({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]})}hd.prototype=fS.prototype;function fS(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+""}fS.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 fue(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 fD;function hue(e,t){var r=Xp(e,t);if(!r)return e+"";var n=r[0],i=r[1],o=i-(fD=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,a=n.length;return o===a?n:o>a?n+new Array(o-a+1).join("0"):o>0?n.slice(0,o)+"."+n.slice(o):"0."+new Array(1-o).join("0")+Xp(e,Math.max(0,t+o-1))[0]}function xT(e,t){var r=Xp(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 ST={"%":(e,t)=>
vendor: 5,608 bytes, line 314
314(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:lue,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)=>xT(e*100,t),r:xT,s:hue,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function _T(e){return e}var ET=Array.prototype.map,OT=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function pue(e){var t=e.grouping===void 0||e.thousands===void 0?_T:cue(ET.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+"",o=e.numerals===void 0?_T:uue(ET.call(e.numerals,String)),a=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"−":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function c(d){d=hd(d);var f=d.fill,h=d.align,v=d.sign,m=d.symbol,y=d.zero,w=d.width,b=d.comma,g=d.precision,_=d.trim,S=d.type;S==="n"?(b=!0,S="g"):ST[S]||(g===void 0&&(g=12),_=!0,S="g"),(y||f==="0"&&h==="=")&&(y=!0,f="0",h="=");var E=m==="$"?r:m==="#"&&/[boxX]/.test(S)?"0"+S.toLowerCase():"",O=m==="$"?n:/[%p]/.test(S)?a:"",P=ST[S],T=/[defgprs%]/.test(S);g=g===void 0?6:/[gprs]/.test(S)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g));function j(C){var k=E,L=O,M,N,D;if(S==="c")L=P(C)+L,C="";else{C=+C;var B=C<0||1/C<0;if(C=isNaN(C)?l:P(Math.abs(C),g),_&&(C=fue(C)),B&&+C==0&&v!=="+"&&(B=!1),k=(B?v==="("?v:s:v==="-"||v==="("?"":v)+k,L=(S==="s"?OT[8+fD/3]:"")+L+(B&&v==="("?")":""),T){for(M=-1,N=C.length;++M<N;)if(D=C.charCodeAt(M),48>D||D>57){L=(D===46?i+C.slice(M+1):C.slice(M))+L,C=C.slice(0,M);break}}}b&&!y&&(C=t(C,1/0));var $=k.length+C.length+L.length,I=$<w?new Array(w-$+1).join(f):"";switch(b&&y&&(C=t(I+C,I.length?w-L.length:1/0),I=""),h){case"<":C=k+C+L+I;break;case"=":C=k+I+C+L;break;case"^":C=I.slice(0,$=I.length>>1)+k+C+L+I.slice($);break;default:C=I+k+C+L;break}return o(C)}return j.toString=function(){return d+""},j}function u(d,f){var h=c((d=hd(d),d.type="f",d)),v=Math.max(-8,Math.min(8,Math.floor(zl(f)/3)))*3,m=Math.pow(10,-v),y=OT[8+v/3];return function(w){return h(m*w)+y}}return{format:c,formatPrefix:u}}var lh,hS,hD;mue({thousands:",",grouping:[3],currency:["$",""]});function mue(e){return lh=pue(e),hS=lh.format,hD=lh.formatPrefix,lh}function vue(e){return Math.max(0,-zl(Math.abs(e)))}function gue(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(zl(t)/3)))*3-zl(Math.abs(e)))}function yue(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,zl(t)-zl(e))+1}function pD(e,t,r,n){var i=ew(e,t,r),o;switch(n=hd(n??",f"),n.type){case"s":{var a=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(o=gue(i,a))&&(n.precision=o),hD(n,a)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(o=yue(i,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=o-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(o=vue(i))&&(n.precision=o-(n.type==="%")*2);break}}return hS(n)}function ta(e){var t=e.domain;return e.ticks=function(r){var n=t();return Jb(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var i=t();return pD(i[0],i[i.length-1],r??10,n)},e.nice=function(r){r==null&&(r=10);var n=t(),i=0,o=n.length-1,a=n[i],s=n[o],l,c,u=10;for(s<a&&(c=a,a=s,s=c,c=i,i=o,o=c);u-- >0;){if(c=Zb(a,s,r),c===l)return n[i]=a,n[o]=s,t(n);if(c>0)a=Math.floor(a/c)*c,s=Math.ceil(s/c)*c;else if(c<0)a=Math.ceil(a*c)/c,s=Math.floor(s*c)/c;else break;l=c}return e},e}function Qp(){var e=dS();return e.copy=function(){return cf(e,Qp())},on.apply(e,arguments),ta(e)}function mD(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,Yp),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return mD(e).unknown(t)},e=arguments.length?Array.from(e,Yp):[0,1],ta(r)}function vD(e,t){e=e.slice();var r=0,n=e.length-1,i=e[r],o=e[n],a;return o<i&&(a=r,r=n,n=a,a=i,i=o,o=a),e[r]=t.floor(i),e[n]=t.ceil(o),e}function PT(e){return Math.log(e)}function TT(e){return Math.exp(e)}function bue(e){return-Math.log(-e)}function wue(e){return-Math.exp(-e)}function xue(e){return isFinite(e)?+("1e"+e):e<0?0:e}function Sue(e){return e===10?xue:e===Math.E?Math.exp:t=>Math.pow(e,t)}function _ue(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 AT(e){return(t,r)=>-e(-t,r)}function pS(e){const t=e(PT,TT),r=t.domain;let n=10,i,o;function a(){return i=_ue(n),o=Sue(n),r()[0]<0?(i=AT(i),o=AT(o),e(bue,wue)):e(PT,TT),t}return t.base=function(s){return arguments.length?(n=+s,a()):n},t.domain=function(s){return arguments.length?(r(s),a()):r()},t.ticks=s=>{const l=r();let c=l[0],u=l[l.length-1];const d=u<c;d&&([c,u]=[u,c]);let f=i(c),h=i(u),v,m;const y=s==null?10:+s;let w=[];if(!(n%1)&&h-f<y){if(f=Math.floor(f),h=Math.ceil(h),c>0){for(;f<=h;++f)for(v=1;v<n;++v)if(m=f<0?v/o(-f):v*o(f),!(m<c)){if(m>u)break;w.push(m)}}else for(;f<=h;++f)for(v=n-1;v>=1;--v)if(m=f>0?v/o(-f):v*o(f),!(m<c)){if(m>u)break;w.push(m)}w.length*2<y&&(w=Jb(c,u,y))}else w=Jb(f,h,Math.min(h-f,y)).map(o);return d?w.reverse():w},t.tickFormat=(s,l)=>{if(s==null&&(s=10),l==null&&(l=n===10?"s":","),typeof l!="function"&&(!(n%1)&&(l=hd(l)).precision==null&&(l.trim=!0),l=hS(l)),s===1/0)return l;const c=Math.max(1,n*s/t.ticks().length);return u=>{let d=u/o(Math.round(i(u)));return d*n<n-.5&&(d*=n),d<=c?l(u):""}},t.nice=()=>r(vD(r(),{floor:s=>o(Math.floor(i(s))),ceil:s=>o(Math.ceil(i(s)))})),t}function gD(){const e=pS(qv()).domain([1,10]);return e.copy=()=>cf(e,gD()).base(e.base()),on.apply(e,arguments),e}
314function CT(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function jT(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function mS(e){var t=1,r=e(CT(t),jT(t));return r.constant=function(n){return arguments.length?e(CT(t=+n),jT(t)):t},ta(r)}function yD(){var e=mS(qv());return e.copy=function(){return cf(e,yD()).constant(e.constant())},on.apply(e,arguments)}function kT(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function Eue(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function Oue(e){return e<0?-e*e:e*e}function vS(e){var t=e(Zt,Zt),r=1;function n(){return r===1?e(Zt,Zt):r===.5?e(Eue,Oue):e(kT(r),kT(1/r))}return t.exponent=function(i){return arguments.length?(r=+i,n()):r},ta(t)}function gS(){var e=vS(qv());return e.copy=function(){return cf(e,gS()).exponent(e.exponent())},on.apply(e,arguments),e}function Pue(){return gS.apply(null,arguments).exponent(.5)}function NT(e){return Math.sign(e)*e*e}function Tue(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function bD(){var e=dS(),t=[0,1],r=!1,n;function i(o){var a=Tue(e(o));return isNaN(a)?n:r?Math.round(a):a}return i.invert=function(o){return e.invert(NT(o))},i.domain=function(o){return arguments.length?(e.domain(o),i):e.domain()},i.range=function(o){return arguments.length?(e.range((t=Array.from(o,Yp)).map(NT)),i):t.slice()},i.rangeRound=function(o){return i.range(o).round(!0)},i.round=function(o){return arguments.length?(r=!!o,i):r},i.clamp=function(o){return arguments.length?(e.clamp(o),i):e.clamp()},i.unknown=function(o){return arguments.length?(n=o,i):n},i.copy=function(){return bD(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},on.apply(i,arguments),ta(i)}function wD(){var e=[],t=[],r=[],n;function i(){var a=0,s=Math.max(1,t.length);for(r=new Array(s-1);++a<s;)r[a-1]=Nce(e,a/s);return o}function o(a){return a==null||isNaN(a=+a)?n:t[sf(r,a)]}return o.invertExtent=function(a){var s=t.indexOf(a);return s<0?[NaN,NaN]:[s>0?r[s-1]:e[0],s<r.length?r[s]:e[e.length-1]]},o.domain=function(a){if(!arguments.length)return e.slice();e=[];for(let s of a)s!=null&&!isNaN(s=+s)&&e.push(s);return e.sort(Mo),i()},o.range=function(a){return arguments.length?(t=Array.from(a),i()):t.slice()},o.unknown=function(a){return arguments.length?(n=a,o):n},o.quantiles=function(){return r.slice()},o.copy=function(){return wD().domain(e).range(t).unknown(n)},on.apply(o,arguments)}function xD(){var e=0,t=1,r=1,n=[.5],i=[0,1],o;function a(l){return l!=null&&l<=l?i[sf(n,l,0,r)]:o}function s(){var l=-1;for(n=new Array(r);++l<r;)n[l]=((l+1)*t-(l-r)*e)/(r+1);return a}return a.domain=function(l){return arguments.length?([e,t]=l,e=+e,t=+t,s()):[e,t]},a.range=function(l){return arguments.length?(r=(i=Array.from(l)).length-1,s()):i.slice()},a.invertExtent=function(l){var c=i.indexOf(l);return c<0?[NaN,NaN]:c<1?[e,n[0]]:c>=r?[n[r-1],t]:[n[c-1],n[c]]},a.unknown=function(l){return arguments.length&&(o=l),a},a.thresholds=function(){return n.slice()},a.copy=function(){return xD().domain([e,t]).range(i).unknown(o)},on.apply(ta(a),arguments)}function SD(){var e=[.5],t=[0,1],r,n=1;function i(o){return o!=null&&o<=o?t[sf(e,o,0,n)]:r}return i.domain=function(o){return arguments.length?(e=Array.from(o),n=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(o){return arguments.length?(t=Array.from(o),n=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(o){var a=t.indexOf(o);return[e[a-1],e[a]]},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return SD().domain(e).range(t).unknown(r)},on.apply(i,arguments)}const Sy=new Date,_y=new Date;function Tt(e,t,r,n){function i(o){return e(o=arguments.length===0?new Date:new Date(+o)),o}return i.floor=o=>(e(o=new Date(+o)),o),i.ceil=o=>(e(o=new Date(o-1)),t(o,1),e(o),o),i.round=o=>{const a=i(o),s=i.ceil(o);return o-a<s-o?a:s},i.offset=(o,a)=>(t(o=new Date(+o),a==null?1:Math.floor(a)),o),i.range=(o,a,s)=>{const l=[];if(o=i.ceil(o),s=s==null?1:Math.floor(s),!(o<a)||!(s>0))return l;let c;do l.push(c=new Date(+o)),t(o,s),e(o);while(c<o&&o<a);return l},i.filter=o=>Tt(a=>{if(a>=a)for(;e(a),!o(a);)a.setTime(a-1)},(a,s)=>{if(a>=a)if(s<0)for(;++s<=0;)for(;t(a,-1),!o(a););else for(;--s>=0;)for(;t(a,1),!o(a););}),r&&(i.count=(o,a)=>(Sy.setTime(+o),_y.setTime(+a),e(Sy),e(_y),Math.floor(r(Sy,_y))),i.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(n?a=>n(a)%o===0:a=>i.count(0,a)%o===0):i)),i}const Jp=Tt(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Jp.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Tt(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):Jp);Jp.range;const gi=1e3,Gr=gi*60,yi=Gr*60,Ii=yi*24,yS=Ii*7,RT=Ii*30,Ey=Ii*365,_a=Tt(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*gi)},(e,t)=>(t-e)/gi,e=>e.getUTCSeconds());_a.range;const bS=Tt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*gi)},(e,t)=>{e.setTime(+e+t*Gr)},(e,t)=>(t-e)/Gr,e=>e.getMinutes());bS.range;const wS=Tt(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Gr)},(e,t)=>(t-e)/Gr,e=>e.getUTCMinutes());wS.range;const xS=Tt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*gi-e.getMinutes()*Gr)},(e,t)=>{e.setTime(+e+t*yi)},(e,t)=>(t-e)/yi,e=>e.getHours());xS.range;const SS=Tt(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*yi)},(e,t)=>(t-e)/yi,e=>e.getUTCHours());SS.range;const uf=Tt(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Gr)/Ii,e=>e.getDate()-1);uf.range;const Vv=Tt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Ii,e=>e.getUTCDate()-1);Vv.range;const _D=Tt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Ii,e=>Math.floor(e/Ii));_D.range;function ds(e){return Tt(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())*Gr)/yS)}const Kv=ds(0),Zp=ds(1),Aue=ds(2),Cue=ds(3),Wl=ds(4),jue=ds(5),kue=ds(6);Kv.range;Zp.range;Aue.range;Cue.range;Wl.range;jue.range;kue.range;function fs(e){return Tt(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)/yS)}const Gv=fs(0),em=fs(1),Nue=fs(2),Rue=fs(3),Hl=fs(4),$ue=fs(5),Mue=fs(6);Gv.range;em.range;Nue.range;Rue.range;Hl.range;$ue.range;Mue.range;const _S=Tt(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());_S.range;const ES=Tt(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());ES.range;const Di=Tt(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());Di.every=e=>
vendor: 7,332 bytes, line 314
314!isFinite(e=Math.floor(e))||!(e>0)?null:Tt(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)});Di.range;const Li=Tt(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());Li.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Tt(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)});Li.range;function ED(e,t,r,n,i,o){const a=[[_a,1,gi],[_a,5,5*gi],[_a,15,15*gi],[_a,30,30*gi],[o,1,Gr],[o,5,5*Gr],[o,15,15*Gr],[o,30,30*Gr],[i,1,yi],[i,3,3*yi],[i,6,6*yi],[i,12,12*yi],[n,1,Ii],[n,2,2*Ii],[r,1,yS],[t,1,RT],[t,3,3*RT],[e,1,Ey]];function s(c,u,d){const f=u<c;f&&([c,u]=[u,c]);const h=d&&typeof d.range=="function"?d:l(c,u,d),v=h?h.range(c,+u+1):[];return f?v.reverse():v}function l(c,u,d){const f=Math.abs(u-c)/d,h=aS(([,,y])=>y).right(a,f);if(h===a.length)return e.every(ew(c/Ey,u/Ey,d));if(h===0)return Jp.every(Math.max(ew(c,u,d),1));const[v,m]=a[f/a[h-1][2]<a[h][2]/f?h-1:h];return v.every(m)}return[s,l]}const[Iue,Due]=ED(Li,ES,Gv,_D,SS,wS),[Lue,Bue]=ED(Di,_S,Kv,uf,xS,bS);function Oy(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 Py(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 Hc(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function Fue(e){var t=e.dateTime,r=e.date,n=e.time,i=e.periods,o=e.days,a=e.shortDays,s=e.months,l=e.shortMonths,c=qc(i),u=Vc(i),d=qc(o),f=Vc(o),h=qc(a),v=Vc(a),m=qc(s),y=Vc(s),w=qc(l),b=Vc(l),g={a:B,A:$,b:I,B:U,c:null,d:BT,e:BT,f:cde,g:bde,G:xde,H:ade,I:sde,j:lde,L:OD,m:ude,M:dde,p:H,q:z,Q:zT,s:WT,S:fde,u:hde,U:pde,V:mde,w:vde,W:gde,x:null,X:null,y:yde,Y:wde,Z:Sde,"%":UT},_={a:K,A:te,b:fe,B:Ee,c:null,d:FT,e:FT,f:Pde,g:Ide,G:Lde,H:_de,I:Ede,j:Ode,L:TD,m:Tde,M:Ade,p:Y,q:pe,Q:zT,s:WT,S:Cde,u:jde,U:kde,V:Nde,w:Rde,W:$de,x:null,X:null,y:Mde,Y:Dde,Z:Bde,"%":UT},S={a:j,A:C,b:k,B:L,c:M,d:DT,e:DT,f:rde,g:IT,G:MT,H:LT,I:LT,j:Jue,L:tde,m:Que,M:Zue,p:T,q:Xue,Q:ide,s:ode,S:ede,u:que,U:Vue,V:Kue,w:Hue,W:Gue,x:N,X:D,y:IT,Y:MT,Z:Yue,"%":nde};g.x=E(r,g),g.X=E(n,g),g.c=E(t,g),_.x=E(r,_),_.X=E(n,_),_.c=E(t,_);function E(q,Q){return function(X){var F=[],we=-1,he=0,ze=q.length,Le,st,ir;for(X instanceof Date||(X=new Date(+X));++we<ze;)q.charCodeAt(we)===37&&(F.push(q.slice(he,we)),(st=$T[Le=q.charAt(++we)])!=null?Le=q.charAt(++we):st=Le==="e"?" ":"0",(ir=Q[Le])&&(Le=ir(X,st)),F.push(Le),he=we+1);return F.push(q.slice(he,we)),F.join("")}}function O(q,Q){return function(X){var F=Hc(1900,void 0,1),we=P(F,q,X+="",0),he,ze;if(we!=X.length)return null;if("Q"in F)return new Date(F.Q);if("s"in F)return new Date(F.s*1e3+("L"in F?F.L:0));if(Q&&!("Z"in F)&&(F.Z=0),"p"in F&&(F.H=F.H%12+F.p*12),F.m===void 0&&(F.m="q"in F?F.q:0),"V"in F){if(F.V<1||F.V>53)return null;"w"in F||(F.w=1),"Z"in F?(he=Py(Hc(F.y,0,1)),ze=he.getUTCDay(),he=ze>4||ze===0?em.ceil(he):em(he),he=Vv.offset(he,(F.V-1)*7),F.y=he.getUTCFullYear(),F.m=he.getUTCMonth(),F.d=he.getUTCDate()+(F.w+6)%7):(he=Oy(Hc(F.y,0,1)),ze=he.getDay(),he=ze>4||ze===0?Zp.ceil(he):Zp(he),he=uf.offset(he,(F.V-1)*7),F.y=he.getFullYear(),F.m=he.getMonth(),F.d=he.getDate()+(F.w+6)%7)}else("W"in F||"U"in F)&&("w"in F||(F.w="u"in F?F.u%7:"W"in F?1:0),ze="Z"in F?Py(Hc(F.y,0,1)).getUTCDay():Oy(Hc(F.y,0,1)).getDay(),F.m=0,F.d="W"in F?(F.w+6)%7+F.W*7-(ze+5)%7:F.w+F.U*7-(ze+6)%7);return"Z"in F?(F.H+=F.Z/100|0,F.M+=F.Z%100,Py(F)):Oy(F)}}function P(q,Q,X,F){for(var we=0,he=Q.length,ze=X.length,Le,st;we<he;){if(F>=ze)return-1;if(Le=Q.charCodeAt(we++),Le===37){if(Le=Q.charAt(we++),st=S[Le in $T?Q.charAt(we++):Le],!st||(F=st(q,X,F))<0)return-1}else if(Le!=X.charCodeAt(F++))return-1}return F}function T(q,Q,X){var F=c.exec(Q.slice(X));return F?(q.p=u.get(F[0].toLowerCase()),X+F[0].length):-1}function j(q,Q,X){var F=h.exec(Q.slice(X));return F?(q.w=v.get(F[0].toLowerCase()),X+F[0].length):-1}function C(q,Q,X){var F=d.exec(Q.slice(X));return F?(q.w=f.get(F[0].toLowerCase()),X+F[0].length):-1}function k(q,Q,X){var F=w.exec(Q.slice(X));return F?(q.m=b.get(F[0].toLowerCase()),X+F[0].length):-1}function L(q,Q,X){var F=m.exec(Q.slice(X));return F?(q.m=y.get(F[0].toLowerCase()),X+F[0].length):-1}function M(q,Q,X){return P(q,t,Q,X)}function N(q,Q,X){return P(q,r,Q,X)}function D(q,Q,X){return P(q,n,Q,X)}function B(q){return a[q.getDay()]}function $(q){return o[q.getDay()]}function I(q){return l[q.getMonth()]}function U(q){return s[q.getMonth()]}function H(q){return i[+(q.getHours()>=12)]}function z(q){return 1+~~(q.getMonth()/3)}function K(q){return a[q.getUTCDay()]}function te(q){return o[q.getUTCDay()]}function fe(q){return l[q.getUTCMonth()]}function Ee(q){return s[q.getUTCMonth()]}function Y(q){return i[+(q.getUTCHours()>=12)]}function pe(q){return 1+~~(q.getUTCMonth()/3)}return{format:function(q){var Q=E(q+="",g);return Q.toString=function(){return q},Q},parse:function(q){var Q=O(q+="",!1);return Q.toString=function(){return q},Q},utcFormat:function(q){var Q=E(q+="",_);return Q.toString=function(){return q},Q},utcParse:function(q){var Q=O(q+="",!0);return Q.toString=function(){return q},Q}}}var $T={"-":"",_:" ",0:"0"},Nt=/^\s*\d+/,Uue=/^%/,zue=/[\\^$*+?|[\]().{}]/g;function Ne(e,t,r){var n=e<0?"-":"",i=(n?-e:e)+"",o=i.length;return n+(o<r?new Array(r-o+1).join(t)+i:i)}function Wue(e){return e.replace(zue,"\\$&")}function qc(e){return new RegExp("^(?:"+e.map(Wue).join("|")+")","i")}function Vc(e){return new Map(e.map((t,r)=>[t.toLowerCase(),r]))}function Hue(e,t,r){var n=Nt.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function que(e,t,r){var n=Nt.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function Vue(e,t,r){var n=Nt.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function Kue(e,t,r){var n=Nt.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function Gue(e,t,r){var n=Nt.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function MT(e,t,r){var n=Nt.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function IT(e,t,r){var n=Nt.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function Yue(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 Xue(e,t,r){var n=Nt.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function Que(e,t,r){var n=Nt.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function DT(e,t,r){var n=Nt.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function Jue(e,t,r){var n=Nt.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function LT(e,t,r){var n=Nt.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function Zue(e,t,r){var n=Nt.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function ede(e,t,r){var n=Nt.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function tde(e,t,r){var n=Nt.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function rde(e,t,r){var n=Nt.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}
314function nde(e,t,r){var n=Uue.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function ide(e,t,r){var n=Nt.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function ode(e,t,r){var n=Nt.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function BT(e,t){return Ne(e.getDate(),t,2)}function ade(e,t){return Ne(e.getHours(),t,2)}function sde(e,t){return Ne(e.getHours()%12||12,t,2)}function lde(e,t){return Ne(1+uf.count(Di(e),e),t,3)}function OD(e,t){return Ne(e.getMilliseconds(),t,3)}function cde(e,t){return OD(e,t)+"000"}function ude(e,t){return Ne(e.getMonth()+1,t,2)}function dde(e,t){return Ne(e.getMinutes(),t,2)}function fde(e,t){return Ne(e.getSeconds(),t,2)}function hde(e){var t=e.getDay();return t===0?7:t}function pde(e,t){return Ne(Kv.count(Di(e)-1,e),t,2)}function PD(e){var t=e.getDay();return t>=4||t===0?Wl(e):Wl.ceil(e)}function mde(e,t){return e=PD(e),Ne(Wl.count(Di(e),e)+(Di(e).getDay()===4),t,2)}function vde(e){return e.getDay()}function gde(e,t){return Ne(Zp.count(Di(e)-1,e),t,2)}function yde(e,t){return Ne(e.getFullYear()%100,t,2)}function bde(e,t){return e=PD(e),Ne(e.getFullYear()%100,t,2)}function wde(e,t){return Ne(e.getFullYear()%1e4,t,4)}function xde(e,t){var r=e.getDay();return e=r>=4||r===0?Wl(e):Wl.ceil(e),Ne(e.getFullYear()%1e4,t,4)}function Sde(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Ne(t/60|0,"0",2)+Ne(t%60,"0",2)}function FT(e,t){return Ne(e.getUTCDate(),t,2)}function _de(e,t){return Ne(e.getUTCHours(),t,2)}function Ede(e,t){return Ne(e.getUTCHours()%12||12,t,2)}function Ode(e,t){return Ne(1+Vv.count(Li(e),e),t,3)}function TD(e,t){return Ne(e.getUTCMilliseconds(),t,3)}function Pde(e,t){return TD(e,t)+"000"}function Tde(e,t){return Ne(e.getUTCMonth()+1,t,2)}function Ade(e,t){return Ne(e.getUTCMinutes(),t,2)}function Cde(e,t){return Ne(e.getUTCSeconds(),t,2)}function jde(e){var t=e.getUTCDay();return t===0?7:t}function kde(e,t){return Ne(Gv.count(Li(e)-1,e),t,2)}function AD(e){var t=e.getUTCDay();return t>=4||t===0?Hl(e):Hl.ceil(e)}function Nde(e,t){return e=AD(e),Ne(Hl.count(Li(e),e)+(Li(e).getUTCDay()===4),t,2)}function Rde(e){return e.getUTCDay()}function $de(e,t){return Ne(em.count(Li(e)-1,e),t,2)}function Mde(e,t){return Ne(e.getUTCFullYear()%100,t,2)}function Ide(e,t){return e=AD(e),Ne(e.getUTCFullYear()%100,t,2)}function Dde(e,t){return Ne(e.getUTCFullYear()%1e4,t,4)}function Lde(e,t){var r=e.getUTCDay();return e=r>=4||r===0?Hl(e):Hl.ceil(e),Ne(e.getUTCFullYear()%1e4,t,4)}function Bde(){return"+0000"}function UT(){return"%"}function zT(e){return+e}function WT(e){return Math.floor(+e/1e3)}var Cs,CD,jD;Fde({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 Fde(e){return Cs=Fue(e),CD=Cs.format,Cs.parse,jD=Cs.utcFormat,Cs.utcParse,Cs}function Ude(e){return new Date(e)}function zde(e){return e instanceof Date?+e:+new Date(+e)}function OS(e,t,r,n,i,o,a,s,l,c){var u=dS(),d=u.invert,f=u.domain,h=c(".%L"),v=c(":%S"),m=c("%I:%M"),y=c("%I %p"),w=c("%a %d"),b=c("%b %d"),g=c("%B"),_=c("%Y");function S(E){return(l(E)<E?h:s(E)<E?v:a(E)<E?m:o(E)<E?y:n(E)<E?i(E)<E?w:b:r(E)<E?g:_)(E)}return u.invert=function(E){return new Date(d(E))},u.domain=function(E){return arguments.length?f(Array.from(E,zde)):f().map(Ude)},u.ticks=function(E){var O=f();return e(O[0],O[O.length-1],E??10)},u.tickFormat=function(E,O){return O==null?S:c(O)},u.nice=function(E){var O=f();return(!E||typeof E.range!="function")&&(E=t(O[0],O[O.length-1],E??10)),E?f(vD(O,E)):u},u.copy=function(){return cf(u,OS(e,t,r,n,i,o,a,s,l,c))},u}function Wde(){return on.apply(OS(Lue,Bue,Di,_S,Kv,uf,xS,bS,_a,CD).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function Hde(){return on.apply(OS(Iue,Due,Li,ES,Gv,Vv,SS,wS,_a,jD).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Yv(){var e=0,t=1,r,n,i,o,a=Zt,s=!1,l;function c(d){return d==null||isNaN(d=+d)?l:a(i===0?.5:(d=(o(d)-r)*i,s?Math.max(0,Math.min(1,d)):d))}c.domain=function(d){return arguments.length?([e,t]=d,r=o(e=+e),n=o(t=+t),i=r===n?0:1/(n-r),c):[e,t]},c.clamp=function(d){return arguments.length?(s=!!d,c):s},c.interpolator=function(d){return arguments.length?(a=d,c):a};function u(d){return function(f){var h,v;return arguments.length?([h,v]=f,a=d(h,v),c):[a(0),a(1)]}}return c.range=u(Ec),c.rangeRound=u(uS),c.unknown=function(d){return arguments.length?(l=d,c):l},function(d){return o=d,r=d(e),n=d(t),i=r===n?0:1/(n-r),c}}function ra(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function kD(){var e=ta(Yv()(Zt));return e.copy=function(){return ra(e,kD())},Hi.apply(e,arguments)}function ND(){var e=pS(Yv()).domain([1,10]);return e.copy=function(){return ra(e,ND()).base(e.base())},Hi.apply(e,arguments)}function RD(){var e=mS(Yv());return e.copy=function(){return ra(e,RD()).constant(e.constant())},Hi.apply(e,arguments)}function PS(){var e=vS(Yv());return e.copy=function(){return ra(e,PS()).exponent(e.exponent())},Hi.apply(e,arguments)}function qde(){return PS.apply(null,arguments).exponent(.5)}function $D(){var e=[],t=Zt;function r(n){if(n!=null&&!isNaN(n=+n))return t((sf(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(Mo),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,o)=>kce(e,o/n))},r.copy=function(){return $D(t).domain(e)},Hi.apply(r,arguments)}function Xv(){var e=0,t=.5,r=1,n=1,i,o,a,s,l,c=Zt,u,d=!1,f;function h(m){return isNaN(m=+m)?f:(m=.5+((m=+u(m))-o)*(n*m<n*o?s:l),c(d?Math.max(0,Math.min(1,m)):m))}h.domain=function(m){return arguments.length?([e,t,r]=m,i=u(e=+e),o=u(t=+t),a=u(r=+r),s=i===o?0:.5/(o-i),l=o===a?0:.5/(a-o),n=o<i?-1:1,h):[e,t,r]},h.clamp=function(m){return arguments.length?(d=!!m,h):d},h.interpolator=function(m){return arguments.length?(c=m,h):c};function v(m){return function(y){var w,b,g;return arguments.length?([w,b,g]=y,c=nue(m,[w,b,g]),h):[c(0),c(.5),c(1)]}}return h.range=v(Ec),h.rangeRound=v(uS),h.unknown=function(m){return arguments.length?(f=m,h):f},function(m){return u=m,i=m(e),o=m(t),a=m(r),s=i===o?0:.5/(o-i),l=o===a?0:.5/(a-o),n=o<i?-1:1,h}}function MD(){var e=ta(Xv()(Zt));return e.copy=function(){return ra(e,MD())},Hi.apply(e,arguments)}function ID(){var e=pS(Xv()).domain([.1,1,10]);return e.copy=function(){return ra(e,ID()).base(e.base())},Hi.apply(e,arguments)}function DD(){var e=mS(Xv());return e.copy=function(){return ra(e,DD()).constant(e.constant())},Hi.apply(e,arguments)}function TS(){var e=vS(Xv());return e.copy=function(){return ra(e,TS()).exponent(e.exponent())},Hi.apply(e,arguments)}function Vde(){return TS.apply(null,arguments).exponent(.5)}const HT=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:cd,scaleDiverging:MD,scaleDivergingLog:ID,scaleDivergingPow:TS,scaleDivergingSqrt:Vde,scaleDivergingSymlog:DD,scaleIdentity:mD,scaleImplicit:tw,scaleLinear:Qp,scaleLog:gD,scaleOrdinal:sS,scalePoint:wu,scalePow:gS,scaleQuantile:wD,scaleQuantize:xD,scaleRadial:bD,scaleSequential:kD,scaleSequentialLog:ND,scaleSequentialPow:PS,scaleSequentialQuantile:$D,scaleSequentialSqrt:qde,scaleSequentialSymlog:RD,scaleSqrt:Pue,scaleSymlog:yD,scaleThreshold:SD,scaleTime:Wde,scaleUtc:Hde,tickFormat:pD},Symbol.toStringTag,{value:"Module"}));var Kde=vc;function Gde(e,t,r){for(var n=-1,i=e.length;++n<i;){var o=e[n],a=t(o);if(a!=null&&(s===void 0?a===a&&!Kde(a):r(a,s)))var s=a,l=o}return l}var LD=Gde;function Yde(e,t){return e>t}var Xde=Yde,Qde=LD,Jde=Xde,Zde=_c;function efe(e){return e&&e.length?Qde(e,Zde,Jde):void 0}var tfe=efe;const Qv=Ue(tfe);function rfe(e,t){return e<t}var nfe=rfe,ife=LD,ofe=nfe,afe=_c;
vendor: 59,846 bytes, lines 314-340
314function sfe(e){return e&&e.length?ife(e,afe,ofe):void 0}var lfe=sfe;const Jv=Ue(lfe);var cfe=U1,ufe=ea,dfe=q2,ffe=vr;function hfe(e,t){var r=ffe(e)?cfe:dfe;return r(e,ufe(t))}var pfe=hfe,mfe=W2,vfe=pfe;function gfe(e,t){return mfe(vfe(e,t),1)}var yfe=gfe;const bfe=Ue(yfe);var wfe=rS;function xfe(e,t){return wfe(e,t)}var Sfe=xfe;const Zv=Ue(Sfe);var Oc=1e9,_fe={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},CS,rt=!0,en="[DecimalError] ",La=en+"Invalid argument: ",AS=en+"Exponent out of range: ",Pc=Math.floor,ma=Math.pow,Efe=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Pr,At=1e7,Je=7,BD=9007199254740991,tm=Pc(BD/Je),ne={};ne.absoluteValue=ne.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};ne.comparedTo=ne.cmp=function(e){var t,r,n,i,o=this;if(e=new o.constructor(e),o.s!==e.s)return o.s||-e.s;if(o.e!==e.e)return o.e>e.e^o.s<0?1:-1;for(n=o.d.length,i=e.d.length,t=0,r=n<i?n:i;t<r;++t)if(o.d[t]!==e.d[t])return o.d[t]>e.d[t]^o.s<0?1:-1;return n===i?0:n>i^o.s<0?1:-1};ne.decimalPlaces=ne.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*Je;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r};ne.dividedBy=ne.div=function(e){return Pi(this,new this.constructor(e))};ne.dividedToIntegerBy=ne.idiv=function(e){var t=this,r=t.constructor;return qe(Pi(t,new r(e),0,1),r.precision)};ne.equals=ne.eq=function(e){return!this.cmp(e)};ne.exponent=function(){return yt(this)};ne.greaterThan=ne.gt=function(e){return this.cmp(e)>0};ne.greaterThanOrEqualTo=ne.gte=function(e){return this.cmp(e)>=0};ne.isInteger=ne.isint=function(){return this.e>this.d.length-2};ne.isNegative=ne.isneg=function(){return this.s<0};ne.isPositive=ne.ispos=function(){return this.s>0};ne.isZero=function(){return this.s===0};ne.lessThan=ne.lt=function(e){return this.cmp(e)<0};ne.lessThanOrEqualTo=ne.lte=function(e){return this.cmp(e)<1};ne.logarithm=ne.log=function(e){var t,r=this,n=r.constructor,i=n.precision,o=i+5;if(e===void 0)e=new n(10);else if(e=new n(e),e.s<1||e.eq(Pr))throw Error(en+"NaN");if(r.s<1)throw Error(en+(r.s?"NaN":"-Infinity"));return r.eq(Pr)?new n(0):(rt=!1,t=Pi(pd(r,o),pd(e,o),o),rt=!0,qe(t,i))};ne.minus=ne.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?zD(t,e):FD(t,(e.s=-e.s,e))};ne.modulo=ne.mod=function(e){var t,r=this,n=r.constructor,i=n.precision;if(e=new n(e),!e.s)throw Error(en+"NaN");return r.s?(rt=!1,t=Pi(r,e,0,1).times(e),rt=!0,r.minus(t)):qe(new n(r),i)};ne.naturalExponential=ne.exp=function(){return UD(this)};ne.naturalLogarithm=ne.ln=function(){return pd(this)};ne.negated=ne.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};ne.plus=ne.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?FD(t,e):zD(t,(e.s=-e.s,e))};ne.precision=ne.sd=function(e){var t,r,n,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(La+e);if(t=yt(i)+1,n=i.d.length-1,r=n*Je+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};ne.squareRoot=ne.sqrt=function(){var e,t,r,n,i,o,a,s=this,l=s.constructor;if(s.s<1){if(!s.s)return new l(0);throw Error(en+"NaN")}for(e=yt(s),rt=!1,i=Math.sqrt(+s),i==0||i==1/0?(t=Vn(s.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=Pc((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 l(t)):n=new l(i.toString()),r=l.precision,i=a=r+3;;)if(o=n,n=o.plus(Pi(s,o,a+2)).times(.5),Vn(o.d).slice(0,a)===(t=Vn(n.d)).slice(0,a)){if(t=t.slice(a-3,a+1),i==a&&t=="4999"){if(qe(o,r+1,0),o.times(o).eq(s)){n=o;break}}else if(t!="9999")break;a+=4}return rt=!0,qe(n,r)};ne.times=ne.mul=function(e){var t,r,n,i,o,a,s,l,c,u=this,d=u.constructor,f=u.d,h=(e=new d(e)).d;if(!u.s||!e.s)return new d(0);for(e.s*=u.s,r=u.e+e.e,l=f.length,c=h.length,l<c&&(o=f,f=h,h=o,a=l,l=c,c=a),o=[],a=l+c,n=a;n--;)o.push(0);for(n=c;--n>=0;){for(t=0,i=l+n;i>n;)s=o[i]+h[n]*f[i-n-1]+t,o[i--]=s%At|0,t=s/At|0;o[i]=(o[i]+t)%At|0}for(;!o[--a];)o.pop();return t?++r:o.shift(),e.d=o,e.e=r,rt?qe(e,d.precision):e};ne.toDecimalPlaces=ne.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(Zn(e,0,Oc),t===void 0?t=n.rounding:Zn(t,0,8),qe(r,e+yt(r)+1,t))};ne.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=ts(n,!0):(Zn(e,0,Oc),t===void 0?t=i.rounding:Zn(t,0,8),n=qe(new i(n),e+1,t),r=ts(n,!0,e+1)),r};ne.toFixed=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?ts(i):(Zn(e,0,Oc),t===void 0?t=o.rounding:Zn(t,0,8),n=qe(new o(i),e+yt(i)+1,t),r=ts(n.abs(),!1,e+yt(n)+1),i.isneg()&&!i.isZero()?"-"+r:r)};ne.toInteger=ne.toint=function(){var e=this,t=e.constructor;return qe(new t(e),yt(e)+1,t.rounding)};ne.toNumber=function(){return+this};ne.toPower=ne.pow=function(e){var t,r,n,i,o,a,s=this,l=s.constructor,c=12,u=+(e=new l(e));if(!e.s)return new l(Pr);if(s=new l(s),!s.s){if(e.s<1)throw Error(en+"Infinity");return s}if(s.eq(Pr))return s;if(n=l.precision,e.eq(Pr))return qe(s,n);if(t=e.e,r=e.d.length-1,a=t>=r,o=s.s,a){if((r=u<0?-u:u)<=BD){for(i=new l(Pr),t=Math.ceil(n/Je+4),rt=!1;r%2&&(i=i.times(s),VT(i.d,t)),r=Pc(r/2),r!==0;)s=s.times(s),VT(s.d,t);return rt=!0,e.s<0?new l(Pr).div(i):qe(i,n)}}else if(o<0)throw Error(en+"NaN");return o=o<0&&e.d[Math.max(t,r)]&1?-1:1,s.s=1,rt=!1,i=e.times(pd(s,n+c)),rt=!0,i=UD(i),i.s=o,i};ne.toPrecision=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?(r=yt(i),n=ts(i,r<=o.toExpNeg||r>=o.toExpPos)):(Zn(e,1,Oc),t===void 0?t=o.rounding:Zn(t,0,8),i=qe(new o(i),e,t),r=yt(i),n=ts(i,e<=r||r<=o.toExpNeg,e)),n};ne.toSignificantDigits=ne.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(Zn(e,1,Oc),t===void 0?t=n.rounding:Zn(t,0,8)),qe(new n(r),e,t)};ne.toString=ne.valueOf=ne.val=ne.toJSON=ne[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=yt(e),r=e.constructor;return ts(e,t<=r.toExpNeg||t>=r.toExpPos)};function FD(e,t){var r,n,i,o,a,s,l,c,u=e.constructor,d=u.precision;if(!e.s||!t.s)return t.s||(t=new u(e)),rt?qe(t,d):t;if(l=e.d,c=t.d,a=e.e,i=t.e,l=l.slice(),o=a-i,o){for(o<0?(n=l,o=-o,s=c.length):(n=c,i=a,s=l.length),a=Math.ceil(d/Je),s=a>s?a+1:s+1,o>s&&(o=s,n.length=1),n.reverse();o--;)n.push(0);n.reverse()}for(s=l.length,o=c.length,s-o<0&&(o=s,n=c,c=l,l=n),r=0;o;)r=(l[--o]=l[o]+c[o]+r)/At|0,l[o]%=At;for(r&&(l.unshift(r),++i),s=l.length;l[--s]==0;)l.pop();return t.d=l,t.e=i,rt?qe(t,d):t}function Zn(e,t,r){if(e!==~~e||e<t||e>r)throw Error(La+e)}function Vn(e){var t,r,n,i=e.length-1,o="",a=e[0];if(i>0){for(o+=a,t=1;t<i;t++)n=e[t]+"",r=Je-n.length,r&&(o+=ro(r)),o+=n;a=e[t],n=a+"",r=Je-n.length,r&&(o+=ro(r))}else if(a===0)return"0";for(;a%10===0;)a/=10;return o+a}var Pi=function(){function e(n,i){var o,a=0,s=n.length;for(n=n.slice();s--;)o=n[s]*i+a,n[s]=o%At|0,a=o/At|0;return a&&n.unshift(a),n}function t(n,i,o,a){var s,l;if(o!=a)l=o>a?1:-1;else for(s=l=0;s<o;s++)if(n[s]!=i[s]){l=n[s]>i[s]?1:-1;break}return l}function r(n,i,o){for(var a=0;o--;)n[o]-=a,a=n[o]<i[o]?1:0,n[o]=a*At+n[o]-i[o];for(;!n[0]&&n.length>1;)n.shift()}return function(n,i,o,a){var s,l,c,u,d,f,h,v,m,y,w,b,g,_,S,E,O,P,T=n.constructor,j=n.s==i.s?1:-1,C=n.d,k=i.d;if(!n.s)return new T(n);if(!i.s)throw Error(en+"Division by zero");for(l=n.e-i.e,O=k.length,S=C.length,h=new T(j),v=h.d=[],c=0;k[c]==(C[c]||0);)++c;if(k[c]>(C[c]||0)&&--l,o==null?b=o=T.precision:a?b=o+(yt(n)-yt(i))+1:b=o,b<0)return new T(0);if(b=b/Je+2|0,c=0,O==1)for(u=0,k=k[0],b++;(c<S||u)&&b--;c++)g=u*At+(C[c]||0),v[c]=g/k|0,u=g%k|0;else{for(u=At/(k[0]+1)|0,u>1&&(k=e(k,u),C=e(C,u),O=k.length,S=C.length),_=O,m=C.slice(0,O),y=m.length;y<O;)m[y++]=0;P=k.slice(),P.unshift(0),E=k[0],k[1]>=At/2&&++E;do u=0,s=t(k,m,O,y),s<0?(w=m[0],O!=y&&(w=w*At+(m[1]||0)),u=w/E|0,u>1?(u>=At&&(u=At-1),d=e(k,u),f=d.length,y=m.length,s=t(d,m,f,y),s==1&&(u--,r(d,O<f?P:k,f))):(u==0&&(s=u=1),d=k.slice()),f=d.length,f<y&&d.unshift(0),r(m,d,y),s==-1&&(y=m.length,s=t(k,m,O,y),s<1&&(u++,r(m,O<y?P:k,y))),y=m.length):s===0&&(u++,m=[0]),v[c++]=u,s&&m[0]?m[y++]=C[_]||0:(m=[C[_]],y=1);while((_++<S||m[0]!==void 0)&&b--)}return v[0]||v.shift(),h.e=l,qe(h,a?o+yt(h)+1:o)}}();function UD(e,t){var r,n,i,o,a,s,l=0,c=0,u=e.constructor,d=u.precision;if(yt(e)>16)throw Error(AS+yt(e));if(!e.s)return new u(Pr);for(t==null?(rt=!1,s=d):s=t,a=new u(.03125);e.abs().gte(.1);)e=e.times(a),c+=5;for(n=Math.log(ma(2,c))/Math.LN10*2+5|0,s+=n,r=i=o=new u(Pr),u.precision=s;;){if(i=qe(i.times(e),s),r=r.times(++l),a=o.plus(Pi(i,r,s)),Vn(a.d).slice(0,s)===Vn(o.d).slice(0,s)){for(;c--;)o=qe(o.times(o),s);return u.precision=d,t==null?(rt=!0,qe(o,d)):o}o=a}}function yt(e){for(var t=e.e*Je,r=e.d[0];r>=10;r/=10)t++;return t}function Ty(e,t,r){if(t>e.LN10.sd())throw rt=!0,r&&(e.precision=r),Error(en+"LN10 precision limit exceeded");return qe(new e(e.LN10),t)}function ro(e){for(var t="";e--;)t+="0";return t}function pd(e,t){var r,n,i,o,a,s,l,c,u,d=1,f=10,h=e,v=h.d,m=h.constructor,y=m.precision;if(h.s<1)throw Error(en+(h.s?"NaN":"-Infinity"));if(h.eq(Pr))return new m(0);if(t==null?(rt=!1,c=y):c=t,h.eq(10))return t==null&&(rt=!0),Ty(m,c);if(c+=f,m.precision=c,r=Vn(v),n=r.charAt(0),o=yt(h),Math.abs(o)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)h=h.times(e),r=Vn(h.d),n=r.charAt(0),d++;o=yt(h),n>1?(h=new m("0."+r),o++):h=new m(n+"."+r.slice(1))}else return l=Ty(m,c+2,y).times(o+""),h=pd(new m(n+"."+r.slice(1)),c-f).plus(l),m.precision=y,t==null?(rt=!0,qe(h,y)):h;for(s=a=h=Pi(h.minus(Pr),h.plus(Pr),c),u=qe(h.times(h),c),i=3;;){if(a=qe(a.times(u),c),l=s.plus(Pi(a,new m(i),c)),Vn(l.d).slice(0,c)===Vn(s.d).slice(0,c))return s=s.times(2),o!==0&&(s=s.plus(Ty(m,c+2,y).times(o+""))),s=Pi(s,new m(d),c),m.precision=y,t==null?(rt=!0,qe(s,y)):s;s=l,i+=2}}function qT(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=Pc(r/Je),e.d=[],n=(r+1)%Je,r<0&&(n+=Je),n<i){for(n&&e.d.push(+t.slice(0,n)),i-=Je;n<i;)e.d.push(+t.slice(n,n+=Je));t=t.slice(n),n=Je-t.length}else n-=i;for(;n--;)t+="0";if(e.d.push(+t),rt&&(e.e>tm||e.e<-tm))throw Error(AS+r)}else e.s=0,e.e=0,e.d=[0];return e}function qe(e,t,r){var n,i,o,a,s,l,c,u,d=e.d;for(a=1,o=d[0];o>=10;o/=10)a++;if(n=t-a,n<0)n+=Je,i=t,c=d[u=0];else{if(u=Math.ceil((n+1)/Je),o=d.length,u>=o)return e;for(c=o=d[u],a=1;o>=10;o/=10)a++;n%=Je,i=n-Je+a}if(r!==void 0&&(o=ma(10,a-i-1),s=c/o%10|0,l=t<0||d[u+1]!==void 0||c%o,l=r<4?(s||l)&&(r==0||r==(e.s<0?3:2)):s>5||s==5&&(r==4||l||r==6&&(n>0?i>0?c/ma(10,a-i):0:d[u-1])%10&1||r==(e.s<0?8:7))),t<1||!d[0])return l?(o=yt(e),d.length=1,t=t-o-1,d[0]=ma(10,(Je-t%Je)%Je),e.e=Pc(-t/Je)||0):(d.length=1,d[0]=e.e=e.s=0),e;if(n==0?(d.length=u,o=1,u--):(d.length=u+1,o=ma(10,Je-n),d[u]=i>0?(c/ma(10,a-i)%ma(10,i)|0)*o:0),l)for(;;)if(u==0){(d[0]+=o)==At&&(d[0]=1,++e.e);break}else{if(d[u]+=o,d[u]!=At)break;d[u--]=0,o=1}for(n=d.length;d[--n]===0;)d.pop();if(rt&&(e.e>tm||e.e<-tm))throw Error(AS+yt(e));return e}function zD(e,t){var r,n,i,o,a,s,l,c,u,d,f=e.constructor,h=f.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new f(e),rt?qe(t,h):t;if(l=e.d,d=t.d,n=t.e,c=e.e,l=l.slice(),a=c-n,a){for(u=a<0,u?(r=l,a=-a,s=d.length):(r=d,n=c,s=l.length),i=Math.max(Math.ceil(h/Je),s)+2,a>i&&(a=i,r.length=1),r.reverse(),i=a;i--;)r.push(0);r.reverse()}else{for(i=l.length,s=d.length,u=i<s,u&&(s=i),i=0;i<s;i++)if(l[i]!=d[i]){u=l[i]<d[i];break}a=0}for(u&&(r=l,l=d,d=r,t.s=-t.s),s=l.length,i=d.length-s;i>0;--i)l[s++]=0;for(i=d.length;i>a;){if(l[--i]<d[i]){for(o=i;o&&l[--o]===0;)l[o]=At-1;--l[o],l[i]+=At}l[i]-=d[i]}for(;l[--s]===0;)l.pop();for(;l[0]===0;l.shift())--n;return l[0]?(t.d=l,t.e=n,rt?qe(t,h):t):new f(0)}function ts(e,t,r){var n,i=yt(e),o=Vn(e.d),a=o.length;return t?(r&&(n=r-a)>0?o=o.charAt(0)+"."+o.slice(1)+ro(n):a>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(i<0?"e":"e+")+i):i<0?(o="0."+ro(-i-1)+o,r&&(n=r-a)>0&&(o+=ro(n))):i>=a?(o+=ro(i+1-a),r&&(n=r-i-1)>0&&(o=o+"."+ro(n))):((n=i+1)<a&&(o=o.slice(0,n)+"."+o.slice(n)),r&&(n=r-a)>0&&(i+1===a&&(o+="."),o+=ro(n))),e.s<0?"-"+o:o}function VT(e,t){if(e.length>t)return e.length=t,!0}function WD(e){var t,r,n;function i(o){var a=this;if(!(a instanceof i))return new i(o);if(a.constructor=i,o instanceof i){a.s=o.s,a.e=o.e,a.d=(o=o.d)?o.slice():o;return}if(typeof o=="number"){if(o*0!==0)throw Error(La+o);if(o>0)a.s=1;else if(o<0)o=-o,a.s=-1;else{a.s=0,a.e=0,a.d=[0];return}if(o===~~o&&o<1e7){a.e=0,a.d=[o];return}return qT(a,o.toString())}else if(typeof o!="string")throw Error(La+o);if(o.charCodeAt(0)===45?(o=o.slice(1),a.s=-1):a.s=1,Efe.test(o))qT(a,o);else throw Error(La+o)}if(i.prototype=ne,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=WD,i.config=i.set=Ofe,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 Ofe(e){if(!e||typeof e!="object")throw Error(en+"Object expected");var t,r,n,i=["precision",1,Oc,"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(Pc(n)===n&&n>=i[t+1]&&n<=i[t+2])this[r]=n;else throw Error(La+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(La+r+": "+n);return this}var CS=WD(_fe);Pr=new CS(1);const Fe=CS;function Pfe(e){return jfe(e)||Cfe(e)||Afe(e)||Tfe()}function Tfe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
315In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Afe(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 Cfe(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function jfe(e){if(Array.isArray(e))return ow(e)}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}var kfe=function(t){return t},HD={"@@functional/placeholder":!0},qD=function(t){return t===HD},KT=function(t){return function r(){return arguments.length===0||arguments.length===1&&qD(arguments.length<=0?void 0:arguments[0])?r:t.apply(void 0,arguments)}},Nfe=function e(t,r){return t===1?r:KT(function(){for(var n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];var a=i.filter(function(s){return s!==HD}).length;return a>=t?r.apply(void 0,i):e(t-a,KT(function(){for(var s=arguments.length,l=new Array(s),c=0;c<s;c++)l[c]=arguments[c];var u=i.map(function(d){return qD(d)?l.shift():d});return r.apply(void 0,Pfe(u).concat(l))}))})},eg=function(t){return Nfe(t.length,t)},aw=function(t,r){for(var n=[],i=t;i<r;++i)n[i-t]=i;return n},Rfe=eg(function(e,t){return Array.isArray(t)?t.map(e):Object.keys(t).map(function(r){return t[r]}).map(e)}),$fe=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];if(!r.length)return kfe;var i=r.reverse(),o=i[0],a=i.slice(1);return function(){return a.reduce(function(s,l){return l(s)},o.apply(void 0,arguments))}},sw=function(t){return Array.isArray(t)?t.reverse():t.split("").reverse.join("")},VD=function(t){var r=null,n=null;return function(){for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return r&&o.every(function(s,l){return s===r[l]})||(r=o,n=t.apply(void 0,o)),n}};function Mfe(e){var t;return e===0?t=1:t=Math.floor(new Fe(e).abs().log(10).toNumber())+1,t}function Ife(e,t,r){for(var n=new Fe(e),i=0,o=[];n.lt(t)&&i<1e5;)o.push(n.toNumber()),n=n.add(r),i++;return o}var Dfe=eg(function(e,t,r){var n=+e,i=+t;return n+r*(i-n)}),Lfe=eg(function(e,t,r){var n=t-+e;return n=n||1/0,(r-e)/n}),Bfe=eg(function(e,t,r){var n=t-+e;return n=n||1/0,Math.max(0,Math.min(1,(r-e)/n))});const tg={rangeStep:Ife,getDigitCount:Mfe,interpolateNumber:Dfe,uninterpolateNumber:Lfe,uninterpolateTruncation:Bfe};function lw(e){return zfe(e)||Ufe(e)||KD(e)||Ffe()}function Ffe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
316In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ufe(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function zfe(e){if(Array.isArray(e))return cw(e)}function md(e,t){return qfe(e)||Hfe(e,t)||KD(e,t)||Wfe()}function Wfe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
317In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function KD(e,t){if(e){if(typeof e=="string")return cw(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 cw(e,t)}}function cw(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 Hfe(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var r=[],n=!0,i=!1,o=void 0;try{for(var a=e[Symbol.iterator](),s;!(n=(s=a.next()).done)&&(r.push(s.value),!(t&&r.length===t));n=!0);}catch(l){i=!0,o=l}finally{try{!n&&a.return!=null&&a.return()}finally{if(i)throw o}}return r}}function qfe(e){if(Array.isArray(e))return e}function GD(e){var t=md(e,2),r=t[0],n=t[1],i=r,o=n;return r>n&&(i=n,o=r),[i,o]}function YD(e,t,r){if(e.lte(0))return new Fe(0);var n=tg.getDigitCount(e.toNumber()),i=new Fe(10).pow(n),o=e.div(i),a=n!==1?.05:.1,s=new Fe(Math.ceil(o.div(a).toNumber())).add(r).mul(a),l=s.mul(i);return t?l:new Fe(Math.ceil(l))}function Vfe(e,t,r){var n=1,i=new Fe(e);if(!i.isint()&&r){var o=Math.abs(e);o<1?(n=new Fe(10).pow(tg.getDigitCount(e)-1),i=new Fe(Math.floor(i.div(n).toNumber())).mul(n)):o>1&&(i=new Fe(Math.floor(e)))}else e===0?i=new Fe(Math.floor((t-1)/2)):r||(i=new Fe(Math.floor(e)));var a=Math.floor((t-1)/2),s=$fe(Rfe(function(l){return i.add(new Fe(l-a).mul(n)).toNumber()}),aw);return s(0,t)}function XD(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 Fe(0),tickMin:new Fe(0),tickMax:new Fe(0)};var o=YD(new Fe(t).sub(e).div(r-1),n,i),a;e<=0&&t>=0?a=new Fe(0):(a=new Fe(e).add(t).div(2),a=a.sub(new Fe(a).mod(o)));var s=Math.ceil(a.sub(e).div(o).toNumber()),l=Math.ceil(new Fe(t).sub(a).div(o).toNumber()),c=s+l+1;return c>r?XD(e,t,r,n,i+1):(c<r&&(l=t>0?l+(r-c):l,s=t>0?s:s+(r-c)),{step:o,tickMin:a.sub(new Fe(s).mul(o)),tickMax:a.add(new Fe(l).mul(o))})}function Kfe(e){var t=md(e,2),r=t[0],n=t[1],i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,a=Math.max(i,2),s=GD([r,n]),l=md(s,2),c=l[0],u=l[1];if(c===-1/0||u===1/0){var d=u===1/0?[c].concat(lw(aw(0,i-1).map(function(){return 1/0}))):[].concat(lw(aw(0,i-1).map(function(){return-1/0})),[u]);return r>n?sw(d):d}if(c===u)return Vfe(c,i,o);var f=XD(c,u,a,o),h=f.step,v=f.tickMin,m=f.tickMax,y=tg.rangeStep(v,m.add(new Fe(.1).mul(h)),h);return r>n?sw(y):y}function Gfe(e,t){var r=md(e,2),n=r[0],i=r[1],o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,a=GD([n,i]),s=md(a,2),l=s[0],c=s[1];if(l===-1/0||c===1/0)return[n,i];if(l===c)return[l];var u=Math.max(t,2),d=YD(new Fe(c).sub(l).div(u-1),o,0),f=[].concat(lw(tg.rangeStep(new Fe(l),new Fe(c).sub(new Fe(.99).mul(d)),d)),[c]);return n>i?sw(f):f}var Yfe=VD(Kfe),Xfe=VD(Gfe),Qfe="Invariant failed";function rs(e,t){throw new Error(Qfe)}var Jfe=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function ql(e){"@babel/helpers - typeof";return ql=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},ql(e)}function rm(){return rm=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},rm.apply(this,arguments)}function Zfe(e,t){return nhe(e)||rhe(e,t)||the(e,t)||ehe()}function ehe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
318In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function the(e,t){if(e){if(typeof e=="string")return GT(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 GT(e,t)}}function GT(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 rhe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,o,a,s=[],l=!0,c=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(l=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(u){c=!0,i=u}finally{try{if(!l&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}function nhe(e){if(Array.isArray(e))return e}function ihe(e,t){if(e==null)return{};var r=ohe(e,t),n,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)n=o[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function ohe(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 ahe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function she(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,ZD(n.key),n)}}function lhe(e,t,r){return t&&she(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function che(e,t,r){return t=nm(t),uhe(e,QD()?Reflect.construct(t,r||[],nm(e).constructor):t.apply(e,r))}function uhe(e,t){if(t&&(ql(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return dhe(e)}function dhe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function QD(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(QD=function(){return!!e})()}function nm(e){return nm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},nm(e)}function fhe(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 JD(e,t,r){return t=ZD(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ZD(e){var t=hhe(e,"string");return ql(t)=="symbol"?t:t+""}function hhe(e,t){if(ql(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(ql(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var df=function(e){function t(){return ahe(this,t),che(this,t,arguments)}return fhe(t,e),lhe(t,[{key:"render",value:function(){var n=this.props,i=n.offset,o=n.layout,a=n.width,s=n.dataKey,l=n.data,c=n.dataPointFormatter,u=n.xAxis,d=n.yAxis,f=ihe(n,Jfe),h=Ae(f,!1);this.props.direction==="x"&&u.type!=="number"&&rs();var v=l.map(function(m){var y=c(m,s),w=y.x,b=y.y,g=y.value,_=y.errorVal;if(!_)return null;var S=[],E,O;if(Array.isArray(_)){var P=Zfe(_,2);E=P[0],O=P[1]}else E=O=_;if(o==="vertical"){var T=u.scale,j=b+i,C=j+a,k=j-a,L=T(g-E),M=T(g+O);S.push({x1:M,y1:C,x2:M,y2:k}),S.push({x1:L,y1:j,x2:M,y2:j}),S.push({x1:L,y1:C,x2:L,y2:k})}else if(o==="horizontal"){var N=d.scale,D=w+i,B=D-a,$=D+a,I=N(g-E),U=N(g+O);S.push({x1:B,y1:U,x2:$,y2:U}),S.push({x1:D,y1:I,x2:D,y2:U}),S.push({x1:B,y1:I,x2:$,y2:I})}return A.createElement(pt,rm({className:"recharts-errorBar",key:"bar-".concat(S.map(function(H){return"".concat(H.x1,"-").concat(H.x2,"-").concat(H.y1,"-").concat(H.y2)}))},h),S.map(function(H){return A.createElement("line",rm({},H,{key:"line-".concat(H.x1,"-").concat(H.x2,"-").concat(H.y1,"-").concat(H.y2)}))}))});return A.createElement(pt,{className:"recharts-errorBars"},v)}}])}(A.Component);JD(df,"defaultProps",{stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"});JD(df,"displayName","ErrorBar");function vd(e){"@babel/helpers - typeof";return vd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vd(e)}function YT(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 la(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?YT(Object(r),!0).forEach(function(n){phe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):YT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function phe(e,t,r){return t=mhe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function mhe(e){var t=vhe(e,"string");return vd(t)=="symbol"?t:t+""}function vhe(e,t){if(vd(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(vd(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var eL=function(t){var r=t.children,n=t.formattedGraphicalItems,i=t.legendWidth,o=t.legendContent,a=_r(r,ul);if(!a)return null;var s=ul.defaultProps,l=s!==void 0?la(la({},s),a.props):{},c;return a.props&&a.props.payload?c=a.props&&a.props.payload:o==="children"?c=(n||[]).reduce(function(u,d){var f=d.item,h=d.props,v=h.sectors||h.data||[];return u.concat(v.map(function(m){return{type:a.props.iconType||f.props.legendType,value:m.name,color:m.fill,payload:m}}))},[]):c=(n||[]).map(function(u){var d=u.item,f=d.type.defaultProps,h=f!==void 0?la(la({},f),d.props):{},v=h.dataKey,m=h.name,y=h.legendType,w=h.hide;return{inactive:w,dataKey:v,type:l.iconType||y||"square",color:jS(d),value:m||v,payload:h}}),la(la(la({},l),ul.getWithHeight(a,i)),{},{payload:c,item:a})};function gd(e){"@babel/helpers - typeof";return gd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gd(e)}function XT(e){return whe(e)||bhe(e)||yhe(e)||ghe()}function ghe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
319In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function yhe(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 bhe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function whe(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 QT(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 dt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?QT(Object(r),!0).forEach(function(n){fl(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):QT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function fl(e,t,r){return t=xhe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function xhe(e){var t=She(e,"string");return gd(t)=="symbol"?t:t+""}function She(e,t){if(gd(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(gd(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function kr(e,t,r){return Se(e)||Se(t)?r:Ot(t)?Xr(e,t,r):xe(t)?t(e):r}function xu(e,t,r,n){var i=bfe(e,function(s){return kr(s,t)});if(r==="number"){var o=i.filter(function(s){return G(s)||parseFloat(s)});return o.length?[Jv(o),Qv(o)]:[1/0,-1/0]}var a=n?i.filter(function(s){return!Se(s)}):i;return a.map(function(s){return Ot(s)||s instanceof Date?s:""})}var _he=function(t){var r,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0,o=arguments.length>3?arguments[3]:void 0,a=-1,s=(r=n==null?void 0:n.length)!==null&&r!==void 0?r:0;if(s<=1)return 0;if(o&&o.axisType==="angleAxis"&&Math.abs(Math.abs(o.range[1]-o.range[0])-360)<=1e-6)for(var l=o.range,c=0;c<s;c++){var u=c>0?i[c-1].coordinate:i[s-1].coordinate,d=i[c].coordinate,f=c>=s-1?i[0].coordinate:i[c+1].coordinate,h=void 0;if(Pn(d-u)!==Pn(f-d)){var v=[];if(Pn(f-d)===Pn(l[1]-l[0])){h=f;var m=d+l[1]-l[0];v[0]=Math.min(m,(m+u)/2),v[1]=Math.max(m,(m+u)/2)}else{h=u;var y=f+l[1]-l[0];v[0]=Math.min(d,(y+d)/2),v[1]=Math.max(d,(y+d)/2)}var w=[Math.min(d,(h+d)/2),Math.max(d,(h+d)/2)];if(t>w[0]&&t<=w[1]||t>=v[0]&&t<=v[1]){a=i[c].index;break}}else{var b=Math.min(u,f),g=Math.max(u,f);if(t>(b+d)/2&&t<=(g+d)/2){a=i[c].index;break}}}else for(var _=0;_<s;_++)if(_===0&&t<=(n[_].coordinate+n[_+1].coordinate)/2||_>0&&_<s-1&&t>(n[_].coordinate+n[_-1].coordinate)/2&&t<=(n[_].coordinate+n[_+1].coordinate)/2||_===s-1&&t>(n[_].coordinate+n[_-1].coordinate)/2){a=n[_].index;break}return a},jS=function(t){var r,n=t,i=n.type.displayName,o=(r=t.type)!==null&&r!==void 0&&r.defaultProps?dt(dt({},t.type.defaultProps),t.props):t.props,a=o.stroke,s=o.fill,l;switch(i){case"Line":l=a;break;case"Area":case"Radar":l=a&&a!=="none"?a:s;break;default:l=s;break}return l},Ehe=function(t){var r=t.barSize,n=t.totalSize,i=t.stackGroups,o=i===void 0?{}:i;if(!o)return{};for(var a={},s=Object.keys(o),l=0,c=s.length;l<c;l++)for(var u=o[s[l]].stackGroups,d=Object.keys(u),f=0,h=d.length;f<h;f++){var v=u[d[f]],m=v.items,y=v.cateAxisId,w=m.filter(function(O){return _i(O.type).indexOf("Bar")>=0});if(w&&w.length){var b=w[0].type.defaultProps,g=b!==void 0?dt(dt({},b),w[0].props):w[0].props,_=g.barSize,S=g[y];a[S]||(a[S]=[]);var E=Se(_)?r:_;a[S].push({item:w[0],stackList:w.slice(1),barSize:Se(E)?void 0:es(E,n,0)})}}return a},Ohe=function(t){var r=t.barGap,n=t.barCategoryGap,i=t.bandSize,o=t.sizeList,a=o===void 0?[]:o,s=t.maxBarSize,l=a.length;if(l<1)return null;var c=es(r,i,0,!0),u,d=[];if(a[0].barSize===+a[0].barSize){var f=!1,h=i/l,v=a.reduce(function(_,S){return _+S.barSize||0},0);v+=(l-1)*c,v>=i&&(v-=(l-1)*c,c=0),v>=i&&h>0&&(f=!0,h*=.9,v=l*h);var m=(i-v)/2>>0,y={offset:m-c,size:0};u=a.reduce(function(_,S){var E={item:S.item,position:{offset:y.offset+y.size+c,size:f?h:S.barSize}},O=[].concat(XT(_),[E]);return y=O[O.length-1].position,S.stackList&&S.stackList.length&&S.stackList.forEach(function(P){O.push({item:P,position:y})}),O},d)}else{var w=es(n,i,0,!0);i-2*w-(l-1)*c<=0&&(c=0);var b=(i-2*w-(l-1)*c)/l;b>1&&(b>>=0);var g=s===+s?Math.min(b,s):b;u=a.reduce(function(_,S,E){var O=[].concat(XT(_),[{item:S.item,position:{offset:w+(b+c)*E+(b-g)/2,size:g}}]);return S.stackList&&S.stackList.length&&S.stackList.forEach(function(P){O.push({item:P,position:O[O.length-1].position})}),O},d)}return u},Phe=function(t,r,n,i){var o=n.children,a=n.width,s=n.margin,l=a-(s.left||0)-(s.right||0),c=eL({children:o,legendWidth:l});if(c){var u=i||{},d=u.width,f=u.height,h=c.align,v=c.verticalAlign,m=c.layout;if((m==="vertical"||m==="horizontal"&&v==="middle")&&h!=="center"&&G(t[h]))return dt(dt({},t),{},fl({},h,t[h]+(d||0)));if((m==="horizontal"||m==="vertical"&&h==="center")&&v!=="middle"&&G(t[v]))return dt(dt({},t),{},fl({},v,t[v]+(f||0)))}return t},The=function(t,r,n){return Se(r)?!0:t==="horizontal"?r==="yAxis":t==="vertical"||n==="x"?r==="xAxis":n==="y"?r==="yAxis":!0},tL=function(t,r,n,i,o){var a=r.props.children,s=Qr(a,df).filter(function(c){return The(i,o,c.props.direction)});if(s&&s.length){var l=s.map(function(c){return c.props.dataKey});return t.reduce(function(c,u){var d=kr(u,n);if(Se(d))return c;var f=Array.isArray(d)?[Jv(d),Qv(d)]:[d,d],h=l.reduce(function(v,m){var y=kr(u,m,0),w=f[0]-Math.abs(Array.isArray(y)?y[0]:y),b=f[1]+Math.abs(Array.isArray(y)?y[1]:y);return[Math.min(w,v[0]),Math.max(b,v[1])]},[1/0,-1/0]);return[Math.min(h[0],c[0]),Math.max(h[1],c[1])]},[1/0,-1/0])}return null},Ahe=function(t,r,n,i,o){var a=r.map(function(s){return tL(t,s,n,o,i)}).filter(function(s){return!Se(s)});return a&&a.length?a.reduce(function(s,l){return[Math.min(s[0],l[0]),Math.max(s[1],l[1])]},[1/0,-1/0]):null},rL=function(t,r,n,i,o){var a=r.map(function(l){var c=l.props.dataKey;return n==="number"&&c&&tL(t,l,c,i)||xu(t,c,n,o)});if(n==="number")return a.reduce(function(l,c){return[Math.min(l[0],c[0]),Math.max(l[1],c[1])]},[1/0,-1/0]);var s={};return a.reduce(function(l,c){for(var u=0,d=c.length;u<d;u++)s[c[u]]||(s[c[u]]=!0,l.push(c[u]));return l},[])},nL=function(t,r){return t==="horizontal"&&r==="xAxis"||t==="vertical"&&r==="yAxis"||t==="centric"&&r==="angleAxis"||t==="radial"&&r==="radiusAxis"},iL=function(t,r,n,i){if(i)return t.map(function(l){return l.coordinate});var o,a,s=t.map(function(l){return l.coordinate===r&&(o=!0),l.coordinate===n&&(a=!0),l.coordinate});return o||s.push(r),a||s.push(n),s},bi=function(t,r,n){if(!t)return null;var i=t.scale,o=t.duplicateDomain,a=t.type,s=t.range,l=t.realScaleType==="scaleBand"?i.bandwidth()/2:2,c=(r||n)&&a==="category"&&i.bandwidth?i.bandwidth()/l:0;if(c=t.axisType==="angleAxis"&&(s==null?void 0:s.length)>=2?Pn(s[0]-s[1])*2*c:c,r&&(t.ticks||t.niceTicks)){var u=(t.ticks||t.niceTicks).map(function(d){var f=o?o.indexOf(d):d;return{coordinate:i(f)+c,value:d,offset:c}});return u.filter(function(d){return!nf(d.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(d,f){return{coordinate:i(d)+c,value:d,index:f,offset:c}}):i.ticks&&!n?i.ticks(t.tickCount).map(function(d){return{coordinate:i(d)+c,value:d,offset:c}}):i.domain().map(function(d,f){return{coordinate:i(d)+c,value:o?o[d]:d,index:f,offset:c}})},Ay=new WeakMap,ch=function(t,r){if(typeof r!="function")return t;Ay.has(t)||Ay.set(t,new WeakMap);var n=Ay.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},Che=function(t,r,n){var i=t.scale,o=t.type,a=t.layout,s=t.axisType;if(i==="auto")return a==="radial"&&s==="radiusAxis"?{scale:cd(),realScaleType:"band"}:a==="radial"&&s==="angleAxis"?{scale:Qp(),realScaleType:"linear"}:o==="category"&&r&&(r.indexOf("LineChart")>=0||r.indexOf("AreaChart")>=0||r.indexOf("ComposedChart")>=0&&!n)?{scale:wu(),realScaleType:"point"}:o==="category"?{scale:cd(),realScaleType:"band"}:{scale:Qp(),realScaleType:"linear"};if(Za(i)){var l="scale".concat(Lv(i));return{scale:(HT[l]||wu)(),realScaleType:HT[l]?l:"point"}}return xe(i)?{scale:i}:{scale:wu(),realScaleType:"point"}},JT=1e-4,jhe=function(t){var r=t.domain();if(!(!r||r.length<=2)){var n=r.length,i=t.range(),o=Math.min(i[0],i[1])-JT,a=Math.max(i[0],i[1])+JT,s=t(r[0]),l=t(r[n-1]);(s<o||s>a||l<o||l>a)&&t.domain([r[0],r[n-1]])}},khe=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},Nhe=function(t,r){if(!r||r.length!==2||!G(r[0])||!G(r[1]))return t;var n=Math.min(r[0],r[1]),i=Math.max(r[0],r[1]),o=[t[0],t[1]];return(!G(t[0])||t[0]<n)&&(o[0]=n),(!G(t[1])||t[1]>i)&&(o[1]=i),o[0]>i&&(o[0]=i),o[1]<n&&(o[1]=n),o},Rhe=function(t){var r=t.length;if(!(r<=0))for(var n=0,i=t[0].length;n<i;++n)for(var o=0,a=0,s=0;s<r;++s){var l=nf(t[s][n][1])?t[s][n][0]:t[s][n][1];l>=0?(t[s][n][0]=o,t[s][n][1]=o+l,o=t[s][n][1]):(t[s][n][0]=a,t[s][n][1]=a+l,a=t[s][n][1])}},$he=function(t){var r=t.length;if(!(r<=0))for(var n=0,i=t[0].length;n<i;++n)for(var o=0,a=0;a<r;++a){var s=nf(t[a][n][1])?t[a][n][0]:t[a][n][1];s>=0?(t[a][n][0]=o,t[a][n][1]=o+s,o=t[a][n][1]):(t[a][n][0]=0,t[a][n][1]=0)}},Mhe={sign:Rhe,expand:XZ,none:Dl,silhouette:QZ,wiggle:JZ,positive:$he},Ihe=function(t,r,n){var i=r.map(function(s){return s.props.dataKey}),o=Mhe[n],a=YZ().keys(i).value(function(s,l){return+kr(s,l,0)}).order(Ib).offset(o);return a(t)},Dhe=function(t,r,n,i,o,a){if(!t)return null;var s=a?r.reverse():r,l={},c=s.reduce(function(d,f){var h,v=(h=f.type)!==null&&h!==void 0&&h.defaultProps?dt(dt({},f.type.defaultProps),f.props):f.props,m=v.stackId,y=v.hide;if(y)return d;var w=v[n],b=d[w]||{hasStack:!1,stackGroups:{}};if(Ot(m)){var g=b.stackGroups[m]||{numericAxisId:n,cateAxisId:i,items:[]};g.items.push(f),b.hasStack=!0,b.stackGroups[m]=g}else b.stackGroups[of("_stackId_")]={numericAxisId:n,cateAxisId:i,items:[f]};return dt(dt({},d),{},fl({},w,b))},l),u={};return Object.keys(c).reduce(function(d,f){var h=c[f];if(h.hasStack){var v={};h.stackGroups=Object.keys(h.stackGroups).reduce(function(m,y){var w=h.stackGroups[y];return dt(dt({},m),{},fl({},y,{numericAxisId:n,cateAxisId:i,items:w.items,stackedData:Ihe(t,w.items,o)}))},v)}return dt(dt({},d),{},fl({},f,h))},u)},Lhe=function(t,r){var n=r.realScaleType,i=r.type,o=r.tickCount,a=r.originalDomain,s=r.allowDecimals,l=n||r.scale;if(l!=="auto"&&l!=="linear")return null;if(o&&i==="number"&&a&&(a[0]==="auto"||a[1]==="auto")){var c=t.domain();if(!c.length)return null;var u=Yfe(c,o,s);return t.domain([Jv(u),Qv(u)]),{niceTicks:u}}if(o&&i==="number"){var d=t.domain(),f=Xfe(d,o,s);return{niceTicks:f}}return null};function ZT(e){var t=e.axis,r=e.ticks,n=e.bandSize,i=e.entry,o=e.index,a=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!Se(i[t.dataKey])){var s=Ap(r,"value",i[t.dataKey]);if(s)return s.coordinate+n/2}return r[o]?r[o].coordinate+n/2:null}var l=kr(i,Se(a)?t.dataKey:a);return Se(l)?null:t.scale(l)}var eA=function(t){var r=t.axis,n=t.ticks,i=t.offset,o=t.bandSize,a=t.entry,s=t.index;if(r.type==="category")return n[s]?n[s].coordinate+i:null;var l=kr(a,r.dataKey,r.domain[s]);return Se(l)?null:r.scale(l)-o/2+i},Bhe=function(t){var r=t.numericAxis,n=r.scale.domain();if(r.type==="number"){var i=Math.min(n[0],n[1]),o=Math.max(n[0],n[1]);return i<=0&&o>=0?0:o<0?o:i}return n[0]},Fhe=function(t,r){var n,i=(n=t.type)!==null&&n!==void 0&&n.defaultProps?dt(dt({},t.type.defaultProps),t.props):t.props,o=i.stackId;if(Ot(o)){var a=r[o];if(a){var s=a.items.indexOf(t);return s>=0?a.stackedData[s]:null}}return null},Uhe=function(t){return t.reduce(function(r,n){return[Jv(n.concat([r[0]]).filter(G)),Qv(n.concat([r[1]]).filter(G))]},[1/0,-1/0])},oL=function(t,r,n){return Object.keys(t).reduce(function(i,o){var a=t[o],s=a.stackedData,l=s.reduce(function(c,u){var d=Uhe(u.slice(r,n+1));return[Math.min(c[0],d[0]),Math.max(c[1],d[1])]},[1/0,-1/0]);return[Math.min(l[0],i[0]),Math.max(l[1],i[1])]},[1/0,-1/0]).map(function(i){return i===1/0||i===-1/0?0:i})},tA=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,rA=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,fw=function(t,r,n){if(xe(t))return t(r,n);if(!Array.isArray(t))return r;var i=[];if(G(t[0]))i[0]=n?t[0]:Math.min(t[0],r[0]);else if(tA.test(t[0])){var o=+tA.exec(t[0])[1];i[0]=r[0]-o}else xe(t[0])?i[0]=t[0](r[0]):i[0]=r[0];if(G(t[1]))i[1]=n?t[1]:Math.max(t[1],r[1]);else if(rA.test(t[1])){var a=+rA.exec(t[1])[1];i[1]=r[1]+a}else xe(t[1])?i[1]=t[1](r[1]):i[1]=r[1];return i},im=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 o=iS(r,function(d){return d.coordinate}),a=1/0,s=1,l=o.length;s<l;s++){var c=o[s],u=o[s-1];a=Math.min((c.coordinate||0)-(u.coordinate||0),a)}return a===1/0?0:a}return n?void 0:0},nA=function(t,r,n){return!t||!t.length||Zv(t,Xr(n,"type.defaultProps.domain"))?r:t},aL=function(t,r){var n=t.type.defaultProps?dt(dt({},t.type.defaultProps),t.props):t.props,i=n.dataKey,o=n.name,a=n.unit,s=n.formatter,l=n.tooltipType,c=n.chartType,u=n.hide;return dt(dt({},Ae(t,!1)),{},{dataKey:i,unit:a,formatter:s,name:o||i,color:jS(t),value:kr(r,i),type:l,payload:r,chartType:c,hide:u})};function yd(e){"@babel/helpers - typeof";return yd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},yd(e)}function iA(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 oA(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?iA(Object(r),!0).forEach(function(n){zhe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):iA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function zhe(e,t,r){return t=Whe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Whe(e){var t=Hhe(e,"string");return yd(t)=="symbol"?t:t+""}function Hhe(e,t){if(yd(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(yd(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var om=Math.PI/180,qhe=function(t){return t*180/Math.PI},Dt=function(t,r,n,i){return{x:t+Math.cos(-om*i)*n,y:r+Math.sin(-om*i)*n}},Vhe=function(t,r){var n=t.x,i=t.y,o=r.x,a=r.y;return Math.sqrt(Math.pow(n-o,2)+Math.pow(i-a,2))},Khe=function(t,r){var n=t.x,i=t.y,o=r.cx,a=r.cy,s=Vhe({x:n,y:i},{x:o,y:a});if(s<=0)return{radius:s};var l=(n-o)/s,c=Math.acos(l);return i>a&&(c=2*Math.PI-c),{radius:s,angle:qhe(c),angleInRadian:c}},Ghe=function(t){var r=t.startAngle,n=t.endAngle,i=Math.floor(r/360),o=Math.floor(n/360),a=Math.min(i,o);return{startAngle:r-a*360,endAngle:n-a*360}},Yhe=function(t,r){var n=r.startAngle,i=r.endAngle,o=Math.floor(n/360),a=Math.floor(i/360),s=Math.min(o,a);return t+s*360},aA=function(t,r){var n=t.x,i=t.y,o=Khe({x:n,y:i},r),a=o.radius,s=o.angle,l=r.innerRadius,c=r.outerRadius;if(a<l||a>c)return!1;if(a===0)return!0;var u=Ghe(r),d=u.startAngle,f=u.endAngle,h=s,v;if(d<=f){for(;h>f;)h-=360;for(;h<d;)h+=360;v=h>=d&&h<=f}else{for(;h>d;)h-=360;for(;h<f;)h+=360;v=h>=f&&h<=d}return v?oA(oA({},r),{},{radius:a,angle:Yhe(h,r)}):null};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)}var Xhe=["offset"];function Qhe(e){return tpe(e)||epe(e)||Zhe(e)||Jhe()}function Jhe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
320In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Zhe(e,t){if(e){if(typeof e=="string")return hw(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 hw(e,t)}}function epe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function tpe(e){if(Array.isArray(e))return hw(e)}function hw(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 rpe(e,t){if(e==null)return{};var r=npe(e,t),n,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)n=o[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function npe(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 sA(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 wt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?sA(Object(r),!0).forEach(function(n){ipe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):sA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ipe(e,t,r){return t=ope(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ope(e){var t=ape(e,"string");return bd(t)=="symbol"?t:t+""}function ape(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 wd(){return wd=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},wd.apply(this,arguments)}var spe=function(t){var r=t.value,n=t.formatter,i=Se(t.children)?r:t.children;return xe(n)?n(i):i},lpe=function(t,r){var n=Pn(r-t),i=Math.min(Math.abs(r-t),360);return n*i},cpe=function(t,r,n){var i=t.position,o=t.viewBox,a=t.offset,s=t.className,l=o,c=l.cx,u=l.cy,d=l.innerRadius,f=l.outerRadius,h=l.startAngle,v=l.endAngle,m=l.clockWise,y=(d+f)/2,w=lpe(h,v),b=w>=0?1:-1,g,_;i==="insideStart"?(g=h+b*a,_=m):i==="insideEnd"?(g=v-b*a,_=!m):i==="end"&&(g=v+b*a,_=m),_=w<=0?_:!_;var S=Dt(c,u,y,g),E=Dt(c,u,y,g+(_?1:-1)*359),O="M".concat(S.x,",").concat(S.y,`
321    A`).concat(y,",").concat(y,",0,1,").concat(_?0:1,`,
322    `).concat(E.x,",").concat(E.y),P=Se(t.id)?of("recharts-radial-line-"):t.id;return A.createElement("text",wd({},n,{dominantBaseline:"central",className:Ce("recharts-radial-bar-label",s)}),A.createElement("defs",null,A.createElement("path",{id:P,d:O})),A.createElement("textPath",{xlinkHref:"#".concat(P)},r))},upe=function(t){var r=t.viewBox,n=t.offset,i=t.position,o=r,a=o.cx,s=o.cy,l=o.innerRadius,c=o.outerRadius,u=o.startAngle,d=o.endAngle,f=(u+d)/2;if(i==="outside"){var h=Dt(a,s,c+n,f),v=h.x,m=h.y;return{x:v,y:m,textAnchor:v>=a?"start":"end",verticalAnchor:"middle"}}if(i==="center")return{x:a,y:s,textAnchor:"middle",verticalAnchor:"middle"};if(i==="centerTop")return{x:a,y:s,textAnchor:"middle",verticalAnchor:"start"};if(i==="centerBottom")return{x:a,y:s,textAnchor:"middle",verticalAnchor:"end"};var y=(l+c)/2,w=Dt(a,s,y,f),b=w.x,g=w.y;return{x:b,y:g,textAnchor:"middle",verticalAnchor:"middle"}},dpe=function(t){var r=t.viewBox,n=t.parentViewBox,i=t.offset,o=t.position,a=r,s=a.x,l=a.y,c=a.width,u=a.height,d=u>=0?1:-1,f=d*i,h=d>0?"end":"start",v=d>0?"start":"end",m=c>=0?1:-1,y=m*i,w=m>0?"end":"start",b=m>0?"start":"end";if(o==="top"){var g={x:s+c/2,y:l-d*i,textAnchor:"middle",verticalAnchor:h};return wt(wt({},g),n?{height:Math.max(l-n.y,0),width:c}:{})}if(o==="bottom"){var _={x:s+c/2,y:l+u+f,textAnchor:"middle",verticalAnchor:v};return wt(wt({},_),n?{height:Math.max(n.y+n.height-(l+u),0),width:c}:{})}if(o==="left"){var S={x:s-y,y:l+u/2,textAnchor:w,verticalAnchor:"middle"};return wt(wt({},S),n?{width:Math.max(S.x-n.x,0),height:u}:{})}if(o==="right"){var E={x:s+c+y,y:l+u/2,textAnchor:b,verticalAnchor:"middle"};return wt(wt({},E),n?{width:Math.max(n.x+n.width-E.x,0),height:u}:{})}var O=n?{width:c,height:u}:{};return o==="insideLeft"?wt({x:s+y,y:l+u/2,textAnchor:b,verticalAnchor:"middle"},O):o==="insideRight"?wt({x:s+c-y,y:l+u/2,textAnchor:w,verticalAnchor:"middle"},O):o==="insideTop"?wt({x:s+c/2,y:l+f,textAnchor:"middle",verticalAnchor:v},O):o==="insideBottom"?wt({x:s+c/2,y:l+u-f,textAnchor:"middle",verticalAnchor:h},O):o==="insideTopLeft"?wt({x:s+y,y:l+f,textAnchor:b,verticalAnchor:v},O):o==="insideTopRight"?wt({x:s+c-y,y:l+f,textAnchor:w,verticalAnchor:v},O):o==="insideBottomLeft"?wt({x:s+y,y:l+u-f,textAnchor:b,verticalAnchor:h},O):o==="insideBottomRight"?wt({x:s+c-y,y:l+u-f,textAnchor:w,verticalAnchor:h},O):gc(o)&&(G(o.x)||xa(o.x))&&(G(o.y)||xa(o.y))?wt({x:s+es(o.x,c),y:l+es(o.y,u),textAnchor:"end",verticalAnchor:"end"},O):wt({x:s+c/2,y:l+u/2,textAnchor:"middle",verticalAnchor:"middle"},O)},fpe=function(t){return"cx"in t&&G(t.cx)};function Vt(e){var t=e.offset,r=t===void 0?5:t,n=rpe(e,Xhe),i=wt({offset:r},n),o=i.viewBox,a=i.position,s=i.value,l=i.children,c=i.content,u=i.className,d=u===void 0?"":u,f=i.textBreakAll;if(!o||Se(s)&&Se(l)&&!x.isValidElement(c)&&!xe(c))return null;if(x.isValidElement(c))return x.cloneElement(c,i);var h;if(xe(c)){if(h=x.createElement(c,i),x.isValidElement(h))return h}else h=spe(i);var v=fpe(o),m=Ae(i,!0);if(v&&(a==="insideStart"||a==="insideEnd"||a==="end"))return cpe(i,h,m);var y=v?upe(i):dpe(i);return A.createElement(Hp,wd({className:Ce("recharts-label",d)},m,y,{breakAll:f}),h)}Vt.displayName="Label";var sL=function(t){var r=t.cx,n=t.cy,i=t.angle,o=t.startAngle,a=t.endAngle,s=t.r,l=t.radius,c=t.innerRadius,u=t.outerRadius,d=t.x,f=t.y,h=t.top,v=t.left,m=t.width,y=t.height,w=t.clockWise,b=t.labelViewBox;if(b)return b;if(G(m)&&G(y)){if(G(d)&&G(f))return{x:d,y:f,width:m,height:y};if(G(h)&&G(v))return{x:h,y:v,width:m,height:y}}return G(d)&&G(f)?{x:d,y:f,width:0,height:0}:G(r)&&G(n)?{cx:r,cy:n,startAngle:o||i||0,endAngle:a||i||0,innerRadius:c||0,outerRadius:u||l||s||0,clockWise:w}:t.viewBox?t.viewBox:{}},hpe=function(t,r){return t?t===!0?A.createElement(Vt,{key:"label-implicit",viewBox:r}):Ot(t)?A.createElement(Vt,{key:"label-implicit",viewBox:r,value:t}):x.isValidElement(t)?t.type===Vt?x.cloneElement(t,{key:"label-implicit",viewBox:r}):A.createElement(Vt,{key:"label-implicit",content:t,viewBox:r}):xe(t)?A.createElement(Vt,{key:"label-implicit",content:t,viewBox:r}):gc(t)?A.createElement(Vt,wd({viewBox:r},t,{key:"label-implicit"})):null:null},ppe=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,o=sL(t),a=Qr(i,Vt).map(function(l,c){return x.cloneElement(l,{viewBox:r||o,key:"label-".concat(c)})});if(!n)return a;var s=hpe(t.label,r||o);return[s].concat(Qhe(a))};Vt.parseViewBox=sL;Vt.renderCallByParent=ppe;function mpe(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var vpe=mpe;const gpe=Ue(vpe);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)}var ype=["valueAccessor"],bpe=["data","dataKey","clockWise","id","textBreakAll"];function wpe(e){return Epe(e)||_pe(e)||Spe(e)||xpe()}function xpe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
323In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Spe(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 _pe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Epe(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}function am(){return am=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},am.apply(this,arguments)}function lA(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 cA(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?lA(Object(r),!0).forEach(function(n){Ope(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):lA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ope(e,t,r){return t=Ppe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ppe(e){var t=Tpe(e,"string");return xd(t)=="symbol"?t:t+""}function Tpe(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)}function uA(e,t){if(e==null)return{};var r=Ape(e,t),n,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)n=o[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Ape(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 Cpe=function(t){return Array.isArray(t.value)?gpe(t.value):t.value};function Io(e){var t=e.valueAccessor,r=t===void 0?Cpe:t,n=uA(e,ype),i=n.data,o=n.dataKey,a=n.clockWise,s=n.id,l=n.textBreakAll,c=uA(n,bpe);return!i||!i.length?null:A.createElement(pt,{className:"recharts-label-list"},i.map(function(u,d){var f=Se(o)?r(u,d):kr(u&&u.payload,o),h=Se(s)?{}:{id:"".concat(s,"-").concat(d)};return A.createElement(Vt,am({},Ae(u,!0),c,h,{parentViewBox:u.parentViewBox,value:f,textBreakAll:l,viewBox:Vt.parseViewBox(Se(a)?u:cA(cA({},u),{},{clockWise:a})),key:"label-".concat(d),index:d}))}))}Io.displayName="LabelList";function jpe(e,t){return e?e===!0?A.createElement(Io,{key:"labelList-implicit",data:t}):A.isValidElement(e)||xe(e)?A.createElement(Io,{key:"labelList-implicit",data:t,content:e}):gc(e)?A.createElement(Io,am({data:t},e,{key:"labelList-implicit"})):null:null}function kpe(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=Qr(n,Io).map(function(a,s){return x.cloneElement(a,{data:t,key:"labelList-".concat(s)})});if(!r)return i;var o=jpe(e.label,t);return[o].concat(wpe(i))}Io.renderCallByParent=kpe;function Sd(e){"@babel/helpers - typeof";return Sd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Sd(e)}function mw(){return mw=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},mw.apply(this,arguments)}function dA(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 fA(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?dA(Object(r),!0).forEach(function(n){Npe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):dA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Npe(e,t,r){return t=Rpe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Rpe(e){var t=$pe(e,"string");return Sd(t)=="symbol"?t:t+""}function $pe(e,t){if(Sd(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Sd(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Mpe=function(t,r){var n=Pn(r-t),i=Math.min(Math.abs(r-t),359.999);return n*i},uh=function(t){var r=t.cx,n=t.cy,i=t.radius,o=t.angle,a=t.sign,s=t.isExternal,l=t.cornerRadius,c=t.cornerIsExternal,u=l*(s?1:-1)+i,d=Math.asin(l/u)/om,f=c?o:o+a*d,h=Dt(r,n,u,f),v=Dt(r,n,i,f),m=c?o-a*d:o,y=Dt(r,n,u*Math.cos(d*om),m);return{center:h,circleTangency:v,lineTangency:y,theta:d}},lL=function(t){var r=t.cx,n=t.cy,i=t.innerRadius,o=t.outerRadius,a=t.startAngle,s=t.endAngle,l=Mpe(a,s),c=a+l,u=Dt(r,n,o,a),d=Dt(r,n,o,c),f="M ".concat(u.x,",").concat(u.y,`
324    A `).concat(o,",").concat(o,`,0,
325    `).concat(+(Math.abs(l)>180),",").concat(+(a>c),`,
326    `).concat(d.x,",").concat(d.y,`
327  `);if(i>0){var h=Dt(r,n,i,a),v=Dt(r,n,i,c);f+="L ".concat(v.x,",").concat(v.y,`
328            A `).concat(i,",").concat(i,`,0,
329            `).concat(+(Math.abs(l)>180),",").concat(+(a<=c),`,
330            `).concat(h.x,",").concat(h.y," Z")}else f+="L ".concat(r,",").concat(n," Z");return f},Ipe=function(t){var r=t.cx,n=t.cy,i=t.innerRadius,o=t.outerRadius,a=t.cornerRadius,s=t.forceCornerRadius,l=t.cornerIsExternal,c=t.startAngle,u=t.endAngle,d=Pn(u-c),f=uh({cx:r,cy:n,radius:o,angle:c,sign:d,cornerRadius:a,cornerIsExternal:l}),h=f.circleTangency,v=f.lineTangency,m=f.theta,y=uh({cx:r,cy:n,radius:o,angle:u,sign:-d,cornerRadius:a,cornerIsExternal:l}),w=y.circleTangency,b=y.lineTangency,g=y.theta,_=l?Math.abs(c-u):Math.abs(c-u)-m-g;if(_<0)return s?"M ".concat(v.x,",").concat(v.y,`
331        a`).concat(a,",").concat(a,",0,0,1,").concat(a*2,`,0
332        a`).concat(a,",").concat(a,",0,0,1,").concat(-a*2,`,0
333      `):lL({cx:r,cy:n,innerRadius:i,outerRadius:o,startAngle:c,endAngle:u});var S="M ".concat(v.x,",").concat(v.y,`
334    A`).concat(a,",").concat(a,",0,0,").concat(+(d<0),",").concat(h.x,",").concat(h.y,`
335    A`).concat(o,",").concat(o,",0,").concat(+(_>180),",").concat(+(d<0),",").concat(w.x,",").concat(w.y,`
336    A`).concat(a,",").concat(a,",0,0,").concat(+(d<0),",").concat(b.x,",").concat(b.y,`
337  `);if(i>0){var E=uh({cx:r,cy:n,radius:i,angle:c,sign:d,isExternal:!0,cornerRadius:a,cornerIsExternal:l}),O=E.circleTangency,P=E.lineTangency,T=E.theta,j=uh({cx:r,cy:n,radius:i,angle:u,sign:-d,isExternal:!0,cornerRadius:a,cornerIsExternal:l}),C=j.circleTangency,k=j.lineTangency,L=j.theta,M=l?Math.abs(c-u):Math.abs(c-u)-T-L;if(M<0&&a===0)return"".concat(S,"L").concat(r,",").concat(n,"Z");S+="L".concat(k.x,",").concat(k.y,`
338      A`).concat(a,",").concat(a,",0,0,").concat(+(d<0),",").concat(C.x,",").concat(C.y,`
339      A`).concat(i,",").concat(i,",0,").concat(+(M>180),",").concat(+(d>0),",").concat(O.x,",").concat(O.y,`
340      A`).concat(a,",").concat(a,",0,0,").concat(+(d<0),",").concat(P.x,",").concat(P.y,"Z")}else S+="L".concat(r,",").concat(n,"Z");return S},Dpe={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},cL=function(t){var r=fA(fA({},Dpe),t),n=r.cx,i=r.cy,o=r.innerRadius,a=r.outerRadius,s=r.cornerRadius,l=r.forceCornerRadius,c=r.cornerIsExternal,u=r.startAngle,d=r.endAngle,f
340=r.className;if(a<o||u===d)return null;var h=Ce("recharts-sector",f),v=a-o,m=es(s,v,0,!0),y;return m>0&&Math.abs(u-d)<360?y=Ipe({cx:n,cy:i,innerRadius:o,outerRadius:a,cornerRadius:Math.min(m,v/2),forceCornerRadius:l,cornerIsExternal:c,startAngle:u,endAngle:d}):y=lL({cx:n,cy:i,innerRadius:o,outerRadius:a,startAngle:u,endAngle:d}),A.createElement("path",mw({},Ae(r,!0),{className:h,d:y,role:"img"}))};function _d(e){"@babel/helpers - typeof";return _d=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},_d(e)}function vw(){return vw=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},vw.apply(this,arguments)}function hA(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 pA(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?hA(Object(r),!0).forEach(function(n){Lpe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):hA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Lpe(e,t,r){return t=Bpe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Bpe(e){var t=Fpe(e,"string");return _d(t)=="symbol"?t:t+""}function Fpe(e,t){if(_d(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(_d(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var mA={curveBasisClosed:LZ,curveBasisOpen:BZ,curveBasis:DZ,curveBumpX:_Z,curveBumpY:EZ,curveLinearClosed:FZ,curveLinear:Fv,curveMonotoneX:UZ,curveMonotoneY:zZ,curveNatural:WZ,curveStep:HZ,curveStepAfter:VZ,curveStepBefore:qZ},dh=function(t){return t.x===+t.x&&t.y===+t.y},Kc=function(t){return t.x},Gc=function(t){return t.y},Upe=function(t,r){if(xe(t))return t;var n="curve".concat(Lv(t));return(n==="curveMonotone"||n==="curveBump")&&r?mA["".concat(n).concat(r==="vertical"?"Y":"X")]:mA[n]||Fv},zpe=function(t){var r=t.type,n=r===void 0?"linear":r,i=t.points,o=i===void 0?[]:i,a=t.baseLine,s=t.layout,l=t.connectNulls,c=l===void 0?!1:l,u=Upe(n,s),d=c?o.filter(function(m){return dh(m)}):o,f;if(Array.isArray(a)){var h=c?a.filter(function(m){return dh(m)}):a,v=d.map(function(m,y){return pA(pA({},m),{},{base:h[y]})});return s==="vertical"?f=th().y(Gc).x1(Kc).x0(function(m){return m.base.x}):f=th().x(Kc).y1(Gc).y0(function(m){return m.base.y}),f.defined(dh).curve(u),f(v)}return s==="vertical"&&G(a)?f=th().y(Gc).x1(Kc).x0(a):G(a)?f=th().x(Kc).y1(Gc).y0(a):f=l2().x(Kc).y(Gc),f.defined(dh).curve(u),f(d)},gw=function(t){var r=t.className,n=t.points,i=t.path,o=t.pathRef;if((!n||!n.length)&&!i)return null;var a=n&&n.length?zpe(t):i;return x.createElement("path",vw({},Ae(t,!1),Cp(t),{className:Ce("recharts-curve",r),d:a,ref:o}))},uL={exports:{}},Wpe="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",Hpe=Wpe,qpe=Hpe;function dL(){}function fL(){}fL.resetWarningCache=dL;var Vpe=function(){function e(n,i,o,a,s,l){if(l!==qpe){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}e.isRequired=e;function t(){return e}var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:fL,resetWarningCache:dL};return r.PropTypes=r,r};uL.exports=Vpe();var Kpe=uL.exports;const Re=Ue(Kpe);var Gpe=Object.getOwnPropertyNames,Ype=Object.getOwnPropertySymbols,Xpe=Object.prototype.hasOwnProperty;function vA(e,t){return function(n,i,o){return e(n,i,o)&&t(n,i,o)}}function fh(e){return function(r,n,i){if(!r||!n||typeof r!="object"||typeof n!="object")return e(r,n,i);var o=i.cache,a=o.get(r),s=o.get(n);if(a&&s)return a===n&&s===r;o.set(r,n),o.set(n,r);var l=e(r,n,i);return o.delete(r),o.delete(n),l}}function gA(e){return Gpe(e).concat(Ype(e))}var Qpe=Object.hasOwn||function(e,t){return Xpe.call(e,t)};function hs(e,t){return e===t||!e&&!t&&e!==e&&t!==t}var Jpe="__v",Zpe="__o",eme="_owner",yA=Object.getOwnPropertyDescriptor,bA=Object.keys;function tme(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 rme(e,t){return hs(e.getTime(),t.getTime())}function nme(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function ime(e,t){return e===t}function wA(e,t,r){var n=e.size;if(n!==t.size)return!1;if(!n)return!0;for(var i=new Array(n),o=e.entries(),a,s,l=0;(a=o.next())&&!a.done;){for(var c=t.entries(),u=!1,d=0;(s=c.next())&&!s.done;){if(i[d]){d++;continue}var f=a.value,h=s.value;if(r.equals(f[0],h[0],l,d,e,t,r)&&r.equals(f[1],h[1],f[0],h[0],e,t,r)){u=i[d]=!0;break}d++}if(!u)return!1;l++}return!0}var ome=hs;function ame(e,t,r){var n=bA(e),i=n.length;if(bA(t).length!==i)return!1;for(;i-- >0;)if(!hL(e,t,r,n[i]))return!1;return!0}function Yc(e,t,r){var n=gA(e),i=n.length;if(gA(t).length!==i)return!1;for(var o,a,s;i-- >0;)if(o=n[i],!hL(e,t,r,o)||(a=yA(e,o),s=yA(t,o),(a||s)&&(!a||!s||a.configurable!==s.configurable||a.enumerable!==s.enumerable||a.writable!==s.writable)))return!1;return!0}function sme(e,t){return hs(e.valueOf(),t.valueOf())}function lme(e,t){return e.source===t.source&&e.flags===t.flags}function xA(e,t,r){var n=e.size;if(n!==t.size)return!1;if(!n)return!0;for(var i=new Array(n),o=e.values(),a,s;(a=o.next())&&!a.done;){for(var l=t.values(),c=!1,u=0;(s=l.next())&&!s.done;){if(!i[u]&&r.equals(a.value,s.value,a.value,s.value,e,t,r)){c=i[u]=!0;break}u++}if(!c)return!1}return!0}function cme(e,t){var r=e.length;if(t.length!==r)return!1;for(;r-- >0;)if(e[r]!==t[r])return!1;return!0}function ume(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function hL(e,t,r,n){return(n===eme||n===Zpe||n===Jpe)&&(e.$$typeof||t.$$typeof)?!0:Qpe(t,n)&&r.equals(e[n],t[n],n,n,e,t,r)}var dme="[object Arguments]",fme="[object Boolean]",hme="[object Date]",pme="[object Error]",mme="[object Map]",vme="[object Number]",gme="[object Object]",yme="[object RegExp]",bme="[object Set]",wme="[object String]",xme="[object URL]",Sme=Array.isArray,SA=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,_A=Object.assign,_me=Object.prototype.toString.call.bind(Object.prototype.toString);function Eme(e){var t=e.areArraysEqual,r=e.areDatesEqual,n=e.areErrorsEqual,i=e.areFunctionsEqual,o=e.areMapsEqual,a=e.areNumbersEqual,s=e.areObjectsEqual,l=e.arePrimitiveWrappersEqual,c=e.areRegExpsEqual,u=e.areSetsEqual,d=e.areTypedArraysEqual,f=e.areUrlsEqual;return function(v,m,y){if(v===m)return!0;
340if(v==null||m==null)return!1;var w=typeof v;if(w!==typeof m)return!1;if(w!=="object")return w==="number"?a(v,m,y):w==="function"?i(v,m,y):!1;var b=v.constructor;if(b!==m.constructor)return!1;if(b===Object)return s(v,m,y);if(Sme(v))return t(v,m,y);if(SA!=null&&SA(v))return d(v,m,y);if(b===Date)return r(v,m,y);if(b===RegExp)return c(v,m,y);if(b===Map)return o(v,m,y);if(b===Set)return u(v,m,y);var g=_me(v);return g===hme?r(v,m,y):g===yme?c(v,m,y):g===mme?o(v,m,y):g===bme?u(v,m,y):g===gme?typeof v.then!="function"&&typeof m.then!="function"&&s(v,m,y):g===xme?f(v,m,y):g===pme?n(v,m,y):g===dme?s(v,m,y):g===fme||g===vme||g===wme?l(v,m,y):!1}}function Ome(e){var t=e.circular,r=e.createCustomConfig,n=e.strict,i={areArraysEqual:n?Yc:tme,areDatesEqual:rme,areErrorsEqual:nme,areFunctionsEqual:ime,areMapsEqual:n?vA(wA,Yc):wA,areNumbersEqual:ome,areObjectsEqual:n?Yc:ame,arePrimitiveWrappersEqual:sme,areRegExpsEqual:lme,areSetsEqual:n?vA(xA,Yc):xA,areTypedArraysEqual:n?Yc:cme,areUrlsEqual:ume};if(r&&(i=_A({},i,r(i))),t){var o=fh(i.areArraysEqual),a=fh(i.areMapsEqual),s=fh(i.areObjectsEqual),l=fh(i.areSetsEqual);i=_A({},i,{areArraysEqual:o,areMapsEqual:a,areObjectsEqual:s,areSetsEqual:l})}return i}function Pme(e){return function(t,r,n,i,o,a,s){return e(t,r,s)}}function Tme(e){var t=e.circular,r=e.comparator,n=e.createState,i=e.equals,o=e.strict;if(n)return function(l,c){var u=n(),d=u.cache,f=d===void 0?t?new WeakMap:void 0:d,h=u.meta;return r(l,c,{cache:f,equals:i,meta:h,strict:o})};if(t)return function(l,c){return r(l,c,{cache:new WeakMap,equals:i,meta:void 0,strict:o})};var a={cache:void 0,equals:i,meta:void 0,strict:o};return function(l,c){return r(l,c,a)}}var Ame=na();na({strict:!0});na({circular:!0});na({circular:!0,strict:!0});na({createInternalComparator:function(){return hs}});na({strict:!0,createInternalComparator:function(){return hs}});na({circular:!0,createInternalComparator:function(){return hs}});na({circular:!0,createInternalComparator:function(){return hs},strict:!0});function na(e){e===void 0&&(e={});var t=e.circular,r=t===void 0?!1:t,n=e.createInternalComparator,i=e.createState,o=e.strict,a=o===void 0?!1:o,s=Ome(e),l=Eme(s),c=n?n(l):Pme(l);return Tme({circular:r,comparator:l,createState:i,equals:c,strict:a})}function Cme(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function EA(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=-1,n=function i(o){r<0&&(r=o),o-r>t?(e(o),r=-1):Cme(i)};requestAnimationFrame(n)}function yw(e){"@babel/helpers - typeof";return yw=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},yw(e)}function jme(e){return $me(e)||Rme(e)||Nme(e)||kme()}function kme(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
341In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Nme(e,t){if(e){if(typeof e=="string")return OA(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 OA(e,t)}}function OA(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 Rme(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function $me(e){if(Array.isArray(e))return e}function Mme(){var e={},t=function(){return null},r=!1,n=function i(o){if(!r){if(Array.isArray(o)){if(!o.length)return;var a=o,s=jme(a),l=s[0],c=s.slice(1);if(typeof l=="number"){EA(i.bind(null,c),l);return}i(l),EA(i.bind(null,c));return}yw(o)==="object"&&(e=o,t(e)),typeof o=="function"&&o()}};return{stop:function(){r=!0},start:function(o){r=!1,n(o)},subscribe:function(o){return t=o,function(){t=function(){return null}}}}}function Ed(e){"@babel/helpers - typeof";return Ed=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},Ed(e)}function PA(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 TA(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};
vendor: 158,335 bytes, lines 341-363
341t%2?PA(Object(r),!0).forEach(function(n){pL(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):PA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function pL(e,t,r){return t=Ime(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ime(e){var t=Dme(e,"string");return Ed(t)==="symbol"?t:String(t)}function Dme(e,t){if(Ed(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Ed(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Lme=function(t,r){return[Object.keys(t),Object.keys(r)].reduce(function(n,i){return n.filter(function(o){return i.includes(o)})})},Bme=function(t){return t},Fme=function(t){return t.replace(/([A-Z])/g,function(r){return"-".concat(r.toLowerCase())})},Su=function(t,r){return Object.keys(r).reduce(function(n,i){return TA(TA({},n),{},pL({},i,t(i,r[i])))},{})},AA=function(t,r,n){return t.map(function(i){return"".concat(Fme(i)," ").concat(r,"ms ").concat(n)}).join(",")};function Ume(e,t){return Hme(e)||Wme(e,t)||mL(e,t)||zme()}function zme(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
342In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Wme(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,o,a,s=[],l=!0,c=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(l=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(u){c=!0,i=u}finally{try{if(!l&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}function Hme(e){if(Array.isArray(e))return e}function qme(e){return Gme(e)||Kme(e)||mL(e)||Vme()}function Vme(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
343In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function mL(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 Kme(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Gme(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}var sm=1e-4,vL=function(t,r){return[0,3*t,3*r-6*t,3*t-3*r+1]},gL=function(t,r){return t.map(function(n,i){return n*Math.pow(r,i)}).reduce(function(n,i){return n+i})},CA=function(t,r){return function(n){var i=vL(t,r);return gL(i,n)}},Yme=function(t,r){return function(n){var i=vL(t,r),o=[].concat(qme(i.map(function(a,s){return a*s}).slice(1)),[0]);return gL(o,n)}},jA=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var i=r[0],o=r[1],a=r[2],s=r[3];if(r.length===1)switch(r[0]){case"linear":i=0,o=0,a=1,s=1;break;case"ease":i=.25,o=.1,a=.25,s=1;break;case"ease-in":i=.42,o=0,a=1,s=1;break;case"ease-out":i=.42,o=0,a=.58,s=1;break;case"ease-in-out":i=0,o=0,a=.58,s=1;break;default:{var l=r[0].split("(");if(l[0]==="cubic-bezier"&&l[1].split(")")[0].split(",").length===4){var c=l[1].split(")")[0].split(",").map(function(y){return parseFloat(y)}),u=Ume(c,4);i=u[0],o=u[1],a=u[2],s=u[3]}}}var d=CA(i,a),f=CA(o,s),h=Yme(i,a),v=function(w){return w>1?1:w<0?0:w},m=function(w){for(var b=w>1?1:w,g=b,_=0;_<8;++_){var S=d(g)-b,E=h(g);if(Math.abs(S-b)<sm||E<sm)return f(g);g=v(g-S/E)}return f(g)};return m.isStepper=!1,m},Xme=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.stiff,n=r===void 0?100:r,i=t.damping,o=i===void 0?8:i,a=t.dt,s=a===void 0?17:a,l=function(u,d,f){var h=-(u-d)*n,v=f*o,m=f+(h-v)*s/1e3,y=f*s/1e3+u;return Math.abs(y-d)<sm&&Math.abs(m)<sm?[d,0]:[y,m]};return l.isStepper=!0,l.dt=s,l},Qme=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 jA(i);case"spring":return Xme();default:if(i.split("(")[0]==="cubic-bezier")return jA(i)}return typeof i=="function"?i:null};function Od(e){"@babel/helpers - typeof";return Od=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Od(e)}function kA(e){return eve(e)||Zme(e)||yL(e)||Jme()}function Jme(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
344In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Zme(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function eve(e){if(Array.isArray(e))return xw(e)}function NA(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 Mt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?NA(Object(r),!0).forEach(function(n){ww(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):NA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ww(e,t,r){return t=tve(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function tve(e){var t=rve(e,"string");return Od(t)==="symbol"?t:String(t)}function rve(e,t){if(Od(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Od(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function nve(e,t){return ave(e)||ove(e,t)||yL(e,t)||ive()}function ive(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
345In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function yL(e,t){if(e){if(typeof e=="string")return xw(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 xw(e,t)}}function xw(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 ove(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,o,a,s=[],l=!0,c=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(l=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(u){c=!0,i=u}finally{try{if(!l&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}function ave(e){if(Array.isArray(e))return e}var lm=function(t,r,n){return t+(r-t)*n},Sw=function(t){var r=t.from,n=t.to;return r!==n},sve=function e(t,r,n){var i=Su(function(o,a){if(Sw(a)){var s=t(a.from,a.to,a.velocity),l=nve(s,2),c=l[0],u=l[1];return Mt(Mt({},a),{},{from:c,velocity:u})}return a},r);return n<1?Su(function(o,a){return Sw(a)?Mt(Mt({},a),{},{velocity:lm(a.velocity,i[o].velocity,n),from:lm(a.from,i[o].from,n)}):a},r):e(t,i,n-1)};const lve=function(e,t,r,n,i){var o=Lme(e,t),a=o.reduce(function(y,w){return Mt(Mt({},y),{},ww({},w,[e[w],t[w]]))},{}),s=o.reduce(function(y,w){return Mt(Mt({},y),{},ww({},w,{from:e[w],velocity:0,to:t[w]}))},{}),l=-1,c,u,d=function(){return null},f=function(){return Su(function(w,b){return b.from},s)},h=function(){return!Object.values(s).filter(Sw).length},v=function(w){c||(c=w);var b=w-c,g=b/r.dt;s=sve(r,s,g),i(Mt(Mt(Mt({},e),t),f())),c=w,h()||(l=requestAnimationFrame(d))},m=function(w){u||(u=w);var b=(w-u)/n,g=Su(function(S,E){return lm.apply(void 0,kA(E).concat([r(b)]))},a);if(i(Mt(Mt(Mt({},e),t),g)),b<1)l=requestAnimationFrame(d);else{var _=Su(function(S,E){return lm.apply(void 0,kA(E).concat([r(1)]))},a);i(Mt(Mt(Mt({},e),t),_))}};return d=r.isStepper?v:m,function(){return requestAnimationFrame(d),function(){cancelAnimationFrame(l)}}};function Vl(e){"@babel/helpers - typeof";return Vl=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},Vl(e)}var cve=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function uve(e,t){if(e==null)return{};var r=dve(e,t),n,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)n=o[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function dve(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,o;for(o=0;o<n.length;o++)i=n[o],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}function Cy(e){return mve(e)||pve(e)||hve(e)||fve()}function fve(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
346In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function hve(e,t){if(e){if(typeof e=="string")return _w(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 _w(e,t)}}function pve(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function mve(e){if(Array.isArray(e))return _w(e)}function _w(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 RA(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 fn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?RA(Object(r),!0).forEach(function(n){ou(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):RA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ou(e,t,r){return t=bL(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function vve(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function gve(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,bL(n.key),n)}}function yve(e,t,r){return t&&gve(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function bL(e){var t=bve(e,"string");return Vl(t)==="symbol"?t:String(t)}function bve(e,t){if(Vl(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Vl(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function wve(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 xve(e){var t=Sve();return function(){var n=cm(e),i;if(t){var o=cm(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return Ow(this,i)}}function Ow(e,t){if(t&&(Vl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Pw(e)}function Pw(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Sve(){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 cm(e){return cm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},cm(e)}var Bi=function(e){wve(r,e);var t=xve(r);function r(n,i){var o;vve(this,r),o=t.call(this,n,i);var a=o.props,s=a.isActive,l=a.attributeName,c=a.from,u=a.to,d=a.steps,f=a.children,h=a.duration;if(o.handleStyleChange=o.handleStyleChange.bind(Pw(o)),o.changeStyle=o.changeStyle.bind(Pw(o)),!s||h<=0)return o.state={style:{}},typeof f=="function"&&(o.state={style:u}),Ow(o);if(d&&d.length)o.state={style:d[0].style};else if(c){if(typeof f=="function")return o.state={style:c},Ow(o);o.state={style:l?ou({},l,c):c}}else o.state={style:{}};return o}return yve(r,[{key:"componentDidMount",value:function(){var i=this.props,o=i.isActive,a=i.canBegin;this.mounted=!0,!(!o||!a)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(i){var o=this.props,a=o.isActive,s=o.canBegin,l=o.attributeName,c=o.shouldReAnimate,u=o.to,d=o.from,f=this.state.style;if(s){if(!a){var h={style:l?ou({},l,u):u};this.state&&f&&(l&&f[l]!==u||!l&&f!==u)&&this.setState(h);return}if(!(Ame(i.to,u)&&i.canBegin&&i.isActive)){var v=!i.canBegin||!i.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var m=v||c?d:i.to;if(this.state&&f){var y={style:l?ou({},l,m):m};(l&&f[l]!==m||!l&&f!==m)&&this.setState(y)}this.runAnimation(fn(fn({},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 o=this,a=i.from,s=i.to,l=i.duration,c=i.easing,u=i.begin,d=i.onAnimationEnd,f=i.onAnimationStart,h=lve(a,s,Qme(c),l,this.changeStyle),v=function(){o.stopJSAnimation=h()};this.manager.start([f,u,v,l,d])}},{key:"runStepAnimation",value:function(i){var o=this,a=i.steps,s=i.begin,l=i.onAnimationStart,c=a[0],u=c.style,d=c.duration,f=d===void 0?0:d,h=function(m,y,w){if(w===0)return m;var b=y.duration,g=y.easing,_=g===void 0?"ease":g,S=y.style,E=y.properties,O=y.onAnimationEnd,P=w>0?a[w-1]:y,T=E||Object.keys(S);if(typeof _=="function"||_==="spring")return[].concat(Cy(m),[o.runJSAnimation.bind(o,{from:P.style,to:S,duration:b,easing:_}),b]);var j=AA(T,b,_),C=fn(fn(fn({},P.style),S),{},{transition:j});return[].concat(Cy(m),[C,b,O]).filter(Bme)};return this.manager.start([l].concat(Cy(a.reduce(h,[u,Math.max(f,s)])),[i.onAnimationEnd]))}},{key:"runAnimation",value:function(i){this.manager||(this.manager=Mme());var o=i.begin,a=i.duration,s=i.attributeName,l=i.to,c=i.easing,u=i.onAnimationStart,d=i.onAnimationEnd,f=i.steps,h=i.children,v=this.manager;if(this.unSubscribe=v.subscribe(this.handleStyleChange),typeof c=="function"||typeof h=="function"||c==="spring"){this.runJSAnimation(i);return}if(f.length>1){this.runStepAnimation(i);return}var m=s?ou({},s,l):l,y=AA(Object.keys(m),a,c);v.start([u,o,fn(fn({},m),{},{transition:y}),a,d])}},{key:"render",value:function(){var i=this.props,o=i.children;i.begin;var a=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 l=uve(i,cve),c=x.Children.count(o),u=this.state.style;if(typeof o=="function")return o(u);if(!s||c===0||a<=0)return o;var d=function(h){var v=h.props,m=v.style,y=m===void 0?{}:m,w=v.className,b=x.cloneElement(h,fn(fn({},l),{},{style:fn(fn({},y),u),className:w}));return b};return c===1?d(x.Children.only(o)):A.createElement("div",null,x.Children.map(o,function(f){return d(f)}))}}]),r}(x.PureComponent);Bi.displayName="Animate";Bi.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};Bi.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};function Pd(e){"@babel/helpers - typeof";return Pd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Pd(e)}function um(){return um=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},um.apply(this,arguments)}function _ve(e,t){return Tve(e)||Pve(e,t)||Ove(e,t)||Eve()}function Eve(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
347In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ove(e,t){if(e){if(typeof e=="string")return $A(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 $A(e,t)}}function $A(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 Pve(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,o,a,s=[],l=!0,c=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(l=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(u){c=!0,i=u}finally{try{if(!l&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}function Tve(e){if(Array.isArray(e))return e}function MA(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 IA(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?MA(Object(r),!0).forEach(function(n){Ave(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):MA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ave(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=jve(e,"string");return Pd(t)=="symbol"?t:t+""}function jve(e,t){if(Pd(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Pd(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var DA=function(t,r,n,i,o){var a=Math.min(Math.abs(n)/2,Math.abs(i)/2),s=i>=0?1:-1,l=n>=0?1:-1,c=i>=0&&n>=0||i<0&&n<0?1:0,u;if(a>0&&o instanceof Array){for(var d=[0,0,0,0],f=0,h=4;f<h;f++)d[f]=o[f]>a?a:o[f];u="M".concat(t,",").concat(r+s*d[0]),d[0]>0&&(u+="A ".concat(d[0],",").concat(d[0],",0,0,").concat(c,",").concat(t+l*d[0],",").concat(r)),u+="L ".concat(t+n-l*d[1],",").concat(r),d[1]>0&&(u+="A ".concat(d[1],",").concat(d[1],",0,0,").concat(c,`,
348        `).concat(t+n,",").concat(r+s*d[1])),u+="L ".concat(t+n,",").concat(r+i-s*d[2]),d[2]>0&&(u+="A ".concat(d[2],",").concat(d[2],",0,0,").concat(c,`,
349        `).concat(t+n-l*d[2],",").concat(r+i)),u+="L ".concat(t+l*d[3],",").concat(r+i),d[3]>0&&(u+="A ".concat(d[3],",").concat(d[3],",0,0,").concat(c,`,
350        `).concat(t,",").concat(r+i-s*d[3])),u+="Z"}else if(a>0&&o===+o&&o>0){var v=Math.min(a,o);u="M ".concat(t,",").concat(r+s*v,`
351            A `).concat(v,",").concat(v,",0,0,").concat(c,",").concat(t+l*v,",").concat(r,`
352            L `).concat(t+n-l*v,",").concat(r,`
353            A `).concat(v,",").concat(v,",0,0,").concat(c,",").concat(t+n,",").concat(r+s*v,`
354            L `).concat(t+n,",").concat(r+i-s*v,`
355            A `).concat(v,",").concat(v,",0,0,").concat(c,",").concat(t+n-l*v,",").concat(r+i,`
356            L `).concat(t+l*v,",").concat(r+i,`
357            A `).concat(v,",").concat(v,",0,0,").concat(c,",").concat(t,",").concat(r+i-s*v," Z")}else u="M ".concat(t,",").concat(r," h ").concat(n," v ").concat(i," h ").concat(-n," Z");return u},kve=function(t,r){if(!t||!r)return!1;var n=t.x,i=t.y,o=r.x,a=r.y,s=r.width,l=r.height;if(Math.abs(s)>0&&Math.abs(l)>0){var c=Math.min(o,o+s),u=Math.max(o,o+s),d=Math.min(a,a+l),f=Math.max(a,a+l);return n>=c&&n<=u&&i>=d&&i<=f}return!1},Nve={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},kS=function(t){var r=IA(IA({},Nve),t),n=x.useRef(),i=x.useState(-1),o=_ve(i,2),a=o[0],s=o[1];x.useEffect(function(){if(n.current&&n.current.getTotalLength)try{var _=n.current.getTotalLength();_&&s(_)}catch{}},[]);var l=r.x,c=r.y,u=r.width,d=r.height,f=r.radius,h=r.className,v=r.animationEasing,m=r.animationDuration,y=r.animationBegin,w=r.isAnimationActive,b=r.isUpdateAnimationActive;if(l!==+l||c!==+c||u!==+u||d!==+d||u===0||d===0)return null;var g=Ce("recharts-rectangle",h);return b?A.createElement(Bi,{canBegin:a>0,from:{width:u,height:d,x:l,y:c},to:{width:u,height:d,x:l,y:c},duration:m,animationEasing:v,isActive:b},function(_){var S=_.width,E=_.height,O=_.x,P=_.y;return A.createElement(Bi,{canBegin:a>0,from:"0px ".concat(a===-1?1:a,"px"),to:"".concat(a,"px 0px"),attributeName:"strokeDasharray",begin:y,duration:m,isActive:w,easing:v},A.createElement("path",um({},Ae(r,!0),{className:g,d:DA(O,P,S,E,f),ref:n})))}):A.createElement("path",um({},Ae(r,!0),{className:g,d:DA(l,c,u,d,f)}))};function Tw(){return Tw=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},Tw.apply(this,arguments)}var NS=function(t){var r=t.cx,n=t.cy,i=t.r,o=t.className,a=Ce("recharts-dot",o);return r===+r&&n===+n&&i===+i?x.createElement("circle",Tw({},Ae(t,!1),Cp(t),{className:a,cx:r,cy:n,r:i})):null};function Td(e){"@babel/helpers - typeof";return Td=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Td(e)}var Rve=["x","y","top","left","width","height","className"];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 LA(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 $ve(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?LA(Object(r),!0).forEach(function(n){Mve(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):LA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Mve(e,t,r){return t=Ive(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ive(e){var t=Dve(e,"string");return Td(t)=="symbol"?t:t+""}function Dve(e,t){if(Td(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Td(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Lve(e,t){if(e==null)return{};var r=Bve(e,t),n,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)n=o[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Bve(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 Fve=function(t,r,n,i,o,a){return"M".concat(t,",").concat(o,"v").concat(i,"M").concat(a,",").concat(r,"h").concat(n)},Uve=function(t){var r=t.x,n=r===void 0?0:r,i=t.y,o=i===void 0?0:i,a=t.top,s=a===void 0?0:a,l=t.left,c=l===void 0?0:l,u=t.width,d=u===void 0?0:u,f=t.height,h=f===void 0?0:f,v=t.className,m=Lve(t,Rve),y=$ve({x:n,y:o,top:s,left:c,width:d,height:h},m);return!G(n)||!G(o)||!G(d)||!G(h)||!G(s)||!G(c)?null:A.createElement("path",Aw({},Ae(y,!0),{className:Ce("recharts-cross",v),d:Fve(n,o,d,h,s,c)}))},zve=N2,Wve=zve(Object.getPrototypeOf,Object),Hve=Wve,qve=zi,Vve=Hve,Kve=Wi,Gve="[object Object]",Yve=Function.prototype,Xve=Object.prototype,wL=Yve.toString,Qve=Xve.hasOwnProperty,Jve=wL.call(Object);function Zve(e){if(!Kve(e)||qve(e)!=Gve)return!1;var t=Vve(e);if(t===null)return!0;var r=Qve.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&wL.call(r)==Jve}var ege=Zve;const tge=Ue(ege);var rge=zi,nge=Wi,ige="[object Boolean]";function oge(e){return e===!0||e===!1||nge(e)&&rge(e)==ige}var age=oge;const sge=Ue(age);function Ad(e){"@babel/helpers - typeof";return Ad=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ad(e)}function dm(){return dm=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},dm.apply(this,arguments)}function lge(e,t){return fge(e)||dge(e,t)||uge(e,t)||cge()}function cge(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
358In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function uge(e,t){if(e){if(typeof e=="string")return BA(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 BA(e,t)}}function BA(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 dge(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,o,a,s=[],l=!0,c=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(l=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(u){c=!0,i=u}finally{try{if(!l&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}function fge(e){if(Array.isArray(e))return e}function FA(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 UA(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?FA(Object(r),!0).forEach(function(n){hge(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):FA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function hge(e,t,r){return t=pge(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function pge(e){var t=mge(e,"string");return Ad(t)=="symbol"?t:t+""}function mge(e,t){if(Ad(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Ad(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var zA=function(t,r,n,i,o){var a=n-i,s;return s="M ".concat(t,",").concat(r),s+="L ".concat(t+n,",").concat(r),s+="L ".concat(t+n-a/2,",").concat(r+o),s+="L ".concat(t+n-a/2-i,",").concat(r+o),s+="L ".concat(t,",").concat(r," Z"),s},vge={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},gge=function(t){var r=UA(UA({},vge),t),n=x.useRef(),i=x.useState(-1),o=lge(i,2),a=o[0],s=o[1];x.useEffect(function(){if(n.current&&n.current.getTotalLength)try{var g=n.current.getTotalLength();g&&s(g)}catch{}},[]);var l=r.x,c=r.y,u=r.upperWidth,d=r.lowerWidth,f=r.height,h=r.className,v=r.animationEasing,m=r.animationDuration,y=r.animationBegin,w=r.isUpdateAnimationActive;if(l!==+l||c!==+c||u!==+u||d!==+d||f!==+f||u===0&&d===0||f===0)return null;var b=Ce("recharts-trapezoid",h);return w?A.createElement(Bi,{canBegin:a>0,from:{upperWidth:0,lowerWidth:0,height:f,x:l,y:c},to:{upperWidth:u,lowerWidth:d,height:f,x:l,y:c},duration:m,animationEasing:v,isActive:w},function(g){var _=g.upperWidth,S=g.lowerWidth,E=g.height,O=g.x,P=g.y;return A.createElement(Bi,{canBegin:a>0,from:"0px ".concat(a===-1?1:a,"px"),to:"".concat(a,"px 0px"),attributeName:"strokeDasharray",begin:y,duration:m,easing:v},A.createElement("path",dm({},Ae(r,!0),{className:b,d:zA(O,P,_,S,E),ref:n})))}):A.createElement("g",null,A.createElement("path",dm({},Ae(r,!0),{className:b,d:zA(l,c,u,d,f)})))},yge=["option","shapeType","propTransformer","activeClassName","isActive"];function Cd(e){"@babel/helpers - typeof";return Cd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Cd(e)}function bge(e,t){if(e==null)return{};var r=wge(e,t),n,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)n=o[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function wge(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 WA(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 fm(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?WA(Object(r),!0).forEach(function(n){xge(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):WA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function xge(e,t,r){return t=Sge(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Sge(e){var t=_ge(e,"string");return Cd(t)=="symbol"?t:t+""}function _ge(e,t){if(Cd(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Cd(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ege(e,t){return fm(fm({},t),e)}function Oge(e,t){return e==="symbols"}function HA(e){var t=e.shapeType,r=e.elementProps;switch(t){case"rectangle":return A.createElement(kS,r);case"trapezoid":return A.createElement(gge,r);case"sector":return A.createElement(cL,r);case"symbols":if(Oge(t))return A.createElement(X1,r);break;default:return null}}function Pge(e){return x.isValidElement(e)?e.props:e}function Tge(e){var t=e.option,r=e.shapeType,n=e.propTransformer,i=n===void 0?Ege:n,o=e.activeClassName,a=o===void 0?"recharts-active-shape":o,s=e.isActive,l=bge(e,yge),c;if(x.isValidElement(t))c=x.cloneElement(t,fm(fm({},l),Pge(t)));else if(xe(t))c=t(l);else if(tge(t)&&!sge(t)){var u=i(t,l);c=A.createElement(HA,{shapeType:r,elementProps:u})}else{var d=l;c=A.createElement(HA,{shapeType:r,elementProps:d})}return s?A.createElement(pt,{className:a},c):c}function rg(e,t){return t!=null&&"trapezoids"in e.props}function ng(e,t){return t!=null&&"sectors"in e.props}function jd(e,t){return t!=null&&"points"in e.props}function Age(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,o=e.y===(t==null||(n=t.labelViewBox)===null||n===void 0?void 0:n.y)||e.y===t.y;return i&&o}function Cge(e,t){var r=e.endAngle===t.endAngle,n=e.startAngle===t.startAngle;return r&&n}function jge(e,t){var r=e.x===t.x,n=e.y===t.y,i=e.z===t.z;return r&&n&&i}function kge(e,t){var r;return rg(e,t)?r=Age:ng(e,t)?r=Cge:jd(e,t)&&(r=jge),r}function Nge(e,t){var r;return rg(e,t)?r="trapezoids":ng(e,t)?r="sectors":jd(e,t)&&(r="points"),r}function Rge(e,t){if(rg(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(ng(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 jd(e,t)?t.payload:{}}function $ge(e){var t=e.activeTooltipItem,r=e.graphicalItem,n=e.itemData,i=Nge(r,t),o=Rge(r,t),a=n.filter(function(l,c){var u=Zv(o,l),d=r.props[i].filter(function(v){var m=kge(r,t);return m(v,t)}),f=r.props[i].indexOf(d[d.length-1]),h=c===f;return u&&h}),s=n.indexOf(a[a.length-1]);return s}var Mge=Math.ceil,Ige=Math.max;function Dge(e,t,r,n){for(var i=-1,o=Ige(Mge((t-e)/(r||1)),0),a=Array(o);o--;)a[n?o:++i]=e,e+=r;return a}var Lge=Dge,Bge=Q2,qA=1/0,Fge=17976931348623157e292;function Uge(e){if(!e)return e===0?e:0;if(e=Bge(e),e===qA||e===-qA){var t=e<0?-1:1;return t*Fge}return e===e?e:0}var xL=Uge,zge=Lge,Wge=Hv,jy=xL;function Hge(e){return function(t,r,n){return n&&typeof n!="number"&&Wge(t,r,n)&&(r=n=void 0),t=jy(t),r===void 0?(r=t,t=0):r=jy(r),n=n===void 0?t<r?1:-1:jy(n),zge(t,r,n,e)}}var qge=Hge,Vge=qge,Kge=Vge(),Gge=Kge;const hm=Ue(Gge);function kd(e){"@babel/helpers - typeof";return kd=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},kd(e)}function VA(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 KA(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?VA(Object(r),!0).forEach(function(n){SL(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):VA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function SL(e,t,r){return t=Yge(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Yge(e){var t=Xge(e,"string");return kd(t)=="symbol"?t:t+""}function Xge(e,t){if(kd(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(kd(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Qge=["Webkit","Moz","O","ms"],Jge=function(t,r){var n=t.replace(/(\w)/,function(o){return o.toUpperCase()}),i=Qge.reduce(function(o,a){return KA(KA({},o),{},SL({},a+n,r))},{});return i[t]=r,i};function Kl(e){"@babel/helpers - typeof";return Kl=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},Kl(e)}function pm(){return pm=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},pm.apply(this,arguments)}function GA(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 ky(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?GA(Object(r),!0).forEach(function(n){xr(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):GA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Zge(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function YA(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 eye(e,t,r){return t&&YA(e.prototype,t),r&&YA(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function tye(e,t,r){return t=mm(t),rye(e,_L()?Reflect.construct(t,r||[],mm(e).constructor):t.apply(e,r))}function rye(e,t){if(t&&(Kl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return nye(e)}function nye(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _L(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(_L=function(){return!!e})()}function mm(e){return mm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},mm(e)}function iye(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 xr(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=oye(e,"string");return Kl(t)=="symbol"?t:t+""}function oye(e,t){if(Kl(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Kl(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var aye=function(t){var r=t.data,n=t.startIndex,i=t.endIndex,o=t.x,a=t.width,s=t.travellerWidth;if(!r||!r.length)return{};var l=r.length,c=wu().domain(hm(0,l)).range([o,o+a-s]),u=c.domain().map(function(d){return c(d)});return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:c(n),endX:c(i),scale:c,scaleValues:u}},XA=function(t){return t.changedTouches&&!!t.changedTouches.length},Gl=function(e){function t(r){var n;return Zge(this,t),n=tye(this,t,[r]),xr(n,"handleDrag",function(i){n.leaveTimer&&(clearTimeout(n.leaveTimer),n.leaveTimer=null),n.state.isTravellerMoving?n.handleTravellerMove(i):n.state.isSlideMoving&&n.handleSlideDrag(i)}),xr(n,"handleTouchMove",function(i){i.changedTouches!=null&&i.changedTouches.length>0&&n.handleDrag(i.changedTouches[0])}),xr(n,"handleDragEnd",function(){n.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var i=n.props,o=i.endIndex,a=i.onDragEnd,s=i.startIndex;a==null||a({endIndex:o,startIndex:s})}),n.detachDragEndListener()}),xr(n,"handleLeaveWrapper",function(){(n.state.isTravellerMoving||n.state.isSlideMoving)&&(n.leaveTimer=window.setTimeout(n.handleDragEnd,n.props.leaveTimeOut))}),xr(n,"handleEnterSlideOrTraveller",function(){n.setState({isTextActive:!0})}),xr(n,"handleLeaveSlideOrTraveller",function(){n.setState({isTextActive:!1})}),xr(n,"handleSlideDragStart",function(i){var o=XA(i)?i.changedTouches[0]:i;n.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:o.pageX}),n.attachDragEndListener()}),n.travellerDragStartHandlers={startX:n.handleTravellerDragStart.bind(n,"startX"),endX:n.handleTravellerDragStart.bind(n,"endX")},n.state={},n}return iye(t,e),eye(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(n){var i=n.startX,o=n.endX,a=this.state.scaleValues,s=this.props,l=s.gap,c=s.data,u=c.length-1,d=Math.min(i,o),f=Math.max(i,o),h=t.getIndexInRange(a,d),v=t.getIndexInRange(a,f);return{startIndex:h-h%l,endIndex:v===u?u:v-v%l}}},{key:"getTextOfTick",value:function(n){var i=this.props,o=i.data,a=i.tickFormatter,s=i.dataKey,l=kr(o[n],s,n);return xe(a)?a(l,n):l}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(n){var i=this.state,o=i.slideMoveStartX,a=i.startX,s=i.endX,l=this.props,c=l.x,u=l.width,d=l.travellerWidth,f=l.startIndex,h=l.endIndex,v=l.onChange,m=n.pageX-o;m>0?m=Math.min(m,c+u-d-s,c+u-d-a):m<0&&(m=Math.max(m,c-a,c-s));var y=this.getIndex({startX:a+m,endX:s+m});(y.startIndex!==f||y.endIndex!==h)&&v&&v(y),this.setState({startX:a+m,endX:s+m,slideMoveStartX:n.pageX})}},{key:"handleTravellerDragStart",value:function(n,i){var o=XA(i)?i.changedTouches[0]:i;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:n,brushMoveStartX:o.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(n){var i=this.state,o=i.brushMoveStartX,a=i.movingTravellerId,s=i.endX,l=i.startX,c=this.state[a],u=this.props,d=u.x,f=u.width,h=u.travellerWidth,v=u.onChange,m=u.gap,y=u.data,w={startX:this.state.startX,endX:this.state.endX},b=n.pageX-o;b>0?b=Math.min(b,d+f-h-c):b<0&&(b=Math.max(b,d-c)),w[a]=c+b;var g=this.getIndex(w),_=g.startIndex,S=g.endIndex,E=function(){var P=y.length-1;return a==="startX"&&(s>l?_%m===0:S%m===0)||s<l&&S===P||a==="endX"&&(s>l?S%m===0:_%m===0)||s>l&&S===P};this.setState(xr(xr({},a,c+b),"brushMoveStartX",n.pageX),function(){v&&E()&&v(g)})}},{key:"handleTravellerMoveKeyboard",value:function(n,i){var o=this,a=this.state,s=a.scaleValues,l=a.startX,c=a.endX,u=this.state[i],d=s.indexOf(u);if(d!==-1){var f=d+n;if(!(f===-1||f>=s.length)){var h=s[f];i==="startX"&&h>=c||i==="endX"&&h<=l||this.setState(xr({},i,h),function(){o.props.onChange(o.getIndex({startX:o.state.startX,endX:o.state.endX}))})}}}},{key:"renderBackground",value:function(){var n=this.props,i=n.x,o=n.y,a=n.width,s=n.height,l=n.fill,c=n.stroke;return A.createElement("rect",{stroke:c,fill:l,x:i,y:o,width:a,height:s})}},{key:"renderPanorama",value:function(){var n=this.props,i=n.x,o=n.y,a=n.width,s=n.height,l=n.data,c=n.children,u=n.padding,d=x.Children.only(c);return d?A.cloneElement(d,{x:i,y:o,width:a,height:s,margin:u,compact:!0,data:l}):null}},{key:"renderTravellerLayer",value:function(n,i){var o,a,s=this,l=this.props,c=l.y,u=l.travellerWidth,d=l.height,f=l.traveller,h=l.ariaLabel,v=l.data,m=l.startIndex,y=l.endIndex,w=Math.max(n,this.props.x),b=ky(ky({},Ae(this.props,!1)),{},{x:w,y:c,width:u,height:d}),g=h||"Min value: ".concat((o=v[m])===null||o===void 0?void 0:o.name,", Max value: ").concat((a=v[y])===null||a===void 0?void 0:a.name);return A.createElement(pt,{tabIndex:0,role:"slider","aria-label":g,"aria-valuenow":n,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[i],onTouchStart:this.travellerDragStartHandlers[i],onKeyDown:function(S){["ArrowLeft","ArrowRight"].includes(S.key)&&(S.preventDefault(),S.stopPropagation(),s.handleTravellerMoveKeyboard(S.key==="ArrowRight"?1:-1,i))},onFocus:function(){s.setState({isTravellerFocused:!0})},onBlur:function(){s.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(f,b))}},{key:"renderSlide",value:function(n,i){var o=this.props,a=o.y,s=o.height,l=o.stroke,c=o.travellerWidth,u=Math.min(n,i)+c,d=Math.max(Math.abs(i-n)-c,0);return A.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:l,fillOpacity:.2,x:u,y:a,width:d,height:s})}},{key:"renderText",value:function(){var n=this.props,i=n.startIndex,o=n.endIndex,a=n.y,s=n.height,l=n.travellerWidth,c=n.stroke,u=this.state,d=u.startX,f=u.endX,h=5,v={pointerEvents:"none",fill:c};return A.createElement(pt,{className:"recharts-brush-texts"},A.createElement(Hp,pm({textAnchor:"end",verticalAnchor:"middle",x:Math.min(d,f)-h,y:a+s/2},v),this.getTextOfTick(i)),A.createElement(Hp,pm({textAnchor:"start",verticalAnchor:"middle",x:Math.max(d,f)+l+h,y:a+s/2},v),this.getTextOfTick(o)))}},{key:"render",value:function(){var n=this.props,i=n.data,o=n.className,a=n.children,s=n.x,l=n.y,c=n.width,u=n.height,d=n.alwaysShowText,f=this.state,h=f.startX,v=f.endX,m=f.isTextActive,y=f.isSlideMoving,w=f.isTravellerMoving,b=f.isTravellerFocused;if(!i||!i.length||!G(s)||!G(l)||!G(c)||!G(u)||c<=0||u<=0)return null;var g=Ce("recharts-brush",o),_=A.Children.count(a)===1,S=Jge("userSelect","none");return A.createElement(pt,{className:g,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:S},this.renderBackground(),_&&this.renderPanorama(),this.renderSlide(h,v),this.renderTravellerLayer(h,"startX"),this.renderTravellerLayer(v,"endX"),(m||y||w||b||d)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(n){var i=n.x,o=n.y,a=n.width,s=n.height,l=n.stroke,c=Math.floor(o+s/2)-1;return A.createElement(A.Fragment,null,A.createElement("rect",{x:i,y:o,width:a,height:s,fill:l,stroke:"none"}),A.createElement("line",{x1:i+1,y1:c,x2:i+a-1,y2:c,fill:"none",stroke:"#fff"}),A.createElement("line",{x1:i+1,y1:c+2,x2:i+a-1,y2:c+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(n,i){var o;return A.isValidElement(n)?o=A.cloneElement(n,i):xe(n)?o=n(i):o=t.renderDefaultTraveller(i),o}},{key:"getDerivedStateFromProps",value:function(n,i){var o=n.data,a=n.width,s=n.x,l=n.travellerWidth,c=n.updateId,u=n.startIndex,d=n.endIndex;if(o!==i.prevData||c!==i.prevUpdateId)return ky({prevData:o,prevTravellerWidth:l,prevUpdateId:c,prevX:s,prevWidth:a},o&&o.length?aye({data:o,width:a,x:s,travellerWidth:l,startIndex:u,endIndex:d}):{scale:null,scaleValues:null});if(i.scale&&(a!==i.prevWidth||s!==i.prevX||l!==i.prevTravellerWidth)){i.scale.range([s,s+a-l]);var f=i.scale.domain().map(function(h){return i.scale(h)});return{prevData:o,prevTravellerWidth:l,prevUpdateId:c,prevX:s,prevWidth:a,startX:i.scale(n.startIndex),endX:i.scale(n.endIndex),scaleValues:f}}return null}},{key:"getIndexInRange",value:function(n,i){for(var o=n.length,a=0,s=o-1;s-a>1;){var l=Math.floor((a+s)/2);n[l]>i?s=l:a=l}return i>=n[s]?s:a}}])}(x.PureComponent);xr(Gl,"displayName","Brush");xr(Gl,"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 sye=nS;function lye(e,t){var r;return sye(e,function(n,i,o){return r=t(n,i,o),!r}),!!r}var cye=lye,uye=E2,dye=ea,fye=cye,hye=vr,pye=Hv;function mye(e,t,r){var n=hye(e)?uye:fye;return r&&pye(e,t,r)&&(t=void 0),n(e,dye(t))}var vye=mye;const gye=Ue(vye);var Qn=function(t,r){var n=t.alwaysShow,i=t.ifOverflow;return n&&(i="extendDomain"),i===r},QA=V2;function yye(e,t,r){t=="__proto__"&&QA?QA(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var bye=yye,wye=bye,xye=H2,Sye=ea;function _ye(e,t){var r={};return t=Sye(t),xye(e,function(n,i,o){wye(r,i,t(n,i,o))}),r}var Eye=_ye;const Oye=Ue(Eye);function Pye(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 Tye=Pye,Aye=nS;function Cye(e,t){var r=!0;return Aye(e,function(n,i,o){return r=!!t(n,i,o),r}),r}var jye=Cye,kye=Tye,Nye=jye,Rye=ea,$ye=vr,Mye=Hv;function Iye(e,t,r){var n=$ye(e)?kye:Nye;return r&&Mye(e,t,r)&&(t=void 0),n(e,Rye(t))}var Dye=Iye;const OL=Ue(Dye);var Lye=["x","y"];function Nd(e){"@babel/helpers - typeof";return Nd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Nd(e)}function jw(){return jw=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},jw.apply(this,arguments)}function JA(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 Xc(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?JA(Object(r),!0).forEach(function(n){Bye(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):JA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Bye(e,t,r){return t=Fye(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Fye(e){var t=Uye(e,"string");return Nd(t)=="symbol"?t:t+""}function Uye(e,t){if(Nd(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Nd(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function zye(e,t){if(e==null)return{};var r=Wye(e,t),n,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)n=o[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Wye(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 Hye(e,t){var r=e.x,n=e.y,i=zye(e,Lye),o="".concat(r),a=parseInt(o,10),s="".concat(n),l=parseInt(s,10),c="".concat(t.height||i.height),u=parseInt(c,10),d="".concat(t.width||i.width),f=parseInt(d,10);return Xc(Xc(Xc(Xc(Xc({},t),i),a?{x:a}:{}),l?{y:l}:{}),{},{height:u,width:f,name:t.name,radius:t.radius})}function ZA(e){return A.createElement(Tge,jw({shapeType:"rectangle",propTransformer:Hye,activeClassName:"recharts-active-bar"},e))}var qye=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 o=G(n)||lJ(n);return o?t(n,i):(o||rs(),r)}},Vye=["value","background"],PL;function Yl(e){"@babel/helpers - typeof";return Yl=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},Yl(e)}function Kye(e,t){if(e==null)return{};var r=Gye(e,t),n,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)n=o[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Gye(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 vm(){return vm=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},vm.apply(this,arguments)}function eC(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 mt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?eC(Object(r),!0).forEach(function(n){Eo(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):eC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Yye(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function tC(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,AL(n.key),n)}}function Xye(e,t,r){return t&&tC(e.prototype,t),r&&tC(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Qye(e,t,r){return t=gm(t),Jye(e,TL()?Reflect.construct(t,r||[],gm(e).constructor):t.apply(e,r))}function Jye(e,t){if(t&&(Yl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Zye(e)}function Zye(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function TL(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(TL=function(){return!!e})()}function gm(e){return gm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},gm(e)}function e0e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&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 Eo(e,t,r){return t=AL(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function AL(e){var t=t0e(e,"string");return Yl(t)=="symbol"?t:t+""}function t0e(e,t){if(Yl(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Yl(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ff=function(e){function t(){var r;Yye(this,t);for(var n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];return r=Qye(this,t,[].concat(i)),Eo(r,"state",{isAnimationFinished:!1}),Eo(r,"id",of("recharts-bar-")),Eo(r,"handleAnimationEnd",function(){var a=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),a&&a()}),Eo(r,"handleAnimationStart",function(){var a=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),a&&a()}),r}return e0e(t,e),Xye(t,[{key:"renderRectanglesStatically",value:function(n){var i=this,o=this.props,a=o.shape,s=o.dataKey,l=o.activeIndex,c=o.activeBar,u=Ae(this.props,!1);return n&&n.map(function(d,f){var h=f===l,v=h?c:a,m=mt(mt(mt({},u),d),{},{isActive:h,option:v,index:f,dataKey:s,onAnimationStart:i.handleAnimationStart,onAnimationEnd:i.handleAnimationEnd});return A.createElement(pt,vm({className:"recharts-bar-rectangle"},jp(i.props,d,f),{key:"rectangle-".concat(d==null?void 0:d.x,"-").concat(d==null?void 0:d.y,"-").concat(d==null?void 0:d.value,"-").concat(f)}),A.createElement(ZA,m))})}},{key:"renderRectanglesWithAnimation",value:function(){var n=this,i=this.props,o=i.data,a=i.layout,s=i.isAnimationActive,l=i.animationBegin,c=i.animationDuration,u=i.animationEasing,d=i.animationId,f=this.state.prevData;return A.createElement(Bi,{begin:l,duration:c,isActive:s,easing:u,from:{t:0},to:{t:1},key:"bar-".concat(d),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(h){var v=h.t,m=o.map(function(y,w){var b=f&&f[w];if(b){var g=En(b.x,y.x),_=En(b.y,y.y),S=En(b.width,y.width),E=En(b.height,y.height);return mt(mt({},y),{},{x:g(v),y:_(v),width:S(v),height:E(v)})}if(a==="horizontal"){var O=En(0,y.height),P=O(v);return mt(mt({},y),{},{y:y.y+y.height-P,height:P})}var T=En(0,y.width),j=T(v);return mt(mt({},y),{},{width:j})});return A.createElement(pt,null,n.renderRectanglesStatically(m))})}},{key:"renderRectangles",value:function(){var n=this.props,i=n.data,o=n.isAnimationActive,a=this.state.prevData;return o&&i&&i.length&&(!a||!Zv(a,i))?this.renderRectanglesWithAnimation():this.renderRectanglesStatically(i)}},{key:"renderBackground",value:function(){var n=this,i=this.props,o=i.data,a=i.dataKey,s=i.activeIndex,l=Ae(this.props.background,!1);return o.map(function(c,u){c.value;var d=c.background,f=Kye(c,Vye);if(!d)return null;var h=mt(mt(mt(mt(mt({},f),{},{fill:"#eee"},d),l),jp(n.props,c,u)),{},{onAnimationStart:n.handleAnimationStart,onAnimationEnd:n.handleAnimationEnd,dataKey:a,index:u,className:"recharts-bar-background-rectangle"});return A.createElement(ZA,vm({key:"background-bar-".concat(u),option:n.props.background,isActive:u===s},h))})}},{key:"renderErrorBar",value:function(n,i){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var o=this.props,a=o.data,s=o.xAxis,l=o.yAxis,c=o.layout,u=o.children,d=Qr(u,df);if(!d)return null;var f=c==="vertical"?a[0].height/2:a[0].width/2,h=function(y,w){var b=Array.isArray(y.value)?y.value[1]:y.value;return{x:y.x,y:y.y,value:b,errorVal:kr(y,w)}},v={clipPath:n?"url(#clipPath-".concat(i,")"):null};return A.createElement(pt,v,d.map(function(m){return A.cloneElement(m,{key:"error-bar-".concat(i,"-").concat(m.props.dataKey),data:a,xAxis:s,yAxis:l,layout:c,offset:f,dataPointFormatter:h})}))}},{key:"render",value:function(){var n=this.props,i=n.hide,o=n.data,a=n.className,s=n.xAxis,l=n.yAxis,c=n.left,u=n.top,d=n.width,f=n.height,h=n.isAnimationActive,v=n.background,m=n.id;if(i||!o||!o.length)return null;var y=this.state.isAnimationFinished,w=Ce("recharts-bar",a),b=s&&s.allowDataOverflow,g=l&&l.allowDataOverflow,_=b||g,S=Se(m)?this.id:m;return A.createElement(pt,{className:w},b||g?A.createElement("defs",null,A.createElement("clipPath",{id:"clipPath-".concat(S)},A.createElement("rect",{x:b?c:c-d/2,y:g?u:u-f/2,width:b?d:d*2,height:g?f:f*2}))):null,A.createElement(pt,{className:"recharts-bar-rectangles",clipPath:_?"url(#clipPath-".concat(S,")"):null},v?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(_,S),(!h||y)&&Io.renderCallByParent(this.props,o))}}],[{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}}])}(x.PureComponent);PL=ff;Eo(ff,"displayName","Bar");Eo(ff,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!Oi.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"});Eo(ff,"getComposedData",function(e){var t=e.props,r=e.item,n=e.barPosition,i=e.bandSize,o=e.xAxis,a=e.yAxis,s=e.xAxisTicks,l=e.yAxisTicks,c=e.stackedData,u=e.dataStartIndex,d=e.displayedData,f=e.offset,h=khe(n,r);if(!h)return null;var v=t.layout,m=r.type.defaultProps,y=m!==void 0?mt(mt({},m),r.props):r.props,w=y.dataKey,b=y.children,g=y.minPointSize,_=v==="horizontal"?a:o,S=c?_.scale.domain():null,E=Bhe({numericAxis:_}),O=Qr(b,eD),P=d.map(function(T,j){var C,k,L,M,N,D;c?C=Nhe(c[u+j],S):(C=kr(T,w),Array.isArray(C)||(C=[E,C]));var B=qye(g,PL.defaultProps.minPointSize)(C[1],j);if(v==="horizontal"){var $,I=[a.scale(C[0]),a.scale(C[1])],U=I[0],H=I[1];k=eA({axis:o,ticks:s,bandSize:i,offset:h.offset,entry:T,index:j}),L=($=H??U)!==null&&$!==void 0?$:void 0,M=h.size;var z=U-H;if(N=Number.isNaN(z)?0:z,D={x:k,y:a.y,width:M,height:a.height},Math.abs(B)>0&&Math.abs(N)<Math.abs(B)){var K=Pn(N||B)*(Math.abs(B)-Math.abs(N));L-=K,N+=K}}else{var te=[o.scale(C[0]),o.scale(C[1])],fe=te[0],Ee=te[1];if(k=fe,L=eA({axis:a,ticks:l,bandSize:i,offset:h.offset,entry:T,index:j}),M=Ee-fe,N=h.size,D={x:o.x,y:L,width:o.width,height:N},Math.abs(B)>0&&Math.abs(M)<Math.abs(B)){var Y=Pn(M||B)*(Math.abs(B)-Math.abs(M));M+=Y}}return mt(mt(mt({},T),{},{x:k,y:L,width:M,height:N,value:c?C:C[1],payload:T,background:D},O&&O[j]&&O[j].props),{},{tooltipPayload:[aL(r,T)],tooltipPosition:{x:k+M/2,y:L+N/2}})});return mt({data:P,layout:v},f)});function Rd(e){"@babel/helpers - typeof";return Rd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Rd(e)}function r0e(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,CL(n.key),n)}}function n0e(e,t,r){return t&&rC(e.prototype,t),r&&rC(e,r),Object.defineProperty(e,"prototype",{writable:!1}),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 xn(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){ig(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 ig(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=i0e(e,"string");return Rd(t)=="symbol"?t:t+""}function i0e(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)}var o0e=function(t,r,n,i,o){var a=t.width,s=t.height,l=t.layout,c=t.children,u=Object.keys(r),d={left:n.left,leftMirror:n.left,right:a-n.right,rightMirror:a-n.right,top:n.top,topMirror:n.top,bottom:s-n.bottom,bottomMirror:s-n.bottom},f=!!_r(c,ff);return u.reduce(function(h,v){var m=r[v],y=m.orientation,w=m.domain,b=m.padding,g=b===void 0?{}:b,_=m.mirror,S=m.reversed,E="".concat(y).concat(_?"Mirror":""),O,P,T,j,C;if(m.type==="number"&&(m.padding==="gap"||m.padding==="no-gap")){var k=w[1]-w[0],L=1/0,M=m.categoricalDomain.sort(dJ);if(M.forEach(function(te,fe){fe>0&&(L=Math.min((te||0)-(M[fe-1]||0),L))}),Number.isFinite(L)){var N=L/k,D=m.layout==="vertical"?n.height:n.width;if(m.padding==="gap"&&(O=N*D/2),m.padding==="no-gap"){var B=es(t.barCategoryGap,N*D),$=N*D/2;O=$-B-($-B)/D*B}}}i==="xAxis"?P=[n.left+(g.left||0)+(O||0),n.left+n.width-(g.right||0)-(O||0)]:i==="yAxis"?P=l==="horizontal"?[n.top+n.height-(g.bottom||0),n.top+(g.top||0)]:[n.top+(g.top||0)+(O||0),n.top+n.height-(g.bottom||0)-(O||0)]:P=m.range,S&&(P=[P[1],P[0]]);var I=Che(m,o,f),U=I.scale,H=I.realScaleType;U.domain(w).range(P),jhe(U);var z=Lhe(U,xn(xn({},m),{},{realScaleType:H}));i==="xAxis"?(C=y==="top"&&!_||y==="bottom"&&_,T=n.left,j=d[E]-C*m.height):i==="yAxis"&&(C=y==="left"&&!_||y==="right"&&_,T=d[E]-C*m.width,j=n.top);var K=xn(xn(xn({},m),z),{},{realScaleType:H,x:T,y:j,scale:U,width:i==="xAxis"?n.width:m.width,height:i==="yAxis"?n.height:m.height});return K.bandSize=im(K,z),!m.hide&&i==="xAxis"?d[E]+=(C?-1:1)*K.height:m.hide||(d[E]+=(C?-1:1)*K.width),xn(xn({},h),{},ig({},v,K))},{})},jL=function(t,r){var n=t.x,i=t.y,o=r.x,a=r.y;return{x:Math.min(n,o),y:Math.min(i,a),width:Math.abs(o-n),height:Math.abs(a-i)}},a0e=function(t){var r=t.x1,n=t.y1,i=t.x2,o=t.y2;return jL({x:r,y:n},{x:i,y:o})},kL=function(){function e(t){r0e(this,e),this.scale=t}return n0e(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,o=n.position;if(r!==void 0){if(o)switch(o){case"start":return this.scale(r);case"middle":{var a=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+a}case"end":{var s=this.bandwidth?this.bandwidth():0;return this.scale(r)+s}default:return this.scale(r)}if(i){var l=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+l}return this.scale(r)}}},{key:"isInRange",value:function(r){var n=this.range(),i=n[0],o=n[n.length-1];return i<=o?r>=i&&r<=o:r>=o&&r<=i}}],[{key:"create",value:function(r){return new e(r)}}])}();ig(kL,"EPS",1e-4);var RS=function(t){var r=Object.keys(t).reduce(function(n,i){return xn(xn({},n),{},ig({},i,kL.create(t[i])))},{});return xn(xn({},r),{},{apply:function(i){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=o.bandAware,s=o.position;return Oye(i,function(l,c){return r[c].apply(l,{bandAware:a,position:s})})},isInRange:function(i){return OL(i,function(o,a){return r[a].isInRange(o)})}})};function s0e(e){return(e%180+180)%180}var l0e=function(t){var r=t.width,n=t.height,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=s0e(i),a=o*Math.PI/180,s=Math.atan(n/r),l=a>s&&a<Math.PI-s?n/Math.sin(a):r/Math.cos(a);return Math.abs(l)},c0e=ea,u0e=af,d0e=zv;function f0e(e){return function(t,r,n){var i=Object(t);if(!u0e(t)){var o=c0e(r);t=d0e(t),r=function(s){return o(i[s],s,i)}}var a=e(t,r,n);return a>-1?i[o?t[a]:a]:void 0}}var h0e=f0e,p0e=xL;function m0e(e){var t=p0e(e),r=t%1;return t===t?r?t-r:t:0}var v0e=m0e,g0e=L2,y0e=ea,b0e=v0e,w0e=Math.max;function x0e(e,t,r){var n=e==null?0:e.length;if(!n)return-1;var i=r==null?0:b0e(r);return i<0&&(i=w0e(n+i,0)),g0e(e,y0e(t),i)}var S0e=x0e,_0e=h0e,E0e=S0e,O0e=_0e(E0e),P0e=O0e;const T0e=Ue(P0e);var A0e=fQ(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("")}),$S=x.createContext(void 0),MS=x.createContext(void 0),NL=x.createContext(void 0),RL=x.createContext({}),$L=x.createContext(void 0),ML=x.createContext(0),IL=x.createContext(0),iC=function(t){var r=t.state,n=r.xAxisMap,i=r.yAxisMap,o=r.offset,a=t.clipPathId,s=t.children,l=t.width,c=t.height,u=A0e(o);return A.createElement($S.Provider,{value:n},A.createElement(MS.Provider,{value:i},A.createElement(RL.Provider,{value:o},A.createElement(NL.Provider,{value:u},A.createElement($L.Provider,{value:a},A.createElement(ML.Provider,{value:c},A.createElement(IL.Provider,{value:l},s)))))))},C0e=function(){return x.useContext($L)},DL=function(t){var r=x.useContext($S);r==null&&rs();var n=r[t];return n==null&&rs(),n},j0e=function(){var t=x.useContext($S);return so(t)},k0e=function(){var t=x.useContext(MS),r=T0e(t,function(n){return OL(n.domain,Number.isFinite)});return r||so(t)},LL=function(t){var r=x.useContext(MS);r==null&&rs();var n=r[t];return n==null&&rs(),n},N0e=function(){var t=x.useContext(NL);return t},R0e=function(){return x.useContext(RL)},IS=function(){return x.useContext(IL)},DS=function(){return x.useContext(ML)};function Xl(e){"@babel/helpers - typeof";return Xl=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},Xl(e)}function $0e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function M0e(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,FL(n.key),n)}}function I0e(e,t,r){return t&&M0e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function D0e(e,t,r){return t=ym(t),L0e(e,BL()?Reflect.construct(t,r||[],ym(e).constructor):t.apply(e,r))}function L0e(e,t){if(t&&(Xl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return B0e(e)}function B0e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function BL(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(BL=function(){return!!e})()}function ym(e){return ym=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ym(e)}function F0e(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&&Nw(e,t)}function Nw(e,t){return Nw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Nw(e,t)}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 aC(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){LS(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 LS(e,t,r){return t=FL(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function FL(e){var t=U0e(e,"string");return Xl(t)=="symbol"?t:t+""}function U0e(e,t){if(Xl(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Xl(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function z0e(e,t){return V0e(e)||q0e(e,t)||H0e(e,t)||W0e()}function W0e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
359In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function H0e(e,t){if(e){if(typeof e=="string")return sC(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 sC(e,t)}}function sC(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 q0e(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,o,a,s=[],l=!0,c=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(l=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(u){c=!0,i=u}finally{try{if(!l&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}function V0e(e){if(Array.isArray(e))return e}function Rw(){return Rw=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},Rw.apply(this,arguments)}var K0e=function(t,r){var n;return A.isValidElement(t)?n=A.cloneElement(t,r):xe(t)?n=t(r):n=A.createElement("line",Rw({},r,{className:"recharts-reference-line-line"})),n},G0e=function(t,r,n,i,o,a,s,l,c){var u=o.x,d=o.y,f=o.width,h=o.height;if(n){var v=c.y,m=t.y.apply(v,{position:a});if(Qn(c,"discard")&&!t.y.isInRange(m))return null;var y=[{x:u+f,y:m},{x:u,y:m}];return l==="left"?y.reverse():y}if(r){var w=c.x,b=t.x.apply(w,{position:a});if(Qn(c,"discard")&&!t.x.isInRange(b))return null;var g=[{x:b,y:d+h},{x:b,y:d}];return s==="top"?g.reverse():g}if(i){var _=c.segment,S=_.map(function(E){return t.apply(E,{position:a})});return Qn(c,"discard")&&gye(S,function(E){return!t.isInRange(E)})?null:S}return null};function Y0e(e){var t=e.x,r=e.y,n=e.segment,i=e.xAxisId,o=e.yAxisId,a=e.shape,s=e.className,l=e.alwaysShow,c=C0e(),u=DL(i),d=LL(o),f=N0e();if(!c||!f)return null;Ei(l===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var h=RS({x:u.scale,y:d.scale}),v=Ot(t),m=Ot(r),y=n&&n.length===2,w=G0e(h,v,m,y,f,e.position,u.orientation,d.orientation,e);if(!w)return null;var b=z0e(w,2),g=b[0],_=g.x,S=g.y,E=b[1],O=E.x,P=E.y,T=Qn(e,"hidden")?"url(#".concat(c,")"):void 0,j=aC(aC({clipPath:T},Ae(e,!0)),{},{x1:_,y1:S,x2:O,y2:P});return A.createElement(pt,{className:Ce("recharts-reference-line",s)},K0e(a,j),Vt.renderCallByParent(e,a0e({x1:_,y1:S,x2:O,y2:P})))}var BS=function(e){function t(){return $0e(this,t),D0e(this,t,arguments)}return F0e(t,e),I0e(t,[{key:"render",value:function(){return A.createElement(Y0e,this.props)}}])}(A.Component);LS(BS,"displayName","ReferenceLine");LS(BS,"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 Ql(e){"@babel/helpers - typeof";return Ql=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},Ql(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 cC(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){og(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 X0e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Q0e(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,zL(n.key),n)}}function J0e(e,t,r){return t&&Q0e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Z0e(e,t,r){return t=bm(t),ebe(e,UL()?Reflect.construct(t,r||[],bm(e).constructor):t.apply(e,r))}function ebe(e,t){if(t&&(Ql(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return tbe(e)}function tbe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function UL(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(UL=function(){return!!e})()}function bm(e){return bm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},bm(e)}function rbe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&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 og(e,t,r){return t=zL(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function zL(e){var t=nbe(e,"string");return Ql(t)=="symbol"?t:t+""}function nbe(e,t){if(Ql(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Ql(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ibe=function(t){var r=t.x,n=t.y,i=t.xAxis,o=t.yAxis,a=RS({x:i.scale,y:o.scale}),s=a.apply({x:r,y:n},{bandAware:!0});return Qn(t,"discard")&&!a.isInRange(s)?null:s},ag=function(e){function t(){return X0e(this,t),Z0e(this,t,arguments)}return rbe(t,e),J0e(t,[{key:"render",value:function(){var n=this.props,i=n.x,o=n.y,a=n.r,s=n.alwaysShow,l=n.clipPathId,c=Ot(i),u=Ot(o);if(Ei(s===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!c||!u)return null;var d=ibe(this.props);if(!d)return null;var f=d.x,h=d.y,v=this.props,m=v.shape,y=v.className,w=Qn(this.props,"hidden")?"url(#".concat(l,")"):void 0,b=cC(cC({clipPath:w},Ae(this.props,!0)),{},{cx:f,cy:h});return A.createElement(pt,{className:Ce("recharts-reference-dot",y)},t.renderDot(m,b),Vt.renderCallByParent(this.props,{x:f-a,y:h-a,width:2*a,height:2*a}))}}])}(A.Component);og(ag,"displayName","ReferenceDot");og(ag,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1});og(ag,"renderDot",function(e,t){var r;return A.isValidElement(e)?r=A.cloneElement(e,t):xe(e)?r=e(t):r=A.createElement(NS,$w({},t,{cx:t.cx,cy:t.cy,className:"recharts-reference-dot-dot"})),r});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)}function Jl(e){"@babel/helpers - typeof";return Jl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Jl(e)}function 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 dC(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){sg(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 obe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function abe(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,HL(n.key),n)}}function sbe(e,t,r){return t&&abe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function lbe(e,t,r){return t=wm(t),cbe(e,WL()?Reflect.construct(t,r||[],wm(e).constructor):t.apply(e,r))}function cbe(e,t){if(t&&(Jl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ube(e)}function ube(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function WL(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(WL=function(){return!!e})()}function wm(e){return wm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},wm(e)}function dbe(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&&Dw(e,t)}function Dw(e,t){return Dw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Dw(e,t)}function sg(e,t,r){return t=HL(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function HL(e){var t=fbe(e,"string");return Jl(t)=="symbol"?t:t+""}function fbe(e,t){if(Jl(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Jl(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var hbe=function(t,r,n,i,o){var a=o.x1,s=o.x2,l=o.y1,c=o.y2,u=o.xAxis,d=o.yAxis;if(!u||!d)return null;var f=RS({x:u.scale,y:d.scale}),h={x:t?f.x.apply(a,{position:"start"}):f.x.rangeMin,y:n?f.y.apply(l,{position:"start"}):f.y.rangeMin},v={x:r?f.x.apply(s,{position:"end"}):f.x.rangeMax,y:i?f.y.apply(c,{position:"end"}):f.y.rangeMax};return Qn(o,"discard")&&(!f.isInRange(h)||!f.isInRange(v))?null:jL(h,v)},lg=function(e){function t(){return obe(this,t),lbe(this,t,arguments)}return dbe(t,e),sbe(t,[{key:"render",value:function(){var n=this.props,i=n.x1,o=n.x2,a=n.y1,s=n.y2,l=n.className,c=n.alwaysShow,u=n.clipPathId;Ei(c===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var d=Ot(i),f=Ot(o),h=Ot(a),v=Ot(s),m=this.props.shape;if(!d&&!f&&!h&&!v&&!m)return null;var y=hbe(d,f,h,v,this.props);if(!y&&!m)return null;var w=Qn(this.props,"hidden")?"url(#".concat(u,")"):void 0;return A.createElement(pt,{className:Ce("recharts-reference-area",l)},t.renderRect(m,dC(dC({clipPath:w},Ae(this.props,!0)),y)),Vt.renderCallByParent(this.props,y))}}])}(A.Component);sg(lg,"displayName","ReferenceArea");sg(lg,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1});sg(lg,"renderRect",function(e,t){var r;return A.isValidElement(e)?r=A.cloneElement(e,t):xe(e)?r=e(t):r=A.createElement(kS,Iw({},t,{className:"recharts-reference-area-rect"})),r});function qL(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 pbe(e,t,r){var n={width:e.width+t.width,height:e.height+t.height};return l0e(n,r)}function mbe(e,t,r){var n=r==="width",i=e.x,o=e.y,a=e.width,s=e.height;return t===1?{start:n?i:o,end:n?i+a:o+s}:{start:n?i+a:o+s,end:n?i:o}}function xm(e,t,r,n,i){if(e*t<e*n||e*t>e*i)return!1;var o=r();return e*(t-e*o/2-n)>=0&&e*(t+e*o/2-i)<=0}function vbe(e,t){return qL(e,t+1)}function gbe(e,t,r,n,i){for(var o=(n||[]).slice(),a=t.start,s=t.end,l=0,c=1,u=a,d=function(){var v=n==null?void 0:n[l];if(v===void 0)return{v:qL(n,c)};var m=l,y,w=function(){return y===void 0&&(y=r(v,m)),y},b=v.coordinate,g=l===0||xm(e,b,w,u,s);g||(l=0,u=a,c+=1),g&&(u=b+e*(w()/2+i),l+=c)},f;c<=o.length;)if(f=d(),f)return f.v;return[]}function $d(e){"@babel/helpers - typeof";return $d=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},$d(e)}function fC(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 Wt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?fC(Object(r),!0).forEach(function(n){ybe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):fC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ybe(e,t,r){return t=bbe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function bbe(e){var t=wbe(e,"string");return $d(t)=="symbol"?t:t+""}function wbe(e,t){if($d(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if($d(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function xbe(e,t,r,n,i){for(var o=(n||[]).slice(),a=o.length,s=t.start,l=t.end,c=function(f){var h=o[f],v,m=function(){return v===void 0&&(v=r(h,f)),v};if(f===a-1){var y=e*(h.coordinate+e*m()/2-l);o[f]=h=Wt(Wt({},h),{},{tickCoord:y>0?h.coordinate-y*e:h.coordinate})}else o[f]=h=Wt(Wt({},h),{},{tickCoord:h.coordinate});var w=xm(e,h.tickCoord,m,s,l);w&&(l=h.tickCoord-e*(m()/2+i),o[f]=Wt(Wt({},h),{},{isShow:!0}))},u=a-1;u>=0;u--)c(u);return o}function Sbe(e,t,r,n,i,o){var a=(n||[]).slice(),s=a.length,l=t.start,c=t.end;if(o){var u=n[s-1],d=r(u,s-1),f=e*(u.coordinate+e*d/2-c);a[s-1]=u=Wt(Wt({},u),{},{tickCoord:f>0?u.coordinate-f*e:u.coordinate});var h=xm(e,u.tickCoord,function(){return d},l,c);h&&(c=u.tickCoord-e*(d/2+i),a[s-1]=Wt(Wt({},u),{},{isShow:!0}))}for(var v=o?s-1:s,m=function(b){var g=a[b],_,S=function(){return _===void 0&&(_=r(g,b)),_};if(b===0){var E=e*(g.coordinate-e*S()/2-l);a[b]=g=Wt(Wt({},g),{},{tickCoord:E<0?g.coordinate-E*e:g.coordinate})}else a[b]=g=Wt(Wt({},g),{},{tickCoord:g.coordinate});var O=xm(e,g.tickCoord,S,l,c);O&&(l=g.tickCoord+e*(S()/2+i),a[b]=Wt(Wt({},g),{},{isShow:!0}))},y=0;y<v;y++)m(y);return a}function FS(e,t,r){var n=e.tick,i=e.ticks,o=e.viewBox,a=e.minTickGap,s=e.orientation,l=e.interval,c=e.tickFormatter,u=e.unit,d=e.angle;if(!i||!i.length||!n)return[];if(G(l)||Oi.isSsr)return vbe(i,typeof l=="number"&&G(l)?l:0);var f=[],h=s==="top"||s==="bottom"?"width":"height",v=u&&h==="width"?bu(u,{fontSize:t,letterSpacing:r}):{width:0,height:0},m=function(g,_){var S=xe(c)?c(g.value,_):g.value;return h==="width"?pbe(bu(S,{fontSize:t,letterSpacing:r}),v,d):bu(S,{fontSize:t,letterSpacing:r})[h]},y=i.length>=2?Pn(i[1].coordinate-i[0].coordinate):1,w=mbe(o,y,h);return l==="equidistantPreserveStart"?gbe(y,w,m,i,a):(l==="preserveStart"||l==="preserveStartEnd"?f=Sbe(y,w,m,i,a,l==="preserveStartEnd"):f=xbe(y,w,m,i,a),f.filter(function(b){return b.isShow}))}var _be=["viewBox"],Ebe=["viewBox"],Obe=["ticks"];function Zl(e){"@babel/helpers - typeof";return Zl=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},Zl(e)}function Xs(){return Xs=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},Xs.apply(this,arguments)}function hC(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 bt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?hC(Object(r),!0).forEach(function(n){US(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):hC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ny(e,t){if(e==null)return{};var r=Pbe(e,t),n,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)n=o[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Pbe(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 Tbe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function pC(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,KL(n.key),n)}}function Abe(e,t,r){return t&&pC(e.prototype,t),r&&pC(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Cbe(e,t,r){return t=Sm(t),jbe(e,VL()?Reflect.construct(t,r||[],Sm(e).constructor):t.apply(e,r))}function jbe(e,t){if(t&&(Zl(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 VL(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(VL=function(){return!!e})()}function Sm(e){return Sm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Sm(e)}function Nbe(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 US(e,t,r){return t=KL(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function KL(e){var t=Rbe(e,"string");return Zl(t)=="symbol"?t:t+""}function Rbe(e,t){if(Zl(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Zl(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Tc=function(e){function t(r){var n;return Tbe(this,t),n=Cbe(this,t,[r]),n.state={fontSize:"",letterSpacing:""},n}return Nbe(t,e),Abe(t,[{key:"shouldComponentUpdate",value:function(n,i){var o=n.viewBox,a=Ny(n,_be),s=this.props,l=s.viewBox,c=Ny(s,Ebe);return!cl(o,l)||!cl(a,c)||!cl(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,o=i.x,a=i.y,s=i.width,l=i.height,c=i.orientation,u=i.tickSize,d=i.mirror,f=i.tickMargin,h,v,m,y,w,b,g=d?-1:1,_=n.tickSize||u,S=G(n.tickCoord)?n.tickCoord:n.coordinate;switch(c){case"top":h=v=n.coordinate,y=a+ +!d*l,m=y-g*_,b=m-g*f,w=S;break;case"left":m=y=n.coordinate,v=o+ +!d*s,h=v-g*_,w=h-g*f,b=S;break;case"right":m=y=n.coordinate,v=o+ +d*s,h=v+g*_,w=h+g*f,b=S;break;default:h=v=n.coordinate,y=a+ +d*l,m=y+g*_,b=m+g*f,w=S;break}return{line:{x1:h,y1:m,x2:v,y2:y},tick:{x:w,y:b}}}},{key:"getTickTextAnchor",value:function(){var n=this.props,i=n.orientation,o=n.mirror,a;switch(i){case"left":a=o?"start":"end";break;case"right":a=o?"end":"start";break;default:a="middle";break}return a}},{key:"getTickVerticalAnchor",value:function(){var n=this.props,i=n.orientation,o=n.mirror,a="end";switch(i){case"left":case"right":a="middle";break;case"top":a=o?"start":"end";break;default:a=o?"end":"start";break}return a}},{key:"renderAxisLine",value:function(){var n=this.props,i=n.x,o=n.y,a=n.width,s=n.height,l=n.orientation,c=n.mirror,u=n.axisLine,d=bt(bt(bt({},Ae(this.props,!1)),Ae(u,!1)),{},{fill:"none"});if(l==="top"||l==="bottom"){var f=+(l==="top"&&!c||l==="bottom"&&c);d=bt(bt({},d),{},{x1:i,y1:o+f*s,x2:i+a,y2:o+f*s})}else{var h=+(l==="left"&&!c||l==="right"&&c);d=bt(bt({},d),{},{x1:i+h*a,y1:o,x2:i+h*a,y2:o+s})}return A.createElement("line",Xs({},d,{className:Ce("recharts-cartesian-axis-line",Xr(u,"className"))}))}},{key:"renderTicks",value:function(n,i,o){var a=this,s=this.props,l=s.tickLine,c=s.stroke,u=s.tick,d=s.tickFormatter,f=s.unit,h=FS(bt(bt({},this.props),{},{ticks:n}),i,o),v=this.getTickTextAnchor(),m=this.getTickVerticalAnchor(),y=Ae(this.props,!1),w=Ae(u,!1),b=bt(bt({},y),{},{fill:"none"},Ae(l,!1)),g=h.map(function(_,S){var E=a.getTickLineCoord(_),O=E.line,P=E.tick,T=bt(bt(bt(bt({textAnchor:v,verticalAnchor:m},y),{},{stroke:"none",fill:c},w),P),{},{index:S,payload:_,visibleTicksCount:h.length,tickFormatter:d});return A.createElement(pt,Xs({className:"recharts-cartesian-axis-tick",key:"tick-".concat(_.value,"-").concat(_.coordinate,"-").concat(_.tickCoord)},jp(a.props,_,S)),l&&A.createElement("line",Xs({},b,O,{className:Ce("recharts-cartesian-axis-tick-line",Xr(l,"className"))})),u&&t.renderTickItem(u,T,"".concat(xe(d)?d(_.value,S):_.value).concat(f||"")))});return A.createElement("g",{className:"recharts-cartesian-axis-ticks"},g)}},{key:"render",value:function(){var n=this,i=this.props,o=i.axisLine,a=i.width,s=i.height,l=i.ticksGenerator,c=i.className,u=i.hide;if(u)return null;var d=this.props,f=d.ticks,h=Ny(d,Obe),v=f;return xe(l)&&(v=f&&f.length>0?l(this.props):l(h)),a<=0||s<=0||!v||!v.length?null:A.createElement(pt,{className:Ce("recharts-cartesian-axis",c),ref:function(y){n.layerReference=y}},o&&this.renderAxisLine(),this.renderTicks(v,this.state.fontSize,this.state.letterSpacing),Vt.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(n,i,o){var a,s=Ce(i.className,"recharts-cartesian-axis-tick-value");return A.isValidElement(n)?a=A.cloneElement(n,bt(bt({},i),{},{className:s})):xe(n)?a=n(bt(bt({},i),{},{className:s})):a=A.createElement(Hp,Xs({},i,{className:"recharts-cartesian-axis-tick-value"}),o),a}}])}(x.Component);US(Tc,"displayName","CartesianAxis");US(Tc,"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 $be=["x1","y1","x2","y2","key"],Mbe=["offset"];function ns(e){"@babel/helpers - typeof";return ns=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},ns(e)}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 Kt(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){Ibe(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 Ibe(e,t,r){return t=Dbe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Dbe(e){var t=Lbe(e,"string");return ns(t)=="symbol"?t:t+""}function Lbe(e,t){if(ns(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(ns(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ea(){return Ea=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},Ea.apply(this,arguments)}function vC(e,t){if(e==null)return{};var r=Bbe(e,t),n,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)n=o[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 Fbe=function(t){var r=t.fill;if(!r||r==="none")return null;var n=t.fillOpacity,i=t.x,o=t.y,a=t.width,s=t.height,l=t.ry;return A.createElement("rect",{x:i,y:o,ry:l,width:a,height:s,stroke:"none",fill:r,fillOpacity:n,className:"recharts-cartesian-grid-bg"})};function GL(e,t){var r;if(A.isValidElement(e))r=A.cloneElement(e,t);else if(xe(e))r=e(t);else{var n=t.x1,i=t.y1,o=t.x2,a=t.y2,s=t.key,l=vC(t,$be),c=Ae(l,!1);c.offset;var u=vC(c,Mbe);r=A.createElement("line",Ea({},u,{x1:n,y1:i,x2:o,y2:a,fill:"none",key:s}))}return r}function Ube(e){var t=e.x,r=e.width,n=e.horizontal,i=n===void 0?!0:n,o=e.horizontalPoints;if(!i||!o||!o.length)return null;var a=o.map(function(s,l){var c=Kt(Kt({},e),{},{x1:t,y1:s,x2:t+r,y2:s,key:"line-".concat(l),index:l});return GL(i,c)});return A.createElement("g",{className:"recharts-cartesian-grid-horizontal"},a)}function zbe(e){var t=e.y,r=e.height,n=e.vertical,i=n===void 0?!0:n,o=e.verticalPoints;if(!i||!o||!o.length)return null;var a=o.map(function(s,l){var c=Kt(Kt({},e),{},{x1:s,y1:t,x2:s,y2:t+r,key:"line-".concat(l),index:l});return GL(i,c)});return A.createElement("g",{className:"recharts-cartesian-grid-vertical"},a)}function Wbe(e){var t=e.horizontalFill,r=e.fillOpacity,n=e.x,i=e.y,o=e.width,a=e.height,s=e.horizontalPoints,l=e.horizontal,c=l===void 0?!0:l;if(!c||!t||!t.length)return null;var u=s.map(function(f){return Math.round(f+i-i)}).sort(function(f,h){return f-h});i!==u[0]&&u.unshift(0);var d=u.map(function(f,h){var v=!u[h+1],m=v?i+a-f:u[h+1]-f;if(m<=0)return null;var y=h%t.length;return A.createElement("rect",{key:"react-".concat(h),y:f,x:n,height:m,width:o,stroke:"none",fill:t[y],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return A.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},d)}function Hbe(e){var t=e.vertical,r=t===void 0?!0:t,n=e.verticalFill,i=e.fillOpacity,o=e.x,a=e.y,s=e.width,l=e.height,c=e.verticalPoints;if(!r||!n||!n.length)return null;var u=c.map(function(f){return Math.round(f+o-o)}).sort(function(f,h){return f-h});o!==u[0]&&u.unshift(0);var d=u.map(function(f,h){var v=!u[h+1],m=v?o+s-f:u[h+1]-f;if(m<=0)return null;var y=h%n.length;return A.createElement("rect",{key:"react-".concat(h),x:f,y:a,width:m,height:l,stroke:"none",fill:n[y],fillOpacity:i,className:"recharts-cartesian-grid-bg"})});return A.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},d)}var qbe=function(t,r){var n=t.xAxis,i=t.width,o=t.height,a=t.offset;return iL(FS(Kt(Kt(Kt({},Tc.defaultProps),n),{},{ticks:bi(n,!0),viewBox:{x:0,y:0,width:i,height:o}})),a.left,a.left+a.width,r)},Vbe=function(t,r){var n=t.yAxis,i=t.width,o=t.height,a=t.offset;return iL(FS(Kt(Kt(Kt({},Tc.defaultProps),n),{},{ticks:bi(n,!0),viewBox:{x:0,y:0,width:i,height:o}})),a.top,a.top+a.height,r)},js={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function zS(e){var t,r,n,i,o,a,s=IS(),l=DS(),c=R0e(),u=Kt(Kt({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:js.stroke,fill:(r=e.fill)!==null&&r!==void 0?r:js.fill,horizontal:(n=e.horizontal)!==null&&n!==void 0?n:js.horizontal,horizontalFill:(i=e.horizontalFill)!==null&&i!==void 0?i:js.horizontalFill,vertical:(o=e.vertical)!==null&&o!==void 0?o:js.vertical,verticalFill:(a=e.verticalFill)!==null&&a!==void 0?a:js.verticalFill,x:G(e.x)?e.x:c.left,y:G(e.y)?e.y:c.top,width:G(e.width)?e.width:c.width,height:G(e.height)?e.height:c.height}),d=u.x,f=u.y,h=u.width,v=u.height,m=u.syncWithTicks,y=u.horizontalValues,w=u.verticalValues,b=j0e(),g=k0e();if(!G(h)||h<=0||!G(v)||v<=0||!G(d)||d!==+d||!G(f)||f!==+f)return null;var _=u.verticalCoordinatesGenerator||qbe,S=u.horizontalCoordinatesGenerator||Vbe,E=u.horizontalPoints,O=u.verticalPoints;if((!E||!E.length)&&xe(S)){var P=y&&y.length,T=S({yAxis:g?Kt(Kt({},g),{},{ticks:P?y:g.ticks}):void 0,width:s,height:l,offset:c},P?!0:m);Ei(Array.isArray(T),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(ns(T),"]")),Array.isArray(T)&&(E=T)}if((!O||!O.length)&&xe(_)){var j=w&&w.length,C=_({xAxis:b?Kt(Kt({},b),{},{ticks:j?w:b.ticks}):void 0,width:s,height:l,offset:c},j?!0:m);Ei(Array.isArray(C),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(ns(C),"]")),Array.isArray(C)&&(O=C)}return A.createElement("g",{className:"recharts-cartesian-grid"},A.createElement(Fbe,{fill:u.fill,fillOpacity:u.fillOpacity,x:u.x,y:u.y,width:u.width,height:u.height,ry:u.ry}),A.createElement(Ube,Ea({},u,{offset:c,horizontalPoints:E,xAxis:b,yAxis:g})),A.createElement(zbe,Ea({},u,{offset:c,verticalPoints:O,xAxis:b,yAxis:g})),A.createElement(Wbe,Ea({},u,{horizontalPoints:E})),A.createElement(Hbe,Ea({},u,{verticalPoints:O})))}zS.displayName="CartesianGrid";var Kbe=["type","layout","connectNulls","ref"],Gbe=["key"];function ec(e){"@babel/helpers - typeof";return ec=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},ec(e)}function gC(e,t){if(e==null)return{};var r=Ybe(e,t),n,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)n=o[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Ybe(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 _u(){return _u=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},_u.apply(this,arguments)}function yC(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?yC(Object(r),!0).forEach(function(n){Sn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):yC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ks(e){return Zbe(e)||Jbe(e)||Qbe(e)||Xbe()}function Xbe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
360In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Qbe(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 Jbe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Zbe(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 ewe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function bC(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,XL(n.key),n)}}function twe(e,t,r){return t&&bC(e.prototype,t),r&&bC(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function rwe(e,t,r){return t=_m(t),nwe(e,YL()?Reflect.construct(t,r||[],_m(e).constructor):t.apply(e,r))}function nwe(e,t){if(t&&(ec(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return iwe(e)}function iwe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function YL(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(YL=function(){return!!e})()}function _m(e){return _m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},_m(e)}function owe(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 Sn(e,t,r){return t=XL(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function XL(e){var t=awe(e,"string");return ec(t)=="symbol"?t:t+""}function awe(e,t){if(ec(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(ec(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var is=function(e){function t(){var r;ewe(this,t);for(var n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];return r=rwe(this,t,[].concat(i)),Sn(r,"state",{isAnimationFinished:!0,totalLength:0}),Sn(r,"generateSimpleStrokeDasharray",function(a,s){return"".concat(s,"px ").concat(a-s,"px")}),Sn(r,"getStrokeDasharray",function(a,s,l){var c=l.reduce(function(w,b){return w+b});if(!c)return r.generateSimpleStrokeDasharray(s,a);for(var u=Math.floor(a/c),d=a%c,f=s-a,h=[],v=0,m=0;v<l.length;m+=l[v],++v)if(m+l[v]>d){h=[].concat(ks(l.slice(0,v)),[d-m]);break}var y=h.length%2===0?[0,f]:[f];return[].concat(ks(t.repeat(l,u)),ks(h),y).map(function(w){return"".concat(w,"px")}).join(", ")}),Sn(r,"id",of("recharts-line-")),Sn(r,"pathRef",function(a){r.mainCurve=a}),Sn(r,"handleAnimationEnd",function(){r.setState({isAnimationFinished:!0}),r.props.onAnimationEnd&&r.props.onAnimationEnd()}),Sn(r,"handleAnimationStart",function(){r.setState({isAnimationFinished:!1}),r.props.onAnimationStart&&r.props.onAnimationStart()}),r}return owe(t,e),twe(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 o=this.props,a=o.points,s=o.xAxis,l=o.yAxis,c=o.layout,u=o.children,d=Qr(u,df);if(!d)return null;var f=function(m,y){return{x:m.x,y:m.y,value:m.value,errorVal:kr(m.payload,y)}},h={clipPath:n?"url(#clipPath-".concat(i,")"):null};return A.createElement(pt,h,d.map(function(v){return A.cloneElement(v,{key:"bar-".concat(v.props.dataKey),data:a,xAxis:s,yAxis:l,layout:c,dataPointFormatter:f})}))}},{key:"renderDots",value:function(n,i,o){var a=this.props.isAnimationActive;if(a&&!this.state.isAnimationFinished)return null;var s=this.props,l=s.dot,c=s.points,u=s.dataKey,d=Ae(this.props,!1),f=Ae(l,!0),h=c.map(function(m,y){var w=wr(wr(wr({key:"dot-".concat(y),r:3},d),f),{},{index:y,cx:m.x,cy:m.y,value:m.value,dataKey:u,payload:m.payload,points:c});return t.renderDotItem(l,w)}),v={clipPath:n?"url(#clipPath-".concat(i?"":"dots-").concat(o,")"):null};return A.createElement(pt,_u({className:"recharts-line-dots",key:"dots"},v),h)}},{key:"renderCurveStatically",value:function(n,i,o,a){var s=this.props,l=s.type,c=s.layout,u=s.connectNulls;s.ref;var d=gC(s,Kbe),f=wr(wr(wr({},Ae(d,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:i?"url(#clipPath-".concat(o,")"):null,points:n},a),{},{type:l,layout:c,connectNulls:u});return A.createElement(gw,_u({},f,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(n,i){var o=this,a=this.props,s=a.points,l=a.strokeDasharray,c=a.isAnimationActive,u=a.animationBegin,d=a.animationDuration,f=a.animationEasing,h=a.animationId,v=a.animateNewValues,m=a.width,y=a.height,w=this.state,b=w.prevPoints,g=w.totalLength;return A.createElement(Bi,{begin:u,duration:d,isActive:c,easing:f,from:{t:0},to:{t:1},key:"line-".concat(h),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(_){var S=_.t;if(b){var E=b.length/s.length,O=s.map(function(k,L){var M=Math.floor(L*E);if(b[M]){var N=b[M],D=En(N.x,k.x),B=En(N.y,k.y);return wr(wr({},k),{},{x:D(S),y:B(S)})}if(v){var $=En(m*2,k.x),I=En(y/2,k.y);return wr(wr({},k),{},{x:$(S),y:I(S)})}return wr(wr({},k),{},{x:k.x,y:k.y})});return o.renderCurveStatically(O,n,i)}var P=En(0,g),T=P(S),j;if(l){var C="".concat(l).split(/[,\s]+/gim).map(function(k){return parseFloat(k)});j=o.getStrokeDasharray(T,g,C)}else j=o.generateSimpleStrokeDasharray(g,T);return o.renderCurveStatically(s,n,i,{strokeDasharray:j})})}},{key:"renderCurve",value:function(n,i){var o=this.props,a=o.points,s=o.isAnimationActive,l=this.state,c=l.prevPoints,u=l.totalLength;return s&&a&&a.length&&(!c&&u>0||!Zv(c,a))?this.renderCurveWithAnimation(n,i):this.renderCurveStatically(a,n,i)}},{key:"render",value:function(){var n,i=this.props,o=i.hide,a=i.dot,s=i.points,l=i.className,c=i.xAxis,u=i.yAxis,d=i.top,f=i.left,h=i.width,v=i.height,m=i.isAnimationActive,y=i.id;if(o||!s||!s.length)return null;var w=this.state.isAnimationFinished,b=s.length===1,g=Ce("recharts-line",l),_=c&&c.allowDataOverflow,S=u&&u.allowDataOverflow,E=_||S,O=Se(y)?this.id:y,P=(n=Ae(a,!1))!==null&&n!==void 0?n:{r:3,strokeWidth:2},T=P.r,j=T===void 0?3:T,C=P.strokeWidth,k=C===void 0?2:C,L=wJ(a)?a:{},M=L.clipDot,N=M===void 0?!0:M,D=j*2+k;return A.createElement(pt,{className:g},_||S?A.createElement("defs",null,A.createElement("clipPath",{id:"clipPath-".concat(O)},A.createElement("rect",{x:_?f:f-h/2,y:S?d:d-v/2,width:_?h:h*2,height:S?v:v*2})),!N&&A.createElement("clipPath",{id:"clipPath-dots-".concat(O)},A.createElement("rect",{x:f-D/2,y:d-D/2,width:h+D,height:v+D}))):null,!b&&this.renderCurve(E,O),this.renderErrorBar(E,O),(b||a)&&this.renderDots(E,N,O),(!m||w)&&Io.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 o=n.length%2!==0?[].concat(ks(n),[0]):n,a=[],s=0;s<i;++s)a=[].concat(ks(a),ks(o));return a}},{key:"renderDotItem",value:function(n,i){var o;if(A.isValidElement(n))o=A.cloneElement(n,i);else if(xe(n))o=n(i);else{var a=i.key,s=gC(i,Gbe),l=Ce("recharts-line-dot",typeof n!="boolean"?n.className:"");o=A.createElement(NS,_u({key:a},s,{className:l}))}return o}}])}(x.PureComponent);Sn(is,"displayName","Line");Sn(is,"defaultProps",{xAxisId:0,yAxisId:0,connectNulls:!1,activeDot:!0,dot:!0,legendType:"line",stroke:"#3182bd",strokeWidth:1,fill:"#fff",points:[],isAnimationActive:!Oi.isSsr,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",hide:!1,label:!1});Sn(is,"getComposedData",function(e){var t=e.props,r=e.xAxis,n=e.yAxis,i=e.xAxisTicks,o=e.yAxisTicks,a=e.dataKey,s=e.bandSize,l=e.displayedData,c=e.offset,u=t.layout,d=l.map(function(f,h){var v=kr(f,a);return u==="horizontal"?{x:ZT({axis:r,ticks:i,bandSize:s,entry:f,index:h}),y:Se(v)?null:n.scale(v),value:v,payload:f}:{x:Se(v)?null:r.scale(v),y:ZT({axis:n,ticks:o,bandSize:s,entry:f,index:h}),value:v,payload:f}});return wr({points:d,layout:u},c)});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 swe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function lwe(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,ZL(n.key),n)}}function cwe(e,t,r){return t&&lwe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function uwe(e,t,r){return t=Em(t),dwe(e,QL()?Reflect.construct(t,r||[],Em(e).constructor):t.apply(e,r))}function dwe(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 fwe(e)}function fwe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function QL(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(QL=function(){return!!e})()}function Em(e){return Em=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Em(e)}function hwe(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 JL(e,t,r){return t=ZL(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ZL(e){var t=pwe(e,"string");return tc(t)=="symbol"?t:t+""}function pwe(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)}function zw(){return zw=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},zw.apply(this,arguments)}function mwe(e){var t=e.xAxisId,r=IS(),n=DS(),i=DL(t);return i==null?null:x.createElement(Tc,zw({},i,{className:Ce("recharts-".concat(i.axisType," ").concat(i.axisType),i.className),viewBox:{x:0,y:0,width:r,height:n},ticksGenerator:function(a){return bi(a,!0)}}))}var hf=function(e){function t(){return swe(this,t),uwe(this,t,arguments)}return hwe(t,e),cwe(t,[{key:"render",value:function(){return x.createElement(mwe,this.props)}}])}(x.Component);JL(hf,"displayName","XAxis");JL(hf,"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 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)}function vwe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function gwe(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,rB(n.key),n)}}function ywe(e,t,r){return t&&gwe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function bwe(e,t,r){return t=Om(t),wwe(e,eB()?Reflect.construct(t,r||[],Om(e).constructor):t.apply(e,r))}function wwe(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 xwe(e)}function xwe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function eB(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(eB=function(){return!!e})()}function Om(e){return Om=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Om(e)}function Swe(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 tB(e,t,r){return t=rB(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function rB(e){var t=_we(e,"string");return rc(t)=="symbol"?t:t+""}function _we(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 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 Ewe=function(t){var r=t.yAxisId,n=IS(),i=DS(),o=LL(r);return o==null?null:x.createElement(Tc,Hw({},o,{className:Ce("recharts-".concat(o.axisType," ").concat(o.axisType),o.className),viewBox:{x:0,y:0,width:n,height:i},ticksGenerator:function(s){return bi(s,!0)}}))},pf=function(e){function t(){return vwe(this,t),bwe(this,t,arguments)}return Swe(t,e),ywe(t,[{key:"render",value:function(){return x.createElement(Ewe,this.props)}}])}(x.Component);tB(pf,"displayName","YAxis");tB(pf,"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 wC(e){return Awe(e)||Twe(e)||Pwe(e)||Owe()}function Owe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
361In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Pwe(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 Twe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Awe(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 Vw=function(t,r,n,i,o){var a=Qr(t,BS),s=Qr(t,ag),l=[].concat(wC(a),wC(s)),c=Qr(t,lg),u="".concat(i,"Id"),d=i[0],f=r;if(l.length&&(f=l.reduce(function(m,y){if(y.props[u]===n&&Qn(y.props,"extendDomain")&&G(y.props[d])){var w=y.props[d];return[Math.min(m[0],w),Math.max(m[1],w)]}return m},f)),c.length){var h="".concat(d,"1"),v="".concat(d,"2");f=c.reduce(function(m,y){if(y.props[u]===n&&Qn(y.props,"extendDomain")&&G(y.props[h])&&G(y.props[v])){var w=y.props[h],b=y.props[v];return[Math.min(m[0],w,b),Math.max(m[1],w,b)]}return m},f)}return o&&o.length&&(f=o.reduce(function(m,y){return G(y)?[Math.min(m[0],y),Math.max(m[1],y)]:m},f)),f},nB={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(l,c,u){this.fn=l,this.context=c,this.once=u||!1}function o(l,c,u,d,f){if(typeof u!="function")throw new TypeError("The listener must be a function");var h=new i(u,d||l,f),v=r?r+c:c;return l._events[v]?l._events[v].fn?l._events[v]=[l._events[v],h]:l._events[v].push(h):(l._events[v]=h,l._eventsCount++),l}function a(l,c){--l._eventsCount===0?l._events=new n:delete l._events[c]}function s(){this._events=new n,this._eventsCount=0}s.prototype.eventNames=function(){var c=[],u,d;if(this._eventsCount===0)return c;for(d in u=this._events)t.call(u,d)&&c.push(r?d.slice(1):d);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(u)):c},s.prototype.listeners=function(c){var u=r?r+c:c,d=this._events[u];if(!d)return[];if(d.fn)return[d.fn];for(var f=0,h=d.length,v=new Array(h);f<h;f++)v[f]=d[f].fn;return v},s.prototype.listenerCount=function(c){var u=r?r+c:c,d=this._events[u];return d?d.fn?1:d.length:0},s.prototype.emit=function(c,u,d,f,h,v){var m=r?r+c:c;if(!this._events[m])return!1;var y=this._events[m],w=arguments.length,b,g;if(y.fn){switch(y.once&&this.removeListener(c,y.fn,void 0,!0),w){case 1:return y.fn.call(y.context),!0;case 2:return y.fn.call(y.context,u),!0;case 3:return y.fn.call(y.context,u,d),!0;case 4:return y.fn.call(y.context,u,d,f),!0;case 5:return y.fn.call(y.context,u,d,f,h),!0;case 6:return y.fn.call(y.context,u,d,f,h,v),!0}for(g=1,b=new Array(w-1);g<w;g++)b[g-1]=arguments[g];y.fn.apply(y.context,b)}else{var _=y.length,S;for(g=0;g<_;g++)switch(y[g].once&&this.removeListener(c,y[g].fn,void 0,!0),w){case 1:y[g].fn.call(y[g].context);break;case 2:y[g].fn.call(y[g].context,u);break;case 3:y[g].fn.call(y[g].context,u,d);break;case 4:y[g].fn.call(y[g].context,u,d,f);break;default:if(!b)for(S=1,b=new Array(w-1);S<w;S++)b[S-1]=arguments[S];y[g].fn.apply(y[g].context,b)}}return!0},s.prototype.on=function(c,u,d){return o(this,c,u,d,!1)},s.prototype.once=function(c,u,d){return o(this,c,u,d,!0)},s.prototype.removeListener=function(c,u,d,f){var h=r?r+c:c;if(!this._events[h])return this;if(!u)return a(this,h),this;var v=this._events[h];if(v.fn)v.fn===u&&(!f||v.once)&&(!d||v.context===d)&&a(this,h);else{for(var m=0,y=[],w=v.length;m<w;m++)(v[m].fn!==u||f&&!v[m].once||d&&v[m].context!==d)&&y.push(v[m]);y.length?this._events[h]=y.length===1?y[0]:y:a(this,h)}return this},s.prototype.removeAllListeners=function(c){var u;return c?(u=r?r+c:c,this._events[u]&&a(this,u)):(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})(nB);var Cwe=nB.exports;const jwe=Ue(Cwe);var Ry=new jwe,$y="recharts.syncMouseEvents";function Md(e){"@babel/helpers - typeof";return Md=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},Md(e)}function kwe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Nwe(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,iB(n.key),n)}}function Rwe(e,t,r){return t&&Nwe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function My(e,t,r){return t=iB(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function iB(e){var t=$we(e,"string");return Md(t)=="symbol"?t:t+""}function $we(e,t){if(Md(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Md(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Mwe=function(){function e(){kwe(this,e),My(this,"activeIndex",0),My(this,"coordinateList",[]),My(this,"layout","horizontal")}return Rwe(e,[{key:"setDetails",value:function(r){var n,i=r.coordinateList,o=i===void 0?null:i,a=r.container,s=a===void 0?null:a,l=r.layout,c=l===void 0?null:l,u=r.offset,d=u===void 0?null:u,f=r.mouseHandlerCallback,h=f===void 0?null:f;this.coordinateList=(n=o??this.coordinateList)!==null&&n!==void 0?n:[],this.container=s??this.container,this.layout=c??this.layout,this.offset=d??this.offset,this.mouseHandlerCallback=h??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(),o=i.x,a=i.y,s=i.height,l=this.coordinateList[this.activeIndex].coordinate,c=((r=window)===null||r===void 0?void 0:r.scrollX)||0,u=((n=window)===null||n===void 0?void 0:n.scrollY)||0,d=o+l+c,f=a+this.offset.top+s/2+u;this.mouseHandlerCallback({pageX:d,pageY:f})}}}])}();function Iwe(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&&G(n)&&G(i))return!0}return!1}function Dwe(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 oB(e){var t=e.cx,r=e.cy,n=e.radius,i=e.startAngle,o=e.endAngle,a=Dt(t,r,n,i),s=Dt(t,r,n,o);return{points:[a,s],cx:t,cy:r,radius:n,startAngle:i,endAngle:o}}function Lwe(e,t,r){var n,i,o,a;if(e==="horizontal")n=t.x,o=n,i=r.top,a=r.top+r.height;else if(e==="vertical")i=t.y,a=i,n=r.left,o=r.left+r.width;else if(t.cx!=null&&t.cy!=null)if(e==="centric"){var s=t.cx,l=t.cy,c=t.innerRadius,u=t.outerRadius,d=t.angle,f=Dt(s,l,c,d),h=Dt(s,l,u,d);n=f.x,i=f.y,o=h.x,a=h.y}else return oB(t);return[{x:n,y:i},{x:o,y:a}]}function Id(e){"@babel/helpers - typeof";return Id=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},Id(e)}function xC(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 hh(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?xC(Object(r),!0).forEach(function(n){Bwe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Bwe(e,t,r){return t=Fwe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Fwe(e){var t=Uwe(e,"string");return Id(t)=="symbol"?t:t+""}function Uwe(e,t){if(Id(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Id(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function zwe(e){var t,r,n=e.element,i=e.tooltipEventType,o=e.isActive,a=e.activeCoordinate,s=e.activePayload,l=e.offset,c=e.activeTooltipIndex,u=e.tooltipAxisBandSize,d=e.layout,f=e.chartName,h=(t=n.props.cursor)!==null&&t!==void 0?t:(r=n.type.defaultProps)===null||r===void 0?void 0:r.cursor;if(!n||!h||!o||!a||f!=="ScatterChart"&&i!=="axis")return null;var v,m=gw;if(f==="ScatterChart")v=a,m=Uve;else if(f==="BarChart")v=Dwe(d,a,l,u),m=kS;else if(d==="radial"){var y=oB(a),w=y.cx,b=y.cy,g=y.radius,_=y.startAngle,S=y.endAngle;v={cx:w,cy:b,startAngle:_,endAngle:S,innerRadius:g,outerRadius:g},m=cL}else v={points:Lwe(d,a,l)},m=gw;var E=hh(hh(hh(hh({stroke:"#ccc",pointerEvents:"none"},l),v),Ae(h,!1)),{},{payload:s,payloadIndex:c,className:Ce("recharts-tooltip-cursor",h.className)});return x.isValidElement(h)?x.cloneElement(h,E):x.createElement(m,E)}var Wwe=["item"],Hwe=["children","className","width","height","style","compact","title","desc"];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 Qs(){return Qs=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},Qs.apply(this,arguments)}function SC(e,t){return Kwe(e)||Vwe(e,t)||sB(e,t)||qwe()}function qwe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
362In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Vwe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,o,a,s=[],l=!0,c=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(l=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(u){c=!0,i=u}finally{try{if(!l&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}function Kwe(e){if(Array.isArray(e))return e}function _C(e,t){if(e==null)return{};var r=Gwe(e,t),n,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)n=o[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Gwe(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 Ywe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Xwe(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,lB(n.key),n)}}function Qwe(e,t,r){return t&&Xwe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Jwe(e,t,r){return t=Pm(t),Zwe(e,aB()?Reflect.construct(t,r||[],Pm(e).constructor):t.apply(e,r))}function Zwe(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 exe(e)}function exe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function aB(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(aB=function(){return!!e})()}function Pm(e){return Pm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Pm(e)}function txe(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 ic(e){return ixe(e)||nxe(e)||sB(e)||rxe()}function rxe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
363In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function sB(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 nxe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function ixe(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}function EC(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 W(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?EC(Object(r),!0).forEach(function(n){de(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):EC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function de(e,t,r){return t=lB(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function lB(e){var t=oxe(e,"string");return nc(t)=="symbol"?t:t+""}function oxe(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 axe={xAxis:["bottom","top"],yAxis:["left","right"]},sxe={width:"100%",height:"100%"},cB={x:0,y:0};function ph(e){return e}var lxe=function(t,r){return r==="horizontal"?t.x:r==="vertical"?t.y:r==="centric"?t.angle:t.radius},cxe=function(t,r,n,i){var o=r.find(function(u){return u&&u.index===n});if(o){if(t==="horizontal")return{x:o.coordinate,y:i.y};if(t==="vertical")return{x:i.x,y:o.coordinate};if(t==="centric"){var a=o.coordinate,s=i.radius;return W(W(W({},i),Dt(i.cx,i.cy,s,a)),{},{angle:a,radius:s})}var l=o.coordinate,c=i.angle;return W(W(W({},i),Dt(i.cx,i.cy,l,c)),{},{angle:c,radius:l})}return cB},cg=function(t,r){var n=r.graphicalItems,i=r.dataStartIndex,o=r.dataEndIndex,a=(n??[]).reduce(function(s,l){var c=l.props.data;return c&&c.length?[].concat(ic(s),ic(c)):s},[]);return a.length>0?a:t&&t.length&&G(i)&&G(o)?t.slice(i,o+1):[]};function uB(e){return e==="number"?[0,"auto"]:void 0}var Yw=function(t,r,n,i){var o=t.graphicalItems,a=t.tooltipAxis,s=cg(r,t);return n<0||!o||!o.length||n>=s.length?null:o.reduce(function(l,c){var u,d=(u=c.props.data)!==null&&u!==void 0?u:r;d&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=n&&(d=d.slice(t.dataStartIndex,t.dataEndIndex+1));var f;if(a.dataKey&&!a.allowDuplicatedCategory){var h=d===void 0?s:d;f=Ap(h,a.dataKey,i)}else f=d&&d[n]||s[n];return f?[].concat(ic(l),[aL(c,f)]):l},[])},OC=function(t,r,n,i){var o=i||{x:t.chartX,y:t.chartY},a=lxe(o,n),s=t.orderedTooltipTicks,l=t.tooltipAxis,c=t.tooltipTicks,u=_he(a,s,c,l);if(u>=0&&c){var d=c[u]&&c[u].value,f=Yw(t,r,u,d),h=cxe(n,s,u,o);return{activeTooltipIndex:u,activeLabel:d,activePayload:f,activeCoordinate:h}}return null},uxe=function(t,r){var n=r.axes,i=r.graphicalItems,o=r.axisType,a=r.axisIdKey,s=r.stackGroups,l=r.dataStartIndex,c=r.dataEndIndex,u=t.layout,d=t.children,f=t.stackOffset,h=nL(u,o);return n.reduce(function(v,m){var y,w=m.type.defaultProps!==void 0?W(W({},m.type.defaultProps),m.props):m.props,b=w.type,g=w.dataKey,_=w.allowDataOverflow,S=w.allowDuplicatedCategory,E=w.scale,O=w.ticks,P=w.includeHidden,T=w[a];if(v[T])return v;var j=cg(t.data,{graphicalItems:i.filter(function(z){var K,te=a in z.props?z.props[a]:(K=z.type.defaultProps)===null||K===void 0?void 0:K[a];return te===T}),dataStartIndex:l,dataEndIndex:c}),C=j.length,k,L,M;Iwe(w.domain,_,b)&&(k=fw(w.domain,null,_),h&&(b==="number"||E!=="auto")&&(M=xu(j,g,"category")));var N=uB(b);if(!k||k.length===0){var D,B=(D=w.domain)!==null&&D!==void 0?D:N;if(g){if(k=xu(j,g,b),b==="category"&&h){var $=uJ(k);S&&$?(L=k,k=hm(0,C)):S||(k=nA(B,k,m).reduce(function(z,K){return z.indexOf(K)>=0?z:[].concat(ic(z),[K])},[]))}else if(b==="category")S?k=k.filter(function(z){return z!==""&&!Se(z)}):k=nA(B,k,m).reduce(function(z,K){return z.indexOf(K)>=0||K===""||Se(K)?z:[].concat(ic(z),[K])},[]);else if(b==="number"){var I=Ahe(j,i.filter(function(z){var K,te,fe=a in z.props?z.props[a]:(K=z.type.defaultProps)===null||K===void 0?void 0:K[a],Ee="hide"in z.props?z.props.hide:(te=z.type.defaultProps)===null||te===void 0?void 0:te.hide;return fe===T&&(P||!Ee)}),g,o,u);I&&(k=I)}h&&(b==="number"||E!=="auto")&&(M=xu(j,g,"category"))}else h?k=hm(0,C):s&&s[T]&&s[T].hasStack&&b==="number"?k=f==="expand"?[0,1]:oL(s[T].stackGroups,l,c):k=rL(j,i.filter(function(z){var K=a in z.props?z.props[a]:z.type.defaultProps[a],te="hide"in z.props?z.props.hide:z.type.defaultProps.hide;return K===T&&(P||!te)}),b,u,!0);if(b==="number")k=Vw(d,k,T,o,O),B&&(k=fw(B,k,_));else if(b==="category"&&B){var U=B,H=k.every(function(z){return U.indexOf(z)>=0});H&&(k=U)}}return W(W({},v),{},de({},T,W(W({},w),{},{axisType:o,domain:k,categoricalDomain:M,duplicateDomain:L,originalDomain:(y=w.domain)!==null&&y!==void 0?y:N,isCategorical:h,layout:u})))},{})},dxe=function(t,r){var n=r.graphicalItems,i=r.Axis,o=r.axisType,a=r.axisIdKey,s=r.stackGroups,l=r.dataStartIndex,c=r.dataEndIndex,u=t.layout,d=t.children,f=cg(t.data,{graphicalItems:n,dataStartIndex:l,dataEndIndex:c}),h=f.length,v=nL(u,o),m=-1;return n.reduce(function(y,w){var b=w.type.defaultProps!==void 0?W(W({},w.type.defaultProps),w.props):w.props,g=b[a],_=uB("number");if(!y[g]){m++;var S;return v?S=hm(0,h):s&&s[g]&&s[g].hasStack?(S=oL(s[g].stackGroups,l,c),S=Vw(d,S,g,o)):(S=fw(_,rL(f,n.filter(function(E){var O,P,T=a in E.props?E.props[a]:(O=E.type.defaultProps)===null||O===void 0?void 0:O[a],j="hide"in E.props?E.props.hide:(P=E.type.defaultProps)===null||P===void 0?void 0:P.hide;return T===g&&!j}),"number",u),i.defaultProps.allowDataOverflow),S=Vw(d,S,g,o)),W(W({},y),{},de({},g,W(W({axisType:o},i.defaultProps),{},{hide:!0,orientation:Xr(axe,"".concat(o,".").concat(m%2),null),domain:S,originalDomain:_,isCategorical:v,layout:u})))}return y},{})},fxe=function(t,r){var n=r.axisType,i=n===void 0?"xAxis":n,o=r.AxisComp,a=r.graphicalItems,s=r.stackGroups,l=r.dataStartIndex,c=r.dataEndIndex,u=t.children,d="".concat(i,"Id"),f=Qr(u,o),h={};return f&&f.length?h=uxe(t,{axes:f,graphicalItems:a,axisType:i,axisIdKey:d,stackGroups:s,dataStartIndex:l,dataEndIndex:c}):a&&a.length&&(h=dxe(t,{Axis:o,graphicalItems:a,axisType:i,axisIdKey:d,stackGroups:s,dataStartIndex:l,dataEndIndex:c})),h},hxe=function(t){var r=so(t),n=bi(r,!1,!0);return{tooltipTicks:n,orderedTooltipTicks:iS(n,function(i){return i.coordinate}),tooltipAxis:r,tooltipAxisBandSize:im(r,n)}},PC=function(t){var r=t.children,n=t.defaultShowTooltip,i=_r(r,Gl),o=0,a=0;return t.data&&t.data.length!==0&&(a=t.data.length-1),i&&i.props&&(i.props.startIndex>=0&&(o=i.props.startIndex),i.props.endIndex>=0&&(a=i.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:o,dataEndIndex:a,activeTooltipIndex:-1,isTooltipActive:!!n}},pxe=function(t){return!t||!t.length?!1:t.some(function(r){var n=_i(r&&r.type);return n&&n.indexOf("Bar")>=0})},TC=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"}},mxe=function(t,r){var n=t.props,i=t.graphicalItems,o=t.xAxisMap,a=o===void 0?{}:o,s=t.yAxisMap,l=s===void 0?{}:s,c=n.width,u=n.height,d=n.children,f=n.margin||{},h=_r(d,Gl),v=_r(d,ul),m=Object.keys(l).reduce(function(S,E){var O=l[E],P=O.orientation;return!O.mirror&&!O.hide?W(W({},S),{},de({},P,S[P]+O.width)):S},{left:f.left||0,right:f.right||0}),y=Object.keys(a).reduce(function(S,E){var O=a[E],P=O.orientation;return!O.mirror&&!O.hide?W(W({},S),{},de({},P,Xr(S,"".concat(P))+O.height)):S},{top:f.top||0,bottom:f.bottom||0}),w=W(W({},y),m),b=w.bottom;h&&(w.bottom+=h.props.height||Gl.defaultProps.height),v&&r&&(w=Phe(w,i,n,r));var g=c-w.left-w.right,_=u-w.top-w.bottom;return W(W({brushBottom:b},w),{},{width:Math.max(g,0),height:Math.max(_,0)})},vxe=function(t,r){if(r==="xAxis")return t[r].width;if(r==="yAxis")return t[r].height},gxe=function(t){var r=t.chartName,n=t.GraphicalChild,i=t.defaultTooltipEventType,o=i===void 0?"axis":i,a=t.validateTooltipEventTypes,s=a===void 0?["axis"]:a,l=t.axisComponents,c=t.legendContent,u=t.formatAxisMap,d=t.defaultProps,f=function(w,b){var g=b.graphicalItems,_=b.stackGroups,S=b.offset,E=b.updateId,O=b.dataStartIndex,P=b.dataEndIndex,T=w.barSize,j=w.layout,C=w.barGap,k=w.barCategoryGap,L=w.maxBarSize,M=TC(j),N=M.numericAxisName,D=M.cateAxisName,B=pxe(g),$=[];return g.forEach(function(I,U){var H=cg(w.data,{graphicalItems:[I],dataStartIndex:O,dataEndIndex:P}),z=I.type.defaultProps!==void 0?W(W({},I.type.defaultProps),I.props):I.props,K=z.dataKey,te=z.maxBarSize,fe=z["".concat(N,"Id")],Ee=z["".concat(D,"Id")],Y={},pe=l.reduce(function(yr,$n){var an=b["".concat($n.axisType,"Map")],mf=z["".concat($n.axisType,"Id")];an&&an[mf]||$n.axisType==="zAxis"||rs();var vf=an[mf];return W(W({},yr),{},de(de({},$n.axisType,vf),"".concat($n.axisType,"Ticks"),bi(vf)))},Y),q=pe[D],Q=pe["".concat(D,"Ticks")],X=_&&_[fe]&&_[fe].hasStack&&Fhe(I,_[fe].stackGroups),F=_i(I.type).indexOf("Bar")>=0,we=im(q,Q),he=[],ze=B&&Ehe({barSize:T,stackGroups:_,totalSize:vxe(pe,D)});if(F){var Le,st,ir=Se(te)?L:te,gr=(Le=(st=im(q,Q,!0))!==null&&st!==void 0?st:ir)!==null&&Le!==void 0?Le:0;he=Ohe({barGap:C,barCategoryGap:k,bandSize:gr!==we?gr:we,sizeList:ze[Ee],maxBarSize:ir}),gr!==we&&(he=he.map(function(yr){return W(W({},yr),{},{position:W(W({},yr.position),{},{offset:yr.position.offset-gr/2})})}))}var ia=I&&I.type&&I.type.getComposedData;ia&&$.push({props:W(W({},ia(W(W({},pe),{},{displayedData:H,props:w,dataKey:K,item:I,bandSize:we,barPosition:he,offset:S,stackedData:X,layout:j,dataStartIndex:O,dataEndIndex:P}))),{},de(de(de({key:I.key||"item-".concat(U)},N,pe[N]),D,pe[D]),"animationId",E)),childIndex:_J(I,w.children),item:I})}),$},h=function(w,b){var g=w.props,_=w.dataStartIndex,S=w.dataEndIndex,E=w.updateId;if(!XO({props:g}))return null;var O=g.children,P=g.layout,T=g.stackOffset,j=g.data,C=g.reverseStackOrder,k=TC(P),L=k.numericAxisName,M=k.cateAxisName,N=Qr(O,n),D=Dhe(j,N,"".concat(L,"Id"),"".concat(M,"Id"),T,C),B=l.reduce(function(z,K){var te="".concat(K.axisType,"Map");return W(W({},z),{},de({},te,fxe(g,W(W({},K),{},{graphicalItems:N,stackGroups:K.axisType===L&&D,dataStartIndex:_,dataEndIndex:S}))))},{}),$=mxe(W(W({},B),{},{props:g,graphicalItems:N}),b==null?void 0:b.legendBBox);Object.keys(B).forEach(function(z){B[z]=u(g,B[z],$,z.replace("Map",""),r)});var I=B["".concat(M,"Map")],U=hxe(I),H=f(g,W(W({},B),{},{dataStartIndex:_,dataEndIndex:S,updateId:E,graphicalItems:N,stackGroups:D,offset:$}));return W(W({formattedGraphicalItems:H,graphicalItems:N,offset:$,stackGroups:D},U),B)},v=function(y){function w(b){var g,_,S;return Ywe(this,w),S=Jwe(this,w,[b]),de(S,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),de(S,"accessibilityManager",new Mwe),de(S,"handleLegendBBoxUpdate",function(E){if(E){var O=S.state,P=O.dataStartIndex,T=O.dataEndIndex,j=O.updateId;S.setState(W({legendBBox:E},h({props:S.props,dataStartIndex:P,dataEndIndex:T,updateId:j},W(W({},S.state),{},{legendBBox:E}))))}}),de(S,"handleReceiveSyncEvent",function(E,O,P){if(S.props.syncId===E){if(P===S.eventEmitterSymbol&&typeof S.props.syncMethod!="function")return;S.applySyncEvent(O)}}),de(S,"handleBrushChange",function(E){var O=E.startIndex,P=E.endIndex;if(O!==S.state.dataStartIndex||P!==S.state.dataEndIndex){var T=S.state.updateId;S.setState(function(){return W({dataStartIndex:O,dataEndIndex:P},h({props:S.props,dataStartIndex:O,dataEndIndex:P,updateId:T},S.state))}),S.triggerSyncEvent({dataStartIndex:O,dataEndIndex:P})}}),de(S,"handleMouseEnter",function(E){var O=S.getMouseInfo(E);if(O){var P=W(W({},O),{},{isTooltipActive:!0});S.setState(P),S.triggerSyncEvent(P);var T=S.props.onMouseEnter;xe(T)&&T(P,E)}}),de(S,"triggeredAfterMouseMove",function(E){var O=S.getMouseInfo(E),P=O?W(W({},O),{},{isTooltipActive:!0}):{isTooltipActive:!1};S.setState(P),S.triggerSyncEvent(P);var T=S.props.onMouseMove;xe(T)&&T(P,E)}),de(S,"handleItemMouseEnter",function(E){S.setState(function(){return{isTooltipActive:!0,activeItem:E,activePayload:E.tooltipPayload,activeCoordinate:E.tooltipPosition||{x:E.cx,y:E.cy}}})}),de(S,"handleItemMouseLeave",function(){S.setState(function(){return{isTooltipActive:!1}})}),de(S,"handleMouseMove",function(E){E.persist(),S.throttleTriggeredAfterMouseMove(E)}),de(S,"handleMouseLeave",function(E){S.throttleTriggeredAfterMouseMove.cancel();var O={isTooltipActive:!1};S.setState(O),S.triggerSyncEvent(O);var P=S.props.onMouseLeave;xe(P)&&P(O,E)}),de(S,"handleOuterEvent",function(E){var O=SJ(E),P=Xr(S.props,"".concat(O));if(O&&xe(P)){var T,j;/.*touch.*/i.test(O)?j=S.getMouseInfo(E.changedTouches[0]):j=S.getMouseInfo(E),P((T=j)!==null&&T!==void 0?T:{},E)}}),de(S,"handleClick",function(E){var O=S.getMouseInfo(E);if(O){var P=W(W({},O),{},{isTooltipActive:!0});S.setState(P),S.triggerSyncEvent(P);var T=S.props.onClick;xe(T)&&T(P,E)}}),de(S,"handleMouseDown",function(E){var O=S.props.onMouseDown;if(xe(O)){var P=S.getMouseInfo(E);O(P,E)}}),de(S,"handleMouseUp",function(E){var O=S.props.onMouseUp;if(xe(O)){var P=S.getMouseInfo(E);O(P,E)}}),de(S,"handleTouchMove",function(E){E.changedTouches!=null&&E.changedTouches.length>0&&S.throttleTriggeredAfterMouseMove(E.changedTouches[0])}),de(S,"handleTouchStart",function(E){E.changedTouches!=null&&E.changedTouches.length>0&&S.handleMouseDown(E.changedTouches[0])}),de(S,"handleTouchEnd",function(E){E.changedTouches!=null&&E.changedTouches.length>0&&S.handleMouseUp(E.changedTouches[0])}),de(S,"handleDoubleClick",function(E){var O=S.props.onDoubleClick;if(xe(O)){var P=S.getMouseInfo(E);O(P,E)}}),de(S,"handleContextMenu",function(E){var O=S.props.onContextMenu;if(xe(O)){var P=S.getMouseInfo(E);O(P,E)}}),de(S,"triggerSyncEvent",function(E){S.props.syncId!==void 0&&Ry.emit($y,S.props.syncId,E,S.eventEmitterSymbol)}),de(S,"applySyncEvent",function(E){var O=S.props,P=O.layout,T=O.syncMethod,j=S.state.updateId,C=E.dataStartIndex,k=E.dataEndIndex;if(E.dataStartIndex!==void 0||E.dataEndIndex!==void 0)S.setState(W({dataStartIndex:C,dataEndIndex:k},h({props:S.props,dataStartIndex:C,dataEndIndex:k,updateId:j},S.state)));else if(E.activeTooltipIndex!==void 0){var L=E.chartX,M=E.chartY,N=E.activeTooltipIndex,D=S.state,B=D.offset,$=D.tooltipTicks;if(!B)return;if(typeof T=="function")N=T($,E);else if(T==="value"){N=-1;for(var I=0;I<$.length;I++)if($[I].value===E.activeLabel){N=I;break}}var U=W(W({},B),{},{x:B.left,y:B.top}),H=Math.min(L,U.x+U.width),z=Math.min(M,U.y+U.height),K=$[N]&&$[N].value,te=Yw(S.state,S.props.data,N),fe=$[N]?{x:P==="horizontal"?$[N].coordinate:H,y:P==="horizontal"?z:$[N].coordinate}:cB;S.setState(W(W({},E),{},{activeLabel:K,activeCoordinate:fe,activePayload:te,activeTooltipIndex:N}))}else S.setState(E)}),de(S,"renderCursor",function(E){var O,P=S.state,T=P.isTooltipActive,j=P.activeCoordinate,C=P.activePayload,k=P.offset,L=P.activeTooltipIndex,M=P.tooltipAxisBandSize,N=S.getTooltipEventType(),D=(O=E.props.active)!==null&&O!==void 0?O:T,B=S.props.layout,$=E.key||"_recharts-cursor";return A.createElement(zwe,{key:$,activeCoordinate:j,activePayload:C,activeTooltipIndex:L,chartName:r,element:E,isActive:D,layout:B,offset:k,tooltipAxisBandSize:M,tooltipEventType:N})}),de(S,"renderPolarAxis",function(E,O,P){var T=Xr(E,"type.axisType"),j=Xr(S.state,"".concat(T,"Map")),C=E.type.defaultProps,k=C!==void 0?W(W({},C),E.props):E.props,L=j&&j[k["".concat(T,"Id")]];return x.cloneElement(E,W(W({},L),{},{className:Ce(T,L.className),key:E.key||"".concat(O,"-").concat(P),ticks:bi(L,!0)}))}),de(S,"renderPolarGrid",function(E){var O=E.props,P=O.radialLines,T=O.polarAngles,j=O.polarRadius,C=S.state,k=C.radiusAxisMap,L=C.angleAxisMap,M=so(k),N=so(L),D=N.cx,B=N.cy,$=N.innerRadius,I=N.outerRadius;return x.cloneElement(E,{polarAngles:Array.isArray(T)?T:bi(N,!0).map(function(U){return U.coordinate}),polarRadius:Array.isArray(j)?j:bi(M,!0).map(function(U){return U.coordinate}),cx:D,cy:B,innerRadius:$,outerRadius:I,key:E.key||"polar-grid",radialLines:P})}),de(S,"renderLegend",function(){var E=S.state.formattedGraphicalItems,O=S.props,P=O.children,T=O.width,j=O.height,C=S.props.margin||{},k=T-(C.left||0)-(C.right||0),L=eL({children:P,formattedGraphicalItems:E,legendWidth:k,legendContent:c});if(!L)return null;var M=L.item,N=_C(L,Wwe);return x.cloneElement(M,W(W({},N),{},{chartWidth:T,chartHeight:j,margin:C,onBBoxUpdate:S.handleLegendBBoxUpdate}))}),de(S,"renderTooltip",function(){var E,O=S.props,P=O.children,T=O.accessibilityLayer,j=_r(P,wn);if(!j)return null;var C=S.state,k=C.isTooltipActive,L=C.activeCoordinate,M=C.activePayload,N=C.activeLabel,D=C.offset,B=(E=j.props.active)!==null&&E!==void 0?E:k;return x.cloneElement(j,{viewBox:W(W({},D),{},{x:D.left,y:D.top}),active:B,label:N,payload:B?M:[],coordinate:L,accessibilityLayer:T})}),de(S,"renderBrush",function(E){var O=S.props,P=O.margin,T=O.data,j=S.state,C=j.offset,k=j.dataStartIndex,L=j.dataEndIndex,M=j.updateId;return x.cloneElement(E,{key:E.key||"_recharts-brush",onChange:ch(S.handleBrushChange,E.props.onChange),data:T,x:G(E.props.x)?E.props.x:C.left,y:G(E.props.y)?E.props.y:C.top+C.height+C.brushBottom-(P.bottom||0),width:G(E.props.width)?E.props.width:C.width,startIndex:k,endIndex:L,updateId:"brush-".concat(M)})}),de(S,"renderReferenceElement",function(E,O,P){if(!E)return null;var T=S,j=T.clipPathId,C=S.state,k=C.xAxisMap,L=C.yAxisMap,M=C.offset,N=E.type.defaultProps||{},D=E.props,B=D.xAxisId,$=B===void 0?N.xAxisId:B,I=D.yAxisId,U=I===void 0?N.yAxisId:I;return x.cloneElement(E,{key:E.key||"".concat(O,"-").concat(P),xAxis:k[$],yAxis:L[U],viewBox:{x:M.left,y:M.top,width:M.width,height:M.height},clipPathId:j})}),de(S,"renderActivePoints",function(E){var O=E.item,P=E.activePoint,T=E.basePoint,j=E.childIndex,C=E.isRange,k=[],L=O.props.key,M=O.item.type.defaultProps!==void 0?W(W({},O.item.type.defaultProps),O.item.props):O.item.props,N=M.activeDot,D=M.dataKey,B=W(W({index:j,dataKey:D,cx:P.x,cy:P.y,r:4,fill:jS(O.item),strokeWidth:2,stroke:"#fff",payload:P.payload,value:P.value},Ae(N,!1)),Cp(N));return k.push(w.renderActiveDot(N,B,"".concat(L,"-activePoint-").concat(j))),T?k.push(w.renderActiveDot(N,W(W({},B),{},{cx:T.x,cy:T.y}),"".concat(L,"-basePoint-").concat(j))):C&&k.push(null),k}),de(S,"renderGraphicChild",function(E,O,P){var T=S.filterFormatItem(E,O,P);if(!T)return null;var j=S.getTooltipEventType(),C=S.state,k=C.isTooltipActive,L=C.tooltipAxis,M=C.activeTooltipIndex,N=C.activeLabel,D=S.props.children,B=_r(D,wn),$=T.props,I=$.points,U=$.isRange,H=$.baseLine,z=T.item.type.defaultProps!==void 0?W(W({},T.item.type.defaultProps),T.item.props):T.item.props,K=z.activeDot,te=z.hide,fe=z.activeBar,Ee=z.activeShape,Y=!!(!te&&k&&B&&(K||fe||Ee)),pe={};j!=="axis"&&B&&B.props.trigger==="click"?pe={onClick:ch(S.handleItemMouseEnter,E.props.onClick)}:j!=="axis"&&(pe={onMouseLeave:ch(S.handleItemMouseLeave,E.props.onMouseLeave),onMouseEnter:ch(S.handleItemMouseEnter,E.props.onMouseEnter)});var q=x.cloneElement(E,W(W({},T.props),pe));function Q($n){return typeof L.dataKey=="function"?L.dataKey($n.payload):null}if(Y)if(M>=0){var X,F;if(L.dataKey&&!L.allowDuplicatedCategory){var we=typeof L.dataKey=="function"?Q:"payload.".concat(L.dataKey.toString());X=Ap(I,we,N),F=U&&H&&Ap(H,we,N)}else X=I==null?void 0:I[M],F=U&&H&&H[M];if(Ee||fe){var he=E.props.activeIndex!==void 0?E.props.activeIndex:M;return[x.cloneElement(E,W(W(W({},T.props),pe),{},{activeIndex:he})),null,null]}if(!Se(X))return[q].concat(ic(S.renderActivePoints({item:T,activePoint:X,basePoint:F,childIndex:M,isRange:U})))}else{var ze,Le=(ze=S.getItemByXY(S.state.activeCoordinate))!==null&&ze!==void 0?ze:{graphicalItem:q},st=Le.graphicalItem,ir=st.item,gr=ir===void 0?E:ir,ia=st.childIndex,yr=W(W(W({},T.props),pe),{},{activeIndex:ia});return[x.cloneElement(gr,yr),null,null]}return U?[q,null,null]:[q,null]}),de(S,"renderCustomized",function(E,O,P){return x.cloneElement(E,W(W({key:"recharts-customized-".concat(P)},S.props),S.state))}),de(S,"renderMap",{CartesianGrid:{handler:ph,once:!0},ReferenceArea:{handler:S.renderReferenceElement},ReferenceLine:{handler:ph},ReferenceDot:{handler:S.renderReferenceElement},XAxis:{handler:ph},YAxis:{handler:ph},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((g=b.id)!==null&&g!==void 0?g:of("recharts"),"-clip"),S.throttleTriggeredAfterMouseMove=J2(S.triggeredAfterMouseMove,(_=b.throttleDelay)!==null&&_!==void 0?_:1e3/60),S.state={},S}return txe(w,y),Qwe(w,[{key:"componentDidMount",value:function(){var g,_;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(g=this.props.margin.left)!==null&&g!==void 0?g:0,top:(_=this.props.margin.top)!==null&&_!==void 0?_:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var g=this.props,_=g.children,S=g.data,E=g.height,O=g.layout,P=_r(_,wn);if(P){var T=P.props.defaultIndex;if(!(typeof T!="number"||T<0||T>this.state.tooltipTicks.length-1)){var j=this.state.tooltipTicks[T]&&this.state.tooltipTicks[T].value,C=Yw(this.state,S,T,j),k=this.state.tooltipTicks[T].coordinate,L=(this.state.offset.top+E)/2,M=O==="horizontal",N=M?{x:k,y:L}:{y:k,x:L},D=this.state.formattedGraphicalItems.find(function($){var I=$.item;return I.type.name==="Scatter"});D&&(N=W(W({},N),D.props.points[T].tooltipPosition),C=D.props.points[T].tooltipPayload);var B={activeTooltipIndex:T,isTooltipActive:!0,activeLabel:j,activePayload:C,activeCoordinate:N};this.setState(B),this.renderCursor(P),this.accessibilityManager.setIndex(T)}}}},{key:"getSnapshotBeforeUpdate",value:function(g,_){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==_.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==g.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==g.margin){var S,E;this.accessibilityManager.setDetails({offset:{left:(S=this.props.margin.left)!==null&&S!==void 0?S:0,top:(E=this.props.margin.top)!==null&&E!==void 0?E:0}})}return null}},{key:"componentDidUpdate",value:function(g){Tb([_r(g.children,wn)],[_r(this.props.children,wn)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var g=_r(this.props.children,wn);if(g&&typeof g.props.shared=="boolean"){var _=g.props.shared?"axis":"item";return s.indexOf(_)>=0?_:o}return o}},{key:"getMouseInfo",value:function(g){if(!this.container)return null;var _=this.container,S=_.getBoundingClientRect(),E=Yle(S),O={chartX:Math.round(g.pageX-E.left),chartY:Math.round(g.pageY-E.top)},P=S.width/_.offsetWidth||1,T=this.inRange(O.chartX,O.chartY,P);if(!T)return null;var j=this.state,C=j.xAxisMap,k=j.yAxisMap,L=this.getTooltipEventType(),M=OC(this.state,this.props.data,this.props.layout,T);if(L!=="axis"&&C&&k){var N=so(C).scale,D=so(k).scale,B=N&&N.invert?N.invert(O.chartX):null,$=D&&D.invert?D.invert(O.chartY):null;return W(W({},O),{},{xValue:B,yValue:$},M)}return M?W(W({},O),M):null}},{key:"inRange",value:function(g,_){var S=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,E=this.props.layout,O=g/S,P=_/S;if(E==="horizontal"||E==="vertical"){var T=this.state.offset,j=O>=T.left&&O<=T.left+T.width&&P>=T.top&&P<=T.top+T.height;return j?{x:O,y:P}:null}var C=this.state,k=C.angleAxisMap,L=C.radiusAxisMap;if(k&&L){var M=so(k);return aA({x:O,y:P},M)}return null}},{key:"parseEventsOfWrapper",value:function(){var g=this.props.children,_=this.getTooltipEventType(),S=_r(g,wn),E={};S&&_==="axis"&&(S.props.trigger==="click"?E={onClick:this.handleClick}:E={onMouseEnter:this.handleMouseEnter,onDoubleClick:this.handleDoubleClick,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onContextMenu:this.handleContextMenu});var O=Cp(this.props,this.handleOuterEvent);return W(W({},O),E)}},{key:"addListener",value:function(){Ry.on($y,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){Ry.removeListener($y,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(g,_,S){for(var E=this.state.formattedGraphicalItems,O=0,P=E.length;O<P;O++){var T=E[O];if(T.item===g||T.props.key===g.key||_===_i(T.item.type)&&S===T.childIndex)return T}return null}},{key:"renderClipPath",value:function(){var g=this.clipPathId,_=this.state.offset,S=_.left,E=_.top,O=_.height,P=_.width;return A.createElement("defs",null,A.createElement("clipPath",{id:g},A.createElement("rect",{x:S,y:E,height:O,width:P})))}},{key:"getXScales",value:function(){var g=this.state.xAxisMap;return g?Object.entries(g).reduce(function(_,S){var E=SC(S,2),O=E[0],P=E[1];return W(W({},_),{},de({},O,P.scale))},{}):null}},{key:"getYScales",value:function(){var g=this.state.yAxisMap;return g?Object.entries(g).reduce(function(_,S){var E=SC(S,2),O=E[0],P=E[1];return W(W({},_),{},de({},O,P.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(g){var _;return(_=this.state.xAxisMap)===null||_===void 0||(_=_[g])===null||_===void 0?void 0:_.scale}},{key:"getYScaleByAxisId",value:function(g){var _;return(_=this.state.yAxisMap)===null||_===void 0||(_=_[g])===null||_===void 0?void 0:_.scale}},{key:"getItemByXY",value:function(g){var _=this.state,S=_.formattedGraphicalItems,E=_.activeItem;if(S&&S.length)for(var O=0,P=S.length;O<P;O++){var T=S[O],j=T.props,C=T.item,k=C.type.defaultProps!==void 0?W(W({},C.type.defaultProps),C.props):C.props,L=_i(C.type);if(L==="Bar"){var M=(j.data||[]).find(function($){return kve(g,$)});if(M)return{graphicalItem:T,payload:M}}else if(L==="RadialBar"){var N=(j.data||[]).find(function($){return aA(g,$)});if(N)return{graphicalItem:T,payload:N}}else if(rg(T,E)||ng(T,E)||jd(T,E)){var D=$ge({graphicalItem:T,activeTooltipItem:E,itemData:k.data}),B=k.activeIndex===void 0?D:k.activeIndex;return{graphicalItem:W(W({},T),{},{childIndex:B}),payload:jd(T,E)?k.data[D]:T.props.data[D]}}}return null}},{key:"render",value:function(){var g=this;if(!XO(this))return null;var _=this.props,S=_.children,E=_.className,O=_.width,P=_.height,T=_.style,j=_.compact,C=_.title,k=_.desc,L=_C(_,Hwe),M=Ae(L,!1);if(j)return A.createElement(iC,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},A.createElement(Cb,Qs({},M,{width:O,height:P,title:C,desc:k}
363),this.renderClipPath(),JO(S,this.renderMap)));if(this.props.accessibilityLayer){var N,D;M.tabIndex=(N=this.props.tabIndex)!==null&&N!==void 0?N:0,M.role=(D=this.props.role)!==null&&D!==void 0?D:"application",M.onKeyDown=function($){g.accessibilityManager.keyboardEvent($)},M.onFocus=function(){g.accessibilityManager.focus()}}var B=this.parseEventsOfWrapper();return A.createElement(iC,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},A.createElement("div",Qs({className:Ce("recharts-wrapper",E),style:W({position:"relative",cursor:"default",width:O,height:P},T)},B,{ref:function(I){g.container=I}}),A.createElement(Cb,Qs({},M,{width:O,height:P,title:C,desc:k,style:sxe}),this.renderClipPath(),JO(S,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])}(x.Component);de(v,"displayName",r),de(v,"defaultProps",W({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},d)),de(v,"getDerivedStateFromProps",function(y,w){var b=y.dataKey,g=y.data,_=y.children,S=y.width,E=y.height,O=y.layout,P=y.stackOffset,T=y.margin,j=w.dataStartIndex,C=w.dataEndIndex;if(w.updateId===void 0){var k=PC(y);return W(W(W({},k),{},{updateId:0},h(W(W({props:y},k),{},{updateId:0}),w)),{},{prevDataKey:b,prevData:g,prevWidth:S,prevHeight:E,prevLayout:O,prevStackOffset:P,prevMargin:T,prevChildren:_})}if(b!==w.prevDataKey||g!==w.prevData||S!==w.prevWidth||E!==w.prevHeight||O!==w.prevLayout||P!==w.prevStackOffset||!cl(T,w.prevMargin)){var L=PC(y),M={chartX:w.chartX,chartY:w.chartY,isTooltipActive:w.isTooltipActive},N=W(W({},OC(w,g,O)),{},{updateId:w.updateId+1}),D=W(W(W({},L),M),N);return W(W(W({},D),h(W({props:y},D),w)),{},{prevDataKey:b,prevData:g,prevWidth:S,prevHeight:E,prevLayout:O,prevStackOffset:P,prevMargin:T,prevChildren:_})}if(!Tb(_,w.prevChildren)){var B,$,I,U,H=_r(_,Gl),z=H&&(B=($=H.props)===null||$===void 0?void 0:$.startIndex)!==null&&B!==void 0?B:j,K=H&&(I=(U=H.props)===null||U===void 0?void 0:U.endIndex)!==null&&I!==void 0?I:C,te=z!==j||K!==C,fe=!Se(g),Ee=fe&&!te?w.updateId:w.updateId+1;return W(W({updateId:Ee},h(W(W({props:y},w),{},{updateId:Ee,dataStartIndex:z,dataEndIndex:K}),w)),{},{prevChildren:_,dataStartIndex:z,dataEndIndex:K})}return null}),de(v,"renderActiveDot",function(y,w,b){var g;return x.isValidElement(y)?g=x.cloneElement(y,w):xe(y)?g=y(w):g=A.createElement(NS,w),A.createElement(pt,{className:"recharts-active-dot",key:b},g)});var m=x.forwardRef(function(w,b){return A.createElement(v,Qs({},w,{ref:b}))});return m.displayName=v.displayName,m},dB=gxe({chartName:"LineChart",GraphicalChild:is,axisComponents:[{axisType:"xAxis",AxisComp:hf},{axisType:"yAxis",AxisComp:pf}],formatAxisMap:o0e});const yxe=["All","Markets","Crypto","Macro","Geopolitical","Earnings","Energy"];function bxe(){const{source_name:e}=s4(),t=decodeURIComponent(e||""),[r,n]=x.useState(0),[i,o]=x.useState("All"),[a,s]=x.useState(!1),[l,c]=x.useState(!1),{data:u,refetch:d}=We({queryKey:["source",t],queryFn:()=>W9(t),enabled:!!t}),{data:f=[]}=We({queryKey:["sourceHistory",t],queryFn:()=>cI(t),enabled:!!t}),{data:h,refetch:v}=We({queryKey:["sourceArticles",t,r,i,a],queryFn:()=>H9(t,{category:i==="All"?void 0:i,predictionsOnly:a||void 0,page:r}),enabled:!!t}),{data:m=[]}=We({queryKey:["sourcePredictions",t],queryFn:()=>q9(t),enabled:!!t}),{data:y}=We({queryKey:["sourceConfirmations",t],queryFn:()=>V9(t),enabled:!!t}),{data:w}=We({queryKey:["sourceFirstDate",t],queryFn:()=>K9(t),enabled:!!t}),{data:b=0}=We({queryKey:["sourceAvgImportance",t],queryFn:()=>_b(t),enabled:!!t});x.useEffect(()=>{const N=ve.channel(`source-profile-${t}`).on("postgres_changes",{event:"*",schema:"public",table:"news_articles"},()=>{d(),v()}).on("postgres_changes",{event:"*",schema:"public",table:"source_reliability"},()=>{d()}).subscribe();return()=>{ve.removeChannel(N)}},[t,d,v]);const g=(h==null?void 0:h.articles)||[],_=(h==null?void 0:h.total)||0,S=Math.ceil(_/20),E=(u==null?void 0:u.reliability_score)??.5,O=E>.75?"high":E>.4?"medium":"low",P=O==="high"?"Highly Reliable":O==="medium"?"Moderately Reliable":"Low Reliability",T=O==="high"?"text-success":O==="medium"?"text-warning":"text-danger",j=m.length,C=m.filter(N=>N.outcome==="Confirmed").length,k=m.filter(N=>N.outcome==="Refuted").length,L=m.filter(N=>N.outcome==="Pending").length,M=f.map(N=>({date:cr(new Date(N.recorded_at),"MMM d"),score:N.reliability_score,fullDate:N.recorded_at}));return t?p.jsxs(cs,{children:[p.jsxs("div",{className:"space-y-6",children:[p.jsxs("nav",{className:"flex items-center gap-1 text-sm text-muted-foreground",children:[p.jsx(dp,{to:"/",className:"hover:text-foreground transition-colors",children:"Dashboard"}),p.jsx(kE,{className:"h-3 w-3"}),p.jsx(dp,{to:"/sources",className:"hover:text-foreground transition-colors",children:"Sources"}),p.jsx(kE,{className:"h-3 w-3"}),p.jsx("span",{className:"text-foreground font-medium",children:t})]}),p.jsxs("div",{className:"flex flex-col lg:flex-row items-start gap-6",children:[p.jsxs("div",{className:"flex items-center gap-6",children:[p.jsxs("div",{className:"relative flex items-center justify-center",children:[p.jsxs("svg",{className:"w-28 h-28 -rotate-90",viewBox:"0 0 120 120",children:[p.jsx("circle",{cx:"60",cy:"60",r:"50",stroke:"hsl(var(--muted))",strokeWidth:"10",fill:"none"}),p.jsx("circle",{cx:"60",cy:"60",r:"50",stroke:O==="high"?"hsl(var(--success))":O==="medium"?"hsl(var(--warning))":"hsl(var(--danger))",strokeWidth:"10",fill:"none",strokeLinecap:"round",strokeDasharray:`${E*314} 314`})]}),p.jsxs("div",{className:"absolute text-center",children:[p.jsx("span",{className:Z("text-2xl font-heading font-bold",T),children:Math.round(E*100)}),p.jsx("span",{className:Z("text-xs",T),children:"%"})]})]}),p.jsxs("div",{children:[p.jsx("h1",{className:"font-heading text-2xl font-bold tracking-tight",children:t}
363),p.jsx("p",{className:Z("text-sm font-medium mt-1",T),children:P})]})]}),p.jsx("div",{className:"ml-auto",children:p.jsx(jt,{variant:"outline",onClick:()=>c(!0),children:"Compare with another source"})})]}),p.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 lg:grid-cols-7 gap-3",children:[{label:"Total Articles",value:(u==null?void 0:u.total_articles)??0},{label:"Confirmed Stories",value:(u==null?void 0:u.confirmed_count)??0},{label:"Predictions Made",value:(u==null?void 0:u.prediction_total)??0},{label:"Predictions Confirmed",value:(u==null?void 0:u.prediction_confirmed)??0},{label:"Pred. Accuracy",value:u!=null&&u.prediction_total?`${Math.round(u.prediction_confirmed/u.prediction_total*100)}%`:"N/A"},{label:"Avg Importance",value:`${Math.round(b*100)}%`},{label:"Member Since",value:w?cr(new Date(w),"MMM d, yyyy"):"—"}].map(N=>p.jsx(Pe,{children:p.jsxs(Te,{className:"p-3 text-center",children:[p.jsx("p",{className:"text-[10px] text-muted-foreground uppercase tracking-wider",children:N.label}),p.jsx("p",{className:"text-lg font-heading font-bold mt-1",children:N.value})]})},N.label))}),p.jsxs(Pe,{children:[p.jsx(mi,{className:"pb-2",children:p.jsx(vi,{className:"font-heading text-base",children:"Reliability History"})}),p.jsx(Te,{children:M.length<=1?p.jsxs("div",{className:"flex flex-col items-center justify-center py-8 text-center",children:[M.length===1&&p.jsx("div",{className:"h-4 w-4 rounded-full bg-primary mb-3"}),p.jsxs("p",{className:"text-sm text-muted-foreground flex items-center gap-1",children:[p.jsx(wz,{className:"h-3 w-3"}),M.length===0?"No history data yet":`Current score: ${Math.round(M[0].score*100)}%. More history will appear as new articles are ingested.`]})]}):p.jsx(Z2,{width:"100%",height:200,children:p.jsxs(dB,{data:M,children:[p.jsx(zS,{strokeDasharray:"3 3",stroke:"hsl(var(--border))"}),p.jsx(hf,{dataKey:"date",tick:{fontSize:11,fill:"hsl(var(--muted-foreground))"}}),p.jsx(pf,{domain:[0,1],tick:{fontSize:11,fill:"hsl(var(--muted-foreground))"}}),p.jsx(wn,{contentStyle:{backgroundColor:"hsl(var(--card))",border:"1px solid hsl(var(--border))",borderRadius:"8px",fontSize:12},formatter:N=>[`${Math.round(N*100)}%`,"Reliability"]}),p.jsx(is,{type:"monotone",dataKey:"score",stroke:"hsl(var(--primary))",strokeWidth:2,dot:{r:3}})]})})})]}),p.jsxs(DI,{defaultValue:"articles",children:[p.jsxs($1,{children:[p.jsxs(So,{value:"articles",children:["Articles (",_,")"]}),p.jsxs(So,{value:"predictions",children:["Predictions (",j,")"]}),p.jsxs(So,{value:"confirmations",children:["Confirmations (",((y==null?void 0:y.confirmedByOthers.length)||0)+((y==null?void 0:y.confirmedOthers.length)||0),")"]}),t.startsWith("@")&&p.jsx(So,{value:"tweet-verification",children:"Tweet Verification"})]}),p.jsxs(_o,{value:"articles",className:"space-y-4",children:[p.jsxs("div",{className:"flex flex-wrap gap-3 items-center",children:[p.jsxs(Ya,{value:i,onValueChange:N=>{o(N),n(0)},children:[p.jsx(Wo,{className:"w-36",children:p.jsx(Xa,{})}),p.jsx(Ho,{children:yxe.map(N=>p.jsx(Si,{value:N,children:N},N))})]}),p.jsx(jt,{variant:a?"default":"outline",size:"sm",onClick:()=>{s(!a),n(0)},children:"Predictions Only"})]}),p.jsx(Pe,{children:p.jsx(Te,{className:"p-0",children:p.jsxs(qr,{children:[p.jsx(Vr,{children:p.jsxs(je,{children:[p.jsx(ae,{children:"Headline"}),p.jsx(ae,{children:"Category"}),p.jsx(ae,{children:"Importance"}),p.jsx(ae,{children:"Published"}),p.jsx(ae,{children:"Confirmed"}),p.jsx(ae,{children:"Prediction"})]})}),p.jsx(Kr,{children:g.length===0?p.jsx(je,{children:p.jsx(J,{colSpan:6,className:"text-center text-muted-foreground py-8",children:"No articles found"})}):g.map(N=>p.jsxs(je,{children:[p.jsx(J,{className:"max-w-[250px] text-sm font-medium truncate",children:N.headline}),p.jsx(J,{children:p.jsx(qo,{category:N.category})}),p.jsx(J,{children:p.jsx(gv,{score:N.importance_score})}),p.jsx(J,{className:"text-xs text-muted-foreground",children:N.published_at?cr(new Date(N.published_at),"MMM d, yyyy"):"—"}),p.jsx(J,{children:p.jsx(tr,{variant:"outline",className:Z("text-[10px]","border-muted-foreground/30 text-muted-foreground"),children:"—"})}),p.jsx(J,{children:N.is_prediction?p.jsx(tr,{variant:"outline",className:"text-[10px] border-purple-500/30 text-purple-400 bg-purple-500/5",children:"Yes"}):p.jsx("span",{className:"text-xs text-muted-foreground",children:"—"})})]},N.id))})]})})}),S>1&&p.jsxs("div",{className:"flex items-center justify-center gap-2",children:[p.jsx(jt,{variant:"outline",size:"sm",disabled:r===0,onClick:()=>n(N=>N-1),children:"Previous"}),p.jsxs("span",{className:"text-sm text-muted-foreground",children:["Page ",r+1," of ",S]}),p.jsx(jt,{variant:"outline",size:"sm",disabled:r>=S-1,onClick:()=>n(N=>N+1),children:"Next"})]})]}),p.jsxs(_o,{value:"predictions",className:"space-y-4",children:[p.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-3",children:[{label:"Total",value:j},{label:"Confirmed",value:C,color:"text-success"},{label:"Refuted",value:k,color:"text-danger"},{label:"Pending",value:L,color:"text-muted-foreground"}].map(N=>p.jsx(Pe,{children:p.jsxs(Te,{className:"p-3 text-center",children:[p.jsx("p",{className:"text-[10px] text-muted-foreground uppercase",children:N.label}),p.jsx("p",{className:Z("text-xl font-heading font-bold",N.color),children:N.value})]})},N.label))}),p.jsx(Pe,{children:p.jsx(Te,{className:"p-0",children:p.jsxs(qr,{children:[p.jsx(Vr,{children:p.jsxs(je,{children:[p.jsx(ae,{children:"Prediction"}),p.jsx(ae,{children:"Published"}),p.jsx(ae,{children:"Status"}),p.jsx(ae,{children:"Resolved"})]})}),p.jsx(Kr,{children:m.length===0?p.jsx(je,{children:p.jsx(J,{colSpan:4,className:"text-center text-muted-foreground py-8",children:"No predictions from this source"})}):m.map(N=>{var D,B;return p.jsxs(je,{children:[p.jsxs(J,{className:"max-w-[300px]",children:[p.jsx("p",{className:"text-sm truncate",children:N.prediction_text}),p.jsx("p",{className:"text-[10px] text-muted-foreground mt-0.5",children:(D=N.news_articles)==null?void 0:D.headline})]}),p.jsx(J,{className:"text-xs text-muted-foreground",children:(B=N.news_articles)!=null&&B.published_at?cr(new Date(N.news_articles.published_at),"MMM d, yyyy"):"—"}),p.jsx(J,{children:p.jsx(vv,{status:N.outcome})}),p.jsx(J,{className:"text-xs text-muted-foreground",children:N.resolved_at?cr(new Date(N.resolved_at),"MMM d, yyyy"):"—"})]},N.id)})})]})})})]}),p.jsxs(_o,{value:"confirmations",className:"space-y-6",children:[p.jsxs("div",{children:[p.jsx("h3",{className:"font-heading text-sm font-semibold mb-3",children:"This source's stories confirmed by others"}),p.jsx(Pe,{children:p.jsx(Te,{className:"p-0",children:p.jsxs(qr,{children:[p.jsx(Vr,{children:p.jsxs(je,{children:[p.jsx(ae,{children:"Headline"}),p.jsx(ae,{children:"Confirmed By"}),p.jsx(ae,{children:"Date"}),p.jsx(ae,{children:"Strength"})]})}),p.jsx(Kr,{children:((y==null?void 0:y.confirmedByOthers)||[]).length===0?p.jsx(je,{children:p.jsx(J,{colSpan:4,className:"text-center text-muted-foreground py-6",children:"No confirmations yet"})}):((y==null?void 0:y.confirmedByOthers)||[]).map(N=>{var D,B;return p.jsxs(je,{children:[p.jsx(J,{className:"text-sm max-w-[200px] truncate",children:(D=N.original)==null?void 0:D.headline}),p.jsx(J,{children:p.jsx(Mi,{name:((B=N.confirming)==null?void 0:B.source_name)||"",className:"text-sm"})}),p.jsx(J,{className:"text-xs text-muted-foreground",children:N.confirmed_at?cr(new Date(N.confirmed_at),"MMM d, yyyy"):"—"}),p.jsx(J,{children:p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(td,{value:N.confirmation_strength*100,className:"h-1.5 w-16"}),p.jsxs("span",{className:"text-xs text-muted-foreground",children:[Math.round(N.confirmation_strength*100),"%"]})]})})]},N.id)})})]})})})]}),p.jsxs("div",{children:[p.jsx("h3",{className:"font-heading text-sm font-semibold mb-3",children:"Stories this 
363source confirmed"}),p.jsx(Pe,{children:p.jsx(Te,{className:"p-0",children:p.jsxs(qr,{children:[p.jsx(Vr,{children:p.jsxs(je,{children:[p.jsx(ae,{children:"Original Headline"}),p.jsx(ae,{children:"Original Source"}),p.jsx(ae,{children:"Date"}),p.jsx(ae,{children:"Strength"})]})}),p.jsx(Kr,{children:((y==null?void 0:y.confirmedOthers)||[]).length===0?p.jsx(je,{children:p.jsx(J,{colSpan:4,className:"text-center text-muted-foreground py-6",children:"No confirmations yet"})}):((y==null?void 0:y.confirmedOthers)||[]).map(N=>{var D,B;return p.jsxs(je,{children:[p.jsx(J,{className:"text-sm max-w-[200px] truncate",children:(D=N.original)==null?void 0:D.headline}),p.jsx(J,{children:p.jsx(Mi,{name:((B=N.original)==null?void 0:B.source_name)||"",className:"text-sm"})}),p.jsx(J,{className:"text-xs text-muted-foreground",children:N.confirmed_at?cr(new Date(N.confirmed_at),"MMM d, yyyy"):"—"}),p.jsx(J,{children:p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(td,{value:N.confirmation_strength*100,className:"h-1.5 w-16"}),p.jsxs("span",{className:"text-xs text-muted-foreground",children:[Math.round(N.confirmation_strength*100),"%"]})]})})]},N.id)})})]})})})]})]}),t.startsWith("@")&&p.jsx(_o,{value:"tweet-verification",children:p.jsx(wxe,{handle:t.replace("@","")})})]})]}),p.jsx(xxe,{sourceName:t,sourceScore:E,sourceHistory:f,source:u,open:l,onClose:()=>c(!1)})]}):null}function wxe({handle:e}){const{data:t=[]}=We({queryKey:["tweetVerification",e],queryFn:()=>dI(e)}),r=t.length,n=t.filter(i=>i.confirmation_status==="Confirmed").length;return t.filter(i=>i.confirmation_status==="Refuted").length,p.jsxs("div",{className:"space-y-4 mt-4",children:[p.jsx(Pe,{children:p.jsx(Te,{className:"p-4",children:p.jsxs("p",{className:"text-sm",children:[p.jsx("span",{className:"font-bold",children:r})," tweets were predictions."," ",p.jsx("span",{className:"font-bold text-success",children:n})," were confirmed by media sources."," ",r>0&&p.jsxs("span",{children:["Reliability score: ",p.jsxs("span",{className:"font-bold",children:[Math.round(n/r*100),"%"]})]})]})})}),p.jsxs("div",{className:"space-y-2",children:[t.map(i=>{const o=i.confirmation_status==="Confirmed"?"bg-success":i.confirmation_status==="Refuted"?"bg-danger":"bg-muted-foreground";return p.jsxs("div",{className:"flex items-start gap-3",children:[p.jsxs("div",{className:"flex flex-col items-center mt-1",children:[p.jsx("div",{className:Z("h-3 w-3 rounded-full shrink-0",o)}),p.jsx("div",{className:"h-full w-px bg-border"})]}),p.jsx(Pe,{className:"flex-1",children:p.jsxs(Te,{className:"p-3",children:[p.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:i.tweeted_at?cr(new Date(i.tweeted_at),"MMM d, yyyy HH:mm"):"—"}),p.jsx("p",{className:"text-sm",children:i.tweet_text}),i.prediction_text&&p.jsxs("p",{className:"text-xs text-muted-foreground mt-1 italic",children:["Prediction: ",i.prediction_text]}),i.confirming_source&&p.jsxs("p",{className:"text-xs text-success mt-1",children:["Confirmed by ",i.confirming_source,i.confirmed_at&&` • ${zo(new Date(i.confirmed_at),{addSuffix:!0})}`]}),p.jsx(vv,{status:i.confirmation_status})]})})]},i.id)}),t.length===0&&p.jsx(Pe,{children:p.jsx(Te,{className:"p-8 text-center text-muted-foreground",children:"No prediction tweets evaluated yet"})})]})]})}function xxe({sourceName:e,sourceScore:t,sourceHistory:r,source:n,open:i,onClose:o}){const[a,s]=x.useState(""),[l,c]=x.useState(null),{data:u=[]}=We({queryKey:["allSources"],queryFn:lI,enabled:i}),f=u.filter(b=>b.source_name!==e).filter(b=>b.source_name.toLowerCase().includes(a.toLowerCase())),h=u.find(b=>b.source_name===l),{data:v=[]}=We({queryKey:["sourceHistory",l],queryFn:()=>cI(l),enabled:!!l}),{data:m=0}=We({queryKey:["sourceAvgImportance",l],queryFn:()=>_b(l),enabled:!!l}),{data:y=0}=We({queryKey:["sourceAvgImportance",e],queryFn:()=>_b(e),enabled:i}),w=x.useMemo(()=>{const b=new Set([...r.map(g=>cr(new Date(g.recorded_at),"MMM d")),...v.map(g=>cr(new Date(g.recorded_at),"MMM d"))]);return Array.from(b).map(g=>{var _,S;return{date:g,source1:(_=r.find(E=>cr(new Date(E.recorded_at),"MMM d")===g))==null?void 0:_.reliability_score,source2:(S=v.find(E=>cr(new Date(E.recorded_at),"MMM d")===g))==null?void 0:S.reliability_score}})},[r,v]);return p.jsx(TM,{open:i,onOpenChange:()=>{o(),c(null),s("")},children:p.jsxs(w1,{className:"w-[520px] sm:max-w-[520px] bg-card border-border",children:[p.jsx(x1,{children:p.jsx(S1,{className:"font-heading",children:"Compare Sources"})}),p.jsx(T1,{className:"h-[calc(100vh-100px)] mt-4",children:p.jsx("div",{className:"space-y-4 pr-4",children:l?p.jsxs(p.Fragment,{children:[p.jsx(jt,{variant:"ghost",size:"sm",onClick:()=>c(null),children:"← Back to search"}),p.jsxs("div",{className:"grid grid-cols-3 gap-2 text-sm",children:[p.jsx("div",{className:"text-muted-foreground text-xs"}),p.jsx("div",{className:"text-center font-heading font-semibold text-xs",children:e}),p.jsx("div",{className:"text-center font-heading font-semibold text-xs",children:l}),[{label:"Reliability",v1:`${Math.round(t*100)}%`,v2:`${Math.round(((h==null?void 0:h.reliability_score)??0)*100)}%`},{label:"Total Articles",v1:(n==null?void 0:n.total_articles)??0,v2:(h==null?void 0:h.total_articles)??0},{label:"Pred. Accuracy",v1:n!=null&&n.prediction_total?`${Math.round(n.prediction_confirmed/n.prediction_total*100)}%`:"N/A",v2:h!=null&&h.prediction_total?`${Math.round(((h==null?void 0:h.prediction_confirmed)??0)/h.prediction_total*100)}%`:"N/A"},{label:"Avg Importance",v1:`${Math.round(y*100)}%`,v2:`${Math.round(m*100)}%`},{label:"Confirmed",v1:(n==null?void 0:n.confirmed_count)??0,v2:(h==null?void 0:h.confirmed_count)??0}].map(b=>p.jsxs("div",{className:"contents",children:[p.jsx("div",{className:"text-xs text-muted-foreground py-2 border-t border-border",children:b.label}),p.jsx("div",{className:"text-center py-2 border-t border-border font-medium",children:b.v1}),p.jsx("div",{className:"text-center py-2 border-t border-border font-medium",children:b.v2})]},b.label))]}),w.length>0&&p.jsxs("div",{children:[p.jsx("h4",{className:"text-xs font-medium text-muted-foreground mb-2",children:"Reliability Over Time"}),p.jsx(Z2,{width:"100%",height:180,children:p.jsxs(dB,{data:w,children:[p.jsx(zS,{strokeDasharray:"3 3",stroke:"hsl(var(--border))"}),p.jsx(hf,{dataKey:"date",tick:{fontSize:10,fill:"hsl(var(--muted-foreground))"}}),p.jsx(pf,{domain:[0,1],tick:{fontSize:10,fill:"hsl(var(--muted-foreground))"}}),p.jsx(wn,{contentStyle:{backgroundColor:"hsl(var(--card))",border:"1px solid hsl(var(--border))",borderRadius:"8px",fontSize:11},formatter:(b,g)=>[`${Math.round(b*100)}%`,g==="source1"?e:l]}),p.jsx(is,{type:"monotone",dataKey:"source1",stroke:"hsl(var(--primary))",strokeWidth:2,dot:{r:2},name:"source1"}),p.jsx(is,{type:"monotone",dataKey:"source2",stroke:"hsl(var(--success))",strokeWidth:2,dot:{r:2},name:"source2"})]})}),p.jsxs("div",{className:"flex items-center gap-4 justify-center mt-2",children:[p.jsxs("div",{className:"flex items-center gap-1",children:[p.jsx("div",{className:"h-2 w-2 rounded-full bg-primary"}),p.jsx("span",{className:"text-[10px] text-muted-foreground",children:e})]}),p.jsxs("div",{className:"flex items-center gap-1",children:[p.jsx("div",{className:"h-2 w-2 rounded-full bg-success"}),p.jsx("span",{className:"text-[10px] text-muted-foreground",children:l})]})]})]})]}):p.jsxs(p.Fragment,{children:[p.jsx(ll,{placeholder:"Search sources...",value:a,onChange:b=>s(b.target.value)}),p.jsxs("div",{className:"space-y-1",children:[f.map(b=>p.jsxs("button",{className:"w-full text-left p-3 rounded-lg border border-border hover:border-primary/30 transition-colors flex items-center justify-between",onClick:()=>c(b.source_name),children:[p.jsx("span",{className:"text-sm font-medium",children:b.source_name}),p.jsx(Ja,{score:b.reliability_score})]},b.id)),f.length===0&&p.jsx("p",{className:"text-sm text-muted-foreground text-center py-4",children:"No other sources found"})]})]})})})]})})}const Sxe=EM,_xe=OM,fB=x.forwardRef(({className:e,...t},r)=>p.jsx(uv,{ref:r,className:Z("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}));fB.displayName=uv.displayName;const hB=x.forwardRef(({className:e,children:t,...r},n)=>p.jsxs(_xe,{children:[p.jsx(fB,{}),p.jsxs(dv,{ref:n,className:Z("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rou
363nded-lg",e),...r,children:[t,p.jsxs(PM,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity data-[state=open]:bg-accent data-[state=open]:text-muted-foreground hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",children:[p.jsx(Zx,{className:"h-4 w-4"}),p.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));hB.displayName=dv.displayName;const pB=({className:e,...t})=>p.jsx("div",{className:Z("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});pB.displayName="DialogHeader";const mB=({className:e,...t})=>p.jsx("div",{className:Z("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});mB.displayName="DialogFooter";const vB=x.forwardRef(({className:e,...t},r)=>p.jsx(fv,{ref:r,className:Z("text-lg font-semibold leading-none tracking-tight",e),...t}));vB.displayName=fv.displayName;const Exe=x.forwardRef(({className:e,...t},r)=>p.jsx(hv,{ref:r,className:Z("text-sm text-muted-foreground",e),...t}));Exe.displayName=hv.displayName;
363function Oxe(){const e=Vd(),[t,r]=x.useState("All"),[n,i]=x.useState(null),{data:o=[]}=We({queryKey:["predictions",t],queryFn:()=>D9(t)}),{data:a={}}=We({queryKey:["reliabilityMap"],queryFn:j1}),s=Ia({mutationFn:({articleId:h,outcome:v})=>L9(h,v),onSuccess:()=>{e.invalidateQueries({queryKey:["predictions"]}),e.invalidateQueries({queryKey:["sources"]}),Ht.success("Prediction resolved"),i(null)},onError:h=>Ht.error("Failed to resolve: "+h.message)}),l=o.length,c=o.filter(h=>h.outcome==="Confirmed").length,u=o.filter(h=>h.outcome==="Refuted").length,d=o.filter(h=>h.outcome==="Pending").length,f=new Date(Date.now()-30*24*60*60*1e3).toISOString();return p.jsxs(cs,{children:[p.jsxs("div",{className:"space-y-6",children:[p.jsxs("div",{children:[p.jsx("h1",{className:"font-heading text-2xl font-bold tracking-tight",children:"Predictions Tracker"}),p.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Track forward-looking claims and their outcomes"})]}),p.jsx("div",{className:"grid grid-cols-2 md:grid-cols-5 gap-3",children:[{label:"Total",value:l,color:"text-foreground"},{label:"Confirmed",value:l>0?`${Math.round(c/l*100)}%`:"0%",color:"text-success"},{label:"Refuted",value:l>0?`${Math.round(u/l*100)}%`:"0%",color:"text-danger"},{label:"Pending",value:l>0?`${Math.round(d/l*100)}%`:"0%",color:"text-muted-foreground"},{label:"Avg Source Score",value:o.length>0?`${Math.round(o.reduce((h,v)=>{var m;return h+(a[(m=v.news_articles)==null?void 0:m.source_name]||0)},0)/o.length*100)}%`:"N/A",color:"text-primary"}].map(h=>p.jsx(Pe,{children:p.jsxs(Te,{className:"p-4 text-center",children:[p.jsx("p",{className:"text-xs text-muted-foreground",children:h.label}),p.jsx("p",{className:`text-2xl font-heading font-bold ${h.color}`,children:h.value})]})},h.label))}),p.jsx("div",{className:"flex items-center gap-3",children:p.jsxs(Ya,{value:t,onValueChange:r,children:[p.jsx(Wo,{className:"w-40",children:p.jsx(Xa,{})}),p.jsx(Ho,{children:["All","Confirmed","Refuted","Pending"].map(h=>p.jsx(Si,{value:h,children:h},h))})]})}),p.jsx(Pe,{children:p.jsx(Te,{className:"p-0",children:p.jsxs(qr,{children:[p.jsx(Vr,{children:p.jsxs(je,{children:[p.jsx(ae,{children:"Headline"}),p.jsx(ae,{children:"Source"}),p.jsx(ae,{children:"Reliability"}),p.jsx(ae,{children:"Prediction"}),p.jsx(ae,{children:"Status"}),p.jsx(ae,{children:"Resolved"}),p.jsx(ae,{})]})}),p.jsx(Kr,{children:o.length===0?p.jsx(je,{children:p.jsx(J,{colSpan:7,className:"text-center text-muted-foreground py-8",children:"No predictions tracked"})}):o.map(h=>{var w,b,g,_;const v=h.outcome==="Pending",y=v&&((w=h.news_articles)==null?void 0:w.created_at)<f?"Unresolved":h.outcome;return p.jsxs(je,{children:[p.jsx(J,{className:"max-w-[200px] truncate text-sm",children:(b=h.news_articles)==null?void 0:b.headline}),p.jsx(J,{className:"text-sm",children:p.jsx(Mi,{name:(g=h.news_articles)==null?void 0:g.source_name})}),p.jsx(J,{children:p.jsx(Ja,{score:a[(_=h.news_articles)==null?void 0:_.source_name]||.5})}),p.jsx(J,{className:"max-w-[200px] text-xs text-muted-foreground truncate",children:h.prediction_text}),p.jsx(J,{children:p.jsx(vv,{status:y})}),p.jsx(J,{className:"text-xs text-muted-foreground",children:h.resolved_at?new Date(h.resolved_at).toLocaleDateString():"—"}),p.jsx(J,{children:v&&p.jsx(jt,{variant:"outline",size:"sm",onClick:()=>{var S;return i({articleId:h.article_id,headline:((S=h.news_articles)==null?void 0:S.headline)||""})},children:"Resolve"})})]},h.id)})})]})})})]}),p.jsx(Sxe,{open:!!n,onOpenChange:()=>i(null),children:p.jsxs(hB,{children:[p.jsx(pB,{children:p.jsx(vB,{className:"font-heading",children:"Resolve Prediction"})}),p.jsx("p",{className:"text-sm text-muted-foreground",children:n==null?void 0:n.headline}),p.jsxs(mB,{className:"gap-2",children:[p.jsx(jt,{variant:"outline",className:"border-danger text-danger hover:bg-danger/10",onClick:()=>n&&s.mutate({articleId:n.articleId,outcome:"Refuted"}),disabled:s.isPending,children:"Refuted"}),p.jsx(jt,{className:"bg-success hover:bg-success/90 text-success-foreground",onClick:()=>n&&s.mutate({articleId:n.articleId,outcome:"Confirmed"}),disabled:s.isPending,children:"Confirmed"})]})]})})]})}function Pxe(){const{data:e=[]}=We({queryKey:["allConfirmations"],queryFn:z9});return p.jsx(cs,{children:p.jsxs("div",{className:"space-y-6",children:[p.jsxs("div",{children:[p.jsx("h1",{className:"font-heading text-2xl font-bold tracking-tight",children:"Confirmation Network"}),p.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Cross-source story confirmations"})]}),e.length===0?p.jsx(Pe,{children:p.jsx(Te,{className:"p-12 text-center",children:p.jsx("p",{className:"text-muted-foreground",children:"No confirmations yet. Confirmations appear when 2+ sources cover the same event."})})}):p.jsx("div",{className:"space-y-4",children:e.map(t=>{const r=t.original,n=t.confirming,i=t.confirmation_strength,o=Math.max(1,Math.round(i*4));return p.jsxs("div",{className:"flex items-stretch gap-0",children:[p.jsx(Pe,{className:"flex-1 max-w-[45%]",children:p.jsxs(Te,{className:"p-4",children:[p.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[p.jsx(qo,{category:(r==null?void 0:r.category)||"Markets"}),p.jsx(Mi,{name:(r==null?void 0:r.source_name)||"",className:"text-[10px] text-muted-foreground"})]}),p.jsx("p",{className:"text-sm font-medium line-clamp-2",children:r==null?void 0:r.headline}),(r==null?void 0:r.published_at)&&p.jsx("p",{className:"text-[10px] text-muted-foreground mt-1",children:zo(new Date(r.published_at),{addSuffix:!0})})]})}),p.jsx("div",{className:"flex items-center justify-center w-[10%] min-w-[60px]",children:p.jsxs("div",{className:"flex flex-col items-center gap-1",children:[p.jsx("div",{className:"bg-primary rounded-full",style:{height:`${o}px`,width:"100%",minWidth:"40px"}}),p.jsxs("span",{className:"text-[9px] text-muted-foreground",children:[Math.round(i*100),"%"]})]})}),p.jsx(Pe,{className:"flex-1 max-w-[45%]",children:p.jsxs(Te,{className:"p-4",children:[p.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[p.jsx(qo,{category:(n==null?void 0:n.category)||"Markets"}),p.jsx(Mi,{name:(n==null?void 0:n.source_name)||"",className:"text-[10px] text-muted-foreground"})]}),p.jsx("p",{className:"text-sm font-medium line-clamp-2",children:n==null?void 0:n.headline}),(n==null?void 0:n.published_at)&&p.jsx("p",{className:"text-[10px] text-muted-foreground mt-1",children:zo(new Date(n.published_at),{addSuffix:!0})})]})})]},t.id)})})]})})}var ug="Collapsible",[Txe,r1e]=$r(ug),[Axe,WS]=Txe(ug),gB=x.forwardRef((e,t)=>
363{const{__scopeCollapsible:r,open:n,defaultOpen:i,disabled:o,onOpenChange:a,...s}=e,[l,c]=Ni({prop:n,defaultProp:i??!1,onChange:a,caller:ug});return p.jsx(Axe,{scope:r,disabled:o,contentId:xi(),open:l,onOpenToggle:x.useCallback(()=>c(u=>!u),[c]),children:p.jsx(se.div,{"data-state":qS(l),"data-disabled":o?"":void 0,...s,ref:t})})});gB.displayName=ug;var yB="CollapsibleTrigger",bB=x.forwardRef((e,t)=>{const{__scopeCollapsible:r,...n}=e,i=WS(yB,r);return p.jsx(se.button,{type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":qS(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled,...n,ref:t,onClick:ie(e.onClick,i.onOpenToggle)})});bB.displayName=yB;var HS="CollapsibleContent",wB=x.forwardRef((e,t)=>{const{forceMount:r,...n}=e,i=WS(HS,e.__scopeCollapsible);return p.jsx(tn,{present:r||i.open,children:({present:o})=>p.jsx(Cxe,{...n,ref:t,present:o})})});wB.displayName=HS;var Cxe=x.forwardRef((e,t)=>{const{__scopeCollapsible:r,present:n,children:i,...o}=e,a=WS(HS,r),[s,l]=x.useState(n),c=x.useRef(null),u=ye(t,c),d=x.useRef(0),f=d.current,h=x.useRef(0),v=h.current,m=a.open||s,y=x.useRef(m),w=x.useRef(void 0);return x.useEffect(()=>{const b=requestAnimationFrame(()=>y.current=!1);return()=>cancelAnimationFrame(b)},[]),Pt(()=>{const b=c.current;if(b){w.current=w.current||{transitionDuration:b.style.transitionDuration,animationName:b.style.animationName},b.style.transitionDuration="0s",b.style.animationName="none";const g=b.getBoundingClientRect();d.current=g.height,h.current=g.width,y.current||(b.style.transitionDuration=w.current.transitionDuration,b.style.animationName=w.current.animationName),l(n)}},[a.open,n]),p.jsx(se.div,{"data-state":qS(a.open),"data-disabled":a.disabled?"":void 0,id:a.contentId,hidden:!m,...o,ref:u,style:{"--radix-collapsible-content-height":f?`${f}px`:void 0,"--radix-collapsible-content-width":v?`${v}px`:void 0,...e.style},children:m&&i})});function qS(e){return e?"open":"closed"}var jxe=gB;const kxe=jxe,Nxe=bB,Rxe=wB,xB=["All","Markets","Crypto","Macro","Geopolitical","Earnings","Energy"];function $xe(){return p.jsx(cs,{children:p.jsxs("div",{className:"space-y-6",children:[p.jsxs("div",{children:[p.jsx("h1",{className:"font-heading text-2xl font-bold tracking-tight",children:"Twitter / X Intelligence"}),p.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Monitor and score X accounts for reliability"})]}),p.jsxs(DI,{defaultValue:"feed",children:[p.jsxs($1,{children:[p.jsx(So,{value:"feed",children:"Live Feed"}),p.jsx(So,{value:"accounts",children:"Account Manager"}),p.jsx(So,{value:"accuracy",children:"Prediction Accuracy"})]}),p.jsx(_o,{value:"feed",children:p.jsx(Mxe,{})}),p.jsx(_o,{value:"accounts",children:p.jsx(Ixe,{})}),p.jsx(_o,{value:"accuracy",children:p.jsx(Dxe,{})})]})]})})}function Mxe(){const[e,t]=x.useState("All"),[r,n]=x.useState(!1),{data:i=[],refetch:o}=We({queryKey:["twitterFeed",e,r],queryFn:()=>Y9({category:e==="All"?void 0:e,marketMovingOnly:r})}),{data:a={}}=We({queryKey:["reliabilityMap"],queryFn:j1});x.useEffect(()=>{const u=ve.channel("twitter-feed").on("postgres_changes",{event:"INSERT",schema:"public",table:"news_articles"},d=>{d.new.source_type==="twitter"&&o()}).subscribe();return()=>{ve.removeChannel(u)}},[o]);const s=i.filter(u=>u.importance_score>=.85),l=i.filter(u=>u.importance_score<.85),c=[...s,...l];return p.jsxs("div",{className:"space-y-4 mt-4",children:[p.jsx(Pe,{children:p.jsx(Te,{className:"p-4",children:p.jsxs("div",{className:"flex flex-wrap items-end gap-4",children:[p.jsxs("div",{children:[p.jsx(Hr,{className:"text-xs text-muted-foreground mb-1.5 block",children:"Category"}),p.jsxs(Ya,{value:e,onValueChange:t,children:[p.jsx(Wo,{className:"w-36",children:p.jsx(Xa,{})}),p.jsx(Ho,{children:xB.map(u=>p.jsx(Si,{value:u,children:u},u))})]})]}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(sv,{checked:r,onCheckedChange:n}),p.jsx(Hr,{className:"text-xs",children:"Market moving only"})]})]})})}),c.length===0?p.jsx(Pe,{children:p.jsx(Te,{className:"p-12 text-center",children:p.jsx("p",{className:"text-muted-foreground",children:"No tweets ingested yet. Add and approve X accounts first."})})}):p.jsx("div",{className:"grid gap-3",children:c.map(u=>{var h;const d=a[u.source_name]??.5,f=u.importance_score>=.85;return p.jsx(Pe,{className:Z(f&&"border-danger/50"),children:p.jsx(Te,{className:"p-4",children:p.jsxs("div",{className:"flex items-start justify-between gap-4",children:[p.jsxs("div",{className:"flex-1 min-w-0",children:[p.jsxs("div",{className:"flex items-center gap-2 mb-1 flex-wrap",children:[f&&p.jsxs(tr,{className:"bg-danger text-danger-foreground text-[10px]",children:[p.jsx(JN,{className:"h-3 w-3 mr-1"}),"Market Moving"]}),p.jsx(qo,{category:u.category}),p.jsx(Mi,{name:u.source_name,className:"text-xs text-muted-foreground"}),p.jsx(Ja,{score:d})]}),p.jsx("p",{className:"text-sm",children:u.summary||u.headline}),p.jsxs("div",{className:"flex items-center gap-4 mt-2 text-muted-foreground",children:[u.published_at&&p.jsx("span",{className:"text-[11px]",children:zo(new Date(u.published_at),{addSuffix:!0})}
363),(h=u.entities)==null?void 0:h.slice(0,3).map(v=>p.jsx(tr,{variant:"secondary",className:"text-[10px]",children:v},v))]})]}),p.jsx(gv,{score:u.importance_score})]})})},u.id)})})]})}function Ixe(){const e=Vd(),[t,r]=x.useState(""),[n,i]=x.useState("Markets"),o=x.useRef(null),[a,s]=x.useState(!1),{data:l=[],refetch:c}=We({queryKey:["xAccounts"],queryFn:()=>uI()}),{data:u=[],refetch:d}=We({queryKey:["evalQueue"],queryFn:G9});x.useEffect(()=>{const g=ve.channel("x-accounts-manager").on("postgres_changes",{event:"*",schema:"public",table:"monitored_x_accounts"},()=>c()).on("postgres_changes",{event:"*",schema:"public",table:"tweet_evaluation_queue"},()=>d()).subscribe();return()=>{ve.removeChannel(g)}},[c,d]);const f=l.filter(g=>g.reliability_status==="Approved"),h=l.filter(g=>g.reliability_status==="Rejected"||g.reliability_status==="Insufficient Data"),v=Ia({mutationFn:()=>fI(t,n),onSuccess:()=>{Ht.success(`@${t} queued for evaluation`),r(""),e.invalidateQueries({queryKey:["xAccounts"]}),e.invalidateQueries({queryKey:["evalQueue"]})},onError:g=>Ht.error("Failed: "+g.message)}),m=Ia({mutationFn:g=>Z9(g),onSuccess:()=>
363{Ht.success("Re-evaluation started"),e.invalidateQueries({queryKey:["xAccounts"]})},onError:g=>Ht.error("Failed: "+g.message)}),y=Ia({mutationFn:g=>J9(g),onSuccess:()=>{Ht.success("Account removed"),e.invalidateQueries({queryKey:["xAccounts"]})}}),w=async g=>{var P;const _=(P=g.target.files)==null?void 0:P[0];if(!_)return;const E=(await _.text()).trim().split(`
364`),O=[];for(let T=1;T<E.length;T++){const j=E[T].split(",").map(C=>C.trim());j[0]&&O.push({handle:j[0],category:j[1]||"Markets"})}if(O.length===0){Ht.error("No valid accounts found in CSV");return}Ht.success(`${O.length} accounts queued for evaluation`),X9(O).then(()=>{e.invalidateQueries({queryKey:["xAccounts"]}),e.invalidateQueries({queryKey:["evalQueue"]})}),o.current&&(o.current.value="")},b=()=>{const g=`handle,category
365DeItaone,Markets
366reutersbreaking,Markets
367WatcherGuru,Crypto
368NickTimiraos,Macro`,_=new Blob([g],{type:"text/csv"}),S=URL.createObjectURL(_),E=document.createElement("a");E.href=S,E.download="x_accounts_template.csv",E.click(),URL.revokeObjectURL(S)};return p.jsxs("div",{className:"space-y-6 mt-4",children:[p.jsxs(Pe,{children:[p.jsx(mi,{children:p.jsx(vi,{className:"font-heading text-base",children:"Add X Accounts"})}),p.jsxs(Te,{className:"space-y-4",children:[p.jsxs("div",{className:"flex flex-wrap gap-3 items-end",children:[p.jsxs("div",{className:"flex-1 min-w-[200px]",children:[p.jsx(Hr,{className:"text-xs text-muted-foreground",children:"X Handle (no @ symbol)"}),p.jsx(ll,{value:t,onChange:g=>r(g.target.value),placeholder:"DeItaone"})]}),p.jsxs("div",{children:[p.jsx(Hr,{className:"text-xs text-muted-foreground",children:"Category"}),p.jsxs(Ya,{value:n,onValueChange:i,children:[p.jsx(Wo,{className:"w-36",children:p.jsx(Xa,{})}),p.jsx(Ho,{children:xB.filter(g=>g!=="All").map(g=>p.jsx(Si,{value:g,children:g},g))})]})]}),p.jsxs(jt,{onClick:()=>v.mutate(),disabled:!t||v.isPending,children:[v.isPending?p.jsx(fp,{className:"h-4 w-4 animate-spin mr-1"}):p.jsx(_z,{className:"h-4 w-4 mr-1"}),"Add & Evaluate"]})]}),p.jsxs("div",{className:"flex gap-2",children:[p.jsxs(jt,{variant:"outline",size:"sm",onClick:()=>{var g;return(g=o.current)==null?void 0:g.click()},children:[p.jsx(jz,{className:"h-4 w-4 mr-1"}),"Upload CSV"]}),p.jsxs(jt,{variant:"outline",size:"sm",onClick:b,children:[p.jsx(yz,{className:"h-4 w-4 mr-1"}),"Download Template"]}),p.jsx("input",{ref:o,type:"file",accept:".csv",className:"hidden",onChange:w})]})]})]}),p.jsxs(Pe,{children:[p.jsx(mi,{children:p.jsx(vi,{className:"font-heading text-base",children:"Evaluation Queue"})}),p.jsx(Te,{className:"p-0",children:p.jsxs(qr,{children:[p.jsx(Vr,{children:p.jsxs(je,{children:[p.jsx(ae,{children:"Handle"}),p.jsx(ae,{children:"Status"}),p.jsx(ae,{className:"text-right",children:"Tweets"}),p.jsx(ae,{className:"text-right",children:"Predictions"}),p.jsx(ae,{className:"text-right",children:"Confirmed"}),p.jsx(ae,{children:"Result"})]})}),p.jsx(Kr,{children:u.length===0?p.jsx(je,{children:p.jsx(J,{colSpan:6,className:"text-center text-muted-foreground py-6",children:"No evaluations"})}):u.map(g=>{const _=l.find(S=>S.handle===g.handle);return p.jsxs(je,{children:[p.jsxs(J,{className:"font-medium",children:["@",g.handle]}),p.jsx(J,{children:p.jsxs(tr,{variant:"outline",className:Z("text-[10px]",g.status==="Complete"&&"border-success/50 text-success bg-success/10",g.status==="Failed"&&"border-danger/50 text-danger bg-danger/10",(g.status==="Fetching"||g.status==="Evaluating")&&"border-warning/50 text-warning bg-warning/10",g.status==="Queued"&&"border-muted-foreground/50 text-muted-foreground"),children:[(g.status==="Fetching"||g.status==="Evaluating")&&p.jsx(fp,{className:"h-3 w-3 animate-spin mr-1"}),g.status]})}),p.jsx(J,{className:"text-right",children:g.tweets_fetched}),p.jsx(J,{className:"text-right",children:g.predictions_found}),p.jsx(J,{className:"text-right",children:g.predictions_confirmed}),p.jsx(J,{children:_&&g.status==="Complete"&&p.jsxs(tr,{variant:"outline",className:Z("text-[10px]",_.reliability_status==="Approved"&&"border-success/50 text-success bg-success/10",_.reliability_status==="Rejected"&&"border-danger/50 text-danger bg-danger/10",_.reliability_status==="Insufficient Data"&&"border-muted-foreground
368/50 text-muted-foreground"),children:[_.reliability_status,_.reliability_score!==null&&` (${Math.round(_.reliability_score*100)}%)`]})})]},g.id)})})]})})]}),p.jsxs(Pe,{children:[p.jsx(mi,{children:p.jsxs(vi,{className:"font-heading text-base",children:["Approved Accounts (",f.length,")"]})}),p.jsx(Te,{className:"p-0",children:p.jsxs(qr,{children:[p.jsx(Vr,{children:p.jsxs(je,{children:[p.jsx(ae,{children:"Handle"}),p.jsx(ae,{children:"Category"}),p.jsx(ae,{children:"Reliability"}),p.jsx(ae,{className:"text-right",children:"Evaluated"}),p.jsx(ae,{className:"text-right",children:"Confirmed"}),p.jsx(ae,{children:"Last Evaluated"}),p.jsx(ae,{children:"Active"}),p.jsx(ae,{})]})}),p.jsx(Kr,{children:f.length===0?p.jsx(je,{children:p.jsx(J,{colSpan:8,className:"text-center text-muted-foreground py-6",children:"No approved accounts"})}):f.map(g=>p.jsxs(je,{children:[p.jsx(J,{className:"font-medium",children:p.jsx(Mi,{name:`@${g.handle}`})}),p.jsx(J,{children:p.jsx(qo,{category:g.category})}),p.jsx(J,{children:p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(td,{value:(g.reliability_score||0)*100,className:"h-2 w-16 [&>div]:bg-success"}),p.jsx("span",{className:"text-xs",children:g.reliability_score!==null?`${Math.round(g.reliability_score*100)}%`:"—"})]})}),p.jsx(J,{className:"text-right",children:g.tweets_evaluated}),p.jsx(J,{className:"text-right",children:g.predictions_confirmed}),p.jsx(J,{className:"text-xs text-muted-foreground",children:g.last_evaluated_at?zo(new Date(g.last_evaluated_at),{addSuffix:!0}):"—"}),p.jsx(J,{children:p.jsx(sv,{checked:g.is_active,onCheckedChange:_=>{Q9(g.handle,_).then(()=>c())}})}),p.jsx(J,{children:p.jsx(jt,{variant:"outline",size:"sm",onClick:()=>m.mutate(g.handle),disabled:m.isPending,children:p.jsx(Y0,{className:"h-3 w-3"})})})]},g.id))})]})})]}),p.jsx(kxe,{open:a,onOpenChange:s,children:p.jsxs(Pe,{children:[p.jsx(Nxe,{asChild:!0,children:p.jsx(mi,{className:"cursor-pointer hover:bg-muted/50 transition-colors",children:p.jsxs(vi,{className:"font-heading text-base flex items-center gap-2",children:[p.jsx(Jx,{className:Z("h-4 w-4 transition-transform",a&&"rotate-180")}),"Rejected / Insufficient Data (",h.length,")"]})})}),p.jsx(Rxe,{children:p.jsx(Te,{className:"p-0",children:p.jsxs(qr,{children:[p.jsx(Vr,{children:p.jsxs(je,{children:[p.jsx(ae,{children:"Handle"}),p.jsx(ae,{children:"Category"}),p.jsx(ae,{children:"Status"}),p.jsx(ae,{children:"Score"}),p.jsx(ae,{})]})}),p.jsx(Kr,{children:h.map(g=>p.jsxs(je,{children:[p.jsxs(J,{className:"font-medium",children:["@",g.handle]}),p.jsx(J,{children:p.jsx(qo,{category:g.category})}),p.jsx(J,{children:p.jsx(tr,{variant:"outline",className:Z("text-[10px]",g.reliability_status==="Rejected"&&"border-danger/50 text-danger bg-danger/10",g.reliability_status==="Insufficient Data"&&"border-muted-foreground/50 text-muted-foreground"),children:g.reliability_status})}),p.jsx(J,{children:g.reliability_score!==null?`${Math.round(g.reliability_score*100)}%`:"—"}),p.jsxs(J,{className:"flex gap-1",children:[p.jsx(jt,{variant:"outline",size:"sm",onClick:()=>m.mutate(g.handle),children:p.jsx(Y0,{className:"h-3 w-3"})}),p.jsx(jt,{variant:"outline",size:"sm",className:"text-danger",onClick:()=>y.mutate(g.handle),children:p.jsx(Az,{className:"h-3 w-3"})})]})]},g.id))})]})})})]})})]})}function Dxe(){const[e,t]=x.useState("All"),[r,n]=x.useState("All"),{data:i=[]}=We({queryKey:["historicalTweets",e,r],queryFn:()=>dI(e==="All"?void 0:e)}),{data:o=[]}=We({queryKey:["xAccounts"],queryFn:()=>uI()}),a=r==="All"?i:i.filter(v=>v.confirmation_status===r),s=i.length,l=i.filter(v=>v.confirmation_status==="Confirmed").length,c=s>0?Math.round(l/s*100):0,u=o.filter(v=>v.tweets_evaluated>0).map(v=>({handle:v.handle,rate:v.predictions_confirmed/(v.tweets_evaluated||1)})).sort((v,m)=>m.rate-v.rate),d=u[0],f=u[u.length-1],h=[...new Set(i.map(v=>v.handle))];return p.jsxs("div",{className:"space-y-4 mt-4",children:[p.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-3",children:[p.jsx(Pe,{children:p.jsxs(Te,{className:"p-3 text-center",children:[p.jsx("p",{className:"text-[10px] text-muted-foreground uppercase",children:"Total Evaluated"}),p.jsx("p",{className:"text-xl font-heading font-bold",children:s})]})}),p.jsx(Pe,{children:p.jsxs(Te,{className:"p-3 text-center",children:[p.jsx("p",{className:"text-[10px] text-muted-foreground uppercase",children:"Confirmation Rate"}),p.jsxs("p",{className:"text-xl font-heading font-bold text-success",children:[c,"%"]})]})}),p.jsx(Pe,{children:p.jsxs(Te,{className:"p-3 text-center",children:[p.jsx("p",{className:"text-[10px] text-muted-foreground uppercase",children:"Best Performer"}),p.jsxs("p",{className:"text-sm font-heading font-bold text-success",children:["@",(d==null?void 0:d.handle)||"—"]}
368)]})}),p.jsx(Pe,{children:p.jsxs(Te,{className:"p-3 text-center",children:[p.jsx("p",{className:"text-[10px] text-muted-foreground uppercase",children:"Worst Performer"}),p.jsxs("p",{className:"text-sm font-heading font-bold text-danger",children:["@",(f==null?void 0:f.handle)||"—"]})]})})]}),p.jsxs("div",{className:"flex gap-3",children:[p.jsxs(Ya,{value:e,onValueChange:t,children:[p.jsx(Wo,{className:"w-40",children:p.jsx(Xa,{placeholder:"All handles"})}),p.jsxs(Ho,{children:[p.jsx(Si,{value:"All",children:"All handles"}),h.map(v=>p.jsxs(Si,{value:v,children:["@",v]},v))]})]}),p.jsxs(Ya,{value:r,onValueChange:n,children:[p.jsx(Wo,{className:"w-40",children:p.jsx(Xa,{})}),p.jsx(Ho,{children:["All","Confirmed","Refuted","Pending","Unresolvable"].map(v=>p.jsx(Si,{value:v,children:v},v))})]})]}),p.jsx(Pe,{children:p.jsx(Te,{className:"p-0",children:p.jsxs(qr,{children:[p.jsx(Vr,{children:p.jsxs(je,{children:[p.jsx(ae,{children:"Handle"}),p.jsx(ae,{children:"Tweet"}),p.jsx(ae,{children:"Tweeted"}),p.jsx(ae,{children:"Prediction"}),p.jsx(ae,{children:"Status"}),p.jsx(ae,{children:"Confirmed At"}),p.jsx(ae,{children:"Confirming Source"})]})}),p.jsx(Kr,{children:a.length===0?p.jsx(je,{children:p.jsx(J,{colSpan:7,className:"text-center text-muted-foreground py-8",children:"No predictions found"})}):a.map(v=>p.jsxs(je,{children:[p.jsxs(J,{className:"font-medium text-xs",children:["@",v.handle]}),p.jsx(J,{className:"max-w-[180px] text-xs truncate",children:v.tweet_text}),p.jsx(J,{className:"text-xs text-muted-foreground",children:v.tweeted_at?cr(new Date(v.tweeted_at),"MMM d, yyyy"):"—"}),p.jsx(J,{className:"max-w-[150px] text-xs text-muted-foreground truncate",children:v.prediction_text||"—"}),p.jsx(J,{children:p.jsx(vv,{status:v.confirmation_status})}),p.jsx(J,{className:"text-xs text-muted-foreground",children:v.confirmed_at?cr(new Date(v.confirmed_at),"MMM d"):"—"}),p.jsx(J,{className:"text-xs",children:v.confirming_source||"—"})]},v.id))})]})})})]})}function Lxe(){const e=Vd(),{data:t=[]}=We({queryKey:["settings"],queryFn:F9}),{data:r=[]}=We({queryKey:["automationLogs"],queryFn:()=>B9(50)}),[n,i]=x.useState(""),[o,a]=x.useState("0"),[s,l]=x.useState("0.5");x.useEffect(()=>{t.forEach(f=>{f.key==="make_webhook_url"&&i(f.value),f.key==="importance_threshold"&&a(f.value),f.key==="min_reliability_alert"&&l(f.value)})},[t]);const c=Ia({mutationFn:async()=>{await ay("make_webhook_url",n),await ay("importance_threshold",o),await ay("min_reliability_alert",s)},onSuccess:()=>{e.invalidateQueries({queryKey:["settings"]}),Ht.success("Settings saved")},onError:()=>Ht.error("Failed to save settings")}),u=Ia({mutationFn:U9,onSuccess:()=>{e.invalidateQueries({queryKey:["automationLogs"]}),Ht.success("Manual fetch triggered")},onError:f=>Ht.error("Fetch failed: "+f.message)}),d=Ia({mutationFn:e7,onSuccess:f=>{const h=(f==null?void 0:f.results)||[],v=h.filter(m=>m.deactivated);v.length>0?Ht.warning(`${v.length} account(s) deactivated due to low reliability`):Ht.success(`Re-evaluation complete for ${h.length} accounts`),e.invalidateQueries({queryKey:["xAccounts"]})},onError:f=>Ht.error("Failed: "+f.message)});return p.jsx(cs,{children:p.jsxs("div",{className:"space-y-6",children:[p.jsxs("div",{children:[p.jsx("h1",{className:"font-heading text-2xl font-bold tracking-tight",children:"Admin Panel"}),p.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Configuration and automation controls"})]}),p.jsxs("div",{className:"grid gap-6 lg:grid-cols-2",children:[p.jsxs(Pe,{children:[p.jsx(mi,{children:p.jsx(vi,{className:"font-heading text-base",children:"Manual Fetch"})}),p.jsxs(Te,{className:"space-y-3",children:[p.jsxs(jt,{onClick:()=>u.mutate(),disabled:u.isPending,className:"w-full",children:[u.isPending?p.jsx(fp,{className:"h-4 w-4 animate-spin mr-2"}):p.jsx(Sz,{className:"h-4 w-4 mr-2"}),"Trigger News Fetch"]}),p.jsxs(jt,{variant:"outline",onClick:()=>d.mutate(),disabled:d.isPending,className:"w-full",children:[d.isPending?p.jsx(fp,{className:"h-4 w-4 animate-spin mr-2"}):p.jsx(Y0,{className:"h-4 w-4 mr-2"}),"Re-evaluate All X Accounts"]})]})]}),p.jsxs(Pe,{children:[p.jsx(mi,{children:p.jsx(vi,{className:"font-heading text-base",children:"Settings"})}),p.jsxs(Te,{className:"space-y-4",children:[p.jsxs("div",{children:[p.jsx(Hr,{className:"text-xs text-muted-foreground",children:"Make Webhook URL"}),p.jsx(ll,{value:n,onChange:f=>i(f.target.value),placeholder:"https://hook.make.com/..."})]}),p.jsxs("div",{children:[p.jsx(Hr,{className:"text-xs text-muted-foreground",children:"Importance Score Threshold (hide below)"}),p.jsx(ll,{type:"number",min:"0",max:"1",step:"0.05",value:o,onChange:f=>a(f.target.value)})]}),p.jsxs("div",{children:[p.jsx(Hr,{className:"text-xs text-muted-foreground",children:"Min Reliability for Alerts"}),p.jsx(ll,{type:"number",min:"0",max:"1",step:"0.05",value:s,onChange:f=>l(f.target.value)})]}),p.jsxs(jt,{onClick:()=>c.mutate(),disabled:c.isPending,className:"w-full",children:[p.jsx(Ez,{className:"h-4 w-4 mr-2"}),"Save Settings"]})]})]})]}),p.jsxs(Pe,{children:[p.jsx(mi,{children:p.jsx(vi,{className:"font-heading text-base",children:"Automation Logs"})}),p.jsx(Te,{className:"p-0",children:p.jsxs(qr,{children:[p.jsx(Vr,{children:p.jsxs(je,{children:[p.jsx(ae,{children:"Timestamp"}),p.jsx(ae,{className:"text-right",children:"Fetched"}),p.jsx(ae,{className:"text-right",children:"Saved"}),p.jsx(ae,{children:"Status"}),p.jsx(ae,{children:"Errors"})]})}),p.jsx(Kr,{children:r.length===0?p.jsx(je,{children:p.jsx(J,{colSpan:5,className:"text-center text-muted-foreground py-8",children:"No automation runs yet"})}):r.map(f=>p.jsxs(je,{children:[p.jsx(J,{className:"text-xs",children:f.run_at?zo(new Date(f.run_at),{addSuffix:!0}):"—"}),p.jsx(J,{className:"text-right",children:f.articles_fetched}
368),p.jsx(J,{className:"text-right",children:f.articles_saved}),p.jsx(J,{children:p.jsx(tr,{variant:"outline",className:f.status==="Success"?"border-success/50 text-success bg-success/10":f.status==="Partial"?"border-warning/50 text-warning bg-warning/10":"border-danger/50 text-danger bg-danger/10",children:f.status})}),p.jsx(J,{className:"text-xs text-muted-foreground max-w-[200px] truncate",children:f.errors||"—"})]},f.id))})]})})]})]})})}const Bxe=()=>{const e=ls();return x.useEffect(()=>{console.error("404 Error: User attempted to access non-existent route:",e.pathname)},[e.pathname]),p.jsx("div",{className:"flex min-h-screen items-center justify-center bg-muted",children:p.jsxs("div",{className:"text-center",children:[p.jsx("h1",{className:"mb-4 text-4xl font-bold",children:"404"}),p.jsx("p",{className:"mb-4 text-xl text-muted-foreground",children:"Oops! Page not found"}),p.jsx("a",{href:"/",className:"text-primary underline hover:text-primary/90",children:"Return to Home"})]})})},Fxe=new v3,Uxe=()=>p.jsx(x3,{client:Fxe,children:p.jsxs(QH,{children:[p.jsx(fW,{}),p.jsx(p5,{}),p.jsx(j4,{children:p.jsxs(S4,{children:[p.jsx(ai,{path:"/",element:p.jsx(r7,{})}),p.jsx(ai,{path:"/sources",element:p.jsx(h7,{})}),p.jsx(ai,{path:"/source/:source_name",element:p.jsx(bxe,{})}),p.jsx(ai,{path:"/predictions",element:p.jsx(Oxe,{})}),p.jsx(ai,{path:"/confirmations",element:p.jsx(Pxe,{})}),p.jsx(ai,{path:"/twitter",element:p.jsx($xe,{})}),p.jsx(ai,{path:"/admin",element:p.jsx(Lxe,{})}),p.jsx(ai,{path:"*",element:p.jsx(Bxe,{})})]})})]})});Qk(document.getElementById("root")).render(p.jsx(Uxe,{}));

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.