signalk-barograph
Version:
SignalK plugin to influx environment data & Barograph to visualize atmospheric pressure
2 lines • 680 kB
JavaScript
/*! For license information please see 42.js.LICENSE.txt */
(self.webpackChunksignalk_barograph=self.webpackChunksignalk_barograph||[]).push([[42],{5709:e=>{e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports},8784:(e,t,n)=>{var r=n(5735).default;function a(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(a=function(e){return e?n:t})(e)}e.exports=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=a(t);if(n&&n.has(e))return n.get(e);var i={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if("default"!==s&&Object.prototype.hasOwnProperty.call(e,s)){var d=o?Object.getOwnPropertyDescriptor(e,s):null;d&&(d.get||d.set)?Object.defineProperty(i,s,d):i[s]=e[s]}return i.default=e,n&&n.set(e,i),i},e.exports.__esModule=!0,e.exports.default=e.exports},5735:e=>{function t(n){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},6957:function(e,t,n){var r=n(6763);!function(e){"use strict";var t=(()=>{var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,i={};function o(){let e=new TextDecoder("utf-8");return{concat(e,t){let n=new Uint8Array(e.length+t.length);return n.set(e),n.set(t,e.length),n},copy(e,t,n){let r=new Uint8Array(n-t);return r.set(e.subarray(t,n)),r},toUtf8String:(t,n,r)=>e.decode(t.subarray(n,r))}}function s(e,t){let n,r,a=null!=t?t:o(),i=!1,s=!1,d=!1;function l(t){let o,c=0;for(n?(o=0===t.length?0:n.length,t=a.concat(n,t)):o=0;o<t.length;){let n=t[o];if(10===n){if(!s){let n=o>0&&13===t[o-1]?o-1:o;if(i)return;if(d=!1===e.next(a.toUtf8String(t,c,n)),c=o+1,d)break}}else 34===n&&(s=!s);o++}if(n=c<t.length?a.copy(t,c,t.length):void 0,d){if(e.useResume)return void e.useResume((()=>{d=!1,l(new Uint8Array(0))}));u.error(new Error("Unable to pause, useResume is not configured!")),d=!1}r&&(r(),r=void 0)}let u={next(e){if(!i)try{return l(e),!d}catch(e){this.error(e)}return!0},error(t){i||(i=!0,e.error(t))},complete(){i||(n&&e.next(a.toUtf8String(n,0,n.length)),i=!0,e.complete())}};return e.useCancellable&&(u.useCancellable=t=>{e.useCancellable&&e.useCancellable({cancel(){t.cancel(),n=void 0,u.complete()},isCancelled:()=>t.isCancelled()})}),e.useResume&&(u.useResume=e=>{r=e}),u}async function*d(e,t){let n,r=null!=t?t:o(),a=!1;for await(let t of e){let e,i=0;for(n?(e=n.length,t=r.concat(n,t)):e=0;e<t.length;){let n=t[e];if(10===n){if(!a){let n=e>0&&13===t[e-1]?e-1:e;yield r.toUtf8String(t,i,n),i=e+1}}else 34===n&&(a=!a);e++}n=i<t.length?r.copy(t,i,t.length):void 0}n&&(yield r.toUtf8String(n,0,n.length))}((t,n)=>{for(var r in n)e(t,r,{get:n[r],enumerable:!0})})(i,{AbortError:()=>w,DEFAULT_ConnectionOptions:()=>R,DEFAULT_RetryDelayStrategyOptions:()=>F,DEFAULT_WriteOptions:()=>W,FLUX_VALUE:()=>re,HttpError:()=>v,IllegalArgumentError:()=>g,InfluxDB:()=>je,LineSplitter:()=>l,Log:()=>te,Point:()=>Me,RequestTimedOutError:()=>k,UNKNOWN_COLUMN:()=>m,canRetryHttpCall:()=>b,chunksToLines:()=>s,chunksToLinesIterable:()=>d,consoleLogger:()=>Q,convertTimeToNanos:()=>Z,createFluxTableColumn:()=>f,createFluxTableMetaData:()=>S,createTextDecoderCombiner:()=>o,currentTime:()=>K,dateToProtocolTimestamp:()=>X,escape:()=>I,flux:()=>ve,fluxBool:()=>pe,fluxDateTime:()=>he,fluxDuration:()=>me,fluxExpression:()=>ye,fluxFloat:()=>le,fluxInteger:()=>ce,fluxRegExp:()=>fe,fluxString:()=>se,getRetryDelay:()=>L,isStatusCodeRetriable:()=>y,linesToRowsIterable:()=>H,linesToTables:()=>A,newFluxTableColumn:()=>_,sanitizeFloat:()=>de,sanitizeInteger:()=>ue,serializeDateTimeAsDate:()=>x,serializeDateTimeAsNumber:()=>Y,serializeDateTimeAsString:()=>D,setLogger:()=>ne,stringToLines:()=>P,symbolObservable:()=>j,toFluxValue:()=>ge,typeSerializers:()=>c,useProcessHrtime:()=>B});var l=class{constructor(){this._reuse=!1}get reuse(){return this._reuse}set reuse(e){e&&!this.reusedValues&&(this.reusedValues=new Array(10)),this._reuse=e}withReuse(){return this.reuse=!0,this}splitLine(e){if(null==e)return this.lastSplitLength=0,[];let t=0,n=0,r=this._reuse?this.reusedValues:[],a=0;for(let i=0;i<e.length;i++){let o=e[i];if(","===o){if(t%2==0){let o=this.getValue(e,n,i,t);this._reuse?r[a++]=o:r.push(o),n=i+1,t=0}}else'"'===o&&t++}let i=this.getValue(e,n,e.length,t);return this._reuse?(r[a]=i,this.lastSplitLength=a+1):(r.push(i),this.lastSplitLength=r.length),r}getValue(e,t,n,r){return t===e.length?"":0===r?e.substring(t,n):2===r?e.substring(t+1,n-1):e.substring(t+1,n-1).replace(/""/gi,'"')}},u=e=>e,c={boolean:e=>""===e?null:"true"===e,unsignedLong:e=>""===e?null:+e,long:e=>""===e?null:+e,double(e){switch(e){case"":return null;case"+Inf":return Number.POSITIVE_INFINITY;case"-Inf":return Number.NEGATIVE_INFINITY;default:return+e}},string:u,base64Binary:u,duration:e=>""===e?null:e,"dateTime:RFC3339":e=>""===e?null:e},h=class{get(e){var t;let n=e[this.index];return(""===n||void 0===n)&&this.defaultValue&&(n=this.defaultValue),(null!=(t=c[this.dataType])?t:u)(n)}},m=Object.freeze({label:"",dataType:"",group:!1,defaultValue:"",index:Number.MAX_SAFE_INTEGER,get:()=>{}});function _(){return new h}function f(e){var t,n;let r=new h;return r.label=String(e.label),r.dataType=e.dataType,r.group=!!e.group,r.defaultValue=null!=(t=e.defaultValue)?t:"",r.index=null!=(n=e.index)?n:0,r}var p=[404,408,425,429,500,502,503,504];function y(e){return p.includes(e)}var g=class e extends Error{constructor(t){super(t),this.name="IllegalArgumentError",Object.setPrototypeOf(this,e.prototype)}},v=class e extends Error{constructor(t,n,r,a,i,o,s){if(super(),this.statusCode=t,this.statusMessage=n,this.body=r,this.contentType=i,Object.setPrototypeOf(this,e.prototype),this.headers=s,o)this.message=o;else if(r){if(null!=i&&i.startsWith("application/json"))try{this.json=JSON.parse(r),this.message=this.json.message,this.code=this.json.code}catch(e){}this.message||(this.message=`${t} ${n} : ${r}`)}else this.message=`${t} ${n}`;this.name="HttpError",this.setRetryAfter(a)}setRetryAfter(e){"string"==typeof e&&/^[0-9]+$/.test(e)?this._retryAfter=parseInt(e):this._retryAfter=0}canRetry(){return y(this.statusCode)}retryAfter(){return this._retryAfter}},M=["ECONNRESET","ENOTFOUND","ESOCKETTIMEDOUT","ETIMEDOUT","ECONNREFUSED","EHOSTUNREACH","EPIPE"];function b(e){return!(!e||!("function"==typeof e.canRetry?e.canRetry():e.code&&M.includes(e.code)))}function L(e,t){if(e){let n;return"function"==typeof e.retryAfter?e.retryAfter():(n=0,t&&t>0?n+Math.round(Math.random()*t):n)}return 0}var k=class e extends Error{constructor(){super(),Object.setPrototypeOf(this,e.prototype),this.name="RequestTimedOutError",this.message="Request timed out"}canRetry(){return!0}retryAfter(){return 0}},w=class e extends Error{constructor(){super(),this.name="AbortError",Object.setPrototypeOf(this,e.prototype),this.message="Response aborted"}canRetry(){return!0}retryAfter(){return 0}};function x(){c["dateTime:RFC3339"]=e=>""===e?null:new Date(Date.parse(e))}function Y(){c["dateTime:RFC3339"]=e=>""===e?null:Date.parse(e)}function D(){c["dateTime:RFC3339"]=e=>""===e?null:e}var T=class{constructor(e){e.forEach(((e,t)=>e.index=t)),this.columns=e}column(e,t=!0){for(let t=0;t<this.columns.length;t++){let n=this.columns[t];if(n.label===e)return n}if(t)throw new g(`Column ${e} not found!`);return m}toObject(e){let t={};for(let n=0;n<this.columns.length&&n<e.length;n++){let r=this.columns[n];t[r.label]=r.get(e)}return t}get(e,t){return this.column(t,!1).get(e)}};function S(e){return new T(e)}function A(e){let t,n,r=(new l).withReuse(),a=!0,i=0,o={error(t){e.error(t)},next(o){if(""===o)a=!0,t=void 0;else{let s=r.splitLine(o),d=r.lastSplitLength;if(!a)return e.next(s.slice(i,d),n);if(!t){t=new Array(d);for(let e=0;e<d;e++)t[e]=_()}if(s[0].startsWith("#")){if("#datatype"===s[0])for(let e=1;e<d;e++)t[e].dataType=s[e];else if("#default"===s[0])for(let e=1;e<d;e++)t[e].defaultValue=s[e];else if("#group"===s[0])for(let e=1;e<d;e++)t[e].group="t"===s[e][0]}else{""===s[0]?(i=1,t=t.slice(1)):i=0;for(let e=i;e<d;e++)t[e-i].label=s[e];n=S(t),a=!1}}return!0},complete(){e.complete()}};return e.useCancellable&&(o.useCancellable=e.useCancellable.bind(e)),e.useResume&&(o.useResume=e.useResume.bind(e)),o}async function*H(e){let t,n,r=(new l).withReuse(),a=!0,i=0;for await(let o of e)if(""===o)a=!0,t=void 0;else{let e=r.splitLine(o),s=r.lastSplitLength;if(a){if(!t){t=new Array(s);for(let e=0;e<s;e++)t[e]=_()}if(e[0].startsWith("#")){if("#datatype"===e[0])for(let n=1;n<s;n++)t[n].dataType=e[n];else if("#default"===e[0])for(let n=1;n<s;n++)t[n].defaultValue=e[n];else if("#group"===e[0])for(let n=1;n<s;n++)t[n].group="t"===e[n][0]}else{""===e[0]?(i=1,t=t.slice(1)):i=0;for(let n=i;n<s;n++)t[n-i].label=e[n];n=S(t),a=!1}}else yield{values:e.slice(i,s),tableMeta:n}}}function P(e,t){let n=!1,r=0,a=0;for(;a<e.length;){let i=e.charCodeAt(a);if(10===i){if(!n){let n=a>0&&13===e.charCodeAt(a-1)?a-1:a;t.next(e.substring(r,n)),r=a+1}}else 34===i&&(n=!n);a++}r<a&&t.next(e.substring(r,a)),t.complete()}var j="function"==typeof Symbol&&Symbol.observable||"@@observable",O=class{constructor(e,t){this.isClosed=!1;try{t({next:t=>{e.next(t)},error:t=>{this.isClosed=!0,e.error(t)},complete:()=>{this.isClosed=!0,e.complete()},useCancellable:e=>{this.cancellable=e}})}catch(t){this.isClosed=!0,e.error(t)}}get closed(){return this.isClosed}unsubscribe(){var e;null==(e=this.cancellable)||e.cancel(),this.isClosed=!0}};function C(){}var E=class{constructor(e,t){this.executor=e,this.decorator=t}subscribe(e,t,n){let r=function(e){let{next:t,error:n,complete:r}=e;return{next:t?t.bind(e):C,error:n?n.bind(e):C,complete:r?r.bind(e):C}}("object"!=typeof e||null===e?{next:e,error:t,complete:n}:e);return new O(this.decorator(r),this.executor)}[j](){return this}},R={timeout:1e4},F={retryJitter:200,minRetryDelay:5e3,maxRetryDelay:125e3,exponentialBase:5,randomRetry:!0},W={batchSize:1e3,maxBatchBytes:5e7,flushInterval:6e4,writeFailed:function(){},writeSuccess:function(){},writeRetrySkipped:function(){},maxRetries:5,maxRetryTime:18e4,maxBufferLines:32e3,retryJitter:200,minRetryDelay:5e3,maxRetryDelay:125e3,exponentialBase:2,gzipThreshold:1e3,randomRetry:!0};function z(e,t){return function(n){let r="",a=0,i=0;for(;i<n.length;){let o=e.indexOf(n[i]);o>=0&&(r+=n.substring(a,i),r+=t[o],a=i+1),i++}return 0==a?n:(a<n.length&&(r+=n.substring(a,n.length)),r)}}var I={measurement:z(", \n\r\t",["\\,","\\ ","\\n","\\r","\\t"]),quoted:function(e,t){let n=z(e,t);return e=>'"'+n(e)+'"'}('"\\',['\\"',"\\\\"]),tag:z(", =\n\r\t",["\\,","\\ ","\\=","\\n","\\r","\\t"])},N="000000000";function B(e){return!1}var V=Date.now(),U=0;function $(){{let e=Date.now();e!==V?(V=e,U=0):U++;let t=String(U);return String(e)+N.substr(0,6-t.length)+t}}function J(){return String(Date.now())+N.substr(0,3)}function q(){return String(Date.now())}function G(){return String(Math.floor(Date.now()/1e3))}var K={s:G,ms:q,us:J,ns:$,seconds:G,millis:q,micros:J,nanos:$},X={s:e=>`${Math.floor(e.getTime()/1e3)}`,ms:e=>`${e.getTime()}`,us:e=>`${e.getTime()}000`,ns:e=>`${e.getTime()}000000`};function Z(e){return void 0===e?$():"string"==typeof e?e.length>0?e:void 0:e instanceof Date?`${e.getTime()}000000`:String("number"==typeof e?Math.floor(e):e)}var Q={error(e,t){r.error("ERROR: "+e,t||"")},warn(e,t){r.warn("WARN: "+e,t||"")}},ee=Q,te={error(e,t){ee.error(e,t)},warn(e,t){ee.warn(e,t)}};function ne(e){let t=ee;return ee=e,t}var re=Symbol("FLUX_VALUE"),ae=class{constructor(e){this.fluxValue=e}toString(){return this.fluxValue}[re](){return this.fluxValue}};function ie(e){return"object"==typeof e&&"function"==typeof e[re]}function oe(e){if(null==e)return"";e=e.toString();let t,n=0;function r(){void 0===t&&(t=e.substring(0,n))}for(;n<e.length;n++){let a=e.charAt(n);switch(a){case"\r":r(),t+="\\r";break;case"\n":r(),t+="\\n";break;case"\t":r(),t+="\\t";break;case'"':case"\\":r(),t=t+"\\"+a;break;case"$":if(n+1<e.length&&"{"===e.charAt(n+1)){r(),n++,t+="\\${";break}null!=t&&(t+=a);break;default:null!=t&&(t+=a)}}return void 0!==t?t:e}function se(e){return new ae(`"${oe(e)}"`)}function de(e){let t=Number(e);if(!isFinite(t)){if("number"==typeof e)return`float(v: "${t}")`;throw new Error(`not a flux float: ${e}`)}let n=t.toString(),r=!1;for(let e of n)if(!(e>="0"&&e<="9"||"-"==e)){if("."===e){r=!0;continue}return`float(v: "${n}")`}return r?n:n+".0"}function le(e){return new ae(de(e))}function ue(e){let t=String(e),n=t.startsWith("-"),r=n?t.substring(1):t;if(0===r.length||r.length>19)throw new Error(`not a flux integer: ${t}`);for(let e of r)if(e<"0"||e>"9")throw new Error(`not a flux integer: ${t}`);if(19===r.length){if(n&&r>"9223372036854775808")throw new Error(`flux integer out of bounds: ${t}`);if(!n&&r>"9223372036854775807")throw new Error(`flux integer out of bounds: ${t}`)}return t}function ce(e){return new ae(ue(e))}function he(e){return new ae(function(e){return`time(v: "${oe(e)}")`}(e))}function me(e){return new ae(`duration(v: "${oe(e)}")`)}function _e(e){return e instanceof RegExp?e.toString():new RegExp(e).toString()}function fe(e){return new ae(_e(e))}function pe(e){return new ae("true"===e||"false"===e?e:(!!e).toString())}function ye(e){return new ae(String(e))}function ge(e){if(void 0===e)return"";if(null===e)return"null";if("boolean"==typeof e)return e.toString();if("string"==typeof e)return`"${oe(e)}"`;if("number"==typeof e)return Number.isSafeInteger(e)?ue(e):de(e);if("object"==typeof e){if("function"==typeof e[re])return e[re]();if(e instanceof Date)return e.toISOString();if(e instanceof RegExp)return _e(e);if(Array.isArray(e))return`[${e.map(ge).join(",")}]`}else if("bigint"==typeof e)return`${e}.0`;return ge(e.toString())}function ve(e,...t){if(1==e.length&&0===t.length)return ye(e[0]);let n=new Array(e.length+t.length),r=0;for(let a=0;a<e.length;a++){let i=e[a];if(n[r++]=i,a<t.length){let o,s=t[a];if(i.endsWith('"')&&a+1<e.length&&e[a+1].startsWith('"'))o=oe(s);else if(o=ge(s),""===o&&!ie(s))throw new Error(`Unsupported parameter literal '${s}' at index: ${a}, type: ${typeof s}`);n[r++]=o}else if(a<e.length-1)throw new Error("Too few parameters supplied!")}return ye(n.join(""))}var Me=class{constructor(e){this.tags={},this.fields={},e&&(this.name=e)}measurement(e){return this.name=e,this}tag(e,t){return this.tags[e]=t,this}booleanField(e,t){return this.fields[e]=t?"T":"F",this}intField(e,t){let n;if(n="number"==typeof t?t:parseInt(String(t)),isNaN(n)||n<=-0x8000000000000000||n>=0x8000000000000000)throw new Error(`invalid integer value for field '${e}': '${t}'!`);return this.fields[e]=`${Math.floor(n)}i`,this}uintField(e,t){if("number"==typeof t){if(isNaN(t)||t<0||t>Number.MAX_SAFE_INTEGER)throw new Error(`uint value for field '${e}' out of range: ${t}`);this.fields[e]=`${Math.floor(t)}u`}else{let n=String(t);for(let e=0;e<n.length;e++){let r=n.charCodeAt(e);if(r<48||r>57)throw new Error(`uint value has an unsupported character at pos ${e}: ${t}`)}if(n.length>20||20===n.length&&n.localeCompare("18446744073709551615")>0)throw new Error(`uint value for field '${e}' out of range: ${n}`);this.fields[e]=`${n}u`}return this}floatField(e,t){let n;if(n="number"==typeof t?t:parseFloat(t),!isFinite(n))throw new Error(`invalid float value for field '${e}': ${t}`);return this.fields[e]=String(n),this}stringField(e,t){return null!=t&&("string"!=typeof t&&(t=String(t)),this.fields[e]=I.quoted(t)),this}timestamp(e){return this.time=e,this}toLineProtocol(e){if(!this.name)return;let t="";if(Object.keys(this.fields).sort().forEach((e=>{if(e){let n=this.fields[e];t.length>0&&(t+=","),t+=`${I.tag(e)}=${n}`}})),0===t.length)return;let n="",r=e&&e.defaultTags?{...e.defaultTags,...this.tags}:this.tags;Object.keys(r).sort().forEach((e=>{if(e){let t=r[e];t&&(n+=",",n+=`${I.tag(e)}=${I.tag(t)}`)}}));let a=this.time;return a=e&&e.convertTime?e.convertTime(a):Z(a),`${I.measurement(this.name)}${n} ${t}${void 0!==a?" "+a:""}`}toString(){return this.toLineProtocol(void 0)||`invalid point: ${JSON.stringify(this,void 0)}`}},be=class{constructor(e){this.options={...F,...e},this.success()}nextDelay(e,t){let n=L(e);if(n&&n>0)return n+Math.round(Math.random()*this.options.retryJitter);if(t&&t>0){if(this.options.randomRetry){let e=Math.max(this.options.minRetryDelay,1),n=e*this.options.exponentialBase;for(let r=1;r<t;r++)if(e=n,n*=this.options.exponentialBase,n>=this.options.maxRetryDelay){n=this.options.maxRetryDelay;break}return e+Math.round(Math.random()*(n-e)+Math.random()*this.options.retryJitter)}let e=Math.max(this.options.minRetryDelay,1);for(let n=1;n<t;n++)if(e*=this.options.exponentialBase,e>=this.options.maxRetryDelay){e=this.options.maxRetryDelay;break}return e+Math.round(Math.random()*this.options.retryJitter)}return this.currentDelay?this.currentDelay=Math.min(Math.max(this.currentDelay*this.options.exponentialBase,1)+Math.round(Math.random()*this.options.retryJitter),this.options.maxRetryDelay):this.currentDelay=this.options.minRetryDelay+Math.round(Math.random()*this.options.retryJitter),this.currentDelay}success(){this.currentDelay=void 0}};function Le(e){let t,n=e,r=e;for(;r.next;)r.next.expires<n.expires&&(t=r,n=r.next),r=r.next;return[n,t]}var ke=class{constructor(e,t,n=(()=>{})){this.maxLines=e,this.retryLines=t,this.onShrink=n,this.size=0,this.closed=!1,this._timeoutHandle=void 0}addLines(e,t,n,r){if(this.closed||!e.length)return;let a=Date.now()+n;if(r<a&&(a=r),this.first&&this.size+e.length>this.maxLines){let t=this.size,n=.7*t;do{let[e,t]=Le(this.first);this.size-=e.lines.length,t?t.next=e.next:(this.first=e.next,this.first&&this.scheduleRetry(this.first.retryTime-Date.now())),e.next=void 0,this.onShrink(e)}while(this.first&&this.size+e.length>n);te.error(`RetryBuffer: ${t-this.size} oldest lines removed to keep buffer size under the limit of ${this.maxLines} lines.`)}let i,o={lines:e,retryCount:t,retryTime:a,expires:r},s=this.first;for(;;){if(!s||s.retryTime>a){o.next=s,i?i.next=o:(this.first=o,this.scheduleRetry(a-Date.now()));break}i=s,s=s.next}this.size+=e.length}removeLines(){if(this.first){let e=this.first;return this.first=this.first.next,e.next=void 0,this.size-=e.lines.length,e}}scheduleRetry(e){this._timeoutHandle&&clearTimeout(this._timeoutHandle),this._timeoutHandle=setTimeout((()=>{let e=this.removeLines();e?this.retryLines(e.lines,e.retryCount,e.expires).catch((()=>{})).finally((()=>{this.first&&this.scheduleRetry(this.first.retryTime-Date.now())})):this._timeoutHandle=void 0}),Math.max(e,0))}async flush(){let e;for(;e=this.removeLines();)await this.retryLines(e.lines,e.retryCount,e.expires)}close(){return this._timeoutHandle&&(clearTimeout(this._timeoutHandle),this._timeoutHandle=void 0),this.closed=!0,this.size}};var we=class{constructor(e,t,n,r){this.maxChunkRecords=e,this.maxBatchBytes=t,this.flushFn=n,this.scheduleSend=r,this.length=0,this.bytes=-1,this.lines=new Array(e)}add(e){let t=function(e){let t=e.length;for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);r<128||(r>=128&&r<=2047?t++:r>=2048&&r<=65535?r>=55296&&r<=57343?t++:t+=2:t+=3)}return t}(e);0===this.length?this.scheduleSend():this.bytes+t+1>=this.maxBatchBytes&&this.flush().catch((e=>{})),this.lines[this.length]=e,this.length++,this.bytes+=t+1,(this.length>=this.maxChunkRecords||this.bytes>=this.maxBatchBytes)&&this.flush().catch((e=>{}))}flush(){let e=this.reset();return e.length>0?this.flushFn(e):Promise.resolve()}reset(){let e=this.lines.slice(0,this.length);return this.length=0,this.bytes=-1,e}},xe=class{constructor(e,t,n,r,a){this.transport=e,this.closed=!1,this._timeoutHandle=void 0,this.path=`/api/v2/write?org=${encodeURIComponent(t)}&bucket=${encodeURIComponent(n)}&precision=${r}`,null!=a&&a.consistency&&(this.path+=`&consistency=${encodeURIComponent(a.consistency)}`),this.writeOptions={...W,...a},this.currentTime=K[r],this.dateToProtocolTimestamp=X[r],this.writeOptions.defaultTags&&this.useDefaultTags(this.writeOptions.defaultTags),this.sendOptions={method:"POST",headers:{"content-type":"text/plain; charset=utf-8",...null==a?void 0:a.headers},gzipThreshold:this.writeOptions.gzipThreshold};var i;this.writeBuffer=new we(this.writeOptions.batchSize,this.writeOptions.maxBatchBytes,(e=>(this._clearFlushTimeout(),this.sendBatch(e,this.writeOptions.maxRetries))),(()=>{this.writeOptions.flushInterval>0&&(this._clearFlushTimeout(),this.closed||(this._timeoutHandle=setTimeout((()=>this.sendBatch(this.writeBuffer.reset(),this.writeOptions.maxRetries).catch((e=>{}))),this.writeOptions.flushInterval)))})),this.sendBatch=this.sendBatch.bind(this),this.retryStrategy=(i=this.writeOptions,new be(i)),this.retryBuffer=new ke(this.writeOptions.maxBufferLines,this.sendBatch,this.writeOptions.writeRetrySkipped)}sendBatch(e,t,n=Date.now()+this.writeOptions.maxRetryTime){let r=this,a=r.writeOptions.maxRetries+1-t;if(!this.closed&&e.length>0){if(n<=Date.now()){let t=new Error("Max retry time exceeded.");return r.writeOptions.writeFailed.call(r,t,e,a,n)||(te.error(`Write to InfluxDB failed (attempt: ${a}).`,t),Promise.reject(t))}return new Promise(((i,o)=>{let s,d,l={responseStarted(e,t){s=t,d=e},error(d){let u=r.writeOptions.writeFailed.call(r,d,e,a,n);if(!u)return d instanceof v&&d.json&&"string"==typeof d.json.error&&d.json.error.includes("hinted handoff queue not empty")?(te.warn("Write to InfluxDB returns: "+d.json.error),s=204,void l.complete()):!r.closed&&t>0&&(!(d instanceof v)||d.statusCode>=429)?(te.warn(`Write to InfluxDB failed (attempt: ${a}).`,d),r.retryBuffer.addLines(e,t-1,r.retryStrategy.nextDelay(d,a),n),void o(d)):(te.error("Write to InfluxDB failed.",d),void o(d));u.then(i,o)},complete(){if(204==s||201==s||null==s)r.writeOptions.writeSuccess.call(r,e),r.retryStrategy.success(),i();else{let e=`204 HTTP response status code expected, but ${s} returned`,t=new v(s,e,void 0,"0",void 0,void 0,d);t.message=e,l.error(t)}}};this.transport.send(this.path,e.join("\n"),this.sendOptions,l)}))}return Promise.resolve()}_clearFlushTimeout(){void 0!==this._timeoutHandle&&(clearTimeout(this._timeoutHandle),this._timeoutHandle=void 0)}writeRecord(e){if(this.closed)throw new Error("writeApi: already closed!");this.writeBuffer.add(e)}writeRecords(e){if(this.closed)throw new Error("writeApi: already closed!");for(let t=0;t<e.length;t++)this.writeBuffer.add(e[t])}writePoint(e){if(this.closed)throw new Error("writeApi: already closed!");let t=e.toLineProtocol(this);t&&this.writeBuffer.add(t)}writePoints(e){if(this.closed)throw new Error("writeApi: already closed!");for(let t=0;t<e.length;t++){let n=e[t].toLineProtocol(this);n&&this.writeBuffer.add(n)}}async flush(e){if(await this.writeBuffer.flush(),e)return await this.retryBuffer.flush()}close(){return this.writeBuffer.flush().finally((()=>{let e=this.retryBuffer.close();e&&te.error(`Retry buffer closed with ${e} items that were not written to InfluxDB!`,null),this.closed=!0}))}dispose(){return this._clearFlushTimeout(),this.closed=!0,this.retryBuffer.close()+this.writeBuffer.length}useDefaultTags(e){return this.defaultTags=e,this}convertTime(e){return void 0===e?this.currentTime():"string"==typeof e?e.length>0?e:void 0:e instanceof Date?this.dateToProtocolTimestamp(e):String("number"==typeof e?Math.floor(e):e)}};function Ye(e){let t={};return e.headers.forEach(((e,n)=>{let r=t[n];void 0===r?t[n]=e:Array.isArray(r)?r.push(e):t[n]=[r,e]})),t}var De=class{constructor(e){this.connectionOptions=e,this.chunkCombiner=o(),this.requestDecorator=function(){},this.defaultHeaders={"content-type":"application/json; charset=utf-8",...e.headers},this.connectionOptions.token&&(this.defaultHeaders.Authorization="Token "+this.connectionOptions.token),this.url=String(this.connectionOptions.url),this.url.endsWith("/")&&(this.url=this.url.substring(0,this.url.length-1)),this.url.endsWith("/api/v2")&&(this.url=this.url.substring(0,this.url.length-7),te.warn(`Please remove '/api/v2' context path from InfluxDB base url, using ${this.url} !`))}send(e,t,n,r){let a,i=function(e={}){let t=0,n={next:n=>{if(0===t&&e.next&&null!=n)return e.next(n)},error:n=>{0===t&&(t=1,e.error&&e.error(n))},complete:()=>{0===t&&(t=2,e.complete&&e.complete())},responseStarted:(t,n)=>{e.responseStarted&&e.responseStarted(t,n)}};return e.useCancellable&&(n.useCancellable=e.useCancellable.bind(e)),e.useResume&&(n.useResume=e.useResume.bind(e)),n}(r),o=!1,s=n.signal,d=()=>{},l=d;if(r&&r.useCancellable){let e=new AbortController;s||(s=e.signal,n={...n,signal:s}),s.addEventListener("abort",(()=>{l()})),r.useCancellable({cancel(){o=!0,e.abort()},isCancelled:()=>o||s.aborted})}this.fetch(e,t,n).then((async e=>{if(null!=r&&r.responseStarted&&i.responseStarted(Ye(e),e.status),await this.throwOnErrorResponse(e),e.body){let t,n=e.body.getReader();do{if(a&&await a,o)break;if(t=await n.read(),!1===i.next(t.value)){let e=i.useResume;if(!e){let e="Unable to pause, useResume is not configured!";return await n.cancel(e),Promise.reject(new Error(e))}a=new Promise((t=>{l=()=>{t(),a=void 0,l=d},e(l)}))}}while(!t.done)}else if(e.arrayBuffer){let t=await e.arrayBuffer();i.next(new Uint8Array(t))}else{let t=await e.text();i.next((new TextEncoder).encode(t))}})).catch((e=>{o||i.error(e)})).finally((()=>i.complete()))}async throwOnErrorResponse(e){if(e.status>=300){let t="";try{if(t=await e.text(),!t){let n=e.headers.get("x-influxdb-error");n&&(t=n)}}catch(t){throw te.warn("Unable to receive error body",t),new v(e.status,e.statusText,void 0,e.headers.get("retry-after"),e.headers.get("content-type"),void 0,Ye(e))}throw new v(e.status,e.statusText,t,e.headers.get("retry-after"),e.headers.get("content-type"),void 0,Ye(e))}}async*iterate(e,t,n){var r;let a=await this.fetch(e,t,n);if(await this.throwOnErrorResponse(a),a.body){let e=a.body.getReader();for(;;){let{value:t,done:i}=await e.read();if(i)break;if(null!=(r=n.signal)&&r.aborted)throw await a.body.cancel(),new w;yield t}}else if(a.arrayBuffer){let e=await a.arrayBuffer();yield new Uint8Array(e)}else{let e=await a.text();yield(new TextEncoder).encode(e)}}async request(e,t,n,r){var a,i;let o=await this.fetch(e,t,n),{headers:s}=o,d=s.get("content-type")||"";r&&r(Ye(o),o.status),await this.throwOnErrorResponse(o);let l=null!=(i=null==(a=n.headers)?void 0:a.accept)?i:d;return l.includes("json")?await o.json():l.includes("text")||l.startsWith("application/csv")?await o.text():void 0}fetch(e,t,n){let{method:r,headers:a,...i}=n,o=`${this.url}${e}`,s={method:r,body:"GET"===r||"HEAD"===r?void 0:"string"==typeof t?t:JSON.stringify(t),headers:{...this.defaultHeaders,...a},credentials:"omit",...this.connectionOptions.transportOptions,...i};return this.requestDecorator(s,n,o),fetch(o,s)}},Te={header:!0,delimiter:",",quoteChar:'"',commentPrefix:"#",annotations:["datatype","group","default"]},Se=class e{constructor(e,t,n){this.transport=e,this.createCSVResponse=t,this.options="string"==typeof n?{org:n}:n}with(t){return new e(this.transport,this.createCSVResponse,{...this.options,...t})}response(e){let{org:t,type:n,gzip:r,headers:a}=this.options,i=`/api/v2/query?org=${encodeURIComponent(t)}`,o=JSON.stringify(this.decorateRequest({query:e.toString(),dialect:Te,type:n})),s={method:"POST",headers:{"content-type":"application/json; encoding=utf-8","accept-encoding":r?"gzip":"identity",...a}};return this.createCSVResponse((e=>this.transport.send(i,o,s,e)),(()=>this.transport.iterate(i,o,s)))}iterateLines(e){return this.response(e).iterateLines()}iterateRows(e){return this.response(e).iterateRows()}lines(e){return this.response(e).lines()}rows(e){return this.response(e).rows()}queryLines(e,t){return this.response(e).consumeLines(t)}queryRows(e,t){return this.response(e).consumeRows(t)}collectRows(e,t){return this.response(e).collectRows(t)}collectLines(e){return this.response(e).collectLines()}queryRaw(e){let{org:t,type:n,gzip:r,headers:a}=this.options;return this.transport.request(`/api/v2/query?org=${encodeURIComponent(t)}`,JSON.stringify(this.decorateRequest({query:e.toString(),dialect:Te,type:n})),{method:"POST",headers:{accept:"text/csv","accept-encoding":r?"gzip":"identity","content-type":"application/json; encoding=utf-8",...a}})}decorateRequest(e){var t;return"function"==typeof this.options.now&&(e.now=this.options.now()),e.type=null!=(t=this.options.type)?t:"flux",e}};function Ae(e,t){return t.toObject(e)}var He,Pe=class{constructor(e,t,n){this.executor=e,this.iterableResultExecutor=t,this.chunkCombiner=n}iterateLines(){return d(this.iterableResultExecutor())}iterateRows(){return H(d(this.iterableResultExecutor()))}lines(){return new E(this.executor,(e=>s(e,this.chunkCombiner)))}rows(){return new E(this.executor,(e=>s(A({next(t,n){e.next({values:t,tableMeta:n})},error(t){e.error(t)},complete(){e.complete()}}),this.chunkCombiner)))}consumeLines(e){this.executor(s(e,this.chunkCombiner))}consumeRows(e){this.executor(s(A(e),this.chunkCombiner))}collectRows(e=Ae){let t=[];return new Promise(((n,r)=>{this.consumeRows({next(n,r){let a=e.call(this,n,r);void 0!==a&&t.push(a)},error(e){r(e)},complete(){n(t)}})}))}collectLines(){let e=[];return new Promise(((t,n)=>{this.consumeLines({next(t){e.push(t)},error(e){n(e)},complete(){t(e)}})}))}},je=class{constructor(e){var t;if("string"==typeof e)this._options={url:e};else{if(null===e||"object"!=typeof e)throw new g("No url or configuration specified!");this._options=Object.assign({},e)}let n=this._options.url;if("string"!=typeof n)throw new g("No url specified!");n.endsWith("/")&&(this._options.url=n.substring(0,n.length-1)),this.transport=null!=(t=this._options.transport)?t:new De(this._options),delete this._options.token,this.processCSVResponse=(e,t)=>new Pe(e,t,this.transport.chunkCombiner)}getWriteApi(e,t,n="ns",r){return new xe(this.transport,e,t,n,null!=r?r:this._options.writeOptions)}getQueryApi(e){return new Se(this.transport,this.processCSVResponse,e)}};return He=i,((r,i,o,s)=>{if(i&&"object"==typeof i||"function"==typeof i)for(let d of n(i))!a.call(r,d)&&d!==o&&e(r,d,{get:()=>i[d],enumerable:!(s=t(i,d))||s.enumerable});return r})(e({},"__esModule",{value:!0}),He)})();Object.defineProperty(e,"__esModule",{value:!0}),Object.assign(e,t)}(t)},751:(e,t,n)=>{"use strict";n.d(t,{A:()=>z});var r=n(5458),a=n(8168),i=n(451);function o(e,t){var n={};return Object.keys(e).forEach((function(r){-1===t.indexOf(r)&&(n[r]=e[r])})),n}const s=function(e){var t=function(t){var n=e(t);return t.css?(0,a.A)({},(0,i.A)(n,e((0,a.A)({theme:t.theme},t.css))),o(t.css,[e.filterProps])):t.sx?(0,a.A)({},(0,i.A)(n,e((0,a.A)({theme:t.theme},t.sx))),o(t.sx,[e.filterProps])):n};return t.propTypes={},t.filterProps=["css","sx"].concat((0,r.A)(e.filterProps)),t},d=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=function(e){return t.reduce((function(t,n){var r=n(e);return r?(0,i.A)(t,r):t}),{})};return r.propTypes={},r.filterProps=t.reduce((function(e,t){return e.concat(t.filterProps)}),[]),r};var l=n(4467),u=n(6307);function c(e,t){return t&&"string"==typeof t?t.split(".").reduce((function(e,t){return e&&e[t]?e[t]:null}),e):null}const h=function(e){var t=e.prop,n=e.cssProperty,r=void 0===n?e.prop:n,a=e.themeKey,i=e.transform,o=function(e){if(null==e[t])return null;var n=e[t],o=c(e.theme,a)||{};return(0,u.N)(e,n,(function(e){var t;return"function"==typeof o?t=o(e):Array.isArray(o)?t=o[e]||e:(t=c(o,e)||e,i&&(t=i(t))),!1===r?t:(0,l.A)({},r,t)}))};return o.propTypes={},o.filterProps=[t],o};function m(e){return"number"!=typeof e?e:"".concat(e,"px solid")}const _=d(h({prop:"border",themeKey:"borders",transform:m}),h({prop:"borderTop",themeKey:"borders",transform:m}),h({prop:"borderRight",themeKey:"borders",transform:m}),h({prop:"borderBottom",themeKey:"borders",transform:m}),h({prop:"borderLeft",themeKey:"borders",transform:m}),h({prop:"borderColor",themeKey:"palette"}),h({prop:"borderRadius",themeKey:"shape"})),f=d(h({prop:"displayPrint",cssProperty:!1,transform:function(e){return{"@media print":{display:e}}}}),h({prop:"display"}),h({prop:"overflow"}),h({prop:"textOverflow"}),h({prop:"visibility"}),h({prop:"whiteSpace"})),p=d(h({prop:"flexBasis"}),h({prop:"flexDirection"}),h({prop:"flexWrap"}),h({prop:"justifyContent"}),h({prop:"alignItems"}),h({prop:"alignContent"}),h({prop:"order"}),h({prop:"flex"}),h({prop:"flexGrow"}),h({prop:"flexShrink"}),h({prop:"alignSelf"}),h({prop:"justifyItems"}),h({prop:"justifySelf"})),y=d(h({prop:"gridGap"}),h({prop:"gridColumnGap"}),h({prop:"gridRowGap"}),h({prop:"gridColumn"}),h({prop:"gridRow"}),h({prop:"gridAutoFlow"}),h({prop:"gridAutoColumns"}),h({prop:"gridAutoRows"}),h({prop:"gridTemplateColumns"}),h({prop:"gridTemplateRows"}),h({prop:"gridTemplateAreas"}),h({prop:"gridArea"})),g=d(h({prop:"position"}),h({prop:"zIndex",themeKey:"zIndex"}),h({prop:"top"}),h({prop:"right"}),h({prop:"bottom"}),h({prop:"left"})),v=d(h({prop:"color",themeKey:"palette"}),h({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette"})),M=h({prop:"boxShadow",themeKey:"shadows"});function b(e){return e<=1?"".concat(100*e,"%"):e}var L=h({prop:"width",transform:b}),k=h({prop:"maxWidth",transform:b}),w=h({prop:"minWidth",transform:b}),x=h({prop:"height",transform:b}),Y=h({prop:"maxHeight",transform:b}),D=h({prop:"minHeight",transform:b});h({prop:"size",cssProperty:"width",transform:b}),h({prop:"size",cssProperty:"height",transform:b});const T=d(L,k,w,x,Y,D,h({prop:"boxSizing"}));var S=n(4109);const A=d(h({prop:"fontFamily",themeKey:"typography"}),h({prop:"fontSize",themeKey:"typography"}),h({prop:"fontStyle",themeKey:"typography"}),h({prop:"fontWeight",themeKey:"typography"}),h({prop:"letterSpacing"}),h({prop:"lineHeight"}),h({prop:"textAlign"}));var H=n(45),P=n(5370),j=n.n(P),O=n(53),C=n(4146),E=n.n(C),R=n(2202);var F=n(7114);var W=s(d(_,f,p,y,g,v,M,T,S.A,A));const z=(I=function(e){return function(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r.name,o=(0,H.A)(r,["name"]),s=i,d="function"==typeof t?function(e){return{root:function(n){return t((0,a.A)({theme:e},n))}}}:{root:t},l=(0,R.A)(d,(0,a.A)({Component:e,name:i||e.displayName,classNamePrefix:s},o));t.filterProps&&(n=t.filterProps,delete t.filterProps),t.propTypes&&(t.propTypes,delete t.propTypes);var u=j().forwardRef((function(t,r){var i,o,s,d=t.children,u=t.className,c=t.clone,h=t.component,m=(0,H.A)(t,["children","className","clone","component"]),_=l(t),f=(0,O.A)(_.root,u),p=m;if(n&&(i=p,o=n,s={},Object.keys(i).forEach((function(e){-1===o.indexOf(e)&&(s[e]=i[e])})),p=s),c)return j().cloneElement(d,(0,a.A)({className:(0,O.A)(d.props.className,f)},p));if("function"==typeof d)return d((0,a.A)({className:f},p));var y=h||e;return j().createElement(y,(0,a.A)({ref:r,className:f},p),d)}));return E()(u,e),u}}("div"),function(e,t){return I(e,(0,a.A)({defaultTheme:F.A},t))})(W,{name:"MuiBox"});var I},412:(e,t,n)=>{"use strict";n.d(t,{A:()=>A});var r=n(8168),a=n(45),i=n(5370),o=n(3416),s=n(53),d=n(4801),l=n(2319),u=n(8173),c=n(364),h=n(5458),m=n(8587),_=n(9417),f=n(5540),p=n(7359),y=n.n(p);const g=y().createContext(null);function v(e,t){var n=Object.create(null);return e&&p.Children.map(e,(function(e){return e})).forEach((function(e){n[e.key]=function(e){return t&&(0,p.isValidElement)(e)?t(e):e}(e)})),n}function M(e,t,n){return null!=n[t]?n[t]:e.props[t]}function b(e,t,n){var r=v(e.children),a=function(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,a=Object.create(null),i=[];for(var o in e)o in t?i.length&&(a[o]=i,i=[]):i.push(o);var s={};for(var d in t){if(a[d])for(r=0;r<a[d].length;r++){var l=a[d][r];s[a[d][r]]=n(l)}s[d]=n(d)}for(r=0;r<i.length;r++)s[i[r]]=n(i[r]);return s}(t,r);return Object.keys(a).forEach((function(i){var o=a[i];if((0,p.isValidElement)(o)){var s=i in t,d=i in r,l=t[i],u=(0,p.isValidElement)(l)&&!l.props.in;!d||s&&!u?d||!s||u?d&&s&&(0,p.isValidElement)(l)&&(a[i]=(0,p.cloneElement)(o,{onExited:n.bind(null,o),in:l.props.in,exit:M(o,"exit",e),enter:M(o,"enter",e)})):a[i]=(0,p.cloneElement)(o,{in:!1}):a[i]=(0,p.cloneElement)(o,{onExited:n.bind(null,o),in:!0,exit:M(o,"exit",e),enter:M(o,"enter",e)})}})),a}var L=Object.values||function(e){return Object.keys(e).map((function(t){return e[t]}))},k=function(e){function t(t,n){var r,a=(r=e.call(this,t,n)||this).handleExited.bind((0,_.A)(r));return r.state={contextValue:{isMounting:!0},handleExited:a,firstRender:!0},r}(0,f.A)(t,e);var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(e,t){var n,r,a=t.children,i=t.handleExited;return{children:t.firstRender?(n=e,r=i,v(n.children,(function(e){return(0,p.cloneElement)(e,{onExited:r.bind(null,e),in:!0,appear:M(e,"appear",n),enter:M(e,"enter",n),exit:M(e,"exit",n)})}))):b(e,a,i),firstRender:!1}},n.handleExited=function(e,t){var n=v(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState((function(t){var n=(0,r.A)({},t.children);return delete n[e.key],{children:n}})))},n.render=function(){var e=this.props,t=e.component,n=e.childFactory,r=(0,m.A)(e,["component","childFactory"]),a=this.state.contextValue,i=L(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,null===t?y().createElement(g.Provider,{value:a},i):y().createElement(g.Provider,{value:a},y().createElement(t,r,i))},t}(y().Component);k.propTypes={},k.defaultProps={component:"div",childFactory:function(e){return e}};const w=k;var x="undefined"==typeof window?i.useEffect:i.useLayoutEffect;const Y=function(e){var t=e.classes,n=e.pulsate,r=void 0!==n&&n,a=e.rippleX,o=e.rippleY,d=e.rippleSize,u=e.in,c=e.onExited,h=void 0===c?function(){}:c,m=e.timeout,_=i.useState(!1),f=_[0],p=_[1],y=(0,s.A)(t.ripple,t.rippleVisible,r&&t.ripplePulsate),g={width:d,height:d,top:-d/2+o,left:-d/2+a},v=(0,s.A)(t.child,f&&t.childLeaving,r&&t.childPulsate),M=(0,l.A)(h);return x((function(){if(!u){p(!0);var e=setTimeout(M,m);return function(){clearTimeout(e)}}}),[M,u,m]),i.createElement("span",{className:y,style:g},i.createElement("span",{className:v}))};var D=i.forwardRef((function(e,t){var n=e.center,o=void 0!==n&&n,d=e.classes,l=e.className,u=(0,a.A)(e,["center","classes","className"]),c=i.useState([]),m=c[0],_=c[1],f=i.useRef(0),p=i.useRef(null);i.useEffect((function(){p.current&&(p.current(),p.current=null)}),[m]);var y=i.useRef(!1),g=i.useRef(null),v=i.useRef(null),M=i.useRef(null);i.useEffect((function(){return function(){clearTimeout(g.current)}}),[]);var b=i.useCallback((function(e){var t=e.pulsate,n=e.rippleX,r=e.rippleY,a=e.rippleSize,o=e.cb;_((function(e){return[].concat((0,h.A)(e),[i.createElement(Y,{key:f.current,classes:d,timeout:550,pulsate:t,rippleX:n,rippleY:r,rippleSize:a})])})),f.current+=1,p.current=o}),[d]),L=i.useCallback((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,r=t.pulsate,a=void 0!==r&&r,i=t.center,s=void 0===i?o||t.pulsate:i,d=t.fakeElement,l=void 0!==d&&d;if("mousedown"===e.type&&y.current)y.current=!1;else{"touchstart"===e.type&&(y.current=!0);var u,c,h,m=l?null:M.current,_=m?m.getBoundingClientRect():{width:0,height:0,left:0,top:0};if(s||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)u=Math.round(_.width/2),c=Math.round(_.height/2);else{var f=e.touches?e.touches[0]:e,p=f.clientX,L=f.clientY;u=Math.round(p-_.left),c=Math.round(L-_.top)}if(s)(h=Math.sqrt((2*Math.pow(_.width,2)+Math.pow(_.height,2))/3))%2==0&&(h+=1);else{var k=2*Math.max(Math.abs((m?m.clientWidth:0)-u),u)+2,w=2*Math.max(Math.abs((m?m.clientHeight:0)-c),c)+2;h=Math.sqrt(Math.pow(k,2)+Math.pow(w,2))}e.touches?null===v.current&&(v.current=function(){b({pulsate:a,rippleX:u,rippleY:c,rippleSize:h,cb:n})},g.current=setTimeout((function(){v.current&&(v.current(),v.current=null)}),80)):b({pulsate:a,rippleX:u,rippleY:c,rippleSize:h,cb:n})}}),[o,b]),k=i.useCallback((function(){L({},{pulsate:!0})}),[L]),x=i.useCallback((function(e,t){if(clearTimeout(g.current),"touchend"===e.type&&v.current)return e.persist(),v.current(),v.current=null,void(g.current=setTimeout((function(){x(e,t)})));v.current=null,_((function(e){return e.length>0?e.slice(1):e})),p.current=t}),[]);return i.useImperativeHandle(t,(function(){return{pulsate:k,start:L,stop:x}}),[k,L,x]),i.createElement("span",(0,r.A)({className:(0,s.A)(d.root,l),ref:M},u),i.createElement(w,{component:null,exit:!0},m))}));const T=(0,u.A)((function(e){return{root:{overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"},ripple:{opacity:0,position:"absolute"},rippleVisible:{opacity:.3,transform:"scale(1)",animation:"$enter ".concat(550,"ms ").concat(e.transitions.easing.easeInOut)},ripplePulsate:{animationDuration:"".concat(e.transitions.duration.shorter,"ms")},child:{opacity:1,display:"block",width:"100%",height:"100%",borderRadius:"50%",backgroundColor:"currentColor"},childLeaving:{opacity:0,animation:"$exit ".concat(550,"ms ").concat(e.transitions.easing.easeInOut)},childPulsate:{position:"absolute",left:0,top:0,animation:"$pulsate 2500ms ".concat(e.transitions.easing.easeInOut," 200ms infinite")},"@keyframes enter":{"0%":{transform:"scale(0)",opacity:.1},"100%":{transform:"scale(1)",opacity:.3}},"@keyframes exit":{"0%":{opacity:1},"100%":{opacity:0}},"@keyframes pulsate":{"0%":{transform:"scale(1)"},"50%":{transform:"scale(0.92)"},"100%":{transform:"scale(1)"}}}}),{flip:!1,name:"MuiTouchRipple"})(i.memo(D));var S=i.forwardRef((function(e,t){var n=e.action,u=e.buttonRef,h=e.centerRipple,m=void 0!==h&&h,_=e.children,f=e.classes,p=e.className,y=e.component,g=void 0===y?"button":y,v=e.disabled,M=void 0!==v&&v,b=e.disableRipple,L=void 0!==b&&b,k=e.disableTouchRipple,w=void 0!==k&&k,x=e.focusRipple,Y=void 0!==x&&x,D=e.focusVisibleClassName,S=e.onBlur,A=e.onClick,H=e.onFocus,P=e.onFocusVisible,j=e.onKeyDown,O=e.onKeyUp,C=e.onMouseDown,E=e.onMouseLeave,R=e.onMouseUp,F=e.onTouchEnd,W=e.onTouchMove,z=e.onTouchStart,I=e.onDragLeave,N=e.tabIndex,B=void 0===N?0:N,V=e.TouchRippleProps,U=e.type,$=void 0===U?"button":U,J=(0,a.A)(e,["action","buttonRef","centerRipple","children","classes","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","onBlur","onClick","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","onDragLeave","tabIndex","TouchRippleProps","type"]),q=i.useRef(null),G=i.useRef(null),K=i.useState(!1),X=K[0],Z=K[1];M&&X&&Z(!1);var Q=(0,c.A)(),ee=Q.isFocusVisible,te=Q.onBlurVisible,ne=Q.ref;function re(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:w;return(0,l.A)((function(r){return t&&t(r),!n&&G.current&&G.current[e](r),!0}))}i.useImperativeHandle(n,(function(){return{focusVisible:function(){Z(!0),q.current.focus()}}}),[]),i.useEffect((function(){X&&Y&&!L&&G.current.pulsate()}),[L,Y,X]);var ae=re("start",C),ie=re("stop",I),oe=re("stop",R),se=re("stop",(function(e){X&&e.preventDefault(),E&&E(e)})),de=re("start",z),le=re("stop",F),ue=re("stop",W),ce=re("stop",(function(e){X&&(te(e),Z(!1)),S&&S(e)}),!1),he=(0,l.A)((function(e){q.current||(q.current=e.currentTarget),ee(e)&&(Z(!0),P&&P(e)),H&&H(e)})),me=function(){var e=o.findDOMNode(q.current);return g&&"button"!==g&&!("A"===e.tagName&&e.href)},_e=i.useRef(!1),fe=(0,l.A)((function(e){Y&&!_e.current&&X&&G.current&&" "===e.key&&(_e.current=!0,e.persist(),G.current.stop(e,(function(){G.current.start(e)}))),e.target===e.currentTarget&&me()&&" "===e.key&&e.preventDefault(),j&&j(e),e.target===e.currentTarget&&me()&&"Enter"===e.key&&!M&&(e.preventDefault(),A&&A(e))})),pe=(0,l.A)((function(e){Y&&" "===e.key&&G.current&&X&&!e.defaultPrevented&&(_e.current=!1,e.persist(),G.current.stop(e,(function(){G.current.pulsate(e)}))),O&&O(e),A&&e.target===e.currentTarget&&me()&&" "===e.key&&!e.defaultPrevented&&A(e)})),ye=g;"button"===ye&&J.href&&(ye="a");var ge={};"button"===ye?(ge.type=$,ge.disabled=M):("a"===ye&&J.href||(ge.role="button"),ge["aria-disabled"]=M);var ve=(0,d.A)(u,t),Me=(0,d.A)(ne,q),be=(0,d.A)(ve,Me),Le=i.useState(!1),ke=Le[0],we=Le[1];i.useEffect((function(){we(!0)}),[]);var xe=ke&&!L&&!M;return i.createElement(ye,(0,r.A)({className:(0,s.A)(f.root,p,X&&[f.focusVisible,D],M&&f.disabled),onBlur:ce,onClick:A,onFocus:he,onKeyDown:fe,onKeyUp:pe,onMouseDown:ae,onMouseLeave:se,onMouseUp:oe,onDragLeave:ie,onTouchEnd:le,onTouchMove:ue,onTouchStart:de,ref:be,tabIndex:M?-1:B},ge,J),_,xe?i.createElement(T,(0,r.A)({ref:G,center:m},V)):null)}));const A=(0,u.A)({root:{display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle","-moz-appearance":"none","-webkit-appearance":"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},"&$disabled":{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}},disabled:{},focusVisible:{}},{name:"MuiButtonBase"})(S)},6746:(e,t,n)=>{"use strict";n.d(t,{A:()=>h});var r=n(45),a=n(8168),i=n(5370),o=n(53),s=n(8173),d=n(9773),l=n(412),u=n(7515),c=i.forwardRef((function(e,t){var n=e.children,s=e.classes,d=e.className,c=e.color,h=void 0===c?"default":c,m=e.component,_=void 0===m?"button":m,f=e.disabled,p=void 0!==f&&f,y=e.disableElevation,g=void 0!==y&&y,v=e.disableFocusRipple,M=void 0!==v&&v,b=e.endIcon,L=e.focusVisibleClassName,k=e.fullWidth,w=void 0!==k&&k,x=e.size,Y=void 0===x?"medium":x,D=e.startIcon,T=e.type,S=void 0===T?"button":T,A=e.variant,H=void 0===A?"text":A,P=(0,r.A)(e,["children","classes","className","color","component","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"]),j=D&&i.createElement("span",{className:(0,o.A)(s.startIcon,s["iconSize".concat((0,u.A)(Y))])},D),O=b&&i.createElement("span",{className:(0,o.A)(s.endIcon,s["iconSize".concat((0,u.A)(Y))])},b);return i.createElement(l.A,(0,a.A)({className:(0,o.A)(s.root,s[H],d,"inherit"===h?s.colorInherit:"default"!==h&&s["".concat(H).concat((0,u.A)(h))],"medium"!==Y&&[s["".concat(H,"Size").concat((0,u.A)(Y))],s["size".concat((0,u.A)(Y))]],g&&s.disableElevation,p&&s.disabled,w&&s.fullWidth),component:_,disabled:p,focusRipple:!M,focusVisibleClassName:(0,o.A)(s.focusVisible,L),ref:t,type:S},P),i.createElement("span",{className:s.label},j,n,O))}));const h=(0,s.A)((function(e){return{root:(0,a.A)({},e.typography.button,{boxSizing:"border-box",minWidth:64,padding:"6px 16px",borderRadius:e.shape.borderRadius,color:e.palette.text.primary,transition:e.transitions.create(["background-color","box-shadow","border"],{duration:e.transitions.duration.short}),"&:hover":{textDecoration:"none",backgroundColor:(0,d.X4)(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"},"&$disabled":{backgroundColor:"transparent"}},"&$disabled":{color:e.palette.action.disabled}}),label:{width:"100%",display:"inherit",alignItems:"inherit",justifyContent:"inherit"},text:{padding:"6px 8px"},textPrimary:{color:e.palette.primary.main,"&:hover":{backgroundColor:(0,d.X4)(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},textSecondary:{color:e.palette.secondary.main,"&:hover":{backgroundColor:(0,d.X4)(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},outlined:{padding:"5px 15px",border:"1px solid ".concat("light"===e.palette.type?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"),"&$disabled":{border:"1px solid ".concat(e.palette.action.disabledBackground)}},outlinedPrimary:{color:e.palette.primary.main,border:"1px solid ".concat((0,d.X4)(e.palette.primary.main,.5)),"&:hover":{border:"1px solid ".concat(e.palette.primary.main),backgroundColor:(0,d.X4)(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},outlinedSecondary:{color:e.palette.secondary.main,border:"1px solid ".concat((0,d.X4)(e.palette.secondary.main,.5)),"&:hover":{border:"1px solid ".concat(e.palette.secondary.main),backgroundColor:(0,d.X4)(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"&$disabled":{border:"1px solid ".concat(e.palette.action.disabled)}},contained:{color:e.palette.getContrastText(e.palette.grey[300]),backgroundColor:e.palette.grey[300],boxShadow:e.shadows[2],"&:hover":{backgroundColor:e.palette.grey.A100,boxShadow:e.shadows[4],"@media (hover: none)":{boxShadow:e.shadows[2],backgroundColor:e.palette.grey[300]},"&$disabled":{backgroundColor:e.palette.action.disabledBackground}},"&$focusVisible":{boxShadow:e.shadows[6]},"&:active":{boxShadow:e.shadows[8]},"&$disabled":{color:e.palette.action.disabled,boxShadow:e.shadows[0],backgroundColor:e.palette.action.disabledBackground}},containedPrimary:{color:e.palette.primary.contrastText,backgroundColor:e.palette.primary.main,"&:hover":{backgroundColor:e.palette.primary.dark,"@media (hover: none)":{backgroundColor:e.palette.primary.main}}},containedSecondary:{color:e.palette.secondary.contrastText,backgroundColor:e.palette.secondary.main,"&:hover":{backgroundColor:e.palette.secondary.dark,"@media (hover: none)":{backgroundColor:e.palette.secondary.main}}},disableElevation:{boxShadow:"none","&:hover":{boxShadow:"none"},"&$focusVisible":{boxShadow:"none"},"&:active":{boxShadow:"none"},"&$disabled":{boxShadow:"none"}},focusVisible:{},disabled:{},colorInherit:{color:"inherit",borderColor:"currentColor"},textSizeSmall:{padding:"4px 5px",fontSize:e.typography.pxToRem(1