From b7967fca059e26bc3781ee642591ed3f261c4b64 Mon Sep 17 00:00:00 2001 From: Matt Walsh Date: Wed, 28 Oct 2020 21:29:58 -0500 Subject: [PATCH] More icon options for hourly forecast --- dist/index.html | 2 +- dist/resources/ws.min.js | 2 +- server/scripts/modules/icons.js | 29 ++++++++++++++++++++++++++--- version.js | 2 +- 4 files changed, 29 insertions(+), 6 deletions(-) diff --git a/dist/index.html b/dist/index.html index 4018a6a..6e78b9c 100644 --- a/dist/index.html +++ b/dist/index.html @@ -1 +1 @@ -WeatherStar 4000+

WeatherStar 4000+
Enter your location above to continue

More information
Selected displays
Location:
Station Id:
Radar Id:
Zone Id:
Last Update: (None)
Units:
\ No newline at end of file +WeatherStar 4000+

WeatherStar 4000+
Enter your location above to continue

More information
Selected displays
Location:
Station Id:
Radar Id:
Zone Id:
Last Update: (None)
Units:
\ No newline at end of file diff --git a/dist/resources/ws.min.js b/dist/resources/ws.min.js index ecdb5f2..ed60ba8 100644 --- a/dist/resources/ws.min.js +++ b/dist/resources/ws.min.js @@ -33,4 +33,4 @@ function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t * @author John Doherty * @license MIT */ -function(e,t){"use strict";"function"!=typeof e.CustomEvent&&(e.CustomEvent=function(e,n){n=n||{bubbles:!1,cancelable:!1,detail:void 0};var r=t.createEvent("CustomEvent");return r.initCustomEvent(e,n.bubbles,n.cancelable,n.detail),r},e.CustomEvent.prototype=e.Event.prototype),t.addEventListener("touchstart",(function(e){if("true"===e.target.getAttribute("data-swipe-ignore"))return;s=e.target,o=Date.now(),n=e.touches[0].clientX,r=e.touches[0].clientY,i=0,a=0}),!1),t.addEventListener("touchmove",(function(e){if(!n||!r)return;var t=e.touches[0].clientX,o=e.touches[0].clientY;i=n-t,a=r-o}),!1),t.addEventListener("touchend",(function(e){if(s!==e.target)return;var t=parseInt(u(s,"data-swipe-threshold","20"),10),l=parseInt(u(s,"data-swipe-timeout","500"),10),c=Date.now()-o,d="",h=e.changedTouches||e.touches||[];Math.abs(i)>Math.abs(a)?Math.abs(i)>t&&c0?"swiped-left":"swiped-right"):Math.abs(a)>t&&c0?"swiped-up":"swiped-down");if(""!==d){var f={dir:d.replace(/swiped-/,""),xStart:parseInt(n,10),xEnd:parseInt((h[0]||{}).clientX||-1,10),yStart:parseInt(r,10),yEnd:parseInt((h[0]||{}).clientY||-1,10)};s.dispatchEvent(new CustomEvent("swiped",{bubbles:!0,cancelable:!0,detail:f})),s.dispatchEvent(new CustomEvent(d,{bubbles:!0,cancelable:!0,detail:f}))}n=null,r=null,o=null}),!1);var n=null,r=null,i=null,a=null,o=null,s=null;function u(e,n,r){for(;e&&e!==t.documentElement;){var i=e.getAttribute(n);if(i)return i;e=e.parentNode}return r}}(window,document),document.addEventListener("DOMContentLoaded",()=>{index.init()});const index=(()=>{const e={},t=6e5,n=new NoSleep;let r=!1,i=null,a=null,o=0,s=!1;const u=["Land Features","Bay","Channel","Cove","Dam","Delta","Gulf","Lagoon","Lake","Ocean","Reef","Reservoir","Sea","Sound","Strait","Waterfall","Wharf","Amusement Park","Historical Monument","Landmark","Tourist Attraction","Zoo","College","Beach","Campground","Golf Course","Harbor","Nature Reserve","Other Parks and Outdoors","Park","Racetrack","Scenic Overlook","Ski Resort","Sports Center","Sports Field","Wildlife Reserve","Airport","Ferry","Marina","Pier","Port","Resort","Postal","Populated Place"].join(","),l=e=>{const t=e.target.value;localStorage.setItem("TwcUnits",t),v(),F("units",t)},c=async t=>{if(this.previousSuggestionValue!==t.value)if(e[t.value])d(e[t.value]);else{const e=(await utils.fetch.json("https://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer/find",{data:{text:t.value,magicKey:t.data,f:"json"}})).locations[0];e?d(e.feature.geometry):alert("An unexpected error occurred. Please try a different search string.")}},d=e=>{const t={lat:Math.round2(e.y,4),lon:Math.round2(e.x,4)};g(t),localStorage.setItem("TwcQuery",document.getElementById("txtAddress").value)},h=()=>(document.fullscreenElement?A():f(),navigation.isPlaying()?N():M(),S(),!1),f=()=>{const e=document.getElementById("divTwc"),t=e.requestFullScreen||e.webkitRequestFullScreen||e.mozRequestFullScreen||e.msRequestFullscreen;t?t.call(e,{navigationUI:"hide"}):(window.scrollTo(0,0),s=!0),S()},A=()=>{s&&(s=!1),document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen&&document.msExitFullscreen()},p=()=>(F("navButton","menu"),S(),!1),g=e=>{e&&(g.latLon=e);const t=g.latLon;t&&(document.getElementById("txtAddress").blur(),I(),i=null,v(),F("latLon",t))},m=e=>{switch(e){case"left":w();break;case"right":default:x()}},v=()=>{let e="(None)";if(i)switch(navigation.units()){case UNITS.english:e=i.toLocaleString("en-US",{weekday:"short",month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"});break;default:e=i.toLocaleString("en-GB",{weekday:"short",month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"})}document.getElementById("spanLastRefresh").innerHTML=e,i&&document.getElementById("chkAutoRefresh").checked&&k()},y=()=>(g(),S(),!1),w=()=>(F("navButton","next"),S(),!1),x=()=>(F("navButton","previous"),S(),!1);let b=null;const S=()=>{document.activeElement.blur(),document.getElementById("divTwcBottom").classList.remove("hidden"),document.getElementById("divTwcBottom").classList.add("visible"),b&&(clearTimeout(b),b=null),b=setTimeout(()=>{document.fullscreenElement&&(document.getElementById("divTwcBottom").classList.remove("visible"),document.getElementById("divTwcBottom").classList.add("hidden"))},2e3)},C=e=>{const t=e.keyCode||e.which;if(document.fullscreenElement||document.activeElement===document.body)switch(t){case 32:return T(),!1;case 39:case 34:return w(),!1;case 37:case 33:return x(),!1;case 36:return p(),!1;case 48:return y(),!1;case 70:return h(),!1}};Math.round2=(e,t)=>Number(Math.round(e+"e"+t)+"e-"+t);const T=()=>(F("navButton","playToggle"),S(),!1),F=(e,t={})=>{navigation.message({type:e,message:t})},k=()=>{if(a)return;o=0;const e=()=>{o+=500;let e=t-o;e<0&&(e=0);const n=new Date(e);document.getElementById("spanRefreshCountDown").innerHTML=(n.getMinutes()<10?"0"+n.getMinutes():n.getMinutes())+":"+(n.getSeconds()<10?"0"+n.getSeconds():n.getSeconds()),o>=t&&g()};a=window.setInterval(e,500),e()},I=()=>{a&&(window.clearInterval(a),document.getElementById("spanRefreshCountDown").innerHTML="--:--",a=null)},E=async()=>{if(!navigator.geolocation)return;const e=await new Promise(e=>{navigator.geolocation.getCurrentPosition(e)}),t=e.coords.latitude,n=e.coords.longitude;let r;try{r=await utils.fetch.json("https://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer/reverseGeocode",{data:{location:n+","+t,distance:1e3,f:"json"}})}catch(e){console.error("Unable to fetch reverse geocode"),console.error(e.status,e.responseJSONe)}const i=`${r.address.Postal}, ${r.address.City}, ${states.getTwoDigitCode(r.address.Region)}, ${r.address.CountryCode}`,a=document.getElementById("txtAddress");a.value=i,a.blur(),a.focus(),localStorage.setItem("TwcQuery",i)},D=e=>{document.getElementById("spanCity").innerHTML=e.city+", ",document.getElementById("spanState").innerHTML=e.state,document.getElementById("spanStationId").innerHTML=e.stationId,document.getElementById("spanRadarId").innerHTML=e.radarId,document.getElementById("spanZoneId").innerHTML=e.zoneId};let L=!1;const N=()=>{n.enable(),L=!0},M=()=>{L&&(n.disable(),L=!1)};return{init:()=>{document.getElementById("txtAddress").addEventListener("focus",e=>{e.target.select()}),document.getElementById("NavigateMenu").addEventListener("click",p),document.getElementById("NavigateRefresh").addEventListener("click",y),document.getElementById("NavigateNext").addEventListener("click",w),document.getElementById("NavigatePrevious").addEventListener("click",x),document.getElementById("NavigatePlay").addEventListener("click",T),document.getElementById("ToggleFullScreen").addEventListener("click",h),document.getElementById("btnGetGps").addEventListener("click",E),document.getElementById("divTwc").addEventListener("click",()=>{document.fullscreenElement&&S()}),document.addEventListener("keydown",C),document.addEventListener("touchmove",e=>{s&&e.preventDefault()}),$("#frmGetLatLng #txtAddress").devbridgeAutocomplete({serviceUrl:"https://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer/suggest",deferRequestBy:300,paramName:"text",params:{f:"json",countryCode:"USA",category:u,maxSuggestions:10},dataType:"json",transformResult:t=>(r&&(r=!1,window.setTimeout(()=>{$(e.suggestionsContainer.children[0]).click()},1)),{suggestions:$.map(t.suggestions,(function(e){return{value:e.text,data:e.magicKey}}))}),minChars:3,showNoSuggestionNotice:!0,noSuggestionNotice:"No results found. Please try a different search string.",onSelect:c,width:490});const e=$("#frmGetLatLng #txtAddress").devbridgeAutocomplete();$("#frmGetLatLng").submit(()=>(e.suggestions[0]&&$(e.suggestionsContainer.children[0]).click(),!1));const t=localStorage.getItem("TwcQuery");if(t){r=!0;const e=document.getElementById("txtAddress");e.value=t,e.blur(),e.focus()}const n=localStorage.getItem("TwcPlay");null!==n&&"true"!==n||F("navButton","play"),document.getElementById("btnClearQuery").addEventListener("click",()=>{document.getElementById("spanCity").innerHTML="",document.getElementById("spanState").innerHTML="",document.getElementById("spanStationId").innerHTML="",document.getElementById("spanRadarId").innerHTML="",document.getElementById("spanZoneId").innerHTML="",localStorage.removeItem("TwcScrollText"),localStorage.removeItem("TwcScrollTextChecked"),document.getElementById("chkAutoRefresh").checked=!0,localStorage.removeItem("TwcAutoRefresh"),document.getElementById("radEnglish").checked=!0,localStorage.removeItem("TwcUnits"),localStorage.removeItem("TwcPlay"),F("navButton","play"),localStorage.removeItem("TwcQuery")});const a=localStorage.getItem("TwcUnits");a&&"ENGLISH"!==a?"METRIC"===a&&(document.getElementById("radMetric").checked=!0):document.getElementById("radEnglish").checked=!0,document.getElementById("radEnglish").addEventListener("change",l),document.getElementById("radMetric").addEventListener("change",l),document.getElementById("chkAutoRefresh").addEventListener("change",e=>{const t=e.target.checked;i&&(t?k():I()),localStorage.setItem("TwcAutoRefresh",t)});const o=localStorage.getItem("TwcAutoRefresh");document.getElementById("chkAutoRefresh").checked=!o||"true"===o,document.getElementById("container").addEventListener("swiped-left",()=>m("left")),document.getElementById("container").addEventListener("swiped-right",()=>m("right"))},message:e=>{const t=document.getElementById("NavigatePlay");if(e.type)switch(e.type){case"loaded":i=new Date,v();break;case"weatherParameters":D(e.message);break;case"isPlaying":localStorage.setItem("TwcPlay",navigation.isPlaying()),navigation.isPlaying()?(N(),t.title="Pause",t.src="images/nav/ic_pause_white_24dp_1x.png"):(M(),t.title="Play",t.src="images/nav/ic_play_arrow_white_24dp_1x.png");break;default:console.error("Unknown event '"+e.eventType)}}}})();!function(e,t){"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?module.exports=t():e.SuperGif=t()}(this,(function(){var e=function(e){return e.reduce((function(e,t){return 2*e+t}),0)},t=function(e){for(var t=[],n=7;n>=0;n--)t.push(!!(e&1<=this.data.length)throw new Error("Attempted to read past end of stream.");return e instanceof Uint8Array?e[this.pos++]:255&e.charCodeAt(this.pos++)},this.readBytes=function(e){for(var t=[],n=0;n>3)&1<<(7&i)&&(n|=1<v.length-1&&(r=0),r<0&&(r=0),e=y[r],T.getContext("2d").putImageData(v[r].data,e.x,e.y),S.globalCompositeOperation="copy",S.drawImage(T,0,0),a.canvas.getContext("2d").drawImage(b,a.x,a.y)};return{init:function(){s||(a.c_w&&a.c_h||S.scale(q(),q()),a.auto_play?u():(r=0,l()))},step:u,play:function(){g=!0,u()},pause:function(){g=!1},playing:g,move_relative:o,current_frame:function(){return r},length:function(){return v.length},move_to:function(e){r=e,l()}}}(),W=function(e){j(t.pos,t.data.length,e)},Q=function(){},V=function(e,t){return function(n){e(n),W(t)}},G={hdr:V((function(e){H((i=e).width,i.height)})),gce:V((function(e){P(),B(),l=e.transparencyGiven?e.transparencyIndex:null,c=e.delayTime,d=e.disposalMethod})),com:V(Q),app:{NETSCAPE:V(Q)},img:V((function(e){A||(A=T.getContext("2d"));var t=v.length,n=e.lctFlag?e.lct:i.gct;t>0&&(3===f?null!==h?A.putImageData(v[h].data,0,0):A.clearRect(p.leftPos,p.topPos,p.width,p.height):h=t-1,2===f&&A.clearRect(p.leftPos,p.topPos,p.width,p.height));var r=A.getImageData(e.leftPos,e.topPos,e.width,e.height);e.pixels.forEach((function(e,t){e!==l&&(r.data[4*t+0]=n[e][0],r.data[4*t+1]=n[e][1],r.data[4*t+2]=n[e][2],r.data[4*t+3]=255)})),A.putImageData(r,e.leftPos,e.topPos),m||(S.scale(q(),q()),m=!0),E&&(S.drawImage(T,0,0),E=a.auto_play),p=e}),!0),eof:function(e){P(),W(!1),a.c_w&&a.c_h||(b.width=i.width*q(),b.height=i.height*q()),R.init(),u=!1,Z&&Z(x)}},U=function(){var e=x.parentNode,t=document.createElement("div");b=document.createElement("canvas"),S=b.getContext("2d"),C=document.createElement("div"),T=document.createElement("canvas"),t.width=b.width=x.width,t.height=b.height=x.height,C.style.minWidth=x.width+"px",t.className="jsgif",C.className="jsgif_toolbar",t.style.display="none",t.appendChild(b),t.appendChild(C),e&&(e.insertBefore(t,x),e.removeChild(x)),a.c_w&&a.c_h&&H(a.c_w,a.c_h),z=!0},q=function(){return a.max_width&&i&&i.width>a.max_width?a.max_width/i.width:a.max_height&&i&&i.height>a.max_height?a.max_height/i.height:1},z=!1,Z=!1,Y=function(e){return!u&&(Z=e||!1,u=!0,v=[],B(),h=null,f=null,A=null,p=null,!0)};return{play:R.play,pause:R.pause,move_relative:R.move_relative,move_to:R.move_to,get_playing:function(){return g},get_canvas:function(){return b},get_canvas_scale:function(){return q()},get_loading:function(){return u},get_auto_play:function(){return a.auto_play},get_length:function(){return R.length()},get_current_frame:function(){return R.current_frame()},load_url:function(e,r){if(Y(r)){var i=new XMLHttpRequest;i.open("GET",e,!0),"overrideMimeType"in i?i.overrideMimeType("text/plain; charset=x-user-defined"):"responseType"in i?i.responseType="arraybuffer":i.setRequestHeader("Accept-Charset","x-user-defined"),i.onloadstart=function(){z||U()},i.onload=function(e){200!=this.status&&_("xhr - response"),"response"in this||(this.response=new VBArray(this.responseText).toArray().map(String.fromCharCode).join(""));var r=this.response;r.toString().indexOf("ArrayBuffer")>0&&(r=new Uint8Array(r)),t=new n(r),setTimeout(O,0)},i.onprogress=function(e){e.lengthComputable&&j(e.loaded,e.total,!0)},i.onerror=function(){_("xhr")},i.send()}},load:function(e){this.load_url(x.getAttribute("rel:animated_src")||x.src,e)},load_raw:function(e,r){Y(r)&&(z||U(),t=new n(e),setTimeout(O,0))},set_frame_offset:function(e,t){y[e]?(void 0!==t.x&&(y[e].x=t.x),void 0!==t.y&&(y[e].y=t.y)):y[e]=t},getX:function(){return a.x},setX:function(e){a.x=e},getY:function(){return a.y},setY:function(e){a.y=e},setFirstTime:function(){!0}}}}));var luxon=function(e){"use strict";function t(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[t++]}};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(t=e[Symbol.iterator]()).next.bind(t)}var d=function(e){function t(){return e.apply(this,arguments)||this}return r(t,e),t}(u(Error)),h=function(e){function t(t){return e.call(this,"Invalid DateTime: "+t.toMessage())||this}return r(t,e),t}(d),f=function(e){function t(t){return e.call(this,"Invalid Interval: "+t.toMessage())||this}return r(t,e),t}(d),A=function(e){function t(t){return e.call(this,"Invalid Duration: "+t.toMessage())||this}return r(t,e),t}(d),p=function(e){function t(){return e.apply(this,arguments)||this}return r(t,e),t}(d),g=function(e){function t(t){return e.call(this,"Invalid unit "+t)||this}return r(t,e),t}(d),m=function(e){function t(){return e.apply(this,arguments)||this}return r(t,e),t}(d),v=function(e){function t(){return e.call(this,"Zone is an abstract class")||this}return r(t,e),t}(d),y="numeric",w="short",x="long",b={year:y,month:y,day:y},S={year:y,month:w,day:y},C={year:y,month:w,day:y,weekday:w},T={year:y,month:x,day:y},F={year:y,month:x,day:y,weekday:x},k={hour:y,minute:y},I={hour:y,minute:y,second:y},E={hour:y,minute:y,second:y,timeZoneName:w},D={hour:y,minute:y,second:y,timeZoneName:x},L={hour:y,minute:y,hour12:!1},N={hour:y,minute:y,second:y,hour12:!1},M={hour:y,minute:y,second:y,hour12:!1,timeZoneName:w},B={hour:y,minute:y,second:y,hour12:!1,timeZoneName:x},O={year:y,month:y,day:y,hour:y,minute:y},H={year:y,month:y,day:y,hour:y,minute:y,second:y},j={year:y,month:w,day:y,hour:y,minute:y},_={year:y,month:w,day:y,hour:y,minute:y,second:y},P={year:y,month:w,day:y,weekday:w,hour:y,minute:y},R={year:y,month:x,day:y,hour:y,minute:y,timeZoneName:w},W={year:y,month:x,day:y,hour:y,minute:y,second:y,timeZoneName:w},Q={year:y,month:x,day:y,weekday:x,hour:y,minute:y,timeZoneName:x},V={year:y,month:x,day:y,weekday:x,hour:y,minute:y,second:y,timeZoneName:x};function G(e){return void 0===e}function U(e){return"number"==typeof e}function q(e){return"number"==typeof e&&e%1==0}function z(){try{return"undefined"!=typeof Intl&&Intl.DateTimeFormat}catch(e){return!1}}function Z(){return!G(Intl.DateTimeFormat.prototype.formatToParts)}function Y(){try{return"undefined"!=typeof Intl&&!!Intl.RelativeTimeFormat}catch(e){return!1}}function $(e,t,n){if(0!==e.length)return e.reduce((function(e,r){var i=[t(r),r];return e&&n(e[0],i[0])===e[0]?e:i}),null)[1]}function X(e,t){return t.reduce((function(t,n){return t[n]=e[n],t}),{})}function J(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function K(e,t,n){return q(e)&&e>=t&&e<=n}function ee(e,t){return void 0===t&&(t=2),e.toString().length=0&&(t=new Date(t)).setUTCFullYear(t.getUTCFullYear()-1900),+t}function ue(e){var t=(e+Math.floor(e/4)-Math.floor(e/100)+Math.floor(e/400))%7,n=e-1,r=(n+Math.floor(n/4)-Math.floor(n/100)+Math.floor(n/400))%7;return 4===t||3===r?53:52}function le(e){return e>99?e:e>60?1900+e:2e3+e}function ce(e,t,n,r){void 0===r&&(r=null);var i=new Date(e),a={hour12:!1,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};r&&(a.timeZone=r);var o=Object.assign({timeZoneName:t},a),s=z();if(s&&Z()){var u=new Intl.DateTimeFormat(n,o).formatToParts(i).find((function(e){return"timezonename"===e.type.toLowerCase()}));return u?u.value:null}if(s){var l=new Intl.DateTimeFormat(n,a).format(i);return new Intl.DateTimeFormat(n,o).format(i).substring(l.length).replace(/^[, \u200e]+/,"")}return null}function de(e,t){var n=parseInt(e,10);Number.isNaN(n)&&(n=0);var r=parseInt(t,10)||0;return 60*n+(n<0||Object.is(n,-0)?-r:r)}function he(e){var t=Number(e);if("boolean"==typeof e||""===e||Number.isNaN(t))throw new m("Invalid unit value "+e);return t}function fe(e,t,n){var r={};for(var i in e)if(J(e,i)){if(n.indexOf(i)>=0)continue;var a=e[i];if(null==a)continue;r[t(i)]=he(a)}return r}function Ae(e,t){var n=Math.trunc(Math.abs(e/60)),r=Math.trunc(Math.abs(e%60)),i=e>=0?"+":"-";switch(t){case"short":return""+i+ee(n,2)+":"+ee(r,2);case"narrow":return""+i+n+(r>0?":"+r:"");case"techie":return""+i+ee(n,2)+ee(r,2);default:throw new RangeError("Value format "+t+" is out of range for property format")}}function pe(e){return X(e,["hour","minute","second","millisecond"])}var ge=/[A-Za-z_+-]{1,256}(:?\/[A-Za-z_+-]{1,256}(\/[A-Za-z_+-]{1,256})?)?/;function me(e){return JSON.stringify(e,Object.keys(e).sort())}var ve=["January","February","March","April","May","June","July","August","September","October","November","December"],ye=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],we=["J","F","M","A","M","J","J","A","S","O","N","D"];function xe(e){switch(e){case"narrow":return we;case"short":return ye;case"long":return ve;case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}var be=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Se=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],Ce=["M","T","W","T","F","S","S"];function Te(e){switch(e){case"narrow":return Ce;case"short":return Se;case"long":return be;case"numeric":return["1","2","3","4","5","6","7"];default:return null}}var Fe=["AM","PM"],ke=["Before Christ","Anno Domini"],Ie=["BC","AD"],Ee=["B","A"];function De(e){switch(e){case"narrow":return Ee;case"short":return Ie;case"long":return ke;default:return null}}function Le(e,t){for(var n,r="",i=c(e);!(n=i()).done;){var a=n.value;a.literal?r+=a.val:r+=t(a.val)}return r}var Ne={D:b,DD:S,DDD:T,DDDD:F,t:k,tt:I,ttt:E,tttt:D,T:L,TT:N,TTT:M,TTTT:B,f:O,ff:j,fff:R,ffff:Q,F:H,FF:_,FFF:W,FFFF:V},Me=function(){function e(e,t){this.opts=t,this.loc=e,this.systemLoc=null}e.create=function(t,n){return void 0===n&&(n={}),new e(t,n)},e.parseFormat=function(e){for(var t=null,n="",r=!1,i=[],a=0;a0&&i.push({literal:r,val:n}),t=null,n="",r=!r):r||o===t?n+=o:(n.length>0&&i.push({literal:!1,val:n}),n=o,t=o)}return n.length>0&&i.push({literal:r,val:n}),i},e.macroTokenToFormatOpts=function(e){return Ne[e]};var t=e.prototype;return t.formatWithSystemDefault=function(e,t){return null===this.systemLoc&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,Object.assign({},this.opts,t)).format()},t.formatDateTime=function(e,t){return void 0===t&&(t={}),this.loc.dtFormatter(e,Object.assign({},this.opts,t)).format()},t.formatDateTimeParts=function(e,t){return void 0===t&&(t={}),this.loc.dtFormatter(e,Object.assign({},this.opts,t)).formatToParts()},t.resolvedOptions=function(e,t){return void 0===t&&(t={}),this.loc.dtFormatter(e,Object.assign({},this.opts,t)).resolvedOptions()},t.num=function(e,t){if(void 0===t&&(t=0),this.opts.forceSimple)return ee(e,t);var n=Object.assign({},this.opts);return t>0&&(n.padTo=t),this.loc.numberFormatter(n).format(e)},t.formatDateTimeFromString=function(t,n){var r=this,i="en"===this.loc.listingMode(),a=this.loc.outputCalendar&&"gregory"!==this.loc.outputCalendar&&Z(),o=function(e,n){return r.loc.extract(t,e,n)},s=function(e){return t.isOffsetFixed&&0===t.offset&&e.allowZ?"Z":t.isValid?t.zone.formatOffset(t.ts,e.format):""},u=function(){return i?function(e){return Fe[e.hour<12?0:1]}(t):o({hour:"numeric",hour12:!0},"dayperiod")},l=function(e,n){return i?function(e,t){return xe(t)[e.month-1]}(t,e):o(n?{month:e}:{month:e,day:"numeric"},"month")},c=function(e,n){return i?function(e,t){return Te(t)[e.weekday-1]}(t,e):o(n?{weekday:e}:{weekday:e,month:"long",day:"numeric"},"weekday")},d=function(e){return i?function(e,t){return De(t)[e.year<0?0:1]}(t,e):o({era:e},"era")};return Le(e.parseFormat(n),(function(n){switch(n){case"S":return r.num(t.millisecond);case"u":case"SSS":return r.num(t.millisecond,3);case"s":return r.num(t.second);case"ss":return r.num(t.second,2);case"m":return r.num(t.minute);case"mm":return r.num(t.minute,2);case"h":return r.num(t.hour%12==0?12:t.hour%12);case"hh":return r.num(t.hour%12==0?12:t.hour%12,2);case"H":return r.num(t.hour);case"HH":return r.num(t.hour,2);case"Z":return s({format:"narrow",allowZ:r.opts.allowZ});case"ZZ":return s({format:"short",allowZ:r.opts.allowZ});case"ZZZ":return s({format:"techie",allowZ:r.opts.allowZ});case"ZZZZ":return t.zone.offsetName(t.ts,{format:"short",locale:r.loc.locale});case"ZZZZZ":return t.zone.offsetName(t.ts,{format:"long",locale:r.loc.locale});case"z":return t.zoneName;case"a":return u();case"d":return a?o({day:"numeric"},"day"):r.num(t.day);case"dd":return a?o({day:"2-digit"},"day"):r.num(t.day,2);case"c":return r.num(t.weekday);case"ccc":return c("short",!0);case"cccc":return c("long",!0);case"ccccc":return c("narrow",!0);case"E":return r.num(t.weekday);case"EEE":return c("short",!1);case"EEEE":return c("long",!1);case"EEEEE":return c("narrow",!1);case"L":return a?o({month:"numeric",day:"numeric"},"month"):r.num(t.month);case"LL":return a?o({month:"2-digit",day:"numeric"},"month"):r.num(t.month,2);case"LLL":return l("short",!0);case"LLLL":return l("long",!0);case"LLLLL":return l("narrow",!0);case"M":return a?o({month:"numeric"},"month"):r.num(t.month);case"MM":return a?o({month:"2-digit"},"month"):r.num(t.month,2);case"MMM":return l("short",!1);case"MMMM":return l("long",!1);case"MMMMM":return l("narrow",!1);case"y":return a?o({year:"numeric"},"year"):r.num(t.year);case"yy":return a?o({year:"2-digit"},"year"):r.num(t.year.toString().slice(-2),2);case"yyyy":return a?o({year:"numeric"},"year"):r.num(t.year,4);case"yyyyyy":return a?o({year:"numeric"},"year"):r.num(t.year,6);case"G":return d("short");case"GG":return d("long");case"GGGGG":return d("narrow");case"kk":return r.num(t.weekYear.toString().slice(-2),2);case"kkkk":return r.num(t.weekYear,4);case"W":return r.num(t.weekNumber);case"WW":return r.num(t.weekNumber,2);case"o":return r.num(t.ordinal);case"ooo":return r.num(t.ordinal,3);case"q":return r.num(t.quarter);case"qq":return r.num(t.quarter,2);case"X":return r.num(Math.floor(t.ts/1e3));case"x":return r.num(t.ts);default:return function(n){var i=e.macroTokenToFormatOpts(n);return i?r.formatWithSystemDefault(t,i):n}(n)}}))},t.formatDurationFromString=function(t,n){var r,i=this,a=function(e){switch(e[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"M":return"month";case"y":return"year";default:return null}},o=e.parseFormat(n),s=o.reduce((function(e,t){var n=t.literal,r=t.val;return n?e:e.concat(r)}),[]),u=t.shiftTo.apply(t,s.map(a).filter((function(e){return e})));return Le(o,(r=u,function(e){var t=a(e);return t?i.num(r.get(t),e.length):e}))},e}(),Be=function(){function e(e,t){this.reason=e,this.explanation=t}return e.prototype.toMessage=function(){return this.explanation?this.reason+": "+this.explanation:this.reason},e}(),Oe=function(){function e(){}var t=e.prototype;return t.offsetName=function(e,t){throw new v},t.formatOffset=function(e,t){throw new v},t.offset=function(e){throw new v},t.equals=function(e){throw new v},n(e,[{key:"type",get:function(){throw new v}},{key:"name",get:function(){throw new v}},{key:"universal",get:function(){throw new v}},{key:"isValid",get:function(){throw new v}}]),e}(),He=null,je=function(e){function t(){return e.apply(this,arguments)||this}r(t,e);var i=t.prototype;return i.offsetName=function(e,t){return ce(e,t.format,t.locale)},i.formatOffset=function(e,t){return Ae(this.offset(e),t)},i.offset=function(e){return-new Date(e).getTimezoneOffset()},i.equals=function(e){return"local"===e.type},n(t,[{key:"type",get:function(){return"local"}},{key:"name",get:function(){return z()?(new Intl.DateTimeFormat).resolvedOptions().timeZone:"local"}},{key:"universal",get:function(){return!1}},{key:"isValid",get:function(){return!0}}],[{key:"instance",get:function(){return null===He&&(He=new t),He}}]),t}(Oe),_e=RegExp("^"+ge.source+"$"),Pe={};var Re={year:0,month:1,day:2,hour:3,minute:4,second:5};var We={},Qe=function(e){function t(n){var r;return(r=e.call(this)||this).zoneName=n,r.valid=t.isValidZone(n),r}r(t,e),t.create=function(e){return We[e]||(We[e]=new t(e)),We[e]},t.resetCache=function(){We={},Pe={}},t.isValidSpecifier=function(e){return!(!e||!e.match(_e))},t.isValidZone=function(e){try{return new Intl.DateTimeFormat("en-US",{timeZone:e}).format(),!0}catch(e){return!1}},t.parseGMTOffset=function(e){if(e){var t=e.match(/^Etc\/GMT([+-]\d{1,2})$/i);if(t)return-60*parseInt(t[1])}return null};var i=t.prototype;return i.offsetName=function(e,t){return ce(e,t.format,t.locale,this.name)},i.formatOffset=function(e,t){return Ae(this.offset(e),t)},i.offset=function(e){var t,n=new Date(e),r=(t=this.name,Pe[t]||(Pe[t]=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"})),Pe[t]),i=r.formatToParts?function(e,t){for(var n=e.formatToParts(t),r=[],i=0;i=0?c:1e3+c))/6e4},i.equals=function(e){return"iana"===e.type&&e.name===this.name},n(t,[{key:"type",get:function(){return"iana"}},{key:"name",get:function(){return this.zoneName}},{key:"universal",get:function(){return!1}},{key:"isValid",get:function(){return this.valid}}]),t}(Oe),Ve=null,Ge=function(e){function t(t){var n;return(n=e.call(this)||this).fixed=t,n}r(t,e),t.instance=function(e){return 0===e?t.utcInstance:new t(e)},t.parseSpecifier=function(e){if(e){var n=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(n)return new t(de(n[1],n[2]))}return null},n(t,null,[{key:"utcInstance",get:function(){return null===Ve&&(Ve=new t(0)),Ve}}]);var i=t.prototype;return i.offsetName=function(){return this.name},i.formatOffset=function(e,t){return Ae(this.fixed,t)},i.offset=function(){return this.fixed},i.equals=function(e){return"fixed"===e.type&&e.fixed===this.fixed},n(t,[{key:"type",get:function(){return"fixed"}},{key:"name",get:function(){return 0===this.fixed?"UTC":"UTC"+Ae(this.fixed,"narrow")}},{key:"universal",get:function(){return!0}},{key:"isValid",get:function(){return!0}}]),t}(Oe),Ue=function(e){function t(t){var n;return(n=e.call(this)||this).zoneName=t,n}r(t,e);var i=t.prototype;return i.offsetName=function(){return null},i.formatOffset=function(){return""},i.offset=function(){return NaN},i.equals=function(){return!1},n(t,[{key:"type",get:function(){return"invalid"}},{key:"name",get:function(){return this.zoneName}},{key:"universal",get:function(){return!1}},{key:"isValid",get:function(){return!1}}]),t}(Oe);function qe(e,t){var n;if(G(e)||null===e)return t;if(e instanceof Oe)return e;if("string"==typeof e){var r=e.toLowerCase();return"local"===r?t:"utc"===r||"gmt"===r?Ge.utcInstance:null!=(n=Qe.parseGMTOffset(e))?Ge.instance(n):Qe.isValidSpecifier(r)?Qe.create(e):Ge.parseSpecifier(r)||new Ue(e)}return U(e)?Ge.instance(e):"object"==typeof e&&e.offset&&"number"==typeof e.offset?e:new Ue(e)}var ze=function(){return Date.now()},Ze=null,Ye=null,$e=null,Xe=null,Je=!1,Ke=function(){function e(){}return e.resetCaches=function(){ct.resetCache(),Qe.resetCache()},n(e,null,[{key:"now",get:function(){return ze},set:function(e){ze=e}},{key:"defaultZoneName",get:function(){return e.defaultZone.name},set:function(e){Ze=e?qe(e):null}},{key:"defaultZone",get:function(){return Ze||je.instance}},{key:"defaultLocale",get:function(){return Ye},set:function(e){Ye=e}},{key:"defaultNumberingSystem",get:function(){return $e},set:function(e){$e=e}},{key:"defaultOutputCalendar",get:function(){return Xe},set:function(e){Xe=e}},{key:"throwOnInvalid",get:function(){return Je},set:function(e){Je=e}}]),e}(),et={};function tt(e,t){void 0===t&&(t={});var n=JSON.stringify([e,t]),r=et[n];return r||(r=new Intl.DateTimeFormat(e,t),et[n]=r),r}var nt={};var rt={};function it(e,t){void 0===t&&(t={});var n=t,r=(n.base,function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}(n,["base"])),i=JSON.stringify([e,r]),a=rt[i];return a||(a=new Intl.RelativeTimeFormat(e,t),rt[i]=a),a}var at=null;function ot(e,t,n,r,i){var a=e.listingMode(n);return"error"===a?null:"en"===a?r(t):i(t)}var st=function(){function e(e,t,n){if(this.padTo=n.padTo||0,this.floor=n.floor||!1,!t&&z()){var r={useGrouping:!1};n.padTo>0&&(r.minimumIntegerDigits=n.padTo),this.inf=function(e,t){void 0===t&&(t={});var n=JSON.stringify([e,t]),r=nt[n];return r||(r=new Intl.NumberFormat(e,t),nt[n]=r),r}(e,r)}}return e.prototype.format=function(e){if(this.inf){var t=this.floor?Math.floor(e):e;return this.inf.format(t)}return ee(this.floor?Math.floor(e):re(e,3),this.padTo)},e}(),ut=function(){function e(e,t,n){var r;if(this.opts=n,this.hasIntl=z(),e.zone.universal&&this.hasIntl?(r="UTC",n.timeZoneName?this.dt=e:this.dt=0===e.offset?e:cr.fromMillis(e.ts+60*e.offset*1e3)):"local"===e.zone.type?this.dt=e:(this.dt=e,r=e.zone.name),this.hasIntl){var i=Object.assign({},this.opts);r&&(i.timeZone=r),this.dtf=tt(t,i)}}var t=e.prototype;return t.format=function(){if(this.hasIntl)return this.dtf.format(this.dt.toJSDate());var e=function(e){var t="EEEE, LLLL d, yyyy, h:mm a";switch(me(X(e,["weekday","era","year","month","day","hour","minute","second","timeZoneName","hour12"]))){case me(b):return"M/d/yyyy";case me(S):return"LLL d, yyyy";case me(C):return"EEE, LLL d, yyyy";case me(T):return"LLLL d, yyyy";case me(F):return"EEEE, LLLL d, yyyy";case me(k):return"h:mm a";case me(I):return"h:mm:ss a";case me(E):case me(D):return"h:mm a";case me(L):return"HH:mm";case me(N):return"HH:mm:ss";case me(M):case me(B):return"HH:mm";case me(O):return"M/d/yyyy, h:mm a";case me(j):return"LLL d, yyyy, h:mm a";case me(R):return"LLLL d, yyyy, h:mm a";case me(Q):return t;case me(H):return"M/d/yyyy, h:mm:ss a";case me(_):return"LLL d, yyyy, h:mm:ss a";case me(P):return"EEE, d LLL yyyy, h:mm a";case me(W):return"LLLL d, yyyy, h:mm:ss a";case me(V):return"EEEE, LLLL d, yyyy, h:mm:ss a";default:return t}}(this.opts),t=ct.create("en-US");return Me.create(t).formatDateTimeFromString(this.dt,e)},t.formatToParts=function(){return this.hasIntl&&Z()?this.dtf.formatToParts(this.dt.toJSDate()):[]},t.resolvedOptions=function(){return this.hasIntl?this.dtf.resolvedOptions():{locale:"en-US",numberingSystem:"latn",outputCalendar:"gregory"}},e}(),lt=function(){function e(e,t,n){this.opts=Object.assign({style:"long"},n),!t&&Y()&&(this.rtf=it(e,n))}var t=e.prototype;return t.format=function(e,t){return this.rtf?this.rtf.format(e,t):function(e,t,n,r){void 0===n&&(n="always"),void 0===r&&(r=!1);var i={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},a=-1===["hours","minutes","seconds"].indexOf(e);if("auto"===n&&a){var o="days"===e;switch(t){case 1:return o?"tomorrow":"next "+i[e][0];case-1:return o?"yesterday":"last "+i[e][0];case 0:return o?"today":"this "+i[e][0]}}var s=Object.is(t,-0)||t<0,u=Math.abs(t),l=1===u,c=i[e],d=r?l?c[1]:c[2]||c[1]:l?i[e][0]:e;return s?u+" "+d+" ago":"in "+u+" "+d}(t,e,this.opts.numeric,"long"!==this.opts.style)},t.formatToParts=function(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]},e}(),ct=function(){function e(e,t,n,r){var i=function(e){var t=e.indexOf("-u-");if(-1===t)return[e];var n,r=e.substring(0,t);try{n=tt(e).resolvedOptions()}catch(e){n=tt(r).resolvedOptions()}var i=n;return[r,i.numberingSystem,i.calendar]}(e),a=i[0],o=i[1],s=i[2];this.locale=a,this.numberingSystem=t||o||null,this.outputCalendar=n||s||null,this.intl=function(e,t,n){return z()?n||t?(e+="-u",n&&(e+="-ca-"+n),t&&(e+="-nu-"+t),e):e:[]}(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=r,this.fastNumbersCached=null}e.fromOpts=function(t){return e.create(t.locale,t.numberingSystem,t.outputCalendar,t.defaultToEN)},e.create=function(t,n,r,i){void 0===i&&(i=!1);var a=t||Ke.defaultLocale;return new e(a||(i?"en-US":function(){if(at)return at;if(z()){var e=(new Intl.DateTimeFormat).resolvedOptions().locale;return at=e&&"und"!==e?e:"en-US"}return at="en-US"}()),n||Ke.defaultNumberingSystem,r||Ke.defaultOutputCalendar,a)},e.resetCache=function(){at=null,et={},nt={},rt={}},e.fromObject=function(t){var n=void 0===t?{}:t,r=n.locale,i=n.numberingSystem,a=n.outputCalendar;return e.create(r,i,a)};var t=e.prototype;return t.listingMode=function(e){void 0===e&&(e=!0);var t=z()&&Z(),n=this.isEnglish(),r=!(null!==this.numberingSystem&&"latn"!==this.numberingSystem||null!==this.outputCalendar&&"gregory"!==this.outputCalendar);return t||n&&r||e?!t||n&&r?"en":"intl":"error"},t.clone=function(t){return t&&0!==Object.getOwnPropertyNames(t).length?e.create(t.locale||this.specifiedLocale,t.numberingSystem||this.numberingSystem,t.outputCalendar||this.outputCalendar,t.defaultToEN||!1):this},t.redefaultToEN=function(e){return void 0===e&&(e={}),this.clone(Object.assign({},e,{defaultToEN:!0}))},t.redefaultToSystem=function(e){return void 0===e&&(e={}),this.clone(Object.assign({},e,{defaultToEN:!1}))},t.months=function(e,t,n){var r=this;return void 0===t&&(t=!1),void 0===n&&(n=!0),ot(this,e,n,xe,(function(){var n=t?{month:e,day:"numeric"}:{month:e},i=t?"format":"standalone";return r.monthsCache[i][e]||(r.monthsCache[i][e]=function(e){for(var t=[],n=1;n<=12;n++){var r=cr.utc(2016,n,1);t.push(e(r))}return t}((function(e){return r.extract(e,n,"month")}))),r.monthsCache[i][e]}))},t.weekdays=function(e,t,n){var r=this;return void 0===t&&(t=!1),void 0===n&&(n=!0),ot(this,e,n,Te,(function(){var n=t?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},i=t?"format":"standalone";return r.weekdaysCache[i][e]||(r.weekdaysCache[i][e]=function(e){for(var t=[],n=1;n<=7;n++){var r=cr.utc(2016,11,13+n);t.push(e(r))}return t}((function(e){return r.extract(e,n,"weekday")}))),r.weekdaysCache[i][e]}))},t.meridiems=function(e){var t=this;return void 0===e&&(e=!0),ot(this,void 0,e,(function(){return Fe}),(function(){if(!t.meridiemCache){var e={hour:"numeric",hour12:!0};t.meridiemCache=[cr.utc(2016,11,13,9),cr.utc(2016,11,13,19)].map((function(n){return t.extract(n,e,"dayperiod")}))}return t.meridiemCache}))},t.eras=function(e,t){var n=this;return void 0===t&&(t=!0),ot(this,e,t,De,(function(){var t={era:e};return n.eraCache[e]||(n.eraCache[e]=[cr.utc(-40,1,1),cr.utc(2017,1,1)].map((function(e){return n.extract(e,t,"era")}))),n.eraCache[e]}))},t.extract=function(e,t,n){var r=this.dtFormatter(e,t).formatToParts().find((function(e){return e.type.toLowerCase()===n}));return r?r.value:null},t.numberFormatter=function(e){return void 0===e&&(e={}),new st(this.intl,e.forceSimple||this.fastNumbers,e)},t.dtFormatter=function(e,t){return void 0===t&&(t={}),new ut(e,this.intl,t)},t.relFormatter=function(e){return void 0===e&&(e={}),new lt(this.intl,this.isEnglish(),e)},t.isEnglish=function(){return"en"===this.locale||"en-us"===this.locale.toLowerCase()||z()&&new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")},t.equals=function(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar},n(e,[{key:"fastNumbers",get:function(){var e;return null==this.fastNumbersCached&&(this.fastNumbersCached=(!(e=this).numberingSystem||"latn"===e.numberingSystem)&&("latn"===e.numberingSystem||!e.locale||e.locale.startsWith("en")||z()&&"latn"===new Intl.DateTimeFormat(e.intl).resolvedOptions().numberingSystem)),this.fastNumbersCached}}]),e}();function dt(){for(var e=arguments.length,t=new Array(e),n=0;n1?t-1:0),r=1;r3?be.indexOf(e)+1:Se.indexOf(e)+1),s}var Nt=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function Mt(e){var t,n=e[1],r=e[2],i=e[3],a=e[4],o=e[5],s=e[6],u=e[7],l=e[8],c=e[9],d=e[10],h=e[11],f=Lt(n,a,i,r,o,s,u);return t=l?Dt[l]:c?0:de(d,h),[f,new Ge(t)]}var Bt=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,Ot=/^(Monday|Tuesday|Wedsday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,Ht=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function jt(e){var t=e[1],n=e[2],r=e[3];return[Lt(t,e[4],r,n,e[5],e[6],e[7]),Ge.utcInstance]}function _t(e){var t=e[1],n=e[2],r=e[3],i=e[4],a=e[5],o=e[6];return[Lt(t,e[7],n,r,i,a,o),Ge.utcInstance]}var Pt=dt(/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,vt),Rt=dt(/(\d{4})-?W(\d\d)(?:-?(\d))?/,vt),Wt=dt(/(\d{4})-?(\d{3})/,vt),Qt=dt(mt),Vt=ht(Ct,Tt,Ft),Gt=ht(yt,Tt,Ft),Ut=ht(wt,Tt),qt=ht(Tt,Ft);var zt=dt(/(\d{4})-(\d\d)-(\d\d)/,bt),Zt=dt(xt),Yt=ht(Ct,Tt,Ft,kt),$t=ht(Tt,Ft,kt);var Xt={weeks:{days:7,hours:168,minutes:10080,seconds:604800,milliseconds:6048e5},days:{hours:24,minutes:1440,seconds:86400,milliseconds:864e5},hours:{minutes:60,seconds:3600,milliseconds:36e5},minutes:{seconds:60,milliseconds:6e4},seconds:{milliseconds:1e3}},Jt=Object.assign({years:{quarters:4,months:12,weeks:52,days:365,hours:8760,minutes:525600,seconds:31536e3,milliseconds:31536e6},quarters:{months:3,weeks:13,days:91,hours:2184,minutes:131040,seconds:7862400,milliseconds:78624e5},months:{weeks:4,days:30,hours:720,minutes:43200,seconds:2592e3,milliseconds:2592e6}},Xt),Kt=365.2425,en=30.436875,tn=Object.assign({years:{quarters:4,months:12,weeks:52.1775,days:Kt,hours:8765.82,minutes:525949.2,seconds:525949.2*60,milliseconds:525949.2*60*1e3},quarters:{months:3,weeks:13.044375,days:91.310625,hours:2191.455,minutes:131487.3,seconds:525949.2*60/4,milliseconds:7889237999.999999},months:{weeks:4.3481250000000005,days:en,hours:730.485,minutes:43829.1,seconds:2629746,milliseconds:2629746e3}},Xt),nn=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],rn=nn.slice(0).reverse();function an(e,t,n){void 0===n&&(n=!1);var r={values:n?t.values:Object.assign({},e.values,t.values||{}),loc:e.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||e.conversionAccuracy};return new sn(r)}function on(e,t,n,r,i){var a=e[i][n],o=t[n]/a,s=!(Math.sign(o)===Math.sign(r[i]))&&0!==r[i]&&Math.abs(o)<=1?function(e){return e<0?Math.floor(e):Math.ceil(e)}(o):Math.trunc(o);r[i]+=s,t[n]-=s*a}var sn=function(){function e(e){var t="longterm"===e.conversionAccuracy||!1;this.values=e.values,this.loc=e.loc||ct.create(),this.conversionAccuracy=t?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=t?tn:Jt,this.isLuxonDuration=!0}e.fromMillis=function(t,n){return e.fromObject(Object.assign({milliseconds:t},n))},e.fromObject=function(t){if(null==t||"object"!=typeof t)throw new m("Duration.fromObject: argument expected to be an object, got "+(null===t?"null":typeof t));return new e({values:fe(t,e.normalizeUnit,["locale","numberingSystem","conversionAccuracy","zone"]),loc:ct.fromObject(t),conversionAccuracy:t.conversionAccuracy})},e.fromISO=function(t,n){var r=function(e){return ft(e,[It,Et])}(t)[0];if(r){var i=Object.assign(r,n);return e.fromObject(i)}return e.invalid("unparsable",'the input "'+t+"\" can't be parsed as ISO 8601")},e.invalid=function(t,n){if(void 0===n&&(n=null),!t)throw new m("need to specify a reason the Duration is invalid");var r=t instanceof Be?t:new Be(t,n);if(Ke.throwOnInvalid)throw new A(r);return new e({invalid:r})},e.normalizeUnit=function(e){var t={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e?e.toLowerCase():e];if(!t)throw new g(e);return t},e.isDuration=function(e){return e&&e.isLuxonDuration||!1};var t=e.prototype;return t.toFormat=function(e,t){void 0===t&&(t={});var n=Object.assign({},t,{floor:!1!==t.round&&!1!==t.floor});return this.isValid?Me.create(this.loc,n).formatDurationFromString(this,e):"Invalid Duration"},t.toObject=function(e){if(void 0===e&&(e={}),!this.isValid)return{};var t=Object.assign({},this.values);return e.includeConfig&&(t.conversionAccuracy=this.conversionAccuracy,t.numberingSystem=this.loc.numberingSystem,t.locale=this.loc.locale),t},t.toISO=function(){if(!this.isValid)return null;var e="P";return 0!==this.years&&(e+=this.years+"Y"),0===this.months&&0===this.quarters||(e+=this.months+3*this.quarters+"M"),0!==this.weeks&&(e+=this.weeks+"W"),0!==this.days&&(e+=this.days+"D"),0===this.hours&&0===this.minutes&&0===this.seconds&&0===this.milliseconds||(e+="T"),0!==this.hours&&(e+=this.hours+"H"),0!==this.minutes&&(e+=this.minutes+"M"),0===this.seconds&&0===this.milliseconds||(e+=re(this.seconds+this.milliseconds/1e3,3)+"S"),"P"===e&&(e+="T0S"),e},t.toJSON=function(){return this.toISO()},t.toString=function(){return this.toISO()},t.valueOf=function(){return this.as("milliseconds")},t.plus=function(e){if(!this.isValid)return this;for(var t,n=un(e),r={},i=c(nn);!(t=i()).done;){var a=t.value;(J(n.values,a)||J(this.values,a))&&(r[a]=n.get(a)+this.get(a))}return an(this,{values:r},!0)},t.minus=function(e){if(!this.isValid)return this;var t=un(e);return this.plus(t.negate())},t.mapUnits=function(e){if(!this.isValid)return this;for(var t={},n=0,r=Object.keys(this.values);n=0){i=d;var h=0;for(var f in s)h+=this.matrix[f][d]*s[f],s[f]=0;U(u[d])&&(h+=u[d]);var A=Math.trunc(h);for(var p in o[d]=A,s[d]=h-A,u)nn.indexOf(p)>nn.indexOf(d)&&on(this.matrix,u,p,o,d)}else U(u[d])&&(s[d]=u[d])}for(var g in s)0!==s[g]&&(o[i]+=g===i?s[g]:s[g]/this.matrix[i][g]);return an(this,{values:o},!0).normalize()},t.negate=function(){if(!this.isValid)return this;for(var e={},t=0,n=Object.keys(this.values);te},t.isBefore=function(e){return!!this.isValid&&this.e<=e},t.contains=function(e){return!!this.isValid&&(this.s<=e&&this.e>e)},t.set=function(t){var n=void 0===t?{}:t,r=n.start,i=n.end;return this.isValid?e.fromDateTimes(r||this.s,i||this.e):this},t.splitAt=function(){var t=this;if(!this.isValid)return[];for(var n=arguments.length,r=new Array(n),i=0;i+this.e?this.e:l;o.push(e.fromDateTimes(s,c)),s=c,u+=1}return o},t.splitBy=function(t){var n=un(t);if(!this.isValid||!n.isValid||0===n.as("milliseconds"))return[];for(var r,i,a=this.s,o=[];a+this.e?this.e:r,o.push(e.fromDateTimes(a,i)),a=i;return o},t.divideEqually=function(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]},t.overlaps=function(e){return this.e>e.s&&this.s=e.e)},t.equals=function(e){return!(!this.isValid||!e.isValid)&&(this.s.equals(e.s)&&this.e.equals(e.e))},t.intersection=function(t){if(!this.isValid)return this;var n=this.s>t.s?this.s:t.s,r=this.er?null:e.fromDateTimes(n,r)},t.union=function(t){if(!this.isValid)return this;var n=this.st.e?this.e:t.e;return e.fromDateTimes(n,r)},e.merge=function(e){var t=e.sort((function(e,t){return e.s-t.s})).reduce((function(e,t){var n=e[0],r=e[1];return r?r.overlaps(t)||r.abutsStart(t)?[n,r.union(t)]:[n.concat([r]),t]:[n,t]}),[[],null]),n=t[0],r=t[1];return r&&n.push(r),n},e.xor=function(t){for(var n,r,i=null,a=0,o=[],s=t.map((function(e){return[{time:e.s,type:"s"},{time:e.e,type:"e"}]})),u=c((n=Array.prototype).concat.apply(n,s).sort((function(e,t){return e.time-t.time})));!(r=u()).done;){var l=r.value;1===(a+="s"===l.type?1:-1)?i=l.time:(i&&+i!=+l.time&&o.push(e.fromDateTimes(i,l.time)),i=null)}return e.merge(o)},t.difference=function(){for(var t=this,n=arguments.length,r=new Array(n),i=0;i=0){var d;r=l;var h,f=c(e,t);(i=e.plus(((d={})[l]=f,d)))>t?(e=e.plus(((h={})[l]=f-1,h)),f-=1):e=i,a[l]=f}}return[e,a,i,r]}(e,t,n),a=i[0],o=i[1],s=i[2],u=i[3],l=t-a,c=n.filter((function(e){return["hours","minutes","seconds","milliseconds"].indexOf(e)>=0}));if(0===c.length){var d;if(s0?(h=sn.fromMillis(l,r)).shiftTo.apply(h,c).plus(f):f}var pn={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},gn={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},mn=pn.hanidec.replace(/[\[|\]]/g,"").split("");function vn(e,t){var n=e.numberingSystem;return void 0===t&&(t=""),new RegExp(""+pn[n||"latn"]+t)}function yn(e,t){return void 0===t&&(t=function(e){return e}),{regex:e,deser:function(e){var n=e[0];return t(function(e){var t=parseInt(e,10);if(isNaN(t)){t="";for(var n=0;n=o&&r<=s&&(t+=r-o)}}return parseInt(t,10)}return t}(n))}}}var wn="( |"+String.fromCharCode(160)+")",xn=new RegExp(wn,"g");function bn(e){return e.replace(/\./g,"\\.?").replace(xn,wn)}function Sn(e){return e.replace(/\./g,"").replace(xn," ").toLowerCase()}function Cn(e,t){return null===e?null:{regex:RegExp(e.map(bn).join("|")),deser:function(n){var r=n[0];return e.findIndex((function(e){return Sn(r)===Sn(e)}))+t}}}function Tn(e,t){return{regex:e,deser:function(e){return de(e[1],e[2])},groups:t}}function Fn(e){return{regex:e,deser:function(e){return e[0]}}}var kn={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour:{numeric:"h","2-digit":"hh"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"}};var In=null;function En(e,t){if(e.literal)return e;var n=Me.macroTokenToFormatOpts(e.val);if(!n)return e;var r=Me.create(t,n).formatDateTimeParts((In||(In=cr.fromMillis(1555555555555)),In)).map((function(e){return function(e,t,n){var r=e.type,i=e.value;if("literal"===r)return{literal:!0,val:i};var a=n[r],o=kn[r];return"object"==typeof o&&(o=o[a]),o?{literal:!1,val:o}:void 0}(e,0,n)}));return r.includes(void 0)?e:r}function Dn(e,t,n){var r=function(e,t){var n;return(n=Array.prototype).concat.apply(n,e.map((function(e){return En(e,t)})))}(Me.parseFormat(n),e),i=r.map((function(t){return n=t,i=vn(r=e),a=vn(r,"{2}"),o=vn(r,"{3}"),s=vn(r,"{4}"),u=vn(r,"{6}"),l=vn(r,"{1,2}"),c=vn(r,"{1,3}"),d=vn(r,"{1,6}"),h=vn(r,"{1,9}"),f=vn(r,"{2,4}"),A=vn(r,"{4,6}"),p=function(e){return{regex:RegExp((t=e.val,t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"))),deser:function(e){return e[0]},literal:!0};var t},(g=function(e){if(n.literal)return p(e);switch(e.val){case"G":return Cn(r.eras("short",!1),0);case"GG":return Cn(r.eras("long",!1),0);case"y":return yn(d);case"yy":return yn(f,le);case"yyyy":return yn(s);case"yyyyy":return yn(A);case"yyyyyy":return yn(u);case"M":return yn(l);case"MM":return yn(a);case"MMM":return Cn(r.months("short",!0,!1),1);case"MMMM":return Cn(r.months("long",!0,!1),1);case"L":return yn(l);case"LL":return yn(a);case"LLL":return Cn(r.months("short",!1,!1),1);case"LLLL":return Cn(r.months("long",!1,!1),1);case"d":return yn(l);case"dd":return yn(a);case"o":return yn(c);case"ooo":return yn(o);case"HH":return yn(a);case"H":return yn(l);case"hh":return yn(a);case"h":return yn(l);case"mm":return yn(a);case"m":case"q":return yn(l);case"qq":return yn(a);case"s":return yn(l);case"ss":return yn(a);case"S":return yn(c);case"SSS":return yn(o);case"u":return Fn(h);case"a":return Cn(r.meridiems(),0);case"kkkk":return yn(s);case"kk":return yn(f,le);case"W":return yn(l);case"WW":return yn(a);case"E":case"c":return yn(i);case"EEE":return Cn(r.weekdays("short",!1,!1),1);case"EEEE":return Cn(r.weekdays("long",!1,!1),1);case"ccc":return Cn(r.weekdays("short",!0,!1),1);case"cccc":return Cn(r.weekdays("long",!0,!1),1);case"Z":case"ZZ":return Tn(new RegExp("([+-]"+l.source+")(?::("+a.source+"))?"),2);case"ZZZ":return Tn(new RegExp("([+-]"+l.source+")("+a.source+")?"),2);case"z":return Fn(/[a-z_+-/]{1,256}?/i);default:return p(e)}}(n)||{invalidReason:"missing Intl.DateTimeFormat.formatToParts support"}).token=n,g;var n,r,i,a,o,s,u,l,c,d,h,f,A,p,g})),a=i.find((function(e){return e.invalidReason}));if(a)return{input:t,tokens:r,invalidReason:a.invalidReason};var o=function(e){return["^"+e.map((function(e){return e.regex})).reduce((function(e,t){return e+"("+t.source+")"}),"")+"$",e]}(i),s=o[0],u=o[1],l=RegExp(s,"i"),c=function(e,t,n){var r=e.match(t);if(r){var i={},a=1;for(var o in n)if(J(n,o)){var s=n[o],u=s.groups?s.groups+1:1;!s.literal&&s.token&&(i[s.token.val[0]]=s.deser(r.slice(a,a+u))),a+=u}return[r,i]}return[r,{}]}(t,l,u),d=c[0],h=c[1],f=h?function(e){var t;return t=G(e.Z)?G(e.z)?null:Qe.create(e.z):new Ge(e.Z),G(e.q)||(e.M=3*(e.q-1)+1),G(e.h)||(e.h<12&&1===e.a?e.h+=12:12===e.h&&0===e.a&&(e.h=0)),0===e.G&&e.y&&(e.y=-e.y),G(e.u)||(e.S=ne(e.u)),[Object.keys(e).reduce((function(t,n){var r=function(e){switch(e){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}}(n);return r&&(t[r]=e[n]),t}),{}),t]}(h):[null,null],A=f[0],g=f[1];if(J(h,"a")&&J(h,"H"))throw new p("Can't include meridiem when specifying 24-hour format");return{input:t,tokens:r,regex:l,rawMatches:d,matches:h,result:A,zone:g}}var Ln=[0,31,59,90,120,151,181,212,243,273,304,334],Nn=[0,31,60,91,121,152,182,213,244,274,305,335];function Mn(e,t){return new Be("unit out of range","you specified "+t+" (of type "+typeof t+") as a "+e+", which is invalid")}function Bn(e,t,n){var r=new Date(Date.UTC(e,t-1,n)).getUTCDay();return 0===r?7:r}function On(e,t,n){return n+(ie(e)?Nn:Ln)[t-1]}function Hn(e,t){var n=ie(e)?Nn:Ln,r=n.findIndex((function(e){return eue(n)?(t=n+1,s=1):t=n,Object.assign({weekYear:t,weekNumber:s,weekday:o},pe(e))}function _n(e){var t,n=e.weekYear,r=e.weekNumber,i=e.weekday,a=Bn(n,1,4),o=ae(n),s=7*r+i-a-3;s<1?s+=ae(t=n-1):s>o?(t=n+1,s-=ae(n)):t=n;var u=Hn(t,s),l=u.month,c=u.day;return Object.assign({year:t,month:l,day:c},pe(e))}function Pn(e){var t=e.year,n=On(t,e.month,e.day);return Object.assign({year:t,ordinal:n},pe(e))}function Rn(e){var t=e.year,n=Hn(t,e.ordinal),r=n.month,i=n.day;return Object.assign({year:t,month:r,day:i},pe(e))}function Wn(e){var t=q(e.year),n=K(e.month,1,12),r=K(e.day,1,oe(e.year,e.month));return t?n?!r&&Mn("day",e.day):Mn("month",e.month):Mn("year",e.year)}function Qn(e){var t=e.hour,n=e.minute,r=e.second,i=e.millisecond,a=K(t,0,23)||24===t&&0===n&&0===r&&0===i,o=K(n,0,59),s=K(r,0,59),u=K(i,0,999);return a?o?s?!u&&Mn("millisecond",i):Mn("second",r):Mn("minute",n):Mn("hour",t)}var Vn="Invalid DateTime",Gn=864e13;function Un(e){return new Be("unsupported zone",'the zone "'+e.name+'" is not supported')}function qn(e){return null===e.weekData&&(e.weekData=jn(e.c)),e.weekData}function zn(e,t){var n={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new cr(Object.assign({},n,t,{old:n}))}function Zn(e,t,n){var r=e-60*t*1e3,i=n.offset(r);if(t===i)return[r,t];r-=60*(i-t)*1e3;var a=n.offset(r);return i===a?[r,i]:[e-60*Math.min(i,a)*1e3,Math.max(i,a)]}function Yn(e,t){var n=new Date(e+=60*t*1e3);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function $n(e,t,n){return Zn(se(e),t,n)}function Xn(e,t){var n=e.o,r=e.c.year+Math.trunc(t.years),i=e.c.month+Math.trunc(t.months)+3*Math.trunc(t.quarters),a=Object.assign({},e.c,{year:r,month:i,day:Math.min(e.c.day,oe(r,i))+Math.trunc(t.days)+7*Math.trunc(t.weeks)}),o=sn.fromObject({years:t.years-Math.trunc(t.years),quarters:t.quarters-Math.trunc(t.quarters),months:t.months-Math.trunc(t.months),weeks:t.weeks-Math.trunc(t.weeks),days:t.days-Math.trunc(t.days),hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as("milliseconds"),s=Zn(se(a),n,e.zone),u=s[0],l=s[1];return 0!==o&&(u+=o,l=e.zone.offset(u)),{ts:u,o:l}}function Jn(e,t,n,r,i){var a=n.setZone,o=n.zone;if(e&&0!==Object.keys(e).length){var s=t||o,u=cr.fromObject(Object.assign(e,n,{zone:s,setZone:void 0}));return a?u:u.setZone(o)}return cr.invalid(new Be("unparsable",'the input "'+i+"\" can't be parsed as "+r))}function Kn(e,t,n){return void 0===n&&(n=!0),e.isValid?Me.create(ct.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(e,t):null}function er(e,t){var n=t.suppressSeconds,r=void 0!==n&&n,i=t.suppressMilliseconds,a=void 0!==i&&i,o=t.includeOffset,s=t.includeZone,u=void 0!==s&&s,l=t.spaceZone,c=void 0!==l&&l,d=t.format,h=void 0===d?"extended":d,f="basic"===h?"HHmm":"HH:mm";return r&&0===e.second&&0===e.millisecond||(f+="basic"===h?"ss":":ss",a&&0===e.millisecond||(f+=".SSS")),(u||o)&&c&&(f+=" "),u?f+="z":o&&(f+="basic"===h?"ZZZ":"ZZ"),Kn(e,f)}var tr={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},nr={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},rr={ordinal:1,hour:0,minute:0,second:0,millisecond:0},ir=["year","month","day","hour","minute","second","millisecond"],ar=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],or=["year","ordinal","hour","minute","second","millisecond"];function sr(e){var t={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[e.toLowerCase()];if(!t)throw new g(e);return t}function ur(e,t){for(var n,r=c(ir);!(n=r()).done;){var i=n.value;G(e[i])&&(e[i]=tr[i])}var a=Wn(e)||Qn(e);if(a)return cr.invalid(a);var o=Ke.now(),s=$n(e,t.offset(o),t),u=s[0],l=s[1];return new cr({ts:u,zone:t,o:l})}function lr(e,t,n){var r=!!G(n.round)||n.round,i=function(e,i){return e=re(e,r||n.calendary?0:2,!0),t.loc.clone(n).relFormatter(n).format(e,i)},a=function(r){return n.calendary?t.hasSame(e,r)?0:t.startOf(r).diff(e.startOf(r),r).get(r):t.diff(e,r).get(r)};if(n.unit)return i(a(n.unit),n.unit);for(var o,s=c(n.units);!(o=s()).done;){var u=o.value,l=a(u);if(Math.abs(l)>=1)return i(l,u)}return i(0,n.units[n.units.length-1])}var cr=function(){function e(e){var t=e.zone||Ke.defaultZone,n=e.invalid||(Number.isNaN(e.ts)?new Be("invalid input"):null)||(t.isValid?null:Un(t));this.ts=G(e.ts)?Ke.now():e.ts;var r=null,i=null;if(!n)if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(t)){var a=[e.old.c,e.old.o];r=a[0],i=a[1]}else{var o=t.offset(this.ts);r=Yn(this.ts,o),r=(n=Number.isNaN(r.year)?new Be("invalid input"):null)?null:r,i=n?null:o}this._zone=t,this.loc=e.loc||ct.create(),this.invalid=n,this.weekData=null,this.c=r,this.o=i,this.isLuxonDateTime=!0}e.local=function(t,n,r,i,a,o,s){return G(t)?new e({ts:Ke.now()}):ur({year:t,month:n,day:r,hour:i,minute:a,second:o,millisecond:s},Ke.defaultZone)},e.utc=function(t,n,r,i,a,o,s){return G(t)?new e({ts:Ke.now(),zone:Ge.utcInstance}):ur({year:t,month:n,day:r,hour:i,minute:a,second:o,millisecond:s},Ge.utcInstance)},e.fromJSDate=function(t,n){void 0===n&&(n={});var r,i=(r=t,"[object Date]"===Object.prototype.toString.call(r)?t.valueOf():NaN);if(Number.isNaN(i))return e.invalid("invalid input");var a=qe(n.zone,Ke.defaultZone);return a.isValid?new e({ts:i,zone:a,loc:ct.fromObject(n)}):e.invalid(Un(a))},e.fromMillis=function(t,n){if(void 0===n&&(n={}),U(t))return t<-Gn||t>Gn?e.invalid("Timestamp out of range"):new e({ts:t,zone:qe(n.zone,Ke.defaultZone),loc:ct.fromObject(n)});throw new m("fromMillis requires a numerical input, but received a "+typeof t+" with value "+t)},e.fromSeconds=function(t,n){if(void 0===n&&(n={}),U(t))return new e({ts:1e3*t,zone:qe(n.zone,Ke.defaultZone),loc:ct.fromObject(n)});throw new m("fromSeconds requires a numerical input")},e.fromObject=function(t){var n=qe(t.zone,Ke.defaultZone);if(!n.isValid)return e.invalid(Un(n));var r=Ke.now(),i=n.offset(r),a=fe(t,sr,["zone","locale","outputCalendar","numberingSystem"]),o=!G(a.ordinal),s=!G(a.year),u=!G(a.month)||!G(a.day),l=s||u,d=a.weekYear||a.weekNumber,h=ct.fromObject(t);if((l||o)&&d)throw new p("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(u&&o)throw new p("Can't mix ordinal dates with month/day");var f,A,g=d||a.weekday&&!l,m=Yn(r,i);g?(f=ar,A=nr,m=jn(m)):o?(f=or,A=rr,m=Pn(m)):(f=ir,A=tr);for(var v,y=!1,w=c(f);!(v=w()).done;){var x=v.value;G(a[x])?a[x]=y?A[x]:m[x]:y=!0}var b=(g?function(e){var t=q(e.weekYear),n=K(e.weekNumber,1,ue(e.weekYear)),r=K(e.weekday,1,7);return t?n?!r&&Mn("weekday",e.weekday):Mn("week",e.week):Mn("weekYear",e.weekYear)}(a):o?function(e){var t=q(e.year),n=K(e.ordinal,1,ae(e.year));return t?!n&&Mn("ordinal",e.ordinal):Mn("year",e.year)}(a):Wn(a))||Qn(a);if(b)return e.invalid(b);var S=$n(g?_n(a):o?Rn(a):a,i,n),C=new e({ts:S[0],zone:n,o:S[1],loc:h});return a.weekday&&l&&t.weekday!==C.weekday?e.invalid("mismatched weekday","you can't specify both a weekday of "+a.weekday+" and a date of "+C.toISO()):C},e.fromISO=function(e,t){void 0===t&&(t={});var n=function(e){return ft(e,[Pt,Vt],[Rt,Gt],[Wt,Ut],[Qt,qt])}(e);return Jn(n[0],n[1],t,"ISO 8601",e)},e.fromRFC2822=function(e,t){void 0===t&&(t={});var n=function(e){return ft(function(e){return e.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}(e),[Nt,Mt])}(e);return Jn(n[0],n[1],t,"RFC 2822",e)},e.fromHTTP=function(e,t){void 0===t&&(t={});var n=function(e){return ft(e,[Bt,jt],[Ot,jt],[Ht,_t])}(e);return Jn(n[0],n[1],t,"HTTP",t)},e.fromFormat=function(t,n,r){if(void 0===r&&(r={}),G(t)||G(n))throw new m("fromFormat requires an input string and a format");var i=r,a=i.locale,o=void 0===a?null:a,s=i.numberingSystem,u=void 0===s?null:s,l=function(e,t,n){var r=Dn(e,t,n);return[r.result,r.zone,r.invalidReason]}(ct.fromOpts({locale:o,numberingSystem:u,defaultToEN:!0}),t,n),c=l[0],d=l[1],h=l[2];return h?e.invalid(h):Jn(c,d,r,"format "+n,t)},e.fromString=function(t,n,r){return void 0===r&&(r={}),e.fromFormat(t,n,r)},e.fromSQL=function(e,t){void 0===t&&(t={});var n=function(e){return ft(e,[zt,Yt],[Zt,$t])}(e);return Jn(n[0],n[1],t,"SQL",e)},e.invalid=function(t,n){if(void 0===n&&(n=null),!t)throw new m("need to specify a reason the DateTime is invalid");var r=t instanceof Be?t:new Be(t,n);if(Ke.throwOnInvalid)throw new h(r);return new e({invalid:r})},e.isDateTime=function(e){return e&&e.isLuxonDateTime||!1};var t=e.prototype;return t.get=function(e){return this[e]},t.resolvedLocaleOpts=function(e){void 0===e&&(e={});var t=Me.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:t.locale,numberingSystem:t.numberingSystem,outputCalendar:t.calendar}},t.toUTC=function(e,t){return void 0===e&&(e=0),void 0===t&&(t={}),this.setZone(Ge.instance(e),t)},t.toLocal=function(){return this.setZone(Ke.defaultZone)},t.setZone=function(t,n){var r=void 0===n?{}:n,i=r.keepLocalTime,a=void 0!==i&&i,o=r.keepCalendarTime,s=void 0!==o&&o;if((t=qe(t,Ke.defaultZone)).equals(this.zone))return this;if(t.isValid){var u=this.ts;if(a||s){var l=t.offset(this.ts);u=$n(this.toObject(),l,t)[0]}return zn(this,{ts:u,zone:t})}return e.invalid(Un(t))},t.reconfigure=function(e){var t=void 0===e?{}:e,n=t.locale,r=t.numberingSystem,i=t.outputCalendar;return zn(this,{loc:this.loc.clone({locale:n,numberingSystem:r,outputCalendar:i})})},t.setLocale=function(e){return this.reconfigure({locale:e})},t.set=function(e){if(!this.isValid)return this;var t,n=fe(e,sr,[]);!G(n.weekYear)||!G(n.weekNumber)||!G(n.weekday)?t=_n(Object.assign(jn(this.c),n)):G(n.ordinal)?(t=Object.assign(this.toObject(),n),G(n.day)&&(t.day=Math.min(oe(t.year,t.month),t.day))):t=Rn(Object.assign(Pn(this.c),n));var r=$n(t,this.o,this.zone);return zn(this,{ts:r[0],o:r[1]})},t.plus=function(e){return this.isValid?zn(this,Xn(this,un(e))):this},t.minus=function(e){return this.isValid?zn(this,Xn(this,un(e).negate())):this},t.startOf=function(e){if(!this.isValid)return this;var t={},n=sn.normalizeUnit(e);switch(n){case"years":t.month=1;case"quarters":case"months":t.day=1;case"weeks":case"days":t.hour=0;case"hours":t.minute=0;case"minutes":t.second=0;case"seconds":t.millisecond=0}if("weeks"===n&&(t.weekday=1),"quarters"===n){var r=Math.ceil(this.month/3);t.month=3*(r-1)+1}return this.set(t)},t.endOf=function(e){var t;return this.isValid?this.plus((t={},t[e]=1,t)).startOf(e).minus(1):this},t.toFormat=function(e,t){return void 0===t&&(t={}),this.isValid?Me.create(this.loc.redefaultToEN(t)).formatDateTimeFromString(this,e):Vn},t.toLocaleString=function(e){return void 0===e&&(e=b),this.isValid?Me.create(this.loc.clone(e),e).formatDateTime(this):Vn},t.toLocaleParts=function(e){return void 0===e&&(e={}),this.isValid?Me.create(this.loc.clone(e),e).formatDateTimeParts(this):[]},t.toISO=function(e){return void 0===e&&(e={}),this.isValid?this.toISODate(e)+"T"+this.toISOTime(e):null},t.toISODate=function(e){var t=(void 0===e?{}:e).format,n="basic"===(void 0===t?"extended":t)?"yyyyMMdd":"yyyy-MM-dd";return this.year>9999&&(n="+"+n),Kn(this,n)},t.toISOWeekDate=function(){return Kn(this,"kkkk-'W'WW-c")},t.toISOTime=function(e){var t=void 0===e?{}:e,n=t.suppressMilliseconds,r=void 0!==n&&n,i=t.suppressSeconds,a=void 0!==i&&i,o=t.includeOffset,s=void 0===o||o,u=t.format;return er(this,{suppressSeconds:a,suppressMilliseconds:r,includeOffset:s,format:void 0===u?"extended":u})},t.toRFC2822=function(){return Kn(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)},t.toHTTP=function(){return Kn(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")},t.toSQLDate=function(){return Kn(this,"yyyy-MM-dd")},t.toSQLTime=function(e){var t=void 0===e?{}:e,n=t.includeOffset,r=void 0===n||n,i=t.includeZone;return er(this,{includeOffset:r,includeZone:void 0!==i&&i,spaceZone:!0})},t.toSQL=function(e){return void 0===e&&(e={}),this.isValid?this.toSQLDate()+" "+this.toSQLTime(e):null},t.toString=function(){return this.isValid?this.toISO():Vn},t.valueOf=function(){return this.toMillis()},t.toMillis=function(){return this.isValid?this.ts:NaN},t.toSeconds=function(){return this.isValid?this.ts/1e3:NaN},t.toJSON=function(){return this.toISO()},t.toBSON=function(){return this.toJSDate()},t.toObject=function(e){if(void 0===e&&(e={}),!this.isValid)return{};var t=Object.assign({},this.c);return e.includeConfig&&(t.outputCalendar=this.outputCalendar,t.numberingSystem=this.loc.numberingSystem,t.locale=this.loc.locale),t},t.toJSDate=function(){return new Date(this.isValid?this.ts:NaN)},t.diff=function(e,t,n){if(void 0===t&&(t="milliseconds"),void 0===n&&(n={}),!this.isValid||!e.isValid)return sn.invalid(this.invalid||e.invalid,"created by diffing an invalid DateTime");var r,i=Object.assign({locale:this.locale,numberingSystem:this.numberingSystem},n),a=(r=t,Array.isArray(r)?r:[r]).map(sn.normalizeUnit),o=e.valueOf()>this.valueOf(),s=An(o?this:e,o?e:this,a,i);return o?s.negate():s},t.diffNow=function(t,n){return void 0===t&&(t="milliseconds"),void 0===n&&(n={}),this.diff(e.local(),t,n)},t.until=function(e){return this.isValid?dn.fromDateTimes(this,e):this},t.hasSame=function(e,t){if(!this.isValid)return!1;if("millisecond"===t)return this.valueOf()===e.valueOf();var n=e.valueOf();return this.startOf(t)<=n&&n<=this.endOf(t)},t.equals=function(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)},t.toRelative=function(t){if(void 0===t&&(t={}),!this.isValid)return null;var n=t.base||e.fromObject({zone:this.zone}),r=t.padding?thisthis.set({month:1}).offset||this.offset>this.set({month:5}).offset)}},{key:"isInLeapYear",get:function(){return ie(this.year)}},{key:"daysInMonth",get:function(){return oe(this.year,this.month)}},{key:"daysInYear",get:function(){return this.isValid?ae(this.year):NaN}},{key:"weeksInWeekYear",get:function(){return this.isValid?ue(this.weekYear):NaN}}],[{key:"DATE_SHORT",get:function(){return b}},{key:"DATE_MED",get:function(){return S}},{key:"DATE_MED_WITH_WEEKDAY",get:function(){return C}},{key:"DATE_FULL",get:function(){return T}},{key:"DATE_HUGE",get:function(){return F}},{key:"TIME_SIMPLE",get:function(){return k}},{key:"TIME_WITH_SECONDS",get:function(){return I}},{key:"TIME_WITH_SHORT_OFFSET",get:function(){return E}},{key:"TIME_WITH_LONG_OFFSET",get:function(){return D}},{key:"TIME_24_SIMPLE",get:function(){return L}},{key:"TIME_24_WITH_SECONDS",get:function(){return N}},{key:"TIME_24_WITH_SHORT_OFFSET",get:function(){return M}},{key:"TIME_24_WITH_LONG_OFFSET",get:function(){return B}},{key:"DATETIME_SHORT",get:function(){return O}},{key:"DATETIME_SHORT_WITH_SECONDS",get:function(){return H}},{key:"DATETIME_MED",get:function(){return j}},{key:"DATETIME_MED_WITH_SECONDS",get:function(){return _}},{key:"DATETIME_MED_WITH_WEEKDAY",get:function(){return P}},{key:"DATETIME_FULL",get:function(){return R}},{key:"DATETIME_FULL_WITH_SECONDS",get:function(){return W}},{key:"DATETIME_HUGE",get:function(){return Q}},{key:"DATETIME_HUGE_WITH_SECONDS",get:function(){return V}}]),e}();function dr(e){if(cr.isDateTime(e))return e;if(e&&e.valueOf&&U(e.valueOf()))return cr.fromJSDate(e);if(e&&"object"==typeof e)return cr.fromObject(e);throw new m("Unknown datetime argument: "+e+", of type "+typeof e)}return e.DateTime=cr,e.Duration=sn,e.FixedOffsetZone=Ge,e.IANAZone=Qe,e.Info=hn,e.Interval=dn,e.InvalidZone=Ue,e.LocalZone=je,e.Settings=Ke,e.Zone=Oe,e}({});!function(){"use strict";var e=Math.PI,t=Math.sin,n=Math.cos,r=Math.tan,i=Math.asin,a=Math.atan2,o=Math.acos,s=e/180,u=864e5,l=2440588,c=2451545;function d(e){return new Date((e+.5-l)*u)}function h(e){return function(e){return e.valueOf()/u-.5+l}(e)-c}var f=23.4397*s;function A(e,i){return a(t(e)*n(f)-r(i)*t(f),n(e))}function p(e,r){return i(t(r)*n(f)+n(r)*t(f)*t(e))}function g(e,i,o){return a(t(e),n(e)*t(i)-r(o)*n(i))}function m(e,r,a){return i(t(r)*t(a)+n(r)*n(a)*n(e))}function v(e,t){return s*(280.16+360.9856235*e)-t}function y(e){return s*(357.5291+.98560028*e)}function w(n){return n+s*(1.9148*t(n)+.02*t(2*n)+3e-4*t(3*n))+102.9372*s+e}function x(e){var t=w(y(e));return{dec:p(t,0),ra:A(t,0)}}var b={getPosition:function(e,t,n){var r=s*-n,i=s*t,a=h(e),o=x(a),u=v(a,r)-o.ra;return{azimuth:g(u,i,o.dec),altitude:m(u,i,o.dec)}}},S=b.times=[[-.833,"sunrise","sunset"],[-.3,"sunriseEnd","sunsetStart"],[-6,"dawn","dusk"],[-12,"nauticalDawn","nauticalDusk"],[-18,"nightEnd","night"],[6,"goldenHourEnd","goldenHour"]];b.addTime=function(e,t,n){S.push([e,t,n])};var C=9e-4;function T(t,n,r){return C+(t+n)/(2*e)+r}function F(e,n,r){return c+e+.0053*t(n)-.0069*t(2*r)}function k(e,r,i,a,s,u,l){return F(T(function(e,r,i){return o((t(e)-t(r)*t(i))/(n(r)*n(i)))}(e,i,a),r,s),u,l)}function I(e){var r=s*(134.963+13.064993*e),i=s*(93.272+13.22935*e),a=s*(218.316+13.176396*e)+6.289*s*t(r),o=5.128*s*t(i),u=385001-20905*n(r);return{ra:A(a,o),dec:p(a,o),dist:u}}function E(e,t){return new Date(e.valueOf()+t*u/24)}b.getTimes=function(t,n,r){var i,a,o,u,l,c=s*-r,f=s*n,A=function(t,n){return Math.round(t-C-n/(2*e))}(h(t),c),g=T(0,c,A),m=y(g),v=w(m),x=p(v,0),b=F(g,m,v),I={solarNoon:d(b),nadir:d(b-.5)};for(i=0,a=S.length;i=0&&(g=h-(v=Math.sqrt(A)/(2*Math.abs(c))),m=h+v,Math.abs(g)<=1&&p++,Math.abs(m)<=1&&p++,g<-1&&(g=m)),1===p?w<0?u=x+g:l=x+g:2===p&&(u=x+(f<0?m:g),l=x+(f<0?g:m)),!u||!l);x+=2)w=o;var S={};return u&&(S.rise=E(i,u)),l&&(S.set=E(i,l)),u||l||(S[f>0?"alwaysUp":"alwaysDown"]=!0),S},"object"==typeof exports&&"undefined"!=typeof module?module.exports=b:"function"==typeof define&&define.amd?define(b):window.SunCalc=b}();const draw=(()=>{const e=(e,t,n,r,i,a,o,s=0,u="start")=>{e.textAlign=u,e.font=n+` '${t}'`,e.shadowColor="#000000",e.shadowOffsetX=s,e.shadowOffsetY=s,e.strokeStyle="#000000",e.lineWidth=2,e.strokeText(o,i,a),e.fillStyle=r,e.fillText(o,i,a),e.fillStyle="",e.strokeStyle="",e.shadowOffsetX=0,e.shadowOffsetY=0};return{horizontalGradient:(e,t,n,r,i,a,o)=>{const s=e.createLinearGradient(0,n,0,i);s.addColorStop(0,a),s.addColorStop(.4,o),s.addColorStop(.6,o),s.addColorStop(1,a),e.fillStyle=s,e.fillRect(t,n,r-t,i-n)},horizontalGradientSingle:(e,t,n,r,i,a,o)=>{const s=e.createLinearGradient(0,n,0,i);s.addColorStop(0,a),s.addColorStop(1,o),e.fillStyle=s,e.fillRect(t,n,r-t,i-n)},triangle:(e,t,n,r,i,a,o,s)=>{e.fillStyle=t,e.beginPath(),e.moveTo(n,r),e.lineTo(i,a),e.lineTo(o,s),e.fill()},titleText:(t,n,r)=>{const i="Star4000",a="24pt",o="#ffff00";let s=55;r?(e(t,i,a,o,170,s,n,3),s+=30,e(t,i,a,o,170,s,r,3),s+=30):(s+=15,e(t,i,a,o,170,s,n,3),s+=30)},text:e,box:(e,t,n,r,i,a)=>{e.fillStyle=t,e.fillRect(n,r,i,a)},border:(e,t,n,r,i,a,o)=>{e.strokeStyle=t,e.lineWidth=n,e.strokeRect(r,i,a,o)},theme:1,topColor1:"rgb(192, 91, 2)",topColor2:"rgb(72, 34, 64)",sideColor1:"rgb(46, 18, 80)",sideColor2:"rgb(192, 91, 2)"}})(),STATUS={loading:Symbol("loading"),loaded:Symbol("loaded"),failed:Symbol("failed"),noData:Symbol("noData"),disabled:Symbol("disabled")};class WeatherDisplay{constructor(e,t,n,r){this.navId=e,this.elemId=void 0,this.gifs=[],this.data=void 0,this.loadingStatus=STATUS.loading,this.name=n||t,this.getDataCallbacks=[],this.timing={totalScreens:1,baseDelay:9e3,delay:1},this.navBaseCount=0,this.screenIndex=-1,this.createCanvas(t),"progress"!==t&&this.addCheckbox(r),this.enabled?this.setStatus(STATUS.loading):this.setStatus(STATUS.disabled),this.startNavCount()}addCheckbox(e=!0){let t=window.localStorage.getItem(this.elemId+"Enabled");null===t&&(t=e),this.enabled="true"===t||!0===t,window.localStorage.setItem(this.elemId+"Enabled",this.enabled);const n=document.createElement("template");n.innerHTML=``,n.content.firstChild.addEventListener("change",e=>this.checkboxChange(e));document.getElementById("enabledDisplays").appendChild(n.content.firstChild)}checkboxChange(e){this.enabled=e.target.checked,window.localStorage.setItem(this.elemId+"Enabled",this.enabled),this.getData()}setStatus(e){this.status=e,navigation.updateStatus({id:this.navId,status:this.status})}get status(){return this.loadingStatus}set status(e){this.loadingStatus=e}createCanvas(e,t=640,n=480){if(this.elemId)return;this.elemId=e;const r=document.createElement("template");r.innerHTML=`