@sjvair/monitor-map 1.9.2 → 1.9.5
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/MonitorDetails.css +1 -1
- package/dist/assets/{BackgroundRequests-DXPbNr8b.js → BackgroundRequests-Bh5XuqaJ.js} +1 -1
- package/dist/assets/BackgroundRequests-LR0SpT-S.js +1 -0
- package/dist/assets/CalibratorsWorker-BYMSesOs.js +1 -0
- package/dist/assets/DataChartWorker-DIu-xreg.js +1 -0
- package/dist/assets/EVWorker-CIpaHH9r.js +1 -0
- package/dist/assets/MonitorDetails-D6c_aK1u.js +2 -0
- package/dist/assets/MonitorsWorker-DWeiGZA9.js +1 -0
- package/dist/assets/{requests-BGFdzzjO.js → requests-BGm3TdHA.js} +1 -1
- package/dist/sjvairMonitorMap.css +1 -1
- package/dist/sjvairMonitorMap.js +14 -19
- package/package.json +13 -13
- package/dist/assets/BackgroundRequests-CCCsurGo.js +0 -1
- package/dist/assets/CalibratorsWorker-DKtd0Axd.js +0 -1
- package/dist/assets/DataChartWorker-DuW1BN-y.js +0 -1
- package/dist/assets/EVWorker-BrMjOhNu.js +0 -1
- package/dist/assets/MonitorDetails-D4CFKYUG.js +0 -7
- package/dist/assets/MonitorsWorker-D6PEKLDj.js +0 -1
|
@@ -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 g(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,g=((m*p==-1?m:m+p/(1+m*p))+1)/2,y=1-g;return _=255*(a*y+f*g),b=255*(c*y+d*g),w=h*r+u*(1-r),`rgba(${e(0,255,255*(s*y+l*g)).toFixed()}, ${e(0,255,_).toFixed()}, ${e(0,255,b).toFixed()}, ${parseFloat(e(0,1,w).toFixed(3))})`;var _,b,w}function y(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 _="969696",b="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 g(`#${n.color}`,`#${o.color}`,s)}return"#FFFFFF"}const T=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(T,"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 A=T;function j(t){switch(t.data_source.name){case"AirNow.gov":return function(t){return M(["pm25","PM 2.5","60m",t],["pm100","PM 10","60M",t])}(t);case"AQview":return function(t){return M(["pm25_avg_60","PM 2.5","60m",t])}(t);case"Central California Asthma Collaborative":return function(t){return M(["pm25","PM 2.5","60m",t])}(t);case"PurpleAir":return function(t){return M(["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 M(...t){const e={};for(let n of t)e[n[0]]=new A(...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,g={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])+"]"}},y=function(t,e,n){var r=String(t);return!r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},_={s:y,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),o=n%60;return(e<=0?"+":"-")+y(r,2,"0")+":"+y(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}},b="en",w={};w[b]=g;var v="$isDayjsObject",O=function(t){return t instanceof x||!(!t||!t[v])},$=function t(e,n,r){var o;if(!e)return b;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&&(b=o),o||!r&&b},S=function(t,e){if(O(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new x(n)},E=_;E.l=$,E.i=O,E.w=function(t,e){return S(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var x=function(){function g(t){this.$L=$(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[v]=!0}var y=g.prototype;return y.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(E.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.init()},y.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()},y.$utils=function(){return E},y.isValid=function(){return!(this.$d.toString()===h)},y.isSame=function(t,e){var n=S(t);return this.startOf(e)<=n&&n<=this.endOf(e)},y.isAfter=function(t,e){return S(t)<this.startOf(e)},y.isBefore=function(t,e){return this.endOf(e)<S(t)},y.$g=function(t,e,n){return E.u(t)?this[e]:this.set(n,t)},y.unix=function(){return Math.floor(this.valueOf()/1e3)},y.valueOf=function(){return this.$d.getTime()},y.startOf=function(t,e){var n=this,r=!!E.u(e)||e,l=E.p(t),h=function(t,e){var o=E.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 E.w(n.toDate()[t].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},m=this.$W,g=this.$M,y=this.$D,_="set"+(this.$u?"UTC":"");switch(l){case f:return r?h(1,0):h(31,11);case u:return r?h(1,g):h(0,g+1);case c:var b=this.$locale().weekStart||0,w=(m<b?m+7:m)-b;return h(r?y-w:y+(6-w),g);case a:case d:return p(_+"Hours",0);case s:return p(_+"Minutes",1);case i:return p(_+"Seconds",2);case o:return p(_+"Milliseconds",3);default:return this.clone()}},y.endOf=function(t){return this.startOf(t,!1)},y.$set=function(t,e){var n,c=E.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},y.set=function(t,e){return this.clone().$set(t,e)},y.get=function(t){return this[E.p(t)]()},y.add=function(r,l){var d,h=this;r=Number(r);var p=E.p(l),m=function(t){var e=S(h);return E.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 g=(d={},d[i]=e,d[s]=n,d[o]=t,d)[p]||1,y=this.$d.getTime()+r*g;return E.w(y,this)},y.subtract=function(t,e){return this.add(-1*t,e)},y.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=E.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 E.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 E.s(e.$y,4,"0");case"M":return a+1;case"MM":return E.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 E.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 E.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 E.s(s,2,"0");case"s":return String(e.$s);case"ss":return E.s(e.$s,2,"0");case"SSS":return E.s(e.$ms,3,"0");case"Z":return o}return null}(t)||o.replace(":","")}))},y.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},y.diff=function(r,d,h){var p,m=this,g=E.p(d),y=S(r),_=(y.utcOffset()-this.utcOffset())*e,b=this-y,w=function(){return E.m(m,y)};switch(g){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=b/n;break;case i:p=b/e;break;case o:p=b/t;break;default:p=b}return h?p:E.a(p)},y.daysInMonth=function(){return this.endOf(u).$D},y.$locale=function(){return w[this.$L]},y.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=$(t,e,!0);return r&&(n.$L=r),n},y.clone=function(){return E.w(this.$d,this)},y.toDate=function(){return new Date(this.valueOf())},y.toJSON=function(){return this.isValid()?this.toISOString():null},y.toISOString=function(){return this.$d.toISOString()},y.toString=function(){return this.$d.toUTCString()},g}(),T=x.prototype;return S.prototype=T,[["$ms",r],["$s",o],["$m",i],["$H",s],["$W",a],["$M",u],["$y",f],["$D",d]].forEach((function(t){T[t[1]]=function(e){return this.$g(e,t[0],t[1])}})),S.extend=function(t,e){return t.$i||(t(e,x,S),t.$i=!0),S},S.locale=$,S.isDayjs=O,S.unix=function(t){return S(1e3*t)},S.en=w[b],S.Ls=w,S.p={},S}();var F=D(R.exports),k={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 g=(t.rounding||Math.round)(Math.abs(c));if(l=c>0,g<=m.r||!m.r){g<=1&&p>0&&(m=d[p-1]);var y=f[m.l];a&&(g=a(""+g)),u="string"==typeof y?y.replace("%d",g):y(g,r,m.l,l);break}}if(r)return u;var _=l?f.future:f.past;return"function"==typeof _?_(u):_.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)}}}(k);var C=D(k.exports),N={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,{locale:this.$L}).$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"),{locale:this.$L});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}})}(N);var z=D(N.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(C),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=(t=>e=>{const n=q.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Y=t=>(t=t.toLowerCase(),e=>H(e)===t),W=t=>e=>typeof e===t,{isArray:J}=Array,V=W("undefined");const K=Y("ArrayBuffer");const Z=W("string"),G=W("function"),Q=W("number"),X=t=>null!==t&&"object"==typeof t,tt=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)},et=Y("Date"),nt=Y("File"),rt=Y("Blob"),ot=Y("FileList"),it=Y("URLSearchParams");function st(t,e,{allOwnKeys:n=!1}={}){if(null==t)return;let r,o;if("object"!=typeof t&&(t=[t]),J(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 at(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 ct="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,ut=t=>!V(t)&&t!==ct;const lt=(t=>e=>t&&e instanceof t)("undefined"!=typeof Uint8Array&&I(Uint8Array)),ft=Y("HTMLFormElement"),dt=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),ht=Y("RegExp"),pt=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};st(n,((n,o)=>{let i;!1!==(i=e(n,o,t))&&(r[o]=i||n)})),Object.defineProperties(t,r)},mt="abcdefghijklmnopqrstuvwxyz",gt="0123456789",yt={DIGIT:gt,ALPHA:mt,ALPHA_DIGIT:mt+mt.toUpperCase()+gt};const _t=Y("AsyncFunction");var bt={isArray:J,isArrayBuffer:K,isBuffer:function(t){return null!==t&&!V(t)&&null!==t.constructor&&!V(t.constructor)&&G(t.constructor.isBuffer)&&t.constructor.isBuffer(t)},isFormData:t=>{let e;return t&&("function"==typeof FormData&&t instanceof FormData||G(t.append)&&("formdata"===(e=H(t))||"object"===e&&G(t.toString)&&"[object FormData]"===t.toString()))},isArrayBufferView:function(t){let e;return e="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&K(t.buffer),e},isString:Z,isNumber:Q,isBoolean:t=>!0===t||!1===t,isObject:X,isPlainObject:tt,isUndefined:V,isDate:et,isFile:nt,isBlob:rt,isRegExp:ht,isFunction:G,isStream:t=>X(t)&&G(t.pipe),isURLSearchParams:it,isTypedArray:lt,isFileList:ot,forEach:st,merge:function t(){const{caseless:e}=ut(this)&&this||{},n={},r=(r,o)=>{const i=e&&at(n,o)||o;tt(n[i])&&tt(r)?n[i]=t(n[i],r):tt(r)?n[i]=t({},r):J(r)?n[i]=r.slice():n[i]=r};for(let o=0,i=arguments.length;o<i;o++)arguments[o]&&st(arguments[o],r);return n},extend:(t,e,n,{allOwnKeys:r}={})=>(st(e,((e,r)=>{n&&G(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:Y,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(J(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:ft,hasOwnProperty:dt,hasOwnProp:dt,reduceDescriptors:pt,freezeMethods:t=>{pt(t,((e,n)=>{if(G(t)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=t[n];G(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 J(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:at,global:ct,isContextDefined:ut,ALPHABET:yt,generateString:(t=16,e=yt.ALPHA_DIGIT)=>{let n="";const{length:r}=e;for(;t--;)n+=e[Math.random()*r|0];return n},isSpecCompliantForm:function(t){return!!(t&&G(t.append)&&"FormData"===t[Symbol.toStringTag]&&t[Symbol.iterator])},toJSONObject:t=>{const e=new Array(10),n=(t,r)=>{if(X(t)){if(e.indexOf(t)>=0)return;if(!("toJSON"in t)){e[r]=t;const o=J(t)?[]:{};return st(t,((t,e)=>{const i=n(t,r+1);!V(i)&&(o[e]=i)})),e[r]=void 0,o}}return t};return n(t,0)},isAsyncFn:_t,isThenable:t=>t&&(X(t)||G(t))&&G(t.then)&&G(t.catch)};function wt(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)}bt.inherits(wt,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:bt.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const vt=wt.prototype,Ot={};["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=>{Ot[t]={value:t}})),Object.defineProperties(wt,Ot),Object.defineProperty(vt,"isAxiosError",{value:!0}),wt.from=(t,e,n,r,o,i)=>{const s=Object.create(vt);return bt.toFlatObject(t,s,(function(t){return t!==Error.prototype}),(t=>"isAxiosError"!==t)),wt.call(s,t.message,e,n,r,o),s.cause=t,s.name=t.name,i&&Object.assign(s,i),s};function $t(t){return bt.isPlainObject(t)||bt.isArray(t)}function St(t){return bt.endsWith(t,"[]")?t.slice(0,-2):t}function Et(t,e,n){return t?t.concat(e).map((function(t,e){return t=St(t),!n&&e?"["+t+"]":t})).join(n?".":""):e}const xt=bt.toFlatObject(bt,{},null,(function(t){return/^is[A-Z]/.test(t)}));function Tt(t,e,n){if(!bt.isObject(t))throw new TypeError("target must be an object");e=e||new FormData;const r=(n=bt.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(t,e){return!bt.isUndefined(e[t])}))).metaTokens,o=n.visitor||u,i=n.dots,s=n.indexes,a=(n.Blob||"undefined"!=typeof Blob&&Blob)&&bt.isSpecCompliantForm(e);if(!bt.isFunction(o))throw new TypeError("visitor must be a function");function c(t){if(null===t)return"";if(bt.isDate(t))return t.toISOString();if(!a&&bt.isBlob(t))throw new wt("Blob is not supported. Use a Buffer instead.");return bt.isArrayBuffer(t)||bt.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(bt.endsWith(n,"{}"))n=r?n:n.slice(0,-2),t=JSON.stringify(t);else if(bt.isArray(t)&&function(t){return bt.isArray(t)&&!t.some($t)}(t)||(bt.isFileList(t)||bt.endsWith(n,"[]"))&&(a=bt.toArray(t)))return n=St(n),a.forEach((function(t,r){!bt.isUndefined(t)&&null!==t&&e.append(!0===s?Et([n],r,i):null===s?n:n+"[]",c(t))})),!1;return!!$t(t)||(e.append(Et(o,n,i),c(t)),!1)}const l=[],f=Object.assign(xt,{defaultVisitor:u,convertValue:c,isVisitable:$t});if(!bt.isObject(t))throw new TypeError("data must be an object");return function t(n,r){if(!bt.isUndefined(n)){if(-1!==l.indexOf(n))throw Error("Circular reference detected in "+r.join("."));l.push(n),bt.forEach(n,(function(n,i){!0===(!(bt.isUndefined(n)||null===n)&&o.call(e,n,bt.isString(i)?i.trim():i,r,f))&&t(n,r?r.concat(i):[i])})),l.pop()}}(t),e}function At(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,(function(t){return e[t]}))}function jt(t,e){this._pairs=[],t&&Tt(t,this,e)}const Mt=jt.prototype;function Dt(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Rt(t,e,n){if(!e)return t;const r=n&&n.encode||Dt,o=n&&n.serialize;let i;if(i=o?o(e,n):bt.isURLSearchParams(e)?e.toString():new jt(e,n).toString(r),i){const e=t.indexOf("#");-1!==e&&(t=t.slice(0,e)),t+=(-1===t.indexOf("?")?"?":"&")+i}return t}Mt.append=function(t,e){this._pairs.push([t,e])},Mt.toString=function(t){const e=t?function(e){return t.call(this,e,At)}:At;return this._pairs.map((function(t){return e(t[0])+"="+e(t[1])}),"").join("&")};class Ft{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){bt.forEach(this.handlers,(function(e){null!==e&&t(e)}))}}var kt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Ct={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:jt,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const Nt="undefined"!=typeof window&&"undefined"!=typeof document,zt=(Pt="undefined"!=typeof navigator&&navigator.product,Nt&&["ReactNative","NativeScript","NS"].indexOf(Pt)<0);var Pt;const Ut="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts;var Lt={...Object.freeze({__proto__:null,hasBrowserEnv:Nt,hasStandardBrowserEnv:zt,hasStandardBrowserWebWorkerEnv:Ut}),...Ct};function Bt(t){function e(t,n,r,o){let i=t[o++];if("__proto__"===i)return!0;const s=Number.isFinite(+i),a=o>=t.length;if(i=!i&&bt.isArray(r)?r.length:i,a)return bt.hasOwnProp(r,i)?r[i]=[r[i],n]:r[i]=n,!s;r[i]&&bt.isObject(r[i])||(r[i]=[]);return e(t,n,r[i],o)&&bt.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(bt.isFormData(t)&&bt.isFunction(t.entries)){const n={};return bt.forEachEntry(t,((t,r)=>{e(function(t){return bt.matchAll(/\w+|\[(\w*)]/g,t).map((t=>"[]"===t[0]?"":t[1]||t[0]))}(t),r,n,0)})),n}return null}const qt={transitional:kt,adapter:["xhr","http"],transformRequest:[function(t,e){const n=e.getContentType()||"",r=n.indexOf("application/json")>-1,o=bt.isObject(t);o&&bt.isHTMLForm(t)&&(t=new FormData(t));if(bt.isFormData(t))return r?JSON.stringify(Bt(t)):t;if(bt.isArrayBuffer(t)||bt.isBuffer(t)||bt.isStream(t)||bt.isFile(t)||bt.isBlob(t))return t;if(bt.isArrayBufferView(t))return t.buffer;if(bt.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 Tt(t,new Lt.classes.URLSearchParams,Object.assign({visitor:function(t,e,n,r){return Lt.isNode&&bt.isBuffer(t)?(this.append(e,t.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},e))}(t,this.formSerializer).toString();if((i=bt.isFileList(t))||n.indexOf("multipart/form-data")>-1){const e=this.env&&this.env.FormData;return Tt(i?{"files[]":t}:t,e&&new e,this.formSerializer)}}return o||r?(e.setContentType("application/json",!1),function(t,e,n){if(bt.isString(t))try{return(e||JSON.parse)(t),bt.trim(t)}catch(r){if("SyntaxError"!==r.name)throw r}return(n||JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){const e=this.transitional||qt.transitional,n=e&&e.forcedJSONParsing,r="json"===this.responseType;if(t&&bt.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 wt.from(o,wt.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:Lt.classes.FormData,Blob:Lt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};bt.forEach(["delete","get","head","post","put","patch"],(t=>{qt.headers[t]={}}));var It=qt;const Ht=bt.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 Yt=Symbol("internals");function Wt(t){return t&&String(t).trim().toLowerCase()}function Jt(t){return!1===t||null==t?t:bt.isArray(t)?t.map(Jt):String(t)}function Vt(t,e,n,r,o){return bt.isFunction(r)?r.call(this,e,n):(o&&(e=n),bt.isString(e)?bt.isString(r)?-1!==e.indexOf(r):bt.isRegExp(r)?r.test(e):void 0:void 0)}class Kt{constructor(t){t&&this.set(t)}set(t,e,n){const r=this;function o(t,e,n){const o=Wt(e);if(!o)throw new Error("header name must be a non-empty string");const i=bt.findKey(r,o);(!i||void 0===r[i]||!0===n||void 0===n&&!1!==r[i])&&(r[i||e]=Jt(t))}const i=(t,e)=>bt.forEach(t,((t,n)=>o(t,n,e)));return bt.isPlainObject(t)||t instanceof this.constructor?i(t,e):bt.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]&&Ht[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=Wt(t)){const n=bt.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(bt.isFunction(e))return e.call(this,t,n);if(bt.isRegExp(e))return e.exec(t);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=Wt(t)){const n=bt.findKey(this,t);return!(!n||void 0===this[n]||e&&!Vt(0,this[n],n,e))}return!1}delete(t,e){const n=this;let r=!1;function o(t){if(t=Wt(t)){const o=bt.findKey(n,t);!o||e&&!Vt(0,n[o],o,e)||(delete n[o],r=!0)}}return bt.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&&!Vt(0,this[o],o,t,!0)||(delete this[o],r=!0)}return r}normalize(t){const e=this,n={};return bt.forEach(this,((r,o)=>{const i=bt.findKey(n,o);if(i)return e[i]=Jt(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]=Jt(r),n[s]=!0})),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return bt.forEach(this,((n,r)=>{null!=n&&!1!==n&&(e[r]=t&&bt.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[Yt]=this[Yt]={accessors:{}}).accessors,n=this.prototype;function r(t){const r=Wt(t);e[r]||(!function(t,e){const n=bt.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 bt.isArray(t)?t.forEach(r):r(t),this}}Kt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),bt.reduceDescriptors(Kt.prototype,(({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(t){this[n]=t}}})),bt.freezeMethods(Kt);var Zt=Kt;function Gt(t,e){const n=this||It,r=e||n,o=Zt.from(r.headers);let i=r.data;return bt.forEach(t,(function(t){i=t.call(n,i,o.normalize(),e?e.status:void 0)})),o.normalize(),i}function Qt(t){return!(!t||!t.__CANCEL__)}function Xt(t,e,n){wt.call(this,null==t?"canceled":t,wt.ERR_CANCELED,e,n),this.name="CanceledError"}bt.inherits(Xt,wt,{__CANCEL__:!0});var te=Lt.hasStandardBrowserEnv?{write(t,e,n,r,o,i){const s=[t+"="+encodeURIComponent(e)];bt.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),bt.isString(r)&&s.push("path="+r),bt.isString(o)&&s.push("domain="+o),!0===i&&s.push("secure"),document.cookie=s.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function ee(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 ne=Lt.hasStandardBrowserEnv?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=bt.isString(t)?r(t):t;return e.protocol===n.protocol&&e.host===n.host}}():function(){return function(){return!0}}();function re(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 oe={http:null,xhr:"undefined"!=typeof XMLHttpRequest&&function(t){return new Promise((function(e,n){let r=t.data;const o=Zt.from(t.headers).normalize();let i,s,{responseType:a,withXSRFToken:c}=t;function u(){t.cancelToken&&t.cancelToken.unsubscribe(i),t.signal&&t.signal.removeEventListener("abort",i)}if(bt.isFormData(r))if(Lt.hasStandardBrowserEnv||Lt.hasStandardBrowserWebWorkerEnv)o.setContentType(!1);else if(!1!==(s=o.getContentType())){const[t,...e]=s?s.split(";").map((t=>t.trim())).filter(Boolean):[];o.setContentType([t||"multipart/form-data",...e].join("; "))}let l=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 f=ee(t.baseURL,t.url);function d(){if(!l)return;const r=Zt.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders());!function(t,e,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?e(new wt("Request failed with status code "+n.status,[wt.ERR_BAD_REQUEST,wt.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):t(n)}((function(t){e(t),u()}),(function(t){n(t),u()}),{data:a&&"text"!==a&&"json"!==a?l.response:l.responseText,status:l.status,statusText:l.statusText,headers:r,config:t,request:l}),l=null}if(l.open(t.method.toUpperCase(),Rt(f,t.params,t.paramsSerializer),!0),l.timeout=t.timeout,"onloadend"in l?l.onloadend=d:l.onreadystatechange=function(){l&&4===l.readyState&&(0!==l.status||l.responseURL&&0===l.responseURL.indexOf("file:"))&&setTimeout(d)},l.onabort=function(){l&&(n(new wt("Request aborted",wt.ECONNABORTED,t,l)),l=null)},l.onerror=function(){n(new wt("Network Error",wt.ERR_NETWORK,t,l)),l=null},l.ontimeout=function(){let e=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";const r=t.transitional||kt;t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),n(new wt(e,r.clarifyTimeoutError?wt.ETIMEDOUT:wt.ECONNABORTED,t,l)),l=null},Lt.hasStandardBrowserEnv&&(c&&bt.isFunction(c)&&(c=c(t)),c||!1!==c&&ne(f))){const e=t.xsrfHeaderName&&t.xsrfCookieName&&te.read(t.xsrfCookieName);e&&o.set(t.xsrfHeaderName,e)}void 0===r&&o.setContentType(null),"setRequestHeader"in l&&bt.forEach(o.toJSON(),(function(t,e){l.setRequestHeader(e,t)})),bt.isUndefined(t.withCredentials)||(l.withCredentials=!!t.withCredentials),a&&"json"!==a&&(l.responseType=t.responseType),"function"==typeof t.onDownloadProgress&&l.addEventListener("progress",re(t.onDownloadProgress,!0)),"function"==typeof t.onUploadProgress&&l.upload&&l.upload.addEventListener("progress",re(t.onUploadProgress)),(t.cancelToken||t.signal)&&(i=e=>{l&&(n(!e||e.type?new Xt(null,t,l):e),l.abort(),l=null)},t.cancelToken&&t.cancelToken.subscribe(i),t.signal&&(t.signal.aborted?i():t.signal.addEventListener("abort",i)));const h=function(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}(f);h&&-1===Lt.protocols.indexOf(h)?n(new wt("Unsupported protocol "+h+":",wt.ERR_BAD_REQUEST,t)):l.send(r||null)}))}};bt.forEach(oe,((t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch(n){}Object.defineProperty(t,"adapterName",{value:e})}}));const ie=t=>`- ${t}`,se=t=>bt.isFunction(t)||null===t||!1===t;var ae=t=>{t=bt.isArray(t)?t:[t];const{length:e}=t;let n,r;const o={};for(let i=0;i<e;i++){let e;if(n=t[i],r=n,!se(n)&&(r=oe[(e=String(n)).toLowerCase()],void 0===r))throw new wt(`Unknown adapter '${e}'`);if(r)break;o[e||"#"+i]=r}if(!r){const t=Object.entries(o).map((([t,e])=>`adapter ${t} `+(!1===e?"is not supported by the environment":"is not available in the build")));throw new wt("There is no suitable adapter to dispatch the request "+(e?t.length>1?"since :\n"+t.map(ie).join("\n"):" "+ie(t[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return r};function ce(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Xt(null,t)}function ue(t){ce(t),t.headers=Zt.from(t.headers),t.data=Gt.call(t,t.transformRequest),-1!==["post","put","patch"].indexOf(t.method)&&t.headers.setContentType("application/x-www-form-urlencoded",!1);return ae(t.adapter||It.adapter)(t).then((function(e){return ce(t),e.data=Gt.call(t,t.transformResponse,e),e.headers=Zt.from(e.headers),e}),(function(e){return Qt(e)||(ce(t),e&&e.response&&(e.response.data=Gt.call(t,t.transformResponse,e.response),e.response.headers=Zt.from(e.response.headers))),Promise.reject(e)}))}const le=t=>t instanceof Zt?{...t}:t;function fe(t,e){e=e||{};const n={};function r(t,e,n){return bt.isPlainObject(t)&&bt.isPlainObject(e)?bt.merge.call({caseless:n},t,e):bt.isPlainObject(e)?bt.merge({},e):bt.isArray(e)?e.slice():e}function o(t,e,n){return bt.isUndefined(e)?bt.isUndefined(t)?void 0:r(void 0,t,n):r(t,e,n)}function i(t,e){if(!bt.isUndefined(e))return r(void 0,e)}function s(t,e){return bt.isUndefined(e)?bt.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,withXSRFToken: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(le(t),le(e),!0)};return bt.forEach(Object.keys(Object.assign({},t,e)),(function(r){const i=c[r]||o,s=i(t[r],e[r],r);bt.isUndefined(s)&&i!==a||(n[r]=s)})),n}const de="1.6.8",he={};["object","boolean","number","function","string","symbol"].forEach(((t,e)=>{he[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}}));const pe={};he.transitional=function(t,e,n){function r(t,e){return"[Axios v1.6.8] Transitional option '"+t+"'"+e+(n?". "+n:"")}return(n,o,i)=>{if(!1===t)throw new wt(r(o," has been removed"+(e?" in "+e:"")),wt.ERR_DEPRECATED);return e&&!pe[o]&&(pe[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 me={assertOptions:function(t,e,n){if("object"!=typeof t)throw new wt("options must be an object",wt.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 wt("option "+i+" must be "+n,wt.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new wt("Unknown option "+i,wt.ERR_BAD_OPTION)}},validators:he};const ge=me.validators;class ye{constructor(t){this.defaults=t,this.interceptors={request:new Ft,response:new Ft}}async request(t,e){try{return await this._request(t,e)}catch(n){if(n instanceof Error){let t;Error.captureStackTrace?Error.captureStackTrace(t={}):t=new Error;const e=t.stack?t.stack.replace(/^.+\n/,""):"";n.stack?e&&!String(n.stack).endsWith(e.replace(/^.+\n.+\n/,""))&&(n.stack+="\n"+e):n.stack=e}throw n}}_request(t,e){"string"==typeof t?(e=e||{}).url=t:e=t||{},e=fe(this.defaults,e);const{transitional:n,paramsSerializer:r,headers:o}=e;void 0!==n&&me.assertOptions(n,{silentJSONParsing:ge.transitional(ge.boolean),forcedJSONParsing:ge.transitional(ge.boolean),clarifyTimeoutError:ge.transitional(ge.boolean)},!1),null!=r&&(bt.isFunction(r)?e.paramsSerializer={serialize:r}:me.assertOptions(r,{encode:ge.function,serialize:ge.function},!0)),e.method=(e.method||this.defaults.method||"get").toLowerCase();let i=o&&bt.merge(o.common,o[e.method]);o&&bt.forEach(["delete","get","head","post","put","patch","common"],(t=>{delete o[t]})),e.headers=Zt.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=[ue.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=ue.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 Rt(ee((t=fe(this.defaults,t)).baseURL,t.url),t.params,t.paramsSerializer)}}bt.forEach(["delete","get","head","options"],(function(t){ye.prototype[t]=function(e,n){return this.request(fe(n||{},{method:t,url:e,data:(n||{}).data}))}})),bt.forEach(["post","put","patch"],(function(t){function e(e){return function(n,r,o){return this.request(fe(o||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}ye.prototype[t]=e(),ye.prototype[t+"Form"]=e(!0)}));var _e=ye;class be{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 Xt(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 be((function(e){t=e})),cancel:t}}}var we=be;const ve={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(ve).forEach((([t,e])=>{ve[e]=t}));var Oe=ve;const $e=function t(e){const n=new _e(e),r=B(_e.prototype.request,n);return bt.extend(r,_e.prototype,n,{allOwnKeys:!0}),bt.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return t(fe(e,n))},r}(It);$e.Axios=_e,$e.CanceledError=Xt,$e.CancelToken=we,$e.isCancel=Qt,$e.VERSION=de,$e.toFormData=Tt,$e.AxiosError=wt,$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 bt.isObject(t)&&!0===t.isAxiosError},$e.mergeConfig=fe,$e.AxiosHeaders=Zt,$e.formToJSON=t=>Bt(bt.isHTMLForm(t)?new FormData(t):t),$e.getAdapter=ae,$e.HttpStatusCode=Oe,$e.default=$e;const Se=`${"undefined"!=typeof window?window.location.origin:self.location.origin}/api/1.0/`,Ee=$e.create({baseURL:Se}),xe="pm25";class Te{constructor(t){__publicField(this,"data"),__publicField(this,"dataFields"),__publicField(this,"displayField"),__publicField(this,"lastUpdated"),__publicField(this,"markerParams"),__publicField(this,"monitorFields");const e=j(t);t.latest&&("pm25"in t.latest&&parseInt(t.latest.pm25,10)<0&&(t.latest.pm25="0"),"pm25_avg_60"in t.latest&&parseInt(t.latest.pm25_avg_60,10)<0&&(t.latest.pm25_avg_60="0")),this.data=t,this.markerParams=function(t){const e=`#${_}`,n={border_color:y(m(e,.1)),border_size:1,fill_color:e,value_color:e,size:8,shape:"square"};switch(t.data_source.name){case"AirNow.gov":case"AQview":case"Central California Asthma Collaborative":n.shape="triangle";break;case"PurpleAir":t.is_sjvair&&(n.shape="circle");break;default:console.error(`Unknown device type for monitor ${t.id}: ${t.data_source.name}`,t),n.shape="diamond"}if(t.latest){const e=x(+t.latest[xe],A.levels);if(n.value_color=e,t.is_active)switch(n.fill_color=x(+t.latest[xe],A.levels),n.border_color=y(m(n.fill_color,.1)),t.data_source.name){case"AirNow.gov":case"AQview":case"Central California Asthma Collaborative":n.size=14;break;case"PurpleAir":t.is_sjvair?n.size=12:n.size=10}"inside"===t.location&&(n.border_color=`#${b}`,n.border_size=2)}return n}(t),this.monitorFields=e,this.dataFields=Object.keys(this.monitorFields),this.displayField=e[xe],this.lastUpdated=t.latest&&Object.keys(t.latest).length>1?L(t.latest.timestamp).fromNow():"never"}}var Ae=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 Ee.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 Ee.get("/monitors").then((t=>{const e={};for(let n of t.data.data)e[n.id]=new Te(n);return e}))},fetchSubscriptions:async function(){return Ee.get("alerts/subscriptions").then((t=>t.data.data))},fetchTempByCoords:async function(t){const e=`https://api.weather.gov/points/${t.join(",")}`;return await Ee(e).then((async t=>{try{return(await Ee(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",Ae)}();
|