@digital-realty/ui-mfe-dcim 17.0.0-GP-6771.566507 → 17.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/app-BOyxoeHu.js +120 -0
- package/dist/index.html +1 -1
- package/dist/ui-mfe-dcim.js +1 -1
- package/dist/ui-mfe-html-dcim.js +1 -1
- package/dist/ui-mfe-light-dcim.js +1 -1
- package/package.json +5 -5
- package/dist/assets/app-CZvvx5mG.js +0 -120
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
var wU=Object.defineProperty;var TU=(t,e,r)=>e in t?wU(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var Xe=(t,e,r)=>TU(t,typeof e!="symbol"?e+"":e,r);import*as ue from"react";import Nt,{useSyncExternalStore as x0,useState as sr,useRef as Kt,useCallback as bt,useEffect as ht,useMemo as yr,createContext as pd,useContext as Wu,Component as SU,Fragment as CU,useLayoutEffect as VR,forwardRef as ji,createElement as es,cloneElement as EU,useId as OU}from"react";import*as AU from"react-dom";import RU from"react-dom";import{IxButton as w0}from"@digital-realty/ix-button/IxButton";import{IxIcon as $i}from"@digital-realty/ix-icon/IxIcon";import{IxDivider as IU}from"@digital-realty/ix-divider/IxDivider";import{IxProgress as Tf}from"@digital-realty/ix-progress/IxProgress";import{IxDialog as DU}from"@digital-realty/ix-dialog/IxDialog";import{IxSelect as MU}from"@digital-realty/ix-select/IxSelect";import{IxSelectOption as PU}from"@digital-realty/ix-select/IxSelectOption";import{IxDrawer as LU}from"@digital-realty/ix-drawer/IxDrawer";import{IxIconButton as NU}from"@digital-realty/ix-icon-button/IxIconButton";import{IxPagination as FU}from"@digital-realty/ix-grid/IxPagination";import{IxSwitch as GR}from"@digital-realty/ix-switch/IxSwitch";import{IxTextbox as kU,getTextboxInputValue as jU}from"@digital-realty/ix-textbox/IxTextbox";import{html as $U}from"lit";import{ifDefined as UU}from"lit/directives/if-defined.js";import"@digital-realty/ix-toast/ix-message-toast.js";import{IxCheckbox as KR}from"@digital-realty/ix-checkbox/IxCheckbox";import{IxDateNext as Sw}from"@digital-realty/ix-date-next/IxDateNext";var di=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function gi(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function qU(t){if(Object.prototype.hasOwnProperty.call(t,"__esModule"))return t;var e=t.default;if(typeof e=="function"){var r=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(n){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}),r}var dp={exports:{}},Gs={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-jsx-runtime.production.min.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var Cw;function HU(){if(Cw)return Gs;Cw=1;var t=Nt,e=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,i=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function o(s,l,c){var d,h={},g=null,m=null;c!==void 0&&(g=""+c),l.key!==void 0&&(g=""+l.key),l.ref!==void 0&&(m=l.ref);for(d in l)n.call(l,d)&&!a.hasOwnProperty(d)&&(h[d]=l[d]);if(s&&s.defaultProps)for(d in l=s.defaultProps,l)h[d]===void 0&&(h[d]=l[d]);return{$$typeof:e,type:s,key:g,ref:m,props:h,_owner:i.current}}return Gs.Fragment=r,Gs.jsx=o,Gs.jsxs=o,Gs}var Ew;function WU(){return Ew||(Ew=1,dp.exports=HU()),dp.exports}var R=WU();function Sf(t,e){return Sf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},Sf(t,e)}function ys(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,Sf(t,e)}var bs=(function(){function t(){this.listeners=[]}var e=t.prototype;return e.subscribe=function(n){var i=this,a=n||function(){};return this.listeners.push(a),this.onSubscribe(),function(){i.listeners=i.listeners.filter(function(o){return o!==a}),i.onUnsubscribe()}},e.hasListeners=function(){return this.listeners.length>0},e.onSubscribe=function(){},e.onUnsubscribe=function(){},t})();function ct(){return ct=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},ct.apply(null,arguments)}var Cf=typeof window>"u";function Pr(){}function BU(t,e){return typeof t=="function"?t(e):t}function Ty(t){return typeof t=="number"&&t>=0&&t!==1/0}function Ef(t){return Array.isArray(t)?t:[t]}function XR(t,e){return Math.max(t+(e||0)-Date.now(),0)}function hf(t,e,r){return Bu(t)?typeof e=="function"?ct({},r,{queryKey:t,queryFn:e}):ct({},e,{queryKey:t}):t}function zU(t,e,r){return Bu(t)?typeof e=="function"?ct({},r,{mutationKey:t,mutationFn:e}):ct({},e,{mutationKey:t}):typeof t=="function"?ct({},e,{mutationFn:t}):ct({},t)}function fa(t,e,r){return Bu(t)?[ct({},e,{queryKey:t}),r]:[t||{},e]}function VU(t,e){if(t===!0&&e===!0||t==null&&e==null)return"all";if(t===!1&&e===!1)return"none";var r=t??!e;return r?"active":"inactive"}function Ow(t,e){var r=t.active,n=t.exact,i=t.fetching,a=t.inactive,o=t.predicate,s=t.queryKey,l=t.stale;if(Bu(s)){if(n){if(e.queryHash!==T0(s,e.options))return!1}else if(!Of(e.queryKey,s))return!1}var c=VU(r,a);if(c==="none")return!1;if(c!=="all"){var d=e.isActive();if(c==="active"&&!d||c==="inactive"&&d)return!1}return!(typeof l=="boolean"&&e.isStale()!==l||typeof i=="boolean"&&e.isFetching()!==i||o&&!o(e))}function Aw(t,e){var r=t.exact,n=t.fetching,i=t.predicate,a=t.mutationKey;if(Bu(a)){if(!e.options.mutationKey)return!1;if(r){if(eo(e.options.mutationKey)!==eo(a))return!1}else if(!Of(e.options.mutationKey,a))return!1}return!(typeof n=="boolean"&&e.state.status==="loading"!==n||i&&!i(e))}function T0(t,e){var r=(e==null?void 0:e.queryKeyHashFn)||eo;return r(t)}function eo(t){var e=Ef(t);return GU(e)}function GU(t){return JSON.stringify(t,function(e,r){return Sy(r)?Object.keys(r).sort().reduce(function(n,i){return n[i]=r[i],n},{}):r})}function Of(t,e){return YR(Ef(t),Ef(e))}function YR(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?!Object.keys(e).some(function(r){return!YR(t[r],e[r])}):!1}function Af(t,e){if(t===e)return t;var r=Array.isArray(t)&&Array.isArray(e);if(r||Sy(t)&&Sy(e)){for(var n=r?t.length:Object.keys(t).length,i=r?e:Object.keys(e),a=i.length,o=r?[]:{},s=0,l=0;l<a;l++){var c=r?l:i[l];o[c]=Af(t[c],e[c]),o[c]===t[c]&&s++}return n===a&&s===n?t:o}return e}function KU(t,e){if(t&&!e||e&&!t)return!1;for(var r in t)if(t[r]!==e[r])return!1;return!0}function Sy(t){if(!Rw(t))return!1;var e=t.constructor;if(typeof e>"u")return!0;var r=e.prototype;return!(!Rw(r)||!r.hasOwnProperty("isPrototypeOf"))}function Rw(t){return Object.prototype.toString.call(t)==="[object Object]"}function Bu(t){return typeof t=="string"||Array.isArray(t)}function XU(t){return new Promise(function(e){setTimeout(e,t)})}function Iw(t){Promise.resolve().then(t).catch(function(e){return setTimeout(function(){throw e})})}function ZR(){if(typeof AbortController=="function")return new AbortController}var YU=(function(t){ys(e,t);function e(){var n;return n=t.call(this)||this,n.setup=function(i){var a;if(!Cf&&((a=window)!=null&&a.addEventListener)){var o=function(){return i()};return window.addEventListener("visibilitychange",o,!1),window.addEventListener("focus",o,!1),function(){window.removeEventListener("visibilitychange",o),window.removeEventListener("focus",o)}}},n}var r=e.prototype;return r.onSubscribe=function(){this.cleanup||this.setEventListener(this.setup)},r.onUnsubscribe=function(){if(!this.hasListeners()){var i;(i=this.cleanup)==null||i.call(this),this.cleanup=void 0}},r.setEventListener=function(i){var a,o=this;this.setup=i,(a=this.cleanup)==null||a.call(this),this.cleanup=i(function(s){typeof s=="boolean"?o.setFocused(s):o.onFocus()})},r.setFocused=function(i){this.focused=i,i&&this.onFocus()},r.onFocus=function(){this.listeners.forEach(function(i){i()})},r.isFocused=function(){return typeof this.focused=="boolean"?this.focused:typeof document>"u"?!0:[void 0,"visible","prerender"].includes(document.visibilityState)},e})(bs),xu=new YU,ZU=(function(t){ys(e,t);function e(){var n;return n=t.call(this)||this,n.setup=function(i){var a;if(!Cf&&((a=window)!=null&&a.addEventListener)){var o=function(){return i()};return window.addEventListener("online",o,!1),window.addEventListener("offline",o,!1),function(){window.removeEventListener("online",o),window.removeEventListener("offline",o)}}},n}var r=e.prototype;return r.onSubscribe=function(){this.cleanup||this.setEventListener(this.setup)},r.onUnsubscribe=function(){if(!this.hasListeners()){var i;(i=this.cleanup)==null||i.call(this),this.cleanup=void 0}},r.setEventListener=function(i){var a,o=this;this.setup=i,(a=this.cleanup)==null||a.call(this),this.cleanup=i(function(s){typeof s=="boolean"?o.setOnline(s):o.onOnline()})},r.setOnline=function(i){this.online=i,i&&this.onOnline()},r.onOnline=function(){this.listeners.forEach(function(i){i()})},r.isOnline=function(){return typeof this.online=="boolean"?this.online:typeof navigator>"u"||typeof navigator.onLine>"u"?!0:navigator.onLine},e})(bs),pf=new ZU;function JU(t){return Math.min(1e3*Math.pow(2,t),3e4)}function Rf(t){return typeof(t==null?void 0:t.cancel)=="function"}var JR=function(e){this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent};function gf(t){return t instanceof JR}var QR=function(e){var r=this,n=!1,i,a,o,s;this.abort=e.abort,this.cancel=function(g){return i==null?void 0:i(g)},this.cancelRetry=function(){n=!0},this.continueRetry=function(){n=!1},this.continue=function(){return a==null?void 0:a()},this.failureCount=0,this.isPaused=!1,this.isResolved=!1,this.isTransportCancelable=!1,this.promise=new Promise(function(g,m){o=g,s=m});var l=function(m){r.isResolved||(r.isResolved=!0,e.onSuccess==null||e.onSuccess(m),a==null||a(),o(m))},c=function(m){r.isResolved||(r.isResolved=!0,e.onError==null||e.onError(m),a==null||a(),s(m))},d=function(){return new Promise(function(m){a=m,r.isPaused=!0,e.onPause==null||e.onPause()}).then(function(){a=void 0,r.isPaused=!1,e.onContinue==null||e.onContinue()})},h=function g(){if(!r.isResolved){var m;try{m=e.fn()}catch(v){m=Promise.reject(v)}i=function(_){if(!r.isResolved&&(c(new JR(_)),r.abort==null||r.abort(),Rf(m)))try{m.cancel()}catch{}},r.isTransportCancelable=Rf(m),Promise.resolve(m).then(l).catch(function(v){var _,y;if(!r.isResolved){var x=(_=e.retry)!=null?_:3,w=(y=e.retryDelay)!=null?y:JU,C=typeof w=="function"?w(r.failureCount,v):w,A=x===!0||typeof x=="number"&&r.failureCount<x||typeof x=="function"&&x(r.failureCount,v);if(n||!A){c(v);return}r.failureCount++,e.onFail==null||e.onFail(r.failureCount,v),XU(C).then(function(){if(!xu.isFocused()||!pf.isOnline())return d()}).then(function(){n?c(v):g()})}})}};h()},QU=(function(){function t(){this.queue=[],this.transactions=0,this.notifyFn=function(r){r()},this.batchNotifyFn=function(r){r()}}var e=t.prototype;return e.batch=function(n){var i;this.transactions++;try{i=n()}finally{this.transactions--,this.transactions||this.flush()}return i},e.schedule=function(n){var i=this;this.transactions?this.queue.push(n):Iw(function(){i.notifyFn(n)})},e.batchCalls=function(n){var i=this;return function(){for(var a=arguments.length,o=new Array(a),s=0;s<a;s++)o[s]=arguments[s];i.schedule(function(){n.apply(void 0,o)})}},e.flush=function(){var n=this,i=this.queue;this.queue=[],i.length&&Iw(function(){n.batchNotifyFn(function(){i.forEach(function(a){n.notifyFn(a)})})})},e.setNotifyFunction=function(n){this.notifyFn=n},e.setBatchNotifyFunction=function(n){this.batchNotifyFn=n},t})(),Jt=new QU,eI=console;function If(){return eI}function eq(t){eI=t}var tq=(function(){function t(r){this.abortSignalConsumed=!1,this.hadObservers=!1,this.defaultOptions=r.defaultOptions,this.setOptions(r.options),this.observers=[],this.cache=r.cache,this.queryKey=r.queryKey,this.queryHash=r.queryHash,this.initialState=r.state||this.getDefaultState(this.options),this.state=this.initialState,this.meta=r.meta,this.scheduleGc()}var e=t.prototype;return e.setOptions=function(n){var i;this.options=ct({},this.defaultOptions,n),this.meta=n==null?void 0:n.meta,this.cacheTime=Math.max(this.cacheTime||0,(i=this.options.cacheTime)!=null?i:300*1e3)},e.setDefaultOptions=function(n){this.defaultOptions=n},e.scheduleGc=function(){var n=this;this.clearGcTimeout(),Ty(this.cacheTime)&&(this.gcTimeout=setTimeout(function(){n.optionalRemove()},this.cacheTime))},e.clearGcTimeout=function(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)},e.optionalRemove=function(){this.observers.length||(this.state.isFetching?this.hadObservers&&this.scheduleGc():this.cache.remove(this))},e.setData=function(n,i){var a,o,s=this.state.data,l=BU(n,s);return(a=(o=this.options).isDataEqual)!=null&&a.call(o,s,l)?l=s:this.options.structuralSharing!==!1&&(l=Af(s,l)),this.dispatch({data:l,type:"success",dataUpdatedAt:i==null?void 0:i.updatedAt}),l},e.setState=function(n,i){this.dispatch({type:"setState",state:n,setStateOptions:i})},e.cancel=function(n){var i,a=this.promise;return(i=this.retryer)==null||i.cancel(n),a?a.then(Pr).catch(Pr):Promise.resolve()},e.destroy=function(){this.clearGcTimeout(),this.cancel({silent:!0})},e.reset=function(){this.destroy(),this.setState(this.initialState)},e.isActive=function(){return this.observers.some(function(n){return n.options.enabled!==!1})},e.isFetching=function(){return this.state.isFetching},e.isStale=function(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some(function(n){return n.getCurrentResult().isStale})},e.isStaleByTime=function(n){return n===void 0&&(n=0),this.state.isInvalidated||!this.state.dataUpdatedAt||!XR(this.state.dataUpdatedAt,n)},e.onFocus=function(){var n,i=this.observers.find(function(a){return a.shouldFetchOnWindowFocus()});i&&i.refetch(),(n=this.retryer)==null||n.continue()},e.onOnline=function(){var n,i=this.observers.find(function(a){return a.shouldFetchOnReconnect()});i&&i.refetch(),(n=this.retryer)==null||n.continue()},e.addObserver=function(n){this.observers.indexOf(n)===-1&&(this.observers.push(n),this.hadObservers=!0,this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:n}))},e.removeObserver=function(n){this.observers.indexOf(n)!==-1&&(this.observers=this.observers.filter(function(i){return i!==n}),this.observers.length||(this.retryer&&(this.retryer.isTransportCancelable||this.abortSignalConsumed?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.cacheTime?this.scheduleGc():this.cache.remove(this)),this.cache.notify({type:"observerRemoved",query:this,observer:n}))},e.getObserversCount=function(){return this.observers.length},e.invalidate=function(){this.state.isInvalidated||this.dispatch({type:"invalidate"})},e.fetch=function(n,i){var a=this,o,s,l;if(this.state.isFetching){if(this.state.dataUpdatedAt&&(i!=null&&i.cancelRefetch))this.cancel({silent:!0});else if(this.promise){var c;return(c=this.retryer)==null||c.continueRetry(),this.promise}}if(n&&this.setOptions(n),!this.options.queryFn){var d=this.observers.find(function(w){return w.options.queryFn});d&&this.setOptions(d.options)}var h=Ef(this.queryKey),g=ZR(),m={queryKey:h,pageParam:void 0,meta:this.meta};Object.defineProperty(m,"signal",{enumerable:!0,get:function(){if(g)return a.abortSignalConsumed=!0,g.signal}});var v=function(){return a.options.queryFn?(a.abortSignalConsumed=!1,a.options.queryFn(m)):Promise.reject("Missing queryFn")},_={fetchOptions:i,options:this.options,queryKey:h,state:this.state,fetchFn:v,meta:this.meta};if((o=this.options.behavior)!=null&&o.onFetch){var y;(y=this.options.behavior)==null||y.onFetch(_)}if(this.revertState=this.state,!this.state.isFetching||this.state.fetchMeta!==((s=_.fetchOptions)==null?void 0:s.meta)){var x;this.dispatch({type:"fetch",meta:(x=_.fetchOptions)==null?void 0:x.meta})}return this.retryer=new QR({fn:_.fetchFn,abort:g==null||(l=g.abort)==null?void 0:l.bind(g),onSuccess:function(C){a.setData(C),a.cache.config.onSuccess==null||a.cache.config.onSuccess(C,a),a.cacheTime===0&&a.optionalRemove()},onError:function(C){gf(C)&&C.silent||a.dispatch({type:"error",error:C}),gf(C)||(a.cache.config.onError==null||a.cache.config.onError(C,a),If().error(C)),a.cacheTime===0&&a.optionalRemove()},onFail:function(){a.dispatch({type:"failed"})},onPause:function(){a.dispatch({type:"pause"})},onContinue:function(){a.dispatch({type:"continue"})},retry:_.options.retry,retryDelay:_.options.retryDelay}),this.promise=this.retryer.promise,this.promise},e.dispatch=function(n){var i=this;this.state=this.reducer(this.state,n),Jt.batch(function(){i.observers.forEach(function(a){a.onQueryUpdate(n)}),i.cache.notify({query:i,type:"queryUpdated",action:n})})},e.getDefaultState=function(n){var i=typeof n.initialData=="function"?n.initialData():n.initialData,a=typeof n.initialData<"u",o=a?typeof n.initialDataUpdatedAt=="function"?n.initialDataUpdatedAt():n.initialDataUpdatedAt:0,s=typeof i<"u";return{data:i,dataUpdateCount:0,dataUpdatedAt:s?o??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchMeta:null,isFetching:!1,isInvalidated:!1,isPaused:!1,status:s?"success":"idle"}},e.reducer=function(n,i){var a,o;switch(i.type){case"failed":return ct({},n,{fetchFailureCount:n.fetchFailureCount+1});case"pause":return ct({},n,{isPaused:!0});case"continue":return ct({},n,{isPaused:!1});case"fetch":return ct({},n,{fetchFailureCount:0,fetchMeta:(a=i.meta)!=null?a:null,isFetching:!0,isPaused:!1},!n.dataUpdatedAt&&{error:null,status:"loading"});case"success":return ct({},n,{data:i.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:(o=i.dataUpdatedAt)!=null?o:Date.now(),error:null,fetchFailureCount:0,isFetching:!1,isInvalidated:!1,isPaused:!1,status:"success"});case"error":var s=i.error;return gf(s)&&s.revert&&this.revertState?ct({},this.revertState):ct({},n,{error:s,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,isFetching:!1,isPaused:!1,status:"error"});case"invalidate":return ct({},n,{isInvalidated:!0});case"setState":return ct({},n,i.state);default:return n}},t})(),rq=(function(t){ys(e,t);function e(n){var i;return i=t.call(this)||this,i.config=n||{},i.queries=[],i.queriesMap={},i}var r=e.prototype;return r.build=function(i,a,o){var s,l=a.queryKey,c=(s=a.queryHash)!=null?s:T0(l,a),d=this.get(c);return d||(d=new tq({cache:this,queryKey:l,queryHash:c,options:i.defaultQueryOptions(a),state:o,defaultOptions:i.getQueryDefaults(l),meta:a.meta}),this.add(d)),d},r.add=function(i){this.queriesMap[i.queryHash]||(this.queriesMap[i.queryHash]=i,this.queries.push(i),this.notify({type:"queryAdded",query:i}))},r.remove=function(i){var a=this.queriesMap[i.queryHash];a&&(i.destroy(),this.queries=this.queries.filter(function(o){return o!==i}),a===i&&delete this.queriesMap[i.queryHash],this.notify({type:"queryRemoved",query:i}))},r.clear=function(){var i=this;Jt.batch(function(){i.queries.forEach(function(a){i.remove(a)})})},r.get=function(i){return this.queriesMap[i]},r.getAll=function(){return this.queries},r.find=function(i,a){var o=fa(i,a),s=o[0];return typeof s.exact>"u"&&(s.exact=!0),this.queries.find(function(l){return Ow(s,l)})},r.findAll=function(i,a){var o=fa(i,a),s=o[0];return Object.keys(s).length>0?this.queries.filter(function(l){return Ow(s,l)}):this.queries},r.notify=function(i){var a=this;Jt.batch(function(){a.listeners.forEach(function(o){o(i)})})},r.onFocus=function(){var i=this;Jt.batch(function(){i.queries.forEach(function(a){a.onFocus()})})},r.onOnline=function(){var i=this;Jt.batch(function(){i.queries.forEach(function(a){a.onOnline()})})},e})(bs),nq=(function(){function t(r){this.options=ct({},r.defaultOptions,r.options),this.mutationId=r.mutationId,this.mutationCache=r.mutationCache,this.observers=[],this.state=r.state||tI(),this.meta=r.meta}var e=t.prototype;return e.setState=function(n){this.dispatch({type:"setState",state:n})},e.addObserver=function(n){this.observers.indexOf(n)===-1&&this.observers.push(n)},e.removeObserver=function(n){this.observers=this.observers.filter(function(i){return i!==n})},e.cancel=function(){return this.retryer?(this.retryer.cancel(),this.retryer.promise.then(Pr).catch(Pr)):Promise.resolve()},e.continue=function(){return this.retryer?(this.retryer.continue(),this.retryer.promise):this.execute()},e.execute=function(){var n=this,i,a=this.state.status==="loading",o=Promise.resolve();return a||(this.dispatch({type:"loading",variables:this.options.variables}),o=o.then(function(){n.mutationCache.config.onMutate==null||n.mutationCache.config.onMutate(n.state.variables,n)}).then(function(){return n.options.onMutate==null?void 0:n.options.onMutate(n.state.variables)}).then(function(s){s!==n.state.context&&n.dispatch({type:"loading",context:s,variables:n.state.variables})})),o.then(function(){return n.executeMutation()}).then(function(s){i=s,n.mutationCache.config.onSuccess==null||n.mutationCache.config.onSuccess(i,n.state.variables,n.state.context,n)}).then(function(){return n.options.onSuccess==null?void 0:n.options.onSuccess(i,n.state.variables,n.state.context)}).then(function(){return n.options.onSettled==null?void 0:n.options.onSettled(i,null,n.state.variables,n.state.context)}).then(function(){return n.dispatch({type:"success",data:i}),i}).catch(function(s){return n.mutationCache.config.onError==null||n.mutationCache.config.onError(s,n.state.variables,n.state.context,n),If().error(s),Promise.resolve().then(function(){return n.options.onError==null?void 0:n.options.onError(s,n.state.variables,n.state.context)}).then(function(){return n.options.onSettled==null?void 0:n.options.onSettled(void 0,s,n.state.variables,n.state.context)}).then(function(){throw n.dispatch({type:"error",error:s}),s})})},e.executeMutation=function(){var n=this,i;return this.retryer=new QR({fn:function(){return n.options.mutationFn?n.options.mutationFn(n.state.variables):Promise.reject("No mutationFn found")},onFail:function(){n.dispatch({type:"failed"})},onPause:function(){n.dispatch({type:"pause"})},onContinue:function(){n.dispatch({type:"continue"})},retry:(i=this.options.retry)!=null?i:0,retryDelay:this.options.retryDelay}),this.retryer.promise},e.dispatch=function(n){var i=this;this.state=iq(this.state,n),Jt.batch(function(){i.observers.forEach(function(a){a.onMutationUpdate(n)}),i.mutationCache.notify(i)})},t})();function tI(){return{context:void 0,data:void 0,error:null,failureCount:0,isPaused:!1,status:"idle",variables:void 0}}function iq(t,e){switch(e.type){case"failed":return ct({},t,{failureCount:t.failureCount+1});case"pause":return ct({},t,{isPaused:!0});case"continue":return ct({},t,{isPaused:!1});case"loading":return ct({},t,{context:e.context,data:void 0,error:null,isPaused:!1,status:"loading",variables:e.variables});case"success":return ct({},t,{data:e.data,error:null,status:"success",isPaused:!1});case"error":return ct({},t,{data:void 0,error:e.error,failureCount:t.failureCount+1,isPaused:!1,status:"error"});case"setState":return ct({},t,e.state);default:return t}}var aq=(function(t){ys(e,t);function e(n){var i;return i=t.call(this)||this,i.config=n||{},i.mutations=[],i.mutationId=0,i}var r=e.prototype;return r.build=function(i,a,o){var s=new nq({mutationCache:this,mutationId:++this.mutationId,options:i.defaultMutationOptions(a),state:o,defaultOptions:a.mutationKey?i.getMutationDefaults(a.mutationKey):void 0,meta:a.meta});return this.add(s),s},r.add=function(i){this.mutations.push(i),this.notify(i)},r.remove=function(i){this.mutations=this.mutations.filter(function(a){return a!==i}),i.cancel(),this.notify(i)},r.clear=function(){var i=this;Jt.batch(function(){i.mutations.forEach(function(a){i.remove(a)})})},r.getAll=function(){return this.mutations},r.find=function(i){return typeof i.exact>"u"&&(i.exact=!0),this.mutations.find(function(a){return Aw(i,a)})},r.findAll=function(i){return this.mutations.filter(function(a){return Aw(i,a)})},r.notify=function(i){var a=this;Jt.batch(function(){a.listeners.forEach(function(o){o(i)})})},r.onFocus=function(){this.resumePausedMutations()},r.onOnline=function(){this.resumePausedMutations()},r.resumePausedMutations=function(){var i=this.mutations.filter(function(a){return a.state.isPaused});return Jt.batch(function(){return i.reduce(function(a,o){return a.then(function(){return o.continue().catch(Pr)})},Promise.resolve())})},e})(bs);function oq(){return{onFetch:function(e){e.fetchFn=function(){var r,n,i,a,o,s,l=(r=e.fetchOptions)==null||(n=r.meta)==null?void 0:n.refetchPage,c=(i=e.fetchOptions)==null||(a=i.meta)==null?void 0:a.fetchMore,d=c==null?void 0:c.pageParam,h=(c==null?void 0:c.direction)==="forward",g=(c==null?void 0:c.direction)==="backward",m=((o=e.state.data)==null?void 0:o.pages)||[],v=((s=e.state.data)==null?void 0:s.pageParams)||[],_=ZR(),y=_==null?void 0:_.signal,x=v,w=!1,C=e.options.queryFn||function(){return Promise.reject("Missing queryFn")},A=function(te,J,ie,le){return x=le?[J].concat(x):[].concat(x,[J]),le?[ie].concat(te):[].concat(te,[ie])},E=function(te,J,ie,le){if(w)return Promise.reject("Cancelled");if(typeof ie>"u"&&!J&&te.length)return Promise.resolve(te);var se={queryKey:e.queryKey,signal:y,pageParam:ie,meta:e.meta},ce=C(se),Q=Promise.resolve(ce).then(function(X){return A(te,ie,X,le)});if(Rf(ce)){var $=Q;$.cancel=ce.cancel}return Q},S;if(!m.length)S=E([]);else if(h){var T=typeof d<"u",D=T?d:Dw(e.options,m);S=E(m,T,D)}else if(g){var P=typeof d<"u",N=P?d:sq(e.options,m);S=E(m,P,N,!0)}else(function(){x=[];var W=typeof e.options.getNextPageParam>"u",te=l&&m[0]?l(m[0],0,m):!0;S=te?E([],W,v[0]):Promise.resolve(A([],v[0],m[0]));for(var J=function(se){S=S.then(function(ce){var Q=l&&m[se]?l(m[se],se,m):!0;if(Q){var $=W?v[se]:Dw(e.options,ce);return E(ce,W,$)}return Promise.resolve(A(ce,v[se],m[se]))})},ie=1;ie<m.length;ie++)J(ie)})();var F=S.then(function(W){return{pages:W,pageParams:x}}),B=F;return B.cancel=function(){w=!0,_==null||_.abort(),Rf(S)&&S.cancel()},F}}}}function Dw(t,e){return t.getNextPageParam==null?void 0:t.getNextPageParam(e[e.length-1],e)}function sq(t,e){return t.getPreviousPageParam==null?void 0:t.getPreviousPageParam(e[0],e)}var uq=(function(){function t(r){r===void 0&&(r={}),this.queryCache=r.queryCache||new rq,this.mutationCache=r.mutationCache||new aq,this.defaultOptions=r.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[]}var e=t.prototype;return e.mount=function(){var n=this;this.unsubscribeFocus=xu.subscribe(function(){xu.isFocused()&&pf.isOnline()&&(n.mutationCache.onFocus(),n.queryCache.onFocus())}),this.unsubscribeOnline=pf.subscribe(function(){xu.isFocused()&&pf.isOnline()&&(n.mutationCache.onOnline(),n.queryCache.onOnline())})},e.unmount=function(){var n,i;(n=this.unsubscribeFocus)==null||n.call(this),(i=this.unsubscribeOnline)==null||i.call(this)},e.isFetching=function(n,i){var a=fa(n,i),o=a[0];return o.fetching=!0,this.queryCache.findAll(o).length},e.isMutating=function(n){return this.mutationCache.findAll(ct({},n,{fetching:!0})).length},e.getQueryData=function(n,i){var a;return(a=this.queryCache.find(n,i))==null?void 0:a.state.data},e.getQueriesData=function(n){return this.getQueryCache().findAll(n).map(function(i){var a=i.queryKey,o=i.state,s=o.data;return[a,s]})},e.setQueryData=function(n,i,a){var o=hf(n),s=this.defaultQueryOptions(o);return this.queryCache.build(this,s).setData(i,a)},e.setQueriesData=function(n,i,a){var o=this;return Jt.batch(function(){return o.getQueryCache().findAll(n).map(function(s){var l=s.queryKey;return[l,o.setQueryData(l,i,a)]})})},e.getQueryState=function(n,i){var a;return(a=this.queryCache.find(n,i))==null?void 0:a.state},e.removeQueries=function(n,i){var a=fa(n,i),o=a[0],s=this.queryCache;Jt.batch(function(){s.findAll(o).forEach(function(l){s.remove(l)})})},e.resetQueries=function(n,i,a){var o=this,s=fa(n,i,a),l=s[0],c=s[1],d=this.queryCache,h=ct({},l,{active:!0});return Jt.batch(function(){return d.findAll(l).forEach(function(g){g.reset()}),o.refetchQueries(h,c)})},e.cancelQueries=function(n,i,a){var o=this,s=fa(n,i,a),l=s[0],c=s[1],d=c===void 0?{}:c;typeof d.revert>"u"&&(d.revert=!0);var h=Jt.batch(function(){return o.queryCache.findAll(l).map(function(g){return g.cancel(d)})});return Promise.all(h).then(Pr).catch(Pr)},e.invalidateQueries=function(n,i,a){var o,s,l,c=this,d=fa(n,i,a),h=d[0],g=d[1],m=ct({},h,{active:(o=(s=h.refetchActive)!=null?s:h.active)!=null?o:!0,inactive:(l=h.refetchInactive)!=null?l:!1});return Jt.batch(function(){return c.queryCache.findAll(h).forEach(function(v){v.invalidate()}),c.refetchQueries(m,g)})},e.refetchQueries=function(n,i,a){var o=this,s=fa(n,i,a),l=s[0],c=s[1],d=Jt.batch(function(){return o.queryCache.findAll(l).map(function(g){return g.fetch(void 0,ct({},c,{meta:{refetchPage:l==null?void 0:l.refetchPage}}))})}),h=Promise.all(d).then(Pr);return c!=null&&c.throwOnError||(h=h.catch(Pr)),h},e.fetchQuery=function(n,i,a){var o=hf(n,i,a),s=this.defaultQueryOptions(o);typeof s.retry>"u"&&(s.retry=!1);var l=this.queryCache.build(this,s);return l.isStaleByTime(s.staleTime)?l.fetch(s):Promise.resolve(l.state.data)},e.prefetchQuery=function(n,i,a){return this.fetchQuery(n,i,a).then(Pr).catch(Pr)},e.fetchInfiniteQuery=function(n,i,a){var o=hf(n,i,a);return o.behavior=oq(),this.fetchQuery(o)},e.prefetchInfiniteQuery=function(n,i,a){return this.fetchInfiniteQuery(n,i,a).then(Pr).catch(Pr)},e.cancelMutations=function(){var n=this,i=Jt.batch(function(){return n.mutationCache.getAll().map(function(a){return a.cancel()})});return Promise.all(i).then(Pr).catch(Pr)},e.resumePausedMutations=function(){return this.getMutationCache().resumePausedMutations()},e.executeMutation=function(n){return this.mutationCache.build(this,n).execute()},e.getQueryCache=function(){return this.queryCache},e.getMutationCache=function(){return this.mutationCache},e.getDefaultOptions=function(){return this.defaultOptions},e.setDefaultOptions=function(n){this.defaultOptions=n},e.setQueryDefaults=function(n,i){var a=this.queryDefaults.find(function(o){return eo(n)===eo(o.queryKey)});a?a.defaultOptions=i:this.queryDefaults.push({queryKey:n,defaultOptions:i})},e.getQueryDefaults=function(n){var i;return n?(i=this.queryDefaults.find(function(a){return Of(n,a.queryKey)}))==null?void 0:i.defaultOptions:void 0},e.setMutationDefaults=function(n,i){var a=this.mutationDefaults.find(function(o){return eo(n)===eo(o.mutationKey)});a?a.defaultOptions=i:this.mutationDefaults.push({mutationKey:n,defaultOptions:i})},e.getMutationDefaults=function(n){var i;return n?(i=this.mutationDefaults.find(function(a){return Of(n,a.mutationKey)}))==null?void 0:i.defaultOptions:void 0},e.defaultQueryOptions=function(n){if(n!=null&&n._defaulted)return n;var i=ct({},this.defaultOptions.queries,this.getQueryDefaults(n==null?void 0:n.queryKey),n,{_defaulted:!0});return!i.queryHash&&i.queryKey&&(i.queryHash=T0(i.queryKey,i)),i},e.defaultQueryObserverOptions=function(n){return this.defaultQueryOptions(n)},e.defaultMutationOptions=function(n){return n!=null&&n._defaulted?n:ct({},this.defaultOptions.mutations,this.getMutationDefaults(n==null?void 0:n.mutationKey),n,{_defaulted:!0})},e.clear=function(){this.queryCache.clear(),this.mutationCache.clear()},t})(),lq=(function(t){ys(e,t);function e(n,i){var a;return a=t.call(this)||this,a.client=n,a.options=i,a.trackedProps=[],a.selectError=null,a.bindMethods(),a.setOptions(i),a}var r=e.prototype;return r.bindMethods=function(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)},r.onSubscribe=function(){this.listeners.length===1&&(this.currentQuery.addObserver(this),Mw(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())},r.onUnsubscribe=function(){this.listeners.length||this.destroy()},r.shouldFetchOnReconnect=function(){return Cy(this.currentQuery,this.options,this.options.refetchOnReconnect)},r.shouldFetchOnWindowFocus=function(){return Cy(this.currentQuery,this.options,this.options.refetchOnWindowFocus)},r.destroy=function(){this.listeners=[],this.clearTimers(),this.currentQuery.removeObserver(this)},r.setOptions=function(i,a){var o=this.options,s=this.currentQuery;if(this.options=this.client.defaultQueryObserverOptions(i),typeof this.options.enabled<"u"&&typeof this.options.enabled!="boolean")throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=o.queryKey),this.updateQuery();var l=this.hasListeners();l&&Pw(this.currentQuery,s,this.options,o)&&this.executeFetch(),this.updateResult(a),l&&(this.currentQuery!==s||this.options.enabled!==o.enabled||this.options.staleTime!==o.staleTime)&&this.updateStaleTimeout();var c=this.computeRefetchInterval();l&&(this.currentQuery!==s||this.options.enabled!==o.enabled||c!==this.currentRefetchInterval)&&this.updateRefetchInterval(c)},r.getOptimisticResult=function(i){var a=this.client.defaultQueryObserverOptions(i),o=this.client.getQueryCache().build(this.client,a);return this.createResult(o,a)},r.getCurrentResult=function(){return this.currentResult},r.trackResult=function(i,a){var o=this,s={},l=function(d){o.trackedProps.includes(d)||o.trackedProps.push(d)};return Object.keys(i).forEach(function(c){Object.defineProperty(s,c,{configurable:!1,enumerable:!0,get:function(){return l(c),i[c]}})}),(a.useErrorBoundary||a.suspense)&&l("error"),s},r.getNextResult=function(i){var a=this;return new Promise(function(o,s){var l=a.subscribe(function(c){c.isFetching||(l(),c.isError&&(i!=null&&i.throwOnError)?s(c.error):o(c))})})},r.getCurrentQuery=function(){return this.currentQuery},r.remove=function(){this.client.getQueryCache().remove(this.currentQuery)},r.refetch=function(i){return this.fetch(ct({},i,{meta:{refetchPage:i==null?void 0:i.refetchPage}}))},r.fetchOptimistic=function(i){var a=this,o=this.client.defaultQueryObserverOptions(i),s=this.client.getQueryCache().build(this.client,o);return s.fetch().then(function(){return a.createResult(s,o)})},r.fetch=function(i){var a=this;return this.executeFetch(i).then(function(){return a.updateResult(),a.currentResult})},r.executeFetch=function(i){this.updateQuery();var a=this.currentQuery.fetch(this.options,i);return i!=null&&i.throwOnError||(a=a.catch(Pr)),a},r.updateStaleTimeout=function(){var i=this;if(this.clearStaleTimeout(),!(Cf||this.currentResult.isStale||!Ty(this.options.staleTime))){var a=XR(this.currentResult.dataUpdatedAt,this.options.staleTime),o=a+1;this.staleTimeoutId=setTimeout(function(){i.currentResult.isStale||i.updateResult()},o)}},r.computeRefetchInterval=function(){var i;return typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.currentResult.data,this.currentQuery):(i=this.options.refetchInterval)!=null?i:!1},r.updateRefetchInterval=function(i){var a=this;this.clearRefetchInterval(),this.currentRefetchInterval=i,!(Cf||this.options.enabled===!1||!Ty(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(function(){(a.options.refetchIntervalInBackground||xu.isFocused())&&a.executeFetch()},this.currentRefetchInterval))},r.updateTimers=function(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())},r.clearTimers=function(){this.clearStaleTimeout(),this.clearRefetchInterval()},r.clearStaleTimeout=function(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)},r.clearRefetchInterval=function(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)},r.createResult=function(i,a){var o=this.currentQuery,s=this.options,l=this.currentResult,c=this.currentResultState,d=this.currentResultOptions,h=i!==o,g=h?i.state:this.currentQueryInitialState,m=h?this.currentResult:this.previousQueryResult,v=i.state,_=v.dataUpdatedAt,y=v.error,x=v.errorUpdatedAt,w=v.isFetching,C=v.status,A=!1,E=!1,S;if(a.optimisticResults){var T=this.hasListeners(),D=!T&&Mw(i,a),P=T&&Pw(i,o,a,s);(D||P)&&(w=!0,_||(C="loading"))}if(a.keepPreviousData&&!v.dataUpdateCount&&(m!=null&&m.isSuccess)&&C!=="error")S=m.data,_=m.dataUpdatedAt,C=m.status,A=!0;else if(a.select&&typeof v.data<"u")if(l&&v.data===(c==null?void 0:c.data)&&a.select===this.selectFn)S=this.selectResult;else try{this.selectFn=a.select,S=a.select(v.data),a.structuralSharing!==!1&&(S=Af(l==null?void 0:l.data,S)),this.selectResult=S,this.selectError=null}catch(B){If().error(B),this.selectError=B}else S=v.data;if(typeof a.placeholderData<"u"&&typeof S>"u"&&(C==="loading"||C==="idle")){var N;if(l!=null&&l.isPlaceholderData&&a.placeholderData===(d==null?void 0:d.placeholderData))N=l.data;else if(N=typeof a.placeholderData=="function"?a.placeholderData():a.placeholderData,a.select&&typeof N<"u")try{N=a.select(N),a.structuralSharing!==!1&&(N=Af(l==null?void 0:l.data,N)),this.selectError=null}catch(B){If().error(B),this.selectError=B}typeof N<"u"&&(C="success",S=N,E=!0)}this.selectError&&(y=this.selectError,S=this.selectResult,x=Date.now(),C="error");var F={status:C,isLoading:C==="loading",isSuccess:C==="success",isError:C==="error",isIdle:C==="idle",data:S,dataUpdatedAt:_,error:y,errorUpdatedAt:x,failureCount:v.fetchFailureCount,errorUpdateCount:v.errorUpdateCount,isFetched:v.dataUpdateCount>0||v.errorUpdateCount>0,isFetchedAfterMount:v.dataUpdateCount>g.dataUpdateCount||v.errorUpdateCount>g.errorUpdateCount,isFetching:w,isRefetching:w&&C!=="loading",isLoadingError:C==="error"&&v.dataUpdatedAt===0,isPlaceholderData:E,isPreviousData:A,isRefetchError:C==="error"&&v.dataUpdatedAt!==0,isStale:S0(i,a),refetch:this.refetch,remove:this.remove};return F},r.shouldNotifyListeners=function(i,a){if(!a)return!0;var o=this.options,s=o.notifyOnChangeProps,l=o.notifyOnChangePropsExclusions;if(!s&&!l||s==="tracked"&&!this.trackedProps.length)return!0;var c=s==="tracked"?this.trackedProps:s;return Object.keys(i).some(function(d){var h=d,g=i[h]!==a[h],m=c==null?void 0:c.some(function(_){return _===d}),v=l==null?void 0:l.some(function(_){return _===d});return g&&!v&&(!c||m)})},r.updateResult=function(i){var a=this.currentResult;if(this.currentResult=this.createResult(this.currentQuery,this.options),this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,!KU(this.currentResult,a)){var o={cache:!0};(i==null?void 0:i.listeners)!==!1&&this.shouldNotifyListeners(this.currentResult,a)&&(o.listeners=!0),this.notify(ct({},o,i))}},r.updateQuery=function(){var i=this.client.getQueryCache().build(this.client,this.options);if(i!==this.currentQuery){var a=this.currentQuery;this.currentQuery=i,this.currentQueryInitialState=i.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(a==null||a.removeObserver(this),i.addObserver(this))}},r.onQueryUpdate=function(i){var a={};i.type==="success"?a.onSuccess=!0:i.type==="error"&&!gf(i.error)&&(a.onError=!0),this.updateResult(a),this.hasListeners()&&this.updateTimers()},r.notify=function(i){var a=this;Jt.batch(function(){i.onSuccess?(a.options.onSuccess==null||a.options.onSuccess(a.currentResult.data),a.options.onSettled==null||a.options.onSettled(a.currentResult.data,null)):i.onError&&(a.options.onError==null||a.options.onError(a.currentResult.error),a.options.onSettled==null||a.options.onSettled(void 0,a.currentResult.error)),i.listeners&&a.listeners.forEach(function(o){o(a.currentResult)}),i.cache&&a.client.getQueryCache().notify({query:a.currentQuery,type:"observerResultsUpdated"})})},e})(bs);function cq(t,e){return e.enabled!==!1&&!t.state.dataUpdatedAt&&!(t.state.status==="error"&&e.retryOnMount===!1)}function Mw(t,e){return cq(t,e)||t.state.dataUpdatedAt>0&&Cy(t,e,e.refetchOnMount)}function Cy(t,e,r){if(e.enabled!==!1){var n=typeof r=="function"?r(t):r;return n==="always"||n!==!1&&S0(t,e)}return!1}function Pw(t,e,r,n){return r.enabled!==!1&&(t!==e||n.enabled===!1)&&(!r.suspense||t.state.status!=="error")&&S0(t,r)}function S0(t,e){return t.isStaleByTime(e.staleTime)}var fq=(function(t){ys(e,t);function e(n,i){var a;return a=t.call(this)||this,a.client=n,a.setOptions(i),a.bindMethods(),a.updateResult(),a}var r=e.prototype;return r.bindMethods=function(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)},r.setOptions=function(i){this.options=this.client.defaultMutationOptions(i)},r.onUnsubscribe=function(){if(!this.listeners.length){var i;(i=this.currentMutation)==null||i.removeObserver(this)}},r.onMutationUpdate=function(i){this.updateResult();var a={listeners:!0};i.type==="success"?a.onSuccess=!0:i.type==="error"&&(a.onError=!0),this.notify(a)},r.getCurrentResult=function(){return this.currentResult},r.reset=function(){this.currentMutation=void 0,this.updateResult(),this.notify({listeners:!0})},r.mutate=function(i,a){return this.mutateOptions=a,this.currentMutation&&this.currentMutation.removeObserver(this),this.currentMutation=this.client.getMutationCache().build(this.client,ct({},this.options,{variables:typeof i<"u"?i:this.options.variables})),this.currentMutation.addObserver(this),this.currentMutation.execute()},r.updateResult=function(){var i=this.currentMutation?this.currentMutation.state:tI(),a=ct({},i,{isLoading:i.status==="loading",isSuccess:i.status==="success",isError:i.status==="error",isIdle:i.status==="idle",mutate:this.mutate,reset:this.reset});this.currentResult=a},r.notify=function(i){var a=this;Jt.batch(function(){a.mutateOptions&&(i.onSuccess?(a.mutateOptions.onSuccess==null||a.mutateOptions.onSuccess(a.currentResult.data,a.currentResult.variables,a.currentResult.context),a.mutateOptions.onSettled==null||a.mutateOptions.onSettled(a.currentResult.data,null,a.currentResult.variables,a.currentResult.context)):i.onError&&(a.mutateOptions.onError==null||a.mutateOptions.onError(a.currentResult.error,a.currentResult.variables,a.currentResult.context),a.mutateOptions.onSettled==null||a.mutateOptions.onSettled(void 0,a.currentResult.error,a.currentResult.variables,a.currentResult.context))),i.listeners&&a.listeners.forEach(function(o){o(a.currentResult)})})},e})(bs),dq=RU.unstable_batchedUpdates;Jt.setBatchNotifyFunction(dq);var hq=console;eq(hq);var Lw=Nt.createContext(void 0),rI=Nt.createContext(!1);function nI(t){return t&&typeof window<"u"?(window.ReactQueryClientContext||(window.ReactQueryClientContext=Lw),window.ReactQueryClientContext):Lw}var iI=function(){var e=Nt.useContext(nI(Nt.useContext(rI)));if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},cae=function(e){var r=e.client,n=e.contextSharing,i=n===void 0?!1:n,a=e.children;Nt.useEffect(function(){return r.mount(),function(){r.unmount()}},[r]);var o=nI(i);return Nt.createElement(rI.Provider,{value:i},Nt.createElement(o.Provider,{value:r},a))};function pq(){var t=!1;return{clearReset:function(){t=!1},reset:function(){t=!0},isReset:function(){return t}}}var gq=Nt.createContext(pq()),mq=function(){return Nt.useContext(gq)};function aI(t,e,r){return typeof e=="function"?e.apply(void 0,r):typeof e=="boolean"?e:!!t}function C0(t,e,r){var n=Nt.useRef(!1),i=Nt.useState(0),a=i[1],o=zU(t,e,r),s=iI(),l=Nt.useRef();l.current?l.current.setOptions(o):l.current=new fq(s,o);var c=l.current.getCurrentResult();Nt.useEffect(function(){n.current=!0;var h=l.current.subscribe(Jt.batchCalls(function(){n.current&&a(function(g){return g+1})}));return function(){n.current=!1,h()}},[]);var d=Nt.useCallback(function(h,g){l.current.mutate(h,g).catch(Pr)},[]);if(c.error&&aI(void 0,l.current.options.useErrorBoundary,[c.error]))throw c.error;return ct({},c,{mutate:d,mutateAsync:c.mutate})}function vq(t,e){var r=Nt.useRef(!1),n=Nt.useState(0),i=n[1],a=iI(),o=mq(),s=a.defaultQueryObserverOptions(t);s.optimisticResults=!0,s.onError&&(s.onError=Jt.batchCalls(s.onError)),s.onSuccess&&(s.onSuccess=Jt.batchCalls(s.onSuccess)),s.onSettled&&(s.onSettled=Jt.batchCalls(s.onSettled)),s.suspense&&(typeof s.staleTime!="number"&&(s.staleTime=1e3),s.cacheTime===0&&(s.cacheTime=1)),(s.suspense||s.useErrorBoundary)&&(o.isReset()||(s.retryOnMount=!1));var l=Nt.useState(function(){return new e(a,s)}),c=l[0],d=c.getOptimisticResult(s);if(Nt.useEffect(function(){r.current=!0,o.clearReset();var h=c.subscribe(Jt.batchCalls(function(){r.current&&i(function(g){return g+1})}));return c.updateResult(),function(){r.current=!1,h()}},[o,c]),Nt.useEffect(function(){c.setOptions(s,{listeners:!1})},[s,c]),s.suspense&&d.isLoading)throw c.fetchOptimistic(s).then(function(h){var g=h.data;s.onSuccess==null||s.onSuccess(g),s.onSettled==null||s.onSettled(g,null)}).catch(function(h){o.clearReset(),s.onError==null||s.onError(h),s.onSettled==null||s.onSettled(void 0,h)});if(d.isError&&!o.isReset()&&!d.isFetching&&aI(s.suspense,s.useErrorBoundary,[d.error,c.getCurrentQuery()]))throw d.error;return s.notifyOnChangeProps==="tracked"&&(d=c.trackResult(d,s)),d}function Ui(t,e,r){var n=hf(t,e,r);return vq(n,lq)}/**
|
|
10
|
+
* @remix-run/router v1.23.4
|
|
11
|
+
*
|
|
12
|
+
* Copyright (c) Remix Software Inc.
|
|
13
|
+
*
|
|
14
|
+
* This source code is licensed under the MIT license found in the
|
|
15
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
16
|
+
*
|
|
17
|
+
* @license MIT
|
|
18
|
+
*/function Zt(){return Zt=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Zt.apply(null,arguments)}var vr;(function(t){t.Pop="POP",t.Push="PUSH",t.Replace="REPLACE"})(vr||(vr={}));const Nw="popstate";function yq(t){t===void 0&&(t={});function e(n,i){let{pathname:a,search:o,hash:s}=n.location;return Du("",{pathname:a,search:o,hash:s},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function r(n,i){return typeof i=="string"?i:uo(i)}return _q(e,r,null,t)}function ot(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function os(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function bq(){return Math.random().toString(36).substr(2,8)}function Fw(t,e){return{usr:t.state,key:t.key,idx:e}}function Du(t,e,r,n){return r===void 0&&(r=null),Zt({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof e=="string"?Ta(e):e,{state:r,key:e&&e.key||n||bq()})}function uo(t){let{pathname:e="/",search:r="",hash:n=""}=t;return r&&r!=="?"&&(e+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function Ta(t){let e={};if(t){let r=t.indexOf("#");r>=0&&(e.hash=t.substr(r),t=t.substr(0,r));let n=t.indexOf("?");n>=0&&(e.search=t.substr(n),t=t.substr(0,n)),t&&(e.pathname=t)}return e}function _q(t,e,r,n){n===void 0&&(n={});let{window:i=document.defaultView,v5Compat:a=!1}=n,o=i.history,s=vr.Pop,l=null,c=d();c==null&&(c=0,o.replaceState(Zt({},o.state,{idx:c}),""));function d(){return(o.state||{idx:null}).idx}function h(){s=vr.Pop;let y=d(),x=y==null?null:y-c;c=y,l&&l({action:s,location:_.location,delta:x})}function g(y,x){s=vr.Push;let w=Du(_.location,y,x);c=d()+1;let C=Fw(w,c),A=_.createHref(w);try{o.pushState(C,"",A)}catch(E){if(E instanceof DOMException&&E.name==="DataCloneError")throw E;i.location.assign(A)}a&&l&&l({action:s,location:_.location,delta:1})}function m(y,x){s=vr.Replace;let w=Du(_.location,y,x);c=d();let C=Fw(w,c),A=_.createHref(w);o.replaceState(C,"",A),a&&l&&l({action:s,location:_.location,delta:0})}function v(y){let x=i.location.origin!=="null"?i.location.origin:i.location.href,w=typeof y=="string"?y:uo(y);return w=w.replace(/ $/,"%20"),ot(x,"No window.location.(origin|href) available to create URL for href: "+w),new URL(w,x)}let _={get action(){return s},get location(){return t(i,o)},listen(y){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(Nw,h),l=y,()=>{i.removeEventListener(Nw,h),l=null}},createHref(y){return e(i,y)},createURL:v,encodeLocation(y){let x=v(y);return{pathname:x.pathname,search:x.search,hash:x.hash}},push:g,replace:m,go(y){return o.go(y)}};return _}var kt;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})(kt||(kt={}));const xq=new Set(["lazy","caseSensitive","path","id","index","children"]);function wq(t){return t.index===!0}function Df(t,e,r,n){return r===void 0&&(r=[]),n===void 0&&(n={}),t.map((i,a)=>{let o=[...r,String(a)],s=typeof i.id=="string"?i.id:o.join("-");if(ot(i.index!==!0||!i.children,"Cannot specify children on an index route"),ot(!n[s],'Found a route id collision on id "'+s+`". Route id's must be globally unique within Data Router usages`),wq(i)){let l=Zt({},i,e(i),{id:s});return n[s]=l,l}else{let l=Zt({},i,e(i),{id:s,children:void 0});return n[s]=l,i.children&&(l.children=Df(i.children,e,o,n)),l}})}function Za(t,e,r){return r===void 0&&(r="/"),mf(t,e,r,!1)}function mf(t,e,r,n){let i=typeof e=="string"?Ta(e):e,a=ki(i.pathname||"/",r);if(a==null)return null;let o=oI(t);Sq(o);let s=null,l=Nq(a);for(let c=0;s==null&&c<o.length;++c)s=Pq(o[c],l,n);return s}function Tq(t,e){let{route:r,pathname:n,params:i}=t;return{id:r.id,pathname:n,params:i,data:e[r.id],handle:r.handle}}function oI(t,e,r,n){e===void 0&&(e=[]),r===void 0&&(r=[]),n===void 0&&(n="");let i=(a,o,s)=>{let l={relativePath:s===void 0?a.path||"":s,caseSensitive:a.caseSensitive===!0,childrenIndex:o,route:a};l.relativePath.startsWith("/")&&(ot(l.relativePath.startsWith(n),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(n.length));let c=Ni([n,l.relativePath]),d=r.concat(l);a.children&&a.children.length>0&&(ot(a.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),oI(a.children,e,d,c)),!(a.path==null&&!a.index)&&e.push({path:c,score:Dq(c,a.index),routesMeta:d})};return t.forEach((a,o)=>{var s;if(a.path===""||!((s=a.path)!=null&&s.includes("?")))i(a,o);else for(let l of sI(a.path))i(a,o,l)}),e}function sI(t){let e=t.split("/");if(e.length===0)return[];let[r,...n]=e,i=r.endsWith("?"),a=r.replace(/\?$/,"");if(n.length===0)return i?[a,""]:[a];let o=sI(n.join("/")),s=[];return s.push(...o.map(l=>l===""?a:[a,l].join("/"))),i&&s.push(...o),s.map(l=>t.startsWith("/")&&l===""?"/":l)}function Sq(t){t.sort((e,r)=>e.score!==r.score?r.score-e.score:Mq(e.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const Cq=/^:[\w-]+$/,Eq=3,Oq=2,Aq=1,Rq=10,Iq=-2,kw=t=>t==="*";function Dq(t,e){let r=t.split("/"),n=r.length;return r.some(kw)&&(n+=Iq),e&&(n+=Oq),r.filter(i=>!kw(i)).reduce((i,a)=>i+(Cq.test(a)?Eq:a===""?Aq:Rq),n)}function Mq(t,e){return t.length===e.length&&t.slice(0,-1).every((n,i)=>n===e[i])?t[t.length-1]-e[e.length-1]:0}function Pq(t,e,r){r===void 0&&(r=!1);let{routesMeta:n}=t,i={},a="/",o=[];for(let s=0;s<n.length;++s){let l=n[s],c=s===n.length-1,d=a==="/"?e:e.slice(a.length)||"/",h=Mf({path:l.relativePath,caseSensitive:l.caseSensitive,end:c},d),g=l.route;if(!h&&c&&r&&!n[n.length-1].route.index&&(h=Mf({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},d)),!h)return null;Object.assign(i,h.params),o.push({params:i,pathname:Ni([a,h.pathname]),pathnameBase:kq(Ni([a,h.pathnameBase])),route:g}),h.pathnameBase!=="/"&&(a=Ni([a,h.pathnameBase]))}return o}function Mf(t,e){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[r,n]=Lq(t.path,t.caseSensitive,t.end),i=e.match(r);if(!i)return null;let a=i[0],o=a.replace(/(.)\/+$/,"$1"),s=i.slice(1);return{params:n.reduce((c,d,h)=>{let{paramName:g,isOptional:m}=d;if(g==="*"){let _=s[h]||"";o=a.slice(0,a.length-_.length).replace(/(.)\/+$/,"$1")}const v=s[h];return m&&!v?c[g]=void 0:c[g]=(v||"").replace(/%2F/g,"/"),c},{}),pathname:a,pathnameBase:o,pattern:t}}function Lq(t,e,r){e===void 0&&(e=!1),r===void 0&&(r=!0),os(t==="*"||!t.endsWith("*")||t.endsWith("/*"),'Route path "'+t+'" will be treated as if it were '+('"'+t.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+t.replace(/\*$/,"/*")+'".'));let n=[],i="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,s,l)=>(n.push({paramName:s,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return t.endsWith("*")?(n.push({paramName:"*"}),i+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?i+="\\/*$":t!==""&&t!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,e?void 0:"i"),n]}function Nq(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return os(!1,'The URL path "'+t+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+e+").")),t}}function ki(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let r=e.endsWith("/")?e.length-1:e.length,n=t.charAt(r);return n&&n!=="/"?null:t.slice(r)||"/"}function Fq(t,e){e===void 0&&(e="/");let{pathname:r,search:n="",hash:i=""}=typeof t=="string"?Ta(t):t,a;return r?(r=E0(r),r.startsWith("/")?a=jw(r.substring(1),"/"):a=jw(r,e)):a=e,{pathname:a,search:jq(n),hash:$q(i)}}function jw(t,e){let r=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(i=>{i===".."?r.length>1&&r.pop():i!=="."&&r.push(i)}),r.length>1?r.join("/"):"/"}function hp(t,e,r,n){return"Cannot include a '"+t+"' character in a manually specified "+("`to."+e+"` field ["+JSON.stringify(n)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function uI(t){return t.filter((e,r)=>r===0||e.route.path&&e.route.path.length>0)}function gd(t,e){let r=uI(t);return e?r.map((n,i)=>i===r.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function md(t,e,r,n){n===void 0&&(n=!1);let i;typeof t=="string"?i=Ta(t):(i=Zt({},t),ot(!i.pathname||!i.pathname.includes("?"),hp("?","pathname","search",i)),ot(!i.pathname||!i.pathname.includes("#"),hp("#","pathname","hash",i)),ot(!i.search||!i.search.includes("#"),hp("#","search","hash",i)));let a=t===""||i.pathname==="",o=a?"/":i.pathname,s;if(o==null)s=r;else{let h=e.length-1;if(!n&&o.startsWith("..")){let g=o.split("/");for(;g[0]==="..";)g.shift(),h-=1;i.pathname=g.join("/")}s=h>=0?e[h]:"/"}let l=Fq(i,s),c=o&&o!=="/"&&o.endsWith("/"),d=(a||o===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(c||d)&&(l.pathname+="/"),l}const E0=t=>t.replace(/\/\/+/g,"/"),Ni=t=>E0(t.join("/")),kq=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),jq=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,$q=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;class Pf{constructor(e,r,n,i){i===void 0&&(i=!1),this.status=e,this.statusText=r||"",this.internal=i,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}}function Mu(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}const lI=["post","put","patch","delete"],Uq=new Set(lI),qq=["get",...lI],Hq=new Set(qq),Wq=new Set([301,302,303,307,308]),Bq=new Set([307,308]),pp={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},zq={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Ks={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},O0=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Vq=t=>({hasErrorBoundary:!!t.hasErrorBoundary}),cI="remix-router-transitions";function Gq(t){const e=t.window?t.window:typeof window<"u"?window:void 0,r=typeof e<"u"&&typeof e.document<"u"&&typeof e.document.createElement<"u",n=!r;ot(t.routes.length>0,"You must provide a non-empty routes array to createRouter");let i;if(t.mapRouteProperties)i=t.mapRouteProperties;else if(t.detectErrorBoundary){let k=t.detectErrorBoundary;i=q=>({hasErrorBoundary:k(q)})}else i=Vq;let a={},o=Df(t.routes,i,void 0,a),s,l=t.basename||"/",c=t.dataStrategy||Zq,d=t.patchRoutesOnNavigation,h=Zt({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},t.future),g=null,m=new Set,v=null,_=null,y=null,x=t.hydrationData!=null,w=Za(o,t.history.location,l),C=!1,A=null;if(w==null&&!d){let k=on(404,{pathname:t.history.location.pathname}),{matches:q,route:K}=Xw(o);w=q,A={[K.id]:k}}w&&!t.hydrationData&&dn(w,o,t.history.location.pathname).active&&(w=null);let E;if(w)if(w.some(k=>k.route.lazy))E=!1;else if(!w.some(k=>k.route.loader))E=!0;else if(h.v7_partialHydration){let k=t.hydrationData?t.hydrationData.loaderData:null,q=t.hydrationData?t.hydrationData.errors:null;if(q){let K=w.findIndex(ae=>q[ae.route.id]!==void 0);E=w.slice(0,K+1).every(ae=>!Oy(ae.route,k,q))}else E=w.every(K=>!Oy(K.route,k,q))}else E=t.hydrationData!=null;else if(E=!1,w=[],h.v7_partialHydration){let k=dn(null,o,t.history.location.pathname);k.active&&k.matches&&(C=!0,w=k.matches)}let S,T={historyAction:t.history.action,location:t.history.location,matches:w,initialized:E,navigation:pp,restoreScrollPosition:t.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:t.hydrationData&&t.hydrationData.loaderData||{},actionData:t.hydrationData&&t.hydrationData.actionData||null,errors:t.hydrationData&&t.hydrationData.errors||A,fetchers:new Map,blockers:new Map},D=vr.Pop,P=!1,N,F=!1,B=new Map,W=null,te=!1,J=!1,ie=[],le=new Set,se=new Map,ce=0,Q=-1,$=new Map,X=new Set,Z=new Map,fe=new Map,be=new Set,_e=new Map,Le=new Map,Ae;function he(){if(g=t.history.listen(k=>{let{action:q,location:K,delta:ae}=k;if(Ae){Ae(),Ae=void 0;return}os(Le.size===0||ae!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let pe=Dt({currentLocation:T.location,nextLocation:K,historyAction:q});if(pe&&ae!=null){let Me=new Promise(qe=>{Ae=qe});t.history.go(ae*-1),Tt(pe,{state:"blocked",location:K,proceed(){Tt(pe,{state:"proceeding",proceed:void 0,reset:void 0,location:K}),Me.then(()=>t.history.go(ae))},reset(){let qe=new Map(T.blockers);qe.set(pe,Ks),we({blockers:qe})}});return}return ke(q,K)}),r){fH(e,B);let k=()=>dH(e,B);e.addEventListener("pagehide",k),W=()=>e.removeEventListener("pagehide",k)}return T.initialized||ke(vr.Pop,T.location,{initialHydration:!0}),S}function ge(){g&&g(),W&&W(),m.clear(),N&&N.abort(),T.fetchers.forEach((k,q)=>Ur(q)),T.blockers.forEach((k,q)=>ut(q))}function Ne(k){return m.add(k),()=>m.delete(k)}function we(k,q){q===void 0&&(q={}),T=Zt({},T,k);let K=[],ae=[];h.v7_fetcherPersist&&T.fetchers.forEach((pe,Me)=>{pe.state==="idle"&&(be.has(Me)?ae.push(Me):K.push(Me))}),be.forEach(pe=>{!T.fetchers.has(pe)&&!se.has(pe)&&ae.push(pe)}),[...m].forEach(pe=>pe(T,{deletedFetchers:ae,viewTransitionOpts:q.viewTransitionOpts,flushSync:q.flushSync===!0})),h.v7_fetcherPersist?(K.forEach(pe=>T.fetchers.delete(pe)),ae.forEach(pe=>Ur(pe))):ae.forEach(pe=>be.delete(pe))}function ve(k,q,K){var ae,pe;let{flushSync:Me}=K===void 0?{}:K,qe=T.actionData!=null&&T.navigation.formMethod!=null&&Zn(T.navigation.formMethod)&&T.navigation.state==="loading"&&((ae=k.state)==null?void 0:ae._isRedirect)!==!0,Se;q.actionData?Object.keys(q.actionData).length>0?Se=q.actionData:Se=null:qe?Se=T.actionData:Se=null;let Oe=q.loaderData?Gw(T.loaderData,q.loaderData,q.matches||[],q.errors):T.loaderData,Te=T.blockers;Te.size>0&&(Te=new Map(Te),Te.forEach((it,er)=>Te.set(er,Ks)));let Ie=P===!0||T.navigation.formMethod!=null&&Zn(T.navigation.formMethod)&&((pe=k.state)==null?void 0:pe._isRedirect)!==!0;s&&(o=s,s=void 0),te||D===vr.Pop||(D===vr.Push?t.history.push(k,k.state):D===vr.Replace&&t.history.replace(k,k.state));let ze;if(D===vr.Pop){let it=B.get(T.location.pathname);it&&it.has(k.pathname)?ze={currentLocation:T.location,nextLocation:k}:B.has(k.pathname)&&(ze={currentLocation:k,nextLocation:T.location})}else if(F){let it=B.get(T.location.pathname);it?it.add(k.pathname):(it=new Set([k.pathname]),B.set(T.location.pathname,it)),ze={currentLocation:T.location,nextLocation:k}}we(Zt({},q,{actionData:Se,loaderData:Oe,historyAction:D,location:k,initialized:!0,navigation:pp,revalidation:"idle",restoreScrollPosition:zi(k,q.matches||T.matches),preventScrollReset:Ie,blockers:Te}),{viewTransitionOpts:ze,flushSync:Me===!0}),D=vr.Pop,P=!1,F=!1,te=!1,J=!1,ie=[]}async function Fe(k,q){if(typeof k=="number"){t.history.go(k);return}let K=Ey(T.location,T.matches,l,h.v7_prependBasename,k,h.v7_relativeSplatPath,q==null?void 0:q.fromRouteId,q==null?void 0:q.relative),{path:ae,submission:pe,error:Me}=$w(h.v7_normalizeFormMethod,!1,K,q),qe=T.location,Se=Du(T.location,ae,q&&q.state);Se=Zt({},Se,t.history.encodeLocation(Se));let Oe=q&&q.replace!=null?q.replace:void 0,Te=vr.Push;Oe===!0?Te=vr.Replace:Oe===!1||pe!=null&&Zn(pe.formMethod)&&pe.formAction===T.location.pathname+T.location.search&&(Te=vr.Replace);let Ie=q&&"preventScrollReset"in q?q.preventScrollReset===!0:void 0,ze=(q&&q.flushSync)===!0,it=Dt({currentLocation:qe,nextLocation:Se,historyAction:Te});if(it){Tt(it,{state:"blocked",location:Se,proceed(){Tt(it,{state:"proceeding",proceed:void 0,reset:void 0,location:Se}),Fe(k,q)},reset(){let er=new Map(T.blockers);er.set(it,Ks),we({blockers:er})}});return}return await ke(Te,Se,{submission:pe,pendingError:Me,preventScrollReset:Ie,replace:q&&q.replace,enableViewTransition:q&&q.viewTransition,flushSync:ze})}function Be(){if(nt(),we({revalidation:"loading"}),T.navigation.state!=="submitting"){if(T.navigation.state==="idle"){ke(T.historyAction,T.location,{startUninterruptedRevalidation:!0});return}ke(D||T.historyAction,T.navigation.location,{overrideNavigation:T.navigation,enableViewTransition:F===!0})}}async function ke(k,q,K){N&&N.abort(),N=null,D=k,te=(K&&K.startUninterruptedRevalidation)===!0,En(T.location,T.matches),P=(K&&K.preventScrollReset)===!0,F=(K&&K.enableViewTransition)===!0;let ae=s||o,pe=K&&K.overrideNavigation,Me=K!=null&&K.initialHydration&&T.matches&&T.matches.length>0&&!C?T.matches:Za(ae,q,l),qe=(K&&K.flushSync)===!0;if(Me&&T.initialized&&!J&&nH(T.location,q)&&!(K&&K.submission&&Zn(K.submission.formMethod))){ve(q,{matches:Me},{flushSync:qe});return}let Se=dn(Me,ae,q.pathname);if(Se.active&&Se.matches&&(Me=Se.matches),!Me){let{error:mt,notFoundMatches:lt,route:Ht}=Ve(q.pathname);ve(q,{matches:lt,loaderData:{},errors:{[Ht.id]:mt}},{flushSync:qe});return}N=new AbortController;let Oe=Ho(t.history,q,N.signal,K&&K.submission),Te;if(K&&K.pendingError)Te=[Ja(Me).route.id,{type:kt.error,error:K.pendingError}];else if(K&&K.submission&&Zn(K.submission.formMethod)){let mt=await Ze(Oe,q,K.submission,Me,Se.active,{replace:K.replace,flushSync:qe});if(mt.shortCircuited)return;if(mt.pendingActionResult){let[lt,Ht]=mt.pendingActionResult;if(xn(Ht)&&Mu(Ht.error)&&Ht.error.status===404){N=null,ve(q,{matches:mt.matches,loaderData:{},errors:{[lt]:Ht.error}});return}}Me=mt.matches||Me,Te=mt.pendingActionResult,pe=gp(q,K.submission),qe=!1,Se.active=!1,Oe=Ho(t.history,Oe.url,Oe.signal)}let{shortCircuited:Ie,matches:ze,loaderData:it,errors:er}=await gt(Oe,q,Me,Se.active,pe,K&&K.submission,K&&K.fetcherSubmission,K&&K.replace,K&&K.initialHydration===!0,qe,Te);Ie||(N=null,ve(q,Zt({matches:ze||Me},Kw(Te),{loaderData:it,errors:er})))}async function Ze(k,q,K,ae,pe,Me){Me===void 0&&(Me={}),nt();let qe=lH(q,K);if(we({navigation:qe},{flushSync:Me.flushSync===!0}),pe){let Te=await br(ae,q.pathname,k.signal);if(Te.type==="aborted")return{shortCircuited:!0};if(Te.type==="error"){let Ie=Ja(Te.partialMatches).route.id;return{matches:Te.partialMatches,pendingActionResult:[Ie,{type:kt.error,error:Te.error}]}}else if(Te.matches)ae=Te.matches;else{let{notFoundMatches:Ie,error:ze,route:it}=Ve(q.pathname);return{matches:Ie,pendingActionResult:[it.id,{type:kt.error,error:ze}]}}}let Se,Oe=du(ae,q);if(!Oe.route.action&&!Oe.route.lazy)Se={type:kt.error,error:on(405,{method:k.method,pathname:q.pathname,routeId:Oe.route.id})};else if(Se=(await De("action",T,k,[Oe],ae,null))[Oe.route.id],k.signal.aborted)return{shortCircuited:!0};if(to(Se)){let Te;return Me&&Me.replace!=null?Te=Me.replace:Te=Bw(Se.response.headers.get("Location"),new URL(k.url),l,t.history)===T.location.pathname+T.location.search,await me(k,Se,!0,{submission:K,replace:Te}),{shortCircuited:!0}}if(da(Se))throw on(400,{type:"defer-action"});if(xn(Se)){let Te=Ja(ae,Oe.route.id);return(Me&&Me.replace)!==!0&&(D=vr.Push),{matches:ae,pendingActionResult:[Te.route.id,Se]}}return{matches:ae,pendingActionResult:[Oe.route.id,Se]}}async function gt(k,q,K,ae,pe,Me,qe,Se,Oe,Te,Ie){let ze=pe||gp(q,Me),it=Me||qe||Zw(ze),er=!te&&(!h.v7_partialHydration||!Oe);if(ae){if(er){let zt=Lr(Ie);we(Zt({navigation:ze},zt!==void 0?{actionData:zt}:{}),{flushSync:Te})}let vt=await br(K,q.pathname,k.signal);if(vt.type==="aborted")return{shortCircuited:!0};if(vt.type==="error"){let zt=Ja(vt.partialMatches).route.id;return{matches:vt.partialMatches,loaderData:{},errors:{[zt]:vt.error}}}else if(vt.matches)K=vt.matches;else{let{error:zt,notFoundMatches:Gi,route:Da}=Ve(q.pathname);return{matches:Gi,loaderData:{},errors:{[Da.id]:zt}}}}let mt=s||o,[lt,Ht]=qw(t.history,T,K,it,q,h.v7_partialHydration&&Oe===!0,h.v7_skipActionErrorRevalidation,J,ie,le,be,Z,X,mt,l,Ie);if(qr(vt=>!(K&&K.some(zt=>zt.route.id===vt))||lt&<.some(zt=>zt.route.id===vt)),Q=++ce,lt.length===0&&Ht.length===0){let vt=Wn();return ve(q,Zt({matches:K,loaderData:{},errors:Ie&&xn(Ie[1])?{[Ie[0]]:Ie[1].error}:null},Kw(Ie),vt?{fetchers:new Map(T.fetchers)}:{}),{flushSync:Te}),{shortCircuited:!0}}if(er){let vt={};if(!ae){vt.navigation=ze;let zt=Lr(Ie);zt!==void 0&&(vt.actionData=zt)}Ht.length>0&&(vt.fetchers=Yr(Ht)),we(vt,{flushSync:Te})}Ht.forEach(vt=>{Ir(vt.key),vt.controller&&se.set(vt.key,vt.controller)});let Bn=()=>Ht.forEach(vt=>Ir(vt.key));N&&N.signal.addEventListener("abort",Bn);let{loaderResults:Aa,fetcherResults:Jr}=await Ue(T,K,lt,Ht,k);if(k.signal.aborted)return{shortCircuited:!0};N&&N.signal.removeEventListener("abort",Bn),Ht.forEach(vt=>se.delete(vt.key));let On=Gl(Aa);if(On)return await me(k,On.result,!0,{replace:Se}),{shortCircuited:!0};if(On=Gl(Jr),On)return X.add(On.key),await me(k,On.result,!0,{replace:Se}),{shortCircuited:!0};let{loaderData:Vi,errors:Ra}=Vw(T,K,Aa,Ie,Ht,Jr,_e);_e.forEach((vt,zt)=>{vt.subscribe(Gi=>{(Gi||vt.done)&&_e.delete(zt)})}),h.v7_partialHydration&&Oe&&T.errors&&(Ra=Zt({},T.errors,Ra));let bi=Wn(),Oo=V(Q),Ia=bi||Oo||Ht.length>0;return Zt({matches:K,loaderData:Vi,errors:Ra},Ia?{fetchers:new Map(T.fetchers)}:{})}function Lr(k){if(k&&!xn(k[1]))return{[k[0]]:k[1].data};if(T.actionData)return Object.keys(T.actionData).length===0?null:T.actionData}function Yr(k){return k.forEach(q=>{let K=T.fetchers.get(q.key),ae=Xs(void 0,K?K.data:void 0);T.fetchers.set(q.key,ae)}),new Map(T.fetchers)}function fr(k,q,K,ae){if(n)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");Ir(k);let pe=(ae&&ae.flushSync)===!0,Me=s||o,qe=Ey(T.location,T.matches,l,h.v7_prependBasename,K,h.v7_relativeSplatPath,q,ae==null?void 0:ae.relative),Se=Za(Me,qe,l),Oe=dn(Se,Me,qe);if(Oe.active&&Oe.matches&&(Se=Oe.matches),!Se){Ot(k,q,on(404,{pathname:qe}),{flushSync:pe});return}let{path:Te,submission:Ie,error:ze}=$w(h.v7_normalizeFormMethod,!0,qe,ae);if(ze){Ot(k,q,ze,{flushSync:pe});return}let it=du(Se,Te),er=(ae&&ae.preventScrollReset)===!0;if(Ie&&Zn(Ie.formMethod)){z(k,q,Te,it,Se,Oe.active,pe,er,Ie);return}Z.set(k,{routeId:q,path:Te}),de(k,q,Te,it,Se,Oe.active,pe,er,Ie)}async function z(k,q,K,ae,pe,Me,qe,Se,Oe){nt(),Z.delete(k);function Te(ar){if(!ar.route.action&&!ar.route.lazy){let Ki=on(405,{method:Oe.formMethod,pathname:K,routeId:q});return Ot(k,q,Ki,{flushSync:qe}),!0}return!1}if(!Me&&Te(ae))return;let Ie=T.fetchers.get(k);Et(k,cH(Oe,Ie),{flushSync:qe});let ze=new AbortController,it=Ho(t.history,K,ze.signal,Oe);if(Me){let ar=await br(pe,new URL(it.url).pathname,it.signal,k);if(ar.type==="aborted")return;if(ar.type==="error"){Ot(k,q,ar.error,{flushSync:qe});return}else if(ar.matches){if(pe=ar.matches,ae=du(pe,K),Te(ae))return}else{Ot(k,q,on(404,{pathname:K}),{flushSync:qe});return}}se.set(k,ze);let er=ce,lt=(await De("action",T,it,[ae],pe,k))[ae.route.id];if(it.signal.aborted){se.get(k)===ze&&se.delete(k);return}if(h.v7_fetcherPersist&&be.has(k)){if(to(lt)||xn(lt)){Et(k,sa(void 0));return}}else{if(to(lt))if(se.delete(k),Q>er){Et(k,sa(void 0));return}else return X.add(k),Et(k,Xs(Oe)),me(it,lt,!1,{fetcherSubmission:Oe,preventScrollReset:Se});if(xn(lt)){Ot(k,q,lt.error);return}}if(da(lt))throw on(400,{type:"defer-action"});let Ht=T.navigation.location||T.location,Bn=Ho(t.history,Ht,ze.signal),Aa=s||o,Jr=T.navigation.state!=="idle"?Za(Aa,T.navigation.location,l):T.matches;ot(Jr,"Didn't find any matches after fetcher action");let On=++ce;$.set(k,On);let Vi=Xs(Oe,lt.data);T.fetchers.set(k,Vi);let[Ra,bi]=qw(t.history,T,Jr,Oe,Ht,!1,h.v7_skipActionErrorRevalidation,J,ie,le,be,Z,X,Aa,l,[ae.route.id,lt]);bi.filter(ar=>ar.key!==k).forEach(ar=>{let Ki=ar.key,Ds=T.fetchers.get(Ki),sl=Xs(void 0,Ds?Ds.data:void 0);T.fetchers.set(Ki,sl),Ir(Ki),ar.controller&&se.set(Ki,ar.controller)}),we({fetchers:new Map(T.fetchers)});let Oo=()=>bi.forEach(ar=>Ir(ar.key));ze.signal.addEventListener("abort",Oo);let{loaderResults:Ia,fetcherResults:vt}=await Ue(T,Jr,Ra,bi,Bn);if(ze.signal.aborted)return;ze.signal.removeEventListener("abort",Oo),$.delete(k),se.delete(k),bi.forEach(ar=>se.delete(ar.key));let zt=Gl(Ia);if(zt)return me(Bn,zt.result,!1,{preventScrollReset:Se});if(zt=Gl(vt),zt)return X.add(zt.key),me(Bn,zt.result,!1,{preventScrollReset:Se});let{loaderData:Gi,errors:Da}=Vw(T,Jr,Ia,void 0,bi,vt,_e);if(T.fetchers.has(k)){let ar=sa(lt.data);T.fetchers.set(k,ar)}V(On),T.navigation.state==="loading"&&On>Q?(ot(D,"Expected pending action"),N&&N.abort(),ve(T.navigation.location,{matches:Jr,loaderData:Gi,errors:Da,fetchers:new Map(T.fetchers)})):(we({errors:Da,loaderData:Gw(T.loaderData,Gi,Jr,Da),fetchers:new Map(T.fetchers)}),J=!1)}async function de(k,q,K,ae,pe,Me,qe,Se,Oe){let Te=T.fetchers.get(k);Et(k,Xs(Oe,Te?Te.data:void 0),{flushSync:qe});let Ie=new AbortController,ze=Ho(t.history,K,Ie.signal);if(Me){let lt=await br(pe,new URL(ze.url).pathname,ze.signal,k);if(lt.type==="aborted")return;if(lt.type==="error"){Ot(k,q,lt.error,{flushSync:qe});return}else if(lt.matches)pe=lt.matches,ae=du(pe,K);else{Ot(k,q,on(404,{pathname:K}),{flushSync:qe});return}}se.set(k,Ie);let it=ce,mt=(await De("loader",T,ze,[ae],pe,k))[ae.route.id];if(da(mt)&&(mt=await A0(mt,ze.signal,!0)||mt),se.get(k)===Ie&&se.delete(k),!ze.signal.aborted){if(be.has(k)){Et(k,sa(void 0));return}if(to(mt))if(Q>it){Et(k,sa(void 0));return}else{X.add(k),await me(ze,mt,!1,{preventScrollReset:Se});return}if(xn(mt)){Ot(k,q,mt.error);return}ot(!da(mt),"Unhandled fetcher deferred data"),Et(k,sa(mt.data))}}async function me(k,q,K,ae){let{submission:pe,fetcherSubmission:Me,preventScrollReset:qe,replace:Se}=ae===void 0?{}:ae;q.response.headers.has("X-Remix-Revalidate")&&(J=!0);let Oe=q.response.headers.get("Location");ot(Oe,"Expected a Location header on the redirect Response"),Oe=Bw(Oe,new URL(k.url),l,t.history);let Te=Du(T.location,Oe,{_isRedirect:!0});if(r){let lt=!1;if(q.response.headers.has("X-Remix-Reload-Document"))lt=!0;else if(O0.test(Oe)){const Ht=t.history.createURL(Oe);lt=Ht.origin!==e.location.origin||ki(Ht.pathname,l)==null}if(lt){Se?e.location.replace(Oe):e.location.assign(Oe);return}}N=null;let Ie=Se===!0||q.response.headers.has("X-Remix-Replace")?vr.Replace:vr.Push,{formMethod:ze,formAction:it,formEncType:er}=T.navigation;!pe&&!Me&&ze&&it&&er&&(pe=Zw(T.navigation));let mt=pe||Me;if(Bq.has(q.response.status)&&mt&&Zn(mt.formMethod))await ke(Ie,Te,{submission:Zt({},mt,{formAction:Oe}),preventScrollReset:qe||P,enableViewTransition:K?F:void 0});else{let lt=gp(Te,pe);await ke(Ie,Te,{overrideNavigation:lt,fetcherSubmission:Me,preventScrollReset:qe||P,enableViewTransition:K?F:void 0})}}async function De(k,q,K,ae,pe,Me){let qe,Se={};try{qe=await Jq(c,k,q,K,ae,pe,Me,a,i)}catch(Oe){return ae.forEach(Te=>{Se[Te.route.id]={type:kt.error,error:Oe}}),Se}for(let[Oe,Te]of Object.entries(qe))if(iH(Te)){let Ie=Te.result;Se[Oe]={type:kt.redirect,response:tH(Ie,K,Oe,pe,l,h.v7_relativeSplatPath)}}else Se[Oe]=await eH(Te);return Se}async function Ue(k,q,K,ae,pe){let Me=k.matches,qe=De("loader",k,pe,K,q,null),Se=Promise.all(ae.map(async Ie=>{if(Ie.matches&&Ie.match&&Ie.controller){let it=(await De("loader",k,Ho(t.history,Ie.path,Ie.controller.signal),[Ie.match],Ie.matches,Ie.key))[Ie.match.route.id];return{[Ie.key]:it}}else return Promise.resolve({[Ie.key]:{type:kt.error,error:on(404,{pathname:Ie.path})}})})),Oe=await qe,Te=(await Se).reduce((Ie,ze)=>Object.assign(Ie,ze),{});return await Promise.all([sH(q,Oe,pe.signal,Me,k.loaderData),uH(q,Te,ae)]),{loaderResults:Oe,fetcherResults:Te}}function nt(){J=!0,ie.push(...qr()),Z.forEach((k,q)=>{se.has(q)&&le.add(q),Ir(q)})}function Et(k,q,K){K===void 0&&(K={}),T.fetchers.set(k,q),we({fetchers:new Map(T.fetchers)},{flushSync:(K&&K.flushSync)===!0})}function Ot(k,q,K,ae){ae===void 0&&(ae={});let pe=Ja(T.matches,q);Ur(k),we({errors:{[pe.route.id]:K},fetchers:new Map(T.fetchers)},{flushSync:(ae&&ae.flushSync)===!0})}function Zr(k){return fe.set(k,(fe.get(k)||0)+1),be.has(k)&&be.delete(k),T.fetchers.get(k)||zq}function Ur(k){let q=T.fetchers.get(k);se.has(k)&&!(q&&q.state==="loading"&&$.has(k))&&Ir(k),Z.delete(k),$.delete(k),X.delete(k),h.v7_fetcherPersist&&be.delete(k),le.delete(k),T.fetchers.delete(k)}function yi(k){let q=(fe.get(k)||0)-1;q<=0?(fe.delete(k),be.add(k),h.v7_fetcherPersist||Ur(k)):fe.set(k,q),we({fetchers:new Map(T.fetchers)})}function Ir(k){let q=se.get(k);q&&(q.abort(),se.delete(k))}function Sn(k){for(let q of k){let K=Zr(q),ae=sa(K.data);T.fetchers.set(q,ae)}}function Wn(){let k=[],q=!1;for(let K of X){let ae=T.fetchers.get(K);ot(ae,"Expected fetcher: "+K),ae.state==="loading"&&(X.delete(K),k.push(K),q=!0)}return Sn(k),q}function V(k){let q=[];for(let[K,ae]of $)if(ae<k){let pe=T.fetchers.get(K);ot(pe,"Expected fetcher: "+K),pe.state==="loading"&&(Ir(K),$.delete(K),q.push(K))}return Sn(q),q.length>0}function G(k,q){let K=T.blockers.get(k)||Ks;return Le.get(k)!==q&&Le.set(k,q),K}function ut(k){T.blockers.delete(k),Le.delete(k)}function Tt(k,q){let K=T.blockers.get(k)||Ks;ot(K.state==="unblocked"&&q.state==="blocked"||K.state==="blocked"&&q.state==="blocked"||K.state==="blocked"&&q.state==="proceeding"||K.state==="blocked"&&q.state==="unblocked"||K.state==="proceeding"&&q.state==="unblocked","Invalid blocker state transition: "+K.state+" -> "+q.state);let ae=new Map(T.blockers);ae.set(k,q),we({blockers:ae})}function Dt(k){let{currentLocation:q,nextLocation:K,historyAction:ae}=k;if(Le.size===0)return;Le.size>1&&os(!1,"A router only supports one blocker at a time");let pe=Array.from(Le.entries()),[Me,qe]=pe[pe.length-1],Se=T.blockers.get(Me);if(!(Se&&Se.state==="proceeding")&&qe({currentLocation:q,nextLocation:K,historyAction:ae}))return Me}function Ve(k){let q=on(404,{pathname:k}),K=s||o,{matches:ae,route:pe}=Xw(K);return qr(),{notFoundMatches:ae,route:pe,error:q}}function qr(k){let q=[];return _e.forEach((K,ae)=>{(!k||k(ae))&&(K.cancel(),q.push(ae),_e.delete(ae))}),q}function Cn(k,q,K){if(v=k,y=q,_=K||null,!x&&T.navigation===pp){x=!0;let ae=zi(T.location,T.matches);ae!=null&&we({restoreScrollPosition:ae})}return()=>{v=null,y=null,_=null}}function Tr(k,q){return _&&_(k,q.map(ae=>Tq(ae,T.loaderData)))||k.key}function En(k,q){if(v&&y){let K=Tr(k,q);v[K]=y()}}function zi(k,q){if(v){let K=Tr(k,q),ae=v[K];if(typeof ae=="number")return ae}return null}function dn(k,q,K){if(d)if(k){if(Object.keys(k[0].params).length>0)return{active:!0,matches:mf(q,K,l,!0)}}else return{active:!0,matches:mf(q,K,l,!0)||[]};return{active:!1,matches:null}}async function br(k,q,K,ae){if(!d)return{type:"success",matches:k};let pe=k;for(;;){let Me=s==null,qe=s||o,Se=a;try{await d({signal:K,path:q,matches:pe,fetcherKey:ae,patch:(Ie,ze)=>{K.aborted||Ww(Ie,ze,qe,Se,i)}})}catch(Ie){return{type:"error",error:Ie,partialMatches:pe}}finally{Me&&!K.aborted&&(o=[...o])}if(K.aborted)return{type:"aborted"};let Oe=Za(qe,q,l);if(Oe)return{type:"success",matches:Oe};let Te=mf(qe,q,l,!0);if(!Te||pe.length===Te.length&&pe.every((Ie,ze)=>Ie.route.id===Te[ze].route.id))return{type:"success",matches:null};pe=Te}}function Co(k){a={},s=Df(k,i,void 0,a)}function Eo(k,q){let K=s==null;Ww(k,q,s||o,a,i),K&&(o=[...o],we({}))}return S={get basename(){return l},get future(){return h},get state(){return T},get routes(){return o},get window(){return e},initialize:he,subscribe:Ne,enableScrollRestoration:Cn,navigate:Fe,fetch:fr,revalidate:Be,createHref:k=>t.history.createHref(k),encodeLocation:k=>t.history.encodeLocation(k),getFetcher:Zr,deleteFetcher:yi,dispose:ge,getBlocker:G,deleteBlocker:ut,patchRoutes:Eo,_internalFetchControllers:se,_internalActiveDeferreds:_e,_internalSetRoutes:Co},S}function Kq(t){return t!=null&&("formData"in t&&t.formData!=null||"body"in t&&t.body!==void 0)}function Ey(t,e,r,n,i,a,o,s){let l,c;if(o){l=[];for(let h of e)if(l.push(h),h.route.id===o){c=h;break}}else l=e,c=e[e.length-1];let d=md(i||".",gd(l,a),ki(t.pathname,r)||t.pathname,s==="path");if(i==null&&(d.search=t.search,d.hash=t.hash),(i==null||i===""||i===".")&&c){let h=R0(d.search);if(c.route.index&&!h)d.search=d.search?d.search.replace(/^\?/,"?index&"):"?index";else if(!c.route.index&&h){let g=new URLSearchParams(d.search),m=g.getAll("index");g.delete("index"),m.filter(_=>_).forEach(_=>g.append("index",_));let v=g.toString();d.search=v?"?"+v:""}}return n&&r!=="/"&&(d.pathname=d.pathname==="/"?r:Ni([r,d.pathname])),uo(d)}function $w(t,e,r,n){if(!n||!Kq(n))return{path:r};if(n.formMethod&&!oH(n.formMethod))return{path:r,error:on(405,{method:n.formMethod})};let i=()=>({path:r,error:on(400,{type:"invalid-body"})}),a=n.formMethod||"get",o=t?a.toUpperCase():a.toLowerCase(),s=hI(r);if(n.body!==void 0){if(n.formEncType==="text/plain"){if(!Zn(o))return i();let g=typeof n.body=="string"?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((m,v)=>{let[_,y]=v;return""+m+_+"="+y+`
|
|
19
|
+
`},""):String(n.body);return{path:r,submission:{formMethod:o,formAction:s,formEncType:n.formEncType,formData:void 0,json:void 0,text:g}}}else if(n.formEncType==="application/json"){if(!Zn(o))return i();try{let g=typeof n.body=="string"?JSON.parse(n.body):n.body;return{path:r,submission:{formMethod:o,formAction:s,formEncType:n.formEncType,formData:void 0,json:g,text:void 0}}}catch{return i()}}}ot(typeof FormData=="function","FormData is not available in this environment");let l,c;if(n.formData)l=Ay(n.formData),c=n.formData;else if(n.body instanceof FormData)l=Ay(n.body),c=n.body;else if(n.body instanceof URLSearchParams)l=n.body,c=zw(l);else if(n.body==null)l=new URLSearchParams,c=new FormData;else try{l=new URLSearchParams(n.body),c=zw(l)}catch{return i()}let d={formMethod:o,formAction:s,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:c,json:void 0,text:void 0};if(Zn(d.formMethod))return{path:r,submission:d};let h=Ta(r);return e&&h.search&&R0(h.search)&&l.append("index",""),h.search="?"+l,{path:uo(h),submission:d}}function Uw(t,e,r){r===void 0&&(r=!1);let n=t.findIndex(i=>i.route.id===e);return n>=0?t.slice(0,r?n+1:n):t}function qw(t,e,r,n,i,a,o,s,l,c,d,h,g,m,v,_){let y=_?xn(_[1])?_[1].error:_[1].data:void 0,x=t.createURL(e.location),w=t.createURL(i),C=r;a&&e.errors?C=Uw(r,Object.keys(e.errors)[0],!0):_&&xn(_[1])&&(C=Uw(r,_[0]));let A=_?_[1].statusCode:void 0,E=o&&A&&A>=400,S=C.filter((D,P)=>{let{route:N}=D;if(N.lazy)return!0;if(N.loader==null)return!1;if(a)return Oy(N,e.loaderData,e.errors);if(Xq(e.loaderData,e.matches[P],D)||l.some(W=>W===D.route.id))return!0;let F=e.matches[P],B=D;return Hw(D,Zt({currentUrl:x,currentParams:F.params,nextUrl:w,nextParams:B.params},n,{actionResult:y,actionStatus:A,defaultShouldRevalidate:E?!1:s||x.pathname+x.search===w.pathname+w.search||x.search!==w.search||fI(F,B)}))}),T=[];return h.forEach((D,P)=>{if(a||!r.some(te=>te.route.id===D.routeId)||d.has(P))return;let N=Za(m,D.path,v);if(!N){T.push({key:P,routeId:D.routeId,path:D.path,matches:null,match:null,controller:null});return}let F=e.fetchers.get(P),B=du(N,D.path),W=!1;g.has(P)?W=!1:c.has(P)?(c.delete(P),W=!0):F&&F.state!=="idle"&&F.data===void 0?W=s:W=Hw(B,Zt({currentUrl:x,currentParams:e.matches[e.matches.length-1].params,nextUrl:w,nextParams:r[r.length-1].params},n,{actionResult:y,actionStatus:A,defaultShouldRevalidate:E?!1:s})),W&&T.push({key:P,routeId:D.routeId,path:D.path,matches:N,match:B,controller:new AbortController})}),[S,T]}function Oy(t,e,r){if(t.lazy)return!0;if(!t.loader)return!1;let n=e!=null&&e[t.id]!==void 0,i=r!=null&&r[t.id]!==void 0;return!n&&i?!1:typeof t.loader=="function"&&t.loader.hydrate===!0?!0:!n&&!i}function Xq(t,e,r){let n=!e||r.route.id!==e.route.id,i=t[r.route.id]===void 0;return n||i}function fI(t,e){let r=t.route.path;return t.pathname!==e.pathname||r!=null&&r.endsWith("*")&&t.params["*"]!==e.params["*"]}function Hw(t,e){if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate(e);if(typeof r=="boolean")return r}return e.defaultShouldRevalidate}function Ww(t,e,r,n,i){var a;let o;if(t){let c=n[t];ot(c,"No route found to patch children into: routeId = "+t),c.children||(c.children=[]),o=c.children}else o=r;let s=e.filter(c=>!o.some(d=>dI(c,d))),l=Df(s,i,[t||"_","patch",String(((a=o)==null?void 0:a.length)||"0")],n);o.push(...l)}function dI(t,e){return"id"in t&&"id"in e&&t.id===e.id?!0:t.index===e.index&&t.path===e.path&&t.caseSensitive===e.caseSensitive?(!t.children||t.children.length===0)&&(!e.children||e.children.length===0)?!0:t.children.every((r,n)=>{var i;return(i=e.children)==null?void 0:i.some(a=>dI(r,a))}):!1}async function Yq(t,e,r){if(!t.lazy)return;let n=await t.lazy();if(!t.lazy)return;let i=r[t.id];ot(i,"No route found in manifest");let a={};for(let o in n){let l=i[o]!==void 0&&o!=="hasErrorBoundary";os(!l,'Route "'+i.id+'" has a static property "'+o+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+o+'" will be ignored.')),!l&&!xq.has(o)&&(a[o]=n[o])}Object.assign(i,a),Object.assign(i,Zt({},e(i),{lazy:void 0}))}async function Zq(t){let{matches:e}=t,r=e.filter(i=>i.shouldLoad);return(await Promise.all(r.map(i=>i.resolve()))).reduce((i,a,o)=>Object.assign(i,{[r[o].route.id]:a}),{})}async function Jq(t,e,r,n,i,a,o,s,l,c){let d=a.map(m=>m.route.lazy?Yq(m.route,l,s):void 0),h=a.map((m,v)=>{let _=d[v],y=i.some(w=>w.route.id===m.route.id);return Zt({},m,{shouldLoad:y,resolve:async w=>(w&&n.method==="GET"&&(m.route.lazy||m.route.loader)&&(y=!0),y?Qq(e,n,m,_,w,c):Promise.resolve({type:kt.data,result:void 0}))})}),g=await t({matches:h,request:n,params:a[0].params,fetcherKey:o,context:c});try{await Promise.all(d)}catch{}return g}async function Qq(t,e,r,n,i,a){let o,s,l=c=>{let d,h=new Promise((v,_)=>d=_);s=()=>d(),e.signal.addEventListener("abort",s);let g=v=>typeof c!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+t+'" [routeId: '+r.route.id+"]"))):c({request:e,params:r.params,context:a},...v!==void 0?[v]:[]),m=(async()=>{try{return{type:"data",result:await(i?i(_=>g(_)):g())}}catch(v){return{type:"error",result:v}}})();return Promise.race([m,h])};try{let c=r.route[t];if(n)if(c){let d,[h]=await Promise.all([l(c).catch(g=>{d=g}),n]);if(d!==void 0)throw d;o=h}else if(await n,c=r.route[t],c)o=await l(c);else if(t==="action"){let d=new URL(e.url),h=d.pathname+d.search;throw on(405,{method:e.method,pathname:h,routeId:r.route.id})}else return{type:kt.data,result:void 0};else if(c)o=await l(c);else{let d=new URL(e.url),h=d.pathname+d.search;throw on(404,{pathname:h})}ot(o.result!==void 0,"You defined "+(t==="action"?"an action":"a loader")+" for route "+('"'+r.route.id+"\" but didn't return anything from your `"+t+"` ")+"function. Please return a value or `null`.")}catch(c){return{type:kt.error,result:c}}finally{s&&e.signal.removeEventListener("abort",s)}return o}async function eH(t){let{result:e,type:r}=t;if(pI(e)){let h;try{let g=e.headers.get("Content-Type");g&&/\bapplication\/json\b/.test(g)?e.body==null?h=null:h=await e.json():h=await e.text()}catch(g){return{type:kt.error,error:g}}return r===kt.error?{type:kt.error,error:new Pf(e.status,e.statusText,h),statusCode:e.status,headers:e.headers}:{type:kt.data,data:h,statusCode:e.status,headers:e.headers}}if(r===kt.error){if(Yw(e)){var n,i;if(e.data instanceof Error){var a,o;return{type:kt.error,error:e.data,statusCode:(a=e.init)==null?void 0:a.status,headers:(o=e.init)!=null&&o.headers?new Headers(e.init.headers):void 0}}return{type:kt.error,error:new Pf(((n=e.init)==null?void 0:n.status)||500,void 0,e.data),statusCode:Mu(e)?e.status:void 0,headers:(i=e.init)!=null&&i.headers?new Headers(e.init.headers):void 0}}return{type:kt.error,error:e,statusCode:Mu(e)?e.status:void 0}}if(aH(e)){var s,l;return{type:kt.deferred,deferredData:e,statusCode:(s=e.init)==null?void 0:s.status,headers:((l=e.init)==null?void 0:l.headers)&&new Headers(e.init.headers)}}if(Yw(e)){var c,d;return{type:kt.data,data:e.data,statusCode:(c=e.init)==null?void 0:c.status,headers:(d=e.init)!=null&&d.headers?new Headers(e.init.headers):void 0}}return{type:kt.data,data:e}}function tH(t,e,r,n,i,a){let o=t.headers.get("Location");if(ot(o,"Redirects returned/thrown from loaders/actions must have a Location header"),!O0.test(o)){let s=n.slice(0,n.findIndex(l=>l.route.id===r)+1);o=Ey(new URL(e.url),s,i,!0,o,a),t.headers.set("Location",o)}return t}function Bw(t,e,r,n){let i=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];if(O0.test(t)){let a=t,o=a.startsWith("//")?new URL(e.protocol+a):new URL(a);if(i.includes(o.protocol))throw new Error("Invalid redirect location");let s=ki(o.pathname,r)!=null;if(o.origin===e.origin&&s)return E0(o.pathname)+o.search+o.hash}try{let a=n.createURL(t);if(i.includes(a.protocol))throw new Error("Invalid redirect location")}catch{}return t}function Ho(t,e,r,n){let i=t.createURL(hI(e)).toString(),a={signal:r};if(n&&Zn(n.formMethod)){let{formMethod:o,formEncType:s}=n;a.method=o.toUpperCase(),s==="application/json"?(a.headers=new Headers({"Content-Type":s}),a.body=JSON.stringify(n.json)):s==="text/plain"?a.body=n.text:s==="application/x-www-form-urlencoded"&&n.formData?a.body=Ay(n.formData):a.body=n.formData}return new Request(i,a)}function Ay(t){let e=new URLSearchParams;for(let[r,n]of t.entries())e.append(r,typeof n=="string"?n:n.name);return e}function zw(t){let e=new FormData;for(let[r,n]of t.entries())e.append(r,n);return e}function rH(t,e,r,n,i){let a={},o=null,s,l=!1,c={},d=r&&xn(r[1])?r[1].error:void 0;return t.forEach(h=>{if(!(h.route.id in e))return;let g=h.route.id,m=e[g];if(ot(!to(m),"Cannot handle redirect results in processLoaderData"),xn(m)){let v=m.error;d!==void 0&&(v=d,d=void 0),o=o||{};{let _=Ja(t,g);o[_.route.id]==null&&(o[_.route.id]=v)}a[g]=void 0,l||(l=!0,s=Mu(m.error)?m.error.status:500),m.headers&&(c[g]=m.headers)}else da(m)?(n.set(g,m.deferredData),a[g]=m.deferredData.data,m.statusCode!=null&&m.statusCode!==200&&!l&&(s=m.statusCode),m.headers&&(c[g]=m.headers)):(a[g]=m.data,m.statusCode&&m.statusCode!==200&&!l&&(s=m.statusCode),m.headers&&(c[g]=m.headers))}),d!==void 0&&r&&(o={[r[0]]:d},a[r[0]]=void 0),{loaderData:a,errors:o,statusCode:s||200,loaderHeaders:c}}function Vw(t,e,r,n,i,a,o){let{loaderData:s,errors:l}=rH(e,r,n,o);return i.forEach(c=>{let{key:d,match:h,controller:g}=c,m=a[d];if(ot(m,"Did not find corresponding fetcher result"),!(g&&g.signal.aborted))if(xn(m)){let v=Ja(t.matches,h==null?void 0:h.route.id);l&&l[v.route.id]||(l=Zt({},l,{[v.route.id]:m.error})),t.fetchers.delete(d)}else if(to(m))ot(!1,"Unhandled fetcher revalidation redirect");else if(da(m))ot(!1,"Unhandled fetcher deferred data");else{let v=sa(m.data);t.fetchers.set(d,v)}}),{loaderData:s,errors:l}}function Gw(t,e,r,n){let i=Zt({},e);for(let a of r){let o=a.route.id;if(e.hasOwnProperty(o)?e[o]!==void 0&&(i[o]=e[o]):t[o]!==void 0&&a.route.loader&&(i[o]=t[o]),n&&n.hasOwnProperty(o))break}return i}function Kw(t){return t?xn(t[1])?{actionData:{}}:{actionData:{[t[0]]:t[1].data}}:{}}function Ja(t,e){return(e?t.slice(0,t.findIndex(n=>n.route.id===e)+1):[...t]).reverse().find(n=>n.route.hasErrorBoundary===!0)||t[0]}function Xw(t){let e=t.length===1?t[0]:t.find(r=>r.index||!r.path||r.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:e}],route:e}}function on(t,e){let{pathname:r,routeId:n,method:i,type:a,message:o}=e===void 0?{}:e,s="Unknown Server Error",l="Unknown @remix-run/router error";return t===400?(s="Bad Request",i&&r&&n?l="You made a "+i+' request to "'+r+'" but '+('did not provide a `loader` for route "'+n+'", ')+"so there is no way to handle the request.":a==="defer-action"?l="defer() is not supported in actions":a==="invalid-body"&&(l="Unable to encode submission body")):t===403?(s="Forbidden",l='Route "'+n+'" does not match URL "'+r+'"'):t===404?(s="Not Found",l='No route matches URL "'+r+'"'):t===405&&(s="Method Not Allowed",i&&r&&n?l="You made a "+i.toUpperCase()+' request to "'+r+'" but '+('did not provide an `action` for route "'+n+'", ')+"so there is no way to handle the request.":i&&(l='Invalid request method "'+i.toUpperCase()+'"')),new Pf(t||500,s,new Error(l),!0)}function Gl(t){let e=Object.entries(t);for(let r=e.length-1;r>=0;r--){let[n,i]=e[r];if(to(i))return{key:n,result:i}}}function hI(t){let e=typeof t=="string"?Ta(t):t;return uo(Zt({},e,{hash:""}))}function nH(t,e){return t.pathname!==e.pathname||t.search!==e.search?!1:t.hash===""?e.hash!=="":t.hash===e.hash?!0:e.hash!==""}function iH(t){return pI(t.result)&&Wq.has(t.result.status)}function da(t){return t.type===kt.deferred}function xn(t){return t.type===kt.error}function to(t){return(t&&t.type)===kt.redirect}function Yw(t){return typeof t=="object"&&t!=null&&"type"in t&&"data"in t&&"init"in t&&t.type==="DataWithResponseInit"}function aH(t){let e=t;return e&&typeof e=="object"&&typeof e.data=="object"&&typeof e.subscribe=="function"&&typeof e.cancel=="function"&&typeof e.resolveData=="function"}function pI(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.headers=="object"&&typeof t.body<"u"}function oH(t){return Hq.has(t.toLowerCase())}function Zn(t){return Uq.has(t.toLowerCase())}async function sH(t,e,r,n,i){let a=Object.entries(e);for(let o=0;o<a.length;o++){let[s,l]=a[o],c=t.find(g=>(g==null?void 0:g.route.id)===s);if(!c)continue;let d=n.find(g=>g.route.id===c.route.id),h=d!=null&&!fI(d,c)&&(i&&i[c.route.id])!==void 0;da(l)&&h&&await A0(l,r,!1).then(g=>{g&&(e[s]=g)})}}async function uH(t,e,r){for(let n=0;n<r.length;n++){let{key:i,routeId:a,controller:o}=r[n],s=e[i];t.find(c=>(c==null?void 0:c.route.id)===a)&&da(s)&&(ot(o,"Expected an AbortController for revalidating fetcher deferred result"),await A0(s,o.signal,!0).then(c=>{c&&(e[i]=c)}))}}async function A0(t,e,r){if(r===void 0&&(r=!1),!await t.deferredData.resolveData(e)){if(r)try{return{type:kt.data,data:t.deferredData.unwrappedData}}catch(i){return{type:kt.error,error:i}}return{type:kt.data,data:t.deferredData.data}}}function R0(t){return new URLSearchParams(t).getAll("index").some(e=>e==="")}function du(t,e){let r=typeof e=="string"?Ta(e).search:e.search;if(t[t.length-1].route.index&&R0(r||""))return t[t.length-1];let n=uI(t);return n[n.length-1]}function Zw(t){let{formMethod:e,formAction:r,formEncType:n,text:i,formData:a,json:o}=t;if(!(!e||!r||!n)){if(i!=null)return{formMethod:e,formAction:r,formEncType:n,formData:void 0,json:void 0,text:i};if(a!=null)return{formMethod:e,formAction:r,formEncType:n,formData:a,json:void 0,text:void 0};if(o!==void 0)return{formMethod:e,formAction:r,formEncType:n,formData:void 0,json:o,text:void 0}}}function gp(t,e){return e?{state:"loading",location:t,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text}:{state:"loading",location:t,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function lH(t,e){return{state:"submitting",location:t,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text}}function Xs(t,e){return t?{state:"loading",formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text,data:e}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function cH(t,e){return{state:"submitting",formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text,data:e?e.data:void 0}}function sa(t){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function fH(t,e){try{let r=t.sessionStorage.getItem(cI);if(r){let n=JSON.parse(r);for(let[i,a]of Object.entries(n||{}))a&&Array.isArray(a)&&e.set(i,new Set(a||[]))}}catch{}}function dH(t,e){if(e.size>0){let r={};for(let[n,i]of e)r[n]=[...i];try{t.sessionStorage.setItem(cI,JSON.stringify(r))}catch(n){os(!1,"Failed to save applied view transitions in sessionStorage ("+n+").")}}}/**
|
|
20
|
+
* React Router v6.30.6
|
|
21
|
+
*
|
|
22
|
+
* Copyright (c) Remix Software Inc.
|
|
23
|
+
*
|
|
24
|
+
* This source code is licensed under the MIT license found in the
|
|
25
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
26
|
+
*
|
|
27
|
+
* @license MIT
|
|
28
|
+
*/function Lf(){return Lf=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Lf.apply(null,arguments)}const zu=ue.createContext(null),I0=ue.createContext(null),qi=ue.createContext(null),D0=ue.createContext(null),Sa=ue.createContext({outlet:null,matches:[],isDataRoute:!1}),gI=ue.createContext(null);function hH(t,e){let{relative:r}=e===void 0?{}:e;_s()||ot(!1);let{basename:n,navigator:i}=ue.useContext(qi),{hash:a,pathname:o,search:s}=yd(t,{relative:r}),l=o;return n!=="/"&&(l=o==="/"?n:Ni([n,o])),i.createHref({pathname:l,search:s,hash:a})}function _s(){return ue.useContext(D0)!=null}function mo(){return _s()||ot(!1),ue.useContext(D0).location}function mI(t){ue.useContext(qi).static||ue.useLayoutEffect(t)}function vd(){let{isDataRoute:t}=ue.useContext(Sa);return t?CH():pH()}function pH(){_s()||ot(!1);let t=ue.useContext(zu),{basename:e,future:r,navigator:n}=ue.useContext(qi),{matches:i}=ue.useContext(Sa),{pathname:a}=mo(),o=JSON.stringify(gd(i,r.v7_relativeSplatPath)),s=ue.useRef(!1);return mI(()=>{s.current=!0}),ue.useCallback(function(c,d){if(d===void 0&&(d={}),!s.current)return;if(typeof c=="number"){n.go(c);return}let h=md(c,JSON.parse(o),a,d.relative==="path");t==null&&e!=="/"&&(h.pathname=h.pathname==="/"?e:Ni([e,h.pathname])),(d.replace?n.replace:n.push)(h,d.state,d)},[e,n,o,a,t])}function yd(t,e){let{relative:r}=e===void 0?{}:e,{future:n}=ue.useContext(qi),{matches:i}=ue.useContext(Sa),{pathname:a}=mo(),o=JSON.stringify(gd(i,n.v7_relativeSplatPath));return ue.useMemo(()=>md(t,JSON.parse(o),a,r==="path"),[t,o,a,r])}function gH(t,e,r,n){_s()||ot(!1);let{navigator:i}=ue.useContext(qi),{matches:a}=ue.useContext(Sa),o=a[a.length-1],s=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let c=mo(),d;d=c;let h=d.pathname||"/",g=h;if(l!=="/"){let _=l.replace(/^\//,"").split("/");g="/"+h.replace(/^\//,"").split("/").slice(_.length).join("/")}let m=Za(t,{pathname:g});return _H(m&&m.map(_=>Object.assign({},_,{params:Object.assign({},s,_.params),pathname:Ni([l,i.encodeLocation?i.encodeLocation(_.pathname).pathname:_.pathname]),pathnameBase:_.pathnameBase==="/"?l:Ni([l,i.encodeLocation?i.encodeLocation(_.pathnameBase).pathname:_.pathnameBase])})),a,r,n)}function mH(){let t=SH(),e=Mu(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),r=t instanceof Error?t.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return ue.createElement(ue.Fragment,null,ue.createElement("h2",null,"Unexpected Application Error!"),ue.createElement("h3",{style:{fontStyle:"italic"}},e),r?ue.createElement("pre",{style:i},r):null,null)}const vH=ue.createElement(mH,null);class yH extends ue.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,r){return r.location!==e.location||r.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:r.error,location:r.location,revalidation:e.revalidation||r.revalidation}}componentDidCatch(e,r){console.error("React Router caught the following error during render",e,r)}render(){return this.state.error!==void 0?ue.createElement(Sa.Provider,{value:this.props.routeContext},ue.createElement(gI.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function bH(t){let{routeContext:e,match:r,children:n}=t,i=ue.useContext(zu);return i&&i.static&&i.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=r.route.id),ue.createElement(Sa.Provider,{value:e},n)}function _H(t,e,r,n){var i;if(e===void 0&&(e=[]),r===void 0&&(r=null),n===void 0&&(n=null),t==null){var a;if(!r)return null;if(r.errors)t=r.matches;else if((a=n)!=null&&a.v7_partialHydration&&e.length===0&&!r.initialized&&r.matches.length>0)t=r.matches;else return null}let o=t,s=(i=r)==null?void 0:i.errors;if(s!=null){let d=o.findIndex(h=>h.route.id&&(s==null?void 0:s[h.route.id])!==void 0);d>=0||ot(!1),o=o.slice(0,Math.min(o.length,d+1))}let l=!1,c=-1;if(r&&n&&n.v7_partialHydration)for(let d=0;d<o.length;d++){let h=o[d];if((h.route.HydrateFallback||h.route.hydrateFallbackElement)&&(c=d),h.route.id){let{loaderData:g,errors:m}=r,v=h.route.loader&&g[h.route.id]===void 0&&(!m||m[h.route.id]===void 0);if(h.route.lazy||v){l=!0,c>=0?o=o.slice(0,c+1):o=[o[0]];break}}}return o.reduceRight((d,h,g)=>{let m,v=!1,_=null,y=null;r&&(m=s&&h.route.id?s[h.route.id]:void 0,_=h.route.errorElement||vH,l&&(c<0&&g===0?(EH("route-fallback"),v=!0,y=null):c===g&&(v=!0,y=h.route.hydrateFallbackElement||null)));let x=e.concat(o.slice(0,g+1)),w=()=>{let C;return m?C=_:v?C=y:h.route.Component?C=ue.createElement(h.route.Component,null):h.route.element?C=h.route.element:C=d,ue.createElement(bH,{match:h,routeContext:{outlet:d,matches:x,isDataRoute:r!=null},children:C})};return r&&(h.route.ErrorBoundary||h.route.errorElement||g===0)?ue.createElement(yH,{location:r.location,revalidation:r.revalidation,component:_,error:m,children:w(),routeContext:{outlet:null,matches:x,isDataRoute:!0}}):w()},null)}var vI=(function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t})(vI||{}),yI=(function(t){return t.UseBlocker="useBlocker",t.UseLoaderData="useLoaderData",t.UseActionData="useActionData",t.UseRouteError="useRouteError",t.UseNavigation="useNavigation",t.UseRouteLoaderData="useRouteLoaderData",t.UseMatches="useMatches",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t.UseRouteId="useRouteId",t})(yI||{});function xH(t){let e=ue.useContext(zu);return e||ot(!1),e}function wH(t){let e=ue.useContext(I0);return e||ot(!1),e}function TH(t){let e=ue.useContext(Sa);return e||ot(!1),e}function bI(t){let e=TH(),r=e.matches[e.matches.length-1];return r.route.id||ot(!1),r.route.id}function SH(){var t;let e=ue.useContext(gI),r=wH(yI.UseRouteError),n=bI();return e!==void 0?e:(t=r.errors)==null?void 0:t[n]}function CH(){let{router:t}=xH(vI.UseNavigateStable),e=bI(),r=ue.useRef(!1);return mI(()=>{r.current=!0}),ue.useCallback(function(i,a){a===void 0&&(a={}),r.current&&(typeof i=="number"?t.navigate(i):t.navigate(i,Lf({fromRouteId:e},a)))},[t,e])}const Jw={};function EH(t,e,r){Jw[t]||(Jw[t]=!0)}function OH(t,e){t==null||t.v7_startTransition,(t==null?void 0:t.v7_relativeSplatPath)===void 0&&(!e||e.v7_relativeSplatPath),e&&(e.v7_fetcherPersist,e.v7_normalizeFormMethod,e.v7_partialHydration,e.v7_skipActionErrorRevalidation)}function AH(t){let{to:e,replace:r,state:n,relative:i}=t;_s()||ot(!1);let{future:a,static:o}=ue.useContext(qi),{matches:s}=ue.useContext(Sa),{pathname:l}=mo(),c=vd(),d=md(e,gd(s,a.v7_relativeSplatPath),l,i==="path"),h=JSON.stringify(d);return ue.useEffect(()=>c(JSON.parse(h),{replace:r,state:n,relative:i}),[c,h,i,r,n]),null}function RH(t){let{basename:e="/",children:r=null,location:n,navigationType:i=vr.Pop,navigator:a,static:o=!1,future:s}=t;_s()&&ot(!1);let l=e.replace(/^\/*/,"/"),c=ue.useMemo(()=>({basename:l,navigator:a,static:o,future:Lf({v7_relativeSplatPath:!1},s)}),[l,s,a,o]);typeof n=="string"&&(n=Ta(n));let{pathname:d="/",search:h="",hash:g="",state:m=null,key:v="default"}=n,_=ue.useMemo(()=>{let y=ki(d,l);return y==null?null:{location:{pathname:y,search:h,hash:g,state:m,key:v},navigationType:i}},[l,d,h,g,m,v,i]);return _==null?null:ue.createElement(qi.Provider,{value:c},ue.createElement(D0.Provider,{children:r,value:_}))}new Promise(()=>{});function IH(t){let e={hasErrorBoundary:t.ErrorBoundary!=null||t.errorElement!=null};return t.Component&&Object.assign(e,{element:ue.createElement(t.Component),Component:void 0}),t.HydrateFallback&&Object.assign(e,{hydrateFallbackElement:ue.createElement(t.HydrateFallback),HydrateFallback:void 0}),t.ErrorBoundary&&Object.assign(e,{errorElement:ue.createElement(t.ErrorBoundary),ErrorBoundary:void 0}),e}/**
|
|
29
|
+
* React Router DOM v6.30.6
|
|
30
|
+
*
|
|
31
|
+
* Copyright (c) Remix Software Inc.
|
|
32
|
+
*
|
|
33
|
+
* This source code is licensed under the MIT license found in the
|
|
34
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
35
|
+
*
|
|
36
|
+
* @license MIT
|
|
37
|
+
*/function ss(){return ss=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},ss.apply(null,arguments)}function _I(t,e){if(t==null)return{};var r={};for(var n in t)if({}.hasOwnProperty.call(t,n)){if(e.indexOf(n)!==-1)continue;r[n]=t[n]}return r}function DH(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function MH(t,e){return t.button===0&&(!e||e==="_self")&&!DH(t)}const PH=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],LH=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],NH="6";try{window.__reactRouterVersion=NH}catch{}function fae(t,e){return Gq({basename:e==null?void 0:e.basename,future:ss({},e==null?void 0:e.future,{v7_prependBasename:!0}),history:yq({window:e==null?void 0:e.window}),hydrationData:(e==null?void 0:e.hydrationData)||FH(),routes:t,mapRouteProperties:IH,dataStrategy:e==null?void 0:e.dataStrategy,patchRoutesOnNavigation:e==null?void 0:e.patchRoutesOnNavigation,window:e==null?void 0:e.window}).initialize()}function FH(){var t;let e=(t=window)==null?void 0:t.__staticRouterHydrationData;return e&&e.errors&&(e=ss({},e,{errors:kH(e.errors)})),e}function kH(t){if(!t)return null;let e=Object.entries(t),r={};for(let[n,i]of e)if(i&&i.__type==="RouteErrorResponse")r[n]=new Pf(i.status,i.statusText,i.data,i.internal===!0);else if(i&&i.__type==="Error"){if(i.__subType){let a=window[i.__subType];if(typeof a=="function")try{let o=new a(i.message);o.stack="",r[n]=o}catch{}}if(r[n]==null){let a=new Error(i.message);a.stack="",r[n]=a}}else r[n]=i;return r}const xI=ue.createContext({isTransitioning:!1}),jH=ue.createContext(new Map),$H="startTransition",Qw=ue[$H],UH="flushSync",e1=AU[UH];function qH(t){Qw?Qw(t):t()}function Ys(t){e1?e1(t):t()}class HH{constructor(){this.status="pending",this.promise=new Promise((e,r)=>{this.resolve=n=>{this.status==="pending"&&(this.status="resolved",e(n))},this.reject=n=>{this.status==="pending"&&(this.status="rejected",r(n))}})}}function dae(t){let{fallbackElement:e,router:r,future:n}=t,[i,a]=ue.useState(r.state),[o,s]=ue.useState(),[l,c]=ue.useState({isTransitioning:!1}),[d,h]=ue.useState(),[g,m]=ue.useState(),[v,_]=ue.useState(),y=ue.useRef(new Map),{v7_startTransition:x}=n||{},w=ue.useCallback(D=>{x?qH(D):D()},[x]),C=ue.useCallback((D,P)=>{let{deletedFetchers:N,flushSync:F,viewTransitionOpts:B}=P;D.fetchers.forEach((te,J)=>{te.data!==void 0&&y.current.set(J,te.data)}),N.forEach(te=>y.current.delete(te));let W=r.window==null||r.window.document==null||typeof r.window.document.startViewTransition!="function";if(!B||W){F?Ys(()=>a(D)):w(()=>a(D));return}if(F){Ys(()=>{g&&(d&&d.resolve(),g.skipTransition()),c({isTransitioning:!0,flushSync:!0,currentLocation:B.currentLocation,nextLocation:B.nextLocation})});let te=r.window.document.startViewTransition(()=>{Ys(()=>a(D))});te.finished.finally(()=>{Ys(()=>{h(void 0),m(void 0),s(void 0),c({isTransitioning:!1})})}),Ys(()=>m(te));return}g?(d&&d.resolve(),g.skipTransition(),_({state:D,currentLocation:B.currentLocation,nextLocation:B.nextLocation})):(s(D),c({isTransitioning:!0,flushSync:!1,currentLocation:B.currentLocation,nextLocation:B.nextLocation}))},[r.window,g,d,y,w]);ue.useLayoutEffect(()=>r.subscribe(C),[r,C]),ue.useEffect(()=>{l.isTransitioning&&!l.flushSync&&h(new HH)},[l]),ue.useEffect(()=>{if(d&&o&&r.window){let D=o,P=d.promise,N=r.window.document.startViewTransition(async()=>{w(()=>a(D)),await P});N.finished.finally(()=>{h(void 0),m(void 0),s(void 0),c({isTransitioning:!1})}),m(N)}},[w,o,d,r.window]),ue.useEffect(()=>{d&&o&&i.location.key===o.location.key&&d.resolve()},[d,g,i.location,o]),ue.useEffect(()=>{!l.isTransitioning&&v&&(s(v.state),c({isTransitioning:!0,flushSync:!1,currentLocation:v.currentLocation,nextLocation:v.nextLocation}),_(void 0))},[l.isTransitioning,v]),ue.useEffect(()=>{},[]);let A=ue.useMemo(()=>({createHref:r.createHref,encodeLocation:r.encodeLocation,go:D=>r.navigate(D),push:(D,P,N)=>r.navigate(D,{state:P,preventScrollReset:N==null?void 0:N.preventScrollReset}),replace:(D,P,N)=>r.navigate(D,{replace:!0,state:P,preventScrollReset:N==null?void 0:N.preventScrollReset})}),[r]),E=r.basename||"/",S=ue.useMemo(()=>({router:r,navigator:A,static:!1,basename:E}),[r,A,E]),T=ue.useMemo(()=>({v7_relativeSplatPath:r.future.v7_relativeSplatPath}),[r.future.v7_relativeSplatPath]);return ue.useEffect(()=>OH(n,r.future),[n,r.future]),ue.createElement(ue.Fragment,null,ue.createElement(zu.Provider,{value:S},ue.createElement(I0.Provider,{value:i},ue.createElement(jH.Provider,{value:y.current},ue.createElement(xI.Provider,{value:l},ue.createElement(RH,{basename:E,location:i.location,navigationType:i.historyAction,navigator:A,future:T},i.initialized||r.future.v7_partialHydration?ue.createElement(WH,{routes:r.routes,future:r.future,state:i}):e))))),null)}const WH=ue.memo(BH);function BH(t){let{routes:e,future:r,state:n}=t;return gH(e,void 0,n,r)}const zH=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",VH=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,GH=ue.forwardRef(function(e,r){let{onClick:n,relative:i,reloadDocument:a,replace:o,state:s,target:l,to:c,preventScrollReset:d,viewTransition:h}=e,g=_I(e,PH),{basename:m}=ue.useContext(qi),v,_=!1;if(typeof c=="string"&&VH.test(c)&&(v=c,zH))try{let C=new URL(window.location.href),A=c.startsWith("//")?new URL(C.protocol+c):new URL(c),E=ki(A.pathname,m);A.origin===C.origin&&E!=null?c=E+A.search+A.hash:_=!0}catch{}let y=hH(c,{relative:i}),x=YH(c,{replace:o,state:s,target:l,preventScrollReset:d,relative:i,viewTransition:h});function w(C){n&&n(C),C.defaultPrevented||x(C)}return ue.createElement("a",ss({},g,{href:v||y,onClick:_||a?n:w,ref:r,target:l}))}),KH=ue.forwardRef(function(e,r){let{"aria-current":n="page",caseSensitive:i=!1,className:a="",end:o=!1,style:s,to:l,viewTransition:c,children:d}=e,h=_I(e,LH),g=yd(l,{relative:h.relative}),m=mo(),v=ue.useContext(I0),{navigator:_,basename:y}=ue.useContext(qi),x=v!=null&&ZH(g)&&c===!0,w=_.encodeLocation?_.encodeLocation(g).pathname:g.pathname,C=m.pathname,A=v&&v.navigation&&v.navigation.location?v.navigation.location.pathname:null;i||(C=C.toLowerCase(),A=A?A.toLowerCase():null,w=w.toLowerCase()),A&&y&&(A=ki(A,y)||A);const E=w!=="/"&&w.endsWith("/")?w.length-1:w.length;let S=C===w||!o&&C.startsWith(w)&&C.charAt(E)==="/",T=A!=null&&(A===w||!o&&A.startsWith(w)&&A.charAt(w.length)==="/"),D={isActive:S,isPending:T,isTransitioning:x},P=S?n:void 0,N;typeof a=="function"?N=a(D):N=[a,S?"active":null,T?"pending":null,x?"transitioning":null].filter(Boolean).join(" ");let F=typeof s=="function"?s(D):s;return ue.createElement(GH,ss({},h,{"aria-current":P,className:N,ref:r,style:F,to:l,viewTransition:c}),typeof d=="function"?d(D):d)});var Ry;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"})(Ry||(Ry={}));var t1;(function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(t1||(t1={}));function XH(t){let e=ue.useContext(zu);return e||ot(!1),e}function YH(t,e){let{target:r,replace:n,state:i,preventScrollReset:a,relative:o,viewTransition:s}=e===void 0?{}:e,l=vd(),c=mo(),d=yd(t,{relative:o});return ue.useCallback(h=>{if(MH(h,r)){h.preventDefault();let g=n!==void 0?n:uo(c)===uo(d);l(t,{replace:g,state:i,preventScrollReset:a,relative:o,viewTransition:s})}},[c,l,d,n,i,r,t,a,o,s])}function ZH(t,e){e===void 0&&(e={});let r=ue.useContext(xI);r==null&&ot(!1);let{basename:n}=XH(Ry.useViewTransitionState),i=yd(t,{relative:e.relative});if(!r.isTransitioning)return!1;let a=ki(r.currentLocation.pathname,n)||r.currentLocation.pathname,o=ki(r.nextLocation.pathname,n)||r.nextLocation.pathname;return Mf(i.pathname,o)!=null||Mf(i.pathname,a)!=null}const qa=new Map;function hae(t,e){if(x0===void 0)throw new TypeError('You are using React 17 or below. Install with "npm install use-local-storage-state@17".');const[r]=sr(e==null?void 0:e.defaultValue);if(typeof window>"u")return[r,()=>{},{isPersistent:!0,removeItem:()=>{}}];const n=e==null?void 0:e.serializer;return JH(t,r,e==null?void 0:e.storageSync,n==null?void 0:n.parse,n==null?void 0:n.stringify)}function JH(t,e,r=!0,n=QH,i=JSON.stringify){!qa.has(t)&&e!==void 0&&Zs(()=>localStorage.getItem(t))===null&&Zs(()=>localStorage.setItem(t,i(e)));const a=Kt({item:null,parsed:e}),o=x0(bt(l=>{const c=d=>{t===d&&l()};return Iy.add(c),()=>{Iy.delete(c)}},[t]),()=>{var l;const c=(l=Zs(()=>localStorage.getItem(t)))!==null&&l!==void 0?l:null;if(qa.has(t))a.current={item:c,parsed:qa.get(t)};else if(c!==a.current.item){let d;try{d=c===null?e:n(c)}catch{d=e}a.current={item:c,parsed:d}}return a.current.parsed},()=>e),s=bt(l=>{const c=l instanceof Function?l(a.current.parsed):l;try{localStorage.setItem(t,i(c)),qa.delete(t)}catch{qa.set(t,c)}mp(t)},[t,i]);return ht(()=>{if(!r)return;const l=c=>{c.storageArea===Zs(()=>localStorage)&&c.key===t&&mp(t)};return window.addEventListener("storage",l),()=>window.removeEventListener("storage",l)},[t,r]),yr(()=>[o,s,{isPersistent:o===e||!qa.has(t),removeItem(){Zs(()=>localStorage.removeItem(t)),qa.delete(t),mp(t)}}],[t,s,o,e])}const Iy=new Set;function mp(t){for(const e of[...Iy])e(t)}function QH(t){return t==="undefined"?void 0:JSON.parse(t)}function Zs(t){try{return t()}catch{return}}var eW={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},tW=function(e,r,n){var i,a=eW[e];return typeof a=="string"?i=a:r===1?i=a.one:i=a.other.replace("{{count}}",r.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+i:i+" ago":i};function vp(t){return function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=e.width?String(e.width):t.defaultWidth,n=t.formats[r]||t.formats[t.defaultWidth];return n}}var rW={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},nW={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},iW={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},aW={date:vp({formats:rW,defaultWidth:"full"}),time:vp({formats:nW,defaultWidth:"full"}),dateTime:vp({formats:iW,defaultWidth:"full"})},oW={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},sW=function(e,r,n,i){return oW[e]};function Js(t){return function(e,r){var n=r!=null&&r.context?String(r.context):"standalone",i;if(n==="formatting"&&t.formattingValues){var a=t.defaultFormattingWidth||t.defaultWidth,o=r!=null&&r.width?String(r.width):a;i=t.formattingValues[o]||t.formattingValues[a]}else{var s=t.defaultWidth,l=r!=null&&r.width?String(r.width):t.defaultWidth;i=t.values[l]||t.values[s]}var c=t.argumentCallback?t.argumentCallback(e):e;return i[c]}}var uW={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},lW={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},cW={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},fW={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},dW={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},hW={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},pW=function(e,r){var n=Number(e),i=n%100;if(i>20||i<10)switch(i%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},gW={ordinalNumber:pW,era:Js({values:uW,defaultWidth:"wide"}),quarter:Js({values:lW,defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:Js({values:cW,defaultWidth:"wide"}),day:Js({values:fW,defaultWidth:"wide"}),dayPeriod:Js({values:dW,defaultWidth:"wide",formattingValues:hW,defaultFormattingWidth:"wide"})};function Qs(t){return function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=r.width,i=n&&t.matchPatterns[n]||t.matchPatterns[t.defaultMatchWidth],a=e.match(i);if(!a)return null;var o=a[0],s=n&&t.parsePatterns[n]||t.parsePatterns[t.defaultParseWidth],l=Array.isArray(s)?vW(s,function(h){return h.test(o)}):mW(s,function(h){return h.test(o)}),c;c=t.valueCallback?t.valueCallback(l):l,c=r.valueCallback?r.valueCallback(c):c;var d=e.slice(o.length);return{value:c,rest:d}}}function mW(t,e){for(var r in t)if(t.hasOwnProperty(r)&&e(t[r]))return r}function vW(t,e){for(var r=0;r<t.length;r++)if(e(t[r]))return r}function yW(t){return function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=e.match(t.matchPattern);if(!n)return null;var i=n[0],a=e.match(t.parsePattern);if(!a)return null;var o=t.valueCallback?t.valueCallback(a[0]):a[0];o=r.valueCallback?r.valueCallback(o):o;var s=e.slice(i.length);return{value:o,rest:s}}}var bW=/^(\d+)(th|st|nd|rd)?/i,_W=/\d+/i,xW={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},wW={any:[/^b/i,/^(a|c)/i]},TW={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},SW={any:[/1/i,/2/i,/3/i,/4/i]},CW={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},EW={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},OW={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},AW={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},RW={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},IW={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},DW={ordinalNumber:yW({matchPattern:bW,parsePattern:_W,valueCallback:function(e){return parseInt(e,10)}}),era:Qs({matchPatterns:xW,defaultMatchWidth:"wide",parsePatterns:wW,defaultParseWidth:"any"}),quarter:Qs({matchPatterns:TW,defaultMatchWidth:"wide",parsePatterns:SW,defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:Qs({matchPatterns:CW,defaultMatchWidth:"wide",parsePatterns:EW,defaultParseWidth:"any"}),day:Qs({matchPatterns:OW,defaultMatchWidth:"wide",parsePatterns:AW,defaultParseWidth:"any"}),dayPeriod:Qs({matchPatterns:RW,defaultMatchWidth:"any",parsePatterns:IW,defaultParseWidth:"any"})},bd={code:"en-US",formatDistance:tW,formatLong:aW,formatRelative:sW,localize:gW,match:DW,options:{weekStartsOn:0,firstWeekContainsDate:1}};const wI=()=>({adapterLocale:bd}),MW=pd({activeAccount:null,email:"",handleCloseWelcomeVideo:()=>{},internalDomains:[],isError:!1,ready:!1,setActiveAccount:()=>{},setShowReleaseDialog:()=>{},showReleaseDialog:!1,showWelcomeVideo:!1,superUser:!1,userInfo:{},userPreferences:null}),PW=()=>Wu(MW),LW="17.0.0",NW={version:LW},FW=()=>{var e;const t=(e=window.gpConfig)==null?void 0:e["ui-mfe-dcim"];if(!t)throw new Error("ui-mfe-dcim config not loaded. Ensure config.json is fetched before app bootstrap.");return t},kW=()=>{const{mfeChartsUi:t}=FW();return{appVersion:NW.version,globalApiUrl:t.globalApiUrl,i18nLoadPath:t.isDev?"/locales/{{lng}}/{{ns}}.json":"/src/lib/locales/{{lng}}/{{ns}}.json"}};class M0 extends Error{constructor(r,n,i,a){super(r);Xe(this,"statusCode",0);Xe(this,"description");Xe(this,"details");this.statusCode=n,this.description=i||"",this.details=a||"",Object.setPrototypeOf(this,M0.prototype)}}const TI=t=>t==null,jW=async t=>{var e,r,n,i,a;if(!t.ok){const o=await t.json(),s=(r=(e=o==null?void 0:o.Errors)==null?void 0:e.Error)==null?void 0:r[0];throw new M0(((i=(n=o==null?void 0:o.Errors)==null?void 0:n.Error)==null?void 0:i[0].ReasonCode)||((a=o==null?void 0:o.error)==null?void 0:a.message),t.status,s==null?void 0:s.Description,s==null?void 0:s.Details)}};function pi(t){"@babel/helpers - typeof";return pi=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},pi(t)}function wt(t){if(t===null||t===!0||t===!1)return NaN;var e=Number(t);return isNaN(e)?e:e<0?Math.ceil(e):Math.floor(e)}function Re(t,e){if(e.length<t)throw new TypeError(t+" argument"+(t>1?"s":"")+" required, but only "+e.length+" present")}function je(t){Re(1,arguments);var e=Object.prototype.toString.call(t);return t instanceof Date||pi(t)==="object"&&e==="[object Date]"?new Date(t.getTime()):typeof t=="number"||e==="[object Number]"?new Date(t):((typeof t=="string"||e==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function P0(t,e){Re(2,arguments);var r=je(t),n=wt(e);return isNaN(n)?new Date(NaN):(n&&r.setDate(r.getDate()+n),r)}function _d(t,e){Re(2,arguments);var r=je(t),n=wt(e);if(isNaN(n))return new Date(NaN);if(!n)return r;var i=r.getDate(),a=new Date(r.getTime());a.setMonth(r.getMonth()+n+1,0);var o=a.getDate();return i>=o?a:(r.setFullYear(a.getFullYear(),a.getMonth(),i),r)}function Vu(t,e){Re(2,arguments);var r=je(t).getTime(),n=wt(e);return new Date(r+n)}var $W=36e5;function UW(t,e){Re(2,arguments);var r=wt(e);return Vu(t,r*$W)}var qW={};function Hi(){return qW}function r1(t,e){var r,n,i,a,o,s,l,c;Re(1,arguments);var d=Hi(),h=wt((r=(n=(i=(a=e==null?void 0:e.weekStartsOn)!==null&&a!==void 0?a:e==null||(o=e.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&i!==void 0?i:d.weekStartsOn)!==null&&n!==void 0?n:(l=d.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&r!==void 0?r:0);if(!(h>=0&&h<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var g=je(t),m=g.getDay(),v=(m<h?7:0)+m-h;return g.setDate(g.getDate()-v),g.setHours(0,0,0,0),g}function us(t){var e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return e.setUTCFullYear(t.getFullYear()),t.getTime()-e.getTime()}function lo(t){Re(1,arguments);var e=je(t);return e.setHours(0,0,0,0),e}var HW=864e5;function WW(t,e){Re(2,arguments);var r=lo(t),n=lo(e),i=r.getTime()-us(r),a=n.getTime()-us(n);return Math.round((i-a)/HW)}var BW=6e4;function zW(t,e){Re(2,arguments);var r=wt(e);return Vu(t,r*BW)}function VW(t,e){Re(2,arguments);var r=wt(e),n=r*3;return _d(t,n)}function GW(t,e){Re(2,arguments);var r=wt(e);return Vu(t,r*1e3)}function KW(t,e){Re(2,arguments);var r=wt(e),n=r*7;return P0(t,n)}function XW(t,e){Re(2,arguments);var r=wt(e);return _d(t,r*12)}function ts(t,e){Re(2,arguments);var r=je(t),n=je(e),i=r.getTime()-n.getTime();return i<0?-1:i>0?1:i}var xd=6e4,wd=36e5,YW=1e3;function ZW(t,e){Re(2,arguments);var r=lo(t),n=lo(e);return r.getTime()===n.getTime()}function SI(t){return Re(1,arguments),t instanceof Date||pi(t)==="object"&&Object.prototype.toString.call(t)==="[object Date]"}function xs(t){if(Re(1,arguments),!SI(t)&&typeof t!="number")return!1;var e=je(t);return!isNaN(Number(e))}function JW(t,e){Re(2,arguments);var r=je(t),n=je(e),i=r.getFullYear()-n.getFullYear(),a=r.getMonth()-n.getMonth();return i*12+a}function QW(t,e){Re(2,arguments);var r=je(t),n=je(e);return r.getFullYear()-n.getFullYear()}function n1(t,e){var r=t.getFullYear()-e.getFullYear()||t.getMonth()-e.getMonth()||t.getDate()-e.getDate()||t.getHours()-e.getHours()||t.getMinutes()-e.getMinutes()||t.getSeconds()-e.getSeconds()||t.getMilliseconds()-e.getMilliseconds();return r<0?-1:r>0?1:r}function CI(t,e){Re(2,arguments);var r=je(t),n=je(e),i=n1(r,n),a=Math.abs(WW(r,n));r.setDate(r.getDate()-i*a);var o=+(n1(r,n)===-i),s=i*(a-o);return s===0?0:s}function Td(t,e){return Re(2,arguments),je(t).getTime()-je(e).getTime()}var i1={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(e){return e<0?Math.ceil(e):Math.floor(e)}},eB="trunc";function Gu(t){return t?i1[t]:i1[eB]}function tB(t,e,r){Re(2,arguments);var n=Td(t,e)/wd;return Gu(void 0)(n)}function rB(t,e,r){Re(2,arguments);var n=Td(t,e)/xd;return Gu(void 0)(n)}function Sd(t){Re(1,arguments);var e=je(t);return e.setHours(23,59,59,999),e}function EI(t){Re(1,arguments);var e=je(t),r=e.getMonth();return e.setFullYear(e.getFullYear(),r+1,0),e.setHours(23,59,59,999),e}function nB(t){Re(1,arguments);var e=je(t);return Sd(e).getTime()===EI(e).getTime()}function OI(t,e){Re(2,arguments);var r=je(t),n=je(e),i=ts(r,n),a=Math.abs(JW(r,n)),o;if(a<1)o=0;else{r.getMonth()===1&&r.getDate()>27&&r.setDate(30),r.setMonth(r.getMonth()-i*a);var s=ts(r,n)===-i;nB(je(t))&&a===1&&ts(t,n)===1&&(s=!1),o=i*(a-Number(s))}return o===0?0:o}function iB(t,e,r){Re(2,arguments);var n=OI(t,e)/3;return Gu(void 0)(n)}function aB(t,e,r){Re(2,arguments);var n=Td(t,e)/1e3;return Gu(void 0)(n)}function oB(t,e,r){Re(2,arguments);var n=CI(t,e)/7;return Gu(void 0)(n)}function sB(t,e){Re(2,arguments);var r=je(t),n=je(e),i=ts(r,n),a=Math.abs(QW(r,n));r.setFullYear(1584),n.setFullYear(1584);var o=ts(r,n)===-i,s=i*(a-Number(o));return s===0?0:s}function uB(t){Re(1,arguments);var e=je(t);return e.setSeconds(0,0),e}function lB(t){Re(1,arguments);var e=je(t),r=e.getMonth(),n=r-r%3;return e.setMonth(n,1),e.setHours(0,0,0,0),e}function cB(t){Re(1,arguments);var e=je(t);return e.setDate(1),e.setHours(0,0,0,0),e}function fB(t){Re(1,arguments);var e=je(t),r=e.getFullYear();return e.setFullYear(r+1,0,0),e.setHours(23,59,59,999),e}function dB(t){Re(1,arguments);var e=je(t),r=new Date(0);return r.setFullYear(e.getFullYear(),0,1),r.setHours(0,0,0,0),r}function hB(t){Re(1,arguments);var e=je(t);return e.setMinutes(59,59,999),e}function pB(t,e){var r,n,i,a,o,s;Re(1,arguments);var l=Hi(),c=wt((r=(n=(i=(a=void 0)!==null&&a!==void 0?a:void 0)!==null&&i!==void 0?i:l.weekStartsOn)!==null&&n!==void 0?n:(o=l.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&r!==void 0?r:0);if(!(c>=0&&c<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var d=je(t),h=d.getDay(),g=(h<c?-7:0)+6-(h-c);return d.setDate(d.getDate()+g),d.setHours(23,59,59,999),d}function gB(t){Re(1,arguments);var e=je(t);return e.setSeconds(59,999),e}function mB(t){Re(1,arguments);var e=je(t),r=e.getMonth(),n=r-r%3+3;return e.setMonth(n,0),e.setHours(23,59,59,999),e}function vB(t){Re(1,arguments);var e=je(t);return e.setMilliseconds(999),e}function AI(t,e){Re(2,arguments);var r=wt(e);return Vu(t,-r)}var yB=864e5;function bB(t){Re(1,arguments);var e=je(t),r=e.getTime();e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0);var n=e.getTime(),i=r-n;return Math.floor(i/yB)+1}function ls(t){Re(1,arguments);var e=1,r=je(t),n=r.getUTCDay(),i=(n<e?7:0)+n-e;return r.setUTCDate(r.getUTCDate()-i),r.setUTCHours(0,0,0,0),r}function RI(t){Re(1,arguments);var e=je(t),r=e.getUTCFullYear(),n=new Date(0);n.setUTCFullYear(r+1,0,4),n.setUTCHours(0,0,0,0);var i=ls(n),a=new Date(0);a.setUTCFullYear(r,0,4),a.setUTCHours(0,0,0,0);var o=ls(a);return e.getTime()>=i.getTime()?r+1:e.getTime()>=o.getTime()?r:r-1}function _B(t){Re(1,arguments);var e=RI(t),r=new Date(0);r.setUTCFullYear(e,0,4),r.setUTCHours(0,0,0,0);var n=ls(r);return n}var xB=6048e5;function II(t){Re(1,arguments);var e=je(t),r=ls(e).getTime()-_B(e).getTime();return Math.round(r/xB)+1}function co(t,e){var r,n,i,a,o,s,l,c;Re(1,arguments);var d=Hi(),h=wt((r=(n=(i=(a=e==null?void 0:e.weekStartsOn)!==null&&a!==void 0?a:e==null||(o=e.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&i!==void 0?i:d.weekStartsOn)!==null&&n!==void 0?n:(l=d.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&r!==void 0?r:0);if(!(h>=0&&h<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var g=je(t),m=g.getUTCDay(),v=(m<h?7:0)+m-h;return g.setUTCDate(g.getUTCDate()-v),g.setUTCHours(0,0,0,0),g}function L0(t,e){var r,n,i,a,o,s,l,c;Re(1,arguments);var d=je(t),h=d.getUTCFullYear(),g=Hi(),m=wt((r=(n=(i=(a=e==null?void 0:e.firstWeekContainsDate)!==null&&a!==void 0?a:e==null||(o=e.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.firstWeekContainsDate)!==null&&i!==void 0?i:g.firstWeekContainsDate)!==null&&n!==void 0?n:(l=g.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&r!==void 0?r:1);if(!(m>=1&&m<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var v=new Date(0);v.setUTCFullYear(h+1,0,m),v.setUTCHours(0,0,0,0);var _=co(v,e),y=new Date(0);y.setUTCFullYear(h,0,m),y.setUTCHours(0,0,0,0);var x=co(y,e);return d.getTime()>=_.getTime()?h+1:d.getTime()>=x.getTime()?h:h-1}function wB(t,e){var r,n,i,a,o,s,l,c;Re(1,arguments);var d=Hi(),h=wt((r=(n=(i=(a=e==null?void 0:e.firstWeekContainsDate)!==null&&a!==void 0?a:e==null||(o=e.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.firstWeekContainsDate)!==null&&i!==void 0?i:d.firstWeekContainsDate)!==null&&n!==void 0?n:(l=d.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&r!==void 0?r:1),g=L0(t,e),m=new Date(0);m.setUTCFullYear(g,0,h),m.setUTCHours(0,0,0,0);var v=co(m,e);return v}var TB=6048e5;function DI(t,e){Re(1,arguments);var r=je(t),n=co(r,e).getTime()-wB(r,e).getTime();return Math.round(n/TB)+1}function Ft(t,e){for(var r=t<0?"-":"",n=Math.abs(t).toString();n.length<e;)n="0"+n;return r+n}var ia={y:function(e,r){var n=e.getUTCFullYear(),i=n>0?n:1-n;return Ft(r==="yy"?i%100:i,r.length)},M:function(e,r){var n=e.getUTCMonth();return r==="M"?String(n+1):Ft(n+1,2)},d:function(e,r){return Ft(e.getUTCDate(),r.length)},a:function(e,r){var n=e.getUTCHours()/12>=1?"pm":"am";switch(r){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h:function(e,r){return Ft(e.getUTCHours()%12||12,r.length)},H:function(e,r){return Ft(e.getUTCHours(),r.length)},m:function(e,r){return Ft(e.getUTCMinutes(),r.length)},s:function(e,r){return Ft(e.getUTCSeconds(),r.length)},S:function(e,r){var n=r.length,i=e.getUTCMilliseconds(),a=Math.floor(i*Math.pow(10,n-3));return Ft(a,r.length)}},Wo={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},SB={G:function(e,r,n){var i=e.getUTCFullYear()>0?1:0;switch(r){case"G":case"GG":case"GGG":return n.era(i,{width:"abbreviated"});case"GGGGG":return n.era(i,{width:"narrow"});case"GGGG":default:return n.era(i,{width:"wide"})}},y:function(e,r,n){if(r==="yo"){var i=e.getUTCFullYear(),a=i>0?i:1-i;return n.ordinalNumber(a,{unit:"year"})}return ia.y(e,r)},Y:function(e,r,n,i){var a=L0(e,i),o=a>0?a:1-a;if(r==="YY"){var s=o%100;return Ft(s,2)}return r==="Yo"?n.ordinalNumber(o,{unit:"year"}):Ft(o,r.length)},R:function(e,r){var n=RI(e);return Ft(n,r.length)},u:function(e,r){var n=e.getUTCFullYear();return Ft(n,r.length)},Q:function(e,r,n){var i=Math.ceil((e.getUTCMonth()+1)/3);switch(r){case"Q":return String(i);case"QQ":return Ft(i,2);case"Qo":return n.ordinalNumber(i,{unit:"quarter"});case"QQQ":return n.quarter(i,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(i,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(i,{width:"wide",context:"formatting"})}},q:function(e,r,n){var i=Math.ceil((e.getUTCMonth()+1)/3);switch(r){case"q":return String(i);case"qq":return Ft(i,2);case"qo":return n.ordinalNumber(i,{unit:"quarter"});case"qqq":return n.quarter(i,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(i,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(i,{width:"wide",context:"standalone"})}},M:function(e,r,n){var i=e.getUTCMonth();switch(r){case"M":case"MM":return ia.M(e,r);case"Mo":return n.ordinalNumber(i+1,{unit:"month"});case"MMM":return n.month(i,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(i,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(i,{width:"wide",context:"formatting"})}},L:function(e,r,n){var i=e.getUTCMonth();switch(r){case"L":return String(i+1);case"LL":return Ft(i+1,2);case"Lo":return n.ordinalNumber(i+1,{unit:"month"});case"LLL":return n.month(i,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(i,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(i,{width:"wide",context:"standalone"})}},w:function(e,r,n,i){var a=DI(e,i);return r==="wo"?n.ordinalNumber(a,{unit:"week"}):Ft(a,r.length)},I:function(e,r,n){var i=II(e);return r==="Io"?n.ordinalNumber(i,{unit:"week"}):Ft(i,r.length)},d:function(e,r,n){return r==="do"?n.ordinalNumber(e.getUTCDate(),{unit:"date"}):ia.d(e,r)},D:function(e,r,n){var i=bB(e);return r==="Do"?n.ordinalNumber(i,{unit:"dayOfYear"}):Ft(i,r.length)},E:function(e,r,n){var i=e.getUTCDay();switch(r){case"E":case"EE":case"EEE":return n.day(i,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(i,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(i,{width:"short",context:"formatting"});case"EEEE":default:return n.day(i,{width:"wide",context:"formatting"})}},e:function(e,r,n,i){var a=e.getUTCDay(),o=(a-i.weekStartsOn+8)%7||7;switch(r){case"e":return String(o);case"ee":return Ft(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(a,{width:"short",context:"formatting"});case"eeee":default:return n.day(a,{width:"wide",context:"formatting"})}},c:function(e,r,n,i){var a=e.getUTCDay(),o=(a-i.weekStartsOn+8)%7||7;switch(r){case"c":return String(o);case"cc":return Ft(o,r.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(a,{width:"narrow",context:"standalone"});case"cccccc":return n.day(a,{width:"short",context:"standalone"});case"cccc":default:return n.day(a,{width:"wide",context:"standalone"})}},i:function(e,r,n){var i=e.getUTCDay(),a=i===0?7:i;switch(r){case"i":return String(a);case"ii":return Ft(a,r.length);case"io":return n.ordinalNumber(a,{unit:"day"});case"iii":return n.day(i,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(i,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(i,{width:"short",context:"formatting"});case"iiii":default:return n.day(i,{width:"wide",context:"formatting"})}},a:function(e,r,n){var i=e.getUTCHours(),a=i/12>=1?"pm":"am";switch(r){case"a":case"aa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(e,r,n){var i=e.getUTCHours(),a;switch(i===12?a=Wo.noon:i===0?a=Wo.midnight:a=i/12>=1?"pm":"am",r){case"b":case"bb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(e,r,n){var i=e.getUTCHours(),a;switch(i>=17?a=Wo.evening:i>=12?a=Wo.afternoon:i>=4?a=Wo.morning:a=Wo.night,r){case"B":case"BB":case"BBB":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(e,r,n){if(r==="ho"){var i=e.getUTCHours()%12;return i===0&&(i=12),n.ordinalNumber(i,{unit:"hour"})}return ia.h(e,r)},H:function(e,r,n){return r==="Ho"?n.ordinalNumber(e.getUTCHours(),{unit:"hour"}):ia.H(e,r)},K:function(e,r,n){var i=e.getUTCHours()%12;return r==="Ko"?n.ordinalNumber(i,{unit:"hour"}):Ft(i,r.length)},k:function(e,r,n){var i=e.getUTCHours();return i===0&&(i=24),r==="ko"?n.ordinalNumber(i,{unit:"hour"}):Ft(i,r.length)},m:function(e,r,n){return r==="mo"?n.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):ia.m(e,r)},s:function(e,r,n){return r==="so"?n.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):ia.s(e,r)},S:function(e,r){return ia.S(e,r)},X:function(e,r,n,i){var a=i._originalDate||e,o=a.getTimezoneOffset();if(o===0)return"Z";switch(r){case"X":return o1(o);case"XXXX":case"XX":return za(o);case"XXXXX":case"XXX":default:return za(o,":")}},x:function(e,r,n,i){var a=i._originalDate||e,o=a.getTimezoneOffset();switch(r){case"x":return o1(o);case"xxxx":case"xx":return za(o);case"xxxxx":case"xxx":default:return za(o,":")}},O:function(e,r,n,i){var a=i._originalDate||e,o=a.getTimezoneOffset();switch(r){case"O":case"OO":case"OOO":return"GMT"+a1(o,":");case"OOOO":default:return"GMT"+za(o,":")}},z:function(e,r,n,i){var a=i._originalDate||e,o=a.getTimezoneOffset();switch(r){case"z":case"zz":case"zzz":return"GMT"+a1(o,":");case"zzzz":default:return"GMT"+za(o,":")}},t:function(e,r,n,i){var a=i._originalDate||e,o=Math.floor(a.getTime()/1e3);return Ft(o,r.length)},T:function(e,r,n,i){var a=i._originalDate||e,o=a.getTime();return Ft(o,r.length)}};function a1(t,e){var r=t>0?"-":"+",n=Math.abs(t),i=Math.floor(n/60),a=n%60;if(a===0)return r+String(i);var o=e;return r+String(i)+o+Ft(a,2)}function o1(t,e){if(t%60===0){var r=t>0?"-":"+";return r+Ft(Math.abs(t)/60,2)}return za(t,e)}function za(t,e){var r=e||"",n=t>0?"-":"+",i=Math.abs(t),a=Ft(Math.floor(i/60),2),o=Ft(i%60,2);return n+a+r+o}var s1=function(e,r){switch(e){case"P":return r.date({width:"short"});case"PP":return r.date({width:"medium"});case"PPP":return r.date({width:"long"});case"PPPP":default:return r.date({width:"full"})}},MI=function(e,r){switch(e){case"p":return r.time({width:"short"});case"pp":return r.time({width:"medium"});case"ppp":return r.time({width:"long"});case"pppp":default:return r.time({width:"full"})}},CB=function(e,r){var n=e.match(/(P+)(p+)?/)||[],i=n[1],a=n[2];if(!a)return s1(e,r);var o;switch(i){case"P":o=r.dateTime({width:"short"});break;case"PP":o=r.dateTime({width:"medium"});break;case"PPP":o=r.dateTime({width:"long"});break;case"PPPP":default:o=r.dateTime({width:"full"});break}return o.replace("{{date}}",s1(i,r)).replace("{{time}}",MI(a,r))},Dy={p:MI,P:CB},EB=["D","DD"],OB=["YY","YYYY"];function PI(t){return EB.indexOf(t)!==-1}function LI(t){return OB.indexOf(t)!==-1}function Nf(t,e,r){if(t==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(e,"`) for formatting years to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(t==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(e,"`) for formatting years to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(t==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(e,"`) for formatting days of the month to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(t==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(e,"`) for formatting days of the month to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var AB=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,RB=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,IB=/^'([^]*?)'?$/,DB=/''/g,MB=/[a-zA-Z]/;function Ku(t,e,r){var n,i,a,o,s,l,c,d,h,g,m,v,_,y,x,w,C,A;Re(2,arguments);var E=String(e),S=Hi(),T=(n=(i=r==null?void 0:r.locale)!==null&&i!==void 0?i:S.locale)!==null&&n!==void 0?n:bd,D=wt((a=(o=(s=(l=r==null?void 0:r.firstWeekContainsDate)!==null&&l!==void 0?l:r==null||(c=r.locale)===null||c===void 0||(d=c.options)===null||d===void 0?void 0:d.firstWeekContainsDate)!==null&&s!==void 0?s:S.firstWeekContainsDate)!==null&&o!==void 0?o:(h=S.locale)===null||h===void 0||(g=h.options)===null||g===void 0?void 0:g.firstWeekContainsDate)!==null&&a!==void 0?a:1);if(!(D>=1&&D<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var P=wt((m=(v=(_=(y=r==null?void 0:r.weekStartsOn)!==null&&y!==void 0?y:r==null||(x=r.locale)===null||x===void 0||(w=x.options)===null||w===void 0?void 0:w.weekStartsOn)!==null&&_!==void 0?_:S.weekStartsOn)!==null&&v!==void 0?v:(C=S.locale)===null||C===void 0||(A=C.options)===null||A===void 0?void 0:A.weekStartsOn)!==null&&m!==void 0?m:0);if(!(P>=0&&P<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!T.localize)throw new RangeError("locale must contain localize property");if(!T.formatLong)throw new RangeError("locale must contain formatLong property");var N=je(t);if(!xs(N))throw new RangeError("Invalid time value");var F=us(N),B=AI(N,F),W={firstWeekContainsDate:D,weekStartsOn:P,locale:T,_originalDate:N},te=E.match(RB).map(function(J){var ie=J[0];if(ie==="p"||ie==="P"){var le=Dy[ie];return le(J,T.formatLong)}return J}).join("").match(AB).map(function(J){if(J==="''")return"'";var ie=J[0];if(ie==="'")return PB(J);var le=SB[ie];if(le)return!(r!=null&&r.useAdditionalWeekYearTokens)&&LI(J)&&Nf(J,e,String(t)),!(r!=null&&r.useAdditionalDayOfYearTokens)&&PI(J)&&Nf(J,e,String(t)),le(B,J,T.localize,W);if(ie.match(MB))throw new RangeError("Format string contains an unescaped latin alphabet character `"+ie+"`");return J}).join("");return te}function PB(t){var e=t.match(IB);return e?e[1].replace(DB,"'"):t}function N0(t,e){if(t==null)throw new TypeError("assign requires that input parameter not be null or undefined");for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}function LB(t){return N0({},t)}var u1=1e3*60,Ff=1440,l1=Ff*30,c1=Ff*365;function NB(t,e,r){var n,i,a;Re(2,arguments);var o=Hi(),s=(n=(i=void 0)!==null&&i!==void 0?i:o.locale)!==null&&n!==void 0?n:bd;if(!s.formatDistance)throw new RangeError("locale must contain localize.formatDistance property");var l=ts(t,e);if(isNaN(l))throw new RangeError("Invalid time value");var c=N0(LB(r),{addSuffix:!1,comparison:l}),d,h;l>0?(d=je(e),h=je(t)):(d=je(t),h=je(e));var g=String((a=void 0)!==null&&a!==void 0?a:"round"),m;if(g==="floor")m=Math.floor;else if(g==="ceil")m=Math.ceil;else if(g==="round")m=Math.round;else throw new RangeError("roundingMethod must be 'floor', 'ceil' or 'round'");var v=h.getTime()-d.getTime(),_=v/u1,y=us(h)-us(d),x=(v-y)/u1,w=r==null?void 0:r.unit,C;if(w?C=String(w):_<1?C="second":_<60?C="minute":_<Ff?C="hour":x<l1?C="day":x<c1?C="month":C="year",C==="second"){var A=m(v/1e3);return s.formatDistance("xSeconds",A,c)}else if(C==="minute"){var E=m(_);return s.formatDistance("xMinutes",E,c)}else if(C==="hour"){var S=m(_/60);return s.formatDistance("xHours",S,c)}else if(C==="day"){var T=m(x/Ff);return s.formatDistance("xDays",T,c)}else if(C==="month"){var D=m(x/l1);return D===12&&w!=="month"?s.formatDistance("xYears",1,c):s.formatDistance("xMonths",D,c)}else if(C==="year"){var P=m(x/c1);return s.formatDistance("xYears",P,c)}throw new RangeError("unit must be 'second', 'minute', 'hour', 'day', 'month' or 'year'")}function f1(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function FB(t,e){if(t){if(typeof t=="string")return f1(t,e);var r={}.toString.call(t).slice(8,-1);return r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set"?Array.from(t):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?f1(t,e):void 0}}function d1(t,e){var r=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=FB(t))||e){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(c){throw c},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
38
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var c=r.next();return o=c.done,c},e:function(c){s=!0,a=c},f:function(){try{o||r.return==null||r.return()}finally{if(s)throw a}}}}function Ee(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function St(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Sf(t,e)}function kf(t){return kf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},kf(t)}function NI(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(NI=function(){return!!t})()}function kB(t,e){if(e&&(pi(e)=="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ee(t)}function Ct(t){var e=NI();return function(){var r,n=kf(t);if(e){var i=kf(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return kB(this,r)}}function _t(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function jB(t,e){if(pi(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(pi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function FI(t){var e=jB(t,"string");return pi(e)=="symbol"?e:e+""}function $B(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,FI(n.key),n)}}function xt(t,e,r){return e&&$B(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function xe(t,e,r){return(e=FI(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var UB=10,kI=(function(){function t(){_t(this,t),xe(this,"priority",void 0),xe(this,"subPriority",0)}return xt(t,[{key:"validate",value:function(r,n){return!0}}]),t})(),qB=(function(t){St(r,t);var e=Ct(r);function r(n,i,a,o,s){var l;return _t(this,r),l=e.call(this),l.value=n,l.validateValue=i,l.setValue=a,l.priority=o,s&&(l.subPriority=s),l}return xt(r,[{key:"validate",value:function(i,a){return this.validateValue(i,this.value,a)}},{key:"set",value:function(i,a,o){return this.setValue(i,a,this.value,o)}}]),r})(kI),HB=(function(t){St(r,t);var e=Ct(r);function r(){var n;_t(this,r);for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return n=e.call.apply(e,[this].concat(a)),xe(Ee(n),"priority",UB),xe(Ee(n),"subPriority",-1),n}return xt(r,[{key:"set",value:function(i,a){if(a.timestampIsSet)return i;var o=new Date(0);return o.setFullYear(i.getUTCFullYear(),i.getUTCMonth(),i.getUTCDate()),o.setHours(i.getUTCHours(),i.getUTCMinutes(),i.getUTCSeconds(),i.getUTCMilliseconds()),o}}]),r})(kI),It=(function(){function t(){_t(this,t),xe(this,"incompatibleTokens",void 0),xe(this,"priority",void 0),xe(this,"subPriority",void 0)}return xt(t,[{key:"run",value:function(r,n,i,a){var o=this.parse(r,n,i,a);return o?{setter:new qB(o.value,this.validate,this.set,this.priority,this.subPriority),rest:o.rest}:null}},{key:"validate",value:function(r,n,i){return!0}}]),t})(),WB=(function(t){St(r,t);var e=Ct(r);function r(){var n;_t(this,r);for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return n=e.call.apply(e,[this].concat(a)),xe(Ee(n),"priority",140),xe(Ee(n),"incompatibleTokens",["R","u","t","T"]),n}return xt(r,[{key:"parse",value:function(i,a,o){switch(a){case"G":case"GG":case"GGG":return o.era(i,{width:"abbreviated"})||o.era(i,{width:"narrow"});case"GGGGG":return o.era(i,{width:"narrow"});case"GGGG":default:return o.era(i,{width:"wide"})||o.era(i,{width:"abbreviated"})||o.era(i,{width:"narrow"})}}},{key:"set",value:function(i,a,o){return a.era=o,i.setUTCFullYear(o,0,1),i.setUTCHours(0,0,0,0),i}}]),r})(It),pr={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},ci={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function gr(t,e){return t&&{value:e(t.value),rest:t.rest}}function nr(t,e){var r=e.match(t);return r?{value:parseInt(r[0],10),rest:e.slice(r[0].length)}:null}function fi(t,e){var r=e.match(t);if(!r)return null;if(r[0]==="Z")return{value:0,rest:e.slice(1)};var n=r[1]==="+"?1:-1,i=r[2]?parseInt(r[2],10):0,a=r[3]?parseInt(r[3],10):0,o=r[5]?parseInt(r[5],10):0;return{value:n*(i*wd+a*xd+o*YW),rest:e.slice(r[0].length)}}function jI(t){return nr(pr.anyDigitsSigned,t)}function cr(t,e){switch(t){case 1:return nr(pr.singleDigit,e);case 2:return nr(pr.twoDigits,e);case 3:return nr(pr.threeDigits,e);case 4:return nr(pr.fourDigits,e);default:return nr(new RegExp("^\\d{1,"+t+"}"),e)}}function jf(t,e){switch(t){case 1:return nr(pr.singleDigitSigned,e);case 2:return nr(pr.twoDigitsSigned,e);case 3:return nr(pr.threeDigitsSigned,e);case 4:return nr(pr.fourDigitsSigned,e);default:return nr(new RegExp("^-?\\d{1,"+t+"}"),e)}}function F0(t){switch(t){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function $I(t,e){var r=e>0,n=r?e:1-e,i;if(n<=50)i=t||100;else{var a=n+50,o=Math.floor(a/100)*100,s=t>=a%100;i=t+o-(s?100:0)}return r?i:1-i}function UI(t){return t%400===0||t%4===0&&t%100!==0}var BB=(function(t){St(r,t);var e=Ct(r);function r(){var n;_t(this,r);for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return n=e.call.apply(e,[this].concat(a)),xe(Ee(n),"priority",130),xe(Ee(n),"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"]),n}return xt(r,[{key:"parse",value:function(i,a,o){var s=function(c){return{year:c,isTwoDigitYear:a==="yy"}};switch(a){case"y":return gr(cr(4,i),s);case"yo":return gr(o.ordinalNumber(i,{unit:"year"}),s);default:return gr(cr(a.length,i),s)}}},{key:"validate",value:function(i,a){return a.isTwoDigitYear||a.year>0}},{key:"set",value:function(i,a,o){var s=i.getUTCFullYear();if(o.isTwoDigitYear){var l=$I(o.year,s);return i.setUTCFullYear(l,0,1),i.setUTCHours(0,0,0,0),i}var c=!("era"in a)||a.era===1?o.year:1-o.year;return i.setUTCFullYear(c,0,1),i.setUTCHours(0,0,0,0),i}}]),r})(It),zB=(function(t){St(r,t);var e=Ct(r);function r(){var n;_t(this,r);for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return n=e.call.apply(e,[this].concat(a)),xe(Ee(n),"priority",130),xe(Ee(n),"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"]),n}return xt(r,[{key:"parse",value:function(i,a,o){var s=function(c){return{year:c,isTwoDigitYear:a==="YY"}};switch(a){case"Y":return gr(cr(4,i),s);case"Yo":return gr(o.ordinalNumber(i,{unit:"year"}),s);default:return gr(cr(a.length,i),s)}}},{key:"validate",value:function(i,a){return a.isTwoDigitYear||a.year>0}},{key:"set",value:function(i,a,o,s){var l=L0(i,s);if(o.isTwoDigitYear){var c=$I(o.year,l);return i.setUTCFullYear(c,0,s.firstWeekContainsDate),i.setUTCHours(0,0,0,0),co(i,s)}var d=!("era"in a)||a.era===1?o.year:1-o.year;return i.setUTCFullYear(d,0,s.firstWeekContainsDate),i.setUTCHours(0,0,0,0),co(i,s)}}]),r})(It),VB=(function(t){St(r,t);var e=Ct(r);function r(){var n;_t(this,r);for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return n=e.call.apply(e,[this].concat(a)),xe(Ee(n),"priority",130),xe(Ee(n),"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]),n}return xt(r,[{key:"parse",value:function(i,a){return jf(a==="R"?4:a.length,i)}},{key:"set",value:function(i,a,o){var s=new Date(0);return s.setUTCFullYear(o,0,4),s.setUTCHours(0,0,0,0),ls(s)}}]),r})(It),GB=(function(t){St(r,t);var e=Ct(r);function r(){var n;_t(this,r);for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return n=e.call.apply(e,[this].concat(a)),xe(Ee(n),"priority",130),xe(Ee(n),"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"]),n}return xt(r,[{key:"parse",value:function(i,a){return jf(a==="u"?4:a.length,i)}},{key:"set",value:function(i,a,o){return i.setUTCFullYear(o,0,1),i.setUTCHours(0,0,0,0),i}}]),r})(It),KB=(function(t){St(r,t);var e=Ct(r);function r(){var n;_t(this,r);for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return n=e.call.apply(e,[this].concat(a)),xe(Ee(n),"priority",120),xe(Ee(n),"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]),n}return xt(r,[{key:"parse",value:function(i,a,o){switch(a){case"Q":case"QQ":return cr(a.length,i);case"Qo":return o.ordinalNumber(i,{unit:"quarter"});case"QQQ":return o.quarter(i,{width:"abbreviated",context:"formatting"})||o.quarter(i,{width:"narrow",context:"formatting"});case"QQQQQ":return o.quarter(i,{width:"narrow",context:"formatting"});case"QQQQ":default:return o.quarter(i,{width:"wide",context:"formatting"})||o.quarter(i,{width:"abbreviated",context:"formatting"})||o.quarter(i,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(i,a){return a>=1&&a<=4}},{key:"set",value:function(i,a,o){return i.setUTCMonth((o-1)*3,1),i.setUTCHours(0,0,0,0),i}}]),r})(It),XB=(function(t){St(r,t);var e=Ct(r);function r(){var n;_t(this,r);for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return n=e.call.apply(e,[this].concat(a)),xe(Ee(n),"priority",120),xe(Ee(n),"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]),n}return xt(r,[{key:"parse",value:function(i,a,o){switch(a){case"q":case"qq":return cr(a.length,i);case"qo":return o.ordinalNumber(i,{unit:"quarter"});case"qqq":return o.quarter(i,{width:"abbreviated",context:"standalone"})||o.quarter(i,{width:"narrow",context:"standalone"});case"qqqqq":return o.quarter(i,{width:"narrow",context:"standalone"});case"qqqq":default:return o.quarter(i,{width:"wide",context:"standalone"})||o.quarter(i,{width:"abbreviated",context:"standalone"})||o.quarter(i,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(i,a){return a>=1&&a<=4}},{key:"set",value:function(i,a,o){return i.setUTCMonth((o-1)*3,1),i.setUTCHours(0,0,0,0),i}}]),r})(It),YB=(function(t){St(r,t);var e=Ct(r);function r(){var n;_t(this,r);for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return n=e.call.apply(e,[this].concat(a)),xe(Ee(n),"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]),xe(Ee(n),"priority",110),n}return xt(r,[{key:"parse",value:function(i,a,o){var s=function(c){return c-1};switch(a){case"M":return gr(nr(pr.month,i),s);case"MM":return gr(cr(2,i),s);case"Mo":return gr(o.ordinalNumber(i,{unit:"month"}),s);case"MMM":return o.month(i,{width:"abbreviated",context:"formatting"})||o.month(i,{width:"narrow",context:"formatting"});case"MMMMM":return o.month(i,{width:"narrow",context:"formatting"});case"MMMM":default:return o.month(i,{width:"wide",context:"formatting"})||o.month(i,{width:"abbreviated",context:"formatting"})||o.month(i,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(i,a){return a>=0&&a<=11}},{key:"set",value:function(i,a,o){return i.setUTCMonth(o,1),i.setUTCHours(0,0,0,0),i}}]),r})(It),ZB=(function(t){St(r,t);var e=Ct(r);function r(){var n;_t(this,r);for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return n=e.call.apply(e,[this].concat(a)),xe(Ee(n),"priority",110),xe(Ee(n),"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]),n}return xt(r,[{key:"parse",value:function(i,a,o){var s=function(c){return c-1};switch(a){case"L":return gr(nr(pr.month,i),s);case"LL":return gr(cr(2,i),s);case"Lo":return gr(o.ordinalNumber(i,{unit:"month"}),s);case"LLL":return o.month(i,{width:"abbreviated",context:"standalone"})||o.month(i,{width:"narrow",context:"standalone"});case"LLLLL":return o.month(i,{width:"narrow",context:"standalone"});case"LLLL":default:return o.month(i,{width:"wide",context:"standalone"})||o.month(i,{width:"abbreviated",context:"standalone"})||o.month(i,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(i,a){return a>=0&&a<=11}},{key:"set",value:function(i,a,o){return i.setUTCMonth(o,1),i.setUTCHours(0,0,0,0),i}}]),r})(It);function JB(t,e,r){Re(2,arguments);var n=je(t),i=wt(e),a=DI(n,r)-i;return n.setUTCDate(n.getUTCDate()-a*7),n}var QB=(function(t){St(r,t);var e=Ct(r);function r(){var n;_t(this,r);for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return n=e.call.apply(e,[this].concat(a)),xe(Ee(n),"priority",100),xe(Ee(n),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"]),n}return xt(r,[{key:"parse",value:function(i,a,o){switch(a){case"w":return nr(pr.week,i);case"wo":return o.ordinalNumber(i,{unit:"week"});default:return cr(a.length,i)}}},{key:"validate",value:function(i,a){return a>=1&&a<=53}},{key:"set",value:function(i,a,o,s){return co(JB(i,o,s),s)}}]),r})(It);function e3(t,e){Re(2,arguments);var r=je(t),n=wt(e),i=II(r)-n;return r.setUTCDate(r.getUTCDate()-i*7),r}var t3=(function(t){St(r,t);var e=Ct(r);function r(){var n;_t(this,r);for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return n=e.call.apply(e,[this].concat(a)),xe(Ee(n),"priority",100),xe(Ee(n),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]),n}return xt(r,[{key:"parse",value:function(i,a,o){switch(a){case"I":return nr(pr.week,i);case"Io":return o.ordinalNumber(i,{unit:"week"});default:return cr(a.length,i)}}},{key:"validate",value:function(i,a){return a>=1&&a<=53}},{key:"set",value:function(i,a,o){return ls(e3(i,o))}}]),r})(It),r3=[31,28,31,30,31,30,31,31,30,31,30,31],n3=[31,29,31,30,31,30,31,31,30,31,30,31],i3=(function(t){St(r,t);var e=Ct(r);function r(){var n;_t(this,r);for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return n=e.call.apply(e,[this].concat(a)),xe(Ee(n),"priority",90),xe(Ee(n),"subPriority",1),xe(Ee(n),"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"]),n}return xt(r,[{key:"parse",value:function(i,a,o){switch(a){case"d":return nr(pr.date,i);case"do":return o.ordinalNumber(i,{unit:"date"});default:return cr(a.length,i)}}},{key:"validate",value:function(i,a){var o=i.getUTCFullYear(),s=UI(o),l=i.getUTCMonth();return s?a>=1&&a<=n3[l]:a>=1&&a<=r3[l]}},{key:"set",value:function(i,a,o){return i.setUTCDate(o),i.setUTCHours(0,0,0,0),i}}]),r})(It),a3=(function(t){St(r,t);var e=Ct(r);function r(){var n;_t(this,r);for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return n=e.call.apply(e,[this].concat(a)),xe(Ee(n),"priority",90),xe(Ee(n),"subpriority",1),xe(Ee(n),"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]),n}return xt(r,[{key:"parse",value:function(i,a,o){switch(a){case"D":case"DD":return nr(pr.dayOfYear,i);case"Do":return o.ordinalNumber(i,{unit:"date"});default:return cr(a.length,i)}}},{key:"validate",value:function(i,a){var o=i.getUTCFullYear(),s=UI(o);return s?a>=1&&a<=366:a>=1&&a<=365}},{key:"set",value:function(i,a,o){return i.setUTCMonth(0,o),i.setUTCHours(0,0,0,0),i}}]),r})(It);function k0(t,e,r){var n,i,a,o,s,l,c,d;Re(2,arguments);var h=Hi(),g=wt((n=(i=(a=(o=r==null?void 0:r.weekStartsOn)!==null&&o!==void 0?o:r==null||(s=r.locale)===null||s===void 0||(l=s.options)===null||l===void 0?void 0:l.weekStartsOn)!==null&&a!==void 0?a:h.weekStartsOn)!==null&&i!==void 0?i:(c=h.locale)===null||c===void 0||(d=c.options)===null||d===void 0?void 0:d.weekStartsOn)!==null&&n!==void 0?n:0);if(!(g>=0&&g<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var m=je(t),v=wt(e),_=m.getUTCDay(),y=v%7,x=(y+7)%7,w=(x<g?7:0)+v-_;return m.setUTCDate(m.getUTCDate()+w),m}var o3=(function(t){St(r,t);var e=Ct(r);function r(){var n;_t(this,r);for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return n=e.call.apply(e,[this].concat(a)),xe(Ee(n),"priority",90),xe(Ee(n),"incompatibleTokens",["D","i","e","c","t","T"]),n}return xt(r,[{key:"parse",value:function(i,a,o){switch(a){case"E":case"EE":case"EEE":return o.day(i,{width:"abbreviated",context:"formatting"})||o.day(i,{width:"short",context:"formatting"})||o.day(i,{width:"narrow",context:"formatting"});case"EEEEE":return o.day(i,{width:"narrow",context:"formatting"});case"EEEEEE":return o.day(i,{width:"short",context:"formatting"})||o.day(i,{width:"narrow",context:"formatting"});case"EEEE":default:return o.day(i,{width:"wide",context:"formatting"})||o.day(i,{width:"abbreviated",context:"formatting"})||o.day(i,{width:"short",context:"formatting"})||o.day(i,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(i,a){return a>=0&&a<=6}},{key:"set",value:function(i,a,o,s){return i=k0(i,o,s),i.setUTCHours(0,0,0,0),i}}]),r})(It),s3=(function(t){St(r,t);var e=Ct(r);function r(){var n;_t(this,r);for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return n=e.call.apply(e,[this].concat(a)),xe(Ee(n),"priority",90),xe(Ee(n),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]),n}return xt(r,[{key:"parse",value:function(i,a,o,s){var l=function(d){var h=Math.floor((d-1)/7)*7;return(d+s.weekStartsOn+6)%7+h};switch(a){case"e":case"ee":return gr(cr(a.length,i),l);case"eo":return gr(o.ordinalNumber(i,{unit:"day"}),l);case"eee":return o.day(i,{width:"abbreviated",context:"formatting"})||o.day(i,{width:"short",context:"formatting"})||o.day(i,{width:"narrow",context:"formatting"});case"eeeee":return o.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return o.day(i,{width:"short",context:"formatting"})||o.day(i,{width:"narrow",context:"formatting"});case"eeee":default:return o.day(i,{width:"wide",context:"formatting"})||o.day(i,{width:"abbreviated",context:"formatting"})||o.day(i,{width:"short",context:"formatting"})||o.day(i,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(i,a){return a>=0&&a<=6}},{key:"set",value:function(i,a,o,s){return i=k0(i,o,s),i.setUTCHours(0,0,0,0),i}}]),r})(It),u3=(function(t){St(r,t);var e=Ct(r);function r(){var n;_t(this,r);for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return n=e.call.apply(e,[this].concat(a)),xe(Ee(n),"priority",90),xe(Ee(n),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]),n}return xt(r,[{key:"parse",value:function(i,a,o,s){var l=function(d){var h=Math.floor((d-1)/7)*7;return(d+s.weekStartsOn+6)%7+h};switch(a){case"c":case"cc":return gr(cr(a.length,i),l);case"co":return gr(o.ordinalNumber(i,{unit:"day"}),l);case"ccc":return o.day(i,{width:"abbreviated",context:"standalone"})||o.day(i,{width:"short",context:"standalone"})||o.day(i,{width:"narrow",context:"standalone"});case"ccccc":return o.day(i,{width:"narrow",context:"standalone"});case"cccccc":return o.day(i,{width:"short",context:"standalone"})||o.day(i,{width:"narrow",context:"standalone"});case"cccc":default:return o.day(i,{width:"wide",context:"standalone"})||o.day(i,{width:"abbreviated",context:"standalone"})||o.day(i,{width:"short",context:"standalone"})||o.day(i,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(i,a){return a>=0&&a<=6}},{key:"set",value:function(i,a,o,s){return i=k0(i,o,s),i.setUTCHours(0,0,0,0),i}}]),r})(It);function l3(t,e){Re(2,arguments);var r=wt(e);r%7===0&&(r=r-7);var n=1,i=je(t),a=i.getUTCDay(),o=r%7,s=(o+7)%7,l=(s<n?7:0)+r-a;return i.setUTCDate(i.getUTCDate()+l),i}var c3=(function(t){St(r,t);var e=Ct(r);function r(){var n;_t(this,r);for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return n=e.call.apply(e,[this].concat(a)),xe(Ee(n),"priority",90),xe(Ee(n),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]),n}return xt(r,[{key:"parse",value:function(i,a,o){var s=function(c){return c===0?7:c};switch(a){case"i":case"ii":return cr(a.length,i);case"io":return o.ordinalNumber(i,{unit:"day"});case"iii":return gr(o.day(i,{width:"abbreviated",context:"formatting"})||o.day(i,{width:"short",context:"formatting"})||o.day(i,{width:"narrow",context:"formatting"}),s);case"iiiii":return gr(o.day(i,{width:"narrow",context:"formatting"}),s);case"iiiiii":return gr(o.day(i,{width:"short",context:"formatting"})||o.day(i,{width:"narrow",context:"formatting"}),s);case"iiii":default:return gr(o.day(i,{width:"wide",context:"formatting"})||o.day(i,{width:"abbreviated",context:"formatting"})||o.day(i,{width:"short",context:"formatting"})||o.day(i,{width:"narrow",context:"formatting"}),s)}}},{key:"validate",value:function(i,a){return a>=1&&a<=7}},{key:"set",value:function(i,a,o){return i=l3(i,o),i.setUTCHours(0,0,0,0),i}}]),r})(It),f3=(function(t){St(r,t);var e=Ct(r);function r(){var n;_t(this,r);for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return n=e.call.apply(e,[this].concat(a)),xe(Ee(n),"priority",80),xe(Ee(n),"incompatibleTokens",["b","B","H","k","t","T"]),n}return xt(r,[{key:"parse",value:function(i,a,o){switch(a){case"a":case"aa":case"aaa":return o.dayPeriod(i,{width:"abbreviated",context:"formatting"})||o.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaaa":return o.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return o.dayPeriod(i,{width:"wide",context:"formatting"})||o.dayPeriod(i,{width:"abbreviated",context:"formatting"})||o.dayPeriod(i,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(i,a,o){return i.setUTCHours(F0(o),0,0,0),i}}]),r})(It),d3=(function(t){St(r,t);var e=Ct(r);function r(){var n;_t(this,r);for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return n=e.call.apply(e,[this].concat(a)),xe(Ee(n),"priority",80),xe(Ee(n),"incompatibleTokens",["a","B","H","k","t","T"]),n}return xt(r,[{key:"parse",value:function(i,a,o){switch(a){case"b":case"bb":case"bbb":return o.dayPeriod(i,{width:"abbreviated",context:"formatting"})||o.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbbb":return o.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return o.dayPeriod(i,{width:"wide",context:"formatting"})||o.dayPeriod(i,{width:"abbreviated",context:"formatting"})||o.dayPeriod(i,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(i,a,o){return i.setUTCHours(F0(o),0,0,0),i}}]),r})(It),h3=(function(t){St(r,t);var e=Ct(r);function r(){var n;_t(this,r);for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return n=e.call.apply(e,[this].concat(a)),xe(Ee(n),"priority",80),xe(Ee(n),"incompatibleTokens",["a","b","t","T"]),n}return xt(r,[{key:"parse",value:function(i,a,o){switch(a){case"B":case"BB":case"BBB":return o.dayPeriod(i,{width:"abbreviated",context:"formatting"})||o.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBBB":return o.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return o.dayPeriod(i,{width:"wide",context:"formatting"})||o.dayPeriod(i,{width:"abbreviated",context:"formatting"})||o.dayPeriod(i,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(i,a,o){return i.setUTCHours(F0(o),0,0,0),i}}]),r})(It),p3=(function(t){St(r,t);var e=Ct(r);function r(){var n;_t(this,r);for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return n=e.call.apply(e,[this].concat(a)),xe(Ee(n),"priority",70),xe(Ee(n),"incompatibleTokens",["H","K","k","t","T"]),n}return xt(r,[{key:"parse",value:function(i,a,o){switch(a){case"h":return nr(pr.hour12h,i);case"ho":return o.ordinalNumber(i,{unit:"hour"});default:return cr(a.length,i)}}},{key:"validate",value:function(i,a){return a>=1&&a<=12}},{key:"set",value:function(i,a,o){var s=i.getUTCHours()>=12;return s&&o<12?i.setUTCHours(o+12,0,0,0):!s&&o===12?i.setUTCHours(0,0,0,0):i.setUTCHours(o,0,0,0),i}}]),r})(It),g3=(function(t){St(r,t);var e=Ct(r);function r(){var n;_t(this,r);for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return n=e.call.apply(e,[this].concat(a)),xe(Ee(n),"priority",70),xe(Ee(n),"incompatibleTokens",["a","b","h","K","k","t","T"]),n}return xt(r,[{key:"parse",value:function(i,a,o){switch(a){case"H":return nr(pr.hour23h,i);case"Ho":return o.ordinalNumber(i,{unit:"hour"});default:return cr(a.length,i)}}},{key:"validate",value:function(i,a){return a>=0&&a<=23}},{key:"set",value:function(i,a,o){return i.setUTCHours(o,0,0,0),i}}]),r})(It),m3=(function(t){St(r,t);var e=Ct(r);function r(){var n;_t(this,r);for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return n=e.call.apply(e,[this].concat(a)),xe(Ee(n),"priority",70),xe(Ee(n),"incompatibleTokens",["h","H","k","t","T"]),n}return xt(r,[{key:"parse",value:function(i,a,o){switch(a){case"K":return nr(pr.hour11h,i);case"Ko":return o.ordinalNumber(i,{unit:"hour"});default:return cr(a.length,i)}}},{key:"validate",value:function(i,a){return a>=0&&a<=11}},{key:"set",value:function(i,a,o){var s=i.getUTCHours()>=12;return s&&o<12?i.setUTCHours(o+12,0,0,0):i.setUTCHours(o,0,0,0),i}}]),r})(It),v3=(function(t){St(r,t);var e=Ct(r);function r(){var n;_t(this,r);for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return n=e.call.apply(e,[this].concat(a)),xe(Ee(n),"priority",70),xe(Ee(n),"incompatibleTokens",["a","b","h","H","K","t","T"]),n}return xt(r,[{key:"parse",value:function(i,a,o){switch(a){case"k":return nr(pr.hour24h,i);case"ko":return o.ordinalNumber(i,{unit:"hour"});default:return cr(a.length,i)}}},{key:"validate",value:function(i,a){return a>=1&&a<=24}},{key:"set",value:function(i,a,o){var s=o<=24?o%24:o;return i.setUTCHours(s,0,0,0),i}}]),r})(It),y3=(function(t){St(r,t);var e=Ct(r);function r(){var n;_t(this,r);for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return n=e.call.apply(e,[this].concat(a)),xe(Ee(n),"priority",60),xe(Ee(n),"incompatibleTokens",["t","T"]),n}return xt(r,[{key:"parse",value:function(i,a,o){switch(a){case"m":return nr(pr.minute,i);case"mo":return o.ordinalNumber(i,{unit:"minute"});default:return cr(a.length,i)}}},{key:"validate",value:function(i,a){return a>=0&&a<=59}},{key:"set",value:function(i,a,o){return i.setUTCMinutes(o,0,0),i}}]),r})(It),b3=(function(t){St(r,t);var e=Ct(r);function r(){var n;_t(this,r);for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return n=e.call.apply(e,[this].concat(a)),xe(Ee(n),"priority",50),xe(Ee(n),"incompatibleTokens",["t","T"]),n}return xt(r,[{key:"parse",value:function(i,a,o){switch(a){case"s":return nr(pr.second,i);case"so":return o.ordinalNumber(i,{unit:"second"});default:return cr(a.length,i)}}},{key:"validate",value:function(i,a){return a>=0&&a<=59}},{key:"set",value:function(i,a,o){return i.setUTCSeconds(o,0),i}}]),r})(It),_3=(function(t){St(r,t);var e=Ct(r);function r(){var n;_t(this,r);for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return n=e.call.apply(e,[this].concat(a)),xe(Ee(n),"priority",30),xe(Ee(n),"incompatibleTokens",["t","T"]),n}return xt(r,[{key:"parse",value:function(i,a){var o=function(l){return Math.floor(l*Math.pow(10,-a.length+3))};return gr(cr(a.length,i),o)}},{key:"set",value:function(i,a,o){return i.setUTCMilliseconds(o),i}}]),r})(It),x3=(function(t){St(r,t);var e=Ct(r);function r(){var n;_t(this,r);for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return n=e.call.apply(e,[this].concat(a)),xe(Ee(n),"priority",10),xe(Ee(n),"incompatibleTokens",["t","T","x"]),n}return xt(r,[{key:"parse",value:function(i,a){switch(a){case"X":return fi(ci.basicOptionalMinutes,i);case"XX":return fi(ci.basic,i);case"XXXX":return fi(ci.basicOptionalSeconds,i);case"XXXXX":return fi(ci.extendedOptionalSeconds,i);case"XXX":default:return fi(ci.extended,i)}}},{key:"set",value:function(i,a,o){return a.timestampIsSet?i:new Date(i.getTime()-o)}}]),r})(It),w3=(function(t){St(r,t);var e=Ct(r);function r(){var n;_t(this,r);for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return n=e.call.apply(e,[this].concat(a)),xe(Ee(n),"priority",10),xe(Ee(n),"incompatibleTokens",["t","T","X"]),n}return xt(r,[{key:"parse",value:function(i,a){switch(a){case"x":return fi(ci.basicOptionalMinutes,i);case"xx":return fi(ci.basic,i);case"xxxx":return fi(ci.basicOptionalSeconds,i);case"xxxxx":return fi(ci.extendedOptionalSeconds,i);case"xxx":default:return fi(ci.extended,i)}}},{key:"set",value:function(i,a,o){return a.timestampIsSet?i:new Date(i.getTime()-o)}}]),r})(It),T3=(function(t){St(r,t);var e=Ct(r);function r(){var n;_t(this,r);for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return n=e.call.apply(e,[this].concat(a)),xe(Ee(n),"priority",40),xe(Ee(n),"incompatibleTokens","*"),n}return xt(r,[{key:"parse",value:function(i){return jI(i)}},{key:"set",value:function(i,a,o){return[new Date(o*1e3),{timestampIsSet:!0}]}}]),r})(It),S3=(function(t){St(r,t);var e=Ct(r);function r(){var n;_t(this,r);for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return n=e.call.apply(e,[this].concat(a)),xe(Ee(n),"priority",20),xe(Ee(n),"incompatibleTokens","*"),n}return xt(r,[{key:"parse",value:function(i){return jI(i)}},{key:"set",value:function(i,a,o){return[new Date(o),{timestampIsSet:!0}]}}]),r})(It),C3={G:new WB,y:new BB,Y:new zB,R:new VB,u:new GB,Q:new KB,q:new XB,M:new YB,L:new ZB,w:new QB,I:new t3,d:new i3,D:new a3,E:new o3,e:new s3,c:new u3,i:new c3,a:new f3,b:new d3,B:new h3,h:new p3,H:new g3,K:new m3,k:new v3,m:new y3,s:new b3,S:new _3,X:new x3,x:new w3,t:new T3,T:new S3},E3=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,O3=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,A3=/^'([^]*?)'?$/,R3=/''/g,I3=/\S/,D3=/[a-zA-Z]/;function qI(t,e,r,n){var i,a,o,s,l,c,d,h,g,m,v,_,y,x,w,C,A,E;Re(3,arguments);var S=String(t),T=String(e),D=Hi(),P=(i=(a=n==null?void 0:n.locale)!==null&&a!==void 0?a:D.locale)!==null&&i!==void 0?i:bd;if(!P.match)throw new RangeError("locale must contain match property");var N=wt((o=(s=(l=(c=n==null?void 0:n.firstWeekContainsDate)!==null&&c!==void 0?c:n==null||(d=n.locale)===null||d===void 0||(h=d.options)===null||h===void 0?void 0:h.firstWeekContainsDate)!==null&&l!==void 0?l:D.firstWeekContainsDate)!==null&&s!==void 0?s:(g=D.locale)===null||g===void 0||(m=g.options)===null||m===void 0?void 0:m.firstWeekContainsDate)!==null&&o!==void 0?o:1);if(!(N>=1&&N<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var F=wt((v=(_=(y=(x=n==null?void 0:n.weekStartsOn)!==null&&x!==void 0?x:n==null||(w=n.locale)===null||w===void 0||(C=w.options)===null||C===void 0?void 0:C.weekStartsOn)!==null&&y!==void 0?y:D.weekStartsOn)!==null&&_!==void 0?_:(A=D.locale)===null||A===void 0||(E=A.options)===null||E===void 0?void 0:E.weekStartsOn)!==null&&v!==void 0?v:0);if(!(F>=0&&F<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(T==="")return S===""?je(r):new Date(NaN);var B={firstWeekContainsDate:N,weekStartsOn:F,locale:P},W=[new HB],te=T.match(O3).map(function(Ae){var he=Ae[0];if(he in Dy){var ge=Dy[he];return ge(Ae,P.formatLong)}return Ae}).join("").match(E3),J=[],ie=d1(te),le;try{var se=function(){var he=le.value;!(n!=null&&n.useAdditionalWeekYearTokens)&&LI(he)&&Nf(he,T,t),!(n!=null&&n.useAdditionalDayOfYearTokens)&&PI(he)&&Nf(he,T,t);var ge=he[0],Ne=C3[ge];if(Ne){var we=Ne.incompatibleTokens;if(Array.isArray(we)){var ve=J.find(function(Be){return we.includes(Be.token)||Be.token===ge});if(ve)throw new RangeError("The format string mustn't contain `".concat(ve.fullToken,"` and `").concat(he,"` at the same time"))}else if(Ne.incompatibleTokens==="*"&&J.length>0)throw new RangeError("The format string mustn't contain `".concat(he,"` and any other token at the same time"));J.push({token:ge,fullToken:he});var Fe=Ne.run(S,he,P.match,B);if(!Fe)return{v:new Date(NaN)};W.push(Fe.setter),S=Fe.rest}else{if(ge.match(D3))throw new RangeError("Format string contains an unescaped latin alphabet character `"+ge+"`");if(he==="''"?he="'":ge==="'"&&(he=M3(he)),S.indexOf(he)===0)S=S.slice(he.length);else return{v:new Date(NaN)}}};for(ie.s();!(le=ie.n()).done;){var ce=se();if(pi(ce)==="object")return ce.v}}catch(Ae){ie.e(Ae)}finally{ie.f()}if(S.length>0&&I3.test(S))return new Date(NaN);var Q=W.map(function(Ae){return Ae.priority}).sort(function(Ae,he){return he-Ae}).filter(function(Ae,he,ge){return ge.indexOf(Ae)===he}).map(function(Ae){return W.filter(function(he){return he.priority===Ae}).sort(function(he,ge){return ge.subPriority-he.subPriority})}).map(function(Ae){return Ae[0]}),$=je(r);if(isNaN($.getTime()))return new Date(NaN);var X=AI($,us($)),Z={},fe=d1(Q),be;try{for(fe.s();!(be=fe.n()).done;){var _e=be.value;if(!_e.validate(X,B))return new Date(NaN);var Le=_e.set(X,Z,B);Array.isArray(Le)?(X=Le[0],N0(Z,Le[1])):X=Le}}catch(Ae){fe.e(Ae)}finally{fe.f()}return X}function M3(t){return t.match(A3)[1].replace(R3,"'")}function P3(t){Re(1,arguments);var e=je(t);return e.setMinutes(0,0,0),e}function L3(t){Re(1,arguments);var e=je(t);return e.setMilliseconds(0),e}function N3(t,e){Re(2,arguments);var r=wt(e);return P0(t,-r)}function cn(t,e){var r;Re(1,arguments);var n=wt((r=e==null?void 0:e.additionalDigits)!==null&&r!==void 0?r:2);if(n!==2&&n!==1&&n!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(!(typeof t=="string"||Object.prototype.toString.call(t)==="[object String]"))return new Date(NaN);var i=$3(t),a;if(i.date){var o=U3(i.date,n);a=q3(o.restDateString,o.year)}if(!a||isNaN(a.getTime()))return new Date(NaN);var s=a.getTime(),l=0,c;if(i.time&&(l=H3(i.time),isNaN(l)))return new Date(NaN);if(i.timezone){if(c=W3(i.timezone),isNaN(c))return new Date(NaN)}else{var d=new Date(s+l),h=new Date(0);return h.setFullYear(d.getUTCFullYear(),d.getUTCMonth(),d.getUTCDate()),h.setHours(d.getUTCHours(),d.getUTCMinutes(),d.getUTCSeconds(),d.getUTCMilliseconds()),h}return new Date(s+l+c)}var Kl={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},F3=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,k3=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,j3=/^([+-])(\d{2})(?::?(\d{2}))?$/;function $3(t){var e={},r=t.split(Kl.dateTimeDelimiter),n;if(r.length>2)return e;if(/:/.test(r[0])?n=r[0]:(e.date=r[0],n=r[1],Kl.timeZoneDelimiter.test(e.date)&&(e.date=t.split(Kl.timeZoneDelimiter)[0],n=t.substr(e.date.length,t.length))),n){var i=Kl.timezone.exec(n);i?(e.time=n.replace(i[1],""),e.timezone=i[1]):e.time=n}return e}function U3(t,e){var r=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+e)+"})|(\\d{2}|[+-]\\d{"+(2+e)+"})$)"),n=t.match(r);if(!n)return{year:NaN,restDateString:""};var i=n[1]?parseInt(n[1]):null,a=n[2]?parseInt(n[2]):null;return{year:a===null?i:a*100,restDateString:t.slice((n[1]||n[2]).length)}}function q3(t,e){if(e===null)return new Date(NaN);var r=t.match(F3);if(!r)return new Date(NaN);var n=!!r[4],i=eu(r[1]),a=eu(r[2])-1,o=eu(r[3]),s=eu(r[4]),l=eu(r[5])-1;if(n)return K3(e,s,l)?B3(e,s,l):new Date(NaN);var c=new Date(0);return!V3(e,a,o)||!G3(e,i)?new Date(NaN):(c.setUTCFullYear(e,a,Math.max(i,o)),c)}function eu(t){return t?parseInt(t):1}function H3(t){var e=t.match(k3);if(!e)return NaN;var r=yp(e[1]),n=yp(e[2]),i=yp(e[3]);return X3(r,n,i)?r*wd+n*xd+i*1e3:NaN}function yp(t){return t&&parseFloat(t.replace(",","."))||0}function W3(t){if(t==="Z")return 0;var e=t.match(j3);if(!e)return 0;var r=e[1]==="+"?-1:1,n=parseInt(e[2]),i=e[3]&&parseInt(e[3])||0;return Y3(n,i)?r*(n*wd+i*xd):NaN}function B3(t,e,r){var n=new Date(0);n.setUTCFullYear(t,0,4);var i=n.getUTCDay()||7,a=(e-1)*7+r+1-i;return n.setUTCDate(n.getUTCDate()+a),n}var z3=[31,null,31,30,31,30,31,31,30,31,30,31];function HI(t){return t%400===0||t%4===0&&t%100!==0}function V3(t,e,r){return e>=0&&e<=11&&r>=1&&r<=(z3[e]||(HI(t)?29:28))}function G3(t,e){return e>=1&&e<=(HI(t)?366:365)}function K3(t,e,r){return e>=1&&e<=53&&r>=0&&r<=6}function X3(t,e,r){return t===24?e===0&&r===0:r>=0&&r<60&&e>=0&&e<60&&t>=0&&t<25}function Y3(t,e){return e>=0&&e<=59}function Z3(t,e){Re(2,arguments);var r=wt(e);return _d(t,-r)}function J3(t,e){if(Re(2,arguments),!e||pi(e)!=="object")return new Date(NaN);var r=e.years?wt(e.years):0,n=e.months?wt(e.months):0,i=e.weeks?wt(e.weeks):0,a=e.days?wt(e.days):0,o=e.hours?wt(e.hours):0,s=e.minutes?wt(e.minutes):0,l=e.seconds?wt(e.seconds):0,c=Z3(t,n+r*12),d=N3(c,a+i*7),h=s+o*60,g=l+h*60,m=g*1e3,v=new Date(d.getTime()-m);return v}const Q3=t=>{if(t instanceof Date)return t;const e=t.replace(/-/g,"/").replace("T"," "),r=cn(t);return xs(r)?r:qI(e,"dd/MMM/yy HH:mm:ss",new Date)},ez=(t,e)=>Ku(Q3(t),e),tz=t=>new Date(t*1e3);var WI=(t=>(t.ACTIVE_ACCOUNT="activeAccount",t.X_AUTH="user-authentication",t))(WI||{});const h1="application/json",bp={Accept:"Accept",Authorization:"Authorization",ContentType:"Content-Type"},rz=t=>t.replace(/([^:]\/)\/+/g,"$1"),ei=({pathname:t,searchParams:e})=>{const{globalApiUrl:r}=kW(),n=new URL(r);return n.pathname+=t,n.href=rz(n.href),e&&Object.entries(e).forEach(([i,a])=>{!TI(a)&&a!==""&&(Array.isArray(a)?a.forEach(o=>n.searchParams.append(i,String(o))):n.searchParams.append(i,String(a)))}),n},j0=()=>{const t=new Headers,e=oz();return t.set(bp.Authorization,`Bearer ${e}`),t.set(bp.Accept,h1),t.set(bp.ContentType,h1),t},BI=async(t,e)=>{const r=t.toString(),n=await fetch(r,{mode:"cors",...e});return await jW(n),n},Cd=async(t,e,r)=>{const n=await BI(t,e);if(r)return n;try{return await n.json()}catch{return n.ok||console.error("The response is not valid JSON"),""}},nz=(t,e)=>{const r=j0();return Cd(t,{method:"GET",headers:r},e)},iz=(t,e,r)=>{const n=j0();return Cd(t,{method:"POST",headers:n,body:r?e:JSON.stringify(e)})},az=(t,e)=>{const r=j0();return Cd(t,{method:"PUT",headers:r,body:JSON.stringify(e)})};function oz(){const t=JSON.parse(localStorage.getItem(WI.X_AUTH)||"{}");if(!t.access_token){const e="cannot read x-auth token from local storage";throw console.error(e),new Error(e)}return t.access_token}const ti={baseFetch:BI,get:nz,handleFetch:Cd,post:iz,put:az};var fn=(t=>(t.ACCOUNT="ACCOUNT",t.ACCOUNT_CONTACTS="ACCOUNT_CONTACTS",t.ACCOUNT_ROLES="ACCOUNT_ROLES",t.ACCOUNT_USERS="ACCOUNT_USERS",t.ACCOUNTS="ACCOUNTS",t.ACTIVE_ACCOUNT="ACTIVE_ACCOUNT",t.ALERTS="alerts",t.ASSETS="ASSETS",t.ASSETS_TREE="ASSETS_TREE",t.ATTACHMENTS="ATTACHMENTS",t.ATTACHMENT_CONTENT="ATTACHMENT_CONTENT",t.CANCEL_CS_TICKET="CANCEL_CS_TICKET",t.CANCEL_FA_TICKET="CANCEL_FA_TICKET",t.CANCEL_RH_TICKET="CANCEL_RH_TICKET",t.CANCEL_SR_TICKET="CANCEL_SR_TICKET",t.CATEGORIES="CATEGORIES",t.COMPANIES="COMPANIES",t.CITIES="CITIES",t.CLIENT_SERVICES_TICKET="CLIENT_SERVICES_TICKET",t.CLIENT_SERVICES_TICKETS="CLIENT_SERVICES_TICKETS",t.COOKIES_PREFERENCE="COOKIES_PREFERENCE",t.COURIER_COMPANIES="COURIER_COMPANIES",t.CREATE_ACCOUNT_ROLE="create_account_role",t.CREATE_CUSTOMER_SUPPORT_TICKET="CREATE_CUSTOMER_SUPPORT_TICKET",t.CREATE_NOTIFICATION="CREATE_NOTIFICATION",t.CREATE_PERMISSION_GROUP="create_permission_group",t.CREATE_RELEASE="CREATE_RELEASE",t.CREATE_REMOTE_HANDS_TICKET="CREATE_REMOTE_HANDS_TICKET",t.CREATE_ROLE="CREATE_ROLE",t.CREATE_ROLE_ASSET_PERMISSION="CREATE_ROLE_ASSET_PERMISSION",t.CREATE_ROLE_PERMISSION="CREATE_ROLE_PERMISSION",t.CREATE_ROLE_PERMISSION_GROUP="CREATE_ROLE_PERMISSION_GROUP",t.CUSTOMER_SUPPORT_CONTACTS="CUSTOMER_SUPPORT_CONTACTS",t.CUSTOMER_SUPPORT_TICKETS="CUSTOMER_SUPPORT_TICKETS",t.DATE_FORMAT="DATE_FORMAT",t.DEFAULT_ACCOUNT="DEFAULT_ACCOUNT",t.DELETE_ROLE="DELETE_ROLE",t.DELETE_GROUP_PERMISSION="DELETE_GROUP_PERMISSION",t.DELETE_PERMISSION="DELETE_PERMISSION",t.DELETE_PERMISSION_GROUP="DELETE_PERMISSION_GROUP",t.DCIM_ALERTS="DCIM_ALERTS",t.DCIM_ALERT_INSTANCES="DCIM_ALERT_INSTANCES",t.DCIM_ALERT_INSTANCE_DETAILS="DCIM_ALERT_INSTANCE_DETAILS",t.DCIM_CHART_DATA="DCIM_CHART_DATA",t.DCIM_CHART_DATA_GROUP="DCIM_CHART_DATA_GROUP",t.DCIM_CHART_METADATA="DCIM_CHART_METADATA",t.DCIM_ENABLED_LOCATIONS="DCIM_ENABLED_LOCATIONS",t.DCIM_HISTORICAL_ALERTS="DCIM_HISTORICAL_ALERTS",t.DCIM_HISTORICAL_ALERT_INSTANCE_DETAILS="DCIM_HISTORICAL_ALERT_INSTANCE_DETAILS",t.DCIM_LOCATIONS="DCIM_LOCATIONS",t.DOWNLOAD_USERS="DOWNLOAD_USERS",t.EDIT_ACCOUNT="EDIT_ACCOUNT",t.EDIT_NOTIFICATION="EDIT_NOTIFICATION",t.EDIT_PERMISSION_GROUP="EDIT_PERMISSION_GROUP",t.EDIT_PRIVILEGE="EDIT_PRIVILEGE",t.EDIT_ROLE="EDIT_ROLE",t.EDIT_ROLE_PERMISSION="EDIT_ROLE_PERMISSION",t.EDIT_USER_PERMISSIONS="EDIT_USER_PERMISSIONS",t.EDIT_USER_PREFERENCES="EDIT_USER_PREFERENCES",t.EDIT_USER_PROFILE="EDIT_USER_PROFILE",t.ELEGIBLE_REPORTS="ELEGIBLE_REPORTS",t.FA_TICKET_APPROVE_OR_DENY="FA_TICKET_APPROVE_OR_DENY",t.FACILITY_ACCESS="FACILITY_ACCESS",t.FACILITY_ACCESS_CONTACT_ACCESS="FACILTY_ACCESS_CONTACT_ACCESS",t.FACILITY_ACCESS_CONTACTS="FACILTY_ACCESS_CONTACTS",t.FACILITY_ACCESS_TICKETS="FACILTY_ACCESS_TICKETS",t.LOCATIONS="LOCATIONS",t.LOCATIONS_PAGED="LOCATIONS_PAGED",t.POP_POES_LOCATIONS="POP_POES_LOCATIONS",t.METRICS_FIRST_TIME_LOGIN="METRICS_FIRST_TIME_LOGIN",t.METRICS_LOGIN="metrics_login",t.METRICS_LOGOUT="metrics_logout",t.METROS="metros",t.MODIFY_BADGE="MODIFY_BADGE",t.NOTIFICATION="NOTIFICATION",t.NOTIFICATIONS="NOTIFICATIONS",t.PERMISSION_GROUP_PERMISSIONS="PERMISSION_GROUP_PERMISSIONS",t.PERMISSION_GROUPS="PERMISSION_GROUPS",t.PERMISSIONS="PERMISSIONS",t.PERMISSIONS_PRIVILEGES="PERMISSIONS_PRIVILEGES",t.PERMISSIONS_AVAILABLE="PERMISSIONS_AVAILABLE",t.PLANNED_SITE_MAINTENANCE="PLANNED_SITE_MAINTENANCE",t.PORTAL_ROLES="PORTAL_ROLES",t.POSITIONS="POSITIONS",t.REGIONS="REGIONS",t.RELEASE="RELEASE",t.RELEASE_INFO="RELEASE_INFO",t.REMOVE_ACCOUNT="REMOVE_ACCOUNT",t.REMOVE_ACCOUNT_ROLE="REMOVE_ACCOUNT_ROLE",t.REMOTE_HANDS_TICKET="REMOTE_HANDS_TICKET",t.REMOTE_HANDS_CATEGORIES="REMOTE_HANDS_CATEGORIES",t.REPORT_FILE_DOWNLOAD="REPORT_FILE_DOWNLOAD",t.REPORTS="REPORTS",t.REQUEST_TYPES="REQUEST_TYPES",t.ROLE="ROLE",t.ROLE_ACCESS_PERMISSIONS="ROLE_ACCESS_PERMISSIONS",t.ROLE_ASSET_PERMISSIONS="ROLE_ASSET_PERMISSIONS",t.ROLE_NAMES="ROLE_NAMES",t.ROLE_PERMISSIONS="ROLE_PERMISSIONS",t.ROLE_PERMISSIONS_PRIVILEGES="ROLE_PERMISSIONS_PRIVILEGES",t.ROLE_PERMISSION_GROUP="ROLE_PERMISSION_GROUP",t.ROLES="ROLES",t.SERVICE_TICKETS="SERVICE_TICKETS",t.SERVICE_TICKETS_CANCELLATATION_REASONS="SERVICE_TICKETS_CANCELLATATION_REASONS",t.SET_ACTIVE_USER_ACCOUNT="SET_ACTIVE_USER_ACCOUNT",t.SHIPMENTS_TICKET="SHIPMENTS_TICKET",t.SHIPMENTS_TICKETS="SHIPMENTS_TICKETS",t.SITES="SITES",t.SITES_PAGED="SITES_PAGED",t.SITES_TREE="SITES_TREE",t.SUPPORT_DOWNLOAD="SUPPORT_DOWNLOAD",t.SUPPORT_TICKETS="SUPPORT_TICKETS",t.SUPPORT_TICKET="SUPPORT_TICKET",t.SUPPORT_TICKET_MESSAGES="SUPPORT_TICKET_MESSAGES",t.UNITS="UNITS",t.UNREAD_NOTIFICATIONS="UNREAD_NOTIFICATIONS",t.UPDATE_CUSTOMER_SUPPORT_TICKET="UPDATE_CUSTOMER_SUPPORT_TICKET",t.UPDATE_FA_TICKET="UPDATE_FA_TICKET",t.UPDATE_RELEASE="UPDATE_RELEASE",t.UPDATE_REMOTE_HANDS_TICKET="UPDATE_REMOTE_HANDS_TICKET",t.UPDATE_SHIPMENTS_TICKET="UPDATE_SHIPMENTS_TICKET",t.USER="USER",t.USER_ACCOUNT_CREATORS="USER_ACCOUNT_CREATORS",t.USER_ACCOUNTS="USER_ACCOUNTS",t.USER_ACCOUNT_APPROVALS="USER_ACCOUNT_APPROVALS",t.USER_ACCOUNT_STATUS="USER_ACCOUNT_STATUS",t.USER_ASSIGNMENTS="USER_ASSIGNMENTS",t.USER_BY_EMAIL="USER_BY_EMAIL",t.USER_CREATE="USER_CREATE",t.USER_DETAILS="USER_DETAILS",t.USER_EDIT="USER_EDIT",t.USER_ID="USER_ID",t.USER_INTERNAL_DOMAINS="USER_INTERNAL_DOMAINS",t.USER_IS_ON_BEHALF_OF="USER_IS_ON_BEHALF_OF",t.USER_LOGOUT="USER_LOGOUT",t.USER_ON_BEHALF_OF="USER_ON_BEHALF_OF",t.USER_PREFERENCES="USER_PREFERENCES",t.USER_PROFILE="USER_PROFILE",t.USER_RELEASE="USER_RELEASE",t.USER_UPDATE="USER_UPDATE",t.USERS_CONTACTS="USERS_CONTACTS",t.USERS_LOCATIONS="USERS_LOCATIONS",t.TECHNICAL_SUPPORT_CONTACTS="TECHNICAL_SUPPORT_CONTACTS",t.TIME_ZONE="TIME_ZONE",t.TIME_ZONE_WINDOWS_IANA="TIME_ZONE_WINDOWS_IANA",t.UPLOAD_ATTACHMENTS="UPLOAD_ATTACHMENTS",t.VALIDATE_ROLE="VALIDATE_ROLE",t.WORK_ORDER_DETAILS="WORK_ORDER_DETAILS",t.WORK_ORDERS="WORK_ORDERS",t.CONTACT_US="CONTACT_US",t))(fn||{});const zI={xs:0,sm:600,md:900,lg:1200,xl:1536},At=t=>`(max-width:${zI[t]-.05}px)`,ha=t=>`(min-width:${zI[t]}px)`,sz=(t,e)=>`${ha(t)} and ${At(e)}`,Qe=t=>{const e=bt(n=>{const i=window.matchMedia(t);return i.addEventListener?(i.addEventListener("change",n),()=>i.removeEventListener("change",n)):(i.addListener(n),()=>i.removeListener(n))},[t]),r=bt(()=>window.matchMedia(t).matches,[t]);return x0(e,r,()=>!1)},ws=()=>{const t=Qe(At("md")),e=Qe(sz("sm","lg"));return{isMobile:t,isTablet:e}};var vf=(t=>(t.Hour12="12-hour",t.Hour24="24-hour",t))(vf||{}),$f=(t=>(t.MMddyyyy="MM/dd/yyyy",t.ddMMyyyy="dd/MM/yyyy",t.yyyyMMdd="yyyy/MM/dd",t))($f||{}),hu=(t=>(t.Hour12="h:mm a",t.Hour24="HH:mm",t))(hu||{});const uz="MM/dd/yyyy",Uf=(t,e,r="-")=>!t||t===""||t==="-"?r:(typeof t=="number"&&(t=tz(t)),ez(t,e||uz));function p1(t,e,r){return t.includes(r)?r:e}const $0=()=>{const{userPreferences:t}=PW(),e=$f.MMddyyyy,r=vf.Hour12,n=Intl.DateTimeFormat().resolvedOptions().timeZone,i=yr(()=>({dateFormat:p1(Object.values($f),e,t==null?void 0:t.dateFormat),timeFormat:p1(Object.values(vf),r,t==null?void 0:t.timeFormat),timeZone:(t==null?void 0:t.timeZone)||n}),[e,r,n,t==null?void 0:t.dateFormat,t==null?void 0:t.timeFormat,t==null?void 0:t.timeZone]),a=yr(()=>i.timeFormat===vf.Hour12,[i.timeFormat]),o=bt(c=>{let d=a?"hh:mm aa":"HH:mm";return c&&(d=a?"hh:mm:ss aa":"HH:mm:ss"),d},[a]),s=bt((c,d,h,g)=>{let m=i.dateFormat;return d&&(m=`${m} ${o(h)}`),Uf(c,m,g)},[i.dateFormat,o]),l=bt((c,d,h)=>{const g=o(d);return Uf(c,g,h)},[o]);return{...i,defaultDateFormat:e,defaultTimeFormat:r,defaultTimeZone:n,isTime12Hour:a,formatDateTime:s,formatTime:l,getTimeFormatString:o}};var ua=(t=>(t.DEVICE_NAME="deviceName",t.FUNCTION_VALUE="functionValue",t.THRESHOLD="threshold",t))(ua||{}),VI=(t=>(t.ASC="asc",t.DESC="desc",t))(VI||{});const Ed=()=>{const[t,e]=sr({preferredDateFormat:$f.MMddyyyy,preferredTimeFormat:hu.Hour24}),r=()=>{const l=localStorage.getItem("date-format");if(l)try{const c=JSON.parse(l);c&&typeof c=="object"&&e(c)}catch(c){console.error("Error parsing date-format from local storage:",c)}};ht(()=>{r();const l=()=>{r()};return window.addEventListener("dateFormatChanged",l),()=>{window.removeEventListener("dateFormatChanged",l)}},[]);const n=yr(()=>t.preferredTimeFormat===hu.Hour12,[t.preferredTimeFormat]),i=bt(l=>{let c=n?hu.Hour12:hu.Hour24;return l&&(c=n?"hh:mm:ss a":"HH:mm:ss"),c},[n]),a=yr(()=>`${t.preferredDateFormat} ${t.preferredTimeFormat}`,[t]),o=bt((l,c,d,h)=>{let g=t.preferredDateFormat;return c&&(g=`${g} ${i(d)}`),Uf(l,g,h)},[t.preferredDateFormat,i]),s=bt((l,c,d)=>{const h=i(c);return Uf(l,h,d)},[i]);return{dateTimeFormatPreferences:t,dateTimeFormatUserPreferenceString:a,formatDateTime:o,formatTime:s,getTimeFormatString:i}};var pu={exports:{}};/**
|
|
39
|
+
* @license
|
|
40
|
+
* Lodash <https://lodash.com/>
|
|
41
|
+
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
|
42
|
+
* Released under MIT license <https://lodash.com/license>
|
|
43
|
+
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
44
|
+
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
45
|
+
*/var lz=pu.exports,g1;function cz(){return g1||(g1=1,(function(t,e){(function(){var r,n="4.18.1",i=200,a="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",o="Expected a function",s="Invalid `variable` option passed into `_.template`",l="Invalid `imports` option passed into `_.template`",c="__lodash_hash_undefined__",d=500,h="__lodash_placeholder__",g=1,m=2,v=4,_=1,y=2,x=1,w=2,C=4,A=8,E=16,S=32,T=64,D=128,P=256,N=512,F=30,B="...",W=800,te=16,J=1,ie=2,le=3,se=1/0,ce=9007199254740991,Q=17976931348623157e292,$=NaN,X=4294967295,Z=X-1,fe=X>>>1,be=[["ary",D],["bind",x],["bindKey",w],["curry",A],["curryRight",E],["flip",N],["partial",S],["partialRight",T],["rearg",P]],_e="[object Arguments]",Le="[object Array]",Ae="[object AsyncFunction]",he="[object Boolean]",ge="[object Date]",Ne="[object DOMException]",we="[object Error]",ve="[object Function]",Fe="[object GeneratorFunction]",Be="[object Map]",ke="[object Number]",Ze="[object Null]",gt="[object Object]",Lr="[object Promise]",Yr="[object Proxy]",fr="[object RegExp]",z="[object Set]",de="[object String]",me="[object Symbol]",De="[object Undefined]",Ue="[object WeakMap]",nt="[object WeakSet]",Et="[object ArrayBuffer]",Ot="[object DataView]",Zr="[object Float32Array]",Ur="[object Float64Array]",yi="[object Int8Array]",Ir="[object Int16Array]",Sn="[object Int32Array]",Wn="[object Uint8Array]",V="[object Uint8ClampedArray]",G="[object Uint16Array]",ut="[object Uint32Array]",Tt=/\b__p \+= '';/g,Dt=/\b(__p \+=) '' \+/g,Ve=/(__e\(.*?\)|\b__t\)) \+\n'';/g,qr=/&(?:amp|lt|gt|quot|#39);/g,Cn=/[&<>"']/g,Tr=RegExp(qr.source),En=RegExp(Cn.source),zi=/<%-([\s\S]+?)%>/g,dn=/<%([\s\S]+?)%>/g,br=/<%=([\s\S]+?)%>/g,Co=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Eo=/^\w*$/,k=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,q=/[\\^$.*+?()[\]{}|]/g,K=RegExp(q.source),ae=/^\s+/,pe=/\s/,Me=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,qe=/\{\n\/\* \[wrapped with (.+)\] \*/,Se=/,? & /,Oe=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Te=/[()=,{}\[\]\/\s]/,Ie=/\\(\\)?/g,ze=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,it=/\w*$/,er=/^[-+]0x[0-9a-f]+$/i,mt=/^0b[01]+$/i,lt=/^\[object .+?Constructor\]$/,Ht=/^0o[0-7]+$/i,Bn=/^(?:0|[1-9]\d*)$/,Aa=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Jr=/($^)/,On=/['\n\r\u2028\u2029\\]/g,Vi="\\ud800-\\udfff",Ra="\\u0300-\\u036f",bi="\\ufe20-\\ufe2f",Oo="\\u20d0-\\u20ff",Ia=Ra+bi+Oo,vt="\\u2700-\\u27bf",zt="a-z\\xdf-\\xf6\\xf8-\\xff",Gi="\\xac\\xb1\\xd7\\xf7",Da="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",ar="\\u2000-\\u206f",Ki=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ds="A-Z\\xc0-\\xd6\\xd8-\\xde",sl="\\ufe0e\\ufe0f",n_=Gi+Da+ar+Ki,th="['’]",TL="["+Vi+"]",i_="["+n_+"]",ul="["+Ia+"]",a_="\\d+",SL="["+vt+"]",o_="["+zt+"]",s_="[^"+Vi+n_+a_+vt+zt+Ds+"]",rh="\\ud83c[\\udffb-\\udfff]",CL="(?:"+ul+"|"+rh+")",u_="[^"+Vi+"]",nh="(?:\\ud83c[\\udde6-\\uddff]){2}",ih="[\\ud800-\\udbff][\\udc00-\\udfff]",Ao="["+Ds+"]",l_="\\u200d",c_="(?:"+o_+"|"+s_+")",EL="(?:"+Ao+"|"+s_+")",f_="(?:"+th+"(?:d|ll|m|re|s|t|ve))?",d_="(?:"+th+"(?:D|LL|M|RE|S|T|VE))?",h_=CL+"?",p_="["+sl+"]?",OL="(?:"+l_+"(?:"+[u_,nh,ih].join("|")+")"+p_+h_+")*",AL="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",RL="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",g_=p_+h_+OL,IL="(?:"+[SL,nh,ih].join("|")+")"+g_,DL="(?:"+[u_+ul+"?",ul,nh,ih,TL].join("|")+")",ML=RegExp(th,"g"),PL=RegExp(ul,"g"),ah=RegExp(rh+"(?="+rh+")|"+DL+g_,"g"),LL=RegExp([Ao+"?"+o_+"+"+f_+"(?="+[i_,Ao,"$"].join("|")+")",EL+"+"+d_+"(?="+[i_,Ao+c_,"$"].join("|")+")",Ao+"?"+c_+"+"+f_,Ao+"+"+d_,RL,AL,a_,IL].join("|"),"g"),NL=RegExp("["+l_+Vi+Ia+sl+"]"),FL=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,kL=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],jL=-1,Vt={};Vt[Zr]=Vt[Ur]=Vt[yi]=Vt[Ir]=Vt[Sn]=Vt[Wn]=Vt[V]=Vt[G]=Vt[ut]=!0,Vt[_e]=Vt[Le]=Vt[Et]=Vt[he]=Vt[Ot]=Vt[ge]=Vt[we]=Vt[ve]=Vt[Be]=Vt[ke]=Vt[gt]=Vt[fr]=Vt[z]=Vt[de]=Vt[Ue]=!1;var Wt={};Wt[_e]=Wt[Le]=Wt[Et]=Wt[Ot]=Wt[he]=Wt[ge]=Wt[Zr]=Wt[Ur]=Wt[yi]=Wt[Ir]=Wt[Sn]=Wt[Be]=Wt[ke]=Wt[gt]=Wt[fr]=Wt[z]=Wt[de]=Wt[me]=Wt[Wn]=Wt[V]=Wt[G]=Wt[ut]=!0,Wt[we]=Wt[ve]=Wt[Ue]=!1;var $L={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},UL={"&":"&","<":"<",">":">",'"':""","'":"'"},qL={"&":"&","<":"<",">":">",""":'"',"'":"'"},HL={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},WL=parseFloat,BL=parseInt,m_=typeof di=="object"&&di&&di.Object===Object&&di,zL=typeof self=="object"&&self&&self.Object===Object&&self,Dr=m_||zL||Function("return this")(),oh=e&&!e.nodeType&&e,Ma=oh&&!0&&t&&!t.nodeType&&t,v_=Ma&&Ma.exports===oh,sh=v_&&m_.process,An=(function(){try{var U=Ma&&Ma.require&&Ma.require("util").types;return U||sh&&sh.binding&&sh.binding("util")}catch{}})(),y_=An&&An.isArrayBuffer,b_=An&&An.isDate,__=An&&An.isMap,x_=An&&An.isRegExp,w_=An&&An.isSet,T_=An&&An.isTypedArray;function hn(U,ee,Y){switch(Y.length){case 0:return U.call(ee);case 1:return U.call(ee,Y[0]);case 2:return U.call(ee,Y[0],Y[1]);case 3:return U.call(ee,Y[0],Y[1],Y[2])}return U.apply(ee,Y)}function VL(U,ee,Y,Ce){for(var Ge=-1,Rt=U==null?0:U.length;++Ge<Rt;){var _r=U[Ge];ee(Ce,_r,Y(_r),U)}return Ce}function pn(U,ee){for(var Y=-1,Ce=U==null?0:U.length;++Y<Ce&&ee(U[Y],Y,U)!==!1;);return U}function GL(U,ee){for(var Y=U==null?0:U.length;Y--&&ee(U[Y],Y,U)!==!1;);return U}function S_(U,ee){for(var Y=-1,Ce=U==null?0:U.length;++Y<Ce;)if(!ee(U[Y],Y,U))return!1;return!0}function Xi(U,ee){for(var Y=-1,Ce=U==null?0:U.length,Ge=0,Rt=[];++Y<Ce;){var _r=U[Y];ee(_r,Y,U)&&(Rt[Ge++]=_r)}return Rt}function ll(U,ee){var Y=U==null?0:U.length;return!!Y&&Ro(U,ee,0)>-1}function uh(U,ee,Y){for(var Ce=-1,Ge=U==null?0:U.length;++Ce<Ge;)if(Y(ee,U[Ce]))return!0;return!1}function Yt(U,ee){for(var Y=-1,Ce=U==null?0:U.length,Ge=Array(Ce);++Y<Ce;)Ge[Y]=ee(U[Y],Y,U);return Ge}function Yi(U,ee){for(var Y=-1,Ce=ee.length,Ge=U.length;++Y<Ce;)U[Ge+Y]=ee[Y];return U}function lh(U,ee,Y,Ce){var Ge=-1,Rt=U==null?0:U.length;for(Ce&&Rt&&(Y=U[++Ge]);++Ge<Rt;)Y=ee(Y,U[Ge],Ge,U);return Y}function KL(U,ee,Y,Ce){var Ge=U==null?0:U.length;for(Ce&&Ge&&(Y=U[--Ge]);Ge--;)Y=ee(Y,U[Ge],Ge,U);return Y}function ch(U,ee){for(var Y=-1,Ce=U==null?0:U.length;++Y<Ce;)if(ee(U[Y],Y,U))return!0;return!1}var XL=fh("length");function YL(U){return U.split("")}function ZL(U){return U.match(Oe)||[]}function C_(U,ee,Y){var Ce;return Y(U,function(Ge,Rt,_r){if(ee(Ge,Rt,_r))return Ce=Rt,!1}),Ce}function cl(U,ee,Y,Ce){for(var Ge=U.length,Rt=Y+(Ce?1:-1);Ce?Rt--:++Rt<Ge;)if(ee(U[Rt],Rt,U))return Rt;return-1}function Ro(U,ee,Y){return ee===ee?lN(U,ee,Y):cl(U,E_,Y)}function JL(U,ee,Y,Ce){for(var Ge=Y-1,Rt=U.length;++Ge<Rt;)if(Ce(U[Ge],ee))return Ge;return-1}function E_(U){return U!==U}function O_(U,ee){var Y=U==null?0:U.length;return Y?hh(U,ee)/Y:$}function fh(U){return function(ee){return ee==null?r:ee[U]}}function dh(U){return function(ee){return U==null?r:U[ee]}}function A_(U,ee,Y,Ce,Ge){return Ge(U,function(Rt,_r,Ut){Y=Ce?(Ce=!1,Rt):ee(Y,Rt,_r,Ut)}),Y}function QL(U,ee){var Y=U.length;for(U.sort(ee);Y--;)U[Y]=U[Y].value;return U}function hh(U,ee){for(var Y,Ce=-1,Ge=U.length;++Ce<Ge;){var Rt=ee(U[Ce]);Rt!==r&&(Y=Y===r?Rt:Y+Rt)}return Y}function ph(U,ee){for(var Y=-1,Ce=Array(U);++Y<U;)Ce[Y]=ee(Y);return Ce}function eN(U,ee){return Yt(ee,function(Y){return[Y,U[Y]]})}function R_(U){return U&&U.slice(0,P_(U)+1).replace(ae,"")}function gn(U){return function(ee){return U(ee)}}function gh(U,ee){return Yt(ee,function(Y){return U[Y]})}function Ms(U,ee){return U.has(ee)}function I_(U,ee){for(var Y=-1,Ce=U.length;++Y<Ce&&Ro(ee,U[Y],0)>-1;);return Y}function D_(U,ee){for(var Y=U.length;Y--&&Ro(ee,U[Y],0)>-1;);return Y}function tN(U,ee){for(var Y=U.length,Ce=0;Y--;)U[Y]===ee&&++Ce;return Ce}var rN=dh($L),nN=dh(UL);function iN(U){return"\\"+HL[U]}function aN(U,ee){return U==null?r:U[ee]}function Io(U){return NL.test(U)}function oN(U){return FL.test(U)}function sN(U){for(var ee,Y=[];!(ee=U.next()).done;)Y.push(ee.value);return Y}function mh(U){var ee=-1,Y=Array(U.size);return U.forEach(function(Ce,Ge){Y[++ee]=[Ge,Ce]}),Y}function M_(U,ee){return function(Y){return U(ee(Y))}}function Zi(U,ee){for(var Y=-1,Ce=U.length,Ge=0,Rt=[];++Y<Ce;){var _r=U[Y];(_r===ee||_r===h)&&(U[Y]=h,Rt[Ge++]=Y)}return Rt}function fl(U){var ee=-1,Y=Array(U.size);return U.forEach(function(Ce){Y[++ee]=Ce}),Y}function uN(U){var ee=-1,Y=Array(U.size);return U.forEach(function(Ce){Y[++ee]=[Ce,Ce]}),Y}function lN(U,ee,Y){for(var Ce=Y-1,Ge=U.length;++Ce<Ge;)if(U[Ce]===ee)return Ce;return-1}function cN(U,ee,Y){for(var Ce=Y+1;Ce--;)if(U[Ce]===ee)return Ce;return Ce}function Do(U){return Io(U)?dN(U):XL(U)}function zn(U){return Io(U)?hN(U):YL(U)}function P_(U){for(var ee=U.length;ee--&&pe.test(U.charAt(ee)););return ee}var fN=dh(qL);function dN(U){for(var ee=ah.lastIndex=0;ah.test(U);)++ee;return ee}function hN(U){return U.match(ah)||[]}function pN(U){return U.match(LL)||[]}var gN=(function U(ee){ee=ee==null?Dr:Mo.defaults(Dr.Object(),ee,Mo.pick(Dr,kL));var Y=ee.Array,Ce=ee.Date,Ge=ee.Error,Rt=ee.Function,_r=ee.Math,Ut=ee.Object,vh=ee.RegExp,mN=ee.String,Rn=ee.TypeError,dl=Y.prototype,vN=Rt.prototype,Po=Ut.prototype,hl=ee["__core-js_shared__"],pl=vN.toString,Mt=Po.hasOwnProperty,yN=0,L_=(function(){var u=/[^.]+$/.exec(hl&&hl.keys&&hl.keys.IE_PROTO||"");return u?"Symbol(src)_1."+u:""})(),gl=Po.toString,bN=pl.call(Ut),_N=Dr._,xN=vh("^"+pl.call(Mt).replace(q,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ml=v_?ee.Buffer:r,Ji=ee.Symbol,vl=ee.Uint8Array,N_=ml?ml.allocUnsafe:r,yl=M_(Ut.getPrototypeOf,Ut),F_=Ut.create,k_=Po.propertyIsEnumerable,bl=dl.splice,j_=Ji?Ji.isConcatSpreadable:r,Ps=Ji?Ji.iterator:r,Pa=Ji?Ji.toStringTag:r,_l=(function(){try{var u=ja(Ut,"defineProperty");return u({},"",{}),u}catch{}})(),wN=ee.clearTimeout!==Dr.clearTimeout&&ee.clearTimeout,TN=Ce&&Ce.now!==Dr.Date.now&&Ce.now,SN=ee.setTimeout!==Dr.setTimeout&&ee.setTimeout,xl=_r.ceil,wl=_r.floor,yh=Ut.getOwnPropertySymbols,CN=ml?ml.isBuffer:r,$_=ee.isFinite,EN=dl.join,ON=M_(Ut.keys,Ut),xr=_r.max,Nr=_r.min,AN=Ce.now,RN=ee.parseInt,U_=_r.random,IN=dl.reverse,bh=ja(ee,"DataView"),Ls=ja(ee,"Map"),_h=ja(ee,"Promise"),Lo=ja(ee,"Set"),Ns=ja(ee,"WeakMap"),Fs=ja(Ut,"create"),Tl=Ns&&new Ns,No={},DN=$a(bh),MN=$a(Ls),PN=$a(_h),LN=$a(Lo),NN=$a(Ns),Sl=Ji?Ji.prototype:r,ks=Sl?Sl.valueOf:r,q_=Sl?Sl.toString:r;function I(u){if(or(u)&&!Ye(u)&&!(u instanceof pt)){if(u instanceof In)return u;if(Mt.call(u,"__wrapped__"))return Hx(u)}return new In(u)}var Fo=(function(){function u(){}return function(f){if(!tr(f))return{};if(F_)return F_(f);u.prototype=f;var p=new u;return u.prototype=r,p}})();function Cl(){}function In(u,f){this.__wrapped__=u,this.__actions__=[],this.__chain__=!!f,this.__index__=0,this.__values__=r}I.templateSettings={escape:zi,evaluate:dn,interpolate:br,variable:"",imports:{_:I}},I.prototype=Cl.prototype,I.prototype.constructor=I,In.prototype=Fo(Cl.prototype),In.prototype.constructor=In;function pt(u){this.__wrapped__=u,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=X,this.__views__=[]}function FN(){var u=new pt(this.__wrapped__);return u.__actions__=Qr(this.__actions__),u.__dir__=this.__dir__,u.__filtered__=this.__filtered__,u.__iteratees__=Qr(this.__iteratees__),u.__takeCount__=this.__takeCount__,u.__views__=Qr(this.__views__),u}function kN(){if(this.__filtered__){var u=new pt(this);u.__dir__=-1,u.__filtered__=!0}else u=this.clone(),u.__dir__*=-1;return u}function jN(){var u=this.__wrapped__.value(),f=this.__dir__,p=Ye(u),b=f<0,O=p?u.length:0,M=YF(0,O,this.__views__),L=M.start,j=M.end,H=j-L,re=b?j:L-1,ne=this.__iteratees__,oe=ne.length,ye=0,Pe=Nr(H,this.__takeCount__);if(!p||!b&&O==H&&Pe==H)return fx(u,this.__actions__);var We=[];e:for(;H--&&ye<Pe;){re+=f;for(var et=-1,$e=u[re];++et<oe;){var dt=ne[et],yt=dt.iteratee,yn=dt.type,Br=yt($e);if(yn==ie)$e=Br;else if(!Br){if(yn==J)continue e;break e}}We[ye++]=$e}return We}pt.prototype=Fo(Cl.prototype),pt.prototype.constructor=pt;function La(u){var f=-1,p=u==null?0:u.length;for(this.clear();++f<p;){var b=u[f];this.set(b[0],b[1])}}function $N(){this.__data__=Fs?Fs(null):{},this.size=0}function UN(u){var f=this.has(u)&&delete this.__data__[u];return this.size-=f?1:0,f}function qN(u){var f=this.__data__;if(Fs){var p=f[u];return p===c?r:p}return Mt.call(f,u)?f[u]:r}function HN(u){var f=this.__data__;return Fs?f[u]!==r:Mt.call(f,u)}function WN(u,f){var p=this.__data__;return this.size+=this.has(u)?0:1,p[u]=Fs&&f===r?c:f,this}La.prototype.clear=$N,La.prototype.delete=UN,La.prototype.get=qN,La.prototype.has=HN,La.prototype.set=WN;function _i(u){var f=-1,p=u==null?0:u.length;for(this.clear();++f<p;){var b=u[f];this.set(b[0],b[1])}}function BN(){this.__data__=[],this.size=0}function zN(u){var f=this.__data__,p=El(f,u);if(p<0)return!1;var b=f.length-1;return p==b?f.pop():bl.call(f,p,1),--this.size,!0}function VN(u){var f=this.__data__,p=El(f,u);return p<0?r:f[p][1]}function GN(u){return El(this.__data__,u)>-1}function KN(u,f){var p=this.__data__,b=El(p,u);return b<0?(++this.size,p.push([u,f])):p[b][1]=f,this}_i.prototype.clear=BN,_i.prototype.delete=zN,_i.prototype.get=VN,_i.prototype.has=GN,_i.prototype.set=KN;function xi(u){var f=-1,p=u==null?0:u.length;for(this.clear();++f<p;){var b=u[f];this.set(b[0],b[1])}}function XN(){this.size=0,this.__data__={hash:new La,map:new(Ls||_i),string:new La}}function YN(u){var f=jl(this,u).delete(u);return this.size-=f?1:0,f}function ZN(u){return jl(this,u).get(u)}function JN(u){return jl(this,u).has(u)}function QN(u,f){var p=jl(this,u),b=p.size;return p.set(u,f),this.size+=p.size==b?0:1,this}xi.prototype.clear=XN,xi.prototype.delete=YN,xi.prototype.get=ZN,xi.prototype.has=JN,xi.prototype.set=QN;function Na(u){var f=-1,p=u==null?0:u.length;for(this.__data__=new xi;++f<p;)this.add(u[f])}function eF(u){return this.__data__.set(u,c),this}function tF(u){return this.__data__.has(u)}Na.prototype.add=Na.prototype.push=eF,Na.prototype.has=tF;function Vn(u){var f=this.__data__=new _i(u);this.size=f.size}function rF(){this.__data__=new _i,this.size=0}function nF(u){var f=this.__data__,p=f.delete(u);return this.size=f.size,p}function iF(u){return this.__data__.get(u)}function aF(u){return this.__data__.has(u)}function oF(u,f){var p=this.__data__;if(p instanceof _i){var b=p.__data__;if(!Ls||b.length<i-1)return b.push([u,f]),this.size=++p.size,this;p=this.__data__=new xi(b)}return p.set(u,f),this.size=p.size,this}Vn.prototype.clear=rF,Vn.prototype.delete=nF,Vn.prototype.get=iF,Vn.prototype.has=aF,Vn.prototype.set=oF;function H_(u,f){var p=Ye(u),b=!p&&Ua(u),O=!p&&!b&&na(u),M=!p&&!b&&!O&&Uo(u),L=p||b||O||M,j=L?ph(u.length,mN):[],H=j.length;for(var re in u)(f||Mt.call(u,re))&&!(L&&(re=="length"||O&&(re=="offset"||re=="parent")||M&&(re=="buffer"||re=="byteLength"||re=="byteOffset")||Si(re,H)))&&j.push(re);return j}function W_(u){var f=u.length;return f?u[Dh(0,f-1)]:r}function sF(u,f){return $l(Qr(u),Fa(f,0,u.length))}function uF(u){return $l(Qr(u))}function xh(u,f,p){(p!==r&&!Kn(u[f],p)||p===r&&!(f in u))&&ri(u,f,p)}function js(u,f,p){var b=u[f];(!(Mt.call(u,f)&&Kn(b,p))||p===r&&!(f in u))&&ri(u,f,p)}function El(u,f){for(var p=u.length;p--;)if(Kn(u[p][0],f))return p;return-1}function lF(u,f,p,b){return Qi(u,function(O,M,L){f(b,O,p(O),L)}),b}function B_(u,f){return u&&ii(f,Sr(f),u)}function cF(u,f){return u&&ii(f,tn(f),u)}function ri(u,f,p){f=="__proto__"&&_l?_l(u,f,{configurable:!0,enumerable:!0,value:p,writable:!0}):u[f]=p}function wh(u,f){for(var p=-1,b=f.length,O=Y(b),M=u==null;++p<b;)O[p]=M?r:np(u,f[p]);return O}function Fa(u,f,p){return u===u&&(p!==r&&(u=u<=p?u:p),f!==r&&(u=u>=f?u:f)),u}function Dn(u,f,p,b,O,M){var L,j=f&g,H=f&m,re=f&v;if(p&&(L=O?p(u,b,O,M):p(u)),L!==r)return L;if(!tr(u))return u;var ne=Ye(u);if(ne){if(L=JF(u),!j)return Qr(u,L)}else{var oe=Fr(u),ye=oe==ve||oe==Fe;if(na(u))return px(u,j);if(oe==gt||oe==_e||ye&&!O){if(L=H||ye?{}:Px(u),!j)return H?qF(u,cF(L,u)):UF(u,B_(L,u))}else{if(!Wt[oe])return O?u:{};L=QF(u,oe,j)}}M||(M=new Vn);var Pe=M.get(u);if(Pe)return Pe;M.set(u,L),uw(u)?u.forEach(function($e){L.add(Dn($e,f,p,$e,u,M))}):ow(u)&&u.forEach(function($e,dt){L.set(dt,Dn($e,f,p,dt,u,M))});var We=re?H?Hh:qh:H?tn:Sr,et=ne?r:We(u);return pn(et||u,function($e,dt){et&&(dt=$e,$e=u[dt]),js(L,dt,Dn($e,f,p,dt,u,M))}),L}function fF(u){var f=Sr(u);return function(p){return z_(p,u,f)}}function z_(u,f,p){var b=p.length;if(u==null)return!b;for(u=Ut(u);b--;){var O=p[b],M=f[O],L=u[O];if(L===r&&!(O in u)||!M(L))return!1}return!0}function V_(u,f,p){if(typeof u!="function")throw new Rn(o);return zs(function(){u.apply(r,p)},f)}function $s(u,f,p,b){var O=-1,M=ll,L=!0,j=u.length,H=[],re=f.length;if(!j)return H;p&&(f=Yt(f,gn(p))),b?(M=uh,L=!1):f.length>=i&&(M=Ms,L=!1,f=new Na(f));e:for(;++O<j;){var ne=u[O],oe=p==null?ne:p(ne);if(ne=b||ne!==0?ne:0,L&&oe===oe){for(var ye=re;ye--;)if(f[ye]===oe)continue e;H.push(ne)}else M(f,oe,b)||H.push(ne)}return H}var Qi=bx(ni),G_=bx(Sh,!0);function dF(u,f){var p=!0;return Qi(u,function(b,O,M){return p=!!f(b,O,M),p}),p}function Ol(u,f,p){for(var b=-1,O=u.length;++b<O;){var M=u[b],L=f(M);if(L!=null&&(j===r?L===L&&!vn(L):p(L,j)))var j=L,H=M}return H}function hF(u,f,p,b){var O=u.length;for(p=Je(p),p<0&&(p=-p>O?0:O+p),b=b===r||b>O?O:Je(b),b<0&&(b+=O),b=p>b?0:cw(b);p<b;)u[p++]=f;return u}function K_(u,f){var p=[];return Qi(u,function(b,O,M){f(b,O,M)&&p.push(b)}),p}function Mr(u,f,p,b,O){var M=-1,L=u.length;for(p||(p=t2),O||(O=[]);++M<L;){var j=u[M];f>0&&p(j)?f>1?Mr(j,f-1,p,b,O):Yi(O,j):b||(O[O.length]=j)}return O}var Th=_x(),X_=_x(!0);function ni(u,f){return u&&Th(u,f,Sr)}function Sh(u,f){return u&&X_(u,f,Sr)}function Al(u,f){return Xi(f,function(p){return Ci(u[p])})}function ka(u,f){f=ta(f,u);for(var p=0,b=f.length;u!=null&&p<b;)u=u[Gn(f[p++])];return p&&p==b?u:r}function Y_(u,f,p){var b=f(u);return Ye(u)?b:Yi(b,p(u))}function Hr(u){return u==null?u===r?De:Ze:Pa&&Pa in Ut(u)?XF(u):u2(u)}function Ch(u,f){return u>f}function pF(u,f){return u!=null&&Mt.call(u,f)}function gF(u,f){return u!=null&&f in Ut(u)}function mF(u,f,p){return u>=Nr(f,p)&&u<xr(f,p)}function Eh(u,f,p){for(var b=p?uh:ll,O=u[0].length,M=u.length,L=M,j=Y(M),H=1/0,re=[];L--;){var ne=u[L];L&&f&&(ne=Yt(ne,gn(f))),H=Nr(ne.length,H),j[L]=!p&&(f||O>=120&&ne.length>=120)?new Na(L&&ne):r}ne=u[0];var oe=-1,ye=j[0];e:for(;++oe<O&&re.length<H;){var Pe=ne[oe],We=f?f(Pe):Pe;if(Pe=p||Pe!==0?Pe:0,!(ye?Ms(ye,We):b(re,We,p))){for(L=M;--L;){var et=j[L];if(!(et?Ms(et,We):b(u[L],We,p)))continue e}ye&&ye.push(We),re.push(Pe)}}return re}function vF(u,f,p,b){return ni(u,function(O,M,L){f(b,p(O),M,L)}),b}function Us(u,f,p){f=ta(f,u),u=kx(u,f);var b=u==null?u:u[Gn(Pn(f))];return b==null?r:hn(b,u,p)}function Z_(u){return or(u)&&Hr(u)==_e}function yF(u){return or(u)&&Hr(u)==Et}function bF(u){return or(u)&&Hr(u)==ge}function qs(u,f,p,b,O){return u===f?!0:u==null||f==null||!or(u)&&!or(f)?u!==u&&f!==f:_F(u,f,p,b,qs,O)}function _F(u,f,p,b,O,M){var L=Ye(u),j=Ye(f),H=L?Le:Fr(u),re=j?Le:Fr(f);H=H==_e?gt:H,re=re==_e?gt:re;var ne=H==gt,oe=re==gt,ye=H==re;if(ye&&na(u)){if(!na(f))return!1;L=!0,ne=!1}if(ye&&!ne)return M||(M=new Vn),L||Uo(u)?Ix(u,f,p,b,O,M):GF(u,f,H,p,b,O,M);if(!(p&_)){var Pe=ne&&Mt.call(u,"__wrapped__"),We=oe&&Mt.call(f,"__wrapped__");if(Pe||We){var et=Pe?u.value():u,$e=We?f.value():f;return M||(M=new Vn),O(et,$e,p,b,M)}}return ye?(M||(M=new Vn),KF(u,f,p,b,O,M)):!1}function xF(u){return or(u)&&Fr(u)==Be}function Oh(u,f,p,b){var O=p.length,M=O,L=!b;if(u==null)return!M;for(u=Ut(u);O--;){var j=p[O];if(L&&j[2]?j[1]!==u[j[0]]:!(j[0]in u))return!1}for(;++O<M;){j=p[O];var H=j[0],re=u[H],ne=j[1];if(L&&j[2]){if(re===r&&!(H in u))return!1}else{var oe=new Vn;if(b)var ye=b(re,ne,H,u,f,oe);if(!(ye===r?qs(ne,re,_|y,b,oe):ye))return!1}}return!0}function J_(u){if(!tr(u)||n2(u))return!1;var f=Ci(u)?xN:lt;return f.test($a(u))}function wF(u){return or(u)&&Hr(u)==fr}function TF(u){return or(u)&&Fr(u)==z}function SF(u){return or(u)&&zl(u.length)&&!!Vt[Hr(u)]}function Q_(u){return typeof u=="function"?u:u==null?rn:typeof u=="object"?Ye(u)?rx(u[0],u[1]):tx(u):ww(u)}function Ah(u){if(!Bs(u))return ON(u);var f=[];for(var p in Ut(u))Mt.call(u,p)&&p!="constructor"&&f.push(p);return f}function CF(u){if(!tr(u))return s2(u);var f=Bs(u),p=[];for(var b in u)b=="constructor"&&(f||!Mt.call(u,b))||p.push(b);return p}function Rh(u,f){return u<f}function ex(u,f){var p=-1,b=en(u)?Y(u.length):[];return Qi(u,function(O,M,L){b[++p]=f(O,M,L)}),b}function tx(u){var f=Bh(u);return f.length==1&&f[0][2]?Nx(f[0][0],f[0][1]):function(p){return p===u||Oh(p,u,f)}}function rx(u,f){return Vh(u)&&Lx(f)?Nx(Gn(u),f):function(p){var b=np(p,u);return b===r&&b===f?ip(p,u):qs(f,b,_|y)}}function Rl(u,f,p,b,O){u!==f&&Th(f,function(M,L){if(O||(O=new Vn),tr(M))EF(u,f,L,p,Rl,b,O);else{var j=b?b(Kh(u,L),M,L+"",u,f,O):r;j===r&&(j=M),xh(u,L,j)}},tn)}function EF(u,f,p,b,O,M,L){var j=Kh(u,p),H=Kh(f,p),re=L.get(H);if(re){xh(u,p,re);return}var ne=M?M(j,H,p+"",u,f,L):r,oe=ne===r;if(oe){var ye=Ye(H),Pe=!ye&&na(H),We=!ye&&!Pe&&Uo(H);ne=H,ye||Pe||We?Ye(j)?ne=j:dr(j)?ne=Qr(j):Pe?(oe=!1,ne=px(H,!0)):We?(oe=!1,ne=gx(H,!0)):ne=[]:Vs(H)||Ua(H)?(ne=j,Ua(j)?ne=fw(j):(!tr(j)||Ci(j))&&(ne=Px(H))):oe=!1}oe&&(L.set(H,ne),O(ne,H,b,M,L),L.delete(H)),xh(u,p,ne)}function nx(u,f){var p=u.length;if(p)return f+=f<0?p:0,Si(f,p)?u[f]:r}function ix(u,f,p){f.length?f=Yt(f,function(M){return Ye(M)?function(L){return ka(L,M.length===1?M[0]:M)}:M}):f=[rn];var b=-1;f=Yt(f,gn(He()));var O=ex(u,function(M,L,j){var H=Yt(f,function(re){return re(M)});return{criteria:H,index:++b,value:M}});return QL(O,function(M,L){return $F(M,L,p)})}function OF(u,f){return ax(u,f,function(p,b){return ip(u,b)})}function ax(u,f,p){for(var b=-1,O=f.length,M={};++b<O;){var L=f[b],j=ka(u,L);p(j,L)&&Hs(M,ta(L,u),j)}return M}function AF(u){return function(f){return ka(f,u)}}function Ih(u,f,p,b){var O=b?JL:Ro,M=-1,L=f.length,j=u;for(u===f&&(f=Qr(f)),p&&(j=Yt(u,gn(p)));++M<L;)for(var H=0,re=f[M],ne=p?p(re):re;(H=O(j,ne,H,b))>-1;)j!==u&&bl.call(j,H,1),bl.call(u,H,1);return u}function ox(u,f){for(var p=u?f.length:0,b=p-1;p--;){var O=f[p];if(p==b||O!==M){var M=O;Si(O)?bl.call(u,O,1):Lh(u,O)}}return u}function Dh(u,f){return u+wl(U_()*(f-u+1))}function RF(u,f,p,b){for(var O=-1,M=xr(xl((f-u)/(p||1)),0),L=Y(M);M--;)L[b?M:++O]=u,u+=p;return L}function Mh(u,f){var p="";if(!u||f<1||f>ce)return p;do f%2&&(p+=u),f=wl(f/2),f&&(u+=u);while(f);return p}function at(u,f){return Xh(Fx(u,f,rn),u+"")}function IF(u){return W_(qo(u))}function DF(u,f){var p=qo(u);return $l(p,Fa(f,0,p.length))}function Hs(u,f,p,b){if(!tr(u))return u;f=ta(f,u);for(var O=-1,M=f.length,L=M-1,j=u;j!=null&&++O<M;){var H=Gn(f[O]),re=p;if(H==="__proto__"||H==="constructor"||H==="prototype")return u;if(O!=L){var ne=j[H];re=b?b(ne,H,j):r,re===r&&(re=tr(ne)?ne:Si(f[O+1])?[]:{})}js(j,H,re),j=j[H]}return u}var sx=Tl?function(u,f){return Tl.set(u,f),u}:rn,MF=_l?function(u,f){return _l(u,"toString",{configurable:!0,enumerable:!1,value:op(f),writable:!0})}:rn;function PF(u){return $l(qo(u))}function Mn(u,f,p){var b=-1,O=u.length;f<0&&(f=-f>O?0:O+f),p=p>O?O:p,p<0&&(p+=O),O=f>p?0:p-f>>>0,f>>>=0;for(var M=Y(O);++b<O;)M[b]=u[b+f];return M}function LF(u,f){var p;return Qi(u,function(b,O,M){return p=f(b,O,M),!p}),!!p}function Il(u,f,p){var b=0,O=u==null?b:u.length;if(typeof f=="number"&&f===f&&O<=fe){for(;b<O;){var M=b+O>>>1,L=u[M];L!==null&&!vn(L)&&(p?L<=f:L<f)?b=M+1:O=M}return O}return Ph(u,f,rn,p)}function Ph(u,f,p,b){var O=0,M=u==null?0:u.length;if(M===0)return 0;f=p(f);for(var L=f!==f,j=f===null,H=vn(f),re=f===r;O<M;){var ne=wl((O+M)/2),oe=p(u[ne]),ye=oe!==r,Pe=oe===null,We=oe===oe,et=vn(oe);if(L)var $e=b||We;else re?$e=We&&(b||ye):j?$e=We&&ye&&(b||!Pe):H?$e=We&&ye&&!Pe&&(b||!et):Pe||et?$e=!1:$e=b?oe<=f:oe<f;$e?O=ne+1:M=ne}return Nr(M,Z)}function ux(u,f){for(var p=-1,b=u.length,O=0,M=[];++p<b;){var L=u[p],j=f?f(L):L;if(!p||!Kn(j,H)){var H=j;M[O++]=L===0?0:L}}return M}function lx(u){return typeof u=="number"?u:vn(u)?$:+u}function mn(u){if(typeof u=="string")return u;if(Ye(u))return Yt(u,mn)+"";if(vn(u))return q_?q_.call(u):"";var f=u+"";return f=="0"&&1/u==-se?"-0":f}function ea(u,f,p){var b=-1,O=ll,M=u.length,L=!0,j=[],H=j;if(p)L=!1,O=uh;else if(M>=i){var re=f?null:zF(u);if(re)return fl(re);L=!1,O=Ms,H=new Na}else H=f?[]:j;e:for(;++b<M;){var ne=u[b],oe=f?f(ne):ne;if(ne=p||ne!==0?ne:0,L&&oe===oe){for(var ye=H.length;ye--;)if(H[ye]===oe)continue e;f&&H.push(oe),j.push(ne)}else O(H,oe,p)||(H!==j&&H.push(oe),j.push(ne))}return j}function Lh(u,f){f=ta(f,u);var p=-1,b=f.length;if(!b)return!0;for(;++p<b;){var O=Gn(f[p]);if(O==="__proto__"&&!Mt.call(u,"__proto__")||(O==="constructor"||O==="prototype")&&p<b-1)return!1}var M=kx(u,f);return M==null||delete M[Gn(Pn(f))]}function cx(u,f,p,b){return Hs(u,f,p(ka(u,f)),b)}function Dl(u,f,p,b){for(var O=u.length,M=b?O:-1;(b?M--:++M<O)&&f(u[M],M,u););return p?Mn(u,b?0:M,b?M+1:O):Mn(u,b?M+1:0,b?O:M)}function fx(u,f){var p=u;return p instanceof pt&&(p=p.value()),lh(f,function(b,O){return O.func.apply(O.thisArg,Yi([b],O.args))},p)}function Nh(u,f,p){var b=u.length;if(b<2)return b?ea(u[0]):[];for(var O=-1,M=Y(b);++O<b;)for(var L=u[O],j=-1;++j<b;)j!=O&&(M[O]=$s(M[O]||L,u[j],f,p));return ea(Mr(M,1),f,p)}function dx(u,f,p){for(var b=-1,O=u.length,M=f.length,L={};++b<O;){var j=b<M?f[b]:r;p(L,u[b],j)}return L}function Fh(u){return dr(u)?u:[]}function kh(u){return typeof u=="function"?u:rn}function ta(u,f){return Ye(u)?u:Vh(u,f)?[u]:qx(Pt(u))}var NF=at;function ra(u,f,p){var b=u.length;return p=p===r?b:p,!f&&p>=b?u:Mn(u,f,p)}var hx=wN||function(u){return Dr.clearTimeout(u)};function px(u,f){if(f)return u.slice();var p=u.length,b=N_?N_(p):new u.constructor(p);return u.copy(b),b}function jh(u){var f=new u.constructor(u.byteLength);return new vl(f).set(new vl(u)),f}function FF(u,f){var p=f?jh(u.buffer):u.buffer;return new u.constructor(p,u.byteOffset,u.byteLength)}function kF(u){var f=new u.constructor(u.source,it.exec(u));return f.lastIndex=u.lastIndex,f}function jF(u){return ks?Ut(ks.call(u)):{}}function gx(u,f){var p=f?jh(u.buffer):u.buffer;return new u.constructor(p,u.byteOffset,u.length)}function mx(u,f){if(u!==f){var p=u!==r,b=u===null,O=u===u,M=vn(u),L=f!==r,j=f===null,H=f===f,re=vn(f);if(!j&&!re&&!M&&u>f||M&&L&&H&&!j&&!re||b&&L&&H||!p&&H||!O)return 1;if(!b&&!M&&!re&&u<f||re&&p&&O&&!b&&!M||j&&p&&O||!L&&O||!H)return-1}return 0}function $F(u,f,p){for(var b=-1,O=u.criteria,M=f.criteria,L=O.length,j=p.length;++b<L;){var H=mx(O[b],M[b]);if(H){if(b>=j)return H;var re=p[b];return H*(re=="desc"?-1:1)}}return u.index-f.index}function vx(u,f,p,b){for(var O=-1,M=u.length,L=p.length,j=-1,H=f.length,re=xr(M-L,0),ne=Y(H+re),oe=!b;++j<H;)ne[j]=f[j];for(;++O<L;)(oe||O<M)&&(ne[p[O]]=u[O]);for(;re--;)ne[j++]=u[O++];return ne}function yx(u,f,p,b){for(var O=-1,M=u.length,L=-1,j=p.length,H=-1,re=f.length,ne=xr(M-j,0),oe=Y(ne+re),ye=!b;++O<ne;)oe[O]=u[O];for(var Pe=O;++H<re;)oe[Pe+H]=f[H];for(;++L<j;)(ye||O<M)&&(oe[Pe+p[L]]=u[O++]);return oe}function Qr(u,f){var p=-1,b=u.length;for(f||(f=Y(b));++p<b;)f[p]=u[p];return f}function ii(u,f,p,b){var O=!p;p||(p={});for(var M=-1,L=f.length;++M<L;){var j=f[M],H=b?b(p[j],u[j],j,p,u):r;H===r&&(H=u[j]),O?ri(p,j,H):js(p,j,H)}return p}function UF(u,f){return ii(u,zh(u),f)}function qF(u,f){return ii(u,Dx(u),f)}function Ml(u,f){return function(p,b){var O=Ye(p)?VL:lF,M=f?f():{};return O(p,u,He(b,2),M)}}function ko(u){return at(function(f,p){var b=-1,O=p.length,M=O>1?p[O-1]:r,L=O>2?p[2]:r;for(M=u.length>3&&typeof M=="function"?(O--,M):r,L&&Wr(p[0],p[1],L)&&(M=O<3?r:M,O=1),f=Ut(f);++b<O;){var j=p[b];j&&u(f,j,b,M)}return f})}function bx(u,f){return function(p,b){if(p==null)return p;if(!en(p))return u(p,b);for(var O=p.length,M=f?O:-1,L=Ut(p);(f?M--:++M<O)&&b(L[M],M,L)!==!1;);return p}}function _x(u){return function(f,p,b){for(var O=-1,M=Ut(f),L=b(f),j=L.length;j--;){var H=L[u?j:++O];if(p(M[H],H,M)===!1)break}return f}}function HF(u,f,p){var b=f&x,O=Ws(u);function M(){var L=this&&this!==Dr&&this instanceof M?O:u;return L.apply(b?p:this,arguments)}return M}function xx(u){return function(f){f=Pt(f);var p=Io(f)?zn(f):r,b=p?p[0]:f.charAt(0),O=p?ra(p,1).join(""):f.slice(1);return b[u]()+O}}function jo(u){return function(f){return lh(_w(bw(f).replace(ML,"")),u,"")}}function Ws(u){return function(){var f=arguments;switch(f.length){case 0:return new u;case 1:return new u(f[0]);case 2:return new u(f[0],f[1]);case 3:return new u(f[0],f[1],f[2]);case 4:return new u(f[0],f[1],f[2],f[3]);case 5:return new u(f[0],f[1],f[2],f[3],f[4]);case 6:return new u(f[0],f[1],f[2],f[3],f[4],f[5]);case 7:return new u(f[0],f[1],f[2],f[3],f[4],f[5],f[6])}var p=Fo(u.prototype),b=u.apply(p,f);return tr(b)?b:p}}function WF(u,f,p){var b=Ws(u);function O(){for(var M=arguments.length,L=Y(M),j=M,H=$o(O);j--;)L[j]=arguments[j];var re=M<3&&L[0]!==H&&L[M-1]!==H?[]:Zi(L,H);if(M-=re.length,M<p)return Ex(u,f,Pl,O.placeholder,r,L,re,r,r,p-M);var ne=this&&this!==Dr&&this instanceof O?b:u;return hn(ne,this,L)}return O}function wx(u){return function(f,p,b){var O=Ut(f);if(!en(f)){var M=He(p,3);f=Sr(f),p=function(j){return M(O[j],j,O)}}var L=u(f,p,b);return L>-1?O[M?f[L]:L]:r}}function Tx(u){return Ti(function(f){var p=f.length,b=p,O=In.prototype.thru;for(u&&f.reverse();b--;){var M=f[b];if(typeof M!="function")throw new Rn(o);if(O&&!L&&kl(M)=="wrapper")var L=new In([],!0)}for(b=L?b:p;++b<p;){M=f[b];var j=kl(M),H=j=="wrapper"?Wh(M):r;H&&Gh(H[0])&&H[1]==(D|A|S|P)&&!H[4].length&&H[9]==1?L=L[kl(H[0])].apply(L,H[3]):L=M.length==1&&Gh(M)?L[j]():L.thru(M)}return function(){var re=arguments,ne=re[0];if(L&&re.length==1&&Ye(ne))return L.plant(ne).value();for(var oe=0,ye=p?f[oe].apply(this,re):ne;++oe<p;)ye=f[oe].call(this,ye);return ye}})}function Pl(u,f,p,b,O,M,L,j,H,re){var ne=f&D,oe=f&x,ye=f&w,Pe=f&(A|E),We=f&N,et=ye?r:Ws(u);function $e(){for(var dt=arguments.length,yt=Y(dt),yn=dt;yn--;)yt[yn]=arguments[yn];if(Pe)var Br=$o($e),bn=tN(yt,Br);if(b&&(yt=vx(yt,b,O,Pe)),M&&(yt=yx(yt,M,L,Pe)),dt-=bn,Pe&&dt<re){var hr=Zi(yt,Br);return Ex(u,f,Pl,$e.placeholder,p,yt,hr,j,H,re-dt)}var Xn=oe?p:this,Oi=ye?Xn[u]:u;return dt=yt.length,j?yt=l2(yt,j):We&&dt>1&&yt.reverse(),ne&&H<dt&&(yt.length=H),this&&this!==Dr&&this instanceof $e&&(Oi=et||Ws(Oi)),Oi.apply(Xn,yt)}return $e}function Sx(u,f){return function(p,b){return vF(p,u,f(b),{})}}function Ll(u,f){return function(p,b){var O;if(p===r&&b===r)return f;if(p!==r&&(O=p),b!==r){if(O===r)return b;typeof p=="string"||typeof b=="string"?(p=mn(p),b=mn(b)):(p=lx(p),b=lx(b)),O=u(p,b)}return O}}function $h(u){return Ti(function(f){return f=Yt(f,gn(He())),at(function(p){var b=this;return u(f,function(O){return hn(O,b,p)})})})}function Nl(u,f){f=f===r?" ":mn(f);var p=f.length;if(p<2)return p?Mh(f,u):f;var b=Mh(f,xl(u/Do(f)));return Io(f)?ra(zn(b),0,u).join(""):b.slice(0,u)}function BF(u,f,p,b){var O=f&x,M=Ws(u);function L(){for(var j=-1,H=arguments.length,re=-1,ne=b.length,oe=Y(ne+H),ye=this&&this!==Dr&&this instanceof L?M:u;++re<ne;)oe[re]=b[re];for(;H--;)oe[re++]=arguments[++j];return hn(ye,O?p:this,oe)}return L}function Cx(u){return function(f,p,b){return b&&typeof b!="number"&&Wr(f,p,b)&&(p=b=r),f=Ei(f),p===r?(p=f,f=0):p=Ei(p),b=b===r?f<p?1:-1:Ei(b),RF(f,p,b,u)}}function Fl(u){return function(f,p){return typeof f=="string"&&typeof p=="string"||(f=Ln(f),p=Ln(p)),u(f,p)}}function Ex(u,f,p,b,O,M,L,j,H,re){var ne=f&A,oe=ne?L:r,ye=ne?r:L,Pe=ne?M:r,We=ne?r:M;f|=ne?S:T,f&=~(ne?T:S),f&C||(f&=-4);var et=[u,f,O,Pe,oe,We,ye,j,H,re],$e=p.apply(r,et);return Gh(u)&&jx($e,et),$e.placeholder=b,$x($e,u,f)}function Uh(u){var f=_r[u];return function(p,b){if(p=Ln(p),b=b==null?0:Nr(Je(b),292),b&&$_(p)){var O=(Pt(p)+"e").split("e"),M=f(O[0]+"e"+(+O[1]+b));return O=(Pt(M)+"e").split("e"),+(O[0]+"e"+(+O[1]-b))}return f(p)}}var zF=Lo&&1/fl(new Lo([,-0]))[1]==se?function(u){return new Lo(u)}:lp;function Ox(u){return function(f){var p=Fr(f);return p==Be?mh(f):p==z?uN(f):eN(f,u(f))}}function wi(u,f,p,b,O,M,L,j){var H=f&w;if(!H&&typeof u!="function")throw new Rn(o);var re=b?b.length:0;if(re||(f&=-97,b=O=r),L=L===r?L:xr(Je(L),0),j=j===r?j:Je(j),re-=O?O.length:0,f&T){var ne=b,oe=O;b=O=r}var ye=H?r:Wh(u),Pe=[u,f,p,b,O,ne,oe,M,L,j];if(ye&&o2(Pe,ye),u=Pe[0],f=Pe[1],p=Pe[2],b=Pe[3],O=Pe[4],j=Pe[9]=Pe[9]===r?H?0:u.length:xr(Pe[9]-re,0),!j&&f&(A|E)&&(f&=-25),!f||f==x)var We=HF(u,f,p);else f==A||f==E?We=WF(u,f,j):(f==S||f==(x|S))&&!O.length?We=BF(u,f,p,b):We=Pl.apply(r,Pe);var et=ye?sx:jx;return $x(et(We,Pe),u,f)}function Ax(u,f,p,b){return u===r||Kn(u,Po[p])&&!Mt.call(b,p)?f:u}function Rx(u,f,p,b,O,M){return tr(u)&&tr(f)&&(M.set(f,u),Rl(u,f,r,Rx,M),M.delete(f)),u}function VF(u){return Vs(u)?r:u}function Ix(u,f,p,b,O,M){var L=p&_,j=u.length,H=f.length;if(j!=H&&!(L&&H>j))return!1;var re=M.get(u),ne=M.get(f);if(re&&ne)return re==f&&ne==u;var oe=-1,ye=!0,Pe=p&y?new Na:r;for(M.set(u,f),M.set(f,u);++oe<j;){var We=u[oe],et=f[oe];if(b)var $e=L?b(et,We,oe,f,u,M):b(We,et,oe,u,f,M);if($e!==r){if($e)continue;ye=!1;break}if(Pe){if(!ch(f,function(dt,yt){if(!Ms(Pe,yt)&&(We===dt||O(We,dt,p,b,M)))return Pe.push(yt)})){ye=!1;break}}else if(!(We===et||O(We,et,p,b,M))){ye=!1;break}}return M.delete(u),M.delete(f),ye}function GF(u,f,p,b,O,M,L){switch(p){case Ot:if(u.byteLength!=f.byteLength||u.byteOffset!=f.byteOffset)return!1;u=u.buffer,f=f.buffer;case Et:return!(u.byteLength!=f.byteLength||!M(new vl(u),new vl(f)));case he:case ge:case ke:return Kn(+u,+f);case we:return u.name==f.name&&u.message==f.message;case fr:case de:return u==f+"";case Be:var j=mh;case z:var H=b&_;if(j||(j=fl),u.size!=f.size&&!H)return!1;var re=L.get(u);if(re)return re==f;b|=y,L.set(u,f);var ne=Ix(j(u),j(f),b,O,M,L);return L.delete(u),ne;case me:if(ks)return ks.call(u)==ks.call(f)}return!1}function KF(u,f,p,b,O,M){var L=p&_,j=qh(u),H=j.length,re=qh(f),ne=re.length;if(H!=ne&&!L)return!1;for(var oe=H;oe--;){var ye=j[oe];if(!(L?ye in f:Mt.call(f,ye)))return!1}var Pe=M.get(u),We=M.get(f);if(Pe&&We)return Pe==f&&We==u;var et=!0;M.set(u,f),M.set(f,u);for(var $e=L;++oe<H;){ye=j[oe];var dt=u[ye],yt=f[ye];if(b)var yn=L?b(yt,dt,ye,f,u,M):b(dt,yt,ye,u,f,M);if(!(yn===r?dt===yt||O(dt,yt,p,b,M):yn)){et=!1;break}$e||($e=ye=="constructor")}if(et&&!$e){var Br=u.constructor,bn=f.constructor;Br!=bn&&"constructor"in u&&"constructor"in f&&!(typeof Br=="function"&&Br instanceof Br&&typeof bn=="function"&&bn instanceof bn)&&(et=!1)}return M.delete(u),M.delete(f),et}function Ti(u){return Xh(Fx(u,r,zx),u+"")}function qh(u){return Y_(u,Sr,zh)}function Hh(u){return Y_(u,tn,Dx)}var Wh=Tl?function(u){return Tl.get(u)}:lp;function kl(u){for(var f=u.name+"",p=No[f],b=Mt.call(No,f)?p.length:0;b--;){var O=p[b],M=O.func;if(M==null||M==u)return O.name}return f}function $o(u){var f=Mt.call(I,"placeholder")?I:u;return f.placeholder}function He(){var u=I.iteratee||sp;return u=u===sp?Q_:u,arguments.length?u(arguments[0],arguments[1]):u}function jl(u,f){var p=u.__data__;return r2(f)?p[typeof f=="string"?"string":"hash"]:p.map}function Bh(u){for(var f=Sr(u),p=f.length;p--;){var b=f[p],O=u[b];f[p]=[b,O,Lx(O)]}return f}function ja(u,f){var p=aN(u,f);return J_(p)?p:r}function XF(u){var f=Mt.call(u,Pa),p=u[Pa];try{u[Pa]=r;var b=!0}catch{}var O=gl.call(u);return b&&(f?u[Pa]=p:delete u[Pa]),O}var zh=yh?function(u){return u==null?[]:(u=Ut(u),Xi(yh(u),function(f){return k_.call(u,f)}))}:cp,Dx=yh?function(u){for(var f=[];u;)Yi(f,zh(u)),u=yl(u);return f}:cp,Fr=Hr;(bh&&Fr(new bh(new ArrayBuffer(1)))!=Ot||Ls&&Fr(new Ls)!=Be||_h&&Fr(_h.resolve())!=Lr||Lo&&Fr(new Lo)!=z||Ns&&Fr(new Ns)!=Ue)&&(Fr=function(u){var f=Hr(u),p=f==gt?u.constructor:r,b=p?$a(p):"";if(b)switch(b){case DN:return Ot;case MN:return Be;case PN:return Lr;case LN:return z;case NN:return Ue}return f});function YF(u,f,p){for(var b=-1,O=p.length;++b<O;){var M=p[b],L=M.size;switch(M.type){case"drop":u+=L;break;case"dropRight":f-=L;break;case"take":f=Nr(f,u+L);break;case"takeRight":u=xr(u,f-L);break}}return{start:u,end:f}}function ZF(u){var f=u.match(qe);return f?f[1].split(Se):[]}function Mx(u,f,p){f=ta(f,u);for(var b=-1,O=f.length,M=!1;++b<O;){var L=Gn(f[b]);if(!(M=u!=null&&p(u,L)))break;u=u[L]}return M||++b!=O?M:(O=u==null?0:u.length,!!O&&zl(O)&&Si(L,O)&&(Ye(u)||Ua(u)))}function JF(u){var f=u.length,p=new u.constructor(f);return f&&typeof u[0]=="string"&&Mt.call(u,"index")&&(p.index=u.index,p.input=u.input),p}function Px(u){return typeof u.constructor=="function"&&!Bs(u)?Fo(yl(u)):{}}function QF(u,f,p){var b=u.constructor;switch(f){case Et:return jh(u);case he:case ge:return new b(+u);case Ot:return FF(u,p);case Zr:case Ur:case yi:case Ir:case Sn:case Wn:case V:case G:case ut:return gx(u,p);case Be:return new b;case ke:case de:return new b(u);case fr:return kF(u);case z:return new b;case me:return jF(u)}}function e2(u,f){var p=f.length;if(!p)return u;var b=p-1;return f[b]=(p>1?"& ":"")+f[b],f=f.join(p>2?", ":" "),u.replace(Me,`{
|
|
46
|
+
/* [wrapped with `+f+`] */
|
|
47
|
+
`)}function t2(u){return Ye(u)||Ua(u)||!!(j_&&u&&u[j_])}function Si(u,f){var p=typeof u;return f=f??ce,!!f&&(p=="number"||p!="symbol"&&Bn.test(u))&&u>-1&&u%1==0&&u<f}function Wr(u,f,p){if(!tr(p))return!1;var b=typeof f;return(b=="number"?en(p)&&Si(f,p.length):b=="string"&&f in p)?Kn(p[f],u):!1}function Vh(u,f){if(Ye(u))return!1;var p=typeof u;return p=="number"||p=="symbol"||p=="boolean"||u==null||vn(u)?!0:Eo.test(u)||!Co.test(u)||f!=null&&u in Ut(f)}function r2(u){var f=typeof u;return f=="string"||f=="number"||f=="symbol"||f=="boolean"?u!=="__proto__":u===null}function Gh(u){var f=kl(u),p=I[f];if(typeof p!="function"||!(f in pt.prototype))return!1;if(u===p)return!0;var b=Wh(p);return!!b&&u===b[0]}function n2(u){return!!L_&&L_ in u}var i2=hl?Ci:fp;function Bs(u){var f=u&&u.constructor,p=typeof f=="function"&&f.prototype||Po;return u===p}function Lx(u){return u===u&&!tr(u)}function Nx(u,f){return function(p){return p==null?!1:p[u]===f&&(f!==r||u in Ut(p))}}function a2(u){var f=Wl(u,function(b){return p.size===d&&p.clear(),b}),p=f.cache;return f}function o2(u,f){var p=u[1],b=f[1],O=p|b,M=O<(x|w|D),L=b==D&&p==A||b==D&&p==P&&u[7].length<=f[8]||b==(D|P)&&f[7].length<=f[8]&&p==A;if(!(M||L))return u;b&x&&(u[2]=f[2],O|=p&x?0:C);var j=f[3];if(j){var H=u[3];u[3]=H?vx(H,j,f[4]):j,u[4]=H?Zi(u[3],h):f[4]}return j=f[5],j&&(H=u[5],u[5]=H?yx(H,j,f[6]):j,u[6]=H?Zi(u[5],h):f[6]),j=f[7],j&&(u[7]=j),b&D&&(u[8]=u[8]==null?f[8]:Nr(u[8],f[8])),u[9]==null&&(u[9]=f[9]),u[0]=f[0],u[1]=O,u}function s2(u){var f=[];if(u!=null)for(var p in Ut(u))f.push(p);return f}function u2(u){return gl.call(u)}function Fx(u,f,p){return f=xr(f===r?u.length-1:f,0),function(){for(var b=arguments,O=-1,M=xr(b.length-f,0),L=Y(M);++O<M;)L[O]=b[f+O];O=-1;for(var j=Y(f+1);++O<f;)j[O]=b[O];return j[f]=p(L),hn(u,this,j)}}function kx(u,f){return f.length<2?u:ka(u,Mn(f,0,-1))}function l2(u,f){for(var p=u.length,b=Nr(f.length,p),O=Qr(u);b--;){var M=f[b];u[b]=Si(M,p)?O[M]:r}return u}function Kh(u,f){if(!(f==="constructor"&&typeof u[f]=="function")&&f!="__proto__")return u[f]}var jx=Ux(sx),zs=SN||function(u,f){return Dr.setTimeout(u,f)},Xh=Ux(MF);function $x(u,f,p){var b=f+"";return Xh(u,e2(b,c2(ZF(b),p)))}function Ux(u){var f=0,p=0;return function(){var b=AN(),O=te-(b-p);if(p=b,O>0){if(++f>=W)return arguments[0]}else f=0;return u.apply(r,arguments)}}function $l(u,f){var p=-1,b=u.length,O=b-1;for(f=f===r?b:f;++p<f;){var M=Dh(p,O),L=u[M];u[M]=u[p],u[p]=L}return u.length=f,u}var qx=a2(function(u){var f=[];return u.charCodeAt(0)===46&&f.push(""),u.replace(k,function(p,b,O,M){f.push(O?M.replace(Ie,"$1"):b||p)}),f});function Gn(u){if(typeof u=="string"||vn(u))return u;var f=u+"";return f=="0"&&1/u==-se?"-0":f}function $a(u){if(u!=null){try{return pl.call(u)}catch{}try{return u+""}catch{}}return""}function c2(u,f){return pn(be,function(p){var b="_."+p[0];f&p[1]&&!ll(u,b)&&u.push(b)}),u.sort()}function Hx(u){if(u instanceof pt)return u.clone();var f=new In(u.__wrapped__,u.__chain__);return f.__actions__=Qr(u.__actions__),f.__index__=u.__index__,f.__values__=u.__values__,f}function f2(u,f,p){(p?Wr(u,f,p):f===r)?f=1:f=xr(Je(f),0);var b=u==null?0:u.length;if(!b||f<1)return[];for(var O=0,M=0,L=Y(xl(b/f));O<b;)L[M++]=Mn(u,O,O+=f);return L}function d2(u){for(var f=-1,p=u==null?0:u.length,b=0,O=[];++f<p;){var M=u[f];M&&(O[b++]=M)}return O}function h2(){var u=arguments.length;if(!u)return[];for(var f=Y(u-1),p=arguments[0],b=u;b--;)f[b-1]=arguments[b];return Yi(Ye(p)?Qr(p):[p],Mr(f,1))}var p2=at(function(u,f){return dr(u)?$s(u,Mr(f,1,dr,!0)):[]}),g2=at(function(u,f){var p=Pn(f);return dr(p)&&(p=r),dr(u)?$s(u,Mr(f,1,dr,!0),He(p,2)):[]}),m2=at(function(u,f){var p=Pn(f);return dr(p)&&(p=r),dr(u)?$s(u,Mr(f,1,dr,!0),r,p):[]});function v2(u,f,p){var b=u==null?0:u.length;return b?(f=p||f===r?1:Je(f),Mn(u,f<0?0:f,b)):[]}function y2(u,f,p){var b=u==null?0:u.length;return b?(f=p||f===r?1:Je(f),f=b-f,Mn(u,0,f<0?0:f)):[]}function b2(u,f){return u&&u.length?Dl(u,He(f,3),!0,!0):[]}function _2(u,f){return u&&u.length?Dl(u,He(f,3),!0):[]}function x2(u,f,p,b){var O=u==null?0:u.length;return O?(p&&typeof p!="number"&&Wr(u,f,p)&&(p=0,b=O),hF(u,f,p,b)):[]}function Wx(u,f,p){var b=u==null?0:u.length;if(!b)return-1;var O=p==null?0:Je(p);return O<0&&(O=xr(b+O,0)),cl(u,He(f,3),O)}function Bx(u,f,p){var b=u==null?0:u.length;if(!b)return-1;var O=b-1;return p!==r&&(O=Je(p),O=p<0?xr(b+O,0):Nr(O,b-1)),cl(u,He(f,3),O,!0)}function zx(u){var f=u==null?0:u.length;return f?Mr(u,1):[]}function w2(u){var f=u==null?0:u.length;return f?Mr(u,se):[]}function T2(u,f){var p=u==null?0:u.length;return p?(f=f===r?1:Je(f),Mr(u,f)):[]}function S2(u){for(var f=-1,p=u==null?0:u.length,b={};++f<p;){var O=u[f];ri(b,O[0],O[1])}return b}function Vx(u){return u&&u.length?u[0]:r}function C2(u,f,p){var b=u==null?0:u.length;if(!b)return-1;var O=p==null?0:Je(p);return O<0&&(O=xr(b+O,0)),Ro(u,f,O)}function E2(u){var f=u==null?0:u.length;return f?Mn(u,0,-1):[]}var O2=at(function(u){var f=Yt(u,Fh);return f.length&&f[0]===u[0]?Eh(f):[]}),A2=at(function(u){var f=Pn(u),p=Yt(u,Fh);return f===Pn(p)?f=r:p.pop(),p.length&&p[0]===u[0]?Eh(p,He(f,2)):[]}),R2=at(function(u){var f=Pn(u),p=Yt(u,Fh);return f=typeof f=="function"?f:r,f&&p.pop(),p.length&&p[0]===u[0]?Eh(p,r,f):[]});function I2(u,f){return u==null?"":EN.call(u,f)}function Pn(u){var f=u==null?0:u.length;return f?u[f-1]:r}function D2(u,f,p){var b=u==null?0:u.length;if(!b)return-1;var O=b;return p!==r&&(O=Je(p),O=O<0?xr(b+O,0):Nr(O,b-1)),f===f?cN(u,f,O):cl(u,E_,O,!0)}function M2(u,f){return u&&u.length?nx(u,Je(f)):r}var P2=at(Gx);function Gx(u,f){return u&&u.length&&f&&f.length?Ih(u,f):u}function L2(u,f,p){return u&&u.length&&f&&f.length?Ih(u,f,He(p,2)):u}function N2(u,f,p){return u&&u.length&&f&&f.length?Ih(u,f,r,p):u}var F2=Ti(function(u,f){var p=u==null?0:u.length,b=wh(u,f);return ox(u,Yt(f,function(O){return Si(O,p)?+O:O}).sort(mx)),b});function k2(u,f){var p=[];if(!(u&&u.length))return p;var b=-1,O=[],M=u.length;for(f=He(f,3);++b<M;){var L=u[b];f(L,b,u)&&(p.push(L),O.push(b))}return ox(u,O),p}function Yh(u){return u==null?u:IN.call(u)}function j2(u,f,p){var b=u==null?0:u.length;return b?(p&&typeof p!="number"&&Wr(u,f,p)?(f=0,p=b):(f=f==null?0:Je(f),p=p===r?b:Je(p)),Mn(u,f,p)):[]}function $2(u,f){return Il(u,f)}function U2(u,f,p){return Ph(u,f,He(p,2))}function q2(u,f){var p=u==null?0:u.length;if(p){var b=Il(u,f);if(b<p&&Kn(u[b],f))return b}return-1}function H2(u,f){return Il(u,f,!0)}function W2(u,f,p){return Ph(u,f,He(p,2),!0)}function B2(u,f){var p=u==null?0:u.length;if(p){var b=Il(u,f,!0)-1;if(Kn(u[b],f))return b}return-1}function z2(u){return u&&u.length?ux(u):[]}function V2(u,f){return u&&u.length?ux(u,He(f,2)):[]}function G2(u){var f=u==null?0:u.length;return f?Mn(u,1,f):[]}function K2(u,f,p){return u&&u.length?(f=p||f===r?1:Je(f),Mn(u,0,f<0?0:f)):[]}function X2(u,f,p){var b=u==null?0:u.length;return b?(f=p||f===r?1:Je(f),f=b-f,Mn(u,f<0?0:f,b)):[]}function Y2(u,f){return u&&u.length?Dl(u,He(f,3),!1,!0):[]}function Z2(u,f){return u&&u.length?Dl(u,He(f,3)):[]}var J2=at(function(u){return ea(Mr(u,1,dr,!0))}),Q2=at(function(u){var f=Pn(u);return dr(f)&&(f=r),ea(Mr(u,1,dr,!0),He(f,2))}),ek=at(function(u){var f=Pn(u);return f=typeof f=="function"?f:r,ea(Mr(u,1,dr,!0),r,f)});function tk(u){return u&&u.length?ea(u):[]}function rk(u,f){return u&&u.length?ea(u,He(f,2)):[]}function nk(u,f){return f=typeof f=="function"?f:r,u&&u.length?ea(u,r,f):[]}function Zh(u){if(!(u&&u.length))return[];var f=0;return u=Xi(u,function(p){if(dr(p))return f=xr(p.length,f),!0}),ph(f,function(p){return Yt(u,fh(p))})}function Kx(u,f){if(!(u&&u.length))return[];var p=Zh(u);return f==null?p:Yt(p,function(b){return hn(f,r,b)})}var ik=at(function(u,f){return dr(u)?$s(u,f):[]}),ak=at(function(u){return Nh(Xi(u,dr))}),ok=at(function(u){var f=Pn(u);return dr(f)&&(f=r),Nh(Xi(u,dr),He(f,2))}),sk=at(function(u){var f=Pn(u);return f=typeof f=="function"?f:r,Nh(Xi(u,dr),r,f)}),uk=at(Zh);function lk(u,f){return dx(u||[],f||[],js)}function ck(u,f){return dx(u||[],f||[],Hs)}var fk=at(function(u){var f=u.length,p=f>1?u[f-1]:r;return p=typeof p=="function"?(u.pop(),p):r,Kx(u,p)});function Xx(u){var f=I(u);return f.__chain__=!0,f}function dk(u,f){return f(u),u}function Ul(u,f){return f(u)}var hk=Ti(function(u){var f=u.length,p=f?u[0]:0,b=this.__wrapped__,O=function(M){return wh(M,u)};return f>1||this.__actions__.length||!(b instanceof pt)||!Si(p)?this.thru(O):(b=b.slice(p,+p+(f?1:0)),b.__actions__.push({func:Ul,args:[O],thisArg:r}),new In(b,this.__chain__).thru(function(M){return f&&!M.length&&M.push(r),M}))});function pk(){return Xx(this)}function gk(){return new In(this.value(),this.__chain__)}function mk(){this.__values__===r&&(this.__values__=lw(this.value()));var u=this.__index__>=this.__values__.length,f=u?r:this.__values__[this.__index__++];return{done:u,value:f}}function vk(){return this}function yk(u){for(var f,p=this;p instanceof Cl;){var b=Hx(p);b.__index__=0,b.__values__=r,f?O.__wrapped__=b:f=b;var O=b;p=p.__wrapped__}return O.__wrapped__=u,f}function bk(){var u=this.__wrapped__;if(u instanceof pt){var f=u;return this.__actions__.length&&(f=new pt(this)),f=f.reverse(),f.__actions__.push({func:Ul,args:[Yh],thisArg:r}),new In(f,this.__chain__)}return this.thru(Yh)}function _k(){return fx(this.__wrapped__,this.__actions__)}var xk=Ml(function(u,f,p){Mt.call(u,p)?++u[p]:ri(u,p,1)});function wk(u,f,p){var b=Ye(u)?S_:dF;return p&&Wr(u,f,p)&&(f=r),b(u,He(f,3))}function Tk(u,f){var p=Ye(u)?Xi:K_;return p(u,He(f,3))}var Sk=wx(Wx),Ck=wx(Bx);function Ek(u,f){return Mr(ql(u,f),1)}function Ok(u,f){return Mr(ql(u,f),se)}function Ak(u,f,p){return p=p===r?1:Je(p),Mr(ql(u,f),p)}function Yx(u,f){var p=Ye(u)?pn:Qi;return p(u,He(f,3))}function Zx(u,f){var p=Ye(u)?GL:G_;return p(u,He(f,3))}var Rk=Ml(function(u,f,p){Mt.call(u,p)?u[p].push(f):ri(u,p,[f])});function Ik(u,f,p,b){u=en(u)?u:qo(u),p=p&&!b?Je(p):0;var O=u.length;return p<0&&(p=xr(O+p,0)),Vl(u)?p<=O&&u.indexOf(f,p)>-1:!!O&&Ro(u,f,p)>-1}var Dk=at(function(u,f,p){var b=-1,O=typeof f=="function",M=en(u)?Y(u.length):[];return Qi(u,function(L){M[++b]=O?hn(f,L,p):Us(L,f,p)}),M}),Mk=Ml(function(u,f,p){ri(u,p,f)});function ql(u,f){var p=Ye(u)?Yt:ex;return p(u,He(f,3))}function Pk(u,f,p,b){return u==null?[]:(Ye(f)||(f=f==null?[]:[f]),p=b?r:p,Ye(p)||(p=p==null?[]:[p]),ix(u,f,p))}var Lk=Ml(function(u,f,p){u[p?0:1].push(f)},function(){return[[],[]]});function Nk(u,f,p){var b=Ye(u)?lh:A_,O=arguments.length<3;return b(u,He(f,4),p,O,Qi)}function Fk(u,f,p){var b=Ye(u)?KL:A_,O=arguments.length<3;return b(u,He(f,4),p,O,G_)}function kk(u,f){var p=Ye(u)?Xi:K_;return p(u,Bl(He(f,3)))}function jk(u){var f=Ye(u)?W_:IF;return f(u)}function $k(u,f,p){(p?Wr(u,f,p):f===r)?f=1:f=Je(f);var b=Ye(u)?sF:DF;return b(u,f)}function Uk(u){var f=Ye(u)?uF:PF;return f(u)}function qk(u){if(u==null)return 0;if(en(u))return Vl(u)?Do(u):u.length;var f=Fr(u);return f==Be||f==z?u.size:Ah(u).length}function Hk(u,f,p){var b=Ye(u)?ch:LF;return p&&Wr(u,f,p)&&(f=r),b(u,He(f,3))}var Wk=at(function(u,f){if(u==null)return[];var p=f.length;return p>1&&Wr(u,f[0],f[1])?f=[]:p>2&&Wr(f[0],f[1],f[2])&&(f=[f[0]]),ix(u,Mr(f,1),[])}),Hl=TN||function(){return Dr.Date.now()};function Bk(u,f){if(typeof f!="function")throw new Rn(o);return u=Je(u),function(){if(--u<1)return f.apply(this,arguments)}}function Jx(u,f,p){return f=p?r:f,f=u&&f==null?u.length:f,wi(u,D,r,r,r,r,f)}function Qx(u,f){var p;if(typeof f!="function")throw new Rn(o);return u=Je(u),function(){return--u>0&&(p=f.apply(this,arguments)),u<=1&&(f=r),p}}var Jh=at(function(u,f,p){var b=x;if(p.length){var O=Zi(p,$o(Jh));b|=S}return wi(u,b,f,p,O)}),ew=at(function(u,f,p){var b=x|w;if(p.length){var O=Zi(p,$o(ew));b|=S}return wi(f,b,u,p,O)});function tw(u,f,p){f=p?r:f;var b=wi(u,A,r,r,r,r,r,f);return b.placeholder=tw.placeholder,b}function rw(u,f,p){f=p?r:f;var b=wi(u,E,r,r,r,r,r,f);return b.placeholder=rw.placeholder,b}function nw(u,f,p){var b,O,M,L,j,H,re=0,ne=!1,oe=!1,ye=!0;if(typeof u!="function")throw new Rn(o);f=Ln(f)||0,tr(p)&&(ne=!!p.leading,oe="maxWait"in p,M=oe?xr(Ln(p.maxWait)||0,f):M,ye="trailing"in p?!!p.trailing:ye);function Pe(hr){var Xn=b,Oi=O;return b=O=r,re=hr,L=u.apply(Oi,Xn),L}function We(hr){return re=hr,j=zs(dt,f),ne?Pe(hr):L}function et(hr){var Xn=hr-H,Oi=hr-re,Tw=f-Xn;return oe?Nr(Tw,M-Oi):Tw}function $e(hr){var Xn=hr-H,Oi=hr-re;return H===r||Xn>=f||Xn<0||oe&&Oi>=M}function dt(){var hr=Hl();if($e(hr))return yt(hr);j=zs(dt,et(hr))}function yt(hr){return j=r,ye&&b?Pe(hr):(b=O=r,L)}function yn(){j!==r&&hx(j),re=0,b=H=O=j=r}function Br(){return j===r?L:yt(Hl())}function bn(){var hr=Hl(),Xn=$e(hr);if(b=arguments,O=this,H=hr,Xn){if(j===r)return We(H);if(oe)return hx(j),j=zs(dt,f),Pe(H)}return j===r&&(j=zs(dt,f)),L}return bn.cancel=yn,bn.flush=Br,bn}var zk=at(function(u,f){return V_(u,1,f)}),Vk=at(function(u,f,p){return V_(u,Ln(f)||0,p)});function Gk(u){return wi(u,N)}function Wl(u,f){if(typeof u!="function"||f!=null&&typeof f!="function")throw new Rn(o);var p=function(){var b=arguments,O=f?f.apply(this,b):b[0],M=p.cache;if(M.has(O))return M.get(O);var L=u.apply(this,b);return p.cache=M.set(O,L)||M,L};return p.cache=new(Wl.Cache||xi),p}Wl.Cache=xi;function Bl(u){if(typeof u!="function")throw new Rn(o);return function(){var f=arguments;switch(f.length){case 0:return!u.call(this);case 1:return!u.call(this,f[0]);case 2:return!u.call(this,f[0],f[1]);case 3:return!u.call(this,f[0],f[1],f[2])}return!u.apply(this,f)}}function Kk(u){return Qx(2,u)}var Xk=NF(function(u,f){f=f.length==1&&Ye(f[0])?Yt(f[0],gn(He())):Yt(Mr(f,1),gn(He()));var p=f.length;return at(function(b){for(var O=-1,M=Nr(b.length,p);++O<M;)b[O]=f[O].call(this,b[O]);return hn(u,this,b)})}),Qh=at(function(u,f){var p=Zi(f,$o(Qh));return wi(u,S,r,f,p)}),iw=at(function(u,f){var p=Zi(f,$o(iw));return wi(u,T,r,f,p)}),Yk=Ti(function(u,f){return wi(u,P,r,r,r,f)});function Zk(u,f){if(typeof u!="function")throw new Rn(o);return f=f===r?f:Je(f),at(u,f)}function Jk(u,f){if(typeof u!="function")throw new Rn(o);return f=f==null?0:xr(Je(f),0),at(function(p){var b=p[f],O=ra(p,0,f);return b&&Yi(O,b),hn(u,this,O)})}function Qk(u,f,p){var b=!0,O=!0;if(typeof u!="function")throw new Rn(o);return tr(p)&&(b="leading"in p?!!p.leading:b,O="trailing"in p?!!p.trailing:O),nw(u,f,{leading:b,maxWait:f,trailing:O})}function ej(u){return Jx(u,1)}function tj(u,f){return Qh(kh(f),u)}function rj(){if(!arguments.length)return[];var u=arguments[0];return Ye(u)?u:[u]}function nj(u){return Dn(u,v)}function ij(u,f){return f=typeof f=="function"?f:r,Dn(u,v,f)}function aj(u){return Dn(u,g|v)}function oj(u,f){return f=typeof f=="function"?f:r,Dn(u,g|v,f)}function sj(u,f){return f==null||z_(u,f,Sr(f))}function Kn(u,f){return u===f||u!==u&&f!==f}var uj=Fl(Ch),lj=Fl(function(u,f){return u>=f}),Ua=Z_((function(){return arguments})())?Z_:function(u){return or(u)&&Mt.call(u,"callee")&&!k_.call(u,"callee")},Ye=Y.isArray,cj=y_?gn(y_):yF;function en(u){return u!=null&&zl(u.length)&&!Ci(u)}function dr(u){return or(u)&&en(u)}function fj(u){return u===!0||u===!1||or(u)&&Hr(u)==he}var na=CN||fp,dj=b_?gn(b_):bF;function hj(u){return or(u)&&u.nodeType===1&&!Vs(u)}function pj(u){if(u==null)return!0;if(en(u)&&(Ye(u)||typeof u=="string"||typeof u.splice=="function"||na(u)||Uo(u)||Ua(u)))return!u.length;var f=Fr(u);if(f==Be||f==z)return!u.size;if(Bs(u))return!Ah(u).length;for(var p in u)if(Mt.call(u,p))return!1;return!0}function gj(u,f){return qs(u,f)}function mj(u,f,p){p=typeof p=="function"?p:r;var b=p?p(u,f):r;return b===r?qs(u,f,r,p):!!b}function ep(u){if(!or(u))return!1;var f=Hr(u);return f==we||f==Ne||typeof u.message=="string"&&typeof u.name=="string"&&!Vs(u)}function vj(u){return typeof u=="number"&&$_(u)}function Ci(u){if(!tr(u))return!1;var f=Hr(u);return f==ve||f==Fe||f==Ae||f==Yr}function aw(u){return typeof u=="number"&&u==Je(u)}function zl(u){return typeof u=="number"&&u>-1&&u%1==0&&u<=ce}function tr(u){var f=typeof u;return u!=null&&(f=="object"||f=="function")}function or(u){return u!=null&&typeof u=="object"}var ow=__?gn(__):xF;function yj(u,f){return u===f||Oh(u,f,Bh(f))}function bj(u,f,p){return p=typeof p=="function"?p:r,Oh(u,f,Bh(f),p)}function _j(u){return sw(u)&&u!=+u}function xj(u){if(i2(u))throw new Ge(a);return J_(u)}function wj(u){return u===null}function Tj(u){return u==null}function sw(u){return typeof u=="number"||or(u)&&Hr(u)==ke}function Vs(u){if(!or(u)||Hr(u)!=gt)return!1;var f=yl(u);if(f===null)return!0;var p=Mt.call(f,"constructor")&&f.constructor;return typeof p=="function"&&p instanceof p&&pl.call(p)==bN}var tp=x_?gn(x_):wF;function Sj(u){return aw(u)&&u>=-ce&&u<=ce}var uw=w_?gn(w_):TF;function Vl(u){return typeof u=="string"||!Ye(u)&&or(u)&&Hr(u)==de}function vn(u){return typeof u=="symbol"||or(u)&&Hr(u)==me}var Uo=T_?gn(T_):SF;function Cj(u){return u===r}function Ej(u){return or(u)&&Fr(u)==Ue}function Oj(u){return or(u)&&Hr(u)==nt}var Aj=Fl(Rh),Rj=Fl(function(u,f){return u<=f});function lw(u){if(!u)return[];if(en(u))return Vl(u)?zn(u):Qr(u);if(Ps&&u[Ps])return sN(u[Ps]());var f=Fr(u),p=f==Be?mh:f==z?fl:qo;return p(u)}function Ei(u){if(!u)return u===0?u:0;if(u=Ln(u),u===se||u===-se){var f=u<0?-1:1;return f*Q}return u===u?u:0}function Je(u){var f=Ei(u),p=f%1;return f===f?p?f-p:f:0}function cw(u){return u?Fa(Je(u),0,X):0}function Ln(u){if(typeof u=="number")return u;if(vn(u))return $;if(tr(u)){var f=typeof u.valueOf=="function"?u.valueOf():u;u=tr(f)?f+"":f}if(typeof u!="string")return u===0?u:+u;u=R_(u);var p=mt.test(u);return p||Ht.test(u)?BL(u.slice(2),p?2:8):er.test(u)?$:+u}function fw(u){return ii(u,tn(u))}function Ij(u){return u?Fa(Je(u),-ce,ce):u===0?u:0}function Pt(u){return u==null?"":mn(u)}var Dj=ko(function(u,f){if(Bs(f)||en(f)){ii(f,Sr(f),u);return}for(var p in f)Mt.call(f,p)&&js(u,p,f[p])}),dw=ko(function(u,f){ii(f,tn(f),u)}),hw=ko(function(u,f,p,b){ii(f,tn(f),u,b)}),rp=ko(function(u,f,p,b){ii(f,Sr(f),u,b)}),Mj=Ti(wh);function Pj(u,f){var p=Fo(u);return f==null?p:B_(p,f)}var Lj=at(function(u,f){u=Ut(u);var p=-1,b=f.length,O=b>2?f[2]:r;for(O&&Wr(f[0],f[1],O)&&(b=1);++p<b;)for(var M=f[p],L=tn(M),j=-1,H=L.length;++j<H;){var re=L[j],ne=u[re];(ne===r||Kn(ne,Po[re])&&!Mt.call(u,re))&&(u[re]=M[re])}return u}),Nj=at(function(u){return u.push(r,Rx),hn(pw,r,u)});function Fj(u,f){return C_(u,He(f,3),ni)}function kj(u,f){return C_(u,He(f,3),Sh)}function jj(u,f){return u==null?u:Th(u,He(f,3),tn)}function $j(u,f){return u==null?u:X_(u,He(f,3),tn)}function Uj(u,f){return u&&ni(u,He(f,3))}function qj(u,f){return u&&Sh(u,He(f,3))}function Hj(u){return u==null?[]:Al(u,Sr(u))}function Wj(u){return u==null?[]:Al(u,tn(u))}function np(u,f,p){var b=u==null?r:ka(u,f);return b===r?p:b}function Bj(u,f){return u!=null&&Mx(u,f,pF)}function ip(u,f){return u!=null&&Mx(u,f,gF)}var zj=Sx(function(u,f,p){f!=null&&typeof f.toString!="function"&&(f=gl.call(f)),u[f]=p},op(rn)),Vj=Sx(function(u,f,p){f!=null&&typeof f.toString!="function"&&(f=gl.call(f)),Mt.call(u,f)?u[f].push(p):u[f]=[p]},He),Gj=at(Us);function Sr(u){return en(u)?H_(u):Ah(u)}function tn(u){return en(u)?H_(u,!0):CF(u)}function Kj(u,f){var p={};return f=He(f,3),ni(u,function(b,O,M){ri(p,f(b,O,M),b)}),p}function Xj(u,f){var p={};return f=He(f,3),ni(u,function(b,O,M){ri(p,O,f(b,O,M))}),p}var Yj=ko(function(u,f,p){Rl(u,f,p)}),pw=ko(function(u,f,p,b){Rl(u,f,p,b)}),Zj=Ti(function(u,f){var p={};if(u==null)return p;var b=!1;f=Yt(f,function(M){return M=ta(M,u),b||(b=M.length>1),M}),ii(u,Hh(u),p),b&&(p=Dn(p,g|m|v,VF));for(var O=f.length;O--;)Lh(p,f[O]);return p});function Jj(u,f){return gw(u,Bl(He(f)))}var Qj=Ti(function(u,f){return u==null?{}:OF(u,f)});function gw(u,f){if(u==null)return{};var p=Yt(Hh(u),function(b){return[b]});return f=He(f),ax(u,p,function(b,O){return f(b,O[0])})}function e$(u,f,p){f=ta(f,u);var b=-1,O=f.length;for(O||(O=1,u=r);++b<O;){var M=u==null?r:u[Gn(f[b])];M===r&&(b=O,M=p),u=Ci(M)?M.call(u):M}return u}function t$(u,f,p){return u==null?u:Hs(u,f,p)}function r$(u,f,p,b){return b=typeof b=="function"?b:r,u==null?u:Hs(u,f,p,b)}var mw=Ox(Sr),vw=Ox(tn);function n$(u,f,p){var b=Ye(u),O=b||na(u)||Uo(u);if(f=He(f,4),p==null){var M=u&&u.constructor;O?p=b?new M:[]:tr(u)?p=Ci(M)?Fo(yl(u)):{}:p={}}return(O?pn:ni)(u,function(L,j,H){return f(p,L,j,H)}),p}function i$(u,f){return u==null?!0:Lh(u,f)}function a$(u,f,p){return u==null?u:cx(u,f,kh(p))}function o$(u,f,p,b){return b=typeof b=="function"?b:r,u==null?u:cx(u,f,kh(p),b)}function qo(u){return u==null?[]:gh(u,Sr(u))}function s$(u){return u==null?[]:gh(u,tn(u))}function u$(u,f,p){return p===r&&(p=f,f=r),p!==r&&(p=Ln(p),p=p===p?p:0),f!==r&&(f=Ln(f),f=f===f?f:0),Fa(Ln(u),f,p)}function l$(u,f,p){return f=Ei(f),p===r?(p=f,f=0):p=Ei(p),u=Ln(u),mF(u,f,p)}function c$(u,f,p){if(p&&typeof p!="boolean"&&Wr(u,f,p)&&(f=p=r),p===r&&(typeof f=="boolean"?(p=f,f=r):typeof u=="boolean"&&(p=u,u=r)),u===r&&f===r?(u=0,f=1):(u=Ei(u),f===r?(f=u,u=0):f=Ei(f)),u>f){var b=u;u=f,f=b}if(p||u%1||f%1){var O=U_();return Nr(u+O*(f-u+WL("1e-"+((O+"").length-1))),f)}return Dh(u,f)}var f$=jo(function(u,f,p){return f=f.toLowerCase(),u+(p?yw(f):f)});function yw(u){return ap(Pt(u).toLowerCase())}function bw(u){return u=Pt(u),u&&u.replace(Aa,rN).replace(PL,"")}function d$(u,f,p){u=Pt(u),f=mn(f);var b=u.length;p=p===r?b:Fa(Je(p),0,b);var O=p;return p-=f.length,p>=0&&u.slice(p,O)==f}function h$(u){return u=Pt(u),u&&En.test(u)?u.replace(Cn,nN):u}function p$(u){return u=Pt(u),u&&K.test(u)?u.replace(q,"\\$&"):u}var g$=jo(function(u,f,p){return u+(p?"-":"")+f.toLowerCase()}),m$=jo(function(u,f,p){return u+(p?" ":"")+f.toLowerCase()}),v$=xx("toLowerCase");function y$(u,f,p){u=Pt(u),f=Je(f);var b=f?Do(u):0;if(!f||b>=f)return u;var O=(f-b)/2;return Nl(wl(O),p)+u+Nl(xl(O),p)}function b$(u,f,p){u=Pt(u),f=Je(f);var b=f?Do(u):0;return f&&b<f?u+Nl(f-b,p):u}function _$(u,f,p){u=Pt(u),f=Je(f);var b=f?Do(u):0;return f&&b<f?Nl(f-b,p)+u:u}function x$(u,f,p){return p||f==null?f=0:f&&(f=+f),RN(Pt(u).replace(ae,""),f||0)}function w$(u,f,p){return(p?Wr(u,f,p):f===r)?f=1:f=Je(f),Mh(Pt(u),f)}function T$(){var u=arguments,f=Pt(u[0]);return u.length<3?f:f.replace(u[1],u[2])}var S$=jo(function(u,f,p){return u+(p?"_":"")+f.toLowerCase()});function C$(u,f,p){return p&&typeof p!="number"&&Wr(u,f,p)&&(f=p=r),p=p===r?X:p>>>0,p?(u=Pt(u),u&&(typeof f=="string"||f!=null&&!tp(f))&&(f=mn(f),!f&&Io(u))?ra(zn(u),0,p):u.split(f,p)):[]}var E$=jo(function(u,f,p){return u+(p?" ":"")+ap(f)});function O$(u,f,p){return u=Pt(u),p=p==null?0:Fa(Je(p),0,u.length),f=mn(f),u.slice(p,p+f.length)==f}function A$(u,f,p){var b=I.templateSettings;p&&Wr(u,f,p)&&(f=r),u=Pt(u),f=rp({},f,b,Ax);var O=rp({},f.imports,b.imports,Ax),M=Sr(O),L=gh(O,M);pn(M,function($e){if(Te.test($e))throw new Ge(l)});var j,H,re=0,ne=f.interpolate||Jr,oe="__p += '",ye=vh((f.escape||Jr).source+"|"+ne.source+"|"+(ne===br?ze:Jr).source+"|"+(f.evaluate||Jr).source+"|$","g"),Pe="//# sourceURL="+(Mt.call(f,"sourceURL")?(f.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++jL+"]")+`
|
|
48
|
+
`;u.replace(ye,function($e,dt,yt,yn,Br,bn){return yt||(yt=yn),oe+=u.slice(re,bn).replace(On,iN),dt&&(j=!0,oe+=`' +
|
|
49
|
+
__e(`+dt+`) +
|
|
50
|
+
'`),Br&&(H=!0,oe+=`';
|
|
51
|
+
`+Br+`;
|
|
52
|
+
__p += '`),yt&&(oe+=`' +
|
|
53
|
+
((__t = (`+yt+`)) == null ? '' : __t) +
|
|
54
|
+
'`),re=bn+$e.length,$e}),oe+=`';
|
|
55
|
+
`;var We=Mt.call(f,"variable")&&f.variable;if(!We)oe=`with (obj) {
|
|
56
|
+
`+oe+`
|
|
57
|
+
}
|
|
58
|
+
`;else if(Te.test(We))throw new Ge(s);oe=(H?oe.replace(Tt,""):oe).replace(Dt,"$1").replace(Ve,"$1;"),oe="function("+(We||"obj")+`) {
|
|
59
|
+
`+(We?"":`obj || (obj = {});
|
|
60
|
+
`)+"var __t, __p = ''"+(j?", __e = _.escape":"")+(H?`, __j = Array.prototype.join;
|
|
61
|
+
function print() { __p += __j.call(arguments, '') }
|
|
62
|
+
`:`;
|
|
63
|
+
`)+oe+`return __p
|
|
64
|
+
}`;var et=xw(function(){return Rt(M,Pe+"return "+oe).apply(r,L)});if(et.source=oe,ep(et))throw et;return et}function R$(u){return Pt(u).toLowerCase()}function I$(u){return Pt(u).toUpperCase()}function D$(u,f,p){if(u=Pt(u),u&&(p||f===r))return R_(u);if(!u||!(f=mn(f)))return u;var b=zn(u),O=zn(f),M=I_(b,O),L=D_(b,O)+1;return ra(b,M,L).join("")}function M$(u,f,p){if(u=Pt(u),u&&(p||f===r))return u.slice(0,P_(u)+1);if(!u||!(f=mn(f)))return u;var b=zn(u),O=D_(b,zn(f))+1;return ra(b,0,O).join("")}function P$(u,f,p){if(u=Pt(u),u&&(p||f===r))return u.replace(ae,"");if(!u||!(f=mn(f)))return u;var b=zn(u),O=I_(b,zn(f));return ra(b,O).join("")}function L$(u,f){var p=F,b=B;if(tr(f)){var O="separator"in f?f.separator:O;p="length"in f?Je(f.length):p,b="omission"in f?mn(f.omission):b}u=Pt(u);var M=u.length;if(Io(u)){var L=zn(u);M=L.length}if(p>=M)return u;var j=p-Do(b);if(j<1)return b;var H=L?ra(L,0,j).join(""):u.slice(0,j);if(O===r)return H+b;if(L&&(j+=H.length-j),tp(O)){if(u.slice(j).search(O)){var re,ne=H;for(O.global||(O=vh(O.source,Pt(it.exec(O))+"g")),O.lastIndex=0;re=O.exec(ne);)var oe=re.index;H=H.slice(0,oe===r?j:oe)}}else if(u.indexOf(mn(O),j)!=j){var ye=H.lastIndexOf(O);ye>-1&&(H=H.slice(0,ye))}return H+b}function N$(u){return u=Pt(u),u&&Tr.test(u)?u.replace(qr,fN):u}var F$=jo(function(u,f,p){return u+(p?" ":"")+f.toUpperCase()}),ap=xx("toUpperCase");function _w(u,f,p){return u=Pt(u),f=p?r:f,f===r?oN(u)?pN(u):ZL(u):u.match(f)||[]}var xw=at(function(u,f){try{return hn(u,r,f)}catch(p){return ep(p)?p:new Ge(p)}}),k$=Ti(function(u,f){return pn(f,function(p){p=Gn(p),ri(u,p,Jh(u[p],u))}),u});function j$(u){var f=u==null?0:u.length,p=He();return u=f?Yt(u,function(b){if(typeof b[1]!="function")throw new Rn(o);return[p(b[0]),b[1]]}):[],at(function(b){for(var O=-1;++O<f;){var M=u[O];if(hn(M[0],this,b))return hn(M[1],this,b)}})}function $$(u){return fF(Dn(u,g))}function op(u){return function(){return u}}function U$(u,f){return u==null||u!==u?f:u}var q$=Tx(),H$=Tx(!0);function rn(u){return u}function sp(u){return Q_(typeof u=="function"?u:Dn(u,g))}function W$(u){return tx(Dn(u,g))}function B$(u,f){return rx(u,Dn(f,g))}var z$=at(function(u,f){return function(p){return Us(p,u,f)}}),V$=at(function(u,f){return function(p){return Us(u,p,f)}});function up(u,f,p){var b=Sr(f),O=Al(f,b);p==null&&!(tr(f)&&(O.length||!b.length))&&(p=f,f=u,u=this,O=Al(f,Sr(f)));var M=!(tr(p)&&"chain"in p)||!!p.chain,L=Ci(u);return pn(O,function(j){var H=f[j];u[j]=H,L&&(u.prototype[j]=function(){var re=this.__chain__;if(M||re){var ne=u(this.__wrapped__),oe=ne.__actions__=Qr(this.__actions__);return oe.push({func:H,args:arguments,thisArg:u}),ne.__chain__=re,ne}return H.apply(u,Yi([this.value()],arguments))})}),u}function G$(){return Dr._===this&&(Dr._=_N),this}function lp(){}function K$(u){return u=Je(u),at(function(f){return nx(f,u)})}var X$=$h(Yt),Y$=$h(S_),Z$=$h(ch);function ww(u){return Vh(u)?fh(Gn(u)):AF(u)}function J$(u){return function(f){return u==null?r:ka(u,f)}}var Q$=Cx(),eU=Cx(!0);function cp(){return[]}function fp(){return!1}function tU(){return{}}function rU(){return""}function nU(){return!0}function iU(u,f){if(u=Je(u),u<1||u>ce)return[];var p=X,b=Nr(u,X);f=He(f),u-=X;for(var O=ph(b,f);++p<u;)f(p);return O}function aU(u){return Ye(u)?Yt(u,Gn):vn(u)?[u]:Qr(qx(Pt(u)))}function oU(u){var f=++yN;return Pt(u)+f}var sU=Ll(function(u,f){return u+f},0),uU=Uh("ceil"),lU=Ll(function(u,f){return u/f},1),cU=Uh("floor");function fU(u){return u&&u.length?Ol(u,rn,Ch):r}function dU(u,f){return u&&u.length?Ol(u,He(f,2),Ch):r}function hU(u){return O_(u,rn)}function pU(u,f){return O_(u,He(f,2))}function gU(u){return u&&u.length?Ol(u,rn,Rh):r}function mU(u,f){return u&&u.length?Ol(u,He(f,2),Rh):r}var vU=Ll(function(u,f){return u*f},1),yU=Uh("round"),bU=Ll(function(u,f){return u-f},0);function _U(u){return u&&u.length?hh(u,rn):0}function xU(u,f){return u&&u.length?hh(u,He(f,2)):0}return I.after=Bk,I.ary=Jx,I.assign=Dj,I.assignIn=dw,I.assignInWith=hw,I.assignWith=rp,I.at=Mj,I.before=Qx,I.bind=Jh,I.bindAll=k$,I.bindKey=ew,I.castArray=rj,I.chain=Xx,I.chunk=f2,I.compact=d2,I.concat=h2,I.cond=j$,I.conforms=$$,I.constant=op,I.countBy=xk,I.create=Pj,I.curry=tw,I.curryRight=rw,I.debounce=nw,I.defaults=Lj,I.defaultsDeep=Nj,I.defer=zk,I.delay=Vk,I.difference=p2,I.differenceBy=g2,I.differenceWith=m2,I.drop=v2,I.dropRight=y2,I.dropRightWhile=b2,I.dropWhile=_2,I.fill=x2,I.filter=Tk,I.flatMap=Ek,I.flatMapDeep=Ok,I.flatMapDepth=Ak,I.flatten=zx,I.flattenDeep=w2,I.flattenDepth=T2,I.flip=Gk,I.flow=q$,I.flowRight=H$,I.fromPairs=S2,I.functions=Hj,I.functionsIn=Wj,I.groupBy=Rk,I.initial=E2,I.intersection=O2,I.intersectionBy=A2,I.intersectionWith=R2,I.invert=zj,I.invertBy=Vj,I.invokeMap=Dk,I.iteratee=sp,I.keyBy=Mk,I.keys=Sr,I.keysIn=tn,I.map=ql,I.mapKeys=Kj,I.mapValues=Xj,I.matches=W$,I.matchesProperty=B$,I.memoize=Wl,I.merge=Yj,I.mergeWith=pw,I.method=z$,I.methodOf=V$,I.mixin=up,I.negate=Bl,I.nthArg=K$,I.omit=Zj,I.omitBy=Jj,I.once=Kk,I.orderBy=Pk,I.over=X$,I.overArgs=Xk,I.overEvery=Y$,I.overSome=Z$,I.partial=Qh,I.partialRight=iw,I.partition=Lk,I.pick=Qj,I.pickBy=gw,I.property=ww,I.propertyOf=J$,I.pull=P2,I.pullAll=Gx,I.pullAllBy=L2,I.pullAllWith=N2,I.pullAt=F2,I.range=Q$,I.rangeRight=eU,I.rearg=Yk,I.reject=kk,I.remove=k2,I.rest=Zk,I.reverse=Yh,I.sampleSize=$k,I.set=t$,I.setWith=r$,I.shuffle=Uk,I.slice=j2,I.sortBy=Wk,I.sortedUniq=z2,I.sortedUniqBy=V2,I.split=C$,I.spread=Jk,I.tail=G2,I.take=K2,I.takeRight=X2,I.takeRightWhile=Y2,I.takeWhile=Z2,I.tap=dk,I.throttle=Qk,I.thru=Ul,I.toArray=lw,I.toPairs=mw,I.toPairsIn=vw,I.toPath=aU,I.toPlainObject=fw,I.transform=n$,I.unary=ej,I.union=J2,I.unionBy=Q2,I.unionWith=ek,I.uniq=tk,I.uniqBy=rk,I.uniqWith=nk,I.unset=i$,I.unzip=Zh,I.unzipWith=Kx,I.update=a$,I.updateWith=o$,I.values=qo,I.valuesIn=s$,I.without=ik,I.words=_w,I.wrap=tj,I.xor=ak,I.xorBy=ok,I.xorWith=sk,I.zip=uk,I.zipObject=lk,I.zipObjectDeep=ck,I.zipWith=fk,I.entries=mw,I.entriesIn=vw,I.extend=dw,I.extendWith=hw,up(I,I),I.add=sU,I.attempt=xw,I.camelCase=f$,I.capitalize=yw,I.ceil=uU,I.clamp=u$,I.clone=nj,I.cloneDeep=aj,I.cloneDeepWith=oj,I.cloneWith=ij,I.conformsTo=sj,I.deburr=bw,I.defaultTo=U$,I.divide=lU,I.endsWith=d$,I.eq=Kn,I.escape=h$,I.escapeRegExp=p$,I.every=wk,I.find=Sk,I.findIndex=Wx,I.findKey=Fj,I.findLast=Ck,I.findLastIndex=Bx,I.findLastKey=kj,I.floor=cU,I.forEach=Yx,I.forEachRight=Zx,I.forIn=jj,I.forInRight=$j,I.forOwn=Uj,I.forOwnRight=qj,I.get=np,I.gt=uj,I.gte=lj,I.has=Bj,I.hasIn=ip,I.head=Vx,I.identity=rn,I.includes=Ik,I.indexOf=C2,I.inRange=l$,I.invoke=Gj,I.isArguments=Ua,I.isArray=Ye,I.isArrayBuffer=cj,I.isArrayLike=en,I.isArrayLikeObject=dr,I.isBoolean=fj,I.isBuffer=na,I.isDate=dj,I.isElement=hj,I.isEmpty=pj,I.isEqual=gj,I.isEqualWith=mj,I.isError=ep,I.isFinite=vj,I.isFunction=Ci,I.isInteger=aw,I.isLength=zl,I.isMap=ow,I.isMatch=yj,I.isMatchWith=bj,I.isNaN=_j,I.isNative=xj,I.isNil=Tj,I.isNull=wj,I.isNumber=sw,I.isObject=tr,I.isObjectLike=or,I.isPlainObject=Vs,I.isRegExp=tp,I.isSafeInteger=Sj,I.isSet=uw,I.isString=Vl,I.isSymbol=vn,I.isTypedArray=Uo,I.isUndefined=Cj,I.isWeakMap=Ej,I.isWeakSet=Oj,I.join=I2,I.kebabCase=g$,I.last=Pn,I.lastIndexOf=D2,I.lowerCase=m$,I.lowerFirst=v$,I.lt=Aj,I.lte=Rj,I.max=fU,I.maxBy=dU,I.mean=hU,I.meanBy=pU,I.min=gU,I.minBy=mU,I.stubArray=cp,I.stubFalse=fp,I.stubObject=tU,I.stubString=rU,I.stubTrue=nU,I.multiply=vU,I.nth=M2,I.noConflict=G$,I.noop=lp,I.now=Hl,I.pad=y$,I.padEnd=b$,I.padStart=_$,I.parseInt=x$,I.random=c$,I.reduce=Nk,I.reduceRight=Fk,I.repeat=w$,I.replace=T$,I.result=e$,I.round=yU,I.runInContext=U,I.sample=jk,I.size=qk,I.snakeCase=S$,I.some=Hk,I.sortedIndex=$2,I.sortedIndexBy=U2,I.sortedIndexOf=q2,I.sortedLastIndex=H2,I.sortedLastIndexBy=W2,I.sortedLastIndexOf=B2,I.startCase=E$,I.startsWith=O$,I.subtract=bU,I.sum=_U,I.sumBy=xU,I.template=A$,I.times=iU,I.toFinite=Ei,I.toInteger=Je,I.toLength=cw,I.toLower=R$,I.toNumber=Ln,I.toSafeInteger=Ij,I.toString=Pt,I.toUpper=I$,I.trim=D$,I.trimEnd=M$,I.trimStart=P$,I.truncate=L$,I.unescape=N$,I.uniqueId=oU,I.upperCase=F$,I.upperFirst=ap,I.each=Yx,I.eachRight=Zx,I.first=Vx,up(I,(function(){var u={};return ni(I,function(f,p){Mt.call(I.prototype,p)||(u[p]=f)}),u})(),{chain:!1}),I.VERSION=n,pn(["bind","bindKey","curry","curryRight","partial","partialRight"],function(u){I[u].placeholder=I}),pn(["drop","take"],function(u,f){pt.prototype[u]=function(p){p=p===r?1:xr(Je(p),0);var b=this.__filtered__&&!f?new pt(this):this.clone();return b.__filtered__?b.__takeCount__=Nr(p,b.__takeCount__):b.__views__.push({size:Nr(p,X),type:u+(b.__dir__<0?"Right":"")}),b},pt.prototype[u+"Right"]=function(p){return this.reverse()[u](p).reverse()}}),pn(["filter","map","takeWhile"],function(u,f){var p=f+1,b=p==J||p==le;pt.prototype[u]=function(O){var M=this.clone();return M.__iteratees__.push({iteratee:He(O,3),type:p}),M.__filtered__=M.__filtered__||b,M}}),pn(["head","last"],function(u,f){var p="take"+(f?"Right":"");pt.prototype[u]=function(){return this[p](1).value()[0]}}),pn(["initial","tail"],function(u,f){var p="drop"+(f?"":"Right");pt.prototype[u]=function(){return this.__filtered__?new pt(this):this[p](1)}}),pt.prototype.compact=function(){return this.filter(rn)},pt.prototype.find=function(u){return this.filter(u).head()},pt.prototype.findLast=function(u){return this.reverse().find(u)},pt.prototype.invokeMap=at(function(u,f){return typeof u=="function"?new pt(this):this.map(function(p){return Us(p,u,f)})}),pt.prototype.reject=function(u){return this.filter(Bl(He(u)))},pt.prototype.slice=function(u,f){u=Je(u);var p=this;return p.__filtered__&&(u>0||f<0)?new pt(p):(u<0?p=p.takeRight(-u):u&&(p=p.drop(u)),f!==r&&(f=Je(f),p=f<0?p.dropRight(-f):p.take(f-u)),p)},pt.prototype.takeRightWhile=function(u){return this.reverse().takeWhile(u).reverse()},pt.prototype.toArray=function(){return this.take(X)},ni(pt.prototype,function(u,f){var p=/^(?:filter|find|map|reject)|While$/.test(f),b=/^(?:head|last)$/.test(f),O=I[b?"take"+(f=="last"?"Right":""):f],M=b||/^find/.test(f);O&&(I.prototype[f]=function(){var L=this.__wrapped__,j=b?[1]:arguments,H=L instanceof pt,re=j[0],ne=H||Ye(L),oe=function(dt){var yt=O.apply(I,Yi([dt],j));return b&&ye?yt[0]:yt};ne&&p&&typeof re=="function"&&re.length!=1&&(H=ne=!1);var ye=this.__chain__,Pe=!!this.__actions__.length,We=M&&!ye,et=H&&!Pe;if(!M&&ne){L=et?L:new pt(this);var $e=u.apply(L,j);return $e.__actions__.push({func:Ul,args:[oe],thisArg:r}),new In($e,ye)}return We&&et?u.apply(this,j):($e=this.thru(oe),We?b?$e.value()[0]:$e.value():$e)})}),pn(["pop","push","shift","sort","splice","unshift"],function(u){var f=dl[u],p=/^(?:push|sort|unshift)$/.test(u)?"tap":"thru",b=/^(?:pop|shift)$/.test(u);I.prototype[u]=function(){var O=arguments;if(b&&!this.__chain__){var M=this.value();return f.apply(Ye(M)?M:[],O)}return this[p](function(L){return f.apply(Ye(L)?L:[],O)})}}),ni(pt.prototype,function(u,f){var p=I[f];if(p){var b=p.name+"";Mt.call(No,b)||(No[b]=[]),No[b].push({name:f,func:p})}}),No[Pl(r,w).name]=[{name:"wrapper",func:r}],pt.prototype.clone=FN,pt.prototype.reverse=kN,pt.prototype.value=jN,I.prototype.at=hk,I.prototype.chain=pk,I.prototype.commit=gk,I.prototype.next=mk,I.prototype.plant=yk,I.prototype.reverse=bk,I.prototype.toJSON=I.prototype.valueOf=I.prototype.value=_k,I.prototype.first=I.prototype.head,Ps&&(I.prototype[Ps]=vk),I}),Mo=gN();Ma?((Ma.exports=Mo)._=Mo,oh._=Mo):Dr._=Mo}).call(lz)})(pu,pu.exports)),pu.exports}var mr=cz();const Ca={appearance:"none",border:0,margin:0,padding:0,background:"none",color:"inherit",font:"inherit",textAlign:"inherit",cursor:"pointer"};Object.entries(Ca).map(([t,e])=>`${mr.kebabCase(t)}: ${e};`).join(`
|
|
65
|
+
`);const fz={critical:["clr-critical","#db0028"],primary:["clr-primary","#1456e0"],warning:["clr-warning","#ff9800"],success:["clr-success","#4caf50"],info:["clr-info","#2196f3"],onSurface:["clr-on-surface","#092241"],onSurfaceVariant:["clr-on-surface-variant","#092241b3"],onPrimary:["clr-on-primary","#ffffff"],outline:["clr-outline","#0922411f"],outlineVariant:["clr-outline-variant","#09224114"]},dz={surface:"#ffffff",pointBorder:"#5585ff"},U0=Object.entries(fz),GI=Object.entries(dz),wn={...Object.fromEntries(U0.map(([t,[,e]])=>[t,e])),...Object.fromEntries(GI)};Object.fromEntries(U0.map(([t,[e]])=>[t,e]));const rt={...Object.fromEntries(U0.map(([t,[e,r]])=>[t,`var(--${e}, ${r})`])),...Object.fromEntries(GI)},wu="'Open Sans', sans-serif",qf={family:wu,size:12},Hf={caption:{fontFamily:wu,fontSize:"12px",fontWeight:400,lineHeight:"16px"},small:{fontFamily:wu,fontSize:"14px",fontWeight:400,lineHeight:"20px"},smallBold:{fontFamily:wu,fontSize:"14px",fontWeight:700,lineHeight:"20px"}},KI=72,m1={color:"initial",fontFamily:"var(--root-secondary-font, 'Red Hat Display', sans-serif)",fontSize:20,fontWeight:700,letterSpacing:"0.15px",lineHeight:"24px",margin:0,padding:24},hz={margin:0,whiteSpace:"nowrap"},pz={...Ca,alignItems:"center",borderRadius:100,boxSizing:"border-box",color:rt.primary,display:"inline-flex",fontFamily:"var(--root-secondary-font, 'Red Hat Display', sans-serif)",fontSize:14,fontWeight:700,justifyContent:"center",minHeight:36,minWidth:64,padding:"8.5px 20px",textTransform:"uppercase",whiteSpace:"nowrap"},gz=({children:t,disabled:e,style:r,type:n="button",...i})=>R.jsx("button",{type:n,disabled:e,style:{...pz,...e?{color:"rgba(0, 0, 0, 0.26)",cursor:"default"}:null,...r},...i,children:t}),mz=({children:t,style:e,...r})=>R.jsx("div",{role:"dialog","aria-modal":"true",style:{backgroundColor:rt.surface,boxSizing:"border-box",color:rt.onSurface,inset:0,overflowY:"auto",paddingTop:KI,position:"fixed",zIndex:1300,...e},...r,children:t}),vz=({children:t,style:e,...r})=>R.jsx("div",{style:{alignItems:"center",backgroundColor:rt.surface,boxSizing:"border-box",display:"flex",height:KI,justifyContent:"space-between",left:0,paddingRight:16,position:"fixed",right:0,top:0,zIndex:1,...e},...r,children:t}),v1=({isFullScreen:t,children:e,style:r,...n})=>R.jsx("div",{style:{overflow:"hidden",padding:t?"8px 16px 16px":"8px 24px 20px",...r},...n,children:e}),yz=({children:t,style:e,...r})=>R.jsx("div",{style:{alignItems:"center",display:"flex",flexWrap:"wrap",gap:0,justifyContent:"flex-end",padding:"8px 15px 8px 20px",...e},...r,children:t}),bz=t=>{ht(()=>{if(!t)return;const e=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}},[t])},q0=({title:t,actions:e,children:r,open:n,fullScreen:i,fullWidth:a})=>{const s=Qe(At("sm"))&&!!(i||a);return bz(n&&s),s?n?R.jsxs(mz,{"data-testid":"fullscreen-dialog","aria-labelledby":"dialog-title",children:[R.jsx(vz,{"data-part":"top-bar",children:e==null?void 0:e.map(l=>R.jsx(gz,{onClick:l.trigger,type:l.type??"button",disabled:l.disabled,children:l.mobileLabel},`${l.label}-${l.type}`))}),R.jsx("h2",{id:"dialog-title","data-part":"title",style:m1,children:t}),!!r&&R.jsx(v1,{"data-part":"content",isFullScreen:!0,children:r})]}):null:R.jsxs(DU,{open:n,preventCancel:!0,preventCloseOnScrimClick:!0,"aria-labelledby":"dialog-title",style:{"--md-dialog-container-shape":"12px"},children:[R.jsx("h2",{slot:"headline",id:"dialog-title",style:m1,children:t}),!!r&&R.jsx(v1,{slot:"content",isFullScreen:!1,children:r}),R.jsx(yz,{slot:"actions",children:e==null?void 0:e.map(l=>R.jsx(w0,{appearance:"text",onClick:l.trigger,type:l.type,disabled:l.disabled,submitting:l.loading,style:hz,children:l.label},`${l.label}-${l.type}`))})]})},_z=t=>t.name,xz=t=>t.id,H0=({options:t=[],value:e,onChange:r,label:n,ariaLabel:i,name:a,trailingIcon:o,style:s,getOptionLabel:l=_z,getOptionValue:c=xz,getOptionDisabled:d})=>{const h=String(e??"");return R.jsx(MU,{"aria-label":i,label:n,menuPositioning:"fixed",name:a,onSelectInput:g=>r(g.target.value),style:s,trailingIcon:o,children:t.map(g=>{const m=String(c(g));return R.jsx(PU,{disabled:d==null?void 0:d(g),selected:m===h,value:m,children:R.jsx("div",{slot:"headline",children:l(g)})},m)})})};function wz(){if(console&&console.warn){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];io(e[0])&&(e[0]=`react-i18next:: ${e[0]}`),console.warn(...e)}}const y1={};function My(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];io(e[0])&&y1[e[0]]||(io(e[0])&&(y1[e[0]]=new Date),wz(...e))}const XI=(t,e)=>()=>{if(t.isInitialized)e();else{const r=()=>{setTimeout(()=>{t.off("initialized",r)},0),e()};t.on("initialized",r)}},b1=(t,e,r)=>{t.loadNamespaces(e,XI(t,r))},_1=(t,e,r,n)=>{io(r)&&(r=[r]),r.forEach(i=>{t.options.ns.indexOf(i)<0&&t.options.ns.push(i)}),t.loadLanguages(e,XI(t,n))},Tz=function(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const n=e.languages[0],i=e.options?e.options.fallbackLng:!1,a=e.languages[e.languages.length-1];if(n.toLowerCase()==="cimode")return!0;const o=(s,l)=>{const c=e.services.backendConnector.state[`${s}|${l}`];return c===-1||c===2};return r.bindI18n&&r.bindI18n.indexOf("languageChanging")>-1&&e.services.backendConnector.backend&&e.isLanguageChangingTo&&!o(e.isLanguageChangingTo,t)?!1:!!(e.hasResourceBundle(n,t)||!e.services.backendConnector.backend||e.options.resources&&!e.options.partialBundledLanguages||o(n,t)&&(!i||o(a,t)))},Sz=function(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return!e.languages||!e.languages.length?(My("i18n.languages were undefined or empty",e.languages),!0):e.options.ignoreJSONStructure!==void 0?e.hasLoadedNamespace(t,{lng:r.lng,precheck:(i,a)=>{if(r.bindI18n&&r.bindI18n.indexOf("languageChanging")>-1&&i.services.backendConnector.backend&&i.isLanguageChangingTo&&!a(i.isLanguageChangingTo,t))return!1}}):Tz(t,e,r)},io=t=>typeof t=="string",Cz=t=>typeof t=="object"&&t!==null,Ez=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,Oz={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},Az=t=>Oz[t],Rz=t=>t.replace(Ez,Az);let Py={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:Rz};const Iz=function(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Py={...Py,...t}},Dz=()=>Py;let YI;const Mz=t=>{YI=t},Pz=()=>YI,Lz={type:"3rdParty",init(t){Iz(t.options.react),Mz(t)}},Nz=pd();class Fz{constructor(){Xe(this,"getUsedNamespaces",()=>Object.keys(this.usedNamespaces));this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(r=>{this.usedNamespaces[r]||(this.usedNamespaces[r]=!0)})}}const kz=(t,e)=>{const r=Kt();return ht(()=>{r.current=t},[t,e]),r.current},ZI=(t,e,r,n)=>t.getFixedT(e,r,n),jz=(t,e,r,n)=>bt(ZI(t,e,r,n),[t,e,r,n]),Qt=function(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{i18n:r}=e,{i18n:n,defaultNS:i}=Wu(Nz)||{},a=r||n||Pz();if(a&&!a.reportNamespaces&&(a.reportNamespaces=new Fz),!a){My("You will need to pass in an i18next instance by using initReactI18next");const A=(S,T)=>io(T)?T:Cz(T)&&io(T.defaultValue)?T.defaultValue:Array.isArray(S)?S[S.length-1]:S,E=[A,{},!1];return E.t=A,E.i18n={},E.ready=!1,E}a.options.react&&a.options.react.wait!==void 0&&My("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const o={...Dz(),...a.options.react,...e},{useSuspense:s,keyPrefix:l}=o;let c=t||i||a.options&&a.options.defaultNS;c=io(c)?[c]:c||["translation"],a.reportNamespaces.addUsedNamespaces&&a.reportNamespaces.addUsedNamespaces(c);const d=(a.isInitialized||a.initializedStoreOnce)&&c.every(A=>Sz(A,a,o)),h=jz(a,e.lng||null,o.nsMode==="fallback"?c:c[0],l),g=()=>h,m=()=>ZI(a,e.lng||null,o.nsMode==="fallback"?c:c[0],l),[v,_]=sr(g);let y=c.join();e.lng&&(y=`${e.lng}${y}`);const x=kz(y),w=Kt(!0);ht(()=>{const{bindI18n:A,bindI18nStore:E}=o;w.current=!0,!d&&!s&&(e.lng?_1(a,e.lng,c,()=>{w.current&&_(m)}):b1(a,c,()=>{w.current&&_(m)})),d&&x&&x!==y&&w.current&&_(m);const S=()=>{w.current&&_(m)};return A&&a&&a.on(A,S),E&&a&&a.store.on(E,S),()=>{w.current=!1,A&&a&&A.split(" ").forEach(T=>a.off(T,S)),E&&a&&E.split(" ").forEach(T=>a.store.off(T,S))}},[a,y]),ht(()=>{w.current&&d&&_(g)},[a,l,d]);const C=[v,a,d];if(C.t=v,C.i18n=a,C.ready=d,d||!d&&!s)return C;throw new Promise(A=>{e.lng?_1(a,e.lng,c,()=>A()):b1(a,c,()=>A())})},$z={h1:{token:"page-title",element:"h1"},h2:{token:"page-title",element:"h2"},h3:{token:"page-title",element:"h3"},h4:{token:"page-title",element:"h4"},h5:{token:"heading",element:"h5"},h6:{token:"heading",element:"h6"},subtitle1:{token:"default",element:"p"},subtitle2:{token:"small",element:"p",weight:"bold"},body1:{token:"default",element:"p"},body2:{token:"small",element:"p"},button:{token:"button",element:"span"},caption:{token:"caption",element:"span"},overline:{token:"caption",element:"span"}},Uz=t=>({margin:0,fontFamily:`var(--text-${t}-font)`,fontSize:`var(--text-${t}-size)`,fontWeight:`var(--text-${t}-weight)`,lineHeight:`var(--text-${t}-line-height)`,letterSpacing:`var(--text-${t}-letter-spacing)`,textTransform:`var(--text-${t}-transform)`,textDecoration:`var(--text-${t}-decoration)`}),ft=({variant:t="body1",component:e,align:r,noWrap:n,gutterBottom:i,className:a,style:o,children:s,...l})=>{const{token:c,element:d,weight:h}=$z[t],g=e??d,m={...Uz(c),...h?{fontWeight:h}:null,...r?{textAlign:r}:null,...n?{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}:null,...i?{marginBottom:"0.35em"}:null,...o};return R.jsx(g,{className:a,style:m,...l,children:s})},W0=({children:t,style:e,...r})=>R.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:8,padding:24,...e},...r,children:t}),qz=({$direction:t,children:e,style:r,...n})=>R.jsx("div",{style:{display:"flex",alignItems:"center",gap:16,flexDirection:t==="vertical"?"column":"row",...t==="vertical"?{textAlign:"center"}:null,...r},...n,children:e}),Hz=()=>R.jsx($i,{filled:!0,style:{"--ix-icon-font-size":"24px",color:"var(--clr-critical, #db0028)"},children:"error"}),Wz=({$direction:t,children:e,style:r,...n})=>R.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8,...t==="vertical"?{textAlign:"center"}:null,...r},...n,children:e}),Bz=({error:t,title:e,message:r,direction:n="horizontal"})=>{const{t:i}=Qt("common");return R.jsxs(qz,{$direction:n,"data-testid":"common-error-msg",children:[R.jsx(Hz,{}),R.jsxs(Wz,{$direction:n,children:[R.jsx(ft,{variant:"subtitle1","data-testid":"common-error-msg-title",component:"p",children:e||i("error-title")}),R.jsx(ft,{variant:"body2","data-testid":"common-error-msg-description",children:(t==null?void 0:t.message)||r||i("error-message")})]})]})},zz=()=>R.jsx(W0,{children:R.jsx(Bz,{direction:"vertical"})});class pae extends SU{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(e){return{hasError:!0}}componentDidCatch(e){console.error("Client side error",{error:e})}render(){return this.state.hasError?R.jsx(zz,{}):this.props.children}}const Vz={display:"flex",flexDirection:"column",height:"100%",justifyContent:"flex-start",overflowY:"auto",width:"100%"},Gz=({children:t,style:e,...r})=>R.jsx("div",{style:{...Vz,...e},...r,children:t}),B0=({children:t,className:e})=>R.jsx(Gz,{className:e,children:t}),Kz=({children:t,onClose:e,open:r})=>{const n=Qe(At("md")),i=Kt(null);return ht(()=>{var a;(a=i.current)==null||a.toggleAttribute("isvisible",r)},[r]),ht(()=>{if(!r)return;const a=o=>{o.key==="Escape"&&e()};return document.addEventListener("keydown",a),()=>document.removeEventListener("keydown",a)},[r,e]),R.jsx(LU,{ref:i,isVisible:r,onClosed:e,compact:!0,hideClose:!0,style:{"--ix-drawer-padding":"0","--ix-drawer-width-md":n?"100vw":"816px","--ix-drawer-width-lg":"816px","--ix-drawer-border-radius":n?"0":"16px 0 0 16px"},children:R.jsx("div",{slot:"content",children:t})})},Xz={display:"flex",alignItems:"center",justifyContent:"center"},Yz=({linear:t})=>t?R.jsx(Tf,{indeterminate:!0,role:"progressbar","aria-label":"Loading...","aria-busy":"true","data-testid":"linear-progress"}):R.jsx("div",{style:Xz,children:R.jsx(Tf,{linear:!1,indeterminate:!0,style:{"--md-circular-progress-size":"40px"},role:"progressbar","aria-label":"Loading...","aria-busy":"true","data-testid":"circular-progress"})}),Zz=()=>{const[t,e]=sr([]);return{closeDialog:()=>{e(i=>(i.pop(),[...i]))},createDialog:(i,a)=>{const o={...i,open:!0,key:mr.uniqueId("dialog_")};e(a?()=>[o]:s=>[...s,o])},dialogs:t}},JI=pd([]);function gae({children:t}){const{closeDialog:e,createDialog:r,dialogs:n}=Zz(),i=Kt([r,e]);return R.jsxs(JI.Provider,{value:i.current,children:[t,n.map(a=>R.jsx(CU,{children:a},a.key))]})}function QI(){const t=Wu(JI);if(!t)throw new Error("Dialog context is only available inside its provider");return t}const Ke=t=>typeof t=="string",tu=()=>{let t,e;const r=new Promise((n,i)=>{t=n,e=i});return r.resolve=t,r.reject=e,r},x1=t=>t==null?"":""+t,Jz=(t,e,r)=>{t.forEach(n=>{e[n]&&(r[n]=e[n])})},Qz=/###/g,w1=t=>t&&t.indexOf("###")>-1?t.replace(Qz,"."):t,T1=t=>!t||Ke(t),Tu=(t,e,r)=>{const n=Ke(e)?e.split("."):e;let i=0;for(;i<n.length-1;){if(T1(t))return{};const a=w1(n[i]);!t[a]&&r&&(t[a]=new r),Object.prototype.hasOwnProperty.call(t,a)?t=t[a]:t={},++i}return T1(t)?{}:{obj:t,k:w1(n[i])}},S1=(t,e,r)=>{const{obj:n,k:i}=Tu(t,e,Object);if(n!==void 0||e.length===1){n[i]=r;return}let a=e[e.length-1],o=e.slice(0,e.length-1),s=Tu(t,o,Object);for(;s.obj===void 0&&o.length;)a=`${o[o.length-1]}.${a}`,o=o.slice(0,o.length-1),s=Tu(t,o,Object),s&&s.obj&&typeof s.obj[`${s.k}.${a}`]<"u"&&(s.obj=void 0);s.obj[`${s.k}.${a}`]=r},eV=(t,e,r,n)=>{const{obj:i,k:a}=Tu(t,e,Object);i[a]=i[a]||[],i[a].push(r)},Wf=(t,e)=>{const{obj:r,k:n}=Tu(t,e);if(r)return r[n]},tV=(t,e,r)=>{const n=Wf(t,r);return n!==void 0?n:Wf(e,r)},eD=(t,e,r)=>{for(const n in e)n!=="__proto__"&&n!=="constructor"&&(n in t?Ke(t[n])||t[n]instanceof String||Ke(e[n])||e[n]instanceof String?r&&(t[n]=e[n]):eD(t[n],e[n],r):t[n]=e[n]);return t},Bo=t=>t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var rV={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const nV=t=>Ke(t)?t.replace(/[&<>"'\/]/g,e=>rV[e]):t;class iV{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const r=this.regExpMap.get(e);if(r!==void 0)return r;const n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}}const aV=[" ",",","?","!",";"],oV=new iV(20),sV=(t,e,r)=>{e=e||"",r=r||"";const n=aV.filter(o=>e.indexOf(o)<0&&r.indexOf(o)<0);if(n.length===0)return!0;const i=oV.getRegExp(`(${n.map(o=>o==="?"?"\\?":o).join("|")})`);let a=!i.test(t);if(!a){const o=t.indexOf(r);o>0&&!i.test(t.substring(0,o))&&(a=!0)}return a},Ly=function(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!t)return;if(t[e])return t[e];const n=e.split(r);let i=t;for(let a=0;a<n.length;){if(!i||typeof i!="object")return;let o,s="";for(let l=a;l<n.length;++l)if(l!==a&&(s+=r),s+=n[l],o=i[s],o!==void 0){if(["string","number","boolean"].indexOf(typeof o)>-1&&l<n.length-1)continue;a+=l-a+1;break}i=o}return i},Bf=t=>t&&t.replace("_","-"),uV={type:"logger",log(t){this.output("log",t)},warn(t){this.output("warn",t)},error(t){this.output("error",t)},output(t,e){console&&console[t]&&console[t].apply(console,e)}};class zf{constructor(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(e,r)}init(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=r.prefix||"i18next:",this.logger=e||uV,this.options=r,this.debug=r.debug}log(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return this.forward(r,"log","",!0)}warn(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return this.forward(r,"warn","",!0)}error(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return this.forward(r,"error","")}deprecate(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return this.forward(r,"warn","WARNING DEPRECATED: ",!0)}forward(e,r,n,i){return i&&!this.debug?null:(Ke(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[r](e))}create(e){return new zf(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new zf(this.logger,e)}}var hi=new zf;class Od{constructor(){this.observers={}}on(e,r){return e.split(" ").forEach(n=>{this.observers[n]||(this.observers[n]=new Map);const i=this.observers[n].get(r)||0;this.observers[n].set(r,i+1)}),this}off(e,r){if(this.observers[e]){if(!r){delete this.observers[e];return}this.observers[e].delete(r)}}emit(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];this.observers[e]&&Array.from(this.observers[e].entries()).forEach(o=>{let[s,l]=o;for(let c=0;c<l;c++)s(...n)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(o=>{let[s,l]=o;for(let c=0;c<l;c++)s.apply(s,[e,...n])})}}class C1 extends Od{constructor(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const r=this.options.ns.indexOf(e);r>-1&&this.options.ns.splice(r,1)}getResource(e,r,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const a=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,o=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let s;e.indexOf(".")>-1?s=e.split("."):(s=[e,r],n&&(Array.isArray(n)?s.push(...n):Ke(n)&&a?s.push(...n.split(a)):s.push(n)));const l=Wf(this.data,s);return!l&&!r&&!n&&e.indexOf(".")>-1&&(e=s[0],r=s[1],n=s.slice(2).join(".")),l||!o||!Ke(n)?l:Ly(this.data&&this.data[e]&&this.data[e][r],n,a)}addResource(e,r,n,i){let a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const o=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator;let s=[e,r];n&&(s=s.concat(o?n.split(o):n)),e.indexOf(".")>-1&&(s=e.split("."),i=r,r=s[1]),this.addNamespaces(r),S1(this.data,s,i),a.silent||this.emit("added",e,r,n,i)}addResources(e,r,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const a in n)(Ke(n[a])||Array.isArray(n[a]))&&this.addResource(e,r,a,n[a],{silent:!0});i.silent||this.emit("added",e,r,n)}addResourceBundle(e,r,n,i,a){let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},s=[e,r];e.indexOf(".")>-1&&(s=e.split("."),i=n,n=r,r=s[1]),this.addNamespaces(r);let l=Wf(this.data,s)||{};o.skipCopy||(n=JSON.parse(JSON.stringify(n))),i?eD(l,n,a):l={...l,...n},S1(this.data,s,l),o.silent||this.emit("added",e,r,n)}removeResourceBundle(e,r){this.hasResourceBundle(e,r)&&delete this.data[e][r],this.removeNamespaces(r),this.emit("removed",e,r)}hasResourceBundle(e,r){return this.getResource(e,r)!==void 0}getResourceBundle(e,r){return r||(r=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(e,r)}:this.getResource(e,r)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const r=this.getDataByLanguage(e);return!!(r&&Object.keys(r)||[]).find(i=>r[i]&&Object.keys(r[i]).length>0)}toJSON(){return this.data}}var tD={processors:{},addPostProcessor(t){this.processors[t.name]=t},handle(t,e,r,n,i){return t.forEach(a=>{this.processors[a]&&(e=this.processors[a].process(e,r,n,i))}),e}};const E1={};class Vf extends Od{constructor(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),Jz(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=hi.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(e==null)return!1;const n=this.resolve(e,r);return n&&n.res!==void 0}extractFromKey(e,r){let n=r.nsSeparator!==void 0?r.nsSeparator:this.options.nsSeparator;n===void 0&&(n=":");const i=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator;let a=r.ns||this.options.defaultNS||[];const o=n&&e.indexOf(n)>-1,s=!this.options.userDefinedKeySeparator&&!r.keySeparator&&!this.options.userDefinedNsSeparator&&!r.nsSeparator&&!sV(e,n,i);if(o&&!s){const l=e.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:e,namespaces:Ke(a)?[a]:a};const c=e.split(n);(n!==i||n===i&&this.options.ns.indexOf(c[0])>-1)&&(a=c.shift()),e=c.join(i)}return{key:e,namespaces:Ke(a)?[a]:a}}translate(e,r,n){if(typeof r!="object"&&this.options.overloadTranslationOptionHandler&&(r=this.options.overloadTranslationOptionHandler(arguments)),typeof r=="object"&&(r={...r}),r||(r={}),e==null)return"";Array.isArray(e)||(e=[String(e)]);const i=r.returnDetails!==void 0?r.returnDetails:this.options.returnDetails,a=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator,{key:o,namespaces:s}=this.extractFromKey(e[e.length-1],r),l=s[s.length-1],c=r.lng||this.language,d=r.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(c&&c.toLowerCase()==="cimode"){if(d){const A=r.nsSeparator||this.options.nsSeparator;return i?{res:`${l}${A}${o}`,usedKey:o,exactUsedKey:o,usedLng:c,usedNS:l,usedParams:this.getUsedParamsDetails(r)}:`${l}${A}${o}`}return i?{res:o,usedKey:o,exactUsedKey:o,usedLng:c,usedNS:l,usedParams:this.getUsedParamsDetails(r)}:o}const h=this.resolve(e,r);let g=h&&h.res;const m=h&&h.usedKey||o,v=h&&h.exactUsedKey||o,_=Object.prototype.toString.apply(g),y=["[object Number]","[object Function]","[object RegExp]"],x=r.joinArrays!==void 0?r.joinArrays:this.options.joinArrays,w=!this.i18nFormat||this.i18nFormat.handleAsObject,C=!Ke(g)&&typeof g!="boolean"&&typeof g!="number";if(w&&g&&C&&y.indexOf(_)<0&&!(Ke(x)&&Array.isArray(g))){if(!r.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const A=this.options.returnedObjectHandler?this.options.returnedObjectHandler(m,g,{...r,ns:s}):`key '${o} (${this.language})' returned an object instead of string.`;return i?(h.res=A,h.usedParams=this.getUsedParamsDetails(r),h):A}if(a){const A=Array.isArray(g),E=A?[]:{},S=A?v:m;for(const T in g)if(Object.prototype.hasOwnProperty.call(g,T)){const D=`${S}${a}${T}`;E[T]=this.translate(D,{...r,joinArrays:!1,ns:s}),E[T]===D&&(E[T]=g[T])}g=E}}else if(w&&Ke(x)&&Array.isArray(g))g=g.join(x),g&&(g=this.extendTranslation(g,e,r,n));else{let A=!1,E=!1;const S=r.count!==void 0&&!Ke(r.count),T=Vf.hasDefaultValue(r),D=S?this.pluralResolver.getSuffix(c,r.count,r):"",P=r.ordinal&&S?this.pluralResolver.getSuffix(c,r.count,{ordinal:!1}):"",N=S&&!r.ordinal&&r.count===0&&this.pluralResolver.shouldUseIntlApi(),F=N&&r[`defaultValue${this.options.pluralSeparator}zero`]||r[`defaultValue${D}`]||r[`defaultValue${P}`]||r.defaultValue;!this.isValidLookup(g)&&T&&(A=!0,g=F),this.isValidLookup(g)||(E=!0,g=o);const W=(r.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&E?void 0:g,te=T&&F!==g&&this.options.updateMissing;if(E||A||te){if(this.logger.log(te?"updateKey":"missingKey",c,l,o,te?F:g),a){const se=this.resolve(o,{...r,keySeparator:!1});se&&se.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let J=[];const ie=this.languageUtils.getFallbackCodes(this.options.fallbackLng,r.lng||this.language);if(this.options.saveMissingTo==="fallback"&&ie&&ie[0])for(let se=0;se<ie.length;se++)J.push(ie[se]);else this.options.saveMissingTo==="all"?J=this.languageUtils.toResolveHierarchy(r.lng||this.language):J.push(r.lng||this.language);const le=(se,ce,Q)=>{const $=T&&Q!==g?Q:W;this.options.missingKeyHandler?this.options.missingKeyHandler(se,l,ce,$,te,r):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(se,l,ce,$,te,r),this.emit("missingKey",se,l,ce,g)};this.options.saveMissing&&(this.options.saveMissingPlurals&&S?J.forEach(se=>{const ce=this.pluralResolver.getSuffixes(se,r);N&&r[`defaultValue${this.options.pluralSeparator}zero`]&&ce.indexOf(`${this.options.pluralSeparator}zero`)<0&&ce.push(`${this.options.pluralSeparator}zero`),ce.forEach(Q=>{le([se],o+Q,r[`defaultValue${Q}`]||F)})}):le(J,o,F))}g=this.extendTranslation(g,e,r,h,n),E&&g===o&&this.options.appendNamespaceToMissingKey&&(g=`${l}:${o}`),(E||A)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?g=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}:${o}`:o,A?g:void 0):g=this.options.parseMissingKeyHandler(g))}return i?(h.res=g,h.usedParams=this.getUsedParamsDetails(r),h):g}extendTranslation(e,r,n,i,a){var o=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const c=Ke(e)&&(n&&n.interpolation&&n.interpolation.skipOnVariables!==void 0?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let d;if(c){const g=e.match(this.interpolator.nestingRegexp);d=g&&g.length}let h=n.replace&&!Ke(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(h={...this.options.interpolation.defaultVariables,...h}),e=this.interpolator.interpolate(e,h,n.lng||this.language||i.usedLng,n),c){const g=e.match(this.interpolator.nestingRegexp),m=g&&g.length;d<m&&(n.nest=!1)}!n.lng&&this.options.compatibilityAPI!=="v1"&&i&&i.res&&(n.lng=this.language||i.usedLng),n.nest!==!1&&(e=this.interpolator.nest(e,function(){for(var g=arguments.length,m=new Array(g),v=0;v<g;v++)m[v]=arguments[v];return a&&a[0]===m[0]&&!n.context?(o.logger.warn(`It seems you are nesting recursively key: ${m[0]} in key: ${r[0]}`),null):o.translate(...m,r)},n)),n.interpolation&&this.interpolator.reset()}const s=n.postProcess||this.options.postProcess,l=Ke(s)?[s]:s;return e!=null&&l&&l.length&&n.applyPostProcessor!==!1&&(e=tD.handle(l,e,r,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...i,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n,i,a,o,s;return Ke(e)&&(e=[e]),e.forEach(l=>{if(this.isValidLookup(n))return;const c=this.extractFromKey(l,r),d=c.key;i=d;let h=c.namespaces;this.options.fallbackNS&&(h=h.concat(this.options.fallbackNS));const g=r.count!==void 0&&!Ke(r.count),m=g&&!r.ordinal&&r.count===0&&this.pluralResolver.shouldUseIntlApi(),v=r.context!==void 0&&(Ke(r.context)||typeof r.context=="number")&&r.context!=="",_=r.lngs?r.lngs:this.languageUtils.toResolveHierarchy(r.lng||this.language,r.fallbackLng);h.forEach(y=>{this.isValidLookup(n)||(s=y,!E1[`${_[0]}-${y}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(s)&&(E1[`${_[0]}-${y}`]=!0,this.logger.warn(`key "${i}" for languages "${_.join(", ")}" won't get resolved as namespace "${s}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),_.forEach(x=>{if(this.isValidLookup(n))return;o=x;const w=[d];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(w,d,x,y,r);else{let A;g&&(A=this.pluralResolver.getSuffix(x,r.count,r));const E=`${this.options.pluralSeparator}zero`,S=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(g&&(w.push(d+A),r.ordinal&&A.indexOf(S)===0&&w.push(d+A.replace(S,this.options.pluralSeparator)),m&&w.push(d+E)),v){const T=`${d}${this.options.contextSeparator}${r.context}`;w.push(T),g&&(w.push(T+A),r.ordinal&&A.indexOf(S)===0&&w.push(T+A.replace(S,this.options.pluralSeparator)),m&&w.push(T+E))}}let C;for(;C=w.pop();)this.isValidLookup(n)||(a=C,n=this.getResource(x,y,C,r))}))})}),{res:n,usedKey:i,exactUsedKey:a,usedLng:o,usedNS:s}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,r,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,r,n,i):this.resourceStore.getResource(e,r,n,i)}getUsedParamsDetails(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const r=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=e.replace&&!Ke(e.replace);let i=n?e.replace:e;if(n&&typeof e.count<"u"&&(i.count=e.count),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!n){i={...i};for(const a of r)delete i[a]}return i}static hasDefaultValue(e){const r="defaultValue";for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&r===n.substring(0,r.length)&&e[n]!==void 0)return!0;return!1}}const _p=t=>t.charAt(0).toUpperCase()+t.slice(1);class O1{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=hi.create("languageUtils")}getScriptPartFromCode(e){if(e=Bf(e),!e||e.indexOf("-")<0)return null;const r=e.split("-");return r.length===2||(r.pop(),r[r.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(r.join("-"))}getLanguagePartFromCode(e){if(e=Bf(e),!e||e.indexOf("-")<0)return e;const r=e.split("-");return this.formatLanguageCode(r[0])}formatLanguageCode(e){if(Ke(e)&&e.indexOf("-")>-1){if(typeof Intl<"u"&&typeof Intl.getCanonicalLocales<"u")try{let i=Intl.getCanonicalLocales(e)[0];if(i&&this.options.lowerCaseLng&&(i=i.toLowerCase()),i)return i}catch{}const r=["hans","hant","latn","cyrl","cans","mong","arab"];let n=e.split("-");return this.options.lowerCaseLng?n=n.map(i=>i.toLowerCase()):n.length===2?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),r.indexOf(n[1].toLowerCase())>-1&&(n[1]=_p(n[1].toLowerCase()))):n.length===3&&(n[0]=n[0].toLowerCase(),n[1].length===2&&(n[1]=n[1].toUpperCase()),n[0]!=="sgn"&&n[2].length===2&&(n[2]=n[2].toUpperCase()),r.indexOf(n[1].toLowerCase())>-1&&(n[1]=_p(n[1].toLowerCase())),r.indexOf(n[2].toLowerCase())>-1&&(n[2]=_p(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let r;return e.forEach(n=>{if(r)return;const i=this.formatLanguageCode(n);(!this.options.supportedLngs||this.isSupportedCode(i))&&(r=i)}),!r&&this.options.supportedLngs&&e.forEach(n=>{if(r)return;const i=this.getLanguagePartFromCode(n);if(this.isSupportedCode(i))return r=i;r=this.options.supportedLngs.find(a=>{if(a===i)return a;if(!(a.indexOf("-")<0&&i.indexOf("-")<0)&&(a.indexOf("-")>0&&i.indexOf("-")<0&&a.substring(0,a.indexOf("-"))===i||a.indexOf(i)===0&&i.length>1))return a})}),r||(r=this.getFallbackCodes(this.options.fallbackLng)[0]),r}getFallbackCodes(e,r){if(!e)return[];if(typeof e=="function"&&(e=e(r)),Ke(e)&&(e=[e]),Array.isArray(e))return e;if(!r)return e.default||[];let n=e[r];return n||(n=e[this.getScriptPartFromCode(r)]),n||(n=e[this.formatLanguageCode(r)]),n||(n=e[this.getLanguagePartFromCode(r)]),n||(n=e.default),n||[]}toResolveHierarchy(e,r){const n=this.getFallbackCodes(r||this.options.fallbackLng||[],e),i=[],a=o=>{o&&(this.isSupportedCode(o)?i.push(o):this.logger.warn(`rejecting language code not found in supportedLngs: ${o}`))};return Ke(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&a(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&a(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&a(this.getLanguagePartFromCode(e))):Ke(e)&&a(this.formatLanguageCode(e)),n.forEach(o=>{i.indexOf(o)<0&&a(this.formatLanguageCode(o))}),i}}let lV=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],cV={1:t=>+(t>1),2:t=>+(t!=1),3:t=>0,4:t=>t%10==1&&t%100!=11?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2,5:t=>t==0?0:t==1?1:t==2?2:t%100>=3&&t%100<=10?3:t%100>=11?4:5,6:t=>t==1?0:t>=2&&t<=4?1:2,7:t=>t==1?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2,8:t=>t==1?0:t==2?1:t!=8&&t!=11?2:3,9:t=>+(t>=2),10:t=>t==1?0:t==2?1:t<7?2:t<11?3:4,11:t=>t==1||t==11?0:t==2||t==12?1:t>2&&t<20?2:3,12:t=>+(t%10!=1||t%100==11),13:t=>+(t!==0),14:t=>t==1?0:t==2?1:t==3?2:3,15:t=>t%10==1&&t%100!=11?0:t%10>=2&&(t%100<10||t%100>=20)?1:2,16:t=>t%10==1&&t%100!=11?0:t!==0?1:2,17:t=>t==1||t%10==1&&t%100!=11?0:1,18:t=>t==0?0:t==1?1:2,19:t=>t==1?0:t==0||t%100>1&&t%100<11?1:t%100>10&&t%100<20?2:3,20:t=>t==1?0:t==0||t%100>0&&t%100<20?1:2,21:t=>t%100==1?1:t%100==2?2:t%100==3||t%100==4?3:0,22:t=>t==1?0:t==2?1:(t<0||t>10)&&t%10==0?2:3};const fV=["v1","v2","v3"],dV=["v4"],A1={zero:0,one:1,two:2,few:3,many:4,other:5},hV=()=>{const t={};return lV.forEach(e=>{e.lngs.forEach(r=>{t[r]={numbers:e.nr,plurals:cV[e.fc]}})}),t};class pV{constructor(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=e,this.options=r,this.logger=hi.create("pluralResolver"),(!this.options.compatibilityJSON||dV.includes(this.options.compatibilityJSON))&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=hV(),this.pluralRulesCache={}}addRule(e,r){this.rules[e]=r}clearCache(){this.pluralRulesCache={}}getRule(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi()){const n=Bf(e==="dev"?"en":e),i=r.ordinal?"ordinal":"cardinal",a=JSON.stringify({cleanedCode:n,type:i});if(a in this.pluralRulesCache)return this.pluralRulesCache[a];let o;try{o=new Intl.PluralRules(n,{type:i})}catch{if(!e.match(/-|_/))return;const l=this.languageUtils.getLanguagePartFromCode(e);o=this.getRule(l,r)}return this.pluralRulesCache[a]=o,o}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}needsPlural(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n=this.getRule(e,r);return this.shouldUseIntlApi()?n&&n.resolvedOptions().pluralCategories.length>1:n&&n.numbers.length>1}getPluralFormsOfKey(e,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(e,n).map(i=>`${r}${i}`)}getSuffixes(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n=this.getRule(e,r);return n?this.shouldUseIntlApi()?n.resolvedOptions().pluralCategories.sort((i,a)=>A1[i]-A1[a]).map(i=>`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${i}`):n.numbers.map(i=>this.getSuffix(e,i,r)):[]}getSuffix(e,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const i=this.getRule(e,n);return i?this.shouldUseIntlApi()?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${i.select(r)}`:this.getSuffixRetroCompatible(i,r):(this.logger.warn(`no plural rule found for: ${e}`),"")}getSuffixRetroCompatible(e,r){const n=e.noAbs?e.plurals(r):e.plurals(Math.abs(r));let i=e.numbers[n];this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1&&(i===2?i="plural":i===1&&(i=""));const a=()=>this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString();return this.options.compatibilityJSON==="v1"?i===1?"":typeof i=="number"?`_plural_${i.toString()}`:a():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1?a():this.options.prepend&&n.toString()?this.options.prepend+n.toString():n.toString()}shouldUseIntlApi(){return!fV.includes(this.options.compatibilityJSON)}}const R1=function(t,e,r){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,a=tV(t,e,r);return!a&&i&&Ke(r)&&(a=Ly(t,r,n),a===void 0&&(a=Ly(e,r,n))),a},xp=t=>t.replace(/\$/g,"$$$$");class gV{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=hi.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||(r=>r),this.init(e)}init(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});const{escape:r,escapeValue:n,useRawValueToEscape:i,prefix:a,prefixEscaped:o,suffix:s,suffixEscaped:l,formatSeparator:c,unescapeSuffix:d,unescapePrefix:h,nestingPrefix:g,nestingPrefixEscaped:m,nestingSuffix:v,nestingSuffixEscaped:_,nestingOptionsSeparator:y,maxReplaces:x,alwaysFormat:w}=e.interpolation;this.escape=r!==void 0?r:nV,this.escapeValue=n!==void 0?n:!0,this.useRawValueToEscape=i!==void 0?i:!1,this.prefix=a?Bo(a):o||"{{",this.suffix=s?Bo(s):l||"}}",this.formatSeparator=c||",",this.unescapePrefix=d?"":h||"-",this.unescapeSuffix=this.unescapePrefix?"":d||"",this.nestingPrefix=g?Bo(g):m||Bo("$t("),this.nestingSuffix=v?Bo(v):_||Bo(")"),this.nestingOptionsSeparator=y||",",this.maxReplaces=x||1e3,this.alwaysFormat=w!==void 0?w:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(r,n)=>r&&r.source===n?(r.lastIndex=0,r):new RegExp(n,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(e,r,n,i){let a,o,s;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=m=>{if(m.indexOf(this.formatSeparator)<0){const x=R1(r,l,m,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(x,void 0,n,{...i,...r,interpolationkey:m}):x}const v=m.split(this.formatSeparator),_=v.shift().trim(),y=v.join(this.formatSeparator).trim();return this.format(R1(r,l,_,this.options.keySeparator,this.options.ignoreJSONStructure),y,n,{...i,...r,interpolationkey:_})};this.resetRegExp();const d=i&&i.missingInterpolationHandler||this.options.missingInterpolationHandler,h=i&&i.interpolation&&i.interpolation.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:m=>xp(m)},{regex:this.regexp,safeValue:m=>this.escapeValue?xp(this.escape(m)):xp(m)}].forEach(m=>{for(s=0;a=m.regex.exec(e);){const v=a[1].trim();if(o=c(v),o===void 0)if(typeof d=="function"){const y=d(e,a,i);o=Ke(y)?y:""}else if(i&&Object.prototype.hasOwnProperty.call(i,v))o="";else if(h){o=a[0];continue}else this.logger.warn(`missed to pass in variable ${v} for interpolating ${e}`),o="";else!Ke(o)&&!this.useRawValueToEscape&&(o=x1(o));const _=m.safeValue(o);if(e=e.replace(a[0],_),h?(m.regex.lastIndex+=o.length,m.regex.lastIndex-=a[0].length):m.regex.lastIndex=0,s++,s>=this.maxReplaces)break}}),e}nest(e,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i,a,o;const s=(l,c)=>{const d=this.nestingOptionsSeparator;if(l.indexOf(d)<0)return l;const h=l.split(new RegExp(`${d}[ ]*{`));let g=`{${h[1]}`;l=h[0],g=this.interpolate(g,o);const m=g.match(/'/g),v=g.match(/"/g);(m&&m.length%2===0&&!v||v.length%2!==0)&&(g=g.replace(/'/g,'"'));try{o=JSON.parse(g),c&&(o={...c,...o})}catch(_){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,_),`${l}${d}${g}`}return o.defaultValue&&o.defaultValue.indexOf(this.prefix)>-1&&delete o.defaultValue,l};for(;i=this.nestingRegexp.exec(e);){let l=[];o={...n},o=o.replace&&!Ke(o.replace)?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;let c=!1;if(i[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(i[1])){const d=i[1].split(this.formatSeparator).map(h=>h.trim());i[1]=d.shift(),l=d,c=!0}if(a=r(s.call(this,i[1].trim(),o),o),a&&i[0]===e&&!Ke(a))return a;Ke(a)||(a=x1(a)),a||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${e}`),a=""),c&&(a=l.reduce((d,h)=>this.format(d,h,n.lng,{...n,interpolationkey:i[1].trim()}),a.trim())),e=e.replace(i[0],a),this.regexp.lastIndex=0}return e}}const mV=t=>{let e=t.toLowerCase().trim();const r={};if(t.indexOf("(")>-1){const n=t.split("(");e=n[0].toLowerCase().trim();const i=n[1].substring(0,n[1].length-1);e==="currency"&&i.indexOf(":")<0?r.currency||(r.currency=i.trim()):e==="relativetime"&&i.indexOf(":")<0?r.range||(r.range=i.trim()):i.split(";").forEach(o=>{if(o){const[s,...l]=o.split(":"),c=l.join(":").trim().replace(/^'+|'+$/g,""),d=s.trim();r[d]||(r[d]=c),c==="false"&&(r[d]=!1),c==="true"&&(r[d]=!0),isNaN(c)||(r[d]=parseInt(c,10))}})}return{formatName:e,formatOptions:r}},zo=t=>{const e={};return(r,n,i)=>{let a=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(a={...a,[i.interpolationkey]:void 0});const o=n+JSON.stringify(a);let s=e[o];return s||(s=t(Bf(n),i),e[o]=s),s(r)}};class vV{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=hi.create("formatter"),this.options=e,this.formats={number:zo((r,n)=>{const i=new Intl.NumberFormat(r,{...n});return a=>i.format(a)}),currency:zo((r,n)=>{const i=new Intl.NumberFormat(r,{...n,style:"currency"});return a=>i.format(a)}),datetime:zo((r,n)=>{const i=new Intl.DateTimeFormat(r,{...n});return a=>i.format(a)}),relativetime:zo((r,n)=>{const i=new Intl.RelativeTimeFormat(r,{...n});return a=>i.format(a,n.range||"day")}),list:zo((r,n)=>{const i=new Intl.ListFormat(r,{...n});return a=>i.format(a)})},this.init(e)}init(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};this.formatSeparator=r.interpolation.formatSeparator||","}add(e,r){this.formats[e.toLowerCase().trim()]=r}addCached(e,r){this.formats[e.toLowerCase().trim()]=zo(r)}format(e,r,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const a=r.split(this.formatSeparator);if(a.length>1&&a[0].indexOf("(")>1&&a[0].indexOf(")")<0&&a.find(s=>s.indexOf(")")>-1)){const s=a.findIndex(l=>l.indexOf(")")>-1);a[0]=[a[0],...a.splice(1,s)].join(this.formatSeparator)}return a.reduce((s,l)=>{const{formatName:c,formatOptions:d}=mV(l);if(this.formats[c]){let h=s;try{const g=i&&i.formatParams&&i.formatParams[i.interpolationkey]||{},m=g.locale||g.lng||i.locale||i.lng||n;h=this.formats[c](s,m,{...d,...i,...g})}catch(g){this.logger.warn(g)}return h}else this.logger.warn(`there was no format function for ${c}`);return s},e)}}const yV=(t,e)=>{t.pending[e]!==void 0&&(delete t.pending[e],t.pendingCount--)};class bV extends Od{constructor(e,r,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=e,this.store=r,this.services=n,this.languageUtils=n.languageUtils,this.options=i,this.logger=hi.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(n,i.backend,i)}queueLoad(e,r,n,i){const a={},o={},s={},l={};return e.forEach(c=>{let d=!0;r.forEach(h=>{const g=`${c}|${h}`;!n.reload&&this.store.hasResourceBundle(c,h)?this.state[g]=2:this.state[g]<0||(this.state[g]===1?o[g]===void 0&&(o[g]=!0):(this.state[g]=1,d=!1,o[g]===void 0&&(o[g]=!0),a[g]===void 0&&(a[g]=!0),l[h]===void 0&&(l[h]=!0)))}),d||(s[c]=!0)}),(Object.keys(a).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(a),pending:Object.keys(o),toLoadLanguages:Object.keys(s),toLoadNamespaces:Object.keys(l)}}loaded(e,r,n){const i=e.split("|"),a=i[0],o=i[1];r&&this.emit("failedLoading",a,o,r),!r&&n&&this.store.addResourceBundle(a,o,n,void 0,void 0,{skipCopy:!0}),this.state[e]=r?-1:2,r&&n&&(this.state[e]=0);const s={};this.queue.forEach(l=>{eV(l.loaded,[a],o),yV(l,e),r&&l.errors.push(r),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(c=>{s[c]||(s[c]={});const d=l.loaded[c];d.length&&d.forEach(h=>{s[c][h]===void 0&&(s[c][h]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",s),this.queue=this.queue.filter(l=>!l.done)}read(e,r,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,o=arguments.length>5?arguments[5]:void 0;if(!e.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:r,fcName:n,tried:i,wait:a,callback:o});return}this.readingCalls++;const s=(c,d)=>{if(this.readingCalls--,this.waitingReads.length>0){const h=this.waitingReads.shift();this.read(h.lng,h.ns,h.fcName,h.tried,h.wait,h.callback)}if(c&&d&&i<this.maxRetries){setTimeout(()=>{this.read.call(this,e,r,n,i+1,a*2,o)},a);return}o(c,d)},l=this.backend[n].bind(this.backend);if(l.length===2){try{const c=l(e,r);c&&typeof c.then=="function"?c.then(d=>s(null,d)).catch(s):s(null,c)}catch(c){s(c)}return}return l(e,r,s)}prepareLoading(e,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();Ke(e)&&(e=this.languageUtils.toResolveHierarchy(e)),Ke(r)&&(r=[r]);const a=this.queueLoad(e,r,n,i);if(!a.toLoad.length)return a.pending.length||i(),null;a.toLoad.forEach(o=>{this.loadOne(o)})}load(e,r,n){this.prepareLoading(e,r,{},n)}reload(e,r,n){this.prepareLoading(e,r,{reload:!0},n)}loadOne(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const n=e.split("|"),i=n[0],a=n[1];this.read(i,a,"read",void 0,void 0,(o,s)=>{o&&this.logger.warn(`${r}loading namespace ${a} for language ${i} failed`,o),!o&&s&&this.logger.log(`${r}loaded namespace ${a} for language ${i}`,s),this.loaded(e,o,s)})}saveMissing(e,r,n,i,a){let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},s=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(r)){this.logger.warn(`did not save key "${n}" as the namespace "${r}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(n==null||n==="")){if(this.backend&&this.backend.create){const l={...o,isUpdate:a},c=this.backend.create.bind(this.backend);if(c.length<6)try{let d;c.length===5?d=c(e,r,n,i,l):d=c(e,r,n,i),d&&typeof d.then=="function"?d.then(h=>s(null,h)).catch(s):s(null,d)}catch(d){s(d)}else c(e,r,n,i,s,l)}!e||!e[0]||this.store.addResource(e[0],r,n,i)}}}const I1=()=>({debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:t=>{let e={};if(typeof t[1]=="object"&&(e=t[1]),Ke(t[1])&&(e.defaultValue=t[1]),Ke(t[2])&&(e.tDescription=t[2]),typeof t[2]=="object"||typeof t[3]=="object"){const r=t[3]||t[2];Object.keys(r).forEach(n=>{e[n]=r[n]})}return e},interpolation:{escapeValue:!0,format:t=>t,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),D1=t=>(Ke(t.ns)&&(t.ns=[t.ns]),Ke(t.fallbackLng)&&(t.fallbackLng=[t.fallbackLng]),Ke(t.fallbackNS)&&(t.fallbackNS=[t.fallbackNS]),t.supportedLngs&&t.supportedLngs.indexOf("cimode")<0&&(t.supportedLngs=t.supportedLngs.concat(["cimode"])),t),Xl=()=>{},_V=t=>{Object.getOwnPropertyNames(Object.getPrototypeOf(t)).forEach(r=>{typeof t[r]=="function"&&(t[r]=t[r].bind(t))})};class Pu extends Od{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;if(super(),this.options=D1(e),this.services={},this.logger=hi,this.modules={external:[]},_V(this),r&&!this.isInitialized&&!e.isClone){if(!this.options.initImmediate)return this.init(e,r),this;setTimeout(()=>{this.init(e,r)},0)}}init(){var e=this;let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof r=="function"&&(n=r,r={}),!r.defaultNS&&r.defaultNS!==!1&&r.ns&&(Ke(r.ns)?r.defaultNS=r.ns:r.ns.indexOf("translation")<0&&(r.defaultNS=r.ns[0]));const i=I1();this.options={...i,...this.options,...D1(r)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...i.interpolation,...this.options.interpolation}),r.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=r.keySeparator),r.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=r.nsSeparator);const a=d=>d?typeof d=="function"?new d:d:null;if(!this.options.isClone){this.modules.logger?hi.init(a(this.modules.logger),this.options):hi.init(null,this.options);let d;this.modules.formatter?d=this.modules.formatter:typeof Intl<"u"&&(d=vV);const h=new O1(this.options);this.store=new C1(this.options.resources,this.options);const g=this.services;g.logger=hi,g.resourceStore=this.store,g.languageUtils=h,g.pluralResolver=new pV(h,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),d&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)&&(g.formatter=a(d),g.formatter.init(g,this.options),this.options.interpolation.format=g.formatter.format.bind(g.formatter)),g.interpolator=new gV(this.options),g.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},g.backendConnector=new bV(a(this.modules.backend),g.resourceStore,g,this.options),g.backendConnector.on("*",function(m){for(var v=arguments.length,_=new Array(v>1?v-1:0),y=1;y<v;y++)_[y-1]=arguments[y];e.emit(m,..._)}),this.modules.languageDetector&&(g.languageDetector=a(this.modules.languageDetector),g.languageDetector.init&&g.languageDetector.init(g,this.options.detection,this.options)),this.modules.i18nFormat&&(g.i18nFormat=a(this.modules.i18nFormat),g.i18nFormat.init&&g.i18nFormat.init(this)),this.translator=new Vf(this.services,this.options),this.translator.on("*",function(m){for(var v=arguments.length,_=new Array(v>1?v-1:0),y=1;y<v;y++)_[y-1]=arguments[y];e.emit(m,..._)}),this.modules.external.forEach(m=>{m.init&&m.init(this)})}if(this.format=this.options.interpolation.format,n||(n=Xl),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const d=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);d.length>0&&d[0]!=="dev"&&(this.options.lng=d[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(d=>{this[d]=function(){return e.store[d](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(d=>{this[d]=function(){return e.store[d](...arguments),e}});const l=tu(),c=()=>{const d=(h,g)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),l.resolve(g),n(h,g)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return d(null,this.t.bind(this));this.changeLanguage(this.options.lng,d)};return this.options.resources||!this.options.initImmediate?c():setTimeout(c,0),l}loadResources(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Xl;const i=Ke(e)?e:this.language;if(typeof e=="function"&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(i&&i.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return n();const a=[],o=s=>{if(!s||s==="cimode")return;this.services.languageUtils.toResolveHierarchy(s).forEach(c=>{c!=="cimode"&&a.indexOf(c)<0&&a.push(c)})};i?o(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(l=>o(l)),this.options.preload&&this.options.preload.forEach(s=>o(s)),this.services.backendConnector.load(a,this.options.ns,s=>{!s&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(s)})}else n(null)}reloadResources(e,r,n){const i=tu();return typeof e=="function"&&(n=e,e=void 0),typeof r=="function"&&(n=r,r=void 0),e||(e=this.languages),r||(r=this.options.ns),n||(n=Xl),this.services.backendConnector.reload(e,r,a=>{i.resolve(),n(a)}),i}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return e.type==="backend"&&(this.modules.backend=e),(e.type==="logger"||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type==="languageDetector"&&(this.modules.languageDetector=e),e.type==="i18nFormat"&&(this.modules.i18nFormat=e),e.type==="postProcessor"&&tD.addPostProcessor(e),e.type==="formatter"&&(this.modules.formatter=e),e.type==="3rdParty"&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!(["cimode","dev"].indexOf(e)>-1))for(let r=0;r<this.languages.length;r++){const n=this.languages[r];if(!(["cimode","dev"].indexOf(n)>-1)&&this.store.hasLanguageSomeTranslations(n)){this.resolvedLanguage=n;break}}}changeLanguage(e,r){var n=this;this.isLanguageChangingTo=e;const i=tu();this.emit("languageChanging",e);const a=l=>{this.language=l,this.languages=this.services.languageUtils.toResolveHierarchy(l),this.resolvedLanguage=void 0,this.setResolvedLanguage(l)},o=(l,c)=>{c?(a(c),this.translator.changeLanguage(c),this.isLanguageChangingTo=void 0,this.emit("languageChanged",c),this.logger.log("languageChanged",c)):this.isLanguageChangingTo=void 0,i.resolve(function(){return n.t(...arguments)}),r&&r(l,function(){return n.t(...arguments)})},s=l=>{!e&&!l&&this.services.languageDetector&&(l=[]);const c=Ke(l)?l:this.services.languageUtils.getBestMatchFromCodes(l);c&&(this.language||a(c),this.translator.language||this.translator.changeLanguage(c),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(c)),this.loadResources(c,d=>{o(d,c)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?s(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(s):this.services.languageDetector.detect(s):s(e),i}getFixedT(e,r,n){var i=this;const a=function(o,s){let l;if(typeof s!="object"){for(var c=arguments.length,d=new Array(c>2?c-2:0),h=2;h<c;h++)d[h-2]=arguments[h];l=i.options.overloadTranslationOptionHandler([o,s].concat(d))}else l={...s};l.lng=l.lng||a.lng,l.lngs=l.lngs||a.lngs,l.ns=l.ns||a.ns,l.keyPrefix!==""&&(l.keyPrefix=l.keyPrefix||n||a.keyPrefix);const g=i.options.keySeparator||".";let m;return l.keyPrefix&&Array.isArray(o)?m=o.map(v=>`${l.keyPrefix}${g}${v}`):m=l.keyPrefix?`${l.keyPrefix}${g}${o}`:o,i.t(m,l)};return Ke(e)?a.lng=e:a.lngs=e,a.ns=r,a.keyPrefix=n,a}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const n=r.lng||this.resolvedLanguage||this.languages[0],i=this.options?this.options.fallbackLng:!1,a=this.languages[this.languages.length-1];if(n.toLowerCase()==="cimode")return!0;const o=(s,l)=>{const c=this.services.backendConnector.state[`${s}|${l}`];return c===-1||c===0||c===2};if(r.precheck){const s=r.precheck(this,o);if(s!==void 0)return s}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||o(n,e)&&(!i||o(a,e)))}loadNamespaces(e,r){const n=tu();return this.options.ns?(Ke(e)&&(e=[e]),e.forEach(i=>{this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}),this.loadResources(i=>{n.resolve(),r&&r(i)}),n):(r&&r(),Promise.resolve())}loadLanguages(e,r){const n=tu();Ke(e)&&(e=[e]);const i=this.options.preload||[],a=e.filter(o=>i.indexOf(o)<0&&this.services.languageUtils.isSupportedCode(o));return a.length?(this.options.preload=i.concat(a),this.loadResources(o=>{n.resolve(),r&&r(o)}),n):(r&&r(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!e)return"rtl";const r=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],n=this.services&&this.services.languageUtils||new O1(I1());return r.indexOf(n.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;return new Pu(e,r)}cloneInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Xl;const n=e.forkResourceStore;n&&delete e.forkResourceStore;const i={...this.options,...e,isClone:!0},a=new Pu(i);return(e.debug!==void 0||e.prefix!==void 0)&&(a.logger=a.logger.clone(e)),["store","services","language"].forEach(s=>{a[s]=this[s]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},n&&(a.store=new C1(this.store.data,i),a.services.resourceStore=a.store),a.translator=new Vf(a.services,i),a.translator.on("*",function(s){for(var l=arguments.length,c=new Array(l>1?l-1:0),d=1;d<l;d++)c[d-1]=arguments[d];a.emit(s,...c)}),a.init(i,r),a.translator.options=i,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const $r=Pu.createInstance();$r.createInstance=Pu.createInstance;$r.createInstance;$r.dir;$r.init;$r.loadResources;$r.reloadResources;$r.use;$r.changeLanguage;$r.getFixedT;$r.t;$r.exists;$r.setDefaultNamespace;$r.hasLoadedNamespace;$r.loadNamespaces;$r.loadLanguages;const xV="Approve",wV="Approved",TV="Copy",SV="Deny",CV="Denied",EV="Expand",OV="Retry",AV="Start",RV="Yes",IV="No",DV="and",MV="Hide",PV="Back",LV="Forward",NV="Close",FV="Next",kV="Cancel",jV="Yes, Submit",$V="Dismiss",UV="Save",qV="Search",HV="Loading",WV={completed:"Authentication completed","signing-in":"Signing in...","signing-out":"Signing out...",unauthorized:"You're not authorized to access this page."},BV={attachments:"Attachments",label:"Click here to browse your PC or drop files to upload","created-by-on-time":"by {{createdBy}} on {{date}}","files-too-large":"The following files exceed the maximum size of {{maxSize}}: {{files}}","max-size-label":"Max file size is 10MB with accepted file formats of: JPG (JPEG), PNG, PDF, GIF, DOC/X, XLS/X, CSV"},zV={disclaimer:"Draft","create-user-title":"Add New User","create-ticket-title":"Support Ticket"},VV={"assets-counter":"{{assets}} locations","select-assets":"Select Locations","select-all":"Select All","assets-search-placeholder":"Search by Site or Asset Name...","no-assets-description":"This site contains no assets, click NEXT to continue.","asset-item":"Asset item","view-ticket":"View Ticket"},GV="Active",KV="Phone",XV="Email",YV="Account",ZV="Accounts",JV="Role",QV="Roles",e5="Option",t5="Options",r5="From",n5="To",i5="More",a5="Logout",o5="Refresh",s5={404:{title:"This Page could not be found.",detail:"The page you are after doesn't exist, or no longer exists. Check out the homepage instead.",button:"go to homepage"},approve:xV,approved:wV,copy:TV,deny:SV,denied:CV,expand:EV,"approve-all":"Approve All","deny-all":"Deny All",retry:OV,start:AV,yes:RV,no:IV,and:DV,"error-title":"Error:","error-message":"An error occurred, please try again.","enhanced-error-message":"We are unable to display the relevant ticket information. For further assistance, please share the below details with us via <1>GlobalPortal@digitalrealty.com</1>","error-api":"API is not responding",hide:MV,"edit-details":"Edit Details",back:PV,"go-back":"Go Back",forward:LV,close:NV,next:FV,cancel:kV,submit:jV,dismiss:$V,"sort-by":"Sort by",save:UV,"save-changes":"Save Changes","changes-saved":"Changes Saved","changes-not-saved":"Changes Can not Be Saved","try-again":"Try again","request-error-message":"We are unable to process your request. Please, try again or reach out to us for further assistance. We apologize for the inconvenience. Your Digital Realty Team",search:qV,"close-button":"Close Button","open-button":"Open Button",loading:HV,"app-loading":"Loading...","redirect-soon":"You will be redirected soon.",auth:WV,dropzone:BV,draft:zV,"cancel-dialog":{title:"Are you sure do you want to cancel?",text:"All the details provided will be lost.",dismiss:"Dismiss",cancel:{"add-user":"Cancel Adding User","create-ticket":"Request Cancellation"},"cancel-ticket-creation":{title:"Are you sure you want to proceed? All details provided will be lost.",yes:"Yes",no:"No"}},tickets:VV,"view-all":"View all","view-attachment-button":"view attachment button","download-attachment-button":"download attachment button","hide-button":"hide button","close-buton":"close buton","previous-button":"previous button","next-button":"next button",active:GV,"notifications-button":"Notifications Button","expand-navbar-button":"Expand Navbar Button","search-field":"Search Field","search-icon":"Search Icon","search-button":"Search Button",phone:KV,email:XV,"datagrid-no-rows":"No data to display","no-attachments":"No attachments",account_one:YV,account_other:ZV,role_one:JV,role_other:QV,"last-update":"Last Update","no-comments":"No Comments",option_one:e5,option_other:t5,from:r5,to:n5,"email-helper-text":"Enter email addresses separated by a comma, semicolon or the Enter key.","master-account":"Master Account","master-account-label":"Open the Account Selector","unsaved-changes-title":"Attention","unsaved-changes-message":"There are unsaved changes on this page, save or discard them before leaving.",more:i5,"not-implemented":"Not Implemented",logout:a5,refresh:o5,"record-version":{"record-has-been-updated":"Record has been updated","refresh-page":"Refresh the page to see the latest record."},"view-list":"View List"},u5="Chart Overview",l5="DCIM data for the past 7 days shown below. Click a chart to view details and change the range.",c5={title:"Alerts","configure-alerts-button":"Configure Alerts",types:{title:"Alert Types",all:"All",critical:"Critical",custom:"Custom",history:"History"},categories:{title:"Alert Categories",all:"All",power:"Power",environmental:"Environmental",auxiliary:"Auxiliary"},details:{title:"Alert Instances","alert-number":"Alert Number",site:"Site",location:"Location","total-load":"Total Load","threshold-value":"Threshold Value","affected-ci":"Affected CI",description:"Description","alert-timeline-summary":"Alert Timeline Summary","alert-generated-on":"Alert Generated On",duration:"Duration",error:"Server error fetching alert data"},definitions:{title:"Alert Definitions","warning-message":"Ensure your mobile service provider does not block automated text messaging if you subscribe to that notification method."}},f5="Cancel",d5={"no-dcim-data-available":"No DCIM data available for this location","no-dcim-data-available-chart":"No DCIM data available for this chart",title:u5,subtitle:l5,"dcim-chart":{"load-fail":{title:"Charts could not be loaded.",message:"The charts for this location are currently not available. Check back later, or contact support."},"toggle-device":"Toggle {{id}}","y-axis-metric":"Y-Axis Metric",timezone:{utc:"Time shown in Coordinated Universal Time (UTC)"},"show-alert-data":"Show Alert Data","date-range":{from:"From",to:"to",errors:{"from-required":"Select a from date.","to-required":"Select a to date.",future:"Select a date no later than today.","to-before-from":"Select a to date on or after the from date."}},utc:"UTC",increments:{label:"Increments",day:"1 Day",hour:"60 Minutes","15-minute":"15 Minutes","5-minute":"5 Minutes",minute:"1 Minute"},view:{trend:"Trend",daily:"Daily"},"point-value":{current:"Value","daily-avg":"Daily Avg","daily-min":"Daily Min","daily-max":"Daily Max",alert:"[{{type}}] {{category}} alert"},"device-selector":{label:"Devices on Chart","deselect-all":"Deselect all","select-all":"Select all"},export:{"file-name":"{{view}} Data for {{location}} - {{site}}",header:{deviceDataId:"Device ID",deviceName:"Device Name",date:"Date",minValue:"Min",maxValue:"Max",pointValue:"Average"}}},alerts:c5,"customize-alert-dialog":{title:"Customize Alert",message:"You can choose to customize this alert. Digital Realty will not take actions on custom alerts.","it-load-level":"IT Load Level",threshold:"Threshold","total-ITkW":"TotalITkW >","email-alerts":"Email Alerts","sms-alerts":"SMS Alerts","bottom-message":"Ensure your mobile service provider does not block automated text messaging if you subscribe to that notification method.","cancel-button":"Cancel","save-button":"Save","success-updated":"Alert updated","success-custom-created":"Custom alert created","success-custom-updated":"Custom alert updated","success-critical-updated":"Critical alert updated","server-error":"Server Error","threshold-validation-error":"Threshold is outside the allowed range","critical-enrollment-operator-and-threshold-empty":"Cannot update Custom Alert threshold because Parent has empty comparison operator and threshold"},"alert-instance":{alertId:"Alert Id",site:"Site",location:"Location",alertName:"Alert Name",deviceName:"Device Name",functionValue:"{{device}} Current Value",alertTimeStamp:"Opened",alertType:"Alert Type",configurationItem:"Configuration Item"},"alert-definition":{deviceName:"Device Name",threshold:"Threshold",liveValue:"Live Value",timeStamp:"Time Stamp"},"alert-list":{"sort-by":"Sort By",deviceName:"Device Name",functionValue:"Device Function",threshold:"Threshold"},cancel:f5},h5="Notifications",p5={planned_site_maintenance:"Planned Site Maintenance",emergency_repair:"Emergency Repair",dcim_alert:"DCIM Alert",service_ticket_update:"Service Ticket Update"},g5="Today",m5="Earlier",v5={notifications:h5,type:p5,"type-group":{planned_site_maintenance:"$t(type.planned_site_maintenance)",emergency_repair:"$t(type.emergency_repair)s",dcim_alert:"$t(type.dcim_alert)s",service_ticket_update:"$t(type.service_ticket_update)s"},"none-yet":"No notifications yet.","group-by":{type:"Sort by type",date:"Sort by type"},today:g5,earlier:m5,"mark-all-read":"Mark All Read","mark-all-read-confirmation-message":"Are you sure you want to mark all notifications as read?","filter-by-type":"Filter by type","filter-by-date":"Filter by date","filter-list":"Filter List","clear-all":"Clear All",delete:"Are you sure you want to delete this notification?"};$r.use(Lz).init({resources:{en:{common:s5,location:d5,notifications:v5}},interpolation:{escapeValue:!1},lng:"en"});const mae=async t=>{},y5={defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:!1}}},vae=new uq(y5);var wp,M1;function Ts(){return M1||(M1=1,wp=TypeError),wp}const b5={},_5=Object.freeze(Object.defineProperty({__proto__:null,default:b5},Symbol.toStringTag,{value:"Module"})),x5=qU(_5);var Tp,P1;function Ad(){if(P1)return Tp;P1=1;var t=typeof Map=="function"&&Map.prototype,e=Object.getOwnPropertyDescriptor&&t?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,r=t&&e&&typeof e.get=="function"?e.get:null,n=t&&Map.prototype.forEach,i=typeof Set=="function"&&Set.prototype,a=Object.getOwnPropertyDescriptor&&i?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,o=i&&a&&typeof a.get=="function"?a.get:null,s=i&&Set.prototype.forEach,l=typeof WeakMap=="function"&&WeakMap.prototype,c=l?WeakMap.prototype.has:null,d=typeof WeakSet=="function"&&WeakSet.prototype,h=d?WeakSet.prototype.has:null,g=typeof WeakRef=="function"&&WeakRef.prototype,m=g?WeakRef.prototype.deref:null,v=Boolean.prototype.valueOf,_=Object.prototype.toString,y=Function.prototype.toString,x=String.prototype.match,w=String.prototype.slice,C=String.prototype.replace,A=String.prototype.toUpperCase,E=String.prototype.toLowerCase,S=RegExp.prototype.test,T=Array.prototype.concat,D=Array.prototype.join,P=Array.prototype.slice,N=Math.floor,F=typeof BigInt=="function"?BigInt.prototype.valueOf:null,B=Object.getOwnPropertySymbols,W=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,te=typeof Symbol=="function"&&typeof Symbol.iterator=="object",J=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===te||!0)?Symbol.toStringTag:null,ie=Object.prototype.propertyIsEnumerable,le=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(V){return V.__proto__}:null);function se(V,G){if(V===1/0||V===-1/0||V!==V||V&&V>-1e3&&V<1e3||S.call(/e/,G))return G;var ut=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof V=="number"){var Tt=V<0?-N(-V):N(V);if(Tt!==V){var Dt=String(Tt),Ve=w.call(G,Dt.length+1);return C.call(Dt,ut,"$&_")+"."+C.call(C.call(Ve,/([0-9]{3})/g,"$&_"),/_$/,"")}}return C.call(G,ut,"$&_")}var ce=x5,Q=ce.custom,$=Fe(Q)?Q:null,X={__proto__:null,double:'"',single:"'"},Z={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};Tp=function V(G,ut,Tt,Dt){var Ve=ut||{};if(Ze(Ve,"quoteStyle")&&!Ze(X,Ve.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Ze(Ve,"maxStringLength")&&(typeof Ve.maxStringLength=="number"?Ve.maxStringLength<0&&Ve.maxStringLength!==1/0:Ve.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var qr=Ze(Ve,"customInspect")?Ve.customInspect:!0;if(typeof qr!="boolean"&&qr!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Ze(Ve,"indent")&&Ve.indent!==null&&Ve.indent!==" "&&!(parseInt(Ve.indent,10)===Ve.indent&&Ve.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Ze(Ve,"numericSeparator")&&typeof Ve.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var Cn=Ve.numericSeparator;if(typeof G>"u")return"undefined";if(G===null)return"null";if(typeof G=="boolean")return G?"true":"false";if(typeof G=="string")return nt(G,Ve);if(typeof G=="number"){if(G===0)return 1/0/G>0?"0":"-0";var Tr=String(G);return Cn?se(G,Tr):Tr}if(typeof G=="bigint"){var En=String(G)+"n";return Cn?se(G,En):En}var zi=typeof Ve.depth>"u"?5:Ve.depth;if(typeof Tt>"u"&&(Tt=0),Tt>=zi&&zi>0&&typeof G=="object")return Le(G)?"[Array]":"[Object]";var dn=Ir(Ve,Tt);if(typeof Dt>"u")Dt=[];else if(Yr(Dt,G)>=0)return"[Circular]";function br(mt,lt,Ht){if(lt&&(Dt=P.call(Dt),Dt.push(lt)),Ht){var Bn={depth:Ve.depth};return Ze(Ve,"quoteStyle")&&(Bn.quoteStyle=Ve.quoteStyle),V(mt,Bn,Tt+1,Dt)}return V(mt,Ve,Tt+1,Dt)}if(typeof G=="function"&&!he(G)){var Co=Lr(G),Eo=Wn(G,br);return"[Function"+(Co?": "+Co:" (anonymous)")+"]"+(Eo.length>0?" { "+D.call(Eo,", ")+" }":"")}if(Fe(G)){var k=te?C.call(String(G),/^(Symbol\(.*\))_[^)]*$/,"$1"):W.call(G);return typeof G=="object"&&!te?Ot(k):k}if(Ue(G)){for(var q="<"+E.call(String(G.nodeName)),K=G.attributes||[],ae=0;ae<K.length;ae++)q+=" "+K[ae].name+"="+fe(be(K[ae].value),"double",Ve);return q+=">",G.childNodes&&G.childNodes.length&&(q+="..."),q+="</"+E.call(String(G.nodeName))+">",q}if(Le(G)){if(G.length===0)return"[]";var pe=Wn(G,br);return dn&&!yi(pe)?"["+Sn(pe,dn)+"]":"[ "+D.call(pe,", ")+" ]"}if(ge(G)){var Me=Wn(G,br);return!("cause"in Error.prototype)&&"cause"in G&&!ie.call(G,"cause")?"{ ["+String(G)+"] "+D.call(T.call("[cause]: "+br(G.cause),Me),", ")+" }":Me.length===0?"["+String(G)+"]":"{ ["+String(G)+"] "+D.call(Me,", ")+" }"}if(typeof G=="object"&&qr){if($&&typeof G[$]=="function"&&ce)return ce(G,{depth:zi-Tt});if(qr!=="symbol"&&typeof G.inspect=="function")return G.inspect()}if(fr(G)){var qe=[];return n&&n.call(G,function(mt,lt){qe.push(br(lt,G,!0)+" => "+br(mt,G))}),Ur("Map",r.call(G),qe,dn)}if(me(G)){var Se=[];return s&&s.call(G,function(mt){Se.push(br(mt,G))}),Ur("Set",o.call(G),Se,dn)}if(z(G))return Zr("WeakMap");if(De(G))return Zr("WeakSet");if(de(G))return Zr("WeakRef");if(we(G))return Ot(br(Number(G)));if(Be(G))return Ot(br(F.call(G)));if(ve(G))return Ot(v.call(G));if(Ne(G))return Ot(br(String(G)));if(typeof window<"u"&&G===window)return"{ [object Window] }";if(typeof globalThis<"u"&&G===globalThis||typeof di<"u"&&G===di)return"{ [object globalThis] }";if(!Ae(G)&&!he(G)){var Oe=Wn(G,br),Te=le?le(G)===Object.prototype:G instanceof Object||G.constructor===Object,Ie=G instanceof Object?"":"null prototype",ze=!Te&&J&&Object(G)===G&&J in G?w.call(gt(G),8,-1):Ie?"Object":"",it=Te||typeof G.constructor!="function"?"":G.constructor.name?G.constructor.name+" ":"",er=it+(ze||Ie?"["+D.call(T.call([],ze||[],Ie||[]),": ")+"] ":"");return Oe.length===0?er+"{}":dn?er+"{"+Sn(Oe,dn)+"}":er+"{ "+D.call(Oe,", ")+" }"}return String(G)};function fe(V,G,ut){var Tt=ut.quoteStyle||G,Dt=X[Tt];return Dt+V+Dt}function be(V){return C.call(String(V),/"/g,""")}function _e(V){return!J||!(typeof V=="object"&&(J in V||typeof V[J]<"u"))}function Le(V){return gt(V)==="[object Array]"&&_e(V)}function Ae(V){return gt(V)==="[object Date]"&&_e(V)}function he(V){return gt(V)==="[object RegExp]"&&_e(V)}function ge(V){return gt(V)==="[object Error]"&&_e(V)}function Ne(V){return gt(V)==="[object String]"&&_e(V)}function we(V){return gt(V)==="[object Number]"&&_e(V)}function ve(V){return gt(V)==="[object Boolean]"&&_e(V)}function Fe(V){if(te)return V&&typeof V=="object"&&V instanceof Symbol;if(typeof V=="symbol")return!0;if(!V||typeof V!="object"||!W)return!1;try{return W.call(V),!0}catch{}return!1}function Be(V){if(!V||typeof V!="object"||!F)return!1;try{return F.call(V),!0}catch{}return!1}var ke=Object.prototype.hasOwnProperty||function(V){return V in this};function Ze(V,G){return ke.call(V,G)}function gt(V){return _.call(V)}function Lr(V){if(V.name)return V.name;var G=x.call(y.call(V),/^function\s*([\w$]+)/);return G?G[1]:null}function Yr(V,G){if(V.indexOf)return V.indexOf(G);for(var ut=0,Tt=V.length;ut<Tt;ut++)if(V[ut]===G)return ut;return-1}function fr(V){if(!r||!V||typeof V!="object")return!1;try{r.call(V);try{o.call(V)}catch{return!0}return V instanceof Map}catch{}return!1}function z(V){if(!c||!V||typeof V!="object")return!1;try{c.call(V,c);try{h.call(V,h)}catch{return!0}return V instanceof WeakMap}catch{}return!1}function de(V){if(!m||!V||typeof V!="object")return!1;try{return m.call(V),!0}catch{}return!1}function me(V){if(!o||!V||typeof V!="object")return!1;try{o.call(V);try{r.call(V)}catch{return!0}return V instanceof Set}catch{}return!1}function De(V){if(!h||!V||typeof V!="object")return!1;try{h.call(V,h);try{c.call(V,c)}catch{return!0}return V instanceof WeakSet}catch{}return!1}function Ue(V){return!V||typeof V!="object"?!1:typeof HTMLElement<"u"&&V instanceof HTMLElement?!0:typeof V.nodeName=="string"&&typeof V.getAttribute=="function"}function nt(V,G){if(V.length>G.maxStringLength){var ut=V.length-G.maxStringLength,Tt="... "+ut+" more character"+(ut>1?"s":"");return nt(w.call(V,0,G.maxStringLength),G)+Tt}var Dt=Z[G.quoteStyle||"single"];Dt.lastIndex=0;var Ve=C.call(C.call(V,Dt,"\\$1"),/[\x00-\x1f]/g,Et);return fe(Ve,"single",G)}function Et(V){var G=V.charCodeAt(0),ut={8:"b",9:"t",10:"n",12:"f",13:"r"}[G];return ut?"\\"+ut:"\\x"+(G<16?"0":"")+A.call(G.toString(16))}function Ot(V){return"Object("+V+")"}function Zr(V){return V+" { ? }"}function Ur(V,G,ut,Tt){var Dt=Tt?Sn(ut,Tt):D.call(ut,", ");return V+" ("+G+") {"+Dt+"}"}function yi(V){for(var G=0;G<V.length;G++)if(Yr(V[G],`
|
|
66
|
+
`)>=0)return!1;return!0}function Ir(V,G){var ut;if(V.indent===" ")ut=" ";else if(typeof V.indent=="number"&&V.indent>0)ut=D.call(Array(V.indent+1)," ");else return null;return{base:ut,prev:D.call(Array(G+1),ut)}}function Sn(V,G){if(V.length===0)return"";var ut=`
|
|
67
|
+
`+G.prev+G.base;return ut+D.call(V,","+ut)+`
|
|
68
|
+
`+G.prev}function Wn(V,G){var ut=Le(V),Tt=[];if(ut){Tt.length=V.length;for(var Dt=0;Dt<V.length;Dt++)Tt[Dt]=Ze(V,Dt)?G(V[Dt],V):""}var Ve=typeof B=="function"?B(V):[],qr;if(te){qr={};for(var Cn=0;Cn<Ve.length;Cn++)qr["$"+Ve[Cn]]=Ve[Cn]}for(var Tr in V)Ze(V,Tr)&&(ut&&String(Number(Tr))===Tr&&Tr<V.length||te&&qr["$"+Tr]instanceof Symbol||(S.call(/[^\w$]/,Tr)?Tt.push(G(Tr,V)+": "+G(V[Tr],V)):Tt.push(Tr+": "+G(V[Tr],V))));if(typeof B=="function")for(var En=0;En<Ve.length;En++)ie.call(V,Ve[En])&&Tt.push("["+G(Ve[En])+"]: "+G(V[Ve[En]],V));return Tt}return Tp}var Sp,L1;function w5(){if(L1)return Sp;L1=1;var t=Ad(),e=Ts(),r=function(s,l,c){for(var d=s,h;(h=d.next)!=null;d=h)if(h.key===l)return d.next=h.next,c||(h.next=s.next,s.next=h),h},n=function(s,l){if(s){var c=r(s,l);return c&&c.value}},i=function(s,l,c){var d=r(s,l);d?d.value=c:s.next={key:l,next:s.next,value:c}},a=function(s,l){return s?!!r(s,l):!1},o=function(s,l){if(s)return r(s,l,!0)};return Sp=function(){var l,c={assert:function(d){if(!c.has(d))throw new e("Side channel does not contain "+t(d))},delete:function(d){var h=o(l,d);return h&&l&&!l.next&&(l=void 0),!!h},get:function(d){return n(l,d)},has:function(d){return a(l,d)},set:function(d,h){l||(l={next:void 0}),i(l,d,h)}};return c},Sp}var Cp,N1;function rD(){return N1||(N1=1,Cp=Object),Cp}var Ep,F1;function T5(){return F1||(F1=1,Ep=Error),Ep}var Op,k1;function S5(){return k1||(k1=1,Op=EvalError),Op}var Ap,j1;function C5(){return j1||(j1=1,Ap=RangeError),Ap}var Rp,$1;function E5(){return $1||($1=1,Rp=ReferenceError),Rp}var Ip,U1;function O5(){return U1||(U1=1,Ip=SyntaxError),Ip}var Dp,q1;function A5(){return q1||(q1=1,Dp=URIError),Dp}var Mp,H1;function R5(){return H1||(H1=1,Mp=Math.abs),Mp}var Pp,W1;function I5(){return W1||(W1=1,Pp=Math.floor),Pp}var Lp,B1;function D5(){return B1||(B1=1,Lp=Math.max),Lp}var Np,z1;function M5(){return z1||(z1=1,Np=Math.min),Np}var Fp,V1;function P5(){return V1||(V1=1,Fp=Math.pow),Fp}var kp,G1;function L5(){return G1||(G1=1,kp=Math.round),kp}var jp,K1;function N5(){return K1||(K1=1,jp=Number.isNaN||function(e){return e!==e}),jp}var $p,X1;function F5(){if(X1)return $p;X1=1;var t=N5();return $p=function(r){return t(r)||r===0?r:r<0?-1:1},$p}var Up,Y1;function k5(){return Y1||(Y1=1,Up=Object.getOwnPropertyDescriptor),Up}var qp,Z1;function nD(){if(Z1)return qp;Z1=1;var t=k5();if(t)try{t([],"length")}catch{t=null}return qp=t,qp}var Hp,J1;function iD(){if(J1)return Hp;J1=1;var t=Object.defineProperty||!1;if(t)try{t({},"a",{value:1})}catch{t=!1}return Hp=t,Hp}var Wp,Q1;function j5(){return Q1||(Q1=1,Wp=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var i=42;e[r]=i;for(var a in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var o=Object.getOwnPropertySymbols(e);if(o.length!==1||o[0]!==r||!Object.prototype.propertyIsEnumerable.call(e,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(e,r);if(s.value!==i||s.enumerable!==!0)return!1}return!0}),Wp}var Bp,eT;function $5(){if(eT)return Bp;eT=1;var t=typeof Symbol<"u"&&Symbol,e=j5();return Bp=function(){return typeof t!="function"||typeof Symbol!="function"||typeof t("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:e()},Bp}var zp,tT;function aD(){return tT||(tT=1,zp=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),zp}var Vp,rT;function oD(){if(rT)return Vp;rT=1;var t=rD();return Vp=t.getPrototypeOf||null,Vp}var Gp,nT;function U5(){if(nT)return Gp;nT=1;var t="Function.prototype.bind called on incompatible ",e=Object.prototype.toString,r=Math.max,n="[object Function]",i=function(l,c){for(var d=[],h=0;h<l.length;h+=1)d[h]=l[h];for(var g=0;g<c.length;g+=1)d[g+l.length]=c[g];return d},a=function(l,c){for(var d=[],h=c,g=0;h<l.length;h+=1,g+=1)d[g]=l[h];return d},o=function(s,l){for(var c="",d=0;d<s.length;d+=1)c+=s[d],d+1<s.length&&(c+=l);return c};return Gp=function(l){var c=this;if(typeof c!="function"||e.apply(c)!==n)throw new TypeError(t+c);for(var d=a(arguments,1),h,g=function(){if(this instanceof h){var x=c.apply(this,i(d,arguments));return Object(x)===x?x:this}return c.apply(l,i(d,arguments))},m=r(0,c.length-d.length),v=[],_=0;_<m;_++)v[_]="$"+_;if(h=Function("binder","return function ("+o(v,",")+"){ return binder.apply(this,arguments); }")(g),c.prototype){var y=function(){};y.prototype=c.prototype,h.prototype=new y,y.prototype=null}return h},Gp}var Kp,iT;function Rd(){if(iT)return Kp;iT=1;var t=U5();return Kp=Function.prototype.bind||t,Kp}var Xp,aT;function z0(){return aT||(aT=1,Xp=Function.prototype.call),Xp}var Yp,oT;function sD(){return oT||(oT=1,Yp=Function.prototype.apply),Yp}var Zp,sT;function q5(){return sT||(sT=1,Zp=typeof Reflect<"u"&&Reflect&&Reflect.apply),Zp}var Jp,uT;function H5(){if(uT)return Jp;uT=1;var t=Rd(),e=sD(),r=z0(),n=q5();return Jp=n||t.call(r,e),Jp}var Qp,lT;function uD(){if(lT)return Qp;lT=1;var t=Rd(),e=Ts(),r=z0(),n=H5();return Qp=function(a){if(a.length<1||typeof a[0]!="function")throw new e("a function is required");return n(t,r,a)},Qp}var eg,cT;function W5(){if(cT)return eg;cT=1;var t=uD(),e=nD(),r;try{r=[].__proto__===Array.prototype}catch(o){if(!o||typeof o!="object"||!("code"in o)||o.code!=="ERR_PROTO_ACCESS")throw o}var n=!!r&&e&&e(Object.prototype,"__proto__"),i=Object,a=i.getPrototypeOf;return eg=n&&typeof n.get=="function"?t([n.get]):typeof a=="function"?function(s){return a(s==null?s:i(s))}:!1,eg}var tg,fT;function B5(){if(fT)return tg;fT=1;var t=aD(),e=oD(),r=W5();return tg=t?function(i){return t(i)}:e?function(i){if(!i||typeof i!="object"&&typeof i!="function")throw new TypeError("getProto: not an object");return e(i)}:r?function(i){return r(i)}:null,tg}var rg,dT;function z5(){if(dT)return rg;dT=1;var t=Function.prototype.call,e=Object.prototype.hasOwnProperty,r=Rd();return rg=r.call(t,e),rg}var ng,hT;function V0(){if(hT)return ng;hT=1;var t,e=rD(),r=T5(),n=S5(),i=C5(),a=E5(),o=O5(),s=Ts(),l=A5(),c=R5(),d=I5(),h=D5(),g=M5(),m=P5(),v=L5(),_=F5(),y=Function,x=function(he){try{return y('"use strict"; return ('+he+").constructor;")()}catch{}},w=nD(),C=iD(),A=function(){throw new s},E=w?(function(){try{return arguments.callee,A}catch{try{return w(arguments,"callee").get}catch{return A}}})():A,S=$5()(),T=B5(),D=oD(),P=aD(),N=sD(),F=z0(),B={},W=typeof Uint8Array>"u"||!T?t:T(Uint8Array),te={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?t:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?t:ArrayBuffer,"%ArrayIteratorPrototype%":S&&T?T([][Symbol.iterator]()):t,"%AsyncFromSyncIteratorPrototype%":t,"%AsyncFunction%":B,"%AsyncGenerator%":B,"%AsyncGeneratorFunction%":B,"%AsyncIteratorPrototype%":B,"%Atomics%":typeof Atomics>"u"?t:Atomics,"%BigInt%":typeof BigInt>"u"?t:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?t:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?t:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?t:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":r,"%eval%":eval,"%EvalError%":n,"%Float16Array%":typeof Float16Array>"u"?t:Float16Array,"%Float32Array%":typeof Float32Array>"u"?t:Float32Array,"%Float64Array%":typeof Float64Array>"u"?t:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?t:FinalizationRegistry,"%Function%":y,"%GeneratorFunction%":B,"%Int8Array%":typeof Int8Array>"u"?t:Int8Array,"%Int16Array%":typeof Int16Array>"u"?t:Int16Array,"%Int32Array%":typeof Int32Array>"u"?t:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":S&&T?T(T([][Symbol.iterator]())):t,"%JSON%":typeof JSON=="object"?JSON:t,"%Map%":typeof Map>"u"?t:Map,"%MapIteratorPrototype%":typeof Map>"u"||!S||!T?t:T(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":e,"%Object.getOwnPropertyDescriptor%":w,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?t:Promise,"%Proxy%":typeof Proxy>"u"?t:Proxy,"%RangeError%":i,"%ReferenceError%":a,"%Reflect%":typeof Reflect>"u"?t:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?t:Set,"%SetIteratorPrototype%":typeof Set>"u"||!S||!T?t:T(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?t:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":S&&T?T(""[Symbol.iterator]()):t,"%Symbol%":S?Symbol:t,"%SyntaxError%":o,"%ThrowTypeError%":E,"%TypedArray%":W,"%TypeError%":s,"%Uint8Array%":typeof Uint8Array>"u"?t:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?t:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?t:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?t:Uint32Array,"%URIError%":l,"%WeakMap%":typeof WeakMap>"u"?t:WeakMap,"%WeakRef%":typeof WeakRef>"u"?t:WeakRef,"%WeakSet%":typeof WeakSet>"u"?t:WeakSet,"%Function.prototype.call%":F,"%Function.prototype.apply%":N,"%Object.defineProperty%":C,"%Object.getPrototypeOf%":D,"%Math.abs%":c,"%Math.floor%":d,"%Math.max%":h,"%Math.min%":g,"%Math.pow%":m,"%Math.round%":v,"%Math.sign%":_,"%Reflect.getPrototypeOf%":P};if(T)try{null.error}catch(he){var J=T(T(he));te["%Error.prototype%"]=J}var ie=function he(ge){var Ne;if(ge==="%AsyncFunction%")Ne=x("async function () {}");else if(ge==="%GeneratorFunction%")Ne=x("function* () {}");else if(ge==="%AsyncGeneratorFunction%")Ne=x("async function* () {}");else if(ge==="%AsyncGenerator%"){var we=he("%AsyncGeneratorFunction%");we&&(Ne=we.prototype)}else if(ge==="%AsyncIteratorPrototype%"){var ve=he("%AsyncGenerator%");ve&&T&&(Ne=T(ve.prototype))}return te[ge]=Ne,Ne},le={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},se=Rd(),ce=z5(),Q=se.call(F,Array.prototype.concat),$=se.call(N,Array.prototype.splice),X=se.call(F,String.prototype.replace),Z=se.call(F,String.prototype.slice),fe=se.call(F,RegExp.prototype.exec),be=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,_e=/\\(\\)?/g,Le=function(ge){var Ne=Z(ge,0,1),we=Z(ge,-1);if(Ne==="%"&&we!=="%")throw new o("invalid intrinsic syntax, expected closing `%`");if(we==="%"&&Ne!=="%")throw new o("invalid intrinsic syntax, expected opening `%`");var ve=[];return X(ge,be,function(Fe,Be,ke,Ze){ve[ve.length]=ke?X(Ze,_e,"$1"):Be||Fe}),ve},Ae=function(ge,Ne){var we=ge,ve;if(ce(le,we)&&(ve=le[we],we="%"+ve[0]+"%"),ce(te,we)){var Fe=te[we];if(Fe===B&&(Fe=ie(we)),typeof Fe>"u"&&!Ne)throw new s("intrinsic "+ge+" exists, but is not available. Please file an issue!");return{alias:ve,name:we,value:Fe}}throw new o("intrinsic "+ge+" does not exist!")};return ng=function(ge,Ne){if(typeof ge!="string"||ge.length===0)throw new s("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof Ne!="boolean")throw new s('"allowMissing" argument must be a boolean');if(fe(/^%?[^%]*%?$/,ge)===null)throw new o("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var we=Le(ge),ve=we.length>0?we[0]:"",Fe=Ae("%"+ve+"%",Ne),Be=Fe.name,ke=Fe.value,Ze=!1,gt=Fe.alias;gt&&(ve=gt[0],$(we,Q([0,1],gt)));for(var Lr=1,Yr=!0;Lr<we.length;Lr+=1){var fr=we[Lr],z=Z(fr,0,1),de=Z(fr,-1);if((z==='"'||z==="'"||z==="`"||de==='"'||de==="'"||de==="`")&&z!==de)throw new o("property names with quotes must have matching quotes");if((fr==="constructor"||!Yr)&&(Ze=!0),ve+="."+fr,Be="%"+ve+"%",ce(te,Be))ke=te[Be];else if(ke!=null){if(!(fr in ke)){if(!Ne)throw new s("base intrinsic for "+ge+" exists, but the property is not available.");return}if(w&&Lr+1>=we.length){var me=w(ke,fr);Yr=!!me,Yr&&"get"in me&&!("originalValue"in me.get)?ke=me.get:ke=ke[fr]}else Yr=ce(ke,fr),ke=ke[fr];Yr&&!Ze&&(te[Be]=ke)}}return ke},ng}var ig,pT;function lD(){if(pT)return ig;pT=1;var t=V0(),e=uD(),r=e([t("%String.prototype.indexOf%")]);return ig=function(i,a){var o=t(i,!!a);return typeof o=="function"&&r(i,".prototype.")>-1?e([o]):o},ig}var ag,gT;function cD(){if(gT)return ag;gT=1;var t=V0(),e=lD(),r=Ad(),n=Ts(),i=t("%Map%",!0),a=e("Map.prototype.get",!0),o=e("Map.prototype.set",!0),s=e("Map.prototype.has",!0),l=e("Map.prototype.delete",!0),c=e("Map.prototype.size",!0);return ag=!!i&&function(){var h,g={assert:function(m){if(!g.has(m))throw new n("Side channel does not contain "+r(m))},delete:function(m){if(h){var v=l(h,m);return c(h)===0&&(h=void 0),v}return!1},get:function(m){if(h)return a(h,m)},has:function(m){return h?s(h,m):!1},set:function(m,v){h||(h=new i),o(h,m,v)}};return g},ag}var og,mT;function V5(){if(mT)return og;mT=1;var t=V0(),e=lD(),r=Ad(),n=cD(),i=Ts(),a=t("%WeakMap%",!0),o=e("WeakMap.prototype.get",!0),s=e("WeakMap.prototype.set",!0),l=e("WeakMap.prototype.has",!0),c=e("WeakMap.prototype.delete",!0);return og=a?function(){var h,g,m={assert:function(v){if(!m.has(v))throw new i("Side channel does not contain "+r(v))},delete:function(v){if(a&&v&&(typeof v=="object"||typeof v=="function")){if(h)return c(h,v)}else if(n&&g)return g.delete(v);return!1},get:function(v){return a&&v&&(typeof v=="object"||typeof v=="function")&&h?o(h,v):g&&g.get(v)},has:function(v){return a&&v&&(typeof v=="object"||typeof v=="function")&&h?l(h,v):!!g&&g.has(v)},set:function(v,_){a&&v&&(typeof v=="object"||typeof v=="function")?(h||(h=new a),s(h,v,_)):n&&(g||(g=n()),g.set(v,_))}};return m}:n,og}var sg,vT;function G0(){if(vT)return sg;vT=1;var t=Ts(),e=Ad(),r=w5(),n=cD(),i=V5(),a=i||n||r;return sg=function(){var s,l={assert:function(c){if(!l.has(c)){var d=c&&Object(c)===c?"the given object key":e(c);throw new t("Side channel does not contain "+d)}},delete:function(c){return!!s&&s.delete(c)},get:function(c){return s&&s.get(c)},has:function(c){return!!s&&s.has(c)},set:function(c,d){s||(s=a()),s.set(c,d)}};return l},sg}var ug,yT;function K0(){if(yT)return ug;yT=1;var t=String.prototype.replace,e=/%20/g,r={RFC1738:"RFC1738",RFC3986:"RFC3986",WHATWG:"WHATWG"};return ug={default:r.RFC3986,formatters:{RFC1738:function(n){return t.call(n,e,"+")},RFC3986:function(n){return String(n)},WHATWG:function(n){return t.call(n,e,"+")}},RFC1738:r.RFC1738,RFC3986:r.RFC3986,WHATWG:r.WHATWG},ug}var lg,bT;function fD(){if(bT)return lg;bT=1;var t=K0(),e=G0(),r=iD(),n=Object.prototype.hasOwnProperty,i=Array.isArray,a=e(),o=function($,X){return a.set($,X),$},s=function($){return a.has($)},l=function($){return a.get($)},c=function($,X){a.set($,X)},d=e(),h=function($,X){return d.set($,X),$},g=function($){return d.has($)},m=function($){return d.get($)},v=(function(){for(var Q=[],$=0;$<256;++$)Q[Q.length]="%"+(($<16?"0":"")+$.toString(16)).toUpperCase();return Q})(),_=function($){for(;$.length>1;){var X=$.pop(),Z=X.obj[X.prop];if(i(Z)){for(var fe=[],be=0;be<Z.length;++be)typeof Z[be]<"u"&&(fe[fe.length]=Z[be]);X.obj[X.prop]=fe}}},y=function($,X){for(var Z=X&&X.plainObjects?{__proto__:null}:{},fe=0;fe<$.length;++fe)typeof $[fe]<"u"&&(Z[fe]=$[fe]);return Z},x=function($,X,Z){X==="__proto__"&&r?r($,X,{configurable:!0,enumerable:!0,value:Z,writable:!0}):$[X]=Z},w=function($,X){for(var Z=X,fe=Object.keys($),be=0;be<fe.length;++be){var _e=parseInt(fe[be],10);String(_e)===fe[be]&&_e>Z&&(Z=_e)}return Z},C=function($){for(var X=0,Z=0;Z<$.length;++Z)n.call($,Z)&&(X+=1);return X},A=function($,X,Z){var fe=[$,X];if(Z&&typeof Z.arrayLimit=="number"&&fe.length>Z.arrayLimit){if(Z.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+Z.arrayLimit+" element"+(Z.arrayLimit===1?"":"s")+" allowed in an array.");return o(y(fe,Z),1)}return fe},E=function Q($,X,Z){if(!X)return $;if(typeof X!="object"&&typeof X!="function"){if(i($)){var fe=$.length;if(Z&&typeof Z.arrayLimit=="number"&&C($)>=Z.arrayLimit){if(Z.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+Z.arrayLimit+" element"+(Z.arrayLimit===1?"":"s")+" allowed in an array.");return o(y($.concat(X),Z),fe)}$[fe]=X}else if($&&typeof $=="object")if(s($)){var be=l($)+1;$[be]=X,c($,be)}else if(Z&&Z.strictMerge&&g($)){var _e=m($)+1;if(Z.throwOnLimitExceeded&&typeof Z.arrayLimit=="number"&&_e>=Z.arrayLimit)throw new RangeError("Array limit exceeded. Only "+Z.arrayLimit+" element"+(Z.arrayLimit===1?"":"s")+" allowed in an array.");$[_e]=X,h($,_e)}else if(Z&&Z.strictMerge){var Le=A($,X,Z);return i(Le)?h(Le,1):Le}else(Z&&(Z.plainObjects||Z.allowPrototypes)||!n.call(Object.prototype,X))&&($[X]=!0);else return A($,X,Z);return $}if(!$||typeof $!="object"){if(s(X)){for(var Ae=Object.keys(X),he=Z&&Z.plainObjects?{__proto__:null,0:$}:{0:$},ge=0;ge<Ae.length;ge++){var Ne=parseInt(Ae[ge],10);he[Ne+1]=X[Ae[ge]]}return o(he,l(X)+1)}var we=[$].concat(X);if(Z&&typeof Z.arrayLimit=="number"&&we.length>Z.arrayLimit){if(Z.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+Z.arrayLimit+" element"+(Z.arrayLimit===1?"":"s")+" allowed in an array.");return o(y(we,Z),we.length-1)}return we}var ve=$;if(i($)&&!i(X)&&(ve=y($,Z),g($)&&h(ve,$.length-1)),i($)&&i(X)){if(X.forEach(function(Fe,Be){if(n.call($,Be)){var ke=$[Be];ke&&typeof ke=="object"&&Fe&&typeof Fe=="object"?$[Be]=Q(ke,Fe,Z):$[$.length]=Fe}else $[Be]=Fe}),Z&&typeof Z.arrayLimit=="number"&&C($)>Z.arrayLimit){if(Z.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+Z.arrayLimit+" element"+(Z.arrayLimit===1?"":"s")+" allowed in an array.");return o(y($,Z),$.length-1)}return $}return Object.keys(X).reduce(function(Fe,Be){var ke=X[Be];if(n.call(Fe,Be)?x(Fe,Be,Q(Fe[Be],ke,Z)):x(Fe,Be,ke),s(X)&&!s(Fe)&&o(Fe,w(Fe,l(X))),s(Fe)){var Ze=parseInt(Be,10);String(Ze)===Be&&Ze>=0&&Ze>l(Fe)&&c(Fe,Ze)}if(g(Fe)){var gt=parseInt(Be,10);String(gt)===Be&>>m(Fe)&&h(Fe,gt)}return Fe},ve)},S=function($,X){return Object.keys(X).reduce(function(Z,fe){return x(Z,fe,X[fe]),Z},$)},T=function(Q,$,X){if(typeof Q=="string"&&Q.indexOf("%")===-1)return Q.indexOf("+")===-1?Q:Q.replace(/\+/g," ");var Z=Q.replace(/\+/g," ");if(X==="iso-8859-1")return Z.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(Z)}catch{return Z}},D=typeof Symbol=="function"&&typeof Symbol.toPrimitive=="symbol",P=Array.prototype.join,N=Array.prototype.toString,F=Object.prototype.toString,B=function Q($,X){if(!$||typeof $!="object"&&typeof $!="function"||D&&$[Symbol.toPrimitive]!=null)return $;if(i($)&&$.toString===N&&$.join===P){var Z=X||e();if(Z.has($))return"";Z.set($,!0);for(var fe,be=0;be<$.length;be+=1){var _e=$[be],Le=Q(_e,Z);if(!fe&&Le!==_e){fe=[];for(var Ae=0;Ae<be;Ae+=1)fe[Ae]=$[Ae]}fe&&(fe[be]=Le)}return Z.delete($),fe||$}if(typeof $.toString=="function")return $;var he=$.valueOf;if(typeof he=="function"){var ge=he.call($);if(!ge||typeof ge!="object"&&typeof ge!="function")return String(ge)}return F.call($)},W=1024,te=function($,X,Z,fe,be){if($.length===0)return $;var _e=$;if(typeof $=="symbol"?_e=Symbol.prototype.toString.call($):typeof $!="string"&&(_e=String(B($))),Z==="iso-8859-1")return escape(_e).replace(/%u[0-9a-f]{4}/gi,function(Be){return"%26%23"+parseInt(Be.slice(2),16)+"%3B"}).replace(/\+/g,"%2B");for(var Le="",Ae=0;Ae<_e.length;Ae+=W){var he=_e.length>=W?_e.slice(Ae,Ae+W):_e;if(Ae+W<_e.length){var ge=he.charCodeAt(he.length-1);ge>=55296&&ge<=56319&&(he=he.slice(0,-1),Ae-=1)}for(var Ne=[],we=0;we<he.length;++we){var ve=he.charCodeAt(we);if(ve===45||ve===46||ve===95||ve===126&&be!==t.WHATWG||ve>=48&&ve<=57||ve>=65&&ve<=90||ve>=97&&ve<=122||be===t.RFC1738&&(ve===40||ve===41)||be===t.WHATWG&&ve===42){Ne[Ne.length]=he.charAt(we);continue}if(ve<128){Ne[Ne.length]=v[ve];continue}if(ve<2048){Ne[Ne.length]=v[192|ve>>6]+v[128|ve&63];continue}if(ve<55296||ve>=57344){Ne[Ne.length]=v[224|ve>>12]+v[128|ve>>6&63]+v[128|ve&63];continue}var Fe=he.charCodeAt(we+1);ve<=56319&&Fe>=56320&&Fe<=57343?(we+=1,ve=65536+((ve&1023)<<10|Fe&1023),Ne[Ne.length]=v[240|ve>>18]+v[128|ve>>12&63]+v[128|ve>>6&63]+v[128|ve&63]):Ne[Ne.length]="%EF%BF%BD"}Le+=Ne.join("")}return Le},J=function($){for(var X=[{obj:{o:$},prop:"o"}],Z=e(),fe=0;fe<X.length;++fe)for(var be=X[fe],_e=be.obj[be.prop],Le=Object.keys(_e),Ae=0;Ae<Le.length;++Ae){var he=Le[Ae],ge=_e[he];typeof ge=="object"&&ge!==null&&!Z.has(ge)&&(X[X.length]={obj:_e,prop:he},Z.set(ge,!0))}return _(X),$},ie=function($){return Object.prototype.toString.call($)==="[object RegExp]"},le=function($){return!$||typeof $!="object"?!1:!!($.constructor&&typeof $.constructor.isBuffer=="function"&&$.constructor.isBuffer($))},se=function($,X,Z,fe,be){if(s($)){if(be)throw new RangeError("Array limit exceeded. Only "+Z+" element"+(Z===1?"":"s")+" allowed in an array.");for(var _e=i(X)?X:[X],Le=l($),Ae=0;Ae<_e.length;++Ae)Le+=1,$[Le]=_e[Ae];return c($,Le),$}var he=[].concat($,X);if(he.length>Z){if(be)throw new RangeError("Array limit exceeded. Only "+Z+" element"+(Z===1?"":"s")+" allowed in an array.");return o(y(he,{plainObjects:fe}),he.length-1)}return he},ce=function($,X){if(i($)){for(var Z=[],fe=0;fe<$.length;fe+=1)Z[Z.length]=X($[fe]);return Z}return X($)};return lg={arrayToObject:y,assign:S,combine:se,compact:J,decode:T,encode:te,isBuffer:le,isOverflow:s,isRegExp:ie,markOverflow:o,maybeMap:ce,merge:E,setProperty:x,toCoercible:B},lg}var cg,_T;function G5(){if(_T)return cg;_T=1;var t=G0(),e=fD(),r=K0(),n=Object.prototype.hasOwnProperty,i={brackets:function(y){return y+"[]"},comma:"comma",indices:function(y,x){return y+"["+x+"]"},repeat:function(y){return y}},a=Array.isArray,o=Array.prototype.push,s=function(_,y){o.apply(_,a(y)?y:[y])},l=Date.prototype.toISOString,c=r.default,d={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",depth:1/0,encode:!0,encodeDotInKeys:!1,encoder:e.encode,encodeValuesOnly:!1,filter:void 0,format:c,formatter:r.formatters[c],indices:!1,serializeDate:function(y){return l.call(y)},skipNulls:!1,strictNullHandling:!1},h=function(y){return typeof y=="string"||typeof y=="number"||typeof y=="boolean"||typeof y=="symbol"||typeof y=="bigint"},g={},m=function _(y,x,w,C,A,E,S,T,D,P,N,F,B,W,te,J,ie,le,se,ce){var Q=y;if(ce>se)throw new RangeError("Input depth exceeded depth option of "+se);for(var $=le,X=0,Z=!1;($=$.get(g))!==void 0&&!Z;){var fe=$.get(y);if(X+=1,typeof fe<"u"){if(fe===X)throw new RangeError("Cyclic object value");Z=!0}typeof $.get(g)>"u"&&(X=0)}if(Q=typeof P=="function"?P(x,Q):Q,Q instanceof Date?Q=B(Q):w==="comma"&&a(Q)&&(Q=e.maybeMap(Q,function(Ze){return Ze instanceof Date?B(Ze):Ze})),Q===null){if(E)return te(D&&!J?D(x,d.encoder,ie,"key",W):x);Q=""}if(h(Q)||e.isBuffer(Q)){if(D){var be=J?x:D(x,d.encoder,ie,"key",W);return[te(be)+"="+te(D(Q,d.encoder,ie,"value",W))]}return[te(x)+"="+te(String(Q))]}var _e=[];if(typeof Q>"u")return _e;var Le;if(w==="comma"&&a(Q))J&&D&&(Q=e.maybeMap(Q,function(Ze){return Ze==null?Ze:D(Ze,d.encoder,ie,"value",W)})),Le=[{value:Q.length>0?e.toCoercible(Q).join(",")||null:void 0}];else if(a(P))Le=P;else{var Ae=Object.keys(Q);Le=N?Ae.sort(N):Ae}var he=String(x),ge=C&&a(Q)&&Q.length===1?he+"[]":he;if(A&&a(Q)&&Q.length===0&&Object.keys(Q).length===0)return te(D&&!J?D(ge,d.encoder,ie,"key",W):ge)+"[]";for(var Ne=0;Ne<Le.length;++Ne){var we=Le[Ne],ve=typeof we=="object"&&we&&typeof we.value<"u"?we.value:Q[we];if(!(S&&ve===null)){var Fe=F&&T?String(we).replace(/\./g,"%2E"):String(we),Be=a(Q)?typeof w=="function"?w(ge,Fe):ge:ge+(F?"."+Fe:"["+Fe+"]");le.set(y,X);var ke=t();ke.set(g,le),s(_e,_(ve,Be,w,C,A,E,S,T,w==="comma"&&J&&a(Q)?null:D,P,N,F,B,W,te,J,ie,ke,se,ce+1))}}return _e},v=function(y){if(!y)return d;if(typeof y.allowEmptyArrays<"u"&&typeof y.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof y.encodeDotInKeys<"u"&&typeof y.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(y.encoder!==null&&typeof y.encoder<"u"&&typeof y.encoder!="function")throw new TypeError("Encoder has to be a function.");var x=y.charset||d.charset;if(typeof y.charset<"u"&&y.charset!=="utf-8"&&y.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var w=r.default;if(typeof y.format<"u"){if(!n.call(r.formatters,y.format))throw new TypeError("Unknown format option provided.");w=y.format}var C=r.formatters[w],A=d.filter;(typeof y.filter=="function"||a(y.filter))&&(A=y.filter);var E;if(n.call(i,y.arrayFormat)?E=y.arrayFormat:"indices"in y?E=y.indices?"indices":"repeat":E=d.arrayFormat,"commaRoundTrip"in y&&typeof y.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var S=typeof y.allowDots>"u"?y.encodeDotInKeys===!0?!0:d.allowDots:!!y.allowDots;return{addQueryPrefix:typeof y.addQueryPrefix=="boolean"?y.addQueryPrefix:d.addQueryPrefix,allowDots:S,allowEmptyArrays:typeof y.allowEmptyArrays=="boolean"?!!y.allowEmptyArrays:d.allowEmptyArrays,arrayFormat:E,charset:x,charsetSentinel:typeof y.charsetSentinel=="boolean"?y.charsetSentinel:d.charsetSentinel,commaRoundTrip:!!y.commaRoundTrip,delimiter:typeof y.delimiter>"u"?d.delimiter:y.delimiter,depth:typeof y.depth=="number"?y.depth:d.depth,encode:typeof y.encode=="boolean"?y.encode:d.encode,encodeDotInKeys:typeof y.encodeDotInKeys=="boolean"?y.encodeDotInKeys:d.encodeDotInKeys,encoder:typeof y.encoder=="function"?y.encoder:d.encoder,encodeValuesOnly:typeof y.encodeValuesOnly=="boolean"?y.encodeValuesOnly:d.encodeValuesOnly,filter:A,format:w,formatter:C,serializeDate:typeof y.serializeDate=="function"?y.serializeDate:d.serializeDate,skipNulls:typeof y.skipNulls=="boolean"?y.skipNulls:d.skipNulls,sort:typeof y.sort=="function"?y.sort:null,strictNullHandling:typeof y.strictNullHandling=="boolean"?y.strictNullHandling:d.strictNullHandling}};return cg=function(_,y){var x=_,w=v(y),C,A;typeof w.filter=="function"?(A=w.filter,x=A("",x)):a(w.filter)&&(A=w.filter.slice(),C=A);var E=[];if(typeof x!="object"||x===null)return"";var S=i[w.arrayFormat],T=S==="comma"&&w.commaRoundTrip;C||(C=Object.keys(x)),w.sort&&C.sort(w.sort);for(var D=t(),P=0;P<C.length;++P){var N=C[P];if(!(typeof N>"u"||N===null)){var F=x[N];if(!(w.skipNulls&&F===null)){var B=w.encodeDotInKeys?String(N).replace(/\./g,"%2E"):String(N);s(E,m(F,B,S,T,w.allowEmptyArrays,w.strictNullHandling,w.skipNulls,w.encodeDotInKeys,w.encode?w.encoder:null,A,w.sort,w.allowDots,w.serializeDate,w.format,w.formatter,w.encodeValuesOnly,w.charset,D,w.depth,0))}}}var W=E.join(w.delimiter),te=w.addQueryPrefix===!0?"?":"";return w.charsetSentinel&&(w.charset==="iso-8859-1"?te+="utf8=%26%2310003%3B"+w.delimiter:te+="utf8=%E2%9C%93"+w.delimiter),W.length>0?te+W:""},cg}var fg,xT;function K5(){if(xT)return fg;xT=1;var t=G0(),e=fD(),r=Object.prototype.hasOwnProperty,n=Array.isArray,i=Object.getPrototypeOf,a=String.fromCharCode,o=function(S){if(!S||typeof S!="object")return!1;if(n(S))return!0;var T=i(S);return T===Object.prototype||T===null},s=function(S){if(n(S)){var T=[];return T.length=S.length,T}return i(S)===null?{__proto__:null}:{}},l=function(S){for(var T=t(),D={},P=[{source:S,target:D}],N=0;N<P.length;++N)for(var F=P[N].source,B=P[N].target,W=Object.keys(F),te=0;te<W.length;++te){var J=F[W[te]];if(o(J)){if(!T.has(J)){var ie=s(J);T.set(J,ie),P[P.length]={source:J,target:ie}}e.setProperty(B,W[te],T.get(J))}else e.setProperty(B,W[te],J)}return D},c={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:e.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictMerge:!0,strictNullHandling:!1,throwOnLimitExceeded:!1},d=function(E){return E.replace(/&#(\d+);/g,function(S,T){var D=parseInt(T,10);return D>65535&&D<=1114111?(D-=65536,a(55296|D>>10,56320|D&1023)):a(D)})},h=function(E,S,T){if(E&&typeof E=="string"&&S.comma&&E.indexOf(",")>-1){if(S.throwOnLimitExceeded)for(var D=0,P=E.indexOf(",");P>-1;){if(D+=1,D>=S.arrayLimit)throw new RangeError("Array limit exceeded. Only "+S.arrayLimit+" element"+(S.arrayLimit===1?"":"s")+" allowed in an array.");P=E.indexOf(",",P+1)}return E.split(",")}if(S.throwOnLimitExceeded&&T>=S.arrayLimit&&T>0)throw new RangeError("Array limit exceeded. Only "+S.arrayLimit+" element"+(S.arrayLimit===1?"":"s")+" allowed in an array.");return E},g="utf8=%26%2310003%3B",m="utf8=%E2%9C%93",v=function(S,T){var D={__proto__:null},P=T.ignoreQueryPrefix?S.replace(/^\?/,""):S;P=P.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var N=T.parameterLimit===1/0?void 0:T.parameterLimit,F=P.split(T.delimiter,T.throwOnLimitExceeded&&typeof N<"u"?N+1:N);if(T.throwOnLimitExceeded&&typeof N<"u"&&F.length>N)throw new RangeError("Parameter limit exceeded. Only "+N+" parameter"+(N===1?"":"s")+" allowed.");var B=-1,W,te=T.charset;if(T.charsetSentinel)for(W=0;W<F.length;++W)F[W].indexOf("utf8=")===0&&(F[W]===m?te="utf-8":F[W]===g&&(te="iso-8859-1"),B=W,W=F.length);for(W=0;W<F.length;++W)if(W!==B){var J=F[W],ie=J.indexOf("]="),le=ie===-1?J.indexOf("="):ie+1,se=le>1&&J.slice(le-2,le)==="[]",ce,Q;if(le===-1?(ce=T.decoder(J,c.decoder,te,"key"),Q=T.strictNullHandling?null:""):(ce=T.decoder(J.slice(0,le),c.decoder,te,"key"),ce!==null&&(Q=e.maybeMap(h(J.slice(le+1),T,n(D[ce])&&(T.duplicates==="combine"||se)?D[ce].length:0),function(X){return T.decoder(X,c.decoder,te,"value")}))),Q&&T.interpretNumericEntities&&te==="iso-8859-1"&&(Q=e.maybeMap(Q,function(X){return X&&d(String(X))})),se&&(Q=n(Q)?[Q]:Q),T.comma&&n(Q)&&Q.length>T.arrayLimit&&(Q=e.combine([],Q,T.arrayLimit,T.plainObjects,T.throwOnLimitExceeded)),ce!==null){var $=r.call(D,ce);$&&(T.duplicates==="combine"||se)?D[ce]=e.combine(D[ce],Q,T.arrayLimit,T.plainObjects,T.throwOnLimitExceeded):(!$||T.duplicates==="last")&&(D[ce]=Q)}}return D},_=function(S){return S.charAt(0)==="["&&S.charAt(S.length-1)==="]"?S.slice(1,-1):S},y=function(E,S,T,D){var P=0;if(E.length>0&&E[E.length-1]==="[]"){var N=E.slice(0,-1).join("");P=Array.isArray(S)&&S[N]?S[N].length:0}for(var F=D?S:h(S,T,P),B=E.length-1;B>=0;--B){var W,te=E[B];if(te==="[]"&&T.parseArrays)e.isOverflow(F)?W=F:W=T.allowEmptyArrays&&(F===""||T.strictNullHandling&&F===null)?[]:e.combine([],F,T.arrayLimit,T.plainObjects,T.throwOnLimitExceeded);else{W=T.plainObjects?{__proto__:null}:{};var J=_(te),ie=T.decodeDotInKeys?J.replace(/%2E/gi,"."):J,le=parseInt(ie,10),se=!isNaN(le)&&te!==ie&&String(le)===ie&&le>=0&&T.parseArrays;if(!T.parseArrays&&ie==="")W[0]=F;else if(se&&le<T.arrayLimit)W=[],W[le]=F;else{if(se&&T.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+T.arrayLimit+" element"+(T.arrayLimit===1?"":"s")+" allowed in an array.");se?(W[le]=F,e.markOverflow(W,le)):ie!=="__proto__"&&(W[ie]=F)}}F=W}return F},x=function(S){for(var T="",D=0,P=0;P<S.length;P+=1){var N=S.charCodeAt(P);if(N===91)D+=1,T+="[";else if(N===93)D>0&&(D-=1),T+="]";else if(N===46&&D===0&&P+1<S.length&&S.charCodeAt(P+1)!==46&&S.charCodeAt(P+1)!==91){for(var F=P+1,B=F;B<S.length&&S.charCodeAt(B)!==46&&S.charCodeAt(B)!==91;)B+=1;T+="["+S.slice(F,B)+"]",P=B-1}else T+=S.charAt(P)}return T},w=function(S,T){var D=T.allowDots?x(S):S;if(T.depth<=0)return!T.plainObjects&&r.call(Object.prototype,_(D))&&!T.allowPrototypes?void 0:[D];var P=[],N=D.indexOf("["),F=N>=0?D.slice(0,N):D;if(F){if(!T.plainObjects&&r.call(Object.prototype,F)&&!T.allowPrototypes)return;P[P.length]=F}for(var B=D.length,W=N,te=0;W>=0&&te<T.depth;){for(var J=1,ie=W+1,le=-1;ie<B&&le<0;){var se=D.charCodeAt(ie);se===91?J+=1:se===93&&(J-=1,J===0&&(le=ie)),ie+=1}if(le<0)return P[P.length]="["+D.slice(W)+"]",P;var ce=D.slice(W,le+1),Q=ce.slice(1,-1);if(!T.plainObjects&&r.call(Object.prototype,Q)&&!T.allowPrototypes)return;P[P.length]=ce,te+=1,W=D.indexOf("[",le+1)}if(W>=0){if(T.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+T.depth+" and strictDepth is true");P[P.length]="["+D.slice(W)+"]"}return P},C=function(S,T,D,P){if(S){var N=w(S,D);if(N)return y(N,T,D,P)}},A=function(S){if(!S)return c;if(typeof S.allowEmptyArrays<"u"&&typeof S.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof S.decodeDotInKeys<"u"&&typeof S.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(S.decoder!==null&&typeof S.decoder<"u"&&typeof S.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof S.charset<"u"&&S.charset!=="utf-8"&&S.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(typeof S.throwOnLimitExceeded<"u"&&typeof S.throwOnLimitExceeded!="boolean")throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var T=typeof S.charset>"u"?c.charset:S.charset,D=typeof S.duplicates>"u"?c.duplicates:S.duplicates;if(D!=="combine"&&D!=="first"&&D!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var P=typeof S.allowDots>"u"?S.decodeDotInKeys===!0?!0:c.allowDots:!!S.allowDots;return{allowDots:P,allowEmptyArrays:typeof S.allowEmptyArrays=="boolean"?!!S.allowEmptyArrays:c.allowEmptyArrays,allowPrototypes:typeof S.allowPrototypes=="boolean"?S.allowPrototypes:c.allowPrototypes,allowSparse:typeof S.allowSparse=="boolean"?S.allowSparse:c.allowSparse,arrayLimit:typeof S.arrayLimit=="number"?S.arrayLimit:c.arrayLimit,charset:T,charsetSentinel:typeof S.charsetSentinel=="boolean"?S.charsetSentinel:c.charsetSentinel,comma:typeof S.comma=="boolean"?S.comma:c.comma,decodeDotInKeys:typeof S.decodeDotInKeys=="boolean"?S.decodeDotInKeys:c.decodeDotInKeys,decoder:typeof S.decoder=="function"?S.decoder:c.decoder,delimiter:typeof S.delimiter=="string"||e.isRegExp(S.delimiter)?S.delimiter:c.delimiter,depth:typeof S.depth=="number"||S.depth===!1?+S.depth:c.depth,duplicates:D,ignoreQueryPrefix:S.ignoreQueryPrefix===!0,interpretNumericEntities:typeof S.interpretNumericEntities=="boolean"?S.interpretNumericEntities:c.interpretNumericEntities,parameterLimit:typeof S.parameterLimit=="number"?S.parameterLimit:c.parameterLimit,parseArrays:S.parseArrays!==!1,plainObjects:typeof S.plainObjects=="boolean"?S.plainObjects:c.plainObjects,strictDepth:typeof S.strictDepth=="boolean"?!!S.strictDepth:c.strictDepth,strictMerge:typeof S.strictMerge=="boolean"?!!S.strictMerge:c.strictMerge,strictNullHandling:typeof S.strictNullHandling=="boolean"?S.strictNullHandling:c.strictNullHandling,throwOnLimitExceeded:typeof S.throwOnLimitExceeded=="boolean"?S.throwOnLimitExceeded:!1}};return fg=function(E,S){var T=A(S);if(E===""||E===null||typeof E>"u")return T.plainObjects?{__proto__:null}:{};for(var D=typeof E=="string"?v(E,T):l(E),P=T.plainObjects?{__proto__:null}:{},N=Object.keys(D),F=0;F<N.length;++F){var B=N[F],W=C(B,D[B],T,typeof E=="string");P=e.merge(P,W,T)}return T.allowSparse===!0?P:e.compact(P)},fg}var dg,wT;function X5(){if(wT)return dg;wT=1;var t=G5(),e=K5(),r=K0();return dg={formats:r,parse:e,stringify:t},dg}var Y5=X5();const Id=gi(Y5),dD=({children:t,style:e,...r})=>{const n=Qe(At("md"));return R.jsx("div",{style:{...n?{padding:"0px 24px"}:null,...e},...r,children:t})},Z5={margin:0,fontFamily:"var(--root-secondary-font, 'Red Hat Display', sans-serif)",fontWeight:"bold"},J5=({children:t,style:e,...r})=>{const n=Qe(At("md"));return R.jsx("p",{style:{...Z5,...n?{fontSize:20,lineHeight:"24px",letterSpacing:"0.15px"}:{fontSize:34,lineHeight:"40px",letterSpacing:"0.35px"},...e},...r,children:t})},Q5=({children:t,style:e,...r})=>{const n=Qe(At("md"));return R.jsx("div",{style:{display:"flex",flexDirection:n?"column":"row",alignItems:"baseline",columnGap:16,marginBottom:n?16:32,...e},...r,children:t})},e6=({children:t,...e})=>R.jsx(ft,{variant:"h4",component:"p",...e,children:t}),hD=12,t6=["xs","sm","md","lg","xl"],pD=(t,e)=>{let r;return t6.forEach(n=>{t[n]!==void 0&&e[n]&&(r=t[n])}),r},r6=(t,e)=>t===void 0?0:typeof t=="number"?t*8:(pD(t,e)??0)*8,gD=()=>({xs:!0,sm:Qe(ha("sm")),md:Qe(ha("md")),lg:Qe(ha("lg")),xl:Qe(ha("xl"))}),Gf=({spacing:t,children:e,style:r,...n})=>{const i=gD(),a={display:"grid",gridTemplateColumns:`repeat(${hD}, minmax(0, 1fr))`,gap:r6(t,i),width:"100%"};return R.jsx("div",{style:{...a,...r},...n,children:e})},zr=({xs:t,sm:e,md:r,lg:n,xl:i,children:a,style:o,...s})=>{const l=gD(),c=pD({xs:t,sm:e,md:r,lg:n,xl:i},l)??hD;return R.jsx("div",{style:{gridColumn:`span ${c}`,minWidth:0,...o},...s,children:a})},X0=({children:t,style:e,...r})=>{const n=Qe(At("md"));return R.jsx("div",{style:{height:"100%",...n?{padding:"0px 24px"}:null,...e},...r,children:t})},mD=({children:t,style:e,...r})=>{const n=Qe(At("sm"));return R.jsx("div",{style:{display:"flex",alignItems:"baseline",columnGap:16,flexDirection:n?"column":"row",marginBottom:n?16:32,...e},...r,children:t})},n6=({children:t,style:e,...r})=>R.jsx("div",{style:{display:"flex",justifyContent:"space-between",...e},...r,children:t}),vD=({children:t,...e})=>R.jsx(Gf,{...e,children:t}),Y0=({children:t,...e})=>R.jsx(vD,{...e,children:t}),Z0=({assetName:t,sitecode:e})=>{const{t:r}=Qt("location"),n=mo(),i=/\balert\b/.test(n.pathname);return R.jsxs(n6,{children:[R.jsxs(mD,{children:[R.jsx(e6,{children:t}),e&&R.jsx(ft,{variant:"subtitle1",children:e})]}),i&&R.jsx(KH,{to:{pathname:"/alerts-definitions",search:n.search},children:R.jsxs(w0,{type:"button",appearance:"filled",hasIcon:!0,style:{display:"inline-flex"},children:[R.jsx($i,{slot:"icon",children:"settings"}),r("alerts.configure-alerts-button")]})})]})},i6=async({alertId:t,...e})=>{const r=ei({pathname:`/dcim-custom-alerts/${t}/threshold`});return await ti.put(r,e)},a6=t=>C0(fn.EDIT_NOTIFICATION,i6,t),o6=async t=>{const e=ei({pathname:"/dcim-custom-alerts"});return await ti.post(e,t)},s6=t=>C0(fn.CREATE_NOTIFICATION,o6,t),u6=async({alertId:t,...e})=>{const r=ei({pathname:`/dcim-custom-alerts/${t}/preference`});return await ti.put(r,e)},l6=t=>C0(fn.EDIT_NOTIFICATION,u6,t),c6=t=>{const{leasedSpaceName:e,sort:r,order:n}=t,i=Object.assign({},mr.fromPairs(mr.entries(t).filter(([s,l])=>!!l)));delete i.leasedSpaceName,i.sort=r?[r,n==null?void 0:n.toUpperCase()].join(","):void 0;const a=btoa(e),o=ei({pathname:`dcim-devices/customer-known-name-space/${a}/alerts`,searchParams:i});return ti.get(o)},Kf=(t,e)=>Ui([fn.DCIM_ALERTS,t],()=>c6(t),{...e,refetchOnWindowFocus:!1}),Xf=t=>{let e;if(t instanceof Array)return t.map(r=>(typeof r=="object"&&(r=Xf(r)),r));e={};for(const r in t)if(t.hasOwnProperty(r)){const n=mr.camelCase(r);let i=t[r];(i instanceof Array||i!==null&&i.constructor===Object)&&(i=Xf(i)),e[n]=i}return e},f6=1,yD=1e3*f6,bD=60*yD,d6=(t=new Date)=>{const e=new Date(t);return e.setSeconds(0),e.setMilliseconds(0),e},h6=async({leasedSpaceName:t,...e})=>{const r=btoa(t),n=ei({pathname:`dcim-devices/customer-known-name-space/${r}/chart-data`,searchParams:e}),i=await ti.get(n);return Xf(i)},_D=(t,e={})=>{const r=bD*15,n={cacheTime:r,refetchInterval:0,refetchOnMount:!1,retry:!1,staleTime:r,...e};return Ui([fn.DCIM_CHART_DATA,t],()=>h6(t),n)},p6=async t=>{const e=btoa(t),r=ei({pathname:`/dcim-devices/customer-known-name-space/${e}/chart-metadata`}),n=await ti.get(r);return Xf(n)},xD=(t,e={})=>{const n={cacheTime:bD*15,refetchInterval:0,...e};return Ui([fn.DCIM_CHART_METADATA],()=>p6(t),n)},wD=({leasedSpaceName:t,size:e,page:r,sort:n,order:i,...a})=>{const o=Object.assign({},mr.fromPairs(mr.entries(a).filter(([c,d])=>!!d)));o.size=e,o.page=r,o.sort=n?[n,i].join(","):"";const s=btoa(t),l=ei({pathname:`dcim-devices/customer-known-name-space/${s}/historical-alerts`,searchParams:o});return ti.get(l)},TD=(t,e)=>Ui([fn.DCIM_HISTORICAL_ALERTS,t],()=>wD(t),{placeholderData:[],refetchInterval:0,...e}),SD=t=>{const{sort:e,order:r,leasedSpaceName:n}=t,i=Object.assign({},mr.fromPairs(mr.entries(t).filter(([s,l])=>!!l)));delete i.leasedSpaceName,i.sort=e?[e,r==null?void 0:r.toUpperCase()].join(","):void 0;const a=btoa(n),o=ei({pathname:`dcim-devices/customer-known-name-space/${a}/alert-instances`,searchParams:i});return ti.get(o)},Ny=(t,e)=>Ui([fn.DCIM_ALERT_INSTANCES,t],()=>SD(t),{placeholderData:[],refetchInterval:0,...e}),g6=t=>{const e=ei({pathname:`dcim-historical-alert-instances/${t}`});return ti.get(e)},m6=(t,e)=>Ui([fn.DCIM_HISTORICAL_ALERT_INSTANCE_DETAILS],()=>g6(t),{...e,refetchOnWindowFocus:!1}),v6=async(t,e,r,n)=>{const i=ei({pathname:"/dcim-devices/planned-site-maintenance",searchParams:{location:t,site:e,startDate:r,endDate:n}});return await ti.get(i)},y6=(t,e,r,n,i)=>Ui([fn.PLANNED_SITE_MAINTENANCE,t,e,r,n],()=>v6(t,e,r,n),{...i,refetchOnWindowFocus:!1}),b6=t=>{const e=ei({pathname:`dcim-alert-instances/${t}`});return ti.get(e)},_6=(t,e)=>Ui([fn.DCIM_ALERT_INSTANCE_DETAILS],()=>b6(t),{...e,refetchOnWindowFocus:!1}),x6=({$isVisible:t=!0,children:e,style:r,...n})=>R.jsx("div",{style:{display:"flex",flexDirection:"column",visibility:t?"visible":"hidden",...r},...n,children:e}),w6=({children:t,style:e,...r})=>R.jsx("div",{style:{display:"flex",...e},...r,children:t}),T6=({children:t,style:e,...r})=>R.jsx(ft,{style:{wordBreak:"break-word",...e},...r,children:t}),S6=(t,e="-")=>{const{t:r}=Qt("common"),{formatDateTime:n}=$0();return TI(t)||t===""?e:typeof t=="boolean"?r(t.toString()):typeof t=="number"?String(t):SI(t)?n(t):t},Ai=({title:t,titleColor:e,value:r,emptyValue:n="-",whiteSpace:i,isVisible:a,icon:o,...s})=>{const l=s["data-testid"],c=S6(r,n);return R.jsxs(x6,{$isVisible:a,children:[R.jsxs(w6,{children:[R.jsx(ft,{variant:"subtitle2",component:"h5",style:{whiteSpace:i?"nowrap":"normal",color:e},children:t}),o]}),typeof c=="string"?R.jsx(T6,{"data-testid":l,variant:"subtitle1",children:c}):c]})};var kr=(t=>(t.POWER="power",t.ENVIRONMENTAL="environmental",t.AUXILIARY="auxiliary",t))(kr||{}),sn=(t=>(t.CRITICAL="critical",t.CUSTOM="custom",t))(sn||{});const C6=["critical","custom"];var Qn=(t=>(t.HISTORY="history",t.DEFINITIONS="definitions",t.INSTANCES="instances",t))(Qn||{});const E6=t=>({height:32,display:"flex",flexDirection:"row",alignItems:"center",background:t||"#ffffff",borderRadius:68,width:"fit-content",padding:"4px 16px 4px 4px",gap:8}),O6=({background:t,children:e,style:r,...n})=>R.jsx("div",{style:{...E6(t),...r},...n,children:e}),A6=({children:t,style:e,...r})=>R.jsx(O6,{style:{padding:"3px 10px",height:"fit-content",...e},...r,children:t}),R6={[kr.POWER]:{background:rt.warning,color:rt.onPrimary},[kr.ENVIRONMENTAL]:{background:rt.success,color:rt.onPrimary},[kr.AUXILIARY]:{background:rt.info,color:rt.onPrimary}},I6={background:rt.outline,color:rt.onSurface},Yf=({title:t})=>{const{background:e,color:r}=R6[t]||I6;return R.jsx(A6,{background:e,"data-testid":`alert-badge-${t}`,children:R.jsx(ft,{style:{fontSize:13,lineHeight:"18px",color:r},children:mr.startCase(t)})})},hg=({children:t,style:e,...r})=>{const n=Qe(At("lg"));return R.jsx("div",{style:{maxWidth:828,marginRight:32,background:"#ffffff",borderRadius:"12px 12px 0 0",width:"100%",...n?{border:0,padding:0}:{border:"1px solid rgb(0 0 0 / 12%)",padding:24,height:"calc(100vh - 100px)",overflow:"auto"},...e},...r,children:t})},TT=({children:t,style:e,...r})=>R.jsx("div",{style:{display:"flex",flexDirection:"column",gap:16,...e},...r,children:t}),D6=({children:t,style:e,...r})=>{const n=Qe(At("lg"));return R.jsx("h5",{style:{margin:0,fontFamily:"var(--root-secondary-font, 'Red Hat Display', sans-serif)",fontWeight:700,...n?{fontSize:34,lineHeight:"40px"}:{fontSize:24,lineHeight:"32px"},...e},...r,children:t})},M6=()=>{const t=Qe(At("lg"));return R.jsx(IU,{style:{"--md-divider-color":rt.outline,margin:t?"36px 0 24px 0":"24px 0"}})},P6=({children:t,style:e,...r})=>R.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",height:"100%",...e},...r,children:t});var Yl={exports:{}},Zl={exports:{}},pg={exports:{}},ST;function ir(){return ST||(ST=1,(function(t){function e(r){return r&&r.__esModule?r:{default:r}}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports})(pg)),pg.exports}var Jl={exports:{}},CT;function L6(){return CT||(CT=1,(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=r;function r(n,i){if(n==null)throw new TypeError("assign requires that input parameter not be null or undefined");for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a]);return n}t.exports=e.default})(Jl,Jl.exports)),Jl.exports}var ET;function N6(){return ET||(ET=1,(function(t,e){var r=ir().default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=i;var n=r(L6());function i(a){return(0,n.default)({},a)}t.exports=e.default})(Zl,Zl.exports)),Zl.exports}var Ql={exports:{}},ec={exports:{}},tc={exports:{}},rc={exports:{}},gg={exports:{}},OT;function CD(){return OT||(OT=1,(function(t){function e(r){"@babel/helpers - typeof";return t.exports=e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},t.exports.__esModule=!0,t.exports.default=t.exports,e(r)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports})(gg)),gg.exports}var nc={exports:{}},AT;function Xr(){return AT||(AT=1,(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=r;function r(n,i){if(i.length<n)throw new TypeError(n+" argument"+(n>1?"s":"")+" required, but only "+i.length+" present")}t.exports=e.default})(nc,nc.exports)),nc.exports}var RT;function F6(){return RT||(RT=1,(function(t,e){var r=ir().default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=a;var n=r(CD()),i=r(Xr());function a(o){return(0,i.default)(1,arguments),o instanceof Date||(0,n.default)(o)==="object"&&Object.prototype.toString.call(o)==="[object Date]"}t.exports=e.default})(rc,rc.exports)),rc.exports}var ic={exports:{}},IT;function mi(){return IT||(IT=1,(function(t,e){var r=ir().default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=a;var n=r(CD()),i=r(Xr());function a(o){(0,i.default)(1,arguments);var s=Object.prototype.toString.call(o);return o instanceof Date||(0,n.default)(o)==="object"&&s==="[object Date]"?new Date(o.getTime()):typeof o=="number"||s==="[object Number]"?new Date(o):((typeof o=="string"||s==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}t.exports=e.default})(ic,ic.exports)),ic.exports}var DT;function k6(){return DT||(DT=1,(function(t,e){var r=ir().default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=o;var n=r(F6()),i=r(mi()),a=r(Xr());function o(s){if((0,a.default)(1,arguments),!(0,n.default)(s)&&typeof s!="number")return!1;var l=(0,i.default)(s);return!isNaN(Number(l))}t.exports=e.default})(tc,tc.exports)),tc.exports}var ac={exports:{}},oc={exports:{}},sc={exports:{}},MT;function vo(){return MT||(MT=1,(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=r;function r(n){if(n===null||n===!0||n===!1)return NaN;var i=Number(n);return isNaN(i)?i:i<0?Math.ceil(i):Math.floor(i)}t.exports=e.default})(sc,sc.exports)),sc.exports}var PT;function j6(){return PT||(PT=1,(function(t,e){var r=ir().default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=o;var n=r(vo()),i=r(mi()),a=r(Xr());function o(s,l){(0,a.default)(2,arguments);var c=(0,i.default)(s).getTime(),d=(0,n.default)(l);return new Date(c+d)}t.exports=e.default})(oc,oc.exports)),oc.exports}var LT;function $6(){return LT||(LT=1,(function(t,e){var r=ir().default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=o;var n=r(j6()),i=r(Xr()),a=r(vo());function o(s,l){(0,i.default)(2,arguments);var c=(0,a.default)(l);return(0,n.default)(s,-c)}t.exports=e.default})(ac,ac.exports)),ac.exports}var uc={exports:{}},lc={exports:{}},NT;function U6(){return NT||(NT=1,(function(t,e){var r=ir().default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=o;var n=r(mi()),i=r(Xr()),a=864e5;function o(s){(0,i.default)(1,arguments);var l=(0,n.default)(s),c=l.getTime();l.setUTCMonth(0,1),l.setUTCHours(0,0,0,0);var d=l.getTime(),h=c-d;return Math.floor(h/a)+1}t.exports=e.default})(lc,lc.exports)),lc.exports}var cc={exports:{}},fc={exports:{}},FT;function J0(){return FT||(FT=1,(function(t,e){var r=ir().default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=a;var n=r(mi()),i=r(Xr());function a(o){(0,i.default)(1,arguments);var s=1,l=(0,n.default)(o),c=l.getUTCDay(),d=(c<s?7:0)+c-s;return l.setUTCDate(l.getUTCDate()-d),l.setUTCHours(0,0,0,0),l}t.exports=e.default})(fc,fc.exports)),fc.exports}var dc={exports:{}},hc={exports:{}},kT;function ED(){return kT||(kT=1,(function(t,e){var r=ir().default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=o;var n=r(mi()),i=r(Xr()),a=r(J0());function o(s){(0,i.default)(1,arguments);var l=(0,n.default)(s),c=l.getUTCFullYear(),d=new Date(0);d.setUTCFullYear(c+1,0,4),d.setUTCHours(0,0,0,0);var h=(0,a.default)(d),g=new Date(0);g.setUTCFullYear(c,0,4),g.setUTCHours(0,0,0,0);var m=(0,a.default)(g);return l.getTime()>=h.getTime()?c+1:l.getTime()>=m.getTime()?c:c-1}t.exports=e.default})(hc,hc.exports)),hc.exports}var jT;function q6(){return jT||(jT=1,(function(t,e){var r=ir().default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=o;var n=r(ED()),i=r(J0()),a=r(Xr());function o(s){(0,a.default)(1,arguments);var l=(0,n.default)(s),c=new Date(0);c.setUTCFullYear(l,0,4),c.setUTCHours(0,0,0,0);var d=(0,i.default)(c);return d}t.exports=e.default})(dc,dc.exports)),dc.exports}var $T;function H6(){return $T||($T=1,(function(t,e){var r=ir().default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=l;var n=r(mi()),i=r(J0()),a=r(q6()),o=r(Xr()),s=6048e5;function l(c){(0,o.default)(1,arguments);var d=(0,n.default)(c),h=(0,i.default)(d).getTime()-(0,a.default)(d).getTime();return Math.round(h/s)+1}t.exports=e.default})(cc,cc.exports)),cc.exports}var pc={exports:{}},gc={exports:{}},ru={},UT;function Dd(){if(UT)return ru;UT=1,Object.defineProperty(ru,"__esModule",{value:!0}),ru.getDefaultOptions=e,ru.setDefaultOptions=r;var t={};function e(){return t}function r(n){t=n}return ru}var qT;function Q0(){return qT||(qT=1,(function(t,e){var r=ir().default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=s;var n=r(mi()),i=r(Xr()),a=r(vo()),o=Dd();function s(l,c){var d,h,g,m,v,_,y,x;(0,i.default)(1,arguments);var w=(0,o.getDefaultOptions)(),C=(0,a.default)((d=(h=(g=(m=c==null?void 0:c.weekStartsOn)!==null&&m!==void 0?m:c==null||(v=c.locale)===null||v===void 0||(_=v.options)===null||_===void 0?void 0:_.weekStartsOn)!==null&&g!==void 0?g:w.weekStartsOn)!==null&&h!==void 0?h:(y=w.locale)===null||y===void 0||(x=y.options)===null||x===void 0?void 0:x.weekStartsOn)!==null&&d!==void 0?d:0);if(!(C>=0&&C<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var A=(0,n.default)(l),E=A.getUTCDay(),S=(E<C?7:0)+E-C;return A.setUTCDate(A.getUTCDate()-S),A.setUTCHours(0,0,0,0),A}t.exports=e.default})(gc,gc.exports)),gc.exports}var mc={exports:{}},vc={exports:{}},HT;function OD(){return HT||(HT=1,(function(t,e){var r=ir().default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=l;var n=r(mi()),i=r(Xr()),a=r(Q0()),o=r(vo()),s=Dd();function l(c,d){var h,g,m,v,_,y,x,w;(0,i.default)(1,arguments);var C=(0,n.default)(c),A=C.getUTCFullYear(),E=(0,s.getDefaultOptions)(),S=(0,o.default)((h=(g=(m=(v=d==null?void 0:d.firstWeekContainsDate)!==null&&v!==void 0?v:d==null||(_=d.locale)===null||_===void 0||(y=_.options)===null||y===void 0?void 0:y.firstWeekContainsDate)!==null&&m!==void 0?m:E.firstWeekContainsDate)!==null&&g!==void 0?g:(x=E.locale)===null||x===void 0||(w=x.options)===null||w===void 0?void 0:w.firstWeekContainsDate)!==null&&h!==void 0?h:1);if(!(S>=1&&S<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var T=new Date(0);T.setUTCFullYear(A+1,0,S),T.setUTCHours(0,0,0,0);var D=(0,a.default)(T,d),P=new Date(0);P.setUTCFullYear(A,0,S),P.setUTCHours(0,0,0,0);var N=(0,a.default)(P,d);return C.getTime()>=D.getTime()?A+1:C.getTime()>=N.getTime()?A:A-1}t.exports=e.default})(vc,vc.exports)),vc.exports}var WT;function W6(){return WT||(WT=1,(function(t,e){var r=ir().default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=l;var n=r(OD()),i=r(Xr()),a=r(Q0()),o=r(vo()),s=Dd();function l(c,d){var h,g,m,v,_,y,x,w;(0,i.default)(1,arguments);var C=(0,s.getDefaultOptions)(),A=(0,o.default)((h=(g=(m=(v=d==null?void 0:d.firstWeekContainsDate)!==null&&v!==void 0?v:d==null||(_=d.locale)===null||_===void 0||(y=_.options)===null||y===void 0?void 0:y.firstWeekContainsDate)!==null&&m!==void 0?m:C.firstWeekContainsDate)!==null&&g!==void 0?g:(x=C.locale)===null||x===void 0||(w=x.options)===null||w===void 0?void 0:w.firstWeekContainsDate)!==null&&h!==void 0?h:1),E=(0,n.default)(c,d),S=new Date(0);S.setUTCFullYear(E,0,A),S.setUTCHours(0,0,0,0);var T=(0,a.default)(S,d);return T}t.exports=e.default})(mc,mc.exports)),mc.exports}var BT;function B6(){return BT||(BT=1,(function(t,e){var r=ir().default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=l;var n=r(mi()),i=r(Q0()),a=r(W6()),o=r(Xr()),s=6048e5;function l(c,d){(0,o.default)(1,arguments);var h=(0,n.default)(c),g=(0,i.default)(h,d).getTime()-(0,a.default)(h,d).getTime();return Math.round(g/s)+1}t.exports=e.default})(pc,pc.exports)),pc.exports}var yc={exports:{}},zT;function AD(){return zT||(zT=1,(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=r;function r(n,i){for(var a=n<0?"-":"",o=Math.abs(n).toString();o.length<i;)o="0"+o;return a+o}t.exports=e.default})(yc,yc.exports)),yc.exports}var bc={exports:{}},VT;function z6(){return VT||(VT=1,(function(t,e){var r=ir().default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=r(AD()),i={y:function(s,l){var c=s.getUTCFullYear(),d=c>0?c:1-c;return(0,n.default)(l==="yy"?d%100:d,l.length)},M:function(s,l){var c=s.getUTCMonth();return l==="M"?String(c+1):(0,n.default)(c+1,2)},d:function(s,l){return(0,n.default)(s.getUTCDate(),l.length)},a:function(s,l){var c=s.getUTCHours()/12>=1?"pm":"am";switch(l){case"a":case"aa":return c.toUpperCase();case"aaa":return c;case"aaaaa":return c[0];case"aaaa":default:return c==="am"?"a.m.":"p.m."}},h:function(s,l){return(0,n.default)(s.getUTCHours()%12||12,l.length)},H:function(s,l){return(0,n.default)(s.getUTCHours(),l.length)},m:function(s,l){return(0,n.default)(s.getUTCMinutes(),l.length)},s:function(s,l){return(0,n.default)(s.getUTCSeconds(),l.length)},S:function(s,l){var c=l.length,d=s.getUTCMilliseconds(),h=Math.floor(d*Math.pow(10,c-3));return(0,n.default)(h,l.length)}},a=i;e.default=a,t.exports=e.default})(bc,bc.exports)),bc.exports}var GT;function V6(){return GT||(GT=1,(function(t,e){var r=ir().default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=r(U6()),i=r(H6()),a=r(ED()),o=r(B6()),s=r(OD()),l=r(AD()),c=r(z6()),d={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},h={G:function(x,w,C){var A=x.getUTCFullYear()>0?1:0;switch(w){case"G":case"GG":case"GGG":return C.era(A,{width:"abbreviated"});case"GGGGG":return C.era(A,{width:"narrow"});case"GGGG":default:return C.era(A,{width:"wide"})}},y:function(x,w,C){if(w==="yo"){var A=x.getUTCFullYear(),E=A>0?A:1-A;return C.ordinalNumber(E,{unit:"year"})}return c.default.y(x,w)},Y:function(x,w,C,A){var E=(0,s.default)(x,A),S=E>0?E:1-E;if(w==="YY"){var T=S%100;return(0,l.default)(T,2)}return w==="Yo"?C.ordinalNumber(S,{unit:"year"}):(0,l.default)(S,w.length)},R:function(x,w){var C=(0,a.default)(x);return(0,l.default)(C,w.length)},u:function(x,w){var C=x.getUTCFullYear();return(0,l.default)(C,w.length)},Q:function(x,w,C){var A=Math.ceil((x.getUTCMonth()+1)/3);switch(w){case"Q":return String(A);case"QQ":return(0,l.default)(A,2);case"Qo":return C.ordinalNumber(A,{unit:"quarter"});case"QQQ":return C.quarter(A,{width:"abbreviated",context:"formatting"});case"QQQQQ":return C.quarter(A,{width:"narrow",context:"formatting"});case"QQQQ":default:return C.quarter(A,{width:"wide",context:"formatting"})}},q:function(x,w,C){var A=Math.ceil((x.getUTCMonth()+1)/3);switch(w){case"q":return String(A);case"qq":return(0,l.default)(A,2);case"qo":return C.ordinalNumber(A,{unit:"quarter"});case"qqq":return C.quarter(A,{width:"abbreviated",context:"standalone"});case"qqqqq":return C.quarter(A,{width:"narrow",context:"standalone"});case"qqqq":default:return C.quarter(A,{width:"wide",context:"standalone"})}},M:function(x,w,C){var A=x.getUTCMonth();switch(w){case"M":case"MM":return c.default.M(x,w);case"Mo":return C.ordinalNumber(A+1,{unit:"month"});case"MMM":return C.month(A,{width:"abbreviated",context:"formatting"});case"MMMMM":return C.month(A,{width:"narrow",context:"formatting"});case"MMMM":default:return C.month(A,{width:"wide",context:"formatting"})}},L:function(x,w,C){var A=x.getUTCMonth();switch(w){case"L":return String(A+1);case"LL":return(0,l.default)(A+1,2);case"Lo":return C.ordinalNumber(A+1,{unit:"month"});case"LLL":return C.month(A,{width:"abbreviated",context:"standalone"});case"LLLLL":return C.month(A,{width:"narrow",context:"standalone"});case"LLLL":default:return C.month(A,{width:"wide",context:"standalone"})}},w:function(x,w,C,A){var E=(0,o.default)(x,A);return w==="wo"?C.ordinalNumber(E,{unit:"week"}):(0,l.default)(E,w.length)},I:function(x,w,C){var A=(0,i.default)(x);return w==="Io"?C.ordinalNumber(A,{unit:"week"}):(0,l.default)(A,w.length)},d:function(x,w,C){return w==="do"?C.ordinalNumber(x.getUTCDate(),{unit:"date"}):c.default.d(x,w)},D:function(x,w,C){var A=(0,n.default)(x);return w==="Do"?C.ordinalNumber(A,{unit:"dayOfYear"}):(0,l.default)(A,w.length)},E:function(x,w,C){var A=x.getUTCDay();switch(w){case"E":case"EE":case"EEE":return C.day(A,{width:"abbreviated",context:"formatting"});case"EEEEE":return C.day(A,{width:"narrow",context:"formatting"});case"EEEEEE":return C.day(A,{width:"short",context:"formatting"});case"EEEE":default:return C.day(A,{width:"wide",context:"formatting"})}},e:function(x,w,C,A){var E=x.getUTCDay(),S=(E-A.weekStartsOn+8)%7||7;switch(w){case"e":return String(S);case"ee":return(0,l.default)(S,2);case"eo":return C.ordinalNumber(S,{unit:"day"});case"eee":return C.day(E,{width:"abbreviated",context:"formatting"});case"eeeee":return C.day(E,{width:"narrow",context:"formatting"});case"eeeeee":return C.day(E,{width:"short",context:"formatting"});case"eeee":default:return C.day(E,{width:"wide",context:"formatting"})}},c:function(x,w,C,A){var E=x.getUTCDay(),S=(E-A.weekStartsOn+8)%7||7;switch(w){case"c":return String(S);case"cc":return(0,l.default)(S,w.length);case"co":return C.ordinalNumber(S,{unit:"day"});case"ccc":return C.day(E,{width:"abbreviated",context:"standalone"});case"ccccc":return C.day(E,{width:"narrow",context:"standalone"});case"cccccc":return C.day(E,{width:"short",context:"standalone"});case"cccc":default:return C.day(E,{width:"wide",context:"standalone"})}},i:function(x,w,C){var A=x.getUTCDay(),E=A===0?7:A;switch(w){case"i":return String(E);case"ii":return(0,l.default)(E,w.length);case"io":return C.ordinalNumber(E,{unit:"day"});case"iii":return C.day(A,{width:"abbreviated",context:"formatting"});case"iiiii":return C.day(A,{width:"narrow",context:"formatting"});case"iiiiii":return C.day(A,{width:"short",context:"formatting"});case"iiii":default:return C.day(A,{width:"wide",context:"formatting"})}},a:function(x,w,C){var A=x.getUTCHours(),E=A/12>=1?"pm":"am";switch(w){case"a":case"aa":return C.dayPeriod(E,{width:"abbreviated",context:"formatting"});case"aaa":return C.dayPeriod(E,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return C.dayPeriod(E,{width:"narrow",context:"formatting"});case"aaaa":default:return C.dayPeriod(E,{width:"wide",context:"formatting"})}},b:function(x,w,C){var A=x.getUTCHours(),E;switch(A===12?E=d.noon:A===0?E=d.midnight:E=A/12>=1?"pm":"am",w){case"b":case"bb":return C.dayPeriod(E,{width:"abbreviated",context:"formatting"});case"bbb":return C.dayPeriod(E,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return C.dayPeriod(E,{width:"narrow",context:"formatting"});case"bbbb":default:return C.dayPeriod(E,{width:"wide",context:"formatting"})}},B:function(x,w,C){var A=x.getUTCHours(),E;switch(A>=17?E=d.evening:A>=12?E=d.afternoon:A>=4?E=d.morning:E=d.night,w){case"B":case"BB":case"BBB":return C.dayPeriod(E,{width:"abbreviated",context:"formatting"});case"BBBBB":return C.dayPeriod(E,{width:"narrow",context:"formatting"});case"BBBB":default:return C.dayPeriod(E,{width:"wide",context:"formatting"})}},h:function(x,w,C){if(w==="ho"){var A=x.getUTCHours()%12;return A===0&&(A=12),C.ordinalNumber(A,{unit:"hour"})}return c.default.h(x,w)},H:function(x,w,C){return w==="Ho"?C.ordinalNumber(x.getUTCHours(),{unit:"hour"}):c.default.H(x,w)},K:function(x,w,C){var A=x.getUTCHours()%12;return w==="Ko"?C.ordinalNumber(A,{unit:"hour"}):(0,l.default)(A,w.length)},k:function(x,w,C){var A=x.getUTCHours();return A===0&&(A=24),w==="ko"?C.ordinalNumber(A,{unit:"hour"}):(0,l.default)(A,w.length)},m:function(x,w,C){return w==="mo"?C.ordinalNumber(x.getUTCMinutes(),{unit:"minute"}):c.default.m(x,w)},s:function(x,w,C){return w==="so"?C.ordinalNumber(x.getUTCSeconds(),{unit:"second"}):c.default.s(x,w)},S:function(x,w){return c.default.S(x,w)},X:function(x,w,C,A){var E=A._originalDate||x,S=E.getTimezoneOffset();if(S===0)return"Z";switch(w){case"X":return m(S);case"XXXX":case"XX":return v(S);case"XXXXX":case"XXX":default:return v(S,":")}},x:function(x,w,C,A){var E=A._originalDate||x,S=E.getTimezoneOffset();switch(w){case"x":return m(S);case"xxxx":case"xx":return v(S);case"xxxxx":case"xxx":default:return v(S,":")}},O:function(x,w,C,A){var E=A._originalDate||x,S=E.getTimezoneOffset();switch(w){case"O":case"OO":case"OOO":return"GMT"+g(S,":");case"OOOO":default:return"GMT"+v(S,":")}},z:function(x,w,C,A){var E=A._originalDate||x,S=E.getTimezoneOffset();switch(w){case"z":case"zz":case"zzz":return"GMT"+g(S,":");case"zzzz":default:return"GMT"+v(S,":")}},t:function(x,w,C,A){var E=A._originalDate||x,S=Math.floor(E.getTime()/1e3);return(0,l.default)(S,w.length)},T:function(x,w,C,A){var E=A._originalDate||x,S=E.getTime();return(0,l.default)(S,w.length)}};function g(y,x){var w=y>0?"-":"+",C=Math.abs(y),A=Math.floor(C/60),E=C%60;if(E===0)return w+String(A);var S=x;return w+String(A)+S+(0,l.default)(E,2)}function m(y,x){if(y%60===0){var w=y>0?"-":"+";return w+(0,l.default)(Math.abs(y)/60,2)}return v(y,x)}function v(y,x){var w=x||"",C=y>0?"-":"+",A=Math.abs(y),E=(0,l.default)(Math.floor(A/60),2),S=(0,l.default)(A%60,2);return C+E+w+S}var _=h;e.default=_,t.exports=e.default})(uc,uc.exports)),uc.exports}var _c={exports:{}},KT;function G6(){return KT||(KT=1,(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=function(l,c){switch(l){case"P":return c.date({width:"short"});case"PP":return c.date({width:"medium"});case"PPP":return c.date({width:"long"});case"PPPP":default:return c.date({width:"full"})}},n=function(l,c){switch(l){case"p":return c.time({width:"short"});case"pp":return c.time({width:"medium"});case"ppp":return c.time({width:"long"});case"pppp":default:return c.time({width:"full"})}},i=function(l,c){var d=l.match(/(P+)(p+)?/)||[],h=d[1],g=d[2];if(!g)return r(l,c);var m;switch(h){case"P":m=c.dateTime({width:"short"});break;case"PP":m=c.dateTime({width:"medium"});break;case"PPP":m=c.dateTime({width:"long"});break;case"PPPP":default:m=c.dateTime({width:"full"});break}return m.replace("{{date}}",r(h,c)).replace("{{time}}",n(g,c))},a={p:n,P:i},o=a;e.default=o,t.exports=e.default})(_c,_c.exports)),_c.exports}var xc={exports:{}},XT;function RD(){return XT||(XT=1,(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=r;function r(n){var i=new Date(Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()));return i.setUTCFullYear(n.getFullYear()),n.getTime()-i.getTime()}t.exports=e.default})(xc,xc.exports)),xc.exports}var Vo={},YT;function K6(){if(YT)return Vo;YT=1,Object.defineProperty(Vo,"__esModule",{value:!0}),Vo.isProtectedDayOfYearToken=r,Vo.isProtectedWeekYearToken=n,Vo.throwProtectedError=i;var t=["D","DD"],e=["YY","YYYY"];function r(a){return t.indexOf(a)!==-1}function n(a){return e.indexOf(a)!==-1}function i(a,o,s){if(a==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(o,"`) for formatting years to the input `").concat(s,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(a==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(o,"`) for formatting years to the input `").concat(s,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(a==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(o,"`) for formatting days of the month to the input `").concat(s,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(a==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(o,"`) for formatting days of the month to the input `").concat(s,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}return Vo}var wc={exports:{}},Tc={exports:{}},Sc={exports:{}},ZT;function X6(){return ZT||(ZT=1,(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},n=function(o,s,l){var c,d=r[o];return typeof d=="string"?c=d:s===1?c=d.one:c=d.other.replace("{{count}}",s.toString()),l!=null&&l.addSuffix?l.comparison&&l.comparison>0?"in "+c:c+" ago":c},i=n;e.default=i,t.exports=e.default})(Sc,Sc.exports)),Sc.exports}var Cc={exports:{}},Ec={exports:{}},JT;function Y6(){return JT||(JT=1,(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=r;function r(n){return function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=i.width?String(i.width):n.defaultWidth,o=n.formats[a]||n.formats[n.defaultWidth];return o}}t.exports=e.default})(Ec,Ec.exports)),Ec.exports}var QT;function Z6(){return QT||(QT=1,(function(t,e){var r=ir().default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=r(Y6()),i={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},a={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},o={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},s={date:(0,n.default)({formats:i,defaultWidth:"full"}),time:(0,n.default)({formats:a,defaultWidth:"full"}),dateTime:(0,n.default)({formats:o,defaultWidth:"full"})},l=s;e.default=l,t.exports=e.default})(Cc,Cc.exports)),Cc.exports}var Oc={exports:{}},eS;function J6(){return eS||(eS=1,(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},n=function(o,s,l,c){return r[o]},i=n;e.default=i,t.exports=e.default})(Oc,Oc.exports)),Oc.exports}var Ac={exports:{}},Rc={exports:{}},tS;function Q6(){return tS||(tS=1,(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=r;function r(n){return function(i,a){var o=a!=null&&a.context?String(a.context):"standalone",s;if(o==="formatting"&&n.formattingValues){var l=n.defaultFormattingWidth||n.defaultWidth,c=a!=null&&a.width?String(a.width):l;s=n.formattingValues[c]||n.formattingValues[l]}else{var d=n.defaultWidth,h=a!=null&&a.width?String(a.width):n.defaultWidth;s=n.values[h]||n.values[d]}var g=n.argumentCallback?n.argumentCallback(i):i;return s[g]}}t.exports=e.default})(Rc,Rc.exports)),Rc.exports}var rS;function e4(){return rS||(rS=1,(function(t,e){var r=ir().default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=r(Q6()),i={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},a={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},o={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},s={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},l={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},c={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},d=function(v,_){var y=Number(v),x=y%100;if(x>20||x<10)switch(x%10){case 1:return y+"st";case 2:return y+"nd";case 3:return y+"rd"}return y+"th"},h={ordinalNumber:d,era:(0,n.default)({values:i,defaultWidth:"wide"}),quarter:(0,n.default)({values:a,defaultWidth:"wide",argumentCallback:function(v){return v-1}}),month:(0,n.default)({values:o,defaultWidth:"wide"}),day:(0,n.default)({values:s,defaultWidth:"wide"}),dayPeriod:(0,n.default)({values:l,defaultWidth:"wide",formattingValues:c,defaultFormattingWidth:"wide"})},g=h;e.default=g,t.exports=e.default})(Ac,Ac.exports)),Ac.exports}var Ic={exports:{}},Dc={exports:{}},nS;function t4(){return nS||(nS=1,(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=r;function r(a){return function(o){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l=s.width,c=l&&a.matchPatterns[l]||a.matchPatterns[a.defaultMatchWidth],d=o.match(c);if(!d)return null;var h=d[0],g=l&&a.parsePatterns[l]||a.parsePatterns[a.defaultParseWidth],m=Array.isArray(g)?i(g,function(y){return y.test(h)}):n(g,function(y){return y.test(h)}),v;v=a.valueCallback?a.valueCallback(m):m,v=s.valueCallback?s.valueCallback(v):v;var _=o.slice(h.length);return{value:v,rest:_}}}function n(a,o){for(var s in a)if(a.hasOwnProperty(s)&&o(a[s]))return s}function i(a,o){for(var s=0;s<a.length;s++)if(o(a[s]))return s}t.exports=e.default})(Dc,Dc.exports)),Dc.exports}var Mc={exports:{}},iS;function r4(){return iS||(iS=1,(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=r;function r(n){return function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=i.match(n.matchPattern);if(!o)return null;var s=o[0],l=i.match(n.parsePattern);if(!l)return null;var c=n.valueCallback?n.valueCallback(l[0]):l[0];c=a.valueCallback?a.valueCallback(c):c;var d=i.slice(s.length);return{value:c,rest:d}}}t.exports=e.default})(Mc,Mc.exports)),Mc.exports}var aS;function n4(){return aS||(aS=1,(function(t,e){var r=ir().default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=r(t4()),i=r(r4()),a=/^(\d+)(th|st|nd|rd)?/i,o=/\d+/i,s={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},l={any:[/^b/i,/^(a|c)/i]},c={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},d={any:[/1/i,/2/i,/3/i,/4/i]},h={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},g={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},m={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},v={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},_={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},y={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},x={ordinalNumber:(0,i.default)({matchPattern:a,parsePattern:o,valueCallback:function(A){return parseInt(A,10)}}),era:(0,n.default)({matchPatterns:s,defaultMatchWidth:"wide",parsePatterns:l,defaultParseWidth:"any"}),quarter:(0,n.default)({matchPatterns:c,defaultMatchWidth:"wide",parsePatterns:d,defaultParseWidth:"any",valueCallback:function(A){return A+1}}),month:(0,n.default)({matchPatterns:h,defaultMatchWidth:"wide",parsePatterns:g,defaultParseWidth:"any"}),day:(0,n.default)({matchPatterns:m,defaultMatchWidth:"wide",parsePatterns:v,defaultParseWidth:"any"}),dayPeriod:(0,n.default)({matchPatterns:_,defaultMatchWidth:"any",parsePatterns:y,defaultParseWidth:"any"})},w=x;e.default=w,t.exports=e.default})(Ic,Ic.exports)),Ic.exports}var oS;function i4(){return oS||(oS=1,(function(t,e){var r=ir().default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=r(X6()),i=r(Z6()),a=r(J6()),o=r(e4()),s=r(n4()),l={code:"en-US",formatDistance:n.default,formatLong:i.default,formatRelative:a.default,localize:o.default,match:s.default,options:{weekStartsOn:0,firstWeekContainsDate:1}},c=l;e.default=c,t.exports=e.default})(Tc,Tc.exports)),Tc.exports}var sS;function a4(){return sS||(sS=1,(function(t,e){var r=ir().default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=r(i4()),i=n.default;e.default=i,t.exports=e.default})(wc,wc.exports)),wc.exports}var uS;function o4(){return uS||(uS=1,(function(t,e){var r=ir().default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=C;var n=r(k6()),i=r($6()),a=r(mi()),o=r(V6()),s=r(G6()),l=r(RD()),c=K6(),d=r(vo()),h=r(Xr()),g=Dd(),m=r(a4()),v=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,_=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,y=/^'([^]*?)'?$/,x=/''/g,w=/[a-zA-Z]/;function C(E,S,T){var D,P,N,F,B,W,te,J,ie,le,se,ce,Q,$,X,Z,fe,be;(0,h.default)(2,arguments);var _e=String(S),Le=(0,g.getDefaultOptions)(),Ae=(D=(P=T==null?void 0:T.locale)!==null&&P!==void 0?P:Le.locale)!==null&&D!==void 0?D:m.default,he=(0,d.default)((N=(F=(B=(W=T==null?void 0:T.firstWeekContainsDate)!==null&&W!==void 0?W:T==null||(te=T.locale)===null||te===void 0||(J=te.options)===null||J===void 0?void 0:J.firstWeekContainsDate)!==null&&B!==void 0?B:Le.firstWeekContainsDate)!==null&&F!==void 0?F:(ie=Le.locale)===null||ie===void 0||(le=ie.options)===null||le===void 0?void 0:le.firstWeekContainsDate)!==null&&N!==void 0?N:1);if(!(he>=1&&he<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var ge=(0,d.default)((se=(ce=(Q=($=T==null?void 0:T.weekStartsOn)!==null&&$!==void 0?$:T==null||(X=T.locale)===null||X===void 0||(Z=X.options)===null||Z===void 0?void 0:Z.weekStartsOn)!==null&&Q!==void 0?Q:Le.weekStartsOn)!==null&&ce!==void 0?ce:(fe=Le.locale)===null||fe===void 0||(be=fe.options)===null||be===void 0?void 0:be.weekStartsOn)!==null&&se!==void 0?se:0);if(!(ge>=0&&ge<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!Ae.localize)throw new RangeError("locale must contain localize property");if(!Ae.formatLong)throw new RangeError("locale must contain formatLong property");var Ne=(0,a.default)(E);if(!(0,n.default)(Ne))throw new RangeError("Invalid time value");var we=(0,l.default)(Ne),ve=(0,i.default)(Ne,we),Fe={firstWeekContainsDate:he,weekStartsOn:ge,locale:Ae,_originalDate:Ne},Be=_e.match(_).map(function(ke){var Ze=ke[0];if(Ze==="p"||Ze==="P"){var gt=s.default[Ze];return gt(ke,Ae.formatLong)}return ke}).join("").match(v).map(function(ke){if(ke==="''")return"'";var Ze=ke[0];if(Ze==="'")return A(ke);var gt=o.default[Ze];if(gt)return!(T!=null&&T.useAdditionalWeekYearTokens)&&(0,c.isProtectedWeekYearToken)(ke)&&(0,c.throwProtectedError)(ke,S,String(E)),!(T!=null&&T.useAdditionalDayOfYearTokens)&&(0,c.isProtectedDayOfYearToken)(ke)&&(0,c.throwProtectedError)(ke,S,String(E)),gt(ve,ke,Ae.localize,Fe);if(Ze.match(w))throw new RangeError("Format string contains an unescaped latin alphabet character `"+Ze+"`");return ke}).join("");return Be}function A(E){var S=E.match(y);return S?S[1].replace(x,"'"):E}t.exports=e.default})(ec,ec.exports)),ec.exports}var Pc={exports:{}},Lc={exports:{}},lS;function s4(){return lS||(lS=1,(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=r;function r(o,s,l){var c=a(o,l.timeZone,l.locale);return c.formatToParts?n(c,s):i(c,s)}function n(o,s){for(var l=o.formatToParts(s),c=l.length-1;c>=0;--c)if(l[c].type==="timeZoneName")return l[c].value}function i(o,s){var l=o.format(s).replace(/\u200E/g,""),c=/ [\w-+ ]+$/.exec(l);return c?c[0].substr(1):""}function a(o,s,l){if(l&&!l.code)throw new Error("date-fns-tz error: Please set a language code on the locale object imported from date-fns, e.g. `locale.code = 'en-US'`");return new Intl.DateTimeFormat(l?[l.code,"en-US"]:void 0,{timeZone:s,timeZoneName:o})}t.exports=e.default})(Lc,Lc.exports)),Lc.exports}var Nc={exports:{}},Fc={exports:{}},cS;function u4(){return cS||(cS=1,(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=r;function r(l,c){var d=s(c);return d.formatToParts?i(d,l):a(d,l)}var n={year:0,month:1,day:2,hour:3,minute:4,second:5};function i(l,c){try{for(var d=l.formatToParts(c),h=[],g=0;g<d.length;g++){var m=n[d[g].type];m>=0&&(h[m]=parseInt(d[g].value,10))}return h}catch(v){if(v instanceof RangeError)return[NaN];throw v}}function a(l,c){var d=l.format(c).replace(/\u200E/g,""),h=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(d);return[h[3],h[1],h[2],h[4],h[5],h[6]]}var o={};function s(l){if(!o[l]){var c=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:"America/New_York",year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(new Date("2014-06-25T04:00:00.123Z")),d=c==="06/25/2014, 00:00:00"||c==="06/25/2014 00:00:00";o[l]=d?new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:l,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:l,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})}return o[l]}t.exports=e.default})(Fc,Fc.exports)),Fc.exports}var kc={exports:{}},fS;function l4(){return fS||(fS=1,(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=r;function r(n,i,a,o,s,l,c){var d=new Date(0);return d.setUTCFullYear(n,i,a),d.setUTCHours(o,s,l,c),d}t.exports=e.default})(kc,kc.exports)),kc.exports}var dS;function eb(){return dS||(dS=1,(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=l;var r=i(u4()),n=i(l4());function i(_){return _&&_.__esModule?_:{default:_}}var a=36e5,o=6e4,s={timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\d{2})$/,timezoneHHMM:/^([+-]\d{2}):?(\d{2})$/};function l(_,y,x){var w,C;if(!_||(w=s.timezoneZ.exec(_),w))return 0;var A;if(w=s.timezoneHH.exec(_),w)return A=parseInt(w[1],10),g(A)?-(A*a):NaN;if(w=s.timezoneHHMM.exec(_),w){A=parseInt(w[1],10);var E=parseInt(w[2],10);return g(A,E)?(C=Math.abs(A)*a+E*o,A>0?-C:C):NaN}if(v(_)){y=new Date(y||Date.now());var S=x?y:c(y),T=d(S,_),D=x?T:h(y,T,_);return-D}return NaN}function c(_){return(0,n.default)(_.getFullYear(),_.getMonth(),_.getDate(),_.getHours(),_.getMinutes(),_.getSeconds(),_.getMilliseconds())}function d(_,y){var x=(0,r.default)(_,y),w=(0,n.default)(x[0],x[1]-1,x[2],x[3]%24,x[4],x[5],0).getTime(),C=_.getTime(),A=C%1e3;return C-=A>=0?A:1e3+A,w-C}function h(_,y,x){var w=_.getTime(),C=w-y,A=d(new Date(C),x);if(y===A)return y;C-=A-y;var E=d(new Date(C),x);return A===E?A:Math.max(A,E)}function g(_,y){return-23<=_&&_<=23&&(y==null||0<=y&&y<=59)}var m={};function v(_){if(m[_])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:_}),m[_]=!0,!0}catch{return!1}}t.exports=e.default})(Nc,Nc.exports)),Nc.exports}var hS;function c4(){return hS||(hS=1,(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=i(s4()),n=i(eb());function i(m){return m&&m.__esModule?m:{default:m}}var a=60*1e3,o={X:function(m,v,_,y){var x=s(y.timeZone,y._originalDate||m);if(x===0)return"Z";switch(v){case"X":return d(x);case"XXXX":case"XX":return c(x);case"XXXXX":case"XXX":default:return c(x,":")}},x:function(m,v,_,y){var x=s(y.timeZone,y._originalDate||m);switch(v){case"x":return d(x);case"xxxx":case"xx":return c(x);case"xxxxx":case"xxx":default:return c(x,":")}},O:function(m,v,_,y){var x=s(y.timeZone,y._originalDate||m);switch(v){case"O":case"OO":case"OOO":return"GMT"+h(x,":");case"OOOO":default:return"GMT"+c(x,":")}},z:function(m,v,_,y){var x=y._originalDate||m;switch(v){case"z":case"zz":case"zzz":return(0,r.default)("short",x,y);case"zzzz":default:return(0,r.default)("long",x,y)}}};function s(m,v){var _=m?(0,n.default)(m,v,!0)/a:v.getTimezoneOffset();if(Number.isNaN(_))throw new RangeError("Invalid time zone specified: "+m);return _}function l(m,v){for(var _=m<0?"-":"",y=Math.abs(m).toString();y.length<v;)y="0"+y;return _+y}function c(m,v){var _=v||"",y=m>0?"-":"+",x=Math.abs(m),w=l(Math.floor(x/60),2),C=l(Math.floor(x%60),2);return y+w+_+C}function d(m,v){if(m%60===0){var _=m>0?"-":"+";return _+l(Math.abs(m)/60,2)}return c(m,v)}function h(m,v){var _=m>0?"-":"+",y=Math.abs(m),x=Math.floor(y/60),w=y%60;if(w===0)return _+String(x);var C=v;return _+String(x)+C+l(w,2)}var g=o;e.default=g,t.exports=e.default})(Pc,Pc.exports)),Pc.exports}var jc={exports:{}},$c={exports:{}},pS;function f4(){return pS||(pS=1,(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/,n=r;e.default=n,t.exports=e.default})($c,$c.exports)),$c.exports}var gS;function ID(){return gS||(gS=1,(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=h;var r=o(vo()),n=o(RD()),i=o(eb()),a=o(f4());function o(D){return D&&D.__esModule?D:{default:D}}var s=36e5,l=6e4,c=2,d={dateTimePattern:/^([0-9W+-]+)(T| )(.*)/,datePattern:/^([0-9W+-]+)(.*)/,YY:/^(\d{2})$/,YYY:[/^([+-]\d{2})$/,/^([+-]\d{3})$/,/^([+-]\d{4})$/],YYYY:/^(\d{4})/,YYYYY:[/^([+-]\d{4})/,/^([+-]\d{5})/,/^([+-]\d{6})/],MM:/^-(\d{2})$/,DDD:/^-?(\d{3})$/,MMDD:/^-?(\d{2})-?(\d{2})$/,Www:/^-?W(\d{2})$/,WwwD:/^-?W(\d{2})-?(\d{1})$/,HH:/^(\d{2}([.,]\d*)?)$/,HHMM:/^(\d{2}):?(\d{2}([.,]\d*)?)$/,HHMMSS:/^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,timeZone:a.default};function h(D,P){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");if(D===null)return new Date(NaN);var N=P||{},F=N.additionalDigits==null?c:(0,r.default)(N.additionalDigits);if(F!==2&&F!==1&&F!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(D instanceof Date||typeof D=="object"&&Object.prototype.toString.call(D)==="[object Date]")return new Date(D.getTime());if(typeof D=="number"||Object.prototype.toString.call(D)==="[object Number]")return new Date(D);if(!(typeof D=="string"||Object.prototype.toString.call(D)==="[object String]"))return new Date(NaN);var B=g(D),W=m(B.date,F),te=W.year,J=W.restDateString,ie=v(J,te);if(isNaN(ie))return new Date(NaN);if(ie){var le=ie.getTime(),se=0,ce;if(B.time&&(se=_(B.time),isNaN(se)))return new Date(NaN);if(B.timeZone||N.timeZone){if(ce=(0,i.default)(B.timeZone||N.timeZone,new Date(le+se)),isNaN(ce))return new Date(NaN)}else ce=(0,n.default)(new Date(le+se)),ce=(0,n.default)(new Date(le+se+ce));return new Date(le+se+ce)}else return new Date(NaN)}function g(D){var P={},N=d.dateTimePattern.exec(D),F;if(N?(P.date=N[1],F=N[3]):(N=d.datePattern.exec(D),N?(P.date=N[1],F=N[2]):(P.date=null,F=D)),F){var B=d.timeZone.exec(F);B?(P.time=F.replace(B[1],""),P.timeZone=B[1].trim()):P.time=F}return P}function m(D,P){var N=d.YYY[P],F=d.YYYYY[P],B;if(B=d.YYYY.exec(D)||F.exec(D),B){var W=B[1];return{year:parseInt(W,10),restDateString:D.slice(W.length)}}if(B=d.YY.exec(D)||N.exec(D),B){var te=B[1];return{year:parseInt(te,10)*100,restDateString:D.slice(te.length)}}return{year:null}}function v(D,P){if(P===null)return null;var N,F,B,W;if(D.length===0)return F=new Date(0),F.setUTCFullYear(P),F;if(N=d.MM.exec(D),N)return F=new Date(0),B=parseInt(N[1],10)-1,A(P,B)?(F.setUTCFullYear(P,B),F):new Date(NaN);if(N=d.DDD.exec(D),N){F=new Date(0);var te=parseInt(N[1],10);return E(P,te)?(F.setUTCFullYear(P,0,te),F):new Date(NaN)}if(N=d.MMDD.exec(D),N){F=new Date(0),B=parseInt(N[1],10)-1;var J=parseInt(N[2],10);return A(P,B,J)?(F.setUTCFullYear(P,B,J),F):new Date(NaN)}if(N=d.Www.exec(D),N)return W=parseInt(N[1],10)-1,S(P,W)?y(P,W):new Date(NaN);if(N=d.WwwD.exec(D),N){W=parseInt(N[1],10)-1;var ie=parseInt(N[2],10)-1;return S(P,W,ie)?y(P,W,ie):new Date(NaN)}return null}function _(D){var P,N,F;if(P=d.HH.exec(D),P)return N=parseFloat(P[1].replace(",",".")),T(N)?N%24*s:NaN;if(P=d.HHMM.exec(D),P)return N=parseInt(P[1],10),F=parseFloat(P[2].replace(",",".")),T(N,F)?N%24*s+F*l:NaN;if(P=d.HHMMSS.exec(D),P){N=parseInt(P[1],10),F=parseInt(P[2],10);var B=parseFloat(P[3].replace(",","."));return T(N,F,B)?N%24*s+F*l+B*1e3:NaN}return null}function y(D,P,N){P=P||0,N=N||0;var F=new Date(0);F.setUTCFullYear(D,0,4);var B=F.getUTCDay()||7,W=P*7+N+1-B;return F.setUTCDate(F.getUTCDate()+W),F}var x=[31,28,31,30,31,30,31,31,30,31,30,31],w=[31,29,31,30,31,30,31,31,30,31,30,31];function C(D){return D%400===0||D%4===0&&D%100!==0}function A(D,P,N){if(P<0||P>11)return!1;if(N!=null){if(N<1)return!1;var F=C(D);if(F&&N>w[P]||!F&&N>x[P])return!1}return!0}function E(D,P){if(P<1)return!1;var N=C(D);return!(N&&P>366||!N&&P>365)}function S(D,P,N){return!(P<0||P>52||N!=null&&(N<0||N>6))}function T(D,P,N){return!(D!=null&&(D<0||D>=25)||P!=null&&(P<0||P>=60)||N!=null&&(N<0||N>=60))}t.exports=e.default})(jc,jc.exports)),jc.exports}var mS;function DD(){return mS||(mS=1,(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=s;var r=a(o4()),n=a(c4()),i=a(ID());function a(l){return l&&l.__esModule?l:{default:l}}var o=/([xXOz]+)|''|'(''|[^'])+('|$)/g;function s(l,c,d){var h=String(c),g=d||{},m=h.match(o);if(m){var v=(0,i.default)(l,g);h=m.reduce(function(_,y){if(y[0]==="'")return _;var x=_.indexOf(y),w=_[x-1]==="'",C=_.replace(y,"'"+n.default[y[0]](v,y,null,g)+"'");return w?C.substring(0,x-1)+C.substring(x+1):C},h)}return(0,r.default)(l,h,g)}t.exports=e.default})(Ql,Ql.exports)),Ql.exports}var Uc={exports:{}},vS;function d4(){return vS||(vS=1,(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=a;var r=i(eb()),n=i(ID());function i(o){return o&&o.__esModule?o:{default:o}}function a(o,s,l){var c=(0,n.default)(o,l),d=(0,r.default)(s,c,!0),h=new Date(c.getTime()-d),g=new Date(0);return g.setFullYear(h.getUTCFullYear(),h.getUTCMonth(),h.getUTCDate()),g.setHours(h.getUTCHours(),h.getUTCMinutes(),h.getUTCSeconds(),h.getUTCMilliseconds()),g}t.exports=e.default})(Uc,Uc.exports)),Uc.exports}var yS;function h4(){return yS||(yS=1,(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=o;var r=a(N6()),n=a(DD()),i=a(d4());function a(s){return s&&s.__esModule?s:{default:s}}function o(s,l,c,d){var h=(0,r.default)(d);return h.timeZone=l,(0,n.default)((0,i.default)(s,l),c,h)}t.exports=e.default})(Yl,Yl.exports)),Yl.exports}var p4=h4();const MD=gi(p4),PD=({isFetching:t,isError:e,alert:r})=>{const{t:n}=Qt("location",{keyPrefix:"alerts.details"}),{dateTimeFormatPreferences:i,getTimeFormatString:a}=Ed(),o=a(!0),s=l=>l?MD(l,"UTC",`${i.preferredDateFormat} ${o} (zzz)`):"";return t?R.jsx(hg,{"data-testid":"loader-container",children:R.jsx(P6,{children:R.jsx(Tf,{linear:!1,indeterminate:!0,role:"progressbar","aria-label":"Loading...","aria-busy":"true",style:{"--md-circular-progress-size":"40px"}})})}):e?R.jsx(hg,{children:R.jsxs(W0,{children:[R.jsx($i,{filled:!0,style:{"--ix-icon-font-size":"45px",color:"var(--clr-critical, #db0028)"},children:"warning"}),R.jsx(ft,{variant:"body1",children:n("error")})]})}):R.jsxs(hg,{"data-testid":"alert-details-container",children:[R.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[R.jsx(D6,{children:r.alertName}),R.jsxs("div",{style:{display:"flex",gap:"10px"},children:[R.jsx(Yf,{title:r.alertType||""}),!!r.alertCategory&&R.jsx(Yf,{title:r.alertCategory})]})]}),R.jsx(M6,{}),R.jsxs(TT,{children:[R.jsx(Ai,{title:n("alert-number"),value:r.alertId,"data-testid":"alert-details--alert-number"}),R.jsxs(Gf,{children:[R.jsx(zr,{xs:6,children:R.jsx(Ai,{title:n("site"),value:r.site,"data-testid":"alert-details--site"})}),R.jsx(zr,{xs:6,children:R.jsx(Ai,{title:n("location"),value:r.location,"data-testid":"alert-details--location"})})]}),R.jsxs(Gf,{children:[R.jsx(zr,{xs:6,children:R.jsx(Ai,{title:n("total-load"),value:r.functionValue,"data-testid":"alert-details--total-load"})}),R.jsx(zr,{xs:6,children:R.jsx(Ai,{title:n("threshold-value"),value:r.alertThreshold,"data-testid":"alert-details--threshold-value"})})]}),R.jsx(Ai,{title:n("affected-ci"),value:r.deviceMetric,"data-testid":"alert-details--affected-ci"}),R.jsx(Ai,{title:n("description"),value:r.deviceName,"data-testid":"alert-details--description"}),R.jsxs("div",{children:[R.jsx(ft,{variant:"subtitle2",component:"h5",style:{marginBottom:"4px"},children:n("alert-timeline-summary")}),R.jsxs(TT,{children:[R.jsx(Ai,{title:n("alert-generated-on"),titleColor:rt.onSurfaceVariant,value:s(r.alertTimeStamp),"data-testid":"alert-details--alert-generated-on"}),r.alertDuration&&R.jsx(Ai,{title:n("duration"),titleColor:rt.onSurfaceVariant,value:r.alertDuration,"data-testid":"alert-details--duration"})]})]})]})]})},g4=({alertInstanceId:t})=>{const{data:e,isError:r,isFetching:n,refetch:i}=m6(t,{enabled:!!t,refetchOnWindowFocus:!1});ht(()=>{i()},[t,i]);const a=(e==null?void 0:e.at(0))||{};return R.jsx(PD,{alert:a,isFetching:n,isError:r})},m4=({alertInstanceId:t})=>{const{data:e,isError:r,isFetching:n,refetch:i}=_6(t,{enabled:!!t,refetchOnWindowFocus:!1});ht(()=>{i()},[t,i]);const a=(e==null?void 0:e.at(0))||{};return R.jsx(PD,{alert:a,isFetching:n,isError:r})},LD=({alertInstanceId:t,isHistorical:e})=>e?R.jsx(g4,{alertInstanceId:t}):R.jsx(m4,{alertInstanceId:t}),v4=({alertInstanceId:t,isOpen:e,isHistorical:r,handleClose:n})=>R.jsx(Kz,{open:e,onClose:n,children:R.jsxs("div",{style:{padding:"32px 40px"},children:[R.jsx("div",{style:{display:"flex",justifyContent:"flex-end"},children:R.jsx(NU,{icon:"close",onClick:n,style:{marginRight:"-20px"}})}),R.jsx(LD,{alertInstanceId:t,isHistorical:r})]})}),cs="all",tb="history",ND=t=>t===Qn.INSTANCES?Ny:t===Qn.HISTORY?TD:(t===Qn.DEFINITIONS,Kf),y4=({$active:t,children:e,style:r,...n})=>R.jsx("button",{style:{...Ca,display:"flex",flex:1,justifyContent:"space-between",padding:"8px 12px",borderRadius:12,background:t?rt.onSurface:rt.outline,color:t?rt.onPrimary:rt.onSurface,...r},...n,children:e}),b4={display:"flex",flex:1,justifyContent:"space-between",alignItems:"center",padding:"3px 10px",borderRadius:16,fontFamily:"'Roboto', sans-serif",fontSize:13,lineHeight:"18px",letterSpacing:"0.16px"},_4=({$background:t,$color:e,children:r,style:n,...i})=>R.jsx("div",{style:{...b4,background:t||rt.onPrimary,color:e||rt.onSurface,...n},...i,children:r}),x4={[kr.POWER]:rt.warning,[kr.ENVIRONMENTAL]:rt.success,[kr.AUXILIARY]:rt.info},Fy=({active:t,count:e,title:r,onClick:n})=>{const i=x4[r.toLowerCase()],a=i&&rt.onPrimary;return R.jsxs(y4,{type:"button",onClick:()=>n(),"data-testid":`alert-filter-button-${r}`,$active:!!t,children:[R.jsxs("div",{style:{display:"flex",columnGap:34,overflow:"hidden"},children:[R.jsx(_4,{$background:i,$color:a,"data-testid":`alert-filter-count-${r}`,children:e}),R.jsx(ft,{style:{color:"inherit"},children:r})]}),R.jsx($i,{style:{"--ix-icon-font-size":"24px"},children:"chevron_right"})]})},w4=({children:t,style:e,...r})=>{const n=Qe(At("sm"));return R.jsx("div",{style:{display:"flex",flexDirection:"column",rowGap:n?10:22,...e},...r,children:t})},FD=({children:t,style:e,...r})=>R.jsx("div",{style:{display:"flex",flexDirection:"column",rowGap:12,...e},...r,children:t}),T4=({title:t,items:e,selected:r,handleClose:n})=>{const{t:i}=Qt("location"),a=[{label:t,mobileLabel:R.jsx(ft,{variant:"h6",style:{fontSize:14},children:t}),trigger:()=>n()},{label:i("cancel"),mobileLabel:R.jsx($i,{style:{"--ix-icon-font-size":"24px",color:"rgba(0, 0, 0, 0.54)",marginRight:"-32px"},children:"close"}),trigger:()=>n()}];return R.jsx(q0,{actions:a,open:!0,fullWidth:!0,fullScreen:!0,children:R.jsx(FD,{"data-testid":"alert-filter-list",children:e.map(o=>R.jsx(Fy,{count:o.count,title:o.title,onClick:()=>{n(),o.onClick()},active:o.title.toLowerCase()===r},o.title))})})},kD=({title:t,selected:e,items:r})=>{const n=Qe(At("sm")),[i,a]=QI(),o=yr(()=>r.find(l=>l.title.toLowerCase()===e)||r[0],[r,e]),s=()=>{a(),i(R.jsx(T4,{title:t,items:r,selected:e,handleClose:a}))};return R.jsxs(w4,{children:[R.jsx(ft,{variant:"h6",children:t}),n?R.jsx(Fy,{count:o.count,title:o.title,onClick:s,active:!0}):R.jsx(FD,{"data-testid":"alert-filter-list",children:r.map(l=>R.jsx(Fy,{count:l.count,title:l.title,onClick:l.onClick,active:l.title.toLowerCase()===e},l.title))})]})},jD=({leasedSpaceName:t,filters:e,disableOptionAll:r=!1,title:n,handleFilters:i,isDefinitionsView:a=!1})=>{const{t:o}=Qt("location"),s=C=>({leasedSpaceName:t,...C&&{alertCategory:C},...C6.includes(e.type)&&{alertType:e.type}}),l=yr(()=>a?Qn.DEFINITIONS:e.type===Qn.HISTORY?Qn.HISTORY:Qn.INSTANCES,[e.type,a]),c=yr(()=>ND(l),[l]),{data:d}=c(s()),{data:h}=c(s(kr.POWER)),{data:g}=c(s(kr.ENVIRONMENTAL)),{data:m}=c(s(kr.AUXILIARY)),v=(d==null?void 0:d.totalElements)??0,_=(h==null?void 0:h.totalElements)??0,y=(g==null?void 0:g.totalElements)??0,x=(m==null?void 0:m.totalElements)??0,w=yr(()=>{const C=[{title:o("alerts.categories.power"),count:_,onClick:()=>i("category",kr.POWER)},{title:o("alerts.categories.environmental"),count:y,onClick:()=>i("category",kr.ENVIRONMENTAL)},{title:o("alerts.categories.auxiliary"),count:x,onClick:()=>i("category",kr.AUXILIARY)}];return r||C.unshift({title:o("alerts.categories.all"),count:v,onClick:()=>i("category",cs)}),C},[o,_,y,x,r,v,i]);return R.jsx(kD,{title:n||o("alerts.categories.title"),items:w,selected:e.category})},rb=({leasedSpaceName:t,filters:e,disableOptionAll:r=!1,disableOptionHistory:n=!1,title:i,handleFilters:a,isDefinitionsView:o=!1})=>{const{t:s}=Qt("location"),l=C=>({leasedSpaceName:t,alertType:C}),c=C=>{if(!C)return 0;const{totalElements:A}=C;return A||0},{data:d}=Ny(l(sn.CRITICAL),{enabled:!o}),{data:h}=Ny(l(sn.CUSTOM),{enabled:!o}),{data:g}=Kf(l(sn.CRITICAL),{enabled:o}),{data:m}=Kf(l(sn.CUSTOM),{enabled:o}),{data:v}=TD({leasedSpaceName:t},{enabled:!n}),_=yr(()=>c(o?g:d),[g,d,o]),y=yr(()=>c(o?m:h),[m,h,o]),x=yr(()=>c(v),[v]),w=yr(()=>{const C=[{title:s("alerts.types.critical"),count:_,onClick:()=>a("type",sn.CRITICAL)},{title:s("alerts.types.custom"),count:y,onClick:()=>a("type",sn.CUSTOM)}];return r||C.unshift({title:s("alerts.types.all"),count:_+y,onClick:()=>a("type",cs)}),n||C.push({title:s("alerts.types.history"),count:x,onClick:()=>a("type",tb)}),C},[_,y,r,n,a,x,s]);return R.jsx(kD,{title:i||s("alerts.types.title"),items:w,selected:e.type})},S4={display:"flex",flexDirection:"column",alignItems:"center",height:"calc(100vh - 300px)",overflowY:"auto"},C4=({children:t,style:e,...r})=>R.jsx("div",{style:{...S4,...e},...r,children:t}),E4=({children:t,style:e,...r})=>{const n=Qe(At("sm"));return R.jsx("div",{style:{display:"flex",alignItems:n?"flex-start":"center",justifyContent:"space-between",marginBottom:20,...n?{flexDirection:"column",gap:10}:null,...e},...r,children:t})},O4=t=>(t=t==null?void 0:t.toLowerCase(),[kr.AUXILIARY,kr.ENVIRONMENTAL,kr.POWER].find(e=>e.toLowerCase()===t)),A4=t=>(t=t==null?void 0:t.toLowerCase(),[sn.CRITICAL,sn.CUSTOM].find(e=>e.toLowerCase()===t)),$D=({children:t,style:e,...r})=>R.jsx("div",{style:{marginBottom:15,width:"100%",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between",...e},...r,children:t}),UD=({children:t,...e})=>R.jsx(ft,{...e,children:t}),R4={display:"flex",flexDirection:"column",alignItems:"flex-start",background:"#ffffff",padding:16,borderRadius:8,marginBottom:8,width:"100%",boxShadow:"0px 12px 20px -12px rgba(0, 0, 0, 0.12), inset 0px 0px 0px 1px #e1e4e8"},qD=({$canBeClicked:t,$selected:e,children:r,style:n,...i})=>R.jsx("div",{style:{...R4,...t?{cursor:"pointer"}:null,...e?{border:"1px solid black"}:null,...n},...i,children:r}),HD=({children:t,style:e,...r})=>R.jsx("div",{style:{display:"flex",flexDirection:"column",gap:4,alignItems:"flex-start",...e},...r,children:t}),I4=({children:t,style:e,...r})=>R.jsx("div",{style:{display:"flex",flexDirection:"row",gap:8,alignItems:"flex-start",...e},...r,children:t}),WD={fontFamily:"'Open Sans', sans-serif",fontStyle:"normal",fontSize:14,lineHeight:"24px",color:"#000000"},D4=({children:t,style:e,...r})=>R.jsx(ft,{...r,style:{...WD,fontWeight:700,letterSpacing:"0.1px",...e},children:t}),M4=({children:t,style:e,...r})=>R.jsx(ft,{...r,style:{...WD,fontWeight:400,letterSpacing:"0.25px",...e},children:t}),P4=({children:t,style:e,...r})=>R.jsx("div",{style:{display:"flex",...e},...r,children:t}),L4=({children:t,style:e,...r})=>{const n=Qe(At("sm"));return R.jsx("div",{style:{display:"flex",justifyContent:"space-between",width:"100%",...n?{flexDirection:"column",gap:12}:null,...e},...r,children:t})},N4=({children:t,style:e,...r})=>{const n=Qe(At("sm"));return R.jsx("div",{style:{display:"flex",flexWrap:"wrap",alignItems:"center",columnGap:24,...n?{justifyContent:"space-between"}:null,...e},...r,children:t})},F4=({children:t,style:e,...r})=>R.jsx("label",{style:{display:"flex",alignItems:"center",gap:8,...e},...r,children:t}),k4=({"data-testid":t,...e})=>{const{t:r}=Qt("common");return R.jsx(w0,{type:"button",...e,appearance:"filled","data-testid":t,children:r("customize")})},j4=({alert:t,onClickCustomize:e})=>{const{t:r}=Qt("location"),n=[{label:r("customize-alert-dialog.email-alerts"),selected:!!t.emailEnabledSubscription,testId:"email-alerts-switch"},{label:r("customize-alert-dialog.sms-alerts"),selected:!!t.smsEnabledSubscription,testId:"sms-alerts-switch"}];return R.jsxs(L4,{children:[R.jsx(N4,{children:n.map(({label:i,selected:a,testId:o})=>R.jsxs(F4,{children:[R.jsx(GR,{"aria-label":i,"data-testid":o,disabled:!0,selected:a,style:{display:"inline-flex"}}),R.jsx(ft,{variant:"body2",style:{color:"var(--clr-on-surface, #092241)"},children:i})]},o))}),R.jsx(k4,{onClick:e,"data-testid":"customize-button"})]})},$4=(t,e)=>{switch(e){case sn.CUSTOM:return t("customize-alert-dialog.success-custom-updated");case sn.CRITICAL:return t("customize-alert-dialog.success-critical-updated");default:return t("customize-alert-dialog.success-updated")}},U4=(t,e)=>{switch(e){case"THRESHOLD_VALIDATION_ERROR":return t("customize-alert-dialog.threshold-validation-error");case"CRITICAL_ENROLLMENT_OPERATOR_AND_THRESHOLD_EMPTY":return t("customize-alert-dialog.critical-enrollment-operator-and-threshold-empty");default:return t("customize-alert-dialog.server-error")}};var q4=function(e){return H4(e)&&!W4(e)};function H4(t){return!!t&&typeof t=="object"}function W4(t){var e=Object.prototype.toString.call(t);return e==="[object RegExp]"||e==="[object Date]"||V4(t)}var B4=typeof Symbol=="function"&&Symbol.for,z4=B4?Symbol.for("react.element"):60103;function V4(t){return t.$$typeof===z4}function G4(t){return Array.isArray(t)?[]:{}}function Zf(t,e){return e.clone!==!1&&e.isMergeableObject(t)?Lu(G4(t),t,e):t}function K4(t,e,r){return t.concat(e).map(function(n){return Zf(n,r)})}function X4(t,e,r){var n={};return r.isMergeableObject(t)&&Object.keys(t).forEach(function(i){n[i]=Zf(t[i],r)}),Object.keys(e).forEach(function(i){!r.isMergeableObject(e[i])||!t[i]?n[i]=Zf(e[i],r):n[i]=Lu(t[i],e[i],r)}),n}function Lu(t,e,r){r=r||{},r.arrayMerge=r.arrayMerge||K4,r.isMergeableObject=r.isMergeableObject||q4;var n=Array.isArray(e),i=Array.isArray(t),a=n===i;return a?n?r.arrayMerge(t,e,r):X4(t,e,r):Zf(e,r)}Lu.all=function(e,r){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(n,i){return Lu(n,i,r)},{})};var ky=Lu,BD=typeof global=="object"&&global&&global.Object===Object&&global,Y4=typeof self=="object"&&self&&self.Object===Object&&self,vi=BD||Y4||Function("return this")(),_a=vi.Symbol,zD=Object.prototype,Z4=zD.hasOwnProperty,J4=zD.toString,nu=_a?_a.toStringTag:void 0;function Q4(t){var e=Z4.call(t,nu),r=t[nu];try{t[nu]=void 0;var n=!0}catch{}var i=J4.call(t);return n&&(e?t[nu]=r:delete t[nu]),i}var eG=Object.prototype,tG=eG.toString;function rG(t){return tG.call(t)}var nG="[object Null]",iG="[object Undefined]",bS=_a?_a.toStringTag:void 0;function yo(t){return t==null?t===void 0?iG:nG:bS&&bS in Object(t)?Q4(t):rG(t)}function VD(t,e){return function(r){return t(e(r))}}var nb=VD(Object.getPrototypeOf,Object);function bo(t){return t!=null&&typeof t=="object"}var aG="[object Object]",oG=Function.prototype,sG=Object.prototype,GD=oG.toString,uG=sG.hasOwnProperty,lG=GD.call(Object);function _S(t){if(!bo(t)||yo(t)!=aG)return!1;var e=nb(t);if(e===null)return!0;var r=uG.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&GD.call(r)==lG}function cG(){this.__data__=[],this.size=0}function KD(t,e){return t===e||t!==t&&e!==e}function Md(t,e){for(var r=t.length;r--;)if(KD(t[r][0],e))return r;return-1}var fG=Array.prototype,dG=fG.splice;function hG(t){var e=this.__data__,r=Md(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():dG.call(e,r,1),--this.size,!0}function pG(t){var e=this.__data__,r=Md(e,t);return r<0?void 0:e[r][1]}function gG(t){return Md(this.__data__,t)>-1}function mG(t,e){var r=this.__data__,n=Md(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}function Wi(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Wi.prototype.clear=cG;Wi.prototype.delete=hG;Wi.prototype.get=pG;Wi.prototype.has=gG;Wi.prototype.set=mG;function vG(){this.__data__=new Wi,this.size=0}function yG(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}function bG(t){return this.__data__.get(t)}function _G(t){return this.__data__.has(t)}function Xu(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var xG="[object AsyncFunction]",wG="[object Function]",TG="[object GeneratorFunction]",SG="[object Proxy]";function XD(t){if(!Xu(t))return!1;var e=yo(t);return e==wG||e==TG||e==xG||e==SG}var mg=vi["__core-js_shared__"],xS=(function(){var t=/[^.]+$/.exec(mg&&mg.keys&&mg.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""})();function CG(t){return!!xS&&xS in t}var EG=Function.prototype,OG=EG.toString;function _o(t){if(t!=null){try{return OG.call(t)}catch{}try{return t+""}catch{}}return""}var AG=/[\\^$.*+?()[\]{}|]/g,RG=/^\[object .+?Constructor\]$/,IG=Function.prototype,DG=Object.prototype,MG=IG.toString,PG=DG.hasOwnProperty,LG=RegExp("^"+MG.call(PG).replace(AG,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function NG(t){if(!Xu(t)||CG(t))return!1;var e=XD(t)?LG:RG;return e.test(_o(t))}function FG(t,e){return t==null?void 0:t[e]}function xo(t,e){var r=FG(t,e);return NG(r)?r:void 0}var Nu=xo(vi,"Map"),Fu=xo(Object,"create");function kG(){this.__data__=Fu?Fu(null):{},this.size=0}function jG(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var $G="__lodash_hash_undefined__",UG=Object.prototype,qG=UG.hasOwnProperty;function HG(t){var e=this.__data__;if(Fu){var r=e[t];return r===$G?void 0:r}return qG.call(e,t)?e[t]:void 0}var WG=Object.prototype,BG=WG.hasOwnProperty;function zG(t){var e=this.__data__;return Fu?e[t]!==void 0:BG.call(e,t)}var VG="__lodash_hash_undefined__";function GG(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=Fu&&e===void 0?VG:e,this}function fo(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}fo.prototype.clear=kG;fo.prototype.delete=jG;fo.prototype.get=HG;fo.prototype.has=zG;fo.prototype.set=GG;function KG(){this.size=0,this.__data__={hash:new fo,map:new(Nu||Wi),string:new fo}}function XG(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function Pd(t,e){var r=t.__data__;return XG(e)?r[typeof e=="string"?"string":"hash"]:r.map}function YG(t){var e=Pd(this,t).delete(t);return this.size-=e?1:0,e}function ZG(t){return Pd(this,t).get(t)}function JG(t){return Pd(this,t).has(t)}function QG(t,e){var r=Pd(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}function Ea(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Ea.prototype.clear=KG;Ea.prototype.delete=YG;Ea.prototype.get=ZG;Ea.prototype.has=JG;Ea.prototype.set=QG;var e8=200;function t8(t,e){var r=this.__data__;if(r instanceof Wi){var n=r.__data__;if(!Nu||n.length<e8-1)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new Ea(n)}return r.set(t,e),this.size=r.size,this}function Ss(t){var e=this.__data__=new Wi(t);this.size=e.size}Ss.prototype.clear=vG;Ss.prototype.delete=yG;Ss.prototype.get=bG;Ss.prototype.has=_G;Ss.prototype.set=t8;function r8(t,e){for(var r=-1,n=t==null?0:t.length;++r<n&&e(t[r],r,t)!==!1;);return t}var wS=(function(){try{var t=xo(Object,"defineProperty");return t({},"",{}),t}catch{}})();function YD(t,e,r){e=="__proto__"&&wS?wS(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}var n8=Object.prototype,i8=n8.hasOwnProperty;function ZD(t,e,r){var n=t[e];(!(i8.call(t,e)&&KD(n,r))||r===void 0&&!(e in t))&&YD(t,e,r)}function Ld(t,e,r,n){var i=!r;r||(r={});for(var a=-1,o=e.length;++a<o;){var s=e[a],l=void 0;l===void 0&&(l=t[s]),i?YD(r,s,l):ZD(r,s,l)}return r}function a8(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}var o8="[object Arguments]";function TS(t){return bo(t)&&yo(t)==o8}var JD=Object.prototype,s8=JD.hasOwnProperty,u8=JD.propertyIsEnumerable,l8=TS((function(){return arguments})())?TS:function(t){return bo(t)&&s8.call(t,"callee")&&!u8.call(t,"callee")},Yu=Array.isArray;function c8(){return!1}var QD=typeof exports=="object"&&exports&&!exports.nodeType&&exports,SS=QD&&typeof module=="object"&&module&&!module.nodeType&&module,f8=SS&&SS.exports===QD,CS=f8?vi.Buffer:void 0,d8=CS?CS.isBuffer:void 0,eM=d8||c8,h8=9007199254740991,p8=/^(?:0|[1-9]\d*)$/;function g8(t,e){var r=typeof t;return e=e??h8,!!e&&(r=="number"||r!="symbol"&&p8.test(t))&&t>-1&&t%1==0&&t<e}var m8=9007199254740991;function tM(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=m8}var v8="[object Arguments]",y8="[object Array]",b8="[object Boolean]",_8="[object Date]",x8="[object Error]",w8="[object Function]",T8="[object Map]",S8="[object Number]",C8="[object Object]",E8="[object RegExp]",O8="[object Set]",A8="[object String]",R8="[object WeakMap]",I8="[object ArrayBuffer]",D8="[object DataView]",M8="[object Float32Array]",P8="[object Float64Array]",L8="[object Int8Array]",N8="[object Int16Array]",F8="[object Int32Array]",k8="[object Uint8Array]",j8="[object Uint8ClampedArray]",$8="[object Uint16Array]",U8="[object Uint32Array]",Gt={};Gt[M8]=Gt[P8]=Gt[L8]=Gt[N8]=Gt[F8]=Gt[k8]=Gt[j8]=Gt[$8]=Gt[U8]=!0;Gt[v8]=Gt[y8]=Gt[I8]=Gt[b8]=Gt[D8]=Gt[_8]=Gt[x8]=Gt[w8]=Gt[T8]=Gt[S8]=Gt[C8]=Gt[E8]=Gt[O8]=Gt[A8]=Gt[R8]=!1;function q8(t){return bo(t)&&tM(t.length)&&!!Gt[yo(t)]}function ib(t){return function(e){return t(e)}}var rM=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Su=rM&&typeof module=="object"&&module&&!module.nodeType&&module,H8=Su&&Su.exports===rM,vg=H8&&BD.process,fs=(function(){try{var t=Su&&Su.require&&Su.require("util").types;return t||vg&&vg.binding&&vg.binding("util")}catch{}})(),ES=fs&&fs.isTypedArray,W8=ES?ib(ES):q8,B8=Object.prototype,z8=B8.hasOwnProperty;function nM(t,e){var r=Yu(t),n=!r&&l8(t),i=!r&&!n&&eM(t),a=!r&&!n&&!i&&W8(t),o=r||n||i||a,s=o?a8(t.length,String):[],l=s.length;for(var c in t)(e||z8.call(t,c))&&!(o&&(c=="length"||i&&(c=="offset"||c=="parent")||a&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||g8(c,l)))&&s.push(c);return s}var V8=Object.prototype;function ab(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||V8;return t===r}var G8=VD(Object.keys,Object),K8=Object.prototype,X8=K8.hasOwnProperty;function Y8(t){if(!ab(t))return G8(t);var e=[];for(var r in Object(t))X8.call(t,r)&&r!="constructor"&&e.push(r);return e}function iM(t){return t!=null&&tM(t.length)&&!XD(t)}function ob(t){return iM(t)?nM(t):Y8(t)}function Z8(t,e){return t&&Ld(e,ob(e),t)}function J8(t){var e=[];if(t!=null)for(var r in Object(t))e.push(r);return e}var Q8=Object.prototype,e7=Q8.hasOwnProperty;function t7(t){if(!Xu(t))return J8(t);var e=ab(t),r=[];for(var n in t)n=="constructor"&&(e||!e7.call(t,n))||r.push(n);return r}function sb(t){return iM(t)?nM(t,!0):t7(t)}function r7(t,e){return t&&Ld(e,sb(e),t)}var aM=typeof exports=="object"&&exports&&!exports.nodeType&&exports,OS=aM&&typeof module=="object"&&module&&!module.nodeType&&module,n7=OS&&OS.exports===aM,AS=n7?vi.Buffer:void 0,RS=AS?AS.allocUnsafe:void 0;function i7(t,e){if(e)return t.slice();var r=t.length,n=RS?RS(r):new t.constructor(r);return t.copy(n),n}function oM(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}function a7(t,e){for(var r=-1,n=t==null?0:t.length,i=0,a=[];++r<n;){var o=t[r];e(o,r,t)&&(a[i++]=o)}return a}function sM(){return[]}var o7=Object.prototype,s7=o7.propertyIsEnumerable,IS=Object.getOwnPropertySymbols,ub=IS?function(t){return t==null?[]:(t=Object(t),a7(IS(t),function(e){return s7.call(t,e)}))}:sM;function u7(t,e){return Ld(t,ub(t),e)}function uM(t,e){for(var r=-1,n=e.length,i=t.length;++r<n;)t[i+r]=e[r];return t}var l7=Object.getOwnPropertySymbols,lM=l7?function(t){for(var e=[];t;)uM(e,ub(t)),t=nb(t);return e}:sM;function c7(t,e){return Ld(t,lM(t),e)}function cM(t,e,r){var n=e(t);return Yu(t)?n:uM(n,r(t))}function f7(t){return cM(t,ob,ub)}function d7(t){return cM(t,sb,lM)}var jy=xo(vi,"DataView"),$y=xo(vi,"Promise"),Uy=xo(vi,"Set"),qy=xo(vi,"WeakMap"),DS="[object Map]",h7="[object Object]",MS="[object Promise]",PS="[object Set]",LS="[object WeakMap]",NS="[object DataView]",p7=_o(jy),g7=_o(Nu),m7=_o($y),v7=_o(Uy),y7=_o(qy),Pi=yo;(jy&&Pi(new jy(new ArrayBuffer(1)))!=NS||Nu&&Pi(new Nu)!=DS||$y&&Pi($y.resolve())!=MS||Uy&&Pi(new Uy)!=PS||qy&&Pi(new qy)!=LS)&&(Pi=function(t){var e=yo(t),r=e==h7?t.constructor:void 0,n=r?_o(r):"";if(n)switch(n){case p7:return NS;case g7:return DS;case m7:return MS;case v7:return PS;case y7:return LS}return e});var b7=Object.prototype,_7=b7.hasOwnProperty;function x7(t){var e=t.length,r=new t.constructor(e);return e&&typeof t[0]=="string"&&_7.call(t,"index")&&(r.index=t.index,r.input=t.input),r}var FS=vi.Uint8Array;function lb(t){var e=new t.constructor(t.byteLength);return new FS(e).set(new FS(t)),e}function w7(t,e){var r=e?lb(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}var T7=/\w*$/;function S7(t){var e=new t.constructor(t.source,T7.exec(t));return e.lastIndex=t.lastIndex,e}var kS=_a?_a.prototype:void 0,jS=kS?kS.valueOf:void 0;function C7(t){return jS?Object(jS.call(t)):{}}function E7(t,e){var r=e?lb(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}var O7="[object Boolean]",A7="[object Date]",R7="[object Map]",I7="[object Number]",D7="[object RegExp]",M7="[object Set]",P7="[object String]",L7="[object Symbol]",N7="[object ArrayBuffer]",F7="[object DataView]",k7="[object Float32Array]",j7="[object Float64Array]",$7="[object Int8Array]",U7="[object Int16Array]",q7="[object Int32Array]",H7="[object Uint8Array]",W7="[object Uint8ClampedArray]",B7="[object Uint16Array]",z7="[object Uint32Array]";function V7(t,e,r){var n=t.constructor;switch(e){case N7:return lb(t);case O7:case A7:return new n(+t);case F7:return w7(t,r);case k7:case j7:case $7:case U7:case q7:case H7:case W7:case B7:case z7:return E7(t,r);case R7:return new n;case I7:case P7:return new n(t);case D7:return S7(t);case M7:return new n;case L7:return C7(t)}}var $S=Object.create,G7=(function(){function t(){}return function(e){if(!Xu(e))return{};if($S)return $S(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}})();function K7(t){return typeof t.constructor=="function"&&!ab(t)?G7(nb(t)):{}}var X7="[object Map]";function Y7(t){return bo(t)&&Pi(t)==X7}var US=fs&&fs.isMap,Z7=US?ib(US):Y7,J7="[object Set]";function Q7(t){return bo(t)&&Pi(t)==J7}var qS=fs&&fs.isSet,e9=qS?ib(qS):Q7,t9=1,r9=2,n9=4,fM="[object Arguments]",i9="[object Array]",a9="[object Boolean]",o9="[object Date]",s9="[object Error]",dM="[object Function]",u9="[object GeneratorFunction]",l9="[object Map]",c9="[object Number]",hM="[object Object]",f9="[object RegExp]",d9="[object Set]",h9="[object String]",p9="[object Symbol]",g9="[object WeakMap]",m9="[object ArrayBuffer]",v9="[object DataView]",y9="[object Float32Array]",b9="[object Float64Array]",_9="[object Int8Array]",x9="[object Int16Array]",w9="[object Int32Array]",T9="[object Uint8Array]",S9="[object Uint8ClampedArray]",C9="[object Uint16Array]",E9="[object Uint32Array]",Bt={};Bt[fM]=Bt[i9]=Bt[m9]=Bt[v9]=Bt[a9]=Bt[o9]=Bt[y9]=Bt[b9]=Bt[_9]=Bt[x9]=Bt[w9]=Bt[l9]=Bt[c9]=Bt[hM]=Bt[f9]=Bt[d9]=Bt[h9]=Bt[p9]=Bt[T9]=Bt[S9]=Bt[C9]=Bt[E9]=!0;Bt[s9]=Bt[dM]=Bt[g9]=!1;function Cu(t,e,r,n,i,a){var o,s=e&t9,l=e&r9,c=e&n9;if(o!==void 0)return o;if(!Xu(t))return t;var d=Yu(t);if(d){if(o=x7(t),!s)return oM(t,o)}else{var h=Pi(t),g=h==dM||h==u9;if(eM(t))return i7(t,s);if(h==hM||h==fM||g&&!i){if(o=l||g?{}:K7(t),!s)return l?c7(t,r7(o,t)):u7(t,Z8(o,t))}else{if(!Bt[h])return i?t:{};o=V7(t,h,s)}}a||(a=new Ss);var m=a.get(t);if(m)return m;a.set(t,o),e9(t)?t.forEach(function(y){o.add(Cu(y,e,r,y,t,a))}):Z7(t)&&t.forEach(function(y,x){o.set(x,Cu(y,e,r,x,t,a))});var v=c?l?d7:f7:l?sb:ob,_=d?void 0:v(t);return r8(_||t,function(y,x){_&&(x=y,y=t[x]),ZD(o,x,Cu(y,e,r,x,t,a))}),o}var O9=1,A9=4;function qc(t){return Cu(t,O9|A9)}var yg,HS;function R9(){if(HS)return yg;HS=1;var t=Array.isArray,e=Object.keys,r=Object.prototype.hasOwnProperty,n=typeof Element<"u";function i(a,o){if(a===o)return!0;if(a&&o&&typeof a=="object"&&typeof o=="object"){var s=t(a),l=t(o),c,d,h;if(s&&l){if(d=a.length,d!=o.length)return!1;for(c=d;c--!==0;)if(!i(a[c],o[c]))return!1;return!0}if(s!=l)return!1;var g=a instanceof Date,m=o instanceof Date;if(g!=m)return!1;if(g&&m)return a.getTime()==o.getTime();var v=a instanceof RegExp,_=o instanceof RegExp;if(v!=_)return!1;if(v&&_)return a.toString()==o.toString();var y=e(a);if(d=y.length,d!==e(o).length)return!1;for(c=d;c--!==0;)if(!r.call(o,y[c]))return!1;if(n&&a instanceof Element&&o instanceof Element)return a===o;for(c=d;c--!==0;)if(h=y[c],!(h==="_owner"&&a.$$typeof)&&!i(a[h],o[h]))return!1;return!0}return a!==a&&o!==o}return yg=function(o,s){try{return i(o,s)}catch(l){if(l.message&&l.message.match(/stack|recursion/i)||l.number===-2146828260)return console.warn("Warning: react-fast-compare does not handle circular references.",l.name,l.message),!1;throw l}},yg}var I9=R9();const Va=gi(I9);var D9=4;function WS(t){return Cu(t,D9)}function pM(t,e){for(var r=-1,n=t==null?0:t.length,i=Array(n);++r<n;)i[r]=e(t[r],r,t);return i}var M9="[object Symbol]";function cb(t){return typeof t=="symbol"||bo(t)&&yo(t)==M9}var P9="Expected a function";function fb(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(P9);var r=function(){var n=arguments,i=e?e.apply(this,n):n[0],a=r.cache;if(a.has(i))return a.get(i);var o=t.apply(this,n);return r.cache=a.set(i,o)||a,o};return r.cache=new(fb.Cache||Ea),r}fb.Cache=Ea;var L9=500;function N9(t){var e=fb(t,function(n){return r.size===L9&&r.clear(),n}),r=e.cache;return e}var F9=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,k9=/\\(\\)?/g,j9=N9(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(F9,function(r,n,i,a){e.push(i?a.replace(k9,"$1"):n||r)}),e});function $9(t){if(typeof t=="string"||cb(t))return t;var e=t+"";return e=="0"&&1/t==-1/0?"-0":e}var BS=_a?_a.prototype:void 0,zS=BS?BS.toString:void 0;function gM(t){if(typeof t=="string")return t;if(Yu(t))return pM(t,gM)+"";if(cb(t))return zS?zS.call(t):"";var e=t+"";return e=="0"&&1/t==-1/0?"-0":e}function U9(t){return t==null?"":gM(t)}function mM(t){return Yu(t)?pM(t,$9):cb(t)?[t]:oM(j9(U9(t)))}var bg={exports:{}},Lt={};/** @license React v16.13.1
|
|
69
|
+
* react-is.production.min.js
|
|
70
|
+
*
|
|
71
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
72
|
+
*
|
|
73
|
+
* This source code is licensed under the MIT license found in the
|
|
74
|
+
* LICENSE file in the root directory of this source tree.
|
|
75
|
+
*/var VS;function q9(){if(VS)return Lt;VS=1;var t=typeof Symbol=="function"&&Symbol.for,e=t?Symbol.for("react.element"):60103,r=t?Symbol.for("react.portal"):60106,n=t?Symbol.for("react.fragment"):60107,i=t?Symbol.for("react.strict_mode"):60108,a=t?Symbol.for("react.profiler"):60114,o=t?Symbol.for("react.provider"):60109,s=t?Symbol.for("react.context"):60110,l=t?Symbol.for("react.async_mode"):60111,c=t?Symbol.for("react.concurrent_mode"):60111,d=t?Symbol.for("react.forward_ref"):60112,h=t?Symbol.for("react.suspense"):60113,g=t?Symbol.for("react.suspense_list"):60120,m=t?Symbol.for("react.memo"):60115,v=t?Symbol.for("react.lazy"):60116,_=t?Symbol.for("react.block"):60121,y=t?Symbol.for("react.fundamental"):60117,x=t?Symbol.for("react.responder"):60118,w=t?Symbol.for("react.scope"):60119;function C(E){if(typeof E=="object"&&E!==null){var S=E.$$typeof;switch(S){case e:switch(E=E.type,E){case l:case c:case n:case a:case i:case h:return E;default:switch(E=E&&E.$$typeof,E){case s:case d:case v:case m:case o:return E;default:return S}}case r:return S}}}function A(E){return C(E)===c}return Lt.AsyncMode=l,Lt.ConcurrentMode=c,Lt.ContextConsumer=s,Lt.ContextProvider=o,Lt.Element=e,Lt.ForwardRef=d,Lt.Fragment=n,Lt.Lazy=v,Lt.Memo=m,Lt.Portal=r,Lt.Profiler=a,Lt.StrictMode=i,Lt.Suspense=h,Lt.isAsyncMode=function(E){return A(E)||C(E)===l},Lt.isConcurrentMode=A,Lt.isContextConsumer=function(E){return C(E)===s},Lt.isContextProvider=function(E){return C(E)===o},Lt.isElement=function(E){return typeof E=="object"&&E!==null&&E.$$typeof===e},Lt.isForwardRef=function(E){return C(E)===d},Lt.isFragment=function(E){return C(E)===n},Lt.isLazy=function(E){return C(E)===v},Lt.isMemo=function(E){return C(E)===m},Lt.isPortal=function(E){return C(E)===r},Lt.isProfiler=function(E){return C(E)===a},Lt.isStrictMode=function(E){return C(E)===i},Lt.isSuspense=function(E){return C(E)===h},Lt.isValidElementType=function(E){return typeof E=="string"||typeof E=="function"||E===n||E===c||E===a||E===i||E===h||E===g||typeof E=="object"&&E!==null&&(E.$$typeof===v||E.$$typeof===m||E.$$typeof===o||E.$$typeof===s||E.$$typeof===d||E.$$typeof===y||E.$$typeof===x||E.$$typeof===w||E.$$typeof===_)},Lt.typeOf=C,Lt}var GS;function H9(){return GS||(GS=1,bg.exports=q9()),bg.exports}var _g,KS;function W9(){if(KS)return _g;KS=1;var t=H9(),e={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},r={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},n={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},a={};a[t.ForwardRef]=n,a[t.Memo]=i;function o(v){return t.isMemo(v)?i:a[v.$$typeof]||e}var s=Object.defineProperty,l=Object.getOwnPropertyNames,c=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,h=Object.getPrototypeOf,g=Object.prototype;function m(v,_,y){if(typeof _!="string"){if(g){var x=h(_);x&&x!==g&&m(v,x,y)}var w=l(_);c&&(w=w.concat(c(_)));for(var C=o(v),A=o(_),E=0;E<w.length;++E){var S=w[E];if(!r[S]&&!(y&&y[S])&&!(A&&A[S])&&!(C&&C[S])){var T=d(_,S);try{s(v,S,T)}catch{}}}}return v}return _g=m,_g}W9();function Er(){return Er=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Er.apply(this,arguments)}function vM(t,e){if(t==null)return{};var r={},n=Object.keys(t),i,a;for(a=0;a<n.length;a++)i=n[a],!(e.indexOf(i)>=0)&&(r[i]=t[i]);return r}var Nd=pd(void 0);Nd.displayName="FormikContext";var B9=Nd.Provider;Nd.Consumer;function z9(){var t=Wu(Nd);return t}var kn=function(e){return typeof e=="function"},Fd=function(e){return e!==null&&typeof e=="object"},V9=function(e){return String(Math.floor(Number(e)))===e},xg=function(e){return Object.prototype.toString.call(e)==="[object String]"},wg=function(e){return Fd(e)&&kn(e.then)};function an(t,e,r,n){n===void 0&&(n=0);for(var i=mM(e);t&&n<i.length;)t=t[i[n++]];return n!==i.length&&!t||t===void 0?r:t}function ao(t,e,r){for(var n=WS(t),i=n,a=0,o=mM(e);a<o.length-1;a++){var s=o[a],l=an(t,o.slice(0,a+1));if(l&&(Fd(l)||Array.isArray(l)))i=i[s]=WS(l);else{var c=o[a+1];i=i[s]=V9(c)&&Number(c)>=0?[]:{}}}return(a===0?t:i)[o[a]]===r?t:(r===void 0?delete i[o[a]]:i[o[a]]=r,a===0&&r===void 0&&delete n[o[a]],n)}function yM(t,e,r,n){r===void 0&&(r=new WeakMap),n===void 0&&(n={});for(var i=0,a=Object.keys(t);i<a.length;i++){var o=a[i],s=t[o];Fd(s)?r.get(s)||(r.set(s,!0),n[o]=Array.isArray(s)?[]:{},yM(s,e,r,n[o])):n[o]=e}return n}function G9(t,e){switch(e.type){case"SET_VALUES":return Er({},t,{values:e.payload});case"SET_TOUCHED":return Er({},t,{touched:e.payload});case"SET_ERRORS":return Va(t.errors,e.payload)?t:Er({},t,{errors:e.payload});case"SET_STATUS":return Er({},t,{status:e.payload});case"SET_ISSUBMITTING":return Er({},t,{isSubmitting:e.payload});case"SET_ISVALIDATING":return Er({},t,{isValidating:e.payload});case"SET_FIELD_VALUE":return Er({},t,{values:ao(t.values,e.payload.field,e.payload.value)});case"SET_FIELD_TOUCHED":return Er({},t,{touched:ao(t.touched,e.payload.field,e.payload.value)});case"SET_FIELD_ERROR":return Er({},t,{errors:ao(t.errors,e.payload.field,e.payload.value)});case"RESET_FORM":return Er({},t,e.payload);case"SET_FORMIK_STATE":return e.payload(t);case"SUBMIT_ATTEMPT":return Er({},t,{touched:yM(t.values,!0),isSubmitting:!0,submitCount:t.submitCount+1});case"SUBMIT_FAILURE":return Er({},t,{isSubmitting:!1});case"SUBMIT_SUCCESS":return Er({},t,{isSubmitting:!1});default:return t}}var Ha={},Hc={};function K9(t){var e=t.validateOnChange,r=e===void 0?!0:e,n=t.validateOnBlur,i=n===void 0?!0:n,a=t.validateOnMount,o=a===void 0?!1:a,s=t.isInitialValid,l=t.enableReinitialize,c=l===void 0?!1:l,d=t.onSubmit,h=vM(t,["validateOnChange","validateOnBlur","validateOnMount","isInitialValid","enableReinitialize","onSubmit"]),g=Er({validateOnChange:r,validateOnBlur:i,validateOnMount:o,onSubmit:d},h),m=Kt(g.initialValues),v=Kt(g.initialErrors||Ha),_=Kt(g.initialTouched||Hc),y=Kt(g.initialStatus),x=Kt(!1),w=Kt({});ht(function(){return x.current=!0,function(){x.current=!1}},[]);var C=sr(0),A=C[1],E=Kt({values:qc(g.initialValues),errors:qc(g.initialErrors)||Ha,touched:qc(g.initialTouched)||Hc,status:qc(g.initialStatus),isSubmitting:!1,isValidating:!1,submitCount:0}),S=E.current,T=bt(function(z){var de=E.current;E.current=G9(de,z),de!==E.current&&A(function(me){return me+1})},[]),D=bt(function(z,de){return new Promise(function(me,De){var Ue=g.validate(z,de);Ue==null?me(Ha):wg(Ue)?Ue.then(function(nt){me(nt||Ha)},function(nt){De(nt)}):me(Ue)})},[g.validate]),P=bt(function(z,de){var me=g.validationSchema,De=kn(me)?me(de):me,Ue=de&&De.validateAt?De.validateAt(de,z):Y9(z,De);return new Promise(function(nt,Et){Ue.then(function(){nt(Ha)},function(Ot){Ot.name==="ValidationError"?nt(X9(Ot)):Et(Ot)})})},[g.validationSchema]),N=bt(function(z,de){return new Promise(function(me){return me(w.current[z].validate(de))})},[]),F=bt(function(z){var de=Object.keys(w.current).filter(function(De){return kn(w.current[De].validate)}),me=de.length>0?de.map(function(De){return N(De,an(z,De))}):[Promise.resolve("DO_NOT_DELETE_YOU_WILL_BE_FIRED")];return Promise.all(me).then(function(De){return De.reduce(function(Ue,nt,Et){return nt==="DO_NOT_DELETE_YOU_WILL_BE_FIRED"||nt&&(Ue=ao(Ue,de[Et],nt)),Ue},{})})},[N]),B=bt(function(z){return Promise.all([F(z),g.validationSchema?P(z):{},g.validate?D(z):{}]).then(function(de){var me=de[0],De=de[1],Ue=de[2],nt=ky.all([me,De,Ue],{arrayMerge:Z9});return nt})},[g.validate,g.validationSchema,F,D,P]),W=Nn(function(z){return z===void 0&&(z=S.values),T({type:"SET_ISVALIDATING",payload:!0}),B(z).then(function(de){return x.current&&(T({type:"SET_ISVALIDATING",payload:!1}),T({type:"SET_ERRORS",payload:de})),de})});ht(function(){o&&x.current===!0&&Va(m.current,g.initialValues)&&W(m.current)},[o,W]);var te=bt(function(z){var de=z&&z.values?z.values:m.current,me=z&&z.errors?z.errors:v.current?v.current:g.initialErrors||{},De=z&&z.touched?z.touched:_.current?_.current:g.initialTouched||{},Ue=z&&z.status?z.status:y.current?y.current:g.initialStatus;m.current=de,v.current=me,_.current=De,y.current=Ue;var nt=function(){T({type:"RESET_FORM",payload:{isSubmitting:!!z&&!!z.isSubmitting,errors:me,touched:De,status:Ue,values:de,isValidating:!!z&&!!z.isValidating,submitCount:z&&z.submitCount&&typeof z.submitCount=="number"?z.submitCount:0}})};if(g.onReset){var Et=g.onReset(S.values,ve);wg(Et)?Et.then(nt):nt()}else nt()},[g.initialErrors,g.initialStatus,g.initialTouched,g.onReset]);ht(function(){x.current===!0&&!Va(m.current,g.initialValues)&&c&&(m.current=g.initialValues,te(),o&&W(m.current))},[c,g.initialValues,te,o,W]),ht(function(){c&&x.current===!0&&!Va(v.current,g.initialErrors)&&(v.current=g.initialErrors||Ha,T({type:"SET_ERRORS",payload:g.initialErrors||Ha}))},[c,g.initialErrors]),ht(function(){c&&x.current===!0&&!Va(_.current,g.initialTouched)&&(_.current=g.initialTouched||Hc,T({type:"SET_TOUCHED",payload:g.initialTouched||Hc}))},[c,g.initialTouched]),ht(function(){c&&x.current===!0&&!Va(y.current,g.initialStatus)&&(y.current=g.initialStatus,T({type:"SET_STATUS",payload:g.initialStatus}))},[c,g.initialStatus,g.initialTouched]);var J=Nn(function(z){if(w.current[z]&&kn(w.current[z].validate)){var de=an(S.values,z),me=w.current[z].validate(de);return wg(me)?(T({type:"SET_ISVALIDATING",payload:!0}),me.then(function(De){return De}).then(function(De){T({type:"SET_FIELD_ERROR",payload:{field:z,value:De}}),T({type:"SET_ISVALIDATING",payload:!1})})):(T({type:"SET_FIELD_ERROR",payload:{field:z,value:me}}),Promise.resolve(me))}else if(g.validationSchema)return T({type:"SET_ISVALIDATING",payload:!0}),P(S.values,z).then(function(De){return De}).then(function(De){T({type:"SET_FIELD_ERROR",payload:{field:z,value:an(De,z)}}),T({type:"SET_ISVALIDATING",payload:!1})});return Promise.resolve()}),ie=bt(function(z,de){var me=de.validate;w.current[z]={validate:me}},[]),le=bt(function(z){delete w.current[z]},[]),se=Nn(function(z,de){T({type:"SET_TOUCHED",payload:z});var me=de===void 0?i:de;return me?W(S.values):Promise.resolve()}),ce=bt(function(z){T({type:"SET_ERRORS",payload:z})},[]),Q=Nn(function(z,de){var me=kn(z)?z(S.values):z;T({type:"SET_VALUES",payload:me});var De=de===void 0?r:de;return De?W(me):Promise.resolve()}),$=bt(function(z,de){T({type:"SET_FIELD_ERROR",payload:{field:z,value:de}})},[]),X=Nn(function(z,de,me){var De=kn(de)?de(an(S.values,z)):de;T({type:"SET_FIELD_VALUE",payload:{field:z,value:De}});var Ue=me===void 0?r:me;return Ue?W(ao(S.values,z,De)):Promise.resolve()}),Z=bt(function(z,de){var me=de,De=z,Ue;if(!xg(z)){z.persist&&z.persist();var nt=z.target?z.target:z.currentTarget,Et=nt.type,Ot=nt.name,Zr=nt.id,Ur=nt.value,yi=nt.checked;nt.outerHTML;var Ir=nt.options,Sn=nt.multiple;me=de||Ot||Zr,De=/number|range/.test(Et)?(Ue=parseFloat(Ur),isNaN(Ue)?"":Ue):/checkbox/.test(Et)?Q9(an(S.values,me),yi,Ur):Ir&&Sn?J9(Ir):Ur}me&&X(me,De)},[X,S.values]),fe=Nn(function(z){if(xg(z))return function(de){return Z(de,z)};Z(z)}),be=Nn(function(z,de,me){de===void 0&&(de=!0),T({type:"SET_FIELD_TOUCHED",payload:{field:z,value:de}});var De=me===void 0?i:me;return De?W(S.values):Promise.resolve()}),_e=bt(function(z,de){z.persist&&z.persist();var me=z.target,De=me.name,Ue=me.id;me.outerHTML;var nt=de||De||Ue;be(nt,!0)},[be]),Le=Nn(function(z){if(xg(z))return function(de){return _e(de,z)};_e(z)}),Ae=bt(function(z){kn(z)?T({type:"SET_FORMIK_STATE",payload:z}):T({type:"SET_FORMIK_STATE",payload:function(){return z}})},[]),he=bt(function(z){T({type:"SET_STATUS",payload:z})},[]),ge=bt(function(z){T({type:"SET_ISSUBMITTING",payload:z})},[]),Ne=Nn(function(){return T({type:"SUBMIT_ATTEMPT"}),W().then(function(z){var de=z instanceof Error,me=!de&&Object.keys(z).length===0;if(me){var De;try{if(De=Fe(),De===void 0)return}catch(Ue){throw Ue}return Promise.resolve(De).then(function(Ue){return x.current&&T({type:"SUBMIT_SUCCESS"}),Ue}).catch(function(Ue){if(x.current)throw T({type:"SUBMIT_FAILURE"}),Ue})}else if(x.current&&(T({type:"SUBMIT_FAILURE"}),de))throw z})}),we=Nn(function(z){z&&z.preventDefault&&kn(z.preventDefault)&&z.preventDefault(),z&&z.stopPropagation&&kn(z.stopPropagation)&&z.stopPropagation(),Ne().catch(function(de){console.warn("Warning: An unhandled error was caught from submitForm()",de)})}),ve={resetForm:te,validateForm:W,validateField:J,setErrors:ce,setFieldError:$,setFieldTouched:be,setFieldValue:X,setStatus:he,setSubmitting:ge,setTouched:se,setValues:Q,setFormikState:Ae,submitForm:Ne},Fe=Nn(function(){return d(S.values,ve)}),Be=Nn(function(z){z&&z.preventDefault&&kn(z.preventDefault)&&z.preventDefault(),z&&z.stopPropagation&&kn(z.stopPropagation)&&z.stopPropagation(),te()}),ke=bt(function(z){return{value:an(S.values,z),error:an(S.errors,z),touched:!!an(S.touched,z),initialValue:an(m.current,z),initialTouched:!!an(_.current,z),initialError:an(v.current,z)}},[S.errors,S.touched,S.values]),Ze=bt(function(z){return{setValue:function(me,De){return X(z,me,De)},setTouched:function(me,De){return be(z,me,De)},setError:function(me){return $(z,me)}}},[X,be,$]),gt=bt(function(z){var de=Fd(z),me=de?z.name:z,De=an(S.values,me),Ue={name:me,value:De,onChange:fe,onBlur:Le};if(de){var nt=z.type,Et=z.value,Ot=z.as,Zr=z.multiple;nt==="checkbox"?Et===void 0?Ue.checked=!!De:(Ue.checked=!!(Array.isArray(De)&&~De.indexOf(Et)),Ue.value=Et):nt==="radio"?(Ue.checked=De===Et,Ue.value=Et):Ot==="select"&&Zr&&(Ue.value=Ue.value||[],Ue.multiple=!0)}return Ue},[Le,fe,S.values]),Lr=yr(function(){return!Va(m.current,S.values)},[m.current,S.values]),Yr=yr(function(){return typeof s<"u"?Lr?S.errors&&Object.keys(S.errors).length===0:s!==!1&&kn(s)?s(g):s:S.errors&&Object.keys(S.errors).length===0},[s,Lr,S.errors,g]),fr=Er({},S,{initialValues:m.current,initialErrors:v.current,initialTouched:_.current,initialStatus:y.current,handleBlur:Le,handleChange:fe,handleReset:Be,handleSubmit:we,resetForm:te,setErrors:ce,setFormikState:Ae,setFieldTouched:be,setFieldValue:X,setFieldError:$,setStatus:he,setSubmitting:ge,setTouched:se,setValues:Q,submitForm:Ne,validateForm:W,validateField:J,isValid:Yr,dirty:Lr,unregisterField:le,registerField:ie,getFieldProps:gt,getFieldMeta:ke,getFieldHelpers:Ze,validateOnBlur:i,validateOnChange:r,validateOnMount:o});return fr}function X9(t){var e={};if(t.inner){if(t.inner.length===0)return ao(e,t.path,t.message);for(var i=t.inner,r=Array.isArray(i),n=0,i=r?i:i[Symbol.iterator]();;){var a;if(r){if(n>=i.length)break;a=i[n++]}else{if(n=i.next(),n.done)break;a=n.value}var o=a;an(e,o.path)||(e=ao(e,o.path,o.message))}}return e}function Y9(t,e,r,n){r===void 0&&(r=!1);var i=Hy(t);return e[r?"validateSync":"validate"](i,{abortEarly:!1,context:i})}function Hy(t){var e=Array.isArray(t)?[]:{};for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){var n=String(r);Array.isArray(t[n])===!0?e[n]=t[n].map(function(i){return Array.isArray(i)===!0||_S(i)?Hy(i):i!==""?i:void 0}):_S(t[n])?e[n]=Hy(t[n]):e[n]=t[n]!==""?t[n]:void 0}return e}function Z9(t,e,r){var n=t.slice();return e.forEach(function(a,o){if(typeof n[o]>"u"){var s=r.clone!==!1,l=s&&r.isMergeableObject(a);n[o]=l?ky(Array.isArray(a)?[]:{},a,r):a}else r.isMergeableObject(a)?n[o]=ky(t[o],a,r):t.indexOf(a)===-1&&n.push(a)}),n}function J9(t){return Array.from(t).filter(function(e){return e.selected}).map(function(e){return e.value})}function Q9(t,e,r){if(typeof t=="boolean")return!!e;var n=[],i=!1,a=-1;if(Array.isArray(t))n=t,a=t.indexOf(r),i=a>=0;else if(!r||r=="true"||r=="false")return!!e;return e&&r&&!i?n.concat(r):i?n.slice(0,a).concat(n.slice(a+1)):n}var eK=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?VR:ht;function Nn(t){var e=Kt(t);return eK(function(){e.current=t}),bt(function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return e.current.apply(void 0,n)},[])}var tK=ji(function(t,e){var r=t.action,n=vM(t,["action"]),i=r??"#",a=z9(),o=a.handleReset,s=a.handleSubmit;return es("form",Er({onSubmit:s,ref:e,onReset:o,action:i},n))});tK.displayName="Form";function bM(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t))for(e=0;e<t.length;e++)t[e]&&(r=bM(t[e]))&&(n&&(n+=" "),n+=r);else for(e in t)t[e]&&(n&&(n+=" "),n+=e);return n}function kd(){for(var t,e,r=0,n="";r<arguments.length;)(t=arguments[r++])&&(e=bM(t))&&(n&&(n+=" "),n+=e);return n}let rK={data:""},nK=t=>{if(typeof window=="object"){let e=(t?t.querySelector("#_goober"):window._goober)||Object.assign(document.createElement("style"),{innerHTML:" ",id:"_goober"});return e.nonce=window.__nonce__,e.parentNode||(t||document.head).appendChild(e),e.firstChild}return t||rK},iK=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,aK=/\/\*[^]*?\*\/| +/g,XS=/\n+/g,Qa=(t,e)=>{let r="",n="",i="";for(let a in t){let o=t[a];a[0]=="@"?a[1]=="i"?r=a+" "+o+";":n+=a[1]=="f"?Qa(o,a):a+"{"+Qa(o,a[1]=="k"?"":e)+"}":typeof o=="object"?n+=Qa(o,e?e.replace(/([^,])+/g,s=>a.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,l=>/&/.test(l)?l.replace(/&/g,s):s?s+" "+l:l)):a):o!=null&&(a=a[1]=="-"?a:a.replace(/[A-Z]/g,"-$&").toLowerCase(),i+=Qa.p?Qa.p(a,o):a+":"+o+";")}return r+(e&&i?e+"{"+i+"}":i)+n},aa={},_M=t=>{if(typeof t=="object"){let e="";for(let r in t)e+=r+_M(t[r]);return e}return t},oK=(t,e,r,n,i)=>{let a=_M(t),o=aa[a]||(aa[a]=(l=>{let c=0,d=11;for(;c<l.length;)d=101*d+l.charCodeAt(c++)>>>0;return"go"+d})(a));if(!aa[o]){let l=a!==t?t:(c=>{let d,h,g=[{}];for(;d=iK.exec(c.replace(aK,""));)d[4]?g.shift():d[3]?(h=d[3].replace(XS," ").trim(),g.unshift(g[0][h]=g[0][h]||{})):g[0][d[1]]=d[2].replace(XS," ").trim();return g[0]})(t);aa[o]=Qa(i?{["@keyframes "+o]:l}:l,r?"":"."+o)}let s=r&&aa.g;return r&&(aa.g=aa[o]),((l,c,d,h)=>{h?c.data=c.data.replace(h,l):c.data.indexOf(l)===-1&&(c.data=d?l+c.data:c.data+l)})(aa[o],e,n,s),o},sK=(t,e,r)=>t.reduce((n,i,a)=>{let o=e[a];if(o&&o.call){let s=o(r),l=s&&s.props&&s.props.className||/^go/.test(s)&&s;o=l?"."+l:s&&typeof s=="object"?s.props?"":Qa(s,""):s===!1?"":s}return n+i+(o??"")},"");function db(t){let e=this||{},r=t.call?t(e.p):t;return oK(r.unshift?r.raw?sK(r,[].slice.call(arguments,1),e.p):r.reduce((n,i)=>Object.assign(n,i&&i.call?i(e.p):i),{}):r,nK(e.target),e.g,e.o,e.k)}db.bind({g:1});db.bind({k:1});function uK(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function lK(t,e,r){return e&&uK(t.prototype,e),t}function pa(){return pa=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},pa.apply(this,arguments)}function cK(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}function hb(t,e){if(t==null)return{};var r={},n=Object.keys(t),i,a;for(a=0;a<n.length;a++)i=n[a],!(e.indexOf(i)>=0)&&(r[i]=t[i]);return r}var YS=function(){return""},fK=Nt.createContext({enqueueSnackbar:YS,closeSnackbar:YS}),Ga={downXs:"@media (max-width:599.95px)",upSm:"@media (min-width:600px)"},Wc="unmounted",Go="exited",Ko="entering",iu="entered",ZS="exiting",pb=(function(t){cK(e,t);function e(n){var i;i=t.call(this,n)||this;var a=n.appear,o;return i.appearStatus=null,n.in?a?(o=Go,i.appearStatus=Ko):o=iu:n.unmountOnExit||n.mountOnEnter?o=Wc:o=Go,i.state={status:o},i.nextCallback=null,i}e.getDerivedStateFromProps=function(i,a){var o=i.in;return o&&a.status===Wc?{status:Go}:null};var r=e.prototype;return r.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},r.componentDidUpdate=function(i){var a=null;if(i!==this.props){var o=this.state.status;this.props.in?o!==Ko&&o!==iu&&(a=Ko):(o===Ko||o===iu)&&(a=ZS)}this.updateStatus(!1,a)},r.componentWillUnmount=function(){this.cancelNextCallback()},r.getTimeouts=function(){var i=this.props.timeout,a=i,o=i;return i!=null&&typeof i!="number"&&typeof i!="string"&&(o=i.exit,a=i.enter),{exit:o,enter:a}},r.updateStatus=function(i,a){i===void 0&&(i=!1),a!==null?(this.cancelNextCallback(),a===Ko?this.performEnter(i):this.performExit()):this.props.unmountOnExit&&this.state.status===Go&&this.setState({status:Wc})},r.performEnter=function(i){var a=this,o=this.props.enter,s=i,l=this.getTimeouts();if(!i&&!o){this.safeSetState({status:iu},function(){a.props.onEntered&&a.props.onEntered(a.node,s)});return}this.props.onEnter&&this.props.onEnter(this.node,s),this.safeSetState({status:Ko},function(){a.props.onEntering&&a.props.onEntering(a.node,s),a.onTransitionEnd(l.enter,function(){a.safeSetState({status:iu},function(){a.props.onEntered&&a.props.onEntered(a.node,s)})})})},r.performExit=function(){var i=this,a=this.props.exit,o=this.getTimeouts();if(!a){this.safeSetState({status:Go},function(){i.props.onExited&&i.props.onExited(i.node)});return}this.props.onExit&&this.props.onExit(this.node),this.safeSetState({status:ZS},function(){i.props.onExiting&&i.props.onExiting(i.node),i.onTransitionEnd(o.exit,function(){i.safeSetState({status:Go},function(){i.props.onExited&&i.props.onExited(i.node)})})})},r.cancelNextCallback=function(){this.nextCallback!==null&&this.nextCallback.cancel&&(this.nextCallback.cancel(),this.nextCallback=null)},r.safeSetState=function(i,a){a=this.setNextCallback(a),this.setState(i,a)},r.setNextCallback=function(i){var a=this,o=!0;return this.nextCallback=function(){o&&(o=!1,a.nextCallback=null,i())},this.nextCallback.cancel=function(){o=!1},this.nextCallback},r.onTransitionEnd=function(i,a){this.setNextCallback(a);var o=i==null&&!this.props.addEndListener;if(!this.node||o){setTimeout(this.nextCallback,0);return}this.props.addEndListener&&this.props.addEndListener(this.node,this.nextCallback),i!=null&&setTimeout(this.nextCallback,i)},r.render=function(){var i=this.state.status;if(i===Wc)return null;var a=this.props,o=a.children,s=hb(a,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return o(i,s)},lK(e,[{key:"node",get:function(){var i,a=(i=this.props.nodeRef)===null||i===void 0?void 0:i.current;if(!a)throw new Error("notistack - Custom snackbar is not refForwarding");return a}}]),e})(Nt.Component);function Xo(){}pb.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Xo,onEntering:Xo,onEntered:Xo,onExit:Xo,onExiting:Xo,onExited:Xo};function JS(t,e){typeof t=="function"?t(e):t&&(t.current=e)}function Wy(t,e){return yr(function(){return t==null&&e==null?null:function(r){JS(t,r),JS(e,r)}},[t,e])}function Jf(t){var e=t.timeout,r=t.style,n=r===void 0?{}:r,i=t.mode;return{duration:typeof e=="object"?e[i]||0:e,easing:n.transitionTimingFunction,delay:n.transitionDelay}}var By={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},xM=function(e){e.scrollTop=e.scrollTop},QS=function(e){return Math.round(e)+"ms"};function Zo(t,e){t===void 0&&(t=["all"]);var r=e||{},n=r.duration,i=n===void 0?300:n,a=r.easing,o=a===void 0?By.easeInOut:a,s=r.delay,l=s===void 0?0:s,c=Array.isArray(t)?t:[t];return c.map(function(d){var h=typeof i=="string"?i:QS(i),g=typeof l=="string"?l:QS(l);return d+" "+h+" "+o+" "+g}).join(",")}function dK(t){return t&&t.ownerDocument||document}function wM(t){var e=dK(t);return e.defaultView||window}function hK(t,e){e===void 0&&(e=166);var r;function n(){for(var i=this,a=arguments.length,o=new Array(a),s=0;s<a;s++)o[s]=arguments[s];var l=function(){t.apply(i,o)};clearTimeout(r),r=setTimeout(l,e)}return n.clear=function(){clearTimeout(r)},n}function pK(t,e){var r=e.getBoundingClientRect(),n=wM(e),i;if(e.fakeTransform)i=e.fakeTransform;else{var a=n.getComputedStyle(e);i=a.getPropertyValue("-webkit-transform")||a.getPropertyValue("transform")}var o=0,s=0;if(i&&i!=="none"&&typeof i=="string"){var l=i.split("(")[1].split(")")[0].split(",");o=parseInt(l[4],10),s=parseInt(l[5],10)}switch(t){case"left":return"translateX("+(n.innerWidth+o-r.left)+"px)";case"right":return"translateX(-"+(r.left+r.width-o)+"px)";case"up":return"translateY("+(n.innerHeight+s-r.top)+"px)";default:return"translateY(-"+(r.top+r.height-s)+"px)"}}function Bc(t,e){if(e){var r=pK(t,e);r&&(e.style.webkitTransform=r,e.style.transform=r)}}var gK=ji(function(t,e){var r=t.children,n=t.direction,i=n===void 0?"down":n,a=t.in,o=t.style,s=t.timeout,l=s===void 0?0:s,c=t.onEnter,d=t.onEntered,h=t.onExit,g=t.onExited,m=hb(t,["children","direction","in","style","timeout","onEnter","onEntered","onExit","onExited"]),v=Kt(null),_=Wy(r.ref,v),y=Wy(_,e),x=function(T,D){Bc(i,T),xM(T),c&&c(T,D)},w=function(T){var D=(o==null?void 0:o.transitionTimingFunction)||By.easeOut,P=Jf({timeout:l,mode:"enter",style:pa({},o,{transitionTimingFunction:D})});T.style.webkitTransition=Zo("-webkit-transform",P),T.style.transition=Zo("transform",P),T.style.webkitTransform="none",T.style.transform="none"},C=function(T){var D=(o==null?void 0:o.transitionTimingFunction)||By.sharp,P=Jf({timeout:l,mode:"exit",style:pa({},o,{transitionTimingFunction:D})});T.style.webkitTransition=Zo("-webkit-transform",P),T.style.transition=Zo("transform",P),Bc(i,T),h&&h(T)},A=function(T){T.style.webkitTransition="",T.style.transition="",g&&g(T)},E=bt(function(){v.current&&Bc(i,v.current)},[i]);return ht(function(){if(!(a||i==="down"||i==="right")){var S=hK(function(){v.current&&Bc(i,v.current)}),T=wM(v.current);return T.addEventListener("resize",S),function(){S.clear(),T.removeEventListener("resize",S)}}},[i,a]),ht(function(){a||E()},[a,E]),es(pb,Object.assign({appear:!0,nodeRef:v,onEnter:x,onEntered:d,onEntering:w,onExit:C,onExited:A,in:a,timeout:l},m),function(S,T){return EU(r,pa({ref:y,style:pa({visibility:S==="exited"&&!a?"hidden":void 0},o,{},r.props.style)},T))})});gK.displayName="Slide";function jd(t){return Object.entries(t).reduce(function(e,r){var n,i=r[0],a=r[1];return pa({},e,(n={},n[i]=db(a),n))},{})}var ku={SnackbarContainer:"notistack-SnackbarContainer",Snackbar:"notistack-Snackbar",CollapseWrapper:"notistack-CollapseWrapper",MuiContent:"notistack-MuiContent",MuiContentVariant:function(e){return"notistack-MuiContent-"+e}},eC=jd({root:{height:0},entered:{height:"auto"}}),Tg="0px",Sg=175,mK=ji(function(t,e){var r=t.children,n=t.in,i=t.onExited,a=Kt(null),o=Kt(null),s=Wy(e,o),l=function(){return a.current?a.current.clientHeight:0},c=function(_){_.style.height=Tg},d=function(_){var y=l(),x=Jf({timeout:Sg,mode:"enter"}),w=x.duration,C=x.easing;_.style.transitionDuration=typeof w=="string"?w:w+"ms",_.style.height=y+"px",_.style.transitionTimingFunction=C||""},h=function(_){_.style.height="auto"},g=function(_){_.style.height=l()+"px"},m=function(_){xM(_);var y=Jf({timeout:Sg,mode:"exit"}),x=y.duration,w=y.easing;_.style.transitionDuration=typeof x=="string"?x:x+"ms",_.style.height=Tg,_.style.transitionTimingFunction=w||""};return es(pb,{in:n,unmountOnExit:!0,onEnter:c,onEntered:h,onEntering:d,onExit:g,onExited:i,onExiting:m,nodeRef:o,timeout:Sg},function(v,_){return es("div",Object.assign({ref:s,className:kd(eC.root,v==="entered"&&eC.entered),style:pa({pointerEvents:"all",overflow:"hidden",minHeight:Tg,transition:Zo("height")},v==="entered"&&{overflow:"visible"},{},v==="exited"&&!n&&{visibility:"hidden"})},_),es("div",{ref:a,className:ku.CollapseWrapper,style:{display:"flex",width:"100%"}},r))})});mK.displayName="Collapse";var vK=typeof window<"u"?VR:ht;function tC(t){var e=Kt(t);return vK(function(){e.current=t}),bt(function(){return e.current.apply(void 0,arguments)},[])}var yK=ji(function(t,e){var r=t.children,n=t.className,i=t.autoHideDuration,a=t.disableWindowBlurListener,o=a===void 0?!1:a,s=t.onClose,l=t.id,c=t.open,d=t.SnackbarProps,h=d===void 0?{}:d,g=Kt(),m=tC(function(){s&&s.apply(void 0,arguments)}),v=tC(function(C){!s||C==null||(g.current&&clearTimeout(g.current),g.current=setTimeout(function(){m(null,"timeout",l)},C))});ht(function(){return c&&v(i),function(){g.current&&clearTimeout(g.current)}},[c,i,v]);var _=function(){g.current&&clearTimeout(g.current)},y=bt(function(){i!=null&&v(i*.5)},[i,v]),x=function(A){h.onMouseEnter&&h.onMouseEnter(A),_()},w=function(A){h.onMouseLeave&&h.onMouseLeave(A),y()};return ht(function(){if(!o&&c)return window.addEventListener("focus",y),window.addEventListener("blur",_),function(){window.removeEventListener("focus",y),window.removeEventListener("blur",_)}},[o,y,c]),es("div",Object.assign({ref:e},h,{className:kd(ku.Snackbar,n),onMouseEnter:x,onMouseLeave:w}),r)});yK.displayName="Snackbar";var Cg,bK=jd({root:(Cg={display:"flex",flexWrap:"wrap",flexGrow:1},Cg[Ga.upSm]={flexGrow:"initial",minWidth:"288px"},Cg)}),TM=ji(function(t,e){var r=t.className,n=hb(t,["className"]);return Nt.createElement("div",Object.assign({ref:e,className:kd(bK.root,r)},n))});TM.displayName="SnackbarContent";var au=jd({root:{backgroundColor:"#313131",fontSize:"0.875rem",lineHeight:1.43,letterSpacing:"0.01071em",color:"#fff",alignItems:"center",padding:"6px 16px",borderRadius:"4px",boxShadow:"0px 3px 5px -1px rgba(0,0,0,0.2),0px 6px 10px 0px rgba(0,0,0,0.14),0px 1px 18px 0px rgba(0,0,0,0.12)"},lessPadding:{paddingLeft:8*2.5+"px"},default:{backgroundColor:"#313131"},success:{backgroundColor:"#43a047"},error:{backgroundColor:"#d32f2f"},warning:{backgroundColor:"#ff9800"},info:{backgroundColor:"#2196f3"},message:{display:"flex",alignItems:"center",padding:"8px 0"},action:{display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:"16px",marginRight:"-8px"}}),rC="notistack-snackbar",_K=ji(function(t,e){var r=t.id,n=t.message,i=t.action,a=t.iconVariant,o=t.variant,s=t.hideIconVariant,l=t.style,c=t.className,d=a[o],h=i;return typeof h=="function"&&(h=h(r)),Nt.createElement(TM,{ref:e,role:"alert","aria-describedby":rC,style:l,className:kd(ku.MuiContent,ku.MuiContentVariant(o),au.root,au[o],c,!s&&d&&au.lessPadding)},Nt.createElement("div",{id:rC,className:au.message},s?null:d,n),h&&Nt.createElement("div",{className:au.action},h))});_K.displayName="MaterialDesignContent";var ou,Eg,zc,Vc,Og,Ri={view:{default:20},snackbar:{default:6,dense:2}},nC="."+ku.CollapseWrapper,Ag=16;ou={boxSizing:"border-box",display:"flex",maxHeight:"100%",position:"fixed",zIndex:1400,height:"auto",width:"auto",transition:Zo(["top","right","bottom","left","max-width"],{duration:300,easing:"ease"}),pointerEvents:"none"},ou[nC]={padding:Ri.snackbar.default+"px 0px",transition:"padding 300ms ease 0ms"},ou.maxWidth="calc(100% - "+Ri.view.default*2+"px)",ou[Ga.downXs]={width:"100%",maxWidth:"calc(100% - "+Ag*2+"px)"},Eg={},Eg[nC]={padding:Ri.snackbar.dense+"px 0px"},Ri.view.default-Ri.snackbar.default+"",Ri.view.default-Ri.snackbar.default+"",zc={left:Ri.view.default+"px"},zc[Ga.upSm]={alignItems:"flex-start"},zc[Ga.downXs]={left:Ag+"px"},Vc={right:Ri.view.default+"px"},Vc[Ga.upSm]={alignItems:"flex-end"},Vc[Ga.downXs]={right:Ag+"px"},Og={left:"50%",transform:"translateX(-50%)"},Og[Ga.upSm]={alignItems:"center"};var xK=(function(){return Wu(fK)}),zy;try{zy=Map}catch{}var Vy;try{Vy=Set}catch{}function SM(t,e,r){if(!t||typeof t!="object"||typeof t=="function")return t;if(t.nodeType&&"cloneNode"in t)return t.cloneNode(!0);if(t instanceof Date)return new Date(t.getTime());if(t instanceof RegExp)return new RegExp(t);if(Array.isArray(t))return t.map(Gy);if(zy&&t instanceof zy)return new Map(Array.from(t.entries()));if(Vy&&t instanceof Vy)return new Set(Array.from(t.values()));if(t instanceof Object){e.push(t);var n=Object.create(t);r.push(n);for(var i in t){var a=e.findIndex(function(o){return o===t[i]});n[i]=a>-1?r[a]:SM(t[i],e,r)}return n}return t}function Gy(t){return SM(t,[],[])}const wK=Object.prototype.toString,TK=Error.prototype.toString,SK=RegExp.prototype.toString,CK=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",EK=/^Symbol\((.*)\)(.*)$/;function OK(t){return t!=+t?"NaN":t===0&&1/t<0?"-0":""+t}function iC(t,e=!1){if(t==null||t===!0||t===!1)return""+t;const r=typeof t;if(r==="number")return OK(t);if(r==="string")return e?`"${t}"`:t;if(r==="function")return"[Function "+(t.name||"anonymous")+"]";if(r==="symbol")return CK.call(t).replace(EK,"Symbol($1)");const n=wK.call(t).slice(8,-1);return n==="Date"?isNaN(t.getTime())?""+t:t.toISOString(t):n==="Error"||t instanceof Error?"["+TK.call(t)+"]":n==="RegExp"?SK.call(t):null}function ds(t,e){let r=iC(t,e);return r!==null?r:JSON.stringify(t,function(n,i){let a=iC(this[n],e);return a!==null?a:i},2)}let Ka={default:"${path} is invalid",required:"${path} is a required field",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:t,type:e,value:r,originalValue:n})=>{let i=n!=null&&n!==r,a=`${t} must be a \`${e}\` type, but the final value was: \`${ds(r,!0)}\``+(i?` (cast from the value \`${ds(n,!0)}\`).`:".");return r===null&&(a+='\n If "null" is intended as an empty value be sure to mark the schema as `.nullable()`'),a},defined:"${path} must be defined"},Yn={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},la={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},Ky={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},Xy={isValue:"${path} field must be ${value}"},Yy={noUnknown:"${path} field has unspecified keys: ${unknown}"},yf={min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"};const AK=Object.assign(Object.create(null),{mixed:Ka,string:Yn,number:la,date:Ky,object:Yy,array:yf,boolean:Xy});var Rg,aC;function RK(){if(aC)return Rg;aC=1;var t=Object.prototype,e=t.hasOwnProperty;function r(n,i){return n!=null&&e.call(n,i)}return Rg=r,Rg}var Ig,oC;function Oa(){if(oC)return Ig;oC=1;var t=Array.isArray;return Ig=t,Ig}var Dg,sC;function CM(){if(sC)return Dg;sC=1;var t=typeof di=="object"&&di&&di.Object===Object&&di;return Dg=t,Dg}var Mg,uC;function Bi(){if(uC)return Mg;uC=1;var t=CM(),e=typeof self=="object"&&self&&self.Object===Object&&self,r=t||e||Function("return this")();return Mg=r,Mg}var Pg,lC;function $d(){if(lC)return Pg;lC=1;var t=Bi(),e=t.Symbol;return Pg=e,Pg}var Lg,cC;function IK(){if(cC)return Lg;cC=1;var t=$d(),e=Object.prototype,r=e.hasOwnProperty,n=e.toString,i=t?t.toStringTag:void 0;function a(o){var s=r.call(o,i),l=o[i];try{o[i]=void 0;var c=!0}catch{}var d=n.call(o);return c&&(s?o[i]=l:delete o[i]),d}return Lg=a,Lg}var Ng,fC;function DK(){if(fC)return Ng;fC=1;var t=Object.prototype,e=t.toString;function r(n){return e.call(n)}return Ng=r,Ng}var Fg,dC;function Zu(){if(dC)return Fg;dC=1;var t=$d(),e=IK(),r=DK(),n="[object Null]",i="[object Undefined]",a=t?t.toStringTag:void 0;function o(s){return s==null?s===void 0?i:n:a&&a in Object(s)?e(s):r(s)}return Fg=o,Fg}var kg,hC;function Ju(){if(hC)return kg;hC=1;function t(e){return e!=null&&typeof e=="object"}return kg=t,kg}var jg,pC;function gb(){if(pC)return jg;pC=1;var t=Zu(),e=Ju(),r="[object Symbol]";function n(i){return typeof i=="symbol"||e(i)&&t(i)==r}return jg=n,jg}var $g,gC;function mb(){if(gC)return $g;gC=1;var t=Oa(),e=gb(),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,n=/^\w*$/;function i(a,o){if(t(a))return!1;var s=typeof a;return s=="number"||s=="symbol"||s=="boolean"||a==null||e(a)?!0:n.test(a)||!r.test(a)||o!=null&&a in Object(o)}return $g=i,$g}var Ug,mC;function vb(){if(mC)return Ug;mC=1;function t(e){var r=typeof e;return e!=null&&(r=="object"||r=="function")}return Ug=t,Ug}var qg,vC;function EM(){if(vC)return qg;vC=1;var t=Zu(),e=vb(),r="[object AsyncFunction]",n="[object Function]",i="[object GeneratorFunction]",a="[object Proxy]";function o(s){if(!e(s))return!1;var l=t(s);return l==n||l==i||l==r||l==a}return qg=o,qg}var Hg,yC;function MK(){if(yC)return Hg;yC=1;var t=Bi(),e=t["__core-js_shared__"];return Hg=e,Hg}var Wg,bC;function PK(){if(bC)return Wg;bC=1;var t=MK(),e=(function(){var n=/[^.]+$/.exec(t&&t.keys&&t.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""})();function r(n){return!!e&&e in n}return Wg=r,Wg}var Bg,_C;function OM(){if(_C)return Bg;_C=1;var t=Function.prototype,e=t.toString;function r(n){if(n!=null){try{return e.call(n)}catch{}try{return n+""}catch{}}return""}return Bg=r,Bg}var zg,xC;function LK(){if(xC)return zg;xC=1;var t=EM(),e=PK(),r=vb(),n=OM(),i=/[\\^$.*+?()[\]{}|]/g,a=/^\[object .+?Constructor\]$/,o=Function.prototype,s=Object.prototype,l=o.toString,c=s.hasOwnProperty,d=RegExp("^"+l.call(c).replace(i,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function h(g){if(!r(g)||e(g))return!1;var m=t(g)?d:a;return m.test(n(g))}return zg=h,zg}var Vg,wC;function NK(){if(wC)return Vg;wC=1;function t(e,r){return e==null?void 0:e[r]}return Vg=t,Vg}var Gg,TC;function wo(){if(TC)return Gg;TC=1;var t=LK(),e=NK();function r(n,i){var a=e(n,i);return t(a)?a:void 0}return Gg=r,Gg}var Kg,SC;function Ud(){if(SC)return Kg;SC=1;var t=wo(),e=t(Object,"create");return Kg=e,Kg}var Xg,CC;function FK(){if(CC)return Xg;CC=1;var t=Ud();function e(){this.__data__=t?t(null):{},this.size=0}return Xg=e,Xg}var Yg,EC;function kK(){if(EC)return Yg;EC=1;function t(e){var r=this.has(e)&&delete this.__data__[e];return this.size-=r?1:0,r}return Yg=t,Yg}var Zg,OC;function jK(){if(OC)return Zg;OC=1;var t=Ud(),e="__lodash_hash_undefined__",r=Object.prototype,n=r.hasOwnProperty;function i(a){var o=this.__data__;if(t){var s=o[a];return s===e?void 0:s}return n.call(o,a)?o[a]:void 0}return Zg=i,Zg}var Jg,AC;function $K(){if(AC)return Jg;AC=1;var t=Ud(),e=Object.prototype,r=e.hasOwnProperty;function n(i){var a=this.__data__;return t?a[i]!==void 0:r.call(a,i)}return Jg=n,Jg}var Qg,RC;function UK(){if(RC)return Qg;RC=1;var t=Ud(),e="__lodash_hash_undefined__";function r(n,i){var a=this.__data__;return this.size+=this.has(n)?0:1,a[n]=t&&i===void 0?e:i,this}return Qg=r,Qg}var em,IC;function qK(){if(IC)return em;IC=1;var t=FK(),e=kK(),r=jK(),n=$K(),i=UK();function a(o){var s=-1,l=o==null?0:o.length;for(this.clear();++s<l;){var c=o[s];this.set(c[0],c[1])}}return a.prototype.clear=t,a.prototype.delete=e,a.prototype.get=r,a.prototype.has=n,a.prototype.set=i,em=a,em}var tm,DC;function HK(){if(DC)return tm;DC=1;function t(){this.__data__=[],this.size=0}return tm=t,tm}var rm,MC;function AM(){if(MC)return rm;MC=1;function t(e,r){return e===r||e!==e&&r!==r}return rm=t,rm}var nm,PC;function qd(){if(PC)return nm;PC=1;var t=AM();function e(r,n){for(var i=r.length;i--;)if(t(r[i][0],n))return i;return-1}return nm=e,nm}var im,LC;function WK(){if(LC)return im;LC=1;var t=qd(),e=Array.prototype,r=e.splice;function n(i){var a=this.__data__,o=t(a,i);if(o<0)return!1;var s=a.length-1;return o==s?a.pop():r.call(a,o,1),--this.size,!0}return im=n,im}var am,NC;function BK(){if(NC)return am;NC=1;var t=qd();function e(r){var n=this.__data__,i=t(n,r);return i<0?void 0:n[i][1]}return am=e,am}var om,FC;function zK(){if(FC)return om;FC=1;var t=qd();function e(r){return t(this.__data__,r)>-1}return om=e,om}var sm,kC;function VK(){if(kC)return sm;kC=1;var t=qd();function e(r,n){var i=this.__data__,a=t(i,r);return a<0?(++this.size,i.push([r,n])):i[a][1]=n,this}return sm=e,sm}var um,jC;function Hd(){if(jC)return um;jC=1;var t=HK(),e=WK(),r=BK(),n=zK(),i=VK();function a(o){var s=-1,l=o==null?0:o.length;for(this.clear();++s<l;){var c=o[s];this.set(c[0],c[1])}}return a.prototype.clear=t,a.prototype.delete=e,a.prototype.get=r,a.prototype.has=n,a.prototype.set=i,um=a,um}var lm,$C;function yb(){if($C)return lm;$C=1;var t=wo(),e=Bi(),r=t(e,"Map");return lm=r,lm}var cm,UC;function GK(){if(UC)return cm;UC=1;var t=qK(),e=Hd(),r=yb();function n(){this.size=0,this.__data__={hash:new t,map:new(r||e),string:new t}}return cm=n,cm}var fm,qC;function KK(){if(qC)return fm;qC=1;function t(e){var r=typeof e;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?e!=="__proto__":e===null}return fm=t,fm}var dm,HC;function Wd(){if(HC)return dm;HC=1;var t=KK();function e(r,n){var i=r.__data__;return t(n)?i[typeof n=="string"?"string":"hash"]:i.map}return dm=e,dm}var hm,WC;function XK(){if(WC)return hm;WC=1;var t=Wd();function e(r){var n=t(this,r).delete(r);return this.size-=n?1:0,n}return hm=e,hm}var pm,BC;function YK(){if(BC)return pm;BC=1;var t=Wd();function e(r){return t(this,r).get(r)}return pm=e,pm}var gm,zC;function ZK(){if(zC)return gm;zC=1;var t=Wd();function e(r){return t(this,r).has(r)}return gm=e,gm}var mm,VC;function JK(){if(VC)return mm;VC=1;var t=Wd();function e(r,n){var i=t(this,r),a=i.size;return i.set(r,n),this.size+=i.size==a?0:1,this}return mm=e,mm}var vm,GC;function bb(){if(GC)return vm;GC=1;var t=GK(),e=XK(),r=YK(),n=ZK(),i=JK();function a(o){var s=-1,l=o==null?0:o.length;for(this.clear();++s<l;){var c=o[s];this.set(c[0],c[1])}}return a.prototype.clear=t,a.prototype.delete=e,a.prototype.get=r,a.prototype.has=n,a.prototype.set=i,vm=a,vm}var ym,KC;function QK(){if(KC)return ym;KC=1;var t=bb(),e="Expected a function";function r(n,i){if(typeof n!="function"||i!=null&&typeof i!="function")throw new TypeError(e);var a=function(){var o=arguments,s=i?i.apply(this,o):o[0],l=a.cache;if(l.has(s))return l.get(s);var c=n.apply(this,o);return a.cache=l.set(s,c)||l,c};return a.cache=new(r.Cache||t),a}return r.Cache=t,ym=r,ym}var bm,XC;function eX(){if(XC)return bm;XC=1;var t=QK(),e=500;function r(n){var i=t(n,function(o){return a.size===e&&a.clear(),o}),a=i.cache;return i}return bm=r,bm}var _m,YC;function tX(){if(YC)return _m;YC=1;var t=eX(),e=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,r=/\\(\\)?/g,n=t(function(i){var a=[];return i.charCodeAt(0)===46&&a.push(""),i.replace(e,function(o,s,l,c){a.push(l?c.replace(r,"$1"):s||o)}),a});return _m=n,_m}var xm,ZC;function rX(){if(ZC)return xm;ZC=1;function t(e,r){for(var n=-1,i=e==null?0:e.length,a=Array(i);++n<i;)a[n]=r(e[n],n,e);return a}return xm=t,xm}var wm,JC;function nX(){if(JC)return wm;JC=1;var t=$d(),e=rX(),r=Oa(),n=gb(),i=t?t.prototype:void 0,a=i?i.toString:void 0;function o(s){if(typeof s=="string")return s;if(r(s))return e(s,o)+"";if(n(s))return a?a.call(s):"";var l=s+"";return l=="0"&&1/s==-1/0?"-0":l}return wm=o,wm}var Tm,QC;function Qu(){if(QC)return Tm;QC=1;var t=nX();function e(r){return r==null?"":t(r)}return Tm=e,Tm}var Sm,eE;function RM(){if(eE)return Sm;eE=1;var t=Oa(),e=mb(),r=tX(),n=Qu();function i(a,o){return t(a)?a:e(a,o)?[a]:r(n(a))}return Sm=i,Sm}var Cm,tE;function iX(){if(tE)return Cm;tE=1;var t=Zu(),e=Ju(),r="[object Arguments]";function n(i){return e(i)&&t(i)==r}return Cm=n,Cm}var Em,rE;function IM(){if(rE)return Em;rE=1;var t=iX(),e=Ju(),r=Object.prototype,n=r.hasOwnProperty,i=r.propertyIsEnumerable,a=t((function(){return arguments})())?t:function(o){return e(o)&&n.call(o,"callee")&&!i.call(o,"callee")};return Em=a,Em}var Om,nE;function DM(){if(nE)return Om;nE=1;var t=9007199254740991,e=/^(?:0|[1-9]\d*)$/;function r(n,i){var a=typeof n;return i=i??t,!!i&&(a=="number"||a!="symbol"&&e.test(n))&&n>-1&&n%1==0&&n<i}return Om=r,Om}var Am,iE;function _b(){if(iE)return Am;iE=1;var t=9007199254740991;function e(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=t}return Am=e,Am}var Rm,aE;function Bd(){if(aE)return Rm;aE=1;var t=gb();function e(r){if(typeof r=="string"||t(r))return r;var n=r+"";return n=="0"&&1/r==-1/0?"-0":n}return Rm=e,Rm}var Im,oE;function MM(){if(oE)return Im;oE=1;var t=RM(),e=IM(),r=Oa(),n=DM(),i=_b(),a=Bd();function o(s,l,c){l=t(l,s);for(var d=-1,h=l.length,g=!1;++d<h;){var m=a(l[d]);if(!(g=s!=null&&c(s,m)))break;s=s[m]}return g||++d!=h?g:(h=s==null?0:s.length,!!h&&i(h)&&n(m,h)&&(r(s)||e(s)))}return Im=o,Im}var Dm,sE;function aX(){if(sE)return Dm;sE=1;var t=RK(),e=MM();function r(n,i){return n!=null&&e(n,i,t)}return Dm=r,Dm}var oX=aX();const Qf=gi(oX),Cs=t=>t&&t.__isYupSchema__;class sX{constructor(e,r){if(this.fn=void 0,this.refs=e,this.refs=e,typeof r=="function"){this.fn=r;return}if(!Qf(r,"is"))throw new TypeError("`is:` is required for `when()` conditions");if(!r.then&&!r.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:n,then:i,otherwise:a}=r,o=typeof n=="function"?n:(...s)=>s.every(l=>l===n);this.fn=function(...s){let l=s.pop(),c=s.pop(),d=o(...s)?i:a;if(d)return typeof d=="function"?d(c):c.concat(d.resolve(l))}}resolve(e,r){let n=this.refs.map(a=>a.getValue(r==null?void 0:r.value,r==null?void 0:r.parent,r==null?void 0:r.context)),i=this.fn.apply(e,n.concat(e,r));if(i===void 0||i===e)return e;if(!Cs(i))throw new TypeError("conditions must return a schema object");return i.resolve(r)}}function PM(t){return t==null?[]:[].concat(t)}function Zy(){return Zy=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Zy.apply(this,arguments)}let uX=/\$\{\s*(\w+)\s*\}/g;class Vr extends Error{static formatError(e,r){const n=r.label||r.path||"this";return n!==r.path&&(r=Zy({},r,{path:n})),typeof e=="string"?e.replace(uX,(i,a)=>ds(r[a])):typeof e=="function"?e(r):e}static isError(e){return e&&e.name==="ValidationError"}constructor(e,r,n,i){super(),this.value=void 0,this.path=void 0,this.type=void 0,this.errors=void 0,this.params=void 0,this.inner=void 0,this.name="ValidationError",this.value=r,this.path=n,this.type=i,this.errors=[],this.inner=[],PM(e).forEach(a=>{Vr.isError(a)?(this.errors.push(...a.errors),this.inner=this.inner.concat(a.inner.length?a.inner:a)):this.errors.push(a)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0],Error.captureStackTrace&&Error.captureStackTrace(this,Vr)}}const lX=t=>{let e=!1;return(...r)=>{e||(e=!0,t(...r))}};function ed(t,e){let{endEarly:r,tests:n,args:i,value:a,errors:o,sort:s,path:l}=t,c=lX(e),d=n.length;const h=[];if(o=o||[],!d)return o.length?c(new Vr(o,a,l)):c(null,a);for(let g=0;g<n.length;g++){const m=n[g];m(i,function(_){if(_){if(!Vr.isError(_))return c(_,a);if(r)return _.value=a,c(_,a);h.push(_)}if(--d<=0){if(h.length&&(s&&h.sort(s),o.length&&h.push(...o),o=h),o.length){c(new Vr(o,a,l),a);return}c(null,a)}})}}var Mm,uE;function cX(){if(uE)return Mm;uE=1;var t=wo(),e=(function(){try{var r=t(Object,"defineProperty");return r({},"",{}),r}catch{}})();return Mm=e,Mm}var Pm,lE;function LM(){if(lE)return Pm;lE=1;var t=cX();function e(r,n,i){n=="__proto__"&&t?t(r,n,{configurable:!0,enumerable:!0,value:i,writable:!0}):r[n]=i}return Pm=e,Pm}var Lm,cE;function fX(){if(cE)return Lm;cE=1;function t(e){return function(r,n,i){for(var a=-1,o=Object(r),s=i(r),l=s.length;l--;){var c=s[e?l:++a];if(n(o[c],c,o)===!1)break}return r}}return Lm=t,Lm}var Nm,fE;function dX(){if(fE)return Nm;fE=1;var t=fX(),e=t();return Nm=e,Nm}var Fm,dE;function hX(){if(dE)return Fm;dE=1;function t(e,r){for(var n=-1,i=Array(e);++n<e;)i[n]=r(n);return i}return Fm=t,Fm}var gu={exports:{}},km,hE;function pX(){if(hE)return km;hE=1;function t(){return!1}return km=t,km}gu.exports;var pE;function NM(){return pE||(pE=1,(function(t,e){var r=Bi(),n=pX(),i=e&&!e.nodeType&&e,a=i&&!0&&t&&!t.nodeType&&t,o=a&&a.exports===i,s=o?r.Buffer:void 0,l=s?s.isBuffer:void 0,c=l||n;t.exports=c})(gu,gu.exports)),gu.exports}var jm,gE;function gX(){if(gE)return jm;gE=1;var t=Zu(),e=_b(),r=Ju(),n="[object Arguments]",i="[object Array]",a="[object Boolean]",o="[object Date]",s="[object Error]",l="[object Function]",c="[object Map]",d="[object Number]",h="[object Object]",g="[object RegExp]",m="[object Set]",v="[object String]",_="[object WeakMap]",y="[object ArrayBuffer]",x="[object DataView]",w="[object Float32Array]",C="[object Float64Array]",A="[object Int8Array]",E="[object Int16Array]",S="[object Int32Array]",T="[object Uint8Array]",D="[object Uint8ClampedArray]",P="[object Uint16Array]",N="[object Uint32Array]",F={};F[w]=F[C]=F[A]=F[E]=F[S]=F[T]=F[D]=F[P]=F[N]=!0,F[n]=F[i]=F[y]=F[a]=F[x]=F[o]=F[s]=F[l]=F[c]=F[d]=F[h]=F[g]=F[m]=F[v]=F[_]=!1;function B(W){return r(W)&&e(W.length)&&!!F[t(W)]}return jm=B,jm}var $m,mE;function mX(){if(mE)return $m;mE=1;function t(e){return function(r){return e(r)}}return $m=t,$m}var mu={exports:{}};mu.exports;var vE;function vX(){return vE||(vE=1,(function(t,e){var r=CM(),n=e&&!e.nodeType&&e,i=n&&!0&&t&&!t.nodeType&&t,a=i&&i.exports===n,o=a&&r.process,s=(function(){try{var l=i&&i.require&&i.require("util").types;return l||o&&o.binding&&o.binding("util")}catch{}})();t.exports=s})(mu,mu.exports)),mu.exports}var Um,yE;function FM(){if(yE)return Um;yE=1;var t=gX(),e=mX(),r=vX(),n=r&&r.isTypedArray,i=n?e(n):t;return Um=i,Um}var qm,bE;function yX(){if(bE)return qm;bE=1;var t=hX(),e=IM(),r=Oa(),n=NM(),i=DM(),a=FM(),o=Object.prototype,s=o.hasOwnProperty;function l(c,d){var h=r(c),g=!h&&e(c),m=!h&&!g&&n(c),v=!h&&!g&&!m&&a(c),_=h||g||m||v,y=_?t(c.length,String):[],x=y.length;for(var w in c)(d||s.call(c,w))&&!(_&&(w=="length"||m&&(w=="offset"||w=="parent")||v&&(w=="buffer"||w=="byteLength"||w=="byteOffset")||i(w,x)))&&y.push(w);return y}return qm=l,qm}var Hm,_E;function bX(){if(_E)return Hm;_E=1;var t=Object.prototype;function e(r){var n=r&&r.constructor,i=typeof n=="function"&&n.prototype||t;return r===i}return Hm=e,Hm}var Wm,xE;function _X(){if(xE)return Wm;xE=1;function t(e,r){return function(n){return e(r(n))}}return Wm=t,Wm}var Bm,wE;function xX(){if(wE)return Bm;wE=1;var t=_X(),e=t(Object.keys,Object);return Bm=e,Bm}var zm,TE;function wX(){if(TE)return zm;TE=1;var t=bX(),e=xX(),r=Object.prototype,n=r.hasOwnProperty;function i(a){if(!t(a))return e(a);var o=[];for(var s in Object(a))n.call(a,s)&&s!="constructor"&&o.push(s);return o}return zm=i,zm}var Vm,SE;function TX(){if(SE)return Vm;SE=1;var t=EM(),e=_b();function r(n){return n!=null&&e(n.length)&&!t(n)}return Vm=r,Vm}var Gm,CE;function xb(){if(CE)return Gm;CE=1;var t=yX(),e=wX(),r=TX();function n(i){return r(i)?t(i):e(i)}return Gm=n,Gm}var Km,EE;function kM(){if(EE)return Km;EE=1;var t=dX(),e=xb();function r(n,i){return n&&t(n,i,e)}return Km=r,Km}var Xm,OE;function SX(){if(OE)return Xm;OE=1;var t=Hd();function e(){this.__data__=new t,this.size=0}return Xm=e,Xm}var Ym,AE;function CX(){if(AE)return Ym;AE=1;function t(e){var r=this.__data__,n=r.delete(e);return this.size=r.size,n}return Ym=t,Ym}var Zm,RE;function EX(){if(RE)return Zm;RE=1;function t(e){return this.__data__.get(e)}return Zm=t,Zm}var Jm,IE;function OX(){if(IE)return Jm;IE=1;function t(e){return this.__data__.has(e)}return Jm=t,Jm}var Qm,DE;function AX(){if(DE)return Qm;DE=1;var t=Hd(),e=yb(),r=bb(),n=200;function i(a,o){var s=this.__data__;if(s instanceof t){var l=s.__data__;if(!e||l.length<n-1)return l.push([a,o]),this.size=++s.size,this;s=this.__data__=new r(l)}return s.set(a,o),this.size=s.size,this}return Qm=i,Qm}var ev,ME;function jM(){if(ME)return ev;ME=1;var t=Hd(),e=SX(),r=CX(),n=EX(),i=OX(),a=AX();function o(s){var l=this.__data__=new t(s);this.size=l.size}return o.prototype.clear=e,o.prototype.delete=r,o.prototype.get=n,o.prototype.has=i,o.prototype.set=a,ev=o,ev}var tv,PE;function RX(){if(PE)return tv;PE=1;var t="__lodash_hash_undefined__";function e(r){return this.__data__.set(r,t),this}return tv=e,tv}var rv,LE;function IX(){if(LE)return rv;LE=1;function t(e){return this.__data__.has(e)}return rv=t,rv}var nv,NE;function DX(){if(NE)return nv;NE=1;var t=bb(),e=RX(),r=IX();function n(i){var a=-1,o=i==null?0:i.length;for(this.__data__=new t;++a<o;)this.add(i[a])}return n.prototype.add=n.prototype.push=e,n.prototype.has=r,nv=n,nv}var iv,FE;function MX(){if(FE)return iv;FE=1;function t(e,r){for(var n=-1,i=e==null?0:e.length;++n<i;)if(r(e[n],n,e))return!0;return!1}return iv=t,iv}var av,kE;function PX(){if(kE)return av;kE=1;function t(e,r){return e.has(r)}return av=t,av}var ov,jE;function $M(){if(jE)return ov;jE=1;var t=DX(),e=MX(),r=PX(),n=1,i=2;function a(o,s,l,c,d,h){var g=l&n,m=o.length,v=s.length;if(m!=v&&!(g&&v>m))return!1;var _=h.get(o),y=h.get(s);if(_&&y)return _==s&&y==o;var x=-1,w=!0,C=l&i?new t:void 0;for(h.set(o,s),h.set(s,o);++x<m;){var A=o[x],E=s[x];if(c)var S=g?c(E,A,x,s,o,h):c(A,E,x,o,s,h);if(S!==void 0){if(S)continue;w=!1;break}if(C){if(!e(s,function(T,D){if(!r(C,D)&&(A===T||d(A,T,l,c,h)))return C.push(D)})){w=!1;break}}else if(!(A===E||d(A,E,l,c,h))){w=!1;break}}return h.delete(o),h.delete(s),w}return ov=a,ov}var sv,$E;function LX(){if($E)return sv;$E=1;var t=Bi(),e=t.Uint8Array;return sv=e,sv}var uv,UE;function NX(){if(UE)return uv;UE=1;function t(e){var r=-1,n=Array(e.size);return e.forEach(function(i,a){n[++r]=[a,i]}),n}return uv=t,uv}var lv,qE;function FX(){if(qE)return lv;qE=1;function t(e){var r=-1,n=Array(e.size);return e.forEach(function(i){n[++r]=i}),n}return lv=t,lv}var cv,HE;function kX(){if(HE)return cv;HE=1;var t=$d(),e=LX(),r=AM(),n=$M(),i=NX(),a=FX(),o=1,s=2,l="[object Boolean]",c="[object Date]",d="[object Error]",h="[object Map]",g="[object Number]",m="[object RegExp]",v="[object Set]",_="[object String]",y="[object Symbol]",x="[object ArrayBuffer]",w="[object DataView]",C=t?t.prototype:void 0,A=C?C.valueOf:void 0;function E(S,T,D,P,N,F,B){switch(D){case w:if(S.byteLength!=T.byteLength||S.byteOffset!=T.byteOffset)return!1;S=S.buffer,T=T.buffer;case x:return!(S.byteLength!=T.byteLength||!F(new e(S),new e(T)));case l:case c:case g:return r(+S,+T);case d:return S.name==T.name&&S.message==T.message;case m:case _:return S==T+"";case h:var W=i;case v:var te=P&o;if(W||(W=a),S.size!=T.size&&!te)return!1;var J=B.get(S);if(J)return J==T;P|=s,B.set(S,T);var ie=n(W(S),W(T),P,N,F,B);return B.delete(S),ie;case y:if(A)return A.call(S)==A.call(T)}return!1}return cv=E,cv}var fv,WE;function jX(){if(WE)return fv;WE=1;function t(e,r){for(var n=-1,i=r.length,a=e.length;++n<i;)e[a+n]=r[n];return e}return fv=t,fv}var dv,BE;function $X(){if(BE)return dv;BE=1;var t=jX(),e=Oa();function r(n,i,a){var o=i(n);return e(n)?o:t(o,a(n))}return dv=r,dv}var hv,zE;function UX(){if(zE)return hv;zE=1;function t(e,r){for(var n=-1,i=e==null?0:e.length,a=0,o=[];++n<i;){var s=e[n];r(s,n,e)&&(o[a++]=s)}return o}return hv=t,hv}var pv,VE;function qX(){if(VE)return pv;VE=1;function t(){return[]}return pv=t,pv}var gv,GE;function HX(){if(GE)return gv;GE=1;var t=UX(),e=qX(),r=Object.prototype,n=r.propertyIsEnumerable,i=Object.getOwnPropertySymbols,a=i?function(o){return o==null?[]:(o=Object(o),t(i(o),function(s){return n.call(o,s)}))}:e;return gv=a,gv}var mv,KE;function WX(){if(KE)return mv;KE=1;var t=$X(),e=HX(),r=xb();function n(i){return t(i,r,e)}return mv=n,mv}var vv,XE;function BX(){if(XE)return vv;XE=1;var t=WX(),e=1,r=Object.prototype,n=r.hasOwnProperty;function i(a,o,s,l,c,d){var h=s&e,g=t(a),m=g.length,v=t(o),_=v.length;if(m!=_&&!h)return!1;for(var y=m;y--;){var x=g[y];if(!(h?x in o:n.call(o,x)))return!1}var w=d.get(a),C=d.get(o);if(w&&C)return w==o&&C==a;var A=!0;d.set(a,o),d.set(o,a);for(var E=h;++y<m;){x=g[y];var S=a[x],T=o[x];if(l)var D=h?l(T,S,x,o,a,d):l(S,T,x,a,o,d);if(!(D===void 0?S===T||c(S,T,s,l,d):D)){A=!1;break}E||(E=x=="constructor")}if(A&&!E){var P=a.constructor,N=o.constructor;P!=N&&"constructor"in a&&"constructor"in o&&!(typeof P=="function"&&P instanceof P&&typeof N=="function"&&N instanceof N)&&(A=!1)}return d.delete(a),d.delete(o),A}return vv=i,vv}var yv,YE;function zX(){if(YE)return yv;YE=1;var t=wo(),e=Bi(),r=t(e,"DataView");return yv=r,yv}var bv,ZE;function VX(){if(ZE)return bv;ZE=1;var t=wo(),e=Bi(),r=t(e,"Promise");return bv=r,bv}var _v,JE;function GX(){if(JE)return _v;JE=1;var t=wo(),e=Bi(),r=t(e,"Set");return _v=r,_v}var xv,QE;function KX(){if(QE)return xv;QE=1;var t=wo(),e=Bi(),r=t(e,"WeakMap");return xv=r,xv}var wv,eO;function XX(){if(eO)return wv;eO=1;var t=zX(),e=yb(),r=VX(),n=GX(),i=KX(),a=Zu(),o=OM(),s="[object Map]",l="[object Object]",c="[object Promise]",d="[object Set]",h="[object WeakMap]",g="[object DataView]",m=o(t),v=o(e),_=o(r),y=o(n),x=o(i),w=a;return(t&&w(new t(new ArrayBuffer(1)))!=g||e&&w(new e)!=s||r&&w(r.resolve())!=c||n&&w(new n)!=d||i&&w(new i)!=h)&&(w=function(C){var A=a(C),E=A==l?C.constructor:void 0,S=E?o(E):"";if(S)switch(S){case m:return g;case v:return s;case _:return c;case y:return d;case x:return h}return A}),wv=w,wv}var Tv,tO;function YX(){if(tO)return Tv;tO=1;var t=jM(),e=$M(),r=kX(),n=BX(),i=XX(),a=Oa(),o=NM(),s=FM(),l=1,c="[object Arguments]",d="[object Array]",h="[object Object]",g=Object.prototype,m=g.hasOwnProperty;function v(_,y,x,w,C,A){var E=a(_),S=a(y),T=E?d:i(_),D=S?d:i(y);T=T==c?h:T,D=D==c?h:D;var P=T==h,N=D==h,F=T==D;if(F&&o(_)){if(!o(y))return!1;E=!0,P=!1}if(F&&!P)return A||(A=new t),E||s(_)?e(_,y,x,w,C,A):r(_,y,T,x,w,C,A);if(!(x&l)){var B=P&&m.call(_,"__wrapped__"),W=N&&m.call(y,"__wrapped__");if(B||W){var te=B?_.value():_,J=W?y.value():y;return A||(A=new t),C(te,J,x,w,A)}}return F?(A||(A=new t),n(_,y,x,w,C,A)):!1}return Tv=v,Tv}var Sv,rO;function UM(){if(rO)return Sv;rO=1;var t=YX(),e=Ju();function r(n,i,a,o,s){return n===i?!0:n==null||i==null||!e(n)&&!e(i)?n!==n&&i!==i:t(n,i,a,o,r,s)}return Sv=r,Sv}var Cv,nO;function ZX(){if(nO)return Cv;nO=1;var t=jM(),e=UM(),r=1,n=2;function i(a,o,s,l){var c=s.length,d=c,h=!l;if(a==null)return!d;for(a=Object(a);c--;){var g=s[c];if(h&&g[2]?g[1]!==a[g[0]]:!(g[0]in a))return!1}for(;++c<d;){g=s[c];var m=g[0],v=a[m],_=g[1];if(h&&g[2]){if(v===void 0&&!(m in a))return!1}else{var y=new t;if(l)var x=l(v,_,m,a,o,y);if(!(x===void 0?e(_,v,r|n,l,y):x))return!1}}return!0}return Cv=i,Cv}var Ev,iO;function qM(){if(iO)return Ev;iO=1;var t=vb();function e(r){return r===r&&!t(r)}return Ev=e,Ev}var Ov,aO;function JX(){if(aO)return Ov;aO=1;var t=qM(),e=xb();function r(n){for(var i=e(n),a=i.length;a--;){var o=i[a],s=n[o];i[a]=[o,s,t(s)]}return i}return Ov=r,Ov}var Av,oO;function HM(){if(oO)return Av;oO=1;function t(e,r){return function(n){return n==null?!1:n[e]===r&&(r!==void 0||e in Object(n))}}return Av=t,Av}var Rv,sO;function QX(){if(sO)return Rv;sO=1;var t=ZX(),e=JX(),r=HM();function n(i){var a=e(i);return a.length==1&&a[0][2]?r(a[0][0],a[0][1]):function(o){return o===i||t(o,i,a)}}return Rv=n,Rv}var Iv,uO;function WM(){if(uO)return Iv;uO=1;var t=RM(),e=Bd();function r(n,i){i=t(i,n);for(var a=0,o=i.length;n!=null&&a<o;)n=n[e(i[a++])];return a&&a==o?n:void 0}return Iv=r,Iv}var Dv,lO;function eY(){if(lO)return Dv;lO=1;var t=WM();function e(r,n,i){var a=r==null?void 0:t(r,n);return a===void 0?i:a}return Dv=e,Dv}var Mv,cO;function tY(){if(cO)return Mv;cO=1;function t(e,r){return e!=null&&r in Object(e)}return Mv=t,Mv}var Pv,fO;function rY(){if(fO)return Pv;fO=1;var t=tY(),e=MM();function r(n,i){return n!=null&&e(n,i,t)}return Pv=r,Pv}var Lv,dO;function nY(){if(dO)return Lv;dO=1;var t=UM(),e=eY(),r=rY(),n=mb(),i=qM(),a=HM(),o=Bd(),s=1,l=2;function c(d,h){return n(d)&&i(h)?a(o(d),h):function(g){var m=e(g,d);return m===void 0&&m===h?r(g,d):t(h,m,s|l)}}return Lv=c,Lv}var Nv,hO;function iY(){if(hO)return Nv;hO=1;function t(e){return e}return Nv=t,Nv}var Fv,pO;function aY(){if(pO)return Fv;pO=1;function t(e){return function(r){return r==null?void 0:r[e]}}return Fv=t,Fv}var kv,gO;function oY(){if(gO)return kv;gO=1;var t=WM();function e(r){return function(n){return t(n,r)}}return kv=e,kv}var jv,mO;function sY(){if(mO)return jv;mO=1;var t=aY(),e=oY(),r=mb(),n=Bd();function i(a){return r(a)?t(n(a)):e(a)}return jv=i,jv}var $v,vO;function BM(){if(vO)return $v;vO=1;var t=QX(),e=nY(),r=iY(),n=Oa(),i=sY();function a(o){return typeof o=="function"?o:o==null?r:typeof o=="object"?n(o)?e(o[0],o[1]):t(o):i(o)}return $v=a,$v}var Uv,yO;function uY(){if(yO)return Uv;yO=1;var t=LM(),e=kM(),r=BM();function n(i,a){var o={};return a=r(a,3),e(i,function(s,l,c){t(o,l,a(s,l,c))}),o}return Uv=n,Uv}var lY=uY();const zM=gi(lY);var qv,bO;function cY(){if(bO)return qv;bO=1;function t(x){this._maxSize=x,this.clear()}t.prototype.clear=function(){this._size=0,this._values=Object.create(null)},t.prototype.get=function(x){return this._values[x]},t.prototype.set=function(x,w){return this._size>=this._maxSize&&this.clear(),x in this._values||this._size++,this._values[x]=w};var e=/[^.^\]^[]+|(?=\[\]|\.\.)/g,r=/^\d+$/,n=/^\d/,i=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,a=/^\s*(['"]?)(.*?)(\1)\s*$/,o=512,s=new t(o),l=new t(o),c=new t(o);qv={Cache:t,split:h,normalizePath:d,setter:function(x){var w=d(x);return l.get(x)||l.set(x,function(A,E){for(var S=0,T=w.length,D=A;S<T-1;){var P=w[S];if(P==="__proto__"||P==="constructor"||P==="prototype")return A;D=D[w[S++]]}D[w[S]]=E})},getter:function(x,w){var C=d(x);return c.get(x)||c.set(x,function(E){for(var S=0,T=C.length;S<T;)if(E!=null||!w)E=E[C[S++]];else return;return E})},join:function(x){return x.reduce(function(w,C){return w+(m(C)||r.test(C)?"["+C+"]":(w?".":"")+C)},"")},forEach:function(x,w,C){g(Array.isArray(x)?x:h(x),w,C)}};function d(x){return s.get(x)||s.set(x,h(x).map(function(w){return w.replace(a,"$2")}))}function h(x){return x.match(e)||[""]}function g(x,w,C){var A=x.length,E,S,T,D;for(S=0;S<A;S++)E=x[S],E&&(y(E)&&(E='"'+E+'"'),D=m(E),T=!D&&/^\d+$/.test(E),w.call(C,E,D,T,S,x))}function m(x){return typeof x=="string"&&x&&["'",'"'].indexOf(x.charAt(0))!==-1}function v(x){return x.match(n)&&!x.match(r)}function _(x){return i.test(x)}function y(x){return!m(x)&&(v(x)||_(x))}return qv}var zd=cY();const Gc={context:"$",value:"."};function fY(t,e){return new Fi(t,e)}class Fi{constructor(e,r={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,typeof e!="string")throw new TypeError("ref must be a string, got: "+e);if(this.key=e.trim(),e==="")throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===Gc.context,this.isValue=this.key[0]===Gc.value,this.isSibling=!this.isContext&&!this.isValue;let n=this.isContext?Gc.context:this.isValue?Gc.value:"";this.path=this.key.slice(n.length),this.getter=this.path&&zd.getter(this.path,!0),this.map=r.map}getValue(e,r,n){let i=this.isContext?n:this.isValue?e:r;return this.getter&&(i=this.getter(i||{})),this.map&&(i=this.map(i)),i}cast(e,r){return this.getValue(e,r==null?void 0:r.parent,r==null?void 0:r.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(e){return e&&e.__isYupRef}}Fi.prototype.__isYupRef=!0;function td(){return td=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},td.apply(this,arguments)}function dY(t,e){if(t==null)return{};var r={},n=Object.keys(t),i,a;for(a=0;a<n.length;a++)i=n[a],!(e.indexOf(i)>=0)&&(r[i]=t[i]);return r}function Kc(t){function e(r,n){let{value:i,path:a="",label:o,options:s,originalValue:l,sync:c}=r,d=dY(r,["value","path","label","options","originalValue","sync"]);const{name:h,test:g,params:m,message:v}=t;let{parent:_,context:y}=s;function x(S){return Fi.isRef(S)?S.getValue(i,_,y):S}function w(S={}){const T=zM(td({value:i,originalValue:l,label:o,path:S.path||a},m,S.params),x),D=new Vr(Vr.formatError(S.message||v,T),i,T.path,S.type||h);return D.params=T,D}let C=td({path:a,parent:_,type:h,createError:w,resolve:x,options:s,originalValue:l},d);if(!c){try{Promise.resolve(g.call(C,i,C)).then(S=>{Vr.isError(S)?n(S):S?n(null,S):n(w())}).catch(n)}catch(S){n(S)}return}let A;try{var E;if(A=g.call(C,i,C),typeof((E=A)==null?void 0:E.then)=="function")throw new Error(`Validation test of type: "${C.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`)}catch(S){n(S);return}Vr.isError(A)?n(A):A?n(null,A):n(w())}return e.OPTIONS=t,e}let hY=t=>t.substr(0,t.length-1).substr(1);function VM(t,e,r,n=r){let i,a,o;return e?(zd.forEach(e,(s,l,c)=>{let d=l?hY(s):s;if(t=t.resolve({context:n,parent:i,value:r}),t.innerType){let h=c?parseInt(d,10):0;if(r&&h>=r.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${s}, in the path: ${e}. because there is no value at that index. `);i=r,r=r&&r[h],t=t.innerType}if(!c){if(!t.fields||!t.fields[d])throw new Error(`The schema does not contain the path: ${e}. (failed at: ${o} which is a type: "${t._type}")`);i=r,r=r&&r[d],t=t.fields[d]}a=d,o=l?"["+s+"]":"."+s}),{schema:t,parent:i,parentPath:a}):{parent:i,parentPath:e,schema:t}}const pY=(t,e,r,n)=>VM(t,e,r,n).schema;class rd{constructor(){this.list=void 0,this.refs=void 0,this.list=new Set,this.refs=new Map}get size(){return this.list.size+this.refs.size}describe(){const e=[];for(const r of this.list)e.push(r);for(const[,r]of this.refs)e.push(r.describe());return e}toArray(){return Array.from(this.list).concat(Array.from(this.refs.values()))}resolveAll(e){return this.toArray().reduce((r,n)=>r.concat(Fi.isRef(n)?e(n):n),[])}add(e){Fi.isRef(e)?this.refs.set(e.key,e):this.list.add(e)}delete(e){Fi.isRef(e)?this.refs.delete(e.key):this.list.delete(e)}clone(){const e=new rd;return e.list=new Set(this.list),e.refs=new Map(this.refs),e}merge(e,r){const n=this.clone();return e.list.forEach(i=>n.add(i)),e.refs.forEach(i=>n.add(i)),r.list.forEach(i=>n.delete(i)),r.refs.forEach(i=>n.delete(i)),n}}function jn(){return jn=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},jn.apply(this,arguments)}class Ar{constructor(e){this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this._typeError=void 0,this._whitelist=new rd,this._blacklist=new rd,this.exclusiveTests=Object.create(null),this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(Ka.notType)}),this.type=(e==null?void 0:e.type)||"mixed",this.spec=jn({strip:!1,strict:!1,abortEarly:!0,recursive:!0,nullable:!1,presence:"optional"},e==null?void 0:e.spec)}get _type(){return this.type}_typeCheck(e){return!0}clone(e){if(this._mutate)return e&&Object.assign(this.spec,e),this;const r=Object.create(Object.getPrototypeOf(this));return r.type=this.type,r._typeError=this._typeError,r._whitelistError=this._whitelistError,r._blacklistError=this._blacklistError,r._whitelist=this._whitelist.clone(),r._blacklist=this._blacklist.clone(),r.exclusiveTests=jn({},this.exclusiveTests),r.deps=[...this.deps],r.conditions=[...this.conditions],r.tests=[...this.tests],r.transforms=[...this.transforms],r.spec=Gy(jn({},this.spec,e)),r}label(e){let r=this.clone();return r.spec.label=e,r}meta(...e){if(e.length===0)return this.spec.meta;let r=this.clone();return r.spec.meta=Object.assign(r.spec.meta||{},e[0]),r}withMutation(e){let r=this._mutate;this._mutate=!0;let n=e(this);return this._mutate=r,n}concat(e){if(!e||e===this)return this;if(e.type!==this.type&&this.type!=="mixed")throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${e.type}`);let r=this,n=e.clone();const i=jn({},r.spec,n.spec);return n.spec=i,n._typeError||(n._typeError=r._typeError),n._whitelistError||(n._whitelistError=r._whitelistError),n._blacklistError||(n._blacklistError=r._blacklistError),n._whitelist=r._whitelist.merge(e._whitelist,e._blacklist),n._blacklist=r._blacklist.merge(e._blacklist,e._whitelist),n.tests=r.tests,n.exclusiveTests=r.exclusiveTests,n.withMutation(a=>{e.tests.forEach(o=>{a.test(o.OPTIONS)})}),n.transforms=[...r.transforms,...n.transforms],n}isType(e){return this.spec.nullable&&e===null?!0:this._typeCheck(e)}resolve(e){let r=this;if(r.conditions.length){let n=r.conditions;r=r.clone(),r.conditions=[],r=n.reduce((i,a)=>a.resolve(i,e),r),r=r.resolve(e)}return r}cast(e,r={}){let n=this.resolve(jn({value:e},r)),i=n._cast(e,r);if(e!==void 0&&r.assert!==!1&&n.isType(i)!==!0){let a=ds(e),o=ds(i);throw new TypeError(`The value of ${r.path||"field"} could not be cast to a value that satisfies the schema type: "${n._type}".
|
|
76
|
+
|
|
77
|
+
attempted value: ${a}
|
|
78
|
+
`+(o!==a?`result of cast: ${o}`:""))}return i}_cast(e,r){let n=e===void 0?e:this.transforms.reduce((i,a)=>a.call(this,i,e,this),e);return n===void 0&&(n=this.getDefault()),n}_validate(e,r={},n){let{sync:i,path:a,from:o=[],originalValue:s=e,strict:l=this.spec.strict,abortEarly:c=this.spec.abortEarly}=r,d=e;l||(d=this._cast(d,jn({assert:!1},r)));let h={value:d,path:a,options:r,originalValue:s,schema:this,label:this.spec.label,sync:i,from:o},g=[];this._typeError&&g.push(this._typeError);let m=[];this._whitelistError&&m.push(this._whitelistError),this._blacklistError&&m.push(this._blacklistError),ed({args:h,value:d,path:a,tests:g,endEarly:c},v=>{if(v)return void n(v,d);ed({tests:this.tests.concat(m),args:h,path:a,sync:i,value:d,endEarly:c},n)})}validate(e,r,n){let i=this.resolve(jn({},r,{value:e}));return typeof n=="function"?i._validate(e,r,n):new Promise((a,o)=>i._validate(e,r,(s,l)=>{s?o(s):a(l)}))}validateSync(e,r){let n=this.resolve(jn({},r,{value:e})),i;return n._validate(e,jn({},r,{sync:!0}),(a,o)=>{if(a)throw a;i=o}),i}isValid(e,r){return this.validate(e,r).then(()=>!0,n=>{if(Vr.isError(n))return!1;throw n})}isValidSync(e,r){try{return this.validateSync(e,r),!0}catch(n){if(Vr.isError(n))return!1;throw n}}_getDefault(){let e=this.spec.default;return e==null?e:typeof e=="function"?e.call(this):Gy(e)}getDefault(e){return this.resolve(e||{})._getDefault()}default(e){return arguments.length===0?this._getDefault():this.clone({default:e})}strict(e=!0){let r=this.clone();return r.spec.strict=e,r}_isPresent(e){return e!=null}defined(e=Ka.defined){return this.test({message:e,name:"defined",exclusive:!0,test(r){return r!==void 0}})}required(e=Ka.required){return this.clone({presence:"required"}).withMutation(r=>r.test({message:e,name:"required",exclusive:!0,test(n){return this.schema._isPresent(n)}}))}notRequired(){let e=this.clone({presence:"optional"});return e.tests=e.tests.filter(r=>r.OPTIONS.name!=="required"),e}nullable(e=!0){return this.clone({nullable:e!==!1})}transform(e){let r=this.clone();return r.transforms.push(e),r}test(...e){let r;if(e.length===1?typeof e[0]=="function"?r={test:e[0]}:r=e[0]:e.length===2?r={name:e[0],test:e[1]}:r={name:e[0],message:e[1],test:e[2]},r.message===void 0&&(r.message=Ka.default),typeof r.test!="function")throw new TypeError("`test` is a required parameters");let n=this.clone(),i=Kc(r),a=r.exclusive||r.name&&n.exclusiveTests[r.name]===!0;if(r.exclusive&&!r.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return r.name&&(n.exclusiveTests[r.name]=!!r.exclusive),n.tests=n.tests.filter(o=>!(o.OPTIONS.name===r.name&&(a||o.OPTIONS.test===i.OPTIONS.test))),n.tests.push(i),n}when(e,r){!Array.isArray(e)&&typeof e!="string"&&(r=e,e=".");let n=this.clone(),i=PM(e).map(a=>new Fi(a));return i.forEach(a=>{a.isSibling&&n.deps.push(a.key)}),n.conditions.push(new sX(i,r)),n}typeError(e){let r=this.clone();return r._typeError=Kc({message:e,name:"typeError",test(n){return n!==void 0&&!this.schema.isType(n)?this.createError({params:{type:this.schema._type}}):!0}}),r}oneOf(e,r=Ka.oneOf){let n=this.clone();return e.forEach(i=>{n._whitelist.add(i),n._blacklist.delete(i)}),n._whitelistError=Kc({message:r,name:"oneOf",test(i){if(i===void 0)return!0;let a=this.schema._whitelist,o=a.resolveAll(this.resolve);return o.includes(i)?!0:this.createError({params:{values:a.toArray().join(", "),resolved:o}})}}),n}notOneOf(e,r=Ka.notOneOf){let n=this.clone();return e.forEach(i=>{n._blacklist.add(i),n._whitelist.delete(i)}),n._blacklistError=Kc({message:r,name:"notOneOf",test(i){let a=this.schema._blacklist,o=a.resolveAll(this.resolve);return o.includes(i)?this.createError({params:{values:a.toArray().join(", "),resolved:o}}):!0}}),n}strip(e=!0){let r=this.clone();return r.spec.strip=e,r}describe(){const e=this.clone(),{label:r,meta:n}=e.spec;return{meta:n,label:r,type:e.type,oneOf:e._whitelist.describe(),notOneOf:e._blacklist.describe(),tests:e.tests.map(a=>({name:a.OPTIONS.name,params:a.OPTIONS.params})).filter((a,o,s)=>s.findIndex(l=>l.name===a.name)===o)}}}Ar.prototype.__isYupSchema__=!0;for(const t of["validate","validateSync"])Ar.prototype[`${t}At`]=function(e,r,n={}){const{parent:i,parentPath:a,schema:o}=VM(this,e,r,n.context);return o[t](i&&i[a],jn({},n,{parent:i,path:e}))};for(const t of["equals","is"])Ar.prototype[t]=Ar.prototype.oneOf;for(const t of["not","nope"])Ar.prototype[t]=Ar.prototype.notOneOf;Ar.prototype.optional=Ar.prototype.notRequired;const wb=Ar;function GM(){return new wb}GM.prototype=wb.prototype;const rr=t=>t==null;function Jy(){return new Tb}class Tb extends Ar{constructor(){super({type:"boolean"}),this.withMutation(()=>{this.transform(function(e){if(!this.isType(e)){if(/^(true|1)$/i.test(String(e)))return!0;if(/^(false|0)$/i.test(String(e)))return!1}return e})})}_typeCheck(e){return e instanceof Boolean&&(e=e.valueOf()),typeof e=="boolean"}isTrue(e=Xy.isValue){return this.test({message:e,name:"is-value",exclusive:!0,params:{value:"true"},test(r){return rr(r)||r===!0}})}isFalse(e=Xy.isValue){return this.test({message:e,name:"is-value",exclusive:!0,params:{value:"false"},test(r){return rr(r)||r===!1}})}}Jy.prototype=Tb.prototype;let gY=/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i,mY=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,vY=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,yY=t=>rr(t)||t===t.trim(),bY={}.toString();function Sb(){return new Cb}class Cb extends Ar{constructor(){super({type:"string"}),this.withMutation(()=>{this.transform(function(e){if(this.isType(e)||Array.isArray(e))return e;const r=e!=null&&e.toString?e.toString():e;return r===bY?e:r})})}_typeCheck(e){return e instanceof String&&(e=e.valueOf()),typeof e=="string"}_isPresent(e){return super._isPresent(e)&&!!e.length}length(e,r=Yn.length){return this.test({message:r,name:"length",exclusive:!0,params:{length:e},test(n){return rr(n)||n.length===this.resolve(e)}})}min(e,r=Yn.min){return this.test({message:r,name:"min",exclusive:!0,params:{min:e},test(n){return rr(n)||n.length>=this.resolve(e)}})}max(e,r=Yn.max){return this.test({name:"max",exclusive:!0,message:r,params:{max:e},test(n){return rr(n)||n.length<=this.resolve(e)}})}matches(e,r){let n=!1,i,a;return r&&(typeof r=="object"?{excludeEmptyString:n=!1,message:i,name:a}=r:i=r),this.test({name:a||"matches",message:i||Yn.matches,params:{regex:e},test:o=>rr(o)||o===""&&n||o.search(e)!==-1})}email(e=Yn.email){return this.matches(gY,{name:"email",message:e,excludeEmptyString:!0})}url(e=Yn.url){return this.matches(mY,{name:"url",message:e,excludeEmptyString:!0})}uuid(e=Yn.uuid){return this.matches(vY,{name:"uuid",message:e,excludeEmptyString:!1})}ensure(){return this.default("").transform(e=>e===null?"":e)}trim(e=Yn.trim){return this.transform(r=>r!=null?r.trim():r).test({message:e,name:"trim",test:yY})}lowercase(e=Yn.lowercase){return this.transform(r=>rr(r)?r:r.toLowerCase()).test({message:e,name:"string_case",exclusive:!0,test:r=>rr(r)||r===r.toLowerCase()})}uppercase(e=Yn.uppercase){return this.transform(r=>rr(r)?r:r.toUpperCase()).test({message:e,name:"string_case",exclusive:!0,test:r=>rr(r)||r===r.toUpperCase()})}}Sb.prototype=Cb.prototype;let _Y=t=>t!=+t;function KM(){return new Eb}class Eb extends Ar{constructor(){super({type:"number"}),this.withMutation(()=>{this.transform(function(e){let r=e;if(typeof r=="string"){if(r=r.replace(/\s/g,""),r==="")return NaN;r=+r}return this.isType(r)?r:parseFloat(r)})})}_typeCheck(e){return e instanceof Number&&(e=e.valueOf()),typeof e=="number"&&!_Y(e)}min(e,r=la.min){return this.test({message:r,name:"min",exclusive:!0,params:{min:e},test(n){return rr(n)||n>=this.resolve(e)}})}max(e,r=la.max){return this.test({message:r,name:"max",exclusive:!0,params:{max:e},test(n){return rr(n)||n<=this.resolve(e)}})}lessThan(e,r=la.lessThan){return this.test({message:r,name:"max",exclusive:!0,params:{less:e},test(n){return rr(n)||n<this.resolve(e)}})}moreThan(e,r=la.moreThan){return this.test({message:r,name:"min",exclusive:!0,params:{more:e},test(n){return rr(n)||n>this.resolve(e)}})}positive(e=la.positive){return this.moreThan(0,e)}negative(e=la.negative){return this.lessThan(0,e)}integer(e=la.integer){return this.test({name:"integer",message:e,test:r=>rr(r)||Number.isInteger(r)})}truncate(){return this.transform(e=>rr(e)?e:e|0)}round(e){var r;let n=["ceil","floor","round","trunc"];if(e=((r=e)==null?void 0:r.toLowerCase())||"round",e==="trunc")return this.truncate();if(n.indexOf(e.toLowerCase())===-1)throw new TypeError("Only valid options for round() are: "+n.join(", "));return this.transform(i=>rr(i)?i:Math[e](i))}}KM.prototype=Eb.prototype;var xY=/^(\d{4}|[+\-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,\.](\d{1,}))?)?(?:(Z)|([+\-])(\d{2})(?::?(\d{2}))?)?)?$/;function wY(t){var e=[1,4,5,6,7,10,11],r=0,n,i;if(i=xY.exec(t)){for(var a=0,o;o=e[a];++a)i[o]=+i[o]||0;i[2]=(+i[2]||1)-1,i[3]=+i[3]||1,i[7]=i[7]?String(i[7]).substr(0,3):0,(i[8]===void 0||i[8]==="")&&(i[9]===void 0||i[9]==="")?n=+new Date(i[1],i[2],i[3],i[4],i[5],i[6],i[7]):(i[8]!=="Z"&&i[9]!==void 0&&(r=i[10]*60+i[11],i[9]==="+"&&(r=0-r)),n=Date.UTC(i[1],i[2],i[3],i[4],i[5]+r,i[6],i[7]))}else n=Date.parse?Date.parse(t):NaN;return n}let Ob=new Date(""),TY=t=>Object.prototype.toString.call(t)==="[object Date]";function Ab(){return new Vd}class Vd extends Ar{constructor(){super({type:"date"}),this.withMutation(()=>{this.transform(function(e){return this.isType(e)?e:(e=wY(e),isNaN(e)?Ob:new Date(e))})})}_typeCheck(e){return TY(e)&&!isNaN(e.getTime())}prepareParam(e,r){let n;if(Fi.isRef(e))n=e;else{let i=this.cast(e);if(!this._typeCheck(i))throw new TypeError(`\`${r}\` must be a Date or a value that can be \`cast()\` to a Date`);n=i}return n}min(e,r=Ky.min){let n=this.prepareParam(e,"min");return this.test({message:r,name:"min",exclusive:!0,params:{min:e},test(i){return rr(i)||i>=this.resolve(n)}})}max(e,r=Ky.max){let n=this.prepareParam(e,"max");return this.test({message:r,name:"max",exclusive:!0,params:{max:e},test(i){return rr(i)||i<=this.resolve(n)}})}}Vd.INVALID_DATE=Ob;Ab.prototype=Vd.prototype;Ab.INVALID_DATE=Ob;var Hv,_O;function SY(){if(_O)return Hv;_O=1;function t(e,r,n,i){var a=-1,o=e==null?0:e.length;for(i&&o&&(n=e[++a]);++a<o;)n=r(n,e[a],a,e);return n}return Hv=t,Hv}var Wv,xO;function CY(){if(xO)return Wv;xO=1;function t(e){return function(r){return e==null?void 0:e[r]}}return Wv=t,Wv}var Bv,wO;function EY(){if(wO)return Bv;wO=1;var t=CY(),e={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},r=t(e);return Bv=r,Bv}var zv,TO;function OY(){if(TO)return zv;TO=1;var t=EY(),e=Qu(),r=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,n="\\u0300-\\u036f",i="\\ufe20-\\ufe2f",a="\\u20d0-\\u20ff",o=n+i+a,s="["+o+"]",l=RegExp(s,"g");function c(d){return d=e(d),d&&d.replace(r,t).replace(l,"")}return zv=c,zv}var Vv,SO;function AY(){if(SO)return Vv;SO=1;var t=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function e(r){return r.match(t)||[]}return Vv=e,Vv}var Gv,CO;function RY(){if(CO)return Gv;CO=1;var t=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function e(r){return t.test(r)}return Gv=e,Gv}var Kv,EO;function IY(){if(EO)return Kv;EO=1;var t="\\ud800-\\udfff",e="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",i=e+r+n,a="\\u2700-\\u27bf",o="a-z\\xdf-\\xf6\\xf8-\\xff",s="\\xac\\xb1\\xd7\\xf7",l="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",c="\\u2000-\\u206f",d=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",h="A-Z\\xc0-\\xd6\\xd8-\\xde",g="\\ufe0e\\ufe0f",m=s+l+c+d,v="['’]",_="["+m+"]",y="["+i+"]",x="\\d+",w="["+a+"]",C="["+o+"]",A="[^"+t+m+x+a+o+h+"]",E="\\ud83c[\\udffb-\\udfff]",S="(?:"+y+"|"+E+")",T="[^"+t+"]",D="(?:\\ud83c[\\udde6-\\uddff]){2}",P="[\\ud800-\\udbff][\\udc00-\\udfff]",N="["+h+"]",F="\\u200d",B="(?:"+C+"|"+A+")",W="(?:"+N+"|"+A+")",te="(?:"+v+"(?:d|ll|m|re|s|t|ve))?",J="(?:"+v+"(?:D|LL|M|RE|S|T|VE))?",ie=S+"?",le="["+g+"]?",se="(?:"+F+"(?:"+[T,D,P].join("|")+")"+le+ie+")*",ce="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Q="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",$=le+ie+se,X="(?:"+[w,D,P].join("|")+")"+$,Z=RegExp([N+"?"+C+"+"+te+"(?="+[_,N,"$"].join("|")+")",W+"+"+J+"(?="+[_,N+B,"$"].join("|")+")",N+"?"+B+"+"+te,N+"+"+J,Q,ce,x,X].join("|"),"g");function fe(be){return be.match(Z)||[]}return Kv=fe,Kv}var Xv,OO;function DY(){if(OO)return Xv;OO=1;var t=AY(),e=RY(),r=Qu(),n=IY();function i(a,o,s){return a=r(a),o=s?void 0:o,o===void 0?e(a)?n(a):t(a):a.match(o)||[]}return Xv=i,Xv}var Yv,AO;function XM(){if(AO)return Yv;AO=1;var t=SY(),e=OY(),r=DY(),n="['’]",i=RegExp(n,"g");function a(o){return function(s){return t(r(e(s).replace(i,"")),o,"")}}return Yv=a,Yv}var Zv,RO;function MY(){if(RO)return Zv;RO=1;var t=XM(),e=t(function(r,n,i){return r+(i?"_":"")+n.toLowerCase()});return Zv=e,Zv}var PY=MY();const IO=gi(PY);var Jv,DO;function LY(){if(DO)return Jv;DO=1;function t(e,r,n){var i=-1,a=e.length;r<0&&(r=-r>a?0:a+r),n=n>a?a:n,n<0&&(n+=a),a=r>n?0:n-r>>>0,r>>>=0;for(var o=Array(a);++i<a;)o[i]=e[i+r];return o}return Jv=t,Jv}var Qv,MO;function NY(){if(MO)return Qv;MO=1;var t=LY();function e(r,n,i){var a=r.length;return i=i===void 0?a:i,!n&&i>=a?r:t(r,n,i)}return Qv=e,Qv}var ey,PO;function YM(){if(PO)return ey;PO=1;var t="\\ud800-\\udfff",e="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",i=e+r+n,a="\\ufe0e\\ufe0f",o="\\u200d",s=RegExp("["+o+t+i+a+"]");function l(c){return s.test(c)}return ey=l,ey}var ty,LO;function FY(){if(LO)return ty;LO=1;function t(e){return e.split("")}return ty=t,ty}var ry,NO;function kY(){if(NO)return ry;NO=1;var t="\\ud800-\\udfff",e="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",i=e+r+n,a="\\ufe0e\\ufe0f",o="["+t+"]",s="["+i+"]",l="\\ud83c[\\udffb-\\udfff]",c="(?:"+s+"|"+l+")",d="[^"+t+"]",h="(?:\\ud83c[\\udde6-\\uddff]){2}",g="[\\ud800-\\udbff][\\udc00-\\udfff]",m="\\u200d",v=c+"?",_="["+a+"]?",y="(?:"+m+"(?:"+[d,h,g].join("|")+")"+_+v+")*",x=_+v+y,w="(?:"+[d+s+"?",s,h,g,o].join("|")+")",C=RegExp(l+"(?="+l+")|"+w+x,"g");function A(E){return E.match(C)||[]}return ry=A,ry}var ny,FO;function jY(){if(FO)return ny;FO=1;var t=FY(),e=YM(),r=kY();function n(i){return e(i)?r(i):t(i)}return ny=n,ny}var iy,kO;function $Y(){if(kO)return iy;kO=1;var t=NY(),e=YM(),r=jY(),n=Qu();function i(a){return function(o){o=n(o);var s=e(o)?r(o):void 0,l=s?s[0]:o.charAt(0),c=s?t(s,1).join(""):o.slice(1);return l[a]()+c}}return iy=i,iy}var ay,jO;function UY(){if(jO)return ay;jO=1;var t=$Y(),e=t("toUpperCase");return ay=e,ay}var oy,$O;function qY(){if($O)return oy;$O=1;var t=Qu(),e=UY();function r(n){return e(t(n).toLowerCase())}return oy=r,oy}var sy,UO;function HY(){if(UO)return sy;UO=1;var t=qY(),e=XM(),r=e(function(n,i,a){return i=i.toLowerCase(),n+(a?t(i):i)});return sy=r,sy}var WY=HY();const BY=gi(WY);var uy,qO;function zY(){if(qO)return uy;qO=1;var t=LM(),e=kM(),r=BM();function n(i,a){var o={};return a=r(a,3),e(i,function(s,l,c){t(o,a(s,l,c),s)}),o}return uy=n,uy}var VY=zY();const GY=gi(VY);var Xc={exports:{}},HO;function KY(){if(HO)return Xc.exports;HO=1,Xc.exports=function(i){return t(e(i),i)},Xc.exports.array=t;function t(i,a){var o=i.length,s=new Array(o),l={},c=o,d=r(a),h=n(i);for(a.forEach(function(m){if(!h.has(m[0])||!h.has(m[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});c--;)l[c]||g(i[c],c,new Set);return s;function g(m,v,_){if(_.has(m)){var y;try{y=", node was:"+JSON.stringify(m)}catch{y=""}throw new Error("Cyclic dependency"+y)}if(!h.has(m))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(m));if(!l[v]){l[v]=!0;var x=d.get(m)||new Set;if(x=Array.from(x),v=x.length){_.add(m);do{var w=x[--v];g(w,h.get(w),_)}while(v);_.delete(m)}s[--o]=m}}}function e(i){for(var a=new Set,o=0,s=i.length;o<s;o++){var l=i[o];a.add(l[0]),a.add(l[1])}return Array.from(a)}function r(i){for(var a=new Map,o=0,s=i.length;o<s;o++){var l=i[o];a.has(l[0])||a.set(l[0],new Set),a.has(l[1])||a.set(l[1],new Set),a.get(l[0]).add(l[1])}return a}function n(i){for(var a=new Map,o=0,s=i.length;o<s;o++)a.set(i[o],o);return a}return Xc.exports}var XY=KY();const YY=gi(XY);function ZY(t,e=[]){let r=[],n=new Set,i=new Set(e.map(([o,s])=>`${o}-${s}`));function a(o,s){let l=zd.split(o)[0];n.add(l),i.has(`${s}-${l}`)||r.push([s,l])}for(const o in t)if(Qf(t,o)){let s=t[o];n.add(o),Fi.isRef(s)&&s.isSibling?a(s.path,o):Cs(s)&&"deps"in s&&s.deps.forEach(l=>a(l,o))}return YY.array(Array.from(n),r).reverse()}function WO(t,e){let r=1/0;return t.some((n,i)=>{var a;if(((a=e.path)==null?void 0:a.indexOf(n))!==-1)return r=i,!0}),r}function ZM(t){return(e,r)=>WO(t,e)-WO(t,r)}function Jo(){return Jo=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Jo.apply(this,arguments)}let BO=t=>Object.prototype.toString.call(t)==="[object Object]";function JY(t,e){let r=Object.keys(t.fields);return Object.keys(e).filter(n=>r.indexOf(n)===-1)}const QY=ZM([]);class Rb extends Ar{constructor(e){super({type:"object"}),this.fields=Object.create(null),this._sortErrors=QY,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{this.transform(function(n){if(typeof n=="string")try{n=JSON.parse(n)}catch{n=null}return this.isType(n)?n:null}),e&&this.shape(e)})}_typeCheck(e){return BO(e)||typeof e=="function"}_cast(e,r={}){var n;let i=super._cast(e,r);if(i===void 0)return this.getDefault();if(!this._typeCheck(i))return i;let a=this.fields,o=(n=r.stripUnknown)!=null?n:this.spec.noUnknown,s=this._nodes.concat(Object.keys(i).filter(h=>this._nodes.indexOf(h)===-1)),l={},c=Jo({},r,{parent:l,__validating:r.__validating||!1}),d=!1;for(const h of s){let g=a[h],m=Qf(i,h);if(g){let v,_=i[h];c.path=(r.path?`${r.path}.`:"")+h,g=g.resolve({value:_,context:r.context,parent:l});let y="spec"in g?g.spec:void 0,x=y==null?void 0:y.strict;if(y!=null&&y.strip){d=d||h in i;continue}v=!r.__validating||!x?g.cast(i[h],c):i[h],v!==void 0&&(l[h]=v)}else m&&!o&&(l[h]=i[h]);l[h]!==i[h]&&(d=!0)}return d?l:i}_validate(e,r={},n){let i=[],{sync:a,from:o=[],originalValue:s=e,abortEarly:l=this.spec.abortEarly,recursive:c=this.spec.recursive}=r;o=[{schema:this,value:s},...o],r.__validating=!0,r.originalValue=s,r.from=o,super._validate(e,r,(d,h)=>{if(d){if(!Vr.isError(d)||l)return void n(d,h);i.push(d)}if(!c||!BO(h)){n(i[0]||null,h);return}s=s||h;let g=this._nodes.map(m=>(v,_)=>{let y=m.indexOf(".")===-1?(r.path?`${r.path}.`:"")+m:`${r.path||""}["${m}"]`,x=this.fields[m];if(x&&"validate"in x){x.validate(h[m],Jo({},r,{path:y,from:o,strict:!0,parent:h,originalValue:s[m]}),_);return}_(null)});ed({tests:g,value:h,errors:i,endEarly:l,sort:this._sortErrors,path:r.path},n)})}clone(e){const r=super.clone(e);return r.fields=Jo({},this.fields),r._nodes=this._nodes,r._excludedEdges=this._excludedEdges,r._sortErrors=this._sortErrors,r}concat(e){let r=super.concat(e),n=r.fields;for(let[i,a]of Object.entries(this.fields)){const o=n[i];o===void 0?n[i]=a:o instanceof Ar&&a instanceof Ar&&(n[i]=a.concat(o))}return r.withMutation(()=>r.shape(n,this._excludedEdges))}getDefaultFromShape(){let e={};return this._nodes.forEach(r=>{const n=this.fields[r];e[r]="default"in n?n.getDefault():void 0}),e}_getDefault(){if("default"in this.spec)return super._getDefault();if(this._nodes.length)return this.getDefaultFromShape()}shape(e,r=[]){let n=this.clone(),i=Object.assign(n.fields,e);return n.fields=i,n._sortErrors=ZM(Object.keys(i)),r.length&&(Array.isArray(r[0])||(r=[r]),n._excludedEdges=[...n._excludedEdges,...r]),n._nodes=ZY(i,n._excludedEdges),n}pick(e){const r={};for(const n of e)this.fields[n]&&(r[n]=this.fields[n]);return this.clone().withMutation(n=>(n.fields={},n.shape(r)))}omit(e){const r=this.clone(),n=r.fields;r.fields={};for(const i of e)delete n[i];return r.withMutation(()=>r.shape(n))}from(e,r,n){let i=zd.getter(e,!0);return this.transform(a=>{if(a==null)return a;let o=a;return Qf(a,e)&&(o=Jo({},a),n||delete o[e],o[r]=i(a)),o})}noUnknown(e=!0,r=Yy.noUnknown){typeof e=="string"&&(r=e,e=!0);let n=this.test({name:"noUnknown",exclusive:!0,message:r,test(i){if(i==null)return!0;const a=JY(this.schema,i);return!e||a.length===0||this.createError({params:{unknown:a.join(", ")}})}});return n.spec.noUnknown=e,n}unknown(e=!0,r=Yy.noUnknown){return this.noUnknown(!e,r)}transformKeys(e){return this.transform(r=>r&&GY(r,(n,i)=>e(i)))}camelCase(){return this.transformKeys(BY)}snakeCase(){return this.transformKeys(IO)}constantCase(){return this.transformKeys(e=>IO(e).toUpperCase())}describe(){let e=super.describe();return e.fields=zM(this.fields,r=>r.describe()),e}}function JM(t){return new Rb(t)}JM.prototype=Rb.prototype;function nd(){return nd=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},nd.apply(this,arguments)}function QM(t){return new Ib(t)}class Ib extends Ar{constructor(e){super({type:"array"}),this.innerType=void 0,this.innerType=e,this.withMutation(()=>{this.transform(function(r){if(typeof r=="string")try{r=JSON.parse(r)}catch{r=null}return this.isType(r)?r:null})})}_typeCheck(e){return Array.isArray(e)}get _subType(){return this.innerType}_cast(e,r){const n=super._cast(e,r);if(!this._typeCheck(n)||!this.innerType)return n;let i=!1;const a=n.map((o,s)=>{const l=this.innerType.cast(o,nd({},r,{path:`${r.path||""}[${s}]`}));return l!==o&&(i=!0),l});return i?a:n}_validate(e,r={},n){var i,a;let o=[];r.sync;let s=r.path,l=this.innerType,c=(i=r.abortEarly)!=null?i:this.spec.abortEarly,d=(a=r.recursive)!=null?a:this.spec.recursive,h=r.originalValue!=null?r.originalValue:e;super._validate(e,r,(g,m)=>{if(g){if(!Vr.isError(g)||c)return void n(g,m);o.push(g)}if(!d||!l||!this._typeCheck(m)){n(o[0]||null,m);return}h=h||m;let v=new Array(m.length);for(let _=0;_<m.length;_++){let y=m[_],x=`${r.path||""}[${_}]`,w=nd({},r,{path:x,strict:!0,parent:m,index:_,originalValue:h[_]});v[_]=(C,A)=>l.validate(y,w,A)}ed({path:s,value:m,errors:o,endEarly:c,tests:v},n)})}clone(e){const r=super.clone(e);return r.innerType=this.innerType,r}concat(e){let r=super.concat(e);return r.innerType=this.innerType,e.innerType&&(r.innerType=r.innerType?r.innerType.concat(e.innerType):e.innerType),r}of(e){let r=this.clone();if(!Cs(e))throw new TypeError("`array.of()` sub-schema must be a valid yup schema not: "+ds(e));return r.innerType=e,r}length(e,r=yf.length){return this.test({message:r,name:"length",exclusive:!0,params:{length:e},test(n){return rr(n)||n.length===this.resolve(e)}})}min(e,r){return r=r||yf.min,this.test({message:r,name:"min",exclusive:!0,params:{min:e},test(n){return rr(n)||n.length>=this.resolve(e)}})}max(e,r){return r=r||yf.max,this.test({message:r,name:"max",exclusive:!0,params:{max:e},test(n){return rr(n)||n.length<=this.resolve(e)}})}ensure(){return this.default(()=>[]).transform((e,r)=>this._typeCheck(e)?e:r==null?[]:[].concat(r))}compact(e){let r=e?(n,i,a)=>!e(n,i,a):n=>!!n;return this.transform(n=>n!=null?n.filter(r):n)}describe(){let e=super.describe();return this.innerType&&(e.innerType=this.innerType.describe()),e}nullable(e=!0){return super.nullable(e)}defined(){return super.defined()}required(e){return super.required(e)}}QM.prototype=Ib.prototype;function eZ(t){return new tZ(t)}class tZ{constructor(e){this.type="lazy",this.__isYupSchema__=!0,this.__inputType=void 0,this.__outputType=void 0,this._resolve=(r,n={})=>{let i=this.builder(r,n);if(!Cs(i))throw new TypeError("lazy() functions must return a valid schema");return i.resolve(n)},this.builder=e}resolve(e){return this._resolve(e.value,e)}cast(e,r){return this._resolve(e,r).cast(e,r)}validate(e,r,n){return this._resolve(e,r).validate(e,r,n)}validateSync(e,r){return this._resolve(e,r).validateSync(e,r)}validateAt(e,r,n){return this._resolve(r,n).validateAt(e,r,n)}validateSyncAt(e,r,n){return this._resolve(r,n).validateSyncAt(e,r,n)}describe(){return null}isValid(e,r){return this._resolve(e,r).isValid(e,r)}isValidSync(e,r){return this._resolve(e,r).isValidSync(e,r)}}function eP(t){Object.keys(t).forEach(e=>{Object.keys(t[e]).forEach(r=>{AK[e][r]=t[e][r]})})}function tP(t,e,r){if(!t||!Cs(t.prototype))throw new TypeError("You must provide a yup schema constructor function");if(typeof e!="string")throw new TypeError("A Method name must be provided");if(typeof r!="function")throw new TypeError("Method function must be provided");t.prototype[e]=r}const zO=Object.freeze(Object.defineProperty({__proto__:null,ArraySchema:Ib,BaseSchema:Ar,BooleanSchema:Tb,DateSchema:Vd,MixedSchema:wb,NumberSchema:Eb,ObjectSchema:Rb,StringSchema:Cb,ValidationError:Vr,addMethod:tP,array:QM,bool:Jy,boolean:Jy,date:Ab,isSchema:Cs,lazy:eZ,mixed:GM,number:KM,object:JM,reach:pY,ref:fY,setLocale:eP,string:Sb},Symbol.toStringTag,{value:"Module"})),rZ={mixed:{required:"validation:required"},string:{email:"validation:invalid_email",max:"validation:maximum_of_characters"}};eP(rZ);const nZ=/^[^\s].*[^\s]$/i;tP(Sb,"noSurroundingSpaces",function(){return this.test("is-string-trimmed","validation:no_surrounding_spaces",t=>!t||mr.isEmpty(t)?!0:t.length<3?/^[\S]*$/i.test(t):nZ.test(t))});const iZ=zO.object({alertThreshold:zO.number().required()}),aZ=({handleClose:t,onUpdate:e,alert:r,t:n})=>{const{enqueueSnackbar:i}=xK(),a=a6(),o=l6(),s=s6(),l=()=>{s.mutate({alertType:sn.CUSTOM,email:C.emailEnabledSubscription,sms:C.smsEnabledSubscription,enrollment:r==null?void 0:r.number,threshold:+C.alertThreshold},{onSuccess:v,onError:y})},c=()=>{a.mutate({alertId:r==null?void 0:r.number,sms:C.smsEnabledSubscription,email:C.emailEnabledSubscription,threshold:+C.alertThreshold},{onSuccess:d,onError:y})},d=()=>{o.mutate({alertId:r.number,alertType:r.alertType,sms:C.smsEnabledSubscription,email:C.emailEnabledSubscription,threshold:+C.alertThreshold,enrollment:r.number},{onSuccess:_,onError:y})},h=()=>{C.alertThreshold!==r.threshold?l():d()},g=()=>{r.alertType===sn.CRITICAL?h():c()},m=(E,S=void 0)=>{const T=new CustomEvent("add-toast",{detail:{id:"custom-alerts-toast",content:$U`
|
|
79
|
+
<style>
|
|
80
|
+
.custom-alerts-toast {
|
|
81
|
+
white-space: nowrap;
|
|
82
|
+
}
|
|
83
|
+
</style>
|
|
84
|
+
<ix-message-toast
|
|
85
|
+
class="custom-alerts-toast"
|
|
86
|
+
toastId="custom-alerts-toast"
|
|
87
|
+
.hasClose=${!1}
|
|
88
|
+
type=${UU(S)}
|
|
89
|
+
>
|
|
90
|
+
${E}
|
|
91
|
+
</ix-message-toast>
|
|
92
|
+
`,autoClose:5e3,vertical:"bottom",horizontal:"center",animated:!0,durationOut:333,above:!1}});window.dispatchEvent(T)},v=()=>{i(n("customize-alert-dialog.success-custom-created"),{variant:"success"}),m("Custom alert created"),e&&e(),t()},_=()=>{i($4(n,r.alertType),{variant:"success"}),m("Custom alert updated"),e&&e(),t()},y=E=>{const S=U4(n,E==null?void 0:E.message);i(S,{variant:"error"}),m("An error occurred, please try again","error"),A(!1)},w=K9({initialValues:{emailEnabledSubscription:r==null?void 0:r.emailEnabledSubscription,smsEnabledSubscription:r==null?void 0:r.smsEnabledSubscription,alertThreshold:(r==null?void 0:r.threshold)||0},onSubmit:g,validationSchema:iZ}),{values:C,setSubmitting:A}=w;return{formik:w,handleSave:g,handleCreateSuccess:v,handleUpdateSuccess:_,handleError:y,createCustomAlert:l,saveCriticalAlert:h}},oZ=({handleClose:t,onUpdate:e,isOpen:r,alert:n})=>{const{t:i}=Qt(["location"]),{formik:a}=aZ({handleClose:t,onUpdate:e,alert:n,t:i}),{values:o,handleSubmit:s,setFieldValue:l,isValid:c,isSubmitting:d,errors:h}=a,g=[{label:i("customize-alert-dialog.cancel-button"),mobileLabel:R.jsx($i,{style:{"--ix-icon-font-size":"24px"},children:"close"}),trigger:t},{label:i("customize-alert-dialog.save-button"),mobileLabel:i("create-button"),trigger:s,disabled:!c,loading:d}];return R.jsx(B9,{value:a,children:R.jsxs(q0,{title:i("customize-alert-dialog.title"),actions:g,open:r,children:[R.jsx(ft,{variant:"body1",style:{color:rt.onSurfaceVariant,margin:0,maxWidth:512},children:i("customize-alert-dialog.message")}),R.jsx(ft,{variant:"body1",style:{margin:"21px 0"},children:i("customize-alert-dialog.it-load-level")}),R.jsx(kU,{id:"alertThreshold",name:"alertThreshold",label:i("customize-alert-dialog.threshold"),prefixText:`${n.functionName} ${n.comparisonOperator}`,value:String(o.alertThreshold??""),onTextInput:m=>l("alertThreshold",jU(m)),error:!!h.alertThreshold}),R.jsx("div",{style:{display:"flex",alignItems:"center",columnGap:25,marginTop:"20px"},children:["emailEnabledSubscription","smsEnabledSubscription"].map(m=>{const v=i(m==="emailEnabledSubscription"?"customize-alert-dialog.email-alerts":"customize-alert-dialog.sms-alerts");return R.jsxs("label",{style:{display:"flex",alignItems:"center",gap:8},children:[R.jsx(GR,{"aria-label":v,id:m,selected:!!o[m],style:{display:"inline-flex"},onSwitchChange:_=>l(m,_.target.selected)}),R.jsx(ft,{variant:"body1",noWrap:!0,children:v})]},m)})}),R.jsx(ft,{variant:"body2",style:{maxWidth:"512px",fontSize:"12px",marginTop:"20px"},children:i("customize-alert-dialog.bottom-message")})]})})},sZ=(t,e=1)=>{if(e>1&&(e=1),t.startsWith("#")){e=Math.floor(255*e);const r=t.split("#").pop(),n=t.substring(0,1),i=e>0?e.toString(16):"FF";return n+(i+r).toUpperCase()}return t.startsWith("rgb")?`rgba(${t.split(/\D/i).filter(Boolean).join(",")},${e})`:t},Qy=(t,e)=>{const r=a=>parseInt(a,16),n=a=>parseInt(a+a,16);t=t.substring(1);const i=(a=255)=>e===void 0?a:e;if(t.length===3){const[a,o,s]=t.match(/\w/g).map(n);return`rgba(${a},${o},${s},${i()})`}if(t.length===4){const[a,o,s,l]=t.match(/\w/g).map(n);return`rgba(${o},${s},${l},${i(a/255)})`}if(t.length===6){const[a,o,s]=t.match(/\w{2}/g).map(r);return`rgba(${a},${o},${s},${i()})`}if(t.length===8){const[a,o,s,l]=t.match(/\w{2}/g).map(r);return`rgba(${o},${s},${l},${i(a/255)})`}return t},VO=(t,e=[])=>Object.entries(t).map(([r,n])=>`${mr.kebabCase(r)}:${n}`).concat(e).join(";"),uZ=(t,e)=>{if(!t)return"transparent";const{ctx:r,chartArea:{height:n}}=t,i=Qy(e,.25),a=Qy(e,0),o=r==null?void 0:r.createLinearGradient(0,0,0,n);return o==null||o.addColorStop(0,i),o==null||o.addColorStop(1,a),o},lZ=(t,{options:e})=>!t||!t.length?[]:t.map(({trendData:r,deviceName:n},i)=>{let a=[];return r.forEach(({pointValue:o,utcPollDateTime:s})=>{const l=cn(s).getTime();a.push({x:l,y:Number(o)})}),a=a.sort((o,s)=>o.x-s.x),{label:n,data:a,hidden:i>0,pointBorderColor:wn.pointBorder,pointRadius:3,animation:{duration:500,easing:"easeInOutCubic"},...e}});var cZ=DD();const fZ=gi(cZ),dZ=(t,e)=>{const r=/\d{4}-\d{2}-\d{2}/;if(t){if(xs(cn(t))&&r.test(String(t)))return t.search(/[a-z]/i)===-1?fZ(new Date(t),e,{timeZone:"UTC"}):MD(new Date(t),"UTC",e)}else return"-";return t},rP=({label:t,value:e})=>{const{dateTimeFormatPreferences:r,getTimeFormatString:n}=Ed(),i=n(!0),a=`${r.preferredDateFormat} ${i} (zzz)`;return R.jsxs(I4,{children:[R.jsx(D4,{variant:"body1","data-testid":`datapoint-label-${t}`,children:t}),R.jsx(P4,{children:R.jsx(M4,{"data-testid":`datapoint-value-${e}`,children:dZ(e,a)})})]})},hZ=({alert:t,t:e,translationKey:r,onUpdate:n})=>{const[i,a]=QI(),o=t.threshold?`${t.functionName} ${t.comparisonOperator} ${t.threshold}`:"",s={deviceName:t.functionName,threshold:o,liveValue:t.functionValue,timeStamp:t.alertTimestamp},l=Object.entries(s).map(d=>({key:d[0],value:d[1]})),c=()=>{a(),i(R.jsx(oZ,{alert:t,handleClose:a,onUpdate:n,isOpen:!0}))};return R.jsxs(qD,{"data-testid":"alert-definition",children:[R.jsxs($D,{children:[R.jsx(UD,{variant:"h6","data-testid":`alert-title-${t.number}`,children:e(t.functionName)}),t.alertCategory&&R.jsx(Yf,{title:t.alertCategory})]}),R.jsx(HD,{children:l.map(({key:d,value:h})=>R.jsx(rP,{label:e(`${r}.${d}`),value:h},d))}),R.jsx(j4,{alert:t,onClickCustomize:c})]})},pZ=({alert:t,t:e,translationKey:r,selectedAlert:n,alertInstanceClickHandler:i})=>{const a={deviceName:t.alertName,configurationItem:t.deviceName,functionValue:t.functionValue,alertTimeStamp:t.alertTimeStamp},o=Object.entries(a).map(s=>({key:s[0],value:s[1]}));return R.jsxs(qD,{$canBeClicked:!0,$selected:n===t.alertId,"data-testid":"alert-instance",onClick:()=>i==null?void 0:i(t.alertId),children:[R.jsxs($D,{children:[R.jsx(UD,{variant:"h6","data-testid":`alert-title-${t.alertId}`,children:e(t.alertName)}),!!t.alertCategory&&R.jsx(Yf,{title:t.alertCategory})]}),R.jsx(HD,{children:o.map(({key:s,value:l})=>R.jsx(rP,{label:s==="functionValue"?e(`${r}.${s}`,{device:t.alertName}):e(`${r}.${s}`),value:l},s))})]})},gZ=(t,e,r,n,i)=>(a,o)=>{if(e){const{ddid:l,alertCategory:c}=a,d=`${l}-${mr.kebabCase(c)}-${o}`;return R.jsx(hZ,{alert:a,t,translationKey:"alert-definition",onUpdate:n},d)}const{alertId:s}=a;return R.jsx(pZ,{alert:a,selectedAlert:r,t,translationKey:"alert-instance",alertInstanceClickHandler:i},s)},mZ=[10,25,50,100],nP=({leasedSpaceName:t,alertType:e,alertCategory:r,title:n,isDefinitionsView:i,selectedAlertInstance:a,alertInstanceClickHandler:o})=>{const{t:s}=Qt(["location"]),[l,c]=Nt.useState(0),[d,h]=Nt.useState(ua.DEVICE_NAME),[g,m]=Nt.useState(10),[v,_]=Nt.useState(0),y=VI.ASC,x={leasedSpaceName:t,order:y,sort:d,size:g,page:l,alertType:A4(e),alertCategory:O4(r)};ht(()=>{c(0),_(0)},[e,r]);const w=[{id:ua.DEVICE_NAME,name:s(`alert-list.${ua.DEVICE_NAME}`)},{id:ua.FUNCTION_VALUE,name:s(`alert-list.${ua.FUNCTION_VALUE}`)},...i?[{id:ua.THRESHOLD,name:s(`alert-list.${ua.THRESHOLD}`)}]:[]],C=yr(()=>i?Qn.DEFINITIONS:e===tb?Qn.HISTORY:Qn.INSTANCES,[e,i]),A=yr(()=>ND(C),[C]),{data:E,isFetching:S,isError:T,refetch:D}=A(x,{onSuccess(W){_((W==null?void 0:W.totalElements)||0)}}),P=S?!1:(E==null?void 0:E.totalElements)<=0,N=W=>{c(0),h(W)},F=({detail:W})=>{m(W.pageSize),c(W.page-1)},B=gZ(s,i,a,D,o);return R.jsxs(R.Fragment,{children:[R.jsxs(E4,{children:[R.jsx(ft,{variant:"h6",children:n}),R.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[R.jsx(ft,{variant:"body1",style:{marginRight:"8px"},children:s("alert-list.sort-by")}),R.jsx(H0,{ariaLabel:s("alert-list.sort-by"),name:"sort",value:d,options:w,onChange:N})]})]}),R.jsxs(C4,{"data-testid":"alert-list-container",children:[S&&R.jsx(Tf,{linear:!1,indeterminate:!0,role:"progressbar","aria-label":"Loading...","aria-busy":"true",style:{"--md-circular-progress-size":"25px"}}),(T||P)&&R.jsx(W0,{children:R.jsx(ft,{variant:"body1",children:s("no-dcim-data-available")})}),!T&&!S&&(E==null?void 0:E.content.map(B))]}),R.jsx(FU,{"data-testid":"alert-pagination",style:{display:"block"},recordCount:v,page:(l||0)+1,pageSize:g,pageSizes:mZ,onUpdatePagination:F})]})},vZ=({children:t,style:e,...r})=>{const n=Qe(At("md"));return R.jsx("div",{style:{display:"flex",flexDirection:"column",gap:n?26:42,...e},...r,children:t})},yZ=()=>{const{t}=Qt("location"),e=window.location.search.slice(1),r=Id.parse(e),{alertId:n,assetName:i,leasedSpaceName:a,sitecode:o,type:s}=r,l=typeof n=="string"?n:"",[c,d]=sr({category:cs,type:s||cs}),[h,g]=sr(!!l),[m,v]=sr(l),_=Qe(At("lg")),y=(C,A)=>{v(""),d(E=>({...E,[C]:A}))},x=C=>{v(C),_&&g(!0)},w=yr(()=>c.type===tb,[c]);return R.jsx(X0,{children:R.jsxs(dD,{children:[R.jsx(Z0,{assetName:i,sitecode:o}),R.jsxs(Y0,{spacing:{xs:2.5,md:3},children:[R.jsx(zr,{xs:12,sm:4,md:3,lg:2,children:R.jsxs(vZ,{children:[R.jsx(rb,{leasedSpaceName:a,filters:c,handleFilters:y}),R.jsx(jD,{leasedSpaceName:a,filters:c,handleFilters:y})]})}),R.jsx(zr,{xs:12,sm:8,md:9,lg:5,children:R.jsx(nP,{alertCategory:c.category,alertInstanceClickHandler:x,alertType:c.type,leasedSpaceName:a,title:t("alerts.details.title"),selectedAlertInstance:m})}),R.jsx(zr,{xs:12,lg:5,children:!!m&&R.jsx(R.Fragment,{children:_?R.jsx(v4,{alertInstanceId:m,isOpen:h,handleClose:()=>g(!1),isHistorical:w}):R.jsx(LD,{alertInstanceId:m,isHistorical:w})})})]})]})})},Gd="location-changed",bZ=()=>(ht(()=>{window.dispatchEvent(new CustomEvent(Gd,{detail:{location:{route:{hideAccountSwitcher:!0}}}}))},[]),R.jsx(yZ,{}));var Jn=(t=>(t.Day="day",t.Hour="hour",t.FifteenMinutes="15 minute",t.FiveMinutes="5 minute",t.Minute="minute",t))(Jn||{});const _Z=({children:t,style:e,...r})=>R.jsx("div",{style:{gridColumn:"1 / -1",paddingTop:"1rem",width:"100%",...e},...r,children:t});/*!
|
|
93
|
+
* @kurkle/color v0.3.4
|
|
94
|
+
* https://github.com/kurkle/color#readme
|
|
95
|
+
* (c) 2024 Jukka Kurkela
|
|
96
|
+
* Released under the MIT License
|
|
97
|
+
*/function el(t){return t+.5|0}const ga=(t,e,r)=>Math.max(Math.min(t,r),e);function vu(t){return ga(el(t*2.55),0,255)}function ya(t){return ga(el(t*255),0,255)}function Li(t){return ga(el(t/2.55)/100,0,1)}function GO(t){return ga(el(t*100),0,100)}const Fn={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},e0=[..."0123456789ABCDEF"],xZ=t=>e0[t&15],wZ=t=>e0[(t&240)>>4]+e0[t&15],Yc=t=>(t&240)>>4===(t&15),TZ=t=>Yc(t.r)&&Yc(t.g)&&Yc(t.b)&&Yc(t.a);function SZ(t){var e=t.length,r;return t[0]==="#"&&(e===4||e===5?r={r:255&Fn[t[1]]*17,g:255&Fn[t[2]]*17,b:255&Fn[t[3]]*17,a:e===5?Fn[t[4]]*17:255}:(e===7||e===9)&&(r={r:Fn[t[1]]<<4|Fn[t[2]],g:Fn[t[3]]<<4|Fn[t[4]],b:Fn[t[5]]<<4|Fn[t[6]],a:e===9?Fn[t[7]]<<4|Fn[t[8]]:255})),r}const CZ=(t,e)=>t<255?e(t):"";function EZ(t){var e=TZ(t)?xZ:wZ;return t?"#"+e(t.r)+e(t.g)+e(t.b)+CZ(t.a,e):void 0}const OZ=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function iP(t,e,r){const n=e*Math.min(r,1-r),i=(a,o=(a+t/30)%12)=>r-n*Math.max(Math.min(o-3,9-o,1),-1);return[i(0),i(8),i(4)]}function AZ(t,e,r){const n=(i,a=(i+t/60)%6)=>r-r*e*Math.max(Math.min(a,4-a,1),0);return[n(5),n(3),n(1)]}function RZ(t,e,r){const n=iP(t,1,.5);let i;for(e+r>1&&(i=1/(e+r),e*=i,r*=i),i=0;i<3;i++)n[i]*=1-e-r,n[i]+=e;return n}function IZ(t,e,r,n,i){return t===i?(e-r)/n+(e<r?6:0):e===i?(r-t)/n+2:(t-e)/n+4}function Db(t){const r=t.r/255,n=t.g/255,i=t.b/255,a=Math.max(r,n,i),o=Math.min(r,n,i),s=(a+o)/2;let l,c,d;return a!==o&&(d=a-o,c=s>.5?d/(2-a-o):d/(a+o),l=IZ(r,n,i,d,a),l=l*60+.5),[l|0,c||0,s]}function Mb(t,e,r,n){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,r,n)).map(ya)}function Pb(t,e,r){return Mb(iP,t,e,r)}function DZ(t,e,r){return Mb(RZ,t,e,r)}function MZ(t,e,r){return Mb(AZ,t,e,r)}function aP(t){return(t%360+360)%360}function PZ(t){const e=OZ.exec(t);let r=255,n;if(!e)return;e[5]!==n&&(r=e[6]?vu(+e[5]):ya(+e[5]));const i=aP(+e[2]),a=+e[3]/100,o=+e[4]/100;return e[1]==="hwb"?n=DZ(i,a,o):e[1]==="hsv"?n=MZ(i,a,o):n=Pb(i,a,o),{r:n[0],g:n[1],b:n[2],a:r}}function LZ(t,e){var r=Db(t);r[0]=aP(r[0]+e),r=Pb(r),t.r=r[0],t.g=r[1],t.b=r[2]}function NZ(t){if(!t)return;const e=Db(t),r=e[0],n=GO(e[1]),i=GO(e[2]);return t.a<255?`hsla(${r}, ${n}%, ${i}%, ${Li(t.a)})`:`hsl(${r}, ${n}%, ${i}%)`}const KO={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},XO={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function FZ(){const t={},e=Object.keys(XO),r=Object.keys(KO);let n,i,a,o,s;for(n=0;n<e.length;n++){for(o=s=e[n],i=0;i<r.length;i++)a=r[i],s=s.replace(a,KO[a]);a=parseInt(XO[o],16),t[s]=[a>>16&255,a>>8&255,a&255]}return t}let Zc;function kZ(t){Zc||(Zc=FZ(),Zc.transparent=[0,0,0,0]);const e=Zc[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:e.length===4?e[3]:255}}const jZ=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function $Z(t){const e=jZ.exec(t);let r=255,n,i,a;if(e){if(e[7]!==n){const o=+e[7];r=e[8]?vu(o):ga(o*255,0,255)}return n=+e[1],i=+e[3],a=+e[5],n=255&(e[2]?vu(n):ga(n,0,255)),i=255&(e[4]?vu(i):ga(i,0,255)),a=255&(e[6]?vu(a):ga(a,0,255)),{r:n,g:i,b:a,a:r}}}function UZ(t){return t&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${Li(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`)}const ly=t=>t<=.0031308?t*12.92:Math.pow(t,1/2.4)*1.055-.055,Yo=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function qZ(t,e,r){const n=Yo(Li(t.r)),i=Yo(Li(t.g)),a=Yo(Li(t.b));return{r:ya(ly(n+r*(Yo(Li(e.r))-n))),g:ya(ly(i+r*(Yo(Li(e.g))-i))),b:ya(ly(a+r*(Yo(Li(e.b))-a))),a:t.a+r*(e.a-t.a)}}function Jc(t,e,r){if(t){let n=Db(t);n[e]=Math.max(0,Math.min(n[e]+n[e]*r,e===0?360:1)),n=Pb(n),t.r=n[0],t.g=n[1],t.b=n[2]}}function oP(t,e){return t&&Object.assign(e||{},t)}function YO(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=ya(t[3]))):(e=oP(t,{r:0,g:0,b:0,a:1}),e.a=ya(e.a)),e}function HZ(t){return t.charAt(0)==="r"?$Z(t):PZ(t)}class ju{constructor(e){if(e instanceof ju)return e;const r=typeof e;let n;r==="object"?n=YO(e):r==="string"&&(n=SZ(e)||kZ(e)||HZ(e)),this._rgb=n,this._valid=!!n}get valid(){return this._valid}get rgb(){var e=oP(this._rgb);return e&&(e.a=Li(e.a)),e}set rgb(e){this._rgb=YO(e)}rgbString(){return this._valid?UZ(this._rgb):void 0}hexString(){return this._valid?EZ(this._rgb):void 0}hslString(){return this._valid?NZ(this._rgb):void 0}mix(e,r){if(e){const n=this.rgb,i=e.rgb;let a;const o=r===a?.5:r,s=2*o-1,l=n.a-i.a,c=((s*l===-1?s:(s+l)/(1+s*l))+1)/2;a=1-c,n.r=255&c*n.r+a*i.r+.5,n.g=255&c*n.g+a*i.g+.5,n.b=255&c*n.b+a*i.b+.5,n.a=o*n.a+(1-o)*i.a,this.rgb=n}return this}interpolate(e,r){return e&&(this._rgb=qZ(this._rgb,e._rgb,r)),this}clone(){return new ju(this.rgb)}alpha(e){return this._rgb.a=ya(e),this}clearer(e){const r=this._rgb;return r.a*=1-e,this}greyscale(){const e=this._rgb,r=el(e.r*.3+e.g*.59+e.b*.11);return e.r=e.g=e.b=r,this}opaquer(e){const r=this._rgb;return r.a*=1+e,this}negate(){const e=this._rgb;return e.r=255-e.r,e.g=255-e.g,e.b=255-e.b,this}lighten(e){return Jc(this._rgb,2,e),this}darken(e){return Jc(this._rgb,2,-e),this}saturate(e){return Jc(this._rgb,1,e),this}desaturate(e){return Jc(this._rgb,1,-e),this}rotate(e){return LZ(this._rgb,e),this}}/*!
|
|
98
|
+
* Chart.js v4.4.0
|
|
99
|
+
* https://www.chartjs.org
|
|
100
|
+
* (c) 2023 Chart.js Contributors
|
|
101
|
+
* Released under the MIT License
|
|
102
|
+
*/function Ii(){}const WZ=(()=>{let t=0;return()=>t++})();function ur(t){return t===null||typeof t>"u"}function Xt(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return e.slice(0,7)==="[object"&&e.slice(-6)==="Array]"}function st(t){return t!==null&&Object.prototype.toString.call(t)==="[object Object]"}function Rr(t){return(typeof t=="number"||t instanceof Number)&&isFinite(+t)}function ai(t,e){return Rr(t)?t:e}function tt(t,e){return typeof t>"u"?e:t}const BZ=(t,e)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100*e:+t;function $t(t,e,r){if(t&&typeof t.call=="function")return t.apply(r,e)}function jt(t,e,r,n){let i,a,o;if(Xt(t))for(a=t.length,i=0;i<a;i++)e.call(r,t[i],i);else if(st(t))for(o=Object.keys(t),a=o.length,i=0;i<a;i++)e.call(r,t[o[i]],o[i])}function id(t,e){let r,n,i,a;if(!t||!e||t.length!==e.length)return!1;for(r=0,n=t.length;r<n;++r)if(i=t[r],a=e[r],i.datasetIndex!==a.datasetIndex||i.index!==a.index)return!1;return!0}function ad(t){if(Xt(t))return t.map(ad);if(st(t)){const e=Object.create(null),r=Object.keys(t),n=r.length;let i=0;for(;i<n;++i)e[r[i]]=ad(t[r[i]]);return e}return t}function sP(t){return["__proto__","prototype","constructor"].indexOf(t)===-1}function zZ(t,e,r,n){if(!sP(t))return;const i=e[t],a=r[t];st(i)&&st(a)?$u(i,a,n):e[t]=ad(a)}function $u(t,e,r){const n=Xt(e)?e:[e],i=n.length;if(!st(t))return t;r=r||{};const a=r.merger||zZ;let o;for(let s=0;s<i;++s){if(o=n[s],!st(o))continue;const l=Object.keys(o);for(let c=0,d=l.length;c<d;++c)a(l[c],t,o,r)}return t}function Eu(t,e){return $u(t,e,{merger:VZ})}function VZ(t,e,r){if(!sP(t))return;const n=e[t],i=r[t];st(n)&&st(i)?Eu(n,i):Object.prototype.hasOwnProperty.call(e,t)||(e[t]=ad(i))}const ZO={"":t=>t,x:t=>t.x,y:t=>t.y};function GZ(t){const e=t.split("."),r=[];let n="";for(const i of e)n+=i,n.endsWith("\\")?n=n.slice(0,-1)+".":(r.push(n),n="");return r}function KZ(t){const e=GZ(t);return r=>{for(const n of e){if(n==="")break;r=r&&r[n]}return r}}function od(t,e){return(ZO[e]||(ZO[e]=KZ(e)))(t)}function Lb(t){return t.charAt(0).toUpperCase()+t.slice(1)}const Tn=t=>typeof t<"u",ln=t=>typeof t=="function",JO=(t,e)=>{if(t.size!==e.size)return!1;for(const r of t)if(!e.has(r))return!1;return!0};function XZ(t){return t.type==="mouseup"||t.type==="click"||t.type==="contextmenu"}const qt=Math.PI,qn=2*qt,YZ=qn+qt,sd=Number.POSITIVE_INFINITY,Nb=qt/180,Gr=qt/2,$n=qt/4,ud=qt*2/3,uP=Math.log10,hs=Math.sign;function Ou(t,e,r){return Math.abs(t-e)<r}function QO(t){const e=Math.round(t);t=Ou(t,e,t/1e3)?e:t;const r=Math.pow(10,Math.floor(uP(t))),n=t/r;return(n<=1?1:n<=2?2:n<=5?5:10)*r}function ZZ(t){const e=[],r=Math.sqrt(t);let n;for(n=1;n<r;n++)t%n===0&&(e.push(n),e.push(t/n));return r===(r|0)&&e.push(r),e.sort((i,a)=>i-a).pop(),e}function ho(t){return!isNaN(parseFloat(t))&&isFinite(t)}function JZ(t,e){const r=Math.round(t);return r-e<=t&&r+e>=t}function QZ(t,e,r){let n,i,a;for(n=0,i=t.length;n<i;n++)a=t[n][r],isNaN(a)||(e.min=Math.min(e.min,a),e.max=Math.max(e.max,a))}function jr(t){return t*(qt/180)}function lP(t){return t*(180/qt)}function eA(t){if(!Rr(t))return;let e=1,r=0;for(;Math.round(t*e)/e!==t;)e*=10,r++;return r}function eJ(t,e){const r=e.x-t.x,n=e.y-t.y,i=Math.sqrt(r*r+n*n);let a=Math.atan2(n,r);return a<-.5*qt&&(a+=qn),{angle:a,distance:i}}function ps(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function tJ(t,e){return(t-e+YZ)%qn-qt}function li(t){return(t%qn+qn)%qn}function cP(t,e,r,n){const i=li(t),a=li(e),o=li(r),s=li(a-i),l=li(o-i),c=li(i-a),d=li(i-o);return i===a||i===o||n&&a===o||s>l&&c<d}function Un(t,e,r){return Math.max(e,Math.min(r,t))}function rJ(t){return Un(t,-32768,32767)}function Qo(t,e,r,n=1e-6){return t>=Math.min(e,r)-n&&t<=Math.max(e,r)+n}function Fb(t,e,r){r=r||(o=>t[o]<e);let n=t.length-1,i=0,a;for(;n-i>1;)a=i+n>>1,r(a)?i=a:n=a;return{lo:i,hi:n}}const ro=(t,e,r,n)=>Fb(t,r,n?i=>{const a=t[i][e];return a<r||a===r&&t[i+1][e]===r}:i=>t[i][e]<r),nJ=(t,e,r)=>Fb(t,r,n=>t[n][e]>=r);function iJ(t,e,r){let n=0,i=t.length;for(;n<i&&t[n]<e;)n++;for(;i>n&&t[i-1]>r;)i--;return n>0||i<t.length?t.slice(n,i):t}const fP=["push","pop","shift","splice","unshift"];function aJ(t,e){if(t._chartjs){t._chartjs.listeners.push(e);return}Object.defineProperty(t,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),fP.forEach(r=>{const n="_onData"+Lb(r),i=t[r];Object.defineProperty(t,r,{configurable:!0,enumerable:!1,value(...a){const o=i.apply(this,a);return t._chartjs.listeners.forEach(s=>{typeof s[n]=="function"&&s[n](...a)}),o}})})}function tA(t,e){const r=t._chartjs;if(!r)return;const n=r.listeners,i=n.indexOf(e);i!==-1&&n.splice(i,1),!(n.length>0)&&(fP.forEach(a=>{delete t[a]}),delete t._chartjs)}function oJ(t){const e=new Set(t);return e.size===t.length?t:Array.from(e)}const dP=(function(){return typeof window>"u"?function(t){return t()}:window.requestAnimationFrame})();function hP(t,e){let r=[],n=!1;return function(...i){r=i,n||(n=!0,dP.call(window,()=>{n=!1,t.apply(e,r)}))}}function sJ(t,e){let r;return function(...n){return e?(clearTimeout(r),r=setTimeout(t,e,n)):t.apply(this,n),e}}const pP=t=>t==="start"?"left":t==="end"?"right":"center",_n=(t,e,r)=>t==="start"?e:t==="end"?r:(e+r)/2,uJ=(t,e,r,n)=>t===(n?"left":"right")?r:t==="center"?(e+r)/2:e;function lJ(t,e,r){const n=e.length;let i=0,a=n;if(t._sorted){const{iScale:o,_parsed:s}=t,l=o.axis,{min:c,max:d,minDefined:h,maxDefined:g}=o.getUserBounds();h&&(i=Un(Math.min(ro(s,l,c).lo,r?n:ro(e,l,o.getPixelForValue(c)).lo),0,n-1)),g?a=Un(Math.max(ro(s,o.axis,d,!0).hi+1,r?0:ro(e,l,o.getPixelForValue(d),!0).hi+1),i,n)-i:a=n-i}return{start:i,count:a}}function cJ(t){const{xScale:e,yScale:r,_scaleRanges:n}=t,i={xmin:e.min,xmax:e.max,ymin:r.min,ymax:r.max};if(!n)return t._scaleRanges=i,!0;const a=n.xmin!==e.min||n.xmax!==e.max||n.ymin!==r.min||n.ymax!==r.max;return Object.assign(n,i),a}const Qc=t=>t===0||t===1,rA=(t,e,r)=>-(Math.pow(2,10*(t-=1))*Math.sin((t-e)*qn/r)),nA=(t,e,r)=>Math.pow(2,-10*t)*Math.sin((t-e)*qn/r)+1,Au={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>-Math.cos(t*Gr)+1,easeOutSine:t=>Math.sin(t*Gr),easeInOutSine:t=>-.5*(Math.cos(qt*t)-1),easeInExpo:t=>t===0?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>t===1?1:-Math.pow(2,-10*t)+1,easeInOutExpo:t=>Qc(t)?t:t<.5?.5*Math.pow(2,10*(t*2-1)):.5*(-Math.pow(2,-10*(t*2-1))+2),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>Qc(t)?t:rA(t,.075,.3),easeOutElastic:t=>Qc(t)?t:nA(t,.075,.3),easeInOutElastic(t){return Qc(t)?t:t<.5?.5*rA(t*2,.1125,.45):.5+.5*nA(t*2-1,.1125,.45)},easeInBack(t){return t*t*((1.70158+1)*t-1.70158)},easeOutBack(t){return(t-=1)*t*((1.70158+1)*t+1.70158)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?.5*(t*t*(((e*=1.525)+1)*t-e)):.5*((t-=2)*t*(((e*=1.525)+1)*t+e)+2)},easeInBounce:t=>1-Au.easeOutBounce(1-t),easeOutBounce(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},easeInOutBounce:t=>t<.5?Au.easeInBounce(t*2)*.5:Au.easeOutBounce(t*2-1)*.5+.5};function kb(t){if(t&&typeof t=="object"){const e=t.toString();return e==="[object CanvasPattern]"||e==="[object CanvasGradient]"}return!1}function iA(t){return kb(t)?t:new ju(t)}function cy(t){return kb(t)?t:new ju(t).saturate(.5).darken(.1).hexString()}const fJ=["x","y","borderWidth","radius","tension"],dJ=["color","borderColor","backgroundColor"];function hJ(t){t.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),t.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:e=>e!=="onProgress"&&e!=="onComplete"&&e!=="fn"}),t.set("animations",{colors:{type:"color",properties:dJ},numbers:{type:"number",properties:fJ}}),t.describe("animations",{_fallback:"animation"}),t.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:e=>e|0}}}})}function pJ(t){t.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const aA=new Map;function gJ(t,e){e=e||{};const r=t+JSON.stringify(e);let n=aA.get(r);return n||(n=new Intl.NumberFormat(t,e),aA.set(r,n)),n}function gP(t,e,r){return gJ(e,r).format(t)}const mJ={values(t){return Xt(t)?t:""+t},numeric(t,e,r){if(t===0)return"0";const n=this.chart.options.locale;let i,a=t;if(r.length>1){const c=Math.max(Math.abs(r[0].value),Math.abs(r[r.length-1].value));(c<1e-4||c>1e15)&&(i="scientific"),a=vJ(t,r)}const o=uP(Math.abs(a)),s=isNaN(o)?1:Math.max(Math.min(-1*Math.floor(o),20),0),l={notation:i,minimumFractionDigits:s,maximumFractionDigits:s};return Object.assign(l,this.options.ticks.format),gP(t,n,l)}};function vJ(t,e){let r=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;return Math.abs(r)>=1&&t!==Math.floor(t)&&(r=t-Math.floor(t)),r}var mP={formatters:mJ};function yJ(t){t.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(e,r)=>r.lineWidth,tickColor:(e,r)=>r.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:mP.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),t.route("scale.ticks","color","","color"),t.route("scale.grid","color","","borderColor"),t.route("scale.border","color","","borderColor"),t.route("scale.title","color","","color"),t.describe("scale",{_fallback:!1,_scriptable:e=>!e.startsWith("before")&&!e.startsWith("after")&&e!=="callback"&&e!=="parser",_indexable:e=>e!=="borderDash"&&e!=="tickBorderDash"&&e!=="dash"}),t.describe("scales",{_fallback:"scale"}),t.describe("scale.ticks",{_scriptable:e=>e!=="backdropPadding"&&e!=="callback",_indexable:e=>e!=="backdropPadding"})}const po=Object.create(null),t0=Object.create(null);function Ru(t,e){if(!e)return t;const r=e.split(".");for(let n=0,i=r.length;n<i;++n){const a=r[n];t=t[a]||(t[a]=Object.create(null))}return t}function fy(t,e,r){return typeof e=="string"?$u(Ru(t,e),r):$u(Ru(t,""),e)}class bJ{constructor(e,r){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=n=>n.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(n,i)=>cy(i.backgroundColor),this.hoverBorderColor=(n,i)=>cy(i.borderColor),this.hoverColor=(n,i)=>cy(i.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(e),this.apply(r)}set(e,r){return fy(this,e,r)}get(e){return Ru(this,e)}describe(e,r){return fy(t0,e,r)}override(e,r){return fy(po,e,r)}route(e,r,n,i){const a=Ru(this,e),o=Ru(this,n),s="_"+r;Object.defineProperties(a,{[s]:{value:a[r],writable:!0},[r]:{enumerable:!0,get(){const l=this[s],c=o[i];return st(l)?Object.assign({},c,l):tt(l,c)},set(l){this[s]=l}}})}apply(e){e.forEach(r=>r(this))}}var lr=new bJ({_scriptable:t=>!t.startsWith("on"),_indexable:t=>t!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[hJ,pJ,yJ]);function _J(t){return!t||ur(t.size)||ur(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}function oA(t,e,r,n,i){let a=e[i];return a||(a=e[i]=t.measureText(i).width,r.push(i)),a>n&&(n=a),n}function Wa(t,e,r){const n=t.currentDevicePixelRatio,i=r!==0?Math.max(r/2,.5):0;return Math.round((e-i)*n)/n+i}function sA(t,e){e=e||t.getContext("2d"),e.save(),e.resetTransform(),e.clearRect(0,0,t.width,t.height),e.restore()}function r0(t,e,r,n){vP(t,e,r,n,null)}function vP(t,e,r,n,i){let a,o,s,l,c,d,h,g;const m=e.pointStyle,v=e.rotation,_=e.radius;let y=(v||0)*Nb;if(m&&typeof m=="object"&&(a=m.toString(),a==="[object HTMLImageElement]"||a==="[object HTMLCanvasElement]")){t.save(),t.translate(r,n),t.rotate(y),t.drawImage(m,-m.width/2,-m.height/2,m.width,m.height),t.restore();return}if(!(isNaN(_)||_<=0)){switch(t.beginPath(),m){default:i?t.ellipse(r,n,i/2,_,0,0,qn):t.arc(r,n,_,0,qn),t.closePath();break;case"triangle":d=i?i/2:_,t.moveTo(r+Math.sin(y)*d,n-Math.cos(y)*_),y+=ud,t.lineTo(r+Math.sin(y)*d,n-Math.cos(y)*_),y+=ud,t.lineTo(r+Math.sin(y)*d,n-Math.cos(y)*_),t.closePath();break;case"rectRounded":c=_*.516,l=_-c,o=Math.cos(y+$n)*l,h=Math.cos(y+$n)*(i?i/2-c:l),s=Math.sin(y+$n)*l,g=Math.sin(y+$n)*(i?i/2-c:l),t.arc(r-h,n-s,c,y-qt,y-Gr),t.arc(r+g,n-o,c,y-Gr,y),t.arc(r+h,n+s,c,y,y+Gr),t.arc(r-g,n+o,c,y+Gr,y+qt),t.closePath();break;case"rect":if(!v){l=Math.SQRT1_2*_,d=i?i/2:l,t.rect(r-d,n-l,2*d,2*l);break}y+=$n;case"rectRot":h=Math.cos(y)*(i?i/2:_),o=Math.cos(y)*_,s=Math.sin(y)*_,g=Math.sin(y)*(i?i/2:_),t.moveTo(r-h,n-s),t.lineTo(r+g,n-o),t.lineTo(r+h,n+s),t.lineTo(r-g,n+o),t.closePath();break;case"crossRot":y+=$n;case"cross":h=Math.cos(y)*(i?i/2:_),o=Math.cos(y)*_,s=Math.sin(y)*_,g=Math.sin(y)*(i?i/2:_),t.moveTo(r-h,n-s),t.lineTo(r+h,n+s),t.moveTo(r+g,n-o),t.lineTo(r-g,n+o);break;case"star":h=Math.cos(y)*(i?i/2:_),o=Math.cos(y)*_,s=Math.sin(y)*_,g=Math.sin(y)*(i?i/2:_),t.moveTo(r-h,n-s),t.lineTo(r+h,n+s),t.moveTo(r+g,n-o),t.lineTo(r-g,n+o),y+=$n,h=Math.cos(y)*(i?i/2:_),o=Math.cos(y)*_,s=Math.sin(y)*_,g=Math.sin(y)*(i?i/2:_),t.moveTo(r-h,n-s),t.lineTo(r+h,n+s),t.moveTo(r+g,n-o),t.lineTo(r-g,n+o);break;case"line":o=i?i/2:Math.cos(y)*_,s=Math.sin(y)*_,t.moveTo(r-o,n-s),t.lineTo(r+o,n+s);break;case"dash":t.moveTo(r,n),t.lineTo(r+Math.cos(y)*(i?i/2:_),n+Math.sin(y)*_);break;case!1:t.closePath();break}t.fill(),e.borderWidth>0&&t.stroke()}}function Uu(t,e,r){return r=r||.5,!e||t&&t.x>e.left-r&&t.x<e.right+r&&t.y>e.top-r&&t.y<e.bottom+r}function tl(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()}function rl(t){t.restore()}function xJ(t,e,r,n,i){if(!e)return t.lineTo(r.x,r.y);if(i==="middle"){const a=(e.x+r.x)/2;t.lineTo(a,e.y),t.lineTo(a,r.y)}else i==="after"!=!!n?t.lineTo(e.x,r.y):t.lineTo(r.x,e.y);t.lineTo(r.x,r.y)}function wJ(t,e,r,n){if(!e)return t.lineTo(r.x,r.y);t.bezierCurveTo(n?e.cp1x:e.cp2x,n?e.cp1y:e.cp2y,n?r.cp2x:r.cp1x,n?r.cp2y:r.cp1y,r.x,r.y)}function TJ(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]),ur(e.rotation)||t.rotate(e.rotation),e.color&&(t.fillStyle=e.color),e.textAlign&&(t.textAlign=e.textAlign),e.textBaseline&&(t.textBaseline=e.textBaseline)}function SJ(t,e,r,n,i){if(i.strikethrough||i.underline){const a=t.measureText(n),o=e-a.actualBoundingBoxLeft,s=e+a.actualBoundingBoxRight,l=r-a.actualBoundingBoxAscent,c=r+a.actualBoundingBoxDescent,d=i.strikethrough?(l+c)/2:c;t.strokeStyle=t.fillStyle,t.beginPath(),t.lineWidth=i.decorationWidth||2,t.moveTo(o,d),t.lineTo(s,d),t.stroke()}}function CJ(t,e){const r=t.fillStyle;t.fillStyle=e.color,t.fillRect(e.left,e.top,e.width,e.height),t.fillStyle=r}function ld(t,e,r,n,i,a={}){const o=Xt(e)?e:[e],s=a.strokeWidth>0&&a.strokeColor!=="";let l,c;for(t.save(),t.font=i.string,TJ(t,a),l=0;l<o.length;++l)c=o[l],a.backdrop&&CJ(t,a.backdrop),s&&(a.strokeColor&&(t.strokeStyle=a.strokeColor),ur(a.strokeWidth)||(t.lineWidth=a.strokeWidth),t.strokeText(c,r,n,a.maxWidth)),t.fillText(c,r,n,a.maxWidth),SJ(t,r,n,c,a),n+=Number(i.lineHeight);t.restore()}function cd(t,e){const{x:r,y:n,w:i,h:a,radius:o}=e;t.arc(r+o.topLeft,n+o.topLeft,o.topLeft,1.5*qt,qt,!0),t.lineTo(r,n+a-o.bottomLeft),t.arc(r+o.bottomLeft,n+a-o.bottomLeft,o.bottomLeft,qt,Gr,!0),t.lineTo(r+i-o.bottomRight,n+a),t.arc(r+i-o.bottomRight,n+a-o.bottomRight,o.bottomRight,Gr,0,!0),t.lineTo(r+i,n+o.topRight),t.arc(r+i-o.topRight,n+o.topRight,o.topRight,0,-Gr,!0),t.lineTo(r+o.topLeft,n)}const EJ=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,OJ=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function AJ(t,e){const r=(""+t).match(EJ);if(!r||r[1]==="normal")return e*1.2;switch(t=+r[2],r[3]){case"px":return t;case"%":t/=100;break}return e*t}const RJ=t=>+t||0;function yP(t,e){const r={},n=st(e),i=n?Object.keys(e):e,a=st(t)?n?o=>tt(t[o],t[e[o]]):o=>t[o]:()=>t;for(const o of i)r[o]=RJ(a(o));return r}function IJ(t){return yP(t,{top:"y",right:"x",bottom:"y",left:"x"})}function rs(t){return yP(t,["topLeft","topRight","bottomLeft","bottomRight"])}function Kr(t){const e=IJ(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function Or(t,e){t=t||{},e=e||lr.font;let r=tt(t.size,e.size);typeof r=="string"&&(r=parseInt(r,10));let n=tt(t.style,e.style);n&&!(""+n).match(OJ)&&(console.warn('Invalid font style specified: "'+n+'"'),n=void 0);const i={family:tt(t.family,e.family),lineHeight:AJ(tt(t.lineHeight,e.lineHeight),r),size:r,style:n,weight:tt(t.weight,e.weight),string:""};return i.string=_J(i),i}function ef(t,e,r,n){let i,a,o;for(i=0,a=t.length;i<a;++i)if(o=t[i],o!==void 0&&o!==void 0)return o}function DJ(t,e,r){const{min:n,max:i}=t,a=BZ(e,(i-n)/2),o=(s,l)=>r&&s===0?0:s+l;return{min:o(n,-Math.abs(a)),max:o(i,a)}}function To(t,e){return Object.assign(Object.create(t),e)}function jb(t,e=[""],r,n,i=()=>t[0]){const a=r||t;typeof n>"u"&&(n=wP("_fallback",t));const o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:a,_fallback:n,_getTarget:i,override:s=>jb([s,...t],e,a,n)};return new Proxy(o,{deleteProperty(s,l){return delete s[l],delete s._keys,delete t[0][l],!0},get(s,l){return _P(s,l,()=>$J(l,e,t,s))},getOwnPropertyDescriptor(s,l){return Reflect.getOwnPropertyDescriptor(s._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(t[0])},has(s,l){return lA(s).includes(l)},ownKeys(s){return lA(s)},set(s,l,c){const d=s._storage||(s._storage=i());return s[l]=d[l]=c,delete s._keys,!0}})}function gs(t,e,r,n){const i={_cacheable:!1,_proxy:t,_context:e,_subProxy:r,_stack:new Set,_descriptors:bP(t,n),setContext:a=>gs(t,a,r,n),override:a=>gs(t.override(a),e,r,n)};return new Proxy(i,{deleteProperty(a,o){return delete a[o],delete t[o],!0},get(a,o,s){return _P(a,o,()=>PJ(a,o,s))},getOwnPropertyDescriptor(a,o){return a._descriptors.allKeys?Reflect.has(t,o)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,o)},getPrototypeOf(){return Reflect.getPrototypeOf(t)},has(a,o){return Reflect.has(t,o)},ownKeys(){return Reflect.ownKeys(t)},set(a,o,s){return t[o]=s,delete a[o],!0}})}function bP(t,e={scriptable:!0,indexable:!0}){const{_scriptable:r=e.scriptable,_indexable:n=e.indexable,_allKeys:i=e.allKeys}=t;return{allKeys:i,scriptable:r,indexable:n,isScriptable:ln(r)?r:()=>r,isIndexable:ln(n)?n:()=>n}}const MJ=(t,e)=>t?t+Lb(e):e,$b=(t,e)=>st(e)&&t!=="adapters"&&(Object.getPrototypeOf(e)===null||e.constructor===Object);function _P(t,e,r){if(Object.prototype.hasOwnProperty.call(t,e))return t[e];const n=r();return t[e]=n,n}function PJ(t,e,r){const{_proxy:n,_context:i,_subProxy:a,_descriptors:o}=t;let s=n[e];return ln(s)&&o.isScriptable(e)&&(s=LJ(e,s,t,r)),Xt(s)&&s.length&&(s=NJ(e,s,t,o.isIndexable)),$b(e,s)&&(s=gs(s,i,a&&a[e],o)),s}function LJ(t,e,r,n){const{_proxy:i,_context:a,_subProxy:o,_stack:s}=r;if(s.has(t))throw new Error("Recursion detected: "+Array.from(s).join("->")+"->"+t);s.add(t);let l=e(a,o||n);return s.delete(t),$b(t,l)&&(l=Ub(i._scopes,i,t,l)),l}function NJ(t,e,r,n){const{_proxy:i,_context:a,_subProxy:o,_descriptors:s}=r;if(typeof a.index<"u"&&n(t))return e[a.index%e.length];if(st(e[0])){const l=e,c=i._scopes.filter(d=>d!==l);e=[];for(const d of l){const h=Ub(c,i,t,d);e.push(gs(h,a,o&&o[t],s))}}return e}function xP(t,e,r){return ln(t)?t(e,r):t}const FJ=(t,e)=>t===!0?e:typeof t=="string"?od(e,t):void 0;function kJ(t,e,r,n,i){for(const a of e){const o=FJ(r,a);if(o){t.add(o);const s=xP(o._fallback,r,i);if(typeof s<"u"&&s!==r&&s!==n)return s}else if(o===!1&&typeof n<"u"&&r!==n)return null}return!1}function Ub(t,e,r,n){const i=e._rootScopes,a=xP(e._fallback,r,n),o=[...t,...i],s=new Set;s.add(n);let l=uA(s,o,r,a||r,n);return l===null||typeof a<"u"&&a!==r&&(l=uA(s,o,a,l,n),l===null)?!1:jb(Array.from(s),[""],i,a,()=>jJ(e,r,n))}function uA(t,e,r,n,i){for(;r;)r=kJ(t,e,r,n,i);return r}function jJ(t,e,r){const n=t._getTarget();e in n||(n[e]={});const i=n[e];return Xt(i)&&st(r)?r:i||{}}function $J(t,e,r,n){let i;for(const a of e)if(i=wP(MJ(a,t),r),typeof i<"u")return $b(t,i)?Ub(r,n,t,i):i}function wP(t,e){for(const r of e){if(!r)continue;const n=r[t];if(typeof n<"u")return n}}function lA(t){let e=t._keys;return e||(e=t._keys=UJ(t._scopes)),e}function UJ(t){const e=new Set;for(const r of t)for(const n of Object.keys(r).filter(i=>!i.startsWith("_")))e.add(n);return Array.from(e)}const qJ=Number.EPSILON||1e-14,ms=(t,e)=>e<t.length&&!t[e].skip&&t[e],TP=t=>t==="x"?"y":"x";function HJ(t,e,r,n){const i=t.skip?e:t,a=e,o=r.skip?e:r,s=ps(a,i),l=ps(o,a);let c=s/(s+l),d=l/(s+l);c=isNaN(c)?0:c,d=isNaN(d)?0:d;const h=n*c,g=n*d;return{previous:{x:a.x-h*(o.x-i.x),y:a.y-h*(o.y-i.y)},next:{x:a.x+g*(o.x-i.x),y:a.y+g*(o.y-i.y)}}}function WJ(t,e,r){const n=t.length;let i,a,o,s,l,c=ms(t,0);for(let d=0;d<n-1;++d)if(l=c,c=ms(t,d+1),!(!l||!c)){if(Ou(e[d],0,qJ)){r[d]=r[d+1]=0;continue}i=r[d]/e[d],a=r[d+1]/e[d],s=Math.pow(i,2)+Math.pow(a,2),!(s<=9)&&(o=3/Math.sqrt(s),r[d]=i*o*e[d],r[d+1]=a*o*e[d])}}function BJ(t,e,r="x"){const n=TP(r),i=t.length;let a,o,s,l=ms(t,0);for(let c=0;c<i;++c){if(o=s,s=l,l=ms(t,c+1),!s)continue;const d=s[r],h=s[n];o&&(a=(d-o[r])/3,s[`cp1${r}`]=d-a,s[`cp1${n}`]=h-a*e[c]),l&&(a=(l[r]-d)/3,s[`cp2${r}`]=d+a,s[`cp2${n}`]=h+a*e[c])}}function zJ(t,e="x"){const r=TP(e),n=t.length,i=Array(n).fill(0),a=Array(n);let o,s,l,c=ms(t,0);for(o=0;o<n;++o)if(s=l,l=c,c=ms(t,o+1),!!l){if(c){const d=c[e]-l[e];i[o]=d!==0?(c[r]-l[r])/d:0}a[o]=s?c?hs(i[o-1])!==hs(i[o])?0:(i[o-1]+i[o])/2:i[o-1]:i[o]}WJ(t,i,a),BJ(t,a,e)}function tf(t,e,r){return Math.max(Math.min(t,r),e)}function VJ(t,e){let r,n,i,a,o,s=Uu(t[0],e);for(r=0,n=t.length;r<n;++r)o=a,a=s,s=r<n-1&&Uu(t[r+1],e),a&&(i=t[r],o&&(i.cp1x=tf(i.cp1x,e.left,e.right),i.cp1y=tf(i.cp1y,e.top,e.bottom)),s&&(i.cp2x=tf(i.cp2x,e.left,e.right),i.cp2y=tf(i.cp2y,e.top,e.bottom)))}function GJ(t,e,r,n,i){let a,o,s,l;if(e.spanGaps&&(t=t.filter(c=>!c.skip)),e.cubicInterpolationMode==="monotone")zJ(t,i);else{let c=n?t[t.length-1]:t[0];for(a=0,o=t.length;a<o;++a)s=t[a],l=HJ(c,s,t[Math.min(a+1,o-(n?0:1))%o],e.tension),s.cp1x=l.previous.x,s.cp1y=l.previous.y,s.cp2x=l.next.x,s.cp2y=l.next.y,c=s}e.capBezierPoints&&VJ(t,r)}function SP(){return typeof window<"u"&&typeof document<"u"}function qb(t){let e=t.parentNode;return e&&e.toString()==="[object ShadowRoot]"&&(e=e.host),e}function fd(t,e,r){let n;return typeof t=="string"?(n=parseInt(t,10),t.indexOf("%")!==-1&&(n=n/100*e.parentNode[r])):n=t,n}const Kd=t=>t.ownerDocument.defaultView.getComputedStyle(t,null);function KJ(t,e){return Kd(t).getPropertyValue(e)}const XJ=["top","right","bottom","left"];function oo(t,e,r){const n={};r=r?"-"+r:"";for(let i=0;i<4;i++){const a=XJ[i];n[a]=parseFloat(t[e+"-"+a+r])||0}return n.width=n.left+n.right,n.height=n.top+n.bottom,n}const YJ=(t,e,r)=>(t>0||e>0)&&(!r||!r.shadowRoot);function ZJ(t,e){const r=t.touches,n=r&&r.length?r[0]:t,{offsetX:i,offsetY:a}=n;let o=!1,s,l;if(YJ(i,a,t.target))s=i,l=a;else{const c=e.getBoundingClientRect();s=n.clientX-c.left,l=n.clientY-c.top,o=!0}return{x:s,y:l,box:o}}function Xa(t,e){if("native"in t)return t;const{canvas:r,currentDevicePixelRatio:n}=e,i=Kd(r),a=i.boxSizing==="border-box",o=oo(i,"padding"),s=oo(i,"border","width"),{x:l,y:c,box:d}=ZJ(t,r),h=o.left+(d&&s.left),g=o.top+(d&&s.top);let{width:m,height:v}=e;return a&&(m-=o.width+s.width,v-=o.height+s.height),{x:Math.round((l-h)/m*r.width/n),y:Math.round((c-g)/v*r.height/n)}}function JJ(t,e,r){let n,i;if(e===void 0||r===void 0){const a=qb(t);if(!a)e=t.clientWidth,r=t.clientHeight;else{const o=a.getBoundingClientRect(),s=Kd(a),l=oo(s,"border","width"),c=oo(s,"padding");e=o.width-c.width-l.width,r=o.height-c.height-l.height,n=fd(s.maxWidth,a,"clientWidth"),i=fd(s.maxHeight,a,"clientHeight")}}return{width:e,height:r,maxWidth:n||sd,maxHeight:i||sd}}const rf=t=>Math.round(t*10)/10;function QJ(t,e,r,n){const i=Kd(t),a=oo(i,"margin"),o=fd(i.maxWidth,t,"clientWidth")||sd,s=fd(i.maxHeight,t,"clientHeight")||sd,l=JJ(t,e,r);let{width:c,height:d}=l;if(i.boxSizing==="content-box"){const g=oo(i,"border","width"),m=oo(i,"padding");c-=m.width+g.width,d-=m.height+g.height}return c=Math.max(0,c-a.width),d=Math.max(0,n?c/n:d-a.height),c=rf(Math.min(c,o,l.maxWidth)),d=rf(Math.min(d,s,l.maxHeight)),c&&!d&&(d=rf(c/2)),(e!==void 0||r!==void 0)&&n&&l.height&&d>l.height&&(d=l.height,c=rf(Math.floor(d*n))),{width:c,height:d}}function cA(t,e,r){const n=e||1,i=Math.floor(t.height*n),a=Math.floor(t.width*n);t.height=Math.floor(t.height),t.width=Math.floor(t.width);const o=t.canvas;return o.style&&(r||!o.style.height&&!o.style.width)&&(o.style.height=`${t.height}px`,o.style.width=`${t.width}px`),t.currentDevicePixelRatio!==n||o.height!==i||o.width!==a?(t.currentDevicePixelRatio=n,o.height=i,o.width=a,t.ctx.setTransform(n,0,0,n,0,0),!0):!1}const eQ=(function(){let t=!1;try{const e={get passive(){return t=!0,!1}};window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch{}return t})();function fA(t,e){const r=KJ(t,e),n=r&&r.match(/^(\d+)(\.\d+)?px$/);return n?+n[1]:void 0}function Ya(t,e,r,n){return{x:t.x+r*(e.x-t.x),y:t.y+r*(e.y-t.y)}}function tQ(t,e,r,n){return{x:t.x+r*(e.x-t.x),y:n==="middle"?r<.5?t.y:e.y:n==="after"?r<1?t.y:e.y:r>0?e.y:t.y}}function rQ(t,e,r,n){const i={x:t.cp2x,y:t.cp2y},a={x:e.cp1x,y:e.cp1y},o=Ya(t,i,r),s=Ya(i,a,r),l=Ya(a,e,r),c=Ya(o,s,r),d=Ya(s,l,r);return Ya(c,d,r)}const nQ=function(t,e){return{x(r){return t+t+e-r},setWidth(r){e=r},textAlign(r){return r==="center"?r:r==="right"?"left":"right"},xPlus(r,n){return r-n},leftForLtr(r,n){return r-n}}},iQ=function(){return{x(t){return t},setWidth(t){},textAlign(t){return t},xPlus(t,e){return t+e},leftForLtr(t,e){return t}}};function ns(t,e,r){return t?nQ(e,r):iQ()}function CP(t,e){let r,n;(e==="ltr"||e==="rtl")&&(r=t.canvas.style,n=[r.getPropertyValue("direction"),r.getPropertyPriority("direction")],r.setProperty("direction",e,"important"),t.prevTextDirection=n)}function EP(t,e){e!==void 0&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function OP(t){return t==="angle"?{between:cP,compare:tJ,normalize:li}:{between:Qo,compare:(e,r)=>e-r,normalize:e=>e}}function dA({start:t,end:e,count:r,loop:n,style:i}){return{start:t%r,end:e%r,loop:n&&(e-t+1)%r===0,style:i}}function aQ(t,e,r){const{property:n,start:i,end:a}=r,{between:o,normalize:s}=OP(n),l=e.length;let{start:c,end:d,loop:h}=t,g,m;if(h){for(c+=l,d+=l,g=0,m=l;g<m&&o(s(e[c%l][n]),i,a);++g)c--,d--;c%=l,d%=l}return d<c&&(d+=l),{start:c,end:d,loop:h,style:t.style}}function AP(t,e,r){if(!r)return[t];const{property:n,start:i,end:a}=r,o=e.length,{compare:s,between:l,normalize:c}=OP(n),{start:d,end:h,loop:g,style:m}=aQ(t,e,r),v=[];let _=!1,y=null,x,w,C;const A=()=>l(i,C,x)&&s(i,C)!==0,E=()=>s(a,x)===0||l(a,C,x),S=()=>_||A(),T=()=>!_||E();for(let D=d,P=d;D<=h;++D)w=e[D%o],!w.skip&&(x=c(w[n]),x!==C&&(_=l(x,i,a),y===null&&S()&&(y=s(x,i)===0?D:P),y!==null&&T()&&(v.push(dA({start:y,end:D,loop:g,count:o,style:m})),y=null),P=D,C=x));return y!==null&&v.push(dA({start:y,end:h,loop:g,count:o,style:m})),v}function RP(t,e){const r=[],n=t.segments;for(let i=0;i<n.length;i++){const a=AP(n[i],t.points,e);a.length&&r.push(...a)}return r}function oQ(t,e,r,n){let i=0,a=e-1;if(r&&!n)for(;i<e&&!t[i].skip;)i++;for(;i<e&&t[i].skip;)i++;for(i%=e,r&&(a+=i);a>i&&t[a%e].skip;)a--;return a%=e,{start:i,end:a}}function sQ(t,e,r,n){const i=t.length,a=[];let o=e,s=t[e],l;for(l=e+1;l<=r;++l){const c=t[l%i];c.skip||c.stop?s.skip||(n=!1,a.push({start:e%i,end:(l-1)%i,loop:n}),e=o=c.stop?l:null):(o=l,s.skip&&(e=l)),s=c}return o!==null&&a.push({start:e%i,end:o%i,loop:n}),a}function uQ(t,e){const r=t.points,n=t.options.spanGaps,i=r.length;if(!i)return[];const a=!!t._loop,{start:o,end:s}=oQ(r,i,a,n);if(n===!0)return hA(t,[{start:o,end:s,loop:a}],r,e);const l=s<o?s+i:s,c=!!t._fullLoop&&o===0&&s===i-1;return hA(t,sQ(r,o,l,c),r,e)}function hA(t,e,r,n){return!n||!n.setContext||!r?e:lQ(t,e,r,n)}function lQ(t,e,r,n){const i=t._chart.getContext(),a=pA(t.options),{_datasetIndex:o,options:{spanGaps:s}}=t,l=r.length,c=[];let d=a,h=e[0].start,g=h;function m(v,_,y,x){const w=s?-1:1;if(v!==_){for(v+=l;r[v%l].skip;)v-=w;for(;r[_%l].skip;)_+=w;v%l!==_%l&&(c.push({start:v%l,end:_%l,loop:y,style:x}),d=x,h=_%l)}}for(const v of e){h=s?h:v.start;let _=r[h%l],y;for(g=h+1;g<=v.end;g++){const x=r[g%l];y=pA(n.setContext(To(i,{type:"segment",p0:_,p1:x,p0DataIndex:(g-1)%l,p1DataIndex:g%l,datasetIndex:o}))),cQ(y,d)&&m(h,g-1,v.loop,d),_=x,d=y}h<g-1&&m(h,g-1,v.loop,d)}return c}function pA(t){return{backgroundColor:t.backgroundColor,borderCapStyle:t.borderCapStyle,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderJoinStyle:t.borderJoinStyle,borderWidth:t.borderWidth,borderColor:t.borderColor}}function cQ(t,e){if(!e)return!1;const r=[],n=function(i,a){return kb(a)?(r.includes(a)||r.push(a),r.indexOf(a)):a};return JSON.stringify(t,n)!==JSON.stringify(e,n)}/*!
|
|
103
|
+
* Chart.js v4.4.0
|
|
104
|
+
* https://www.chartjs.org
|
|
105
|
+
* (c) 2023 Chart.js Contributors
|
|
106
|
+
* Released under the MIT License
|
|
107
|
+
*/class fQ{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(e,r,n,i){const a=r.listeners[i],o=r.duration;a.forEach(s=>s({chart:e,initial:r.initial,numSteps:o,currentStep:Math.min(n-r.start,o)}))}_refresh(){this._request||(this._running=!0,this._request=dP.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(e=Date.now()){let r=0;this._charts.forEach((n,i)=>{if(!n.running||!n.items.length)return;const a=n.items;let o=a.length-1,s=!1,l;for(;o>=0;--o)l=a[o],l._active?(l._total>n.duration&&(n.duration=l._total),l.tick(e),s=!0):(a[o]=a[a.length-1],a.pop());s&&(i.draw(),this._notify(i,n,e,"progress")),a.length||(n.running=!1,this._notify(i,n,e,"complete"),n.initial=!1),r+=a.length}),this._lastDate=e,r===0&&(this._running=!1)}_getAnims(e){const r=this._charts;let n=r.get(e);return n||(n={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},r.set(e,n)),n}listen(e,r,n){this._getAnims(e).listeners[r].push(n)}add(e,r){!r||!r.length||this._getAnims(e).items.push(...r)}has(e){return this._getAnims(e).items.length>0}start(e){const r=this._charts.get(e);r&&(r.running=!0,r.start=Date.now(),r.duration=r.items.reduce((n,i)=>Math.max(n,i._duration),0),this._refresh())}running(e){if(!this._running)return!1;const r=this._charts.get(e);return!(!r||!r.running||!r.items.length)}stop(e){const r=this._charts.get(e);if(!r||!r.items.length)return;const n=r.items;let i=n.length-1;for(;i>=0;--i)n[i].cancel();r.items=[],this._notify(e,r,Date.now(),"complete")}remove(e){return this._charts.delete(e)}}var Di=new fQ;const gA="transparent",dQ={boolean(t,e,r){return r>.5?e:t},color(t,e,r){const n=iA(t||gA),i=n.valid&&iA(e||gA);return i&&i.valid?i.mix(n,r).hexString():e},number(t,e,r){return t+(e-t)*r}};class hQ{constructor(e,r,n,i){const a=r[n];i=ef([e.to,i,a,e.from]);const o=ef([e.from,a,i]);this._active=!0,this._fn=e.fn||dQ[e.type||typeof o],this._easing=Au[e.easing]||Au.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=r,this._prop=n,this._from=o,this._to=i,this._promises=void 0}active(){return this._active}update(e,r,n){if(this._active){this._notify(!1);const i=this._target[this._prop],a=n-this._start,o=this._duration-a;this._start=n,this._duration=Math.floor(Math.max(o,e.duration)),this._total+=a,this._loop=!!e.loop,this._to=ef([e.to,r,i,e.from]),this._from=ef([e.from,i,r])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){const r=e-this._start,n=this._duration,i=this._prop,a=this._from,o=this._loop,s=this._to;let l;if(this._active=a!==s&&(o||r<n),!this._active){this._target[i]=s,this._notify(!0);return}if(r<0){this._target[i]=a;return}l=r/n%2,l=o&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[i]=this._fn(a,s,l)}wait(){const e=this._promises||(this._promises=[]);return new Promise((r,n)=>{e.push({res:r,rej:n})})}_notify(e){const r=e?"res":"rej",n=this._promises||[];for(let i=0;i<n.length;i++)n[i][r]()}}class Hb{constructor(e,r){this._chart=e,this._properties=new Map,this.configure(r)}configure(e){if(!st(e))return;const r=Object.keys(lr.animation),n=this._properties;Object.getOwnPropertyNames(e).forEach(i=>{const a=e[i];if(!st(a))return;const o={};for(const s of r)o[s]=a[s];(Xt(a.properties)&&a.properties||[i]).forEach(s=>{(s===i||!n.has(s))&&n.set(s,o)})})}_animateOptions(e,r){const n=r.options,i=gQ(e,n);if(!i)return[];const a=this._createAnimations(i,n);return n.$shared&&pQ(e.options.$animations,n).then(()=>{e.options=n},()=>{}),a}_createAnimations(e,r){const n=this._properties,i=[],a=e.$animations||(e.$animations={}),o=Object.keys(r),s=Date.now();let l;for(l=o.length-1;l>=0;--l){const c=o[l];if(c.charAt(0)==="$")continue;if(c==="options"){i.push(...this._animateOptions(e,r));continue}const d=r[c];let h=a[c];const g=n.get(c);if(h)if(g&&h.active()){h.update(g,d,s);continue}else h.cancel();if(!g||!g.duration){e[c]=d;continue}a[c]=h=new hQ(g,e,c,d),i.push(h)}return i}update(e,r){if(this._properties.size===0){Object.assign(e,r);return}const n=this._createAnimations(e,r);if(n.length)return Di.add(this._chart,n),!0}}function pQ(t,e){const r=[],n=Object.keys(e);for(let i=0;i<n.length;i++){const a=t[n[i]];a&&a.active()&&r.push(a.wait())}return Promise.all(r)}function gQ(t,e){if(!e)return;let r=t.options;if(!r){t.options=e;return}return r.$shared&&(t.options=r=Object.assign({},r,{$shared:!1,$animations:{}})),r}function mA(t,e){const r=t&&t.options||{},n=r.reverse,i=r.min===void 0?e:0,a=r.max===void 0?e:0;return{start:n?a:i,end:n?i:a}}function mQ(t,e,r){if(r===!1)return!1;const n=mA(t,r),i=mA(e,r);return{top:i.end,right:n.end,bottom:i.start,left:n.start}}function vQ(t){let e,r,n,i;return st(t)?(e=t.top,r=t.right,n=t.bottom,i=t.left):e=r=n=i=t,{top:e,right:r,bottom:n,left:i,disabled:t===!1}}function IP(t,e){const r=[],n=t._getSortedDatasetMetas(e);let i,a;for(i=0,a=n.length;i<a;++i)r.push(n[i].index);return r}function vA(t,e,r,n={}){const i=t.keys,a=n.mode==="single";let o,s,l,c;if(e!==null){for(o=0,s=i.length;o<s;++o){if(l=+i[o],l===r){if(n.all)continue;break}c=t.values[l],Rr(c)&&(a||e===0||hs(e)===hs(c))&&(e+=c)}return e}}function yQ(t){const e=Object.keys(t),r=new Array(e.length);let n,i,a;for(n=0,i=e.length;n<i;++n)a=e[n],r[n]={x:a,y:t[a]};return r}function yA(t,e){const r=t&&t.options.stacked;return r||r===void 0&&e.stack!==void 0}function bQ(t,e,r){return`${t.id}.${e.id}.${r.stack||r.type}`}function _Q(t){const{min:e,max:r,minDefined:n,maxDefined:i}=t.getUserBounds();return{min:n?e:Number.NEGATIVE_INFINITY,max:i?r:Number.POSITIVE_INFINITY}}function xQ(t,e,r){const n=t[e]||(t[e]={});return n[r]||(n[r]={})}function bA(t,e,r,n){for(const i of e.getMatchingVisibleMetas(n).reverse()){const a=t[i.index];if(r&&a>0||!r&&a<0)return i.index}return null}function _A(t,e){const{chart:r,_cachedMeta:n}=t,i=r._stacks||(r._stacks={}),{iScale:a,vScale:o,index:s}=n,l=a.axis,c=o.axis,d=bQ(a,o,n),h=e.length;let g;for(let m=0;m<h;++m){const v=e[m],{[l]:_,[c]:y}=v,x=v._stacks||(v._stacks={});g=x[c]=xQ(i,d,_),g[s]=y,g._top=bA(g,o,!0,n.type),g._bottom=bA(g,o,!1,n.type);const w=g._visualValues||(g._visualValues={});w[s]=y}}function dy(t,e){const r=t.scales;return Object.keys(r).filter(n=>r[n].axis===e).shift()}function wQ(t,e){return To(t,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}function TQ(t,e,r){return To(t,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:r,index:e,mode:"default",type:"data"})}function su(t,e){const r=t.controller.index,n=t.vScale&&t.vScale.axis;if(n){e=e||t._parsed;for(const i of e){const a=i._stacks;if(!a||a[n]===void 0||a[n][r]===void 0)return;delete a[n][r],a[n]._visualValues!==void 0&&a[n]._visualValues[r]!==void 0&&delete a[n]._visualValues[r]}}}const hy=t=>t==="reset"||t==="none",xA=(t,e)=>e?t:Object.assign({},t),SQ=(t,e,r)=>t&&!e.hidden&&e._stacked&&{keys:IP(r,!0),values:null};class Iu{constructor(e,r){this.chart=e,this._ctx=e.ctx,this.index=r,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const e=this._cachedMeta;this.configure(),this.linkScales(),e._stacked=yA(e.vScale,e),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(e){this.index!==e&&su(this._cachedMeta),this.index=e}linkScales(){const e=this.chart,r=this._cachedMeta,n=this.getDataset(),i=(h,g,m,v)=>h==="x"?g:h==="r"?v:m,a=r.xAxisID=tt(n.xAxisID,dy(e,"x")),o=r.yAxisID=tt(n.yAxisID,dy(e,"y")),s=r.rAxisID=tt(n.rAxisID,dy(e,"r")),l=r.indexAxis,c=r.iAxisID=i(l,a,o,s),d=r.vAxisID=i(l,o,a,s);r.xScale=this.getScaleForId(a),r.yScale=this.getScaleForId(o),r.rScale=this.getScaleForId(s),r.iScale=this.getScaleForId(c),r.vScale=this.getScaleForId(d)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(e){return this.chart.scales[e]}_getOtherScale(e){const r=this._cachedMeta;return e===r.iScale?r.vScale:r.iScale}reset(){this._update("reset")}_destroy(){const e=this._cachedMeta;this._data&&tA(this._data,this),e._stacked&&su(e)}_dataCheck(){const e=this.getDataset(),r=e.data||(e.data=[]),n=this._data;if(st(r))this._data=yQ(r);else if(n!==r){if(n){tA(n,this);const i=this._cachedMeta;su(i),i._parsed=[]}r&&Object.isExtensible(r)&&aJ(r,this),this._syncList=[],this._data=r}}addElements(){const e=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(e.dataset=new this.datasetElementType)}buildOrUpdateElements(e){const r=this._cachedMeta,n=this.getDataset();let i=!1;this._dataCheck();const a=r._stacked;r._stacked=yA(r.vScale,r),r.stack!==n.stack&&(i=!0,su(r),r.stack=n.stack),this._resyncElements(e),(i||a!==r._stacked)&&_A(this,r._parsed)}configure(){const e=this.chart.config,r=e.datasetScopeKeys(this._type),n=e.getOptionScopes(this.getDataset(),r,!0);this.options=e.createResolver(n,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(e,r){const{_cachedMeta:n,_data:i}=this,{iScale:a,_stacked:o}=n,s=a.axis;let l=e===0&&r===i.length?!0:n._sorted,c=e>0&&n._parsed[e-1],d,h,g;if(this._parsing===!1)n._parsed=i,n._sorted=!0,g=i;else{Xt(i[e])?g=this.parseArrayData(n,i,e,r):st(i[e])?g=this.parseObjectData(n,i,e,r):g=this.parsePrimitiveData(n,i,e,r);const m=()=>h[s]===null||c&&h[s]<c[s];for(d=0;d<r;++d)n._parsed[d+e]=h=g[d],l&&(m()&&(l=!1),c=h);n._sorted=l}o&&_A(this,g)}parsePrimitiveData(e,r,n,i){const{iScale:a,vScale:o}=e,s=a.axis,l=o.axis,c=a.getLabels(),d=a===o,h=new Array(i);let g,m,v;for(g=0,m=i;g<m;++g)v=g+n,h[g]={[s]:d||a.parse(c[v],v),[l]:o.parse(r[v],v)};return h}parseArrayData(e,r,n,i){const{xScale:a,yScale:o}=e,s=new Array(i);let l,c,d,h;for(l=0,c=i;l<c;++l)d=l+n,h=r[d],s[l]={x:a.parse(h[0],d),y:o.parse(h[1],d)};return s}parseObjectData(e,r,n,i){const{xScale:a,yScale:o}=e,{xAxisKey:s="x",yAxisKey:l="y"}=this._parsing,c=new Array(i);let d,h,g,m;for(d=0,h=i;d<h;++d)g=d+n,m=r[g],c[d]={x:a.parse(od(m,s),g),y:o.parse(od(m,l),g)};return c}getParsed(e){return this._cachedMeta._parsed[e]}getDataElement(e){return this._cachedMeta.data[e]}applyStack(e,r,n){const i=this.chart,a=this._cachedMeta,o=r[e.axis],s={keys:IP(i,!0),values:r._stacks[e.axis]._visualValues};return vA(s,o,a.index,{mode:n})}updateRangeFromParsed(e,r,n,i){const a=n[r.axis];let o=a===null?NaN:a;const s=i&&n._stacks[r.axis];i&&s&&(i.values=s,o=vA(i,a,this._cachedMeta.index)),e.min=Math.min(e.min,o),e.max=Math.max(e.max,o)}getMinMax(e,r){const n=this._cachedMeta,i=n._parsed,a=n._sorted&&e===n.iScale,o=i.length,s=this._getOtherScale(e),l=SQ(r,n,this.chart),c={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:d,max:h}=_Q(s);let g,m;function v(){m=i[g];const _=m[s.axis];return!Rr(m[e.axis])||d>_||h<_}for(g=0;g<o&&!(!v()&&(this.updateRangeFromParsed(c,e,m,l),a));++g);if(a){for(g=o-1;g>=0;--g)if(!v()){this.updateRangeFromParsed(c,e,m,l);break}}return c}getAllParsedValues(e){const r=this._cachedMeta._parsed,n=[];let i,a,o;for(i=0,a=r.length;i<a;++i)o=r[i][e.axis],Rr(o)&&n.push(o);return n}getMaxOverflow(){return!1}getLabelAndValue(e){const r=this._cachedMeta,n=r.iScale,i=r.vScale,a=this.getParsed(e);return{label:n?""+n.getLabelForValue(a[n.axis]):"",value:i?""+i.getLabelForValue(a[i.axis]):""}}_update(e){const r=this._cachedMeta;this.update(e||"default"),r._clip=vQ(tt(this.options.clip,mQ(r.xScale,r.yScale,this.getMaxOverflow())))}update(e){}draw(){const e=this._ctx,r=this.chart,n=this._cachedMeta,i=n.data||[],a=r.chartArea,o=[],s=this._drawStart||0,l=this._drawCount||i.length-s,c=this.options.drawActiveElementsOnTop;let d;for(n.dataset&&n.dataset.draw(e,a,s,l),d=s;d<s+l;++d){const h=i[d];h.hidden||(h.active&&c?o.push(h):h.draw(e,a))}for(d=0;d<o.length;++d)o[d].draw(e,a)}getStyle(e,r){const n=r?"active":"default";return e===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(n):this.resolveDataElementOptions(e||0,n)}getContext(e,r,n){const i=this.getDataset();let a;if(e>=0&&e<this._cachedMeta.data.length){const o=this._cachedMeta.data[e];a=o.$context||(o.$context=TQ(this.getContext(),e,o)),a.parsed=this.getParsed(e),a.raw=i.data[e],a.index=a.dataIndex=e}else a=this.$context||(this.$context=wQ(this.chart.getContext(),this.index)),a.dataset=i,a.index=a.datasetIndex=this.index;return a.active=!!r,a.mode=n,a}resolveDatasetElementOptions(e){return this._resolveElementOptions(this.datasetElementType.id,e)}resolveDataElementOptions(e,r){return this._resolveElementOptions(this.dataElementType.id,r,e)}_resolveElementOptions(e,r="default",n){const i=r==="active",a=this._cachedDataOpts,o=e+"-"+r,s=a[o],l=this.enableOptionSharing&&Tn(n);if(s)return xA(s,l);const c=this.chart.config,d=c.datasetElementScopeKeys(this._type,e),h=i?[`${e}Hover`,"hover",e,""]:[e,""],g=c.getOptionScopes(this.getDataset(),d),m=Object.keys(lr.elements[e]),v=()=>this.getContext(n,i,r),_=c.resolveNamedOptions(g,m,v,h);return _.$shared&&(_.$shared=l,a[o]=Object.freeze(xA(_,l))),_}_resolveAnimations(e,r,n){const i=this.chart,a=this._cachedDataOpts,o=`animation-${r}`,s=a[o];if(s)return s;let l;if(i.options.animation!==!1){const d=this.chart.config,h=d.datasetAnimationScopeKeys(this._type,r),g=d.getOptionScopes(this.getDataset(),h);l=d.createResolver(g,this.getContext(e,n,r))}const c=new Hb(i,l&&l.animations);return l&&l._cacheable&&(a[o]=Object.freeze(c)),c}getSharedOptions(e){if(e.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},e))}includeOptions(e,r){return!r||hy(e)||this.chart._animationsDisabled}_getSharedOptions(e,r){const n=this.resolveDataElementOptions(e,r),i=this._sharedOptions,a=this.getSharedOptions(n),o=this.includeOptions(r,a)||a!==i;return this.updateSharedOptions(a,r,n),{sharedOptions:a,includeOptions:o}}updateElement(e,r,n,i){hy(i)?Object.assign(e,n):this._resolveAnimations(r,i).update(e,n)}updateSharedOptions(e,r,n){e&&!hy(r)&&this._resolveAnimations(void 0,r).update(e,n)}_setStyle(e,r,n,i){e.active=i;const a=this.getStyle(r,i);this._resolveAnimations(r,n,i).update(e,{options:!i&&this.getSharedOptions(a)||a})}removeHoverStyle(e,r,n){this._setStyle(e,n,"active",!1)}setHoverStyle(e,r,n){this._setStyle(e,n,"active",!0)}_removeDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!1)}_setDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!0)}_resyncElements(e){const r=this._data,n=this._cachedMeta.data;for(const[s,l,c]of this._syncList)this[s](l,c);this._syncList=[];const i=n.length,a=r.length,o=Math.min(a,i);o&&this.parse(0,o),a>i?this._insertElements(i,a-i,e):a<i&&this._removeElements(a,i-a)}_insertElements(e,r,n=!0){const i=this._cachedMeta,a=i.data,o=e+r;let s;const l=c=>{for(c.length+=r,s=c.length-1;s>=o;s--)c[s]=c[s-r]};for(l(a),s=e;s<o;++s)a[s]=new this.dataElementType;this._parsing&&l(i._parsed),this.parse(e,r),n&&this.updateElements(a,e,r,"reset")}updateElements(e,r,n,i){}_removeElements(e,r){const n=this._cachedMeta;if(this._parsing){const i=n._parsed.splice(e,r);n._stacked&&su(n,i)}n.data.splice(e,r)}_sync(e){if(this._parsing)this._syncList.push(e);else{const[r,n,i]=e;this[r](n,i)}this.chart._dataChanges.push([this.index,...e])}_onDataPush(){const e=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-e,e])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(e,r){r&&this._sync(["_removeElements",e,r]);const n=arguments.length-2;n&&this._sync(["_insertElements",e,n])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}Xe(Iu,"defaults",{}),Xe(Iu,"datasetElementType",null),Xe(Iu,"dataElementType",null);class is extends Iu{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(e){const r=this._cachedMeta,{dataset:n,data:i=[],_dataset:a}=r,o=this.chart._animationsDisabled;let{start:s,count:l}=lJ(r,i,o);this._drawStart=s,this._drawCount=l,cJ(r)&&(s=0,l=i.length),n._chart=this.chart,n._datasetIndex=this.index,n._decimated=!!a._decimated,n.points=i;const c=this.resolveDatasetElementOptions(e);this.options.showLine||(c.borderWidth=0),c.segment=this.options.segment,this.updateElement(n,void 0,{animated:!o,options:c},e),this.updateElements(i,s,l,e)}updateElements(e,r,n,i){const a=i==="reset",{iScale:o,vScale:s,_stacked:l,_dataset:c}=this._cachedMeta,{sharedOptions:d,includeOptions:h}=this._getSharedOptions(r,i),g=o.axis,m=s.axis,{spanGaps:v,segment:_}=this.options,y=ho(v)?v:Number.POSITIVE_INFINITY,x=this.chart._animationsDisabled||a||i==="none",w=r+n,C=e.length;let A=r>0&&this.getParsed(r-1);for(let E=0;E<C;++E){const S=e[E],T=x?S:{};if(E<r||E>=w){T.skip=!0;continue}const D=this.getParsed(E),P=ur(D[m]),N=T[g]=o.getPixelForValue(D[g],E),F=T[m]=a||P?s.getBasePixel():s.getPixelForValue(l?this.applyStack(s,D,l):D[m],E);T.skip=isNaN(N)||isNaN(F)||P,T.stop=E>0&&Math.abs(D[g]-A[g])>y,_&&(T.parsed=D,T.raw=c.data[E]),h&&(T.options=d||this.resolveDataElementOptions(E,S.active?"active":i)),x||this.updateElement(S,E,T,i),A=D}}getMaxOverflow(){const e=this._cachedMeta,r=e.dataset,n=r.options&&r.options.borderWidth||0,i=e.data||[];if(!i.length)return n;const a=i[0].size(this.resolveDataElementOptions(0)),o=i[i.length-1].size(this.resolveDataElementOptions(i.length-1));return Math.max(n,a,o)/2}draw(){const e=this._cachedMeta;e.dataset.updateControlPoints(this.chart.chartArea,e.iScale.axis),super.draw()}}Xe(is,"id","line"),Xe(is,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),Xe(is,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});function Ba(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class Wb{constructor(e){Xe(this,"options");this.options=e||{}}static override(e){Object.assign(Wb.prototype,e)}init(){}formats(){return Ba()}parse(){return Ba()}format(){return Ba()}add(){return Ba()}diff(){return Ba()}startOf(){return Ba()}endOf(){return Ba()}}var DP={_date:Wb};function CQ(t,e,r,n){const{controller:i,data:a,_sorted:o}=t,s=i._cachedMeta.iScale;if(s&&e===s.axis&&e!=="r"&&o&&a.length){const l=s._reversePixels?nJ:ro;if(n){if(i._sharedOptions){const c=a[0],d=typeof c.getRange=="function"&&c.getRange(e);if(d){const h=l(a,e,r-d),g=l(a,e,r+d);return{lo:h.lo,hi:g.hi}}}}else return l(a,e,r)}return{lo:0,hi:a.length-1}}function Xd(t,e,r,n,i){const a=t.getSortedVisibleDatasetMetas(),o=r[e];for(let s=0,l=a.length;s<l;++s){const{index:c,data:d}=a[s],{lo:h,hi:g}=CQ(a[s],e,o,i);for(let m=h;m<=g;++m){const v=d[m];v.skip||n(v,c,m)}}}function EQ(t){const e=t.indexOf("x")!==-1,r=t.indexOf("y")!==-1;return function(n,i){const a=e?Math.abs(n.x-i.x):0,o=r?Math.abs(n.y-i.y):0;return Math.sqrt(Math.pow(a,2)+Math.pow(o,2))}}function py(t,e,r,n,i){const a=[];return!i&&!t.isPointInArea(e)||Xd(t,r,e,function(s,l,c){!i&&!Uu(s,t.chartArea,0)||s.inRange(e.x,e.y,n)&&a.push({element:s,datasetIndex:l,index:c})},!0),a}function OQ(t,e,r,n){let i=[];function a(o,s,l){const{startAngle:c,endAngle:d}=o.getProps(["startAngle","endAngle"],n),{angle:h}=eJ(o,{x:e.x,y:e.y});cP(h,c,d)&&i.push({element:o,datasetIndex:s,index:l})}return Xd(t,r,e,a),i}function AQ(t,e,r,n,i,a){let o=[];const s=EQ(r);let l=Number.POSITIVE_INFINITY;function c(d,h,g){const m=d.inRange(e.x,e.y,i);if(n&&!m)return;const v=d.getCenterPoint(i);if(!(!!a||t.isPointInArea(v))&&!m)return;const y=s(e,v);y<l?(o=[{element:d,datasetIndex:h,index:g}],l=y):y===l&&o.push({element:d,datasetIndex:h,index:g})}return Xd(t,r,e,c),o}function gy(t,e,r,n,i,a){return!a&&!t.isPointInArea(e)?[]:r==="r"&&!n?OQ(t,e,r,i):AQ(t,e,r,n,i,a)}function wA(t,e,r,n,i){const a=[],o=r==="x"?"inXRange":"inYRange";let s=!1;return Xd(t,r,e,(l,c,d)=>{l[o](e[r],i)&&(a.push({element:l,datasetIndex:c,index:d}),s=s||l.inRange(e.x,e.y,i))}),n&&!s?[]:a}var RQ={modes:{index(t,e,r,n){const i=Xa(e,t),a=r.axis||"x",o=r.includeInvisible||!1,s=r.intersect?py(t,i,a,n,o):gy(t,i,a,!1,n,o),l=[];return s.length?(t.getSortedVisibleDatasetMetas().forEach(c=>{const d=s[0].index,h=c.data[d];h&&!h.skip&&l.push({element:h,datasetIndex:c.index,index:d})}),l):[]},dataset(t,e,r,n){const i=Xa(e,t),a=r.axis||"xy",o=r.includeInvisible||!1;let s=r.intersect?py(t,i,a,n,o):gy(t,i,a,!1,n,o);if(s.length>0){const l=s[0].datasetIndex,c=t.getDatasetMeta(l).data;s=[];for(let d=0;d<c.length;++d)s.push({element:c[d],datasetIndex:l,index:d})}return s},point(t,e,r,n){const i=Xa(e,t),a=r.axis||"xy",o=r.includeInvisible||!1;return py(t,i,a,n,o)},nearest(t,e,r,n){const i=Xa(e,t),a=r.axis||"xy",o=r.includeInvisible||!1;return gy(t,i,a,r.intersect,n,o)},x(t,e,r,n){const i=Xa(e,t);return wA(t,i,"x",r.intersect,n)},y(t,e,r,n){const i=Xa(e,t);return wA(t,i,"y",r.intersect,n)}}};const MP=["left","top","right","bottom"];function uu(t,e){return t.filter(r=>r.pos===e)}function TA(t,e){return t.filter(r=>MP.indexOf(r.pos)===-1&&r.box.axis===e)}function lu(t,e){return t.sort((r,n)=>{const i=e?n:r,a=e?r:n;return i.weight===a.weight?i.index-a.index:i.weight-a.weight})}function IQ(t){const e=[];let r,n,i,a,o,s;for(r=0,n=(t||[]).length;r<n;++r)i=t[r],{position:a,options:{stack:o,stackWeight:s=1}}=i,e.push({index:r,box:i,pos:a,horizontal:i.isHorizontal(),weight:i.weight,stack:o&&a+o,stackWeight:s});return e}function DQ(t){const e={};for(const r of t){const{stack:n,pos:i,stackWeight:a}=r;if(!n||!MP.includes(i))continue;const o=e[n]||(e[n]={count:0,placed:0,weight:0,size:0});o.count++,o.weight+=a}return e}function MQ(t,e){const r=DQ(t),{vBoxMaxWidth:n,hBoxMaxHeight:i}=e;let a,o,s;for(a=0,o=t.length;a<o;++a){s=t[a];const{fullSize:l}=s.box,c=r[s.stack],d=c&&s.stackWeight/c.weight;s.horizontal?(s.width=d?d*n:l&&e.availableWidth,s.height=i):(s.width=n,s.height=d?d*i:l&&e.availableHeight)}return r}function PQ(t){const e=IQ(t),r=lu(e.filter(c=>c.box.fullSize),!0),n=lu(uu(e,"left"),!0),i=lu(uu(e,"right")),a=lu(uu(e,"top"),!0),o=lu(uu(e,"bottom")),s=TA(e,"x"),l=TA(e,"y");return{fullSize:r,leftAndTop:n.concat(a),rightAndBottom:i.concat(l).concat(o).concat(s),chartArea:uu(e,"chartArea"),vertical:n.concat(i).concat(l),horizontal:a.concat(o).concat(s)}}function SA(t,e,r,n){return Math.max(t[r],e[r])+Math.max(t[n],e[n])}function PP(t,e){t.top=Math.max(t.top,e.top),t.left=Math.max(t.left,e.left),t.bottom=Math.max(t.bottom,e.bottom),t.right=Math.max(t.right,e.right)}function LQ(t,e,r,n){const{pos:i,box:a}=r,o=t.maxPadding;if(!st(i)){r.size&&(t[i]-=r.size);const h=n[r.stack]||{size:0,count:1};h.size=Math.max(h.size,r.horizontal?a.height:a.width),r.size=h.size/h.count,t[i]+=r.size}a.getPadding&&PP(o,a.getPadding());const s=Math.max(0,e.outerWidth-SA(o,t,"left","right")),l=Math.max(0,e.outerHeight-SA(o,t,"top","bottom")),c=s!==t.w,d=l!==t.h;return t.w=s,t.h=l,r.horizontal?{same:c,other:d}:{same:d,other:c}}function NQ(t){const e=t.maxPadding;function r(n){const i=Math.max(e[n]-t[n],0);return t[n]+=i,i}t.y+=r("top"),t.x+=r("left"),r("right"),r("bottom")}function FQ(t,e){const r=e.maxPadding;function n(i){const a={left:0,top:0,right:0,bottom:0};return i.forEach(o=>{a[o]=Math.max(e[o],r[o])}),a}return n(t?["left","right"]:["top","bottom"])}function yu(t,e,r,n){const i=[];let a,o,s,l,c,d;for(a=0,o=t.length,c=0;a<o;++a){s=t[a],l=s.box,l.update(s.width||e.w,s.height||e.h,FQ(s.horizontal,e));const{same:h,other:g}=LQ(e,r,s,n);c|=h&&i.length,d=d||g,l.fullSize||i.push(s)}return c&&yu(i,e,r,n)||d}function nf(t,e,r,n,i){t.top=r,t.left=e,t.right=e+n,t.bottom=r+i,t.width=n,t.height=i}function CA(t,e,r,n){const i=r.padding;let{x:a,y:o}=e;for(const s of t){const l=s.box,c=n[s.stack]||{placed:0,weight:1},d=s.stackWeight/c.weight||1;if(s.horizontal){const h=e.w*d,g=c.size||l.height;Tn(c.start)&&(o=c.start),l.fullSize?nf(l,i.left,o,r.outerWidth-i.right-i.left,g):nf(l,e.left+c.placed,o,h,g),c.start=o,c.placed+=h,o=l.bottom}else{const h=e.h*d,g=c.size||l.width;Tn(c.start)&&(a=c.start),l.fullSize?nf(l,a,i.top,g,r.outerHeight-i.bottom-i.top):nf(l,a,e.top+c.placed,g,h),c.start=a,c.placed+=h,a=l.right}}e.x=a,e.y=o}var ma={addBox(t,e){t.boxes||(t.boxes=[]),e.fullSize=e.fullSize||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw(r){e.draw(r)}}]},t.boxes.push(e)},removeBox(t,e){const r=t.boxes?t.boxes.indexOf(e):-1;r!==-1&&t.boxes.splice(r,1)},configure(t,e,r){e.fullSize=r.fullSize,e.position=r.position,e.weight=r.weight},update(t,e,r,n){if(!t)return;const i=Kr(t.options.layout.padding),a=Math.max(e-i.width,0),o=Math.max(r-i.height,0),s=PQ(t.boxes),l=s.vertical,c=s.horizontal;jt(t.boxes,_=>{typeof _.beforeLayout=="function"&&_.beforeLayout()});const d=l.reduce((_,y)=>y.box.options&&y.box.options.display===!1?_:_+1,0)||1,h=Object.freeze({outerWidth:e,outerHeight:r,padding:i,availableWidth:a,availableHeight:o,vBoxMaxWidth:a/2/d,hBoxMaxHeight:o/2}),g=Object.assign({},i);PP(g,Kr(n));const m=Object.assign({maxPadding:g,w:a,h:o,x:i.left,y:i.top},i),v=MQ(l.concat(c),h);yu(s.fullSize,m,h,v),yu(l,m,h,v),yu(c,m,h,v)&&yu(l,m,h,v),NQ(m),CA(s.leftAndTop,m,h,v),m.x+=m.w,m.y+=m.h,CA(s.rightAndBottom,m,h,v),t.chartArea={left:m.left,top:m.top,right:m.left+m.w,bottom:m.top+m.h,height:m.h,width:m.w},jt(s.chartArea,_=>{const y=_.box;Object.assign(y,t.chartArea),y.update(m.w,m.h,{left:0,top:0,right:0,bottom:0})})}};class LP{acquireContext(e,r){}releaseContext(e){return!1}addEventListener(e,r,n){}removeEventListener(e,r,n){}getDevicePixelRatio(){return 1}getMaximumSize(e,r,n,i){return r=Math.max(0,r||e.width),n=n||e.height,{width:r,height:Math.max(0,i?Math.floor(r/i):n)}}isAttached(e){return!0}updateConfig(e){}}class kQ extends LP{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=!1}}const bf="$chartjs",jQ={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},EA=t=>t===null||t==="";function $Q(t,e){const r=t.style,n=t.getAttribute("height"),i=t.getAttribute("width");if(t[bf]={initial:{height:n,width:i,style:{display:r.display,height:r.height,width:r.width}}},r.display=r.display||"block",r.boxSizing=r.boxSizing||"border-box",EA(i)){const a=fA(t,"width");a!==void 0&&(t.width=a)}if(EA(n))if(t.style.height==="")t.height=t.width/(e||2);else{const a=fA(t,"height");a!==void 0&&(t.height=a)}return t}const NP=eQ?{passive:!0}:!1;function UQ(t,e,r){t.addEventListener(e,r,NP)}function qQ(t,e,r){t.canvas.removeEventListener(e,r,NP)}function HQ(t,e){const r=jQ[t.type]||t.type,{x:n,y:i}=Xa(t,e);return{type:r,chart:e,native:t,x:n!==void 0?n:null,y:i!==void 0?i:null}}function dd(t,e){for(const r of t)if(r===e||r.contains(e))return!0}function WQ(t,e,r){const n=t.canvas,i=new MutationObserver(a=>{let o=!1;for(const s of a)o=o||dd(s.addedNodes,n),o=o&&!dd(s.removedNodes,n);o&&r()});return i.observe(document,{childList:!0,subtree:!0}),i}function BQ(t,e,r){const n=t.canvas,i=new MutationObserver(a=>{let o=!1;for(const s of a)o=o||dd(s.removedNodes,n),o=o&&!dd(s.addedNodes,n);o&&r()});return i.observe(document,{childList:!0,subtree:!0}),i}const qu=new Map;let OA=0;function FP(){const t=window.devicePixelRatio;t!==OA&&(OA=t,qu.forEach((e,r)=>{r.currentDevicePixelRatio!==t&&e()}))}function zQ(t,e){qu.size||window.addEventListener("resize",FP),qu.set(t,e)}function VQ(t){qu.delete(t),qu.size||window.removeEventListener("resize",FP)}function GQ(t,e,r){const n=t.canvas,i=n&&qb(n);if(!i)return;const a=hP((s,l)=>{const c=i.clientWidth;r(s,l),c<i.clientWidth&&r()},window),o=new ResizeObserver(s=>{const l=s[0],c=l.contentRect.width,d=l.contentRect.height;c===0&&d===0||a(c,d)});return o.observe(i),zQ(t,a),o}function my(t,e,r){r&&r.disconnect(),e==="resize"&&VQ(t)}function KQ(t,e,r){const n=t.canvas,i=hP(a=>{t.ctx!==null&&r(HQ(a,t))},t);return UQ(n,e,i),i}class XQ extends LP{acquireContext(e,r){const n=e&&e.getContext&&e.getContext("2d");return n&&n.canvas===e?($Q(e,r),n):null}releaseContext(e){const r=e.canvas;if(!r[bf])return!1;const n=r[bf].initial;["height","width"].forEach(a=>{const o=n[a];ur(o)?r.removeAttribute(a):r.setAttribute(a,o)});const i=n.style||{};return Object.keys(i).forEach(a=>{r.style[a]=i[a]}),r.width=r.width,delete r[bf],!0}addEventListener(e,r,n){this.removeEventListener(e,r);const i=e.$proxies||(e.$proxies={}),o={attach:WQ,detach:BQ,resize:GQ}[r]||KQ;i[r]=o(e,r,n)}removeEventListener(e,r){const n=e.$proxies||(e.$proxies={}),i=n[r];if(!i)return;({attach:my,detach:my,resize:my}[r]||qQ)(e,r,i),n[r]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,r,n,i){return QJ(e,r,n,i)}isAttached(e){const r=qb(e);return!!(r&&r.isConnected)}}function YQ(t){return!SP()||typeof OffscreenCanvas<"u"&&t instanceof OffscreenCanvas?kQ:XQ}var df;let Hn=(df=class{constructor(){Xe(this,"x");Xe(this,"y");Xe(this,"active",!1);Xe(this,"options");Xe(this,"$animations")}tooltipPosition(e){const{x:r,y:n}=this.getProps(["x","y"],e);return{x:r,y:n}}hasValue(){return ho(this.x)&&ho(this.y)}getProps(e,r){const n=this.$animations;if(!r||!n)return this;const i={};return e.forEach(a=>{i[a]=n[a]&&n[a].active()?n[a]._to:this[a]}),i}},Xe(df,"defaults",{}),Xe(df,"defaultRoutes"),df);function ZQ(t,e){const r=t.options.ticks,n=JQ(t),i=Math.min(r.maxTicksLimit||n,n),a=r.major.enabled?eee(e):[],o=a.length,s=a[0],l=a[o-1],c=[];if(o>i)return tee(e,c,a,o/i),c;const d=QQ(a,e,i);if(o>0){let h,g;const m=o>1?Math.round((l-s)/(o-1)):null;for(af(e,c,d,ur(m)?0:s-m,s),h=0,g=o-1;h<g;h++)af(e,c,d,a[h],a[h+1]);return af(e,c,d,l,ur(m)?e.length:l+m),c}return af(e,c,d),c}function JQ(t){const e=t.options.offset,r=t._tickSize(),n=t._length/r+(e?0:1),i=t._maxLength/r;return Math.floor(Math.min(n,i))}function QQ(t,e,r){const n=ree(t),i=e.length/r;if(!n)return Math.max(i,1);const a=ZZ(n);for(let o=0,s=a.length-1;o<s;o++){const l=a[o];if(l>i)return l}return Math.max(i,1)}function eee(t){const e=[];let r,n;for(r=0,n=t.length;r<n;r++)t[r].major&&e.push(r);return e}function tee(t,e,r,n){let i=0,a=r[0],o;for(n=Math.ceil(n),o=0;o<t.length;o++)o===a&&(e.push(t[o]),i++,a=r[i*n])}function af(t,e,r,n,i){const a=tt(n,0),o=Math.min(tt(i,t.length),t.length);let s=0,l,c,d;for(r=Math.ceil(r),i&&(l=i-n,r=l/Math.floor(l/r)),d=a;d<0;)s++,d=Math.round(a+s*r);for(c=Math.max(a,0);c<o;c++)c===d&&(e.push(t[c]),s++,d=Math.round(a+s*r))}function ree(t){const e=t.length;let r,n;if(e<2)return!1;for(n=t[0],r=1;r<e;++r)if(t[r]-t[r-1]!==n)return!1;return n}const nee=t=>t==="left"?"right":t==="right"?"left":t,AA=(t,e,r)=>e==="top"||e==="left"?t[e]+r:t[e]-r,RA=(t,e)=>Math.min(e||t,t);function IA(t,e){const r=[],n=t.length/e,i=t.length;let a=0;for(;a<i;a+=n)r.push(t[Math.floor(a)]);return r}function iee(t,e,r){const n=t.ticks.length,i=Math.min(e,n-1),a=t._startPixel,o=t._endPixel,s=1e-6;let l=t.getPixelForTick(i),c;if(!(r&&(n===1?c=Math.max(l-a,o-l):e===0?c=(t.getPixelForTick(1)-l)/2:c=(l-t.getPixelForTick(i-1))/2,l+=i<e?c:-c,l<a-s||l>o+s)))return l}function aee(t,e){jt(t,r=>{const n=r.gc,i=n.length/2;let a;if(i>e){for(a=0;a<i;++a)delete r.data[n[a]];n.splice(0,i)}})}function cu(t){return t.drawTicks?t.tickLength:0}function DA(t,e){if(!t.display)return 0;const r=Or(t.font,e),n=Kr(t.padding);return(Xt(t.text)?t.text.length:1)*r.lineHeight+n.height}function oee(t,e){return To(t,{scale:e,type:"scale"})}function see(t,e,r){return To(t,{tick:r,index:e,type:"tick"})}function uee(t,e,r){let n=pP(t);return(r&&e!=="right"||!r&&e==="right")&&(n=nee(n)),n}function lee(t,e,r,n){const{top:i,left:a,bottom:o,right:s,chart:l}=t,{chartArea:c,scales:d}=l;let h=0,g,m,v;const _=o-i,y=s-a;if(t.isHorizontal()){if(m=_n(n,a,s),st(r)){const x=Object.keys(r)[0],w=r[x];v=d[x].getPixelForValue(w)+_-e}else r==="center"?v=(c.bottom+c.top)/2+_-e:v=AA(t,r,e);g=s-a}else{if(st(r)){const x=Object.keys(r)[0],w=r[x];m=d[x].getPixelForValue(w)-y+e}else r==="center"?m=(c.left+c.right)/2-y+e:m=AA(t,r,e);v=_n(n,o,i),h=r==="left"?-Gr:Gr}return{titleX:m,titleY:v,maxWidth:g,rotation:h}}class Es extends Hn{constructor(e){super(),this.id=e.id,this.type=e.type,this.options=void 0,this.ctx=e.ctx,this.chart=e.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(e){this.options=e.setContext(this.getContext()),this.axis=e.axis,this._userMin=this.parse(e.min),this._userMax=this.parse(e.max),this._suggestedMin=this.parse(e.suggestedMin),this._suggestedMax=this.parse(e.suggestedMax)}parse(e,r){return e}getUserBounds(){let{_userMin:e,_userMax:r,_suggestedMin:n,_suggestedMax:i}=this;return e=ai(e,Number.POSITIVE_INFINITY),r=ai(r,Number.NEGATIVE_INFINITY),n=ai(n,Number.POSITIVE_INFINITY),i=ai(i,Number.NEGATIVE_INFINITY),{min:ai(e,n),max:ai(r,i),minDefined:Rr(e),maxDefined:Rr(r)}}getMinMax(e){let{min:r,max:n,minDefined:i,maxDefined:a}=this.getUserBounds(),o;if(i&&a)return{min:r,max:n};const s=this.getMatchingVisibleMetas();for(let l=0,c=s.length;l<c;++l)o=s[l].controller.getMinMax(this,e),i||(r=Math.min(r,o.min)),a||(n=Math.max(n,o.max));return r=a&&r>n?n:r,n=i&&r>n?r:n,{min:ai(r,ai(n,r)),max:ai(n,ai(r,n))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]}getLabelItems(e=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(e))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){$t(this.options.beforeUpdate,[this])}update(e,r,n){const{beginAtZero:i,grace:a,ticks:o}=this.options,s=o.sampleSize;this.beforeUpdate(),this.maxWidth=e,this.maxHeight=r,this._margins=n=Object.assign({left:0,right:0,top:0,bottom:0},n),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+n.left+n.right:this.height+n.top+n.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=DJ(this,a,i),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=s<this.ticks.length;this._convertTicksToLabels(l?IA(this.ticks,s):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),o.display&&(o.autoSkip||o.source==="auto")&&(this.ticks=ZQ(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),l&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let e=this.options.reverse,r,n;this.isHorizontal()?(r=this.left,n=this.right):(r=this.top,n=this.bottom,e=!e),this._startPixel=r,this._endPixel=n,this._reversePixels=e,this._length=n-r,this._alignToPixels=this.options.alignToPixels}afterUpdate(){$t(this.options.afterUpdate,[this])}beforeSetDimensions(){$t(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){$t(this.options.afterSetDimensions,[this])}_callHooks(e){this.chart.notifyPlugins(e,this.getContext()),$t(this.options[e],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){$t(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(e){const r=this.options.ticks;let n,i,a;for(n=0,i=e.length;n<i;n++)a=e[n],a.label=$t(r.callback,[a.value,n,e],this)}afterTickToLabelConversion(){$t(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){$t(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const e=this.options,r=e.ticks,n=RA(this.ticks.length,e.ticks.maxTicksLimit),i=r.minRotation||0,a=r.maxRotation;let o=i,s,l,c;if(!this._isVisible()||!r.display||i>=a||n<=1||!this.isHorizontal()){this.labelRotation=i;return}const d=this._getLabelSizes(),h=d.widest.width,g=d.highest.height,m=Un(this.chart.width-h,0,this.maxWidth);s=e.offset?this.maxWidth/n:m/(n-1),h+6>s&&(s=m/(n-(e.offset?.5:1)),l=this.maxHeight-cu(e.grid)-r.padding-DA(e.title,this.chart.options.font),c=Math.sqrt(h*h+g*g),o=lP(Math.min(Math.asin(Un((d.highest.height+6)/s,-1,1)),Math.asin(Un(l/c,-1,1))-Math.asin(Un(g/c,-1,1)))),o=Math.max(i,Math.min(a,o))),this.labelRotation=o}afterCalculateLabelRotation(){$t(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){$t(this.options.beforeFit,[this])}fit(){const e={width:0,height:0},{chart:r,options:{ticks:n,title:i,grid:a}}=this,o=this._isVisible(),s=this.isHorizontal();if(o){const l=DA(i,r.options.font);if(s?(e.width=this.maxWidth,e.height=cu(a)+l):(e.height=this.maxHeight,e.width=cu(a)+l),n.display&&this.ticks.length){const{first:c,last:d,widest:h,highest:g}=this._getLabelSizes(),m=n.padding*2,v=jr(this.labelRotation),_=Math.cos(v),y=Math.sin(v);if(s){const x=n.mirror?0:y*h.width+_*g.height;e.height=Math.min(this.maxHeight,e.height+x+m)}else{const x=n.mirror?0:_*h.width+y*g.height;e.width=Math.min(this.maxWidth,e.width+x+m)}this._calculatePadding(c,d,y,_)}}this._handleMargins(),s?(this.width=this._length=r.width-this._margins.left-this._margins.right,this.height=e.height):(this.width=e.width,this.height=this._length=r.height-this._margins.top-this._margins.bottom)}_calculatePadding(e,r,n,i){const{ticks:{align:a,padding:o},position:s}=this.options,l=this.labelRotation!==0,c=s!=="top"&&this.axis==="x";if(this.isHorizontal()){const d=this.getPixelForTick(0)-this.left,h=this.right-this.getPixelForTick(this.ticks.length-1);let g=0,m=0;l?c?(g=i*e.width,m=n*r.height):(g=n*e.height,m=i*r.width):a==="start"?m=r.width:a==="end"?g=e.width:a!=="inner"&&(g=e.width/2,m=r.width/2),this.paddingLeft=Math.max((g-d+o)*this.width/(this.width-d),0),this.paddingRight=Math.max((m-h+o)*this.width/(this.width-h),0)}else{let d=r.height/2,h=e.height/2;a==="start"?(d=0,h=e.height):a==="end"&&(d=r.height,h=0),this.paddingTop=d+o,this.paddingBottom=h+o}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){$t(this.options.afterFit,[this])}isHorizontal(){const{axis:e,position:r}=this.options;return r==="top"||r==="bottom"||e==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(e){this.beforeTickToLabelConversion(),this.generateTickLabels(e);let r,n;for(r=0,n=e.length;r<n;r++)ur(e[r].label)&&(e.splice(r,1),n--,r--);this.afterTickToLabelConversion()}_getLabelSizes(){let e=this._labelSizes;if(!e){const r=this.options.ticks.sampleSize;let n=this.ticks;r<n.length&&(n=IA(n,r)),this._labelSizes=e=this._computeLabelSizes(n,n.length,this.options.ticks.maxTicksLimit)}return e}_computeLabelSizes(e,r,n){const{ctx:i,_longestTextCache:a}=this,o=[],s=[],l=Math.floor(r/RA(r,n));let c=0,d=0,h,g,m,v,_,y,x,w,C,A,E;for(h=0;h<r;h+=l){if(v=e[h].label,_=this._resolveTickFontOptions(h),i.font=y=_.string,x=a[y]=a[y]||{data:{},gc:[]},w=_.lineHeight,C=A=0,!ur(v)&&!Xt(v))C=oA(i,x.data,x.gc,C,v),A=w;else if(Xt(v))for(g=0,m=v.length;g<m;++g)E=v[g],!ur(E)&&!Xt(E)&&(C=oA(i,x.data,x.gc,C,E),A+=w);o.push(C),s.push(A),c=Math.max(C,c),d=Math.max(A,d)}aee(a,r);const S=o.indexOf(c),T=s.indexOf(d),D=P=>({width:o[P]||0,height:s[P]||0});return{first:D(0),last:D(r-1),widest:D(S),highest:D(T),widths:o,heights:s}}getLabelForValue(e){return e}getPixelForValue(e,r){return NaN}getValueForPixel(e){}getPixelForTick(e){const r=this.ticks;return e<0||e>r.length-1?null:this.getPixelForValue(r[e].value)}getPixelForDecimal(e){this._reversePixels&&(e=1-e);const r=this._startPixel+e*this._length;return rJ(this._alignToPixels?Wa(this.chart,r,0):r)}getDecimalForPixel(e){const r=(e-this._startPixel)/this._length;return this._reversePixels?1-r:r}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:e,max:r}=this;return e<0&&r<0?r:e>0&&r>0?e:0}getContext(e){const r=this.ticks||[];if(e>=0&&e<r.length){const n=r[e];return n.$context||(n.$context=see(this.getContext(),e,n))}return this.$context||(this.$context=oee(this.chart.getContext(),this))}_tickSize(){const e=this.options.ticks,r=jr(this.labelRotation),n=Math.abs(Math.cos(r)),i=Math.abs(Math.sin(r)),a=this._getLabelSizes(),o=e.autoSkipPadding||0,s=a?a.widest.width+o:0,l=a?a.highest.height+o:0;return this.isHorizontal()?l*n>s*i?s/n:l/i:l*i<s*n?l/n:s/i}_isVisible(){const e=this.options.display;return e!=="auto"?!!e:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(e){const r=this.axis,n=this.chart,i=this.options,{grid:a,position:o,border:s}=i,l=a.offset,c=this.isHorizontal(),h=this.ticks.length+(l?1:0),g=cu(a),m=[],v=s.setContext(this.getContext()),_=v.display?v.width:0,y=_/2,x=function(ie){return Wa(n,ie,_)};let w,C,A,E,S,T,D,P,N,F,B,W;if(o==="top")w=x(this.bottom),T=this.bottom-g,P=w-y,F=x(e.top)+y,W=e.bottom;else if(o==="bottom")w=x(this.top),F=e.top,W=x(e.bottom)-y,T=w+y,P=this.top+g;else if(o==="left")w=x(this.right),S=this.right-g,D=w-y,N=x(e.left)+y,B=e.right;else if(o==="right")w=x(this.left),N=e.left,B=x(e.right)-y,S=w+y,D=this.left+g;else if(r==="x"){if(o==="center")w=x((e.top+e.bottom)/2+.5);else if(st(o)){const ie=Object.keys(o)[0],le=o[ie];w=x(this.chart.scales[ie].getPixelForValue(le))}F=e.top,W=e.bottom,T=w+y,P=T+g}else if(r==="y"){if(o==="center")w=x((e.left+e.right)/2);else if(st(o)){const ie=Object.keys(o)[0],le=o[ie];w=x(this.chart.scales[ie].getPixelForValue(le))}S=w-y,D=S-g,N=e.left,B=e.right}const te=tt(i.ticks.maxTicksLimit,h),J=Math.max(1,Math.ceil(h/te));for(C=0;C<h;C+=J){const ie=this.getContext(C),le=a.setContext(ie),se=s.setContext(ie),ce=le.lineWidth,Q=le.color,$=se.dash||[],X=se.dashOffset,Z=le.tickWidth,fe=le.tickColor,be=le.tickBorderDash||[],_e=le.tickBorderDashOffset;A=iee(this,C,l),A!==void 0&&(E=Wa(n,A,ce),c?S=D=N=B=E:T=P=F=W=E,m.push({tx1:S,ty1:T,tx2:D,ty2:P,x1:N,y1:F,x2:B,y2:W,width:ce,color:Q,borderDash:$,borderDashOffset:X,tickWidth:Z,tickColor:fe,tickBorderDash:be,tickBorderDashOffset:_e}))}return this._ticksLength=h,this._borderValue=w,m}_computeLabelItems(e){const r=this.axis,n=this.options,{position:i,ticks:a}=n,o=this.isHorizontal(),s=this.ticks,{align:l,crossAlign:c,padding:d,mirror:h}=a,g=cu(n.grid),m=g+d,v=h?-d:m,_=-jr(this.labelRotation),y=[];let x,w,C,A,E,S,T,D,P,N,F,B,W="middle";if(i==="top")S=this.bottom-v,T=this._getXAxisLabelAlignment();else if(i==="bottom")S=this.top+v,T=this._getXAxisLabelAlignment();else if(i==="left"){const J=this._getYAxisLabelAlignment(g);T=J.textAlign,E=J.x}else if(i==="right"){const J=this._getYAxisLabelAlignment(g);T=J.textAlign,E=J.x}else if(r==="x"){if(i==="center")S=(e.top+e.bottom)/2+m;else if(st(i)){const J=Object.keys(i)[0],ie=i[J];S=this.chart.scales[J].getPixelForValue(ie)+m}T=this._getXAxisLabelAlignment()}else if(r==="y"){if(i==="center")E=(e.left+e.right)/2-m;else if(st(i)){const J=Object.keys(i)[0],ie=i[J];E=this.chart.scales[J].getPixelForValue(ie)}T=this._getYAxisLabelAlignment(g).textAlign}r==="y"&&(l==="start"?W="top":l==="end"&&(W="bottom"));const te=this._getLabelSizes();for(x=0,w=s.length;x<w;++x){C=s[x],A=C.label;const J=a.setContext(this.getContext(x));D=this.getPixelForTick(x)+a.labelOffset,P=this._resolveTickFontOptions(x),N=P.lineHeight,F=Xt(A)?A.length:1;const ie=F/2,le=J.color,se=J.textStrokeColor,ce=J.textStrokeWidth;let Q=T;o?(E=D,T==="inner"&&(x===w-1?Q=this.options.reverse?"left":"right":x===0?Q=this.options.reverse?"right":"left":Q="center"),i==="top"?c==="near"||_!==0?B=-F*N+N/2:c==="center"?B=-te.highest.height/2-ie*N+N:B=-te.highest.height+N/2:c==="near"||_!==0?B=N/2:c==="center"?B=te.highest.height/2-ie*N:B=te.highest.height-F*N,h&&(B*=-1),_!==0&&!J.showLabelBackdrop&&(E+=N/2*Math.sin(_))):(S=D,B=(1-F)*N/2);let $;if(J.showLabelBackdrop){const X=Kr(J.backdropPadding),Z=te.heights[x],fe=te.widths[x];let be=B-X.top,_e=0-X.left;switch(W){case"middle":be-=Z/2;break;case"bottom":be-=Z;break}switch(T){case"center":_e-=fe/2;break;case"right":_e-=fe;break}$={left:_e,top:be,width:fe+X.width,height:Z+X.height,color:J.backdropColor}}y.push({label:A,font:P,textOffset:B,options:{rotation:_,color:le,strokeColor:se,strokeWidth:ce,textAlign:Q,textBaseline:W,translation:[E,S],backdrop:$}})}return y}_getXAxisLabelAlignment(){const{position:e,ticks:r}=this.options;if(-jr(this.labelRotation))return e==="top"?"left":"right";let i="center";return r.align==="start"?i="left":r.align==="end"?i="right":r.align==="inner"&&(i="inner"),i}_getYAxisLabelAlignment(e){const{position:r,ticks:{crossAlign:n,mirror:i,padding:a}}=this.options,o=this._getLabelSizes(),s=e+a,l=o.widest.width;let c,d;return r==="left"?i?(d=this.right+a,n==="near"?c="left":n==="center"?(c="center",d+=l/2):(c="right",d+=l)):(d=this.right-s,n==="near"?c="right":n==="center"?(c="center",d-=l/2):(c="left",d=this.left)):r==="right"?i?(d=this.left+a,n==="near"?c="right":n==="center"?(c="center",d-=l/2):(c="left",d-=l)):(d=this.left+s,n==="near"?c="left":n==="center"?(c="center",d+=l/2):(c="right",d=this.right)):c="right",{textAlign:c,x:d}}_computeLabelArea(){if(this.options.ticks.mirror)return;const e=this.chart,r=this.options.position;if(r==="left"||r==="right")return{top:0,left:this.left,bottom:e.height,right:this.right};if(r==="top"||r==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:e.width}}drawBackground(){const{ctx:e,options:{backgroundColor:r},left:n,top:i,width:a,height:o}=this;r&&(e.save(),e.fillStyle=r,e.fillRect(n,i,a,o),e.restore())}getLineWidthForValue(e){const r=this.options.grid;if(!this._isVisible()||!r.display)return 0;const i=this.ticks.findIndex(a=>a.value===e);return i>=0?r.setContext(this.getContext(i)).lineWidth:0}drawGrid(e){const r=this.options.grid,n=this.ctx,i=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(e));let a,o;const s=(l,c,d)=>{!d.width||!d.color||(n.save(),n.lineWidth=d.width,n.strokeStyle=d.color,n.setLineDash(d.borderDash||[]),n.lineDashOffset=d.borderDashOffset,n.beginPath(),n.moveTo(l.x,l.y),n.lineTo(c.x,c.y),n.stroke(),n.restore())};if(r.display)for(a=0,o=i.length;a<o;++a){const l=i[a];r.drawOnChartArea&&s({x:l.x1,y:l.y1},{x:l.x2,y:l.y2},l),r.drawTicks&&s({x:l.tx1,y:l.ty1},{x:l.tx2,y:l.ty2},{color:l.tickColor,width:l.tickWidth,borderDash:l.tickBorderDash,borderDashOffset:l.tickBorderDashOffset})}}drawBorder(){const{chart:e,ctx:r,options:{border:n,grid:i}}=this,a=n.setContext(this.getContext()),o=n.display?a.width:0;if(!o)return;const s=i.setContext(this.getContext(0)).lineWidth,l=this._borderValue;let c,d,h,g;this.isHorizontal()?(c=Wa(e,this.left,o)-o/2,d=Wa(e,this.right,s)+s/2,h=g=l):(h=Wa(e,this.top,o)-o/2,g=Wa(e,this.bottom,s)+s/2,c=d=l),r.save(),r.lineWidth=a.width,r.strokeStyle=a.color,r.beginPath(),r.moveTo(c,h),r.lineTo(d,g),r.stroke(),r.restore()}drawLabels(e){if(!this.options.ticks.display)return;const n=this.ctx,i=this._computeLabelArea();i&&tl(n,i);const a=this.getLabelItems(e);for(const o of a){const s=o.options,l=o.font,c=o.label,d=o.textOffset;ld(n,c,0,d,l,s)}i&&rl(n)}drawTitle(){const{ctx:e,options:{position:r,title:n,reverse:i}}=this;if(!n.display)return;const a=Or(n.font),o=Kr(n.padding),s=n.align;let l=a.lineHeight/2;r==="bottom"||r==="center"||st(r)?(l+=o.bottom,Xt(n.text)&&(l+=a.lineHeight*(n.text.length-1))):l+=o.top;const{titleX:c,titleY:d,maxWidth:h,rotation:g}=lee(this,l,r,s);ld(e,n.text,0,0,a,{color:n.color,maxWidth:h,rotation:g,textAlign:uee(s,r,i),textBaseline:"middle",translation:[c,d]})}draw(e){this._isVisible()&&(this.drawBackground(),this.drawGrid(e),this.drawBorder(),this.drawTitle(),this.drawLabels(e))}_layers(){const e=this.options,r=e.ticks&&e.ticks.z||0,n=tt(e.grid&&e.grid.z,-1),i=tt(e.border&&e.border.z,0);return!this._isVisible()||this.draw!==Es.prototype.draw?[{z:r,draw:a=>{this.draw(a)}}]:[{z:n,draw:a=>{this.drawBackground(),this.drawGrid(a),this.drawTitle()}},{z:i,draw:()=>{this.drawBorder()}},{z:r,draw:a=>{this.drawLabels(a)}}]}getMatchingVisibleMetas(e){const r=this.chart.getSortedVisibleDatasetMetas(),n=this.axis+"AxisID",i=[];let a,o;for(a=0,o=r.length;a<o;++a){const s=r[a];s[n]===this.id&&(!e||s.type===e)&&i.push(s)}return i}_resolveTickFontOptions(e){const r=this.options.ticks.setContext(this.getContext(e));return Or(r.font)}_maxDigits(){const e=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/e}}class of{constructor(e,r,n){this.type=e,this.scope=r,this.override=n,this.items=Object.create(null)}isForType(e){return Object.prototype.isPrototypeOf.call(this.type.prototype,e.prototype)}register(e){const r=Object.getPrototypeOf(e);let n;dee(r)&&(n=this.register(r));const i=this.items,a=e.id,o=this.scope+"."+a;if(!a)throw new Error("class does not have id: "+e);return a in i||(i[a]=e,cee(e,o,n),this.override&&lr.override(e.id,e.overrides)),o}get(e){return this.items[e]}unregister(e){const r=this.items,n=e.id,i=this.scope;n in r&&delete r[n],i&&n in lr[i]&&(delete lr[i][n],this.override&&delete po[n])}}function cee(t,e,r){const n=$u(Object.create(null),[r?lr.get(r):{},lr.get(e),t.defaults]);lr.set(e,n),t.defaultRoutes&&fee(e,t.defaultRoutes),t.descriptors&&lr.describe(e,t.descriptors)}function fee(t,e){Object.keys(e).forEach(r=>{const n=r.split("."),i=n.pop(),a=[t].concat(n).join("."),o=e[r].split("."),s=o.pop(),l=o.join(".");lr.route(a,i,l,s)})}function dee(t){return"id"in t&&"defaults"in t}class hee{constructor(){this.controllers=new of(Iu,"datasets",!0),this.elements=new of(Hn,"elements"),this.plugins=new of(Object,"plugins"),this.scales=new of(Es,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...e){this._each("register",e)}remove(...e){this._each("unregister",e)}addControllers(...e){this._each("register",e,this.controllers)}addElements(...e){this._each("register",e,this.elements)}addPlugins(...e){this._each("register",e,this.plugins)}addScales(...e){this._each("register",e,this.scales)}getController(e){return this._get(e,this.controllers,"controller")}getElement(e){return this._get(e,this.elements,"element")}getPlugin(e){return this._get(e,this.plugins,"plugin")}getScale(e){return this._get(e,this.scales,"scale")}removeControllers(...e){this._each("unregister",e,this.controllers)}removeElements(...e){this._each("unregister",e,this.elements)}removePlugins(...e){this._each("unregister",e,this.plugins)}removeScales(...e){this._each("unregister",e,this.scales)}_each(e,r,n){[...r].forEach(i=>{const a=n||this._getRegistryForType(i);n||a.isForType(i)||a===this.plugins&&i.id?this._exec(e,a,i):jt(i,o=>{const s=n||this._getRegistryForType(o);this._exec(e,s,o)})})}_exec(e,r,n){const i=Lb(e);$t(n["before"+i],[],n),r[e](n),$t(n["after"+i],[],n)}_getRegistryForType(e){for(let r=0;r<this._typedRegistries.length;r++){const n=this._typedRegistries[r];if(n.isForType(e))return n}return this.plugins}_get(e,r,n){const i=r.get(e);if(i===void 0)throw new Error('"'+e+'" is not a registered '+n+".");return i}}var ui=new hee;class pee{constructor(){this._init=[]}notify(e,r,n,i){r==="beforeInit"&&(this._init=this._createDescriptors(e,!0),this._notify(this._init,e,"install"));const a=i?this._descriptors(e).filter(i):this._descriptors(e),o=this._notify(a,e,r,n);return r==="afterDestroy"&&(this._notify(a,e,"stop"),this._notify(this._init,e,"uninstall")),o}_notify(e,r,n,i){i=i||{};for(const a of e){const o=a.plugin,s=o[n],l=[r,i,a.options];if($t(s,l,o)===!1&&i.cancelable)return!1}return!0}invalidate(){ur(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(e){if(this._cache)return this._cache;const r=this._cache=this._createDescriptors(e);return this._notifyStateChanges(e),r}_createDescriptors(e,r){const n=e&&e.config,i=tt(n.options&&n.options.plugins,{}),a=gee(n);return i===!1&&!r?[]:vee(e,a,i,r)}_notifyStateChanges(e){const r=this._oldCache||[],n=this._cache,i=(a,o)=>a.filter(s=>!o.some(l=>s.plugin.id===l.plugin.id));this._notify(i(r,n),e,"stop"),this._notify(i(n,r),e,"start")}}function gee(t){const e={},r=[],n=Object.keys(ui.plugins.items);for(let a=0;a<n.length;a++)r.push(ui.getPlugin(n[a]));const i=t.plugins||[];for(let a=0;a<i.length;a++){const o=i[a];r.indexOf(o)===-1&&(r.push(o),e[o.id]=!0)}return{plugins:r,localIds:e}}function mee(t,e){return!e&&t===!1?null:t===!0?{}:t}function vee(t,{plugins:e,localIds:r},n,i){const a=[],o=t.getContext();for(const s of e){const l=s.id,c=mee(n[l],i);c!==null&&a.push({plugin:s,options:yee(t.config,{plugin:s,local:r[l]},c,o)})}return a}function yee(t,{plugin:e,local:r},n,i){const a=t.pluginScopeKeys(e),o=t.getOptionScopes(n,a);return r&&e.defaults&&o.push(e.defaults),t.createResolver(o,i,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function n0(t,e){const r=lr.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||r.indexAxis||"x"}function bee(t,e){let r=t;return t==="_index_"?r=e:t==="_value_"&&(r=e==="x"?"y":"x"),r}function _ee(t,e){return t===e?"_index_":"_value_"}function MA(t){if(t==="x"||t==="y"||t==="r")return t}function xee(t){if(t==="top"||t==="bottom")return"x";if(t==="left"||t==="right")return"y"}function i0(t,...e){if(MA(t))return t;for(const r of e){const n=r.axis||xee(r.position)||t.length>1&&MA(t[0].toLowerCase());if(n)return n}throw new Error(`Cannot determine type of '${t}' axis. Please provide 'axis' or 'position' option.`)}function PA(t,e,r){if(r[e+"AxisID"]===t)return{axis:e}}function wee(t,e){if(e.data&&e.data.datasets){const r=e.data.datasets.filter(n=>n.xAxisID===t||n.yAxisID===t);if(r.length)return PA(t,"x",r[0])||PA(t,"y",r[0])}return{}}function Tee(t,e){const r=po[t.type]||{scales:{}},n=e.scales||{},i=n0(t.type,e),a=Object.create(null);return Object.keys(n).forEach(o=>{const s=n[o];if(!st(s))return console.error(`Invalid scale configuration for scale: ${o}`);if(s._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${o}`);const l=i0(o,s,wee(o,t),lr.scales[s.type]),c=_ee(l,i),d=r.scales||{};a[o]=Eu(Object.create(null),[{axis:l},s,d[l],d[c]])}),t.data.datasets.forEach(o=>{const s=o.type||t.type,l=o.indexAxis||n0(s,e),d=(po[s]||{}).scales||{};Object.keys(d).forEach(h=>{const g=bee(h,l),m=o[g+"AxisID"]||g;a[m]=a[m]||Object.create(null),Eu(a[m],[{axis:g},n[m],d[h]])})}),Object.keys(a).forEach(o=>{const s=a[o];Eu(s,[lr.scales[s.type],lr.scale])}),a}function kP(t){const e=t.options||(t.options={});e.plugins=tt(e.plugins,{}),e.scales=Tee(t,e)}function jP(t){return t=t||{},t.datasets=t.datasets||[],t.labels=t.labels||[],t}function See(t){return t=t||{},t.data=jP(t.data),kP(t),t}const LA=new Map,$P=new Set;function sf(t,e){let r=LA.get(t);return r||(r=e(),LA.set(t,r),$P.add(r)),r}const fu=(t,e,r)=>{const n=od(e,r);n!==void 0&&t.add(n)};class Cee{constructor(e){this._config=See(e),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(e){this._config.type=e}get data(){return this._config.data}set data(e){this._config.data=jP(e)}get options(){return this._config.options}set options(e){this._config.options=e}get plugins(){return this._config.plugins}update(){const e=this._config;this.clearCache(),kP(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return sf(e,()=>[[`datasets.${e}`,""]])}datasetAnimationScopeKeys(e,r){return sf(`${e}.transition.${r}`,()=>[[`datasets.${e}.transitions.${r}`,`transitions.${r}`],[`datasets.${e}`,""]])}datasetElementScopeKeys(e,r){return sf(`${e}-${r}`,()=>[[`datasets.${e}.elements.${r}`,`datasets.${e}`,`elements.${r}`,""]])}pluginScopeKeys(e){const r=e.id,n=this.type;return sf(`${n}-plugin-${r}`,()=>[[`plugins.${r}`,...e.additionalOptionScopes||[]]])}_cachedScopes(e,r){const n=this._scopeCache;let i=n.get(e);return(!i||r)&&(i=new Map,n.set(e,i)),i}getOptionScopes(e,r,n){const{options:i,type:a}=this,o=this._cachedScopes(e,n),s=o.get(r);if(s)return s;const l=new Set;r.forEach(d=>{e&&(l.add(e),d.forEach(h=>fu(l,e,h))),d.forEach(h=>fu(l,i,h)),d.forEach(h=>fu(l,po[a]||{},h)),d.forEach(h=>fu(l,lr,h)),d.forEach(h=>fu(l,t0,h))});const c=Array.from(l);return c.length===0&&c.push(Object.create(null)),$P.has(r)&&o.set(r,c),c}chartOptionScopes(){const{options:e,type:r}=this;return[e,po[r]||{},lr.datasets[r]||{},{type:r},lr,t0]}resolveNamedOptions(e,r,n,i=[""]){const a={$shared:!0},{resolver:o,subPrefixes:s}=NA(this._resolverCache,e,i);let l=o;if(Oee(o,r)){a.$shared=!1,n=ln(n)?n():n;const c=this.createResolver(e,n,s);l=gs(o,n,c)}for(const c of r)a[c]=l[c];return a}createResolver(e,r,n=[""],i){const{resolver:a}=NA(this._resolverCache,e,n);return st(r)?gs(a,r,void 0,i):a}}function NA(t,e,r){let n=t.get(e);n||(n=new Map,t.set(e,n));const i=r.join();let a=n.get(i);return a||(a={resolver:jb(e,r),subPrefixes:r.filter(s=>!s.toLowerCase().includes("hover"))},n.set(i,a)),a}const Eee=t=>st(t)&&Object.getOwnPropertyNames(t).reduce((e,r)=>e||ln(t[r]),!1);function Oee(t,e){const{isScriptable:r,isIndexable:n}=bP(t);for(const i of e){const a=r(i),o=n(i),s=(o||a)&&t[i];if(a&&(ln(s)||Eee(s))||o&&Xt(s))return!0}return!1}var Aee="4.4.0";const Ree=["top","bottom","left","right","chartArea"];function FA(t,e){return t==="top"||t==="bottom"||Ree.indexOf(t)===-1&&e==="x"}function kA(t,e){return function(r,n){return r[t]===n[t]?r[e]-n[e]:r[t]-n[t]}}function jA(t){const e=t.chart,r=e.options.animation;e.notifyPlugins("afterRender"),$t(r&&r.onComplete,[t],e)}function Iee(t){const e=t.chart,r=e.options.animation;$t(r&&r.onProgress,[t],e)}function UP(t){return SP()&&typeof t=="string"?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const _f={},$A=t=>{const e=UP(t);return Object.values(_f).filter(r=>r.canvas===e).pop()};function Dee(t,e,r){const n=Object.keys(t);for(const i of n){const a=+i;if(a>=e){const o=t[i];delete t[i],(r>0||a>e)&&(t[a+r]=o)}}}function Mee(t,e,r,n){return!r||t.type==="mouseout"?null:n?e:t}function uf(t,e,r){return t.options.clip?t[r]:e[r]}function Pee(t,e){const{xScale:r,yScale:n}=t;return r&&n?{left:uf(r,e,"left"),right:uf(r,e,"right"),top:uf(n,e,"top"),bottom:uf(n,e,"bottom")}:e}var oa;let so=(oa=class{static register(...e){ui.add(...e),UA()}static unregister(...e){ui.remove(...e),UA()}constructor(e,r){const n=this.config=new Cee(r),i=UP(e),a=$A(i);if(a)throw new Error("Canvas is already in use. Chart with ID '"+a.id+"' must be destroyed before the canvas with ID '"+a.canvas.id+"' can be reused.");const o=n.createResolver(n.chartOptionScopes(),this.getContext());this.platform=new(n.platform||YQ(i)),this.platform.updateConfig(n);const s=this.platform.acquireContext(i,o.aspectRatio),l=s&&s.canvas,c=l&&l.height,d=l&&l.width;if(this.id=WZ(),this.ctx=s,this.canvas=l,this.width=d,this.height=c,this._options=o,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new pee,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=sJ(h=>this.update(h),o.resizeDelay||0),this._dataChanges=[],_f[this.id]=this,!s||!l){console.error("Failed to create chart: can't acquire context from the given item");return}Di.listen(this,"complete",jA),Di.listen(this,"progress",Iee),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:e,maintainAspectRatio:r},width:n,height:i,_aspectRatio:a}=this;return ur(e)?r&&a?a:i?n/i:null:e}get data(){return this.config.data}set data(e){this.config.data=e}get options(){return this._options}set options(e){this.config.options=e}get registry(){return ui}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():cA(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return sA(this.canvas,this.ctx),this}stop(){return Di.stop(this),this}resize(e,r){Di.running(this)?this._resizeBeforeDraw={width:e,height:r}:this._resize(e,r)}_resize(e,r){const n=this.options,i=this.canvas,a=n.maintainAspectRatio&&this.aspectRatio,o=this.platform.getMaximumSize(i,e,r,a),s=n.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=o.width,this.height=o.height,this._aspectRatio=this.aspectRatio,cA(this,s,!0)&&(this.notifyPlugins("resize",{size:o}),$t(n.onResize,[this,o],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const r=this.options.scales||{};jt(r,(n,i)=>{n.id=i})}buildOrUpdateScales(){const e=this.options,r=e.scales,n=this.scales,i=Object.keys(n).reduce((o,s)=>(o[s]=!1,o),{});let a=[];r&&(a=a.concat(Object.keys(r).map(o=>{const s=r[o],l=i0(o,s),c=l==="r",d=l==="x";return{options:s,dposition:c?"chartArea":d?"bottom":"left",dtype:c?"radialLinear":d?"category":"linear"}}))),jt(a,o=>{const s=o.options,l=s.id,c=i0(l,s),d=tt(s.type,o.dtype);(s.position===void 0||FA(s.position,c)!==FA(o.dposition))&&(s.position=o.dposition),i[l]=!0;let h=null;if(l in n&&n[l].type===d)h=n[l];else{const g=ui.getScale(d);h=new g({id:l,type:d,ctx:this.ctx,chart:this}),n[h.id]=h}h.init(s,e)}),jt(i,(o,s)=>{o||delete n[s]}),jt(n,o=>{ma.configure(this,o,o.options),ma.addBox(this,o)})}_updateMetasets(){const e=this._metasets,r=this.data.datasets.length,n=e.length;if(e.sort((i,a)=>i.index-a.index),n>r){for(let i=r;i<n;++i)this._destroyDatasetMeta(i);e.splice(r,n-r)}this._sortedMetasets=e.slice(0).sort(kA("order","index"))}_removeUnreferencedMetasets(){const{_metasets:e,data:{datasets:r}}=this;e.length>r.length&&delete this._stacks,e.forEach((n,i)=>{r.filter(a=>a===n._dataset).length===0&&this._destroyDatasetMeta(i)})}buildOrUpdateControllers(){const e=[],r=this.data.datasets;let n,i;for(this._removeUnreferencedMetasets(),n=0,i=r.length;n<i;n++){const a=r[n];let o=this.getDatasetMeta(n);const s=a.type||this.config.type;if(o.type&&o.type!==s&&(this._destroyDatasetMeta(n),o=this.getDatasetMeta(n)),o.type=s,o.indexAxis=a.indexAxis||n0(s,this.options),o.order=a.order||0,o.index=n,o.label=""+a.label,o.visible=this.isDatasetVisible(n),o.controller)o.controller.updateIndex(n),o.controller.linkScales();else{const l=ui.getController(s),{datasetElementType:c,dataElementType:d}=lr.datasets[s];Object.assign(l,{dataElementType:ui.getElement(d),datasetElementType:c&&ui.getElement(c)}),o.controller=new l(this,n),e.push(o.controller)}}return this._updateMetasets(),e}_resetElements(){jt(this.data.datasets,(e,r)=>{this.getDatasetMeta(r).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(e){const r=this.config;r.update();const n=this._options=r.createResolver(r.chartOptionScopes(),this.getContext()),i=this._animationsDisabled=!n.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:e,cancelable:!0})===!1)return;const a=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let o=0;for(let c=0,d=this.data.datasets.length;c<d;c++){const{controller:h}=this.getDatasetMeta(c),g=!i&&a.indexOf(h)===-1;h.buildOrUpdateElements(g),o=Math.max(+h.getMaxOverflow(),o)}o=this._minPadding=n.layout.autoPadding?o:0,this._updateLayout(o),i||jt(a,c=>{c.reset()}),this._updateDatasets(e),this.notifyPlugins("afterUpdate",{mode:e}),this._layers.sort(kA("z","_idx"));const{_active:s,_lastEvent:l}=this;l?this._eventHandler(l,!0):s.length&&this._updateHoverStyles(s,s,!0),this.render()}_updateScales(){jt(this.scales,e=>{ma.removeBox(this,e)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const e=this.options,r=new Set(Object.keys(this._listeners)),n=new Set(e.events);(!JO(r,n)||!!this._responsiveListeners!==e.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:e}=this,r=this._getUniformDataChanges()||[];for(const{method:n,start:i,count:a}of r){const o=n==="_removeElements"?-a:a;Dee(e,i,o)}}_getUniformDataChanges(){const e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];const r=this.data.datasets.length,n=a=>new Set(e.filter(o=>o[0]===a).map((o,s)=>s+","+o.splice(1).join(","))),i=n(0);for(let a=1;a<r;a++)if(!JO(i,n(a)))return;return Array.from(i).map(a=>a.split(",")).map(a=>({method:a[1],start:+a[2],count:+a[3]}))}_updateLayout(e){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;ma.update(this,this.width,this.height,e);const r=this.chartArea,n=r.width<=0||r.height<=0;this._layers=[],jt(this.boxes,i=>{n&&i.position==="chartArea"||(i.configure&&i.configure(),this._layers.push(...i._layers()))},this),this._layers.forEach((i,a)=>{i._idx=a}),this.notifyPlugins("afterLayout")}_updateDatasets(e){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:e,cancelable:!0})!==!1){for(let r=0,n=this.data.datasets.length;r<n;++r)this.getDatasetMeta(r).controller.configure();for(let r=0,n=this.data.datasets.length;r<n;++r)this._updateDataset(r,ln(e)?e({datasetIndex:r}):e);this.notifyPlugins("afterDatasetsUpdate",{mode:e})}}_updateDataset(e,r){const n=this.getDatasetMeta(e),i={meta:n,index:e,mode:r,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",i)!==!1&&(n.controller._update(r),i.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",i))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(Di.has(this)?this.attached&&!Di.running(this)&&Di.start(this):(this.draw(),jA({chart:this})))}draw(){let e;if(this._resizeBeforeDraw){const{width:n,height:i}=this._resizeBeforeDraw;this._resize(n,i),this._resizeBeforeDraw=null}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const r=this._layers;for(e=0;e<r.length&&r[e].z<=0;++e)r[e].draw(this.chartArea);for(this._drawDatasets();e<r.length;++e)r[e].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(e){const r=this._sortedMetasets,n=[];let i,a;for(i=0,a=r.length;i<a;++i){const o=r[i];(!e||o.visible)&&n.push(o)}return n}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const e=this.getSortedVisibleDatasetMetas();for(let r=e.length-1;r>=0;--r)this._drawDataset(e[r]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(e){const r=this.ctx,n=e._clip,i=!n.disabled,a=Pee(e,this.chartArea),o={meta:e,index:e.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",o)!==!1&&(i&&tl(r,{left:n.left===!1?0:a.left-n.left,right:n.right===!1?this.width:a.right+n.right,top:n.top===!1?0:a.top-n.top,bottom:n.bottom===!1?this.height:a.bottom+n.bottom}),e.controller.draw(),i&&rl(r),o.cancelable=!1,this.notifyPlugins("afterDatasetDraw",o))}isPointInArea(e){return Uu(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,r,n,i){const a=RQ.modes[r];return typeof a=="function"?a(this,e,n,i):[]}getDatasetMeta(e){const r=this.data.datasets[e],n=this._metasets;let i=n.filter(a=>a&&a._dataset===r).pop();return i||(i={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:r&&r.order||0,index:e,_dataset:r,_parsed:[],_sorted:!1},n.push(i)),i}getContext(){return this.$context||(this.$context=To(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(e){const r=this.data.datasets[e];if(!r)return!1;const n=this.getDatasetMeta(e);return typeof n.hidden=="boolean"?!n.hidden:!r.hidden}setDatasetVisibility(e,r){const n=this.getDatasetMeta(e);n.hidden=!r}toggleDataVisibility(e){this._hiddenIndices[e]=!this._hiddenIndices[e]}getDataVisibility(e){return!this._hiddenIndices[e]}_updateVisibility(e,r,n){const i=n?"show":"hide",a=this.getDatasetMeta(e),o=a.controller._resolveAnimations(void 0,i);Tn(r)?(a.data[r].hidden=!n,this.update()):(this.setDatasetVisibility(e,n),o.update(a,{visible:n}),this.update(s=>s.datasetIndex===e?i:void 0))}hide(e,r){this._updateVisibility(e,r,!1)}show(e,r){this._updateVisibility(e,r,!0)}_destroyDatasetMeta(e){const r=this._metasets[e];r&&r.controller&&r.controller._destroy(),delete this._metasets[e]}_stop(){let e,r;for(this.stop(),Di.remove(this),e=0,r=this.data.datasets.length;e<r;++e)this._destroyDatasetMeta(e)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:e,ctx:r}=this;this._stop(),this.config.clearCache(),e&&(this.unbindEvents(),sA(e,r),this.platform.releaseContext(r),this.canvas=null,this.ctx=null),delete _f[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...e){return this.canvas.toDataURL(...e)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const e=this._listeners,r=this.platform,n=(a,o)=>{r.addEventListener(this,a,o),e[a]=o},i=(a,o,s)=>{a.offsetX=o,a.offsetY=s,this._eventHandler(a)};jt(this.options.events,a=>n(a,i))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const e=this._responsiveListeners,r=this.platform,n=(l,c)=>{r.addEventListener(this,l,c),e[l]=c},i=(l,c)=>{e[l]&&(r.removeEventListener(this,l,c),delete e[l])},a=(l,c)=>{this.canvas&&this.resize(l,c)};let o;const s=()=>{i("attach",s),this.attached=!0,this.resize(),n("resize",a),n("detach",o)};o=()=>{this.attached=!1,i("resize",a),this._stop(),this._resize(0,0),n("attach",s)},r.isAttached(this.canvas)?s():o()}unbindEvents(){jt(this._listeners,(e,r)=>{this.platform.removeEventListener(this,r,e)}),this._listeners={},jt(this._responsiveListeners,(e,r)=>{this.platform.removeEventListener(this,r,e)}),this._responsiveListeners=void 0}updateHoverStyle(e,r,n){const i=n?"set":"remove";let a,o,s,l;for(r==="dataset"&&(a=this.getDatasetMeta(e[0].datasetIndex),a.controller["_"+i+"DatasetHoverStyle"]()),s=0,l=e.length;s<l;++s){o=e[s];const c=o&&this.getDatasetMeta(o.datasetIndex).controller;c&&c[i+"HoverStyle"](o.element,o.datasetIndex,o.index)}}getActiveElements(){return this._active||[]}setActiveElements(e){const r=this._active||[],n=e.map(({datasetIndex:a,index:o})=>{const s=this.getDatasetMeta(a);if(!s)throw new Error("No dataset found at index "+a);return{datasetIndex:a,element:s.data[o],index:o}});!id(n,r)&&(this._active=n,this._lastEvent=null,this._updateHoverStyles(n,r))}notifyPlugins(e,r,n){return this._plugins.notify(this,e,r,n)}isPluginEnabled(e){return this._plugins._cache.filter(r=>r.plugin.id===e).length===1}_updateHoverStyles(e,r,n){const i=this.options.hover,a=(l,c)=>l.filter(d=>!c.some(h=>d.datasetIndex===h.datasetIndex&&d.index===h.index)),o=a(r,e),s=n?e:a(e,r);o.length&&this.updateHoverStyle(o,i.mode,!1),s.length&&i.mode&&this.updateHoverStyle(s,i.mode,!0)}_eventHandler(e,r){const n={event:e,replay:r,cancelable:!0,inChartArea:this.isPointInArea(e)},i=o=>(o.options.events||this.options.events).includes(e.native.type);if(this.notifyPlugins("beforeEvent",n,i)===!1)return;const a=this._handleEvent(e,r,n.inChartArea);return n.cancelable=!1,this.notifyPlugins("afterEvent",n,i),(a||n.changed)&&this.render(),this}_handleEvent(e,r,n){const{_active:i=[],options:a}=this,o=r,s=this._getActiveElements(e,i,n,o),l=XZ(e),c=Mee(e,this._lastEvent,n,l);n&&(this._lastEvent=null,$t(a.onHover,[e,s,this],this),l&&$t(a.onClick,[e,s,this],this));const d=!id(s,i);return(d||r)&&(this._active=s,this._updateHoverStyles(s,i,r)),this._lastEvent=c,d}_getActiveElements(e,r,n,i){if(e.type==="mouseout")return[];if(!n)return r;const a=this.options.hover;return this.getElementsAtEventForMode(e,a.mode,a,i)}},Xe(oa,"defaults",lr),Xe(oa,"instances",_f),Xe(oa,"overrides",po),Xe(oa,"registry",ui),Xe(oa,"version",Aee),Xe(oa,"getChart",$A),oa);function UA(){return jt(so.instances,t=>t._plugins.invalidate())}function qP(t,e,r=e){t.lineCap=tt(r.borderCapStyle,e.borderCapStyle),t.setLineDash(tt(r.borderDash,e.borderDash)),t.lineDashOffset=tt(r.borderDashOffset,e.borderDashOffset),t.lineJoin=tt(r.borderJoinStyle,e.borderJoinStyle),t.lineWidth=tt(r.borderWidth,e.borderWidth),t.strokeStyle=tt(r.borderColor,e.borderColor)}function Lee(t,e,r){t.lineTo(r.x,r.y)}function Nee(t){return t.stepped?xJ:t.tension||t.cubicInterpolationMode==="monotone"?wJ:Lee}function HP(t,e,r={}){const n=t.length,{start:i=0,end:a=n-1}=r,{start:o,end:s}=e,l=Math.max(i,o),c=Math.min(a,s),d=i<o&&a<o||i>s&&a>s;return{count:n,start:l,loop:e.loop,ilen:c<l&&!d?n+c-l:c-l}}function Fee(t,e,r,n){const{points:i,options:a}=e,{count:o,start:s,loop:l,ilen:c}=HP(i,r,n),d=Nee(a);let{move:h=!0,reverse:g}=n||{},m,v,_;for(m=0;m<=c;++m)v=i[(s+(g?c-m:m))%o],!v.skip&&(h?(t.moveTo(v.x,v.y),h=!1):d(t,_,v,g,a.stepped),_=v);return l&&(v=i[(s+(g?c:0))%o],d(t,_,v,g,a.stepped)),!!l}function kee(t,e,r,n){const i=e.points,{count:a,start:o,ilen:s}=HP(i,r,n),{move:l=!0,reverse:c}=n||{};let d=0,h=0,g,m,v,_,y,x;const w=A=>(o+(c?s-A:A))%a,C=()=>{_!==y&&(t.lineTo(d,y),t.lineTo(d,_),t.lineTo(d,x))};for(l&&(m=i[w(0)],t.moveTo(m.x,m.y)),g=0;g<=s;++g){if(m=i[w(g)],m.skip)continue;const A=m.x,E=m.y,S=A|0;S===v?(E<_?_=E:E>y&&(y=E),d=(h*d+A)/++h):(C(),t.lineTo(A,E),v=S,h=0,_=y=E),x=E}C()}function a0(t){const e=t.options,r=e.borderDash&&e.borderDash.length;return!t._decimated&&!t._loop&&!e.tension&&e.cubicInterpolationMode!=="monotone"&&!e.stepped&&!r?kee:Fee}function jee(t){return t.stepped?tQ:t.tension||t.cubicInterpolationMode==="monotone"?rQ:Ya}function $ee(t,e,r,n){let i=e._path;i||(i=e._path=new Path2D,e.path(i,r,n)&&i.closePath()),qP(t,e.options),t.stroke(i)}function Uee(t,e,r,n){const{segments:i,options:a}=e,o=a0(e);for(const s of i)qP(t,a,s.style),t.beginPath(),o(t,e,s,{start:r,end:r+n-1})&&t.closePath(),t.stroke()}const qee=typeof Path2D=="function";function Hee(t,e,r,n){qee&&!e.options.segment?$ee(t,e,r,n):Uee(t,e,r,n)}class va extends Hn{constructor(e){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,e&&Object.assign(this,e)}updateControlPoints(e,r){const n=this.options;if((n.tension||n.cubicInterpolationMode==="monotone")&&!n.stepped&&!this._pointsUpdated){const i=n.spanGaps?this._loop:this._fullLoop;GJ(this._points,n,e,i,r),this._pointsUpdated=!0}}set points(e){this._points=e,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=uQ(this,this.options.segment))}first(){const e=this.segments,r=this.points;return e.length&&r[e[0].start]}last(){const e=this.segments,r=this.points,n=e.length;return n&&r[e[n-1].end]}interpolate(e,r){const n=this.options,i=e[r],a=this.points,o=RP(this,{property:r,start:i,end:i});if(!o.length)return;const s=[],l=jee(n);let c,d;for(c=0,d=o.length;c<d;++c){const{start:h,end:g}=o[c],m=a[h],v=a[g];if(m===v){s.push(m);continue}const _=Math.abs((i-m[r])/(v[r]-m[r])),y=l(m,v,_,n.stepped);y[r]=e[r],s.push(y)}return s.length===1?s[0]:s}pathSegment(e,r,n){return a0(this)(e,this,r,n)}path(e,r,n){const i=this.segments,a=a0(this);let o=this._loop;r=r||0,n=n||this.points.length-r;for(const s of i)o&=a(e,this,s,{start:r,end:r+n-1});return!!o}draw(e,r,n,i){const a=this.options||{};(this.points||[]).length&&a.borderWidth&&(e.save(),Hee(e,this,n,i),e.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}Xe(va,"id","line"),Xe(va,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),Xe(va,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),Xe(va,"descriptors",{_scriptable:!0,_indexable:e=>e!=="borderDash"&&e!=="fill"});function qA(t,e,r,n){const i=t.options,{[r]:a}=t.getProps([r],n);return Math.abs(e-a)<i.radius+i.hitRadius}class xf extends Hn{constructor(r){super();Xe(this,"parsed");Xe(this,"skip");Xe(this,"stop");this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,r&&Object.assign(this,r)}inRange(r,n,i){const a=this.options,{x:o,y:s}=this.getProps(["x","y"],i);return Math.pow(r-o,2)+Math.pow(n-s,2)<Math.pow(a.hitRadius+a.radius,2)}inXRange(r,n){return qA(this,r,"x",n)}inYRange(r,n){return qA(this,r,"y",n)}getCenterPoint(r){const{x:n,y:i}=this.getProps(["x","y"],r);return{x:n,y:i}}size(r){r=r||this.options||{};let n=r.radius||0;n=Math.max(n,n&&r.hoverRadius||0);const i=n&&r.borderWidth||0;return(n+i)*2}draw(r,n){const i=this.options;this.skip||i.radius<.1||!Uu(this,n,this.size(i)/2)||(r.strokeStyle=i.borderColor,r.lineWidth=i.borderWidth,r.fillStyle=i.backgroundColor,r0(r,i,this.x,this.y))}getRange(){const r=this.options||{};return r.radius+r.hitRadius}}Xe(xf,"id","point"),Xe(xf,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),Xe(xf,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function Wee(t,e,r){const n=t.segments,i=t.points,a=e.points,o=[];for(const s of n){let{start:l,end:c}=s;c=Bb(l,c,i);const d=o0(r,i[l],i[c],s.loop);if(!e.segments){o.push({source:s,target:d,start:i[l],end:i[c]});continue}const h=RP(e,d);for(const g of h){const m=o0(r,a[g.start],a[g.end],g.loop),v=AP(s,i,m);for(const _ of v)o.push({source:_,target:g,start:{[r]:HA(d,m,"start",Math.max)},end:{[r]:HA(d,m,"end",Math.min)}})}}return o}function o0(t,e,r,n){if(n)return;let i=e[t],a=r[t];return t==="angle"&&(i=li(i),a=li(a)),{property:t,start:i,end:a}}function Bee(t,e){const{x:r=null,y:n=null}=t||{},i=e.points,a=[];return e.segments.forEach(({start:o,end:s})=>{s=Bb(o,s,i);const l=i[o],c=i[s];n!==null?(a.push({x:l.x,y:n}),a.push({x:c.x,y:n})):r!==null&&(a.push({x:r,y:l.y}),a.push({x:r,y:c.y}))}),a}function Bb(t,e,r){for(;e>t;e--){const n=r[e];if(!isNaN(n.x)&&!isNaN(n.y))break}return e}function HA(t,e,r,n){return t&&e?n(t[r],e[r]):t?t[r]:e?e[r]:0}function WP(t,e){let r=[],n=!1;return Xt(t)?(n=!0,r=t):r=Bee(t,e),r.length?new va({points:r,options:{tension:0},_loop:n,_fullLoop:n}):null}function WA(t){return t&&t.fill!==!1}function zee(t,e,r){let i=t[e].fill;const a=[e];let o;if(!r)return i;for(;i!==!1&&a.indexOf(i)===-1;){if(!Rr(i))return i;if(o=t[i],!o)return!1;if(o.visible)return i;a.push(i),i=o.fill}return!1}function Vee(t,e,r){const n=Yee(t);if(st(n))return isNaN(n.value)?!1:n;let i=parseFloat(n);return Rr(i)&&Math.floor(i)===i?Gee(n[0],e,i,r):["origin","start","end","stack","shape"].indexOf(n)>=0&&n}function Gee(t,e,r,n){return(t==="-"||t==="+")&&(r=e+r),r===e||r<0||r>=n?!1:r}function Kee(t,e){let r=null;return t==="start"?r=e.bottom:t==="end"?r=e.top:st(t)?r=e.getPixelForValue(t.value):e.getBasePixel&&(r=e.getBasePixel()),r}function Xee(t,e,r){let n;return t==="start"?n=r:t==="end"?n=e.options.reverse?e.min:e.max:st(t)?n=t.value:n=e.getBaseValue(),n}function Yee(t){const e=t.options,r=e.fill;let n=tt(r&&r.target,r);return n===void 0&&(n=!!e.backgroundColor),n===!1||n===null?!1:n===!0?"origin":n}function Zee(t){const{scale:e,index:r,line:n}=t,i=[],a=n.segments,o=n.points,s=Jee(e,r);s.push(WP({x:null,y:e.bottom},n));for(let l=0;l<a.length;l++){const c=a[l];for(let d=c.start;d<=c.end;d++)Qee(i,o[d],s)}return new va({points:i,options:{}})}function Jee(t,e){const r=[],n=t.getMatchingVisibleMetas("line");for(let i=0;i<n.length;i++){const a=n[i];if(a.index===e)break;a.hidden||r.unshift(a.dataset)}return r}function Qee(t,e,r){const n=[];for(let i=0;i<r.length;i++){const a=r[i],{first:o,last:s,point:l}=ete(a,e,"x");if(!(!l||o&&s)){if(o)n.unshift(l);else if(t.push(l),!s)break}}t.push(...n)}function ete(t,e,r){const n=t.interpolate(e,r);if(!n)return{};const i=n[r],a=t.segments,o=t.points;let s=!1,l=!1;for(let c=0;c<a.length;c++){const d=a[c],h=o[d.start][r],g=o[d.end][r];if(Qo(i,h,g)){s=i===h,l=i===g;break}}return{first:s,last:l,point:n}}class BP{constructor(e){this.x=e.x,this.y=e.y,this.radius=e.radius}pathSegment(e,r,n){const{x:i,y:a,radius:o}=this;return r=r||{start:0,end:qn},e.arc(i,a,o,r.end,r.start,!0),!n.bounds}interpolate(e){const{x:r,y:n,radius:i}=this,a=e.angle;return{x:r+Math.cos(a)*i,y:n+Math.sin(a)*i,angle:a}}}function tte(t){const{chart:e,fill:r,line:n}=t;if(Rr(r))return rte(e,r);if(r==="stack")return Zee(t);if(r==="shape")return!0;const i=nte(t);return i instanceof BP?i:WP(i,n)}function rte(t,e){const r=t.getDatasetMeta(e);return r&&t.isDatasetVisible(e)?r.dataset:null}function nte(t){return(t.scale||{}).getPointPositionForValue?ate(t):ite(t)}function ite(t){const{scale:e={},fill:r}=t,n=Kee(r,e);if(Rr(n)){const i=e.isHorizontal();return{x:i?n:null,y:i?null:n}}return null}function ate(t){const{scale:e,fill:r}=t,n=e.options,i=e.getLabels().length,a=n.reverse?e.max:e.min,o=Xee(r,e,a),s=[];if(n.grid.circular){const l=e.getPointPositionForValue(0,a);return new BP({x:l.x,y:l.y,radius:e.getDistanceFromCenterForValue(o)})}for(let l=0;l<i;++l)s.push(e.getPointPositionForValue(l,o));return s}function vy(t,e,r){const n=tte(e),{line:i,scale:a,axis:o}=e,s=i.options,l=s.fill,c=s.backgroundColor,{above:d=c,below:h=c}=l||{};n&&i.points.length&&(tl(t,r),ote(t,{line:i,target:n,above:d,below:h,area:r,scale:a,axis:o}),rl(t))}function ote(t,e){const{line:r,target:n,above:i,below:a,area:o,scale:s}=e,l=r._loop?"angle":e.axis;t.save(),l==="x"&&a!==i&&(BA(t,n,o.top),zA(t,{line:r,target:n,color:i,scale:s,property:l}),t.restore(),t.save(),BA(t,n,o.bottom)),zA(t,{line:r,target:n,color:a,scale:s,property:l}),t.restore()}function BA(t,e,r){const{segments:n,points:i}=e;let a=!0,o=!1;t.beginPath();for(const s of n){const{start:l,end:c}=s,d=i[l],h=i[Bb(l,c,i)];a?(t.moveTo(d.x,d.y),a=!1):(t.lineTo(d.x,r),t.lineTo(d.x,d.y)),o=!!e.pathSegment(t,s,{move:o}),o?t.closePath():t.lineTo(h.x,r)}t.lineTo(e.first().x,r),t.closePath(),t.clip()}function zA(t,e){const{line:r,target:n,property:i,color:a,scale:o}=e,s=Wee(r,n,i);for(const{source:l,target:c,start:d,end:h}of s){const{style:{backgroundColor:g=a}={}}=l,m=n!==!0;t.save(),t.fillStyle=g,ste(t,o,m&&o0(i,d,h)),t.beginPath();const v=!!r.pathSegment(t,l);let _;if(m){v?t.closePath():VA(t,n,h,i);const y=!!n.pathSegment(t,c,{move:v,reverse:!0});_=v&&y,_||VA(t,n,d,i)}t.closePath(),t.fill(_?"evenodd":"nonzero"),t.restore()}}function ste(t,e,r){const{top:n,bottom:i}=e.chart.chartArea,{property:a,start:o,end:s}=r||{};a==="x"&&(t.beginPath(),t.rect(o,n,s-o,i-n),t.clip())}function VA(t,e,r,n){const i=e.interpolate(r,n);i&&t.lineTo(i.x,i.y)}var ute={id:"filler",afterDatasetsUpdate(t,e,r){const n=(t.data.datasets||[]).length,i=[];let a,o,s,l;for(o=0;o<n;++o)a=t.getDatasetMeta(o),s=a.dataset,l=null,s&&s.options&&s instanceof va&&(l={visible:t.isDatasetVisible(o),index:o,fill:Vee(s,o,n),chart:t,axis:a.controller.options.indexAxis,scale:a.vScale,line:s}),a.$filler=l,i.push(l);for(o=0;o<n;++o)l=i[o],!(!l||l.fill===!1)&&(l.fill=zee(i,o,r.propagate))},beforeDraw(t,e,r){const n=r.drawTime==="beforeDraw",i=t.getSortedVisibleDatasetMetas(),a=t.chartArea;for(let o=i.length-1;o>=0;--o){const s=i[o].$filler;s&&(s.line.updateControlPoints(a,s.axis),n&&s.fill&&vy(t.ctx,s,a))}},beforeDatasetsDraw(t,e,r){if(r.drawTime!=="beforeDatasetsDraw")return;const n=t.getSortedVisibleDatasetMetas();for(let i=n.length-1;i>=0;--i){const a=n[i].$filler;WA(a)&&vy(t.ctx,a,t.chartArea)}},beforeDatasetDraw(t,e,r){const n=e.meta.$filler;!WA(n)||r.drawTime!=="beforeDatasetDraw"||vy(t.ctx,n,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const GA=(t,e)=>{let{boxHeight:r=e,boxWidth:n=e}=t;return t.usePointStyle&&(r=Math.min(r,e),n=t.pointStyleWidth||Math.min(n,e)),{boxWidth:n,boxHeight:r,itemHeight:Math.max(e,r)}},lte=(t,e)=>t!==null&&e!==null&&t.datasetIndex===e.datasetIndex&&t.index===e.index;class KA extends Hn{constructor(e){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(e,r,n){this.maxWidth=e,this.maxHeight=r,this._margins=n,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const e=this.options.labels||{};let r=$t(e.generateLabels,[this.chart],this)||[];e.filter&&(r=r.filter(n=>e.filter(n,this.chart.data))),e.sort&&(r=r.sort((n,i)=>e.sort(n,i,this.chart.data))),this.options.reverse&&r.reverse(),this.legendItems=r}fit(){const{options:e,ctx:r}=this;if(!e.display){this.width=this.height=0;return}const n=e.labels,i=Or(n.font),a=i.size,o=this._computeTitleHeight(),{boxWidth:s,itemHeight:l}=GA(n,a);let c,d;r.font=i.string,this.isHorizontal()?(c=this.maxWidth,d=this._fitRows(o,a,s,l)+10):(d=this.maxHeight,c=this._fitCols(o,i,s,l)+10),this.width=Math.min(c,e.maxWidth||this.maxWidth),this.height=Math.min(d,e.maxHeight||this.maxHeight)}_fitRows(e,r,n,i){const{ctx:a,maxWidth:o,options:{labels:{padding:s}}}=this,l=this.legendHitBoxes=[],c=this.lineWidths=[0],d=i+s;let h=e;a.textAlign="left",a.textBaseline="middle";let g=-1,m=-d;return this.legendItems.forEach((v,_)=>{const y=n+r/2+a.measureText(v.text).width;(_===0||c[c.length-1]+y+2*s>o)&&(h+=d,c[c.length-(_>0?0:1)]=0,m+=d,g++),l[_]={left:0,top:m,row:g,width:y,height:i},c[c.length-1]+=y+s}),h}_fitCols(e,r,n,i){const{ctx:a,maxHeight:o,options:{labels:{padding:s}}}=this,l=this.legendHitBoxes=[],c=this.columnSizes=[],d=o-e;let h=s,g=0,m=0,v=0,_=0;return this.legendItems.forEach((y,x)=>{const{itemWidth:w,itemHeight:C}=cte(n,r,a,y,i);x>0&&m+C+2*s>d&&(h+=g+s,c.push({width:g,height:m}),v+=g+s,_++,g=m=0),l[x]={left:v,top:m,col:_,width:w,height:C},g=Math.max(g,w),m+=C+s}),h+=g,c.push({width:g,height:m}),h}adjustHitBoxes(){if(!this.options.display)return;const e=this._computeTitleHeight(),{legendHitBoxes:r,options:{align:n,labels:{padding:i},rtl:a}}=this,o=ns(a,this.left,this.width);if(this.isHorizontal()){let s=0,l=_n(n,this.left+i,this.right-this.lineWidths[s]);for(const c of r)s!==c.row&&(s=c.row,l=_n(n,this.left+i,this.right-this.lineWidths[s])),c.top+=this.top+e+i,c.left=o.leftForLtr(o.x(l),c.width),l+=c.width+i}else{let s=0,l=_n(n,this.top+e+i,this.bottom-this.columnSizes[s].height);for(const c of r)c.col!==s&&(s=c.col,l=_n(n,this.top+e+i,this.bottom-this.columnSizes[s].height)),c.top=l,c.left+=this.left+i,c.left=o.leftForLtr(o.x(c.left),c.width),l+=c.height+i}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const e=this.ctx;tl(e,this),this._draw(),rl(e)}}_draw(){const{options:e,columnSizes:r,lineWidths:n,ctx:i}=this,{align:a,labels:o}=e,s=lr.color,l=ns(e.rtl,this.left,this.width),c=Or(o.font),{padding:d}=o,h=c.size,g=h/2;let m;this.drawTitle(),i.textAlign=l.textAlign("left"),i.textBaseline="middle",i.lineWidth=.5,i.font=c.string;const{boxWidth:v,boxHeight:_,itemHeight:y}=GA(o,h),x=function(S,T,D){if(isNaN(v)||v<=0||isNaN(_)||_<0)return;i.save();const P=tt(D.lineWidth,1);if(i.fillStyle=tt(D.fillStyle,s),i.lineCap=tt(D.lineCap,"butt"),i.lineDashOffset=tt(D.lineDashOffset,0),i.lineJoin=tt(D.lineJoin,"miter"),i.lineWidth=P,i.strokeStyle=tt(D.strokeStyle,s),i.setLineDash(tt(D.lineDash,[])),o.usePointStyle){const N={radius:_*Math.SQRT2/2,pointStyle:D.pointStyle,rotation:D.rotation,borderWidth:P},F=l.xPlus(S,v/2),B=T+g;vP(i,N,F,B,o.pointStyleWidth&&v)}else{const N=T+Math.max((h-_)/2,0),F=l.leftForLtr(S,v),B=rs(D.borderRadius);i.beginPath(),Object.values(B).some(W=>W!==0)?cd(i,{x:F,y:N,w:v,h:_,radius:B}):i.rect(F,N,v,_),i.fill(),P!==0&&i.stroke()}i.restore()},w=function(S,T,D){ld(i,D.text,S,T+y/2,c,{strikethrough:D.hidden,textAlign:l.textAlign(D.textAlign)})},C=this.isHorizontal(),A=this._computeTitleHeight();C?m={x:_n(a,this.left+d,this.right-n[0]),y:this.top+d+A,line:0}:m={x:this.left+d,y:_n(a,this.top+A+d,this.bottom-r[0].height),line:0},CP(this.ctx,e.textDirection);const E=y+d;this.legendItems.forEach((S,T)=>{i.strokeStyle=S.fontColor,i.fillStyle=S.fontColor;const D=i.measureText(S.text).width,P=l.textAlign(S.textAlign||(S.textAlign=o.textAlign)),N=v+g+D;let F=m.x,B=m.y;l.setWidth(this.width),C?T>0&&F+N+d>this.right&&(B=m.y+=E,m.line++,F=m.x=_n(a,this.left+d,this.right-n[m.line])):T>0&&B+E>this.bottom&&(F=m.x=F+r[m.line].width+d,m.line++,B=m.y=_n(a,this.top+A+d,this.bottom-r[m.line].height));const W=l.x(F);if(x(W,B,S),F=uJ(P,F+v+g,C?F+N:this.right,e.rtl),w(l.x(F),B,S),C)m.x+=N+d;else if(typeof S.text!="string"){const te=c.lineHeight;m.y+=zP(S,te)+d}else m.y+=E}),EP(this.ctx,e.textDirection)}drawTitle(){const e=this.options,r=e.title,n=Or(r.font),i=Kr(r.padding);if(!r.display)return;const a=ns(e.rtl,this.left,this.width),o=this.ctx,s=r.position,l=n.size/2,c=i.top+l;let d,h=this.left,g=this.width;if(this.isHorizontal())g=Math.max(...this.lineWidths),d=this.top+c,h=_n(e.align,h,this.right-g);else{const v=this.columnSizes.reduce((_,y)=>Math.max(_,y.height),0);d=c+_n(e.align,this.top,this.bottom-v-e.labels.padding-this._computeTitleHeight())}const m=_n(s,h,h+g);o.textAlign=a.textAlign(pP(s)),o.textBaseline="middle",o.strokeStyle=r.color,o.fillStyle=r.color,o.font=n.string,ld(o,r.text,m,d,n)}_computeTitleHeight(){const e=this.options.title,r=Or(e.font),n=Kr(e.padding);return e.display?r.lineHeight+n.height:0}_getLegendItemAt(e,r){let n,i,a;if(Qo(e,this.left,this.right)&&Qo(r,this.top,this.bottom)){for(a=this.legendHitBoxes,n=0;n<a.length;++n)if(i=a[n],Qo(e,i.left,i.left+i.width)&&Qo(r,i.top,i.top+i.height))return this.legendItems[n]}return null}handleEvent(e){const r=this.options;if(!hte(e.type,r))return;const n=this._getLegendItemAt(e.x,e.y);if(e.type==="mousemove"||e.type==="mouseout"){const i=this._hoveredItem,a=lte(i,n);i&&!a&&$t(r.onLeave,[e,i,this],this),this._hoveredItem=n,n&&!a&&$t(r.onHover,[e,n,this],this)}else n&&$t(r.onClick,[e,n,this],this)}}function cte(t,e,r,n,i){const a=fte(n,t,e,r),o=dte(i,n,e.lineHeight);return{itemWidth:a,itemHeight:o}}function fte(t,e,r,n){let i=t.text;return i&&typeof i!="string"&&(i=i.reduce((a,o)=>a.length>o.length?a:o)),e+r.size/2+n.measureText(i).width}function dte(t,e,r){let n=t;return typeof e.text!="string"&&(n=zP(e,r)),n}function zP(t,e){const r=t.text?t.text.length:0;return e*r}function hte(t,e){return!!((t==="mousemove"||t==="mouseout")&&(e.onHover||e.onLeave)||e.onClick&&(t==="click"||t==="mouseup"))}var pte={id:"legend",_element:KA,start(t,e,r){const n=t.legend=new KA({ctx:t.ctx,options:r,chart:t});ma.configure(t,n,r),ma.addBox(t,n)},stop(t){ma.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,r){const n=t.legend;ma.configure(t,n,r),n.options=r},afterUpdate(t){const e=t.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(t,e){e.replay||t.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(t,e,r){const n=e.datasetIndex,i=r.chart;i.isDatasetVisible(n)?(i.hide(n),e.hidden=!0):(i.show(n),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const e=t.data.datasets,{labels:{usePointStyle:r,pointStyle:n,textAlign:i,color:a,useBorderRadius:o,borderRadius:s}}=t.legend.options;return t._getSortedDatasetMetas().map(l=>{const c=l.controller.getStyle(r?0:void 0),d=Kr(c.borderWidth);return{text:e[l.index].label,fillStyle:c.backgroundColor,fontColor:a,hidden:!l.visible,lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:(d.width+d.height)/4,strokeStyle:c.borderColor,pointStyle:n||c.pointStyle,rotation:c.rotation,textAlign:i||c.textAlign,borderRadius:o&&(s||c.borderRadius),datasetIndex:l.index}},this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}};const bu={average(t){if(!t.length)return!1;let e,r,n=0,i=0,a=0;for(e=0,r=t.length;e<r;++e){const o=t[e].element;if(o&&o.hasValue()){const s=o.tooltipPosition();n+=s.x,i+=s.y,++a}}return{x:n/a,y:i/a}},nearest(t,e){if(!t.length)return!1;let r=e.x,n=e.y,i=Number.POSITIVE_INFINITY,a,o,s;for(a=0,o=t.length;a<o;++a){const l=t[a].element;if(l&&l.hasValue()){const c=l.getCenterPoint(),d=ps(e,c);d<i&&(i=d,s=l)}}if(s){const l=s.tooltipPosition();r=l.x,n=l.y}return{x:r,y:n}}};function si(t,e){return e&&(Xt(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function Mi(t){return(typeof t=="string"||t instanceof String)&&t.indexOf(`
|
|
108
|
+
`)>-1?t.split(`
|
|
109
|
+
`):t}function gte(t,e){const{element:r,datasetIndex:n,index:i}=e,a=t.getDatasetMeta(n).controller,{label:o,value:s}=a.getLabelAndValue(i);return{chart:t,label:o,parsed:a.getParsed(i),raw:t.data.datasets[n].data[i],formattedValue:s,dataset:a.getDataset(),dataIndex:i,datasetIndex:n,element:r}}function XA(t,e){const r=t.chart.ctx,{body:n,footer:i,title:a}=t,{boxWidth:o,boxHeight:s}=e,l=Or(e.bodyFont),c=Or(e.titleFont),d=Or(e.footerFont),h=a.length,g=i.length,m=n.length,v=Kr(e.padding);let _=v.height,y=0,x=n.reduce((A,E)=>A+E.before.length+E.lines.length+E.after.length,0);if(x+=t.beforeBody.length+t.afterBody.length,h&&(_+=h*c.lineHeight+(h-1)*e.titleSpacing+e.titleMarginBottom),x){const A=e.displayColors?Math.max(s,l.lineHeight):l.lineHeight;_+=m*A+(x-m)*l.lineHeight+(x-1)*e.bodySpacing}g&&(_+=e.footerMarginTop+g*d.lineHeight+(g-1)*e.footerSpacing);let w=0;const C=function(A){y=Math.max(y,r.measureText(A).width+w)};return r.save(),r.font=c.string,jt(t.title,C),r.font=l.string,jt(t.beforeBody.concat(t.afterBody),C),w=e.displayColors?o+2+e.boxPadding:0,jt(n,A=>{jt(A.before,C),jt(A.lines,C),jt(A.after,C)}),w=0,r.font=d.string,jt(t.footer,C),r.restore(),y+=v.width,{width:y,height:_}}function mte(t,e){const{y:r,height:n}=e;return r<n/2?"top":r>t.height-n/2?"bottom":"center"}function vte(t,e,r,n){const{x:i,width:a}=n,o=r.caretSize+r.caretPadding;if(t==="left"&&i+a+o>e.width||t==="right"&&i-a-o<0)return!0}function yte(t,e,r,n){const{x:i,width:a}=r,{width:o,chartArea:{left:s,right:l}}=t;let c="center";return n==="center"?c=i<=(s+l)/2?"left":"right":i<=a/2?c="left":i>=o-a/2&&(c="right"),vte(c,t,e,r)&&(c="center"),c}function YA(t,e,r){const n=r.yAlign||e.yAlign||mte(t,r);return{xAlign:r.xAlign||e.xAlign||yte(t,e,r,n),yAlign:n}}function bte(t,e){let{x:r,width:n}=t;return e==="right"?r-=n:e==="center"&&(r-=n/2),r}function _te(t,e,r){let{y:n,height:i}=t;return e==="top"?n+=r:e==="bottom"?n-=i+r:n-=i/2,n}function ZA(t,e,r,n){const{caretSize:i,caretPadding:a,cornerRadius:o}=t,{xAlign:s,yAlign:l}=r,c=i+a,{topLeft:d,topRight:h,bottomLeft:g,bottomRight:m}=rs(o);let v=bte(e,s);const _=_te(e,l,c);return l==="center"?s==="left"?v+=c:s==="right"&&(v-=c):s==="left"?v-=Math.max(d,g)+i:s==="right"&&(v+=Math.max(h,m)+i),{x:Un(v,0,n.width-e.width),y:Un(_,0,n.height-e.height)}}function lf(t,e,r){const n=Kr(r.padding);return e==="center"?t.x+t.width/2:e==="right"?t.x+t.width-n.right:t.x+n.left}function JA(t){return si([],Mi(t))}function xte(t,e,r){return To(t,{tooltip:e,tooltipItems:r,type:"tooltip"})}function QA(t,e){const r=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return r?t.override(r):t}const VP={beforeTitle:Ii,title(t){if(t.length>0){const e=t[0],r=e.chart.data.labels,n=r?r.length:0;if(this&&this.options&&this.options.mode==="dataset")return e.dataset.label||"";if(e.label)return e.label;if(n>0&&e.dataIndex<n)return r[e.dataIndex]}return""},afterTitle:Ii,beforeBody:Ii,beforeLabel:Ii,label(t){if(this&&this.options&&this.options.mode==="dataset")return t.label+": "+t.formattedValue||t.formattedValue;let e=t.dataset.label||"";e&&(e+=": ");const r=t.formattedValue;return ur(r)||(e+=r),e},labelColor(t){const r=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{borderColor:r.borderColor,backgroundColor:r.backgroundColor,borderWidth:r.borderWidth,borderDash:r.borderDash,borderDashOffset:r.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(t){const r=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{pointStyle:r.pointStyle,rotation:r.rotation}},afterLabel:Ii,afterBody:Ii,beforeFooter:Ii,footer:Ii,afterFooter:Ii};function nn(t,e,r,n){const i=t[e].call(r,n);return typeof i>"u"?VP[e].call(r,n):i}class s0 extends Hn{constructor(e){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=e.chart,this.options=e.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(e){this.options=e,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const e=this._cachedAnimations;if(e)return e;const r=this.chart,n=this.options.setContext(this.getContext()),i=n.enabled&&r.options.animation&&n.animations,a=new Hb(this.chart,i);return i._cacheable&&(this._cachedAnimations=Object.freeze(a)),a}getContext(){return this.$context||(this.$context=xte(this.chart.getContext(),this,this._tooltipItems))}getTitle(e,r){const{callbacks:n}=r,i=nn(n,"beforeTitle",this,e),a=nn(n,"title",this,e),o=nn(n,"afterTitle",this,e);let s=[];return s=si(s,Mi(i)),s=si(s,Mi(a)),s=si(s,Mi(o)),s}getBeforeBody(e,r){return JA(nn(r.callbacks,"beforeBody",this,e))}getBody(e,r){const{callbacks:n}=r,i=[];return jt(e,a=>{const o={before:[],lines:[],after:[]},s=QA(n,a);si(o.before,Mi(nn(s,"beforeLabel",this,a))),si(o.lines,nn(s,"label",this,a)),si(o.after,Mi(nn(s,"afterLabel",this,a))),i.push(o)}),i}getAfterBody(e,r){return JA(nn(r.callbacks,"afterBody",this,e))}getFooter(e,r){const{callbacks:n}=r,i=nn(n,"beforeFooter",this,e),a=nn(n,"footer",this,e),o=nn(n,"afterFooter",this,e);let s=[];return s=si(s,Mi(i)),s=si(s,Mi(a)),s=si(s,Mi(o)),s}_createItems(e){const r=this._active,n=this.chart.data,i=[],a=[],o=[];let s=[],l,c;for(l=0,c=r.length;l<c;++l)s.push(gte(this.chart,r[l]));return e.filter&&(s=s.filter((d,h,g)=>e.filter(d,h,g,n))),e.itemSort&&(s=s.sort((d,h)=>e.itemSort(d,h,n))),jt(s,d=>{const h=QA(e.callbacks,d);i.push(nn(h,"labelColor",this,d)),a.push(nn(h,"labelPointStyle",this,d)),o.push(nn(h,"labelTextColor",this,d))}),this.labelColors=i,this.labelPointStyles=a,this.labelTextColors=o,this.dataPoints=s,s}update(e,r){const n=this.options.setContext(this.getContext()),i=this._active;let a,o=[];if(!i.length)this.opacity!==0&&(a={opacity:0});else{const s=bu[n.position].call(this,i,this._eventPosition);o=this._createItems(n),this.title=this.getTitle(o,n),this.beforeBody=this.getBeforeBody(o,n),this.body=this.getBody(o,n),this.afterBody=this.getAfterBody(o,n),this.footer=this.getFooter(o,n);const l=this._size=XA(this,n),c=Object.assign({},s,l),d=YA(this.chart,n,c),h=ZA(n,c,d,this.chart);this.xAlign=d.xAlign,this.yAlign=d.yAlign,a={opacity:1,x:h.x,y:h.y,width:l.width,height:l.height,caretX:s.x,caretY:s.y}}this._tooltipItems=o,this.$context=void 0,a&&this._resolveAnimations().update(this,a),e&&n.external&&n.external.call(this,{chart:this.chart,tooltip:this,replay:r})}drawCaret(e,r,n,i){const a=this.getCaretPosition(e,n,i);r.lineTo(a.x1,a.y1),r.lineTo(a.x2,a.y2),r.lineTo(a.x3,a.y3)}getCaretPosition(e,r,n){const{xAlign:i,yAlign:a}=this,{caretSize:o,cornerRadius:s}=n,{topLeft:l,topRight:c,bottomLeft:d,bottomRight:h}=rs(s),{x:g,y:m}=e,{width:v,height:_}=r;let y,x,w,C,A,E;return a==="center"?(A=m+_/2,i==="left"?(y=g,x=y-o,C=A+o,E=A-o):(y=g+v,x=y+o,C=A-o,E=A+o),w=y):(i==="left"?x=g+Math.max(l,d)+o:i==="right"?x=g+v-Math.max(c,h)-o:x=this.caretX,a==="top"?(C=m,A=C-o,y=x-o,w=x+o):(C=m+_,A=C+o,y=x+o,w=x-o),E=C),{x1:y,x2:x,x3:w,y1:C,y2:A,y3:E}}drawTitle(e,r,n){const i=this.title,a=i.length;let o,s,l;if(a){const c=ns(n.rtl,this.x,this.width);for(e.x=lf(this,n.titleAlign,n),r.textAlign=c.textAlign(n.titleAlign),r.textBaseline="middle",o=Or(n.titleFont),s=n.titleSpacing,r.fillStyle=n.titleColor,r.font=o.string,l=0;l<a;++l)r.fillText(i[l],c.x(e.x),e.y+o.lineHeight/2),e.y+=o.lineHeight+s,l+1===a&&(e.y+=n.titleMarginBottom-s)}}_drawColorBox(e,r,n,i,a){const o=this.labelColors[n],s=this.labelPointStyles[n],{boxHeight:l,boxWidth:c}=a,d=Or(a.bodyFont),h=lf(this,"left",a),g=i.x(h),m=l<d.lineHeight?(d.lineHeight-l)/2:0,v=r.y+m;if(a.usePointStyle){const _={radius:Math.min(c,l)/2,pointStyle:s.pointStyle,rotation:s.rotation,borderWidth:1},y=i.leftForLtr(g,c)+c/2,x=v+l/2;e.strokeStyle=a.multiKeyBackground,e.fillStyle=a.multiKeyBackground,r0(e,_,y,x),e.strokeStyle=o.borderColor,e.fillStyle=o.backgroundColor,r0(e,_,y,x)}else{e.lineWidth=st(o.borderWidth)?Math.max(...Object.values(o.borderWidth)):o.borderWidth||1,e.strokeStyle=o.borderColor,e.setLineDash(o.borderDash||[]),e.lineDashOffset=o.borderDashOffset||0;const _=i.leftForLtr(g,c),y=i.leftForLtr(i.xPlus(g,1),c-2),x=rs(o.borderRadius);Object.values(x).some(w=>w!==0)?(e.beginPath(),e.fillStyle=a.multiKeyBackground,cd(e,{x:_,y:v,w:c,h:l,radius:x}),e.fill(),e.stroke(),e.fillStyle=o.backgroundColor,e.beginPath(),cd(e,{x:y,y:v+1,w:c-2,h:l-2,radius:x}),e.fill()):(e.fillStyle=a.multiKeyBackground,e.fillRect(_,v,c,l),e.strokeRect(_,v,c,l),e.fillStyle=o.backgroundColor,e.fillRect(y,v+1,c-2,l-2))}e.fillStyle=this.labelTextColors[n]}drawBody(e,r,n){const{body:i}=this,{bodySpacing:a,bodyAlign:o,displayColors:s,boxHeight:l,boxWidth:c,boxPadding:d}=n,h=Or(n.bodyFont);let g=h.lineHeight,m=0;const v=ns(n.rtl,this.x,this.width),_=function(D){r.fillText(D,v.x(e.x+m),e.y+g/2),e.y+=g+a},y=v.textAlign(o);let x,w,C,A,E,S,T;for(r.textAlign=o,r.textBaseline="middle",r.font=h.string,e.x=lf(this,y,n),r.fillStyle=n.bodyColor,jt(this.beforeBody,_),m=s&&y!=="right"?o==="center"?c/2+d:c+2+d:0,A=0,S=i.length;A<S;++A){for(x=i[A],w=this.labelTextColors[A],r.fillStyle=w,jt(x.before,_),C=x.lines,s&&C.length&&(this._drawColorBox(r,e,A,v,n),g=Math.max(h.lineHeight,l)),E=0,T=C.length;E<T;++E)_(C[E]),g=h.lineHeight;jt(x.after,_)}m=0,g=h.lineHeight,jt(this.afterBody,_),e.y-=a}drawFooter(e,r,n){const i=this.footer,a=i.length;let o,s;if(a){const l=ns(n.rtl,this.x,this.width);for(e.x=lf(this,n.footerAlign,n),e.y+=n.footerMarginTop,r.textAlign=l.textAlign(n.footerAlign),r.textBaseline="middle",o=Or(n.footerFont),r.fillStyle=n.footerColor,r.font=o.string,s=0;s<a;++s)r.fillText(i[s],l.x(e.x),e.y+o.lineHeight/2),e.y+=o.lineHeight+n.footerSpacing}}drawBackground(e,r,n,i){const{xAlign:a,yAlign:o}=this,{x:s,y:l}=e,{width:c,height:d}=n,{topLeft:h,topRight:g,bottomLeft:m,bottomRight:v}=rs(i.cornerRadius);r.fillStyle=i.backgroundColor,r.strokeStyle=i.borderColor,r.lineWidth=i.borderWidth,r.beginPath(),r.moveTo(s+h,l),o==="top"&&this.drawCaret(e,r,n,i),r.lineTo(s+c-g,l),r.quadraticCurveTo(s+c,l,s+c,l+g),o==="center"&&a==="right"&&this.drawCaret(e,r,n,i),r.lineTo(s+c,l+d-v),r.quadraticCurveTo(s+c,l+d,s+c-v,l+d),o==="bottom"&&this.drawCaret(e,r,n,i),r.lineTo(s+m,l+d),r.quadraticCurveTo(s,l+d,s,l+d-m),o==="center"&&a==="left"&&this.drawCaret(e,r,n,i),r.lineTo(s,l+h),r.quadraticCurveTo(s,l,s+h,l),r.closePath(),r.fill(),i.borderWidth>0&&r.stroke()}_updateAnimationTarget(e){const r=this.chart,n=this.$animations,i=n&&n.x,a=n&&n.y;if(i||a){const o=bu[e.position].call(this,this._active,this._eventPosition);if(!o)return;const s=this._size=XA(this,e),l=Object.assign({},o,this._size),c=YA(r,e,l),d=ZA(e,l,c,r);(i._to!==d.x||a._to!==d.y)&&(this.xAlign=c.xAlign,this.yAlign=c.yAlign,this.width=s.width,this.height=s.height,this.caretX=o.x,this.caretY=o.y,this._resolveAnimations().update(this,d))}}_willRender(){return!!this.opacity}draw(e){const r=this.options.setContext(this.getContext());let n=this.opacity;if(!n)return;this._updateAnimationTarget(r);const i={width:this.width,height:this.height},a={x:this.x,y:this.y};n=Math.abs(n)<.001?0:n;const o=Kr(r.padding),s=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;r.enabled&&s&&(e.save(),e.globalAlpha=n,this.drawBackground(a,e,i,r),CP(e,r.textDirection),a.y+=o.top,this.drawTitle(a,e,r),this.drawBody(a,e,r),this.drawFooter(a,e,r),EP(e,r.textDirection),e.restore())}getActiveElements(){return this._active||[]}setActiveElements(e,r){const n=this._active,i=e.map(({datasetIndex:s,index:l})=>{const c=this.chart.getDatasetMeta(s);if(!c)throw new Error("Cannot find a dataset at index "+s);return{datasetIndex:s,element:c.data[l],index:l}}),a=!id(n,i),o=this._positionChanged(i,r);(a||o)&&(this._active=i,this._eventPosition=r,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(e,r,n=!0){if(r&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const i=this.options,a=this._active||[],o=this._getActiveElements(e,a,r,n),s=this._positionChanged(o,e),l=r||!id(o,a)||s;return l&&(this._active=o,(i.enabled||i.external)&&(this._eventPosition={x:e.x,y:e.y},this.update(!0,r))),l}_getActiveElements(e,r,n,i){const a=this.options;if(e.type==="mouseout")return[];if(!i)return r;const o=this.chart.getElementsAtEventForMode(e,a.mode,a,n);return a.reverse&&o.reverse(),o}_positionChanged(e,r){const{caretX:n,caretY:i,options:a}=this,o=bu[a.position].call(this,e,r);return o!==!1&&(n!==o.x||i!==o.y)}}Xe(s0,"positioners",bu);var wte={id:"tooltip",_element:s0,positioners:bu,afterInit(t,e,r){r&&(t.tooltip=new s0({chart:t,options:r}))},beforeUpdate(t,e,r){t.tooltip&&t.tooltip.initialize(r)},reset(t,e,r){t.tooltip&&t.tooltip.initialize(r)},afterDraw(t){const e=t.tooltip;if(e&&e._willRender()){const r={tooltip:e};if(t.notifyPlugins("beforeTooltipDraw",{...r,cancelable:!0})===!1)return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",r)}},afterEvent(t,e){if(t.tooltip){const r=e.replay;t.tooltip.handleEvent(e.event,r,e.inChartArea)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:VP},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>t!=="filter"&&t!=="itemSort"&&t!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const Tte=(t,e,r,n)=>(typeof e=="string"?(r=t.push(e)-1,n.unshift({index:r,label:e})):isNaN(e)&&(r=null),r);function Ste(t,e,r,n){const i=t.indexOf(e);if(i===-1)return Tte(t,e,r,n);const a=t.lastIndexOf(e);return i!==a?r:i}const Cte=(t,e)=>t===null?null:Un(Math.round(t),0,e);function eR(t){const e=this.getLabels();return t>=0&&t<e.length?e[t]:t}class u0 extends Es{constructor(e){super(e),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(e){const r=this._addedLabels;if(r.length){const n=this.getLabels();for(const{index:i,label:a}of r)n[i]===a&&n.splice(i,1);this._addedLabels=[]}super.init(e)}parse(e,r){if(ur(e))return null;const n=this.getLabels();return r=isFinite(r)&&n[r]===e?r:Ste(n,e,tt(r,e),this._addedLabels),Cte(r,n.length-1)}determineDataLimits(){const{minDefined:e,maxDefined:r}=this.getUserBounds();let{min:n,max:i}=this.getMinMax(!0);this.options.bounds==="ticks"&&(e||(n=0),r||(i=this.getLabels().length-1)),this.min=n,this.max=i}buildTicks(){const e=this.min,r=this.max,n=this.options.offset,i=[];let a=this.getLabels();a=e===0&&r===a.length-1?a:a.slice(e,r+1),this._valueRange=Math.max(a.length-(n?0:1),1),this._startValue=this.min-(n?.5:0);for(let o=e;o<=r;o++)i.push({value:o});return i}getLabelForValue(e){return eR.call(this,e)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(e){return typeof e!="number"&&(e=this.parse(e)),e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getPixelForTick(e){const r=this.ticks;return e<0||e>r.length-1?null:this.getPixelForValue(r[e].value)}getValueForPixel(e){return Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange)}getBasePixel(){return this.bottom}}Xe(u0,"id","category"),Xe(u0,"defaults",{ticks:{callback:eR}});function Ete(t,e){const r=[],{bounds:i,step:a,min:o,max:s,precision:l,count:c,maxTicks:d,maxDigits:h,includeBounds:g}=t,m=a||1,v=d-1,{min:_,max:y}=e,x=!ur(o),w=!ur(s),C=!ur(c),A=(y-_)/(h+1);let E=QO((y-_)/v/m)*m,S,T,D,P;if(E<1e-14&&!x&&!w)return[{value:_},{value:y}];P=Math.ceil(y/E)-Math.floor(_/E),P>v&&(E=QO(P*E/v/m)*m),ur(l)||(S=Math.pow(10,l),E=Math.ceil(E*S)/S),i==="ticks"?(T=Math.floor(_/E)*E,D=Math.ceil(y/E)*E):(T=_,D=y),x&&w&&a&&JZ((s-o)/a,E/1e3)?(P=Math.round(Math.min((s-o)/E,d)),E=(s-o)/P,T=o,D=s):C?(T=x?o:T,D=w?s:D,P=c-1,E=(D-T)/P):(P=(D-T)/E,Ou(P,Math.round(P),E/1e3)?P=Math.round(P):P=Math.ceil(P));const N=Math.max(eA(E),eA(T));S=Math.pow(10,ur(l)?N:l),T=Math.round(T*S)/S,D=Math.round(D*S)/S;let F=0;for(x&&(g&&T!==o?(r.push({value:o}),T<o&&F++,Ou(Math.round((T+F*E)*S)/S,o,tR(o,A,t))&&F++):T<o&&F++);F<P;++F){const B=Math.round((T+F*E)*S)/S;if(w&&B>s)break;r.push({value:B})}return w&&g&&D!==s?r.length&&Ou(r[r.length-1].value,s,tR(s,A,t))?r[r.length-1].value=s:r.push({value:s}):(!w||D===s)&&r.push({value:D}),r}function tR(t,e,{horizontal:r,minRotation:n}){const i=jr(n),a=(r?Math.sin(i):Math.cos(i))||.001,o=.75*e*(""+t).length;return Math.min(e/a,o)}class Ote extends Es{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(e,r){return ur(e)||(typeof e=="number"||e instanceof Number)&&!isFinite(+e)?null:+e}handleTickRangeOptions(){const{beginAtZero:e}=this.options,{minDefined:r,maxDefined:n}=this.getUserBounds();let{min:i,max:a}=this;const o=l=>i=r?i:l,s=l=>a=n?a:l;if(e){const l=hs(i),c=hs(a);l<0&&c<0?s(0):l>0&&c>0&&o(0)}if(i===a){let l=a===0?1:Math.abs(a*.05);s(a+l),e||o(i-l)}this.min=i,this.max=a}getTickLimit(){const e=this.options.ticks;let{maxTicksLimit:r,stepSize:n}=e,i;return n?(i=Math.ceil(this.max/n)-Math.floor(this.min/n)+1,i>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${n} would result generating up to ${i} ticks. Limiting to 1000.`),i=1e3)):(i=this.computeTickLimit(),r=r||11),r&&(i=Math.min(r,i)),i}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const e=this.options,r=e.ticks;let n=this.getTickLimit();n=Math.max(2,n);const i={maxTicks:n,bounds:e.bounds,min:e.min,max:e.max,precision:r.precision,step:r.stepSize,count:r.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:r.minRotation||0,includeBounds:r.includeBounds!==!1},a=this._range||this,o=Ete(i,a);return e.bounds==="ticks"&&QZ(o,this,"value"),e.reverse?(o.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),o}configure(){const e=this.ticks;let r=this.min,n=this.max;if(super.configure(),this.options.offset&&e.length){const i=(n-r)/Math.max(e.length-1,1)/2;r-=i,n+=i}this._startValue=r,this._endValue=n,this._valueRange=n-r}getLabelForValue(e){return gP(e,this.chart.options.locale,this.options.ticks.format)}}class l0 extends Ote{determineDataLimits(){const{min:e,max:r}=this.getMinMax(!0);this.min=Rr(e)?e:0,this.max=Rr(r)?r:1,this.handleTickRangeOptions()}computeTickLimit(){const e=this.isHorizontal(),r=e?this.width:this.height,n=jr(this.options.ticks.minRotation),i=(e?Math.sin(n):Math.cos(n))||.001,a=this._resolveTickFontOptions(0);return Math.ceil(r/Math.min(40,a.lineHeight/i))}getPixelForValue(e){return e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getValueForPixel(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange}}Xe(l0,"id","linear"),Xe(l0,"defaults",{ticks:{callback:mP.formatters.numeric}});const Yd={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},un=Object.keys(Yd);function rR(t,e){return t-e}function nR(t,e){if(ur(e))return null;const r=t._adapter,{parser:n,round:i,isoWeekday:a}=t._parseOpts;let o=e;return typeof n=="function"&&(o=n(o)),Rr(o)||(o=typeof n=="string"?r.parse(o,n):r.parse(o)),o===null?null:(i&&(o=i==="week"&&(ho(a)||a===!0)?r.startOf(o,"isoWeek",a):r.startOf(o,i)),+o)}function iR(t,e,r,n){const i=un.length;for(let a=un.indexOf(t);a<i-1;++a){const o=Yd[un[a]],s=o.steps?o.steps:Number.MAX_SAFE_INTEGER;if(o.common&&Math.ceil((r-e)/(s*o.size))<=n)return un[a]}return un[i-1]}function Ate(t,e,r,n,i){for(let a=un.length-1;a>=un.indexOf(r);a--){const o=un[a];if(Yd[o].common&&t._adapter.diff(i,n,o)>=e-1)return o}return un[r?un.indexOf(r):0]}function Rte(t){for(let e=un.indexOf(t)+1,r=un.length;e<r;++e)if(Yd[un[e]].common)return un[e]}function aR(t,e,r){if(!r)t[e]=!0;else if(r.length){const{lo:n,hi:i}=Fb(r,e),a=r[n]>=e?r[n]:r[i];t[a]=!0}}function Ite(t,e,r,n){const i=t._adapter,a=+i.startOf(e[0].value,n),o=e[e.length-1].value;let s,l;for(s=a;s<=o;s=+i.add(s,1,n))l=r[s],l>=0&&(e[l].major=!0);return e}function oR(t,e,r){const n=[],i={},a=e.length;let o,s;for(o=0;o<a;++o)s=e[o],i[s]=o,n.push({value:s,major:!1});return a===0||!r?n:Ite(t,n,i,r)}class Hu extends Es{constructor(e){super(e),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(e,r={}){const n=e.time||(e.time={}),i=this._adapter=new DP._date(e.adapters.date);i.init(r),Eu(n.displayFormats,i.formats()),this._parseOpts={parser:n.parser,round:n.round,isoWeekday:n.isoWeekday},super.init(e),this._normalized=r.normalized}parse(e,r){return e===void 0?null:nR(this,e)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const e=this.options,r=this._adapter,n=e.time.unit||"day";let{min:i,max:a,minDefined:o,maxDefined:s}=this.getUserBounds();function l(c){!o&&!isNaN(c.min)&&(i=Math.min(i,c.min)),!s&&!isNaN(c.max)&&(a=Math.max(a,c.max))}(!o||!s)&&(l(this._getLabelBounds()),(e.bounds!=="ticks"||e.ticks.source!=="labels")&&l(this.getMinMax(!1))),i=Rr(i)&&!isNaN(i)?i:+r.startOf(Date.now(),n),a=Rr(a)&&!isNaN(a)?a:+r.endOf(Date.now(),n)+1,this.min=Math.min(i,a-1),this.max=Math.max(i+1,a)}_getLabelBounds(){const e=this.getLabelTimestamps();let r=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY;return e.length&&(r=e[0],n=e[e.length-1]),{min:r,max:n}}buildTicks(){const e=this.options,r=e.time,n=e.ticks,i=n.source==="labels"?this.getLabelTimestamps():this._generate();e.bounds==="ticks"&&i.length&&(this.min=this._userMin||i[0],this.max=this._userMax||i[i.length-1]);const a=this.min,o=this.max,s=iJ(i,a,o);return this._unit=r.unit||(n.autoSkip?iR(r.minUnit,this.min,this.max,this._getLabelCapacity(a)):Ate(this,s.length,r.minUnit,this.min,this.max)),this._majorUnit=!n.major.enabled||this._unit==="year"?void 0:Rte(this._unit),this.initOffsets(i),e.reverse&&s.reverse(),oR(this,s,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(e=>+e.value))}initOffsets(e=[]){let r=0,n=0,i,a;this.options.offset&&e.length&&(i=this.getDecimalForValue(e[0]),e.length===1?r=1-i:r=(this.getDecimalForValue(e[1])-i)/2,a=this.getDecimalForValue(e[e.length-1]),e.length===1?n=a:n=(a-this.getDecimalForValue(e[e.length-2]))/2);const o=e.length<3?.5:.25;r=Un(r,0,o),n=Un(n,0,o),this._offsets={start:r,end:n,factor:1/(r+1+n)}}_generate(){const e=this._adapter,r=this.min,n=this.max,i=this.options,a=i.time,o=a.unit||iR(a.minUnit,r,n,this._getLabelCapacity(r)),s=tt(i.ticks.stepSize,1),l=o==="week"?a.isoWeekday:!1,c=ho(l)||l===!0,d={};let h=r,g,m;if(c&&(h=+e.startOf(h,"isoWeek",l)),h=+e.startOf(h,c?"day":o),e.diff(n,r,o)>1e5*s)throw new Error(r+" and "+n+" are too far apart with stepSize of "+s+" "+o);const v=i.ticks.source==="data"&&this.getDataTimestamps();for(g=h,m=0;g<n;g=+e.add(g,s,o),m++)aR(d,g,v);return(g===n||i.bounds==="ticks"||m===1)&&aR(d,g,v),Object.keys(d).sort(rR).map(_=>+_)}getLabelForValue(e){const r=this._adapter,n=this.options.time;return n.tooltipFormat?r.format(e,n.tooltipFormat):r.format(e,n.displayFormats.datetime)}format(e,r){const i=this.options.time.displayFormats,a=this._unit,o=r||i[a];return this._adapter.format(e,o)}_tickFormatFunction(e,r,n,i){const a=this.options,o=a.ticks.callback;if(o)return $t(o,[e,r,n],this);const s=a.time.displayFormats,l=this._unit,c=this._majorUnit,d=l&&s[l],h=c&&s[c],g=n[r],m=c&&h&&g&&g.major;return this._adapter.format(e,i||(m?h:d))}generateTickLabels(e){let r,n,i;for(r=0,n=e.length;r<n;++r)i=e[r],i.label=this._tickFormatFunction(i.value,r,e)}getDecimalForValue(e){return e===null?NaN:(e-this.min)/(this.max-this.min)}getPixelForValue(e){const r=this._offsets,n=this.getDecimalForValue(e);return this.getPixelForDecimal((r.start+n)*r.factor)}getValueForPixel(e){const r=this._offsets,n=this.getDecimalForPixel(e)/r.factor-r.end;return this.min+n*(this.max-this.min)}_getLabelSize(e){const r=this.options.ticks,n=this.ctx.measureText(e).width,i=jr(this.isHorizontal()?r.maxRotation:r.minRotation),a=Math.cos(i),o=Math.sin(i),s=this._resolveTickFontOptions(0).size;return{w:n*a+s*o,h:n*o+s*a}}_getLabelCapacity(e){const r=this.options.time,n=r.displayFormats,i=n[r.unit]||n.millisecond,a=this._tickFormatFunction(e,0,oR(this,[e],this._majorUnit),i),o=this._getLabelSize(a),s=Math.floor(this.isHorizontal()?this.width/o.w:this.height/o.h)-1;return s>0?s:1}getDataTimestamps(){let e=this._cache.data||[],r,n;if(e.length)return e;const i=this.getMatchingVisibleMetas();if(this._normalized&&i.length)return this._cache.data=i[0].controller.getAllParsedValues(this);for(r=0,n=i.length;r<n;++r)e=e.concat(i[r].controller.getAllParsedValues(this));return this._cache.data=this.normalize(e)}getLabelTimestamps(){const e=this._cache.labels||[];let r,n;if(e.length)return e;const i=this.getLabels();for(r=0,n=i.length;r<n;++r)e.push(nR(this,i[r]));return this._cache.labels=this._normalized?e:this.normalize(e)}normalize(e){return oJ(e.sort(rR))}}Xe(Hu,"id","time"),Xe(Hu,"defaults",{bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}});function cf(t,e,r){let n=0,i=t.length-1,a,o,s,l;r?(e>=t[n].pos&&e<=t[i].pos&&({lo:n,hi:i}=ro(t,"pos",e)),{pos:a,time:s}=t[n],{pos:o,time:l}=t[i]):(e>=t[n].time&&e<=t[i].time&&({lo:n,hi:i}=ro(t,"time",e)),{time:a,pos:s}=t[n],{time:o,pos:l}=t[i]);const c=o-a;return c?s+(l-s)*(e-a)/c:s}class sR extends Hu{constructor(e){super(e),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const e=this._getTimestampsForTable(),r=this._table=this.buildLookupTable(e);this._minPos=cf(r,this.min),this._tableRange=cf(r,this.max)-this._minPos,super.initOffsets(e)}buildLookupTable(e){const{min:r,max:n}=this,i=[],a=[];let o,s,l,c,d;for(o=0,s=e.length;o<s;++o)c=e[o],c>=r&&c<=n&&i.push(c);if(i.length<2)return[{time:r,pos:0},{time:n,pos:1}];for(o=0,s=i.length;o<s;++o)d=i[o+1],l=i[o-1],c=i[o],Math.round((d+l)/2)!==c&&a.push({time:c,pos:o/(s-1)});return a}_generate(){const e=this.min,r=this.max;let n=super.getDataTimestamps();return(!n.includes(e)||!n.length)&&n.splice(0,0,e),(!n.includes(r)||n.length===1)&&n.push(r),n.sort((i,a)=>i-a)}_getTimestampsForTable(){let e=this._cache.all||[];if(e.length)return e;const r=this.getDataTimestamps(),n=this.getLabelTimestamps();return r.length&&n.length?e=this.normalize(r.concat(n)):e=r.length?r:n,e=this._cache.all=e,e}getDecimalForValue(e){return(cf(this._table,e)-this._minPos)/this._tableRange}getValueForPixel(e){const r=this._offsets,n=this.getDecimalForPixel(e)/r.factor-r.end;return cf(this._table,n*this._tableRange+this._minPos,!0)}}Xe(sR,"id","timeseries"),Xe(sR,"defaults",Hu.defaults);const GP="label";function uR(t,e){typeof t=="function"?t(e):t&&(t.current=e)}function Dte(t,e){const r=t.options;r&&e&&Object.assign(r,e)}function KP(t,e){t.labels=e}function XP(t,e,r=GP){const n=[];t.datasets=e.map(i=>{const a=t.datasets.find(o=>o[r]===i[r]);return!a||!i.data||n.includes(a)?{...i}:(n.push(a),Object.assign(a,i),a)})}function Mte(t,e=GP){const r={labels:[],datasets:[]};return KP(r,t.labels),XP(r,t.datasets,e),r}function Pte(t,e){const{height:r=150,width:n=300,redraw:i=!1,datasetIdKey:a,type:o,data:s,options:l,plugins:c=[],fallbackContent:d,updateMode:h,...g}=t,m=Kt(null),v=Kt(null),_=()=>{m.current&&(v.current=new so(m.current,{type:o,data:Mte(s,a),options:l&&{...l},plugins:c}),uR(e,v.current))},y=()=>{uR(e,null),v.current&&(v.current.destroy(),v.current=null)};return ht(()=>{!i&&v.current&&l&&Dte(v.current,l)},[i,l]),ht(()=>{!i&&v.current&&KP(v.current.config.data,s.labels)},[i,s.labels]),ht(()=>{!i&&v.current&&s.datasets&&XP(v.current.config.data,s.datasets,a)},[i,s.datasets]),ht(()=>{v.current&&(i?(y(),setTimeout(_)):v.current.update(h))},[i,l,s.labels,s.datasets,h]),ht(()=>{v.current&&(y(),setTimeout(_))},[o]),ht(()=>(_(),()=>y()),[]),R.jsx("canvas",{ref:m,role:"img",height:r,width:n,...g,children:d})}const YP=ji(Pte);function Lte(t,e){return so.register(e),ji((r,n)=>R.jsx(YP,{...r,ref:n,type:t}))}const ZP=Lte("line",is),Nte=(t,e)=>({maintainAspectRatio:!1,scales:{x:{ticks:{display:!1},grid:{display:!1},type:"time",time:{unit:Jn.Hour},border:{display:!1}},y:{ticks:{display:!1},grid:{display:!1},border:{display:!1}},y1:{position:"right",title:{display:!0,text:e,font:qf},ticks:{display:!1},grid:{display:!1},border:{display:!1}}},font:qf,borderColor:wn.primary,elements:{line:{borderWidth:1}},backgroundColor:uZ(t,wn.primary),plugins:{legend:{display:!1},tooltip:{enabled:!1}}}),Fte="0px 2px 1px -1px rgba(0, 0, 0, 0.2), 0px 1px 1px 0px rgba(0, 0, 0, 0.14), 0px 1px 3px 0px rgba(0, 0, 0, 0.12)",kte={backgroundColor:rt.surface,borderRadius:12,boxSizing:"border-box",color:rt.onSurface,overflow:"hidden"},zb=({elevation:t=1,children:e,style:r,...n})=>R.jsx("div",{style:{...kte,boxShadow:t?Fte:"none",...r},...n,children:e}),jte=[{opacity:1,easing:"ease-in-out"},{opacity:.4,easing:"ease-in-out"},{opacity:1}],$te=t=>t==="circular"?"50%":t==="rounded"?"4px":"0",lR=t=>typeof t=="number"?`${t}px`:t,as=({variant:t="rectangular",width:e,height:r,style:n,...i})=>{const a=Kt(null);return ht(()=>{var s,l;const o=(l=(s=a.current)==null?void 0:s.animate)==null?void 0:l.call(s,jte,{duration:2e3,delay:500,iterations:1/0});return()=>o==null?void 0:o.cancel()},[]),R.jsx("span",{ref:a,style:{display:"block",backgroundColor:"rgba(9, 34, 65, 0.11)",height:lR(r)||"1.2em",width:lR(e)||"auto",borderRadius:$te(t),...n},...i})},yy=({children:t,style:e,...r})=>R.jsx(zb,{style:{borderRadius:8,boxShadow:"0px 12px 20px -12px rgba(0, 0, 0, 0.12), inset 0px 0px 0px 1px #e1e4e8",cursor:"pointer",height:216,padding:16,width:"100%",...e},...r,children:t}),Ute=({style:t,...e})=>R.jsx(as,{style:{height:144,padding:16,width:"100%",...t},...e}),qte=({children:t,style:e,...r})=>R.jsx("div",{style:{display:"flex",alignItems:"center",flexDirection:"row",gap:8,justifyContent:"space-between",...e},...r,children:t}),by=({children:t,style:e,...r})=>R.jsx(ft,{variant:"subtitle2",style:{marginBottom:12,...e},...r,children:t}),Hte=({children:t,style:e,...r})=>R.jsx("div",{style:{alignItems:"center",cursor:"not-allowed",display:"flex",height:118,flexDirection:"column",justifyContent:"center",...e},...r,children:t}),Wte=()=>R.jsx($i,{style:{"--ix-icon-font-size":"3rem",color:"var(--clr-warning, #ff9800)",display:"block"},children:"error"}),Bte=({children:t,style:e,...r})=>R.jsx(ft,{variant:"body2",style:{marginTop:8,...e},...r,children:t}),zte=({endDate:t,functionName:e,interval:r,leasedSpaceName:n,onClick:i,startDate:a,subCategory:o})=>{var v;const{t:s}=Qt("location"),[l,c]=sr(),d=Nte(l,e),h=_D({endDate:t,functionName:e,interval:r,leasedSpaceName:n,startDate:a,subCategory:o}),m={datasets:lZ((v=h.data)==null?void 0:v.portalTrendData,{options:{fill:!0,pointStyle:!1}})};return h.isLoading?R.jsxs(yy,{children:[R.jsx(by,{children:o}),R.jsx(Ute,{variant:"rectangular"})]}):h.isError?R.jsxs(yy,{children:[R.jsx(by,{children:o}),R.jsxs(Hte,{children:[R.jsx(Wte,{}),R.jsx(Bte,{children:s("dcim-chart.load-fail.title")})]})]}):R.jsxs(yy,{onClick:i,children:[R.jsx(by,{children:o}),R.jsx(qte,{children:m&&R.jsx(ZP,{ref:c,options:d,data:m,width:"100%"})})]})},Vte=t=>{const{assetName:e,endDate:r,functionName:n,interval:i,leasedSpaceName:a,sitecode:o,startDate:s,subCategory:l,tdcid:c}=t;return`/chart/?${[`assetName=${e}`,`endDate=${r.toISOString()}`,`functionName=${encodeURIComponent(n)}`,`interval=${i}`,`leasedSpaceName=${a}`,`sitecode=${o}`,`startDate=${s.toISOString()}`,`subCategory=${l}`,`tdcid=${c}`].join("&")}`},Gte=({assetName:t,endDate:e,interval:r,leasedSpaceName:n,metadata:i,metadataIsLoading:a,metadataIsFetching:o,sitecode:s,startDate:l})=>{const c=vd();if(a||o)return R.jsx(_Z,{children:R.jsx(Yz,{})});const d=(i||[]).sort((h,g)=>h.displayOrder-g.displayOrder);return R.jsx(R.Fragment,{children:d.map(h=>{const g=`${h.tdcid}-${h.subCategory}-${h.defaultFunctionAliasName}`,m={assetName:t,endDate:e,functionName:h.defaultFunctionAliasName,interval:r,leasedSpaceName:n,sitecode:s,startDate:l,subCategory:h.subCategory,tdcid:h.tdcid};return R.jsx(zr,{xs:12,sm:6,lg:4,xl:3,children:R.jsx(zte,{endDate:e.toISOString(),functionName:h.defaultFunctionAliasName,interval:r,leasedSpaceName:n,onClick:()=>{const v=Vte(m);c(`${v}`)},startDate:l.toISOString(),subCategory:h.subCategory,tdcid:h.tdcid})},g)})})},Kte=({assetName:t,leasedSpaceName:e,date:r,sitecode:n})=>{const i=vd(),{t:a}=Qt("location"),o=d6(r),s=J3(o,{days:7}),l=o,c=xD(e,{enabled:!!n&&!!t});return R.jsxs(X0,{children:[R.jsx(Z0,{assetName:t,sitecode:n}),R.jsxs(Y0,{spacing:{xs:2.5,md:3},children:[R.jsx(zr,{xs:12,md:12,lg:12,xl:3,children:R.jsx(rb,{disableOptionAll:!0,filters:{type:cs},handleFilters:(d,h)=>{const g=`/alert?assetName=${t}&sitecode=${n}&leasedSpaceName=${e}&type=${h}`;i(g)},leasedSpaceName:e,title:a("alerts.title")})}),R.jsx(zr,{xs:12,md:12,lg:12,xl:9,children:R.jsxs("div",{children:[R.jsxs(mD,{children:[R.jsx(ft,{variant:"h6",children:a("title")}),R.jsx(ft,{variant:"body2",children:a("subtitle")})]}),R.jsx(vD,{spacing:{xs:2,md:3},children:R.jsx(Gte,{assetName:t,endDate:l,interval:Jn.Hour,leasedSpaceName:e,metadata:c.data,metadataIsLoading:c.isLoading,metadataIsFetching:c.isFetching,sitecode:n,startDate:s})})]})})]})]})},Xte={...Ca,flex:1,display:"grid",gridTemplateColumns:"minmax(28px, 50px) 1fr 24px",columnGap:20,textAlign:"left",padding:"8px 12px",borderRadius:12,lineHeight:"18px",backgroundColor:rt.outline,color:rt.onSurface},Yte=({children:t,style:e,...r})=>R.jsx("button",{style:{...Xte,...e},...r,children:t}),Zte={width:"min-content",padding:"3px 10px",backgroundColor:rt.onPrimary,borderRadius:16,fontFamily:"'Roboto', sans-serif",fontSize:13,lineHeight:"18px",letterSpacing:"0.16px",textAlign:"center"},Jte=({children:t,style:e,...r})=>R.jsx("div",{style:{...Zte,...e},...r,children:t}),Qte=({count:t,title:e,onClick:r})=>R.jsxs(Yte,{type:"button",onClick:r,children:[R.jsx(Jte,{children:t}),R.jsx(ft,{children:e}),R.jsx($i,{style:{"--ix-icon-font-size":"1em"},children:"chevron_right"})]}),ere=({children:t,style:e,...r})=>R.jsx("div",{style:{display:"inline-block",width:16,height:16,backgroundColor:rt.onSurface,border:`2px solid ${rt.pointBorder}`,borderRadius:16,...e},...r,children:t}),Os=({columnGap:t,children:e,style:r,...n})=>R.jsx("div",{style:{alignItems:"center",columnGap:t||"8px",display:"flex",flexDirection:"row",...r},...n,children:e}),tre=({children:t,style:e,...r})=>{const n=Qe(At("md"));return R.jsx(Os,{style:{flex:1,flexWrap:"wrap",justifyContent:"space-between",marginBottom:20,rowGap:16,columnGap:32,...n?{flexDirection:"column",alignItems:"flex-start"}:null,...e},...r,children:t})},rre=({children:t,style:e,...r})=>R.jsx("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",alignSelf:"stretch",justifyContent:"space-between",columnGap:32,...e},...r,children:t}),nre=({children:t,style:e,...r})=>R.jsx(zb,{style:{padding:"18px 16px 24px",borderRadius:0,...e},...r,children:t}),JP=({children:t,style:e,...r})=>{const n=Qe(At("md"));return R.jsx("div",{style:{minHeight:n?"40vh":"60vh",position:"relative",width:"99%",...e},...r,children:t})},QP="(max-width:1399.95px)",ire=({children:t,style:e,...r})=>{const n=Qe(QP),i=Qe(At("sm"));return R.jsx("div",{style:{display:"flex",flexDirection:i?"column":"row",flexWrap:"wrap",alignItems:i?"flex-start":"center",justifyContent:"space-between",marginBottom:12,rowGap:16,...n?{columnGap:32}:null,...e},...r,children:t})},are=({children:t,style:e,...r})=>{const n=Qe(At("sm")),i=Qe(QP);return R.jsx(Os,{style:{gap:n?16:24,justifyContent:"flex-start",flexWrap:"wrap",...i?{order:1,margin:"0 auto"}:null,...e},...r,children:t})},ore={...Ca,backgroundColor:sZ("#1456e0",.05),border:`1px solid ${rt.onSurface}`,padding:"2px 4px 3px",...Hf.caption},sre=({children:t,style:e,...r})=>R.jsx("button",{style:{...ore,...e},...r,children:t}),ure=({color:t,children:e,style:r,...n})=>R.jsx("div",{style:{backgroundColor:t||"unset",height:4,width:16,...r},...n,children:e}),lre=({children:t,style:e,...r})=>R.jsx(Os,{style:{flex:1,justifyContent:"space-between",minWidth:0,...e},...r,children:t}),cre=({children:t,style:e,...r})=>R.jsx(ft,{style:{minWidth:0,wordWrap:"break-word",...e},...r,children:t}),fre=({children:t,style:e,...r})=>R.jsx("label",{style:{display:"flex",alignItems:"center",gap:8,width:"100%",cursor:"pointer",...e},...r,children:t}),cR=({children:t,style:e,...r})=>{const n=Qe(ha("md"));return R.jsx("div",{style:{...n?{marginBottom:20}:null,...e},...r,children:t})},dre=({children:t,style:e,...r})=>R.jsx("div",{style:{display:"flex",flexDirection:"column",gap:10,margin:0,...e},...r,children:t}),hre={...Ca,alignSelf:"flex-start",...Hf.small,color:rt.primary,textDecoration:"underline"},fR=({children:t,style:e,...r})=>R.jsx("button",{style:{...hre,...e},...r,children:t}),pre=(t,e)=>({onDeselectAllDevices:()=>{const a=t.map(o=>({...o,selected:!1}));e(a)},onSelectAllDevices:()=>{const a=t.map(o=>({...o,selected:!0}));e(a)},onSelectDevice:a=>{const o=t.map(s=>{const l={...s};return l.id===a&&(l.selected=!l.selected),l});e(o)}}),gre=({devices:t=[],isLoading:e,setDevices:r=()=>{},title:n})=>{const{t:i}=Qt("location"),{isMobile:a}=ws(),o=pre(t,r),[s,l]=sr(!1),d=`${t.filter(m=>m.selected).length}/${t.length}`,h=t.every(m=>m.selected),g=e&&R.jsx(R.Fragment,{children:[1,2,3].map(m=>R.jsx(as,{},m))})||R.jsxs("div",{style:{display:"flex",flexDirection:"column",flexWrap:"wrap"},children:[h?R.jsx(fR,{type:"button",onClick:o.onDeselectAllDevices,children:i("dcim-chart.device-selector.deselect-all")}):R.jsx(fR,{type:"button",onClick:o.onSelectAllDevices,children:i("dcim-chart.device-selector.select-all")}),t.map(({color:m,id:v,name:_,selected:y})=>R.jsxs(fre,{children:[R.jsx(KR,{"aria-label":_,checked:y,name:_,style:{display:"inline-flex"},onCheckboxChange:()=>o.onSelectDevice(v)}),R.jsxs(lre,{children:[R.jsx(cre,{children:_}),R.jsx(ure,{color:m})]})]},_))]});if(a){const m=[{label:i("common:close"),mobileLabel:R.jsx($i,{style:{"--ix-icon-font-size":"24px"},children:"close"}),trigger:()=>l(!1)}];return R.jsxs(R.Fragment,{children:[R.jsx(q0,{actions:m,fullScreen:!0,open:s,title:i("dcim-chart.device-selector.label"),children:g}),R.jsxs(dre,{children:[R.jsx(cR,{children:R.jsx(ft,{variant:"h6",children:n})}),R.jsx(Qte,{count:d,onClick:()=>l(!0),title:i("dcim-chart.device-selector.label")})]})]})}return R.jsxs("div",{role:"group","aria-label":n,style:{display:"flex",flexDirection:"column",minWidth:0,width:"100%"},children:[R.jsx(cR,{children:R.jsx(ft,{variant:"h6",children:n})}),g]})},mre=({children:t,style:e,...r})=>{const n=Qe(At("md"));return R.jsx("div",{style:{position:"relative",minHeight:n?"40vh":"60vh",width:"99%",...e},...r,children:t})},vre=({children:t,style:e,...r})=>R.jsx(zb,{style:{padding:"18px 16px 24px",borderRadius:0,...e},...r,children:t}),c0=({columnGap:t,children:e,style:r,...n})=>R.jsx("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",columnGap:t||"8px",...r},...n,children:e}),yre=({children:t,style:e,...r})=>{const n=Qe(ha("md")),i=Qe(At("md"));return R.jsx(c0,{style:{...n?{flex:1}:null,...i?{alignItems:"flex-start",flexDirection:"column"}:null,...e},...r,children:t})},oi={Day:1350,Hour:15e3,FifteenMinutes:5e4,FiveMinutes:60480,Minute:60480},bre=(t,e,r)=>{const o=(e.valueOf()-t.valueOf())/yD/60;let l=o/1440*r;const c={datapointsForDuration:l,intervalType:Jn.Day,limit:oi.Day,numberOfDevices:r,isValid:l<=oi.Day};l=o/60*r;const h={datapointsForDuration:l,intervalType:Jn.Hour,limit:oi.Hour,numberOfDevices:r,isValid:l<=oi.Hour};l=o/15*r;const m={datapointsForDuration:l,intervalType:Jn.FifteenMinutes,limit:oi.FifteenMinutes,numberOfDevices:r,isValid:l<=oi.FifteenMinutes};l=o/5*r;const _={datapointsForDuration:l,intervalType:Jn.FiveMinutes,limit:oi.FiveMinutes,numberOfDevices:r,isValid:l<=oi.FiveMinutes};l=o/1*r;const x={datapointsForDuration:l,intervalType:Jn.Minute,limit:oi.Minute,numberOfDevices:r,isValid:l<=oi.Minute};return{Day:c,Hour:h,FifteenMinutes:m,FiveMinutes:_,Minute:x}},_re=(t,e,r)=>{const n=bre(t,e,r);return[{disabled:!n.Day.isValid,value:n.Day.intervalType},{disabled:!n.Hour.isValid,value:n.Hour.intervalType},{disabled:!n.FifteenMinutes.isValid,value:n.FifteenMinutes.intervalType},{disabled:!n.FiveMinutes.isValid,value:n.FiveMinutes.intervalType},{disabled:!n.Minute.isValid,value:n.Minute.intervalType}]},xre=({interval:t,startDate:e,endDate:r,numberOfDevices:n,setInterval:i})=>{const{t:a}=Qt("location"),{isMobile:o}=ws(),s=_re(e,r,n);return R.jsxs(yre,{children:[R.jsx(ft,{variant:"body2",children:a("dcim-chart.increments.label")}),R.jsx(H0,{ariaLabel:a("dcim-chart.increments.label"),getOptionDisabled:l=>l.disabled,getOptionLabel:l=>a(`dcim-chart.increments.${mr.kebabCase(l.value)}`),getOptionValue:l=>l.value,onChange:l=>i(l),options:s,style:o?{width:"100%"}:void 0,trailingIcon:"av_timer",value:t})]})};var wr=(t=>(t.Daily="daily",t.Trend="trend",t))(wr||{});const wre=({children:t,...e})=>R.jsx("div",{role:"tablist",...e,children:R.jsx("div",{style:{borderRadius:12,display:"inline-flex"},children:t})}),Tre={...Ca,backgroundColor:"transparent",border:`1px solid ${rt.outlineVariant}`,boxSizing:"border-box",color:rt.onSurfaceVariant,display:"block",fontFamily:"var(--root-secondary-font, 'Red Hat Display', sans-serif)",fontSize:10,fontWeight:700,letterSpacing:"1.25px",lineHeight:"16px",minWidth:90,padding:"4px 6px",textAlign:"center",textTransform:"uppercase"},Sre={backgroundColor:rt.primary,borderColor:rt.primary,color:rt.surface},eL=ji(({selected:t,position:e,children:r,style:n,...i},a)=>R.jsx("button",{ref:a,type:"button",role:"tab","aria-selected":t,tabIndex:t?0:-1,style:{...Tre,borderRadius:e==="first"?"3px 0 0 3px":"0 3px 3px 0",...t?Sre:null,...n},...i,children:r}));eL.displayName="TabButton";const dR=[wr.Trend,wr.Daily],f0=(t,e)=>`${t}-tab-${e}`,d0=(t,e)=>`${t}-panel-${e}`,Cre=({idPrefix:t,onChange:e,viewType:r})=>{const{t:n}=Qt("location"),i=Kt([]),a={[wr.Trend]:n("dcim-chart.view.trend"),[wr.Daily]:n("dcim-chart.view.daily")},o=(s,l)=>{var h;const c=dR.length-1,d={ArrowRight:l===c?0:l+1,ArrowLeft:l===0?c:l-1,Home:0,End:c};s.key in d&&(s.preventDefault(),(h=i.current[d[s.key]])==null||h.focus())};return R.jsx(wre,{"aria-orientation":"horizontal",children:dR.map((s,l)=>R.jsx(eL,{ref:c=>{i.current[l]=c},id:f0(t,s),"aria-controls":d0(t,s),selected:s===r,position:l===0?"first":"last",onClick:()=>e(s),onKeyDown:c=>o(c,l),children:a[s]},s))})},Ere=t=>R.jsx("svg",{width:"1em",height:"1em",fill:"currentColor",focusable:"false","aria-hidden":"true",...t,children:R.jsx("path",{d:"M10 0H0V20H16V6L10 0ZM3 16L5.5 12.667L7 14.667L9.5 11.334L13 16H3ZM9 7V1.5L14.5 7H9Z"})}),Ore=t=>R.jsx("svg",{width:"1em",height:"1em",fill:"currentColor",focusable:"false","aria-hidden":"true",...t,children:R.jsx("path",{d:"M10 0L0 2V16L10 18V0ZM12 2V4H14V6H12V8H14V10H12V12H14V14H12V16H20V2H12ZM16 4H18V6H16V4ZM2.17578 5.29688H3.95312L4.87695 7.51172C4.95195 7.69272 5.00841 7.90262 5.06641 8.14062H5.0918C5.1248 7.99762 5.19197 7.77914 5.29297 7.49414L6.32227 5.29688H7.94336L6.00781 8.9668L8 12.7031H6.27148L5.1582 10.2891C5.1162 10.2041 5.06639 10.0329 5.02539 9.79492H5.00977C4.98477 9.90892 4.93438 10.0796 4.85938 10.3086L3.73633 12.7031H2L4.06055 8.99609L2.17578 5.29688ZM16 8H18V10H16V8ZM16 12H18V14H16V12Z"})}),Are={...Ca,display:"inline-flex",alignItems:"center",justifyContent:"center",padding:2,borderRadius:"50%"},hR=({$color:t,children:e,disabled:r,style:n,...i})=>{const[a,o]=sr(!1);return R.jsx("button",{disabled:r,onMouseEnter:()=>o(!0),onMouseLeave:()=>o(!1),style:{...Are,color:r?"rgba(0, 0, 0, 0.26)":t,...r?{cursor:"default"}:null,...a&&!r?{backgroundColor:"rgba(9, 34, 65, 0.04)"}:null,...n},...i,children:e})};function _y(t){return t==null?"":`${t}`}function Rre(t={}){const{separator:e,decimals:r}=t;return e?r?n=>n.toFixed(r).replace(".",e):n=>`${n}`.replace(".",e):r?n=>n.toFixed(r):n=>`${n}`}function Vb(t={}){const e=typeof t.quote=="string"?t.quote:'"',r=typeof t.escapedQuote=="string"?t.escapedQuote:`${e}${e}`;if(!e||e===r)return i=>i;const n=new RegExp(e,"g");return i=>(i.includes(e)&&(i=i.replace(n,r)),`${e}${i}${e}`)}function Ire(t={stringFormatter:Vb()}){return e=>t.stringFormatter(e.toString().slice(7,-1))}function Dre(t={stringFormatter:Vb()}){return e=>{if(e===null)return"";let r=JSON.stringify(e);return r===void 0?"":(r[0]==='"'&&(r=r.replace(/^"(.+)"$/,"$1")),t.stringFormatter(r))}}const Mre=RegExp(`[^.[\\]]+|\\[(?:([^"'][^[]*)|(["'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))`,"g");function Pre(t){var e,r,n;const i=[];let a;for(;a=Mre.exec(t);)i.push((n=(e=a[3])!==null&&e!==void 0?e:(r=a[1])===null||r===void 0?void 0:r.trim())!==null&&n!==void 0?n:a[0]);return i}function pR(t,e,r){if(e in t){const a=t[e];return a===void 0?r:a}const n=Array.isArray(e)?e:Pre(e);let i=t;for(const a of n)if(i=i==null?void 0:i[a],i===void 0)return r;return i}function tL(t,e){try{return Array.isArray(e)?t.push(...e):t.push(e),t}catch{return t.concat(e)}}function h0(t,e){let r=!0;return t.reduce((n,i)=>(i==null&&(i=""),r?(r=!1,`${i}`):`${n}${e}${i}`),"")}var gR;(function(t){t.header="header",t.undefined="undefined",t.boolean="boolean",t.number="number",t.bigint="bigint",t.string="string",t.symbol="symbol",t.function="function",t.object="object"})(gR||(gR={}));class Lre{constructor(e){this.opts=this.preprocessOpts(e)}preprocessOpts(e){const r=Object.assign({},e);r.fields&&(r.fields=this.preprocessFieldsInfo(r.fields,r.defaultValue)),r.transforms=r.transforms||[];const n=r.formatters&&r.formatters.string||Vb(),i=Dre({stringFormatter:n}),a={header:n,undefined:_y,boolean:_y,number:Rre(),bigint:_y,string:n,symbol:Ire({stringFormatter:n}),function:i,object:i};return r.formatters=Object.assign(Object.assign({},a),r.formatters),r.delimiter=r.delimiter||",",r.eol=r.eol||`
|
|
110
|
+
`,r.header=r.header!==!1,r.includeEmptyRows=r.includeEmptyRows||!1,r.withBOM=r.withBOM||!1,r}preprocessFieldsInfo(e,r){return e.map(n=>{if(typeof n=="string")return{label:n,value:i=>pR(i,n,r)};if(typeof n=="object"){const i="default"in n?n.default:r;if(typeof n.value=="string"){const a=n.value;return{label:n.label||n.value,value:o=>pR(o,a,i)}}if(typeof n.value=="function"){const a=n.label||n.value.name||"",o={label:a,default:i},s=n.value;return{label:a,value(l){const c=s(l,o);return c===void 0?i:c}}}}throw new Error("Invalid field info option. "+JSON.stringify(n))})}getHeader(){return h0(this.opts.fields.map(e=>this.opts.formatters.header(e.label)),this.opts.delimiter)}preprocessRow(e){return this.opts.transforms.reduce((r,n)=>r.map(i=>n(i)).reduce(tL,[]),[e])}processRow(e){if(!e)return;const r=this.opts.fields.map(n=>this.processCell(e,n));if(!(!this.opts.includeEmptyRows&&r.every(n=>n==="")))return h0(r,this.opts.delimiter)}processCell(e,r){return this.processValue(r.value(e))}processValue(e){const r=this.opts.formatters[typeof e];return r(e)}}class Nre extends Lre{constructor(e){super(e)}parse(e){const r=this.preprocessData(e);this.opts.fields=this.opts.fields||this.preprocessFieldsInfo(r.reduce((o,s)=>(Object.keys(s).forEach(l=>{o.includes(l)||o.push(l)}),o),[]),this.opts.defaultValue);const n=this.opts.header?this.getHeader():"",i=this.processData(r);return(this.opts.withBOM?"\uFEFF":"")+n+(n&&i?this.opts.eol:"")+i}preprocessData(e){const r=Array.isArray(e)?e:[e];if(!this.opts.fields){if(e==null||r.length===0)throw new Error('Data should not be empty or the "fields" option should be included');if(typeof r[0]!="object")throw new Error('Data items should be objects or the "fields" option should be included')}return this.opts.transforms.length===0?r:r.map(n=>this.preprocessRow(n)).reduce(tL,[])}processData(e){return h0(e.map(r=>this.processRow(r)).filter(r=>r),this.opts.eol)}}var Cr;(function(t){t[t.BACKSPACE=8]="BACKSPACE",t[t.FORM_FEED=12]="FORM_FEED",t[t.NEWLINE=10]="NEWLINE",t[t.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",t[t.TAB=9]="TAB",t[t.SPACE=32]="SPACE",t[t.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",t[t.QUOTATION_MARK=34]="QUOTATION_MARK",t[t.NUMBER_SIGN=35]="NUMBER_SIGN",t[t.DOLLAR_SIGN=36]="DOLLAR_SIGN",t[t.PERCENT_SIGN=37]="PERCENT_SIGN",t[t.AMPERSAND=38]="AMPERSAND",t[t.APOSTROPHE=39]="APOSTROPHE",t[t.LEFT_PARENTHESIS=40]="LEFT_PARENTHESIS",t[t.RIGHT_PARENTHESIS=41]="RIGHT_PARENTHESIS",t[t.ASTERISK=42]="ASTERISK",t[t.PLUS_SIGN=43]="PLUS_SIGN",t[t.COMMA=44]="COMMA",t[t.HYPHEN_MINUS=45]="HYPHEN_MINUS",t[t.FULL_STOP=46]="FULL_STOP",t[t.SOLIDUS=47]="SOLIDUS",t[t.DIGIT_ZERO=48]="DIGIT_ZERO",t[t.DIGIT_ONE=49]="DIGIT_ONE",t[t.DIGIT_TWO=50]="DIGIT_TWO",t[t.DIGIT_THREE=51]="DIGIT_THREE",t[t.DIGIT_FOUR=52]="DIGIT_FOUR",t[t.DIGIT_FIVE=53]="DIGIT_FIVE",t[t.DIGIT_SIX=54]="DIGIT_SIX",t[t.DIGIT_SEVEN=55]="DIGIT_SEVEN",t[t.DIGIT_EIGHT=56]="DIGIT_EIGHT",t[t.DIGIT_NINE=57]="DIGIT_NINE",t[t.COLON=58]="COLON",t[t.SEMICOLON=59]="SEMICOLON",t[t.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",t[t.EQUALS_SIGN=61]="EQUALS_SIGN",t[t.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",t[t.QUESTION_MARK=63]="QUESTION_MARK",t[t.COMMERCIAL_AT=64]="COMMERCIAL_AT",t[t.LATIN_CAPITAL_LETTER_A=65]="LATIN_CAPITAL_LETTER_A",t[t.LATIN_CAPITAL_LETTER_B=66]="LATIN_CAPITAL_LETTER_B",t[t.LATIN_CAPITAL_LETTER_C=67]="LATIN_CAPITAL_LETTER_C",t[t.LATIN_CAPITAL_LETTER_D=68]="LATIN_CAPITAL_LETTER_D",t[t.LATIN_CAPITAL_LETTER_E=69]="LATIN_CAPITAL_LETTER_E",t[t.LATIN_CAPITAL_LETTER_F=70]="LATIN_CAPITAL_LETTER_F",t[t.LATIN_CAPITAL_LETTER_G=71]="LATIN_CAPITAL_LETTER_G",t[t.LATIN_CAPITAL_LETTER_H=72]="LATIN_CAPITAL_LETTER_H",t[t.LATIN_CAPITAL_LETTER_I=73]="LATIN_CAPITAL_LETTER_I",t[t.LATIN_CAPITAL_LETTER_J=74]="LATIN_CAPITAL_LETTER_J",t[t.LATIN_CAPITAL_LETTER_K=75]="LATIN_CAPITAL_LETTER_K",t[t.LATIN_CAPITAL_LETTER_L=76]="LATIN_CAPITAL_LETTER_L",t[t.LATIN_CAPITAL_LETTER_M=77]="LATIN_CAPITAL_LETTER_M",t[t.LATIN_CAPITAL_LETTER_N=78]="LATIN_CAPITAL_LETTER_N",t[t.LATIN_CAPITAL_LETTER_O=79]="LATIN_CAPITAL_LETTER_O",t[t.LATIN_CAPITAL_LETTER_P=80]="LATIN_CAPITAL_LETTER_P",t[t.LATIN_CAPITAL_LETTER_Q=81]="LATIN_CAPITAL_LETTER_Q",t[t.LATIN_CAPITAL_LETTER_R=82]="LATIN_CAPITAL_LETTER_R",t[t.LATIN_CAPITAL_LETTER_S=83]="LATIN_CAPITAL_LETTER_S",t[t.LATIN_CAPITAL_LETTER_T=84]="LATIN_CAPITAL_LETTER_T",t[t.LATIN_CAPITAL_LETTER_U=85]="LATIN_CAPITAL_LETTER_U",t[t.LATIN_CAPITAL_LETTER_V=86]="LATIN_CAPITAL_LETTER_V",t[t.LATIN_CAPITAL_LETTER_W=87]="LATIN_CAPITAL_LETTER_W",t[t.LATIN_CAPITAL_LETTER_X=88]="LATIN_CAPITAL_LETTER_X",t[t.LATIN_CAPITAL_LETTER_Y=89]="LATIN_CAPITAL_LETTER_Y",t[t.LATIN_CAPITAL_LETTER_Z=90]="LATIN_CAPITAL_LETTER_Z",t[t.LEFT_SQUARE_BRACKET=91]="LEFT_SQUARE_BRACKET",t[t.REVERSE_SOLIDUS=92]="REVERSE_SOLIDUS",t[t.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",t[t.CIRCUMFLEX_ACCENT=94]="CIRCUMFLEX_ACCENT",t[t.LOW_LINE=95]="LOW_LINE",t[t.GRAVE_ACCENT=96]="GRAVE_ACCENT",t[t.LATIN_SMALL_LETTER_A=97]="LATIN_SMALL_LETTER_A",t[t.LATIN_SMALL_LETTER_B=98]="LATIN_SMALL_LETTER_B",t[t.LATIN_SMALL_LETTER_C=99]="LATIN_SMALL_LETTER_C",t[t.LATIN_SMALL_LETTER_D=100]="LATIN_SMALL_LETTER_D",t[t.LATIN_SMALL_LETTER_E=101]="LATIN_SMALL_LETTER_E",t[t.LATIN_SMALL_LETTER_F=102]="LATIN_SMALL_LETTER_F",t[t.LATIN_SMALL_LETTER_G=103]="LATIN_SMALL_LETTER_G",t[t.LATIN_SMALL_LETTER_H=104]="LATIN_SMALL_LETTER_H",t[t.LATIN_SMALL_LETTER_I=105]="LATIN_SMALL_LETTER_I",t[t.LATIN_SMALL_LETTER_J=106]="LATIN_SMALL_LETTER_J",t[t.LATIN_SMALL_LETTER_K=107]="LATIN_SMALL_LETTER_K",t[t.LATIN_SMALL_LETTER_L=108]="LATIN_SMALL_LETTER_L",t[t.LATIN_SMALL_LETTER_M=109]="LATIN_SMALL_LETTER_M",t[t.LATIN_SMALL_LETTER_N=110]="LATIN_SMALL_LETTER_N",t[t.LATIN_SMALL_LETTER_O=111]="LATIN_SMALL_LETTER_O",t[t.LATIN_SMALL_LETTER_P=112]="LATIN_SMALL_LETTER_P",t[t.LATIN_SMALL_LETTER_Q=113]="LATIN_SMALL_LETTER_Q",t[t.LATIN_SMALL_LETTER_R=114]="LATIN_SMALL_LETTER_R",t[t.LATIN_SMALL_LETTER_S=115]="LATIN_SMALL_LETTER_S",t[t.LATIN_SMALL_LETTER_T=116]="LATIN_SMALL_LETTER_T",t[t.LATIN_SMALL_LETTER_U=117]="LATIN_SMALL_LETTER_U",t[t.LATIN_SMALL_LETTER_V=118]="LATIN_SMALL_LETTER_V",t[t.LATIN_SMALL_LETTER_W=119]="LATIN_SMALL_LETTER_W",t[t.LATIN_SMALL_LETTER_X=120]="LATIN_SMALL_LETTER_X",t[t.LATIN_SMALL_LETTER_Y=121]="LATIN_SMALL_LETTER_Y",t[t.LATIN_SMALL_LETTER_Z=122]="LATIN_SMALL_LETTER_Z",t[t.LEFT_CURLY_BRACKET=123]="LEFT_CURLY_BRACKET",t[t.VERTICAL_LINE=124]="VERTICAL_LINE",t[t.RIGHT_CURLY_BRACKET=125]="RIGHT_CURLY_BRACKET",t[t.TILDE=126]="TILDE"})(Cr||(Cr={}));Cr.QUOTATION_MARK+"",Cr.QUOTATION_MARK,Cr.REVERSE_SOLIDUS+"",Cr.REVERSE_SOLIDUS,Cr.SOLIDUS+"",Cr.SOLIDUS,Cr.LATIN_SMALL_LETTER_B+"",Cr.BACKSPACE,Cr.LATIN_SMALL_LETTER_F+"",Cr.FORM_FEED,Cr.LATIN_SMALL_LETTER_N+"",Cr.NEWLINE,Cr.LATIN_SMALL_LETTER_R+"",Cr.CARRIAGE_RETURN,Cr.LATIN_SMALL_LETTER_T+"",Cr.TAB;var mR;(function(t){t[t.LEFT_BRACE=0]="LEFT_BRACE",t[t.RIGHT_BRACE=1]="RIGHT_BRACE",t[t.LEFT_BRACKET=2]="LEFT_BRACKET",t[t.RIGHT_BRACKET=3]="RIGHT_BRACKET",t[t.COLON=4]="COLON",t[t.COMMA=5]="COMMA",t[t.TRUE=6]="TRUE",t[t.FALSE=7]="FALSE",t[t.NULL=8]="NULL",t[t.STRING=9]="STRING",t[t.NUMBER=10]="NUMBER",t[t.SEPARATOR=11]="SEPARATOR"})(mR||(mR={}));var vR;(function(t){t[t.START=0]="START",t[t.ENDED=1]="ENDED",t[t.ERROR=2]="ERROR",t[t.TRUE1=3]="TRUE1",t[t.TRUE2=4]="TRUE2",t[t.TRUE3=5]="TRUE3",t[t.FALSE1=6]="FALSE1",t[t.FALSE2=7]="FALSE2",t[t.FALSE3=8]="FALSE3",t[t.FALSE4=9]="FALSE4",t[t.NULL1=10]="NULL1",t[t.NULL2=11]="NULL2",t[t.NULL3=12]="NULL3",t[t.STRING_DEFAULT=13]="STRING_DEFAULT",t[t.STRING_AFTER_BACKSLASH=14]="STRING_AFTER_BACKSLASH",t[t.STRING_UNICODE_DIGIT_1=15]="STRING_UNICODE_DIGIT_1",t[t.STRING_UNICODE_DIGIT_2=16]="STRING_UNICODE_DIGIT_2",t[t.STRING_UNICODE_DIGIT_3=17]="STRING_UNICODE_DIGIT_3",t[t.STRING_UNICODE_DIGIT_4=18]="STRING_UNICODE_DIGIT_4",t[t.STRING_INCOMPLETE_CHAR=19]="STRING_INCOMPLETE_CHAR",t[t.NUMBER_AFTER_INITIAL_MINUS=20]="NUMBER_AFTER_INITIAL_MINUS",t[t.NUMBER_AFTER_INITIAL_ZERO=21]="NUMBER_AFTER_INITIAL_ZERO",t[t.NUMBER_AFTER_INITIAL_NON_ZERO=22]="NUMBER_AFTER_INITIAL_NON_ZERO",t[t.NUMBER_AFTER_FULL_STOP=23]="NUMBER_AFTER_FULL_STOP",t[t.NUMBER_AFTER_DECIMAL=24]="NUMBER_AFTER_DECIMAL",t[t.NUMBER_AFTER_E=25]="NUMBER_AFTER_E",t[t.NUMBER_AFTER_E_AND_SIGN=26]="NUMBER_AFTER_E_AND_SIGN",t[t.NUMBER_AFTER_E_AND_DIGIT=27]="NUMBER_AFTER_E_AND_DIGIT",t[t.SEPARATOR=28]="SEPARATOR",t[t.BOM_OR_START=29]="BOM_OR_START",t[t.BOM=30]="BOM"})(vR||(vR={}));var yR;(function(t){t[t.OBJECT=0]="OBJECT",t[t.ARRAY=1]="ARRAY"})(yR||(yR={}));var bR;(function(t){t[t.VALUE=0]="VALUE",t[t.KEY=1]="KEY",t[t.COLON=2]="COLON",t[t.COMMA=3]="COMMA",t[t.ENDED=4]="ENDED",t[t.ERROR=5]="ERROR",t[t.SEPARATOR=6]="SEPARATOR"})(bR||(bR={}));const Fre=t=>[{value:"deviceDataId",label:t("dcim-chart.export.header.deviceDataId")},{value:"deviceName",label:t("dcim-chart.export.header.deviceName")},{value:"date",label:t("dcim-chart.export.header.date")},{value:"minValue",label:t("dcim-chart.export.header.minValue")},{value:"maxValue",label:t("dcim-chart.export.header.maxValue")},{value:"pointValue",label:t("dcim-chart.export.header.pointValue")}],rL=t=>{let e=document.getElementById("chartjs-tooltip");e||(e=document.createElement("div"),e.id="chartjs-tooltip",document.body.appendChild(e));const r=t.tooltip;if(r.opacity===0){e.style.opacity="0";return}if(e.classList.remove("above","below","no-transform"),r.yAlign?e.classList.add(r.yAlign):e.classList.add("no-transform"),r.body){const s=r.title,[l]=r.body.map(({lines:h})=>h),c=VO(Hf.smallBold,["margin-block:0px"]),d=VO(Hf.small,["margin-block:0px"]);e.replaceChildren(),s.forEach(h=>{const g=document.createElement("h3");g.setAttribute("style",c);const m=document.createElement("strong");m.textContent=h,g.appendChild(m),e.appendChild(g)}),l.forEach(h=>{const g=document.createElement("p");g.setAttribute("style",d),g.textContent=h,e.appendChild(g)})}const n=t.chart.canvas.getBoundingClientRect();let i=!1;r.caretX>r.chart.width*.9&&(i=!0);const a=i?"unset":n.left+window.scrollX+r.caretX+"px",o=i?n.width+window.scrollX-r.caretX+110+"px":"unset";e.style.opacity="1",e.style.position="absolute",e.style.left=a,e.style.right=o,e.style.top=n.top+window.scrollY+r.caretY+"px",e.style.padding="8px 12px",e.style.pointerEvents="none",e.style.backgroundColor=wn.surface,e.style.boxShadow="0px 0px 0px 1px "+wn.onSurfaceVariant,e.style.borderRadius="12px"},kre=(t,e,r,n)=>{if(!t)return[];const i=[];return t.forEach(a=>{const o=e.find(s=>s.id===a.deviceDataId);o!=null&&o.selected&&i.push(a)}),i.map(a=>{const{deviceDataId:o,deviceName:s,trendData:l}=a;return l.map(c=>{const{maxValue:d,minValue:h,pointValue:g}=c;let{pollDateTime:m}=c;r&&(m=m.replace(" ","T"));const v=n(m,r);return{deviceDataId:o,deviceName:s,date:v,minValue:h,maxValue:d,pointValue:g}})}).flat()};async function jre(t,e){const r=new Blob([t]),n=URL.createObjectURL(r),i=document.createElement("a");i.download=`${e}.csv`,i.href=n,i.target="_blank",document.body.appendChild(i),i.click(),document.body.removeChild(i)}function $re(t,e,r=!1){const n=document.createElement("a");n.download=e,r?n.href=t:n.href="data:application/octet-stream;base64,"+t,n.target="_blank",n.click()}const Ure=t=>{const{assetName:e,chartType:r,dailyRef:n,data:i,devices:a,sitecode:o,trendRef:s}=t,{t:l}=Qt("location"),{formatDateTime:c}=$0(),d=()=>`${l("dcim-chart.export.file-name",{location:e,site:o,view:mr.startCase(r)})}`;return{createFileName:d,exportCsv:()=>{const m=new Nre({fields:Fre(l)}),v=r===wr.Trend,_=kre(i,a,v,c),y=m.parse(_),x=d();jre(y,x)},exportImage:()=>{const v=(r===wr.Trend?s:n).toBase64Image()||"",_=d();$re(v,`${_}.png`,!0)}}},qre=t=>{const{disabled:e}=t,r=Ure(t);return R.jsxs(Os,{children:[R.jsx(hR,{type:"button",disabled:e,onClick:r.exportImage,$color:"var(--clr-primary, #1456e0)",children:R.jsx(Ere,{width:20,height:20})}),R.jsx(hR,{type:"button",disabled:e,onClick:r.exportCsv,$color:"var(--clr-success, #4caf50)",children:R.jsx(Ore,{width:20,height:20})})]})},Hre="ohlc",Wre=(t,e,r,n)=>r.length?{datasets:r.map(a=>{const{deviceDataId:o,trendData:s,deviceName:l}=a;let c=[];const d=n.find(g=>g.id===o);return s.forEach(({maxValue:g,minValue:m,pointValue:v,utcPollDateTime:_})=>{const y=[],x=cn(_).getTime(),w=mr.chain(t).filter(C=>C.ddid===o).findLast(({alertTimeStamp:C})=>ZW(x,cn(C))).value();w&&y.push({x,y:Number(w.functionValue),alert:w}),y.push({x,y:Number(v)},{x,y:Number(m)},{x,y:Number(g)}),c=c.concat(y.map((C,A)=>({...C,index:A,hasAlert:w!==void 0})))}),c=c.sort((g,m)=>g.x-m.x),{animation:{duration:500,easing:"easeInOutCubic"},data:c,hidden:!(d!=null&&d.selected),label:l,pointBackgroundColor:g=>{const m=g.raw;return m.alert?wn.critical:m.index===0||m.hasAlert&&m.index===1?wn.onSurface:wn.surface},pointBorderColor:g=>{const m=g.raw,{borderColor:v}=g.dataset;return m.alert?wn.critical:m.index===0?v==null?void 0:v.toString():wn.onSurface},...e}})}:{datasets:[]},nL=(t=!1,e,r,n,i)=>({maintainAspectRatio:!1,animation:!1,scales:{x:{type:"time",time:{unit:"hour",tooltipFormat:`EEE, MMM dd, yyyy ${n}`},ticks:{minRotation:t?90:45,maxTicksLimit:t?12:24,callback:a=>Ku(Number(a),`${n} dd MMM`,{locale:e})}},y:{type:"linear"},y1:{axis:"y",type:"linear",position:"right",border:{display:!1},grid:{display:!1},ticks:{display:!1},title:{display:!0,text:r,padding:{bottom:32},font:qf}}},font:qf,plugins:{legend:{display:!1},colors:{enabled:!1},annotation:i?{annotations:[{backgroundColor:wn.outlineVariant,borderColor:Qy("#000",.5),type:"box",xMin:cn(i.startDate).getTime(),xMax:cn(i.endDate).getTime()}]}:{}}}),Bre=(t,e,r)=>{const{t:n}=Qt("location"),{adapterLocale:i}=wI(),{getTimeFormatString:a}=$0(),{isMobile:o}=ws(),s=nL(o,i,r,a(!1),t),l=zre(n,e,a(!1));return mr.merge(s,l)},zre=(t,e,r)=>{const n=t("dcim-chart.point-value.daily-avg"),i=t("dcim-chart.point-value.daily-min"),a=t("dcim-chart.point-value.daily-max"),o=t("dcim-chart.point-value.current");return{scales:{x:{ticks:{source:"data"}}},plugins:{tooltip:{callbacks:{title:()=>[e],label:l=>{const c=l.raw,d=[n,i,a];c.hasAlert&&d.unshift("");let h=l.label,g=" ";if(c.alert){const{alertType:v,alertCategory:_,alertTimeStamp:y}=c.alert;g=t("dcim-chart.point-value.alert",{type:mr.upperFirst(v),category:mr.upperFirst(_)}),d.unshift(g),h=Ku(cn(y),`EEE, MMM dd, yyyy ${r}`)}const m=d[c.index];return[h,m,`${o}: ${l.formattedValue}`]}},enabled:!1,external:l=>rL(l)}}}},Vre=({alerts:t=[],data:e=[],deviceList:r=[],plannedMaintenance:n,setChartRef:i,title:a="",yAxisLabel:o})=>{const s=Bre(n,a,o),l=Wre(t,s,e,r);return R.jsx(JP,{children:R.jsx(YP,{data:l,options:s,ref:i,type:Hre,width:"100%"})})},Gre=(t,e,r=[],n)=>r.length?{datasets:r.map(a=>{const{deviceDataId:o,trendData:s,deviceName:l}=a,c=[],d=n.find(h=>h.id===o);return s.forEach(({pointValue:h,utcPollDateTime:g})=>{const m=cn(g).getTime();c.push({x:m,y:Number(h)})}),t==null||t.filter(h=>h.ddid===o).forEach(h=>{c.push({x:cn(h.alertTimeStamp).getTime(),y:Number(h.functionValue),alert:h})}),c.sort((h,g)=>h.x-g.x),{animation:{duration:500,easing:"easeInOutCubic"},borderColor:d==null?void 0:d.color,borderJoinStyle:"bevel",data:c,hidden:!(d!=null&&d.selected),label:l,pointBackgroundColor:h=>_R(h.raw),pointBorderColor:h=>_R(h.raw),pointBorderWidth:h=>h.raw.alert?2:0,pointRadius:2,...e}})}:{datasets:[]};function _R(t){return t.alert?wn.critical:wn.onSurface}const Kre=(t,e,r,n)=>{const{t:i}=Qt("location"),{adapterLocale:a}=wI(),{getTimeFormatString:o}=Ed(),{isMobile:s}=ws(),l=nL(s,a,n,o(!1),t),c=Xre(e,r,i("dcim-chart.point-value.current"));return mr.merge(l,c)},Xre=(t,e,r)=>({elements:{line:{borderWidth:2}},plugins:{tooltip:{callbacks:{title:()=>[t],label:i=>[i.label,e,`${r}: ${i.formattedValue}`]},enabled:!1,external:i=>rL(i)}},scales:{x:{ticks:{source:"data"}}}}),Yre=({alerts:t=[],data:e=[],deviceList:r=[],plannedMaintenance:n,setChartRef:i,title:a="",unitInfo:o="",yAxisLabel:s})=>{const l=Kre(n,a,o,s),c=Gre(t,l,e,r);return R.jsx(JP,{children:R.jsx(ZP,{data:c,options:l,ref:i,width:"100%"})})},Zre=({children:t,style:e,...r})=>{const n=Qe(At("sm"));return R.jsx("div",{style:{display:"flex",flexDirection:n?"column":"row",alignItems:"inherit",gap:8,...e},...r,children:t})},xR=t=>t,Jre=({isMobile:t,metric:e,options:r,setMetric:n,title:i})=>R.jsxs(Zre,{children:[R.jsx(ft,{variant:"body2",style:{whiteSpace:"nowrap"},children:i}),R.jsx(H0,{ariaLabel:i,getOptionLabel:xR,getOptionValue:xR,onChange:n,options:r,style:t?{width:"100%"}:void 0,value:e})]}),Qre=({children:t,style:e,...r})=>R.jsx(mre,{style:{paddingTop:"40%",...e},...r,children:t}),ene=({style:t,...e})=>R.jsx(as,{style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",...t},...e}),tne=()=>R.jsxs(vre,{children:[R.jsxs("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between",marginBottom:24},children:[R.jsx(c0,{children:R.jsx(as,{width:125,variant:"rectangular"})}),R.jsx(c0,{children:R.jsx(as,{width:"30vw",variant:"rectangular"})}),R.jsx(as,{width:125,variant:"rectangular"})]}),R.jsx(Qre,{children:R.jsx(ene,{variant:"rectangular",style:{position:"absolute",top:0,left:0,width:"100%",height:"100%"}})})]}),rne=t=>{const{label:e,setShowAlerts:r,showAlerts:n}=t;return R.jsx(KR,{checked:n,label:e,style:{display:"inline-flex"},onCheckboxChange:i=>r(i.target.checked)})},nne=t=>wR[t%wR.length],wR=["#1f77b4","#aec7e8","#ff7f0e","#ffbb78","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5","#8c564b","#c49c94","#e377c2","#f7b6d2","#7f7f7f","#c7c7c7","#bcbd22","#dbdb8d","#17becf","#9edae5","#393b79","#5254a3","#6b6ecf","#9c9ede","#637939","#8ca252","#b5cf6b","#cedb9c","#8c6d31","#bd9e39","#e7ba52","#e7cb94","#843c39","#ad494a","#d6616b","#e7969c","#7b4173","#a55194","#ce6dbd","#de9ed6","#3182bd","#6baed6","#9ecae1","#c6dbef","#e6550d","#fd8d3c","#fdae6b","#fdd0a2","#31a354","#74c476"],ine=({children:t,style:e,...r})=>{const n=Qe(At("sm"));return R.jsx(Os,{style:{...n?{alignItems:"center",flexWrap:"wrap",rowGap:20}:null,...e},...r,children:t})},ane=()=>({height:48,...Qe(At("sm"))?{width:"auto"}:{minWidth:180}}),one="yyyy-MM-dd",sne=/^\d{4}-\d{2}-\d{2}$/,xy=t=>xs(t)?Ku(t,one):"",TR=t=>t&&sne.test(t)&&xs(cn(t))?t:"",iL=({from:t,to:e},r)=>{const n=t?t>r?"future":"":"from-required";let i="";return e?e>r?i="future":t&&e<t&&(i="to-before-from"):i="to-required",{from:n,to:i}},SR=(t,e)=>{const r=iL(t,e);return!r.from&&!r.to},une=(t,e)=>{const{t:r}=Qt("location",{keyPrefix:"dcim-chart.date-range.errors"}),[n,i]=sr(null),a=xy(new Date),o={from:xy(t.startDate),to:xy(t.endDate)},s=n??o,l=n?iL(n,a):{from:"",to:""},c=m=>{i(null),!(m.from===o.from&&m.to===o.to)&&e({startDate:lo(cn(m.from)),endDate:Sd(cn(m.to))})},d=m=>{const v=TR(m);v!==s.from&&i({from:v,to:v&&s.to&&v>s.to?"":s.to})},h=m=>{const v=TR(m);if(v===s.to)return;const _={from:s.from,to:v};SR(_,a)?c(_):i(_)},g=()=>{n&&(SR(n,a)?c(n):i(null))};return{endDateErrorText:l.to?r(l.to):"",endDateValue:s.to,isStaged:n!==null,maxEndDate:a,maxStartDate:a,minEndDate:s.from,onEndDateChanged:h,onLeave:g,onStartDateChanged:d,startDateErrorText:l.from?r(l.from):"",startDateValue:s.from}},CR="vaadin-date-picker-overlay",lne=(t,e,r)=>{const n=Kt(r);n.current=r,ht(()=>{if(!t)return;const i=e.map(l=>l.current).filter(l=>!!l),a=l=>l instanceof Element&&(l.localName===CR||!!l.closest(CR)||i.some(c=>c===l||c.contains(l))),o=l=>{l.composedPath().some(a)||n.current()},s=l=>{l.relatedTarget&&!a(l.relatedTarget)&&n.current()};return document.addEventListener("pointerdown",o,!0),i.forEach(l=>l.addEventListener("focusout",s)),()=>{document.removeEventListener("pointerdown",o,!0),i.forEach(l=>l.removeEventListener("focusout",s))}},[t,e])},cne=({dateInterval:t,setDateInterval:e})=>{const{t:r}=Qt("location"),{dateTimeFormatPreferences:n}=Ed(),{isMobile:i}=ws(),a=ane(),o=Kt(null),s=Kt(null),l=yr(()=>[o,s],[]),{endDateErrorText:c,endDateValue:d,isStaged:h,maxEndDate:g,maxStartDate:m,minEndDate:v,onEndDateChanged:_,onLeave:y,onStartDateChanged:x,startDateErrorText:w,startDateValue:C}=une(t,e);return lne(h,l,y),R.jsxs(ine,{children:[R.jsx(Sw,{ref:o,style:a,errorText:w,format:n.preferredDateFormat,label:r("dcim-chart.date-range.from"),max:m,onChanged:x,showCalendarOnMouseDown:!0,timezone:"UTC",value:C}),i&&R.jsx(ft,{variant:"caption",children:r("dcim-chart.utc")}),R.jsx(Sw,{ref:s,style:a,errorText:c,format:n.preferredDateFormat,label:r("dcim-chart.date-range.to"),max:g,min:v,onChanged:_,showCalendarOnMouseDown:!0,timezone:"UTC",value:d}),R.jsx(ft,{variant:"caption",children:r("dcim-chart.utc")})]})},fne=async t=>{let e=[];try{const r=await SD({...t,leasedSpaceName:t.leasedSpaceName}),n=await wD(t);e=(r==null?void 0:r.content)||[],e=e.concat(n==null?void 0:n.content)}catch{return e}return e},dne=(t,e)=>{const r=`${fn.DCIM_ALERTS}-${fn.DCIM_HISTORICAL_ALERTS}`;return Ui([r,t],()=>fne(t),{refetchOnWindowFocus:!1,...e})},hne=(t,e,r)=>{const n=[];return t&&e&&n.push(NB(new Date(t),new Date(e))),r&&n.push(r),n.join(" ")},pne=t=>{const{t:e}=Qt(["location","notifications"]),{isMobile:r}=ws(),{assetName:n,endDate:i,functionName:a,interval:o,leasedSpaceName:s,sitecode:l,startDate:c,subCategory:d=""}=t,[h,g]=sr({startDate:lo(Date.parse(c)),endDate:Sd(Date.parse(i))}),[m,v]=sr(wr.Trend),_=OU(),[y,x]=sr(!0),[w,C]=sr(a),[A,E]=sr([]),[S,T]=sr(o||Jn.Hour),[D,P]=sr([]);ht(()=>{S===Jn.Day&&v(wr.Daily)},[S,T]);const[N,F]=sr(null),[B,W]=sr(null),te=xD(s,{enabled:!!l&&!!n}),J=_D({endDate:h.endDate.toISOString(),functionName:a,interval:S,leasedSpaceName:s,startDate:h.startDate.toISOString(),subCategory:d},{enabled:te.isSuccess}),ie=dne({endDate:h.endDate.toISOString(),leasedSpaceName:s,startDate:h.startDate.toISOString()}),le=y6(l,n,h.startDate.toISOString(),h.endDate.toISOString());ht(()=>{var fe;const X=((fe=J.data)==null?void 0:fe.portalTrendData)||[],Z=X.map((be,_e)=>({color:nne(_e),id:be.deviceDataId,name:be.deviceName,selected:_e===0}));E(Z),P(X)},[J.data]);const se=bt(X=>{v(X),X===wr.Trend&&T(Jn.Hour)},[]),ce=hne(c,i,a),Q=J.isLoading||te.isLoading||ie.isLoading,$=A.filter(X=>X.selected).length;return R.jsxs(X0,{children:[R.jsx(Z0,{assetName:n,sitecode:l}),R.jsxs(Y0,{spacing:{xs:2.5,md:0},children:[R.jsx(zr,{xs:12,sm:3,md:2,lg:2,children:R.jsx(gre,{devices:A,isLoading:Q,setDevices:E,title:d})}),R.jsx(zr,{xs:12,sm:9,md:10,lg:10,children:R.jsx("div",{children:R.jsxs(R.Fragment,{children:[R.jsxs(tre,{children:[R.jsx(cne,{dateInterval:h,setDateInterval:g}),m===wr.Trend&&R.jsx(xre,{endDate:h.endDate,interval:S,numberOfDevices:A.length,setInterval:T,startDate:h.startDate}),R.jsxs(rre,{children:[R.jsx(Cre,{idPrefix:_,onChange:se,viewType:m}),R.jsx(qre,{assetName:n,chartType:m,dailyRef:B,data:D,devices:A,disabled:J.isLoading||$===0,sitecode:l||"",trendRef:N})]})]}),Q?R.jsx(tne,{}):R.jsxs(nre,{elevation:r?0:1,children:[R.jsxs(ire,{children:[R.jsx(Jre,{isMobile:r,metric:w,options:[a],setMetric:C,title:e("dcim-chart.y-axis-metric")}),R.jsxs(are,{children:[R.jsxs(Os,{children:[R.jsx(ere,{}),R.jsx(ft,{variant:"caption",children:ce})]}),R.jsx(sre,{type:"button",children:e("notifications:type.planned_site_maintenance")}),R.jsx(ft,{variant:"caption",children:e("dcim-chart.timezone.utc")})]}),R.jsx(rne,{label:e("dcim-chart.show-alert-data"),setShowAlerts:x,showAlerts:y})]}),R.jsx("div",{role:"tabpanel",id:d0(_,wr.Trend),"aria-labelledby":f0(_,wr.Trend),hidden:m!==wr.Trend,children:m===wr.Trend&&R.jsx(Yre,{alerts:y?ie.data:[],data:D,deviceList:A,plannedMaintenance:le.data,setChartRef:F,title:`${d} | UTC`,unitInfo:ce,yAxisLabel:a})}),R.jsx("div",{role:"tabpanel",id:d0(_,wr.Daily),"aria-labelledby":f0(_,wr.Daily),hidden:m!==wr.Daily,children:m===wr.Daily&&R.jsx(Vre,{alerts:y?ie.data:[],data:D,deviceList:A,plannedMaintenance:le.data,setChartRef:W,title:`${d} | UTC`,yAxisLabel:a})})]})]})})})]})]})},gne=()=>{const t=window.location.search.slice(1),e=Id.parse(t),{assetName:r,endDate:n,functionName:i,interval:a,sitecode:o,startDate:s,subCategory:l}=e,c=`${o}-${r}`;return ht(()=>{window.dispatchEvent(new CustomEvent(Gd,{detail:{location:{route:{hideAccountSwitcher:!0}}}}))},[]),R.jsx(B0,{children:R.jsx(pne,{assetName:r,endDate:n,functionName:i,interval:a,leasedSpaceName:c,sitecode:o,startDate:s,subCategory:l})})},mne=()=>{const t=window.location.search.slice(1),e=Id.parse(t),{assetName:r,sitecode:n}=e,i=`${n}-${r}`;return ht(()=>{window.dispatchEvent(new CustomEvent(Gd,{detail:{location:{route:{hideAccountSwitcher:!0}}}}))},[]),R.jsx(B0,{children:R.jsx(Kte,{assetName:r,date:new Date,leasedSpaceName:i,sitecode:n})})},vne=({children:t,style:e,...r})=>{const n=Qe(At("md"));return R.jsx("div",{style:{display:"flex",flexDirection:"column",gap:n?26:42,...e},...r,children:t})},ER=({children:t,style:e,...r})=>{const n=Qe(At("lg")),i=Qe(ha("lg"));return R.jsx("p",{style:{margin:0,fontFamily:`var(--root-primary-font, ${wu})`,fontSize:12,lineHeight:"16px",maxWidth:n?"100%":240,...i?{paddingTop:47}:null,...e},...r,children:t})},yne=({assetName:t,leasedSpaceName:e,sitecode:r,type:n})=>{const{t:i}=Qt("location"),a=Qe(At("sm")),o=Qe(At("lg")),[s,l]=sr({category:cs,type:n||sn.CUSTOM}),c=(d,h)=>{l(g=>({...g,[d]:h}))};return R.jsx("div",{children:R.jsxs(dD,{children:[R.jsxs(Q5,{children:[R.jsx(J5,{children:t}),R.jsx(ft,{variant:"subtitle1",children:r})]}),R.jsxs(Gf,{spacing:{xs:2.5,md:3},children:[R.jsx(zr,{xs:12,sm:4,md:4,lg:3,xl:2,children:R.jsxs(vne,{children:[R.jsx(rb,{leasedSpaceName:e,filters:s,handleFilters:c,disableOptionHistory:!0,disableOptionAll:!0,isDefinitionsView:!0}),R.jsx(jD,{leasedSpaceName:e,filters:s,handleFilters:c,isDefinitionsView:!0}),o&&!a&&R.jsx(ER,{children:i("alerts.definitions.warning-message")})]})}),R.jsx(zr,{xs:12,sm:8,md:8,lg:7,xl:7,children:R.jsx(nP,{leasedSpaceName:e,alertType:s.type,alertCategory:s.category,title:i("alerts.definitions.title"),isDefinitionsView:!0})}),!o&&R.jsx(zr,{xs:12,lg:2,xl:3,children:R.jsx(ER,{children:i("alerts.definitions.warning-message")})})]})]})})},bne=()=>{const t=window.location.search.slice(1),e=Id.parse(t),{assetName:r,sitecode:n,type:i}=e,a=`${n}-${r}`;return ht(()=>{window.dispatchEvent(new CustomEvent(Gd,{detail:{location:{route:{hideAccountSwitcher:!0}}}}))},[]),R.jsx(B0,{children:R.jsx(yne,{assetName:r,date:new Date,leasedSpaceName:a,sitecode:n,type:i})})},_ae=[{path:"/details",element:R.jsx(mne,{})},{path:"/chart",element:R.jsx(gne,{})},{path:"/alert",element:R.jsx(bZ,{})},{path:"/alerts-definitions",element:R.jsx(bne,{})},{path:"/*",element:R.jsx(AH,{to:"/details",replace:!0})}];class Gb extends is{draw(){const{data:e}=this.getMeta(),r=Object.values(mr.groupBy(e,"x")),{radius:n,borderColor:i}=e[0].options,a=this.chart.ctx;a.strokeStyle=i,a.lineWidth=1,a.beginPath(),r.forEach(o=>{const[s,l]=o.slice(-2);a.moveTo(s.x,s.y-n),a.lineTo(l.x,l.y+n),a.stroke()}),super.draw()}}Gb.id="ohlc";Gb.defaults=is.defaults;/*!
|
|
111
|
+
* chartjs-plugin-annotation v2.2.1
|
|
112
|
+
* https://www.chartjs.org/chartjs-plugin-annotation/index
|
|
113
|
+
* (c) 2023 chartjs-plugin-annotation Contributors
|
|
114
|
+
* Released under the MIT License
|
|
115
|
+
*/const OR={modes:{point(t,e){return wf(t,e,{intersect:!0})},nearest(t,e,r){return wne(t,e,r)},x(t,e,r){return wf(t,e,{intersect:r.intersect,axis:"x"})},y(t,e,r){return wf(t,e,{intersect:r.intersect,axis:"y"})}}};function Kb(t,e,r){return(OR.modes[r.mode]||OR.modes.nearest)(t,e,r)}function _ne(t,e,r){return r!=="x"&&r!=="y"?t.inRange(e.x,e.y,"x",!0)||t.inRange(e.x,e.y,"y",!0):t.inRange(e.x,e.y,r,!0)}function xne(t,e,r){return r==="x"?{x:t.x,y:e.y}:r==="y"?{x:e.x,y:t.y}:e}function wf(t,e,r){return t.visibleElements.filter(n=>r.intersect?n.inRange(e.x,e.y):_ne(n,e,r.axis))}function wne(t,e,r){let n=Number.POSITIVE_INFINITY;return wf(t,e,r).reduce((i,a)=>{const o=a.getCenterPoint(),s=xne(e,o,r.axis),l=ps(e,s);return l<n?(i=[a],n=l):l===n&&i.push(a),i},[]).sort((i,a)=>i._index-a._index).slice(0,1)}const Tne=(t,e)=>e>t||t.length>e.length&&t.slice(0,e.length)===e,no=.001,Zd=(t,e,r)=>Math.min(r,Math.max(e,t));function Sne(t,e,r){for(const n of Object.keys(t))t[n]=Zd(t[n],e,r);return t}function Cne(t,e,r,n){if(!t||!e||r<=0)return!1;const i=n/2;return Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2)<=Math.pow(r+i,2)}function aL(t,{x:e,y:r,x2:n,y2:i},a,o){const s=o/2,l=t.x>=e-s-no&&t.x<=n+s+no,c=t.y>=r-s-no&&t.y<=i+s+no;return a==="x"?l:(a==="y"||l)&&c}function As(t,e){const{centerX:r,centerY:n}=t.getProps(["centerX","centerY"],e);return{x:r,y:n}}function Ene(t,e,r,n=!0){const i=r.split(".");let a=0;for(const o of e.split(".")){const s=i[a++];if(parseInt(o,10)<parseInt(s,10))break;if(Tne(s,o)){if(n)throw new Error(`${t} v${r} is not supported. v${e} or newer is required.`);return!1}}return!0}const oL=t=>typeof t=="string"&&t.endsWith("%"),sL=t=>parseFloat(t)/100,uL=t=>Zd(sL(t),0,1);function Xb(t,e){return e==="start"?0:e==="end"?t:oL(e)?uL(e)*t:t/2}function xa(t,e,r=!0){return typeof e=="number"?e:oL(e)?(r?uL(e):sL(e))*t:t}function One(t,e){const{x:r,width:n}=t,i=e.textAlign;return i==="center"?r+n/2:i==="end"||i==="right"?r+n:r}function Yb(t,e="center"){return st(t)?{x:tt(t.x,e),y:tt(t.y,e)}:(t=tt(t,e),{x:t,y:t})}function lL(t){return t&&(Tn(t.xValue)||Tn(t.yValue))}function nl(t,e,r,n=!1){const i=r.init;if(i){if(i===!0)return fL(e,n)}else return;return Ane(e,n,$t(i,[{chart:t,properties:e,options:r}]))}function cL(t,e,r){let n=!1;return e.forEach(i=>{ln(t[i])?(n=!0,r[i]=t[i]):Tn(r[i])&&delete r[i]}),n}function fL({centerX:t,centerY:e},r){return r?{centerX:t,centerY:e,radius:0,width:0,height:0}:{x:t,y:e,x2:t,y2:e,width:0,height:0}}function Ane(t,e,r){if(r===!0)return fL(t,e);if(st(r))return r}const wy=new Map,Rne=t=>isNaN(t)||t<=0,Ine=t=>t.reduce(function(e,r){return e+=r.string,e},"");function Jd(t){if(t&&typeof t=="object"){const e=t.toString();return e==="[object HTMLImageElement]"||e==="[object HTMLCanvasElement]"}}function Zb(t,{x:e,y:r},n){n&&(t.translate(e,r),t.rotate(jr(n)),t.translate(-e,-r))}function wa(t,e){if(e&&e.borderWidth)return t.lineCap=e.borderCapStyle,t.setLineDash(e.borderDash),t.lineDashOffset=e.borderDashOffset,t.lineJoin=e.borderJoinStyle,t.lineWidth=e.borderWidth,t.strokeStyle=e.borderColor,!0}function Rs(t,e){t.shadowColor=e.backgroundShadowColor,t.shadowBlur=e.shadowBlur,t.shadowOffsetX=e.shadowOffsetX,t.shadowOffsetY=e.shadowOffsetY}function Jb(t,e){const r=e.content;if(Jd(r))return{width:xa(r.width,e.width),height:xa(r.height,e.height)};const n=e.font,i=Xt(n)?n.map(l=>Or(l)):[Or(n)],a=e.textStrokeWidth,o=Xt(r)?r:[r],s=o.join()+Ine(i)+a+(t._measureText?"-spriting":"");return wy.has(s)||wy.set(s,Nne(t,o,i,a)),wy.get(s)}function dL(t,e,r){const{x:n,y:i,width:a,height:o}=e;t.save(),Rs(t,r);const s=wa(t,r);t.fillStyle=r.backgroundColor,t.beginPath(),cd(t,{x:n,y:i,w:a,h:o,radius:Sne(rs(r.borderRadius),0,Math.min(a,o)/2)}),t.closePath(),t.fill(),s&&(t.shadowColor=r.borderShadowColor,t.stroke()),t.restore()}function Dne(t,e,r){const n=r.content;if(Jd(n)){t.save(),t.globalAlpha=jne(r.opacity,n.style.opacity),t.drawImage(n,e.x,e.y,e.width,e.height),t.restore();return}const i=Xt(n)?n:[n],a=r.font,o=Xt(a)?a.map(h=>Or(h)):[Or(a)],s=r.color,l=Xt(s)?s:[s],c=One(e,r),d=e.y+r.textStrokeWidth/2;t.save(),t.textBaseline="middle",t.textAlign=r.textAlign,Mne(t,r)&&Fne(t,{x:c,y:d},i,o),kne(t,{x:c,y:d},i,{fonts:o,colors:l}),t.restore()}function Mne(t,e){if(e.textStrokeWidth>0)return t.lineJoin="round",t.miterLimit=2,t.lineWidth=e.textStrokeWidth,t.strokeStyle=e.textStrokeColor,!0}function Pne(t,e,r,n){const{radius:i,options:a}=e,o=a.pointStyle,s=a.rotation;let l=(s||0)*Nb;if(Jd(o)){t.save(),t.translate(r,n),t.rotate(l),t.drawImage(o,-o.width/2,-o.height/2,o.width,o.height),t.restore();return}Rne(i)||Lne(t,{x:r,y:n,radius:i,rotation:s,style:o,rad:l})}function Lne(t,{x:e,y:r,radius:n,rotation:i,style:a,rad:o}){let s,l,c,d;switch(t.beginPath(),a){default:t.arc(e,r,n,0,qn),t.closePath();break;case"triangle":t.moveTo(e+Math.sin(o)*n,r-Math.cos(o)*n),o+=ud,t.lineTo(e+Math.sin(o)*n,r-Math.cos(o)*n),o+=ud,t.lineTo(e+Math.sin(o)*n,r-Math.cos(o)*n),t.closePath();break;case"rectRounded":d=n*.516,c=n-d,s=Math.cos(o+$n)*c,l=Math.sin(o+$n)*c,t.arc(e-s,r-l,d,o-qt,o-Gr),t.arc(e+l,r-s,d,o-Gr,o),t.arc(e+s,r+l,d,o,o+Gr),t.arc(e-l,r+s,d,o+Gr,o+qt),t.closePath();break;case"rect":if(!i){c=Math.SQRT1_2*n,t.rect(e-c,r-c,2*c,2*c);break}o+=$n;case"rectRot":s=Math.cos(o)*n,l=Math.sin(o)*n,t.moveTo(e-s,r-l),t.lineTo(e+l,r-s),t.lineTo(e+s,r+l),t.lineTo(e-l,r+s),t.closePath();break;case"crossRot":o+=$n;case"cross":s=Math.cos(o)*n,l=Math.sin(o)*n,t.moveTo(e-s,r-l),t.lineTo(e+s,r+l),t.moveTo(e+l,r-s),t.lineTo(e-l,r+s);break;case"star":s=Math.cos(o)*n,l=Math.sin(o)*n,t.moveTo(e-s,r-l),t.lineTo(e+s,r+l),t.moveTo(e+l,r-s),t.lineTo(e-l,r+s),o+=$n,s=Math.cos(o)*n,l=Math.sin(o)*n,t.moveTo(e-s,r-l),t.lineTo(e+s,r+l),t.moveTo(e+l,r-s),t.lineTo(e-l,r+s);break;case"line":s=Math.cos(o)*n,l=Math.sin(o)*n,t.moveTo(e-s,r-l),t.lineTo(e+s,r+l);break;case"dash":t.moveTo(e,r),t.lineTo(e+Math.cos(o)*n,r+Math.sin(o)*n);break}t.fill()}function Nne(t,e,r,n){t.save();const i=e.length;let a=0,o=n;for(let s=0;s<i;s++){const l=r[Math.min(s,r.length-1)];t.font=l.string;const c=e[s];a=Math.max(a,t.measureText(c).width+n),o+=l.lineHeight}return t.restore(),{width:a,height:o}}function Fne(t,{x:e,y:r},n,i){t.beginPath();let a=0;n.forEach(function(o,s){const l=i[Math.min(s,i.length-1)],c=l.lineHeight;t.font=l.string,t.strokeText(o,e,r+c/2+a),a+=c}),t.stroke()}function kne(t,{x:e,y:r},n,{fonts:i,colors:a}){let o=0;n.forEach(function(s,l){const c=a[Math.min(l,a.length-1)],d=i[Math.min(l,i.length-1)],h=d.lineHeight;t.beginPath(),t.font=d.string,t.fillStyle=c,t.fillText(s,e,r+h/2+o),o+=h,t.fill()})}function jne(t,e){const r=ho(t)?t:e;return ho(r)?Zd(r,0,1):1}const AR={xScaleID:{min:"xMin",max:"xMax",start:"left",end:"right",startProp:"x",endProp:"x2"},yScaleID:{min:"yMin",max:"yMax",start:"bottom",end:"top",startProp:"y",endProp:"y2"}};function vs(t,e,r){return e=typeof e=="number"?e:t.parse(e),Rr(e)?t.getPixelForValue(e):r}function go(t,e,r){const n=e[r];if(n||r==="scaleID")return n;const i=r.charAt(0),a=Object.values(t).filter(o=>o.axis&&o.axis===i);return a.length?a[0].id:i}function hL(t,e){if(t){const r=t.options.reverse,n=vs(t,e.min,r?e.end:e.start),i=vs(t,e.max,r?e.start:e.end);return{start:n,end:i}}}function pL(t,e){const{chartArea:r,scales:n}=t,i=n[go(n,e,"xScaleID")],a=n[go(n,e,"yScaleID")];let o=r.width/2,s=r.height/2;return i&&(o=vs(i,e.xValue,i.left+i.width/2)),a&&(s=vs(a,e.yValue,a.top+a.height/2)),{x:o,y:s}}function Qb(t,e){const r=t.scales,n=r[go(r,e,"xScaleID")],i=r[go(r,e,"yScaleID")];if(!n&&!i)return{};let{left:a,right:o}=n||t.chartArea,{top:s,bottom:l}=i||t.chartArea;const c=RR(n,{min:e.xMin,max:e.xMax,start:a,end:o});a=c.start,o=c.end;const d=RR(i,{min:e.yMin,max:e.yMax,start:l,end:s});return s=d.start,l=d.end,{x:a,y:s,x2:o,y2:l,width:o-a,height:l-s,centerX:a+(o-a)/2,centerY:s+(l-s)/2}}function gL(t,e){if(!lL(e)){const r=Qb(t,e);let n=e.radius;(!n||isNaN(n))&&(n=Math.min(r.width,r.height)/2,e.radius=n);const i=n*2,a=r.centerX+e.xAdjust,o=r.centerY+e.yAdjust;return{x:a-n,y:o-n,x2:a+n,y2:o+n,centerX:a,centerY:o,width:i,height:i,radius:n}}return Une(t,e)}function $ne(t,e){const{scales:r,chartArea:n}=t,i=r[e.scaleID],a={x:n.left,y:n.top,x2:n.right,y2:n.bottom};return i?qne(i,a,e):Hne(r,a,e),a}function mL(t,e,r){const n=Qb(t,e);return n.initProperties=nl(t,n,e,r),n.elements=[{type:"label",optionScope:"label",properties:zne(t,n,e),initProperties:n.initProperties}],n}function Une(t,e){const r=pL(t,e),n=e.radius*2;return{x:r.x-e.radius+e.xAdjust,y:r.y-e.radius+e.yAdjust,x2:r.x+e.radius+e.xAdjust,y2:r.y+e.radius+e.yAdjust,centerX:r.x+e.xAdjust,centerY:r.y+e.yAdjust,radius:e.radius,width:n,height:n}}function RR(t,e){const r=hL(t,e)||e;return{start:Math.min(r.start,r.end),end:Math.max(r.start,r.end)}}function qne(t,e,r){const n=vs(t,r.value,NaN),i=vs(t,r.endValue,n);t.isHorizontal()?(e.x=n,e.x2=i):(e.y=n,e.y2=i)}function Hne(t,e,r){for(const n of Object.keys(AR)){const i=t[go(t,r,n)];if(i){const{min:a,max:o,start:s,end:l,startProp:c,endProp:d}=AR[n],h=hL(i,{min:r[a],max:r[o],start:i[s],end:i[l]});e[c]=h.start,e[d]=h.end}}}function Wne({properties:t,options:e},r,n,i){const{x:a,x2:o,width:s}=t;return vL({start:a,end:o,borderWidth:e.borderWidth},{position:n.x,padding:{start:i.left,end:i.right},adjust:e.label.xAdjust,size:r.width})}function Bne({properties:t,options:e},r,n,i){const{y:a,y2:o,height:s}=t;return vL({start:a,end:o,borderWidth:e.borderWidth},{position:n.y,padding:{start:i.top,end:i.bottom},adjust:e.label.yAdjust,size:r.height})}function vL(t,e){const{start:r,end:n,borderWidth:i}=t,{position:a,padding:{start:o,end:s},adjust:l}=e,c=n-i-r-o-s-e.size;return r+i/2+l+Xb(c,a)}function zne(t,e,r){const n=r.label;n.backgroundColor="transparent",n.callout.display=!1;const i=Yb(n.position),a=Kr(n.padding),o=Jb(t.ctx,n),s=Wne({properties:e,options:r},o,i,a),l=Bne({properties:e,options:r},o,i,a),c=o.width+a.width,d=o.height+a.height;return{x:s,y:l,x2:s+c,y2:l+d,width:c,height:d,centerX:s+c/2,centerY:l+d/2,rotation:n.rotation}}function So(t,e,r){const n=Math.cos(r),i=Math.sin(r),a=e.x,o=e.y;return{x:a+n*(t.x-a)-i*(t.y-o),y:o+i*(t.x-a)+n*(t.y-o)}}const p0=["enter","leave"],e_=p0.concat("click");function Vne(t,e,r){e.listened=cL(r,e_,e.listeners),e.moveListened=!1,e._getElements=Kb,p0.forEach(n=>{ln(r[n])&&(e.moveListened=!0)}),(!e.listened||!e.moveListened)&&e.annotations.forEach(n=>{!e.listened&&ln(n.click)&&(e.listened=!0),e.moveListened||p0.forEach(i=>{ln(n[i])&&(e.listened=!0,e.moveListened=!0)})})}function Gne(t,e,r){if(t.listened)switch(e.type){case"mousemove":case"mouseout":return Kne(t,e,r);case"click":return Xne(t,e,r)}}function Kne(t,e,r){if(!t.moveListened)return;let n;e.type==="mousemove"?n=Kb(t,e,r.interaction):n=[];const i=t.hovered;t.hovered=n;const a={state:t,event:e};let o=IR(a,"leave",i,n);return IR(a,"enter",n,i)||o}function IR({state:t,event:e},r,n,i){let a;for(const o of n)i.indexOf(o)<0&&(a=yL(o.options[r]||t.listeners[r],o,e)||a);return a}function Xne(t,e,r){const n=t.listeners,i=Kb(t,e,r.interaction);let a;for(const o of i)a=yL(o.options.click||n.click,o,e)||a;return a}function yL(t,e,r){return $t(t,[e.$context,r])===!0}const hd=["afterDraw","beforeDraw"];function Yne(t,e,r){const n=e.visibleElements;e.hooked=cL(r,hd,e.hooks),e.hooked||n.forEach(i=>{e.hooked||hd.forEach(a=>{ln(i.options[a])&&(e.hooked=!0)})})}function DR(t,e,r){if(t.hooked){const n=e.options[r]||t.hooks[r];return $t(n,[e.$context])}}function Zne(t,e,r){const n=rie(t.scales,e,r);let i=MR(e,n,"min","suggestedMin");i=MR(e,n,"max","suggestedMax")||i,i&&ln(e.handleTickRangeOptions)&&e.handleTickRangeOptions()}function Jne(t,e){for(const r of t)eie(r,e)}function MR(t,e,r,n){if(Rr(e[r])&&!Qne(t.options,r,n)){const i=t[r]!==e[r];return t[r]=e[r],i}}function Qne(t,e,r){return Tn(t[e])||Tn(t[r])}function eie(t,e){for(const r of["scaleID","xScaleID","yScaleID"]){const n=go(e,t,r);n&&!e[n]&&tie(t,r)&&console.warn(`No scale found with id '${n}' for annotation '${t.id}'`)}}function tie(t,e){if(e==="scaleID")return!0;const r=e.charAt(0);for(const n of["Min","Max","Value"])if(Tn(t[r+n]))return!0;return!1}function rie(t,e,r){const n=e.axis,i=e.id,a=n+"ScaleID",o={min:tt(e.min,Number.NEGATIVE_INFINITY),max:tt(e.max,Number.POSITIVE_INFINITY)};for(const s of r)s.scaleID===i?PR(s,e,["value","endValue"],o):go(t,s,a)===i&&PR(s,e,[n+"Min",n+"Max",n+"Value"],o);return o}function PR(t,e,r,n){for(const i of r){const a=t[i];if(Tn(a)){const o=e.parse(a);n.min=Math.min(n.min,o),n.max=Math.max(n.max,o)}}}class Is extends Hn{inRange(e,r,n,i){const{x:a,y:o}=So({x:e,y:r},this.getCenterPoint(i),jr(-this.options.rotation));return aL({x:a,y:o},this.getProps(["x","y","x2","y2"],i),n,this.options.borderWidth)}getCenterPoint(e){return As(this,e)}draw(e){e.save(),Zb(e,this.getCenterPoint(),this.options.rotation),dL(e,this,this.options),e.restore()}get label(){return this.elements&&this.elements[0]}resolveElementProperties(e,r){return mL(e,r)}}Is.id="boxAnnotation";Is.defaults={adjustScaleRange:!0,backgroundShadowColor:"transparent",borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderRadius:0,borderShadowColor:"transparent",borderWidth:1,display:!0,init:void 0,label:{backgroundColor:"transparent",borderWidth:0,callout:{display:!1},color:"black",content:null,display:!1,drawTime:void 0,font:{family:void 0,lineHeight:void 0,size:void 0,style:void 0,weight:"bold"},height:void 0,opacity:void 0,padding:6,position:"center",rotation:void 0,textAlign:"start",textStrokeColor:void 0,textStrokeWidth:0,width:void 0,xAdjust:0,yAdjust:0,z:void 0},rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,xMax:void 0,xMin:void 0,xScaleID:void 0,yMax:void 0,yMin:void 0,yScaleID:void 0,z:0};Is.defaultRoutes={borderColor:"color",backgroundColor:"color"};Is.descriptors={label:{_fallback:!0}};const bL=["left","bottom","top","right"];class il extends Hn{inRange(e,r,n,i){const{x:a,y:o}=So({x:e,y:r},this.getCenterPoint(i),jr(-this.rotation));return aL({x:a,y:o},this.getProps(["x","y","x2","y2"],i),n,this.options.borderWidth)}getCenterPoint(e){return As(this,e)}draw(e){const r=this.options,n=!Tn(this._visible)||this._visible;!r.display||!r.content||!n||(e.save(),Zb(e,this.getCenterPoint(),this.rotation),iie(e,this),dL(e,this,r),Dne(e,fie(this),r),e.restore())}resolveElementProperties(e,r){let n;if(lL(r))n=pL(e,r);else{const{centerX:s,centerY:l}=Qb(e,r);n={x:s,y:l}}const i=Kr(r.padding),a=Jb(e.ctx,r),o=nie(n,a,r,i);return{initProperties:nl(e,o,r),pointX:n.x,pointY:n.y,...o,rotation:r.rotation}}}il.id="labelAnnotation";il.defaults={adjustScaleRange:!0,backgroundColor:"transparent",backgroundShadowColor:"transparent",borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderRadius:0,borderShadowColor:"transparent",borderWidth:0,callout:{borderCapStyle:"butt",borderColor:void 0,borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:1,display:!1,margin:5,position:"auto",side:5,start:"50%"},color:"black",content:null,display:!0,font:{family:void 0,lineHeight:void 0,size:void 0,style:void 0,weight:void 0},height:void 0,init:void 0,opacity:void 0,padding:6,position:"center",rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,textAlign:"center",textStrokeColor:void 0,textStrokeWidth:0,width:void 0,xAdjust:0,xMax:void 0,xMin:void 0,xScaleID:void 0,xValue:void 0,yAdjust:0,yMax:void 0,yMin:void 0,yScaleID:void 0,yValue:void 0,z:0};il.defaultRoutes={borderColor:"color"};function nie(t,e,r,n){const i=e.width+n.width+r.borderWidth,a=e.height+n.height+r.borderWidth,o=Yb(r.position,"center"),s=LR(t.x,i,r.xAdjust,o.x),l=LR(t.y,a,r.yAdjust,o.y);return{x:s,y:l,x2:s+i,y2:l+a,width:i,height:a,centerX:s+i/2,centerY:l+a/2}}function LR(t,e,r=0,n){return t-Xb(e,n)+r}function iie(t,e){const{pointX:r,pointY:n,options:i}=e,a=i.callout,o=a&&a.display&&lie(e,a);if(!o||die(e,a,o))return;if(t.save(),t.beginPath(),!wa(t,a))return t.restore();const{separatorStart:l,separatorEnd:c}=aie(e,o),{sideStart:d,sideEnd:h}=sie(e,o,l);(a.margin>0||i.borderWidth===0)&&(t.moveTo(l.x,l.y),t.lineTo(c.x,c.y)),t.moveTo(d.x,d.y),t.lineTo(h.x,h.y);const g=So({x:r,y:n},e.getCenterPoint(),jr(-e.rotation));t.lineTo(g.x,g.y),t.stroke(),t.restore()}function aie(t,e){const{x:r,y:n,x2:i,y2:a}=t,o=oie(t,e);let s,l;return e==="left"||e==="right"?(s={x:r+o,y:n},l={x:s.x,y:a}):(s={x:r,y:n+o},l={x:i,y:s.y}),{separatorStart:s,separatorEnd:l}}function oie(t,e){const{width:r,height:n,options:i}=t,a=i.callout.margin+i.borderWidth/2;return e==="right"?r+a:e==="bottom"?n+a:-a}function sie(t,e,r){const{y:n,width:i,height:a,options:o}=t,s=o.callout.start,l=uie(e,o.callout);let c,d;return e==="left"||e==="right"?(c={x:r.x,y:n+xa(a,s)},d={x:c.x+l,y:c.y}):(c={x:r.x+xa(i,s),y:r.y},d={x:c.x,y:c.y+l}),{sideStart:c,sideEnd:d}}function uie(t,e){const r=e.side;return t==="left"||t==="top"?-r:r}function lie(t,e){const r=e.position;return bL.includes(r)?r:cie(t,e)}function cie(t,e){const{x:r,y:n,x2:i,y2:a,width:o,height:s,pointX:l,pointY:c,centerX:d,centerY:h,rotation:g}=t,m={x:d,y:h},v=e.start,_=xa(o,v),y=xa(s,v),x=[r,r+_,r+_,i],w=[n+y,a,n,a],C=[];for(let A=0;A<4;A++){const E=So({x:x[A],y:w[A]},m,jr(g));C.push({position:bL[A],distance:ps(E,{x:l,y:c})})}return C.sort((A,E)=>A.distance-E.distance)[0].position}function fie({x:t,y:e,width:r,height:n,options:i}){const a=i.borderWidth/2,o=Kr(i.padding);return{x:t+o.left+a,y:e+o.top+a,width:r-o.left-o.right-i.borderWidth,height:n-o.top-o.bottom-i.borderWidth}}function die(t,e,r){const{pointX:n,pointY:i}=t,a=e.margin;let o=n,s=i;return r==="left"?o+=a:r==="right"?o-=a:r==="top"?s+=a:r==="bottom"&&(s-=a),t.inRange(o,s)}const t_=(t,e,r)=>({x:t.x+r*(e.x-t.x),y:t.y+r*(e.y-t.y)}),g0=(t,e,r)=>t_(e,r,Math.abs((t-e.y)/(r.y-e.y))).x,NR=(t,e,r)=>t_(e,r,Math.abs((t-e.x)/(r.x-e.x))).y,_u=t=>t*t,hie=(t,e,{x:r,y:n,x2:i,y2:a},o)=>o==="y"?{start:Math.min(n,a),end:Math.max(n,a),value:e}:{start:Math.min(r,i),end:Math.max(r,i),value:t},FR=(t,e,r,n)=>(1-n)*(1-n)*t+2*(1-n)*n*e+n*n*r,m0=(t,e,r,n)=>({x:FR(t.x,e.x,r.x,n),y:FR(t.y,e.y,r.y,n)}),kR=(t,e,r,n)=>2*(1-n)*(e-t)+2*n*(r-e),jR=(t,e,r,n)=>-Math.atan2(kR(t.x,e.x,r.x,n),kR(t.y,e.y,r.y,n))+.5*qt;class al extends Hn{inRange(e,r,n,i){const a=this.options.borderWidth/2;if(n!=="x"&&n!=="y"){const o={mouseX:e,mouseY:r},{path:s,ctx:l}=this;if(s){wa(l,this.options);const{chart:d}=this.$context,h=e*d.currentDevicePixelRatio,g=r*d.currentDevicePixelRatio,m=l.isPointInStroke(s,h,g)||v0(this,o,i);return l.restore(),m}const c=_u(a);return vie(this,o,c,i)||v0(this,o,i)}return pie(this,{mouseX:e,mouseY:r},n,{hBorderWidth:a,useFinalPosition:i})}getCenterPoint(e){return As(this,e)}draw(e){const{x:r,y:n,x2:i,y2:a,cp:o,options:s}=this;if(e.save(),!wa(e,s))return e.restore();Rs(e,s);const l=Math.sqrt(Math.pow(i-r,2)+Math.pow(a-n,2));if(s.curve&&o)return Cie(e,this,o,l),e.restore();const{startOpts:c,endOpts:d,startAdjust:h,endAdjust:g}=_L(this),m=Math.atan2(a-n,i-r);e.translate(r,n),e.rotate(m),e.beginPath(),e.moveTo(0+h,0),e.lineTo(l-g,0),e.shadowColor=s.borderShadowColor,e.stroke(),y0(e,0,h,c),y0(e,l,-g,d),e.restore()}get label(){return this.elements&&this.elements[0]}resolveElementProperties(e,r){const n=$ne(e,r),{x:i,y:a,x2:o,y2:s}=n,l=gie(n,e.chartArea),c=l?mie({x:i,y:a},{x:o,y:s},e.chartArea):{x:i,y:a,x2:o,y2:s,width:Math.abs(o-i),height:Math.abs(s-a)};if(c.centerX=(o+i)/2,c.centerY=(s+a)/2,c.initProperties=nl(e,c,r),r.curve){const h={x:c.x,y:c.y},g={x:c.x2,y:c.y2};c.cp=Sie(c,r,ps(h,g))}const d=yie(e,c,r.label);return d._visible=l,c.elements=[{type:"label",optionScope:"label",properties:d,initProperties:c.initProperties}],c}}al.id="lineAnnotation";const $R={backgroundColor:void 0,backgroundShadowColor:void 0,borderColor:void 0,borderDash:void 0,borderDashOffset:void 0,borderShadowColor:void 0,borderWidth:void 0,display:void 0,fill:void 0,length:void 0,shadowBlur:void 0,shadowOffsetX:void 0,shadowOffsetY:void 0,width:void 0};al.defaults={adjustScaleRange:!0,arrowHeads:{display:!1,end:Object.assign({},$R),fill:!1,length:12,start:Object.assign({},$R),width:6},borderDash:[],borderDashOffset:0,borderShadowColor:"transparent",borderWidth:2,curve:!1,controlPoint:{y:"-50%"},display:!0,endValue:void 0,init:void 0,label:{backgroundColor:"rgba(0,0,0,0.8)",backgroundShadowColor:"transparent",borderCapStyle:"butt",borderColor:"black",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderRadius:6,borderShadowColor:"transparent",borderWidth:0,callout:Object.assign({},il.defaults.callout),color:"#fff",content:null,display:!1,drawTime:void 0,font:{family:void 0,lineHeight:void 0,size:void 0,style:void 0,weight:"bold"},height:void 0,opacity:void 0,padding:6,position:"center",rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,textAlign:"center",textStrokeColor:void 0,textStrokeWidth:0,width:void 0,xAdjust:0,yAdjust:0,z:void 0},scaleID:void 0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,value:void 0,xMax:void 0,xMin:void 0,xScaleID:void 0,yMax:void 0,yMin:void 0,yScaleID:void 0,z:0};al.descriptors={arrowHeads:{start:{_fallback:!0},end:{_fallback:!0},_fallback:!0}};al.defaultRoutes={borderColor:"color"};function pie(t,{mouseX:e,mouseY:r},n,{hBorderWidth:i,useFinalPosition:a}){const o=hie(e,r,t.getProps(["x","y","x2","y2"],a),n);return o.value>=o.start-i&&o.value<=o.end+i||v0(t,{mouseX:e,mouseY:r},a,n)}function gie({x:t,y:e,x2:r,y2:n},{top:i,right:a,bottom:o,left:s}){return!(t<s&&r<s||t>a&&r>a||e<i&&n<i||e>o&&n>o)}function UR({x:t,y:e},r,{top:n,right:i,bottom:a,left:o}){return t<o&&(e=NR(o,{x:t,y:e},r),t=o),t>i&&(e=NR(i,{x:t,y:e},r),t=i),e<n&&(t=g0(n,{x:t,y:e},r),e=n),e>a&&(t=g0(a,{x:t,y:e},r),e=a),{x:t,y:e}}function mie(t,e,r){const{x:n,y:i}=UR(t,e,r),{x:a,y:o}=UR(e,t,r);return{x:n,y:i,x2:a,y2:o,width:Math.abs(a-n),height:Math.abs(o-i)}}function vie(t,{mouseX:e,mouseY:r},n=no,i){const{x:a,y:o,x2:s,y2:l}=t.getProps(["x","y","x2","y2"],i),c=s-a,d=l-o,h=_u(c)+_u(d),g=h===0?-1:((e-a)*c+(r-o)*d)/h;let m,v;return g<0?(m=a,v=o):g>1?(m=s,v=l):(m=a+g*c,v=o+g*d),_u(e-m)+_u(r-v)<=n}function v0(t,{mouseX:e,mouseY:r},n,i){const a=t.label;return a.options.display&&a.inRange(e,r,i,n)}function yie(t,e,r){const n=r.borderWidth,i=Kr(r.padding),a=Jb(t.ctx,r),o=a.width+i.width+n,s=a.height+i.height+n;return _ie(e,r,{width:o,height:s,padding:i},t.chartArea)}function bie(t){const{x:e,y:r,x2:n,y2:i}=t,a=Math.atan2(i-r,n-e);return a>qt/2?a-qt:a<qt/-2?a+qt:a}function _ie(t,e,r,n){const{width:i,height:a,padding:o}=r,{xAdjust:s,yAdjust:l}=e,c={x:t.x,y:t.y},d={x:t.x2,y:t.y2},h=e.rotation==="auto"?bie(t):jr(e.rotation),g=xie(i,a,h),m=wie(t,e,{labelSize:g,padding:o},n),v=t.cp?m0(c,t.cp,d,m):t_(c,d,m),_={size:g.w,min:n.left,max:n.right,padding:o.left},y={size:g.h,min:n.top,max:n.bottom,padding:o.top},x=HR(v.x,_)+s,w=HR(v.y,y)+l;return{x:x-i/2,y:w-a/2,x2:x+i/2,y2:w+a/2,centerX:x,centerY:w,pointX:v.x,pointY:v.y,width:i,height:a,rotation:lP(h)}}function xie(t,e,r){const n=Math.cos(r),i=Math.sin(r);return{w:Math.abs(t*n)+Math.abs(e*i),h:Math.abs(t*i)+Math.abs(e*n)}}function wie(t,e,r,n){let i;const a=Tie(t,n);return e.position==="start"?i=qR({w:t.x2-t.x,h:t.y2-t.y},r,e,a):e.position==="end"?i=1-qR({w:t.x-t.x2,h:t.y-t.y2},r,e,a):i=Xb(1,e.position),i}function qR(t,e,r,n){const{labelSize:i,padding:a}=e,o=t.w*n.dx,s=t.h*n.dy,l=o>0&&(i.w/2+a.left-n.x)/o,c=s>0&&(i.h/2+a.top-n.y)/s;return Zd(Math.max(l,c),0,.25)}function Tie(t,e){const{x:r,x2:n,y:i,y2:a}=t,o=Math.min(i,a)-e.top,s=Math.min(r,n)-e.left,l=e.bottom-Math.max(i,a),c=e.right-Math.max(r,n);return{x:Math.min(s,c),y:Math.min(o,l),dx:s<=c?1:-1,dy:o<=l?1:-1}}function HR(t,e){const{size:r,min:n,max:i,padding:a}=e,o=r/2;return r>i-n?(i+n)/2:(n>=t-a-o&&(t=n+a+o),i<=t+a+o&&(t=i-a-o),t)}function _L(t){const e=t.options,r=e.arrowHeads&&e.arrowHeads.start,n=e.arrowHeads&&e.arrowHeads.end;return{startOpts:r,endOpts:n,startAdjust:WR(t,r),endAdjust:WR(t,n)}}function WR(t,e){if(!e||!e.display)return 0;const{length:r,width:n}=e,i=t.options.borderWidth/2,a={x:r,y:n+i};return Math.abs(g0(0,a,{x:0,y:i}))}function y0(t,e,r,n){if(!n||!n.display)return;const{length:i,width:a,fill:o,backgroundColor:s,borderColor:l}=n,c=Math.abs(e-i)+r;t.beginPath(),Rs(t,n),wa(t,n),t.moveTo(c,-a),t.lineTo(e+r,0),t.lineTo(c,a),o===!0?(t.fillStyle=s||l,t.closePath(),t.fill(),t.shadowColor="transparent"):t.shadowColor=n.borderShadowColor,t.stroke()}function Sie(t,e,r){const{x:n,y:i,x2:a,y2:o,centerX:s,centerY:l}=t,c=Math.atan2(o-i,a-n),d=Yb(e.controlPoint,0),h={x:s+xa(r,d.x,!1),y:l+xa(r,d.y,!1)};return So(h,{x:s,y:l},c)}function BR(t,{x:e,y:r},{angle:n,adjust:i},a){!a||!a.display||(t.save(),t.translate(e,r),t.rotate(n),y0(t,0,-i,a),t.restore())}function Cie(t,e,r,n){const{x:i,y:a,x2:o,y2:s,options:l}=e,{startOpts:c,endOpts:d,startAdjust:h,endAdjust:g}=_L(e),m={x:i,y:a},v={x:o,y:s},_=jR(m,r,v,0),y=jR(m,r,v,1)-qt,x=m0(m,r,v,h/n),w=m0(m,r,v,1-g/n),C=new Path2D;t.beginPath(),C.moveTo(x.x,x.y),C.quadraticCurveTo(r.x,r.y,w.x,w.y),t.shadowColor=l.borderShadowColor,t.stroke(C),e.path=C,e.ctx=t,BR(t,x,{angle:_,adjust:h},c),BR(t,w,{angle:y,adjust:g},d)}class ol extends Hn{inRange(e,r,n,i){const a=this.options.rotation,o=this.options.borderWidth;if(n!=="x"&&n!=="y")return Eie({x:e,y:r},this.getProps(["width","height","centerX","centerY"],i),a,o);const{x:s,y:l,x2:c,y2:d}=this.getProps(["x","y","x2","y2"],i),h=o/2,g=n==="y"?{start:l,end:d}:{start:s,end:c},m=So({x:e,y:r},this.getCenterPoint(i),jr(-a));return m[n]>=g.start-h-no&&m[n]<=g.end+h+no}getCenterPoint(e){return As(this,e)}draw(e){const{width:r,height:n,centerX:i,centerY:a,options:o}=this;e.save(),Zb(e,this.getCenterPoint(),o.rotation),Rs(e,this.options),e.beginPath(),e.fillStyle=o.backgroundColor;const s=wa(e,o);e.ellipse(i,a,n/2,r/2,qt/2,0,2*qt),e.fill(),s&&(e.shadowColor=o.borderShadowColor,e.stroke()),e.restore()}get label(){return this.elements&&this.elements[0]}resolveElementProperties(e,r){return mL(e,r,!0)}}ol.id="ellipseAnnotation";ol.defaults={adjustScaleRange:!0,backgroundShadowColor:"transparent",borderDash:[],borderDashOffset:0,borderShadowColor:"transparent",borderWidth:1,display:!0,init:void 0,label:Object.assign({},Is.defaults.label),rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,xMax:void 0,xMin:void 0,xScaleID:void 0,yMax:void 0,yMin:void 0,yScaleID:void 0,z:0};ol.defaultRoutes={borderColor:"color",backgroundColor:"color"};ol.descriptors={label:{_fallback:!0}};function Eie(t,e,r,n){const{width:i,height:a,centerX:o,centerY:s}=e,l=i/2,c=a/2;if(l<=0||c<=0)return!1;const d=jr(r||0),h=n/2||0,g=Math.cos(d),m=Math.sin(d),v=Math.pow(g*(t.x-o)+m*(t.y-s),2),_=Math.pow(m*(t.x-o)-g*(t.y-s),2);return v/Math.pow(l+h,2)+_/Math.pow(c+h,2)<=1.0001}class Qd extends Hn{inRange(e,r,n,i){const{x:a,y:o,x2:s,y2:l,width:c}=this.getProps(["x","y","x2","y2","width"],i),d=this.options.borderWidth;if(n!=="x"&&n!=="y")return Cne({x:e,y:r},this.getCenterPoint(i),c/2,d);const h=d/2,g=n==="y"?{start:o,end:l,value:r}:{start:a,end:s,value:e};return g.value>=g.start-h&&g.value<=g.end+h}getCenterPoint(e){return As(this,e)}draw(e){const r=this.options,n=r.borderWidth;if(r.radius<.1)return;e.save(),e.fillStyle=r.backgroundColor,Rs(e,r);const i=wa(e,r);Pne(e,this,this.centerX,this.centerY),i&&!Jd(r.pointStyle)&&(e.shadowColor=r.borderShadowColor,e.stroke()),e.restore(),r.borderWidth=n}resolveElementProperties(e,r){const n=gL(e,r);return n.initProperties=nl(e,n,r,!0),n}}Qd.id="pointAnnotation";Qd.defaults={adjustScaleRange:!0,backgroundShadowColor:"transparent",borderDash:[],borderDashOffset:0,borderShadowColor:"transparent",borderWidth:1,display:!0,init:void 0,pointStyle:"circle",radius:10,rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,xAdjust:0,xMax:void 0,xMin:void 0,xScaleID:void 0,xValue:void 0,yAdjust:0,yMax:void 0,yMin:void 0,yScaleID:void 0,yValue:void 0,z:0};Qd.defaultRoutes={borderColor:"color",backgroundColor:"color"};class eh extends Hn{inRange(e,r,n,i){if(n!=="x"&&n!=="y")return this.options.radius>=.1&&this.elements.length>1&&Aie(this.elements,e,r,i);const a=So({x:e,y:r},this.getCenterPoint(i),jr(-this.options.rotation)),o=this.elements.map(c=>n==="y"?c.bY:c.bX),s=Math.min(...o),l=Math.max(...o);return a[n]>=s&&a[n]<=l}getCenterPoint(e){return As(this,e)}draw(e){const{elements:r,options:n}=this;e.save(),e.beginPath(),e.fillStyle=n.backgroundColor,Rs(e,n);const i=wa(e,n);let a=!0;for(const o of r)a?(e.moveTo(o.x,o.y),a=!1):e.lineTo(o.x,o.y);e.closePath(),e.fill(),i&&(e.shadowColor=n.borderShadowColor,e.stroke()),e.restore()}resolveElementProperties(e,r){const n=gL(e,r),{sides:i,rotation:a}=r,o=[],s=2*qt/i;let l=a*Nb;for(let c=0;c<i;c++,l+=s){const d=Oie(n,r,l);d.initProperties=nl(e,n,r),o.push(d)}return n.elements=o,n}}eh.id="polygonAnnotation";eh.defaults={adjustScaleRange:!0,backgroundShadowColor:"transparent",borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderShadowColor:"transparent",borderWidth:1,display:!0,init:void 0,point:{radius:0},radius:10,rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,sides:3,xAdjust:0,xMax:void 0,xMin:void 0,xScaleID:void 0,xValue:void 0,yAdjust:0,yMax:void 0,yMin:void 0,yScaleID:void 0,yValue:void 0,z:0};eh.defaultRoutes={borderColor:"color",backgroundColor:"color"};function Oie({centerX:t,centerY:e},{radius:r,borderWidth:n},i){const a=n/2,o=Math.sin(i),s=Math.cos(i),l={x:t+o*r,y:e-s*r};return{type:"point",optionScope:"point",properties:{x:l.x,y:l.y,centerX:l.x,centerY:l.y,bX:t+o*(r+a),bY:e-s*(r+a)}}}function Aie(t,e,r,n){let i=!1,a=t[t.length-1].getProps(["bX","bY"],n);for(const o of t){const s=o.getProps(["bX","bY"],n);s.bY>r!=a.bY>r&&e<(a.bX-s.bX)*(r-s.bY)/(a.bY-s.bY)+s.bX&&(i=!i),a=s}return i}const ba={box:Is,ellipse:ol,label:il,line:al,point:Qd,polygon:eh};Object.keys(ba).forEach(t=>{lr.describe(`elements.${ba[t].id}`,{_fallback:"plugins.annotation.common"})});const Rie={update:Object.assign},Iie=e_.concat(hd),zR=(t,e)=>st(e)?_0(t,e):t,b0=t=>t==="color"||t==="font";function r_(t="line"){return ba[t]?t:(console.warn(`Unknown annotation type: '${t}', defaulting to 'line'`),"line")}function Die(t,e,r,n){const i=Pie(t,r.animations,n),a=e.annotations,o=Fie(e.elements,a);for(let s=0;s<a.length;s++){const l=a[s],c=xL(o,s,l.type),d=l.setContext(Nie(t,c,l)),h=c.resolveElementProperties(t,d);h.skip=Mie(h),"elements"in h&&(Lie(c,h.elements,d,i),delete h.elements),Tn(c.x)||Object.assign(c,h),Object.assign(c,h.initProperties),h.options=wL(d),i.update(c,h)}}function Mie(t){return isNaN(t.x)||isNaN(t.y)}function Pie(t,e,r){return r==="reset"||r==="none"||r==="resize"?Rie:new Hb(t,e)}function Lie(t,e,r,n){const i=t.elements||(t.elements=[]);i.length=e.length;for(let a=0;a<e.length;a++){const o=e[a],s=o.properties,l=xL(i,a,o.type,o.initProperties),c=r[o.optionScope].override(o);s.options=wL(c),n.update(l,s)}}function xL(t,e,r,n){const i=ba[r_(r)];let a=t[e];return(!a||!(a instanceof i))&&(a=t[e]=new i,Object.assign(a,n)),a}function wL(t){const e=ba[r_(t.type)],r={};r.id=t.id,r.type=t.type,r.drawTime=t.drawTime,Object.assign(r,_0(t,e.defaults),_0(t,e.defaultRoutes));for(const n of Iie)r[n]=t[n];return r}function _0(t,e){const r={};for(const n of Object.keys(e)){const i=e[n],a=t[n];b0(n)&&Xt(a)?r[n]=a.map(o=>zR(o,i)):r[n]=zR(a,i)}return r}function Nie(t,e,r){return e.$context||(e.$context=Object.assign(Object.create(t.getContext()),{element:e,id:r.id,type:"annotation"}))}function Fie(t,e){const r=e.length,n=t.length;if(n<r){const i=r-n;t.splice(n,0,...new Array(i))}else n>r&&t.splice(r,n-r);return t}var kie="2.2.1";const ca=new Map,jie=e_.concat(hd);var $ie={id:"annotation",version:kie,beforeRegister(){Ene("chart.js","3.7",so.version)},afterRegister(){so.register(ba)},afterUnregister(){so.unregister(ba)},beforeInit(t){ca.set(t,{annotations:[],elements:[],visibleElements:[],listeners:{},listened:!1,moveListened:!1,hooks:{},hooked:!1,hovered:[]})},beforeUpdate(t,e,r){const n=ca.get(t),i=n.annotations=[];let a=r.annotations;st(a)?Object.keys(a).forEach(o=>{const s=a[o];st(s)&&(s.id=o,i.push(s))}):Xt(a)&&i.push(...a),Jne(i,t.scales)},afterDataLimits(t,e){const r=ca.get(t);Zne(t,e.scale,r.annotations.filter(n=>n.display&&n.adjustScaleRange))},afterUpdate(t,e,r){const n=ca.get(t);Vne(t,n,r),Die(t,n,r,e.mode),n.visibleElements=n.elements.filter(i=>!i.skip&&i.options.display),Yne(t,n,r)},beforeDatasetsDraw(t,e,r){ff(t,"beforeDatasetsDraw",r.clip)},afterDatasetsDraw(t,e,r){ff(t,"afterDatasetsDraw",r.clip)},beforeDraw(t,e,r){ff(t,"beforeDraw",r.clip)},afterDraw(t,e,r){ff(t,"afterDraw",r.clip)},beforeEvent(t,e,r){const n=ca.get(t);Gne(n,e.event,r)&&(e.changed=!0)},afterDestroy(t){ca.delete(t)},_getState(t){return ca.get(t)},defaults:{animations:{numbers:{properties:["x","y","x2","y2","width","height","centerX","centerY","pointX","pointY","radius"],type:"number"}},clip:!0,interaction:{mode:void 0,axis:void 0,intersect:void 0},common:{drawTime:"afterDatasetsDraw",init:!1,label:{}}},descriptors:{_indexable:!1,_scriptable:t=>!jie.includes(t)&&t!=="init",annotations:{_allKeys:!1,_fallback:(t,e)=>`elements.${ba[r_(e.type)].id}`},interaction:{_fallback:!0},common:{label:{_indexable:b0,_fallback:!0},_indexable:b0}},additionalOptionScopes:[""]};function ff(t,e,r){const{ctx:n,chartArea:i}=t,a=ca.get(t);r&&tl(n,i);const o=Uie(a.visibleElements,e).sort((s,l)=>s.element.options.z-l.element.options.z);for(const s of o)qie(n,i,a,s);r&&rl(n)}function Uie(t,e){const r=[];for(const n of t)if(n.options.drawTime===e&&r.push({element:n,main:!0}),n.elements&&n.elements.length)for(const i of n.elements)i.options.display&&i.options.drawTime===e&&r.push({element:i});return r}function qie(t,e,r,n){const i=n.element;n.main?(DR(r,i,"beforeDraw"),i.draw(t,e),DR(r,i,"afterDraw")):i.draw(t,e)}const Hie={id:"chartBackground",beforeDraw:(t,e,r)=>{const{ctx:n,height:i,width:a}=t;n.save(),n.globalCompositeOperation="destination-over",n.fillStyle=r.color||"#FFFFFF",n.fillRect(0,0,a,i),n.restore()}};/*!
|
|
116
|
+
* chartjs-adapter-date-fns v3.0.0
|
|
117
|
+
* https://www.chartjs.org
|
|
118
|
+
* (c) 2022 chartjs-adapter-date-fns Contributors
|
|
119
|
+
* Released under the MIT license
|
|
120
|
+
*/const Wie={datetime:"MMM d, yyyy, h:mm:ss aaaa",millisecond:"h:mm:ss.SSS aaaa",second:"h:mm:ss aaaa",minute:"h:mm aaaa",hour:"ha",day:"MMM d",week:"PP",month:"MMM yyyy",quarter:"qqq - yyyy",year:"yyyy"};DP._date.override({_id:"date-fns",formats:function(){return Wie},parse:function(t,e){if(t===null||typeof t>"u")return null;const r=typeof t;return r==="number"||t instanceof Date?t=je(t):r==="string"&&(typeof e=="string"?t=qI(t,e,new Date,this.options):t=cn(t,this.options)),xs(t)?t.getTime():null},format:function(t,e){return Ku(t,e,this.options)},add:function(t,e,r){switch(r){case"millisecond":return Vu(t,e);case"second":return GW(t,e);case"minute":return zW(t,e);case"hour":return UW(t,e);case"day":return P0(t,e);case"week":return KW(t,e);case"month":return _d(t,e);case"quarter":return VW(t,e);case"year":return XW(t,e);default:return t}},diff:function(t,e,r){switch(r){case"millisecond":return Td(t,e);case"second":return aB(t,e);case"minute":return rB(t,e);case"hour":return tB(t,e);case"day":return CI(t,e);case"week":return oB(t,e);case"month":return OI(t,e);case"quarter":return iB(t,e);case"year":return sB(t,e);default:return 0}},startOf:function(t,e,r){switch(e){case"second":return L3(t);case"minute":return uB(t);case"hour":return P3(t);case"day":return lo(t);case"week":return r1(t);case"isoWeek":return r1(t,{weekStartsOn:+r});case"month":return cB(t);case"quarter":return lB(t);case"year":return dB(t);default:return t}},endOf:function(t,e){switch(e){case"second":return vB(t);case"minute":return gB(t);case"hour":return hB(t);case"day":return Sd(t);case"week":return pB(t);case"month":return EI(t);case"quarter":return mB(t);case"year":return fB(t);default:return t}}});so.register(u0,l0,va,Gb,xf,Hu,$ie,Hie,ute,pte,wte);export{gae as D,pae as E,Yz as L,cae as Q,dae as R,WI as S,mae as a,fae as c,gi as g,R as j,vae as q,_ae as r,hae as u};
|