heyio 3.1.0 → 3.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/middleware/auth.d.ts.map +1 -1
- package/dist/api/middleware/auth.js +1 -0
- package/dist/api/middleware/auth.js.map +1 -1
- package/dist/api/routes/config.js +4 -4
- package/dist/api/routes/config.js.map +1 -1
- package/dist/api/routes/conversations.d.ts.map +1 -1
- package/dist/api/routes/conversations.js +7 -51
- package/dist/api/routes/conversations.js.map +1 -1
- package/dist/api/routes/health.d.ts.map +1 -1
- package/dist/api/routes/health.js +23 -0
- package/dist/api/routes/health.js.map +1 -1
- package/dist/api/routes/skills.d.ts.map +1 -1
- package/dist/api/routes/skills.js +49 -7
- package/dist/api/routes/skills.js.map +1 -1
- package/dist/api/routes/squads.d.ts.map +1 -1
- package/dist/api/routes/squads.js +26 -19
- package/dist/api/routes/squads.js.map +1 -1
- package/dist/api/routes/wiki.js +20 -7
- package/dist/api/routes/wiki.js.map +1 -1
- package/dist/copilot/orchestrator.d.ts.map +1 -1
- package/dist/copilot/orchestrator.js +31 -15
- package/dist/copilot/orchestrator.js.map +1 -1
- package/dist/copilot/tools.d.ts +18 -0
- package/dist/copilot/tools.d.ts.map +1 -1
- package/dist/copilot/tools.js +135 -3
- package/dist/copilot/tools.js.map +1 -1
- package/dist/skills/discover.d.ts +22 -0
- package/dist/skills/discover.d.ts.map +1 -0
- package/dist/skills/discover.js +194 -0
- package/dist/skills/discover.js.map +1 -0
- package/dist/skills/index.d.ts +3 -1
- package/dist/skills/index.d.ts.map +1 -1
- package/dist/skills/index.js +2 -1
- package/dist/skills/index.js.map +1 -1
- package/dist/skills/store.d.ts +4 -0
- package/dist/skills/store.d.ts.map +1 -1
- package/dist/skills/store.js +6 -0
- package/dist/skills/store.js.map +1 -1
- package/dist/squad/agent.d.ts.map +1 -1
- package/dist/squad/agent.js +13 -0
- package/dist/squad/agent.js.map +1 -1
- package/dist/squad/execution/meeting.js +6 -6
- package/dist/squad/execution/meeting.js.map +1 -1
- package/dist/squad/execution/tasks.js +3 -3
- package/dist/squad/execution/tasks.js.map +1 -1
- package/dist/squad/manager.js +1 -1
- package/dist/squad/manager.js.map +1 -1
- package/dist/store/conversations.d.ts +25 -0
- package/dist/store/conversations.d.ts.map +1 -0
- package/dist/store/conversations.js +76 -0
- package/dist/store/conversations.js.map +1 -0
- package/dist/store/db.d.ts.map +1 -1
- package/dist/store/db.js +25 -1
- package/dist/store/db.js.map +1 -1
- package/dist/store/inbox.d.ts +3 -3
- package/dist/store/inbox.d.ts.map +1 -1
- package/dist/store/inbox.js +2 -2
- package/dist/store/inbox.js.map +1 -1
- package/dist/wiki/index.d.ts +2 -2
- package/dist/wiki/index.d.ts.map +1 -1
- package/dist/wiki/index.js +1 -1
- package/dist/wiki/index.js.map +1 -1
- package/dist/wiki/store.d.ts +10 -2
- package/dist/wiki/store.d.ts.map +1 -1
- package/dist/wiki/store.js +41 -11
- package/dist/wiki/store.js.map +1 -1
- package/node_modules/@io/shared/dist/types/events.d.ts +1 -1
- package/node_modules/@io/shared/dist/types/events.d.ts.map +1 -1
- package/node_modules/@io/shared/package.json +1 -1
- package/node_modules/@io/shared/src/types/events.ts +1 -1
- package/node_modules/@io/shared/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/public/assets/index-D1hU_jFl.js +491 -0
- package/public/assets/index-D1hU_jFl.js.map +1 -0
- package/public/assets/index-DjqmmXrU.css +1 -0
- package/public/index.html +8 -2
- package/public/assets/index-5vJhtAQU.css +0 -1
- package/public/assets/index-nNmZHtrp.js +0 -441
- package/public/assets/index-nNmZHtrp.js.map +0 -1
|
@@ -1,441 +0,0 @@
|
|
|
1
|
-
var $3=Object.defineProperty;var I3=(t,e,r)=>e in t?$3(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var Qe=(t,e,r)=>I3(t,typeof e!="symbol"?e+"":e,r);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const s of a.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&n(s)}).observe(document,{childList:!0,subtree:!0});function r(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function n(i){if(i.ep)return;i.ep=!0;const a=r(i);fetch(i.href,a)}})();var hf=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Je(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var qm={exports:{}},Pl={},Um={exports:{}},Be={};/**
|
|
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 VS;function M3(){if(VS)return Be;VS=1;var t=Symbol.for("react.element"),e=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),s=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),h=Symbol.iterator;function g(L){return L===null||typeof L!="object"?null:(L=h&&L[h]||L["@@iterator"],typeof L=="function"?L:null)}var v={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},y=Object.assign,x={};function b(L,W,te){this.props=L,this.context=W,this.refs=x,this.updater=te||v}b.prototype.isReactComponent={},b.prototype.setState=function(L,W){if(typeof L!="object"&&typeof L!="function"&&L!=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,L,W,"setState")},b.prototype.forceUpdate=function(L){this.updater.enqueueForceUpdate(this,L,"forceUpdate")};function S(){}S.prototype=b.prototype;function O(L,W,te){this.props=L,this.context=W,this.refs=x,this.updater=te||v}var k=O.prototype=new S;k.constructor=O,y(k,b.prototype),k.isPureReactComponent=!0;var T=Array.isArray,E=Object.prototype.hasOwnProperty,A={current:null},j={key:!0,ref:!0,__self:!0,__source:!0};function R(L,W,te){var ue,le={},de=null,Re=null;if(W!=null)for(ue in W.ref!==void 0&&(Re=W.ref),W.key!==void 0&&(de=""+W.key),W)E.call(W,ue)&&!j.hasOwnProperty(ue)&&(le[ue]=W[ue]);var pe=arguments.length-2;if(pe===1)le.children=te;else if(1<pe){for(var ne=Array(pe),_e=0;_e<pe;_e++)ne[_e]=arguments[_e+2];le.children=ne}if(L&&L.defaultProps)for(ue in pe=L.defaultProps,pe)le[ue]===void 0&&(le[ue]=pe[ue]);return{$$typeof:t,type:L,key:de,ref:Re,props:le,_owner:A.current}}function M(L,W){return{$$typeof:t,type:L.type,key:W,ref:L.ref,props:L.props,_owner:L._owner}}function H(L){return typeof L=="object"&&L!==null&&L.$$typeof===t}function U(L){var W={"=":"=0",":":"=2"};return"$"+L.replace(/[=:]/g,function(te){return W[te]})}var B=/\/+/g;function F(L,W){return typeof L=="object"&&L!==null&&L.key!=null?U(""+L.key):W.toString(36)}function J(L,W,te,ue,le){var de=typeof L;(de==="undefined"||de==="boolean")&&(L=null);var Re=!1;if(L===null)Re=!0;else switch(de){case"string":case"number":Re=!0;break;case"object":switch(L.$$typeof){case t:case e:Re=!0}}if(Re)return Re=L,le=le(Re),L=ue===""?"."+F(Re,0):ue,T(le)?(te="",L!=null&&(te=L.replace(B,"$&/")+"/"),J(le,W,te,"",function(_e){return _e})):le!=null&&(H(le)&&(le=M(le,te+(!le.key||Re&&Re.key===le.key?"":(""+le.key).replace(B,"$&/")+"/")+L)),W.push(le)),1;if(Re=0,ue=ue===""?".":ue+":",T(L))for(var pe=0;pe<L.length;pe++){de=L[pe];var ne=ue+F(de,pe);Re+=J(de,W,te,ne,le)}else if(ne=g(L),typeof ne=="function")for(L=ne.call(L),pe=0;!(de=L.next()).done;)de=de.value,ne=ue+F(de,pe++),Re+=J(de,W,te,ne,le);else if(de==="object")throw W=String(L),Error("Objects are not valid as a React child (found: "+(W==="[object Object]"?"object with keys {"+Object.keys(L).join(", ")+"}":W)+"). If you meant to render a collection of children, use an array instead.");return Re}function V(L,W,te){if(L==null)return L;var ue=[],le=0;return J(L,ue,"","",function(de){return W.call(te,de,le++)}),ue}function K(L){if(L._status===-1){var W=L._result;W=W(),W.then(function(te){(L._status===0||L._status===-1)&&(L._status=1,L._result=te)},function(te){(L._status===0||L._status===-1)&&(L._status=2,L._result=te)}),L._status===-1&&(L._status=0,L._result=W)}if(L._status===1)return L._result.default;throw L._result}var Z={current:null},G={transition:null},ee={ReactCurrentDispatcher:Z,ReactCurrentBatchConfig:G,ReactCurrentOwner:A};function z(){throw Error("act(...) is not supported in production builds of React.")}return Be.Children={map:V,forEach:function(L,W,te){V(L,function(){W.apply(this,arguments)},te)},count:function(L){var W=0;return V(L,function(){W++}),W},toArray:function(L){return V(L,function(W){return W})||[]},only:function(L){if(!H(L))throw Error("React.Children.only expected to receive a single React element child.");return L}},Be.Component=b,Be.Fragment=r,Be.Profiler=i,Be.PureComponent=O,Be.StrictMode=n,Be.Suspense=c,Be.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ee,Be.act=z,Be.cloneElement=function(L,W,te){if(L==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+L+".");var ue=y({},L.props),le=L.key,de=L.ref,Re=L._owner;if(W!=null){if(W.ref!==void 0&&(de=W.ref,Re=A.current),W.key!==void 0&&(le=""+W.key),L.type&&L.type.defaultProps)var pe=L.type.defaultProps;for(ne in W)E.call(W,ne)&&!j.hasOwnProperty(ne)&&(ue[ne]=W[ne]===void 0&&pe!==void 0?pe[ne]:W[ne])}var ne=arguments.length-2;if(ne===1)ue.children=te;else if(1<ne){pe=Array(ne);for(var _e=0;_e<ne;_e++)pe[_e]=arguments[_e+2];ue.children=pe}return{$$typeof:t,type:L.type,key:le,ref:de,props:ue,_owner:Re}},Be.createContext=function(L){return L={$$typeof:s,_currentValue:L,_currentValue2:L,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},L.Provider={$$typeof:a,_context:L},L.Consumer=L},Be.createElement=R,Be.createFactory=function(L){var W=R.bind(null,L);return W.type=L,W},Be.createRef=function(){return{current:null}},Be.forwardRef=function(L){return{$$typeof:u,render:L}},Be.isValidElement=H,Be.lazy=function(L){return{$$typeof:p,_payload:{_status:-1,_result:L},_init:K}},Be.memo=function(L,W){return{$$typeof:f,type:L,compare:W===void 0?null:W}},Be.startTransition=function(L){var W=G.transition;G.transition={};try{L()}finally{G.transition=W}},Be.unstable_act=z,Be.useCallback=function(L,W){return Z.current.useCallback(L,W)},Be.useContext=function(L){return Z.current.useContext(L)},Be.useDebugValue=function(){},Be.useDeferredValue=function(L){return Z.current.useDeferredValue(L)},Be.useEffect=function(L,W){return Z.current.useEffect(L,W)},Be.useId=function(){return Z.current.useId()},Be.useImperativeHandle=function(L,W,te){return Z.current.useImperativeHandle(L,W,te)},Be.useInsertionEffect=function(L,W){return Z.current.useInsertionEffect(L,W)},Be.useLayoutEffect=function(L,W){return Z.current.useLayoutEffect(L,W)},Be.useMemo=function(L,W){return Z.current.useMemo(L,W)},Be.useReducer=function(L,W,te){return Z.current.useReducer(L,W,te)},Be.useRef=function(L){return Z.current.useRef(L)},Be.useState=function(L){return Z.current.useState(L)},Be.useSyncExternalStore=function(L,W,te){return Z.current.useSyncExternalStore(L,W,te)},Be.useTransition=function(){return Z.current.useTransition()},Be.version="18.3.1",Be}var KS;function Vw(){return KS||(KS=1,Um.exports=M3()),Um.exports}/**
|
|
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 GS;function L3(){if(GS)return Pl;GS=1;var t=Vw(),e=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,i=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function s(u,c,f){var p,h={},g=null,v=null;f!==void 0&&(g=""+f),c.key!==void 0&&(g=""+c.key),c.ref!==void 0&&(v=c.ref);for(p in c)n.call(c,p)&&!a.hasOwnProperty(p)&&(h[p]=c[p]);if(u&&u.defaultProps)for(p in c=u.defaultProps,c)h[p]===void 0&&(h[p]=c[p]);return{$$typeof:e,type:u,key:g,ref:v,props:h,_owner:i.current}}return Pl.Fragment=r,Pl.jsx=s,Pl.jsxs=s,Pl}var XS;function D3(){return XS||(XS=1,qm.exports=L3()),qm.exports}var P=D3(),N=Vw();const $=Je(N);var pf={},Fm={exports:{}},wr={},Wm={exports:{}},Hm={};/**
|
|
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
|
-
*/var YS;function B3(){return YS||(YS=1,(function(t){function e(G,ee){var z=G.length;G.push(ee);e:for(;0<z;){var L=z-1>>>1,W=G[L];if(0<i(W,ee))G[L]=ee,G[z]=W,z=L;else break e}}function r(G){return G.length===0?null:G[0]}function n(G){if(G.length===0)return null;var ee=G[0],z=G.pop();if(z!==ee){G[0]=z;e:for(var L=0,W=G.length,te=W>>>1;L<te;){var ue=2*(L+1)-1,le=G[ue],de=ue+1,Re=G[de];if(0>i(le,z))de<W&&0>i(Re,le)?(G[L]=Re,G[de]=z,L=de):(G[L]=le,G[ue]=z,L=ue);else if(de<W&&0>i(Re,z))G[L]=Re,G[de]=z,L=de;else break e}}return ee}function i(G,ee){var z=G.sortIndex-ee.sortIndex;return z!==0?z:G.id-ee.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;t.unstable_now=function(){return a.now()}}else{var s=Date,u=s.now();t.unstable_now=function(){return s.now()-u}}var c=[],f=[],p=1,h=null,g=3,v=!1,y=!1,x=!1,b=typeof setTimeout=="function"?setTimeout:null,S=typeof clearTimeout=="function"?clearTimeout:null,O=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function k(G){for(var ee=r(f);ee!==null;){if(ee.callback===null)n(f);else if(ee.startTime<=G)n(f),ee.sortIndex=ee.expirationTime,e(c,ee);else break;ee=r(f)}}function T(G){if(x=!1,k(G),!y)if(r(c)!==null)y=!0,K(E);else{var ee=r(f);ee!==null&&Z(T,ee.startTime-G)}}function E(G,ee){y=!1,x&&(x=!1,S(R),R=-1),v=!0;var z=g;try{for(k(ee),h=r(c);h!==null&&(!(h.expirationTime>ee)||G&&!U());){var L=h.callback;if(typeof L=="function"){h.callback=null,g=h.priorityLevel;var W=L(h.expirationTime<=ee);ee=t.unstable_now(),typeof W=="function"?h.callback=W:h===r(c)&&n(c),k(ee)}else n(c);h=r(c)}if(h!==null)var te=!0;else{var ue=r(f);ue!==null&&Z(T,ue.startTime-ee),te=!1}return te}finally{h=null,g=z,v=!1}}var A=!1,j=null,R=-1,M=5,H=-1;function U(){return!(t.unstable_now()-H<M)}function B(){if(j!==null){var G=t.unstable_now();H=G;var ee=!0;try{ee=j(!0,G)}finally{ee?F():(A=!1,j=null)}}else A=!1}var F;if(typeof O=="function")F=function(){O(B)};else if(typeof MessageChannel<"u"){var J=new MessageChannel,V=J.port2;J.port1.onmessage=B,F=function(){V.postMessage(null)}}else F=function(){b(B,0)};function K(G){j=G,A||(A=!0,F())}function Z(G,ee){R=b(function(){G(t.unstable_now())},ee)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(G){G.callback=null},t.unstable_continueExecution=function(){y||v||(y=!0,K(E))},t.unstable_forceFrameRate=function(G){0>G||125<G?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):M=0<G?Math.floor(1e3/G):5},t.unstable_getCurrentPriorityLevel=function(){return g},t.unstable_getFirstCallbackNode=function(){return r(c)},t.unstable_next=function(G){switch(g){case 1:case 2:case 3:var ee=3;break;default:ee=g}var z=g;g=ee;try{return G()}finally{g=z}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(G,ee){switch(G){case 1:case 2:case 3:case 4:case 5:break;default:G=3}var z=g;g=G;try{return ee()}finally{g=z}},t.unstable_scheduleCallback=function(G,ee,z){var L=t.unstable_now();switch(typeof z=="object"&&z!==null?(z=z.delay,z=typeof z=="number"&&0<z?L+z:L):z=L,G){case 1:var W=-1;break;case 2:W=250;break;case 5:W=1073741823;break;case 4:W=1e4;break;default:W=5e3}return W=z+W,G={id:p++,callback:ee,priorityLevel:G,startTime:z,expirationTime:W,sortIndex:-1},z>L?(G.sortIndex=z,e(f,G),r(c)===null&&G===r(f)&&(x?(S(R),R=-1):x=!0,Z(T,z-L))):(G.sortIndex=W,e(c,G),y||v||(y=!0,K(E))),G},t.unstable_shouldYield=U,t.unstable_wrapCallback=function(G){var ee=g;return function(){var z=g;g=ee;try{return G.apply(this,arguments)}finally{g=z}}}})(Hm)),Hm}var JS;function z3(){return JS||(JS=1,Wm.exports=B3()),Wm.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 QS;function q3(){if(QS)return wr;QS=1;var t=Vw(),e=z3();function r(o){for(var l="https://reactjs.org/docs/error-decoder.html?invariant="+o,d=1;d<arguments.length;d++)l+="&args[]="+encodeURIComponent(arguments[d]);return"Minified React error #"+o+"; visit "+l+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var n=new Set,i={};function a(o,l){s(o,l),s(o+"Capture",l)}function s(o,l){for(i[o]=l,o=0;o<l.length;o++)n.add(l[o])}var u=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),c=Object.prototype.hasOwnProperty,f=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,p={},h={};function g(o){return c.call(h,o)?!0:c.call(p,o)?!1:f.test(o)?h[o]=!0:(p[o]=!0,!1)}function v(o,l,d,m){if(d!==null&&d.type===0)return!1;switch(typeof l){case"function":case"symbol":return!0;case"boolean":return m?!1:d!==null?!d.acceptsBooleans:(o=o.toLowerCase().slice(0,5),o!=="data-"&&o!=="aria-");default:return!1}}function y(o,l,d,m){if(l===null||typeof l>"u"||v(o,l,d,m))return!0;if(m)return!1;if(d!==null)switch(d.type){case 3:return!l;case 4:return l===!1;case 5:return isNaN(l);case 6:return isNaN(l)||1>l}return!1}function x(o,l,d,m,w,_,C){this.acceptsBooleans=l===2||l===3||l===4,this.attributeName=m,this.attributeNamespace=w,this.mustUseProperty=d,this.propertyName=o,this.type=l,this.sanitizeURL=_,this.removeEmptyString=C}var b={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(o){b[o]=new x(o,0,!1,o,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(o){var l=o[0];b[l]=new x(l,1,!1,o[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(o){b[o]=new x(o,2,!1,o.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(o){b[o]=new x(o,2,!1,o,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(o){b[o]=new x(o,3,!1,o.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(o){b[o]=new x(o,3,!0,o,null,!1,!1)}),["capture","download"].forEach(function(o){b[o]=new x(o,4,!1,o,null,!1,!1)}),["cols","rows","size","span"].forEach(function(o){b[o]=new x(o,6,!1,o,null,!1,!1)}),["rowSpan","start"].forEach(function(o){b[o]=new x(o,5,!1,o.toLowerCase(),null,!1,!1)});var S=/[\-:]([a-z])/g;function O(o){return o[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(o){var l=o.replace(S,O);b[l]=new x(l,1,!1,o,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(o){var l=o.replace(S,O);b[l]=new x(l,1,!1,o,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(o){var l=o.replace(S,O);b[l]=new x(l,1,!1,o,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(o){b[o]=new x(o,1,!1,o.toLowerCase(),null,!1,!1)}),b.xlinkHref=new x("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(o){b[o]=new x(o,1,!1,o.toLowerCase(),null,!0,!0)});function k(o,l,d,m){var w=b.hasOwnProperty(l)?b[l]:null;(w!==null?w.type!==0:m||!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(y(l,d,w,m)&&(d=null),m||w===null?g(l)&&(d===null?o.removeAttribute(l):o.setAttribute(l,""+d)):w.mustUseProperty?o[w.propertyName]=d===null?w.type===3?!1:"":d:(l=w.attributeName,m=w.attributeNamespace,d===null?o.removeAttribute(l):(w=w.type,d=w===3||w===4&&d===!0?"":""+d,m?o.setAttributeNS(m,l,d):o.setAttribute(l,d))))}var T=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,E=Symbol.for("react.element"),A=Symbol.for("react.portal"),j=Symbol.for("react.fragment"),R=Symbol.for("react.strict_mode"),M=Symbol.for("react.profiler"),H=Symbol.for("react.provider"),U=Symbol.for("react.context"),B=Symbol.for("react.forward_ref"),F=Symbol.for("react.suspense"),J=Symbol.for("react.suspense_list"),V=Symbol.for("react.memo"),K=Symbol.for("react.lazy"),Z=Symbol.for("react.offscreen"),G=Symbol.iterator;function ee(o){return o===null||typeof o!="object"?null:(o=G&&o[G]||o["@@iterator"],typeof o=="function"?o:null)}var z=Object.assign,L;function W(o){if(L===void 0)try{throw Error()}catch(d){var l=d.stack.trim().match(/\n( *(at )?)/);L=l&&l[1]||""}return`
|
|
34
|
-
`+L+o}var te=!1;function ue(o,l){if(!o||te)return"";te=!0;var d=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(l)if(l=function(){throw Error()},Object.defineProperty(l.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(l,[])}catch(Q){var m=Q}Reflect.construct(o,[],l)}else{try{l.call()}catch(Q){m=Q}o.call(l.prototype)}else{try{throw Error()}catch(Q){m=Q}o()}}catch(Q){if(Q&&m&&typeof Q.stack=="string"){for(var w=Q.stack.split(`
|
|
35
|
-
`),_=m.stack.split(`
|
|
36
|
-
`),C=w.length-1,I=_.length-1;1<=C&&0<=I&&w[C]!==_[I];)I--;for(;1<=C&&0<=I;C--,I--)if(w[C]!==_[I]){if(C!==1||I!==1)do if(C--,I--,0>I||w[C]!==_[I]){var D=`
|
|
37
|
-
`+w[C].replace(" at new "," at ");return o.displayName&&D.includes("<anonymous>")&&(D=D.replace("<anonymous>",o.displayName)),D}while(1<=C&&0<=I);break}}}finally{te=!1,Error.prepareStackTrace=d}return(o=o?o.displayName||o.name:"")?W(o):""}function le(o){switch(o.tag){case 5:return W(o.type);case 16:return W("Lazy");case 13:return W("Suspense");case 19:return W("SuspenseList");case 0:case 2:case 15:return o=ue(o.type,!1),o;case 11:return o=ue(o.type.render,!1),o;case 1:return o=ue(o.type,!0),o;default:return""}}function de(o){if(o==null)return null;if(typeof o=="function")return o.displayName||o.name||null;if(typeof o=="string")return o;switch(o){case j:return"Fragment";case A:return"Portal";case M:return"Profiler";case R:return"StrictMode";case F:return"Suspense";case J:return"SuspenseList"}if(typeof o=="object")switch(o.$$typeof){case U:return(o.displayName||"Context")+".Consumer";case H:return(o._context.displayName||"Context")+".Provider";case B:var l=o.render;return o=o.displayName,o||(o=l.displayName||l.name||"",o=o!==""?"ForwardRef("+o+")":"ForwardRef"),o;case V:return l=o.displayName||null,l!==null?l:de(o.type)||"Memo";case K:l=o._payload,o=o._init;try{return de(o(l))}catch{}}return null}function Re(o){var l=o.type;switch(o.tag){case 24:return"Cache";case 9:return(l.displayName||"Context")+".Consumer";case 10:return(l._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return o=l.render,o=o.displayName||o.name||"",l.displayName||(o!==""?"ForwardRef("+o+")":"ForwardRef");case 7:return"Fragment";case 5:return l;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return de(l);case 8:return l===R?"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 l=="function")return l.displayName||l.name||null;if(typeof l=="string")return l}return null}function pe(o){switch(typeof o){case"boolean":case"number":case"string":case"undefined":return o;case"object":return o;default:return""}}function ne(o){var l=o.type;return(o=o.nodeName)&&o.toLowerCase()==="input"&&(l==="checkbox"||l==="radio")}function _e(o){var l=ne(o)?"checked":"value",d=Object.getOwnPropertyDescriptor(o.constructor.prototype,l),m=""+o[l];if(!o.hasOwnProperty(l)&&typeof d<"u"&&typeof d.get=="function"&&typeof d.set=="function"){var w=d.get,_=d.set;return Object.defineProperty(o,l,{configurable:!0,get:function(){return w.call(this)},set:function(C){m=""+C,_.call(this,C)}}),Object.defineProperty(o,l,{enumerable:d.enumerable}),{getValue:function(){return m},setValue:function(C){m=""+C},stopTracking:function(){o._valueTracker=null,delete o[l]}}}}function Oe(o){o._valueTracker||(o._valueTracker=_e(o))}function ie(o){if(!o)return!1;var l=o._valueTracker;if(!l)return!0;var d=l.getValue(),m="";return o&&(m=ne(o)?o.checked?"true":"false":o.value),o=m,o!==d?(l.setValue(o),!0):!1}function Fe(o){if(o=o||(typeof document<"u"?document:void 0),typeof o>"u")return null;try{return o.activeElement||o.body}catch{return o.body}}function Ne(o,l){var d=l.checked;return z({},l,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:d??o._wrapperState.initialChecked})}function ft(o,l){var d=l.defaultValue==null?"":l.defaultValue,m=l.checked!=null?l.checked:l.defaultChecked;d=pe(l.value!=null?l.value:d),o._wrapperState={initialChecked:m,initialValue:d,controlled:l.type==="checkbox"||l.type==="radio"?l.checked!=null:l.value!=null}}function ot(o,l){l=l.checked,l!=null&&k(o,"checked",l,!1)}function dt(o,l){ot(o,l);var d=pe(l.value),m=l.type;if(d!=null)m==="number"?(d===0&&o.value===""||o.value!=d)&&(o.value=""+d):o.value!==""+d&&(o.value=""+d);else if(m==="submit"||m==="reset"){o.removeAttribute("value");return}l.hasOwnProperty("value")?Ot(o,l.type,d):l.hasOwnProperty("defaultValue")&&Ot(o,l.type,pe(l.defaultValue)),l.checked==null&&l.defaultChecked!=null&&(o.defaultChecked=!!l.defaultChecked)}function pr(o,l,d){if(l.hasOwnProperty("value")||l.hasOwnProperty("defaultValue")){var m=l.type;if(!(m!=="submit"&&m!=="reset"||l.value!==void 0&&l.value!==null))return;l=""+o._wrapperState.initialValue,d||l===o.value||(o.value=l),o.defaultValue=l}d=o.name,d!==""&&(o.name=""),o.defaultChecked=!!o._wrapperState.initialChecked,d!==""&&(o.name=d)}function Ot(o,l,d){(l!=="number"||Fe(o.ownerDocument)!==o)&&(d==null?o.defaultValue=""+o._wrapperState.initialValue:o.defaultValue!==""+d&&(o.defaultValue=""+d))}var Dr=Array.isArray;function tr(o,l,d,m){if(o=o.options,l){l={};for(var w=0;w<d.length;w++)l["$"+d[w]]=!0;for(d=0;d<o.length;d++)w=l.hasOwnProperty("$"+o[d].value),o[d].selected!==w&&(o[d].selected=w),w&&m&&(o[d].defaultSelected=!0)}else{for(d=""+pe(d),l=null,w=0;w<o.length;w++){if(o[w].value===d){o[w].selected=!0,m&&(o[w].defaultSelected=!0);return}l!==null||o[w].disabled||(l=o[w])}l!==null&&(l.selected=!0)}}function st(o,l){if(l.dangerouslySetInnerHTML!=null)throw Error(r(91));return z({},l,{value:void 0,defaultValue:void 0,children:""+o._wrapperState.initialValue})}function Er(o,l){var d=l.value;if(d==null){if(d=l.children,l=l.defaultValue,d!=null){if(l!=null)throw Error(r(92));if(Dr(d)){if(1<d.length)throw Error(r(93));d=d[0]}l=d}l==null&&(l=""),d=l}o._wrapperState={initialValue:pe(d)}}function ua(o,l){var d=pe(l.value),m=pe(l.defaultValue);d!=null&&(d=""+d,d!==o.value&&(o.value=d),l.defaultValue==null&&o.defaultValue!==d&&(o.defaultValue=d)),m!=null&&(o.defaultValue=""+m)}function ca(o){var l=o.textContent;l===o._wrapperState.initialValue&&l!==""&&l!==null&&(o.value=l)}function fa(o){switch(o){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 Ws(o,l){return o==null||o==="http://www.w3.org/1999/xhtml"?fa(l):o==="http://www.w3.org/2000/svg"&&l==="foreignObject"?"http://www.w3.org/1999/xhtml":o}var da,so=(function(o){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(l,d,m,w){MSApp.execUnsafeLocalFunction(function(){return o(l,d,m,w)})}:o})(function(o,l){if(o.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in o)o.innerHTML=l;else{for(da=da||document.createElement("div"),da.innerHTML="<svg>"+l.valueOf().toString()+"</svg>",l=da.firstChild;o.firstChild;)o.removeChild(o.firstChild);for(;l.firstChild;)o.appendChild(l.firstChild)}});function Br(o,l){if(l){var d=o.firstChild;if(d&&d===o.lastChild&&d.nodeType===3){d.nodeValue=l;return}}o.textContent=l}var Si={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},ki=["Webkit","ms","Moz","O"];Object.keys(Si).forEach(function(o){ki.forEach(function(l){l=l+o.charAt(0).toUpperCase()+o.substring(1),Si[l]=Si[o]})});function ic(o,l,d){return l==null||typeof l=="boolean"||l===""?"":d||typeof l!="number"||l===0||Si.hasOwnProperty(o)&&Si[o]?(""+l).trim():l+"px"}function ac(o,l){o=o.style;for(var d in l)if(l.hasOwnProperty(d)){var m=d.indexOf("--")===0,w=ic(d,l[d],m);d==="float"&&(d="cssFloat"),m?o.setProperty(d,w):o[d]=w}}var oc=z({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 lo(o,l){if(l){if(oc[o]&&(l.children!=null||l.dangerouslySetInnerHTML!=null))throw Error(r(137,o));if(l.dangerouslySetInnerHTML!=null){if(l.children!=null)throw Error(r(60));if(typeof l.dangerouslySetInnerHTML!="object"||!("__html"in l.dangerouslySetInnerHTML))throw Error(r(61))}if(l.style!=null&&typeof l.style!="object")throw Error(r(62))}}function Hs(o,l){if(o.indexOf("-")===-1)return typeof l.is=="string";switch(o){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 ha=null;function zr(o){return o=o.target||o.srcElement||window,o.correspondingUseElement&&(o=o.correspondingUseElement),o.nodeType===3?o.parentNode:o}var Vs=null,Oi=null,Vn=null;function Ks(o){if(o=hl(o)){if(typeof Vs!="function")throw Error(r(280));var l=o.stateNode;l&&(l=Ac(l),Vs(o.stateNode,o.type,l))}}function Ie(o){Oi?Vn?Vn.push(o):Vn=[o]:Oi=o}function xt(){if(Oi){var o=Oi,l=Vn;if(Vn=Oi=null,Ks(o),l)for(o=0;o<l.length;o++)Ks(l[o])}}function jt(o,l){return o(l)}function rr(){}var Ei=!1;function Et(o,l,d){if(Ei)return o(l,d);Ei=!0;try{return jt(o,l,d)}finally{Ei=!1,(Oi!==null||Vn!==null)&&(rr(),xt())}}function zt(o,l){var d=o.stateNode;if(d===null)return null;var m=Ac(d);if(m===null)return null;d=m[l];e:switch(l){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(m=!m.disabled)||(o=o.type,m=!(o==="button"||o==="input"||o==="select"||o==="textarea")),o=!m;break e;default:o=!1}if(o)return null;if(d&&typeof d!="function")throw Error(r(231,l,typeof d));return d}var Ai=!1;if(u)try{var Xt={};Object.defineProperty(Xt,"passive",{get:function(){Ai=!0}}),window.addEventListener("test",Xt,Xt),window.removeEventListener("test",Xt,Xt)}catch{Ai=!1}function Ar(o,l,d,m,w,_,C,I,D){var Q=Array.prototype.slice.call(arguments,3);try{l.apply(d,Q)}catch(oe){this.onError(oe)}}var Pi=!1,qr=null,Gs=!1,op=null,qI={onError:function(o){Pi=!0,qr=o}};function UI(o,l,d,m,w,_,C,I,D){Pi=!1,qr=null,Ar.apply(qI,arguments)}function FI(o,l,d,m,w,_,C,I,D){if(UI.apply(this,arguments),Pi){if(Pi){var Q=qr;Pi=!1,qr=null}else throw Error(r(198));Gs||(Gs=!0,op=Q)}}function pa(o){var l=o,d=o;if(o.alternate)for(;l.return;)l=l.return;else{o=l;do l=o,(l.flags&4098)!==0&&(d=l.return),o=l.return;while(o)}return l.tag===3?d:null}function m1(o){if(o.tag===13){var l=o.memoizedState;if(l===null&&(o=o.alternate,o!==null&&(l=o.memoizedState)),l!==null)return l.dehydrated}return null}function g1(o){if(pa(o)!==o)throw Error(r(188))}function WI(o){var l=o.alternate;if(!l){if(l=pa(o),l===null)throw Error(r(188));return l!==o?null:o}for(var d=o,m=l;;){var w=d.return;if(w===null)break;var _=w.alternate;if(_===null){if(m=w.return,m!==null){d=m;continue}break}if(w.child===_.child){for(_=w.child;_;){if(_===d)return g1(w),o;if(_===m)return g1(w),l;_=_.sibling}throw Error(r(188))}if(d.return!==m.return)d=w,m=_;else{for(var C=!1,I=w.child;I;){if(I===d){C=!0,d=w,m=_;break}if(I===m){C=!0,m=w,d=_;break}I=I.sibling}if(!C){for(I=_.child;I;){if(I===d){C=!0,d=_,m=w;break}if(I===m){C=!0,m=_,d=w;break}I=I.sibling}if(!C)throw Error(r(189))}}if(d.alternate!==m)throw Error(r(190))}if(d.tag!==3)throw Error(r(188));return d.stateNode.current===d?o:l}function v1(o){return o=WI(o),o!==null?y1(o):null}function y1(o){if(o.tag===5||o.tag===6)return o;for(o=o.child;o!==null;){var l=y1(o);if(l!==null)return l;o=o.sibling}return null}var b1=e.unstable_scheduleCallback,w1=e.unstable_cancelCallback,HI=e.unstable_shouldYield,VI=e.unstable_requestPaint,_t=e.unstable_now,KI=e.unstable_getCurrentPriorityLevel,sp=e.unstable_ImmediatePriority,x1=e.unstable_UserBlockingPriority,sc=e.unstable_NormalPriority,GI=e.unstable_LowPriority,_1=e.unstable_IdlePriority,lc=null,En=null;function XI(o){if(En&&typeof En.onCommitFiberRoot=="function")try{En.onCommitFiberRoot(lc,o,void 0,(o.current.flags&128)===128)}catch{}}var on=Math.clz32?Math.clz32:QI,YI=Math.log,JI=Math.LN2;function QI(o){return o>>>=0,o===0?32:31-(YI(o)/JI|0)|0}var uc=64,cc=4194304;function Xs(o){switch(o&-o){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 o&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return o&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return o}}function fc(o,l){var d=o.pendingLanes;if(d===0)return 0;var m=0,w=o.suspendedLanes,_=o.pingedLanes,C=d&268435455;if(C!==0){var I=C&~w;I!==0?m=Xs(I):(_&=C,_!==0&&(m=Xs(_)))}else C=d&~w,C!==0?m=Xs(C):_!==0&&(m=Xs(_));if(m===0)return 0;if(l!==0&&l!==m&&(l&w)===0&&(w=m&-m,_=l&-l,w>=_||w===16&&(_&4194240)!==0))return l;if((m&4)!==0&&(m|=d&16),l=o.entangledLanes,l!==0)for(o=o.entanglements,l&=m;0<l;)d=31-on(l),w=1<<d,m|=o[d],l&=~w;return m}function ZI(o,l){switch(o){case 1:case 2:case 4:return l+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 l+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 eM(o,l){for(var d=o.suspendedLanes,m=o.pingedLanes,w=o.expirationTimes,_=o.pendingLanes;0<_;){var C=31-on(_),I=1<<C,D=w[C];D===-1?((I&d)===0||(I&m)!==0)&&(w[C]=ZI(I,l)):D<=l&&(o.expiredLanes|=I),_&=~I}}function lp(o){return o=o.pendingLanes&-1073741825,o!==0?o:o&1073741824?1073741824:0}function S1(){var o=uc;return uc<<=1,(uc&4194240)===0&&(uc=64),o}function up(o){for(var l=[],d=0;31>d;d++)l.push(o);return l}function Ys(o,l,d){o.pendingLanes|=l,l!==536870912&&(o.suspendedLanes=0,o.pingedLanes=0),o=o.eventTimes,l=31-on(l),o[l]=d}function tM(o,l){var d=o.pendingLanes&~l;o.pendingLanes=l,o.suspendedLanes=0,o.pingedLanes=0,o.expiredLanes&=l,o.mutableReadLanes&=l,o.entangledLanes&=l,l=o.entanglements;var m=o.eventTimes;for(o=o.expirationTimes;0<d;){var w=31-on(d),_=1<<w;l[w]=0,m[w]=-1,o[w]=-1,d&=~_}}function cp(o,l){var d=o.entangledLanes|=l;for(o=o.entanglements;d;){var m=31-on(d),w=1<<m;w&l|o[m]&l&&(o[m]|=l),d&=~w}}var Ye=0;function k1(o){return o&=-o,1<o?4<o?(o&268435455)!==0?16:536870912:4:1}var O1,fp,E1,A1,P1,dp=!1,dc=[],Ti=null,Ci=null,ji=null,Js=new Map,Qs=new Map,Ri=[],rM="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 T1(o,l){switch(o){case"focusin":case"focusout":Ti=null;break;case"dragenter":case"dragleave":Ci=null;break;case"mouseover":case"mouseout":ji=null;break;case"pointerover":case"pointerout":Js.delete(l.pointerId);break;case"gotpointercapture":case"lostpointercapture":Qs.delete(l.pointerId)}}function Zs(o,l,d,m,w,_){return o===null||o.nativeEvent!==_?(o={blockedOn:l,domEventName:d,eventSystemFlags:m,nativeEvent:_,targetContainers:[w]},l!==null&&(l=hl(l),l!==null&&fp(l)),o):(o.eventSystemFlags|=m,l=o.targetContainers,w!==null&&l.indexOf(w)===-1&&l.push(w),o)}function nM(o,l,d,m,w){switch(l){case"focusin":return Ti=Zs(Ti,o,l,d,m,w),!0;case"dragenter":return Ci=Zs(Ci,o,l,d,m,w),!0;case"mouseover":return ji=Zs(ji,o,l,d,m,w),!0;case"pointerover":var _=w.pointerId;return Js.set(_,Zs(Js.get(_)||null,o,l,d,m,w)),!0;case"gotpointercapture":return _=w.pointerId,Qs.set(_,Zs(Qs.get(_)||null,o,l,d,m,w)),!0}return!1}function C1(o){var l=ma(o.target);if(l!==null){var d=pa(l);if(d!==null){if(l=d.tag,l===13){if(l=m1(d),l!==null){o.blockedOn=l,P1(o.priority,function(){E1(d)});return}}else if(l===3&&d.stateNode.current.memoizedState.isDehydrated){o.blockedOn=d.tag===3?d.stateNode.containerInfo:null;return}}}o.blockedOn=null}function hc(o){if(o.blockedOn!==null)return!1;for(var l=o.targetContainers;0<l.length;){var d=pp(o.domEventName,o.eventSystemFlags,l[0],o.nativeEvent);if(d===null){d=o.nativeEvent;var m=new d.constructor(d.type,d);ha=m,d.target.dispatchEvent(m),ha=null}else return l=hl(d),l!==null&&fp(l),o.blockedOn=d,!1;l.shift()}return!0}function j1(o,l,d){hc(o)&&d.delete(l)}function iM(){dp=!1,Ti!==null&&hc(Ti)&&(Ti=null),Ci!==null&&hc(Ci)&&(Ci=null),ji!==null&&hc(ji)&&(ji=null),Js.forEach(j1),Qs.forEach(j1)}function el(o,l){o.blockedOn===l&&(o.blockedOn=null,dp||(dp=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,iM)))}function tl(o){function l(w){return el(w,o)}if(0<dc.length){el(dc[0],o);for(var d=1;d<dc.length;d++){var m=dc[d];m.blockedOn===o&&(m.blockedOn=null)}}for(Ti!==null&&el(Ti,o),Ci!==null&&el(Ci,o),ji!==null&&el(ji,o),Js.forEach(l),Qs.forEach(l),d=0;d<Ri.length;d++)m=Ri[d],m.blockedOn===o&&(m.blockedOn=null);for(;0<Ri.length&&(d=Ri[0],d.blockedOn===null);)C1(d),d.blockedOn===null&&Ri.shift()}var uo=T.ReactCurrentBatchConfig,pc=!0;function aM(o,l,d,m){var w=Ye,_=uo.transition;uo.transition=null;try{Ye=1,hp(o,l,d,m)}finally{Ye=w,uo.transition=_}}function oM(o,l,d,m){var w=Ye,_=uo.transition;uo.transition=null;try{Ye=4,hp(o,l,d,m)}finally{Ye=w,uo.transition=_}}function hp(o,l,d,m){if(pc){var w=pp(o,l,d,m);if(w===null)jp(o,l,m,mc,d),T1(o,m);else if(nM(w,o,l,d,m))m.stopPropagation();else if(T1(o,m),l&4&&-1<rM.indexOf(o)){for(;w!==null;){var _=hl(w);if(_!==null&&O1(_),_=pp(o,l,d,m),_===null&&jp(o,l,m,mc,d),_===w)break;w=_}w!==null&&m.stopPropagation()}else jp(o,l,m,null,d)}}var mc=null;function pp(o,l,d,m){if(mc=null,o=zr(m),o=ma(o),o!==null)if(l=pa(o),l===null)o=null;else if(d=l.tag,d===13){if(o=m1(l),o!==null)return o;o=null}else if(d===3){if(l.stateNode.current.memoizedState.isDehydrated)return l.tag===3?l.stateNode.containerInfo:null;o=null}else l!==o&&(o=null);return mc=o,null}function R1(o){switch(o){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(KI()){case sp:return 1;case x1:return 4;case sc:case GI:return 16;case _1:return 536870912;default:return 16}default:return 16}}var Ni=null,mp=null,gc=null;function N1(){if(gc)return gc;var o,l=mp,d=l.length,m,w="value"in Ni?Ni.value:Ni.textContent,_=w.length;for(o=0;o<d&&l[o]===w[o];o++);var C=d-o;for(m=1;m<=C&&l[d-m]===w[_-m];m++);return gc=w.slice(o,1<m?1-m:void 0)}function vc(o){var l=o.keyCode;return"charCode"in o?(o=o.charCode,o===0&&l===13&&(o=13)):o=l,o===10&&(o=13),32<=o||o===13?o:0}function yc(){return!0}function $1(){return!1}function Pr(o){function l(d,m,w,_,C){this._reactName=d,this._targetInst=w,this.type=m,this.nativeEvent=_,this.target=C,this.currentTarget=null;for(var I in o)o.hasOwnProperty(I)&&(d=o[I],this[I]=d?d(_):_[I]);return this.isDefaultPrevented=(_.defaultPrevented!=null?_.defaultPrevented:_.returnValue===!1)?yc:$1,this.isPropagationStopped=$1,this}return z(l.prototype,{preventDefault:function(){this.defaultPrevented=!0;var d=this.nativeEvent;d&&(d.preventDefault?d.preventDefault():typeof d.returnValue!="unknown"&&(d.returnValue=!1),this.isDefaultPrevented=yc)},stopPropagation:function(){var d=this.nativeEvent;d&&(d.stopPropagation?d.stopPropagation():typeof d.cancelBubble!="unknown"&&(d.cancelBubble=!0),this.isPropagationStopped=yc)},persist:function(){},isPersistent:yc}),l}var co={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(o){return o.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},gp=Pr(co),rl=z({},co,{view:0,detail:0}),sM=Pr(rl),vp,yp,nl,bc=z({},rl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:wp,button:0,buttons:0,relatedTarget:function(o){return o.relatedTarget===void 0?o.fromElement===o.srcElement?o.toElement:o.fromElement:o.relatedTarget},movementX:function(o){return"movementX"in o?o.movementX:(o!==nl&&(nl&&o.type==="mousemove"?(vp=o.screenX-nl.screenX,yp=o.screenY-nl.screenY):yp=vp=0,nl=o),vp)},movementY:function(o){return"movementY"in o?o.movementY:yp}}),I1=Pr(bc),lM=z({},bc,{dataTransfer:0}),uM=Pr(lM),cM=z({},rl,{relatedTarget:0}),bp=Pr(cM),fM=z({},co,{animationName:0,elapsedTime:0,pseudoElement:0}),dM=Pr(fM),hM=z({},co,{clipboardData:function(o){return"clipboardData"in o?o.clipboardData:window.clipboardData}}),pM=Pr(hM),mM=z({},co,{data:0}),M1=Pr(mM),gM={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},vM={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"},yM={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function bM(o){var l=this.nativeEvent;return l.getModifierState?l.getModifierState(o):(o=yM[o])?!!l[o]:!1}function wp(){return bM}var wM=z({},rl,{key:function(o){if(o.key){var l=gM[o.key]||o.key;if(l!=="Unidentified")return l}return o.type==="keypress"?(o=vc(o),o===13?"Enter":String.fromCharCode(o)):o.type==="keydown"||o.type==="keyup"?vM[o.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:wp,charCode:function(o){return o.type==="keypress"?vc(o):0},keyCode:function(o){return o.type==="keydown"||o.type==="keyup"?o.keyCode:0},which:function(o){return o.type==="keypress"?vc(o):o.type==="keydown"||o.type==="keyup"?o.keyCode:0}}),xM=Pr(wM),_M=z({},bc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),L1=Pr(_M),SM=z({},rl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:wp}),kM=Pr(SM),OM=z({},co,{propertyName:0,elapsedTime:0,pseudoElement:0}),EM=Pr(OM),AM=z({},bc,{deltaX:function(o){return"deltaX"in o?o.deltaX:"wheelDeltaX"in o?-o.wheelDeltaX:0},deltaY:function(o){return"deltaY"in o?o.deltaY:"wheelDeltaY"in o?-o.wheelDeltaY:"wheelDelta"in o?-o.wheelDelta:0},deltaZ:0,deltaMode:0}),PM=Pr(AM),TM=[9,13,27,32],xp=u&&"CompositionEvent"in window,il=null;u&&"documentMode"in document&&(il=document.documentMode);var CM=u&&"TextEvent"in window&&!il,D1=u&&(!xp||il&&8<il&&11>=il),B1=" ",z1=!1;function q1(o,l){switch(o){case"keyup":return TM.indexOf(l.keyCode)!==-1;case"keydown":return l.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function U1(o){return o=o.detail,typeof o=="object"&&"data"in o?o.data:null}var fo=!1;function jM(o,l){switch(o){case"compositionend":return U1(l);case"keypress":return l.which!==32?null:(z1=!0,B1);case"textInput":return o=l.data,o===B1&&z1?null:o;default:return null}}function RM(o,l){if(fo)return o==="compositionend"||!xp&&q1(o,l)?(o=N1(),gc=mp=Ni=null,fo=!1,o):null;switch(o){case"paste":return null;case"keypress":if(!(l.ctrlKey||l.altKey||l.metaKey)||l.ctrlKey&&l.altKey){if(l.char&&1<l.char.length)return l.char;if(l.which)return String.fromCharCode(l.which)}return null;case"compositionend":return D1&&l.locale!=="ko"?null:l.data;default:return null}}var NM={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 F1(o){var l=o&&o.nodeName&&o.nodeName.toLowerCase();return l==="input"?!!NM[o.type]:l==="textarea"}function W1(o,l,d,m){Ie(m),l=kc(l,"onChange"),0<l.length&&(d=new gp("onChange","change",null,d,m),o.push({event:d,listeners:l}))}var al=null,ol=null;function $M(o){l_(o,0)}function wc(o){var l=vo(o);if(ie(l))return o}function IM(o,l){if(o==="change")return l}var H1=!1;if(u){var _p;if(u){var Sp="oninput"in document;if(!Sp){var V1=document.createElement("div");V1.setAttribute("oninput","return;"),Sp=typeof V1.oninput=="function"}_p=Sp}else _p=!1;H1=_p&&(!document.documentMode||9<document.documentMode)}function K1(){al&&(al.detachEvent("onpropertychange",G1),ol=al=null)}function G1(o){if(o.propertyName==="value"&&wc(ol)){var l=[];W1(l,ol,o,zr(o)),Et($M,l)}}function MM(o,l,d){o==="focusin"?(K1(),al=l,ol=d,al.attachEvent("onpropertychange",G1)):o==="focusout"&&K1()}function LM(o){if(o==="selectionchange"||o==="keyup"||o==="keydown")return wc(ol)}function DM(o,l){if(o==="click")return wc(l)}function BM(o,l){if(o==="input"||o==="change")return wc(l)}function zM(o,l){return o===l&&(o!==0||1/o===1/l)||o!==o&&l!==l}var sn=typeof Object.is=="function"?Object.is:zM;function sl(o,l){if(sn(o,l))return!0;if(typeof o!="object"||o===null||typeof l!="object"||l===null)return!1;var d=Object.keys(o),m=Object.keys(l);if(d.length!==m.length)return!1;for(m=0;m<d.length;m++){var w=d[m];if(!c.call(l,w)||!sn(o[w],l[w]))return!1}return!0}function X1(o){for(;o&&o.firstChild;)o=o.firstChild;return o}function Y1(o,l){var d=X1(o);o=0;for(var m;d;){if(d.nodeType===3){if(m=o+d.textContent.length,o<=l&&m>=l)return{node:d,offset:l-o};o=m}e:{for(;d;){if(d.nextSibling){d=d.nextSibling;break e}d=d.parentNode}d=void 0}d=X1(d)}}function J1(o,l){return o&&l?o===l?!0:o&&o.nodeType===3?!1:l&&l.nodeType===3?J1(o,l.parentNode):"contains"in o?o.contains(l):o.compareDocumentPosition?!!(o.compareDocumentPosition(l)&16):!1:!1}function Q1(){for(var o=window,l=Fe();l instanceof o.HTMLIFrameElement;){try{var d=typeof l.contentWindow.location.href=="string"}catch{d=!1}if(d)o=l.contentWindow;else break;l=Fe(o.document)}return l}function kp(o){var l=o&&o.nodeName&&o.nodeName.toLowerCase();return l&&(l==="input"&&(o.type==="text"||o.type==="search"||o.type==="tel"||o.type==="url"||o.type==="password")||l==="textarea"||o.contentEditable==="true")}function qM(o){var l=Q1(),d=o.focusedElem,m=o.selectionRange;if(l!==d&&d&&d.ownerDocument&&J1(d.ownerDocument.documentElement,d)){if(m!==null&&kp(d)){if(l=m.start,o=m.end,o===void 0&&(o=l),"selectionStart"in d)d.selectionStart=l,d.selectionEnd=Math.min(o,d.value.length);else if(o=(l=d.ownerDocument||document)&&l.defaultView||window,o.getSelection){o=o.getSelection();var w=d.textContent.length,_=Math.min(m.start,w);m=m.end===void 0?_:Math.min(m.end,w),!o.extend&&_>m&&(w=m,m=_,_=w),w=Y1(d,_);var C=Y1(d,m);w&&C&&(o.rangeCount!==1||o.anchorNode!==w.node||o.anchorOffset!==w.offset||o.focusNode!==C.node||o.focusOffset!==C.offset)&&(l=l.createRange(),l.setStart(w.node,w.offset),o.removeAllRanges(),_>m?(o.addRange(l),o.extend(C.node,C.offset)):(l.setEnd(C.node,C.offset),o.addRange(l)))}}for(l=[],o=d;o=o.parentNode;)o.nodeType===1&&l.push({element:o,left:o.scrollLeft,top:o.scrollTop});for(typeof d.focus=="function"&&d.focus(),d=0;d<l.length;d++)o=l[d],o.element.scrollLeft=o.left,o.element.scrollTop=o.top}}var UM=u&&"documentMode"in document&&11>=document.documentMode,ho=null,Op=null,ll=null,Ep=!1;function Z1(o,l,d){var m=d.window===d?d.document:d.nodeType===9?d:d.ownerDocument;Ep||ho==null||ho!==Fe(m)||(m=ho,"selectionStart"in m&&kp(m)?m={start:m.selectionStart,end:m.selectionEnd}:(m=(m.ownerDocument&&m.ownerDocument.defaultView||window).getSelection(),m={anchorNode:m.anchorNode,anchorOffset:m.anchorOffset,focusNode:m.focusNode,focusOffset:m.focusOffset}),ll&&sl(ll,m)||(ll=m,m=kc(Op,"onSelect"),0<m.length&&(l=new gp("onSelect","select",null,l,d),o.push({event:l,listeners:m}),l.target=ho)))}function xc(o,l){var d={};return d[o.toLowerCase()]=l.toLowerCase(),d["Webkit"+o]="webkit"+l,d["Moz"+o]="moz"+l,d}var po={animationend:xc("Animation","AnimationEnd"),animationiteration:xc("Animation","AnimationIteration"),animationstart:xc("Animation","AnimationStart"),transitionend:xc("Transition","TransitionEnd")},Ap={},e_={};u&&(e_=document.createElement("div").style,"AnimationEvent"in window||(delete po.animationend.animation,delete po.animationiteration.animation,delete po.animationstart.animation),"TransitionEvent"in window||delete po.transitionend.transition);function _c(o){if(Ap[o])return Ap[o];if(!po[o])return o;var l=po[o],d;for(d in l)if(l.hasOwnProperty(d)&&d in e_)return Ap[o]=l[d];return o}var t_=_c("animationend"),r_=_c("animationiteration"),n_=_c("animationstart"),i_=_c("transitionend"),a_=new Map,o_="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function $i(o,l){a_.set(o,l),a(l,[o])}for(var Pp=0;Pp<o_.length;Pp++){var Tp=o_[Pp],FM=Tp.toLowerCase(),WM=Tp[0].toUpperCase()+Tp.slice(1);$i(FM,"on"+WM)}$i(t_,"onAnimationEnd"),$i(r_,"onAnimationIteration"),$i(n_,"onAnimationStart"),$i("dblclick","onDoubleClick"),$i("focusin","onFocus"),$i("focusout","onBlur"),$i(i_,"onTransitionEnd"),s("onMouseEnter",["mouseout","mouseover"]),s("onMouseLeave",["mouseout","mouseover"]),s("onPointerEnter",["pointerout","pointerover"]),s("onPointerLeave",["pointerout","pointerover"]),a("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),a("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),a("onBeforeInput",["compositionend","keypress","textInput","paste"]),a("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ul="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(" "),HM=new Set("cancel close invalid load scroll toggle".split(" ").concat(ul));function s_(o,l,d){var m=o.type||"unknown-event";o.currentTarget=d,FI(m,l,void 0,o),o.currentTarget=null}function l_(o,l){l=(l&4)!==0;for(var d=0;d<o.length;d++){var m=o[d],w=m.event;m=m.listeners;e:{var _=void 0;if(l)for(var C=m.length-1;0<=C;C--){var I=m[C],D=I.instance,Q=I.currentTarget;if(I=I.listener,D!==_&&w.isPropagationStopped())break e;s_(w,I,Q),_=D}else for(C=0;C<m.length;C++){if(I=m[C],D=I.instance,Q=I.currentTarget,I=I.listener,D!==_&&w.isPropagationStopped())break e;s_(w,I,Q),_=D}}}if(Gs)throw o=op,Gs=!1,op=null,o}function lt(o,l){var d=l[Lp];d===void 0&&(d=l[Lp]=new Set);var m=o+"__bubble";d.has(m)||(u_(l,o,2,!1),d.add(m))}function Cp(o,l,d){var m=0;l&&(m|=4),u_(d,o,m,l)}var Sc="_reactListening"+Math.random().toString(36).slice(2);function cl(o){if(!o[Sc]){o[Sc]=!0,n.forEach(function(d){d!=="selectionchange"&&(HM.has(d)||Cp(d,!1,o),Cp(d,!0,o))});var l=o.nodeType===9?o:o.ownerDocument;l===null||l[Sc]||(l[Sc]=!0,Cp("selectionchange",!1,l))}}function u_(o,l,d,m){switch(R1(l)){case 1:var w=aM;break;case 4:w=oM;break;default:w=hp}d=w.bind(null,l,d,o),w=void 0,!Ai||l!=="touchstart"&&l!=="touchmove"&&l!=="wheel"||(w=!0),m?w!==void 0?o.addEventListener(l,d,{capture:!0,passive:w}):o.addEventListener(l,d,!0):w!==void 0?o.addEventListener(l,d,{passive:w}):o.addEventListener(l,d,!1)}function jp(o,l,d,m,w){var _=m;if((l&1)===0&&(l&2)===0&&m!==null)e:for(;;){if(m===null)return;var C=m.tag;if(C===3||C===4){var I=m.stateNode.containerInfo;if(I===w||I.nodeType===8&&I.parentNode===w)break;if(C===4)for(C=m.return;C!==null;){var D=C.tag;if((D===3||D===4)&&(D=C.stateNode.containerInfo,D===w||D.nodeType===8&&D.parentNode===w))return;C=C.return}for(;I!==null;){if(C=ma(I),C===null)return;if(D=C.tag,D===5||D===6){m=_=C;continue e}I=I.parentNode}}m=m.return}Et(function(){var Q=_,oe=zr(d),se=[];e:{var ae=a_.get(o);if(ae!==void 0){var me=gp,we=o;switch(o){case"keypress":if(vc(d)===0)break e;case"keydown":case"keyup":me=xM;break;case"focusin":we="focus",me=bp;break;case"focusout":we="blur",me=bp;break;case"beforeblur":case"afterblur":me=bp;break;case"click":if(d.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":me=I1;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":me=uM;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":me=kM;break;case t_:case r_:case n_:me=dM;break;case i_:me=EM;break;case"scroll":me=sM;break;case"wheel":me=PM;break;case"copy":case"cut":case"paste":me=pM;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":me=L1}var Se=(l&4)!==0,St=!Se&&o==="scroll",X=Se?ae!==null?ae+"Capture":null:ae;Se=[];for(var q=Q,Y;q!==null;){Y=q;var ce=Y.stateNode;if(Y.tag===5&&ce!==null&&(Y=ce,X!==null&&(ce=zt(q,X),ce!=null&&Se.push(fl(q,ce,Y)))),St)break;q=q.return}0<Se.length&&(ae=new me(ae,we,null,d,oe),se.push({event:ae,listeners:Se}))}}if((l&7)===0){e:{if(ae=o==="mouseover"||o==="pointerover",me=o==="mouseout"||o==="pointerout",ae&&d!==ha&&(we=d.relatedTarget||d.fromElement)&&(ma(we)||we[Kn]))break e;if((me||ae)&&(ae=oe.window===oe?oe:(ae=oe.ownerDocument)?ae.defaultView||ae.parentWindow:window,me?(we=d.relatedTarget||d.toElement,me=Q,we=we?ma(we):null,we!==null&&(St=pa(we),we!==St||we.tag!==5&&we.tag!==6)&&(we=null)):(me=null,we=Q),me!==we)){if(Se=I1,ce="onMouseLeave",X="onMouseEnter",q="mouse",(o==="pointerout"||o==="pointerover")&&(Se=L1,ce="onPointerLeave",X="onPointerEnter",q="pointer"),St=me==null?ae:vo(me),Y=we==null?ae:vo(we),ae=new Se(ce,q+"leave",me,d,oe),ae.target=St,ae.relatedTarget=Y,ce=null,ma(oe)===Q&&(Se=new Se(X,q+"enter",we,d,oe),Se.target=Y,Se.relatedTarget=St,ce=Se),St=ce,me&&we)t:{for(Se=me,X=we,q=0,Y=Se;Y;Y=mo(Y))q++;for(Y=0,ce=X;ce;ce=mo(ce))Y++;for(;0<q-Y;)Se=mo(Se),q--;for(;0<Y-q;)X=mo(X),Y--;for(;q--;){if(Se===X||X!==null&&Se===X.alternate)break t;Se=mo(Se),X=mo(X)}Se=null}else Se=null;me!==null&&c_(se,ae,me,Se,!1),we!==null&&St!==null&&c_(se,St,we,Se,!0)}}e:{if(ae=Q?vo(Q):window,me=ae.nodeName&&ae.nodeName.toLowerCase(),me==="select"||me==="input"&&ae.type==="file")var ke=IM;else if(F1(ae))if(H1)ke=BM;else{ke=LM;var Ae=MM}else(me=ae.nodeName)&&me.toLowerCase()==="input"&&(ae.type==="checkbox"||ae.type==="radio")&&(ke=DM);if(ke&&(ke=ke(o,Q))){W1(se,ke,d,oe);break e}Ae&&Ae(o,ae,Q),o==="focusout"&&(Ae=ae._wrapperState)&&Ae.controlled&&ae.type==="number"&&Ot(ae,"number",ae.value)}switch(Ae=Q?vo(Q):window,o){case"focusin":(F1(Ae)||Ae.contentEditable==="true")&&(ho=Ae,Op=Q,ll=null);break;case"focusout":ll=Op=ho=null;break;case"mousedown":Ep=!0;break;case"contextmenu":case"mouseup":case"dragend":Ep=!1,Z1(se,d,oe);break;case"selectionchange":if(UM)break;case"keydown":case"keyup":Z1(se,d,oe)}var Pe;if(xp)e:{switch(o){case"compositionstart":var je="onCompositionStart";break e;case"compositionend":je="onCompositionEnd";break e;case"compositionupdate":je="onCompositionUpdate";break e}je=void 0}else fo?q1(o,d)&&(je="onCompositionEnd"):o==="keydown"&&d.keyCode===229&&(je="onCompositionStart");je&&(D1&&d.locale!=="ko"&&(fo||je!=="onCompositionStart"?je==="onCompositionEnd"&&fo&&(Pe=N1()):(Ni=oe,mp="value"in Ni?Ni.value:Ni.textContent,fo=!0)),Ae=kc(Q,je),0<Ae.length&&(je=new M1(je,o,null,d,oe),se.push({event:je,listeners:Ae}),Pe?je.data=Pe:(Pe=U1(d),Pe!==null&&(je.data=Pe)))),(Pe=CM?jM(o,d):RM(o,d))&&(Q=kc(Q,"onBeforeInput"),0<Q.length&&(oe=new M1("onBeforeInput","beforeinput",null,d,oe),se.push({event:oe,listeners:Q}),oe.data=Pe))}l_(se,l)})}function fl(o,l,d){return{instance:o,listener:l,currentTarget:d}}function kc(o,l){for(var d=l+"Capture",m=[];o!==null;){var w=o,_=w.stateNode;w.tag===5&&_!==null&&(w=_,_=zt(o,d),_!=null&&m.unshift(fl(o,_,w)),_=zt(o,l),_!=null&&m.push(fl(o,_,w))),o=o.return}return m}function mo(o){if(o===null)return null;do o=o.return;while(o&&o.tag!==5);return o||null}function c_(o,l,d,m,w){for(var _=l._reactName,C=[];d!==null&&d!==m;){var I=d,D=I.alternate,Q=I.stateNode;if(D!==null&&D===m)break;I.tag===5&&Q!==null&&(I=Q,w?(D=zt(d,_),D!=null&&C.unshift(fl(d,D,I))):w||(D=zt(d,_),D!=null&&C.push(fl(d,D,I)))),d=d.return}C.length!==0&&o.push({event:l,listeners:C})}var VM=/\r\n?/g,KM=/\u0000|\uFFFD/g;function f_(o){return(typeof o=="string"?o:""+o).replace(VM,`
|
|
38
|
-
`).replace(KM,"")}function Oc(o,l,d){if(l=f_(l),f_(o)!==l&&d)throw Error(r(425))}function Ec(){}var Rp=null,Np=null;function $p(o,l){return o==="textarea"||o==="noscript"||typeof l.children=="string"||typeof l.children=="number"||typeof l.dangerouslySetInnerHTML=="object"&&l.dangerouslySetInnerHTML!==null&&l.dangerouslySetInnerHTML.__html!=null}var Ip=typeof setTimeout=="function"?setTimeout:void 0,GM=typeof clearTimeout=="function"?clearTimeout:void 0,d_=typeof Promise=="function"?Promise:void 0,XM=typeof queueMicrotask=="function"?queueMicrotask:typeof d_<"u"?function(o){return d_.resolve(null).then(o).catch(YM)}:Ip;function YM(o){setTimeout(function(){throw o})}function Mp(o,l){var d=l,m=0;do{var w=d.nextSibling;if(o.removeChild(d),w&&w.nodeType===8)if(d=w.data,d==="/$"){if(m===0){o.removeChild(w),tl(l);return}m--}else d!=="$"&&d!=="$?"&&d!=="$!"||m++;d=w}while(d);tl(l)}function Ii(o){for(;o!=null;o=o.nextSibling){var l=o.nodeType;if(l===1||l===3)break;if(l===8){if(l=o.data,l==="$"||l==="$!"||l==="$?")break;if(l==="/$")return null}}return o}function h_(o){o=o.previousSibling;for(var l=0;o;){if(o.nodeType===8){var d=o.data;if(d==="$"||d==="$!"||d==="$?"){if(l===0)return o;l--}else d==="/$"&&l++}o=o.previousSibling}return null}var go=Math.random().toString(36).slice(2),An="__reactFiber$"+go,dl="__reactProps$"+go,Kn="__reactContainer$"+go,Lp="__reactEvents$"+go,JM="__reactListeners$"+go,QM="__reactHandles$"+go;function ma(o){var l=o[An];if(l)return l;for(var d=o.parentNode;d;){if(l=d[Kn]||d[An]){if(d=l.alternate,l.child!==null||d!==null&&d.child!==null)for(o=h_(o);o!==null;){if(d=o[An])return d;o=h_(o)}return l}o=d,d=o.parentNode}return null}function hl(o){return o=o[An]||o[Kn],!o||o.tag!==5&&o.tag!==6&&o.tag!==13&&o.tag!==3?null:o}function vo(o){if(o.tag===5||o.tag===6)return o.stateNode;throw Error(r(33))}function Ac(o){return o[dl]||null}var Dp=[],yo=-1;function Mi(o){return{current:o}}function ut(o){0>yo||(o.current=Dp[yo],Dp[yo]=null,yo--)}function tt(o,l){yo++,Dp[yo]=o.current,o.current=l}var Li={},nr=Mi(Li),mr=Mi(!1),ga=Li;function bo(o,l){var d=o.type.contextTypes;if(!d)return Li;var m=o.stateNode;if(m&&m.__reactInternalMemoizedUnmaskedChildContext===l)return m.__reactInternalMemoizedMaskedChildContext;var w={},_;for(_ in d)w[_]=l[_];return m&&(o=o.stateNode,o.__reactInternalMemoizedUnmaskedChildContext=l,o.__reactInternalMemoizedMaskedChildContext=w),w}function gr(o){return o=o.childContextTypes,o!=null}function Pc(){ut(mr),ut(nr)}function p_(o,l,d){if(nr.current!==Li)throw Error(r(168));tt(nr,l),tt(mr,d)}function m_(o,l,d){var m=o.stateNode;if(l=l.childContextTypes,typeof m.getChildContext!="function")return d;m=m.getChildContext();for(var w in m)if(!(w in l))throw Error(r(108,Re(o)||"Unknown",w));return z({},d,m)}function Tc(o){return o=(o=o.stateNode)&&o.__reactInternalMemoizedMergedChildContext||Li,ga=nr.current,tt(nr,o),tt(mr,mr.current),!0}function g_(o,l,d){var m=o.stateNode;if(!m)throw Error(r(169));d?(o=m_(o,l,ga),m.__reactInternalMemoizedMergedChildContext=o,ut(mr),ut(nr),tt(nr,o)):ut(mr),tt(mr,d)}var Gn=null,Cc=!1,Bp=!1;function v_(o){Gn===null?Gn=[o]:Gn.push(o)}function ZM(o){Cc=!0,v_(o)}function Di(){if(!Bp&&Gn!==null){Bp=!0;var o=0,l=Ye;try{var d=Gn;for(Ye=1;o<d.length;o++){var m=d[o];do m=m(!0);while(m!==null)}Gn=null,Cc=!1}catch(w){throw Gn!==null&&(Gn=Gn.slice(o+1)),b1(sp,Di),w}finally{Ye=l,Bp=!1}}return null}var wo=[],xo=0,jc=null,Rc=0,Ur=[],Fr=0,va=null,Xn=1,Yn="";function ya(o,l){wo[xo++]=Rc,wo[xo++]=jc,jc=o,Rc=l}function y_(o,l,d){Ur[Fr++]=Xn,Ur[Fr++]=Yn,Ur[Fr++]=va,va=o;var m=Xn;o=Yn;var w=32-on(m)-1;m&=~(1<<w),d+=1;var _=32-on(l)+w;if(30<_){var C=w-w%5;_=(m&(1<<C)-1).toString(32),m>>=C,w-=C,Xn=1<<32-on(l)+w|d<<w|m,Yn=_+o}else Xn=1<<_|d<<w|m,Yn=o}function zp(o){o.return!==null&&(ya(o,1),y_(o,1,0))}function qp(o){for(;o===jc;)jc=wo[--xo],wo[xo]=null,Rc=wo[--xo],wo[xo]=null;for(;o===va;)va=Ur[--Fr],Ur[Fr]=null,Yn=Ur[--Fr],Ur[Fr]=null,Xn=Ur[--Fr],Ur[Fr]=null}var Tr=null,Cr=null,ht=!1,ln=null;function b_(o,l){var d=Kr(5,null,null,0);d.elementType="DELETED",d.stateNode=l,d.return=o,l=o.deletions,l===null?(o.deletions=[d],o.flags|=16):l.push(d)}function w_(o,l){switch(o.tag){case 5:var d=o.type;return l=l.nodeType!==1||d.toLowerCase()!==l.nodeName.toLowerCase()?null:l,l!==null?(o.stateNode=l,Tr=o,Cr=Ii(l.firstChild),!0):!1;case 6:return l=o.pendingProps===""||l.nodeType!==3?null:l,l!==null?(o.stateNode=l,Tr=o,Cr=null,!0):!1;case 13:return l=l.nodeType!==8?null:l,l!==null?(d=va!==null?{id:Xn,overflow:Yn}:null,o.memoizedState={dehydrated:l,treeContext:d,retryLane:1073741824},d=Kr(18,null,null,0),d.stateNode=l,d.return=o,o.child=d,Tr=o,Cr=null,!0):!1;default:return!1}}function Up(o){return(o.mode&1)!==0&&(o.flags&128)===0}function Fp(o){if(ht){var l=Cr;if(l){var d=l;if(!w_(o,l)){if(Up(o))throw Error(r(418));l=Ii(d.nextSibling);var m=Tr;l&&w_(o,l)?b_(m,d):(o.flags=o.flags&-4097|2,ht=!1,Tr=o)}}else{if(Up(o))throw Error(r(418));o.flags=o.flags&-4097|2,ht=!1,Tr=o}}}function x_(o){for(o=o.return;o!==null&&o.tag!==5&&o.tag!==3&&o.tag!==13;)o=o.return;Tr=o}function Nc(o){if(o!==Tr)return!1;if(!ht)return x_(o),ht=!0,!1;var l;if((l=o.tag!==3)&&!(l=o.tag!==5)&&(l=o.type,l=l!=="head"&&l!=="body"&&!$p(o.type,o.memoizedProps)),l&&(l=Cr)){if(Up(o))throw __(),Error(r(418));for(;l;)b_(o,l),l=Ii(l.nextSibling)}if(x_(o),o.tag===13){if(o=o.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(r(317));e:{for(o=o.nextSibling,l=0;o;){if(o.nodeType===8){var d=o.data;if(d==="/$"){if(l===0){Cr=Ii(o.nextSibling);break e}l--}else d!=="$"&&d!=="$!"&&d!=="$?"||l++}o=o.nextSibling}Cr=null}}else Cr=Tr?Ii(o.stateNode.nextSibling):null;return!0}function __(){for(var o=Cr;o;)o=Ii(o.nextSibling)}function _o(){Cr=Tr=null,ht=!1}function Wp(o){ln===null?ln=[o]:ln.push(o)}var e3=T.ReactCurrentBatchConfig;function pl(o,l,d){if(o=d.ref,o!==null&&typeof o!="function"&&typeof o!="object"){if(d._owner){if(d=d._owner,d){if(d.tag!==1)throw Error(r(309));var m=d.stateNode}if(!m)throw Error(r(147,o));var w=m,_=""+o;return l!==null&&l.ref!==null&&typeof l.ref=="function"&&l.ref._stringRef===_?l.ref:(l=function(C){var I=w.refs;C===null?delete I[_]:I[_]=C},l._stringRef=_,l)}if(typeof o!="string")throw Error(r(284));if(!d._owner)throw Error(r(290,o))}return o}function $c(o,l){throw o=Object.prototype.toString.call(l),Error(r(31,o==="[object Object]"?"object with keys {"+Object.keys(l).join(", ")+"}":o))}function S_(o){var l=o._init;return l(o._payload)}function k_(o){function l(X,q){if(o){var Y=X.deletions;Y===null?(X.deletions=[q],X.flags|=16):Y.push(q)}}function d(X,q){if(!o)return null;for(;q!==null;)l(X,q),q=q.sibling;return null}function m(X,q){for(X=new Map;q!==null;)q.key!==null?X.set(q.key,q):X.set(q.index,q),q=q.sibling;return X}function w(X,q){return X=Vi(X,q),X.index=0,X.sibling=null,X}function _(X,q,Y){return X.index=Y,o?(Y=X.alternate,Y!==null?(Y=Y.index,Y<q?(X.flags|=2,q):Y):(X.flags|=2,q)):(X.flags|=1048576,q)}function C(X){return o&&X.alternate===null&&(X.flags|=2),X}function I(X,q,Y,ce){return q===null||q.tag!==6?(q=Im(Y,X.mode,ce),q.return=X,q):(q=w(q,Y),q.return=X,q)}function D(X,q,Y,ce){var ke=Y.type;return ke===j?oe(X,q,Y.props.children,ce,Y.key):q!==null&&(q.elementType===ke||typeof ke=="object"&&ke!==null&&ke.$$typeof===K&&S_(ke)===q.type)?(ce=w(q,Y.props),ce.ref=pl(X,q,Y),ce.return=X,ce):(ce=af(Y.type,Y.key,Y.props,null,X.mode,ce),ce.ref=pl(X,q,Y),ce.return=X,ce)}function Q(X,q,Y,ce){return q===null||q.tag!==4||q.stateNode.containerInfo!==Y.containerInfo||q.stateNode.implementation!==Y.implementation?(q=Mm(Y,X.mode,ce),q.return=X,q):(q=w(q,Y.children||[]),q.return=X,q)}function oe(X,q,Y,ce,ke){return q===null||q.tag!==7?(q=Ea(Y,X.mode,ce,ke),q.return=X,q):(q=w(q,Y),q.return=X,q)}function se(X,q,Y){if(typeof q=="string"&&q!==""||typeof q=="number")return q=Im(""+q,X.mode,Y),q.return=X,q;if(typeof q=="object"&&q!==null){switch(q.$$typeof){case E:return Y=af(q.type,q.key,q.props,null,X.mode,Y),Y.ref=pl(X,null,q),Y.return=X,Y;case A:return q=Mm(q,X.mode,Y),q.return=X,q;case K:var ce=q._init;return se(X,ce(q._payload),Y)}if(Dr(q)||ee(q))return q=Ea(q,X.mode,Y,null),q.return=X,q;$c(X,q)}return null}function ae(X,q,Y,ce){var ke=q!==null?q.key:null;if(typeof Y=="string"&&Y!==""||typeof Y=="number")return ke!==null?null:I(X,q,""+Y,ce);if(typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case E:return Y.key===ke?D(X,q,Y,ce):null;case A:return Y.key===ke?Q(X,q,Y,ce):null;case K:return ke=Y._init,ae(X,q,ke(Y._payload),ce)}if(Dr(Y)||ee(Y))return ke!==null?null:oe(X,q,Y,ce,null);$c(X,Y)}return null}function me(X,q,Y,ce,ke){if(typeof ce=="string"&&ce!==""||typeof ce=="number")return X=X.get(Y)||null,I(q,X,""+ce,ke);if(typeof ce=="object"&&ce!==null){switch(ce.$$typeof){case E:return X=X.get(ce.key===null?Y:ce.key)||null,D(q,X,ce,ke);case A:return X=X.get(ce.key===null?Y:ce.key)||null,Q(q,X,ce,ke);case K:var Ae=ce._init;return me(X,q,Y,Ae(ce._payload),ke)}if(Dr(ce)||ee(ce))return X=X.get(Y)||null,oe(q,X,ce,ke,null);$c(q,ce)}return null}function we(X,q,Y,ce){for(var ke=null,Ae=null,Pe=q,je=q=0,Ft=null;Pe!==null&&je<Y.length;je++){Pe.index>je?(Ft=Pe,Pe=null):Ft=Pe.sibling;var He=ae(X,Pe,Y[je],ce);if(He===null){Pe===null&&(Pe=Ft);break}o&&Pe&&He.alternate===null&&l(X,Pe),q=_(He,q,je),Ae===null?ke=He:Ae.sibling=He,Ae=He,Pe=Ft}if(je===Y.length)return d(X,Pe),ht&&ya(X,je),ke;if(Pe===null){for(;je<Y.length;je++)Pe=se(X,Y[je],ce),Pe!==null&&(q=_(Pe,q,je),Ae===null?ke=Pe:Ae.sibling=Pe,Ae=Pe);return ht&&ya(X,je),ke}for(Pe=m(X,Pe);je<Y.length;je++)Ft=me(Pe,X,je,Y[je],ce),Ft!==null&&(o&&Ft.alternate!==null&&Pe.delete(Ft.key===null?je:Ft.key),q=_(Ft,q,je),Ae===null?ke=Ft:Ae.sibling=Ft,Ae=Ft);return o&&Pe.forEach(function(Ki){return l(X,Ki)}),ht&&ya(X,je),ke}function Se(X,q,Y,ce){var ke=ee(Y);if(typeof ke!="function")throw Error(r(150));if(Y=ke.call(Y),Y==null)throw Error(r(151));for(var Ae=ke=null,Pe=q,je=q=0,Ft=null,He=Y.next();Pe!==null&&!He.done;je++,He=Y.next()){Pe.index>je?(Ft=Pe,Pe=null):Ft=Pe.sibling;var Ki=ae(X,Pe,He.value,ce);if(Ki===null){Pe===null&&(Pe=Ft);break}o&&Pe&&Ki.alternate===null&&l(X,Pe),q=_(Ki,q,je),Ae===null?ke=Ki:Ae.sibling=Ki,Ae=Ki,Pe=Ft}if(He.done)return d(X,Pe),ht&&ya(X,je),ke;if(Pe===null){for(;!He.done;je++,He=Y.next())He=se(X,He.value,ce),He!==null&&(q=_(He,q,je),Ae===null?ke=He:Ae.sibling=He,Ae=He);return ht&&ya(X,je),ke}for(Pe=m(X,Pe);!He.done;je++,He=Y.next())He=me(Pe,X,je,He.value,ce),He!==null&&(o&&He.alternate!==null&&Pe.delete(He.key===null?je:He.key),q=_(He,q,je),Ae===null?ke=He:Ae.sibling=He,Ae=He);return o&&Pe.forEach(function(N3){return l(X,N3)}),ht&&ya(X,je),ke}function St(X,q,Y,ce){if(typeof Y=="object"&&Y!==null&&Y.type===j&&Y.key===null&&(Y=Y.props.children),typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case E:e:{for(var ke=Y.key,Ae=q;Ae!==null;){if(Ae.key===ke){if(ke=Y.type,ke===j){if(Ae.tag===7){d(X,Ae.sibling),q=w(Ae,Y.props.children),q.return=X,X=q;break e}}else if(Ae.elementType===ke||typeof ke=="object"&&ke!==null&&ke.$$typeof===K&&S_(ke)===Ae.type){d(X,Ae.sibling),q=w(Ae,Y.props),q.ref=pl(X,Ae,Y),q.return=X,X=q;break e}d(X,Ae);break}else l(X,Ae);Ae=Ae.sibling}Y.type===j?(q=Ea(Y.props.children,X.mode,ce,Y.key),q.return=X,X=q):(ce=af(Y.type,Y.key,Y.props,null,X.mode,ce),ce.ref=pl(X,q,Y),ce.return=X,X=ce)}return C(X);case A:e:{for(Ae=Y.key;q!==null;){if(q.key===Ae)if(q.tag===4&&q.stateNode.containerInfo===Y.containerInfo&&q.stateNode.implementation===Y.implementation){d(X,q.sibling),q=w(q,Y.children||[]),q.return=X,X=q;break e}else{d(X,q);break}else l(X,q);q=q.sibling}q=Mm(Y,X.mode,ce),q.return=X,X=q}return C(X);case K:return Ae=Y._init,St(X,q,Ae(Y._payload),ce)}if(Dr(Y))return we(X,q,Y,ce);if(ee(Y))return Se(X,q,Y,ce);$c(X,Y)}return typeof Y=="string"&&Y!==""||typeof Y=="number"?(Y=""+Y,q!==null&&q.tag===6?(d(X,q.sibling),q=w(q,Y),q.return=X,X=q):(d(X,q),q=Im(Y,X.mode,ce),q.return=X,X=q),C(X)):d(X,q)}return St}var So=k_(!0),O_=k_(!1),Ic=Mi(null),Mc=null,ko=null,Hp=null;function Vp(){Hp=ko=Mc=null}function Kp(o){var l=Ic.current;ut(Ic),o._currentValue=l}function Gp(o,l,d){for(;o!==null;){var m=o.alternate;if((o.childLanes&l)!==l?(o.childLanes|=l,m!==null&&(m.childLanes|=l)):m!==null&&(m.childLanes&l)!==l&&(m.childLanes|=l),o===d)break;o=o.return}}function Oo(o,l){Mc=o,Hp=ko=null,o=o.dependencies,o!==null&&o.firstContext!==null&&((o.lanes&l)!==0&&(vr=!0),o.firstContext=null)}function Wr(o){var l=o._currentValue;if(Hp!==o)if(o={context:o,memoizedValue:l,next:null},ko===null){if(Mc===null)throw Error(r(308));ko=o,Mc.dependencies={lanes:0,firstContext:o}}else ko=ko.next=o;return l}var ba=null;function Xp(o){ba===null?ba=[o]:ba.push(o)}function E_(o,l,d,m){var w=l.interleaved;return w===null?(d.next=d,Xp(l)):(d.next=w.next,w.next=d),l.interleaved=d,Jn(o,m)}function Jn(o,l){o.lanes|=l;var d=o.alternate;for(d!==null&&(d.lanes|=l),d=o,o=o.return;o!==null;)o.childLanes|=l,d=o.alternate,d!==null&&(d.childLanes|=l),d=o,o=o.return;return d.tag===3?d.stateNode:null}var Bi=!1;function Yp(o){o.updateQueue={baseState:o.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function A_(o,l){o=o.updateQueue,l.updateQueue===o&&(l.updateQueue={baseState:o.baseState,firstBaseUpdate:o.firstBaseUpdate,lastBaseUpdate:o.lastBaseUpdate,shared:o.shared,effects:o.effects})}function Qn(o,l){return{eventTime:o,lane:l,tag:0,payload:null,callback:null,next:null}}function zi(o,l,d){var m=o.updateQueue;if(m===null)return null;if(m=m.shared,(We&2)!==0){var w=m.pending;return w===null?l.next=l:(l.next=w.next,w.next=l),m.pending=l,Jn(o,d)}return w=m.interleaved,w===null?(l.next=l,Xp(m)):(l.next=w.next,w.next=l),m.interleaved=l,Jn(o,d)}function Lc(o,l,d){if(l=l.updateQueue,l!==null&&(l=l.shared,(d&4194240)!==0)){var m=l.lanes;m&=o.pendingLanes,d|=m,l.lanes=d,cp(o,d)}}function P_(o,l){var d=o.updateQueue,m=o.alternate;if(m!==null&&(m=m.updateQueue,d===m)){var w=null,_=null;if(d=d.firstBaseUpdate,d!==null){do{var C={eventTime:d.eventTime,lane:d.lane,tag:d.tag,payload:d.payload,callback:d.callback,next:null};_===null?w=_=C:_=_.next=C,d=d.next}while(d!==null);_===null?w=_=l:_=_.next=l}else w=_=l;d={baseState:m.baseState,firstBaseUpdate:w,lastBaseUpdate:_,shared:m.shared,effects:m.effects},o.updateQueue=d;return}o=d.lastBaseUpdate,o===null?d.firstBaseUpdate=l:o.next=l,d.lastBaseUpdate=l}function Dc(o,l,d,m){var w=o.updateQueue;Bi=!1;var _=w.firstBaseUpdate,C=w.lastBaseUpdate,I=w.shared.pending;if(I!==null){w.shared.pending=null;var D=I,Q=D.next;D.next=null,C===null?_=Q:C.next=Q,C=D;var oe=o.alternate;oe!==null&&(oe=oe.updateQueue,I=oe.lastBaseUpdate,I!==C&&(I===null?oe.firstBaseUpdate=Q:I.next=Q,oe.lastBaseUpdate=D))}if(_!==null){var se=w.baseState;C=0,oe=Q=D=null,I=_;do{var ae=I.lane,me=I.eventTime;if((m&ae)===ae){oe!==null&&(oe=oe.next={eventTime:me,lane:0,tag:I.tag,payload:I.payload,callback:I.callback,next:null});e:{var we=o,Se=I;switch(ae=l,me=d,Se.tag){case 1:if(we=Se.payload,typeof we=="function"){se=we.call(me,se,ae);break e}se=we;break e;case 3:we.flags=we.flags&-65537|128;case 0:if(we=Se.payload,ae=typeof we=="function"?we.call(me,se,ae):we,ae==null)break e;se=z({},se,ae);break e;case 2:Bi=!0}}I.callback!==null&&I.lane!==0&&(o.flags|=64,ae=w.effects,ae===null?w.effects=[I]:ae.push(I))}else me={eventTime:me,lane:ae,tag:I.tag,payload:I.payload,callback:I.callback,next:null},oe===null?(Q=oe=me,D=se):oe=oe.next=me,C|=ae;if(I=I.next,I===null){if(I=w.shared.pending,I===null)break;ae=I,I=ae.next,ae.next=null,w.lastBaseUpdate=ae,w.shared.pending=null}}while(!0);if(oe===null&&(D=se),w.baseState=D,w.firstBaseUpdate=Q,w.lastBaseUpdate=oe,l=w.shared.interleaved,l!==null){w=l;do C|=w.lane,w=w.next;while(w!==l)}else _===null&&(w.shared.lanes=0);_a|=C,o.lanes=C,o.memoizedState=se}}function T_(o,l,d){if(o=l.effects,l.effects=null,o!==null)for(l=0;l<o.length;l++){var m=o[l],w=m.callback;if(w!==null){if(m.callback=null,m=d,typeof w!="function")throw Error(r(191,w));w.call(m)}}}var ml={},Pn=Mi(ml),gl=Mi(ml),vl=Mi(ml);function wa(o){if(o===ml)throw Error(r(174));return o}function Jp(o,l){switch(tt(vl,l),tt(gl,o),tt(Pn,ml),o=l.nodeType,o){case 9:case 11:l=(l=l.documentElement)?l.namespaceURI:Ws(null,"");break;default:o=o===8?l.parentNode:l,l=o.namespaceURI||null,o=o.tagName,l=Ws(l,o)}ut(Pn),tt(Pn,l)}function Eo(){ut(Pn),ut(gl),ut(vl)}function C_(o){wa(vl.current);var l=wa(Pn.current),d=Ws(l,o.type);l!==d&&(tt(gl,o),tt(Pn,d))}function Qp(o){gl.current===o&&(ut(Pn),ut(gl))}var gt=Mi(0);function Bc(o){for(var l=o;l!==null;){if(l.tag===13){var d=l.memoizedState;if(d!==null&&(d=d.dehydrated,d===null||d.data==="$?"||d.data==="$!"))return l}else if(l.tag===19&&l.memoizedProps.revealOrder!==void 0){if((l.flags&128)!==0)return l}else if(l.child!==null){l.child.return=l,l=l.child;continue}if(l===o)break;for(;l.sibling===null;){if(l.return===null||l.return===o)return null;l=l.return}l.sibling.return=l.return,l=l.sibling}return null}var Zp=[];function em(){for(var o=0;o<Zp.length;o++)Zp[o]._workInProgressVersionPrimary=null;Zp.length=0}var zc=T.ReactCurrentDispatcher,tm=T.ReactCurrentBatchConfig,xa=0,vt=null,Rt=null,qt=null,qc=!1,yl=!1,bl=0,t3=0;function ir(){throw Error(r(321))}function rm(o,l){if(l===null)return!1;for(var d=0;d<l.length&&d<o.length;d++)if(!sn(o[d],l[d]))return!1;return!0}function nm(o,l,d,m,w,_){if(xa=_,vt=l,l.memoizedState=null,l.updateQueue=null,l.lanes=0,zc.current=o===null||o.memoizedState===null?a3:o3,o=d(m,w),yl){_=0;do{if(yl=!1,bl=0,25<=_)throw Error(r(301));_+=1,qt=Rt=null,l.updateQueue=null,zc.current=s3,o=d(m,w)}while(yl)}if(zc.current=Wc,l=Rt!==null&&Rt.next!==null,xa=0,qt=Rt=vt=null,qc=!1,l)throw Error(r(300));return o}function im(){var o=bl!==0;return bl=0,o}function Tn(){var o={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return qt===null?vt.memoizedState=qt=o:qt=qt.next=o,qt}function Hr(){if(Rt===null){var o=vt.alternate;o=o!==null?o.memoizedState:null}else o=Rt.next;var l=qt===null?vt.memoizedState:qt.next;if(l!==null)qt=l,Rt=o;else{if(o===null)throw Error(r(310));Rt=o,o={memoizedState:Rt.memoizedState,baseState:Rt.baseState,baseQueue:Rt.baseQueue,queue:Rt.queue,next:null},qt===null?vt.memoizedState=qt=o:qt=qt.next=o}return qt}function wl(o,l){return typeof l=="function"?l(o):l}function am(o){var l=Hr(),d=l.queue;if(d===null)throw Error(r(311));d.lastRenderedReducer=o;var m=Rt,w=m.baseQueue,_=d.pending;if(_!==null){if(w!==null){var C=w.next;w.next=_.next,_.next=C}m.baseQueue=w=_,d.pending=null}if(w!==null){_=w.next,m=m.baseState;var I=C=null,D=null,Q=_;do{var oe=Q.lane;if((xa&oe)===oe)D!==null&&(D=D.next={lane:0,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null}),m=Q.hasEagerState?Q.eagerState:o(m,Q.action);else{var se={lane:oe,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null};D===null?(I=D=se,C=m):D=D.next=se,vt.lanes|=oe,_a|=oe}Q=Q.next}while(Q!==null&&Q!==_);D===null?C=m:D.next=I,sn(m,l.memoizedState)||(vr=!0),l.memoizedState=m,l.baseState=C,l.baseQueue=D,d.lastRenderedState=m}if(o=d.interleaved,o!==null){w=o;do _=w.lane,vt.lanes|=_,_a|=_,w=w.next;while(w!==o)}else w===null&&(d.lanes=0);return[l.memoizedState,d.dispatch]}function om(o){var l=Hr(),d=l.queue;if(d===null)throw Error(r(311));d.lastRenderedReducer=o;var m=d.dispatch,w=d.pending,_=l.memoizedState;if(w!==null){d.pending=null;var C=w=w.next;do _=o(_,C.action),C=C.next;while(C!==w);sn(_,l.memoizedState)||(vr=!0),l.memoizedState=_,l.baseQueue===null&&(l.baseState=_),d.lastRenderedState=_}return[_,m]}function j_(){}function R_(o,l){var d=vt,m=Hr(),w=l(),_=!sn(m.memoizedState,w);if(_&&(m.memoizedState=w,vr=!0),m=m.queue,sm(I_.bind(null,d,m,o),[o]),m.getSnapshot!==l||_||qt!==null&&qt.memoizedState.tag&1){if(d.flags|=2048,xl(9,$_.bind(null,d,m,w,l),void 0,null),Ut===null)throw Error(r(349));(xa&30)!==0||N_(d,l,w)}return w}function N_(o,l,d){o.flags|=16384,o={getSnapshot:l,value:d},l=vt.updateQueue,l===null?(l={lastEffect:null,stores:null},vt.updateQueue=l,l.stores=[o]):(d=l.stores,d===null?l.stores=[o]:d.push(o))}function $_(o,l,d,m){l.value=d,l.getSnapshot=m,M_(l)&&L_(o)}function I_(o,l,d){return d(function(){M_(l)&&L_(o)})}function M_(o){var l=o.getSnapshot;o=o.value;try{var d=l();return!sn(o,d)}catch{return!0}}function L_(o){var l=Jn(o,1);l!==null&&dn(l,o,1,-1)}function D_(o){var l=Tn();return typeof o=="function"&&(o=o()),l.memoizedState=l.baseState=o,o={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:wl,lastRenderedState:o},l.queue=o,o=o.dispatch=i3.bind(null,vt,o),[l.memoizedState,o]}function xl(o,l,d,m){return o={tag:o,create:l,destroy:d,deps:m,next:null},l=vt.updateQueue,l===null?(l={lastEffect:null,stores:null},vt.updateQueue=l,l.lastEffect=o.next=o):(d=l.lastEffect,d===null?l.lastEffect=o.next=o:(m=d.next,d.next=o,o.next=m,l.lastEffect=o)),o}function B_(){return Hr().memoizedState}function Uc(o,l,d,m){var w=Tn();vt.flags|=o,w.memoizedState=xl(1|l,d,void 0,m===void 0?null:m)}function Fc(o,l,d,m){var w=Hr();m=m===void 0?null:m;var _=void 0;if(Rt!==null){var C=Rt.memoizedState;if(_=C.destroy,m!==null&&rm(m,C.deps)){w.memoizedState=xl(l,d,_,m);return}}vt.flags|=o,w.memoizedState=xl(1|l,d,_,m)}function z_(o,l){return Uc(8390656,8,o,l)}function sm(o,l){return Fc(2048,8,o,l)}function q_(o,l){return Fc(4,2,o,l)}function U_(o,l){return Fc(4,4,o,l)}function F_(o,l){if(typeof l=="function")return o=o(),l(o),function(){l(null)};if(l!=null)return o=o(),l.current=o,function(){l.current=null}}function W_(o,l,d){return d=d!=null?d.concat([o]):null,Fc(4,4,F_.bind(null,l,o),d)}function lm(){}function H_(o,l){var d=Hr();l=l===void 0?null:l;var m=d.memoizedState;return m!==null&&l!==null&&rm(l,m[1])?m[0]:(d.memoizedState=[o,l],o)}function V_(o,l){var d=Hr();l=l===void 0?null:l;var m=d.memoizedState;return m!==null&&l!==null&&rm(l,m[1])?m[0]:(o=o(),d.memoizedState=[o,l],o)}function K_(o,l,d){return(xa&21)===0?(o.baseState&&(o.baseState=!1,vr=!0),o.memoizedState=d):(sn(d,l)||(d=S1(),vt.lanes|=d,_a|=d,o.baseState=!0),l)}function r3(o,l){var d=Ye;Ye=d!==0&&4>d?d:4,o(!0);var m=tm.transition;tm.transition={};try{o(!1),l()}finally{Ye=d,tm.transition=m}}function G_(){return Hr().memoizedState}function n3(o,l,d){var m=Wi(o);if(d={lane:m,action:d,hasEagerState:!1,eagerState:null,next:null},X_(o))Y_(l,d);else if(d=E_(o,l,d,m),d!==null){var w=cr();dn(d,o,m,w),J_(d,l,m)}}function i3(o,l,d){var m=Wi(o),w={lane:m,action:d,hasEagerState:!1,eagerState:null,next:null};if(X_(o))Y_(l,w);else{var _=o.alternate;if(o.lanes===0&&(_===null||_.lanes===0)&&(_=l.lastRenderedReducer,_!==null))try{var C=l.lastRenderedState,I=_(C,d);if(w.hasEagerState=!0,w.eagerState=I,sn(I,C)){var D=l.interleaved;D===null?(w.next=w,Xp(l)):(w.next=D.next,D.next=w),l.interleaved=w;return}}catch{}finally{}d=E_(o,l,w,m),d!==null&&(w=cr(),dn(d,o,m,w),J_(d,l,m))}}function X_(o){var l=o.alternate;return o===vt||l!==null&&l===vt}function Y_(o,l){yl=qc=!0;var d=o.pending;d===null?l.next=l:(l.next=d.next,d.next=l),o.pending=l}function J_(o,l,d){if((d&4194240)!==0){var m=l.lanes;m&=o.pendingLanes,d|=m,l.lanes=d,cp(o,d)}}var Wc={readContext:Wr,useCallback:ir,useContext:ir,useEffect:ir,useImperativeHandle:ir,useInsertionEffect:ir,useLayoutEffect:ir,useMemo:ir,useReducer:ir,useRef:ir,useState:ir,useDebugValue:ir,useDeferredValue:ir,useTransition:ir,useMutableSource:ir,useSyncExternalStore:ir,useId:ir,unstable_isNewReconciler:!1},a3={readContext:Wr,useCallback:function(o,l){return Tn().memoizedState=[o,l===void 0?null:l],o},useContext:Wr,useEffect:z_,useImperativeHandle:function(o,l,d){return d=d!=null?d.concat([o]):null,Uc(4194308,4,F_.bind(null,l,o),d)},useLayoutEffect:function(o,l){return Uc(4194308,4,o,l)},useInsertionEffect:function(o,l){return Uc(4,2,o,l)},useMemo:function(o,l){var d=Tn();return l=l===void 0?null:l,o=o(),d.memoizedState=[o,l],o},useReducer:function(o,l,d){var m=Tn();return l=d!==void 0?d(l):l,m.memoizedState=m.baseState=l,o={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:o,lastRenderedState:l},m.queue=o,o=o.dispatch=n3.bind(null,vt,o),[m.memoizedState,o]},useRef:function(o){var l=Tn();return o={current:o},l.memoizedState=o},useState:D_,useDebugValue:lm,useDeferredValue:function(o){return Tn().memoizedState=o},useTransition:function(){var o=D_(!1),l=o[0];return o=r3.bind(null,o[1]),Tn().memoizedState=o,[l,o]},useMutableSource:function(){},useSyncExternalStore:function(o,l,d){var m=vt,w=Tn();if(ht){if(d===void 0)throw Error(r(407));d=d()}else{if(d=l(),Ut===null)throw Error(r(349));(xa&30)!==0||N_(m,l,d)}w.memoizedState=d;var _={value:d,getSnapshot:l};return w.queue=_,z_(I_.bind(null,m,_,o),[o]),m.flags|=2048,xl(9,$_.bind(null,m,_,d,l),void 0,null),d},useId:function(){var o=Tn(),l=Ut.identifierPrefix;if(ht){var d=Yn,m=Xn;d=(m&~(1<<32-on(m)-1)).toString(32)+d,l=":"+l+"R"+d,d=bl++,0<d&&(l+="H"+d.toString(32)),l+=":"}else d=t3++,l=":"+l+"r"+d.toString(32)+":";return o.memoizedState=l},unstable_isNewReconciler:!1},o3={readContext:Wr,useCallback:H_,useContext:Wr,useEffect:sm,useImperativeHandle:W_,useInsertionEffect:q_,useLayoutEffect:U_,useMemo:V_,useReducer:am,useRef:B_,useState:function(){return am(wl)},useDebugValue:lm,useDeferredValue:function(o){var l=Hr();return K_(l,Rt.memoizedState,o)},useTransition:function(){var o=am(wl)[0],l=Hr().memoizedState;return[o,l]},useMutableSource:j_,useSyncExternalStore:R_,useId:G_,unstable_isNewReconciler:!1},s3={readContext:Wr,useCallback:H_,useContext:Wr,useEffect:sm,useImperativeHandle:W_,useInsertionEffect:q_,useLayoutEffect:U_,useMemo:V_,useReducer:om,useRef:B_,useState:function(){return om(wl)},useDebugValue:lm,useDeferredValue:function(o){var l=Hr();return Rt===null?l.memoizedState=o:K_(l,Rt.memoizedState,o)},useTransition:function(){var o=om(wl)[0],l=Hr().memoizedState;return[o,l]},useMutableSource:j_,useSyncExternalStore:R_,useId:G_,unstable_isNewReconciler:!1};function un(o,l){if(o&&o.defaultProps){l=z({},l),o=o.defaultProps;for(var d in o)l[d]===void 0&&(l[d]=o[d]);return l}return l}function um(o,l,d,m){l=o.memoizedState,d=d(m,l),d=d==null?l:z({},l,d),o.memoizedState=d,o.lanes===0&&(o.updateQueue.baseState=d)}var Hc={isMounted:function(o){return(o=o._reactInternals)?pa(o)===o:!1},enqueueSetState:function(o,l,d){o=o._reactInternals;var m=cr(),w=Wi(o),_=Qn(m,w);_.payload=l,d!=null&&(_.callback=d),l=zi(o,_,w),l!==null&&(dn(l,o,w,m),Lc(l,o,w))},enqueueReplaceState:function(o,l,d){o=o._reactInternals;var m=cr(),w=Wi(o),_=Qn(m,w);_.tag=1,_.payload=l,d!=null&&(_.callback=d),l=zi(o,_,w),l!==null&&(dn(l,o,w,m),Lc(l,o,w))},enqueueForceUpdate:function(o,l){o=o._reactInternals;var d=cr(),m=Wi(o),w=Qn(d,m);w.tag=2,l!=null&&(w.callback=l),l=zi(o,w,m),l!==null&&(dn(l,o,m,d),Lc(l,o,m))}};function Q_(o,l,d,m,w,_,C){return o=o.stateNode,typeof o.shouldComponentUpdate=="function"?o.shouldComponentUpdate(m,_,C):l.prototype&&l.prototype.isPureReactComponent?!sl(d,m)||!sl(w,_):!0}function Z_(o,l,d){var m=!1,w=Li,_=l.contextType;return typeof _=="object"&&_!==null?_=Wr(_):(w=gr(l)?ga:nr.current,m=l.contextTypes,_=(m=m!=null)?bo(o,w):Li),l=new l(d,_),o.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,l.updater=Hc,o.stateNode=l,l._reactInternals=o,m&&(o=o.stateNode,o.__reactInternalMemoizedUnmaskedChildContext=w,o.__reactInternalMemoizedMaskedChildContext=_),l}function eS(o,l,d,m){o=l.state,typeof l.componentWillReceiveProps=="function"&&l.componentWillReceiveProps(d,m),typeof l.UNSAFE_componentWillReceiveProps=="function"&&l.UNSAFE_componentWillReceiveProps(d,m),l.state!==o&&Hc.enqueueReplaceState(l,l.state,null)}function cm(o,l,d,m){var w=o.stateNode;w.props=d,w.state=o.memoizedState,w.refs={},Yp(o);var _=l.contextType;typeof _=="object"&&_!==null?w.context=Wr(_):(_=gr(l)?ga:nr.current,w.context=bo(o,_)),w.state=o.memoizedState,_=l.getDerivedStateFromProps,typeof _=="function"&&(um(o,l,_,d),w.state=o.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof w.getSnapshotBeforeUpdate=="function"||typeof w.UNSAFE_componentWillMount!="function"&&typeof w.componentWillMount!="function"||(l=w.state,typeof w.componentWillMount=="function"&&w.componentWillMount(),typeof w.UNSAFE_componentWillMount=="function"&&w.UNSAFE_componentWillMount(),l!==w.state&&Hc.enqueueReplaceState(w,w.state,null),Dc(o,d,w,m),w.state=o.memoizedState),typeof w.componentDidMount=="function"&&(o.flags|=4194308)}function Ao(o,l){try{var d="",m=l;do d+=le(m),m=m.return;while(m);var w=d}catch(_){w=`
|
|
39
|
-
Error generating stack: `+_.message+`
|
|
40
|
-
`+_.stack}return{value:o,source:l,stack:w,digest:null}}function fm(o,l,d){return{value:o,source:null,stack:d??null,digest:l??null}}function dm(o,l){try{console.error(l.value)}catch(d){setTimeout(function(){throw d})}}var l3=typeof WeakMap=="function"?WeakMap:Map;function tS(o,l,d){d=Qn(-1,d),d.tag=3,d.payload={element:null};var m=l.value;return d.callback=function(){Qc||(Qc=!0,Am=m),dm(o,l)},d}function rS(o,l,d){d=Qn(-1,d),d.tag=3;var m=o.type.getDerivedStateFromError;if(typeof m=="function"){var w=l.value;d.payload=function(){return m(w)},d.callback=function(){dm(o,l)}}var _=o.stateNode;return _!==null&&typeof _.componentDidCatch=="function"&&(d.callback=function(){dm(o,l),typeof m!="function"&&(Ui===null?Ui=new Set([this]):Ui.add(this));var C=l.stack;this.componentDidCatch(l.value,{componentStack:C!==null?C:""})}),d}function nS(o,l,d){var m=o.pingCache;if(m===null){m=o.pingCache=new l3;var w=new Set;m.set(l,w)}else w=m.get(l),w===void 0&&(w=new Set,m.set(l,w));w.has(d)||(w.add(d),o=_3.bind(null,o,l,d),l.then(o,o))}function iS(o){do{var l;if((l=o.tag===13)&&(l=o.memoizedState,l=l!==null?l.dehydrated!==null:!0),l)return o;o=o.return}while(o!==null);return null}function aS(o,l,d,m,w){return(o.mode&1)===0?(o===l?o.flags|=65536:(o.flags|=128,d.flags|=131072,d.flags&=-52805,d.tag===1&&(d.alternate===null?d.tag=17:(l=Qn(-1,1),l.tag=2,zi(d,l,1))),d.lanes|=1),o):(o.flags|=65536,o.lanes=w,o)}var u3=T.ReactCurrentOwner,vr=!1;function ur(o,l,d,m){l.child=o===null?O_(l,null,d,m):So(l,o.child,d,m)}function oS(o,l,d,m,w){d=d.render;var _=l.ref;return Oo(l,w),m=nm(o,l,d,m,_,w),d=im(),o!==null&&!vr?(l.updateQueue=o.updateQueue,l.flags&=-2053,o.lanes&=~w,Zn(o,l,w)):(ht&&d&&zp(l),l.flags|=1,ur(o,l,m,w),l.child)}function sS(o,l,d,m,w){if(o===null){var _=d.type;return typeof _=="function"&&!$m(_)&&_.defaultProps===void 0&&d.compare===null&&d.defaultProps===void 0?(l.tag=15,l.type=_,lS(o,l,_,m,w)):(o=af(d.type,null,m,l,l.mode,w),o.ref=l.ref,o.return=l,l.child=o)}if(_=o.child,(o.lanes&w)===0){var C=_.memoizedProps;if(d=d.compare,d=d!==null?d:sl,d(C,m)&&o.ref===l.ref)return Zn(o,l,w)}return l.flags|=1,o=Vi(_,m),o.ref=l.ref,o.return=l,l.child=o}function lS(o,l,d,m,w){if(o!==null){var _=o.memoizedProps;if(sl(_,m)&&o.ref===l.ref)if(vr=!1,l.pendingProps=m=_,(o.lanes&w)!==0)(o.flags&131072)!==0&&(vr=!0);else return l.lanes=o.lanes,Zn(o,l,w)}return hm(o,l,d,m,w)}function uS(o,l,d){var m=l.pendingProps,w=m.children,_=o!==null?o.memoizedState:null;if(m.mode==="hidden")if((l.mode&1)===0)l.memoizedState={baseLanes:0,cachePool:null,transitions:null},tt(To,jr),jr|=d;else{if((d&1073741824)===0)return o=_!==null?_.baseLanes|d:d,l.lanes=l.childLanes=1073741824,l.memoizedState={baseLanes:o,cachePool:null,transitions:null},l.updateQueue=null,tt(To,jr),jr|=o,null;l.memoizedState={baseLanes:0,cachePool:null,transitions:null},m=_!==null?_.baseLanes:d,tt(To,jr),jr|=m}else _!==null?(m=_.baseLanes|d,l.memoizedState=null):m=d,tt(To,jr),jr|=m;return ur(o,l,w,d),l.child}function cS(o,l){var d=l.ref;(o===null&&d!==null||o!==null&&o.ref!==d)&&(l.flags|=512,l.flags|=2097152)}function hm(o,l,d,m,w){var _=gr(d)?ga:nr.current;return _=bo(l,_),Oo(l,w),d=nm(o,l,d,m,_,w),m=im(),o!==null&&!vr?(l.updateQueue=o.updateQueue,l.flags&=-2053,o.lanes&=~w,Zn(o,l,w)):(ht&&m&&zp(l),l.flags|=1,ur(o,l,d,w),l.child)}function fS(o,l,d,m,w){if(gr(d)){var _=!0;Tc(l)}else _=!1;if(Oo(l,w),l.stateNode===null)Kc(o,l),Z_(l,d,m),cm(l,d,m,w),m=!0;else if(o===null){var C=l.stateNode,I=l.memoizedProps;C.props=I;var D=C.context,Q=d.contextType;typeof Q=="object"&&Q!==null?Q=Wr(Q):(Q=gr(d)?ga:nr.current,Q=bo(l,Q));var oe=d.getDerivedStateFromProps,se=typeof oe=="function"||typeof C.getSnapshotBeforeUpdate=="function";se||typeof C.UNSAFE_componentWillReceiveProps!="function"&&typeof C.componentWillReceiveProps!="function"||(I!==m||D!==Q)&&eS(l,C,m,Q),Bi=!1;var ae=l.memoizedState;C.state=ae,Dc(l,m,C,w),D=l.memoizedState,I!==m||ae!==D||mr.current||Bi?(typeof oe=="function"&&(um(l,d,oe,m),D=l.memoizedState),(I=Bi||Q_(l,d,I,m,ae,D,Q))?(se||typeof C.UNSAFE_componentWillMount!="function"&&typeof C.componentWillMount!="function"||(typeof C.componentWillMount=="function"&&C.componentWillMount(),typeof C.UNSAFE_componentWillMount=="function"&&C.UNSAFE_componentWillMount()),typeof C.componentDidMount=="function"&&(l.flags|=4194308)):(typeof C.componentDidMount=="function"&&(l.flags|=4194308),l.memoizedProps=m,l.memoizedState=D),C.props=m,C.state=D,C.context=Q,m=I):(typeof C.componentDidMount=="function"&&(l.flags|=4194308),m=!1)}else{C=l.stateNode,A_(o,l),I=l.memoizedProps,Q=l.type===l.elementType?I:un(l.type,I),C.props=Q,se=l.pendingProps,ae=C.context,D=d.contextType,typeof D=="object"&&D!==null?D=Wr(D):(D=gr(d)?ga:nr.current,D=bo(l,D));var me=d.getDerivedStateFromProps;(oe=typeof me=="function"||typeof C.getSnapshotBeforeUpdate=="function")||typeof C.UNSAFE_componentWillReceiveProps!="function"&&typeof C.componentWillReceiveProps!="function"||(I!==se||ae!==D)&&eS(l,C,m,D),Bi=!1,ae=l.memoizedState,C.state=ae,Dc(l,m,C,w);var we=l.memoizedState;I!==se||ae!==we||mr.current||Bi?(typeof me=="function"&&(um(l,d,me,m),we=l.memoizedState),(Q=Bi||Q_(l,d,Q,m,ae,we,D)||!1)?(oe||typeof C.UNSAFE_componentWillUpdate!="function"&&typeof C.componentWillUpdate!="function"||(typeof C.componentWillUpdate=="function"&&C.componentWillUpdate(m,we,D),typeof C.UNSAFE_componentWillUpdate=="function"&&C.UNSAFE_componentWillUpdate(m,we,D)),typeof C.componentDidUpdate=="function"&&(l.flags|=4),typeof C.getSnapshotBeforeUpdate=="function"&&(l.flags|=1024)):(typeof C.componentDidUpdate!="function"||I===o.memoizedProps&&ae===o.memoizedState||(l.flags|=4),typeof C.getSnapshotBeforeUpdate!="function"||I===o.memoizedProps&&ae===o.memoizedState||(l.flags|=1024),l.memoizedProps=m,l.memoizedState=we),C.props=m,C.state=we,C.context=D,m=Q):(typeof C.componentDidUpdate!="function"||I===o.memoizedProps&&ae===o.memoizedState||(l.flags|=4),typeof C.getSnapshotBeforeUpdate!="function"||I===o.memoizedProps&&ae===o.memoizedState||(l.flags|=1024),m=!1)}return pm(o,l,d,m,_,w)}function pm(o,l,d,m,w,_){cS(o,l);var C=(l.flags&128)!==0;if(!m&&!C)return w&&g_(l,d,!1),Zn(o,l,_);m=l.stateNode,u3.current=l;var I=C&&typeof d.getDerivedStateFromError!="function"?null:m.render();return l.flags|=1,o!==null&&C?(l.child=So(l,o.child,null,_),l.child=So(l,null,I,_)):ur(o,l,I,_),l.memoizedState=m.state,w&&g_(l,d,!0),l.child}function dS(o){var l=o.stateNode;l.pendingContext?p_(o,l.pendingContext,l.pendingContext!==l.context):l.context&&p_(o,l.context,!1),Jp(o,l.containerInfo)}function hS(o,l,d,m,w){return _o(),Wp(w),l.flags|=256,ur(o,l,d,m),l.child}var mm={dehydrated:null,treeContext:null,retryLane:0};function gm(o){return{baseLanes:o,cachePool:null,transitions:null}}function pS(o,l,d){var m=l.pendingProps,w=gt.current,_=!1,C=(l.flags&128)!==0,I;if((I=C)||(I=o!==null&&o.memoizedState===null?!1:(w&2)!==0),I?(_=!0,l.flags&=-129):(o===null||o.memoizedState!==null)&&(w|=1),tt(gt,w&1),o===null)return Fp(l),o=l.memoizedState,o!==null&&(o=o.dehydrated,o!==null)?((l.mode&1)===0?l.lanes=1:o.data==="$!"?l.lanes=8:l.lanes=1073741824,null):(C=m.children,o=m.fallback,_?(m=l.mode,_=l.child,C={mode:"hidden",children:C},(m&1)===0&&_!==null?(_.childLanes=0,_.pendingProps=C):_=of(C,m,0,null),o=Ea(o,m,d,null),_.return=l,o.return=l,_.sibling=o,l.child=_,l.child.memoizedState=gm(d),l.memoizedState=mm,o):vm(l,C));if(w=o.memoizedState,w!==null&&(I=w.dehydrated,I!==null))return c3(o,l,C,m,I,w,d);if(_){_=m.fallback,C=l.mode,w=o.child,I=w.sibling;var D={mode:"hidden",children:m.children};return(C&1)===0&&l.child!==w?(m=l.child,m.childLanes=0,m.pendingProps=D,l.deletions=null):(m=Vi(w,D),m.subtreeFlags=w.subtreeFlags&14680064),I!==null?_=Vi(I,_):(_=Ea(_,C,d,null),_.flags|=2),_.return=l,m.return=l,m.sibling=_,l.child=m,m=_,_=l.child,C=o.child.memoizedState,C=C===null?gm(d):{baseLanes:C.baseLanes|d,cachePool:null,transitions:C.transitions},_.memoizedState=C,_.childLanes=o.childLanes&~d,l.memoizedState=mm,m}return _=o.child,o=_.sibling,m=Vi(_,{mode:"visible",children:m.children}),(l.mode&1)===0&&(m.lanes=d),m.return=l,m.sibling=null,o!==null&&(d=l.deletions,d===null?(l.deletions=[o],l.flags|=16):d.push(o)),l.child=m,l.memoizedState=null,m}function vm(o,l){return l=of({mode:"visible",children:l},o.mode,0,null),l.return=o,o.child=l}function Vc(o,l,d,m){return m!==null&&Wp(m),So(l,o.child,null,d),o=vm(l,l.pendingProps.children),o.flags|=2,l.memoizedState=null,o}function c3(o,l,d,m,w,_,C){if(d)return l.flags&256?(l.flags&=-257,m=fm(Error(r(422))),Vc(o,l,C,m)):l.memoizedState!==null?(l.child=o.child,l.flags|=128,null):(_=m.fallback,w=l.mode,m=of({mode:"visible",children:m.children},w,0,null),_=Ea(_,w,C,null),_.flags|=2,m.return=l,_.return=l,m.sibling=_,l.child=m,(l.mode&1)!==0&&So(l,o.child,null,C),l.child.memoizedState=gm(C),l.memoizedState=mm,_);if((l.mode&1)===0)return Vc(o,l,C,null);if(w.data==="$!"){if(m=w.nextSibling&&w.nextSibling.dataset,m)var I=m.dgst;return m=I,_=Error(r(419)),m=fm(_,m,void 0),Vc(o,l,C,m)}if(I=(C&o.childLanes)!==0,vr||I){if(m=Ut,m!==null){switch(C&-C){case 4:w=2;break;case 16:w=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:w=32;break;case 536870912:w=268435456;break;default:w=0}w=(w&(m.suspendedLanes|C))!==0?0:w,w!==0&&w!==_.retryLane&&(_.retryLane=w,Jn(o,w),dn(m,o,w,-1))}return Nm(),m=fm(Error(r(421))),Vc(o,l,C,m)}return w.data==="$?"?(l.flags|=128,l.child=o.child,l=S3.bind(null,o),w._reactRetry=l,null):(o=_.treeContext,Cr=Ii(w.nextSibling),Tr=l,ht=!0,ln=null,o!==null&&(Ur[Fr++]=Xn,Ur[Fr++]=Yn,Ur[Fr++]=va,Xn=o.id,Yn=o.overflow,va=l),l=vm(l,m.children),l.flags|=4096,l)}function mS(o,l,d){o.lanes|=l;var m=o.alternate;m!==null&&(m.lanes|=l),Gp(o.return,l,d)}function ym(o,l,d,m,w){var _=o.memoizedState;_===null?o.memoizedState={isBackwards:l,rendering:null,renderingStartTime:0,last:m,tail:d,tailMode:w}:(_.isBackwards=l,_.rendering=null,_.renderingStartTime=0,_.last=m,_.tail=d,_.tailMode=w)}function gS(o,l,d){var m=l.pendingProps,w=m.revealOrder,_=m.tail;if(ur(o,l,m.children,d),m=gt.current,(m&2)!==0)m=m&1|2,l.flags|=128;else{if(o!==null&&(o.flags&128)!==0)e:for(o=l.child;o!==null;){if(o.tag===13)o.memoizedState!==null&&mS(o,d,l);else if(o.tag===19)mS(o,d,l);else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===l)break e;for(;o.sibling===null;){if(o.return===null||o.return===l)break e;o=o.return}o.sibling.return=o.return,o=o.sibling}m&=1}if(tt(gt,m),(l.mode&1)===0)l.memoizedState=null;else switch(w){case"forwards":for(d=l.child,w=null;d!==null;)o=d.alternate,o!==null&&Bc(o)===null&&(w=d),d=d.sibling;d=w,d===null?(w=l.child,l.child=null):(w=d.sibling,d.sibling=null),ym(l,!1,w,d,_);break;case"backwards":for(d=null,w=l.child,l.child=null;w!==null;){if(o=w.alternate,o!==null&&Bc(o)===null){l.child=w;break}o=w.sibling,w.sibling=d,d=w,w=o}ym(l,!0,d,null,_);break;case"together":ym(l,!1,null,null,void 0);break;default:l.memoizedState=null}return l.child}function Kc(o,l){(l.mode&1)===0&&o!==null&&(o.alternate=null,l.alternate=null,l.flags|=2)}function Zn(o,l,d){if(o!==null&&(l.dependencies=o.dependencies),_a|=l.lanes,(d&l.childLanes)===0)return null;if(o!==null&&l.child!==o.child)throw Error(r(153));if(l.child!==null){for(o=l.child,d=Vi(o,o.pendingProps),l.child=d,d.return=l;o.sibling!==null;)o=o.sibling,d=d.sibling=Vi(o,o.pendingProps),d.return=l;d.sibling=null}return l.child}function f3(o,l,d){switch(l.tag){case 3:dS(l),_o();break;case 5:C_(l);break;case 1:gr(l.type)&&Tc(l);break;case 4:Jp(l,l.stateNode.containerInfo);break;case 10:var m=l.type._context,w=l.memoizedProps.value;tt(Ic,m._currentValue),m._currentValue=w;break;case 13:if(m=l.memoizedState,m!==null)return m.dehydrated!==null?(tt(gt,gt.current&1),l.flags|=128,null):(d&l.child.childLanes)!==0?pS(o,l,d):(tt(gt,gt.current&1),o=Zn(o,l,d),o!==null?o.sibling:null);tt(gt,gt.current&1);break;case 19:if(m=(d&l.childLanes)!==0,(o.flags&128)!==0){if(m)return gS(o,l,d);l.flags|=128}if(w=l.memoizedState,w!==null&&(w.rendering=null,w.tail=null,w.lastEffect=null),tt(gt,gt.current),m)break;return null;case 22:case 23:return l.lanes=0,uS(o,l,d)}return Zn(o,l,d)}var vS,bm,yS,bS;vS=function(o,l){for(var d=l.child;d!==null;){if(d.tag===5||d.tag===6)o.appendChild(d.stateNode);else if(d.tag!==4&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===l)break;for(;d.sibling===null;){if(d.return===null||d.return===l)return;d=d.return}d.sibling.return=d.return,d=d.sibling}},bm=function(){},yS=function(o,l,d,m){var w=o.memoizedProps;if(w!==m){o=l.stateNode,wa(Pn.current);var _=null;switch(d){case"input":w=Ne(o,w),m=Ne(o,m),_=[];break;case"select":w=z({},w,{value:void 0}),m=z({},m,{value:void 0}),_=[];break;case"textarea":w=st(o,w),m=st(o,m),_=[];break;default:typeof w.onClick!="function"&&typeof m.onClick=="function"&&(o.onclick=Ec)}lo(d,m);var C;d=null;for(Q in w)if(!m.hasOwnProperty(Q)&&w.hasOwnProperty(Q)&&w[Q]!=null)if(Q==="style"){var I=w[Q];for(C in I)I.hasOwnProperty(C)&&(d||(d={}),d[C]="")}else Q!=="dangerouslySetInnerHTML"&&Q!=="children"&&Q!=="suppressContentEditableWarning"&&Q!=="suppressHydrationWarning"&&Q!=="autoFocus"&&(i.hasOwnProperty(Q)?_||(_=[]):(_=_||[]).push(Q,null));for(Q in m){var D=m[Q];if(I=w!=null?w[Q]:void 0,m.hasOwnProperty(Q)&&D!==I&&(D!=null||I!=null))if(Q==="style")if(I){for(C in I)!I.hasOwnProperty(C)||D&&D.hasOwnProperty(C)||(d||(d={}),d[C]="");for(C in D)D.hasOwnProperty(C)&&I[C]!==D[C]&&(d||(d={}),d[C]=D[C])}else d||(_||(_=[]),_.push(Q,d)),d=D;else Q==="dangerouslySetInnerHTML"?(D=D?D.__html:void 0,I=I?I.__html:void 0,D!=null&&I!==D&&(_=_||[]).push(Q,D)):Q==="children"?typeof D!="string"&&typeof D!="number"||(_=_||[]).push(Q,""+D):Q!=="suppressContentEditableWarning"&&Q!=="suppressHydrationWarning"&&(i.hasOwnProperty(Q)?(D!=null&&Q==="onScroll"&<("scroll",o),_||I===D||(_=[])):(_=_||[]).push(Q,D))}d&&(_=_||[]).push("style",d);var Q=_;(l.updateQueue=Q)&&(l.flags|=4)}},bS=function(o,l,d,m){d!==m&&(l.flags|=4)};function _l(o,l){if(!ht)switch(o.tailMode){case"hidden":l=o.tail;for(var d=null;l!==null;)l.alternate!==null&&(d=l),l=l.sibling;d===null?o.tail=null:d.sibling=null;break;case"collapsed":d=o.tail;for(var m=null;d!==null;)d.alternate!==null&&(m=d),d=d.sibling;m===null?l||o.tail===null?o.tail=null:o.tail.sibling=null:m.sibling=null}}function ar(o){var l=o.alternate!==null&&o.alternate.child===o.child,d=0,m=0;if(l)for(var w=o.child;w!==null;)d|=w.lanes|w.childLanes,m|=w.subtreeFlags&14680064,m|=w.flags&14680064,w.return=o,w=w.sibling;else for(w=o.child;w!==null;)d|=w.lanes|w.childLanes,m|=w.subtreeFlags,m|=w.flags,w.return=o,w=w.sibling;return o.subtreeFlags|=m,o.childLanes=d,l}function d3(o,l,d){var m=l.pendingProps;switch(qp(l),l.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ar(l),null;case 1:return gr(l.type)&&Pc(),ar(l),null;case 3:return m=l.stateNode,Eo(),ut(mr),ut(nr),em(),m.pendingContext&&(m.context=m.pendingContext,m.pendingContext=null),(o===null||o.child===null)&&(Nc(l)?l.flags|=4:o===null||o.memoizedState.isDehydrated&&(l.flags&256)===0||(l.flags|=1024,ln!==null&&(Cm(ln),ln=null))),bm(o,l),ar(l),null;case 5:Qp(l);var w=wa(vl.current);if(d=l.type,o!==null&&l.stateNode!=null)yS(o,l,d,m,w),o.ref!==l.ref&&(l.flags|=512,l.flags|=2097152);else{if(!m){if(l.stateNode===null)throw Error(r(166));return ar(l),null}if(o=wa(Pn.current),Nc(l)){m=l.stateNode,d=l.type;var _=l.memoizedProps;switch(m[An]=l,m[dl]=_,o=(l.mode&1)!==0,d){case"dialog":lt("cancel",m),lt("close",m);break;case"iframe":case"object":case"embed":lt("load",m);break;case"video":case"audio":for(w=0;w<ul.length;w++)lt(ul[w],m);break;case"source":lt("error",m);break;case"img":case"image":case"link":lt("error",m),lt("load",m);break;case"details":lt("toggle",m);break;case"input":ft(m,_),lt("invalid",m);break;case"select":m._wrapperState={wasMultiple:!!_.multiple},lt("invalid",m);break;case"textarea":Er(m,_),lt("invalid",m)}lo(d,_),w=null;for(var C in _)if(_.hasOwnProperty(C)){var I=_[C];C==="children"?typeof I=="string"?m.textContent!==I&&(_.suppressHydrationWarning!==!0&&Oc(m.textContent,I,o),w=["children",I]):typeof I=="number"&&m.textContent!==""+I&&(_.suppressHydrationWarning!==!0&&Oc(m.textContent,I,o),w=["children",""+I]):i.hasOwnProperty(C)&&I!=null&&C==="onScroll"&<("scroll",m)}switch(d){case"input":Oe(m),pr(m,_,!0);break;case"textarea":Oe(m),ca(m);break;case"select":case"option":break;default:typeof _.onClick=="function"&&(m.onclick=Ec)}m=w,l.updateQueue=m,m!==null&&(l.flags|=4)}else{C=w.nodeType===9?w:w.ownerDocument,o==="http://www.w3.org/1999/xhtml"&&(o=fa(d)),o==="http://www.w3.org/1999/xhtml"?d==="script"?(o=C.createElement("div"),o.innerHTML="<script><\/script>",o=o.removeChild(o.firstChild)):typeof m.is=="string"?o=C.createElement(d,{is:m.is}):(o=C.createElement(d),d==="select"&&(C=o,m.multiple?C.multiple=!0:m.size&&(C.size=m.size))):o=C.createElementNS(o,d),o[An]=l,o[dl]=m,vS(o,l,!1,!1),l.stateNode=o;e:{switch(C=Hs(d,m),d){case"dialog":lt("cancel",o),lt("close",o),w=m;break;case"iframe":case"object":case"embed":lt("load",o),w=m;break;case"video":case"audio":for(w=0;w<ul.length;w++)lt(ul[w],o);w=m;break;case"source":lt("error",o),w=m;break;case"img":case"image":case"link":lt("error",o),lt("load",o),w=m;break;case"details":lt("toggle",o),w=m;break;case"input":ft(o,m),w=Ne(o,m),lt("invalid",o);break;case"option":w=m;break;case"select":o._wrapperState={wasMultiple:!!m.multiple},w=z({},m,{value:void 0}),lt("invalid",o);break;case"textarea":Er(o,m),w=st(o,m),lt("invalid",o);break;default:w=m}lo(d,w),I=w;for(_ in I)if(I.hasOwnProperty(_)){var D=I[_];_==="style"?ac(o,D):_==="dangerouslySetInnerHTML"?(D=D?D.__html:void 0,D!=null&&so(o,D)):_==="children"?typeof D=="string"?(d!=="textarea"||D!=="")&&Br(o,D):typeof D=="number"&&Br(o,""+D):_!=="suppressContentEditableWarning"&&_!=="suppressHydrationWarning"&&_!=="autoFocus"&&(i.hasOwnProperty(_)?D!=null&&_==="onScroll"&<("scroll",o):D!=null&&k(o,_,D,C))}switch(d){case"input":Oe(o),pr(o,m,!1);break;case"textarea":Oe(o),ca(o);break;case"option":m.value!=null&&o.setAttribute("value",""+pe(m.value));break;case"select":o.multiple=!!m.multiple,_=m.value,_!=null?tr(o,!!m.multiple,_,!1):m.defaultValue!=null&&tr(o,!!m.multiple,m.defaultValue,!0);break;default:typeof w.onClick=="function"&&(o.onclick=Ec)}switch(d){case"button":case"input":case"select":case"textarea":m=!!m.autoFocus;break e;case"img":m=!0;break e;default:m=!1}}m&&(l.flags|=4)}l.ref!==null&&(l.flags|=512,l.flags|=2097152)}return ar(l),null;case 6:if(o&&l.stateNode!=null)bS(o,l,o.memoizedProps,m);else{if(typeof m!="string"&&l.stateNode===null)throw Error(r(166));if(d=wa(vl.current),wa(Pn.current),Nc(l)){if(m=l.stateNode,d=l.memoizedProps,m[An]=l,(_=m.nodeValue!==d)&&(o=Tr,o!==null))switch(o.tag){case 3:Oc(m.nodeValue,d,(o.mode&1)!==0);break;case 5:o.memoizedProps.suppressHydrationWarning!==!0&&Oc(m.nodeValue,d,(o.mode&1)!==0)}_&&(l.flags|=4)}else m=(d.nodeType===9?d:d.ownerDocument).createTextNode(m),m[An]=l,l.stateNode=m}return ar(l),null;case 13:if(ut(gt),m=l.memoizedState,o===null||o.memoizedState!==null&&o.memoizedState.dehydrated!==null){if(ht&&Cr!==null&&(l.mode&1)!==0&&(l.flags&128)===0)__(),_o(),l.flags|=98560,_=!1;else if(_=Nc(l),m!==null&&m.dehydrated!==null){if(o===null){if(!_)throw Error(r(318));if(_=l.memoizedState,_=_!==null?_.dehydrated:null,!_)throw Error(r(317));_[An]=l}else _o(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;ar(l),_=!1}else ln!==null&&(Cm(ln),ln=null),_=!0;if(!_)return l.flags&65536?l:null}return(l.flags&128)!==0?(l.lanes=d,l):(m=m!==null,m!==(o!==null&&o.memoizedState!==null)&&m&&(l.child.flags|=8192,(l.mode&1)!==0&&(o===null||(gt.current&1)!==0?Nt===0&&(Nt=3):Nm())),l.updateQueue!==null&&(l.flags|=4),ar(l),null);case 4:return Eo(),bm(o,l),o===null&&cl(l.stateNode.containerInfo),ar(l),null;case 10:return Kp(l.type._context),ar(l),null;case 17:return gr(l.type)&&Pc(),ar(l),null;case 19:if(ut(gt),_=l.memoizedState,_===null)return ar(l),null;if(m=(l.flags&128)!==0,C=_.rendering,C===null)if(m)_l(_,!1);else{if(Nt!==0||o!==null&&(o.flags&128)!==0)for(o=l.child;o!==null;){if(C=Bc(o),C!==null){for(l.flags|=128,_l(_,!1),m=C.updateQueue,m!==null&&(l.updateQueue=m,l.flags|=4),l.subtreeFlags=0,m=d,d=l.child;d!==null;)_=d,o=m,_.flags&=14680066,C=_.alternate,C===null?(_.childLanes=0,_.lanes=o,_.child=null,_.subtreeFlags=0,_.memoizedProps=null,_.memoizedState=null,_.updateQueue=null,_.dependencies=null,_.stateNode=null):(_.childLanes=C.childLanes,_.lanes=C.lanes,_.child=C.child,_.subtreeFlags=0,_.deletions=null,_.memoizedProps=C.memoizedProps,_.memoizedState=C.memoizedState,_.updateQueue=C.updateQueue,_.type=C.type,o=C.dependencies,_.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext}),d=d.sibling;return tt(gt,gt.current&1|2),l.child}o=o.sibling}_.tail!==null&&_t()>Co&&(l.flags|=128,m=!0,_l(_,!1),l.lanes=4194304)}else{if(!m)if(o=Bc(C),o!==null){if(l.flags|=128,m=!0,d=o.updateQueue,d!==null&&(l.updateQueue=d,l.flags|=4),_l(_,!0),_.tail===null&&_.tailMode==="hidden"&&!C.alternate&&!ht)return ar(l),null}else 2*_t()-_.renderingStartTime>Co&&d!==1073741824&&(l.flags|=128,m=!0,_l(_,!1),l.lanes=4194304);_.isBackwards?(C.sibling=l.child,l.child=C):(d=_.last,d!==null?d.sibling=C:l.child=C,_.last=C)}return _.tail!==null?(l=_.tail,_.rendering=l,_.tail=l.sibling,_.renderingStartTime=_t(),l.sibling=null,d=gt.current,tt(gt,m?d&1|2:d&1),l):(ar(l),null);case 22:case 23:return Rm(),m=l.memoizedState!==null,o!==null&&o.memoizedState!==null!==m&&(l.flags|=8192),m&&(l.mode&1)!==0?(jr&1073741824)!==0&&(ar(l),l.subtreeFlags&6&&(l.flags|=8192)):ar(l),null;case 24:return null;case 25:return null}throw Error(r(156,l.tag))}function h3(o,l){switch(qp(l),l.tag){case 1:return gr(l.type)&&Pc(),o=l.flags,o&65536?(l.flags=o&-65537|128,l):null;case 3:return Eo(),ut(mr),ut(nr),em(),o=l.flags,(o&65536)!==0&&(o&128)===0?(l.flags=o&-65537|128,l):null;case 5:return Qp(l),null;case 13:if(ut(gt),o=l.memoizedState,o!==null&&o.dehydrated!==null){if(l.alternate===null)throw Error(r(340));_o()}return o=l.flags,o&65536?(l.flags=o&-65537|128,l):null;case 19:return ut(gt),null;case 4:return Eo(),null;case 10:return Kp(l.type._context),null;case 22:case 23:return Rm(),null;case 24:return null;default:return null}}var Gc=!1,or=!1,p3=typeof WeakSet=="function"?WeakSet:Set,ve=null;function Po(o,l){var d=o.ref;if(d!==null)if(typeof d=="function")try{d(null)}catch(m){yt(o,l,m)}else d.current=null}function wm(o,l,d){try{d()}catch(m){yt(o,l,m)}}var wS=!1;function m3(o,l){if(Rp=pc,o=Q1(),kp(o)){if("selectionStart"in o)var d={start:o.selectionStart,end:o.selectionEnd};else e:{d=(d=o.ownerDocument)&&d.defaultView||window;var m=d.getSelection&&d.getSelection();if(m&&m.rangeCount!==0){d=m.anchorNode;var w=m.anchorOffset,_=m.focusNode;m=m.focusOffset;try{d.nodeType,_.nodeType}catch{d=null;break e}var C=0,I=-1,D=-1,Q=0,oe=0,se=o,ae=null;t:for(;;){for(var me;se!==d||w!==0&&se.nodeType!==3||(I=C+w),se!==_||m!==0&&se.nodeType!==3||(D=C+m),se.nodeType===3&&(C+=se.nodeValue.length),(me=se.firstChild)!==null;)ae=se,se=me;for(;;){if(se===o)break t;if(ae===d&&++Q===w&&(I=C),ae===_&&++oe===m&&(D=C),(me=se.nextSibling)!==null)break;se=ae,ae=se.parentNode}se=me}d=I===-1||D===-1?null:{start:I,end:D}}else d=null}d=d||{start:0,end:0}}else d=null;for(Np={focusedElem:o,selectionRange:d},pc=!1,ve=l;ve!==null;)if(l=ve,o=l.child,(l.subtreeFlags&1028)!==0&&o!==null)o.return=l,ve=o;else for(;ve!==null;){l=ve;try{var we=l.alternate;if((l.flags&1024)!==0)switch(l.tag){case 0:case 11:case 15:break;case 1:if(we!==null){var Se=we.memoizedProps,St=we.memoizedState,X=l.stateNode,q=X.getSnapshotBeforeUpdate(l.elementType===l.type?Se:un(l.type,Se),St);X.__reactInternalSnapshotBeforeUpdate=q}break;case 3:var Y=l.stateNode.containerInfo;Y.nodeType===1?Y.textContent="":Y.nodeType===9&&Y.documentElement&&Y.removeChild(Y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(r(163))}}catch(ce){yt(l,l.return,ce)}if(o=l.sibling,o!==null){o.return=l.return,ve=o;break}ve=l.return}return we=wS,wS=!1,we}function Sl(o,l,d){var m=l.updateQueue;if(m=m!==null?m.lastEffect:null,m!==null){var w=m=m.next;do{if((w.tag&o)===o){var _=w.destroy;w.destroy=void 0,_!==void 0&&wm(l,d,_)}w=w.next}while(w!==m)}}function Xc(o,l){if(l=l.updateQueue,l=l!==null?l.lastEffect:null,l!==null){var d=l=l.next;do{if((d.tag&o)===o){var m=d.create;d.destroy=m()}d=d.next}while(d!==l)}}function xm(o){var l=o.ref;if(l!==null){var d=o.stateNode;switch(o.tag){case 5:o=d;break;default:o=d}typeof l=="function"?l(o):l.current=o}}function xS(o){var l=o.alternate;l!==null&&(o.alternate=null,xS(l)),o.child=null,o.deletions=null,o.sibling=null,o.tag===5&&(l=o.stateNode,l!==null&&(delete l[An],delete l[dl],delete l[Lp],delete l[JM],delete l[QM])),o.stateNode=null,o.return=null,o.dependencies=null,o.memoizedProps=null,o.memoizedState=null,o.pendingProps=null,o.stateNode=null,o.updateQueue=null}function _S(o){return o.tag===5||o.tag===3||o.tag===4}function SS(o){e:for(;;){for(;o.sibling===null;){if(o.return===null||_S(o.return))return null;o=o.return}for(o.sibling.return=o.return,o=o.sibling;o.tag!==5&&o.tag!==6&&o.tag!==18;){if(o.flags&2||o.child===null||o.tag===4)continue e;o.child.return=o,o=o.child}if(!(o.flags&2))return o.stateNode}}function _m(o,l,d){var m=o.tag;if(m===5||m===6)o=o.stateNode,l?d.nodeType===8?d.parentNode.insertBefore(o,l):d.insertBefore(o,l):(d.nodeType===8?(l=d.parentNode,l.insertBefore(o,d)):(l=d,l.appendChild(o)),d=d._reactRootContainer,d!=null||l.onclick!==null||(l.onclick=Ec));else if(m!==4&&(o=o.child,o!==null))for(_m(o,l,d),o=o.sibling;o!==null;)_m(o,l,d),o=o.sibling}function Sm(o,l,d){var m=o.tag;if(m===5||m===6)o=o.stateNode,l?d.insertBefore(o,l):d.appendChild(o);else if(m!==4&&(o=o.child,o!==null))for(Sm(o,l,d),o=o.sibling;o!==null;)Sm(o,l,d),o=o.sibling}var Yt=null,cn=!1;function qi(o,l,d){for(d=d.child;d!==null;)kS(o,l,d),d=d.sibling}function kS(o,l,d){if(En&&typeof En.onCommitFiberUnmount=="function")try{En.onCommitFiberUnmount(lc,d)}catch{}switch(d.tag){case 5:or||Po(d,l);case 6:var m=Yt,w=cn;Yt=null,qi(o,l,d),Yt=m,cn=w,Yt!==null&&(cn?(o=Yt,d=d.stateNode,o.nodeType===8?o.parentNode.removeChild(d):o.removeChild(d)):Yt.removeChild(d.stateNode));break;case 18:Yt!==null&&(cn?(o=Yt,d=d.stateNode,o.nodeType===8?Mp(o.parentNode,d):o.nodeType===1&&Mp(o,d),tl(o)):Mp(Yt,d.stateNode));break;case 4:m=Yt,w=cn,Yt=d.stateNode.containerInfo,cn=!0,qi(o,l,d),Yt=m,cn=w;break;case 0:case 11:case 14:case 15:if(!or&&(m=d.updateQueue,m!==null&&(m=m.lastEffect,m!==null))){w=m=m.next;do{var _=w,C=_.destroy;_=_.tag,C!==void 0&&((_&2)!==0||(_&4)!==0)&&wm(d,l,C),w=w.next}while(w!==m)}qi(o,l,d);break;case 1:if(!or&&(Po(d,l),m=d.stateNode,typeof m.componentWillUnmount=="function"))try{m.props=d.memoizedProps,m.state=d.memoizedState,m.componentWillUnmount()}catch(I){yt(d,l,I)}qi(o,l,d);break;case 21:qi(o,l,d);break;case 22:d.mode&1?(or=(m=or)||d.memoizedState!==null,qi(o,l,d),or=m):qi(o,l,d);break;default:qi(o,l,d)}}function OS(o){var l=o.updateQueue;if(l!==null){o.updateQueue=null;var d=o.stateNode;d===null&&(d=o.stateNode=new p3),l.forEach(function(m){var w=k3.bind(null,o,m);d.has(m)||(d.add(m),m.then(w,w))})}}function fn(o,l){var d=l.deletions;if(d!==null)for(var m=0;m<d.length;m++){var w=d[m];try{var _=o,C=l,I=C;e:for(;I!==null;){switch(I.tag){case 5:Yt=I.stateNode,cn=!1;break e;case 3:Yt=I.stateNode.containerInfo,cn=!0;break e;case 4:Yt=I.stateNode.containerInfo,cn=!0;break e}I=I.return}if(Yt===null)throw Error(r(160));kS(_,C,w),Yt=null,cn=!1;var D=w.alternate;D!==null&&(D.return=null),w.return=null}catch(Q){yt(w,l,Q)}}if(l.subtreeFlags&12854)for(l=l.child;l!==null;)ES(l,o),l=l.sibling}function ES(o,l){var d=o.alternate,m=o.flags;switch(o.tag){case 0:case 11:case 14:case 15:if(fn(l,o),Cn(o),m&4){try{Sl(3,o,o.return),Xc(3,o)}catch(Se){yt(o,o.return,Se)}try{Sl(5,o,o.return)}catch(Se){yt(o,o.return,Se)}}break;case 1:fn(l,o),Cn(o),m&512&&d!==null&&Po(d,d.return);break;case 5:if(fn(l,o),Cn(o),m&512&&d!==null&&Po(d,d.return),o.flags&32){var w=o.stateNode;try{Br(w,"")}catch(Se){yt(o,o.return,Se)}}if(m&4&&(w=o.stateNode,w!=null)){var _=o.memoizedProps,C=d!==null?d.memoizedProps:_,I=o.type,D=o.updateQueue;if(o.updateQueue=null,D!==null)try{I==="input"&&_.type==="radio"&&_.name!=null&&ot(w,_),Hs(I,C);var Q=Hs(I,_);for(C=0;C<D.length;C+=2){var oe=D[C],se=D[C+1];oe==="style"?ac(w,se):oe==="dangerouslySetInnerHTML"?so(w,se):oe==="children"?Br(w,se):k(w,oe,se,Q)}switch(I){case"input":dt(w,_);break;case"textarea":ua(w,_);break;case"select":var ae=w._wrapperState.wasMultiple;w._wrapperState.wasMultiple=!!_.multiple;var me=_.value;me!=null?tr(w,!!_.multiple,me,!1):ae!==!!_.multiple&&(_.defaultValue!=null?tr(w,!!_.multiple,_.defaultValue,!0):tr(w,!!_.multiple,_.multiple?[]:"",!1))}w[dl]=_}catch(Se){yt(o,o.return,Se)}}break;case 6:if(fn(l,o),Cn(o),m&4){if(o.stateNode===null)throw Error(r(162));w=o.stateNode,_=o.memoizedProps;try{w.nodeValue=_}catch(Se){yt(o,o.return,Se)}}break;case 3:if(fn(l,o),Cn(o),m&4&&d!==null&&d.memoizedState.isDehydrated)try{tl(l.containerInfo)}catch(Se){yt(o,o.return,Se)}break;case 4:fn(l,o),Cn(o);break;case 13:fn(l,o),Cn(o),w=o.child,w.flags&8192&&(_=w.memoizedState!==null,w.stateNode.isHidden=_,!_||w.alternate!==null&&w.alternate.memoizedState!==null||(Em=_t())),m&4&&OS(o);break;case 22:if(oe=d!==null&&d.memoizedState!==null,o.mode&1?(or=(Q=or)||oe,fn(l,o),or=Q):fn(l,o),Cn(o),m&8192){if(Q=o.memoizedState!==null,(o.stateNode.isHidden=Q)&&!oe&&(o.mode&1)!==0)for(ve=o,oe=o.child;oe!==null;){for(se=ve=oe;ve!==null;){switch(ae=ve,me=ae.child,ae.tag){case 0:case 11:case 14:case 15:Sl(4,ae,ae.return);break;case 1:Po(ae,ae.return);var we=ae.stateNode;if(typeof we.componentWillUnmount=="function"){m=ae,d=ae.return;try{l=m,we.props=l.memoizedProps,we.state=l.memoizedState,we.componentWillUnmount()}catch(Se){yt(m,d,Se)}}break;case 5:Po(ae,ae.return);break;case 22:if(ae.memoizedState!==null){TS(se);continue}}me!==null?(me.return=ae,ve=me):TS(se)}oe=oe.sibling}e:for(oe=null,se=o;;){if(se.tag===5){if(oe===null){oe=se;try{w=se.stateNode,Q?(_=w.style,typeof _.setProperty=="function"?_.setProperty("display","none","important"):_.display="none"):(I=se.stateNode,D=se.memoizedProps.style,C=D!=null&&D.hasOwnProperty("display")?D.display:null,I.style.display=ic("display",C))}catch(Se){yt(o,o.return,Se)}}}else if(se.tag===6){if(oe===null)try{se.stateNode.nodeValue=Q?"":se.memoizedProps}catch(Se){yt(o,o.return,Se)}}else if((se.tag!==22&&se.tag!==23||se.memoizedState===null||se===o)&&se.child!==null){se.child.return=se,se=se.child;continue}if(se===o)break e;for(;se.sibling===null;){if(se.return===null||se.return===o)break e;oe===se&&(oe=null),se=se.return}oe===se&&(oe=null),se.sibling.return=se.return,se=se.sibling}}break;case 19:fn(l,o),Cn(o),m&4&&OS(o);break;case 21:break;default:fn(l,o),Cn(o)}}function Cn(o){var l=o.flags;if(l&2){try{e:{for(var d=o.return;d!==null;){if(_S(d)){var m=d;break e}d=d.return}throw Error(r(160))}switch(m.tag){case 5:var w=m.stateNode;m.flags&32&&(Br(w,""),m.flags&=-33);var _=SS(o);Sm(o,_,w);break;case 3:case 4:var C=m.stateNode.containerInfo,I=SS(o);_m(o,I,C);break;default:throw Error(r(161))}}catch(D){yt(o,o.return,D)}o.flags&=-3}l&4096&&(o.flags&=-4097)}function g3(o,l,d){ve=o,AS(o)}function AS(o,l,d){for(var m=(o.mode&1)!==0;ve!==null;){var w=ve,_=w.child;if(w.tag===22&&m){var C=w.memoizedState!==null||Gc;if(!C){var I=w.alternate,D=I!==null&&I.memoizedState!==null||or;I=Gc;var Q=or;if(Gc=C,(or=D)&&!Q)for(ve=w;ve!==null;)C=ve,D=C.child,C.tag===22&&C.memoizedState!==null?CS(w):D!==null?(D.return=C,ve=D):CS(w);for(;_!==null;)ve=_,AS(_),_=_.sibling;ve=w,Gc=I,or=Q}PS(o)}else(w.subtreeFlags&8772)!==0&&_!==null?(_.return=w,ve=_):PS(o)}}function PS(o){for(;ve!==null;){var l=ve;if((l.flags&8772)!==0){var d=l.alternate;try{if((l.flags&8772)!==0)switch(l.tag){case 0:case 11:case 15:or||Xc(5,l);break;case 1:var m=l.stateNode;if(l.flags&4&&!or)if(d===null)m.componentDidMount();else{var w=l.elementType===l.type?d.memoizedProps:un(l.type,d.memoizedProps);m.componentDidUpdate(w,d.memoizedState,m.__reactInternalSnapshotBeforeUpdate)}var _=l.updateQueue;_!==null&&T_(l,_,m);break;case 3:var C=l.updateQueue;if(C!==null){if(d=null,l.child!==null)switch(l.child.tag){case 5:d=l.child.stateNode;break;case 1:d=l.child.stateNode}T_(l,C,d)}break;case 5:var I=l.stateNode;if(d===null&&l.flags&4){d=I;var D=l.memoizedProps;switch(l.type){case"button":case"input":case"select":case"textarea":D.autoFocus&&d.focus();break;case"img":D.src&&(d.src=D.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(l.memoizedState===null){var Q=l.alternate;if(Q!==null){var oe=Q.memoizedState;if(oe!==null){var se=oe.dehydrated;se!==null&&tl(se)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(r(163))}or||l.flags&512&&xm(l)}catch(ae){yt(l,l.return,ae)}}if(l===o){ve=null;break}if(d=l.sibling,d!==null){d.return=l.return,ve=d;break}ve=l.return}}function TS(o){for(;ve!==null;){var l=ve;if(l===o){ve=null;break}var d=l.sibling;if(d!==null){d.return=l.return,ve=d;break}ve=l.return}}function CS(o){for(;ve!==null;){var l=ve;try{switch(l.tag){case 0:case 11:case 15:var d=l.return;try{Xc(4,l)}catch(D){yt(l,d,D)}break;case 1:var m=l.stateNode;if(typeof m.componentDidMount=="function"){var w=l.return;try{m.componentDidMount()}catch(D){yt(l,w,D)}}var _=l.return;try{xm(l)}catch(D){yt(l,_,D)}break;case 5:var C=l.return;try{xm(l)}catch(D){yt(l,C,D)}}}catch(D){yt(l,l.return,D)}if(l===o){ve=null;break}var I=l.sibling;if(I!==null){I.return=l.return,ve=I;break}ve=l.return}}var v3=Math.ceil,Yc=T.ReactCurrentDispatcher,km=T.ReactCurrentOwner,Vr=T.ReactCurrentBatchConfig,We=0,Ut=null,At=null,Jt=0,jr=0,To=Mi(0),Nt=0,kl=null,_a=0,Jc=0,Om=0,Ol=null,yr=null,Em=0,Co=1/0,ei=null,Qc=!1,Am=null,Ui=null,Zc=!1,Fi=null,ef=0,El=0,Pm=null,tf=-1,rf=0;function cr(){return(We&6)!==0?_t():tf!==-1?tf:tf=_t()}function Wi(o){return(o.mode&1)===0?1:(We&2)!==0&&Jt!==0?Jt&-Jt:e3.transition!==null?(rf===0&&(rf=S1()),rf):(o=Ye,o!==0||(o=window.event,o=o===void 0?16:R1(o.type)),o)}function dn(o,l,d,m){if(50<El)throw El=0,Pm=null,Error(r(185));Ys(o,d,m),((We&2)===0||o!==Ut)&&(o===Ut&&((We&2)===0&&(Jc|=d),Nt===4&&Hi(o,Jt)),br(o,m),d===1&&We===0&&(l.mode&1)===0&&(Co=_t()+500,Cc&&Di()))}function br(o,l){var d=o.callbackNode;eM(o,l);var m=fc(o,o===Ut?Jt:0);if(m===0)d!==null&&w1(d),o.callbackNode=null,o.callbackPriority=0;else if(l=m&-m,o.callbackPriority!==l){if(d!=null&&w1(d),l===1)o.tag===0?ZM(RS.bind(null,o)):v_(RS.bind(null,o)),XM(function(){(We&6)===0&&Di()}),d=null;else{switch(k1(m)){case 1:d=sp;break;case 4:d=x1;break;case 16:d=sc;break;case 536870912:d=_1;break;default:d=sc}d=zS(d,jS.bind(null,o))}o.callbackPriority=l,o.callbackNode=d}}function jS(o,l){if(tf=-1,rf=0,(We&6)!==0)throw Error(r(327));var d=o.callbackNode;if(jo()&&o.callbackNode!==d)return null;var m=fc(o,o===Ut?Jt:0);if(m===0)return null;if((m&30)!==0||(m&o.expiredLanes)!==0||l)l=nf(o,m);else{l=m;var w=We;We|=2;var _=$S();(Ut!==o||Jt!==l)&&(ei=null,Co=_t()+500,ka(o,l));do try{w3();break}catch(I){NS(o,I)}while(!0);Vp(),Yc.current=_,We=w,At!==null?l=0:(Ut=null,Jt=0,l=Nt)}if(l!==0){if(l===2&&(w=lp(o),w!==0&&(m=w,l=Tm(o,w))),l===1)throw d=kl,ka(o,0),Hi(o,m),br(o,_t()),d;if(l===6)Hi(o,m);else{if(w=o.current.alternate,(m&30)===0&&!y3(w)&&(l=nf(o,m),l===2&&(_=lp(o),_!==0&&(m=_,l=Tm(o,_))),l===1))throw d=kl,ka(o,0),Hi(o,m),br(o,_t()),d;switch(o.finishedWork=w,o.finishedLanes=m,l){case 0:case 1:throw Error(r(345));case 2:Oa(o,yr,ei);break;case 3:if(Hi(o,m),(m&130023424)===m&&(l=Em+500-_t(),10<l)){if(fc(o,0)!==0)break;if(w=o.suspendedLanes,(w&m)!==m){cr(),o.pingedLanes|=o.suspendedLanes&w;break}o.timeoutHandle=Ip(Oa.bind(null,o,yr,ei),l);break}Oa(o,yr,ei);break;case 4:if(Hi(o,m),(m&4194240)===m)break;for(l=o.eventTimes,w=-1;0<m;){var C=31-on(m);_=1<<C,C=l[C],C>w&&(w=C),m&=~_}if(m=w,m=_t()-m,m=(120>m?120:480>m?480:1080>m?1080:1920>m?1920:3e3>m?3e3:4320>m?4320:1960*v3(m/1960))-m,10<m){o.timeoutHandle=Ip(Oa.bind(null,o,yr,ei),m);break}Oa(o,yr,ei);break;case 5:Oa(o,yr,ei);break;default:throw Error(r(329))}}}return br(o,_t()),o.callbackNode===d?jS.bind(null,o):null}function Tm(o,l){var d=Ol;return o.current.memoizedState.isDehydrated&&(ka(o,l).flags|=256),o=nf(o,l),o!==2&&(l=yr,yr=d,l!==null&&Cm(l)),o}function Cm(o){yr===null?yr=o:yr.push.apply(yr,o)}function y3(o){for(var l=o;;){if(l.flags&16384){var d=l.updateQueue;if(d!==null&&(d=d.stores,d!==null))for(var m=0;m<d.length;m++){var w=d[m],_=w.getSnapshot;w=w.value;try{if(!sn(_(),w))return!1}catch{return!1}}}if(d=l.child,l.subtreeFlags&16384&&d!==null)d.return=l,l=d;else{if(l===o)break;for(;l.sibling===null;){if(l.return===null||l.return===o)return!0;l=l.return}l.sibling.return=l.return,l=l.sibling}}return!0}function Hi(o,l){for(l&=~Om,l&=~Jc,o.suspendedLanes|=l,o.pingedLanes&=~l,o=o.expirationTimes;0<l;){var d=31-on(l),m=1<<d;o[d]=-1,l&=~m}}function RS(o){if((We&6)!==0)throw Error(r(327));jo();var l=fc(o,0);if((l&1)===0)return br(o,_t()),null;var d=nf(o,l);if(o.tag!==0&&d===2){var m=lp(o);m!==0&&(l=m,d=Tm(o,m))}if(d===1)throw d=kl,ka(o,0),Hi(o,l),br(o,_t()),d;if(d===6)throw Error(r(345));return o.finishedWork=o.current.alternate,o.finishedLanes=l,Oa(o,yr,ei),br(o,_t()),null}function jm(o,l){var d=We;We|=1;try{return o(l)}finally{We=d,We===0&&(Co=_t()+500,Cc&&Di())}}function Sa(o){Fi!==null&&Fi.tag===0&&(We&6)===0&&jo();var l=We;We|=1;var d=Vr.transition,m=Ye;try{if(Vr.transition=null,Ye=1,o)return o()}finally{Ye=m,Vr.transition=d,We=l,(We&6)===0&&Di()}}function Rm(){jr=To.current,ut(To)}function ka(o,l){o.finishedWork=null,o.finishedLanes=0;var d=o.timeoutHandle;if(d!==-1&&(o.timeoutHandle=-1,GM(d)),At!==null)for(d=At.return;d!==null;){var m=d;switch(qp(m),m.tag){case 1:m=m.type.childContextTypes,m!=null&&Pc();break;case 3:Eo(),ut(mr),ut(nr),em();break;case 5:Qp(m);break;case 4:Eo();break;case 13:ut(gt);break;case 19:ut(gt);break;case 10:Kp(m.type._context);break;case 22:case 23:Rm()}d=d.return}if(Ut=o,At=o=Vi(o.current,null),Jt=jr=l,Nt=0,kl=null,Om=Jc=_a=0,yr=Ol=null,ba!==null){for(l=0;l<ba.length;l++)if(d=ba[l],m=d.interleaved,m!==null){d.interleaved=null;var w=m.next,_=d.pending;if(_!==null){var C=_.next;_.next=w,m.next=C}d.pending=m}ba=null}return o}function NS(o,l){do{var d=At;try{if(Vp(),zc.current=Wc,qc){for(var m=vt.memoizedState;m!==null;){var w=m.queue;w!==null&&(w.pending=null),m=m.next}qc=!1}if(xa=0,qt=Rt=vt=null,yl=!1,bl=0,km.current=null,d===null||d.return===null){Nt=1,kl=l,At=null;break}e:{var _=o,C=d.return,I=d,D=l;if(l=Jt,I.flags|=32768,D!==null&&typeof D=="object"&&typeof D.then=="function"){var Q=D,oe=I,se=oe.tag;if((oe.mode&1)===0&&(se===0||se===11||se===15)){var ae=oe.alternate;ae?(oe.updateQueue=ae.updateQueue,oe.memoizedState=ae.memoizedState,oe.lanes=ae.lanes):(oe.updateQueue=null,oe.memoizedState=null)}var me=iS(C);if(me!==null){me.flags&=-257,aS(me,C,I,_,l),me.mode&1&&nS(_,Q,l),l=me,D=Q;var we=l.updateQueue;if(we===null){var Se=new Set;Se.add(D),l.updateQueue=Se}else we.add(D);break e}else{if((l&1)===0){nS(_,Q,l),Nm();break e}D=Error(r(426))}}else if(ht&&I.mode&1){var St=iS(C);if(St!==null){(St.flags&65536)===0&&(St.flags|=256),aS(St,C,I,_,l),Wp(Ao(D,I));break e}}_=D=Ao(D,I),Nt!==4&&(Nt=2),Ol===null?Ol=[_]:Ol.push(_),_=C;do{switch(_.tag){case 3:_.flags|=65536,l&=-l,_.lanes|=l;var X=tS(_,D,l);P_(_,X);break e;case 1:I=D;var q=_.type,Y=_.stateNode;if((_.flags&128)===0&&(typeof q.getDerivedStateFromError=="function"||Y!==null&&typeof Y.componentDidCatch=="function"&&(Ui===null||!Ui.has(Y)))){_.flags|=65536,l&=-l,_.lanes|=l;var ce=rS(_,I,l);P_(_,ce);break e}}_=_.return}while(_!==null)}MS(d)}catch(ke){l=ke,At===d&&d!==null&&(At=d=d.return);continue}break}while(!0)}function $S(){var o=Yc.current;return Yc.current=Wc,o===null?Wc:o}function Nm(){(Nt===0||Nt===3||Nt===2)&&(Nt=4),Ut===null||(_a&268435455)===0&&(Jc&268435455)===0||Hi(Ut,Jt)}function nf(o,l){var d=We;We|=2;var m=$S();(Ut!==o||Jt!==l)&&(ei=null,ka(o,l));do try{b3();break}catch(w){NS(o,w)}while(!0);if(Vp(),We=d,Yc.current=m,At!==null)throw Error(r(261));return Ut=null,Jt=0,Nt}function b3(){for(;At!==null;)IS(At)}function w3(){for(;At!==null&&!HI();)IS(At)}function IS(o){var l=BS(o.alternate,o,jr);o.memoizedProps=o.pendingProps,l===null?MS(o):At=l,km.current=null}function MS(o){var l=o;do{var d=l.alternate;if(o=l.return,(l.flags&32768)===0){if(d=d3(d,l,jr),d!==null){At=d;return}}else{if(d=h3(d,l),d!==null){d.flags&=32767,At=d;return}if(o!==null)o.flags|=32768,o.subtreeFlags=0,o.deletions=null;else{Nt=6,At=null;return}}if(l=l.sibling,l!==null){At=l;return}At=l=o}while(l!==null);Nt===0&&(Nt=5)}function Oa(o,l,d){var m=Ye,w=Vr.transition;try{Vr.transition=null,Ye=1,x3(o,l,d,m)}finally{Vr.transition=w,Ye=m}return null}function x3(o,l,d,m){do jo();while(Fi!==null);if((We&6)!==0)throw Error(r(327));d=o.finishedWork;var w=o.finishedLanes;if(d===null)return null;if(o.finishedWork=null,o.finishedLanes=0,d===o.current)throw Error(r(177));o.callbackNode=null,o.callbackPriority=0;var _=d.lanes|d.childLanes;if(tM(o,_),o===Ut&&(At=Ut=null,Jt=0),(d.subtreeFlags&2064)===0&&(d.flags&2064)===0||Zc||(Zc=!0,zS(sc,function(){return jo(),null})),_=(d.flags&15990)!==0,(d.subtreeFlags&15990)!==0||_){_=Vr.transition,Vr.transition=null;var C=Ye;Ye=1;var I=We;We|=4,km.current=null,m3(o,d),ES(d,o),qM(Np),pc=!!Rp,Np=Rp=null,o.current=d,g3(d),VI(),We=I,Ye=C,Vr.transition=_}else o.current=d;if(Zc&&(Zc=!1,Fi=o,ef=w),_=o.pendingLanes,_===0&&(Ui=null),XI(d.stateNode),br(o,_t()),l!==null)for(m=o.onRecoverableError,d=0;d<l.length;d++)w=l[d],m(w.value,{componentStack:w.stack,digest:w.digest});if(Qc)throw Qc=!1,o=Am,Am=null,o;return(ef&1)!==0&&o.tag!==0&&jo(),_=o.pendingLanes,(_&1)!==0?o===Pm?El++:(El=0,Pm=o):El=0,Di(),null}function jo(){if(Fi!==null){var o=k1(ef),l=Vr.transition,d=Ye;try{if(Vr.transition=null,Ye=16>o?16:o,Fi===null)var m=!1;else{if(o=Fi,Fi=null,ef=0,(We&6)!==0)throw Error(r(331));var w=We;for(We|=4,ve=o.current;ve!==null;){var _=ve,C=_.child;if((ve.flags&16)!==0){var I=_.deletions;if(I!==null){for(var D=0;D<I.length;D++){var Q=I[D];for(ve=Q;ve!==null;){var oe=ve;switch(oe.tag){case 0:case 11:case 15:Sl(8,oe,_)}var se=oe.child;if(se!==null)se.return=oe,ve=se;else for(;ve!==null;){oe=ve;var ae=oe.sibling,me=oe.return;if(xS(oe),oe===Q){ve=null;break}if(ae!==null){ae.return=me,ve=ae;break}ve=me}}}var we=_.alternate;if(we!==null){var Se=we.child;if(Se!==null){we.child=null;do{var St=Se.sibling;Se.sibling=null,Se=St}while(Se!==null)}}ve=_}}if((_.subtreeFlags&2064)!==0&&C!==null)C.return=_,ve=C;else e:for(;ve!==null;){if(_=ve,(_.flags&2048)!==0)switch(_.tag){case 0:case 11:case 15:Sl(9,_,_.return)}var X=_.sibling;if(X!==null){X.return=_.return,ve=X;break e}ve=_.return}}var q=o.current;for(ve=q;ve!==null;){C=ve;var Y=C.child;if((C.subtreeFlags&2064)!==0&&Y!==null)Y.return=C,ve=Y;else e:for(C=q;ve!==null;){if(I=ve,(I.flags&2048)!==0)try{switch(I.tag){case 0:case 11:case 15:Xc(9,I)}}catch(ke){yt(I,I.return,ke)}if(I===C){ve=null;break e}var ce=I.sibling;if(ce!==null){ce.return=I.return,ve=ce;break e}ve=I.return}}if(We=w,Di(),En&&typeof En.onPostCommitFiberRoot=="function")try{En.onPostCommitFiberRoot(lc,o)}catch{}m=!0}return m}finally{Ye=d,Vr.transition=l}}return!1}function LS(o,l,d){l=Ao(d,l),l=tS(o,l,1),o=zi(o,l,1),l=cr(),o!==null&&(Ys(o,1,l),br(o,l))}function yt(o,l,d){if(o.tag===3)LS(o,o,d);else for(;l!==null;){if(l.tag===3){LS(l,o,d);break}else if(l.tag===1){var m=l.stateNode;if(typeof l.type.getDerivedStateFromError=="function"||typeof m.componentDidCatch=="function"&&(Ui===null||!Ui.has(m))){o=Ao(d,o),o=rS(l,o,1),l=zi(l,o,1),o=cr(),l!==null&&(Ys(l,1,o),br(l,o));break}}l=l.return}}function _3(o,l,d){var m=o.pingCache;m!==null&&m.delete(l),l=cr(),o.pingedLanes|=o.suspendedLanes&d,Ut===o&&(Jt&d)===d&&(Nt===4||Nt===3&&(Jt&130023424)===Jt&&500>_t()-Em?ka(o,0):Om|=d),br(o,l)}function DS(o,l){l===0&&((o.mode&1)===0?l=1:(l=cc,cc<<=1,(cc&130023424)===0&&(cc=4194304)));var d=cr();o=Jn(o,l),o!==null&&(Ys(o,l,d),br(o,d))}function S3(o){var l=o.memoizedState,d=0;l!==null&&(d=l.retryLane),DS(o,d)}function k3(o,l){var d=0;switch(o.tag){case 13:var m=o.stateNode,w=o.memoizedState;w!==null&&(d=w.retryLane);break;case 19:m=o.stateNode;break;default:throw Error(r(314))}m!==null&&m.delete(l),DS(o,d)}var BS;BS=function(o,l,d){if(o!==null)if(o.memoizedProps!==l.pendingProps||mr.current)vr=!0;else{if((o.lanes&d)===0&&(l.flags&128)===0)return vr=!1,f3(o,l,d);vr=(o.flags&131072)!==0}else vr=!1,ht&&(l.flags&1048576)!==0&&y_(l,Rc,l.index);switch(l.lanes=0,l.tag){case 2:var m=l.type;Kc(o,l),o=l.pendingProps;var w=bo(l,nr.current);Oo(l,d),w=nm(null,l,m,o,w,d);var _=im();return l.flags|=1,typeof w=="object"&&w!==null&&typeof w.render=="function"&&w.$$typeof===void 0?(l.tag=1,l.memoizedState=null,l.updateQueue=null,gr(m)?(_=!0,Tc(l)):_=!1,l.memoizedState=w.state!==null&&w.state!==void 0?w.state:null,Yp(l),w.updater=Hc,l.stateNode=w,w._reactInternals=l,cm(l,m,o,d),l=pm(null,l,m,!0,_,d)):(l.tag=0,ht&&_&&zp(l),ur(null,l,w,d),l=l.child),l;case 16:m=l.elementType;e:{switch(Kc(o,l),o=l.pendingProps,w=m._init,m=w(m._payload),l.type=m,w=l.tag=E3(m),o=un(m,o),w){case 0:l=hm(null,l,m,o,d);break e;case 1:l=fS(null,l,m,o,d);break e;case 11:l=oS(null,l,m,o,d);break e;case 14:l=sS(null,l,m,un(m.type,o),d);break e}throw Error(r(306,m,""))}return l;case 0:return m=l.type,w=l.pendingProps,w=l.elementType===m?w:un(m,w),hm(o,l,m,w,d);case 1:return m=l.type,w=l.pendingProps,w=l.elementType===m?w:un(m,w),fS(o,l,m,w,d);case 3:e:{if(dS(l),o===null)throw Error(r(387));m=l.pendingProps,_=l.memoizedState,w=_.element,A_(o,l),Dc(l,m,null,d);var C=l.memoizedState;if(m=C.element,_.isDehydrated)if(_={element:m,isDehydrated:!1,cache:C.cache,pendingSuspenseBoundaries:C.pendingSuspenseBoundaries,transitions:C.transitions},l.updateQueue.baseState=_,l.memoizedState=_,l.flags&256){w=Ao(Error(r(423)),l),l=hS(o,l,m,d,w);break e}else if(m!==w){w=Ao(Error(r(424)),l),l=hS(o,l,m,d,w);break e}else for(Cr=Ii(l.stateNode.containerInfo.firstChild),Tr=l,ht=!0,ln=null,d=O_(l,null,m,d),l.child=d;d;)d.flags=d.flags&-3|4096,d=d.sibling;else{if(_o(),m===w){l=Zn(o,l,d);break e}ur(o,l,m,d)}l=l.child}return l;case 5:return C_(l),o===null&&Fp(l),m=l.type,w=l.pendingProps,_=o!==null?o.memoizedProps:null,C=w.children,$p(m,w)?C=null:_!==null&&$p(m,_)&&(l.flags|=32),cS(o,l),ur(o,l,C,d),l.child;case 6:return o===null&&Fp(l),null;case 13:return pS(o,l,d);case 4:return Jp(l,l.stateNode.containerInfo),m=l.pendingProps,o===null?l.child=So(l,null,m,d):ur(o,l,m,d),l.child;case 11:return m=l.type,w=l.pendingProps,w=l.elementType===m?w:un(m,w),oS(o,l,m,w,d);case 7:return ur(o,l,l.pendingProps,d),l.child;case 8:return ur(o,l,l.pendingProps.children,d),l.child;case 12:return ur(o,l,l.pendingProps.children,d),l.child;case 10:e:{if(m=l.type._context,w=l.pendingProps,_=l.memoizedProps,C=w.value,tt(Ic,m._currentValue),m._currentValue=C,_!==null)if(sn(_.value,C)){if(_.children===w.children&&!mr.current){l=Zn(o,l,d);break e}}else for(_=l.child,_!==null&&(_.return=l);_!==null;){var I=_.dependencies;if(I!==null){C=_.child;for(var D=I.firstContext;D!==null;){if(D.context===m){if(_.tag===1){D=Qn(-1,d&-d),D.tag=2;var Q=_.updateQueue;if(Q!==null){Q=Q.shared;var oe=Q.pending;oe===null?D.next=D:(D.next=oe.next,oe.next=D),Q.pending=D}}_.lanes|=d,D=_.alternate,D!==null&&(D.lanes|=d),Gp(_.return,d,l),I.lanes|=d;break}D=D.next}}else if(_.tag===10)C=_.type===l.type?null:_.child;else if(_.tag===18){if(C=_.return,C===null)throw Error(r(341));C.lanes|=d,I=C.alternate,I!==null&&(I.lanes|=d),Gp(C,d,l),C=_.sibling}else C=_.child;if(C!==null)C.return=_;else for(C=_;C!==null;){if(C===l){C=null;break}if(_=C.sibling,_!==null){_.return=C.return,C=_;break}C=C.return}_=C}ur(o,l,w.children,d),l=l.child}return l;case 9:return w=l.type,m=l.pendingProps.children,Oo(l,d),w=Wr(w),m=m(w),l.flags|=1,ur(o,l,m,d),l.child;case 14:return m=l.type,w=un(m,l.pendingProps),w=un(m.type,w),sS(o,l,m,w,d);case 15:return lS(o,l,l.type,l.pendingProps,d);case 17:return m=l.type,w=l.pendingProps,w=l.elementType===m?w:un(m,w),Kc(o,l),l.tag=1,gr(m)?(o=!0,Tc(l)):o=!1,Oo(l,d),Z_(l,m,w),cm(l,m,w,d),pm(null,l,m,!0,o,d);case 19:return gS(o,l,d);case 22:return uS(o,l,d)}throw Error(r(156,l.tag))};function zS(o,l){return b1(o,l)}function O3(o,l,d,m){this.tag=o,this.key=d,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=l,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=m,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Kr(o,l,d,m){return new O3(o,l,d,m)}function $m(o){return o=o.prototype,!(!o||!o.isReactComponent)}function E3(o){if(typeof o=="function")return $m(o)?1:0;if(o!=null){if(o=o.$$typeof,o===B)return 11;if(o===V)return 14}return 2}function Vi(o,l){var d=o.alternate;return d===null?(d=Kr(o.tag,l,o.key,o.mode),d.elementType=o.elementType,d.type=o.type,d.stateNode=o.stateNode,d.alternate=o,o.alternate=d):(d.pendingProps=l,d.type=o.type,d.flags=0,d.subtreeFlags=0,d.deletions=null),d.flags=o.flags&14680064,d.childLanes=o.childLanes,d.lanes=o.lanes,d.child=o.child,d.memoizedProps=o.memoizedProps,d.memoizedState=o.memoizedState,d.updateQueue=o.updateQueue,l=o.dependencies,d.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext},d.sibling=o.sibling,d.index=o.index,d.ref=o.ref,d}function af(o,l,d,m,w,_){var C=2;if(m=o,typeof o=="function")$m(o)&&(C=1);else if(typeof o=="string")C=5;else e:switch(o){case j:return Ea(d.children,w,_,l);case R:C=8,w|=8;break;case M:return o=Kr(12,d,l,w|2),o.elementType=M,o.lanes=_,o;case F:return o=Kr(13,d,l,w),o.elementType=F,o.lanes=_,o;case J:return o=Kr(19,d,l,w),o.elementType=J,o.lanes=_,o;case Z:return of(d,w,_,l);default:if(typeof o=="object"&&o!==null)switch(o.$$typeof){case H:C=10;break e;case U:C=9;break e;case B:C=11;break e;case V:C=14;break e;case K:C=16,m=null;break e}throw Error(r(130,o==null?o:typeof o,""))}return l=Kr(C,d,l,w),l.elementType=o,l.type=m,l.lanes=_,l}function Ea(o,l,d,m){return o=Kr(7,o,m,l),o.lanes=d,o}function of(o,l,d,m){return o=Kr(22,o,m,l),o.elementType=Z,o.lanes=d,o.stateNode={isHidden:!1},o}function Im(o,l,d){return o=Kr(6,o,null,l),o.lanes=d,o}function Mm(o,l,d){return l=Kr(4,o.children!==null?o.children:[],o.key,l),l.lanes=d,l.stateNode={containerInfo:o.containerInfo,pendingChildren:null,implementation:o.implementation},l}function A3(o,l,d,m,w){this.tag=l,this.containerInfo=o,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=up(0),this.expirationTimes=up(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=up(0),this.identifierPrefix=m,this.onRecoverableError=w,this.mutableSourceEagerHydrationData=null}function Lm(o,l,d,m,w,_,C,I,D){return o=new A3(o,l,d,I,D),l===1?(l=1,_===!0&&(l|=8)):l=0,_=Kr(3,null,null,l),o.current=_,_.stateNode=o,_.memoizedState={element:m,isDehydrated:d,cache:null,transitions:null,pendingSuspenseBoundaries:null},Yp(_),o}function P3(o,l,d){var m=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:A,key:m==null?null:""+m,children:o,containerInfo:l,implementation:d}}function qS(o){if(!o)return Li;o=o._reactInternals;e:{if(pa(o)!==o||o.tag!==1)throw Error(r(170));var l=o;do{switch(l.tag){case 3:l=l.stateNode.context;break e;case 1:if(gr(l.type)){l=l.stateNode.__reactInternalMemoizedMergedChildContext;break e}}l=l.return}while(l!==null);throw Error(r(171))}if(o.tag===1){var d=o.type;if(gr(d))return m_(o,d,l)}return l}function US(o,l,d,m,w,_,C,I,D){return o=Lm(d,m,!0,o,w,_,C,I,D),o.context=qS(null),d=o.current,m=cr(),w=Wi(d),_=Qn(m,w),_.callback=l??null,zi(d,_,w),o.current.lanes=w,Ys(o,w,m),br(o,m),o}function sf(o,l,d,m){var w=l.current,_=cr(),C=Wi(w);return d=qS(d),l.context===null?l.context=d:l.pendingContext=d,l=Qn(_,C),l.payload={element:o},m=m===void 0?null:m,m!==null&&(l.callback=m),o=zi(w,l,C),o!==null&&(dn(o,w,C,_),Lc(o,w,C)),C}function lf(o){if(o=o.current,!o.child)return null;switch(o.child.tag){case 5:return o.child.stateNode;default:return o.child.stateNode}}function FS(o,l){if(o=o.memoizedState,o!==null&&o.dehydrated!==null){var d=o.retryLane;o.retryLane=d!==0&&d<l?d:l}}function Dm(o,l){FS(o,l),(o=o.alternate)&&FS(o,l)}function T3(){return null}var WS=typeof reportError=="function"?reportError:function(o){console.error(o)};function Bm(o){this._internalRoot=o}uf.prototype.render=Bm.prototype.render=function(o){var l=this._internalRoot;if(l===null)throw Error(r(409));sf(o,l,null,null)},uf.prototype.unmount=Bm.prototype.unmount=function(){var o=this._internalRoot;if(o!==null){this._internalRoot=null;var l=o.containerInfo;Sa(function(){sf(null,o,null,null)}),l[Kn]=null}};function uf(o){this._internalRoot=o}uf.prototype.unstable_scheduleHydration=function(o){if(o){var l=A1();o={blockedOn:null,target:o,priority:l};for(var d=0;d<Ri.length&&l!==0&&l<Ri[d].priority;d++);Ri.splice(d,0,o),d===0&&C1(o)}};function zm(o){return!(!o||o.nodeType!==1&&o.nodeType!==9&&o.nodeType!==11)}function cf(o){return!(!o||o.nodeType!==1&&o.nodeType!==9&&o.nodeType!==11&&(o.nodeType!==8||o.nodeValue!==" react-mount-point-unstable "))}function HS(){}function C3(o,l,d,m,w){if(w){if(typeof m=="function"){var _=m;m=function(){var Q=lf(C);_.call(Q)}}var C=US(l,m,o,0,null,!1,!1,"",HS);return o._reactRootContainer=C,o[Kn]=C.current,cl(o.nodeType===8?o.parentNode:o),Sa(),C}for(;w=o.lastChild;)o.removeChild(w);if(typeof m=="function"){var I=m;m=function(){var Q=lf(D);I.call(Q)}}var D=Lm(o,0,!1,null,null,!1,!1,"",HS);return o._reactRootContainer=D,o[Kn]=D.current,cl(o.nodeType===8?o.parentNode:o),Sa(function(){sf(l,D,d,m)}),D}function ff(o,l,d,m,w){var _=d._reactRootContainer;if(_){var C=_;if(typeof w=="function"){var I=w;w=function(){var D=lf(C);I.call(D)}}sf(l,C,o,w)}else C=C3(d,l,o,w,m);return lf(C)}O1=function(o){switch(o.tag){case 3:var l=o.stateNode;if(l.current.memoizedState.isDehydrated){var d=Xs(l.pendingLanes);d!==0&&(cp(l,d|1),br(l,_t()),(We&6)===0&&(Co=_t()+500,Di()))}break;case 13:Sa(function(){var m=Jn(o,1);if(m!==null){var w=cr();dn(m,o,1,w)}}),Dm(o,1)}},fp=function(o){if(o.tag===13){var l=Jn(o,134217728);if(l!==null){var d=cr();dn(l,o,134217728,d)}Dm(o,134217728)}},E1=function(o){if(o.tag===13){var l=Wi(o),d=Jn(o,l);if(d!==null){var m=cr();dn(d,o,l,m)}Dm(o,l)}},A1=function(){return Ye},P1=function(o,l){var d=Ye;try{return Ye=o,l()}finally{Ye=d}},Vs=function(o,l,d){switch(l){case"input":if(dt(o,d),l=d.name,d.type==="radio"&&l!=null){for(d=o;d.parentNode;)d=d.parentNode;for(d=d.querySelectorAll("input[name="+JSON.stringify(""+l)+'][type="radio"]'),l=0;l<d.length;l++){var m=d[l];if(m!==o&&m.form===o.form){var w=Ac(m);if(!w)throw Error(r(90));ie(m),dt(m,w)}}}break;case"textarea":ua(o,d);break;case"select":l=d.value,l!=null&&tr(o,!!d.multiple,l,!1)}},jt=jm,rr=Sa;var j3={usingClientEntryPoint:!1,Events:[hl,vo,Ac,Ie,xt,jm]},Al={findFiberByHostInstance:ma,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},R3={bundleType:Al.bundleType,version:Al.version,rendererPackageName:Al.rendererPackageName,rendererConfig:Al.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:T.ReactCurrentDispatcher,findHostInstanceByFiber:function(o){return o=v1(o),o===null?null:o.stateNode},findFiberByHostInstance:Al.findFiberByHostInstance||T3,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 df=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!df.isDisabled&&df.supportsFiber)try{lc=df.inject(R3),En=df}catch{}}return wr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=j3,wr.createPortal=function(o,l){var d=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!zm(l))throw Error(r(200));return P3(o,l,null,d)},wr.createRoot=function(o,l){if(!zm(o))throw Error(r(299));var d=!1,m="",w=WS;return l!=null&&(l.unstable_strictMode===!0&&(d=!0),l.identifierPrefix!==void 0&&(m=l.identifierPrefix),l.onRecoverableError!==void 0&&(w=l.onRecoverableError)),l=Lm(o,1,!1,null,null,d,!1,m,w),o[Kn]=l.current,cl(o.nodeType===8?o.parentNode:o),new Bm(l)},wr.findDOMNode=function(o){if(o==null)return null;if(o.nodeType===1)return o;var l=o._reactInternals;if(l===void 0)throw typeof o.render=="function"?Error(r(188)):(o=Object.keys(o).join(","),Error(r(268,o)));return o=v1(l),o=o===null?null:o.stateNode,o},wr.flushSync=function(o){return Sa(o)},wr.hydrate=function(o,l,d){if(!cf(l))throw Error(r(200));return ff(null,o,l,!0,d)},wr.hydrateRoot=function(o,l,d){if(!zm(o))throw Error(r(405));var m=d!=null&&d.hydratedSources||null,w=!1,_="",C=WS;if(d!=null&&(d.unstable_strictMode===!0&&(w=!0),d.identifierPrefix!==void 0&&(_=d.identifierPrefix),d.onRecoverableError!==void 0&&(C=d.onRecoverableError)),l=US(l,null,o,1,d??null,w,!1,_,C),o[Kn]=l.current,cl(o),m)for(o=0;o<m.length;o++)d=m[o],w=d._getVersion,w=w(d._source),l.mutableSourceEagerHydrationData==null?l.mutableSourceEagerHydrationData=[d,w]:l.mutableSourceEagerHydrationData.push(d,w);return new uf(l)},wr.render=function(o,l,d){if(!cf(l))throw Error(r(200));return ff(null,o,l,!1,d)},wr.unmountComponentAtNode=function(o){if(!cf(o))throw Error(r(40));return o._reactRootContainer?(Sa(function(){ff(null,null,o,!1,function(){o._reactRootContainer=null,o[Kn]=null})}),!0):!1},wr.unstable_batchedUpdates=jm,wr.unstable_renderSubtreeIntoContainer=function(o,l,d,m){if(!cf(d))throw Error(r(200));if(o==null||o._reactInternals===void 0)throw Error(r(38));return ff(o,l,d,!1,m)},wr.version="18.3.1-next-f1338f8080-20240426",wr}var ZS;function JC(){if(ZS)return Fm.exports;ZS=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),Fm.exports=q3(),Fm.exports}var ek;function U3(){if(ek)return pf;ek=1;var t=JC();return pf.createRoot=t.createRoot,pf.hydrateRoot=t.hydrateRoot,pf}var F3=U3();/**
|
|
41
|
-
* react-router v7.16.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
|
-
*/var tk="popstate";function rk(t){return typeof t=="object"&&t!=null&&"pathname"in t&&"search"in t&&"hash"in t&&"state"in t&&"key"in t}function W3(t={}){function e(n,i){var f;let a=(f=i.state)==null?void 0:f.masked,{pathname:s,search:u,hash:c}=a||n.location;return ib("",{pathname:s,search:u,hash:c},i.state&&i.state.usr||null,i.state&&i.state.key||"default",a?{pathname:n.location.pathname,search:n.location.search,hash:n.location.hash}:void 0)}function r(n,i){return typeof i=="string"?i:au(i)}return V3(e,r,null,t)}function mt(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function kn(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function H3(){return Math.random().toString(36).substring(2,10)}function nk(t,e){return{usr:t.state,key:t.key,idx:e,masked:t.mask?{pathname:t.pathname,search:t.search,hash:t.hash}:void 0}}function ib(t,e,r=null,n,i){return{pathname:typeof t=="string"?t:t.pathname,search:"",hash:"",...typeof e=="string"?js(e):e,state:r,key:e&&e.key||n||H3(),mask:i}}function au({pathname:t="/",search:e="",hash:r=""}){return e&&e!=="?"&&(t+=e.charAt(0)==="?"?e:"?"+e),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function js(t){let e={};if(t){let r=t.indexOf("#");r>=0&&(e.hash=t.substring(r),t=t.substring(0,r));let n=t.indexOf("?");n>=0&&(e.search=t.substring(n),t=t.substring(0,n)),t&&(e.pathname=t)}return e}function V3(t,e,r,n={}){let{window:i=document.defaultView,v5Compat:a=!1}=n,s=i.history,u="POP",c=null,f=p();f==null&&(f=0,s.replaceState({...s.state,idx:f},""));function p(){return(s.state||{idx:null}).idx}function h(){u="POP";let b=p(),S=b==null?null:b-f;f=b,c&&c({action:u,location:x.location,delta:S})}function g(b,S){u="PUSH";let O=rk(b)?b:ib(x.location,b,S);f=p()+1;let k=nk(O,f),T=x.createHref(O.mask||O);try{s.pushState(k,"",T)}catch(E){if(E instanceof DOMException&&E.name==="DataCloneError")throw E;i.location.assign(T)}a&&c&&c({action:u,location:x.location,delta:1})}function v(b,S){u="REPLACE";let O=rk(b)?b:ib(x.location,b,S);f=p();let k=nk(O,f),T=x.createHref(O.mask||O);s.replaceState(k,"",T),a&&c&&c({action:u,location:x.location,delta:0})}function y(b){return K3(i,b)}let x={get action(){return u},get location(){return t(i,s)},listen(b){if(c)throw new Error("A history only accepts one active listener");return i.addEventListener(tk,h),c=b,()=>{i.removeEventListener(tk,h),c=null}},createHref(b){return e(i,b)},createURL:y,encodeLocation(b){let S=y(b);return{pathname:S.pathname,search:S.search,hash:S.hash}},push:g,replace:v,go(b){return s.go(b)}};return x}function K3(t,e,r=!1){let n="http://localhost";t&&(n=t.location.origin!=="null"?t.location.origin:t.location.href),mt(n,"No window.location.(origin|href) available to create URL");let i=typeof e=="string"?e:au(e);return i=i.replace(/ $/,"%20"),!r&&i.startsWith("//")&&(i=n+i),new URL(i,n)}function QC(t,e,r="/"){return G3(t,e,r,!1)}function G3(t,e,r,n,i){let a=typeof e=="string"?js(e):e,s=pi(a.pathname||"/",r);if(s==null)return null;let u=X3(t),c=null,f=sL(s);for(let p=0;c==null&&p<u.length;++p)c=aL(u[p],f,n);return c}function X3(t){let e=ZC(t);return Y3(e),e}function ZC(t,e=[],r=[],n="",i=!1){let a=(s,u,c=i,f)=>{let p={relativePath:f===void 0?s.path||"":f,caseSensitive:s.caseSensitive===!0,childrenIndex:u,route:s};if(p.relativePath.startsWith("/")){if(!p.relativePath.startsWith(n)&&c)return;mt(p.relativePath.startsWith(n),`Absolute route path "${p.relativePath}" nested under path "${n}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),p.relativePath=p.relativePath.slice(n.length)}let h=Sn([n,p.relativePath]),g=r.concat(p);s.children&&s.children.length>0&&(mt(s.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${h}".`),ZC(s.children,e,g,h,c)),!(s.path==null&&!s.index)&&e.push({path:h,score:nL(h,s.index),routesMeta:g})};return t.forEach((s,u)=>{var c;if(s.path===""||!((c=s.path)!=null&&c.includes("?")))a(s,u);else for(let f of ej(s.path))a(s,u,!0,f)}),e}function ej(t){let e=t.split("/");if(e.length===0)return[];let[r,...n]=e,i=r.endsWith("?"),a=r.replace(/\?$/,"");if(n.length===0)return i?[a,""]:[a];let s=ej(n.join("/")),u=[];return u.push(...s.map(c=>c===""?a:[a,c].join("/"))),i&&u.push(...s),u.map(c=>t.startsWith("/")&&c===""?"/":c)}function Y3(t){t.sort((e,r)=>e.score!==r.score?r.score-e.score:iL(e.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}var J3=/^:[\w-]+$/,Q3=3,Z3=2,eL=1,tL=10,rL=-2,ik=t=>t==="*";function nL(t,e){let r=t.split("/"),n=r.length;return r.some(ik)&&(n+=rL),e&&(n+=Z3),r.filter(i=>!ik(i)).reduce((i,a)=>i+(J3.test(a)?Q3:a===""?eL:tL),n)}function iL(t,e){return t.length===e.length&&t.slice(0,-1).every((n,i)=>n===e[i])?t[t.length-1]-e[e.length-1]:0}function aL(t,e,r=!1){let{routesMeta:n}=t,i={},a="/",s=[];for(let u=0;u<n.length;++u){let c=n[u],f=u===n.length-1,p=a==="/"?e:e.slice(a.length)||"/",h=Yf({path:c.relativePath,caseSensitive:c.caseSensitive,end:f},p),g=c.route;if(!h&&f&&r&&!n[n.length-1].route.index&&(h=Yf({path:c.relativePath,caseSensitive:c.caseSensitive,end:!1},p)),!h)return null;Object.assign(i,h.params),s.push({params:i,pathname:Sn([a,h.pathname]),pathnameBase:fL(Sn([a,h.pathnameBase])),route:g}),h.pathnameBase!=="/"&&(a=Sn([a,h.pathnameBase]))}return s}function Yf(t,e){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[r,n]=oL(t.path,t.caseSensitive,t.end),i=e.match(r);if(!i)return null;let a=i[0],s=a.replace(/(.)\/+$/,"$1"),u=i.slice(1);return{params:n.reduce((f,{paramName:p,isOptional:h},g)=>{if(p==="*"){let y=u[g]||"";s=a.slice(0,a.length-y.length).replace(/(.)\/+$/,"$1")}const v=u[g];return h&&!v?f[p]=void 0:f[p]=(v||"").replace(/%2F/g,"/"),f},{}),pathname:a,pathnameBase:s,pattern:t}}function oL(t,e=!1,r=!0){kn(t==="*"||!t.endsWith("*")||t.endsWith("/*"),`Route path "${t}" will be treated as if it were "${t.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${t.replace(/\*$/,"/*")}".`);let n=[],i="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,u,c,f,p)=>{if(n.push({paramName:u,isOptional:c!=null}),c){let h=p.charAt(f+s.length);return h&&h!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return t.endsWith("*")?(n.push({paramName:"*"}),i+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?i+="\\/*$":t!==""&&t!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,e?void 0:"i"),n]}function sL(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return kn(!1,`The URL path "${t}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${e}).`),t}}function pi(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let r=e.endsWith("/")?e.length-1:e.length,n=t.charAt(r);return n&&n!=="/"?null:t.slice(r)||"/"}var lL=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function uL(t,e="/"){let{pathname:r,search:n="",hash:i=""}=typeof t=="string"?js(t):t,a;return r?(r=tj(r),r.startsWith("/")?a=ak(r.substring(1),"/"):a=ak(r,e)):a=e,{pathname:a,search:dL(n),hash:hL(i)}}function ak(t,e){let r=Jf(e).split("/");return t.split("/").forEach(i=>{i===".."?r.length>1&&r.pop():i!=="."&&r.push(i)}),r.length>1?r.join("/"):"/"}function Vm(t,e,r,n){return`Cannot include a '${t}' character in a manually specified \`to.${e}\` 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 cL(t){return t.filter((e,r)=>r===0||e.route.path&&e.route.path.length>0)}function Kw(t){let e=cL(t);return e.map((r,n)=>n===e.length-1?r.pathname:r.pathnameBase)}function uh(t,e,r,n=!1){let i;typeof t=="string"?i=js(t):(i={...t},mt(!i.pathname||!i.pathname.includes("?"),Vm("?","pathname","search",i)),mt(!i.pathname||!i.pathname.includes("#"),Vm("#","pathname","hash",i)),mt(!i.search||!i.search.includes("#"),Vm("#","search","hash",i)));let a=t===""||i.pathname==="",s=a?"/":i.pathname,u;if(s==null)u=r;else{let h=e.length-1;if(!n&&s.startsWith("..")){let g=s.split("/");for(;g[0]==="..";)g.shift(),h-=1;i.pathname=g.join("/")}u=h>=0?e[h]:"/"}let c=uL(i,u),f=s&&s!=="/"&&s.endsWith("/"),p=(a||s===".")&&r.endsWith("/");return!c.pathname.endsWith("/")&&(f||p)&&(c.pathname+="/"),c}var tj=t=>t.replace(/\/\/+/g,"/"),Sn=t=>tj(t.join("/")),Jf=t=>t.replace(/\/+$/,""),fL=t=>Jf(t).replace(/^\/*/,"/"),dL=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,hL=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t,pL=class{constructor(t,e,r,n=!1){this.status=t,this.statusText=e||"",this.internal=n,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}};function mL(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}function gL(t){let e=t.map(r=>r.route.path).filter(Boolean);return Sn(e)||"/"}var rj=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function nj(t,e){let r=t;if(typeof r!="string"||!lL.test(r))return{absoluteURL:void 0,isExternal:!1,to:r};let n=r,i=!1;if(rj)try{let a=new URL(window.location.href),s=r.startsWith("//")?new URL(a.protocol+r):new URL(r),u=pi(s.pathname,e);s.origin===a.origin&&u!=null?r=u+s.search+s.hash:i=!0}catch{kn(!1,`<Link to="${r}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:n,isExternal:i,to:r}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var ij=["POST","PUT","PATCH","DELETE"];new Set(ij);var vL=["GET",...ij];new Set(vL);var Rs=N.createContext(null);Rs.displayName="DataRouter";var ch=N.createContext(null);ch.displayName="DataRouterState";var aj=N.createContext(!1);function yL(){return N.useContext(aj)}var oj=N.createContext({isTransitioning:!1});oj.displayName="ViewTransition";var bL=N.createContext(new Map);bL.displayName="Fetchers";var wL=N.createContext(null);wL.displayName="Await";var Lr=N.createContext(null);Lr.displayName="Navigation";var Ku=N.createContext(null);Ku.displayName="Location";var nn=N.createContext({outlet:null,matches:[],isDataRoute:!1});nn.displayName="Route";var Gw=N.createContext(null);Gw.displayName="RouteError";var sj="REACT_ROUTER_ERROR",xL="REDIRECT",_L="ROUTE_ERROR_RESPONSE";function SL(t){if(t.startsWith(`${sj}:${xL}:{`))try{let e=JSON.parse(t.slice(28));if(typeof e=="object"&&e&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.location=="string"&&typeof e.reloadDocument=="boolean"&&typeof e.replace=="boolean")return e}catch{}}function kL(t){if(t.startsWith(`${sj}:${_L}:{`))try{let e=JSON.parse(t.slice(40));if(typeof e=="object"&&e&&typeof e.status=="number"&&typeof e.statusText=="string")return new pL(e.status,e.statusText,e.data)}catch{}}function OL(t,{relative:e}={}){mt(Ns(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:n}=N.useContext(Lr),{hash:i,pathname:a,search:s}=Gu(t,{relative:e}),u=a;return r!=="/"&&(u=a==="/"?r:Sn([r,a])),n.createHref({pathname:u,search:s,hash:i})}function Ns(){return N.useContext(Ku)!=null}function Fn(){return mt(Ns(),"useLocation() may be used only in the context of a <Router> component."),N.useContext(Ku).location}var lj="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function uj(t){N.useContext(Lr).static||N.useLayoutEffect(t)}function fh(){let{isDataRoute:t}=N.useContext(nn);return t?qL():EL()}function EL(){mt(Ns(),"useNavigate() may be used only in the context of a <Router> component.");let t=N.useContext(Rs),{basename:e,navigator:r}=N.useContext(Lr),{matches:n}=N.useContext(nn),{pathname:i}=Fn(),a=JSON.stringify(Kw(n)),s=N.useRef(!1);return uj(()=>{s.current=!0}),N.useCallback((c,f={})=>{if(kn(s.current,lj),!s.current)return;if(typeof c=="number"){r.go(c);return}let p=uh(c,JSON.parse(a),i,f.relative==="path");t==null&&e!=="/"&&(p.pathname=p.pathname==="/"?e:Sn([e,p.pathname])),(f.replace?r.replace:r.push)(p,f.state,f)},[e,r,a,i,t])}var AL=N.createContext(null);function PL(t){let e=N.useContext(nn).outlet;return N.useMemo(()=>e&&N.createElement(AL.Provider,{value:t},e),[e,t])}function TL(){let{matches:t}=N.useContext(nn),e=t[t.length-1];return(e==null?void 0:e.params)??{}}function Gu(t,{relative:e}={}){let{matches:r}=N.useContext(nn),{pathname:n}=Fn(),i=JSON.stringify(Kw(r));return N.useMemo(()=>uh(t,JSON.parse(i),n,e==="path"),[t,i,n,e])}function CL(t,e){return cj(t,e)}function cj(t,e,r){var b;mt(Ns(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:n}=N.useContext(Lr),{matches:i}=N.useContext(nn),a=i[i.length-1],s=a?a.params:{},u=a?a.pathname:"/",c=a?a.pathnameBase:"/",f=a&&a.route;{let S=f&&f.path||"";dj(u,!f||S.endsWith("*")||S.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${u}" (under <Route path="${S}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
50
|
-
|
|
51
|
-
Please change the parent <Route path="${S}"> to <Route path="${S==="/"?"*":`${S}/*`}">.`)}let p=Fn(),h;if(e){let S=typeof e=="string"?js(e):e;mt(c==="/"||((b=S.pathname)==null?void 0:b.startsWith(c)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${c}" but pathname "${S.pathname}" was given in the \`location\` prop.`),h=S}else h=p;let g=h.pathname||"/",v=g;if(c!=="/"){let S=c.replace(/^\//,"").split("/");v="/"+g.replace(/^\//,"").split("/").slice(S.length).join("/")}let y=r&&r.state.matches.length?r.state.matches.map(S=>Object.assign(S,{route:r.manifest[S.route.id]||S.route})):QC(t,{pathname:v});kn(f||y!=null,`No routes matched location "${h.pathname}${h.search}${h.hash}" `),kn(y==null||y[y.length-1].route.element!==void 0||y[y.length-1].route.Component!==void 0||y[y.length-1].route.lazy!==void 0,`Matched leaf route at location "${h.pathname}${h.search}${h.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let x=IL(y&&y.map(S=>Object.assign({},S,{params:Object.assign({},s,S.params),pathname:Sn([c,n.encodeLocation?n.encodeLocation(S.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:S.pathname]),pathnameBase:S.pathnameBase==="/"?c:Sn([c,n.encodeLocation?n.encodeLocation(S.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:S.pathnameBase])})),i,r);return e&&x?N.createElement(Ku.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...h},navigationType:"POP"}},x):x}function jL(){let t=zL(),e=mL(t)?`${t.status} ${t.statusText}`:t instanceof Error?t.message:JSON.stringify(t),r=t instanceof Error?t.stack:null,n="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:n},a={padding:"2px 4px",backgroundColor:n},s=null;return console.error("Error handled by React Router default ErrorBoundary:",t),s=N.createElement(N.Fragment,null,N.createElement("p",null,"💿 Hey developer 👋"),N.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",N.createElement("code",{style:a},"ErrorBoundary")," or"," ",N.createElement("code",{style:a},"errorElement")," prop on your route.")),N.createElement(N.Fragment,null,N.createElement("h2",null,"Unexpected Application Error!"),N.createElement("h3",{style:{fontStyle:"italic"}},e),r?N.createElement("pre",{style:i},r):null,s)}var RL=N.createElement(jL,null),fj=class extends N.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,e){return e.location!==t.location||e.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:e.error,location:e.location,revalidation:t.revalidation||e.revalidation}}componentDidCatch(t,e){this.props.onError?this.props.onError(t,e):console.error("React Router caught the following error during render",t)}render(){let t=this.state.error;if(this.context&&typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){const r=kL(t.digest);r&&(t=r)}let e=t!==void 0?N.createElement(nn.Provider,{value:this.props.routeContext},N.createElement(Gw.Provider,{value:t,children:this.props.component})):this.props.children;return this.context?N.createElement(NL,{error:t},e):e}};fj.contextType=aj;var Km=new WeakMap;function NL({children:t,error:e}){let{basename:r}=N.useContext(Lr);if(typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){let n=SL(e.digest);if(n){let i=Km.get(e);if(i)throw i;let a=nj(n.location,r);if(rj&&!Km.get(e))if(a.isExternal||n.reloadDocument)window.location.href=a.absoluteURL||a.to;else{const s=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(a.to,{replace:n.replace}));throw Km.set(e,s),s}return N.createElement("meta",{httpEquiv:"refresh",content:`0;url=${a.absoluteURL||a.to}`})}}return t}function $L({routeContext:t,match:e,children:r}){let n=N.useContext(Rs);return n&&n.static&&n.staticContext&&(e.route.errorElement||e.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=e.route.id),N.createElement(nn.Provider,{value:t},r)}function IL(t,e=[],r){let n=r==null?void 0:r.state;if(t==null){if(!n)return null;if(n.errors)t=n.matches;else if(e.length===0&&!n.initialized&&n.matches.length>0)t=n.matches;else return null}let i=t,a=n==null?void 0:n.errors;if(a!=null){let p=i.findIndex(h=>h.route.id&&(a==null?void 0:a[h.route.id])!==void 0);mt(p>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(",")}`),i=i.slice(0,Math.min(i.length,p+1))}let s=!1,u=-1;if(r&&n){s=n.renderFallback;for(let p=0;p<i.length;p++){let h=i[p];if((h.route.HydrateFallback||h.route.hydrateFallbackElement)&&(u=p),h.route.id){let{loaderData:g,errors:v}=n,y=h.route.loader&&!g.hasOwnProperty(h.route.id)&&(!v||v[h.route.id]===void 0);if(h.route.lazy||y){r.isStatic&&(s=!0),u>=0?i=i.slice(0,u+1):i=[i[0]];break}}}}let c=r==null?void 0:r.onError,f=n&&c?(p,h)=>{var g,v;c(p,{location:n.location,params:((v=(g=n.matches)==null?void 0:g[0])==null?void 0:v.params)??{},pattern:gL(n.matches),errorInfo:h})}:void 0;return i.reduceRight((p,h,g)=>{let v,y=!1,x=null,b=null;n&&(v=a&&h.route.id?a[h.route.id]:void 0,x=h.route.errorElement||RL,s&&(u<0&&g===0?(dj("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),y=!0,b=null):u===g&&(y=!0,b=h.route.hydrateFallbackElement||null)));let S=e.concat(i.slice(0,g+1)),O=()=>{let k;return v?k=x:y?k=b:h.route.Component?k=N.createElement(h.route.Component,null):h.route.element?k=h.route.element:k=p,N.createElement($L,{match:h,routeContext:{outlet:p,matches:S,isDataRoute:n!=null},children:k})};return n&&(h.route.ErrorBoundary||h.route.errorElement||g===0)?N.createElement(fj,{location:n.location,revalidation:n.revalidation,component:x,error:v,children:O(),routeContext:{outlet:null,matches:S,isDataRoute:!0},onError:f}):O()},null)}function Xw(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function ML(t){let e=N.useContext(Rs);return mt(e,Xw(t)),e}function LL(t){let e=N.useContext(ch);return mt(e,Xw(t)),e}function DL(t){let e=N.useContext(nn);return mt(e,Xw(t)),e}function Yw(t){let e=DL(t),r=e.matches[e.matches.length-1];return mt(r.route.id,`${t} can only be used on routes that contain a unique "id"`),r.route.id}function BL(){return Yw("useRouteId")}function zL(){var n;let t=N.useContext(Gw),e=LL("useRouteError"),r=Yw("useRouteError");return t!==void 0?t:(n=e.errors)==null?void 0:n[r]}function qL(){let{router:t}=ML("useNavigate"),e=Yw("useNavigate"),r=N.useRef(!1);return uj(()=>{r.current=!0}),N.useCallback(async(i,a={})=>{kn(r.current,lj),r.current&&(typeof i=="number"?await t.navigate(i):await t.navigate(i,{fromRouteId:e,...a}))},[t,e])}var ok={};function dj(t,e,r){!e&&!ok[t]&&(ok[t]=!0,kn(!1,r))}N.memo(UL);function UL({routes:t,manifest:e,future:r,state:n,isStatic:i,onError:a}){return cj(t,void 0,{manifest:e,state:n,isStatic:i,onError:a})}function FL({to:t,replace:e,state:r,relative:n}){mt(Ns(),"<Navigate> may be used only in the context of a <Router> component.");let{static:i}=N.useContext(Lr);kn(!i,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:a}=N.useContext(nn),{pathname:s}=Fn(),u=fh(),c=uh(t,Kw(a),s,n==="path"),f=JSON.stringify(c);return N.useEffect(()=>{u(JSON.parse(f),{replace:e,state:r,relative:n})},[u,f,n,e,r]),null}function WL(t){return PL(t.context)}function Jr(t){mt(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function HL({basename:t="/",children:e=null,location:r,navigationType:n="POP",navigator:i,static:a=!1,useTransitions:s}){mt(!Ns(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let u=t.replace(/^\/*/,"/"),c=N.useMemo(()=>({basename:u,navigator:i,static:a,useTransitions:s,future:{}}),[u,i,a,s]);typeof r=="string"&&(r=js(r));let{pathname:f="/",search:p="",hash:h="",state:g=null,key:v="default",mask:y}=r,x=N.useMemo(()=>{let b=pi(f,u);return b==null?null:{location:{pathname:b,search:p,hash:h,state:g,key:v,mask:y},navigationType:n}},[u,f,p,h,g,v,n,y]);return kn(x!=null,`<Router basename="${u}"> is not able to match the URL "${f}${p}${h}" because it does not start with the basename, so the <Router> won't render anything.`),x==null?null:N.createElement(Lr.Provider,{value:c},N.createElement(Ku.Provider,{children:e,value:x}))}function VL({children:t,location:e}){return CL(ab(t),e)}function ab(t,e=[]){let r=[];return N.Children.forEach(t,(n,i)=>{if(!N.isValidElement(n))return;let a=[...e,i];if(n.type===N.Fragment){r.push.apply(r,ab(n.props.children,a));return}mt(n.type===Jr,`[${typeof n.type=="string"?n.type:n.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),mt(!n.props.index||!n.props.children,"An index route cannot have child routes.");let s={id:n.props.id||a.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,middleware:n.props.middleware,loader:n.props.loader,action:n.props.action,hydrateFallbackElement:n.props.hydrateFallbackElement,HydrateFallback:n.props.HydrateFallback,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.hasErrorBoundary===!0||n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(s.children=ab(n.props.children,a)),r.push(s)}),r}var Hf="get",Vf="application/x-www-form-urlencoded";function dh(t){return typeof HTMLElement<"u"&&t instanceof HTMLElement}function KL(t){return dh(t)&&t.tagName.toLowerCase()==="button"}function GL(t){return dh(t)&&t.tagName.toLowerCase()==="form"}function XL(t){return dh(t)&&t.tagName.toLowerCase()==="input"}function YL(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function JL(t,e){return t.button===0&&(!e||e==="_self")&&!YL(t)}var mf=null;function QL(){if(mf===null)try{new FormData(document.createElement("form"),0),mf=!1}catch{mf=!0}return mf}var ZL=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Gm(t){return t!=null&&!ZL.has(t)?(kn(!1,`"${t}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Vf}"`),null):t}function eD(t,e){let r,n,i,a,s;if(GL(t)){let u=t.getAttribute("action");n=u?pi(u,e):null,r=t.getAttribute("method")||Hf,i=Gm(t.getAttribute("enctype"))||Vf,a=new FormData(t)}else if(KL(t)||XL(t)&&(t.type==="submit"||t.type==="image")){let u=t.form;if(u==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let c=t.getAttribute("formaction")||u.getAttribute("action");if(n=c?pi(c,e):null,r=t.getAttribute("formmethod")||u.getAttribute("method")||Hf,i=Gm(t.getAttribute("formenctype"))||Gm(u.getAttribute("enctype"))||Vf,a=new FormData(u,t),!QL()){let{name:f,type:p,value:h}=t;if(p==="image"){let g=f?`${f}.`:"";a.append(`${g}x`,"0"),a.append(`${g}y`,"0")}else f&&a.append(f,h)}}else{if(dh(t))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=Hf,n=null,i=Vf,s=t}return a&&i==="text/plain"&&(s=a,a=void 0),{action:n,method:r.toLowerCase(),encType:i,formData:a,body:s}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Jw(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function hj(t,e,r,n){let i=typeof t=="string"?new URL(t,typeof window>"u"?"server://singlefetch/":window.location.origin):t;return r?i.pathname.endsWith("/")?i.pathname=`${i.pathname}_.${n}`:i.pathname=`${i.pathname}.${n}`:i.pathname==="/"?i.pathname=`_root.${n}`:e&&pi(i.pathname,e)==="/"?i.pathname=`${Jf(e)}/_root.${n}`:i.pathname=`${Jf(i.pathname)}.${n}`,i}async function tD(t,e){if(t.id in e)return e[t.id];try{let r=await import(t.module);return e[t.id]=r,r}catch(r){return console.error(`Error loading route module \`${t.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function rD(t){return t==null?!1:t.href==null?t.rel==="preload"&&typeof t.imageSrcSet=="string"&&typeof t.imageSizes=="string":typeof t.rel=="string"&&typeof t.href=="string"}async function nD(t,e,r){let n=await Promise.all(t.map(async i=>{let a=e.routes[i.route.id];if(a){let s=await tD(a,r);return s.links?s.links():[]}return[]}));return sD(n.flat(1).filter(rD).filter(i=>i.rel==="stylesheet"||i.rel==="preload").map(i=>i.rel==="stylesheet"?{...i,rel:"prefetch",as:"style"}:{...i,rel:"prefetch"}))}function sk(t,e,r,n,i,a){let s=(c,f)=>r[f]?c.route.id!==r[f].route.id:!0,u=(c,f)=>{var p;return r[f].pathname!==c.pathname||((p=r[f].route.path)==null?void 0:p.endsWith("*"))&&r[f].params["*"]!==c.params["*"]};return a==="assets"?e.filter((c,f)=>s(c,f)||u(c,f)):a==="data"?e.filter((c,f)=>{var h;let p=n.routes[c.route.id];if(!p||!p.hasLoader)return!1;if(s(c,f)||u(c,f))return!0;if(c.route.shouldRevalidate){let g=c.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:((h=r[0])==null?void 0:h.params)||{},nextUrl:new URL(t,window.origin),nextParams:c.params,defaultShouldRevalidate:!0});if(typeof g=="boolean")return g}return!0}):[]}function iD(t,e,{includeHydrateFallback:r}={}){return aD(t.map(n=>{let i=e.routes[n.route.id];if(!i)return[];let a=[i.module];return i.clientActionModule&&(a=a.concat(i.clientActionModule)),i.clientLoaderModule&&(a=a.concat(i.clientLoaderModule)),r&&i.hydrateFallbackModule&&(a=a.concat(i.hydrateFallbackModule)),i.imports&&(a=a.concat(i.imports)),a}).flat(1))}function aD(t){return[...new Set(t)]}function oD(t){let e={},r=Object.keys(t).sort();for(let n of r)e[n]=t[n];return e}function sD(t,e){let r=new Set;return new Set(e),t.reduce((n,i)=>{let a=JSON.stringify(oD(i));return r.has(a)||(r.add(a),n.push({key:a,link:i})),n},[])}function Qw(){let t=N.useContext(Rs);return Jw(t,"You must render this element inside a <DataRouterContext.Provider> element"),t}function lD(){let t=N.useContext(ch);return Jw(t,"You must render this element inside a <DataRouterStateContext.Provider> element"),t}var Zw=N.createContext(void 0);Zw.displayName="FrameworkContext";function ex(){let t=N.useContext(Zw);return Jw(t,"You must render this element inside a <HydratedRouter> element"),t}function uD(t,e){let r=N.useContext(Zw),[n,i]=N.useState(!1),[a,s]=N.useState(!1),{onFocus:u,onBlur:c,onMouseEnter:f,onMouseLeave:p,onTouchStart:h}=e,g=N.useRef(null);N.useEffect(()=>{if(t==="render"&&s(!0),t==="viewport"){let x=S=>{S.forEach(O=>{s(O.isIntersecting)})},b=new IntersectionObserver(x,{threshold:.5});return g.current&&b.observe(g.current),()=>{b.disconnect()}}},[t]),N.useEffect(()=>{if(n){let x=setTimeout(()=>{s(!0)},100);return()=>{clearTimeout(x)}}},[n]);let v=()=>{i(!0)},y=()=>{i(!1),s(!1)};return r?t!=="intent"?[a,g,{}]:[a,g,{onFocus:Tl(u,v),onBlur:Tl(c,y),onMouseEnter:Tl(f,v),onMouseLeave:Tl(p,y),onTouchStart:Tl(h,v)}]:[!1,g,{}]}function Tl(t,e){return r=>{t&&t(r),r.defaultPrevented||e(r)}}function cD({page:t,...e}){let r=yL(),{router:n}=Qw(),i=N.useMemo(()=>QC(n.routes,t,n.basename),[n.routes,t,n.basename]);return i?r?N.createElement(dD,{page:t,matches:i,...e}):N.createElement(hD,{page:t,matches:i,...e}):null}function fD(t){let{manifest:e,routeModules:r}=ex(),[n,i]=N.useState([]);return N.useEffect(()=>{let a=!1;return nD(t,e,r).then(s=>{a||i(s)}),()=>{a=!0}},[t,e,r]),n}function dD({page:t,matches:e,...r}){let n=Fn(),{future:i}=ex(),{basename:a}=Qw(),s=N.useMemo(()=>{if(t===n.pathname+n.search+n.hash)return[];let u=hj(t,a,i.v8_trailingSlashAwareDataRequests,"rsc"),c=!1,f=[];for(let p of e)typeof p.route.shouldRevalidate=="function"?c=!0:f.push(p.route.id);return c&&f.length>0&&u.searchParams.set("_routes",f.join(",")),[u.pathname+u.search]},[a,i.v8_trailingSlashAwareDataRequests,t,n,e]);return N.createElement(N.Fragment,null,s.map(u=>N.createElement("link",{key:u,rel:"prefetch",as:"fetch",href:u,...r})))}function hD({page:t,matches:e,...r}){let n=Fn(),{future:i,manifest:a,routeModules:s}=ex(),{basename:u}=Qw(),{loaderData:c,matches:f}=lD(),p=N.useMemo(()=>sk(t,e,f,a,n,"data"),[t,e,f,a,n]),h=N.useMemo(()=>sk(t,e,f,a,n,"assets"),[t,e,f,a,n]),g=N.useMemo(()=>{if(t===n.pathname+n.search+n.hash)return[];let x=new Set,b=!1;if(e.forEach(O=>{var T;let k=a.routes[O.route.id];!k||!k.hasLoader||(!p.some(E=>E.route.id===O.route.id)&&O.route.id in c&&((T=s[O.route.id])!=null&&T.shouldRevalidate)||k.hasClientLoader?b=!0:x.add(O.route.id))}),x.size===0)return[];let S=hj(t,u,i.v8_trailingSlashAwareDataRequests,"data");return b&&x.size>0&&S.searchParams.set("_routes",e.filter(O=>x.has(O.route.id)).map(O=>O.route.id).join(",")),[S.pathname+S.search]},[u,i.v8_trailingSlashAwareDataRequests,c,n,a,p,e,t,s]),v=N.useMemo(()=>iD(h,a),[h,a]),y=fD(h);return N.createElement(N.Fragment,null,g.map(x=>N.createElement("link",{key:x,rel:"prefetch",as:"fetch",href:x,...r})),v.map(x=>N.createElement("link",{key:x,rel:"modulepreload",href:x,...r})),y.map(({key:x,link:b})=>N.createElement("link",{key:x,nonce:r.nonce,...b,crossOrigin:b.crossOrigin??r.crossOrigin})))}function pD(...t){return e=>{t.forEach(r=>{typeof r=="function"?r(e):r!=null&&(r.current=e)})}}var mD=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{mD&&(window.__reactRouterVersion="7.16.0")}catch{}function gD({basename:t,children:e,useTransitions:r,window:n}){let i=N.useRef();i.current==null&&(i.current=W3({window:n,v5Compat:!0}));let a=i.current,[s,u]=N.useState({action:a.action,location:a.location}),c=N.useCallback(f=>{r===!1?u(f):N.startTransition(()=>u(f))},[r]);return N.useLayoutEffect(()=>a.listen(c),[a,c]),N.createElement(HL,{basename:t,children:e,location:s.location,navigationType:s.action,navigator:a,useTransitions:r})}var pj=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,mj=N.forwardRef(function({onClick:e,discover:r="render",prefetch:n="none",relative:i,reloadDocument:a,replace:s,mask:u,state:c,target:f,to:p,preventScrollReset:h,viewTransition:g,defaultShouldRevalidate:v,...y},x){let{basename:b,navigator:S,useTransitions:O}=N.useContext(Lr),k=typeof p=="string"&&pj.test(p),T=nj(p,b);p=T.to;let E=OL(p,{relative:i}),A=Fn(),j=null;if(u){let V=uh(u,[],A.mask?A.mask.pathname:"/",!0);b!=="/"&&(V.pathname=V.pathname==="/"?b:Sn([b,V.pathname])),j=S.createHref(V)}let[R,M,H]=uD(n,y),U=bD(p,{replace:s,mask:u,state:c,target:f,preventScrollReset:h,relative:i,viewTransition:g,defaultShouldRevalidate:v,useTransitions:O});function B(V){e&&e(V),V.defaultPrevented||U(V)}let F=!(T.isExternal||a),J=N.createElement("a",{...y,...H,href:(F?j:void 0)||T.absoluteURL||E,onClick:F?B:e,ref:pD(x,M),target:f,"data-discover":!k&&r==="render"?"true":void 0});return R&&!k?N.createElement(N.Fragment,null,J,N.createElement(cD,{page:E})):J});mj.displayName="Link";var tx=N.forwardRef(function({"aria-current":e="page",caseSensitive:r=!1,className:n="",end:i=!1,style:a,to:s,viewTransition:u,children:c,...f},p){let h=Gu(s,{relative:f.relative}),g=Fn(),v=N.useContext(ch),{navigator:y,basename:x}=N.useContext(Lr),b=v!=null&&kD(h)&&u===!0,S=y.encodeLocation?y.encodeLocation(h).pathname:h.pathname,O=g.pathname,k=v&&v.navigation&&v.navigation.location?v.navigation.location.pathname:null;r||(O=O.toLowerCase(),k=k?k.toLowerCase():null,S=S.toLowerCase()),k&&x&&(k=pi(k,x)||k);const T=S!=="/"&&S.endsWith("/")?S.length-1:S.length;let E=O===S||!i&&O.startsWith(S)&&O.charAt(T)==="/",A=k!=null&&(k===S||!i&&k.startsWith(S)&&k.charAt(S.length)==="/"),j={isActive:E,isPending:A,isTransitioning:b},R=E?e:void 0,M;typeof n=="function"?M=n(j):M=[n,E?"active":null,A?"pending":null,b?"transitioning":null].filter(Boolean).join(" ");let H=typeof a=="function"?a(j):a;return N.createElement(mj,{...f,"aria-current":R,className:M,ref:p,style:H,to:s,viewTransition:u},typeof c=="function"?c(j):c)});tx.displayName="NavLink";var vD=N.forwardRef(({discover:t="render",fetcherKey:e,navigate:r,reloadDocument:n,replace:i,state:a,method:s=Hf,action:u,onSubmit:c,relative:f,preventScrollReset:p,viewTransition:h,defaultShouldRevalidate:g,...v},y)=>{let{useTransitions:x}=N.useContext(Lr),b=_D(),S=SD(u,{relative:f}),O=s.toLowerCase()==="get"?"get":"post",k=typeof u=="string"&&pj.test(u),T=E=>{if(c&&c(E),E.defaultPrevented)return;E.preventDefault();let A=E.nativeEvent.submitter,j=(A==null?void 0:A.getAttribute("formmethod"))||s,R=()=>b(A||E.currentTarget,{fetcherKey:e,method:j,navigate:r,replace:i,state:a,relative:f,preventScrollReset:p,viewTransition:h,defaultShouldRevalidate:g});x&&r!==!1?N.startTransition(()=>R()):R()};return N.createElement("form",{ref:y,method:O,action:S,onSubmit:n?c:T,...v,"data-discover":!k&&t==="render"?"true":void 0})});vD.displayName="Form";function yD(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function gj(t){let e=N.useContext(Rs);return mt(e,yD(t)),e}function bD(t,{target:e,replace:r,mask:n,state:i,preventScrollReset:a,relative:s,viewTransition:u,defaultShouldRevalidate:c,useTransitions:f}={}){let p=fh(),h=Fn(),g=Gu(t,{relative:s});return N.useCallback(v=>{if(JL(v,e)){v.preventDefault();let y=r!==void 0?r:au(h)===au(g),x=()=>p(t,{replace:y,mask:n,state:i,preventScrollReset:a,relative:s,viewTransition:u,defaultShouldRevalidate:c});f?N.startTransition(()=>x()):x()}},[h,p,g,r,n,i,e,t,a,s,u,c,f])}var wD=0,xD=()=>`__${String(++wD)}__`;function _D(){let{router:t}=gj("useSubmit"),{basename:e}=N.useContext(Lr),r=BL(),n=t.fetch,i=t.navigate;return N.useCallback(async(a,s={})=>{let{action:u,method:c,encType:f,formData:p,body:h}=eD(a,e);if(s.navigate===!1){let g=s.fetcherKey||xD();await n(g,r,s.action||u,{defaultShouldRevalidate:s.defaultShouldRevalidate,preventScrollReset:s.preventScrollReset,formData:p,body:h,formMethod:s.method||c,formEncType:s.encType||f,flushSync:s.flushSync})}else await i(s.action||u,{defaultShouldRevalidate:s.defaultShouldRevalidate,preventScrollReset:s.preventScrollReset,formData:p,body:h,formMethod:s.method||c,formEncType:s.encType||f,replace:s.replace,state:s.state,fromRouteId:r,flushSync:s.flushSync,viewTransition:s.viewTransition})},[n,i,e,r])}function SD(t,{relative:e}={}){let{basename:r}=N.useContext(Lr),n=N.useContext(nn);mt(n,"useFormAction must be used inside a RouteContext");let[i]=n.matches.slice(-1),a={...Gu(t||".",{relative:e})},s=Fn();if(t==null){a.search=s.search;let u=new URLSearchParams(a.search),c=u.getAll("index");if(c.some(p=>p==="")){u.delete("index"),c.filter(h=>h).forEach(h=>u.append("index",h));let p=u.toString();a.search=p?`?${p}`:""}}return(!t||t===".")&&i.route.index&&(a.search=a.search?a.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(a.pathname=a.pathname==="/"?r:Sn([r,a.pathname])),au(a)}function kD(t,{relative:e}={}){let r=N.useContext(oj);mt(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:n}=gj("useViewTransitionState"),i=Gu(t,{relative:e});if(!r.isTransitioning)return!1;let a=pi(r.currentLocation.pathname,n)||r.currentLocation.pathname,s=pi(r.nextLocation.pathname,n)||r.nextLocation.pathname;return Yf(i.pathname,s)!=null||Yf(i.pathname,a)!=null}var OD=JC();const ED=Je(OD);function AD(t){if(typeof document>"u")return;let e=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",e.appendChild(r),r.styleSheet?r.styleSheet.cssText=t:r.appendChild(document.createTextNode(t))}const PD=t=>{switch(t){case"success":return jD;case"info":return ND;case"warning":return RD;case"error":return $D;default:return null}},TD=Array(12).fill(0),CD=({visible:t,className:e})=>$.createElement("div",{className:["sonner-loading-wrapper",e].filter(Boolean).join(" "),"data-visible":t},$.createElement("div",{className:"sonner-spinner"},TD.map((r,n)=>$.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${n}`})))),jD=$.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},$.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),RD=$.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},$.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),ND=$.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},$.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),$D=$.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},$.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),ID=$.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},$.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),$.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),MD=()=>{const[t,e]=$.useState(document.hidden);return $.useEffect(()=>{const r=()=>{e(document.hidden)};return document.addEventListener("visibilitychange",r),()=>window.removeEventListener("visibilitychange",r)},[]),t};let ob=1;class LD{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{const r=this.subscribers.indexOf(e);this.subscribers.splice(r,1)}),this.publish=e=>{this.subscribers.forEach(r=>r(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var r;const{message:n,...i}=e,a=typeof(e==null?void 0:e.id)=="number"||((r=e.id)==null?void 0:r.length)>0?e.id:ob++,s=this.toasts.find(c=>c.id===a),u=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(a)&&this.dismissedToasts.delete(a),s?this.toasts=this.toasts.map(c=>c.id===a?(this.publish({...c,...e,id:a,title:n}),{...c,...e,id:a,dismissible:u,title:n}):c):this.addToast({title:n,...i,dismissible:u,id:a}),a},this.dismiss=e=>(e?(this.dismissedToasts.add(e),requestAnimationFrame(()=>this.subscribers.forEach(r=>r({id:e,dismiss:!0})))):this.toasts.forEach(r=>{this.subscribers.forEach(n=>n({id:r.id,dismiss:!0}))}),e),this.message=(e,r)=>this.create({...r,message:e}),this.error=(e,r)=>this.create({...r,message:e,type:"error"}),this.success=(e,r)=>this.create({...r,type:"success",message:e}),this.info=(e,r)=>this.create({...r,type:"info",message:e}),this.warning=(e,r)=>this.create({...r,type:"warning",message:e}),this.loading=(e,r)=>this.create({...r,type:"loading",message:e}),this.promise=(e,r)=>{if(!r)return;let n;r.loading!==void 0&&(n=this.create({...r,promise:e,type:"loading",message:r.loading,description:typeof r.description!="function"?r.description:void 0}));const i=Promise.resolve(e instanceof Function?e():e);let a=n!==void 0,s;const u=i.then(async f=>{if(s=["resolve",f],$.isValidElement(f))a=!1,this.create({id:n,type:"default",message:f});else if(BD(f)&&!f.ok){a=!1;const h=typeof r.error=="function"?await r.error(`HTTP error! status: ${f.status}`):r.error,g=typeof r.description=="function"?await r.description(`HTTP error! status: ${f.status}`):r.description,y=typeof h=="object"&&!$.isValidElement(h)?h:{message:h};this.create({id:n,type:"error",description:g,...y})}else if(f instanceof Error){a=!1;const h=typeof r.error=="function"?await r.error(f):r.error,g=typeof r.description=="function"?await r.description(f):r.description,y=typeof h=="object"&&!$.isValidElement(h)?h:{message:h};this.create({id:n,type:"error",description:g,...y})}else if(r.success!==void 0){a=!1;const h=typeof r.success=="function"?await r.success(f):r.success,g=typeof r.description=="function"?await r.description(f):r.description,y=typeof h=="object"&&!$.isValidElement(h)?h:{message:h};this.create({id:n,type:"success",description:g,...y})}}).catch(async f=>{if(s=["reject",f],r.error!==void 0){a=!1;const p=typeof r.error=="function"?await r.error(f):r.error,h=typeof r.description=="function"?await r.description(f):r.description,v=typeof p=="object"&&!$.isValidElement(p)?p:{message:p};this.create({id:n,type:"error",description:h,...v})}}).finally(()=>{a&&(this.dismiss(n),n=void 0),r.finally==null||r.finally.call(r)}),c=()=>new Promise((f,p)=>u.then(()=>s[0]==="reject"?p(s[1]):f(s[1])).catch(p));return typeof n!="string"&&typeof n!="number"?{unwrap:c}:Object.assign(n,{unwrap:c})},this.custom=(e,r)=>{const n=(r==null?void 0:r.id)||ob++;return this.create({jsx:e(n),id:n,...r}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const _r=new LD,DD=(t,e)=>{const r=(e==null?void 0:e.id)||ob++;return _r.addToast({title:t,...e,id:r}),r},BD=t=>t&&typeof t=="object"&&"ok"in t&&typeof t.ok=="boolean"&&"status"in t&&typeof t.status=="number",zD=DD,qD=()=>_r.toasts,UD=()=>_r.getActiveToasts(),Vt=Object.assign(zD,{success:_r.success,info:_r.info,warning:_r.warning,error:_r.error,custom:_r.custom,message:_r.message,promise:_r.promise,dismiss:_r.dismiss,loading:_r.loading},{getHistory:qD,getToasts:UD});AD("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function gf(t){return t.label!==void 0}const FD=3,WD="24px",HD="16px",lk=4e3,VD=356,KD=14,GD=45,XD=200;function jn(...t){return t.filter(Boolean).join(" ")}function YD(t){const[e,r]=t.split("-"),n=[];return e&&n.push(e),r&&n.push(r),n}const JD=t=>{var e,r,n,i,a,s,u,c,f;const{invert:p,toast:h,unstyled:g,interacting:v,setHeights:y,visibleToasts:x,heights:b,index:S,toasts:O,expanded:k,removeToast:T,defaultRichColors:E,closeButton:A,style:j,cancelButtonStyle:R,actionButtonStyle:M,className:H="",descriptionClassName:U="",duration:B,position:F,gap:J,expandByDefault:V,classNames:K,icons:Z,closeButtonAriaLabel:G="Close toast"}=t,[ee,z]=$.useState(null),[L,W]=$.useState(null),[te,ue]=$.useState(!1),[le,de]=$.useState(!1),[Re,pe]=$.useState(!1),[ne,_e]=$.useState(!1),[Oe,ie]=$.useState(!1),[Fe,Ne]=$.useState(0),[ft,ot]=$.useState(0),dt=$.useRef(h.duration||B||lk),pr=$.useRef(null),Ot=$.useRef(null),Dr=S===0,tr=S+1<=x,st=h.type,Er=h.dismissible!==!1,ua=h.className||"",ca=h.descriptionClassName||"",fa=$.useMemo(()=>b.findIndex(Ie=>Ie.toastId===h.id)||0,[b,h.id]),Ws=$.useMemo(()=>{var Ie;return(Ie=h.closeButton)!=null?Ie:A},[h.closeButton,A]),da=$.useMemo(()=>h.duration||B||lk,[h.duration,B]),so=$.useRef(0),Br=$.useRef(0),Si=$.useRef(0),ki=$.useRef(null),[ic,ac]=F.split("-"),oc=$.useMemo(()=>b.reduce((Ie,xt,jt)=>jt>=fa?Ie:Ie+xt.height,0),[b,fa]),lo=MD(),Hs=h.invert||p,ha=st==="loading";Br.current=$.useMemo(()=>fa*J+oc,[fa,oc]),$.useEffect(()=>{dt.current=da},[da]),$.useEffect(()=>{ue(!0)},[]),$.useEffect(()=>{const Ie=Ot.current;if(Ie){const xt=Ie.getBoundingClientRect().height;return ot(xt),y(jt=>[{toastId:h.id,height:xt,position:h.position},...jt]),()=>y(jt=>jt.filter(rr=>rr.toastId!==h.id))}},[y,h.id]),$.useLayoutEffect(()=>{if(!te)return;const Ie=Ot.current,xt=Ie.style.height;Ie.style.height="auto";const jt=Ie.getBoundingClientRect().height;Ie.style.height=xt,ot(jt),y(rr=>rr.find(Et=>Et.toastId===h.id)?rr.map(Et=>Et.toastId===h.id?{...Et,height:jt}:Et):[{toastId:h.id,height:jt,position:h.position},...rr])},[te,h.title,h.description,y,h.id,h.jsx,h.action,h.cancel]);const zr=$.useCallback(()=>{de(!0),Ne(Br.current),y(Ie=>Ie.filter(xt=>xt.toastId!==h.id)),setTimeout(()=>{T(h)},XD)},[h,T,y,Br]);$.useEffect(()=>{if(h.promise&&st==="loading"||h.duration===1/0||h.type==="loading")return;let Ie;return k||v||lo?(()=>{if(Si.current<so.current){const rr=new Date().getTime()-so.current;dt.current=dt.current-rr}Si.current=new Date().getTime()})():(()=>{dt.current!==1/0&&(so.current=new Date().getTime(),Ie=setTimeout(()=>{h.onAutoClose==null||h.onAutoClose.call(h,h),zr()},dt.current))})(),()=>clearTimeout(Ie)},[k,v,h,st,lo,zr]),$.useEffect(()=>{h.delete&&(zr(),h.onDismiss==null||h.onDismiss.call(h,h))},[zr,h.delete]);function Vs(){var Ie;if(Z!=null&&Z.loading){var xt;return $.createElement("div",{className:jn(K==null?void 0:K.loader,h==null||(xt=h.classNames)==null?void 0:xt.loader,"sonner-loader"),"data-visible":st==="loading"},Z.loading)}return $.createElement(CD,{className:jn(K==null?void 0:K.loader,h==null||(Ie=h.classNames)==null?void 0:Ie.loader),visible:st==="loading"})}const Oi=h.icon||(Z==null?void 0:Z[st])||PD(st);var Vn,Ks;return $.createElement("li",{tabIndex:0,ref:Ot,className:jn(H,ua,K==null?void 0:K.toast,h==null||(e=h.classNames)==null?void 0:e.toast,K==null?void 0:K.default,K==null?void 0:K[st],h==null||(r=h.classNames)==null?void 0:r[st]),"data-sonner-toast":"","data-rich-colors":(Vn=h.richColors)!=null?Vn:E,"data-styled":!(h.jsx||h.unstyled||g),"data-mounted":te,"data-promise":!!h.promise,"data-swiped":Oe,"data-removed":le,"data-visible":tr,"data-y-position":ic,"data-x-position":ac,"data-index":S,"data-front":Dr,"data-swiping":Re,"data-dismissible":Er,"data-type":st,"data-invert":Hs,"data-swipe-out":ne,"data-swipe-direction":L,"data-expanded":!!(k||V&&te),"data-testid":h.testId,style:{"--index":S,"--toasts-before":S,"--z-index":O.length-S,"--offset":`${le?Fe:Br.current}px`,"--initial-height":V?"auto":`${ft}px`,...j,...h.style},onDragEnd:()=>{pe(!1),z(null),ki.current=null},onPointerDown:Ie=>{Ie.button!==2&&(ha||!Er||(pr.current=new Date,Ne(Br.current),Ie.target.setPointerCapture(Ie.pointerId),Ie.target.tagName!=="BUTTON"&&(pe(!0),ki.current={x:Ie.clientX,y:Ie.clientY})))},onPointerUp:()=>{var Ie,xt,jt;if(ne||!Er)return;ki.current=null;const rr=Number(((Ie=Ot.current)==null?void 0:Ie.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Ei=Number(((xt=Ot.current)==null?void 0:xt.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Et=new Date().getTime()-((jt=pr.current)==null?void 0:jt.getTime()),zt=ee==="x"?rr:Ei,Ai=Math.abs(zt)/Et;if(Math.abs(zt)>=GD||Ai>.11){Ne(Br.current),h.onDismiss==null||h.onDismiss.call(h,h),W(ee==="x"?rr>0?"right":"left":Ei>0?"down":"up"),zr(),_e(!0);return}else{var Xt,Ar;(Xt=Ot.current)==null||Xt.style.setProperty("--swipe-amount-x","0px"),(Ar=Ot.current)==null||Ar.style.setProperty("--swipe-amount-y","0px")}ie(!1),pe(!1),z(null)},onPointerMove:Ie=>{var xt,jt,rr;if(!ki.current||!Er||((xt=window.getSelection())==null?void 0:xt.toString().length)>0)return;const Et=Ie.clientY-ki.current.y,zt=Ie.clientX-ki.current.x;var Ai;const Xt=(Ai=t.swipeDirections)!=null?Ai:YD(F);!ee&&(Math.abs(zt)>1||Math.abs(Et)>1)&&z(Math.abs(zt)>Math.abs(Et)?"x":"y");let Ar={x:0,y:0};const Pi=qr=>1/(1.5+Math.abs(qr)/20);if(ee==="y"){if(Xt.includes("top")||Xt.includes("bottom"))if(Xt.includes("top")&&Et<0||Xt.includes("bottom")&&Et>0)Ar.y=Et;else{const qr=Et*Pi(Et);Ar.y=Math.abs(qr)<Math.abs(Et)?qr:Et}}else if(ee==="x"&&(Xt.includes("left")||Xt.includes("right")))if(Xt.includes("left")&&zt<0||Xt.includes("right")&&zt>0)Ar.x=zt;else{const qr=zt*Pi(zt);Ar.x=Math.abs(qr)<Math.abs(zt)?qr:zt}(Math.abs(Ar.x)>0||Math.abs(Ar.y)>0)&&ie(!0),(jt=Ot.current)==null||jt.style.setProperty("--swipe-amount-x",`${Ar.x}px`),(rr=Ot.current)==null||rr.style.setProperty("--swipe-amount-y",`${Ar.y}px`)}},Ws&&!h.jsx&&st!=="loading"?$.createElement("button",{"aria-label":G,"data-disabled":ha,"data-close-button":!0,onClick:ha||!Er?()=>{}:()=>{zr(),h.onDismiss==null||h.onDismiss.call(h,h)},className:jn(K==null?void 0:K.closeButton,h==null||(n=h.classNames)==null?void 0:n.closeButton)},(Ks=Z==null?void 0:Z.close)!=null?Ks:ID):null,(st||h.icon||h.promise)&&h.icon!==null&&((Z==null?void 0:Z[st])!==null||h.icon)?$.createElement("div",{"data-icon":"",className:jn(K==null?void 0:K.icon,h==null||(i=h.classNames)==null?void 0:i.icon)},h.promise||h.type==="loading"&&!h.icon?h.icon||Vs():null,h.type!=="loading"?Oi:null):null,$.createElement("div",{"data-content":"",className:jn(K==null?void 0:K.content,h==null||(a=h.classNames)==null?void 0:a.content)},$.createElement("div",{"data-title":"",className:jn(K==null?void 0:K.title,h==null||(s=h.classNames)==null?void 0:s.title)},h.jsx?h.jsx:typeof h.title=="function"?h.title():h.title),h.description?$.createElement("div",{"data-description":"",className:jn(U,ca,K==null?void 0:K.description,h==null||(u=h.classNames)==null?void 0:u.description)},typeof h.description=="function"?h.description():h.description):null),$.isValidElement(h.cancel)?h.cancel:h.cancel&&gf(h.cancel)?$.createElement("button",{"data-button":!0,"data-cancel":!0,style:h.cancelButtonStyle||R,onClick:Ie=>{gf(h.cancel)&&Er&&(h.cancel.onClick==null||h.cancel.onClick.call(h.cancel,Ie),zr())},className:jn(K==null?void 0:K.cancelButton,h==null||(c=h.classNames)==null?void 0:c.cancelButton)},h.cancel.label):null,$.isValidElement(h.action)?h.action:h.action&&gf(h.action)?$.createElement("button",{"data-button":!0,"data-action":!0,style:h.actionButtonStyle||M,onClick:Ie=>{gf(h.action)&&(h.action.onClick==null||h.action.onClick.call(h.action,Ie),!Ie.defaultPrevented&&zr())},className:jn(K==null?void 0:K.actionButton,h==null||(f=h.classNames)==null?void 0:f.actionButton)},h.action.label):null)};function uk(){if(typeof window>"u"||typeof document>"u")return"ltr";const t=document.documentElement.getAttribute("dir");return t==="auto"||!t?window.getComputedStyle(document.documentElement).direction:t}function QD(t,e){const r={};return[t,e].forEach((n,i)=>{const a=i===1,s=a?"--mobile-offset":"--offset",u=a?HD:WD;function c(f){["top","right","bottom","left"].forEach(p=>{r[`${s}-${p}`]=typeof f=="number"?`${f}px`:f})}typeof n=="number"||typeof n=="string"?c(n):typeof n=="object"?["top","right","bottom","left"].forEach(f=>{n[f]===void 0?r[`${s}-${f}`]=u:r[`${s}-${f}`]=typeof n[f]=="number"?`${n[f]}px`:n[f]}):c(u)}),r}const ZD=$.forwardRef(function(e,r){const{id:n,invert:i,position:a="bottom-right",hotkey:s=["altKey","KeyT"],expand:u,closeButton:c,className:f,offset:p,mobileOffset:h,theme:g="light",richColors:v,duration:y,style:x,visibleToasts:b=FD,toastOptions:S,dir:O=uk(),gap:k=KD,icons:T,containerAriaLabel:E="Notifications"}=e,[A,j]=$.useState([]),R=$.useMemo(()=>n?A.filter(te=>te.toasterId===n):A.filter(te=>!te.toasterId),[A,n]),M=$.useMemo(()=>Array.from(new Set([a].concat(R.filter(te=>te.position).map(te=>te.position)))),[R,a]),[H,U]=$.useState([]),[B,F]=$.useState(!1),[J,V]=$.useState(!1),[K,Z]=$.useState(g!=="system"?g:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),G=$.useRef(null),ee=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),z=$.useRef(null),L=$.useRef(!1),W=$.useCallback(te=>{j(ue=>{var le;return(le=ue.find(de=>de.id===te.id))!=null&&le.delete||_r.dismiss(te.id),ue.filter(({id:de})=>de!==te.id)})},[]);return $.useEffect(()=>_r.subscribe(te=>{if(te.dismiss){requestAnimationFrame(()=>{j(ue=>ue.map(le=>le.id===te.id?{...le,delete:!0}:le))});return}setTimeout(()=>{ED.flushSync(()=>{j(ue=>{const le=ue.findIndex(de=>de.id===te.id);return le!==-1?[...ue.slice(0,le),{...ue[le],...te},...ue.slice(le+1)]:[te,...ue]})})})}),[A]),$.useEffect(()=>{if(g!=="system"){Z(g);return}if(g==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?Z("dark"):Z("light")),typeof window>"u")return;const te=window.matchMedia("(prefers-color-scheme: dark)");try{te.addEventListener("change",({matches:ue})=>{Z(ue?"dark":"light")})}catch{te.addListener(({matches:le})=>{try{Z(le?"dark":"light")}catch(de){console.error(de)}})}},[g]),$.useEffect(()=>{A.length<=1&&F(!1)},[A]),$.useEffect(()=>{const te=ue=>{var le;if(s.every(pe=>ue[pe]||ue.code===pe)){var Re;F(!0),(Re=G.current)==null||Re.focus()}ue.code==="Escape"&&(document.activeElement===G.current||(le=G.current)!=null&&le.contains(document.activeElement))&&F(!1)};return document.addEventListener("keydown",te),()=>document.removeEventListener("keydown",te)},[s]),$.useEffect(()=>{if(G.current)return()=>{z.current&&(z.current.focus({preventScroll:!0}),z.current=null,L.current=!1)}},[G.current]),$.createElement("section",{ref:r,"aria-label":`${E} ${ee}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},M.map((te,ue)=>{var le;const[de,Re]=te.split("-");return R.length?$.createElement("ol",{key:te,dir:O==="auto"?uk():O,tabIndex:-1,ref:G,className:f,"data-sonner-toaster":!0,"data-sonner-theme":K,"data-y-position":de,"data-x-position":Re,style:{"--front-toast-height":`${((le=H[0])==null?void 0:le.height)||0}px`,"--width":`${VD}px`,"--gap":`${k}px`,...x,...QD(p,h)},onBlur:pe=>{L.current&&!pe.currentTarget.contains(pe.relatedTarget)&&(L.current=!1,z.current&&(z.current.focus({preventScroll:!0}),z.current=null))},onFocus:pe=>{pe.target instanceof HTMLElement&&pe.target.dataset.dismissible==="false"||L.current||(L.current=!0,z.current=pe.relatedTarget)},onMouseEnter:()=>F(!0),onMouseMove:()=>F(!0),onMouseLeave:()=>{J||F(!1)},onDragEnd:()=>F(!1),onPointerDown:pe=>{pe.target instanceof HTMLElement&&pe.target.dataset.dismissible==="false"||V(!0)},onPointerUp:()=>V(!1)},R.filter(pe=>!pe.position&&ue===0||pe.position===te).map((pe,ne)=>{var _e,Oe;return $.createElement(JD,{key:pe.id,icons:T,index:ne,toast:pe,defaultRichColors:v,duration:(_e=S==null?void 0:S.duration)!=null?_e:y,className:S==null?void 0:S.className,descriptionClassName:S==null?void 0:S.descriptionClassName,invert:i,visibleToasts:b,closeButton:(Oe=S==null?void 0:S.closeButton)!=null?Oe:c,interacting:J,position:te,style:S==null?void 0:S.style,unstyled:S==null?void 0:S.unstyled,classNames:S==null?void 0:S.classNames,cancelButtonStyle:S==null?void 0:S.cancelButtonStyle,actionButtonStyle:S==null?void 0:S.actionButtonStyle,closeButtonAriaLabel:S==null?void 0:S.closeButtonAriaLabel,removeToast:W,toasts:R.filter(ie=>ie.position==pe.position),heights:H.filter(ie=>ie.position==pe.position),setHeights:U,expandByDefault:u,gap:k,expanded:B,swipeDirections:e.swipeDirections})})):null}))});function vj(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e<i;e++)t[e]&&(r=vj(t[e]))&&(n&&(n+=" "),n+=r)}else for(r in t)t[r]&&(n&&(n+=" "),n+=r);return n}function Le(){for(var t,e,r=0,n="",i=arguments.length;r<i;r++)(t=arguments[r])&&(e=vj(t))&&(n&&(n+=" "),n+=e);return n}const e4=(t,e)=>{const r=new Array(t.length+e.length);for(let n=0;n<t.length;n++)r[n]=t[n];for(let n=0;n<e.length;n++)r[t.length+n]=e[n];return r},t4=(t,e)=>({classGroupId:t,validator:e}),yj=(t=new Map,e=null,r)=>({nextPart:t,validators:e,classGroupId:r}),Qf="-",ck=[],r4="arbitrary..",n4=t=>{const e=a4(t),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=t;return{getClassGroupId:s=>{if(s.startsWith("[")&&s.endsWith("]"))return i4(s);const u=s.split(Qf),c=u[0]===""&&u.length>1?1:0;return bj(u,c,e)},getConflictingClassGroupIds:(s,u)=>{if(u){const c=n[s],f=r[s];return c?f?e4(f,c):c:f||ck}return r[s]||ck}}},bj=(t,e,r)=>{if(t.length-e===0)return r.classGroupId;const i=t[e],a=r.nextPart.get(i);if(a){const f=bj(t,e+1,a);if(f)return f}const s=r.validators;if(s===null)return;const u=e===0?t.join(Qf):t.slice(e).join(Qf),c=s.length;for(let f=0;f<c;f++){const p=s[f];if(p.validator(u))return p.classGroupId}},i4=t=>t.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const e=t.slice(1,-1),r=e.indexOf(":"),n=e.slice(0,r);return n?r4+n:void 0})(),a4=t=>{const{theme:e,classGroups:r}=t;return o4(r,e)},o4=(t,e)=>{const r=yj();for(const n in t){const i=t[n];rx(i,r,n,e)}return r},rx=(t,e,r,n)=>{const i=t.length;for(let a=0;a<i;a++){const s=t[a];s4(s,e,r,n)}},s4=(t,e,r,n)=>{if(typeof t=="string"){l4(t,e,r);return}if(typeof t=="function"){u4(t,e,r,n);return}c4(t,e,r,n)},l4=(t,e,r)=>{const n=t===""?e:wj(e,t);n.classGroupId=r},u4=(t,e,r,n)=>{if(f4(t)){rx(t(n),e,r,n);return}e.validators===null&&(e.validators=[]),e.validators.push(t4(r,t))},c4=(t,e,r,n)=>{const i=Object.entries(t),a=i.length;for(let s=0;s<a;s++){const[u,c]=i[s];rx(c,wj(e,u),r,n)}},wj=(t,e)=>{let r=t;const n=e.split(Qf),i=n.length;for(let a=0;a<i;a++){const s=n[a];let u=r.nextPart.get(s);u||(u=yj(),r.nextPart.set(s,u)),r=u}return r},f4=t=>"isThemeGetter"in t&&t.isThemeGetter===!0,d4=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,r=Object.create(null),n=Object.create(null);const i=(a,s)=>{r[a]=s,e++,e>t&&(e=0,n=r,r=Object.create(null))};return{get(a){let s=r[a];if(s!==void 0)return s;if((s=n[a])!==void 0)return i(a,s),s},set(a,s){a in r?r[a]=s:i(a,s)}}},sb="!",fk=":",h4=[],dk=(t,e,r,n,i)=>({modifiers:t,hasImportantModifier:e,baseClassName:r,maybePostfixModifierPosition:n,isExternal:i}),p4=t=>{const{prefix:e,experimentalParseClassName:r}=t;let n=i=>{const a=[];let s=0,u=0,c=0,f;const p=i.length;for(let x=0;x<p;x++){const b=i[x];if(s===0&&u===0){if(b===fk){a.push(i.slice(c,x)),c=x+1;continue}if(b==="/"){f=x;continue}}b==="["?s++:b==="]"?s--:b==="("?u++:b===")"&&u--}const h=a.length===0?i:i.slice(c);let g=h,v=!1;h.endsWith(sb)?(g=h.slice(0,-1),v=!0):h.startsWith(sb)&&(g=h.slice(1),v=!0);const y=f&&f>c?f-c:void 0;return dk(a,v,g,y)};if(e){const i=e+fk,a=n;n=s=>s.startsWith(i)?a(s.slice(i.length)):dk(h4,!1,s,void 0,!0)}if(r){const i=n;n=a=>r({className:a,parseClassName:i})}return n},m4=t=>{const e=new Map;return t.orderSensitiveModifiers.forEach((r,n)=>{e.set(r,1e6+n)}),r=>{const n=[];let i=[];for(let a=0;a<r.length;a++){const s=r[a],u=s[0]==="[",c=e.has(s);u||c?(i.length>0&&(i.sort(),n.push(...i),i=[]),n.push(s)):i.push(s)}return i.length>0&&(i.sort(),n.push(...i)),n}},g4=t=>({cache:d4(t.cacheSize),parseClassName:p4(t),sortModifiers:m4(t),postfixLookupClassGroupIds:v4(t),...n4(t)}),v4=t=>{const e=Object.create(null),r=t.postfixLookupClassGroups;if(r)for(let n=0;n<r.length;n++)e[r[n]]=!0;return e},y4=/\s+/,b4=(t,e)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:s}=e,u=[],c=t.trim().split(y4);let f="";for(let p=c.length-1;p>=0;p-=1){const h=c[p],{isExternal:g,modifiers:v,hasImportantModifier:y,baseClassName:x,maybePostfixModifierPosition:b}=r(h);if(g){f=h+(f.length>0?" "+f:f);continue}let S=!!b,O;if(S){const j=x.substring(0,b);O=n(j);const R=O&&s[O]?n(x):void 0;R&&R!==O&&(O=R,S=!1)}else O=n(x);if(!O){if(!S){f=h+(f.length>0?" "+f:f);continue}if(O=n(x),!O){f=h+(f.length>0?" "+f:f);continue}S=!1}const k=v.length===0?"":v.length===1?v[0]:a(v).join(":"),T=y?k+sb:k,E=T+O;if(u.indexOf(E)>-1)continue;u.push(E);const A=i(O,S);for(let j=0;j<A.length;++j){const R=A[j];u.push(T+R)}f=h+(f.length>0?" "+f:f)}return f},w4=(...t)=>{let e=0,r,n,i="";for(;e<t.length;)(r=t[e++])&&(n=xj(r))&&(i&&(i+=" "),i+=n);return i},xj=t=>{if(typeof t=="string")return t;let e,r="";for(let n=0;n<t.length;n++)t[n]&&(e=xj(t[n]))&&(r&&(r+=" "),r+=e);return r},x4=(t,...e)=>{let r,n,i,a;const s=c=>{const f=e.reduce((p,h)=>h(p),t());return r=g4(f),n=r.cache.get,i=r.cache.set,a=u,u(c)},u=c=>{const f=n(c);if(f)return f;const p=b4(c,r);return i(c,p),p};return a=s,(...c)=>a(w4(...c))},_4=[],$t=t=>{const e=r=>r[t]||_4;return e.isThemeGetter=!0,e},_j=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Sj=/^\((?:(\w[\w-]*):)?(.+)\)$/i,S4=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,k4=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,O4=/\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$/,E4=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,A4=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,P4=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Gi=t=>S4.test(t),De=t=>!!t&&!Number.isNaN(Number(t)),Rn=t=>!!t&&Number.isInteger(Number(t)),Xm=t=>t.endsWith("%")&&De(t.slice(0,-1)),ti=t=>k4.test(t),kj=()=>!0,T4=t=>O4.test(t)&&!E4.test(t),nx=()=>!1,C4=t=>A4.test(t),j4=t=>P4.test(t),R4=t=>!ge(t)&&!ye(t),N4=t=>t.startsWith("@container")&&(t[10]==="/"&&t[11]!==void 0||t[11]==="s"&&t[16]!==void 0&&t.startsWith("-size/",10)||t[11]==="n"&&t[18]!==void 0&&t.startsWith("-normal/",10)),$4=t=>na(t,Aj,nx),ge=t=>_j.test(t),Aa=t=>na(t,Pj,T4),hk=t=>na(t,U4,De),I4=t=>na(t,Cj,kj),M4=t=>na(t,Tj,nx),pk=t=>na(t,Oj,nx),L4=t=>na(t,Ej,j4),vf=t=>na(t,jj,C4),ye=t=>Sj.test(t),Cl=t=>eo(t,Pj),D4=t=>eo(t,Tj),mk=t=>eo(t,Oj),B4=t=>eo(t,Aj),z4=t=>eo(t,Ej),yf=t=>eo(t,jj,!0),q4=t=>eo(t,Cj,!0),na=(t,e,r)=>{const n=_j.exec(t);return n?n[1]?e(n[1]):r(n[2]):!1},eo=(t,e,r=!1)=>{const n=Sj.exec(t);return n?n[1]?e(n[1]):r:!1},Oj=t=>t==="position"||t==="percentage",Ej=t=>t==="image"||t==="url",Aj=t=>t==="length"||t==="size"||t==="bg-size",Pj=t=>t==="length",U4=t=>t==="number",Tj=t=>t==="family-name",Cj=t=>t==="number"||t==="weight",jj=t=>t==="shadow",F4=()=>{const t=$t("color"),e=$t("font"),r=$t("text"),n=$t("font-weight"),i=$t("tracking"),a=$t("leading"),s=$t("breakpoint"),u=$t("container"),c=$t("spacing"),f=$t("radius"),p=$t("shadow"),h=$t("inset-shadow"),g=$t("text-shadow"),v=$t("drop-shadow"),y=$t("blur"),x=$t("perspective"),b=$t("aspect"),S=$t("ease"),O=$t("animate"),k=()=>["auto","avoid","all","avoid-page","page","left","right","column"],T=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],E=()=>[...T(),ye,ge],A=()=>["auto","hidden","clip","visible","scroll"],j=()=>["auto","contain","none"],R=()=>[ye,ge,c],M=()=>[Gi,"full","auto",...R()],H=()=>[Rn,"none","subgrid",ye,ge],U=()=>["auto",{span:["full",Rn,ye,ge]},Rn,ye,ge],B=()=>[Rn,"auto",ye,ge],F=()=>["auto","min","max","fr",ye,ge],J=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],V=()=>["start","end","center","stretch","center-safe","end-safe"],K=()=>["auto",...R()],Z=()=>[Gi,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...R()],G=()=>[Gi,"screen","full","dvw","lvw","svw","min","max","fit",...R()],ee=()=>[Gi,"screen","full","lh","dvh","lvh","svh","min","max","fit",...R()],z=()=>[t,ye,ge],L=()=>[...T(),mk,pk,{position:[ye,ge]}],W=()=>["no-repeat",{repeat:["","x","y","space","round"]}],te=()=>["auto","cover","contain",B4,$4,{size:[ye,ge]}],ue=()=>[Xm,Cl,Aa],le=()=>["","none","full",f,ye,ge],de=()=>["",De,Cl,Aa],Re=()=>["solid","dashed","dotted","double"],pe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ne=()=>[De,Xm,mk,pk],_e=()=>["","none",y,ye,ge],Oe=()=>["none",De,ye,ge],ie=()=>["none",De,ye,ge],Fe=()=>[De,ye,ge],Ne=()=>[Gi,"full",...R()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ti],breakpoint:[ti],color:[kj],container:[ti],"drop-shadow":[ti],ease:["in","out","in-out"],font:[R4],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ti],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ti],shadow:[ti],spacing:["px",De],text:[ti],"text-shadow":[ti],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Gi,ge,ye,b]}],container:["container"],"container-type":[{"@container":["","normal","size",ye,ge]}],"container-named":[N4],columns:[{columns:[De,ge,ye,u]}],"break-after":[{"break-after":k()}],"break-before":[{"break-before":k()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:E()}],overflow:[{overflow:A()}],"overflow-x":[{"overflow-x":A()}],"overflow-y":[{"overflow-y":A()}],overscroll:[{overscroll:j()}],"overscroll-x":[{"overscroll-x":j()}],"overscroll-y":[{"overscroll-y":j()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:M()}],"inset-x":[{"inset-x":M()}],"inset-y":[{"inset-y":M()}],start:[{"inset-s":M(),start:M()}],end:[{"inset-e":M(),end:M()}],"inset-bs":[{"inset-bs":M()}],"inset-be":[{"inset-be":M()}],top:[{top:M()}],right:[{right:M()}],bottom:[{bottom:M()}],left:[{left:M()}],visibility:["visible","invisible","collapse"],z:[{z:[Rn,"auto",ye,ge]}],basis:[{basis:[Gi,"full","auto",u,...R()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[De,Gi,"auto","initial","none",ge]}],grow:[{grow:["",De,ye,ge]}],shrink:[{shrink:["",De,ye,ge]}],order:[{order:[Rn,"first","last","none",ye,ge]}],"grid-cols":[{"grid-cols":H()}],"col-start-end":[{col:U()}],"col-start":[{"col-start":B()}],"col-end":[{"col-end":B()}],"grid-rows":[{"grid-rows":H()}],"row-start-end":[{row:U()}],"row-start":[{"row-start":B()}],"row-end":[{"row-end":B()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":F()}],"auto-rows":[{"auto-rows":F()}],gap:[{gap:R()}],"gap-x":[{"gap-x":R()}],"gap-y":[{"gap-y":R()}],"justify-content":[{justify:[...J(),"normal"]}],"justify-items":[{"justify-items":[...V(),"normal"]}],"justify-self":[{"justify-self":["auto",...V()]}],"align-content":[{content:["normal",...J()]}],"align-items":[{items:[...V(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...V(),{baseline:["","last"]}]}],"place-content":[{"place-content":J()}],"place-items":[{"place-items":[...V(),"baseline"]}],"place-self":[{"place-self":["auto",...V()]}],p:[{p:R()}],px:[{px:R()}],py:[{py:R()}],ps:[{ps:R()}],pe:[{pe:R()}],pbs:[{pbs:R()}],pbe:[{pbe:R()}],pt:[{pt:R()}],pr:[{pr:R()}],pb:[{pb:R()}],pl:[{pl:R()}],m:[{m:K()}],mx:[{mx:K()}],my:[{my:K()}],ms:[{ms:K()}],me:[{me:K()}],mbs:[{mbs:K()}],mbe:[{mbe:K()}],mt:[{mt:K()}],mr:[{mr:K()}],mb:[{mb:K()}],ml:[{ml:K()}],"space-x":[{"space-x":R()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":R()}],"space-y-reverse":["space-y-reverse"],size:[{size:Z()}],"inline-size":[{inline:["auto",...G()]}],"min-inline-size":[{"min-inline":["auto",...G()]}],"max-inline-size":[{"max-inline":["none",...G()]}],"block-size":[{block:["auto",...ee()]}],"min-block-size":[{"min-block":["auto",...ee()]}],"max-block-size":[{"max-block":["none",...ee()]}],w:[{w:[u,"screen",...Z()]}],"min-w":[{"min-w":[u,"screen","none",...Z()]}],"max-w":[{"max-w":[u,"screen","none","prose",{screen:[s]},...Z()]}],h:[{h:["screen","lh",...Z()]}],"min-h":[{"min-h":["screen","lh","none",...Z()]}],"max-h":[{"max-h":["screen","lh",...Z()]}],"font-size":[{text:["base",r,Cl,Aa]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,q4,I4]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Xm,ge]}],"font-family":[{font:[D4,M4,e]}],"font-features":[{"font-features":[ge]}],"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:[i,ye,ge]}],"line-clamp":[{"line-clamp":[De,"none",ye,hk]}],leading:[{leading:[a,...R()]}],"list-image":[{"list-image":["none",ye,ge]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ye,ge]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:z()}],"text-color":[{text:z()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Re(),"wavy"]}],"text-decoration-thickness":[{decoration:[De,"from-font","auto",ye,Aa]}],"text-decoration-color":[{decoration:z()}],"underline-offset":[{"underline-offset":[De,"auto",ye,ge]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:R()}],"tab-size":[{tab:[Rn,ye,ge]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ye,ge]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ye,ge]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:L()}],"bg-repeat":[{bg:W()}],"bg-size":[{bg:te()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Rn,ye,ge],radial:["",ye,ge],conic:[Rn,ye,ge]},z4,L4]}],"bg-color":[{bg:z()}],"gradient-from-pos":[{from:ue()}],"gradient-via-pos":[{via:ue()}],"gradient-to-pos":[{to:ue()}],"gradient-from":[{from:z()}],"gradient-via":[{via:z()}],"gradient-to":[{to:z()}],rounded:[{rounded:le()}],"rounded-s":[{"rounded-s":le()}],"rounded-e":[{"rounded-e":le()}],"rounded-t":[{"rounded-t":le()}],"rounded-r":[{"rounded-r":le()}],"rounded-b":[{"rounded-b":le()}],"rounded-l":[{"rounded-l":le()}],"rounded-ss":[{"rounded-ss":le()}],"rounded-se":[{"rounded-se":le()}],"rounded-ee":[{"rounded-ee":le()}],"rounded-es":[{"rounded-es":le()}],"rounded-tl":[{"rounded-tl":le()}],"rounded-tr":[{"rounded-tr":le()}],"rounded-br":[{"rounded-br":le()}],"rounded-bl":[{"rounded-bl":le()}],"border-w":[{border:de()}],"border-w-x":[{"border-x":de()}],"border-w-y":[{"border-y":de()}],"border-w-s":[{"border-s":de()}],"border-w-e":[{"border-e":de()}],"border-w-bs":[{"border-bs":de()}],"border-w-be":[{"border-be":de()}],"border-w-t":[{"border-t":de()}],"border-w-r":[{"border-r":de()}],"border-w-b":[{"border-b":de()}],"border-w-l":[{"border-l":de()}],"divide-x":[{"divide-x":de()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":de()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Re(),"hidden","none"]}],"divide-style":[{divide:[...Re(),"hidden","none"]}],"border-color":[{border:z()}],"border-color-x":[{"border-x":z()}],"border-color-y":[{"border-y":z()}],"border-color-s":[{"border-s":z()}],"border-color-e":[{"border-e":z()}],"border-color-bs":[{"border-bs":z()}],"border-color-be":[{"border-be":z()}],"border-color-t":[{"border-t":z()}],"border-color-r":[{"border-r":z()}],"border-color-b":[{"border-b":z()}],"border-color-l":[{"border-l":z()}],"divide-color":[{divide:z()}],"outline-style":[{outline:[...Re(),"none","hidden"]}],"outline-offset":[{"outline-offset":[De,ye,ge]}],"outline-w":[{outline:["",De,Cl,Aa]}],"outline-color":[{outline:z()}],shadow:[{shadow:["","none",p,yf,vf]}],"shadow-color":[{shadow:z()}],"inset-shadow":[{"inset-shadow":["none",h,yf,vf]}],"inset-shadow-color":[{"inset-shadow":z()}],"ring-w":[{ring:de()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:z()}],"ring-offset-w":[{"ring-offset":[De,Aa]}],"ring-offset-color":[{"ring-offset":z()}],"inset-ring-w":[{"inset-ring":de()}],"inset-ring-color":[{"inset-ring":z()}],"text-shadow":[{"text-shadow":["none",g,yf,vf]}],"text-shadow-color":[{"text-shadow":z()}],opacity:[{opacity:[De,ye,ge]}],"mix-blend":[{"mix-blend":[...pe(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":pe()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[De]}],"mask-image-linear-from-pos":[{"mask-linear-from":ne()}],"mask-image-linear-to-pos":[{"mask-linear-to":ne()}],"mask-image-linear-from-color":[{"mask-linear-from":z()}],"mask-image-linear-to-color":[{"mask-linear-to":z()}],"mask-image-t-from-pos":[{"mask-t-from":ne()}],"mask-image-t-to-pos":[{"mask-t-to":ne()}],"mask-image-t-from-color":[{"mask-t-from":z()}],"mask-image-t-to-color":[{"mask-t-to":z()}],"mask-image-r-from-pos":[{"mask-r-from":ne()}],"mask-image-r-to-pos":[{"mask-r-to":ne()}],"mask-image-r-from-color":[{"mask-r-from":z()}],"mask-image-r-to-color":[{"mask-r-to":z()}],"mask-image-b-from-pos":[{"mask-b-from":ne()}],"mask-image-b-to-pos":[{"mask-b-to":ne()}],"mask-image-b-from-color":[{"mask-b-from":z()}],"mask-image-b-to-color":[{"mask-b-to":z()}],"mask-image-l-from-pos":[{"mask-l-from":ne()}],"mask-image-l-to-pos":[{"mask-l-to":ne()}],"mask-image-l-from-color":[{"mask-l-from":z()}],"mask-image-l-to-color":[{"mask-l-to":z()}],"mask-image-x-from-pos":[{"mask-x-from":ne()}],"mask-image-x-to-pos":[{"mask-x-to":ne()}],"mask-image-x-from-color":[{"mask-x-from":z()}],"mask-image-x-to-color":[{"mask-x-to":z()}],"mask-image-y-from-pos":[{"mask-y-from":ne()}],"mask-image-y-to-pos":[{"mask-y-to":ne()}],"mask-image-y-from-color":[{"mask-y-from":z()}],"mask-image-y-to-color":[{"mask-y-to":z()}],"mask-image-radial":[{"mask-radial":[ye,ge]}],"mask-image-radial-from-pos":[{"mask-radial-from":ne()}],"mask-image-radial-to-pos":[{"mask-radial-to":ne()}],"mask-image-radial-from-color":[{"mask-radial-from":z()}],"mask-image-radial-to-color":[{"mask-radial-to":z()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":T()}],"mask-image-conic-pos":[{"mask-conic":[De]}],"mask-image-conic-from-pos":[{"mask-conic-from":ne()}],"mask-image-conic-to-pos":[{"mask-conic-to":ne()}],"mask-image-conic-from-color":[{"mask-conic-from":z()}],"mask-image-conic-to-color":[{"mask-conic-to":z()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:L()}],"mask-repeat":[{mask:W()}],"mask-size":[{mask:te()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ye,ge]}],filter:[{filter:["","none",ye,ge]}],blur:[{blur:_e()}],brightness:[{brightness:[De,ye,ge]}],contrast:[{contrast:[De,ye,ge]}],"drop-shadow":[{"drop-shadow":["","none",v,yf,vf]}],"drop-shadow-color":[{"drop-shadow":z()}],grayscale:[{grayscale:["",De,ye,ge]}],"hue-rotate":[{"hue-rotate":[De,ye,ge]}],invert:[{invert:["",De,ye,ge]}],saturate:[{saturate:[De,ye,ge]}],sepia:[{sepia:["",De,ye,ge]}],"backdrop-filter":[{"backdrop-filter":["","none",ye,ge]}],"backdrop-blur":[{"backdrop-blur":_e()}],"backdrop-brightness":[{"backdrop-brightness":[De,ye,ge]}],"backdrop-contrast":[{"backdrop-contrast":[De,ye,ge]}],"backdrop-grayscale":[{"backdrop-grayscale":["",De,ye,ge]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[De,ye,ge]}],"backdrop-invert":[{"backdrop-invert":["",De,ye,ge]}],"backdrop-opacity":[{"backdrop-opacity":[De,ye,ge]}],"backdrop-saturate":[{"backdrop-saturate":[De,ye,ge]}],"backdrop-sepia":[{"backdrop-sepia":["",De,ye,ge]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":R()}],"border-spacing-x":[{"border-spacing-x":R()}],"border-spacing-y":[{"border-spacing-y":R()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ye,ge]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[De,"initial",ye,ge]}],ease:[{ease:["linear","initial",S,ye,ge]}],delay:[{delay:[De,ye,ge]}],animate:[{animate:["none",O,ye,ge]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[x,ye,ge]}],"perspective-origin":[{"perspective-origin":E()}],rotate:[{rotate:Oe()}],"rotate-x":[{"rotate-x":Oe()}],"rotate-y":[{"rotate-y":Oe()}],"rotate-z":[{"rotate-z":Oe()}],scale:[{scale:ie()}],"scale-x":[{"scale-x":ie()}],"scale-y":[{"scale-y":ie()}],"scale-z":[{"scale-z":ie()}],"scale-3d":["scale-3d"],skew:[{skew:Fe()}],"skew-x":[{"skew-x":Fe()}],"skew-y":[{"skew-y":Fe()}],transform:[{transform:[ye,ge,"","none","gpu","cpu"]}],"transform-origin":[{origin:E()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Ne()}],"translate-x":[{"translate-x":Ne()}],"translate-y":[{"translate-y":Ne()}],"translate-z":[{"translate-z":Ne()}],"translate-none":["translate-none"],zoom:[{zoom:[Rn,ye,ge]}],accent:[{accent:z()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:z()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ye,ge]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":z()}],"scrollbar-track-color":[{"scrollbar-track":z()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":R()}],"scroll-mx":[{"scroll-mx":R()}],"scroll-my":[{"scroll-my":R()}],"scroll-ms":[{"scroll-ms":R()}],"scroll-me":[{"scroll-me":R()}],"scroll-mbs":[{"scroll-mbs":R()}],"scroll-mbe":[{"scroll-mbe":R()}],"scroll-mt":[{"scroll-mt":R()}],"scroll-mr":[{"scroll-mr":R()}],"scroll-mb":[{"scroll-mb":R()}],"scroll-ml":[{"scroll-ml":R()}],"scroll-p":[{"scroll-p":R()}],"scroll-px":[{"scroll-px":R()}],"scroll-py":[{"scroll-py":R()}],"scroll-ps":[{"scroll-ps":R()}],"scroll-pe":[{"scroll-pe":R()}],"scroll-pbs":[{"scroll-pbs":R()}],"scroll-pbe":[{"scroll-pbe":R()}],"scroll-pt":[{"scroll-pt":R()}],"scroll-pr":[{"scroll-pr":R()}],"scroll-pb":[{"scroll-pb":R()}],"scroll-pl":[{"scroll-pl":R()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ye,ge]}],fill:[{fill:["none",...z()]}],"stroke-w":[{stroke:[De,Cl,Aa,hk]}],stroke:[{stroke:["none",...z()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","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","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","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-pbs","scroll-pbe","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"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},W4=x4(F4);function Fl(...t){return W4(Le(t))}const H4="M147.692 55C178.28 55.0001 203.077 79.7968 203.077 110.385C203.077 140.089 179.692 164.331 150.327 165.706C126.508 171.901 108.924 193.549 108.924 219.308C108.924 222.879 109.261 226.372 109.907 229.755C109.903 229.756 109.898 229.755 109.894 229.756C110.468 232.955 110.77 236.25 110.77 239.615C110.77 242.98 110.468 246.274 109.894 249.474C109.898 249.474 109.903 249.475 109.907 249.476C109.261 252.859 108.924 256.351 108.924 259.923C108.924 285.68 126.507 307.329 150.325 313.524C179.691 314.899 203.077 339.14 203.077 368.846C203.077 399.434 178.28 424.23 147.692 424.23C117.104 424.23 92.3076 399.434 92.3076 368.846C92.3076 364.539 92.7986 360.348 93.7285 356.324C94.007 354.075 94.1543 351.785 94.1543 349.461C94.1541 321.662 73.6718 298.647 46.9756 294.682C46.9934 294.579 47.0138 294.477 47.0322 294.374C20.4072 290.347 2.80541e-05 267.364 0 239.615C0 211.866 20.4071 188.883 47.0322 184.855C47.0139 184.753 46.9934 184.651 46.9756 184.549C73.6719 180.584 94.1542 157.569 94.1543 129.77C94.1543 127.445 94.0063 125.154 93.7275 122.904C92.7979 118.881 92.3076 114.69 92.3076 110.385C92.3076 79.7967 117.104 55 147.692 55ZM332.308 55C362.896 55 387.692 79.7967 387.692 110.385C387.692 115.136 387.093 119.747 385.968 124.147C385.781 125.996 385.683 127.872 385.683 129.77C385.683 157.569 406.165 180.584 432.861 184.549C432.845 184.643 432.826 184.738 432.809 184.832C459.511 188.792 480 211.811 480 239.615C480 267.419 459.511 290.438 432.809 294.397C432.826 294.492 432.845 294.587 432.861 294.682C406.165 298.647 385.683 321.661 385.683 349.461C385.683 351.358 385.781 353.233 385.968 355.081C387.093 359.482 387.692 364.094 387.692 368.846C387.692 399.434 362.896 424.23 332.308 424.23C301.72 424.23 276.923 399.434 276.923 368.846C276.923 364.537 277.414 360.344 278.345 356.318C278.622 354.071 278.77 351.783 278.77 349.461C278.769 321.661 258.287 298.647 231.591 294.682C231.609 294.579 231.629 294.477 231.647 294.374C205.022 290.347 184.615 267.364 184.615 239.615C184.615 209.027 209.412 184.23 240 184.23C270.588 184.231 295.385 209.027 295.385 239.615C295.385 242.98 295.084 246.274 294.509 249.474C294.513 249.474 294.518 249.475 294.522 249.476C293.877 252.859 293.539 256.351 293.539 259.923C293.539 284.692 309.798 305.661 332.226 312.744C354.653 305.661 370.913 284.692 370.913 259.923C370.913 256.351 370.576 252.859 369.93 249.476C369.987 249.467 370.044 249.46 370.102 249.451C369.529 246.259 369.23 242.972 369.23 239.615C369.23 236.259 369.528 232.971 370.101 229.779C370.044 229.771 369.986 229.764 369.93 229.756C370.576 226.372 370.913 222.879 370.913 219.308C370.913 193.537 353.312 171.881 329.476 165.697C300.204 164.223 276.923 140.023 276.923 110.385C276.923 79.7967 301.72 55 332.308 55Z";function Jo({height:t=32}){const e=Math.round(t*1);return P.jsxs("svg",{width:e,height:t,viewBox:"0 0 480 480",fill:"none","aria-hidden":!0,children:[P.jsx("path",{d:H4,fill:"url(#io-grad)"}),P.jsx("defs",{children:P.jsxs("linearGradient",{id:"io-grad",x1:"0",x2:"450.529",y1:"402",y2:"69.3087",gradientUnits:"userSpaceOnUse",children:[P.jsx("stop",{stopColor:"#D83333"}),P.jsx("stop",{offset:"0.515",stopColor:"#E43A9C"}),P.jsx("stop",{offset:"1",stopColor:"#F041FF"})]})})]})}function V4({status:t}){const e={connected:"bg-green-500",idle:"bg-green-500",disconnected:"bg-zinc-600",error:"bg-red-500",working:"bg-amber-400",reviewing:"bg-blue-400"}[t],r=t==="connected"||t==="working";return P.jsxs("span",{className:"relative inline-flex items-center justify-center w-2 h-2",children:[r&&P.jsx("span",{className:`absolute inline-flex h-full w-full rounded-full ${e} opacity-40 animate-ping`}),P.jsx("span",{className:`relative inline-flex rounded-full h-2 w-2 ${e}`})]})}function ui({children:t,variant:e="muted",className:r=""}){const n={default:"bg-[#E43A9C]/15 text-[#F041FF] border-[#E43A9C]/20",success:"bg-green-500/15 text-green-400 border-green-500/20",warning:"bg-amber-500/15 text-amber-400 border-amber-500/20",error:"bg-red-500/15 text-red-400 border-red-500/20",info:"bg-blue-500/15 text-blue-400 border-blue-500/20",muted:"bg-white/5 text-zinc-400 border-white/10"}[e];return P.jsx("span",{className:`inline-flex items-center px-2 py-px rounded-full text-[10px] font-mono border ${n} ${r}`,children:t})}function Ka({children:t,onClick:e,className:r="",type:n="button",disabled:i=!1}){return P.jsx("button",{type:n,onClick:e,disabled:i,className:`flex items-center gap-1.5 font-mono text-[11px] text-white rounded-lg active:opacity-80 primary-btn disabled:opacity-50 ${r}`,children:t})}function Zf({children:t,onClick:e,className:r=""}){return P.jsx("button",{type:"button",onClick:e,className:`flex items-center gap-1.5 px-2.5 py-1 rounded-lg font-mono text-[11px] text-zinc-400 bg-[#252525] hover:bg-[#2e2e2e] hover:text-zinc-100 transition-colors ${r}`,children:t})}function Kf(t){return t==="connected"||t==="idle"?"success":t==="working"?"warning":t==="reviewing"?"info":t==="error"?"error":"muted"}/**
|
|
52
|
-
* @license lucide-react v0.487.0 - ISC
|
|
53
|
-
*
|
|
54
|
-
* This source code is licensed under the ISC license.
|
|
55
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
56
|
-
*/const K4=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),G4=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,r,n)=>n?n.toUpperCase():r.toLowerCase()),gk=t=>{const e=G4(t);return e.charAt(0).toUpperCase()+e.slice(1)},Rj=(...t)=>t.filter((e,r,n)=>!!e&&e.trim()!==""&&n.indexOf(e)===r).join(" ").trim();/**
|
|
57
|
-
* @license lucide-react v0.487.0 - ISC
|
|
58
|
-
*
|
|
59
|
-
* This source code is licensed under the ISC license.
|
|
60
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
61
|
-
*/var X4={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"};/**
|
|
62
|
-
* @license lucide-react v0.487.0 - ISC
|
|
63
|
-
*
|
|
64
|
-
* This source code is licensed under the ISC license.
|
|
65
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
66
|
-
*/const Y4=N.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:i="",children:a,iconNode:s,...u},c)=>N.createElement("svg",{ref:c,...X4,width:e,height:e,stroke:t,strokeWidth:n?Number(r)*24/Number(e):r,className:Rj("lucide",i),...u},[...s.map(([f,p])=>N.createElement(f,p)),...Array.isArray(a)?a:[a]]));/**
|
|
67
|
-
* @license lucide-react v0.487.0 - ISC
|
|
68
|
-
*
|
|
69
|
-
* This source code is licensed under the ISC license.
|
|
70
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
71
|
-
*/const ze=(t,e)=>{const r=N.forwardRef(({className:n,...i},a)=>N.createElement(Y4,{ref:a,iconNode:e,className:Rj(`lucide-${K4(gk(t))}`,`lucide-${t}`,n),...i}));return r.displayName=gk(t),r};/**
|
|
72
|
-
* @license lucide-react v0.487.0 - ISC
|
|
73
|
-
*
|
|
74
|
-
* This source code is licensed under the ISC license.
|
|
75
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
76
|
-
*/const J4=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],Nj=ze("activity",J4);/**
|
|
77
|
-
* @license lucide-react v0.487.0 - ISC
|
|
78
|
-
*
|
|
79
|
-
* This source code is licensed under the ISC license.
|
|
80
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
81
|
-
*/const Q4=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]],Z4=ze("bell",Q4);/**
|
|
82
|
-
* @license lucide-react v0.487.0 - ISC
|
|
83
|
-
*
|
|
84
|
-
* This source code is licensed under the ISC license.
|
|
85
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
86
|
-
*/const e5=[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]],$j=ze("book-open",e5);/**
|
|
87
|
-
* @license lucide-react v0.487.0 - ISC
|
|
88
|
-
*
|
|
89
|
-
* This source code is licensed under the ISC license.
|
|
90
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
91
|
-
*/const t5=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],r5=ze("bot",t5);/**
|
|
92
|
-
* @license lucide-react v0.487.0 - ISC
|
|
93
|
-
*
|
|
94
|
-
* This source code is licensed under the ISC license.
|
|
95
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
96
|
-
*/const n5=[["path",{d:"m8 2 1.88 1.88",key:"fmnt4t"}],["path",{d:"M14.12 3.88 16 2",key:"qol33r"}],["path",{d:"M9 7.13v-1a3.003 3.003 0 1 1 6 0v1",key:"d7y7pr"}],["path",{d:"M12 20c-3.3 0-6-2.7-6-6v-3a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v3c0 3.3-2.7 6-6 6",key:"xs1cw7"}],["path",{d:"M12 20v-9",key:"1qisl0"}],["path",{d:"M6.53 9C4.6 8.8 3 7.1 3 5",key:"32zzws"}],["path",{d:"M6 13H2",key:"82j7cp"}],["path",{d:"M3 21c0-2.1 1.7-3.9 3.8-4",key:"4p0ekp"}],["path",{d:"M20.97 5c0 2.1-1.6 3.8-3.5 4",key:"18gb23"}],["path",{d:"M22 13h-4",key:"1jl80f"}],["path",{d:"M17.2 17c2.1.1 3.8 1.9 3.8 4",key:"k3fwyw"}]],i5=ze("bug",n5);/**
|
|
97
|
-
* @license lucide-react v0.487.0 - ISC
|
|
98
|
-
*
|
|
99
|
-
* This source code is licensed under the ISC license.
|
|
100
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
101
|
-
*/const a5=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],lb=ze("calendar",a5);/**
|
|
102
|
-
* @license lucide-react v0.487.0 - ISC
|
|
103
|
-
*
|
|
104
|
-
* This source code is licensed under the ISC license.
|
|
105
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
106
|
-
*/const o5=[["line",{x1:"18",x2:"18",y1:"20",y2:"10",key:"1xfpm4"}],["line",{x1:"12",x2:"12",y1:"20",y2:"4",key:"be30l9"}],["line",{x1:"6",x2:"6",y1:"20",y2:"14",key:"1r4le6"}]],s5=ze("chart-no-axes-column",o5);/**
|
|
107
|
-
* @license lucide-react v0.487.0 - ISC
|
|
108
|
-
*
|
|
109
|
-
* This source code is licensed under the ISC license.
|
|
110
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
111
|
-
*/const l5=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],u5=ze("chevron-down",l5);/**
|
|
112
|
-
* @license lucide-react v0.487.0 - ISC
|
|
113
|
-
*
|
|
114
|
-
* This source code is licensed under the ISC license.
|
|
115
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
116
|
-
*/const c5=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],Ij=ze("chevron-left",c5);/**
|
|
117
|
-
* @license lucide-react v0.487.0 - ISC
|
|
118
|
-
*
|
|
119
|
-
* This source code is licensed under the ISC license.
|
|
120
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
121
|
-
*/const f5=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],d5=ze("chevron-right",f5);/**
|
|
122
|
-
* @license lucide-react v0.487.0 - ISC
|
|
123
|
-
*
|
|
124
|
-
* This source code is licensed under the ISC license.
|
|
125
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
126
|
-
*/const h5=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]],p5=ze("clock",h5);/**
|
|
127
|
-
* @license lucide-react v0.487.0 - ISC
|
|
128
|
-
*
|
|
129
|
-
* This source code is licensed under the ISC license.
|
|
130
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
131
|
-
*/const m5=[["rect",{width:"16",height:"16",x:"4",y:"4",rx:"2",key:"14l7u7"}],["rect",{width:"6",height:"6",x:"9",y:"9",rx:"1",key:"5aljv4"}],["path",{d:"M15 2v2",key:"13l42r"}],["path",{d:"M15 20v2",key:"15mkzm"}],["path",{d:"M2 15h2",key:"1gxd5l"}],["path",{d:"M2 9h2",key:"1bbxkp"}],["path",{d:"M20 15h2",key:"19e6y8"}],["path",{d:"M20 9h2",key:"19tzq7"}],["path",{d:"M9 2v2",key:"165o2o"}],["path",{d:"M9 20v2",key:"i2bqo8"}]],g5=ze("cpu",m5);/**
|
|
132
|
-
* @license lucide-react v0.487.0 - ISC
|
|
133
|
-
*
|
|
134
|
-
* This source code is licensed under the ISC license.
|
|
135
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
136
|
-
*/const v5=[["path",{d:"M11.562 3.266a.5.5 0 0 1 .876 0L15.39 8.87a1 1 0 0 0 1.516.294L21.183 5.5a.5.5 0 0 1 .798.519l-2.834 10.246a1 1 0 0 1-.956.734H5.81a1 1 0 0 1-.957-.734L2.02 6.02a.5.5 0 0 1 .798-.519l4.276 3.664a1 1 0 0 0 1.516-.294z",key:"1vdc57"}],["path",{d:"M5 21h14",key:"11awu3"}]],y5=ze("crown",v5);/**
|
|
137
|
-
* @license lucide-react v0.487.0 - ISC
|
|
138
|
-
*
|
|
139
|
-
* This source code is licensed under the ISC license.
|
|
140
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
141
|
-
*/const b5=[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]],w5=ze("dollar-sign",b5);/**
|
|
142
|
-
* @license lucide-react v0.487.0 - ISC
|
|
143
|
-
*
|
|
144
|
-
* This source code is licensed under the ISC license.
|
|
145
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
146
|
-
*/const x5=[["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"}]],Mj=ze("external-link",x5);/**
|
|
147
|
-
* @license lucide-react v0.487.0 - ISC
|
|
148
|
-
*
|
|
149
|
-
* This source code is licensed under the ISC license.
|
|
150
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
151
|
-
*/const _5=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],S5=ze("eye-off",_5);/**
|
|
152
|
-
* @license lucide-react v0.487.0 - ISC
|
|
153
|
-
*
|
|
154
|
-
* This source code is licensed under the ISC license.
|
|
155
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
156
|
-
*/const k5=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],O5=ze("eye",k5);/**
|
|
157
|
-
* @license lucide-react v0.487.0 - ISC
|
|
158
|
-
*
|
|
159
|
-
* This source code is licensed under the ISC license.
|
|
160
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
161
|
-
*/const E5=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],A5=ze("file-text",E5);/**
|
|
162
|
-
* @license lucide-react v0.487.0 - ISC
|
|
163
|
-
*
|
|
164
|
-
* This source code is licensed under the ISC license.
|
|
165
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
166
|
-
*/const P5=[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]],T5=ze("github",P5);/**
|
|
167
|
-
* @license lucide-react v0.487.0 - ISC
|
|
168
|
-
*
|
|
169
|
-
* This source code is licensed under the ISC license.
|
|
170
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
171
|
-
*/const C5=[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]],Lj=ze("inbox",C5);/**
|
|
172
|
-
* @license lucide-react v0.487.0 - ISC
|
|
173
|
-
*
|
|
174
|
-
* This source code is licensed under the ISC license.
|
|
175
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
176
|
-
*/const j5=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],R5=ze("layers",j5);/**
|
|
177
|
-
* @license lucide-react v0.487.0 - ISC
|
|
178
|
-
*
|
|
179
|
-
* This source code is licensed under the ISC license.
|
|
180
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
181
|
-
*/const N5=[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]],$5=ze("log-out",N5);/**
|
|
182
|
-
* @license lucide-react v0.487.0 - ISC
|
|
183
|
-
*
|
|
184
|
-
* This source code is licensed under the ISC license.
|
|
185
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
186
|
-
*/const I5=[["path",{d:"M21.2 8.4c.5.38.8.97.8 1.6v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V10a2 2 0 0 1 .8-1.6l8-6a2 2 0 0 1 2.4 0l8 6Z",key:"1jhwl8"}],["path",{d:"m22 10-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 10",key:"1qfld7"}]],M5=ze("mail-open",I5);/**
|
|
187
|
-
* @license lucide-react v0.487.0 - ISC
|
|
188
|
-
*
|
|
189
|
-
* This source code is licensed under the ISC license.
|
|
190
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
191
|
-
*/const L5=[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]],D5=ze("mail",L5);/**
|
|
192
|
-
* @license lucide-react v0.487.0 - ISC
|
|
193
|
-
*
|
|
194
|
-
* This source code is licensed under the ISC license.
|
|
195
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
196
|
-
*/const B5=[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]],z5=ze("message-square",B5);/**
|
|
197
|
-
* @license lucide-react v0.487.0 - ISC
|
|
198
|
-
*
|
|
199
|
-
* This source code is licensed under the ISC license.
|
|
200
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
201
|
-
*/const q5=[["path",{d:"M13.234 20.252 21 12.3",key:"1cbrk9"}],["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 0 2.828 2 2 0 0 0 2.828 0l8.414-8.586a4 4 0 0 0 0-5.656 4 4 0 0 0-5.656 0l-8.415 8.585a6 6 0 1 0 8.486 8.486",key:"1pkts6"}]],U5=ze("paperclip",q5);/**
|
|
202
|
-
* @license lucide-react v0.487.0 - ISC
|
|
203
|
-
*
|
|
204
|
-
* This source code is licensed under the ISC license.
|
|
205
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
206
|
-
*/const F5=[["rect",{x:"14",y:"4",width:"4",height:"16",rx:"1",key:"zuxfzm"}],["rect",{x:"6",y:"4",width:"4",height:"16",rx:"1",key:"1okwgv"}]],W5=ze("pause",F5);/**
|
|
207
|
-
* @license lucide-react v0.487.0 - ISC
|
|
208
|
-
*
|
|
209
|
-
* This source code is licensed under the ISC license.
|
|
210
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
211
|
-
*/const H5=[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]],V5=ze("play",H5);/**
|
|
212
|
-
* @license lucide-react v0.487.0 - ISC
|
|
213
|
-
*
|
|
214
|
-
* This source code is licensed under the ISC license.
|
|
215
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
216
|
-
*/const K5=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],hh=ze("plus",K5);/**
|
|
217
|
-
* @license lucide-react v0.487.0 - ISC
|
|
218
|
-
*
|
|
219
|
-
* This source code is licensed under the ISC license.
|
|
220
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
221
|
-
*/const G5=[["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"}]],Dj=ze("save",G5);/**
|
|
222
|
-
* @license lucide-react v0.487.0 - ISC
|
|
223
|
-
*
|
|
224
|
-
* This source code is licensed under the ISC license.
|
|
225
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
226
|
-
*/const X5=[["path",{d:"M15 12h-5",key:"r7krc0"}],["path",{d:"M15 8h-5",key:"1khuty"}],["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]],Y5=ze("scroll-text",X5);/**
|
|
227
|
-
* @license lucide-react v0.487.0 - ISC
|
|
228
|
-
*
|
|
229
|
-
* This source code is licensed under the ISC license.
|
|
230
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
231
|
-
*/const J5=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]],Bj=ze("search",J5);/**
|
|
232
|
-
* @license lucide-react v0.487.0 - ISC
|
|
233
|
-
*
|
|
234
|
-
* This source code is licensed under the ISC license.
|
|
235
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
236
|
-
*/const Q5=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],Z5=ze("send",Q5);/**
|
|
237
|
-
* @license lucide-react v0.487.0 - ISC
|
|
238
|
-
*
|
|
239
|
-
* This source code is licensed under the ISC license.
|
|
240
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
241
|
-
*/const eB=[["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"}]],tB=ze("settings",eB);/**
|
|
242
|
-
* @license lucide-react v0.487.0 - ISC
|
|
243
|
-
*
|
|
244
|
-
* This source code is licensed under the ISC license.
|
|
245
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
246
|
-
*/const rB=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],nB=ze("square",rB);/**
|
|
247
|
-
* @license lucide-react v0.487.0 - ISC
|
|
248
|
-
*
|
|
249
|
-
* This source code is licensed under the ISC license.
|
|
250
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
251
|
-
*/const iB=[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]],ix=ze("trash-2",iB);/**
|
|
252
|
-
* @license lucide-react v0.487.0 - ISC
|
|
253
|
-
*
|
|
254
|
-
* This source code is licensed under the ISC license.
|
|
255
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
256
|
-
*/const aB=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]],zj=ze("users",aB);/**
|
|
257
|
-
* @license lucide-react v0.487.0 - ISC
|
|
258
|
-
*
|
|
259
|
-
* This source code is licensed under the ISC license.
|
|
260
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
261
|
-
*/const oB=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],ed=ze("zap",oB);function ph(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r}function sB(t,e,r,n){function i(a){return a instanceof r?a:new r(function(s){s(a)})}return new(r||(r=Promise))(function(a,s){function u(p){try{f(n.next(p))}catch(h){s(h)}}function c(p){try{f(n.throw(p))}catch(h){s(h)}}function f(p){p.done?a(p.value):i(p.value).then(u,c)}f((n=n.apply(t,e||[])).next())})}const lB=t=>t?(...e)=>t(...e):(...e)=>fetch(...e);class ax extends Error{constructor(e,r="FunctionsError",n){super(e),this.name=r,this.context=n}toJSON(){return{name:this.name,message:this.message,context:this.context}}}class uB extends ax{constructor(e){super("Failed to send a request to the Edge Function","FunctionsFetchError",e)}}class vk extends ax{constructor(e){super("Relay Error invoking the Edge Function","FunctionsRelayError",e)}}class yk extends ax{constructor(e){super("Edge Function returned a non-2xx status code","FunctionsHttpError",e)}}var ub;(function(t){t.Any="any",t.ApNortheast1="ap-northeast-1",t.ApNortheast2="ap-northeast-2",t.ApSouth1="ap-south-1",t.ApSoutheast1="ap-southeast-1",t.ApSoutheast2="ap-southeast-2",t.CaCentral1="ca-central-1",t.EuCentral1="eu-central-1",t.EuWest1="eu-west-1",t.EuWest2="eu-west-2",t.EuWest3="eu-west-3",t.SaEast1="sa-east-1",t.UsEast1="us-east-1",t.UsWest1="us-west-1",t.UsWest2="us-west-2"})(ub||(ub={}));class cB{constructor(e,{headers:r={},customFetch:n,region:i=ub.Any}={}){this.url=e,this.headers=r,this.region=i,this.fetch=lB(n)}setAuth(e){this.headers.Authorization=`Bearer ${e}`}invoke(e){return sB(this,arguments,void 0,function*(r,n={}){var i;let a,s;try{const{headers:u,method:c,body:f,signal:p,timeout:h}=n;let g={},{region:v}=n;v||(v=this.region);const y=new URL(`${this.url}/${r}`);v&&v!=="any"&&(g["x-region"]=v,y.searchParams.set("forceFunctionRegion",v));let x;f&&(u&&!Object.prototype.hasOwnProperty.call(u,"Content-Type")||!u)?typeof Blob<"u"&&f instanceof Blob||f instanceof ArrayBuffer?(g["Content-Type"]="application/octet-stream",x=f):typeof f=="string"?(g["Content-Type"]="text/plain",x=f):typeof FormData<"u"&&f instanceof FormData?x=f:(g["Content-Type"]="application/json",x=JSON.stringify(f)):f&&typeof f!="string"&&!(typeof Blob<"u"&&f instanceof Blob)&&!(f instanceof ArrayBuffer)&&!(typeof FormData<"u"&&f instanceof FormData)?x=JSON.stringify(f):x=f;let b=p;h&&(s=new AbortController,a=setTimeout(()=>s.abort(),h),p?(b=s.signal,p.addEventListener("abort",()=>s.abort())):b=s.signal);const S=yield this.fetch(y.toString(),{method:c||"POST",headers:Object.assign(Object.assign(Object.assign({},g),this.headers),u),body:x,signal:b}).catch(E=>{throw new uB(E)}),O=S.headers.get("x-relay-error");if(O&&O==="true")throw new vk(S);if(!S.ok)throw new yk(S);let k=((i=S.headers.get("Content-Type"))!==null&&i!==void 0?i:"text/plain").split(";")[0].trim(),T;return k==="application/json"?T=yield S.json():k==="application/octet-stream"||k==="application/pdf"?T=yield S.blob():k==="text/event-stream"?T=S:k==="multipart/form-data"?T=yield S.formData():T=yield S.text(),{data:T,error:null,response:S}}catch(u){return{data:null,error:u,response:u instanceof yk||u instanceof vk?u.context:void 0}}finally{a&&clearTimeout(a)}})}}const qj=3,bk=t=>Math.min(1e3*2**t,3e4),fB=[520,503],Uj=["GET","HEAD","OPTIONS"];var dB=class extends Error{constructor(t){super(t.message),this.name="PostgrestError",this.details=t.details,this.hint=t.hint,this.code=t.code}toJSON(){return{name:this.name,message:this.message,details:this.details,hint:this.hint,code:this.code}}};function wk(t,e){return new Promise(r=>{if(e!=null&&e.aborted){r();return}const n=setTimeout(()=>{e==null||e.removeEventListener("abort",i),r()},t);function i(){clearTimeout(n),r()}e==null||e.addEventListener("abort",i)})}function hB(t,e,r,n){return!(!n||r>=qj||!Uj.includes(t)||!fB.includes(e))}var pB=class{constructor(t){var e,r,n,i,a;this.shouldThrowOnError=!1,this.retryEnabled=!0,this.method=t.method,this.url=t.url,this.headers=new Headers(t.headers),this.schema=t.schema,this.body=t.body,this.shouldThrowOnError=(e=t.shouldThrowOnError)!==null&&e!==void 0?e:!1,this.signal=t.signal,this.isMaybeSingle=(r=t.isMaybeSingle)!==null&&r!==void 0?r:!1,this.shouldStripNulls=(n=t.shouldStripNulls)!==null&&n!==void 0?n:!1,this.urlLengthLimit=(i=t.urlLengthLimit)!==null&&i!==void 0?i:8e3,this.retryEnabled=(a=t.retry)!==null&&a!==void 0?a:!0,t.fetch?this.fetch=t.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(t,e){return this.headers=new Headers(this.headers),this.headers.set(t,e),this}retry(t){return this.retryEnabled=t,this}then(t,e){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 s=this.headers.get("Accept");s==="application/vnd.pgrst.object+json"?this.headers.set("Accept","application/vnd.pgrst.object+json;nulls=stripped"):(!s||s==="application/json")&&this.headers.set("Accept","application/vnd.pgrst.array+json;nulls=stripped")}const n=this.fetch;let a=(async()=>{let s=0;for(;;){const f=new Headers(r.headers);s>0&&f.set("X-Retry-Count",String(s));let p;try{p=await n(r.url.toString(),{method:r.method,headers:f,body:JSON.stringify(r.body,(h,g)=>typeof g=="bigint"?g.toString():g),signal:r.signal})}catch(h){if((h==null?void 0:h.name)==="AbortError"||(h==null?void 0:h.code)==="ABORT_ERR"||!Uj.includes(r.method))throw h;if(r.retryEnabled&&s<qj){const g=bk(s);s++,await wk(g,r.signal);continue}throw h}if(hB(r.method,p.status,s,r.retryEnabled)){var u,c;const h=(u=(c=p.headers)===null||c===void 0?void 0:c.get("Retry-After"))!==null&&u!==void 0?u:null,g=h!==null?Math.max(0,parseInt(h,10)||0)*1e3:bk(s);await p.text(),s++,await wk(g,r.signal);continue}return await r.processResponse(p)}})();return this.shouldThrowOnError||(a=a.catch(s=>{var u;let c="",f="",p="";const h=s==null?void 0:s.cause;if(h){var g,v,y,x;const O=(g=h==null?void 0:h.message)!==null&&g!==void 0?g:"",k=(v=h==null?void 0:h.code)!==null&&v!==void 0?v:"";c=`${(y=s==null?void 0:s.name)!==null&&y!==void 0?y:"FetchError"}: ${s==null?void 0:s.message}`,c+=`
|
|
262
|
-
|
|
263
|
-
Caused by: ${(x=h==null?void 0:h.name)!==null&&x!==void 0?x:"Error"}: ${O}`,k&&(c+=` (${k})`),h!=null&&h.stack&&(c+=`
|
|
264
|
-
${h.stack}`)}else{var b;c=(b=s==null?void 0:s.stack)!==null&&b!==void 0?b:""}const S=this.url.toString().length;return(s==null?void 0:s.name)==="AbortError"||(s==null?void 0:s.code)==="ABORT_ERR"?(p="",f="Request was aborted (timeout or manual cancellation)",S>this.urlLengthLimit&&(f+=`. Note: Your request URL is ${S} 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.`)):((h==null?void 0:h.name)==="HeadersOverflowError"||(h==null?void 0:h.code)==="UND_ERR_HEADERS_OVERFLOW")&&(p="",f="HTTP headers exceeded server limits (typically 16KB)",S>this.urlLengthLimit&&(f+=`. Your request URL is ${S} 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:`${(u=s==null?void 0:s.name)!==null&&u!==void 0?u:"FetchError"}: ${s==null?void 0:s.message}`,details:c,hint:f,code:p},data:null,count:null,status:0,statusText:""}})),a.then(t,e)}async processResponse(t){var e=this;let r=null,n=null,i=null,a=t.status,s=t.statusText;if(t.ok){var u,c;if(e.method!=="HEAD"){var f;const g=await t.text();g===""||(e.headers.get("Accept")==="text/csv"||e.headers.get("Accept")&&(!((f=e.headers.get("Accept"))===null||f===void 0)&&f.includes("application/vnd.pgrst.plan+text"))?n=g:n=JSON.parse(g))}const p=(u=e.headers.get("Prefer"))===null||u===void 0?void 0:u.match(/count=(exact|planned|estimated)/),h=(c=t.headers.get("content-range"))===null||c===void 0?void 0:c.split("/");p&&h&&h.length>1&&(i=parseInt(h[1])),e.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,a=406,s="Not Acceptable"):n.length===1?n=n[0]:n=null)}else{const p=await t.text();try{r=JSON.parse(p),Array.isArray(r)&&t.status===404&&(n=[],r=null,a=200,s="OK")}catch{t.status===404&&p===""?(a=204,s="No Content"):r={message:p}}if(r&&e.shouldThrowOnError)throw new dB(r)}return{success:r===null,error:r,data:n,count:i,status:a,statusText:s}}returns(){return this}overrideTypes(){return this}},mB=class extends pB{select(t){let e=!1;const r=(t??"*").split("").map(n=>/\s/.test(n)&&!e?"":(n==='"'&&(e=!e),n)).join("");return this.url.searchParams.set("select",r),this.headers.append("Prefer","return=representation"),this}order(t,{ascending:e=!0,nullsFirst:r,foreignTable:n,referencedTable:i=n}={}){const a=i?`${i}.order`:"order",s=this.url.searchParams.get(a);return this.url.searchParams.set(a,`${s?`${s},`:""}${t}.${e?"asc":"desc"}${r===void 0?"":r?".nullsfirst":".nullslast"}`),this}limit(t,{foreignTable:e,referencedTable:r=e}={}){const n=typeof r>"u"?"limit":`${r}.limit`;return this.url.searchParams.set(n,`${t}`),this}range(t,e,{foreignTable:r,referencedTable:n=r}={}){const i=typeof n>"u"?"offset":`${n}.offset`,a=typeof n>"u"?"limit":`${n}.limit`;return this.url.searchParams.set(i,`${t}`),this.url.searchParams.set(a,`${e-t+1}`),this}abortSignal(t){return this.signal=t,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:t=!1,verbose:e=!1,settings:r=!1,buffers:n=!1,wal:i=!1,format:a="text"}={}){var s;const u=[t?"analyze":null,e?"verbose":null,r?"settings":null,n?"buffers":null,i?"wal":null].filter(Boolean).join("|"),c=(s=this.headers.get("Accept"))!==null&&s!==void 0?s:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${a}; for="${c}"; options=${u};`),a==="json"?this:this}rollback(){return this.headers.append("Prefer","tx=rollback"),this}returns(){return this}maxAffected(t){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer",`max-affected=${t}`),this}};const xk=new RegExp("[,()]");var zo=class extends mB{eq(t,e){return this.url.searchParams.append(t,`eq.${e}`),this}neq(t,e){return this.url.searchParams.append(t,`neq.${e}`),this}gt(t,e){return this.url.searchParams.append(t,`gt.${e}`),this}gte(t,e){return this.url.searchParams.append(t,`gte.${e}`),this}lt(t,e){return this.url.searchParams.append(t,`lt.${e}`),this}lte(t,e){return this.url.searchParams.append(t,`lte.${e}`),this}like(t,e){return this.url.searchParams.append(t,`like.${e}`),this}likeAllOf(t,e){return this.url.searchParams.append(t,`like(all).{${e.join(",")}}`),this}likeAnyOf(t,e){return this.url.searchParams.append(t,`like(any).{${e.join(",")}}`),this}ilike(t,e){return this.url.searchParams.append(t,`ilike.${e}`),this}ilikeAllOf(t,e){return this.url.searchParams.append(t,`ilike(all).{${e.join(",")}}`),this}ilikeAnyOf(t,e){return this.url.searchParams.append(t,`ilike(any).{${e.join(",")}}`),this}regexMatch(t,e){return this.url.searchParams.append(t,`match.${e}`),this}regexIMatch(t,e){return this.url.searchParams.append(t,`imatch.${e}`),this}is(t,e){return this.url.searchParams.append(t,`is.${e}`),this}isDistinct(t,e){return this.url.searchParams.append(t,`isdistinct.${e}`),this}in(t,e){const r=Array.from(new Set(e)).map(n=>typeof n=="string"&&xk.test(n)?`"${n}"`:`${n}`).join(",");return this.url.searchParams.append(t,`in.(${r})`),this}notIn(t,e){const r=Array.from(new Set(e)).map(n=>typeof n=="string"&&xk.test(n)?`"${n}"`:`${n}`).join(",");return this.url.searchParams.append(t,`not.in.(${r})`),this}contains(t,e){return typeof e=="string"?this.url.searchParams.append(t,`cs.${e}`):Array.isArray(e)?this.url.searchParams.append(t,`cs.{${e.join(",")}}`):this.url.searchParams.append(t,`cs.${JSON.stringify(e)}`),this}containedBy(t,e){return typeof e=="string"?this.url.searchParams.append(t,`cd.${e}`):Array.isArray(e)?this.url.searchParams.append(t,`cd.{${e.join(",")}}`):this.url.searchParams.append(t,`cd.${JSON.stringify(e)}`),this}rangeGt(t,e){return this.url.searchParams.append(t,`sr.${e}`),this}rangeGte(t,e){return this.url.searchParams.append(t,`nxl.${e}`),this}rangeLt(t,e){return this.url.searchParams.append(t,`sl.${e}`),this}rangeLte(t,e){return this.url.searchParams.append(t,`nxr.${e}`),this}rangeAdjacent(t,e){return this.url.searchParams.append(t,`adj.${e}`),this}overlaps(t,e){return typeof e=="string"?this.url.searchParams.append(t,`ov.${e}`):this.url.searchParams.append(t,`ov.{${e.join(",")}}`),this}textSearch(t,e,{config:r,type:n}={}){let i="";n==="plain"?i="pl":n==="phrase"?i="ph":n==="websearch"&&(i="w");const a=r===void 0?"":`(${r})`;return this.url.searchParams.append(t,`${i}fts${a}.${e}`),this}match(t){return Object.entries(t).filter(([e,r])=>r!==void 0).forEach(([e,r])=>{this.url.searchParams.append(e,`eq.${r}`)}),this}not(t,e,r){return this.url.searchParams.append(t,`not.${e}.${r}`),this}or(t,{foreignTable:e,referencedTable:r=e}={}){const n=r?`${r}.or`:"or";return this.url.searchParams.append(n,`(${t})`),this}filter(t,e,r){return this.url.searchParams.append(t,`${e}.${r}`),this}},gB=class{constructor(t,{headers:e={},schema:r,fetch:n,urlLengthLimit:i=8e3,retry:a}){this.url=t,this.headers=new Headers(e),this.schema=r,this.fetch=n,this.urlLengthLimit=i,this.retry=a}cloneRequestState(){return{url:new URL(this.url.toString()),headers:new Headers(this.headers)}}select(t,e){const{head:r=!1,count:n}=e??{},i=r?"HEAD":"GET";let a=!1;const s=(t??"*").split("").map(f=>/\s/.test(f)&&!a?"":(f==='"'&&(a=!a),f)).join(""),{url:u,headers:c}=this.cloneRequestState();return u.searchParams.set("select",s),n&&c.append("Prefer",`count=${n}`),new zo({method:i,url:u,headers:c,schema:this.schema,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}insert(t,{count:e,defaultToNull:r=!0}={}){var n;const i="POST",{url:a,headers:s}=this.cloneRequestState();if(e&&s.append("Prefer",`count=${e}`),r||s.append("Prefer","missing=default"),Array.isArray(t)){const u=t.reduce((c,f)=>c.concat(Object.keys(f)),[]);if(u.length>0){const c=[...new Set(u)].map(f=>`"${f}"`);a.searchParams.set("columns",c.join(","))}}return new zo({method:i,url:a,headers:s,schema:this.schema,body:t,fetch:(n=this.fetch)!==null&&n!==void 0?n:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}upsert(t,{onConflict:e,ignoreDuplicates:r=!1,count:n,defaultToNull:i=!0}={}){var a;const s="POST",{url:u,headers:c}=this.cloneRequestState();if(c.append("Prefer",`resolution=${r?"ignore":"merge"}-duplicates`),e!==void 0&&u.searchParams.set("on_conflict",e),n&&c.append("Prefer",`count=${n}`),i||c.append("Prefer","missing=default"),Array.isArray(t)){const f=t.reduce((p,h)=>p.concat(Object.keys(h)),[]);if(f.length>0){const p=[...new Set(f)].map(h=>`"${h}"`);u.searchParams.set("columns",p.join(","))}}return new zo({method:s,url:u,headers:c,schema:this.schema,body:t,fetch:(a=this.fetch)!==null&&a!==void 0?a:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}update(t,{count:e}={}){var r;const n="PATCH",{url:i,headers:a}=this.cloneRequestState();return e&&a.append("Prefer",`count=${e}`),new zo({method:n,url:i,headers:a,schema:this.schema,body:t,fetch:(r=this.fetch)!==null&&r!==void 0?r:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}delete({count:t}={}){var e;const r="DELETE",{url:n,headers:i}=this.cloneRequestState();return t&&i.append("Prefer",`count=${t}`),new zo({method:r,url:n,headers:i,schema:this.schema,fetch:(e=this.fetch)!==null&&e!==void 0?e:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};function ou(t){"@babel/helpers - typeof";return ou=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ou(t)}function vB(t,e){if(ou(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(ou(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function yB(t){var e=vB(t,"string");return ou(e)=="symbol"?e:e+""}function bB(t,e,r){return(e=yB(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function _k(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function bf(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?_k(Object(r),!0).forEach(function(n){bB(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):_k(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var wB=class Fj{constructor(e,{headers:r={},schema:n,fetch:i,timeout:a,urlLengthLimit:s=8e3,retry:u}={}){this.url=e,this.headers=new Headers(r),this.schemaName=n,this.urlLengthLimit=s;const c=i??globalThis.fetch;a!==void 0&&a>0?this.fetch=(f,p)=>{const h=new AbortController,g=setTimeout(()=>h.abort(),a),v=p==null?void 0:p.signal;if(v){if(v.aborted)return clearTimeout(g),c(f,p);const y=()=>{clearTimeout(g),h.abort()};return v.addEventListener("abort",y,{once:!0}),c(f,bf(bf({},p),{},{signal:h.signal})).finally(()=>{clearTimeout(g),v.removeEventListener("abort",y)})}return c(f,bf(bf({},p),{},{signal:h.signal})).finally(()=>clearTimeout(g))}:this.fetch=c,this.retry=u}from(e){if(!e||typeof e!="string"||e.trim()==="")throw new Error("Invalid relation name: relation must be a non-empty string.");return new gB(new URL(`${this.url}/${e}`),{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}schema(e){return new Fj(this.url,{headers:this.headers,schema:e,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}rpc(e,r={},{head:n=!1,get:i=!1,count:a}={}){var s;let u;const c=new URL(`${this.url}/rpc/${e}`);let f;const p=v=>v!==null&&typeof v=="object"&&(!Array.isArray(v)||v.some(p)),h=n&&Object.values(r).some(p);h?(u="POST",f=r):n||i?(u=n?"HEAD":"GET",Object.entries(r).filter(([v,y])=>y!==void 0).map(([v,y])=>[v,Array.isArray(y)?`{${y.join(",")}}`:`${y}`]).forEach(([v,y])=>{c.searchParams.append(v,y)})):(u="POST",f=r);const g=new Headers(this.headers);return h?g.set("Prefer",a?`count=${a},return=minimal`:"return=minimal"):a&&g.set("Prefer",`count=${a}`),new zo({method:u,url:c,headers:g,schema:this.schemaName,body:f,fetch:(s=this.fetch)!==null&&s!==void 0?s:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};class xB{constructor(){}static detectEnvironment(){var e;if(typeof WebSocket<"u")return{type:"native",wsConstructor:WebSocket};const r=globalThis;if(typeof globalThis<"u"&&typeof r.WebSocket<"u")return{type:"native",wsConstructor:r.WebSocket};const n=typeof global<"u"?global:void 0;if(n&&typeof n.WebSocket<"u")return{type:"native",wsConstructor:n.WebSocket};if(typeof globalThis<"u"&&typeof r.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"&&r.EdgeRuntime||typeof navigator<"u"&&(!((e=navigator.userAgent)===null||e===void 0)&&e.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 i=globalThis.process;if(i){const a=i.versions;if(a&&a.node){const s=a.node,u=parseInt(s.replace(/^v/,"").split(".")[0]);return u>=22?typeof globalThis.WebSocket<"u"?{type:"native",wsConstructor:globalThis.WebSocket}:{type:"unsupported",error:`Node.js ${u} detected but native WebSocket not found.`,workaround:"Provide a WebSocket implementation via the transport option."}:{type:"unsupported",error:`Node.js ${u} detected without native WebSocket support.`,workaround:`For Node.js < 22, install "ws" package and provide it via the transport option:
|
|
265
|
-
import ws from "ws"
|
|
266
|
-
new 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 e=this.detectEnvironment();if(e.wsConstructor)return e.wsConstructor;let r=e.error||"WebSocket not supported in this environment.";throw e.workaround&&(r+=`
|
|
267
|
-
|
|
268
|
-
Suggested solution: ${e.workaround}`),new Error(r)}static isWebSocketSupported(){try{const e=this.detectEnvironment();return e.type==="native"||e.type==="ws"}catch{return!1}}}const _B="2.106.2",SB=`realtime-js/${_B}`,kB="1.0.0",Wj="2.0.0",OB=Wj,EB=1e4,AB=100,Qi={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},Hj={close:"phx_close",error:"phx_error",join:"phx_join",leave:"phx_leave",access_token:"access_token"},cb={connecting:"connecting",closing:"closing",closed:"closed"};class PB{constructor(e){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=e??[]}encode(e,r){if(e.event===this.BROADCAST_EVENT&&!(e.payload instanceof ArrayBuffer)&&typeof e.payload.event=="string")return r(this._binaryEncodeUserBroadcastPush(e));let n=[e.join_ref,e.ref,e.topic,e.event,e.payload];return r(JSON.stringify(n))}_binaryEncodeUserBroadcastPush(e){var r;return this._isArrayBuffer((r=e.payload)===null||r===void 0?void 0:r.payload)?this._encodeBinaryUserBroadcastPush(e):this._encodeJsonUserBroadcastPush(e)}_encodeBinaryUserBroadcastPush(e){var r,n;const i=(n=(r=e.payload)===null||r===void 0?void 0:r.payload)!==null&&n!==void 0?n:new ArrayBuffer(0);return this._encodeUserBroadcastPush(e,this.BINARY_ENCODING,i)}_encodeJsonUserBroadcastPush(e){var r,n;const i=(n=(r=e.payload)===null||r===void 0?void 0:r.payload)!==null&&n!==void 0?n:{},s=new TextEncoder().encode(JSON.stringify(i)).buffer;return this._encodeUserBroadcastPush(e,this.JSON_ENCODING,s)}_encodeUserBroadcastPush(e,r,n){var i,a;const s=e.topic,u=(i=e.ref)!==null&&i!==void 0?i:"",c=(a=e.join_ref)!==null&&a!==void 0?a:"",f=e.payload.event,p=this.allowedMetadataKeys?this._pick(e.payload,this.allowedMetadataKeys):{},h=Object.keys(p).length===0?"":JSON.stringify(p);if(c.length>255)throw new Error(`joinRef length ${c.length} exceeds maximum of 255`);if(u.length>255)throw new Error(`ref length ${u.length} exceeds maximum of 255`);if(s.length>255)throw new Error(`topic length ${s.length} exceeds maximum of 255`);if(f.length>255)throw new Error(`userEvent length ${f.length} exceeds maximum of 255`);if(h.length>255)throw new Error(`metadata length ${h.length} exceeds maximum of 255`);const g=this.USER_BROADCAST_PUSH_META_LENGTH+c.length+u.length+s.length+f.length+h.length,v=new ArrayBuffer(this.HEADER_LENGTH+g);let y=new DataView(v),x=0;y.setUint8(x++,this.KINDS.userBroadcastPush),y.setUint8(x++,c.length),y.setUint8(x++,u.length),y.setUint8(x++,s.length),y.setUint8(x++,f.length),y.setUint8(x++,h.length),y.setUint8(x++,r),Array.from(c,S=>y.setUint8(x++,S.charCodeAt(0))),Array.from(u,S=>y.setUint8(x++,S.charCodeAt(0))),Array.from(s,S=>y.setUint8(x++,S.charCodeAt(0))),Array.from(f,S=>y.setUint8(x++,S.charCodeAt(0))),Array.from(h,S=>y.setUint8(x++,S.charCodeAt(0)));var b=new Uint8Array(v.byteLength+n.byteLength);return b.set(new Uint8Array(v),0),b.set(new Uint8Array(n),v.byteLength),b.buffer}decode(e,r){if(this._isArrayBuffer(e)){let n=this._binaryDecode(e);return r(n)}if(typeof e=="string"){const n=JSON.parse(e),[i,a,s,u,c]=n;return r({join_ref:i,ref:a,topic:s,event:u,payload:c})}return r({})}_binaryDecode(e){const r=new DataView(e),n=r.getUint8(0),i=new TextDecoder;switch(n){case this.KINDS.userBroadcast:return this._decodeUserBroadcast(e,r,i)}}_decodeUserBroadcast(e,r,n){const i=r.getUint8(1),a=r.getUint8(2),s=r.getUint8(3),u=r.getUint8(4);let c=this.HEADER_LENGTH+4;const f=n.decode(e.slice(c,c+i));c=c+i;const p=n.decode(e.slice(c,c+a));c=c+a;const h=n.decode(e.slice(c,c+s));c=c+s;const g=e.slice(c,e.byteLength),v=u===this.JSON_ENCODING?JSON.parse(n.decode(g)):g,y={type:this.BROADCAST_EVENT,event:p,payload:v};return s>0&&(y.meta=JSON.parse(h)),{join_ref:null,ref:null,topic:f,event:this.BROADCAST_EVENT,payload:y}}_isArrayBuffer(e){var r;return e instanceof ArrayBuffer||((r=e==null?void 0:e.constructor)===null||r===void 0?void 0:r.name)==="ArrayBuffer"}_pick(e,r){return!e||typeof e!="object"?{}:Object.fromEntries(Object.entries(e).filter(([n])=>r.includes(n)))}}var rt;(function(t){t.abstime="abstime",t.bool="bool",t.date="date",t.daterange="daterange",t.float4="float4",t.float8="float8",t.int2="int2",t.int4="int4",t.int4range="int4range",t.int8="int8",t.int8range="int8range",t.json="json",t.jsonb="jsonb",t.money="money",t.numeric="numeric",t.oid="oid",t.reltime="reltime",t.text="text",t.time="time",t.timestamp="timestamp",t.timestamptz="timestamptz",t.timetz="timetz",t.tsrange="tsrange",t.tstzrange="tstzrange"})(rt||(rt={}));const Sk=(t,e,r={})=>{var n;const i=(n=r.skipTypes)!==null&&n!==void 0?n:[];return e?Object.keys(e).reduce((a,s)=>(a[s]=TB(s,t,e,i),a),{}):{}},TB=(t,e,r,n)=>{const i=e.find(u=>u.name===t),a=i==null?void 0:i.type,s=r[t];return a&&!n.includes(a)?Vj(a,s):fb(s)},Vj=(t,e)=>{if(t.charAt(0)==="_"){const r=t.slice(1,t.length);return NB(e,r)}switch(t){case rt.bool:return CB(e);case rt.float4:case rt.float8:case rt.int2:case rt.int4:case rt.int8:case rt.numeric:case rt.oid:return jB(e);case rt.json:case rt.jsonb:return RB(e);case rt.timestamp:return $B(e);case rt.abstime:case rt.date:case rt.daterange:case rt.int4range:case rt.int8range:case rt.money:case rt.reltime:case rt.text:case rt.time:case rt.timestamptz:case rt.timetz:case rt.tsrange:case rt.tstzrange:return fb(e);default:return fb(e)}},fb=t=>t,CB=t=>{switch(t){case"t":return!0;case"f":return!1;default:return t}},jB=t=>{if(typeof t=="string"){const e=parseFloat(t);if(!Number.isNaN(e))return e}return t},RB=t=>{if(typeof t=="string")try{return JSON.parse(t)}catch{return t}return t},NB=(t,e)=>{if(typeof t!="string")return t;const r=t.length-1,n=t[r];if(t[0]==="{"&&n==="}"){let a;const s=t.slice(1,r);try{a=JSON.parse("["+s+"]")}catch{a=s?s.split(","):[]}return a.map(u=>Vj(e,u))}return t},$B=t=>typeof t=="string"?t.replace(" ","T"):t,Kj=t=>{const e=new URL(t);return e.protocol=e.protocol.replace(/^ws/i,"http"),e.pathname=e.pathname.replace(/\/+$/,"").replace(/\/socket\/websocket$/i,"").replace(/\/socket$/i,"").replace(/\/websocket$/i,""),e.pathname===""||e.pathname==="/"?e.pathname="/api/broadcast":e.pathname=e.pathname+"/api/broadcast",e.href};var Yl=t=>typeof t=="function"?t:function(){return t},IB=typeof self<"u"?self:null,qo=typeof window<"u"?window:null,In=IB||qo||globalThis,MB="2.0.0",LB=1e4,DB=1e3,Mn={connecting:0,open:1,closing:2,closed:3},xr={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},ii={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave"},db={longpoll:"longpoll",websocket:"websocket"},BB={complete:4},hb="base64url.bearer.phx.",wf=class{constructor(t,e,r,n){this.channel=t,this.event=e,this.payload=r||function(){return{}},this.receivedResp=null,this.timeout=n,this.timeoutTimer=null,this.recHooks=[],this.sent=!1,this.ref=void 0}resend(t){this.timeout=t,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(t,e){return this.hasReceived(t)&&e(this.receivedResp.response),this.recHooks.push({status:t,callback:e}),this}reset(){this.cancelRefEvent(),this.ref=null,this.refEvent=null,this.receivedResp=null,this.sent=!1}destroy(){this.cancelRefEvent(),this.cancelTimeout()}matchReceive({status:t,response:e,_ref:r}){this.recHooks.filter(n=>n.status===t).forEach(n=>n.callback(e))}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,t=>{this.cancelRefEvent(),this.cancelTimeout(),this.receivedResp=t,this.matchReceive(t)}),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}hasReceived(t){return this.receivedResp&&this.receivedResp.status===t}trigger(t,e){this.channel.trigger(this.refEvent,{status:t,response:e})}},Gj=class{constructor(t,e){this.callback=t,this.timerCalc=e,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))}},zB=class{constructor(t,e,r){this.state=xr.closed,this.topic=t,this.params=Yl(e||{}),this.socket=r,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new wf(this,ii.join,this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new Gj(()=>{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=xr.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(n=>n.send()),this.pushBuffer=[]}),this.joinPush.receive("error",n=>{this.state=xr.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=xr.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=xr.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 wf(this,ii.leave,Yl({}),this.timeout).send(),this.state=xr.errored,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.on(ii.reply,(n,i)=>{this.trigger(this.replyEventName(i),n)})}join(t=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=t,this.joinedOnce=!0,this.rejoin(),this.joinPush}teardown(){this.pushBuffer.forEach(t=>t.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=xr.closed,this.bindings=[]}onClose(t){this.on(ii.close,t)}onError(t){return this.on(ii.error,e=>t(e))}on(t,e){let r=this.bindingRef++;return this.bindings.push({event:t,ref:r,callback:e}),r}off(t,e){this.bindings=this.bindings.filter(r=>!(r.event===t&&(typeof e>"u"||e===r.ref)))}canPush(){return this.socket.isConnected()&&this.isJoined()}push(t,e,r=this.timeout){if(e=e||{},!this.joinedOnce)throw new Error(`tried to push '${t}' to '${this.topic}' before joining. Use channel.join() before pushing events`);let n=new wf(this,t,function(){return e},r);return this.canPush()?n.send():(n.startTimeout(),this.pushBuffer.push(n)),n}leave(t=this.timeout){this.rejoinTimer.reset(),this.joinPush.cancelTimeout(),this.state=xr.leaving;let e=()=>{this.socket.hasLogger()&&this.socket.log("channel",`leave ${this.topic}`),this.trigger(ii.close,"leave")},r=new wf(this,ii.leave,Yl({}),t);return r.receive("ok",()=>e()).receive("timeout",()=>e()),r.send(),this.canPush()||r.trigger("ok",{}),r}onMessage(t,e,r){return e}filterBindings(t,e,r){return!0}isMember(t,e,r,n){return this.topic!==t?!1:n&&n!==this.joinRef()?(this.socket.hasLogger()&&this.socket.log("channel","dropping outdated message",{topic:t,event:e,payload:r,joinRef:n}),!1):!0}joinRef(){return this.joinPush.ref}rejoin(t=this.timeout){this.isLeaving()||(this.socket.leaveOpenTopic(this.topic),this.state=xr.joining,this.joinPush.resend(t))}trigger(t,e,r,n){let i=this.onMessage(t,e,r,n);if(e&&!i)throw new Error("channel onMessage callbacks must return the payload, modified or unmodified");let a=this.bindings.filter(s=>s.event===t&&this.filterBindings(s,e,r));for(let s=0;s<a.length;s++)a[s].callback(i,r,n||this.joinRef())}replyEventName(t){return`chan_reply_${t}`}isClosed(){return this.state===xr.closed}isErrored(){return this.state===xr.errored}isJoined(){return this.state===xr.joined}isJoining(){return this.state===xr.joining}isLeaving(){return this.state===xr.leaving}},td=class{static request(t,e,r,n,i,a,s){if(In.XDomainRequest){let u=new In.XDomainRequest;return this.xdomainRequest(u,t,e,n,i,a,s)}else if(In.XMLHttpRequest){let u=new In.XMLHttpRequest;return this.xhrRequest(u,t,e,r,n,i,a,s)}else{if(In.fetch&&In.AbortController)return this.fetchRequest(t,e,r,n,i,a,s);throw new Error("No suitable XMLHttpRequest implementation found")}}static fetchRequest(t,e,r,n,i,a,s){let u={method:t,headers:r,body:n},c=null;return i&&(c=new AbortController,setTimeout(()=>c.abort(),i),u.signal=c.signal),In.fetch(e,u).then(f=>f.text()).then(f=>this.parseJSON(f)).then(f=>s&&s(f)).catch(f=>{f.name==="AbortError"&&a?a():s&&s(null)}),c}static xdomainRequest(t,e,r,n,i,a,s){return t.timeout=i,t.open(e,r),t.onload=()=>{let u=this.parseJSON(t.responseText);s&&s(u)},a&&(t.ontimeout=a),t.onprogress=()=>{},t.send(n),t}static xhrRequest(t,e,r,n,i,a,s,u){t.open(e,r,!0),t.timeout=a;for(let[c,f]of Object.entries(n))t.setRequestHeader(c,f);return t.onerror=()=>u&&u(null),t.onreadystatechange=()=>{if(t.readyState===BB.complete&&u){let c=this.parseJSON(t.responseText);u(c)}},s&&(t.ontimeout=s),t.send(i),t}static parseJSON(t){if(!t||t==="")return null;try{return JSON.parse(t)}catch{return console&&console.log("failed to parse JSON response",t),null}}static serialize(t,e){let r=[];for(var n in t){if(!Object.prototype.hasOwnProperty.call(t,n))continue;let i=e?`${e}[${n}]`:n,a=t[n];typeof a=="object"?r.push(this.serialize(a,i)):r.push(encodeURIComponent(i)+"="+encodeURIComponent(a))}return r.join("&")}static appendParams(t,e){if(Object.keys(e).length===0)return t;let r=t.match(/\?/)?"&":"?";return`${t}${r}${this.serialize(e)}`}},qB=t=>{let e="",r=new Uint8Array(t),n=r.byteLength;for(let i=0;i<n;i++)e+=String.fromCharCode(r[i]);return btoa(e)},Ro=class{constructor(t,e){e&&e.length===2&&e[1].startsWith(hb)&&(this.authToken=atob(e[1].slice(hb.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(t),this.readyState=Mn.connecting,setTimeout(()=>this.poll(),0)}normalizeEndpoint(t){return t.replace("ws://","http://").replace("wss://","https://").replace(new RegExp("(.*)/"+db.websocket),"$1/"+db.longpoll)}endpointURL(){return td.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(t,e,r){this.close(t,e,r),this.readyState=Mn.connecting}ontimeout(){this.onerror("timeout"),this.closeAndRetry(1005,"timeout",!1)}isActive(){return this.readyState===Mn.open||this.readyState===Mn.connecting}poll(){const t={Accept:"application/json"};this.authToken&&(t["X-Phoenix-AuthToken"]=this.authToken),this.ajax("GET",t,null,()=>this.ontimeout(),e=>{if(e){var{status:r,token:n,messages:i}=e;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(a=>{setTimeout(()=>this.onmessage({data:a}),0)}),this.poll();break;case 204:this.poll();break;case 410:this.readyState=Mn.open,this.onopen({}),this.poll();break;case 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(t){typeof t!="string"&&(t=qB(t)),this.currentBatch?this.currentBatch.push(t):this.awaitingBatchAck?this.batchBuffer.push(t):(this.currentBatch=[t],this.currentBatchTimer=setTimeout(()=>{this.batchSend(this.currentBatch),this.currentBatch=null},0))}batchSend(t){this.awaitingBatchAck=!0,this.ajax("POST",{"Content-Type":"application/x-ndjson"},t.join(`
|
|
269
|
-
`),()=>this.onerror("timeout"),e=>{this.awaitingBatchAck=!1,!e||e.status!==200?(this.onerror(e&&e.status),this.closeAndRetry(1011,"internal server error",!1)):this.batchBuffer.length>0&&(this.batchSend(this.batchBuffer),this.batchBuffer=[])})}close(t,e,r){for(let i of this.reqs)i.abort();this.readyState=Mn.closed;let n=Object.assign({code:1e3,reason:void 0,wasClean:!0},{code:t,reason:e,wasClean:r});this.batchBuffer=[],clearTimeout(this.currentBatchTimer),this.currentBatchTimer=null,typeof CloseEvent<"u"?this.onclose(new CloseEvent("close",n)):this.onclose(n)}ajax(t,e,r,n,i){let a,s=()=>{this.reqs.delete(a),n()};a=td.request(t,this.endpointURL(),e,r,this.timeout,s,u=>{this.reqs.delete(a),this.isActive()&&i(u)}),this.reqs.add(a)}},UB=class Wl{constructor(e,r={}){let n=r.events||{state:"presence_state",diff:"presence_diff"};this.state={},this.pendingDiffs=[],this.channel=e,this.joinRef=null,this.caller={onJoin:function(){},onLeave:function(){},onSync:function(){}},this.channel.on(n.state,i=>{let{onJoin:a,onLeave:s,onSync:u}=this.caller;this.joinRef=this.channel.joinRef(),this.state=Wl.syncState(this.state,i,a,s),this.pendingDiffs.forEach(c=>{this.state=Wl.syncDiff(this.state,c,a,s)}),this.pendingDiffs=[],u()}),this.channel.on(n.diff,i=>{let{onJoin:a,onLeave:s,onSync:u}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(i):(this.state=Wl.syncDiff(this.state,i,a,s),u())})}onJoin(e){this.caller.onJoin=e}onLeave(e){this.caller.onLeave=e}onSync(e){this.caller.onSync=e}list(e){return Wl.list(this.state,e)}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel.joinRef()}static syncState(e,r,n,i){let a=this.clone(e),s={},u={};return this.map(a,(c,f)=>{r[c]||(u[c]=f)}),this.map(r,(c,f)=>{let p=a[c];if(p){let h=f.metas.map(x=>x.phx_ref),g=p.metas.map(x=>x.phx_ref),v=f.metas.filter(x=>g.indexOf(x.phx_ref)<0),y=p.metas.filter(x=>h.indexOf(x.phx_ref)<0);v.length>0&&(s[c]=f,s[c].metas=v),y.length>0&&(u[c]=this.clone(p),u[c].metas=y)}else s[c]=f}),this.syncDiff(a,{joins:s,leaves:u},n,i)}static syncDiff(e,r,n,i){let{joins:a,leaves:s}=this.clone(r);return n||(n=function(){}),i||(i=function(){}),this.map(a,(u,c)=>{let f=e[u];if(e[u]=this.clone(c),f){let p=e[u].metas.map(g=>g.phx_ref),h=f.metas.filter(g=>p.indexOf(g.phx_ref)<0);e[u].metas.unshift(...h)}n(u,f,c)}),this.map(s,(u,c)=>{let f=e[u];if(!f)return;let p=c.metas.map(h=>h.phx_ref);f.metas=f.metas.filter(h=>p.indexOf(h.phx_ref)<0),i(u,f,c),f.metas.length===0&&delete e[u]}),e}static list(e,r){return r||(r=function(n,i){return i}),this.map(e,(n,i)=>r(n,i))}static map(e,r){return Object.getOwnPropertyNames(e).map(n=>r(n,e[n]))}static clone(e){return JSON.parse(JSON.stringify(e))}},xf={HEADER_LENGTH:1,META_LENGTH:4,KINDS:{push:0,reply:1,broadcast:2},encode(t,e){if(t.payload.constructor===ArrayBuffer)return e(this.binaryEncode(t));{let r=[t.join_ref,t.ref,t.topic,t.event,t.payload];return e(JSON.stringify(r))}},decode(t,e){if(t.constructor===ArrayBuffer)return e(this.binaryDecode(t));{let[r,n,i,a,s]=JSON.parse(t);return e({join_ref:r,ref:n,topic:i,event:a,payload:s})}},binaryEncode(t){let{join_ref:e,ref:r,event:n,topic:i,payload:a}=t,s=this.META_LENGTH+e.length+r.length+i.length+n.length,u=new ArrayBuffer(this.HEADER_LENGTH+s),c=new DataView(u),f=0;c.setUint8(f++,this.KINDS.push),c.setUint8(f++,e.length),c.setUint8(f++,r.length),c.setUint8(f++,i.length),c.setUint8(f++,n.length),Array.from(e,h=>c.setUint8(f++,h.charCodeAt(0))),Array.from(r,h=>c.setUint8(f++,h.charCodeAt(0))),Array.from(i,h=>c.setUint8(f++,h.charCodeAt(0))),Array.from(n,h=>c.setUint8(f++,h.charCodeAt(0)));var p=new Uint8Array(u.byteLength+a.byteLength);return p.set(new Uint8Array(u),0),p.set(new Uint8Array(a),u.byteLength),p.buffer},binaryDecode(t){let e=new DataView(t),r=e.getUint8(0),n=new TextDecoder;switch(r){case this.KINDS.push:return this.decodePush(t,e,n);case this.KINDS.reply:return this.decodeReply(t,e,n);case this.KINDS.broadcast:return this.decodeBroadcast(t,e,n)}},decodePush(t,e,r){let n=e.getUint8(1),i=e.getUint8(2),a=e.getUint8(3),s=this.HEADER_LENGTH+this.META_LENGTH-1,u=r.decode(t.slice(s,s+n));s=s+n;let c=r.decode(t.slice(s,s+i));s=s+i;let f=r.decode(t.slice(s,s+a));s=s+a;let p=t.slice(s,t.byteLength);return{join_ref:u,ref:null,topic:c,event:f,payload:p}},decodeReply(t,e,r){let n=e.getUint8(1),i=e.getUint8(2),a=e.getUint8(3),s=e.getUint8(4),u=this.HEADER_LENGTH+this.META_LENGTH,c=r.decode(t.slice(u,u+n));u=u+n;let f=r.decode(t.slice(u,u+i));u=u+i;let p=r.decode(t.slice(u,u+a));u=u+a;let h=r.decode(t.slice(u,u+s));u=u+s;let g=t.slice(u,t.byteLength),v={status:h,response:g};return{join_ref:c,ref:f,topic:p,event:ii.reply,payload:v}},decodeBroadcast(t,e,r){let n=e.getUint8(1),i=e.getUint8(2),a=this.HEADER_LENGTH+2,s=r.decode(t.slice(a,a+n));a=a+n;let u=r.decode(t.slice(a,a+i));a=a+i;let c=t.slice(a,t.byteLength);return{join_ref:null,ref:null,topic:s,event:u,payload:c}}},FB=class{constructor(t,e={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.fallbackRef=null,this.timeout=e.timeout||LB,this.transport=e.transport||In.WebSocket||Ro,this.conn=void 0,this.primaryPassedHealthCheck=!1,this.longPollFallbackMs=e.longPollFallbackMs,this.fallbackTimer=null;let r=null;try{r=In&&In.sessionStorage}catch{}this.sessionStore=e.sessionStorage||r,this.establishedConnections=0,this.defaultEncoder=xf.encode.bind(xf),this.defaultDecoder=xf.decode.bind(xf),this.closeWasClean=!0,this.disconnecting=!1,this.binaryType=e.binaryType||"arraybuffer",this.connectClock=1,this.pageHidden=!1,this.encode=void 0,this.decode=void 0,this.transport!==Ro?(this.encode=e.encode||this.defaultEncoder,this.decode=e.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder);let n=null;qo&&qo.addEventListener&&(qo.addEventListener("pagehide",i=>{this.conn&&(this.disconnect(),n=this.connectClock)}),qo.addEventListener("pageshow",i=>{n===this.connectClock&&(n=null,this.connect())}),qo.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"?this.pageHidden=!0:(this.pageHidden=!1,!this.isConnected()&&!this.closeWasClean&&this.teardown(()=>this.connect()))})),this.heartbeatIntervalMs=e.heartbeatIntervalMs||3e4,this.autoSendHeartbeat=e.autoSendHeartbeat??!0,this.heartbeatCallback=e.heartbeatCallback??(()=>{}),this.rejoinAfterMs=i=>e.rejoinAfterMs?e.rejoinAfterMs(i):[1e3,2e3,5e3][i-1]||1e4,this.reconnectAfterMs=i=>e.reconnectAfterMs?e.reconnectAfterMs(i):[10,50,100,150,200,250,500,1e3,2e3][i-1]||5e3,this.logger=e.logger||null,!this.logger&&e.debug&&(this.logger=(i,a,s)=>{console.log(`${i}: ${a}`,s)}),this.longpollerTimeout=e.longpollerTimeout||2e4,this.params=Yl(e.params||{}),this.endPoint=`${t}/${db.websocket}`,this.vsn=e.vsn||MB,this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.heartbeatSentAt=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new Gj(()=>{if(this.pageHidden){this.log("Not reconnecting as page is hidden!"),this.teardown();return}this.teardown(async()=>{e.beforeReconnect&&await e.beforeReconnect(),this.connect()})},this.reconnectAfterMs),this.authToken=e.authToken}getLongPollTransport(){return Ro}replaceTransport(t){this.connectClock++,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.conn&&(this.conn.close(),this.conn=null),this.transport=t}protocol(){return location.protocol.match(/^https/)?"wss":"ws"}endPointURL(){let t=td.appendParams(td.appendParams(this.endPoint,this.params()),{vsn:this.vsn});return t.charAt(0)!=="/"?t:t.charAt(1)==="/"?`${this.protocol()}:${t}`:`${this.protocol()}://${location.host}${t}`}disconnect(t,e,r){this.connectClock++,this.disconnecting=!0,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.teardown(()=>{this.disconnecting=!1,t&&t()},e,r)}connect(t){t&&(console&&console.log("passing params to connect is deprecated. Instead pass :params to the Socket constructor"),this.params=Yl(t)),!(this.conn&&!this.disconnecting)&&(this.longPollFallbackMs&&this.transport!==Ro?this.connectWithFallback(Ro,this.longPollFallbackMs):this.transportConnect())}log(t,e,r){this.logger&&this.logger(t,e,r)}hasLogger(){return this.logger!==null}onOpen(t){let e=this.makeRef();return this.stateChangeCallbacks.open.push([e,t]),e}onClose(t){let e=this.makeRef();return this.stateChangeCallbacks.close.push([e,t]),e}onError(t){let e=this.makeRef();return this.stateChangeCallbacks.error.push([e,t]),e}onMessage(t){let e=this.makeRef();return this.stateChangeCallbacks.message.push([e,t]),e}onHeartbeat(t){this.heartbeatCallback=t}ping(t){if(!this.isConnected())return!1;let e=this.makeRef(),r=Date.now();this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:e});let n=this.onMessage(i=>{i.ref===e&&(this.off([n]),t(Date.now()-r))});return!0}transportName(t){switch(t){case Ro:return"LongPoll";default:return t.name}}transportConnect(){this.connectClock++,this.closeWasClean=!1;let t;this.authToken&&(t=["phoenix",`${hb}${btoa(this.authToken).replace(/=/g,"")}`]),this.conn=new this.transport(this.endPointURL(),t),this.conn.binaryType=this.binaryType,this.conn.timeout=this.longpollerTimeout,this.conn.onopen=()=>this.onConnOpen(),this.conn.onerror=e=>this.onConnError(e),this.conn.onmessage=e=>this.onConnMessage(e),this.conn.onclose=e=>this.onConnClose(e)}getSession(t){return this.sessionStore&&this.sessionStore.getItem(t)}storeSession(t,e){this.sessionStore&&this.sessionStore.setItem(t,e)}connectWithFallback(t,e=2500){clearTimeout(this.fallbackTimer);let r=!1,n=!0,i,a,s=this.transportName(t),u=c=>{this.log("transport",`falling back to ${s}...`,c),this.off([i,a]),n=!1,this.replaceTransport(t),this.transportConnect()};if(this.getSession(`phx:fallback:${s}`))return u("memorized");this.fallbackTimer=setTimeout(u,e),a=this.onError(c=>{this.log("transport","error",c),n&&!r&&(clearTimeout(this.fallbackTimer),u(c))}),this.fallbackRef&&this.off([this.fallbackRef]),this.fallbackRef=this.onOpen(()=>{if(r=!0,!n){let c=this.transportName(t);return this.primaryPassedHealthCheck||this.storeSession(`phx:fallback:${c}`,"true"),this.log("transport",`established ${c} fallback`)}clearTimeout(this.fallbackTimer),this.fallbackTimer=setTimeout(u,e),this.ping(c=>{this.log("transport","connected to primary after",c),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(t){this.log("error","error in heartbeat callback",t)}this.triggerChanError(new Error("heartbeat timeout")),this.closeWasClean=!1,this.teardown(()=>this.reconnectTimer.scheduleTimeout(),DB,"heartbeat timeout")}}resetHeartbeat(){this.conn&&this.conn.skipHeartbeat||(this.pendingHeartbeatRef=null,this.clearHeartbeats(),this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}teardown(t,e,r){if(!this.conn)return t&&t();const n=this.conn;this.waitForBufferDone(n,()=>{e?n.close(e,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),t&&t()})})}waitForBufferDone(t,e,r=1){if(r===5||!t.bufferedAmount){e();return}setTimeout(()=>{this.waitForBufferDone(t,e,r+1)},150*r)}waitForSocketClosed(t,e,r=1){if(r===5||t.readyState===Mn.closed){e();return}setTimeout(()=>{this.waitForSocketClosed(t,e,r+1)},150*r)}onConnClose(t){this.conn&&(this.conn.onclose=()=>{}),this.hasLogger()&&this.log("transport","close",t),this.triggerChanError(t),this.clearHeartbeats(),this.closeWasClean||this.reconnectTimer.scheduleTimeout(),this.triggerStateCallbacks("close",t)}onConnError(t){this.hasLogger()&&this.log("transport","error",t);let e=this.transport,r=this.establishedConnections;this.triggerStateCallbacks("error",t,e,r),(e===this.transport||r>0)&&this.triggerChanError(t)}triggerChanError(t){this.channels.forEach(e=>{e.isErrored()||e.isLeaving()||e.isClosed()||e.trigger(ii.error,t)})}connectionState(){switch(this.conn&&this.conn.readyState){case Mn.connecting:return"connecting";case Mn.open:return"open";case Mn.closing:return"closing";default:return"closed"}}isConnected(){return this.connectionState()==="open"}remove(t){this.off(t.stateChangeRefs),this.channels=this.channels.filter(e=>e!==t)}off(t){for(let e in this.stateChangeCallbacks)this.stateChangeCallbacks[e]=this.stateChangeCallbacks[e].filter(([r])=>t.indexOf(r)===-1)}channel(t,e={}){let r=new zB(t,e,this);return this.channels.push(r),r}push(t){if(this.hasLogger()){let{topic:e,event:r,payload:n,ref:i,join_ref:a}=t;this.log("push",`${e} ${r} (${a}, ${i})`,n)}this.isConnected()?this.encode(t,e=>this.conn.send(e)):this.sendBuffer.push(()=>this.encode(t,e=>this.conn.send(e)))}makeRef(){let t=this.ref+1;return t===this.ref?this.ref=0:this.ref=t,this.ref.toString()}sendHeartbeat(){if(!this.isConnected()){try{this.heartbeatCallback("disconnected")}catch(t){this.log("error","error in heartbeat callback",t)}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(t){this.log("error","error in heartbeat callback",t)}this.heartbeatTimeoutTimer=setTimeout(()=>this.heartbeatTimeout(),this.heartbeatIntervalMs)}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(t=>t()),this.sendBuffer=[])}onConnMessage(t){this.decode(t.data,e=>{let{topic:r,event:n,payload:i,ref:a,join_ref:s}=e;if(a&&a===this.pendingHeartbeatRef){const u=this.heartbeatSentAt?Date.now()-this.heartbeatSentAt:void 0;this.clearHeartbeats();try{this.heartbeatCallback(i.status==="ok"?"ok":"error",u)}catch(c){this.log("error","error in heartbeat callback",c)}this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.autoSendHeartbeat&&(this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}this.hasLogger()&&this.log("receive",`${i.status||""} ${r} ${n} ${a&&"("+a+")"||""}`.trim(),i);for(let u=0;u<this.channels.length;u++){const c=this.channels[u];c.isMember(r,n,i,s)&&c.trigger(n,i,a,s)}this.triggerStateCallbacks("message",e)})}triggerStateCallbacks(t,...e){try{this.stateChangeCallbacks[t].forEach(([r,n])=>{try{n(...e)}catch(i){this.log("error",`error in ${t} callback`,i)}})}catch(r){this.log("error",`error triggering ${t} callbacks`,r)}}leaveOpenTopic(t){let e=this.channels.find(r=>r.topic===t&&(r.isJoined()||r.isJoining()));e&&(this.hasLogger()&&this.log("transport",`leaving duplicate topic "${t}"`),e.leave())}};class Jl{constructor(e,r){const n=HB(r);this.presence=new UB(e.getChannel(),n),this.presence.onJoin((i,a,s)=>{const u=Jl.onJoinPayload(i,a,s);e.getChannel().trigger("presence",u)}),this.presence.onLeave((i,a,s)=>{const u=Jl.onLeavePayload(i,a,s);e.getChannel().trigger("presence",u)}),this.presence.onSync(()=>{e.getChannel().trigger("presence",{event:"sync"})})}get state(){return Jl.transformState(this.presence.state)}static transformState(e){return e=WB(e),Object.getOwnPropertyNames(e).reduce((r,n)=>{const i=e[n];return r[n]=Gf(i),r},{})}static onJoinPayload(e,r,n){const i=kk(r),a=Gf(n);return{event:"join",key:e,currentPresences:i,newPresences:a}}static onLeavePayload(e,r,n){const i=kk(r),a=Gf(n);return{event:"leave",key:e,currentPresences:i,leftPresences:a}}}function Gf(t){return t.metas.map(e=>(e.presence_ref=e.phx_ref,delete e.phx_ref,delete e.phx_ref_prev,e))}function WB(t){return JSON.parse(JSON.stringify(t))}function HB(t){return(t==null?void 0:t.events)&&{events:t.events}}function kk(t){return t!=null&&t.metas?Gf(t):[]}var Ok;(function(t){t.SYNC="sync",t.JOIN="join",t.LEAVE="leave"})(Ok||(Ok={}));class VB{get state(){return this.presenceAdapter.state}constructor(e,r){this.channel=e,this.presenceAdapter=new Jl(this.channel.channelAdapter,r)}}function KB(t){if(t instanceof Error)return t;if(typeof t=="string")return new Error(t);if(t&&typeof t=="object"){const e=t;if(typeof e.code=="number"){const r=typeof e.reason=="string"&&e.reason?` (${e.reason})`:"";return new Error(`socket closed: ${e.code}${r}`,{cause:t})}return new Error("channel error: transport failure",{cause:t})}return new Error("channel error: connection lost")}class GB{constructor(e,r,n){const i=XB(n);this.channel=e.getSocket().channel(r,i),this.socket=e}get state(){return this.channel.state}set state(e){this.channel.state=e}get joinedOnce(){return this.channel.joinedOnce}get joinPush(){return this.channel.joinPush}get rejoinTimer(){return this.channel.rejoinTimer}on(e,r){return this.channel.on(e,r)}off(e,r){this.channel.off(e,r)}subscribe(e){return this.channel.join(e)}unsubscribe(e){return this.channel.leave(e)}teardown(){this.channel.teardown()}onClose(e){this.channel.onClose(e)}onError(e){return this.channel.onError(e)}push(e,r,n){let i;try{i=this.channel.push(e,r,n)}catch{throw new Error(`tried to push '${e}' to '${this.channel.topic}' before joining. Use channel.subscribe() before pushing events`)}if(this.channel.pushBuffer.length>AB){const a=this.channel.pushBuffer.shift();a.cancelTimeout(),this.socket.log("channel",`discarded push due to buffer overflow: ${a.event}`,a.payload())}return i}updateJoinPayload(e){const r=this.channel.joinPush.payload();this.channel.joinPush.payload=()=>Object.assign(Object.assign({},r),e)}canPush(){return this.socket.isConnected()&&this.state===Qi.joined}isJoined(){return this.state===Qi.joined}isJoining(){return this.state===Qi.joining}isClosed(){return this.state===Qi.closed}isLeaving(){return this.state===Qi.leaving}updateFilterBindings(e){this.channel.filterBindings=e}updatePayloadTransform(e){this.channel.onMessage=e}getChannel(){return this.channel}}function XB(t){return{config:Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},t.config)}}var Ek;(function(t){t.ALL="*",t.INSERT="INSERT",t.UPDATE="UPDATE",t.DELETE="DELETE"})(Ek||(Ek={}));var Ho;(function(t){t.BROADCAST="broadcast",t.PRESENCE="presence",t.POSTGRES_CHANGES="postgres_changes",t.SYSTEM="system"})(Ho||(Ho={}));var ai;(function(t){t.SUBSCRIBED="SUBSCRIBED",t.TIMED_OUT="TIMED_OUT",t.CLOSED="CLOSED",t.CHANNEL_ERROR="CHANNEL_ERROR"})(ai||(ai={}));class Ql{get state(){return this.channelAdapter.state}set state(e){this.channelAdapter.state=e}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(e,r={config:{}},n){var i,a;if(this.topic=e,this.params=r,this.socket=n,this.bindings={},this.subTopic=e.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},r.config),this.channelAdapter=new GB(this.socket.socketAdapter,e,this.params),this.presence=new VB(this),this._onClose(()=>{this.socket._remove(this)}),this._updateFilterTransform(),this.broadcastEndpointURL=Kj(this.socket.socketAdapter.endPointURL()),this.private=this.params.config.private||!1,!this.private&&(!((a=(i=this.params.config)===null||i===void 0?void 0:i.broadcast)===null||a===void 0)&&a.replay))throw new Error(`tried to use replay on public channel '${this.topic}'. It must be a private channel.`)}subscribe(e,r=this.timeout){var n,i,a;if(this.socket.isConnected()||this.socket.connect(),this.channelAdapter.isClosed()){const{config:{broadcast:s,presence:u,private:c}}=this.params,f=(i=(n=this.bindings.postgres_changes)===null||n===void 0?void 0:n.map(v=>v.filter))!==null&&i!==void 0?i:[],p=!!this.bindings[Ho.PRESENCE]&&this.bindings[Ho.PRESENCE].length>0||((a=this.params.config.presence)===null||a===void 0?void 0:a.enabled)===!0,h={},g={broadcast:s,presence:Object.assign(Object.assign({},u),{enabled:p}),postgres_changes:f,private:c};this.socket.accessTokenValue&&(h.access_token=this.socket.accessTokenValue),this._onError(v=>{e==null||e(ai.CHANNEL_ERROR,KB(v))}),this._onClose(()=>e==null?void 0:e(ai.CLOSED)),this.updateJoinPayload(Object.assign({config:g},h)),this._updateFilterMessage(),this.channelAdapter.subscribe(r).receive("ok",async({postgres_changes:v})=>{if(this.socket._isManualToken()||this.socket.setAuth(),v===void 0){e==null||e(ai.SUBSCRIBED);return}this._updatePostgresBindings(v,e)}).receive("error",v=>{this.state=Qi.errored;const y=Object.values(v).join(", ")||"error";e==null||e(ai.CHANNEL_ERROR,new Error(y,{cause:v}))}).receive("timeout",()=>{e==null||e(ai.TIMED_OUT)})}return this}_updatePostgresBindings(e,r){var n;const i=this.bindings.postgres_changes,a=(n=i==null?void 0:i.length)!==null&&n!==void 0?n:0,s=[];for(let u=0;u<a;u++){const c=i[u],{filter:{event:f,schema:p,table:h,filter:g}}=c,v=e&&e[u];if(v&&v.event===f&&Ql.isFilterValueEqual(v.schema,p)&&Ql.isFilterValueEqual(v.table,h)&&Ql.isFilterValueEqual(v.filter,g))s.push(Object.assign(Object.assign({},c),{id:v.id}));else{this.unsubscribe(),this.state=Qi.errored,r==null||r(ai.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=s,this.state!=Qi.errored&&r&&r(ai.SUBSCRIBED)}presenceState(){return this.presence.state}async track(e,r={}){return await this.send({type:"presence",event:"track",payload:e},r.timeout||this.timeout)}async untrack(e={}){return await this.send({type:"presence",event:"untrack"},e)}on(e,r,n){const i=this.channelAdapter.isJoined()||this.channelAdapter.isJoining(),a=e===Ho.PRESENCE||e===Ho.POSTGRES_CHANGES;if(i&&a)throw this.socket.log("channel",`cannot add \`${e}\` callbacks for ${this.topic} after \`subscribe()\`.`),new Error(`cannot add \`${e}\` callbacks for ${this.topic} after \`subscribe()\`.`);return this._on(e,r,n)}async httpSend(e,r,n={}){var i;if(r==null)return Promise.reject(new Error("Payload is required for httpSend()"));const a={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(a.Authorization=`Bearer ${this.socket.accessTokenValue}`);const s={method:"POST",headers:a,body:JSON.stringify({messages:[{topic:this.subTopic,event:e,payload:r,private:this.private}]})},u=await this._fetchWithTimeout(this.broadcastEndpointURL,s,(i=n.timeout)!==null&&i!==void 0?i:this.timeout);if(u.status===202)return{success:!0};let c=u.statusText;try{const f=await u.json();c=f.error||f.message||c}catch{}return Promise.reject(new Error(c))}async send(e,r={}){var n,i;if(!this.channelAdapter.canPush()&&e.type==="broadcast"){console.warn("Realtime send() is automatically falling back to REST API. This behavior will be deprecated in the future. Please use httpSend() explicitly for REST delivery.");const{event:a,payload:s}=e,u={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(u.Authorization=`Bearer ${this.socket.accessTokenValue}`);const c={method:"POST",headers:u,body:JSON.stringify({messages:[{topic:this.subTopic,event:a,payload:s,private:this.private}]})};try{const f=await this._fetchWithTimeout(this.broadcastEndpointURL,c,(n=r.timeout)!==null&&n!==void 0?n:this.timeout);return await((i=f.body)===null||i===void 0?void 0:i.cancel()),f.ok?"ok":"error"}catch(f){return f instanceof Error&&f.name==="AbortError"?"timed out":"error"}}else return new Promise(a=>{var s,u,c;const f=this.channelAdapter.push(e.type,e,r.timeout||this.timeout);e.type==="broadcast"&&!(!((c=(u=(s=this.params)===null||s===void 0?void 0:s.config)===null||u===void 0?void 0:u.broadcast)===null||c===void 0)&&c.ack)&&a("ok"),f.receive("ok",()=>a("ok")),f.receive("error",()=>a("error")),f.receive("timeout",()=>a("timed out"))})}updateJoinPayload(e){this.channelAdapter.updateJoinPayload(e)}async unsubscribe(e=this.timeout){return new Promise(r=>{this.channelAdapter.unsubscribe(e).receive("ok",()=>r("ok")).receive("timeout",()=>r("timed out")).receive("error",()=>r("error"))})}teardown(){this.channelAdapter.teardown()}async _fetchWithTimeout(e,r,n){const i=new AbortController,a=setTimeout(()=>i.abort(),n),s=await this.socket.fetch(e,Object.assign(Object.assign({},r),{signal:i.signal}));return clearTimeout(a),s}_on(e,r,n){const i=e.toLocaleLowerCase(),a=this.channelAdapter.on(e,n),s={type:i,filter:r,callback:n,ref:a};return this.bindings[i]?this.bindings[i].push(s):this.bindings[i]=[s],this._updateFilterMessage(),this}_onClose(e){this.channelAdapter.onClose(e)}_onError(e){this.channelAdapter.onError(e)}_updateFilterMessage(){this.channelAdapter.updateFilterBindings((e,r,n)=>{var i,a,s,u,c,f,p;const h=e.event.toLocaleLowerCase();if(this._notThisChannelEvent(h,n))return!1;const g=(i=this.bindings[h])===null||i===void 0?void 0:i.find(v=>v.ref===e.ref);if(!g)return!0;if(["broadcast","presence","postgres_changes"].includes(h))if("id"in g){const v=g.id,y=(a=g.filter)===null||a===void 0?void 0:a.event;return v&&((s=r.ids)===null||s===void 0?void 0:s.includes(v))&&(y==="*"||(y==null?void 0:y.toLocaleLowerCase())===((u=r.data)===null||u===void 0?void 0:u.type.toLocaleLowerCase()))}else{const v=(f=(c=g==null?void 0:g.filter)===null||c===void 0?void 0:c.event)===null||f===void 0?void 0:f.toLocaleLowerCase();return v==="*"||v===((p=r==null?void 0:r.event)===null||p===void 0?void 0:p.toLocaleLowerCase())}else return g.type.toLocaleLowerCase()===h})}_notThisChannelEvent(e,r){const{close:n,error:i,leave:a,join:s}=Hj;return r&&[n,i,a,s].includes(e)&&r!==this.joinPush.ref}_updateFilterTransform(){this.channelAdapter.updatePayloadTransform((e,r,n)=>{if(typeof r=="object"&&"ids"in r){const i=r.data,{schema:a,table:s,commit_timestamp:u,type:c,errors:f}=i;return Object.assign(Object.assign({},{schema:a,table:s,commit_timestamp:u,eventType:c,new:{},old:{},errors:f}),this._getPayloadRecords(i))}return r})}copyBindings(e){if(this.joinedOnce)throw new Error("cannot copy bindings into joined channel");for(const r in e.bindings)for(const n of e.bindings[r])this._on(n.type,n.filter,n.callback)}static isFilterValueEqual(e,r){return(e??void 0)===(r??void 0)}_getPayloadRecords(e){const r={new:{},old:{}};return(e.type==="INSERT"||e.type==="UPDATE")&&(r.new=Sk(e.columns,e.record)),(e.type==="UPDATE"||e.type==="DELETE")&&(r.old=Sk(e.columns,e.old_record)),r}}class YB{constructor(e,r){this.socket=new FB(e,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(e){this.socket.heartbeatCallback=e}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(e,r,n,i=1e4){return new Promise(a=>{setTimeout(()=>a("timeout"),i),this.socket.disconnect(()=>{e(),a("ok")},r,n)})}push(e){this.socket.push(e)}log(e,r,n){this.socket.log(e,r,n)}makeRef(){return this.socket.makeRef()}onOpen(e){this.socket.onOpen(e)}onClose(e){this.socket.onClose(e)}onError(e){this.socket.onError(e)}onMessage(e){this.socket.onMessage(e)}isConnected(){return this.socket.isConnected()}isConnecting(){return this.socket.connectionState()==cb.connecting}isDisconnecting(){return this.socket.connectionState()==cb.closing}connectionState(){return this.socket.connectionState()}endPointURL(){return this.socket.endPointURL()}sendHeartbeat(){this.socket.sendHeartbeat()}getSocket(){return this.socket}}const Ak={HEARTBEAT_INTERVAL:25e3},JB=[1e3,2e3,5e3,1e4],QB=1e4;function ZB(){const t=new Map;return{get length(){return t.size},clear(){t.clear()},getItem(e){return t.has(e)?t.get(e):null},key(e){var r;return(r=Array.from(t.keys())[e])!==null&&r!==void 0?r:null},removeItem(e){t.delete(e)},setItem(e,r){t.set(e,String(r))}}}function e8(){try{if(typeof globalThis<"u"&&globalThis.sessionStorage)return globalThis.sessionStorage}catch{}return ZB()}const t8=`
|
|
270
|
-
addEventListener("message", (e) => {
|
|
271
|
-
if (e.data.event === "start") {
|
|
272
|
-
setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval);
|
|
273
|
-
}
|
|
274
|
-
});`;class r8{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(e,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 PB,this._manuallySetToken=!1,this._authPromise=null,this._workerHeartbeatTimer=void 0,this._pendingWorkerHeartbeatRef=null,this._pendingDisconnectTimer=null,this._disconnectOnEmptyChannelsAfterMs=0,this._resolveFetch=a=>a?(...s)=>a(...s):(...s)=>fetch(...s),!(!((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 YB(e,i),this.httpEndpoint=Kj(e),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(e){const r=e.message;throw r.includes("Node.js")?new Error(`${r}
|
|
275
|
-
|
|
276
|
-
To use Realtime in Node.js, you need to provide a WebSocket implementation:
|
|
277
|
-
|
|
278
|
-
Option 1: Use Node.js 22+ which has native WebSocket support
|
|
279
|
-
Option 2: Install and provide the "ws" package:
|
|
280
|
-
|
|
281
|
-
npm install ws
|
|
282
|
-
|
|
283
|
-
import ws from "ws"
|
|
284
|
-
const client = new RealtimeClient(url, {
|
|
285
|
-
...options,
|
|
286
|
-
transport: ws
|
|
287
|
-
})`):new Error(`WebSocket not available: ${r}`)}this._handleNodeJsRaceCondition()}}endpointURL(){return this.socketAdapter.endPointURL()}async disconnect(e,r){return this._cancelPendingDisconnect(),this.isDisconnecting()?"ok":await this.socketAdapter.disconnect(()=>{clearInterval(this._workerHeartbeatTimer),this._terminateWorker()},e,r)}getChannels(){return this.channels}async removeChannel(e){const r=await e.unsubscribe();return r==="ok"&&e.teardown(),r}async removeAllChannels(){const e=this.channels.map(async n=>{const i=await n.unsubscribe();return n.teardown(),i}),r=await Promise.all(e);return await this.disconnect(),r}log(e,r,n){this.socketAdapter.log(e,r,n)}connectionState(){return this.socketAdapter.connectionState()||cb.closed}isConnected(){return this.socketAdapter.isConnected()}isConnecting(){return this.socketAdapter.isConnecting()}isDisconnecting(){return this.socketAdapter.isDisconnecting()}channel(e,r={config:{}}){const n=`realtime:${e}`,i=this.getChannels().find(a=>a.topic===n);if(i)return i;{const a=new Ql(`realtime:${e}`,r,this);return this._cancelPendingDisconnect(),this.channels.push(a),a}}push(e){this.socketAdapter.push(e)}async setAuth(e=null){this._authPromise=this._performAuth(e);try{await this._authPromise}finally{this._authPromise=null}}_isManualToken(){return this._manuallySetToken}async sendHeartbeat(){this.socketAdapter.sendHeartbeat()}onHeartbeat(e){this.socketAdapter.heartbeatCallback=this._wrapHeartbeatCallback(e)}_makeRef(){return this.socketAdapter.makeRef()}_remove(e){this.channels=this.channels.filter(r=>r.topic!==e.topic),this.channels.length===0&&(this.log("transport","no channels remaining, scheduling disconnect"),this._schedulePendingDisconnect())}_schedulePendingDisconnect(){if(this._cancelPendingDisconnect(),this._disconnectOnEmptyChannelsAfterMs===0){this.log("transport","disconnecting immediately - no channels"),this.disconnect();return}this._pendingDisconnectTimer=setTimeout(()=>{this._pendingDisconnectTimer=null,this.channels.length===0&&(this.log("transport","deferred disconnect fired - no channels, disconnecting"),this.disconnect())},this._disconnectOnEmptyChannelsAfterMs),this.log("transport",`deferred disconnect scheduled in ${this._disconnectOnEmptyChannelsAfterMs}ms`)}_cancelPendingDisconnect(){this._pendingDisconnectTimer!==null&&(this.log("transport","pending disconnect cancelled - channel activity detected"),clearTimeout(this._pendingDisconnectTimer),this._pendingDisconnectTimer=null)}async _performAuth(e=null){let r,n=!1;if(e)r=e,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.forEach(i=>{const a={access_token:r,version:SB};r&&i.updateJoinPayload(a),i.joinedOnce&&i.channelAdapter.isJoined()&&i.channelAdapter.push(Hj.access_token,{access_token:r})}))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(e="general"){this._isManualToken()||this.setAuth().catch(r=>{this.log("error",`Error setting auth in ${e}`,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(e=>{e.ref&&e.ref===this._pendingWorkerHeartbeatRef&&(this._pendingWorkerHeartbeatRef=null)})}_handleNodeJsRaceCondition(){this.socketAdapter.isConnected()&&this.socketAdapter.getSocket().onConnOpen()}_wrapHeartbeatCallback(e){return(r,n)=>{r=="sent"&&this._setAuthSafely(),e&&e(r,n)}}_startWorkerHeartbeat(){this.workerUrl?this.log("worker",`starting worker for from ${this.workerUrl}`):this.log("worker","starting default worker");const e=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(e),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(e){let r;if(e)r=e;else{const n=new Blob([t8],{type:"application/javascript"});r=URL.createObjectURL(n)}return r}_initializeOptions(e){var r,n,i,a,s,u,c,f,p,h,g,v;this.worker=(r=e==null?void 0:e.worker)!==null&&r!==void 0?r:!1,this.accessToken=(n=e==null?void 0:e.accessToken)!==null&&n!==void 0?n:null;const y={};y.timeout=(i=e==null?void 0:e.timeout)!==null&&i!==void 0?i:EB,y.heartbeatIntervalMs=(a=e==null?void 0:e.heartbeatIntervalMs)!==null&&a!==void 0?a:Ak.HEARTBEAT_INTERVAL,this._disconnectOnEmptyChannelsAfterMs=(s=e==null?void 0:e.disconnectOnEmptyChannelsAfterMs)!==null&&s!==void 0?s:2*((u=e==null?void 0:e.heartbeatIntervalMs)!==null&&u!==void 0?u:Ak.HEARTBEAT_INTERVAL),y.transport=(c=e==null?void 0:e.transport)!==null&&c!==void 0?c:xB.getWebSocketConstructor(),y.params=e==null?void 0:e.params,y.logger=e==null?void 0:e.logger,y.heartbeatCallback=this._wrapHeartbeatCallback(e==null?void 0:e.heartbeatCallback),y.sessionStorage=(f=e==null?void 0:e.sessionStorage)!==null&&f!==void 0?f:e8(),y.reconnectAfterMs=(p=e==null?void 0:e.reconnectAfterMs)!==null&&p!==void 0?p:(O=>JB[O-1]||QB);let x,b;const S=(h=e==null?void 0:e.vsn)!==null&&h!==void 0?h:OB;switch(S){case kB:x=(O,k)=>k(JSON.stringify(O)),b=(O,k)=>k(JSON.parse(O));break;case Wj:x=this.serializer.encode.bind(this.serializer),b=this.serializer.decode.bind(this.serializer);break;default:throw new Error(`Unsupported serializer version: ${y.vsn}`)}if(y.vsn=S,y.encode=(g=e==null?void 0:e.encode)!==null&&g!==void 0?g:x,y.decode=(v=e==null?void 0:e.decode)!==null&&v!==void 0?v:b,y.beforeReconnect=this._reconnectAuth.bind(this),(e!=null&&e.logLevel||e!=null&&e.log_level)&&(this.logLevel=e.logLevel||e.log_level,y.params=Object.assign(Object.assign({},y.params),{log_level:this.logLevel})),this.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.workerUrl=e==null?void 0:e.workerUrl,y.autoSendHeartbeat=!this.worker}return y}async _reconnectAuth(){await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()}}var su=class extends Error{constructor(t,e){var r;super(t),this.name="IcebergError",this.status=e.status,this.icebergType=e.icebergType,this.icebergCode=e.icebergCode,this.details=e.details,this.isCommitStateUnknown=e.icebergType==="CommitStateUnknownException"||[500,502,504].includes(e.status)&&((r=e.icebergType)==null?void 0:r.includes("CommitState"))===!0}isNotFound(){return this.status===404}isConflict(){return this.status===409}isAuthenticationTimeout(){return this.status===419}};function n8(t,e,r){const n=new URL(e,t);if(r)for(const[i,a]of Object.entries(r))a!==void 0&&n.searchParams.set(i,a);return n.toString()}async function i8(t){return!t||t.type==="none"?{}:t.type==="bearer"?{Authorization:`Bearer ${t.token}`}:t.type==="header"?{[t.name]:t.value}:t.type==="custom"?await t.getHeaders():{}}function a8(t){const e=t.fetchImpl??globalThis.fetch;return{async request({method:r,path:n,query:i,body:a,headers:s}){const u=n8(t.baseUrl,n,i),c=await i8(t.auth),f=await e(u,{method:r,headers:{...a?{"Content-Type":"application/json"}:{},...c,...s},body:a?JSON.stringify(a):void 0}),p=await f.text(),h=(f.headers.get("content-type")||"").includes("application/json"),g=h&&p?JSON.parse(p):p;if(!f.ok){const v=h?g:void 0,y=v==null?void 0:v.error;throw new su((y==null?void 0:y.message)??`Request failed with status ${f.status}`,{status:f.status,icebergType:y==null?void 0:y.type,icebergCode:y==null?void 0:y.code,details:v})}return{status:f.status,headers:f.headers,data:g}}}}function _f(t){return t.join("")}var o8=class{constructor(t,e=""){this.client=t,this.prefix=e}async listNamespaces(t){const e=t?{parent:_f(t.namespace)}:void 0;return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces`,query:e})).data.namespaces.map(n=>({namespace:n}))}async createNamespace(t,e){const r={namespace:t.namespace,properties:e==null?void 0:e.properties};return(await this.client.request({method:"POST",path:`${this.prefix}/namespaces`,body:r})).data}async dropNamespace(t){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${_f(t.namespace)}`})}async loadNamespaceMetadata(t){return{properties:(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${_f(t.namespace)}`})).data.properties}}async namespaceExists(t){try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${_f(t.namespace)}`}),!0}catch(e){if(e instanceof su&&e.status===404)return!1;throw e}}async createNamespaceIfNotExists(t,e){try{return await this.createNamespace(t,e)}catch(r){if(r instanceof su&&r.status===409)return;throw r}}};function No(t){return t.join("")}var s8=class{constructor(t,e="",r){this.client=t,this.prefix=e,this.accessDelegation=r}async listTables(t){return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${No(t.namespace)}/tables`})).data.identifiers}async createTable(t,e){const r={};return this.accessDelegation&&(r["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${No(t.namespace)}/tables`,body:e,headers:r})).data.metadata}async updateTable(t,e){const r=await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${No(t.namespace)}/tables/${t.name}`,body:e});return{"metadata-location":r.data["metadata-location"],metadata:r.data.metadata}}async dropTable(t,e){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${No(t.namespace)}/tables/${t.name}`,query:{purgeRequested:String((e==null?void 0:e.purge)??!1)}})}async loadTable(t){const e={};return this.accessDelegation&&(e["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${No(t.namespace)}/tables/${t.name}`,headers:e})).data.metadata}async tableExists(t){const e={};this.accessDelegation&&(e["X-Iceberg-Access-Delegation"]=this.accessDelegation);try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${No(t.namespace)}/tables/${t.name}`,headers:e}),!0}catch(r){if(r instanceof su&&r.status===404)return!1;throw r}}async createTableIfNotExists(t,e){try{return await this.createTable(t,e)}catch(r){if(r instanceof su&&r.status===409)return await this.loadTable({namespace:t.namespace,name:e.name});throw r}}},l8=class{constructor(t){var n;let e="v1";t.catalogName&&(e+=`/${t.catalogName}`);const r=t.baseUrl.endsWith("/")?t.baseUrl:`${t.baseUrl}/`;this.client=a8({baseUrl:r,auth:t.auth,fetchImpl:t.fetch}),this.accessDelegation=(n=t.accessDelegation)==null?void 0:n.join(","),this.namespaceOps=new o8(this.client,e),this.tableOps=new s8(this.client,e,this.accessDelegation)}async listNamespaces(t){return this.namespaceOps.listNamespaces(t)}async createNamespace(t,e){return this.namespaceOps.createNamespace(t,e)}async dropNamespace(t){await this.namespaceOps.dropNamespace(t)}async loadNamespaceMetadata(t){return this.namespaceOps.loadNamespaceMetadata(t)}async listTables(t){return this.tableOps.listTables(t)}async createTable(t,e){return this.tableOps.createTable(t,e)}async updateTable(t,e){return this.tableOps.updateTable(t,e)}async dropTable(t,e){await this.tableOps.dropTable(t,e)}async loadTable(t){return this.tableOps.loadTable(t)}async namespaceExists(t){return this.namespaceOps.namespaceExists(t)}async tableExists(t){return this.tableOps.tableExists(t)}async createNamespaceIfNotExists(t,e){return this.namespaceOps.createNamespaceIfNotExists(t,e)}async createTableIfNotExists(t,e){return this.tableOps.createTableIfNotExists(t,e)}};function lu(t){"@babel/helpers - typeof";return lu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},lu(t)}function u8(t,e){if(lu(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(lu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function c8(t){var e=u8(t,"string");return lu(e)=="symbol"?e:e+""}function f8(t,e,r){return(e=c8(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Pk(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Ce(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Pk(Object(r),!0).forEach(function(n){f8(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Pk(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var mh=class extends Error{constructor(t,e="storage",r,n){super(t),this.__isStorageError=!0,this.namespace=e,this.name=e==="vectors"?"StorageVectorsError":"StorageError",this.status=r,this.statusCode=n}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}};function gh(t){return typeof t=="object"&&t!==null&&"__isStorageError"in t}var pb=class extends mh{constructor(t,e,r,n="storage"){super(t,n,e,r),this.name=n==="vectors"?"StorageVectorsApiError":"StorageApiError",this.status=e,this.statusCode=r}toJSON(){return Ce({},super.toJSON())}},Xj=class extends mh{constructor(t,e,r="storage"){super(t,r),this.name=r==="vectors"?"StorageVectorsUnknownError":"StorageUnknownError",this.originalError=e}};function rd(t,e,r){const n=Ce({},t),i=e.toLowerCase();for(const a of Object.keys(n))a.toLowerCase()===i&&delete n[a];return n[i]=r,n}function d8(t){const e={};for(const[r,n]of Object.entries(t))e[r.toLowerCase()]=n;return e}const h8=t=>t?(...e)=>t(...e):(...e)=>fetch(...e),p8=t=>{if(typeof t!="object"||t===null)return!1;const e=Object.getPrototypeOf(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},mb=t=>{if(Array.isArray(t))return t.map(r=>mb(r));if(typeof t=="function"||t!==Object(t))return t;const e={};return Object.entries(t).forEach(([r,n])=>{const i=r.replace(/([-_][a-z])/gi,a=>a.toUpperCase().replace(/[-_]/g,""));e[i]=mb(n)}),e},m8=t=>!t||typeof t!="string"||t.length===0||t.length>100||t.trim()!==t||t.includes("/")||t.includes("\\")?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(t),Tk=t=>{if(typeof t=="object"&&t!==null){const e=t;if(typeof e.msg=="string")return e.msg;if(typeof e.message=="string")return e.message;if(typeof e.error_description=="string")return e.error_description;if(typeof e.error=="string")return e.error;if(typeof e.error=="object"&&e.error!==null){const r=e.error;if(typeof r.message=="string")return r.message}}return JSON.stringify(t)},g8=async(t,e,r,n)=>{if(t!==null&&typeof t=="object"&&"json"in t&&typeof t.json=="function"){const i=t;let a=parseInt(String(i.status),10);Number.isFinite(a)||(a=500),i.json().then(s=>{const u=(s==null?void 0:s.statusCode)||(s==null?void 0:s.code)||a+"";e(new pb(Tk(s),a,u,n))}).catch(()=>{const s=a+"";e(new pb(i.statusText||`HTTP ${a} error`,a,s,n))})}else e(new Xj(Tk(t),t,n))},v8=(t,e,r,n)=>{const i={method:t,headers:(e==null?void 0:e.headers)||{}};if(t==="GET"||t==="HEAD"||!n)return Ce(Ce({},i),r);if(p8(n)){var a;const s=(e==null?void 0:e.headers)||{};let u;for(const[c,f]of Object.entries(s))c.toLowerCase()==="content-type"&&(u=f);i.headers=rd(s,"Content-Type",(a=u)!==null&&a!==void 0?a:"application/json"),i.body=JSON.stringify(n)}else i.body=n;return e!=null&&e.duplex&&(i.duplex=e.duplex),Ce(Ce({},i),r)};async function jl(t,e,r,n,i,a,s){return new Promise((u,c)=>{t(r,v8(e,n,i,a)).then(f=>{if(!f.ok)throw f;if(n!=null&&n.noResolveJson)return f;if(s==="vectors"){const p=f.headers.get("content-type");if(f.headers.get("content-length")==="0"||f.status===204)return{};if(!p||!p.includes("application/json"))return{}}return f.json()}).then(f=>u(f)).catch(f=>g8(f,c,n,s))})}function Yj(t="storage"){return{get:async(e,r,n,i)=>jl(e,"GET",r,n,i,void 0,t),post:async(e,r,n,i,a)=>jl(e,"POST",r,i,a,n,t),put:async(e,r,n,i,a)=>jl(e,"PUT",r,i,a,n,t),head:async(e,r,n,i)=>jl(e,"HEAD",r,Ce(Ce({},n),{},{noResolveJson:!0}),i,void 0,t),remove:async(e,r,n,i,a)=>jl(e,"DELETE",r,i,a,n,t)}}const y8=Yj("storage"),{get:uu,post:gn,put:gb,head:b8,remove:ox}=y8,$r=Yj("vectors");var $s=class{constructor(t,e={},r,n="storage"){this.shouldThrowOnError=!1,this.url=t,this.headers=d8(e),this.fetch=h8(r),this.namespace=n}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(t,e){return this.headers=rd(this.headers,t,e),this}async handleOperation(t){var e=this;try{return{data:await t(),error:null}}catch(r){if(e.shouldThrowOnError)throw r;if(gh(r))return{data:null,error:r};throw r}}};let Jj;Jj=Symbol.toStringTag;var w8=class{constructor(t,e){this.downloadFn=t,this.shouldThrowOnError=e,this[Jj]="StreamDownloadBuilder",this.promise=null}then(t,e){return this.getPromise().then(t,e)}catch(t){return this.getPromise().catch(t)}finally(t){return this.getPromise().finally(t)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}async execute(){var t=this;try{return{data:(await t.downloadFn()).body,error:null}}catch(e){if(t.shouldThrowOnError)throw e;if(gh(e))return{data:null,error:e};throw e}}};let Qj;Qj=Symbol.toStringTag;var x8=class{constructor(t,e){this.downloadFn=t,this.shouldThrowOnError=e,this[Qj]="BlobDownloadBuilder",this.promise=null}asStream(){return new w8(this.downloadFn,this.shouldThrowOnError)}then(t,e){return this.getPromise().then(t,e)}catch(t){return this.getPromise().catch(t)}finally(t){return this.getPromise().finally(t)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}async execute(){var t=this;try{return{data:await(await t.downloadFn()).blob(),error:null}}catch(e){if(t.shouldThrowOnError)throw e;if(gh(e))return{data:null,error:e};throw e}}};const _8={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},Ck={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};var S8=class extends $s{constructor(t,e={},r,n){super(t,e,n,"storage"),this.bucketId=r}async uploadOrUpdate(t,e,r,n){var i=this;return i.handleOperation(async()=>{let a;const s=Ce(Ce({},Ck),n);let u=Ce(Ce({},i.headers),t==="POST"&&{"x-upsert":String(s.upsert)});const c=s.metadata;if(typeof Blob<"u"&&r instanceof Blob?(a=new FormData,a.append("cacheControl",s.cacheControl),c&&a.append("metadata",i.encodeMetadata(c)),a.append("",r)):typeof FormData<"u"&&r instanceof FormData?(a=r,a.has("cacheControl")||a.append("cacheControl",s.cacheControl),c&&!a.has("metadata")&&a.append("metadata",i.encodeMetadata(c))):(a=r,u["cache-control"]=`max-age=${s.cacheControl}`,u["content-type"]=s.contentType,c&&(u["x-metadata"]=i.toBase64(i.encodeMetadata(c))),(typeof ReadableStream<"u"&&a instanceof ReadableStream||a&&typeof a=="object"&&"pipe"in a&&typeof a.pipe=="function")&&!s.duplex&&(s.duplex="half")),n!=null&&n.headers)for(const[g,v]of Object.entries(n.headers))u=rd(u,g,v);const f=i._removeEmptyFolders(e),p=i._getFinalPath(f),h=await(t=="PUT"?gb:gn)(i.fetch,`${i.url}/object/${p}`,a,Ce({headers:u},s!=null&&s.duplex?{duplex:s.duplex}:{}));return{path:f,id:h.Id,fullPath:h.Key}})}async upload(t,e,r){return this.uploadOrUpdate("POST",t,e,r)}async uploadToSignedUrl(t,e,r,n){var i=this;const a=i._removeEmptyFolders(t),s=i._getFinalPath(a),u=new URL(i.url+`/object/upload/sign/${s}`);return u.searchParams.set("token",e),i.handleOperation(async()=>{let c;const f=Ce(Ce({},Ck),n);let p=Ce(Ce({},i.headers),{"x-upsert":String(f.upsert)});const h=f.metadata;if(typeof Blob<"u"&&r instanceof Blob?(c=new FormData,c.append("cacheControl",f.cacheControl),h&&c.append("metadata",i.encodeMetadata(h)),c.append("",r)):typeof FormData<"u"&&r instanceof FormData?(c=r,c.has("cacheControl")||c.append("cacheControl",f.cacheControl),h&&!c.has("metadata")&&c.append("metadata",i.encodeMetadata(h))):(c=r,p["cache-control"]=`max-age=${f.cacheControl}`,p["content-type"]=f.contentType,h&&(p["x-metadata"]=i.toBase64(i.encodeMetadata(h))),(typeof ReadableStream<"u"&&c instanceof ReadableStream||c&&typeof c=="object"&&"pipe"in c&&typeof c.pipe=="function")&&!f.duplex&&(f.duplex="half")),n!=null&&n.headers)for(const[g,v]of Object.entries(n.headers))p=rd(p,g,v);return{path:a,fullPath:(await gb(i.fetch,u.toString(),c,Ce({headers:p},f!=null&&f.duplex?{duplex:f.duplex}:{}))).Key}})}async createSignedUploadUrl(t,e){var r=this;return r.handleOperation(async()=>{let n=r._getFinalPath(t);const i=Ce({},r.headers);e!=null&&e.upsert&&(i["x-upsert"]="true");const a=await gn(r.fetch,`${r.url}/object/upload/sign/${n}`,{},{headers:i}),s=new URL(r.url+a.url),u=s.searchParams.get("token");if(!u)throw new mh("No token returned by API");return{signedUrl:s.toString(),path:t,token:u}})}async update(t,e,r){return this.uploadOrUpdate("PUT",t,e,r)}async move(t,e,r){var n=this;return n.handleOperation(async()=>await gn(n.fetch,`${n.url}/object/move`,{bucketId:n.bucketId,sourceKey:t,destinationKey:e,destinationBucket:r==null?void 0:r.destinationBucket},{headers:n.headers}))}async copy(t,e,r){var n=this;return n.handleOperation(async()=>({path:(await gn(n.fetch,`${n.url}/object/copy`,{bucketId:n.bucketId,sourceKey:t,destinationKey:e,destinationBucket:r==null?void 0:r.destinationBucket},{headers:n.headers})).Key}))}async createSignedUrl(t,e,r){var n=this;return n.handleOperation(async()=>{let i=n._getFinalPath(t);const a=typeof(r==null?void 0:r.transform)=="object"&&r.transform!==null&&Object.keys(r.transform).length>0;let s=await gn(n.fetch,`${n.url}/object/sign/${i}`,Ce({expiresIn:e},a?{transform:r.transform}:{}),{headers:n.headers});const u=new URLSearchParams;r!=null&&r.download&&u.set("download",r.download===!0?"":r.download),(r==null?void 0:r.cacheNonce)!=null&&u.set("cacheNonce",String(r.cacheNonce));const c=u.toString();return{signedUrl:encodeURI(`${n.url}${s.signedURL}${c?`&${c}`:""}`)}})}async createSignedUrls(t,e,r){var n=this;return n.handleOperation(async()=>{const i=await gn(n.fetch,`${n.url}/object/sign/${n.bucketId}`,{expiresIn:e,paths:t},{headers:n.headers}),a=new URLSearchParams;r!=null&&r.download&&a.set("download",r.download===!0?"":r.download),(r==null?void 0:r.cacheNonce)!=null&&a.set("cacheNonce",String(r.cacheNonce));const s=a.toString();return i.map(u=>Ce(Ce({},u),{},{signedUrl:u.signedURL?encodeURI(`${n.url}${u.signedURL}${s?`&${s}`:""}`):null}))})}download(t,e,r){const n=typeof(e==null?void 0:e.transform)=="object"&&e.transform!==null&&Object.keys(e.transform).length>0?"render/image/authenticated":"object",i=new URLSearchParams;e!=null&&e.transform&&this.applyTransformOptsToQuery(i,e.transform),(e==null?void 0:e.cacheNonce)!=null&&i.set("cacheNonce",String(e.cacheNonce));const a=i.toString(),s=this._getFinalPath(t),u=()=>uu(this.fetch,`${this.url}/${n}/${s}${a?`?${a}`:""}`,{headers:this.headers,noResolveJson:!0},r);return new x8(u,this.shouldThrowOnError)}async info(t){var e=this;const r=e._getFinalPath(t);return e.handleOperation(async()=>mb(await uu(e.fetch,`${e.url}/object/info/${r}`,{headers:e.headers})))}async exists(t){var e=this;const r=e._getFinalPath(t);try{return await b8(e.fetch,`${e.url}/object/${r}`,{headers:e.headers}),{data:!0,error:null}}catch(i){if(e.shouldThrowOnError)throw i;if(gh(i)){var n;const a=i instanceof pb?i.status:i instanceof Xj?(n=i.originalError)===null||n===void 0?void 0:n.status:void 0;if(a!==void 0&&[400,404].includes(a))return{data:!1,error:i}}throw i}}getPublicUrl(t,e){const r=this._getFinalPath(t),n=new URLSearchParams;e!=null&&e.download&&n.set("download",e.download===!0?"":e.download),e!=null&&e.transform&&this.applyTransformOptsToQuery(n,e.transform),(e==null?void 0:e.cacheNonce)!=null&&n.set("cacheNonce",String(e.cacheNonce));const i=n.toString(),a=typeof(e==null?void 0:e.transform)=="object"&&e.transform!==null&&Object.keys(e.transform).length>0?"render/image":"object";return{data:{publicUrl:encodeURI(`${this.url}/${a}/public/${r}`)+(i?`?${i}`:"")}}}async remove(t){var e=this;return e.handleOperation(async()=>await ox(e.fetch,`${e.url}/object/${e.bucketId}`,{prefixes:t},{headers:e.headers}))}async list(t,e,r){var n=this;return n.handleOperation(async()=>{const i=Ce(Ce(Ce({},_8),e),{},{prefix:t||""});return await gn(n.fetch,`${n.url}/object/list/${n.bucketId}`,i,{headers:n.headers},r)})}async listV2(t,e){var r=this;return r.handleOperation(async()=>{const n=Ce({},t);return await gn(r.fetch,`${r.url}/object/list-v2/${r.bucketId}`,n,{headers:r.headers},e)})}encodeMetadata(t){return JSON.stringify(t)}toBase64(t){return typeof Buffer<"u"?Buffer.from(t).toString("base64"):btoa(t)}_getFinalPath(t){return`${this.bucketId}/${t.replace(/^\/+/,"")}`}_removeEmptyFolders(t){return t.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}applyTransformOptsToQuery(t,e){return e.width&&t.set("width",e.width.toString()),e.height&&t.set("height",e.height.toString()),e.resize&&t.set("resize",e.resize),e.format&&t.set("format",e.format),e.quality&&t.set("quality",e.quality.toString()),t}};const k8="2.106.2",Xu={"X-Client-Info":`storage-js/${k8}`};var O8=class extends $s{constructor(t,e={},r,n){const i=new URL(t);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 a=i.href.replace(/\/$/,""),s=Ce(Ce({},Xu),e);super(a,s,r,"storage")}async listBuckets(t){var e=this;return e.handleOperation(async()=>{const r=e.listBucketOptionsToQueryString(t);return await uu(e.fetch,`${e.url}/bucket${r}`,{headers:e.headers})})}async getBucket(t){var e=this;return e.handleOperation(async()=>await uu(e.fetch,`${e.url}/bucket/${t}`,{headers:e.headers}))}async createBucket(t,e={public:!1}){var r=this;return r.handleOperation(async()=>await gn(r.fetch,`${r.url}/bucket`,{id:t,name:t,type:e.type,public:e.public,file_size_limit:e.fileSizeLimit,allowed_mime_types:e.allowedMimeTypes},{headers:r.headers}))}async updateBucket(t,e){var r=this;return r.handleOperation(async()=>await gb(r.fetch,`${r.url}/bucket/${t}`,{id:t,name:t,public:e.public,file_size_limit:e.fileSizeLimit,allowed_mime_types:e.allowedMimeTypes},{headers:r.headers}))}async emptyBucket(t){var e=this;return e.handleOperation(async()=>await gn(e.fetch,`${e.url}/bucket/${t}/empty`,{},{headers:e.headers}))}async deleteBucket(t){var e=this;return e.handleOperation(async()=>await ox(e.fetch,`${e.url}/bucket/${t}`,{},{headers:e.headers}))}listBucketOptionsToQueryString(t){const e={};return t&&("limit"in t&&(e.limit=String(t.limit)),"offset"in t&&(e.offset=String(t.offset)),t.search&&(e.search=t.search),t.sortColumn&&(e.sortColumn=t.sortColumn),t.sortOrder&&(e.sortOrder=t.sortOrder)),Object.keys(e).length>0?"?"+new URLSearchParams(e).toString():""}},E8=class extends $s{constructor(t,e={},r){const n=t.replace(/\/$/,""),i=Ce(Ce({},Xu),e);super(n,i,r,"storage")}async createBucket(t){var e=this;return e.handleOperation(async()=>await gn(e.fetch,`${e.url}/bucket`,{name:t},{headers:e.headers}))}async listBuckets(t){var e=this;return e.handleOperation(async()=>{const r=new URLSearchParams;(t==null?void 0:t.limit)!==void 0&&r.set("limit",t.limit.toString()),(t==null?void 0:t.offset)!==void 0&&r.set("offset",t.offset.toString()),t!=null&&t.sortColumn&&r.set("sortColumn",t.sortColumn),t!=null&&t.sortOrder&&r.set("sortOrder",t.sortOrder),t!=null&&t.search&&r.set("search",t.search);const n=r.toString(),i=n?`${e.url}/bucket?${n}`:`${e.url}/bucket`;return await uu(e.fetch,i,{headers:e.headers})})}async deleteBucket(t){var e=this;return e.handleOperation(async()=>await ox(e.fetch,`${e.url}/bucket/${t}`,{},{headers:e.headers}))}from(t){var e=this;if(!m8(t))throw new mh("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 l8({baseUrl:this.url,catalogName:t,auth:{type:"custom",getHeaders:async()=>e.headers},fetch:this.fetch}),n=this.shouldThrowOnError;return new Proxy(r,{get(i,a){const s=i[a];return typeof s!="function"?s:async(...u)=>{try{return{data:await s.apply(i,u),error:null}}catch(c){if(n)throw c;return{data:null,error:c}}}}})}},A8=class extends $s{constructor(t,e={},r){const n=t.replace(/\/$/,""),i=Ce(Ce({},Xu),{},{"Content-Type":"application/json"},e);super(n,i,r,"vectors")}async createIndex(t){var e=this;return e.handleOperation(async()=>await $r.post(e.fetch,`${e.url}/CreateIndex`,t,{headers:e.headers})||{})}async getIndex(t,e){var r=this;return r.handleOperation(async()=>await $r.post(r.fetch,`${r.url}/GetIndex`,{vectorBucketName:t,indexName:e},{headers:r.headers}))}async listIndexes(t){var e=this;return e.handleOperation(async()=>await $r.post(e.fetch,`${e.url}/ListIndexes`,t,{headers:e.headers}))}async deleteIndex(t,e){var r=this;return r.handleOperation(async()=>await $r.post(r.fetch,`${r.url}/DeleteIndex`,{vectorBucketName:t,indexName:e},{headers:r.headers})||{})}},P8=class extends $s{constructor(t,e={},r){const n=t.replace(/\/$/,""),i=Ce(Ce({},Xu),{},{"Content-Type":"application/json"},e);super(n,i,r,"vectors")}async putVectors(t){var e=this;if(t.vectors.length<1||t.vectors.length>500)throw new Error("Vector batch size must be between 1 and 500 items");return e.handleOperation(async()=>await $r.post(e.fetch,`${e.url}/PutVectors`,t,{headers:e.headers})||{})}async getVectors(t){var e=this;return e.handleOperation(async()=>await $r.post(e.fetch,`${e.url}/GetVectors`,t,{headers:e.headers}))}async listVectors(t){var e=this;if(t.segmentCount!==void 0){if(t.segmentCount<1||t.segmentCount>16)throw new Error("segmentCount must be between 1 and 16");if(t.segmentIndex!==void 0&&(t.segmentIndex<0||t.segmentIndex>=t.segmentCount))throw new Error(`segmentIndex must be between 0 and ${t.segmentCount-1}`)}return e.handleOperation(async()=>await $r.post(e.fetch,`${e.url}/ListVectors`,t,{headers:e.headers}))}async queryVectors(t){var e=this;return e.handleOperation(async()=>await $r.post(e.fetch,`${e.url}/QueryVectors`,t,{headers:e.headers}))}async deleteVectors(t){var e=this;if(t.keys.length<1||t.keys.length>500)throw new Error("Keys batch size must be between 1 and 500 items");return e.handleOperation(async()=>await $r.post(e.fetch,`${e.url}/DeleteVectors`,t,{headers:e.headers})||{})}},T8=class extends $s{constructor(t,e={},r){const n=t.replace(/\/$/,""),i=Ce(Ce({},Xu),{},{"Content-Type":"application/json"},e);super(n,i,r,"vectors")}async createBucket(t){var e=this;return e.handleOperation(async()=>await $r.post(e.fetch,`${e.url}/CreateVectorBucket`,{vectorBucketName:t},{headers:e.headers})||{})}async getBucket(t){var e=this;return e.handleOperation(async()=>await $r.post(e.fetch,`${e.url}/GetVectorBucket`,{vectorBucketName:t},{headers:e.headers}))}async listBuckets(t={}){var e=this;return e.handleOperation(async()=>await $r.post(e.fetch,`${e.url}/ListVectorBuckets`,t,{headers:e.headers}))}async deleteBucket(t){var e=this;return e.handleOperation(async()=>await $r.post(e.fetch,`${e.url}/DeleteVectorBucket`,{vectorBucketName:t},{headers:e.headers})||{})}},C8=class extends T8{constructor(t,e={}){super(t,e.headers||{},e.fetch)}from(t){return new j8(this.url,this.headers,t,this.fetch)}async createBucket(t){var e=()=>super.createBucket,r=this;return e().call(r,t)}async getBucket(t){var e=()=>super.getBucket,r=this;return e().call(r,t)}async listBuckets(t={}){var e=()=>super.listBuckets,r=this;return e().call(r,t)}async deleteBucket(t){var e=()=>super.deleteBucket,r=this;return e().call(r,t)}},j8=class extends A8{constructor(t,e,r,n){super(t,e,n),this.vectorBucketName=r}async createIndex(t){var e=()=>super.createIndex,r=this;return e().call(r,Ce(Ce({},t),{},{vectorBucketName:r.vectorBucketName}))}async listIndexes(t={}){var e=()=>super.listIndexes,r=this;return e().call(r,Ce(Ce({},t),{},{vectorBucketName:r.vectorBucketName}))}async getIndex(t){var e=()=>super.getIndex,r=this;return e().call(r,r.vectorBucketName,t)}async deleteIndex(t){var e=()=>super.deleteIndex,r=this;return e().call(r,r.vectorBucketName,t)}index(t){return new R8(this.url,this.headers,this.vectorBucketName,t,this.fetch)}},R8=class extends P8{constructor(t,e,r,n,i){super(t,e,i),this.vectorBucketName=r,this.indexName=n}async putVectors(t){var e=()=>super.putVectors,r=this;return e().call(r,Ce(Ce({},t),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async getVectors(t){var e=()=>super.getVectors,r=this;return e().call(r,Ce(Ce({},t),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async listVectors(t={}){var e=()=>super.listVectors,r=this;return e().call(r,Ce(Ce({},t),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async queryVectors(t){var e=()=>super.queryVectors,r=this;return e().call(r,Ce(Ce({},t),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async deleteVectors(t){var e=()=>super.deleteVectors,r=this;return e().call(r,Ce(Ce({},t),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}},N8=class extends O8{constructor(t,e={},r,n){super(t,e,r,n)}from(t){return new S8(this.url,this.headers,t,this.fetch)}get vectors(){return new C8(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new E8(this.url+"/iceberg",this.headers,this.fetch)}};const Zj="2.106.2",Uo=30*1e3,vb=3,Ym=vb*Uo,$8="http://localhost:9999",I8="supabase.auth.token",M8={"X-Client-Info":`gotrue-js/${Zj}`},yb="X-Supabase-Api-Version",eR={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},L8=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,D8=600*1e3;class is extends Error{constructor(e,r,n){super(e),this.__isAuthError=!0,this.name="AuthError",this.status=r,this.code=n}toJSON(){return{name:this.name,message:this.message,status:this.status,code:this.code}}}function he(t){return typeof t=="object"&&t!==null&&"__isAuthError"in t}class B8 extends is{constructor(e,r,n){super(e,r,n),this.name="AuthApiError",this.status=r,this.code=n}}function z8(t){return he(t)&&t.name==="AuthApiError"}class xn extends is{constructor(e,r){super(e),this.name="AuthUnknownError",this.originalError=r}}class yi extends is{constructor(e,r,n,i){super(e,n,i),this.name=r,this.status=n}}class Wt extends yi{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function Sf(t){return he(t)&&t.name==="AuthSessionMissingError"}class $o extends yi{constructor(){super("Auth session or user missing","AuthInvalidTokenResponseError",500,void 0)}}class kf extends yi{constructor(e){super(e,"AuthInvalidCredentialsError",400,void 0)}}class Of extends yi{constructor(e,r=null){super(e,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=r}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}function q8(t){return he(t)&&t.name==="AuthImplicitGrantRedirectError"}class jk extends yi{constructor(e,r=null){super(e,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=r}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}class U8 extends yi{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 bb extends yi{constructor(e,r){super(e,"AuthRetryableFetchError",r,void 0)}}function Jm(t){return he(t)&&t.name==="AuthRetryableFetchError"}class Rk extends yi{constructor(e,r,n){super(e,"AuthWeakPasswordError",r,"weak_password"),this.reasons=n}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{reasons:this.reasons})}}class wb extends yi{constructor(e){super(e,"AuthInvalidJwtError",400,"invalid_jwt")}}const nd="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),Nk=`
|
|
288
|
-
\r=`.split(""),F8=(()=>{const t=new Array(128);for(let e=0;e<t.length;e+=1)t[e]=-1;for(let e=0;e<Nk.length;e+=1)t[Nk[e].charCodeAt(0)]=-2;for(let e=0;e<nd.length;e+=1)t[nd[e].charCodeAt(0)]=e;return t})();function $k(t,e,r){if(t!==null)for(e.queue=e.queue<<8|t,e.queuedBits+=8;e.queuedBits>=6;){const n=e.queue>>e.queuedBits-6&63;r(nd[n]),e.queuedBits-=6}else if(e.queuedBits>0)for(e.queue=e.queue<<6-e.queuedBits,e.queuedBits=6;e.queuedBits>=6;){const n=e.queue>>e.queuedBits-6&63;r(nd[n]),e.queuedBits-=6}}function tR(t,e,r){const n=F8[t];if(n>-1)for(e.queue=e.queue<<6|n,e.queuedBits+=6;e.queuedBits>=8;)r(e.queue>>e.queuedBits-8&255),e.queuedBits-=8;else{if(n===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(t)}"`)}}function Ik(t){const e=[],r=s=>{e.push(String.fromCodePoint(s))},n={utf8seq:0,codepoint:0},i={queue:0,queuedBits:0},a=s=>{V8(s,n,r)};for(let s=0;s<t.length;s+=1)tR(t.charCodeAt(s),i,a);return e.join("")}function W8(t,e){if(t<=127){e(t);return}else if(t<=2047){e(192|t>>6),e(128|t&63);return}else if(t<=65535){e(224|t>>12),e(128|t>>6&63),e(128|t&63);return}else if(t<=1114111){e(240|t>>18),e(128|t>>12&63),e(128|t>>6&63),e(128|t&63);return}throw new Error(`Unrecognized Unicode codepoint: ${t.toString(16)}`)}function H8(t,e){for(let r=0;r<t.length;r+=1){let n=t.charCodeAt(r);if(n>55295&&n<=56319){const i=(n-55296)*1024&65535;n=(t.charCodeAt(r+1)-56320&65535|i)+65536,r+=1}W8(n,e)}}function V8(t,e,r){if(e.utf8seq===0){if(t<=127){r(t);return}for(let n=1;n<6;n+=1)if((t>>7-n&1)===0){e.utf8seq=n;break}if(e.utf8seq===2)e.codepoint=t&31;else if(e.utf8seq===3)e.codepoint=t&15;else if(e.utf8seq===4)e.codepoint=t&7;else throw new Error("Invalid UTF-8 sequence");e.utf8seq-=1}else if(e.utf8seq>0){if(t<=127)throw new Error("Invalid UTF-8 sequence");e.codepoint=e.codepoint<<6|t&63,e.utf8seq-=1,e.utf8seq===0&&r(e.codepoint)}}function Qo(t){const e=[],r={queue:0,queuedBits:0},n=i=>{e.push(i)};for(let i=0;i<t.length;i+=1)tR(t.charCodeAt(i),r,n);return new Uint8Array(e)}function K8(t){const e=[];return H8(t,r=>e.push(r)),new Uint8Array(e)}function Da(t){const e=[],r={queue:0,queuedBits:0},n=i=>{e.push(i)};return t.forEach(i=>$k(i,r,n)),$k(null,r,n),e.join("")}function G8(t){return Math.round(Date.now()/1e3)+t}function X8(){return Symbol("auth-callback")}const Zt=()=>typeof window<"u"&&typeof document<"u",Pa={tested:!1,writable:!1},rR=()=>{if(!Zt())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(Pa.tested)return Pa.writable;const t=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(t,t),globalThis.localStorage.removeItem(t),Pa.tested=!0,Pa.writable=!0}catch{Pa.tested=!0,Pa.writable=!1}return Pa.writable};function Y8(t){const e={},r=new URL(t);if(r.hash&&r.hash[0]==="#")try{new URLSearchParams(r.hash.substring(1)).forEach((i,a)=>{e[a]=i})}catch{}return r.searchParams.forEach((n,i)=>{e[i]=n}),e}const nR=t=>t?(...e)=>t(...e):(...e)=>fetch(...e),J8=t=>typeof t=="object"&&t!==null&&"status"in t&&"ok"in t&&"json"in t&&typeof t.json=="function",Fo=async(t,e,r)=>{await t.setItem(e,JSON.stringify(r))},Ta=async(t,e)=>{const r=await t.getItem(e);if(!r)return null;try{return JSON.parse(r)}catch{return null}},Qt=async(t,e)=>{await t.removeItem(e)};class vh{constructor(){this.promise=new vh.promiseConstructor((e,r)=>{this.resolve=e,this.reject=r})}}vh.promiseConstructor=Promise;function Ef(t){const e=t.split(".");if(e.length!==3)throw new wb("Invalid JWT structure");for(let n=0;n<e.length;n++)if(!L8.test(e[n]))throw new wb("JWT not in base64url format");return{header:JSON.parse(Ik(e[0])),payload:JSON.parse(Ik(e[1])),signature:Qo(e[2]),raw:{header:e[0],payload:e[1]}}}async function Q8(t){return await new Promise(e=>{setTimeout(()=>e(null),t)})}function Z8(t,e){return new Promise((n,i)=>{(async()=>{for(let a=0;a<1/0;a++)try{const s=await t(a);if(!e(a,null,s)){n(s);return}}catch(s){if(!e(a,s)){i(s);return}}})()})}function ez(t){return("0"+t.toString(16)).substr(-2)}function tz(){const e=new Uint32Array(56);if(typeof crypto>"u"){const r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",n=r.length;let i="";for(let a=0;a<56;a++)i+=r.charAt(Math.floor(Math.random()*n));return i}return crypto.getRandomValues(e),Array.from(e,ez).join("")}async function rz(t){const r=new TextEncoder().encode(t),n=await crypto.subtle.digest("SHA-256",r),i=new Uint8Array(n);return Array.from(i).map(a=>String.fromCharCode(a)).join("")}async function nz(t){if(!(typeof crypto<"u"&&typeof crypto.subtle<"u"&&typeof TextEncoder<"u"))return console.warn("WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256."),t;const r=await rz(t);return btoa(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function Io(t,e,r=!1){const n=tz();let i=n;r&&(i+="/recovery"),await Fo(t,`${e}-code-verifier`,i);const a=await nz(n);return[a,n===a?"plain":"s256"]}const iz=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function az(t){const e=t.headers.get(yb);if(!e||!e.match(iz))return null;try{return new Date(`${e}T00:00:00.0Z`)}catch{return null}}function oz(t){if(!t)throw new Error("Missing exp claim");const e=Math.floor(Date.now()/1e3);if(t<=e)throw new Error("JWT has expired")}function sz(t){switch(t){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 lz=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function ri(t){if(!lz.test(t))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function mn(t){if(!t.passkey)throw new Error("@supabase/auth-js: the passkey API is experimental and disabled by default. Enable it by passing `auth: { experimental: { passkey: true } }` to createClient (or to the GoTrueClient constructor).")}function Qm(){const t={};return new Proxy(t,{get:(e,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:(e,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:(e,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 uz(t,e){return new Proxy(t,{get:(r,n,i)=>{if(n==="__isInsecureUserWarningProxy")return!0;if(typeof n=="symbol"){const a=n.toString();if(a==="Symbol(Symbol.toPrimitive)"||a==="Symbol(Symbol.toStringTag)"||a==="Symbol(util.inspect.custom)"||a==="Symbol(nodejs.util.inspect.custom)")return Reflect.get(r,n,i)}return!e.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."),e.value=!0),Reflect.get(r,n,i)}})}function Mk(t){return JSON.parse(JSON.stringify(t))}const Na=t=>{if(typeof t=="object"&&t!==null){const e=t;if(typeof e.msg=="string")return e.msg;if(typeof e.message=="string")return e.message;if(typeof e.error_description=="string")return e.error_description;if(typeof e.error=="string")return e.error}return JSON.stringify(t)},cz=[502,503,504,520,521,522,523,524,530];async function Lk(t){var e;if(!J8(t))throw new bb(Na(t),0);if(cz.includes(t.status))throw new bb(Na(t),t.status);let r;try{r=await t.json()}catch(a){throw new xn(Na(a),a)}let n;const i=az(t);if(i&&i.getTime()>=eR["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 Rk(Na(r),t.status,((e=r.weak_password)===null||e===void 0?void 0:e.reasons)||[]);if(n==="session_not_found")throw new Wt}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((a,s)=>a&&typeof s=="string",!0))throw new Rk(Na(r),t.status,r.weak_password.reasons);throw new B8(Na(r),t.status||500,n)}const fz=(t,e,r,n)=>{const i={method:t,headers:(e==null?void 0:e.headers)||{}};return t==="GET"?i:(i.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},e==null?void 0:e.headers),i.body=JSON.stringify(n),Object.assign(Object.assign({},i),r))};async function xe(t,e,r,n){var i;const a=Object.assign({},n==null?void 0:n.headers);a[yb]||(a[yb]=eR["2024-01-01"].name),n!=null&&n.jwt&&(a.Authorization=`Bearer ${n.jwt}`);const s=(i=n==null?void 0:n.query)!==null&&i!==void 0?i:{};n!=null&&n.redirectTo&&(s.redirect_to=n.redirectTo);const u=Object.keys(s).length?"?"+new URLSearchParams(s).toString():"",c=await dz(t,e,r+u,{headers:a,noResolveJson:n==null?void 0:n.noResolveJson},{},n==null?void 0:n.body);return n!=null&&n.xform?n==null?void 0:n.xform(c):{data:Object.assign({},c),error:null}}async function dz(t,e,r,n,i,a){const s=fz(e,n,i,a);let u;try{u=await t(r,Object.assign({},s))}catch(c){throw console.error(c),new bb(Na(c),0)}if(u.ok||await Lk(u),n!=null&&n.noResolveJson)return u;try{return await u.json()}catch(c){await Lk(c)}}function Qr(t){var e;let r=null;mz(t)&&(r=Object.assign({},t),t.expires_at||(r.expires_at=G8(t.expires_in)));const n=(e=t.user)!==null&&e!==void 0?e:typeof(t==null?void 0:t.id)=="string"?t:null;return{data:{session:r,user:n},error:null}}function Dk(t){const e=Qr(t);return!e.error&&t.weak_password&&typeof t.weak_password=="object"&&Array.isArray(t.weak_password.reasons)&&t.weak_password.reasons.length&&t.weak_password.message&&typeof t.weak_password.message=="string"&&t.weak_password.reasons.reduce((r,n)=>r&&typeof n=="string",!0)&&(e.data.weak_password=t.weak_password),e}function Zi(t){var e;return{data:{user:(e=t.user)!==null&&e!==void 0?e:t},error:null}}function hz(t){return{data:t,error:null}}function pz(t){const{action_link:e,email_otp:r,hashed_token:n,redirect_to:i,verification_type:a}=t,s=ph(t,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),u={action_link:e,email_otp:r,hashed_token:n,redirect_to:i,verification_type:a},c=Object.assign({},s);return{data:{properties:u,user:c},error:null}}function Bk(t){return t}function mz(t){return!!t.access_token&&!!t.refresh_token&&!!t.expires_in}const Zm=["global","local","others"];class gz{_encodePathSegment(e){if(e==="."||e==="..")throw new is("Invalid path segment");return encodeURIComponent(e)}constructor({url:e="",headers:r={},fetch:n,experimental:i}){this.url=e,this.headers=r,this.fetch=nR(n),this.experimental=i??{},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)},this.passkey={listPasskeys:this._adminListPasskeys.bind(this),deletePasskey:this._adminDeletePasskey.bind(this)}}async signOut(e,r=Zm[0]){if(Zm.indexOf(r)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${Zm.join(", ")}`);try{return await xe(this.fetch,"POST",`${this.url}/logout?scope=${r}`,{headers:this.headers,jwt:e,noResolveJson:!0}),{data:null,error:null}}catch(n){if(he(n))return{data:null,error:n};throw n}}async inviteUserByEmail(e,r={}){try{return await xe(this.fetch,"POST",`${this.url}/invite`,{body:{email:e,data:r.data},headers:this.headers,redirectTo:r.redirectTo,xform:Zi})}catch(n){if(he(n))return{data:{user:null},error:n};throw n}}async generateLink(e){try{const{options:r}=e,n=ph(e,["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 xe(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:i,headers:this.headers,xform:pz,redirectTo:r==null?void 0:r.redirectTo})}catch(r){if(he(r))return{data:{properties:null,user:null},error:r};throw r}}async createUser(e){try{return await xe(this.fetch,"POST",`${this.url}/admin/users`,{body:e,headers:this.headers,xform:Zi})}catch(r){if(he(r))return{data:{user:null},error:r};throw r}}async listUsers(e){var r,n,i,a,s,u,c;try{const f={nextPage:null,lastPage:0,total:0},p=await xe(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(n=(r=e==null?void 0:e.page)===null||r===void 0?void 0:r.toString())!==null&&n!==void 0?n:"",per_page:(a=(i=e==null?void 0:e.perPage)===null||i===void 0?void 0:i.toString())!==null&&a!==void 0?a:""},xform:Bk});if(p.error)throw p.error;const h=await p.json(),g=(s=p.headers.get("x-total-count"))!==null&&s!==void 0?s:0,v=(c=(u=p.headers.get("link"))===null||u===void 0?void 0:u.split(","))!==null&&c!==void 0?c:[];return v.length>0&&(v.forEach(y=>{const x=parseInt(y.split(";")[0].split("=")[1].substring(0,1)),b=JSON.parse(y.split(";")[1].split("=")[1]);f[`${b}Page`]=x}),f.total=parseInt(g)),{data:Object.assign(Object.assign({},h),f),error:null}}catch(f){if(he(f))return{data:{users:[]},error:f};throw f}}async getUserById(e){ri(e);try{return await xe(this.fetch,"GET",`${this.url}/admin/users/${e}`,{headers:this.headers,xform:Zi})}catch(r){if(he(r))return{data:{user:null},error:r};throw r}}async updateUserById(e,r){ri(e);try{return await xe(this.fetch,"PUT",`${this.url}/admin/users/${e}`,{body:r,headers:this.headers,xform:Zi})}catch(n){if(he(n))return{data:{user:null},error:n};throw n}}async deleteUser(e,r=!1){ri(e);try{return await xe(this.fetch,"DELETE",`${this.url}/admin/users/${e}`,{headers:this.headers,body:{should_soft_delete:r},xform:Zi})}catch(n){if(he(n))return{data:{user:null},error:n};throw n}}async _listFactors(e){ri(e.userId);try{const{data:r,error:n}=await xe(this.fetch,"GET",`${this.url}/admin/users/${e.userId}/factors`,{headers:this.headers,xform:i=>({data:{factors:i},error:null})});return{data:r,error:n}}catch(r){if(he(r))return{data:null,error:r};throw r}}async _deleteFactor(e){ri(e.userId),ri(e.id);try{return{data:await xe(this.fetch,"DELETE",`${this.url}/admin/users/${e.userId}/factors/${e.id}`,{headers:this.headers}),error:null}}catch(r){if(he(r))return{data:null,error:r};throw r}}async _listOAuthClients(e){var r,n,i,a,s,u,c;try{const f={nextPage:null,lastPage:0,total:0},p=await xe(this.fetch,"GET",`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:(n=(r=e==null?void 0:e.page)===null||r===void 0?void 0:r.toString())!==null&&n!==void 0?n:"",per_page:(a=(i=e==null?void 0:e.perPage)===null||i===void 0?void 0:i.toString())!==null&&a!==void 0?a:""},xform:Bk});if(p.error)throw p.error;const h=await p.json(),g=(s=p.headers.get("x-total-count"))!==null&&s!==void 0?s:0,v=(c=(u=p.headers.get("link"))===null||u===void 0?void 0:u.split(","))!==null&&c!==void 0?c:[];return v.length>0&&(v.forEach(y=>{const x=parseInt(y.split(";")[0].split("=")[1].substring(0,1)),b=JSON.parse(y.split(";")[1].split("=")[1]);f[`${b}Page`]=x}),f.total=parseInt(g)),{data:Object.assign(Object.assign({},h),f),error:null}}catch(f){if(he(f))return{data:{clients:[]},error:f};throw f}}async _createOAuthClient(e){try{return await xe(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:e,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(he(r))return{data:null,error:r};throw r}}async _getOAuthClient(e){try{const r=this._encodePathSegment(e);return await xe(this.fetch,"GET",`${this.url}/admin/oauth/clients/${r}`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(r){if(he(r))return{data:null,error:r};throw r}}async _updateOAuthClient(e,r){try{const n=this._encodePathSegment(e);return await xe(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${n}`,{body:r,headers:this.headers,xform:i=>({data:i,error:null})})}catch(n){if(he(n))return{data:null,error:n};throw n}}async _deleteOAuthClient(e){try{const r=this._encodePathSegment(e);return await xe(this.fetch,"DELETE",`${this.url}/admin/oauth/clients/${r}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if(he(r))return{data:null,error:r};throw r}}async _regenerateOAuthClientSecret(e){try{const r=this._encodePathSegment(e);return await xe(this.fetch,"POST",`${this.url}/admin/oauth/clients/${r}/regenerate_secret`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(r){if(he(r))return{data:null,error:r};throw r}}async _listCustomProviders(e){try{const r={};return e!=null&&e.type&&(r.type=e.type),await xe(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(he(r))return{data:{providers:[]},error:r};throw r}}async _createCustomProvider(e){try{return await xe(this.fetch,"POST",`${this.url}/admin/custom-providers`,{body:e,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(he(r))return{data:null,error:r};throw r}}async _getCustomProvider(e){try{const r=this._encodePathSegment(e);return await xe(this.fetch,"GET",`${this.url}/admin/custom-providers/${r}`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(r){if(he(r))return{data:null,error:r};throw r}}async _updateCustomProvider(e,r){try{const n=this._encodePathSegment(e);return await xe(this.fetch,"PUT",`${this.url}/admin/custom-providers/${n}`,{body:r,headers:this.headers,xform:i=>({data:i,error:null})})}catch(n){if(he(n))return{data:null,error:n};throw n}}async _deleteCustomProvider(e){try{const r=this._encodePathSegment(e);return await xe(this.fetch,"DELETE",`${this.url}/admin/custom-providers/${r}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if(he(r))return{data:null,error:r};throw r}}async _adminListPasskeys(e){mn(this.experimental),ri(e.userId);try{return await xe(this.fetch,"GET",`${this.url}/admin/users/${e.userId}/passkeys`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(he(r))return{data:null,error:r};throw r}}async _adminDeletePasskey(e){mn(this.experimental),ri(e.userId),ri(e.passkeyId);try{return await xe(this.fetch,"DELETE",`${this.url}/admin/users/${e.userId}/passkeys/${e.passkeyId}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if(he(r))return{data:null,error:r};throw r}}}function zk(t={}){return{getItem:e=>t[e]||null,setItem:(e,r)=>{t[e]=r},removeItem:e=>{delete t[e]}}}const Nn={debug:!!(globalThis&&rR()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};class iR extends Error{constructor(e){super(e),this.isAcquireTimeout=!0}}class qk extends iR{}async function vz(t,e,r){Nn.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",t,e);const n=new globalThis.AbortController;let i;e>0&&(i=setTimeout(()=>{n.abort(),Nn.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",t)},e)),await Promise.resolve();try{return await globalThis.navigator.locks.request(t,e===0?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:n.signal},async a=>{if(a){clearTimeout(i),Nn.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",t,a.name);try{return await r()}finally{Nn.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",t,a.name)}}else{if(e===0)throw Nn.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",t),new qk(`Acquiring an exclusive Navigator LockManager lock "${t}" immediately failed`);if(Nn.debug)try{const s=await globalThis.navigator.locks.query();console.log("@supabase/gotrue-js: Navigator LockManager state",JSON.stringify(s,null," "))}catch(s){console.warn("@supabase/gotrue-js: Error when querying Navigator LockManager state",s)}return console.warn("@supabase/gotrue-js: Navigator LockManager returned a null lock when using #request without ifAvailable set to true, it appears this browser is not following the LockManager spec https://developer.mozilla.org/en-US/docs/Web/API/LockManager/request"),clearTimeout(i),await r()}})}catch(a){if(e>0&&clearTimeout(i),a!==null&&typeof a=="object"&&"name"in a&&a.name==="AbortError"&&e>0){if(n.signal.aborted)return Nn.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire timeout, recovering by stealing lock",t),console.warn(`@supabase/gotrue-js: Lock "${t}" was not released within ${e}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(t,{mode:"exclusive",steal:!0},async s=>{if(s){Nn.debug&&console.log("@supabase/gotrue-js: navigatorLock: recovered (stolen)",t,s.name);try{return await r()}finally{Nn.debug&&console.log("@supabase/gotrue-js: navigatorLock: released (stolen)",t,s.name)}}else return console.warn("@supabase/gotrue-js: Navigator LockManager returned null lock even with steal: true"),await r()}));throw Nn.debug&&console.log("@supabase/gotrue-js: navigatorLock: lock was stolen by another request",t),new qk(`Lock "${t}" was released because another request stole it`)}throw a}}function yz(){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 aR(t){if(!/^0x[a-fA-F0-9]{40}$/.test(t))throw new Error(`@supabase/auth-js: Address "${t}" is invalid.`);return t.toLowerCase()}function bz(t){return parseInt(t,16)}function wz(t){const e=new TextEncoder().encode(t);return"0x"+Array.from(e,n=>n.toString(16).padStart(2,"0")).join("")}function xz(t){var e;const{chainId:r,domain:n,expirationTime:i,issuedAt:a=new Date,nonce:s,notBefore:u,requestId:c,resources:f,scheme:p,uri:h,version:g}=t;{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(s&&s.length<8)throw new Error(`@supabase/auth-js: Invalid SIWE message field "nonce". Nonce must be at least 8 characters. Provided value: ${s}`);if(!h)throw new Error('@supabase/auth-js: Invalid SIWE message field "uri". URI must be provided.');if(g!=="1")throw new Error(`@supabase/auth-js: Invalid SIWE message field "version". Version must be '1'. Provided value: ${g}`);if(!((e=t.statement)===null||e===void 0)&&e.includes(`
|
|
289
|
-
`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${t.statement}`)}const v=aR(t.address),y=p?`${p}://${n}`:n,x=t.statement?`${t.statement}
|
|
290
|
-
`:"",b=`${y} wants you to sign in with your Ethereum account:
|
|
291
|
-
${v}
|
|
292
|
-
|
|
293
|
-
${x}`;let S=`URI: ${h}
|
|
294
|
-
Version: ${g}
|
|
295
|
-
Chain ID: ${r}${s?`
|
|
296
|
-
Nonce: ${s}`:""}
|
|
297
|
-
Issued At: ${a.toISOString()}`;if(i&&(S+=`
|
|
298
|
-
Expiration Time: ${i.toISOString()}`),u&&(S+=`
|
|
299
|
-
Not Before: ${u.toISOString()}`),c&&(S+=`
|
|
300
|
-
Request ID: ${c}`),f){let O=`
|
|
301
|
-
Resources:`;for(const k of f){if(!k||typeof k!="string")throw new Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${k}`);O+=`
|
|
302
|
-
- ${k}`}S+=O}return`${b}
|
|
303
|
-
${S}`}class Tt extends Error{constructor({message:e,code:r,cause:n,name:i}){var a;super(e,{cause:n}),this.__isWebAuthnError=!0,this.name=(a=i??(n instanceof Error?n.name:void 0))!==null&&a!==void 0?a:"Unknown Error",this.code=r}toJSON(){return{name:this.name,message:this.message,code:this.code}}}class id extends Tt{constructor(e,r){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:r,message:e}),this.name="WebAuthnUnknownError",this.originalError=r}}function _z({error:t,options:e}){var r,n,i;const{publicKey:a}=e;if(!a)throw Error("options was missing required publicKey property");if(t.name==="AbortError"){if(e.signal instanceof AbortSignal)return new Tt({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:t})}else if(t.name==="ConstraintError"){if(((r=a.authenticatorSelection)===null||r===void 0?void 0:r.requireResidentKey)===!0)return new Tt({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:t});if(e.mediation==="conditional"&&((n=a.authenticatorSelection)===null||n===void 0?void 0:n.userVerification)==="required")return new Tt({message:"User verification was required during automatic registration but it could not be performed",code:"ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",cause:t});if(((i=a.authenticatorSelection)===null||i===void 0?void 0:i.userVerification)==="required")return new Tt({message:"User verification was required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",cause:t})}else{if(t.name==="InvalidStateError")return new Tt({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:t});if(t.name==="NotAllowedError")return new Tt({message:t.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t});if(t.name==="NotSupportedError")return a.pubKeyCredParams.filter(u=>u.type==="public-key").length===0?new Tt({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:t}):new Tt({message:"No available authenticator supported any of the specified pubKeyCredParams algorithms",code:"ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",cause:t});if(t.name==="SecurityError"){const s=window.location.hostname;if(oR(s)){if(a.rp.id!==s)return new Tt({message:`The RP ID "${a.rp.id}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:t})}else return new Tt({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:t})}else if(t.name==="TypeError"){if(a.user.id.byteLength<1||a.user.id.byteLength>64)return new Tt({message:"User ID was not between 1 and 64 characters",code:"ERROR_INVALID_USER_ID_LENGTH",cause:t})}else if(t.name==="UnknownError")return new Tt({message:"The authenticator was unable to process the specified options, or could not create a new credential",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:t})}return new Tt({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t})}function Sz({error:t,options:e}){const{publicKey:r}=e;if(!r)throw Error("options was missing required publicKey property");if(t.name==="AbortError"){if(e.signal instanceof AbortSignal)return new Tt({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:t})}else{if(t.name==="NotAllowedError")return new Tt({message:t.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t});if(t.name==="SecurityError"){const n=window.location.hostname;if(oR(n)){if(r.rpId!==n)return new Tt({message:`The RP ID "${r.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:t})}else return new Tt({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:t})}else if(t.name==="UnknownError")return new Tt({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:t})}return new Tt({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t})}class kz{createNewAbortSignal(){if(this.controller){const r=new Error("Cancelling existing WebAuthn API call for new one");r.name="AbortError",this.controller.abort(r)}const e=new AbortController;return this.controller=e,e.signal}cancelCeremony(){if(this.controller){const e=new Error("Manually cancelling existing WebAuthn API call");e.name="AbortError",this.controller.abort(e),this.controller=void 0}}}const xb=new kz;function Uk(t){if(!t)throw new Error("Credential creation options are required");if(typeof PublicKeyCredential<"u"&&"parseCreationOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseCreationOptionsFromJSON=="function")return PublicKeyCredential.parseCreationOptionsFromJSON(t);const{challenge:e,user:r,excludeCredentials:n}=t,i=ph(t,["challenge","user","excludeCredentials"]),a=Qo(e).buffer,s=Object.assign(Object.assign({},r),{id:Qo(r.id).buffer}),u=Object.assign(Object.assign({},i),{challenge:a,user:s});if(n&&n.length>0){u.excludeCredentials=new Array(n.length);for(let c=0;c<n.length;c++){const f=n[c];u.excludeCredentials[c]=Object.assign(Object.assign({},f),{id:Qo(f.id).buffer,type:f.type||"public-key",transports:f.transports})}}return u}function Fk(t){if(!t)throw new Error("Credential request options are required");if(typeof PublicKeyCredential<"u"&&"parseRequestOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseRequestOptionsFromJSON=="function")return PublicKeyCredential.parseRequestOptionsFromJSON(t);const{challenge:e,allowCredentials:r}=t,n=ph(t,["challenge","allowCredentials"]),i=Qo(e).buffer,a=Object.assign(Object.assign({},n),{challenge:i});if(r&&r.length>0){a.allowCredentials=new Array(r.length);for(let s=0;s<r.length;s++){const u=r[s];a.allowCredentials[s]=Object.assign(Object.assign({},u),{id:Qo(u.id).buffer,type:u.type||"public-key",transports:u.transports})}}return a}function Wk(t){var e;if("toJSON"in t&&typeof t.toJSON=="function")return t.toJSON();const r=t;return{id:t.id,rawId:t.id,response:{attestationObject:Da(new Uint8Array(t.response.attestationObject)),clientDataJSON:Da(new Uint8Array(t.response.clientDataJSON))},type:"public-key",clientExtensionResults:t.getClientExtensionResults(),authenticatorAttachment:(e=r.authenticatorAttachment)!==null&&e!==void 0?e:void 0}}function Hk(t){var e;if("toJSON"in t&&typeof t.toJSON=="function")return t.toJSON();const r=t,n=t.getClientExtensionResults(),i=t.response;return{id:t.id,rawId:t.id,response:{authenticatorData:Da(new Uint8Array(i.authenticatorData)),clientDataJSON:Da(new Uint8Array(i.clientDataJSON)),signature:Da(new Uint8Array(i.signature)),userHandle:i.userHandle?Da(new Uint8Array(i.userHandle)):void 0},type:"public-key",clientExtensionResults:n,authenticatorAttachment:(e=r.authenticatorAttachment)!==null&&e!==void 0?e:void 0}}function oR(t){return t==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(t)}function ad(){var t,e;return!!(Zt()&&"PublicKeyCredential"in window&&window.PublicKeyCredential&&"credentials"in navigator&&typeof((t=navigator==null?void 0:navigator.credentials)===null||t===void 0?void 0:t.create)=="function"&&typeof((e=navigator==null?void 0:navigator.credentials)===null||e===void 0?void 0:e.get)=="function")}async function sR(t){try{const e=await navigator.credentials.create(t);return e?e instanceof PublicKeyCredential?{data:e,error:null}:{data:null,error:new id("Browser returned unexpected credential type",e)}:{data:null,error:new id("Empty credential response",e)}}catch(e){return{data:null,error:_z({error:e,options:t})}}}async function lR(t){try{const e=await navigator.credentials.get(t);return e?e instanceof PublicKeyCredential?{data:e,error:null}:{data:null,error:new id("Browser returned unexpected credential type",e)}:{data:null,error:new id("Empty credential response",e)}}catch(e){return{data:null,error:Sz({error:e,options:t})}}}const Oz={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},Ez={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function od(...t){const e=i=>i!==null&&typeof i=="object"&&!Array.isArray(i),r=i=>i instanceof ArrayBuffer||ArrayBuffer.isView(i),n={};for(const i of t)if(i)for(const a in i){const s=i[a];if(s!==void 0)if(Array.isArray(s))n[a]=s;else if(r(s))n[a]=s;else if(e(s)){const u=n[a];e(u)?n[a]=od(u,s):n[a]=od(s)}else n[a]=s}return n}function Az(t,e){return od(Oz,t,e||{})}function Pz(t,e){return od(Ez,t,e||{})}class Tz{constructor(e){this.client=e,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(e){return this.client.mfa.enroll(Object.assign(Object.assign({},e),{factorType:"webauthn"}))}async _challenge({factorId:e,webauthn:r,friendlyName:n,signal:i},a){var s;try{const{data:u,error:c}=await this.client.mfa.challenge({factorId:e,webauthn:r});if(!u)return{data:null,error:c};const f=i??xb.createNewAbortSignal();if(u.webauthn.type==="create"){const{user:p}=u.webauthn.credential_options.publicKey;if(!p.name){const h=n;if(h)p.name=`${p.id}:${h}`;else{const v=(await this.client.getUser()).data.user,y=((s=v==null?void 0:v.user_metadata)===null||s===void 0?void 0:s.name)||(v==null?void 0:v.email)||(v==null?void 0:v.id)||"User";p.name=`${p.id}:${y}`}}p.displayName||(p.displayName=p.name)}switch(u.webauthn.type){case"create":{const p=Az(u.webauthn.credential_options.publicKey,a==null?void 0:a.create),{data:h,error:g}=await sR({publicKey:p,signal:f});return h?{data:{factorId:e,challengeId:u.id,webauthn:{type:u.webauthn.type,credential_response:h}},error:null}:{data:null,error:g}}case"request":{const p=Pz(u.webauthn.credential_options.publicKey,a==null?void 0:a.request),{data:h,error:g}=await lR(Object.assign(Object.assign({},u.webauthn.credential_options),{publicKey:p,signal:f}));return h?{data:{factorId:e,challengeId:u.id,webauthn:{type:u.webauthn.type,credential_response:h}},error:null}:{data:null,error:g}}}}catch(u){return he(u)?{data:null,error:u}:{data:null,error:new xn("Unexpected error in challenge",u)}}}async _verify({challengeId:e,factorId:r,webauthn:n}){return this.client.mfa.verify({factorId:r,challengeId:e,webauthn:n})}async _authenticate({factorId:e,webauthn:{rpId:r=typeof window<"u"?window.location.hostname:void 0,rpOrigins:n=typeof window<"u"?[window.location.origin]:void 0,signal:i}={}},a){if(!r)return{data:null,error:new is("rpId is required for WebAuthn authentication")};try{if(!ad())return{data:null,error:new xn("Browser does not support WebAuthn",null)};const{data:s,error:u}=await this.challenge({factorId:e,webauthn:{rpId:r,rpOrigins:n},signal:i},{request:a});if(!s)return{data:null,error:u};const{webauthn:c}=s;return this._verify({factorId:e,challengeId:s.challengeId,webauthn:{type:c.type,rpId:r,rpOrigins:n,credential_response:c.credential_response}})}catch(s){return he(s)?{data:null,error:s}:{data:null,error:new xn("Unexpected error in authenticate",s)}}}async _register({friendlyName:e,webauthn:{rpId:r=typeof window<"u"?window.location.hostname:void 0,rpOrigins:n=typeof window<"u"?[window.location.origin]:void 0,signal:i}={}},a){if(!r)return{data:null,error:new is("rpId is required for WebAuthn registration")};try{if(!ad())return{data:null,error:new xn("Browser does not support WebAuthn",null)};const{data:s,error:u}=await this._enroll({friendlyName:e});if(!s)return await this.client.mfa.listFactors().then(p=>{var h;return(h=p.data)===null||h===void 0?void 0:h.all.find(g=>g.factor_type==="webauthn"&&g.friendly_name===e&&g.status!=="unverified")}).then(p=>p?this.client.mfa.unenroll({factorId:p==null?void 0:p.id}):void 0),{data:null,error:u};const{data:c,error:f}=await this._challenge({factorId:s.id,friendlyName:s.friendly_name,webauthn:{rpId:r,rpOrigins:n},signal:i},{create:a});return c?this._verify({factorId:s.id,challengeId:c.challengeId,webauthn:{rpId:r,rpOrigins:n,type:c.webauthn.type,credential_response:c.webauthn.credential_response}}):{data:null,error:f}}catch(s){return he(s)?{data:null,error:s}:{data:null,error:new xn("Unexpected error in register",s)}}}}yz();const Cz={url:$8,storageKey:I8,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:M8,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:5e3,skipAutoInitialize:!1,experimental:{}};async function Vk(t,e,r){return await r()}const Mo={};class cu{get jwks(){var e,r;return(r=(e=Mo[this.storageKey])===null||e===void 0?void 0:e.jwks)!==null&&r!==void 0?r:{keys:[]}}set jwks(e){Mo[this.storageKey]=Object.assign(Object.assign({},Mo[this.storageKey]),{jwks:e})}get jwks_cached_at(){var e,r;return(r=(e=Mo[this.storageKey])===null||e===void 0?void 0:e.cachedAt)!==null&&r!==void 0?r:Number.MIN_SAFE_INTEGER}set jwks_cached_at(e){Mo[this.storageKey]=Object.assign(Object.assign({},Mo[this.storageKey]),{cachedAt:e})}constructor(e){var r,n,i,a;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.autoRefreshTickTimeout=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.initializePromise=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log;const s=Object.assign(Object.assign({},Cz),e);if(this.storageKey=s.storageKey,this.instanceID=(r=cu.nextInstanceID[this.storageKey])!==null&&r!==void 0?r:0,cu.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!s.debug,typeof s.debug=="function"&&(this.logger=s.debug),this.instanceID>0&&Zt()){const u=`${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(u),this.logDebugMessages&&console.trace(u)}if(this.persistSession=s.persistSession,this.autoRefreshToken=s.autoRefreshToken,this.experimental=(n=s.experimental)!==null&&n!==void 0?n:{},this.admin=new gz({url:s.url,headers:s.headers,fetch:s.fetch,experimental:this.experimental}),this.url=s.url,this.headers=s.headers,this.fetch=nR(s.fetch),this.lock=s.lock||Vk,this.detectSessionInUrl=s.detectSessionInUrl,this.flowType=s.flowType,this.hasCustomAuthorizationHeader=s.hasCustomAuthorizationHeader,this.throwOnError=s.throwOnError,this.lockAcquireTimeout=s.lockAcquireTimeout,s.lock?this.lock=s.lock:this.persistSession&&Zt()&&(!((i=globalThis==null?void 0:globalThis.navigator)===null||i===void 0)&&i.locks)?this.lock=vz:this.lock=Vk,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 Tz(this)},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.passkey={startRegistration:this._startPasskeyRegistration.bind(this),verifyRegistration:this._verifyPasskeyRegistration.bind(this),startAuthentication:this._startPasskeyAuthentication.bind(this),verifyAuthentication:this._verifyPasskeyAuthentication.bind(this),list:this._listPasskeys.bind(this),update:this._updatePasskey.bind(this),delete:this._deletePasskey.bind(this)},this.persistSession?(s.storage?this.storage=s.storage:rR()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=zk(this.memoryStorage)),s.userStorage&&(this.userStorage=s.userStorage)):(this.memoryStorage={},this.storage=zk(this.memoryStorage)),Zt()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(u){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",u)}(a=this.broadcastChannel)===null||a===void 0||a.addEventListener("message",async u=>{this._debug("received broadcast notification from other tab or client",u);try{await this._notifyAllSubscribers(u.data.event,u.data.session,!1)}catch(c){this._debug("#broadcastChannel","error",c)}})}s.skipAutoInitialize||this.initialize().catch(u=>{this._debug("#initialize()","error",u)})}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(e){if(this.throwOnError&&e&&e.error)throw e.error;return e}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${Zj}) ${new Date().toISOString()}`}_debug(...e){return this.logDebugMessages&&this.logger(this._logPrefix(),...e),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 e;try{let r={},n="none";if(Zt()&&(r=Y8(window.location.href),this._isImplicitGrantCallback(r)?n="implicit":await this._isPKCECallback(r)&&(n="pkce")),Zt()&&this.detectSessionInUrl&&n!=="none"){const{data:i,error:a}=await this._getSessionFromURL(r,n);if(a){if(this._debug("#_initialize()","error detecting session from URL",a),q8(a)){const c=(e=a.details)===null||e===void 0?void 0:e.code;if(c==="identity_already_exists"||c==="identity_not_found"||c==="single_identity_not_deletable")return{error:a}}return{error:a}}const{session:s,redirectType:u}=i;return this._debug("#_initialize()","detected session in URL",s,"redirect type",u),await this._saveSession(s),setTimeout(async()=>{u==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",s):await this._notifyAllSubscribers("SIGNED_IN",s)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(r){return he(r)?this._returnResult({error:r}):this._returnResult({error:new xn("Unexpected error during initialization",r)})}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(e){var r,n,i;try{const a=await xe(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(n=(r=e==null?void 0:e.options)===null||r===void 0?void 0:r.data)!==null&&n!==void 0?n:{},gotrue_meta_security:{captcha_token:(i=e==null?void 0:e.options)===null||i===void 0?void 0:i.captchaToken}},xform:Qr}),{data:s,error:u}=a;if(u||!s)return this._returnResult({data:{user:null,session:null},error:u});const c=s.session,f=s.user;return s.session&&(await this._saveSession(s.session),await this._notifyAllSubscribers("SIGNED_IN",c)),this._returnResult({data:{user:f,session:c},error:null})}catch(a){if(he(a))return this._returnResult({data:{user:null,session:null},error:a});throw a}}async signUp(e){var r,n,i;try{let a;if("email"in e){const{email:p,password:h,options:g}=e;let v=null,y=null;this.flowType==="pkce"&&([v,y]=await Io(this.storage,this.storageKey)),a=await xe(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:g==null?void 0:g.emailRedirectTo,body:{email:p,password:h,data:(r=g==null?void 0:g.data)!==null&&r!==void 0?r:{},gotrue_meta_security:{captcha_token:g==null?void 0:g.captchaToken},code_challenge:v,code_challenge_method:y},xform:Qr})}else if("phone"in e){const{phone:p,password:h,options:g}=e;a=await xe(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:p,password:h,data:(n=g==null?void 0:g.data)!==null&&n!==void 0?n:{},channel:(i=g==null?void 0:g.channel)!==null&&i!==void 0?i:"sms",gotrue_meta_security:{captcha_token:g==null?void 0:g.captchaToken}},xform:Qr})}else throw new kf("You must provide either an email or phone number and a password");const{data:s,error:u}=a;if(u||!s)return await Qt(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:u});const c=s.session,f=s.user;return s.session&&(await this._saveSession(s.session),await this._notifyAllSubscribers("SIGNED_IN",c)),this._returnResult({data:{user:f,session:c},error:null})}catch(a){if(await Qt(this.storage,`${this.storageKey}-code-verifier`),he(a))return this._returnResult({data:{user:null,session:null},error:a});throw a}}async signInWithPassword(e){try{let r;if("email"in e){const{email:a,password:s,options:u}=e;r=await xe(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:a,password:s,gotrue_meta_security:{captcha_token:u==null?void 0:u.captchaToken}},xform:Dk})}else if("phone"in e){const{phone:a,password:s,options:u}=e;r=await xe(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:a,password:s,gotrue_meta_security:{captcha_token:u==null?void 0:u.captchaToken}},xform:Dk})}else throw new kf("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 a=new $o;return this._returnResult({data:{user:null,session:null},error:a})}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(he(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async signInWithOAuth(e){var r,n,i,a;return await this._handleProviderSignIn(e.provider,{redirectTo:(r=e.options)===null||r===void 0?void 0:r.redirectTo,scopes:(n=e.options)===null||n===void 0?void 0:n.scopes,queryParams:(i=e.options)===null||i===void 0?void 0:i.queryParams,skipBrowserRedirect:(a=e.options)===null||a===void 0?void 0:a.skipBrowserRedirect})}async exchangeCodeForSession(e){return await this.initializePromise,this._acquireLock(this.lockAcquireTimeout,async()=>this._exchangeCodeForSession(e))}async signInWithWeb3(e){const{chain:r}=e;switch(r){case"ethereum":return await this.signInWithEthereum(e);case"solana":return await this.signInWithSolana(e);default:throw new Error(`@supabase/auth-js: Unsupported chain "${r}"`)}}async signInWithEthereum(e){var r,n,i,a,s,u,c,f,p,h,g;let v,y;if("message"in e)v=e.message,y=e.signature;else{const{chain:x,wallet:b,statement:S,options:O}=e;let k;if(Zt())if(typeof b=="object")k=b;else{const M=window;if("ethereum"in M&&typeof M.ethereum=="object"&&"request"in M.ethereum&&typeof M.ethereum.request=="function")k=M.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 b!="object"||!(O!=null&&O.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");k=b}const T=new URL((r=O==null?void 0:O.url)!==null&&r!==void 0?r:window.location.href),E=await k.request({method:"eth_requestAccounts"}).then(M=>M).catch(()=>{throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!E||E.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const A=aR(E[0]);let j=(n=O==null?void 0:O.signInWithEthereum)===null||n===void 0?void 0:n.chainId;if(!j){const M=await k.request({method:"eth_chainId"});j=bz(M)}const R={domain:T.host,address:A,statement:S,uri:T.href,version:"1",chainId:j,nonce:(i=O==null?void 0:O.signInWithEthereum)===null||i===void 0?void 0:i.nonce,issuedAt:(s=(a=O==null?void 0:O.signInWithEthereum)===null||a===void 0?void 0:a.issuedAt)!==null&&s!==void 0?s:new Date,expirationTime:(u=O==null?void 0:O.signInWithEthereum)===null||u===void 0?void 0:u.expirationTime,notBefore:(c=O==null?void 0:O.signInWithEthereum)===null||c===void 0?void 0:c.notBefore,requestId:(f=O==null?void 0:O.signInWithEthereum)===null||f===void 0?void 0:f.requestId,resources:(p=O==null?void 0:O.signInWithEthereum)===null||p===void 0?void 0:p.resources};v=xz(R),y=await k.request({method:"personal_sign",params:[wz(v),A]})}try{const{data:x,error:b}=await xe(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:v,signature:y},!((h=e.options)===null||h===void 0)&&h.captchaToken?{gotrue_meta_security:{captcha_token:(g=e.options)===null||g===void 0?void 0:g.captchaToken}}:null),xform:Qr});if(b)throw b;if(!x||!x.session||!x.user){const S=new $o;return this._returnResult({data:{user:null,session:null},error:S})}return x.session&&(await this._saveSession(x.session),await this._notifyAllSubscribers("SIGNED_IN",x.session)),this._returnResult({data:Object.assign({},x),error:b})}catch(x){if(he(x))return this._returnResult({data:{user:null,session:null},error:x});throw x}}async signInWithSolana(e){var r,n,i,a,s,u,c,f,p,h,g,v;let y,x;if("message"in e)y=e.message,x=e.signature;else{const{chain:b,wallet:S,statement:O,options:k}=e;let T;if(Zt())if(typeof S=="object")T=S;else{const A=window;if("solana"in A&&typeof A.solana=="object"&&("signIn"in A.solana&&typeof A.solana.signIn=="function"||"signMessage"in A.solana&&typeof A.solana.signMessage=="function"))T=A.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 S!="object"||!(k!=null&&k.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");T=S}const E=new URL((r=k==null?void 0:k.url)!==null&&r!==void 0?r:window.location.href);if("signIn"in T&&T.signIn){const A=await T.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},k==null?void 0:k.signInWithSolana),{version:"1",domain:E.host,uri:E.href}),O?{statement:O}:null));let j;if(Array.isArray(A)&&A[0]&&typeof A[0]=="object")j=A[0];else if(A&&typeof A=="object"&&"signedMessage"in A&&"signature"in A)j=A;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in j&&"signature"in j&&(typeof j.signedMessage=="string"||j.signedMessage instanceof Uint8Array)&&j.signature instanceof Uint8Array)y=typeof j.signedMessage=="string"?j.signedMessage:new TextDecoder().decode(j.signedMessage),x=j.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in T)||typeof T.signMessage!="function"||!("publicKey"in T)||typeof T!="object"||!T.publicKey||!("toBase58"in T.publicKey)||typeof T.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");y=[`${E.host} wants you to sign in with your Solana account:`,T.publicKey.toBase58(),...O?["",O,""]:[""],"Version: 1",`URI: ${E.href}`,`Issued At: ${(i=(n=k==null?void 0:k.signInWithSolana)===null||n===void 0?void 0:n.issuedAt)!==null&&i!==void 0?i:new Date().toISOString()}`,...!((a=k==null?void 0:k.signInWithSolana)===null||a===void 0)&&a.notBefore?[`Not Before: ${k.signInWithSolana.notBefore}`]:[],...!((s=k==null?void 0:k.signInWithSolana)===null||s===void 0)&&s.expirationTime?[`Expiration Time: ${k.signInWithSolana.expirationTime}`]:[],...!((u=k==null?void 0:k.signInWithSolana)===null||u===void 0)&&u.chainId?[`Chain ID: ${k.signInWithSolana.chainId}`]:[],...!((c=k==null?void 0:k.signInWithSolana)===null||c===void 0)&&c.nonce?[`Nonce: ${k.signInWithSolana.nonce}`]:[],...!((f=k==null?void 0:k.signInWithSolana)===null||f===void 0)&&f.requestId?[`Request ID: ${k.signInWithSolana.requestId}`]:[],...!((h=(p=k==null?void 0:k.signInWithSolana)===null||p===void 0?void 0:p.resources)===null||h===void 0)&&h.length?["Resources",...k.signInWithSolana.resources.map(j=>`- ${j}`)]:[]].join(`
|
|
304
|
-
`);const A=await T.signMessage(new TextEncoder().encode(y),"utf8");if(!A||!(A instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");x=A}}try{const{data:b,error:S}=await xe(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:y,signature:Da(x)},!((g=e.options)===null||g===void 0)&&g.captchaToken?{gotrue_meta_security:{captcha_token:(v=e.options)===null||v===void 0?void 0:v.captchaToken}}:null),xform:Qr});if(S)throw S;if(!b||!b.session||!b.user){const O=new $o;return this._returnResult({data:{user:null,session:null},error:O})}return b.session&&(await this._saveSession(b.session),await this._notifyAllSubscribers("SIGNED_IN",b.session)),this._returnResult({data:Object.assign({},b),error:S})}catch(b){if(he(b))return this._returnResult({data:{user:null,session:null},error:b});throw b}}async _exchangeCodeForSession(e){const r=await Ta(this.storage,`${this.storageKey}-code-verifier`),[n,i]=(r??"").split("/");try{if(!n&&this.flowType==="pkce")throw new U8;const{data:a,error:s}=await xe(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:e,code_verifier:n},xform:Qr});if(await Qt(this.storage,`${this.storageKey}-code-verifier`),s)throw s;if(!a||!a.session||!a.user){const u=new $o;return this._returnResult({data:{user:null,session:null,redirectType:null},error:u})}return a.session&&(await this._saveSession(a.session),await this._notifyAllSubscribers(i==="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",a.session)),this._returnResult({data:Object.assign(Object.assign({},a),{redirectType:i??null}),error:s})}catch(a){if(await Qt(this.storage,`${this.storageKey}-code-verifier`),he(a))return this._returnResult({data:{user:null,session:null,redirectType:null},error:a});throw a}}async signInWithIdToken(e){try{const{options:r,provider:n,token:i,access_token:a,nonce:s}=e,u=await xe(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:n,id_token:i,access_token:a,nonce:s,gotrue_meta_security:{captcha_token:r==null?void 0:r.captchaToken}},xform:Qr}),{data:c,error:f}=u;if(f)return this._returnResult({data:{user:null,session:null},error:f});if(!c||!c.session||!c.user){const p=new $o;return this._returnResult({data:{user:null,session:null},error:p})}return c.session&&(await this._saveSession(c.session),await this._notifyAllSubscribers("SIGNED_IN",c.session)),this._returnResult({data:c,error:f})}catch(r){if(he(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async signInWithOtp(e){var r,n,i,a,s;try{if("email"in e){const{email:u,options:c}=e;let f=null,p=null;this.flowType==="pkce"&&([f,p]=await Io(this.storage,this.storageKey));const{error:h}=await xe(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:u,data:(r=c==null?void 0:c.data)!==null&&r!==void 0?r:{},create_user:(n=c==null?void 0:c.shouldCreateUser)!==null&&n!==void 0?n:!0,gotrue_meta_security:{captcha_token:c==null?void 0:c.captchaToken},code_challenge:f,code_challenge_method:p},redirectTo:c==null?void 0:c.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:h})}if("phone"in e){const{phone:u,options:c}=e,{data:f,error:p}=await xe(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:u,data:(i=c==null?void 0:c.data)!==null&&i!==void 0?i:{},create_user:(a=c==null?void 0:c.shouldCreateUser)!==null&&a!==void 0?a:!0,gotrue_meta_security:{captcha_token:c==null?void 0:c.captchaToken},channel:(s=c==null?void 0:c.channel)!==null&&s!==void 0?s:"sms"}});return this._returnResult({data:{user:null,session:null,messageId:f==null?void 0:f.message_id},error:p})}throw new kf("You must provide either an email or phone number.")}catch(u){if(await Qt(this.storage,`${this.storageKey}-code-verifier`),he(u))return this._returnResult({data:{user:null,session:null},error:u});throw u}}async verifyOtp(e){var r,n;try{let i,a;"options"in e&&(i=(r=e.options)===null||r===void 0?void 0:r.redirectTo,a=(n=e.options)===null||n===void 0?void 0:n.captchaToken);const{data:s,error:u}=await xe(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},e),{gotrue_meta_security:{captcha_token:a}}),redirectTo:i,xform:Qr});if(u)throw u;if(!s)throw new Error("An error occurred on token verification.");const c=s.session,f=s.user;return c!=null&&c.access_token&&(await this._saveSession(c),await this._notifyAllSubscribers(e.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",c)),this._returnResult({data:{user:f,session:c},error:null})}catch(i){if(he(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}}async signInWithSSO(e){var r,n,i,a,s;try{let u=null,c=null;this.flowType==="pkce"&&([u,c]=await Io(this.storage,this.storageKey));const f=await xe(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in e?{provider_id:e.providerId}:null),"domain"in e?{domain:e.domain}:null),{redirect_to:(n=(r=e.options)===null||r===void 0?void 0:r.redirectTo)!==null&&n!==void 0?n:void 0}),!((i=e==null?void 0:e.options)===null||i===void 0)&&i.captchaToken?{gotrue_meta_security:{captcha_token:e.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:u,code_challenge_method:c}),headers:this.headers,xform:hz});return!((a=f.data)===null||a===void 0)&&a.url&&Zt()&&!(!((s=e.options)===null||s===void 0)&&s.skipBrowserRedirect)&&window.location.assign(f.data.url),this._returnResult(f)}catch(u){if(await Qt(this.storage,`${this.storageKey}-code-verifier`),he(u))return this._returnResult({data:null,error:u});throw u}}async reauthenticate(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._reauthenticate())}async _reauthenticate(){try{return await this._useSession(async e=>{const{data:{session:r},error:n}=e;if(n)throw n;if(!r)throw new Wt;const{error:i}=await xe(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:r.access_token});return this._returnResult({data:{user:null,session:null},error:i})})}catch(e){if(he(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async resend(e){try{const r=`${this.url}/resend`;if("email"in e){const{email:n,type:i,options:a}=e,{error:s}=await xe(this.fetch,"POST",r,{headers:this.headers,body:{email:n,type:i,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},redirectTo:a==null?void 0:a.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:s})}else if("phone"in e){const{phone:n,type:i,options:a}=e,{data:s,error:u}=await xe(this.fetch,"POST",r,{headers:this.headers,body:{phone:n,type:i,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}}});return this._returnResult({data:{user:null,session:null,messageId:s==null?void 0:s.message_id},error:u})}throw new kf("You must provide either an email or phone number and a type")}catch(r){if(he(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(e,r){this._debug("#_acquireLock","begin",e);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}`,e,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(e){this._debug("#_useSession","begin");try{const r=await this.__loadSession();return await e(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 e=null;const r=await Ta(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",r),r!==null&&(this._isValidSession(r)?e=r:(this._debug("#getSession()","session from storage is not valid"),await this._removeSession())),!e)return{data:{session:null},error:null};const n=e.expires_at?e.expires_at*1e3-Date.now()<Ym:!1;if(this._debug("#__loadSession()",`session has${n?"":" not"} expired`,"expires_at",e.expires_at),!n){if(this.userStorage){const s=await Ta(this.userStorage,this.storageKey+"-user");s!=null&&s.user?e.user=s.user:e.user=Qm()}if(this.storage.isServer&&e.user&&!e.user.__isUserNotAvailableProxy){const s={value:this.suppressGetSessionWarning};e.user=uz(e.user,s),s.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:e},error:null}}const{data:i,error:a}=await this._callRefreshToken(e.refresh_token);return a?this._returnResult({data:{session:null},error:a}):this._returnResult({data:{session:i},error:null})}finally{this._debug("#__loadSession()","end")}}async getUser(e){if(e)return await this._getUser(e);await this.initializePromise;const r=await this._acquireLock(this.lockAcquireTimeout,async()=>await this._getUser());return r.data.user&&(this.suppressGetSessionWarning=!0),r}async _getUser(e){try{return e?await xe(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:e,xform:Zi}):await this._useSession(async r=>{var n,i,a;const{data:s,error:u}=r;if(u)throw u;return!(!((n=s.session)===null||n===void 0)&&n.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new Wt}:await xe(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(a=(i=s.session)===null||i===void 0?void 0:i.access_token)!==null&&a!==void 0?a:void 0,xform:Zi})})}catch(r){if(he(r))return Sf(r)&&(await this._removeSession(),await Qt(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({data:{user:null},error:r});throw r}}async updateUser(e,r={}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._updateUser(e,r))}async _updateUser(e,r={}){try{return await this._useSession(async n=>{const{data:i,error:a}=n;if(a)throw a;if(!i.session)throw new Wt;const s=i.session;let u=null,c=null;this.flowType==="pkce"&&e.email!=null&&([u,c]=await Io(this.storage,this.storageKey));const{data:f,error:p}=await xe(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:r==null?void 0:r.emailRedirectTo,body:Object.assign(Object.assign({},e),{code_challenge:u,code_challenge_method:c}),jwt:s.access_token,xform:Zi});if(p)throw p;return s.user=f.user,await this._saveSession(s),await this._notifyAllSubscribers("USER_UPDATED",s),this._returnResult({data:{user:s.user},error:null})})}catch(n){if(await Qt(this.storage,`${this.storageKey}-code-verifier`),he(n))return this._returnResult({data:{user:null},error:n});throw n}}async setSession(e){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._setSession(e))}async _setSession(e){try{if(!e.access_token||!e.refresh_token)throw new Wt;const r=Date.now()/1e3;let n=r,i=!0,a=null;const{payload:s}=Ef(e.access_token);if(s.exp&&(n=s.exp,i=n<=r),i){const{data:u,error:c}=await this._callRefreshToken(e.refresh_token);if(c)return this._returnResult({data:{user:null,session:null},error:c});if(!u)return{data:{user:null,session:null},error:null};a=u}else{const{data:u,error:c}=await this._getUser(e.access_token);if(c)return this._returnResult({data:{user:null,session:null},error:c});a={access_token:e.access_token,refresh_token:e.refresh_token,user:u.user,token_type:"bearer",expires_in:n-r,expires_at:n},await this._saveSession(a),await this._notifyAllSubscribers("SIGNED_IN",a)}return this._returnResult({data:{user:a.user,session:a},error:null})}catch(r){if(he(r))return this._returnResult({data:{session:null,user:null},error:r});throw r}}async refreshSession(e){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._refreshSession(e))}async _refreshSession(e){try{return await this._useSession(async r=>{var n;if(!e){const{data:s,error:u}=r;if(u)throw u;e=(n=s.session)!==null&&n!==void 0?n:void 0}if(!(e!=null&&e.refresh_token))throw new Wt;const{data:i,error:a}=await this._callRefreshToken(e.refresh_token);return a?this._returnResult({data:{user:null,session:null},error:a}):i?this._returnResult({data:{user:i.user,session:i},error:null}):this._returnResult({data:{user:null,session:null},error:null})})}catch(r){if(he(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async _getSessionFromURL(e,r){var n;try{if(!Zt())throw new Of("No browser detected.");if(e.error||e.error_description||e.error_code)throw new Of(e.error_description||"Error in URL with unspecified error_description",{error:e.error||"unspecified_error",code:e.error_code||"unspecified_code"});switch(r){case"implicit":if(this.flowType==="pkce")throw new jk("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new Of("Not a valid implicit grant flow url.");break;default:}if(r==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!e.code)throw new jk("No code detected.");const{data:k,error:T}=await this._exchangeCodeForSession(e.code);if(T)throw T;const E=new URL(window.location.href);return E.searchParams.delete("code"),window.history.replaceState(window.history.state,"",E.toString()),{data:{session:k.session,redirectType:(n=k.redirectType)!==null&&n!==void 0?n:null},error:null}}const{provider_token:i,provider_refresh_token:a,access_token:s,refresh_token:u,expires_in:c,expires_at:f,token_type:p}=e;if(!s||!c||!u||!p)throw new Of("No session defined in URL");const h=Math.round(Date.now()/1e3),g=parseInt(c);let v=h+g;f&&(v=parseInt(f));const y=v-h;y*1e3<=Uo&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${y}s, should have been closer to ${g}s`);const x=v-g;h-x>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",x,v,h):h-x<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",x,v,h);const{data:b,error:S}=await this._getUser(s);if(S)throw S;const O={provider_token:i,provider_refresh_token:a,access_token:s,expires_in:g,expires_at:v,refresh_token:u,token_type:p,user:b.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:O,redirectType:e.type},error:null})}catch(i){if(he(i))return this._returnResult({data:{session:null,redirectType:null},error:i});throw i}}_isImplicitGrantCallback(e){return typeof this.detectSessionInUrl=="function"?this.detectSessionInUrl(new URL(window.location.href),e):!!(e.access_token||e.error_description)}async _isPKCECallback(e){const r=await Ta(this.storage,`${this.storageKey}-code-verifier`);return!!(e.code&&r)}async signOut(e={scope:"global"}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._signOut(e))}async _signOut({scope:e}={scope:"global"}){return await this._useSession(async r=>{var n;const{data:i,error:a}=r;if(a&&!Sf(a))return this._returnResult({error:a});const s=(n=i.session)===null||n===void 0?void 0:n.access_token;if(s){const{error:u}=await this.admin.signOut(s,e);if(u&&!(z8(u)&&(u.status===404||u.status===401||u.status===403)||Sf(u)))return this._returnResult({error:u})}return e!=="others"&&(await this._removeSession(),await Qt(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({error:null})})}onAuthStateChange(e){const r=X8(),n={id:r,callback:e,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(e){return await this._useSession(async r=>{var n,i;try{const{data:{session:a},error:s}=r;if(s)throw s;await((n=this.stateChangeEmitters.get(e))===null||n===void 0?void 0:n.callback("INITIAL_SESSION",a)),this._debug("INITIAL_SESSION","callback id",e,"session",a)}catch(a){await((i=this.stateChangeEmitters.get(e))===null||i===void 0?void 0:i.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",e,"error",a),Sf(a)?console.warn(a):console.error(a)}})}async resetPasswordForEmail(e,r={}){let n=null,i=null;this.flowType==="pkce"&&([n,i]=await Io(this.storage,this.storageKey,!0));try{return await xe(this.fetch,"POST",`${this.url}/recover`,{body:{email:e,code_challenge:n,code_challenge_method:i,gotrue_meta_security:{captcha_token:r.captchaToken}},headers:this.headers,redirectTo:r.redirectTo})}catch(a){if(await Qt(this.storage,`${this.storageKey}-code-verifier`),he(a))return this._returnResult({data:null,error:a});throw a}}async getUserIdentities(){var e;try{const{data:r,error:n}=await this.getUser();if(n)throw n;return this._returnResult({data:{identities:(e=r.user.identities)!==null&&e!==void 0?e:[]},error:null})}catch(r){if(he(r))return this._returnResult({data:null,error:r});throw r}}async linkIdentity(e){return"token"in e?this.linkIdentityIdToken(e):this.linkIdentityOAuth(e)}async linkIdentityOAuth(e){var r;try{const{data:n,error:i}=await this._useSession(async a=>{var s,u,c,f,p;const{data:h,error:g}=a;if(g)throw g;const v=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,e.provider,{redirectTo:(s=e.options)===null||s===void 0?void 0:s.redirectTo,scopes:(u=e.options)===null||u===void 0?void 0:u.scopes,queryParams:(c=e.options)===null||c===void 0?void 0:c.queryParams,skipBrowserRedirect:!0});return await xe(this.fetch,"GET",v,{headers:this.headers,jwt:(p=(f=h.session)===null||f===void 0?void 0:f.access_token)!==null&&p!==void 0?p:void 0})});if(i)throw i;return Zt()&&!(!((r=e.options)===null||r===void 0)&&r.skipBrowserRedirect)&&window.location.assign(n==null?void 0:n.url),this._returnResult({data:{provider:e.provider,url:n==null?void 0:n.url},error:null})}catch(n){if(he(n))return this._returnResult({data:{provider:e.provider,url:null},error:n});throw n}}async linkIdentityIdToken(e){return await this._useSession(async r=>{var n;try{const{error:i,data:{session:a}}=r;if(i)throw i;const{options:s,provider:u,token:c,access_token:f,nonce:p}=e,h=await xe(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,jwt:(n=a==null?void 0:a.access_token)!==null&&n!==void 0?n:void 0,body:{provider:u,id_token:c,access_token:f,nonce:p,link_identity:!0,gotrue_meta_security:{captcha_token:s==null?void 0:s.captchaToken}},xform:Qr}),{data:g,error:v}=h;return v?this._returnResult({data:{user:null,session:null},error:v}):!g||!g.session||!g.user?this._returnResult({data:{user:null,session:null},error:new $o}):(g.session&&(await this._saveSession(g.session),await this._notifyAllSubscribers("USER_UPDATED",g.session)),this._returnResult({data:g,error:v}))}catch(i){if(await Qt(this.storage,`${this.storageKey}-code-verifier`),he(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}})}async unlinkIdentity(e){try{return await this._useSession(async r=>{var n,i;const{data:a,error:s}=r;if(s)throw s;return await xe(this.fetch,"DELETE",`${this.url}/user/identities/${e.identity_id}`,{headers:this.headers,jwt:(i=(n=a.session)===null||n===void 0?void 0:n.access_token)!==null&&i!==void 0?i:void 0})})}catch(r){if(he(r))return this._returnResult({data:null,error:r});throw r}}async _refreshAccessToken(e){const r=`#_refreshAccessToken(${e.substring(0,5)}...)`;this._debug(r,"begin");try{const n=Date.now();return await Z8(async i=>(i>0&&await Q8(200*Math.pow(2,i-1)),this._debug(r,"refreshing attempt",i),await xe(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:e},headers:this.headers,xform:Qr})),(i,a)=>{const s=200*Math.pow(2,i);return a&&Jm(a)&&Date.now()+s-n<Uo})}catch(n){if(this._debug(r,"error",n),he(n))return this._returnResult({data:{session:null,user:null},error:n});throw n}finally{this._debug(r,"end")}}_isValidSession(e){return typeof e=="object"&&e!==null&&"access_token"in e&&"refresh_token"in e&&"expires_at"in e}async _handleProviderSignIn(e,r){const n=await this._getUrlForProvider(`${this.url}/authorize`,e,{redirectTo:r.redirectTo,scopes:r.scopes,queryParams:r.queryParams});return this._debug("#_handleProviderSignIn()","provider",e,"options",r,"url",n),Zt()&&!r.skipBrowserRedirect&&window.location.assign(n),{data:{provider:e,url:n},error:null}}async _recoverAndRefresh(){var e,r;const n="#_recoverAndRefresh()";this._debug(n,"begin");try{const i=await Ta(this.storage,this.storageKey);if(i&&this.userStorage){let s=await Ta(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!s&&(s={user:i.user},await Fo(this.userStorage,this.storageKey+"-user",s)),i.user=(e=s==null?void 0:s.user)!==null&&e!==void 0?e:Qm()}else if(i&&!i.user&&!i.user){const s=await Ta(this.storage,this.storageKey+"-user");s&&(s!=null&&s.user)?(i.user=s.user,await Qt(this.storage,this.storageKey+"-user"),await Fo(this.storage,this.storageKey,i)):i.user=Qm()}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 a=((r=i.expires_at)!==null&&r!==void 0?r:1/0)*1e3-Date.now()<Ym;if(this._debug(n,`session has${a?"":" not"} expired with margin of ${Ym}s`),a){if(this.autoRefreshToken&&i.refresh_token){const{error:s}=await this._callRefreshToken(i.refresh_token);s&&(console.error(s),Jm(s)||(this._debug(n,"refresh failed with a non-retryable error, removing the session",s),await this._removeSession()))}}else if(i.user&&i.user.__isUserNotAvailableProxy===!0)try{const{data:s,error:u}=await this._getUser(i.access_token);!u&&(s!=null&&s.user)?(i.user=s.user,await this._saveSession(i),await this._notifyAllSubscribers("SIGNED_IN",i)):this._debug(n,"could not get user data, skipping SIGNED_IN notification")}catch(s){console.error("Error getting user data:",s),this._debug(n,"error getting user data, skipping SIGNED_IN notification",s)}else await this._notifyAllSubscribers("SIGNED_IN",i)}catch(i){this._debug(n,"error",i),console.error(i);return}finally{this._debug(n,"end")}}async _callRefreshToken(e){var r,n;if(!e)throw new Wt;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const i=`#_callRefreshToken(${e.substring(0,5)}...)`;this._debug(i,"begin");try{this.refreshingDeferred=new vh;const{data:a,error:s}=await this._refreshAccessToken(e);if(s)throw s;if(!a.session)throw new Wt;await this._saveSession(a.session),await this._notifyAllSubscribers("TOKEN_REFRESHED",a.session);const u={data:a.session,error:null};return this.refreshingDeferred.resolve(u),u}catch(a){if(this._debug(i,"error",a),he(a)){const s={data:null,error:a};return Jm(a)||await this._removeSession(),(r=this.refreshingDeferred)===null||r===void 0||r.resolve(s),s}throw(n=this.refreshingDeferred)===null||n===void 0||n.reject(a),a}finally{this.refreshingDeferred=null,this._debug(i,"end")}}async _notifyAllSubscribers(e,r,n=!0){const i=`#_notifyAllSubscribers(${e})`;this._debug(i,"begin",r,`broadcast = ${n}`);try{this.broadcastChannel&&n&&this.broadcastChannel.postMessage({event:e,session:r});const a=[],s=Array.from(this.stateChangeEmitters.values()).map(async u=>{try{await u.callback(e,r)}catch(c){a.push(c)}});if(await Promise.all(s),a.length>0){for(let u=0;u<a.length;u+=1)console.error(a[u]);throw a[0]}}finally{this._debug(i,"end")}}async _saveSession(e){this._debug("#_saveSession()",e),this.suppressGetSessionWarning=!0,await Qt(this.storage,`${this.storageKey}-code-verifier`);const r=Object.assign({},e),n=r.user&&r.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!n&&r.user&&await Fo(this.userStorage,this.storageKey+"-user",{user:r.user});const i=Object.assign({},r);delete i.user;const a=Mk(i);await Fo(this.storage,this.storageKey,a)}else{const i=Mk(r);await Fo(this.storage,this.storageKey,i)}}async _removeSession(){this._debug("#_removeSession()"),this.suppressGetSessionWarning=!1,await Qt(this.storage,this.storageKey),await Qt(this.storage,this.storageKey+"-code-verifier"),await Qt(this.storage,this.storageKey+"-user"),this.userStorage&&await Qt(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const e=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{e&&Zt()&&(window!=null&&window.removeEventListener)&&window.removeEventListener("visibilitychange",e)}catch(r){console.error("removing visibilitychange callback failed",r)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const e=setInterval(()=>this._autoRefreshTokenTick(),Uo);this.autoRefreshTicker=e,e&&typeof e=="object"&&typeof e.unref=="function"?e.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(e);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 e=this.autoRefreshTicker;this.autoRefreshTicker=null,e&&clearInterval(e);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 e=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-e)/Uo);this._debug("#_autoRefreshTokenTick()",`access token expires in ${i} ticks, a tick lasts ${Uo}ms, refresh threshold is ${vb} ticks`),i<=vb&&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(e){if(e instanceof iR)this._debug("auto refresh token tick lock not available");else throw e}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!Zt()||!(window!=null&&window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>{try{await this._onVisibilityChanged(!1)}catch(e){this._debug("#visibilityChangedCallback","error",e)}},window==null||window.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(e){console.error("_handleVisibilityChange",e)}}async _onVisibilityChanged(e){const r=`#_onVisibilityChanged(${e})`;this._debug(r,"visibilityState",document.visibilityState),document.visibilityState==="visible"?(this.autoRefreshToken&&this._startAutoRefresh(),e||(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(e,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[a,s]=await Io(this.storage,this.storageKey),u=new URLSearchParams({code_challenge:`${encodeURIComponent(a)}`,code_challenge_method:`${encodeURIComponent(s)}`});i.push(u.toString())}if(n!=null&&n.queryParams){const a=new URLSearchParams(n.queryParams);i.push(a.toString())}return n!=null&&n.skipBrowserRedirect&&i.push(`skip_http_redirect=${n.skipBrowserRedirect}`),`${e}?${i.join("&")}`}async _unenroll(e){try{return await this._useSession(async r=>{var n;const{data:i,error:a}=r;return a?this._returnResult({data:null,error:a}):await xe(this.fetch,"DELETE",`${this.url}/factors/${e.factorId}`,{headers:this.headers,jwt:(n=i==null?void 0:i.session)===null||n===void 0?void 0:n.access_token})})}catch(r){if(he(r))return this._returnResult({data:null,error:r});throw r}}async _enroll(e){try{return await this._useSession(async r=>{var n,i;const{data:a,error:s}=r;if(s)return this._returnResult({data:null,error:s});const u=Object.assign({friendly_name:e.friendlyName,factor_type:e.factorType},e.factorType==="phone"?{phone:e.phone}:e.factorType==="totp"?{issuer:e.issuer}:{}),{data:c,error:f}=await xe(this.fetch,"POST",`${this.url}/factors`,{body:u,headers:this.headers,jwt:(n=a==null?void 0:a.session)===null||n===void 0?void 0:n.access_token});return f?this._returnResult({data:null,error:f}):(e.factorType==="totp"&&c.type==="totp"&&(!((i=c==null?void 0:c.totp)===null||i===void 0)&&i.qr_code)&&(c.totp.qr_code=`data:image/svg+xml;utf-8,${c.totp.qr_code}`),this._returnResult({data:c,error:null}))})}catch(r){if(he(r))return this._returnResult({data:null,error:r});throw r}}async _verify(e){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async r=>{var n;const{data:i,error:a}=r;if(a)return this._returnResult({data:null,error:a});const s=Object.assign({challenge_id:e.challengeId},"webauthn"in e?{webauthn:Object.assign(Object.assign({},e.webauthn),{credential_response:e.webauthn.type==="create"?Wk(e.webauthn.credential_response):Hk(e.webauthn.credential_response)})}:{code:e.code}),{data:u,error:c}=await xe(this.fetch,"POST",`${this.url}/factors/${e.factorId}/verify`,{body:s,headers:this.headers,jwt:(n=i==null?void 0:i.session)===null||n===void 0?void 0:n.access_token});return c?this._returnResult({data:null,error:c}):(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+u.expires_in},u)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",u),this._returnResult({data:u,error:c}))})}catch(r){if(he(r))return this._returnResult({data:null,error:r});throw r}})}async _challenge(e){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async r=>{var n;const{data:i,error:a}=r;if(a)return this._returnResult({data:null,error:a});const s=await xe(this.fetch,"POST",`${this.url}/factors/${e.factorId}/challenge`,{body:e,headers:this.headers,jwt:(n=i==null?void 0:i.session)===null||n===void 0?void 0:n.access_token});if(s.error)return s;const{data:u}=s;if(u.type!=="webauthn")return{data:u,error:null};switch(u.webauthn.type){case"create":return{data:Object.assign(Object.assign({},u),{webauthn:Object.assign(Object.assign({},u.webauthn),{credential_options:Object.assign(Object.assign({},u.webauthn.credential_options),{publicKey:Uk(u.webauthn.credential_options.publicKey)})})}),error:null};case"request":return{data:Object.assign(Object.assign({},u),{webauthn:Object.assign(Object.assign({},u.webauthn),{credential_options:Object.assign(Object.assign({},u.webauthn.credential_options),{publicKey:Fk(u.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(r){if(he(r))return this._returnResult({data:null,error:r});throw r}})}async _challengeAndVerify(e){const{data:r,error:n}=await this._challenge({factorId:e.factorId});return n?this._returnResult({data:null,error:n}):await this._verify({factorId:e.factorId,challengeId:r.id,code:e.code})}async _listFactors(){var e;const{data:{user:r},error:n}=await this.getUser();if(n)return{data:null,error:n};const i={all:[],phone:[],totp:[],webauthn:[]};for(const a of(e=r==null?void 0:r.factors)!==null&&e!==void 0?e:[])i.all.push(a),a.status==="verified"&&i[a.factor_type].push(a);return{data:i,error:null}}async _getAuthenticatorAssuranceLevel(e){var r,n,i,a;if(e)try{const{payload:v}=Ef(e);let y=null;v.aal&&(y=v.aal);let x=y;const{data:{user:b},error:S}=await this.getUser(e);if(S)return this._returnResult({data:null,error:S});((n=(r=b==null?void 0:b.factors)===null||r===void 0?void 0:r.filter(T=>T.status==="verified"))!==null&&n!==void 0?n:[]).length>0&&(x="aal2");const k=v.amr||[];return{data:{currentLevel:y,nextLevel:x,currentAuthenticationMethods:k},error:null}}catch(v){if(he(v))return this._returnResult({data:null,error:v});throw v}const{data:{session:s},error:u}=await this.getSession();if(u)return this._returnResult({data:null,error:u});if(!s)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:c}=Ef(s.access_token);let f=null;c.aal&&(f=c.aal);let p=f;((a=(i=s.user.factors)===null||i===void 0?void 0:i.filter(v=>v.status==="verified"))!==null&&a!==void 0?a:[]).length>0&&(p="aal2");const g=c.amr||[];return{data:{currentLevel:f,nextLevel:p,currentAuthenticationMethods:g},error:null}}async _getAuthorizationDetails(e){try{return await this._useSession(async r=>{const{data:{session:n},error:i}=r;return i?this._returnResult({data:null,error:i}):n?await xe(this.fetch,"GET",`${this.url}/oauth/authorizations/${e}`,{headers:this.headers,jwt:n.access_token,xform:a=>({data:a,error:null})}):this._returnResult({data:null,error:new Wt})})}catch(r){if(he(r))return this._returnResult({data:null,error:r});throw r}}async _approveAuthorization(e,r){try{return await this._useSession(async n=>{const{data:{session:i},error:a}=n;if(a)return this._returnResult({data:null,error:a});if(!i)return this._returnResult({data:null,error:new Wt});const s=await xe(this.fetch,"POST",`${this.url}/oauth/authorizations/${e}/consent`,{headers:this.headers,jwt:i.access_token,body:{action:"approve"},xform:u=>({data:u,error:null})});return s.data&&s.data.redirect_url&&Zt()&&!(r!=null&&r.skipBrowserRedirect)&&window.location.assign(s.data.redirect_url),s})}catch(n){if(he(n))return this._returnResult({data:null,error:n});throw n}}async _denyAuthorization(e,r){try{return await this._useSession(async n=>{const{data:{session:i},error:a}=n;if(a)return this._returnResult({data:null,error:a});if(!i)return this._returnResult({data:null,error:new Wt});const s=await xe(this.fetch,"POST",`${this.url}/oauth/authorizations/${e}/consent`,{headers:this.headers,jwt:i.access_token,body:{action:"deny"},xform:u=>({data:u,error:null})});return s.data&&s.data.redirect_url&&Zt()&&!(r!=null&&r.skipBrowserRedirect)&&window.location.assign(s.data.redirect_url),s})}catch(n){if(he(n))return this._returnResult({data:null,error:n});throw n}}async _listOAuthGrants(){try{return await this._useSession(async e=>{const{data:{session:r},error:n}=e;return n?this._returnResult({data:null,error:n}):r?await xe(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 Wt})})}catch(e){if(he(e))return this._returnResult({data:null,error:e});throw e}}async _revokeOAuthGrant(e){try{return await this._useSession(async r=>{const{data:{session:n},error:i}=r;return i?this._returnResult({data:null,error:i}):n?(await xe(this.fetch,"DELETE",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:n.access_token,query:{client_id:e.clientId},noResolveJson:!0}),{data:{},error:null}):this._returnResult({data:null,error:new Wt})})}catch(r){if(he(r))return this._returnResult({data:null,error:r});throw r}}async fetchJwk(e,r={keys:[]}){let n=r.keys.find(u=>u.kid===e);if(n)return n;const i=Date.now();if(n=this.jwks.keys.find(u=>u.kid===e),n&&this.jwks_cached_at+D8>i)return n;const{data:a,error:s}=await xe(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(s)throw s;return!a.keys||a.keys.length===0||(this.jwks=a,this.jwks_cached_at=i,n=a.keys.find(u=>u.kid===e),!n)?null:n}async getClaims(e,r={}){try{let n=e;if(!n){const{data:v,error:y}=await this.getSession();if(y||!v.session)return this._returnResult({data:null,error:y});n=v.session.access_token}const{header:i,payload:a,signature:s,raw:{header:u,payload:c}}=Ef(n);r!=null&&r.allowExpired||oz(a.exp);const f=!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(!f){const{error:v}=await this.getUser(n);if(v)throw v;return{data:{claims:a,header:i,signature:s},error:null}}const p=sz(i.alg),h=await crypto.subtle.importKey("jwk",f,p,!0,["verify"]);if(!await crypto.subtle.verify(p,h,s,K8(`${u}.${c}`)))throw new wb("Invalid JWT signature");return{data:{claims:a,header:i,signature:s},error:null}}catch(n){if(he(n))return this._returnResult({data:null,error:n});throw n}}async signInWithPasskey(e){var r,n,i;mn(this.experimental);try{if(!ad())return this._returnResult({data:null,error:new xn("Browser does not support WebAuthn",null)});const{data:a,error:s}=await this._startPasskeyAuthentication({options:{captchaToken:(r=e==null?void 0:e.options)===null||r===void 0?void 0:r.captchaToken}});if(s||!a)return this._returnResult({data:null,error:s});const u=Fk(a.options),c=(i=(n=e==null?void 0:e.options)===null||n===void 0?void 0:n.signal)!==null&&i!==void 0?i:xb.createNewAbortSignal(),{data:f,error:p}=await lR({publicKey:u,signal:c});if(p||!f)return this._returnResult({data:null,error:p??new xn("WebAuthn ceremony failed",null)});const h=Hk(f);return this._verifyPasskeyAuthentication({challengeId:a.challenge_id,credential:h})}catch(a){if(he(a))return this._returnResult({data:null,error:a});throw a}}async registerPasskey(e){var r,n;mn(this.experimental);try{if(!ad())return this._returnResult({data:null,error:new xn("Browser does not support WebAuthn",null)});const{data:i,error:a}=await this._startPasskeyRegistration();if(a||!i)return this._returnResult({data:null,error:a});const s=Uk(i.options),u=(n=(r=e==null?void 0:e.options)===null||r===void 0?void 0:r.signal)!==null&&n!==void 0?n:xb.createNewAbortSignal(),{data:c,error:f}=await sR({publicKey:s,signal:u});if(f||!c)return this._returnResult({data:null,error:f??new xn("WebAuthn ceremony failed",null)});const p=Wk(c);return this._verifyPasskeyRegistration({challengeId:i.challenge_id,credential:p})}catch(i){if(he(i))return this._returnResult({data:null,error:i});throw i}}async _startPasskeyRegistration(){mn(this.experimental);try{return await this._useSession(async e=>{const{data:{session:r},error:n}=e;if(n)return this._returnResult({data:null,error:n});if(!r)return this._returnResult({data:null,error:new Wt});const{data:i,error:a}=await xe(this.fetch,"POST",`${this.url}/passkeys/registration/options`,{headers:this.headers,jwt:r.access_token,body:{}});return a?this._returnResult({data:null,error:a}):this._returnResult({data:i,error:null})})}catch(e){if(he(e))return this._returnResult({data:null,error:e});throw e}}async _verifyPasskeyRegistration(e){mn(this.experimental);try{return await this._useSession(async r=>{const{data:{session:n},error:i}=r;if(i)return this._returnResult({data:null,error:i});if(!n)return this._returnResult({data:null,error:new Wt});const{data:a,error:s}=await xe(this.fetch,"POST",`${this.url}/passkeys/registration/verify`,{headers:this.headers,jwt:n.access_token,body:{challenge_id:e.challengeId,credential:e.credential}});return s?this._returnResult({data:null,error:s}):this._returnResult({data:a,error:null})})}catch(r){if(he(r))return this._returnResult({data:null,error:r});throw r}}async _startPasskeyAuthentication(e){var r;mn(this.experimental);try{const{data:n,error:i}=await xe(this.fetch,"POST",`${this.url}/passkeys/authentication/options`,{headers:this.headers,body:{gotrue_meta_security:{captcha_token:(r=e==null?void 0:e.options)===null||r===void 0?void 0:r.captchaToken}}});return i?this._returnResult({data:null,error:i}):this._returnResult({data:n,error:null})}catch(n){if(he(n))return this._returnResult({data:null,error:n});throw n}}async _verifyPasskeyAuthentication(e){mn(this.experimental);try{const{data:r,error:n}=await xe(this.fetch,"POST",`${this.url}/passkeys/authentication/verify`,{headers:this.headers,body:{challenge_id:e.challengeId,credential:e.credential},xform:Qr});return n?this._returnResult({data:null,error:n}):(r.session&&(await this._saveSession(r.session),await this._notifyAllSubscribers("SIGNED_IN",r.session)),this._returnResult({data:r,error:null}))}catch(r){if(he(r))return this._returnResult({data:null,error:r});throw r}}async _listPasskeys(){mn(this.experimental);try{return await this._useSession(async e=>{const{data:{session:r},error:n}=e;if(n)return this._returnResult({data:null,error:n});if(!r)return this._returnResult({data:null,error:new Wt});const{data:i,error:a}=await xe(this.fetch,"GET",`${this.url}/passkeys`,{headers:this.headers,jwt:r.access_token,xform:s=>({data:s,error:null})});return a?this._returnResult({data:null,error:a}):this._returnResult({data:i,error:null})})}catch(e){if(he(e))return this._returnResult({data:null,error:e});throw e}}async _updatePasskey(e){mn(this.experimental);try{return await this._useSession(async r=>{const{data:{session:n},error:i}=r;if(i)return this._returnResult({data:null,error:i});if(!n)return this._returnResult({data:null,error:new Wt});const{data:a,error:s}=await xe(this.fetch,"PATCH",`${this.url}/passkeys/${e.passkeyId}`,{headers:this.headers,jwt:n.access_token,body:{friendly_name:e.friendlyName}});return s?this._returnResult({data:null,error:s}):this._returnResult({data:a,error:null})})}catch(r){if(he(r))return this._returnResult({data:null,error:r});throw r}}async _deletePasskey(e){mn(this.experimental);try{return await this._useSession(async r=>{const{data:{session:n},error:i}=r;if(i)return this._returnResult({data:null,error:i});if(!n)return this._returnResult({data:null,error:new Wt});const{error:a}=await xe(this.fetch,"DELETE",`${this.url}/passkeys/${e.passkeyId}`,{headers:this.headers,jwt:n.access_token,noResolveJson:!0});return a?this._returnResult({data:null,error:a}):this._returnResult({data:null,error:null})})}catch(r){if(he(r))return this._returnResult({data:null,error:r});throw r}}}cu.nextInstanceID={};const jz=cu,Rz="2.106.2";let Hl="";typeof Deno<"u"?Hl="deno":typeof document<"u"?Hl="web":typeof navigator<"u"&&navigator.product==="ReactNative"?Hl="react-native":Hl="node";const Nz={"X-Client-Info":`supabase-js-${Hl}/${Rz}`},$z={headers:Nz},Iz={schema:"public"},Mz={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},Lz={},Dz={enabled:!1,respectSamplingDecision:!0};function Bz(t,e,r,n){function i(a){return a instanceof r?a:new r(function(s){s(a)})}return new(r||(r=Promise))(function(a,s){function u(p){try{f(n.next(p))}catch(h){s(h)}}function c(p){try{f(n.throw(p))}catch(h){s(h)}}function f(p){p.done?a(p.value):i(p.value).then(u,c)}f((n=n.apply(t,[])).next())})}let eg=null;const zz="@opentelemetry/api";function qz(){return eg===null&&(eg=import(zz).catch(()=>null)),eg}function Uz(){return Bz(this,void 0,void 0,function*(){try{const t=yield qz();if(!t||!t.propagation||!t.context)return null;const e={};t.propagation.inject(t.context.active(),e);const r=e.traceparent;return r?{traceparent:r,tracestate:e.tracestate,baggage:e.baggage}:null}catch{return null}})}function Fz(t){if(!t||typeof t!="string")return null;const e=t.split("-");if(e.length!==4)return null;const[r,n,i,a]=e;if(r.length!==2||n.length!==32||i.length!==16||a.length!==2)return null;const s=/^[0-9a-f]+$/i;return!s.test(r)||!s.test(n)||!s.test(i)||!s.test(a)||n==="00000000000000000000000000000000"||i==="0000000000000000"?null:{version:r,traceId:n,parentId:i,traceFlags:a,isSampled:(parseInt(a,16)&1)===1}}function Wz(t,e){if(!t||!e||e.length===0)return!1;let r;if(t instanceof URL)r=t;else try{r=new URL(t)}catch{return!1}for(const n of e)try{if(typeof n=="string"){if(Hz(r.hostname,n))return!0}else if(n instanceof RegExp){if(n.test(r.hostname))return!0}else if(typeof n=="function"&&n(r))return!0}catch{continue}return!1}function Hz(t,e){if(e===t)return!0;if(e.startsWith("*.")){const r=e.slice(2);if(t.endsWith(r)&&(t===r||t.endsWith("."+r)))return!0}return!1}function Vz(t){const e=[];try{const r=new URL(t);e.push(r.hostname)}catch{}return e.push("*.supabase.co","*.supabase.in"),e.push("localhost","127.0.0.1","[::1]"),e}function fu(t){"@babel/helpers - typeof";return fu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},fu(t)}function Kz(t,e){if(fu(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(fu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Gz(t){var e=Kz(t,"string");return fu(e)=="symbol"?e:e+""}function Xz(t,e,r){return(e=Gz(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Kk(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function bt(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Kk(Object(r),!0).forEach(function(n){Xz(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Kk(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}const Yz=t=>t?(...e)=>t(...e):(...e)=>fetch(...e),Jz=()=>Headers,Qz=(t,e,r,n,i)=>{const a=Yz(n),s=Jz(),u=(i==null?void 0:i.enabled)===!0,c=(i==null?void 0:i.respectSamplingDecision)!==!1,f=u?Vz(e):null;return async(p,h)=>{var g;const v=(g=await r())!==null&&g!==void 0?g:t;let y=new s(h==null?void 0:h.headers);if(y.has("apikey")||y.set("apikey",t),y.has("Authorization")||y.set("Authorization",`Bearer ${v}`),f){const x=await Zz(p,f,c);x&&(x.traceparent&&!y.has("traceparent")&&y.set("traceparent",x.traceparent),x.tracestate&&!y.has("tracestate")&&y.set("tracestate",x.tracestate),x.baggage&&!y.has("baggage")&&y.set("baggage",x.baggage))}return a(p,bt(bt({},h),{},{headers:y}))}};async function Zz(t,e,r){if(!Wz(typeof t=="string"||t instanceof URL?t:t.url,e))return null;const n=await Uz();if(!n||!n.traceparent)return null;if(r){const i=Fz(n.traceparent);if(i&&!i.isSampled)return null}return n}function Gk(t){return typeof t=="boolean"?{enabled:t}:t}function e6(t){return t.endsWith("/")?t:t+"/"}function t6(t,e){var r,n,i,a,s,u;const{db:c,auth:f,realtime:p,global:h}=t,{db:g,auth:v,realtime:y,global:x}=e,b=Gk(t.tracePropagation),S=Gk(e.tracePropagation),O={db:bt(bt({},g),c),auth:bt(bt({},v),f),realtime:bt(bt({},y),p),storage:{},global:bt(bt(bt({},x),h),{},{headers:bt(bt({},(r=x==null?void 0:x.headers)!==null&&r!==void 0?r:{}),(n=h==null?void 0:h.headers)!==null&&n!==void 0?n:{})}),tracePropagation:{enabled:(i=(a=b==null?void 0:b.enabled)!==null&&a!==void 0?a:S==null?void 0:S.enabled)!==null&&i!==void 0?i:!1,respectSamplingDecision:(s=(u=b==null?void 0:b.respectSamplingDecision)!==null&&u!==void 0?u:S==null?void 0:S.respectSamplingDecision)!==null&&s!==void 0?s:!0},accessToken:async()=>""};return t.accessToken?O.accessToken=t.accessToken:delete O.accessToken,O}function r6(t){const e=t==null?void 0:t.trim();if(!e)throw new Error("supabaseUrl is required.");if(!e.match(/^https?:\/\//i))throw new Error("Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.");try{return new URL(e6(e))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}var n6=class extends jz{constructor(t){super(t)}},i6=class{constructor(t,e,r){var n,i;this.supabaseUrl=t,this.supabaseKey=e;const a=r6(t);if(!e)throw new Error("supabaseKey is required.");this.realtimeUrl=new URL("realtime/v1",a),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",a),this.storageUrl=new URL("storage/v1",a),this.functionsUrl=new URL("functions/v1",a);const s=`sb-${a.hostname.split(".")[0]}-auth-token`,u={db:Iz,realtime:Lz,auth:bt(bt({},Mz),{},{storageKey:s}),global:$z,tracePropagation:Dz},c=t6(r??{},u);if(this.settings=c,this.storageKey=(n=c.auth.storageKey)!==null&&n!==void 0?n:"",this.headers=(i=c.global.headers)!==null&&i!==void 0?i:{},c.accessToken)this.accessToken=c.accessToken,this.auth=new Proxy({},{get:(p,h)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(h)} is not possible`)}});else{var f;this.auth=this._initSupabaseAuthClient((f=c.auth)!==null&&f!==void 0?f:{},this.headers,c.global.fetch)}this.fetch=Qz(e,t,this._getAccessToken.bind(this),c.global.fetch,c.tracePropagation),this.realtime=this._initRealtimeClient(bt({headers:this.headers,accessToken:this._getAccessToken.bind(this),fetch:this.fetch},c.realtime)),this.accessToken&&Promise.resolve(this.accessToken()).then(p=>this.realtime.setAuth(p)).catch(p=>console.warn("Failed to set initial Realtime auth token:",p)),this.rest=new wB(new URL("rest/v1",a).href,{headers:this.headers,schema:c.db.schema,fetch:this.fetch,timeout:c.db.timeout,urlLengthLimit:c.db.urlLengthLimit}),this.storage=new N8(this.storageUrl.href,this.headers,this.fetch,r==null?void 0:r.storage),c.accessToken||this._listenForAuthEvents()}get functions(){return new cB(this.functionsUrl.href,{headers:this.headers,customFetch:this.fetch})}from(t){return this.rest.from(t)}schema(t){return this.rest.schema(t)}rpc(t,e={},r={head:!1,get:!1,count:void 0}){return this.rest.rpc(t,e,r)}channel(t,e={config:{}}){return this.realtime.channel(t,e)}getChannels(){return this.realtime.getChannels()}removeChannel(t){return this.realtime.removeChannel(t)}removeAllChannels(){return this.realtime.removeAllChannels()}async _getAccessToken(){var t=this,e,r;if(t.accessToken)return await t.accessToken();const{data:n}=await t.auth.getSession();return(e=(r=n.session)===null||r===void 0?void 0:r.access_token)!==null&&e!==void 0?e:t.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:t,persistSession:e,detectSessionInUrl:r,storage:n,userStorage:i,storageKey:a,flowType:s,lock:u,debug:c,throwOnError:f,experimental:p,lockAcquireTimeout:h,skipAutoInitialize:g},v,y){const x={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new n6({url:this.authUrl.href,headers:bt(bt({},x),v),storageKey:a,autoRefreshToken:t,persistSession:e,detectSessionInUrl:r,storage:n,userStorage:i,flowType:s,lock:u,debug:c,throwOnError:f,experimental:p,fetch:y,lockAcquireTimeout:h,skipAutoInitialize:g,hasCustomAuthorizationHeader:Object.keys(this.headers).some(b=>b.toLowerCase()==="authorization")})}_initRealtimeClient(t){return new r8(this.realtimeUrl.href,bt(bt({},t),{},{params:bt(bt({},{apikey:this.supabaseKey}),t==null?void 0:t.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((t,e)=>{this._handleTokenChanged(t,"CLIENT",e==null?void 0:e.access_token)})}_handleTokenChanged(t,e,r){(t==="TOKEN_REFRESHED"||t==="SIGNED_IN")&&this.changedAccessToken!==r?(this.changedAccessToken=r,this.realtime.setAuth(r)):t==="SIGNED_OUT"&&(this.realtime.setAuth(),e=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}};const a6=(t,e,r)=>new i6(t,e,r);function o6(){if(typeof window<"u")return!1;const t=globalThis.process;if(!t)return!1;const e=t.version;if(e==null)return!1;const r=e.match(/^v(\d+)\./);return r?parseInt(r[1],10)<=18:!1}o6()&&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 s6="/api";let Wa=null;function l6(t){Wa=t}function u6(){return(Wa==null?void 0:Wa())??null}async function Rl(t,e){const r=Wa==null?void 0:Wa(),n={"Content-Type":"application/json",...e==null?void 0:e.headers};r&&(n.Authorization=`Bearer ${r}`);const i=await fetch(`${s6}${t}`,{...e,headers:n});if(!i.ok){const a=await i.json().catch(()=>({error:i.statusText}));throw new Error(a.error??`Request failed: ${i.status}`)}return i.json()}const kt={get:t=>Rl(t),post:(t,e)=>Rl(t,{method:"POST",body:e?JSON.stringify(e):void 0}),patch:(t,e)=>Rl(t,{method:"PATCH",body:JSON.stringify(e)}),put:(t,e)=>Rl(t,{method:"PUT",body:JSON.stringify(e)}),delete:t=>Rl(t,{method:"DELETE"})},uR=N.createContext({session:null,supabase:null,loading:!0,signIn:async()=>({error:"Not initialized"}),signOut:async()=>{}});function sx(){return N.useContext(uR)}function c6({children:t}){const[e,r]=N.useState(null),[n,i]=N.useState(null),[a,s]=N.useState(!0),u=N.useRef(null);N.useEffect(()=>{l6(()=>{var p;return((p=u.current)==null?void 0:p.access_token)??null})},[]),N.useEffect(()=>{kt.get("/config").then(({config:p})=>{if(p.supabase.projectUrl&&p.supabase.anonKey){const h=a6(p.supabase.projectUrl,p.supabase.anonKey);r(h),h.auth.getSession().then(({data:v})=>{u.current=v.session,i(v.session),s(!1)});const{data:{subscription:g}}=h.auth.onAuthStateChange((v,y)=>{u.current=y,i(y)});return()=>g.unsubscribe()}s(!1)}).catch(()=>{s(!1)})},[]);async function c(p,h){if(!e)return{error:"Supabase not configured"};const{error:g}=await e.auth.signInWithPassword({email:p,password:h});return{error:(g==null?void 0:g.message)??null}}async function f(){e&&(await e.auth.signOut(),u.current=null,i(null))}return P.jsx(uR.Provider,{value:{session:n,supabase:e,loading:a,signIn:c,signOut:f},children:t})}const f6=[{to:"/squads",icon:zj,label:"Squads"},{to:"/skills",icon:ed,label:"Skills"},{to:"/schedules",icon:lb,label:"Schedules"},{to:"/wiki",icon:$j,label:"Wiki"},{to:"/usage",icon:s5,label:"Usage"}],d6=[{to:"/",icon:z5,label:"Chat"},{to:"/feed",icon:Lj,label:"Inbox"},{to:"/settings",icon:tB,label:"Settings"}];function Xk({to:t,icon:e,label:r,collapsed:n}){return P.jsxs(tx,{to:t,end:t==="/",title:n?r:void 0,className:({isActive:i})=>Fl("w-full flex items-center gap-2.5 px-2 py-2 rounded-xl text-[11px] font-mono transition-colors",n?"justify-center":"",i?"text-[#E43A9C]":"text-zinc-600 hover:text-zinc-300 hover:bg-white/[0.04]"),style:({isActive:i})=>i?{background:"rgba(228,58,156,0.1)"}:void 0,children:[P.jsx(e,{className:"w-3.5 h-3.5 flex-shrink-0"}),!n&&r]})}function h6(){const[t,e]=N.useState(!1),{supabase:r}=sx();return P.jsxs("div",{className:"flex h-screen overflow-hidden bg-background relative",children:[P.jsxs("div",{className:Fl("flex-shrink-0 flex flex-col border-r border-white/[0.06] bg-[#181818] transition-all duration-200",t?"w-[52px]":"w-[210px]"),children:[P.jsx("div",{className:Fl("h-[52px] flex items-center border-b border-white/[0.06] flex-shrink-0",t?"justify-center px-3":"justify-between pl-4 pr-3"),children:t?P.jsx(Jo,{height:26}):P.jsxs("div",{className:"flex items-center gap-2.5",children:[P.jsx(Jo,{height:26}),P.jsx("span",{className:"text-2xl text-white tracking-wider leading-none",style:{fontFamily:"'Bebas Neue', sans-serif"},children:"IO"})]})}),P.jsx("nav",{className:"flex-1 py-2 px-1.5 space-y-0.5 overflow-y-auto",children:f6.map(n=>P.jsx(Xk,{collapsed:t,...n},n.to))}),P.jsxs("div",{className:"flex-shrink-0 border-t border-white/[0.06]",children:[P.jsx("div",{className:"py-1.5 px-1.5 space-y-0.5",children:d6.map(n=>P.jsx(Xk,{collapsed:t,...n},n.to))}),P.jsxs("div",{className:"border-t border-white/[0.05] py-1.5 px-1.5 space-y-0.5",children:[P.jsxs("a",{href:"https://github.com/michaeljolley/io",target:"_blank",rel:"noreferrer",title:"GitHub",className:Fl("flex items-center gap-2.5 px-2 py-2 rounded-xl text-[11px] font-mono text-zinc-600 hover:text-zinc-300 hover:bg-white/[0.04] transition-colors",t&&"justify-center"),children:[P.jsx(T5,{className:"w-3.5 h-3.5 flex-shrink-0"}),!t&&P.jsx("span",{className:"text-zinc-700",children:"v3.0.0"})]}),P.jsx("button",{type:"button",onClick:()=>e(!t),title:t?"Expand sidebar":"Collapse sidebar",className:Fl("w-full flex items-center gap-2.5 px-2 py-2 rounded-xl text-[11px] font-mono text-zinc-600 hover:text-zinc-300 hover:bg-white/[0.04] transition-colors",t&&"justify-center"),children:t?P.jsx(d5,{className:"w-3.5 h-3.5 flex-shrink-0"}):P.jsx(Ij,{className:"w-3.5 h-3.5 flex-shrink-0"})})]})]})]}),P.jsxs("div",{className:"flex flex-col flex-1 min-w-0 overflow-hidden",children:[P.jsxs("div",{className:"h-[52px] flex-shrink-0 flex items-center justify-between px-4 border-b border-white/[0.06] bg-[#181818]",children:[P.jsxs("div",{className:"flex items-center gap-2",children:[P.jsx(V4,{status:"connected"}),P.jsx("span",{className:"text-[11px] font-mono text-green-400",children:"connected"})]}),P.jsxs("div",{className:"flex items-center gap-1.5",children:[P.jsx(tx,{to:"/feed",className:"relative p-2 rounded-xl hover:bg-white/[0.05] text-zinc-600 hover:text-zinc-300 transition-colors",children:P.jsx(Z4,{className:"w-3.5 h-3.5"})}),r&&P.jsx("button",{type:"button",onClick:()=>r.auth.signOut(),className:"p-2 rounded-xl hover:bg-white/[0.05] text-zinc-600 hover:text-zinc-300 transition-colors",title:"Sign out",children:P.jsx($5,{className:"w-3.5 h-3.5"})})]})]}),P.jsxs("main",{className:"flex-1 overflow-hidden flex flex-col min-h-0 relative",children:[P.jsxs("div",{className:"absolute inset-0 overflow-hidden pointer-events-none",style:{zIndex:0},children:[P.jsx("div",{className:"orb orb-pink"}),P.jsx("div",{className:"orb orb-gray"})]}),P.jsx(WL,{})]})]})]})}function p6(t={}){const[e,r]=N.useState(!1),[n,i]=N.useState(null),a=N.useRef(null),s=N.useRef(t);s.current=t,N.useEffect(()=>{let f=`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/ws`;const p=u6();p&&(f+=`?token=${encodeURIComponent(p)}`);let h,g;function v(){h=new WebSocket(f),h.onopen=()=>{r(!0)},h.onmessage=y=>{var x,b,S,O,k,T,E,A;try{const j=JSON.parse(y.data);switch(j.type){case"connected":i(j.connectionId??null);break;case"delta":(b=(x=s.current).onDelta)==null||b.call(x,j.content??"");break;case"message":(O=(S=s.current).onMessage)==null||O.call(S,j.content??"");break;case"event":(T=(k=s.current).onEvent)==null||T.call(k,j);break;case"error":(A=(E=s.current).onError)==null||A.call(E,j.content??"Unknown error");break}}catch{}},h.onclose=()=>{r(!1),i(null),g=setTimeout(v,3e3)},h.onerror=()=>{h.close()},a.current=h}return v(),()=>{clearTimeout(g),h==null||h.close()}},[]);const u=N.useCallback((c,f="web")=>{var p;((p=a.current)==null?void 0:p.readyState)===WebSocket.OPEN&&a.current.send(JSON.stringify({type:"message",content:c,source:f}))},[]);return{connected:e,connectionId:n,sendMessage:u}}function lx(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var to=lx();function cR(t){to=t}var Ma={exec:()=>null};function Lo(t){let e=[];return r=>{let n=Math.max(0,Math.min(3,r-1)),i=e[n];return i||(i=t(n),e[n]=i),i}}function Ue(t,e=""){let r=typeof t=="string"?t:t.source,n={replace:(i,a)=>{let s=typeof a=="string"?a:a.source;return s=s.replace(lr.caret,"$1"),r=r.replace(i,s),n},getRegex:()=>new RegExp(r,e)};return n}var m6=((t="")=>{try{return!!new RegExp("(?<=1)(?<!1)"+t)}catch{return!1}})(),lr={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:Lo(t=>new RegExp(`^ {0,${t}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:Lo(t=>new RegExp(`^ {0,${t}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)),fencesBeginRegex:Lo(t=>new RegExp(`^ {0,${t}}(?:\`\`\`|~~~)`)),headingBeginRegex:Lo(t=>new RegExp(`^ {0,${t}}#`)),htmlBeginRegex:Lo(t=>new RegExp(`^ {0,${t}}<(?:[a-z].*>|!--)`,"i")),blockquoteBeginRegex:Lo(t=>new RegExp(`^ {0,${t}}>`))},g6=/^(?:[ \t]*(?:\n|$))+/,v6=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,y6=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Yu=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,b6=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,ux=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,fR=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,dR=Ue(fR).replace(/bull/g,ux).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),w6=Ue(fR).replace(/bull/g,ux).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),cx=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,x6=/^[^\n]+/,fx=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,_6=Ue(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",fx).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),S6=Ue(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,ux).getRegex(),yh="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",dx=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,k6=Ue("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",dx).replace("tag",yh).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),hR=Ue(cx).replace("hr",Yu).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",yh).getRegex(),O6=Ue(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",hR).getRegex(),hx={blockquote:O6,code:v6,def:_6,fences:y6,heading:b6,hr:Yu,html:k6,lheading:dR,list:S6,newline:g6,paragraph:hR,table:Ma,text:x6},Yk=Ue("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Yu).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",yh).getRegex(),E6={...hx,lheading:w6,table:Yk,paragraph:Ue(cx).replace("hr",Yu).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Yk).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",yh).getRegex()},A6={...hx,html:Ue(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",dx).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Ma,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Ue(cx).replace("hr",Yu).replace("heading",` *#{1,6} *[^
|
|
305
|
-
]`).replace("lheading",dR).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},P6=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,T6=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,pR=/^( {2,}|\\)\n(?!\s*$)/,C6=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Is=/[\p{P}\p{S}]/u,bh=/[\s\p{P}\p{S}]/u,px=/[^\s\p{P}\p{S}]/u,j6=Ue(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,bh).getRegex(),mR=/(?!~)[\p{P}\p{S}]/u,R6=/(?!~)[\s\p{P}\p{S}]/u,N6=/(?:[^\s\p{P}\p{S}]|~)/u,$6=Ue(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",m6?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),gR=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,I6=Ue(gR,"u").replace(/punct/g,Is).getRegex(),M6=Ue(gR,"u").replace(/punct/g,mR).getRegex(),vR="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",L6=Ue(vR,"gu").replace(/notPunctSpace/g,px).replace(/punctSpace/g,bh).replace(/punct/g,Is).getRegex(),D6=Ue(vR,"gu").replace(/notPunctSpace/g,N6).replace(/punctSpace/g,R6).replace(/punct/g,mR).getRegex(),B6=Ue("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,px).replace(/punctSpace/g,bh).replace(/punct/g,Is).getRegex(),z6=Ue(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,Is).getRegex(),q6="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",U6=Ue(q6,"gu").replace(/notPunctSpace/g,px).replace(/punctSpace/g,bh).replace(/punct/g,Is).getRegex(),F6=Ue(/\\(punct)/,"gu").replace(/punct/g,Is).getRegex(),W6=Ue(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),H6=Ue(dx).replace("(?:-->|$)","-->").getRegex(),V6=Ue("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",H6).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),sd=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,K6=Ue(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",sd).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),yR=Ue(/^!?\[(label)\]\[(ref)\]/).replace("label",sd).replace("ref",fx).getRegex(),bR=Ue(/^!?\[(ref)\](?:\[\])?/).replace("ref",fx).getRegex(),G6=Ue("reflink|nolink(?!\\()","g").replace("reflink",yR).replace("nolink",bR).getRegex(),Jk=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,mx={_backpedal:Ma,anyPunctuation:F6,autolink:W6,blockSkip:$6,br:pR,code:T6,del:Ma,delLDelim:Ma,delRDelim:Ma,emStrongLDelim:I6,emStrongRDelimAst:L6,emStrongRDelimUnd:B6,escape:P6,link:K6,nolink:bR,punctuation:j6,reflink:yR,reflinkSearch:G6,tag:V6,text:C6,url:Ma},X6={...mx,link:Ue(/^!?\[(label)\]\((.*?)\)/).replace("label",sd).getRegex(),reflink:Ue(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",sd).getRegex()},_b={...mx,emStrongRDelimAst:D6,emStrongLDelim:M6,delLDelim:z6,delRDelim:U6,url:Ue(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Jk).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:Ue(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Jk).getRegex()},Y6={..._b,br:Ue(pR).replace("{2,}","*").getRegex(),text:Ue(_b.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Af={normal:hx,gfm:E6,pedantic:A6},Nl={normal:mx,gfm:_b,breaks:Y6,pedantic:X6},J6={"&":"&","<":"<",">":">",'"':""","'":"'"},Qk=t=>J6[t];function $n(t,e){if(e){if(lr.escapeTest.test(t))return t.replace(lr.escapeReplace,Qk)}else if(lr.escapeTestNoEncode.test(t))return t.replace(lr.escapeReplaceNoEncode,Qk);return t}function Zk(t){try{t=encodeURI(t).replace(lr.percentDecode,"%")}catch{return null}return t}function eO(t,e){var a;let r=t.replace(lr.findPipe,(s,u,c)=>{let f=!1,p=u;for(;--p>=0&&c[p]==="\\";)f=!f;return f?"|":" |"}),n=r.split(lr.splitPipe),i=0;if(n[0].trim()||n.shift(),n.length>0&&!((a=n.at(-1))!=null&&a.trim())&&n.pop(),e)if(n.length>e)n.splice(e);else for(;n.length<e;)n.push("");for(;i<n.length;i++)n[i]=n[i].trim().replace(lr.slashPipe,"|");return n}function Xi(t,e,r){let n=t.length;if(n===0)return"";let i=0;for(;i<n&&t.charAt(n-i-1)===e;)i++;return t.slice(0,n-i)}function tO(t){let e=t.split(`
|
|
306
|
-
`),r=e.length-1;for(;r>=0&&lr.blankLine.test(e[r]);)r--;return e.length-r<=2?t:e.slice(0,r+1).join(`
|
|
307
|
-
`)}function Q6(t,e){if(t.indexOf(e[1])===-1)return-1;let r=0;for(let n=0;n<t.length;n++)if(t[n]==="\\")n++;else if(t[n]===e[0])r++;else if(t[n]===e[1]&&(r--,r<0))return n;return r>0?-2:-1}function Z6(t,e=0){let r=e,n="";for(let i of t)if(i===" "){let a=4-r%4;n+=" ".repeat(a),r+=a}else n+=i,r++;return n}function rO(t,e,r,n,i){let a=e.href,s=e.title||null,u=t[1].replace(i.other.outputLinkReplace,"$1");n.state.inLink=!0;let c={type:t[0].charAt(0)==="!"?"image":"link",raw:r,href:a,title:s,text:u,tokens:n.inlineTokens(u)};return n.state.inLink=!1,c}function eq(t,e,r){let n=t.match(r.other.indentCodeCompensation);if(n===null)return e;let i=n[1];return e.split(`
|
|
308
|
-
`).map(a=>{let s=a.match(r.other.beginningSpace);if(s===null)return a;let[u]=s;return u.length>=i.length?a.slice(i.length):a}).join(`
|
|
309
|
-
`)}var ld=class{constructor(t){Qe(this,"options");Qe(this,"rules");Qe(this,"lexer");this.options=t||to}space(t){let e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){let e=this.rules.block.code.exec(t);if(e){let r=this.options.pedantic?e[0]:tO(e[0]),n=r.replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:r,codeBlockStyle:"indented",text:n}}}fences(t){let e=this.rules.block.fences.exec(t);if(e){let r=e[0],n=eq(r,e[3]||"",this.rules);return{type:"code",raw:r,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:n}}}heading(t){let e=this.rules.block.heading.exec(t);if(e){let r=e[2].trim();if(this.rules.other.endingHash.test(r)){let n=Xi(r,"#");(this.options.pedantic||!n||this.rules.other.endingSpaceChar.test(n))&&(r=n.trim())}return{type:"heading",raw:Xi(e[0],`
|
|
310
|
-
`),depth:e[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(t){let e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:Xi(e[0],`
|
|
311
|
-
`)}}blockquote(t){let e=this.rules.block.blockquote.exec(t);if(e){let r=Xi(e[0],`
|
|
312
|
-
`).split(`
|
|
313
|
-
`),n="",i="",a=[];for(;r.length>0;){let s=!1,u=[],c;for(c=0;c<r.length;c++)if(this.rules.other.blockquoteStart.test(r[c]))u.push(r[c]),s=!0;else if(!s)u.push(r[c]);else break;r=r.slice(c);let f=u.join(`
|
|
314
|
-
`),p=f.replace(this.rules.other.blockquoteSetextReplace,`
|
|
315
|
-
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");n=n?`${n}
|
|
316
|
-
${f}`:f,i=i?`${i}
|
|
317
|
-
${p}`:p;let h=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(p,a,!0),this.lexer.state.top=h,r.length===0)break;let g=a.at(-1);if((g==null?void 0:g.type)==="code")break;if((g==null?void 0:g.type)==="blockquote"){let v=g,y=v.raw+`
|
|
318
|
-
`+r.join(`
|
|
319
|
-
`),x=this.blockquote(y);a[a.length-1]=x,n=n.substring(0,n.length-v.raw.length)+x.raw,i=i.substring(0,i.length-v.text.length)+x.text;break}else if((g==null?void 0:g.type)==="list"){let v=g,y=v.raw+`
|
|
320
|
-
`+r.join(`
|
|
321
|
-
`),x=this.list(y);a[a.length-1]=x,n=n.substring(0,n.length-g.raw.length)+x.raw,i=i.substring(0,i.length-v.raw.length)+x.raw,r=y.substring(a.at(-1).raw.length).split(`
|
|
322
|
-
`);continue}}return{type:"blockquote",raw:n,tokens:a,text:i}}}list(t){let e=this.rules.block.list.exec(t);if(e){let r=e[1].trim(),n=r.length>1,i={type:"list",raw:"",ordered:n,start:n?+r.slice(0,-1):"",loose:!1,items:[]};r=n?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=n?r:"[*+-]");let a=this.rules.other.listItemRegex(r),s=!1;for(;t;){let c=!1,f="",p="";if(!(e=a.exec(t))||this.rules.block.hr.test(t))break;f=e[0],t=t.substring(f.length);let h=Z6(e[2].split(`
|
|
323
|
-
`,1)[0],e[1].length),g=t.split(`
|
|
324
|
-
`,1)[0],v=!h.trim(),y=0;if(this.options.pedantic?(y=2,p=h.trimStart()):v?y=e[1].length+1:(y=h.search(this.rules.other.nonSpaceChar),y=y>4?1:y,p=h.slice(y),y+=e[1].length),v&&this.rules.other.blankLine.test(g)&&(f+=g+`
|
|
325
|
-
`,t=t.substring(g.length+1),c=!0),!c){let x=this.rules.other.nextBulletRegex(y),b=this.rules.other.hrRegex(y),S=this.rules.other.fencesBeginRegex(y),O=this.rules.other.headingBeginRegex(y),k=this.rules.other.htmlBeginRegex(y),T=this.rules.other.blockquoteBeginRegex(y);for(;t;){let E=t.split(`
|
|
326
|
-
`,1)[0],A;if(g=E,this.options.pedantic?(g=g.replace(this.rules.other.listReplaceNesting," "),A=g):A=g.replace(this.rules.other.tabCharGlobal," "),S.test(g)||O.test(g)||k.test(g)||T.test(g)||x.test(g)||b.test(g))break;if(A.search(this.rules.other.nonSpaceChar)>=y||!g.trim())p+=`
|
|
327
|
-
`+A.slice(y);else{if(v||h.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||S.test(h)||O.test(h)||b.test(h))break;p+=`
|
|
328
|
-
`+g}v=!g.trim(),f+=E+`
|
|
329
|
-
`,t=t.substring(E.length+1),h=A.slice(y)}}i.loose||(s?i.loose=!0:this.rules.other.doubleBlankLine.test(f)&&(s=!0)),i.items.push({type:"list_item",raw:f,task:!!this.options.gfm&&this.rules.other.listIsTask.test(p),loose:!1,text:p,tokens:[]}),i.raw+=f}let u=i.items.at(-1);if(u)u.raw=u.raw.trimEnd(),u.text=u.text.trimEnd();else return;i.raw=i.raw.trimEnd();for(let c of i.items){this.lexer.state.top=!1,c.tokens=this.lexer.blockTokens(c.text,[]);let f=c.tokens[0];if(c.task&&((f==null?void 0:f.type)==="text"||(f==null?void 0:f.type)==="paragraph")){c.text=c.text.replace(this.rules.other.listReplaceTask,""),f.raw=f.raw.replace(this.rules.other.listReplaceTask,""),f.text=f.text.replace(this.rules.other.listReplaceTask,"");for(let h=this.lexer.inlineQueue.length-1;h>=0;h--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[h].src)){this.lexer.inlineQueue[h].src=this.lexer.inlineQueue[h].src.replace(this.rules.other.listReplaceTask,"");break}let p=this.rules.other.listTaskCheckbox.exec(c.raw);if(p){let h={type:"checkbox",raw:p[0]+" ",checked:p[0]!=="[ ]"};c.checked=h.checked,i.loose?c.tokens[0]&&["paragraph","text"].includes(c.tokens[0].type)&&"tokens"in c.tokens[0]&&c.tokens[0].tokens?(c.tokens[0].raw=h.raw+c.tokens[0].raw,c.tokens[0].text=h.raw+c.tokens[0].text,c.tokens[0].tokens.unshift(h)):c.tokens.unshift({type:"paragraph",raw:h.raw,text:h.raw,tokens:[h]}):c.tokens.unshift(h)}}else c.task&&(c.task=!1);if(!i.loose){let p=c.tokens.filter(g=>g.type==="space"),h=p.length>0&&p.some(g=>this.rules.other.anyLine.test(g.raw));i.loose=h}}if(i.loose)for(let c of i.items){c.loose=!0;for(let f of c.tokens)f.type==="text"&&(f.type="paragraph")}return i}}html(t){let e=this.rules.block.html.exec(t);if(e){let r=tO(e[0]);return{type:"html",block:!0,raw:r,pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:r}}}def(t){let e=this.rules.block.def.exec(t);if(e){let r=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),n=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",i=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:r,raw:Xi(e[0],`
|
|
330
|
-
`),href:n,title:i}}}table(t){var s;let e=this.rules.block.table.exec(t);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;let r=eO(e[1]),n=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),i=(s=e[3])!=null&&s.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
331
|
-
`):[],a={type:"table",raw:Xi(e[0],`
|
|
332
|
-
`),header:[],align:[],rows:[]};if(r.length===n.length){for(let u of n)this.rules.other.tableAlignRight.test(u)?a.align.push("right"):this.rules.other.tableAlignCenter.test(u)?a.align.push("center"):this.rules.other.tableAlignLeft.test(u)?a.align.push("left"):a.align.push(null);for(let u=0;u<r.length;u++)a.header.push({text:r[u],tokens:this.lexer.inline(r[u]),header:!0,align:a.align[u]});for(let u of i)a.rows.push(eO(u,a.header.length).map((c,f)=>({text:c,tokens:this.lexer.inline(c),header:!1,align:a.align[f]})));return a}}lheading(t){let e=this.rules.block.lheading.exec(t);if(e){let r=e[1].trim();return{type:"heading",raw:Xi(e[0],`
|
|
333
|
-
`),depth:e[2].charAt(0)==="="?1:2,text:r,tokens:this.lexer.inline(r)}}}paragraph(t){let e=this.rules.block.paragraph.exec(t);if(e){let r=e[1].charAt(e[1].length-1)===`
|
|
334
|
-
`?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:r,tokens:this.lexer.inline(r)}}}text(t){let e=this.rules.block.text.exec(t);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(t){let e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(t){let e=this.rules.inline.tag.exec(t);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(t){let e=this.rules.inline.link.exec(t);if(e){let r=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(r)){if(!this.rules.other.endAngleBracket.test(r))return;let a=Xi(r.slice(0,-1),"\\");if((r.length-a.length)%2===0)return}else{let a=Q6(e[2],"()");if(a===-2)return;if(a>-1){let s=(e[0].indexOf("!")===0?5:4)+e[1].length+a;e[2]=e[2].substring(0,a),e[0]=e[0].substring(0,s).trim(),e[3]=""}}let n=e[2],i="";if(this.options.pedantic){let a=this.rules.other.pedanticHrefTitle.exec(n);a&&(n=a[1],i=a[3])}else i=e[3]?e[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(r)?n=n.slice(1):n=n.slice(1,-1)),rO(e,{href:n&&n.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(t,e){let r;if((r=this.rules.inline.reflink.exec(t))||(r=this.rules.inline.nolink.exec(t))){let n=(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," "),i=e[n.toLowerCase()];if(!i){let a=r[0].charAt(0);return{type:"text",raw:a,text:a}}return rO(r,i,r[0],this.lexer,this.rules)}}emStrong(t,e,r=""){let n=this.rules.inline.emStrongLDelim.exec(t);if(!(!n||!n[1]&&!n[2]&&!n[3]&&!n[4]||n[4]&&r.match(this.rules.other.unicodeAlphaNumeric))&&(!(n[1]||n[3])||!r||this.rules.inline.punctuation.exec(r))){let i=[...n[0]].length-1,a,s,u=i,c=0,f=n[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(f.lastIndex=0,e=e.slice(-1*t.length+i);(n=f.exec(e))!==null;){if(a=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!a)continue;if(s=[...a].length,n[3]||n[4]){u+=s;continue}else if((n[5]||n[6])&&i%3&&!((i+s)%3)){c+=s;continue}if(u-=s,u>0)continue;s=Math.min(s,s+u+c);let p=[...n[0]][0].length,h=t.slice(0,i+n.index+p+s);if(Math.min(i,s)%2){let v=h.slice(1,-1);return{type:"em",raw:h,text:v,tokens:this.lexer.inlineTokens(v)}}let g=h.slice(2,-2);return{type:"strong",raw:h,text:g,tokens:this.lexer.inlineTokens(g)}}}}codespan(t){let e=this.rules.inline.code.exec(t);if(e){let r=e[2].replace(this.rules.other.newLineCharGlobal," "),n=this.rules.other.nonSpaceChar.test(r),i=this.rules.other.startingSpaceChar.test(r)&&this.rules.other.endingSpaceChar.test(r);return n&&i&&(r=r.substring(1,r.length-1)),{type:"codespan",raw:e[0],text:r}}}br(t){let e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t,e,r=""){let n=this.rules.inline.delLDelim.exec(t);if(n&&(!n[1]||!r||this.rules.inline.punctuation.exec(r))){let i=[...n[0]].length-1,a,s,u=i,c=this.rules.inline.delRDelim;for(c.lastIndex=0,e=e.slice(-1*t.length+i);(n=c.exec(e))!==null;){if(a=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!a||(s=[...a].length,s!==i))continue;if(n[3]||n[4]){u+=s;continue}if(u-=s,u>0)continue;s=Math.min(s,s+u);let f=[...n[0]][0].length,p=t.slice(0,i+n.index+f+s),h=p.slice(i,-i);return{type:"del",raw:p,text:h,tokens:this.lexer.inlineTokens(h)}}}}autolink(t){let e=this.rules.inline.autolink.exec(t);if(e){let r,n;return e[2]==="@"?(r=e[1],n="mailto:"+r):(r=e[1],n=r),{type:"link",raw:e[0],text:r,href:n,tokens:[{type:"text",raw:r,text:r}]}}}url(t){var r;let e;if(e=this.rules.inline.url.exec(t)){let n,i;if(e[2]==="@")n=e[0],i="mailto:"+n;else{let a;do a=e[0],e[0]=((r=this.rules.inline._backpedal.exec(e[0]))==null?void 0:r[0])??"";while(a!==e[0]);n=e[0],e[1]==="www."?i="http://"+e[0]:i=e[0]}return{type:"link",raw:e[0],text:n,href:i,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(t){let e=this.rules.inline.text.exec(t);if(e){let r=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:r}}}},bn=class Sb{constructor(e){Qe(this,"tokens");Qe(this,"options");Qe(this,"state");Qe(this,"inlineQueue");Qe(this,"tokenizer");this.tokens=[],this.tokens.links=Object.create(null),this.options=e||to,this.options.tokenizer=this.options.tokenizer||new ld,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let r={other:lr,block:Af.normal,inline:Nl.normal};this.options.pedantic?(r.block=Af.pedantic,r.inline=Nl.pedantic):this.options.gfm&&(r.block=Af.gfm,this.options.breaks?r.inline=Nl.breaks:r.inline=Nl.gfm),this.tokenizer.rules=r}static get rules(){return{block:Af,inline:Nl}}static lex(e,r){return new Sb(r).lex(e)}static lexInline(e,r){return new Sb(r).inlineTokens(e)}lex(e){e=e.replace(lr.carriageReturn,`
|
|
335
|
-
`),this.blockTokens(e,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){let n=this.inlineQueue[r];this.inlineTokens(n.src,n.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,r=[],n=!1){var a,s,u;this.tokenizer.lexer=this,this.options.pedantic&&(e=e.replace(lr.tabCharGlobal," ").replace(lr.spaceLine,""));let i=1/0;for(;e;){if(e.length<i)i=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}let c;if((s=(a=this.options.extensions)==null?void 0:a.block)!=null&&s.some(p=>(c=p.call({lexer:this},e,r))?(e=e.substring(c.raw.length),r.push(c),!0):!1))continue;if(c=this.tokenizer.space(e)){e=e.substring(c.raw.length);let p=r.at(-1);c.raw.length===1&&p!==void 0?p.raw+=`
|
|
336
|
-
`:r.push(c);continue}if(c=this.tokenizer.code(e)){e=e.substring(c.raw.length);let p=r.at(-1);(p==null?void 0:p.type)==="paragraph"||(p==null?void 0:p.type)==="text"?(p.raw+=(p.raw.endsWith(`
|
|
337
|
-
`)?"":`
|
|
338
|
-
`)+c.raw,p.text+=`
|
|
339
|
-
`+c.text,this.inlineQueue.at(-1).src=p.text):r.push(c);continue}if(c=this.tokenizer.fences(e)){e=e.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.heading(e)){e=e.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.hr(e)){e=e.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.blockquote(e)){e=e.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.list(e)){e=e.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.html(e)){e=e.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.def(e)){e=e.substring(c.raw.length);let p=r.at(-1);(p==null?void 0:p.type)==="paragraph"||(p==null?void 0:p.type)==="text"?(p.raw+=(p.raw.endsWith(`
|
|
340
|
-
`)?"":`
|
|
341
|
-
`)+c.raw,p.text+=`
|
|
342
|
-
`+c.raw,this.inlineQueue.at(-1).src=p.text):this.tokens.links[c.tag]||(this.tokens.links[c.tag]={href:c.href,title:c.title},r.push(c));continue}if(c=this.tokenizer.table(e)){e=e.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.lheading(e)){e=e.substring(c.raw.length),r.push(c);continue}let f=e;if((u=this.options.extensions)!=null&&u.startBlock){let p=1/0,h=e.slice(1),g;this.options.extensions.startBlock.forEach(v=>{g=v.call({lexer:this},h),typeof g=="number"&&g>=0&&(p=Math.min(p,g))}),p<1/0&&p>=0&&(f=e.substring(0,p+1))}if(this.state.top&&(c=this.tokenizer.paragraph(f))){let p=r.at(-1);n&&(p==null?void 0:p.type)==="paragraph"?(p.raw+=(p.raw.endsWith(`
|
|
343
|
-
`)?"":`
|
|
344
|
-
`)+c.raw,p.text+=`
|
|
345
|
-
`+c.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=p.text):r.push(c),n=f.length!==e.length,e=e.substring(c.raw.length);continue}if(c=this.tokenizer.text(e)){e=e.substring(c.raw.length);let p=r.at(-1);(p==null?void 0:p.type)==="text"?(p.raw+=(p.raw.endsWith(`
|
|
346
|
-
`)?"":`
|
|
347
|
-
`)+c.raw,p.text+=`
|
|
348
|
-
`+c.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=p.text):r.push(c);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return this.state.top=!0,r}inline(e,r=[]){return this.inlineQueue.push({src:e,tokens:r}),r}inlineTokens(e,r=[]){var f,p,h,g,v;this.tokenizer.lexer=this;let n=e,i=null;if(this.tokens.links){let y=Object.keys(this.tokens.links);if(y.length>0)for(;(i=this.tokenizer.rules.inline.reflinkSearch.exec(n))!==null;)y.includes(i[0].slice(i[0].lastIndexOf("[")+1,-1))&&(n=n.slice(0,i.index)+"["+"a".repeat(i[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(i=this.tokenizer.rules.inline.anyPunctuation.exec(n))!==null;)n=n.slice(0,i.index)+"++"+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let a;for(;(i=this.tokenizer.rules.inline.blockSkip.exec(n))!==null;)a=i[2]?i[2].length:0,n=n.slice(0,i.index+a)+"["+"a".repeat(i[0].length-a-2)+"]"+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);n=((p=(f=this.options.hooks)==null?void 0:f.emStrongMask)==null?void 0:p.call({lexer:this},n))??n;let s=!1,u="",c=1/0;for(;e;){if(e.length<c)c=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}s||(u=""),s=!1;let y;if((g=(h=this.options.extensions)==null?void 0:h.inline)!=null&&g.some(b=>(y=b.call({lexer:this},e,r))?(e=e.substring(y.raw.length),r.push(y),!0):!1))continue;if(y=this.tokenizer.escape(e)){e=e.substring(y.raw.length),r.push(y);continue}if(y=this.tokenizer.tag(e)){e=e.substring(y.raw.length),r.push(y);continue}if(y=this.tokenizer.link(e)){e=e.substring(y.raw.length),r.push(y);continue}if(y=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(y.raw.length);let b=r.at(-1);y.type==="text"&&(b==null?void 0:b.type)==="text"?(b.raw+=y.raw,b.text+=y.text):r.push(y);continue}if(y=this.tokenizer.emStrong(e,n,u)){e=e.substring(y.raw.length),r.push(y);continue}if(y=this.tokenizer.codespan(e)){e=e.substring(y.raw.length),r.push(y);continue}if(y=this.tokenizer.br(e)){e=e.substring(y.raw.length),r.push(y);continue}if(y=this.tokenizer.del(e,n,u)){e=e.substring(y.raw.length),r.push(y);continue}if(y=this.tokenizer.autolink(e)){e=e.substring(y.raw.length),r.push(y);continue}if(!this.state.inLink&&(y=this.tokenizer.url(e))){e=e.substring(y.raw.length),r.push(y);continue}let x=e;if((v=this.options.extensions)!=null&&v.startInline){let b=1/0,S=e.slice(1),O;this.options.extensions.startInline.forEach(k=>{O=k.call({lexer:this},S),typeof O=="number"&&O>=0&&(b=Math.min(b,O))}),b<1/0&&b>=0&&(x=e.substring(0,b+1))}if(y=this.tokenizer.inlineText(x)){e=e.substring(y.raw.length),y.raw.slice(-1)!=="_"&&(u=y.raw.slice(-1)),s=!0;let b=r.at(-1);(b==null?void 0:b.type)==="text"?(b.raw+=y.raw,b.text+=y.text):r.push(y);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return r}infiniteLoopError(e){let r="Infinite loop on byte: "+e;if(this.options.silent)console.error(r);else throw new Error(r)}},ud=class{constructor(e){Qe(this,"options");Qe(this,"parser");this.options=e||to}space(e){return""}code({text:e,lang:r,escaped:n}){var s;let i=(s=(r||"").match(lr.notSpaceStart))==null?void 0:s[0],a=e.replace(lr.endingNewline,"")+`
|
|
349
|
-
`;return i?'<pre><code class="language-'+$n(i)+'">'+(n?a:$n(a,!0))+`</code></pre>
|
|
350
|
-
`:"<pre><code>"+(n?a:$n(a,!0))+`</code></pre>
|
|
351
|
-
`}blockquote({tokens:e}){return`<blockquote>
|
|
352
|
-
${this.parser.parse(e)}</blockquote>
|
|
353
|
-
`}html({text:e}){return e}def(e){return""}heading({tokens:e,depth:r}){return`<h${r}>${this.parser.parseInline(e)}</h${r}>
|
|
354
|
-
`}hr(e){return`<hr>
|
|
355
|
-
`}list(e){let r=e.ordered,n=e.start,i="";for(let u=0;u<e.items.length;u++){let c=e.items[u];i+=this.listitem(c)}let a=r?"ol":"ul",s=r&&n!==1?' start="'+n+'"':"";return"<"+a+s+`>
|
|
356
|
-
`+i+"</"+a+`>
|
|
357
|
-
`}listitem(e){return`<li>${this.parser.parse(e.tokens)}</li>
|
|
358
|
-
`}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
|
|
359
|
-
`}table(e){let r="",n="";for(let a=0;a<e.header.length;a++)n+=this.tablecell(e.header[a]);r+=this.tablerow({text:n});let i="";for(let a=0;a<e.rows.length;a++){let s=e.rows[a];n="";for(let u=0;u<s.length;u++)n+=this.tablecell(s[u]);i+=this.tablerow({text:n})}return i&&(i=`<tbody>${i}</tbody>`),`<table>
|
|
360
|
-
<thead>
|
|
361
|
-
`+r+`</thead>
|
|
362
|
-
`+i+`</table>
|
|
363
|
-
`}tablerow({text:e}){return`<tr>
|
|
364
|
-
${e}</tr>
|
|
365
|
-
`}tablecell(e){let r=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+r+`</${n}>
|
|
366
|
-
`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${$n(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:r,tokens:n}){let i=this.parser.parseInline(n),a=Zk(e);if(a===null)return i;e=a;let s='<a href="'+e+'"';return r&&(s+=' title="'+$n(r)+'"'),s+=">"+i+"</a>",s}image({href:e,title:r,text:n,tokens:i}){i&&(n=this.parser.parseInline(i,this.parser.textRenderer));let a=Zk(e);if(a===null)return $n(n);e=a;let s=`<img src="${e}" alt="${$n(n)}"`;return r&&(s+=` title="${$n(r)}"`),s+=">",s}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:$n(e.text)}},gx=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}checkbox({raw:t}){return t}},wn=class kb{constructor(e){Qe(this,"options");Qe(this,"renderer");Qe(this,"textRenderer");this.options=e||to,this.options.renderer=this.options.renderer||new ud,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new gx}static parse(e,r){return new kb(r).parse(e)}static parseInline(e,r){return new kb(r).parseInline(e)}parse(e){var n,i;this.renderer.parser=this;let r="";for(let a=0;a<e.length;a++){let s=e[a];if((i=(n=this.options.extensions)==null?void 0:n.renderers)!=null&&i[s.type]){let c=s,f=this.options.extensions.renderers[c.type].call({parser:this},c);if(f!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(c.type)){r+=f||"";continue}}let u=s;switch(u.type){case"space":{r+=this.renderer.space(u);break}case"hr":{r+=this.renderer.hr(u);break}case"heading":{r+=this.renderer.heading(u);break}case"code":{r+=this.renderer.code(u);break}case"table":{r+=this.renderer.table(u);break}case"blockquote":{r+=this.renderer.blockquote(u);break}case"list":{r+=this.renderer.list(u);break}case"checkbox":{r+=this.renderer.checkbox(u);break}case"html":{r+=this.renderer.html(u);break}case"def":{r+=this.renderer.def(u);break}case"paragraph":{r+=this.renderer.paragraph(u);break}case"text":{r+=this.renderer.text(u);break}default:{let c='Token with "'+u.type+'" type was not found.';if(this.options.silent)return console.error(c),"";throw new Error(c)}}}return r}parseInline(e,r=this.renderer){var i,a;this.renderer.parser=this;let n="";for(let s=0;s<e.length;s++){let u=e[s];if((a=(i=this.options.extensions)==null?void 0:i.renderers)!=null&&a[u.type]){let f=this.options.extensions.renderers[u.type].call({parser:this},u);if(f!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(u.type)){n+=f||"";continue}}let c=u;switch(c.type){case"escape":{n+=r.text(c);break}case"html":{n+=r.html(c);break}case"link":{n+=r.link(c);break}case"image":{n+=r.image(c);break}case"checkbox":{n+=r.checkbox(c);break}case"strong":{n+=r.strong(c);break}case"em":{n+=r.em(c);break}case"codespan":{n+=r.codespan(c);break}case"br":{n+=r.br(c);break}case"del":{n+=r.del(c);break}case"text":{n+=r.text(c);break}default:{let f='Token with "'+c.type+'" type was not found.';if(this.options.silent)return console.error(f),"";throw new Error(f)}}}return n}},Wf,Vl=(Wf=class{constructor(e){Qe(this,"options");Qe(this,"block");this.options=e||to}preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(e=this.block){return e?bn.lex:bn.lexInline}provideParser(e=this.block){return e?wn.parse:wn.parseInline}},Qe(Wf,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),Qe(Wf,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),Wf),tq=class{constructor(...t){Qe(this,"defaults",lx());Qe(this,"options",this.setOptions);Qe(this,"parse",this.parseMarkdown(!0));Qe(this,"parseInline",this.parseMarkdown(!1));Qe(this,"Parser",wn);Qe(this,"Renderer",ud);Qe(this,"TextRenderer",gx);Qe(this,"Lexer",bn);Qe(this,"Tokenizer",ld);Qe(this,"Hooks",Vl);this.use(...t)}walkTokens(t,e){var n,i;let r=[];for(let a of t)switch(r=r.concat(e.call(this,a)),a.type){case"table":{let s=a;for(let u of s.header)r=r.concat(this.walkTokens(u.tokens,e));for(let u of s.rows)for(let c of u)r=r.concat(this.walkTokens(c.tokens,e));break}case"list":{let s=a;r=r.concat(this.walkTokens(s.items,e));break}default:{let s=a;(i=(n=this.defaults.extensions)==null?void 0:n.childTokens)!=null&&i[s.type]?this.defaults.extensions.childTokens[s.type].forEach(u=>{let c=s[u].flat(1/0);r=r.concat(this.walkTokens(c,e))}):s.tokens&&(r=r.concat(this.walkTokens(s.tokens,e)))}}return r}use(...t){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(r=>{let n={...r};if(n.async=this.defaults.async||n.async||!1,r.extensions&&(r.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if("renderer"in i){let a=e.renderers[i.name];a?e.renderers[i.name]=function(...s){let u=i.renderer.apply(this,s);return u===!1&&(u=a.apply(this,s)),u}:e.renderers[i.name]=i.renderer}if("tokenizer"in i){if(!i.level||i.level!=="block"&&i.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let a=e[i.level];a?a.unshift(i.tokenizer):e[i.level]=[i.tokenizer],i.start&&(i.level==="block"?e.startBlock?e.startBlock.push(i.start):e.startBlock=[i.start]:i.level==="inline"&&(e.startInline?e.startInline.push(i.start):e.startInline=[i.start]))}"childTokens"in i&&i.childTokens&&(e.childTokens[i.name]=i.childTokens)}),n.extensions=e),r.renderer){let i=this.defaults.renderer||new ud(this.defaults);for(let a in r.renderer){if(!(a in i))throw new Error(`renderer '${a}' does not exist`);if(["options","parser"].includes(a))continue;let s=a,u=r.renderer[s],c=i[s];i[s]=(...f)=>{let p=u.apply(i,f);return p===!1&&(p=c.apply(i,f)),p||""}}n.renderer=i}if(r.tokenizer){let i=this.defaults.tokenizer||new ld(this.defaults);for(let a in r.tokenizer){if(!(a in i))throw new Error(`tokenizer '${a}' does not exist`);if(["options","rules","lexer"].includes(a))continue;let s=a,u=r.tokenizer[s],c=i[s];i[s]=(...f)=>{let p=u.apply(i,f);return p===!1&&(p=c.apply(i,f)),p}}n.tokenizer=i}if(r.hooks){let i=this.defaults.hooks||new Vl;for(let a in r.hooks){if(!(a in i))throw new Error(`hook '${a}' does not exist`);if(["options","block"].includes(a))continue;let s=a,u=r.hooks[s],c=i[s];Vl.passThroughHooks.has(a)?i[s]=f=>{if(this.defaults.async&&Vl.passThroughHooksRespectAsync.has(a))return(async()=>{let h=await u.call(i,f);return c.call(i,h)})();let p=u.call(i,f);return c.call(i,p)}:i[s]=(...f)=>{if(this.defaults.async)return(async()=>{let h=await u.apply(i,f);return h===!1&&(h=await c.apply(i,f)),h})();let p=u.apply(i,f);return p===!1&&(p=c.apply(i,f)),p}}n.hooks=i}if(r.walkTokens){let i=this.defaults.walkTokens,a=r.walkTokens;n.walkTokens=function(s){let u=[];return u.push(a.call(this,s)),i&&(u=u.concat(i.call(this,s))),u}}this.defaults={...this.defaults,...n}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return bn.lex(t,e??this.defaults)}parser(t,e){return wn.parse(t,e??this.defaults)}parseMarkdown(t){return(e,r)=>{let n={...r},i={...this.defaults,...n},a=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&n.async===!1)return a(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof e>"u"||e===null)return a(new Error("marked(): input parameter is undefined or null"));if(typeof e!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));if(i.hooks&&(i.hooks.options=i,i.hooks.block=t),i.async)return(async()=>{let s=i.hooks?await i.hooks.preprocess(e):e,u=await(i.hooks?await i.hooks.provideLexer(t):t?bn.lex:bn.lexInline)(s,i),c=i.hooks?await i.hooks.processAllTokens(u):u;i.walkTokens&&await Promise.all(this.walkTokens(c,i.walkTokens));let f=await(i.hooks?await i.hooks.provideParser(t):t?wn.parse:wn.parseInline)(c,i);return i.hooks?await i.hooks.postprocess(f):f})().catch(a);try{i.hooks&&(e=i.hooks.preprocess(e));let s=(i.hooks?i.hooks.provideLexer(t):t?bn.lex:bn.lexInline)(e,i);i.hooks&&(s=i.hooks.processAllTokens(s)),i.walkTokens&&this.walkTokens(s,i.walkTokens);let u=(i.hooks?i.hooks.provideParser(t):t?wn.parse:wn.parseInline)(s,i);return i.hooks&&(u=i.hooks.postprocess(u)),u}catch(s){return a(s)}}}onError(t,e){return r=>{if(r.message+=`
|
|
367
|
-
Please report this to https://github.com/markedjs/marked.`,t){let n="<p>An error occurred:</p><pre>"+$n(r.message+"",!0)+"</pre>";return e?Promise.resolve(n):n}if(e)return Promise.reject(r);throw r}}},Ga=new tq;function Ve(t,e){return Ga.parse(t,e)}Ve.options=Ve.setOptions=function(t){return Ga.setOptions(t),Ve.defaults=Ga.defaults,cR(Ve.defaults),Ve};Ve.getDefaults=lx;Ve.defaults=to;Ve.use=function(...t){return Ga.use(...t),Ve.defaults=Ga.defaults,cR(Ve.defaults),Ve};Ve.walkTokens=function(t,e){return Ga.walkTokens(t,e)};Ve.parseInline=Ga.parseInline;Ve.Parser=wn;Ve.parser=wn.parse;Ve.Renderer=ud;Ve.TextRenderer=gx;Ve.Lexer=bn;Ve.lexer=bn.lex;Ve.Tokenizer=ld;Ve.Hooks=Vl;Ve.parse=Ve;Ve.options;Ve.setOptions;Ve.use;Ve.walkTokens;Ve.parseInline;wn.parse;bn.lex;function rq(){const[t,e]=N.useState([]),[r,n]=N.useState(""),[i,a]=N.useState(""),[s,u]=N.useState(!1),[c,f]=N.useState(null),p=N.useRef(null),h=N.useRef(null);N.useEffect(()=>{kt.get("/conversations?limit=50").then(k=>e(k.messages)).catch(()=>{})},[]);const g=N.useCallback(k=>{u(!0),a(k)},[]),v=N.useCallback(k=>{u(!1),a(""),e(T=>[...T,{id:crypto.randomUUID(),role:"assistant",content:k,timestamp:new Date().toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!1})}])},[]),y=N.useCallback(k=>{},[]),{sendMessage:x}=p6({onDelta:g,onMessage:v,onEvent:y});N.useEffect(()=>{var k;(k=p.current)==null||k.scrollIntoView({behavior:"smooth"})},[t,i]);function b(){const k=r.trim();if(!k||s)return;const T=new Date().toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!1});e(E=>[...E,{id:crypto.randomUUID(),role:"user",content:k,timestamp:T}]),n(""),h.current&&(h.current.style.height="auto"),x(k)}function S(k){k.key==="Enter"&&!k.shiftKey&&(k.preventDefault(),b())}function O(k){n(k.target.value),h.current&&(h.current.style.height="auto",h.current.style.height=`${Math.min(h.current.scrollHeight,160)}px`)}return P.jsxs("div",{className:"flex flex-col flex-1 min-h-0",children:[P.jsxs("div",{className:"flex-1 overflow-y-auto px-5 py-5 space-y-5",children:[t.map(k=>P.jsxs("div",{className:`flex gap-3 ${k.role==="user"?"flex-row-reverse":""}`,children:[P.jsx("div",{className:`flex-shrink-0 w-6 h-6 rounded-lg flex items-center justify-center text-[10px] font-mono mt-0.5 ${k.role==="user"?"border border-[#E43A9C]/30 text-[#E43A9C]":"bg-[#282828] border border-white/[0.07] text-zinc-500"}`,style:k.role==="user"?{background:"rgba(228,58,156,0.12)"}:void 0,children:k.role==="user"?"U":P.jsx(Jo,{height:12})}),P.jsxs("div",{className:`flex flex-col gap-1.5 max-w-[72%] ${k.role==="user"?"items-end":"items-start"}`,children:[k.toolCall&&P.jsxs("button",{type:"button",onClick:()=>f(c===k.id?null:k.id),className:"w-full text-left border border-white/[0.07] bg-[#1e1e1e] rounded-xl px-3 py-2 flex items-center gap-2 hover:border-[#E43A9C]/25 transition-colors",children:[P.jsx(Nj,{className:"w-3 h-3 text-[#E43A9C] flex-shrink-0"}),P.jsx("span",{className:"text-[11px] font-mono text-zinc-400 flex-1",children:k.toolCall.name}),P.jsx(ui,{variant:k.toolCall.status==="done"?"success":k.toolCall.status==="error"?"error":"warning",children:k.toolCall.status}),P.jsx(u5,{className:`w-3 h-3 text-zinc-600 transition-transform flex-shrink-0 ${c===k.id?"rotate-180":""}`})]}),k.toolCall&&c===k.id&&P.jsx("div",{className:"w-full bg-[#181818] border border-white/[0.06] rounded-xl px-3 py-2",children:P.jsx("p",{className:"text-[11px] font-mono text-zinc-500",children:k.toolCall.result})}),P.jsx("div",{className:`rounded-2xl px-4 py-2.5 text-sm leading-relaxed ${k.role==="user"?"text-white rounded-tr-sm":"bg-[#222222] border border-white/[0.07] text-zinc-200 rounded-tl-sm"}`,style:k.role==="user"?{background:"linear-gradient(135deg, #D83333 0%, #C0285E 100%)"}:void 0,children:k.role==="user"?P.jsx("p",{className:"whitespace-pre-wrap",children:k.content}):P.jsx("div",{className:"prose-io",dangerouslySetInnerHTML:{__html:Ve.parse(k.content)}})}),P.jsx("span",{className:"text-[11px] text-zinc-700 font-mono px-0.5",children:k.timestamp})]})]},k.id)),s&&i&&P.jsxs("div",{className:"flex gap-3",children:[P.jsx("div",{className:"flex-shrink-0 w-6 h-6 rounded-lg flex items-center justify-center bg-[#282828] border border-white/[0.07] mt-0.5",children:P.jsx(Jo,{height:12})}),P.jsx("div",{className:"bg-[#222222] border border-white/[0.07] rounded-2xl rounded-tl-sm px-4 py-2.5 max-w-[72%]",children:P.jsx("div",{className:"prose-io text-sm",dangerouslySetInnerHTML:{__html:Ve.parse(i)}})})]}),s&&!i&&P.jsxs("div",{className:"flex gap-3",children:[P.jsx("div",{className:"flex-shrink-0 w-6 h-6 rounded-lg flex items-center justify-center bg-[#282828] border border-white/[0.07] mt-0.5",children:P.jsx(Jo,{height:12})}),P.jsx("div",{className:"bg-[#222222] border border-white/[0.07] rounded-2xl rounded-tl-sm px-4 py-3 flex items-center gap-1.5",children:[0,120,240].map(k=>P.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-[#E43A9C] animate-bounce",style:{animationDelay:`${k}ms`}},k))})]}),P.jsx("div",{ref:p})]}),P.jsxs("div",{className:"border-t border-white/[0.06] p-4 flex-shrink-0",children:[P.jsxs("div",{className:"bg-[#1e1e1e] border border-white/[0.08] rounded-2xl overflow-hidden transition-colors focus-within:border-[#E43A9C]/30",children:[P.jsx("textarea",{ref:h,value:r,onChange:O,onKeyDown:S,placeholder:"Message IO…",rows:1,className:"w-full bg-transparent px-4 pt-3 pb-1 text-sm text-zinc-200 placeholder:text-zinc-700 resize-none focus:outline-none",style:{minHeight:"42px",maxHeight:"160px",fontFamily:"Inter, sans-serif"}}),P.jsxs("div",{className:"flex items-center justify-between px-3 pb-2.5",children:[P.jsx("button",{type:"button",className:"p-1.5 rounded-lg hover:bg-white/[0.05] text-zinc-700 hover:text-zinc-400 transition-colors",children:P.jsx(U5,{className:"w-4 h-4"})}),P.jsx("div",{className:"flex items-center gap-2",children:s?P.jsxs("button",{type:"button",onClick:()=>u(!1),className:"flex items-center gap-1.5 px-3 py-1.5 rounded-lg bg-zinc-800 hover:bg-zinc-700 text-[11px] font-mono text-zinc-300 transition-colors",children:[P.jsx(nB,{className:"w-3 h-3"})," Stop"]}):P.jsx("button",{type:"button",onClick:b,disabled:!r.trim(),className:"p-2 rounded-xl text-white disabled:opacity-30 disabled:cursor-not-allowed transition-opacity hover:opacity-90",style:{background:"linear-gradient(135deg, #D83333, #E43A9C)"},children:P.jsx(Z5,{className:"w-3.5 h-3.5"})})})]})]}),P.jsx("p",{className:"text-center text-[11px] text-zinc-800 font-mono mt-2",children:"IO may make mistakes. Verify important outputs."})]})]})}function nq(){const[t,e]=N.useState([]),[r,n]=N.useState(null),[i,a]=N.useState("all");N.useEffect(()=>{kt.get("/inbox").then(f=>e(f.entries)).catch(()=>{})},[]);function s(f){n(f),f.status==="unread"&&kt.post(`/inbox/${f.id}/read`).then(()=>{e(p=>p.map(h=>h.id===f.id?{...h,status:"read"}:h))}).catch(()=>{})}const u=t.filter(f=>i==="all"||f.status==="unread"),c=t.filter(f=>f.status==="unread").length;return P.jsxs("div",{className:"flex h-full",children:[P.jsxs("div",{className:"w-80 border-r border-white/[0.07] flex flex-col h-full bg-[#181818]",children:[P.jsxs("div",{className:"p-3 border-b border-white/[0.07]",children:[P.jsxs("div",{className:"flex items-center justify-between mb-2",children:[P.jsx("h2",{className:"text-lg tracking-wide text-zinc-100",style:{fontFamily:"'Bebas Neue', sans-serif"},children:"Feed"}),c>0&&P.jsx(ui,{variant:"default",children:c})]}),P.jsx("div",{className:"flex gap-1 p-1 rounded-xl bg-white/[0.03] border border-white/[0.07]",children:["all","unread"].map(f=>P.jsx("button",{type:"button",onClick:()=>a(f),className:`flex-1 px-2 py-1 rounded-lg text-[11px] font-mono transition-colors ${i===f?"bg-white/10 text-zinc-200":"text-zinc-600 hover:text-zinc-400"}`,children:f==="all"?"All":"Unread"},f))})]}),P.jsxs("div",{className:"flex-1 overflow-y-auto",children:[u.map(f=>P.jsxs("button",{onClick:()=>s(f),type:"button",className:`w-full text-left px-4 py-3 border-b border-white/[0.05] transition-colors ${(r==null?void 0:r.id)===f.id?"bg-white/[0.06]":"hover:bg-white/[0.03]"} ${f.status==="unread"?"border-l-2 border-l-[#E43A9C]":""}`,children:[P.jsxs("div",{className:"flex items-center gap-2",children:[f.status==="unread"?P.jsx(D5,{size:12,className:"text-[#E43A9C] flex-shrink-0"}):P.jsx(M5,{size:12,className:"text-zinc-700 flex-shrink-0"}),P.jsx("span",{className:"text-[10px] text-zinc-600 font-mono uppercase",children:f.kind})]}),P.jsx("p",{className:`text-sm mt-1 truncate ${f.status==="unread"?"text-zinc-200 font-medium":"text-zinc-400"}`,children:f.title}),P.jsx("p",{className:"text-[10px] text-zinc-700 font-mono mt-0.5",children:new Date(f.createdAt).toLocaleString()})]},f.id)),u.length===0&&P.jsxs("div",{className:"flex flex-col items-center justify-center py-12",children:[P.jsx(Lj,{size:32,className:"text-zinc-800 mb-2"}),P.jsx("p",{className:"text-[11px] font-mono text-zinc-700",children:i==="unread"?"All caught up":"No items yet"})]})]})]}),P.jsx("div",{className:"flex-1 overflow-y-auto p-6",children:r?P.jsxs("div",{children:[P.jsx("h2",{className:"text-lg text-zinc-100 font-medium mb-1",children:r.title}),P.jsxs("p",{className:"text-[11px] text-zinc-600 font-mono mb-5",children:[r.kind," · ",new Date(r.createdAt).toLocaleString()]}),P.jsx("div",{className:"prose-io",dangerouslySetInnerHTML:{__html:Ve.parse(r.content)}})]}):P.jsx("div",{className:"h-full flex items-center justify-center",children:P.jsx("p",{className:"text-[11px] font-mono text-zinc-700",children:"Select an item to view details"})})})]})}function iq(){const{signIn:t}=sx(),[e,r]=N.useState(""),[n,i]=N.useState(""),[a,s]=N.useState(null),[u,c]=N.useState(!1);async function f(p){p.preventDefault(),s(null),c(!0);const{error:h}=await t(e,n);h&&s(h),c(!1)}return P.jsxs("div",{className:"min-h-screen bg-[#161616] flex items-center justify-center relative overflow-hidden",children:[P.jsx("div",{className:"absolute inset-0 opacity-[0.04]",style:{backgroundImage:"radial-gradient(circle, #E43A9C 1px, transparent 1px)",backgroundSize:"32px 32px"}}),P.jsx("div",{className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-[60%] w-[400px] h-[300px] rounded-full blur-3xl pointer-events-none",style:{background:"radial-gradient(ellipse, rgba(228,58,156,0.12) 0%, transparent 70%)"}}),P.jsxs("div",{className:"relative z-10 w-full max-w-[360px] mx-4",children:[P.jsxs("div",{className:"flex flex-col items-center mb-8 gap-3",children:[P.jsx(Jo,{height:52}),P.jsx("div",{className:"text-center",children:P.jsx("p",{className:"text-[11px] font-mono text-zinc-600 tracking-widest uppercase mt-1",children:"personal ai orchestrator"})})]}),P.jsxs("form",{onSubmit:f,className:"glass-card border border-white/[0.07] rounded-2xl p-6 space-y-4",children:[P.jsxs("div",{className:"space-y-1",children:[P.jsx("label",{className:"text-[11px] font-mono text-zinc-500 block",children:"Email"}),P.jsx("input",{type:"email",value:e,onChange:p=>r(p.target.value),required:!0,className:"w-full bg-[#161616] border border-white/[0.08] rounded-xl px-3 py-2.5 text-sm text-zinc-200 font-mono placeholder:text-zinc-700 focus:outline-none focus:border-[#E43A9C]/40 focus:ring-1 focus:ring-[#E43A9C]/15 transition-colors"})]}),P.jsxs("div",{className:"space-y-1",children:[P.jsx("label",{className:"text-[11px] font-mono text-zinc-500 block",children:"Password"}),P.jsx("input",{type:"password",value:n,onChange:p=>i(p.target.value),required:!0,placeholder:"••••••••",className:"w-full bg-[#161616] border border-white/[0.08] rounded-xl px-3 py-2.5 text-sm text-zinc-200 font-mono placeholder:text-zinc-700 focus:outline-none focus:border-[#E43A9C]/40 focus:ring-1 focus:ring-[#E43A9C]/15 transition-colors"})]}),a&&P.jsx("p",{className:"text-[11px] font-mono text-red-400",children:a}),P.jsx("button",{type:"submit",disabled:u,className:"w-full text-white font-mono text-sm rounded-xl py-3 mt-1 transition-opacity hover:opacity-90 disabled:opacity-50 flex items-center justify-center gap-2",style:{background:"linear-gradient(135deg, #D83333 0%, #E43A9C 55%, #F041FF 100%)"},children:u?P.jsxs(P.Fragment,{children:[P.jsx("span",{className:"w-3.5 h-3.5 border-2 border-white/30 border-t-white rounded-full animate-spin"}),"Authenticating…"]}):"Sign In"})]}),P.jsx("p",{className:"text-center text-[11px] text-zinc-700 font-mono mt-4",children:"Secured by Supabase Auth"})]})]})}function aq(){const[t,e]=N.useState([]),[r,n]=N.useState("all"),[i,a]=N.useState(!1),[s,u]=N.useState({name:"",cron:"",prompt:"",targetType:"orchestrator"});N.useEffect(()=>{c()},[]);function c(){kt.get("/schedules").then(v=>e(v.schedules)).catch(()=>{})}const f=t.filter(v=>r==="all"||v.targetType===r);async function p(){if(!(!s.name||!s.cron||!s.prompt))try{await kt.post("/schedules",s),Vt.success(`Schedule "${s.name}" created`),a(!1),u({name:"",cron:"",prompt:"",targetType:"orchestrator"}),c()}catch(v){Vt.error(v instanceof Error?v.message:"Failed to create")}}async function h(v,y){try{await kt.patch(`/schedules/${v}`,{enabled:!y}),c()}catch{Vt.error("Failed to toggle schedule")}}async function g(v){try{await kt.delete(`/schedules/${v}`),Vt.success("Schedule deleted"),c()}catch{Vt.error("Failed to delete")}}return P.jsxs("div",{className:"flex-1 overflow-y-auto p-6",children:[P.jsxs("div",{className:"flex items-center justify-between mb-6",children:[P.jsxs("div",{children:[P.jsx("h2",{className:"text-2xl tracking-wide text-zinc-100",style:{fontFamily:"'Bebas Neue', sans-serif"},children:"Schedules"}),P.jsxs("p",{className:"text-[11px] text-zinc-600 font-mono mt-0.5",children:[t.length," automated tasks · ",t.filter(v=>v.enabled).length," ","active"]})]}),P.jsxs(Ka,{onClick:()=>a(!0),className:"px-3 py-1.5",children:[P.jsx(hh,{className:"w-3.5 h-3.5"})," New Schedule"]})]}),P.jsx("div",{className:"flex gap-1 mb-5 p-1 rounded-xl bg-white/[0.03] border border-white/[0.07] w-fit",children:["all","orchestrator","squad"].map(v=>P.jsx("button",{type:"button",onClick:()=>n(v),className:`px-3 py-1.5 rounded-lg text-[11px] font-mono transition-colors ${r===v?"bg-white/10 text-zinc-200":"text-zinc-600 hover:text-zinc-400"}`,children:v==="all"?"All":v==="orchestrator"?"IO":"Squad"},v))}),i&&P.jsxs("div",{className:"glass-card border border-white/[0.07] rounded-2xl p-5 mb-5",children:[P.jsx("h3",{className:"text-base tracking-wide text-zinc-200 mb-3",style:{fontFamily:"'Bebas Neue', sans-serif"},children:"New Schedule"}),P.jsxs("div",{className:"space-y-3",children:[P.jsx("input",{type:"text",placeholder:"Name",value:s.name,onChange:v=>u({...s,name:v.target.value}),className:"w-full px-3 py-2 rounded-xl bg-white/[0.04] border border-white/[0.07] text-sm font-mono text-zinc-300 outline-none focus:border-[#E43A9C]/50"}),P.jsx("input",{type:"text",placeholder:"Cron expression (e.g. 0 9 * * 1-5)",value:s.cron,onChange:v=>u({...s,cron:v.target.value}),className:"w-full px-3 py-2 rounded-xl bg-white/[0.04] border border-white/[0.07] text-sm font-mono text-zinc-300 outline-none focus:border-[#E43A9C]/50"}),P.jsx("textarea",{placeholder:"Prompt to execute",value:s.prompt,onChange:v=>u({...s,prompt:v.target.value}),rows:3,className:"w-full px-3 py-2 rounded-xl bg-white/[0.04] border border-white/[0.07] text-sm font-mono text-zinc-300 outline-none focus:border-[#E43A9C]/50 resize-none"}),P.jsxs("div",{className:"flex gap-2",children:[P.jsx(Ka,{onClick:p,className:"px-3 py-1.5",children:"Create"}),P.jsx(Zf,{onClick:()=>a(!1),className:"px-3 py-1.5",children:"Cancel"})]})]})]}),P.jsx("div",{className:"space-y-2",children:f.map(v=>P.jsxs("div",{className:"glass-card border border-white/[0.07] rounded-2xl p-4 flex items-center gap-4 group",children:[P.jsx("div",{className:`w-8 h-8 rounded-xl flex items-center justify-center flex-shrink-0 ${v.enabled?"bg-[#E43A9C]/10":"bg-white/[0.04]"}`,children:P.jsx(lb,{size:14,className:v.enabled?"text-[#E43A9C]":"text-zinc-600"})}),P.jsxs("div",{className:"flex-1 min-w-0",children:[P.jsxs("div",{className:"flex items-center gap-2",children:[P.jsx("span",{className:"text-sm font-mono text-zinc-200",children:v.name}),P.jsx(ui,{variant:v.targetType==="orchestrator"?"info":"default",children:v.targetType==="orchestrator"?"IO":"Squad"}),!v.enabled&&P.jsx(ui,{variant:"warning",children:"Paused"})]}),P.jsx("p",{className:"text-[11px] text-zinc-600 font-mono mt-0.5",children:v.cron}),P.jsx("p",{className:"text-[11px] text-zinc-700 mt-0.5 truncate max-w-md",children:v.prompt}),v.nextRun&&P.jsxs("p",{className:"text-[10px] text-zinc-700 font-mono mt-1 flex items-center gap-1",children:[P.jsx(p5,{size:10})," Next: ",new Date(v.nextRun).toLocaleString()]})]}),P.jsxs("div",{className:"flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity",children:[P.jsx("button",{type:"button",onClick:()=>h(v.id,v.enabled),className:`p-1.5 rounded-lg transition-colors ${v.enabled?"text-emerald-400 hover:bg-emerald-400/10":"text-zinc-600 hover:bg-white/[0.04]"}`,title:v.enabled?"Pause":"Resume",children:v.enabled?P.jsx(W5,{size:13}):P.jsx(V5,{size:13})}),P.jsx("button",{type:"button",onClick:()=>g(v.id),className:"p-1.5 rounded-lg text-zinc-600 hover:text-red-400 hover:bg-red-400/10 transition-colors",children:P.jsx(ix,{size:13})})]})]},v.id))}),f.length===0&&P.jsxs("div",{className:"text-center py-12",children:[P.jsx(lb,{size:48,className:"mx-auto mb-3 text-zinc-800"}),P.jsx("p",{className:"text-[11px] font-mono text-zinc-700",children:"No schedules. Click New Schedule to create one."})]})]})}function oq(){const[t,e]=N.useState(null),[r,n]=N.useState("general"),[i,a]=N.useState(!1);N.useEffect(()=>{kt.get("/config").then(f=>e(f.config)).catch(()=>{})},[]);function s(f){t&&(e({...t,...f}),a(!0))}async function u(){if(t)try{const{dataDir:f,...p}=t;await kt.patch("/config",p),Vt.success("Settings saved"),a(!1)}catch{Vt.error("Failed to save settings")}}if(!t)return P.jsx("div",{className:"h-full flex items-center justify-center text-zinc-600",children:"Loading..."});const c=[{id:"general",label:"General"},{id:"telegram",label:"Telegram"},{id:"auth",label:"Auth"},{id:"models",label:"Models"},{id:"advanced",label:"Advanced"}];return P.jsxs("div",{className:"flex-1 overflow-y-auto p-6",children:[P.jsxs("div",{className:"flex items-center justify-between mb-6",children:[P.jsxs("div",{children:[P.jsx("h2",{className:"text-2xl tracking-wide text-zinc-100",style:{fontFamily:"'Bebas Neue', sans-serif"},children:"Settings"}),P.jsx("p",{className:"text-[11px] text-zinc-600 font-mono mt-0.5",children:"Configure IO daemon behavior"})]}),i&&P.jsxs(Ka,{onClick:u,className:"px-3 py-1.5",children:[P.jsx(Dj,{className:"w-3.5 h-3.5"})," Save Changes"]})]}),P.jsx("div",{className:"flex gap-1 mb-6 p-1 rounded-xl bg-white/[0.03] border border-white/[0.07] w-fit",children:c.map(f=>P.jsx("button",{type:"button",onClick:()=>n(f.id),className:`px-4 py-1.5 rounded-lg text-[11px] font-mono transition-colors ${r===f.id?"bg-white/10 text-zinc-200":"text-zinc-600 hover:text-zinc-400"}`,children:f.label},f.id))}),P.jsxs("div",{className:"glass-card border border-white/[0.07] rounded-2xl p-6 max-w-2xl",children:[r==="general"&&P.jsxs("div",{className:"space-y-5",children:[P.jsx(hn,{label:"Log Level",children:P.jsx("select",{value:t.logLevel,onChange:f=>s({logLevel:f.target.value}),className:"w-full px-3 py-2 rounded-xl bg-white/[0.04] border border-white/[0.07] text-sm font-mono text-zinc-300 outline-none focus:border-[#E43A9C]/50",children:["trace","debug","info","warn","error","fatal"].map(f=>P.jsx("option",{value:f,children:f},f))})}),P.jsx(hn,{label:"Default Model",children:P.jsx("input",{type:"text",value:t.defaultModel,onChange:f=>s({defaultModel:f.target.value}),className:"w-full px-3 py-2 rounded-xl bg-white/[0.04] border border-white/[0.07] text-sm font-mono text-zinc-300 outline-none focus:border-[#E43A9C]/50"})}),P.jsx(hn,{label:"Max Instances Per Squad",children:P.jsx("input",{type:"number",value:t.maxInstancesPerSquad,onChange:f=>s({maxInstancesPerSquad:Number(f.target.value)}),className:"w-full px-3 py-2 rounded-xl bg-white/[0.04] border border-white/[0.07] text-sm font-mono text-zinc-300 outline-none focus:border-[#E43A9C]/50",min:1,max:10})}),P.jsx(hn,{label:"API Port",children:P.jsx("input",{type:"number",value:t.apiPort,onChange:f=>s({apiPort:Number(f.target.value)}),className:"w-full px-3 py-2 rounded-xl bg-white/[0.04] border border-white/[0.07] text-sm font-mono text-zinc-300 outline-none focus:border-[#E43A9C]/50"})})]}),r==="telegram"&&P.jsxs("div",{className:"space-y-5",children:[P.jsx(hn,{label:"Bot Token",children:P.jsx(tg,{value:t.telegram.botToken??"",onChange:f=>s({telegram:{...t.telegram,botToken:f||null}}),placeholder:"Enter Telegram bot token"})}),P.jsx(hn,{label:"Allowed Chat IDs (comma-separated)",children:P.jsx("input",{type:"text",value:t.telegram.allowedChatIds.join(", "),onChange:f=>s({telegram:{...t.telegram,allowedChatIds:f.target.value.split(",").map(p=>Number(p.trim())).filter(p=>!Number.isNaN(p))}}),className:"w-full px-3 py-2 rounded-xl bg-white/[0.04] border border-white/[0.07] text-sm font-mono text-zinc-300 outline-none focus:border-[#E43A9C]/50"})})]}),r==="auth"&&P.jsxs("div",{className:"space-y-5",children:[P.jsx(hn,{label:"Supabase Project URL",children:P.jsx("input",{type:"text",value:t.supabase.projectUrl??"",onChange:f=>s({supabase:{...t.supabase,projectUrl:f.target.value||null}}),placeholder:"https://your-project.supabase.co",className:"w-full px-3 py-2 rounded-xl bg-white/[0.04] border border-white/[0.07] text-sm font-mono text-zinc-300 outline-none focus:border-[#E43A9C]/50"})}),P.jsx(hn,{label:"Supabase Anon Key",children:P.jsx(tg,{value:t.supabase.anonKey??"",onChange:f=>s({supabase:{...t.supabase,anonKey:f||null}}),placeholder:"eyJhbGciOiJIUzI1NiIs..."})}),P.jsx(hn,{label:"JWT Secret",children:P.jsx(tg,{value:t.supabase.jwtSecret??"",onChange:f=>s({supabase:{...t.supabase,jwtSecret:f||null}}),placeholder:"your-jwt-secret"})}),P.jsx("p",{className:"text-[11px] text-zinc-600 font-mono leading-relaxed",children:"When configured, the web dashboard requires Supabase authentication to access. The JWT Secret is used to verify tokens server-side — find it in Supabase project settings → API → JWT Settings."})]}),r==="models"&&P.jsxs("div",{className:"space-y-5",children:[P.jsx(hn,{label:"Pricing Refresh Interval (hours)",children:P.jsx("input",{type:"number",value:t.pricing.refreshIntervalHours,onChange:f=>s({pricing:{refreshIntervalHours:Number(f.target.value)}}),className:"w-full px-3 py-2 rounded-xl bg-white/[0.04] border border-white/[0.07] text-sm font-mono text-zinc-300 outline-none focus:border-[#E43A9C]/50",min:1})}),P.jsx("p",{className:"text-[11px] text-zinc-600 font-mono leading-relaxed",children:"Model pricing is auto-refreshed from GitHub docs at this interval."})]}),r==="advanced"&&P.jsx("div",{className:"space-y-5",children:P.jsxs(hn,{label:"Data Directory",children:[P.jsx("input",{type:"text",value:t.dataDir,disabled:!0,className:"w-full px-3 py-2 rounded-xl bg-white/[0.04] border border-white/[0.07] text-sm font-mono text-zinc-500 outline-none cursor-not-allowed"}),P.jsx("p",{className:"text-[11px] text-zinc-700 font-mono mt-1",children:"Cannot be changed while daemon is running."})]})})]})]})}function hn({label:t,children:e}){return P.jsxs("div",{children:[P.jsx("label",{className:"block text-[11px] font-mono text-zinc-400 mb-1.5",children:t}),e]})}function tg({value:t,onChange:e,placeholder:r}){const[n,i]=N.useState(!1);return P.jsxs("div",{className:"relative",children:[P.jsx("input",{type:n?"text":"password",value:t,onChange:a=>e(a.target.value),placeholder:r,className:"w-full px-3 py-2 pr-9 rounded-xl bg-white/[0.04] border border-white/[0.07] text-sm font-mono text-zinc-300 outline-none focus:border-[#E43A9C]/50"}),P.jsx("button",{type:"button",onClick:()=>i(!n),className:"absolute right-2.5 top-1/2 -translate-y-1/2 text-zinc-600 hover:text-zinc-400 transition-colors",children:n?P.jsx(S5,{size:14}):P.jsx(O5,{size:14})})]})}function sq(){const[t,e]=N.useState([]),[r,n]=N.useState(!1),[i,a]=N.useState(""),[s,u]=N.useState(""),[c,f]=N.useState("");N.useEffect(()=>{p()},[]);function p(){kt.get("/skills").then(y=>e(y.skills)).catch(()=>{})}async function h(){if(!(!s.trim()||!i.trim()))try{await kt.post("/skills/install",{name:s,url:i}),Vt.success(`Skill "${s}" installed`),n(!1),a(""),u(""),p()}catch(y){Vt.error(y instanceof Error?y.message:"Install failed")}}async function g(y){try{await kt.delete(`/skills/${y}`),Vt.success(`Skill "${y}" removed`),p()}catch{Vt.error("Failed to remove skill")}}const v=t.filter(y=>!c||y.name.toLowerCase().includes(c.toLowerCase()));return P.jsxs("div",{className:"flex-1 overflow-y-auto p-6",children:[P.jsxs("div",{className:"flex items-center justify-between mb-6",children:[P.jsxs("div",{children:[P.jsx("h2",{className:"text-2xl tracking-wide text-zinc-100",style:{fontFamily:"'Bebas Neue', sans-serif"},children:"Skills"}),P.jsxs("p",{className:"text-[11px] text-zinc-600 font-mono mt-0.5",children:[t.length," installed capabilities"]})]}),P.jsxs(Ka,{onClick:()=>n(!0),className:"px-3 py-1.5",children:[P.jsx(hh,{className:"w-3.5 h-3.5"})," Install"]})]}),P.jsxs("div",{className:"relative mb-4 max-w-sm",children:[P.jsx(Bj,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-3.5 h-3.5 text-zinc-600"}),P.jsx("input",{type:"text",value:c,onChange:y=>f(y.target.value),placeholder:"Search skills...",className:"w-full pl-9 pr-3 py-2 rounded-xl bg-white/[0.04] border border-white/[0.07] text-[11px] font-mono text-zinc-300 placeholder:text-zinc-700 outline-none focus:border-[#E43A9C]/50"})]}),r&&P.jsxs("div",{className:"glass-card border border-white/[0.07] rounded-2xl p-5 mb-5",children:[P.jsx("h3",{className:"text-base tracking-wide text-zinc-200 mb-3",style:{fontFamily:"'Bebas Neue', sans-serif"},children:"Install Skill"}),P.jsxs("div",{className:"space-y-3",children:[P.jsx("input",{type:"text",placeholder:"Skill name",value:s,onChange:y=>u(y.target.value),className:"w-full px-3 py-2 rounded-xl bg-white/[0.04] border border-white/[0.07] text-sm font-mono text-zinc-300 outline-none focus:border-[#E43A9C]/50"}),P.jsx("input",{type:"text",placeholder:"URL to SKILL.md",value:i,onChange:y=>a(y.target.value),className:"w-full px-3 py-2 rounded-xl bg-white/[0.04] border border-white/[0.07] text-sm font-mono text-zinc-300 outline-none focus:border-[#E43A9C]/50"}),P.jsxs("div",{className:"flex gap-2",children:[P.jsx(Ka,{onClick:h,className:"px-3 py-1.5",children:"Install"}),P.jsx(Zf,{onClick:()=>n(!1),className:"px-3 py-1.5",children:"Cancel"})]})]})]}),P.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-3",children:v.map(y=>P.jsxs("div",{className:"glass-card border border-white/[0.07] rounded-2xl p-4 group",children:[P.jsxs("div",{className:"flex items-start justify-between",children:[P.jsxs("div",{className:"flex items-center gap-2",children:[P.jsx("div",{className:"w-7 h-7 rounded-lg flex items-center justify-center bg-[#E43A9C]/10",children:P.jsx(ed,{size:14,className:"text-[#E43A9C]"})}),P.jsx("h3",{className:"text-sm font-mono text-zinc-200",children:y.name})]}),P.jsx("button",{type:"button",onClick:()=>g(y.name),className:"opacity-0 group-hover:opacity-100 p-1.5 rounded-lg text-zinc-600 hover:text-red-400 hover:bg-red-400/10 transition-all",children:P.jsx(ix,{size:13})})]}),P.jsx("p",{className:"text-[11px] text-zinc-600 font-mono mt-2.5 line-clamp-3 leading-relaxed",children:y.preview}),y.activatedForOrchestrator&&P.jsx(ui,{variant:"success",className:"mt-2.5",children:"Active"})]},y.name))}),v.length===0&&!r&&P.jsxs("div",{className:"text-center py-12",children:[P.jsx(ed,{size:48,className:"mx-auto mb-3 text-zinc-800"}),P.jsx("p",{className:"text-[11px] font-mono text-zinc-700",children:c?"No skills match your search":"No skills installed. Click Install to add one."})]})]})}const Ob=["#38bdf8","#a78bfa","#34d399","#f59e0b","#f87171","#E43A9C"];function lq(t){return Ob[t%Ob.length]}function nO(){const{name:t}=TL();return t?P.jsx(fq,{name:t}):P.jsx(uq,{})}function uq(){const[t,e]=N.useState([]),r=fh();return N.useEffect(()=>{kt.get("/squads").then(n=>e(n.squads)).catch(()=>{})},[]),P.jsxs("div",{className:"flex-1 overflow-y-auto p-6",children:[P.jsxs("div",{className:"flex items-center justify-between mb-6",children:[P.jsxs("div",{children:[P.jsx("h2",{className:"text-2xl tracking-wide text-zinc-100",style:{fontFamily:"'Bebas Neue', sans-serif"},children:"Squads"}),P.jsxs("p",{className:"text-[11px] text-zinc-600 font-mono mt-0.5",children:[t.length," squads · ",t.reduce((n,i)=>n+(i.activeInstances||0),0)," ","active instances"]})]}),P.jsxs(Ka,{className:"px-3 py-1.5",children:[P.jsx(hh,{className:"w-3.5 h-3.5"}),"New Squad"]})]}),P.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-3",children:[t.map((n,i)=>{const a=lq(i);return P.jsxs("button",{type:"button",onClick:()=>r(`/squads/${n.name}`),className:"text-left rounded-2xl p-5 transition-all group",style:{border:`1px solid ${a}30`,background:`${a}08`,backdropFilter:"blur(20px)"},onMouseEnter:s=>{s.currentTarget.style.borderColor=`${a}70`,s.currentTarget.style.background=`${a}12`},onMouseLeave:s=>{s.currentTarget.style.borderColor=`${a}30`,s.currentTarget.style.background=`${a}08`},children:[P.jsxs("div",{className:"flex items-start justify-between mb-1",children:[P.jsx("h3",{className:"text-sm font-mono transition-colors",style:{color:a},children:n.name}),P.jsx(ui,{variant:Kf(n.status),children:n.status})]}),P.jsxs("div",{className:"flex items-center justify-between mb-3",children:[P.jsx("p",{className:"text-[11px] text-zinc-600 font-mono",children:n.universe}),P.jsxs("span",{className:"text-[11px] text-zinc-600 font-mono flex items-center gap-1",children:[P.jsx(g5,{className:"w-3 h-3"}),n.activeInstances,"/",n.totalInstances||n.memberCount]})]}),n.repoUrl&&P.jsxs("div",{className:"flex items-center gap-1.5 text-[11px] text-zinc-700 font-mono",children:[P.jsx(Mj,{className:"w-3 h-3 flex-shrink-0"}),P.jsx("span",{className:"truncate",children:n.repoUrl.replace("https://github.com/","")})]})]},n.id)}),t.length===0&&P.jsxs("div",{className:"col-span-full text-center py-12 text-zinc-600",children:[P.jsx(zj,{size:48,className:"mx-auto mb-3 opacity-30"}),P.jsx("p",{className:"text-[11px] font-mono",children:"No squads hired yet. Ask IO to hire a squad for a project."})]})]})]})}function cq(t,e){const r="w-4 h-4",n={color:e},i=t.toLowerCase();return i.includes("lead")||i.includes("pm")||i.includes("technical")?P.jsx(y5,{className:r,style:n}):i.includes("qa")||i.includes("test")?P.jsx(i5,{className:r,style:n}):i.includes("scribe")?P.jsx(Y5,{className:r,style:n}):P.jsx(r5,{className:r,style:n})}function fq({name:t}){const[e,r]=N.useState(null),n=fh();if(N.useEffect(()=>{kt.get(`/squads/${t}`).then(r).catch(()=>{})},[t]),!e)return P.jsx("div",{className:"h-full flex items-center justify-center text-zinc-600",children:"Loading..."});const i=Ob[0];return P.jsxs("div",{className:"flex-1 overflow-y-auto p-6",children:[P.jsxs("button",{type:"button",onClick:()=>n("/squads"),className:"flex items-center gap-1.5 text-[11px] text-zinc-600 hover:text-zinc-300 font-mono mb-5 transition-colors",children:[P.jsx(Ij,{className:"w-3.5 h-3.5"})," Back to Squads"]}),P.jsxs("div",{className:"flex items-start justify-between mb-6",children:[P.jsxs("div",{children:[P.jsx("h2",{className:"text-2xl tracking-wide",style:{fontFamily:"'Bebas Neue', sans-serif",color:i},children:e.squad.name}),P.jsxs("p",{className:"text-[11px] text-zinc-600 font-mono mt-0.5",children:[e.squad.universe," · ",e.squad.autonomyTier||"standard"," autonomy"]}),e.squad.repoUrl&&P.jsxs("a",{href:e.squad.repoUrl,target:"_blank",rel:"noreferrer",className:"text-[11px] font-mono text-zinc-700 hover:text-zinc-400 flex items-center gap-1 mt-1 transition-colors",children:[P.jsx(Mj,{className:"w-3 h-3"}),e.squad.repoUrl.replace("https://github.com/","")]})]}),P.jsx(ui,{variant:Kf(e.squad.status),children:e.squad.status})]}),P.jsx("div",{className:"space-y-2 mb-8",children:e.members.map(a=>P.jsxs("div",{className:"glass-card border border-white/[0.07] rounded-2xl p-4 flex items-center gap-3",children:[P.jsx("div",{className:"w-8 h-8 rounded-xl flex items-center justify-center flex-shrink-0",style:{border:`1px solid ${i}30`,background:`${i}12`},children:cq(a.roleName||a.role,i)}),P.jsxs("div",{className:"flex-1 min-w-0",children:[P.jsxs("div",{className:"flex items-center gap-2",children:[P.jsx("span",{className:"text-sm font-mono text-zinc-200",children:a.displayName}),P.jsx(ui,{variant:Kf(a.status),children:a.status})]}),P.jsx("p",{className:"text-[11px] text-zinc-600 font-mono mt-0.5",children:a.role}),a.currentTask&&P.jsx("p",{className:"text-xs text-zinc-500 mt-1 truncate",children:a.currentTask})]})]},a.id))}),e.instances.length>0&&P.jsxs("section",{children:[P.jsx("h3",{className:"text-lg tracking-wide mb-3",style:{fontFamily:"'Bebas Neue', sans-serif",color:i},children:"Instances"}),P.jsx("div",{className:"space-y-2",children:e.instances.map(a=>P.jsxs("div",{className:"glass-card border border-white/[0.07] rounded-2xl p-4",children:[P.jsxs("div",{className:"flex items-center justify-between",children:[P.jsx("span",{className:"text-[11px] font-mono text-zinc-400",children:a.id.slice(0,8)}),P.jsx(ui,{variant:Kf(a.status),children:a.status})]}),P.jsxs("div",{className:"mt-2 text-[11px] text-zinc-600 font-mono flex gap-4",children:[P.jsxs("span",{children:["Tasks: ",a.tasksComplete,"/",a.taskCount]}),a.branch&&P.jsxs("span",{children:["Branch: ",a.branch]})]})]},a.id))})]})]})}var rg,iO;function Or(){if(iO)return rg;iO=1;var t=Array.isArray;return rg=t,rg}var ng,aO;function wR(){if(aO)return ng;aO=1;var t=typeof hf=="object"&&hf&&hf.Object===Object&&hf;return ng=t,ng}var ig,oO;function Wn(){if(oO)return ig;oO=1;var t=wR(),e=typeof self=="object"&&self&&self.Object===Object&&self,r=t||e||Function("return this")();return ig=r,ig}var ag,sO;function Ju(){if(sO)return ag;sO=1;var t=Wn(),e=t.Symbol;return ag=e,ag}var og,lO;function dq(){if(lO)return og;lO=1;var t=Ju(),e=Object.prototype,r=e.hasOwnProperty,n=e.toString,i=t?t.toStringTag:void 0;function a(s){var u=r.call(s,i),c=s[i];try{s[i]=void 0;var f=!0}catch{}var p=n.call(s);return f&&(u?s[i]=c:delete s[i]),p}return og=a,og}var sg,uO;function hq(){if(uO)return sg;uO=1;var t=Object.prototype,e=t.toString;function r(n){return e.call(n)}return sg=r,sg}var lg,cO;function bi(){if(cO)return lg;cO=1;var t=Ju(),e=dq(),r=hq(),n="[object Null]",i="[object Undefined]",a=t?t.toStringTag:void 0;function s(u){return u==null?u===void 0?i:n:a&&a in Object(u)?e(u):r(u)}return lg=s,lg}var ug,fO;function wi(){if(fO)return ug;fO=1;function t(e){return e!=null&&typeof e=="object"}return ug=t,ug}var cg,dO;function Ms(){if(dO)return cg;dO=1;var t=bi(),e=wi(),r="[object Symbol]";function n(i){return typeof i=="symbol"||e(i)&&t(i)==r}return cg=n,cg}var fg,hO;function vx(){if(hO)return fg;hO=1;var t=Or(),e=Ms(),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,n=/^\w*$/;function i(a,s){if(t(a))return!1;var u=typeof a;return u=="number"||u=="symbol"||u=="boolean"||a==null||e(a)?!0:n.test(a)||!r.test(a)||s!=null&&a in Object(s)}return fg=i,fg}var dg,pO;function ia(){if(pO)return dg;pO=1;function t(e){var r=typeof e;return e!=null&&(r=="object"||r=="function")}return dg=t,dg}var hg,mO;function yx(){if(mO)return hg;mO=1;var t=bi(),e=ia(),r="[object AsyncFunction]",n="[object Function]",i="[object GeneratorFunction]",a="[object Proxy]";function s(u){if(!e(u))return!1;var c=t(u);return c==n||c==i||c==r||c==a}return hg=s,hg}var pg,gO;function pq(){if(gO)return pg;gO=1;var t=Wn(),e=t["__core-js_shared__"];return pg=e,pg}var mg,vO;function mq(){if(vO)return mg;vO=1;var t=pq(),e=(function(){var n=/[^.]+$/.exec(t&&t.keys&&t.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""})();function r(n){return!!e&&e in n}return mg=r,mg}var gg,yO;function xR(){if(yO)return gg;yO=1;var t=Function.prototype,e=t.toString;function r(n){if(n!=null){try{return e.call(n)}catch{}try{return n+""}catch{}}return""}return gg=r,gg}var vg,bO;function gq(){if(bO)return vg;bO=1;var t=yx(),e=mq(),r=ia(),n=xR(),i=/[\\^$.*+?()[\]{}|]/g,a=/^\[object .+?Constructor\]$/,s=Function.prototype,u=Object.prototype,c=s.toString,f=u.hasOwnProperty,p=RegExp("^"+c.call(f).replace(i,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function h(g){if(!r(g)||e(g))return!1;var v=t(g)?p:a;return v.test(n(g))}return vg=h,vg}var yg,wO;function vq(){if(wO)return yg;wO=1;function t(e,r){return e==null?void 0:e[r]}return yg=t,yg}var bg,xO;function ro(){if(xO)return bg;xO=1;var t=gq(),e=vq();function r(n,i){var a=e(n,i);return t(a)?a:void 0}return bg=r,bg}var wg,_O;function wh(){if(_O)return wg;_O=1;var t=ro(),e=t(Object,"create");return wg=e,wg}var xg,SO;function yq(){if(SO)return xg;SO=1;var t=wh();function e(){this.__data__=t?t(null):{},this.size=0}return xg=e,xg}var _g,kO;function bq(){if(kO)return _g;kO=1;function t(e){var r=this.has(e)&&delete this.__data__[e];return this.size-=r?1:0,r}return _g=t,_g}var Sg,OO;function wq(){if(OO)return Sg;OO=1;var t=wh(),e="__lodash_hash_undefined__",r=Object.prototype,n=r.hasOwnProperty;function i(a){var s=this.__data__;if(t){var u=s[a];return u===e?void 0:u}return n.call(s,a)?s[a]:void 0}return Sg=i,Sg}var kg,EO;function xq(){if(EO)return kg;EO=1;var t=wh(),e=Object.prototype,r=e.hasOwnProperty;function n(i){var a=this.__data__;return t?a[i]!==void 0:r.call(a,i)}return kg=n,kg}var Og,AO;function _q(){if(AO)return Og;AO=1;var t=wh(),e="__lodash_hash_undefined__";function r(n,i){var a=this.__data__;return this.size+=this.has(n)?0:1,a[n]=t&&i===void 0?e:i,this}return Og=r,Og}var Eg,PO;function Sq(){if(PO)return Eg;PO=1;var t=yq(),e=bq(),r=wq(),n=xq(),i=_q();function a(s){var u=-1,c=s==null?0:s.length;for(this.clear();++u<c;){var f=s[u];this.set(f[0],f[1])}}return a.prototype.clear=t,a.prototype.delete=e,a.prototype.get=r,a.prototype.has=n,a.prototype.set=i,Eg=a,Eg}var Ag,TO;function kq(){if(TO)return Ag;TO=1;function t(){this.__data__=[],this.size=0}return Ag=t,Ag}var Pg,CO;function bx(){if(CO)return Pg;CO=1;function t(e,r){return e===r||e!==e&&r!==r}return Pg=t,Pg}var Tg,jO;function xh(){if(jO)return Tg;jO=1;var t=bx();function e(r,n){for(var i=r.length;i--;)if(t(r[i][0],n))return i;return-1}return Tg=e,Tg}var Cg,RO;function Oq(){if(RO)return Cg;RO=1;var t=xh(),e=Array.prototype,r=e.splice;function n(i){var a=this.__data__,s=t(a,i);if(s<0)return!1;var u=a.length-1;return s==u?a.pop():r.call(a,s,1),--this.size,!0}return Cg=n,Cg}var jg,NO;function Eq(){if(NO)return jg;NO=1;var t=xh();function e(r){var n=this.__data__,i=t(n,r);return i<0?void 0:n[i][1]}return jg=e,jg}var Rg,$O;function Aq(){if($O)return Rg;$O=1;var t=xh();function e(r){return t(this.__data__,r)>-1}return Rg=e,Rg}var Ng,IO;function Pq(){if(IO)return Ng;IO=1;var t=xh();function e(r,n){var i=this.__data__,a=t(i,r);return a<0?(++this.size,i.push([r,n])):i[a][1]=n,this}return Ng=e,Ng}var $g,MO;function _h(){if(MO)return $g;MO=1;var t=kq(),e=Oq(),r=Eq(),n=Aq(),i=Pq();function a(s){var u=-1,c=s==null?0:s.length;for(this.clear();++u<c;){var f=s[u];this.set(f[0],f[1])}}return a.prototype.clear=t,a.prototype.delete=e,a.prototype.get=r,a.prototype.has=n,a.prototype.set=i,$g=a,$g}var Ig,LO;function wx(){if(LO)return Ig;LO=1;var t=ro(),e=Wn(),r=t(e,"Map");return Ig=r,Ig}var Mg,DO;function Tq(){if(DO)return Mg;DO=1;var t=Sq(),e=_h(),r=wx();function n(){this.size=0,this.__data__={hash:new t,map:new(r||e),string:new t}}return Mg=n,Mg}var Lg,BO;function Cq(){if(BO)return Lg;BO=1;function t(e){var r=typeof e;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?e!=="__proto__":e===null}return Lg=t,Lg}var Dg,zO;function Sh(){if(zO)return Dg;zO=1;var t=Cq();function e(r,n){var i=r.__data__;return t(n)?i[typeof n=="string"?"string":"hash"]:i.map}return Dg=e,Dg}var Bg,qO;function jq(){if(qO)return Bg;qO=1;var t=Sh();function e(r){var n=t(this,r).delete(r);return this.size-=n?1:0,n}return Bg=e,Bg}var zg,UO;function Rq(){if(UO)return zg;UO=1;var t=Sh();function e(r){return t(this,r).get(r)}return zg=e,zg}var qg,FO;function Nq(){if(FO)return qg;FO=1;var t=Sh();function e(r){return t(this,r).has(r)}return qg=e,qg}var Ug,WO;function $q(){if(WO)return Ug;WO=1;var t=Sh();function e(r,n){var i=t(this,r),a=i.size;return i.set(r,n),this.size+=i.size==a?0:1,this}return Ug=e,Ug}var Fg,HO;function xx(){if(HO)return Fg;HO=1;var t=Tq(),e=jq(),r=Rq(),n=Nq(),i=$q();function a(s){var u=-1,c=s==null?0:s.length;for(this.clear();++u<c;){var f=s[u];this.set(f[0],f[1])}}return a.prototype.clear=t,a.prototype.delete=e,a.prototype.get=r,a.prototype.has=n,a.prototype.set=i,Fg=a,Fg}var Wg,VO;function _R(){if(VO)return Wg;VO=1;var t=xx(),e="Expected a function";function r(n,i){if(typeof n!="function"||i!=null&&typeof i!="function")throw new TypeError(e);var a=function(){var s=arguments,u=i?i.apply(this,s):s[0],c=a.cache;if(c.has(u))return c.get(u);var f=n.apply(this,s);return a.cache=c.set(u,f)||c,f};return a.cache=new(r.Cache||t),a}return r.Cache=t,Wg=r,Wg}var Hg,KO;function Iq(){if(KO)return Hg;KO=1;var t=_R(),e=500;function r(n){var i=t(n,function(s){return a.size===e&&a.clear(),s}),a=i.cache;return i}return Hg=r,Hg}var Vg,GO;function Mq(){if(GO)return Vg;GO=1;var t=Iq(),e=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,r=/\\(\\)?/g,n=t(function(i){var a=[];return i.charCodeAt(0)===46&&a.push(""),i.replace(e,function(s,u,c,f){a.push(c?f.replace(r,"$1"):u||s)}),a});return Vg=n,Vg}var Kg,XO;function _x(){if(XO)return Kg;XO=1;function t(e,r){for(var n=-1,i=e==null?0:e.length,a=Array(i);++n<i;)a[n]=r(e[n],n,e);return a}return Kg=t,Kg}var Gg,YO;function Lq(){if(YO)return Gg;YO=1;var t=Ju(),e=_x(),r=Or(),n=Ms(),i=t?t.prototype:void 0,a=i?i.toString:void 0;function s(u){if(typeof u=="string")return u;if(r(u))return e(u,s)+"";if(n(u))return a?a.call(u):"";var c=u+"";return c=="0"&&1/u==-1/0?"-0":c}return Gg=s,Gg}var Xg,JO;function SR(){if(JO)return Xg;JO=1;var t=Lq();function e(r){return r==null?"":t(r)}return Xg=e,Xg}var Yg,QO;function kR(){if(QO)return Yg;QO=1;var t=Or(),e=vx(),r=Mq(),n=SR();function i(a,s){return t(a)?a:e(a,s)?[a]:r(n(a))}return Yg=i,Yg}var Jg,ZO;function kh(){if(ZO)return Jg;ZO=1;var t=Ms();function e(r){if(typeof r=="string"||t(r))return r;var n=r+"";return n=="0"&&1/r==-1/0?"-0":n}return Jg=e,Jg}var Qg,eE;function Sx(){if(eE)return Qg;eE=1;var t=kR(),e=kh();function r(n,i){i=t(i,n);for(var a=0,s=i.length;n!=null&&a<s;)n=n[e(i[a++])];return a&&a==s?n:void 0}return Qg=r,Qg}var Zg,tE;function OR(){if(tE)return Zg;tE=1;var t=Sx();function e(r,n,i){var a=r==null?void 0:t(r,n);return a===void 0?i:a}return Zg=e,Zg}var Dq=OR();const Mr=Je(Dq);var ev,rE;function Bq(){if(rE)return ev;rE=1;function t(e){return e==null}return ev=t,ev}var zq=Bq();const Me=Je(zq);var tv,nE;function qq(){if(nE)return tv;nE=1;var t=bi(),e=Or(),r=wi(),n="[object String]";function i(a){return typeof a=="string"||!e(a)&&r(a)&&t(a)==n}return tv=i,tv}var Uq=qq();const Xa=Je(Uq);var Fq=yx();const $e=Je(Fq);var Wq=ia();const Ls=Je(Wq);var rv={exports:{}},Ge={};/**
|
|
368
|
-
* @license React
|
|
369
|
-
* react-is.production.min.js
|
|
370
|
-
*
|
|
371
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
372
|
-
*
|
|
373
|
-
* This source code is licensed under the MIT license found in the
|
|
374
|
-
* LICENSE file in the root directory of this source tree.
|
|
375
|
-
*/var iE;function Hq(){if(iE)return Ge;iE=1;var t=Symbol.for("react.element"),e=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),s=Symbol.for("react.context"),u=Symbol.for("react.server_context"),c=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),p=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),v=Symbol.for("react.offscreen"),y;y=Symbol.for("react.module.reference");function x(b){if(typeof b=="object"&&b!==null){var S=b.$$typeof;switch(S){case t:switch(b=b.type,b){case r:case i:case n:case f:case p:return b;default:switch(b=b&&b.$$typeof,b){case u:case s:case c:case g:case h:case a:return b;default:return S}}case e:return S}}}return Ge.ContextConsumer=s,Ge.ContextProvider=a,Ge.Element=t,Ge.ForwardRef=c,Ge.Fragment=r,Ge.Lazy=g,Ge.Memo=h,Ge.Portal=e,Ge.Profiler=i,Ge.StrictMode=n,Ge.Suspense=f,Ge.SuspenseList=p,Ge.isAsyncMode=function(){return!1},Ge.isConcurrentMode=function(){return!1},Ge.isContextConsumer=function(b){return x(b)===s},Ge.isContextProvider=function(b){return x(b)===a},Ge.isElement=function(b){return typeof b=="object"&&b!==null&&b.$$typeof===t},Ge.isForwardRef=function(b){return x(b)===c},Ge.isFragment=function(b){return x(b)===r},Ge.isLazy=function(b){return x(b)===g},Ge.isMemo=function(b){return x(b)===h},Ge.isPortal=function(b){return x(b)===e},Ge.isProfiler=function(b){return x(b)===i},Ge.isStrictMode=function(b){return x(b)===n},Ge.isSuspense=function(b){return x(b)===f},Ge.isSuspenseList=function(b){return x(b)===p},Ge.isValidElementType=function(b){return typeof b=="string"||typeof b=="function"||b===r||b===i||b===n||b===f||b===p||b===v||typeof b=="object"&&b!==null&&(b.$$typeof===g||b.$$typeof===h||b.$$typeof===a||b.$$typeof===s||b.$$typeof===c||b.$$typeof===y||b.getModuleId!==void 0)},Ge.typeOf=x,Ge}var aE;function Vq(){return aE||(aE=1,rv.exports=Hq()),rv.exports}var Kq=Vq(),nv,oE;function ER(){if(oE)return nv;oE=1;var t=bi(),e=wi(),r="[object Number]";function n(i){return typeof i=="number"||e(i)&&t(i)==r}return nv=n,nv}var iv,sE;function Gq(){if(sE)return iv;sE=1;var t=ER();function e(r){return t(r)&&r!=+r}return iv=e,iv}var Xq=Gq();const Ds=Je(Xq);var Yq=ER();const Jq=Je(Yq);var fr=function(e){return e===0?0:e>0?1:-1},Ba=function(e){return Xa(e)&&e.indexOf("%")===e.length-1},fe=function(e){return Jq(e)&&!Ds(e)},Qq=function(e){return Me(e)},Dt=function(e){return fe(e)||Xa(e)},Zq=0,Bs=function(e){var r=++Zq;return"".concat(e||"").concat(r)},dr=function(e,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(!fe(e)&&!Xa(e))return n;var a;if(Ba(e)){var s=e.indexOf("%");a=r*parseFloat(e.slice(0,s))/100}else a=+e;return Ds(a)&&(a=n),i&&a>r&&(a=r),a},Wo=function(e){if(!e)return null;var r=Object.keys(e);return r&&r.length?e[r[0]]:null},eU=function(e){if(!Array.isArray(e))return!1;for(var r=e.length,n={},i=0;i<r;i++)if(!n[e[i]])n[e[i]]=!0;else return!0;return!1},Sr=function(e,r){return fe(e)&&fe(r)?function(n){return e+n*(r-e)}:function(){return r}};function cd(t,e,r){return!t||!t.length?null:t.find(function(n){return n&&(typeof e=="function"?e(n):Mr(n,e))===r})}var tU=function(e,r){return fe(e)&&fe(r)?e-r:Xa(e)&&Xa(r)?e.localeCompare(r):e instanceof Date&&r instanceof Date?e.getTime()-r.getTime():String(e).localeCompare(String(r))};function Zo(t,e){for(var r in t)if({}.hasOwnProperty.call(t,r)&&(!{}.hasOwnProperty.call(e,r)||t[r]!==e[r]))return!1;for(var n in e)if({}.hasOwnProperty.call(e,n)&&!{}.hasOwnProperty.call(t,n))return!1;return!0}function Eb(t){"@babel/helpers - typeof";return Eb=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Eb(t)}var rU=["viewBox","children"],nU=["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"],lE=["points","pathLength"],av={svg:rU,polygon:lE,polyline:lE},kx=["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","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"],fd=function(e,r){if(!e||typeof e=="function"||typeof e=="boolean")return null;var n=e;if(N.isValidElement(e)&&(n=e.props),!Ls(n))return null;var i={};return Object.keys(n).forEach(function(a){kx.includes(a)&&(i[a]=r||function(s){return n[a](n,s)})}),i},iU=function(e,r,n){return function(i){return e(r,n,i),null}},Ya=function(e,r,n){if(!Ls(e)||Eb(e)!=="object")return null;var i=null;return Object.keys(e).forEach(function(a){var s=e[a];kx.includes(a)&&typeof s=="function"&&(i||(i={}),i[a]=iU(s,r,n))}),i},aU=["children"],oU=["children"];function uE(t,e){if(t==null)return{};var r=sU(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function sU(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}function Ab(t){"@babel/helpers - typeof";return Ab=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ab(t)}var cE={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"},ci=function(e){return typeof e=="string"?e:e?e.displayName||e.name||"Component":""},fE=null,ov=null,Ox=function t(e){if(e===fE&&Array.isArray(ov))return ov;var r=[];return N.Children.forEach(e,function(n){Me(n)||(Kq.isFragment(n)?r=r.concat(t(n.props.children)):r.push(n))}),ov=r,fE=e,r};function tn(t,e){var r=[],n=[];return Array.isArray(e)?n=e.map(function(i){return ci(i)}):n=[ci(e)],Ox(t).forEach(function(i){var a=Mr(i,"type.displayName")||Mr(i,"type.name");n.indexOf(a)!==-1&&r.push(i)}),r}function Nr(t,e){var r=tn(t,e);return r&&r[0]}var dE=function(e){if(!e||!e.props)return!1;var r=e.props,n=r.width,i=r.height;return!(!fe(n)||n<=0||!fe(i)||i<=0)},lU=["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"],uU=function(e){return e&&e.type&&Xa(e.type)&&lU.indexOf(e.type)>=0},cU=function(e){return e&&Ab(e)==="object"&&"clipDot"in e},fU=function(e,r,n,i){var a,s=(a=av==null?void 0:av[i])!==null&&a!==void 0?a:[];return r.startsWith("data-")||!$e(e)&&(i&&s.includes(r)||nU.includes(r))||n&&kx.includes(r)},Ee=function(e,r,n){if(!e||typeof e=="function"||typeof e=="boolean")return null;var i=e;if(N.isValidElement(e)&&(i=e.props),!Ls(i))return null;var a={};return Object.keys(i).forEach(function(s){var u;fU((u=i)===null||u===void 0?void 0:u[s],s,r,n)&&(a[s]=i[s])}),a},Pb=function t(e,r){if(e===r)return!0;var n=N.Children.count(e);if(n!==N.Children.count(r))return!1;if(n===0)return!0;if(n===1)return hE(Array.isArray(e)?e[0]:e,Array.isArray(r)?r[0]:r);for(var i=0;i<n;i++){var a=e[i],s=r[i];if(Array.isArray(a)||Array.isArray(s)){if(!t(a,s))return!1}else if(!hE(a,s))return!1}return!0},hE=function(e,r){if(Me(e)&&Me(r))return!0;if(!Me(e)&&!Me(r)){var n=e.props||{},i=n.children,a=uE(n,aU),s=r.props||{},u=s.children,c=uE(s,oU);return i&&u?Zo(a,c)&&Pb(i,u):!i&&!u?Zo(a,c):!1}return!1},pE=function(e,r){var n=[],i={};return Ox(e).forEach(function(a,s){if(uU(a))n.push(a);else if(a){var u=ci(a.type),c=r[u]||{},f=c.handler,p=c.once;if(f&&(!p||!i[u])){var h=f(a,u,s);n.push(h),i[u]=!0}}}),n},dU=function(e){var r=e&&e.type;return r&&cE[r]?cE[r]:null},hU=function(e,r){return Ox(r).indexOf(e)},pU=["children","width","height","viewBox","className","style","title","desc"];function Tb(){return Tb=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Tb.apply(this,arguments)}function mU(t,e){if(t==null)return{};var r=gU(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function gU(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}function Cb(t){var e=t.children,r=t.width,n=t.height,i=t.viewBox,a=t.className,s=t.style,u=t.title,c=t.desc,f=mU(t,pU),p=i||{width:r,height:n,x:0,y:0},h=Le("recharts-surface",a);return $.createElement("svg",Tb({},Ee(f,!0,"svg"),{className:h,width:r,height:n,style:s,viewBox:"".concat(p.x," ").concat(p.y," ").concat(p.width," ").concat(p.height)}),$.createElement("title",null,u),$.createElement("desc",null,c),e)}var vU=["children","className"];function jb(){return jb=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},jb.apply(this,arguments)}function yU(t,e){if(t==null)return{};var r=bU(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function bU(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}var qe=$.forwardRef(function(t,e){var r=t.children,n=t.className,i=yU(t,vU),a=Le("recharts-layer",n);return $.createElement("g",jb({className:a},Ee(i,!0),{ref:e}),r)}),fi=function(e,r){for(var n=arguments.length,i=new Array(n>2?n-2:0),a=2;a<n;a++)i[a-2]=arguments[a]},sv,mE;function wU(){if(mE)return sv;mE=1;function t(e,r,n){var i=-1,a=e.length;r<0&&(r=-r>a?0:a+r),n=n>a?a:n,n<0&&(n+=a),a=r>n?0:n-r>>>0,r>>>=0;for(var s=Array(a);++i<a;)s[i]=e[i+r];return s}return sv=t,sv}var lv,gE;function xU(){if(gE)return lv;gE=1;var t=wU();function e(r,n,i){var a=r.length;return i=i===void 0?a:i,!n&&i>=a?r:t(r,n,i)}return lv=e,lv}var uv,vE;function AR(){if(vE)return uv;vE=1;var t="\\ud800-\\udfff",e="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",i=e+r+n,a="\\ufe0e\\ufe0f",s="\\u200d",u=RegExp("["+s+t+i+a+"]");function c(f){return u.test(f)}return uv=c,uv}var cv,yE;function _U(){if(yE)return cv;yE=1;function t(e){return e.split("")}return cv=t,cv}var fv,bE;function SU(){if(bE)return fv;bE=1;var t="\\ud800-\\udfff",e="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",i=e+r+n,a="\\ufe0e\\ufe0f",s="["+t+"]",u="["+i+"]",c="\\ud83c[\\udffb-\\udfff]",f="(?:"+u+"|"+c+")",p="[^"+t+"]",h="(?:\\ud83c[\\udde6-\\uddff]){2}",g="[\\ud800-\\udbff][\\udc00-\\udfff]",v="\\u200d",y=f+"?",x="["+a+"]?",b="(?:"+v+"(?:"+[p,h,g].join("|")+")"+x+y+")*",S=x+y+b,O="(?:"+[p+u+"?",u,h,g,s].join("|")+")",k=RegExp(c+"(?="+c+")|"+O+S,"g");function T(E){return E.match(k)||[]}return fv=T,fv}var dv,wE;function kU(){if(wE)return dv;wE=1;var t=_U(),e=AR(),r=SU();function n(i){return e(i)?r(i):t(i)}return dv=n,dv}var hv,xE;function OU(){if(xE)return hv;xE=1;var t=xU(),e=AR(),r=kU(),n=SR();function i(a){return function(s){s=n(s);var u=e(s)?r(s):void 0,c=u?u[0]:s.charAt(0),f=u?t(u,1).join(""):s.slice(1);return c[a]()+f}}return hv=i,hv}var pv,_E;function EU(){if(_E)return pv;_E=1;var t=OU(),e=t("toUpperCase");return pv=e,pv}var AU=EU();const Oh=Je(AU);function it(t){return function(){return t}}const PR=Math.cos,dd=Math.sin,On=Math.sqrt,hd=Math.PI,Eh=2*hd,Rb=Math.PI,Nb=2*Rb,$a=1e-6,PU=Nb-$a;function TR(t){this._+=t[0];for(let e=1,r=t.length;e<r;++e)this._+=arguments[e]+t[e]}function TU(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return TR;const r=10**e;return function(n){this._+=n[0];for(let i=1,a=n.length;i<a;++i)this._+=Math.round(arguments[i]*r)/r+n[i]}}class CU{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=e==null?TR:TU(e)}moveTo(e,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,r){this._append`L${this._x1=+e},${this._y1=+r}`}quadraticCurveTo(e,r,n,i){this._append`Q${+e},${+r},${this._x1=+n},${this._y1=+i}`}bezierCurveTo(e,r,n,i,a,s){this._append`C${+e},${+r},${+n},${+i},${this._x1=+a},${this._y1=+s}`}arcTo(e,r,n,i,a){if(e=+e,r=+r,n=+n,i=+i,a=+a,a<0)throw new Error(`negative radius: ${a}`);let s=this._x1,u=this._y1,c=n-e,f=i-r,p=s-e,h=u-r,g=p*p+h*h;if(this._x1===null)this._append`M${this._x1=e},${this._y1=r}`;else if(g>$a)if(!(Math.abs(h*c-f*p)>$a)||!a)this._append`L${this._x1=e},${this._y1=r}`;else{let v=n-s,y=i-u,x=c*c+f*f,b=v*v+y*y,S=Math.sqrt(x),O=Math.sqrt(g),k=a*Math.tan((Rb-Math.acos((x+g-b)/(2*S*O)))/2),T=k/O,E=k/S;Math.abs(T-1)>$a&&this._append`L${e+T*p},${r+T*h}`,this._append`A${a},${a},0,0,${+(h*v>p*y)},${this._x1=e+E*c},${this._y1=r+E*f}`}}arc(e,r,n,i,a,s){if(e=+e,r=+r,n=+n,s=!!s,n<0)throw new Error(`negative radius: ${n}`);let u=n*Math.cos(i),c=n*Math.sin(i),f=e+u,p=r+c,h=1^s,g=s?i-a:a-i;this._x1===null?this._append`M${f},${p}`:(Math.abs(this._x1-f)>$a||Math.abs(this._y1-p)>$a)&&this._append`L${f},${p}`,n&&(g<0&&(g=g%Nb+Nb),g>PU?this._append`A${n},${n},0,1,${h},${e-u},${r-c}A${n},${n},0,1,${h},${this._x1=f},${this._y1=p}`:g>$a&&this._append`A${n},${n},0,${+(g>=Rb)},${h},${this._x1=e+n*Math.cos(a)},${this._y1=r+n*Math.sin(a)}`)}rect(e,r,n,i){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+r}h${n=+n}v${+i}h${-n}Z`}toString(){return this._}}function Ex(t){let e=3;return t.digits=function(r){if(!arguments.length)return e;if(r==null)e=null;else{const n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);e=n}return t},()=>new CU(e)}function Ax(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function CR(t){this._context=t}CR.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(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e);break}}};function Ah(t){return new CR(t)}function jR(t){return t[0]}function RR(t){return t[1]}function NR(t,e){var r=it(!0),n=null,i=Ah,a=null,s=Ex(u);t=typeof t=="function"?t:t===void 0?jR:it(t),e=typeof e=="function"?e:e===void 0?RR:it(e);function u(c){var f,p=(c=Ax(c)).length,h,g=!1,v;for(n==null&&(a=i(v=s())),f=0;f<=p;++f)!(f<p&&r(h=c[f],f,c))===g&&((g=!g)?a.lineStart():a.lineEnd()),g&&a.point(+t(h,f,c),+e(h,f,c));if(v)return a=null,v+""||null}return u.x=function(c){return arguments.length?(t=typeof c=="function"?c:it(+c),u):t},u.y=function(c){return arguments.length?(e=typeof c=="function"?c:it(+c),u):e},u.defined=function(c){return arguments.length?(r=typeof c=="function"?c:it(!!c),u):r},u.curve=function(c){return arguments.length?(i=c,n!=null&&(a=i(n)),u):i},u.context=function(c){return arguments.length?(c==null?n=a=null:a=i(n=c),u):n},u}function Pf(t,e,r){var n=null,i=it(!0),a=null,s=Ah,u=null,c=Ex(f);t=typeof t=="function"?t:t===void 0?jR:it(+t),e=typeof e=="function"?e:it(e===void 0?0:+e),r=typeof r=="function"?r:r===void 0?RR:it(+r);function f(h){var g,v,y,x=(h=Ax(h)).length,b,S=!1,O,k=new Array(x),T=new Array(x);for(a==null&&(u=s(O=c())),g=0;g<=x;++g){if(!(g<x&&i(b=h[g],g,h))===S)if(S=!S)v=g,u.areaStart(),u.lineStart();else{for(u.lineEnd(),u.lineStart(),y=g-1;y>=v;--y)u.point(k[y],T[y]);u.lineEnd(),u.areaEnd()}S&&(k[g]=+t(b,g,h),T[g]=+e(b,g,h),u.point(n?+n(b,g,h):k[g],r?+r(b,g,h):T[g]))}if(O)return u=null,O+""||null}function p(){return NR().defined(i).curve(s).context(a)}return f.x=function(h){return arguments.length?(t=typeof h=="function"?h:it(+h),n=null,f):t},f.x0=function(h){return arguments.length?(t=typeof h=="function"?h:it(+h),f):t},f.x1=function(h){return arguments.length?(n=h==null?null:typeof h=="function"?h:it(+h),f):n},f.y=function(h){return arguments.length?(e=typeof h=="function"?h:it(+h),r=null,f):e},f.y0=function(h){return arguments.length?(e=typeof h=="function"?h:it(+h),f):e},f.y1=function(h){return arguments.length?(r=h==null?null:typeof h=="function"?h:it(+h),f):r},f.lineX0=f.lineY0=function(){return p().x(t).y(e)},f.lineY1=function(){return p().x(t).y(r)},f.lineX1=function(){return p().x(n).y(e)},f.defined=function(h){return arguments.length?(i=typeof h=="function"?h:it(!!h),f):i},f.curve=function(h){return arguments.length?(s=h,a!=null&&(u=s(a)),f):s},f.context=function(h){return arguments.length?(h==null?a=u=null:u=s(a=h),f):a},f}class $R{constructor(e,r){this._context=e,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(e,r){switch(e=+e,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(e,r):this._context.moveTo(e,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,r,e,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,e,this._y0,e,r);break}}this._x0=e,this._y0=r}}function jU(t){return new $R(t,!0)}function RU(t){return new $R(t,!1)}const Px={draw(t,e){const r=On(e/hd);t.moveTo(r,0),t.arc(0,0,r,0,Eh)}},NU={draw(t,e){const r=On(e/5)/2;t.moveTo(-3*r,-r),t.lineTo(-r,-r),t.lineTo(-r,-3*r),t.lineTo(r,-3*r),t.lineTo(r,-r),t.lineTo(3*r,-r),t.lineTo(3*r,r),t.lineTo(r,r),t.lineTo(r,3*r),t.lineTo(-r,3*r),t.lineTo(-r,r),t.lineTo(-3*r,r),t.closePath()}},IR=On(1/3),$U=IR*2,IU={draw(t,e){const r=On(e/$U),n=r*IR;t.moveTo(0,-r),t.lineTo(n,0),t.lineTo(0,r),t.lineTo(-n,0),t.closePath()}},MU={draw(t,e){const r=On(e),n=-r/2;t.rect(n,n,r,r)}},LU=.8908130915292852,MR=dd(hd/10)/dd(7*hd/10),DU=dd(Eh/10)*MR,BU=-PR(Eh/10)*MR,zU={draw(t,e){const r=On(e*LU),n=DU*r,i=BU*r;t.moveTo(0,-r),t.lineTo(n,i);for(let a=1;a<5;++a){const s=Eh*a/5,u=PR(s),c=dd(s);t.lineTo(c*r,-u*r),t.lineTo(u*n-c*i,c*n+u*i)}t.closePath()}},mv=On(3),qU={draw(t,e){const r=-On(e/(mv*3));t.moveTo(0,r*2),t.lineTo(-mv*r,-r),t.lineTo(mv*r,-r),t.closePath()}},Gr=-.5,Xr=On(3)/2,$b=1/On(12),UU=($b/2+1)*3,FU={draw(t,e){const r=On(e/UU),n=r/2,i=r*$b,a=n,s=r*$b+r,u=-a,c=s;t.moveTo(n,i),t.lineTo(a,s),t.lineTo(u,c),t.lineTo(Gr*n-Xr*i,Xr*n+Gr*i),t.lineTo(Gr*a-Xr*s,Xr*a+Gr*s),t.lineTo(Gr*u-Xr*c,Xr*u+Gr*c),t.lineTo(Gr*n+Xr*i,Gr*i-Xr*n),t.lineTo(Gr*a+Xr*s,Gr*s-Xr*a),t.lineTo(Gr*u+Xr*c,Gr*c-Xr*u),t.closePath()}};function WU(t,e){let r=null,n=Ex(i);t=typeof t=="function"?t:it(t||Px),e=typeof e=="function"?e:it(e===void 0?64:+e);function i(){let a;if(r||(r=a=n()),t.apply(this,arguments).draw(r,+e.apply(this,arguments)),a)return r=null,a+""||null}return i.type=function(a){return arguments.length?(t=typeof a=="function"?a:it(a),i):t},i.size=function(a){return arguments.length?(e=typeof a=="function"?a:it(+a),i):e},i.context=function(a){return arguments.length?(r=a??null,i):r},i}function pd(){}function md(t,e,r){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+r)/6)}function LR(t){this._context=t}LR.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:md(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(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);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:md(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function HU(t){return new LR(t)}function DR(t){this._context=t}DR.prototype={areaStart:pd,areaEnd:pd,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(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:md(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function VU(t){return new DR(t)}function BR(t){this._context=t}BR.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(t,e){switch(t=+t,e=+e,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+t)/6,n=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:md(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function KU(t){return new BR(t)}function zR(t){this._context=t}zR.prototype={areaStart:pd,areaEnd:pd,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}};function GU(t){return new zR(t)}function SE(t){return t<0?-1:1}function kE(t,e,r){var n=t._x1-t._x0,i=e-t._x1,a=(t._y1-t._y0)/(n||i<0&&-0),s=(r-t._y1)/(i||n<0&&-0),u=(a*i+s*n)/(n+i);return(SE(a)+SE(s))*Math.min(Math.abs(a),Math.abs(s),.5*Math.abs(u))||0}function OE(t,e){var r=t._x1-t._x0;return r?(3*(t._y1-t._y0)/r-e)/2:e}function gv(t,e,r){var n=t._x0,i=t._y0,a=t._x1,s=t._y1,u=(a-n)/3;t._context.bezierCurveTo(n+u,i+u*e,a-u,s-u*r,a,s)}function gd(t){this._context=t}gd.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:gv(this,this._t0,OE(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var r=NaN;if(t=+t,e=+e,!(t===this._x1&&e===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,gv(this,OE(this,r=kE(this,t,e)),r);break;default:gv(this,this._t0,r=kE(this,t,e));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=r}}};function qR(t){this._context=new UR(t)}(qR.prototype=Object.create(gd.prototype)).point=function(t,e){gd.prototype.point.call(this,e,t)};function UR(t){this._context=t}UR.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,r,n,i,a){this._context.bezierCurveTo(e,t,n,r,a,i)}};function XU(t){return new gd(t)}function YU(t){return new qR(t)}function FR(t){this._context=t}FR.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,r=t.length;if(r)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),r===2)this._context.lineTo(t[1],e[1]);else for(var n=EE(t),i=EE(e),a=0,s=1;s<r;++a,++s)this._context.bezierCurveTo(n[0][a],i[0][a],n[1][a],i[1][a],t[s],e[s]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,e){this._x.push(+t),this._y.push(+e)}};function EE(t){var e,r=t.length-1,n,i=new Array(r),a=new Array(r),s=new Array(r);for(i[0]=0,a[0]=2,s[0]=t[0]+2*t[1],e=1;e<r-1;++e)i[e]=1,a[e]=4,s[e]=4*t[e]+2*t[e+1];for(i[r-1]=2,a[r-1]=7,s[r-1]=8*t[r-1]+t[r],e=1;e<r;++e)n=i[e]/a[e-1],a[e]-=n,s[e]-=n*s[e-1];for(i[r-1]=s[r-1]/a[r-1],e=r-2;e>=0;--e)i[e]=(s[e]-i[e+1])/a[e];for(a[r-1]=(t[r]+i[r-1])/2,e=0;e<r-1;++e)a[e]=2*t[e+1]-i[e+1];return[i,a]}function JU(t){return new FR(t)}function Ph(t,e){this._context=t,this._t=e}Ph.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(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var r=this._x*(1-this._t)+t*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,e)}break}}this._x=t,this._y=e}};function QU(t){return new Ph(t,.5)}function ZU(t){return new Ph(t,0)}function eF(t){return new Ph(t,1)}function as(t,e){if((s=t.length)>1)for(var r=1,n,i,a=t[e[0]],s,u=a.length;r<s;++r)for(i=a,a=t[e[r]],n=0;n<u;++n)a[n][1]+=a[n][0]=isNaN(i[n][1])?i[n][0]:i[n][1]}function Ib(t){for(var e=t.length,r=new Array(e);--e>=0;)r[e]=e;return r}function tF(t,e){return t[e]}function rF(t){const e=[];return e.key=t,e}function nF(){var t=it([]),e=Ib,r=as,n=tF;function i(a){var s=Array.from(t.apply(this,arguments),rF),u,c=s.length,f=-1,p;for(const h of a)for(u=0,++f;u<c;++u)(s[u][f]=[0,+n(h,s[u].key,f,a)]).data=h;for(u=0,p=Ax(e(s));u<c;++u)s[p[u]].index=u;return r(s,p),s}return i.keys=function(a){return arguments.length?(t=typeof a=="function"?a:it(Array.from(a)),i):t},i.value=function(a){return arguments.length?(n=typeof a=="function"?a:it(+a),i):n},i.order=function(a){return arguments.length?(e=a==null?Ib:typeof a=="function"?a:it(Array.from(a)),i):e},i.offset=function(a){return arguments.length?(r=a??as,i):r},i}function iF(t,e){if((n=t.length)>0){for(var r,n,i=0,a=t[0].length,s;i<a;++i){for(s=r=0;r<n;++r)s+=t[r][i][1]||0;if(s)for(r=0;r<n;++r)t[r][i][1]/=s}as(t,e)}}function aF(t,e){if((i=t.length)>0){for(var r=0,n=t[e[0]],i,a=n.length;r<a;++r){for(var s=0,u=0;s<i;++s)u+=t[s][r][1]||0;n[r][1]+=n[r][0]=-u/2}as(t,e)}}function oF(t,e){if(!(!((s=t.length)>0)||!((a=(i=t[e[0]]).length)>0))){for(var r=0,n=1,i,a,s;n<a;++n){for(var u=0,c=0,f=0;u<s;++u){for(var p=t[e[u]],h=p[n][1]||0,g=p[n-1][1]||0,v=(h-g)/2,y=0;y<u;++y){var x=t[e[y]],b=x[n][1]||0,S=x[n-1][1]||0;v+=b-S}c+=h,f+=v*h}i[n-1][1]+=i[n-1][0]=r,c&&(r-=f/c)}i[n-1][1]+=i[n-1][0]=r,as(t,e)}}function du(t){"@babel/helpers - typeof";return du=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},du(t)}var sF=["type","size","sizeType"];function Mb(){return Mb=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Mb.apply(this,arguments)}function AE(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function PE(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?AE(Object(r),!0).forEach(function(n){lF(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):AE(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function lF(t,e,r){return e=uF(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function uF(t){var e=cF(t,"string");return du(e)=="symbol"?e:e+""}function cF(t,e){if(du(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(du(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function fF(t,e){if(t==null)return{};var r=dF(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function dF(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}var WR={symbolCircle:Px,symbolCross:NU,symbolDiamond:IU,symbolSquare:MU,symbolStar:zU,symbolTriangle:qU,symbolWye:FU},hF=Math.PI/180,pF=function(e){var r="symbol".concat(Oh(e));return WR[r]||Px},mF=function(e,r,n){if(r==="area")return e;switch(n){case"cross":return 5*e*e/9;case"diamond":return .5*e*e/Math.sqrt(3);case"square":return e*e;case"star":{var i=18*hF;return 1.25*e*e*(Math.tan(i)-Math.tan(i*2)*Math.pow(Math.tan(i),2))}case"triangle":return Math.sqrt(3)*e*e/4;case"wye":return(21-10*Math.sqrt(3))*e*e/8;default:return Math.PI*e*e/4}},gF=function(e,r){WR["symbol".concat(Oh(e))]=r},Tx=function(e){var r=e.type,n=r===void 0?"circle":r,i=e.size,a=i===void 0?64:i,s=e.sizeType,u=s===void 0?"area":s,c=fF(e,sF),f=PE(PE({},c),{},{type:n,size:a,sizeType:u}),p=function(){var b=pF(n),S=WU().type(b).size(mF(a,u,n));return S()},h=f.className,g=f.cx,v=f.cy,y=Ee(f,!0);return g===+g&&v===+v&&a===+a?$.createElement("path",Mb({},y,{className:Le("recharts-symbols",h),transform:"translate(".concat(g,", ").concat(v,")"),d:p()})):null};Tx.registerSymbol=gF;function os(t){"@babel/helpers - typeof";return os=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},os(t)}function Lb(){return Lb=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Lb.apply(this,arguments)}function TE(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function vF(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?TE(Object(r),!0).forEach(function(n){hu(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):TE(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function yF(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function bF(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,VR(n.key),n)}}function wF(t,e,r){return e&&bF(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function xF(t,e,r){return e=vd(e),_F(t,HR()?Reflect.construct(e,r||[],vd(t).constructor):e.apply(t,r))}function _F(t,e){if(e&&(os(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return SF(t)}function SF(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function HR(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(HR=function(){return!!t})()}function vd(t){return vd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},vd(t)}function kF(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Db(t,e)}function Db(t,e){return Db=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Db(t,e)}function hu(t,e,r){return e=VR(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function VR(t){var e=OF(t,"string");return os(e)=="symbol"?e:e+""}function OF(t,e){if(os(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(os(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var Yr=32,Cx=(function(t){function e(){return yF(this,e),xF(this,e,arguments)}return kF(e,t),wF(e,[{key:"renderIcon",value:function(n){var i=this.props.inactiveColor,a=Yr/2,s=Yr/6,u=Yr/3,c=n.inactive?i:n.color;if(n.type==="plainline")return $.createElement("line",{strokeWidth:4,fill:"none",stroke:c,strokeDasharray:n.payload.strokeDasharray,x1:0,y1:a,x2:Yr,y2:a,className:"recharts-legend-icon"});if(n.type==="line")return $.createElement("path",{strokeWidth:4,fill:"none",stroke:c,d:"M0,".concat(a,"h").concat(u,`
|
|
376
|
-
A`).concat(s,",").concat(s,",0,1,1,").concat(2*u,",").concat(a,`
|
|
377
|
-
H`).concat(Yr,"M").concat(2*u,",").concat(a,`
|
|
378
|
-
A`).concat(s,",").concat(s,",0,1,1,").concat(u,",").concat(a),className:"recharts-legend-icon"});if(n.type==="rect")return $.createElement("path",{stroke:"none",fill:c,d:"M0,".concat(Yr/8,"h").concat(Yr,"v").concat(Yr*3/4,"h").concat(-Yr,"z"),className:"recharts-legend-icon"});if($.isValidElement(n.legendIcon)){var f=vF({},n);return delete f.legendIcon,$.cloneElement(n.legendIcon,f)}return $.createElement(Tx,{fill:c,cx:a,cy:a,size:Yr,sizeType:"diameter",type:n.type})}},{key:"renderItems",value:function(){var n=this,i=this.props,a=i.payload,s=i.iconSize,u=i.layout,c=i.formatter,f=i.inactiveColor,p={x:0,y:0,width:Yr,height:Yr},h={display:u==="horizontal"?"inline-block":"block",marginRight:10},g={display:"inline-block",verticalAlign:"middle",marginRight:4};return a.map(function(v,y){var x=v.formatter||c,b=Le(hu(hu({"recharts-legend-item":!0},"legend-item-".concat(y),!0),"inactive",v.inactive));if(v.type==="none")return null;var S=$e(v.value)?null:v.value;fi(!$e(v.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 O=v.inactive?f:v.color;return $.createElement("li",Lb({className:b,style:h,key:"legend-item-".concat(y)},Ya(n.props,v,y)),$.createElement(Cb,{width:s,height:s,viewBox:p,style:g},n.renderIcon(v)),$.createElement("span",{className:"recharts-legend-item-text",style:{color:O}},x?x(S,v,y):S))})}},{key:"render",value:function(){var n=this.props,i=n.payload,a=n.layout,s=n.align;if(!i||!i.length)return null;var u={padding:0,margin:0,textAlign:a==="horizontal"?s:"left"};return $.createElement("ul",{className:"recharts-default-legend",style:u},this.renderItems())}}])})(N.PureComponent);hu(Cx,"displayName","Legend");hu(Cx,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var vv,CE;function EF(){if(CE)return vv;CE=1;var t=_h();function e(){this.__data__=new t,this.size=0}return vv=e,vv}var yv,jE;function AF(){if(jE)return yv;jE=1;function t(e){var r=this.__data__,n=r.delete(e);return this.size=r.size,n}return yv=t,yv}var bv,RE;function PF(){if(RE)return bv;RE=1;function t(e){return this.__data__.get(e)}return bv=t,bv}var wv,NE;function TF(){if(NE)return wv;NE=1;function t(e){return this.__data__.has(e)}return wv=t,wv}var xv,$E;function CF(){if($E)return xv;$E=1;var t=_h(),e=wx(),r=xx(),n=200;function i(a,s){var u=this.__data__;if(u instanceof t){var c=u.__data__;if(!e||c.length<n-1)return c.push([a,s]),this.size=++u.size,this;u=this.__data__=new r(c)}return u.set(a,s),this.size=u.size,this}return xv=i,xv}var _v,IE;function KR(){if(IE)return _v;IE=1;var t=_h(),e=EF(),r=AF(),n=PF(),i=TF(),a=CF();function s(u){var c=this.__data__=new t(u);this.size=c.size}return s.prototype.clear=e,s.prototype.delete=r,s.prototype.get=n,s.prototype.has=i,s.prototype.set=a,_v=s,_v}var Sv,ME;function jF(){if(ME)return Sv;ME=1;var t="__lodash_hash_undefined__";function e(r){return this.__data__.set(r,t),this}return Sv=e,Sv}var kv,LE;function RF(){if(LE)return kv;LE=1;function t(e){return this.__data__.has(e)}return kv=t,kv}var Ov,DE;function GR(){if(DE)return Ov;DE=1;var t=xx(),e=jF(),r=RF();function n(i){var a=-1,s=i==null?0:i.length;for(this.__data__=new t;++a<s;)this.add(i[a])}return n.prototype.add=n.prototype.push=e,n.prototype.has=r,Ov=n,Ov}var Ev,BE;function XR(){if(BE)return Ev;BE=1;function t(e,r){for(var n=-1,i=e==null?0:e.length;++n<i;)if(r(e[n],n,e))return!0;return!1}return Ev=t,Ev}var Av,zE;function YR(){if(zE)return Av;zE=1;function t(e,r){return e.has(r)}return Av=t,Av}var Pv,qE;function JR(){if(qE)return Pv;qE=1;var t=GR(),e=XR(),r=YR(),n=1,i=2;function a(s,u,c,f,p,h){var g=c&n,v=s.length,y=u.length;if(v!=y&&!(g&&y>v))return!1;var x=h.get(s),b=h.get(u);if(x&&b)return x==u&&b==s;var S=-1,O=!0,k=c&i?new t:void 0;for(h.set(s,u),h.set(u,s);++S<v;){var T=s[S],E=u[S];if(f)var A=g?f(E,T,S,u,s,h):f(T,E,S,s,u,h);if(A!==void 0){if(A)continue;O=!1;break}if(k){if(!e(u,function(j,R){if(!r(k,R)&&(T===j||p(T,j,c,f,h)))return k.push(R)})){O=!1;break}}else if(!(T===E||p(T,E,c,f,h))){O=!1;break}}return h.delete(s),h.delete(u),O}return Pv=a,Pv}var Tv,UE;function NF(){if(UE)return Tv;UE=1;var t=Wn(),e=t.Uint8Array;return Tv=e,Tv}var Cv,FE;function $F(){if(FE)return Cv;FE=1;function t(e){var r=-1,n=Array(e.size);return e.forEach(function(i,a){n[++r]=[a,i]}),n}return Cv=t,Cv}var jv,WE;function jx(){if(WE)return jv;WE=1;function t(e){var r=-1,n=Array(e.size);return e.forEach(function(i){n[++r]=i}),n}return jv=t,jv}var Rv,HE;function IF(){if(HE)return Rv;HE=1;var t=Ju(),e=NF(),r=bx(),n=JR(),i=$F(),a=jx(),s=1,u=2,c="[object Boolean]",f="[object Date]",p="[object Error]",h="[object Map]",g="[object Number]",v="[object RegExp]",y="[object Set]",x="[object String]",b="[object Symbol]",S="[object ArrayBuffer]",O="[object DataView]",k=t?t.prototype:void 0,T=k?k.valueOf:void 0;function E(A,j,R,M,H,U,B){switch(R){case O:if(A.byteLength!=j.byteLength||A.byteOffset!=j.byteOffset)return!1;A=A.buffer,j=j.buffer;case S:return!(A.byteLength!=j.byteLength||!U(new e(A),new e(j)));case c:case f:case g:return r(+A,+j);case p:return A.name==j.name&&A.message==j.message;case v:case x:return A==j+"";case h:var F=i;case y:var J=M&s;if(F||(F=a),A.size!=j.size&&!J)return!1;var V=B.get(A);if(V)return V==j;M|=u,B.set(A,j);var K=n(F(A),F(j),M,H,U,B);return B.delete(A),K;case b:if(T)return T.call(A)==T.call(j)}return!1}return Rv=E,Rv}var Nv,VE;function QR(){if(VE)return Nv;VE=1;function t(e,r){for(var n=-1,i=r.length,a=e.length;++n<i;)e[a+n]=r[n];return e}return Nv=t,Nv}var $v,KE;function MF(){if(KE)return $v;KE=1;var t=QR(),e=Or();function r(n,i,a){var s=i(n);return e(n)?s:t(s,a(n))}return $v=r,$v}var Iv,GE;function LF(){if(GE)return Iv;GE=1;function t(e,r){for(var n=-1,i=e==null?0:e.length,a=0,s=[];++n<i;){var u=e[n];r(u,n,e)&&(s[a++]=u)}return s}return Iv=t,Iv}var Mv,XE;function DF(){if(XE)return Mv;XE=1;function t(){return[]}return Mv=t,Mv}var Lv,YE;function BF(){if(YE)return Lv;YE=1;var t=LF(),e=DF(),r=Object.prototype,n=r.propertyIsEnumerable,i=Object.getOwnPropertySymbols,a=i?function(s){return s==null?[]:(s=Object(s),t(i(s),function(u){return n.call(s,u)}))}:e;return Lv=a,Lv}var Dv,JE;function zF(){if(JE)return Dv;JE=1;function t(e,r){for(var n=-1,i=Array(e);++n<e;)i[n]=r(n);return i}return Dv=t,Dv}var Bv,QE;function qF(){if(QE)return Bv;QE=1;var t=bi(),e=wi(),r="[object Arguments]";function n(i){return e(i)&&t(i)==r}return Bv=n,Bv}var zv,ZE;function Rx(){if(ZE)return zv;ZE=1;var t=qF(),e=wi(),r=Object.prototype,n=r.hasOwnProperty,i=r.propertyIsEnumerable,a=t((function(){return arguments})())?t:function(s){return e(s)&&n.call(s,"callee")&&!i.call(s,"callee")};return zv=a,zv}var Kl={exports:{}},qv,eA;function UF(){if(eA)return qv;eA=1;function t(){return!1}return qv=t,qv}Kl.exports;var tA;function ZR(){return tA||(tA=1,(function(t,e){var r=Wn(),n=UF(),i=e&&!e.nodeType&&e,a=i&&!0&&t&&!t.nodeType&&t,s=a&&a.exports===i,u=s?r.Buffer:void 0,c=u?u.isBuffer:void 0,f=c||n;t.exports=f})(Kl,Kl.exports)),Kl.exports}var Uv,rA;function Nx(){if(rA)return Uv;rA=1;var t=9007199254740991,e=/^(?:0|[1-9]\d*)$/;function r(n,i){var a=typeof n;return i=i??t,!!i&&(a=="number"||a!="symbol"&&e.test(n))&&n>-1&&n%1==0&&n<i}return Uv=r,Uv}var Fv,nA;function $x(){if(nA)return Fv;nA=1;var t=9007199254740991;function e(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=t}return Fv=e,Fv}var Wv,iA;function FF(){if(iA)return Wv;iA=1;var t=bi(),e=$x(),r=wi(),n="[object Arguments]",i="[object Array]",a="[object Boolean]",s="[object Date]",u="[object Error]",c="[object Function]",f="[object Map]",p="[object Number]",h="[object Object]",g="[object RegExp]",v="[object Set]",y="[object String]",x="[object WeakMap]",b="[object ArrayBuffer]",S="[object DataView]",O="[object Float32Array]",k="[object Float64Array]",T="[object Int8Array]",E="[object Int16Array]",A="[object Int32Array]",j="[object Uint8Array]",R="[object Uint8ClampedArray]",M="[object Uint16Array]",H="[object Uint32Array]",U={};U[O]=U[k]=U[T]=U[E]=U[A]=U[j]=U[R]=U[M]=U[H]=!0,U[n]=U[i]=U[b]=U[a]=U[S]=U[s]=U[u]=U[c]=U[f]=U[p]=U[h]=U[g]=U[v]=U[y]=U[x]=!1;function B(F){return r(F)&&e(F.length)&&!!U[t(F)]}return Wv=B,Wv}var Hv,aA;function eN(){if(aA)return Hv;aA=1;function t(e){return function(r){return e(r)}}return Hv=t,Hv}var Gl={exports:{}};Gl.exports;var oA;function WF(){return oA||(oA=1,(function(t,e){var r=wR(),n=e&&!e.nodeType&&e,i=n&&!0&&t&&!t.nodeType&&t,a=i&&i.exports===n,s=a&&r.process,u=(function(){try{var c=i&&i.require&&i.require("util").types;return c||s&&s.binding&&s.binding("util")}catch{}})();t.exports=u})(Gl,Gl.exports)),Gl.exports}var Vv,sA;function tN(){if(sA)return Vv;sA=1;var t=FF(),e=eN(),r=WF(),n=r&&r.isTypedArray,i=n?e(n):t;return Vv=i,Vv}var Kv,lA;function HF(){if(lA)return Kv;lA=1;var t=zF(),e=Rx(),r=Or(),n=ZR(),i=Nx(),a=tN(),s=Object.prototype,u=s.hasOwnProperty;function c(f,p){var h=r(f),g=!h&&e(f),v=!h&&!g&&n(f),y=!h&&!g&&!v&&a(f),x=h||g||v||y,b=x?t(f.length,String):[],S=b.length;for(var O in f)(p||u.call(f,O))&&!(x&&(O=="length"||v&&(O=="offset"||O=="parent")||y&&(O=="buffer"||O=="byteLength"||O=="byteOffset")||i(O,S)))&&b.push(O);return b}return Kv=c,Kv}var Gv,uA;function VF(){if(uA)return Gv;uA=1;var t=Object.prototype;function e(r){var n=r&&r.constructor,i=typeof n=="function"&&n.prototype||t;return r===i}return Gv=e,Gv}var Xv,cA;function rN(){if(cA)return Xv;cA=1;function t(e,r){return function(n){return e(r(n))}}return Xv=t,Xv}var Yv,fA;function KF(){if(fA)return Yv;fA=1;var t=rN(),e=t(Object.keys,Object);return Yv=e,Yv}var Jv,dA;function GF(){if(dA)return Jv;dA=1;var t=VF(),e=KF(),r=Object.prototype,n=r.hasOwnProperty;function i(a){if(!t(a))return e(a);var s=[];for(var u in Object(a))n.call(a,u)&&u!="constructor"&&s.push(u);return s}return Jv=i,Jv}var Qv,hA;function Qu(){if(hA)return Qv;hA=1;var t=yx(),e=$x();function r(n){return n!=null&&e(n.length)&&!t(n)}return Qv=r,Qv}var Zv,pA;function Th(){if(pA)return Zv;pA=1;var t=HF(),e=GF(),r=Qu();function n(i){return r(i)?t(i):e(i)}return Zv=n,Zv}var ey,mA;function XF(){if(mA)return ey;mA=1;var t=MF(),e=BF(),r=Th();function n(i){return t(i,r,e)}return ey=n,ey}var ty,gA;function YF(){if(gA)return ty;gA=1;var t=XF(),e=1,r=Object.prototype,n=r.hasOwnProperty;function i(a,s,u,c,f,p){var h=u&e,g=t(a),v=g.length,y=t(s),x=y.length;if(v!=x&&!h)return!1;for(var b=v;b--;){var S=g[b];if(!(h?S in s:n.call(s,S)))return!1}var O=p.get(a),k=p.get(s);if(O&&k)return O==s&&k==a;var T=!0;p.set(a,s),p.set(s,a);for(var E=h;++b<v;){S=g[b];var A=a[S],j=s[S];if(c)var R=h?c(j,A,S,s,a,p):c(A,j,S,a,s,p);if(!(R===void 0?A===j||f(A,j,u,c,p):R)){T=!1;break}E||(E=S=="constructor")}if(T&&!E){var M=a.constructor,H=s.constructor;M!=H&&"constructor"in a&&"constructor"in s&&!(typeof M=="function"&&M instanceof M&&typeof H=="function"&&H instanceof H)&&(T=!1)}return p.delete(a),p.delete(s),T}return ty=i,ty}var ry,vA;function JF(){if(vA)return ry;vA=1;var t=ro(),e=Wn(),r=t(e,"DataView");return ry=r,ry}var ny,yA;function QF(){if(yA)return ny;yA=1;var t=ro(),e=Wn(),r=t(e,"Promise");return ny=r,ny}var iy,bA;function nN(){if(bA)return iy;bA=1;var t=ro(),e=Wn(),r=t(e,"Set");return iy=r,iy}var ay,wA;function ZF(){if(wA)return ay;wA=1;var t=ro(),e=Wn(),r=t(e,"WeakMap");return ay=r,ay}var oy,xA;function e9(){if(xA)return oy;xA=1;var t=JF(),e=wx(),r=QF(),n=nN(),i=ZF(),a=bi(),s=xR(),u="[object Map]",c="[object Object]",f="[object Promise]",p="[object Set]",h="[object WeakMap]",g="[object DataView]",v=s(t),y=s(e),x=s(r),b=s(n),S=s(i),O=a;return(t&&O(new t(new ArrayBuffer(1)))!=g||e&&O(new e)!=u||r&&O(r.resolve())!=f||n&&O(new n)!=p||i&&O(new i)!=h)&&(O=function(k){var T=a(k),E=T==c?k.constructor:void 0,A=E?s(E):"";if(A)switch(A){case v:return g;case y:return u;case x:return f;case b:return p;case S:return h}return T}),oy=O,oy}var sy,_A;function t9(){if(_A)return sy;_A=1;var t=KR(),e=JR(),r=IF(),n=YF(),i=e9(),a=Or(),s=ZR(),u=tN(),c=1,f="[object Arguments]",p="[object Array]",h="[object Object]",g=Object.prototype,v=g.hasOwnProperty;function y(x,b,S,O,k,T){var E=a(x),A=a(b),j=E?p:i(x),R=A?p:i(b);j=j==f?h:j,R=R==f?h:R;var M=j==h,H=R==h,U=j==R;if(U&&s(x)){if(!s(b))return!1;E=!0,M=!1}if(U&&!M)return T||(T=new t),E||u(x)?e(x,b,S,O,k,T):r(x,b,j,S,O,k,T);if(!(S&c)){var B=M&&v.call(x,"__wrapped__"),F=H&&v.call(b,"__wrapped__");if(B||F){var J=B?x.value():x,V=F?b.value():b;return T||(T=new t),k(J,V,S,O,T)}}return U?(T||(T=new t),n(x,b,S,O,k,T)):!1}return sy=y,sy}var ly,SA;function Ix(){if(SA)return ly;SA=1;var t=t9(),e=wi();function r(n,i,a,s,u){return n===i?!0:n==null||i==null||!e(n)&&!e(i)?n!==n&&i!==i:t(n,i,a,s,r,u)}return ly=r,ly}var uy,kA;function r9(){if(kA)return uy;kA=1;var t=KR(),e=Ix(),r=1,n=2;function i(a,s,u,c){var f=u.length,p=f,h=!c;if(a==null)return!p;for(a=Object(a);f--;){var g=u[f];if(h&&g[2]?g[1]!==a[g[0]]:!(g[0]in a))return!1}for(;++f<p;){g=u[f];var v=g[0],y=a[v],x=g[1];if(h&&g[2]){if(y===void 0&&!(v in a))return!1}else{var b=new t;if(c)var S=c(y,x,v,a,s,b);if(!(S===void 0?e(x,y,r|n,c,b):S))return!1}}return!0}return uy=i,uy}var cy,OA;function iN(){if(OA)return cy;OA=1;var t=ia();function e(r){return r===r&&!t(r)}return cy=e,cy}var fy,EA;function n9(){if(EA)return fy;EA=1;var t=iN(),e=Th();function r(n){for(var i=e(n),a=i.length;a--;){var s=i[a],u=n[s];i[a]=[s,u,t(u)]}return i}return fy=r,fy}var dy,AA;function aN(){if(AA)return dy;AA=1;function t(e,r){return function(n){return n==null?!1:n[e]===r&&(r!==void 0||e in Object(n))}}return dy=t,dy}var hy,PA;function i9(){if(PA)return hy;PA=1;var t=r9(),e=n9(),r=aN();function n(i){var a=e(i);return a.length==1&&a[0][2]?r(a[0][0],a[0][1]):function(s){return s===i||t(s,i,a)}}return hy=n,hy}var py,TA;function a9(){if(TA)return py;TA=1;function t(e,r){return e!=null&&r in Object(e)}return py=t,py}var my,CA;function o9(){if(CA)return my;CA=1;var t=kR(),e=Rx(),r=Or(),n=Nx(),i=$x(),a=kh();function s(u,c,f){c=t(c,u);for(var p=-1,h=c.length,g=!1;++p<h;){var v=a(c[p]);if(!(g=u!=null&&f(u,v)))break;u=u[v]}return g||++p!=h?g:(h=u==null?0:u.length,!!h&&i(h)&&n(v,h)&&(r(u)||e(u)))}return my=s,my}var gy,jA;function s9(){if(jA)return gy;jA=1;var t=a9(),e=o9();function r(n,i){return n!=null&&e(n,i,t)}return gy=r,gy}var vy,RA;function l9(){if(RA)return vy;RA=1;var t=Ix(),e=OR(),r=s9(),n=vx(),i=iN(),a=aN(),s=kh(),u=1,c=2;function f(p,h){return n(p)&&i(h)?a(s(p),h):function(g){var v=e(g,p);return v===void 0&&v===h?r(g,p):t(h,v,u|c)}}return vy=f,vy}var yy,NA;function zs(){if(NA)return yy;NA=1;function t(e){return e}return yy=t,yy}var by,$A;function u9(){if($A)return by;$A=1;function t(e){return function(r){return r==null?void 0:r[e]}}return by=t,by}var wy,IA;function c9(){if(IA)return wy;IA=1;var t=Sx();function e(r){return function(n){return t(n,r)}}return wy=e,wy}var xy,MA;function f9(){if(MA)return xy;MA=1;var t=u9(),e=c9(),r=vx(),n=kh();function i(a){return r(a)?t(n(a)):e(a)}return xy=i,xy}var _y,LA;function Hn(){if(LA)return _y;LA=1;var t=i9(),e=l9(),r=zs(),n=Or(),i=f9();function a(s){return typeof s=="function"?s:s==null?r:typeof s=="object"?n(s)?e(s[0],s[1]):t(s):i(s)}return _y=a,_y}var Sy,DA;function oN(){if(DA)return Sy;DA=1;function t(e,r,n,i){for(var a=e.length,s=n+(i?1:-1);i?s--:++s<a;)if(r(e[s],s,e))return s;return-1}return Sy=t,Sy}var ky,BA;function d9(){if(BA)return ky;BA=1;function t(e){return e!==e}return ky=t,ky}var Oy,zA;function h9(){if(zA)return Oy;zA=1;function t(e,r,n){for(var i=n-1,a=e.length;++i<a;)if(e[i]===r)return i;return-1}return Oy=t,Oy}var Ey,qA;function p9(){if(qA)return Ey;qA=1;var t=oN(),e=d9(),r=h9();function n(i,a,s){return a===a?r(i,a,s):t(i,e,s)}return Ey=n,Ey}var Ay,UA;function m9(){if(UA)return Ay;UA=1;var t=p9();function e(r,n){var i=r==null?0:r.length;return!!i&&t(r,n,0)>-1}return Ay=e,Ay}var Py,FA;function g9(){if(FA)return Py;FA=1;function t(e,r,n){for(var i=-1,a=e==null?0:e.length;++i<a;)if(n(r,e[i]))return!0;return!1}return Py=t,Py}var Ty,WA;function v9(){if(WA)return Ty;WA=1;function t(){}return Ty=t,Ty}var Cy,HA;function y9(){if(HA)return Cy;HA=1;var t=nN(),e=v9(),r=jx(),n=1/0,i=t&&1/r(new t([,-0]))[1]==n?function(a){return new t(a)}:e;return Cy=i,Cy}var jy,VA;function b9(){if(VA)return jy;VA=1;var t=GR(),e=m9(),r=g9(),n=YR(),i=y9(),a=jx(),s=200;function u(c,f,p){var h=-1,g=e,v=c.length,y=!0,x=[],b=x;if(p)y=!1,g=r;else if(v>=s){var S=f?null:i(c);if(S)return a(S);y=!1,g=n,b=new t}else b=f?[]:x;e:for(;++h<v;){var O=c[h],k=f?f(O):O;if(O=p||O!==0?O:0,y&&k===k){for(var T=b.length;T--;)if(b[T]===k)continue e;f&&b.push(k),x.push(O)}else g(b,k,p)||(b!==x&&b.push(k),x.push(O))}return x}return jy=u,jy}var Ry,KA;function w9(){if(KA)return Ry;KA=1;var t=Hn(),e=b9();function r(n,i){return n&&n.length?e(n,t(i,2)):[]}return Ry=r,Ry}var x9=w9();const GA=Je(x9);function sN(t,e,r){return e===!0?GA(t,r):$e(e)?GA(t,e):t}function ss(t){"@babel/helpers - typeof";return ss=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ss(t)}var _9=["ref"];function XA(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function ni(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?XA(Object(r),!0).forEach(function(n){Ch(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):XA(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function S9(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function YA(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,uN(n.key),n)}}function k9(t,e,r){return e&&YA(t.prototype,e),r&&YA(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function O9(t,e,r){return e=yd(e),E9(t,lN()?Reflect.construct(e,r||[],yd(t).constructor):e.apply(t,r))}function E9(t,e){if(e&&(ss(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return A9(t)}function A9(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function lN(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(lN=function(){return!!t})()}function yd(t){return yd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},yd(t)}function P9(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Bb(t,e)}function Bb(t,e){return Bb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Bb(t,e)}function Ch(t,e,r){return e=uN(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function uN(t){var e=T9(t,"string");return ss(e)=="symbol"?e:e+""}function T9(t,e){if(ss(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(ss(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}function C9(t,e){if(t==null)return{};var r=j9(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function j9(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}function R9(t){return t.value}function N9(t,e){if($.isValidElement(t))return $.cloneElement(t,e);if(typeof t=="function")return $.createElement(t,e);e.ref;var r=C9(e,_9);return $.createElement(Cx,r)}var JA=1,es=(function(t){function e(){var r;S9(this,e);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return r=O9(this,e,[].concat(i)),Ch(r,"lastBoundingBox",{width:-1,height:-1}),r}return P9(e,t),k9(e,[{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)>JA||Math.abs(i.height-this.lastBoundingBox.height)>JA)&&(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?ni({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(n){var i=this.props,a=i.layout,s=i.align,u=i.verticalAlign,c=i.margin,f=i.chartWidth,p=i.chartHeight,h,g;if(!n||(n.left===void 0||n.left===null)&&(n.right===void 0||n.right===null))if(s==="center"&&a==="vertical"){var v=this.getBBoxSnapshot();h={left:((f||0)-v.width)/2}}else h=s==="right"?{right:c&&c.right||0}:{left:c&&c.left||0};if(!n||(n.top===void 0||n.top===null)&&(n.bottom===void 0||n.bottom===null))if(u==="middle"){var y=this.getBBoxSnapshot();g={top:((p||0)-y.height)/2}}else g=u==="bottom"?{bottom:c&&c.bottom||0}:{top:c&&c.top||0};return ni(ni({},h),g)}},{key:"render",value:function(){var n=this,i=this.props,a=i.content,s=i.width,u=i.height,c=i.wrapperStyle,f=i.payloadUniqBy,p=i.payload,h=ni(ni({position:"absolute",width:s||"auto",height:u||"auto"},this.getDefaultPosition(c)),c);return $.createElement("div",{className:"recharts-legend-wrapper",style:h,ref:function(v){n.wrapperNode=v}},N9(a,ni(ni({},this.props),{},{payload:sN(p,f,R9)})))}}],[{key:"getWithHeight",value:function(n,i){var a=ni(ni({},this.defaultProps),n.props),s=a.layout;return s==="vertical"&&fe(n.props.height)?{height:n.props.height}:s==="horizontal"?{width:n.props.width||i}:null}}])})(N.PureComponent);Ch(es,"displayName","Legend");Ch(es,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var Ny,QA;function $9(){if(QA)return Ny;QA=1;var t=Ju(),e=Rx(),r=Or(),n=t?t.isConcatSpreadable:void 0;function i(a){return r(a)||e(a)||!!(n&&a&&a[n])}return Ny=i,Ny}var $y,ZA;function cN(){if(ZA)return $y;ZA=1;var t=QR(),e=$9();function r(n,i,a,s,u){var c=-1,f=n.length;for(a||(a=e),u||(u=[]);++c<f;){var p=n[c];i>0&&a(p)?i>1?r(p,i-1,a,s,u):t(u,p):s||(u[u.length]=p)}return u}return $y=r,$y}var Iy,eP;function I9(){if(eP)return Iy;eP=1;function t(e){return function(r,n,i){for(var a=-1,s=Object(r),u=i(r),c=u.length;c--;){var f=u[e?c:++a];if(n(s[f],f,s)===!1)break}return r}}return Iy=t,Iy}var My,tP;function M9(){if(tP)return My;tP=1;var t=I9(),e=t();return My=e,My}var Ly,rP;function fN(){if(rP)return Ly;rP=1;var t=M9(),e=Th();function r(n,i){return n&&t(n,i,e)}return Ly=r,Ly}var Dy,nP;function L9(){if(nP)return Dy;nP=1;var t=Qu();function e(r,n){return function(i,a){if(i==null)return i;if(!t(i))return r(i,a);for(var s=i.length,u=n?s:-1,c=Object(i);(n?u--:++u<s)&&a(c[u],u,c)!==!1;);return i}}return Dy=e,Dy}var By,iP;function Mx(){if(iP)return By;iP=1;var t=fN(),e=L9(),r=e(t);return By=r,By}var zy,aP;function dN(){if(aP)return zy;aP=1;var t=Mx(),e=Qu();function r(n,i){var a=-1,s=e(n)?Array(n.length):[];return t(n,function(u,c,f){s[++a]=i(u,c,f)}),s}return zy=r,zy}var qy,oP;function D9(){if(oP)return qy;oP=1;function t(e,r){var n=e.length;for(e.sort(r);n--;)e[n]=e[n].value;return e}return qy=t,qy}var Uy,sP;function B9(){if(sP)return Uy;sP=1;var t=Ms();function e(r,n){if(r!==n){var i=r!==void 0,a=r===null,s=r===r,u=t(r),c=n!==void 0,f=n===null,p=n===n,h=t(n);if(!f&&!h&&!u&&r>n||u&&c&&p&&!f&&!h||a&&c&&p||!i&&p||!s)return 1;if(!a&&!u&&!h&&r<n||h&&i&&s&&!a&&!u||f&&i&&s||!c&&s||!p)return-1}return 0}return Uy=e,Uy}var Fy,lP;function z9(){if(lP)return Fy;lP=1;var t=B9();function e(r,n,i){for(var a=-1,s=r.criteria,u=n.criteria,c=s.length,f=i.length;++a<c;){var p=t(s[a],u[a]);if(p){if(a>=f)return p;var h=i[a];return p*(h=="desc"?-1:1)}}return r.index-n.index}return Fy=e,Fy}var Wy,uP;function q9(){if(uP)return Wy;uP=1;var t=_x(),e=Sx(),r=Hn(),n=dN(),i=D9(),a=eN(),s=z9(),u=zs(),c=Or();function f(p,h,g){h.length?h=t(h,function(x){return c(x)?function(b){return e(b,x.length===1?x[0]:x)}:x}):h=[u];var v=-1;h=t(h,a(r));var y=n(p,function(x,b,S){var O=t(h,function(k){return k(x)});return{criteria:O,index:++v,value:x}});return i(y,function(x,b){return s(x,b,g)})}return Wy=f,Wy}var Hy,cP;function U9(){if(cP)return Hy;cP=1;function t(e,r,n){switch(n.length){case 0:return e.call(r);case 1:return e.call(r,n[0]);case 2:return e.call(r,n[0],n[1]);case 3:return e.call(r,n[0],n[1],n[2])}return e.apply(r,n)}return Hy=t,Hy}var Vy,fP;function F9(){if(fP)return Vy;fP=1;var t=U9(),e=Math.max;function r(n,i,a){return i=e(i===void 0?n.length-1:i,0),function(){for(var s=arguments,u=-1,c=e(s.length-i,0),f=Array(c);++u<c;)f[u]=s[i+u];u=-1;for(var p=Array(i+1);++u<i;)p[u]=s[u];return p[i]=a(f),t(n,this,p)}}return Vy=r,Vy}var Ky,dP;function W9(){if(dP)return Ky;dP=1;function t(e){return function(){return e}}return Ky=t,Ky}var Gy,hP;function hN(){if(hP)return Gy;hP=1;var t=ro(),e=(function(){try{var r=t(Object,"defineProperty");return r({},"",{}),r}catch{}})();return Gy=e,Gy}var Xy,pP;function H9(){if(pP)return Xy;pP=1;var t=W9(),e=hN(),r=zs(),n=e?function(i,a){return e(i,"toString",{configurable:!0,enumerable:!1,value:t(a),writable:!0})}:r;return Xy=n,Xy}var Yy,mP;function V9(){if(mP)return Yy;mP=1;var t=800,e=16,r=Date.now;function n(i){var a=0,s=0;return function(){var u=r(),c=e-(u-s);if(s=u,c>0){if(++a>=t)return arguments[0]}else a=0;return i.apply(void 0,arguments)}}return Yy=n,Yy}var Jy,gP;function K9(){if(gP)return Jy;gP=1;var t=H9(),e=V9(),r=e(t);return Jy=r,Jy}var Qy,vP;function G9(){if(vP)return Qy;vP=1;var t=zs(),e=F9(),r=K9();function n(i,a){return r(e(i,a,t),i+"")}return Qy=n,Qy}var Zy,yP;function jh(){if(yP)return Zy;yP=1;var t=bx(),e=Qu(),r=Nx(),n=ia();function i(a,s,u){if(!n(u))return!1;var c=typeof s;return(c=="number"?e(u)&&r(s,u.length):c=="string"&&s in u)?t(u[s],a):!1}return Zy=i,Zy}var e0,bP;function X9(){if(bP)return e0;bP=1;var t=cN(),e=q9(),r=G9(),n=jh(),i=r(function(a,s){if(a==null)return[];var u=s.length;return u>1&&n(a,s[0],s[1])?s=[]:u>2&&n(s[0],s[1],s[2])&&(s=[s[0]]),e(a,t(s,1),[])});return e0=i,e0}var Y9=X9();const Lx=Je(Y9);function pu(t){"@babel/helpers - typeof";return pu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},pu(t)}function zb(){return zb=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},zb.apply(this,arguments)}function J9(t,e){return t7(t)||e7(t,e)||Z9(t,e)||Q9()}function Q9(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
379
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Z9(t,e){if(t){if(typeof t=="string")return wP(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return wP(t,e)}}function wP(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function e7(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,i,a,s,u=[],c=!0,f=!1;try{if(a=(r=r.call(t)).next,e!==0)for(;!(c=(n=a.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(p){f=!0,i=p}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(f)throw i}}return u}}function t7(t){if(Array.isArray(t))return t}function xP(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function t0(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?xP(Object(r),!0).forEach(function(n){r7(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):xP(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function r7(t,e,r){return e=n7(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function n7(t){var e=i7(t,"string");return pu(e)=="symbol"?e:e+""}function i7(t,e){if(pu(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(pu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function a7(t){return Array.isArray(t)&&Dt(t[0])&&Dt(t[1])?t.join(" ~ "):t}var o7=function(e){var r=e.separator,n=r===void 0?" : ":r,i=e.contentStyle,a=i===void 0?{}:i,s=e.itemStyle,u=s===void 0?{}:s,c=e.labelStyle,f=c===void 0?{}:c,p=e.payload,h=e.formatter,g=e.itemSorter,v=e.wrapperClassName,y=e.labelClassName,x=e.label,b=e.labelFormatter,S=e.accessibilityLayer,O=S===void 0?!1:S,k=function(){if(p&&p.length){var B={padding:0,margin:0},F=(g?Lx(p,g):p).map(function(J,V){if(J.type==="none")return null;var K=t0({display:"block",paddingTop:4,paddingBottom:4,color:J.color||"#000"},u),Z=J.formatter||h||a7,G=J.value,ee=J.name,z=G,L=ee;if(Z&&z!=null&&L!=null){var W=Z(G,ee,J,V,p);if(Array.isArray(W)){var te=J9(W,2);z=te[0],L=te[1]}else z=W}return $.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(V),style:K},Dt(L)?$.createElement("span",{className:"recharts-tooltip-item-name"},L):null,Dt(L)?$.createElement("span",{className:"recharts-tooltip-item-separator"},n):null,$.createElement("span",{className:"recharts-tooltip-item-value"},z),$.createElement("span",{className:"recharts-tooltip-item-unit"},J.unit||""))});return $.createElement("ul",{className:"recharts-tooltip-item-list",style:B},F)}return null},T=t0({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},a),E=t0({margin:0},f),A=!Me(x),j=A?x:"",R=Le("recharts-default-tooltip",v),M=Le("recharts-tooltip-label",y);A&&b&&p!==void 0&&p!==null&&(j=b(x,p));var H=O?{role:"status","aria-live":"assertive"}:{};return $.createElement("div",zb({className:R,style:T},H),$.createElement("p",{className:M,style:E},$.isValidElement(j)?j:"".concat(j)),k())};function mu(t){"@babel/helpers - typeof";return mu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},mu(t)}function Tf(t,e,r){return e=s7(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function s7(t){var e=l7(t,"string");return mu(e)=="symbol"?e:e+""}function l7(t,e){if(mu(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(mu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var $l="recharts-tooltip-wrapper",u7={visibility:"hidden"};function c7(t){var e=t.coordinate,r=t.translateX,n=t.translateY;return Le($l,Tf(Tf(Tf(Tf({},"".concat($l,"-right"),fe(r)&&e&&fe(e.x)&&r>=e.x),"".concat($l,"-left"),fe(r)&&e&&fe(e.x)&&r<e.x),"".concat($l,"-bottom"),fe(n)&&e&&fe(e.y)&&n>=e.y),"".concat($l,"-top"),fe(n)&&e&&fe(e.y)&&n<e.y))}function _P(t){var e=t.allowEscapeViewBox,r=t.coordinate,n=t.key,i=t.offsetTopLeft,a=t.position,s=t.reverseDirection,u=t.tooltipDimension,c=t.viewBox,f=t.viewBoxDimension;if(a&&fe(a[n]))return a[n];var p=r[n]-u-i,h=r[n]+i;if(e[n])return s[n]?p:h;if(s[n]){var g=p,v=c[n];return g<v?Math.max(h,c[n]):Math.max(p,c[n])}var y=h+u,x=c[n]+f;return y>x?Math.max(p,c[n]):Math.max(h,c[n])}function f7(t){var e=t.translateX,r=t.translateY,n=t.useTranslate3d;return{transform:n?"translate3d(".concat(e,"px, ").concat(r,"px, 0)"):"translate(".concat(e,"px, ").concat(r,"px)")}}function d7(t){var e=t.allowEscapeViewBox,r=t.coordinate,n=t.offsetTopLeft,i=t.position,a=t.reverseDirection,s=t.tooltipBox,u=t.useTranslate3d,c=t.viewBox,f,p,h;return s.height>0&&s.width>0&&r?(p=_P({allowEscapeViewBox:e,coordinate:r,key:"x",offsetTopLeft:n,position:i,reverseDirection:a,tooltipDimension:s.width,viewBox:c,viewBoxDimension:c.width}),h=_P({allowEscapeViewBox:e,coordinate:r,key:"y",offsetTopLeft:n,position:i,reverseDirection:a,tooltipDimension:s.height,viewBox:c,viewBoxDimension:c.height}),f=f7({translateX:p,translateY:h,useTranslate3d:u})):f=u7,{cssProperties:f,cssClasses:c7({translateX:p,translateY:h,coordinate:r})}}function ls(t){"@babel/helpers - typeof";return ls=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ls(t)}function SP(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function kP(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?SP(Object(r),!0).forEach(function(n){Ub(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):SP(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function h7(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function p7(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,mN(n.key),n)}}function m7(t,e,r){return e&&p7(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function g7(t,e,r){return e=bd(e),v7(t,pN()?Reflect.construct(e,r||[],bd(t).constructor):e.apply(t,r))}function v7(t,e){if(e&&(ls(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return y7(t)}function y7(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function pN(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(pN=function(){return!!t})()}function bd(t){return bd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},bd(t)}function b7(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&qb(t,e)}function qb(t,e){return qb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},qb(t,e)}function Ub(t,e,r){return e=mN(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function mN(t){var e=w7(t,"string");return ls(e)=="symbol"?e:e+""}function w7(t,e){if(ls(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(ls(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var OP=1,x7=(function(t){function e(){var r;h7(this,e);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return r=g7(this,e,[].concat(i)),Ub(r,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),Ub(r,"handleKeyDown",function(s){if(s.key==="Escape"){var u,c,f,p;r.setState({dismissed:!0,dismissedAtCoordinate:{x:(u=(c=r.props.coordinate)===null||c===void 0?void 0:c.x)!==null&&u!==void 0?u:0,y:(f=(p=r.props.coordinate)===null||p===void 0?void 0:p.y)!==null&&f!==void 0?f:0}})}}),r}return b7(e,t),m7(e,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var n=this.wrapperNode.getBoundingClientRect();(Math.abs(n.width-this.state.lastBoundingBox.width)>OP||Math.abs(n.height-this.state.lastBoundingBox.height)>OP)&&this.setState({lastBoundingBox:{width:n.width,height:n.height}})}else(this.state.lastBoundingBox.width!==-1||this.state.lastBoundingBox.height!==-1)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var n,i;this.props.active&&this.updateBBox(),this.state.dismissed&&(((n=this.props.coordinate)===null||n===void 0?void 0:n.x)!==this.state.dismissedAtCoordinate.x||((i=this.props.coordinate)===null||i===void 0?void 0:i.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var n=this,i=this.props,a=i.active,s=i.allowEscapeViewBox,u=i.animationDuration,c=i.animationEasing,f=i.children,p=i.coordinate,h=i.hasPayload,g=i.isAnimationActive,v=i.offset,y=i.position,x=i.reverseDirection,b=i.useTranslate3d,S=i.viewBox,O=i.wrapperStyle,k=d7({allowEscapeViewBox:s,coordinate:p,offsetTopLeft:v,position:y,reverseDirection:x,tooltipBox:this.state.lastBoundingBox,useTranslate3d:b,viewBox:S}),T=k.cssClasses,E=k.cssProperties,A=kP(kP({transition:g&&a?"transform ".concat(u,"ms ").concat(c):void 0},E),{},{pointerEvents:"none",visibility:!this.state.dismissed&&a&&h?"visible":"hidden",position:"absolute",top:0,left:0},O);return $.createElement("div",{tabIndex:-1,className:T,style:A,ref:function(R){n.wrapperNode=R}},f)}}])})(N.PureComponent),_7=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},no={isSsr:_7()};function us(t){"@babel/helpers - typeof";return us=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},us(t)}function EP(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function AP(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?EP(Object(r),!0).forEach(function(n){Dx(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):EP(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function S7(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function k7(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,vN(n.key),n)}}function O7(t,e,r){return e&&k7(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function E7(t,e,r){return e=wd(e),A7(t,gN()?Reflect.construct(e,r||[],wd(t).constructor):e.apply(t,r))}function A7(t,e){if(e&&(us(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return P7(t)}function P7(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function gN(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(gN=function(){return!!t})()}function wd(t){return wd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},wd(t)}function T7(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Fb(t,e)}function Fb(t,e){return Fb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Fb(t,e)}function Dx(t,e,r){return e=vN(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function vN(t){var e=C7(t,"string");return us(e)=="symbol"?e:e+""}function C7(t,e){if(us(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(us(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}function j7(t){return t.dataKey}function R7(t,e){return $.isValidElement(t)?$.cloneElement(t,e):typeof t=="function"?$.createElement(t,e):$.createElement(o7,e)}var vn=(function(t){function e(){return S7(this,e),E7(this,e,arguments)}return T7(e,t),O7(e,[{key:"render",value:function(){var n=this,i=this.props,a=i.active,s=i.allowEscapeViewBox,u=i.animationDuration,c=i.animationEasing,f=i.content,p=i.coordinate,h=i.filterNull,g=i.isAnimationActive,v=i.offset,y=i.payload,x=i.payloadUniqBy,b=i.position,S=i.reverseDirection,O=i.useTranslate3d,k=i.viewBox,T=i.wrapperStyle,E=y??[];h&&E.length&&(E=sN(y.filter(function(j){return j.value!=null&&(j.hide!==!0||n.props.includeHidden)}),x,j7));var A=E.length>0;return $.createElement(x7,{allowEscapeViewBox:s,animationDuration:u,animationEasing:c,isAnimationActive:g,active:a,coordinate:p,hasPayload:A,offset:v,position:b,reverseDirection:S,useTranslate3d:O,viewBox:k,wrapperStyle:T},R7(f,AP(AP({},this.props),{},{payload:E})))}}])})(N.PureComponent);Dx(vn,"displayName","Tooltip");Dx(vn,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!no.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 r0,PP;function N7(){if(PP)return r0;PP=1;var t=Wn(),e=function(){return t.Date.now()};return r0=e,r0}var n0,TP;function $7(){if(TP)return n0;TP=1;var t=/\s/;function e(r){for(var n=r.length;n--&&t.test(r.charAt(n)););return n}return n0=e,n0}var i0,CP;function I7(){if(CP)return i0;CP=1;var t=$7(),e=/^\s+/;function r(n){return n&&n.slice(0,t(n)+1).replace(e,"")}return i0=r,i0}var a0,jP;function yN(){if(jP)return a0;jP=1;var t=I7(),e=ia(),r=Ms(),n=NaN,i=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,s=/^0o[0-7]+$/i,u=parseInt;function c(f){if(typeof f=="number")return f;if(r(f))return n;if(e(f)){var p=typeof f.valueOf=="function"?f.valueOf():f;f=e(p)?p+"":p}if(typeof f!="string")return f===0?f:+f;f=t(f);var h=a.test(f);return h||s.test(f)?u(f.slice(2),h?2:8):i.test(f)?n:+f}return a0=c,a0}var o0,RP;function M7(){if(RP)return o0;RP=1;var t=ia(),e=N7(),r=yN(),n="Expected a function",i=Math.max,a=Math.min;function s(u,c,f){var p,h,g,v,y,x,b=0,S=!1,O=!1,k=!0;if(typeof u!="function")throw new TypeError(n);c=r(c)||0,t(f)&&(S=!!f.leading,O="maxWait"in f,g=O?i(r(f.maxWait)||0,c):g,k="trailing"in f?!!f.trailing:k);function T(F){var J=p,V=h;return p=h=void 0,b=F,v=u.apply(V,J),v}function E(F){return b=F,y=setTimeout(R,c),S?T(F):v}function A(F){var J=F-x,V=F-b,K=c-J;return O?a(K,g-V):K}function j(F){var J=F-x,V=F-b;return x===void 0||J>=c||J<0||O&&V>=g}function R(){var F=e();if(j(F))return M(F);y=setTimeout(R,A(F))}function M(F){return y=void 0,k&&p?T(F):(p=h=void 0,v)}function H(){y!==void 0&&clearTimeout(y),b=0,p=x=h=y=void 0}function U(){return y===void 0?v:M(e())}function B(){var F=e(),J=j(F);if(p=arguments,h=this,x=F,J){if(y===void 0)return E(x);if(O)return clearTimeout(y),y=setTimeout(R,c),T(x)}return y===void 0&&(y=setTimeout(R,c)),v}return B.cancel=H,B.flush=U,B}return o0=s,o0}var s0,NP;function L7(){if(NP)return s0;NP=1;var t=M7(),e=ia(),r="Expected a function";function n(i,a,s){var u=!0,c=!0;if(typeof i!="function")throw new TypeError(r);return e(s)&&(u="leading"in s?!!s.leading:u,c="trailing"in s?!!s.trailing:c),t(i,a,{leading:u,maxWait:a,trailing:c})}return s0=n,s0}var D7=L7();const bN=Je(D7);function gu(t){"@babel/helpers - typeof";return gu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},gu(t)}function $P(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Cf(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?$P(Object(r),!0).forEach(function(n){B7(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):$P(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function B7(t,e,r){return e=z7(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function z7(t){var e=q7(t,"string");return gu(e)=="symbol"?e:e+""}function q7(t,e){if(gu(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(gu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function U7(t,e){return V7(t)||H7(t,e)||W7(t,e)||F7()}function F7(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
380
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function W7(t,e){if(t){if(typeof t=="string")return IP(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return IP(t,e)}}function IP(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function H7(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,i,a,s,u=[],c=!0,f=!1;try{if(a=(r=r.call(t)).next,e!==0)for(;!(c=(n=a.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(p){f=!0,i=p}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(f)throw i}}return u}}function V7(t){if(Array.isArray(t))return t}var MP=N.forwardRef(function(t,e){var r=t.aspect,n=t.initialDimension,i=n===void 0?{width:-1,height:-1}:n,a=t.width,s=a===void 0?"100%":a,u=t.height,c=u===void 0?"100%":u,f=t.minWidth,p=f===void 0?0:f,h=t.minHeight,g=t.maxHeight,v=t.children,y=t.debounce,x=y===void 0?0:y,b=t.id,S=t.className,O=t.onResize,k=t.style,T=k===void 0?{}:k,E=N.useRef(null),A=N.useRef();A.current=O,N.useImperativeHandle(e,function(){return Object.defineProperty(E.current,"current",{get:function(){return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),E.current},configurable:!0})});var j=N.useState({containerWidth:i.width,containerHeight:i.height}),R=U7(j,2),M=R[0],H=R[1],U=N.useCallback(function(F,J){H(function(V){var K=Math.round(F),Z=Math.round(J);return V.containerWidth===K&&V.containerHeight===Z?V:{containerWidth:K,containerHeight:Z}})},[]);N.useEffect(function(){var F=function(ee){var z,L=ee[0].contentRect,W=L.width,te=L.height;U(W,te),(z=A.current)===null||z===void 0||z.call(A,W,te)};x>0&&(F=bN(F,x,{trailing:!0,leading:!1}));var J=new ResizeObserver(F),V=E.current.getBoundingClientRect(),K=V.width,Z=V.height;return U(K,Z),J.observe(E.current),function(){J.disconnect()}},[U,x]);var B=N.useMemo(function(){var F=M.containerWidth,J=M.containerHeight;if(F<0||J<0)return null;fi(Ba(s)||Ba(c),`The width(%s) and height(%s) are both fixed numbers,
|
|
381
|
-
maybe you don't need to use a ResponsiveContainer.`,s,c),fi(!r||r>0,"The aspect(%s) must be greater than zero.",r);var V=Ba(s)?F:s,K=Ba(c)?J:c;r&&r>0&&(V?K=V/r:K&&(V=K*r),g&&K>g&&(K=g)),fi(V>0||K>0,`The width(%s) and height(%s) of chart should be greater than 0,
|
|
382
|
-
please check the style of container, or the props width(%s) and height(%s),
|
|
383
|
-
or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
|
|
384
|
-
height and width.`,V,K,s,c,p,h,r);var Z=!Array.isArray(v)&&ci(v.type).endsWith("Chart");return $.Children.map(v,function(G){return $.isValidElement(G)?N.cloneElement(G,Cf({width:V,height:K},Z?{style:Cf({height:"100%",width:"100%",maxHeight:K,maxWidth:V},G.props.style)}:{})):G})},[r,v,c,g,h,p,M,s]);return $.createElement("div",{id:b?"".concat(b):void 0,className:Le("recharts-responsive-container",S),style:Cf(Cf({},T),{},{width:s,height:c,minWidth:p,minHeight:h,maxHeight:g}),ref:E},B)}),Rh=function(e){return null};Rh.displayName="Cell";function vu(t){"@babel/helpers - typeof";return vu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},vu(t)}function LP(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Wb(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?LP(Object(r),!0).forEach(function(n){K7(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):LP(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function K7(t,e,r){return e=G7(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function G7(t){var e=X7(t,"string");return vu(e)=="symbol"?e:e+""}function X7(t,e){if(vu(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(vu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Do={widthCache:{},cacheCount:0},Y7=2e3,J7={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},DP="recharts_measurement_span";function Q7(t){var e=Wb({},t);return Object.keys(e).forEach(function(r){e[r]||delete e[r]}),e}var Zl=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(e==null||no.isSsr)return{width:0,height:0};var n=Q7(r),i=JSON.stringify({text:e,copyStyle:n});if(Do.widthCache[i])return Do.widthCache[i];try{var a=document.getElementById(DP);a||(a=document.createElement("span"),a.setAttribute("id",DP),a.setAttribute("aria-hidden","true"),document.body.appendChild(a));var s=Wb(Wb({},J7),n);Object.assign(a.style,s),a.textContent="".concat(e);var u=a.getBoundingClientRect(),c={width:u.width,height:u.height};return Do.widthCache[i]=c,++Do.cacheCount>Y7&&(Do.cacheCount=0,Do.widthCache={}),c}catch{return{width:0,height:0}}},Z7=function(e){return{top:e.top+window.scrollY-document.documentElement.clientTop,left:e.left+window.scrollX-document.documentElement.clientLeft}};function yu(t){"@babel/helpers - typeof";return yu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},yu(t)}function xd(t,e){return nW(t)||rW(t,e)||tW(t,e)||eW()}function eW(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
385
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function tW(t,e){if(t){if(typeof t=="string")return BP(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return BP(t,e)}}function BP(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function rW(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,i,a,s,u=[],c=!0,f=!1;try{if(a=(r=r.call(t)).next,e===0){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(p){f=!0,i=p}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(f)throw i}}return u}}function nW(t){if(Array.isArray(t))return t}function iW(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function zP(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,oW(n.key),n)}}function aW(t,e,r){return e&&zP(t.prototype,e),r&&zP(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function oW(t){var e=sW(t,"string");return yu(e)=="symbol"?e:e+""}function sW(t,e){if(yu(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(yu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var qP=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,UP=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,lW=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,uW=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,wN={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},cW=Object.keys(wN),Vo="NaN";function fW(t,e){return t*wN[e]}var jf=(function(){function t(e,r){iW(this,t),this.num=e,this.unit=r,this.num=e,this.unit=r,Number.isNaN(e)&&(this.unit=""),r!==""&&!lW.test(r)&&(this.num=NaN,this.unit=""),cW.includes(r)&&(this.num=fW(e,r),this.unit="px")}return aW(t,[{key:"add",value:function(r){return this.unit!==r.unit?new t(NaN,""):new t(this.num+r.num,this.unit)}},{key:"subtract",value:function(r){return this.unit!==r.unit?new t(NaN,""):new t(this.num-r.num,this.unit)}},{key:"multiply",value:function(r){return this.unit!==""&&r.unit!==""&&this.unit!==r.unit?new t(NaN,""):new t(this.num*r.num,this.unit||r.unit)}},{key:"divide",value:function(r){return this.unit!==""&&r.unit!==""&&this.unit!==r.unit?new t(NaN,""):new t(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=uW.exec(r))!==null&&n!==void 0?n:[],a=xd(i,3),s=a[1],u=a[2];return new t(parseFloat(s),u??"")}}])})();function xN(t){if(t.includes(Vo))return Vo;for(var e=t;e.includes("*")||e.includes("/");){var r,n=(r=qP.exec(e))!==null&&r!==void 0?r:[],i=xd(n,4),a=i[1],s=i[2],u=i[3],c=jf.parse(a??""),f=jf.parse(u??""),p=s==="*"?c.multiply(f):c.divide(f);if(p.isNaN())return Vo;e=e.replace(qP,p.toString())}for(;e.includes("+")||/.-\d+(?:\.\d+)?/.test(e);){var h,g=(h=UP.exec(e))!==null&&h!==void 0?h:[],v=xd(g,4),y=v[1],x=v[2],b=v[3],S=jf.parse(y??""),O=jf.parse(b??""),k=x==="+"?S.add(O):S.subtract(O);if(k.isNaN())return Vo;e=e.replace(UP,k.toString())}return e}var FP=/\(([^()]*)\)/;function dW(t){for(var e=t;e.includes("(");){var r=FP.exec(e),n=xd(r,2),i=n[1];e=e.replace(FP,xN(i))}return e}function hW(t){var e=t.replace(/\s+/g,"");return e=dW(e),e=xN(e),e}function pW(t){try{return hW(t)}catch{return Vo}}function l0(t){var e=pW(t.slice(5,-1));return e===Vo?"":e}var mW=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],gW=["dx","dy","angle","className","breakAll"];function Hb(){return Hb=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Hb.apply(this,arguments)}function WP(t,e){if(t==null)return{};var r=vW(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function vW(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}function HP(t,e){return xW(t)||wW(t,e)||bW(t,e)||yW()}function yW(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
386
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function bW(t,e){if(t){if(typeof t=="string")return VP(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return VP(t,e)}}function VP(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function wW(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,i,a,s,u=[],c=!0,f=!1;try{if(a=(r=r.call(t)).next,e===0){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(p){f=!0,i=p}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(f)throw i}}return u}}function xW(t){if(Array.isArray(t))return t}var _N=/[ \f\n\r\t\v\u2028\u2029]+/,SN=function(e){var r=e.children,n=e.breakAll,i=e.style;try{var a=[];Me(r)||(n?a=r.toString().split(""):a=r.toString().split(_N));var s=a.map(function(c){return{word:c,width:Zl(c,i).width}}),u=n?0:Zl(" ",i).width;return{wordsWithComputedWidth:s,spaceWidth:u}}catch{return null}},_W=function(e,r,n,i,a){var s=e.maxLines,u=e.children,c=e.style,f=e.breakAll,p=fe(s),h=u,g=function(){var V=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return V.reduce(function(K,Z){var G=Z.word,ee=Z.width,z=K[K.length-1];if(z&&(i==null||a||z.width+ee+n<Number(i)))z.words.push(G),z.width+=ee+n;else{var L={words:[G],width:ee};K.push(L)}return K},[])},v=g(r),y=function(V){return V.reduce(function(K,Z){return K.width>Z.width?K:Z})};if(!p)return v;for(var x="…",b=function(V){var K=h.slice(0,V),Z=SN({breakAll:f,style:c,children:K+x}).wordsWithComputedWidth,G=g(Z),ee=G.length>s||y(G).width>Number(i);return[ee,G]},S=0,O=h.length-1,k=0,T;S<=O&&k<=h.length-1;){var E=Math.floor((S+O)/2),A=E-1,j=b(A),R=HP(j,2),M=R[0],H=R[1],U=b(E),B=HP(U,1),F=B[0];if(!M&&!F&&(S=E+1),M&&F&&(O=E-1),!M&&F){T=H;break}k++}return T||v},KP=function(e){var r=Me(e)?[]:e.toString().split(_N);return[{words:r}]},SW=function(e){var r=e.width,n=e.scaleToFit,i=e.children,a=e.style,s=e.breakAll,u=e.maxLines;if((r||n)&&!no.isSsr){var c,f,p=SN({breakAll:s,children:i,style:a});if(p){var h=p.wordsWithComputedWidth,g=p.spaceWidth;c=h,f=g}else return KP(i);return _W({breakAll:s,children:i,maxLines:u,style:a},c,f,r,n)}return KP(i)},GP="#808080",Ja=function(e){var r=e.x,n=r===void 0?0:r,i=e.y,a=i===void 0?0:i,s=e.lineHeight,u=s===void 0?"1em":s,c=e.capHeight,f=c===void 0?"0.71em":c,p=e.scaleToFit,h=p===void 0?!1:p,g=e.textAnchor,v=g===void 0?"start":g,y=e.verticalAnchor,x=y===void 0?"end":y,b=e.fill,S=b===void 0?GP:b,O=WP(e,mW),k=N.useMemo(function(){return SW({breakAll:O.breakAll,children:O.children,maxLines:O.maxLines,scaleToFit:h,style:O.style,width:O.width})},[O.breakAll,O.children,O.maxLines,h,O.style,O.width]),T=O.dx,E=O.dy,A=O.angle,j=O.className,R=O.breakAll,M=WP(O,gW);if(!Dt(n)||!Dt(a))return null;var H=n+(fe(T)?T:0),U=a+(fe(E)?E:0),B;switch(x){case"start":B=l0("calc(".concat(f,")"));break;case"middle":B=l0("calc(".concat((k.length-1)/2," * -").concat(u," + (").concat(f," / 2))"));break;default:B=l0("calc(".concat(k.length-1," * -").concat(u,")"));break}var F=[];if(h){var J=k[0].width,V=O.width;F.push("scale(".concat((fe(V)?V/J:1)/J,")"))}return A&&F.push("rotate(".concat(A,", ").concat(H,", ").concat(U,")")),F.length&&(M.transform=F.join(" ")),$.createElement("text",Hb({},Ee(M,!0),{x:H,y:U,className:Le("recharts-text",j),textAnchor:v,fill:S.includes("url")?GP:S}),k.map(function(K,Z){var G=K.words.join(R?"":" ");return $.createElement("tspan",{x:H,dy:Z===0?B:u,key:"".concat(G,"-").concat(Z)},G)}))};function ra(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function kW(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Bx(t){let e,r,n;t.length!==2?(e=ra,r=(u,c)=>ra(t(u),c),n=(u,c)=>t(u)-c):(e=t===ra||t===kW?t:OW,r=t,n=t);function i(u,c,f=0,p=u.length){if(f<p){if(e(c,c)!==0)return p;do{const h=f+p>>>1;r(u[h],c)<0?f=h+1:p=h}while(f<p)}return f}function a(u,c,f=0,p=u.length){if(f<p){if(e(c,c)!==0)return p;do{const h=f+p>>>1;r(u[h],c)<=0?f=h+1:p=h}while(f<p)}return f}function s(u,c,f=0,p=u.length){const h=i(u,c,f,p-1);return h>f&&n(u[h-1],c)>-n(u[h],c)?h-1:h}return{left:i,center:s,right:a}}function OW(){return 0}function kN(t){return t===null?NaN:+t}function*EW(t,e){for(let r of t)r!=null&&(r=+r)>=r&&(yield r)}const AW=Bx(ra),Zu=AW.right;Bx(kN).center;class XP extends Map{constructor(e,r=CW){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),e!=null)for(const[n,i]of e)this.set(n,i)}get(e){return super.get(YP(this,e))}has(e){return super.has(YP(this,e))}set(e,r){return super.set(PW(this,e),r)}delete(e){return super.delete(TW(this,e))}}function YP({_intern:t,_key:e},r){const n=e(r);return t.has(n)?t.get(n):r}function PW({_intern:t,_key:e},r){const n=e(r);return t.has(n)?t.get(n):(t.set(n,r),r)}function TW({_intern:t,_key:e},r){const n=e(r);return t.has(n)&&(r=t.get(n),t.delete(n)),r}function CW(t){return t!==null&&typeof t=="object"?t.valueOf():t}function jW(t=ra){if(t===ra)return ON;if(typeof t!="function")throw new TypeError("compare is not a function");return(e,r)=>{const n=t(e,r);return n||n===0?n:(t(r,r)===0)-(t(e,e)===0)}}function ON(t,e){return(t==null||!(t>=t))-(e==null||!(e>=e))||(t<e?-1:t>e?1:0)}const RW=Math.sqrt(50),NW=Math.sqrt(10),$W=Math.sqrt(2);function _d(t,e,r){const n=(e-t)/Math.max(0,r),i=Math.floor(Math.log10(n)),a=n/Math.pow(10,i),s=a>=RW?10:a>=NW?5:a>=$W?2:1;let u,c,f;return i<0?(f=Math.pow(10,-i)/s,u=Math.round(t*f),c=Math.round(e*f),u/f<t&&++u,c/f>e&&--c,f=-f):(f=Math.pow(10,i)*s,u=Math.round(t/f),c=Math.round(e/f),u*f<t&&++u,c*f>e&&--c),c<u&&.5<=r&&r<2?_d(t,e,r*2):[u,c,f]}function Vb(t,e,r){if(e=+e,t=+t,r=+r,!(r>0))return[];if(t===e)return[t];const n=e<t,[i,a,s]=n?_d(e,t,r):_d(t,e,r);if(!(a>=i))return[];const u=a-i+1,c=new Array(u);if(n)if(s<0)for(let f=0;f<u;++f)c[f]=(a-f)/-s;else for(let f=0;f<u;++f)c[f]=(a-f)*s;else if(s<0)for(let f=0;f<u;++f)c[f]=(i+f)/-s;else for(let f=0;f<u;++f)c[f]=(i+f)*s;return c}function Kb(t,e,r){return e=+e,t=+t,r=+r,_d(t,e,r)[2]}function Gb(t,e,r){e=+e,t=+t,r=+r;const n=e<t,i=n?Kb(e,t,r):Kb(t,e,r);return(n?-1:1)*(i<0?1/-i:i)}function JP(t,e){let r;for(const n of t)n!=null&&(r<n||r===void 0&&n>=n)&&(r=n);return r}function QP(t,e){let r;for(const n of t)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);return r}function EN(t,e,r=0,n=1/0,i){if(e=Math.floor(e),r=Math.floor(Math.max(0,r)),n=Math.floor(Math.min(t.length-1,n)),!(r<=e&&e<=n))return t;for(i=i===void 0?ON:jW(i);n>r;){if(n-r>600){const c=n-r+1,f=e-r+1,p=Math.log(c),h=.5*Math.exp(2*p/3),g=.5*Math.sqrt(p*h*(c-h)/c)*(f-c/2<0?-1:1),v=Math.max(r,Math.floor(e-f*h/c+g)),y=Math.min(n,Math.floor(e+(c-f)*h/c+g));EN(t,e,v,y,i)}const a=t[e];let s=r,u=n;for(Il(t,r,e),i(t[n],a)>0&&Il(t,r,n);s<u;){for(Il(t,s,u),++s,--u;i(t[s],a)<0;)++s;for(;i(t[u],a)>0;)--u}i(t[r],a)===0?Il(t,r,u):(++u,Il(t,u,n)),u<=e&&(r=u+1),e<=u&&(n=u-1)}return t}function Il(t,e,r){const n=t[e];t[e]=t[r],t[r]=n}function IW(t,e,r){if(t=Float64Array.from(EW(t)),!(!(n=t.length)||isNaN(e=+e))){if(e<=0||n<2)return QP(t);if(e>=1)return JP(t);var n,i=(n-1)*e,a=Math.floor(i),s=JP(EN(t,a).subarray(0,a+1)),u=QP(t.subarray(a+1));return s+(u-s)*(i-a)}}function MW(t,e,r=kN){if(!(!(n=t.length)||isNaN(e=+e))){if(e<=0||n<2)return+r(t[0],0,t);if(e>=1)return+r(t[n-1],n-1,t);var n,i=(n-1)*e,a=Math.floor(i),s=+r(t[a],a,t),u=+r(t[a+1],a+1,t);return s+(u-s)*(i-a)}}function LW(t,e,r){t=+t,e=+e,r=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+r;for(var n=-1,i=Math.max(0,Math.ceil((e-t)/r))|0,a=new Array(i);++n<i;)a[n]=t+n*r;return a}function an(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}function xi(t,e){switch(arguments.length){case 0:break;case 1:{typeof t=="function"?this.interpolator(t):this.range(t);break}default:{this.domain(t),typeof e=="function"?this.interpolator(e):this.range(e);break}}return this}const Xb=Symbol("implicit");function zx(){var t=new XP,e=[],r=[],n=Xb;function i(a){let s=t.get(a);if(s===void 0){if(n!==Xb)return n;t.set(a,s=e.push(a)-1)}return r[s%r.length]}return i.domain=function(a){if(!arguments.length)return e.slice();e=[],t=new XP;for(const s of a)t.has(s)||t.set(s,e.push(s)-1);return i},i.range=function(a){return arguments.length?(r=Array.from(a),i):r.slice()},i.unknown=function(a){return arguments.length?(n=a,i):n},i.copy=function(){return zx(e,r).unknown(n)},an.apply(i,arguments),i}function bu(){var t=zx().unknown(void 0),e=t.domain,r=t.range,n=0,i=1,a,s,u=!1,c=0,f=0,p=.5;delete t.unknown;function h(){var g=e().length,v=i<n,y=v?i:n,x=v?n:i;a=(x-y)/Math.max(1,g-c+f*2),u&&(a=Math.floor(a)),y+=(x-y-a*(g-c))*p,s=a*(1-c),u&&(y=Math.round(y),s=Math.round(s));var b=LW(g).map(function(S){return y+a*S});return r(v?b.reverse():b)}return t.domain=function(g){return arguments.length?(e(g),h()):e()},t.range=function(g){return arguments.length?([n,i]=g,n=+n,i=+i,h()):[n,i]},t.rangeRound=function(g){return[n,i]=g,n=+n,i=+i,u=!0,h()},t.bandwidth=function(){return s},t.step=function(){return a},t.round=function(g){return arguments.length?(u=!!g,h()):u},t.padding=function(g){return arguments.length?(c=Math.min(1,f=+g),h()):c},t.paddingInner=function(g){return arguments.length?(c=Math.min(1,g),h()):c},t.paddingOuter=function(g){return arguments.length?(f=+g,h()):f},t.align=function(g){return arguments.length?(p=Math.max(0,Math.min(1,g)),h()):p},t.copy=function(){return bu(e(),[n,i]).round(u).paddingInner(c).paddingOuter(f).align(p)},an.apply(h(),arguments)}function AN(t){var e=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return AN(e())},t}function eu(){return AN(bu.apply(null,arguments).paddingInner(1))}function qx(t,e,r){t.prototype=e.prototype=r,r.constructor=t}function PN(t,e){var r=Object.create(t.prototype);for(var n in e)r[n]=e[n];return r}function ec(){}var wu=.7,Sd=1/wu,ts="\\s*([+-]?\\d+)\\s*",xu="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Bn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",DW=/^#([0-9a-f]{3,8})$/,BW=new RegExp(`^rgb\\(${ts},${ts},${ts}\\)$`),zW=new RegExp(`^rgb\\(${Bn},${Bn},${Bn}\\)$`),qW=new RegExp(`^rgba\\(${ts},${ts},${ts},${xu}\\)$`),UW=new RegExp(`^rgba\\(${Bn},${Bn},${Bn},${xu}\\)$`),FW=new RegExp(`^hsl\\(${xu},${Bn},${Bn}\\)$`),WW=new RegExp(`^hsla\\(${xu},${Bn},${Bn},${xu}\\)$`),ZP={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};qx(ec,_u,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:eT,formatHex:eT,formatHex8:HW,formatHsl:VW,formatRgb:tT,toString:tT});function eT(){return this.rgb().formatHex()}function HW(){return this.rgb().formatHex8()}function VW(){return TN(this).formatHsl()}function tT(){return this.rgb().formatRgb()}function _u(t){var e,r;return t=(t+"").trim().toLowerCase(),(e=DW.exec(t))?(r=e[1].length,e=parseInt(e[1],16),r===6?rT(e):r===3?new kr(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):r===8?Rf(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):r===4?Rf(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=BW.exec(t))?new kr(e[1],e[2],e[3],1):(e=zW.exec(t))?new kr(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=qW.exec(t))?Rf(e[1],e[2],e[3],e[4]):(e=UW.exec(t))?Rf(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=FW.exec(t))?aT(e[1],e[2]/100,e[3]/100,1):(e=WW.exec(t))?aT(e[1],e[2]/100,e[3]/100,e[4]):ZP.hasOwnProperty(t)?rT(ZP[t]):t==="transparent"?new kr(NaN,NaN,NaN,0):null}function rT(t){return new kr(t>>16&255,t>>8&255,t&255,1)}function Rf(t,e,r,n){return n<=0&&(t=e=r=NaN),new kr(t,e,r,n)}function KW(t){return t instanceof ec||(t=_u(t)),t?(t=t.rgb(),new kr(t.r,t.g,t.b,t.opacity)):new kr}function Yb(t,e,r,n){return arguments.length===1?KW(t):new kr(t,e,r,n??1)}function kr(t,e,r,n){this.r=+t,this.g=+e,this.b=+r,this.opacity=+n}qx(kr,Yb,PN(ec,{brighter(t){return t=t==null?Sd:Math.pow(Sd,t),new kr(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?wu:Math.pow(wu,t),new kr(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new kr(Ha(this.r),Ha(this.g),Ha(this.b),kd(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:nT,formatHex:nT,formatHex8:GW,formatRgb:iT,toString:iT}));function nT(){return`#${za(this.r)}${za(this.g)}${za(this.b)}`}function GW(){return`#${za(this.r)}${za(this.g)}${za(this.b)}${za((isNaN(this.opacity)?1:this.opacity)*255)}`}function iT(){const t=kd(this.opacity);return`${t===1?"rgb(":"rgba("}${Ha(this.r)}, ${Ha(this.g)}, ${Ha(this.b)}${t===1?")":`, ${t})`}`}function kd(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Ha(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function za(t){return t=Ha(t),(t<16?"0":"")+t.toString(16)}function aT(t,e,r,n){return n<=0?t=e=r=NaN:r<=0||r>=1?t=e=NaN:e<=0&&(t=NaN),new _n(t,e,r,n)}function TN(t){if(t instanceof _n)return new _n(t.h,t.s,t.l,t.opacity);if(t instanceof ec||(t=_u(t)),!t)return new _n;if(t instanceof _n)return t;t=t.rgb();var e=t.r/255,r=t.g/255,n=t.b/255,i=Math.min(e,r,n),a=Math.max(e,r,n),s=NaN,u=a-i,c=(a+i)/2;return u?(e===a?s=(r-n)/u+(r<n)*6:r===a?s=(n-e)/u+2:s=(e-r)/u+4,u/=c<.5?a+i:2-a-i,s*=60):u=c>0&&c<1?0:s,new _n(s,u,c,t.opacity)}function XW(t,e,r,n){return arguments.length===1?TN(t):new _n(t,e,r,n??1)}function _n(t,e,r,n){this.h=+t,this.s=+e,this.l=+r,this.opacity=+n}qx(_n,XW,PN(ec,{brighter(t){return t=t==null?Sd:Math.pow(Sd,t),new _n(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?wu:Math.pow(wu,t),new _n(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*e,i=2*r-n;return new kr(u0(t>=240?t-240:t+120,i,n),u0(t,i,n),u0(t<120?t+240:t-120,i,n),this.opacity)},clamp(){return new _n(oT(this.h),Nf(this.s),Nf(this.l),kd(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 t=kd(this.opacity);return`${t===1?"hsl(":"hsla("}${oT(this.h)}, ${Nf(this.s)*100}%, ${Nf(this.l)*100}%${t===1?")":`, ${t})`}`}}));function oT(t){return t=(t||0)%360,t<0?t+360:t}function Nf(t){return Math.max(0,Math.min(1,t||0))}function u0(t,e,r){return(t<60?e+(r-e)*t/60:t<180?r:t<240?e+(r-e)*(240-t)/60:e)*255}const Ux=t=>()=>t;function YW(t,e){return function(r){return t+r*e}}function JW(t,e,r){return t=Math.pow(t,r),e=Math.pow(e,r)-t,r=1/r,function(n){return Math.pow(t+n*e,r)}}function QW(t){return(t=+t)==1?CN:function(e,r){return r-e?JW(e,r,t):Ux(isNaN(e)?r:e)}}function CN(t,e){var r=e-t;return r?YW(t,r):Ux(isNaN(t)?e:t)}const sT=(function t(e){var r=QW(e);function n(i,a){var s=r((i=Yb(i)).r,(a=Yb(a)).r),u=r(i.g,a.g),c=r(i.b,a.b),f=CN(i.opacity,a.opacity);return function(p){return i.r=s(p),i.g=u(p),i.b=c(p),i.opacity=f(p),i+""}}return n.gamma=t,n})(1);function ZW(t,e){e||(e=[]);var r=t?Math.min(e.length,t.length):0,n=e.slice(),i;return function(a){for(i=0;i<r;++i)n[i]=t[i]*(1-a)+e[i]*a;return n}}function eH(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function tH(t,e){var r=e?e.length:0,n=t?Math.min(r,t.length):0,i=new Array(n),a=new Array(r),s;for(s=0;s<n;++s)i[s]=qs(t[s],e[s]);for(;s<r;++s)a[s]=e[s];return function(u){for(s=0;s<n;++s)a[s]=i[s](u);return a}}function rH(t,e){var r=new Date;return t=+t,e=+e,function(n){return r.setTime(t*(1-n)+e*n),r}}function Od(t,e){return t=+t,e=+e,function(r){return t*(1-r)+e*r}}function nH(t,e){var r={},n={},i;(t===null||typeof t!="object")&&(t={}),(e===null||typeof e!="object")&&(e={});for(i in e)i in t?r[i]=qs(t[i],e[i]):n[i]=e[i];return function(a){for(i in r)n[i]=r[i](a);return n}}var Jb=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,c0=new RegExp(Jb.source,"g");function iH(t){return function(){return t}}function aH(t){return function(e){return t(e)+""}}function oH(t,e){var r=Jb.lastIndex=c0.lastIndex=0,n,i,a,s=-1,u=[],c=[];for(t=t+"",e=e+"";(n=Jb.exec(t))&&(i=c0.exec(e));)(a=i.index)>r&&(a=e.slice(r,a),u[s]?u[s]+=a:u[++s]=a),(n=n[0])===(i=i[0])?u[s]?u[s]+=i:u[++s]=i:(u[++s]=null,c.push({i:s,x:Od(n,i)})),r=c0.lastIndex;return r<e.length&&(a=e.slice(r),u[s]?u[s]+=a:u[++s]=a),u.length<2?c[0]?aH(c[0].x):iH(e):(e=c.length,function(f){for(var p=0,h;p<e;++p)u[(h=c[p]).i]=h.x(f);return u.join("")})}function qs(t,e){var r=typeof e,n;return e==null||r==="boolean"?Ux(e):(r==="number"?Od:r==="string"?(n=_u(e))?(e=n,sT):oH:e instanceof _u?sT:e instanceof Date?rH:eH(e)?ZW:Array.isArray(e)?tH:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?nH:Od)(t,e)}function Fx(t,e){return t=+t,e=+e,function(r){return Math.round(t*(1-r)+e*r)}}function sH(t,e){e===void 0&&(e=t,t=qs);for(var r=0,n=e.length-1,i=e[0],a=new Array(n<0?0:n);r<n;)a[r]=t(i,i=e[++r]);return function(s){var u=Math.max(0,Math.min(n-1,Math.floor(s*=n)));return a[u](s-u)}}function lH(t){return function(){return t}}function Ed(t){return+t}var lT=[0,1];function hr(t){return t}function Qb(t,e){return(e-=t=+t)?function(r){return(r-t)/e}:lH(isNaN(e)?NaN:.5)}function uH(t,e){var r;return t>e&&(r=t,t=e,e=r),function(n){return Math.max(t,Math.min(e,n))}}function cH(t,e,r){var n=t[0],i=t[1],a=e[0],s=e[1];return i<n?(n=Qb(i,n),a=r(s,a)):(n=Qb(n,i),a=r(a,s)),function(u){return a(n(u))}}function fH(t,e,r){var n=Math.min(t.length,e.length)-1,i=new Array(n),a=new Array(n),s=-1;for(t[n]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++s<n;)i[s]=Qb(t[s],t[s+1]),a[s]=r(e[s],e[s+1]);return function(u){var c=Zu(t,u,1,n)-1;return a[c](i[c](u))}}function tc(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function Nh(){var t=lT,e=lT,r=qs,n,i,a,s=hr,u,c,f;function p(){var g=Math.min(t.length,e.length);return s!==hr&&(s=uH(t[0],t[g-1])),u=g>2?fH:cH,c=f=null,h}function h(g){return g==null||isNaN(g=+g)?a:(c||(c=u(t.map(n),e,r)))(n(s(g)))}return h.invert=function(g){return s(i((f||(f=u(e,t.map(n),Od)))(g)))},h.domain=function(g){return arguments.length?(t=Array.from(g,Ed),p()):t.slice()},h.range=function(g){return arguments.length?(e=Array.from(g),p()):e.slice()},h.rangeRound=function(g){return e=Array.from(g),r=Fx,p()},h.clamp=function(g){return arguments.length?(s=g?!0:hr,p()):s!==hr},h.interpolate=function(g){return arguments.length?(r=g,p()):r},h.unknown=function(g){return arguments.length?(a=g,h):a},function(g,v){return n=g,i=v,p()}}function Wx(){return Nh()(hr,hr)}function dH(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function Ad(t,e){if(!isFinite(t)||t===0)return null;var r=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"),n=t.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+t.slice(r+1)]}function cs(t){return t=Ad(Math.abs(t)),t?t[1]:NaN}function hH(t,e){return function(r,n){for(var i=r.length,a=[],s=0,u=t[0],c=0;i>0&&u>0&&(c+u+1>n&&(u=Math.max(1,n-c)),a.push(r.substring(i-=u,i+u)),!((c+=u+1)>n));)u=t[s=(s+1)%t.length];return a.reverse().join(e)}}function pH(t){return function(e){return e.replace(/[0-9]/g,function(r){return t[+r]})}}var mH=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Su(t){if(!(e=mH.exec(t)))throw new Error("invalid format: "+t);var e;return new Hx({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}Su.prototype=Hx.prototype;function Hx(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.type+""}Hx.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 gH(t){e:for(var e=t.length,r=1,n=-1,i;r<e;++r)switch(t[r]){case".":n=i=r;break;case"0":n===0&&(n=r),i=r;break;default:if(!+t[r])break e;n>0&&(n=0);break}return n>0?t.slice(0,n)+t.slice(i+1):t}var Pd;function vH(t,e){var r=Ad(t,e);if(!r)return Pd=void 0,t.toPrecision(e);var n=r[0],i=r[1],a=i-(Pd=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,s=n.length;return a===s?n:a>s?n+new Array(a-s+1).join("0"):a>0?n.slice(0,a)+"."+n.slice(a):"0."+new Array(1-a).join("0")+Ad(t,Math.max(0,e+a-1))[0]}function uT(t,e){var r=Ad(t,e);if(!r)return t+"";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 cT={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:dH,e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>uT(t*100,e),r:uT,s:vH,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function fT(t){return t}var dT=Array.prototype.map,hT=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function yH(t){var e=t.grouping===void 0||t.thousands===void 0?fT:hH(dT.call(t.grouping,Number),t.thousands+""),r=t.currency===void 0?"":t.currency[0]+"",n=t.currency===void 0?"":t.currency[1]+"",i=t.decimal===void 0?".":t.decimal+"",a=t.numerals===void 0?fT:pH(dT.call(t.numerals,String)),s=t.percent===void 0?"%":t.percent+"",u=t.minus===void 0?"−":t.minus+"",c=t.nan===void 0?"NaN":t.nan+"";function f(h,g){h=Su(h);var v=h.fill,y=h.align,x=h.sign,b=h.symbol,S=h.zero,O=h.width,k=h.comma,T=h.precision,E=h.trim,A=h.type;A==="n"?(k=!0,A="g"):cT[A]||(T===void 0&&(T=12),E=!0,A="g"),(S||v==="0"&&y==="=")&&(S=!0,v="0",y="=");var j=(g&&g.prefix!==void 0?g.prefix:"")+(b==="$"?r:b==="#"&&/[boxX]/.test(A)?"0"+A.toLowerCase():""),R=(b==="$"?n:/[%p]/.test(A)?s:"")+(g&&g.suffix!==void 0?g.suffix:""),M=cT[A],H=/[defgprs%]/.test(A);T=T===void 0?6:/[gprs]/.test(A)?Math.max(1,Math.min(21,T)):Math.max(0,Math.min(20,T));function U(B){var F=j,J=R,V,K,Z;if(A==="c")J=M(B)+J,B="";else{B=+B;var G=B<0||1/B<0;if(B=isNaN(B)?c:M(Math.abs(B),T),E&&(B=gH(B)),G&&+B==0&&x!=="+"&&(G=!1),F=(G?x==="("?x:u:x==="-"||x==="("?"":x)+F,J=(A==="s"&&!isNaN(B)&&Pd!==void 0?hT[8+Pd/3]:"")+J+(G&&x==="("?")":""),H){for(V=-1,K=B.length;++V<K;)if(Z=B.charCodeAt(V),48>Z||Z>57){J=(Z===46?i+B.slice(V+1):B.slice(V))+J,B=B.slice(0,V);break}}}k&&!S&&(B=e(B,1/0));var ee=F.length+B.length+J.length,z=ee<O?new Array(O-ee+1).join(v):"";switch(k&&S&&(B=e(z+B,z.length?O-J.length:1/0),z=""),y){case"<":B=F+B+J+z;break;case"=":B=F+z+B+J;break;case"^":B=z.slice(0,ee=z.length>>1)+F+B+J+z.slice(ee);break;default:B=z+F+B+J;break}return a(B)}return U.toString=function(){return h+""},U}function p(h,g){var v=Math.max(-8,Math.min(8,Math.floor(cs(g)/3)))*3,y=Math.pow(10,-v),x=f((h=Su(h),h.type="f",h),{suffix:hT[8+v/3]});return function(b){return x(y*b)}}return{format:f,formatPrefix:p}}var $f,Vx,jN;bH({thousands:",",grouping:[3],currency:["$",""]});function bH(t){return $f=yH(t),Vx=$f.format,jN=$f.formatPrefix,$f}function wH(t){return Math.max(0,-cs(Math.abs(t)))}function xH(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(cs(e)/3)))*3-cs(Math.abs(t)))}function _H(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,cs(e)-cs(t))+1}function RN(t,e,r,n){var i=Gb(t,e,r),a;switch(n=Su(n??",f"),n.type){case"s":{var s=Math.max(Math.abs(t),Math.abs(e));return n.precision==null&&!isNaN(a=xH(i,s))&&(n.precision=a),jN(n,s)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(a=_H(i,Math.max(Math.abs(t),Math.abs(e))))&&(n.precision=a-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(a=wH(i))&&(n.precision=a-(n.type==="%")*2);break}}return Vx(n)}function aa(t){var e=t.domain;return t.ticks=function(r){var n=e();return Vb(n[0],n[n.length-1],r??10)},t.tickFormat=function(r,n){var i=e();return RN(i[0],i[i.length-1],r??10,n)},t.nice=function(r){r==null&&(r=10);var n=e(),i=0,a=n.length-1,s=n[i],u=n[a],c,f,p=10;for(u<s&&(f=s,s=u,u=f,f=i,i=a,a=f);p-- >0;){if(f=Kb(s,u,r),f===c)return n[i]=s,n[a]=u,e(n);if(f>0)s=Math.floor(s/f)*f,u=Math.ceil(u/f)*f;else if(f<0)s=Math.ceil(s*f)/f,u=Math.floor(u*f)/f;else break;c=f}return t},t}function Td(){var t=Wx();return t.copy=function(){return tc(t,Td())},an.apply(t,arguments),aa(t)}function NN(t){var e;function r(n){return n==null||isNaN(n=+n)?e:n}return r.invert=r,r.domain=r.range=function(n){return arguments.length?(t=Array.from(n,Ed),r):t.slice()},r.unknown=function(n){return arguments.length?(e=n,r):e},r.copy=function(){return NN(t).unknown(e)},t=arguments.length?Array.from(t,Ed):[0,1],aa(r)}function $N(t,e){t=t.slice();var r=0,n=t.length-1,i=t[r],a=t[n],s;return a<i&&(s=r,r=n,n=s,s=i,i=a,a=s),t[r]=e.floor(i),t[n]=e.ceil(a),t}function pT(t){return Math.log(t)}function mT(t){return Math.exp(t)}function SH(t){return-Math.log(-t)}function kH(t){return-Math.exp(-t)}function OH(t){return isFinite(t)?+("1e"+t):t<0?0:t}function EH(t){return t===10?OH:t===Math.E?Math.exp:e=>Math.pow(t,e)}function AH(t){return t===Math.E?Math.log:t===10&&Math.log10||t===2&&Math.log2||(t=Math.log(t),e=>Math.log(e)/t)}function gT(t){return(e,r)=>-t(-e,r)}function Kx(t){const e=t(pT,mT),r=e.domain;let n=10,i,a;function s(){return i=AH(n),a=EH(n),r()[0]<0?(i=gT(i),a=gT(a),t(SH,kH)):t(pT,mT),e}return e.base=function(u){return arguments.length?(n=+u,s()):n},e.domain=function(u){return arguments.length?(r(u),s()):r()},e.ticks=u=>{const c=r();let f=c[0],p=c[c.length-1];const h=p<f;h&&([f,p]=[p,f]);let g=i(f),v=i(p),y,x;const b=u==null?10:+u;let S=[];if(!(n%1)&&v-g<b){if(g=Math.floor(g),v=Math.ceil(v),f>0){for(;g<=v;++g)for(y=1;y<n;++y)if(x=g<0?y/a(-g):y*a(g),!(x<f)){if(x>p)break;S.push(x)}}else for(;g<=v;++g)for(y=n-1;y>=1;--y)if(x=g>0?y/a(-g):y*a(g),!(x<f)){if(x>p)break;S.push(x)}S.length*2<b&&(S=Vb(f,p,b))}else S=Vb(g,v,Math.min(v-g,b)).map(a);return h?S.reverse():S},e.tickFormat=(u,c)=>{if(u==null&&(u=10),c==null&&(c=n===10?"s":","),typeof c!="function"&&(!(n%1)&&(c=Su(c)).precision==null&&(c.trim=!0),c=Vx(c)),u===1/0)return c;const f=Math.max(1,n*u/e.ticks().length);return p=>{let h=p/a(Math.round(i(p)));return h*n<n-.5&&(h*=n),h<=f?c(p):""}},e.nice=()=>r($N(r(),{floor:u=>a(Math.floor(i(u))),ceil:u=>a(Math.ceil(i(u)))})),e}function IN(){const t=Kx(Nh()).domain([1,10]);return t.copy=()=>tc(t,IN()).base(t.base()),an.apply(t,arguments),t}function vT(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function yT(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function Gx(t){var e=1,r=t(vT(e),yT(e));return r.constant=function(n){return arguments.length?t(vT(e=+n),yT(e)):e},aa(r)}function MN(){var t=Gx(Nh());return t.copy=function(){return tc(t,MN()).constant(t.constant())},an.apply(t,arguments)}function bT(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function PH(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function TH(t){return t<0?-t*t:t*t}function Xx(t){var e=t(hr,hr),r=1;function n(){return r===1?t(hr,hr):r===.5?t(PH,TH):t(bT(r),bT(1/r))}return e.exponent=function(i){return arguments.length?(r=+i,n()):r},aa(e)}function Yx(){var t=Xx(Nh());return t.copy=function(){return tc(t,Yx()).exponent(t.exponent())},an.apply(t,arguments),t}function CH(){return Yx.apply(null,arguments).exponent(.5)}function wT(t){return Math.sign(t)*t*t}function jH(t){return Math.sign(t)*Math.sqrt(Math.abs(t))}function LN(){var t=Wx(),e=[0,1],r=!1,n;function i(a){var s=jH(t(a));return isNaN(s)?n:r?Math.round(s):s}return i.invert=function(a){return t.invert(wT(a))},i.domain=function(a){return arguments.length?(t.domain(a),i):t.domain()},i.range=function(a){return arguments.length?(t.range((e=Array.from(a,Ed)).map(wT)),i):e.slice()},i.rangeRound=function(a){return i.range(a).round(!0)},i.round=function(a){return arguments.length?(r=!!a,i):r},i.clamp=function(a){return arguments.length?(t.clamp(a),i):t.clamp()},i.unknown=function(a){return arguments.length?(n=a,i):n},i.copy=function(){return LN(t.domain(),e).round(r).clamp(t.clamp()).unknown(n)},an.apply(i,arguments),aa(i)}function DN(){var t=[],e=[],r=[],n;function i(){var s=0,u=Math.max(1,e.length);for(r=new Array(u-1);++s<u;)r[s-1]=MW(t,s/u);return a}function a(s){return s==null||isNaN(s=+s)?n:e[Zu(r,s)]}return a.invertExtent=function(s){var u=e.indexOf(s);return u<0?[NaN,NaN]:[u>0?r[u-1]:t[0],u<r.length?r[u]:t[t.length-1]]},a.domain=function(s){if(!arguments.length)return t.slice();t=[];for(let u of s)u!=null&&!isNaN(u=+u)&&t.push(u);return t.sort(ra),i()},a.range=function(s){return arguments.length?(e=Array.from(s),i()):e.slice()},a.unknown=function(s){return arguments.length?(n=s,a):n},a.quantiles=function(){return r.slice()},a.copy=function(){return DN().domain(t).range(e).unknown(n)},an.apply(a,arguments)}function BN(){var t=0,e=1,r=1,n=[.5],i=[0,1],a;function s(c){return c!=null&&c<=c?i[Zu(n,c,0,r)]:a}function u(){var c=-1;for(n=new Array(r);++c<r;)n[c]=((c+1)*e-(c-r)*t)/(r+1);return s}return s.domain=function(c){return arguments.length?([t,e]=c,t=+t,e=+e,u()):[t,e]},s.range=function(c){return arguments.length?(r=(i=Array.from(c)).length-1,u()):i.slice()},s.invertExtent=function(c){var f=i.indexOf(c);return f<0?[NaN,NaN]:f<1?[t,n[0]]:f>=r?[n[r-1],e]:[n[f-1],n[f]]},s.unknown=function(c){return arguments.length&&(a=c),s},s.thresholds=function(){return n.slice()},s.copy=function(){return BN().domain([t,e]).range(i).unknown(a)},an.apply(aa(s),arguments)}function zN(){var t=[.5],e=[0,1],r,n=1;function i(a){return a!=null&&a<=a?e[Zu(t,a,0,n)]:r}return i.domain=function(a){return arguments.length?(t=Array.from(a),n=Math.min(t.length,e.length-1),i):t.slice()},i.range=function(a){return arguments.length?(e=Array.from(a),n=Math.min(t.length,e.length-1),i):e.slice()},i.invertExtent=function(a){var s=e.indexOf(a);return[t[s-1],t[s]]},i.unknown=function(a){return arguments.length?(r=a,i):r},i.copy=function(){return zN().domain(t).range(e).unknown(r)},an.apply(i,arguments)}const f0=new Date,d0=new Date;function Bt(t,e,r,n){function i(a){return t(a=arguments.length===0?new Date:new Date(+a)),a}return i.floor=a=>(t(a=new Date(+a)),a),i.ceil=a=>(t(a=new Date(a-1)),e(a,1),t(a),a),i.round=a=>{const s=i(a),u=i.ceil(a);return a-s<u-a?s:u},i.offset=(a,s)=>(e(a=new Date(+a),s==null?1:Math.floor(s)),a),i.range=(a,s,u)=>{const c=[];if(a=i.ceil(a),u=u==null?1:Math.floor(u),!(a<s)||!(u>0))return c;let f;do c.push(f=new Date(+a)),e(a,u),t(a);while(f<a&&a<s);return c},i.filter=a=>Bt(s=>{if(s>=s)for(;t(s),!a(s);)s.setTime(s-1)},(s,u)=>{if(s>=s)if(u<0)for(;++u<=0;)for(;e(s,-1),!a(s););else for(;--u>=0;)for(;e(s,1),!a(s););}),r&&(i.count=(a,s)=>(f0.setTime(+a),d0.setTime(+s),t(f0),t(d0),Math.floor(r(f0,d0))),i.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?i.filter(n?s=>n(s)%a===0:s=>i.count(0,s)%a===0):i)),i}const Cd=Bt(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);Cd.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?Bt(e=>{e.setTime(Math.floor(e/t)*t)},(e,r)=>{e.setTime(+e+r*t)},(e,r)=>(r-e)/t):Cd);Cd.range;const si=1e3,en=si*60,li=en*60,mi=li*24,Jx=mi*7,xT=mi*30,h0=mi*365,qa=Bt(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*si)},(t,e)=>(e-t)/si,t=>t.getUTCSeconds());qa.range;const Qx=Bt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*si)},(t,e)=>{t.setTime(+t+e*en)},(t,e)=>(e-t)/en,t=>t.getMinutes());Qx.range;const Zx=Bt(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*en)},(t,e)=>(e-t)/en,t=>t.getUTCMinutes());Zx.range;const e1=Bt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*si-t.getMinutes()*en)},(t,e)=>{t.setTime(+t+e*li)},(t,e)=>(e-t)/li,t=>t.getHours());e1.range;const t1=Bt(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*li)},(t,e)=>(e-t)/li,t=>t.getUTCHours());t1.range;const rc=Bt(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*en)/mi,t=>t.getDate()-1);rc.range;const $h=Bt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/mi,t=>t.getUTCDate()-1);$h.range;const qN=Bt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/mi,t=>Math.floor(t/mi));qN.range;function io(t){return Bt(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,r)=>{e.setDate(e.getDate()+r*7)},(e,r)=>(r-e-(r.getTimezoneOffset()-e.getTimezoneOffset())*en)/Jx)}const Ih=io(0),jd=io(1),RH=io(2),NH=io(3),fs=io(4),$H=io(5),IH=io(6);Ih.range;jd.range;RH.range;NH.range;fs.range;$H.range;IH.range;function ao(t){return Bt(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCDate(e.getUTCDate()+r*7)},(e,r)=>(r-e)/Jx)}const Mh=ao(0),Rd=ao(1),MH=ao(2),LH=ao(3),ds=ao(4),DH=ao(5),BH=ao(6);Mh.range;Rd.range;MH.range;LH.range;ds.range;DH.range;BH.range;const r1=Bt(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth());r1.range;const n1=Bt(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth());n1.range;const gi=Bt(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear());gi.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:Bt(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,r)=>{e.setFullYear(e.getFullYear()+r*t)});gi.range;const vi=Bt(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());vi.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:Bt(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCFullYear(e.getUTCFullYear()+r*t)});vi.range;function UN(t,e,r,n,i,a){const s=[[qa,1,si],[qa,5,5*si],[qa,15,15*si],[qa,30,30*si],[a,1,en],[a,5,5*en],[a,15,15*en],[a,30,30*en],[i,1,li],[i,3,3*li],[i,6,6*li],[i,12,12*li],[n,1,mi],[n,2,2*mi],[r,1,Jx],[e,1,xT],[e,3,3*xT],[t,1,h0]];function u(f,p,h){const g=p<f;g&&([f,p]=[p,f]);const v=h&&typeof h.range=="function"?h:c(f,p,h),y=v?v.range(f,+p+1):[];return g?y.reverse():y}function c(f,p,h){const g=Math.abs(p-f)/h,v=Bx(([,,b])=>b).right(s,g);if(v===s.length)return t.every(Gb(f/h0,p/h0,h));if(v===0)return Cd.every(Math.max(Gb(f,p,h),1));const[y,x]=s[g/s[v-1][2]<s[v][2]/g?v-1:v];return y.every(x)}return[u,c]}const[zH,qH]=UN(vi,n1,Mh,qN,t1,Zx),[UH,FH]=UN(gi,r1,Ih,rc,e1,Qx);function p0(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function m0(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function Ml(t,e,r){return{y:t,m:e,d:r,H:0,M:0,S:0,L:0}}function WH(t){var e=t.dateTime,r=t.date,n=t.time,i=t.periods,a=t.days,s=t.shortDays,u=t.months,c=t.shortMonths,f=Ll(i),p=Dl(i),h=Ll(a),g=Dl(a),v=Ll(s),y=Dl(s),x=Ll(u),b=Dl(u),S=Ll(c),O=Dl(c),k={a:Z,A:G,b:ee,B:z,c:null,d:AT,e:AT,f:hV,g:SV,G:OV,H:cV,I:fV,j:dV,L:FN,m:pV,M:mV,p:L,q:W,Q:CT,s:jT,S:gV,u:vV,U:yV,V:bV,w:wV,W:xV,x:null,X:null,y:_V,Y:kV,Z:EV,"%":TT},T={a:te,A:ue,b:le,B:de,c:null,d:PT,e:PT,f:CV,g:zV,G:UV,H:AV,I:PV,j:TV,L:HN,m:jV,M:RV,p:Re,q:pe,Q:CT,s:jT,S:NV,u:$V,U:IV,V:MV,w:LV,W:DV,x:null,X:null,y:BV,Y:qV,Z:FV,"%":TT},E={a:H,A:U,b:B,B:F,c:J,d:OT,e:OT,f:oV,g:kT,G:ST,H:ET,I:ET,j:rV,L:aV,m:tV,M:nV,p:M,q:eV,Q:lV,s:uV,S:iV,u:XH,U:YH,V:JH,w:GH,W:QH,x:V,X:K,y:kT,Y:ST,Z:ZH,"%":sV};k.x=A(r,k),k.X=A(n,k),k.c=A(e,k),T.x=A(r,T),T.X=A(n,T),T.c=A(e,T);function A(ne,_e){return function(Oe){var ie=[],Fe=-1,Ne=0,ft=ne.length,ot,dt,pr;for(Oe instanceof Date||(Oe=new Date(+Oe));++Fe<ft;)ne.charCodeAt(Fe)===37&&(ie.push(ne.slice(Ne,Fe)),(dt=_T[ot=ne.charAt(++Fe)])!=null?ot=ne.charAt(++Fe):dt=ot==="e"?" ":"0",(pr=_e[ot])&&(ot=pr(Oe,dt)),ie.push(ot),Ne=Fe+1);return ie.push(ne.slice(Ne,Fe)),ie.join("")}}function j(ne,_e){return function(Oe){var ie=Ml(1900,void 0,1),Fe=R(ie,ne,Oe+="",0),Ne,ft;if(Fe!=Oe.length)return null;if("Q"in ie)return new Date(ie.Q);if("s"in ie)return new Date(ie.s*1e3+("L"in ie?ie.L:0));if(_e&&!("Z"in ie)&&(ie.Z=0),"p"in ie&&(ie.H=ie.H%12+ie.p*12),ie.m===void 0&&(ie.m="q"in ie?ie.q:0),"V"in ie){if(ie.V<1||ie.V>53)return null;"w"in ie||(ie.w=1),"Z"in ie?(Ne=m0(Ml(ie.y,0,1)),ft=Ne.getUTCDay(),Ne=ft>4||ft===0?Rd.ceil(Ne):Rd(Ne),Ne=$h.offset(Ne,(ie.V-1)*7),ie.y=Ne.getUTCFullYear(),ie.m=Ne.getUTCMonth(),ie.d=Ne.getUTCDate()+(ie.w+6)%7):(Ne=p0(Ml(ie.y,0,1)),ft=Ne.getDay(),Ne=ft>4||ft===0?jd.ceil(Ne):jd(Ne),Ne=rc.offset(Ne,(ie.V-1)*7),ie.y=Ne.getFullYear(),ie.m=Ne.getMonth(),ie.d=Ne.getDate()+(ie.w+6)%7)}else("W"in ie||"U"in ie)&&("w"in ie||(ie.w="u"in ie?ie.u%7:"W"in ie?1:0),ft="Z"in ie?m0(Ml(ie.y,0,1)).getUTCDay():p0(Ml(ie.y,0,1)).getDay(),ie.m=0,ie.d="W"in ie?(ie.w+6)%7+ie.W*7-(ft+5)%7:ie.w+ie.U*7-(ft+6)%7);return"Z"in ie?(ie.H+=ie.Z/100|0,ie.M+=ie.Z%100,m0(ie)):p0(ie)}}function R(ne,_e,Oe,ie){for(var Fe=0,Ne=_e.length,ft=Oe.length,ot,dt;Fe<Ne;){if(ie>=ft)return-1;if(ot=_e.charCodeAt(Fe++),ot===37){if(ot=_e.charAt(Fe++),dt=E[ot in _T?_e.charAt(Fe++):ot],!dt||(ie=dt(ne,Oe,ie))<0)return-1}else if(ot!=Oe.charCodeAt(ie++))return-1}return ie}function M(ne,_e,Oe){var ie=f.exec(_e.slice(Oe));return ie?(ne.p=p.get(ie[0].toLowerCase()),Oe+ie[0].length):-1}function H(ne,_e,Oe){var ie=v.exec(_e.slice(Oe));return ie?(ne.w=y.get(ie[0].toLowerCase()),Oe+ie[0].length):-1}function U(ne,_e,Oe){var ie=h.exec(_e.slice(Oe));return ie?(ne.w=g.get(ie[0].toLowerCase()),Oe+ie[0].length):-1}function B(ne,_e,Oe){var ie=S.exec(_e.slice(Oe));return ie?(ne.m=O.get(ie[0].toLowerCase()),Oe+ie[0].length):-1}function F(ne,_e,Oe){var ie=x.exec(_e.slice(Oe));return ie?(ne.m=b.get(ie[0].toLowerCase()),Oe+ie[0].length):-1}function J(ne,_e,Oe){return R(ne,e,_e,Oe)}function V(ne,_e,Oe){return R(ne,r,_e,Oe)}function K(ne,_e,Oe){return R(ne,n,_e,Oe)}function Z(ne){return s[ne.getDay()]}function G(ne){return a[ne.getDay()]}function ee(ne){return c[ne.getMonth()]}function z(ne){return u[ne.getMonth()]}function L(ne){return i[+(ne.getHours()>=12)]}function W(ne){return 1+~~(ne.getMonth()/3)}function te(ne){return s[ne.getUTCDay()]}function ue(ne){return a[ne.getUTCDay()]}function le(ne){return c[ne.getUTCMonth()]}function de(ne){return u[ne.getUTCMonth()]}function Re(ne){return i[+(ne.getUTCHours()>=12)]}function pe(ne){return 1+~~(ne.getUTCMonth()/3)}return{format:function(ne){var _e=A(ne+="",k);return _e.toString=function(){return ne},_e},parse:function(ne){var _e=j(ne+="",!1);return _e.toString=function(){return ne},_e},utcFormat:function(ne){var _e=A(ne+="",T);return _e.toString=function(){return ne},_e},utcParse:function(ne){var _e=j(ne+="",!0);return _e.toString=function(){return ne},_e}}}var _T={"-":"",_:" ",0:"0"},Gt=/^\s*\d+/,HH=/^%/,VH=/[\\^$*+?|[\]().{}]/g;function Ke(t,e,r){var n=t<0?"-":"",i=(n?-t:t)+"",a=i.length;return n+(a<r?new Array(r-a+1).join(e)+i:i)}function KH(t){return t.replace(VH,"\\$&")}function Ll(t){return new RegExp("^(?:"+t.map(KH).join("|")+")","i")}function Dl(t){return new Map(t.map((e,r)=>[e.toLowerCase(),r]))}function GH(t,e,r){var n=Gt.exec(e.slice(r,r+1));return n?(t.w=+n[0],r+n[0].length):-1}function XH(t,e,r){var n=Gt.exec(e.slice(r,r+1));return n?(t.u=+n[0],r+n[0].length):-1}function YH(t,e,r){var n=Gt.exec(e.slice(r,r+2));return n?(t.U=+n[0],r+n[0].length):-1}function JH(t,e,r){var n=Gt.exec(e.slice(r,r+2));return n?(t.V=+n[0],r+n[0].length):-1}function QH(t,e,r){var n=Gt.exec(e.slice(r,r+2));return n?(t.W=+n[0],r+n[0].length):-1}function ST(t,e,r){var n=Gt.exec(e.slice(r,r+4));return n?(t.y=+n[0],r+n[0].length):-1}function kT(t,e,r){var n=Gt.exec(e.slice(r,r+2));return n?(t.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function ZH(t,e,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(r,r+6));return n?(t.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function eV(t,e,r){var n=Gt.exec(e.slice(r,r+1));return n?(t.q=n[0]*3-3,r+n[0].length):-1}function tV(t,e,r){var n=Gt.exec(e.slice(r,r+2));return n?(t.m=n[0]-1,r+n[0].length):-1}function OT(t,e,r){var n=Gt.exec(e.slice(r,r+2));return n?(t.d=+n[0],r+n[0].length):-1}function rV(t,e,r){var n=Gt.exec(e.slice(r,r+3));return n?(t.m=0,t.d=+n[0],r+n[0].length):-1}function ET(t,e,r){var n=Gt.exec(e.slice(r,r+2));return n?(t.H=+n[0],r+n[0].length):-1}function nV(t,e,r){var n=Gt.exec(e.slice(r,r+2));return n?(t.M=+n[0],r+n[0].length):-1}function iV(t,e,r){var n=Gt.exec(e.slice(r,r+2));return n?(t.S=+n[0],r+n[0].length):-1}function aV(t,e,r){var n=Gt.exec(e.slice(r,r+3));return n?(t.L=+n[0],r+n[0].length):-1}function oV(t,e,r){var n=Gt.exec(e.slice(r,r+6));return n?(t.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function sV(t,e,r){var n=HH.exec(e.slice(r,r+1));return n?r+n[0].length:-1}function lV(t,e,r){var n=Gt.exec(e.slice(r));return n?(t.Q=+n[0],r+n[0].length):-1}function uV(t,e,r){var n=Gt.exec(e.slice(r));return n?(t.s=+n[0],r+n[0].length):-1}function AT(t,e){return Ke(t.getDate(),e,2)}function cV(t,e){return Ke(t.getHours(),e,2)}function fV(t,e){return Ke(t.getHours()%12||12,e,2)}function dV(t,e){return Ke(1+rc.count(gi(t),t),e,3)}function FN(t,e){return Ke(t.getMilliseconds(),e,3)}function hV(t,e){return FN(t,e)+"000"}function pV(t,e){return Ke(t.getMonth()+1,e,2)}function mV(t,e){return Ke(t.getMinutes(),e,2)}function gV(t,e){return Ke(t.getSeconds(),e,2)}function vV(t){var e=t.getDay();return e===0?7:e}function yV(t,e){return Ke(Ih.count(gi(t)-1,t),e,2)}function WN(t){var e=t.getDay();return e>=4||e===0?fs(t):fs.ceil(t)}function bV(t,e){return t=WN(t),Ke(fs.count(gi(t),t)+(gi(t).getDay()===4),e,2)}function wV(t){return t.getDay()}function xV(t,e){return Ke(jd.count(gi(t)-1,t),e,2)}function _V(t,e){return Ke(t.getFullYear()%100,e,2)}function SV(t,e){return t=WN(t),Ke(t.getFullYear()%100,e,2)}function kV(t,e){return Ke(t.getFullYear()%1e4,e,4)}function OV(t,e){var r=t.getDay();return t=r>=4||r===0?fs(t):fs.ceil(t),Ke(t.getFullYear()%1e4,e,4)}function EV(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+Ke(e/60|0,"0",2)+Ke(e%60,"0",2)}function PT(t,e){return Ke(t.getUTCDate(),e,2)}function AV(t,e){return Ke(t.getUTCHours(),e,2)}function PV(t,e){return Ke(t.getUTCHours()%12||12,e,2)}function TV(t,e){return Ke(1+$h.count(vi(t),t),e,3)}function HN(t,e){return Ke(t.getUTCMilliseconds(),e,3)}function CV(t,e){return HN(t,e)+"000"}function jV(t,e){return Ke(t.getUTCMonth()+1,e,2)}function RV(t,e){return Ke(t.getUTCMinutes(),e,2)}function NV(t,e){return Ke(t.getUTCSeconds(),e,2)}function $V(t){var e=t.getUTCDay();return e===0?7:e}function IV(t,e){return Ke(Mh.count(vi(t)-1,t),e,2)}function VN(t){var e=t.getUTCDay();return e>=4||e===0?ds(t):ds.ceil(t)}function MV(t,e){return t=VN(t),Ke(ds.count(vi(t),t)+(vi(t).getUTCDay()===4),e,2)}function LV(t){return t.getUTCDay()}function DV(t,e){return Ke(Rd.count(vi(t)-1,t),e,2)}function BV(t,e){return Ke(t.getUTCFullYear()%100,e,2)}function zV(t,e){return t=VN(t),Ke(t.getUTCFullYear()%100,e,2)}function qV(t,e){return Ke(t.getUTCFullYear()%1e4,e,4)}function UV(t,e){var r=t.getUTCDay();return t=r>=4||r===0?ds(t):ds.ceil(t),Ke(t.getUTCFullYear()%1e4,e,4)}function FV(){return"+0000"}function TT(){return"%"}function CT(t){return+t}function jT(t){return Math.floor(+t/1e3)}var Bo,KN,GN;WV({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 WV(t){return Bo=WH(t),KN=Bo.format,Bo.parse,GN=Bo.utcFormat,Bo.utcParse,Bo}function HV(t){return new Date(t)}function VV(t){return t instanceof Date?+t:+new Date(+t)}function i1(t,e,r,n,i,a,s,u,c,f){var p=Wx(),h=p.invert,g=p.domain,v=f(".%L"),y=f(":%S"),x=f("%I:%M"),b=f("%I %p"),S=f("%a %d"),O=f("%b %d"),k=f("%B"),T=f("%Y");function E(A){return(c(A)<A?v:u(A)<A?y:s(A)<A?x:a(A)<A?b:n(A)<A?i(A)<A?S:O:r(A)<A?k:T)(A)}return p.invert=function(A){return new Date(h(A))},p.domain=function(A){return arguments.length?g(Array.from(A,VV)):g().map(HV)},p.ticks=function(A){var j=g();return t(j[0],j[j.length-1],A??10)},p.tickFormat=function(A,j){return j==null?E:f(j)},p.nice=function(A){var j=g();return(!A||typeof A.range!="function")&&(A=e(j[0],j[j.length-1],A??10)),A?g($N(j,A)):p},p.copy=function(){return tc(p,i1(t,e,r,n,i,a,s,u,c,f))},p}function KV(){return an.apply(i1(UH,FH,gi,r1,Ih,rc,e1,Qx,qa,KN).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function GV(){return an.apply(i1(zH,qH,vi,n1,Mh,$h,t1,Zx,qa,GN).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Lh(){var t=0,e=1,r,n,i,a,s=hr,u=!1,c;function f(h){return h==null||isNaN(h=+h)?c:s(i===0?.5:(h=(a(h)-r)*i,u?Math.max(0,Math.min(1,h)):h))}f.domain=function(h){return arguments.length?([t,e]=h,r=a(t=+t),n=a(e=+e),i=r===n?0:1/(n-r),f):[t,e]},f.clamp=function(h){return arguments.length?(u=!!h,f):u},f.interpolator=function(h){return arguments.length?(s=h,f):s};function p(h){return function(g){var v,y;return arguments.length?([v,y]=g,s=h(v,y),f):[s(0),s(1)]}}return f.range=p(qs),f.rangeRound=p(Fx),f.unknown=function(h){return arguments.length?(c=h,f):c},function(h){return a=h,r=h(t),n=h(e),i=r===n?0:1/(n-r),f}}function oa(t,e){return e.domain(t.domain()).interpolator(t.interpolator()).clamp(t.clamp()).unknown(t.unknown())}function XN(){var t=aa(Lh()(hr));return t.copy=function(){return oa(t,XN())},xi.apply(t,arguments)}function YN(){var t=Kx(Lh()).domain([1,10]);return t.copy=function(){return oa(t,YN()).base(t.base())},xi.apply(t,arguments)}function JN(){var t=Gx(Lh());return t.copy=function(){return oa(t,JN()).constant(t.constant())},xi.apply(t,arguments)}function a1(){var t=Xx(Lh());return t.copy=function(){return oa(t,a1()).exponent(t.exponent())},xi.apply(t,arguments)}function XV(){return a1.apply(null,arguments).exponent(.5)}function QN(){var t=[],e=hr;function r(n){if(n!=null&&!isNaN(n=+n))return e((Zu(t,n,1)-1)/(t.length-1))}return r.domain=function(n){if(!arguments.length)return t.slice();t=[];for(let i of n)i!=null&&!isNaN(i=+i)&&t.push(i);return t.sort(ra),r},r.interpolator=function(n){return arguments.length?(e=n,r):e},r.range=function(){return t.map((n,i)=>e(i/(t.length-1)))},r.quantiles=function(n){return Array.from({length:n+1},(i,a)=>IW(t,a/n))},r.copy=function(){return QN(e).domain(t)},xi.apply(r,arguments)}function Dh(){var t=0,e=.5,r=1,n=1,i,a,s,u,c,f=hr,p,h=!1,g;function v(x){return isNaN(x=+x)?g:(x=.5+((x=+p(x))-a)*(n*x<n*a?u:c),f(h?Math.max(0,Math.min(1,x)):x))}v.domain=function(x){return arguments.length?([t,e,r]=x,i=p(t=+t),a=p(e=+e),s=p(r=+r),u=i===a?0:.5/(a-i),c=a===s?0:.5/(s-a),n=a<i?-1:1,v):[t,e,r]},v.clamp=function(x){return arguments.length?(h=!!x,v):h},v.interpolator=function(x){return arguments.length?(f=x,v):f};function y(x){return function(b){var S,O,k;return arguments.length?([S,O,k]=b,f=sH(x,[S,O,k]),v):[f(0),f(.5),f(1)]}}return v.range=y(qs),v.rangeRound=y(Fx),v.unknown=function(x){return arguments.length?(g=x,v):g},function(x){return p=x,i=x(t),a=x(e),s=x(r),u=i===a?0:.5/(a-i),c=a===s?0:.5/(s-a),n=a<i?-1:1,v}}function ZN(){var t=aa(Dh()(hr));return t.copy=function(){return oa(t,ZN())},xi.apply(t,arguments)}function e$(){var t=Kx(Dh()).domain([.1,1,10]);return t.copy=function(){return oa(t,e$()).base(t.base())},xi.apply(t,arguments)}function t$(){var t=Gx(Dh());return t.copy=function(){return oa(t,t$()).constant(t.constant())},xi.apply(t,arguments)}function o1(){var t=Xx(Dh());return t.copy=function(){return oa(t,o1()).exponent(t.exponent())},xi.apply(t,arguments)}function YV(){return o1.apply(null,arguments).exponent(.5)}const RT=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:bu,scaleDiverging:ZN,scaleDivergingLog:e$,scaleDivergingPow:o1,scaleDivergingSqrt:YV,scaleDivergingSymlog:t$,scaleIdentity:NN,scaleImplicit:Xb,scaleLinear:Td,scaleLog:IN,scaleOrdinal:zx,scalePoint:eu,scalePow:Yx,scaleQuantile:DN,scaleQuantize:BN,scaleRadial:LN,scaleSequential:XN,scaleSequentialLog:YN,scaleSequentialPow:a1,scaleSequentialQuantile:QN,scaleSequentialSqrt:XV,scaleSequentialSymlog:JN,scaleSqrt:CH,scaleSymlog:MN,scaleThreshold:zN,scaleTime:KV,scaleUtc:GV,tickFormat:RN},Symbol.toStringTag,{value:"Module"}));var g0,NT;function Bh(){if(NT)return g0;NT=1;var t=Ms();function e(r,n,i){for(var a=-1,s=r.length;++a<s;){var u=r[a],c=n(u);if(c!=null&&(f===void 0?c===c&&!t(c):i(c,f)))var f=c,p=u}return p}return g0=e,g0}var v0,$T;function r$(){if($T)return v0;$T=1;function t(e,r){return e>r}return v0=t,v0}var y0,IT;function JV(){if(IT)return y0;IT=1;var t=Bh(),e=r$(),r=zs();function n(i){return i&&i.length?t(i,r,e):void 0}return y0=n,y0}var QV=JV();const ea=Je(QV);var b0,MT;function n$(){if(MT)return b0;MT=1;function t(e,r){return e<r}return b0=t,b0}var w0,LT;function ZV(){if(LT)return w0;LT=1;var t=Bh(),e=n$(),r=zs();function n(i){return i&&i.length?t(i,r,e):void 0}return w0=n,w0}var eK=ZV();const zh=Je(eK);var x0,DT;function tK(){if(DT)return x0;DT=1;var t=_x(),e=Hn(),r=dN(),n=Or();function i(a,s){var u=n(a)?t:r;return u(a,e(s,3))}return x0=i,x0}var _0,BT;function rK(){if(BT)return _0;BT=1;var t=cN(),e=tK();function r(n,i){return t(e(n,i),1)}return _0=r,_0}var nK=rK();const iK=Je(nK);var S0,zT;function aK(){if(zT)return S0;zT=1;var t=Ix();function e(r,n){return t(r,n)}return S0=e,S0}var oK=aK();const hs=Je(oK);var Us=1e9,sK={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},l1,pt=!0,rn="[DecimalError] ",Va=rn+"Invalid argument: ",s1=rn+"Exponent out of range: ",Fs=Math.floor,Ia=Math.pow,lK=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Ir,Ht=1e7,ct=7,i$=9007199254740991,Nd=Fs(i$/ct),be={};be.absoluteValue=be.abs=function(){var t=new this.constructor(this);return t.s&&(t.s=1),t};be.comparedTo=be.cmp=function(t){var e,r,n,i,a=this;if(t=new a.constructor(t),a.s!==t.s)return a.s||-t.s;if(a.e!==t.e)return a.e>t.e^a.s<0?1:-1;for(n=a.d.length,i=t.d.length,e=0,r=n<i?n:i;e<r;++e)if(a.d[e]!==t.d[e])return a.d[e]>t.d[e]^a.s<0?1:-1;return n===i?0:n>i^a.s<0?1:-1};be.decimalPlaces=be.dp=function(){var t=this,e=t.d.length-1,r=(e-t.e)*ct;if(e=t.d[e],e)for(;e%10==0;e/=10)r--;return r<0?0:r};be.dividedBy=be.div=function(t){return di(this,new this.constructor(t))};be.dividedToIntegerBy=be.idiv=function(t){var e=this,r=e.constructor;return et(di(e,new r(t),0,1),r.precision)};be.equals=be.eq=function(t){return!this.cmp(t)};be.exponent=function(){return Ct(this)};be.greaterThan=be.gt=function(t){return this.cmp(t)>0};be.greaterThanOrEqualTo=be.gte=function(t){return this.cmp(t)>=0};be.isInteger=be.isint=function(){return this.e>this.d.length-2};be.isNegative=be.isneg=function(){return this.s<0};be.isPositive=be.ispos=function(){return this.s>0};be.isZero=function(){return this.s===0};be.lessThan=be.lt=function(t){return this.cmp(t)<0};be.lessThanOrEqualTo=be.lte=function(t){return this.cmp(t)<1};be.logarithm=be.log=function(t){var e,r=this,n=r.constructor,i=n.precision,a=i+5;if(t===void 0)t=new n(10);else if(t=new n(t),t.s<1||t.eq(Ir))throw Error(rn+"NaN");if(r.s<1)throw Error(rn+(r.s?"NaN":"-Infinity"));return r.eq(Ir)?new n(0):(pt=!1,e=di(ku(r,a),ku(t,a),a),pt=!0,et(e,i))};be.minus=be.sub=function(t){var e=this;return t=new e.constructor(t),e.s==t.s?s$(e,t):a$(e,(t.s=-t.s,t))};be.modulo=be.mod=function(t){var e,r=this,n=r.constructor,i=n.precision;if(t=new n(t),!t.s)throw Error(rn+"NaN");return r.s?(pt=!1,e=di(r,t,0,1).times(t),pt=!0,r.minus(e)):et(new n(r),i)};be.naturalExponential=be.exp=function(){return o$(this)};be.naturalLogarithm=be.ln=function(){return ku(this)};be.negated=be.neg=function(){var t=new this.constructor(this);return t.s=-t.s||0,t};be.plus=be.add=function(t){var e=this;return t=new e.constructor(t),e.s==t.s?a$(e,t):s$(e,(t.s=-t.s,t))};be.precision=be.sd=function(t){var e,r,n,i=this;if(t!==void 0&&t!==!!t&&t!==1&&t!==0)throw Error(Va+t);if(e=Ct(i)+1,n=i.d.length-1,r=n*ct+1,n=i.d[n],n){for(;n%10==0;n/=10)r--;for(n=i.d[0];n>=10;n/=10)r++}return t&&e>r?e:r};be.squareRoot=be.sqrt=function(){var t,e,r,n,i,a,s,u=this,c=u.constructor;if(u.s<1){if(!u.s)return new c(0);throw Error(rn+"NaN")}for(t=Ct(u),pt=!1,i=Math.sqrt(+u),i==0||i==1/0?(e=Ln(u.d),(e.length+t)%2==0&&(e+="0"),i=Math.sqrt(e),t=Fs((t+1)/2)-(t<0||t%2),i==1/0?e="5e"+t:(e=i.toExponential(),e=e.slice(0,e.indexOf("e")+1)+t),n=new c(e)):n=new c(i.toString()),r=c.precision,i=s=r+3;;)if(a=n,n=a.plus(di(u,a,s+2)).times(.5),Ln(a.d).slice(0,s)===(e=Ln(n.d)).slice(0,s)){if(e=e.slice(s-3,s+1),i==s&&e=="4999"){if(et(a,r+1,0),a.times(a).eq(u)){n=a;break}}else if(e!="9999")break;s+=4}return pt=!0,et(n,r)};be.times=be.mul=function(t){var e,r,n,i,a,s,u,c,f,p=this,h=p.constructor,g=p.d,v=(t=new h(t)).d;if(!p.s||!t.s)return new h(0);for(t.s*=p.s,r=p.e+t.e,c=g.length,f=v.length,c<f&&(a=g,g=v,v=a,s=c,c=f,f=s),a=[],s=c+f,n=s;n--;)a.push(0);for(n=f;--n>=0;){for(e=0,i=c+n;i>n;)u=a[i]+v[n]*g[i-n-1]+e,a[i--]=u%Ht|0,e=u/Ht|0;a[i]=(a[i]+e)%Ht|0}for(;!a[--s];)a.pop();return e?++r:a.shift(),t.d=a,t.e=r,pt?et(t,h.precision):t};be.toDecimalPlaces=be.todp=function(t,e){var r=this,n=r.constructor;return r=new n(r),t===void 0?r:(qn(t,0,Us),e===void 0?e=n.rounding:qn(e,0,8),et(r,t+Ct(r)+1,e))};be.toExponential=function(t,e){var r,n=this,i=n.constructor;return t===void 0?r=Qa(n,!0):(qn(t,0,Us),e===void 0?e=i.rounding:qn(e,0,8),n=et(new i(n),t+1,e),r=Qa(n,!0,t+1)),r};be.toFixed=function(t,e){var r,n,i=this,a=i.constructor;return t===void 0?Qa(i):(qn(t,0,Us),e===void 0?e=a.rounding:qn(e,0,8),n=et(new a(i),t+Ct(i)+1,e),r=Qa(n.abs(),!1,t+Ct(n)+1),i.isneg()&&!i.isZero()?"-"+r:r)};be.toInteger=be.toint=function(){var t=this,e=t.constructor;return et(new e(t),Ct(t)+1,e.rounding)};be.toNumber=function(){return+this};be.toPower=be.pow=function(t){var e,r,n,i,a,s,u=this,c=u.constructor,f=12,p=+(t=new c(t));if(!t.s)return new c(Ir);if(u=new c(u),!u.s){if(t.s<1)throw Error(rn+"Infinity");return u}if(u.eq(Ir))return u;if(n=c.precision,t.eq(Ir))return et(u,n);if(e=t.e,r=t.d.length-1,s=e>=r,a=u.s,s){if((r=p<0?-p:p)<=i$){for(i=new c(Ir),e=Math.ceil(n/ct+4),pt=!1;r%2&&(i=i.times(u),UT(i.d,e)),r=Fs(r/2),r!==0;)u=u.times(u),UT(u.d,e);return pt=!0,t.s<0?new c(Ir).div(i):et(i,n)}}else if(a<0)throw Error(rn+"NaN");return a=a<0&&t.d[Math.max(e,r)]&1?-1:1,u.s=1,pt=!1,i=t.times(ku(u,n+f)),pt=!0,i=o$(i),i.s=a,i};be.toPrecision=function(t,e){var r,n,i=this,a=i.constructor;return t===void 0?(r=Ct(i),n=Qa(i,r<=a.toExpNeg||r>=a.toExpPos)):(qn(t,1,Us),e===void 0?e=a.rounding:qn(e,0,8),i=et(new a(i),t,e),r=Ct(i),n=Qa(i,t<=r||r<=a.toExpNeg,t)),n};be.toSignificantDigits=be.tosd=function(t,e){var r=this,n=r.constructor;return t===void 0?(t=n.precision,e=n.rounding):(qn(t,1,Us),e===void 0?e=n.rounding:qn(e,0,8)),et(new n(r),t,e)};be.toString=be.valueOf=be.val=be.toJSON=be[Symbol.for("nodejs.util.inspect.custom")]=function(){var t=this,e=Ct(t),r=t.constructor;return Qa(t,e<=r.toExpNeg||e>=r.toExpPos)};function a$(t,e){var r,n,i,a,s,u,c,f,p=t.constructor,h=p.precision;if(!t.s||!e.s)return e.s||(e=new p(t)),pt?et(e,h):e;if(c=t.d,f=e.d,s=t.e,i=e.e,c=c.slice(),a=s-i,a){for(a<0?(n=c,a=-a,u=f.length):(n=f,i=s,u=c.length),s=Math.ceil(h/ct),u=s>u?s+1:u+1,a>u&&(a=u,n.length=1),n.reverse();a--;)n.push(0);n.reverse()}for(u=c.length,a=f.length,u-a<0&&(a=u,n=f,f=c,c=n),r=0;a;)r=(c[--a]=c[a]+f[a]+r)/Ht|0,c[a]%=Ht;for(r&&(c.unshift(r),++i),u=c.length;c[--u]==0;)c.pop();return e.d=c,e.e=i,pt?et(e,h):e}function qn(t,e,r){if(t!==~~t||t<e||t>r)throw Error(Va+t)}function Ln(t){var e,r,n,i=t.length-1,a="",s=t[0];if(i>0){for(a+=s,e=1;e<i;e++)n=t[e]+"",r=ct-n.length,r&&(a+=Ji(r)),a+=n;s=t[e],n=s+"",r=ct-n.length,r&&(a+=Ji(r))}else if(s===0)return"0";for(;s%10===0;)s/=10;return a+s}var di=(function(){function t(n,i){var a,s=0,u=n.length;for(n=n.slice();u--;)a=n[u]*i+s,n[u]=a%Ht|0,s=a/Ht|0;return s&&n.unshift(s),n}function e(n,i,a,s){var u,c;if(a!=s)c=a>s?1:-1;else for(u=c=0;u<a;u++)if(n[u]!=i[u]){c=n[u]>i[u]?1:-1;break}return c}function r(n,i,a){for(var s=0;a--;)n[a]-=s,s=n[a]<i[a]?1:0,n[a]=s*Ht+n[a]-i[a];for(;!n[0]&&n.length>1;)n.shift()}return function(n,i,a,s){var u,c,f,p,h,g,v,y,x,b,S,O,k,T,E,A,j,R,M=n.constructor,H=n.s==i.s?1:-1,U=n.d,B=i.d;if(!n.s)return new M(n);if(!i.s)throw Error(rn+"Division by zero");for(c=n.e-i.e,j=B.length,E=U.length,v=new M(H),y=v.d=[],f=0;B[f]==(U[f]||0);)++f;if(B[f]>(U[f]||0)&&--c,a==null?O=a=M.precision:s?O=a+(Ct(n)-Ct(i))+1:O=a,O<0)return new M(0);if(O=O/ct+2|0,f=0,j==1)for(p=0,B=B[0],O++;(f<E||p)&&O--;f++)k=p*Ht+(U[f]||0),y[f]=k/B|0,p=k%B|0;else{for(p=Ht/(B[0]+1)|0,p>1&&(B=t(B,p),U=t(U,p),j=B.length,E=U.length),T=j,x=U.slice(0,j),b=x.length;b<j;)x[b++]=0;R=B.slice(),R.unshift(0),A=B[0],B[1]>=Ht/2&&++A;do p=0,u=e(B,x,j,b),u<0?(S=x[0],j!=b&&(S=S*Ht+(x[1]||0)),p=S/A|0,p>1?(p>=Ht&&(p=Ht-1),h=t(B,p),g=h.length,b=x.length,u=e(h,x,g,b),u==1&&(p--,r(h,j<g?R:B,g))):(p==0&&(u=p=1),h=B.slice()),g=h.length,g<b&&h.unshift(0),r(x,h,b),u==-1&&(b=x.length,u=e(B,x,j,b),u<1&&(p++,r(x,j<b?R:B,b))),b=x.length):u===0&&(p++,x=[0]),y[f++]=p,u&&x[0]?x[b++]=U[T]||0:(x=[U[T]],b=1);while((T++<E||x[0]!==void 0)&&O--)}return y[0]||y.shift(),v.e=c,et(v,s?a+Ct(v)+1:a)}})();function o$(t,e){var r,n,i,a,s,u,c=0,f=0,p=t.constructor,h=p.precision;if(Ct(t)>16)throw Error(s1+Ct(t));if(!t.s)return new p(Ir);for(pt=!1,u=h,s=new p(.03125);t.abs().gte(.1);)t=t.times(s),f+=5;for(n=Math.log(Ia(2,f))/Math.LN10*2+5|0,u+=n,r=i=a=new p(Ir),p.precision=u;;){if(i=et(i.times(t),u),r=r.times(++c),s=a.plus(di(i,r,u)),Ln(s.d).slice(0,u)===Ln(a.d).slice(0,u)){for(;f--;)a=et(a.times(a),u);return p.precision=h,e==null?(pt=!0,et(a,h)):a}a=s}}function Ct(t){for(var e=t.e*ct,r=t.d[0];r>=10;r/=10)e++;return e}function k0(t,e,r){if(e>t.LN10.sd())throw pt=!0,r&&(t.precision=r),Error(rn+"LN10 precision limit exceeded");return et(new t(t.LN10),e)}function Ji(t){for(var e="";t--;)e+="0";return e}function ku(t,e){var r,n,i,a,s,u,c,f,p,h=1,g=10,v=t,y=v.d,x=v.constructor,b=x.precision;if(v.s<1)throw Error(rn+(v.s?"NaN":"-Infinity"));if(v.eq(Ir))return new x(0);if(e==null?(pt=!1,f=b):f=e,v.eq(10))return e==null&&(pt=!0),k0(x,f);if(f+=g,x.precision=f,r=Ln(y),n=r.charAt(0),a=Ct(v),Math.abs(a)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)v=v.times(t),r=Ln(v.d),n=r.charAt(0),h++;a=Ct(v),n>1?(v=new x("0."+r),a++):v=new x(n+"."+r.slice(1))}else return c=k0(x,f+2,b).times(a+""),v=ku(new x(n+"."+r.slice(1)),f-g).plus(c),x.precision=b,e==null?(pt=!0,et(v,b)):v;for(u=s=v=di(v.minus(Ir),v.plus(Ir),f),p=et(v.times(v),f),i=3;;){if(s=et(s.times(p),f),c=u.plus(di(s,new x(i),f)),Ln(c.d).slice(0,f)===Ln(u.d).slice(0,f))return u=u.times(2),a!==0&&(u=u.plus(k0(x,f+2,b).times(a+""))),u=di(u,new x(h),f),x.precision=b,e==null?(pt=!0,et(u,b)):u;u=c,i+=2}}function qT(t,e){var r,n,i;for((r=e.indexOf("."))>-1&&(e=e.replace(".","")),(n=e.search(/e/i))>0?(r<0&&(r=n),r+=+e.slice(n+1),e=e.substring(0,n)):r<0&&(r=e.length),n=0;e.charCodeAt(n)===48;)++n;for(i=e.length;e.charCodeAt(i-1)===48;)--i;if(e=e.slice(n,i),e){if(i-=n,r=r-n-1,t.e=Fs(r/ct),t.d=[],n=(r+1)%ct,r<0&&(n+=ct),n<i){for(n&&t.d.push(+e.slice(0,n)),i-=ct;n<i;)t.d.push(+e.slice(n,n+=ct));e=e.slice(n),n=ct-e.length}else n-=i;for(;n--;)e+="0";if(t.d.push(+e),pt&&(t.e>Nd||t.e<-Nd))throw Error(s1+r)}else t.s=0,t.e=0,t.d=[0];return t}function et(t,e,r){var n,i,a,s,u,c,f,p,h=t.d;for(s=1,a=h[0];a>=10;a/=10)s++;if(n=e-s,n<0)n+=ct,i=e,f=h[p=0];else{if(p=Math.ceil((n+1)/ct),a=h.length,p>=a)return t;for(f=a=h[p],s=1;a>=10;a/=10)s++;n%=ct,i=n-ct+s}if(r!==void 0&&(a=Ia(10,s-i-1),u=f/a%10|0,c=e<0||h[p+1]!==void 0||f%a,c=r<4?(u||c)&&(r==0||r==(t.s<0?3:2)):u>5||u==5&&(r==4||c||r==6&&(n>0?i>0?f/Ia(10,s-i):0:h[p-1])%10&1||r==(t.s<0?8:7))),e<1||!h[0])return c?(a=Ct(t),h.length=1,e=e-a-1,h[0]=Ia(10,(ct-e%ct)%ct),t.e=Fs(-e/ct)||0):(h.length=1,h[0]=t.e=t.s=0),t;if(n==0?(h.length=p,a=1,p--):(h.length=p+1,a=Ia(10,ct-n),h[p]=i>0?(f/Ia(10,s-i)%Ia(10,i)|0)*a:0),c)for(;;)if(p==0){(h[0]+=a)==Ht&&(h[0]=1,++t.e);break}else{if(h[p]+=a,h[p]!=Ht)break;h[p--]=0,a=1}for(n=h.length;h[--n]===0;)h.pop();if(pt&&(t.e>Nd||t.e<-Nd))throw Error(s1+Ct(t));return t}function s$(t,e){var r,n,i,a,s,u,c,f,p,h,g=t.constructor,v=g.precision;if(!t.s||!e.s)return e.s?e.s=-e.s:e=new g(t),pt?et(e,v):e;if(c=t.d,h=e.d,n=e.e,f=t.e,c=c.slice(),s=f-n,s){for(p=s<0,p?(r=c,s=-s,u=h.length):(r=h,n=f,u=c.length),i=Math.max(Math.ceil(v/ct),u)+2,s>i&&(s=i,r.length=1),r.reverse(),i=s;i--;)r.push(0);r.reverse()}else{for(i=c.length,u=h.length,p=i<u,p&&(u=i),i=0;i<u;i++)if(c[i]!=h[i]){p=c[i]<h[i];break}s=0}for(p&&(r=c,c=h,h=r,e.s=-e.s),u=c.length,i=h.length-u;i>0;--i)c[u++]=0;for(i=h.length;i>s;){if(c[--i]<h[i]){for(a=i;a&&c[--a]===0;)c[a]=Ht-1;--c[a],c[i]+=Ht}c[i]-=h[i]}for(;c[--u]===0;)c.pop();for(;c[0]===0;c.shift())--n;return c[0]?(e.d=c,e.e=n,pt?et(e,v):e):new g(0)}function Qa(t,e,r){var n,i=Ct(t),a=Ln(t.d),s=a.length;return e?(r&&(n=r-s)>0?a=a.charAt(0)+"."+a.slice(1)+Ji(n):s>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(i<0?"e":"e+")+i):i<0?(a="0."+Ji(-i-1)+a,r&&(n=r-s)>0&&(a+=Ji(n))):i>=s?(a+=Ji(i+1-s),r&&(n=r-i-1)>0&&(a=a+"."+Ji(n))):((n=i+1)<s&&(a=a.slice(0,n)+"."+a.slice(n)),r&&(n=r-s)>0&&(i+1===s&&(a+="."),a+=Ji(n))),t.s<0?"-"+a:a}function UT(t,e){if(t.length>e)return t.length=e,!0}function l$(t){var e,r,n;function i(a){var s=this;if(!(s instanceof i))return new i(a);if(s.constructor=i,a instanceof i){s.s=a.s,s.e=a.e,s.d=(a=a.d)?a.slice():a;return}if(typeof a=="number"){if(a*0!==0)throw Error(Va+a);if(a>0)s.s=1;else if(a<0)a=-a,s.s=-1;else{s.s=0,s.e=0,s.d=[0];return}if(a===~~a&&a<1e7){s.e=0,s.d=[a];return}return qT(s,a.toString())}else if(typeof a!="string")throw Error(Va+a);if(a.charCodeAt(0)===45?(a=a.slice(1),s.s=-1):s.s=1,lK.test(a))qT(s,a);else throw Error(Va+a)}if(i.prototype=be,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=l$,i.config=i.set=uK,t===void 0&&(t={}),t)for(n=["precision","rounding","toExpNeg","toExpPos","LN10"],e=0;e<n.length;)t.hasOwnProperty(r=n[e++])||(t[r]=this[r]);return i.config(t),i}function uK(t){if(!t||typeof t!="object")throw Error(rn+"Object expected");var e,r,n,i=["precision",1,Us,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(e=0;e<i.length;e+=3)if((n=t[r=i[e]])!==void 0)if(Fs(n)===n&&n>=i[e+1]&&n<=i[e+2])this[r]=n;else throw Error(Va+r+": "+n);if((n=t[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(Va+r+": "+n);return this}var l1=l$(sK);Ir=new l1(1);const Ze=l1;function cK(t){return pK(t)||hK(t)||dK(t)||fK()}function fK(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
387
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function dK(t,e){if(t){if(typeof t=="string")return Zb(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Zb(t,e)}}function hK(t){if(typeof Symbol<"u"&&Symbol.iterator in Object(t))return Array.from(t)}function pK(t){if(Array.isArray(t))return Zb(t)}function Zb(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var mK=function(e){return e},u$={},c$=function(e){return e===u$},FT=function(e){return function r(){return arguments.length===0||arguments.length===1&&c$(arguments.length<=0?void 0:arguments[0])?r:e.apply(void 0,arguments)}},gK=function t(e,r){return e===1?r:FT(function(){for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];var s=i.filter(function(u){return u!==u$}).length;return s>=e?r.apply(void 0,i):t(e-s,FT(function(){for(var u=arguments.length,c=new Array(u),f=0;f<u;f++)c[f]=arguments[f];var p=i.map(function(h){return c$(h)?c.shift():h});return r.apply(void 0,cK(p).concat(c))}))})},qh=function(e){return gK(e.length,e)},ew=function(e,r){for(var n=[],i=e;i<r;++i)n[i-e]=i;return n},vK=qh(function(t,e){return Array.isArray(e)?e.map(t):Object.keys(e).map(function(r){return e[r]}).map(t)}),yK=function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];if(!r.length)return mK;var i=r.reverse(),a=i[0],s=i.slice(1);return function(){return s.reduce(function(u,c){return c(u)},a.apply(void 0,arguments))}},tw=function(e){return Array.isArray(e)?e.reverse():e.split("").reverse.join("")},f$=function(e){var r=null,n=null;return function(){for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r&&a.every(function(u,c){return u===r[c]})||(r=a,n=e.apply(void 0,a)),n}};function bK(t){var e;return t===0?e=1:e=Math.floor(new Ze(t).abs().log(10).toNumber())+1,e}function wK(t,e,r){for(var n=new Ze(t),i=0,a=[];n.lt(e)&&i<1e5;)a.push(n.toNumber()),n=n.add(r),i++;return a}var xK=qh(function(t,e,r){var n=+t,i=+e;return n+r*(i-n)}),_K=qh(function(t,e,r){var n=e-+t;return n=n||1/0,(r-t)/n}),SK=qh(function(t,e,r){var n=e-+t;return n=n||1/0,Math.max(0,Math.min(1,(r-t)/n))});const Uh={rangeStep:wK,getDigitCount:bK,interpolateNumber:xK,uninterpolateNumber:_K,uninterpolateTruncation:SK};function rw(t){return EK(t)||OK(t)||d$(t)||kK()}function kK(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
388
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function OK(t){if(typeof Symbol<"u"&&Symbol.iterator in Object(t))return Array.from(t)}function EK(t){if(Array.isArray(t))return nw(t)}function Ou(t,e){return TK(t)||PK(t,e)||d$(t,e)||AK()}function AK(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
389
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function d$(t,e){if(t){if(typeof t=="string")return nw(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return nw(t,e)}}function nw(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function PK(t,e){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(t)))){var r=[],n=!0,i=!1,a=void 0;try{for(var s=t[Symbol.iterator](),u;!(n=(u=s.next()).done)&&(r.push(u.value),!(e&&r.length===e));n=!0);}catch(c){i=!0,a=c}finally{try{!n&&s.return!=null&&s.return()}finally{if(i)throw a}}return r}}function TK(t){if(Array.isArray(t))return t}function h$(t){var e=Ou(t,2),r=e[0],n=e[1],i=r,a=n;return r>n&&(i=n,a=r),[i,a]}function p$(t,e,r){if(t.lte(0))return new Ze(0);var n=Uh.getDigitCount(t.toNumber()),i=new Ze(10).pow(n),a=t.div(i),s=n!==1?.05:.1,u=new Ze(Math.ceil(a.div(s).toNumber())).add(r).mul(s),c=u.mul(i);return e?c:new Ze(Math.ceil(c))}function CK(t,e,r){var n=1,i=new Ze(t);if(!i.isint()&&r){var a=Math.abs(t);a<1?(n=new Ze(10).pow(Uh.getDigitCount(t)-1),i=new Ze(Math.floor(i.div(n).toNumber())).mul(n)):a>1&&(i=new Ze(Math.floor(t)))}else t===0?i=new Ze(Math.floor((e-1)/2)):r||(i=new Ze(Math.floor(t)));var s=Math.floor((e-1)/2),u=yK(vK(function(c){return i.add(new Ze(c-s).mul(n)).toNumber()}),ew);return u(0,e)}function m$(t,e,r,n){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((e-t)/(r-1)))return{step:new Ze(0),tickMin:new Ze(0),tickMax:new Ze(0)};var a=p$(new Ze(e).sub(t).div(r-1),n,i),s;t<=0&&e>=0?s=new Ze(0):(s=new Ze(t).add(e).div(2),s=s.sub(new Ze(s).mod(a)));var u=Math.ceil(s.sub(t).div(a).toNumber()),c=Math.ceil(new Ze(e).sub(s).div(a).toNumber()),f=u+c+1;return f>r?m$(t,e,r,n,i+1):(f<r&&(c=e>0?c+(r-f):c,u=e>0?u:u+(r-f)),{step:a,tickMin:s.sub(new Ze(u).mul(a)),tickMax:s.add(new Ze(c).mul(a))})}function jK(t){var e=Ou(t,2),r=e[0],n=e[1],i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,s=Math.max(i,2),u=h$([r,n]),c=Ou(u,2),f=c[0],p=c[1];if(f===-1/0||p===1/0){var h=p===1/0?[f].concat(rw(ew(0,i-1).map(function(){return 1/0}))):[].concat(rw(ew(0,i-1).map(function(){return-1/0})),[p]);return r>n?tw(h):h}if(f===p)return CK(f,i,a);var g=m$(f,p,s,a),v=g.step,y=g.tickMin,x=g.tickMax,b=Uh.rangeStep(y,x.add(new Ze(.1).mul(v)),v);return r>n?tw(b):b}function RK(t,e){var r=Ou(t,2),n=r[0],i=r[1],a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,s=h$([n,i]),u=Ou(s,2),c=u[0],f=u[1];if(c===-1/0||f===1/0)return[n,i];if(c===f)return[c];var p=Math.max(e,2),h=p$(new Ze(f).sub(c).div(p-1),a,0),g=[].concat(rw(Uh.rangeStep(new Ze(c),new Ze(f).sub(new Ze(.99).mul(h)),h)),[f]);return n>i?tw(g):g}var NK=f$(jK),$K=f$(RK),IK="Invariant failed";function Za(t,e){throw new Error(IK)}var MK=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function ps(t){"@babel/helpers - typeof";return ps=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ps(t)}function $d(){return $d=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},$d.apply(this,arguments)}function LK(t,e){return qK(t)||zK(t,e)||BK(t,e)||DK()}function DK(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
390
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function BK(t,e){if(t){if(typeof t=="string")return WT(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return WT(t,e)}}function WT(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function zK(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,i,a,s,u=[],c=!0,f=!1;try{if(a=(r=r.call(t)).next,e!==0)for(;!(c=(n=a.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(p){f=!0,i=p}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(f)throw i}}return u}}function qK(t){if(Array.isArray(t))return t}function UK(t,e){if(t==null)return{};var r=FK(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function FK(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}function WK(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function HK(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,y$(n.key),n)}}function VK(t,e,r){return e&&HK(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function KK(t,e,r){return e=Id(e),GK(t,g$()?Reflect.construct(e,r||[],Id(t).constructor):e.apply(t,r))}function GK(t,e){if(e&&(ps(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return XK(t)}function XK(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function g$(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(g$=function(){return!!t})()}function Id(t){return Id=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Id(t)}function YK(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&iw(t,e)}function iw(t,e){return iw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},iw(t,e)}function v$(t,e,r){return e=y$(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function y$(t){var e=JK(t,"string");return ps(e)=="symbol"?e:e+""}function JK(t,e){if(ps(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(ps(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var Fh=(function(t){function e(){return WK(this,e),KK(this,e,arguments)}return YK(e,t),VK(e,[{key:"render",value:function(){var n=this.props,i=n.offset,a=n.layout,s=n.width,u=n.dataKey,c=n.data,f=n.dataPointFormatter,p=n.xAxis,h=n.yAxis,g=UK(n,MK),v=Ee(g,!1);this.props.direction==="x"&&p.type!=="number"&&Za();var y=c.map(function(x){var b=f(x,u),S=b.x,O=b.y,k=b.value,T=b.errorVal;if(!T)return null;var E=[],A,j;if(Array.isArray(T)){var R=LK(T,2);A=R[0],j=R[1]}else A=j=T;if(a==="vertical"){var M=p.scale,H=O+i,U=H+s,B=H-s,F=M(k-A),J=M(k+j);E.push({x1:J,y1:U,x2:J,y2:B}),E.push({x1:F,y1:H,x2:J,y2:H}),E.push({x1:F,y1:U,x2:F,y2:B})}else if(a==="horizontal"){var V=h.scale,K=S+i,Z=K-s,G=K+s,ee=V(k-A),z=V(k+j);E.push({x1:Z,y1:z,x2:G,y2:z}),E.push({x1:K,y1:ee,x2:K,y2:z}),E.push({x1:Z,y1:ee,x2:G,y2:ee})}return $.createElement(qe,$d({className:"recharts-errorBar",key:"bar-".concat(E.map(function(L){return"".concat(L.x1,"-").concat(L.x2,"-").concat(L.y1,"-").concat(L.y2)}))},v),E.map(function(L){return $.createElement("line",$d({},L,{key:"line-".concat(L.x1,"-").concat(L.x2,"-").concat(L.y1,"-").concat(L.y2)}))}))});return $.createElement(qe,{className:"recharts-errorBars"},y)}}])})($.Component);v$(Fh,"defaultProps",{stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"});v$(Fh,"displayName","ErrorBar");function Eu(t){"@babel/helpers - typeof";return Eu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Eu(t)}function HT(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Ca(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?HT(Object(r),!0).forEach(function(n){QK(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):HT(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function QK(t,e,r){return e=ZK(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function ZK(t){var e=eG(t,"string");return Eu(e)=="symbol"?e:e+""}function eG(t,e){if(Eu(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(Eu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var b$=function(e){var r=e.children,n=e.formattedGraphicalItems,i=e.legendWidth,a=e.legendContent,s=Nr(r,es);if(!s)return null;var u=es.defaultProps,c=u!==void 0?Ca(Ca({},u),s.props):{},f;return s.props&&s.props.payload?f=s.props&&s.props.payload:a==="children"?f=(n||[]).reduce(function(p,h){var g=h.item,v=h.props,y=v.sectors||v.data||[];return p.concat(y.map(function(x){return{type:s.props.iconType||g.props.legendType,value:x.name,color:x.fill,payload:x}}))},[]):f=(n||[]).map(function(p){var h=p.item,g=h.type.defaultProps,v=g!==void 0?Ca(Ca({},g),h.props):{},y=v.dataKey,x=v.name,b=v.legendType,S=v.hide;return{inactive:S,dataKey:y,type:c.iconType||b||"square",color:u1(h),value:x||y,payload:v}}),Ca(Ca(Ca({},c),es.getWithHeight(s,i)),{},{payload:f,item:s})};function Au(t){"@babel/helpers - typeof";return Au=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Au(t)}function VT(t){return iG(t)||nG(t)||rG(t)||tG()}function tG(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
391
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function rG(t,e){if(t){if(typeof t=="string")return aw(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return aw(t,e)}}function nG(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function iG(t){if(Array.isArray(t))return aw(t)}function aw(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function KT(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function wt(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?KT(Object(r),!0).forEach(function(n){rs(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):KT(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function rs(t,e,r){return e=aG(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function aG(t){var e=oG(t,"string");return Au(e)=="symbol"?e:e+""}function oG(t,e){if(Au(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(Au(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Lt(t,e,r){return Me(t)||Me(e)?r:Dt(e)?Mr(t,e,r):$e(e)?e(t):r}function tu(t,e,r,n){var i=iK(t,function(u){return Lt(u,e)});if(r==="number"){var a=i.filter(function(u){return fe(u)||parseFloat(u)});return a.length?[zh(a),ea(a)]:[1/0,-1/0]}var s=n?i.filter(function(u){return!Me(u)}):i;return s.map(function(u){return Dt(u)||u instanceof Date?u:""})}var sG=function(e){var r,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0,a=arguments.length>3?arguments[3]:void 0,s=-1,u=(r=n==null?void 0:n.length)!==null&&r!==void 0?r:0;if(u<=1)return 0;if(a&&a.axisType==="angleAxis"&&Math.abs(Math.abs(a.range[1]-a.range[0])-360)<=1e-6)for(var c=a.range,f=0;f<u;f++){var p=f>0?i[f-1].coordinate:i[u-1].coordinate,h=i[f].coordinate,g=f>=u-1?i[0].coordinate:i[f+1].coordinate,v=void 0;if(fr(h-p)!==fr(g-h)){var y=[];if(fr(g-h)===fr(c[1]-c[0])){v=g;var x=h+c[1]-c[0];y[0]=Math.min(x,(x+p)/2),y[1]=Math.max(x,(x+p)/2)}else{v=p;var b=g+c[1]-c[0];y[0]=Math.min(h,(b+h)/2),y[1]=Math.max(h,(b+h)/2)}var S=[Math.min(h,(v+h)/2),Math.max(h,(v+h)/2)];if(e>S[0]&&e<=S[1]||e>=y[0]&&e<=y[1]){s=i[f].index;break}}else{var O=Math.min(p,g),k=Math.max(p,g);if(e>(O+h)/2&&e<=(k+h)/2){s=i[f].index;break}}}else for(var T=0;T<u;T++)if(T===0&&e<=(n[T].coordinate+n[T+1].coordinate)/2||T>0&&T<u-1&&e>(n[T].coordinate+n[T-1].coordinate)/2&&e<=(n[T].coordinate+n[T+1].coordinate)/2||T===u-1&&e>(n[T].coordinate+n[T-1].coordinate)/2){s=n[T].index;break}return s},u1=function(e){var r,n=e,i=n.type.displayName,a=(r=e.type)!==null&&r!==void 0&&r.defaultProps?wt(wt({},e.type.defaultProps),e.props):e.props,s=a.stroke,u=a.fill,c;switch(i){case"Line":c=s;break;case"Area":case"Radar":c=s&&s!=="none"?s:u;break;default:c=u;break}return c},lG=function(e){var r=e.barSize,n=e.totalSize,i=e.stackGroups,a=i===void 0?{}:i;if(!a)return{};for(var s={},u=Object.keys(a),c=0,f=u.length;c<f;c++)for(var p=a[u[c]].stackGroups,h=Object.keys(p),g=0,v=h.length;g<v;g++){var y=p[h[g]],x=y.items,b=y.cateAxisId,S=x.filter(function(j){return ci(j.type).indexOf("Bar")>=0});if(S&&S.length){var O=S[0].type.defaultProps,k=O!==void 0?wt(wt({},O),S[0].props):S[0].props,T=k.barSize,E=k[b];s[E]||(s[E]=[]);var A=Me(T)?r:T;s[E].push({item:S[0],stackList:S.slice(1),barSize:Me(A)?void 0:dr(A,n,0)})}}return s},uG=function(e){var r=e.barGap,n=e.barCategoryGap,i=e.bandSize,a=e.sizeList,s=a===void 0?[]:a,u=e.maxBarSize,c=s.length;if(c<1)return null;var f=dr(r,i,0,!0),p,h=[];if(s[0].barSize===+s[0].barSize){var g=!1,v=i/c,y=s.reduce(function(T,E){return T+E.barSize||0},0);y+=(c-1)*f,y>=i&&(y-=(c-1)*f,f=0),y>=i&&v>0&&(g=!0,v*=.9,y=c*v);var x=(i-y)/2>>0,b={offset:x-f,size:0};p=s.reduce(function(T,E){var A={item:E.item,position:{offset:b.offset+b.size+f,size:g?v:E.barSize}},j=[].concat(VT(T),[A]);return b=j[j.length-1].position,E.stackList&&E.stackList.length&&E.stackList.forEach(function(R){j.push({item:R,position:b})}),j},h)}else{var S=dr(n,i,0,!0);i-2*S-(c-1)*f<=0&&(f=0);var O=(i-2*S-(c-1)*f)/c;O>1&&(O>>=0);var k=u===+u?Math.min(O,u):O;p=s.reduce(function(T,E,A){var j=[].concat(VT(T),[{item:E.item,position:{offset:S+(O+f)*A+(O-k)/2,size:k}}]);return E.stackList&&E.stackList.length&&E.stackList.forEach(function(R){j.push({item:R,position:j[j.length-1].position})}),j},h)}return p},cG=function(e,r,n,i){var a=n.children,s=n.width,u=n.margin,c=s-(u.left||0)-(u.right||0),f=b$({children:a,legendWidth:c});if(f){var p=i||{},h=p.width,g=p.height,v=f.align,y=f.verticalAlign,x=f.layout;if((x==="vertical"||x==="horizontal"&&y==="middle")&&v!=="center"&&fe(e[v]))return wt(wt({},e),{},rs({},v,e[v]+(h||0)));if((x==="horizontal"||x==="vertical"&&v==="center")&&y!=="middle"&&fe(e[y]))return wt(wt({},e),{},rs({},y,e[y]+(g||0)))}return e},fG=function(e,r,n){return Me(r)?!0:e==="horizontal"?r==="yAxis":e==="vertical"||n==="x"?r==="xAxis":n==="y"?r==="yAxis":!0},w$=function(e,r,n,i,a){var s=r.props.children,u=tn(s,Fh).filter(function(f){return fG(i,a,f.props.direction)});if(u&&u.length){var c=u.map(function(f){return f.props.dataKey});return e.reduce(function(f,p){var h=Lt(p,n);if(Me(h))return f;var g=Array.isArray(h)?[zh(h),ea(h)]:[h,h],v=c.reduce(function(y,x){var b=Lt(p,x,0),S=g[0]-Math.abs(Array.isArray(b)?b[0]:b),O=g[1]+Math.abs(Array.isArray(b)?b[1]:b);return[Math.min(S,y[0]),Math.max(O,y[1])]},[1/0,-1/0]);return[Math.min(v[0],f[0]),Math.max(v[1],f[1])]},[1/0,-1/0])}return null},dG=function(e,r,n,i,a){var s=r.map(function(u){return w$(e,u,n,a,i)}).filter(function(u){return!Me(u)});return s&&s.length?s.reduce(function(u,c){return[Math.min(u[0],c[0]),Math.max(u[1],c[1])]},[1/0,-1/0]):null},x$=function(e,r,n,i,a){var s=r.map(function(c){var f=c.props.dataKey;return n==="number"&&f&&w$(e,c,f,i)||tu(e,f,n,a)});if(n==="number")return s.reduce(function(c,f){return[Math.min(c[0],f[0]),Math.max(c[1],f[1])]},[1/0,-1/0]);var u={};return s.reduce(function(c,f){for(var p=0,h=f.length;p<h;p++)u[f[p]]||(u[f[p]]=!0,c.push(f[p]));return c},[])},_$=function(e,r){return e==="horizontal"&&r==="xAxis"||e==="vertical"&&r==="yAxis"||e==="centric"&&r==="angleAxis"||e==="radial"&&r==="radiusAxis"},Ua=function(e,r,n){if(!e)return null;var i=e.scale,a=e.duplicateDomain,s=e.type,u=e.range,c=e.realScaleType==="scaleBand"?i.bandwidth()/2:2,f=(r||n)&&s==="category"&&i.bandwidth?i.bandwidth()/c:0;if(f=e.axisType==="angleAxis"&&(u==null?void 0:u.length)>=2?fr(u[0]-u[1])*2*f:f,r&&(e.ticks||e.niceTicks)){var p=(e.ticks||e.niceTicks).map(function(h){var g=a?a.indexOf(h):h;return{coordinate:i(g)+f,value:h,offset:f}});return p.filter(function(h){return!Ds(h.coordinate)})}return e.isCategorical&&e.categoricalDomain?e.categoricalDomain.map(function(h,g){return{coordinate:i(h)+f,value:h,index:g,offset:f}}):i.ticks&&!n?i.ticks(e.tickCount).map(function(h){return{coordinate:i(h)+f,value:h,offset:f}}):i.domain().map(function(h,g){return{coordinate:i(h)+f,value:a?a[h]:h,index:g,offset:f}})},O0=new WeakMap,If=function(e,r){if(typeof r!="function")return e;O0.has(e)||O0.set(e,new WeakMap);var n=O0.get(e);if(n.has(r))return n.get(r);var i=function(){e.apply(void 0,arguments),r.apply(void 0,arguments)};return n.set(r,i),i},S$=function(e,r,n){var i=e.scale,a=e.type,s=e.layout,u=e.axisType;if(i==="auto")return s==="radial"&&u==="radiusAxis"?{scale:bu(),realScaleType:"band"}:s==="radial"&&u==="angleAxis"?{scale:Td(),realScaleType:"linear"}:a==="category"&&r&&(r.indexOf("LineChart")>=0||r.indexOf("AreaChart")>=0||r.indexOf("ComposedChart")>=0&&!n)?{scale:eu(),realScaleType:"point"}:a==="category"?{scale:bu(),realScaleType:"band"}:{scale:Td(),realScaleType:"linear"};if(Xa(i)){var c="scale".concat(Oh(i));return{scale:(RT[c]||eu)(),realScaleType:RT[c]?c:"point"}}return $e(i)?{scale:i}:{scale:eu(),realScaleType:"point"}},GT=1e-4,k$=function(e){var r=e.domain();if(!(!r||r.length<=2)){var n=r.length,i=e.range(),a=Math.min(i[0],i[1])-GT,s=Math.max(i[0],i[1])+GT,u=e(r[0]),c=e(r[n-1]);(u<a||u>s||c<a||c>s)&&e.domain([r[0],r[n-1]])}},hG=function(e,r){if(!e)return null;for(var n=0,i=e.length;n<i;n++)if(e[n].item===r)return e[n].position;return null},pG=function(e,r){if(!r||r.length!==2||!fe(r[0])||!fe(r[1]))return e;var n=Math.min(r[0],r[1]),i=Math.max(r[0],r[1]),a=[e[0],e[1]];return(!fe(e[0])||e[0]<n)&&(a[0]=n),(!fe(e[1])||e[1]>i)&&(a[1]=i),a[0]>i&&(a[0]=i),a[1]<n&&(a[1]=n),a},mG=function(e){var r=e.length;if(!(r<=0))for(var n=0,i=e[0].length;n<i;++n)for(var a=0,s=0,u=0;u<r;++u){var c=Ds(e[u][n][1])?e[u][n][0]:e[u][n][1];c>=0?(e[u][n][0]=a,e[u][n][1]=a+c,a=e[u][n][1]):(e[u][n][0]=s,e[u][n][1]=s+c,s=e[u][n][1])}},gG=function(e){var r=e.length;if(!(r<=0))for(var n=0,i=e[0].length;n<i;++n)for(var a=0,s=0;s<r;++s){var u=Ds(e[s][n][1])?e[s][n][0]:e[s][n][1];u>=0?(e[s][n][0]=a,e[s][n][1]=a+u,a=e[s][n][1]):(e[s][n][0]=0,e[s][n][1]=0)}},vG={sign:mG,expand:iF,none:as,silhouette:aF,wiggle:oF,positive:gG},yG=function(e,r,n){var i=r.map(function(u){return u.props.dataKey}),a=vG[n],s=nF().keys(i).value(function(u,c){return+Lt(u,c,0)}).order(Ib).offset(a);return s(e)},bG=function(e,r,n,i,a,s){if(!e)return null;var u=s?r.reverse():r,c={},f=u.reduce(function(h,g){var v,y=(v=g.type)!==null&&v!==void 0&&v.defaultProps?wt(wt({},g.type.defaultProps),g.props):g.props,x=y.stackId,b=y.hide;if(b)return h;var S=y[n],O=h[S]||{hasStack:!1,stackGroups:{}};if(Dt(x)){var k=O.stackGroups[x]||{numericAxisId:n,cateAxisId:i,items:[]};k.items.push(g),O.hasStack=!0,O.stackGroups[x]=k}else O.stackGroups[Bs("_stackId_")]={numericAxisId:n,cateAxisId:i,items:[g]};return wt(wt({},h),{},rs({},S,O))},c),p={};return Object.keys(f).reduce(function(h,g){var v=f[g];if(v.hasStack){var y={};v.stackGroups=Object.keys(v.stackGroups).reduce(function(x,b){var S=v.stackGroups[b];return wt(wt({},x),{},rs({},b,{numericAxisId:n,cateAxisId:i,items:S.items,stackedData:yG(e,S.items,a)}))},y)}return wt(wt({},h),{},rs({},g,v))},p)},O$=function(e,r){var n=r.realScaleType,i=r.type,a=r.tickCount,s=r.originalDomain,u=r.allowDecimals,c=n||r.scale;if(c!=="auto"&&c!=="linear")return null;if(a&&i==="number"&&s&&(s[0]==="auto"||s[1]==="auto")){var f=e.domain();if(!f.length)return null;var p=NK(f,a,u);return e.domain([zh(p),ea(p)]),{niceTicks:p}}if(a&&i==="number"){var h=e.domain(),g=$K(h,a,u);return{niceTicks:g}}return null};function XT(t){var e=t.axis,r=t.ticks,n=t.bandSize,i=t.entry,a=t.index,s=t.dataKey;if(e.type==="category"){if(!e.allowDuplicatedCategory&&e.dataKey&&!Me(i[e.dataKey])){var u=cd(r,"value",i[e.dataKey]);if(u)return u.coordinate+n/2}return r[a]?r[a].coordinate+n/2:null}var c=Lt(i,Me(s)?e.dataKey:s);return Me(c)?null:e.scale(c)}var YT=function(e){var r=e.axis,n=e.ticks,i=e.offset,a=e.bandSize,s=e.entry,u=e.index;if(r.type==="category")return n[u]?n[u].coordinate+i:null;var c=Lt(s,r.dataKey,r.domain[u]);return Me(c)?null:r.scale(c)-a/2+i},wG=function(e){var r=e.numericAxis,n=r.scale.domain();if(r.type==="number"){var i=Math.min(n[0],n[1]),a=Math.max(n[0],n[1]);return i<=0&&a>=0?0:a<0?a:i}return n[0]},xG=function(e,r){var n,i=(n=e.type)!==null&&n!==void 0&&n.defaultProps?wt(wt({},e.type.defaultProps),e.props):e.props,a=i.stackId;if(Dt(a)){var s=r[a];if(s){var u=s.items.indexOf(e);return u>=0?s.stackedData[u]:null}}return null},_G=function(e){return e.reduce(function(r,n){return[zh(n.concat([r[0]]).filter(fe)),ea(n.concat([r[1]]).filter(fe))]},[1/0,-1/0])},E$=function(e,r,n){return Object.keys(e).reduce(function(i,a){var s=e[a],u=s.stackedData,c=u.reduce(function(f,p){var h=_G(p.slice(r,n+1));return[Math.min(f[0],h[0]),Math.max(f[1],h[1])]},[1/0,-1/0]);return[Math.min(c[0],i[0]),Math.max(c[1],i[1])]},[1/0,-1/0]).map(function(i){return i===1/0||i===-1/0?0:i})},JT=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,QT=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,ow=function(e,r,n){if($e(e))return e(r,n);if(!Array.isArray(e))return r;var i=[];if(fe(e[0]))i[0]=n?e[0]:Math.min(e[0],r[0]);else if(JT.test(e[0])){var a=+JT.exec(e[0])[1];i[0]=r[0]-a}else $e(e[0])?i[0]=e[0](r[0]):i[0]=r[0];if(fe(e[1]))i[1]=n?e[1]:Math.max(e[1],r[1]);else if(QT.test(e[1])){var s=+QT.exec(e[1])[1];i[1]=r[1]+s}else $e(e[1])?i[1]=e[1](r[1]):i[1]=r[1];return i},Md=function(e,r,n){if(e&&e.scale&&e.scale.bandwidth){var i=e.scale.bandwidth();if(!n||i>0)return i}if(e&&r&&r.length>=2){for(var a=Lx(r,function(h){return h.coordinate}),s=1/0,u=1,c=a.length;u<c;u++){var f=a[u],p=a[u-1];s=Math.min((f.coordinate||0)-(p.coordinate||0),s)}return s===1/0?0:s}return n?void 0:0},ZT=function(e,r,n){return!e||!e.length||hs(e,Mr(n,"type.defaultProps.domain"))?r:e},A$=function(e,r){var n=e.type.defaultProps?wt(wt({},e.type.defaultProps),e.props):e.props,i=n.dataKey,a=n.name,s=n.unit,u=n.formatter,c=n.tooltipType,f=n.chartType,p=n.hide;return wt(wt({},Ee(e,!1)),{},{dataKey:i,unit:s,formatter:u,name:a||i,color:u1(e),value:Lt(r,i),type:c,payload:r,chartType:f,hide:p})};function Pu(t){"@babel/helpers - typeof";return Pu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Pu(t)}function e2(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function oi(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?e2(Object(r),!0).forEach(function(n){P$(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):e2(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function P$(t,e,r){return e=SG(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function SG(t){var e=kG(t,"string");return Pu(e)=="symbol"?e:e+""}function kG(t,e){if(Pu(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(Pu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function OG(t,e){return TG(t)||PG(t,e)||AG(t,e)||EG()}function EG(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
392
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function AG(t,e){if(t){if(typeof t=="string")return t2(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return t2(t,e)}}function t2(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function PG(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,i,a,s,u=[],c=!0,f=!1;try{if(a=(r=r.call(t)).next,e!==0)for(;!(c=(n=a.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(p){f=!0,i=p}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(f)throw i}}return u}}function TG(t){if(Array.isArray(t))return t}var Ld=Math.PI/180,CG=function(e){return e*180/Math.PI},at=function(e,r,n,i){return{x:e+Math.cos(-Ld*i)*n,y:r+Math.sin(-Ld*i)*n}},T$=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(e-(n.left||0)-(n.right||0)),Math.abs(r-(n.top||0)-(n.bottom||0)))/2},jG=function(e,r,n,i,a){var s=e.width,u=e.height,c=e.startAngle,f=e.endAngle,p=dr(e.cx,s,s/2),h=dr(e.cy,u,u/2),g=T$(s,u,n),v=dr(e.innerRadius,g,0),y=dr(e.outerRadius,g,g*.8),x=Object.keys(r);return x.reduce(function(b,S){var O=r[S],k=O.domain,T=O.reversed,E;if(Me(O.range))i==="angleAxis"?E=[c,f]:i==="radiusAxis"&&(E=[v,y]),T&&(E=[E[1],E[0]]);else{E=O.range;var A=E,j=OG(A,2);c=j[0],f=j[1]}var R=S$(O,a),M=R.realScaleType,H=R.scale;H.domain(k).range(E),k$(H);var U=O$(H,oi(oi({},O),{},{realScaleType:M})),B=oi(oi(oi({},O),U),{},{range:E,radius:y,realScaleType:M,scale:H,cx:p,cy:h,innerRadius:v,outerRadius:y,startAngle:c,endAngle:f});return oi(oi({},b),{},P$({},S,B))},{})},RG=function(e,r){var n=e.x,i=e.y,a=r.x,s=r.y;return Math.sqrt(Math.pow(n-a,2)+Math.pow(i-s,2))},NG=function(e,r){var n=e.x,i=e.y,a=r.cx,s=r.cy,u=RG({x:n,y:i},{x:a,y:s});if(u<=0)return{radius:u};var c=(n-a)/u,f=Math.acos(c);return i>s&&(f=2*Math.PI-f),{radius:u,angle:CG(f),angleInRadian:f}},$G=function(e){var r=e.startAngle,n=e.endAngle,i=Math.floor(r/360),a=Math.floor(n/360),s=Math.min(i,a);return{startAngle:r-s*360,endAngle:n-s*360}},IG=function(e,r){var n=r.startAngle,i=r.endAngle,a=Math.floor(n/360),s=Math.floor(i/360),u=Math.min(a,s);return e+u*360},r2=function(e,r){var n=e.x,i=e.y,a=NG({x:n,y:i},r),s=a.radius,u=a.angle,c=r.innerRadius,f=r.outerRadius;if(s<c||s>f)return!1;if(s===0)return!0;var p=$G(r),h=p.startAngle,g=p.endAngle,v=u,y;if(h<=g){for(;v>g;)v-=360;for(;v<h;)v+=360;y=v>=h&&v<=g}else{for(;v>h;)v-=360;for(;v<g;)v+=360;y=v>=g&&v<=h}return y?oi(oi({},r),{},{radius:s,angle:IG(v,r)}):null},C$=function(e){return!N.isValidElement(e)&&!$e(e)&&typeof e!="boolean"?e.className:""};function Tu(t){"@babel/helpers - typeof";return Tu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Tu(t)}var MG=["offset"];function LG(t){return qG(t)||zG(t)||BG(t)||DG()}function DG(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
393
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function BG(t,e){if(t){if(typeof t=="string")return sw(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return sw(t,e)}}function zG(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function qG(t){if(Array.isArray(t))return sw(t)}function sw(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function UG(t,e){if(t==null)return{};var r=FG(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function FG(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}function n2(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Mt(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?n2(Object(r),!0).forEach(function(n){WG(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):n2(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function WG(t,e,r){return e=HG(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function HG(t){var e=VG(t,"string");return Tu(e)=="symbol"?e:e+""}function VG(t,e){if(Tu(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(Tu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Cu(){return Cu=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Cu.apply(this,arguments)}var KG=function(e){var r=e.value,n=e.formatter,i=Me(e.children)?r:e.children;return $e(n)?n(i):i},GG=function(e,r){var n=fr(r-e),i=Math.min(Math.abs(r-e),360);return n*i},XG=function(e,r,n){var i=e.position,a=e.viewBox,s=e.offset,u=e.className,c=a,f=c.cx,p=c.cy,h=c.innerRadius,g=c.outerRadius,v=c.startAngle,y=c.endAngle,x=c.clockWise,b=(h+g)/2,S=GG(v,y),O=S>=0?1:-1,k,T;i==="insideStart"?(k=v+O*s,T=x):i==="insideEnd"?(k=y-O*s,T=!x):i==="end"&&(k=y+O*s,T=x),T=S<=0?T:!T;var E=at(f,p,b,k),A=at(f,p,b,k+(T?1:-1)*359),j="M".concat(E.x,",").concat(E.y,`
|
|
394
|
-
A`).concat(b,",").concat(b,",0,1,").concat(T?0:1,`,
|
|
395
|
-
`).concat(A.x,",").concat(A.y),R=Me(e.id)?Bs("recharts-radial-line-"):e.id;return $.createElement("text",Cu({},n,{dominantBaseline:"central",className:Le("recharts-radial-bar-label",u)}),$.createElement("defs",null,$.createElement("path",{id:R,d:j})),$.createElement("textPath",{xlinkHref:"#".concat(R)},r))},YG=function(e){var r=e.viewBox,n=e.offset,i=e.position,a=r,s=a.cx,u=a.cy,c=a.innerRadius,f=a.outerRadius,p=a.startAngle,h=a.endAngle,g=(p+h)/2;if(i==="outside"){var v=at(s,u,f+n,g),y=v.x,x=v.y;return{x:y,y:x,textAnchor:y>=s?"start":"end",verticalAnchor:"middle"}}if(i==="center")return{x:s,y:u,textAnchor:"middle",verticalAnchor:"middle"};if(i==="centerTop")return{x:s,y:u,textAnchor:"middle",verticalAnchor:"start"};if(i==="centerBottom")return{x:s,y:u,textAnchor:"middle",verticalAnchor:"end"};var b=(c+f)/2,S=at(s,u,b,g),O=S.x,k=S.y;return{x:O,y:k,textAnchor:"middle",verticalAnchor:"middle"}},JG=function(e){var r=e.viewBox,n=e.parentViewBox,i=e.offset,a=e.position,s=r,u=s.x,c=s.y,f=s.width,p=s.height,h=p>=0?1:-1,g=h*i,v=h>0?"end":"start",y=h>0?"start":"end",x=f>=0?1:-1,b=x*i,S=x>0?"end":"start",O=x>0?"start":"end";if(a==="top"){var k={x:u+f/2,y:c-h*i,textAnchor:"middle",verticalAnchor:v};return Mt(Mt({},k),n?{height:Math.max(c-n.y,0),width:f}:{})}if(a==="bottom"){var T={x:u+f/2,y:c+p+g,textAnchor:"middle",verticalAnchor:y};return Mt(Mt({},T),n?{height:Math.max(n.y+n.height-(c+p),0),width:f}:{})}if(a==="left"){var E={x:u-b,y:c+p/2,textAnchor:S,verticalAnchor:"middle"};return Mt(Mt({},E),n?{width:Math.max(E.x-n.x,0),height:p}:{})}if(a==="right"){var A={x:u+f+b,y:c+p/2,textAnchor:O,verticalAnchor:"middle"};return Mt(Mt({},A),n?{width:Math.max(n.x+n.width-A.x,0),height:p}:{})}var j=n?{width:f,height:p}:{};return a==="insideLeft"?Mt({x:u+b,y:c+p/2,textAnchor:O,verticalAnchor:"middle"},j):a==="insideRight"?Mt({x:u+f-b,y:c+p/2,textAnchor:S,verticalAnchor:"middle"},j):a==="insideTop"?Mt({x:u+f/2,y:c+g,textAnchor:"middle",verticalAnchor:y},j):a==="insideBottom"?Mt({x:u+f/2,y:c+p-g,textAnchor:"middle",verticalAnchor:v},j):a==="insideTopLeft"?Mt({x:u+b,y:c+g,textAnchor:O,verticalAnchor:y},j):a==="insideTopRight"?Mt({x:u+f-b,y:c+g,textAnchor:S,verticalAnchor:y},j):a==="insideBottomLeft"?Mt({x:u+b,y:c+p-g,textAnchor:O,verticalAnchor:v},j):a==="insideBottomRight"?Mt({x:u+f-b,y:c+p-g,textAnchor:S,verticalAnchor:v},j):Ls(a)&&(fe(a.x)||Ba(a.x))&&(fe(a.y)||Ba(a.y))?Mt({x:u+dr(a.x,f),y:c+dr(a.y,p),textAnchor:"end",verticalAnchor:"end"},j):Mt({x:u+f/2,y:c+p/2,textAnchor:"middle",verticalAnchor:"middle"},j)},QG=function(e){return"cx"in e&&fe(e.cx)};function Kt(t){var e=t.offset,r=e===void 0?5:e,n=UG(t,MG),i=Mt({offset:r},n),a=i.viewBox,s=i.position,u=i.value,c=i.children,f=i.content,p=i.className,h=p===void 0?"":p,g=i.textBreakAll;if(!a||Me(u)&&Me(c)&&!N.isValidElement(f)&&!$e(f))return null;if(N.isValidElement(f))return N.cloneElement(f,i);var v;if($e(f)){if(v=N.createElement(f,i),N.isValidElement(v))return v}else v=KG(i);var y=QG(a),x=Ee(i,!0);if(y&&(s==="insideStart"||s==="insideEnd"||s==="end"))return XG(i,v,x);var b=y?YG(i):JG(i);return $.createElement(Ja,Cu({className:Le("recharts-label",h)},x,b,{breakAll:g}),v)}Kt.displayName="Label";var j$=function(e){var r=e.cx,n=e.cy,i=e.angle,a=e.startAngle,s=e.endAngle,u=e.r,c=e.radius,f=e.innerRadius,p=e.outerRadius,h=e.x,g=e.y,v=e.top,y=e.left,x=e.width,b=e.height,S=e.clockWise,O=e.labelViewBox;if(O)return O;if(fe(x)&&fe(b)){if(fe(h)&&fe(g))return{x:h,y:g,width:x,height:b};if(fe(v)&&fe(y))return{x:v,y,width:x,height:b}}return fe(h)&&fe(g)?{x:h,y:g,width:0,height:0}:fe(r)&&fe(n)?{cx:r,cy:n,startAngle:a||i||0,endAngle:s||i||0,innerRadius:f||0,outerRadius:p||c||u||0,clockWise:S}:e.viewBox?e.viewBox:{}},ZG=function(e,r){return e?e===!0?$.createElement(Kt,{key:"label-implicit",viewBox:r}):Dt(e)?$.createElement(Kt,{key:"label-implicit",viewBox:r,value:e}):N.isValidElement(e)?e.type===Kt?N.cloneElement(e,{key:"label-implicit",viewBox:r}):$.createElement(Kt,{key:"label-implicit",content:e,viewBox:r}):$e(e)?$.createElement(Kt,{key:"label-implicit",content:e,viewBox:r}):Ls(e)?$.createElement(Kt,Cu({viewBox:r},e,{key:"label-implicit"})):null:null},eX=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&n&&!e.label)return null;var i=e.children,a=j$(e),s=tn(i,Kt).map(function(c,f){return N.cloneElement(c,{viewBox:r||a,key:"label-".concat(f)})});if(!n)return s;var u=ZG(e.label,r||a);return[u].concat(LG(s))};Kt.parseViewBox=j$;Kt.renderCallByParent=eX;var E0,i2;function tX(){if(i2)return E0;i2=1;function t(e){var r=e==null?0:e.length;return r?e[r-1]:void 0}return E0=t,E0}var rX=tX();const nX=Je(rX);function ju(t){"@babel/helpers - typeof";return ju=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ju(t)}var iX=["valueAccessor"],aX=["data","dataKey","clockWise","id","textBreakAll"];function oX(t){return cX(t)||uX(t)||lX(t)||sX()}function sX(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
396
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function lX(t,e){if(t){if(typeof t=="string")return lw(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return lw(t,e)}}function uX(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function cX(t){if(Array.isArray(t))return lw(t)}function lw(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Dd(){return Dd=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Dd.apply(this,arguments)}function a2(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function o2(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?a2(Object(r),!0).forEach(function(n){fX(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):a2(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function fX(t,e,r){return e=dX(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function dX(t){var e=hX(t,"string");return ju(e)=="symbol"?e:e+""}function hX(t,e){if(ju(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(ju(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function s2(t,e){if(t==null)return{};var r=pX(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function pX(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}var mX=function(e){return Array.isArray(e.value)?nX(e.value):e.value};function hi(t){var e=t.valueAccessor,r=e===void 0?mX:e,n=s2(t,iX),i=n.data,a=n.dataKey,s=n.clockWise,u=n.id,c=n.textBreakAll,f=s2(n,aX);return!i||!i.length?null:$.createElement(qe,{className:"recharts-label-list"},i.map(function(p,h){var g=Me(a)?r(p,h):Lt(p&&p.payload,a),v=Me(u)?{}:{id:"".concat(u,"-").concat(h)};return $.createElement(Kt,Dd({},Ee(p,!0),f,v,{parentViewBox:p.parentViewBox,value:g,textBreakAll:c,viewBox:Kt.parseViewBox(Me(s)?p:o2(o2({},p),{},{clockWise:s})),key:"label-".concat(h),index:h}))}))}hi.displayName="LabelList";function gX(t,e){return t?t===!0?$.createElement(hi,{key:"labelList-implicit",data:e}):$.isValidElement(t)||$e(t)?$.createElement(hi,{key:"labelList-implicit",data:e,content:t}):Ls(t)?$.createElement(hi,Dd({data:e},t,{key:"labelList-implicit"})):null:null}function vX(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&r&&!t.label)return null;var n=t.children,i=tn(n,hi).map(function(s,u){return N.cloneElement(s,{data:e,key:"labelList-".concat(u)})});if(!r)return i;var a=gX(t.label,e);return[a].concat(oX(i))}hi.renderCallByParent=vX;function Ru(t){"@babel/helpers - typeof";return Ru=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ru(t)}function uw(){return uw=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},uw.apply(this,arguments)}function l2(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function u2(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?l2(Object(r),!0).forEach(function(n){yX(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):l2(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function yX(t,e,r){return e=bX(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function bX(t){var e=wX(t,"string");return Ru(e)=="symbol"?e:e+""}function wX(t,e){if(Ru(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(Ru(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var xX=function(e,r){var n=fr(r-e),i=Math.min(Math.abs(r-e),359.999);return n*i},Mf=function(e){var r=e.cx,n=e.cy,i=e.radius,a=e.angle,s=e.sign,u=e.isExternal,c=e.cornerRadius,f=e.cornerIsExternal,p=c*(u?1:-1)+i,h=Math.asin(c/p)/Ld,g=f?a:a+s*h,v=at(r,n,p,g),y=at(r,n,i,g),x=f?a-s*h:a,b=at(r,n,p*Math.cos(h*Ld),x);return{center:v,circleTangency:y,lineTangency:b,theta:h}},R$=function(e){var r=e.cx,n=e.cy,i=e.innerRadius,a=e.outerRadius,s=e.startAngle,u=e.endAngle,c=xX(s,u),f=s+c,p=at(r,n,a,s),h=at(r,n,a,f),g="M ".concat(p.x,",").concat(p.y,`
|
|
397
|
-
A `).concat(a,",").concat(a,`,0,
|
|
398
|
-
`).concat(+(Math.abs(c)>180),",").concat(+(s>f),`,
|
|
399
|
-
`).concat(h.x,",").concat(h.y,`
|
|
400
|
-
`);if(i>0){var v=at(r,n,i,s),y=at(r,n,i,f);g+="L ".concat(y.x,",").concat(y.y,`
|
|
401
|
-
A `).concat(i,",").concat(i,`,0,
|
|
402
|
-
`).concat(+(Math.abs(c)>180),",").concat(+(s<=f),`,
|
|
403
|
-
`).concat(v.x,",").concat(v.y," Z")}else g+="L ".concat(r,",").concat(n," Z");return g},_X=function(e){var r=e.cx,n=e.cy,i=e.innerRadius,a=e.outerRadius,s=e.cornerRadius,u=e.forceCornerRadius,c=e.cornerIsExternal,f=e.startAngle,p=e.endAngle,h=fr(p-f),g=Mf({cx:r,cy:n,radius:a,angle:f,sign:h,cornerRadius:s,cornerIsExternal:c}),v=g.circleTangency,y=g.lineTangency,x=g.theta,b=Mf({cx:r,cy:n,radius:a,angle:p,sign:-h,cornerRadius:s,cornerIsExternal:c}),S=b.circleTangency,O=b.lineTangency,k=b.theta,T=c?Math.abs(f-p):Math.abs(f-p)-x-k;if(T<0)return u?"M ".concat(y.x,",").concat(y.y,`
|
|
404
|
-
a`).concat(s,",").concat(s,",0,0,1,").concat(s*2,`,0
|
|
405
|
-
a`).concat(s,",").concat(s,",0,0,1,").concat(-s*2,`,0
|
|
406
|
-
`):R$({cx:r,cy:n,innerRadius:i,outerRadius:a,startAngle:f,endAngle:p});var E="M ".concat(y.x,",").concat(y.y,`
|
|
407
|
-
A`).concat(s,",").concat(s,",0,0,").concat(+(h<0),",").concat(v.x,",").concat(v.y,`
|
|
408
|
-
A`).concat(a,",").concat(a,",0,").concat(+(T>180),",").concat(+(h<0),",").concat(S.x,",").concat(S.y,`
|
|
409
|
-
A`).concat(s,",").concat(s,",0,0,").concat(+(h<0),",").concat(O.x,",").concat(O.y,`
|
|
410
|
-
`);if(i>0){var A=Mf({cx:r,cy:n,radius:i,angle:f,sign:h,isExternal:!0,cornerRadius:s,cornerIsExternal:c}),j=A.circleTangency,R=A.lineTangency,M=A.theta,H=Mf({cx:r,cy:n,radius:i,angle:p,sign:-h,isExternal:!0,cornerRadius:s,cornerIsExternal:c}),U=H.circleTangency,B=H.lineTangency,F=H.theta,J=c?Math.abs(f-p):Math.abs(f-p)-M-F;if(J<0&&s===0)return"".concat(E,"L").concat(r,",").concat(n,"Z");E+="L".concat(B.x,",").concat(B.y,`
|
|
411
|
-
A`).concat(s,",").concat(s,",0,0,").concat(+(h<0),",").concat(U.x,",").concat(U.y,`
|
|
412
|
-
A`).concat(i,",").concat(i,",0,").concat(+(J>180),",").concat(+(h>0),",").concat(j.x,",").concat(j.y,`
|
|
413
|
-
A`).concat(s,",").concat(s,",0,0,").concat(+(h<0),",").concat(R.x,",").concat(R.y,"Z")}else E+="L".concat(r,",").concat(n,"Z");return E},SX={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},N$=function(e){var r=u2(u2({},SX),e),n=r.cx,i=r.cy,a=r.innerRadius,s=r.outerRadius,u=r.cornerRadius,c=r.forceCornerRadius,f=r.cornerIsExternal,p=r.startAngle,h=r.endAngle,g=r.className;if(s<a||p===h)return null;var v=Le("recharts-sector",g),y=s-a,x=dr(u,y,0,!0),b;return x>0&&Math.abs(p-h)<360?b=_X({cx:n,cy:i,innerRadius:a,outerRadius:s,cornerRadius:Math.min(x,y/2),forceCornerRadius:c,cornerIsExternal:f,startAngle:p,endAngle:h}):b=R$({cx:n,cy:i,innerRadius:a,outerRadius:s,startAngle:p,endAngle:h}),$.createElement("path",uw({},Ee(r,!0),{className:v,d:b,role:"img"}))};function Nu(t){"@babel/helpers - typeof";return Nu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Nu(t)}function cw(){return cw=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},cw.apply(this,arguments)}function c2(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function f2(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?c2(Object(r),!0).forEach(function(n){kX(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):c2(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function kX(t,e,r){return e=OX(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function OX(t){var e=EX(t,"string");return Nu(e)=="symbol"?e:e+""}function EX(t,e){if(Nu(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(Nu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var d2={curveBasisClosed:VU,curveBasisOpen:KU,curveBasis:HU,curveBumpX:jU,curveBumpY:RU,curveLinearClosed:GU,curveLinear:Ah,curveMonotoneX:XU,curveMonotoneY:YU,curveNatural:JU,curveStep:QU,curveStepAfter:eF,curveStepBefore:ZU},Lf=function(e){return e.x===+e.x&&e.y===+e.y},Bl=function(e){return e.x},zl=function(e){return e.y},AX=function(e,r){if($e(e))return e;var n="curve".concat(Oh(e));return(n==="curveMonotone"||n==="curveBump")&&r?d2["".concat(n).concat(r==="vertical"?"Y":"X")]:d2[n]||Ah},PX=function(e){var r=e.type,n=r===void 0?"linear":r,i=e.points,a=i===void 0?[]:i,s=e.baseLine,u=e.layout,c=e.connectNulls,f=c===void 0?!1:c,p=AX(n,u),h=f?a.filter(function(x){return Lf(x)}):a,g;if(Array.isArray(s)){var v=f?s.filter(function(x){return Lf(x)}):s,y=h.map(function(x,b){return f2(f2({},x),{},{base:v[b]})});return u==="vertical"?g=Pf().y(zl).x1(Bl).x0(function(x){return x.base.x}):g=Pf().x(Bl).y1(zl).y0(function(x){return x.base.y}),g.defined(Lf).curve(p),g(y)}return u==="vertical"&&fe(s)?g=Pf().y(zl).x1(Bl).x0(s):fe(s)?g=Pf().x(Bl).y1(zl).y0(s):g=NR().x(Bl).y(zl),g.defined(Lf).curve(p),g(h)},ns=function(e){var r=e.className,n=e.points,i=e.path,a=e.pathRef;if((!n||!n.length)&&!i)return null;var s=n&&n.length?PX(e):i;return N.createElement("path",cw({},Ee(e,!1),fd(e),{className:Le("recharts-curve",r),d:s,ref:a}))},A0={exports:{}},P0,h2;function TX(){if(h2)return P0;h2=1;var t="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return P0=t,P0}var T0,p2;function CX(){if(p2)return T0;p2=1;var t=TX();function e(){}function r(){}return r.resetWarningCache=e,T0=function(){function n(s,u,c,f,p,h){if(h!==t){var g=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 g.name="Invariant Violation",g}}n.isRequired=n;function i(){return n}var a={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:i,element:n,elementType:n,instanceOf:i,node:n,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:r,resetWarningCache:e};return a.PropTypes=a,a},T0}var m2;function jX(){return m2||(m2=1,A0.exports=CX()()),A0.exports}var RX=jX();const Xe=Je(RX),{getOwnPropertyNames:NX,getOwnPropertySymbols:$X}=Object,{hasOwnProperty:IX}=Object.prototype;function C0(t,e){return function(n,i,a){return t(n,i,a)&&e(n,i,a)}}function Df(t){return function(r,n,i){if(!r||!n||typeof r!="object"||typeof n!="object")return t(r,n,i);const{cache:a}=i,s=a.get(r),u=a.get(n);if(s&&u)return s===n&&u===r;a.set(r,n),a.set(n,r);const c=t(r,n,i);return a.delete(r),a.delete(n),c}}function MX(t){return t!=null?t[Symbol.toStringTag]:void 0}function g2(t){return NX(t).concat($X(t))}const LX=Object.hasOwn||((t,e)=>IX.call(t,e));function oo(t,e){return t===e||!t&&!e&&t!==t&&e!==e}const DX="__v",BX="__o",zX="_owner",{getOwnPropertyDescriptor:v2,keys:y2}=Object;function qX(t,e){return t.byteLength===e.byteLength&&Bd(new Uint8Array(t),new Uint8Array(e))}function UX(t,e,r){let n=t.length;if(e.length!==n)return!1;for(;n-- >0;)if(!r.equals(t[n],e[n],n,n,t,e,r))return!1;return!0}function FX(t,e){return t.byteLength===e.byteLength&&Bd(new Uint8Array(t.buffer,t.byteOffset,t.byteLength),new Uint8Array(e.buffer,e.byteOffset,e.byteLength))}function WX(t,e){return oo(t.getTime(),e.getTime())}function HX(t,e){return t.name===e.name&&t.message===e.message&&t.cause===e.cause&&t.stack===e.stack}function VX(t,e){return t===e}function b2(t,e,r){const n=t.size;if(n!==e.size)return!1;if(!n)return!0;const i=new Array(n),a=t.entries();let s,u,c=0;for(;(s=a.next())&&!s.done;){const f=e.entries();let p=!1,h=0;for(;(u=f.next())&&!u.done;){if(i[h]){h++;continue}const g=s.value,v=u.value;if(r.equals(g[0],v[0],c,h,t,e,r)&&r.equals(g[1],v[1],g[0],v[0],t,e,r)){p=i[h]=!0;break}h++}if(!p)return!1;c++}return!0}const KX=oo;function GX(t,e,r){const n=y2(t);let i=n.length;if(y2(e).length!==i)return!1;for(;i-- >0;)if(!$$(t,e,r,n[i]))return!1;return!0}function ql(t,e,r){const n=g2(t);let i=n.length;if(g2(e).length!==i)return!1;let a,s,u;for(;i-- >0;)if(a=n[i],!$$(t,e,r,a)||(s=v2(t,a),u=v2(e,a),(s||u)&&(!s||!u||s.configurable!==u.configurable||s.enumerable!==u.enumerable||s.writable!==u.writable)))return!1;return!0}function XX(t,e){return oo(t.valueOf(),e.valueOf())}function YX(t,e){return t.source===e.source&&t.flags===e.flags}function w2(t,e,r){const n=t.size;if(n!==e.size)return!1;if(!n)return!0;const i=new Array(n),a=t.values();let s,u;for(;(s=a.next())&&!s.done;){const c=e.values();let f=!1,p=0;for(;(u=c.next())&&!u.done;){if(!i[p]&&r.equals(s.value,u.value,s.value,u.value,t,e,r)){f=i[p]=!0;break}p++}if(!f)return!1}return!0}function Bd(t,e){let r=t.byteLength;if(e.byteLength!==r||t.byteOffset!==e.byteOffset)return!1;for(;r-- >0;)if(t[r]!==e[r])return!1;return!0}function JX(t,e){return t.hostname===e.hostname&&t.pathname===e.pathname&&t.protocol===e.protocol&&t.port===e.port&&t.hash===e.hash&&t.username===e.username&&t.password===e.password}function $$(t,e,r,n){return(n===zX||n===BX||n===DX)&&(t.$$typeof||e.$$typeof)?!0:LX(e,n)&&r.equals(t[n],e[n],n,n,t,e,r)}const QX="[object ArrayBuffer]",ZX="[object Arguments]",eY="[object Boolean]",tY="[object DataView]",rY="[object Date]",nY="[object Error]",iY="[object Map]",aY="[object Number]",oY="[object Object]",sY="[object RegExp]",lY="[object Set]",uY="[object String]",cY={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},fY="[object URL]",dY=Object.prototype.toString;function hY({areArrayBuffersEqual:t,areArraysEqual:e,areDataViewsEqual:r,areDatesEqual:n,areErrorsEqual:i,areFunctionsEqual:a,areMapsEqual:s,areNumbersEqual:u,areObjectsEqual:c,arePrimitiveWrappersEqual:f,areRegExpsEqual:p,areSetsEqual:h,areTypedArraysEqual:g,areUrlsEqual:v,unknownTagComparators:y}){return function(b,S,O){if(b===S)return!0;if(b==null||S==null)return!1;const k=typeof b;if(k!==typeof S)return!1;if(k!=="object")return k==="number"?u(b,S,O):k==="function"?a(b,S,O):!1;const T=b.constructor;if(T!==S.constructor)return!1;if(T===Object)return c(b,S,O);if(Array.isArray(b))return e(b,S,O);if(T===Date)return n(b,S,O);if(T===RegExp)return p(b,S,O);if(T===Map)return s(b,S,O);if(T===Set)return h(b,S,O);const E=dY.call(b);if(E===rY)return n(b,S,O);if(E===sY)return p(b,S,O);if(E===iY)return s(b,S,O);if(E===lY)return h(b,S,O);if(E===oY)return typeof b.then!="function"&&typeof S.then!="function"&&c(b,S,O);if(E===fY)return v(b,S,O);if(E===nY)return i(b,S,O);if(E===ZX)return c(b,S,O);if(cY[E])return g(b,S,O);if(E===QX)return t(b,S,O);if(E===tY)return r(b,S,O);if(E===eY||E===aY||E===uY)return f(b,S,O);if(y){let A=y[E];if(!A){const j=MX(b);j&&(A=y[j])}if(A)return A(b,S,O)}return!1}}function pY({circular:t,createCustomConfig:e,strict:r}){let n={areArrayBuffersEqual:qX,areArraysEqual:r?ql:UX,areDataViewsEqual:FX,areDatesEqual:WX,areErrorsEqual:HX,areFunctionsEqual:VX,areMapsEqual:r?C0(b2,ql):b2,areNumbersEqual:KX,areObjectsEqual:r?ql:GX,arePrimitiveWrappersEqual:XX,areRegExpsEqual:YX,areSetsEqual:r?C0(w2,ql):w2,areTypedArraysEqual:r?C0(Bd,ql):Bd,areUrlsEqual:JX,unknownTagComparators:void 0};if(e&&(n=Object.assign({},n,e(n))),t){const i=Df(n.areArraysEqual),a=Df(n.areMapsEqual),s=Df(n.areObjectsEqual),u=Df(n.areSetsEqual);n=Object.assign({},n,{areArraysEqual:i,areMapsEqual:a,areObjectsEqual:s,areSetsEqual:u})}return n}function mY(t){return function(e,r,n,i,a,s,u){return t(e,r,u)}}function gY({circular:t,comparator:e,createState:r,equals:n,strict:i}){if(r)return function(u,c){const{cache:f=t?new WeakMap:void 0,meta:p}=r();return e(u,c,{cache:f,equals:n,meta:p,strict:i})};if(t)return function(u,c){return e(u,c,{cache:new WeakMap,equals:n,meta:void 0,strict:i})};const a={cache:void 0,equals:n,meta:void 0,strict:i};return function(u,c){return e(u,c,a)}}const vY=sa();sa({strict:!0});sa({circular:!0});sa({circular:!0,strict:!0});sa({createInternalComparator:()=>oo});sa({strict:!0,createInternalComparator:()=>oo});sa({circular:!0,createInternalComparator:()=>oo});sa({circular:!0,createInternalComparator:()=>oo,strict:!0});function sa(t={}){const{circular:e=!1,createInternalComparator:r,createState:n,strict:i=!1}=t,a=pY(t),s=hY(a),u=r?r(s):mY(s);return gY({circular:e,comparator:s,createState:n,equals:u,strict:i})}function yY(t){typeof requestAnimationFrame<"u"&&requestAnimationFrame(t)}function x2(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=-1,n=function i(a){r<0&&(r=a),a-r>e?(t(a),r=-1):yY(i)};requestAnimationFrame(n)}function fw(t){"@babel/helpers - typeof";return fw=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},fw(t)}function bY(t){return SY(t)||_Y(t)||xY(t)||wY()}function wY(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
414
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function xY(t,e){if(t){if(typeof t=="string")return _2(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _2(t,e)}}function _2(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function _Y(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function SY(t){if(Array.isArray(t))return t}function kY(){var t={},e=function(){return null},r=!1,n=function i(a){if(!r){if(Array.isArray(a)){if(!a.length)return;var s=a,u=bY(s),c=u[0],f=u.slice(1);if(typeof c=="number"){x2(i.bind(null,f),c);return}i(c),x2(i.bind(null,f));return}fw(a)==="object"&&(t=a,e(t)),typeof a=="function"&&a()}};return{stop:function(){r=!0},start:function(a){r=!1,n(a)},subscribe:function(a){return e=a,function(){e=function(){return null}}}}}function $u(t){"@babel/helpers - typeof";return $u=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$u(t)}function S2(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function k2(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?S2(Object(r),!0).forEach(function(n){I$(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):S2(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function I$(t,e,r){return e=OY(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function OY(t){var e=EY(t,"string");return $u(e)==="symbol"?e:String(e)}function EY(t,e){if($u(t)!=="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if($u(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var AY=function(e,r){return[Object.keys(e),Object.keys(r)].reduce(function(n,i){return n.filter(function(a){return i.includes(a)})})},PY=function(e){return e},TY=function(e){return e.replace(/([A-Z])/g,function(r){return"-".concat(r.toLowerCase())})},ru=function(e,r){return Object.keys(r).reduce(function(n,i){return k2(k2({},n),{},I$({},i,e(i,r[i])))},{})},O2=function(e,r,n){return e.map(function(i){return"".concat(TY(i)," ").concat(r,"ms ").concat(n)}).join(",")};function CY(t,e){return NY(t)||RY(t,e)||M$(t,e)||jY()}function jY(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
415
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function RY(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,i,a,s,u=[],c=!0,f=!1;try{if(a=(r=r.call(t)).next,e!==0)for(;!(c=(n=a.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(p){f=!0,i=p}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(f)throw i}}return u}}function NY(t){if(Array.isArray(t))return t}function $Y(t){return LY(t)||MY(t)||M$(t)||IY()}function IY(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
416
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function M$(t,e){if(t){if(typeof t=="string")return dw(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return dw(t,e)}}function MY(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function LY(t){if(Array.isArray(t))return dw(t)}function dw(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var zd=1e-4,L$=function(e,r){return[0,3*e,3*r-6*e,3*e-3*r+1]},D$=function(e,r){return e.map(function(n,i){return n*Math.pow(r,i)}).reduce(function(n,i){return n+i})},E2=function(e,r){return function(n){var i=L$(e,r);return D$(i,n)}},DY=function(e,r){return function(n){var i=L$(e,r),a=[].concat($Y(i.map(function(s,u){return s*u}).slice(1)),[0]);return D$(a,n)}},A2=function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];var i=r[0],a=r[1],s=r[2],u=r[3];if(r.length===1)switch(r[0]){case"linear":i=0,a=0,s=1,u=1;break;case"ease":i=.25,a=.1,s=.25,u=1;break;case"ease-in":i=.42,a=0,s=1,u=1;break;case"ease-out":i=.42,a=0,s=.58,u=1;break;case"ease-in-out":i=0,a=0,s=.58,u=1;break;default:{var c=r[0].split("(");if(c[0]==="cubic-bezier"&&c[1].split(")")[0].split(",").length===4){var f=c[1].split(")")[0].split(",").map(function(b){return parseFloat(b)}),p=CY(f,4);i=p[0],a=p[1],s=p[2],u=p[3]}}}var h=E2(i,s),g=E2(a,u),v=DY(i,s),y=function(S){return S>1?1:S<0?0:S},x=function(S){for(var O=S>1?1:S,k=O,T=0;T<8;++T){var E=h(k)-O,A=v(k);if(Math.abs(E-O)<zd||A<zd)return g(k);k=y(k-E/A)}return g(k)};return x.isStepper=!1,x},BY=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=e.stiff,n=r===void 0?100:r,i=e.damping,a=i===void 0?8:i,s=e.dt,u=s===void 0?17:s,c=function(p,h,g){var v=-(p-h)*n,y=g*a,x=g+(v-y)*u/1e3,b=g*u/1e3+p;return Math.abs(b-h)<zd&&Math.abs(x)<zd?[h,0]:[b,x]};return c.isStepper=!0,c.dt=u,c},zY=function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;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 A2(i);case"spring":return BY();default:if(i.split("(")[0]==="cubic-bezier")return A2(i)}return typeof i=="function"?i:null};function Iu(t){"@babel/helpers - typeof";return Iu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Iu(t)}function P2(t){return FY(t)||UY(t)||B$(t)||qY()}function qY(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
417
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function UY(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function FY(t){if(Array.isArray(t))return pw(t)}function T2(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function er(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?T2(Object(r),!0).forEach(function(n){hw(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):T2(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function hw(t,e,r){return e=WY(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function WY(t){var e=HY(t,"string");return Iu(e)==="symbol"?e:String(e)}function HY(t,e){if(Iu(t)!=="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(Iu(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function VY(t,e){return XY(t)||GY(t,e)||B$(t,e)||KY()}function KY(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
418
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function B$(t,e){if(t){if(typeof t=="string")return pw(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return pw(t,e)}}function pw(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function GY(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,i,a,s,u=[],c=!0,f=!1;try{if(a=(r=r.call(t)).next,e!==0)for(;!(c=(n=a.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(p){f=!0,i=p}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(f)throw i}}return u}}function XY(t){if(Array.isArray(t))return t}var qd=function(e,r,n){return e+(r-e)*n},mw=function(e){var r=e.from,n=e.to;return r!==n},YY=function t(e,r,n){var i=ru(function(a,s){if(mw(s)){var u=e(s.from,s.to,s.velocity),c=VY(u,2),f=c[0],p=c[1];return er(er({},s),{},{from:f,velocity:p})}return s},r);return n<1?ru(function(a,s){return mw(s)?er(er({},s),{},{velocity:qd(s.velocity,i[a].velocity,n),from:qd(s.from,i[a].from,n)}):s},r):t(e,i,n-1)};const JY=(function(t,e,r,n,i){var a=AY(t,e),s=a.reduce(function(b,S){return er(er({},b),{},hw({},S,[t[S],e[S]]))},{}),u=a.reduce(function(b,S){return er(er({},b),{},hw({},S,{from:t[S],velocity:0,to:e[S]}))},{}),c=-1,f,p,h=function(){return null},g=function(){return ru(function(S,O){return O.from},u)},v=function(){return!Object.values(u).filter(mw).length},y=function(S){f||(f=S);var O=S-f,k=O/r.dt;u=YY(r,u,k),i(er(er(er({},t),e),g())),f=S,v()||(c=requestAnimationFrame(h))},x=function(S){p||(p=S);var O=(S-p)/n,k=ru(function(E,A){return qd.apply(void 0,P2(A).concat([r(O)]))},s);if(i(er(er(er({},t),e),k)),O<1)c=requestAnimationFrame(h);else{var T=ru(function(E,A){return qd.apply(void 0,P2(A).concat([r(1)]))},s);i(er(er(er({},t),e),T))}};return h=r.isStepper?y:x,function(){return requestAnimationFrame(h),function(){cancelAnimationFrame(c)}}});function ms(t){"@babel/helpers - typeof";return ms=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ms(t)}var QY=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function ZY(t,e){if(t==null)return{};var r=eJ(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function eJ(t,e){if(t==null)return{};var r={},n=Object.keys(t),i,a;for(a=0;a<n.length;a++)i=n[a],!(e.indexOf(i)>=0)&&(r[i]=t[i]);return r}function j0(t){return iJ(t)||nJ(t)||rJ(t)||tJ()}function tJ(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
419
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function rJ(t,e){if(t){if(typeof t=="string")return gw(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return gw(t,e)}}function nJ(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function iJ(t){if(Array.isArray(t))return gw(t)}function gw(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function C2(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function pn(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?C2(Object(r),!0).forEach(function(n){Xl(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):C2(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Xl(t,e,r){return e=z$(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function aJ(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function oJ(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,z$(n.key),n)}}function sJ(t,e,r){return e&&oJ(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function z$(t){var e=lJ(t,"string");return ms(e)==="symbol"?e:String(e)}function lJ(t,e){if(ms(t)!=="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(ms(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function uJ(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&vw(t,e)}function vw(t,e){return vw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},vw(t,e)}function cJ(t){var e=fJ();return function(){var n=Ud(t),i;if(e){var a=Ud(this).constructor;i=Reflect.construct(n,arguments,a)}else i=n.apply(this,arguments);return yw(this,i)}}function yw(t,e){if(e&&(ms(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return bw(t)}function bw(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function fJ(){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 Ud(t){return Ud=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ud(t)}var Un=(function(t){uJ(r,t);var e=cJ(r);function r(n,i){var a;aJ(this,r),a=e.call(this,n,i);var s=a.props,u=s.isActive,c=s.attributeName,f=s.from,p=s.to,h=s.steps,g=s.children,v=s.duration;if(a.handleStyleChange=a.handleStyleChange.bind(bw(a)),a.changeStyle=a.changeStyle.bind(bw(a)),!u||v<=0)return a.state={style:{}},typeof g=="function"&&(a.state={style:p}),yw(a);if(h&&h.length)a.state={style:h[0].style};else if(f){if(typeof g=="function")return a.state={style:f},yw(a);a.state={style:c?Xl({},c,f):f}}else a.state={style:{}};return a}return sJ(r,[{key:"componentDidMount",value:function(){var i=this.props,a=i.isActive,s=i.canBegin;this.mounted=!0,!(!a||!s)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(i){var a=this.props,s=a.isActive,u=a.canBegin,c=a.attributeName,f=a.shouldReAnimate,p=a.to,h=a.from,g=this.state.style;if(u){if(!s){var v={style:c?Xl({},c,p):p};this.state&&g&&(c&&g[c]!==p||!c&&g!==p)&&this.setState(v);return}if(!(vY(i.to,p)&&i.canBegin&&i.isActive)){var y=!i.canBegin||!i.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var x=y||f?h:i.to;if(this.state&&g){var b={style:c?Xl({},c,x):x};(c&&g[c]!==x||!c&&g!==x)&&this.setState(b)}this.runAnimation(pn(pn({},this.props),{},{from:x,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var i=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),i&&i()}},{key:"handleStyleChange",value:function(i){this.changeStyle(i)}},{key:"changeStyle",value:function(i){this.mounted&&this.setState({style:i})}},{key:"runJSAnimation",value:function(i){var a=this,s=i.from,u=i.to,c=i.duration,f=i.easing,p=i.begin,h=i.onAnimationEnd,g=i.onAnimationStart,v=JY(s,u,zY(f),c,this.changeStyle),y=function(){a.stopJSAnimation=v()};this.manager.start([g,p,y,c,h])}},{key:"runStepAnimation",value:function(i){var a=this,s=i.steps,u=i.begin,c=i.onAnimationStart,f=s[0],p=f.style,h=f.duration,g=h===void 0?0:h,v=function(x,b,S){if(S===0)return x;var O=b.duration,k=b.easing,T=k===void 0?"ease":k,E=b.style,A=b.properties,j=b.onAnimationEnd,R=S>0?s[S-1]:b,M=A||Object.keys(E);if(typeof T=="function"||T==="spring")return[].concat(j0(x),[a.runJSAnimation.bind(a,{from:R.style,to:E,duration:O,easing:T}),O]);var H=O2(M,O,T),U=pn(pn(pn({},R.style),E),{},{transition:H});return[].concat(j0(x),[U,O,j]).filter(PY)};return this.manager.start([c].concat(j0(s.reduce(v,[p,Math.max(g,u)])),[i.onAnimationEnd]))}},{key:"runAnimation",value:function(i){this.manager||(this.manager=kY());var a=i.begin,s=i.duration,u=i.attributeName,c=i.to,f=i.easing,p=i.onAnimationStart,h=i.onAnimationEnd,g=i.steps,v=i.children,y=this.manager;if(this.unSubscribe=y.subscribe(this.handleStyleChange),typeof f=="function"||typeof v=="function"||f==="spring"){this.runJSAnimation(i);return}if(g.length>1){this.runStepAnimation(i);return}var x=u?Xl({},u,c):c,b=O2(Object.keys(x),s,f);y.start([p,a,pn(pn({},x),{},{transition:b}),s,h])}},{key:"render",value:function(){var i=this.props,a=i.children;i.begin;var s=i.duration;i.attributeName,i.easing;var u=i.isActive;i.steps,i.from,i.to,i.canBegin,i.onAnimationEnd,i.shouldReAnimate,i.onAnimationReStart;var c=ZY(i,QY),f=N.Children.count(a),p=this.state.style;if(typeof a=="function")return a(p);if(!u||f===0||s<=0)return a;var h=function(v){var y=v.props,x=y.style,b=x===void 0?{}:x,S=y.className,O=N.cloneElement(v,pn(pn({},c),{},{style:pn(pn({},b),p),className:S}));return O};return f===1?h(N.Children.only(a)):$.createElement("div",null,N.Children.map(a,function(g){return h(g)}))}}]),r})(N.PureComponent);Un.displayName="Animate";Un.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};Un.propTypes={from:Xe.oneOfType([Xe.object,Xe.string]),to:Xe.oneOfType([Xe.object,Xe.string]),attributeName:Xe.string,duration:Xe.number,begin:Xe.number,easing:Xe.oneOfType([Xe.string,Xe.func]),steps:Xe.arrayOf(Xe.shape({duration:Xe.number.isRequired,style:Xe.object.isRequired,easing:Xe.oneOfType([Xe.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),Xe.func]),properties:Xe.arrayOf("string"),onAnimationEnd:Xe.func})),children:Xe.oneOfType([Xe.node,Xe.func]),isActive:Xe.bool,canBegin:Xe.bool,onAnimationEnd:Xe.func,shouldReAnimate:Xe.bool,onAnimationStart:Xe.func,onAnimationReStart:Xe.func};function Mu(t){"@babel/helpers - typeof";return Mu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Mu(t)}function Fd(){return Fd=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Fd.apply(this,arguments)}function dJ(t,e){return gJ(t)||mJ(t,e)||pJ(t,e)||hJ()}function hJ(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
420
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function pJ(t,e){if(t){if(typeof t=="string")return j2(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return j2(t,e)}}function j2(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function mJ(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,i,a,s,u=[],c=!0,f=!1;try{if(a=(r=r.call(t)).next,e!==0)for(;!(c=(n=a.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(p){f=!0,i=p}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(f)throw i}}return u}}function gJ(t){if(Array.isArray(t))return t}function R2(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function N2(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?R2(Object(r),!0).forEach(function(n){vJ(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):R2(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function vJ(t,e,r){return e=yJ(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function yJ(t){var e=bJ(t,"string");return Mu(e)=="symbol"?e:e+""}function bJ(t,e){if(Mu(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(Mu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var $2=function(e,r,n,i,a){var s=Math.min(Math.abs(n)/2,Math.abs(i)/2),u=i>=0?1:-1,c=n>=0?1:-1,f=i>=0&&n>=0||i<0&&n<0?1:0,p;if(s>0&&a instanceof Array){for(var h=[0,0,0,0],g=0,v=4;g<v;g++)h[g]=a[g]>s?s:a[g];p="M".concat(e,",").concat(r+u*h[0]),h[0]>0&&(p+="A ".concat(h[0],",").concat(h[0],",0,0,").concat(f,",").concat(e+c*h[0],",").concat(r)),p+="L ".concat(e+n-c*h[1],",").concat(r),h[1]>0&&(p+="A ".concat(h[1],",").concat(h[1],",0,0,").concat(f,`,
|
|
421
|
-
`).concat(e+n,",").concat(r+u*h[1])),p+="L ".concat(e+n,",").concat(r+i-u*h[2]),h[2]>0&&(p+="A ".concat(h[2],",").concat(h[2],",0,0,").concat(f,`,
|
|
422
|
-
`).concat(e+n-c*h[2],",").concat(r+i)),p+="L ".concat(e+c*h[3],",").concat(r+i),h[3]>0&&(p+="A ".concat(h[3],",").concat(h[3],",0,0,").concat(f,`,
|
|
423
|
-
`).concat(e,",").concat(r+i-u*h[3])),p+="Z"}else if(s>0&&a===+a&&a>0){var y=Math.min(s,a);p="M ".concat(e,",").concat(r+u*y,`
|
|
424
|
-
A `).concat(y,",").concat(y,",0,0,").concat(f,",").concat(e+c*y,",").concat(r,`
|
|
425
|
-
L `).concat(e+n-c*y,",").concat(r,`
|
|
426
|
-
A `).concat(y,",").concat(y,",0,0,").concat(f,",").concat(e+n,",").concat(r+u*y,`
|
|
427
|
-
L `).concat(e+n,",").concat(r+i-u*y,`
|
|
428
|
-
A `).concat(y,",").concat(y,",0,0,").concat(f,",").concat(e+n-c*y,",").concat(r+i,`
|
|
429
|
-
L `).concat(e+c*y,",").concat(r+i,`
|
|
430
|
-
A `).concat(y,",").concat(y,",0,0,").concat(f,",").concat(e,",").concat(r+i-u*y," Z")}else p="M ".concat(e,",").concat(r," h ").concat(n," v ").concat(i," h ").concat(-n," Z");return p},wJ=function(e,r){if(!e||!r)return!1;var n=e.x,i=e.y,a=r.x,s=r.y,u=r.width,c=r.height;if(Math.abs(u)>0&&Math.abs(c)>0){var f=Math.min(a,a+u),p=Math.max(a,a+u),h=Math.min(s,s+c),g=Math.max(s,s+c);return n>=f&&n<=p&&i>=h&&i<=g}return!1},xJ={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},c1=function(e){var r=N2(N2({},xJ),e),n=N.useRef(),i=N.useState(-1),a=dJ(i,2),s=a[0],u=a[1];N.useEffect(function(){if(n.current&&n.current.getTotalLength)try{var T=n.current.getTotalLength();T&&u(T)}catch{}},[]);var c=r.x,f=r.y,p=r.width,h=r.height,g=r.radius,v=r.className,y=r.animationEasing,x=r.animationDuration,b=r.animationBegin,S=r.isAnimationActive,O=r.isUpdateAnimationActive;if(c!==+c||f!==+f||p!==+p||h!==+h||p===0||h===0)return null;var k=Le("recharts-rectangle",v);return O?$.createElement(Un,{canBegin:s>0,from:{width:p,height:h,x:c,y:f},to:{width:p,height:h,x:c,y:f},duration:x,animationEasing:y,isActive:O},function(T){var E=T.width,A=T.height,j=T.x,R=T.y;return $.createElement(Un,{canBegin:s>0,from:"0px ".concat(s===-1?1:s,"px"),to:"".concat(s,"px 0px"),attributeName:"strokeDasharray",begin:b,duration:x,isActive:S,easing:y},$.createElement("path",Fd({},Ee(r,!0),{className:k,d:$2(j,R,E,A,g),ref:n})))}):$.createElement("path",Fd({},Ee(r,!0),{className:k,d:$2(c,f,p,h,g)}))},_J=["points","className","baseLinePoints","connectNulls"];function Ko(){return Ko=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Ko.apply(this,arguments)}function SJ(t,e){if(t==null)return{};var r=kJ(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function kJ(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}function I2(t){return PJ(t)||AJ(t)||EJ(t)||OJ()}function OJ(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
431
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function EJ(t,e){if(t){if(typeof t=="string")return ww(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ww(t,e)}}function AJ(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function PJ(t){if(Array.isArray(t))return ww(t)}function ww(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var M2=function(e){return e&&e.x===+e.x&&e.y===+e.y},TJ=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],r=[[]];return e.forEach(function(n){M2(n)?r[r.length-1].push(n):r[r.length-1].length>0&&r.push([])}),M2(e[0])&&r[r.length-1].push(e[0]),r[r.length-1].length<=0&&(r=r.slice(0,-1)),r},nu=function(e,r){var n=TJ(e);r&&(n=[n.reduce(function(a,s){return[].concat(I2(a),I2(s))},[])]);var i=n.map(function(a){return a.reduce(function(s,u,c){return"".concat(s).concat(c===0?"M":"L").concat(u.x,",").concat(u.y)},"")}).join("");return n.length===1?"".concat(i,"Z"):i},CJ=function(e,r,n){var i=nu(e,n);return"".concat(i.slice(-1)==="Z"?i.slice(0,-1):i,"L").concat(nu(r.reverse(),n).slice(1))},jJ=function(e){var r=e.points,n=e.className,i=e.baseLinePoints,a=e.connectNulls,s=SJ(e,_J);if(!r||!r.length)return null;var u=Le("recharts-polygon",n);if(i&&i.length){var c=s.stroke&&s.stroke!=="none",f=CJ(r,i,a);return $.createElement("g",{className:u},$.createElement("path",Ko({},Ee(s,!0),{fill:f.slice(-1)==="Z"?s.fill:"none",stroke:"none",d:f})),c?$.createElement("path",Ko({},Ee(s,!0),{fill:"none",d:nu(r,a)})):null,c?$.createElement("path",Ko({},Ee(s,!0),{fill:"none",d:nu(i,a)})):null)}var p=nu(r,a);return $.createElement("path",Ko({},Ee(s,!0),{fill:p.slice(-1)==="Z"?s.fill:"none",className:u,d:p}))};function xw(){return xw=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},xw.apply(this,arguments)}var Wh=function(e){var r=e.cx,n=e.cy,i=e.r,a=e.className,s=Le("recharts-dot",a);return r===+r&&n===+n&&i===+i?N.createElement("circle",xw({},Ee(e,!1),fd(e),{className:s,cx:r,cy:n,r:i})):null};function Lu(t){"@babel/helpers - typeof";return Lu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Lu(t)}var RJ=["x","y","top","left","width","height","className"];function _w(){return _w=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},_w.apply(this,arguments)}function L2(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function NJ(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?L2(Object(r),!0).forEach(function(n){$J(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):L2(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function $J(t,e,r){return e=IJ(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function IJ(t){var e=MJ(t,"string");return Lu(e)=="symbol"?e:e+""}function MJ(t,e){if(Lu(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(Lu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function LJ(t,e){if(t==null)return{};var r=DJ(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function DJ(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}var BJ=function(e,r,n,i,a,s){return"M".concat(e,",").concat(a,"v").concat(i,"M").concat(s,",").concat(r,"h").concat(n)},zJ=function(e){var r=e.x,n=r===void 0?0:r,i=e.y,a=i===void 0?0:i,s=e.top,u=s===void 0?0:s,c=e.left,f=c===void 0?0:c,p=e.width,h=p===void 0?0:p,g=e.height,v=g===void 0?0:g,y=e.className,x=LJ(e,RJ),b=NJ({x:n,y:a,top:u,left:f,width:h,height:v},x);return!fe(n)||!fe(a)||!fe(h)||!fe(v)||!fe(u)||!fe(f)?null:$.createElement("path",_w({},Ee(b,!0),{className:Le("recharts-cross",y),d:BJ(n,a,h,v,u,f)}))},R0,D2;function qJ(){if(D2)return R0;D2=1;var t=Bh(),e=r$(),r=Hn();function n(i,a){return i&&i.length?t(i,r(a,2),e):void 0}return R0=n,R0}var UJ=qJ();const FJ=Je(UJ);var N0,B2;function WJ(){if(B2)return N0;B2=1;var t=Bh(),e=Hn(),r=n$();function n(i,a){return i&&i.length?t(i,e(a,2),r):void 0}return N0=n,N0}var HJ=WJ();const VJ=Je(HJ);var KJ=["cx","cy","angle","ticks","axisLine"],GJ=["ticks","tick","angle","tickFormatter","stroke"];function gs(t){"@babel/helpers - typeof";return gs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},gs(t)}function iu(){return iu=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},iu.apply(this,arguments)}function z2(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function ja(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?z2(Object(r),!0).forEach(function(n){Hh(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):z2(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function q2(t,e){if(t==null)return{};var r=XJ(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function XJ(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}function YJ(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function U2(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,U$(n.key),n)}}function JJ(t,e,r){return e&&U2(t.prototype,e),r&&U2(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function QJ(t,e,r){return e=Wd(e),ZJ(t,q$()?Reflect.construct(e,r||[],Wd(t).constructor):e.apply(t,r))}function ZJ(t,e){if(e&&(gs(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return eQ(t)}function eQ(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function q$(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(q$=function(){return!!t})()}function Wd(t){return Wd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Wd(t)}function tQ(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Sw(t,e)}function Sw(t,e){return Sw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Sw(t,e)}function Hh(t,e,r){return e=U$(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function U$(t){var e=rQ(t,"string");return gs(e)=="symbol"?e:e+""}function rQ(t,e){if(gs(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(gs(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Vh=(function(t){function e(){return YJ(this,e),QJ(this,e,arguments)}return tQ(e,t),JJ(e,[{key:"getTickValueCoord",value:function(n){var i=n.coordinate,a=this.props,s=a.angle,u=a.cx,c=a.cy;return at(u,c,i,s)}},{key:"getTickTextAnchor",value:function(){var n=this.props.orientation,i;switch(n){case"left":i="end";break;case"right":i="start";break;default:i="middle";break}return i}},{key:"getViewBox",value:function(){var n=this.props,i=n.cx,a=n.cy,s=n.angle,u=n.ticks,c=FJ(u,function(p){return p.coordinate||0}),f=VJ(u,function(p){return p.coordinate||0});return{cx:i,cy:a,startAngle:s,endAngle:s,innerRadius:f.coordinate||0,outerRadius:c.coordinate||0}}},{key:"renderAxisLine",value:function(){var n=this.props,i=n.cx,a=n.cy,s=n.angle,u=n.ticks,c=n.axisLine,f=q2(n,KJ),p=u.reduce(function(y,x){return[Math.min(y[0],x.coordinate),Math.max(y[1],x.coordinate)]},[1/0,-1/0]),h=at(i,a,p[0],s),g=at(i,a,p[1],s),v=ja(ja(ja({},Ee(f,!1)),{},{fill:"none"},Ee(c,!1)),{},{x1:h.x,y1:h.y,x2:g.x,y2:g.y});return $.createElement("line",iu({className:"recharts-polar-radius-axis-line"},v))}},{key:"renderTicks",value:function(){var n=this,i=this.props,a=i.ticks,s=i.tick,u=i.angle,c=i.tickFormatter,f=i.stroke,p=q2(i,GJ),h=this.getTickTextAnchor(),g=Ee(p,!1),v=Ee(s,!1),y=a.map(function(x,b){var S=n.getTickValueCoord(x),O=ja(ja(ja(ja({textAnchor:h,transform:"rotate(".concat(90-u,", ").concat(S.x,", ").concat(S.y,")")},g),{},{stroke:"none",fill:f},v),{},{index:b},S),{},{payload:x});return $.createElement(qe,iu({className:Le("recharts-polar-radius-axis-tick",C$(s)),key:"tick-".concat(x.coordinate)},Ya(n.props,x,b)),e.renderTickItem(s,O,c?c(x.value,b):x.value))});return $.createElement(qe,{className:"recharts-polar-radius-axis-ticks"},y)}},{key:"render",value:function(){var n=this.props,i=n.ticks,a=n.axisLine,s=n.tick;return!i||!i.length?null:$.createElement(qe,{className:Le("recharts-polar-radius-axis",this.props.className)},a&&this.renderAxisLine(),s&&this.renderTicks(),Kt.renderCallByParent(this.props,this.getViewBox()))}}],[{key:"renderTickItem",value:function(n,i,a){var s;return $.isValidElement(n)?s=$.cloneElement(n,i):$e(n)?s=n(i):s=$.createElement(Ja,iu({},i,{className:"recharts-polar-radius-axis-tick-value"}),a),s}}])})(N.PureComponent);Hh(Vh,"displayName","PolarRadiusAxis");Hh(Vh,"axisType","radiusAxis");Hh(Vh,"defaultProps",{type:"number",radiusAxisId:0,cx:0,cy:0,angle:0,orientation:"right",stroke:"#ccc",axisLine:!0,tick:!0,tickCount:5,allowDataOverflow:!1,scale:"auto",allowDuplicatedCategory:!0});function vs(t){"@babel/helpers - typeof";return vs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},vs(t)}function La(){return La=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},La.apply(this,arguments)}function F2(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Ra(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?F2(Object(r),!0).forEach(function(n){Kh(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):F2(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function nQ(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function W2(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,W$(n.key),n)}}function iQ(t,e,r){return e&&W2(t.prototype,e),r&&W2(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function aQ(t,e,r){return e=Hd(e),oQ(t,F$()?Reflect.construct(e,r||[],Hd(t).constructor):e.apply(t,r))}function oQ(t,e){if(e&&(vs(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return sQ(t)}function sQ(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function F$(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(F$=function(){return!!t})()}function Hd(t){return Hd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Hd(t)}function lQ(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&kw(t,e)}function kw(t,e){return kw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},kw(t,e)}function Kh(t,e,r){return e=W$(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function W$(t){var e=uQ(t,"string");return vs(e)=="symbol"?e:e+""}function uQ(t,e){if(vs(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(vs(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var cQ=Math.PI/180,H2=1e-5,Gh=(function(t){function e(){return nQ(this,e),aQ(this,e,arguments)}return lQ(e,t),iQ(e,[{key:"getTickLineCoord",value:function(n){var i=this.props,a=i.cx,s=i.cy,u=i.radius,c=i.orientation,f=i.tickSize,p=f||8,h=at(a,s,u,n.coordinate),g=at(a,s,u+(c==="inner"?-1:1)*p,n.coordinate);return{x1:h.x,y1:h.y,x2:g.x,y2:g.y}}},{key:"getTickTextAnchor",value:function(n){var i=this.props.orientation,a=Math.cos(-n.coordinate*cQ),s;return a>H2?s=i==="outer"?"start":"end":a<-H2?s=i==="outer"?"end":"start":s="middle",s}},{key:"renderAxisLine",value:function(){var n=this.props,i=n.cx,a=n.cy,s=n.radius,u=n.axisLine,c=n.axisLineType,f=Ra(Ra({},Ee(this.props,!1)),{},{fill:"none"},Ee(u,!1));if(c==="circle")return $.createElement(Wh,La({className:"recharts-polar-angle-axis-line"},f,{cx:i,cy:a,r:s}));var p=this.props.ticks,h=p.map(function(g){return at(i,a,s,g.coordinate)});return $.createElement(jJ,La({className:"recharts-polar-angle-axis-line"},f,{points:h}))}},{key:"renderTicks",value:function(){var n=this,i=this.props,a=i.ticks,s=i.tick,u=i.tickLine,c=i.tickFormatter,f=i.stroke,p=Ee(this.props,!1),h=Ee(s,!1),g=Ra(Ra({},p),{},{fill:"none"},Ee(u,!1)),v=a.map(function(y,x){var b=n.getTickLineCoord(y),S=n.getTickTextAnchor(y),O=Ra(Ra(Ra({textAnchor:S},p),{},{stroke:"none",fill:f},h),{},{index:x,payload:y,x:b.x2,y:b.y2});return $.createElement(qe,La({className:Le("recharts-polar-angle-axis-tick",C$(s)),key:"tick-".concat(y.coordinate)},Ya(n.props,y,x)),u&&$.createElement("line",La({className:"recharts-polar-angle-axis-tick-line"},g,b)),s&&e.renderTickItem(s,O,c?c(y.value,x):y.value))});return $.createElement(qe,{className:"recharts-polar-angle-axis-ticks"},v)}},{key:"render",value:function(){var n=this.props,i=n.ticks,a=n.radius,s=n.axisLine;return a<=0||!i||!i.length?null:$.createElement(qe,{className:Le("recharts-polar-angle-axis",this.props.className)},s&&this.renderAxisLine(),this.renderTicks())}}],[{key:"renderTickItem",value:function(n,i,a){var s;return $.isValidElement(n)?s=$.cloneElement(n,i):$e(n)?s=n(i):s=$.createElement(Ja,La({},i,{className:"recharts-polar-angle-axis-tick-value"}),a),s}}])})(N.PureComponent);Kh(Gh,"displayName","PolarAngleAxis");Kh(Gh,"axisType","angleAxis");Kh(Gh,"defaultProps",{type:"category",angleAxisId:0,scale:"auto",cx:0,cy:0,orientation:"outer",axisLine:!0,tickLine:!0,tickSize:8,tick:!0,hide:!1,allowDuplicatedCategory:!0});var $0,V2;function fQ(){if(V2)return $0;V2=1;var t=rN(),e=t(Object.getPrototypeOf,Object);return $0=e,$0}var I0,K2;function dQ(){if(K2)return I0;K2=1;var t=bi(),e=fQ(),r=wi(),n="[object Object]",i=Function.prototype,a=Object.prototype,s=i.toString,u=a.hasOwnProperty,c=s.call(Object);function f(p){if(!r(p)||t(p)!=n)return!1;var h=e(p);if(h===null)return!0;var g=u.call(h,"constructor")&&h.constructor;return typeof g=="function"&&g instanceof g&&s.call(g)==c}return I0=f,I0}var hQ=dQ();const pQ=Je(hQ);var M0,G2;function mQ(){if(G2)return M0;G2=1;var t=bi(),e=wi(),r="[object Boolean]";function n(i){return i===!0||i===!1||e(i)&&t(i)==r}return M0=n,M0}var gQ=mQ();const vQ=Je(gQ);function Du(t){"@babel/helpers - typeof";return Du=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Du(t)}function Vd(){return Vd=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Vd.apply(this,arguments)}function yQ(t,e){return _Q(t)||xQ(t,e)||wQ(t,e)||bQ()}function bQ(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
432
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function wQ(t,e){if(t){if(typeof t=="string")return X2(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return X2(t,e)}}function X2(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function xQ(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,i,a,s,u=[],c=!0,f=!1;try{if(a=(r=r.call(t)).next,e!==0)for(;!(c=(n=a.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(p){f=!0,i=p}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(f)throw i}}return u}}function _Q(t){if(Array.isArray(t))return t}function Y2(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function J2(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Y2(Object(r),!0).forEach(function(n){SQ(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Y2(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function SQ(t,e,r){return e=kQ(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function kQ(t){var e=OQ(t,"string");return Du(e)=="symbol"?e:e+""}function OQ(t,e){if(Du(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(Du(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Q2=function(e,r,n,i,a){var s=n-i,u;return u="M ".concat(e,",").concat(r),u+="L ".concat(e+n,",").concat(r),u+="L ".concat(e+n-s/2,",").concat(r+a),u+="L ".concat(e+n-s/2-i,",").concat(r+a),u+="L ".concat(e,",").concat(r," Z"),u},EQ={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},AQ=function(e){var r=J2(J2({},EQ),e),n=N.useRef(),i=N.useState(-1),a=yQ(i,2),s=a[0],u=a[1];N.useEffect(function(){if(n.current&&n.current.getTotalLength)try{var k=n.current.getTotalLength();k&&u(k)}catch{}},[]);var c=r.x,f=r.y,p=r.upperWidth,h=r.lowerWidth,g=r.height,v=r.className,y=r.animationEasing,x=r.animationDuration,b=r.animationBegin,S=r.isUpdateAnimationActive;if(c!==+c||f!==+f||p!==+p||h!==+h||g!==+g||p===0&&h===0||g===0)return null;var O=Le("recharts-trapezoid",v);return S?$.createElement(Un,{canBegin:s>0,from:{upperWidth:0,lowerWidth:0,height:g,x:c,y:f},to:{upperWidth:p,lowerWidth:h,height:g,x:c,y:f},duration:x,animationEasing:y,isActive:S},function(k){var T=k.upperWidth,E=k.lowerWidth,A=k.height,j=k.x,R=k.y;return $.createElement(Un,{canBegin:s>0,from:"0px ".concat(s===-1?1:s,"px"),to:"".concat(s,"px 0px"),attributeName:"strokeDasharray",begin:b,duration:x,easing:y},$.createElement("path",Vd({},Ee(r,!0),{className:O,d:Q2(j,R,T,E,A),ref:n})))}):$.createElement("g",null,$.createElement("path",Vd({},Ee(r,!0),{className:O,d:Q2(c,f,p,h,g)})))},PQ=["option","shapeType","propTransformer","activeClassName","isActive"];function Bu(t){"@babel/helpers - typeof";return Bu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Bu(t)}function TQ(t,e){if(t==null)return{};var r=CQ(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function CQ(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}function Z2(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Kd(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Z2(Object(r),!0).forEach(function(n){jQ(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Z2(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function jQ(t,e,r){return e=RQ(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function RQ(t){var e=NQ(t,"string");return Bu(e)=="symbol"?e:e+""}function NQ(t,e){if(Bu(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(Bu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function $Q(t,e){return Kd(Kd({},e),t)}function IQ(t,e){return t==="symbols"}function eC(t){var e=t.shapeType,r=t.elementProps;switch(e){case"rectangle":return $.createElement(c1,r);case"trapezoid":return $.createElement(AQ,r);case"sector":return $.createElement(N$,r);case"symbols":if(IQ(e))return $.createElement(Tx,r);break;default:return null}}function MQ(t){return N.isValidElement(t)?t.props:t}function H$(t){var e=t.option,r=t.shapeType,n=t.propTransformer,i=n===void 0?$Q:n,a=t.activeClassName,s=a===void 0?"recharts-active-shape":a,u=t.isActive,c=TQ(t,PQ),f;if(N.isValidElement(e))f=N.cloneElement(e,Kd(Kd({},c),MQ(e)));else if($e(e))f=e(c);else if(pQ(e)&&!vQ(e)){var p=i(e,c);f=$.createElement(eC,{shapeType:r,elementProps:p})}else{var h=c;f=$.createElement(eC,{shapeType:r,elementProps:h})}return u?$.createElement(qe,{className:s},f):f}function Xh(t,e){return e!=null&&"trapezoids"in t.props}function Yh(t,e){return e!=null&&"sectors"in t.props}function zu(t,e){return e!=null&&"points"in t.props}function LQ(t,e){var r,n,i=t.x===(e==null||(r=e.labelViewBox)===null||r===void 0?void 0:r.x)||t.x===e.x,a=t.y===(e==null||(n=e.labelViewBox)===null||n===void 0?void 0:n.y)||t.y===e.y;return i&&a}function DQ(t,e){var r=t.endAngle===e.endAngle,n=t.startAngle===e.startAngle;return r&&n}function BQ(t,e){var r=t.x===e.x,n=t.y===e.y,i=t.z===e.z;return r&&n&&i}function zQ(t,e){var r;return Xh(t,e)?r=LQ:Yh(t,e)?r=DQ:zu(t,e)&&(r=BQ),r}function qQ(t,e){var r;return Xh(t,e)?r="trapezoids":Yh(t,e)?r="sectors":zu(t,e)&&(r="points"),r}function UQ(t,e){if(Xh(t,e)){var r;return(r=e.tooltipPayload)===null||r===void 0||(r=r[0])===null||r===void 0||(r=r.payload)===null||r===void 0?void 0:r.payload}if(Yh(t,e)){var n;return(n=e.tooltipPayload)===null||n===void 0||(n=n[0])===null||n===void 0||(n=n.payload)===null||n===void 0?void 0:n.payload}return zu(t,e)?e.payload:{}}function FQ(t){var e=t.activeTooltipItem,r=t.graphicalItem,n=t.itemData,i=qQ(r,e),a=UQ(r,e),s=n.filter(function(c,f){var p=hs(a,c),h=r.props[i].filter(function(y){var x=zQ(r,e);return x(y,e)}),g=r.props[i].indexOf(h[h.length-1]),v=f===g;return p&&v}),u=n.indexOf(s[s.length-1]);return u}var Xf;function ys(t){"@babel/helpers - typeof";return ys=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ys(t)}function Go(){return Go=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Go.apply(this,arguments)}function tC(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function nt(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?tC(Object(r),!0).forEach(function(n){Zr(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):tC(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function WQ(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function rC(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,K$(n.key),n)}}function HQ(t,e,r){return e&&rC(t.prototype,e),r&&rC(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function VQ(t,e,r){return e=Gd(e),KQ(t,V$()?Reflect.construct(e,r||[],Gd(t).constructor):e.apply(t,r))}function KQ(t,e){if(e&&(ys(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return GQ(t)}function GQ(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function V$(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(V$=function(){return!!t})()}function Gd(t){return Gd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Gd(t)}function XQ(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ow(t,e)}function Ow(t,e){return Ow=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Ow(t,e)}function Zr(t,e,r){return e=K$(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function K$(t){var e=YQ(t,"string");return ys(e)=="symbol"?e:e+""}function YQ(t,e){if(ys(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(ys(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var _i=(function(t){function e(r){var n;return WQ(this,e),n=VQ(this,e,[r]),Zr(n,"pieRef",null),Zr(n,"sectorRefs",[]),Zr(n,"id",Bs("recharts-pie-")),Zr(n,"handleAnimationEnd",function(){var i=n.props.onAnimationEnd;n.setState({isAnimationFinished:!0}),$e(i)&&i()}),Zr(n,"handleAnimationStart",function(){var i=n.props.onAnimationStart;n.setState({isAnimationFinished:!1}),$e(i)&&i()}),n.state={isAnimationFinished:!r.isAnimationActive,prevIsAnimationActive:r.isAnimationActive,prevAnimationId:r.animationId,sectorToFocus:0},n}return XQ(e,t),HQ(e,[{key:"isActiveIndex",value:function(n){var i=this.props.activeIndex;return Array.isArray(i)?i.indexOf(n)!==-1:n===i}},{key:"hasActiveIndex",value:function(){var n=this.props.activeIndex;return Array.isArray(n)?n.length!==0:n||n===0}},{key:"renderLabels",value:function(n){var i=this.props.isAnimationActive;if(i&&!this.state.isAnimationFinished)return null;var a=this.props,s=a.label,u=a.labelLine,c=a.dataKey,f=a.valueKey,p=Ee(this.props,!1),h=Ee(s,!1),g=Ee(u,!1),v=s&&s.offsetRadius||20,y=n.map(function(x,b){var S=(x.startAngle+x.endAngle)/2,O=at(x.cx,x.cy,x.outerRadius+v,S),k=nt(nt(nt(nt({},p),x),{},{stroke:"none"},h),{},{index:b,textAnchor:e.getTextAnchor(O.x,x.cx)},O),T=nt(nt(nt(nt({},p),x),{},{fill:"none",stroke:x.fill},g),{},{index:b,points:[at(x.cx,x.cy,x.outerRadius,S),O]}),E=c;return Me(c)&&Me(f)?E="value":Me(c)&&(E=f),$.createElement(qe,{key:"label-".concat(x.startAngle,"-").concat(x.endAngle,"-").concat(x.midAngle,"-").concat(b)},u&&e.renderLabelLineItem(u,T,"line"),e.renderLabelItem(s,k,Lt(x,E)))});return $.createElement(qe,{className:"recharts-pie-labels"},y)}},{key:"renderSectorsStatically",value:function(n){var i=this,a=this.props,s=a.activeShape,u=a.blendStroke,c=a.inactiveShape;return n.map(function(f,p){if((f==null?void 0:f.startAngle)===0&&(f==null?void 0:f.endAngle)===0&&n.length!==1)return null;var h=i.isActiveIndex(p),g=c&&i.hasActiveIndex()?c:null,v=h?s:g,y=nt(nt({},f),{},{stroke:u?f.fill:f.stroke,tabIndex:-1});return $.createElement(qe,Go({ref:function(b){b&&!i.sectorRefs.includes(b)&&i.sectorRefs.push(b)},tabIndex:-1,className:"recharts-pie-sector"},Ya(i.props,f,p),{key:"sector-".concat(f==null?void 0:f.startAngle,"-").concat(f==null?void 0:f.endAngle,"-").concat(f.midAngle,"-").concat(p)}),$.createElement(H$,Go({option:v,isActive:h,shapeType:"sector"},y)))})}},{key:"renderSectorsWithAnimation",value:function(){var n=this,i=this.props,a=i.sectors,s=i.isAnimationActive,u=i.animationBegin,c=i.animationDuration,f=i.animationEasing,p=i.animationId,h=this.state,g=h.prevSectors,v=h.prevIsAnimationActive;return $.createElement(Un,{begin:u,duration:c,isActive:s,easing:f,from:{t:0},to:{t:1},key:"pie-".concat(p,"-").concat(v),onAnimationStart:this.handleAnimationStart,onAnimationEnd:this.handleAnimationEnd},function(y){var x=y.t,b=[],S=a&&a[0],O=S.startAngle;return a.forEach(function(k,T){var E=g&&g[T],A=T>0?Mr(k,"paddingAngle",0):0;if(E){var j=Sr(E.endAngle-E.startAngle,k.endAngle-k.startAngle),R=nt(nt({},k),{},{startAngle:O+A,endAngle:O+j(x)+A});b.push(R),O=R.endAngle}else{var M=k.endAngle,H=k.startAngle,U=Sr(0,M-H),B=U(x),F=nt(nt({},k),{},{startAngle:O+A,endAngle:O+B+A});b.push(F),O=F.endAngle}}),$.createElement(qe,null,n.renderSectorsStatically(b))})}},{key:"attachKeyboardHandlers",value:function(n){var i=this;n.onkeydown=function(a){if(!a.altKey)switch(a.key){case"ArrowLeft":{var s=++i.state.sectorToFocus%i.sectorRefs.length;i.sectorRefs[s].focus(),i.setState({sectorToFocus:s});break}case"ArrowRight":{var u=--i.state.sectorToFocus<0?i.sectorRefs.length-1:i.state.sectorToFocus%i.sectorRefs.length;i.sectorRefs[u].focus(),i.setState({sectorToFocus:u});break}case"Escape":{i.sectorRefs[i.state.sectorToFocus].blur(),i.setState({sectorToFocus:0});break}}}}},{key:"renderSectors",value:function(){var n=this.props,i=n.sectors,a=n.isAnimationActive,s=this.state.prevSectors;return a&&i&&i.length&&(!s||!hs(s,i))?this.renderSectorsWithAnimation():this.renderSectorsStatically(i)}},{key:"componentDidMount",value:function(){this.pieRef&&this.attachKeyboardHandlers(this.pieRef)}},{key:"render",value:function(){var n=this,i=this.props,a=i.hide,s=i.sectors,u=i.className,c=i.label,f=i.cx,p=i.cy,h=i.innerRadius,g=i.outerRadius,v=i.isAnimationActive,y=this.state.isAnimationFinished;if(a||!s||!s.length||!fe(f)||!fe(p)||!fe(h)||!fe(g))return null;var x=Le("recharts-pie",u);return $.createElement(qe,{tabIndex:this.props.rootTabIndex,className:x,ref:function(S){n.pieRef=S}},this.renderSectors(),c&&this.renderLabels(s),Kt.renderCallByParent(this.props,null,!1),(!v||y)&&hi.renderCallByParent(this.props,s,!1))}}],[{key:"getDerivedStateFromProps",value:function(n,i){return i.prevIsAnimationActive!==n.isAnimationActive?{prevIsAnimationActive:n.isAnimationActive,prevAnimationId:n.animationId,curSectors:n.sectors,prevSectors:[],isAnimationFinished:!0}:n.isAnimationActive&&n.animationId!==i.prevAnimationId?{prevAnimationId:n.animationId,curSectors:n.sectors,prevSectors:i.curSectors,isAnimationFinished:!0}:n.sectors!==i.curSectors?{curSectors:n.sectors,isAnimationFinished:!0}:null}},{key:"getTextAnchor",value:function(n,i){return n>i?"start":n<i?"end":"middle"}},{key:"renderLabelLineItem",value:function(n,i,a){if($.isValidElement(n))return $.cloneElement(n,i);if($e(n))return n(i);var s=Le("recharts-pie-label-line",typeof n!="boolean"?n.className:"");return $.createElement(ns,Go({},i,{key:a,type:"linear",className:s}))}},{key:"renderLabelItem",value:function(n,i,a){if($.isValidElement(n))return $.cloneElement(n,i);var s=a;if($e(n)&&(s=n(i),$.isValidElement(s)))return s;var u=Le("recharts-pie-label-text",typeof n!="boolean"&&!$e(n)?n.className:"");return $.createElement(Ja,Go({},i,{alignmentBaseline:"middle",className:u}),s)}}])})(N.PureComponent);Xf=_i;Zr(_i,"displayName","Pie");Zr(_i,"defaultProps",{stroke:"#fff",fill:"#808080",legendType:"rect",cx:"50%",cy:"50%",startAngle:0,endAngle:360,innerRadius:0,outerRadius:"80%",paddingAngle:0,labelLine:!0,hide:!1,minAngle:0,isAnimationActive:!no.isSsr,animationBegin:400,animationDuration:1500,animationEasing:"ease",nameKey:"name",blendStroke:!1,rootTabIndex:0});Zr(_i,"parseDeltaAngle",function(t,e){var r=fr(e-t),n=Math.min(Math.abs(e-t),360);return r*n});Zr(_i,"getRealPieData",function(t){var e=t.data,r=t.children,n=Ee(t,!1),i=tn(r,Rh);return e&&e.length?e.map(function(a,s){return nt(nt(nt({payload:a},n),a),i&&i[s]&&i[s].props)}):i&&i.length?i.map(function(a){return nt(nt({},n),a.props)}):[]});Zr(_i,"parseCoordinateOfPie",function(t,e){var r=e.top,n=e.left,i=e.width,a=e.height,s=T$(i,a),u=n+dr(t.cx,i,i/2),c=r+dr(t.cy,a,a/2),f=dr(t.innerRadius,s,0),p=dr(t.outerRadius,s,s*.8),h=t.maxRadius||Math.sqrt(i*i+a*a)/2;return{cx:u,cy:c,innerRadius:f,outerRadius:p,maxRadius:h}});Zr(_i,"getComposedData",function(t){var e=t.item,r=t.offset,n=e.type.defaultProps!==void 0?nt(nt({},e.type.defaultProps),e.props):e.props,i=Xf.getRealPieData(n);if(!i||!i.length)return null;var a=n.cornerRadius,s=n.startAngle,u=n.endAngle,c=n.paddingAngle,f=n.dataKey,p=n.nameKey,h=n.valueKey,g=n.tooltipType,v=Math.abs(n.minAngle),y=Xf.parseCoordinateOfPie(n,r),x=Xf.parseDeltaAngle(s,u),b=Math.abs(x),S=f;Me(f)&&Me(h)?(fi(!1,`Use "dataKey" to specify the value of pie,
|
|
433
|
-
the props "valueKey" will be deprecated in 1.1.0`),S="value"):Me(f)&&(fi(!1,`Use "dataKey" to specify the value of pie,
|
|
434
|
-
the props "valueKey" will be deprecated in 1.1.0`),S=h);var O=i.filter(function(R){return Lt(R,S,0)!==0}).length,k=(b>=360?O:O-1)*c,T=b-O*v-k,E=i.reduce(function(R,M){var H=Lt(M,S,0);return R+(fe(H)?H:0)},0),A;if(E>0){var j;A=i.map(function(R,M){var H=Lt(R,S,0),U=Lt(R,p,M),B=(fe(H)?H:0)/E,F;M?F=j.endAngle+fr(x)*c*(H!==0?1:0):F=s;var J=F+fr(x)*((H!==0?v:0)+B*T),V=(F+J)/2,K=(y.innerRadius+y.outerRadius)/2,Z=[{name:U,value:H,payload:R,dataKey:S,type:g}],G=at(y.cx,y.cy,K,V);return j=nt(nt(nt({percent:B,cornerRadius:a,name:U,tooltipPayload:Z,midAngle:V,middleRadius:K,tooltipPosition:G},R),y),{},{value:Lt(R,S),startAngle:F,endAngle:J,payload:R,paddingAngle:fr(x)*c}),j})}return nt(nt({},y),{},{sectors:A,data:i})});var L0,nC;function JQ(){if(nC)return L0;nC=1;var t=Math.ceil,e=Math.max;function r(n,i,a,s){for(var u=-1,c=e(t((i-n)/(a||1)),0),f=Array(c);c--;)f[s?c:++u]=n,n+=a;return f}return L0=r,L0}var D0,iC;function G$(){if(iC)return D0;iC=1;var t=yN(),e=1/0,r=17976931348623157e292;function n(i){if(!i)return i===0?i:0;if(i=t(i),i===e||i===-e){var a=i<0?-1:1;return a*r}return i===i?i:0}return D0=n,D0}var B0,aC;function QQ(){if(aC)return B0;aC=1;var t=JQ(),e=jh(),r=G$();function n(i){return function(a,s,u){return u&&typeof u!="number"&&e(a,s,u)&&(s=u=void 0),a=r(a),s===void 0?(s=a,a=0):s=r(s),u=u===void 0?a<s?1:-1:r(u),t(a,s,u,i)}}return B0=n,B0}var z0,oC;function ZQ(){if(oC)return z0;oC=1;var t=QQ(),e=t();return z0=e,z0}var eZ=ZQ();const Xd=Je(eZ);function qu(t){"@babel/helpers - typeof";return qu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},qu(t)}function sC(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function lC(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?sC(Object(r),!0).forEach(function(n){X$(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):sC(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function X$(t,e,r){return e=tZ(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function tZ(t){var e=rZ(t,"string");return qu(e)=="symbol"?e:e+""}function rZ(t,e){if(qu(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(qu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var nZ=["Webkit","Moz","O","ms"],iZ=function(e,r){var n=e.replace(/(\w)/,function(a){return a.toUpperCase()}),i=nZ.reduce(function(a,s){return lC(lC({},a),{},X$({},s+n,r))},{});return i[e]=r,i};function bs(t){"@babel/helpers - typeof";return bs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},bs(t)}function Yd(){return Yd=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Yd.apply(this,arguments)}function uC(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function q0(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?uC(Object(r),!0).forEach(function(n){Rr(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):uC(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function aZ(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function cC(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,J$(n.key),n)}}function oZ(t,e,r){return e&&cC(t.prototype,e),r&&cC(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function sZ(t,e,r){return e=Jd(e),lZ(t,Y$()?Reflect.construct(e,r||[],Jd(t).constructor):e.apply(t,r))}function lZ(t,e){if(e&&(bs(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return uZ(t)}function uZ(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Y$(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Y$=function(){return!!t})()}function Jd(t){return Jd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Jd(t)}function cZ(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ew(t,e)}function Ew(t,e){return Ew=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Ew(t,e)}function Rr(t,e,r){return e=J$(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function J$(t){var e=fZ(t,"string");return bs(e)=="symbol"?e:e+""}function fZ(t,e){if(bs(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(bs(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var dZ=function(e){var r=e.data,n=e.startIndex,i=e.endIndex,a=e.x,s=e.width,u=e.travellerWidth;if(!r||!r.length)return{};var c=r.length,f=eu().domain(Xd(0,c)).range([a,a+s-u]),p=f.domain().map(function(h){return f(h)});return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:f(n),endX:f(i),scale:f,scaleValues:p}},fC=function(e){return e.changedTouches&&!!e.changedTouches.length},ws=(function(t){function e(r){var n;return aZ(this,e),n=sZ(this,e,[r]),Rr(n,"handleDrag",function(i){n.leaveTimer&&(clearTimeout(n.leaveTimer),n.leaveTimer=null),n.state.isTravellerMoving?n.handleTravellerMove(i):n.state.isSlideMoving&&n.handleSlideDrag(i)}),Rr(n,"handleTouchMove",function(i){i.changedTouches!=null&&i.changedTouches.length>0&&n.handleDrag(i.changedTouches[0])}),Rr(n,"handleDragEnd",function(){n.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var i=n.props,a=i.endIndex,s=i.onDragEnd,u=i.startIndex;s==null||s({endIndex:a,startIndex:u})}),n.detachDragEndListener()}),Rr(n,"handleLeaveWrapper",function(){(n.state.isTravellerMoving||n.state.isSlideMoving)&&(n.leaveTimer=window.setTimeout(n.handleDragEnd,n.props.leaveTimeOut))}),Rr(n,"handleEnterSlideOrTraveller",function(){n.setState({isTextActive:!0})}),Rr(n,"handleLeaveSlideOrTraveller",function(){n.setState({isTextActive:!1})}),Rr(n,"handleSlideDragStart",function(i){var a=fC(i)?i.changedTouches[0]:i;n.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:a.pageX}),n.attachDragEndListener()}),n.travellerDragStartHandlers={startX:n.handleTravellerDragStart.bind(n,"startX"),endX:n.handleTravellerDragStart.bind(n,"endX")},n.state={},n}return cZ(e,t),oZ(e,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(n){var i=n.startX,a=n.endX,s=this.state.scaleValues,u=this.props,c=u.gap,f=u.data,p=f.length-1,h=Math.min(i,a),g=Math.max(i,a),v=e.getIndexInRange(s,h),y=e.getIndexInRange(s,g);return{startIndex:v-v%c,endIndex:y===p?p:y-y%c}}},{key:"getTextOfTick",value:function(n){var i=this.props,a=i.data,s=i.tickFormatter,u=i.dataKey,c=Lt(a[n],u,n);return $e(s)?s(c,n):c}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(n){var i=this.state,a=i.slideMoveStartX,s=i.startX,u=i.endX,c=this.props,f=c.x,p=c.width,h=c.travellerWidth,g=c.startIndex,v=c.endIndex,y=c.onChange,x=n.pageX-a;x>0?x=Math.min(x,f+p-h-u,f+p-h-s):x<0&&(x=Math.max(x,f-s,f-u));var b=this.getIndex({startX:s+x,endX:u+x});(b.startIndex!==g||b.endIndex!==v)&&y&&y(b),this.setState({startX:s+x,endX:u+x,slideMoveStartX:n.pageX})}},{key:"handleTravellerDragStart",value:function(n,i){var a=fC(i)?i.changedTouches[0]:i;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:n,brushMoveStartX:a.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(n){var i=this.state,a=i.brushMoveStartX,s=i.movingTravellerId,u=i.endX,c=i.startX,f=this.state[s],p=this.props,h=p.x,g=p.width,v=p.travellerWidth,y=p.onChange,x=p.gap,b=p.data,S={startX:this.state.startX,endX:this.state.endX},O=n.pageX-a;O>0?O=Math.min(O,h+g-v-f):O<0&&(O=Math.max(O,h-f)),S[s]=f+O;var k=this.getIndex(S),T=k.startIndex,E=k.endIndex,A=function(){var R=b.length-1;return s==="startX"&&(u>c?T%x===0:E%x===0)||u<c&&E===R||s==="endX"&&(u>c?E%x===0:T%x===0)||u>c&&E===R};this.setState(Rr(Rr({},s,f+O),"brushMoveStartX",n.pageX),function(){y&&A()&&y(k)})}},{key:"handleTravellerMoveKeyboard",value:function(n,i){var a=this,s=this.state,u=s.scaleValues,c=s.startX,f=s.endX,p=this.state[i],h=u.indexOf(p);if(h!==-1){var g=h+n;if(!(g===-1||g>=u.length)){var v=u[g];i==="startX"&&v>=f||i==="endX"&&v<=c||this.setState(Rr({},i,v),function(){a.props.onChange(a.getIndex({startX:a.state.startX,endX:a.state.endX}))})}}}},{key:"renderBackground",value:function(){var n=this.props,i=n.x,a=n.y,s=n.width,u=n.height,c=n.fill,f=n.stroke;return $.createElement("rect",{stroke:f,fill:c,x:i,y:a,width:s,height:u})}},{key:"renderPanorama",value:function(){var n=this.props,i=n.x,a=n.y,s=n.width,u=n.height,c=n.data,f=n.children,p=n.padding,h=N.Children.only(f);return h?$.cloneElement(h,{x:i,y:a,width:s,height:u,margin:p,compact:!0,data:c}):null}},{key:"renderTravellerLayer",value:function(n,i){var a,s,u=this,c=this.props,f=c.y,p=c.travellerWidth,h=c.height,g=c.traveller,v=c.ariaLabel,y=c.data,x=c.startIndex,b=c.endIndex,S=Math.max(n,this.props.x),O=q0(q0({},Ee(this.props,!1)),{},{x:S,y:f,width:p,height:h}),k=v||"Min value: ".concat((a=y[x])===null||a===void 0?void 0:a.name,", Max value: ").concat((s=y[b])===null||s===void 0?void 0:s.name);return $.createElement(qe,{tabIndex:0,role:"slider","aria-label":k,"aria-valuenow":n,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[i],onTouchStart:this.travellerDragStartHandlers[i],onKeyDown:function(E){["ArrowLeft","ArrowRight"].includes(E.key)&&(E.preventDefault(),E.stopPropagation(),u.handleTravellerMoveKeyboard(E.key==="ArrowRight"?1:-1,i))},onFocus:function(){u.setState({isTravellerFocused:!0})},onBlur:function(){u.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},e.renderTraveller(g,O))}},{key:"renderSlide",value:function(n,i){var a=this.props,s=a.y,u=a.height,c=a.stroke,f=a.travellerWidth,p=Math.min(n,i)+f,h=Math.max(Math.abs(i-n)-f,0);return $.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:c,fillOpacity:.2,x:p,y:s,width:h,height:u})}},{key:"renderText",value:function(){var n=this.props,i=n.startIndex,a=n.endIndex,s=n.y,u=n.height,c=n.travellerWidth,f=n.stroke,p=this.state,h=p.startX,g=p.endX,v=5,y={pointerEvents:"none",fill:f};return $.createElement(qe,{className:"recharts-brush-texts"},$.createElement(Ja,Yd({textAnchor:"end",verticalAnchor:"middle",x:Math.min(h,g)-v,y:s+u/2},y),this.getTextOfTick(i)),$.createElement(Ja,Yd({textAnchor:"start",verticalAnchor:"middle",x:Math.max(h,g)+c+v,y:s+u/2},y),this.getTextOfTick(a)))}},{key:"render",value:function(){var n=this.props,i=n.data,a=n.className,s=n.children,u=n.x,c=n.y,f=n.width,p=n.height,h=n.alwaysShowText,g=this.state,v=g.startX,y=g.endX,x=g.isTextActive,b=g.isSlideMoving,S=g.isTravellerMoving,O=g.isTravellerFocused;if(!i||!i.length||!fe(u)||!fe(c)||!fe(f)||!fe(p)||f<=0||p<=0)return null;var k=Le("recharts-brush",a),T=$.Children.count(s)===1,E=iZ("userSelect","none");return $.createElement(qe,{className:k,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:E},this.renderBackground(),T&&this.renderPanorama(),this.renderSlide(v,y),this.renderTravellerLayer(v,"startX"),this.renderTravellerLayer(y,"endX"),(x||b||S||O||h)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(n){var i=n.x,a=n.y,s=n.width,u=n.height,c=n.stroke,f=Math.floor(a+u/2)-1;return $.createElement($.Fragment,null,$.createElement("rect",{x:i,y:a,width:s,height:u,fill:c,stroke:"none"}),$.createElement("line",{x1:i+1,y1:f,x2:i+s-1,y2:f,fill:"none",stroke:"#fff"}),$.createElement("line",{x1:i+1,y1:f+2,x2:i+s-1,y2:f+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(n,i){var a;return $.isValidElement(n)?a=$.cloneElement(n,i):$e(n)?a=n(i):a=e.renderDefaultTraveller(i),a}},{key:"getDerivedStateFromProps",value:function(n,i){var a=n.data,s=n.width,u=n.x,c=n.travellerWidth,f=n.updateId,p=n.startIndex,h=n.endIndex;if(a!==i.prevData||f!==i.prevUpdateId)return q0({prevData:a,prevTravellerWidth:c,prevUpdateId:f,prevX:u,prevWidth:s},a&&a.length?dZ({data:a,width:s,x:u,travellerWidth:c,startIndex:p,endIndex:h}):{scale:null,scaleValues:null});if(i.scale&&(s!==i.prevWidth||u!==i.prevX||c!==i.prevTravellerWidth)){i.scale.range([u,u+s-c]);var g=i.scale.domain().map(function(v){return i.scale(v)});return{prevData:a,prevTravellerWidth:c,prevUpdateId:f,prevX:u,prevWidth:s,startX:i.scale(n.startIndex),endX:i.scale(n.endIndex),scaleValues:g}}return null}},{key:"getIndexInRange",value:function(n,i){for(var a=n.length,s=0,u=a-1;u-s>1;){var c=Math.floor((s+u)/2);n[c]>i?u=c:s=c}return i>=n[u]?u:s}}])})(N.PureComponent);Rr(ws,"displayName","Brush");Rr(ws,"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 U0,dC;function hZ(){if(dC)return U0;dC=1;var t=Mx();function e(r,n){var i;return t(r,function(a,s,u){return i=n(a,s,u),!i}),!!i}return U0=e,U0}var F0,hC;function pZ(){if(hC)return F0;hC=1;var t=XR(),e=Hn(),r=hZ(),n=Or(),i=jh();function a(s,u,c){var f=n(s)?t:r;return c&&i(s,u,c)&&(u=void 0),f(s,e(u,3))}return F0=a,F0}var mZ=pZ();const gZ=Je(mZ);var zn=function(e,r){var n=e.alwaysShow,i=e.ifOverflow;return n&&(i="extendDomain"),i===r},W0,pC;function vZ(){if(pC)return W0;pC=1;var t=hN();function e(r,n,i){n=="__proto__"&&t?t(r,n,{configurable:!0,enumerable:!0,value:i,writable:!0}):r[n]=i}return W0=e,W0}var H0,mC;function yZ(){if(mC)return H0;mC=1;var t=vZ(),e=fN(),r=Hn();function n(i,a){var s={};return a=r(a,3),e(i,function(u,c,f){t(s,c,a(u,c,f))}),s}return H0=n,H0}var bZ=yZ();const wZ=Je(bZ);var V0,gC;function xZ(){if(gC)return V0;gC=1;function t(e,r){for(var n=-1,i=e==null?0:e.length;++n<i;)if(!r(e[n],n,e))return!1;return!0}return V0=t,V0}var K0,vC;function _Z(){if(vC)return K0;vC=1;var t=Mx();function e(r,n){var i=!0;return t(r,function(a,s,u){return i=!!n(a,s,u),i}),i}return K0=e,K0}var G0,yC;function SZ(){if(yC)return G0;yC=1;var t=xZ(),e=_Z(),r=Hn(),n=Or(),i=jh();function a(s,u,c){var f=n(s)?t:e;return c&&i(s,u,c)&&(u=void 0),f(s,r(u,3))}return G0=a,G0}var kZ=SZ();const OZ=Je(kZ);var EZ=["x","y"];function Uu(t){"@babel/helpers - typeof";return Uu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Uu(t)}function Aw(){return Aw=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Aw.apply(this,arguments)}function bC(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Ul(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?bC(Object(r),!0).forEach(function(n){AZ(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):bC(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function AZ(t,e,r){return e=PZ(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function PZ(t){var e=TZ(t,"string");return Uu(e)=="symbol"?e:e+""}function TZ(t,e){if(Uu(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(Uu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function CZ(t,e){if(t==null)return{};var r=jZ(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function jZ(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}function RZ(t,e){var r=t.x,n=t.y,i=CZ(t,EZ),a="".concat(r),s=parseInt(a,10),u="".concat(n),c=parseInt(u,10),f="".concat(e.height||i.height),p=parseInt(f,10),h="".concat(e.width||i.width),g=parseInt(h,10);return Ul(Ul(Ul(Ul(Ul({},e),i),s?{x:s}:{}),c?{y:c}:{}),{},{height:p,width:g,name:e.name,radius:e.radius})}function wC(t){return $.createElement(H$,Aw({shapeType:"rectangle",propTransformer:RZ,activeClassName:"recharts-active-bar"},t))}var NZ=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(n,i){if(typeof e=="number")return e;var a=fe(n)||Qq(n);return a?e(n,i):(a||Za(),r)}},$Z=["value","background"],Q$;function xs(t){"@babel/helpers - typeof";return xs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},xs(t)}function IZ(t,e){if(t==null)return{};var r=MZ(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function MZ(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}function Qd(){return Qd=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Qd.apply(this,arguments)}function xC(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Pt(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?xC(Object(r),!0).forEach(function(n){ta(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):xC(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function LZ(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _C(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,eI(n.key),n)}}function DZ(t,e,r){return e&&_C(t.prototype,e),r&&_C(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function BZ(t,e,r){return e=Zd(e),zZ(t,Z$()?Reflect.construct(e,r||[],Zd(t).constructor):e.apply(t,r))}function zZ(t,e){if(e&&(xs(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return qZ(t)}function qZ(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Z$(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Z$=function(){return!!t})()}function Zd(t){return Zd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Zd(t)}function UZ(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Pw(t,e)}function Pw(t,e){return Pw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Pw(t,e)}function ta(t,e,r){return e=eI(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function eI(t){var e=FZ(t,"string");return xs(e)=="symbol"?e:e+""}function FZ(t,e){if(xs(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(xs(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var nc=(function(t){function e(){var r;LZ(this,e);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return r=BZ(this,e,[].concat(i)),ta(r,"state",{isAnimationFinished:!1}),ta(r,"id",Bs("recharts-bar-")),ta(r,"handleAnimationEnd",function(){var s=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),s&&s()}),ta(r,"handleAnimationStart",function(){var s=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),s&&s()}),r}return UZ(e,t),DZ(e,[{key:"renderRectanglesStatically",value:function(n){var i=this,a=this.props,s=a.shape,u=a.dataKey,c=a.activeIndex,f=a.activeBar,p=Ee(this.props,!1);return n&&n.map(function(h,g){var v=g===c,y=v?f:s,x=Pt(Pt(Pt({},p),h),{},{isActive:v,option:y,index:g,dataKey:u,onAnimationStart:i.handleAnimationStart,onAnimationEnd:i.handleAnimationEnd});return $.createElement(qe,Qd({className:"recharts-bar-rectangle"},Ya(i.props,h,g),{key:"rectangle-".concat(h==null?void 0:h.x,"-").concat(h==null?void 0:h.y,"-").concat(h==null?void 0:h.value,"-").concat(g)}),$.createElement(wC,x))})}},{key:"renderRectanglesWithAnimation",value:function(){var n=this,i=this.props,a=i.data,s=i.layout,u=i.isAnimationActive,c=i.animationBegin,f=i.animationDuration,p=i.animationEasing,h=i.animationId,g=this.state.prevData;return $.createElement(Un,{begin:c,duration:f,isActive:u,easing:p,from:{t:0},to:{t:1},key:"bar-".concat(h),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(v){var y=v.t,x=a.map(function(b,S){var O=g&&g[S];if(O){var k=Sr(O.x,b.x),T=Sr(O.y,b.y),E=Sr(O.width,b.width),A=Sr(O.height,b.height);return Pt(Pt({},b),{},{x:k(y),y:T(y),width:E(y),height:A(y)})}if(s==="horizontal"){var j=Sr(0,b.height),R=j(y);return Pt(Pt({},b),{},{y:b.y+b.height-R,height:R})}var M=Sr(0,b.width),H=M(y);return Pt(Pt({},b),{},{width:H})});return $.createElement(qe,null,n.renderRectanglesStatically(x))})}},{key:"renderRectangles",value:function(){var n=this.props,i=n.data,a=n.isAnimationActive,s=this.state.prevData;return a&&i&&i.length&&(!s||!hs(s,i))?this.renderRectanglesWithAnimation():this.renderRectanglesStatically(i)}},{key:"renderBackground",value:function(){var n=this,i=this.props,a=i.data,s=i.dataKey,u=i.activeIndex,c=Ee(this.props.background,!1);return a.map(function(f,p){f.value;var h=f.background,g=IZ(f,$Z);if(!h)return null;var v=Pt(Pt(Pt(Pt(Pt({},g),{},{fill:"#eee"},h),c),Ya(n.props,f,p)),{},{onAnimationStart:n.handleAnimationStart,onAnimationEnd:n.handleAnimationEnd,dataKey:s,index:p,className:"recharts-bar-background-rectangle"});return $.createElement(wC,Qd({key:"background-bar-".concat(p),option:n.props.background,isActive:p===u},v))})}},{key:"renderErrorBar",value:function(n,i){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var a=this.props,s=a.data,u=a.xAxis,c=a.yAxis,f=a.layout,p=a.children,h=tn(p,Fh);if(!h)return null;var g=f==="vertical"?s[0].height/2:s[0].width/2,v=function(b,S){var O=Array.isArray(b.value)?b.value[1]:b.value;return{x:b.x,y:b.y,value:O,errorVal:Lt(b,S)}},y={clipPath:n?"url(#clipPath-".concat(i,")"):null};return $.createElement(qe,y,h.map(function(x){return $.cloneElement(x,{key:"error-bar-".concat(i,"-").concat(x.props.dataKey),data:s,xAxis:u,yAxis:c,layout:f,offset:g,dataPointFormatter:v})}))}},{key:"render",value:function(){var n=this.props,i=n.hide,a=n.data,s=n.className,u=n.xAxis,c=n.yAxis,f=n.left,p=n.top,h=n.width,g=n.height,v=n.isAnimationActive,y=n.background,x=n.id;if(i||!a||!a.length)return null;var b=this.state.isAnimationFinished,S=Le("recharts-bar",s),O=u&&u.allowDataOverflow,k=c&&c.allowDataOverflow,T=O||k,E=Me(x)?this.id:x;return $.createElement(qe,{className:S},O||k?$.createElement("defs",null,$.createElement("clipPath",{id:"clipPath-".concat(E)},$.createElement("rect",{x:O?f:f-h/2,y:k?p:p-g/2,width:O?h:h*2,height:k?g:g*2}))):null,$.createElement(qe,{className:"recharts-bar-rectangles",clipPath:T?"url(#clipPath-".concat(E,")"):null},y?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(T,E),(!v||b)&&hi.renderCallByParent(this.props,a))}}],[{key:"getDerivedStateFromProps",value:function(n,i){return n.animationId!==i.prevAnimationId?{prevAnimationId:n.animationId,curData:n.data,prevData:i.curData}:n.data!==i.curData?{curData:n.data}:null}}])})(N.PureComponent);Q$=nc;ta(nc,"displayName","Bar");ta(nc,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!no.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"});ta(nc,"getComposedData",function(t){var e=t.props,r=t.item,n=t.barPosition,i=t.bandSize,a=t.xAxis,s=t.yAxis,u=t.xAxisTicks,c=t.yAxisTicks,f=t.stackedData,p=t.dataStartIndex,h=t.displayedData,g=t.offset,v=hG(n,r);if(!v)return null;var y=e.layout,x=r.type.defaultProps,b=x!==void 0?Pt(Pt({},x),r.props):r.props,S=b.dataKey,O=b.children,k=b.minPointSize,T=y==="horizontal"?s:a,E=f?T.scale.domain():null,A=wG({numericAxis:T}),j=tn(O,Rh),R=h.map(function(M,H){var U,B,F,J,V,K;f?U=pG(f[p+H],E):(U=Lt(M,S),Array.isArray(U)||(U=[A,U]));var Z=NZ(k,Q$.defaultProps.minPointSize)(U[1],H);if(y==="horizontal"){var G,ee=[s.scale(U[0]),s.scale(U[1])],z=ee[0],L=ee[1];B=YT({axis:a,ticks:u,bandSize:i,offset:v.offset,entry:M,index:H}),F=(G=L??z)!==null&&G!==void 0?G:void 0,J=v.size;var W=z-L;if(V=Number.isNaN(W)?0:W,K={x:B,y:s.y,width:J,height:s.height},Math.abs(Z)>0&&Math.abs(V)<Math.abs(Z)){var te=fr(V||Z)*(Math.abs(Z)-Math.abs(V));F-=te,V+=te}}else{var ue=[a.scale(U[0]),a.scale(U[1])],le=ue[0],de=ue[1];if(B=le,F=YT({axis:s,ticks:c,bandSize:i,offset:v.offset,entry:M,index:H}),J=de-le,V=v.size,K={x:a.x,y:F,width:a.width,height:V},Math.abs(Z)>0&&Math.abs(J)<Math.abs(Z)){var Re=fr(J||Z)*(Math.abs(Z)-Math.abs(J));J+=Re}}return Pt(Pt(Pt({},M),{},{x:B,y:F,width:J,height:V,value:f?U:U[1],payload:M,background:K},j&&j[H]&&j[H].props),{},{tooltipPayload:[A$(r,M)],tooltipPosition:{x:B+J/2,y:F+V/2}})});return Pt({data:R,layout:y},g)});function Fu(t){"@babel/helpers - typeof";return Fu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Fu(t)}function WZ(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function SC(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,tI(n.key),n)}}function HZ(t,e,r){return e&&SC(t.prototype,e),r&&SC(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function kC(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function yn(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?kC(Object(r),!0).forEach(function(n){Jh(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):kC(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Jh(t,e,r){return e=tI(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function tI(t){var e=VZ(t,"string");return Fu(e)=="symbol"?e:e+""}function VZ(t,e){if(Fu(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(Fu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var KZ=function(e,r,n,i,a){var s=e.width,u=e.height,c=e.layout,f=e.children,p=Object.keys(r),h={left:n.left,leftMirror:n.left,right:s-n.right,rightMirror:s-n.right,top:n.top,topMirror:n.top,bottom:u-n.bottom,bottomMirror:u-n.bottom},g=!!Nr(f,nc);return p.reduce(function(v,y){var x=r[y],b=x.orientation,S=x.domain,O=x.padding,k=O===void 0?{}:O,T=x.mirror,E=x.reversed,A="".concat(b).concat(T?"Mirror":""),j,R,M,H,U;if(x.type==="number"&&(x.padding==="gap"||x.padding==="no-gap")){var B=S[1]-S[0],F=1/0,J=x.categoricalDomain.sort(tU);if(J.forEach(function(ue,le){le>0&&(F=Math.min((ue||0)-(J[le-1]||0),F))}),Number.isFinite(F)){var V=F/B,K=x.layout==="vertical"?n.height:n.width;if(x.padding==="gap"&&(j=V*K/2),x.padding==="no-gap"){var Z=dr(e.barCategoryGap,V*K),G=V*K/2;j=G-Z-(G-Z)/K*Z}}}i==="xAxis"?R=[n.left+(k.left||0)+(j||0),n.left+n.width-(k.right||0)-(j||0)]:i==="yAxis"?R=c==="horizontal"?[n.top+n.height-(k.bottom||0),n.top+(k.top||0)]:[n.top+(k.top||0)+(j||0),n.top+n.height-(k.bottom||0)-(j||0)]:R=x.range,E&&(R=[R[1],R[0]]);var ee=S$(x,a,g),z=ee.scale,L=ee.realScaleType;z.domain(S).range(R),k$(z);var W=O$(z,yn(yn({},x),{},{realScaleType:L}));i==="xAxis"?(U=b==="top"&&!T||b==="bottom"&&T,M=n.left,H=h[A]-U*x.height):i==="yAxis"&&(U=b==="left"&&!T||b==="right"&&T,M=h[A]-U*x.width,H=n.top);var te=yn(yn(yn({},x),W),{},{realScaleType:L,x:M,y:H,scale:z,width:i==="xAxis"?n.width:x.width,height:i==="yAxis"?n.height:x.height});return te.bandSize=Md(te,W),!x.hide&&i==="xAxis"?h[A]+=(U?-1:1)*te.height:x.hide||(h[A]+=(U?-1:1)*te.width),yn(yn({},v),{},Jh({},y,te))},{})},rI=function(e,r){var n=e.x,i=e.y,a=r.x,s=r.y;return{x:Math.min(n,a),y:Math.min(i,s),width:Math.abs(a-n),height:Math.abs(s-i)}},GZ=function(e){var r=e.x1,n=e.y1,i=e.x2,a=e.y2;return rI({x:r,y:n},{x:i,y:a})},nI=(function(){function t(e){WZ(this,t),this.scale=e}return HZ(t,[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=n.bandAware,a=n.position;if(r!==void 0){if(a)switch(a){case"start":return this.scale(r);case"middle":{var s=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+s}case"end":{var u=this.bandwidth?this.bandwidth():0;return this.scale(r)+u}default:return this.scale(r)}if(i){var c=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+c}return this.scale(r)}}},{key:"isInRange",value:function(r){var n=this.range(),i=n[0],a=n[n.length-1];return i<=a?r>=i&&r<=a:r>=a&&r<=i}}],[{key:"create",value:function(r){return new t(r)}}])})();Jh(nI,"EPS",1e-4);var f1=function(e){var r=Object.keys(e).reduce(function(n,i){return yn(yn({},n),{},Jh({},i,nI.create(e[i])))},{});return yn(yn({},r),{},{apply:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=a.bandAware,u=a.position;return wZ(i,function(c,f){return r[f].apply(c,{bandAware:s,position:u})})},isInRange:function(i){return OZ(i,function(a,s){return r[s].isInRange(a)})}})};function XZ(t){return(t%180+180)%180}var YZ=function(e){var r=e.width,n=e.height,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=XZ(i),s=a*Math.PI/180,u=Math.atan(n/r),c=s>u&&s<Math.PI-u?n/Math.sin(s):r/Math.cos(s);return Math.abs(c)},X0,OC;function JZ(){if(OC)return X0;OC=1;var t=Hn(),e=Qu(),r=Th();function n(i){return function(a,s,u){var c=Object(a);if(!e(a)){var f=t(s,3);a=r(a),s=function(h){return f(c[h],h,c)}}var p=i(a,s,u);return p>-1?c[f?a[p]:p]:void 0}}return X0=n,X0}var Y0,EC;function QZ(){if(EC)return Y0;EC=1;var t=G$();function e(r){var n=t(r),i=n%1;return n===n?i?n-i:n:0}return Y0=e,Y0}var J0,AC;function ZZ(){if(AC)return J0;AC=1;var t=oN(),e=Hn(),r=QZ(),n=Math.max;function i(a,s,u){var c=a==null?0:a.length;if(!c)return-1;var f=u==null?0:r(u);return f<0&&(f=n(c+f,0)),t(a,e(s,3),f)}return J0=i,J0}var Q0,PC;function eee(){if(PC)return Q0;PC=1;var t=JZ(),e=ZZ(),r=t(e);return Q0=r,Q0}eee();var tee=_R();const ree=Je(tee);var nee=ree(function(t){return{x:t.left,y:t.top,width:t.width,height:t.height}},function(t){return["l",t.left,"t",t.top,"w",t.width,"h",t.height].join("")}),iI=N.createContext(void 0),aI=N.createContext(void 0),oI=N.createContext(void 0),iee=N.createContext({}),sI=N.createContext(void 0),lI=N.createContext(0),uI=N.createContext(0),TC=function(e){var r=e.state,n=r.xAxisMap,i=r.yAxisMap,a=r.offset,s=e.clipPathId,u=e.children,c=e.width,f=e.height,p=nee(a);return $.createElement(iI.Provider,{value:n},$.createElement(aI.Provider,{value:i},$.createElement(iee.Provider,{value:a},$.createElement(oI.Provider,{value:p},$.createElement(sI.Provider,{value:s},$.createElement(lI.Provider,{value:f},$.createElement(uI.Provider,{value:c},u)))))))},aee=function(){return N.useContext(sI)},cI=function(e){var r=N.useContext(iI);r==null&&Za();var n=r[e];return n==null&&Za(),n},fI=function(e){var r=N.useContext(aI);r==null&&Za();var n=r[e];return n==null&&Za(),n},oee=function(){var e=N.useContext(oI);return e},dI=function(){return N.useContext(uI)},hI=function(){return N.useContext(lI)};function _s(t){"@babel/helpers - typeof";return _s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_s(t)}function see(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function lee(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,mI(n.key),n)}}function uee(t,e,r){return e&&lee(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function cee(t,e,r){return e=eh(e),fee(t,pI()?Reflect.construct(e,r||[],eh(t).constructor):e.apply(t,r))}function fee(t,e){if(e&&(_s(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return dee(t)}function dee(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function pI(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(pI=function(){return!!t})()}function eh(t){return eh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},eh(t)}function hee(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Tw(t,e)}function Tw(t,e){return Tw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Tw(t,e)}function CC(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function jC(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?CC(Object(r),!0).forEach(function(n){d1(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):CC(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function d1(t,e,r){return e=mI(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function mI(t){var e=pee(t,"string");return _s(e)=="symbol"?e:e+""}function pee(t,e){if(_s(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(_s(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}function mee(t,e){return bee(t)||yee(t,e)||vee(t,e)||gee()}function gee(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
435
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function vee(t,e){if(t){if(typeof t=="string")return RC(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return RC(t,e)}}function RC(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function yee(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,i,a,s,u=[],c=!0,f=!1;try{if(a=(r=r.call(t)).next,e!==0)for(;!(c=(n=a.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(p){f=!0,i=p}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(f)throw i}}return u}}function bee(t){if(Array.isArray(t))return t}function Cw(){return Cw=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Cw.apply(this,arguments)}var wee=function(e,r){var n;return $.isValidElement(e)?n=$.cloneElement(e,r):$e(e)?n=e(r):n=$.createElement("line",Cw({},r,{className:"recharts-reference-line-line"})),n},xee=function(e,r,n,i,a,s,u,c,f){var p=a.x,h=a.y,g=a.width,v=a.height;if(n){var y=f.y,x=e.y.apply(y,{position:s});if(zn(f,"discard")&&!e.y.isInRange(x))return null;var b=[{x:p+g,y:x},{x:p,y:x}];return c==="left"?b.reverse():b}if(r){var S=f.x,O=e.x.apply(S,{position:s});if(zn(f,"discard")&&!e.x.isInRange(O))return null;var k=[{x:O,y:h+v},{x:O,y:h}];return u==="top"?k.reverse():k}if(i){var T=f.segment,E=T.map(function(A){return e.apply(A,{position:s})});return zn(f,"discard")&&gZ(E,function(A){return!e.isInRange(A)})?null:E}return null};function _ee(t){var e=t.x,r=t.y,n=t.segment,i=t.xAxisId,a=t.yAxisId,s=t.shape,u=t.className,c=t.alwaysShow,f=aee(),p=cI(i),h=fI(a),g=oee();if(!f||!g)return null;fi(c===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var v=f1({x:p.scale,y:h.scale}),y=Dt(e),x=Dt(r),b=n&&n.length===2,S=xee(v,y,x,b,g,t.position,p.orientation,h.orientation,t);if(!S)return null;var O=mee(S,2),k=O[0],T=k.x,E=k.y,A=O[1],j=A.x,R=A.y,M=zn(t,"hidden")?"url(#".concat(f,")"):void 0,H=jC(jC({clipPath:M},Ee(t,!0)),{},{x1:T,y1:E,x2:j,y2:R});return $.createElement(qe,{className:Le("recharts-reference-line",u)},wee(s,H),Kt.renderCallByParent(t,GZ({x1:T,y1:E,x2:j,y2:R})))}var h1=(function(t){function e(){return see(this,e),cee(this,e,arguments)}return hee(e,t),uee(e,[{key:"render",value:function(){return $.createElement(_ee,this.props)}}])})($.Component);d1(h1,"displayName","ReferenceLine");d1(h1,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});function jw(){return jw=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},jw.apply(this,arguments)}function Ss(t){"@babel/helpers - typeof";return Ss=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ss(t)}function NC(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function $C(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?NC(Object(r),!0).forEach(function(n){Qh(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):NC(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function See(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function kee(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,vI(n.key),n)}}function Oee(t,e,r){return e&&kee(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function Eee(t,e,r){return e=th(e),Aee(t,gI()?Reflect.construct(e,r||[],th(t).constructor):e.apply(t,r))}function Aee(t,e){if(e&&(Ss(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Pee(t)}function Pee(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function gI(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(gI=function(){return!!t})()}function th(t){return th=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},th(t)}function Tee(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Rw(t,e)}function Rw(t,e){return Rw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Rw(t,e)}function Qh(t,e,r){return e=vI(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function vI(t){var e=Cee(t,"string");return Ss(e)=="symbol"?e:e+""}function Cee(t,e){if(Ss(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(Ss(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var jee=function(e){var r=e.x,n=e.y,i=e.xAxis,a=e.yAxis,s=f1({x:i.scale,y:a.scale}),u=s.apply({x:r,y:n},{bandAware:!0});return zn(e,"discard")&&!s.isInRange(u)?null:u},Zh=(function(t){function e(){return See(this,e),Eee(this,e,arguments)}return Tee(e,t),Oee(e,[{key:"render",value:function(){var n=this.props,i=n.x,a=n.y,s=n.r,u=n.alwaysShow,c=n.clipPathId,f=Dt(i),p=Dt(a);if(fi(u===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!f||!p)return null;var h=jee(this.props);if(!h)return null;var g=h.x,v=h.y,y=this.props,x=y.shape,b=y.className,S=zn(this.props,"hidden")?"url(#".concat(c,")"):void 0,O=$C($C({clipPath:S},Ee(this.props,!0)),{},{cx:g,cy:v});return $.createElement(qe,{className:Le("recharts-reference-dot",b)},e.renderDot(x,O),Kt.renderCallByParent(this.props,{x:g-s,y:v-s,width:2*s,height:2*s}))}}])})($.Component);Qh(Zh,"displayName","ReferenceDot");Qh(Zh,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1});Qh(Zh,"renderDot",function(t,e){var r;return $.isValidElement(t)?r=$.cloneElement(t,e):$e(t)?r=t(e):r=$.createElement(Wh,jw({},e,{cx:e.cx,cy:e.cy,className:"recharts-reference-dot-dot"})),r});function Nw(){return Nw=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Nw.apply(this,arguments)}function ks(t){"@babel/helpers - typeof";return ks=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ks(t)}function IC(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function MC(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?IC(Object(r),!0).forEach(function(n){ep(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):IC(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Ree(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Nee(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,bI(n.key),n)}}function $ee(t,e,r){return e&&Nee(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function Iee(t,e,r){return e=rh(e),Mee(t,yI()?Reflect.construct(e,r||[],rh(t).constructor):e.apply(t,r))}function Mee(t,e){if(e&&(ks(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Lee(t)}function Lee(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function yI(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(yI=function(){return!!t})()}function rh(t){return rh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},rh(t)}function Dee(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&$w(t,e)}function $w(t,e){return $w=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},$w(t,e)}function ep(t,e,r){return e=bI(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function bI(t){var e=Bee(t,"string");return ks(e)=="symbol"?e:e+""}function Bee(t,e){if(ks(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(ks(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var zee=function(e,r,n,i,a){var s=a.x1,u=a.x2,c=a.y1,f=a.y2,p=a.xAxis,h=a.yAxis;if(!p||!h)return null;var g=f1({x:p.scale,y:h.scale}),v={x:e?g.x.apply(s,{position:"start"}):g.x.rangeMin,y:n?g.y.apply(c,{position:"start"}):g.y.rangeMin},y={x:r?g.x.apply(u,{position:"end"}):g.x.rangeMax,y:i?g.y.apply(f,{position:"end"}):g.y.rangeMax};return zn(a,"discard")&&(!g.isInRange(v)||!g.isInRange(y))?null:rI(v,y)},tp=(function(t){function e(){return Ree(this,e),Iee(this,e,arguments)}return Dee(e,t),$ee(e,[{key:"render",value:function(){var n=this.props,i=n.x1,a=n.x2,s=n.y1,u=n.y2,c=n.className,f=n.alwaysShow,p=n.clipPathId;fi(f===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var h=Dt(i),g=Dt(a),v=Dt(s),y=Dt(u),x=this.props.shape;if(!h&&!g&&!v&&!y&&!x)return null;var b=zee(h,g,v,y,this.props);if(!b&&!x)return null;var S=zn(this.props,"hidden")?"url(#".concat(p,")"):void 0;return $.createElement(qe,{className:Le("recharts-reference-area",c)},e.renderRect(x,MC(MC({clipPath:S},Ee(this.props,!0)),b)),Kt.renderCallByParent(this.props,b))}}])})($.Component);ep(tp,"displayName","ReferenceArea");ep(tp,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1});ep(tp,"renderRect",function(t,e){var r;return $.isValidElement(t)?r=$.cloneElement(t,e):$e(t)?r=t(e):r=$.createElement(c1,Nw({},e,{className:"recharts-reference-area-rect"})),r});function wI(t,e,r){if(e<1)return[];if(e===1&&r===void 0)return t;for(var n=[],i=0;i<t.length;i+=e)n.push(t[i]);return n}function qee(t,e,r){var n={width:t.width+e.width,height:t.height+e.height};return YZ(n,r)}function Uee(t,e,r){var n=r==="width",i=t.x,a=t.y,s=t.width,u=t.height;return e===1?{start:n?i:a,end:n?i+s:a+u}:{start:n?i+s:a+u,end:n?i:a}}function nh(t,e,r,n,i){if(t*e<t*n||t*e>t*i)return!1;var a=r();return t*(e-t*a/2-n)>=0&&t*(e+t*a/2-i)<=0}function Fee(t,e){return wI(t,e+1)}function Wee(t,e,r,n,i){for(var a=(n||[]).slice(),s=e.start,u=e.end,c=0,f=1,p=s,h=function(){var y=n==null?void 0:n[c];if(y===void 0)return{v:wI(n,f)};var x=c,b,S=function(){return b===void 0&&(b=r(y,x)),b},O=y.coordinate,k=c===0||nh(t,O,S,p,u);k||(c=0,p=s,f+=1),k&&(p=O+t*(S()/2+i),c+=f)},g;f<=a.length;)if(g=h(),g)return g.v;return[]}function Wu(t){"@babel/helpers - typeof";return Wu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Wu(t)}function LC(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function sr(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?LC(Object(r),!0).forEach(function(n){Hee(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):LC(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Hee(t,e,r){return e=Vee(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Vee(t){var e=Kee(t,"string");return Wu(e)=="symbol"?e:e+""}function Kee(t,e){if(Wu(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(Wu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Gee(t,e,r,n,i){for(var a=(n||[]).slice(),s=a.length,u=e.start,c=e.end,f=function(g){var v=a[g],y,x=function(){return y===void 0&&(y=r(v,g)),y};if(g===s-1){var b=t*(v.coordinate+t*x()/2-c);a[g]=v=sr(sr({},v),{},{tickCoord:b>0?v.coordinate-b*t:v.coordinate})}else a[g]=v=sr(sr({},v),{},{tickCoord:v.coordinate});var S=nh(t,v.tickCoord,x,u,c);S&&(c=v.tickCoord-t*(x()/2+i),a[g]=sr(sr({},v),{},{isShow:!0}))},p=s-1;p>=0;p--)f(p);return a}function Xee(t,e,r,n,i,a){var s=(n||[]).slice(),u=s.length,c=e.start,f=e.end;if(a){var p=n[u-1],h=r(p,u-1),g=t*(p.coordinate+t*h/2-f);s[u-1]=p=sr(sr({},p),{},{tickCoord:g>0?p.coordinate-g*t:p.coordinate});var v=nh(t,p.tickCoord,function(){return h},c,f);v&&(f=p.tickCoord-t*(h/2+i),s[u-1]=sr(sr({},p),{},{isShow:!0}))}for(var y=a?u-1:u,x=function(O){var k=s[O],T,E=function(){return T===void 0&&(T=r(k,O)),T};if(O===0){var A=t*(k.coordinate-t*E()/2-c);s[O]=k=sr(sr({},k),{},{tickCoord:A<0?k.coordinate-A*t:k.coordinate})}else s[O]=k=sr(sr({},k),{},{tickCoord:k.coordinate});var j=nh(t,k.tickCoord,E,c,f);j&&(c=k.tickCoord+t*(E()/2+i),s[O]=sr(sr({},k),{},{isShow:!0}))},b=0;b<y;b++)x(b);return s}function Yee(t,e,r){var n=t.tick,i=t.ticks,a=t.viewBox,s=t.minTickGap,u=t.orientation,c=t.interval,f=t.tickFormatter,p=t.unit,h=t.angle;if(!i||!i.length||!n)return[];if(fe(c)||no.isSsr)return Fee(i,typeof c=="number"&&fe(c)?c:0);var g=[],v=u==="top"||u==="bottom"?"width":"height",y=p&&v==="width"?Zl(p,{fontSize:e,letterSpacing:r}):{width:0,height:0},x=function(k,T){var E=$e(f)?f(k.value,T):k.value;return v==="width"?qee(Zl(E,{fontSize:e,letterSpacing:r}),y,h):Zl(E,{fontSize:e,letterSpacing:r})[v]},b=i.length>=2?fr(i[1].coordinate-i[0].coordinate):1,S=Uee(a,b,v);return c==="equidistantPreserveStart"?Wee(b,S,x,i,s):(c==="preserveStart"||c==="preserveStartEnd"?g=Xee(b,S,x,i,s,c==="preserveStartEnd"):g=Gee(b,S,x,i,s),g.filter(function(O){return O.isShow}))}var Jee=["viewBox"],Qee=["viewBox"],Zee=["ticks"];function Os(t){"@babel/helpers - typeof";return Os=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Os(t)}function Xo(){return Xo=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Xo.apply(this,arguments)}function DC(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function It(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?DC(Object(r),!0).forEach(function(n){p1(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):DC(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Z0(t,e){if(t==null)return{};var r=ete(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function ete(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}function tte(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function BC(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,_I(n.key),n)}}function rte(t,e,r){return e&&BC(t.prototype,e),r&&BC(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function nte(t,e,r){return e=ih(e),ite(t,xI()?Reflect.construct(e,r||[],ih(t).constructor):e.apply(t,r))}function ite(t,e){if(e&&(Os(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ate(t)}function ate(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function xI(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(xI=function(){return!!t})()}function ih(t){return ih=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ih(t)}function ote(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Iw(t,e)}function Iw(t,e){return Iw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Iw(t,e)}function p1(t,e,r){return e=_I(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function _I(t){var e=ste(t,"string");return Os(e)=="symbol"?e:e+""}function ste(t,e){if(Os(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(Os(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var rp=(function(t){function e(r){var n;return tte(this,e),n=nte(this,e,[r]),n.state={fontSize:"",letterSpacing:""},n}return ote(e,t),rte(e,[{key:"shouldComponentUpdate",value:function(n,i){var a=n.viewBox,s=Z0(n,Jee),u=this.props,c=u.viewBox,f=Z0(u,Qee);return!Zo(a,c)||!Zo(s,f)||!Zo(i,this.state)}},{key:"componentDidMount",value:function(){var n=this.layerReference;if(n){var i=n.getElementsByClassName("recharts-cartesian-axis-tick-value")[0];i&&this.setState({fontSize:window.getComputedStyle(i).fontSize,letterSpacing:window.getComputedStyle(i).letterSpacing})}}},{key:"getTickLineCoord",value:function(n){var i=this.props,a=i.x,s=i.y,u=i.width,c=i.height,f=i.orientation,p=i.tickSize,h=i.mirror,g=i.tickMargin,v,y,x,b,S,O,k=h?-1:1,T=n.tickSize||p,E=fe(n.tickCoord)?n.tickCoord:n.coordinate;switch(f){case"top":v=y=n.coordinate,b=s+ +!h*c,x=b-k*T,O=x-k*g,S=E;break;case"left":x=b=n.coordinate,y=a+ +!h*u,v=y-k*T,S=v-k*g,O=E;break;case"right":x=b=n.coordinate,y=a+ +h*u,v=y+k*T,S=v+k*g,O=E;break;default:v=y=n.coordinate,b=s+ +h*c,x=b+k*T,O=x+k*g,S=E;break}return{line:{x1:v,y1:x,x2:y,y2:b},tick:{x:S,y:O}}}},{key:"getTickTextAnchor",value:function(){var n=this.props,i=n.orientation,a=n.mirror,s;switch(i){case"left":s=a?"start":"end";break;case"right":s=a?"end":"start";break;default:s="middle";break}return s}},{key:"getTickVerticalAnchor",value:function(){var n=this.props,i=n.orientation,a=n.mirror,s="end";switch(i){case"left":case"right":s="middle";break;case"top":s=a?"start":"end";break;default:s=a?"end":"start";break}return s}},{key:"renderAxisLine",value:function(){var n=this.props,i=n.x,a=n.y,s=n.width,u=n.height,c=n.orientation,f=n.mirror,p=n.axisLine,h=It(It(It({},Ee(this.props,!1)),Ee(p,!1)),{},{fill:"none"});if(c==="top"||c==="bottom"){var g=+(c==="top"&&!f||c==="bottom"&&f);h=It(It({},h),{},{x1:i,y1:a+g*u,x2:i+s,y2:a+g*u})}else{var v=+(c==="left"&&!f||c==="right"&&f);h=It(It({},h),{},{x1:i+v*s,y1:a,x2:i+v*s,y2:a+u})}return $.createElement("line",Xo({},h,{className:Le("recharts-cartesian-axis-line",Mr(p,"className"))}))}},{key:"renderTicks",value:function(n,i,a){var s=this,u=this.props,c=u.tickLine,f=u.stroke,p=u.tick,h=u.tickFormatter,g=u.unit,v=Yee(It(It({},this.props),{},{ticks:n}),i,a),y=this.getTickTextAnchor(),x=this.getTickVerticalAnchor(),b=Ee(this.props,!1),S=Ee(p,!1),O=It(It({},b),{},{fill:"none"},Ee(c,!1)),k=v.map(function(T,E){var A=s.getTickLineCoord(T),j=A.line,R=A.tick,M=It(It(It(It({textAnchor:y,verticalAnchor:x},b),{},{stroke:"none",fill:f},S),R),{},{index:E,payload:T,visibleTicksCount:v.length,tickFormatter:h});return $.createElement(qe,Xo({className:"recharts-cartesian-axis-tick",key:"tick-".concat(T.value,"-").concat(T.coordinate,"-").concat(T.tickCoord)},Ya(s.props,T,E)),c&&$.createElement("line",Xo({},O,j,{className:Le("recharts-cartesian-axis-tick-line",Mr(c,"className"))})),p&&e.renderTickItem(p,M,"".concat($e(h)?h(T.value,E):T.value).concat(g||"")))});return $.createElement("g",{className:"recharts-cartesian-axis-ticks"},k)}},{key:"render",value:function(){var n=this,i=this.props,a=i.axisLine,s=i.width,u=i.height,c=i.ticksGenerator,f=i.className,p=i.hide;if(p)return null;var h=this.props,g=h.ticks,v=Z0(h,Zee),y=g;return $e(c)&&(y=g&&g.length>0?c(this.props):c(v)),s<=0||u<=0||!y||!y.length?null:$.createElement(qe,{className:Le("recharts-cartesian-axis",f),ref:function(b){n.layerReference=b}},a&&this.renderAxisLine(),this.renderTicks(y,this.state.fontSize,this.state.letterSpacing),Kt.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(n,i,a){var s,u=Le(i.className,"recharts-cartesian-axis-tick-value");return $.isValidElement(n)?s=$.cloneElement(n,It(It({},i),{},{className:u})):$e(n)?s=n(It(It({},i),{},{className:u})):s=$.createElement(Ja,Xo({},i,{className:"recharts-cartesian-axis-tick-value"}),a),s}}])})(N.Component);p1(rp,"displayName","CartesianAxis");p1(rp,"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 lte=["layout","type","stroke","connectNulls","isRange","ref"],ute=["key"],SI;function Es(t){"@babel/helpers - typeof";return Es=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Es(t)}function kI(t,e){if(t==null)return{};var r=cte(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function cte(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}function Fa(){return Fa=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Fa.apply(this,arguments)}function zC(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Yi(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?zC(Object(r),!0).forEach(function(n){Dn(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):zC(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function fte(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function qC(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,EI(n.key),n)}}function dte(t,e,r){return e&&qC(t.prototype,e),r&&qC(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function hte(t,e,r){return e=ah(e),pte(t,OI()?Reflect.construct(e,r||[],ah(t).constructor):e.apply(t,r))}function pte(t,e){if(e&&(Es(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return mte(t)}function mte(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function OI(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(OI=function(){return!!t})()}function ah(t){return ah=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ah(t)}function gte(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Mw(t,e)}function Mw(t,e){return Mw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Mw(t,e)}function Dn(t,e,r){return e=EI(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function EI(t){var e=vte(t,"string");return Es(e)=="symbol"?e:e+""}function vte(t,e){if(Es(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(Es(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var la=(function(t){function e(){var r;fte(this,e);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return r=hte(this,e,[].concat(i)),Dn(r,"state",{isAnimationFinished:!0}),Dn(r,"id",Bs("recharts-area-")),Dn(r,"handleAnimationEnd",function(){var s=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),$e(s)&&s()}),Dn(r,"handleAnimationStart",function(){var s=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),$e(s)&&s()}),r}return gte(e,t),dte(e,[{key:"renderDots",value:function(n,i,a){var s=this.props.isAnimationActive,u=this.state.isAnimationFinished;if(s&&!u)return null;var c=this.props,f=c.dot,p=c.points,h=c.dataKey,g=Ee(this.props,!1),v=Ee(f,!0),y=p.map(function(b,S){var O=Yi(Yi(Yi({key:"dot-".concat(S),r:3},g),v),{},{index:S,cx:b.x,cy:b.y,dataKey:h,value:b.value,payload:b.payload,points:p});return e.renderDotItem(f,O)}),x={clipPath:n?"url(#clipPath-".concat(i?"":"dots-").concat(a,")"):null};return $.createElement(qe,Fa({className:"recharts-area-dots"},x),y)}},{key:"renderHorizontalRect",value:function(n){var i=this.props,a=i.baseLine,s=i.points,u=i.strokeWidth,c=s[0].x,f=s[s.length-1].x,p=n*Math.abs(c-f),h=ea(s.map(function(g){return g.y||0}));return fe(a)&&typeof a=="number"?h=Math.max(a,h):a&&Array.isArray(a)&&a.length&&(h=Math.max(ea(a.map(function(g){return g.y||0})),h)),fe(h)?$.createElement("rect",{x:c<f?c:c-p,y:0,width:p,height:Math.floor(h+(u?parseInt("".concat(u),10):1))}):null}},{key:"renderVerticalRect",value:function(n){var i=this.props,a=i.baseLine,s=i.points,u=i.strokeWidth,c=s[0].y,f=s[s.length-1].y,p=n*Math.abs(c-f),h=ea(s.map(function(g){return g.x||0}));return fe(a)&&typeof a=="number"?h=Math.max(a,h):a&&Array.isArray(a)&&a.length&&(h=Math.max(ea(a.map(function(g){return g.x||0})),h)),fe(h)?$.createElement("rect",{x:0,y:c<f?c:c-p,width:h+(u?parseInt("".concat(u),10):1),height:Math.floor(p)}):null}},{key:"renderClipRect",value:function(n){var i=this.props.layout;return i==="vertical"?this.renderVerticalRect(n):this.renderHorizontalRect(n)}},{key:"renderAreaStatically",value:function(n,i,a,s){var u=this.props,c=u.layout,f=u.type,p=u.stroke,h=u.connectNulls,g=u.isRange;u.ref;var v=kI(u,lte);return $.createElement(qe,{clipPath:a?"url(#clipPath-".concat(s,")"):null},$.createElement(ns,Fa({},Ee(v,!0),{points:n,connectNulls:h,type:f,baseLine:i,layout:c,stroke:"none",className:"recharts-area-area"})),p!=="none"&&$.createElement(ns,Fa({},Ee(this.props,!1),{className:"recharts-area-curve",layout:c,type:f,connectNulls:h,fill:"none",points:n})),p!=="none"&&g&&$.createElement(ns,Fa({},Ee(this.props,!1),{className:"recharts-area-curve",layout:c,type:f,connectNulls:h,fill:"none",points:i})))}},{key:"renderAreaWithAnimation",value:function(n,i){var a=this,s=this.props,u=s.points,c=s.baseLine,f=s.isAnimationActive,p=s.animationBegin,h=s.animationDuration,g=s.animationEasing,v=s.animationId,y=this.state,x=y.prevPoints,b=y.prevBaseLine;return $.createElement(Un,{begin:p,duration:h,isActive:f,easing:g,from:{t:0},to:{t:1},key:"area-".concat(v),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(S){var O=S.t;if(x){var k=x.length/u.length,T=u.map(function(R,M){var H=Math.floor(M*k);if(x[H]){var U=x[H],B=Sr(U.x,R.x),F=Sr(U.y,R.y);return Yi(Yi({},R),{},{x:B(O),y:F(O)})}return R}),E;if(fe(c)&&typeof c=="number"){var A=Sr(b,c);E=A(O)}else if(Me(c)||Ds(c)){var j=Sr(b,0);E=j(O)}else E=c.map(function(R,M){var H=Math.floor(M*k);if(b[H]){var U=b[H],B=Sr(U.x,R.x),F=Sr(U.y,R.y);return Yi(Yi({},R),{},{x:B(O),y:F(O)})}return R});return a.renderAreaStatically(T,E,n,i)}return $.createElement(qe,null,$.createElement("defs",null,$.createElement("clipPath",{id:"animationClipPath-".concat(i)},a.renderClipRect(O))),$.createElement(qe,{clipPath:"url(#animationClipPath-".concat(i,")")},a.renderAreaStatically(u,c,n,i)))})}},{key:"renderArea",value:function(n,i){var a=this.props,s=a.points,u=a.baseLine,c=a.isAnimationActive,f=this.state,p=f.prevPoints,h=f.prevBaseLine,g=f.totalLength;return c&&s&&s.length&&(!p&&g>0||!hs(p,s)||!hs(h,u))?this.renderAreaWithAnimation(n,i):this.renderAreaStatically(s,u,n,i)}},{key:"render",value:function(){var n,i=this.props,a=i.hide,s=i.dot,u=i.points,c=i.className,f=i.top,p=i.left,h=i.xAxis,g=i.yAxis,v=i.width,y=i.height,x=i.isAnimationActive,b=i.id;if(a||!u||!u.length)return null;var S=this.state.isAnimationFinished,O=u.length===1,k=Le("recharts-area",c),T=h&&h.allowDataOverflow,E=g&&g.allowDataOverflow,A=T||E,j=Me(b)?this.id:b,R=(n=Ee(s,!1))!==null&&n!==void 0?n:{r:3,strokeWidth:2},M=R.r,H=M===void 0?3:M,U=R.strokeWidth,B=U===void 0?2:U,F=cU(s)?s:{},J=F.clipDot,V=J===void 0?!0:J,K=H*2+B;return $.createElement(qe,{className:k},T||E?$.createElement("defs",null,$.createElement("clipPath",{id:"clipPath-".concat(j)},$.createElement("rect",{x:T?p:p-v/2,y:E?f:f-y/2,width:T?v:v*2,height:E?y:y*2})),!V&&$.createElement("clipPath",{id:"clipPath-dots-".concat(j)},$.createElement("rect",{x:p-K/2,y:f-K/2,width:v+K,height:y+K}))):null,O?null:this.renderArea(A,j),(s||O)&&this.renderDots(A,V,j),(!x||S)&&hi.renderCallByParent(this.props,u))}}],[{key:"getDerivedStateFromProps",value:function(n,i){return n.animationId!==i.prevAnimationId?{prevAnimationId:n.animationId,curPoints:n.points,curBaseLine:n.baseLine,prevPoints:i.curPoints,prevBaseLine:i.curBaseLine}:n.points!==i.curPoints||n.baseLine!==i.curBaseLine?{curPoints:n.points,curBaseLine:n.baseLine}:null}}])})(N.PureComponent);SI=la;Dn(la,"displayName","Area");Dn(la,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!no.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"});Dn(la,"getBaseValue",function(t,e,r,n){var i=t.layout,a=t.baseValue,s=e.props.baseValue,u=s??a;if(fe(u)&&typeof u=="number")return u;var c=i==="horizontal"?n:r,f=c.scale.domain();if(c.type==="number"){var p=Math.max(f[0],f[1]),h=Math.min(f[0],f[1]);return u==="dataMin"?h:u==="dataMax"||p<0?p:Math.max(Math.min(f[0],f[1]),0)}return u==="dataMin"?f[0]:u==="dataMax"?f[1]:f[0]});Dn(la,"getComposedData",function(t){var e=t.props,r=t.item,n=t.xAxis,i=t.yAxis,a=t.xAxisTicks,s=t.yAxisTicks,u=t.bandSize,c=t.dataKey,f=t.stackedData,p=t.dataStartIndex,h=t.displayedData,g=t.offset,v=e.layout,y=f&&f.length,x=SI.getBaseValue(e,r,n,i),b=v==="horizontal",S=!1,O=h.map(function(T,E){var A;y?A=f[p+E]:(A=Lt(T,c),Array.isArray(A)?S=!0:A=[x,A]);var j=A[1]==null||y&&Lt(T,c)==null;return b?{x:XT({axis:n,ticks:a,bandSize:u,entry:T,index:E}),y:j?null:i.scale(A[1]),value:A,payload:T}:{x:j?null:n.scale(A[1]),y:XT({axis:i,ticks:s,bandSize:u,entry:T,index:E}),value:A,payload:T}}),k;return y||S?k=O.map(function(T){var E=Array.isArray(T.value)?T.value[0]:null;return b?{x:T.x,y:E!=null&&T.y!=null?i.scale(E):null}:{x:E!=null?n.scale(E):null,y:T.y}}):k=b?i.scale(x):n.scale(x),Yi({points:O,baseLine:k,layout:v,isRange:S},g)});Dn(la,"renderDotItem",function(t,e){var r;if($.isValidElement(t))r=$.cloneElement(t,e);else if($e(t))r=t(e);else{var n=Le("recharts-area-dot",typeof t!="boolean"?t.className:""),i=e.key,a=kI(e,ute);r=$.createElement(Wh,Fa({},a,{key:i,className:n}))}return r});function As(t){"@babel/helpers - typeof";return As=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},As(t)}function yte(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function bte(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,TI(n.key),n)}}function wte(t,e,r){return e&&bte(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function xte(t,e,r){return e=oh(e),_te(t,AI()?Reflect.construct(e,r||[],oh(t).constructor):e.apply(t,r))}function _te(t,e){if(e&&(As(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ste(t)}function Ste(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function AI(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(AI=function(){return!!t})()}function oh(t){return oh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},oh(t)}function kte(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Lw(t,e)}function Lw(t,e){return Lw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Lw(t,e)}function PI(t,e,r){return e=TI(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function TI(t){var e=Ote(t,"string");return As(e)=="symbol"?e:e+""}function Ote(t,e){if(As(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(As(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}function Dw(){return Dw=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Dw.apply(this,arguments)}function Ete(t){var e=t.xAxisId,r=dI(),n=hI(),i=cI(e);return i==null?null:N.createElement(rp,Dw({},i,{className:Le("recharts-".concat(i.axisType," ").concat(i.axisType),i.className),viewBox:{x:0,y:0,width:r,height:n},ticksGenerator:function(s){return Ua(s,!0)}}))}var np=(function(t){function e(){return yte(this,e),xte(this,e,arguments)}return kte(e,t),wte(e,[{key:"render",value:function(){return N.createElement(Ete,this.props)}}])})(N.Component);PI(np,"displayName","XAxis");PI(np,"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 Ps(t){"@babel/helpers - typeof";return Ps=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ps(t)}function Ate(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Pte(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,RI(n.key),n)}}function Tte(t,e,r){return e&&Pte(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function Cte(t,e,r){return e=sh(e),jte(t,CI()?Reflect.construct(e,r||[],sh(t).constructor):e.apply(t,r))}function jte(t,e){if(e&&(Ps(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Rte(t)}function Rte(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function CI(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(CI=function(){return!!t})()}function sh(t){return sh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},sh(t)}function Nte(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Bw(t,e)}function Bw(t,e){return Bw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Bw(t,e)}function jI(t,e,r){return e=RI(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function RI(t){var e=$te(t,"string");return Ps(e)=="symbol"?e:e+""}function $te(t,e){if(Ps(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(Ps(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}function zw(){return zw=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},zw.apply(this,arguments)}var Ite=function(e){var r=e.yAxisId,n=dI(),i=hI(),a=fI(r);return a==null?null:N.createElement(rp,zw({},a,{className:Le("recharts-".concat(a.axisType," ").concat(a.axisType),a.className),viewBox:{x:0,y:0,width:n,height:i},ticksGenerator:function(u){return Ua(u,!0)}}))},ip=(function(t){function e(){return Ate(this,e),Cte(this,e,arguments)}return Nte(e,t),Tte(e,[{key:"render",value:function(){return N.createElement(Ite,this.props)}}])})(N.Component);jI(ip,"displayName","YAxis");jI(ip,"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 UC(t){return Bte(t)||Dte(t)||Lte(t)||Mte()}function Mte(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
436
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Lte(t,e){if(t){if(typeof t=="string")return qw(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return qw(t,e)}}function Dte(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function Bte(t){if(Array.isArray(t))return qw(t)}function qw(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var Uw=function(e,r,n,i,a){var s=tn(e,h1),u=tn(e,Zh),c=[].concat(UC(s),UC(u)),f=tn(e,tp),p="".concat(i,"Id"),h=i[0],g=r;if(c.length&&(g=c.reduce(function(x,b){if(b.props[p]===n&&zn(b.props,"extendDomain")&&fe(b.props[h])){var S=b.props[h];return[Math.min(x[0],S),Math.max(x[1],S)]}return x},g)),f.length){var v="".concat(h,"1"),y="".concat(h,"2");g=f.reduce(function(x,b){if(b.props[p]===n&&zn(b.props,"extendDomain")&&fe(b.props[v])&&fe(b.props[y])){var S=b.props[v],O=b.props[y];return[Math.min(x[0],S,O),Math.max(x[1],S,O)]}return x},g)}return a&&a.length&&(g=a.reduce(function(x,b){return fe(b)?[Math.min(x[0],b),Math.max(x[1],b)]:x},g)),g},eb={exports:{}},FC;function zte(){return FC||(FC=1,(function(t){var e=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function i(c,f,p){this.fn=c,this.context=f,this.once=p||!1}function a(c,f,p,h,g){if(typeof p!="function")throw new TypeError("The listener must be a function");var v=new i(p,h||c,g),y=r?r+f:f;return c._events[y]?c._events[y].fn?c._events[y]=[c._events[y],v]:c._events[y].push(v):(c._events[y]=v,c._eventsCount++),c}function s(c,f){--c._eventsCount===0?c._events=new n:delete c._events[f]}function u(){this._events=new n,this._eventsCount=0}u.prototype.eventNames=function(){var f=[],p,h;if(this._eventsCount===0)return f;for(h in p=this._events)e.call(p,h)&&f.push(r?h.slice(1):h);return Object.getOwnPropertySymbols?f.concat(Object.getOwnPropertySymbols(p)):f},u.prototype.listeners=function(f){var p=r?r+f:f,h=this._events[p];if(!h)return[];if(h.fn)return[h.fn];for(var g=0,v=h.length,y=new Array(v);g<v;g++)y[g]=h[g].fn;return y},u.prototype.listenerCount=function(f){var p=r?r+f:f,h=this._events[p];return h?h.fn?1:h.length:0},u.prototype.emit=function(f,p,h,g,v,y){var x=r?r+f:f;if(!this._events[x])return!1;var b=this._events[x],S=arguments.length,O,k;if(b.fn){switch(b.once&&this.removeListener(f,b.fn,void 0,!0),S){case 1:return b.fn.call(b.context),!0;case 2:return b.fn.call(b.context,p),!0;case 3:return b.fn.call(b.context,p,h),!0;case 4:return b.fn.call(b.context,p,h,g),!0;case 5:return b.fn.call(b.context,p,h,g,v),!0;case 6:return b.fn.call(b.context,p,h,g,v,y),!0}for(k=1,O=new Array(S-1);k<S;k++)O[k-1]=arguments[k];b.fn.apply(b.context,O)}else{var T=b.length,E;for(k=0;k<T;k++)switch(b[k].once&&this.removeListener(f,b[k].fn,void 0,!0),S){case 1:b[k].fn.call(b[k].context);break;case 2:b[k].fn.call(b[k].context,p);break;case 3:b[k].fn.call(b[k].context,p,h);break;case 4:b[k].fn.call(b[k].context,p,h,g);break;default:if(!O)for(E=1,O=new Array(S-1);E<S;E++)O[E-1]=arguments[E];b[k].fn.apply(b[k].context,O)}}return!0},u.prototype.on=function(f,p,h){return a(this,f,p,h,!1)},u.prototype.once=function(f,p,h){return a(this,f,p,h,!0)},u.prototype.removeListener=function(f,p,h,g){var v=r?r+f:f;if(!this._events[v])return this;if(!p)return s(this,v),this;var y=this._events[v];if(y.fn)y.fn===p&&(!g||y.once)&&(!h||y.context===h)&&s(this,v);else{for(var x=0,b=[],S=y.length;x<S;x++)(y[x].fn!==p||g&&!y[x].once||h&&y[x].context!==h)&&b.push(y[x]);b.length?this._events[v]=b.length===1?b[0]:b:s(this,v)}return this},u.prototype.removeAllListeners=function(f){var p;return f?(p=r?r+f:f,this._events[p]&&s(this,p)):(this._events=new n,this._eventsCount=0),this},u.prototype.off=u.prototype.removeListener,u.prototype.addListener=u.prototype.on,u.prefixed=r,u.EventEmitter=u,t.exports=u})(eb)),eb.exports}var qte=zte();const Ute=Je(qte);var tb=new Ute,rb="recharts.syncMouseEvents";function Hu(t){"@babel/helpers - typeof";return Hu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Hu(t)}function Fte(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Wte(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,NI(n.key),n)}}function Hte(t,e,r){return e&&Wte(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function nb(t,e,r){return e=NI(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function NI(t){var e=Vte(t,"string");return Hu(e)=="symbol"?e:e+""}function Vte(t,e){if(Hu(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(Hu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var Kte=(function(){function t(){Fte(this,t),nb(this,"activeIndex",0),nb(this,"coordinateList",[]),nb(this,"layout","horizontal")}return Hte(t,[{key:"setDetails",value:function(r){var n,i=r.coordinateList,a=i===void 0?null:i,s=r.container,u=s===void 0?null:s,c=r.layout,f=c===void 0?null:c,p=r.offset,h=p===void 0?null:p,g=r.mouseHandlerCallback,v=g===void 0?null:g;this.coordinateList=(n=a??this.coordinateList)!==null&&n!==void 0?n:[],this.container=u??this.container,this.layout=f??this.layout,this.offset=h??this.offset,this.mouseHandlerCallback=v??this.mouseHandlerCallback,this.activeIndex=Math.min(Math.max(this.activeIndex,0),this.coordinateList.length-1)}},{key:"focus",value:function(){this.spoofMouse()}},{key:"keyboardEvent",value:function(r){if(this.coordinateList.length!==0)switch(r.key){case"ArrowRight":{if(this.layout!=="horizontal")return;this.activeIndex=Math.min(this.activeIndex+1,this.coordinateList.length-1),this.spoofMouse();break}case"ArrowLeft":{if(this.layout!=="horizontal")return;this.activeIndex=Math.max(this.activeIndex-1,0),this.spoofMouse();break}}}},{key:"setIndex",value:function(r){this.activeIndex=r}},{key:"spoofMouse",value:function(){var r,n;if(this.layout==="horizontal"&&this.coordinateList.length!==0){var i=this.container.getBoundingClientRect(),a=i.x,s=i.y,u=i.height,c=this.coordinateList[this.activeIndex].coordinate,f=((r=window)===null||r===void 0?void 0:r.scrollX)||0,p=((n=window)===null||n===void 0?void 0:n.scrollY)||0,h=a+c+f,g=s+this.offset.top+u/2+p;this.mouseHandlerCallback({pageX:h,pageY:g})}}}])})();function Gte(t,e,r){if(r==="number"&&e===!0&&Array.isArray(t)){var n=t==null?void 0:t[0],i=t==null?void 0:t[1];if(n&&i&&fe(n)&&fe(i))return!0}return!1}function Xte(t,e,r,n){var i=n/2;return{stroke:"none",fill:"#ccc",x:t==="horizontal"?e.x-i:r.left+.5,y:t==="horizontal"?r.top+.5:e.y-i,width:t==="horizontal"?n:r.width-1,height:t==="horizontal"?r.height-1:n}}function $I(t){var e=t.cx,r=t.cy,n=t.radius,i=t.startAngle,a=t.endAngle,s=at(e,r,n,i),u=at(e,r,n,a);return{points:[s,u],cx:e,cy:r,radius:n,startAngle:i,endAngle:a}}function Yte(t,e,r){var n,i,a,s;if(t==="horizontal")n=e.x,a=n,i=r.top,s=r.top+r.height;else if(t==="vertical")i=e.y,s=i,n=r.left,a=r.left+r.width;else if(e.cx!=null&&e.cy!=null)if(t==="centric"){var u=e.cx,c=e.cy,f=e.innerRadius,p=e.outerRadius,h=e.angle,g=at(u,c,f,h),v=at(u,c,p,h);n=g.x,i=g.y,a=v.x,s=v.y}else return $I(e);return[{x:n,y:i},{x:a,y:s}]}function Vu(t){"@babel/helpers - typeof";return Vu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Vu(t)}function WC(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Bf(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?WC(Object(r),!0).forEach(function(n){Jte(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):WC(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Jte(t,e,r){return e=Qte(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Qte(t){var e=Zte(t,"string");return Vu(e)=="symbol"?e:e+""}function Zte(t,e){if(Vu(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(Vu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function ere(t){var e,r,n=t.element,i=t.tooltipEventType,a=t.isActive,s=t.activeCoordinate,u=t.activePayload,c=t.offset,f=t.activeTooltipIndex,p=t.tooltipAxisBandSize,h=t.layout,g=t.chartName,v=(e=n.props.cursor)!==null&&e!==void 0?e:(r=n.type.defaultProps)===null||r===void 0?void 0:r.cursor;if(!n||!v||!a||!s||g!=="ScatterChart"&&i!=="axis")return null;var y,x=ns;if(g==="ScatterChart")y=s,x=zJ;else if(g==="BarChart")y=Xte(h,s,c,p),x=c1;else if(h==="radial"){var b=$I(s),S=b.cx,O=b.cy,k=b.radius,T=b.startAngle,E=b.endAngle;y={cx:S,cy:O,startAngle:T,endAngle:E,innerRadius:k,outerRadius:k},x=N$}else y={points:Yte(h,s,c)},x=ns;var A=Bf(Bf(Bf(Bf({stroke:"#ccc",pointerEvents:"none"},c),y),Ee(v,!1)),{},{payload:u,payloadIndex:f,className:Le("recharts-tooltip-cursor",v.className)});return N.isValidElement(v)?N.cloneElement(v,A):N.createElement(x,A)}var tre=["item"],rre=["children","className","width","height","style","compact","title","desc"];function Ts(t){"@babel/helpers - typeof";return Ts=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ts(t)}function Yo(){return Yo=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Yo.apply(this,arguments)}function HC(t,e){return are(t)||ire(t,e)||MI(t,e)||nre()}function nre(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
437
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ire(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,i,a,s,u=[],c=!0,f=!1;try{if(a=(r=r.call(t)).next,e!==0)for(;!(c=(n=a.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(p){f=!0,i=p}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(f)throw i}}return u}}function are(t){if(Array.isArray(t))return t}function VC(t,e){if(t==null)return{};var r=ore(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function ore(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}function sre(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function lre(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,LI(n.key),n)}}function ure(t,e,r){return e&&lre(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function cre(t,e,r){return e=lh(e),fre(t,II()?Reflect.construct(e,r||[],lh(t).constructor):e.apply(t,r))}function fre(t,e){if(e&&(Ts(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return dre(t)}function dre(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function II(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(II=function(){return!!t})()}function lh(t){return lh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},lh(t)}function hre(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Fw(t,e)}function Fw(t,e){return Fw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Fw(t,e)}function Cs(t){return gre(t)||mre(t)||MI(t)||pre()}function pre(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
438
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function MI(t,e){if(t){if(typeof t=="string")return Ww(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ww(t,e)}}function mre(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function gre(t){if(Array.isArray(t))return Ww(t)}function Ww(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function KC(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function re(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?KC(Object(r),!0).forEach(function(n){Te(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):KC(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Te(t,e,r){return e=LI(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function LI(t){var e=vre(t,"string");return Ts(e)=="symbol"?e:e+""}function vre(t,e){if(Ts(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(Ts(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var yre={xAxis:["bottom","top"],yAxis:["left","right"]},bre={width:"100%",height:"100%"},DI={x:0,y:0};function zf(t){return t}var wre=function(e,r){return r==="horizontal"?e.x:r==="vertical"?e.y:r==="centric"?e.angle:e.radius},xre=function(e,r,n,i){var a=r.find(function(p){return p&&p.index===n});if(a){if(e==="horizontal")return{x:a.coordinate,y:i.y};if(e==="vertical")return{x:i.x,y:a.coordinate};if(e==="centric"){var s=a.coordinate,u=i.radius;return re(re(re({},i),at(i.cx,i.cy,u,s)),{},{angle:s,radius:u})}var c=a.coordinate,f=i.angle;return re(re(re({},i),at(i.cx,i.cy,c,f)),{},{angle:f,radius:c})}return DI},ap=function(e,r){var n=r.graphicalItems,i=r.dataStartIndex,a=r.dataEndIndex,s=(n??[]).reduce(function(u,c){var f=c.props.data;return f&&f.length?[].concat(Cs(u),Cs(f)):u},[]);return s.length>0?s:e&&e.length&&fe(i)&&fe(a)?e.slice(i,a+1):[]};function BI(t){return t==="number"?[0,"auto"]:void 0}var Hw=function(e,r,n,i){var a=e.graphicalItems,s=e.tooltipAxis,u=ap(r,e);return n<0||!a||!a.length||n>=u.length?null:a.reduce(function(c,f){var p,h=(p=f.props.data)!==null&&p!==void 0?p:r;h&&e.dataStartIndex+e.dataEndIndex!==0&&e.dataEndIndex-e.dataStartIndex>=n&&(h=h.slice(e.dataStartIndex,e.dataEndIndex+1));var g;if(s.dataKey&&!s.allowDuplicatedCategory){var v=h===void 0?u:h;g=cd(v,s.dataKey,i)}else g=h&&h[n]||u[n];return g?[].concat(Cs(c),[A$(f,g)]):c},[])},GC=function(e,r,n,i){var a=i||{x:e.chartX,y:e.chartY},s=wre(a,n),u=e.orderedTooltipTicks,c=e.tooltipAxis,f=e.tooltipTicks,p=sG(s,u,f,c);if(p>=0&&f){var h=f[p]&&f[p].value,g=Hw(e,r,p,h),v=xre(n,u,p,a);return{activeTooltipIndex:p,activeLabel:h,activePayload:g,activeCoordinate:v}}return null},_re=function(e,r){var n=r.axes,i=r.graphicalItems,a=r.axisType,s=r.axisIdKey,u=r.stackGroups,c=r.dataStartIndex,f=r.dataEndIndex,p=e.layout,h=e.children,g=e.stackOffset,v=_$(p,a);return n.reduce(function(y,x){var b,S=x.type.defaultProps!==void 0?re(re({},x.type.defaultProps),x.props):x.props,O=S.type,k=S.dataKey,T=S.allowDataOverflow,E=S.allowDuplicatedCategory,A=S.scale,j=S.ticks,R=S.includeHidden,M=S[s];if(y[M])return y;var H=ap(e.data,{graphicalItems:i.filter(function(W){var te,ue=s in W.props?W.props[s]:(te=W.type.defaultProps)===null||te===void 0?void 0:te[s];return ue===M}),dataStartIndex:c,dataEndIndex:f}),U=H.length,B,F,J;Gte(S.domain,T,O)&&(B=ow(S.domain,null,T),v&&(O==="number"||A!=="auto")&&(J=tu(H,k,"category")));var V=BI(O);if(!B||B.length===0){var K,Z=(K=S.domain)!==null&&K!==void 0?K:V;if(k){if(B=tu(H,k,O),O==="category"&&v){var G=eU(B);E&&G?(F=B,B=Xd(0,U)):E||(B=ZT(Z,B,x).reduce(function(W,te){return W.indexOf(te)>=0?W:[].concat(Cs(W),[te])},[]))}else if(O==="category")E?B=B.filter(function(W){return W!==""&&!Me(W)}):B=ZT(Z,B,x).reduce(function(W,te){return W.indexOf(te)>=0||te===""||Me(te)?W:[].concat(Cs(W),[te])},[]);else if(O==="number"){var ee=dG(H,i.filter(function(W){var te,ue,le=s in W.props?W.props[s]:(te=W.type.defaultProps)===null||te===void 0?void 0:te[s],de="hide"in W.props?W.props.hide:(ue=W.type.defaultProps)===null||ue===void 0?void 0:ue.hide;return le===M&&(R||!de)}),k,a,p);ee&&(B=ee)}v&&(O==="number"||A!=="auto")&&(J=tu(H,k,"category"))}else v?B=Xd(0,U):u&&u[M]&&u[M].hasStack&&O==="number"?B=g==="expand"?[0,1]:E$(u[M].stackGroups,c,f):B=x$(H,i.filter(function(W){var te=s in W.props?W.props[s]:W.type.defaultProps[s],ue="hide"in W.props?W.props.hide:W.type.defaultProps.hide;return te===M&&(R||!ue)}),O,p,!0);if(O==="number")B=Uw(h,B,M,a,j),Z&&(B=ow(Z,B,T));else if(O==="category"&&Z){var z=Z,L=B.every(function(W){return z.indexOf(W)>=0});L&&(B=z)}}return re(re({},y),{},Te({},M,re(re({},S),{},{axisType:a,domain:B,categoricalDomain:J,duplicateDomain:F,originalDomain:(b=S.domain)!==null&&b!==void 0?b:V,isCategorical:v,layout:p})))},{})},Sre=function(e,r){var n=r.graphicalItems,i=r.Axis,a=r.axisType,s=r.axisIdKey,u=r.stackGroups,c=r.dataStartIndex,f=r.dataEndIndex,p=e.layout,h=e.children,g=ap(e.data,{graphicalItems:n,dataStartIndex:c,dataEndIndex:f}),v=g.length,y=_$(p,a),x=-1;return n.reduce(function(b,S){var O=S.type.defaultProps!==void 0?re(re({},S.type.defaultProps),S.props):S.props,k=O[s],T=BI("number");if(!b[k]){x++;var E;return y?E=Xd(0,v):u&&u[k]&&u[k].hasStack?(E=E$(u[k].stackGroups,c,f),E=Uw(h,E,k,a)):(E=ow(T,x$(g,n.filter(function(A){var j,R,M=s in A.props?A.props[s]:(j=A.type.defaultProps)===null||j===void 0?void 0:j[s],H="hide"in A.props?A.props.hide:(R=A.type.defaultProps)===null||R===void 0?void 0:R.hide;return M===k&&!H}),"number",p),i.defaultProps.allowDataOverflow),E=Uw(h,E,k,a)),re(re({},b),{},Te({},k,re(re({axisType:a},i.defaultProps),{},{hide:!0,orientation:Mr(yre,"".concat(a,".").concat(x%2),null),domain:E,originalDomain:T,isCategorical:y,layout:p})))}return b},{})},kre=function(e,r){var n=r.axisType,i=n===void 0?"xAxis":n,a=r.AxisComp,s=r.graphicalItems,u=r.stackGroups,c=r.dataStartIndex,f=r.dataEndIndex,p=e.children,h="".concat(i,"Id"),g=tn(p,a),v={};return g&&g.length?v=_re(e,{axes:g,graphicalItems:s,axisType:i,axisIdKey:h,stackGroups:u,dataStartIndex:c,dataEndIndex:f}):s&&s.length&&(v=Sre(e,{Axis:a,graphicalItems:s,axisType:i,axisIdKey:h,stackGroups:u,dataStartIndex:c,dataEndIndex:f})),v},Ore=function(e){var r=Wo(e),n=Ua(r,!1,!0);return{tooltipTicks:n,orderedTooltipTicks:Lx(n,function(i){return i.coordinate}),tooltipAxis:r,tooltipAxisBandSize:Md(r,n)}},XC=function(e){var r=e.children,n=e.defaultShowTooltip,i=Nr(r,ws),a=0,s=0;return e.data&&e.data.length!==0&&(s=e.data.length-1),i&&i.props&&(i.props.startIndex>=0&&(a=i.props.startIndex),i.props.endIndex>=0&&(s=i.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:a,dataEndIndex:s,activeTooltipIndex:-1,isTooltipActive:!!n}},Ere=function(e){return!e||!e.length?!1:e.some(function(r){var n=ci(r&&r.type);return n&&n.indexOf("Bar")>=0})},YC=function(e){return e==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:e==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:e==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},Are=function(e,r){var n=e.props,i=e.graphicalItems,a=e.xAxisMap,s=a===void 0?{}:a,u=e.yAxisMap,c=u===void 0?{}:u,f=n.width,p=n.height,h=n.children,g=n.margin||{},v=Nr(h,ws),y=Nr(h,es),x=Object.keys(c).reduce(function(E,A){var j=c[A],R=j.orientation;return!j.mirror&&!j.hide?re(re({},E),{},Te({},R,E[R]+j.width)):E},{left:g.left||0,right:g.right||0}),b=Object.keys(s).reduce(function(E,A){var j=s[A],R=j.orientation;return!j.mirror&&!j.hide?re(re({},E),{},Te({},R,Mr(E,"".concat(R))+j.height)):E},{top:g.top||0,bottom:g.bottom||0}),S=re(re({},b),x),O=S.bottom;v&&(S.bottom+=v.props.height||ws.defaultProps.height),y&&r&&(S=cG(S,i,n,r));var k=f-S.left-S.right,T=p-S.top-S.bottom;return re(re({brushBottom:O},S),{},{width:Math.max(k,0),height:Math.max(T,0)})},Pre=function(e,r){if(r==="xAxis")return e[r].width;if(r==="yAxis")return e[r].height},zI=function(e){var r=e.chartName,n=e.GraphicalChild,i=e.defaultTooltipEventType,a=i===void 0?"axis":i,s=e.validateTooltipEventTypes,u=s===void 0?["axis"]:s,c=e.axisComponents,f=e.legendContent,p=e.formatAxisMap,h=e.defaultProps,g=function(S,O){var k=O.graphicalItems,T=O.stackGroups,E=O.offset,A=O.updateId,j=O.dataStartIndex,R=O.dataEndIndex,M=S.barSize,H=S.layout,U=S.barGap,B=S.barCategoryGap,F=S.maxBarSize,J=YC(H),V=J.numericAxisName,K=J.cateAxisName,Z=Ere(k),G=[];return k.forEach(function(ee,z){var L=ap(S.data,{graphicalItems:[ee],dataStartIndex:j,dataEndIndex:R}),W=ee.type.defaultProps!==void 0?re(re({},ee.type.defaultProps),ee.props):ee.props,te=W.dataKey,ue=W.maxBarSize,le=W["".concat(V,"Id")],de=W["".concat(K,"Id")],Re={},pe=c.reduce(function(tr,st){var Er=O["".concat(st.axisType,"Map")],ua=W["".concat(st.axisType,"Id")];Er&&Er[ua]||st.axisType==="zAxis"||Za();var ca=Er[ua];return re(re({},tr),{},Te(Te({},st.axisType,ca),"".concat(st.axisType,"Ticks"),Ua(ca)))},Re),ne=pe[K],_e=pe["".concat(K,"Ticks")],Oe=T&&T[le]&&T[le].hasStack&&xG(ee,T[le].stackGroups),ie=ci(ee.type).indexOf("Bar")>=0,Fe=Md(ne,_e),Ne=[],ft=Z&&lG({barSize:M,stackGroups:T,totalSize:Pre(pe,K)});if(ie){var ot,dt,pr=Me(ue)?F:ue,Ot=(ot=(dt=Md(ne,_e,!0))!==null&&dt!==void 0?dt:pr)!==null&&ot!==void 0?ot:0;Ne=uG({barGap:U,barCategoryGap:B,bandSize:Ot!==Fe?Ot:Fe,sizeList:ft[de],maxBarSize:pr}),Ot!==Fe&&(Ne=Ne.map(function(tr){return re(re({},tr),{},{position:re(re({},tr.position),{},{offset:tr.position.offset-Ot/2})})}))}var Dr=ee&&ee.type&&ee.type.getComposedData;Dr&&G.push({props:re(re({},Dr(re(re({},pe),{},{displayedData:L,props:S,dataKey:te,item:ee,bandSize:Fe,barPosition:Ne,offset:E,stackedData:Oe,layout:H,dataStartIndex:j,dataEndIndex:R}))),{},Te(Te(Te({key:ee.key||"item-".concat(z)},V,pe[V]),K,pe[K]),"animationId",A)),childIndex:hU(ee,S.children),item:ee})}),G},v=function(S,O){var k=S.props,T=S.dataStartIndex,E=S.dataEndIndex,A=S.updateId;if(!dE({props:k}))return null;var j=k.children,R=k.layout,M=k.stackOffset,H=k.data,U=k.reverseStackOrder,B=YC(R),F=B.numericAxisName,J=B.cateAxisName,V=tn(j,n),K=bG(H,V,"".concat(F,"Id"),"".concat(J,"Id"),M,U),Z=c.reduce(function(W,te){var ue="".concat(te.axisType,"Map");return re(re({},W),{},Te({},ue,kre(k,re(re({},te),{},{graphicalItems:V,stackGroups:te.axisType===F&&K,dataStartIndex:T,dataEndIndex:E}))))},{}),G=Are(re(re({},Z),{},{props:k,graphicalItems:V}),O==null?void 0:O.legendBBox);Object.keys(Z).forEach(function(W){Z[W]=p(k,Z[W],G,W.replace("Map",""),r)});var ee=Z["".concat(J,"Map")],z=Ore(ee),L=g(k,re(re({},Z),{},{dataStartIndex:T,dataEndIndex:E,updateId:A,graphicalItems:V,stackGroups:K,offset:G}));return re(re({formattedGraphicalItems:L,graphicalItems:V,offset:G,stackGroups:K},z),Z)},y=(function(b){function S(O){var k,T,E;return sre(this,S),E=cre(this,S,[O]),Te(E,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),Te(E,"accessibilityManager",new Kte),Te(E,"handleLegendBBoxUpdate",function(A){if(A){var j=E.state,R=j.dataStartIndex,M=j.dataEndIndex,H=j.updateId;E.setState(re({legendBBox:A},v({props:E.props,dataStartIndex:R,dataEndIndex:M,updateId:H},re(re({},E.state),{},{legendBBox:A}))))}}),Te(E,"handleReceiveSyncEvent",function(A,j,R){if(E.props.syncId===A){if(R===E.eventEmitterSymbol&&typeof E.props.syncMethod!="function")return;E.applySyncEvent(j)}}),Te(E,"handleBrushChange",function(A){var j=A.startIndex,R=A.endIndex;if(j!==E.state.dataStartIndex||R!==E.state.dataEndIndex){var M=E.state.updateId;E.setState(function(){return re({dataStartIndex:j,dataEndIndex:R},v({props:E.props,dataStartIndex:j,dataEndIndex:R,updateId:M},E.state))}),E.triggerSyncEvent({dataStartIndex:j,dataEndIndex:R})}}),Te(E,"handleMouseEnter",function(A){var j=E.getMouseInfo(A);if(j){var R=re(re({},j),{},{isTooltipActive:!0});E.setState(R),E.triggerSyncEvent(R);var M=E.props.onMouseEnter;$e(M)&&M(R,A)}}),Te(E,"triggeredAfterMouseMove",function(A){var j=E.getMouseInfo(A),R=j?re(re({},j),{},{isTooltipActive:!0}):{isTooltipActive:!1};E.setState(R),E.triggerSyncEvent(R);var M=E.props.onMouseMove;$e(M)&&M(R,A)}),Te(E,"handleItemMouseEnter",function(A){E.setState(function(){return{isTooltipActive:!0,activeItem:A,activePayload:A.tooltipPayload,activeCoordinate:A.tooltipPosition||{x:A.cx,y:A.cy}}})}),Te(E,"handleItemMouseLeave",function(){E.setState(function(){return{isTooltipActive:!1}})}),Te(E,"handleMouseMove",function(A){A.persist(),E.throttleTriggeredAfterMouseMove(A)}),Te(E,"handleMouseLeave",function(A){E.throttleTriggeredAfterMouseMove.cancel();var j={isTooltipActive:!1};E.setState(j),E.triggerSyncEvent(j);var R=E.props.onMouseLeave;$e(R)&&R(j,A)}),Te(E,"handleOuterEvent",function(A){var j=dU(A),R=Mr(E.props,"".concat(j));if(j&&$e(R)){var M,H;/.*touch.*/i.test(j)?H=E.getMouseInfo(A.changedTouches[0]):H=E.getMouseInfo(A),R((M=H)!==null&&M!==void 0?M:{},A)}}),Te(E,"handleClick",function(A){var j=E.getMouseInfo(A);if(j){var R=re(re({},j),{},{isTooltipActive:!0});E.setState(R),E.triggerSyncEvent(R);var M=E.props.onClick;$e(M)&&M(R,A)}}),Te(E,"handleMouseDown",function(A){var j=E.props.onMouseDown;if($e(j)){var R=E.getMouseInfo(A);j(R,A)}}),Te(E,"handleMouseUp",function(A){var j=E.props.onMouseUp;if($e(j)){var R=E.getMouseInfo(A);j(R,A)}}),Te(E,"handleTouchMove",function(A){A.changedTouches!=null&&A.changedTouches.length>0&&E.throttleTriggeredAfterMouseMove(A.changedTouches[0])}),Te(E,"handleTouchStart",function(A){A.changedTouches!=null&&A.changedTouches.length>0&&E.handleMouseDown(A.changedTouches[0])}),Te(E,"handleTouchEnd",function(A){A.changedTouches!=null&&A.changedTouches.length>0&&E.handleMouseUp(A.changedTouches[0])}),Te(E,"handleDoubleClick",function(A){var j=E.props.onDoubleClick;if($e(j)){var R=E.getMouseInfo(A);j(R,A)}}),Te(E,"handleContextMenu",function(A){var j=E.props.onContextMenu;if($e(j)){var R=E.getMouseInfo(A);j(R,A)}}),Te(E,"triggerSyncEvent",function(A){E.props.syncId!==void 0&&tb.emit(rb,E.props.syncId,A,E.eventEmitterSymbol)}),Te(E,"applySyncEvent",function(A){var j=E.props,R=j.layout,M=j.syncMethod,H=E.state.updateId,U=A.dataStartIndex,B=A.dataEndIndex;if(A.dataStartIndex!==void 0||A.dataEndIndex!==void 0)E.setState(re({dataStartIndex:U,dataEndIndex:B},v({props:E.props,dataStartIndex:U,dataEndIndex:B,updateId:H},E.state)));else if(A.activeTooltipIndex!==void 0){var F=A.chartX,J=A.chartY,V=A.activeTooltipIndex,K=E.state,Z=K.offset,G=K.tooltipTicks;if(!Z)return;if(typeof M=="function")V=M(G,A);else if(M==="value"){V=-1;for(var ee=0;ee<G.length;ee++)if(G[ee].value===A.activeLabel){V=ee;break}}var z=re(re({},Z),{},{x:Z.left,y:Z.top}),L=Math.min(F,z.x+z.width),W=Math.min(J,z.y+z.height),te=G[V]&&G[V].value,ue=Hw(E.state,E.props.data,V),le=G[V]?{x:R==="horizontal"?G[V].coordinate:L,y:R==="horizontal"?W:G[V].coordinate}:DI;E.setState(re(re({},A),{},{activeLabel:te,activeCoordinate:le,activePayload:ue,activeTooltipIndex:V}))}else E.setState(A)}),Te(E,"renderCursor",function(A){var j,R=E.state,M=R.isTooltipActive,H=R.activeCoordinate,U=R.activePayload,B=R.offset,F=R.activeTooltipIndex,J=R.tooltipAxisBandSize,V=E.getTooltipEventType(),K=(j=A.props.active)!==null&&j!==void 0?j:M,Z=E.props.layout,G=A.key||"_recharts-cursor";return $.createElement(ere,{key:G,activeCoordinate:H,activePayload:U,activeTooltipIndex:F,chartName:r,element:A,isActive:K,layout:Z,offset:B,tooltipAxisBandSize:J,tooltipEventType:V})}),Te(E,"renderPolarAxis",function(A,j,R){var M=Mr(A,"type.axisType"),H=Mr(E.state,"".concat(M,"Map")),U=A.type.defaultProps,B=U!==void 0?re(re({},U),A.props):A.props,F=H&&H[B["".concat(M,"Id")]];return N.cloneElement(A,re(re({},F),{},{className:Le(M,F.className),key:A.key||"".concat(j,"-").concat(R),ticks:Ua(F,!0)}))}),Te(E,"renderPolarGrid",function(A){var j=A.props,R=j.radialLines,M=j.polarAngles,H=j.polarRadius,U=E.state,B=U.radiusAxisMap,F=U.angleAxisMap,J=Wo(B),V=Wo(F),K=V.cx,Z=V.cy,G=V.innerRadius,ee=V.outerRadius;return N.cloneElement(A,{polarAngles:Array.isArray(M)?M:Ua(V,!0).map(function(z){return z.coordinate}),polarRadius:Array.isArray(H)?H:Ua(J,!0).map(function(z){return z.coordinate}),cx:K,cy:Z,innerRadius:G,outerRadius:ee,key:A.key||"polar-grid",radialLines:R})}),Te(E,"renderLegend",function(){var A=E.state.formattedGraphicalItems,j=E.props,R=j.children,M=j.width,H=j.height,U=E.props.margin||{},B=M-(U.left||0)-(U.right||0),F=b$({children:R,formattedGraphicalItems:A,legendWidth:B,legendContent:f});if(!F)return null;var J=F.item,V=VC(F,tre);return N.cloneElement(J,re(re({},V),{},{chartWidth:M,chartHeight:H,margin:U,onBBoxUpdate:E.handleLegendBBoxUpdate}))}),Te(E,"renderTooltip",function(){var A,j=E.props,R=j.children,M=j.accessibilityLayer,H=Nr(R,vn);if(!H)return null;var U=E.state,B=U.isTooltipActive,F=U.activeCoordinate,J=U.activePayload,V=U.activeLabel,K=U.offset,Z=(A=H.props.active)!==null&&A!==void 0?A:B;return N.cloneElement(H,{viewBox:re(re({},K),{},{x:K.left,y:K.top}),active:Z,label:V,payload:Z?J:[],coordinate:F,accessibilityLayer:M})}),Te(E,"renderBrush",function(A){var j=E.props,R=j.margin,M=j.data,H=E.state,U=H.offset,B=H.dataStartIndex,F=H.dataEndIndex,J=H.updateId;return N.cloneElement(A,{key:A.key||"_recharts-brush",onChange:If(E.handleBrushChange,A.props.onChange),data:M,x:fe(A.props.x)?A.props.x:U.left,y:fe(A.props.y)?A.props.y:U.top+U.height+U.brushBottom-(R.bottom||0),width:fe(A.props.width)?A.props.width:U.width,startIndex:B,endIndex:F,updateId:"brush-".concat(J)})}),Te(E,"renderReferenceElement",function(A,j,R){if(!A)return null;var M=E,H=M.clipPathId,U=E.state,B=U.xAxisMap,F=U.yAxisMap,J=U.offset,V=A.type.defaultProps||{},K=A.props,Z=K.xAxisId,G=Z===void 0?V.xAxisId:Z,ee=K.yAxisId,z=ee===void 0?V.yAxisId:ee;return N.cloneElement(A,{key:A.key||"".concat(j,"-").concat(R),xAxis:B[G],yAxis:F[z],viewBox:{x:J.left,y:J.top,width:J.width,height:J.height},clipPathId:H})}),Te(E,"renderActivePoints",function(A){var j=A.item,R=A.activePoint,M=A.basePoint,H=A.childIndex,U=A.isRange,B=[],F=j.props.key,J=j.item.type.defaultProps!==void 0?re(re({},j.item.type.defaultProps),j.item.props):j.item.props,V=J.activeDot,K=J.dataKey,Z=re(re({index:H,dataKey:K,cx:R.x,cy:R.y,r:4,fill:u1(j.item),strokeWidth:2,stroke:"#fff",payload:R.payload,value:R.value},Ee(V,!1)),fd(V));return B.push(S.renderActiveDot(V,Z,"".concat(F,"-activePoint-").concat(H))),M?B.push(S.renderActiveDot(V,re(re({},Z),{},{cx:M.x,cy:M.y}),"".concat(F,"-basePoint-").concat(H))):U&&B.push(null),B}),Te(E,"renderGraphicChild",function(A,j,R){var M=E.filterFormatItem(A,j,R);if(!M)return null;var H=E.getTooltipEventType(),U=E.state,B=U.isTooltipActive,F=U.tooltipAxis,J=U.activeTooltipIndex,V=U.activeLabel,K=E.props.children,Z=Nr(K,vn),G=M.props,ee=G.points,z=G.isRange,L=G.baseLine,W=M.item.type.defaultProps!==void 0?re(re({},M.item.type.defaultProps),M.item.props):M.item.props,te=W.activeDot,ue=W.hide,le=W.activeBar,de=W.activeShape,Re=!!(!ue&&B&&Z&&(te||le||de)),pe={};H!=="axis"&&Z&&Z.props.trigger==="click"?pe={onClick:If(E.handleItemMouseEnter,A.props.onClick)}:H!=="axis"&&(pe={onMouseLeave:If(E.handleItemMouseLeave,A.props.onMouseLeave),onMouseEnter:If(E.handleItemMouseEnter,A.props.onMouseEnter)});var ne=N.cloneElement(A,re(re({},M.props),pe));function _e(st){return typeof F.dataKey=="function"?F.dataKey(st.payload):null}if(Re)if(J>=0){var Oe,ie;if(F.dataKey&&!F.allowDuplicatedCategory){var Fe=typeof F.dataKey=="function"?_e:"payload.".concat(F.dataKey.toString());Oe=cd(ee,Fe,V),ie=z&&L&&cd(L,Fe,V)}else Oe=ee==null?void 0:ee[J],ie=z&&L&&L[J];if(de||le){var Ne=A.props.activeIndex!==void 0?A.props.activeIndex:J;return[N.cloneElement(A,re(re(re({},M.props),pe),{},{activeIndex:Ne})),null,null]}if(!Me(Oe))return[ne].concat(Cs(E.renderActivePoints({item:M,activePoint:Oe,basePoint:ie,childIndex:J,isRange:z})))}else{var ft,ot=(ft=E.getItemByXY(E.state.activeCoordinate))!==null&&ft!==void 0?ft:{graphicalItem:ne},dt=ot.graphicalItem,pr=dt.item,Ot=pr===void 0?A:pr,Dr=dt.childIndex,tr=re(re(re({},M.props),pe),{},{activeIndex:Dr});return[N.cloneElement(Ot,tr),null,null]}return z?[ne,null,null]:[ne,null]}),Te(E,"renderCustomized",function(A,j,R){return N.cloneElement(A,re(re({key:"recharts-customized-".concat(R)},E.props),E.state))}),Te(E,"renderMap",{CartesianGrid:{handler:zf,once:!0},ReferenceArea:{handler:E.renderReferenceElement},ReferenceLine:{handler:zf},ReferenceDot:{handler:E.renderReferenceElement},XAxis:{handler:zf},YAxis:{handler:zf},Brush:{handler:E.renderBrush,once:!0},Bar:{handler:E.renderGraphicChild},Line:{handler:E.renderGraphicChild},Area:{handler:E.renderGraphicChild},Radar:{handler:E.renderGraphicChild},RadialBar:{handler:E.renderGraphicChild},Scatter:{handler:E.renderGraphicChild},Pie:{handler:E.renderGraphicChild},Funnel:{handler:E.renderGraphicChild},Tooltip:{handler:E.renderCursor,once:!0},PolarGrid:{handler:E.renderPolarGrid,once:!0},PolarAngleAxis:{handler:E.renderPolarAxis},PolarRadiusAxis:{handler:E.renderPolarAxis},Customized:{handler:E.renderCustomized}}),E.clipPathId="".concat((k=O.id)!==null&&k!==void 0?k:Bs("recharts"),"-clip"),E.throttleTriggeredAfterMouseMove=bN(E.triggeredAfterMouseMove,(T=O.throttleDelay)!==null&&T!==void 0?T:1e3/60),E.state={},E}return hre(S,b),ure(S,[{key:"componentDidMount",value:function(){var k,T;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(k=this.props.margin.left)!==null&&k!==void 0?k:0,top:(T=this.props.margin.top)!==null&&T!==void 0?T:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var k=this.props,T=k.children,E=k.data,A=k.height,j=k.layout,R=Nr(T,vn);if(R){var M=R.props.defaultIndex;if(!(typeof M!="number"||M<0||M>this.state.tooltipTicks.length-1)){var H=this.state.tooltipTicks[M]&&this.state.tooltipTicks[M].value,U=Hw(this.state,E,M,H),B=this.state.tooltipTicks[M].coordinate,F=(this.state.offset.top+A)/2,J=j==="horizontal",V=J?{x:B,y:F}:{y:B,x:F},K=this.state.formattedGraphicalItems.find(function(G){var ee=G.item;return ee.type.name==="Scatter"});K&&(V=re(re({},V),K.props.points[M].tooltipPosition),U=K.props.points[M].tooltipPayload);var Z={activeTooltipIndex:M,isTooltipActive:!0,activeLabel:H,activePayload:U,activeCoordinate:V};this.setState(Z),this.renderCursor(R),this.accessibilityManager.setIndex(M)}}}},{key:"getSnapshotBeforeUpdate",value:function(k,T){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==T.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==k.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==k.margin){var E,A;this.accessibilityManager.setDetails({offset:{left:(E=this.props.margin.left)!==null&&E!==void 0?E:0,top:(A=this.props.margin.top)!==null&&A!==void 0?A:0}})}return null}},{key:"componentDidUpdate",value:function(k){Pb([Nr(k.children,vn)],[Nr(this.props.children,vn)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var k=Nr(this.props.children,vn);if(k&&typeof k.props.shared=="boolean"){var T=k.props.shared?"axis":"item";return u.indexOf(T)>=0?T:a}return a}},{key:"getMouseInfo",value:function(k){if(!this.container)return null;var T=this.container,E=T.getBoundingClientRect(),A=Z7(E),j={chartX:Math.round(k.pageX-A.left),chartY:Math.round(k.pageY-A.top)},R=E.width/T.offsetWidth||1,M=this.inRange(j.chartX,j.chartY,R);if(!M)return null;var H=this.state,U=H.xAxisMap,B=H.yAxisMap,F=this.getTooltipEventType(),J=GC(this.state,this.props.data,this.props.layout,M);if(F!=="axis"&&U&&B){var V=Wo(U).scale,K=Wo(B).scale,Z=V&&V.invert?V.invert(j.chartX):null,G=K&&K.invert?K.invert(j.chartY):null;return re(re({},j),{},{xValue:Z,yValue:G},J)}return J?re(re({},j),J):null}},{key:"inRange",value:function(k,T){var E=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,A=this.props.layout,j=k/E,R=T/E;if(A==="horizontal"||A==="vertical"){var M=this.state.offset,H=j>=M.left&&j<=M.left+M.width&&R>=M.top&&R<=M.top+M.height;return H?{x:j,y:R}:null}var U=this.state,B=U.angleAxisMap,F=U.radiusAxisMap;if(B&&F){var J=Wo(B);return r2({x:j,y:R},J)}return null}},{key:"parseEventsOfWrapper",value:function(){var k=this.props.children,T=this.getTooltipEventType(),E=Nr(k,vn),A={};E&&T==="axis"&&(E.props.trigger==="click"?A={onClick:this.handleClick}:A={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 j=fd(this.props,this.handleOuterEvent);return re(re({},j),A)}},{key:"addListener",value:function(){tb.on(rb,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){tb.removeListener(rb,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(k,T,E){for(var A=this.state.formattedGraphicalItems,j=0,R=A.length;j<R;j++){var M=A[j];if(M.item===k||M.props.key===k.key||T===ci(M.item.type)&&E===M.childIndex)return M}return null}},{key:"renderClipPath",value:function(){var k=this.clipPathId,T=this.state.offset,E=T.left,A=T.top,j=T.height,R=T.width;return $.createElement("defs",null,$.createElement("clipPath",{id:k},$.createElement("rect",{x:E,y:A,height:j,width:R})))}},{key:"getXScales",value:function(){var k=this.state.xAxisMap;return k?Object.entries(k).reduce(function(T,E){var A=HC(E,2),j=A[0],R=A[1];return re(re({},T),{},Te({},j,R.scale))},{}):null}},{key:"getYScales",value:function(){var k=this.state.yAxisMap;return k?Object.entries(k).reduce(function(T,E){var A=HC(E,2),j=A[0],R=A[1];return re(re({},T),{},Te({},j,R.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(k){var T;return(T=this.state.xAxisMap)===null||T===void 0||(T=T[k])===null||T===void 0?void 0:T.scale}},{key:"getYScaleByAxisId",value:function(k){var T;return(T=this.state.yAxisMap)===null||T===void 0||(T=T[k])===null||T===void 0?void 0:T.scale}},{key:"getItemByXY",value:function(k){var T=this.state,E=T.formattedGraphicalItems,A=T.activeItem;if(E&&E.length)for(var j=0,R=E.length;j<R;j++){var M=E[j],H=M.props,U=M.item,B=U.type.defaultProps!==void 0?re(re({},U.type.defaultProps),U.props):U.props,F=ci(U.type);if(F==="Bar"){var J=(H.data||[]).find(function(G){return wJ(k,G)});if(J)return{graphicalItem:M,payload:J}}else if(F==="RadialBar"){var V=(H.data||[]).find(function(G){return r2(k,G)});if(V)return{graphicalItem:M,payload:V}}else if(Xh(M,A)||Yh(M,A)||zu(M,A)){var K=FQ({graphicalItem:M,activeTooltipItem:A,itemData:B.data}),Z=B.activeIndex===void 0?K:B.activeIndex;return{graphicalItem:re(re({},M),{},{childIndex:Z}),payload:zu(M,A)?B.data[K]:M.props.data[K]}}}return null}},{key:"render",value:function(){var k=this;if(!dE(this))return null;var T=this.props,E=T.children,A=T.className,j=T.width,R=T.height,M=T.style,H=T.compact,U=T.title,B=T.desc,F=VC(T,rre),J=Ee(F,!1);if(H)return $.createElement(TC,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},$.createElement(Cb,Yo({},J,{width:j,height:R,title:U,desc:B}),this.renderClipPath(),pE(E,this.renderMap)));if(this.props.accessibilityLayer){var V,K;J.tabIndex=(V=this.props.tabIndex)!==null&&V!==void 0?V:0,J.role=(K=this.props.role)!==null&&K!==void 0?K:"application",J.onKeyDown=function(G){k.accessibilityManager.keyboardEvent(G)},J.onFocus=function(){k.accessibilityManager.focus()}}var Z=this.parseEventsOfWrapper();return $.createElement(TC,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},$.createElement("div",Yo({className:Le("recharts-wrapper",A),style:re({position:"relative",cursor:"default",width:j,height:R},M)},Z,{ref:function(ee){k.container=ee}}),$.createElement(Cb,Yo({},J,{width:j,height:R,title:U,desc:B,style:bre}),this.renderClipPath(),pE(E,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])})(N.Component);Te(y,"displayName",r),Te(y,"defaultProps",re({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},h)),Te(y,"getDerivedStateFromProps",function(b,S){var O=b.dataKey,k=b.data,T=b.children,E=b.width,A=b.height,j=b.layout,R=b.stackOffset,M=b.margin,H=S.dataStartIndex,U=S.dataEndIndex;if(S.updateId===void 0){var B=XC(b);return re(re(re({},B),{},{updateId:0},v(re(re({props:b},B),{},{updateId:0}),S)),{},{prevDataKey:O,prevData:k,prevWidth:E,prevHeight:A,prevLayout:j,prevStackOffset:R,prevMargin:M,prevChildren:T})}if(O!==S.prevDataKey||k!==S.prevData||E!==S.prevWidth||A!==S.prevHeight||j!==S.prevLayout||R!==S.prevStackOffset||!Zo(M,S.prevMargin)){var F=XC(b),J={chartX:S.chartX,chartY:S.chartY,isTooltipActive:S.isTooltipActive},V=re(re({},GC(S,k,j)),{},{updateId:S.updateId+1}),K=re(re(re({},F),J),V);return re(re(re({},K),v(re({props:b},K),S)),{},{prevDataKey:O,prevData:k,prevWidth:E,prevHeight:A,prevLayout:j,prevStackOffset:R,prevMargin:M,prevChildren:T})}if(!Pb(T,S.prevChildren)){var Z,G,ee,z,L=Nr(T,ws),W=L&&(Z=(G=L.props)===null||G===void 0?void 0:G.startIndex)!==null&&Z!==void 0?Z:H,te=L&&(ee=(z=L.props)===null||z===void 0?void 0:z.endIndex)!==null&&ee!==void 0?ee:U,ue=W!==H||te!==U,le=!Me(k),de=le&&!ue?S.updateId:S.updateId+1;return re(re({updateId:de},v(re(re({props:b},S),{},{updateId:de,dataStartIndex:W,dataEndIndex:te}),S)),{},{prevChildren:T,dataStartIndex:W,dataEndIndex:te})}return null}),Te(y,"renderActiveDot",function(b,S,O){var k;return N.isValidElement(b)?k=N.cloneElement(b,S):$e(b)?k=b(S):k=$.createElement(Wh,S),$.createElement(qe,{className:"recharts-active-dot",key:O},k)});var x=N.forwardRef(function(S,O){return $.createElement(y,Yo({},S,{ref:O}))});return x.displayName=y.displayName,x},Tre=zI({chartName:"PieChart",GraphicalChild:_i,validateTooltipEventTypes:["item"],defaultTooltipEventType:"item",legendContent:"children",axisComponents:[{axisType:"angleAxis",AxisComp:Gh},{axisType:"radiusAxis",AxisComp:Vh}],formatAxisMap:jG,defaultProps:{layout:"centric",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"}}),Cre=zI({chartName:"AreaChart",GraphicalChild:la,axisComponents:[{axisType:"xAxis",AxisComp:np},{axisType:"yAxis",AxisComp:ip}],formatAxisMap:KZ});const qf=["#E43A9C","#D83333","#F041FF","#38bdf8","#a78bfa","#34d399","#f59e0b"];function jre(){const[t,e]=N.useState(null),[r,n]=N.useState("7d");if(N.useEffect(()=>{const f=new Date;r==="7d"?f.setDate(f.getDate()-7):r==="30d"?f.setDate(f.getDate()-30):f.setDate(f.getDate()-1),kt.get(`/usage?since=${f.toISOString()}`).then(e).catch(()=>{})},[r]),!t)return P.jsx("div",{className:"h-full flex items-center justify-center text-zinc-600",children:"Loading..."});const i=new Map;for(const f of t.records){const p=f.timestamp.slice(0,10),h=i.get(p)??{date:p,tokens:0,cost:0};h.tokens+=f.inputTokens+f.outputTokens,h.cost+=f.estimatedCostUsd??0,i.set(p,h)}const a=Array.from(i.values()).sort((f,p)=>f.date.localeCompare(p.date)),s=new Map;for(const f of t.records)s.set(f.model,(s.get(f.model)??0)+f.inputTokens+f.outputTokens);const u=Array.from(s.entries()).map(([f,p])=>({name:f,value:p})),c=t.totals.totalInputTokens+t.totals.totalOutputTokens;return P.jsxs("div",{className:"flex-1 overflow-y-auto p-6",children:[P.jsxs("div",{className:"flex items-center justify-between mb-6",children:[P.jsxs("div",{children:[P.jsx("h2",{className:"text-2xl tracking-wide text-zinc-100",style:{fontFamily:"'Bebas Neue', sans-serif"},children:"Usage"}),P.jsx("p",{className:"text-[11px] text-zinc-600 font-mono mt-0.5",children:"Token usage and cost tracking"})]}),P.jsx("div",{className:"flex gap-1 p-1 rounded-xl bg-white/[0.03] border border-white/[0.07]",children:["1d","7d","30d"].map(f=>P.jsx("button",{type:"button",onClick:()=>n(f),className:`px-3 py-1.5 rounded-lg text-[11px] font-mono transition-colors ${r===f?"bg-white/10 text-zinc-200":"text-zinc-600 hover:text-zinc-400"}`,children:f},f))})]}),P.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-3 mb-6",children:[P.jsx(Uf,{icon:P.jsx(R5,{className:"w-4 h-4 text-[#E43A9C]"}),label:"Total Tokens",value:Ff(c)}),P.jsx(Uf,{icon:P.jsx(w5,{className:"w-4 h-4 text-emerald-400"}),label:"Est. Cost",value:`$${t.totals.totalCostUsd.toFixed(4)}`}),P.jsx(Uf,{icon:P.jsx(Nj,{className:"w-4 h-4 text-sky-400"}),label:"API Calls",value:Ff(t.totals.callCount)}),P.jsx(Uf,{icon:P.jsx(ed,{className:"w-4 h-4 text-amber-400"}),label:"Models Used",value:String(u.length)})]}),P.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-4",children:[P.jsxs("div",{className:"lg:col-span-2 glass-card border border-white/[0.07] rounded-2xl p-5",children:[P.jsx("h3",{className:"text-sm font-mono text-zinc-400 mb-4",children:"Tokens Over Time"}),a.length>0?P.jsx(MP,{width:"100%",height:250,children:P.jsxs(Cre,{data:a,children:[P.jsx("defs",{children:P.jsxs("linearGradient",{id:"colorTokens",x1:"0",y1:"0",x2:"0",y2:"1",children:[P.jsx("stop",{offset:"5%",stopColor:"#E43A9C",stopOpacity:.3}),P.jsx("stop",{offset:"95%",stopColor:"#E43A9C",stopOpacity:0})]})}),P.jsx(np,{dataKey:"date",tick:{fontSize:10,fill:"#52525b",fontFamily:"JetBrains Mono, monospace"},axisLine:!1,tickLine:!1}),P.jsx(ip,{tick:{fontSize:10,fill:"#52525b",fontFamily:"JetBrains Mono, monospace"},axisLine:!1,tickLine:!1,tickFormatter:Ff}),P.jsx(vn,{contentStyle:{background:"#222",border:"1px solid rgba(255,255,255,0.07)",borderRadius:"12px",fontSize:"11px",fontFamily:"JetBrains Mono, monospace"},labelStyle:{color:"#71717a"}}),P.jsx(la,{type:"monotone",dataKey:"tokens",stroke:"#E43A9C",fill:"url(#colorTokens)",strokeWidth:2})]})}):P.jsx("div",{className:"h-[250px] flex items-center justify-center text-zinc-700 text-[11px] font-mono",children:"No data for this period"})]}),P.jsxs("div",{className:"glass-card border border-white/[0.07] rounded-2xl p-5",children:[P.jsx("h3",{className:"text-sm font-mono text-zinc-400 mb-4",children:"By Model"}),u.length>0?P.jsxs(P.Fragment,{children:[P.jsx(MP,{width:"100%",height:180,children:P.jsxs(Tre,{children:[P.jsx(_i,{data:u,dataKey:"value",nameKey:"name",cx:"50%",cy:"50%",outerRadius:70,strokeWidth:0,children:u.map((f,p)=>{var h;return P.jsx(Rh,{fill:qf[p%qf.length]},(h=u[p])==null?void 0:h.name)})}),P.jsx(vn,{contentStyle:{background:"#222",border:"1px solid rgba(255,255,255,0.07)",borderRadius:"12px",fontSize:"11px",fontFamily:"JetBrains Mono, monospace"}})]})}),P.jsx("div",{className:"space-y-1.5 mt-3",children:u.map((f,p)=>P.jsxs("div",{className:"flex items-center gap-2 text-[11px] font-mono",children:[P.jsx("span",{className:"w-2 h-2 rounded-full flex-shrink-0",style:{background:qf[p%qf.length]}}),P.jsx("span",{className:"text-zinc-500 truncate",children:f.name}),P.jsx("span",{className:"ml-auto text-zinc-400",children:Ff(f.value)})]},f.name))})]}):P.jsx("div",{className:"h-[180px] flex items-center justify-center text-zinc-700 text-[11px] font-mono",children:"No data"})]})]})]})}function Uf({icon:t,label:e,value:r}){return P.jsxs("div",{className:"glass-card border border-white/[0.07] rounded-2xl p-4",children:[P.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[t,P.jsx("p",{className:"text-[11px] text-zinc-600 font-mono",children:e})]}),P.jsx("p",{className:"text-xl font-mono text-zinc-100",children:r})]})}function Ff(t){return t>=1e6?`${(t/1e6).toFixed(1)}M`:t>=1e3?`${(t/1e3).toFixed(1)}K`:t.toString()}function Rre(){const[t,e]=N.useState("shared"),[r,n]=N.useState([]),[i,a]=N.useState(null),[s,u]=N.useState(""),[c,f]=N.useState(!1),[p,h]=N.useState(""),[g,v]=N.useState(!1),[y,x]=N.useState(""),[b,S]=N.useState("");N.useEffect(()=>{O()},[t]);function O(){kt.get(`/wiki/${t}`).then(R=>n(R.pages)).catch(()=>n([]))}async function k(R){try{const M=await kt.get(`/wiki/${t}/${R}`);u(M.content),a(R),f(!1)}catch{Vt.error("Failed to load page")}}async function T(){if(i)try{await kt.put(`/wiki/${t}/${i}`,{content:p}),u(p),f(!1),Vt.success("Page saved")}catch{Vt.error("Failed to save")}}async function E(){if(i)try{await kt.delete(`/wiki/${t}/${i}`),Vt.success("Page deleted"),a(null),u(""),O()}catch{Vt.error("Failed to delete")}}async function A(){if(y.trim())try{await kt.put(`/wiki/${t}/${y}`,{content:`# ${y}
|
|
439
|
-
|
|
440
|
-
`}),Vt.success("Page created"),v(!1),x(""),O(),k(y)}catch{Vt.error("Failed to create page")}}const j=r.filter(R=>!b||R.name.toLowerCase().includes(b.toLowerCase()));return P.jsxs("div",{className:"flex h-full",children:[P.jsxs("div",{className:"w-64 border-r border-white/[0.07] flex flex-col h-full bg-[#181818]",children:[P.jsxs("div",{className:"p-3 border-b border-white/[0.07]",children:[P.jsx("h2",{className:"text-lg tracking-wide text-zinc-100 mb-2",style:{fontFamily:"'Bebas Neue', sans-serif"},children:"Wiki"}),P.jsxs("div",{className:"relative",children:[P.jsx(Bj,{className:"absolute left-2.5 top-1/2 -translate-y-1/2 w-3.5 h-3.5 text-zinc-600"}),P.jsx("input",{type:"text",value:b,onChange:R=>S(R.target.value),placeholder:"Search pages...",className:"w-full pl-8 pr-3 py-1.5 rounded-lg bg-white/[0.04] border border-white/[0.07] text-[11px] font-mono text-zinc-300 placeholder:text-zinc-700 outline-none focus:border-[#E43A9C]/50"})]})]}),P.jsx("div",{className:"flex gap-1 p-2 border-b border-white/[0.07]",children:["shared","io"].map(R=>P.jsx("button",{type:"button",onClick:()=>{e(R),a(null)},className:`px-2.5 py-1 rounded-lg text-[11px] font-mono transition-colors ${t===R?"bg-white/10 text-zinc-200":"text-zinc-600 hover:text-zinc-400"}`,children:R},R))}),P.jsxs("div",{className:"flex-1 overflow-y-auto p-2 space-y-0.5",children:[j.map(R=>P.jsxs("button",{type:"button",onClick:()=>k(R.name),className:`w-full text-left px-3 py-2 rounded-lg text-[11px] font-mono flex items-center gap-2 transition-colors ${i===R.name?"bg-[#E43A9C]/10 text-[#E43A9C] border-l-2 border-[#E43A9C]":"text-zinc-500 hover:text-zinc-300 hover:bg-white/[0.04]"}`,children:[P.jsx(A5,{size:13,className:"flex-shrink-0"}),R.name]},R.name)),j.length===0&&P.jsx("p",{className:"text-[11px] text-zinc-700 font-mono text-center py-4",children:"No pages found"})]}),P.jsx("div",{className:"p-2 border-t border-white/[0.07]",children:g?P.jsxs("div",{className:"flex gap-1",children:[P.jsx("input",{type:"text",value:y,onChange:R=>x(R.target.value),placeholder:"page-name",className:"flex-1 px-2.5 py-1.5 rounded-lg text-[11px] font-mono bg-white/[0.04] border border-white/[0.07] text-zinc-300 outline-none focus:border-[#E43A9C]/50",onKeyDown:R=>{R.key==="Enter"&&A(),R.key==="Escape"&&v(!1)},autoFocus:!0}),P.jsx("button",{type:"button",onClick:A,className:"px-2.5 py-1.5 rounded-lg text-[11px] bg-[#E43A9C] text-white",children:"OK"})]}):P.jsxs("button",{type:"button",onClick:()=>v(!0),className:"w-full flex items-center gap-2 px-3 py-2 rounded-lg text-[11px] font-mono text-zinc-600 hover:text-zinc-300 hover:bg-white/[0.04] transition-colors",children:[P.jsx(hh,{size:13})," New page"]})})]}),P.jsx("div",{className:"flex-1 flex flex-col overflow-hidden",children:i?P.jsxs(P.Fragment,{children:[P.jsxs("div",{className:"h-12 flex items-center px-6 border-b border-white/[0.07] justify-between shrink-0",children:[P.jsx("h3",{className:"text-sm font-mono text-zinc-200",children:i}),P.jsx("div",{className:"flex items-center gap-2",children:c?P.jsxs(P.Fragment,{children:[P.jsxs(Ka,{onClick:T,className:"px-3 py-1",children:[P.jsx(Dj,{size:12})," Save"]}),P.jsx(Zf,{onClick:()=>f(!1),className:"px-3 py-1",children:"Cancel"})]}):P.jsxs(P.Fragment,{children:[P.jsx(Zf,{onClick:()=>{f(!0),h(s)},className:"px-3 py-1",children:"Edit"}),P.jsx("button",{type:"button",onClick:E,className:"p-1.5 rounded-lg text-zinc-600 hover:text-red-400 hover:bg-red-400/10 transition-colors",children:P.jsx(ix,{size:13})})]})})]}),P.jsx("div",{className:"flex-1 overflow-y-auto p-6",children:c?P.jsx("textarea",{value:p,onChange:R=>h(R.target.value),className:"w-full h-full bg-transparent font-mono text-sm text-zinc-300 outline-none resize-none"}):P.jsx("div",{className:"prose-io",dangerouslySetInnerHTML:{__html:Ve.parse(s)}})})]}):P.jsx("div",{className:"h-full flex items-center justify-center",children:P.jsxs("div",{className:"text-center",children:[P.jsx($j,{size:48,className:"mx-auto mb-3 text-zinc-800"}),P.jsx("p",{className:"text-[11px] font-mono text-zinc-700",children:"Select a page to view"})]})})})]})}function Nre({children:t}){const{session:e,supabase:r,loading:n}=sx();return n?P.jsx("div",{className:"min-h-screen flex items-center justify-center text-[var(--color-muted-foreground)]",children:"Loading..."}):r?e?P.jsx(P.Fragment,{children:t}):P.jsx(iq,{}):P.jsx(P.Fragment,{children:t})}function $re(){return P.jsx(c6,{children:P.jsx(Nre,{children:P.jsx(VL,{children:P.jsxs(Jr,{element:P.jsx(h6,{}),children:[P.jsx(Jr,{index:!0,element:P.jsx(rq,{})}),P.jsx(Jr,{path:"squads",element:P.jsx(nO,{})}),P.jsx(Jr,{path:"squads/:name",element:P.jsx(nO,{})}),P.jsx(Jr,{path:"feed",element:P.jsx(nq,{})}),P.jsx(Jr,{path:"skills",element:P.jsx(sq,{})}),P.jsx(Jr,{path:"schedules",element:P.jsx(aq,{})}),P.jsx(Jr,{path:"wiki",element:P.jsx(Rre,{})}),P.jsx(Jr,{path:"settings",element:P.jsx(oq,{})}),P.jsx(Jr,{path:"usage",element:P.jsx(jre,{})}),P.jsx(Jr,{path:"*",element:P.jsx(FL,{to:"/",replace:!0})})]})})})})}F3.createRoot(document.getElementById("root")).render(P.jsx(N.StrictMode,{children:P.jsxs(gD,{children:[P.jsx($re,{}),P.jsx(ZD,{theme:"dark",position:"bottom-right"})]})}));
|
|
441
|
-
//# sourceMappingURL=index-nNmZHtrp.js.map
|