@sjvair/monitor-map 1.36.0 → 2.0.1
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 -0
- package/dist/assets/BackgroundRequests-DLY1xUPG.js +1 -0
- package/dist/assets/CalibratorsWorker-UIt-3fNZ.js +1 -0
- package/dist/assets/EVWorker-DUQOiwdE.js +1 -0
- package/dist/assets/MonitorDetails-D0LTSOtq.js +1 -0
- package/dist/assets/MonitorsWorker-CqDM37nq.js +1 -0
- package/dist/carb-compact.jpg +0 -0
- package/dist/icon-128.webp +0 -0
- package/dist/sjvairMonitorMap.css +1 -0
- package/dist/sjvairMonitorMap.js +34 -0
- package/package.json +28 -29
- package/dist/monitor-map/MonitorDetails.css +0 -1
- package/dist/monitor-map/assets/BackgroundRequests-b04b7b5c.js +0 -1
- package/dist/monitor-map/assets/BackgroundRequests-f82922f1.js +0 -1
- package/dist/monitor-map/assets/DataChartWorker-d86a1f80.js +0 -1
- package/dist/monitor-map/assets/EVWorker-6a8219b9.js +0 -1
- package/dist/monitor-map/assets/MonitorDetails-538b4f75.js +0 -1
- package/dist/monitor-map/assets/MonitorsWorker-2fa2f523.js +0 -1
- package/dist/monitor-map/assets/requests-022026b5.js +0 -1
- package/dist/monitor-map/assets/requests-6166d3b9.js +0 -1
- package/dist/monitor-map/main.css +0 -1
- package/dist/monitor-map/road.svg +0 -16
- package/dist/monitor-map/sjvairMonitorMap.js +0 -6
- package/dist/widget/MonitorDetails.css +0 -1
- package/dist/widget/assets/BackgroundRequests-4254499d.js +0 -1
- package/dist/widget/assets/BackgroundRequests-74ff392a.js +0 -1
- package/dist/widget/assets/DataChartWorker-d86a1f80.js +0 -1
- package/dist/widget/assets/EVWorker-6a8219b9.js +0 -1
- package/dist/widget/assets/MonitorDetails-4144a4d9.js +0 -1
- package/dist/widget/assets/MonitorsWorker-2fa2f523.js +0 -1
- package/dist/widget/assets/requests-022026b5.js +0 -1
- package/dist/widget/assets/requests-0dc8a1c5.js +0 -1
- package/dist/widget/favicon.ico +0 -0
- package/dist/widget/lungs.svg +0 -99
- package/dist/widget/main.css +0 -1
- package/dist/widget/road.svg +0 -16
- package/dist/widget/sjvairMonitorMap.js +0 -6
- /package/dist/{monitor-map/favicon.ico → favicon.ico} +0 -0
- /package/dist/{monitor-map/lungs.svg → lungs.svg} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
class t{id;error;success;payload;constructor(t){this.id=t}pass(t){this.success=!0,this.payload=t}fail(t){this.success=!1,this.error=t}}function e(t,e,r){return Math.min(Math.max(t,r),e)}class r extends Error{constructor(t){super(`Failed to parse color: "${t}"`)}}var n=r;function o(t){if("string"!=typeof t)throw new n(t);if("transparent"===t.trim().toLowerCase())return[0,0,0,0];let r=t.trim();r=d.test(t)?function(t){const e=t.toLowerCase().trim(),r=i[function(t){let e=5381,r=t.length;for(;r;)e=33*e^t.charCodeAt(--r);return(e>>>0)%2341}(e)];if(!r)throw new n(t);return`#${r}`}(t):t;const o=c.exec(r);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 s=u.exec(r);if(s){const t=Array.from(s).slice(1);return[...t.slice(0,3).map(t=>parseInt(t,16)),parseInt(t[3]||"ff",16)/255]}const h=l.exec(r);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(r);if(m){const[r,o,s,i]=Array.from(m).slice(1).map(parseFloat);if(e(0,100,o)!==o)throw new n(t);if(e(0,100,s)!==s)throw new n(t);return[...p(r,o,s),Number.isNaN(i)?1:i]}throw new n(t)}const s=t=>parseInt(t.replace(/_/g,""),36),i="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 r=s(e.substring(0,3)),n=s(e.substring(3)).toString(16);let o="";for(let s=0;s<6-n.length;s++)o+="0";return t[r]=`${o}${n}`,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,r)=>{let n=r/100;if(0===e)return[n,n,n].map(h);const o=(t%360+360)%360/60,s=(1-Math.abs(2*n-1))*(e/100),i=s*(1-Math.abs(o%2-1));let a=0,c=0,u=0;o>=0&&o<1?(a=s,c=i):o>=1&&o<2?(a=i,c=s):o>=2&&o<3?(c=s,u=i):o>=3&&o<4?(c=i,u=s):o>=4&&o<5?(a=i,u=s):o>=5&&o<6&&(a=s,u=i);const l=n-s/2;return[a+l,c+l,u+l].map(h)};function m(t,r){const[n,s,i,a]=function(t){const[e,r,n,s]=o(t).map((t,e)=>3===e?t:t/255),i=Math.max(e,r,n),a=Math.min(e,r,n),c=(i+a)/2;if(i===a)return[0,0,c,s];const u=i-a;return[60*(e===i?(r-n)/u+(r<n?6:0):r===i?(n-e)/u+2:(e-r)/u+4),c>.5?u/(2-i-a):u/(i+a),c,s]}(t);return function(t,r,n,o){return`hsla(${(t%360).toFixed()}, ${e(0,100,100*r).toFixed()}%, ${e(0,100,100*n).toFixed()}%, ${parseFloat(e(0,1,o).toFixed(3))})`}(n,s,i-r,a)}function y(t,r,n){const s=(t,e)=>3===e?t:t/255,[i,a,c,u]=o(t).map(s),[l,f,d,h]=o(r).map(s),p=h-u,m=2*n-1,y=((m*p===-1?m:m+p/(1+m*p))+1)/2,g=1-y;return b=255*(a*g+f*y),w=255*(c*g+d*y),v=h*n+u*(1-n),`rgba(${e(0,255,255*(i*g+l*y)).toFixed()}, ${e(0,255,b).toFixed()}, ${e(0,255,w).toFixed()}, ${parseFloat(e(0,1,v).toFixed(3))})`;var b,w,v}function g(t){const[r,n,s,i]=o(t);let a=t=>{const r=e(0,255,t).toString(16);return 1===r.length?`0${r}`:r};return`#${a(r)}${a(n)}${a(s)}${i<1?a(Math.round(255*i)):""}`}const b="969696",w="000000",v="0000FF",_="00e400",O="ffff00",S="ff7e00",$="ff0000",E="8f3f97",R="7e0023",x=[{min:-1/0,color:_},{min:55,color:O},{min:71,color:S},{min:86,color:$},{min:106,color:E},{min:201,color:R}];function T(t,e){const r=e[e.length-1];if(t>=r.min)return`#${r.color}`;if(t<=0)return`#${e[0].color}`;for(let n=0;n<=e.length-1;n++)if(e[n].min>t){const r=e[n-1],o=e[n],s=r.min===-1/0?o.min:o.min-r.min,i=(s-(o.min-t))/s;return y(`#${r.color}`,`#${o.color}`,i)}return"#FFFFFF"}class A{static levels=[{min:-1/0,color:_},{min:12,color:O},{min:35,color:S},{min:55,color:$},{min:150,color:E},{min:250,color:R}];label;latest;levels=A.levels;name;updateDuration;constructor(t,e,r,n){this.label=e,this.name=t,this.updateDuration=r,n.latest&&this.name in n.latest&&(this.latest=Math.round(parseFloat(n.latest.value)))}}function M(t){switch(t.data_source.name){case"AirNow.gov":return function(t){return j(["pm25","PM 2.5","60m",t],["pm100","PM 10","60M",t])}(t);case"AQview":return function(t){return j(["pm25_avg_60","PM 2.5","60m",t])}(t);case"Central California Asthma Collaborative":return function(t){return j(["pm25","PM 2.5","60m",t])}(t);case"PurpleAir":case"AirGradient":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 r of t)e[r[0]]=new A(...r);return e}function D(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var k,C={exports:{}};var N,F=(k||(k=1,C.exports=function(){var t=1e3,e=6e4,r=36e5,n="millisecond",o="second",s="minute",i="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"],r=t%100;return"["+t+(e[(r-20)%10]||e[r]||e[0])+"]"}},g=function(t,e,r){var n=String(t);return!n||n.length>=e?t:""+Array(e+1-n.length).join(r)+t},b={s:g,z:function(t){var e=-t.utcOffset(),r=Math.abs(e),n=Math.floor(r/60),o=r%60;return(e<=0?"+":"-")+g(n,2,"0")+":"+g(o,2,"0")},m:function t(e,r){if(e.date()<r.date())return-t(r,e);var n=12*(r.year()-e.year())+(r.month()-e.month()),o=e.clone().add(n,u),s=r-o<0,i=e.clone().add(n+(s?-1:1),u);return+(-(n+(r-o)/(s?o-i:i-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:i,m:s,s:o,ms:n,Q:l}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},w="en",v={};v[w]=y;var _="$isDayjsObject",O=function(t){return t instanceof R||!(!t||!t[_])},S=function t(e,r,n){var o;if(!e)return w;if("string"==typeof e){var s=e.toLowerCase();v[s]&&(o=s),r&&(v[s]=r,o=s);var i=e.split("-");if(!o&&i.length>1)return t(i[0])}else{var a=e.name;v[a]=e,o=a}return!n&&o&&(w=o),o||!n&&w},$=function(t,e){if(O(t))return t.clone();var r="object"==typeof e?e:{};return r.date=t,r.args=arguments,new R(r)},E=b;E.l=S,E.i=O,E.w=function(t,e){return $(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var R=function(){function y(t){this.$L=S(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[_]=!0}var g=y.prototype;return g.parse=function(t){this.$d=function(t){var e=t.date,r=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 n=e.match(p);if(n){var o=n[2]-1||0,s=(n[7]||"0").substring(0,3);return r?new Date(Date.UTC(n[1],o,n[3]||1,n[4]||0,n[5]||0,n[6]||0,s)):new Date(n[1],o,n[3]||1,n[4]||0,n[5]||0,n[6]||0,s)}}return new Date(e)}(t),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 E},g.isValid=function(){return!(this.$d.toString()===h)},g.isSame=function(t,e){var r=$(t);return this.startOf(e)<=r&&r<=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,r){return E.u(t)?this[e]:this.set(r,t)},g.unix=function(){return Math.floor(this.valueOf()/1e3)},g.valueOf=function(){return this.$d.getTime()},g.startOf=function(t,e){var r=this,n=!!E.u(e)||e,l=E.p(t),h=function(t,e){var o=E.w(r.$u?Date.UTC(r.$y,e,t):new Date(r.$y,e,t),r);return n?o:o.endOf(a)},p=function(t,e){return E.w(r.toDate()[t].apply(r.toDate("s"),(n?[0,0,0,0]:[23,59,59,999]).slice(e)),r)},m=this.$W,y=this.$M,g=this.$D,b="set"+(this.$u?"UTC":"");switch(l){case f:return n?h(1,0):h(31,11);case u:return n?h(1,y):h(0,y+1);case c:var w=this.$locale().weekStart||0,v=(m<w?m+7:m)-w;return h(n?g-v:g+(6-v),y);case a:case d:return p(b+"Hours",0);case i:return p(b+"Minutes",1);case s: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 r,c=E.p(t),l="set"+(this.$u?"UTC":""),h=(r={},r[a]=l+"Date",r[d]=l+"Date",r[u]=l+"Month",r[f]=l+"FullYear",r[i]=l+"Hours",r[s]=l+"Minutes",r[o]=l+"Seconds",r[n]=l+"Milliseconds",r)[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[E.p(t)]()},g.add=function(n,l){var d,h=this;n=Number(n);var p=E.p(l),m=function(t){var e=$(h);return E.w(e.date(e.date()+Math.round(t*n)),h)};if(p===u)return this.set(u,this.$M+n);if(p===f)return this.set(f,this.$y+n);if(p===a)return m(1);if(p===c)return m(7);var y=(d={},d[s]=e,d[i]=r,d[o]=t,d)[p]||1,g=this.$d.getTime()+n*y;return E.w(g,this)},g.subtract=function(t,e){return this.add(-1*t,e)},g.format=function(t){var e=this,r=this.$locale();if(!this.isValid())return r.invalidDate||h;var n=t||"YYYY-MM-DDTHH:mm:ssZ",o=E.z(this),s=this.$H,i=this.$m,a=this.$M,c=r.weekdays,u=r.months,l=r.meridiem,f=function(t,r,o,s){return t&&(t[r]||t(e,n))||o[r].slice(0,s)},d=function(t){return E.s(s%12||12,t,"0")},p=l||function(t,e,r){var n=t<12?"AM":"PM";return r?n.toLowerCase():n};return n.replace(m,function(t,n){return n||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(r.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(r.weekdaysMin,e.$W,c,2);case"ddd":return f(r.weekdaysShort,e.$W,c,3);case"dddd":return c[e.$W];case"H":return String(s);case"HH":return E.s(s,2,"0");case"h":return d(1);case"hh":return d(2);case"a":return p(s,i,!0);case"A":return p(s,i,!1);case"m":return String(i);case"mm":return E.s(i,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(":","")})},g.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},g.diff=function(n,d,h){var p,m=this,y=E.p(d),g=$(n),b=(g.utcOffset()-this.utcOffset())*e,w=this-g,v=function(){return E.m(m,g)};switch(y){case f:p=v()/12;break;case u:p=v();break;case l:p=v()/3;break;case c:p=(w-b)/6048e5;break;case a:p=(w-b)/864e5;break;case i:p=w/r;break;case s:p=w/e;break;case o:p=w/t;break;default:p=w}return h?p:E.a(p)},g.daysInMonth=function(){return this.endOf(u).$D},g.$locale=function(){return v[this.$L]},g.locale=function(t,e){if(!t)return this.$L;var r=this.clone(),n=S(t,e,!0);return n&&(r.$L=n),r},g.clone=function(){return E.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=R.prototype;return $.prototype=x,[["$ms",n],["$s",o],["$m",s],["$H",i],["$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,R,$),t.$i=!0),$},$.locale=S,$.isDayjs=O,$.unix=function(t){return $(1e3*t)},$.en=v[w],$.Ls=v,$.p={},$}()),C.exports),U=D(F),z={exports:{}};var P,L=(N||(N=1,z.exports=function(t,e,r){t=t||{};var n=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 s(t,e,r,o){return n.fromToBase(t,e,r,o)}r.en.relativeTime=o,n.fromToBase=function(e,n,s,i,a){for(var c,u,l,f=s.$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=i?r(e).diff(s,m.d,!0):s.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,n,m.l,l);break}}if(n)return u;var b=l?f.future:f.past;return"function"==typeof b?b(u):b.replace("%s",u)},n.to=function(t,e){return s(t,e,this,!0)},n.from=function(t,e){return s(t,e,this)};var i=function(t){return t.$u?r.utc():r()};n.toNow=function(t){return this.to(i(this),t)},n.fromNow=function(t){return this.from(i(this),t)}}),z.exports),B=D(L),q={exports:{}};var I,H,Y,W=(P||(P=1,q.exports=(I={year:0,month:1,day:2,hour:3,minute:4,second:5},H={},function(t,e,r){var n,o=function(t,e,r){void 0===r&&(r={});var n=new Date(t),o=function(t,e){void 0===e&&(e={});var r=e.timeZoneName||"short",n=t+"|"+r,o=H[n];return o||(o=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:r}),H[n]=o),o}(e,r);return o.formatToParts(n)},s=function(t,e){for(var n=o(t,e),s=[],i=0;i<n.length;i+=1){var a=n[i],c=a.type,u=a.value,l=I[c];l>=0&&(s[l]=parseInt(u,10))}var f=s[3],d=24===f?0:f,h=s[0]+"-"+s[1]+"-"+s[2]+" "+d+":"+s[4]+":"+s[5]+":000",p=+t;return(r.utc(h).valueOf()-(p-=p%1e3))/6e4},i=e.prototype;i.tz=function(t,e){void 0===t&&(t=n);var o,s=this.utcOffset(),i=this.toDate(),a=i.toLocaleString("en-US",{timeZone:t}),c=Math.round((i-new Date(a))/1e3/60),u=15*-Math.round(i.getTimezoneOffset()/15)-c;if(Number(u)){if(o=r(a,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(u,!0),e){var l=o.utcOffset();o=o.add(s-l,"minute")}}else o=this.utcOffset(0,e);return o.$x.$timezone=t,o},i.offsetName=function(t){var e=this.$x.$timezone||r.tz.guess(),n=o(this.valueOf(),e,{timeZoneName:t}).find(function(t){return"timezonename"===t.type.toLowerCase()});return n&&n.value};var a=i.startOf;i.startOf=function(t,e){if(!this.$x||!this.$x.$timezone)return a.call(this,t,e);var n=r(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return a.call(n,t,e).tz(this.$x.$timezone,!0)},r.tz=function(t,e,o){var i=o&&e,a=o||e||n,c=s(+r(),a);if("string"!=typeof t)return r(t).tz(a);var u=function(t,e,r){var n=t-60*e*1e3,o=s(n,r);if(e===o)return[n,e];var i=s(n-=60*(o-e)*1e3,r);return o===i?[n,o]:[t-60*Math.min(o,i)*1e3,Math.max(o,i)]}(r.utc(t,i).valueOf(),c,a),l=u[0],f=u[1],d=r(l).utcOffset(f);return d.$x.$timezone=a,d},r.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},r.tz.setDefault=function(t){n=t}})),q.exports),J=D(W),V={exports:{}};var K=(Y||(Y=1,V.exports=function(){var t="minute",e=/[+-]\d\d(?::?\d\d)?/g,r=/([+-]|\d\d)/g;return function(n,o,s){var i=o.prototype;s.utc=function(t){return new o({date:t,utc:!0,args:arguments})},i.utc=function(e){var r=s(this.toDate(),{locale:this.$L,utc:!0});return e?r.add(this.utcOffset(),t):r},i.local=function(){return s(this.toDate(),{locale:this.$L,utc:!1})};var a=i.parse;i.parse=function(t){t.utc&&(this.$u=!0),this.$utils().u(t.$offset)||(this.$offset=t.$offset),a.call(this,t)};var c=i.init;i.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=i.utcOffset;i.utcOffset=function(n,o){var s=this.$utils().u;if(s(n))return this.$u?0:s(this.$offset)?u.call(this):this.$offset;if("string"==typeof n&&(n=function(t){void 0===t&&(t="");var n=t.match(e);if(!n)return null;var o=(""+n[0]).match(r)||["-",0,0],s=o[0],i=60*+o[1]+ +o[2];return 0===i?0:"+"===s?i:-i}(n),null===n))return this;var i=Math.abs(n)<=16?60*n:n,a=this;if(o)return a.$offset=i,a.$u=0===n,a;if(0!==n){var c=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(a=this.local().add(i+c,t)).$offset=i,a.$x.$localOffset=c}else a=this.utc();return a};var l=i.format;i.format=function(t){var e=t||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return l.call(this,e)},i.valueOf=function(){var t=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*t},i.isUTC=function(){return!!this.$u},i.toISOString=function(){return this.toDate().toISOString()},i.toString=function(){return this.toDate().toUTCString()};var f=i.toDate;i.toDate=function(t){return"s"===t&&this.$offset?s(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():f.call(this)};var d=i.diff;i.diff=function(t,e,r){if(t&&this.$u===t.$u)return d.call(this,t,e,r);var n=this.local(),o=s(t).local();return d.call(n,o,e,r)}}}()),V.exports),Z=D(K);U.$defaultFormat=function(t){return U.utc(t).format("YYYY-MM-DD HH:mm:ss")},U.$prettyPrint=function(t){return U(t).format("h:mma dddd MMM DD, YYYY")};U.extend(B),U.extend(J),U.extend((t,e,r)=>{e.prototype.skewedDiff=function(t,e){const r=Math.abs(this.diff(t))/6e4;return r>e?Math.floor(r):r<e?Math.ceil(r):r}}),U.extend(Z);const X=U;function G(t,e){return function(){return t.apply(e,arguments)}}const{toString:Q}=Object.prototype,{getPrototypeOf:tt}=Object,{iterator:et,toStringTag:rt}=Symbol,nt=(ot=Object.create(null),t=>{const e=Q.call(t);return ot[e]||(ot[e]=e.slice(8,-1).toLowerCase())});var ot;const st=t=>(t=t.toLowerCase(),e=>nt(e)===t),it=t=>e=>typeof e===t,{isArray:at}=Array,ct=it("undefined");const ut=st("ArrayBuffer");const lt=it("string"),ft=it("function"),dt=it("number"),ht=t=>null!==t&&"object"==typeof t,pt=t=>{if("object"!==nt(t))return!1;const e=tt(t);return!(null!==e&&e!==Object.prototype&&null!==Object.getPrototypeOf(e)||rt in t||et in t)},mt=st("Date"),yt=st("File"),gt=st("Blob"),bt=st("FileList"),wt=st("URLSearchParams"),[vt,_t,Ot,St]=["ReadableStream","Request","Response","Headers"].map(st);function $t(t,e,{allOwnKeys:r=!1}={}){if(null==t)return;let n,o;if("object"!=typeof t&&(t=[t]),at(t))for(n=0,o=t.length;n<o;n++)e.call(null,t[n],n,t);else{const o=r?Object.getOwnPropertyNames(t):Object.keys(t),s=o.length;let i;for(n=0;n<s;n++)i=o[n],e.call(null,t[i],i,t)}}function Et(t,e){e=e.toLowerCase();const r=Object.keys(t);let n,o=r.length;for(;o-- >0;)if(n=r[o],e===n.toLowerCase())return n;return null}const Rt="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,xt=t=>!ct(t)&&t!==Rt;const Tt=(At="undefined"!=typeof Uint8Array&&tt(Uint8Array),t=>At&&t instanceof At);var At;const Mt=st("HTMLFormElement"),jt=(({hasOwnProperty:t})=>(e,r)=>t.call(e,r))(Object.prototype),Dt=st("RegExp"),kt=(t,e)=>{const r=Object.getOwnPropertyDescriptors(t),n={};$t(r,(r,o)=>{let s;!1!==(s=e(r,o,t))&&(n[o]=s||r)}),Object.defineProperties(t,n)};const Ct=st("AsyncFunction"),Nt=(Ft="function"==typeof setImmediate,Ut=ft(Rt.postMessage),Ft?setImmediate:Ut?(zt=`axios@${Math.random()}`,Pt=[],Rt.addEventListener("message",({source:t,data:e})=>{t===Rt&&e===zt&&Pt.length&&Pt.shift()()},!1),t=>{Pt.push(t),Rt.postMessage(zt,"*")}):t=>setTimeout(t));var Ft,Ut,zt,Pt;const Lt="undefined"!=typeof queueMicrotask?queueMicrotask.bind(Rt):"undefined"!=typeof process&&process.nextTick||Nt;var Bt={isArray:at,isArrayBuffer:ut,isBuffer:function(t){return null!==t&&!ct(t)&&null!==t.constructor&&!ct(t.constructor)&&ft(t.constructor.isBuffer)&&t.constructor.isBuffer(t)},isFormData:t=>{let e;return t&&("function"==typeof FormData&&t instanceof FormData||ft(t.append)&&("formdata"===(e=nt(t))||"object"===e&&ft(t.toString)&&"[object FormData]"===t.toString()))},isArrayBufferView:function(t){let e;return e="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&ut(t.buffer),e},isString:lt,isNumber:dt,isBoolean:t=>!0===t||!1===t,isObject:ht,isPlainObject:pt,isReadableStream:vt,isRequest:_t,isResponse:Ot,isHeaders:St,isUndefined:ct,isDate:mt,isFile:yt,isBlob:gt,isRegExp:Dt,isFunction:ft,isStream:t=>ht(t)&&ft(t.pipe),isURLSearchParams:wt,isTypedArray:Tt,isFileList:bt,forEach:$t,merge:function t(){const{caseless:e}=xt(this)&&this||{},r={},n=(n,o)=>{const s=e&&Et(r,o)||o;pt(r[s])&&pt(n)?r[s]=t(r[s],n):pt(n)?r[s]=t({},n):at(n)?r[s]=n.slice():r[s]=n};for(let o=0,s=arguments.length;o<s;o++)arguments[o]&&$t(arguments[o],n);return r},extend:(t,e,r,{allOwnKeys:n}={})=>($t(e,(e,n)=>{r&&ft(e)?t[n]=G(e,r):t[n]=e},{allOwnKeys:n}),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,r,n)=>{t.prototype=Object.create(e.prototype,n),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),r&&Object.assign(t.prototype,r)},toFlatObject:(t,e,r,n)=>{let o,s,i;const a={};if(e=e||{},null==t)return e;do{for(o=Object.getOwnPropertyNames(t),s=o.length;s-- >0;)i=o[s],n&&!n(i,t,e)||a[i]||(e[i]=t[i],a[i]=!0);t=!1!==r&&tt(t)}while(t&&(!r||r(t,e))&&t!==Object.prototype);return e},kindOf:nt,kindOfTest:st,endsWith:(t,e,r)=>{t=String(t),(void 0===r||r>t.length)&&(r=t.length),r-=e.length;const n=t.indexOf(e,r);return-1!==n&&n===r},toArray:t=>{if(!t)return null;if(at(t))return t;let e=t.length;if(!dt(e))return null;const r=new Array(e);for(;e-- >0;)r[e]=t[e];return r},forEachEntry:(t,e)=>{const r=(t&&t[et]).call(t);let n;for(;(n=r.next())&&!n.done;){const r=n.value;e.call(t,r[0],r[1])}},matchAll:(t,e)=>{let r;const n=[];for(;null!==(r=t.exec(e));)n.push(r);return n},isHTMLForm:Mt,hasOwnProperty:jt,hasOwnProp:jt,reduceDescriptors:kt,freezeMethods:t=>{kt(t,(e,r)=>{if(ft(t)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;const n=t[r];ft(n)&&(e.enumerable=!1,"writable"in e?e.writable=!1:e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")}))})},toObjectSet:(t,e)=>{const r={},n=t=>{t.forEach(t=>{r[t]=!0})};return at(t)?n(t):n(String(t).split(e)),r},toCamelCase:t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,e,r){return e.toUpperCase()+r}),noop:()=>{},toFiniteNumber:(t,e)=>null!=t&&Number.isFinite(t=+t)?t:e,findKey:Et,global:Rt,isContextDefined:xt,isSpecCompliantForm:function(t){return!!(t&&ft(t.append)&&"FormData"===t[rt]&&t[et])},toJSONObject:t=>{const e=new Array(10),r=(t,n)=>{if(ht(t)){if(e.indexOf(t)>=0)return;if(!("toJSON"in t)){e[n]=t;const o=at(t)?[]:{};return $t(t,(t,e)=>{const s=r(t,n+1);!ct(s)&&(o[e]=s)}),e[n]=void 0,o}}return t};return r(t,0)},isAsyncFn:Ct,isThenable:t=>t&&(ht(t)||ft(t))&&ft(t.then)&&ft(t.catch),setImmediate:Nt,asap:Lt,isIterable:t=>null!=t&&ft(t[et])};function qt(t,e,r,n,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),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o,this.status=o.status?o.status:null)}Bt.inherits(qt,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.status}}});const It=qt.prototype,Ht={};["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=>{Ht[t]={value:t}}),Object.defineProperties(qt,Ht),Object.defineProperty(It,"isAxiosError",{value:!0}),qt.from=(t,e,r,n,o,s)=>{const i=Object.create(It);return Bt.toFlatObject(t,i,function(t){return t!==Error.prototype},t=>"isAxiosError"!==t),qt.call(i,t.message,e,r,n,o),i.cause=t,i.name=t.name,s&&Object.assign(i,s),i};function Yt(t){return Bt.isPlainObject(t)||Bt.isArray(t)}function Wt(t){return Bt.endsWith(t,"[]")?t.slice(0,-2):t}function Jt(t,e,r){return t?t.concat(e).map(function(t,e){return t=Wt(t),!r&&e?"["+t+"]":t}).join(r?".":""):e}const Vt=Bt.toFlatObject(Bt,{},null,function(t){return/^is[A-Z]/.test(t)});function Kt(t,e,r){if(!Bt.isObject(t))throw new TypeError("target must be an object");e=e||new FormData;const n=(r=Bt.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(t,e){return!Bt.isUndefined(e[t])})).metaTokens,o=r.visitor||u,s=r.dots,i=r.indexes,a=(r.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(Bt.isBoolean(t))return t.toString();if(!a&&Bt.isBlob(t))throw new qt("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,r,o){let a=t;if(t&&!o&&"object"==typeof t)if(Bt.endsWith(r,"{}"))r=n?r:r.slice(0,-2),t=JSON.stringify(t);else if(Bt.isArray(t)&&function(t){return Bt.isArray(t)&&!t.some(Yt)}(t)||(Bt.isFileList(t)||Bt.endsWith(r,"[]"))&&(a=Bt.toArray(t)))return r=Wt(r),a.forEach(function(t,n){!Bt.isUndefined(t)&&null!==t&&e.append(!0===i?Jt([r],n,s):null===i?r:r+"[]",c(t))}),!1;return!!Yt(t)||(e.append(Jt(o,r,s),c(t)),!1)}const l=[],f=Object.assign(Vt,{defaultVisitor:u,convertValue:c,isVisitable:Yt});if(!Bt.isObject(t))throw new TypeError("data must be an object");return function t(r,n){if(!Bt.isUndefined(r)){if(-1!==l.indexOf(r))throw Error("Circular reference detected in "+n.join("."));l.push(r),Bt.forEach(r,function(r,s){!0===(!(Bt.isUndefined(r)||null===r)&&o.call(e,r,Bt.isString(s)?s.trim():s,n,f))&&t(r,n?n.concat(s):[s])}),l.pop()}}(t),e}function Zt(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(t){return e[t]})}function Xt(t,e){this._pairs=[],t&&Kt(t,this,e)}const Gt=Xt.prototype;function Qt(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function te(t,e,r){if(!e)return t;const n=r&&r.encode||Qt;Bt.isFunction(r)&&(r={serialize:r});const o=r&&r.serialize;let s;if(s=o?o(e,r):Bt.isURLSearchParams(e)?e.toString():new Xt(e,r).toString(n),s){const e=t.indexOf("#");-1!==e&&(t=t.slice(0,e)),t+=(-1===t.indexOf("?")?"?":"&")+s}return t}Gt.append=function(t,e){this._pairs.push([t,e])},Gt.toString=function(t){const e=t?function(e){return t.call(this,e,Zt)}:Zt;return this._pairs.map(function(t){return e(t[0])+"="+e(t[1])},"").join("&")};class ee{constructor(){this.handlers=[]}use(t,e,r){return this.handlers.push({fulfilled:t,rejected:e,synchronous:!!r&&r.synchronous,runWhen:r?r.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 re={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},ne={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:Xt,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const oe="undefined"!=typeof window&&"undefined"!=typeof document,se="object"==typeof navigator&&navigator||void 0,ie=oe&&(!se||["ReactNative","NativeScript","NS"].indexOf(se.product)<0),ae="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,ce=oe&&window.location.href||"http://localhost";var ue={...Object.freeze({__proto__:null,hasBrowserEnv:oe,hasStandardBrowserEnv:ie,hasStandardBrowserWebWorkerEnv:ae,navigator:se,origin:ce}),...ne};function le(t){function e(t,r,n,o){let s=t[o++];if("__proto__"===s)return!0;const i=Number.isFinite(+s),a=o>=t.length;if(s=!s&&Bt.isArray(n)?n.length:s,a)return Bt.hasOwnProp(n,s)?n[s]=[n[s],r]:n[s]=r,!i;n[s]&&Bt.isObject(n[s])||(n[s]=[]);return e(t,r,n[s],o)&&Bt.isArray(n[s])&&(n[s]=function(t){const e={},r=Object.keys(t);let n;const o=r.length;let s;for(n=0;n<o;n++)s=r[n],e[s]=t[s];return e}(n[s])),!i}if(Bt.isFormData(t)&&Bt.isFunction(t.entries)){const r={};return Bt.forEachEntry(t,(t,n)=>{e(function(t){return Bt.matchAll(/\w+|\[(\w*)]/g,t).map(t=>"[]"===t[0]?"":t[1]||t[0])}(t),n,r,0)}),r}return null}const fe={transitional:re,adapter:["xhr","http","fetch"],transformRequest:[function(t,e){const r=e.getContentType()||"",n=r.indexOf("application/json")>-1,o=Bt.isObject(t);o&&Bt.isHTMLForm(t)&&(t=new FormData(t));if(Bt.isFormData(t))return n?JSON.stringify(le(t)):t;if(Bt.isArrayBuffer(t)||Bt.isBuffer(t)||Bt.isStream(t)||Bt.isFile(t)||Bt.isBlob(t)||Bt.isReadableStream(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 s;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return function(t,e){return Kt(t,new ue.classes.URLSearchParams,Object.assign({visitor:function(t,e,r,n){return ue.isNode&&Bt.isBuffer(t)?(this.append(e,t.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)}},e))}(t,this.formSerializer).toString();if((s=Bt.isFileList(t))||r.indexOf("multipart/form-data")>-1){const e=this.env&&this.env.FormData;return Kt(s?{"files[]":t}:t,e&&new e,this.formSerializer)}}return o||n?(e.setContentType("application/json",!1),function(t,e,r){if(Bt.isString(t))try{return(e||JSON.parse)(t),Bt.trim(t)}catch(H){if("SyntaxError"!==H.name)throw H}return(r||JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){const e=this.transitional||fe.transitional,r=e&&e.forcedJSONParsing,n="json"===this.responseType;if(Bt.isResponse(t)||Bt.isReadableStream(t))return t;if(t&&Bt.isString(t)&&(r&&!this.responseType||n)){const r=!(e&&e.silentJSONParsing)&&n;try{return JSON.parse(t)}catch(H){if(r){if("SyntaxError"===H.name)throw qt.from(H,qt.ERR_BAD_RESPONSE,this,null,this.response);throw H}}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ue.classes.FormData,Blob:ue.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=>{fe.headers[t]={}});const de=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 he=Symbol("internals");function pe(t){return t&&String(t).trim().toLowerCase()}function me(t){return!1===t||null==t?t:Bt.isArray(t)?t.map(me):String(t)}function ye(t,e,r,n,o){return Bt.isFunction(n)?n.call(this,e,r):(o&&(e=r),Bt.isString(e)?Bt.isString(n)?-1!==e.indexOf(n):Bt.isRegExp(n)?n.test(e):void 0:void 0)}let ge=class{constructor(t){t&&this.set(t)}set(t,e,r){const n=this;function o(t,e,r){const o=pe(e);if(!o)throw new Error("header name must be a non-empty string");const s=Bt.findKey(n,o);(!s||void 0===n[s]||!0===r||void 0===r&&!1!==n[s])&&(n[s||e]=me(t))}const s=(t,e)=>Bt.forEach(t,(t,r)=>o(t,r,e));if(Bt.isPlainObject(t)||t instanceof this.constructor)s(t,e);else if(Bt.isString(t)&&(t=t.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim()))s((t=>{const e={};let r,n,o;return t&&t.split("\n").forEach(function(t){o=t.indexOf(":"),r=t.substring(0,o).trim().toLowerCase(),n=t.substring(o+1).trim(),!r||e[r]&&de[r]||("set-cookie"===r?e[r]?e[r].push(n):e[r]=[n]:e[r]=e[r]?e[r]+", "+n:n)}),e})(t),e);else if(Bt.isObject(t)&&Bt.isIterable(t)){let r,n,o={};for(const e of t){if(!Bt.isArray(e))throw TypeError("Object iterator must return a key-value pair");o[n=e[0]]=(r=o[n])?Bt.isArray(r)?[...r,e[1]]:[r,e[1]]:e[1]}s(o,e)}else null!=t&&o(e,t,r);return this}get(t,e){if(t=pe(t)){const r=Bt.findKey(this,t);if(r){const t=this[r];if(!e)return t;if(!0===e)return function(t){const e=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(t);)e[n[1]]=n[2];return e}(t);if(Bt.isFunction(e))return e.call(this,t,r);if(Bt.isRegExp(e))return e.exec(t);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=pe(t)){const r=Bt.findKey(this,t);return!(!r||void 0===this[r]||e&&!ye(0,this[r],r,e))}return!1}delete(t,e){const r=this;let n=!1;function o(t){if(t=pe(t)){const o=Bt.findKey(r,t);!o||e&&!ye(0,r[o],o,e)||(delete r[o],n=!0)}}return Bt.isArray(t)?t.forEach(o):o(t),n}clear(t){const e=Object.keys(this);let r=e.length,n=!1;for(;r--;){const o=e[r];t&&!ye(0,this[o],o,t,!0)||(delete this[o],n=!0)}return n}normalize(t){const e=this,r={};return Bt.forEach(this,(n,o)=>{const s=Bt.findKey(r,o);if(s)return e[s]=me(n),void delete e[o];const i=t?function(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,e,r)=>e.toUpperCase()+r)}(o):String(o).trim();i!==o&&delete e[o],e[i]=me(n),r[i]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return Bt.forEach(this,(r,n)=>{null!=r&&!1!==r&&(e[n]=t&&Bt.isArray(r)?r.join(", "):r)}),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,e])=>t+": "+e).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const r=new this(t);return e.forEach(t=>r.set(t)),r}static accessor(t){const e=(this[he]=this[he]={accessors:{}}).accessors,r=this.prototype;function n(t){const n=pe(t);e[n]||(!function(t,e){const r=Bt.toCamelCase(" "+e);["get","set","has"].forEach(n=>{Object.defineProperty(t,n+r,{value:function(t,r,o){return this[n].call(this,e,t,r,o)},configurable:!0})})}(r,t),e[n]=!0)}return Bt.isArray(t)?t.forEach(n):n(t),this}};function be(t,e){const r=this||fe,n=e||r,o=ge.from(n.headers);let s=n.data;return Bt.forEach(t,function(t){s=t.call(r,s,o.normalize(),e?e.status:void 0)}),o.normalize(),s}function we(t){return!(!t||!t.__CANCEL__)}function ve(t,e,r){qt.call(this,null==t?"canceled":t,qt.ERR_CANCELED,e,r),this.name="CanceledError"}function _e(t,e,r){const n=r.config.validateStatus;r.status&&n&&!n(r.status)?e(new qt("Request failed with status code "+r.status,[qt.ERR_BAD_REQUEST,qt.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):t(r)}ge.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Bt.reduceDescriptors(ge.prototype,({value:t},e)=>{let r=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(t){this[r]=t}}}),Bt.freezeMethods(ge),Bt.inherits(ve,qt,{__CANCEL__:!0});const Oe=(t,e,r=3)=>{let n=0;const o=function(t,e){t=t||10;const r=new Array(t),n=new Array(t);let o,s=0,i=0;return e=void 0!==e?e:1e3,function(a){const c=Date.now(),u=n[i];o||(o=c),r[s]=a,n[s]=c;let l=i,f=0;for(;l!==s;)f+=r[l++],l%=t;if(s=(s+1)%t,s===i&&(i=(i+1)%t),c-o<e)return;const d=u&&c-u;return d?Math.round(1e3*f/d):void 0}}(50,250);return function(t,e){let r,n,o=0,s=1e3/e;const i=(e,s=Date.now())=>{o=s,r=null,n&&(clearTimeout(n),n=null),t.apply(null,e)};return[(...t)=>{const e=Date.now(),a=e-o;a>=s?i(t,e):(r=t,n||(n=setTimeout(()=>{n=null,i(r)},s-a)))},()=>r&&i(r)]}(r=>{const s=r.loaded,i=r.lengthComputable?r.total:void 0,a=s-n,c=o(a);n=s;t({loaded:s,total:i,progress:i?s/i:void 0,bytes:a,rate:c||void 0,estimated:c&&i&&s<=i?(i-s)/c:void 0,event:r,lengthComputable:null!=i,[e?"download":"upload"]:!0})},r)},Se=(t,e)=>{const r=null!=t;return[n=>e[0]({lengthComputable:r,total:t,loaded:n}),e[1]]},$e=t=>(...e)=>Bt.asap(()=>t(...e));var Ee=ue.hasStandardBrowserEnv?((t,e)=>r=>(r=new URL(r,ue.origin),t.protocol===r.protocol&&t.host===r.host&&(e||t.port===r.port)))(new URL(ue.origin),ue.navigator&&/(msie|trident)/i.test(ue.navigator.userAgent)):()=>!0,Re=ue.hasStandardBrowserEnv?{write(t,e,r,n,o,s){const i=[t+"="+encodeURIComponent(e)];Bt.isNumber(r)&&i.push("expires="+new Date(r).toGMTString()),Bt.isString(n)&&i.push("path="+n),Bt.isString(o)&&i.push("domain="+o),!0===s&&i.push("secure"),document.cookie=i.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 xe(t,e,r){let n=!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);return t&&(n||0==r)?function(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}(t,e):e}const Te=t=>t instanceof ge?{...t}:t;function Ae(t,e){e=e||{};const r={};function n(t,e,r,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,r,o){return Bt.isUndefined(e)?Bt.isUndefined(t)?void 0:n(void 0,t,0,o):n(t,e,0,o)}function s(t,e){if(!Bt.isUndefined(e))return n(void 0,e)}function i(t,e){return Bt.isUndefined(e)?Bt.isUndefined(t)?void 0:n(void 0,t):n(void 0,e)}function a(r,o,s){return s in e?n(r,o):s in t?n(void 0,r):void 0}const c={url:s,method:s,data:s,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:a,headers:(t,e,r)=>o(Te(t),Te(e),0,!0)};return Bt.forEach(Object.keys(Object.assign({},t,e)),function(n){const s=c[n]||o,i=s(t[n],e[n],n);Bt.isUndefined(i)&&s!==a||(r[n]=i)}),r}var Me=t=>{const e=Ae({},t);let r,{data:n,withXSRFToken:o,xsrfHeaderName:s,xsrfCookieName:i,headers:a,auth:c}=e;if(e.headers=a=ge.from(a),e.url=te(xe(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),c&&a.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),Bt.isFormData(n))if(ue.hasStandardBrowserEnv||ue.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(!1!==(r=a.getContentType())){const[t,...e]=r?r.split(";").map(t=>t.trim()).filter(Boolean):[];a.setContentType([t||"multipart/form-data",...e].join("; "))}if(ue.hasStandardBrowserEnv&&(o&&Bt.isFunction(o)&&(o=o(e)),o||!1!==o&&Ee(e.url))){const t=s&&i&&Re.read(i);t&&a.set(s,t)}return e};var je="undefined"!=typeof XMLHttpRequest&&function(t){return new Promise(function(e,r){const n=Me(t);let o=n.data;const s=ge.from(n.headers).normalize();let i,a,c,u,l,{responseType:f,onUploadProgress:d,onDownloadProgress:h}=n;function p(){u&&u(),l&&l(),n.cancelToken&&n.cancelToken.unsubscribe(i),n.signal&&n.signal.removeEventListener("abort",i)}let m=new XMLHttpRequest;function y(){if(!m)return;const n=ge.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders());_e(function(t){e(t),p()},function(t){r(t),p()},{data:f&&"text"!==f&&"json"!==f?m.response:m.responseText,status:m.status,statusText:m.statusText,headers:n,config:t,request:m}),m=null}m.open(n.method.toUpperCase(),n.url,!0),m.timeout=n.timeout,"onloadend"in m?m.onloadend=y:m.onreadystatechange=function(){m&&4===m.readyState&&(0!==m.status||m.responseURL&&0===m.responseURL.indexOf("file:"))&&setTimeout(y)},m.onabort=function(){m&&(r(new qt("Request aborted",qt.ECONNABORTED,t,m)),m=null)},m.onerror=function(){r(new qt("Network Error",qt.ERR_NETWORK,t,m)),m=null},m.ontimeout=function(){let e=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded";const o=n.transitional||re;n.timeoutErrorMessage&&(e=n.timeoutErrorMessage),r(new qt(e,o.clarifyTimeoutError?qt.ETIMEDOUT:qt.ECONNABORTED,t,m)),m=null},void 0===o&&s.setContentType(null),"setRequestHeader"in m&&Bt.forEach(s.toJSON(),function(t,e){m.setRequestHeader(e,t)}),Bt.isUndefined(n.withCredentials)||(m.withCredentials=!!n.withCredentials),f&&"json"!==f&&(m.responseType=n.responseType),h&&([c,l]=Oe(h,!0),m.addEventListener("progress",c)),d&&m.upload&&([a,u]=Oe(d),m.upload.addEventListener("progress",a),m.upload.addEventListener("loadend",u)),(n.cancelToken||n.signal)&&(i=e=>{m&&(r(!e||e.type?new ve(null,t,m):e),m.abort(),m=null)},n.cancelToken&&n.cancelToken.subscribe(i),n.signal&&(n.signal.aborted?i():n.signal.addEventListener("abort",i)));const g=function(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}(n.url);g&&-1===ue.protocols.indexOf(g)?r(new qt("Unsupported protocol "+g+":",qt.ERR_BAD_REQUEST,t)):m.send(o||null)})};const De=(t,e)=>{const{length:r}=t=t?t.filter(Boolean):[];if(e||r){let r,n=new AbortController;const o=function(t){if(!r){r=!0,i();const e=t instanceof Error?t:this.reason;n.abort(e instanceof qt?e:new ve(e instanceof Error?e.message:e))}};let s=e&&setTimeout(()=>{s=null,o(new qt(`timeout ${e} of ms exceeded`,qt.ETIMEDOUT))},e);const i=()=>{t&&(s&&clearTimeout(s),s=null,t.forEach(t=>{t.unsubscribe?t.unsubscribe(o):t.removeEventListener("abort",o)}),t=null)};t.forEach(t=>t.addEventListener("abort",o));const{signal:a}=n;return a.unsubscribe=()=>Bt.asap(i),a}},ke=function*(t,e){let r=t.byteLength;if(r<e)return void(yield t);let n,o=0;for(;o<r;)n=o+e,yield t.slice(o,n),o=n},Ce=async function*(t){if(t[Symbol.asyncIterator])return void(yield*t);const e=t.getReader();try{for(;;){const{done:t,value:r}=await e.read();if(t)break;yield r}}finally{await e.cancel()}},Ne=(t,e,r,n)=>{const o=async function*(t,e){for await(const r of Ce(t))yield*ke(r,e)}(t,e);let s,i=0,a=t=>{s||(s=!0,n&&n(t))};return new ReadableStream({async pull(t){try{const{done:e,value:n}=await o.next();if(e)return a(),void t.close();let s=n.byteLength;if(r){let t=i+=s;r(t)}t.enqueue(new Uint8Array(n))}catch(e){throw a(e),e}},cancel:t=>(a(t),o.return())},{highWaterMark:2})},Fe="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,Ue=Fe&&"function"==typeof ReadableStream,ze=Fe&&("function"==typeof TextEncoder?(Pe=new TextEncoder,t=>Pe.encode(t)):async t=>new Uint8Array(await new Response(t).arrayBuffer()));var Pe;const Le=(t,...e)=>{try{return!!t(...e)}catch(H){return!1}},Be=Ue&&Le(()=>{let t=!1;const e=new Request(ue.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e}),qe=Ue&&Le(()=>Bt.isReadableStream(new Response("").body)),Ie={stream:qe&&(t=>t.body)};var He;Fe&&(He=new Response,["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Ie[t]&&(Ie[t]=Bt.isFunction(He[t])?e=>e[t]():(e,r)=>{throw new qt(`Response type '${t}' is not supported`,qt.ERR_NOT_SUPPORT,r)})}));const Ye=async(t,e)=>{const r=Bt.toFiniteNumber(t.getContentLength());return null==r?(async t=>{if(null==t)return 0;if(Bt.isBlob(t))return t.size;if(Bt.isSpecCompliantForm(t)){const e=new Request(ue.origin,{method:"POST",body:t});return(await e.arrayBuffer()).byteLength}return Bt.isArrayBufferView(t)||Bt.isArrayBuffer(t)?t.byteLength:(Bt.isURLSearchParams(t)&&(t+=""),Bt.isString(t)?(await ze(t)).byteLength:void 0)})(e):r};const We={http:null,xhr:je,fetch:Fe&&(async t=>{let{url:e,method:r,data:n,signal:o,cancelToken:s,timeout:i,onDownloadProgress:a,onUploadProgress:c,responseType:u,headers:l,withCredentials:f="same-origin",fetchOptions:d}=Me(t);u=u?(u+"").toLowerCase():"text";let h,p=De([o,s&&s.toAbortSignal()],i);const m=p&&p.unsubscribe&&(()=>{p.unsubscribe()});let y;try{if(c&&Be&&"get"!==r&&"head"!==r&&0!==(y=await Ye(l,n))){let t,r=new Request(e,{method:"POST",body:n,duplex:"half"});if(Bt.isFormData(n)&&(t=r.headers.get("content-type"))&&l.setContentType(t),r.body){const[t,e]=Se(y,Oe($e(c)));n=Ne(r.body,65536,t,e)}}Bt.isString(f)||(f=f?"include":"omit");const o="credentials"in Request.prototype;h=new Request(e,{...d,signal:p,method:r.toUpperCase(),headers:l.normalize().toJSON(),body:n,duplex:"half",credentials:o?f:void 0});let s=await fetch(h,d);const i=qe&&("stream"===u||"response"===u);if(qe&&(a||i&&m)){const t={};["status","statusText","headers"].forEach(e=>{t[e]=s[e]});const e=Bt.toFiniteNumber(s.headers.get("content-length")),[r,n]=a&&Se(e,Oe($e(a),!0))||[];s=new Response(Ne(s.body,65536,r,()=>{n&&n(),m&&m()}),t)}u=u||"text";let g=await Ie[Bt.findKey(Ie,u)||"text"](s,t);return!i&&m&&m(),await new Promise((e,r)=>{_e(e,r,{data:g,headers:ge.from(s.headers),status:s.status,statusText:s.statusText,config:t,request:h})})}catch(g){if(m&&m(),g&&"TypeError"===g.name&&/Load failed|fetch/i.test(g.message))throw Object.assign(new qt("Network Error",qt.ERR_NETWORK,t,h),{cause:g.cause||g});throw qt.from(g,g&&g.code,t,h)}})};Bt.forEach(We,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch(H){}Object.defineProperty(t,"adapterName",{value:e})}});const Je=t=>`- ${t}`,Ve=t=>Bt.isFunction(t)||null===t||!1===t;var Ke=t=>{t=Bt.isArray(t)?t:[t];const{length:e}=t;let r,n;const o={};for(let s=0;s<e;s++){let e;if(r=t[s],n=r,!Ve(r)&&(n=We[(e=String(r)).toLowerCase()],void 0===n))throw new qt(`Unknown adapter '${e}'`);if(n)break;o[e||"#"+s]=n}if(!n){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 qt("There is no suitable adapter to dispatch the request "+(e?t.length>1?"since :\n"+t.map(Je).join("\n"):" "+Je(t[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return n};function Ze(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new ve(null,t)}function Xe(t){Ze(t),t.headers=ge.from(t.headers),t.data=be.call(t,t.transformRequest),-1!==["post","put","patch"].indexOf(t.method)&&t.headers.setContentType("application/x-www-form-urlencoded",!1);return Ke(t.adapter||fe.adapter)(t).then(function(e){return Ze(t),e.data=be.call(t,t.transformResponse,e),e.headers=ge.from(e.headers),e},function(e){return we(e)||(Ze(t),e&&e.response&&(e.response.data=be.call(t,t.transformResponse,e.response),e.response.headers=ge.from(e.response.headers))),Promise.reject(e)})}const Ge="1.10.0",Qe={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{Qe[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});const tr={};Qe.transitional=function(t,e,r){function n(t,e){return"[Axios v"+Ge+"] Transitional option '"+t+"'"+e+(r?". "+r:"")}return(r,o,s)=>{if(!1===t)throw new qt(n(o," has been removed"+(e?" in "+e:"")),qt.ERR_DEPRECATED);return e&&!tr[o]&&(tr[o]=!0,console.warn(n(o," has been deprecated since v"+e+" and will be removed in the near future"))),!t||t(r,o,s)}},Qe.spelling=function(t){return(e,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};var er={assertOptions:function(t,e,r){if("object"!=typeof t)throw new qt("options must be an object",qt.ERR_BAD_OPTION_VALUE);const n=Object.keys(t);let o=n.length;for(;o-- >0;){const s=n[o],i=e[s];if(i){const e=t[s],r=void 0===e||i(e,s,t);if(!0!==r)throw new qt("option "+s+" must be "+r,qt.ERR_BAD_OPTION_VALUE);continue}if(!0!==r)throw new qt("Unknown option "+s,qt.ERR_BAD_OPTION)}},validators:Qe};const rr=er.validators;let nr=class{constructor(t){this.defaults=t||{},this.interceptors={request:new ee,response:new ee}}async request(t,e){try{return await this._request(t,e)}catch(r){if(r instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;const e=t.stack?t.stack.replace(/^.+\n/,""):"";try{r.stack?e&&!String(r.stack).endsWith(e.replace(/^.+\n.+\n/,""))&&(r.stack+="\n"+e):r.stack=e}catch(H){}}throw r}}_request(t,e){"string"==typeof t?(e=e||{}).url=t:e=t||{},e=Ae(this.defaults,e);const{transitional:r,paramsSerializer:n,headers:o}=e;void 0!==r&&er.assertOptions(r,{silentJSONParsing:rr.transitional(rr.boolean),forcedJSONParsing:rr.transitional(rr.boolean),clarifyTimeoutError:rr.transitional(rr.boolean)},!1),null!=n&&(Bt.isFunction(n)?e.paramsSerializer={serialize:n}:er.assertOptions(n,{encode:rr.function,serialize:rr.function},!0)),void 0!==e.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?e.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:e.allowAbsoluteUrls=!0),er.assertOptions(e,{baseUrl:rr.spelling("baseURL"),withXsrfToken:rr.spelling("withXSRFToken")},!0),e.method=(e.method||this.defaults.method||"get").toLowerCase();let s=o&&Bt.merge(o.common,o[e.method]);o&&Bt.forEach(["delete","get","head","post","put","patch","common"],t=>{delete o[t]}),e.headers=ge.concat(s,o);const i=[];let a=!0;this.interceptors.request.forEach(function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(a=a&&t.synchronous,i.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=[Xe.bind(this),void 0];for(t.unshift.apply(t,i),t.push.apply(t,c),l=t.length,u=Promise.resolve(e);f<l;)u=u.then(t[f++],t[f++]);return u}l=i.length;let d=e;for(f=0;f<l;){const t=i[f++],e=i[f++];try{d=t(d)}catch(h){e.call(this,h);break}}try{u=Xe.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 te(xe((t=Ae(this.defaults,t)).baseURL,t.url,t.allowAbsoluteUrls),t.params,t.paramsSerializer)}};Bt.forEach(["delete","get","head","options"],function(t){nr.prototype[t]=function(e,r){return this.request(Ae(r||{},{method:t,url:e,data:(r||{}).data}))}}),Bt.forEach(["post","put","patch"],function(t){function e(e){return function(r,n,o){return this.request(Ae(o||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}nr.prototype[t]=e(),nr.prototype[t+"Form"]=e(!0)});const or={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(or).forEach(([t,e])=>{or[e]=t});const sr=function t(e){const r=new nr(e),n=G(nr.prototype.request,r);return Bt.extend(n,nr.prototype,r,{allOwnKeys:!0}),Bt.extend(n,r,null,{allOwnKeys:!0}),n.create=function(r){return t(Ae(e,r))},n}(fe);sr.Axios=nr,sr.CanceledError=ve,sr.CancelToken=class t{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 r=this;this.promise.then(t=>{if(!r._listeners)return;let e=r._listeners.length;for(;e-- >0;)r._listeners[e](t);r._listeners=null}),this.promise.then=t=>{let e;const n=new Promise(t=>{r.subscribe(t),e=t}).then(t);return n.cancel=function(){r.unsubscribe(e)},n},t(function(t,n,o){r.reason||(r.reason=new ve(t,n,o),e(r.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)}toAbortSignal(){const t=new AbortController,e=e=>{t.abort(e)};return this.subscribe(e),t.signal.unsubscribe=()=>this.unsubscribe(e),t.signal}static source(){let e;return{token:new t(function(t){e=t}),cancel:e}}},sr.isCancel=we,sr.VERSION=Ge,sr.toFormData=Kt,sr.AxiosError=qt,sr.Cancel=sr.CanceledError,sr.all=function(t){return Promise.all(t)},sr.spread=function(t){return function(e){return t.apply(null,e)}},sr.isAxiosError=function(t){return Bt.isObject(t)&&!0===t.isAxiosError},sr.mergeConfig=Ae,sr.AxiosHeaders=ge,sr.formToJSON=t=>le(Bt.isHTMLForm(t)?new FormData(t):t),sr.getAdapter=Ke,sr.HttpStatusCode=or,sr.default=sr;const{Axios:ir,AxiosError:ar,CanceledError:cr,isCancel:ur,CancelToken:lr,VERSION:fr,all:dr,Cancel:hr,isAxiosError:pr,spread:mr,toFormData:yr,AxiosHeaders:gr,HttpStatusCode:br,formToJSON:wr,getAdapter:vr,mergeConfig:_r}=sr,Or=`${"undefined"!=typeof window?window.location.origin:self.location.origin}/api/1.0/`,Sr=sr.create({baseURL:Or});class $r{data;dataFields;displayField;lastUpdated;markerParams;monitorFields;constructor(t){const e=M(t);t.latest&&parseInt(t.latest.value,10)<0&&(t.latest.value="0"),this.data=t,this.markerParams=function(t){const e="pm25"===t.latest.entry_type?A.levels:x,r=`#${b}`,n={border_color:g(m(r,.1)),border_size:1,fill_color:r,value_color:r,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 r=T(+t.latest.value,e);if(n.value_color=r,t.is_active)switch(n.fill_color=T(+t.latest.value,e),n.border_color="pm25"===t.latest.entry_type?g(m(n.fill_color,.1)):`#${v}`,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=`#${w}`,n.border_size=2)}return n}(t),this.monitorFields=e,this.dataFields=Object.keys(this.monitorFields),this.displayField=e.pm25,this.lastUpdated=t.latest&&Object.keys(t.latest).length>1?X(t.latest.timestamp).fromNow():"never"}}function Er(t){return new URL(`https://www.sjvair.com/api/2.0/${`monitors/${t}/current`}/`)}async function Rr(t){const e=Er(t);return await async function(t,e){return await fetch(t,e).then(async e=>{const r=await e.json().catch(r=>{throw new Error(`Request to endpoint "${t.href}" failed`,{cause:e})});return{headers:e.headers,body:r,ok:e.ok,redirected:e.redirected,status:e.status,statusText:e.statusText,url:e.url}})}(e)}var xr=Object.freeze({__proto__:null,fetchMonitors:async function(t){return async function(t){try{return(await Rr(t)).body.data}catch(e){throw new Error("Failed to fetch monitors latest page",{cause:e})}}(t).then(t=>{const e={};if(t&&Object.keys(t).length)for(let r of t)e[r.id]=new $r(r);return e})},fetchSubscriptions:async function(){return Sr.get("alerts/subscriptions").then(t=>t.data.data)},fetchTempByCoords:async function(t){const e=`https://api.weather.gov/points/${t.join(",")}`;return await Sr(e).then(async t=>{try{return(await Sr(t.data.properties.forecastHourly)).data.properties.periods[0].temperature}catch(e){throw e}})}});new class{serviceModule;serviceModuleName;constructor(e,r){this.serviceModule=r,this.serviceModuleName=e,self.addEventListener("message",async e=>{const{id:r,taskName:n,parameters:o}=e.data;this.serviceModule[n];const s=new t(r);n in this.serviceModule?await this.serviceModule[n](...o).then(t=>s.pass(t)).catch(t=>s.fail(t.message)):s.fail(`Background task "${String(n)}" not found in "${this.serviceModuleName}" controller`),self.postMessage(s)})}}("MonitorsService",xr);
|
|
Binary file
|
|
Binary file
|