PageSourceSearch

https://thetechiebestie.com/assets/Blog-BqgpmS32.js

js thetechiebestie.com collected 2026-10-09 22:04:21 UTC 628,419 bytes, 67 lines download raw bytes

1import{a as e,r as t,t as n}from"./rolldown-runtime-B0Z9INg1.js";import{$ as r,D as i,c as a,d as o,i as s,n as c,p as l,s as u,t as d}from"./Footer-DiroAw0K.js";var f=e(r(),1),p=i(),m=f.createContext(void 0),h=e=>{let t=f.useContext(m);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},g=({client:e,children:t})=>(f.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,p.jsx)(m.Provider,{value:e,children:t})),_={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},v=new class{#e=_;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};function y(e){setTimeout(e,0)}var b=typeof window>`u`||`Deno`in globalThis;function x(){}function S(e,t){return typeof e==`function`?e(t):e}function C(e){return typeof e==`number`&&e>=0&&e!==1/0}function w(e,t){return Math.max(e+(t||0)-Date.now(),0)}function T(e,t){return typeof e==`function`?e(t):e}function E(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==O(o,t.options))return!1}else if(!A(t.queryKey,o))return!1}if(n!==`all`){let e=t.isActive();if(n===`active`&&!e||n===`inactive`&&e)return!1}return!(typeof s==`boolean`&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function D(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(k(t.options.mutationKey)!==k(a))return!1}else if(!A(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function O(e,t){return(t?.queryKeyHashFn||k)(e)}function k(e){return JSON.stringify(e,(e,t)=>te(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function A(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(e&&t&&typeof e==`object`&&typeof t==`object`){if(Array.isArray(e)&&Array.isArray(t)){if(t.length>e.length)return!1;for(let n=0;n<t.length;n++)if(!A(e[n],t[n]))return!1;return!0}let n=Object.keys(t);for(let r of n)if(!A(e[r],t[r]))return!1;return!0}return!1}var j=Object.prototype.hasOwnProperty;function M(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=ee(e)&&ee(t);if(!r&&!(te(e)&&te(t)))return t;let i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,s=r?Array(o):{},c=0;for(let l=0;l<o;l++){let o=r?l:a[l],u=e[o],d=t[o];if(u===d){s[o]=u,(r?l<i:j.call(e,o))&&c++;continue}if(u===null||d===null||typeof u!=`object`||typeof d!=`object`){s[o]=d;continue}let f=M(u,d,n+1);s[o]=f,f===u&&c++}return i===o&&c===i?e:s}function N(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}function ee(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function te(e){if(!ne(e))return!1;let t=Object.getPrototypeOf(e),n=t?.constructor;if(n===void 0)return!0;if(typeof n!=`function`)return!1;let r=n.prototype;return!(!ne(r)||!r.hasOwnProperty(`isPrototypeOf`)||t!==Object.prototype)}function ne(e){return Object.prototype.toString.call(e)===`[object Object]`}function re(e){return new Promise(t=>{v.setTimeout(t,e)})}function ie(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:M(e,t)}function ae(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function oe(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var se=Symbol();function ce(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===se?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function le(e,t){return typeof e==`function`?e(...t):!!e}function ue(e,t,n){let r=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??=t(),r?i:(r=!0,i.aborted?n():i.addEventListener(`abort`,n,{once:!0}),i))}),e}var de=()=>b,fe=()=>de(),pe=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},me=new class extends pe{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e();return window.addEventListener(`visibilitychange`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(e=>{typeof e==`boolean`?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();
1this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e==`boolean`?this.#e:globalThis.document?.visibilityState!==`hidden`}},he=y;function ge(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=he,a=r=>{t?e.push(r):i(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||o()}return n},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}var _e=ge(),ve=new class extends pe{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener(`online`,t,!1),window.addEventListener(`offline`,n,!1),()=>{window.removeEventListener(`online`,t),window.removeEventListener(`offline`,n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#e}};function ye(e){return Math.min(1e3*2**e,3e4)}function be(e){return(e??`online`)!==`online`||ve.isOnline()}var xe=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function Se(e){let t=!1,n=0,r,i=`pending`,a,o,s=new Promise((e,t)=>{a=e,o=t});s.catch(x);let c=()=>i!==`pending`,l=t=>{if(!c()){let n=new xe(t);h(n),e.onCancel?.(n)}},u=()=>{t=!0},d=()=>{t=!1},f=()=>me.isFocused()&&(e.networkMode===`always`||ve.isOnline())&&e.canRun(),p=()=>be(e.networkMode)&&e.canRun(),m=e=>{c()||(r?.(),i=`resolved`,a(e))},h=e=>{c()||(r?.(),i=`rejected`,o(e))},g=()=>new Promise(t=>{r=e=>{(c()||f())&&t(e)},e.onPause?.()}).then(()=>{r=void 0,c()||e.onContinue?.()}),_=()=>{if(c())return;let r,i=n===0?e.initialPromise:void 0;try{r=i??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(m).catch(r=>{if(c())return;let i=e.retry??(fe()?0:3),a=e.retryDelay??ye,o=typeof a==`function`?a(n,r):a,s=i===!0||typeof i==`number`&&n<i||typeof i==`function`&&i(n,r);if(t||!s){h(r);return}n++,e.onFail?.(n,r),re(o).then(()=>f()?void 0:g()).then(()=>{t?h(r):_()})})};return{promise:s,status:()=>i,cancel:l,continue:()=>(r?.(),s),cancelRetry:u,continueRetry:d,canStart:p,start:()=>(p()?_():g().then(_),s)}}var Ce=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),C(this.gcTime)&&(this.#e=v.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(fe()?1/0:3e5))}clearGcTimeout(){this.#e!==void 0&&(v.clearTimeout(this.#e),this.#e=void 0)}};function we(e){return{onFetch:(t,n)=>{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],s={pages:[],pageParams:[]},c=0,l=async()=>{let n=!1,l=e=>{ue(e,()=>t.signal,()=>n=!0)},u=ce(t.options,t.fetchOptions),d=async(e,r,i)=>{if(n)return Promise.reject(t.signal.reason);if(r==null&&e.pages.length)return Promise.resolve(e);let a=(()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return l(e),e})(),o=await u(a),{maxPages:s}=t.options,c=i?oe:ae;return{pages:c(e.pages,o,s),pageParams:c(e.pageParams,r,s)}};if(i&&a.length){let e=i===`backward`,t=e?Ee:Te,n={pages:a,pageParams:o};s=await d(n,t(r,n),e)}else{let t=e??a.length;do{let e=c===0?o[0]??r.initialPageParam:Te(r,s);if(c>0&&e==null)break;s=await d(s,e),c++}while(c<t)}return s};t.fetchFn=t.options.persister?()=>t.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):l}}}function Te(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function Ee(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var De=class extends Ce{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e){super(),this.#s=!1,this.#o=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#r=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=Ae(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#a?.promise}setOptions(e){if(this.options={...this.#o,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=Ae(this.options);e.data!==void 0&&(this.setState(ke(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#r.remove(this)}setData(e,t){let n=ie(this.state.data,e,this.options);return this.#c({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e){this.#c({type:`setState`,state:e})}cancel(e){let t=this.#a?.promise;return this.#a?.cancel(e),t?t.then(x).catch(x):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>T(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===se||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdate
1Count>0}isStatic(){return this.getObserversCount()>0&&this.observers.some(e=>T(e.options.staleTime,this)===`static`)}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e===`static`?!1:this.state.isInvalidated?!0:!w(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:`observerAdded`,query:this,observer:e}))}removeObserver(e){let t=this.observers.indexOf(e);t!==-1&&(this.observers.splice(t,1),this.observers.length||(this.#a&&(this.#s||this.state.fetchStatus===`paused`&&this.state.status===`pending`?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#r.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#c({type:`invalidate`})}async fetch(e,t){if(this.state.fetchStatus!==`idle`&&this.#a?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#a)return this.#a.continueRetry(),this.#a.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let n=new AbortController,r=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#s=!0,n.signal)})},i=()=>{let e=ce(this.options,t),n=(()=>{let e={client:this.#i,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#s=!1,this.options.persister?this.options.persister(e,n,this):e(n)},a=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:i};return r(e),e})();(this.#e===`infinite`?we(this.options.pages):this.options.behavior)?.onFetch(a,this),this.#n=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#c({type:`fetch`,meta:a.fetchOptions?.meta});let o=this.#a=Se({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof xe&&e.revert&&this.setState({...this.#n,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#c({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#c({type:`pause`})},onContinue:()=>{this.#c({type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{let e=await o.start();if(e===void 0)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#r.config.onSuccess?.(e,this),this.#r.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof xe){if(e.silent)return this.#a.promise;if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#c({type:`error`,error:e}),this.#r.config.onError?.(e,this),this.#r.config.onSettled?.(this.state.data,e,this),e}finally{this.#a===o&&(this.#a=void 0),this.scheduleGc()}}#c(e){let t=t=>{switch(e.type){case`failed`:return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case`pause`:return{...t,fetchStatus:`paused`};case`continue`:return{...t,fetchStatus:`fetching`};case`fetch`:return{...t,...Oe(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...ke(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?n:void 0,n;case`error`:let r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:`idle`,status:`error`,isInvalidated:!0};case`invalidate`:return{...t,isInvalidated:!0};case`setState`:return{...t,...e.state}}};this.state=t(this.state),_e.batch(()=>{this.observers.slice().forEach(e=>{e.onQueryUpdate()}),this.#r.notify({query:this,type:`updated`,action:e})})}};function Oe(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:be(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function ke(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function Ae(e){let t=typeof e.initialData==`function`?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt==`function`?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdate
1Count:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?`success`:`pending`,fetchStatus:`idle`}}var je=class extends pe{#e;#t=void 0;#n=void 0;#r=void 0;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p=new Set;constructor(e,t){super(),this.options=t,this.#e=e,this.#o=null,this.bindMethods(),this.setOptions(t)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),Ne(this.#t,this.options)?this.#m():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Pe(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Pe(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#t.removeObserver(this)}setOptions(e){let t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!=`boolean`&&typeof this.options.enabled!=`function`&&typeof T(this.options.enabled,this.#t)!=`boolean`)throw Error(`Expected enabled to be a boolean or a callback that returns a boolean`);this.#S(),this.#t.setOptions(this.options),t._defaulted&&!N(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&Fe(this.#t,n,this.options,t)&&this.#m(),this.updateResult(),r&&(this.#t!==n||T(this.options.enabled,this.#t)!==T(t.enabled,this.#t)||T(this.options.staleTime,this.#t)!==T(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||T(this.options.enabled,this.#t)!==T(t.enabled,this.#t)||i!==this.#f)&&this.#v(i)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return N(this.getCurrentResult(),n)||(this.#r=n,this.#a=this.options,this.#i=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),Reflect.get(e,n))})}trackProp(e){this.#p.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t),r=()=>{},i,a=new Promise(e=>{i=e,r=this.#e.getQueryCache().subscribe(i=>{i.type===`updated`&&i.query.queryHash===n.queryHash&&n.state.data!==void 0&&(r(),e(this.createResult(n,t)))})});return Promise.race([n.fetch().then(()=>{let e=this.createResult(n,t);return i?.(e),e}).finally(()=>{r()}),a])}fetch(e){return this.#m({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#m(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(x)),t}#h(e){return!fe()&&T(this.options.enabled,this.#t)!==!1&&C(e)}#g(){this.#b();let e=T(this.options.staleTime,this.#t);if(this.#r.isStale||!this.#h(e))return;let t=w(this.#r.dataUpdatedAt,e)+1;this.#u=v.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return T(this.options.refetchInterval,this.#t)??!1}#v(e){this.#x(),this.#f=e,!(this.#f===0||!this.#h(this.#f))&&(this.#d=v.setInterval(()=>{(this.options.refetchIntervalInBackground||me.isFocused())&&this.#m()},this.#f))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#u!==void 0&&(v.clearTimeout(this.#u),this.#u=void 0)}#x(){this.#d!==void 0&&(v.clearInterval(this.#d),this.#d=void 0)}createResult(e,t){let n=this.#t,r=this.options,i=this.#r,a=this.#i,o=this.#a,s=e===n?this.#n:e.state,{state:c}=e,l={...c},u=!1,d;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&Ne(e,t),o=i&&Fe(e,n,t,r);(a||o)&&(l={...l,...Oe(c.data,e.options)}),t._optimisticResults===`isRestoring`&&(l.fetchStatus=`idle`)}let{error:f,errorUpdatedAt:p,status:m}=l;d=l.data;let h=!1;if(t.placeholderData!==void 0&&d===void 0&&m===`pending`){let e;i?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(e=i.data,h=!0):e=typeof t.placeholderData==`function`?t.placeholderData(this.#l?.state.data,this.#l):t.placeholderData,e!==void 0&&(m=`success`,d=ie(i?.data,e,t),u=!0)}if(t.select&&d!==void 0&&!h)if(i&&d===a?.data&&t.select===this.#s)d=this.#c;else try{this.#s=t.select,d=t.select(d),d=ie(i?.data,d,t),this.#c=d,this.#o=null}catch(e){this.#o=e}else d===void 0&&(this.#o=null);this.#o&&(f=this.#o,d=this.#c,p=Date.now(),m=`error`,u=!1);let g=l.fetchStatus===`fetching`,_=m===`pending`,v=m===`error`,y=_&&g,b=d!==void 0;return{status:m,fetchStatus:l.fetchStatus,isPending:_,isSuccess:m===`success`,isError:v,isInitialLoading:y,isLoading:y,data:d,dataUpdatedAt:l.dataUpdatedAt,error:f,errorUpdatedAt:p,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdate
1Count:l.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:l.dataUpdateCount>s.dataUpdateCount||l.errorUpdateCount>s.errorUpdateCount,isFetching:g,isRefetching:g&&!_,isLoadingError:v&&!b,isPaused:l.fetchStatus===`paused`,isPlaceholderData:u,isRefetchError:v&&b,isStale:Ie(e,t),refetch:this.refetch,isEnabled:T(t.enabled,e)!==!1}}updateResult(){let e=this.#r,t=this.createResult(this.#t,this.options);if(this.#i=this.#t.state,this.#a=this.options,this.#i.data!==void 0&&(this.#l=this.#t),N(t,e))return;this.#r=t;let n=(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n=typeof t==`function`?t():t;if(n===`all`||!n&&!this.#p.size)return!0;let r=new Set(n??this.#p);return this.options.throwOnError&&r.add(`error`),Object.keys(this.#r).some(t=>{let n=t;return this.#r[n]!==e[n]&&r.has(n)})})();_e.batch(()=>{n&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}#S(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;let t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}};function Me(e,t){return T(t.enabled,e)!==!1&&e.state.data===void 0&&(e.state.status!==`error`||T(t.retryOnMount,e)!==!1)}function Ne(e,t){return Me(e,t)||e.state.data!==void 0&&Pe(e,t,t.refetchOnMount)}function Pe(e,t,n){if(T(t.enabled,e)!==!1&&T(t.staleTime,e)!==`static`){let r=T(n,e);return r===`always`||r!==!1&&Ie(e,t)}return!1}function Fe(e,t,n,r){return(e!==t||T(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&Ie(e,n)}function Ie(e,t){return T(t.enabled,e)!==!1&&e.isStaleByTime(T(t.staleTime,e))}var Le=f.createContext(!1),Re=()=>f.useContext(Le);Le.Provider;function ze(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Be=f.createContext(ze()),Ve=()=>f.useContext(Be),He=(e,t,n)=>{let r=n?.state.error&&typeof e.throwOnError==`function`?le(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||r)&&(t.isReset()||(e.retryOnMount=!1))},Ue=e=>{f.useEffect(()=>{e.clearReset()},[e])},We=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||le(n,[e.error,r])),Ge=e=>{if(e.suspense){let t=1e3,n=e=>e===`static`?e:Math.max(e??t,t),r=e.staleTime;e.staleTime=typeof r==`function`?(...e)=>n(r(...e)):n(r),typeof e.gcTime==`number`&&(e.gcTime=Math.max(e.gcTime,t))}},Ke=(e,t)=>e?.suspense&&t.isPending,qe=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function Je(e,t,n){let r=Re(),i=Ve(),a=h(n),o=a.defaultQueryOptions(e),s=a.getQueryCache().get(o.queryHash),c=e.subscribed!==!1;o._optimisticResults=r?`isRestoring`:c?`optimistic`:void 0,Ge(o),He(o,i,s),Ue(i);let[l]=f.useState(()=>new t(a,o)),u=l.getOptimisticResult(o),d=!r&&c;if(f.useSyncExternalStore(f.useCallback(e=>{let t=d?l.subscribe(_e.batchCalls(e)):x;return l.updateResult(),t},[l,d]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),f.useEffect(()=>{l.setOptions(o)},[o,l]),Ke(o,u))throw qe(o,l,i);if(We({result:u,errorResetBoundary:i,throwOnError:o.throwOnError,query:s,suspense:o.suspense}))throw u.error;return o.notifyOnChangeProps?u:l.trackResult(u)}function Ye(e,t){return Je(e,je,t)}var Xe=o(`arrow-left`,[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]),Ze=o(`calendar`,[[`path`,{d:`M8 2v4`,key:`1cmpym`}],[`path`,{d:`M16 2v4`,key:`4m81vk`}],[`rect`,{width:`18`,height:`18`,x:`3`,y:`4`,rx:`2`,key:`1hopcy`}],[`path`,{d:`M3 10h18`,key:`8toen8`}]]),Qe=Symbol.for(`@supabase/supabase-js.traceContextExtractor`);function $e(){return globalThis[Qe]}function et(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function tt(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})}var nt=e=>e?(...t)=>e(...t):(...e)=>
vendor: 18,843 bytes, line 1
1fetch(...e),rt=class extends Error{constructor(e,t=`FunctionsError`,n){super(e),this.name=t,this.context=n}toJSON(){return{name:this.name,message:this.message,context:this.context}}},it=class extends rt{constructor(e){super(`Failed to send a request to the Edge Function`,`FunctionsFetchError`,e)}},at=class extends rt{constructor(e){super(`Relay Error invoking the Edge Function`,`FunctionsRelayError`,e)}},ot=class extends rt{constructor(e){super(`Edge Function returned a non-2xx status code`,`FunctionsHttpError`,e)}},st;(function(e){e.Any=`any`,e.ApNortheast1=`ap-northeast-1`,e.ApNortheast2=`ap-northeast-2`,e.ApSouth1=`ap-south-1`,e.ApSoutheast1=`ap-southeast-1`,e.ApSoutheast2=`ap-southeast-2`,e.CaCentral1=`ca-central-1`,e.EuCentral1=`eu-central-1`,e.EuWest1=`eu-west-1`,e.EuWest2=`eu-west-2`,e.EuWest3=`eu-west-3`,e.SaEast1=`sa-east-1`,e.UsEast1=`us-east-1`,e.UsWest1=`us-west-1`,e.UsWest2=`us-west-2`})(st||={});var ct=class{constructor(e,{headers:t={},customFetch:n,region:r=st.Any}={}){this.url=e,this.headers=t,this.region=r,this.fetch=nt(n)}setAuth(e){this.headers.Authorization=`Bearer ${e}`}invoke(e){return tt(this,arguments,void 0,function*(e,t={}){var n;let r,i,a;try{let{headers:n,method:o,body:s,signal:c,timeout:l}=t,u={},{region:d}=t;d||=this.region;let f=new URL(`${this.url}/${e}`);d&&d!==`any`&&(u[`x-region`]=d,f.searchParams.set(`forceFunctionRegion`,d));let p,m=!!n&&Object.keys(n).some(e=>e.toLowerCase()===`content-type`);s&&!m?typeof Blob<`u`&&s instanceof Blob||s instanceof ArrayBuffer?(u[`Content-Type`]=`application/octet-stream`,p=s):typeof s==`string`?(u[`Content-Type`]=`text/plain`,p=s):typeof FormData<`u`&&s instanceof FormData?p=s:(u[`Content-Type`]=`application/json`,p=JSON.stringify(s)):p=s&&typeof s!=`string`&&!(typeof Blob<`u`&&s instanceof Blob)&&!(s instanceof ArrayBuffer)&&!(typeof FormData<`u`&&s instanceof FormData)?JSON.stringify(s):s;let h=c;l&&(i=new AbortController,r=setTimeout(()=>i.abort(),l),c?(h=i.signal,a=()=>i.abort(),c.addEventListener(`abort`,a)):h=i.signal);let g=yield this.fetch(f.toString(),{method:o||`POST`,headers:Object.assign(Object.assign(Object.assign({},u),this.headers),n),body:p,signal:h}).catch(e=>{throw new it(e)}),_=g.headers.get(`x-relay-error`);if(_&&_===`true`)throw new at(g);if(!g.ok)throw new ot(g);let v=(g.headers.get(`Content-Type`)??`text/plain`).split(`;`)[0].trim().toLowerCase(),y;return y=v===`application/json`?yield g.json():v===`application/octet-stream`||v===`application/pdf`?yield g.blob():v===`text/event-stream`?g:v===`multipart/form-data`?yield g.formData():yield g.text(),{data:y,error:null,response:g}}catch(e){return{data:null,error:e,response:e instanceof ot||e instanceof at?e.context:void 0}}finally{r&&clearTimeout(r),a&&((n=t.signal)==null||n.removeEventListener(`abort`,a))}})}},lt=class extends Error{constructor(e){super(e.message),this.name=`PostgrestError`,this.details=e.details,this.hint=e.hint,this.code=e.code}toJSON(){return{name:this.name,message:this.message,details:this.details,hint:this.hint,code:this.code}}},ut=3,dt=e=>Math.min(1e3*2**e,3e4),ft=[520,503],pt=[`GET`,`HEAD`,`OPTIONS`];function mt(e){"@babel/helpers - typeof";return mt=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},mt(e)}function ht(e,t){if(mt(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(mt(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function gt(e){var t=ht(e,`string`);return mt(t)==`symbol`?t:t+``}function _t(e,t,n){return(t=gt(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function yt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?vt(Object(n),!0).forEach(function(t){_t(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vt(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function bt(e,t){return new Promise(n=>{if(t?.aborted){n();return}let r=setTimeout(()=>{t?.removeEventListener(`abort`,i),n()},e);function i(){clearTimeout(r),n()}t?.addEventListener(`abort`,i)})}function xt(e,t,n,r){return!(!r||n>=ut||!pt.includes(e)||!ft.includes(t))}async function St(e,t,n,r){let i=0;for(;;){let a=yt({},n.headers);i>0&&(a[`X-Retry-Count`]=String(i));let o;try{o=await e(t,{method:n.method,headers:a,body:n.body,signal:n.signal})}catch(e){if(e?.name===`AbortError`||e?.code===`ABORT_ERR`||!pt.includes(n.method))throw e;if(r&&i<ut){let e=dt(i);i++,await bt(e,n.signal);continue}throw e}if(xt(n.method,o.status,i,r)){let e=o.headers?.get(`Retry-After`)??null,t=e===null?dt(i):Math.max(0,parseInt(e,10)||0)*1e3;await o.text(),i++,await bt(t,n.signal);continue}return o}}var Ct=class{constructor(e){this.shouldThrowOnError=!1,this.retryEnabled=!0,this.method=e.method,this.url=e.url,this.headers=new Headers(e.headers),this.schema=e.schema,this.body=e.body,this.shouldThrowOnError=e.shouldThrowOnError??!1,this.signal=e.signal,this.isMaybeSingle=e.isMaybeSingle??!1,this.shouldStripNulls=e.shouldStripNulls??!1,this.urlLengthLimit=e.urlLengthLimit??8e3,this.retryEnabled=e.retry??!0,this.fetch=e.fetch?e.fetch:fetch}throwOnError(){return this.shouldThrowOnError=!0,this}stripNulls(){if(this.headers.get(`Accept`)===`text/csv`)throw Error(`stripNulls() cannot be used with csv()`);return this.shouldStripNulls=!0,this}setHeader(e,t){return this.headers=new Headers(this.headers),this.headers.set(e,t),this}retry(e){return this.retryEnabled=e,this}then(e,t){var n=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){let e=this.headers.get(`Accept`);e===`application/vnd.pgrst.object+json`?this.headers.set(`Accept`,`application/vnd.pgrst.object+json;nulls=stripped`):(!e||e===`application/json`)&&this.headers.set(`Accept`,`application/vnd.pgrst.array+json;nulls=stripped`)}let r=this.fetch,i=(async()=>{let e={};n.headers.forEach((t,n)=>{e[n]=t});let t=await St(r,n.url.toString(),{method:n.method,headers:e,body:JSON.stringify(n.body,(e,t)=>typeof t==`bigint`?t.toString():t),signal:n.signal},n.retryEnabled);return await n.processResponse(t)})();return this.shouldThrowOnError||(i=i.catch(e=>{let t=``,n=``,r=``,i=e?.cause;if(i){let n=i?.message??``,r=i?.code??``;t=`${e?.name??`FetchError`}: ${e?.message}`,t+=`\n\nCaused by: ${i?.name??`Error`}: ${n}`,r&&(t+=` (${r})`),i?.stack&&(t+=`\n${i.stack}`)}else t=e?.stack??``;let a=this.url.toString().length;return e?.name===`AbortError`||e?.code===`ABORT_ERR`?(r=``,n=`Request was aborted (timeout or manual cancellation)`,a>this.urlLengthLimit&&(n+=`. Note: Your request URL is ${a} 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.`)):(i?.name===`HeadersOverflowError`||i?.code===`UND_ERR_HEADERS_OVERFLOW`)&&(r=``,n=`HTTP headers exceeded server limits (typically 16KB)`,a>this.urlLengthLimit&&(n+=`. Your request URL is ${a} 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:`${e?.name??`FetchError`}: ${e?.message}`,details:t,hint:n,code:r},data:null,count:null,status:0,statusText:``}})),i.then(e,t)}async processResponse(e){var t=this;let n=null,r=null,i=null,a=e.status,o=e.statusText;if(e.ok){if(t.method!==`HEAD`){let i=await e.text();if(i!==``)if(t.headers.get(`Accept`)===`text/csv`)r=i;else if(t.headers.get(`Accept`)&&t.headers.get(`Accept`)?.includes(`application/vnd.pgrst.plan+text`))r=i;else try{r=JSON.parse(i)}catch{if(n={message:i},r=null,t.shouldThrowOnError)throw new lt({message:i,details:``,hint:``,code:``})}}let s=t.headers.get(`Prefer`)?.match(/count=(exact|planned|estimated)/),c=e.headers.get(`content-range`)?.split(`/`);if(s&&c&&c.length>1&&(i=parseInt(c[1])),t.isMaybeSingle&&Array.isArray(r))if(r.length>1){if(n={code:`PGRST116`,details:`Results contain ${r.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:`JSON object requested, multiple (or no) rows returned`},r=null,i=null,a=406,o=`Not Acceptable`,t.shouldThrowOnError)throw new lt(yt(yt({},n),{},{hint:n.hint??``}))}else r=r.length===1?r[0]:null}else{let i=await e.text();try{n=JSON.parse(i),Array.isArray(n)&&e.status===404&&(r=[],n=null,a=200,o=`OK`)}catch{e.status===404&&i===``?(a=204,o=`No Content`):n={message:i}}if(n&&t.shouldThrowOnError)throw new lt(n)}return{success:n===null,error:n,data:r,count:i,status:a,statusText:o}}returns(){return this}overrideTypes(){return this}},wt=class extends Ct{throwOnError(){return super.throwOnError()}select(e){let t=!1,n=(e??`*`).split(``).map(e=>/\s/.test(e)&&!t?``:(e===`"`&&(t=!t),e)).join(``);return this.url.searchParams.set(`select`,n),this.headers.append(`Prefer`,`return=representation`),this}order(e,{ascending:t=!0,nullsFirst:n,foreignTable:r,referencedTable:i=r}={}){let a=i?`${i}.order`:`order`,o=this.url.searchParams.get(a);return this.url.searchParams.set(a,`${o?`${o},`:``}${e}.${t?`asc`:`desc`}${n===void 0?``:n?`.nullsfirst`:`.nullslast`}`),this}limit(e,{foreignTable:t,referencedTable:n=t}={}){let r=n===void 0?`limit`:`${n}.limit`;return this.url.searchParams.set(r,`${e}`),this}range(e,t,{foreignTable:n,referencedTable:r=n}={}){let i=r===void 0?`offset`:`${r}.offset`,a=r===void 0?`limit`:`${r}.limit`;return this.url.searchParams.set(i,`${e}`),this.url.searchParams.set(a,`${t-e+1}`),this}abortSignal(e){return this.signal=e,this}single(){return this.headers.set(`Accept`,`application/vnd.pgrst.object+json`),this}maybeSingle(){return this.isMaybeSingle=!0,this}csv(){return this.headers.set(`Accept`,`text/csv`),this}geojson(){return this.headers.set(`Accept`,`application/geo+json`),this}explain({analyze:e=!1,verbose:t=!1,settings:n=!1,buffers:r=!1,wal:i=!1,format:a=`text`}={}){let o=[e?`analyze`:null,t?`verbose`:null,n?`settings`:null,r?`buffers`:null,i?`wal`:null].filter(Boolean).join(`|`),s=this.headers.get(`Accept`)??`application/json`;return this.headers.set(`Accept`,`application/vnd.pgrst.plan+${a}; for="${s}"; options=${o};`),this}rollback(){return this.headers.append(`Prefer`,`tx=rollback`),this}returns(){return this}maxAffected(e){return this.headers.append(`Prefer`,`handling=strict`),this.headers.append(`Prefer`,`max-affected=${e}`),this}},Tt=RegExp(`[,()]`),Et=class extends wt{throwOnError(){return super.throwOnError()}eq(e,t){return this.url.searchParams.append(e,`eq.${t}`),this}neq(e,t){return this.url.searchParams.append(e,`neq.${t}`),this}gt(e,t){return this.url.searchParams.append(e,`gt.${t}`),this}gte(e,t){return this.url.searchParams.append(e,`gte.${t}`),this}lt(e,t){return this.url.searchParams.append(e,`lt.${t}`),this}lte(e,t){return this.url.searchParams.append(e,`lte.${t}`),this}like(e,t){return this.url.searchParams.append(e,`like.${t}`),this}likeAllOf(e,t){return this.url.searchParams.append(e,`like(all).{${t.join(`,`)}}`),this}likeAnyOf(e,t){return this.url.searchParams.append(e,`like(any).{${t.join(`,`)}}`),this}ilike(e,t){return this.url.searchParams.append(e,`ilike.${t}`),this}ilikeAllOf(e,t){return this.url.searchParams.append(e,`ilike(all).{${t.join(`,`)}}`),this}ilikeAnyOf(e,t){return this.url.searchParams.append(e,`ilike(any).{${t.join(`,`)}}`),this}regexMatch(e,t){return this.url.searchParams.append(e,`match.${t}`),this}regexIMatch(e,t){return this.url.searchParams.append(e,`imatch.${t}`),this}is(e,t){return this.url.searchParams.append(e,`is.${t}`),this}isDistinct(e,t){return this.url.searchParams.append(e,`isdistinct.${t}`),this}in(e,t){let n=Array.from(new Set(t)).map(e=>typeof e==`string`&&Tt.test(e)?`"${e}"`:`${e}`).join(`,`);return this.url.searchParams.append(e,`in.(${n})`),this}notIn(e,t){let n=Array.from(new Set(t)).map(e=>typeof e==`string`&&Tt.test(e)?`"${e}"`:`${e}`).join(`,`);return this.url.searchParams.append(e,`not.in.(${n})`),this}contains(e,t){return typeof t==`string`?this.url.searchParams.append(e,`cs.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cs.{${t.join(`,`)}}`):this.url.searchParams.append(e,`cs.${JSON.stringify(t)}`),this}containedBy(e,t){return typeof t==`string`?this.url.searchParams.append(e,`cd.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cd.{${t.join(`,`)}}`):this.url.searchParams.append(e,`cd.${JSON.stringify(t)}`),this}rangeGt(e,t){return this.url.searchParams.append(e,`sr.${t}`),this}rangeGte(e,t){return this.url.searchParams.append(e,`nxl.${t}`),this}rangeLt(e,t){return this.url.searchParams.append(e,`sl.${t}`),this}rangeLte(e,t){return this.url.searchParams.append(e,`nxr.${t}`),this}rangeAdjacent(e,t){return this.url.searchParams.append(e,`adj.${t}`),this}overlaps(e,t){return typeof t==`string`?this.url.searchParams.append(e,`ov.${t}`):this.url.searchParams.append(e,`ov.{${t.join(`,`)}}`),this}textSearch(e,t,{config:n,type:r}={}){let i=``;r===`plain`?i=`pl`:r===`phrase`?i=`ph`:r===`websearch`&&(i=`w`);let a=n===void 0?``:`(${n})`;return this.url.searchParams.append(e,`${i}fts${a}.${t}`),this}match(e){return Object.entries(e).filter(([e,t])=>t!==void 0).forEach(([e,t])=>{this.url.searchParams.append(e,`eq.${t}`)}),this}not(e,t,n){return this.url.searchParams.append(e,`not.${t}.${n}`),this}or(e,{foreignTable:t,referencedTable:n=t}={}){let r=n?`${n}.or`:`or`;return this.url.searchParams.append(r,`(${e})`),this}filter(e,t,n){return this.url.searchParams.append(e,`${t}.${n}`),this}},Dt=class{constructor(e,{headers:t={},schema:n,fetch:r,urlLengthLimit:i=8e3,retry:a}){this.url=e,this.headers=new Headers(t),this.schema=n,this.fetch=r,this.urlLengthLimit=i,this.retry=a}cloneRequestState(){return{url:new URL(this.url.toString()),headers:new Headers(this.headers)}}select(e,t){let{head:n=!1,count:r}=t??{},i=n?`HEAD`:`GET`,a=!1,o=(e??`*`).split(``).map(e=>/\s/.test(e)&&!a?``:(e===`"`&&(a=!a),e)).join(``),{url:s,headers:c}=this.cloneRequestState();return s.searchParams.set(`select`,o),r&&c.append(`Prefer`,`count=${r}`),new Et({method:i,url:s,headers:c,schema:this.schema,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}insert(e,{count:t,defaultToNull:n=!0}={}){let{url:r,headers:i}=this.cloneRequestState();if(t&&i.append(`Prefer`,`count=${t}`),n||i.append(`Prefer`,`missing=default`),Array.isArray(e)){let t=e.reduce((e,t)=>e.concat(Object.keys(t)),[]);if(t.length>0){let e=[...new Set(t)].map(e=>`"${e}"`);r.searchParams.set(`columns`,e.join(`,`))}}return new Et({method:`POST`,url:r,headers:i,schema:this.schema,body:e,fetch:this.fetch??fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}upsert(e,{onConflict:t,ignoreDuplicates:n=!1,count:r,defaultToNull:i=!0}={}){let{url:a,headers:o}=this.cloneRequestState();if(o.append(`Prefer`,`resolution=${n?`ignore`:`merge`}-duplicates`),t!==void 0&&a.searchParams.set(`on_conflict`,t),r&&o.append(`Prefer`,`count=${r}`),i||o.append(`Prefer`,`missing=default`),Array.isArray(e)){let t=e.reduce((e,t)=>e.concat(Object.keys(t)),[]);if(t.length>0){let e=[...new Set(t)].map(e=>`"${e}"`);a.searchParams.set(`columns`,e.join(`,`))}}return new Et({method:`POST`,url:a,headers:o,schema:this.schema,body:e,fetch:this.fetch??fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}update(e,{count:t}={}){let{url:n,headers:r}=this.cloneRequestState();return t&&r.append(`Prefer`,`count=${t}`),new Et({method:`PATCH`,url:n,headers:r,schema:this.schema,body:e,fetch:this.fetch??fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}delete({count:e}={}){let{url:t,headers:n}=this.cloneRequestState();return e&&n.append(`Prefer`,`count=${e}`),new Et({method:`DELETE`,url:t,headers:n,schema:this.schema,fetch:this.fetch??fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};function Ot(e,t){try{let t=JSON.parse(e);if(t&&typeof t==`object`&&!Array.isArray(t))return new lt({message:String(t.message??e),details:t.details??``,hint:t.hint??``,code:t.code??``})}catch{}return new lt({message:e||t,details:``,hint:``,code:``})}function kt(e,t,n){let r=e;return{success:!1,error:new lt({message:`${r?.name??`FetchError`}: ${r?.message}`,details:``,hint:``,code:``}),data:null,count:null,status:t,statusText:n}}var At=class e{constructor(e,{headers:t={},schema:n,fetch:r,timeout:i,urlLengthLimit:a=8e3,retry:o}={}){this.url=e,this.headers=new Headers(t),this.schemaName=n,this.urlLengthLimit=a;let s=r??globalThis.fetch;this.fetch=i!==void 0&&i>0?(e,t)=>{let n=new AbortController,r=setTimeout(()=>n.abort(),i),a=t?.signal;if(a){if(a.aborted)return clearTimeout(r),s(e,t);let i=()=>{clearTimeout(r),n.abort()};return a.addEventListener(`abort`,i,{once:!0}),s(e,yt(yt({},t),{},{signal:n.signal})).finally(()=>{clearTimeout(r),a.removeEventListener(`abort`,i)})}return s(e,yt(yt({},t),{},{signal:n.signal})).finally(()=>clearTimeout(r))}:s,this.retry=o}from(e){if(!e||typeof e!=`string`||e.trim()===``)throw Error(`Invalid relation name: relation must be a non-empty string.`);return new Dt(new URL(`${this.url}/${e}`),{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}schema(t){return new e(this.url,{headers:this.headers,schema:t,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}async getOpenApiSpec(){var e=this;let t=new Headers(e.headers);t.set(`Accept`,`application/openapi+json`),e.schemaName&&t.set(`Accept-Profile`,e.schemaName);let n={};t.forEach((e,t)=>{n[t]=e});let r=e.fetch??globalThis.fetch,i;try{i=await St(r,`${e.url}/`,{method:`GET`,headers:n},e.retry??!0)}catch(e){return kt(e,0,``)}let a;try{a=await i.text()}catch(e){return kt(e,i.status,i.statusText)}if(i.ok)try{return{success:!0,error:null,data:JSON.parse(a),count:null,status:i.status,statusText:i.statusText}}catch{}return{success:!1,error:Ot(a,i.statusText),data:null,count:null,status:i.status,statusText:i.statusText}}rpc(e,t={},{head:n=!1,get:r=!1,count:i}={}){let a,o=new URL(`${this.url}/rpc/${e}`),s,c=e=>typeof e==`object`&&!!e&&(!Array.isArray(e)||e.some(c)),l=n&&Object.values(t).some(c);l?(a=`POST`,s=t):n||r?(a=n?`HEAD`:`GET`,Object.entries(t).filter(([e,t])=>t!==void 0).map(([e,t])=>[e,Array.isArray(t)?`{${t.join(`,`)}}`:`${t}
1`]).forEach(([e,t])=>{o.searchParams.append(e,t)})):(a=`POST`,s=t);let u=new Headers(this.headers);return l?u.set(`Prefer`,i?`count=${i},return=minimal`:`return=minimal`):i&&u.set(`Prefer`,`count=${i}`),new Et({method:a,url:o,headers:u,schema:this.schemaName,body:s,fetch:this.fetch??fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}},jt=class{constructor(){}static detectEnvironment(){if(typeof WebSocket<`u`)return{type:`native`,wsConstructor:WebSocket};let e=globalThis;if(typeof globalThis<`u`&&e.WebSocket!==void 0)return{type:`native`,wsConstructor:e.WebSocket};let t=typeof global<`u`?global:void 0;if(t&&t.WebSocket!==void 0)return{type:`native`,wsConstructor:t.WebSocket};if(typeof globalThis<`u`&&e.WebSocketPair!==void 0&&globalThis.WebSocket===void 0)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`&&e.EdgeRuntime||typeof navigator<`u`&&navigator.userAgent?.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.`};let n=globalThis.process;if(n){let e=n.versions;if(e&&e.node)return{type:`unsupported`,error:`Node.js detected but native WebSocket not found.`,workaround:`Ensure you are running Node.js 22+ or provide a WebSocket implementation via the transport option.`}}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(){let e=this.detectEnvironment();if(e.wsConstructor)return e.wsConstructor;let t=e.error||`WebSocket not supported in this environment.`;throw e.workaround&&(t+=`\n\nSuggested solution: ${e.workaround}`),Error(t)}static isWebSocketSupported(){try{return this.detectEnvironment().type===`native`}catch{return!1}}},Mt=`realtime-js/2.117.2`,Nt=`1.0.0`,Pt=`2.0.0`,Ft=Pt,It=1e4,Lt=15e3,Rt=1e4,zt={closed:`closed`,errored:`errored`,joined:`joined`,joining:`joining`,leaving:`leaving`},Bt={close:`phx_close`,error:`phx_error`,join:`phx_join`,reply:`phx_reply`,leave:`phx_leave`,access_token:`access_token`},Vt={connecting:`connecting`,open:`open`,closing:`closing`,closed:`closed`},Ht=class{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,t){if(e.event===this.BROADCAST_EVENT&&!(e.payload instanceof ArrayBuffer)&&typeof e.payload.event==`string`)return t(this._binaryEncodeUserBroadcastPush(e));let n=[e.join_ref,e.ref,e.topic,e.event,e.payload];return t(JSON.stringify(n))}_binaryEncodeUserBroadcastPush(e){return this._isArrayBuffer(e.payload?.payload)?this._encodeBinaryUserBroadcastPush(e):this._encodeJsonUserBroadcastPush(e)}_encodeBinaryUserBroadcastPush(e){let t=e.payload?.payload??new ArrayBuffer(0);return this._encodeUserBroadcastPush(e,this.BINARY_ENCODING,t)}_encodeJsonUserBroadcastPush(e){let t=e.payload?.payload??{},n=new TextEncoder().encode(JSON.stringify(t)).buffer;return this._encodeUserBroadcastPush(e,this.JSON_ENCODING,n)}_encodeUserBroadcastPush(e,t,n){let r=new TextEncoder,i=r.encode(e.topic),a=r.encode(e.ref??``),o=r.encode(e.join_ref??``),s=r.encode(e.payload.event),c=this.allowedMetadataKeys?this._pick(e.payload,this.allowedMetadataKeys):{},l=r.encode(Object.keys(c).length===0?``:JSON.stringify(c));if(o.length>255)throw Error(`joinRef length ${o.length} exceeds maximum of 255`);if(a.length>255)throw Error(`ref length ${a.length} exceeds maximum of 255`);if(i.length>255)throw Error(`topic length ${i.length} exceeds maximum of 255`);if(s.length>255)throw Error(`userEvent length ${s.length} exceeds maximum of 255`);if(l.length>255)throw Error(`metadata length ${l.length} exceeds maximum of 255`);let u=this.USER_BROADCAST_PUSH_META_LENGTH+o.length+a.length+i.length+s.length+l.length,d=new ArrayBuffer(this.HEADER_LENGTH+u),f=new DataView(d),p=new Uint8Array(d),m=0;f.setUint8(m++,this.KINDS.userBroadcastPush),f.setUint8(m++,o.length),f.setUint8(m++,a.length),f.setUint8(m++,i.length),f.setUint8(m++,s.length),f.setUint8(m++,l.length),f.setUint8(m++,t),p.set(o,m),m+=o.length,p.set(a,m),m+=a.length,p.set(i,m),m+=i.length,p.set(s,m),m+=s.length,p.set(l,m),m+=l.length;var h=new Uint8Array(d.byteLength+n.byteLength);return h.set(new Uint8Array(d),0),h.set(new Uint8Array(n),d.byteLength),h.buffer}decode(e,t){if(this._isArrayBuffer(e))return t(this._binaryDecode(e));if(typeof e==`string`){let[n,r,i,a,o]=JSON.parse(e);return t({join_ref:n,ref:r,topic:i,event:a,payload:o})}return t({})}_binaryDecode(e){let t=new DataView(e),n=t.getUint8(0),r=new TextDecoder;switch(n){case this.KINDS.userBroadcast:return this._decodeUserBroadcast(e,t,r)}}_decodeUserBroadcast(e,t,n){let r=t.getUint8(1),i=t.getUint8(2),a=t.getUint8(3),o=t.getUint8(4),s=this.HEADER_LENGTH+4,c=n.decode(e.slice(s,s+r));s+=r;let l=n.decode(e.slice(s,s+i));s+=i;let u=n.decode(e.slice(s,s+a));s+=a;let d=e.slice(s,e.byteLength),f=o===this.JSON_ENCODING?JSON.parse(n.decode(d)):d,p={type:this.BROADCAST_EVENT,event:l,payload:f};return a>0&&(p.meta=JSON.parse(u)),{join_ref:null,ref:null,topic:c,event:this.BROADCAST_EVENT,payload:p}}_isArrayBuffer(e){return e instanceof ArrayBuffer||e?.constructor?.name===`ArrayBuffer`}_pick(e,t){return!e||typeof e!=`object`?{}:Object.fromEntries(Object.entries(e).filter(([e])=>t.includes(e)))}},P;(function(e){e.abstime=`abstime`,e.bool=`bool`,e.date=`date`,e.daterange=`daterange`,e.float4=`float4`,e.float8=`float8`,e.int2=`int2`,e.int4=`int4`,e.int4range=`int4range`,e.int8=`int8`,e.int8range=`int8range`,e.json=`json`,e.jsonb=`jsonb`,e.money=`money`,e.numeric=`numeric`,e.oid=`oid`,e.reltime=`reltime`,e.text=`text`,e.time=`time`,e.timestamp=`timestamp`,e.timestamptz=`timestamptz`,e.timetz=`timetz`,e.tsrange=`tsrange`,e.tstzrange=`tstzrange`})(P||={});var Ut=(e,t,n={})=>{let r=n.skipTypes??[];return t?Object.keys(t).reduce((n,i)=>(n[i]=Wt(i,e,t,r),n),{}):{}},Wt=(e,t,n,r)=>{let i=t.find(t=>t.name===e)?.type,a=n[e];return i&&!r.includes(i)?Gt(i,a):Kt(a)},Gt=(e,t)=>{if(e.charAt(0)===`_`)return Xt(t,e.slice(1,e.length));switch(e){case P.bool:return qt(t);case P.float4:case P.float8:case P.int2:case P.int4:case P.int8:case P.numeric:case P.oid:return Jt(t);case P.json:case P.jsonb:return Yt(t);case P.timestamp:return Zt(t);case P.abstime:case P.date:case P.daterange:case P.int4range:case P.int8range:case P.money:case P.reltime:case P.text:case P.time:case P.timestamptz:case P.timetz:case P.tsrange:case P.tstzrange:return Kt(t);default:return Kt(t)}},Kt=e=>e,qt=e=>{switch(e){case`t`:return!0;case`f`:return!1;default:return e}},Jt=e=>{if(typeof e==`string`){let t=parseFloat(e);
vendor: 19,250 bytes, lines 1-2
1if(!Number.isNaN(t))return t}return e},Yt=e=>{if(typeof e==`string`)try{return JSON.parse(e)}catch{return e}return e},Xt=(e,t)=>{if(typeof e!=`string`)return e;let n=e.length-1,r=e[n];if(e[0]===`{`&&r===`}`){let r,i=e.slice(1,n);try{r=JSON.parse(`[`+i+`]`)}catch{r=i?i.split(`,`):[]}return r.map(e=>Gt(t,e))}return e},Zt=e=>typeof e==`string`?e.replace(` `,`T`):e,Qt=e=>{let t=new URL(e);return t.protocol=t.protocol.replace(/^ws/i,`http`),t.pathname=t.pathname.replace(/\/+$/,``).replace(/\/socket\/websocket$/i,``).replace(/\/socket$/i,``).replace(/\/websocket$/i,``),t.pathname===``||t.pathname===`/`?t.pathname=`/api/broadcast`:t.pathname+=`/api/broadcast`,t.href},$t=e=>typeof e==`function`?e:function(){return e},en=typeof self<`u`?self:null,tn=typeof window<`u`?window:null,nn=en||tn||globalThis,rn=`2.0.0`,an=1e4,on=1e3,sn=100,cn={connecting:0,open:1,closing:2,closed:3},ln={closed:`closed`,errored:`errored`,joined:`joined`,joining:`joining`,leaving:`leaving`},un={close:`phx_close`,error:`phx_error`,join:`phx_join`,reply:`phx_reply`,leave:`phx_leave`},dn={longpoll:`longpoll`,websocket:`websocket`},fn={complete:4},pn=`base64url.bearer.phx.`,mn=class{constructor(e,t,n,r){this.channel=e,this.event=t,this.payload=n||function(){return{}},this.receivedResp=null,this.timeout=r,this.timeoutTimer=null,this.recHooks=[],this.sent=!1,this.ref=void 0}resend(e){this.timeout=e,this.reset(),this.send()}send(){this.hasReceived(`timeout`)||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload(),ref:this.ref,join_ref:this.channel.joinRef()}))}receive(e,t){return this.hasReceived(e)&&t(this.receivedResp.response),this.recHooks.push({status:e,callback:t}),this}reset(){this.cancelRefEvent(),this.ref=null,this.refEvent=null,this.receivedResp=null,this.sent=!1}destroy(){this.cancelRefEvent(),this.cancelTimeout()}matchReceive({status:e,response:t,_ref:n}){this.recHooks.filter(t=>t.status===e).forEach(e=>e.callback(t))}cancelRefEvent(){this.refEvent&&this.channel.off(this.refEvent)}cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=null}startTimeout(){this.timeoutTimer&&this.cancelTimeout(),this.ref=this.channel.socket.makeRef(),this.refEvent=this.channel.replyEventName(this.ref),this.channel.on(this.refEvent,e=>{this.cancelRefEvent(),this.cancelTimeout(),this.receivedResp=e,this.matchReceive(e)}),this.timeoutTimer=setTimeout(()=>{this.trigger(`timeout`,{})},this.timeout)}hasReceived(e){return this.receivedResp&&this.receivedResp.status===e}trigger(e,t){this.channel.trigger(this.refEvent,{status:e,response:t})}},hn=class{constructor(e,t){this.callback=e,this.timerCalc=t,this.timer=void 0,this.tries=0}reset(){this.tries=0,clearTimeout(this.timer)}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries+=1,this.callback()},this.timerCalc(this.tries+1))}},gn=class{constructor(e,t,n){this.state=ln.closed,this.topic=e,this.params=$t(t||{}),this.socket=n,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new mn(this,un.join,this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new hn(()=>{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=ln.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(e=>e.send()),this.pushBuffer=[]}),this.joinPush.receive(`error`,e=>{this.state=ln.errored,this.socket.hasLogger()&&this.socket.log(`channel`,`error ${this.topic}`,e),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.onClose(()=>{this.rejoinTimer.reset(),this.socket.hasLogger()&&this.socket.log(`channel`,`close ${this.topic}`),this.state=ln.closed,this.socket.remove(this)}),this.onError(e=>{this.socket.hasLogger()&&this.socket.log(`channel`,`error ${this.topic}`,e),this.isJoining()&&this.joinPush.reset(),this.state=ln.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 mn(this,un.leave,$t({}),this.timeout).send(),this.state=ln.errored,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.on(un.reply,(e,t)=>{this.trigger(this.replyEventName(t),e)})}join(e=this.timeout){if(this.joinedOnce)throw Error(`tried to join multiple times. 'join' can only be called a single time per channel instance`);return this.timeout=e,this.joinedOnce=!0,this.rejoin(),this.joinPush}teardown(){this.pushBuffer.forEach(e=>e.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=ln.closed,this.bindings=[]}onClose(e){this.on(un.close,e)}onError(e){return this.on(un.error,t=>e(t))}on(e,t){let n=this.bindingRef++;return this.bindings.push({event:e,ref:n,callback:t}),n}off(e,t){this.bindings=this.bindings.filter(n=>n.event!==e||t!==void 0&&t!==n.ref)}canPush(){return this.socket.isConnected()&&this.isJoined()}push(e,t,n=this.timeout){if(t||={},!this.joinedOnce)throw Error(`tried to push '${e}' to '${this.topic}' before joining. Use channel.join() before pushing events`);let r=new mn(this,e,function(){return t},n);return this.canPush()?r.send():(r.startTimeout(),this.pushBuffer.push(r)),r}leave(e=this.timeout){this.rejoinTimer.reset(),this.joinPush.cancelTimeout(),this.state=ln.leaving;let t=()=>{this.socket.hasLogger()&&this.socket.log(`channel`,`leave ${this.topic}`),this.trigger(un.close,`leave`)},n=new mn(this,un.leave,$t({}),e);return n.receive(`ok`,()=>t()).receive(`timeout`,()=>t()),n.send(),this.canPush()||n.trigger(`ok`,{}),n}onMessage(e,t,n){return t}filterBindings(e,t,n){return!0}isMember(e,t,n,r){return this.topic===e?r&&r!==this.joinRef()?(this.socket.hasLogger()&&this.socket.log(`channel`,`dropping outdated message`,{topic:e,event:t,payload:n,joinRef:r}),!1):!0:!1}joinRef(){return this.joinPush.ref}rejoin(e=this.timeout){this.isLeaving()||(this.socket.leaveOpenTopic(this.topic),this.state=ln.joining,this.joinPush.resend(e))}trigger(e,t,n,r){let i=this.onMessage(e,t,n,r);if(t&&!i)throw Error(`channel onMessage callbacks must return the payload, modified or unmodified`);let a=this.bindings.filter(r=>r.event===e&&this.filterBindings(r,t,n));for(let e=0;e<a.length;e++)a[e].callback(i,n,r||this.joinRef())}replyEventName(e){return`chan_reply_${e}`}isClosed(){return this.state===ln.closed}isErrored(){return this.state===ln.errored}isJoined(){return this.state===ln.joined}isJoining(){return this.state===ln.joining}isLeaving(){return this.state===ln.leaving}},_n=class{static request(e,t,n,r,i,a,o){if(nn.XDomainRequest){let n=new nn.XDomainRequest;return this.xdomainRequest(n,e,t,r,i,a,o)}if(nn.XMLHttpRequest){let s=new nn.XMLHttpRequest;return this.xhrRequest(s,e,t,n,r,i,a,o)}if(nn.fetch&&nn.AbortController)return this.fetchRequest(e,t,n,r,i,a,o);throw Error(`No suitable XMLHttpRequest implementation found`)}static fetchRequest(e,t,n,r,i,a,o){let s={method:e,headers:n,body:r},c=null;return i&&(c=new AbortController,setTimeout(()=>c.abort(),i),s.signal=c.signal),nn.fetch(t,s).then(e=>e.text()).then(e=>this.parseJSON(e)).then(e=>o&&o(e)).catch(e=>{e.name===`AbortError`&&a?a():o&&o(null)}),c}static xdomainRequest(e,t,n,r,i,a,o){return e.timeout=i,e.open(t,n),e.onload=()=>{let t=this.parseJSON(e.responseText);o&&o(t)},a&&(e.ontimeout=a),e.onprogress=()=>{},e.send(r),e}static xhrRequest(e,t,n,r,i,a,o,s){e.open(t,n,!0),e.timeout=a;for(let[t,n]of Object.entries(r))e.setRequestHeader(t,n);return e.onerror=()=>s&&s(null),e.onreadystatechange=()=>{e.readyState===fn.complete&&s&&s(this.parseJSON(e.responseText))},o&&(e.ontimeout=o),e.send(i),e}static parseJSON(e){if(!e||e===``)return null;try{return JSON.parse(e)}catch{return console&&console.log(`failed to parse JSON response`,e),null}}static serialize(e,t){let n=[];for(var r in e){if(!Object.prototype.hasOwnProperty.call(e,r))continue;let i=t?`${t}[${r}]`:r,a=e[r];typeof a==`object`?n.push(this.serialize(a,i)):n.push(encodeURIComponent(i)+`=`+encodeURIComponent(a))}return n.join(`&`)}static appendParams(e,t){return Object.keys(t).length===0?e:`${e}${e.match(/\?/)?`&`:`?`}${this.serialize(t)}`}},vn=e=>{let t=``,n=new Uint8Array(e),r=n.byteLength;for(let e=0;e<r;e++)t+=String.fromCharCode(n[e]);return btoa(t)},yn=class{constructor(e,t){t&&t.length===2&&t[1].startsWith(pn)&&(this.authToken=atob(t[1].slice(pn.length))),this.endPoint=null,this.token=null,this.skipHeartbeat=!0,this.reqs=new Set,this.awaitingBatchAck=!1,this.currentBatch=null,this.currentBatchTimer=null,this.batchBuffer=[],this.onopen=function(){},this.onerror=function(){},this.onmessage=function(){},this.onclose=function(){},this.pollEndpoint=this.normalizeEndpoint(e),this.readyState=cn.connecting,setTimeout(()=>this.poll(),0)}normalizeEndpoint(e){return e.replace(`ws://`,`http://`).replace(`wss://`,`https://`).replace(RegExp(`(.*)/`+dn.websocket),`$1/`+dn.longpoll)}endpointURL(){return _n.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(e,t,n){this.close(e,t,n),this.readyState=cn.connecting}ontimeout(){this.onerror(`timeout`),this.closeAndRetry(1005,`timeout`,!1)}isActive(){return this.readyState===cn.open||this.readyState===cn.connecting}poll(){let e={Accept:`application/json`};this.authToken&&(e[`X-Phoenix-AuthToken`]=this.authToken),this.ajax(`GET`,e,null,()=>this.ontimeout(),e=>{if(e){var{status:t,token:n,messages:r}=e;if(t===410&&this.token!==null){this.onerror(410),this.closeAndRetry(3410,`session_gone`,!1);return}this.token=n}else t=0;switch(t){case 200:r.forEach(e=>{setTimeout(()=>this.onmessage({data:e}),0)}),this.poll();break;case 204:this.poll();break;case 410:this.readyState=cn.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 Error(`unhandled poll status ${t}`)}})}send(e){typeof e!=`string`&&(e=vn(e)),this.currentBatch?this.currentBatch.push(e):this.awaitingBatchAck?this.batchBuffer.push(e):(this.currentBatch=[e],this.currentBatchTimer=setTimeout(()=>{this.batchSend(this.currentBatch),this.currentBatch=null},0))}batchSend(e,t=0){this.awaitingBatchAck=!0;let n=t+sn,r=e.slice(t,n);this.ajax(`POST`,{"Content-Type":`application/x-ndjson`},r.join(`
2`),()=>this.onerror(`timeout`),t=>{!t||t.status!==200?(this.awaitingBatchAck=!1,this.onerror(t&&t.status),this.closeAndRetry(1011,`internal server error`,!1)):n<e.length?this.batchSend(e,n):this.batchBuffer.length>0?(this.batchSend(this.batchBuffer),this.batchBuffer=[]):this.awaitingBatchAck=!1})}close(e,t,n){for(let e of this.reqs)e.abort();this.readyState=cn.closed;let r=Object.assign({code:1e3,reason:void 0,wasClean:!0},{code:e,reason:t,wasClean:n});this.batchBuffer=[],clearTimeout(this.currentBatchTimer),this.currentBatchTimer=null,typeof CloseEvent<`u`?this.onclose(new CloseEvent(`close`,r)):this.onclose(r)}ajax(e,t,n,r,i){let a;a=_n.request(e,this.endpointURL(),t,n,this.timeout,()=>{this.reqs.delete(a),r()},e=>{this.reqs.delete(a),this.isActive()&&i(e)}),this.reqs.add(a)}},bn=class e{constructor(t,n={}){let r=n.events||{state:`presence_state`,diff:`presence_diff`};this.state=Object.create(null),this.pendingDiffs=[],this.channel=t,this.joinRef=null,this.caller={onJoin:function(){},onLeave:function(){},onSync:function(){}},this.channel.on(r.state,t=>{let{onJoin:n,onLeave:r,onSync:i}=this.caller;this.joinRef=this.channel.joinRef(),this.state=e.syncState(this.state,t,n,r),this.pendingDiffs.forEach(t=>{this.state=e.syncDiff(this.state,t,n,r)}),this.pendingDiffs=[],i()}),this.channel.on(r.diff,t=>{let{onJoin:n,onLeave:r,onSync:i}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(t):(this.state=e.syncDiff(this.state,t,n,r),i())})}onJoin(e){this.caller.onJoin=e}onLeave(e){this.caller.onLeave=e}onSync(e){this.caller.onSync=e}list(t){return e.list(this.state,t)}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel.joinRef()}static syncState(e,t,n,r){let i=this.toNullProtoObj(this.clone(e));t=this.toNullProtoObj(t);let a=Object.create(null),o=Object.create(null);return this.map(i,(e,n)=>{t[e]||(o[e]=n)}),this.map(t,(e,t)=>{let n=i[e];if(n){let r=t.metas.map(e=>e.phx_ref),i=n.metas.map(e=>e.phx_ref),s=t.metas.filter(e=>i.indexOf(e.phx_ref)<0),c=n.metas.filter(e=>r.indexOf(e.phx_ref)<0);s.length>0&&(a[e]=t,a[e].metas=s),c.length>0&&(o[e]=this.clone(n),o[e].metas=c)}else a[e]=t}),this.syncDiff(i,{joins:a,leaves:o},n,r)}static syncDiff(e,t,n,r){e=this.toNullProtoObj(e);let{joins:i,leaves:a}=this.clone(t);return n||=function(){},r||=function(){},this.map(i,(t,r)=>{let i=e[t];if(e[t]=this.clone(r),i){let n=e[t].metas.map(e=>e.phx_ref),r=i.metas.filter(e=>n.indexOf(e.phx_ref)<0);e[t].metas.unshift(...r)}n(t,i,r)}),this.map(a,(t,n)=>{let i=e[t];if(!i)return;let a=n.metas.map(e=>e.phx_ref);i.metas=i.metas.filter(e=>a.indexOf(e.phx_ref)<0),r(t,i,n),i.metas.length===0&&delete e[t]}),e}static list(e,t){return t||=function(e,t){return t},this.map(e,(e,n)=>t(e,n))}static map(e,t){return Object.getOwnPropertyNames(e).map(n=>t(n,e[n]))}static toNullProtoObj(e){if(Object.getPrototypeOf(e)===null)return e;let t=Object.create(null);return Object.getOwnPropertyNames(e).forEach(n=>{t[n]=e[n]}),t}static clone(e){return JSON.parse(JSON.stringify(e))}},xn={HEADER_LENGTH:1,META_LENGTH:4,KINDS:{push:0,reply:1,broadcast:2},encode(e,t){if(e.payload.constructor===ArrayBuffer)return t(this.binaryEncode(e));{let n=[e.join_ref,e.ref,e.topic,e.event,e.payload];return t(JSON.stringify(n))}},decode(e,t){if(e.constructor===ArrayBuffer)return t(this.binaryDecode(e));{let[n,r,i,a,o]=JSON.parse(e);return t({join_ref:n,ref:r,topic:i,event:a,payload:o})}},binaryEncode(e){let{join_ref:t,ref:n,event:r,topic:i,payload:a}=e,o=new TextEncoder,s=o.encode(t),c=o.encode(n),l=o.encode(i),u=o.encode(r);this.assertFieldSize(s.byteLength,`join_ref`),this.assertFieldSize(c.byteLength,`ref`),this.assertFieldSize(l.byteLength,`topic`),this.assertFieldSize(u.byteLength,`event`);let d=this.META_LENGTH+s.byteLength+c.byteLength+l.byteLength+u.byteLength,f=new ArrayBuffer(this.HEADER_LENGTH+d),p=new Uint8Array(f),m=new DataView(f),h=0;m.setUint8(h++,this.KINDS.push),m.setUint8(h++,s.byteLength),m.setUint8(h++,c.byteLength),m.setUint8(h++,l.byteLength),m.setUint8(h++,u.byteLength),p.set(s,h),h+=s.byteLength,p.set(c,h),h+=c.byteLength,p.set(l,h),h+=l.byteLength,p.set(u,h),h+=u.byteLength;var g=new Uint8Array(f.byteLength+a.byteLength);return g.set(p,0),g.set(new Uint8Array(a),f.byteLength),g.buffer},assertFieldSize(e,t){if(e>255)throw Error(`unable to convert ${t} to binary: must be less than or equal to 255 bytes, but is ${e} bytes`)},binaryDecode(e){let t=new DataView(e),n=t.getUint8(0),r=new TextDecoder;switch(n){case this.KINDS.push:return this.decodePush(e,t,r);case this.KINDS.reply:return this.decodeReply(e,t,r);case this.KINDS.broadcast:return this.decodeBroadcast(e,t,r)}},decodePush(e,t,n){let r=t.getUint8(1),i=t.getUint8(2),a=t.getUint8(3),o=this.HEADER_LENGTH+this.META_LENGTH-1,s=n.decode(e.slice(o,o+r));o+=r;let c=n.decode(e.slice(o,o+i));o+=i;let l=n.decode(e.slice(o,o+a));return o+=a,{join_ref:s,ref:null,topic:c,event:l,payload:e.slice(o,e.byteLength)}},decodeReply(e,t,n){let r=t.getUint8(1),i=t.getUint8(2),a=t.getUint8(3),o=t.getUint8(4),s=this.HEADER_LENGTH+this.META_LENGTH,c=n.decode(e.slice(s,s+r));s+=r;let l=n.decode(e.slice(s,s+i));s+=i;let u=n.decode(e.slice(s,s+a));s+=a;let d=n.decode(e.slice(s,s+o));s+=o;let f={status:d,response:e.slice(s,e.byteLength)};return{join_ref:c,ref:l,topic:u,event:un.reply,payload:f}},decodeBroadcast(e,t,n){let r=t.getUint8(1),i=t.getUint8(2),a=this.HEADER_LENGTH+2,o=n.decode(e.slice(a,a+r));a+=r;let s=n.decode(e.slice(a,a+i));return a+=i,{join_ref:null,ref:null,topic:o,event:s,payload:e.slice(a,e.byteLength)}}},Sn=class{constructor(e,t={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.fallbackRef=null,this.timeout=t.timeout||an,this.transport=t.transport||nn.WebSocket||yn,this.conn=void 0,this.primaryPassedHealthCheck=!1,this.longPollFallbackMs=t.longPollFallbackMs,this.fallbackTimer=null;let n=null;try{n=nn&&nn.sessionStorage}catch{}this.sessionStore=t.sessionStorage||n,this.establishedConnections=0,this.defaultEncoder=xn.encode.bind(xn),this.defaultDecoder=xn.decode.bind(xn),this.closeWasClean=!0,this.disconnecting=!1,this.binaryType=t.binaryType||`arraybuffer`,this.connectClock=1,this.pageHidden=!1,this.encode=void 0,this.decode=void 0,this.transport===yn?(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder):(this.encode=t.encode||this.defaultEncoder,this.decode=t.decode||this.defaultDecoder);let r=null;tn&&tn.addEventListener&&(tn.addEventListener(`pagehide`,e=>{this.conn&&(this.disconnect(),r=this.connectClock)}),tn.addEventListener(`pageshow`,e=>{r===this.connectClock&&(r=null,this.connect())}),tn.addEventListener(`visibilitychange`,()=>{document.visibilityState===`hidden`?this.pageHidden=!0:(this.pageHidden=!1,!this.isConnected()&&!this.closeWasClean&&this.teardown(()=>this.connect()))})),this.heartbeatIntervalMs=t.heartbeatIntervalMs||3e4,this.autoSendHeartbeat=t.autoSendHeartbeat??!0,this.heartbeatCallback=t.heartbeatCallback??(()=>{}),this.rejoinAfterMs=e=>t.rejoinAfterMs?t.rejoinAfterMs(e):[1e3,2e3,5e3][e-1]||1e4,this.reconnectAfterMs=e=>t.reconnectAfterMs?t.reconnectAfterMs(e):[10,50,100,150,200,250,500,1e3,2e3][e-1]||5e3,this.logger=t.logger||null,!this.logger&&t.debug&&(this.logger=(e,t,n)=>{console.log(`${e}: ${t}`,n)}),this.longpollerTimeout=t.longpollerTimeout||2e4,this.params=$t(t.params||{}),this.endPoint=`${e}/${dn.websocket}`,this.vsn=t.vsn||rn,this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.heartbeatSentAt=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new hn(()=>{if(this.pageHidden){this.log(`Not reconnecting as page is hidden!`),this.teardown();return}this.teardown(async()=>{t.beforeReconnect&&await t.beforeReconnect(),this.connect()})},this.reconnectAfterMs),this.authToken=t.authToken&&$t(t.authToken)}getLongPollTransport(){return yn}replaceTransport(e){this.connectClock++,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.conn&&=(this.conn.close(),null),this.transport=e}protocol(){return location.protocol.match(/^https/)?`wss`:`ws`}endPointURL(){let e=_n.appendParams(_n.appendParams(this.endPoint,this.params()),{vsn:this.vsn});return e.charAt(0)===`/`?e.charAt(1)===`/`?`${this.protocol()}:${e}`:`${this.protocol()}://${location.host}${e}`:e}disconnect(e,t,n){this.connectClock++,this.disconnecting=!0,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.teardown(()=>{this.disconnecting=!1,e&&e()},t,n)}connect(e){e&&(console&&console.log(`passing params to connect is deprecated. Instead pass :params to the Socket constructor`),this.params=$t(e)),!(this.conn&&!this.disconnecting)&&(this.longPollFallbackMs&&this.transport!==yn?this.connectWithF
vendor: 4,375 bytes, line 2
2allback(yn,this.longPollFallbackMs):this.transportConnect())}log(e,t,n){this.logger&&this.logger(e,t,n)}hasLogger(){return this.logger!==null}onOpen(e){let t=this.makeRef();return this.stateChangeCallbacks.open.push([t,e]),t}onClose(e){let t=this.makeRef();return this.stateChangeCallbacks.close.push([t,e]),t}onError(e){let t=this.makeRef();return this.stateChangeCallbacks.error.push([t,e]),t}onMessage(e){let t=this.makeRef();return this.stateChangeCallbacks.message.push([t,e]),t}onHeartbeat(e){this.heartbeatCallback=e}ping(e){if(!this.isConnected())return!1;let t=this.makeRef(),n=Date.now();this.push({topic:`phoenix`,event:`heartbeat`,payload:{},ref:t});let r=this.onMessage(i=>{i.ref===t&&(this.off([r]),e(Date.now()-n))});return!0}transportName(e){switch(e){case yn:return`LongPoll`;default:return e.name}}transportConnect(){this.connectClock++,this.closeWasClean=!1;let e;this.authToken&&(e=[`phoenix`,`${pn}${btoa(this.authToken()).replace(/=/g,``)}`]),this.conn=new this.transport(this.endPointURL(),e),this.conn.binaryType=this.binaryType,this.conn.timeout=this.longpollerTimeout,this.conn.onopen=()=>this.onConnOpen(),this.conn.onerror=e=>this.onConnError(e),this.conn.onmessage=e=>this.onConnMessage(e),this.conn.onclose=e=>this.onConnClose(e)}getSession(e){return this.sessionStore&&this.sessionStore.getItem(e)}storeSession(e,t){this.sessionStore&&this.sessionStore.setItem(e,t)}connectWithFallback(e,t=2500){clearTimeout(this.fallbackTimer);let n=!1,r=!0,i,a,o=this.transportName(e),s=t=>{this.log(`transport`,`falling back to ${o}...`,t),this.off([i,a]),r=!1,this.replaceTransport(e),this.transportConnect()};if(this.getSession(`phx:fallback:${o}`))return s(`memorized`);this.fallbackTimer=setTimeout(s,t),a=this.onError(e=>{this.log(`transport`,`error`,e),r&&!n&&(clearTimeout(this.fallbackTimer),s(e))}),this.fallbackRef&&this.off([this.fallbackRef]),this.fallbackRef=this.onOpen(()=>{if(n=!0,!r){let t=this.transportName(e);return this.primaryPassedHealthCheck||this.storeSession(`phx:fallback:${t}`,`true`),this.log(`transport`,`established ${t} fallback`)}clearTimeout(this.fallbackTimer),this.fallbackTimer=setTimeout(s,t),this.ping(e=>{this.log(`transport`,`connected to primary after`,e),this.primaryPassedHealthCheck=!0,clearTimeout(this.fallbackTimer)})}),this.transportConnect()}clearHeartbeats(){clearTimeout(this.heartbeatTimer),clearTimeout(this.heartbeatTimeoutTimer)}onConnOpen(){this.hasLogger()&&this.log(`transport`,`connected to ${this.endPointURL()}`),this.closeWasClean=!1,this.disconnecting=!1,this.establishedConnections++,this.flushSendBuffer(),this.reconnectTimer.reset(),this.autoSendHeartbeat&&this.resetHeartbeat(),this.triggerStateCallbacks(`open`)}heartbeatTimeout(){if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.hasLogger()&&this.log(`transport`,`heartbeat timeout. Attempting to re-establish connection`);try{this.heartbeatCallback(`timeout`)}catch(e){this.log(`error`,`error in heartbeat callback`,e)}this.triggerChanError(Error(`heartbeat timeout`)),this.closeWasClean=!1,this.teardown(()=>this.reconnectTimer.scheduleTimeout(),on,`heartbeat timeout`)}}resetHeartbeat(){this.conn&&this.conn.skipHeartbeat||(this.pendingHeartbeatRef=null,this.clearHeartbeats(),this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}teardown(e,t,n){if(!this.conn)return e&&e();let r=this.conn;this.waitForBufferDone(r,()=>{t?r.close(t,n||``):r.close(),this.waitForSocketClosed(r,()=>{this.conn===r&&(this.conn.onopen=function(){},this.conn.onerror=function(){},this.conn.onmessage=function(){},this.conn.onclose=function(){},this.conn=null),e&&e()})})}waitForBufferDone(e,t,n=1){if(n===5||!e.bufferedAmount){t();return}setTimeout(()=>{this.waitForBufferDone(e,t,n+1)},150*n)}waitForSocketClosed(e,t,n=1){if(n===5||e.readyState===cn.closed){t();return}setTimeout(()=>{this.waitForSocketClosed(e,t,n+1)},150*n)}onConnClose(e){this.conn&&(this.conn.onclose=()=>{}),this.hasLogger()&&this.log(`transport`,`close`,e),this.triggerChanError(e),this.clearHeartbeats(),this.closeWasClean||this.reconnectTimer.scheduleTimeout(),this.triggerStateCallbacks(`close`,e)}onConnError(e){this.hasLogger()&&this.log(`transport`,`error`,e);let t=this.transport,n=this.establishedConnections;this.triggerStateCallbacks(`error`,e,t,n),(t===this.transport||n>0)&&this.triggerChanError(e)}
vendor: 11,846 bytes, line 2
2triggerChanError(e){this.channels.forEach(t=>{t.isErrored()||t.isLeaving()||t.isClosed()||t.trigger(un.error,e)})}connectionState(){switch(this.conn&&this.conn.readyState){case cn.connecting:return`connecting`;case cn.open:return`open`;case cn.closing:return`closing`;default:return`closed`}}isConnected(){return this.connectionState()===`open`}remove(e){this.off(e.stateChangeRefs),this.channels=this.channels.filter(t=>t!==e)}off(e){for(let t in this.stateChangeCallbacks)this.stateChangeCallbacks[t]=this.stateChangeCallbacks[t].filter(([t])=>e.indexOf(t)===-1)}channel(e,t={}){let n=new gn(e,t,this);return this.channels.push(n),n}push(e){if(this.hasLogger()){let{topic:t,event:n,payload:r,ref:i,join_ref:a}=e;this.log(`push`,`${t} ${n} (${a}, ${i})`,r)}this.isConnected()?this.encode(e,e=>this.conn.send(e)):this.sendBuffer.push(()=>this.encode(e,e=>this.conn.send(e)))}makeRef(){let e=this.ref+1;return this.ref=e===this.ref?0:e,this.ref.toString()}sendHeartbeat(){if(!this.isConnected()){try{this.heartbeatCallback(`disconnected`)}catch(e){this.log(`error`,`error in heartbeat callback`,e)}return}if(this.pendingHeartbeatRef){this.heartbeatTimeout();return}this.pendingHeartbeatRef=this.makeRef(),this.heartbeatSentAt=Date.now(),this.push({topic:`phoenix`,event:`heartbeat`,payload:{},ref:this.pendingHeartbeatRef});try{this.heartbeatCallback(`sent`)}catch(e){this.log(`error`,`error in heartbeat callback`,e)}this.heartbeatTimeoutTimer=setTimeout(()=>this.heartbeatTimeout(),this.heartbeatIntervalMs)}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(e=>e()),this.sendBuffer=[])}onConnMessage(e){this.decode(e.data,e=>{let{topic:t,event:n,payload:r,ref:i,join_ref:a}=e;if(i&&i===this.pendingHeartbeatRef){let e=this.heartbeatSentAt?Date.now()-this.heartbeatSentAt:void 0;this.clearHeartbeats();try{this.heartbeatCallback(r.status===`ok`?`ok`:`error`,e)}catch(e){this.log(`error`,`error in heartbeat callback`,e)}this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.autoSendHeartbeat&&(this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}this.hasLogger()&&this.log(`receive`,`${r.status||``} ${t} ${n} ${i&&`(`+i+`)`||``}`.trim(),r);for(let e=0;e<this.channels.length;e++){let o=this.channels[e];o.isMember(t,n,r,a)&&o.trigger(n,r,i,a)}this.triggerStateCallbacks(`message`,e)})}triggerStateCallbacks(e,...t){try{this.stateChangeCallbacks[e].forEach(([n,r])=>{try{r(...t)}catch(t){this.log(`error`,`error in ${e} callback`,t)}})}catch(t){this.log(`error`,`error triggering ${e} callbacks`,t)}}leaveOpenTopic(e){let t=this.channels.find(t=>t.topic===e&&(t.isJoined()||t.isJoining()));t&&(this.hasLogger()&&this.log(`transport`,`leaving duplicate topic "${e}"`),t.leave())}},Cn=class e{constructor(t,n){let r=En(n);this.presence=new bn(t.getChannel(),r),this.presence.onJoin((n,r,i)=>{let a=e.onJoinPayload(n,r,i);t.getChannel().trigger(`presence`,a)}),this.presence.onLeave((n,r,i)=>{let a=e.onLeavePayload(n,r,i);t.getChannel().trigger(`presence`,a)}),this.presence.onSync(()=>{t.getChannel().trigger(`presence`,{event:`sync`})})}get state(){return e.transformState(this.presence.state)}static transformState(e){return e=Tn(e),Object.getOwnPropertyNames(e).reduce((t,n)=>{let r=e[n];return t[n]=wn(r),t},{})}static onJoinPayload(e,t,n){return{event:`join`,key:e,currentPresences:Dn(t),newPresences:wn(n)}}static onLeavePayload(e,t,n){return{event:`leave`,key:e,currentPresences:Dn(t),leftPresences:wn(n)}}};function wn(e){return e.metas.map(e=>{let t=Object.getOwnPropertyDescriptors(e),n=Object.defineProperties({},t);return n.presence_ref=n.phx_ref,delete n.phx_ref,delete n.phx_ref_prev,n})}function Tn(e){return JSON.parse(JSON.stringify(e))}function En(e){return e?.events&&{events:e.events}}function Dn(e){return e?.metas?wn(e):[]}var On;(function(e){e.SYNC=`sync`,e.JOIN=`join`,e.LEAVE=`leave`})(On||={});var kn=class{get state(){return this.presenceAdapter.state}constructor(e,t){this.channel=e,this.presenceAdapter=new Cn(this.channel.channelAdapter,t)}};function An(e){if(e instanceof Error)return e;if(typeof e==`string`)return Error(e);if(e&&typeof e==`object`){let t=e;if(typeof t.code==`number`){let n=typeof t.reason==`string`&&t.reason?` (${t.reason})`:``;return Error(`socket closed: ${t.code}${n}`,{cause:e})}return Error(`channel error: transport failure`,{cause:e})}return Error(`channel error: connection lost`)}var jn=class{constructor(e,t,n){let r=Mn(n);this.channel=e.getSocket().channel(t,r),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,t){return this.channel.on(e,t)}off(e,t){this.channel.off(e,t)}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,t,n){let r;try{r=this.channel.push(e,t,n)}catch{throw Error(`tried to push '${e}' to '${this.channel.topic}' before joining. Use channel.subscribe() before pushing events`)}if(this.channel.pushBuffer.length>100){let e=this.channel.pushBuffer.shift();e.cancelTimeout(),this.socket.log(`channel`,`discarded push due to buffer overflow: ${e.event}`,e.payload())}return r}updateJoinPayload(e){let t=this.channel.joinPush.payload();this.channel.joinPush.payload=()=>Object.assign(Object.assign({},t),e)}canPush(){return this.socket.isConnected()&&this.state===zt.joined}isJoined(){return this.state===zt.joined}isJoining(){return this.state===zt.joining}isClosed(){return this.state===zt.closed}isLeaving(){return this.state===zt.leaving}updateFilterBindings(e){this.channel.filterBindings=e}updatePayloadTransform(e){this.channel.onMessage=e}getChannel(){return this.channel}};function Mn(e){return{config:Object.assign({broadcast:{ack:!1,self:!1},presence:{key:``,enabled:!1},private:!1},e.config)}}var Nn=/[,()"\\]/,Pn=e=>Nn.test(e)||e!==e.trim(),Fn=e=>`"${e.replace(/\\/g,`\\\\`).replace(/"/g,`\\"`)}"`,In=e=>{let t=e===null?`null`:String(e);return Pn(t)?Fn(t):t},Ln=e=>e===null?`null`:String(e),Rn=(e,t)=>{if(e===`in`){let e=Array.isArray(t)?t:[t];if(e.length===0)throw Error("Realtime `in` filter requires at least one value.");return`in.(${Array.from(new Set(e)).map(e=>In(e)).join(`,`)})`}return e===`is`?`is.${Ln(t)}`:`${e}.${In(t)}`},zn=class{constructor(){this.filters=[]}add(e,t,n,r=!1){let i=r?`not.`:``;return this.filters.push(`${e}=${i}${Rn(t,n)}`),this}eq(e,t){return this.add(e,`eq`,t)}neq(e,t){return this.add(e,`neq`,t)}gt(e,t){return this.add(e,`gt`,t)}gte(e,t){return this.add(e,`gte`,t)}lt(e,t){return this.add(e,`lt`,t)}lte(e,t){return this.add(e,`lte`,t)}in(e,t){return this.add(e,`in`,t)}like(e,t){return this.add(e,`like`,t)}ilike(e,t){return this.add(e,`ilike`,t)}match(e,t){return this.add(e,`match`,t)}imatch(e,t){return this.add(e,`imatch`,t)}is(e,t){return this.add(e,`is`,t)}isDistinct(e,t){return this.add(e,`isdistinct`,t)}not(e,t,n){return this.add(e,t,n,!0)}build(){return this.filters.join(`,`)}toString(){return this.build()}},Bn;(function(e){e.ALL=`*`,e.INSERT=`INSERT`,e.UPDATE=`UPDATE`,e.DELETE=`DELETE`})(Bn||={});var Vn;(function(e){e.BROADCAST=`broadcast`,e.PRESENCE=`presence`,e.POSTGRES_CHANGES=`postgres_changes`,e.SYSTEM=`system`})(Vn||={});var Hn;(function(e){e.SUBSCRIBED=`SUBSCRIBED`,e.TIMED_OUT=`TIMED_OUT`,e.CLOSED=`CLOSED`,e.CHANNEL_ERROR=`CHANNEL_ERROR`})(Hn||={});var Un=class e{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,t={config:{}},n){if(this.topic=e,this.params=t,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},t.config),this.channelAdapter=new jn(this.socket.socketAdapter,e,this.params),this.presence=new kn(this),this._onClose(()=>{this.socket._remove(this)}),this._updateFilterTransform(),this.broadcastEndpointURL=Qt(this.socket.socketAdapter.endPointURL()),this.private=this.params.config.private||!1,!this.private&&this.params.config?.broadcast?.replay)throw Error(`tried to use replay on public channel '${this.topic}'. It must be a private channel.`)}subscribe(e,t=this.timeout){if(this.socket.isConnected()||this.socket.connect(),this.channelAdapter.isClosed()){let{config:{broadcast:n,presence:r,private:i,postgres_changes_options:a}}=this.params,o=this.bindings.postgres_changes?.map(e=>e.filter)??[],s=!!this.bindings[Vn.PRESENCE]&&this.bindings[Vn.PRESENCE].length>0||this.params.config.presence?.enabled===!0,c={},l=Object.assign({broadcast:n,presence:Object.assign(Object.assign({},r),{enabled:s}),postgres_changes:o,private:i},a?{postgres_changes_options:a}:{});this.socket.accessTokenValue&&(c.access_token=this.socket.accessTokenValue),this._onError(t=>{e?.(Hn.CHANNEL_ERROR,An(t))}),this._onClose(()=>e?.(Hn.CLOSED)),this.updateJoinPayload(Object.assign({config:l},c)),this._updateFilterMessage();let u=a?.wait&&o.length>0?Math.max(t,(a.timeout??Lt)+Rt):t;this.channelAdapter.subscribe(u).receive(`ok`,async({postgres_changes:t})=>{if(this.socket._isManualToken()||this.socket.setAuth(),t===void 0){e?.(Hn.SUBSCRIBED);return}this._updatePostgresBindings(t,e)}).receive(`error`,t=>{this.state=zt.errored;let n=Object.values(t).join(`, `)||`error`;e?.(Hn.CHANNEL_ERROR,Error(n,{cause:t}))}).receive(`timeout`,()=>{e?.(Hn.TIMED_OUT)})}return this}_updatePostgresBindings(t,n){let r=this.bindings.postgres_changes,i=r?.length??0,a=[];for(let o=0;o<i;o++){let i=r[o],{filter:{event:s,schema:c,table:l,filter:u}}=i,d=t&&t[o];if(d&&d.event===s&&e.isFilterValueEqual(d.schema,c)&&e.isFilterValueEqual(d.table,l)&&e.isFilterValueEqual(d.filter,u))a.push(Object.assign(Object.assign({},i),{id:d.id}));else{this.unsubscribe(),this.state=zt.errored,n?.(Hn.CHANNEL_ERROR,Error(`mismatch between server and client bindings for postgres changes`));return}}this.bindings.postgres_changes=a,this.state!=zt.errored&&n&&n(Hn.SUBSCRIBED)}presenceState(){return this.presence.state}async track(e,t={}){return await this.send({type:`presence`,event:`track`,payload:e},t)}async untrack(e={}){return await this.send({type:`presence`,event:`untrack`},e)}on(e,t,n){let r=this.channelAdapter.isJoined()||this.channelAdapter.isJoining(),i=e===Vn.PRESENCE||e===Vn.POSTGRES_CHANGES;if(r&&i)throw this.socket.log(`channel`,`cannot add \`${e}\` callbacks for ${this.topic} after \`subscribe()\`.`),Error(`cannot add \`${e}\` callbacks for ${this.topic} after \`subscribe()\`.`);return this._on(e,t,n)}async httpSend(e,t,n={}){if(t==null)return Promise.reject(Error(`Payload is required for httpSend()`));let r=t instanceof ArrayBuffer||ArrayBuffer.isView(t),i={apikey:this.socket.apiKey?this.socket.apiKey:``,"Content-Type":r?`application/octet-stream`:`application/json`};this.socket.accessTokenValue&&(i.Authorization=`Bearer ${this.socket.accessTokenValue}`);let a=new URL(this.broadcastEndpointURL);a.pathname+=`/${encodeURIComponent(this.subTopic)}/events/${encodeURIComponent(e)}`,this.private&&a.searchParams.set(`private`,`true`);let o={method:`POST`,headers:i,body:r?t:JSON.stringify(t)},s=await this._fetchWithTimeout(a.toString(),o,n.timeout??this.timeout);if(s.status===202)return{success:!0};if(s.status===404)return Promise.reject(Error(`httpSend() requires Realtime server v2.97.0 or newer; the endpoint returned 404. Update your Supabase CLI to a recent version, or upgrade the Realtime server in your self-hosted setup. See https://github.com/supabase/supabase-js/blob/master/packages/core/realt
2ime-js/migrations/httpsend-server-version.md`));let c=s.statusText;try{let e=await s.json();c=e.error||e.message||c}catch{}return Promise.reject(Error(c))}async send(e,t={}){if(!this.channelAdapter.canPush()&&e.type===`broadcast`){let n=`Realtime send() is automatically falling back to REST API. This behavior will be deprecated in the future. Please use httpSend() explicitly for REST delivery.`;this.socket.hasLogger()?this.socket.log(`channel`,n):console.warn(n);let{event:r,payload:i}=e,a={apikey:this.socket.apiKey?this.socket.apiKey:``,"Content-Type":`application/json`};this.socket.accessTokenValue&&(a.Authorization=`Bearer ${this.socket.accessTokenValue}`);let o={method:`POST`,headers:a,body:JSON.stringify({messages:[{topic:this.subTopic,event:r,payload:i,private:this.private}]})};try{let e=await this._fetchWithTimeout(this.broadcastEndpointURL,o,t.timeout??this.timeout);return await e.body?.cancel(),e.ok?`ok`:`error`}catch(e){return e instanceof Error&&e.name===`AbortError`?`timed out`:`error`}}return new Promise(n=>{let r=this.channelAdapter.push(e.type,e,t.timeout||this.timeout);e.type===`broadcast`&&!this.params?.config?.broadcast?.ack&&n(`ok`),r.receive(`ok`,()=>n(`ok`)),r.receive(`error`,()=>n(`error`)),r.receive(`timeout`,()=>n(`timed out`))})}updateJoinPayload(e){this.channelAdapter.updateJoinPayload(e)}async unsubscribe(e=this.timeout){return new Promise(t=>{this.channelAdapter.unsubscribe(e).receive(`ok`,()=>t(`ok`)).receive(`timeout`,()=>t(`timed out`)).receive(`error`,()=>t(`error`))})}teardown(){this.channelAdapter.teardown()}async _fetchWithTimeout(e,t,n){let r=new AbortController,i=setTimeout(()=>r.abort(),n),a=await this.socket.fetch(e,Object.assign(Object.assign({},t),{signal:r.signal}));return clearTimeout(i),a}_on(t,n,r){let i=t.toLocaleLowerCase(),a=n?.filter;if((a instanceof zn||typeof a==`object`&&a&&typeof a.build==`function`)&&(n=Object.assign(Object.assign({},n),{filter:a.build()})),i===Vn.POSTGRES_CHANGES&&this.bindings[i]?.find(t=>e.isSamePostgresFilter(t.filter,n)))return this.socket.log(`error`,`duplicate \`postgres_changes\` binding for ${this.topic} ignored`,n),this;let o=this.channelAdapter.on(t,r),s={type:i,filter:n,callback:r,ref:o};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,t,n)=>{let r=e.event.toLocaleLowerCase();if(this._notThisChannelEvent(r,n))return!1;let i=this.bindings[r]?.find(t=>t.ref===e.ref);if(!i)return!0;if([`broadcast`,`presence`,`postgres_changes`].includes(r))if(`id`in i){let e=i.id,n=i.filter?.event;return e&&t.ids?.includes(e)&&(n===`*`||n?.toLocaleLowerCase()===t.data?.type.toLocaleLowerCase())}else{let e=(i?.filter?.event)?.toLocaleLowerCase();return e===`*`||e===(t?.event)?.toLocaleLowerCase()}return i.type.toLocaleLowerCase()===r})}_notThisChannelEvent(e,t){let{close:n,error:r,leave:i,join:a}=Bt;return t&&[n,r,i,a].includes(e)&&t!==this.joinPush.ref}_updateFilterTransform(){this.channelAdapter.updatePayloadTransform((e,t,n)=>{if(typeof t==`object`&&`ids`in t){let e=t.data,{schema:n,table:r,commit_timestamp:i,type:a,errors:o}=e;return Object.assign(Object.assign({},{schema:n,table:r,commit_timestamp:i,eventType:a,new:{},old:{},errors:o}),this._getPayloadRecords(e))}return t})}copyBindings(e){if(this.joinedOnce)throw Error(`cannot copy bindings into joined channel`);for(let t in e.bindings)for(let n of e.bindings[t])this._on(n.type,n.filter,n.callback)}static isFilterValueEqual(e,t){return(e??void 0)===(t??void 0)}static isSamePostgresFilter(t,n){let r=(t?.select)?.join()??void 0,i=(n?.select)?.join()??void 0;return t?.event===n?.event&&e.isFilterValueEqual(t?.schema,n?.schema)&&e.isFilterValueEqual(t?.table,n?.table)&&e.isFilterValueEqual(t?.filter,n?.filter)&&r===i}_getPayloadRecords(e){let t={new:{},old:{}};return(e.type===`INSERT`||e.type===`UPDATE`)&&(t.new=Ut(e.columns,e.record)),(e.type===`UPDATE`||e.type===`DELETE`)&&(t.old=Ut(e.columns,e.old_record)),t}},Wn=class{constructor(e,t){this.socket=new Sn(e,t)}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,t,n,r=1e4){return new Promise(i=>{setTimeout(()=>i(`timeout`),r),this.socket.disconnect(()=>{e(),i(`ok`)},t,n)})}push(e){this.socket.push(e)}log(e,t,n){this.socket.log(e,t,n)}hasLogger(){return this.socket.hasLogger()}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()==Vt.connecting}isDisconnecting(){return this.socket.connectionState()==Vt.closing}connectionState(){return this.socket.connectionState()}endPointURL(){return this.socket.endPointURL()}sendHeartbeat(){this.socket.sendHeartbeat()}getSocket(){return this.socket}},Gn={HEARTBEAT_INTERVAL:25e3,RECONNECT_DELAY:10,HEARTBEAT_TIMEOUT_FALLBACK:100},Kn=[1e3,2e3,5e3,1e4],qn=1e4;function Jn(){let e=new Map;return{get length(){return e.size},clear(){e.clear()},getItem(t){return e.has(t)?e.get(t):null},key(t){return Array.from(e.keys())[t]??null},removeItem(t){e.delete(t)},setItem(t,n){e.set(t,String(n))}}}function Yn(){try{if(typeof globalThis<`u`&&globalThis.sessionStorage)return globalThis.sessionStorage}catch{}return Jn()}var Xn=`
3  addEventListener("message", (e) => {
4    if (e.data.event === "start") {
5      setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval);
6    }
7  });`,Zn=class{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,t){if(this.channels=[],this.accessTokenValue=null,this.accessToken=null,this.apiKey=null,this.httpEndpoint=``,this.headers={},this.params={}
7,this.ref=0,this.serializer=new Ht,this._manuallySetToken=!1,this._authPromise=null,this._authGeneration=0,this._workerHeartbeatTimer=void 0,this._pendingWorkerHeartbeatRef=null,this._pendingDisconnectTimer=null,this._disconnectOnEmptyChannelsAfterMs=0,this._resolveFetch=e=>e?(...t)=>e(...t):(...e)=>fetch(...e),!t?.params?.apikey)throw Error(`API key is required to connect to Realtime`);this.apiKey=t.params.apikey;let n=this._initializeOptions(t);this.socketAdapter=new Wn(e,n),this.httpEndpoint=Qt(e),this.fetch=this._resolveFetch(t?.fetch)}connect(){if(!(this.isConnecting()||this.isDisconnecting()||this.isConnected())){this.accessToken&&!this._authPromise&&this._setAuthSafely(`connect`),this._setupConnectionHandlers();try{this.socketAdapter.connect()}catch(e){let t=e.message;throw Error(`WebSocket not available: ${t}`)}this._handleNodeJsRaceCondition()}}endpointURL(){return this.socketAdapter.endPointURL()}async disconnect(e,t){return this._cancelPendingDisconnect(),this.isDisconnecting()?`ok`:await this.socketAdapter.disconnect(()=>{clearInterval(this._workerHeartbeatTimer),this._terminateWorker()},e,t)}getChannels(){return this.channels}async removeChannel(e){let t=await e.unsubscribe();return t===`ok`&&e.teardown(),t}async removeAllChannels(){let e=this.channels.map(async e=>{let t=await e.unsubscribe();return e.teardown(),t}),t=await Promise.all(e);return await this.disconnect(),t}log(e,t,n){this.socketAdapter.log(e,t,n)}hasLogger(){return this.socketAdapter.hasLogger()}connectionState(){return this.socketAdapter.connectionState()||Vt.closed}isConnected(){return this.socketAdapter.isConnected()}isConnecting(){return this.socketAdapter.isConnecting()}isDisconnecting(){return this.socketAdapter.isDisconnecting()}channel(e,t={config:{}}){let n=`realtime:${e}`,r=this.getChannels().find(e=>e.topic===n);if(r)return r;{let n=new Un(`realtime:${e}`,t,this);return this._cancelPendingDisconnect(),this.channels.push(n),n}}push(e){this.socketAdapter.push(e)}async setAuth(e=null){let t=++this._authGeneration,n=this._performAuth(e,t);t===this._authGeneration&&(this._authPromise=n);try{await n}finally{this._authPromise===n&&(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(t=>t.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}
7this._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,t){let n,r=!1;if(e)n=e,r=!0;else if(this.accessToken)try{n=await this.accessToken()}catch(e){this.log(`error`,`Error fetching access token from callback`,e),n=this.accessTokenValue}else n=this.accessTokenValue;t===this._authGeneration&&(this.accessToken?this._manuallySetToken=!1:r&&(this._manuallySetToken=!0),this.accessTokenValue!=n&&(this.accessTokenValue=n,this.channels.forEach(e=>{let t={access_token:n,version:Mt};e.updateJoinPayload(t),e.joinedOnce&&e.channelAdapter.isJoined()&&e.channelAdapter.push(Bt.access_token,{access_token:n})})))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(e=`general`){this._isManualToken()||this.setAuth().catch(t=>{this.log(`error`,`Error setting auth in ${e}`,t)})}_setupConnectionHandlers(){this.socketAdapter.onOpen(()=>{(this._authPromise||(this.accessToken&&!this.accessTokenValue?this.setAuth():Promise.resolve())).catch(e=>{this.log(`error`,`error waiting for auth on connect`,e)}),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(t,n)=>{t!==`disconnected`&&(t==`sent`&&this._setAuthSafely(),e&&e(t,n))}}_startWorkerHeartbeat(){this.workerUrl?this.log(`worker`,`starting worker for from ${this.workerUrl}`):this.log(`worker`,`starting default worker`);let e=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(e),this.workerRef.onerror=e=>{this.log(`worker`,`worker error`,e.message),this._terminateWorker(),this.disconnect()},this.workerRef.onmessage=e=>{e.data.event===`keepAlive`&&this.sendHeartbeat()},this.workerRef.postMessage({event:`start`,interval:this.heartbeatIntervalMs})}_terminateWorker(){this.workerRef&&=(this.log(`worker`,`terminating worker`),this.workerRef.terminate(),void 0)}_workerObjectUrl(e){let t;if(e)t=e;else{let e=new Blob([Xn],{type:`application/javascript`});t=URL.createObjectURL(e)}return t}_initializeOptions(e){this.worker=e?.worker??!1,this.accessToken=e?.accessToken??null;let t={};t.timeout=e?.timeout??It,t.heartbeatIntervalMs=e?.heartbeatIntervalMs??Gn.HEARTBEAT_INTERVAL,this._disconnectOnEmptyChannelsAfterMs=e?.disconnectOnEmptyChannelsAfterMs??2*(e?.heartbeatIntervalMs??Gn.HEARTBEAT_INTERVAL),t.transport=e?.transport??jt.getWebSocketConstructor(),t.params=e?.params,t.logger=e?.logger,t.heartbeatCallback=this._wrapHeartbeatCallback(e?.heartbeatCallback),t.sessionStorage=e?.sessionStorage??Yn(),t.reconnectAfterMs=e?.reconnectAfterMs??(e=>Kn[e-1]||qn);let n,r,i=e?.vsn??Ft;switch(i){case Nt:n=(e,t)=>t(JSON.stringify(e)),r=(e,t)=>t(JSON.parse(e));break;case Pt:n=this.serializer.encode.bind(this.serializer),r=this.serializer.decode.bind(this.serializer);break;default:throw Error(`Unsupported serializer version: ${t.vsn}`)}if(t.vsn=i,t.encode=e?.encode??n,t.decode=e?.decode??r,t.beforeReconnect=this._reconnectAuth.bind(this),(e?.logLevel||e?.log_level)&&(this.logLevel=e.logLevel||e.log_level,t.params=Object.assign(Object.assign({},t.params),{log_level:this.logLevel})),this.worker){if(typeof window<`u`&&!window.Worker)throw Error(`Web Worker is not supported`);this.workerUrl=e?.workerUrl,t.autoSendHeartbeat=!this.worker}return t}async _reconnectAuth(){await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()}}
vendor: 4,836 bytes, line 7
7,Qn=class extends Error{constructor(e,t){super(e),this.name=`IcebergError`,this.status=t.status,this.icebergType=t.icebergType,this.icebergCode=t.icebergCode,this.details=t.details,this.isCommitStateUnknown=t.icebergType===`CommitStateUnknownException`||[500,502,504].includes(t.status)&&t.icebergType?.includes(`CommitState`)===!0}isNotFound(){return this.status===404}isConflict(){return this.status===409}isAuthenticationTimeout(){return this.status===419}};function $n(e,t,n){let r=new URL(t,e);if(n)for(let[e,t]of Object.entries(n))t!==void 0&&r.searchParams.set(e,t);return r.toString()}async function er(e){return!e||e.type===`none`?{}:e.type===`bearer`?{Authorization:`Bearer ${e.token}`}:e.type===`header`?{[e.name]:e.value}:e.type===`custom`?await e.getHeaders():{}}function tr(e){let t=e.fetchImpl??globalThis.fetch;return{async request({method:n,path:r,query:i,body:a,headers:o}){let s=$n(e.baseUrl,r,i),c=await er(e.auth),l=await t(s,{method:n,headers:{...a?{"Content-Type":`application/json`}:{},...c,...o},body:a?JSON.stringify(a):void 0}),u=await l.text(),d=(l.headers.get(`content-type`)||``).includes(`application/json`),f=d&&u?JSON.parse(u):u;if(!l.ok){let e=d?f:void 0,t=e?.error;throw new Qn(t?.message??`Request failed with status ${l.status}`,{status:l.status,icebergType:t?.type,icebergCode:t?.code,details:e})}return{status:l.status,headers:l.headers,data:f}}}}function nr(e){return e.join(`�`)}var rr=class{constructor(e,t=``){this.client=e,this.prefix=t}async listNamespaces(e){let t=e?{parent:nr(e.namespace)}:void 0;return(await this.client.request({method:`GET`,path:`${this.prefix}/namespaces`,query:t})).data.namespaces.map(e=>({namespace:e}))}async createNamespace(e,t){let n={namespace:e.namespace,properties:t?.properties};return(await this.client.request({method:`POST`,path:`${this.prefix}/namespaces`,body:n})).data}async dropNamespace(e){await this.client.request({method:`DELETE`,path:`${this.prefix}/namespaces/${nr(e.namespace)}`})}async loadNamespaceMetadata(e){return{properties:(await this.client.request({method:`GET`,path:`${this.prefix}/namespaces/${nr(e.namespace)}`})).data.properties}}async namespaceExists(e){try{return await this.client.request({method:`HEAD`,path:`${this.prefix}/namespaces/${nr(e.namespace)}`}),!0}catch(e){if(e instanceof Qn&&e.status===404)return!1;throw e}}async createNamespaceIfNotExists(e,t){try{return await this.createNamespace(e,t)}catch(e){if(e instanceof Qn&&e.status===409)return;throw e}}};function ir(e){return e.join(`�`)}var ar=class{constructor(e,t=``,n){this.client=e,this.prefix=t,this.accessDelegation=n}async listTables(e){return(await this.client.request({method:`GET`,path:`${this.prefix}/namespaces/${ir(e.namespace)}/tables`})).data.identifiers}async createTable(e,t){let n={};return this.accessDelegation&&(n[`X-Iceberg-Access-Delegation`]=this.accessDelegation),(await this.client.request({method:`POST`,path:`${this.prefix}/namespaces/${ir(e.namespace)}/tables`,body:t,headers:n})).data.metadata}async updateTable(e,t){let n=await this.client.request({method:`POST`,path:`${this.prefix}/namespaces/${ir(e.namespace)}/tables/${e.name}`,body:t});return{"metadata-location":n.data[`metadata-location`],metadata:n.data.metadata}}async dropTable(e,t){await this.client.request({method:`DELETE`,path:`${this.prefix}/namespaces/${ir(e.namespace)}/tables/${e.name}`,query:{purgeRequested:String(t?.purge??!1)}})}async loadTable(e){let t={};return this.accessDelegation&&(t[`X-Iceberg-Access-Delegation`]=this.accessDelegation),(await this.client.request({method:`GET`,path:`${this.prefix}/namespaces/${ir(e.namespace)}/tables/${e.name}`,headers:t})).data.metadata}async tableExists(e){let t={};this.accessDelegation&&(t[`X-Iceberg-Access-Delegation`]=this.accessDelegation);try{return await this.client.request({method:`HEAD`,path:`${this.prefix}/namespaces/${ir(e.namespace)}/tables/${e.name}`,headers:t}),!0}catch(e){if(e instanceof Qn&&e.status===404)return!1;throw e}}async createTableIfNotExists(e,t){try{return await this.createTable(e,t)}catch(n){if(n instanceof Qn&&n.status===409)return await this.loadTable({namespace:e.namespace,name:t.name});throw n}}},or=class{constructor(e){let t=`v1`;e.catalogName&&(t+=`/${e.catalogName}`);let n=e.baseUrl.endsWith(`/`)?e.baseUrl:`${e.baseUrl}/`;this.client=tr({baseUrl:n,auth:e.auth,fetchImpl:e.fetch}),this.accessDelegation=e.accessDelegation?.join(`,`),this.namespaceOps=new rr(this.client,t),this.tableOps=new ar(this.client,t,this.accessDelegation)}async listNamespaces(e){return this.namespaceOps.listNamespaces(e)}async createNamespace(e,t){return this.namespaceOps.createNamespace(e,t)}async dropNamespace(e){await this.namespaceOps.dropNamespace(e)}async loadNamespaceMetadata(e){return this.namespaceOps.loadNamespaceMetadata(e)}async listTables(e){return this.tableOps.listTables(e)}
7async createTable(e,t){return this.tableOps.createTable(e,t)}async updateTable(e,t){return this.tableOps.updateTable(e,t)}async dropTable(e,t){await this.tableOps.dropTable(e,t)}async loadTable(e){return this.tableOps.loadTable(e)}async namespaceExists(e){return this.namespaceOps.namespaceExists(e)}async tableExists(e){return this.tableOps.tableExists(e)}async createNamespaceIfNotExists(e,t){return this.namespaceOps.createNamespaceIfNotExists(e,t)}async createTableIfNotExists(e,t){return this.tableOps.createTableIfNotExists(e,t)}};function sr(e){"@babel/helpers - typeof";return sr=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},sr(e)}function cr(e,t){if(sr(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(sr(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function lr(e){var t=cr(e,`string`);return sr(t)==`symbol`?t:t+``}function ur(e,t,n){return(t=lr(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function dr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function F(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?dr(Object(n),!0).forEach(function(t){ur(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var fr=class extends Error{constructor(e,t=`storage`,n,r){super(e),this.__isStorageError=!0,this.namespace=t,this.name=t===`vectors`?`StorageVectorsError`:`StorageError`,this.status=n,this.statusCode=r}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}};function pr(e){return typeof e==`object`&&!!e&&`__isStorageError`in e}
7var mr=class extends fr{constructor(e,t,n,r=`storage`,i){super(e,r,t,n),this.name=r===`vectors`?`StorageVectorsApiError`:`StorageApiError`,this.status=t,this.statusCode=n,this.code=i}toJSON(){return F(F({},super.toJSON()),{},{code:this.code})}},hr=class extends fr{constructor(e,t,n=`storage`){super(e,n),this.name=n===`vectors`?`StorageVectorsUnknownError`:`StorageUnknownError`,this.originalError=t}};function gr(e,t,n){let r=F({},e),i=t.toLowerCase();for(let e of Object.keys(r))e.toLowerCase()===i&&delete r[e];return r[i]=n,r}function _r(e){let t={};for(let[n,r]of Object.entries(e))t[n.toLowerCase()]=r;return t}var vr=e=>e?(...t)=>e(...t):(...e)=>fetch(...e),yr=e=>{if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},br=e=>{if(Array.isArray(e))return e.map(e=>br(e));if(typeof e==`function`||e!==Object(e))return e;let t={};return Object.entries(e).forEach(([e,n])=>{let r=e.replace(/([-_][a-z])/gi,e=>e.toUpperCase().replace(/[-_]/g,``));t[r]=br(n)}),t},xr=e=>!e||typeof e!=`string`||e.length===0||e.length>100||e.trim()!==e||e.includes(`/`)||e.includes(`\\`)?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(e),Sr=e=>e.split(`/`).map(encodeURIComponent).join(`/`),Cr=e=>{if(typeof e==`object`&&e){let t=e;if(typeof t.msg==`string`)return t.msg;if(typeof t.message==`string`)return t.message;if(typeof t.error_description==`string`)return t.error_description;if(typeof t.error==`string`)return t.error;if(typeof t.error==`object`&&t.error!==null){let e=t.error;if(typeof e.message==`string`)return e.message}}return JSON.stringify(e)},wr=async(e,t,n,r)=>{if(typeof e==`object`&&e&&`json`in e&&typeof e.json==`function`){let n=e,i=parseInt(String(n.status),10);Number.isFinite(i)||(i=500),n.json().then(e=>{let n=e?.statusCode||e?.code||i+``;t(new mr(Cr(e),i,n,r,e?.code))}).catch(()=>{let e=i+``;t(new mr(n.statusText||`HTTP ${i} error`,i,e,r))})}else t(new hr(Cr(e),e,r))},Tr=(e,t,n,r)=>{let i={method:e,headers:t?.headers||{}};if(e===`GET`||e===`HEAD`||!r)return F(F({},i),n);if(yr(r)){let e=t?.headers||{},n;for(let[t,r]of Object.entries(e))t.toLowerCase()===`content-type`&&(n=r);i.headers=gr(e,`Content-Type`,n??`application/json`),i.body=JSON.stringify(r)}else i.body=r;return t?.duplex&&(i.duplex=t.duplex),F(F({},i),n)};async function Er(e,t,n,r,i,a,o){return new Promise((s,c)=>{e(n,Tr(t,r,i,a)).then(e=>{if(!e.ok)throw e;if(r?.noResolveJson)return e;if(o===`vectors`){let t=e.headers.get(`content-type`);if(e.headers.get(`content-length`)===`0`||e.status===204||!t||!t.includes(`application/json`))return{}}return e.json()}).then(e=>s(e)).catch(e=>wr(e,c,r,o))})}function Dr(e=`storage`){return{get:async(t,n,r,i)=>Er(t,`GET`,n,r,i,void 0,e),post:async(t,n,r,i,a)=>Er(t,`POST`,n,i,a,r,e),put:async(t,n,r,i,a)=>Er(t,`PUT`,n,i,a,r,e),head:async(t,n,r,i)=>Er(t,`HEAD`,n,F(F({},r),{},{noResolveJson:!0}),i,void 0,e),remove:async(t,n,r,i,a)=>Er(t,`DELETE`,n,i,a,r,e)}}var{get:Or,post:kr,put:Ar,head:jr,remove:Mr}=Dr(`storage`),Nr=Dr(`vectors`),Pr=class{constructor(e,t={},n,r=`storage`){this.shouldThrowOnError=!1,this.url=e,this.headers=_r(t),this.fetch=vr(n),this.namespace=r}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(e,t){return this.headers=gr(this.headers,e,t),this}async handleOperation(e){var t=this;try{return{data:await e(),error:null}}catch(e){if(t.shouldThrowOnError)throw e;if(pr(e))return{data:null,error:e};throw e}}},Fr=Symbol.toStringTag,Ir=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t,this[Fr]=`StreamDownloadBuilder`,this.promise=null}then(e,t){return this.getPromise().then(e,t)}catch(e){return this.getPromise().catch(e)}finally(e){return this.getPromise().finally(e)}getPromise(){return this.promise||=this.execute(),this.promise}async execute(){var e=this;try{return{data:(await e.downloadFn()).body,error:null}}catch(t){if(e.shouldThrowOnError)throw t;if(pr(t))return{data:null,error:t};throw t}}},Lr=Symbol.toStringTag,Rr=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t,this[Lr]=`BlobDownloadBuilder`,this.promise=null}asStream(){return new Ir(this.downloadFn,this.shouldThrowOnError)}then(e,t){return this.getPromise().then(e,t)}catch(e){return this.getPromise().catch(e)}finally(e){return this.getPromise().finally(e)}getPromise(){return this.promise||=this.execute(),this.promise}async execute(){var e=this;try{return{data:await(await e.downloadFn()).blob(),error:null}}catch(t){if(e.shouldThrowOnError)throw t;if(pr(t))return{data:null,error:t};throw t}}},zr={limit:100,offset:0,sortBy:{column:`name`,order:`asc`}},Br={cacheControl:`3600`,contentType:`text/plain;charset=UTF-8`,upsert:!1},Vr=class extends Pr{constructor(e,t={},n,r){super(e,t,r,`storage`),this.bucketId=n}async uploadOrUpdate(e,t,n,r){var i=this;return i.handleOperation(async()=>{let a,o=F(F({},Br),r),s=F(F({},i.headers),e===`POST`&&{"x-upsert":String(o.upsert)}),c=o.metadata;if(typeof Blob<`u`&&n instanceof Blob?(a=new FormData,a.append(`cacheControl`,o.cacheControl),c&&a.append(`metadata`,i.encodeMetadata(c)),a.append(``,n)):typeof FormData<`u`&&n instanceof FormData?(a=n,a.has(`cacheControl`)||a.append(`cacheControl`,o.cacheControl),c&&!a.has(`metadata`)&&a.append(`metadata`,i.encodeMetadata(c))):(a=n,s[`cache-control`]=`max-age=${o.cacheControl}`,s[`content-type`]=o.contentType,c&&(s[`x-metadata`]=i.toBase64(i.encodeMetadata(c))),(typeof ReadableStream<`u`&&a instanceof ReadableStream||a&&typeof a==`object`&&`pipe`in a&&typeof a.pipe==`function`)&&!o.duplex&&(o.duplex=`half`)),r?.headers)for(let[e,t]of Object.entries(r.headers))s=gr(s,e,t);let l=i._removeEmptyFolders(t),u=i._getFinalPath(l),d=await(e==`PUT`?Ar:kr)(i.fetch,`${i.url}/object/${u}`,a,F({headers:s},o?.duplex?{duplex:o.duplex}:{}));return{path:l,id:d.Id,fullPath:d.Key}})}async upload(e,t,n){return this.uploadOrUpdate(`POST`,e,t,n)}async uploadToSignedUrl(e,t,n,r){var i=this;let a=i._removeEmptyFolders(e),o=i._getFinalPath(a),s=new URL(i.url+`/object/upload/sign/${o}`);return s.searchParams.set(`token`,t),i.handleOperation(async()=>{let e,t=F(F({},Br),r),o=F(F({},i.headers),{"x-upsert":String(t.upsert)}),c=t.metadata;if(typeof Blob<`u`&&n instanceof Blob?(e=new FormData,e.append(`cacheControl`,t.cacheControl),c&&e.append(`metadata`,i.encodeMetadata(c)),e.append(``,n)):typeof FormData<`u`&&n instanceof FormData?(e=n,e.has(`cacheControl`)||e.append(`cacheControl`,t.cacheControl),c&&!e.has(`metadata`)&&e.a
7ppend(`metadata`,i.encodeMetadata(c))):(e=n,o[`cache-control`]=`max-age=${t.cacheControl}`,o[`content-type`]=t.contentType,c&&(o[`x-metadata`]=i.toBase64(i.encodeMetadata(c))),(typeof ReadableStream<`u`&&e instanceof ReadableStream||e&&typeof e==`object`&&`pipe`in e&&typeof e.pipe==`function`)&&!t.duplex&&(t.duplex=`half`)),r?.headers)for(let[e,t]of Object.entries(r.headers))o=gr(o,e,t);return{path:a,fullPath:(await Ar(i.fetch,s.toString(),e,F({headers:o},t?.duplex?{duplex:t.duplex}:{}))).Key}})}async createSignedUploadUrl(e,t){var n=this;return n.handleOperation(async()=>{let r=n._getFinalPath(e),i=F({},n.headers);t?.upsert&&(i[`x-upsert`]=`true`);let a=await kr(n.fetch,`${n.url}/object/upload/sign/${r}`,{},{headers:i}),o=new URL(n.url+a.url),s=o.searchParams.get(`token`);if(!s)throw new fr(`No token returned by API`);return{signedUrl:o.toString(),path:e,token:s}})}async update(e,t,n){return this.uploadOrUpdate(`PUT`,e,t,n)}async move(e,t,n){var r=this;return r.handleOperation(async()=>await kr(r.fetch,`${r.url}/object/move`,{bucketId:r.bucketId,sourceKey:e,destinationKey:t,de
7stinationBucket:n?.destinationBucket,sourceVersionId:n?.sourceVersionId},{headers:r.headers}))}async copy(e,t,n){var r=this;return r.handleOperation(async()=>({path:(await kr(r.fetch,`${r.url}/object/copy`,{bucketId:r.bucketId,sourceKey:e,destinationKey:t,destinationBucket:n?.destinationBucket,sourceVersionId:n?.sourceVersionId},{headers:r.headers})).Key}))}async createSignedUrl(e,t,n){var r=this;return r.handleOperation(async()=>{let i=r._getFinalPath(e),a=typeof n?.transform==`object`&&n.transform!==null&&Object.keys(n.transform).length>0,o=await kr(r.fetch,`${r.url}/object/sign/${i}`,F(F({expiresIn:t},a?{transform:n.transform}:{}),n?.versionId==null?{}:{versionId:n.versionId}),{headers:r.headers}),s=new URLSearchParams;n?.download&&s.set(`download`,n.download===!0?``:n.download),n?.cacheNonce!=null&&s.set(`cacheNonce`,String(n.cacheNonce));let c=s.toString();return{signedUrl:encodeURI(`${r.url}${o.signedURL}${c?`&${c}`:``}`)}})}async createSignedUrls(e,t,n){var r=this;return r.handleOperation(async()=>{let i=await kr(r.fetch,`${r.url}/object/sign/${r.bucketId}`,{expiresIn:t,paths:e},{headers:r.headers}),a=new URLSearchParams;n?.download&&a.set(`download`,n.download===!0?``:n.download),n?.cacheNonce!=null&&a.set(`cacheNonce`,String(n.cacheNonce));let o=a.toString();return i.map(e=>F(F({},e),{},{signedUrl:e.signedURL?encodeURI(`${r.url}${e.signedURL}${o?`&${o}`:``}`):null}))})}download(e,t,n){let r=typeof t?.transform==`object`&&t.transform!==null&&Object.keys(t.transform).length>0?`render/image/authenticated`:`object`,i=new URLSearchParams;t?.transform&&this.applyTransformOptsToQuery(i,t.transform),t?.cacheNonce!=null&&i.set(`cacheNonce`,String(t.cacheNonce)),t?.versionId!=null&&i.set(`versionId`,String(t.versionId));let a=i.toString(),o=this._getFinalPath(e);return new Rr(()=>Or(this.fetch,`${this.url}/${r}/${o}${a?`?${a}`:``}`,{headers:this.headers,noResolveJson:!0},n),this.shouldThrowOnError)}async info(e,t){var n=this;let r=n._getFinalPath(e),i=new URLSearchParams;t?.versionId!=null&&i.set(`versionId`,String(t.versionId));let a=i.toString();return n.handleOperation(async()=>br(await Or(n.fetch,`${n.url}/object/info/${r}${a?`?${a}`:``}`,{headers:n.headers})))}async exists(e){var t=this;let n=t._getFinalPath(e);try{return await jr(t.fetch,`${t.url}/object/${n}`,{headers:t.headers}),{data:!0,error:null}}catch(e){if(t.shouldThrowOnError)throw e;if(pr(e)){let t=e instanceof mr?e.status:e instanceof hr?e.originalError?.status:void 0;if(t!==void 0&&[400,404].includes(t))return{data:!1,error:e}}throw e}}getPublicUrl(e,t){let n=this._getFinalPath(e),r=new URLSearchParams;t?.download&&r.set(`download`,t.download===!0?``:t.download),t?.transform&&this.applyTransformOptsToQuery(r,t.transform),t?.cacheNonce!=null&&r.set(`cacheNonce`,String(t.cacheNonce)),t?.versionId!=null&&r.set(`versionId`,String(t.versionId));let i=r.toString(),a=typeof t?.transform==`object`&&t.transform!==null&&Object.keys(t.transform).length>0?`render/image`:`object`;return{data:{publicUrl:encodeURI(`${this.url}/${a}/public/${n}`)+(i?`?${i}`:``)}}}async remove(e){var t=this;return t.handleOperation(async()=>await Mr(t.fetch,`${t.url}/object/${t.bucketId}`,{prefixes:e},{headers:t.headers}))}async purgeCache(e,t,n){var r=this;return r.handleOperation(async()=>{let i=Sr(r._getFinalPath(e)),a=new URLSearchParams;t?.transformations&&a.set(`transformations`,`true`);let o=a.toString();return await Mr(r.fetch,`${r.url}/cdn/${i}${o?`?${o}`:``}`,{},{headers:r.headers},n)})}async list(e,t,n){var r=this;return r.handleOperation(async()=>{let i=t?.sortBy?F(F({},zr.sortBy),t.sortBy):zr.sortBy,a=F(F(F({},zr),t),{},{sortBy:i,prefix:e||``});return await kr(r.fetch,`${r.url}/object/list/${r.bucketId}`,a,{headers:r.headers},n)})}async listV2(e,t){var n=this;return n.handleOperation(async()=>{let r=F({},e);return await kr(n.fetch,`${n.url}/object/list-v2/${n.bucketId}`,r,{headers:n.headers},t)})}encodeMetadata(e){return JSON.stringify(e)}toBase64(e){return typeof Buffer<`u`?Buffer.from(e).toString(`base64`):btoa(e)}_getFinalPath(e){return`${this.bucketId}/${e.replace(/^\/+/,``)}`}_removeEmptyFolders(e){return e.replace(/^\/|\/$/g,``).replace(/\/+/g,`/`)}applyTransformOptsToQuery(e,t){return t.width&&e.set(`width`,t.width.toString()),t.height&&e.set(`height`,t.height.toString()),t.resize&&e.set(`resize`,t.resize),t.format&&e.set(`format`,t.format),t.quality&&e.set(`quality`,t.quality.toString()),e}},Hr={"X-Client-Info":`storage-js/2.117.2`},Ur=class extends Pr{constructor(e,t={},n,r){let i=new URL(e);r?.useNewHostname&&/supabase\.(co|in|red)$/.test(i.hostname)&&!i.hostname.includes(`storage.supabase.`)&&(i.hostname=i.hostname.replace(`supabase.`,`storage.supabase.`));let a=i.href.replace(/\/$/,``),o=F(F({},Hr),t);super(a,o,n,`storage`)}async listBuckets(e){var t=this;return t.handleOperation(async()=>{let n=t.listBucketOptionsToQueryString(e);return await Or(t.fetch,`${t.url}/bucket${n}`,{headers:t.headers})})}async getBucket(e){var t=this;return t.handleOperation(async()=>await Or(t.fetch,`${t.url}/bucket/${e}`,{headers:t.headers}))}async createBucket(e,t={public:!1}){var n=this;return n.handleOperation(async()=>await kr(n.fetch,`${n.url}/bucket`,{id:e,name:e,type:t.type,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes,versioning_status:t.ver
7sioningStatus},{headers:n.headers}))}async updateBucket(e,t){var n=this;return n.handleOperation(async()=>await Ar(n.fetch,`${n.url}/bucket/${e}`,{id:e,name:e,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes,versioning_status:t.versioningStatus},{headers:n.headers}))}async emptyBucket(e){var t=this;return t.handleOperation(async()=>await kr(t.fetch,`${t.url}/bucket/${e}/empty`,{},{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await Mr(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}async getBucketLifecycle(e){var t=this;return t.handleOperation(async()=>await Or(t.fetch,t.bucketLifecycleUrl(e),{headers:t.headers}))}async updateBucketLifecycle(e,t){var n=this;return n.handleOperation(async()=>await Ar(n.fetch,n.bucketLifecycleUrl(e),t,{headers:n.headers}))}async deleteBucketLifecycle(e){var t=this;return t.handleOperation(async()=>await Mr(t.fetch,t.bucketLifecycleUrl(e),{},{headers:t.headers}))}async purgeBucketCache(e,t,n){var r=this;return r.handleOperation(async()=>{let i=new URLSearchParams;t?.transformations&&i.set(`transformations`,`true`);let a=i.toString();return await Mr(r.fetch,`${r.url}/cdn/${Sr(e)}${a?`?${a}`:``}`,{},{headers:r.headers},n)})}bucketLifecycleUrl(e){return`${this.url}/bucket/${Sr(e)}/lifecycle`}listBucketOptionsToQueryString(e){let t={};return e&&(`limit`in e&&(t.limit=String(e.limit)),`offset`in e&&(t.offset=String(e.offset)),e.search&&(t.search=e.search),e.sortColumn&&(t.sortColumn=e.sortColumn),e.sortOrder&&(t.sortOrder=e.sortOrder)),Object.keys(t).length>0?`?`+new URLSearchParams(t).toString():``}},Wr=class extends Pr{constructor(e,t={},n){let r=e.replace(/\/$/,``),i=F(F({},Hr),t);super(r,i,n,`storage`)}async createBucket(e){var t=this;return t.handleOperation(async()=>await kr(t.fetch,`${t.url}/bucket`,{name:e},{headers:t.headers}))}async listBuckets(e){var t=this;return t.handleOperation(async()=>{let n=new URLSearchParams;e?.limit!==void 0&&n.set(`limit`,e.limit.toString()),e?.offset!==void 0&&n.set(`offset`,e.offset.toString()),e?.sortColumn&&n.set(`sortColumn`,e.sortColumn),e?.sortOrder&&n.set(`sortOrder`,e.sortOrder),e?.search&&n.set(`search`,e.search);let r=n.toString(),i=r?`${t.url}/bucket?${r}`:`${t.url}/bucket`;return await Or(t.fetch,i,{headers:t.headers})})}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await Mr(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}from(e){var t=this;if(!xr(e))throw new fr(`Invalid bucket name: File, folder, and bucket names must follow AWS object key naming guidelines and should avoid the use of any other characters.`);let n=new or({baseUrl:this.url,catalogName:e,auth:{type:`custom`,getHeaders:async()=>t.headers},fetch:this.fetch}),r=this.shouldThrowOnError;return new Proxy(n,{get(e,t){let n=e[t];return typeof n==`function`?async(...t)=>{try{return{data:await n.apply(e,t),error:null}}catch(e){if(r)throw e;return{data:null,error:e}}}:n}})}},Gr=class extends Pr{constructor(e,t={},n){let r=e.replace(/\/$/,``),i=F(F({},Hr),{},{"Content-Type":`application/json`},t);super(r,i,n,`vectors`)}async createIndex(e){var t=this;return t.handleOperation(async()=>await Nr.post(t.fetch,`${t.url}/CreateIndex`,e,{headers:t.headers})||{})}async getIndex(e,t){var n=this;return n.handleOperation(async()=>await Nr.post(n.fetch,`${n.url}/GetIndex`,{vectorBucketName:e,indexName:t},{headers:n.headers}))}async listIndexes(e){var t=this;return t.handleOperation(async()=>await Nr.post(t.fetch,`${t.url}/ListIndexes`,e,{headers:t.headers}))}async deleteIndex(e,t){var n=this;return n.handleOperation(async()=>await Nr.post(n.fetch,`${n.url}/DeleteIndex`,{vectorBucketName:e,indexName:t},{headers:n.headers})||{})}},Kr=class extends Pr{constructor(e,t={},n){let r=e.replace(/\/$/,``),i=F(F({},Hr),{},{"Content-Type":`application/json`},t);super(r,i,n,`vectors`)}async putVectors(e){var t=this;if(e.vectors.length<1||e.vectors.length>500)throw Error(`Vector batch size must be between 1 and 500 items`);return t.handleOperation(async()=>await Nr.post(t.fetch,`${t.url}/PutVectors`,e,{headers:t.headers})||{})}async getVectors(e){var t=this;return t.handleOperation(async()=>await Nr.post(t.fetch,`${t.url}/GetVectors`,e,{headers:t.headers}))}async listVectors(e){var t=this;if(e.segmentCount!==void 0){if(e.segmentCount<1||e.segmentCount>16)throw Error(`segmentCount must be between 1 and 16`);if(e.segmentIndex!==void 0&&(e.segmentIndex<0||e.segmentIndex>=e.segmentCount))throw Error(`segmentIndex must be between 0 and ${e.segmentCount-1}`)}return t.handleOperation(async()=>await Nr.post(t.fetch,`${t.url}/ListVectors`,e,{headers:t.headers}))}async queryVectors(e){var t=this;return t.handleOperation(async()=>await Nr.post(t.fetch,`${t.url}/QueryVectors`,e,{headers:t.headers}))}async deleteVectors(e){var t=this;if(e.keys.length<1||e.keys.length>500)throw Error(`Keys batch size must be between 1 and 500 items`);return t.handleOperation(async()=>await Nr.post(t.fetch,`${t.url}/DeleteVectors`,e,{headers:t.headers})||{})}},qr=class extends Pr{constructor(e,t={},n){let r=e.replace(/\/$/,``),i=F(F({},Hr),{},{"Content-Type":`application/json`},t);super(r,i,n,`vectors`)}async createBucket(e){var t=this;return t.handleOperation(async()=>await Nr.post(t.fetch,`${t.url}/CreateVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}async getBucket(e){var t=this;return t.handleOperation(async()=>await Nr.post(t.fetch,`${t.url}/GetVectorBucket`,{vectorBucketName:e},{headers:t.headers}))}async listBuckets(e={}){var t=this;return t.handleOperation(async()=>await Nr.post(t.fetch,`${t.url}/ListVectorBuckets`,e,{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await Nr.post(t.fetch,`${t.url}/DeleteVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}},Jr=class extends qr{constructor(e,t={}){super(e,t.headers||{},t.fetch)}from(e){return new Yr(this.url,this.headers,e,this.fetch)}async createBucket(e){var t=()=>super.createBucket,n=this;return t().call(n,e)}async getBucket(e){var t=()=>super.getBucket,n=this;return t().call(n,e)}async listBuckets(e={}){var t=()=>super.listBuckets,n=this;return t().call(n,e)}async deleteBucket(e){var t=()=>super.deleteBucket,n=this;return t().call(n,e)}},Yr=class extends Gr{constructor(e,t,n,r){super(e,t,r),this.vectorBucketName=n}async createIndex(e){var t=()=>super.createIndex,n=this;return t().call(n,F(F({},e),{},{vectorBucketName:n.vectorBucketName}))}
7async listIndexes(e={}){var t=()=>super.listIndexes,n=this;return t().call(n,F(F({},e),{},{vectorBucketName:n.vectorBucketName}))}async getIndex(e){var t=()=>super.getIndex,n=this;return t().call(n,n.vectorBucketName,e)}async deleteIndex(e){var t=()=>super.deleteIndex,n=this;return t().call(n,n.vectorBucketName,e)}index(e){return new Xr(this.url,this.headers,this.vectorBucketName,e,this.fetch)}},Xr=class extends Kr{constructor(e,t,n,r,i){super(e,t,i),this.vectorBucketName=n,this.indexName=r}async putVectors(e){var t=()=>super.putVectors,n=this;return t().call(n,F(F({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async getVectors(e){var t=()=>super.getVectors,n=this;return t().call(n,F(F({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async listVectors(e={}){var t=()=>super.listVectors,n=this;return t().call(n,F(F({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async queryVectors(e){var t=()=>super.queryVectors,n=this;return t().call(n,F(F({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async deleteVectors(e){var t=()=>super.deleteVectors,n=this;return t().call(n,F(F({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}},Zr=class extends Ur{constructor(e,t={},n,r){super(e,t,n,r)}from(e){return new Vr(this.url,this.headers,e,this.fetch)}get vectors(){return new Jr(this.url+`/vector`,{headers:this.headers,fetch:this.fetch})}get analytics(){return new Wr(this.url+`/iceberg`,this.headers,this.fetch)}},Qr=`2.117.2`,$r=3e4,ei=3*$r,ti=2*$r,ni=`http://localhost:9999`,ri=`supabase.auth.token`,ii={"X-Client-Info":`gotrue-js/${Qr}`},ai=`X-Supabase-Api-Version`,oi={"2024-01-01":{timestamp:Date.parse(`2024-01-01T00:00:00.0Z`),name:`2024-01-01`}},si=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,ci=`sb_flow_id`,li=class extends Error{constructor(e,t,n){super(e),this.__isAuthError=!0,this.name=`AuthError`,this.status=t,this.code=n}toJSON(){return{name:this.name,message:this.message,status:this.status,code:this.code}}};function I(e){return typeof e==`object`&&!!e&&`__isAuthError`in e}var ui=class extends li{constructor(e,t,n){super(e,t,n),this.name=`AuthApiError`,this.status=t,this.code=n}};function di(e){return I(e)&&e.name===`AuthApiError`}var fi=class extends li{constructor(e,t){super(e),this.name=`AuthUnknownError`,this.originalError=t}},pi=class extends li{constructor(e,t,n,r){super(e,n,r),this.name=t,this.status=n}},mi=class extends pi{constructor(){super(`Auth session missing!`,`AuthSessionMissingError`,400,void 0)}};function hi(e){return I(e)&&e.name===`AuthSessionMissingError`}var gi=class extends pi{constructor(){super(`Auth session or user missing`,`AuthInvalidToken
7ResponseError`,500,void 0)}},_i=class extends pi{constructor(e){super(e,`AuthInvalidCredentialsError`,400,void 0)}},vi=class extends pi{constructor(e,t=null){super(e,`AuthImplicitGrantRedirectError`,500,void 0),this.details=null,this.details=t}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}};function yi(e){return I(e)&&e.name===`AuthImplicitGrantRedirectError`}var bi=class extends pi{constructor(e,t=null){super(e,`AuthPKCEGrantCodeExchangeError`,500,void 0),this.details=null,this.details=t}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}},xi=class extends pi{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`)}},Si=class extends pi{constructor(e,t){super(e,`AuthRetryableFetchError`,t,void 0)}};function Ci(e){return I(e)&&e.name===`AuthRetryableFetchError`}var wi=class extends pi{constructor(e=`Refresh result discarded: session state changed mid-flight (e.g., concurrent signOut)`){super(e,`AuthRefreshDiscardedError`,409,void 0)}};function Ti(e){return I(e)&&e.name===`AuthRefreshDiscardedError`}var Ei=class extends pi{constructor(e,t,n){super(e,`AuthWeakPasswordError`,t,`weak_password`),this.reasons=n}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{reasons:this.reasons})}},Di=class extends pi{constructor(e){super(e,`AuthInvalidJwtError`,400,`invalid_jwt`)}},Oi=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_`.split(``),ki=` 	
8\r=`.split(``),Ai=(()=>{let e=Array(128);for(let t=0;t<e.length;t+=1)e[t]=-1;for(let t=0;t<ki.length;t+=1)e[ki[t].charCodeAt(0)]=-2;for(let t=0;t<Oi.length;t+=1)e[Oi[t].charCodeAt(0)]=t;return e})();function ji(e,t,n){if(e!==null)for(t.queue=t.queue<<8|e,t.queuedBits+=8;t.queuedBits>=6;)n(Oi[t.queue>>t.queuedBits-6&63]),t.queuedBits-=6;else if(t.queuedBits>0)for(t.queue<<=6-t.queuedBits,t.queuedBits=6;t.queuedBits>=6;)n(Oi[t.queue>>t.queuedBits-6&63]),t.queuedBits-=6}function Mi(e,t,n){let r=Ai[e];if(r>-1)for(t.queue=t.queue<<6|r,t.queuedBits+=6;t.queuedBits>=8;)n(t.queue>>t.queuedBits-8&255),t.queuedBits-=8;else if(r===-2)return;else throw Error(`Invalid Base64-URL character "${String.fromCharCode(e)}"`)}function Ni(e){let t=[],n=e=>{t.push(String.fromCodePoint(e))},r={utf8seq:0,codepoint:0},i={queue:0,queuedBits:0},a=e=>{Ii(e,r,n)};for(let t=0;t<e.length;t+=1)Mi(e.charCodeAt(t),i,a);return t.join(``)}function Pi(e,t){if(e<=127){t(e);return}if(e<=2047){t(192|e>>6),t(128|e&63);return}if(e<=65535){t(224|e>>12),t(128|e>>6&63),t(128|e&63);return}if(e<=1114111){t(240|e>>18),t(128|e>>12&63),t(128|e>>6&63),t(128|e&63);return}throw Error(`Unrecognized Unicode codepoint: ${e.toString(16)}`)}function Fi(e,t){for(let n=0;n<e.length;n+=1){let r=e.charCodeAt(n);if(r>55295&&r<=56319){let t=(r-55296)*1024&65535;r=(e.charCodeAt(n+1)-56320&65535|t)+65536,n+=1}Pi(r,t)}}function Ii(e,t,n){if(t.utf8seq===0){if(e<=127){n(e);return}for(let n=1;n<6;n+=1)if(!(e>>7-n&1)){t.utf8seq=n;break}if(t.utf8seq===2)t.codepoint=e&31;else if(t.utf8seq===3)t.codepoint=e&15;else if(t.utf8seq===4)t.codepoint=e&7;else throw Error(`Invalid UTF-8 sequence`);--t.utf8seq}else if(t.utf8seq>0){if(e<=127)throw Error(`Invalid UTF-8 sequence`);t.codepoint=t.codepoint<<6|e&63,--t.utf8seq,t.utf8seq===0&&n(t.codepoint)}}function Li(e){let t=[],n={queue:0,queuedBits:0},r=e=>{t.push(e)};for(let t=0;t<e.length;t+=1)Mi(e.charCodeAt(t),n,r);return new Uint8Array(t)}function Ri(e){let t=[];return Fi(e,e=>t.push(e)),new Uint8Array(t)}function zi(e){let t=[],n={queue:0,queuedBits:0},r=e=>{t.push(e)};return e.forEach(e=>ji(e,n,r)),ji(null,n,r),t.join(``)}function Bi(e){return Math.round(Date.now()/1e3)+e}function Vi(){return Symbol(`auth-callback`)}var Hi=()=>typeof window<`u`&&typeof document<`u`,Ui={tested:!1,writable:!1},Wi=()=>
8{if(!Hi())return!1;try{if(typeof globalThis.localStorage!=`object`)return!1}catch{return!1}if(Ui.tested)return Ui.writable;let e=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),Ui.tested=!0,Ui.writable=!0}catch{Ui.tested=!0,Ui.writable=!1}return Ui.writable};function Gi(e){let t={},n=new URL(e);if(n.hash&&n.hash[0]===`#`)try{new URLSearchParams(n.hash.substring(1)).forEach((e,n)=>{t[n]=e})}catch{}return n.searchParams.forEach((e,n)=>{t[n]=e}),t}var Ki=e=>e?(...t)=>e(...t):(...e)=>fetch(...e),qi=e=>typeof e==`object`&&!!e&&`status`in e&&`ok`in e&&`json`in e&&typeof e.json==`function`,Ji=async(e,t,n)=>{await e.setItem(t,JSON.stringify(n))},Yi=async(e,t)=>{let n=await e.getItem(t);if(!n)return null;try{return JSON.parse(n)}catch{return null}},Xi=async(e,t)=>{await e.removeItem(t)},Zi=class e{constructor(){this.promise=new e.promiseConstructor((e,t)=>{this.resolve=e,this.reject=t})}};Zi.promiseConstructor=Promise;function Qi(e){let t=e.split(`.`);if(t.length!==3)throw new Di(`Invalid JWT structure`);for(let e=0;e<t.length;e++)if(!si.test(t[e]))throw new Di(`JWT not in base64url format`);return{header:JSON.parse(Ni(t[0])),payload:JSON.parse(Ni(t[1])),signature:Li(t[2]),raw:{header:t[0],payload:t[1]}}}async function $i(e){return await new Promise(t=>{setTimeout(()=>t(null),e)})}function ea(e,t){return new Promise((n,r)=>{(async()=>{for(let i=0;i<1/0;i++)try{let r=await e(i);if(!t(i,null,r)){n(r);return}}catch(e){if(!t(i,e)){r(e);return}}})()})}function ta(e){return(`0`+e.toString(16)).substr(-2)}function na(){let e=new Uint32Array(56);if(typeof crypto>`u`){let e=``;for(let t=0;t<56;t++)e+=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~`.charAt(Math.floor(Math.random()*66));return e}return crypto.getRandomValues(e),Array.from(e,ta).join(``)}async function ra(e){let t=new TextEncoder().encode(e),n=await crypto.subtle.digest(`SHA-256`,t),r=new Uint8Array(n);return Array.from(r).map(e=>String.fromCharCode(e)).join(``)}async function ia(e){if(!(typeof crypto<`u`&&crypto.subtle!==void 0&&typeof TextEncoder<`u`))return console.warn(`WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256.`),e;let t=await ra(e);return btoa(t).replace(/\+/g,`-`).replace(/\//g,`_`).replace(/=+$/,``)}var aa=/^[a-zA-Z0-9_-]{8,64}$/;function oa(e){return typeof e==`string`&&aa.test(e)?e:null}function sa(){if(typeof crypto<`u`&&typeof crypto.getRandomValues==`function`){let e=new Uint8Array(16);return crypto.getRandomValues(e),Array.from(e,ta).join(``)}let e=``;for(let t=0;t<32;t++)e+=Math.floor(Math.random()*16).toString(16);return e}var ca=(e,t)=>`${e}-flow-${t}-code-verifier`,la=e=>`${e}-flows-code-verifier`;async function ua(e,t){let n=await Yi(e,la(t));return Array.isArray(n)?n.filter(e=>oa(e)!==null):[]}async function da(e,t,n,r,i){await Ji(e,ca(t,n),r);let a=(await ua(e,t)).filter(e=>e!==n);for(a.push(n);a.length>5;){let n=a.shift();await Xi(e,ca(t,n)),i?.(n)}await Ji(e,la(t),a),await Ji(e,`${t}-code-verifier`,r)}async function fa(e,t,n){if(n){let r=await Yi(e,ca(t,n));return{verifier:typeof r==`string`?r:null,flowId:n}}let r=await Yi(e,`${t}-code-verifier`);return{verifier:typeof r==`string`?r:null,flowId:null}}async function pa(e,t,n){let r=`${t}-code-verifier`;if(!n){await Xi(e,r);return}let i=ca(t,n),a=await Yi(e,i);await Xi(e,i);let o=await ua(e,t),s=o.filter(e=>e!==n);s.length!==o.length&&(s.length>0?await Ji(e,la(t),s):await Xi(e,la(t))),a!=null&&a===await Yi(e,r)&&await Xi(e,r)}async function ma(e,t){let n=await ua(e,t);for(let r of n)await Xi(e,ca(t,r));await Xi(e,la(t)),await Xi(e,`${t}-code-verifier`)}function ha(e,t){let n=e.indexOf(`#`),r=n===-1?e:e.slice(0,n),i=n===-1?``:e.slice(n),a=r.indexOf(`?`);if(a!==-1){let e=r.slice(0,a),t=r.slice(a+1).split(`&`).filter(e=>e!==``&&e!==`sb_flow_id`&&!e.startsWith(`sb_flow_id=`));r=t.length>0?`${e}?${t.join(`&`)}`:e}let o=r.includes(`?`)?`&`:`?`;return`${r}${o}${ci}=${encodeURIComponent(t)}${i}`}async function ga(e,t,n=!1,r){let i=na(),a=i;n&&(a+=`/recovery`);let o=sa();await da(e,t,o,a,r);let s=await ia(i);return[s,i===s?`plain`:`s256`,o]}var _a=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function va(e){let t=e.headers.get(ai);if(!t||!t.match(_a))return null;try{return new Date(`${t}T00:00:00.0Z`)}catch{return null}}function ya(e){if(!e)throw Error(`Missing exp claim`);if(e<=Math.floor(Date.now()/1e3))throw Error(`JWT has expired`)}function ba(e){switch(e){case`RS256`:return{name:`RSASSA-PKCS1-v1_5`,hash:{name:`
8SHA-256`}};case`ES256`:return{name:`ECDSA`,namedCurve:`P-256`,hash:{name:`SHA-256`}};default:throw Error(`Invalid alg claim`)}}var xa=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function Sa(e){if(!xa.test(e))throw Error(`@supabase/auth-js: Expected parameter to be UUID but is not`)}function Ca(e){if(!e.recoveryCodes)throw Error("@supabase/auth-js: the MFA recovery codes API is experimental and disabled by default. Enable it by passing `auth: { experimental: { recoveryCodes: true } }` to createClient (or to the GoTrueClient constructor).")}function wa(){return new Proxy({},{get:(e,t)=>{if(t===`__isUserNotAvailableProxy`)return!0;if(typeof t==`symbol`){let e=t.toString();if(e===`Symbol(Symbol.toPrimitive)`||e===`Symbol(Symbol.toStringTag)`||e===`Symbol(util.inspect.custom)`)return}throw Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Accessing the "${t}" property of the session object is not supported. Please use getUser() instead.`)},set:(e,t)=>{throw Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Setting the "${t}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)},deleteProperty:(e,t)=>{throw Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Deleting the "${t}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)}})}function Ta(e,t){return new Proxy(e,{get:(e,n,r)=>{if(n===`__isInsecureUserWarningProxy`)return!0;if(typeof n==`symbol`){let t=n.toString();if(t===`Symbol(Symbol.toPrimitive)`||t===`Symbol(Symbol.toStringTag)`||t===`Symbol(util.inspect.custom)`||t===`Symbol(nodejs.util.inspect.custom)`)return Reflect.get(e,n,r)}return!t.value&&typeof n==`string`&&(console.warn(`Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server.`),t.value=!0),Reflect.get(e,n,r)}})}function Ea(e){return JSON.parse(JSON.stringify(e))}var Da=e=>{if(typeof e==`object`&&e){let t=e;if(typeof t.msg==`string`)return t.msg;if(typeof t.message==`string`)return t.message;if(typeof t.error_description==`string`)return t.error_description;if(typeof t.error==`string`)return t.error}return JSON.stringify(e)},Oa=[500,501,502,503,504,520,521,522,523,524,525,526,527,528,529,530];async function ka(e){if(!qi(e))throw new Si(Da(e),0);let t;try{t=await e.json()}catch(t){throw Oa.includes(e.status)?new Si(e.statusText||`HTTP ${e.status}`,e.status):new fi(Da(t),t)}if(Oa.includes(e.status))throw new Si(Da(t),e.status);let n,r=va(e);if(r&&r.getTime()>=oi[`2024-01-01`].timestamp&&typeof t==`object`&&t&&typeof t.code==`string`?n=t.code:typeof t==`object`&&t&&typeof t.error_code==`string`&&(n=t.error_code),!n){if(typeof t==`object`&&t&&typeof t.weak_password==`object`&&t.weak_password&&Array.isArray(t.weak_password.reasons)&&t.weak_password.reasons.length&&t.weak_password.reasons.reduce((e,t)=>e&&typeof t==`string`,!0))throw new Ei(Da(t),e.status,t.weak_password.reasons)}else if(n===`weak_password`)throw new Ei(Da(t),e.status,t.weak_password?.reasons||[]);else if(n===`session_not_found`)throw new mi;throw new ui(Da(t),e.status||500,n)}var Aa=(e,t,n,r)=>{let i={method:e,headers:t?.headers||{}};return e===`GET`?i:(i.headers=Object.assign({"Content-Type":`application/json;charset=UTF-8`},t?.headers),i.body=JSON.stringify(r),Object.assign(Object.assign({},i),n))};async function L(e,t,n,r){let i=Object.assign({},r?.headers);i[`X-Supabase-Api-Version`]||(i[ai]=oi[`2024-01-01`].name),r?.jwt&&(i.Authorization=`Bearer ${r.jwt}`);let a=r?.query??{};r?.redirectTo&&(a.redirect_to=r.redirectTo);
8let o=await ja(e,t,n+(Object.keys(a).length?`?`+new URLSearchParams(a).toString():``),{headers:i,noResolveJson:r?.noResolveJson},{},r?.body);return r?.xform?r?.xform(o):{data:Object.assign({},o),error:null}}async function ja(e,t,n,r,i,a){let o=Aa(t,r,i,a),s;try{s=await e(n,Object.assign({},o))}catch(e){throw new Si(Da(e),0)}if(s.ok||await ka(s),r?.noResolveJson)return s;try{return await s.json()}catch(e){await ka(e)}}function Ma(e){let t=null;Ra(e)&&(t=Object.assign({},e),e.expires_at||(t.expires_at=Bi(e.expires_in)));let n=e.user??(typeof e?.id==`string`?e:null);return{data:{session:t,user:n},error:null}}function Na(e){let t=Ma(e);return!t.error&&e.weak_password&&typeof e.weak_password==`object`&&Array.isArray(e.weak_password.reasons)&&e.weak_password.reasons.length&&e.weak_password.message&&typeof e.weak_password.message==`string`&&e.weak_password.reasons.reduce((e,t)=>e&&typeof t==`string`,!0)&&(t.data.weak_password=e.weak_password),t}function Pa(e){return{data:{user:e.user??e},error:null}}function Fa(e){return{data:e,error:null}}function Ia(e){let{action_link:t,email_otp:n,hashed_token:r,redirect_to:i,verification_type:a}=e,o=et(e,[`action_link`,`email_otp`,`hashed_token`,`redirect_to`,`verification_type`]);return{data:{properties:{action_link:t,email_otp:n,hashed_token:r,redirect_to:i,verification_type:a},user:Object.assign({},o)},error:null}}function La(e){return e}function Ra(e){return!!e.access_token&&!!e.refresh_token&&!!e.expires_in}var za=[`global`,`local`,`others`],Ba=class{constructor({url:e=``,headers:t={},fetch:n,experimental:r}){this.url=e,this.headers=t,this.fetch=Ki(n),this.experimental=r??{},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,t=za[0]){if(za.indexOf(t)<0)throw Error(`@supabase/auth-js: Parameter scope must be one of ${za.join(`, `)}`);try{return await L(this.fetch,`POST`,`${this.url}/logout?scope=${t}`,{headers:this.headers,jwt:e,noResolveJson:!0}),{data:null,error:null}}catch(e){if(I(e))return{data:null,error:e};throw e}}async inviteUserByEmail(e,t={}){try{return await L(this.fetch,`POST`,`${this.url}/invite`,{body:{email:e,data:t.data},headers:this.headers,redirectTo:t.redirectTo,xform:Pa})}catch(e){if(I(e))return{data:{user:null},error:e};throw e}}async generateLink(e){try{let{options:t}=e,n=et(e,[`options`]),r=Object.assign(Object.assign({},n),t);return`newEmail`in n&&(r.new_email=n?.newEmail,delete r.newEmail),await L(this.fetch,`POST`,`${this.url}/admin/generate_link`,{body:r,headers:this.headers,xform:Ia,redirectTo:t?.redirectTo})}catch(e){if(I(e))return{data:{properties:null,user:null},error:e};throw e}}async createUser(e){try{return await L(this.fetch,`POST`,`${this.url}/admin/users`,{body:e,headers:this.headers,xform:Pa})}catch(e){if(I(e))return{data:{user:null},error:e};throw e}}async listUsers(e){try{let t={nextPage:null,lastPage:0,total:0},n=await L(this.fetch,`GET`,`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(e?.page)?.toString()??``,per_page:(e?.perPage)?.toString()??``},xform:La});if(n.error)throw n.error;let r=await n.json(),i=n.headers.get(`x-total-count`)??0,a=n.headers.get(`link`)?.split(`,`)??[];return a.length>0&&(a.forEach(e=>{let n=parseInt(e.split(`;`)[0].split(`=`)[1].substring(0,1)),r=JSON.parse(e.split(`;`)[1].split(`=`)[1]);t[`${r}Page`]=n}),t.total=parseInt(i)),{data:Object.assign(Object.assign({},r),t),error:null}}catch(e){if(I(e))return{data:{users:[]},error:e};throw e}}async getUserById(e){Sa(e);try{return await L(this.fetch,`GET`,`${this.url}/admin/users/${e}`,{headers:this.headers,xform:Pa})}catch(e){if(I(e))return{data:{user:null},error:e};throw e}}async updateUserById(e,t){Sa(e);try{return await L(this.fetch,`PUT`,`${this.url}/admin/users/${e}`,{body:t,headers:this.headers,xform:Pa})}catch(e){if(I(e))return{data:{user:null},error:e};throw e}}async deleteUser(e,t=!1){Sa(e);try{return await L(this.fetch,`DELETE`,`${this.url}/admin/users/${e}`,{headers:this.headers,body:{should_soft_delete:t},xform:Pa})}catch(e){if(I(e))return{data:{user:null},error:e};throw e}}async _listFactors(e){Sa(e.userId);try{let{data:t,error:n}=await L(this.fetch,`GET`,`${this.url}/admin/users/${e.userId}/factors`,{headers:this.headers,xform:e=>({data:{factors:e},error:null})});return{data:t,error:n}}catch(e){if(I(e))return{data:null,error:e};throw e}}async _deleteFactor(e){Sa(e.userId),Sa(e.id);try{return{data:await L(this.fetch,`DELETE`,`${this.url}/admin/users/${e.userId}/factors/${e.id}`,{headers:this.headers}),error:null}}catch(e){if(I(e))return{data:null,error:e};throw e}}async _listOAuthClients(e){try{let t={nextPage:null,lastPage:0,total:0},n=await L(this.fetch,`GET`,`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:(e?.page)?.toString()??``,per_page:(e?.perPage)?.toString()??``},xform:La});if(n.error)throw n.error;let r=await n.json(),i=n.headers.get(`x-total-count`)??0,a=n.headers.get(`link`)?.split(`,`)??[];return a.length>
80&&(a.forEach(e=>{let n=parseInt(e.split(`;`)[0].split(`=`)[1].substring(0,1)),r=JSON.parse(e.split(`;`)[1].split(`=`)[1]);t[`${r}Page`]=n}),t.total=parseInt(i)),{data:Object.assign(Object.assign({},r),t),error:null}}catch(e){if(I(e))return{data:{clients:[]},error:e};throw e}}async _createOAuthClient(e){try{return await L(this.fetch,`POST`,`${this.url}/admin/oauth/clients`,{body:e,headers:this.headers,xform:e=>({data:e,error:null})})}catch(e){if(I(e))return{data:null,error:e};throw e}}async _getOAuthClient(e){try{return await L(this.fetch,`GET`,`${this.url}/admin/oauth/clients/${e}`,{headers:this.headers,xform:e=>({data:e,error:null})})}catch(e){if(I(e))return{data:null,error:e};throw e}}async _updateOAuthClient(e,t){try{return await L(this.fetch,`PUT`,`${this.url}/admin/oauth/clients/${e}`,{body:t,headers:this.headers,xform:e=>({data:e,error:null})})}catch(e){if(I(e))return{data:null,error:e};throw e}}async _deleteOAuthClient(e){try{return await L(this.fetch,`DELETE`,`${this.url}/admin/oauth/clients/${e}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(e){if(I(e))return{data:null,error:e};throw e}}async _regenerateOAuthClientSecret(e){try{return await L(this.fetch,`POST`,`${this.url}/admin/oauth/clients/${e}/regenerate_secret`,{headers:this.headers,xform:e=>({data:e,error:null})})}catch(e){if(I(e))return{data:null,error:e};throw e}}async _listCustomProviders(e){try{let t={};return e?.type&&(t.type=e.type),await L(this.fetch,`GET`,`${this.url}/admin/custom-providers`,{headers:this.headers,query:t,xform:e=>({data:{providers:e?.providers??[]},error:null})})}catch(e){if(I(e))return{data:{providers:[]},error:e};throw e}}async _createCustomProvider(e){try{return await L(this.fetch,`POST`,`${this.url}/admin/custom-providers`,{body:e,headers:this.headers,xform:e=>({data:e,error:null})})}catch(e){if(I(e))return{data:null,error:e};throw e}}async _getCustomProvider(e){try{return await L(this.fetch,`GET`,`${this.url}/admin/custom-providers/${e}`,{headers:this.headers,xform:e=>({data:e,error:null})})}catch(e){if(I(e))return{data:null,error:e};throw e}}async _updateCustomProvider(e,t){try{return await L(this.fetch,`PUT`,`${this.url}/admin/custom-providers/${e}`,{body:t,headers:this.headers,xform:e=>({data:e,error:null})})}catch(e){if(I(e))return{data:null,error:e};throw e}}async _deleteCustomProvider(e){try{return await L(this.fetch,`DELETE`,`${this.url}/admin/custom-providers/${e}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(e){if(I(e))return{data:null,error:e};throw e}}async _adminListPasskeys(e){Sa(e.userId);try{return await L(this.fetch,`GET`,`${this.url}/admin/users/${e.userId}/passkeys`,{headers:this.headers,xform:e=>({data:e,error:null})})}catch(e){if(I(e))return{data:null,error:e};throw e}}async _adminDeletePasskey(e){Sa(e.userId),Sa(e.passkeyId);try{return await L(this.fetch,`DELETE`,`${this.url}/admin/users/${e.userId}/passkeys/${e.passkeyId}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(e){if(I(e))return{data:null,error:e};throw e}}};function Va(e={}){return{getItem:t=>e[t]||null,setItem:(t,n)=>{e[t]=n},removeItem:t=>{delete e[t]}}}globalThis&&Wi()&&globalThis.localStorage&&globalThis.localStorage.getItem(`supabase.gotrue-js.locks.debug`);var Ha=class extends Error{constructor(e){super(e),this.isAcquireTimeout=!0}};function Ua(){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 Wa(e){if(!/^0x[a-fA-F0-9]{40}$/.test(e))throw Error(`@supabase/auth-js: Address "${e}" is invalid.`);return e.toLowerCase()}function Ga(e){return parseInt(e,16)}function Ka(e){let t=new TextEncoder().encode(e);return`0x`+Array.from(t,e=>e.toString(16).padStart(2,`0`)).join(``)}function qa(e){let{chainId:t,domain:n,expirationTime:r,issuedAt:i=new Date,nonce:a,notBefore:o,requestId:s,resources:c,scheme:l,uri:u,version:d}=e;if(!Number.isInteger(t))throw Error(`@supabase/auth-js: Invalid SIWE message field "chainId". Chain ID must be a EIP-155 chain ID. Provided value: ${t}`);if(!n)throw Error(`@supabase/auth-js: Invalid SIWE message field "domain". Domain must be provided.`);if(a&&a.length<8)throw Error(`@supabase/auth-js: Invalid SIWE message field "nonce". Nonce must be at least 8 characters. Provided value: ${a}`);if(!u)throw Error(`@supabase/auth-js: Invalid SIWE message field "uri". URI must be provided.`);if(d!==`1`)throw Error(`@supabase/auth-js: Invalid SIWE message field "version". Version must be '1'. Provided value: ${d}`);if(e.statement?.includes(`
9`))throw Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${e.statement}`);let f=Wa(e.address),p=`${l?`${l}://${n}`:n} wants you to sign in with your Ethereum account:\n${f}\n\n${e.statement?`${e.statement}\n`:``}`,m=`URI: ${u}\nVersion: ${d}\nChain ID: ${t}${a?`\nNonce: ${a}`:``}\nIssued At: ${i.toISOString()}`;if(r&&(m+=`\nExpiration Time: ${r.toISOString()}`),o&&(m+=`\nNot Before: ${o.toISOString()}`),s&&(m+=`\nRequest ID: ${s}`),c){let e=`
10Resources:`;for(let t of c){if(!t||typeof t!=`string`)throw Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${t}`);e+=`\n- ${t}`}m+=e}return`${p}\n${m}`}
10var R=class extends Error{constructor({message:e,code:t,cause:n,name:r}){super(e,{cause:n}),this.__isWebAuthnError=!0,this.name=r??(n instanceof Error?n.name:void 0)??`Unknown Error`,this.code=t}toJSON(){return{name:this.name,message:this.message,code:this.code}}},Ja=class extends R{constructor(e,t){super({code:`ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY`,cause:t,message:e}),this.name=`WebAuthnUnknownError`,this.originalError=t}};function Ya({error:e,options:t}){let{publicKey:n}=t;if(!n)throw Error(`options was missing required publicKey property`);if(e.name===`AbortError`){if(t.signal instanceof AbortSignal)return new R({message:`Registration ceremony was sent an abort signal`,code:`ERROR_CEREMONY_ABORTED`,cause:e})}else if(e.name===`ConstraintError`){if(n.authenticatorSelection?.requireResidentKey===!0)return new R({message:`Discoverable credentials were required but no available authenticator supported it`,code:`ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT`,cause:e});if(t.mediation===`conditional`&&n.authenticatorSelection?.userVerification===`required`)return new R({message:`User verification was required during automatic registration but it could not be performed`,code:`ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE`,cause:e});if(n.authenticatorSelection?.userVerification===`required`)return new R({message:`User verification was required but no available authenticator supported it`,code:`ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT`,cause:e})}else if(e.name===`InvalidStateError`)return new R({message:`The authenticator was previously registered`,code:`ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED`,cause:e});else if(e.name===`NotAllowedError`)return new R({message:e.message,code:`ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY`,cause:e});else if(e.name===`NotSupportedError`)return n.pubKeyCredParams.filter(e=>e.type===`public-key`).length===0?new R({message:`No entry in pubKeyCredParams was of type "public-key"`,code:`ERROR_MALFORMED_PUBKEYCREDPARAMS`,cause:e}):new R({message:`No available authenticator supported any of the specified pubKeyCredParams algorithms`,code:`ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG`,cause:e});else if(e.name===`SecurityError`){let t=window.location.hostname;if(!no(t))return new R({message:`${window.location.hostname} is an invalid domain`,code:`ERROR_INVALID_DOMAIN`,cause:e});if(n.rp.id!==t)return new R({message:`The RP ID "${n.rp.id}" is invalid for this domain`,code:`ERROR_INVALID_RP_ID`,cause:e})}else if(e.name===`TypeError`){if(n.user.id.byteLength<1||n.user.id.byteLength>64)return new R({message:`User ID was not between 1 and 64 characters`,code:`ERROR_INVALID_USER_ID_LENGTH`,cause:e})}else if(e.name===`UnknownError`)return new R({message:`The authenticator was unable to process the specified options, or could not create a new credential`,code:`ERROR_AUTHENTICATOR_GENERAL_ERROR`,cause:e});return new R({message:`a Non-Webauthn related error has occurred`,code:`ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY`,cause:e})}function Xa({error:e,options:t}){let{publicKey:n}=t;if(!n)throw Error(`options was missing required publicKey property`);if(e.name===`AbortError`){if(t.signal instanceof AbortSignal)return new R({message:`Authentication ceremony was sent an abort signal`,code:`ERROR_CEREMONY_ABORTED`,cause:e})}else if(e.name===`NotAllowedError`)return new R({message:e.message,code:`ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY`,cause:e});else if(e.name===`SecurityError`){let t=window.location.hostname;if(!no(t))return new R({message:`${window.location.hostname} is an invalid domain`,code:`ERROR_INVALID_DOMAIN`,cause:e});if(n.rpId!==t)return new R({message:`The RP ID "${n.rpId}" is invalid for this domain`,code:`ERROR_INVALID_RP_ID`,cause:e})}else if(e.name===`UnknownError`)return new R({message:`The authenticator was unable to process the specified options, or could not create a new assertion signature`,code:`ERROR_AUTHENTICATOR_GENERAL_ERROR`,cause:e});return new R({message:`a Non-Webauthn related error has occurred`,code:`ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY`,cause:e})}var Za=new class{createNewAbortSignal(){if(this.controller){let e=Error(`Cancelling existing WebAuthn API call for new one`);e.name=`AbortError`,this.controller.abort(e)}let e=new AbortController;return this.controller=e,e.signal}cancelCeremony(){if(this.controller){let e=Error(`Manually cancelling existing WebAuthn API call`);e.name=`AbortError`,this.controller.abort(e),this.controller=void 0}}};function Qa(e){if(!e)throw Error(`Credential creation options are required`);if(typeof PublicKeyCredential<`u`&&`parseCreationOptionsFromJSON`in PublicKeyCredential&&typeof PublicKeyCredential.parseCreationOptionsFromJSON==`function`)return PublicKeyCredential.parseCreationOptionsFromJSON(e);let{challenge:t,user:n,excludeCredentials:r}=e,i=et(e,[`challenge`,`user`,`excludeCredentials`]),a=Li(t).buffer,o=Object.assign(Object.assign({},n),{id:Li(n.id).buffer}),s=Object.assign(Object.assign({},i),{challenge:a,user:o});if(r&&r.length>0){s.excludeCredentials=Array(r.length);for(let e=0;e<r.length;e++){let t=r[e];s.excludeCredentials[e]=Object.assign(Object.assign({},t),{id:Li(t.id).buffer,type:t.type||`public-key`,transports:t.transports})}}return s}function $a(e){if(!e)throw Error(`Credential request options are required`);if(typeof PublicKeyCredential<`u`&&`parseRequestOptionsFromJSON`in PublicKeyCredential&&typeof PublicKeyCredential.parseRequestOptionsFromJSON==`function`)return PublicKeyCredential.parseRequestOptionsFromJSON(e);let{challenge:t,allowCredentials:n}=e,r=et(e,[`challenge`,`allowCredentials`]),i=Li(t).buffer,a=Object.assign(Object.assign({},r),{challenge:i});if(n&&n.length>0){a.allowCredentials=Array(n.length);for(let e=0;e<n.length;e++){let t=n[e];a.allowCredentials[e]=Object.assign(Object.assign({},t),{id:Li(t.id).buffer,type:t.type||`public-key`,transports:t.transports})}}return a}function eo(e){if(`toJSON`in e&&typeof e.toJSON==`function`)return e.toJSON();let t=e;return{id:e.id,rawId:e.id,response:{attestationObject:zi(new Uint8Array(e.response.attestationObject)),clientDataJSON:zi(new Uint8Array(e.response.clientDataJSON))},type:`public-key`,clientExtensionResults:e.getClientExtensionResults(),authenticatorAttachment:t.authenticatorAttachment??void 0}}function to(e){if(`toJSON`in e&&typeof e.toJSON==`function`)return e.toJSON();let t=e,n=e.getClientExtensionResults(),r=e.response;return{id:e.id,rawId:e.id,response:{authenticatorData:zi(new Uint8Array(r.authenticatorData)),clientDataJSON:zi(new Uint8Array(r.clientDataJSON)),signature:zi(new Uint8Array(r.signature)),userHandle:r.userHandle?zi(new Uint8Array(r.userHandle)):void 0},type:`public-key`,clientExtensionResults:n,authenticatorAttachment:t.authenticatorAttachment??void 0}}function no(e){return e===`localhost`||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}function ro(){return!!(Hi()&&`PublicKeyCredential`in window&&window.PublicKeyCredential&&`credentials`in navigator&&typeof(navigator==null?void 0:navigator.credentials)?.create==`function`&&typeof(navigator==null?void 0:navigator.credentials)?.get==`function`)}async function io(e){try{let t=await navigator.credentials.create(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new Ja(`Browser returned unexpected credential type`,t)}:{data:null,error:new Ja(`Empty credential response`,t)}}
10catch(t){return{data:null,error:Ya({error:t,options:e})}}}async function ao(e){try{let t=await navigator.credentials.get(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new Ja(`Browser returned unexpected credential type`,t)}:{data:null,error:new Ja(`Empty credential response`,t)}}catch(t){return{data:null,error:Xa({error:t,options:e})}}}var oo={hints:[`security-key`],authenticatorSelection:{authenticatorAttachment:`cross-platform`,requireResidentKey:!1,userVerification:`preferred`,residentKey:`discouraged`},attestation:`direct`},so={userVerification:`preferred`,hints:[`security-key`],attestation:`direct`};function co(...e){let t=e=>typeof e==`object`&&!!e&&!Array.isArray(e),n=e=>e instanceof ArrayBuffer||ArrayBuffer.isView(e),r={};for(let i of e)if(i)for(let e in i){let a=i[e];if(a!==void 0)if(Array.isArray(a))r[e]=a;else if(n(a))r[e]=a;else if(t(a)){let n=r[e];r[e]=t(n)?co(n,a):co(a)}else r[e]=a}return r}function lo(e,t){return co(oo,e,t||{})}function uo(e,t){return co(so,e,t||{})}var fo=class{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:t,friendlyName:n,signal:r},i){try{let{data:a,error:o}=await this.client.mfa.challenge({factorId:e,webauthn:t});if(!a)return{data:null,error:o};let s=r??Za.createNewAbortSignal();if(a.webauthn.type===`create`){let{user:e}=a.webauthn.credential_options.publicKey;if(!e.name){let t=n;if(t)e.name=`${e.id}:${t}`;else{let t=(await this.client.getUser()).data.user,n=t?.user_metadata?.name||t?.email||t?.id||`User`;e.name=`${e.id}:${n}`}}e.displayName||=e.name}switch(a.webauthn.type){case`create`:{let{data:t,error:n}=await io({publicKey:lo(a.webauthn.credential_options.publicKey,i?.create),signal:s});return t?{data:{factorId:e,challengeId:a.id,webauthn:{type:a.webauthn.type,credential_response:t}},error:null}:{data:null,error:n}}case`request`:{let t=uo(a.webauthn.credential_options.publicKey,i?.request),{data:n,error:r}=await ao(Object.assign(Object.assign({},a.webauthn.credential_options),{publicKey:t,signal:s}));return n?{data:{factorId:e,challengeId:a.id,webauthn:{type:a.webauthn.type,credential_response:n}},error:null}:{data:null,error:r}}}}catch(e){return I(e)?{data:null,error:e}:{data:null,error:new fi(`Unexpected error in challenge`,e)}}}async _verify({challengeId:e,factorId:t,webauthn:n}){return this.client.mfa.verify({factorId:t,challengeId:e,webauthn:n})}async _authenticate({factorId:e,webauthn:{rpId:t=typeof window<`u`?window.location.hostname:void 0,rpOrigins:n=typeof window<`u`?[window.location.origin]:void 0,signal:r}={}},i){if(!t)return{data:null,error:new li(`rpId is required for WebAuthn authentication`)};try{if(!ro())return{data:null,error:new fi(`Browser does not support WebAuthn`,null)};let{data:a,error:o}=await this.challenge({factorId:e,webauthn:{rpId:t,rpOrigins:n},signal:r},{request:i});if(!a)return{data:null,error:o};let{webauthn:s}=a;return this._verify({factorId:e,challengeId:a.challengeId,webauthn:{type:s.type,rpId:t,rpOrigins:n,credential_response:s.credential_response}})}catch(e){return I(e)?{data:null,error:e}:{data:null,error:new fi(`Unexpected error in authenticate`,e)}}}async _register({friendlyName:e,webauthn:{rpId:t=typeof window<`u`?window.location.hostname:void 0,rpOrigins:n=typeof window<`u`?[window.location.origin]:void 0,signal:r}={}},i){if(!t)return{data:null,error:new li(`rpId is required for WebAuthn registration`)};try{if(!ro())return{data:null,error:new fi(`Browser does not support WebAuthn`,null)};let{data:a,error:o}=await this._enroll({friendlyName:e});if(!a)return await this.client.mfa.listFactors().then(t=>t.data?.all.find(t=>t.factor_type===`webauthn`&&t.friendly_name===e&&t.status===`unverified`)).then(e=>e?this.client.mfa.unenroll({factorId:e?.id}):void 0),{data:null,error:o};let{data:s,error:c}=await this._challenge({factorId:a.id,friendlyName:a.friendly_name,webauthn:{rpId:t,rpOrigins:n},signal:r},{create:i});return s?this._verify({factorId:a.id,challengeId:s.challengeId,webauthn:{rpId:t,rpOrigins:n,type:s.webauthn.type,credential_response:s.webauthn.credential_response}}):{data:null,error:c}}catch(e){return I(e)?{data:null,error:e}:{data:null,error:new fi(`Unexpected error in register`,e)}}}};Ua();var po={url:ni,storageKey:ri,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:ii,flowType:`implicit`,debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:5e3,skipAutoInitialize:!1,experimental:{}},mo={},ho=!1,go=class e{get jwks(){return mo[this.storageKey]?.jwks??{keys:[]}}set jwks(e){mo[this.storageKey]=Object.assign(Object.assign({},mo[this.storageKey]),{jwks:e})}get jwks_cached_at(){return mo[this.storageKey]?.cachedAt??-(2**53-1)}set jwks_cached_at(e){mo[this.storageKey]=Object.assign(Object.assign({},mo[this.storageKey]),{cachedAt:e})}constructor(t){var n;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.autoRefreshTickTimeout=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.lastRefreshFailure=null,this._sessionRemovalEpoch=0,this.initializePromise=null,this._pendingInitNotifications=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lock=null,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log;let r=Object.assign(Object.assign({},po),t);if(this.storageKey=r.storageKey,this.instanceID=e.nextInstanceID[this.storageKey]??0,e.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!r.debug,typeof r.debug==`function`&&(this.logger=r.debug),this.instanceID>0&&Hi()){let e=`${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(e),this.logDebugMessages&&console.trace(e)}if(this.persistSession=r.persistSession,this.autoRefreshToken=r.autoRefreshToken,this.experimental=r.experimental??{},this.admin=new Ba({url:r.url,headers:r.headers,fetch:r.fetch,experimental:this.experimental}),this.url=r.url,this.headers=r.headers,this.fetch=Ki(r.fetch),this.detectSessionInUrl=r.detectSessionInUrl,this.flowType=r.flowType,this.hasCustomAuthorizationHeader=r.hasCustomAuthorizationHeader,this.throwOnError=r.throwOnError,this.lockAcquireTimeout=r.lockAcquireTimeout,r.lock!=null&&(this.lock=r.lock,ho||(ho=!0,console.warn(`${this._logPrefix()} The "lock" option is deprecated and will be removed in v3. The client now coordinates session refreshes without a lock, so most apps can drop the option. See https://github.com/supabase/supabase-js/blob/master/packages/core/auth-js/migrations/lockless-coordination.md`))),this.jwks||(this.jwks={keys:[]},this.jwks_cached_at=-(2**53-1)),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 fo(this),recoveryCodes:{getStatus:this._getRecoveryCodesStatus.bind(this),generate:this._generateRecoveryCodes.bind(this),verify:this._verifyRecoveryCode.bind(this),regenerate:this._regenerateRecoveryCodes.bind(this),unenroll:this._unenrollRecoveryCodes.bind(this)}}
10,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?(r.storage?this.storage=r.storage:Wi()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=Va(this.memoryStorage)),r.userStorage&&(this.userStorage=r.userStorage)):(this.memoryStorage={},this.storage=Va(this.memoryStorage)),Hi()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(e){console.error(`Failed to create a new BroadcastChannel, multi-tab state changes will not be available`,e)}(n=this.broadcastChannel)==null||n.addEventListener(`message`,async e=>{this._debug(`received broadcast notification from other tab or client`,e),(e.data.event===`TOKEN_REFRESHED`||e.data.event===`SIGNED_IN`)&&(this.lastRefreshFailure=null);try{await this._notifyAllSubscribers(e.data.event,e.data.session,!1)}catch(e){this._debug(`#broadcastChannel`,`error`,e)}})}r.skipAutoInitialize||this.initialize().catch(e=>{this._debug(`#initialize()`,`error`,e)})}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(e){if(this.throwOnError&&e&&e.error)throw e.error;return e}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${Qr}) ${new Date().toISOString()}`}_debug(...e){return this.logDebugMessages&&this.logger(this._logPrefix(),...e),this}async initialize(){if(this.initializePromise)return await this.initializePromise;this._pendingInitNotifications=[],this.initializePromise=(async()=>this.lock==null?await this._initialize():await this._acquireLock(this.lockAcquireTimeout,async()=>await this._initialize()))();let e=await this.initializePromise,t=this._pendingInitNotifications??[];this._pendingInitNotifications=null;for(let e of t)await this._notifyAllSubscribers(e.event,e.session,e.broadcast);return e}async _initialize(){try{let e={},t=`none`;if(Hi()&&(e=Gi(window.location.href),this._isImplicitGrantCallback(e)?t=`implicit`:await this._isPKCECallback(e)&&(t=`pkce`)),Hi()&&this.detectSessionInUrl&&t!==`none`){let{data:n,error:r}=await this._getSessionFromURL(e,t);if(r){if(this._debug(`#_initialize()`,`error detecting session from URL`,r),yi(r)){let e=r.details?.code;if(e===`identity_already_exists`||e===`identity_not_found`||e===`single_identity_not_deletable`)return{error:r}}return{error:r}}let{session:i,redirectType:a}=n;return this._debug(`#_initialize()`,`detected session in URL`,i,`redirect type`,a),await this._saveSession(i),setTimeout(async()=>{a===`recovery`?await this._notifyAllSubscribers(`PASSWORD_RECOVERY`,i):await this._notifyAllSubscribers(`SIGNED_IN`,i)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(e){return I(e)?this._returnResult({error:e}):this._returnResult({error:new fi(`Unexpected error during initialization`,e)})}finally{await this._handleVisibilityChange(),this._debug(`#_initialize()`,`end`)}}async signInAnonymously(e){try{let{data:t,error:n}=await L(this.fetch,`POST`,`${this.url}/signup`,{headers:this.headers,body:{data:e?.options?.data??{},gotrue_meta_security:{captcha_token:e?.options?.captchaToken}},xform:Ma});if(n||!t)return this._returnResult({data:{user:null,session:null},error:n});let r=t.session,i=t.user;return t.session&&(await this._saveSession(t.session),await this._notifyAllSubscribers(`SIGNED_IN`,r)),this._returnResult({data:{user:i,session:r},error:null})}catch(e){if(I(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async signUp(e){let t=null;try{let n;if(`email`in e){let{email:r,password:i,options:a}=e,o=null,s=null;this.flowType===`pkce`&&([o,s,t]=await this._getCodeChallengeAndMethod()),n=await L(this.fetch,`POST`,`${this.url}/signup`,{headers:this.headers,redirectTo:this._maybeAppendFlowIdToRedirect(a?.emailRedirectTo,t),body:{email:r,password:i,data:a?.data??{},gotrue_meta_security:{captcha_token:a?.captchaToken}
10,code_challenge:o,code_challenge_method:s},xform:Ma})}else if(`phone`in e){let{phone:t,password:r,options:i}=e;n=await L(this.fetch,`POST`,`${this.url}/signup`,{headers:this.headers,body:{phone:t,password:r,data:i?.data??{},channel:i?.channel??`sms`,gotrue_meta_security:{captcha_token:i?.captchaToken}},xform:Ma})}else throw new _i(`You must provide either an email or phone number and a password`);let{data:r,error:i}=n;if(i||!r)return await pa(this.storage,this.storageKey,t),this._returnResult({data:{user:null,session:null},error:i});let a=r.session,o=r.user;return r.session&&(await this._saveSession(r.session),await this._notifyAllSubscribers(`SIGNED_IN`,a)),this._returnResult({data:{user:o,session:a},error:null})}catch(e){if(await pa(this.storage,this.storageKey,t),I(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async signInWithPassword(e){try{let t;if(`email`in e){let{email:n,password:r,options:i}=e;t=await L(this.fetch,`POST`,`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:n,password:r,gotrue_meta_security:{captcha_token:i?.captchaToken}},xform:Na})}else if(`phone`in e){let{phone:n,password:r,options:i}=e;t=await L(this.fetch,`POST`,`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:n,password:r,gotrue_meta_security:{captcha_token:i?.captchaToken}},xform:Na})}else throw new _i(`You must provide either an email or phone number and a password`);let{data:n,error:r}=t;if(r)return this._returnResult({data:{user:null,session:null},error:r});if(!n||!n.session||!n.user){let e=new gi;return this._returnResult({data:{user:null,session:null},error:e})}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:r})}catch(e){if(I(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async signInWithOAuth(e){return await this._handleProviderSignIn(e.provider,{redirectTo:e.options?.redirectTo,scopes:e.options?.scopes,queryParams:e.options?.queryParams,skipBrowserRedirect:e.options?.skipBrowserRedirect})}async exchangeCodeForSession(e,t){return await this.initializePromise,this.lock==null?this._exchangeCodeForSession(e,t):this._acquireLock(this.lockAcquireTimeout,async()=>this._exchangeCodeForSession(e,t))}async signInWithWeb3(e){let{chain:t}=e;switch(t){case`ethereum`:return await this.signInWithEthereum(e);case`solana`:return await this.signInWithSolana(e);default:throw Error(`@supabase/auth-js: Unsupported chain "${t}"`)}}async signInWithEthereum(e){let t,n;if(`message`in e)t=e.message,n=e.signature;else{let{chain:r,wallet:i,statement:a,options:o}=e,s;
10if(!Hi()){if(typeof i!=`object`||!o?.url)throw Error(`@supabase/auth-js: Both wallet and url must be specified in non-browser environments.`);s=i}else if(typeof i==`object`)s=i;else{let e=window;if(`ethereum`in e&&typeof e.ethereum==`object`&&`request`in e.ethereum&&typeof e.ethereum.request==`function`)s=e.ethereum;else throw 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.`)}let c=new URL(o?.url??window.location.href),l=await s.request({method:`eth_requestAccounts`}).then(e=>e).catch(()=>{throw Error(`@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid`)});if(!l||l.length===0)throw Error(`@supabase/auth-js: No accounts available. Please ensure the wallet is connected.`);let u=Wa(l[0]),d=o?.signInWithEthereum?.chainId;d||=Ga(await s.request({method:`eth_chainId`})),t=qa({domain:c.host,address:u,statement:a,uri:c.href,version:`1`,chainId:d,nonce:o?.signInWithEthereum?.nonce,issuedAt:o?.signInWithEthereum?.issuedAt??new Date,expirationTime:o?.signInWithEthereum?.expirationTime,notBefore:o?.signInWithEthereum?.notBefore,requestId:o?.signInWithEthereum?.requestId,resources:o?.signInWithEthereum?.resources}),n=await s.request({method:`personal_sign`,params:[Ka(t),u]})}try{let{data:r,error:i}=await L(this.fetch,`POST`,`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:`ethereum`,message:t,signature:n},e.options?.captchaToken?{gotrue_meta_security:{captcha_token:e.options?.captchaToken}}:null),xform:Ma});if(i)throw i;if(!r||!r.session||!r.user){let e=new gi;return this._returnResult({data:{user:null,session:null},error:e})}return r.session&&(await this._saveSession(r.session),await this._notifyAllSubscribers(`SIGNED_IN`,r.session)),this._returnResult({data:Object.assign({},r),error:i})}catch(e){if(I(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async signInWithSolana(e){let t,n;if(`message`in e)t=e.message,n=e.signature;else{let{chain:r,wallet:i,statement:a,options:o}=e,s;
10if(!Hi()){if(typeof i!=`object`||!o?.url)throw Error(`@supabase/auth-js: Both wallet and url must be specified in non-browser environments.`);s=i}else if(typeof i==`object`)s=i;else{let e=window;if(`solana`in e&&typeof e.solana==`object`&&(`signIn`in e.solana&&typeof e.solana.signIn==`function`||`signMessage`in e.solana&&typeof e.solana.signMessage==`function`))s=e.solana;else throw 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.`)}let c=new URL(o?.url??window.location.href);if(`signIn`in s&&s.signIn){let e=await s.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},o?.signInWithSolana),{version:`1`,domain:c.host,uri:c.href}),a?{statement:a}:null)),r;if(Array.isArray(e)&&e[0]&&typeof e[0]==`object`)r=e[0];else if(e&&typeof e==`object`&&`signedMessage`in e&&`signature`in e)r=e;else throw Error(`@supabase/auth-js: Wallet method signIn() returned unrecognized value`);if(`signedMessage`in r&&`signature`in r&&(typeof r.signedMessage==`string`||r.signedMessage instanceof Uint8Array)&&r.signature instanceof Uint8Array)t=typeof r.signedMessage==`string`?r.signedMessage:new TextDecoder().decode(r.signedMessage),n=r.signature;else throw Error(`@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields`)}else{if(!(`signMessage`in s)||typeof s.signMessage!=`function`||!(`publicKey`in s)||typeof s!=`object`||!s.publicKey||!(`toBase58`in s.publicKey)||typeof s.publicKey.toBase58!=`function`)throw Error(`@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API`);t=[`${c.host} wants you to sign in with your Solana account:`,s.publicKey.toBase58(),...a?[``,a,``]:[``],`Version: 1`,`URI: ${c.href}`,`Issued At: ${o?.signInWithSolana?.issuedAt??new Date().toISOString()}`,...o?.signInWithSolana?.notBefore?[`Not Before: ${o.signInWithSolana.notBefore}`]:[],...o?.signInWithSolana?.expirationTime?[`Expiration Time: ${o.signInWithSolana.expirationTime}`]:[],...o?.signInWithSolana?.chainId?[`Chain ID: ${o.signInWithSolana.chainId}`]:[],...o?.signInWithSolana?.nonce?[`Nonce: ${o.signInWithSolana.nonce}`]:[],...o?.signInWithSolana?.requestId?[`Request ID: ${o.signInWithSolana.requestId}`]:[],...o?.signInWithSolana?.resources?.length?[`Resources`,...o.signInWithSolana.resources.map(e=>`- ${e}`)]:[]].join(`
11`);let e=await s.signMessage(new TextEncoder().encode(t),`utf8`);if(!e||!(e instanceof Uint8Array))throw Error(`@supabase/auth-js: Wallet signMessage() API returned an recognized value`);n=e}}try{let{data:r,error:i}=await L(this.fetch,`POST`,`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:`solana`,message:t,signature:zi(n)},e.options?.captchaToken?{gotrue_meta_security:{captcha_token:e.options?.captchaToken}}:null),xform:Ma});if(i)throw i;if(!r||!r.session||!r.user){let e=new gi;return this._returnResult({data:{user:null,session:null},error:e})}return r.session&&(await this._saveSession(r.session),await this._notifyAllSubscribers(`SIGNED_IN`,r.session)),this._returnResult({data:Object.assign({},r),error:i})}catch(e){if(I(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async _exchangeCodeForSession(e,t){let n=t?.flowId!=null,r=n?oa(t?.flowId):Hi()?oa(Gi(window.location.href)[ci]):null;n&&!r&&this._debug(`#_exchangeCodeForSession()`,`provided flowId is not a valid flow id`,t?.flowId);let{verifier:i,flowId:a}=n&&!r?{verifier:null,flowId:null}:await fa(this.storage,this.storageKey,r),[o,s]=(i??``).split(`/`);try{if(!o&&this.flowType===`pkce`)throw new xi;let{data:t,error:n}=await L(this.fetch,`POST`,`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:e,code_verifier:o},xform:Ma});if(await pa(this.storage,this.storageKey,a),n)throw n;if(!t||!t.session||!t.user){let e=new gi;return this._returnResult({data:{user:null,session:null,redirectType:null},error:e})}return t.session&&(await this._saveSession(t.session),await this._notifyAllSubscribers(s===`recovery`?`PASSWORD_RECOVERY`:`SIGNED_IN`,t.session)),this._returnResult({data:Object.assign(Object.assign({},t),{redirectType:s??null}),error:n})}catch(e){if(await pa(this.storage,this.storageKey,a),I(e))return this._returnResult({data:{user:null,session:null,redirectType:null},error:e});throw e}}async signInWithIdToken(e){try{let{options:t,provider:n,token:r,access_token:i,nonce:a}=e,{data:o,error:s}=await L(this.fetch,`POST`,`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:n,id_token:r,access_token:i,nonce:a,gotrue_meta_security:{captcha_token:t?.captchaToken}},xform:Ma});if(s)return this._returnResult({data:{user:null,session:null},error:s});if(!o||!o.session||!o.user){let e=new gi;return this._returnResult({data:{user:null,session:null},error:e})}return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers(`SIGNED_IN`,o.session)),this._returnResult({data:o,error:s})}catch(e){if(I(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async signInWithOtp(e){let t=null;try{if(`email`in e){let{email:n,options:r}=e,i=null,a=null;this.flowType===`pkce`&&([i,a,t]=await this._getCodeChallengeAndMethod());let{error:o}=await L(this.fetch,`POST`,`${this.url}/otp`,{headers:this.headers,body:{email:n,data:r?.data??{},create_user:r?.shouldCreateUser??!0,gotrue_meta_security:{captcha_token:r?.captchaToken},code_challenge:i,code_challenge_method:a},redirectTo:this._maybeAppendFlowIdToRedirect(r?.emailRedirectTo,t)});return this._returnResult({data:{user:null,session:null},error:o})}if(`phone`in e){let{phone:t,options:n}=e,{data:r,error:i}=await L(this.fetch,`POST`,`${this.url}/otp`,{headers:this.headers,body:{phone:t,data:n?.data??{},create_user:n?.shouldCreateUser??!0,gotrue_meta_security:{captcha_token:n?.captchaToken},channel:n?.channel??`sms`}});return this._returnResult({data:{user:null,session:null,messageId:r?.message_id},error:i})}throw new _i(`You must provide either an email or phone number.`)}catch(e){if(await pa(this.storage,this.storageKey,t),I(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async verifyOtp(e){try{let t,n;`options`in e&&(t=e.options?.redirectTo,n=e.options?.captchaToken);let{data:r,error:i}=await L(this.fetch,`POST`,`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},e),{gotrue_meta_security:{captcha_token:n}}),redirectTo:t,xform:Ma});if(i)throw i;if(!r)throw Error(`An error occurred on token verification.`);let a=r.session,o=r.user;return a?.access_token&&(await this._saveSession(a),await this._notifyAllSubscribers(e.type==`recovery`?`PASSWORD_RECOVERY`:`SIGNED_IN`,a)),this._returnResult({data:{user:o,session:a},error:null})}catch(e){if(I(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async signInWithSSO(e){let t=null;try{let n=null,r=null;this.flowType===`pkce`&&([n,r,t]=await this._getCodeChallengeAndMethod());let i=await L(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:this._maybeAppendFlowIdToRedirect(e.options?.redirectTo,t)}),e?.options?.captchaToken?{gotrue_meta_security:{captcha_token:e.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:n,code_challenge_method:r}),headers:this.headers,xform:Fa});return i.data?.url&&Hi()&&!e.options?.skipBrowserRedirect&&window.location.assign(i.data.url),this._returnResult(i)}catch(e){if(await pa(this.storage,this.storageKey,t),I(e))return this._returnResult({data:null,error:e});throw e}}async reauthenticate(){return await this.initializePromise,this.lock==null?await this._reauthenticate():await this._acquireLock(this.lockAcquireTimeout,async()=>await this._reauthenticate())}async _reauthenticate(){try{return await this._useSession(async e=>{let{data:{session:t},error:n}=e;if(n)throw n;if(!t)throw new mi;let{error:r}=await L(this.fetch,`GET`,`${this.url}/reauthenticate`,{headers:this.headers,jwt:t.access_token});return this._returnResult({data:{user:null,session:null},error:r})})}catch(e){if(I(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async resend(e){let t=null;try{let n=`${this.url}/resend`;if(`email`in e){let{email:r,type:i,options:a}=e,o=null,s=null;this.flowType===`pkce`&&([o,s,t]=await this._getCodeChallengeAndMethod());let{error:c}=await L(this.fetch,`POST`,n,{headers:this.headers,body:{email:r,type:i,gotrue_meta_security:{captcha_token:a?.captchaToken}
11,code_challenge:o,code_challenge_method:s},redirectTo:this._maybeAppendFlowIdToRedirect(a?.emailRedirectTo,t)});return c&&await pa(this.storage,this.storageKey,t),this._returnResult({data:{user:null,session:null},error:c})}if(`phone`in e){let{phone:t,type:r,options:i}=e,{data:a,error:o}=await L(this.fetch,`POST`,n,{headers:this.headers,body:{phone:t,type:r,gotrue_meta_security:{captcha_token:i?.captchaToken}}});return this._returnResult({data:{user:null,session:null,messageId:a?.message_id},error:o})}throw new _i(`You must provide either an email or phone number and a type`)}catch(e){if(await pa(this.storage,this.storageKey,t),I(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async getSession(){return await this.initializePromise,this.lock==null?await this._useSession(async e=>e):await this._acquireLock(this.lockAcquireTimeout,async()=>this._useSession(async e=>e))}async _acquireLock(e,t){this._debug(`#_acquireLock`,`begin`,e);try{if(this.lockAcquired){let e=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),n=(async()=>(await e,await t()))();return this.pendingInLock.push((async()=>{try{await n}catch{}})()),n}return await this.lock(`lock:${this.storageKey}`,e,async()=>{this._debug(`#_acquireLock`,`lock acquired for storage key`,this.storageKey);try{this.lockAcquired=!0;let e=t();for(this.pendingInLock.push((async()=>{try{await e}catch{}})()),await e;this.pendingInLock.length;){let e=[...this.pendingInLock];await Promise.all(e),this.pendingInLock.splice(0,e.length)}return await e}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{return await e(await this.__loadSession())}finally{this._debug(`#_useSession`,`end`)}}async __loadSession(){this._debug(`#__loadSession()`,`begin`),this.lock!=null&&!this.lockAcquired&&this._debug(`#__loadSession()`,`used outside of an acquired lock!`,Error().stack);try{let e=null,t=await Yi(this.storage,this.storageKey);if(this._debug(`#getSession()`,`session from storage`,t),t!==null&&(this._isValidSession(t)?e=t:(this._debug(`#getSession()`,`session from storage is not valid`),await this._removeSession())),!e)return{data:{session:null},error:null};let n=e.expires_at?e.expires_at*1e3-Date.now()<ei:!1;if(this._debug(`#__loadSession()`,`session has${n?``:` not`} expired`,`expires_at`,e.expires_at),!n)return{data:{session:await this._hydrateSessionUser(e)},error:null};let{data:r,error:i}=await this._callRefreshToken(e.refresh_token);if(i){let e=await Yi(this.storage,this.storageKey);return e&&this._isValidSession(e)&&e.expires_at&&e.expires_at*1e3>Date.now()?this._returnResult({data:{session:await this._hydrateSessionUser(e)},error:null}):this._returnResult({data:{session:null},error:i})}return this._returnResult({data:{session:r},error:null})}finally{this._debug(`#__loadSession()`,`end`)}}async _hydrateSessionUser(e){if(this.userStorage){let t=await Yi(this.userStorage,this.storageKey+`-user`);e.user=t?.user?t.user:wa()}if(this.storage.isServer&&e.user&&!e.user.__isUserNotAvailableProxy){let t={value:this.suppressGetSessionWarning};e.user=Ta(e.user,t),t.value&&(this.suppressGetSessionWarning=!0)}return e}async getUser(e){if(e)return await this._getUser(e);await this.initializePromise;let t;return t=this.lock==null?await this._getUser():await this._acquireLock(this.lockAcquireTimeout,async()=>await this._getUser()),t.data.user&&(this.suppressGetSessionWarning=!0),t}async _getUser(e){try{return e?await L(this.fetch,`GET`,`${this.url}/user`,{headers:this.headers,jwt:e,xform:Pa}):await this._useSession(async e=>{let{data:t,error:n}=e;if(n)throw n;return!t.session?.access_token&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new mi}:await L(this.fetch,`GET`,`${this.url}/user`,{headers:this.headers,jwt:t.session?.access_token??void 0,xform:Pa})})}catch(e){if(I(e))return hi(e)&&await this._removeSession(),this._returnResult({data:{user:null},error:e});throw e}}async updateUser(e,t={}){return await this.initializePromise,this.lock==null?await this._updateUser(e,t):await this._acquireLock(this.lockAcquireTimeout,async()=>await this._updateUser(e,t))}async _updateUser(e,t={}){let n=null;try{return await this._useSession(async r=>{let{data:i,error:a}=r;if(a)throw a;if(!i.session)throw new mi;let o=i.session,s=null,c=null;this.flowType===`pkce`&&e.email!=null&&([s,c,n]=await this._getCodeChallengeAndMethod());let{data:l,error:u}=await L(this.fetch,`PUT`,`${this.url}/user`,{headers:this.headers,redirectTo:this._maybeAppendFlowIdToRedirect(t?.emailRedirectTo,n),body:Object.assign(Object.assign({},e),{code_challenge:s,code_challenge_method:c}),jwt:o.access_token,xform:Pa});if(u)throw u;return o.user=l.user,await this._saveSession(o),await this._notifyAllSubscribers(`USER_UPDATED`,o),this._returnResult({data:{user:o.user},error:null})})}catch(e){if(await pa(this.storage,this.storageKey,n),I(e))return this._returnResult({data:{user:null},error:e});throw e}}async setSession(e){return await this.initializePromise,this.lock==null?await this._setSession(e):await this._acquireLock(this.lockAcquireTimeout,async()=>await this._setSession(e))}async _setSession(e){try{if(!e.access_token||!e.refresh_token)throw new mi;let t=Date.now()/1e3,n=t,r=!0,i=null,{payload:a}=Qi(e.access_token);if(a.exp&&(n=a.exp,r=n<=t),r){let{data:t,error:n}=await this._callRefreshToken(e.refresh_token);if(n)return this._returnResult({data:{user:null,session:null},error:n});if(!t)return{data:{user:null,session:null},error:null};i=t}else{let{data:r,error:a}=await this._getUser(e.access_token);if(a)return this._returnResult({data:{user:null,session:null},error:a});i={access_token:e.access_token,refresh_token:e.refresh_token,user:r.user,token_type:`bearer`,expires_in:n-t,expires_at:n},await this._saveSession(i),await this._notifyAllSubscribers(`SIGNED_IN`,i)}return this._returnResult({data:{user:i.user,session:i},error:null})}catch(e){if(I(e))return this._returnResult({data:{session:null,user:null},error:e});throw e}}async refreshSession(e){return await this.initializePromise,this.lock==null?await this._refreshSession(e):await this._acquireLock(this.lockAcquireTimeout,async()=>await this._refreshSession(e))}async _refreshSession(e){try{return await this._useSession(async t=>{if(!e){let{data:n,error:r}=t;if(r)throw r;e=n.session??void 0}if(!e?.refresh_token)throw new mi;let{data:n,error:r}=await this._callRefreshToken(e.refresh_token);return r?this._returnResult({data:{user:null,session:null},error:r}):n?this._returnResult({data:{user:n.user,session:n},error:null}):this._returnResult({data:{user:null,session:null},error:null})})}catch(e){if(I(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async _getSessionFromURL(e,t){try{if(!Hi())throw new vi(`No browser detected.`);if(e.error||e.error_description||e.error_code)throw new vi(e.error_description||`Error in URL with unspecified error_description`,{error:e.error||`unspecified_error`,code:e.error_code||`unspecified_code`});switch(t){case`implicit`:if(this.flowType===`pkce`)throw new bi(`Not a valid PKCE flow url.`);break;case`pkce`:if(this.flowType===`implicit`)throw new vi(`Not a valid implicit grant flow url.`)}if(t===`pkce`){if(this._debug(`#_initialize()`,`begin`,`is PKCE flow`,!0),!e.code)throw new bi(`No code detected.`);let{data:t,error:n}=await this._exchangeCodeForSession(e.code,{flowId:e[ci]});if(n)throw n;let r=new URL(window.location.href);return r.searchParams.delete(`code`),r.searchParams.delete(ci),window.history.replaceState(window.history.state,``,r.toString()),{data:{session:t.session,redirectType:t.redirectType??null},error:null}}let{provider_token:n,provider_refresh_token:r,access_token:i,refresh_token:a,expires_in:o,expires_at:s,token_type:c}=e;if(!i||!o||!a||!c)throw new vi(`No session defined in URL`);let l=Math.round(Date.now()/1e3),u=parseInt(o),d=l+u;s&&(d=parseInt(s));let f=d-l;
11f*1e3<=3e4&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${f}s, should have been closer to ${u}s`);let p=d-u;l-p>=120?console.warn(`@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale`,p,d,l):l-p<0&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew`,p,d,l);let{data:m,error:h}=await this._getUser(i);if(h)throw h;let g={provider_token:n,provider_refresh_token:r,access_token:i,expires_in:u,expires_at:d,refresh_token:a,token_type:c,user:m.user};return window.location.hash=``,this._debug(`#_getSessionFromURL()`,`clearing window.location.hash`),this._returnResult({data:{session:g,redirectType:e.type},error:null})}catch(e){if(I(e))return this._returnResult({data:{session:null,redirectType:null},error:e});throw e}}_isImplicitGrantCallback(e){return typeof this.detectSessionInUrl==`function`?this.detectSessionInUrl(new URL(window.location.href),e):!!(e.access_token||e.error||e.error_description||e.error_code)}async _isPKCECallback(e){if(!e.code)return!1;let t=oa(e[ci]);return t&&await Yi(this.storage,ca(this.storageKey,t))?!0:!!await Yi(this.storage,`${this.storageKey}-code-verifier`)}async signOut(e={scope:`global`}){return await this.initializePromise,this.lock==null?await this._signOut(e):await this._acquireLock(this.lockAcquireTimeout,async()=>await this._signOut(e))}async _signOut({scope:e}={scope:`global`}){return await this._useSession(async t=>{let n=async()=>{await this._removeSession()},{data:r,error:i}=t;if(i&&!hi(i))return this._returnResult({error:i});let a=r.session?.access_token;if(a){let{error:t}=await this.admin.signOut(a,e);if(t&&!(di(t)&&(t.status===404||t.status===401||t.status===403)||hi(t)))return e!==`others`&&await n(),this._returnResult({error:t})}return e!==`others`&&await n(),this._returnResult({error:null})})}onAuthStateChange(e){let t=Vi(),n={id:t,callback:e,unsubscribe:()=>{this._debug(`#unsubscribe()`,`state change callback with id removed`,t),this.stateChangeEmitters.delete(t)}};return this._debug(`#onAuthStateChange()`,`registered callback with id`,t),this.stateChangeEmitters.set(t,n),(async()=>{await this.initializePromise,this.lock==null?await this._emitInitialSession(t):await this._acquireLock(this.lockAcquireTimeout,async()=>{this._emitInitialSession(t)})})(),{data:{subscription:n}}}async _emitInitialSession(e){return await this._useSession(async t=>{try{let{data:{session:n},error:r}=t;if(r)throw r;await this.stateChangeEmitters.get(e)?.callback(`INITIAL_SESSION`,n),this._debug(`INITIAL_SESSION`,`callback id`,e,`session`,n)}catch(t){if(await this.stateChangeEmitters.get(e)?.callback(`INITIAL_SESSION`,null),this._debug(`INITIAL_SESSION`,`callback id`,e,`error`,t),Ti(t))return;hi(t)||Ci(t)||di(t)&&(t.code===`refresh_token_not_found`||t.code===`refresh_token_already_used`||t.code===`session_expired`)?console.warn(t):console.error(t)}})}async resetPasswordForEmail(e,t={}){let n=null,r=null,i=null;this.flowType===`pkce`&&([n,r,i]=await this._getCodeChallengeAndMethod(!0));try{return await L(this.fetch,`POST`,`${this.url}/recover`,{body:{email:e,code_challenge:n,code_challenge_method:r,gotrue_meta_security:{captcha_token:t.captchaToken}},headers:this.headers,redirectTo:this._maybeAppendFlowIdToRedirect(t.redirectTo,i)})}catch(e){if(await pa(this.storage,this.storageKey,i),I(e))return this._returnResult({data:null,error:e});throw e}}async getUserIdentities(){try{let{data:e,error:t}=await this.getUser();if(t)throw t;return this._returnResult({data:{identities:e.user.identities??[]},error:null})}catch(e){if(I(e))return this._returnResult({data:null,error:e});throw e}}async linkIdentity(e){return`token`in e?this.linkIdentityIdToken(e):this.linkIdentityOAuth(e)}async linkIdentityOAuth(e){let t=null;try{let{data:n,error:r}=await this._useSession(async n=>{let{data:r,error:i}=n;if(i)throw i;let{url:a,flowId:o}=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,e.provider,{redirectTo:e.options?.redirectTo,scopes:e.options?.scopes,queryParams:e.options?.queryParams,skipBrowserRedirect:!0});return t=o,await L(this.fetch,`GET`,a,{headers:this.headers,jwt:r.session?.access_token??void 0})});if(r)throw r;return Hi()&&!e.options?.skipBrowserRedirect&&window.location.assign(n?.url),this._returnResult({data:{provider:e.provider,url:n?.url,flowId:t},error:null})}catch(n){if(I(n))return this._returnResult({data:{provider:e.provider,url:null,flowId:t},error:n});throw n}}async linkIdentityIdToken(e){return await this._useSession(async t=>{try{let{error:n,data:{session:r}}=t;if(n)throw n;let{options:i,provider:a,token:o,access_token:s,nonce:c}=e,{data:l,error:u}=await L(this.fetch,`POST`,`${this.url}/token?grant_type=id_token`,{headers:this.headers,jwt:r?.access_token??void 0,body:{provider:a,id_token:o,access_token:s,nonce:c,link_identity:!0,gotrue_meta_security:{captcha_token:i?.captchaToken}},xform:Ma});return u?this._returnResult({data:{user:null,session:null},error:u}):!l||!l.session||!l.user?this._returnResult({data:{user:null,session:null},error:new gi}):(l.session&&(await this._saveSession(l.session),await this._notifyAllSubscribers(`USER_UPDATED`,l.session)),this._returnResult({data:l,error:u}))}catch(e){if(await pa(this.storage,this.storageKey,null),I(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}})}async unlinkIdentity(e){try{return await this._useSession(async t=>{let{data:n,error:r}=t;if(r)throw r;return await L(this.fetch,`DELETE`,`${this.url}/user/identities/${e.identity_id}`,{headers:this.headers,jwt:n.session?.access_token??void 0})})}catch(e){if(I(e))return this._returnResult({data:null,error:e});throw e}}async _refreshAccessToken(e){let t=`#_refreshAccessToken()`;this._debug(t,`begin`);try{let n=Date.now();return await ea(async n=>(n>0&&await $i(200*2**(n-1)),this._debug(t,`refreshing attempt`,n),await L(this.fetch,`POST`,`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:e},headers:this.headers,xform:Ma})),(e,t)=>{let r=200*2**e;return t&&Ci(t)&&Date.now()+r-n<3e4})}catch(e){if(this._debug(t,`error`,e),I(e))return this._returnResult({data:{session:null,user:null},error:e});throw e}finally{this._debug(t,`end`)}}_isValidSession(e){return typeof e==`object`&&!!e&&`access_token`in e&&`refresh_token`in e&&`expires_at`in e}async _handleProviderSignIn(e,t){let{url:n,flowId:r}=await this._getUrlForProvider(`${this.url}/authorize`,e,{redirectTo:t.redirectTo,scopes:t.scopes,queryParams:t.queryParams});return this._debug(`#_handleProviderSignIn()`,`provider`,e,`options`,t,`url`,n),Hi()&&!t.skipBrowserRedirect&&window.location.assign(n),{data:{provider:e,url:n,flowId:r},error:null}}async _recoverAndRefresh(){let e=`#_recoverAndRefresh()`;this._debug(e,`begin`);try{let t=await Yi(this.storage,this.storageKey);if(t&&this.userStorage){let e=await Yi(this.userStorage,this.storageKey+`-user`);!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!e&&(e={user:t.user},await Ji(this.userStorage,this.storageKey+`-user`,e)),t.user=e?.user??wa()}else if(t&&!t.user&&!t.user){let e=await Yi(this.storage,this.storageKey+`-user`);e&&e?.user?(t.user=e.user,await Xi(this.storage,this.storageKey+`-user`),await Ji(this.storage,this.storageKey,t)):t.user=wa()}if(this._debug(e,`session from storage`,t),!this._isValidSession(t)){this._debug(e,`session is not val
11id`),t!==null&&await this._removeSession();return}let n=(t.expires_at??1/0)*1e3-Date.now()<ei;if(this._debug(e,`session has${n?``:` not`} expired with margin of ${ei}s`),n){if(this.autoRefreshToken&&t.refresh_token){let{error:n}=await this._callRefreshToken(t.refresh_token);n&&(Ti(n)?this._debug(e,`refresh discarded by commit guard`,n):this._debug(e,`refresh failed`,n))}}else if(t.user&&t.user.__isUserNotAvailableProxy===!0)try{let{data:n,error:r}=await this._getUser(t.access_token);!r&&n?.user?(t.user=n.user,await this._saveSession(t),await this._notifyAllSubscribers(`SIGNED_IN`,t)):this._debug(e,`could not get user data, skipping SIGNED_IN notification`)}catch(t){console.error(`Error getting user data:`,t),this._debug(e,`error getting user data, skipping SIGNED_IN notification`,t)}else await this._notifyAllSubscribers(`SIGNED_IN`,t)}catch(t){this._debug(e,`error`,t),Ci(t)?console.warn(t):console.error(t);return}finally{this._debug(e,`end`)}}async _callRefreshToken(e){var t,n;if(!e)throw new mi;if(this.refreshingDeferred)return this.refreshingDeferred.promise;if(this.lastRefreshFailure&&this.lastRefreshFailure.refreshToken===e&&Date.now()<this.lastRefreshFailure.expiresAt)return this._debug(`#_callRefreshToken()`,`returning cached failure (cooldown active)`),this.lastRefreshFailure.result;let r=`#_callRefreshToken()`;this._debug(r,`begin`);try{this.refreshingDeferred=new Zi,this.refreshingDeferred.promise.then(void 0,()=>{});let t=await Yi(this.storage,this.storageKey),{data:n,error:i}=await this._refreshAccessToken(e);if(i)throw i;if(!n.session)throw new mi;let a=await Yi(this.storage,this.storageKey);if(t!==null&&(a===null||a.refresh_token!==t.refresh_token)){this._debug(r,`commit guard: storage changed since refresh started, discarding rotated tokens`,{startedWith:`present`,nowHolds:a?`replaced`:`cleared`});let e={data:null,error:new wi};return this.refreshingDeferred.resolve(e),e}let o=this._sessionRemovalEpoch;if(await this._saveSession(n.session),this._sessionRemovalEpoch!==o){this._debug(r,`commit guard (post-save): _removeSession ran during _saveSession, undoing write`),await Xi(this.storage,this.storageKey),this.userStorage&&await Xi(this.userStorage,this.storageKey+`-user`);let e={data:null,error:new wi};return this.refreshingDeferred.resolve(e),e}await this._notifyAllSubscribers(`TOKEN_REFRESHED`,n.session);let s={data:n.session,error:null};return this.lastRefreshFailure=null,this.refreshingDeferred.resolve(s),s}catch(i){if(this._debug(r,`error`,i),I(i)){let n={data:null,error:i};if(!Ci(i)){let e=await Yi(this.storage,this.storageKey);e?.expires_at&&e.expires_at*1e3>Date.now()?this._debug(r,`proactive refresh failed, access token still valid — preserving session`):await this._removeSession()}return this.lastRefreshFailure={refreshToken:e,result:n,expiresAt:Date.now()+ti},(t=this.refreshingDeferred)==null||t.resolve(n),n}throw(n=this.refreshingDeferred)==null||n.reject(i),i}finally{this.refreshingDeferred=null,this._debug(r,`end`)}}async _notifyAllSubscribers(e,t,n=!0){if(this._pendingInitNotifications!==null&&n){this._pendingInitNotifications.push({event:e,session:t,broadcast:n});return}let r=`#_notifyAllSubscribers(${e})`;this._debug(r,`begin`,t,`broadcast = ${n}`);try{this.broadcastChannel&&n&&this.broadcastChannel.postMessage({event:e,session:t});let r=[],i=Array.from(this.stateChangeEmitters.values()).map(async n=>{try{await n.callback(e,t)}catch(e){r.push(e)}});if(await Promise.all(i),r.length>0){for(let e=0;e<r.length;e+=1)console.error(r[e]);throw r[0]}}finally{this._debug(r,`end`)}}async _saveSession(e){this._debug(`#_saveSession()`,e),this.suppressGetSessionWarning=!0;let t=Object.assign({},e),n=t.user&&t.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!n&&t.user&&await Ji(this.userStorage,this.storageKey+`-user`,{user:t.user});let e=Object.assign({},t);delete e.user;let r=Ea(e);await Ji(this.storage,this.storageKey,r)}else{let e=Ea(t);await Ji(this.storage,this.storageKey,e)}}async _removeSession(){this._sessionRemovalEpoch+=1,this._debug(`#_removeSession()`),this.lastRefreshFailure=null,this.suppressGetSessionWarning=!1,await Xi(this.storage,this.storageKey),await ma(this.storage,this.storageKey),await Xi(this.storage,this.storageKey+`-user`),this.userStorage&&await Xi(this.userStorage,this.storageKey+`-user`),await this._notifyAllSubscribers(`SIGNED_OUT`,null)}_removeVisibilityChangedCallback(){this._debug(`#_removeVisibilityChangedCallback()`);let e=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{e&&Hi()&&window!=null&&window.removeEventListener&&window.removeEventListener(`visibilitychange`,e)}
11catch(e){console.error(`removing visibilitychange callback failed`,e)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug(`#_startAutoRefresh()`);let e=setInterval(()=>this._autoRefreshTokenTick(),$r);this.autoRefreshTicker=e,e&&typeof e==`object`&&typeof e.unref==`function`?e.unref():typeof Deno<`u`&&typeof Deno.unrefTimer==`function`&&Deno.unrefTimer(e);let t=setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0);this.autoRefreshTickTimeout=t,t&&typeof t==`object`&&typeof t.unref==`function`?t.unref():typeof Deno<`u`&&typeof Deno.unrefTimer==`function`&&Deno.unrefTimer(t)}async _stopAutoRefresh(){this._debug(`#_stopAutoRefresh()`);let e=this.autoRefreshTicker;this.autoRefreshTicker=null,e&&clearInterval(e);let t=this.autoRefreshTickTimeout;this.autoRefreshTickTimeout=null,t&&clearTimeout(t)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async dispose(){var e;this._removeVisibilityChangedCallback(),await this._stopAutoRefresh(),(e=this.broadcastChannel)==null||e.close(),this.broadcastChannel=null,this.stateChangeEmitters.clear()}async _autoRefreshTokenTick(){if(this._debug(`#_autoRefreshTokenTick()`,`begin`),this.lock!=null){try{await this._acquireLock(0,async()=>{try{let e=Date.now();try{return await this._useSession(async t=>{let{data:{session:n}}=t;if(!n||!n.refresh_token||!n.expires_at){this._debug(`#_autoRefreshTokenTick()`,`no session`);return}let r=Math.floor((n.expires_at*1e3-e)/$r);this._debug(`#_autoRefreshTokenTick()`,`access token expires in ${r} ticks, a tick lasts ${$r}ms, refresh threshold is 3 ticks`),r<=3&&await this._callRefreshToken(n.refresh_token)})}catch(e){console.error(`Auto refresh tick failed with error. This is likely a transient error.`,e)}}finally{this._debug(`#_autoRefreshTokenTick()`,`end`)}})}catch(e){if(e instanceof Ha)this._debug(`auto refresh token tick lock not available`);else throw e}return}if(this.refreshingDeferred!==null){this._debug(`#_autoRefreshTokenTick()`,`refresh already in flight, skipping`);return}try{let e=Date.now();try{await this._useSession(async t=>{let{data:{session:n}}=t;if(!n||!n.refresh_token||!n.expires_at){this._debug(`#_autoRefreshTokenTick()`,`no session`);return}let r=Math.floor((n.expires_at*1e3-e)/$r);this._debug(`#_autoRefreshTokenTick()`,`access token expires in ${r} ticks, a tick lasts ${$r}ms, refresh threshold is 3 ticks`),r<=3&&await this._callRefreshToken(n.refresh_token)})}catch(e){console.error(`Auto refresh tick failed with error. This is likely a transient error.`,e)}}finally{this._debug(`#_autoRefreshTokenTick()`,`end`)}}async _handleVisibilityChange(){if(this._debug(`#_handleVisibilityChange()`),!Hi()||!(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){let t=`#_onVisibilityChanged(${e})`;if(this._debug(t,`visibilityState`,document.visibilityState),document.visibilityState===`visible`){if(this.autoRefreshToken&&this._startAutoRefresh(),!e)if(await this.initializePromise,this.lock!=null)await this._acquireLock(this.lockAcquireTimeout,async()=>{if(document.visibilityState!==`visible`){this._debug(t,`acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting`);return}await this._recoverAndRefresh()});else{if(document.visibilityState!==`visible`){this._debug(t,`visibilityState is no longer visible, skipping recovery`);return}await this._recoverAndRefresh()}}else document.visibilityState===`hidden`&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(e,t,n){let r=n?.redirectTo,i=null,a=null,o=null;this.flowType===`pkce`&&([i,a,o]=await this._getCodeChallengeAndMethod(),r=this._maybeAppendFlowIdToRedirect(r,o));let s=[`provider=${encodeURIComponent(t)}`];if(r&&s.push(`redirect_to=${encodeURIComponent(r)}`),n?.scopes&&s.push(`scopes=${encodeURIComponent(n.scopes)}`),i!=null&&a!=null){let e=new URLSearchParams({code_challenge:`${encodeURIComponent(i)}`,code_challenge_method:`${encodeURIComponent(a)}`});s.push(e.toString())}if(n?.queryParams){let e=new URLSearchParams(n.queryParams);s.push(e.toString())}return n?.skipBrowserRedirect&&s.push(`skip_http_redirect=${n.skipBrowserRedirect}`),{url:`${e}?${s.join(`&`)}`,flowId:o}}_maybeAppendFlowIdToRedirect(e,t){return!e||!t||!this.experimental.appendPkceFlowIdToRedirects?e??void 0:ha(e,t)}async _getCodeChallengeAndMethod(e=!1){return ga(this.storage,this.storageKey,e,e=>this._debug(`#_getCodeChallengeAndMethod()`,`evicted oldest pending PKCE verifier slot`,e))}async _unenroll(e){try{return await this._useSession(async t=>{let{data:n,error:r}=t;return r?this._returnResult({data:null,error:r}):await L(this.fetch,`DELETE`,`${this.url}/factors/${e.factorId}`,{headers:this.headers,jwt:n?.session?.access_token})})}catch(e){if(I(e))return this._returnResult({data:null,error:e});throw e}}async _enroll(e){try{return await this._useSession(async t=>{let{data:n,error:r}=t;if(r)return this._returnResult({data:null,error:r});let i=Object.assign({friendly_name:e.friendlyName,factor_type:e.factorType},e.factorType===`phone`?{phone:e.phone}:e.factorType===`totp`?{issuer:e.issuer}:{}),{data:a,error:o}=await L(this.fetch,`POST`,`${this.url}/factors`,{body:i,headers:this.headers,jwt:n?.session?.access_token});return o?this._returnResult({data:null,error:o}):(e.factorType===`totp`&&a.type===`totp`&&a?.totp?.qr_code&&(a.totp.qr_code=`data:image/svg+xml;utf-8,${a.totp.qr_code}`),this._returnResult({data:a,error:null}))})}catch(e){if(I(e))return this._returnResult({data:null,error:e});throw e}}async _verify(e){let t=async()=>{try{return await this._useSession(async t=>{let{data:n,error:r}=t;if(r)return this._returnResult({data:null,error:r});let i=Object.assign({challenge_id:e.challengeId},`webauthn`in e?{webauthn:Object.assign(Object.assign({},e.webauthn),{credential_response:e.webauthn.type===`create`?eo(e.webauthn.credential_response):to(e.webauthn.credential_response)})}:{code:e.code}),{data:a,error:o}=await L(this.fetch,`POST`,`${this.url}/factors/${e.factorId}/verify`,{body:i,headers:this.headers,jwt:n?.session?.access_token});return o?this._returnResult({data:null,error:o}):(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+a.expires_in},a)),await this._notifyAllSubscribers(`MFA_CHALLENGE_VERIFIED`,a),this._returnResult({data:a,error:o}))})}catch(e){if(I(e))return this._returnResult({data:null,error:e});throw e}};return this.lock==null?t():this._acquireLock(this.lockAcquireTimeout,t)}async _challenge(e){let t=async()=>{try{return await this._useSession(async t=>{let{data:n,error:r}=t;if(r)return this._returnResult({data:null,error:r});let i=await L(this.fetch,`POST`,`${this.url}/factors/${e.factorId}/challenge`,{body:e,headers:this.headers,jwt:n?.session?.access_token});if(i.error)return i;let{data:a}=i;if(a.type!==`webauthn`)return{data:a,error:null};switch(a.webauthn.type){case`create`:return{data:Object.assign(Object.assign({},a),{webauthn:Object.assign(Object.assign({},a.webauthn),{credential_options:Object.assign(Object.assign({},a.webauthn.credential_options),{publicKey:Qa(a.webauthn.credential_options.publicKey)})})}),error:null};case`request`:return{data:Object.assign(Object.assign({},a),{webauthn:Object.assign(Object.assign({},a.webauthn),{credential_options:Object.assign(Object.assign({},a.webauthn.credential_options),{publicKey:$a(a.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(e){if(I(e))return this._returnResult({data:null,error:e});throw e}};return this.lock==null?t():this._acquireLock(this.lockAcquireTimeout,t)}async _challengeAndVerify(e){let{data:t,error:n}=await this._challenge({factorId:e.factorId});return n?this._returnResult({data:null,error:n}):await this._verify({factorId:e.factorId,challengeId:t.id,code:e.code})}async _listFactors(){let{data:{user:e},error:t}=await this.getUser();if(t)return{data:null,error:t};let n={all:[],phone:[],totp:[],webauthn:[],recovery_code:[]};for(let t of e?.factors??[])n.all.push(t),t.status===`verified`&&t.factor_type in n&&Array.isArray(n[t.factor_type])&&n[t.factor_type].push(t);return{data:n,error:null}}async _getAuthenticatorAssuranceLevel(e){if(e)try{let{payload:t}=Qi(e),n=null;t.aal&&(n=t.aal);let r=n,{data:{user:i},error:a}=await this.getUser(e);if(a)return this._returnResult({data:null,error:a});((i?.factors)?.filter(e=>e.status===`verified`)??[]).length>0&&(r=`aal2`);let o=t.amr||[];return{data:{currentLevel:n,nextLevel:r,currentAuthenticationMethods:o},error:null}}catch(e){if(I(e))return this._returnResult({data:null,error:e});throw e}let{data:{session:t},error:n}
11=await this.getSession();if(n)return this._returnResult({data:null,error:n});if(!t)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};let{payload:r}=Qi(t.access_token),i=null;r.aal&&(i=r.aal);let a=i;(t.user.factors?.filter(e=>e.status===`verified`)??[]).length>0&&(a=`aal2`);let o=r.amr||[];return{data:{currentLevel:i,nextLevel:a,currentAuthenticationMethods:o},error:null}}async _getRecoveryCodesStatus(){Ca(this.experimental);try{return await this._useSession(async e=>{let{data:t,error:n}=e;if(n)return this._returnResult({data:null,error:n});let{data:r,error:i}=await L(this.fetch,`GET`,`${this.url}/factors/recovery-codes`,{headers:this.headers,jwt:t?.session?.access_token});return i?this._returnResult({data:null,error:i}):this._returnResult({data:r,error:null})})}catch(e){if(I(e))return this._returnResult({data:null,error:e});throw e}}async _generateRecoveryCodes(e){Ca(this.experimental);try{return await this._useSession(async t=>{let{data:n,error:r}=t;if(r)return this._returnResult({data:null,error:r});let{data:i,error:a}=await L(this.fetch,`POST`,`${this.url}/factors/recovery-codes`,{body:e?.friendlyName?{friendly_name:e.friendlyName}:void 0,headers:this.headers,jwt:n?.session?.access_token});return a?this._returnResult({data:null,error:a}):this._returnResult({data:i,error:null})})}catch(e){if(I(e))return this._returnResult({data:null,error:e});throw e}}async _verifyRecoveryCode(e){Ca(this.experimental);let t=async()=>{try{return await this._useSession(async t=>{let{data:n,error:r}=t;if(r)return this._returnResult({data:null,error:r});let{data:i,error:a}=await L(this.fetch,`POST`,`${this.url}/factors/recovery-codes/verify`,{body:{code:e.code},headers:this.headers,jwt:n?.session?.access_token});if(a)return this._returnResult({data:null,error:a});let o=Object.assign({expires_at:Bi(i.expires_in)},i);return await this._saveSession(o),await this._notifyAllSubscribers(`MFA_CHALLENGE_VERIFIED`,o),this._returnResult({data:i,error:null})})}catch(e){if(I(e))return this._returnResult({data:null,error:e});throw e}};return this.lock==null?t():this._acquireLock(this.lockAcquireTimeout,t)}async _regenerateRecoveryCodes(){Ca(this.experimental);try{return await this._useSession(async e=>{let{data:t,error:n}=e;if(n)return this._returnResult({data:null,error:n});let{data:r,error:i}=await L(this.fetch,`POST`,`${this.url}/factors/recovery-codes/regenerate`,{headers:this.headers,jwt:t?.session?.access_token});return i?this._returnResult({data:null,error:i}):this._returnResult({data:r,error:null})})}catch(e){if(I(e))return this._returnResult({data:null,error:e});throw e}}async _unenrollRecoveryCodes(){Ca(this.experimental);try{return await this._useSession(async e=>{let{data:t,error:n}=e;if(n)return this._returnResult({data:null,error:n});let{data:r,error:i}=await L(this.fetch,`DELETE`,`${this.url}/factors/recovery-codes`,{headers:this.headers,jwt:t?.session?.access_token});return i?this._returnResult({data:null,error:i}):this._returnResult({data:r,error:null})})}catch(e){if(I(e))return this._returnResult({data:null,error:e});throw e}}async _getAuthorizationDetails(e){try{return await this._useSession(async t=>{let{data:{session:n},error:r}=t;return r?this._returnResult({data:null,error:r}):n?await L(this.fetch,`GET`,`${this.url}/oauth/authorizations/${e}`,{headers:this.headers,jwt:n.access_token,xform:e=>({data:e,error:null})}):this._returnResult({data:null,error:new mi})})}catch(e){if(I(e))return this._returnResult({data:null,error:e});throw e}}async _approveAuthorization(e,t){try{return await this._useSession(async n=>{let{data:{session:r},error:i}=n;if(i)return this._returnResult({data:null,error:i});if(!r)return this._returnResult({data:null,error:new mi});let a=await L(this.fetch,`POST`,`${this.url}/oauth/authorizations/${e}/consent`,{headers:this.headers,jwt:r.access_token,body:{action:`approve`},xform:e=>({data:e,error:null})});return a.data&&a.data.redirect_url&&Hi()&&!t?.skipBrowserRedirect&&window.location.assign(a.data.redirect_url),a})}catch(e){if(I(e))return this._returnResult({data:null,error:e});throw e}}async _denyAuthorization(e,t){try{return await this._useSession(async n=>{let{data:{session:r},error:i}=n;if(i)return this._returnResult({data:null,error:i});if(!r)return this._returnResult({data:null,error:new mi});let a=await L(this.fetch,`POST`,`${this.url}/oauth/authorizations/${e}/consent`,{headers:this.headers,jwt:r.access_token,body:{action:`deny`},xform:e=>({data:e,error:null})});return a.data&&a.data.redirect_url&&Hi()&&!t?.skipBrowserRedirect&&window.location.assign(a.data.redirect_url),a})}catch(e){if(I(e))return this._returnResult({data:null,error:e});throw e}}async _listOAuthGrants(){try{return await this._useSession(async e=>{let{data:{session:t},error:n}=e;return n?this._returnResult({data:null,error:n}):t?await L(this.fetch,`GET`,`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:t.access_token,xform:e=>({data:e,error:null})}):this._returnResult({data:null,error:new mi})})}catch(e){if(I(e))return this._returnResult({data:null,error:e});throw e}}async _revokeOAuthGrant(e){try{return await this._useSession(async t=>{let{data:{session:n},error:r}=t;return r?this._returnResult({data:null,error:r}):n?(await L(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 mi})})}catch(e){if(I(e))return this._returnResult({data:null,error:e});throw e}}async fetchJwk(e,t={keys:[]}){let n=t.keys.find(t=>t.kid===e);if(n)return n;let r=Date.now();if(n=this.jwks.keys.find(t=>t.kid===e),n&&this.jwks_cached_at+6e5>r)return n;let{data:i,error:a}=await L(this.fetch,`GET`,`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(a)throw a;return!i.keys||i.keys.length===0||(this.jwks=i,this.jwks_cached_at=r,n=i.keys.find(t=>t.kid===e),!n)?null:n}async getClaims(e,t={}){try{let n=e;if(!n){let{data:e,error:t}
11=await this.getSession();if(t||!e.session)return this._returnResult({data:null,error:t});n=e.session.access_token}let{header:r,payload:i,signature:a,raw:{header:o,payload:s}}=Qi(n);if(!t?.allowExpired)try{ya(i.exp)}catch(e){throw new Di(e instanceof Error?e.message:`JWT validation failed`)}let c=!r.alg||r.alg.startsWith(`HS`)||!r.kid||!(`crypto`in globalThis&&`subtle`in globalThis.crypto)?null:await this.fetchJwk(r.kid,t?.keys?{keys:t.keys}:t?.jwks);if(!c){let{error:e}=await this.getUser(n);if(e)throw e;return{data:{claims:i,header:r,signature:a},error:null}}let l=ba(r.alg),u=await crypto.subtle.importKey(`jwk`,c,l,!0,[`verify`]);if(!await crypto.subtle.verify(l,u,a,Ri(`${o}.${s}`)))throw new Di(`Invalid JWT signature`);return{data:{claims:i,header:r,signature:a},error:null}}catch(e){if(I(e))return this._returnResult({data:null,error:e});throw e}}async signInWithPasskey(e){try{if(!ro())return this._returnResult({data:null,error:new fi(`Browser does not support WebAuthn`,null)});let{data:t,error:n}=await this._startPasskeyAuthentication({options:{captchaToken:e?.options?.captchaToken}});if(n||!t)return this._returnResult({data:null,error:n});let{data:r,error:i}=await ao({publicKey:$a(t.options),signal:e?.options?.signal??Za.createNewAbortSignal(),mediation:e?.options?.mediation});if(i||!r)return this._returnResult({data:null,error:i??new fi(`WebAuthn ceremony failed`,null)});let a=to(r);return this._verifyPasskeyAuthentication({challengeId:t.challenge_id,credential:a})}catch(e){if(I(e))return this._returnResult({data:null,error:e});throw e}}async registerPasskey(e){try{if(!ro())return this._returnResult({data:null,error:new fi(`Browser does not support WebAuthn`,null)});let{data:t,error:n}=await this._startPasskeyRegistration();if(n||!t)return this._returnResult({data:null,error:n});let{data:r,error:i}=await io({publicKey:Qa(t.options),signal:e?.options?.signal??Za.createNewAbortSignal()});if(i||!r)return this._returnResult({data:null,error:i??new fi(`WebAuthn ceremony failed`,null)});let a=eo(r);return this._verifyPasskeyRegistration({challengeId:t.challenge_id,credential:a})}catch(e){if(I(e))return this._returnResult({data:null,error:e});throw e}}async _startPasskeyRegistration(){try{return await this._useSession(async e=>{let{data:{session:t},error:n}=e;if(n)return this._returnResult({data:null,error:n});if(!t)return this._returnResult({data:null,error:new mi});let{data:r,error:i}=await L(this.fetch,`POST`,`${this.url}/passkeys/registration/options`,{headers:this.headers,jwt:t.access_token,body:{}});return i?this._returnResult({data:null,error:i}):this._returnResult({data:r,error:null})})}catch(e){if(I(e))return this._returnResult({data:null,error:e});throw e}}async _verifyPasskeyRegistration(e){try{return await this._useSession(async t=>{let{data:{session:n},error:r}=t;if(r)return this._returnResult({data:null,error:r});if(!n)return this._returnResult({data:null,error:new mi});let{data:i,error:a}=await L(this.fetch,`POST`,`${this.url}/passkeys/registration/verify`,{headers:this.headers,jwt:n.access_token,body:{challenge_id:e.challengeId,credential:e.credential}});return a?this._returnResult({data:null,error:a}):this._returnResult({data:i,error:null})})}catch(e){if(I(e))return this._returnResult({data:null,error:e});throw e}}async _startPasskeyAuthentication(e){try{let{data:t,error:n}=await L(this.fetch,`POST`,`${this.url}/passkeys/authentication/options`,{headers:this.headers,body:{gotrue_meta_security:{captcha_token:e?.options?.captchaToken}}});return n?this._returnResult({data:null,error:n}):this._returnResult({data:t,error:null})}catch(e){if(I(e))return this._returnResult({data:null,error:e});throw e}}async _verifyPasskeyAuthentication(e){try{let{data:t,error:n}=await L(this.fetch,`POST`,`${this.url}/passkeys/authentication/verify`,{headers:this.headers,body:{challenge_id:e.challengeId,credential:e.credential},xform:Ma});return n?this._returnResult({data:null,error:n}):(t.session&&(await this._saveSession(t.session),await this._notifyAllSubscribers(`SIGNED_IN`,t.session)),this._returnResult({data:t,error:null}))}catch(e){if(I(e))return this._returnResult({data:null,error:e});throw e}}async _listPasskeys(){try{return await this._useSession(async e=>{let{data:{session:t},error:n}=e;if(n)return this._returnResult({data:null,error:n});if(!t)return this._returnResult({data:null,error:new mi});let{data:r,error:i}=await L(this.fetch,`GET`,`${this.url}/passkeys`,{headers:this.headers,jwt:t.access_token,xform:e=>({data:e,error:null})});return i?this._returnResult({data:null,error:i}):this._returnResult({data:r,error:null})})}catch(e){if(I(e))return this._returnResult({data:null,error:e});throw e}}async _updatePasskey(e){try{return await this._useSession(async t=>{let{data:{session:n},error:r}=t;if(r)return this._returnResult({data:null,error:r});if(!n)return this._returnResult({data:null,error:new mi});let{data:i,error:a}=await L(this.fetch,`PATCH`,`${this.url}/passkeys/${e.passkeyId}`,{headers:this.headers,jwt:n.access_token,body:{friendly_name:e.friendlyName}});return a?this._returnResult({data:null,error:a}):this._returnResult({data:i,error:null})})}catch(e){if(I(e))return this._returnResult({data:null,error:e});throw e}}async _deletePasskey(e){try{return await this._useSession(async t=>{let{data:{session:n},error:r}=t;if(r)return this._returnResult({data:null,error:r});if(!n)return this._returnResult({data:null,error:new mi});let{error:i}=await L(this.fetch,`DELETE`,`${this.url}/passkeys/${e.passkeyId}`,{headers:this.headers,jwt:n.access_token,noResolveJson:!0});return i?this._returnResult({data:null,error:i}):this._returnResult({data:null,error:null})})}catch(e){if(I(e))return this._returnResult({data:null,error:e});throw e}}};go.nextInstanceID={};var _o=go,vo=`2.117.2`,yo=``,bo;if(typeof Deno<`u`)yo=`deno`,bo=Deno.version?.deno;else if(typeof document<`u`)yo=`web`;else if(typeof navigator<`u`&&navigator.product===`ReactNative`)yo=`react-native`;else{var xo;yo=`node`;let e=globalThis.process;bo=e==null||(xo=e.version)==null?void 0:xo.replace(/^v/,``)}var So=[`runtime=${yo}`];bo&&So.push(`runtime-version=${bo}`);var Co={headers:{"X-Client-Info":`supabase-js/${vo}; ${So.join(`; `)}`}},wo={schema:`public`},To={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:`implicit`},Eo={},Do={enabled:!1,respectSamplingDecision:!0};function Oo(e){if(!e||typeof e!=`string`)return null;let t=e.split(`-`);if(t.length!==4)return null;let[n,r,i,a]=t;if(n.length!==2||r.length!==32||i.length!==16||a.length!==2)return null;let o=/^[0-9a-f]+$/i;return!o.test(n)||!o.test(r)||!o.test(i)||!o.test(a)||r===`00000000000000000000000000000000`||i===`0000000000000000`?null:{version:n,traceId:r,parentId:i,traceFlags:a,isSampled:(parseInt(a,16)&1)==1}}function ko(e,t){if(!e||!t||t.length===0)return!1;let n;if(e instanceof URL)n=e;else try{n=new URL(e)}catch{return!1}for(let e of t)try{if(typeof e==`string`){if(Ao(n.hostname,e))return!0}
11else if(e instanceof RegExp){if(e.test(n.hostname))return!0}else if(typeof e==`function`&&e(n))return!0}catch{continue}return!1}function Ao(e,t){if(t===e)return!0;if(t.startsWith(`*.`)){let n=t.slice(2);if(e.endsWith(n)&&(e===n||e.endsWith(`.`+n)))return!0}return!1}function jo(e){let t=[];try{let n=new URL(e);t.push(n.hostname)}catch{}return t.push(`*.supabase.co`,`*.supabase.in`),t.push(`localhost`,`127.0.0.1`,`[::1]`),t}function Mo(e){"@babel/helpers - typeof";return Mo=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},Mo(e)}function No(e,t){if(Mo(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(Mo(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Po(e){var t=No(e,`string`);return Mo(t)==`symbol`?t:t+``}function Fo(e,t,n){return(t=Po(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Io(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function z(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Io(Object(n),!0).forEach(function(t){Fo(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Io(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Lo=e=>e?(...t)=>e(...t):(...e)=>fetch(...e),Ro=()=>Headers,zo=e=>e.startsWith(`sb_publishable_`)||e.startsWith(`sb_secret_`),Bo=`sb_temp_`,Vo=new Set,Ho=e=>{if(!e.startsWith(`sb_`)||zo(e)||e.startsWith(Bo))return;let t=e.match(/^sb_[a-zA-Z0-9]+_/)?.[0]??`unknown`;Vo.has(t)||(Vo.add(t),console.warn(`@supabase/supabase-js: Unrecognized Supabase API key format. The client will proceed and send this key as-is; if you see authentication errors you may need to upgrade @supabase/supabase-js to a version that recognizes this key type.`))},Uo=(e,t,n,r,i,a)=>{let o=Lo(r),s=Ro(),c=i?.enabled===!0,l=i?.respectSamplingDecision!==!1,u=c?jo(t):null,d=!(a?.omitApiKeyAsBearer&&zo(e));return async(t,r)=>{let i=await n(),a=new s(r?.headers);if(a.has(`apikey`)||a.set(`apikey`,e),!a.has(`Authorization`)){let t=i??(d?e:null);t&&a.set(`Authorization`,`Bearer ${t}`)}if(u){let e=Ko(t,u,l);e&&(e.traceparent&&!a.has(`traceparent`)&&a.set(`traceparent`,e.traceparent),e.tracestate&&!a.has(`tracestate`)&&a.set(`tracestate`,e.tracestate),e.baggage&&!a.has(`baggage`)&&a.set(`baggage`,e.baggage))}return o(t,z(z({},r),{},{headers:a}))}},Wo=!1,Go=!1;function Ko(e,t,n){let r=$e();if(!r)return Wo||(Wo=!0,console.warn("@supabase/supabase-js: tracePropagation is enabled but the tracing runtime is not loaded, so trace headers will not be attached. Add `import '@supabase/supabase-js/tracing'` at your application entry point (requires the OpenTelemetry API package to be installed). The CDN/UMD build does not support trace propagation.")),null;if(!ko(typeof e==`string`||e instanceof URL?e:e.url,t))return null;let i=r();if(!i||!i.traceparent){var a;if(i!=null&&(a=i.carrierKeys)!=null&&a.length&&!Go){Go=!0;let e=i.carrierKeys.includes(`sentry-trace`)?" Sentry detected: set `propagateTraceparent: true` in Sentry.init() to emit it.":` Configure your tracing SDK to emit W3C trace context on outgoing requests.`;console.warn(`@supabase/supabase-js: tracePropagation is enabled and a tracing SDK is active, but its propagator wrote [${i.carrierKeys.join(`, `)}] and no W3C traceparent header, so trace headers will not be attached.`+e)}return null}if(n){let e=Oo(i.traceparent);if(e&&!e.isSampled)return{traceparent:i.traceparent}}return i}function qo(e){return typeof e==`boolean`?{enabled:e}:e}function Jo(e){return e.endsWith(`/`)?e:e+`/`}var Yo=!1;function Xo(e){Yo||typeof e!=`object`||!e||!(`schema`in e)||e.schema===void 0||(Yo=!0,console.warn(`@
11supabase/supabase-js: The "schema" option must be nested under "db", e.g. createClient(url, key, { db: { schema: 'myschema' } }). A top-level "schema" is ignored and queries go to the default schema.`))}function Zo(e,t){let{db:n,auth:r,realtime:i,global:a}=e,{db:o,auth:s,realtime:c,global:l}=t,u=qo(e.tracePropagation),d=qo(t.tracePropagation),f={db:z(z({},o),n),auth:z(z({},s),r),realtime:z(z({},c),i),storage:{},global:z(z(z({},l),a),{},{headers:z(z({},l?.headers??{}),a?.headers??{})}),tracePropagation:{enabled:u?.enabled??d?.enabled??!1,respectSamplingDecision:u?.respectSamplingDecision??d?.respectSamplingDecision??!0},accessToken:async()=>``};return e.accessToken?f.accessToken=e.accessToken:delete f.accessToken,f}function Qo(e){let t=e?.trim();if(!t)throw Error(`supabaseUrl is required.`);if(!t.match(/^https?:\/\//i))throw Error(`Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.`);try{return new URL(Jo(t))}catch{throw Error(`Invalid supabaseUrl: Provided URL is malformed.`)}}var $o=class extends _o{constructor(e){super(e)}},es=class{constructor(e,t,n){this.supabaseUrl=e,this.supabaseKey=t;let r=Qo(e);if(!t)throw Error(`supabaseKey is required.`);Ho(t),Xo(n),this.realtimeUrl=new URL(`realtime/v1`,r),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace(`http`,`ws`),this.authUrl=new URL(`auth/v1`,r),this.storageUrl=new URL(`storage/v1`,r),this.functionsUrl=new URL(`functions/v1`,r);let i=`sb-${r.hostname.split(`.`)[0]}-auth-token`,a={db:wo,realtime:Eo,auth:z(z({},To),{},{storageKey:i}),global:Co,tracePropagation:Do},o=Zo(n??{},a);this.settings=o,this.storageKey=o.auth.storageKey??``,this.headers=o.global.headers??{},o.accessToken?(this.accessToken=o.accessToken,this.auth=new Proxy({},{get:(e,t)=>{throw Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(t)} is not possible`)}})):this.auth=this._initSupabaseAuthClient(o.auth??{},this.headers,o.global.fetch),this.fetch=Uo(t,e,this._getSessionToken.bind(this),o.global.fetch,o.tracePropagation),this.functionsFetch=Uo(t,e,this._getSessionToken.bind(this),o.global.fetch,o.tracePropagation,{omitApiKeyAsBearer:!0}),this.realtime=this._initRealtimeClient(z({headers:this.headers,accessToken:this._getAccessToken.bind(this),fetch:this.fetch},o.realtime)),this.accessToken&&Promise.resolve(this.accessToken()).then(e=>this.realtime.setAuth(e)).catch(e=>console.warn(`Failed to set initial Realtime auth token:`,e)),this.rest=new At(new URL(`rest/v1`,r).href,{headers:this.headers,schema:o.db.schema,fetch:this.fetch,timeout:o.db.timeout,urlLengthLimit:o.db.urlLengthLimit,retry:o.db.retry}),this.storage=new Zr(this.storageUrl.href,this.headers,this.fetch,n?.storage),o.accessToken||this._listenForAuthEvents()}get functions(){return new ct(this.functionsUrl.href,{headers:this.headers,customFetch:this.functionsFetch})}from(e){return this.rest.from(e)}schema(e){return this.rest.schema(e)}getOpenApiSpec(){return this.rest.getOpenApiSpec()}rpc(e,t={},n={head:!1,get:!1,count:void 0}){return this.rest.rpc(e,t,n)}channel(e,t={config:{}}){return this.realtime.channel(e,t)}getChannels(){return this.realtime.getChannels()}removeChannel(e){return this.realtime.removeChannel(e)}removeAllChannels(){return this.realtime.removeAllChannels()}async _getSessionToken(){var e=this;if(e.accessToken)return await e.accessToken();let{data:t}=await e.auth.getSession();return t.session?.access_token??null}async _getAccessToken(){var e=this;return await e._getSessionToken()??e.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:e,persistSession:t,detectSessionInUrl:n,storage:r,userStorage:i,storageKey:a,flowType:o,lock:s,debug:c,throwOnError:l,experimental:u,lockAcquireTimeout:d,skipAutoInitialize:f},p,m){let h={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new $o({url:this.authUrl.href,headers:z(z({},h),p),storageKey:a,autoRefreshToken:e,persistSession:t,detectSessionInUrl:n,storage:r,userStorage:i,flowType:o,lock:s,debug:c,throwOnError:l,experimental:u,fetch:m,lockAcquireTimeout:d,skipAutoInitialize:f,hasCustomAuthorizationHeader:Object.keys(this.headers).some(e=>e.toLowerCase()===`authorization`)})}_initRealtimeClient(e){return new Zn(this.realtimeUrl.href,z(z({},e),{},{params:z(z({},{apikey:this.supabaseKey}),e?.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((e,t)=>{this._handleTokenChanged(e,`CLIENT`,t?.access_token)})}_handleTokenChanged(e,t,n){(e===`TOKEN_REFRESHED`||e===`SIGNED_IN`||e===`INITIAL_SESSION`)&&this.changedAccessToken!==n?(this.changedAccessToken=n,this.realtime.setAuth(n)):e===`SIGNED_OUT`&&(this.realtime.setAuth(),t==`STORAGE`&&this.auth.signOut(),this.changedAccessToken=void 0)}},ts=(e,t,n)=>
vendor: 8,014 bytes, line 11
11new es(e,t,n);function ns(){if(typeof window<`u`||globalThis.Deno!==void 0)return!1;let e=globalThis.process;if(!e)return!1;let t=e.version;if(t==null)return!1;let n=t.match(/^v(\d+)\./);return n?parseInt(n[1],10)<=20:!1}ns()&&console.warn(`⚠️  Node.js 20 and below are deprecated and will no longer be supported in future versions of @supabase/supabase-js. Please upgrade to Node.js 22 or later. For more information, visit: https://github.com/orgs/supabase/discussions/45715`);var rs={"the new visibility playbook: 5 essential tools to own the ai search era":`5-reporting-tools-2026`,"geo vs seo in 2026: what every business owner needs to know":`geo-vs-seo-2026`,"the lone wolf advantage: why one expert beats a whole agency in the ai era":`lone-wolf-ai-strategy`,"why agentic engineering is the smb game-changer you can't afford to ignore in 2026":`agentic-engineering-smb`,"the end of seo as we know it: a definitive guide to geo":`seo-dead-geo-guide`,"the 5 game-changing seo trends you need to know in 2026: your guide to ai-powered visibility":`seo-trends-2026`,"the biggest seo, llm, and ai shifts in the past 30 days and how to monetize them":`seo-llm-ai-shifts-30-days`,"geo optimization strategy 2026: how to make ai recommend your brand":`geo-optimization-2026`,"why 44% of ai citations come from your intro (and what to do about it)":`ai-citations-intro`,"chatgpt just launched ads. here is what every seo needs to know right now.":`chatgpt-launched-ads-2026`,"the organic window is closing. here is what to do before it shuts.":`organic-ai-window-closing-2026`,"google just ended the seo vs. geo debate. here is what you do next.":`google-io-2026-seo-geo-debate`,"your audience now has ai agents. here is how to stay visible to them.":`ai-agents-search-visibility-2026`,"google search console now measures your ai visibility. here is what to do with the data.":`gsc-ai-visibility-report-2026`};function is(e){let t=e.toLowerCase();return rs[t]?rs[t]:t.replace(/[^a-z0-9]+/g,`-`).replace(/(^-|-$)/g,``)}var as=n(((e,t)=>{t.exports=Array.isArray})),os=n(((e,t)=>{t.exports=typeof global==`object`&&global&&global.Object===Object&&global})),ss=n(((e,t)=>{var n=os(),r=typeof self==`object`&&self&&self.Object===Object&&self;t.exports=n||r||Function(`return this`)()})),cs=n(((e,t)=>{t.exports=ss().Symbol})),ls=n(((e,t)=>{var n=cs(),r=Object.prototype,i=r.hasOwnProperty,a=r.toString,o=n?n.toStringTag:void 0;function s(e){var t=i.call(e,o),n=e[o];try{e[o]=void 0;var r=!0}catch{}var s=a.call(e);return r&&(t?e[o]=n:delete e[o]),s}t.exports=s})),us=n(((e,t)=>{var n=Object.prototype.toString;function r(e){return n.call(e)}t.exports=r})),ds=n(((e,t)=>{var n=cs(),r=ls(),i=us(),a=`[object Null]`,o=`[object Undefined]`,s=n?n.toStringTag:void 0;function c(e){return e==null?e===void 0?o:a:s&&s in Object(e)?r(e):i(e)}t.exports=c})),fs=n(((e,t)=>{function n(e){return typeof e==`object`&&!!e}t.exports=n})),ps=n(((e,t)=>{var n=ds(),r=fs(),i=`[object Symbol]`;function a(e){return typeof e==`symbol`||r(e)&&n(e)==i}t.exports=a})),ms=n(((e,t)=>{var n=as(),r=ps(),i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;function o(e,t){if(n(e))return!1;var o=typeof e;return o==`number`||o==`symbol`||o==`boolean`||e==null||r(e)?!0:a.test(e)||!i.test(e)||t!=null&&e in Object(t)}t.exports=o})),hs=n(((e,t)=>{function n(e){var t=typeof e;return e!=null&&(t==`object`||t==`function`)}t.exports=n})),gs=n(((e,t)=>{var n=ds(),r=hs(),i=`[object AsyncFunction]`,a=`[object Function]`,o=`[object GeneratorFunction]`,s=`[object Proxy]`;function c(e){if(!r(e))return!1;var t=n(e);return t==a||t==o||t==i||t==s}t.exports=c})),_s=n(((e,t)=>{t.exports=ss()[`__core-js_shared__`]})),vs=n(((e,t)=>{var n=_s(),r=function(){var e=/[^.]+$/.exec(n&&n.keys&&n.keys.IE_PROTO||``);return e?`Symbol(src)_1.`+e:``}();function i(e){return!!r&&r in e}t.exports=i})),ys=n(((e,t)=>{var n=Function.prototype.toString;function r(e){if(e!=null){try{return n.call(e)}catch{}try{return e+``}catch{}}return``}t.exports=r})),bs=n(((e,t)=>{var n=gs(),r=vs(),i=hs(),a=ys(),o=/[\\^$.*+?()[\]{}|]/g,s=/^\[object .+?Constructor\]$/,c=Function.prototype,l=Object.prototype,u=c.toString,d=l.hasOwnProperty,f=RegExp(`^`+u.call(d).replace(o,`\\$&`).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,`$1.*?`)+`$`);function p(e){return!i(e)||r(e)?!1:(n(e)?f:s).test(a(e))}t.exports=p})),xs=n(((e,t)=>{function n(e,t){return e?.[t]}t.exports=n})),Ss=n(((e,t)=>{var n=bs(),r=xs();function i(e,t){var i=r(e,t);return n(i)?i:void 0}t.exports=i})),Cs=n(((e,t)=>{t.exports=Ss()(Object,`create`)})),ws=n(((e,t)=>{var n=Cs();function r(){this.__data__=n?n(null):{},this.size=0}t.exports=r})),Ts=n(((e,t)=>{function n(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=+!!t,t}t.exports=n})),Es=n(((e,t)=>{var n=Cs(),r=`__lodash_hash_undefined__`,i=Object.prototype.hasOwnProperty;function a(e){var t=this.__data__;if(n){var a=t[e];return a===r?void 0:a}return i.call(t,e)?t[e]:void 0}t.exports=a})),Ds=n(((e,t)=>{var n=Cs(),r=Object.prototype.hasOwnProperty;function i(e){var t=this.__data__;return n?t[e]!==void 0:r.call(t,e)}t.exports=i})),Os=n(((e,t)=>{var n=Cs(),r=`__lodash_hash_undefined__`;function i(e,t){var i=this.__data__;return this.size+=+!this.has(e),i[e]=n&&t===void 0?r:t,this}t.exports=i})),ks=n(((e,t)=>{var n=ws(),r=Ts(),i=Es(),a=Ds(),o=Os();function s(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}s.prototype.clear=n,s.prototype.delete=r,s.prototype.get=i,s.prototype.has=a,s.prototype.set=o,t.exports=s})),As=n(((e,t)=>{function n(){this.__data__=[],this.size=0}t.exports=n})),js=n(((e,t)=>{function n(e,t){return e===t||e!==e&&t!==t}t.exports=n})),Ms=n(((e,t)=>{var n=js();function r(e,t){for(var r=e.length;r--;)if(n(e[r][0],t))return r;return-1}t.exports=r})),Ns=n(((e,t)=>{var n=Ms(),r=Array.prototype.splice;function i(e){var t=this.__data__,i=n(t,e);return i<0?!1:(i==t.length-1?t.pop():r.call(t,i,1),--this.size,!0)}t.exports=i})),Ps=n(((e,t)=>{var n=Ms();function r(e){var t=this.__data__,r=n(t,e);return r<0?void 0:t[r][1]}t.exports=r})),Fs=n(((e,t)=>{var n=Ms();function r(e){return n(this.__data__,e)>-1}t.exports=r})),Is=n(((e,t)=>{var n=Ms();function r(e,t){var r=this.__data__,i=n(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}t.exports=r})),Ls=n(((e,t)=>{var n=As(),r=Ns(),i=Ps(),a=Fs(),o=Is();function s(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}s.prototype.clear=n,s.prototype.delete=r,s.prototype.get=i,s.prototype.has=a,s.prototype.set=o,t.exports=s})),Rs=n(((e,t)=>{t.exports=Ss()(ss(),`Map`)})),zs=n(((e,t)=>{var n=ks(),r=Ls(),i=Rs();function a(){this.size=0,this.__data__={hash:new n,map:new(i||r),string:new n}}t.exports=a})),Bs=n(((e,t)=>{function n(e){var t=typeof e;return t==`string`||t==`number`||t==`symbol`||t==`boolean`?e!==`__proto__`:e===null}t.exports=n})),Vs=n(((e,t)=>{var n=Bs();function r(e,t){var r=e.__data__;return n(t)?r[typeof t==`string`?`string`:`hash`]:r.map}t.exports=r})),Hs=n(((e,t)=>{var n=Vs();function r(e){var t=n(this,e).delete(e);return this.size-=+!!t,t}t.exports=r})),Us=n(((e,t)=>{var n=Vs();function r(e){return n(this,e).get(e)}t.exports=r})),Ws=n(((e,t)=>{var n=Vs();function r(e){return n(this,e).has(e)}t.exports=r})),Gs=n(((e,t)=>{var n=Vs();function r(e,t){var r=n(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this}t.exports=r})),Ks=n(((e,t)=>{var n=zs(),r=Hs(),i=Us(),a=Ws(),o=Gs();function s(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}s.prototype.clear=n,s.prototype.delete=r,s.prototype.get=i,s.prototype.has=a,s.prototype.set=o,t.exports=s})),qs=n(((e,t)=>{var n=Ks(),r=`Expected a function`;function i(e,t){if(typeof e!=`function`||t!=null&&typeof t!=`function`)throw TypeError(r);var a=function(){var n=arguments,r=t?t.apply(this,n):n[0],i=a.cache;if(i.has(r))return i.get(r);var o=e.apply(this,n);return a.cache=i.set(r,o)||i,o};return a.cache=new(i.Cache||n),a}
11i.Cache=n,t.exports=i})),Js=n(((e,t)=>{var n=qs(),r=500;function i(e){var t=n(e,function(e){return i.size===r&&i.clear(),e}),i=t.cache;return t}t.exports=i})),Ys=n(((e,t)=>{var n=Js(),r=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,i=/\\(\\)?/g;t.exports=n(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(``),e.replace(r,function(e,n,r,a){t.push(r?a.replace(i,`$1`):n||e)}),t})})),Xs=n(((e,t)=>{function n(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}t.exports=n})),Zs=n(((e,t)=>{var n=cs(),r=Xs(),i=as(),a=ps(),o=1/0,s=n?n.prototype:void 0,c=s?s.toString:void 0;function l(e){if(typeof e==`string`)return e;if(i(e))return r(e,l)+``;if(a(e))return c?c.call(e):``;var t=e+``;return t==`0`&&1/e==-o?`-0`:t}t.exports=l})),Qs=n(((e,t)=>{var n=Zs();function r(e){return e==null?``:n(e)}t.exports=r})),$s=n(((e,t)=>{var n=as(),r=ms(),i=Ys(),a=Qs();function o(e,t){return n(e)?e:r(e,t)?[e]:i(a(e))}t.exports=o})),ec=n(((e,t)=>{var n=ps(),r=1/0;function i(e){if(typeof e==`string`||n(e))return e;var t=e+``;return t==`0`&&1/e==-r?`-0`:t}t.exports=i})),tc=n(((e,t)=>{var n=$s(),r=ec();function i(e,t){t=n(t,e);for(var i=0,a=t.length;e!=null&&i<a;)e=e[r(t[i++])];return i&&i==a?e:void 0}t.exports=i})),nc=n(((e,t)=>{var n=tc();function r(e,t,r){var i=e==null?void 0:n(e,t);return i===void 0?r:i}t.exports=r})),rc=n(((e,t)=>{function n(e){return e==null}t.exports=n})),ic=n(((e,t)=>{var n=ds(),r=as(),i=fs(),a=`[object String]`;function o(e){return typeof e==`string`||!r(e)&&i(e)&&n(e)==a}t.exports=o})),ac=n((e=>{var t=Symbol.for(`react.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.provider`),s=Symbol.for(`react.context`),c=Symbol.for(`react.server_context`),l=Symbol.for(`react.forward_ref`),u=Symbol.for(`react.suspense`),d=Symbol.for(`react.suspense_list`),f=Symbol.for(`react.memo`),p=Symbol.for(`react.lazy`);function m(e){if(typeof e==`object`&&e){var m=e.$$typeof;switch(m){case t:switch(e=e.type,e){case r:case a:case i:case u:case d:return e;default:switch(e&&=e.$$typeof,e){case c:case s:case l:case p:case f:case o:return e;default:return m}}case n:return m}}}e.isFragment=function(e){return m(e)===r}})),oc=n(((e,t)=>{t.exports=ac()})),sc=n(((e,t)=>{var n=ds(),r=fs(),i=`[object Number]`;function a(e){return typeof e==`number`||r(e)&&n(e)==i}t.exports=a})),cc=n(((e,t)=>{var n=sc();function r(e){return n(e)&&e!=+e}t.exports=r})),lc=e(ic()),uc=e(cc()),dc=e(nc()),fc=e(sc()),B=e(rc()),pc=function(e){return e===0?0:e>0?1:-1},mc=function(e){return(0,lc.default)(e)&&e.indexOf(`%`)===e.length-1},V=function(e){return(0,fc.default)(e)&&!(0,uc.default)(e)},hc=function(e){return(0,B.default)(e)},H=function(e){return V(e)||(0,lc.default)(e)},gc=0,_c=function(e){var t=++gc;return`${e||``}${t}`},vc=function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,r=arguments.length>3&&arguments[3]!==void 0&&arguments[3];if(!V(e)&&!(0,lc.default)(e))return n;var i;if(mc(e)){var a=e.indexOf(`%`);i=t*parseFloat(e.slice(0,a))/100}else i=+e;return(0,uc.default)(i)&&(i=n),r&&i>t&&(i=t),i},yc=function(e){if(!e)return null;var t=Object.keys(e);return t&&t.length?e[t[0]]:null},bc=function(e){if(!Array.isArray(e))return!1;for(var t=e.length,n={},r=0;r<t;r++)if(!n[e[r]])n[e[r]]=!0;else return!0;return!1},xc=function(e,t){return V(e)&&V(t)?function(n){return e+n*(t-e)}:function(){return t}};function Sc(e,t,n){return!e||!e.length?null:e.find(function(e){return e&&(typeof t==`function`?t(e):(0,dc.default)(e,t))===n})}var Cc=function(e,t){return V(e)&&V(t)?e-t:(0,lc.default)(e)&&(0,lc.default)(t)?e.localeCompare(t):e instanceof Date&&t instanceof Date?e.getTime()-t.getTime():String(e).localeCompare(String(t))},wc=e(hs()),U=e(gs()),Tc=oc();function Ec(e,t){for(var n in e)if({}.hasOwnProperty.call(e,n)&&(!{}.hasOwnProperty.call(t,n)||e[n]!==t[n]))return!1;for(var r in t)if({}.hasOwnProperty.call(t,r)&&!{}.hasOwnProperty.call(e,r))return!1;return!0}function Dc(e){"@babel/helpers - typeof";return Dc=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},Dc(e)}
11var Oc=[`viewBox`,`children`],kc=`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`.split(`.`),Ac=[`points`,`pathLength`],jc={svg:Oc,polygon:Ac,polyline:Ac},Mc=`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.onTimeUpdate
11Capture.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`.split(`.`),Nc=function(e,t){if(!e||typeof e==`function`||typeof e==`boolean`)return null;var n=e;if((0,f.isValidElement)(e)&&(n=e.props),!(0,wc.default)(n))return null;var r={};return Object.keys(n).forEach(function(e){Mc.includes(e)&&(r[e]=t||function(t){return n[e](n,t)})}),r},Pc=function(e,t,n){return function(r){return e(t,n,r),null}},Fc=function(e,t,n){if(!(0,wc.default)(e)||Dc(e)!==`object`)return null;var r=null;return Object.keys(e).forEach(function(i){var a=e[i];Mc.includes(i)&&typeof a==`function`&&(r||={},r[i]=Pc(a,t,n))}),r},Ic=[`children`],Lc=[`children`];function Rc(e,t){if(e==null)return{};var n=zc(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function zc(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var Bc={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`},Vc=function(e){return typeof e==`string`?e:e?e.displayName||e.name||`Component`:``},Hc=null,Uc=null,Wc=function e(t){if(t===Hc&&Array.isArray(Uc))return Uc;var n=[];return f.Children.forEach(t,function(t){(0,B.default)(t)||((0,Tc.isFragment)(t)?n=n.concat(e(t.props.children)):n.push(t))}),Uc=n,Hc=t,n};function Gc(e,t){var n=[],r=[];return r=Array.isArray(t)?t.map(function(e){return Vc(e)}):[Vc(t)],Wc(e).forEach(function(e){var t=(0,dc.default)(e,`type.displayName`)||(0,dc.default)(e,`type.name`);r.indexOf(t)!==-1&&n.push(e)}),n}function Kc(e,t){var n=Gc(e,t);return n&&n[0]}var qc=function(e){if(!e||!e.props)return!1;var t=e.props,n=t.width,r=t.height;return!(!V(n)||n<=0||!V(r)||r<=0)},Jc=`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`.split(`.`),Yc=function(e){return e&&e.type&&(0,lc.default)(e.type)&&Jc.indexOf(e.type)>=0},Xc=function(e,t,n,r){var i=jc?.[r]??[];return t.startsWith(`data-`)||!(0,U.default)(e)&&(r&&i.includes(t)||kc.includes(t))||n&&Mc.includes(t)},W=function(e,t,n){if(!e||typeof e==`function`||typeof e==`boolean`)return null;var r=e;if((0,f.isValidElement)(e)&&(r=e.props),!(0,wc.default)(r))return null;var i={};return Object.keys(r).forEach(function(e){Xc(r?.[e],e,t,n)&&(i[e]=r[e])}),i},Zc=function e(t,n){if(t===n)return!0;var r=f.Children.count(t);if(r!==f.Children.count(n))return!1;if(r===0)return!0;
11if(r===1)return Qc(Array.isArray(t)?t[0]:t,Array.isArray(n)?n[0]:n);for(var i=0;i<r;i++){var a=t[i],o=n[i];if(Array.isArray(a)||Array.isArray(o)){if(!e(a,o))return!1}else if(!Qc(a,o))return!1}return!0},Qc=function(e,t){if((0,B.default)(e)&&(0,B.default)(t))return!0;if(!(0,B.default)(e)&&!(0,B.default)(t)){var n=e.props||{},r=n.children,i=Rc(n,Ic),a=t.props||{},o=a.children,s=Rc(a,Lc);return r&&o?Ec(i,s)&&Zc(r,o):!r&&!o&&Ec(i,s)}return!1},$c=function(e,t){var n=[],r={};return Wc(e).forEach(function(e,i){if(Yc(e))n.push(e);else if(e){var a=Vc(e.type),o=t[a]||{},s=o.handler,c=o.once;if(s&&(!c||!r[a])){var l=s(e,a,i);n.push(l),r[a]=!0}}}),n},el=function(e){var t=e&&e.type;return t&&Bc[t]?Bc[t]:null},tl=function(e,t){return Wc(t).indexOf(e)},nl=[`children`,`width`,`height`,`viewBox`,`className`,`style`,`title`,`desc`];function rl(){return rl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},rl.apply(this,arguments)}function il(e,t){if(e==null)return{};var n=al(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function al(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function ol(e){var t=e.children,n=e.width,r=e.height,i=e.viewBox,a=e.className,o=e.style,s=e.title,c=e.desc,u=il(e,nl),d=i||{width:n,height:r,x:0,y:0},p=l(`recharts-surface`,a);return f.createElement(`svg`,rl({},W(u,!0,`svg`),{className:p,width:n,height:r,style:o,viewBox:`${d.x} ${d.y} ${d.width} ${d.height}`}),f.createElement(`title`,null,s),f.createElement(`desc`,null,c),t)}var sl=[`children`,`className`];function cl(){return cl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},cl.apply(this,arguments)}function ll(e,t){if(e==null)return{};var n=ul(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ul(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var dl=f.forwardRef(function(e,t){var n=e.children,r=e.className,i=ll(e,sl),a=l(`recharts-layer`,r);return f.createElement(`g`,cl({className:a},W(i,!0),{ref:t}),n)}),fl=n(((e,t)=>{function n(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(i);++r<i;)a[r]=e[r+t];return a}t.exports=n})),pl=n(((e,t)=>{var n=fl();function r(e,t,r){var i=e.length;return r=r===void 0?i:r,!t&&r>=i?e:n(e,t,r)}t.exports=r})),ml=n(((e,t)=>{var n=RegExp(`[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]`);function r(e){return n.test(e)}t.exports=r})),hl=n(((e,t)=>{function n(e){return e.split(``)}t.exports=n})),gl=n(((e,t)=>{var n=`\\ud800-\\udfff`,r=`\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff`,i=`\\ufe0e\\ufe0f`,a=`[`+n+`]`,o=`[`+r+`]`,s=`\\ud83c[\\udffb-\\udfff]`,c=`(?:`+o+`|`+s+`)`,l=`[^`+n+`]`,u=`(?:\\ud83c[\\udde6-\\uddff]){2}`,d=`[\\ud800-\\udbff][\\udc00-\\udfff]`,f=`\\u200d`,p=c+`?`,m=`[`+i+`]?`,h=`(?:`+f+`(?:`+[l,u,d].join(`|`)+`)`+m+p+`)*`,g=m+p+h,_=`(?:`+[l+o+`?`,o,u,d,a].join(`|`)+`)`,v=RegExp(s+`(?=`+s+`)|`+_+g,`g`);function y(e){return e.match(v)||[]}t.exports=y})),_l=n(((e,t)=>{var n=hl(),r=ml(),i=gl();function a(e){return r(e)?i(e):n(e)}t.exports=a})),vl=n(((e,t)=>{var n=pl(),r=ml(),i=_l(),a=Qs();function o(e){return function(t){t=a(t);var o=r(t)?i(t):void 0,s=o?o[0]:t.charAt(0),c=o?n(o,1).join(``):t.slice(1);return s[e]()+c}}t.exports=o})),yl=n(((e,t)=>{t.exports=vl()(`toUpperCase`)}));function G(e){return function(){return e}}var bl=Math.cos,xl=Math.sin,Sl=Math.sqrt,Cl=Math.PI;Cl/2;var wl=2*Cl,Tl=Math.PI,El=2*Tl,Dl=1e-6,Ol=El-Dl;function kl(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function Al(e){let t=Math.floor(e);if(!(t>=0))throw Error(`invalid digits: ${e}`);if(t>15)return kl;let n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=Math.round(arguments[t]*n)/n+e[t]}}var jl=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._=``,this._append=e==null?
11kl:Al(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,n,r){this._append`Q${+e},${+t},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(e,t,n,r,i,a){this._append`C${+e},${+t},${+n},${+r},${this._x1=+i},${this._y1=+a}`}arcTo(e,t,n,r,i){if(e=+e,t=+t,n=+n,r=+r,i=+i,i<0)throw Error(`negative radius: ${i}`);let a=this._x1,o=this._y1,s=n-e,c=r-t,l=a-e,u=o-t,d=l*l+u*u;if(this._x1===null)this._append`M${this._x1=e},${this._y1=t}`;else if(d>Dl)if(!(Math.abs(u*s-c*l)>Dl)||!i)this._append`L${this._x1=e},${this._y1=t}`;else{let f=n-a,p=r-o,m=s*s+c*c,h=f*f+p*p,g=Math.sqrt(m),_=Math.sqrt(d),v=i*Math.tan((Tl-Math.acos((m+d-h)/(2*g*_)))/2),y=v/_,b=v/g;Math.abs(y-1)>Dl&&this._append`L${e+y*l},${t+y*u}`,this._append`A${i},${i},0,0,${+(u*f>l*p)},${this._x1=e+b*s},${this._y1=t+b*c}`}}arc(e,t,n,r,i,a){if(e=+e,t=+t,n=+n,a=!!a,n<0)throw Error(`negative radius: ${n}`);let o=n*Math.cos(r),s=n*Math.sin(r),c=e+o,l=t+s,u=1^a,d=a?r-i:i-r;this._x1===null?this._append`M${c},${l}`:(Math.abs(this._x1-c)>Dl||Math.abs(this._y1-l)>Dl)&&this._append`L${c},${l}`,n&&(d<0&&(d=d%El+El),d>Ol?this._append`A${n},${n},0,1,${u},${e-o},${t-s}A${n},${n},0,1,${u},${this._x1=c},${this._y1=l}`:d>Dl&&this._append`A${n},${n},0,${+(d>=Tl)},${u},${this._x1=e+n*Math.cos(i)},${this._y1=t+n*Math.sin(i)}`)}rect(e,t,n,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}};jl.prototype;function Ml(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{let e=Math.floor(n);if(!(e>=0))throw RangeError(`invalid digits: ${n}`);t=e}return e},()=>new jl(t)}Array.prototype.slice;function Nl(e){return typeof e==`object`&&`length`in e?e:Array.from(e)}function Pl(e){this._context=e}Pl.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t)}}};function Fl(e){return new Pl(e)}function Il(e){return e[0]}function Ll(e){return e[1]}function Rl(e,t){var n=G(!0),r=null,i=Fl,a=null,o=Ml(s);e=typeof e==`function`?e:e===void 0?Il:G(e),t=typeof t==`function`?t:t===void 0?Ll:G(t);function s(s){var c,l=(s=Nl(s)).length,u,d=!1,f;for(r??(a=i(f=o())),c=0;c<=l;++c)!(c<l&&n(u=s[c],c,s))===d&&((d=!d)?a.lineStart():a.lineEnd()),d&&a.point(+e(u,c,s),+t(u,c,s));if(f)return a=null,f+``||null}return s.x=function(t){return arguments.length?(e=typeof t==`function`?t:G(+t),s):e},s.y=function(e){return arguments.length?(t=typeof e==`function`?e:G(+e),s):t},s.defined=function(e){return arguments.length?(n=typeof e==`function`?e:G(!!e),s):n},s.curve=function(e){return arguments.length?(i=e,r!=null&&(a=i(r)),s):i},s.context=function(e){return arguments.length?(e==null?r=a=null:a=i(r=e),s):r},s}function zl(e,t,n){var r=null,i=G(!0),a=null,o=Fl,s=null,c=Ml(l);e=typeof e==`function`?e:e===void 0?Il:G(+e),t=typeof t==`function`?t:G(t===void 0?0:+t),n=typeof n==`function`?n:n===void 0?Ll:G(+n);function l(l){var u,d,f,p=(l=Nl(l)).length,m,h=!1,g,_=Array(p),v=Array(p);for(a??(s=o(g=c())),u=0;u<=p;++u){if(!(u<p&&i(m=l[u],u,l))===h)if(h=!h)d=u,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),f=u-1;f>=d;--f)s.point(_[f],v[f]);s.lineEnd(),s.areaEnd()}h&&(_[u]=+e(m,u,l),v[u]=+t(m,u,l),s.point(r?+r(m,u,l):_[u],n?+n(m,u,l):v[u]))}if(g)return s=null,g+``||null}function u(){return Rl().defined(i).curve(o).context(a)}return l.x=function(t){return arguments.length?(e=typeof t==`function`?t:G(+t),r=null,l):e},l.x0=function(t){return arguments.length?(e=typeof t==`function`?t:G(+t),l):e},l.x1=function(e){return arguments.length?(r=e==null?null:typeof e==`function`?e:G(+e),l):r},l.y=function(e){return arguments.length?(t=typeof e==`function`?e:G(+e),n=null,l):t},l.y0=function(e){return arguments.length?(t=typeof e==`function`?e:G(+e),l):t},l.y1=function(e){return arguments.length?(n=e==null?null:typeof e==`function`?e:G(+e),l):n},l.lineX0=l.lineY0=function(){return u().x(e).y(t)},l.lineY1=function(){return u().x(e).y(n)},l.lineX1=function(){return u().x(r).y(t)},l.defined=function(e){return arguments.length?(i=typeof e==`function`?e:G(!!e),l):i},l.curve=function(e){return arguments.length?(o=e,a!=null&&(s=o(a)),l):o},l.context=function(e){return arguments.length?(e==null?a=s=null:s=o(a=e),l):a},l}var Bl=class{constructor(e,t){this._context=e,this._x=t}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,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,t,e,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,e,this._y0,e,t)}this._x0=e,this._y0=t}};function Vl(e){return new Bl(e,!0)}function Hl(e){return new Bl(e,!1)}var Ul={draw(e,t){let n=Sl(t/Cl);e.moveTo(n,0),e.arc(0,0,n,0,wl)}},Wl={draw(e,t){let n=Sl(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},Gl=Sl(1/3),Kl=Gl*2,ql={draw(e,t){let n=Sl(t/Kl),r=n*Gl;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},Jl={draw(e,t){let n=Sl(t),r=-n/2;e.rect(r,r,n,n)}}
11,Yl=.8908130915292852,Xl=xl(Cl/10)/xl(7*Cl/10),Zl=xl(wl/10)*Xl,Ql=-bl(wl/10)*Xl,$l={draw(e,t){let n=Sl(t*Yl),r=Zl*n,i=Ql*n;e.moveTo(0,-n),e.lineTo(r,i);for(let t=1;t<5;++t){let a=wl*t/5,o=bl(a),s=xl(a);e.lineTo(s*n,-o*n),e.lineTo(o*r-s*i,s*r+o*i)}e.closePath()}},eu=Sl(3),tu={draw(e,t){let n=-Sl(t/(eu*3));e.moveTo(0,n*2),e.lineTo(-eu*n,-n),e.lineTo(eu*n,-n),e.closePath()}},nu=-.5,ru=Sl(3)/2,iu=1/Sl(12),au=(iu/2+1)*3,ou={draw(e,t){let n=Sl(t/au),r=n/2,i=n*iu,a=r,o=n*iu+n,s=-a,c=o;e.moveTo(r,i),e.lineTo(a,o),e.lineTo(s,c),e.lineTo(nu*r-ru*i,ru*r+nu*i),e.lineTo(nu*a-ru*o,ru*a+nu*o),e.lineTo(nu*s-ru*c,ru*s+nu*c),e.lineTo(nu*r+ru*i,nu*i-ru*r),e.lineTo(nu*a+ru*o,nu*o-ru*a),e.lineTo(nu*s+ru*c,nu*c-ru*s),e.closePath()}};function su(e,t){let n=null,r=Ml(i);e=typeof e==`function`?e:G(e||Ul),t=typeof t==`function`?t:G(t===void 0?64:+t);function i(){let i;if(n||=i=r(),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),i)return n=null,i+``||null}return i.type=function(t){return arguments.length?(e=typeof t==`function`?t:G(t),i):e},i.size=function(e){return arguments.length?(t=typeof e==`function`?e:G(+e),i):t},i.context=function(e){return arguments.length?(n=e??null,i):n},i}function cu(){}function lu(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function uu(e){this._context=e}uu.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:lu(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:lu(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function du(e){return new uu(e)}function fu(e){this._context=e}fu.prototype={areaStart:cu,areaEnd:cu,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)}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:lu(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function pu(e){return new fu(e)}function mu(e){this._context=e}mu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:lu(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function hu(e){return new mu(e)}function gu(e){this._context=e}gu.prototype={areaStart:cu,areaEnd:cu,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function _u(e){return new gu(e)}function vu(e){return e<0?-1:1}function yu(e,t,n){var r=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(r||i<0&&-0),o=(n-e._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(vu(a)+vu(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function bu(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function xu(e,t,n){var r=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-r)/3;e._context.bezierCurveTo(r+s,i+s*t,a-s,o-s*n,a,o)}function Su(e){this._context=e}Su.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:xu(this,this._t0,bu(this,this._t0))}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,e!==this._x1||t!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,xu(this,bu(this,n=yu(this,e,t)),n);break;default:xu(this,this._t0,n=yu(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function Cu(e){this._context=new wu(e)}(Cu.prototype=Object.create(Su.prototype)).point=function(e,t){Su.prototype.point.call(this,t,e)};function wu(e){this._context=e}wu.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,a){this._context.bezierCurveTo(t,e,r,n,a,i)}};function Tu(e){return new Su(e)}function Eu(e){return new Cu(e)}function Du(e){this._context=e}Du.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=Ou(e),i=Ou(t),a=0,o=1;o<n;++a,++o)this._context.bezierCurveTo(r[0][a],i[0][a],r[1][a],i[1][a],e[o],t[o]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function Ou(e){var t,n=e.length-1,r,i=Array(n),a=Array(n),o=Array(n);for(i[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,a[n-1]=7,o[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/a[t-1],a[t]-=r,o[t]-=r*o[t-1];for(i[n-1]=o[n-1]/a[n-1],t=n-2;t>=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)a[t]=2*e[t+1]-i[t+1];return[i,a]}function ku(e){return new Du(e)}function Au(e,t){this._context=e,this._t=t}Au.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}}this._x=e,this._y=t}};function ju(e){return new Au(e,.5)}function Mu(e){return new Au(e,0)}function Nu(e){return new Au(e,1)}function Pu(e,t){if((o=e.length)>1)for(var n=1,r,i,a=e[t[0]],o,s=a.length;n<o;++n)for(i=a,a=e[t[n]],r=0;r<s;++r)a[r][1]+=a[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function Fu(e){for(var t=e.length,n=Array(t);--t>=0;)n[t]=t;return n}function Iu(e,t){return e[t]}function Lu(e){let t=[];return t.key=e,t}
11function Ru(){var e=G([]),t=Fu,n=Pu,r=Iu;function i(i){var a=Array.from(e.apply(this,arguments),Lu),o,s=a.length,c=-1,l;for(let e of i)for(o=0,++c;o<s;++o)(a[o][c]=[0,+r(e,a[o].key,c,i)]).data=e;for(o=0,l=Nl(t(a));o<s;++o)a[l[o]].index=o;return n(a,l),a}return i.keys=function(t){return arguments.length?(e=typeof t==`function`?t:G(Array.from(t)),i):e},i.value=function(e){return arguments.length?(r=typeof e==`function`?e:G(+e),i):r},i.order=function(e){return arguments.length?(t=e==null?Fu:typeof e==`function`?e:G(Array.from(e)),i):t},i.offset=function(e){return arguments.length?(n=e??Pu,i):n},i}function zu(e,t){if((r=e.length)>0){for(var n,r,i=0,a=e[0].length,o;i<a;++i){for(o=n=0;n<r;++n)o+=e[n][i][1]||0;if(o)for(n=0;n<r;++n)e[n][i][1]/=o}Pu(e,t)}}function Bu(e,t){if((i=e.length)>0){for(var n=0,r=e[t[0]],i,a=r.length;n<a;++n){for(var o=0,s=0;o<i;++o)s+=e[o][n][1]||0;r[n][1]+=r[n][0]=-s/2}Pu(e,t)}}function Vu(e,t){if(!(!((o=e.length)>0)||!((a=(i=e[t[0]]).length)>0))){for(var n=0,r=1,i,a,o;r<a;++r){for(var s=0,c=0,l=0;s<o;++s){for(var u=e[t[s]],d=u[r][1]||0,f=(d-(u[r-1][1]||0))/2,p=0;p<s;++p){var m=e[t[p]],h=m[r][1]||0,g=m[r-1][1]||0;f+=h-g}c+=d,l+=f*d}i[r-1][1]+=i[r-1][0]=n,c&&(n-=l/c)}i[r-1][1]+=i[r-1][0]=n,Pu(e,t)}}var Hu=e(yl());function Uu(e){"@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(e)}var Wu=[`type`,`size`,`sizeType`];function Gu(){return Gu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Gu.apply(this,arguments)}function Ku(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function qu(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Ku(Object(n),!0).forEach(function(t){Ju(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ku(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Ju(e,t,n){return t=Yu(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Yu(e){var t=Xu(e,`string`);return Uu(t)==`symbol`?t:t+``}function Xu(e,t){if(Uu(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(Uu(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Zu(e,t){if(e==null)return{};var n=Qu(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Qu(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var $u={symbolCircle:Ul,symbolCross:Wl,symbolDiamond:ql,symbolSquare:Jl,symbolStar:$l,symbolTriangle:tu,symbolWye:ou},ed=Math.PI/180,td=function(e){return $u[`symbol${(0,Hu.default)(e)}`]||Ul},nd=function(e,t,n){if(t===`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 r=18*ed;return 1.25*e*e*(Math.tan(r)-Math.tan(r*2)*Math.tan(r)**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}},rd=function(e,t){$u[`symbol${(0,Hu.default)(e)}`]=t},id=function(e){var t=e.type,n=t===void 0?`circle`:t,r=e.size,i=r===void 0?64:r,a=e.sizeType,o=a===void 0?`area`:a,s=qu(qu({},Zu(e,Wu)),{},{type:n,size:i,sizeType:o}),c=function(){var e=td(n);return su().type(e).size(nd(i,o,n))()},u=s.className,d=s.cx,p=s.cy,m=W(s,!0);return d===+d&&p===+p&&i===+i?f.createElement(`path`,Gu({}
11,m,{className:l(`recharts-symbols`,u),transform:`translate(${d}, ${p})`,d:c()})):null};id.registerSymbol=rd;function ad(e){"@babel/helpers - typeof";return ad=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},ad(e)}function od(){return od=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},od.apply(this,arguments)}function sd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function cd(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?sd(Object(n),!0).forEach(function(t){yd(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sd(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function ld(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function ud(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,bd(r.key),r)}}function dd(e,t,n){return t&&ud(e.prototype,t),n&&ud(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function fd(e,t,n){return t=gd(t),pd(e,hd()?Reflect.construct(t,n||[],gd(e).constructor):t.apply(e,n))}function pd(e,t){if(t&&(ad(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return md(e)}function md(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function hd(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(hd=function(){return!!e})()}function gd(e){return gd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},gd(e)}function _d(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&vd(e,t)}function vd(e,t){return vd=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},vd(e,t)}function yd(e,t,n){return t=bd(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bd(e){var t=xd(e,`string`);return ad(t)==`symbol`?t:t+``}function xd(e,t){if(ad(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(ad(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var Sd=32,Cd=function(e){function t(){return ld(this,t),fd(this,t,arguments)}return _d(t,e),dd(t,[{key:`renderIcon`,value:function(e){var t=this.props.inactiveColor,n=Sd/2,r=Sd/6,i=Sd/3,a=e.inactive?t:e.color;if(e.type===`plainline`)return f.createElement(`line`,{strokeWidth:4,fill:`none`,stroke:a,strokeDasharray:e.payload.strokeDasharray,x1:0,y1:n,x2:Sd,y2:n,className:`recharts-legend-icon`});if(e.type===`line`)return f.createElement(`path`,{strokeWidth:4,fill:`none`,stroke:a,d:`M0,${n}h${i}
12            A${r},${r},0,1,1,${2*i},${n}
13            H${Sd}M${2*i},${n}
14            A${r},${r},0,1,1,${i},${n}`,className:`recharts-legend-icon`});if(e.type===`rect`)return f.createElement(`path`,{stroke:`none`,fill:a,d:`M0,${Sd/8}h${Sd}v${Sd*3/4}h${-Sd}z`,className:`recharts-legend-icon`});if(f.isValidElement(e.legendIcon)){var o=cd({},e);return delete o.legendIcon,f.cloneElement(e.legendIcon,o)}return f.createElement(id,{fill:a,cx:n,cy:n,size:Sd,sizeType:`diameter`,type:e.type})}},{key:`renderItems`,value:function(){var e=this,t=this.props,n=t.payload,r=t.iconSize,i=t.layout,a=t.formatter,o=t.inactiveColor,s={x:0,y:0,width:Sd,height:Sd}
14,c={display:i===`horizontal`?`inline-block`:`block`,marginRight:10},u={display:`inline-block`,verticalAlign:`middle`,marginRight:4};return n.map(function(t,n){var i=t.formatter||a,d=l(yd(yd({"recharts-legend-item":!0},`legend-item-${n}`,!0),`inactive`,t.inactive));if(t.type===`none`)return null;var p=(0,U.default)(t.value)?null:t.value;(0,U.default)(t.value);var m=t.inactive?o:t.color;return f.createElement(`li`,od({className:d,style:c,key:`legend-item-${n}`},Fc(e.props,t,n)),f.createElement(ol,{width:r,height:r,viewBox:s,style:u},e.renderIcon(t)),f.createElement(`span`,{className:`recharts-legend-item-text`,style:{color:m}},i?i(p,t,n):p))})}},{key:`render`,value:function(){var e=this.props,t=e.payload,n=e.layout,r=e.align;if(!t||!t.length)return null;var i={padding:0,margin:0,textAlign:n===`horizontal`?r:`left`};return f.createElement(`ul`,{className:`recharts-default-legend`,style:i},this.renderItems())}}])}(f.PureComponent);yd(Cd,`displayName`,`Legend`),yd(Cd,`defaultProps`,{iconSize:14,layout:`horizontal`,align:`center`,verticalAlign:`middle`,inactiveColor:`#ccc`});var wd=n(((e,t)=>{var n=Ls();function r(){this.__data__=new n,this.size=0}t.exports=r})),Td=n(((e,t)=>{function n(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}t.exports=n})),Ed=n(((e,t)=>{function n(e){return this.__data__.get(e)}t.exports=n})),Dd=n(((e,t)=>{function n(e){return this.__data__.has(e)}t.exports=n})),Od=n(((e,t)=>{var n=Ls(),r=Rs(),i=Ks(),a=200;function o(e,t){var o=this.__data__;if(o instanceof n){var s=o.__data__;if(!r||s.length<a-1)return s.push([e,t]),this.size=++o.size,this;o=this.__data__=new i(s)}return o.set(e,t),this.size=o.size,this}t.exports=o})),kd=n(((e,t)=>{var n=Ls(),r=wd(),i=Td(),a=Ed(),o=Dd(),s=Od();function c(e){var t=this.__data__=new n(e);this.size=t.size}c.prototype.clear=r,c.prototype.delete=i,c.prototype.get=a,c.prototype.has=o,c.prototype.set=s,t.exports=c})),Ad=n(((e,t)=>{function n(e){return this.__data__.set(e,`__lodash_hash_undefined__`),this}t.exports=n})),jd=n(((e,t)=>{function n(e){return this.__data__.has(e)}t.exports=n})),Md=n(((e,t)=>{var n=Ks(),r=Ad(),i=jd();function a(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new n;++t<r;)this.add(e[t])}a.prototype.add=a.prototype.push=r,a.prototype.has=i,t.exports=a})),Nd=n(((e,t)=>{function n(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}t.exports=n})),Pd=n(((e,t)=>{function n(e,t){return e.has(t)}t.exports=n})),Fd=n(((e,t)=>{var n=Md(),r=Nd(),i=Pd(),a=1,o=2;function s(e,t,s,c,l,u){var d=s&a,f=e.length,p=t.length;if(f!=p&&!(d&&p>f))return!1;var m=u.get(e),h=u.get(t);if(m&&h)return m==t&&h==e;var g=-1,_=!0,v=s&o?new n:void 0;for(u.set(e,t),u.set(t,e);++g<f;){var y=e[g],b=t[g];if(c)var x=d?c(b,y,g,t,e,u):c(y,b,g,e,t,u);if(x!==void 0){if(x)continue;_=!1;break}if(v){if(!r(t,function(e,t){if(!i(v,t)&&(y===e||l(y,e,s,c,u)))return v.push(t)})){_=!1;break}}else if(!(y===b||l(y,b,s,c,u))){_=!1;break}}return u.delete(e),u.delete(t),_}t.exports=s})),Id=n(((e,t)=>{t.exports=ss().Uint8Array})),Ld=n(((e,t)=>{function n(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}t.exports=n})),Rd=n(((e,t)=>{function n(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}t.exports=n})),zd=n(((e,t)=>{var n=cs(),r=Id(),i=js(),a=Fd(),o=Ld(),s=Rd(),c=1,l=2,u=`[object Boolean]`,d=`[object Date]`,f=`[object Error]`,p=`[object Map]`,m=`[object Number]`,h=`[object RegExp]`,g=`[object Set]`,_=`[object String]`,v=`[object Symbol]`,y=`[object ArrayBuffer]`,b=`[object DataView]`,x=n?n.prototype:void 0,S=x?x.valueOf:void 0;function C(e,t,n,x,C,w,T){switch(n){case b:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case y:return!(e.byteLength!=t.byteLength||!w(new r(e),new r(t)));case u:case d:case m:return i(+e,+t);case f:return e.name==t.name&&e.message==t.message;case h:case _:return e==t+``;case p:var E=o;case g:var D=x&c;if(E||=s,e.size!=t.size&&!D)return!1;var O=T.get(e);if(O)return O==t;x|=l,T.set(e,t);var k=a(E(e),E(t),x,C,w,T);return T.delete(e),k;
vendor: 9,998 bytes, line 14
14case v:if(S)return S.call(e)==S.call(t)}return!1}t.exports=C})),Bd=n(((e,t)=>{function n(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}t.exports=n})),Vd=n(((e,t)=>{var n=Bd(),r=as();function i(e,t,i){var a=t(e);return r(e)?a:n(a,i(e))}t.exports=i})),Hd=n(((e,t)=>{function n(e,t){for(var n=-1,r=e==null?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a}t.exports=n})),Ud=n(((e,t)=>{function n(){return[]}t.exports=n})),Wd=n(((e,t)=>{var n=Hd(),r=Ud(),i=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols;t.exports=a?function(e){return e==null?[]:(e=Object(e),n(a(e),function(t){return i.call(e,t)}))}:r})),Gd=n(((e,t)=>{function n(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}t.exports=n})),Kd=n(((e,t)=>{var n=ds(),r=fs(),i=`[object Arguments]`;function a(e){return r(e)&&n(e)==i}t.exports=a})),qd=n(((e,t)=>{var n=Kd(),r=fs(),i=Object.prototype,a=i.hasOwnProperty,o=i.propertyIsEnumerable;t.exports=n(function(){return arguments}())?n:function(e){return r(e)&&a.call(e,`callee`)&&!o.call(e,`callee`)}})),Jd=n(((e,t)=>{function n(){return!1}t.exports=n})),Yd=n(((e,t)=>{var n=ss(),r=Jd(),i=typeof e==`object`&&e&&!e.nodeType&&e,a=i&&typeof t==`object`&&t&&!t.nodeType&&t,o=a&&a.exports===i?n.Buffer:void 0;t.exports=(o?o.isBuffer:void 0)||r})),Xd=n(((e,t)=>{var n=/^(?:0|[1-9]\d*)$/;function r(e,t){var r=typeof e;return t??=9007199254740991,!!t&&(r==`number`||r!=`symbol`&&n.test(e))&&e>-1&&e%1==0&&e<t}t.exports=r})),Zd=n(((e,t)=>{function n(e){return typeof e==`number`&&e>-1&&e%1==0&&e<=9007199254740991}t.exports=n})),Qd=n(((e,t)=>{var n=ds(),r=Zd(),i=fs(),a=`[object Arguments]`,o=`[object Array]`,s=`[object Boolean]`,c=`[object Date]`,l=`[object Error]`,u=`[object Function]`,d=`[object Map]`,f=`[object Number]`,p=`[object Object]`,m=`[object RegExp]`,h=`[object Set]`,g=`[object String]`,_=`[object WeakMap]`,v=`[object ArrayBuffer]`,y=`[object DataView]`,b=`[object Float32Array]`,x=`[object Float64Array]`,S=`[object Int8Array]`,C=`[object Int16Array]`,w=`[object Int32Array]`,T=`[object Uint8Array]`,E=`[object Uint8ClampedArray]`,D=`[object Uint16Array]`,O=`[object Uint32Array]`,k={};k[b]=k[x]=k[S]=k[C]=k[w]=k[T]=k[E]=k[D]=k[O]=!0,k[a]=k[o]=k[v]=k[s]=k[y]=k[c]=k[l]=k[u]=k[d]=k[f]=k[p]=k[m]=k[h]=k[g]=k[_]=!1;function A(e){return i(e)&&r(e.length)&&!!k[n(e)]}t.exports=A})),$d=n(((e,t)=>{function n(e){return function(t){return e(t)}}t.exports=n})),ef=n(((e,t)=>{var n=os(),r=typeof e==`object`&&e&&!e.nodeType&&e,i=r&&typeof t==`object`&&t&&!t.nodeType&&t,a=i&&i.exports===r&&n.process;t.exports=function(){try{return i&&i.require&&i.require(`util`).types||a&&a.binding&&a.binding(`util`)}catch{}}()})),tf=n(((e,t)=>{var n=Qd(),r=$d(),i=ef(),a=i&&i.isTypedArray;t.exports=a?r(a):n})),nf=n(((e,t)=>{var n=Gd(),r=qd(),i=as(),a=Yd(),o=Xd(),s=tf(),c=Object.prototype.hasOwnProperty;function l(e,t){var l=i(e),u=!l&&r(e),d=!l&&!u&&a(e),f=!l&&!u&&!d&&s(e),p=l||u||d||f,m=p?n(e.length,String):[],h=m.length;for(var g in e)(t||c.call(e,g))&&!(p&&(g==`length`||d&&(g==`offset`||g==`parent`)||f&&(g==`buffer`||g==`byteLength`||g==`byteOffset`)||o(g,h)))&&m.push(g);return m}t.exports=l})),rf=n(((e,t)=>{var n=Object.prototype;function r(e){var t=e&&e.constructor;return e===(typeof t==`function`&&t.prototype||n)}t.exports=r})),af=n(((e,t)=>{function n(e,t){return function(n){return e(t(n))}}t.exports=n})),of=n(((e,t)=>{t.exports=af()(Object.keys,Object)})),sf=n(((e,t)=>{var n=rf(),r=of(),i=Object.prototype.hasOwnProperty;function a(e){if(!n(e))return r(e);var t=[];for(var a in Object(e))i.call(e,a)&&a!=`constructor`&&t.push(a);return t}t.exports=a})),cf=n(((e,t)=>{var n=gs(),r=Zd();function i(e){return e!=null&&r(e.length)&&!n(e)}t.exports=i})),lf=n(((e,t)=>{var n=nf(),r=sf(),i=cf();function a(e){return i(e)?n(e):r(e)}t.exports=a})),uf=n(((e,t)=>{var n=Vd(),r=Wd(),i=lf();function a(e){return n(e,i,r)}t.exports=a})),df=n(((e,t)=>{var n=uf(),r=1,i=Object.prototype.hasOwnProperty;function a(e,t,a,o,s,c){var l=a&r,u=n(e),d=u.length;if(d!=n(t).length&&!l)return!1;for(var f=d;f--;){var p=u[f];if(!(l?p in t:i.call(t,p)))return!1}var m=c.get(e),h=c.get(t);if(m&&h)return m==t&&h==e;var g=!0;c.set(e,t),c.set(t,e);for(var _=l;++f<d;){p=u[f];var v=e[p],y=t[p];if(o)var b=l?o(y,v,p,t,e,c):o(v,y,p,e,t,c);if(!(b===void 0?v===y||s(v,y,a,o,c):b)){g=!1;break}_||=p==`constructor`}if(g&&!_){var x=e.constructor,S=t.constructor;x!=S&&`constructor`in e&&`constructor`in t&&!(typeof x==`function`&&x instanceof x&&typeof S==`function`&&S instanceof S)&&(g=!1)}return c.delete(e),c.delete(t),g}t.exports=a})),ff=n(((e,t)=>{t.exports=Ss()(ss(),`DataView`)})),pf=n(((e,t)=>{t.exports=Ss()(ss(),`Promise`)})),mf=n(((e,t)=>{t.exports=Ss()(ss(),`Set`)})),hf=n(((e,t)=>{t.exports=Ss()(ss(),`WeakMap`)})),gf=n(((e,t)=>{var n=ff(),r=Rs(),i=pf(),a=mf(),o=hf(),s=ds(),c=ys(),l=`[object Map]`,u=`[object Object]`,d=`[object Promise]`,f=`[object Set]`,p=`[object WeakMap]`,m=`[object DataView]`,h=c(n),g=c(r),_=c(i),v=c(a),y=c(o),b=s;(n&&b(new n(new ArrayBuffer(1)))!=m||r&&b(new r)!=l||i&&b(i.resolve())!=d||a&&b(new a)!=f||o&&b(new o)!=p)&&(b=function(e){var t=s(e),n=t==u?e.constructor:void 0,r=n?c(n):``;if(r)switch(r){case h:return m;case g:return l;case _:return d;case v:return f;case y:return p}return t}),t.exports=b})),_f=n(((e,t)=>{var n=kd(),r=Fd(),i=zd(),a=df(),o=gf(),s=as(),c=Yd(),l=tf(),u=1,d=`[object Arguments]`,f=`[object Array]`,p=`[object Object]`,m=Object.prototype.hasOwnProperty;function h(e,t,h,g,_,v){var y=s(e),b=s(t),x=y?f:o(e),S=b?f:o(t);x=x==d?p:x,S=S==d?p:S;var C=x==p,w=S==p,T=x==S;if(T&&c(e)){if(!c(t))return!1;y=!0,C=!1}if(T&&!C)return v||=new n,y||l(e)?r(e,t,h,g,_,v):i(e,t,x,h,g,_,v);if(!(h&u)){var E=C&&m.call(e,`__wrapped__`),D=w&&m.call(t,`__wrapped__`);if(E||D){var O=E?e.value():e,k=D?t.value():t;return v||=new n,_(O,k,h,g,v)}}return T?(v||=new n,a(e,t,h,g,_,v)):!1}t.exports=h})),vf=n(((e,t)=>{var n=_f(),r=fs();function i(e,t,a,o,s){return e===t?!0:e==null||t==null||!r(e)&&!r(t)?e!==e&&t!==t:n(e,t,a,o,i,s)}t.exports=i})),yf=n(((e,t)=>{var n=kd(),r=vf(),i=1,a=2;function o(e,t,o,s){var c=o.length,l=c,u=!s;if(e==null)return!l;for(e=Object(e);c--;){var d=o[c];if(u&&d[2]?d[1]!==e[d[0]]:!(d[0]in e))return!1}for(;++c<l;){d=o[c];var f=d[0],p=e[f],m=d[1];if(u&&d[2]){if(p===void 0&&!(f in e))return!1}else{var h=new n;if(s)var g=s(p,m,f,e,t,h);if(!(g===void 0?r(m,p,i|a,s,h):g))return!1}}return!0}t.exports=o})),bf=n(((e,t)=>{var n=hs();function r(e){return e===e&&!n(e)}t.exports=r})),xf=n(((e,t)=>{var n=bf(),r=lf();function i(e){for(var t=r(e),i=t.length;i--;){var a=t[i],o=e[a];t[i]=[a,o,n(o)]}return t}t.exports=i})),Sf=n(((e,t)=>{function n(e,t){return function(n){return n!=null&&n[e]===t&&(t!==void 0||e in Object(n))}}t.exports=n})),Cf=n(((e,t)=>{var n=yf(),r=xf(),i=Sf();function a(e){var t=r(e);return t.length==1&&t[0][2]?i(t[0][0],t[0][1]):function(r){return r===e||n(r,e,t)}}t.exports=a})),wf=n(((e,t)=>{function n(e,t){return e!=null&&t in Object(e)}t.exports=n})),Tf=n(((e,t)=>{var n=$s(),r=qd(),i=as(),a=Xd(),o=Zd(),s=ec();function c(e,t,c){t=n(t,e);for(var l=-1,u=t.length,d=!1;++l<u;){var f=s(t[l]);if(!(d=e!=null&&c(e,f)))break;e=e[f]}return d||++l!=u?d:(u=e==null?0:e.length,!!u&&o(u)&&a(f,u)&&(i(e)||r(e)))}t.exports=c})),Ef=n(((e,t)=>{var n=wf(),r=Tf();function i(e,t){return e!=null&&r(e,t,n)}t.exports=i})),Df=n(((e,t)=>{var n=vf(),r=nc(),i=Ef(),a=ms(),o=bf(),s=Sf(),c=ec(),l=1,u=2;function d(e,t){return a(e)&&o(t)?s(c(e),t):function(a){var o=r(a,e);return o===void 0&&o===t?i(a,e):n(t,o,l|u)}}t.exports=d})),Of=n(((e,t)=>{function n(e){return e}t.exports=n})),kf=n(((e,t)=>{function n(e){return function(t){return t?.[e]}}t.exports=n})),Af=n(((e,t)=>{var n=tc();function r(e){return function(t){return n(t,e)}}t.exports=r})),jf=n(((e,t)=>{var n=kf(),r=Af(),i=ms(),a=ec();function o(e){return i(e)?n(a(e)):r(e)}t.exports=o})),Mf=n(((e,t)=>{var n=Cf(),r=Df(),i=Of(),a=as(),o=jf();function s(e){return typeof e==`function`?e:e==null?i:typeof e==`object`?a(e)?r(e[0],e[1]):n(e):o(e)}t.exports=s})),Nf=n(((e,t)=>{function n(e,t,n,r){for(var i=e.length,a=n+(r?1:-1);r?a--:++a<i;)if(t(e[a],a,e))return a;return-1}t.exports=n})),Pf=n(((e,t)=>{function n(e){return e!==e}t.exports=n})),Ff=n(((e,t)=>{function n(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}t.exports=n})),If=n(((e,t)=>{var n=Nf(),r=Pf(),i=Ff();function a(e,t,a){return t===t?i(e,t,a):n(e,r,a)}t.exports=a})),Lf=n(((e,t)=>{var n=If();function r(e,t){return!!(e!=null&&e.length)&&n(e,t,0)>-1}t.exports=r})),Rf=n(((e,t)=>{function n(e,t,n){for(var r=-1,i=e==null?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}t.exports=n})),zf=n(((e,t)=>{function n(){}t.exports=n})),Bf=n(((e,t)=>{var n=mf(),r=zf(),i=Rd();t.exports=n&&1/i(new n([,-0]))[1]==1/0?function(e){return new n(e)}:r})),Vf=n(((e,t)=>{var n=Md(),r=Lf(),i=Rf(),a=Pd(),o=Bf(),s=Rd(),c=200;function l(e,t,l){var u=-1,d=r,f=e.length,p=!0,m=[],h=m;if(l)p=!1,d=i;else if(f>=c){var g=t?null:o(e);if(g)return s(g);p=!1,d=a,h=new n}else h=t?[]:m;outer:for(;++u<f;){var _=e[u],v=t?t(_):_;if(_=l||_!==0?_:0,p&&v===v){for(var y=h.length;y--;)if(h[y]===v)continue outer;t&&h.push(v),m.push(_)}else d(h,v,l)||(h!==m&&h.push(v),m.push(_))}return m}t.exports=l})),Hf=e(n(((e,t)=>{var n=Mf(),r=Vf();function i(e,t){return e&&e.length?r(e,n(t,2)):[]}t.exports=i}))());function Uf(e,t,n){return t===!0?(0,Hf.default)(e,n):(0,U.default)(t)?(0,Hf.default)(e,t):e}function Wf(e){"@babel/helpers - typeof";return Wf=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},Wf(e)}var Gf=[`ref`];function Kf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function qf(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];
14t%2?Kf(Object(n),!0).forEach(function(t){ip(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Kf(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Jf(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function Yf(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,ap(r.key),r)}}function Xf(e,t,n){return t&&Yf(e.prototype,t),n&&Yf(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Zf(e,t,n){return t=tp(t),Qf(e,ep()?Reflect.construct(t,n||[],tp(e).constructor):t.apply(e,n))}function Qf(e,t){if(t&&(Wf(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return $f(e)}function $f(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function ep(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(ep=function(){return!!e})()}function tp(e){return tp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},tp(e)}function np(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&rp(e,t)}function rp(e,t){return rp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},rp(e,t)}function ip(e,t,n){return t=ap(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ap(e){var t=op(e,`string`);return Wf(t)==`symbol`?t:t+``}function op(e,t){if(Wf(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(Wf(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function sp(e,t){if(e==null)return{};var n=cp(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function cp(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function lp(e){return e.value}function up(e,t){if(f.isValidElement(e))return f.cloneElement(e,t);if(typeof e==`function`)return f.createElement(e,t);t.ref;var n=sp(t,Gf);return f.createElement(Cd,n)}var dp=1,fp=function(e){function t(){var e;Jf(this,t);var n=[...arguments];return e=Zf(this,t,[].concat(n)),ip(e,`lastBoundingBox`,{width:-1,height:-1}),e}return np(t,e),Xf(t,[{key:`componentDidMount`,value:function(){this.updateBBox()}},{key:`componentDidUpdate`,value:function(){this.updateBBox()}},{key:`getBBox`,value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var e=this.wrapperNode.getBoundingClientRect();return e.height=this.wrapperNode.offsetHeight,e.width=this.wrapperNode.offsetWidth,e}return null}},{key:`updateBBox`,value:function(){var e=this.props.onBBoxUpdate,t=this.getBBox();t?(Math.abs(t.width-this.lastBoundingBox.width)>dp||Math.abs(t.height-this.lastBoundingBox.height)>dp)&&(this.lastBoundingBox.width=t.width,this.lastBoundingBox.height=t.height,e&&e(t)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,e&&e(null))}},{key:`getBBoxSnapshot`,value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?qf({},this.lastBoundingBox):{width:0,height:0}}},{key:`getDefaultPosition`,value:function(e){var t=this.props,n=t.layout,r=t.align,i=t.verticalAlign,a=t.margin,o=t.chartWidth,s=t.chartHeight,c,l;if(!e||(e.left===void 0||e.left===null)&&(e.right===void 0||e.right===null))if(r===`center`&&n===`vertical`){var u=this.getBBoxSnapsh
14ot();c={left:((o||0)-u.width)/2}}else c=r===`right`?{right:a&&a.right||0}:{left:a&&a.left||0};if(!e||(e.top===void 0||e.top===null)&&(e.bottom===void 0||e.bottom===null))if(i===`middle`){var d=this.getBBoxSnapshot();l={top:((s||0)-d.height)/2}}else l=i===`bottom`?{bottom:a&&a.bottom||0}:{top:a&&a.top||0};return qf(qf({},c),l)}},{key:`render`,value:function(){var e=this,t=this.props,n=t.content,r=t.width,i=t.height,a=t.wrapperStyle,o=t.payloadUniqBy,s=t.payload,c=qf(qf({position:`absolute`,width:r||`auto`,height:i||`auto`},this.getDefaultPosition(a)),a);return f.createElement(`div`,{className:`recharts-legend-wrapper`,style:c,ref:function(t){e.wrapperNode=t}},up(n,qf(qf({},this.props),{},{payload:Uf(s,o,lp)})))}}],[{key:`getWithHeight`,value:function(e,t){var n=qf(qf({},this.defaultProps),e.props).layout;return n===`vertical`&&V(e.props.height)?{height:e.props.height}:n===`horizontal`?{width:e.props.width||t}:null}}])}(f.PureComponent);ip(fp,`displayName`,`Legend`),ip(fp,`defaultProps`,{iconSize:14,layout:`horizontal`,align:`center`,verticalAlign:`bottom`});var pp=n(((e,t)=>{var n=cs(),r=qd(),i=as(),a=n?n.isConcatSpreadable:void 0;function o(e){return i(e)||r(e)||!!(a&&e&&e[a])}t.exports=o})),mp=n(((e,t)=>{var n=Bd(),r=pp();function i(e,t,a,o,s){var c=-1,l=e.length;for(a||=r,s||=[];++c<l;){var u=e[c];t>0&&a(u)?t>1?i(u,t-1,a,o,s):n(s,u):o||(s[s.length]=u)}return s}t.exports=i})),hp=n(((e,t)=>{function n(e){return function(t,n,r){for(var i=-1,a=Object(t),o=r(t),s=o.length;s--;){var c=o[e?s:++i];if(n(a[c],c,a)===!1)break}return t}}t.exports=n})),gp=n(((e,t)=>{t.exports=hp()()})),_p=n(((e,t)=>{var n=gp(),r=lf();function i(e,t){return e&&n(e,t,r)}t.exports=i})),vp=n(((e,t)=>{var n=cf();function r(e,t){return function(r,i){if(r==null)return r;if(!n(r))return e(r,i);for(var a=r.length,o=t?a:-1,s=Object(r);(t?o--:++o<a)&&i(s[o],o,s)!==!1;);return r}}t.exports=r})),yp=n(((e,t)=>{var n=_p();t.exports=vp()(n)})),bp=n(((e,t)=>{var n=yp(),r=cf();function i(e,t){var i=-1,a=r(e)?Array(e.length):[];return n(e,function(e,n,r){a[++i]=t(e,n,r)}),a}t.exports=i})),xp=n(((e,t)=>{function n(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}t.exports=n})),Sp=n(((e,t)=>{var n=ps();function r(e,t){if(e!==t){var r=e!==void 0,i=e===null,a=e===e,o=n(e),s=t!==void 0,c=t===null,l=t===t,u=n(t);if(!c&&!u&&!o&&e>t||o&&s&&l&&!c&&!u||i&&s&&l||!r&&l||!a)return 1;if(!i&&!o&&!u&&e<t||u&&r&&a&&!i&&!o||c&&r&&a||!s&&a||!l)return-1}return 0}t.exports=r})),Cp=n(((e,t)=>{var n=Sp();function r(e,t,r){for(var i=-1,a=e.criteria,o=t.criteria,s=a.length,c=r.length;++i<s;){var l=n(a[i],o[i]);if(l)return i>=c?l:l*(r[i]==`desc`?-1:1)}return e.index-t.index}t.exports=r})),wp=n(((e,t)=>{var n=Xs(),r=tc(),i=Mf(),a=bp(),o=xp(),s=$d(),c=Cp(),l=Of(),u=as();function d(e,t,d){t=t.length?n(t,function(e){return u(e)?function(t){return r(t,e.length===1?e[0]:e)}:e}):[l];var f=-1;return t=n(t,s(i)),o(a(e,function(e,r,i){return{criteria:n(t,function(t){return t(e)}),index:++f,value:e}}),function(e,t){return c(e,t,d)})}t.exports=d})),Tp=n(((e,t)=>{function n(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}t.exports=n})),Ep=n(((e,t)=>{var n=Tp(),r=Math.max;function i(e,t,i){return t=r(t===void 0?e.length-1:t,0),function(){for(var a=arguments,o=-1,s=r(a.length-t,0),c=Array(s);++o<s;)c[o]=a[t+o];o=-1;for(var l=Array(t+1);++o<t;)l[o]=a[o];return l[t]=i(c),n(e,this,l)}}t.exports=i})),Dp=n(((e,t)=>{function n(e){return function(){return e}}t.exports=n})),Op=n(((e,t)=>{var n=Ss();t.exports=function(){try{var e=n(Object,`defineProperty`);return e({},``,{}),e}catch{}}()})),kp=n(((e,t)=>{var n=Dp(),r=Op(),i=Of();t.exports=r?function(e,t){return r(e,`toString`,{configurable:!0,enumerable:!1,value:n(t),writable:!0})}:i})),Ap=n(((e,t)=>{var n=Date.now;function r(e){var t=0,r=0;return function(){var i=n(),a=16-(i-r);if(r=i,a>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}t.exports=r})),jp=n(((e,t)=>{var n=kp();t.exports=Ap()(n)})),Mp=n(((e,t)=>{var n=Of(),r=Ep(),i=jp();function a(e,t){return i(r(e,t,n),e+``)}t.exports=a})),Np=n(((e,t)=>{var n=js(),r=cf(),i=Xd(),a=hs();function o(e,t,o){if(!a(o))return!1;var s=typeof t;return(s==`number`?r(o)&&i(t,o.length):s==`string`&&t in o)?n(o[t],e):!1}t.exports=o})),Pp=e(n(((e,t)=>{var n=mp(),r=wp(),i=Mp(),a=Np();t.exports=i(function(e,t){if(e==null)return[];var i=t.length;return i>1&&a(e,t[0],t[1])?t=[]:i>2&&a(t[0],t[1],t[2])&&(t=[t[0]]),r(e,n(t,1),[])})}))());function Fp(e){"@babel/helpers - typeof";return Fp=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},Fp(e)}function Ip(){return Ip=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ip.apply(this,arguments)}function Lp(e,t){return Hp(e)||Vp(e,t)||zp(e,t)||Rp()}
14function Rp(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
15In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function zp(e,t){if(e){if(typeof e==`string`)return Bp(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Bp(e,t)}}function Bp(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Vp(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function Hp(e){if(Array.isArray(e))return e}function Up(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Wp(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Up(Object(n),!0).forEach(function(t){Gp(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Up(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Gp(e,t,n){return t=Kp(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Kp(e){var t=qp(e,`string`);return Fp(t)==`symbol`?t:t+``}function qp(e,t){if(Fp(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(Fp(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Jp(e){return Array.isArray(e)&&H(e[0])&&H(e[1])?e.join(` ~ `):e}var Yp=function(e){var t=e.separator,n=t===void 0?` : `:t,r=e.contentStyle,i=r===void 0?{}:r,a=e.itemStyle,o=a===void 0?{}:a,s=e.labelStyle,c=s===void 0?{}:s,u=e.payload,d=e.formatter,p=e.itemSorter,m=e.wrapperClassName,h=e.labelClassName,g=e.label,_=e.labelFormatter,v=e.accessibilityLayer,y=v!==void 0&&v,b=function(){if(u&&u.length){var e={padding:0,margin:0},t=(p?(0,Pp.default)(u,p):u).map(function(e,t){if(e.type===`none`)return null;var r=Wp({display:`block`,paddingTop:4,paddingBottom:4,color:e.color||`#000`},o),i=e.formatter||d||Jp,a=e.value,s=e.name,c=a,l=s;if(i&&c!=null&&l!=null){var p=i(a,s,e,t,u);if(Array.isArray(p)){var m=Lp(p,2);c=m[0],l=m[1]}else c=p}return f.createElement(`li`,{className:`recharts-tooltip-item`,key:`tooltip-item-${t}`,style:r},H(l)?f.createElement(`span`,{className:`recharts-tooltip-item-name`},l):null,H(l)?f.createElement(`span`,{className:`recharts-tooltip-item-separator`},n):null,f.createElement(`span`,{className:`recharts-tooltip-item-value`},c),f.createElement(`span`,{className:`recharts-tooltip-item-unit`},e.unit||``))});return f.createElement(`ul`,{className:`recharts-tooltip-item-list`,style:e},t)}return null},x=Wp({margin:0,padding:10,backgroundColor:`#fff`,border:`1px solid #ccc`,whiteSpace:`nowrap`},i),S=Wp({margin:0},c),C=!(0,B.default)(g),w=C?g:``,T=l(`recharts-default-tooltip`,m),E=l(`recharts-tooltip-label`,h);C&&_&&u!=null&&(w=_(g,u));var D=y?{role:`status`,"aria-live":`assertive`}:{};return f.createElement(`div`,Ip({className:T,style:x},D),f.createElement(`p`,{className:E,style:S},f.isValidElement(w)?w:`${w}`),b())};function Xp(e){"@babel/helpers - typeof";return Xp=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},Xp(e)}function Zp(e,t,n){return t=Qp(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Qp(e){var t=$p(e,`string`);return Xp(t)==`symbol`?t:t+``}function $p(e,t){if(Xp(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(Xp(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var em=`recharts-tooltip-wrapper`,tm={visibility:`hidden`};function nm(e){var t=e.coordinate,n=e.translateX,r=e.translateY;return l(em,Zp(Zp(Zp(Zp({},`${em}-right`,V(n)&&t&&V(t.x)&&n>=t.x),`${em}-left`,V(n)&&t&&V(t.x)&&n<t.x),`${em}-bottom`,V(r)&&t&&V(t.y)&&r>=t.y),`${em}-top`,V(r)&&t&&V(t.y)&&r<t.y))}function rm(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.key,i=e.offsetTopLeft,a=e.position,o=e.reverseDirection,s=e.tooltipDimension,c=e.viewBox,l=e.viewBoxDimension;if(a&&V(a[r]))return a[r];var u=n[r]-s-i,d=n[r]+i;return t[r]?o[r]?u:d:o[r]?u<c[r]?Math.max(d,c[r]):Math.max(u,c[r]):d+s>c[r]+l?Math.max(u,c[r]):Math.max(d,c[r])}function im(e){var t=e.translateX,n=e.translateY;return{transform:e.useTranslate3d?`translate3d(${t}px, ${n}px, 0)`:`translate(${t}px, ${n}px)`}}function am(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.offsetTopLeft,i=e.position,a=e.reverseDirection,o=e.tooltipBox,s=e.useTranslate3d,
15c=e.viewBox,l,u,d;return o.height>0&&o.width>0&&n?(u=rm({allowEscapeViewBox:t,coordinate:n,key:`x`,offsetTopLeft:r,position:i,reverseDirection:a,tooltipDimension:o.width,viewBox:c,viewBoxDimension:c.width}),d=rm({allowEscapeViewBox:t,coordinate:n,key:`y`,offsetTopLeft:r,position:i,reverseDirection:a,tooltipDimension:o.height,viewBox:c,viewBoxDimension:c.height}),l=im({translateX:u,translateY:d,useTranslate3d:s})):l=tm,{cssProperties:l,cssClasses:nm({translateX:u,translateY:d,coordinate:n})}}function om(e){"@babel/helpers - typeof";return om=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},om(e)}function sm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function cm(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?sm(Object(n),!0).forEach(function(t){ym(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sm(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function lm(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function um(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,bm(r.key),r)}}function dm(e,t,n){return t&&um(e.prototype,t),n&&um(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function fm(e,t,n){return t=gm(t),pm(e,hm()?Reflect.construct(t,n||[],gm(e).constructor):t.apply(e,n))}function pm(e,t){if(t&&(om(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return mm(e)}function mm(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function hm(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(hm=function(){return!!e})()}function gm(e){return gm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},gm(e)}function _m(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&vm(e,t)}function vm(e,t){return vm=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},vm(e,t)}function ym(e,t,n){return t=bm(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bm(e){var t=xm(e,`string`);return om(t)==`symbol`?t:t+``}function xm(e,t){if(om(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(om(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var Sm=1,Cm=function(e){function t(){var e;lm(this,t);var n=[...arguments];return e=fm(this,t,[].concat(n)),ym(e,`state`,{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),ym(e,`handleKeyDown`,function(t){t.key===`Escape`&&e.setState({dismissed:!0,dismissedAtCoordinate:{x:e.props.coordinate?.x??0,y:e.props.coordinate?.y??0}})}),e}return _m(t,e),dm(t,[{key:`updateBBox`,value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var e=this.wrapperNode.getBoundingClientRect();(Math.abs(e.width-this.state.lastBoundingBox.width)>Sm||Math.abs(e.height-this.state.lastBoundingBox.height)>Sm)&&this.setState({lastBoundingBox:{width:e.width,height:e.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(`ke
15ydown`,this.handleKeyDown),this.updateBBox()}},{key:`componentWillUnmount`,value:function(){document.removeEventListener(`keydown`,this.handleKeyDown)}},{key:`componentDidUpdate`,value:function(){this.props.active&&this.updateBBox(),this.state.dismissed&&(this.props.coordinate?.x!==this.state.dismissedAtCoordinate.x||this.props.coordinate?.y!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:`render`,value:function(){var e=this,t=this.props,n=t.active,r=t.allowEscapeViewBox,i=t.animationDuration,a=t.animationEasing,o=t.children,s=t.coordinate,c=t.hasPayload,l=t.isAnimationActive,u=t.offset,d=t.position,p=t.reverseDirection,m=t.useTranslate3d,h=t.viewBox,g=t.wrapperStyle,_=am({allowEscapeViewBox:r,coordinate:s,offsetTopLeft:u,position:d,reverseDirection:p,tooltipBox:this.state.lastBoundingBox,useTranslate3d:m,viewBox:h}),v=_.cssClasses,y=_.cssProperties,b=cm(cm({transition:l&&n?`transform ${i}ms ${a}`:void 0},y),{},{pointerEvents:`none`,visibility:!this.state.dismissed&&n&&c?`visible`:`hidden`,position:`absolute`,top:0,left:0},g);return f.createElement(`div`,{tabIndex:-1,className:v,style:b,ref:function(t){e.wrapperNode=t}},o)}}])}(f.PureComponent),wm={isSsr:function(){return!(typeof window<`u`&&window.document&&window.document.createElement&&window.setTimeout)}(),get:function(e){return wm[e]},set:function(e,t){if(typeof e==`string`)wm[e]=t;else{var n=Object.keys(e);n&&n.length&&n.forEach(function(t){wm[t]=e[t]})}}};function Tm(e){"@babel/helpers - typeof";return Tm=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},Tm(e)}function Em(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Dm(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Em(Object(n),!0).forEach(function(t){Rm(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Em(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Om(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function km(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,zm(r.key),r)}}function Am(e,t,n){return t&&km(e.prototype,t),n&&km(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function jm(e,t,n){return t=Fm(t),Mm(e,Pm()?Reflect.construct(t,n||[],Fm(e).constructor):t.apply(e,n))}function Mm(e,t){if(t&&(Tm(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return Nm(e)}function Nm(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function Pm(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Pm=function(){return!!e})()}function Fm(e){return Fm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Fm(e)}function Im(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Lm(e,t)}function Lm(e,t){return Lm=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Lm(e,t)}function Rm(e,t,n){return t=zm(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zm(e){var t=Bm(e,`string`);return Tm(t)==`symbol`?t:t+``}function Bm(e,t){if(Tm(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(Tm(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Vm(e){return e.dataKey}function Hm(e,t){return f.isValidElement(e)?f.cloneElement(e,t):typeof e==`function`?f.createElement(e,t):f.createElement(Yp,t)}var Um=function(e){function t(){return Om(this,t),jm(this,t,arguments)}return Im(t,e),Am(t,[{key:`render`,value:function(){var e=this,t=this.props,n=t.active,r=t.allowEscapeViewBox,i=t.animationDuration,a=t.animationEasing,o=t.content,s=t.coordinate,c=t.filterNull,l=t.isAnimationActive,u=t.offset,d=t.payload,p=t.payloadUniqBy,m=t.position,h=t.reverseDirection,g=t.useTranslate3d,_=t.viewBox,v=t.wrapperStyle,y=d??[];c&&y.length&&(y=Uf(d.filter(function(t){return t.value!=null&&(t.hide!==!0||e.props.includeHidden)}),p,Vm));var b=y.length>0;return f.createElement(Cm,{allowEscapeViewBox:r,animationDuration:i,animationEasing:a,isAnimationActive:l,active:n,coordinate:s,hasPayload:b,offset:u,position:m,reverseDirection:h,useTranslate3d:g,viewBox:_,wrapperStyle:v},Hm(o,Dm(Dm({},this.props),{},{payload:y})))}}])}(f.PureComponent);Rm(Um,`displayName`,`Tooltip`),Rm(Um,`defaultProps`,{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:`ease`,contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!wm.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 Wm=n(((e,t)=>{var n=ss();t.exports=function(){return n.Date.now()}})),Gm=n(((e,t)=>{var n=/\s/;function r(e){for(var t=e.length;t--&&n.test(e.charAt(t)););return t}t.exports=r})),Km=n(((e,t)=>{var n=Gm(),r=/^\s+/;function i(e){return e&&e.slice(0,n(e)+1).replace(r,``)}t.exports=i})),qm=n(((e,t)=>{var n=Km(),r=hs(),i=ps(),a=NaN,o=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,c=/^0o[0-7]+$/i,l=parseInt;function u(e){if(typeof e==`number`)return e;if(i(e))return a;
15if(r(e)){var t=typeof e.valueOf==`function`?e.valueOf():e;e=r(t)?t+``:t}if(typeof e!=`string`)return e===0?e:+e;e=n(e);var u=s.test(e);return u||c.test(e)?l(e.slice(2),u?2:8):o.test(e)?a:+e}t.exports=u})),Jm=n(((e,t)=>{var n=hs(),r=Wm(),i=qm(),a=`Expected a function`,o=Math.max,s=Math.min;function c(e,t,c){var l,u,d,f,p,m,h=0,g=!1,_=!1,v=!0;if(typeof e!=`function`)throw TypeError(a);t=i(t)||0,n(c)&&(g=!!c.leading,_=`maxWait`in c,d=_?o(i(c.maxWait)||0,t):d,v=`trailing`in c?!!c.trailing:v);function y(t){var n=l,r=u;return l=u=void 0,h=t,f=e.apply(r,n),f}function b(e){return h=e,p=setTimeout(C,t),g?y(e):f}function x(e){var n=e-m,r=e-h,i=t-n;return _?s(i,d-r):i}function S(e){var n=e-m,r=e-h;return m===void 0||n>=t||n<0||_&&r>=d}function C(){var e=r();if(S(e))return w(e);p=setTimeout(C,x(e))}function w(e){return p=void 0,v&&l?y(e):(l=u=void 0,f)}function T(){p!==void 0&&clearTimeout(p),h=0,l=m=u=p=void 0}function E(){return p===void 0?f:w(r())}function D(){var e=r(),n=S(e);if(l=arguments,u=this,m=e,n){if(p===void 0)return b(m);if(_)return clearTimeout(p),p=setTimeout(C,t),y(m)}return p===void 0&&(p=setTimeout(C,t)),f}return D.cancel=T,D.flush=E,D}t.exports=c})),Ym=e(n(((e,t)=>{var n=Jm(),r=hs(),i=`Expected a function`;function a(e,t,a){var o=!0,s=!0;if(typeof e!=`function`)throw TypeError(i);return r(a)&&(o=`leading`in a?!!a.leading:o,s=`trailing`in a?!!a.trailing:s),n(e,t,{leading:o,maxWait:t,trailing:s})}t.exports=a}))());function Xm(e){"@babel/helpers - typeof";return Xm=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},Xm(e)}function Zm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Qm(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Zm(Object(n),!0).forEach(function(t){$m(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Zm(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function $m(e,t,n){return t=eh(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function eh(e){var t=th(e,`string`);return Xm(t)==`symbol`?t:t+``}function th(e,t){if(Xm(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(Xm(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function nh(e,t){return sh(e)||oh(e,t)||ih(e,t)||rh()}function rh(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
16In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ih(e,t){if(e){if(typeof e==`string`)return ah(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ah(e,t)}}function ah(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function oh(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function sh(e){if(Array.isArray(e))return e}var ch=(0,f.forwardRef)(function(e,t){var n=e.aspect,r=e.initialDimension,i=r===void 0?{width:-1,height:-1}:r,a=e.width,o=a===void 0?`100%`:a,s=e.height,c=s===void 0?`100%`:s,u=e.minWidth,d=u===void 0?0:u,p=e.minHeight,m=e.maxHeight,h=e.children,g=e.debounce,_=g===void 0?0:g,v=e.id,y=e.className,b=e.onResize,x=e.style,S=x===void 0?{}:x,C=(0,f.useRef)(null),w=(0,f.useRef)();w.current=b,(0,f.useImperativeHandle)(t,function(){return Object.defineProperty(C.current,"current",{get:function(){return console.warn(`The usage of ref.current.current is deprecated and will no longer be supported.`),C.current},configurable:!0})});var T=nh((0,f.useState)({containerWidth:i.width,containerHeight:i.height}),2),E=T[0],D=T[1],O=(0,f.useCallback)(function(e,t){D(function(n){var r=Math.round(e),i=Math.round(t);return n.containerWidth===r&&n.containerHeight===i?n:{containerWidth:r,containerHeight:i}})},[]);(0,f.useEffect)(function(){var e=function(e){var t,n=e[0].contentRect,r=n.width,i=n.height;O(r,i),(t=w.current)==null||t.call(w,r,i)};_>0&&(e=(0,Ym.default)(e,_,{trailing:!0,leading:!1}));var t=new ResizeObserver(e),n=C.current.getBoundingClientRect(),r=n.width,i=n.height;return O(r,i),t.observe(C.current),function(){t.disconnect()}},[O,_]);var k=(0,f.useMemo)(function(){var e=E.containerWidth,t=E.containerHeight;if(e<0||t<0)return null;mc(o)||mc(c);var r=mc(o)?e:o,i=mc(c)?t:c;n&&n>0&&(r?i=r/n:i&&(r=i*n),m&&i>m&&(i=m));var a=!Array.isArray(h)&&Vc(h.type).endsWith(`Chart`);return f.Children.map(h,function(e){return f.isValidElement(e)?(0,f.cloneElement)(e,Qm({width:r,height:i},a?{style:Qm({height:`100%`,width:`100%`,maxHeight:i,maxWidth:r},e.props.style)}:{})):e})},[n,h,c,m,p,d,E,o]);return f.createElement(`div`,{id:v?`${v}`:void 0,className:l(`recharts-responsive-container`,y),style:Qm(Qm({},S),{},{width:o,height:c,minWidth:d,minHeight:p,maxHeight:m}),ref:C},k)}),lh=function(e){return null};lh.displayName=`Cell`;function uh(e){"@babel/helpers - typeof";return uh=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},uh(e)}function dh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function fh(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];
16t%2?dh(Object(n),!0).forEach(function(t){ph(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dh(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function ph(e,t,n){return t=mh(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mh(e){var t=hh(e,`string`);return uh(t)==`symbol`?t:t+``}function hh(e,t){if(uh(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(uh(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var gh={widthCache:{},cacheCount:0},_h=2e3,vh={position:`absolute`,top:`-20000px`,left:0,padding:0,margin:0,border:`none`,whiteSpace:`pre`},yh=`recharts_measurement_span`;function bh(e){var t=fh({},e);return Object.keys(t).forEach(function(e){t[e]||delete t[e]}),t}var xh=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(e==null||wm.isSsr)return{width:0,height:0};var n=bh(t),r=JSON.stringify({text:e,copyStyle:n});if(gh.widthCache[r])return gh.widthCache[r];try{var i=document.getElementById(yh);i||(i=document.createElement(`span`),i.setAttribute(`id`,yh),i.setAttribute(`aria-hidden`,`true`),document.body.appendChild(i));var a=fh(fh({},vh),n);Object.assign(i.style,a),i.textContent=`${e}`;var o=i.getBoundingClientRect(),s={width:o.width,height:o.height};return gh.widthCache[r]=s,++gh.cacheCount>_h&&(gh.cacheCount=0,gh.widthCache={}),s}catch{return{width:0,height:0}}},Sh=function(e){return{top:e.top+window.scrollY-document.documentElement.clientTop,left:e.left+window.scrollX-document.documentElement.clientLeft}};function Ch(e){"@babel/helpers - typeof";return Ch=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},Ch(e)}function wh(e,t){return kh(e)||Oh(e,t)||Eh(e,t)||Th()}function Th(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
17In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Eh(e,t){if(e){if(typeof e==`string`)return Dh(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Dh(e,t)}}function Dh(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Oh(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function kh(e){if(Array.isArray(e))return e}function Ah(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function jh(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,Nh(r.key),r)}}function Mh(e,t,n){return t&&jh(e.prototype,t),n&&jh(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Nh(e){var t=Ph(e,`string`);return Ch(t)==`symbol`?t:t+``}function Ph(e,t){if(Ch(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(Ch(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var Fh=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,Ih=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,Lh=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,Rh=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,zh={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/101.6,px:1},Bh=Object.keys(zh),Vh=`NaN`;function Hh(e,t){return e*zh[t]}var Uh=function(){function e(t,n){Ah(this,e),this.num=t,this.unit=n,this.num=t,this.unit=n,Number.isNaN(t)&&(this.unit=``),n!==``&&!Lh.test(n)&&(this.num=NaN,this.unit=``),Bh.includes(n)&&(this.num=Hh(t,n),this.unit=`px`)}return Mh(e,[{key:`add`,value:function(t){return this.unit===t.unit?new e(this.num+t.num,this.unit):new e(NaN,``)}},{key:`subtract`,value:function(t){return this.unit===t.unit?new e(this.num-t.num,this.unit):new e(NaN,``)}},{key:`multiply`,value:function(t){return this.unit!==``&&t.unit!==``&&this.unit!==t.unit?new e(NaN,``):new e(this.num*t.num,this.unit||t.unit)}},{key:`divide`,value:function(t){return this.unit!==``&&t.unit!==``&&this.unit!==t.unit?new e(NaN,``):new e(this.num/t.num,this.unit||t.unit)}},{key:`toString`,value:function(){return`${this.num}${this.unit}`}}
17,{key:`isNaN`,value:function(){return Number.isNaN(this.num)}}],[{key:`parse`,value:function(t){var n=wh(Rh.exec(t)??[],3),r=n[1],i=n[2];return new e(parseFloat(r),i??``)}}])}();function Wh(e){if(e.includes(Vh))return Vh;for(var t=e;t.includes(`*`)||t.includes(`/`);){var n=wh(Fh.exec(t)??[],4),r=n[1],i=n[2],a=n[3],o=Uh.parse(r??``),s=Uh.parse(a??``),c=i===`*`?o.multiply(s):o.divide(s);if(c.isNaN())return Vh;t=t.replace(Fh,c.toString())}for(;t.includes(`+`)||/.-\d+(?:\.\d+)?/.test(t);){var l=wh(Ih.exec(t)??[],4),u=l[1],d=l[2],f=l[3],p=Uh.parse(u??``),m=Uh.parse(f??``),h=d===`+`?p.add(m):p.subtract(m);if(h.isNaN())return Vh;t=t.replace(Ih,h.toString())}return t}var Gh=/\(([^()]*)\)/;function Kh(e){for(var t=e;t.includes(`(`);){var n=wh(Gh.exec(t),2)[1];t=t.replace(Gh,Wh(n))}return t}function qh(e){var t=e.replace(/\s+/g,``);return t=Kh(t),t=Wh(t),t}function Jh(e){try{return qh(e)}catch{return Vh}}function Yh(e){var t=Jh(e.slice(5,-1));return t===Vh?``:t}var Xh=[`x`,`y`,`lineHeight`,`capHeight`,`scaleToFit`,`textAnchor`,`verticalAnchor`,`fill`],Zh=[`dx`,`dy`,`angle`,`className`,`breakAll`];function Qh(){return Qh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Qh.apply(this,arguments)}function $h(e,t){if(e==null)return{};var n=eg(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function eg(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function tg(e,t){return og(e)||ag(e,t)||rg(e,t)||ng()}function ng(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
18In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function rg(e,t){if(e){if(typeof e==`string`)return ig(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ig(e,t)}}function ig(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function ag(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function og(e){if(Array.isArray(e))return e}var sg=/[ \f\n\r\t\v\u2028\u2029]+/,cg=function(e){var t=e.children,n=e.breakAll,r=e.style;try{var i=[];return(0,B.default)(t)||(i=n?t.toString().split(``):t.toString().split(sg)),{wordsWithComputedWidth:i.map(function(e){return{word:e,width:xh(e,r).width}}),spaceWidth:n?0:xh(`\xA0`,r).width}}catch{return null}},lg=function(e,t,n,r,i){var a=e.maxLines,o=e.children,s=e.style,c=e.breakAll,l=V(a),u=o,d=function(){return(arguments.length>0&&arguments[0]!==void 0?arguments[0]:[]).reduce(function(e,t){var a=t.word,o=t.width,s=e[e.length-1];if(s&&(r==null||i||s.width+o+n<Number(r)))s.words.push(a),s.width+=o+n;else{var c={words:[a],width:o};e.push(c)}return e},[])},f=d(t),p=function(e){return e.reduce(function(e,t){return e.width>t.width?e:t})};if(!l)return f;for(var m=`…`,h=function(e){var t=cg({breakAll:c,style:s,children:u.slice(0,e)+m}).wordsWithComputedWidth,n=d(t);return[n.length>a||p(n).width>Number(r),n]},g=0,_=u.length-1,v=0,y;g<=_&&v<=u.length-1;){var b=Math.floor((g+_)/2),x=tg(h(b-1),2),S=x[0],C=x[1],w=tg(h(b),1)[0];if(!S&&!w&&(g=b+1),S&&w&&(_=b-1),!S&&w){y=C;break}v++}return y||f},ug=function(e){return[{words:(0,B.default)(e)?[]:e.toString().split(sg)}]},dg=function(e){var t=e.width,n=e.scaleToFit,r=e.children,i=e.style,a=e.breakAll,o=e.maxLines;if((t||n)&&!wm.isSsr){var s,c,l=cg({breakAll:a,children:r,style:i});
18if(l){var u=l.wordsWithComputedWidth,d=l.spaceWidth;s=u,c=d}else return ug(r);return lg({breakAll:a,children:r,maxLines:o,style:i},s,c,t,n)}return ug(r)},fg=`#808080`,pg=function(e){var t=e.x,n=t===void 0?0:t,r=e.y,i=r===void 0?0:r,a=e.lineHeight,o=a===void 0?`1em`:a,s=e.capHeight,c=s===void 0?`0.71em`:s,u=e.scaleToFit,d=u!==void 0&&u,p=e.textAnchor,m=p===void 0?`start`:p,h=e.verticalAnchor,g=h===void 0?`end`:h,_=e.fill,v=_===void 0?fg:_,y=$h(e,Xh),b=(0,f.useMemo)(function(){return dg({breakAll:y.breakAll,children:y.children,maxLines:y.maxLines,scaleToFit:d,style:y.style,width:y.width})},[y.breakAll,y.children,y.maxLines,d,y.style,y.width]),x=y.dx,S=y.dy,C=y.angle,w=y.className,T=y.breakAll,E=$h(y,Zh);if(!H(n)||!H(i))return null;var D=n+(V(x)?x:0),O=i+(V(S)?S:0),k;switch(g){case`start`:k=Yh(`calc(${c})`);break;case`middle`:k=Yh(`calc(${(b.length-1)/2} * -${o} + (${c} / 2))`);break;default:k=Yh(`calc(${b.length-1} * -${o})`)}var A=[];if(d){var j=b[0].width,M=y.width;A.push(`scale(${(V(M)?M/j:1)/j})`)}return C&&A.push(`rotate(${C}, ${D}, ${O})`),A.length&&(E.transform=A.join(` `)),f.createElement(`text`,Qh({},W(E,!0),{x:D,y:O,className:l(`recharts-text`,w),textAnchor:m,fill:v.includes(`url`)?fg:v}),b.map(function(e,t){var n=e.words.join(T?``:` `);return f.createElement(`tspan`,{x:D,dy:t===0?k:o,key:`${n}-${t}`},n)}))};function mg(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function hg(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function gg(e){let t,n,r;e.length===2?(t=e===mg||e===hg?e:_g,n=e,r=e):(t=mg,n=(t,n)=>mg(e(t),n),r=(t,n)=>e(t)-n);function i(e,r,i=0,a=e.length){if(i<a){if(t(r,r)!==0)return a;do{let t=i+a>>>1;n(e[t],r)<0?i=t+1:a=t}while(i<a)}return i}function a(e,r,i=0,a=e.length){if(i<a){if(t(r,r)!==0)return a;do{let t=i+a>>>1;n(e[t],r)<=0?i=t+1:a=t}while(i<a)}return i}function o(e,t,n=0,a=e.length){let o=i(e,t,n,a-1);return o>n&&r(e[o-1],t)>-r(e[o],t)?o-1:o}return{left:i,center:o,right:a}}function _g(){return 0}function vg(e){return e===null?NaN:+e}function*yg(e,t){if(t===void 0)for(let t of e)t!=null&&(t=+t)>=t&&(yield t);else{let n=-1;for(let r of e)(r=t(r,++n,e))!=null&&(r=+r)>=r&&(yield r)}}var bg=gg(mg),xg=bg.right;bg.left,gg(vg).center;var Sg=class extends Map{constructor(e,t=Eg){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),e!=null)for(let[t,n]of e)this.set(t,n)}get(e){return super.get(Cg(this,e))}has(e){return super.has(Cg(this,e))}set(e,t){return super.set(wg(this,e),t)}delete(e){return super.delete(Tg(this,e))}};function Cg({_intern:e,_key:t},n){let r=t(n);return e.has(r)?e.get(r):n}function wg({_intern:e,_key:t},n){let r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function Tg({_intern:e,_key:t},n){let r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function Eg(e){return typeof e==`object`&&e?e.valueOf():e}function Dg(e=mg){if(e===mg)return Og;if(typeof e!=`function`)throw TypeError(`compare is not a function`);return(t,n)=>{let r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function Og(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:+(e>t))}var kg=Math.sqrt(50),Ag=Math.sqrt(10),jg=Math.sqrt(2);function Mg(e,t,n){let r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),a=r/10**i,o=a>=kg?10:a>=Ag?5:a>=jg?2:1,s,c,l;return i<0?(l=10**-i/o,s=Math.round(e*l),c=Math.round(t*l),s/l<e&&++s,c/l>t&&--c,l=-l):(l=10**i*o,s=Math.round(e/l),c=Math.round(t/l),s*l<e&&++s,c*l>t&&--c),c<s&&.5<=n&&n<2?Mg(e,t,n*2):[s,c,l]}function Ng(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];let r=t<e,[i,a,o]=r?Mg(t,e,n):Mg(e,t,n);if(!(a>=i))return[];let s=a-i+1,c=Array(s);if(r)if(o<0)for(let e=0;e<s;++e)c[e]=(a-e)/-o;else for(let e=0;e<s;++e)c[e]=(a-e)*o;else if(o<0)for(let e=0;e<s;++e)c[e]=(i+e)/-o;else for(let e=0;e<s;++e)c[e]=(i+e)*o;return c}function Pg(e,t,n){return t=+t,e=+e,n=+n,Mg(e,t,n)[2]}function Fg(e,t,n){t=+t,e=+e,n=+n;let r=t<e,i=r?Pg(t,e,n):Pg(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function Ig(e,t){let n;if(t===void 0)for(let t of e)t!=null&&(n<t||n===void 0&&t>=t)&&(n=t);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n<i||n===void 0&&i>=i)&&(n=i)}return n}function Lg(e,t){let n;if(t===void 0)for(let t of e)t!=null&&(n>t||n===void 0&&t>=t)&&(n=t);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}
18function Rg(e,t,n=0,r=1/0,i){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(i=i===void 0?Og:Dg(i);r>n;){if(r-n>600){let a=r-n+1,o=t-n+1,s=Math.log(a),c=.5*Math.exp(2*s/3),l=.5*Math.sqrt(s*c*(a-c)/a)*(o-a/2<0?-1:1),u=Math.max(n,Math.floor(t-o*c/a+l)),d=Math.min(r,Math.floor(t+(a-o)*c/a+l));Rg(e,t,u,d,i)}let a=e[t],o=n,s=r;for(zg(e,n,t),i(e[r],a)>0&&zg(e,n,r);o<s;){for(zg(e,o,s),++o,--s;i(e[o],a)<0;)++o;for(;i(e[s],a)>0;)--s}i(e[n],a)===0?zg(e,n,s):(++s,zg(e,s,r)),s<=t&&(n=s+1),t<=s&&(r=s-1)}return e}function zg(e,t,n){let r=e[t];e[t]=e[n],e[n]=r}function Bg(e,t,n){if(e=Float64Array.from(yg(e,n)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return Lg(e);if(t>=1)return Ig(e);var r,i=(r-1)*t,a=Math.floor(i),o=Ig(Rg(e,a).subarray(0,a+1));return o+(Lg(e.subarray(a+1))-o)*(i-a)}}function Vg(e,t,n=vg){if(!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,i=(r-1)*t,a=Math.floor(i),o=+n(e[a],a,e);return o+(+n(e[a+1],a+1,e)-o)*(i-a)}}function Hg(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,a=Array(i);++r<i;)a[r]=e+r*n;return a}function Ug(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}function Wg(e,t){switch(arguments.length){case 0:break;case 1:typeof e==`function`?this.interpolator(e):this.range(e);break;default:this.domain(e),typeof t==`function`?this.interpolator(t):this.range(t)}return this}var Gg=Symbol(`implicit`);function Kg(){var e=new Sg,t=[],n=[],r=Gg;function i(i){let a=e.get(i);if(a===void 0){if(r!==Gg)return r;e.set(i,a=t.push(i)-1)}return n[a%n.length]}return i.domain=function(n){if(!arguments.length)return t.slice();t=[],e=new Sg;for(let r of n)e.has(r)||e.set(r,t.push(r)-1);return i},i.range=function(e){return arguments.length?(n=Array.from(e),i):n.slice()},i.unknown=function(e){return arguments.length?(r=e,i):r},i.copy=function(){return Kg(t,n).unknown(r)},Ug.apply(i,arguments),i}function qg(){var e=Kg().unknown(void 0),t=e.domain,n=e.range,r=0,i=1,a,o,s=!1,c=0,l=0,u=.5;delete e.unknown;function d(){var e=t().length,d=i<r,f=d?i:r,p=d?r:i;a=(p-f)/Math.max(1,e-c+l*2),s&&(a=Math.floor(a)),f+=(p-f-a*(e-c))*u,o=a*(1-c),s&&(f=Math.round(f),o=Math.round(o));var m=Hg(e).map(function(e){return f+a*e});return n(d?m.reverse():m)}return e.domain=function(e){return arguments.length?(t(e),d()):t()}
vendor: 6,512 bytes, line 18
18,e.range=function(e){return arguments.length?([r,i]=e,r=+r,i=+i,d()):[r,i]},e.rangeRound=function(e){return[r,i]=e,r=+r,i=+i,s=!0,d()},e.bandwidth=function(){return o},e.step=function(){return a},e.round=function(e){return arguments.length?(s=!!e,d()):s},e.padding=function(e){return arguments.length?(c=Math.min(1,l=+e),d()):c},e.paddingInner=function(e){return arguments.length?(c=Math.min(1,e),d()):c},e.paddingOuter=function(e){return arguments.length?(l=+e,d()):l},e.align=function(e){return arguments.length?(u=Math.max(0,Math.min(1,e)),d()):u},e.copy=function(){return qg(t(),[r,i]).round(s).paddingInner(c).paddingOuter(l).align(u)},Ug.apply(d(),arguments)}function Jg(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return Jg(t())},e}function Yg(){return Jg(qg.apply(null,arguments).paddingInner(1))}function Xg(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Zg(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Qg(){}var $g=.7,e_=1/$g,t_=`\\s*([+-]?\\d+)\\s*`,n_=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*`,r_=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*`,i_=/^#([0-9a-f]{3,8})$/,a_=RegExp(`^rgb\\(${t_},${t_},${t_}\\)$`),o_=RegExp(`^rgb\\(${r_},${r_},${r_}\\)$`),s_=RegExp(`^rgba\\(${t_},${t_},${t_},${n_}\\)$`),c_=RegExp(`^rgba\\(${r_},${r_},${r_},${n_}\\)$`),l_=RegExp(`^hsl\\(${n_},${r_},${r_}\\)$`),u_=RegExp(`^hsla\\(${n_},${r_},${r_},${n_}\\)$`),d_={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};Xg(Qg,g_,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:f_,formatHex:f_,formatHex8:p_,formatHsl:m_,formatRgb:h_,toString:h_});function f_(){return this.rgb().formatHex()}function p_(){return this.rgb().formatHex8()}function m_(){return k_(this).formatHsl()}function h_(){return this.rgb().formatRgb()}function g_(e){var t,n;return e=(e+``).trim().toLowerCase(),(t=i_.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?__(t):n===3?new x_(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?v_(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?v_(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=a_.exec(e))?new x_(t[1],t[2],t[3],1):(t=o_.exec(e))?new x_(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=s_.exec(e))?v_(t[1],t[2],t[3],t[4]):(t=c_.exec(e))?v_(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=l_.exec(e))?O_(t[1],t[2]/100,t[3]/100,1):(t=u_.exec(e))?O_(t[1],t[2]/100,t[3]/100,t[4]):d_.hasOwnProperty(e)?__(d_[e]):e===`transparent`?new x_(NaN,NaN,NaN,0):null}function __(e){return new x_(e>>16&255,e>>8&255,e&255,1)}function v_(e,t,n,r){return r<=0&&(e=t=n=NaN),new x_(e,t,n,r)}function y_(e){return e instanceof Qg||(e=g_(e)),e?(e=e.rgb(),new x_(e.r,e.g,e.b,e.opacity)):new x_}function b_(e,t,n,r){return arguments.length===1?y_(e):new x_(e,t,n,r??1)}function x_(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}Xg(x_,b_,Zg(Qg,{brighter(e){return e=e==null?e_:e_**+e,new x_(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?$g:$g**+e,new x_(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new x_(E_(this.r),E_(this.g),E_(this.b),T_(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:S_,formatHex:S_,formatHex8:C_,formatRgb:w_,toString:w_}));function S_(){return`#${D_(this.r)}${D_(this.g)}${D_(this.b)}`}function C_(){return`#${D_(this.r)}${D_(this.g)}${D_(this.b)}${D_((isNaN(this.opacity)?1:this.opacity)*255)}`}function w_(){let e=T_(this.opacity);return`${e===1?`rgb(`:`rgba(`}${E_(this.r)}, ${E_(this.g)}, ${E_(this.b)}${e===1?`)`:`, ${e})`}`}function T_(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function E_(e){return Math.max(0,Math.min(255,Math.round(e)||0))}
18function D_(e){return e=E_(e),(e<16?`0`:``)+e.toString(16)}function O_(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new j_(e,t,n,r)}function k_(e){if(e instanceof j_)return new j_(e.h,e.s,e.l,e.opacity);if(e instanceof Qg||(e=g_(e)),!e)return new j_;if(e instanceof j_)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=NaN,s=a-i,c=(a+i)/2;return s?(o=t===a?(n-r)/s+(n<r)*6:n===a?(r-t)/s+2:(t-n)/s+4,s/=c<.5?a+i:2-a-i,o*=60):s=c>0&&c<1?0:o,new j_(o,s,c,e.opacity)}function A_(e,t,n,r){return arguments.length===1?k_(e):new j_(e,t,n,r??1)}function j_(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Xg(j_,A_,Zg(Qg,{brighter(e){return e=e==null?e_:e_**+e,new j_(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?$g:$g**+e,new j_(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new x_(P_(e>=240?e-240:e+120,i,r),P_(e,i,r),P_(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new j_(M_(this.h),N_(this.s),N_(this.l),T_(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(){let e=T_(this.opacity);return`${e===1?`hsl(`:`hsla(`}${M_(this.h)}, ${N_(this.s)*100}%, ${N_(this.l)*100}%${e===1?`)`:`, ${e})`}`}}));function M_(e){return e=(e||0)%360,e<0?e+360:e}function N_(e){return Math.max(0,Math.min(1,e||0))}function P_(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}var F_=e=>()=>e;function I_(e,t){return function(n){return e+n*t}}function L_(e,t,n){return e**=+n,t=t**+n-e,n=1/n,function(r){return(e+r*t)**+n}}function R_(e){return(e=+e)==1?z_:function(t,n){return n-t?L_(t,n,e):F_(isNaN(t)?n:t)}}function z_(e,t){var n=t-e;return n?I_(e,n):F_(isNaN(e)?t:e)}var B_=(function e(t){var n=R_(t);function r(e,t){var r=n((e=b_(e)).r,(t=b_(t)).r),i=n(e.g,t.g),a=n(e.b,t.b),o=z_(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=a(t),e.opacity=o(t),e+``}}return r.gamma=e,r})(1);function V_(e,t){t||=[];var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(a){for(i=0;i<n;++i)r[i]=e[i]*(1-a)+t[i]*a;return r}}function H_(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function U_(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=Array(r),a=Array(n),o;for(o=0;o<r;++o)i[o]=Q_(e[o],t[o]);for(;o<n;++o)a[o]=t[o];return function(e){for(o=0;o<r;++o)a[o]=i[o](e);return a}}function W_(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function G_(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function K_(e,t){var n={},r={},i;for(i in(typeof e!=`object`||!e)&&(e={}),(typeof t!=`object`||!t)&&(t={}),t)i in e?n[i]=Q_(e[i],t[i]):r[i]=t[i];return function(e){for(i in n)r[i]=n[i](e);return r}}var q_=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,J_=new RegExp(q_.source,`g`);function Y_(e){return function(){return e}}function X_(e){return function(t){return e(t)+``}}function Z_(e,t){var n=q_.lastIndex=J_.lastIndex=0,r,i,a,o=-1,s=[],c=[];for(e+=``,t+=``;(r=q_.exec(e))&&(i=J_.exec(t));)(a=i.index)>n&&(a=t.slice(n,a),s[o]?s[o]+=a:s[++o]=a),(r=r[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,c.push({i:o,x:G_(r,i)})),n=J_.lastIndex;return n<t.length&&(a=t.slice(n),s[o]?s[o]+=a:s[++o]=a),s.length<2?c[0]?X_(c[0].x):Y_(t):(t=c.length,function(e){for(var n=0,r;n<t;++n)s[(r=c[n]).i]=r.x(e);return s.join(``)})}function Q_(e,t){var n=typeof t,r;return t==null||n===`boolean`?F_(t):(n===`number`?G_:n===`string`?(r=g_(t))?(t=r,B_):Z_:t instanceof g_?B_:t instanceof Date?W_:H_(t)?V_:Array.isArray(t)?U_:typeof t.valueOf!=`function`&&typeof t.toString!=`function`||isNaN(t)?K_:G_)(e,t)}function $_(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function ev(e,t){t===void 0&&(t=e,e=Q_);for(var n=0,r=t.length-1,i=t[0],a=Array(r<0?0:r);n<r;)a[n]=e(i,i=t[++n]);return function(e){var t=Math.max(0,Math.min(r-1,Math.floor(e*=r)));return a[t](e-t)}}function tv(e){return function(){return e}}function nv(e){return+e}var rv=[0,1];function iv(e){return e}function av(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:tv(isNaN(t)?NaN:.5)}function ov(e,t){var n;return e>t&&(n=e,e=t,t=n),function(n){return Math.max(e,Math.min(t,n))}}function sv(e,t,n){var r=e[0],i=e[1],a=t[0],o=t[1];return i<r?(r=av(i,r),a=n(o,a)):(r=av(r,i),a=n(a,o)),function(e){return a(r(e))}}function cv(e,t,n){var r=Math.min(e.length,t.length)-1,i=Array(r),a=Array(r),o=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<r;)i[o]=av(e[o],e[o+1]),a[o]=n(t[o],t[o+1]);return function(t){var n=xg(e,t,1,r)-1;return a[n](i[n](t))}}function lv(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function uv(){var e=rv,t=rv,n=Q_,r,i,a,o=iv,s,c,l;function u(){var n=Math.min(e.length,t.length);return o!==iv&&(o=ov(e[0],e[n-1])),s=n>2?cv:sv,c=l=null,d}function d(i){return i==null||isNaN(i=+i)?a:(c||=s(e.map(r),t,n))(r(o(i)))}return d.invert=function(n){return o(i((l||=s(t,e.map(r),G_))(n)))},d.domain=function(t){return arguments.length?(e=Array.from(t,nv),u()):e.slice()},d.range=function(e){return arguments.length?(t=Array.from(e),u()):t.slice()},d.rangeRound=function(e){return t=Array.from(e),n=$_,u()},d.clamp=function(e){return arguments.length?(o=e?!0:iv,u()):o!==iv},d.interpolate=function(e){return arguments.length?(n=e,u()):n},d.unknown=function(e){return arguments.length?(a=e,d):a},function(e,t){return r=e,i=t,u()}}function dv(){return uv()(iv,iv)}
vendor: 4,541 bytes, line 18
18function fv(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString(`en`).replace(/,/g,``):e.toString(10)}function pv(e,t){if(!isFinite(e)||e===0)return null;var n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf(`e`),r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function mv(e){return e=pv(Math.abs(e)),e?e[1]:NaN}function hv(e,t){return function(n,r){for(var i=n.length,a=[],o=0,s=e[0],c=0;i>0&&s>0&&(c+s+1>r&&(s=Math.max(1,r-c)),a.push(n.substring(i-=s,i+s)),!((c+=s+1)>r));)s=e[o=(o+1)%e.length];return a.reverse().join(t)}}function gv(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}}var _v=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function vv(e){if(!(t=_v.exec(e)))throw Error(`invalid format: `+e);var t;return new yv({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}vv.prototype=yv.prototype;function yv(e){this.fill=e.fill===void 0?` `:e.fill+``,this.align=e.align===void 0?`>`:e.align+``,this.sign=e.sign===void 0?`-`:e.sign+``,this.symbol=e.symbol===void 0?``:e.symbol+``,this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?``:e.type+``}yv.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 bv(e){out:for(var t=e.length,n=1,r=-1,i;n<t;++n)switch(e[n]){case`.`:r=i=n;break;case`0`:r===0&&(r=n),i=n;break;default:if(!+e[n])break out;r>0&&(r=0)}return r>0?e.slice(0,r)+e.slice(i+1):e}var xv;function Sv(e,t){var n=pv(e,t);if(!n)return xv=void 0,e.toPrecision(t);var r=n[0],i=n[1],a=i-(xv=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=r.length;return a===o?r:a>o?r+Array(a-o+1).join(`0`):a>0?r.slice(0,a)+`.`+r.slice(a):`0.`+Array(1-a).join(`0`)+pv(e,Math.max(0,t+a-1))[0]}function Cv(e,t){var n=pv(e,t);if(!n)return e+``;var r=n[0],i=n[1];return i<0?`0.`+Array(-i).join(`0`)+r:r.length>i+1?r.slice(0,i+1)+`.`+r.slice(i+1):r+Array(i-r.length+2).join(`0`)}var wv={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+``,d:fv,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>Cv(e*100,t),r:Cv,s:Sv,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function Tv(e){return e}var Ev=Array.prototype.map,Dv=[`y`,`z`,`a`,`f`,`p`,`n`,`µ`,`m`,``,`k`,`M`,`G`,`T`,`P`,`E`,`Z`,`Y`];function Ov(e){var t=e.grouping===void 0||e.thousands===void 0?Tv:hv(Ev.call(e.grouping,Number),e.thousands+``),n=e.currency===void 0?``:e.currency[0]+``,r=e.currency===void 0?``:e.currency[1]+``,i=e.decimal===void 0?`.`:e.decimal+``,a=e.numerals===void 0?Tv:gv(Ev.call(e.numerals,String)),o=e.percent===void 0?`%`:e.percent+``,s=e.minus===void 0?`−`:e.minus+``,c=e.nan===void 0?`NaN`:e.nan+``;function l(e,l){e=vv(e);var u=e.fill,d=e.align,f=e.sign,p=e.symbol,m=e.zero,h=e.width,g=e.comma,_=e.precision,v=e.trim,y=e.type;y===`n`?(g=!0,y=`g`):wv[y]||(_===void 0&&(_=12),v=!0,y=`g`),(m||u===`0`&&d===`=`)&&(m=!0,u=`0`,d=`=`);var b=(l&&l.prefix!==void 0?l.prefix:``)+(p===`$`?n:p===`#`&&/[boxX]/.test(y)?`0`+y.toLowerCase():``),x=(p===`$`?r:/[%p]/.test(y)?o:``)+(l&&l.suffix!==void 0?l.suffix:``),S=wv[y],C=/[defgprs%]/.test(y);_=_===void 0?6:/[gprs]/.test(y)?Math.max(1,Math.min(21,_)):Math.max(0,Math.min(20,_));function w(e){var n=b,r=x,o,l,p;if(y===`c`)r=S(e)+r,e=``;else{e=+e;var w=e<0||1/e<0;if(e=isNaN(e)?c:S(Math.abs(e),_),v&&(e=bv(e)),w&&+e==0&&f!==`+`&&(w=!1),n=(w?f===`(`?f:s:f===`-`||f===`(`?``:f)+n,r=(y===`s`&&!isNaN(e)&&xv!==void 0?Dv[8+xv/3]:``)+r+(w&&f===`(`?`)`:``),C){for(o=-1,l=e.length;++o<l;)if(p=e.charCodeAt(o),48>p||p>57){r=(p===46?i+e.slice(o+1):e.slice(o))+r,e=e.slice(0,o);break}}}g&&!m&&(e=t(e,1/0));var T=n.length+e.length+r.length,E=T<h?Array(h-T+1).join(u):``;switch(g&&m&&(e=t(E+e,E.length?h-r.length:1/0),E=``),d){case`<`:e=n+e+r+E;break;case`=`:e=n+E+e+r;break;case`^`:e=E.slice(0,T=E.length>>1)+n+e+r+E.slice(T);break;default:e=E+n+e+r}return a(e)}return w.toString=function(){return e+``},w}function u(e,t){var n=Math.max(-8,Math.min(8,Math.floor(mv(t)/3)))*3,r=10**-n,i=l((e=vv(e),e.type=`f`,e),{suffix:Dv[8+n/3]});return function(e){return i(r*e)}}return{format:l,formatPrefix:u}}var kv,Av,jv;
18Mv({thousands:`,`,grouping:[3],currency:[`$`,``]});function Mv(e){return kv=Ov(e),Av=kv.format,jv=kv.formatPrefix,kv}function Nv(e){return Math.max(0,-mv(Math.abs(e)))}function Pv(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(mv(t)/3)))*3-mv(Math.abs(e)))}function Fv(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,mv(t)-mv(e))+1}function Iv(e,t,n,r){var i=Fg(e,t,n),a;switch(r=vv(r??`,f`),r.type){case`s`:var o=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(a=Pv(i,o))&&(r.precision=a),jv(r,o);case``:case`e`:case`g`:case`p`:case`r`:r.precision==null&&!isNaN(a=Fv(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=a-(r.type===`e`));break;case`f`:case`%`:r.precision==null&&!isNaN(a=Nv(i))&&(r.precision=a-(r.type===`%`)*2)}return Av(r)}function Lv(e){var t=e.domain;return e.ticks=function(e){var n=t();return Ng(n[0],n[n.length-1],e??10)},e.tickFormat=function(e,n){var r=t();return Iv(r[0],r[r.length-1],e??10,n)},e.nice=function(n){n??=10;var r=t(),i=0,a=r.length-1,o=r[i],s=r[a],c,l,u=10;for(s<o&&(l=o,o=s,s=l,l=i,i=a,a=l);u-->0;){if(l=Pg(o,s,n),l===c)return r[i]=o,r[a]=s,t(r);if(l>0)o=Math.floor(o/l)*l,s=Math.ceil(s/l)*l;else if(l<0)o=Math.ceil(o*l)/l,s=Math.floor(s*l)/l;else break;c=l}return e},e}function Rv(){var e=dv();return e.copy=function(){return lv(e,Rv())},Ug.apply(e,arguments),Lv(e)}function zv(e){var t;function n(e){return e==null||isNaN(e=+e)?t:e}return n.invert=n,n.domain=n.range=function(t){return arguments.length?(e=Array.from(t,nv),n):e.slice()},n.unknown=function(e){return arguments.length?(t=e,n):t},n.copy=function(){return zv(e).unknown(t)},e=arguments.length?Array.from(e,nv):[0,1],Lv(n)}function Bv(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],a=e[r],o;return a<i&&(o=n,n=r,r=o,o=i,i=a,a=o),e[n]=t.floor(i),e[r]=t.ceil(a),e}function Vv(e){return Math.log(e)}function Hv(e){return Math.exp(e)}function Uv(e){return-Math.log(-e)}function Wv(e){return-Math.exp(-e)}function Gv(e){return isFinite(e)?+(`1e`+e):e<0?0:e}function Kv(e){return e===10?Gv:e===Math.E?Math.exp:t=>e**+t}function qv(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function Jv(e){return(t,n)=>-e(-t,n)}function Yv(e){let t=e(Vv,Hv),n=t.domain,r=10,i,a;function o(){return i=qv(r),a=Kv(r),n()[0]<0?(i=Jv(i),a=Jv(a),e(Uv,Wv)):e(Vv,Hv),t}return t.base=function(e){return arguments.length?(r=+e,o()):r},t.domain=function(e){return arguments.length?(n(e),o()):n()},t.ticks=e=>{let t=n(),o=t[0],s=t[t.length-1],c=s<o;c&&([o,s]=[s,o]);let l=i(o),u=i(s),d,f,p=e==null?10:+e,m=[];if(!(r%1)&&u-l<p){if(l=Math.floor(l),u=Math.ceil(u),o>0){for(;l<=u;++l)for(d=1;d<r;++d)if(f=l<0?d/a(-l):d*a(l),!(f<o)){if(f>s)break;m.push(f)}}else for(;l<=u;++l)for(d=r-1;d>=1;--d)if(f=l>0?d/a(-l):d*a(l),!(f<o)){if(f>s)break;m.push(f)}m.length*2<p&&(m=Ng(o,s,p))}else m=Ng(l,u,Math.min(u-l,p)).map(a);return c?m.reverse():m},t.tickFormat=(e,n)=>{if(e??=10,n??=r===10?`s`:`,`,typeof n!=`function`&&(!(r%1)&&(n=vv(n)).precision==null&&(n.trim=!0),n=Av(n)),e===1/0)return n;let o=Math.max(1,r*e/t.ticks().length);return e=>{let t=e/a(Math.round(i(e)));return t*r<r-.5&&(t*=r),t<=o?n(e):``}},t.nice=()=>n(Bv(n(),{floor:e=>a(Math.floor(i(e))),ceil:e=>a(Math.ceil(i(e)))})),t}function Xv(){let e=Yv(uv()).domain([1,10]);return e.copy=()=>lv(e,Xv()).base(e.base()),Ug.apply(e,arguments),e}function Zv(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function Qv(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function $v(e){var t=1,n=e(Zv(t),Qv(t));return n.constant=function(n){return arguments.length?e(Zv(t=+n),Qv(t)):t},Lv(n)}function ey(){var e=$v(uv());return e.copy=function(){return lv(e,ey()).constant(e.constant())},Ug.apply(e,arguments)}function ty(e){return function(t){return t<0?-((-t)**+e):t**+e}}function ny(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function ry(e){return e<0?-e*e:e*e}function iy(e){var t=e(iv,iv),n=1;function r(){return n===1?e(iv,iv):n===.5?e(ny,ry):e(ty(n),ty(1/n))}return t.exponent=function(e){return arguments.length?(n=+e,r()):n},Lv(t)}function ay(){var e=iy(uv());return e.copy=function(){return lv(e,ay()).exponent(e.exponent())},Ug.apply(e,arguments),e}function oy(){return ay.apply(null,arguments).exponent(.5)}function sy(e){return Math.sign(e)*e*e}function cy(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function ly(){var e=dv(),t=[0,1],n=!1,r;function i(t){var i=cy(e(t));return isNaN(i)?r:n?Math.round(i):i}return i.invert=function(t){return e.invert(sy(t))},i.domain=function(t){return arguments.length?(e.domain(t),i):e.domain()},i.range=function(n){return arguments.length?(e.range((t=Array.from(n,nv)).map(sy)),i):t.slice()},i.rangeRound=function(e){return i.range(e).round(!0)},i.round=function(e){return arguments.length?(n=!!e,i):n},i.clamp=function(t){return arguments.length?(e.clamp(t),i):e.clamp()},i.unknown=function(e){return arguments.length?(r=e,i):r},i.copy=function(){return ly(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},Ug.apply(i,arguments),Lv(i)}function uy(){var e=[],t=[],n=[],r;function i(){var r=0,i=Math.max(1,t.length);for(n=Array(i-1);++r<i;)n[r-1]=Vg(e,r/i);return a}function a(e){return e==null||isNaN(e=+e)?r:t[xg(n,e)]}return a.invertExtent=function(r){var i=t.indexOf(r);return i<0?[NaN,NaN]:[i>0?n[i-1]:e[0],i<n.length?n[i]:e[e.length-1]]},a.domain=function(t){if(!arguments.length)return e.slice();e=[];for(let n of t)n!=null&&!isNaN(n=+n)&&e.push(n);return e.sort(mg),i()},a.range=function(e){return arguments.length?(t=Array.from(e),i()):t.slice()},a.unknown=function(e){return arguments.length?(r=e,a):r},a.quantiles=function(){return n.slice()},a.copy=function(){return uy().domain(e).range(t).unknown(r)},Ug.apply(a,arguments)}function dy(){var e=0,t=1,n=1,r=[.5],i=[0,1],a;function o(e){return e!=null&&e<=e?i[xg(r,e,0,n)]:a}function s(){var i=-1;for(r=Array(n);++i<n;)r[i]=((i+1)*t-(i-n)*e)/(n+1);return o}return o.domain=function(n){return arguments.length?([e,t]=n,e=+e,t=+t,s()):[e,t]},o.range=function(e){return arguments.length?(n=(i=Array.from(e)).length-1,s()):i.slice()},o.invertExtent=function(a){var o=i.indexOf(a);return o<0?[NaN,NaN]:o<1?[e,r[0]]:o>=n?[r[n-1],t]:[r[o-1],r[o]]},o.unknown=function(e){return arguments.length&&(a=e),o},o.thresholds=function(){return r.slice()},o.copy=function(){return dy().domain([e,t]).range(i).unknown(a)},Ug.apply(Lv(o),arguments)}function fy(){var e=[.5],t=[0,1],n,r=1;function i(i){return i!=null&&i<=i?t[xg(e,i,0,r)]:n}return i.domain=function(n){return arguments.length?(e=Array.from(n),r=M
18ath.min(e.length,t.length-1),i):e.slice()},i.range=function(n){return arguments.length?(t=Array.from(n),r=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(n){var r=t.indexOf(n);return[e[r-1],e[r]]},i.unknown=function(e){return arguments.length?(n=e,i):n},i.copy=function(){return fy().domain(e).range(t).unknown(n)},Ug.apply(i,arguments)}var py=new Date,my=new Date;function K(e,t,n,r){function i(t){return e(t=arguments.length===0?new Date:new Date(+t)),t}return i.floor=t=>(e(t=new Date(+t)),t),i.ceil=n=>(e(n=new Date(n-1)),t(n,1),e(n),n),i.round=e=>{let t=i(e),n=i.ceil(e);return e-t<n-e?t:n},i.offset=(e,n)=>(t(e=new Date(+e),n==null?1:Math.floor(n)),e),i.range=(n,r,a)=>{let o=[];if(n=i.ceil(n),a=a==null?1:Math.floor(a),!(n<r)||!(a>0))return o;let s;do o.push(s=new Date(+n)),t(n,a),e(n);while(s<n&&n<r);return o},i.filter=n=>K(t=>{if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)},(e,r)=>{if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););}),n&&(i.count=(t,r)=>(py.setTime(+t),my.setTime(+r),e(py),e(my),Math.floor(n(py,my))),i.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?i.filter(r?t=>r(t)%e===0:t=>i.count(0,t)%e===0):i)),i}var hy=K(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);hy.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?K(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):hy),hy.range;var gy=1e3,_y=gy*60,vy=_y*60,yy=vy*24,by=yy*7,xy=yy*30,Sy=yy*365,Cy=K(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*gy)},(e,t)=>(t-e)/gy,e=>e.getUTCSeconds());Cy.range;var wy=K(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*gy)},(e,t)=>{e.setTime(+e+t*_y)},(e,t)=>(t-e)/_y,e=>e.getMinutes());wy.range;var Ty=K(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*_y)},(e,t)=>(t-e)/_y,e=>e.getUTCMinutes());Ty.range;var Ey=K(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*gy-e.getMinutes()*_y)},(e,t)=>{e.setTime(+e+t*vy)},(e,t)=>(t-e)/vy,e=>e.getHours());Ey.range;var Dy=K(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*vy)},(e,t)=>(t-e)/vy,e=>e.getUTCHours());Dy.range;var Oy=K(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*_y)/yy,e=>e.getDate()-1);Oy.range;var ky=K(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/yy,e=>e.getUTCDate()-1);ky.range;var Ay=K(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/yy,e=>Math.floor(e/yy));Ay.range;function jy(e){return K(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(e,t)=>{e.setDate(e.getDate()+t*7)},(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*_y)/by)}var My=jy(0),Ny=jy(1),Py=jy(2),Fy=jy(3),Iy=jy(4),Ly=jy(5),Ry=jy(6);My.range,Ny.range,Py.range,Fy.range,Iy.range,Ly.range,Ry.range;function zy(e){return K(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t*7)},(e,t)=>(t-e)/by)}var By=zy(0),Vy=zy(1),Hy=zy(2),Uy=zy(3),Wy=zy(4),Gy=zy(5),Ky=zy(6);By.range,Vy.range,Hy.range,Uy.range,Wy.range,Gy.range,Ky.range;var qy=K(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());qy.range;var Jy=K(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());Jy.range;var Yy=K(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());Yy.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:K(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)}),Yy.range;var Xy=K(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());Xy.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:K(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)}),Xy.range;function Zy(e,t,n,r,i,a){let o=[[Cy,1,gy],[Cy,5,5*gy],[Cy,15,15*gy],[Cy,30,30*gy],[a,1,_y],[a,5,5*_y],[a,15,15*_y],[a,30,30*_y],[i,1,vy],[i,3,3*vy],[i,6,6*vy],[i,12,12*vy],[r,1,yy],[r,2,2*yy],[n,1,by],[t,1,xy],[t,3,3*xy],[e,1,Sy]];function s(e,t,n){let r=t<e;r&&([e,t]=[t,e]);let i=n&&typeof n.range==`function`?n:c(e,t,n),a=i?i.range(e,+t+1):[];return r?a.reverse():a}function c(t,n,r){let i=Math.abs(n-t)/r,a=gg(([,,e])=>e).right(o,i);if(a===o.length)return e.every(Fg(t/Sy,n/Sy,r));if(a===0)return hy.every(Math.max(Fg(t,n,r),1));let[s,c]=o[i/o[a-1][2]<o[a][2]/i?a-1:a];return s.every(c)}return[s,c]}var[Qy,$y]=Zy(Xy,Jy,By,Ay,Dy,Ty),[eb,tb]=Zy(Yy,qy,My,Oy,Ey,wy);function nb(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function rb(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function ib(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function ab(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,a=e.days,o=e.shortDays,s=e.months,c=e.shortMonths,l=db(i),u=fb(i),d=db(a),f=fb(a),p=db(o),m=fb(o),h=db(s),g=fb(s),_=db(c),v=fb(c),y={a:N,A:ee,b:te,B:ne,c:null,d:Nb,e:Nb,f:Rb,g:Yb,G:Zb,H:Pb,I:Fb,j:Ib,L:Lb,m:zb,M:Bb,p:re,q:ie,Q:bx,s:xx,S:Vb,u:Hb,U:Ub,V:Gb,w:Kb,W:qb,x:null,X:null,y:Jb,Y:Xb,Z:Qb,"%":yx},b={a:ae,A:oe,b:se,B:ce,c:null,d:$b,e:$b,f:ix,g:hx,G:_x,H:ex,I:tx,j:nx,L:rx,m:ax,M:ox,p:le,q:ue,Q:bx,s:xx,S:sx,u:cx,U:lx,V:dx,w:fx,W:px,x:null,X:null,y:mx,Y:gx,Z:vx,"%":yx}
vendor: 5,445 bytes, line 18
18,x={a:E,A:D,b:O,B:k,c:A,d:Cb,e:Cb,f:kb,g:yb,G:vb,H:Tb,I:Tb,j:wb,L:Ob,m:Sb,M:Eb,p:T,q:xb,Q:jb,s:Mb,S:Db,u:mb,U:hb,V:gb,w:pb,W:_b,x:j,X:M,y:yb,Y:vb,Z:bb,"%":Ab};y.x=S(n,y),y.X=S(r,y),y.c=S(t,y),b.x=S(n,b),b.X=S(r,b),b.c=S(t,b);function S(e,t){return function(n){var r=[],i=-1,a=0,o=e.length,s,c,l;for(n instanceof Date||(n=new Date(+n));++i<o;)e.charCodeAt(i)===37&&(r.push(e.slice(a,i)),(c=ob[s=e.charAt(++i)])==null?c=s===`e`?` `:`0`:s=e.charAt(++i),(l=t[s])&&(s=l(n,c)),r.push(s),a=i+1);return r.push(e.slice(a,i)),r.join(``)}}function C(e,t){return function(n){var r=ib(1900,void 0,1),i=w(r,e,n+=``,0),a,o;if(i!=n.length)return null;if(`Q`in r)return new Date(r.Q);if(`s`in r)return new Date(r.s*1e3+(`L`in r?r.L:0));if(t&&!(`Z`in r)&&(r.Z=0),`p`in r&&(r.H=r.H%12+r.p*12),r.m===void 0&&(r.m=`q`in r?r.q:0),`V`in r){if(r.V<1||r.V>53)return null;`w`in r||(r.w=1),`Z`in r?(a=rb(ib(r.y,0,1)),o=a.getUTCDay(),a=o>4||o===0?Vy.ceil(a):Vy(a),a=ky.offset(a,(r.V-1)*7),r.y=a.getUTCFullYear(),r.m=a.getUTCMonth(),r.d=a.getUTCDate()+(r.w+6)%7):(a=nb(ib(r.y,0,1)),o=a.getDay(),a=o>4||o===0?Ny.ceil(a):Ny(a),a=Oy.offset(a,(r.V-1)*7),r.y=a.getFullYear(),r.m=a.getMonth(),r.d=a.getDate()+(r.w+6)%7)}else(`W`in r||`U`in r)&&(`w`in r||(r.w=`u`in r?r.u%7:+(`W`in r)),o=`Z`in r?rb(ib(r.y,0,1)).getUTCDay():nb(ib(r.y,0,1)).getDay(),r.m=0,r.d=`W`in r?(r.w+6)%7+r.W*7-(o+5)%7:r.w+r.U*7-(o+6)%7);return`Z`in r?(r.H+=r.Z/100|0,r.M+=r.Z%100,rb(r)):nb(r)}}function w(e,t,n,r){for(var i=0,a=t.length,o=n.length,s,c;i<a;){if(r>=o)return-1;if(s=t.charCodeAt(i++),s===37){if(s=t.charAt(i++),c=x[s in ob?t.charAt(i++):s],!c||(r=c(e,n,r))<0)return-1}else if(s!=n.charCodeAt(r++))return-1}return r}function T(e,t,n){var r=l.exec(t.slice(n));return r?(e.p=u.get(r[0].toLowerCase()),n+r[0].length):-1}function E(e,t,n){var r=p.exec(t.slice(n));return r?(e.w=m.get(r[0].toLowerCase()),n+r[0].length):-1}function D(e,t,n){var r=d.exec(t.slice(n));return r?(e.w=f.get(r[0].toLowerCase()),n+r[0].length):-1}function O(e,t,n){var r=_.exec(t.slice(n));return r?(e.m=v.get(r[0].toLowerCase()),n+r[0].length):-1}function k(e,t,n){var r=h.exec(t.slice(n));return r?(e.m=g.get(r[0].toLowerCase()),n+r[0].length):-1}function A(e,n,r){return w(e,t,n,r)}function j(e,t,r){return w(e,n,t,r)}function M(e,t,n){return w(e,r,t,n)}function N(e){return o[e.getDay()]}function ee(e){return a[e.getDay()]}function te(e){return c[e.getMonth()]}function ne(e){return s[e.getMonth()]}function re(e){return i[+(e.getHours()>=12)]}function ie(e){return 1+~~(e.getMonth()/3)}function ae(e){return o[e.getUTCDay()]}function oe(e){return a[e.getUTCDay()]}function se(e){return c[e.getUTCMonth()]}function ce(e){return s[e.getUTCMonth()]}function le(e){return i[+(e.getUTCHours()>=12)]}function ue(e){return 1+~~(e.getUTCMonth()/3)}return{format:function(e){var t=S(e+=``,y);return t.toString=function(){return e},t},parse:function(e){var t=C(e+=``,!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=S(e+=``,b);return t.toString=function(){return e},t},utcParse:function(e){var t=C(e+=``,!0);return t.toString=function(){return e},t}}}var ob={"-":``,_:` `,0:`0`},sb=/^\s*\d+/,cb=/^%/,lb=/[\\^$*+?|[\]().{}]/g;function q(e,t,n){var r=e<0?`-`:``,i=(r?-e:e)+``,a=i.length;return r+(a<n?Array(n-a+1).join(t)+i:i)}function ub(e){return e.replace(lb,`\\$&`)}function db(e){return RegExp(`^(?:`+e.map(ub).join(`|`)+`)`,`i`)}function fb(e){return new Map(e.map((e,t)=>[e.toLowerCase(),t]))}function pb(e,t,n){var r=sb.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function mb(e,t,n){var r=sb.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function hb(e,t,n){var r=sb.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function gb(e,t,n){var r=sb.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function _b(e,t,n){var r=sb.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function vb(e,t,n){var r=sb.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function yb(e,t,n){var r=sb.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function bb(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||`00`)),n+r[0].length):-1}function xb(e,t,n){var r=sb.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function Sb(e,t,n){var r=sb.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function Cb(e,t,n){var r=sb.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function wb(e,t,n){var r=sb.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function Tb(e,t,n){var r=sb.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function Eb(e,t,n){var r=sb.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function Db(e,t,n){var r=sb.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function Ob(e,t,n){var r=sb.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function kb(e,t,n){var r=sb.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Ab(e,t,n){var r=cb.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function jb(e,t,n){var r=sb.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function Mb(e,t,n){var r=sb.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function Nb(e,t){return q(e.getDate(),t,2)}function Pb(e,t){return q(e.getHours(),t,2)}function Fb(e,t){return q(e.getHours()%12||12,t,2)}function Ib(e,t){return q(1+Oy.count(Yy(e),e),t,3)}
18function Lb(e,t){return q(e.getMilliseconds(),t,3)}function Rb(e,t){return Lb(e,t)+`000`}function zb(e,t){return q(e.getMonth()+1,t,2)}function Bb(e,t){return q(e.getMinutes(),t,2)}function Vb(e,t){return q(e.getSeconds(),t,2)}function Hb(e){var t=e.getDay();return t===0?7:t}function Ub(e,t){return q(My.count(Yy(e)-1,e),t,2)}function Wb(e){var t=e.getDay();return t>=4||t===0?Iy(e):Iy.ceil(e)}function Gb(e,t){return e=Wb(e),q(Iy.count(Yy(e),e)+(Yy(e).getDay()===4),t,2)}function Kb(e){return e.getDay()}function qb(e,t){return q(Ny.count(Yy(e)-1,e),t,2)}function Jb(e,t){return q(e.getFullYear()%100,t,2)}function Yb(e,t){return e=Wb(e),q(e.getFullYear()%100,t,2)}function Xb(e,t){return q(e.getFullYear()%1e4,t,4)}function Zb(e,t){var n=e.getDay();return e=n>=4||n===0?Iy(e):Iy.ceil(e),q(e.getFullYear()%1e4,t,4)}function Qb(e){var t=e.getTimezoneOffset();return(t>0?`-`:(t*=-1,`+`))+q(t/60|0,`0`,2)+q(t%60,`0`,2)}function $b(e,t){return q(e.getUTCDate(),t,2)}function ex(e,t){return q(e.getUTCHours(),t,2)}function tx(e,t){return q(e.getUTCHours()%12||12,t,2)}function nx(e,t){return q(1+ky.count(Xy(e),e),t,3)}function rx(e,t){return q(e.getUTCMilliseconds(),t,3)}function ix(e,t){return rx(e,t)+`000`}function ax(e,t){return q(e.getUTCMonth()+1,t,2)}function ox(e,t){return q(e.getUTCMinutes(),t,2)}function sx(e,t){return q(e.getUTCSeconds(),t,2)}function cx(e){var t=e.getUTCDay();return t===0?7:t}function lx(e,t){return q(By.count(Xy(e)-1,e),t,2)}function ux(e){var t=e.getUTCDay();return t>=4||t===0?Wy(e):Wy.ceil(e)}function dx(e,t){return e=ux(e),q(Wy.count(Xy(e),e)+(Xy(e).getUTCDay()===4),t,2)}function fx(e){return e.getUTCDay()}function px(e,t){return q(Vy.count(Xy(e)-1,e),t,2)}function mx(e,t){return q(e.getUTCFullYear()%100,t,2)}function hx(e,t){return e=ux(e),q(e.getUTCFullYear()%100,t,2)}function gx(e,t){return q(e.getUTCFullYear()%1e4,t,4)}function _x(e,t){var n=e.getUTCDay();return e=n>=4||n===0?Wy(e):Wy.ceil(e),q(e.getUTCFullYear()%1e4,t,4)}function vx(){return`+0000`}function yx(){return`%`}function bx(e){return+e}function xx(e){return Math.floor(e/1e3)}var Sx,Cx,wx;Tx({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 Tx(e){return Sx=ab(e),Cx=Sx.format,Sx.parse,wx=Sx.utcFormat,Sx.utcParse,Sx}function Ex(e){return new Date(e)}function Dx(e){return e instanceof Date?+e:+new Date(+e)}function Ox(e,t,n,r,i,a,o,s,c,l){var u=dv(),d=u.invert,f=u.domain,p=l(`.%L`),m=l(`:%S`),h=l(`%I:%M`),g=l(`%I %p`),_=l(`%a %d`),v=l(`%b %d`),y=l(`%B`),b=l(`%Y`);function x(e){return(c(e)<e?p:s(e)<e?m:o(e)<e?h:a(e)<e?g:r(e)<e?i(e)<e?_:v:n(e)<e?y:b)(e)}return u.invert=function(e){return new Date(d(e))},u.domain=function(e){return arguments.length?f(Array.from(e,Dx)):f().map(Ex)},u.ticks=function(t){var n=f();return e(n[0],n[n.length-1],t??10)},u.tickFormat=function(e,t){return t==null?x:l(t)},u.nice=function(e){var n=f();return(!e||typeof e.range!=`function`)&&(e=t(n[0],n[n.length-1],e??10)),e?f(Bv(n,e)):u},u.copy=function(){return lv(u,Ox(e,t,n,r,i,a,o,s,c,l))},u}function kx(){return Ug.apply(Ox(eb,tb,Yy,qy,My,Oy,Ey,wy,Cy,Cx).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function Ax(){return Ug.apply(Ox(Qy,$y,Xy,Jy,By,ky,Dy,Ty,Cy,wx).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function jx(){var e=0,t=1,n,r,i,a,o=iv,s=!1,c;function l(e){return e==null||isNaN(e=+e)?c:o(i===0?.5:(e=(a(e)-n)*i,s?Math.max(0,Math.min(1,e)):e))}l.domain=function(o){return arguments.length?([e,t]=o,n=a(e=+e),r=a(t=+t),i=n===r?0:1/(r-n),l):[e,t]},l.clamp=function(e){return arguments.length?(s=!!e,l):s},l.interpolator=function(e){return arguments.length?(o=e,l):o};function u(e){return function(t){var n,r;return arguments.length?([n,r]=t,o=e(n,r),l):[o(0),o(1)]}}return l.range=u(Q_),l.rangeRound=u($_),l.unknown=function(e){return arguments.length?(c=e,l):c},function(o){return a=o,n=o(e),r=o(t),i=n===r?0:1/(r-n),l}}function Mx(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function Nx(){var e=Lv(jx()(iv));return e.copy=function(){return Mx(e,Nx())},Wg.apply(e,arguments)}function Px(){var e=Yv(jx()).domain([1,10]);return e.copy=function(){return Mx(e,Px()).base(e.base())},Wg.apply(e,arguments)}function Fx(){var e=$v(jx());return e.copy=function(){return Mx(e,Fx()).constant(e.constant())},Wg.apply(e,arguments)}function Ix(){var e=iy(jx());return e.copy=function(){return Mx(e,Ix()).exponent(e.exponent())},Wg.apply(e,arguments)}function Lx(){return Ix.apply(null,arguments).exponent(.5)}function Rx(){var e=[],t=iv;
18function n(n){if(n!=null&&!isNaN(n=+n))return t((xg(e,n,1)-1)/(e.length-1))}return n.domain=function(t){if(!arguments.length)return e.slice();e=[];for(let n of t)n!=null&&!isNaN(n=+n)&&e.push(n);return e.sort(mg),n},n.interpolator=function(e){return arguments.length?(t=e,n):t},n.range=function(){return e.map((n,r)=>t(r/(e.length-1)))},n.quantiles=function(t){return Array.from({length:t+1},(n,r)=>Bg(e,r/t))},n.copy=function(){return Rx(t).domain(e)},Wg.apply(n,arguments)}function zx(){var e=0,t=.5,n=1,r=1,i,a,o,s,c,l=iv,u,d=!1,f;function p(e){return isNaN(e=+e)?f:(e=.5+((e=+u(e))-a)*(r*e<r*a?s:c),l(d?Math.max(0,Math.min(1,e)):e))}p.domain=function(l){return arguments.length?([e,t,n]=l,i=u(e=+e),a=u(t=+t),o=u(n=+n),s=i===a?0:.5/(a-i),c=a===o?0:.5/(o-a),r=a<i?-1:1,p):[e,t,n]},p.clamp=function(e){return arguments.length?(d=!!e,p):d},p.interpolator=function(e){return arguments.length?(l=e,p):l};function m(e){return function(t){var n,r,i;return arguments.length?([n,r,i]=t,l=ev(e,[n,r,i]),p):[l(0),l(.5),l(1)]}}return p.range=m(Q_),p.rangeRound=m($_),p.unknown=function(e){return arguments.length?(f=e,p):f},function(l){return u=l,i=l(e),a=l(t),o=l(n),s=i===a?0:.5/(a-i),c=a===o?0:.5/(o-a),r=a<i?-1:1,p}}function Bx(){var e=Lv(zx()(iv));return e.copy=function(){return Mx(e,Bx())},Wg.apply(e,arguments)}function Vx(){var e=Yv(zx()).domain([.1,1,10]);return e.copy=function(){return Mx(e,Vx()).base(e.base())},Wg.apply(e,arguments)}function Hx(){var e=$v(zx());return e.copy=function(){return Mx(e,Hx()).constant(e.constant())},Wg.apply(e,arguments)}function Ux(){var e=iy(zx());return e.copy=function(){return Mx(e,Ux()).exponent(e.exponent())},Wg.apply(e,arguments)}function Wx(){return Ux.apply(null,arguments).exponent(.5)}var Gx=t({scaleBand:()=>qg,scaleDiverging:()=>Bx,scaleDivergingLog:()=>Vx,scaleDivergingPow:()=>Ux,scaleDivergingSqrt:()=>Wx,scaleDivergingSymlog:()=>Hx,scaleIdentity:()=>zv,scaleImplicit:()=>Gg,scaleLinear:()=>Rv,scaleLog:()=>Xv,scaleOrdinal:()=>Kg,scalePoint:()=>Yg,scalePow:()=>ay,scaleQuantile:()=>uy,scaleQuantize:()=>dy,scaleRadial:()=>ly,scaleSequential:()=>Nx,scaleSequentialLog:()=>Px,scaleSequentialPow:()=>Ix,scaleSequentialQuantile:()=>Rx,scaleSequentialSqrt:()=>Lx,scaleSequentialSymlog:()=>Fx,scaleSqrt:()=>oy,scaleSymlog:()=>ey,scaleThreshold:()=>fy,scaleTime:()=>kx,scaleUtc:()=>Ax,tickFormat:()=>Iv}),Kx=n(((e,t)=>{var n=ps();function r(e,t,r){for(var i=-1,a=e.length;++i<a;){var o=e[i],s=t(o);if(s!=null&&(c===void 0?s===s&&!n(s):r(s,c)))var c=s,l=o}return l}t.exports=r})),qx=n(((e,t)=>{function n(e,t){return e>t}t.exports=n})),Jx=n(((e,t)=>{var n=Kx(),r=qx(),i=Of();function a(e){return e&&e.length?n(e,i,r):void 0}t.exports=a})),Yx=n(((e,t)=>{function n(e,t){return e<t}t.exports=n})),Xx=n(((e,t)=>{var n=Kx(),r=Yx(),i=Of();function a(e){return e&&e.length?n(e,i,r):void 0}t.exports=a})),Zx=n(((e,t)=>{var n=Xs(),r=Mf(),i=bp(),a=as();function o(e,t){return(a(e)?n:i)(e,r(t,3))}t.exports=o})),Qx=n(((e,t)=>{var n=mp(),r=Zx();function i(e,t){return n(r(e,t),1)}t.exports=i})),$x=n(((e,t)=>{var n=vf();function r(e,t){return n(e,t)}t.exports=r})),eS=n(((e,t)=>{(function(e){var n=1e9,r={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:`2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286`},i=!0,a=`[DecimalError] `,o=a+`Invalid argument: `,s=a+`Exponent out of range: `,c=Math.floor,l=Math.pow,u=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,d,f=1e7,p=7,m=9007199254740991,h=c(m/p),g={};g.absoluteValue=g.abs=function(){var e=new this.constructor(this);return e.s&&=1,e},g.comparedTo=g.cmp=function(e){var t,n,r,i,a=this;if(e=new a.constructor(e),a.s!==e.s)return a.s||-e.s;if(a.e!==e.e)return a.e>e.e^a.s<0?1:-1;for(r=a.d.length,i=e.d.length,t=0,n=r<i?r:i;t<n;++t)if(a.d[t]!==e.d[t])return a.d[t]>e.d[t]^a.s<0?1:-1;return r===i?0:r>i^a.s<0?1:-1},g.decimalPlaces=g.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*p;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n},g.dividedBy=g.div=function(e){return b(this,new this.constructor(e))},g.dividedToIntegerBy=g.idiv=function(e){var t=this,n=t.constructor;return D(b(t,new n(e),0,1),n.precision)},g.equals=g.eq=function(e){return!this.cmp(e)},g.exponent=function(){return S(this)},g.greaterThan=g.gt=function(e){return this.cmp(e)>0},g.greaterThanOrEqualTo=g.gte=function(e){return this.cmp(e)>=0},g.isInteger=g.isint=function(){return this.e>this.d.length-2},g.isNegative=g.isneg=function(){return this.s<0},g.isPositive=g.ispos=function(){return this.s>0},g.isZero=function(){return this.s===0},g.lessThan=g.lt=function(e){return this.cmp(e)<0}
18,g.lessThanOrEqualTo=g.lte=function(e){return this.cmp(e)<1},g.logarithm=g.log=function(e){var t,n=this,r=n.constructor,o=r.precision,s=o+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq(d))throw Error(a+`NaN`);if(n.s<1)throw Error(a+(n.s?`NaN`:`-Infinity`));return n.eq(d)?new r(0):(i=!1,t=b(T(n,s),T(e,s),s),i=!0,D(t,o))},g.minus=g.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?O(t,e):_(t,(e.s=-e.s,e))},g.modulo=g.mod=function(e){var t,n=this,r=n.constructor,o=r.precision;if(e=new r(e),!e.s)throw Error(a+`NaN`);return n.s?(i=!1,t=b(n,e,0,1).times(e),i=!0,n.minus(t)):D(new r(n),o)},g.naturalExponential=g.exp=function(){return x(this)},g.naturalLogarithm=g.ln=function(){return T(this)},g.negated=g.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e},g.plus=g.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?_(t,e):O(t,(e.s=-e.s,e))},g.precision=g.sd=function(e){var t,n,r,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(o+e);if(t=S(i)+1,r=i.d.length-1,n=r*p+1,r=i.d[r],r){for(;r%10==0;r/=10)n--;for(r=i.d[0];r>=10;r/=10)n++}return e&&t>n?t:n},g.squareRoot=g.sqrt=function(){var e,t,n,r,o,s,l,u=this,d=u.constructor;if(u.s<1){if(!u.s)return new d(0);throw Error(a+`NaN`)}for(e=S(u),i=!1,o=Math.sqrt(+u),o==0||o==1/0?(t=y(u.d),(t.length+e)%2==0&&(t+=`0`),o=Math.sqrt(t),e=c((e+1)/2)-(e<0||e%2),o==1/0?t=`5e`+e:(t=o.toExponential(),t=t.slice(0,t.indexOf(`e`)+1)+e),r=new d(t)):r=new d(o.toString()),n=d.precision,o=l=n+3;;)if(s=r,r=s.plus(b(u,s,l+2)).times(.5),y(s.d).slice(0,l)===(t=y(r.d)).slice(0,l)){if(t=t.slice(l-3,l+1),o==l&&t==`4999`){if(D(s,n+1,0),s.times(s).eq(u)){r=s;break}}else if(t!=`9999`)break;l+=4}return i=!0,D(r,n)},g.times=g.mul=function(e){var t,n,r,a,o,s,c,l,u,d=this,p=d.constructor,m=d.d,h=(e=new p(e)).d;if(!d.s||!e.s)return new p(0);for(e.s*=d.s,n=d.e+e.e,l=m.length,u=h.length,l<u&&(o=m,m=h,h=o,s=l,l=u,u=s),o=[],s=l+u,r=s;r--;)o.push(0);for(r=u;--r>=0;){for(t=0,a=l+r;a>r;)c=o[a]+h[r]*m[a-r-1]+t,o[a--]=c%f|0,t=c/f|0;o[a]=(o[a]+t)%f|0}for(;!o[--s];)o.pop();return t?++n:o.shift(),e.d=o,e.e=n,i?D(e,p.precision):e},g.toDecimalPlaces=g.todp=function(e,t){var r=this,i=r.constructor;return r=new i(r),e===void 0?r:(v(e,0,n),t===void 0?t=i.rounding:v(t,0,8),D(r,e+S(r)+1,t))},g.toExponential=function(e,t){var r,i=this,a=i.constructor;return e===void 0?r=k(i,!0):(v(e,0,n),t===void 0?t=a.rounding:v(t,0,8),i=D(new a(i),e+1,t),r=k(i,!0,e+1)),r},g.toFixed=function(e,t){var r,i,a=this,o=a.constructor;return e===void 0?k(a):(v(e,0,n),t===void 0?t=o.rounding:v(t,0,8),i=D(new o(a),e+S(a)+1,t),r=k(i.abs(),!1,e+S(i)+1),a.isneg()&&!a.isZero()?`-`+r:r)},g.toInteger=g.toint=function(){var e=this,t=e.constructor;return D(new t(e),S(e)+1,t.rounding)},g.toNumber=function(){return+this},g.toPower=g.pow=function(e){var t,n,r,o,s,l,u=this,f=u.constructor,h=12,g=+(e=new f(e));if(!e.s)return new f(d);if(u=new f(u),!u.s){if(e.s<1)throw Error(a+`Infinity`);return u}if(u.eq(d))return u;if(r=f.precision,e.eq(d))return D(u,r);if(t=e.e,n=e.d.length-1,l=t>=n,s=u.s,!l){if(s<0)throw Error(a+`NaN`)}else if((n=g<0?-g:g)<=m){for(o=new f(d),t=Math.ceil(r/p+4),i=!1;n%2&&(o=o.times(u),A(o.d,t)),n=c(n/2),n!==0;)u=u.times(u),A(u.d,t);return i=!0,e.s<0?new f(d).div(o):D(o,r)}return s=s<0&&e.d[Math.max(t,n)]&1?-1:1,u.s=1,i=!1,o=e.times(T(u,r+h)),i=!0,o=x(o),o.s=s,o},g.toPrecision=function(e,t){var r,i,a=this,o=a.constructor;return e===void 0?(r=S(a),i=k(a,r<=o.toExpNeg||r>=o.toExpPos)):(v(e,1,n),t===void 0?t=o.rounding:v(t,0,8),a=D(new o(a),e,t),r=S(a),i=k(a,e<=r||r<=o.toExpNeg,e)),i},g.toSignificantDigits=g.tosd=function(e,t){var r=this,i=r.constructor;return e===void 0?(e=i.precision,t=i.rounding):(v(e,1,n),t===void 0?t=i.rounding:v(t,0,8)),D(new i(r),e,t)},g.toString=g.valueOf=g.val=g.toJSON=function(){var e=this,t=S(e),n=e.constructor;return k(e,t<=n.toExpNeg||t>=n.toExpPos)};function _(e,t){var n,r,a,o,s,c,l,u,d=e.constructor,m=d.precision;if(!e.s||!t.s)return t.s||(t=new d(e)),i?D(t,m):t;if(l=e.d,u=t.d,s=e.e,a=t.e,l=l.slice(),o=s-a,o){for(o<0?(r=l,o=-o,c=u.length):(r=u,a=s,c=l.length),s=Math.ceil(m/p),c=s>c?s+1:c+1,o>c&&(o=c,r.length=1),r.reverse();o--;)r.push(0);r.reverse()}for(c=l.length,o=u.length,c-o<0&&(o=c,r=u,u=l,l=r),n=0;o;
vendor: 5,099 bytes, line 18
18)n=(l[--o]=l[o]+u[o]+n)/f|0,l[o]%=f;for(n&&(l.unshift(n),++a),c=l.length;l[--c]==0;)l.pop();return t.d=l,t.e=a,i?D(t,m):t}function v(e,t,n){if(e!==~~e||e<t||e>n)throw Error(o+e)}function y(e){var t,n,r,i=e.length-1,a=``,o=e[0];if(i>0){for(a+=o,t=1;t<i;t++)r=e[t]+``,n=p-r.length,n&&(a+=w(n)),a+=r;o=e[t],r=o+``,n=p-r.length,n&&(a+=w(n))}else if(o===0)return`0`;for(;o%10==0;)o/=10;return a+o}var b=(function(){function e(e,t){var n,r=0,i=e.length;for(e=e.slice();i--;)n=e[i]*t+r,e[i]=n%f|0,r=n/f|0;return r&&e.unshift(r),e}function t(e,t,n,r){var i,a;if(n!=r)a=n>r?1:-1;else for(i=a=0;i<n;i++)if(e[i]!=t[i]){a=e[i]>t[i]?1:-1;break}return a}function n(e,t,n){for(var r=0;n--;)e[n]-=r,r=+(e[n]<t[n]),e[n]=r*f+e[n]-t[n];for(;!e[0]&&e.length>1;)e.shift()}return function(r,i,o,s){var c,l,u,d,m,h,g,_,v,y,b,x,C,w,T,E,O,k,A=r.constructor,j=r.s==i.s?1:-1,M=r.d,N=i.d;if(!r.s)return new A(r);if(!i.s)throw Error(a+`Division by zero`);for(l=r.e-i.e,O=N.length,T=M.length,g=new A(j),_=g.d=[],u=0;N[u]==(M[u]||0);)++u;if(N[u]>(M[u]||0)&&--l,x=o==null?o=A.precision:s?o+(S(r)-S(i))+1:o,x<0)return new A(0);if(x=x/p+2|0,u=0,O==1)for(d=0,N=N[0],x++;(u<T||d)&&x--;u++)C=d*f+(M[u]||0),_[u]=C/N|0,d=C%N|0;else{for(d=f/(N[0]+1)|0,d>1&&(N=e(N,d),M=e(M,d),O=N.length,T=M.length),w=O,v=M.slice(0,O),y=v.length;y<O;)v[y++]=0;k=N.slice(),k.unshift(0),E=N[0],N[1]>=f/2&&++E;do d=0,c=t(N,v,O,y),c<0?(b=v[0],O!=y&&(b=b*f+(v[1]||0)),d=b/E|0,d>1?(d>=f&&(d=f-1),m=e(N,d),h=m.length,y=v.length,c=t(m,v,h,y),c==1&&(d--,n(m,O<h?k:N,h))):(d==0&&(c=d=1),m=N.slice()),h=m.length,h<y&&m.unshift(0),n(v,m,y),c==-1&&(y=v.length,c=t(N,v,O,y),c<1&&(d++,n(v,O<y?k:N,y))),y=v.length):c===0&&(d++,v=[0]),_[u++]=d,c&&v[0]?v[y++]=M[w]||0:(v=[M[w]],y=1);while((w++<T||v[0]!==void 0)&&x--)}return _[0]||_.shift(),g.e=l,D(g,s?o+S(g)+1:o)}})();function x(e,t){var n,r,a,o,c,u,f=0,p=0,m=e.constructor,h=m.precision;if(S(e)>16)throw Error(s+S(e));if(!e.s)return new m(d);for(t==null?(i=!1,u=h):u=t,c=new m(.03125);e.abs().gte(.1);)e=e.times(c),p+=5;for(r=Math.log(l(2,p))/Math.LN10*2+5|0,u+=r,n=a=o=new m(d),m.precision=u;;){if(a=D(a.times(e),u),n=n.times(++f),c=o.plus(b(a,n,u)),y(c.d).slice(0,u)===y(o.d).slice(0,u)){for(;p--;)o=D(o.times(o),u);return m.precision=h,t==null?(i=!0,D(o,h)):o}o=c}}function S(e){for(var t=e.e*p,n=e.d[0];n>=10;n/=10)t++;return t}function C(e,t,n){if(t>e.LN10.sd())throw i=!0,n&&(e.precision=n),Error(a+`LN10 precision limit exceeded`);return D(new e(e.LN10),t)}function w(e){for(var t=``;e--;)t+=`0`;return t}function T(e,t){var n,r,o,s,c,l,u,f,p,m=1,h=10,g=e,_=g.d,v=g.constructor,x=v.precision;if(g.s<1)throw Error(a+(g.s?`NaN`:`-Infinity`));if(g.eq(d))return new v(0);if(t==null?(i=!1,f=x):f=t,g.eq(10))return t??(i=!0),C(v,f);if(f+=h,v.precision=f,n=y(_),r=n.charAt(0),s=S(g),Math.abs(s)<0x5543df729c000){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)g=g.times(e),n=y(g.d),r=n.charAt(0),m++;s=S(g),r>1?(g=new v(`0.`+n),s++):g=new v(r+`.`+n.slice(1))}else return u=C(v,f+2,x).times(s+``),g=T(new v(r+`.`+n.slice(1)),f-h).plus(u),v.precision=x,t==null?(i=!0,D(g,x)):g;for(l=c=g=b(g.minus(d),g.plus(d),f),p=D(g.times(g),f),o=3;;){if(c=D(c.times(p),f),u=l.plus(b(c,new v(o),f)),y(u.d).slice(0,f)===y(l.d).slice(0,f))return l=l.times(2),s!==0&&(l=l.plus(C(v,f+2,x).times(s+``))),l=b(l,new v(m),f),v.precision=x,t==null?(i=!0,D(l,x)):l;l=u,o+=2}}function E(e,t){var n,r,a;for((n=t.indexOf(`.`))>-1&&(t=t.replace(`.`,``)),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;t.charCodeAt(r)===48;)++r;for(a=t.length;t.charCodeAt(a-1)===48;)--a;if(t=t.slice(r,a),t){if(a-=r,n=n-r-1,e.e=c(n/p),e.d=[],r=(n+1)%p,n<0&&(r+=p),r<a){for(r&&e.d.push(+t.slice(0,r)),a-=p;r<a;)e.d.push(+t.slice(r,r+=p));t=t.slice(r),r=p-t.length}else r-=a;for(;r--;)t+=`0`;if(e.d.push(+t),i&&(e.e>h||e.e<-h))throw Error(s+n)}else e.s=0,e.e=0,e.d=[0];return e}function D(e,t,n){var r,a,o,u,d,m,g,_,v=e.d;for(u=1,o=v[0];o>=10;o/=10)u++;if(r=t-u,r<0)r+=p,a=t,g=v[_=0];else{if(_=Math.ceil((r+1)/p),o=v.length,_>=o)return e;for(g=o=v[_],u=1;o>=10;o/=10)u++;r%=p,a=r-p+u}if(n!==void 0&&(o=l(10,u-a-1),d=g/o%10|0,m=t<0||v[_+1]!==void 0||g%o,m=n<4?(d||m)&&(n==0||n==(e.s<0?3:2)):d>5||d==5&&(n==4||m||n==6&&(r>0?a>0?g/l(10,u-a):0:v[_-1])%10&1||n==(e.s<0?8:7))),t<1||!v[0])return m?(o=S(e),v.length=1,t=t-o-1,v[0]=l(10,(p-t%p)%p),e.e=c(-t/p)||0):(v.length=1,v[0]=e.e=e.s=0),e;if(r==0?(v.length=_,o=1,_--):(v.length=_+1,o=l(10,p-r),v[_]=a>0?(g/l(10,u-a)%l(10,a)|0)*o:0),m)for(;;)if(_==0){(v[0]+=o)==f&&(v[0]=1,++e.e);break}else{if(v[_]+=o,v[_]!=f)break;v[_--]=0,o=1}for(r=v.length;v[--r]===0;)v.pop();if(i&&(e.e>h||e.e<-h))throw Error(s+S(e));return e}function O(e,t){var n,r,a,o,s,c,l,u,d,m,h=e.constructor,g=h.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new h(e),i?D(t,g):t;if(l=e.d,m=t.d,r=t.e,u=e.e,l=l.slice(),s=u-r,s){for(d=s<0,d?(n=l,s=-s,c=m.length):(n=m,r=u,c=l.length),a=Math.max(Math.ceil(g/p),c)+2,s>a&&(s=a,n.length=1),n.reverse(),a=s;a--;)n.push(0);n.reverse()}else{for(a=l.length,c=m.length,d=a<c,d&&(c=a),a=0;a<c;a++)if(l[a]!=m[a]){d=l[a]<m[a];break}s=0}for(d&&(n=l,l=m,m=n,t.s=-t.s),c=l.length,a=m.length-c;a>
180;--a)l[c++]=0;for(a=m.length;a>s;){if(l[--a]<m[a]){for(o=a;o&&l[--o]===0;)l[o]=f-1;--l[o],l[a]+=f}l[a]-=m[a]}for(;l[--c]===0;)l.pop();for(;l[0]===0;l.shift())--r;return l[0]?(t.d=l,t.e=r,i?D(t,g):t):new h(0)}function k(e,t,n){var r,i=S(e),a=y(e.d),o=a.length;return t?(n&&(r=n-o)>0?a=a.charAt(0)+`.`+a.slice(1)+w(r):o>1&&(a=a.charAt(0)+`.`+a.slice(1)),a=a+(i<0?`e`:`e+`)+i):i<0?(a=`0.`+w(-i-1)+a,n&&(r=n-o)>0&&(a+=w(r))):i>=o?(a+=w(i+1-o),n&&(r=n-i-1)>0&&(a=a+`.`+w(r))):((r=i+1)<o&&(a=a.slice(0,r)+`.`+a.slice(r)),n&&(r=n-o)>0&&(i+1===o&&(a+=`.`),a+=w(r))),e.s<0?`-`+a:a}function A(e,t){if(e.length>t)return e.length=t,!0}function j(e){var t,n,r;function i(e){var t=this;if(!(t instanceof i))return new i(e);if(t.constructor=i,e instanceof i){t.s=e.s,t.e=e.e,t.d=(e=e.d)?e.slice():e;return}if(typeof e==`number`){if(e*0!=0)throw Error(o+e);if(e>0)t.s=1;else if(e<0)e=-e,t.s=-1;else{t.s=0,t.e=0,t.d=[0];return}if(e===~~e&&e<1e7){t.e=0,t.d=[e];return}return E(t,e.toString())}if(typeof e!=`string`)throw Error(o+e);if(e.charCodeAt(0)===45?(e=e.slice(1),t.s=-1):t.s=1,u.test(e))E(t,e);else throw Error(o+e)}if(i.prototype=g,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=j,i.config=i.set=M,e===void 0&&(e={}),e)for(r=[`precision`,`rounding`,`toExpNeg`,`toExpPos`,`LN10`],t=0;t<r.length;)e.hasOwnProperty(n=r[t++])||(e[n]=this[n]);return i.config(e),i}function M(e){if(!e||typeof e!=`object`)throw Error(a+`Object expected`);var t,r,i,s=[`precision`,1,n,`rounding`,0,8,`toExpNeg`,-1/0,0,`toExpPos`,0,1/0];for(t=0;t<s.length;t+=3)if((i=e[r=s[t]])!==void 0)if(c(i)===i&&i>=s[t+1]&&i<=s[t+2])this[r]=i;else throw Error(o+r+`: `+i);if((i=e[r=`LN10`])!==void 0)if(i==Math.LN10)this[r]=new this(i);else throw Error(o+r+`: `+i);return this}r=j(r),r.default=r.Decimal=r,d=new r(1),typeof define==`function`&&define.amd?define(function(){return r}):t!==void 0&&t.exports?t.exports=r:(e||=typeof self<`u`&&self&&self.self==self?self:Function(`return this`)(),e.Decimal=r)})(e)})),tS=e(Jx()),nS=e(Xx()),rS=e(Qx()),iS=e($x()),J=e(eS());function aS(e){return lS(e)||cS(e)||sS(e)||oS()}function oS(){throw TypeError(`Invalid attempt to spread non-iterable instance.
19In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function sS(e,t){if(e){if(typeof e==`string`)return uS(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return uS(e,t)}}function cS(e){if(typeof Symbol<`u`&&Symbol.iterator in Object(e))return Array.from(e)}function lS(e){if(Array.isArray(e))return uS(e)}function uS(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var dS=function(e){return e},fS={"@@functional/placeholder":!0},pS=function(e){return e===fS},mS=function(e){return function t(){return arguments.length===0||arguments.length===1&&pS(arguments.length<=0?void 0:arguments[0])?t:e.apply(void 0,arguments)}},hS=function e(t,n){return t===1?n:mS(function(){var r=[...arguments],i=r.filter(function(e){return e!==fS}).length;return i>=t?n.apply(void 0,r):e(t-i,mS(function(){var e=[...arguments],t=r.map(function(t){return pS(t)?e.shift():t});return n.apply(void 0,aS(t).concat(e))}))})},gS=function(e){return hS(e.length,e)},_S=function(e,t){for(var n=[],r=e;r<t;++r)n[r-e]=r;return n},vS=gS(function(e,t){return Array.isArray(t)?t.map(e):Object.keys(t).map(function(e){return t[e]}).map(e)}),yS=function(){var e=[...arguments];if(!e.length)return dS;var t=e.reverse(),n=t[0],r=t.slice(1);return function(){return r.reduce(function(e,t){return t(e)},n.apply(void 0,arguments))}},bS=function(e){return Array.isArray(e)?e.reverse():e.split(``).reverse.join(``)},xS=function(e){var t=null,n=null;return function(){var r=[...arguments];return t&&r.every(function(e,n){return e===t[n]})?n:(t=r,n=e.apply(void 0,r),n)}};function SS(e){return e===0?1:Math.floor(new J.default(e).abs().log(10).toNumber())+1}function CS(e,t,n){for(var r=new J.default(e),i=0,a=[];r.lt(t)&&i<1e5;)a.push(r.toNumber()),r=r.add(n),i++;return a}var wS={rangeStep:CS,getDigitCount:SS,interpolateNumber:gS(function(e,t,n){var r=+e;return r+n*(+t-r)}),uninterpolateNumber:gS(function(e,t,n){var r=t-+e;
19return r||=1/0,(n-e)/r}),uninterpolateTruncation:gS(function(e,t,n){var r=t-+e;return r||=1/0,Math.max(0,Math.min(1,(n-e)/r))})};function TS(e){return OS(e)||DS(e)||jS(e)||ES()}function ES(){throw TypeError(`Invalid attempt to spread non-iterable instance.
20In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function DS(e){if(typeof Symbol<`u`&&Symbol.iterator in Object(e))return Array.from(e)}function OS(e){if(Array.isArray(e))return MS(e)}function kS(e,t){return PS(e)||NS(e,t)||jS(e,t)||AS()}function AS(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
21In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function jS(e,t){if(e){if(typeof e==`string`)return MS(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return MS(e,t)}}function MS(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function NS(e,t){if(!(typeof Symbol>`u`||!(Symbol.iterator in Object(e)))){var n=[],r=!0,i=!1,a=void 0;try{for(var o=e[Symbol.iterator](),s;!(r=(s=o.next()).done)&&(n.push(s.value),!(t&&n.length===t));r=!0);}catch(e){i=!0,a=e}finally{try{!r&&o.return!=null&&o.return()}finally{if(i)throw a}}return n}}function PS(e){if(Array.isArray(e))return e}function FS(e){var t=kS(e,2),n=t[0],r=t[1],i=n,a=r;return n>r&&(i=r,a=n),[i,a]}function IS(e,t,n){if(e.lte(0))return new J.default(0);var r=wS.getDigitCount(e.toNumber()),i=new J.default(10).pow(r),a=e.div(i),o=r===1?.1:.05,s=new J.default(Math.ceil(a.div(o).toNumber())).add(n).mul(o).mul(i);return t?s:new J.default(Math.ceil(s))}function LS(e,t,n){var r=1,i=new J.default(e);if(!i.isint()&&n){var a=Math.abs(e);a<1?(r=new J.default(10).pow(wS.getDigitCount(e)-1),i=new J.default(Math.floor(i.div(r).toNumber())).mul(r)):a>1&&(i=new J.default(Math.floor(e)))}else e===0?i=new J.default(Math.floor((t-1)/2)):n||(i=new J.default(Math.floor(e)));var o=Math.floor((t-1)/2);return yS(vS(function(e){return i.add(new J.default(e-o).mul(r)).toNumber()}),_S)(0,t)}function RS(e,t,n,r){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((t-e)/(n-1)))return{step:new J.default(0),tickMin:new J.default(0),tickMax:new J.default(0)};var a=IS(new J.default(t).sub(e).div(n-1),r,i),o;e<=0&&t>=0?o=new J.default(0):(o=new J.default(e).add(t).div(2),o=o.sub(new J.default(o).mod(a)));var s=Math.ceil(o.sub(e).div(a).toNumber()),c=Math.ceil(new J.default(t).sub(o).div(a).toNumber()),l=s+c+1;return l>n?RS(e,t,n,r,i+1):(l<n&&(c=t>0?c+(n-l):c,s=t>0?s:s+(n-l)),{step:a,tickMin:o.sub(new J.default(s).mul(a)),tickMax:o.add(new J.default(c).mul(a))})}function zS(e){var t=kS(e,2),n=t[0],r=t[1],i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=Math.max(i,2),s=kS(FS([n,r]),2),c=s[0],l=s[1];if(c===-1/0||l===1/0){var u=l===1/0?[c].concat(TS(_S(0,i-1).map(function(){return 1/0}))):[].concat(TS(_S(0,i-1).map(function(){return-1/0})),[l]);return n>r?bS(u):u}if(c===l)return LS(c,i,a);var d=RS(c,l,o,a),f=d.step,p=d.tickMin,m=d.tickMax,h=wS.rangeStep(p,m.add(new J.default(.1).mul(f)),f);return n>r?bS(h):h}function BS(e,t){var n=kS(e,2),r=n[0],i=n[1],a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=kS(FS([r,i]),2),s=o[0],c=o[1];if(s===-1/0||c===1/0)return[r,i];if(s===c)return[s];var l=Math.max(t,2),u=IS(new J.default(c).sub(s).div(l-1),a,0),d=[].concat(TS(wS.rangeStep(new J.default(s),new J.default(c).sub(new J.default(.99).mul(u)),u)),[c]);return r>i?bS(d):d}var VS=xS(zS),HS=xS(BS),US=`Invariant failed`;function WS(e,t){if(!e)throw Error(US)}var GS=[`offset`,`layout`,`width`,`dataKey`,`data`,`dataPointFormatter`,`xAxis`,`yAxis`];function KS(e){"@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(e)}function qS(){return qS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},qS.apply(this,arguments)}
21function JS(e,t){return $S(e)||QS(e,t)||XS(e,t)||YS()}function YS(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
22In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function XS(e,t){if(e){if(typeof e==`string`)return ZS(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ZS(e,t)}}function ZS(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function QS(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function $S(e){if(Array.isArray(e))return e}function eC(e,t){if(e==null)return{};var n=tC(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function tC(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function nC(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function rC(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,pC(r.key),r)}}function iC(e,t,n){return t&&rC(e.prototype,t),n&&rC(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function aC(e,t,n){return t=lC(t),oC(e,cC()?Reflect.construct(t,n||[],lC(e).constructor):t.apply(e,n))}function oC(e,t){if(t&&(KS(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return sC(e)}function sC(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function cC(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(cC=function(){return!!e})()}
22function lC(e){return lC=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},lC(e)}function uC(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&dC(e,t)}function dC(e,t){return dC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},dC(e,t)}function fC(e,t,n){return t=pC(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pC(e){var t=mC(e,`string`);return KS(t)==`symbol`?t:t+``}function mC(e,t){if(KS(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(KS(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var hC=function(e){function t(){return nC(this,t),aC(this,t,arguments)}return uC(t,e),iC(t,[{key:`render`,value:function(){var e=this.props,t=e.offset,n=e.layout,r=e.width,i=e.dataKey,a=e.data,o=e.dataPointFormatter,s=e.xAxis,c=e.yAxis,l=W(eC(e,GS),!1);this.props.direction===`x`&&s.type!==`number`&&WS(!1);var u=a.map(function(e){var a=o(e,i),u=a.x,d=a.y,p=a.value,m=a.errorVal;if(!m)return null;var h=[],g,_;if(Array.isArray(m)){var v=JS(m,2);g=v[0],_=v[1]}else g=_=m;if(n===`vertical`){var y=s.scale,b=d+t,x=b+r,S=b-r,C=y(p-g),w=y(p+_);h.push({x1:w,y1:x,x2:w,y2:S}),h.push({x1:C,y1:b,x2:w,y2:b}),h.push({x1:C,y1:x,x2:C,y2:S})}else if(n===`horizontal`){var T=c.scale,E=u+t,D=E-r,O=E+r,k=T(p-g),A=T(p+_);h.push({x1:D,y1:A,x2:O,y2:A}),h.push({x1:E,y1:k,x2:E,y2:A}),h.push({x1:D,y1:k,x2:O,y2:k})}return f.createElement(dl,qS({className:`recharts-errorBar`,key:`bar-${h.map(function(e){return`${e.x1}-${e.x2}-${e.y1}-${e.y2}`})}`},l),h.map(function(e){return f.createElement(`line`,qS({},e,{key:`line-${e.x1}-${e.x2}-${e.y1}-${e.y2}`}))}))});return f.createElement(dl,{className:`recharts-errorBars`},u)}}])}(f.Component);fC(hC,`defaultProps`,{stroke:`black`,strokeWidth:1.5,width:5,offset:0,layout:`horizontal`}),fC(hC,`displayName`,`ErrorBar`);function gC(e){"@babel/helpers - typeof";return gC=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},gC(e)}function _C(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function vC(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?_C(Object(n),!0).forEach(function(t){yC(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_C(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function yC(e,t,n){return t=bC(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bC(e){var t=xC(e,`string`);return gC(t)==`symbol`?t:t+``}function xC(e,t){if(gC(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(gC(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var SC=function(e){var t=e.children,n=e.formattedGraphicalItems,r=e.legendWidth,i=e.legendContent,a=Kc(t,fp);if(!a)return null;var o=fp.defaultProps,s=o===void 0?{}:vC(vC({},o),a.props),c=a.props&&a.props.payload?a.props&&a.props.payload:i===`children`?(n||[]).reduce(function(e,t){var n=t.item,r=t.props,i=r.sectors||r.data||[];return e.concat(i.map(function(e){return{type:a.props.iconType||n.props.legendType,value:e.name,color:e.fill,payload:e}}))},[]):(n||[]).map(function(e){var t=e.item,n=t.type.defaultProps,r=n===void 0?{}:vC(vC({},n),t.props),i=r.dataKey,a=r.name,o=r.legendType;return{inactive:r.hide,dataKey:i,type:s.iconType||o||`square`,color:LC(t),value:a||i,payload:r}});return vC(vC(vC({}
22,s),fp.getWithHeight(a,r)),{},{payload:c,item:a})};function CC(e){"@babel/helpers - typeof";return CC=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},CC(e)}function wC(e){return OC(e)||DC(e)||EC(e)||TC()}function TC(){throw TypeError(`Invalid attempt to spread non-iterable instance.
23In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function EC(e,t){if(e){if(typeof e==`string`)return kC(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return kC(e,t)}}function DC(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function OC(e){if(Array.isArray(e))return kC(e)}function kC(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function AC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Y(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?AC(Object(n),!0).forEach(function(t){jC(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):AC(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function jC(e,t,n){return t=MC(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function MC(e){var t=NC(e,`string`);return CC(t)==`symbol`?t:t+``}function NC(e,t){if(CC(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(CC(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}
23function PC(e,t,n){return(0,B.default)(e)||(0,B.default)(t)?n:H(t)?(0,dc.default)(e,t,n):(0,U.default)(t)?t(e):n}function FC(e,t,n,r){var i=(0,rS.default)(e,function(e){return PC(e,t)});if(n===`number`){var a=i.filter(function(e){return V(e)||parseFloat(e)});return a.length?[(0,nS.default)(a),(0,tS.default)(a)]:[1/0,-1/0]}return(r?i.filter(function(e){return!(0,B.default)(e)}):i).map(function(e){return H(e)||e instanceof Date?e:``})}var IC=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,i=-1,a=t?.length??0;if(a<=1)return 0;if(r&&r.axisType===`angleAxis`&&Math.abs(Math.abs(r.range[1]-r.range[0])-360)<=1e-6)for(var o=r.range,s=0;s<a;s++){var c=s>0?n[s-1].coordinate:n[a-1].coordinate,l=n[s].coordinate,u=s>=a-1?n[0].coordinate:n[s+1].coordinate,d=void 0;if(pc(l-c)!==pc(u-l)){var f=[];if(pc(u-l)===pc(o[1]-o[0])){d=u;var p=l+o[1]-o[0];f[0]=Math.min(p,(p+c)/2),f[1]=Math.max(p,(p+c)/2)}else{d=c;var m=u+o[1]-o[0];f[0]=Math.min(l,(m+l)/2),f[1]=Math.max(l,(m+l)/2)}var h=[Math.min(l,(d+l)/2),Math.max(l,(d+l)/2)];if(e>h[0]&&e<=h[1]||e>=f[0]&&e<=f[1]){i=n[s].index;break}}else{var g=Math.min(c,u),_=Math.max(c,u);if(e>(g+l)/2&&e<=(_+l)/2){i=n[s].index;break}}}else for(var v=0;v<a;v++)if(v===0&&e<=(t[v].coordinate+t[v+1].coordinate)/2||v>0&&v<a-1&&e>(t[v].coordinate+t[v-1].coordinate)/2&&e<=(t[v].coordinate+t[v+1].coordinate)/2||v===a-1&&e>(t[v].coordinate+t[v-1].coordinate)/2){i=t[v].index;break}return i},LC=function(e){var t,n=e.type.displayName,r=(t=e.type)!=null&&t.defaultProps?Y(Y({},e.type.defaultProps),e.props):e.props,i=r.stroke,a=r.fill,o;switch(n){case`Line`:o=i;break;case`Area`:case`Radar`:o=i&&i!==`none`?i:a;break;default:o=a}return o},RC=function(e){var t=e.barSize,n=e.totalSize,r=e.stackGroups,i=r===void 0?{}:r;if(!i)return{};for(var a={},o=Object.keys(i),s=0,c=o.length;s<c;s++)for(var l=i[o[s]].stackGroups,u=Object.keys(l),d=0,f=u.length;d<f;d++){var p=l[u[d]],m=p.items,h=p.cateAxisId,g=m.filter(function(e){return Vc(e.type).indexOf(`Bar`)>=0});if(g&&g.length){var _=g[0].type.defaultProps,v=_===void 0?g[0].props:Y(Y({},_),g[0].props),y=v.barSize,b=v[h];a[b]||(a[b]=[]);var x=(0,B.default)(y)?t:y;a[b].push({item:g[0],stackList:g.slice(1),barSize:(0,B.default)(x)?void 0:vc(x,n,0)})}}return a},zC=function(e){var t=e.barGap,n=e.barCategoryGap,r=e.bandSize,i=e.sizeList,a=i===void 0?[]:i,o=e.maxBarSize,s=a.length;if(s<1)return null;var c=vc(t,r,0,!0),l,u=[];if(a[0].barSize===+a[0].barSize){var d=!1,f=r/s,p=a.reduce(function(e,t){return e+t.barSize||0},0);p+=(s-1)*c,p>=r&&(p-=(s-1)*c,c=0),p>=r&&f>0&&(d=!0,f*=.9,p=s*f);var m={offset:((r-p)/2>>0)-c,size:0};l=a.reduce(function(e,t){var n={item:t.item,position:{offset:m.offset+m.size+c,size:d?f:t.barSize}},r=[].concat(wC(e),[n]);return m=r[r.length-1].position,t.stackList&&t.stackList.length&&t.stackList.forEach(function(e){r.push({item:e,position:m})}),r},u)}else{var h=vc(n,r,0,!0);r-2*h-(s-1)*c<=0&&(c=0);var g=(r-2*h-(s-1)*c)/s;g>1&&(g>>=0);var _=o===+o?Math.min(g,o):g;l=a.reduce(function(e,t,n){var r=[].concat(wC(e),[{item:t.item,position:{offset:h+(g+c)*n+(g-_)/2,size:_}}]);return t.stackList&&t.stackList.length&&t.stackList.forEach(function(e){r.push({item:e,position:r[r.length-1].position})}),r},u)}return l},BC=function(e,t,n,r){var i=n.children,a=n.width,o=n.margin,s=SC({children:i,legendWidth:a-(o.left||0)-(o.right||0)});if(s){var c=r||{},l=c.width,u=c.height,d=s.align,f=s.verticalAlign,p=s.layout;if((p===`vertical`||p===`horizontal`&&f===`middle`)&&d!==`center`&&V(e[d]))return Y(Y({},e),{},jC({},d,e[d]+(l||0)));if((p===`horizontal`||p===`vertical`&&d===`center`)&&f!==`middle`&&V(e[f]))return Y(Y({},e),{},jC({},f,e[f]+(u||0)))}return e},VC=function(e,t,n){return(0,B.default)(t)?!0:e===`horizontal`?t===`yAxis`:e===`vertical`||n===`x`?t===`xAxis`:n!==`y`||t===`yAxis`},HC=function(e,t,n,r,i){var a=t.props.children,o=Gc(a,hC).filter(function(e){return VC(r,i,e.props.direction)});if(o&&o.length){var s=o.map(function(e){return e.props.dataKey});return e.reduce(function(e,t){var r=PC(t,n);if((0,B.default)(r))return e;var i=Array.isArray(r)?[(0,nS.default)(r),(0,tS.default)(r)]:[r,r],a=s.reduce(function(e,n){var r=PC(t,n,0),a=i[0]-Math.abs(Array.isArray(r)?r[0]:r),o=i[1]+Math.abs(Array.isArray(r)?r[1]:r);return[Math.min(a,e[0]),Math.max(o,e[1])]},[1/0,-1/0]);return[Math.min(a[0],e[0]),Math.max(a[1],e[1])]},[1/0,-1/0])}return null},UC=function(e,t,n,r,i){var a=t.map(function(t){return HC(e,t,n,i,r)}).filter(function(e){return!(0,B.default)(e)});return a&&a.length?a.reduce(function(e,t){return[Math.min(e[0],t[0]),Math.max(e[1],t[1])]},[1/0,-1/0]):null},WC=function(e,t,n,r,i){var a=t.map(function(t){var a=t.props.dataKey;return n===`number`&&a&&HC(e,t,a,r)||FC(e,a,n,i)});if(n===`number`)return a.reduce(function(e,t){return[Math.min(e[0],t[0]),Math.max(e[1],t[1])]},[1/0,-1/0]);var o={};return a.reduce(function(e,t){for(var n=0,r=t.length;n<r;n++)o[t[n]]||(o[t[n]]=!0,e.push(t[n]));return e},[])},GC=function(e,t){return e===`horizontal`&&t===`xAxis`||e===`vertical`&&t===`yAxis`||e===`centric`&&t===`angleAxis`||e===`radial`&&t===`radiusAxis`},KC=function(e,t,n){if(!e)return null;var r=e.scale,i=e.duplicateDomain,a=e.type,o=e.range,s=e.realScaleType===`scaleBand`?r.bandwidth()/2:2,c=(t||n)&&a===`category`&&r.bandwidth?r.bandwidth()/s:0;return c=e.axisType===`angleAxis`&&o?.length>=2?pc(o[0]-o[1])*2*c:c,t&&(e.ticks||e.niceTicks)?(e.ticks||e.niceTicks).map(function(e){return{coordinate:r(i?i.indexOf(e):e)+c,value:e,offset:c}}).filter(function(e){return!(0,uc.default)(e.coordinate)}):e.isCategorical&&e.categoricalDomain?e.categoricalDomain.map(function(e,t){return{coordinate:r(e)+c,value:e,index:t,offset:c}}):r.ticks&&!n?r.ticks(e.tickCount).map(function(e){return{coordinate:r(e)+c,value:e,offset:c}}):r.domain().map(function(e,t){return{coordinate:r(e)+c,value:i?i[e]:e,index:t,offset:c}})},qC=new WeakMap,JC=function(e,t){if(typeof t!=`function`)return e;qC.has(e)||qC.set(e,new WeakMap);var n=qC.get(e);if(n.has(t))return n.get(t);var r=function(){e.apply(void 0,arguments),t.apply(void 0,arguments)};return n.set(t,r),r},YC=function(e,t,n){var r=e.scale,i=e.type,a=e.layout,o=e.axisType;if(r===`auto`)return a===`radial`&&o===`radiusAxis`?{scale:qg(),realScaleType:`band`}:a===`radial`&&o===`angleAxis`?{scale:Rv(),realScaleType:`linear`}:i===`category`&&t&&(t.indexOf(`LineChart`)>=0||t.indexOf(`AreaChart`)>
23=0||t.indexOf(`ComposedChart`)>=0&&!n)?{scale:Yg(),realScaleType:`point`}:i===`category`?{scale:qg(),realScaleType:`band`}:{scale:Rv(),realScaleType:`linear`};if((0,lc.default)(r)){var s=`scale${(0,Hu.default)(r)}`;return{scale:(Gx[s]||Yg)(),realScaleType:Gx[s]?s:`point`}}return(0,U.default)(r)?{scale:r}:{scale:Yg(),realScaleType:`point`}},XC=1e-4,ZC=function(e){var t=e.domain();if(!(!t||t.length<=2)){var n=t.length,r=e.range(),i=Math.min(r[0],r[1])-XC,a=Math.max(r[0],r[1])+XC,o=e(t[0]),s=e(t[n-1]);(o<i||o>a||s<i||s>a)&&e.domain([t[0],t[n-1]])}},QC=function(e,t){if(!e)return null;for(var n=0,r=e.length;n<r;n++)if(e[n].item===t)return e[n].position;return null},$C=function(e,t){if(!t||t.length!==2||!V(t[0])||!V(t[1]))return e;var n=Math.min(t[0],t[1]),r=Math.max(t[0],t[1]),i=[e[0],e[1]];return(!V(e[0])||e[0]<n)&&(i[0]=n),(!V(e[1])||e[1]>r)&&(i[1]=r),i[0]>r&&(i[0]=r),i[1]<n&&(i[1]=n),i},ew={sign:function(e){var t=e.length;if(!(t<=0))for(var n=0,r=e[0].length;n<r;++n)for(var i=0,a=0,o=0;o<t;++o){var s=(0,uc.default)(e[o][n][1])?e[o][n][0]:e[o][n][1];s>=0?(e[o][n][0]=i,e[o][n][1]=i+s,i=e[o][n][1]):(e[o][n][0]=a,e[o][n][1]=a+s,a=e[o][n][1])}},expand:zu,none:Pu,silhouette:Bu,wiggle:Vu,positive:function(e){var t=e.length;if(!(t<=0))for(var n=0,r=e[0].length;n<r;++n)for(var i=0,a=0;a<t;++a){var o=(0,uc.default)(e[a][n][1])?e[a][n][0]:e[a][n][1];o>=0?(e[a][n][0]=i,e[a][n][1]=i+o,i=e[a][n][1]):(e[a][n][0]=0,e[a][n][1]=0)}}},tw=function(e,t,n){var r=t.map(function(e){return e.props.dataKey}),i=ew[n];return Ru().keys(r).value(function(e,t){return+PC(e,t,0)}).order(Fu).offset(i)(e)},nw=function(e,t,n,r,i,a){if(!e)return null;var o=(a?t.reverse():t).reduce(function(e,t){var i,a=(i=t.type)!=null&&i.defaultProps?Y(Y({},t.type.defaultProps),t.props):t.props,o=a.stackId;if(a.hide)return e;var s=a[n],c=e[s]||{hasStack:!1,stackGroups:{}};if(H(o)){var l=c.stackGroups[o]||{numericAxisId:n,cateAxisId:r,items:[]};l.items.push(t),c.hasStack=!0,c.stackGroups[o]=l}else c.stackGroups[_c(`_stackId_`)]={numericAxisId:n,cateAxisId:r,items:[t]};return Y(Y({},e),{},jC({},s,c))},{});return Object.keys(o).reduce(function(t,a){var s=o[a];return s.hasStack&&(s.stackGroups=Object.keys(s.stackGroups).reduce(function(t,a){var o=s.stackGroups[a];return Y(Y({},t),{},jC({},a,{numericAxisId:n,cateAxisId:r,items:o.items,stackedData:tw(e,o.items,i)}))},{})),Y(Y({},t),{},jC({},a,s))},{})},rw=function(e,t){var n=t.realScaleType,r=t.type,i=t.tickCount,a=t.originalDomain,o=t.allowDecimals,s=n||t.scale;if(s!==`auto`&&s!==`linear`)return null;if(i&&r===`number`&&a&&(a[0]===`auto`||a[1]===`auto`)){var c=e.domain();if(!c.length)return null;var l=VS(c,i,o);return e.domain([(0,nS.default)(l),(0,tS.default)(l)]),{niceTicks:l}}return i&&r===`number`?{niceTicks:HS(e.domain(),i,o)}:null},iw=function(e){var t=e.axis,n=e.ticks,r=e.offset,i=e.bandSize,a=e.entry,o=e.index;if(t.type===`category`)return n[o]?n[o].coordinate+r:null;var s=PC(a,t.dataKey,t.domain[o]);return(0,B.default)(s)?null:t.scale(s)-i/2+r},aw=function(e){var t=e.numericAxis,n=t.scale.domain();if(t.type===`number`){var r=Math.min(n[0],n[1]),i=Math.max(n[0],n[1]);return r<=0&&i>=0?0:i<0?i:r}return n[0]},ow=function(e,t){var n,r=((n=e.type)!=null&&n.defaultProps?Y(Y({},e.type.defaultProps),e.props):e.props).stackId;if(H(r)){var i=t[r];if(i){var a=i.items.indexOf(e);return a>=0?i.stackedData[a]:null}}return null},sw=function(e){return e.reduce(function(e,t){return[(0,nS.default)(t.concat([e[0]]).filter(V)),(0,tS.default)(t.concat([e[1]]).filter(V))]},[1/0,-1/0])},cw=function(e,t,n){return Object.keys(e).reduce(function(r,i){var a=e[i].stackedData.reduce(function(e,r){var i=sw(r.slice(t,n+1));return[Math.min(e[0],i[0]),Math.max(e[1],i[1])]},[1/0,-1/0]);return[Math.min(a[0],r[0]),Math.max(a[1],r[1])]},[1/0,-1/0]).map(function(e){return e===1/0||e===-1/0?0:e})},lw=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,uw=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,dw=function(e,t,n){if((0,U.default)(e))return e(t,n);if(!Array.isArray(e))return t;var r=[];if(V(e[0]))r[0]=n?e[0]:Math.min(e[0],t[0]);else if(lw.test(e[0])){var i=+lw.exec(e[0])[1];r[0]=t[0]-i}else r[0]=(0,U.default)(e[0])?e[0](t[0]):t[0];if(V(e[1]))r[1]=n?e[1]:Math.max(e[1],t[1]);else if(uw.test(e[1])){var a=+uw.exec(e[1])[1];r[1]=t[1]+a}else r[1]=(0,U.default)(e[1])?e[1](t[1]):t[1];return r},fw=function(e,t,n){if(e&&e.scale&&e.scale.bandwidth){var r=e.scale.bandwidth();if(!n||r>0)return r}if(e&&t&&t.length>=2){for(var i=(0,Pp.default)(t,function(e){return e.coordinate}),a=1/0,o=1,s=i.length;o<s;o++){var c=i[o],l=i[o-1];a=Math.min((c.coordinate||0)-(l.coordinate||0),a)}return a===1/0?0:a}return n?void 0:0},pw=function(e,t,n){return!e||!e.length||(0,iS.default)(e,(0,dc.default)(n,`type.defaultProps.domain`))?t:e},mw=function(e,t){var n=e.type.defaultProps?Y(Y({},e.type.defaultProps),e.props):e.props,r=n.dataKey,i=n.name,a=n.unit,o=n.formatter,s=n.tooltipType,c=n.chartType,l=n.hide;return Y(Y({},W(e,!1)),{},{dataKey:r,unit:a,formatter:o,name:i||r,color:LC(e),value:PC(t,r),type:s,payload:t,chartType:c,hide:l})};function hw(e){"@babel/helpers - typeof";return hw=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},hw(e)}function gw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function _w(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];
23t%2?gw(Object(n),!0).forEach(function(t){vw(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gw(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function vw(e,t,n){return t=yw(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yw(e){var t=bw(e,`string`);return hw(t)==`symbol`?t:t+``}function bw(e,t){if(hw(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(hw(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var xw=Math.PI/180,Sw=function(e){return e*180/Math.PI},Cw=function(e,t,n,r){return{x:e+Math.cos(-xw*r)*n,y:t+Math.sin(-xw*r)*n}},ww=function(e,t){var n=e.x,r=e.y,i=t.x,a=t.y;return Math.sqrt((n-i)**2+(r-a)**2)},Tw=function(e,t){var n=e.x,r=e.y,i=t.cx,a=t.cy,o=ww({x:n,y:r},{x:i,y:a});if(o<=0)return{radius:o};var s=(n-i)/o,c=Math.acos(s);return r>a&&(c=2*Math.PI-c),{radius:o,angle:Sw(c),angleInRadian:c}},Ew=function(e){var t=e.startAngle,n=e.endAngle,r=Math.floor(t/360),i=Math.floor(n/360),a=Math.min(r,i);return{startAngle:t-a*360,endAngle:n-a*360}},Dw=function(e,t){var n=t.startAngle,r=t.endAngle,i=Math.floor(n/360),a=Math.floor(r/360);return e+Math.min(i,a)*360},Ow=function(e,t){var n=e.x,r=e.y,i=Tw({x:n,y:r},t),a=i.radius,o=i.angle,s=t.innerRadius,c=t.outerRadius;if(a<s||a>c)return!1;if(a===0)return!0;var l=Ew(t),u=l.startAngle,d=l.endAngle,f=o,p;if(u<=d){for(;f>d;)f-=360;for(;f<u;)f+=360;p=f>=u&&f<=d}else{for(;f>u;)f-=360;for(;f<d;)f+=360;p=f>=d&&f<=u}return p?_w(_w({},t),{},{radius:a,angle:Dw(f,t)}):null};function kw(e){"@babel/helpers - typeof";return kw=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},kw(e)}var Aw=[`offset`];function jw(e){return Fw(e)||Pw(e)||Nw(e)||Mw()}function Mw(){throw TypeError(`Invalid attempt to spread non-iterable instance.
24In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Nw(e,t){if(e){if(typeof e==`string`)return Iw(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Iw(e,t)}}function Pw(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function Fw(e){if(Array.isArray(e))return Iw(e)}function Iw(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Lw(e,t){if(e==null)return{};var n=Rw(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Rw(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function zw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Bw(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?zw(Object(n),!0).forEach(function(t){Vw(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zw(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Vw(e,t,n){return t=Hw(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Hw(e){var t=Uw(e,`string`);return kw(t)==`symbol`?t:t+``}function Uw(e,t){if(kw(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(kw(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Ww(){return Ww=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ww.apply(this,arguments)}var Gw=function(e){var t=e.value,n=e.formatter,r=(0,B.default)(e.children)?t:e.children;return(0,U.default)(n)?n(r):r},Kw=function(e,t){return pc(t-e)*Math.min(Math.abs(t-e),360)},qw=function(e,t,n){var r=e.position,i=e.viewBox,a=e.offset,o=e.className,s=i,c=s.cx,u=s.cy,d=s.innerRadius,p=s.outerRadius,m=s.startAngle,h=s.endAngle,g=s.clockWise,_=(d+p)/2,v=Kw(m,h),y=v>=0?1:-1,b,x;r===`insideStart`?(b=m+y*a,x=g):r===`insideEnd`?(b=h-y*a,x=!g):r===`end`&&(b=h+y*a,x=g),x=v<=0?x:!x;var S=Cw(c,u,_,b),C=Cw(c,u,_,b+(x?1:-1)*359),w=`M${S.x},${S.y}
25    A${_},${_},0,1,${+!x},
26    ${C.x},${C.y}`,T=(0,B.default)(e.id)?_c(`recharts-radial-line-`):e.id;return f.createElement(`text`,Ww({},n,{dominantBaseline:`central`,className:l(`recharts-radial-bar-label`,o)}),f.createElement(`defs`,null,f.createElement(`path`,{id:T,d:w})),f.createElement(`textPath`,{xlinkHref:`#${T}`},t))},Jw=function(e){var t=e.viewBox,n=e.offset,r=e.position,i=t,a=i.cx,o=i.cy,s=i.innerRadius,c=i.outerRadius,l=(i.startAngle+i.endAngle)/2;if(r===`outside`){var u=Cw(a,o,c+n,l),d=u.x;return{x:d,y:u.y,textAnchor:d>=a?`start`:`end`,verticalAnchor:`middle`}}if(r===`center`)return{x:a,y:o,textAnchor:`middle`,verticalAnchor:`middle`};if(r===`centerTop`)return{x:a,y:o,textAnchor:`middle`,verticalAnchor:`start`};if(r===`centerBottom`)return{x:a,y:o,textAnchor:`middle`,verticalAnchor:`end`};var f=Cw(a,o,(s+c)/2,l);return{x:f.x,y:f.y,textAnchor:`middle`,verticalAnchor:`middle`}},Yw=function(e){var t=e.viewBox,n=e.parentViewBox,r=e.offset,i=e.position,a=t,o=a.x,s=a.y,c=a.width,l=a.height,u=l>=0?1:-1,d=u*r,f=u>0?`end`:`start`,p=u>0?`start`:`end`,m=c>=0?1:-1,h=m*r,g=m>0?`end`:`start`,_=m>0?`start`:`end`;if(i===`top`)return Bw(Bw({},{x:o+c/2,y:s-u*r,textAnchor:`middle`,verticalAnchor:f}),n?{height:Math.max(s-n.y,0),width:c}:{});if(i===`bottom`)return Bw(Bw({},{x:o+c/2,y:s+l+d,textAnchor:`middle`,verticalAnchor:p}),n?{height:Math.max(n.y+n.height-(s+l),0),width:c}:{});if(i===`left`){var v={x:o-h,y:s+l/2,textAnchor:g,verticalAnchor:`middle`};return Bw(Bw({},v),n?{width:Math.max(v.x-n.x,0),height:l}:{})}if(i===`right`){var y={x:o+c+h,y:s+l/2,textAnchor:_,verticalAnchor:`middle`};return Bw(Bw({},y),n?{width:Math.max(n.x+n.width-y.x,0),height:l}:{})}var b=n?{width:c,height:l}:{};return i===`insideLeft`?Bw({x:o+h,y:s+l/2,textAnchor:_,verticalAnchor:`middle`},b):i===`insideRight`?Bw({x:o+c-h,y:s+l/2,textAnchor:g,verticalAnchor:`middle`},b):i===`insideTop`?Bw({x:o+c/2,y:s+d,textAnchor:`middle`,verticalAnchor:p},b):i===`insideBottom`?Bw({x:o+c/2,y:s+l-d,textAnchor:`middle`,verticalAnchor:f},b):i===`insideTopLeft`?Bw({x:o+h,y:s+d,textAnchor:_,verticalAnchor:p},b):i===`insideTopRight`?Bw({x:o+c-h,y:s+d,textAnchor:g,verticalAnchor:p},b):i===`insideBottomLeft`?Bw({x:o+h,y:s+l-d,textAnchor:_,verticalAnchor:f},b):i===`insideBottomRight`?Bw({x:o+c-h,y:s+l-d,textAnchor:g,verticalAnchor:f},b):(0,wc.default)(i)&&(V(i.x)||mc(i.x))&&(V(i.y)||mc(i.y))?Bw({x:o+vc(i.x,c),y:s+vc(i.y,l),textAnchor:`end`,verticalAnchor:`end`},b):Bw({x:o+c/2,y:s+l/2,textAnchor:`middle`,verticalAnchor:`middle`},b)},Xw=function(e){return`cx`in e&&V(e.cx)};function Zw(e){var t=e.offset,n=t===void 0?5:t,r=Lw(e,Aw),i=Bw({offset:n},r),a=i.viewBox,o=i.position,s=i.value,c=i.children,u=i.content,d=i.className,p=d===void 0?``:d,m=i.textBreakAll;if(!a||(0,B.default)(s)&&(0,B.default)(c)&&!(0,f.isValidElement)(u)&&!(0,U.default)(u))return null;if((0,f.isValidElement)(u))return(0,f.cloneElement)(u,i);var h;if((0,U.default)(u)){if(h=(0,f.createElement)(u,i),(0,f.isValidElement)(h))return h}else h=Gw(i);var g=Xw(a),_=W(i,!0);if(g&&(o===`insideStart`||o===`insideEnd`||o===`end`))return qw(i,h,_);var v=g?Jw(i):Yw(i);return f.createElement(pg,Ww({className:l(`recharts-label`,p)},_,v,{breakAll:m}),h)}Zw.displayName=`Label`;var Qw=function(e){var t=e.cx,n=e.cy,r=e.angle,i=e.startAngle,a=e.endAngle,o=e.r,s=e.radius,c=e.innerRadius,l=e.outerRadius,u=e.x,d=e.y,f=e.top,p=e.left,m=e.width,h=e.height,g=e.clockWise,_=e.labelViewBox;if(_)return _;
26if(V(m)&&V(h)){if(V(u)&&V(d))return{x:u,y:d,width:m,height:h};if(V(f)&&V(p))return{x:f,y:p,width:m,height:h}}return V(u)&&V(d)?{x:u,y:d,width:0,height:0}:V(t)&&V(n)?{cx:t,cy:n,startAngle:i||r||0,endAngle:a||r||0,innerRadius:c||0,outerRadius:l||s||o||0,clockWise:g}:e.viewBox?e.viewBox:{}},$w=function(e,t){return e?e===!0?f.createElement(Zw,{key:`label-implicit`,viewBox:t}):H(e)?f.createElement(Zw,{key:`label-implicit`,viewBox:t,value:e}):(0,f.isValidElement)(e)?e.type===Zw?(0,f.cloneElement)(e,{key:`label-implicit`,viewBox:t}):f.createElement(Zw,{key:`label-implicit`,content:e,viewBox:t}):(0,U.default)(e)?f.createElement(Zw,{key:`label-implicit`,content:e,viewBox:t}):(0,wc.default)(e)?f.createElement(Zw,Ww({viewBox:t},e,{key:`label-implicit`})):null:null};Zw.parseViewBox=Qw,Zw.renderCallByParent=function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&n&&!e.label)return null;var r=e.children,i=Qw(e),a=Gc(r,Zw).map(function(e,n){return(0,f.cloneElement)(e,{viewBox:t||i,key:`label-${n}`})});return n?[$w(e.label,t||i)].concat(jw(a)):a};var eT=e(n(((e,t)=>{function n(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}t.exports=n}))());function tT(e){"@babel/helpers - typeof";return tT=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},tT(e)}var nT=[`valueAccessor`],rT=[`data`,`dataKey`,`clockWise`,`id`,`textBreakAll`];function iT(e){return cT(e)||sT(e)||oT(e)||aT()}function aT(){throw TypeError(`Invalid attempt to spread non-iterable instance.
27In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function oT(e,t){if(e){if(typeof e==`string`)return lT(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return lT(e,t)}}function sT(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function cT(e){if(Array.isArray(e))return lT(e)}function lT(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function uT(){return uT=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},uT.apply(this,arguments)}function dT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function fT(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?dT(Object(n),!0).forEach(function(t){pT(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dT(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function pT(e,t,n){return t=mT(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mT(e){var t=hT(e,`string`);return tT(t)==`symbol`?t:t+``}function hT(e,t){if(tT(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(tT(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function gT(e,t){if(e==null)return{};var n=_T(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function _T(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var vT=function(e){return Array.isArray(e.value)?(0,eT.default)(e.value):e.value};function yT(e){var t=e.valueAccessor,n=t===void 0?vT:t,r=gT(e,nT),i=r.data,a=r.dataKey,o=r.clockWise,s=r.id,c=r.textBreakAll,l=gT(r,rT);return!i||!i.length?null:f.createElement(dl,{className:`recharts-label-list`},i.map(function(e,t){var r=(0,B.default)(a)?n(e,t):PC(e&&e.payload,a),i=(0,B.default)(s)?{}:{id:`${s}-${t}`};return f.createElement(Zw,uT({},W(e,!0),l,i,{parentViewBox:e.parentViewBox,value:r,textBreakAll:c,viewBox:Zw.parseViewBox((0,B.default)(o)?e:fT(fT({},e),{},{clockWise:o})),key:`label-${t}`,index:t}))}))}yT.displayName=`LabelList`;function bT(e,t){return e?e===!0?f.createElement(yT,{key:`labelList-implicit`,data:t}):f.isValidElement(e)||(0,U.default)(e)?f.createElement(yT,{key:`labelList-implicit`,data:t,content:e}):(0,wc.default)(e)?f.createElement(yT,uT({data:t},e,{key:`labelList-implicit`})):null:null}function xT(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&n&&!e.label)return null;var r=e.children,i=Gc(r,yT).map(function(e,n){return(0,f.cloneElement)(e,{data:t,key:`labelList-${n}`})});return n?[bT(e.label,t)].concat(iT(i)):i}yT.renderCallByParent=xT;function ST(e){"@babel/helpers - typeof";return ST=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},ST(e)}function CT(){return CT=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},CT.apply(this,arguments)}function wT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function TT(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];
27t%2?wT(Object(n),!0).forEach(function(t){ET(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wT(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function ET(e,t,n){return t=DT(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function DT(e){var t=OT(e,`string`);return ST(t)==`symbol`?t:t+``}function OT(e,t){if(ST(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(ST(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var kT=function(e,t){return pc(t-e)*Math.min(Math.abs(t-e),359.999)},AT=function(e){var t=e.cx,n=e.cy,r=e.radius,i=e.angle,a=e.sign,o=e.isExternal,s=e.cornerRadius,c=e.cornerIsExternal,l=s*(o?1:-1)+r,u=Math.asin(s/l)/xw,d=c?i:i+a*u,f=Cw(t,n,l,d),p=Cw(t,n,r,d),m=c?i-a*u:i;return{center:f,circleTangency:p,lineTangency:Cw(t,n,l*Math.cos(u*xw),m),theta:u}},jT=function(e){var t=e.cx,n=e.cy,r=e.innerRadius,i=e.outerRadius,a=e.startAngle,o=e.endAngle,s=kT(a,o),c=a+s,l=Cw(t,n,i,a),u=Cw(t,n,i,c),d=`M ${l.x},${l.y}
28    A ${i},${i},0,
29    ${+(Math.abs(s)>180)},${+(a>c)},
30    ${u.x},${u.y}
31  `;if(r>0){var f=Cw(t,n,r,a),p=Cw(t,n,r,c);d+=`L ${p.x},${p.y}
32            A ${r},${r},0,
33            ${+(Math.abs(s)>180)},${+(a<=c)},
34            ${f.x},${f.y} Z`}else d+=`L ${t},${n} Z`;return d},MT=function(e){var t=e.cx,n=e.cy,r=e.innerRadius,i=e.outerRadius,a=e.cornerRadius,o=e.forceCornerRadius,s=e.cornerIsExternal,c=e.startAngle,l=e.endAngle,u=pc(l-c),d=AT({cx:t,cy:n,radius:i,angle:c,sign:u,cornerRadius:a,cornerIsExternal:s}),f=d.circleTangency,p=d.lineTangency,m=d.theta,h=AT({cx:t,cy:n,radius:i,angle:l,sign:-u,cornerRadius:a,cornerIsExternal:s}),g=h.circleTangency,_=h.lineTangency,v=h.theta,y=s?Math.abs(c-l):Math.abs(c-l)-m-v;if(y<0)return o?`M ${p.x},${p.y}
35        a${a},${a},0,0,1,${a*2},0
36        a${a},${a},0,0,1,${-a*2},0
37      `:jT({cx:t,cy:n,innerRadius:r,outerRadius:i,startAngle:c,endAngle:l});var b=`M ${p.x},${p.y}
38    A${a},${a},0,0,${+(u<0)},${f.x},${f.y}
39    A${i},${i},0,${+(y>180)},${+(u<0)},${g.x},${g.y}
40    A${a},${a},0,0,${+(u<0)},${_.x},${_.y}
41  `;if(r>0){var x=AT({cx:t,cy:n,radius:r,angle:c,sign:u,isExternal:!0,cornerRadius:a,cornerIsExternal:s}),S=x.circleTangency,C=x.lineTangency,w=x.theta,T=AT({cx:t,cy:n,radius:r,angle:l,sign:-u,isExternal:!0,cornerRadius:a,cornerIsExternal:s}),E=T.circleTangency,D=T.lineTangency,O=T.theta,k=s?Math.abs(c-l):Math.abs(c-l)-w-O;if(k<0&&a===0)return`${b}L${t},${n}Z`;b+=`L${D.x},${D.y}
42      A${a},${a},0,0,${+(u<0)},${E.x},${E.y}
43      A${r},${r},0,${+(k>180)},${+(u>0)},${S.x},${S.y}
44      A${a},${a},0,0,${+(u<0)},${C.x},${C.y}Z`}else b+=`L${t},${n}Z`;return b},NT={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},PT=function(e){var t=TT(TT({},NT),e),n=t.cx,r=t.cy,i=t.innerRadius,a=t.outerRadius,o=t.cornerRadius,s=t.forceCornerRadius,c=t.cornerIsExternal,u=t.startAngle,d=t.endAngle,p=t.className;if(a<i||u===d)return null;var m=l(`recharts-sector`,p),h=a-i,g=vc(o,h,0,!0),_=g>0&&Math.abs(u-d)<360?MT({cx:n,cy:r,innerRadius:i,outerRadius:a,cornerRadius:Math.min(g,h/2),forceCornerRadius:s,cornerIsExternal:c,startAngle:u,endAngle:d}):jT({cx:n,cy:r,innerRadius:i,outerRadius:a,startAngle:u,endAngle:d});return f.createElement(`path`,CT({},W(t,!0),{className:m,d:_,role:`img`}))},FT=e(qs());function IT(e){"@babel/helpers - typeof";return IT=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},IT(e)}function LT(){return LT=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},LT.apply(this,arguments)}function RT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function zT(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];
44t%2?RT(Object(n),!0).forEach(function(t){BT(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):RT(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function BT(e,t,n){return t=VT(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function VT(e){var t=HT(e,`string`);return IT(t)==`symbol`?t:t+``}function HT(e,t){if(IT(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(IT(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var UT={curveBasisClosed:pu,curveBasisOpen:hu,curveBasis:du,curveBumpX:Vl,curveBumpY:Hl,curveLinearClosed:_u,curveLinear:Fl,curveMonotoneX:Tu,curveMonotoneY:Eu,curveNatural:ku,curveStep:ju,curveStepAfter:Nu,curveStepBefore:Mu},WT=function(e){return e.x===+e.x&&e.y===+e.y},GT=function(e){return e.x},KT=function(e){return e.y},qT=function(e,t){if((0,U.default)(e))return e;var n=`curve${(0,Hu.default)(e)}`;return(n===`curveMonotone`||n===`curveBump`)&&t?UT[`${n}${t===`vertical`?`Y`:`X`}`]:UT[n]||Fl},JT=function(e){var t=e.type,n=t===void 0?`linear`:t,r=e.points,i=r===void 0?[]:r,a=e.baseLine,o=e.layout,s=e.connectNulls,c=s!==void 0&&s,l=qT(n,o),u=c?i.filter(function(e){return WT(e)}):i,d;if(Array.isArray(a)){var f=c?a.filter(function(e){return WT(e)}):a,p=u.map(function(e,t){return zT(zT({},e),{},{base:f[t]})});return d=o===`vertical`?zl().y(KT).x1(GT).x0(function(e){return e.base.x}):zl().x(GT).y1(KT).y0(function(e){return e.base.y}),d.defined(WT).curve(l),d(p)}return d=o===`vertical`&&V(a)?zl().y(KT).x1(GT).x0(a):V(a)?zl().x(GT).y1(KT).y0(a):Rl().x(GT).y(KT),d.defined(WT).curve(l),d(u)},YT=function(e){var t=e.className,n=e.points,r=e.path,i=e.pathRef;if((!n||!n.length)&&!r)return null;var a=n&&n.length?JT(e):r;return f.createElement(`path`,LT({},W(e,!1),Nc(e),{className:l(`recharts-curve`,t),d:a,ref:i}))},XT=n(((e,t)=>{t.exports=`SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED`})),ZT=n(((e,t)=>{var n=XT();function r(){}function i(){}i.resetWarningCache=r,t.exports=function(){function e(e,t,r,i,a,o){if(o!==n){var s=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 s.name=`Invariant Violation`,s}}e.isRequired=e;function t(){return e}var a={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:r};return a.PropTypes=a,a}})),X=e(n(((e,t)=>{t.exports=ZT()()}))()),{getOwnPropertyNames:QT,getOwnPropertySymbols:$T}=Object,{hasOwnProperty:eE}=Object.prototype;function tE(e,t){return function(n,r,i){return e(n,r,i)&&t(n,r,i)}}function nE(e){return function(t,n,r){if(!t||!n||typeof t!=`object`||typeof n!=`object`)return e(t,n,r);let{cache:i}=r,a=i.get(t),o=i.get(n);if(a&&o)return a===n&&o===t;i.set(t,n),i.set(n,t);let s=e(t,n,r);return i.delete(t),i.delete(n),s}}function rE(e){return e?.[Symbol.toStringTag]}function iE(e){return QT(e).concat($T(e))}var aE=Object.hasOwn||((e,t)=>eE.call(e,t));function oE(e,t){return e===t||!e&&!t&&e!==e&&t!==t}var sE=`__v`,cE=`__o`,lE=`_owner`,uE=typeof Float16Array<`u`,{getOwnPropertyDescriptor:dE,keys:fE}=Object;function pE(e,t){return e.byteLength===t.byteLength&&EE(new Uint8Array(e),new Uint8Array(t))}function mE(e,t,n){let r=e.length;if(t.length!==r)return!1;for(;r-->0;)if(!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function hE(e,t){return e.byteLength===t.byteLength&&EE(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function gE(e,t){return oE(e.getTime(),t.getTime())}function _E(e,t,n){return e.name===t.name&&e.message===t.message&&e.stack===t.stack&&n.equals(e.cause,t.cause,`cause`,`cause`,e,t,n)}function vE(e,t){return e===t}function yE(e,t,n){let r=e.size;if(r!==t.size)return!1;if(!r)return!0;let i=Array(r),a=e.entries(),o,s,c=0;for(;(o=a.next())&&!o.done;){let r=t.entries(),a=!1,l=0;for(;(s=r.next())&&!s.done;){if(i[l]){l++;continue}let r=o.value,u=s.value;if(n.equals(r[0],u[0],c,l,e,t,n)&&n.equals(r[1],u[1],r[0],u[0],e,t,n)){a=i[l]=!0;break}l++}if(!a)return!1;c++}return!0}var bE=oE;function xE(e,t,n){let r=fE(e),i=r.length;if(fE(t).length!==i)return!1;for(;i-->0;)if(!AE(e,t,n,r[i]))return!1;return!0}function SE(e,t,n){let r=iE(e),i=r.length;if(iE(t).length!==i)return!1;let a,o,s;for(;i-->0;)if(a=r[i],!AE(e,t,n,a)||(o=dE(e,a),s=dE(t,a),(o||s)&&(!o||!s||o.configurable!==s.configurable||o.enumerable!==s.enumerable||o.writable!==s.writable)))return!1;return!0}function CE(e,t){return oE(e.valueOf(),t.valueOf())}function wE(e,t){return e.source===t.source&&e.flags===t.flags}
44function TE(e,t,n){let r=e.size;if(r!==t.size)return!1;if(!r)return!0;let i=Array(r),a=e.values(),o,s;for(;(o=a.next())&&!o.done;){let r=t.values(),a=!1,c=0;for(;(s=r.next())&&!s.done;){if(!i[c]&&n.equals(o.value,s.value,o.value,s.value,e,t,n)){a=i[c]=!0;break}c++}if(!a)return!1}return!0}function EE(e,t){let n=e.length;if(t.length!==n||e.byteOffset!==t.byteOffset)return!1;if(e instanceof Float64Array||e instanceof Float32Array||uE&&e instanceof Float16Array){for(;n-->0;)if(e[n]!==t[n]&&(e[n]===e[n]||t[n]===t[n]))return!1;return!0}for(;n-->0;)if(e[n]!==t[n])return!1;return!0}function DE(e,t){return e.href===t.href||e.protocol===t.protocol&&e.username===t.username&&e.password===t.password&&e.host===t.host&&e.pathname===t.pathname&&e.hash===t.hash&&OE(e.searchParams,t.searchParams)}function OE(e,t){let n=e.toString(),r=t.toString();return n===r||kE(n)===kE(r)}function kE(e){return e.split(`&`).sort().join(`&`)}function AE(e,t,n,r){return(r===lE||r===cE||r===sE)&&(e.$$typeof||t.$$typeof)?!0:aE(t,r)&&n.equals(e[r],t[r],r,r,e,t,n)}var jE=`[object ArrayBuffer]`,ME=`[object Arguments]`,NE=`[object Boolean]`,PE=`[object DataView]`,FE=`[object Date]`,IE=`[object Error]`,LE=`[object Map]`,RE=`[object Number]`,zE=`[object Object]`,BE=`[object RegExp]`,VE=`[object Set]`,HE=`[object String]`,UE={"[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},WE=`[object URL]`,GE=Object.prototype.toString;function KE({areArrayBuffersEqual:e,areArraysEqual:t,areDataViewsEqual:n,areDatesEqual:r,areErrorsEqual:i,areFunctionsEqual:a,areMapsEqual:o,areNumbersEqual:s,areObjectsEqual:c,arePrimitiveWrappersEqual:l,areRegExpsEqual:u,areSetsEqual:d,areTypedArraysEqual:f,areUrlsEqual:p,unknownTagComparators:m}){return function(h,g,_){if(h===g)return!0;if(h==null||g==null)return!1;let v=typeof h;if(v!==typeof g)return!1;if(v!==`object`)return v===`number`?s(h,g,_):v===`function`&&a(h,g,_);let y=h.constructor;if(y!==g.constructor)return!1;if(y===Object)return c(h,g,_);if(Array.isArray(h))return t(h,g,_);if(y===Date)return r(h,g,_);if(y===RegExp)return u(h,g,_);if(y===Map)return o(h,g,_);if(y===Set)return d(h,g,_);if(y==null)return c(h,g,_);let b=GE.call(h);if(b===FE)return r(h,g,_);if(b===BE)return u(h,g,_);if(b===LE)return o(h,g,_);if(b===VE)return d(h,g,_);if(b===zE)return typeof h.then!=`function`&&typeof g.then!=`function`&&c(h,g,_);if(b===WE)return p(h,g,_);if(b===IE)return i(h,g,_);if(b===ME)return c(h,g,_);if(UE[b])return f(h,g,_);if(b===jE)return e(h,g,_);if(b===PE)return n(h,g,_);if(b===NE||b===RE||b===HE)return l(h,g,_);if(m){let e=m[b];if(!e){let t=rE(h);t&&(e=m[t])}if(e)return e(h,g,_)}return!1}}function qE({circular:e,createCustomConfig:t,strict:n}){let r={areArrayBuffersEqual:pE,areArraysEqual:n?SE:mE,areDataViewsEqual:hE,areDatesEqual:gE,areErrorsEqual:n?tE(_E,SE):tE(_E,xE),areFunctionsEqual:vE,areMapsEqual:n?tE(yE,SE):yE,areNumbersEqual:bE,areObjectsEqual:n?SE:xE,arePrimitiveWrappersEqual:CE,areRegExpsEqual:wE,areSetsEqual:n?tE(TE,SE):TE,areTypedArraysEqual:n?tE(EE,SE):EE,areUrlsEqual:DE,unknownTagComparators:void 0};if(t&&(r=Object.assign({},r,t(r))),e){let e=nE(r.areArraysEqual),t=nE(r.areErrorsEqual),n=nE(r.areMapsEqual),i=nE(r.areObjectsEqual),a=nE(r.areSetsEqual);r=Object.assign({},r,{areArraysEqual:e,areErrorsEqual:t,areMapsEqual:n,areObjectsEqual:i,areSetsEqual:a})}return r}function JE(e){return function(t,n,r,i,a,o,s){return e(t,n,s)}}function YE({circular:e,comparator:t,createState:n,equals:r,strict:i}){if(n)return function(a,o){let{cache:s=e?new WeakMap:void 0,meta:c}=n();return t(a,o,{cache:s,equals:r,meta:c,strict:i})};if(e)return function(e,n){return t(e,n,{cache:new WeakMap,equals:r,meta:void 0,strict:i})};let a={cache:void 0,equals:r,meta:void 0,strict:i};return function(e,n){return t(e,n,a)}}var XE=ZE();ZE({strict:!0}),ZE({circular:!0}),ZE({circular:!0,strict:!0}),ZE({createInternalComparator:()=>oE}),ZE({strict:!0,createInternalComparator:()=>oE}),ZE({circular:!0,createInternalComparator:()=>oE}),ZE({circular:!0,createInternalComparator:()=>oE,strict:!0});function ZE(e={}){let{circular:t=!1,createInternalComparator:n,createState:r,strict:i=!1}=e,a=KE(qE(e));return YE({circular:t,comparator:a,createState:r,equals:n?n(a):JE(a),strict:i})}function QE(e){typeof requestAnimationFrame<`u`&&requestAnimationFrame(e)}function $E(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=-1;requestAnimationFrame(function r(i){n<0&&(n=i),i-n>t?(e(i),n=-1):QE(r)})}function eD(e){"@babel/helpers - typeof";return eD=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},eD(e)}function tD(e){return oD(e)||aD(e)||rD(e)||nD()}
44function nD(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
45In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function rD(e,t){if(e){if(typeof e==`string`)return iD(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return iD(e,t)}}function iD(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function aD(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function oD(e){if(Array.isArray(e))return e}function sD(){var e={},t=function(){return null},n=!1,r=function r(i){if(!n){if(Array.isArray(i)){if(!i.length)return;var a=tD(i),o=a[0],s=a.slice(1);if(typeof o==`number`){$E(r.bind(null,s),o);return}r(o),$E(r.bind(null,s));return}eD(i)===`object`&&(e=i,t(e)),typeof i==`function`&&i()}};return{stop:function(){n=!0},start:function(e){n=!1,r(e)},subscribe:function(e){return t=e,function(){t=function(){return null}}}}}function cD(e){"@babel/helpers - typeof";return cD=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},cD(e)}function lD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function uD(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?lD(Object(n),!0).forEach(function(t){dD(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lD(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function dD(e,t,n){return t=fD(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fD(e){var t=pD(e,`string`);return cD(t)===`symbol`?t:String(t)}function pD(e,t){if(cD(e)!==`object`||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(cD(r)!==`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var mD=function(e,t){return[Object.keys(e),Object.keys(t)].reduce(function(e,t){return e.filter(function(e){return t.includes(e)})})},hD=function(e){return e},gD=function(e){return e.replace(/([A-Z])/g,function(e){return`-${e.toLowerCase()}`})},_D=function(e,t){return Object.keys(t).reduce(function(n,r){return uD(uD({},n),{},dD({},r,e(r,t[r])))},{})},vD=function(e,t,n){return e.map(function(e){return`${gD(e)} ${t}ms ${n}`}).join(`,`)};function yD(e,t){return SD(e)||xD(e,t)||TD(e,t)||bD()}function bD(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
46In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function xD(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function SD(e){if(Array.isArray(e))return e}function CD(e){return DD(e)||ED(e)||TD(e)||wD()}function wD(){throw TypeError(`Invalid attempt to spread non-iterable instance.
47In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function TD(e,t){if(e){if(typeof e==`string`)return OD(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return OD(e,t)}}function ED(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function DD(e){if(Array.isArray(e))return OD(e)}function OD(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var kD=1e-4,AD=function(e,t){return[0,3*e,3*t-6*e,3*e-3*t+1]},jD=function(e,t){return e.map(function(e,n){return e*t**+n}).reduce(function(e,t){return e+t})},MD=function(e,t){return function(n){return jD(AD(e,t),n)}},ND=function(e,t){return function(n){var r=AD(e,t);return jD([].concat(CD(r.map(function(e,t){return e*t}).slice(1)),[0]),n)}},PD=function(){var e=[...arguments],t=e[0],n=e[1],r=e[2],i=e[3];
47if(e.length===1)switch(e[0]){case`linear`:t=0,n=0,r=1,i=1;break;case`ease`:t=.25,n=.1,r=.25,i=1;break;case`ease-in`:t=.42,n=0,r=1,i=1;break;case`ease-out`:t=.42,n=0,r=.58,i=1;break;case`ease-in-out`:t=0,n=0,r=.58,i=1;break;default:var a=e[0].split(`(`);if(a[0]===`cubic-bezier`&&a[1].split(`)`)[0].split(`,`).length===4){var o=yD(a[1].split(`)`)[0].split(`,`).map(function(e){return parseFloat(e)}),4);t=o[0],n=o[1],r=o[2],i=o[3]}}[t,r,n,i].every(function(e){return typeof e==`number`&&e>=0&&e<=1});var s=MD(t,r),c=MD(n,i),l=ND(t,r),u=function(e){return e>1?1:e<0?0:e},d=function(e){for(var t=e>1?1:e,n=t,r=0;r<8;++r){var i=s(n)-t,a=l(n);if(Math.abs(i-t)<kD||a<kD)return c(n);n=u(n-i/a)}return c(n)};return d.isStepper=!1,d},FD=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.stiff,n=t===void 0?100:t,r=e.damping,i=r===void 0?8:r,a=e.dt,o=a===void 0?17:a,s=function(e,t,r){var a=r+(-(e-t)*n-r*i)*o/1e3,s=r*o/1e3+e;return Math.abs(s-t)<kD&&Math.abs(a)<kD?[t,0]:[s,a]};return s.isStepper=!0,s.dt=o,s},ID=function(){var e=[...arguments][0];if(typeof e==`string`)switch(e){case`ease`:case`ease-in-out`:case`ease-out`:case`ease-in`:case`linear`:return PD(e);case`spring`:return FD();default:if(e.split(`(`)[0]===`cubic-bezier`)return PD(e)}return typeof e==`function`?e:null};function LD(e){"@babel/helpers - typeof";return LD=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},LD(e)}function RD(e){return VD(e)||BD(e)||YD(e)||zD()}function zD(){throw TypeError(`Invalid attempt to spread non-iterable instance.
48In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function BD(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function VD(e){if(Array.isArray(e))return XD(e)}function HD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function UD(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?HD(Object(n),!0).forEach(function(t){WD(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):HD(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function WD(e,t,n){return t=GD(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function GD(e){var t=KD(e,`string`);return LD(t)===`symbol`?t:String(t)}function KD(e,t){if(LD(e)!==`object`||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(LD(r)!==`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function qD(e,t){return QD(e)||ZD(e,t)||YD(e,t)||JD()}function JD(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
49In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function YD(e,t){if(e){if(typeof e==`string`)return XD(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return XD(e,t)}}function XD(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function ZD(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function QD(e){if(Array.isArray(e))return e}var $D=function(e,t,n){return e+(t-e)*n},eO=function(e){return e.from!==e.to},tO=function e(t,n,r){var i=_D(function(e,n){if(eO(n)){var r=qD(t(n.from,n.to,n.velocity),2),i=r[0],a=r[1];return UD(UD({},n),{},{from:i,velocity:a})}return n},n);return r<1?_D(function(e,t){return eO(t)?UD(UD({},t),{},{velocity:$D(t.velocity,i[e].velocity,r),from:$D(t.from,i[e].from,r)}):t},n):e(t,i,r-1)},nO=(function(e,t,n,r,i){var a=mD(e,t),o=a.reduce(function(n,r){return UD(UD({},n),{},WD({},r,[e[r],t[r]]))},{}),s=a.reduce(function(n,r){return UD(UD({},n),{},WD({},r,{from:e[r],velocity:0,to:t[r]}))},{}),c=-1,l,u,d=function(){return null},f=function(){return _D(function(e,t){return t.from},s)},p=function(){return!Object.values(s).filter(eO).length};return d=n.isStepper?function(r){l||=r;var a=(r-l)/n.dt;s=tO(n,s,a),i(UD(UD(UD({},e),t),f(s))),l=r,p()||(c=requestAnimationFrame(d))}:function(a){u||=a;var s=(a-u)/r,l=_D(function(e,t){return $D.apply(void 0,RD(t).concat([n(s)]))},o);if(i(UD(UD(UD({},e),t),l)),s<1)c=requestAnimationFrame(d);else{var f=_D(function(e,t){return $D.apply(void 0,RD(t).concat([n(1)])
49)},o);i(UD(UD(UD({},e),t),f))}},function(){return requestAnimationFrame(d),function(){cancelAnimationFrame(c)}}});function rO(e){"@babel/helpers - typeof";return rO=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},rO(e)}var iO=[`children`,`begin`,`duration`,`attributeName`,`easing`,`isActive`,`steps`,`from`,`to`,`canBegin`,`onAnimationEnd`,`shouldReAnimate`,`onAnimationReStart`];function aO(e,t){if(e==null)return{};var n=oO(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function oO(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function sO(e){return dO(e)||uO(e)||lO(e)||cO()}function cO(){throw TypeError(`Invalid attempt to spread non-iterable instance.
50In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function lO(e,t){if(e){if(typeof e==`string`)return fO(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return fO(e,t)}}function uO(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function dO(e){if(Array.isArray(e))return fO(e)}function fO(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function pO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function mO(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?pO(Object(n),!0).forEach(function(t){hO(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pO(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function hO(e,t,n){return t=yO(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gO(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function _O(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,yO(r.key),r)}}function vO(e,t,n){return t&&_O(e.prototype,t),n&&_O(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function yO(e){var t=bO(e,`string`);return rO(t)===`symbol`?t:String(t)}function bO(e,t){if(rO(e)!==`object`||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(rO(r)!==`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function xO(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&SO(e,t)}function SO(e,t){return SO=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},SO(e,t)}function CO(e){var t=EO();return function(){var n=DO(e),r;if(t){var i=DO(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return wO(this,r)}}function wO(e,t){if(t&&(rO(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return TO(e)}function TO(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function EO(){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 DO(e){return DO=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},DO(e)}
50var OO=function(e){xO(n,e);var t=CO(n);function n(e,r){var i;gO(this,n),i=t.call(this,e,r);var a=i.props,o=a.isActive,s=a.attributeName,c=a.from,l=a.to,u=a.steps,d=a.children,f=a.duration;if(i.handleStyleChange=i.handleStyleChange.bind(TO(i)),i.changeStyle=i.changeStyle.bind(TO(i)),!o||f<=0)return i.state={style:{}},typeof d==`function`&&(i.state={style:l}),wO(i);if(u&&u.length)i.state={style:u[0].style};else if(c){if(typeof d==`function`)return i.state={style:c},wO(i);i.state={style:s?hO({},s,c):c}}else i.state={style:{}};return i}return vO(n,[{key:`componentDidMount`,value:function(){var e=this.props,t=e.isActive,n=e.canBegin;this.mounted=!0,!(!t||!n)&&this.runAnimation(this.props)}},{key:`componentDidUpdate`,value:function(e){var t=this.props,n=t.isActive,r=t.canBegin,i=t.attributeName,a=t.shouldReAnimate,o=t.to,s=t.from,c=this.state.style;if(r){if(!n){var l={style:i?hO({},i,o):o};this.state&&c&&(i&&c[i]!==o||!i&&c!==o)&&this.setState(l);return}if(!(XE(e.to,o)&&e.canBegin&&e.isActive)){var u=!e.canBegin||!e.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var d=u||a?s:e.to;if(this.state&&c){var f={style:i?hO({},i,d):d};(i&&c[i]!==d||!i&&c!==d)&&this.setState(f)}this.runAnimation(mO(mO({},this.props),{},{from:d,begin:0}))}}}},{key:`componentWillUnmount`,value:function(){this.mounted=!1;var e=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&=(this.manager.stop(),null),this.stopJSAnimation&&this.stopJSAnimation(),e&&e()}},{key:`handleStyleChange`,value:function(e){this.changeStyle(e)}},{key:`changeStyle`,value:function(e){this.mounted&&this.setState({style:e})}},{key:`runJSAnimation`,value:function(e){var t=this,n=e.from,r=e.to,i=e.duration,a=e.easing,o=e.begin,s=e.onAnimationEnd,c=e.onAnimationStart,l=nO(n,r,ID(a),i,this.changeStyle);this.manager.start([c,o,function(){t.stopJSAnimation=l()},i,s])}},{key:`runStepAnimation`,value:function(e){var t=this,n=e.steps,r=e.begin,i=e.onAnimationStart,a=n[0],o=a.style,s=a.duration,c=s===void 0?0:s;return this.manager.start([i].concat(sO(n.reduce(function(e,r,i){if(i===0)return e;var a=r.duration,o=r.easing,s=o===void 0?`ease`:o,c=r.style,l=r.properties,u=r.onAnimationEnd,d=i>0?n[i-1]:r,f=l||Object.keys(c);if(typeof s==`function`||s===`spring`)return[].concat(sO(e),[t.runJSAnimation.bind(t,{from:d.style,to:c,duration:a,easing:s}),a]);var p=vD(f,a,s),m=mO(mO(mO({},d.style),c),{},{transition:p});return[].concat(sO(e),[m,a,u]).filter(hD)},[o,Math.max(c,r)])),[e.onAnimationEnd]))}},{key:`runAnimation`,value:function(e){this.manager||=sD();var t=e.begin,n=e.duration,r=e.attributeName,i=e.to,a=e.easing,o=e.onAnimationStart,s=e.onAnimationEnd,c=e.steps,l=e.children,u=this.manager;if(this.unSubscribe=u.subscribe(this.handleStyleChange),typeof a==`function`||typeof l==`function`||a===`spring`){this.runJSAnimation(e);return}if(c.length>1){this.runStepAnimation(e);return}var d=r?hO({},r,i):i,f=vD(Object.keys(d),n,a);u.start([o,t,mO(mO({},d),{},{transition:f}),n,s])}},{key:`render`,value:function(){var e=this.props,t=e.children;e.begin;var n=e.duration;e.attributeName,e.easing;var r=e.isActive;e.steps,e.from,e.to,e.canBegin,e.onAnimationEnd,e.shouldReAnimate,e.onAnimationReStart;var i=aO(e,iO),a=f.Children.count(t),o=this.state.style;if(typeof t==`function`)return t(o);if(!r||a===0||n<=0)return t;var s=function(e){var t=e.props,n=t.style,r=n===void 0?{}:n,a=t.className;return(0,f.cloneElement)(e,mO(mO({},i),{},{style:mO(mO({},r),o),className:a}))};return a===1?s(f.Children.only(t)):f.createElement(`div`,null,f.Children.map(t,function(e){return s(e)}))}}]),n}(f.PureComponent);OO.displayName=`Animate`,OO.defaultProps={begin:0,duration:1e3,from:``,to:``,attributeName:``,easing:`ease`,isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}},OO.propTypes={from:X.default.oneOfType([X.default.object,X.default.string]),to:X.default.oneOfType([X.default.object,X.default.string]),attributeName:X.default.string,duration:X.default.number,begin:X.default.number,easing:X.default.oneOfType([X.default.string,X.default.func]),steps:X.default.arrayOf(X.default.shape({duration:X.default.number.isRequired,style:X.default.object.isRequired,easing:X.default.oneOfType([X.default.oneOf([`ease`,`ease-in`,`ease-out`,`ease-in-out`,`linear`]),X.default.func]),properties:X.default.arrayOf(`string`),onAnimationEnd:X.default.func})),children:X.default.oneOfType([X.default.node,X.default.func]),isActive:X.default.bool,canBegin:X.default.bool,onAnimationEnd:X.default.func,shouldReAnimate:X.default.bool,onAnimationStart:X.default.func,onAnimationReStart:X.default.func};var kO=OO;function AO(e){"@babel/helpers - typeof";return AO=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},AO(e)}function jO(){return jO=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},jO.apply(this,arguments)}function MO(e,t){return LO(e)||IO(e,t)||PO(e,t)||NO()}
50function NO(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
51In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function PO(e,t){if(e){if(typeof e==`string`)return FO(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return FO(e,t)}}function FO(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function IO(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function LO(e){if(Array.isArray(e))return e}function RO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function zO(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?RO(Object(n),!0).forEach(function(t){BO(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):RO(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function BO(e,t,n){return t=VO(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function VO(e){var t=HO(e,`string`);return AO(t)==`symbol`?t:t+``}function HO(e,t){if(AO(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(AO(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var UO=function(e,t,n,r,i){var a=Math.min(Math.abs(n)/2,Math.abs(r)/2),o=r>=0?1:-1,s=n>=0?1:-1,c=+(r>=0&&n>=0||r<0&&n<0),l;if(a>0&&i instanceof Array){for(var u=[0,0,0,0],d=0,f=4;d<f;d++)u[d]=i[d]>a?a:i[d];l=`M${e},${t+o*u[0]}`,u[0]>0&&(l+=`A ${u[0]},${u[0]},0,0,${c},${e+s*u[0]},${t}`),l+=`L ${e+n-s*u[1]},${t}`,u[1]>0&&(l+=`A ${u[1]},${u[1]},0,0,${c},
52        ${e+n},${t+o*u[1]}`),l+=`L ${e+n},${t+r-o*u[2]}`,u[2]>0&&(l+=`A ${u[2]},${u[2]},0,0,${c},
53        ${e+n-s*u[2]},${t+r}`),l+=`L ${e+s*u[3]},${t+r}`,u[3]>0&&(l+=`A ${u[3]},${u[3]},0,0,${c},
54        ${e},${t+r-o*u[3]}`),l+=`Z`}else if(a>0&&i===+i&&i>0){var p=Math.min(a,i);l=`M ${e},${t+o*p}
55            A ${p},${p},0,0,${c},${e+s*p},${t}
56            L ${e+n-s*p},${t}
57            A ${p},${p},0,0,${c},${e+n},${t+o*p}
58            L ${e+n},${t+r-o*p}
59            A ${p},${p},0,0,${c},${e+n-s*p},${t+r}
60            L ${e+s*p},${t+r}
61            A ${p},${p},0,0,${c},${e},${t+r-o*p} Z`}else l=`M ${e},${t} h ${n} v ${r} h ${-n} Z`;return l},WO=function(e,t){if(!e||!t)return!1;var n=e.x,r=e.y,i=t.x,a=t.y,o=t.width,s=t.height;if(Math.abs(o)>0&&Math.abs(s)>0){var c=Math.min(i,i+o),l=Math.max(i,i+o),u=Math.min(a,a+s),d=Math.max(a,a+s);return n>=c&&n<=l&&r>=u&&r<=d}return!1},GO={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:`ease`},KO=function(e){var t=zO(zO({},GO),e),n=(0,f.useRef)(),r=MO((0,f.useState)(-1),2),i=r[0],a=r[1];(0,f.useEffect)(function(){if(n.current&&n.current.getTotalLength)try{var e=n.current.getTotalLength();e&&a(e)}catch{}},[]);var o=t.x,s=t.y,c=t.width,u=t.height,d=t.radius,p=t.className,m=t.animationEasing,h=t.animationDuration,g=t.animationBegin,_=t.isAnimationActive,v=t.isUpdateAnimationActive;if(o!==+o||s!==+s||c!==+c||u!==+u||c===0||u===0)return null;var y=l(`recharts-rectangle`,p);return v?f.createElement(kO,{canBegin:i>0,from:{width:c,height:u,x:o,y:s},to:{width:c,height:u,x:o,y:s},duration:h,animationEasing:m,isActive:v},function(e){var r=e.width,a=e.height,o=e.x,s=e.y;return f.createElement(kO,{canBegin:i>0,from:`0px ${i===-1?1:i}px`,to:`${i}px 0px`,attributeName:`strokeDasharray`,begin:g,duration:h,isActive:_,easing:m},f.createElement(`path`,jO({},W(t,!0),{className:y,d:UO(o,s,r,a,d),ref:n})))}):f.createElement(`path`,jO({},W(t,!0),{className:y,d:UO(o,s,c,u,d)}))};function qO(){return qO=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},qO.apply(this,arguments)}var JO=function(e){var t=e.cx,n=e.cy,r=e.r,i=e.className,a=l(`recharts-dot`,i);return t===+t&&n===+n&&r===+r?f.createElement(`circle`,qO({},W(e,!1),Nc(e),{className:a,cx:t,cy:n,r})):null};function YO(e){"@babel/helpers - typeof";return YO=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},YO(e)}var XO=[`x`,`y`,`top`,`left`,`width`,`height`,`className`];function ZO(){return ZO=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ZO.apply(this,arguments)}function QO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function $O(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];
61t%2?QO(Object(n),!0).forEach(function(t){ek(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):QO(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function ek(e,t,n){return t=tk(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tk(e){var t=nk(e,`string`);return YO(t)==`symbol`?t:t+``}function nk(e,t){if(YO(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(YO(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function rk(e,t){if(e==null)return{};var n=ik(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ik(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var ak=function(e,t,n,r,i,a){return`M${e},${i}v${r}M${a},${t}h${n}`},ok=function(e){var t=e.x,n=t===void 0?0:t,r=e.y,i=r===void 0?0:r,a=e.top,o=a===void 0?0:a,s=e.left,c=s===void 0?0:s,u=e.width,d=u===void 0?0:u,p=e.height,m=p===void 0?0:p,h=e.className,g=rk(e,XO),_=$O({x:n,y:i,top:o,left:c,width:d,height:m},g);return!V(n)||!V(i)||!V(d)||!V(m)||!V(o)||!V(c)?null:f.createElement(`path`,ZO({},W(_,!0),{className:l(`recharts-cross`,h),d:ak(n,i,d,m,o,c)}))},sk=n(((e,t)=>{t.exports=af()(Object.getPrototypeOf,Object)})),ck=n(((e,t)=>{var n=ds(),r=sk(),i=fs(),a=`[object Object]`,o=Function.prototype,s=Object.prototype,c=o.toString,l=s.hasOwnProperty,u=c.call(Object);function d(e){if(!i(e)||n(e)!=a)return!1;var t=r(e);if(t===null)return!0;var o=l.call(t,`constructor`)&&t.constructor;return typeof o==`function`&&o instanceof o&&c.call(o)==u}t.exports=d})),lk=n(((e,t)=>{var n=ds(),r=fs(),i=`[object Boolean]`;function a(e){return e===!0||e===!1||r(e)&&n(e)==i}t.exports=a})),uk=e(ck()),dk=e(lk());function fk(e){"@babel/helpers - typeof";return fk=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},fk(e)}function pk(){return pk=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},pk.apply(this,arguments)}function mk(e,t){return yk(e)||vk(e,t)||gk(e,t)||hk()}function hk(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
62In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function gk(e,t){if(e){if(typeof e==`string`)return _k(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _k(e,t)}}function _k(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function vk(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function yk(e){if(Array.isArray(e))return e}function bk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function xk(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?bk(Object(n),!0).forEach(function(t){Sk(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bk(Object(n)).forEac
62h(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Sk(e,t,n){return t=Ck(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ck(e){var t=wk(e,`string`);return fk(t)==`symbol`?t:t+``}function wk(e,t){if(fk(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(fk(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var Tk=function(e,t,n,r,i){var a=n-r,o=`M ${e},${t}`;return o+=`L ${e+n},${t}`,o+=`L ${e+n-a/2},${t+i}`,o+=`L ${e+n-a/2-r},${t+i}`,o+=`L ${e},${t} Z`,o},Ek={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:`ease`},Dk=function(e){var t=xk(xk({},Ek),e),n=(0,f.useRef)(),r=mk((0,f.useState)(-1),2),i=r[0],a=r[1];(0,f.useEffect)(function(){if(n.current&&n.current.getTotalLength)try{var e=n.current.getTotalLength();e&&a(e)}catch{}},[]);var o=t.x,s=t.y,c=t.upperWidth,u=t.lowerWidth,d=t.height,p=t.className,m=t.animationEasing,h=t.animationDuration,g=t.animationBegin,_=t.isUpdateAnimationActive;if(o!==+o||s!==+s||c!==+c||u!==+u||d!==+d||c===0&&u===0||d===0)return null;var v=l(`recharts-trapezoid`,p);return _?f.createElement(kO,{canBegin:i>0,from:{upperWidth:0,lowerWidth:0,height:d,x:o,y:s},to:{upperWidth:c,lowerWidth:u,height:d,x:o,y:s},duration:h,animationEasing:m,isActive:_},function(e){var r=e.upperWidth,a=e.lowerWidth,o=e.height,s=e.x,c=e.y;return f.createElement(kO,{canBegin:i>0,from:`0px ${i===-1?1:i}px`,to:`${i}px 0px`,attributeName:`strokeDasharray`,begin:g,duration:h,easing:m},f.createElement(`path`,pk({},W(t,!0),{className:v,d:Tk(s,c,r,a,o),ref:n})))}):f.createElement(`g`,null,f.createElement(`path`,pk({},W(t,!0),{className:v,d:Tk(o,s,c,u,d)})))},Ok=[`option`,`shapeType`,`propTransformer`,`activeClassName`,`isActive`];function kk(e){"@babel/helpers - typeof";return kk=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},kk(e)}function Ak(e,t){if(e==null)return{};var n=jk(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function jk(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Mk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Nk(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Mk(Object(n),!0).forEach(function(t){Pk(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Mk(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Pk(e,t,n){return t=Fk(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Fk(e){var t=Ik(e,`string`);return kk(t)==`symbol`?t:t+``}function Ik(e,t){if(kk(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(kk(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Lk(e,t){return Nk(Nk({},t),e)}function Rk(e,t){return e===`symbols`}function zk(e){var t=e.shapeType,n=e.elementProps;switch(t){case`rectangle`:return f.createElement(KO,n);case`trapezoid`:return f.createElement(Dk,n);case`sector`:return f.createElement(PT,n);case`symbols`:if(Rk(t,n))return f.createElement(id,n);break;default:return null}}function Bk(e){return(0,f.isValidElement)(e)?e.props:e}function Vk(e){var t=e.option,n=e.shapeType,r=e.propTransformer,i=r===void 0?Lk:r,a=e.activeClassName,o=a===void 0?`recharts-active-shape`:a,s=e.isActive,c=Ak(e,Ok),l;if((0,f.isValidElement)(t))l=(0,f.cloneElement)(t,Nk(Nk({},c),Bk(t)));else if((0,U.default)(t))l=t(c);else if((0,uk.default)(t)&&!(0,dk.default)(t)){var u=i(t,c);l=f.createElement(zk,{shapeType:n,elementProps:u})}else{var d=c;l=f.createElement(zk,{shapeType:n,elementProps:d})}return s?f.createElement(dl,{className:o},l):l}function Hk(e,t){return t!=null&&`trapezoids`in e.props}function Uk(e,t){return t!=null&&`sectors`in e.props}function Wk(e,t){return t!=null&&`points`in e.props}function Gk(e,t){var n,r,i=e.x===(t==null||(n=t.labelViewBox)==null?void 0:n.x)||e.x===t.x,a=e.y===(t==null||(r=t.labelViewBox)==null?void 0:r.y
62)||e.y===t.y;return i&&a}function Kk(e,t){var n=e.endAngle===t.endAngle,r=e.startAngle===t.startAngle;return n&&r}function qk(e,t){var n=e.x===t.x,r=e.y===t.y,i=e.z===t.z;return n&&r&&i}function Jk(e,t){var n;return Hk(e,t)?n=Gk:Uk(e,t)?n=Kk:Wk(e,t)&&(n=qk),n}function Yk(e,t){var n;return Hk(e,t)?n=`trapezoids`:Uk(e,t)?n=`sectors`:Wk(e,t)&&(n=`points`),n}function Xk(e,t){if(Hk(e,t)){var n;return(n=t.tooltipPayload)==null||(n=n[0])==null||(n=n.payload)==null?void 0:n.payload}if(Uk(e,t)){var r;return(r=t.tooltipPayload)==null||(r=r[0])==null||(r=r.payload)==null?void 0:r.payload}return Wk(e,t)?t.payload:{}}function Zk(e){var t=e.activeTooltipItem,n=e.graphicalItem,r=e.itemData,i=Yk(n,t),a=Xk(n,t),o=r.filter(function(e,r){var o=(0,iS.default)(a,e),s=n.props[i].filter(function(e){return Jk(n,t)(e,t)}),c=r===n.props[i].indexOf(s[s.length-1]);return o&&c});return r.indexOf(o[o.length-1])}var Qk=n(((e,t)=>{var n=Math.ceil,r=Math.max;function i(e,t,i,a){for(var o=-1,s=r(n((t-e)/(i||1)),0),c=Array(s);s--;)c[a?s:++o]=e,e+=i;return c}t.exports=i})),$k=n(((e,t)=>{var n=qm(),r=1/0,i=17976931348623157e292;function a(e){return e?(e=n(e),e===r||e===-r?(e<0?-1:1)*i:e===e?e:0):e===0?e:0}t.exports=a})),eA=n(((e,t)=>{var n=Qk(),r=Np(),i=$k();function a(e){return function(t,a,o){return o&&typeof o!=`number`&&r(t,a,o)&&(a=o=void 0),t=i(t),a===void 0?(a=t,t=0):a=i(a),o=o===void 0?t<a?1:-1:i(o),n(t,a,o,e)}}t.exports=a})),tA=e(n(((e,t)=>{t.exports=eA()()}))());function nA(e){"@babel/helpers - typeof";return nA=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},nA(e)}function rA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function iA(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?rA(Object(n),!0).forEach(function(t){aA(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rA(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function aA(e,t,n){return t=oA(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function oA(e){var t=sA(e,`string`);return nA(t)==`symbol`?t:t+``}function sA(e,t){if(nA(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(nA(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var cA=[`Webkit`,`Moz`,`O`,`ms`],lA=function(e,t){if(!e)return null;var n=e.replace(/(\w)/,function(e){return e.toUpperCase()}),r=cA.reduce(function(e,r){return iA(iA({},e),{},aA({},r+n,t))},{});return r[e]=t,r};function uA(e){"@babel/helpers - typeof";return uA=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},uA(e)}function dA(){return dA=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},dA.apply(this,arguments)}function fA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function pA(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?fA(Object(n),!0).forEach(function(t){wA(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fA(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function mA(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function hA(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,TA(r.key),r)}}function gA(e,t,n){return t&&hA(e.prototype,t),n&&hA(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function _A(e,t,n){return t=xA(t),vA(e,bA()?Reflect.construct(t,n||[],xA(e).constructor):t.apply(e,n))}function vA(e,t){if(t&&(uA(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return yA(e)}function yA(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function bA(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(bA=function(){return!!e})()}function xA(e){return xA=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},xA(e)}function SA(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&CA(e,t)}function CA(e,t){return CA=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},CA(e,t)}function wA(e,t,n){return t=TA(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function TA(e){var t=EA(e,`string`);return uA(t)==`symbol`?t:t+``}function EA(e,t){if(uA(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(uA(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var DA=function(e){var t=e.data,n=e.startIndex,r=e.endIndex,i=e.x,a=e.width,o=e.travellerWidth;if(!t||!t.length)return{};var s=t.length,c=Yg().domain((0,tA.default)(0,s)).range([i,i+a-o]),l=c.domain().map(function(e){return c(e)});return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:c(n),endX:c(r),scale:c,scaleValues:l}},OA=function(e){return e.changedTouches&&!!e.changedTouches.length},kA=function(e){function t(e){var n;return mA(this,t),n=_A(this,t,[e]),wA(n,`handleDrag`,function(e){n.leaveTimer&&(clearTimeout(n.leaveTimer),n.leaveTimer=null),n.state.isTravellerMoving?n.handleTravellerMove(e):n.state.isSlideMoving&&n.handleSlideDrag(e)}),wA(n,`handleTouchMove`,function(e){e.changedTouches!=null&&e.changedTouches.length>0&&n.handleDrag(e.changedTouches[0])}),wA(n,`handleDragEnd`,function(){n.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var e=n.props,t=e.endIndex,r=e.onDragEnd,i=e.startIndex;r?.({endIndex:t,startIndex:i})}),n.detachDragEndListener()}),wA(n,`handleLeaveWrapper`,function(){(n.state.isTravellerMoving||n.state.isSlideMoving)&&(n.leaveTimer=window.setTimeout(n.handleDragEnd,n.props.leaveTimeOut))}),wA(n,`handleEnterSlideOrTraveller`,function(){n.setState({isTextActive:!0})}),wA(n,`handleLeaveSlideOrTraveller`,function(){n.setState({isTextActive:!1})}),wA(n,`handleSlideDragStart`,function(e){var t=OA(e)?e.changedTouches[0]:e;n.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:t.pageX}),n.attachDragEndListener()}),n.travellerDragStartHandlers={startX:n.handleTravellerDragStart.bind(n,`startX`),endX:n.handleTravellerDragStart.bind(n,`endX`)},n.state={},n}return SA(t,e),gA(t,[{key:`componentWillUnmount`,value:function(){this.leaveTimer&&=(clearTimeout(this.leaveTimer),null),this.detachDragEndListener()}},{key:`getIndex`,value:function(e){var n=e.startX,r=e.endX,i=this.state.scaleValues,a=this.props,o=a.gap,s=a.data.length-1,c=Math.min(n,r),l=Math.max(n,r),u=t.getIndexInRange(i,c),d=t.getIndexInRange(i,l);
vendor: 4,677 bytes, line 62
62return{startIndex:u-u%o,endIndex:d===s?s:d-d%o}}},{key:`getTextOfTick`,value:function(e){var t=this.props,n=t.data,r=t.tickFormatter,i=t.dataKey,a=PC(n[e],i,e);return(0,U.default)(r)?r(a,e):a}},{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(e){var t=this.state,n=t.slideMoveStartX,r=t.startX,i=t.endX,a=this.props,o=a.x,s=a.width,c=a.travellerWidth,l=a.startIndex,u=a.endIndex,d=a.onChange,f=e.pageX-n;f>0?f=Math.min(f,o+s-c-i,o+s-c-r):f<0&&(f=Math.max(f,o-r,o-i));var p=this.getIndex({startX:r+f,endX:i+f});(p.startIndex!==l||p.endIndex!==u)&&d&&d(p),this.setState({startX:r+f,endX:i+f,slideMoveStartX:e.pageX})}},{key:`handleTravellerDragStart`,value:function(e,t){var n=OA(t)?t.changedTouches[0]:t;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:e,brushMoveStartX:n.pageX}),this.attachDragEndListener()}},{key:`handleTravellerMove`,value:function(e){var t=this.state,n=t.brushMoveStartX,r=t.movingTravellerId,i=t.endX,a=t.startX,o=this.state[r],s=this.props,c=s.x,l=s.width,u=s.travellerWidth,d=s.onChange,f=s.gap,p=s.data,m={startX:this.state.startX,endX:this.state.endX},h=e.pageX-n;h>0?h=Math.min(h,c+l-u-o):h<0&&(h=Math.max(h,c-o)),m[r]=o+h;var g=this.getIndex(m),_=g.startIndex,v=g.endIndex,y=function(){var e=p.length-1;return r===`startX`&&(i>a?_%f===0:v%f===0)||i<a&&v===e||r===`endX`&&(i>a?v%f===0:_%f===0)||i>a&&v===e};this.setState(wA(wA({},r,o+h),`brushMoveStartX`,e.pageX),function(){d&&y()&&d(g)})}},{key:`handleTravellerMoveKeyboard`,value:function(e,t){var n=this,r=this.state,i=r.scaleValues,a=r.startX,o=r.endX,s=this.state[t],c=i.indexOf(s);if(c!==-1){var l=c+e;if(!(l===-1||l>=i.length)){var u=i[l];t===`startX`&&u>=o||t===`endX`&&u<=a||this.setState(wA({},t,u),function(){n.props.onChange(n.getIndex({startX:n.state.startX,endX:n.state.endX}))})}}}},{key:`renderBackground`,value:function(){var e=this.props,t=e.x,n=e.y,r=e.width,i=e.height,a=e.fill,o=e.stroke;return f.createElement(`rect`,{stroke:o,fill:a,x:t,y:n,width:r,height:i})}},{key:`renderPanorama`,value:function(){var e=this.props,t=e.x,n=e.y,r=e.width,i=e.height,a=e.data,o=e.children,s=e.padding,c=f.Children.only(o);return c?f.cloneElement(c,{x:t,y:n,width:r,height:i,margin:s,compact:!0,data:a}):null}},{key:`renderTravellerLayer`,value:function(e,n){var r=this,i=this.props,a=i.y,o=i.travellerWidth,s=i.height,c=i.traveller,l=i.ariaLabel,u=i.data,d=i.startIndex,p=i.endIndex,m=Math.max(e,this.props.x),h=pA(pA({},W(this.props,!1)),{},{x:m,y:a,width:o,height:s}),g=l||`Min value: ${u[d]?.name}, Max value: ${u[p]?.name}`;return f.createElement(dl,{tabIndex:0,role:`slider`,"aria-label":g,"aria-valuenow":e,className:`recharts-brush-traveller`,onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[n],onTouchStart:this.travellerDragStartHandlers[n],onKeyDown:function(e){[`ArrowLeft`,`ArrowRight`].includes(e.key)&&(e.preventDefault(),e.stopPropagation(),r.handleTravellerMoveKeyboard(e.key===`ArrowRight`?1:-1,n))},onFocus:function(){r.setState({isTravellerFocused:!0})},onBlur:function(){r.setState({isTravellerFocused:!1})},style:{cursor:`col-resize`}},t.renderTraveller(c,h))}},{key:`renderSlide`,value:function(e,t){var n=this.props,r=n.y,i=n.height,a=n.stroke,o=n.travellerWidth,s=Math.min(e,t)+o,c=Math.max(Math.abs(t-e)-o,0);return f.createElement(`rect`,{className:`recharts-brush-slide`,onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:`move`},stroke:`none`,fill:a,fillOpacity:.2,x:s,y:r,width:c,height:i})}},{key:`renderText`,value:function(){var e=this.props,t=e.startIndex,n=e.endIndex,r=e.y,i=e.height,a=e.travellerWidth,o=e.stroke,s=this.state,c=s.startX,l=s.endX,u=5,d={pointerEvents:`none`,fill:o};return f.createElement(dl,{className:`recharts-brush-texts`},f.createElement(pg,dA({textAnchor:`end`,verticalAnchor:`middle`,x:Math.min(c,l)-u,y:r+i/2},d),this.getTextOfTick(t)),f.createElement(pg,dA({textAnchor:`start`,verticalAnchor:`middle`,x:Math.max(c,l)+a+u,y:r+i/2},d),this.getTextOfTick(n)))}},{key:`render`,value:function(){var e=this.props,t=e.data,n=e.className,r=e.children,i=e.x,a=e.
62y,o=e.width,s=e.height,c=e.alwaysShowText,u=this.state,d=u.startX,p=u.endX,m=u.isTextActive,h=u.isSlideMoving,g=u.isTravellerMoving,_=u.isTravellerFocused;if(!t||!t.length||!V(i)||!V(a)||!V(o)||!V(s)||o<=0||s<=0)return null;var v=l(`recharts-brush`,n),y=f.Children.count(r)===1,b=lA(`userSelect`,`none`);return f.createElement(dl,{className:v,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:b},this.renderBackground(),y&&this.renderPanorama(),this.renderSlide(d,p),this.renderTravellerLayer(d,`startX`),this.renderTravellerLayer(p,`endX`),(m||h||g||_||c)&&this.renderText())}}],[{key:`renderDefaultTraveller`,value:function(e){var t=e.x,n=e.y,r=e.width,i=e.height,a=e.stroke,o=Math.floor(n+i/2)-1;return f.createElement(f.Fragment,null,f.createElement(`rect`,{x:t,y:n,width:r,height:i,fill:a,stroke:`none`}),f.createElement(`line`,{x1:t+1,y1:o,x2:t+r-1,y2:o,fill:`none`,stroke:`#fff`}),f.createElement(`line`,{x1:t+1,y1:o+2,x2:t+r-1,y2:o+2,fill:`none`,stroke:`#fff`}))}},{key:`renderTraveller`,value:function(e,n){return f.isValidElement(e)?f.cloneElement(e,n):(0,U.default)(e)?e(n):t.renderDefaultTraveller(n)}},{key:`getDerivedStateFromProps`,value:function(e,t){var n=e.data,r=e.width,i=e.x,a=e.travellerWidth,o=e.updateId,s=e.startIndex,c=e.endIndex;if(n!==t.prevData||o!==t.prevUpdateId)return pA({prevData:n,prevTravellerWidth:a,prevUpdateId:o,prevX:i,prevWidth:r},n&&n.length?DA({data:n,width:r,x:i,travellerWidth:a,startIndex:s,endIndex:c}):{scale:null,scaleValues:null});if(t.scale&&(r!==t.prevWidth||i!==t.prevX||a!==t.prevTravellerWidth)){t.scale.range([i,i+r-a]);var l=t.scale.domain().map(function(e){return t.scale(e)});return{prevData:n,prevTravellerWidth:a,prevUpdateId:o,prevX:i,prevWidth:r,startX:t.scale(e.startIndex),endX:t.scale(e.endIndex),scaleValues:l}}return null}},{key:`getIndexInRange`,value:function(e,t){for(var n=e.length,r=0,i=n-1;i-r>1;){var a=Math.floor((r+i)/2);e[a]>t?i=a:r=a}return t>=e[i]?i:r}}])}(f.PureComponent);wA(kA,`displayName`,`Brush`),wA(kA,`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 AA=n(((e,t)=>{var n=yp();function r(e,t){var r;return n(e,function(e,n,i){return r=t(e,n,i),!r}),!!r}t.exports=r})),jA=n(((e,t)=>{var n=Nd(),r=Mf(),i=AA(),a=as(),o=Np();function s(e,t,s){var c=a(e)?n:i;return s&&o(e,t,s)&&(t=void 0),c(e,r(t,3))}t.exports=s})),MA=function(e,t){var n=e.alwaysShow,r=e.ifOverflow;return n&&(r=`extendDomain`),r===t},NA=n(((e,t)=>{var n=Op();function r(e,t,r){t==`__proto__`&&n?n(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}t.exports=r})),PA=n(((e,t)=>{var n=NA(),r=_p(),i=Mf();function a(e,t){var a={};return t=i(t,3),r(e,function(e,r,i){n(a,r,t(e,r,i))}),a}t.exports=a})),FA=n(((e,t)=>{function n(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}t.exports=n})),IA=n(((e,t)=>{var n=yp();function r(e,t){var r=!0;return n(e,function(e,n,i){return r=!!t(e,n,i),r}),r}t.exports=r})),LA=n(((e,t)=>{var n=FA(),r=IA(),i=Mf(),a=as(),o=Np();function s(e,t,s){var c=a(e)?n:r;return s&&o(e,t,s)&&(t=void 0),c(e,i(t,3))}t.exports=s})),RA=e(PA()),zA=e(LA()),BA=[`x`,`y`];function VA(e){"@babel/helpers - typeof";return VA=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},VA(e)}function HA(){return HA=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},HA.apply(this,arguments)}function UA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function WA(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?UA(Object(n),!0).forEach(function(t){GA(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):UA(Object(n)).forEac
62h(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function GA(e,t,n){return t=KA(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function KA(e){var t=qA(e,`string`);return VA(t)==`symbol`?t:t+``}function qA(e,t){if(VA(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(VA(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function JA(e,t){if(e==null)return{};var n=YA(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function YA(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function XA(e,t){var n=e.x,r=e.y,i=JA(e,BA),a=`${n}`,o=parseInt(a,10),s=`${r}`,c=parseInt(s,10),l=`${t.height||i.height}`,u=parseInt(l,10),d=`${t.width||i.width}`,f=parseInt(d,10);return WA(WA(WA(WA(WA({},t),i),o?{x:o}:{}),c?{y:c}:{}),{},{height:u,width:f,name:t.name,radius:t.radius})}function ZA(e){return f.createElement(Vk,HA({shapeType:`rectangle`,propTransformer:XA,activeClassName:`recharts-active-bar`},e))}var QA=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(n,r){if(typeof e==`number`)return e;var i=V(n)||hc(n);return i?e(n,r):(!i&&WS(!1),t)}},$A=[`value`,`background`],ej;function tj(e){"@babel/helpers - typeof";return tj=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},tj(e)}function nj(e,t){if(e==null)return{};var n=rj(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function rj(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function ij(){return ij=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ij.apply(this,arguments)}function aj(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Z(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?aj(Object(n),!0).forEach(function(t){gj(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):aj(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function oj(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function sj(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,_j(r.key),r)}}function cj(e,t,n){return t&&sj(e.prototype,t),n&&sj(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}
62function lj(e,t,n){return t=pj(t),uj(e,fj()?Reflect.construct(t,n||[],pj(e).constructor):t.apply(e,n))}function uj(e,t){if(t&&(tj(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return dj(e)}function dj(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function fj(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(fj=function(){return!!e})()}function pj(e){return pj=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},pj(e)}function mj(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&hj(e,t)}function hj(e,t){return hj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},hj(e,t)}function gj(e,t,n){return t=_j(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _j(e){var t=vj(e,`string`);return tj(t)==`symbol`?t:t+``}function vj(e,t){if(tj(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(tj(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var yj=function(e){function t(){var e;oj(this,t);var n=[...arguments];return e=lj(this,t,[].concat(n)),gj(e,`state`,{isAnimationFinished:!1}),gj(e,`id`,_c(`recharts-bar-`)),gj(e,`handleAnimationEnd`,function(){var t=e.props.onAnimationEnd;e.setState({isAnimationFinished:!0}),t&&t()}),gj(e,`handleAnimationStart`,function(){var t=e.props.onAnimationStart;e.setState({isAnimationFinished:!1}),t&&t()}),e}return mj(t,e),cj(t,[{key:`renderRectanglesStatically`,value:function(e){var t=this,n=this.props,r=n.shape,i=n.dataKey,a=n.activeIndex,o=n.activeBar,s=W(this.props,!1);return e&&e.map(function(e,n){var c=n===a,l=c?o:r,u=Z(Z(Z({},s),e),{},{isActive:c,option:l,index:n,dataKey:i,onAnimationStart:t.handleAnimationStart,onAnimationEnd:t.handleAnimationEnd});return f.createElement(dl,ij({className:`recharts-bar-rectangle`},Fc(t.props,e,n),{key:`rectangle-${e?.x}-${e?.y}-${e?.value}-${n}`}),f.createElement(ZA,u))})}},{key:`renderRectanglesWithAnimation`,value:function(){var e=this,t=this.props,n=t.data,r=t.layout,i=t.isAnimationActive,a=t.animationBegin,o=t.animationDuration,s=t.animationEasing,c=t.animationId,l=this.state.prevData;return f.createElement(kO,{begin:a,duration:o,isActive:i,easing:s,from:{t:0},to:{t:1},key:`bar-${c}`,onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(t){var i=t.t,a=n.map(function(e,t){var n=l&&l[t];if(n){var a=xc(n.x,e.x),o=xc(n.y,e.y),s=xc(n.width,e.width),c=xc(n.height,e.height);return Z(Z({},e),{},{x:a(i),y:o(i),width:s(i),height:c(i)})}if(r===`horizontal`){var u=xc(0,e.height)(i);return Z(Z({},e),{},{y:e.y+e.height-u,height:u})}var d=xc(0,e.width)(i);return Z(Z({},e),{},{width:d})});return f.createElement(dl,null,e.renderRectanglesStatically(a))})}},{key:`renderRectangles`,value:function(){var e=this.props,t=e.data,n=e.isAnimationActive,r=this.state.prevData;return n&&t&&t.length&&(!r||!(0,iS.default)(r,t))?this.renderRectanglesWithAnimation():this.renderRectanglesStatically(t)}},{key:`renderBackground`,value:function(){var e=this,t=this.props,n=t.data,r=t.dataKey,i=t.activeIndex,a=W(this.props.background,!1);return n.map(function(t,n){t.value;var o=t.background,s=nj(t,$A);if(!o)return null;var c=Z(Z(Z(Z(Z({},s),{},{fill:`#eee`},o),a),Fc(e.props,t,n)),{},{onAnimationStart:e.handleAnimationStart,onAnimationEnd:e.handleAnimationEnd,dataKey:r,index:n,className:`recharts-bar-background-rectangle`});return f.createElement(ZA,ij({key:`background-bar-${n}`,option:e.props.background,isActive:n===i},c))})}},{key:`renderErrorBar`,value:function(e,t){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var n=this.props,r=n.data,i=n.xAxis,a=n.yAxis,o=n.layout,s=n.children,c=Gc(s,hC);if(!c)return null;var l=o===`vertical`?r[0].height/2:r[0].width/2,u=function(e,t){var n=Array.isArray(e.value)?e.value[1]:e.value;return{x:e.x,y:e.y,value:n,errorVal:PC(e,t)}},d={clipPath:e?`url(#clipPath-${t})`:null};return f.createElement(dl,d,c.map(function(e){return f.cloneElement(e,{key:`error-bar-${t}-${e.props.dataKey}`,data:r,xAxis:i,yAxis:a,layout:o,offset:l,dataPointFormatter:u})}))}},{key:`render`,value:function(){var e=this.props,t=e.hide,n=e.data,r=e.className,i=e.xAxis,a=e.
62yAxis,o=e.left,s=e.top,c=e.width,u=e.height,d=e.isAnimationActive,p=e.background,m=e.id;if(t||!n||!n.length)return null;var h=this.state.isAnimationFinished,g=l(`recharts-bar`,r),_=i&&i.allowDataOverflow,v=a&&a.allowDataOverflow,y=_||v,b=(0,B.default)(m)?this.id:m;return f.createElement(dl,{className:g},_||v?f.createElement(`defs`,null,f.createElement(`clipPath`,{id:`clipPath-${b}`},f.createElement(`rect`,{x:_?o:o-c/2,y:v?s:s-u/2,width:_?c:c*2,height:v?u:u*2}))):null,f.createElement(dl,{className:`recharts-bar-rectangles`,clipPath:y?`url(#clipPath-${b})`:null},p?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(y,b),(!d||h)&&yT.renderCallByParent(this.props,n))}}],[{key:`getDerivedStateFromProps`,value:function(e,t){return e.animationId===t.prevAnimationId?e.data===t.curData?null:{curData:e.data}:{prevAnimationId:e.animationId,curData:e.data,prevData:t.curData}}}])}(f.PureComponent);ej=yj,gj(yj,`displayName`,`Bar`),gj(yj,`defaultProps`,{xAxisId:0,yAxisId:0,legendType:`rect`,minPointSize:0,hide:!1,data:[],layout:`vertical`,activeBar:!1,isAnimationActive:!wm.isSsr,animationBegin:0,animationDuration:400,animationEasing:`ease`}),gj(yj,`getComposedData`,function(e){var t=e.props,n=e.item,r=e.barPosition,i=e.bandSize,a=e.xAxis,o=e.yAxis,s=e.xAxisTicks,c=e.yAxisTicks,l=e.stackedData,u=e.dataStartIndex,d=e.displayedData,f=e.offset,p=QC(r,n);if(!p)return null;var m=t.layout,h=n.type.defaultProps,g=h===void 0?n.props:Z(Z({},h),n.props),_=g.dataKey,v=g.children,y=g.minPointSize,b=m===`horizontal`?o:a,x=l?b.scale.domain():null,S=aw({numericAxis:b}),C=Gc(v,lh);return Z({data:d.map(function(e,t){var r,d,f,h,g,v;l?r=$C(l[u+t],x):(r=PC(e,_),Array.isArray(r)||(r=[S,r]));var b=QA(y,ej.defaultProps.minPointSize)(r[1],t);if(m===`horizontal`){var w=[o.scale(r[0]),o.scale(r[1])],T=w[0],E=w[1];d=iw({axis:a,ticks:s,bandSize:i,offset:p.offset,entry:e,index:t}),f=E??T??void 0,h=p.size;var D=T-E;if(g=Number.isNaN(D)?0:D,v={x:d,y:o.y,width:h,height:o.height},Math.abs(b)>0&&Math.abs(g)<Math.abs(b)){var O=pc(g||b)*(Math.abs(b)-Math.abs(g));f-=O,g+=O}}else{var k=[a.scale(r[0]),a.scale(r[1])],A=k[0],j=k[1];if(d=A,f=iw({axis:o,ticks:c,bandSize:i,offset:p.offset,entry:e,index:t}),h=j-A,g=p.size,v={x:a.x,y:f,width:a.width,height:g},Math.abs(b)>0&&Math.abs(h)<Math.abs(b)){var M=pc(h||b)*(Math.abs(b)-Math.abs(h));h+=M}}return Z(Z(Z({},e),{},{x:d,y:f,width:h,height:g,value:l?r:r[1],payload:e,background:v},C&&C[t]&&C[t].props),{},{tooltipPayload:[mw(n,e)],tooltipPosition:{x:d+h/2,y:f+g/2}})}),layout:m},f)});function bj(e){"@babel/helpers - typeof";return bj=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},bj(e)}function xj(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function Sj(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,Dj(r.key),r)}}function Cj(e,t,n){return t&&Sj(e.prototype,t),n&&Sj(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function wj(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Tj(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?wj(Object(n),!0).forEach(function(t){Ej(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wj(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Ej(e,t,n){return t=Dj(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Dj(e){var t=Oj(e,`string`);return bj(t)==`symbol`?t:t+``}function Oj(e,t){if(bj(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(bj(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var kj=function(e,t,n,r,i){var a=e.width,o=e.height,s=e.layout,c=e.children,l=Object.keys(t),u={left:n.left,leftMirror:n.left,right:a-n.right,rightMirror:a-n.right,top:n.top,topMirror:n.top,bottom:o-n.bottom,bottomMirror:o-n.bottom},d=!!Kc(c,yj);return l.reduce(function(a,o){var c=t[o],l=c.orientation,f=c.domain,p=c.padding,m=p===void 0?{}:p,h=c.mirror,g=c.reversed,_=`${l}${h?`Mirror`:``}`,v,y,b,x,S;if(c.type===`number`&&(c.padding===`gap`||c.padding===`no-gap`)){var C=f[1]-f[0],w=1/0,T=c.categoricalDomain.sort(Cc);if(T.forEach(function(e,t){t>0&&(w=Math.min((e||0)-(T[t-1]||0),w))}),Number.isFinite(w)){var E=w/C,D=c.layout===`vertical`?n.height:n.width;if(c.padding===`gap`&&(v=E*D/2),c.padding===`no-gap`){var O=vc(e.barCategoryGap,E*D),k=E*D/2;v=k-O-(k-O)/D*O}}}y=r===`xAxis`?[n.left+(m.left||0)+(v||0),n.left+n.width-(m.right||0)-(v||0)]:r===`yAxis`?s===`horizontal`?[n.top+n.height-(m.bottom||0),n.top+(m.top||0)]:[n.top+(m.top||0)+(v||0),n.top+n.height-(m.bottom||0)-(v||0)]:c.range,g&&(y=[y[1],y[0]]);var A=YC(c,i,d),j=A.scale,M=A.realScaleType;j.domain(f).range(y),ZC(j);var N=rw(j,Tj(Tj({},c),{},{realScaleType:M}));r===`xAxis`?(S=l===`top`&&!h||l===`bottom`&&h,b=n.left,x=u[_]-S*c.height):r===`yAxis`&&(S=l===`left`&&!h||l===`right`&&h,b=u[_]-S*c.width,x=n.top);var ee=Tj(Tj(Tj({},c),N),{},{realScaleType:M,x:b,y:x,scale:j,width:r===`xAxis`?n.width:c.width,height:r===`yAxis`?n.height:c.height});return ee.bandSize=fw(ee,N),!c.hide&&r===`xAxis`?u[_]+=(S?-1:1)*ee.height:c.hide||(u[_]+=(S?-1:1)*ee.width),Tj(Tj({},a),{},Ej({},o,ee))},{})},Aj=function(e,t){var n=e.x,r=e.y,i=t.x,a=t.y;return{x:Math.min(n,i),y:Math.min(r,a),width:Math.abs(i-n),height:Math.abs(a-r)}},jj=function(e){var t=e.x1,n=e.y1,r=e.x2,i=e.y2;return Aj({x:t,y:n},{x:r,y:i})},Mj=function(){function e(t){xj(this,e),this.scale=t}return Cj(e,[{key:`domain`,get:function(){return this.scale.domain}},{key:`range`,get:function(){return this.scale.range}},{key:`rangeMin`,get:function(){return this.range()[0]}},{key:`rangeMax`,get:function(){return this.range()[1]}},{key:`bandwidth`,get:function(){return this.scale.bandwidth}},{key:`apply`,value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.bandAware,r=t.position;if(e!==void 0){if(r)switch(r){case`start`:return this.scale(e);case`middle`:var i=this.bandwidth?this.bandwidth()/2:0;return this.scale(e)+i;case`end`:var a=this.bandwidth?this.bandwidth():0;return this.scale(e)+a;default:return this.scale(e)}if(n){var o=this.bandwidth?this.bandwidth()/2:0;return this.scale(e)+o}return this.scale(e)}}}
62,{key:`isInRange`,value:function(e){var t=this.range(),n=t[0],r=t[t.length-1];return n<=r?e>=n&&e<=r:e>=r&&e<=n}}],[{key:`create`,value:function(t){return new e(t)}}])}();Ej(Mj,`EPS`,1e-4);var Nj=function(e){var t=Object.keys(e).reduce(function(t,n){return Tj(Tj({},t),{},Ej({},n,Mj.create(e[n])))},{});return Tj(Tj({},t),{},{apply:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.bandAware,i=n.position;return(0,RA.default)(e,function(e,n){return t[n].apply(e,{bandAware:r,position:i})})},isInRange:function(e){return(0,zA.default)(e,function(e,n){return t[n].isInRange(e)})}})};function Pj(e){return(e%180+180)%180}var Fj=function(e){var t=e.width,n=e.height,r=Pj(arguments.length>1&&arguments[1]!==void 0?arguments[1]:0)*Math.PI/180,i=Math.atan(n/t),a=r>i&&r<Math.PI-i?n/Math.sin(r):t/Math.cos(r);return Math.abs(a)},Ij=n(((e,t)=>{var n=Mf(),r=cf(),i=lf();function a(e){return function(t,a,o){var s=Object(t);if(!r(t)){var c=n(a,3);t=i(t),a=function(e){return c(s[e],e,s)}}var l=e(t,a,o);return l>-1?s[c?t[l]:l]:void 0}}t.exports=a})),Lj=n(((e,t)=>{var n=$k();function r(e){var t=n(e),r=t%1;return t===t?r?t-r:t:0}t.exports=r})),Rj=n(((e,t)=>{var n=Nf(),r=Mf(),i=Lj(),a=Math.max;function o(e,t,o){var s=e==null?0:e.length;if(!s)return-1;var c=o==null?0:i(o);return c<0&&(c=a(s+c,0)),n(e,r(t,3),c)}t.exports=o})),zj=n(((e,t)=>{t.exports=Ij()(Rj())})),Bj=e(jA());zj();var Vj=(0,FT.default)(function(e){return{x:e.left,y:e.top,width:e.width,height:e.height}},function(e){return[`l`,e.left,`t`,e.top,`w`,e.width,`h`,e.height].join(``)}),Hj=(0,f.createContext)(void 0),Uj=(0,f.createContext)(void 0),Wj=(0,f.createContext)(void 0),Gj=(0,f.createContext)({}),Kj=(0,f.createContext)(void 0),qj=(0,f.createContext)(0),Jj=(0,f.createContext)(0),Yj=function(e){var t=e.state,n=t.xAxisMap,r=t.yAxisMap,i=t.offset,a=e.clipPathId,o=e.children,s=e.width,c=e.height,l=Vj(i);return f.createElement(Hj.Provider,{value:n},f.createElement(Uj.Provider,{value:r},f.createElement(Gj.Provider,{value:i},f.createElement(Wj.Provider,{value:l},f.createElement(Kj.Provider,{value:a},f.createElement(qj.Provider,{value:c},f.createElement(Jj.Provider,{value:s},o)))))))},Xj=function(){return(0,f.useContext)(Kj)},Zj=function(e){var t=(0,f.useContext)(Hj);t??WS(!1);var n=t[e];return n??WS(!1),n},Qj=function(e){var t=(0,f.useContext)(Uj);t??WS(!1);var n=t[e];return n??WS(!1),n},$j=function(){return(0,f.useContext)(Wj)},eM=function(){return(0,f.useContext)(Jj)},tM=function(){return(0,f.useContext)(qj)};function nM(e){"@babel/helpers - typeof";return nM=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},nM(e)}function rM(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function iM(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,gM(r.key),r)}}function aM(e,t,n){return t&&iM(e.prototype,t),n&&iM(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}
62function oM(e,t,n){return t=uM(t),sM(e,lM()?Reflect.construct(t,n||[],uM(e).constructor):t.apply(e,n))}function sM(e,t){if(t&&(nM(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return cM(e)}function cM(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function lM(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(lM=function(){return!!e})()}function uM(e){return uM=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},uM(e)}function dM(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&fM(e,t)}function fM(e,t){return fM=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},fM(e,t)}function pM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function mM(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?pM(Object(n),!0).forEach(function(t){hM(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pM(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function hM(e,t,n){return t=gM(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gM(e){var t=_M(e,`string`);return nM(t)==`symbol`?t:t+``}function _M(e,t){if(nM(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(nM(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function vM(e,t){return CM(e)||SM(e,t)||bM(e,t)||yM()}function yM(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
63In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function bM(e,t){if(e){if(typeof e==`string`)return xM(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return xM(e,t)}}function xM(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function SM(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function CM(e){if(Array.isArray(e))return e}function wM(){return wM=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},wM.apply(this,arguments)}var TM=function(e,t){return f.isValidElement(e)?f.cloneElement(e,t):(0,U.default)(e)?e(t):f.createElement(`line`,wM({},t,{className:`recharts-reference-line-line`}))},EM=function(e,t,n,r,i,a,o,s,c){var l=i.x,u=i.y,d=i.width,f=i.height;if(n){var p=c.y,m=e.y.apply(p,{position:a});if(MA(c,`discard`)&&!e.y.isInRange(m))return null;var h=[{x:l+d,y:m},{x:l,y:m}];return s===`left`?h.reverse():h}if(t){var g=c.x,_=e.x.apply(g,{position:a});if(MA(c,`discard`)&&!e.x.isInRange(_))return null;var v=[{x:_,y:u+f},{x:_,y:u}];return o===`top`?v.reverse():v}if(r){var y=c.segment.map(function(t){return e.apply(t,{position:a})});return MA(c,`discard`)&&(0,Bj.default)(y,function(t){return!e.isInRange(t)})?null:y}return null};function DM(e){var t=e.x,n=e.y,r=e.segment,i=e.xAxisId,a=e.yAxisId,o=e.shape,s=e.className;e.alwaysShow;var c=Xj(),u=Zj(i),d=Qj(a),p=$j();if(!c||!p)return null;var m=EM(Nj({x:u.scale,y:d.scale}),H(t),H(n),r&&r.length===2,p,e.position,u.orientation,d.orientation,e);if(!m)return null;var h=vM(m,2),g=h[0],_=g.x,v=g.y,y=h[1],b=y.x,x=y.y,S=mM(mM({clipPath:MA(e,`hidden`)?`url(#${c})`:void 0},W(e,!0)),{},{x1:_,y1:v,x2:b,y2:x});return f.createElement(dl,{className:l(`recharts-reference-line`,s)},TM(o,S),Zw.renderCallByParent(e,jj({x1:_,y1:v,x2:b,y2:x})))}var OM=function(e){function t(){return rM(this,t),oM(this,t,arguments)}return dM(t,e),aM(t,[{key:`render`,value:function(){return f.createElement(DM,this.props)}}])}(f.Component);hM(OM,`displayName`,`ReferenceLine`),hM(OM,`defaultProps`,{isFront:!1,ifOverflow:`discard`,xAxisId:0,yAxisId:0,fill:`none`,stroke:`#ccc`,fillOpacity:1,strokeWidth:1,position:`middle`});function kM(){return kM=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},kM.apply(this,arguments)}function AM(e){"@babel/helpers - typeof";return AM=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},AM(e)}function jM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function MM(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];
63t%2?jM(Object(n),!0).forEach(function(t){UM(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jM(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function NM(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function PM(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,WM(r.key),r)}}function FM(e,t,n){return t&&PM(e.prototype,t),n&&PM(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function IM(e,t,n){return t=BM(t),LM(e,zM()?Reflect.construct(t,n||[],BM(e).constructor):t.apply(e,n))}function LM(e,t){if(t&&(AM(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return RM(e)}function RM(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function zM(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(zM=function(){return!!e})()}function BM(e){return BM=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},BM(e)}function VM(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&HM(e,t)}function HM(e,t){return HM=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},HM(e,t)}function UM(e,t,n){return t=WM(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function WM(e){var t=GM(e,`string`);return AM(t)==`symbol`?t:t+``}function GM(e,t){if(AM(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(AM(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var KM=function(e){var t=e.x,n=e.y,r=e.xAxis,i=e.yAxis,a=Nj({x:r.scale,y:i.scale}),o=a.apply({x:t,y:n},{bandAware:!0});return MA(e,`discard`)&&!a.isInRange(o)?null:o},qM=function(e){function t(){return NM(this,t),IM(this,t,arguments)}return VM(t,e),FM(t,[{key:`render`,value:function(){var e=this.props,n=e.x,r=e.y,i=e.r;e.alwaysShow;var a=e.clipPathId,o=H(n),s=H(r);if(!o||!s)return null;var c=KM(this.props);if(!c)return null;var u=c.x,d=c.y,p=this.props,m=p.shape,h=p.className,g=MM(MM({clipPath:MA(this.props,`hidden`)?`url(#${a})`:void 0},W(this.props,!0)),{},{cx:u,cy:d});return f.createElement(dl,{className:l(`recharts-reference-dot`,h)},t.renderDot(m,g),Zw.renderCallByParent(this.props,{x:u-i,y:d-i,width:2*i,height:2*i}))}}])}(f.Component);UM(qM,`displayName`,`ReferenceDot`),UM(qM,`defaultProps`,{isFront:!1,ifOverflow:`discard`,xAxisId:0,yAxisId:0,r:10,fill:`#fff`,stroke:`#ccc`,fillOpacity:1,strokeWidth:1}),UM(qM,`renderDot`,function(e,t){return f.isValidElement(e)?f.cloneElement(e,t):(0,U.default)(e)?e(t):f.createElement(JO,kM({},t,{cx:t.cx,cy:t.cy,className:`recharts-reference-dot-dot`}))});function JM(){return JM=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},JM.apply(this,arguments)}function YM(e){"@babel/helpers - typeof";return YM=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},YM(e)}function XM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ZM(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];
63t%2?XM(Object(n),!0).forEach(function(t){cN(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):XM(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function QM(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function $M(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,lN(r.key),r)}}function eN(e,t,n){return t&&$M(e.prototype,t),n&&$M(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function tN(e,t,n){return t=aN(t),nN(e,iN()?Reflect.construct(t,n||[],aN(e).constructor):t.apply(e,n))}function nN(e,t){if(t&&(YM(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return rN(e)}function rN(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function iN(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(iN=function(){return!!e})()}function aN(e){return aN=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},aN(e)}function oN(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&sN(e,t)}function sN(e,t){return sN=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},sN(e,t)}function cN(e,t,n){return t=lN(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lN(e){var t=uN(e,`string`);return YM(t)==`symbol`?t:t+``}function uN(e,t){if(YM(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(YM(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var dN=function(e,t,n,r,i){var a=i.x1,o=i.x2,s=i.y1,c=i.y2,l=i.xAxis,u=i.yAxis;if(!l||!u)return null;var d=Nj({x:l.scale,y:u.scale}),f={x:e?d.x.apply(a,{position:`start`}):d.x.rangeMin,y:n?d.y.apply(s,{position:`start`}):d.y.rangeMin},p={x:t?d.x.apply(o,{position:`end`}):d.x.rangeMax,y:r?d.y.apply(c,{position:`end`}):d.y.rangeMax};return MA(i,`discard`)&&(!d.isInRange(f)||!d.isInRange(p))?null:Aj(f,p)},fN=function(e){function t(){return QM(this,t),tN(this,t,arguments)}return oN(t,e),eN(t,[{key:`render`,value:function(){var e=this.props,n=e.x1,r=e.x2,i=e.y1,a=e.
63y2,o=e.className;e.alwaysShow;var s=e.clipPathId,c=H(n),u=H(r),d=H(i),p=H(a),m=this.props.shape;if(!c&&!u&&!d&&!p&&!m)return null;var h=dN(c,u,d,p,this.props);if(!h&&!m)return null;var g=MA(this.props,`hidden`)?`url(#${s})`:void 0;return f.createElement(dl,{className:l(`recharts-reference-area`,o)},t.renderRect(m,ZM(ZM({clipPath:g},W(this.props,!0)),h)),Zw.renderCallByParent(this.props,h))}}])}(f.Component);cN(fN,`displayName`,`ReferenceArea`),cN(fN,`defaultProps`,{isFront:!1,ifOverflow:`discard`,xAxisId:0,yAxisId:0,r:10,fill:`#ccc`,fillOpacity:.5,stroke:`none`,strokeWidth:1}),cN(fN,`renderRect`,function(e,t){return f.isValidElement(e)?f.cloneElement(e,t):(0,U.default)(e)?e(t):f.createElement(KO,JM({},t,{className:`recharts-reference-area-rect`}))});function pN(e,t,n){if(t<1)return[];if(t===1&&n===void 0)return e;for(var r=[],i=0;i<e.length;i+=t)if(n===void 0||n(e[i])===!0)r.push(e[i]);else return;return r}function mN(e,t,n){return Fj({width:e.width+t.width,height:e.height+t.height},n)}function hN(e,t,n){var r=n===`width`,i=e.x,a=e.y,o=e.width,s=e.height;return t===1?{start:r?i:a,end:r?i+o:a+s}:{start:r?i+o:a+s,end:r?i:a}}function gN(e,t,n,r,i){if(e*t<e*r||e*t>e*i)return!1;var a=n();return e*(t-e*a/2-r)>=0&&e*(t+e*a/2-i)<=0}function _N(e,t){return pN(e,t+1)}function vN(e,t,n,r,i){for(var a=(r||[]).slice(),o=t.start,s=t.end,c=0,l=1,u=o,d=function(){var t=r?.[c];if(t===void 0)return{v:pN(r,l)};var a=c,d,f=function(){return d===void 0&&(d=n(t,a)),d},p=t.coordinate,m=c===0||gN(e,p,f,u,s);m||(c=0,u=o,l+=1),m&&(u=p+e*(f()/2+i),c+=l)},f;l<=a.length;)if(f=d(),f)return f.v;return[]}function yN(e){"@babel/helpers - typeof";return yN=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},yN(e)}function bN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function xN(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?bN(Object(n),!0).forEach(function(t){SN(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bN(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function SN(e,t,n){return t=CN(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function CN(e){var t=wN(e,`string`);return yN(t)==`symbol`?t:t+``}function wN(e,t){if(yN(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(yN(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function TN(e,t,n,r,i){for(var a=(r||[]).slice(),o=a.length,s=t.start,c=t.end,l=function(t){var r=a[t],l,u=function(){return l===void 0&&(l=n(r,t)),l};if(t===o-1){var d=e*(r.coordinate+e*u()/2-c);a[t]=r=xN(xN({},r),{},{tickCoord:d>0?r.coordinate-d*e:r.coordinate})}else a[t]=r=xN(xN({},r),{},{tickCoord:r.coordinate});gN(e,r.tickCoord,u,s,c)&&(c=r.tickCoord-e*(u()/2+i),a[t]=xN(xN({},r),{},{isShow:!0}))},u=o-1;u>=0;u--)l(u);return a}function EN(e,t,n,r,i,a){var o=(r||[]).slice(),s=o.length,c=t.start,l=t.end;if(a){var u=r[s-1],d=n(u,s-1),f=e*(u.coordinate+e*d/2-l);o[s-1]=u=xN(xN({},u),{},{tickCoord:f>0?u.coordinate-f*e:u.coordinate}),gN(e,u.tickCoord,function(){return d},c,l)&&(l=u.tickCoord-e*(d/2+i),o[s-1]=xN(xN({},u),{},{isShow:!0}))}for(var p=a?s-1:s,m=function(t){var r=o[t],a,s=function(){return a===void 0&&(a=n(r,t)),a};if(t===0){var u=e*(r.coordinate-e*s()/2-c);o[t]=r=xN(xN({},r),{},{tickCoord:u<0?r.coordinate-u*e:r.coordinate})}else o[t]=r=xN(xN({},r),{},{tickCoord:r.coordinate});gN(e,r.tickCoord,s,c,l)&&(c=r.tickCoord+e*(s()/2+i),o[t]=xN(xN({},r),{},{isShow:!0}))},h=0;h<p;h++)m(h);return o}function DN(e,t,n){var r=e.tick,i=e.ticks,a=e.viewBox,o=e.minTickGap,s=e.orientation,c=e.interval,l=e.tickFormatter,u=e.unit,d=e.angle;if(!i||!i.length||!r)return[];if(V(c)||wm.isSsr)return _N(i,typeof c==`number`&&V(c)?c:0);var f=[],p=s===`top`||s===`bottom`?`width`:`height`,m=u&&p===`width`?xh(u,{fontSize:t,letterSpacing:n}):{width:0,height:0},h=function(e,r){var i=(0,U.default)(l)?l(e.value,r):e.value;return p===`width`?mN(xh(i,{fontSize:t,letterSpacing:n}),m,d):xh(i,{fontSize:t,letterSpacing:n})[p]},g=i.length>=2?pc(i[1].coordinate-i[0].coordinate):1,_=hN(a,g,p);return c===`equidistantPreserveStart`?vN(g,_,h,i,o):(f=c===`preserveStart`||c===`preserveStartEnd`?EN(g,_,h,i,o,c===`preserveStartEnd`):TN(g,_,h,i,o),f.filter(function(e){return e.isShow}))}
63var ON=[`viewBox`],kN=[`viewBox`],AN=[`ticks`];function jN(e){"@babel/helpers - typeof";return jN=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},jN(e)}function MN(){return MN=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},MN.apply(this,arguments)}function NN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function PN(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?NN(Object(n),!0).forEach(function(t){qN(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):NN(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function FN(e,t){if(e==null)return{};var n=IN(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function IN(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function LN(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function RN(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,JN(r.key),r)}}function zN(e,t,n){return t&&RN(e.prototype,t),n&&RN(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function BN(e,t,n){return t=WN(t),VN(e,UN()?Reflect.construct(t,n||[],WN(e).constructor):t.apply(e,n))}function VN(e,t){if(t&&(jN(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return HN(e)}function HN(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function UN(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(UN=function(){return!!e})()}
63function WN(e){return WN=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},WN(e)}function GN(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&KN(e,t)}function KN(e,t){return KN=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},KN(e,t)}function qN(e,t,n){return t=JN(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function JN(e){var t=YN(e,`string`);return jN(t)==`symbol`?t:t+``}function YN(e,t){if(jN(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(jN(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var XN=function(e){function t(e){var n;return LN(this,t),n=BN(this,t,[e]),n.state={fontSize:``,letterSpacing:``},n}return GN(t,e),zN(t,[{key:`shouldComponentUpdate`,value:function(e,t){var n=e.viewBox,r=FN(e,ON),i=this.props,a=i.viewBox,o=FN(i,kN);return!Ec(n,a)||!Ec(r,o)||!Ec(t,this.state)}},{key:`componentDidMount`,value:function(){var e=this.layerReference;if(e){var t=e.getElementsByClassName(`recharts-cartesian-axis-tick-value`)[0];t&&this.setState({fontSize:window.getComputedStyle(t).fontSize,letterSpacing:window.getComputedStyle(t).letterSpacing})}}},{key:`getTickLineCoord`,value:function(e){var t=this.props,n=t.x,r=t.y,i=t.width,a=t.height,o=t.orientation,s=t.tickSize,c=t.mirror,l=t.tickMargin,u,d,f,p,m,h,g=c?-1:1,_=e.tickSize||s,v=V(e.tickCoord)?e.tickCoord:e.coordinate;switch(o){case`top`:u=d=e.coordinate,p=r+ +!c*a,f=p-g*_,h=f-g*l,m=v;break;case`left`:f=p=e.coordinate,d=n+ +!c*i,u=d-g*_,m=u-g*l,h=v;break;case`right`:f=p=e.coordinate,d=n+ +c*i,u=d+g*_,m=u+g*l,h=v;break;default:u=d=e.coordinate,p=r+ +c*a,f=p+g*_,h=f+g*l,m=v}return{line:{x1:u,y1:f,x2:d,y2:p},tick:{x:m,y:h}}}},{key:`getTickTextAnchor`,value:function(){var e=this.props,t=e.orientation,n=e.mirror,r;switch(t){case`left`:r=n?`start`:`end`;break;case`right`:r=n?`end`:`start`;break;default:r=`middle`}return r}},{key:`getTickVerticalAnchor`,value:function(){var e=this.props,t=e.orientation,n=e.mirror,r=`end`;switch(t){case`left`:case`right`:r=`middle`;break;case`top`:r=n?`start`:`end`;break;default:r=n?`end`:`start`}return r}},{key:`renderAxisLine`,value:function(){var e=this.props,t=e.x,n=e.y,r=e.width,i=e.height,a=e.orientation,o=e.mirror,s=e.axisLine,c=PN(PN(PN({},W(this.props,!1)),W(s,!1)),{},{fill:`none`});if(a===`top`||a===`bottom`){var u=+(a===`top`&&!o||a===`bottom`&&o);c=PN(PN({},c),{},{x1:t,y1:n+u*i,x2:t+r,y2:n+u*i})}else{var d=+(a===`left`&&!o||a===`right`&&o);c=PN(PN({},c),{},{x1:t+d*r,y1:n,x2:t+d*r,y2:n+i})}return f.createElement(`line`,MN({},c,{className:l(`recharts-cartesian-axis-line`,(0,dc.default)(s,`className`))}))}},{key:`renderTicks`,value:function(e,n,r){var i=this,a=this.props,o=a.tickLine,s=a.stroke,c=a.tick,u=a.tickFormatter,d=a.unit,p=DN(PN(PN({},this.props),{},{ticks:e}),n,r),m=this.getTickTextAnchor(),h=this.getTickVerticalAnchor(),g=W(this.props,!1),_=W(c,!1),v=PN(PN({},g),{},{fill:`none`},W(o,!1)),y=p.map(function(e,n){var r=i.getTickLineCoord(e),a=r.line,y=r.tick,b=PN(PN(PN(PN({textAnchor:m,verticalAnchor:h},g),{},{stroke:`none`,fill:s},_),y),{},{index:n,payload:e,visibleTicksCount:p.length,tickFormatter:u});return f.createElement(dl,MN({className:`recharts-cartesian-axis-tick`,key:`tick-${e.value}-${e.coordinate}-${e.tickCoord}`},Fc(i.props,e,n)),o&&f.createElement(`line`,MN({},v,a,{className:l(`recharts-cartesian-axis-tick-line`,(0,dc.default)(o,`className`))})),c&&t.renderTickItem(c,b,`${(0,U.default)(u)?u(e.value,n):e.value}${d||``}`))});return f.createElement(`g`,{className:`recharts-cartesian-axis-ticks`},y)}},{key:`render`,value:function(){var e=this,t=this.props,n=t.axisLine,r=t.width,i=t.height,a=t.ticksGenerator,o=t.className;if(t.hide)return null;var s=this.props,c=s.ticks,u=FN(s,AN),d=c;return(0,U.default)(a)&&(d=c&&c.length>0?a(this.props):a(u)),r<=0||i<=0||!d||!d.length?null:f.createElement(dl,{className:l(`recharts-cartesian-axis`,o),ref:function(t){e.layerReference=t}},n&&this.renderAxisLine(),this.renderTicks(d,this.state.fontSize,this.state.letterSpacing),Zw.renderCallByParent(this.props))}}],[{key:`renderTickItem`,value:function(e,t,n){var r,i=l(t.className,`recharts-cartesian-axis-tick-value`);return r=f.isValidElement(e)?f.cloneElement(e,PN(PN({},t),{},{className:i})):(0,U.default)(e)?e(PN(PN({},t),{},{className:i})):f.createElement(pg,MN({},t,{className:`recharts-cartesian-axis-tick-value`}),n),r}}])}(f.Component);qN(XN,`displayName`,`CartesianAxis`),qN(XN,`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
63:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:`preserveEnd`});function ZN(e){"@babel/helpers - typeof";return ZN=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},ZN(e)}function QN(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function $N(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,lP(r.key),r)}}function eP(e,t,n){return t&&$N(e.prototype,t),n&&$N(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function tP(e,t,n){return t=aP(t),nP(e,iP()?Reflect.construct(t,n||[],aP(e).constructor):t.apply(e,n))}function nP(e,t){if(t&&(ZN(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return rP(e)}function rP(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function iP(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(iP=function(){return!!e})()}function aP(e){return aP=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},aP(e)}function oP(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&sP(e,t)}function sP(e,t){return sP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},sP(e,t)}function cP(e,t,n){return t=lP(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lP(e){var t=uP(e,`string`);return ZN(t)==`symbol`?t:t+``}function uP(e,t){if(ZN(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(ZN(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function dP(){return dP=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},dP.apply(this,arguments)}function fP(e){var t=e.xAxisId,n=eM(),r=tM(),i=Zj(t);return i==null?null:f.createElement(XN,dP({},i,{className:l(`recharts-${i.axisType} ${i.axisType}`,i.className),viewBox:{x:0,y:0,width:n,height:r},ticksGenerator:function(e){return KC(e,!0)}}))}var pP=function(e){function t(){return QN(this,t),tP(this,t,arguments)}return oP(t,e),eP(t,[{key:`render`,value:function(){return f.createElement(fP,this.props)}}])}(f.Component);cP(pP,`displayName`,`XAxis`),cP(pP,`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 mP(e){"@babel/helpers - typeof";return mP=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},mP(e)}function hP(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function gP(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,EP(r.key),r)}}function _P(e,t,n){return t&&gP(e.prototype,t),n&&gP(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function vP(e,t,n){return t=SP(t),yP(e,xP()?Reflect.construct(t,n||[],SP(e).constructor):t.apply(e,n))}function yP(e,t){if(t&&(mP(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return bP(e)}function bP(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function xP(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(xP=function(){return!!e})()}function SP(e){return SP=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},SP(e)}function CP(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&wP(e,t)}function wP(e,t){return wP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},wP(e,t)}function TP(e,t,n){return t=EP(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function EP(e){var t=DP(e,`string`);return mP(t)==`symbol`?t:t+``}function DP(e,t){if(mP(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(mP(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function OP(){return OP=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},OP.apply(this,arguments)}var kP=function(e){var t=e.yAxisId,n=eM(),r=tM(),i=Qj(t);return i==null?null:f.createElement(XN,OP({},i,{className:l(`recharts-${i.axisType} ${i.axisType}`,i.className),viewBox:{x:0,y:0,width:n,height:r},ticksGenerator:function(e){return KC(e,!0)}}))},AP=function(e){function t(){return hP(this,t),vP(this,t,arguments)}return CP(t,e),_P(t,[{key:`render`,value:function(){return f.createElement(kP,this.props)}}])}(f.Component);TP(AP,`displayName`,`YAxis`),TP(AP,`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 jP(e){return FP(e)||PP(e)||NP(e)||MP()}function MP(){throw TypeError(`Invalid attempt to spread non-iterable instance.
64In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function NP(e,t){if(e){if(typeof e==`string`)return IP(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return IP(e,t)}}function PP(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function FP(e){if(Array.isArray(e))return IP(e)}function IP(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var LP=function(e,t,n,r,i){var a=Gc(e,OM),o=Gc(e,qM),s=[].concat(jP(a),jP(o)),c=Gc(e,fN),l=`${r}Id`,u=r[0],d=t;if(s.length&&(d=s.reduce(function(e,t){if(t.props[l]===n&&MA(t.props,`extendDomain`)&&V(t.props[u])){var r=t.props[u];return[Math.min(e[0],r),Math.max(e[1],r)]}return e},d)),c.length){var f=`${u}1`,p=`${u}2`;d=c.reduce(function(e,t){if(t.props[l]===n&&MA(t.props,`extendDomain`)&&V(t.props[f])&&V(t.props[p])){var r=t.props[f],i=t.props[p];return[Math.min(e[0],r,i),Math.max(e[1],r,i)]}return e},d)}return i&&i.length&&(d=i.reduce(function(e,t){return V(t)?[Math.min(e[0],t),Math.max(e[1],t)]:e},d)),d},RP=new(e(n(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=`~`;function i(){}Object.create&&(i.prototype=Object.create(null),new i().__proto__||(r=!1));function a(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function o(e,t,n,i,o){if(typeof n!=`function`)throw TypeError(`The listener must be a function`);var s=new a(n,i||e,o),c=r?r+t:t;return e._events[c]?e._events[c].fn?e._events[c]=[e._events[c],s]:e._events[c].push(s):(e._events[c]=s,e._eventsCount++),e}function s(e,t){--e._eventsCount===0?e._events=new i:delete e._events[t]}function c(){this._events=new i,this._eventsCount=0}c.prototype.eventNames=function(){var e=[],t,i;if(this._eventsCount===0)return e;for(i in t=this._events)n.call(t,i)&&e.push(r?i.slice(1):i);return Object.getOwnPropertySymbols?e.concat(Object.getOwnPropertySymbols(t)):e},c.prototype.listeners=function(e){var t=r?r+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,a=n.length,o=Array(a);i<a;i++)o[i]=n[i].fn;return o},c.prototype.listenerCount=function(e){var t=r?r+e:e,n=this._events[t];return n?n.fn?1:n.length:0},c.prototype.emit=function(e,t,n,i,a,o){var s=r?r+e:e;if(!this._events[s])return!1;var c=this._events[s],l=arguments.length,u,d;
64if(c.fn){switch(c.once&&this.removeListener(e,c.fn,void 0,!0),l){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,t),!0;case 3:return c.fn.call(c.context,t,n),!0;case 4:return c.fn.call(c.context,t,n,i),!0;case 5:return c.fn.call(c.context,t,n,i,a),!0;case 6:return c.fn.call(c.context,t,n,i,a,o),!0}for(d=1,u=Array(l-1);d<l;d++)u[d-1]=arguments[d];c.fn.apply(c.context,u)}else{var f=c.length,p;for(d=0;d<f;d++)switch(c[d].once&&this.removeListener(e,c[d].fn,void 0,!0),l){case 1:c[d].fn.call(c[d].context);break;case 2:c[d].fn.call(c[d].context,t);break;case 3:c[d].fn.call(c[d].context,t,n);break;case 4:c[d].fn.call(c[d].context,t,n,i);break;default:if(!u)for(p=1,u=Array(l-1);p<l;p++)u[p-1]=arguments[p];c[d].fn.apply(c[d].context,u)}}return!0},c.prototype.on=function(e,t,n){return o(this,e,t,n,!1)},c.prototype.once=function(e,t,n){return o(this,e,t,n,!0)},c.prototype.removeListener=function(e,t,n,i){var a=r?r+e:e;if(!this._events[a])return this;if(!t)return s(this,a),this;var o=this._events[a];if(o.fn)o.fn===t&&(!i||o.once)&&(!n||o.context===n)&&s(this,a);else{for(var c=0,l=[],u=o.length;c<u;c++)(o[c].fn!==t||i&&!o[c].once||n&&o[c].context!==n)&&l.push(o[c]);l.length?this._events[a]=l.length===1?l[0]:l:s(this,a)}return this},c.prototype.removeAllListeners=function(e){var t;return e?(t=r?r+e:e,this._events[t]&&s(this,t)):(this._events=new i,this._eventsCount=0),this},c.prototype.off=c.prototype.removeListener,c.prototype.addListener=c.prototype.on,c.prefixed=r,c.EventEmitter=c,t!==void 0&&(t.exports=c)}))())).default,zP=`recharts.syncMouseEvents`;function BP(e){"@babel/helpers - typeof";return BP=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},BP(e)}function VP(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function HP(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,GP(r.key),r)}}function UP(e,t,n){return t&&HP(e.prototype,t),n&&HP(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function WP(e,t,n){return t=GP(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function GP(e){var t=KP(e,`string`);return BP(t)==`symbol`?t:t+``}function KP(e,t){if(BP(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(BP(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var qP=function(){function e(){VP(this,e),WP(this,`activeIndex`,0),WP(this,`coordinateList`,[]),WP(this,`layout`,`horizontal`)}return UP(e,[{key:`setDetails`,value:function(e){var t=e.coordinateList,n=t===void 0?null:t,r=e.container,i=r===void 0?null:r,a=e.layout,o=a===void 0?null:a,s=e.offset,c=s===void 0?null:s,l=e.mouseHandlerCallback,u=l===void 0?null:l;this.coordinateList=n??this.coordinateList??[],this.container=i??this.container,this.layout=o??this.layout,this.offset=c??this.offset,this.mouseHandlerCallback=u??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(e){if(this.coordinateList.length!==0)switch(e.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()}}},{key:`setIndex`,value:function(e){this.activeIndex=e}},{key:`spoofMouse`,value:function(){if(this.layout===`horizontal`&&this.coordinateList.length!==0){var e=this.container.getBoundingClientRect(),t=e.x,n=e.y,r=e.height,i=this.coordinateList[this.activeIndex].coordinate,a=window?.scrollX||0,o=window?.scrollY||0,s=t+i+a,c=n+this.offset.top+r/2+o;this.mouseHandlerCallback({pageX:s,pageY:c})}}}])}();function JP(e,t,n){if(n===`number`&&t===!0&&Array.isArray(e)){var r=e?.[0],i=e?.[1];if(r&&i&&V(r)&&V(i))return!0}return!1}function YP(e,t,n,r){var i=r/2;return{stroke:`none`,fill:`#ccc`,x:e===`horizontal`?t.x-i:n.left+.5,y:e===`horizontal`?n.top+.5:t.y-i,width:e===`horizontal`?r:n.width-1,height:e===`horizontal`?n.height-1:r}}
64function XP(e){var t=e.cx,n=e.cy,r=e.radius,i=e.startAngle,a=e.endAngle;return{points:[Cw(t,n,r,i),Cw(t,n,r,a)],cx:t,cy:n,radius:r,startAngle:i,endAngle:a}}function ZP(e,t,n){var r,i,a,o;if(e===`horizontal`)r=t.x,a=r,i=n.top,o=n.top+n.height;else if(e===`vertical`)i=t.y,o=i,r=n.left,a=n.left+n.width;else if(t.cx!=null&&t.cy!=null)if(e===`centric`){var s=t.cx,c=t.cy,l=t.innerRadius,u=t.outerRadius,d=t.angle,f=Cw(s,c,l,d),p=Cw(s,c,u,d);r=f.x,i=f.y,a=p.x,o=p.y}else return XP(t);return[{x:r,y:i},{x:a,y:o}]}function QP(e){"@babel/helpers - typeof";return QP=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},QP(e)}function $P(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function eF(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?$P(Object(n),!0).forEach(function(t){tF(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$P(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function tF(e,t,n){return t=nF(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nF(e){var t=rF(e,`string`);return QP(t)==`symbol`?t:t+``}function rF(e,t){if(QP(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(QP(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function iF(e){var t=e.element,n=e.tooltipEventType,r=e.isActive,i=e.activeCoordinate,a=e.activePayload,o=e.offset,s=e.activeTooltipIndex,c=e.tooltipAxisBandSize,u=e.layout,d=e.chartName,p=t.props.cursor??t.type.defaultProps?.cursor;if(!t||!p||!r||!i||d!==`ScatterChart`&&n!==`axis`)return null;var m,h=YT;if(d===`ScatterChart`)m=i,h=ok;else if(d===`BarChart`)m=YP(u,i,o,c),h=KO;else if(u===`radial`){var g=XP(i),_=g.cx,v=g.cy,y=g.radius;m={cx:_,cy:v,startAngle:g.startAngle,endAngle:g.endAngle,innerRadius:y,outerRadius:y},h=PT}else m={points:ZP(u,i,o)},h=YT;var b=eF(eF(eF(eF({stroke:`#ccc`,pointerEvents:`none`},o),m),W(p,!1)),{},{payload:a,payloadIndex:s,className:l(`recharts-tooltip-cursor`,p.className)});return(0,f.isValidElement)(p)?(0,f.cloneElement)(p,b):(0,f.createElement)(h,b)}var aF=[`item`],oF=[`children`,`className`,`width`,`height`,`style`,`compact`,`title`,`desc`];function sF(e){"@babel/helpers - typeof";return sF=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},sF(e)}function cF(){return cF=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},cF.apply(this,arguments)}function lF(e,t){return fF(e)||dF(e,t)||DF(e,t)||uF()}function uF(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
65In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function dF(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function fF(e){if(Array.isArray(e))return e}function pF(e,t){if(e==null)return{};var n=mF(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function mF(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function hF(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function gF(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,MF(r.key),r)}}function _F(e,t,n){return t&&gF(e.prototype,t),n&&gF(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function vF(e,t,n){return t=SF(t),yF(e,xF()?Reflect.construct(t,n||[],SF(e).constructor):t.apply(e,n))}function yF(e,t){if(t&&(sF(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return bF(e)}function bF(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function xF(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(xF=function(){return!!e})()}
65function SF(e){return SF=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},SF(e)}function CF(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&wF(e,t)}function wF(e,t){return wF=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},wF(e,t)}function TF(e){return kF(e)||OF(e)||DF(e)||EF()}function EF(){throw TypeError(`Invalid attempt to spread non-iterable instance.
66In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function DF(e,t){if(e){if(typeof e==`string`)return AF(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return AF(e,t)}}function OF(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function kF(e){if(Array.isArray(e))return AF(e)}function AF(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function jF(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Q(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?jF(Object(n),!0).forEach(function(t){$(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jF(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function $(e,t,n){return t=MF(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function MF(e){var t=NF(e,`string`);return sF(t)==`symbol`?t:t+``}function NF(e,t){if(sF(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(sF(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var PF={xAxis:[`bottom`,`top`],yAxis:[`left`,`right`]},FF={width:`100%`,height:`100%`},IF={x:0,y:0};function LF(e){return e}var RF=function(e,t){return t===`horizontal`?e.x:t===`vertical`?e.y:t===`centric`?e.angle:e.radius},zF=function(e,t,n,r){var i=t.find(function(e){return e&&e.index===n});if(i){if(e===`horizontal`)return{x:i.coordinate,y:r.y};if(e===`vertical`)return{x:r.x,y:i.coordinate};if(e===`centric`){var a=i.coordinate,o=r.radius;return Q(Q(Q({},r),Cw(r.cx,r.cy,o,a)),{},{angle:a,radius:o})}var s=i.coordinate,c=r.angle;return Q(Q(Q({},r),Cw(r.cx,r.cy,s,c)),{},{angle:c,radius:s})}return IF},BF=function(e,t){var n=t.graphicalItems,r=t.dataStartIndex,i=t.dataEndIndex,a=(n??[]).reduce(function(e,t){var n=t.props.data;return n&&n.length?[].concat(TF(e),TF(n)):e},[]);return a.length>0?a:e&&e.length&&V(r)&&V(i)?e.slice(r,i+1):[]};function VF(e){return e===`number`?[0,`auto`]:void 0}var HF=function(e,t,n,r){var i=e.graphicalItems,a=e.tooltipAxis,o=BF(t,e);return n<0||!i||!i.length||n>=o.length?null:i.reduce(function(i,s){var c=s.props.data??t;c&&e.dataStartIndex+e.dataEndIndex!==0&&e.dataEndIndex-e.dataStartIndex>=n&&(c=c.slice(e.dataStartIndex,e.dataEndIndex+1));var l=a.dataKey&&!a.allowDuplicatedCategory?Sc(c===void 0?o:c,a.dataKey,r):c&&c[n]||o[n];return l?[].concat(TF(i),[mw(s,l)]):i},[])},UF=function(e,t,n,r){var i=r||{x:e.chartX,y:e.chartY},a=RF(i,n),o=e.orderedTooltipTicks,s=e.tooltipAxis,c=e.tooltipTicks,l=IC(a,o,c,s);if(l>=0&&c){var u=c[l]&&c[l].value;return{activeTooltipIndex:l,activeLabel:u,activePayload:HF(e,t,l,u),activeCoordinate:zF(n,o,l,i)}}return null},WF=function(e,t){var n=t.axes,r=t.graphicalItems,i=t.axisType,a=t.axisIdKey,o=t.stackGroups,s=t.dataStartIndex,c=t.dataEndIndex,l=e.layout,u=e.children,d=e.stackOffset,f=GC(l,i);
66return n.reduce(function(t,n){var p=n.type.defaultProps===void 0?n.props:Q(Q({},n.type.defaultProps),n.props),m=p.type,h=p.dataKey,g=p.allowDataOverflow,_=p.allowDuplicatedCategory,v=p.scale,y=p.ticks,b=p.includeHidden,x=p[a];if(t[x])return t;var S=BF(e.data,{graphicalItems:r.filter(function(e){return(a in e.props?e.props[a]:e.type.defaultProps?.[a])===x}),dataStartIndex:s,dataEndIndex:c}),C=S.length,w,T,E;JP(p.domain,g,m)&&(w=dw(p.domain,null,g),f&&(m===`number`||v!==`auto`)&&(E=FC(S,h,`category`)));var D=VF(m);if(!w||w.length===0){var O=p.domain??D;if(h){if(w=FC(S,h,m),m===`category`&&f){var k=bc(w);_&&k?(T=w,w=(0,tA.default)(0,C)):_||(w=pw(O,w,n).reduce(function(e,t){return e.indexOf(t)>=0?e:[].concat(TF(e),[t])},[]))}else if(m===`category`)w=_?w.filter(function(e){return e!==``&&!(0,B.default)(e)}):pw(O,w,n).reduce(function(e,t){return e.indexOf(t)>=0||t===``||(0,B.default)(t)?e:[].concat(TF(e),[t])},[]);else if(m===`number`){var A=UC(S,r.filter(function(e){var t=a in e.props?e.props[a]:e.type.defaultProps?.[a],n=`hide`in e.props?e.props.hide:e.type.defaultProps?.hide;return t===x&&(b||!n)}),h,i,l);A&&(w=A)}f&&(m===`number`||v!==`auto`)&&(E=FC(S,h,`category`))}else w=f?(0,tA.default)(0,C):o&&o[x]&&o[x].hasStack&&m===`number`?d===`expand`?[0,1]:cw(o[x].stackGroups,s,c):WC(S,r.filter(function(e){var t=a in e.props?e.props[a]:e.type.defaultProps[a],n=`hide`in e.props?e.props.hide:e.type.defaultProps.hide;return t===x&&(b||!n)}),m,l,!0);if(m===`number`)w=LP(u,w,x,i,y),O&&(w=dw(O,w,g));else if(m===`category`&&O){var j=O;w.every(function(e){return j.indexOf(e)>=0})&&(w=j)}}return Q(Q({},t),{},$({},x,Q(Q({},p),{},{axisType:i,domain:w,categoricalDomain:E,duplicateDomain:T,originalDomain:p.domain??D,isCategorical:f,layout:l})))},{})},GF=function(e,t){var n=t.graphicalItems,r=t.Axis,i=t.axisType,a=t.axisIdKey,o=t.stackGroups,s=t.dataStartIndex,c=t.dataEndIndex,l=e.layout,u=e.children,d=BF(e.data,{graphicalItems:n,dataStartIndex:s,dataEndIndex:c}),f=d.length,p=GC(l,i),m=-1;return n.reduce(function(e,t){var h=(t.type.defaultProps===void 0?t.props:Q(Q({},t.type.defaultProps),t.props))[a],g=VF(`number`);if(!e[h]){m++;var _;return p?_=(0,tA.default)(0,f):o&&o[h]&&o[h].hasStack?(_=cw(o[h].stackGroups,s,c),_=LP(u,_,h,i)):(_=dw(g,WC(d,n.filter(function(e){var t=a in e.props?e.props[a]:e.type.defaultProps?.[a],n=`hide`in e.props?e.props.hide:e.type.defaultProps?.hide;return t===h&&!n}),`number`,l),r.defaultProps.allowDataOverflow),_=LP(u,_,h,i)),Q(Q({},e),{},$({},h,Q(Q({axisType:i},r.defaultProps),{},{hide:!0,orientation:(0,dc.default)(PF,`${i}.${m%2}`,null),domain:_,originalDomain:g,isCategorical:p,layout:l})))}return e},{})},KF=function(e,t){var n=t.axisType,r=n===void 0?`xAxis`:n,i=t.AxisComp,a=t.graphicalItems,o=t.stackGroups,s=t.dataStartIndex,c=t.dataEndIndex,l=e.children,u=`${r}Id`,d=Gc(l,i),f={};return d&&d.length?f=WF(e,{axes:d,graphicalItems:a,axisType:r,axisIdKey:u,stackGroups:o,dataStartIndex:s,dataEndIndex:c}):a&&a.length&&(f=GF(e,{Axis:i,graphicalItems:a,axisType:r,axisIdKey:u,stackGroups:o,dataStartIndex:s,dataEndIndex:c})),f},qF=function(e){var t=yc(e),n=KC(t,!1,!0);return{tooltipTicks:n,orderedTooltipTicks:(0,Pp.default)(n,function(e){return e.coordinate}),tooltipAxis:t,tooltipAxisBandSize:fw(t,n)}},JF=function(e){var t=e.children,n=e.defaultShowTooltip,r=Kc(t,kA),i=0,a=0;return e.data&&e.data.length!==0&&(a=e.data.length-1),r&&r.props&&(r.props.startIndex>=0&&(i=r.props.startIndex),r.props.endIndex>=0&&(a=r.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:i,dataEndIndex:a,activeTooltipIndex:-1,isTooltipActive:!!n}},YF=function(e){return!e||!e.length?!1:e.some(function(e){var t=Vc(e&&e.type);return t&&t.indexOf(`Bar`)>=0})},XF=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`}},ZF=function(e,t){var n=e.props,r=e.graphicalItems,i=e.xAxisMap,a=i===void 0?{}:i,o=e.yAxisMap,s=o===void 0?{}:o,c=n.width,l=n.height,u=n.children,d=n.margin||{},f=Kc(u,kA),p=Kc(u,fp),m=Object.keys(s).reduce(function(e,t){var n=s[t],r=n.orientation;return!n.mirror&&!n.hide?Q(Q({},e),{},$({},r,e[r]+n.width)):e},{left:d.left||0,right:d.right||0}),h=Q(Q({},Object.keys(a).reduce(function(e,t){var n=a[t],r=n.orientation;return!n.mirror&&!n.hide?Q(Q({},e),{},$({},r,(0,dc.default)(e,`${r}`)+n.height)):e},{top:d.top||0,bottom:d.bottom||0})),m),g=h.bottom;f&&(h.bottom+=f.props.height||kA.defaultProps.height),p&&t&&(h=BC(h,r,n,t));var _=c-h.left-h.right,v=l-h.top-h.bottom;return Q(Q({brushBottom:g},h),{},{width:Math.max(_,0),height:Math.max(v,0)})},QF=function(e,t){if(t===`xAxis`)return e[t].width;if(t===`yAxis`)return e[t].height},$F=function(e){var t=e.chartName,n=e.GraphicalChild,r=e.defaultTooltipEventType,i=r===void 0?`axis`:r,a=e.validateTooltipEventTypes,o=a===void 0?[`axis`]:a,s=e.axisComponents,c=e.legendContent,u=e.formatAxisMap,d=e.defaultProps,p=function(e,t){var n=t.graphicalItems,r=t.stackGroups,i=t.offset,a=t.updateId,o=t.dataStartIndex,c=t.dataEndIndex,l=e.barSize,u=e.layout,d=e.barGap,f=e.barCategoryGap,p=e.maxBarSize,m=XF(u),h=m.numericAxisName,g=m.cateAxisName,_=YF(n),v=[];
66return n.forEach(function(n,m){var y=BF(e.data,{graphicalItems:[n],dataStartIndex:o,dataEndIndex:c}),b=n.type.defaultProps===void 0?n.props:Q(Q({},n.type.defaultProps),n.props),x=b.dataKey,S=b.maxBarSize,C=b[`${h}Id`],w=b[`${g}Id`],T=s.reduce(function(e,n){var r=t[`${n.axisType}Map`],i=b[`${n.axisType}Id`];!(r&&r[i]||n.axisType===`zAxis`)&&WS(!1);var a=r[i];return Q(Q({},e),{},$($({},n.axisType,a),`${n.axisType}Ticks`,KC(a)))},{}),E=T[g],D=T[`${g}Ticks`],O=r&&r[C]&&r[C].hasStack&&ow(n,r[C].stackGroups),k=Vc(n.type).indexOf(`Bar`)>=0,A=fw(E,D),j=[],M=_&&RC({barSize:l,stackGroups:r,totalSize:QF(T,g)});if(k){var N=(0,B.default)(S)?p:S,ee=fw(E,D,!0)??N??0;j=zC({barGap:d,barCategoryGap:f,bandSize:ee===A?A:ee,sizeList:M[w],maxBarSize:N}),ee!==A&&(j=j.map(function(e){return Q(Q({},e),{},{position:Q(Q({},e.position),{},{offset:e.position.offset-ee/2})})}))}var te=n&&n.type&&n.type.getComposedData;te&&v.push({props:Q(Q({},te(Q(Q({},T),{},{displayedData:y,props:e,dataKey:x,item:n,bandSize:A,barPosition:j,offset:i,stackedData:O,layout:u,dataStartIndex:o,dataEndIndex:c}))),{},$($($({key:n.key||`item-${m}`},h,T[h]),g,T[g]),`animationId`,a)),childIndex:tl(n,e.children),item:n})}),v},m=function(e,r){var i=e.props,a=e.dataStartIndex,o=e.dataEndIndex,c=e.updateId;if(!qc({props:i}))return null;var l=i.children,d=i.layout,f=i.stackOffset,m=i.data,h=i.reverseStackOrder,g=XF(d),_=g.numericAxisName,v=g.cateAxisName,y=Gc(l,n),b=nw(m,y,`${_}Id`,`${v}Id`,f,h),x=s.reduce(function(e,t){var n=`${t.axisType}Map`;return Q(Q({},e),{},$({},n,KF(i,Q(Q({},t),{},{graphicalItems:y,stackGroups:t.axisType===_&&b,dataStartIndex:a,dataEndIndex:o}))))},{}),S=ZF(Q(Q({},x),{},{props:i,graphicalItems:y}),r?.legendBBox);Object.keys(x).forEach(function(e){x[e]=u(i,x[e],S,e.replace(`Map`,``),t)});var C=x[`${v}Map`],w=qF(C);return Q(Q({formattedGraphicalItems:p(i,Q(Q({},x),{},{dataStartIndex:a,dataEndIndex:o,updateId:c,graphicalItems:y,stackGroups:b,offset:S})),graphicalItems:y,offset:S,stackGroups:b},w),x)},h=function(e){function n(e){var r;return hF(this,n),r=vF(this,n,[e]),$(r,`eventEmitterSymbol`,Symbol(`rechartsEventEmitter`)),$(r,`accessibilityManager`,new qP),$(r,`handleLegendBBoxUpdate`,function(e){if(e){var t=r.state,n=t.dataStartIndex,i=t.dataEndIndex,a=t.updateId;r.setState(Q({legendBBox:e},m({props:r.props,dataStartIndex:n,dataEndIndex:i,updateId:a},Q(Q({},r.state),{},{legendBBox:e}))))}}),$(r,`handleReceiveSyncEvent`,function(e,t,n){if(r.props.syncId===e){if(n===r.eventEmitterSymbol&&typeof r.props.syncMethod!=`function`)return;r.applySyncEvent(t)}}),$(r,`handleBrushChange`,function(e){var t=e.startIndex,n=e.endIndex;if(t!==r.state.dataStartIndex||n!==r.state.dataEndIndex){var i=r.state.updateId;r.setState(function(){return Q({dataStartIndex:t,dataEndIndex:n},m({props:r.props,dataStartIndex:t,dataEndIndex:n,updateId:i},r.state))}),r.triggerSyncEvent({dataStartIndex:t,dataEndIndex:n})}}),$(r,`handleMouseEnter`,function(e){var t=r.getMouseInfo(e);if(t){var n=Q(Q({},t),{},{isTooltipActive:!0});r.setState(n),r.triggerSyncEvent(n);var i=r.props.onMouseEnter;(0,U.default)(i)&&i(n,e)}}),$(r,`triggeredAfterMouseMove`,function(e){var t=r.getMouseInfo(e),n=t?Q(Q({},t),{},{isTooltipActive:!0}):{isTooltipActive:!1};r.setState(n),r.triggerSyncEvent(n);var i=r.props.onMouseMove;(0,U.default)(i)&&i(n,e)}),$(r,`handleItemMouseEnter`,function(e){r.setState(function(){return{isTooltipActive:!0,activeItem:e,activePayload:e.tooltipPayload,activeCoordinate:e.tooltipPosition||{x:e.cx,y:e.cy}}})}),$(r,`handleItemMouseLeave`,function(){r.setState(function(){return{isTooltipActive:!1}})}),$(r,`handleMouseMove`,function(e){e.persist(),r.throttleTriggeredAfterMouseMove(e)}),$(r,`handleMouseLeave`,function(e){r.throttleTriggeredAfterMouseMove.cancel();var t={isTooltipActive:!1};r.setState(t),r.triggerSyncEvent(t);var n=r.props.onMouseLeave;(0,U.default)(n)&&n(t,e)}),$(r,`handleOuterEvent`,function(e){var t=el(e),n=(0,dc.default)(r.props,`${t}`);t&&(0,U.default)(n)&&n((/.*touch.*/i.test(t)?r.getMouseInfo(e.changedTouches[0]):r.getMouseInfo(e))??{},e)}),$(r,`handleClick`,function(e){var t=r.getMouseInfo(e);if(t){var n=Q(Q({},t),{},{isTooltipActive:!0});r.setState(n),r.triggerSyncEvent(n);var i=r.props.onClick;(0,U.default)(i)&&i(n,e)}}),$(r,`handleMouseDown`,function(e){var t=r.props.onMouseDown;(0,U.default)(t)&&t(r.getMouseInfo(e),e)}),$(r,`handleMouseUp`,function(e){var t=r.props.onMouseUp;(0,U.default)(t)&&t(r.getMouseInfo(e),e)}),$(r,`handleTouchMove`,function(e){e.changedTouches!=null&&e.changedTouches.length>0&&r.throttleTriggeredAfterMouseMove(e.changedTouches[0])}),$(r,`handleTouchStart`,function(e){e.changedTouches!=null&&e.changedTouches.length>0&&r.handleMouseDown(e.changedTouches[0])}),$(r,`handleTouchEnd`,function(e){e.changedTouches!=null&&e.changedTouches.length>0&&r.handleMouseUp(e.changedTouches[0])}),$(r,`handleDoubleClick`,function(e){var t=r.props.onDoubleClick;(0,U.default)(t)&&t(r.getMouseInfo(e),e)}),$(r,`handleContextMenu`,function(e){var t=r.props.onContextMenu;(0,U.default)(t)&&t(r.getMouseInfo(e),e)}),$(r,`triggerSyncEvent`,function(e){r.props.syncId!==void 0&&RP.emit(zP,r.props.syncId,e,r.eventEmitterSymbol)}),$(r,`applySyncEvent`,function(e){var t=r.props,n=t.layout,i=t.syncMethod,a=r.state.updateId,o=e.dataStartIndex,s=e.dataEndIndex;if(e.dataStartIndex!==void 0||e.dataEndIndex!==void 0)r.setState(Q({dataStartIndex:o,dataEndIndex:s},m({props:r.props,dataStartIndex:o,dataEndIndex:s,updateId:a},r.state)));else if(e.activeTooltipIndex!==void 0){var c=e.chartX,l=e.chartY,u=e.activeTooltipIndex,d=r.state,f=d.offset,p=d.tooltipTicks;if(!f)return;if(typeof i==`function`)u=i(p,e);else if(i===`value`){u=-1;for(var h=0;h<p.length;h++)if(p[h].value===e.activeLabel){u=h;break}}var g=Q(Q({},f),{},{x:f.left,y:f.top}),_=Math.min(c,g.x+g.width),v=Math.min(l,g.y+g.height),y=p[u]&&p[u].value,b=HF(r.state,r.props.data,u),x=p[u]?{x:n===`horizontal`?p[u].coordinate:_,y:n===`horizontal`?v:p[u].coordinate}:IF;r.setState(Q(Q({},e),{},{activeLabel:y,activeCoordinate:x,activePayload:b,activeTooltipIndex:u}))}else r.setState(e)}),$(r,`renderCursor`,function(e){var n=r.state,i=n.isTooltipActive,a=n.activeCoordinate,o=n.activePayload,s=n.offset,c=n.activeTooltipIndex,l=n.tooltipAxisBandSize,u=r.getTooltipEventType(),d=e.props.active??i,p=r.props.layout,m=e.key||`_recharts-cursor`;return f.createElement(iF,{key:m,activeCoordinate:a,activePayload:o,activeTooltipIndex:c,chartName:t,element:e,isActive:d,layout:p,offset:s,tooltipAxisBandSize:l,tooltipEventType:u})}),$(r,`renderPolarAxis`,function(e,t,n){var i=(0,dc.default)(e,`type.axisType`),a=(0,dc.default)(r.state,`${i}Map`),o=e.type.defaultProps,s=o===void 0?e.props:Q(Q({},o),e.props),c=a&&a[s[`${i}Id`]];return(0,f.cloneElement)(e,Q(Q({},c),{},{className:l(i,c.className),key:e.key||`${t}-${n}`,ticks:KC(c,!0)}))}),$(r,`renderPolarGrid`,function(e){var t=e.props,n=t.radialLines,i=t.polarAngles,a=t.polarRadius,o=r.state,s=o.radiusAxisMap,c=o.angleAxisMap,l=yc(s),u=yc(c),d=u.cx,p=u.cy,m=u.innerRadius,h=u.outerRadius;return(0,f.cloneElement)(e,{polarAngles:Array.isArray(i)?i:KC(u,!0).map(function(e){return e.coordinate}),polarRadius:Array.isArray(a)?a:KC(l,!0).map(function(e){return e.coordinate}),cx:d,cy:p,innerRadius:m,outerRadius:h,key:e.key||`polar-grid`,radialLines:n})}),$(r,`renderLegend`,function(){var e=r.state.formattedGraphicalItems,t=r.props,n=t.children,i=t.
66width,a=t.height,o=r.props.margin||{},s=SC({children:n,formattedGraphicalItems:e,legendWidth:i-(o.left||0)-(o.right||0),legendContent:c});if(!s)return null;var l=s.item,u=pF(s,aF);return(0,f.cloneElement)(l,Q(Q({},u),{},{chartWidth:i,chartHeight:a,margin:o,onBBoxUpdate:r.handleLegendBBoxUpdate}))}),$(r,`renderTooltip`,function(){var e=r.props,t=e.children,n=e.accessibilityLayer,i=Kc(t,Um);if(!i)return null;var a=r.state,o=a.isTooltipActive,s=a.activeCoordinate,c=a.activePayload,l=a.activeLabel,u=a.offset,d=i.props.active??o;return(0,f.cloneElement)(i,{viewBox:Q(Q({},u),{},{x:u.left,y:u.top}),active:d,label:l,payload:d?c:[],coordinate:s,accessibilityLayer:n})}),$(r,`renderBrush`,function(e){var t=r.props,n=t.margin,i=t.data,a=r.state,o=a.offset,s=a.dataStartIndex,c=a.dataEndIndex,l=a.updateId;return(0,f.cloneElement)(e,{key:e.key||`_recharts-brush`,onChange:JC(r.handleBrushChange,e.props.onChange),data:i,x:V(e.props.x)?e.props.x:o.left,y:V(e.props.y)?e.props.y:o.top+o.height+o.brushBottom-(n.bottom||0),width:V(e.props.width)?e.props.width:o.width,startIndex:s,endIndex:c,updateId:`brush-${l}`})}),$(r,`renderReferenceElement`,function(e,t,n){if(!e)return null;var i=r.clipPathId,a=r.state,o=a.xAxisMap,s=a.yAxisMap,c=a.offset,l=e.type.defaultProps||{},u=e.props,d=u.xAxisId,p=d===void 0?l.xAxisId:d,m=u.yAxisId,h=m===void 0?l.yAxisId:m;return(0,f.cloneElement)(e,{key:e.key||`${t}-${n}`,xAxis:o[p],yAxis:s[h],viewBox:{x:c.left,y:c.top,width:c.width,height:c.height},clipPathId:i})}),$(r,`renderActivePoints`,function(e){var t=e.item,r=e.activePoint,i=e.basePoint,a=e.childIndex,o=e.isRange,s=[],c=t.props.key,l=t.item.type.defaultProps===void 0?t.item.props:Q(Q({},t.item.type.defaultProps),t.item.props),u=l.activeDot,d=l.dataKey,f=Q(Q({index:a,dataKey:d,cx:r.x,cy:r.y,r:4,fill:LC(t.item),strokeWidth:2,stroke:`#fff`,payload:r.payload,value:r.value},W(u,!1)),Nc(u));return s.push(n.renderActiveDot(u,f,`${c}-activePoint-${a}`)),i?s.push(n.renderActiveDot(u,Q(Q({},f),{},{cx:i.x,cy:i.y}),`${c}-basePoint-${a}`)):o&&s.push(null),s}),$(r,`renderGraphicChild`,function(e,t,n){var i=r.filterFormatItem(e,t,n);if(!i)return null;var a=r.getTooltipEventType(),o=r.state,s=o.isTooltipActive,c=o.tooltipAxis,l=o.activeTooltipIndex,u=o.activeLabel,d=r.props.children,p=Kc(d,Um),m=i.props,h=m.points,g=m.isRange,_=m.baseLine,v=i.item.type.defaultProps===void 0?i.item.props:Q(Q({},i.item.type.defaultProps),i.item.props),y=v.activeDot,b=v.hide,x=v.activeBar,S=v.activeShape,C=!!(!b&&s&&p&&(y||x||S)),w={};a!==`axis`&&p&&p.props.trigger===`click`?w={onClick:JC(r.handleItemMouseEnter,e.props.onClick)}:a!==`axis`&&(w={onMouseLeave:JC(r.handleItemMouseLeave,e.props.onMouseLeave),onMouseEnter:JC(r.handleItemMouseEnter,e.props.onMouseEnter)});var T=(0,f.cloneElement)(e,Q(Q({},i.props),w));function E(e){return typeof c.dataKey==`function`?c.dataKey(e.payload):null}if(C)if(l>=0){var D,O;if(c.dataKey&&!c.allowDuplicatedCategory){var k=typeof c.dataKey==`function`?E:`payload.${c.dataKey.toString()}`;D=Sc(h,k,u),O=g&&_&&Sc(_,k,u)}else D=h?.[l],O=g&&_&&_[l];if(S||x){var A=e.props.activeIndex===void 0?l:e.props.activeIndex;return[(0,f.cloneElement)(e,Q(Q(Q({},i.props),w),{},{activeIndex:A})),null,null]}if(!(0,B.default)(D))return[T].concat(TF(r.renderActivePoints({item:i,activePoint:D,basePoint:O,childIndex:l,isRange:g})))}else{var j=(r.getItemByXY(r.state.activeCoordinate)??{graphicalItem:T}).graphicalItem,M=j.item,N=M===void 0?e:M,ee=j.childIndex,te=Q(Q(Q({},i.props),w),{},{activeIndex:ee});return[(0,f.cloneElement)(N,te),null,null]}return g?[T,null,null]:[T,null]}),$(r,`renderCustomized`,function(e,t,n){return(0,f.cloneElement)(e,Q(Q({key:`recharts-customized-${n}`},r.props),r.state))}),$(r,`renderMap`,{CartesianGrid:{handler:LF,once:!0},ReferenceArea:{handler:r.renderReferenceElement}
66,ReferenceLine:{handler:LF},ReferenceDot:{handler:r.renderReferenceElement},XAxis:{handler:LF},YAxis:{handler:LF},Brush:{handler:r.renderBrush,once:!0},Bar:{handler:r.renderGraphicChild},Line:{handler:r.renderGraphicChild},Area:{handler:r.renderGraphicChild},Radar:{handler:r.renderGraphicChild},RadialBar:{handler:r.renderGraphicChild},Scatter:{handler:r.renderGraphicChild},Pie:{handler:r.renderGraphicChild},Funnel:{handler:r.renderGraphicChild},Tooltip:{handler:r.renderCursor,once:!0},PolarGrid:{handler:r.renderPolarGrid,once:!0},PolarAngleAxis:{handler:r.renderPolarAxis},PolarRadiusAxis:{handler:r.renderPolarAxis},Customized:{handler:r.renderCustomized}}),r.clipPathId=`${e.id??_c(`recharts`)}-clip`,r.throttleTriggeredAfterMouseMove=(0,Ym.default)(r.triggeredAfterMouseMove,e.throttleDelay??1e3/60),r.state={},r}return CF(n,e),_F(n,[{key:`componentDidMount`,value:function(){this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:this.props.margin.left??0,top:this.props.margin.top??0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:`displayDefaultTooltip`,value:function(){var e=this.props,t=e.children,n=e.data,r=e.height,i=e.layout,a=Kc(t,Um);if(a){var o=a.props.defaultIndex;if(!(typeof o!=`number`||o<0||o>this.state.tooltipTicks.length-1)){var s=this.state.tooltipTicks[o]&&this.state.tooltipTicks[o].value,c=HF(this.state,n,o,s),l=this.state.tooltipTicks[o].coordinate,u=(this.state.offset.top+r)/2,d=i===`horizontal`?{x:l,y:u}:{y:l,x:u},f=this.state.formattedGraphicalItems.find(function(e){return e.item.type.name===`Scatter`});f&&(d=Q(Q({},d),f.props.points[o].tooltipPosition),c=f.props.points[o].tooltipPayload);var p={activeTooltipIndex:o,isTooltipActive:!0,activeLabel:s,activePayload:c,activeCoordinate:d};this.setState(p),this.renderCursor(a),this.accessibilityManager.setIndex(o)}}}},{key:`getSnapshotBeforeUpdate`,value:function(e,t){return this.props.accessibilityLayer?(this.state.tooltipTicks!==t.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==e.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==e.margin&&this.accessibilityManager.setDetails({offset:{left:this.props.margin.left??0,top:this.props.margin.top??0}}),null):null}},{key:`componentDidUpdate`,value:function(e){Zc([Kc(e.children,Um)],[Kc(this.props.children,Um)])||this.displayDefaultTooltip()}},{key:`componentWillUnmount`,value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:`getTooltipEventType`,value:function(){var e=Kc(this.props.children,Um);if(e&&typeof e.props.shared==`boolean`){var t=e.props.shared?`axis`:`item`;return o.indexOf(t)>=0?t:i}return i}},{key:`getMouseInfo`,value:function(e){if(!this.container)return null;var t=this.container,n=t.getBoundingClientRect(),r=Sh(n),i={chartX:Math.round(e.pageX-r.left),chartY:Math.round(e.pageY-r.top)},a=n.width/t.offsetWidth||1,o=this.inRange(i.chartX,i.chartY,a);if(!o)return null;var s=this.state,c=s.xAxisMap,l=s.yAxisMap,u=this.getTooltipEventType(),d=UF(this.state,this.props.data,this.props.layout,o);if(u!==`axis`&&c&&l){var f=yc(c).scale,p=yc(l).scale,m=f&&f.invert?f.invert(i.chartX):null,h=p&&p.invert?p.invert(i.chartY):null;return Q(Q({},i),{},{xValue:m,yValue:h},d)}return d?Q(Q({},i),d):null}},{key:`inRange`,value:function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,r=this.props.layout,i=e/n,a=t/n;if(r===`horizontal`||r===`vertical`){var o=this.state.offset;return i>=o.left&&i<=o.left+o.width&&a>=o.top&&a<=o.top+o.height?{x:i,y:a}:null}var s=this.state,c=s.angleAxisMap,l=s.radiusAxisMap;if(c&&l){var u=yc(c);return Ow({x:i,y:a},u)}return null}},{key:`parseEventsOfWrapper`,value:function(){var e=this.props.children,t=this.getTooltipEventType(),n=Kc(e,Um),r={};return n&&t===`axis`&&(r=n.props.trigger===`click`?{onClick:this.handleClick}:{onMouseEnter:this.handleMouseEnter,onDoubleClick:this.handleDoubleClick,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onContextMenu:this.handleContextMenu}),Q(Q({},Nc(this.props,this.handleOuterEvent)),r)}},{key:`addListener`,value:function(){RP.on(zP,this.handleReceiveSyncEvent)}},{key:`removeListener`,value:function(){RP.removeListener(zP,this.handleReceiveSyncEvent)}},{key:`filterFormatItem`,value:function(e,t,n){for(var r=this.state.formattedGraphicalItems,i=0,a=r.length;i<a;i++){var o=r[i];if(o.item===e||o.props.key===e.key||t===Vc(o.item.type)&&n===o.childIndex)return o}return null}},{key:`renderClipPath`,value:function(){var e=this.clipPathId,t=this.state.offset,n=t.left,r=t.top,i=t.height,a=t.width;return f.createElement(`defs`,null,f.createElement(`clipPath`,{id:e},f.createElement(`rect`,{x:n,y:r,height:i,width:a})))}},{key:`getXScales`,value:function(){var e=this.state.xAxisMap;return e?Object.entries(e).reduce(function(e,t){var n=lF(t,2),r=n[0],i=n[1];return Q(Q({},e),{},$({},r,i.scale))},{}):null}},{key:`getYScales`,value:function(){var e=this.state.yAxisMap;return e?Object.entries(e).reduce(function(e,t){var n=lF(t,2),r=n[0],i=n[1];return Q(Q({},e),{},$({},r,i.scale))},{}):null}},{key:`getXScaleByAxisId`,value:function(e){var t;return(t=this.state.xAxisMap)==null||(t=t[e])==null?void 0:t.scale}},{key:`getYScaleByAxisId`,value:function(e){var t;return(t=this.state.yAxisMap)==null||(t=t[e])==null?void 0:t.scale}},{key:`getItemByXY`,value:function(e){var t=this.state,n=t.formattedGraphicalItems,r=t.activeItem;if(n&&n.length)for(var i=0,a=n.length;i<a;i++){var o=n[i],s=o.props,c=o.item,l=c.type.defaultProps===void 0?c.props:Q(Q({},c.type.defaultProps),c.props),u=Vc(c.type);if(u===`Bar`){var d=(s.data||[]).find(function(t){return WO(e,t)});if(d)return{graphicalItem:o,payload:d}}else if(u===`RadialBar`){var f=(s.data||[]).find(function(t){return Ow(e,t)});if(f)return{graphicalItem:o,payload:f}}
66else if(Hk(o,r)||Uk(o,r)||Wk(o,r)){var p=Zk({graphicalItem:o,activeTooltipItem:r,itemData:l.data}),m=l.activeIndex===void 0?p:l.activeIndex;return{graphicalItem:Q(Q({},o),{},{childIndex:m}),payload:Wk(o,r)?l.data[p]:o.props.data[p]}}}return null}},{key:`render`,value:function(){var e=this;if(!qc(this))return null;var t=this.props,n=t.children,r=t.className,i=t.width,a=t.height,o=t.style,s=t.compact,c=t.title,u=t.desc,d=W(pF(t,oF),!1);if(s)return f.createElement(Yj,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},f.createElement(ol,cF({},d,{width:i,height:a,title:c,desc:u}),this.renderClipPath(),$c(n,this.renderMap)));this.props.accessibilityLayer&&(d.tabIndex=this.props.tabIndex??0,d.role=this.props.role??`application`,d.onKeyDown=function(t){e.accessibilityManager.keyboardEvent(t)},d.onFocus=function(){e.accessibilityManager.focus()});var p=this.parseEventsOfWrapper();return f.createElement(Yj,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},f.createElement(`div`,cF({className:l(`recharts-wrapper`,r),style:Q({position:`relative`,cursor:`default`,width:i,height:a},o)},p,{ref:function(t){e.container=t}}),f.createElement(ol,cF({},d,{width:i,height:a,title:c,desc:u,style:FF}),this.renderClipPath(),$c(n,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])}(f.Component);$(h,`displayName`,t),$(h,`defaultProps`,Q({layout:`horizontal`,stackOffset:`none`,barCategoryGap:`10%`,barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:`index`},d)),$(h,`getDerivedStateFromProps`,function(e,t){var n=e.dataKey,r=e.data,i=e.children,a=e.width,o=e.height,s=e.layout,c=e.stackOffset,l=e.margin,u=t.dataStartIndex,d=t.dataEndIndex;if(t.updateId===void 0){var f=JF(e);return Q(Q(Q({},f),{},{updateId:0},m(Q(Q({props:e},f),{},{updateId:0}),t)),{},{prevDataKey:n,prevData:r,prevWidth:a,prevHeight:o,prevLayout:s,prevStackOffset:c,prevMargin:l,prevChildren:i})}if(n!==t.prevDataKey||r!==t.prevData||a!==t.prevWidth||o!==t.prevHeight||s!==t.prevLayout||c!==t.prevStackOffset||!Ec(l,t.prevMargin)){var p=JF(e),h={chartX:t.chartX,chartY:t.chartY,isTooltipActive:t.isTooltipActive},g=Q(Q({},UF(t,r,s)),{},{updateId:t.updateId+1}),_=Q(Q(Q({},p),h),g);return Q(Q(Q({},_),m(Q({props:e},_),t)),{},{prevDataKey:n,prevData:r,prevWidth:a,prevHeight:o,prevLayout:s,prevStackOffset:c,prevMargin:l,prevChildren:i})}if(!Zc(i,t.prevChildren)){var v=Kc(i,kA),y=v?v.props?.startIndex??u:u,b=v?v.props?.endIndex??d:d,x=y!==u||b!==d,S=!(0,B.default)(r)&&!x?t.updateId:t.updateId+1;return Q(Q({updateId:S},m(Q(Q({props:e},t),{},{updateId:S,dataStartIndex:y,dataEndIndex:b}),t)),{},{prevChildren:i,dataStartIndex:y,dataEndIndex:b})}return null}),$(h,`renderActiveDot`,function(e,t,n){var r=(0,f.isValidElement)(e)?(0,f.cloneElement)(e,t):(0,U.default)(e)?e(t):f.createElement(JO,t);return f.createElement(dl,{className:`recharts-active-dot`,key:n},r)});var g=(0,f.forwardRef)(function(e,t){return f.createElement(h,cF({},e,{ref:t}))});return g.displayName=h.displayName,g}({chartName:`BarChart`,GraphicalChild:yj,defaultTooltipEventType:`axis`,validateTooltipEventTypes:[`axis`,`item`],axisComponents:[{axisType:`xAxis`,AxisComp:pP},{axisType:`yAxis`,AxisComp:AP}],formatAxisMap:kj}),eI=`/assets/techie-bestie-infographic-Ca9c4ZdP.jpg`,tI=`/assets/smb-agentic-infographic-F-k7x_Wr.jpg`,nI=`/assets/seo-dead-geo-infographic-DzXN_74L.jpg`,rI=`/assets/seo-geo-visibility-infographic-B7MNWjyF.jpg`,iI=`/assets/seo-trends-2026-infographic-B0fNsWXi.jpg`,aI=`/assets/seo-geo-playbook-infographic-Bc_yepF1.jpg`,oI=`/assets/geo-vs-seo-2026-infographic-f0Fj7cAO.jpg`,sI=`/assets/5-best-reporting-tools-2026-BwIzLb7_.jpg`,cI=`/assets/reporting-tool-evolution-PgIdR3Z4.jpg`,lI=`/assets/whatagraph-iq-service-model-ChLoDRwp.jpg`,uI=`/assets/ai-visibility-monetization-infographic-B0z28LXS.jpg`,dI=`/assets/ai-visibility-beyond-seo-infographic-BEI3wOWK.jpg`,fI=`/assets/geo-optimization-2026-D0ZPVqPr.jpg`,pI=`/assets/ai-search-traffic-2026-CfArNmiF.jpg`,mI=`/assets/ai-citations-intro-B-qU146j.jpg`,hI=`/assets/ai-citation-ski-ramp-DGibSWwJ.jpg`,gI=`/assets/ai-citation-playbook-CcSdAcLU.jpg`,_I=`/assets/ai-visibility-funnel-C7kjnfb-.jpg`,vI=`/assets/seo-aeo-geo-comparison-DO7CzEfy.jpg`,yI=`/assets/techie-bestie-badge-CYVFOpFg.png`,bI=`/assets/techie-bestie-dashboard-CfQj6gUS.png`,xI=`/assets/chatgpt-ads-seo-evolution-cover-xUoqL1o2.png`,SI=`/assets/chatgpt-ads-claude-strategy-Ubd8Btb2.png`,CI=`/assets/claude-creative-ai-strategist-cover-DKhqr67Z.png`,wI=`/assets/chatgpt-ads-top-5-trends-cover-C7
66devgP9.png`,TI=`/assets/chatgpt-ads-citation-playbook-BND3jOn_.png`,EI=`/assets/chatgpt-ads-seo-stack-CnLOK8z9.png`,DI=`/assets/blog-organic-window-march-2026-core-update-Dpgx7aNg.png`,OI=`/assets/blog-organic-window-5-moves-may-2026-B888HhCs.png`,kI=`/assets/blog-organic-window-act-now-pay-later-DiDBpWZc.png`,AI={version:1,asset_id:`a630249a-d9ad-464d-b7fb-5bcf85ac7640`,project_id:`1262b0ad-621c-409a-96cc-405394684305`,url:`/__l5e/assets-v1/a630249a-d9ad-464d-b7fb-5bcf85ac7640/get-cited-in-chatgpt-og.jpg`,r2_key:`a/v1/1262b0ad-621c-409a-96cc-405394684305/a630249a-d9ad-464d-b7fb-5bcf85ac7640/get-cited-in-chatgpt-og.jpg`,original_filename:`get-cited-in-chatgpt-og.jpg`,size:349380,content_type:`image/jpeg`,created_at:`2026-07-07T15:28:33Z`};function jI(){if(typeof window>`u`)return;let e=location.hostname,t=[`lovableproject.com`,`lovableproject-dev.com`,`lovable.app`,`gpt-eng.com`,`gptengineer.run`].some(t=>e===t||e.endsWith(`.`+t))?e.match(RegExp(`^(?:id-preview(?:-[a-z0-9]+)?|project)--([0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})(?:-dev)?(?=\\.|$)`,`i`))?.[1]??e.match(RegExp(`^([0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})(?=[.-])`,`i`))?.[1]:void 0,n=window.parent&&window.parent!==window;if(!t||!n)return localStorage;let r=e.endsWith(`.lovableproject-dev.com`)||e.endsWith(`.gpt-eng.com`),i=r?/^https:\/\/([a-z0-9-]+\.)*(lovable\.dev|gptengineer\.app)$|^http:\/\/localhost:3000$/:/^https:\/\/([a-z0-9-]+\.)*(lovable\.dev|gptengineer\.app)$/,a=location.ancestorOrigins&&location.ancestorOrigins[0]||(document.referrer?new URL(document.referrer).origin:``),o=a&&i.test(a)?[a]:r?[`https://lovable.dev`,`http://localhost:3000`]:[`https://lovable.dev`],s=()=>Math.random().toString(36).slice(2)+Date.now().toString(36),c=(e,n,r)=>new Promise(i=>{let a=s(),c=!1,l,u=e=>{c||(c=!0,clearTimeout(l),window.removeEventListener(`message`,d),i(e))},d=e=>{if(o.indexOf(e.origin)<0)return;let t=e.data;t&&t.type===`lovable-preview-auth:result`&&t.requestId===a&&u(t)};window.addEventListener(`message`,d);let f={type:e,requestId:a,projectId:t,key:n};r!==void 0&&(f.value=r);for(let e of o)window.parent.postMessage(f,e);l=setTimeout(()=>u(null),2e3)}),l=!0;return{getItem:async e=>{let t=await c(`lovable-preview-auth:get`,e);return!t&&l&&(await new Promise(e=>setTimeout(e,250)),t=await c(`lovable-preview-auth:get`,e)),l=!1,t&&t.ok&&typeof t.value==`string`?t.value===``?(localStorage.removeItem(e),null):t.value:localStorage.getItem(e)},setItem:(e,t)=>(localStorage.setItem(e,t),c(`lovable-preview-auth:set`,e,t).then(n=>{n&&n.ok&&typeof n.value==`string`&&localStorage.getItem(e)===t&&(n.value===``?localStorage.removeItem(e):localStorage.setItem(e,n.value))})),removeItem:e=>(localStorage.removeItem(e),c(`lovable-preview-auth:remove`,e).then(()=>void 0))}}var MI=ts(`https://kyonvcqrmtjpaksopocq.supabase.co`,`eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Imt5b252Y3FybXRqcGFrc29wb2NxIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NzE5NTk3MjksImV4cCI6MjA4NzUzNTcyOX0.R15wXTOPF-nShd65O1WTiwQx2WXgKEe46e9bAu-l_tk`,{auth:{storage:jI(),persistSession:!0,autoRefreshToken:!0}});AI.url;var NI={initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6}},PI=[{src:mI,alt:`The 2026 AI Citation Playbook: Moving Beyond Traditional SEO — ski ramp effect, high-authority distribution, and corporate citation dominance`},{src:fI,alt:`The 2026 AI Visibility Playbook: From SEO to GEO — GEO optimization strategy, monetization plan, and distribution engine`},{src:sI,alt:`The 5 Best Reporting Tools for 2026: Head-to-Head Comparison — GEO tools and AI visibility strategy`},{src:oI,alt:`The 2026 AI Visibility Playbook: From SEO to GEO — what every business owner needs to know`},{src:aI,alt:`The 2026 AI Visibility Playbook: From SEO to GEO — emerging trends, monetization strategy, and high-value GEO service offerings`},{src:iI,alt:`Search Everywhere: The Techie Bestie's Omnichannel AI Strategy`},{src:rI,alt:`SEO is Dead, GEO is Here: Your Guide to AI Visibility`},{src:tI,alt:`Boost Your Bottom Line: The SMB Guide to Agentic Workflows`},{src:eI,alt:`Techie Bestie: The All-in-One Powerhouse for AI & Digital Strategy`}],FI=e=>{let t=is(e.title);return(e.cover_image_url?LI[e.cover_image_url]||e.cover_image_url:null)||RI[t]||null},II=({initialPost:e})=>{let{slug:t}=a(),n=u(),{data:r=[],isLoading:i,error:o,refetch:l,isFetching:f}=Ye({queryKey:[`blog_posts_list`],queryFn:async()=>{let{data:e,error:t}=await MI.from(`blog_posts`).select(`id,title,excerpt,cover_image_url,published,created_at,updated_at`).eq(`published`,!0).order(`created_at`,{ascending:!1});if(t)throw console.error(`[Blog] Supabase list error:`,t),t;
66return console.log(`[Blog] Loaded`,e?.length,`posts`),e},retry:3,retryDelay:e=>Math.min(1e3*2**e,5e3),staleTime:6e4}),{data:m}=Ye({queryKey:[`blog_post`,t],initialData:e??void 0,enabled:!!t,queryFn:async()=>{let{data:e,error:n}=await MI.from(`blog_posts`).select(`*`).eq(`published`,!0);if(n)throw n;return e.find(e=>is(e.title)===t)||null},staleTime:6e4});return t&&!i&&r.length>0&&m===null?(n(`/blog`,{replace:!0}),null):m?(0,p.jsx)(BI,{post:m,onBack:()=>n(`/blog`)}):(0,p.jsxs)(`div`,{className:`min-h-screen bg-background`,children:[(0,p.jsx)(c,{}),(0,p.jsxs)(`main`,{id:`main-content`,children:[(0,p.jsxs)(`section`,{className:`pt-32 pb-20 relative overflow-hidden`,children:[(0,p.jsx)(`div`,{className:`absolute inset-0 bg-gradient-to-br from-[hsl(210,30%,8%)] via-[hsl(210,30%,5%)] to-[hsl(210,30%,3%)]`}),(0,p.jsx)(`div`,{className:`absolute top-[-60px] left-1/2 -translate-x-1/2 w-[600px] h-[600px] bg-[radial-gradient(ellipse,hsl(var(--primary)/0.08),transparent_65%)] pointer-events-none`}),(0,p.jsx)(`div`,{className:`container mx-auto px-6 relative`,children:(0,p.jsxs)(s.div,{...NI,className:`text-center max-w-3xl mx-auto`,children:[(0,p.jsx)(`span`,{className:`inline-block font-display text-[11px] font-bold tracking-[0.22em] uppercase text-primary bg-primary/10 border border-primary/20 rounded-full px-4 py-1.5 mb-6`,children:`Blog`}),(0,p.jsxs)(`h1`,{className:`font-display text-4xl md:text-6xl font-extrabold mb-6 text-foreground leading-[1.1]`,children:[`Innovations of an`,(0,p.jsx)(`br`,{}),(0,p.jsx)(`span`,{className:`text-gradient`,children:`Agentic Engineer`})]}),(0,p.jsx)(`p`,{className:`text-muted-foreground text-lg leading-relaxed`,children:`Insights on tech, design, engineering, and building in the digital age.`})]})})]}),(0,p.jsx)(`section`,{className:`py-16`,children:(0,p.jsx)(`div`,{className:`container mx-auto px-6 max-w-[1100px]`,children:i?(0,p.jsx)(`div`,{className:`text-center text-muted-foreground py-12`,children:`Loading posts...`}):o?(0,p.jsxs)(`div`,{className:`text-center py-12`,children:[(0,p.jsx)(`p`,{className:`text-lg mb-2 text-foreground`,children:`Couldn't load posts.`}),(0,p.jsx)(`p`,{className:`text-sm text-muted-foreground mb-4`,children:o?.message||`Network error. Please try again.`}),(0,p.jsx)(`button`,{onClick:()=>l(),disabled:f,className:`inline-block px-5 py-2 rounded-lg font-display text-xs font-bold tracking-[0.06em] uppercase bg-primary text-primary-foreground hover:shadow-[0_0_28px_hsl(var(--primary)/0.45)] transition-all disabled:opacity-50`,children:f?`Retrying...`:`Try Again`})]}):r.length===0?(0,p.jsxs)(`div`,{className:`text-center text-muted-foreground py-12`,children:[(0,p.jsx)(`p`,{className:`text-lg mb-2`,children:`No posts yet.`}),(0,p.jsx)(`p`,{className:`text-sm`,children:`Check back soon for new content!`})]}):(0,p.jsx)(`div`,{className:`space-y-5`,children:r.map((e,t)=>{let r=FI(e),i=r?{src:r,alt:`Cover illustration for ${e.title}`}:PI[t];return(0,p.jsxs)(`div`,{className:`flex flex-col lg:flex-row gap-5 items-stretch`,children:[i?(0,p.jsx)(`a`,{href:i.src,target:`_blank`,rel:`noopener noreferrer`,className:`block rounded-2xl overflow-hidden border border-border hover:border-primary/40 transition-all duration-300 hover:shadow-[0_0_40px_-10px_hsl(var(--primary)/0.25)] flex-shrink-0 lg:w-[280px]`,children:(0,p.jsx)(`img`,{src:i.src,alt:i.alt,className:`w-full h-full object-cover`,loading:t===0?`eager`:`lazy`,decoding:`async`})}):(0,p.jsx)(`div`,{className:`hidden lg:block lg:w-[280px] flex-shrink-0`}),(0,p.jsxs)(s.article,{...NI,className:`group flex-1 min-w-0 bg-card border border-border rounded-2xl p-7 cursor-pointer transition-all duration-300 hover:border-primary/40 hover:shadow-[0_0_40px_-10px_hsl(var(--primary)/0.25)]`,onClick:()=>n(`/blog/${is(e.title)}`),whileHover:{y:-3},children:[(0,p.jsxs)(`div`,{className:`flex items-center gap-3 mb-3`,children:[(0,p.jsx)(`span`,{className:`text-[11px] font-display font-bold tracking-[0.15em] uppercase text-primary/70`,children:`Article`}),(0,p.jsx)(`span`,{className:`text-border`,children:`·`}),(0,p.jsxs)(`span`,{className:`text-xs text-muted-foreground flex items-center gap-1`,children:[(0,p.jsx)(Ze,{className:`w-3 h-3`}),new Date(e.created_at).toLocaleDateString(`en-US`,{year:`numeric`,month:`long`,day:`numeric`})]})]}),(0,p.jsx)(`h2`,{className:`font-display text-xl md:text-2xl font-extrabold text-foreground mb-3 group-hover:text-primary transition-colors leading-tight`,children:e.title}),(0,p.jsx)(`p`,{className:`text-sm text-muted-foreground leading-relaxed line-clamp-2`,children:e.excerpt||e.content.slice(0,200)})]})]},e.id)})})})}),(0,p.jsx)(`section`,{className:`pb-20`,children:(0,p.jsx)(`div`,{className:`container mx-auto px-6 max-w-[820px]`,children:(0,p.jsxs)(`div`,{className:`relative overflow-hidden bg-gradient-to-br from-[hsl(210,35%,10%)] via-[hsl(205,40%,12%)] to-[hsl(210,35%,10%)] border border-primary/15 rounded-2xl p-12 md:p-14 text-center`,children:[(0,p.jsx)(`div`,{className:`absolute top-0 left-1/2 -translate-x-1/2 w-[400px] h-[200px] bg-[radial-gradient(ellipse,hsl(var(--primary)/0.07),transparent_70%)] pointer-events-none`}),(0,p.jsx)(`p`,{className:`font-display text-[11px] font-bold tracking-[0.2em] uppercase text-primary/70 mb-3`,children:`Ready to Get Found Everywhere?`}),(0,p.jsxs)(`h2`,{className:`font-display text-2xl md:text-4xl font-extrabold text-foreground mb-4 leading-tight`,children:[`See What Full-Spectrum`,(0,p.jsx)(`br`,{}),`AI Strategy Costs`]}),(0,p.jsx)(`p`,{className:`text-muted-foreground text-[15px] max-w-md mx-auto mb-8 leading-relaxed`,children:`Transparent pricing for SEO, GEO, Agentic Engineering, content, and web development — no agency bloat, no surprise retainers.`}),(0,p.jsxs)(`div`,{className:`flex gap-3 justify-center flex-wrap`,children:[(0,p.jsx)(`a`,{href:`/pricing`,className:`inline-block px-6 py-2.5 rounded-lg font-display text-xs font-bold tracking-[0.06em] uppercase bg-primary text-primary-foreground hover:shadow-[0_0_28px_hsl(var(--primary)/0.45)] hover:-translate-y-0.5 transition-all`,children:`View Pricing Plans`}),(0,p.jsx)(`a`,{href:`/services`,className:`inline-block px-6 py-2.5 rounded-lg font-display text-xs font-bold tracking-[0.06em] uppercase border border-primary/40 text-primary hover:bg-primary/10 transition-all`,children:`Explore Services`})]})]})})})]}),(0,p.jsx)(d,{})]})},LI={"seo-trends-2026":iI,"5-reporting-tools-2026":sI,"geo-vs-seo-2026":oI,"geo-optimization-2026":fI,"ai-citations-intro":mI,"seo-llm-ai-shifts-30-days":uI,"seo-dead-geo-guide":nI,"lone-wolf-ai-strategy":eI,"agentic-engineering-smb":tI,"claude-creative-2026":CI,"chatgpt-ads-2026":wI,"organic-ai-window-closing-2026":DI},RI={"organic-ai-window-closing-2026":DI,"ai-citations-intro":mI,"seo-llm-ai-shifts-30-days":uI,"seo-dead-geo-guide":nI,"lone-wolf-ai-strategy":eI,"agentic-engineering-smb":tI},zI={"5-reporting-tools-2026":[{src:cI,alt:`The Reporting Tool Evolution: From Manual to AI-Driven — comparing 2020-2024 manual distribution era to 2026 AI-native automated future`,afterHeading:`Tool #3`},{src:lI,alt:`The Whatagraph IQ Service Model: Setup Once, Recur Forever — two-phase service model with 90% decrease in monthly labor`,afterHeading:`Conclusion`}],"seo-llm-ai-shifts-30-days":[{src:uI,alt:`The New Playbook for AI Visibility & Monetization — major shifts, distribution engine, and agency monetization table`,afterHeading:`Best Content Plays`},{src:dI,alt:`The 2026 AI Visibility Playbook: Beyond Traditional SEO — new rules of AI visibility, strategic monetization opportunities, and SEO vs GEO comparison`,afterHeading:``}],"ai-citations-intro":[{src:mI,alt:`The 2026 AI Citation Playbook: Moving Beyond Traditional SEO — ski ramp effect, high-authority distribution, and corporate citation dominance`,afterHeading:``},{src:hI,alt:`The AI Citation Ski Ramp: Where ChatGPT Pulls Your Content From — 44.2% from first 30%, 31.1% from middle, 24.7% from final third`,afterHeading:`Corporate Authority Wins`},{src:gI,alt:`The AI Citation Playbook: How to Win the 2026 Visibility Game — ski ramp effect, corporate authority vs community threads, front-load every page`,afterHeading:`What This Means for Your Industry`},{src:_I,alt:`The AI Visibility Funnel: Navigating the 2026 Citation Shift — 527% YoY LLM traffic growth, LinkedIn as top-tier source, sentiment and reputation risk`,afterHeading:`FAQ`}],"geo-optimization-2026":[{src:pI,alt:`AI Search Is Eating Your Traffic: The 2026 Reality Check — 527% YoY LLM traffic growth, 58% click reduction from AI Overviews, 6.5x more likely to be cited via third-party sites`,afterHeading:`What Is GEO`},{src:bI,alt:`Techie Bestie AI-powered dashboard showing search analytics, ChatGPT integration, and multi-channel visibility tracking tools`,afterHeading:`3. Stack Third-Party Mentions`},{src:vI,alt:`SEO vs AEO vs GEO: Which One Gets You Found in 2026 — 
66comparing search engine optimization, answer engine optimization, and generative engine optimization focus areas`,afterHeading:`What Google's FACTS`},{src:yI,alt:`Techie Bestie certified badge — full-spectrum AI visibility and agentic engineering expertise`,afterHeading:`Conclusion`}],"claude-creative-is-a-monster-how-to-use-it-for-seo-aeo-and-marketing-in-2026":[{src:SI,alt:`2026 SEO Strategy: Mastering Claude Creative — shifting from traditional SEO to an AI-driven Answer Engine Optimization growth engine with 400M+ weekly AI queries and the 30% citation rule`,afterHeading:`Why Claude Creative Matters`},{src:xI,alt:`The 2026 SEO Evolution: Claude Creative as Your Growth Strategist — comparing traditional SEO and manual workflows to Claude-powered strategy, content ecosystems, topic clusters, and intent-based grouping`,afterHeading:`Claude Creative for SEO Content Systems`}],"chatgpt-launched-ads-2026":[{src:EI,alt:`The 2026 AI Search Revolution: ChatGPT Ads and the New SEO Stack — $3 to $5 per click intent-driven inventory, 4 to 5x higher conversion rates, 44.2% citation concentration, and the new GEO and AEO content optimization stack`,afterHeading:`FAQ`},{src:TI,alt:`The 2026 AI Search Citation Playbook: 5 step strategy for increasing brand visibility in ChatGPT, Gemini, and Perplexity through open LLM bot access, front-loaded answers, FAQ blocks, 90 day refresh cycles, and entity signals`,afterHeading:`What SEOs Should Do This Week`}],"organic-ai-window-closing-2026":[{src:kI,alt:`The AI Organic Window is Closing: Act Now or Pay Later — 2026 visibility shift, aggregator decline, AI-generated ads, 6.5x third-party rule, entity moats, and machine extraction strategies`,afterHeading:`The Ads Are Coming`},{src:OI,alt:`5 AI Search Visibility Moves for May 2026 — own your original content, earn third-party citations, name your proprietary data, map query fan-out sub-questions, and structure pages for extraction`,afterHeading:`What to Do This Week`}]},BI=({post:e,onBack:t})=>{let n=VI(e.content,e.title),r=FI(e),i=zI[is(e.title)]||[];return(0,p.jsxs)(`div`,{className:`min-h-screen bg-background`,children:[(0,p.jsx)(c,{}),(0,p.jsxs)(`main`,{id:`main-content`,children:[(0,p.jsxs)(`section`,{className:`pt-24 pb-14 relative overflow-hidden`,children:[(0,p.jsx)(`div`,{className:`absolute inset-0 bg-gradient-to-br from-[hsl(210,30%,10%)] via-[hsl(210,30%,6%)] to-[hsl(210,30%,3%)]`}),(0,p.jsx)(`div`,{className:`absolute top-[-60px] left-1/2 -translate-x-1/2 w-[600px] h-[600px] bg-[radial-gradient(ellipse,hsl(var(--primary)/0.08),transparent_65%)] pointer-events-none`}),(0,p.jsx)(`div`,{className:`container mx-auto px-6 max-w-[820px] relative text-center`,children:(0,p.jsxs)(s.div,{...NI,children:[(0,p.jsxs)(`span`,{className:`inline-block font-display text-[11px] font-bold tracking-[0.22em] uppercase text-primary bg-primary/10 border border-primary/20 rounded-full px-4 py-1.5 mb-5`,children:[`AI Strategy · `,new Date(e.created_at).toLocaleDateString(`en-US`,{month:`long`,year:`numeric`})]}),(0,p.jsx)(`h1`,{className:`font-display text-3xl md:text-5xl font-extrabold text-foreground leading-[1.1] mb-5 max-w-[820px] mx-auto`,children:e.title}),(0,p.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`By `,(0,p.jsx)(`strong`,{className:`text-foreground/80`,children:`Brianna Blaney`}),` \xA0·\xA0 Techie Bestie \xA0·\xA0 `,new Date(e.created_at).toLocaleDateString(`en-US`,{month:`long`,year:`numeric`}),` \xA0·\xA0 `,Math.max(3,Math.ceil(e.content.length/1200)),` min read`]})]})})]}),(0,p.jsx)(`section`,{className:`pb-20`,children:(0,p.jsxs)(`div`,{className:`container mx-auto px-6 max-w-[820px]`,children:[(0,p.jsxs)(`button`,{onClick:t,className:`flex items-center gap-2 text-muted-foreground hover:text-primary transition-colors mb-10 text-sm`,children:[(0,p.jsx)(Xe,{className:`w-4 h-4`}),` Back to Blog`]}),r&&(0,p.jsx)(s.div,{...NI,className:`mb-10 rounded-2xl overflow-hidden border border-border`,children:(0,p.jsx)(`img`,{src:r,alt:e.title,className:`w-full h-auto`})}),i.filter(e=>!e.afterHeading).map((e,t)=>(0,p.jsx)(s.div,{...NI,className:`rounded-2xl overflow-hidden border border-border hover:border-primary/30 transition-colors mb-10`,children:(0,p.jsx)(`a`,{href:e.src,target:`_blank`,rel:`noopener noreferrer`,children:(0,p.jsx)(`img`,{src:e.src,alt:e.alt,className:`w-full h-auto`,loading:`lazy`,decoding:`async`})})},`top-${t}`)),(0,p.jsx)(s.article,{...NI,className:`blog-prose`,children:n.map((e,t)=>{let n=e.type===`heading`||e.type===`subheading`?i.find(t=>t.afterHeading&&e.text.startsWith(t.afterHeading)):null;return(0,p.jsxs)(`div`,{children:[n&&(0,p.jsx)(s.div,{...NI,className:`rounded-2xl overflow-hidden border border-border hover:border-primary/30 transition-colors my-8`,children:(0,p.jsx)(`a`,{href:n.src,target:`_blank`,rel:`noopener noreferrer`,children:(0,p.jsx)(`img`,{src:n.src,alt:n.alt,className:`w-full h-auto`})})}),(0,p.jsx)(HI,{block:e})]},t)})}),(0,p.jsxs)(`div`,{className:`relative overflow-hidden bg-gradient-to-br from-[hsl(210,35%,10%)] via-[hsl(205,40%,12%)] to-[hsl(210,35%,10%)] border border-primary/15 rounded-2xl p-12 md:p-14 text-center mt-16`,children:[(0,p.jsx)(`div`,{className:`absolute top-0 left-1/2 -translate-x-1/2 w-[400px] h-[200px] bg-[radial-gradient(ellipse,hsl(var(--primary)/0.07),transparent_70%)] pointer-events-none`}),(0,p.jsx)(`p`,{className:`font-display text-[11px] font-bold tracking-[0.2em] uppercase text-primary/70 mb-3`,children:`Your Techie Bestie`}),(0,p.jsxs)(`h2`,{className:`font-display text-2xl md:text-4xl font-extrabold text-foreground mb-4 leading-tight`,children:[`Ready to Get Cited,`,(0,p.jsx)(`br`,{}),`Not Just Ranked?`]}),(0,p.jsx)(`p`,{className:`text-muted-foreground text-[15px] max-w-md mx-auto mb-8 leading-relaxed`,children:`SEO, GEO, agentic engineering, content, and web development, all from one expert who actually builds this stuff.`}),(0,p.jsxs)(`div`,{className:`flex gap-3 justify-center flex-wrap`,children:[(0,p.jsx)(`a`,{href:`/services`,className:`inline-block px-6 py-2.5 rounded-lg font-display text-xs font-bold tracking-[0.06em] uppercase bg-primary text-primary-foreground hover:shadow-[0_0_28px_hsl(var(--primary)/0.45)] hover:-translate-y-0.5 transition-all`,children:`See What I Build`}),(0,p.jsx)(`a`,{href:`/contact`,className:`inline-block px-6 py-2.5 rounded-lg font-display text-xs font-bold tracking-[0.06em] uppercase border border-primary/40 text-primary hover:bg-primary/10 transition-all`,children:`Let's Talk`})]})]})]})})]}),(0,p.jsx)(d,{})]})};function VI(e,t){let n=e.split(`
67`).filter(e=>e.trim()),r=[];for(let e=0;e<n.length;e++){let i=(n[e]??``).trim();if(i.startsWith(`|`)&&i.includes(`|`,1)){let t=n[e+1]?.trim();if(t?.startsWith(`|`)&&/^\|[\s\-:|]+\|$/.test(t.replace(/\s/g,``))){let t=i.split(`|`).slice(1,-1).map(e=>e.trim());e+=2;let a=[];for(;e<n.length&&(n[e]??``).trim().startsWith(`|`);){let t=(n[e]??``).trim();a.push(t.split(`|`).slice(1,-1).map(e=>e.trim())),e++}e--,r.push({type:`table`,text:``,tableData:{headers:t,rows:a}});continue}}if(i.startsWith(`{{TABLE:`)){let t=[i.replace(`{{TABLE:`,``)];for(e++;e<n.length&&!(n[e]??``).trim().endsWith(`}}`);)t.push((n[e]??``).trim()),e++;if(e<n.length){let r=(n[e]??``).trim().replace(`}}`,``);r&&t.push(r)}let a=(t[0]??``).split(`|`).map(e=>e.trim()),o=t.slice(1).map(e=>e.split(`|`).map(e=>e.trim()));r.push({type:`table`,text:``,tableData:{headers:a,rows:o}});continue}if(i.startsWith(`{{CHART:`)){let t=[i.replace(`{{CHART:`,``)];for(e++;e<n.length&&!(n[e]??``).trim().endsWith(`}}`);)t.push((n[e]??``).trim()),e++;if(e<n.length){let r=(n[e]??``).trim().replace(`}}`,``);r&&t.push(r)}let a=(t[0]??``).split(`|`).map(e=>e.trim()),o=t.slice(1).map(e=>{let[t=``,n=``]=e.split(`|`).map(e=>e.trim());return{label:t,value:parseFloat(n)}}).filter(e=>e.label&&!isNaN(e.value));
67r.push({type:`chart`,text:``,chartData:{title:a[0],source:a[1],bars:o}});continue}let a=i.match(/^!\[([^\]]*)\]\(([^)]+)\)$/);if(a){r.push({type:`image`,text:``,imageData:{alt:a[1]?.trim()||`Illustration accompanying ${t}`,src:a[2]??``}});continue}let o=i.match(/^(#{1,6})\s+(.+)$/);if(o){let e=r.some(e=>e.type===`heading`),t=(o[1]??``).length;r.push({type:t>=3&&e?`subheading`:`heading`,text:o[2]??``})}else if(i.startsWith(`"`)&&i.endsWith(`"`))r.push({type:`quote`,text:i.slice(1,-1)});else if(i.length<80&&!i.endsWith(`.`)&&!i.endsWith(`,`)&&!i.startsWith(`By `)&&r.length>0&&/^[A-Z]/.test(i)&&!i.includes(`. `)&&!(i.includes(`:`)&&i.split(`,`).length>=2)&&i.split(`,`).length<4)r.push({type:`heading`,text:i});else if(i.startsWith(`- `)){let t=[i.slice(2)];for(;e+1<n.length&&(n[e+1]??``).trim().startsWith(`- `);)e++,t.push((n[e]??``).trim().slice(2));r.push({type:`list`,text:``,listItems:t})}else r.push({type:`paragraph`,text:i})}return r}var HI=({block:e})=>{switch(e.type){case`heading`:return(0,p.jsx)(`h2`,{className:`font-display text-xl md:text-[28px] font-extrabold text-foreground mt-14 mb-4 leading-[1.2]`,children:e.text});case`subheading`:return(0,p.jsx)(`h3`,{className:`font-display text-[17px] font-bold text-primary mt-9 mb-3`,children:e.text});case`quote`:return(0,p.jsx)(`blockquote`,{className:`border-l-[3px] border-primary bg-card rounded-r-xl px-7 py-5 my-9 text-lg italic text-foreground leading-relaxed`,children:e.text});case`table`:return e.tableData?(0,p.jsx)(`div`,{className:`my-10 overflow-x-auto rounded-2xl border border-primary/20 bg-gradient-to-br from-card via-card to-primary/[0.03] shadow-[0_4px_24px_-6px_hsl(var(--primary)/0.1)]`,children:(0,p.jsxs)(`table`,{className:`w-full text-sm`,role:`table`,children:[(0,p.jsx)(`caption`,{className:`sr-only`,children:`Comparison Chart`}),(0,p.jsx)(`thead`,{children:(0,p.jsx)(`tr`,{className:`bg-gradient-to-r from-primary/15 to-primary/5 border-b border-primary/15`,children:e.tableData.headers.map((e,t)=>(0,p.jsxs)(`th`,{className:`px-5 py-4 text-left font-display font-bold text-foreground text-xs tracking-wide uppercase ${t===0?`min-w-[140px]`:``}`,children:[t===0&&(0,p.jsx)(`span`,{className:`inline-block w-1.5 h-1.5 rounded-full bg-primary mr-2 align-middle`}),e]},t))})}),(0,p.jsx)(`tbody`,{children:e.tableData.rows.map((e,t)=>(0,p.jsx)(`tr`,{className:`border-b border-border/30 last:border-0 hover:bg-primary/[0.04] transition-all duration-200 group`,children:e.map((e,t)=>(0,p.jsx)(`td`,{className:`px-5 py-4 leading-relaxed ${t===0?`min-w-[140px] font-semibold text-foreground group-hover:text-primary transition-colors`:`text-muted-foreground`}`,children:(0,p.jsx)(UI,{text:e})},t))},t))})]})}):null;case`chart`:{if(!e.chartData)return null;let{title:t,source:n,bars:r}=e.chartData,i=r.map(e=>({label:e.label,original:e.value,magnitude:Math.abs(e.value),fill:e.value>=0?`hsl(var(--primary))`:`hsl(var(--destructive))`})),a=Math.max(...i.map(e=>e.magnitude)),o=typeof window<`u`&&window.innerWidth<640,s=o?88:140,c=o?11:13,l=o?11:12,u=o?44:64;return(0,p.jsxs)(`div`,{className:`my-10 rounded-2xl border border-primary/20 bg-gradient-to-br from-card via-card to-primary/[0.03] shadow-[0_4px_24px_-6px_hsl(var(--primary)/0.1)] p-4 sm:p-6 md:p-8`,children:[t&&(0,p.jsx)(`p`,{className:`font-display text-[11px] font-bold tracking-[0.2em] uppercase text-primary/80 mb-4`,children:t}),(0,p.jsx)(`div`,{style:{width:`100%`,height:Math.max(220,r.length*56)},children:(0,p.jsx)(ch,{children:(0,p.jsxs)($F,{data:i,layout:`vertical`,margin:{top:8,right:u,left:4,bottom:8},children:[(0,p.jsx)(pP,{type:`number`,domain:[0,a*1.2],hide:!0}),(0,p.jsx)(AP,{type:`category`,dataKey:`label`,width:s,tick:{fill:`hsl(var(--foreground))`,fontSize:c},axisLine:!1,tickLine:!1,interval:0}),(0,p.jsx)(Um,{cursor:{fill:`hsl(var(--primary) / 0.06)`},contentStyle:{background:`hsl(var(--card))`,border:`1px solid hsl(var(--primary) / 0.3)`,borderRadius:8,color:`hsl(var(--foreground))`},formatter:(e,t,n)=>{let r=n?.payload?.original??0;return[`${r>0?`+`:``}${r} pts`,`Visibility`]}}),(0,p.jsxs)(yj,{dataKey:`magnitude`,radius:[6,6,6,6],children:[i.map((e,t)=>(0,p.jsx)(lh,{fill:e.fill},t)),(0,p.jsx)(yT,{dataKey:`original`,position:`right`,formatter:e=>`${e>0?`+`:``}${e}`,style:{fill:`hsl(var(--foreground))`,fontSize:l,fontWeight:600}})]})]})})}),n&&(0,p.jsx)(`p`,{className:`text-xs text-muted-foreground mt-4 italic`,children:n})]})}case`image`:return e.imageData?(0,p.jsx)(`figure`,{className:`my-10 rounded-2xl overflow-hidden border border-border hover:border-primary/30 transition-colors`,children:(0,p.jsx)(`a`,{href:e.imageData.src,target:`_blank`,rel:`noopener noreferrer`,children:(0,p.jsx)(`img`,{src:e.imageData.src,alt:e.imageData.alt,className:`w-full h-auto`,loading:`lazy`,decoding:`async`})})}):null;case`list`:return e.listItems?(0,p.jsx)(`ul`,{className:`my-5 space-y-2.5 pl-1`,children:e.listItems.map((e,t)=>(0,p.jsxs)(`li`,{className:`flex gap-3 text-muted-foreground leading-[1.8]`,children:[(0,p.jsx)(`span`,{className:`text-primary mt-1.5 text-[8px]`,children:`●`}),(0,p.jsx)(`span`,{children:(0,p.jsx)(UI,{text:e})})]},t))}):null;default:return(0,p.jsx)(`p`,{className:`text-muted-foreground leading-[1.8] mb-5`,children:(0,p.jsx)(UI,{text:e.text})})}},UI=({text:e})=>{let t=e.split(/(\[[^\]]+\]\([^)]+\)|\*\*[^*]+\*\*)/g);return(0,p.jsx)(p.Fragment,{children:t.map((e,t)=>{let n=e.match(/^\[([^\]]+)\]\(([^)]+)\)$/);if(n)return(0,p.jsx)(`a`,{href:n[2],className:`text-primary hover:text-primary/80 underline underline-offset-2 transition-colors`,children:n[1]},t);let r=e.match(/^\*\*([^*]+)\*\*$/);return r?(0,p.jsx)(`strong`,{className:`text-foreground font-semibold`,children:r[1]},t):(0,p.jsx)(`span`,{children:e},t)})})};export{x as _,De as a,se as b,ve as c,pe as d,S as f,E as g,D as h,ts as i,_e as l,O as m,FI as n,Ce as o,k as p,is as r,Se as s,II as t,me as u,A as v,g as x,T as y};

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