@sjvair/monitor-map 1.4.12 → 1.5.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/{MonitorDetails-5647ae43.js → MonitorDetails-5ecb9e44.js} +1 -1
- package/dist/assets/MonitorsWorker-31dbb101.js +1 -0
- package/dist/assets/{requests-430c24ab.js → requests-9d5bc9f9.js} +1 -1
- package/dist/sjvairMonitorMap.js +1 -1
- package/package.json +1 -1
- package/dist/assets/MonitorsWorker-3067f7ab.js +0 -1
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var __defProp=Object.defineProperty,__defNormalProp=(t,e,n)=>e in t?__defProp(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,__publicField=(t,e,n)=>(__defNormalProp(t,"symbol"!=typeof e?e+"":e,n),n);!function(){"use strict";class t{constructor(t){__publicField(this,"id"),__publicField(this,"error"),__publicField(this,"success"),__publicField(this,"payload"),this.id=t}pass(t){this.success=!0,this.payload=t}fail(t){this.success=!1,this.error=t}}function e(t,e,n){return Math.min(Math.max(t,n),e)}class n extends Error{constructor(t){super(`Failed to parse color: "${t}"`)}}var r=n;function o(t){if("string"!=typeof t)throw new r(t);if("transparent"===t.trim().toLowerCase())return[0,0,0,0];let n=t.trim();n=d.test(t)?function(t){const e=t.toLowerCase().trim(),n=s[function(t){let e=5381,n=t.length;for(;n;)e=33*e^t.charCodeAt(--n);return(e>>>0)%2341}(e)];if(!n)throw new r(t);return`#${n}`}(t):t;const o=c.exec(n);if(o){const t=Array.from(o).slice(1);return[...t.slice(0,3).map((t=>parseInt(a(t,2),16))),parseInt(a(t[3]||"f",2),16)/255]}const i=u.exec(n);if(i){const t=Array.from(i).slice(1);return[...t.slice(0,3).map((t=>parseInt(t,16))),parseInt(t[3]||"ff",16)/255]}const h=l.exec(n);if(h){const t=Array.from(h).slice(1);return[...t.slice(0,3).map((t=>parseInt(t,10))),parseFloat(t[3]||"1")]}const m=f.exec(n);if(m){const[n,o,i,s]=Array.from(m).slice(1).map(parseFloat);if(e(0,100,o)!==o)throw new r(t);if(e(0,100,i)!==i)throw new r(t);return[...p(n,o,i),Number.isNaN(s)?1:s]}throw new r(t)}const i=t=>parseInt(t.replace(/_/g,""),36),s="1q29ehhb 1n09sgk7 1kl1ekf_ _yl4zsno 16z9eiv3 1p29lhp8 _bd9zg04 17u0____ _iw9zhe5 _to73___ _r45e31e _7l6g016 _jh8ouiv _zn3qba8 1jy4zshs 11u87k0u 1ro9yvyo 1aj3xael 1gz9zjz0 _3w8l4xo 1bf1ekf_ _ke3v___ _4rrkb__ 13j776yz _646mbhl _nrjr4__ _le6mbhl 1n37ehkb _m75f91n _qj3bzfz 1939yygw 11i5z6x8 _1k5f8xs 1509441m 15t5lwgf _ae2th1n _tg1ugcv 1lp1ugcv 16e14up_ _h55rw7n _ny9yavn _7a11xb_ 1ih442g9 _pv442g9 1mv16xof 14e6y7tu 1oo9zkds 17d1cisi _4v9y70f _y98m8kc 1019pq0v 12o9zda8 _348j4f4 1et50i2o _8epa8__ _ts6senj 1o350i2o 1mi9eiuo 1259yrp0 1ln80gnw _632xcoy 1cn9zldc _f29edu4 1n490c8q _9f9ziet 1b94vk74 _m49zkct 1kz6s73a 1eu9dtog _q58s1rz 1dy9sjiq __u89jo3 _aj5nkwg _ld89jo3 13h9z6wx _qa9z2ii _l119xgq _bs5arju 1hj4nwk9 1qt4nwk9 1ge6wau6 14j9zlcw 11p1edc_ _ms1zcxe _439shk6 _jt9y70f _754zsow 1la40eju _oq5p___ _x279qkz 1fa5r3rv _yd2d9ip _424tcku _8y1di2_ _zi2uabw _yy7rn9h 12yz980_ __39ljp6 1b59zg0x _n39zfzp 1fy9zest _b33k___ _hp9wq92 1il50hz4 _io472ub _lj9z3eo 19z9ykg0 _8t8iu3a 12b9bl4a 1ak5yw0o _896v4ku _tb8k8lv _s59zi6t _c09ze0p 1lg80oqn 1id9z8wb _238nba5 1kq6wgdi _154zssg _tn3zk49 _da9y6tc 1sg7cv4f _r12jvtt 1gq5fmkz 1cs9rvci _lp9jn1c _xw1tdnb 13f9zje6 16f6973h _vo7ir40 _bt5arjf _rc45e4t _hr4e100 10v4e100 _hc9zke2 _w91egv_ _sj2r1kk 13c87yx8 _vqpds__ _ni8ggk8 _tj9yqfb 1ia2j4r4 _7x9b10u 1fc9ld4j 1eq9zldr _5j9lhpx _ez9zl6o _md61fzm".split(" ").reduce(((t,e)=>{const n=i(e.substring(0,3)),r=i(e.substring(3)).toString(16);let o="";for(let i=0;i<6-r.length;i++)o+="0";return t[n]=`${o}${r}`,t}),{});const a=(t,e)=>Array.from(Array(e)).map((()=>t)).join(""),c=new RegExp(`^#${a("([a-f0-9])",3)}([a-f0-9])?$`,"i"),u=new RegExp(`^#${a("([a-f0-9]{2})",3)}([a-f0-9]{2})?$`,"i"),l=new RegExp(`^rgba?\\(\\s*(\\d+)\\s*${a(",\\s*(\\d+)\\s*",2)}(?:,\\s*([\\d.]+))?\\s*\\)$`,"i"),f=/^hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%(?:\s*,\s*([\d.]+))?\s*\)$/i,d=/^[a-z]+$/i,h=t=>Math.round(255*t),p=(t,e,n)=>{let r=n/100;if(0===e)return[r,r,r].map(h);const o=(t%360+360)%360/60,i=(1-Math.abs(2*r-1))*(e/100),s=i*(1-Math.abs(o%2-1));let a=0,c=0,u=0;o>=0&&o<1?(a=i,c=s):o>=1&&o<2?(a=s,c=i):o>=2&&o<3?(c=i,u=s):o>=3&&o<4?(c=s,u=i):o>=4&&o<5?(a=s,u=i):o>=5&&o<6&&(a=i,u=s);const l=r-i/2;return[a+l,c+l,u+l].map(h)};function m(t,n){const[r,i,s,a]=function(t){const[e,n,r,i]=o(t).map(((t,e)=>3===e?t:t/255)),s=Math.max(e,n,r),a=Math.min(e,n,r),c=(s+a)/2;if(s===a)return[0,0,c,i];const u=s-a;return[60*(e===s?(n-r)/u+(n<r?6:0):n===s?(r-e)/u+2:(e-n)/u+4),c>.5?u/(2-s-a):u/(s+a),c,i]}(t);return function(t,n,r,o){return`hsla(${(t%360).toFixed()}, ${e(0,100,100*n).toFixed()}%, ${e(0,100,100*r).toFixed()}%, ${parseFloat(e(0,1,o).toFixed(3))})`}(r,i,s-n,a)}function y(t,n,r){const i=(t,e)=>3===e?t:t/255,[s,a,c,u]=o(t).map(i),[l,f,d,h]=o(n).map(i),p=h-u,m=2*r-1,y=((m*p==-1?m:m+p/(1+m*p))+1)/2,g=1-y;return b=255*(a*g+f*y),_=255*(c*g+d*y),w=h*r+u*(1-r),`rgba(${e(0,255,255*(s*g+l*y)).toFixed()}, ${e(0,255,b).toFixed()}, ${e(0,255,_).toFixed()}, ${parseFloat(e(0,1,w).toFixed(3))})`;var b,_,w}function g(t){const[n,r,i,s]=o(t);let a=t=>{const n=e(0,255,t).toString(16);return 1===n.length?`0${n}`:n};return`#${a(n)}${a(r)}${a(i)}${s<1?a(Math.round(255*s)):""}`}const b="969696",_="000000",w="00e400",v="ffff00",O="ff7e00",$="ff0000",S="8f3f97",E="7e0023";function x(t,e){const n=e[e.length-1];if(t>=n.min)return`#${n.color}`;if(t<=0)return`#${e[0].color}`;for(let r=0;r<=e.length-1;r++)if(e[r].min>t){const n=e[r-1],o=e[r],i=n.min===-1/0?o.min:o.min-n.min,s=(i-(o.min-t))/i;return y(`#${n.color}`,`#${o.color}`,s)}return"#FFFFFF"}const M=class t{constructor(e,n,r,o){__publicField(this,"label"),__publicField(this,"latest"),__publicField(this,"levels",t.levels),__publicField(this,"name"),__publicField(this,"updateDuration"),this.label=n,this.name=e,this.updateDuration=r,o.latest&&this.name in o.latest&&(this.latest=Math.round(parseFloat(o.latest[this.name])))}};__publicField(M,"levels",[{min:-1/0,color:w},{min:12,color:v},{min:35,color:O},{min:55,color:$},{min:150,color:S},{min:250,color:E}]);let T=M;function A(t){switch(t.device){case"AirNow":return function(t){return j(["pm25","PM 2.5","60m",t],["pm100","PM 10","60M",t])}(t);case"BAM1022":return function(t){return j(["pm25","PM 2.5","60m",t])}(t);case"PurpleAir":return function(t){return j(["pm10","PM 1.0","2m",t],["pm25","PM 2.5","2m",t],["pm25_avg_15","PM 2.5","15m",t],["pm25_avg_60","PM 2.5","60m",t],["pm100","PM 10","",t])}(t)}}function j(...t){const e={};for(let n of t)e[n[0]]=new T(...n);return e}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function D(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var R={exports:{}};R.exports=function(){var t=1e3,e=6e4,n=36e5,r="millisecond",o="second",i="minute",s="hour",a="day",c="week",u="month",l="quarter",f="year",d="date",h="Invalid Date",p=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,m=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,y={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],n=t%100;return"["+t+(e[(n-20)%10]||e[n]||e[0])+"]"}},g=function(t,e,n){var r=String(t);return!r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},b={s:g,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),o=n%60;return(e<=0?"+":"-")+g(r,2,"0")+":"+g(o,2,"0")},m:function t(e,n){if(e.date()<n.date())return-t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),o=e.clone().add(r,u),i=n-o<0,s=e.clone().add(r+(i?-1:1),u);return+(-(r+(n-o)/(i?o-s:s-o))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:u,y:f,w:c,d:a,D:d,h:s,m:i,s:o,ms:r,Q:l}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},_="en",w={};w[_]=y;var v=function(t){return t instanceof E},O=function t(e,n,r){var o;if(!e)return _;if("string"==typeof e){var i=e.toLowerCase();w[i]&&(o=i),n&&(w[i]=n,o=i);var s=e.split("-");if(!o&&s.length>1)return t(s[0])}else{var a=e.name;w[a]=e,o=a}return!r&&o&&(_=o),o||!r&&_},$=function(t,e){if(v(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new E(n)},S=b;S.l=O,S.i=v,S.w=function(t,e){return $(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var E=function(){function y(t){this.$L=O(t.locale,null,!0),this.parse(t)}var g=y.prototype;return g.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(S.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match(p);if(r){var o=r[2]-1||0,i=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],o,r[3]||1,r[4]||0,r[5]||0,r[6]||0,i)):new Date(r[1],o,r[3]||1,r[4]||0,r[5]||0,r[6]||0,i)}}return new Date(e)}(t),this.$x=t.x||{},this.init()},g.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},g.$utils=function(){return S},g.isValid=function(){return!(this.$d.toString()===h)},g.isSame=function(t,e){var n=$(t);return this.startOf(e)<=n&&n<=this.endOf(e)},g.isAfter=function(t,e){return $(t)<this.startOf(e)},g.isBefore=function(t,e){return this.endOf(e)<$(t)},g.$g=function(t,e,n){return S.u(t)?this[e]:this.set(n,t)},g.unix=function(){return Math.floor(this.valueOf()/1e3)},g.valueOf=function(){return this.$d.getTime()},g.startOf=function(t,e){var n=this,r=!!S.u(e)||e,l=S.p(t),h=function(t,e){var o=S.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?o:o.endOf(a)},p=function(t,e){return S.w(n.toDate()[t].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},m=this.$W,y=this.$M,g=this.$D,b="set"+(this.$u?"UTC":"");switch(l){case f:return r?h(1,0):h(31,11);case u:return r?h(1,y):h(0,y+1);case c:var _=this.$locale().weekStart||0,w=(m<_?m+7:m)-_;return h(r?g-w:g+(6-w),y);case a:case d:return p(b+"Hours",0);case s:return p(b+"Minutes",1);case i:return p(b+"Seconds",2);case o:return p(b+"Milliseconds",3);default:return this.clone()}},g.endOf=function(t){return this.startOf(t,!1)},g.$set=function(t,e){var n,c=S.p(t),l="set"+(this.$u?"UTC":""),h=(n={},n[a]=l+"Date",n[d]=l+"Date",n[u]=l+"Month",n[f]=l+"FullYear",n[s]=l+"Hours",n[i]=l+"Minutes",n[o]=l+"Seconds",n[r]=l+"Milliseconds",n)[c],p=c===a?this.$D+(e-this.$W):e;if(c===u||c===f){var m=this.clone().set(d,1);m.$d[h](p),m.init(),this.$d=m.set(d,Math.min(this.$D,m.daysInMonth())).$d}else h&&this.$d[h](p);return this.init(),this},g.set=function(t,e){return this.clone().$set(t,e)},g.get=function(t){return this[S.p(t)]()},g.add=function(r,l){var d,h=this;r=Number(r);var p=S.p(l),m=function(t){var e=$(h);return S.w(e.date(e.date()+Math.round(t*r)),h)};if(p===u)return this.set(u,this.$M+r);if(p===f)return this.set(f,this.$y+r);if(p===a)return m(1);if(p===c)return m(7);var y=(d={},d[i]=e,d[s]=n,d[o]=t,d)[p]||1,g=this.$d.getTime()+r*y;return S.w(g,this)},g.subtract=function(t,e){return this.add(-1*t,e)},g.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||h;var r=t||"YYYY-MM-DDTHH:mm:ssZ",o=S.z(this),i=this.$H,s=this.$m,a=this.$M,c=n.weekdays,u=n.months,l=n.meridiem,f=function(t,n,o,i){return t&&(t[n]||t(e,r))||o[n].slice(0,i)},d=function(t){return S.s(i%12||12,t,"0")},p=l||function(t,e,n){var r=t<12?"AM":"PM";return n?r.toLowerCase():r};return r.replace(m,(function(t,r){return r||function(t){switch(t){case"YY":return String(e.$y).slice(-2);case"YYYY":return S.s(e.$y,4,"0");case"M":return a+1;case"MM":return S.s(a+1,2,"0");case"MMM":return f(n.monthsShort,a,u,3);case"MMMM":return f(u,a);case"D":return e.$D;case"DD":return S.s(e.$D,2,"0");case"d":return String(e.$W);case"dd":return f(n.weekdaysMin,e.$W,c,2);case"ddd":return f(n.weekdaysShort,e.$W,c,3);case"dddd":return c[e.$W];case"H":return String(i);case"HH":return S.s(i,2,"0");case"h":return d(1);case"hh":return d(2);case"a":return p(i,s,!0);case"A":return p(i,s,!1);case"m":return String(s);case"mm":return S.s(s,2,"0");case"s":return String(e.$s);case"ss":return S.s(e.$s,2,"0");case"SSS":return S.s(e.$ms,3,"0");case"Z":return o}return null}(t)||o.replace(":","")}))},g.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},g.diff=function(r,d,h){var p,m=this,y=S.p(d),g=$(r),b=(g.utcOffset()-this.utcOffset())*e,_=this-g,w=function(){return S.m(m,g)};switch(y){case f:p=w()/12;break;case u:p=w();break;case l:p=w()/3;break;case c:p=(_-b)/6048e5;break;case a:p=(_-b)/864e5;break;case s:p=_/n;break;case i:p=_/e;break;case o:p=_/t;break;default:p=_}return h?p:S.a(p)},g.daysInMonth=function(){return this.endOf(u).$D},g.$locale=function(){return w[this.$L]},g.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=O(t,e,!0);return r&&(n.$L=r),n},g.clone=function(){return S.w(this.$d,this)},g.toDate=function(){return new Date(this.valueOf())},g.toJSON=function(){return this.isValid()?this.toISOString():null},g.toISOString=function(){return this.$d.toISOString()},g.toString=function(){return this.$d.toUTCString()},y}(),x=E.prototype;return $.prototype=x,[["$ms",r],["$s",o],["$m",i],["$H",s],["$W",a],["$M",u],["$y",f],["$D",d]].forEach((function(t){x[t[1]]=function(e){return this.$g(e,t[0],t[1])}})),$.extend=function(t,e){return t.$i||(t(e,E,$),t.$i=!0),$},$.locale=O,$.isDayjs=v,$.unix=function(t){return $(1e3*t)},$.en=w[_],$.Ls=w,$.p={},$}();var F=D(R.exports),N={exports:{}};!function(t,e){t.exports=function(t,e,n){t=t||{};var r=e.prototype,o={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function i(t,e,n,o){return r.fromToBase(t,e,n,o)}n.en.relativeTime=o,r.fromToBase=function(e,r,i,s,a){for(var c,u,l,f=i.$locale().relativeTime||o,d=t.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],h=d.length,p=0;p<h;p+=1){var m=d[p];m.d&&(c=s?n(e).diff(i,m.d,!0):i.diff(e,m.d,!0));var y=(t.rounding||Math.round)(Math.abs(c));if(l=c>0,y<=m.r||!m.r){y<=1&&p>0&&(m=d[p-1]);var g=f[m.l];a&&(y=a(""+y)),u="string"==typeof g?g.replace("%d",y):g(y,r,m.l,l);break}}if(r)return u;var b=l?f.future:f.past;return"function"==typeof b?b(u):b.replace("%s",u)},r.to=function(t,e){return i(t,e,this,!0)},r.from=function(t,e){return i(t,e,this)};var s=function(t){return t.$u?n.utc():n()};r.toNow=function(t){return this.to(s(this),t)},r.fromNow=function(t){return this.from(s(this),t)}}}(N);var k=D(N.exports),C={exports:{}};!function(t,e){var n,r;t.exports=(n={year:0,month:1,day:2,hour:3,minute:4,second:5},r={},function(t,e,o){var i,s=function(t,e,n){void 0===n&&(n={});var o=new Date(t);return function(t,e){void 0===e&&(e={});var n=e.timeZoneName||"short",o=t+"|"+n,i=r[o];return i||(i=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:t,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:n}),r[o]=i),i}(e,n).formatToParts(o)},a=function(t,e){for(var r=s(t,e),i=[],a=0;a<r.length;a+=1){var c=r[a],u=c.type,l=c.value,f=n[u];f>=0&&(i[f]=parseInt(l,10))}var d=i[3],h=24===d?0:d,p=i[0]+"-"+i[1]+"-"+i[2]+" "+h+":"+i[4]+":"+i[5]+":000",m=+t;return(o.utc(p).valueOf()-(m-=m%1e3))/6e4},c=e.prototype;c.tz=function(t,e){void 0===t&&(t=i);var n=this.utcOffset(),r=this.toDate(),s=r.toLocaleString("en-US",{timeZone:t}),a=Math.round((r-new Date(s))/1e3/60),c=o(s).$set("millisecond",this.$ms).utcOffset(15*-Math.round(r.getTimezoneOffset()/15)-a,!0);if(e){var u=c.utcOffset();c=c.add(n-u,"minute")}return c.$x.$timezone=t,c},c.offsetName=function(t){var e=this.$x.$timezone||o.tz.guess(),n=s(this.valueOf(),e,{timeZoneName:t}).find((function(t){return"timezonename"===t.type.toLowerCase()}));return n&&n.value};var u=c.startOf;c.startOf=function(t,e){if(!this.$x||!this.$x.$timezone)return u.call(this,t,e);var n=o(this.format("YYYY-MM-DD HH:mm:ss:SSS"));return u.call(n,t,e).tz(this.$x.$timezone,!0)},o.tz=function(t,e,n){var r=n&&e,s=n||e||i,c=a(+o(),s);if("string"!=typeof t)return o(t).tz(s);var u=function(t,e,n){var r=t-60*e*1e3,o=a(r,n);if(e===o)return[r,e];var i=a(r-=60*(o-e)*1e3,n);return o===i?[r,o]:[t-60*Math.min(o,i)*1e3,Math.max(o,i)]}(o.utc(t,r).valueOf(),c,s),l=u[0],f=u[1],d=o(l).utcOffset(f);return d.$x.$timezone=s,d},o.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},o.tz.setDefault=function(t){i=t}})}(C);var z=D(C.exports),P={exports:{}};!function(t,e){var n,r,o;t.exports=(n="minute",r=/[+-]\d\d(?::?\d\d)?/g,o=/([+-]|\d\d)/g,function(t,e,i){var s=e.prototype;i.utc=function(t){return new e({date:t,utc:!0,args:arguments})},s.utc=function(t){var e=i(this.toDate(),{locale:this.$L,utc:!0});return t?e.add(this.utcOffset(),n):e},s.local=function(){return i(this.toDate(),{locale:this.$L,utc:!1})};var a=s.parse;s.parse=function(t){t.utc&&(this.$u=!0),this.$utils().u(t.$offset)||(this.$offset=t.$offset),a.call(this,t)};var c=s.init;s.init=function(){if(this.$u){var t=this.$d;this.$y=t.getUTCFullYear(),this.$M=t.getUTCMonth(),this.$D=t.getUTCDate(),this.$W=t.getUTCDay(),this.$H=t.getUTCHours(),this.$m=t.getUTCMinutes(),this.$s=t.getUTCSeconds(),this.$ms=t.getUTCMilliseconds()}else c.call(this)};var u=s.utcOffset;s.utcOffset=function(t,e){var i=this.$utils().u;if(i(t))return this.$u?0:i(this.$offset)?u.call(this):this.$offset;if("string"==typeof t&&null===(t=function(t){void 0===t&&(t="");var e=t.match(r);if(!e)return null;var n=(""+e[0]).match(o)||["-",0,0],i=n[0],s=60*+n[1]+ +n[2];return 0===s?0:"+"===i?s:-s}(t)))return this;var s=Math.abs(t)<=16?60*t:t,a=this;if(e)return a.$offset=s,a.$u=0===t,a;if(0!==t){var c=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(a=this.local().add(s+c,n)).$offset=s,a.$x.$localOffset=c}else a=this.utc();return a};var l=s.format;s.format=function(t){var e=t||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return l.call(this,e)},s.valueOf=function(){var t=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*t},s.isUTC=function(){return!!this.$u},s.toISOString=function(){return this.toDate().toISOString()},s.toString=function(){return this.toDate().toUTCString()};var f=s.toDate;s.toDate=function(t){return"s"===t&&this.$offset?i(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():f.call(this)};var d=s.diff;s.diff=function(t,e,n){if(t&&this.$u===t.$u)return d.call(this,t,e,n);var r=this.local(),o=i(t).local();return d.call(r,o,e,n)}})}(P);var U=D(P.exports);F.$defaultFormat=function(t){return F.utc(t).format("YYYY-MM-DD HH:mm:ss")},F.$prettyPrint=function(t){return F(t).format("h:mma dddd MMM DD, YYYY")};F.extend(k),F.extend(z),F.extend(((t,e,n)=>{e.prototype.skewedDiff=function(t,e){const n=Math.abs(this.diff(t))/6e4;return n>e?Math.floor(n):n<e?Math.ceil(n):n}})),F.extend(U);const L=F;function B(t,e){return function(){return t.apply(e,arguments)}}const{toString:q}=Object.prototype,{getPrototypeOf:I}=Object,H=(Y=Object.create(null),t=>{const e=q.call(t);return Y[e]||(Y[e]=e.slice(8,-1).toLowerCase())});var Y;const W=t=>(t=t.toLowerCase(),e=>H(e)===t),J=t=>e=>typeof e===t,{isArray:V}=Array,K=J("undefined");const Z=W("ArrayBuffer");const G=J("string"),X=J("function"),Q=J("number"),tt=t=>null!==t&&"object"==typeof t,et=t=>{if("object"!==H(t))return!1;const e=I(t);return!(null!==e&&e!==Object.prototype&&null!==Object.getPrototypeOf(e)||Symbol.toStringTag in t||Symbol.iterator in t)},nt=W("Date"),rt=W("File"),ot=W("Blob"),it=W("FileList"),st=W("URLSearchParams");function at(t,e,{allOwnKeys:n=!1}={}){if(null==t)return;let r,o;if("object"!=typeof t&&(t=[t]),V(t))for(r=0,o=t.length;r<o;r++)e.call(null,t[r],r,t);else{const o=n?Object.getOwnPropertyNames(t):Object.keys(t),i=o.length;let s;for(r=0;r<i;r++)s=o[r],e.call(null,t[s],s,t)}}function ct(t,e){e=e.toLowerCase();const n=Object.keys(t);let r,o=n.length;for(;o-- >0;)if(r=n[o],e===r.toLowerCase())return r;return null}const ut="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,lt=t=>!K(t)&&t!==ut;const ft=(dt="undefined"!=typeof Uint8Array&&I(Uint8Array),t=>dt&&t instanceof dt);var dt;const ht=W("HTMLFormElement"),pt=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),mt=W("RegExp"),yt=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};at(n,((n,o)=>{!1!==e(n,o,t)&&(r[o]=n)})),Object.defineProperties(t,r)},gt="abcdefghijklmnopqrstuvwxyz",bt="0123456789",_t={DIGIT:bt,ALPHA:gt,ALPHA_DIGIT:gt+gt.toUpperCase()+bt};const wt=W("AsyncFunction");var vt={isArray:V,isArrayBuffer:Z,isBuffer:function(t){return null!==t&&!K(t)&&null!==t.constructor&&!K(t.constructor)&&X(t.constructor.isBuffer)&&t.constructor.isBuffer(t)},isFormData:t=>{let e;return t&&("function"==typeof FormData&&t instanceof FormData||X(t.append)&&("formdata"===(e=H(t))||"object"===e&&X(t.toString)&&"[object FormData]"===t.toString()))},isArrayBufferView:function(t){let e;return e="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&Z(t.buffer),e},isString:G,isNumber:Q,isBoolean:t=>!0===t||!1===t,isObject:tt,isPlainObject:et,isUndefined:K,isDate:nt,isFile:rt,isBlob:ot,isRegExp:mt,isFunction:X,isStream:t=>tt(t)&&X(t.pipe),isURLSearchParams:st,isTypedArray:ft,isFileList:it,forEach:at,merge:function t(){const{caseless:e}=lt(this)&&this||{},n={},r=(r,o)=>{const i=e&&ct(n,o)||o;et(n[i])&&et(r)?n[i]=t(n[i],r):et(r)?n[i]=t({},r):V(r)?n[i]=r.slice():n[i]=r};for(let o=0,i=arguments.length;o<i;o++)arguments[o]&&at(arguments[o],r);return n},extend:(t,e,n,{allOwnKeys:r}={})=>(at(e,((e,r)=>{n&&X(e)?t[r]=B(e,n):t[r]=e}),{allOwnKeys:r}),t),trim:t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:t=>(65279===t.charCodeAt(0)&&(t=t.slice(1)),t),inherits:(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},toFlatObject:(t,e,n,r)=>{let o,i,s;const a={};if(e=e||{},null==t)return e;do{for(o=Object.getOwnPropertyNames(t),i=o.length;i-- >0;)s=o[i],r&&!r(s,t,e)||a[s]||(e[s]=t[s],a[s]=!0);t=!1!==n&&I(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},kindOf:H,kindOfTest:W,endsWith:(t,e,n)=>{t=String(t),(void 0===n||n>t.length)&&(n=t.length),n-=e.length;const r=t.indexOf(e,n);return-1!==r&&r===n},toArray:t=>{if(!t)return null;if(V(t))return t;let e=t.length;if(!Q(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},forEachEntry:(t,e)=>{const n=(t&&t[Symbol.iterator]).call(t);let r;for(;(r=n.next())&&!r.done;){const n=r.value;e.call(t,n[0],n[1])}},matchAll:(t,e)=>{let n;const r=[];for(;null!==(n=t.exec(e));)r.push(n);return r},isHTMLForm:ht,hasOwnProperty:pt,hasOwnProp:pt,reduceDescriptors:yt,freezeMethods:t=>{yt(t,((e,n)=>{if(X(t)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=t[n];X(r)&&(e.enumerable=!1,"writable"in e?e.writable=!1:e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(t,e)=>{const n={},r=t=>{t.forEach((t=>{n[t]=!0}))};return V(t)?r(t):r(String(t).split(e)),n},toCamelCase:t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(t,e,n){return e.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(t,e)=>(t=+t,Number.isFinite(t)?t:e),findKey:ct,global:ut,isContextDefined:lt,ALPHABET:_t,generateString:(t=16,e=_t.ALPHA_DIGIT)=>{let n="";const{length:r}=e;for(;t--;)n+=e[Math.random()*r|0];return n},isSpecCompliantForm:function(t){return!!(t&&X(t.append)&&"FormData"===t[Symbol.toStringTag]&&t[Symbol.iterator])},toJSONObject:t=>{const e=new Array(10),n=(t,r)=>{if(tt(t)){if(e.indexOf(t)>=0)return;if(!("toJSON"in t)){e[r]=t;const o=V(t)?[]:{};return at(t,((t,e)=>{const i=n(t,r+1);!K(i)&&(o[e]=i)})),e[r]=void 0,o}}return t};return n(t,0)},isAsyncFn:wt,isThenable:t=>t&&(tt(t)||X(t))&&X(t.then)&&X(t.catch)};function Ot(t,e,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o)}vt.inherits(Ot,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:vt.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const $t=Ot.prototype,St={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((t=>{St[t]={value:t}})),Object.defineProperties(Ot,St),Object.defineProperty($t,"isAxiosError",{value:!0}),Ot.from=(t,e,n,r,o,i)=>{const s=Object.create($t);return vt.toFlatObject(t,s,(function(t){return t!==Error.prototype}),(t=>"isAxiosError"!==t)),Ot.call(s,t.message,e,n,r,o),s.cause=t,s.name=t.name,i&&Object.assign(s,i),s};function Et(t){return vt.isPlainObject(t)||vt.isArray(t)}function xt(t){return vt.endsWith(t,"[]")?t.slice(0,-2):t}function Mt(t,e,n){return t?t.concat(e).map((function(t,e){return t=xt(t),!n&&e?"["+t+"]":t})).join(n?".":""):e}const Tt=vt.toFlatObject(vt,{},null,(function(t){return/^is[A-Z]/.test(t)}));function At(t,e,n){if(!vt.isObject(t))throw new TypeError("target must be an object");e=e||new FormData;const r=(n=vt.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(t,e){return!vt.isUndefined(e[t])}))).metaTokens,o=n.visitor||u,i=n.dots,s=n.indexes,a=(n.Blob||"undefined"!=typeof Blob&&Blob)&&vt.isSpecCompliantForm(e);if(!vt.isFunction(o))throw new TypeError("visitor must be a function");function c(t){if(null===t)return"";if(vt.isDate(t))return t.toISOString();if(!a&&vt.isBlob(t))throw new Ot("Blob is not supported. Use a Buffer instead.");return vt.isArrayBuffer(t)||vt.isTypedArray(t)?a&&"function"==typeof Blob?new Blob([t]):Buffer.from(t):t}function u(t,n,o){let a=t;if(t&&!o&&"object"==typeof t)if(vt.endsWith(n,"{}"))n=r?n:n.slice(0,-2),t=JSON.stringify(t);else if(vt.isArray(t)&&function(t){return vt.isArray(t)&&!t.some(Et)}(t)||(vt.isFileList(t)||vt.endsWith(n,"[]"))&&(a=vt.toArray(t)))return n=xt(n),a.forEach((function(t,r){!vt.isUndefined(t)&&null!==t&&e.append(!0===s?Mt([n],r,i):null===s?n:n+"[]",c(t))})),!1;return!!Et(t)||(e.append(Mt(o,n,i),c(t)),!1)}const l=[],f=Object.assign(Tt,{defaultVisitor:u,convertValue:c,isVisitable:Et});if(!vt.isObject(t))throw new TypeError("data must be an object");return function t(n,r){if(!vt.isUndefined(n)){if(-1!==l.indexOf(n))throw Error("Circular reference detected in "+r.join("."));l.push(n),vt.forEach(n,(function(n,i){!0===(!(vt.isUndefined(n)||null===n)&&o.call(e,n,vt.isString(i)?i.trim():i,r,f))&&t(n,r?r.concat(i):[i])})),l.pop()}}(t),e}function jt(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,(function(t){return e[t]}))}function Dt(t,e){this._pairs=[],t&&At(t,this,e)}const Rt=Dt.prototype;function Ft(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Nt(t,e,n){if(!e)return t;const r=n&&n.encode||Ft,o=n&&n.serialize;let i;if(i=o?o(e,n):vt.isURLSearchParams(e)?e.toString():new Dt(e,n).toString(r),i){const e=t.indexOf("#");-1!==e&&(t=t.slice(0,e)),t+=(-1===t.indexOf("?")?"?":"&")+i}return t}Rt.append=function(t,e){this._pairs.push([t,e])},Rt.toString=function(t){const e=t?function(e){return t.call(this,e,jt)}:jt;return this._pairs.map((function(t){return e(t[0])+"="+e(t[1])}),"").join("&")};var kt=class{constructor(){this.handlers=[]}use(t,e,n){return this.handlers.push({fulfilled:t,rejected:e,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){vt.forEach(this.handlers,(function(e){null!==e&&t(e)}))}},Ct={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1};var zt={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:Dt,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},isStandardBrowserEnv:(()=>{let t;return("undefined"==typeof navigator||"ReactNative"!==(t=navigator.product)&&"NativeScript"!==t&&"NS"!==t)&&("undefined"!=typeof window&&"undefined"!=typeof document)})(),isStandardBrowserWebWorkerEnv:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,protocols:["http","https","file","blob","url","data"]};function Pt(t){function e(t,n,r,o){let i=t[o++];const s=Number.isFinite(+i),a=o>=t.length;if(i=!i&&vt.isArray(r)?r.length:i,a)return vt.hasOwnProp(r,i)?r[i]=[r[i],n]:r[i]=n,!s;r[i]&&vt.isObject(r[i])||(r[i]=[]);return e(t,n,r[i],o)&&vt.isArray(r[i])&&(r[i]=function(t){const e={},n=Object.keys(t);let r;const o=n.length;let i;for(r=0;r<o;r++)i=n[r],e[i]=t[i];return e}(r[i])),!s}if(vt.isFormData(t)&&vt.isFunction(t.entries)){const n={};return vt.forEachEntry(t,((t,r)=>{e(function(t){return vt.matchAll(/\w+|\[(\w*)]/g,t).map((t=>"[]"===t[0]?"":t[1]||t[0]))}(t),r,n,0)})),n}return null}const Ut={"Content-Type":void 0};const Lt={transitional:Ct,adapter:["xhr","http"],transformRequest:[function(t,e){const n=e.getContentType()||"",r=n.indexOf("application/json")>-1,o=vt.isObject(t);o&&vt.isHTMLForm(t)&&(t=new FormData(t));if(vt.isFormData(t))return r&&r?JSON.stringify(Pt(t)):t;if(vt.isArrayBuffer(t)||vt.isBuffer(t)||vt.isStream(t)||vt.isFile(t)||vt.isBlob(t))return t;if(vt.isArrayBufferView(t))return t.buffer;if(vt.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let i;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(t,e){return At(t,new zt.classes.URLSearchParams,Object.assign({visitor:function(t,e,n,r){return zt.isNode&&vt.isBuffer(t)?(this.append(e,t.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},e))}(t,this.formSerializer).toString();if((i=vt.isFileList(t))||n.indexOf("multipart/form-data")>-1){const e=this.env&&this.env.FormData;return At(i?{"files[]":t}:t,e&&new e,this.formSerializer)}}return o||r?(e.setContentType("application/json",!1),function(t,e,n){if(vt.isString(t))try{return(e||JSON.parse)(t),vt.trim(t)}catch(r){if("SyntaxError"!==r.name)throw r}return(n||JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){const e=this.transitional||Lt.transitional,n=e&&e.forcedJSONParsing,r="json"===this.responseType;if(t&&vt.isString(t)&&(n&&!this.responseType||r)){const n=!(e&&e.silentJSONParsing)&&r;try{return JSON.parse(t)}catch(o){if(n){if("SyntaxError"===o.name)throw Ot.from(o,Ot.ERR_BAD_RESPONSE,this,null,this.response);throw o}}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:zt.classes.FormData,Blob:zt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};vt.forEach(["delete","get","head"],(function(t){Lt.headers[t]={}})),vt.forEach(["post","put","patch"],(function(t){Lt.headers[t]=vt.merge(Ut)}));var Bt=Lt;const qt=vt.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);const It=Symbol("internals");function Ht(t){return t&&String(t).trim().toLowerCase()}function Yt(t){return!1===t||null==t?t:vt.isArray(t)?t.map(Yt):String(t)}function Wt(t,e,n,r,o){return vt.isFunction(r)?r.call(this,e,n):(o&&(e=n),vt.isString(e)?vt.isString(r)?-1!==e.indexOf(r):vt.isRegExp(r)?r.test(e):void 0:void 0)}class Jt{constructor(t){t&&this.set(t)}set(t,e,n){const r=this;function o(t,e,n){const o=Ht(e);if(!o)throw new Error("header name must be a non-empty string");const i=vt.findKey(r,o);(!i||void 0===r[i]||!0===n||void 0===n&&!1!==r[i])&&(r[i||e]=Yt(t))}const i=(t,e)=>vt.forEach(t,((t,n)=>o(t,n,e)));return vt.isPlainObject(t)||t instanceof this.constructor?i(t,e):vt.isString(t)&&(t=t.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim())?i((t=>{const e={};let n,r,o;return t&&t.split("\n").forEach((function(t){o=t.indexOf(":"),n=t.substring(0,o).trim().toLowerCase(),r=t.substring(o+1).trim(),!n||e[n]&&qt[n]||("set-cookie"===n?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)})),e})(t),e):null!=t&&o(e,t,n),this}get(t,e){if(t=Ht(t)){const n=vt.findKey(this,t);if(n){const t=this[n];if(!e)return t;if(!0===e)return function(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}(t);if(vt.isFunction(e))return e.call(this,t,n);if(vt.isRegExp(e))return e.exec(t);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=Ht(t)){const n=vt.findKey(this,t);return!(!n||void 0===this[n]||e&&!Wt(0,this[n],n,e))}return!1}delete(t,e){const n=this;let r=!1;function o(t){if(t=Ht(t)){const o=vt.findKey(n,t);!o||e&&!Wt(0,n[o],o,e)||(delete n[o],r=!0)}}return vt.isArray(t)?t.forEach(o):o(t),r}clear(t){const e=Object.keys(this);let n=e.length,r=!1;for(;n--;){const o=e[n];t&&!Wt(0,this[o],o,t,!0)||(delete this[o],r=!0)}return r}normalize(t){const e=this,n={};return vt.forEach(this,((r,o)=>{const i=vt.findKey(n,o);if(i)return e[i]=Yt(r),void delete e[o];const s=t?function(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((t,e,n)=>e.toUpperCase()+n))}(o):String(o).trim();s!==o&&delete e[o],e[s]=Yt(r),n[s]=!0})),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return vt.forEach(this,((n,r)=>{null!=n&&!1!==n&&(e[r]=t&&vt.isArray(n)?n.join(", "):n)})),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([t,e])=>t+": "+e)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const n=new this(t);return e.forEach((t=>n.set(t))),n}static accessor(t){const e=(this[It]=this[It]={accessors:{}}).accessors,n=this.prototype;function r(t){const r=Ht(t);e[r]||(!function(t,e){const n=vt.toCamelCase(" "+e);["get","set","has"].forEach((r=>{Object.defineProperty(t,r+n,{value:function(t,n,o){return this[r].call(this,e,t,n,o)},configurable:!0})}))}(n,t),e[r]=!0)}return vt.isArray(t)?t.forEach(r):r(t),this}}Jt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),vt.freezeMethods(Jt.prototype),vt.freezeMethods(Jt);var Vt=Jt;function Kt(t,e){const n=this||Bt,r=e||n,o=Vt.from(r.headers);let i=r.data;return vt.forEach(t,(function(t){i=t.call(n,i,o.normalize(),e?e.status:void 0)})),o.normalize(),i}function Zt(t){return!(!t||!t.__CANCEL__)}function Gt(t,e,n){Ot.call(this,null==t?"canceled":t,Ot.ERR_CANCELED,e,n),this.name="CanceledError"}vt.inherits(Gt,Ot,{__CANCEL__:!0});var Xt=zt.isStandardBrowserEnv?{write:function(t,e,n,r,o,i){const s=[];s.push(t+"="+encodeURIComponent(e)),vt.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),vt.isString(r)&&s.push("path="+r),vt.isString(o)&&s.push("domain="+o),!0===i&&s.push("secure"),document.cookie=s.join("; ")},read:function(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}};function Qt(t,e){return t&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)?function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}(t,e):e}var te=zt.isStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),e=document.createElement("a");let n;function r(n){let r=n;return t&&(e.setAttribute("href",r),r=e.href),e.setAttribute("href",r),{href:e.href,protocol:e.protocol?e.protocol.replace(/:$/,""):"",host:e.host,search:e.search?e.search.replace(/^\?/,""):"",hash:e.hash?e.hash.replace(/^#/,""):"",hostname:e.hostname,port:e.port,pathname:"/"===e.pathname.charAt(0)?e.pathname:"/"+e.pathname}}return n=r(window.location.href),function(t){const e=vt.isString(t)?r(t):t;return e.protocol===n.protocol&&e.host===n.host}}():function(){return!0};function ee(t,e){let n=0;const r=function(t,e){t=t||10;const n=new Array(t),r=new Array(t);let o,i=0,s=0;return e=void 0!==e?e:1e3,function(a){const c=Date.now(),u=r[s];o||(o=c),n[i]=a,r[i]=c;let l=s,f=0;for(;l!==i;)f+=n[l++],l%=t;if(i=(i+1)%t,i===s&&(s=(s+1)%t),c-o<e)return;const d=u&&c-u;return d?Math.round(1e3*f/d):void 0}}(50,250);return o=>{const i=o.loaded,s=o.lengthComputable?o.total:void 0,a=i-n,c=r(a);n=i;const u={loaded:i,total:s,progress:s?i/s:void 0,bytes:a,rate:c||void 0,estimated:c&&s&&i<=s?(s-i)/c:void 0,event:o};u[e?"download":"upload"]=!0,t(u)}}const ne={http:null,xhr:"undefined"!=typeof XMLHttpRequest&&function(t){return new Promise((function(e,n){let r=t.data;const o=Vt.from(t.headers).normalize(),i=t.responseType;let s;function a(){t.cancelToken&&t.cancelToken.unsubscribe(s),t.signal&&t.signal.removeEventListener("abort",s)}vt.isFormData(r)&&(zt.isStandardBrowserEnv||zt.isStandardBrowserWebWorkerEnv?o.setContentType(!1):o.setContentType("multipart/form-data;",!1));let c=new XMLHttpRequest;if(t.auth){const e=t.auth.username||"",n=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";o.set("Authorization","Basic "+btoa(e+":"+n))}const u=Qt(t.baseURL,t.url);function l(){if(!c)return;const r=Vt.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders());!function(t,e,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?e(new Ot("Request failed with status code "+n.status,[Ot.ERR_BAD_REQUEST,Ot.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):t(n)}((function(t){e(t),a()}),(function(t){n(t),a()}),{data:i&&"text"!==i&&"json"!==i?c.response:c.responseText,status:c.status,statusText:c.statusText,headers:r,config:t,request:c}),c=null}if(c.open(t.method.toUpperCase(),Nt(u,t.params,t.paramsSerializer),!0),c.timeout=t.timeout,"onloadend"in c?c.onloadend=l:c.onreadystatechange=function(){c&&4===c.readyState&&(0!==c.status||c.responseURL&&0===c.responseURL.indexOf("file:"))&&setTimeout(l)},c.onabort=function(){c&&(n(new Ot("Request aborted",Ot.ECONNABORTED,t,c)),c=null)},c.onerror=function(){n(new Ot("Network Error",Ot.ERR_NETWORK,t,c)),c=null},c.ontimeout=function(){let e=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";const r=t.transitional||Ct;t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),n(new Ot(e,r.clarifyTimeoutError?Ot.ETIMEDOUT:Ot.ECONNABORTED,t,c)),c=null},zt.isStandardBrowserEnv){const e=(t.withCredentials||te(u))&&t.xsrfCookieName&&Xt.read(t.xsrfCookieName);e&&o.set(t.xsrfHeaderName,e)}void 0===r&&o.setContentType(null),"setRequestHeader"in c&&vt.forEach(o.toJSON(),(function(t,e){c.setRequestHeader(e,t)})),vt.isUndefined(t.withCredentials)||(c.withCredentials=!!t.withCredentials),i&&"json"!==i&&(c.responseType=t.responseType),"function"==typeof t.onDownloadProgress&&c.addEventListener("progress",ee(t.onDownloadProgress,!0)),"function"==typeof t.onUploadProgress&&c.upload&&c.upload.addEventListener("progress",ee(t.onUploadProgress)),(t.cancelToken||t.signal)&&(s=e=>{c&&(n(!e||e.type?new Gt(null,t,c):e),c.abort(),c=null)},t.cancelToken&&t.cancelToken.subscribe(s),t.signal&&(t.signal.aborted?s():t.signal.addEventListener("abort",s)));const f=function(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}(u);f&&-1===zt.protocols.indexOf(f)?n(new Ot("Unsupported protocol "+f+":",Ot.ERR_BAD_REQUEST,t)):c.send(r||null)}))}};vt.forEach(ne,((t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch(n){}Object.defineProperty(t,"adapterName",{value:e})}}));var re=t=>{t=vt.isArray(t)?t:[t];const{length:e}=t;let n,r;for(let o=0;o<e&&(n=t[o],!(r=vt.isString(n)?ne[n.toLowerCase()]:n));o++);if(!r){if(!1===r)throw new Ot(`Adapter ${n} is not supported by the environment`,"ERR_NOT_SUPPORT");throw new Error(vt.hasOwnProp(ne,n)?`Adapter '${n}' is not available in the build`:`Unknown adapter '${n}'`)}if(!vt.isFunction(r))throw new TypeError("adapter is not a function");return r};function oe(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Gt(null,t)}function ie(t){oe(t),t.headers=Vt.from(t.headers),t.data=Kt.call(t,t.transformRequest),-1!==["post","put","patch"].indexOf(t.method)&&t.headers.setContentType("application/x-www-form-urlencoded",!1);return re(t.adapter||Bt.adapter)(t).then((function(e){return oe(t),e.data=Kt.call(t,t.transformResponse,e),e.headers=Vt.from(e.headers),e}),(function(e){return Zt(e)||(oe(t),e&&e.response&&(e.response.data=Kt.call(t,t.transformResponse,e.response),e.response.headers=Vt.from(e.response.headers))),Promise.reject(e)}))}const se=t=>t instanceof Vt?t.toJSON():t;function ae(t,e){e=e||{};const n={};function r(t,e,n){return vt.isPlainObject(t)&&vt.isPlainObject(e)?vt.merge.call({caseless:n},t,e):vt.isPlainObject(e)?vt.merge({},e):vt.isArray(e)?e.slice():e}function o(t,e,n){return vt.isUndefined(e)?vt.isUndefined(t)?void 0:r(void 0,t,n):r(t,e,n)}function i(t,e){if(!vt.isUndefined(e))return r(void 0,e)}function s(t,e){return vt.isUndefined(e)?vt.isUndefined(t)?void 0:r(void 0,t):r(void 0,e)}function a(n,o,i){return i in e?r(n,o):i in t?r(void 0,n):void 0}const c={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(t,e)=>o(se(t),se(e),!0)};return vt.forEach(Object.keys(Object.assign({},t,e)),(function(r){const i=c[r]||o,s=i(t[r],e[r],r);vt.isUndefined(s)&&i!==a||(n[r]=s)})),n}const ce="1.4.0",ue={};["object","boolean","number","function","string","symbol"].forEach(((t,e)=>{ue[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}}));const le={};ue.transitional=function(t,e,n){function r(t,e){return"[Axios v1.4.0] Transitional option '"+t+"'"+e+(n?". "+n:"")}return(n,o,i)=>{if(!1===t)throw new Ot(r(o," has been removed"+(e?" in "+e:"")),Ot.ERR_DEPRECATED);return e&&!le[o]&&(le[o]=!0,console.warn(r(o," has been deprecated since v"+e+" and will be removed in the near future"))),!t||t(n,o,i)}};var fe={assertOptions:function(t,e,n){if("object"!=typeof t)throw new Ot("options must be an object",Ot.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let o=r.length;for(;o-- >0;){const i=r[o],s=e[i];if(s){const e=t[i],n=void 0===e||s(e,i,t);if(!0!==n)throw new Ot("option "+i+" must be "+n,Ot.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new Ot("Unknown option "+i,Ot.ERR_BAD_OPTION)}},validators:ue};const de=fe.validators;let he=class{constructor(t){this.defaults=t,this.interceptors={request:new kt,response:new kt}}request(t,e){"string"==typeof t?(e=e||{}).url=t:e=t||{},e=ae(this.defaults,e);const{transitional:n,paramsSerializer:r,headers:o}=e;let i;void 0!==n&&fe.assertOptions(n,{silentJSONParsing:de.transitional(de.boolean),forcedJSONParsing:de.transitional(de.boolean),clarifyTimeoutError:de.transitional(de.boolean)},!1),null!=r&&(vt.isFunction(r)?e.paramsSerializer={serialize:r}:fe.assertOptions(r,{encode:de.function,serialize:de.function},!0)),e.method=(e.method||this.defaults.method||"get").toLowerCase(),i=o&&vt.merge(o.common,o[e.method]),i&&vt.forEach(["delete","get","head","post","put","patch","common"],(t=>{delete o[t]})),e.headers=Vt.concat(i,o);const s=[];let a=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(a=a&&t.synchronous,s.unshift(t.fulfilled,t.rejected))}));const c=[];let u;this.interceptors.response.forEach((function(t){c.push(t.fulfilled,t.rejected)}));let l,f=0;if(!a){const t=[ie.bind(this),void 0];for(t.unshift.apply(t,s),t.push.apply(t,c),l=t.length,u=Promise.resolve(e);f<l;)u=u.then(t[f++],t[f++]);return u}l=s.length;let d=e;for(f=0;f<l;){const t=s[f++],e=s[f++];try{d=t(d)}catch(h){e.call(this,h);break}}try{u=ie.call(this,d)}catch(h){return Promise.reject(h)}for(f=0,l=c.length;f<l;)u=u.then(c[f++],c[f++]);return u}getUri(t){return Nt(Qt((t=ae(this.defaults,t)).baseURL,t.url),t.params,t.paramsSerializer)}};vt.forEach(["delete","get","head","options"],(function(t){he.prototype[t]=function(e,n){return this.request(ae(n||{},{method:t,url:e,data:(n||{}).data}))}})),vt.forEach(["post","put","patch"],(function(t){function e(e){return function(n,r,o){return this.request(ae(o||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}he.prototype[t]=e(),he.prototype[t+"Form"]=e(!0)}));var pe=he;class me{constructor(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");let e;this.promise=new Promise((function(t){e=t}));const n=this;this.promise.then((t=>{if(!n._listeners)return;let e=n._listeners.length;for(;e-- >0;)n._listeners[e](t);n._listeners=null})),this.promise.then=t=>{let e;const r=new Promise((t=>{n.subscribe(t),e=t})).then(t);return r.cancel=function(){n.unsubscribe(e)},r},t((function(t,r,o){n.reason||(n.reason=new Gt(t,r,o),e(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){this.reason?t(this.reason):this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const e=this._listeners.indexOf(t);-1!==e&&this._listeners.splice(e,1)}static source(){let t;return{token:new me((function(e){t=e})),cancel:t}}}var ye=me;const ge={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(ge).forEach((([t,e])=>{ge[e]=t}));var be=ge;const _e=function t(e){const n=new pe(e),r=B(pe.prototype.request,n);return vt.extend(r,pe.prototype,n,{allOwnKeys:!0}),vt.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return t(ae(e,n))},r}(Bt);_e.Axios=pe,_e.CanceledError=Gt,_e.CancelToken=ye,_e.isCancel=Zt,_e.VERSION=ce,_e.toFormData=At,_e.AxiosError=Ot,_e.Cancel=_e.CanceledError,_e.all=function(t){return Promise.all(t)},_e.spread=function(t){return function(e){return t.apply(null,e)}},_e.isAxiosError=function(t){return vt.isObject(t)&&!0===t.isAxiosError},_e.mergeConfig=ae,_e.AxiosHeaders=Vt,_e.formToJSON=t=>Pt(vt.isHTMLForm(t)?new FormData(t):t),_e.HttpStatusCode=be,_e.default=_e;var we=_e;const ve=`${"undefined"!=typeof window?window.location.origin:self.location.origin}/api/1.0/`,Oe=we.create({baseURL:ve}),$e="pm25";class Se{constructor(t){__publicField(this,"data"),__publicField(this,"dataFields"),__publicField(this,"displayField"),__publicField(this,"lastUpdated"),__publicField(this,"markerParams"),__publicField(this,"monitorFields");const e=A(t);this.data=t,this.markerParams=function(t){const e=`#${b}`,n={border_color:g(m(e,.1)),border_size:1,fill_color:e,value_color:e,size:8,shape:"square"};switch(t.device){case"AirNow":case"BAM1022":n.shape="triangle";break;case"PurpleAir":t.is_sjvair&&(n.shape="circle");break;default:console.error(`Unknown device type for monitor ${t.id}`),n.shape="diamond"}if(t.latest){const e=x(+t.latest[$e],T.levels);if(n.value_color=e,t.is_active)switch(n.fill_color=x(+t.latest[$e],T.levels),n.border_color=g(m(n.fill_color,.1)),t.device){case"AirNow":case"BAM1022":n.size=14;break;case"PurpleAir":t.is_sjvair?n.size=12:n.size=10}"inside"===t.location&&(n.border_color=`#${_}`,n.border_size=2)}return n}(t),this.monitorFields=e,this.dataFields=Object.keys(this.monitorFields),this.displayField=e[$e],this.lastUpdated=t.latest&&Object.keys(t.latest).length>1?L(t.latest.timestamp).fromNow():"never"}}var Ee=Object.freeze({__proto__:null,fetchEntries:async function t(e,n,r=1){const o=[],i={fields:e.dataFields.join(","),page:r,timestamp__gte:L.$defaultFormat(n.start),timestamp__lte:L.$defaultFormat(n.end)};return Oe.get(`monitors/${e.data.id}/entries/`,{params:i}).then((async i=>{const s=i.data;if(s.data.length&&(o.push(...s.data),s.has_next_page)){const i=await t(e,n,++r).catch((t=>{throw t}));i.length&&o.push(...i)}return o}))},fetchMonitors:async function(){return Oe.get("/monitors").then((t=>{const e={};for(let n of t.data.data)n.position.coordinates[1]>42||(e[n.id]=new Se(n));return e}))},fetchSubscriptions:async function(){return Oe.get("alerts/subscriptions").then((t=>t.data.data))},fetchTempByCoords:async function(t){const e=`https://api.weather.gov/points/${t.join(",")}`;return await Oe(e).then((async t=>{try{return(await Oe(t.data.properties.forecastHourly)).data.properties.periods[0].temperature}catch(e){throw e}}))}});new class{constructor(e,n){__publicField(this,"serviceModule"),__publicField(this,"serviceModuleName"),this.serviceModule=n,this.serviceModuleName=e,self.addEventListener("message",(async e=>{const{id:n,taskName:r,parameters:o}=e.data;this.serviceModule[r];const i=new t(n);r in this.serviceModule?await this.serviceModule[r](...o).then((t=>i.pass(t))).catch((t=>i.fail(t.message))):i.fail(`Background task "${String(r)}" not found in "${this.serviceModuleName}" controller`),self.postMessage(i)}))}}("MonitorsService",Ee)}();
|