Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

spacetime

Package Overview
Dependencies
Maintainers
3
Versions
130
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

spacetime - npm Package Compare versions

Comparing version 6.14.0 to 6.15.0

2

builds/spacetime.min.js

@@ -1,1 +0,1 @@

!function(n,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(n="undefined"!=typeof globalThis?globalThis:n||self).spacetime=e()}(this,(function(){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(e)}function e(n,e){return function(n){if(Array.isArray(n))return n}(n)||function(n,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(n)))return;var t=[],r=!0,a=!1,o=void 0;try{for(var i,u=n[Symbol.iterator]();!(r=(i=u.next()).done)&&(t.push(i.value),!e||t.length!==e);r=!0);}catch(n){a=!0,o=n}finally{try{r||null==u.return||u.return()}finally{if(a)throw o}}return t}(n,e)||function(n,e){if(!n)return;if("string"==typeof n)return t(n,e);var r=Object.prototype.toString.call(n).slice(8,-1);"Object"===r&&n.constructor&&(r=n.constructor.name);if("Map"===r||"Set"===r)return Array.from(n);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return t(n,e)}(n,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function t(n,e){(null==e||e>n.length)&&(e=n.length);for(var t=0,r=new Array(e);t<e;t++)r[t]=n[t];return r}var r=function(n,t,r){var a=e(n.split("/"),2),o=a[0],i=e(a[1].split(":"),2),u=i[0],s=i[1];return Date.UTC(r,o-1,u,s)-36e5*t},a=function(n,e,t,a,o){var i=new Date(n).getUTCFullYear(),u=r(e,o,i),s=r(t,a,i);return n>=u&&n<s},o=function(n){var e=n.timezones[n.tz];if(void 0===e)return console.warn("Warning: couldn't find timezone "+n.tz),0;if(void 0===e.dst)return e.offset;var t=e.offset,r=e.offset+1;"n"===e.hem&&(r=t-1);var o=e.dst.split("->");return!0===a(n.epoch,o[0],o[1],t,r)?t:r},i=["africa","america","asia","atlantic","australia","brazil","canada","chile","europe","indian","mexico","pacific","antarctica","etc"];var u,s=(u=Object.freeze({__proto__:null,default:{"9|s":"2/dili,2/jayapura","9|n":"2/chita,2/khandyga,2/pyongyang,2/seoul,2/tokyo,11/palau","9.5|s|04/04:03->10/03:02":"4/adelaide,4/broken_hill,4/south,4/yancowinna","9.5|s":"4/darwin,4/north","8|s|03/08:01->10/04:00":"12/casey","8|s":"2/kuala_lumpur,2/makassar,2/singapore,4/perth,2/ujung_pandang,4/west","8|n":"2/brunei,2/choibalsan,2/hong_kong,2/irkutsk,2/kuching,2/macau,2/manila,2/shanghai,2/taipei,2/ulaanbaatar,2/chongqing,2/chungking,2/harbin,2/macao,2/ulan_bator","8.75|s":"4/eucla","7|s":"12/davis,2/jakarta,9/christmas","7|n":"2/bangkok,2/barnaul,2/hovd,2/krasnoyarsk,2/novokuznetsk,2/novosibirsk,2/phnom_penh,2/pontianak,2/saigon,2/tomsk,2/vientiane,2/ho_chi_minh","6|s":"12/vostok","6|n":"2/almaty,2/bishkek,2/dhaka,2/omsk,2/qyzylorda,2/qostanay,2/thimphu,2/urumqi,9/chagos,2/dacca,2/kashgar,2/thimbu","6.5|n":"2/rangoon,9/cocos,2/yangon","5|s":"12/mawson,9/kerguelen","5|n":"2/aqtau,2/aqtobe,2/ashgabat,2/atyrau,2/baku,2/dushanbe,2/karachi,2/oral,2/samarkand,2/tashkent,2/yekaterinburg,9/maldives,2/ashkhabad","5.75|n":"2/katmandu,2/kathmandu","5.5|n":"2/calcutta,2/colombo,2/kolkata","4|s":"9/reunion","4|n":"2/dubai,2/muscat,2/tbilisi,2/yerevan,8/astrakhan,8/samara,8/saratov,8/ulyanovsk,8/volgograd,2/volgograd,9/mahe,9/mauritius","4.5|n|03/22:00->09/21:24":"2/tehran","4.5|n":"2/kabul","3|s":"12/syowa,9/antananarivo","3|n|03/28:03->10/31:04":"2/famagusta,2/nicosia,8/athens,8/bucharest,8/helsinki,8/kiev,8/mariehamn,8/riga,8/sofia,8/tallinn,8/uzhgorod,8/vilnius,8/zaporozhye,8/nicosia","3|n|03/28:02->10/31:03":"8/chisinau,8/tiraspol","3|n|03/28:00->10/30:24":"2/beirut","3|n|03/27:00->10/30:01":"2/gaza,2/hebron","3|n|03/26:02->10/31:02":"2/jerusalem,2/tel_aviv","3|n|03/26:00->10/29:01":"2/amman","3|n|03/26:00->10/28:24":"2/damascus","3|n":"0/addis_ababa,0/asmera,0/dar_es_salaam,0/djibouti,0/juba,0/kampala,0/mogadishu,0/nairobi,2/aden,2/baghdad,2/bahrain,2/kuwait,2/qatar,2/riyadh,8/istanbul,8/kirov,8/minsk,8/moscow,8/simferopol,9/comoro,9/mayotte,0/asmara,2/istanbul","2|s|03/28:02->10/31:02":"12/troll","2|s":"0/gaborone,0/harare,0/johannesburg,0/lubumbashi,0/lusaka,0/maputo,0/maseru,0/mbabane","2|n|03/28:02->10/31:03":"0/ceuta,arctic/longyearbyen,8/amsterdam,8/andorra,8/belgrade,8/berlin,8/bratislava,8/brussels,8/budapest,8/busingen,8/copenhagen,8/gibraltar,8/ljubljana,8/luxembourg,8/madrid,8/malta,8/monaco,8/oslo,8/paris,8/podgorica,8/prague,8/rome,8/san_marino,8/sarajevo,8/skopje,8/stockholm,8/tirane,8/vaduz,8/vatican,8/vienna,8/warsaw,8/zagreb,8/zurich,3/jan_mayen","2|n":"0/blantyre,0/bujumbura,0/cairo,0/khartoum,0/kigali,0/tripoli,8/kaliningrad","1|s":"0/brazzaville,0/kinshasa,0/luanda,0/windhoek","1|n|04/11:03->05/16:02":"0/casablanca,0/el_aaiun","1|n|03/28:01->10/31:02":"3/canary,3/faeroe,3/madeira,8/dublin,8/guernsey,8/isle_of_man,8/jersey,8/lisbon,8/london,3/faroe,8/belfast","1|n":"0/algiers,0/bangui,0/douala,0/lagos,0/libreville,0/malabo,0/ndjamena,0/niamey,0/porto-novo,0/tunis","14|n":"11/kiritimati","13|s|04/04:04->09/26:03":"11/apia","13|s|01/15:02->11/05:03":"11/tongatapu","13|n":"11/enderbury,11/fakaofo","12|s|04/04:03->09/26:02":"12/mcmurdo,11/auckland,12/south_pole","12|s|01/17:03->11/14:02":"11/fiji","12|n":"2/anadyr,2/kamchatka,2/srednekolymsk,11/funafuti,11/kwajalein,11/majuro,11/nauru,11/tarawa,11/wake,11/wallis","12.75|s|04/04:03->04/04:02":"11/chatham","11|s|04/04:03->10/03:02":"12/macquarie","11|s":"11/bougainville","11|n":"2/magadan,2/sakhalin,11/efate,11/guadalcanal,11/kosrae,11/noumea,11/ponape,11/pohnpei","11.5|n|04/04:03->10/03:02":"11/norfolk","10|s|04/04:03->10/03:02":"4/currie,4/hobart,4/melbourne,4/sydney,4/act,4/canberra,4/nsw,4/tasmania,4/victoria","10|s":"12/dumontdurville,4/brisbane,4/lindeman,11/port_moresby,4/queensland","10|n":"2/ust-nera,2/vladivostok,2/yakutsk,11/guam,11/saipan,11/truk,11/chuuk,11/yap","10.5|s|04/04:01->10/03:02":"4/lord_howe,4/lhi","0|n|03/28:00->10/31:01":"1/scoresbysund,3/azores","0|n":"0/abidjan,0/accra,0/bamako,0/banjul,0/bissau,0/conakry,0/dakar,0/freetown,0/lome,0/monrovia,0/nouakchott,0/ouagadougou,0/sao_tome,1/danmarkshavn,3/reykjavik,3/st_helena,13/gmt,13/utc,0/timbuktu,13/gmt-0,13/gmt+0,13/gmt0,13/greenwich,13/uct,13/universal,13/zulu","-9|n|03/14:02->11/07:02":"1/adak,1/atka,us/aleutian","-9|n":"11/gambier","-9.5|n":"11/marquesas","-8|n|03/14:02->11/07:02":"1/anchorage,1/juneau,1/metlakatla,1/nome,1/sitka,1/yakutat,us/alaska","-8|n":"11/pitcairn","-7|n|03/14:02->11/07:02":"1/los_angeles,1/santa_isabel,1/tijuana,1/vancouver,1/ensenada,6/pacific,10/bajanorte,us/pacific-new,us/pacific","-7|n|03/08:02->11/01:01":"1/dawson,1/whitehorse,6/yukon","-7|n":"1/creston,1/dawson_creek,1/fort_nelson,1/hermosillo,1/phoenix,us/arizona","-6|s|04/03:22->09/04:22":"11/easter,7/easterisland","-6|n|04/04:02->10/31:02":"1/chihuahua,1/mazatlan,10/bajasur","-6|n|03/14:02->11/07:02":"1/boise,1/cambridge_bay,1/denver,1/edmonton,1/inuvik,1/ojinaga,1/yellowknife,1/shiprock,6/mountain,us/mountain","-6|n":"1/belize,1/costa_rica,1/el_salvador,1/guatemala,1/managua,1/regina,1/swift_current,1/tegucigalpa,11/galapagos,6/east-saskatchewan,6/saskatchewan","-5|s":"1/lima,1/rio_branco,1/porto_acre,5/acre","-5|n|04/04:02->10/31:02":"1/bahia_banderas,1/merida,1/mexico_city,1/monterrey,10/general","-5|n|03/14:02->11/07:02":"1/chicago,1/matamoros,1/menominee,1/rainy_river,1/rankin_inlet,1/resolute,1/winnipeg,1/indiana/knox,1/indiana/tell_city,1/north_dakota/beulah,1/north_dakota/center,1/north_dakota/new_salem,1/knox_in,6/central,us/central,us/indiana-starke","-5|n|03/12:03->11/05:01":"1/north_dakota","-5|n":"1/bogota,1/cancun,1/cayman,1/coral_harbour,1/eirunepe,1/guayaquil,1/jamaica,1/panama,1/atikokan","-4|s|05/13:23->08/13:01":"12/palmer","-4|s|04/03:24->09/05:00":"1/santiago,7/continental","-4|s|03/27:24->10/03:00":"1/asuncion","-4|s|02/16:24->11/03:00":"1/campo_grande,1/cuiaba","-4|s":"1/la_paz,1/manaus,5/west","-4|n|03/14:02->11/07:02":"1/detroit,1/grand_turk,1/indianapolis,1/iqaluit,1/louisville,1/montreal,1/nassau,1/new_york,1/nipigon,1/pangnirtung,1/port-au-prince,1/thunder_bay,1/toronto,1/indiana/marengo,1/indiana/petersburg,1/indiana/vevay,1/indiana/vincennes,1/indiana/winamac,1/kentucky/monticello,1/fort_wayne,1/indiana/indianapolis,1/kentucky/louisville,6/eastern,us/east-indiana,us/eastern,us/michigan","-4|n|03/14:00->11/07:01":"1/havana","-4|n|03/12:03->11/05:01":"1/indiana,1/kentucky","-4|n":"1/anguilla,1/antigua,1/aruba,1/barbados,1/blanc-sablon,1/boa_vista,1/caracas,1/curacao,1/dominica,1/grenada,1/guadeloupe,1/guyana,1/kralendijk,1/lower_princes,1/marigot,1/martinique,1/montserrat,1/port_of_spain,1/porto_velho,1/puerto_rico,1/santo_domingo,1/st_barthelemy,1/st_kitts,1/st_lucia,1/st_thomas,1/st_vincent,1/tortola,1/virgin","-3|s":"1/argentina,1/buenos_aires,1/catamarca,1/cordoba,1/fortaleza,1/jujuy,1/mendoza,1/montevideo,1/punta_arenas,1/sao_paulo,12/rothera,3/stanley,1/argentina/la_rioja,1/argentina/rio_gallegos,1/argentina/salta,1/argentina/san_juan,1/argentina/san_luis,1/argentina/tucuman,1/argentina/ushuaia,1/argentina/buenos_aires,1/argentina/catamarca,1/argentina/comodrivadavia,1/argentina/cordoba,1/argentina/jujuy,1/argentina/mendoza,1/rosario,5/east","-3|n|03/14:02->11/07:02":"1/glace_bay,1/goose_bay,1/halifax,1/moncton,1/thule,3/bermuda,6/atlantic","-3|n":"1/araguaina,1/bahia,1/belem,1/cayenne,1/maceio,1/paramaribo,1/recife,1/santarem","-2|n|03/27:22->10/30:23":"1/godthab,1/nuuk","-2|n|03/14:02->11/07:02":"1/miquelon","-2|n":"1/noronha,3/south_georgia,5/denoronha","-2.5|n|03/14:02->11/07:02":"1/st_johns,6/newfoundland","-1|n":"3/cape_verde","-11|n":"11/midway,11/niue,11/pago_pago,11/samoa,us/samoa","-10|n":"11/honolulu,11/johnston,11/rarotonga,11/tahiti,us/hawaii"}}))&&u.default||u,c={};Object.keys(s).forEach((function(n){var e=n.split("|"),t={offset:Number(e[0]),hem:e[1]};e[2]&&(t.dst=e[2]),s[n].split(",").forEach((function(n){n=n.replace(/(^[0-9]+)\//,(function(n,e){return e=Number(e),i[e]+"/"})),c[n]=t}))})),c.utc={offset:0,hem:"n"};for(var h=-14;h<=14;h+=.5){var f=h;f>0&&(f="+"+f);var l="etc/gmt"+f;c[l]={offset:-1*h,hem:"n"},c[l="utc/gmt"+f]={offset:-1*h,hem:"n"}}var d=c,m=/(\-?[0-9]+)h(rs)?/i,p=/(\-?[0-9]+)/,y=/utc([\-+]?[0-9]+)/i,v=/gmt([\-+]?[0-9]+)/i,g=function(n){return(n=Number(n))>=-13&&n<=13?"etc/gmt"+(n=((n*=-1)>0?"+":"")+n):null},b=function(n){var e=n.match(m);if(null!==e)return g(e[1]);if(null!==(e=n.match(y)))return g(e[1]);if(null!==(e=n.match(v))){var t=-1*Number(e[1]);return g(t)}return null!==(e=n.match(p))?g(e[1]):null},k=function(){var n=function(){if("undefined"==typeof Intl||void 0===Intl.DateTimeFormat)return null;var n=Intl.DateTimeFormat();if(void 0===n||void 0===n.resolvedOptions)return null;var e=n.resolvedOptions().timeZone;return e?e.toLowerCase():null}();return null===n?"utc":n}(),w=Object.keys(d).reduce((function(n,e){var t=e.split("/")[1]||"";return n[t=t.replace(/_/g," ")]=e,n}),{}),z=function(n,e){if(!n)return k;"string"!=typeof n&&console.error("Timezone must be a string - recieved: '",n,"'\n");var t=n.trim();if(t=t.toLowerCase(),!0===e.hasOwnProperty(t))return t;if(t=function(n){return(n=(n=(n=(n=(n=n.replace(/ time/g,"")).replace(/ (standard|daylight|summer)/g,"")).replace(/\b(east|west|north|south)ern/g,"$1")).replace(/\b(africa|america|australia)n/g,"$1")).replace(/\beuropean/g,"europe")).replace(/\islands/g,"island")}(t),!0===e.hasOwnProperty(t))return t;if(!0===w.hasOwnProperty(t))return w[t];if(!0===/[0-9]/.test(t)){var r=b(t);if(r)return r}throw new Error("Spacetime: Cannot find timezone named: '"+n+"'. Please enter an IANA timezone id.")},_={millisecond:1,second:1e3,minute:6e4,hour:36e5,day:864e5};_.date=_.day,_.month=25488e5,_.week=6048e5,_.year=3154e7,Object.keys(_).forEach((function(n){_[n+"s"]=_[n]}));var j=_,O=function(n,e,t,r,a){var o=n.d[t]();if(o!==e){var i=null===a?null:n.d[a](),u=n.epoch,s=e-o;n.epoch+=j[r]*s,"day"===r&&Math.abs(s)>28&&e<28&&(n.epoch+=j.hour),null!==a&&i!==n.d[a]()&&(n.epoch=u);for(var c=j[r]/2;n.d[t]()<e;)n.epoch+=c;for(;n.d[t]()>e;)n.epoch-=c;null!==a&&i!==n.d[a]()&&(n.epoch=u)}},D={year:{valid:function(n){return n>-4e3&&n<4e3},walkTo:function(n,e){return O(n,e,"getFullYear","year",null)}},month:{valid:function(n){return n>=0&&n<=11},walkTo:function(n,e){var t=n.d,r=t.getMonth(),a=n.epoch,o=t.getFullYear();if(r!==e){var i=e-r;for(n.epoch+=j.day*(28*i),o!==n.d.getFullYear()&&(n.epoch=a);n.d.getMonth()<e;)n.epoch+=j.day;for(;n.d.getMonth()>e;)n.epoch-=j.day}}},date:{valid:function(n){return n>0&&n<=31},walkTo:function(n,e){return O(n,e,"getDate","day","getMonth")}},hour:{valid:function(n){return n>=0&&n<24},walkTo:function(n,e){return O(n,e,"getHours","hour","getDate")}},minute:{valid:function(n){return n>=0&&n<60},walkTo:function(n,e){return O(n,e,"getMinutes","minute","getHours")}},second:{valid:function(n){return n>=0&&n<60},walkTo:function(n,e){n.epoch=n.seconds(e).epoch}},millisecond:{valid:function(n){return n>=0&&n<1e3},walkTo:function(n,e){n.epoch=n.milliseconds(e).epoch}}},S=function(n,e){for(var t=Object.keys(D),r=n.clone(),a=0;a<t.length;a++){var o=t[a],i=e[o];if(void 0===i&&(i=r[o]()),"string"==typeof i&&(i=parseInt(i,10)),!D[o].valid(i))return n.epoch=null,void(!1===n.silent&&console.warn("invalid "+o+": "+i));D[o].walkTo(n,i)}},M=["jan","feb","mar","apr","may","jun","jul","aug","sept","oct","nov","dec"],P=["january","february","march","april","may","june","july","august","september","october","november","december"];var q=function(){return M},E=function(){return P},C=function(){return function(){for(var n={sep:8},e=0;e<M.length;e++)n[M[e]]=e;for(var t=0;t<P.length;t++)n[P[t]]=t;return n}()},I=function(n){M=n.short||M,P=n.long||P},T=function(n,e){if(!e)return n;"Z"!==e&&"z"!==e||(e="+0000");var t=0;/^[\+-]?[0-9]{2}:[0-9]{2}$/.test(e)&&(!0===/:00/.test(e)&&(e=e.replace(/:00/,"")),!0===/:30/.test(e)&&(e=e.replace(/:30/,".5"))),/^[\+-]?[0-9]{4}$/.test(e)&&(e=e.replace(/30$/,".5")),t=parseFloat(e),Math.abs(t)>100&&(t/=100),(t*=-1)>=0&&(t="+"+t);var r="etc/gmt"+t;return n.timezones[r]&&(n.tz=r),n},A=function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",t=(e=e.replace(/^\s+/,"").toLowerCase()).match(/([0-9]{1,2}):([0-9]{1,2}):?([0-9]{1,2})?[:\.]?([0-9]{1,4})?/);if(null!==t){var r=Number(t[1]);if(r<0||r>24)return n.startOf("day");var a=Number(t[2]);if(t[2].length<2||a<0||a>59)return n.startOf("day");t[4]>999&&(t[4]=parseInt("".concat(t[4]).substring(0,3),10)),n=(n=(n=(n=n.hour(r)).minute(a)).seconds(t[3]||0)).millisecond(t[4]||0);var o=e.match(/[\b0-9](am|pm)\b/);return null!==o&&o[1]&&(n=n.ampm(o[1])),n}if(null!==(t=e.match(/([0-9]+) ?(am|pm)/))&&t[1]){var i=Number(t[1]);return i>12||i<1?n.startOf("day"):n=(n=(n=n.hour(t[1]||0)).ampm(t[2])).startOf("hour")}return n=n.startOf("day")},N=[31,28,31,30,31,30,31,31,30,31,30,31],$=function(n,e){return n(e={exports:{}},e.exports),e.exports}((function(n,e){e.isLeapYear=function(n){return n%4==0&&n%100!=0||n%400==0},e.isDate=function(n){return"[object Date]"===Object.prototype.toString.call(n)&&!isNaN(n.valueOf())},e.isArray=function(n){return"[object Array]"===Object.prototype.toString.call(n)},e.isObject=function(n){return"[object Object]"===Object.prototype.toString.call(n)},e.isBoolean=function(n){return"[object Boolean]"===Object.prototype.toString.call(n)},e.zeroPad=function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,t="0";return(n+="").length>=e?n:new Array(e-n.length+1).join(t)+n},e.titleCase=function(n){return n?n[0].toUpperCase()+n.substr(1):""},e.ordinal=function(n){var e=n%10,t=n%100;return 1===e&&11!==t?n+"st":2===e&&12!==t?n+"nd":3===e&&13!==t?n+"rd":n+"th"},e.toCardinal=function(n){return n=(n=String(n)).replace(/([0-9])(st|nd|rd|th)$/i,"$1"),parseInt(n,10)},e.normalize=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return"day"===(n=(n=(n=(n=n.toLowerCase().trim()).replace(/ies$/,"y")).replace(/s$/,"")).replace(/-/g,""))||"days"===n?"date":"min"===n||"mins"===n?"minute":n},e.getEpoch=function(n){return"number"==typeof n?n:e.isDate(n)?n.getTime():n.epoch?n.epoch:null},e.beADate=function(n,t){return!1===e.isObject(n)?t.clone().set(n):n},e.formatTimezone=function(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=n>0?"+":"-",a=Math.abs(n),o=e.zeroPad(parseInt(""+a,10)),i=e.zeroPad(a%1*60);return"".concat(r).concat(o).concat(t).concat(i)}}));$.isLeapYear,$.isDate,$.isArray,$.isObject,$.isBoolean,$.zeroPad,$.titleCase,$.ordinal,$.toCardinal,$.normalize,$.getEpoch,$.beADate,$.formatTimezone;var x=$.isLeapYear,Y=function(n){if(!0!==N.hasOwnProperty(n.month))return!1;if(1===n.month)return!!(x(n.year)&&n.date<=29)||n.date<=28;var e=N[n.month]||0;return n.date<=e},L=C(),F=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1?arguments[1]:void 0,t=parseInt(n.trim(),10);return!t&&e&&(t=e.year),t=t||(new Date).getFullYear()},B=[{reg:/^(\-?0?0?[0-9]{3,4})-([0-9]{1,2})-([0-9]{1,2})[T| ]([0-9.:]+)(Z|[0-9\-\+:]+)?$/i,parse:function(n,e,t,r){var a=parseInt(e[2],10)-1,o={year:e[1],month:a,date:e[3]};return!1===Y(o)?(n.epoch=null,n):(T(n,e[5]),S(n,o),n=A(n,e[4]))}},{reg:/^([0-9]{4})[\-\/.]([0-9]{1,2})[\-\/.]([0-9]{1,2}),?( [0-9]{1,2}:[0-9]{2}:?[0-9]{0,2}? ?(am|pm|gmt))?$/i,parse:function(n,e){var t={year:e[1],month:parseInt(e[2],10)-1,date:parseInt(e[3],10)};return t.month>=12&&(t.date=parseInt(e[2],10),t.month=parseInt(e[3],10)-1),!1===Y(t)?(n.epoch=null,n):(S(n,t),n=A(n,e[4]))}},{reg:/^([0-9]{1,2})[\-\/.]([0-9]{1,2})[\-\/.]?([0-9]{4})?,?( [0-9]{1,2}:[0-9]{2}:?[0-9]{0,2}? ?(am|pm|gmt))?$/i,parse:function(n,e){var t=parseInt(e[1],10)-1,r=parseInt(e[2],10);(n.british||t>=12)&&(r=parseInt(e[1],10),t=parseInt(e[2],10)-1);var a={year:F(e[3],n._today)||(new Date).getFullYear(),month:t,date:r};return!1===Y(a)?(n.epoch=null,n):(S(n,a),n=A(n,e[4]))}},{reg:/^([0-9]{4})[\-\/]([0-9]{2})$/i,parse:function(n,e,t,r){var a=parseInt(e[2],10)-1,o={year:e[1],month:a,date:1};return!1===Y(o)?(n.epoch=null,n):(T(n,e[5]),S(n,o),n=A(n,e[4]))}},{reg:/^([0-9]{1,2})[\-\/]([a-z]+)[\-\/]?([0-9]{4})?$/i,parse:function(n,e){var t=L[e[2].toLowerCase()],r={year:F(e[3],n._today),month:t,date:$.toCardinal(e[1]||"")};return!1===Y(r)?(n.epoch=null,n):(S(n,r),n=A(n,e[4]))}},{reg:/^([a-z]+)[\-\/]([0-9]{1,2})[\-\/]?([0-9]{4})?$/i,parse:function(n,e){var t=L[e[1].toLowerCase()],r={year:F(e[3],n._today),month:t,date:$.toCardinal(e[2]||"")};return!1===Y(r)?(n.epoch=null,n):(S(n,r),n=A(n,e[4]))}},{reg:/^([a-z]+) ([0-9]{1,2}(?:st|nd|rd|th)?),?( [0-9]{4})?( ([0-9:]+( ?am| ?pm| ?gmt)?))?$/i,parse:function(n,e){var t=L[e[1].toLowerCase()],r={year:F(e[3],n._today),month:t,date:$.toCardinal(e[2]||"")};return!1===Y(r)?(n.epoch=null,n):(S(n,r),n=A(n,e[4]))}},{reg:/^([a-z]+) ([0-9]{4})$/i,parse:function(n,e){var t=L[e[1].toLowerCase()],r={year:F(e[2],n._today),month:t,date:n._today.date||1};return!1===Y(r)?(n.epoch=null,n):(S(n,r),n=A(n,e[4]))}},{reg:/^([0-9]{1,2}(?:st|nd|rd|th)?) ([a-z]+),?( [0-9]{4})?,? ?([0-9]{1,2}:[0-9]{2}:?[0-9]{0,2}? ?(am|pm|gmt))?$/i,parse:function(n,e){var t=L[e[2].toLowerCase()];if(!t)return null;var r={year:F(e[3],n._today),month:t,date:$.toCardinal(e[1])};return!1===Y(r)?(n.epoch=null,n):(S(n,r),n=A(n,e[4]))}},{reg:/^(q[0-9])( of)?( [0-9]{4})?/i,parse:function(n,e){var t=e[1]||"";n=n.quarter(t);var r=e[3]||"";return r&&(r=r.trim(),n=n.year(r)),n}},{reg:/^(spring|summer|winter|fall|autumn)( of)?( [0-9]{4})?/i,parse:function(n,e){var t=e[1]||"";n=n.season(t);var r=e[3]||"";return r&&(r=r.trim(),n=n.year(r)),n}},{reg:/^[0-9,]+ ?b\.?c\.?$/i,parse:function(n,e){var t=e[0]||"";t=(t=t.replace(/^([0-9,]+) ?b\.?c\.?$/i,"-$1")).replace(/,/g,"");var r=parseInt(t.trim(),10),a=new Date,o={year:r,month:a.getMonth(),date:a.getDate()};return!1===Y(o)?(n.epoch=null,n):(S(n,o),n=A(n))}},{reg:/^[0-9,]+ ?(a\.?d\.?|c\.?e\.?)$/i,parse:function(n,e){var t=e[0]||"";t=t.replace(/,/g,"");var r=parseInt(t.trim(),10),a=new Date,o={year:r,month:a.getMonth(),date:a.getDate()};return!1===Y(o)?(n.epoch=null,n):(S(n,o),n=A(n))}},{reg:/^[0-9]{4}( ?a\.?d\.?)?$/i,parse:function(n,e){var t=n._today,r=F(e[0],t),a=new Date;t.month&&!t.date&&(t.date=1);var o={year:r,month:t.month||a.getMonth(),date:t.date||a.getDate()};return!1===Y(o)?(n.epoch=null,n):(S(n,o),n=A(n))}}],Z=function(n){return n.epoch=Date.now(),Object.keys(n._today||{}).forEach((function(e){"function"==typeof n[e]&&(n=n[e](n._today[e]))})),n},H={now:function(n){return Z(n)},today:function(n){return Z(n)},tonight:function(n){return n=(n=Z(n)).hour(18)},tomorrow:function(n){return n=(n=(n=Z(n)).add(1,"day")).startOf("day")},yesterday:function(n){return n=(n=(n=Z(n)).subtract(1,"day")).startOf("day")},christmas:function(n){var e=Z(n).year();return n=n.set([e,11,25,18,0,0])},"new years":function(n){var e=Z(n).year();return n=n.set([e,11,31,18,0,0])}};H["new years eve"]=H["new years"];var Q=H,G={year:(new Date).getFullYear(),month:0,date:1},U=function(n,e,t){if(0===Object.keys(e).length)return n;e=Object.assign({},G,t,e);for(var r=Object.keys(e),a=0;a<r.length;a++){var o=r[a];if(void 0!==n[o]&&"function"==typeof n[o]&&(null!==e[o]&&void 0!==e[o]&&""!==e[o])){var i=e[o]||t[o]||G[o]||0;n=n[o](i)}}return n},V=function(n,e,t){var r=n._today||G;if("number"==typeof e)return e>0&&e<25e8&&!1===n.silent&&(console.warn(" - Warning: You are setting the date to January 1970."),console.warn(" - did input seconds instead of milliseconds?")),n.epoch=e,n;if(n.epoch=Date.now(),n._today&&$.isObject(n._today)&&Object.keys(n._today).length>0){var a=U(n,r,G);a.isValid()&&(n.epoch=a.epoch)}if(null==e||""===e)return n;if(!0===$.isDate(e))return n.epoch=e.getTime(),n;if(!0===$.isArray(e))return n=function(n,e,t){if(0===e.length)return n;for(var r=["year","month","date","hour","minute","second","millisecond"],a=0;a<r.length;a++){var o=e[a]||t[r[a]]||G[r[a]]||0;n=n[r[a]](o)}return n}(n,e,r);if(!0===$.isObject(e))return e.epoch?(n.epoch=e.epoch,n.tz=e.tz,n):n=U(n,e,r);if("string"!=typeof e)return n;if(e=(e=(e=e.replace(/\b(mon|tues|wed|wednes|thu|thurs|fri|sat|satur|sun)(day)?\b/i,"")).replace(/,/g,"")).replace(/ +/g," ").trim(),!0===Q.hasOwnProperty(e))return n=Q[e](n);for(var o=0;o<B.length;o++){var i=e.match(B[o].reg);if(i){var u=B[o].parse(n,i,t);if(null!==u&&u.isValid())return u}}return!1===n.silent&&console.warn("Warning: couldn't parse date-string: '"+e+"'"),n.epoch=null,n},W=["sun","mon","tue","wed","thu","fri","sat"],J=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"],K={short:function(){return W},long:function(){return J},set:function(n){W=n.short||W,J=n.long||J},aliases:{mo:1,tu:2,we:3,th:4,fr:5,sa:6,su:7,tues:2,weds:3,wedn:3,thur:4,thurs:4}},R=!0,X=function(){return R},nn=function(n){R=n},en=function(n){var e=n.timezone().current.offset;return e?$.formatTimezone(e,":"):"Z"},tn=function(n){return X()?$.titleCase(n):n},rn={day:function(n){return tn(n.dayName())},"day-short":function(n){return tn(K.short()[n.day()])},"day-number":function(n){return n.day()},"day-ordinal":function(n){return $.ordinal(n.day())},"day-pad":function(n){return $.zeroPad(n.day())},date:function(n){return n.date()},"date-ordinal":function(n){return $.ordinal(n.date())},"date-pad":function(n){return $.zeroPad(n.date())},month:function(n){return tn(n.monthName())},"month-short":function(n){return tn(q()[n.month()])},"month-number":function(n){return n.month()},"month-ordinal":function(n){return $.ordinal(n.month())},"month-pad":function(n){return $.zeroPad(n.month())},"iso-month":function(n){return $.zeroPad(n.month()+1)},year:function(n){var e=n.year();return e>0?e:(e=Math.abs(e),e+" BC")},"year-short":function(n){var e=n.year();return e>0?"'".concat(String(n.year()).substr(2,4)):(e=Math.abs(e))+" BC"},"iso-year":function(n){var e=n.year(),t=e<0,r=$.zeroPad(Math.abs(e),4);return t&&(r="-"+(r=$.zeroPad(r,6))),r},time:function(n){return n.time()},"time-24":function(n){return"".concat(n.hour24(),":").concat($.zeroPad(n.minute()))},hour:function(n){return n.hour12()},"hour-pad":function(n){return $.zeroPad(n.hour12())},"hour-24":function(n){return n.hour24()},"hour-24-pad":function(n){return $.zeroPad(n.hour24())},minute:function(n){return n.minute()},"minute-pad":function(n){return $.zeroPad(n.minute())},second:function(n){return n.second()},"second-pad":function(n){return $.zeroPad(n.second())},ampm:function(n){return n.ampm()},quarter:function(n){return"Q"+n.quarter()},season:function(n){return n.season()},era:function(n){return n.era()},json:function(n){return n.json()},timezone:function(n){return n.timezone().name},offset:function(n){return en(n)},numeric:function(n){return"".concat(n.year(),"/").concat($.zeroPad(n.month()+1),"/").concat($.zeroPad(n.date()))},"numeric-us":function(n){return"".concat($.zeroPad(n.month()+1),"/").concat($.zeroPad(n.date()),"/").concat(n.year())},"numeric-uk":function(n){return"".concat($.zeroPad(n.date()),"/").concat($.zeroPad(n.month()+1),"/").concat(n.year())},"mm/dd":function(n){return"".concat($.zeroPad(n.month()+1),"/").concat($.zeroPad(n.date()))},iso:function(n){var e=n.format("iso-year"),t=$.zeroPad(n.month()+1),r=$.zeroPad(n.date()),a=$.zeroPad(n.h24()),o=$.zeroPad(n.minute()),i=$.zeroPad(n.second()),u=$.zeroPad(n.millisecond(),3),s=en(n);return"".concat(e,"-").concat(t,"-").concat(r,"T").concat(a,":").concat(o,":").concat(i,".").concat(u).concat(s)},"iso-short":function(n){var e=$.zeroPad(n.month()+1),t=$.zeroPad(n.date());return"".concat(n.year(),"-").concat(e,"-").concat(t)},"iso-utc":function(n){return new Date(n.epoch).toISOString()},nice:function(n){return"".concat(q()[n.month()]," ").concat($.ordinal(n.date()),", ").concat(n.time())},"nice-24":function(n){return"".concat(q()[n.month()]," ").concat($.ordinal(n.date()),", ").concat(n.hour24(),":").concat($.zeroPad(n.minute()))},"nice-year":function(n){return"".concat(q()[n.month()]," ").concat($.ordinal(n.date()),", ").concat(n.year())},"nice-day":function(n){return"".concat(K.short()[n.day()]," ").concat(tn(q()[n.month()])," ").concat($.ordinal(n.date()))},"nice-full":function(n){return"".concat(n.dayName()," ").concat(tn(n.monthName())," ").concat($.ordinal(n.date()),", ").concat(n.time())},"nice-full-24":function(n){return"".concat(n.dayName()," ").concat(tn(n.monthName())," ").concat($.ordinal(n.date()),", ").concat(n.hour24(),":").concat($.zeroPad(n.minute()))}},an={"day-name":"day","month-name":"month","iso 8601":"iso","time-h24":"time-24","time-12":"time","time-h12":"time",tz:"timezone","day-num":"day-number","month-num":"month-number","month-iso":"iso-month","year-iso":"iso-year","nice-short":"nice","nice-short-24":"nice-24",mdy:"numeric-us",dmy:"numeric-uk",ymd:"numeric","yyyy/mm/dd":"numeric","mm/dd/yyyy":"numeric-us","dd/mm/yyyy":"numeric-us","little-endian":"numeric-uk","big-endian":"numeric","day-nice":"nice-day"};Object.keys(an).forEach((function(n){return rn[n]=rn[an[n]]}));var on=function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(!0!==n.isValid())return"";if(rn.hasOwnProperty(e)){var t=rn[e](n)||"";return"json"!==e&&(t=String(t),"ampm"!==e&&(t=tn(t))),t}if(-1!==e.indexOf("{")){var r=/\{(.+?)\}/g;return e=e.replace(r,(function(e,t){if(t=t.toLowerCase().trim(),rn.hasOwnProperty(t)){var r=String(rn[t](n));return"ampm"!==t?tn(r):r}return""}))}return n.format("iso-short")},un=$.zeroPad,sn=$.formatTimezone,cn={G:function(n){return n.era()},GG:function(n){return n.era()},GGG:function(n){return n.era()},GGGG:function(n){return"AD"===n.era()?"Anno Domini":"Before Christ"},y:function(n){return n.year()},yy:function(n){return parseInt(String(n.year()).substr(2,4),10)},yyy:function(n){return n.year()},yyyy:function(n){return n.year()},yyyyy:function(n){return"0"+n.year()},Q:function(n){return n.quarter()},QQ:function(n){return n.quarter()},QQQ:function(n){return n.quarter()},QQQQ:function(n){return n.quarter()},M:function(n){return n.month()+1},MM:function(n){return un(n.month()+1)},MMM:function(n){return n.format("month-short")},MMMM:function(n){return n.format("month")},w:function(n){return n.week()},ww:function(n){return un(n.week())},d:function(n){return n.date()},dd:function(n){return un(n.date())},D:function(n){return n.dayOfYear()},DD:function(n){return un(n.dayOfYear())},DDD:function(n){return un(n.dayOfYear(),3)},E:function(n){return n.format("day-short")},EE:function(n){return n.format("day-short")},EEE:function(n){return n.format("day-short")},EEEE:function(n){return n.format("day")},EEEEE:function(n){return n.format("day")[0]},e:function(n){return n.day()},ee:function(n){return n.day()},eee:function(n){return n.format("day-short")},eeee:function(n){return n.format("day")},eeeee:function(n){return n.format("day")[0]},a:function(n){return n.ampm().toUpperCase()},aa:function(n){return n.ampm().toUpperCase()},aaa:function(n){return n.ampm().toUpperCase()},aaaa:function(n){return n.ampm().toUpperCase()},h:function(n){return n.h12()},hh:function(n){return un(n.h12())},H:function(n){return n.hour()},HH:function(n){return un(n.hour())},m:function(n){return n.minute()},mm:function(n){return un(n.minute())},s:function(n){return n.second()},ss:function(n){return un(n.second())},A:function(n){return n.epoch-n.startOf("day").epoch},z:function(n){return n.timezone().name},zz:function(n){return n.timezone().name},zzz:function(n){return n.timezone().name},zzzz:function(n){return n.timezone().name},Z:function(n){return sn(n.timezone().current.offset)},ZZ:function(n){return sn(n.timezone().current.offset)},ZZZ:function(n){return sn(n.timezone().current.offset)},ZZZZ:function(n){return sn(n.timezone().current.offset,":")}},hn=function(n,e,t){for(var r=n,a=e,o=0;o<t;o+=1)cn[r]=cn[a],r+=n,a+=e};hn("q","Q",4),hn("L","M",4),hn("Y","y",4),hn("c","e",4),hn("k","H",2),hn("K","h",2),hn("S","s",2),hn("v","z",4),hn("V","Z",4);var fn=function(n,e){var t=e.split("");return(t=function(n){for(var e=0;e<n.length;e+=1)for(var t=n[e],r=e+1;r<n.length&&n[r]===t;r+=1)n[e]+=n[r],n[r]=null;return(n=n.filter((function(n){return n}))).map((function(n){return"''"===n&&(n="'"),n}))}(t=function(n){for(var e=0;e<n.length;e+=1)if("'"===n[e])for(var t=e+1;t<n.length;t+=1){if(n[t]&&(n[e]+=n[t]),"'"===n[t]){n[t]=null;break}n[t]=null}return n.filter((function(n){return n}))}(t))).reduce((function(e,t){return void 0!==cn[t]?e+=cn[t](n)||"":(/^'.{1,}'$/.test(t)&&(t=t.replace(/'/g,"")),e+=t),e}),"")},ln=["year","season","quarter","month","week","day","quarterHour","hour","minute"],dn=function(n,e){var t=n.clone().startOf(e),r=n.clone().endOf(e).epoch-t.epoch,a=(n.epoch-t.epoch)/r;return parseFloat(a.toFixed(2))},mn=function(n,e){if(e)return e=$.normalize(e),dn(n,e);var t={};return ln.forEach((function(e){t[e]=dn(n,e)})),t},pn=function(n,e){var t=n.progress();return"quarterhour"===(e=$.normalize(e))&&(e="quarterHour"),void 0!==t[e]?(t[e]>.5&&(n=n.add(1,e)),n=n.startOf(e)):!1===n.silent&&console.warn("no known unit '"+e+"'"),n},yn=function(n,e,t){var r=0;for(n=n.clone();n.isBefore(e);)n=n.add(1,t),r+=1;return n.isAfter(e,t)&&(r-=1),r},vn=function(n,e,t){return n.isBefore(e)?yn(n,e,t):-1*yn(e,n,t)},gn=function(n,e){var t=e.epoch-n.epoch,r={milliseconds:t,seconds:parseInt(t/1e3,10)};r.minutes=parseInt(r.seconds/60,10),r.hours=parseInt(r.minutes/60,10);var a=n.clone();return r.years=function(n,e){var t=e.year()-n.year();return(n=n.year(e.year())).isAfter(e)&&(t-=1),t}(a,e),a=n.add(r.years,"year"),r.months=12*r.years,a=n.add(r.months,"month"),r.months+=vn(a,e,"month"),r.weeks=52*r.years,a=n.add(r.weeks,"week"),r.weeks+=vn(a,e,"week"),r.days=7*r.weeks,a=n.add(r.days,"day"),r.days+=vn(a,e,"day"),r},bn=function(n,e,t){e=$.beADate(e,n);var r=!1;if(n.isAfter(e)){var a=n;n=e,e=a,r=!0}var o=gn(n,e);return r&&(o=function(n){return Object.keys(n).forEach((function(e){n[e]*=-1})),n}(o)),t?(t=$.normalize(t),!0!==/s$/.test(t)&&(t+="s"),"dates"===t&&(t="days"),o[t]):o},kn={months:{almost:10,over:4},days:{almost:25,over:10},hours:{almost:20,over:8},minutes:{almost:50,over:20},seconds:{almost:50,over:20}};function wn(n,e){return 1===n&&(e=e.slice(0,-1)),n+" "+e}var zn=function(n,e){var t,r,a,o=function(n,e){var t=n.isBefore(e),r=t?e:n,a=t?n:e;a=a.clone();var o={years:0,months:0,days:0,hours:0,minutes:0,seconds:0};return Object.keys(o).forEach((function(n){if(!a.isSame(r,n)){var e=a.diff(r,n);a=a.add(e,n),o[n]=e}})),t&&Object.keys(o).forEach((function(n){0!==o[n]&&(o[n]*=-1)})),o}(n,e=$.beADate(e,n));if(!0===Object.keys(o).every((function(n){return!o[n]})))return{diff:o,rounded:"now",qualified:"now",precise:"now"};var i=[];return Object.keys(o).forEach((function(n,e,a){var u=Math.abs(o[n]);if(0!==u){var s=wn(u,n);if(i.push(s),!t){if(t=r=s,e>4)return;var c=a[e+1],h=Math.abs(o[c]);h>kn[c].almost?(t=wn(u+1,n),r="almost "+t):h>kn[c].over&&(r="over "+s)}}})),a=i.splice(0,2).join(", "),!0===n.isAfter(e)?(t+=" ago",r+=" ago",a+=" ago"):(t="in "+t,r="in "+r,a="in "+a),{diff:o,rounded:t,qualified:r,precise:a}},_n={north:[["spring",2,1],["summer",5,1],["fall",8,1],["autumn",8,1],["winter",11,1]],south:[["fall",2,1],["autumn",2,1],["winter",5,1],["spring",8,1],["summer",11,1]]},jn=[null,[0,1],[3,1],[6,1],[9,1]],On={minute:function(n){return S(n,{second:0,millisecond:0}),n},quarterhour:function(n){var e=n.minutes();return n=e>=45?n.minutes(45):e>=30?n.minutes(30):e>=15?n.minutes(15):n.minutes(0),S(n,{second:0,millisecond:0}),n},hour:function(n){return S(n,{minute:0,second:0,millisecond:0}),n},day:function(n){return S(n,{hour:0,minute:0,second:0,millisecond:0}),n},week:function(n){var e=n.clone();return(n=n.day(n._weekStart)).isAfter(e)&&(n=n.subtract(1,"week")),S(n,{hour:0,minute:0,second:0,millisecond:0}),n},month:function(n){return S(n,{date:1,hour:0,minute:0,second:0,millisecond:0}),n},quarter:function(n){var e=n.quarter();return jn[e]&&S(n,{month:jn[e][0],date:jn[e][1],hour:0,minute:0,second:0,millisecond:0}),n},season:function(n){var e=n.season(),t="north";"South"===n.hemisphere()&&(t="south");for(var r=0;r<_n[t].length;r++)if(_n[t][r][0]===e){var a=n.year();return"winter"===e&&n.month()<3&&(a-=1),S(n,{year:a,month:_n[t][r][1],date:_n[t][r][2],hour:0,minute:0,second:0,millisecond:0}),n}return n},year:function(n){return S(n,{month:0,date:1,hour:0,minute:0,second:0,millisecond:0}),n},decade:function(n){var e=(n=n.startOf("year")).year(),t=10*parseInt(e/10,10);return n=n.year(t)},century:function(n){var e=(n=n.startOf("year")).year(),t=100*parseInt(e/100,10);return n=n.year(t)}};On.date=On.day;var Dn=function(n,e){var t=n.clone();return e=$.normalize(e),On[e]?On[e](t):"summer"===e||"winter"===e?(t=t.season(e),On.season(t)):t},Sn=function(n,e){var t=n.clone();return e=$.normalize(e),On[e]?t=(t=(t=On[e](t)).add(1,e)).subtract(1,"millisecond"):t},Mn=function(n){return!!K.short().find((function(e){return e===n}))||!!K.long().find((function(e){return e===n}))},Pn=function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",t=arguments.length>2?arguments[2]:void 0;if(!e||!t)return[];if(e=$.normalize(e),t=n.clone().set(t),n.isAfter(t)){var r=n;n=t,t=r}var a=n.clone();Mn(e)?(a=a.next(e),e="week"):a=a.next(e);for(var o=[];a.isBefore(t);)o.push(a),a=a.add(1,e);return o},qn=function(n){var e=n.timezones,t=n.tz;if(!1===e.hasOwnProperty(t)&&(t=z(n.tz,e)),null===t)return!1===n.silent&&console.warn("Warn: could not find given or local timezone - '"+n.tz+"'"),{current:{epochShift:0}};var r,o,i=e[t],u={name:(r=t,r=(r=(r=r[0].toUpperCase()+r.substr(1)).replace(/\/gmt/,"/GMT")).replace(/[\/_]([a-z])/gi,(function(n){return n.toUpperCase()}))),hasDst:Boolean(i.dst),default_offset:i.offset,hemisphere:"s"===i.hem?"South":"North",current:{}};if(u.hasDst){var s=(o=i.dst)?o.split("->"):[];u.change={start:s[0],back:s[1]}}var c=i.offset,h=c;return!0===u.hasDst&&(h="North"===u.hemisphere?c-1:i.offset+1),!1===u.hasDst?(u.current.offset=c,u.current.isDST=!1):!0===a(n.epoch,u.change.start,u.change.back,c,h)?(u.current.offset=c,u.current.isDST="North"===u.hemisphere):(u.current.offset=h,u.current.isDST="South"===u.hemisphere),u},En=["century","decade","year","month","date","day","hour","minute","second","millisecond"],Cn={set:function(n,e){var t=this.clone();return t=V(t,n,null),e&&(this.tz=z(e)),t},timezone:function(){return qn(this)},isDST:function(){return qn(this).current.isDST},hasDST:function(){return qn(this).hasDst},offset:function(){return 60*qn(this).current.offset},hemisphere:function(){return qn(this).hemisphere},format:function(n){return on(this,n)},unixFmt:function(n){return fn(this,n)},startOf:function(n){return Dn(this,n)},endOf:function(n){return Sn(this,n)},leapYear:function(){var n=this.year();return $.isLeapYear(n)},progress:function(n){return mn(this,n)},nearest:function(n){return pn(this,n)},diff:function(n,e){return bn(this,n,e)},since:function(n){return n||(n=this.clone().set()),zn(this,n)},next:function(n){return this.add(1,n).startOf(n)},last:function(n){return this.subtract(1,n).startOf(n)},isValid:function(){return!(!this.epoch&&0!==this.epoch)&&!isNaN(this.d.getTime())},goto:function(n){var e=this.clone();return e.tz=z(n,e.timezones),e},every:function(e,t){if("object"===n(e)&&"string"==typeof t){var r=t;t=e,e=r}return Pn(this,e,t)},isAwake:function(){var n=this.hour();return!(n<8||n>22)},isAsleep:function(){return!this.isAwake()},log:function(){return console.log(""),console.log(on(this,"nice-short")),this},logYear:function(){return console.log(""),console.log(on(this,"full-short")),this},json:function(){var n=this;return En.reduce((function(e,t){return e[t]=n[t](),e}),{})},debug:function(){var n=this.timezone(),e=this.format("MM")+" "+this.format("date-ordinal")+" "+this.year();return e+="\n - "+this.format("time"),console.log("\n\n",e+"\n - "+n.name+" ("+n.current.offset+")"),this},from:function(n){return(n=this.clone().set(n)).since(this)},fromNow:function(){return this.clone().set(Date.now()).since(this)},weekStart:function(n){if("number"==typeof n)return this._weekStart=n,this;if("string"==typeof n){n=n.toLowerCase().trim();var e=K.short().indexOf(n);-1===e&&(e=K.long().indexOf(n)),-1===e&&(e=1),this._weekStart=e}else console.warn("Spacetime Error: Cannot understand .weekStart() input:",n);return this}};Cn.inDST=Cn.isDST,Cn.round=Cn.nearest,Cn.each=Cn.every;var In=Cn,Tn=$.isLeapYear,An=function(n){return"string"==typeof n&&(n=parseInt(n,10)),n},Nn=["year","month","date","hour","minute","second","millisecond"],$n=function(n,e,t){for(var r=Nn.indexOf(t),a=Nn.slice(r,Nn.length),o=0;o<a.length;o++){var i=e[a[o]]();n[a[o]](i)}return n},xn=function(n,e){e=An(e);var t=n.millisecond()-e;return n.epoch-t},Yn=function(n,e){e=An(e);var t=(n.second()-e)*j.second;return n.epoch-t},Ln=function(n,e){e=An(e);var t=n.clone(),r=(n.minute()-e)*j.minute;return n.epoch-=r,$n(n,t,"second"),n.epoch},Fn=function(n,e){(e=An(e))>=24?e=24:e<0&&(e=0);var t=n.clone(),r=n.hour()-e,a=r*j.hour;return n.epoch-=a,n.date()!==t.date()&&(n=t.clone(),r>1&&(r-=1),r<1&&(r+=1),a=r*j.hour,n.epoch-=a),S(n,{hour:e}),$n(n,t,"minute"),n.epoch},Bn=function(n,e){var t=e.match(/([0-9]{1,2})[:h]([0-9]{1,2})(:[0-9]{1,2})? ?(am|pm)?/);if(!t){if(!(t=e.match(/([0-9]{1,2}) ?(am|pm)/)))return n.epoch;t.splice(2,0,"0"),t.splice(3,0,"")}var r=!1,a=parseInt(t[1],10),o=parseInt(t[2],10);a>12&&(r=!0),!1===r&&("am"===t[4]&&12===a&&(a=0),"pm"===t[4]&&a<12&&(a+=12)),t[3]=t[3]||"",t[3]=t[3].replace(/:/,"");var i=parseInt(t[3],10)||0;return(n=(n=(n=(n=n.hour(a)).minute(o)).second(i)).millisecond(0)).epoch},Zn=function(n,e){if((e=An(e))>28){var t=n.month(),r=N[t];1===t&&29===e&&Tn(n.year())&&(r=29),e>r&&(e=r)}return e<=0&&(e=1),S(n,{date:e}),n.epoch},Hn=function(n,e){"string"==typeof e&&(e=C()[e.toLowerCase()]),(e=An(e))>=12&&(e=11),e<=0&&(e=0);var t=n.date();return t>N[e]&&(t=N[e]),S(n,{month:e,date:t}),n.epoch},Qn=function(n,e){return"string"==typeof e&&/^'[0-9]{2}$/.test(e)&&(e=e.replace(/'/,"").trim(),e=(e=Number(e))>30?1900+e:2e3+e),e=An(e),S(n,{year:e}),n.epoch},Gn=function(n,e){e=An(e);var t=n.clone();return(e-=1)<=0?e=0:e>=365&&(e=364),n=(n=n.startOf("year")).add(e,"day"),$n(n,t,"hour"),n.epoch},Un={millisecond:function(n){if(void 0!==n){var e=this.clone();return e.epoch=xn(e,n),e}return this.d.getMilliseconds()},second:function(n){if(void 0!==n){var e=this.clone();return e.epoch=Yn(e,n),e}return this.d.getSeconds()},minute:function(n){if(void 0!==n){var e=this.clone();return e.epoch=Ln(e,n),e}return this.d.getMinutes()},hour:function(n){var e=this.d;if(void 0!==n){var t=this.clone();return t.epoch=Fn(t,n),t}return e.getHours()},hourFloat:function(n){if(void 0!==n){var e=this.clone(),t=n%1;t*=60;var r=parseInt(n,10);return e.epoch=Fn(e,r),e.epoch=Ln(e,t),e}var a=this.d,o=a.getHours(),i=a.getMinutes();return o+(i/=60)},hour12:function(n){var e=this.d;if(void 0!==n){var t=this.clone(),r=(n=""+n).match(/^([0-9]+)(am|pm)$/);if(r){var a=parseInt(r[1],10);"pm"===r[2]&&(a+=12),t.epoch=Fn(t,a)}return t}var o=e.getHours();return o>12&&(o-=12),0===o&&(o=12),o},time:function(n){if(void 0!==n){var e=this.clone();return n=n.toLowerCase().trim(),e.epoch=Bn(e,n),e}return"".concat(this.h12(),":").concat($.zeroPad(this.minute())).concat(this.ampm())},ampm:function(n){var e="am",t=this.hour();if(t>=12&&(e="pm"),"string"!=typeof n)return e;var r=this.clone();return n=n.toLowerCase().trim(),t>=12&&"am"===n?(t-=12,r.hour(t)):t<12&&"pm"===n?(t+=12,r.hour(t)):r},dayTime:function(n){if(void 0!==n){var e={morning:"7:00am",breakfast:"7:00am",noon:"12:00am",lunch:"12:00pm",afternoon:"2:00pm",evening:"6:00pm",dinner:"6:00pm",night:"11:00pm",midnight:"23:59pm"},t=this.clone();return n=(n=n||"").toLowerCase(),!0===e.hasOwnProperty(n)&&(t=t.time(e[n])),t}var r=this.hour();return r<6?"night":r<12?"morning":r<17?"afternoon":r<22?"evening":"night"},iso:function(n){return void 0!==n?this.set(n):this.format("iso")}},Vn={date:function(n){if(void 0!==n){var e=this.clone();return(n=parseInt(n,10))&&(e.epoch=Zn(e,n)),e}return this.d.getDate()},day:function(n){if(void 0===n)return this.d.getDay();var e=this.clone(),t=n;"string"==typeof n&&(n=n.toLowerCase(),K.aliases.hasOwnProperty(n)?t=K.aliases[n]:-1===(t=K.short().indexOf(n))&&(t=K.long().indexOf(n)));var r=this.d.getDay(),a=r-t,o=this.subtract(a,"days");return S(o,{hour:e.hour(),minute:e.minute(),second:e.second()}),o},dayName:function(n){if(void 0===n)return K.long()[this.day()];var e=this.clone();return e=e.day(n)},month:function(n){if(void 0!==n){var e=this.clone();return e.epoch=Hn(e,n),e}return this.d.getMonth()}},Wn=function(n){return n=(n=(n=n.minute(0)).second(0)).millisecond(1)},Jn={dayOfYear:function(n){if(void 0!==n){var e=this.clone();return e.epoch=Gn(e,n),e}for(var t,r=0,a=this.d.getMonth(),o=1;o<=a;o++)(t=new Date).setDate(1),t.setFullYear(this.d.getFullYear()),t.setHours(1),t.setMinutes(1),t.setMonth(o),t.setHours(-2),r+=t.getDate();return r+this.d.getDate()},week:function(n){if(void 0!==n){var e=this.clone();return e=(e=(e=e.month(0)).date(1)).day("monday"),"december"===(e=Wn(e)).monthName()&&e.date()>=28&&(e=e.add(1,"week")),n-=1,e=e.add(n,"weeks")}var t=this.clone();t=(t=t.month(0)).date(1),"december"===(t=(t=Wn(t)).day("monday")).monthName()&&t.date()>=28&&(t=t.add(1,"week"));var r=1;1===t.date()&&(r=0),t=t.minus(1,"second");var a=this.epoch;if(t.epoch>a)return 1;var o=0,i=4*this.month();for(t.epoch+=j.week*i,o+=i;o<=52;o++){if(t.epoch>a)return o+r;t=t.add(1,"week")}return 52},monthName:function(n){if(void 0===n)return E()[this.month()];var e=this.clone();return e=e.month(n)},quarter:function(n){if(void 0!==n&&("string"==typeof n&&(n=n.replace(/^q/i,""),n=parseInt(n,10)),jn[n])){var e=this.clone(),t=jn[n][0];return e=(e=(e=e.month(t)).date(1)).startOf("day")}for(var r=this.d.getMonth(),a=1;a<jn.length;a++)if(r<jn[a][0])return a-1;return 4},season:function(n){var e="north";if("South"===this.hemisphere()&&(e="south"),void 0!==n){for(var t=this.clone(),r=0;r<_n[e].length;r++)n===_n[e][r][0]&&(t=(t=(t=t.month(_n[e][r][1])).date(1)).startOf("day"));return t}for(var a=this.d.getMonth(),o=0;o<_n[e].length-1;o++)if(a>=_n[e][o][1]&&a<_n[e][o+1][1])return _n[e][o][0];return"winter"},year:function(n){if(void 0!==n){var e=this.clone();return e.epoch=Qn(e,n),e}return this.d.getFullYear()},era:function(n){if(void 0!==n){var e=this.clone();n=n.toLowerCase();var t=e.d.getFullYear();return"bc"===n&&t>0&&(e.epoch=Qn(e,-1*t)),"ad"===n&&t<0&&(e.epoch=Qn(e,-1*t)),e}return this.d.getFullYear()<0?"BC":"AD"},decade:function(n){if(void 0!==n){if(!(n=(n=(n=String(n)).replace(/([0-9])'?s$/,"$1")).replace(/([0-9])(th|rd|st|nd)/,"$1")))return console.warn("Spacetime: Invalid decade input"),this;2===n.length&&/[0-9][0-9]/.test(n)&&(n="19"+n);var e=Number(n);return isNaN(e)?this:(e=10*Math.floor(e/10),this.year(e))}return this.startOf("decade").year()},century:function(n){if(void 0!==n){"string"==typeof n&&(n=(n=(n=n.replace(/([0-9])(th|rd|st|nd)/,"$1")).replace(/([0-9]+) ?(b\.?c\.?|a\.?d\.?)/i,(function(n,e,t){return t.match(/b\.?c\.?/i)&&(e="-"+e),e}))).replace(/c$/,""));var e=Number(n);return isNaN(n)?(console.warn("Spacetime: Invalid century input"),this):(0===e&&(e=1),e=e>=0?100*(e-1):100*(e+1),this.year(e))}var t=this.startOf("century").year();return(t=Math.floor(t/100))<0?t-1:t+1},millenium:function(n){if(void 0!==n){if("string"==typeof n&&(n=n.replace(/([0-9])(th|rd|st|nd)/,"$1"),n=Number(n),isNaN(n)))return console.warn("Spacetime: Invalid millenium input"),this;n>0&&(n-=1);var e=1e3*n;return 0===e&&(e=1),this.year(e)}var t=Math.floor(this.year()/1e3);return t>=0&&(t+=1),t}},Kn=Object.assign({},Un,Vn,Jn);Kn.milliseconds=Kn.millisecond,Kn.seconds=Kn.second,Kn.minutes=Kn.minute,Kn.hours=Kn.hour,Kn.hour24=Kn.hour,Kn.h12=Kn.hour12,Kn.h24=Kn.hour24,Kn.days=Kn.day;var Rn=function(n){Object.keys(Kn).forEach((function(e){n.prototype[e]=Kn[e]}))},Xn=$.isLeapYear,ne=function(n,e){return 1===n&&Xn(e)?29:N[n]},ee=function(n,e){if(n.month>0){var t=parseInt(n.month/12,10);n.year=e.year()+t,n.month=n.month%12}else if(n.month<0){var r=Math.floor(Math.abs(n.month)/13,10);r=Math.abs(r)+1,n.year=e.year()-r,n.month=n.month%12,n.month=n.month+12,12===n.month&&(n.month=0)}return n},te=function(n,e,t){for(var r=e.year(),a=e.month(),o=ne(a,r);t>o;)t-=o,(a+=1)>=12&&(a-=12,r+=1),o=ne(a,r);return n.month=a,n.date=t,n},re=function(n,e,t){n.year=e.year(),n.month=e.month();var r=e.date();for(n.date=r-Math.abs(t);n.date<1;){n.month-=1,n.month<0&&(n.month=11,n.year-=1);var a=ne(n.month,n.year);n.date+=a}return n},ae=["millisecond","second","minute","hour","date","month"],oe={second:ae.slice(0,1),minute:ae.slice(0,2),quarterhour:ae.slice(0,2),hour:ae.slice(0,3),date:ae.slice(0,4),month:ae.slice(0,4),quarter:ae.slice(0,4),season:ae.slice(0,4),year:ae,decade:ae,century:ae};oe.week=oe.hour,oe.season=oe.date,oe.quarter=oe.date;var ie={year:!0,quarter:!0,season:!0,month:!0,week:!0,day:!0},ue={month:!0,quarter:!0,season:!0,year:!0},se=function(n){n.prototype.add=function(n,e){var t=this.clone();if(!e||0===n)return t;var r=this.clone();if("millisecond"===(e=$.normalize(e)))return t.epoch+=n,t;"fortnight"===e&&(n*=2,e="week"),j[e]?t.epoch+=j[e]*n:"week"===e?t.epoch+=j.day*(7*n):"quarter"===e||"season"===e?t.epoch+=j.month*(3*n):"quarterhour"===e&&(t.epoch+=15*j.minute*n);var a={};if(oe[e]&&oe[e].forEach((function(n){a[n]=r[n]()})),ie[e]){var o=r.timezone().current.offset-t.timezone().current.offset;t.epoch+=3600*o*1e3}if("month"===e&&(a.month=r.month()+n,a=ee(a,r)),"week"===e){var i=r.date()+7*n;i<=28&&i>1&&(a.date=i)}else if("date"===e){if(n<0)a=re(a,r,n);else{var u=r.date()+n;a=te(a,r,u)}0!==n&&r.isSame(t,"day")&&(a.date=r.date()+n)}else if("quarter"===e){if(a.month=r.month()+3*n,a.year=r.year(),a.month<0){var s=Math.floor(a.month/12),c=a.month+12*Math.abs(s);a.month=c,a.year+=s}else if(a.month>=12){var h=Math.floor(a.month/12);a.month=a.month%12,a.year+=h}a.date=r.date()}else if("year"===e){var f=r.year()+n,l=t.year();(l<f||l>f)&&(t.epoch+=j.day)}else"decade"===e?a.year=t.year()+10:"century"===e&&(a.year=t.year()+100);if(ue[e]){var d=N[a.month];a.date=r.date(),a.date>d&&(a.date=d)}return Object.keys(a).length>1&&S(t,a),t},n.prototype.subtract=function(n,e){return this.clone().add(-1*n,e)},n.prototype.minus=n.prototype.subtract,n.prototype.plus=n.prototype.add},ce={millisecond:function(n){return n.epoch},second:function(n){return[n.year(),n.month(),n.date(),n.hour(),n.minute(),n.second()].join("-")},minute:function(n){return[n.year(),n.month(),n.date(),n.hour(),n.minute()].join("-")},hour:function(n){return[n.year(),n.month(),n.date(),n.hour()].join("-")},day:function(n){return[n.year(),n.month(),n.date()].join("-")},week:function(n){return[n.year(),n.week()].join("-")},month:function(n){return[n.year(),n.month()].join("-")},quarter:function(n){return[n.year(),n.quarter()].join("-")},year:function(n){return n.year()}};ce.date=ce.day;var he=function(e){e.prototype.isSame=function(t,r){var a=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],o=this;if(!r)return null;if("string"==typeof t&&"object"===n(r)){var i=t;t=r,r=i}return"string"!=typeof t&&"number"!=typeof t||(t=new e(t,this.timezone.name)),r=r.replace(/s$/,""),!0===a&&o.tz!==t.tz&&((t=t.clone()).tz=o.tz),ce[r]?ce[r](o)===ce[r](t):null}},fe=function(n){var e={isAfter:function(n){n=$.beADate(n,this);var e=$.getEpoch(n);return null===e?null:this.epoch>e},isBefore:function(n){n=$.beADate(n,this);var e=$.getEpoch(n);return null===e?null:this.epoch<e},isEqual:function(n){n=$.beADate(n,this);var e=$.getEpoch(n);return null===e?null:this.epoch===e},isBetween:function(n,e){var t=arguments.length>2&&void 0!==arguments[2]&&arguments[2];n=$.beADate(n,this),e=$.beADate(e,this);var r=$.getEpoch(n);if(null===r)return null;var a=$.getEpoch(e);return null===a?null:t?this.isBetween(n,e)||this.isEqual(n)||this.isEqual(e):r<this.epoch&&this.epoch<a}};Object.keys(e).forEach((function(t){n.prototype[t]=e[t]}))},le=function(n){var e={i18n:function(n){$.isObject(n.days)&&K.set(n.days),$.isObject(n.months)&&I(n.months),$.isBoolean(n.useTitleCase)&&nn(n.useTitleCase)}};Object.keys(e).forEach((function(t){n.prototype[t]=e[t]}))},de=d,me=function(n,e){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.epoch=null,this.tz=z(e,de),this.silent=t.silent||!0,this.british=t.dmy||t.british,this._weekStart=1,void 0!==t.weekStart&&(this._weekStart=t.weekStart),this._today={},void 0!==t.today&&(this._today=t.today),Object.defineProperty(this,"d",{get:function(){var n=o(this),e=(new Date(this.epoch).getTimezoneOffset()||0)+60*n;e=60*e*1e3;var t=this.epoch+e;return new Date(t)}}),Object.defineProperty(this,"timezones",{get:function(){return de},set:function(n){return de=n,n}});var r=V(this,n,e);this.epoch=r.epoch};Object.keys(In).forEach((function(n){me.prototype[n]=In[n]})),me.prototype.clone=function(){return new me(this.epoch,this.tz,{silent:this.silent,weekStart:this._weekStart,today:this._today})},me.prototype.toLocalDate=function(){return new Date(this.epoch)},Rn(me),se(me),he(me),fe(me),le(me);var pe=me,ye=function(n,e){var t=new pe(null),r=new pe(null);t=t.time(n),r=e?r.time(e):t.add(59,"minutes");var a=t.hour(),o=r.hour();return Object.keys(t.timezones).filter((function(n){if(-1===n.indexOf("/"))return!1;var e=new pe(null,n),i=e.hour();return i>=a&&i<=o&&(!(i===a&&e.minute()<t.minute())&&!(i===o&&e.minute()>r.minute()))}))},ve=function(n,e,t){return new pe(n,e,t)},ge=function(n){var e=n._today||{};return Object.keys(e).forEach((function(t){n=n[t](e[t])})),n};return ve.now=function(n,e){var t=new pe((new Date).getTime(),n,e);return t=ge(t)},ve.today=function(n,e){var t=new pe((new Date).getTime(),n,e);return(t=ge(t)).startOf("day")},ve.tomorrow=function(n,e){var t=new pe((new Date).getTime(),n,e);return(t=ge(t)).add(1,"day").startOf("day")},ve.yesterday=function(n,e){var t=new pe((new Date).getTime(),n,e);return(t=ge(t)).subtract(1,"day").startOf("day")},ve.extend=function(n){return Object.keys(n).forEach((function(e){pe.prototype[e]=n[e]})),this},ve.timezones=function(){return(new pe).timezones},ve.max=function(n,e){var t=new pe(null,n,e);return t.epoch=864e13,t},ve.min=function(n,e){var t=new pe(null,n,e);return t.epoch=-864e13,t},ve.whereIts=ye,ve.version="6.14.0",ve.plugin=ve.extend,ve}));
!function(n,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(n="undefined"!=typeof globalThis?globalThis:n||self).spacetime=e()}(this,(function(){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(e)}function e(n,e){return function(n){if(Array.isArray(n))return n}(n)||function(n,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(n)))return;var t=[],r=!0,a=!1,o=void 0;try{for(var i,u=n[Symbol.iterator]();!(r=(i=u.next()).done)&&(t.push(i.value),!e||t.length!==e);r=!0);}catch(n){a=!0,o=n}finally{try{r||null==u.return||u.return()}finally{if(a)throw o}}return t}(n,e)||function(n,e){if(!n)return;if("string"==typeof n)return t(n,e);var r=Object.prototype.toString.call(n).slice(8,-1);"Object"===r&&n.constructor&&(r=n.constructor.name);if("Map"===r||"Set"===r)return Array.from(n);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return t(n,e)}(n,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function t(n,e){(null==e||e>n.length)&&(e=n.length);for(var t=0,r=new Array(e);t<e;t++)r[t]=n[t];return r}var r=function(n,t,r){var a=e(n.split("/"),2),o=a[0],i=e(a[1].split(":"),2),u=i[0],s=i[1];return Date.UTC(r,o-1,u,s)-36e5*t},a=function(n,e,t,a,o){var i=new Date(n).getUTCFullYear(),u=r(e,o,i),s=r(t,a,i);return n>=u&&n<s},o=function(n){var e=n.timezones[n.tz];if(void 0===e)return console.warn("Warning: couldn't find timezone "+n.tz),0;if(void 0===e.dst)return e.offset;var t=e.offset,r=e.offset+1;"n"===e.hem&&(r=t-1);var o=e.dst.split("->");return!0===a(n.epoch,o[0],o[1],t,r)?t:r},i=["africa","america","asia","atlantic","australia","brazil","canada","chile","europe","indian","mexico","pacific","antarctica","etc"];var u,s=(u=Object.freeze({__proto__:null,default:{"9|s":"2/dili,2/jayapura","9|n":"2/chita,2/khandyga,2/pyongyang,2/seoul,2/tokyo,11/palau","9.5|s|04/04:03->10/03:02":"4/adelaide,4/broken_hill,4/south,4/yancowinna","9.5|s":"4/darwin,4/north","8|s|03/08:01->10/04:00":"12/casey","8|s":"2/kuala_lumpur,2/makassar,2/singapore,4/perth,2/ujung_pandang,4/west","8|n":"2/brunei,2/choibalsan,2/hong_kong,2/irkutsk,2/kuching,2/macau,2/manila,2/shanghai,2/taipei,2/ulaanbaatar,2/chongqing,2/chungking,2/harbin,2/macao,2/ulan_bator","8.75|s":"4/eucla","7|s":"12/davis,2/jakarta,9/christmas","7|n":"2/bangkok,2/barnaul,2/hovd,2/krasnoyarsk,2/novokuznetsk,2/novosibirsk,2/phnom_penh,2/pontianak,2/saigon,2/tomsk,2/vientiane,2/ho_chi_minh","6|s":"12/vostok","6|n":"2/almaty,2/bishkek,2/dhaka,2/omsk,2/qyzylorda,2/qostanay,2/thimphu,2/urumqi,9/chagos,2/dacca,2/kashgar,2/thimbu","6.5|n":"2/rangoon,9/cocos,2/yangon","5|s":"12/mawson,9/kerguelen","5|n":"2/aqtau,2/aqtobe,2/ashgabat,2/atyrau,2/baku,2/dushanbe,2/karachi,2/oral,2/samarkand,2/tashkent,2/yekaterinburg,9/maldives,2/ashkhabad","5.75|n":"2/katmandu,2/kathmandu","5.5|n":"2/calcutta,2/colombo,2/kolkata","4|s":"9/reunion","4|n":"2/dubai,2/muscat,2/tbilisi,2/yerevan,8/astrakhan,8/samara,8/saratov,8/ulyanovsk,8/volgograd,2/volgograd,9/mahe,9/mauritius","4.5|n|03/22:00->09/21:24":"2/tehran","4.5|n":"2/kabul","3|s":"12/syowa,9/antananarivo","3|n|03/28:03->10/31:04":"2/famagusta,2/nicosia,8/athens,8/bucharest,8/helsinki,8/kiev,8/mariehamn,8/riga,8/sofia,8/tallinn,8/uzhgorod,8/vilnius,8/zaporozhye,8/nicosia","3|n|03/28:02->10/31:03":"8/chisinau,8/tiraspol","3|n|03/28:00->10/30:24":"2/beirut","3|n|03/27:00->10/30:01":"2/gaza,2/hebron","3|n|03/26:02->10/31:02":"2/jerusalem,2/tel_aviv","3|n|03/26:00->10/29:01":"2/amman","3|n|03/26:00->10/28:24":"2/damascus","3|n":"0/addis_ababa,0/asmera,0/dar_es_salaam,0/djibouti,0/juba,0/kampala,0/mogadishu,0/nairobi,2/aden,2/baghdad,2/bahrain,2/kuwait,2/qatar,2/riyadh,8/istanbul,8/kirov,8/minsk,8/moscow,8/simferopol,9/comoro,9/mayotte,0/asmara,2/istanbul","2|s|03/28:02->10/31:02":"12/troll","2|s":"0/gaborone,0/harare,0/johannesburg,0/lubumbashi,0/lusaka,0/maputo,0/maseru,0/mbabane","2|n|03/28:02->10/31:03":"0/ceuta,arctic/longyearbyen,8/amsterdam,8/andorra,8/belgrade,8/berlin,8/bratislava,8/brussels,8/budapest,8/busingen,8/copenhagen,8/gibraltar,8/ljubljana,8/luxembourg,8/madrid,8/malta,8/monaco,8/oslo,8/paris,8/podgorica,8/prague,8/rome,8/san_marino,8/sarajevo,8/skopje,8/stockholm,8/tirane,8/vaduz,8/vatican,8/vienna,8/warsaw,8/zagreb,8/zurich,3/jan_mayen","2|n":"0/blantyre,0/bujumbura,0/cairo,0/khartoum,0/kigali,0/tripoli,8/kaliningrad","1|s":"0/brazzaville,0/kinshasa,0/luanda,0/windhoek","1|n|04/11:03->05/16:02":"0/casablanca,0/el_aaiun","1|n|03/28:01->10/31:02":"3/canary,3/faeroe,3/madeira,8/dublin,8/guernsey,8/isle_of_man,8/jersey,8/lisbon,8/london,3/faroe,8/belfast","1|n":"0/algiers,0/bangui,0/douala,0/lagos,0/libreville,0/malabo,0/ndjamena,0/niamey,0/porto-novo,0/tunis","14|n":"11/kiritimati","13|s|04/04:04->09/26:03":"11/apia","13|s|01/15:02->11/05:03":"11/tongatapu","13|n":"11/enderbury,11/fakaofo","12|s|04/04:03->09/26:02":"12/mcmurdo,11/auckland,12/south_pole","12|s|01/17:03->11/14:02":"11/fiji","12|n":"2/anadyr,2/kamchatka,2/srednekolymsk,11/funafuti,11/kwajalein,11/majuro,11/nauru,11/tarawa,11/wake,11/wallis","12.75|s|04/04:03->04/04:02":"11/chatham","11|s|04/04:03->10/03:02":"12/macquarie","11|s":"11/bougainville","11|n":"2/magadan,2/sakhalin,11/efate,11/guadalcanal,11/kosrae,11/noumea,11/ponape,11/pohnpei","11.5|n|04/04:03->10/03:02":"11/norfolk","10|s|04/04:03->10/03:02":"4/currie,4/hobart,4/melbourne,4/sydney,4/act,4/canberra,4/nsw,4/tasmania,4/victoria","10|s":"12/dumontdurville,4/brisbane,4/lindeman,11/port_moresby,4/queensland","10|n":"2/ust-nera,2/vladivostok,2/yakutsk,11/guam,11/saipan,11/truk,11/chuuk,11/yap","10.5|s|04/04:01->10/03:02":"4/lord_howe,4/lhi","0|n|03/28:00->10/31:01":"1/scoresbysund,3/azores","0|n":"0/abidjan,0/accra,0/bamako,0/banjul,0/bissau,0/conakry,0/dakar,0/freetown,0/lome,0/monrovia,0/nouakchott,0/ouagadougou,0/sao_tome,1/danmarkshavn,3/reykjavik,3/st_helena,13/gmt,13/utc,0/timbuktu,13/gmt-0,13/gmt+0,13/gmt0,13/greenwich,13/uct,13/universal,13/zulu","-9|n|03/14:02->11/07:02":"1/adak,1/atka,us/aleutian","-9|n":"11/gambier","-9.5|n":"11/marquesas","-8|n|03/14:02->11/07:02":"1/anchorage,1/juneau,1/metlakatla,1/nome,1/sitka,1/yakutat,us/alaska","-8|n":"11/pitcairn","-7|n|03/14:02->11/07:02":"1/los_angeles,1/santa_isabel,1/tijuana,1/vancouver,1/ensenada,6/pacific,10/bajanorte,us/pacific-new,us/pacific","-7|n|03/08:02->11/01:01":"1/dawson,1/whitehorse,6/yukon","-7|n":"1/creston,1/dawson_creek,1/fort_nelson,1/hermosillo,1/phoenix,us/arizona","-6|s|04/03:22->09/04:22":"11/easter,7/easterisland","-6|n|04/04:02->10/31:02":"1/chihuahua,1/mazatlan,10/bajasur","-6|n|03/14:02->11/07:02":"1/boise,1/cambridge_bay,1/denver,1/edmonton,1/inuvik,1/ojinaga,1/yellowknife,1/shiprock,6/mountain,us/mountain","-6|n":"1/belize,1/costa_rica,1/el_salvador,1/guatemala,1/managua,1/regina,1/swift_current,1/tegucigalpa,11/galapagos,6/east-saskatchewan,6/saskatchewan","-5|s":"1/lima,1/rio_branco,1/porto_acre,5/acre","-5|n|04/04:02->10/31:02":"1/bahia_banderas,1/merida,1/mexico_city,1/monterrey,10/general","-5|n|03/14:02->11/07:02":"1/chicago,1/matamoros,1/menominee,1/rainy_river,1/rankin_inlet,1/resolute,1/winnipeg,1/indiana/knox,1/indiana/tell_city,1/north_dakota/beulah,1/north_dakota/center,1/north_dakota/new_salem,1/knox_in,6/central,us/central,us/indiana-starke","-5|n|03/12:03->11/05:01":"1/north_dakota","-5|n":"1/bogota,1/cancun,1/cayman,1/coral_harbour,1/eirunepe,1/guayaquil,1/jamaica,1/panama,1/atikokan","-4|s|05/13:23->08/13:01":"12/palmer","-4|s|04/03:24->09/05:00":"1/santiago,7/continental","-4|s|03/27:24->10/03:00":"1/asuncion","-4|s|02/16:24->11/03:00":"1/campo_grande,1/cuiaba","-4|s":"1/la_paz,1/manaus,5/west","-4|n|03/14:02->11/07:02":"1/detroit,1/grand_turk,1/indianapolis,1/iqaluit,1/louisville,1/montreal,1/nassau,1/new_york,1/nipigon,1/pangnirtung,1/port-au-prince,1/thunder_bay,1/toronto,1/indiana/marengo,1/indiana/petersburg,1/indiana/vevay,1/indiana/vincennes,1/indiana/winamac,1/kentucky/monticello,1/fort_wayne,1/indiana/indianapolis,1/kentucky/louisville,6/eastern,us/east-indiana,us/eastern,us/michigan","-4|n|03/14:00->11/07:01":"1/havana","-4|n|03/12:03->11/05:01":"1/indiana,1/kentucky","-4|n":"1/anguilla,1/antigua,1/aruba,1/barbados,1/blanc-sablon,1/boa_vista,1/caracas,1/curacao,1/dominica,1/grenada,1/guadeloupe,1/guyana,1/kralendijk,1/lower_princes,1/marigot,1/martinique,1/montserrat,1/port_of_spain,1/porto_velho,1/puerto_rico,1/santo_domingo,1/st_barthelemy,1/st_kitts,1/st_lucia,1/st_thomas,1/st_vincent,1/tortola,1/virgin","-3|s":"1/argentina,1/buenos_aires,1/catamarca,1/cordoba,1/fortaleza,1/jujuy,1/mendoza,1/montevideo,1/punta_arenas,1/sao_paulo,12/rothera,3/stanley,1/argentina/la_rioja,1/argentina/rio_gallegos,1/argentina/salta,1/argentina/san_juan,1/argentina/san_luis,1/argentina/tucuman,1/argentina/ushuaia,1/argentina/buenos_aires,1/argentina/catamarca,1/argentina/comodrivadavia,1/argentina/cordoba,1/argentina/jujuy,1/argentina/mendoza,1/rosario,5/east","-3|n|03/14:02->11/07:02":"1/glace_bay,1/goose_bay,1/halifax,1/moncton,1/thule,3/bermuda,6/atlantic","-3|n":"1/araguaina,1/bahia,1/belem,1/cayenne,1/maceio,1/paramaribo,1/recife,1/santarem","-2|n|03/27:22->10/30:23":"1/godthab,1/nuuk","-2|n|03/14:02->11/07:02":"1/miquelon","-2|n":"1/noronha,3/south_georgia,5/denoronha","-2.5|n|03/14:02->11/07:02":"1/st_johns,6/newfoundland","-1|n":"3/cape_verde","-11|n":"11/midway,11/niue,11/pago_pago,11/samoa,us/samoa","-10|n":"11/honolulu,11/johnston,11/rarotonga,11/tahiti,us/hawaii"}}))&&u.default||u,c={};Object.keys(s).forEach((function(n){var e=n.split("|"),t={offset:Number(e[0]),hem:e[1]};e[2]&&(t.dst=e[2]),s[n].split(",").forEach((function(n){n=n.replace(/(^[0-9]+)\//,(function(n,e){return e=Number(e),i[e]+"/"})),c[n]=t}))})),c.utc={offset:0,hem:"n"};for(var h=-14;h<=14;h+=.5){var f=h;f>0&&(f="+"+f);var l="etc/gmt"+f;c[l]={offset:-1*h,hem:"n"},c[l="utc/gmt"+f]={offset:-1*h,hem:"n"}}var d=c,m=/(\-?[0-9]+)h(rs)?/i,p=/(\-?[0-9]+)/,y=/utc([\-+]?[0-9]+)/i,v=/gmt([\-+]?[0-9]+)/i,g=function(n){return(n=Number(n))>=-13&&n<=13?"etc/gmt"+(n=((n*=-1)>0?"+":"")+n):null},b=function(n){var e=n.match(m);if(null!==e)return g(e[1]);if(null!==(e=n.match(y)))return g(e[1]);if(null!==(e=n.match(v))){var t=-1*Number(e[1]);return g(t)}return null!==(e=n.match(p))?g(e[1]):null},w=function(){var n=function(){if("undefined"==typeof Intl||void 0===Intl.DateTimeFormat)return null;var n=Intl.DateTimeFormat();if(void 0===n||void 0===n.resolvedOptions)return null;var e=n.resolvedOptions().timeZone;return e?e.toLowerCase():null}();return null===n?"utc":n}(),k=Object.keys(d).reduce((function(n,e){var t=e.split("/")[1]||"";return n[t=t.replace(/_/g," ")]=e,n}),{}),z=function(n,e){if(!n)return w;"string"!=typeof n&&console.error("Timezone must be a string - recieved: '",n,"'\n");var t=n.trim();if(t=t.toLowerCase(),!0===e.hasOwnProperty(t))return t;if(t=function(n){return(n=(n=(n=(n=(n=n.replace(/ time/g,"")).replace(/ (standard|daylight|summer)/g,"")).replace(/\b(east|west|north|south)ern/g,"$1")).replace(/\b(africa|america|australia)n/g,"$1")).replace(/\beuropean/g,"europe")).replace(/\islands/g,"island")}(t),!0===e.hasOwnProperty(t))return t;if(!0===k.hasOwnProperty(t))return k[t];if(!0===/[0-9]/.test(t)){var r=b(t);if(r)return r}throw new Error("Spacetime: Cannot find timezone named: '"+n+"'. Please enter an IANA timezone id.")},_={millisecond:1,second:1e3,minute:6e4,hour:36e5,day:864e5};_.date=_.day,_.month=25488e5,_.week=6048e5,_.year=3154e7,Object.keys(_).forEach((function(n){_[n+"s"]=_[n]}));var j=_,O=function(n,e,t,r,a){var o=n.d[t]();if(o!==e){var i=null===a?null:n.d[a](),u=n.epoch,s=e-o;n.epoch+=j[r]*s,"day"===r&&Math.abs(s)>28&&e<28&&(n.epoch+=j.hour),null!==a&&i!==n.d[a]()&&(n.epoch=u);for(var c=j[r]/2;n.d[t]()<e;)n.epoch+=c;for(;n.d[t]()>e;)n.epoch-=c;null!==a&&i!==n.d[a]()&&(n.epoch=u)}},D={year:{valid:function(n){return n>-4e3&&n<4e3},walkTo:function(n,e){return O(n,e,"getFullYear","year",null)}},month:{valid:function(n){return n>=0&&n<=11},walkTo:function(n,e){var t=n.d,r=t.getMonth(),a=n.epoch,o=t.getFullYear();if(r!==e){var i=e-r;for(n.epoch+=j.day*(28*i),o!==n.d.getFullYear()&&(n.epoch=a);n.d.getMonth()<e;)n.epoch+=j.day;for(;n.d.getMonth()>e;)n.epoch-=j.day}}},date:{valid:function(n){return n>0&&n<=31},walkTo:function(n,e){return O(n,e,"getDate","day","getMonth")}},hour:{valid:function(n){return n>=0&&n<24},walkTo:function(n,e){return O(n,e,"getHours","hour","getDate")}},minute:{valid:function(n){return n>=0&&n<60},walkTo:function(n,e){return O(n,e,"getMinutes","minute","getHours")}},second:{valid:function(n){return n>=0&&n<60},walkTo:function(n,e){n.epoch=n.seconds(e).epoch}},millisecond:{valid:function(n){return n>=0&&n<1e3},walkTo:function(n,e){n.epoch=n.milliseconds(e).epoch}}},S=function(n,e){for(var t=Object.keys(D),r=n.clone(),a=0;a<t.length;a++){var o=t[a],i=e[o];if(void 0===i&&(i=r[o]()),"string"==typeof i&&(i=parseInt(i,10)),!D[o].valid(i))return n.epoch=null,void(!1===n.silent&&console.warn("invalid "+o+": "+i));D[o].walkTo(n,i)}},M=["jan","feb","mar","apr","may","jun","jul","aug","sept","oct","nov","dec"],P=["january","february","march","april","may","june","july","august","september","october","november","december"];var q=function(){return M},C=function(){return P},E=function(){return function(){for(var n={sep:8},e=0;e<M.length;e++)n[M[e]]=e;for(var t=0;t<P.length;t++)n[P[t]]=t;return n}()},I=function(n){M=n.short||M,P=n.long||P},T=function(n,e){if(!e)return n;"Z"!==e&&"z"!==e||(e="+0000");var t=0;/^[\+-]?[0-9]{2}:[0-9]{2}$/.test(e)&&(!0===/:00/.test(e)&&(e=e.replace(/:00/,"")),!0===/:30/.test(e)&&(e=e.replace(/:30/,".5"))),/^[\+-]?[0-9]{4}$/.test(e)&&(e=e.replace(/30$/,".5")),t=parseFloat(e),Math.abs(t)>100&&(t/=100),(t*=-1)>=0&&(t="+"+t);var r="etc/gmt"+t;return n.timezones[r]&&(n.tz=r),n},A=function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",t=(e=e.replace(/^\s+/,"").toLowerCase()).match(/([0-9]{1,2}):([0-9]{1,2}):?([0-9]{1,2})?[:\.]?([0-9]{1,4})?/);if(null!==t){var r=Number(t[1]);if(r<0||r>24)return n.startOf("day");var a=Number(t[2]);if(t[2].length<2||a<0||a>59)return n.startOf("day");t[4]>999&&(t[4]=parseInt("".concat(t[4]).substring(0,3),10)),n=(n=(n=(n=n.hour(r)).minute(a)).seconds(t[3]||0)).millisecond(t[4]||0);var o=e.match(/[\b0-9](am|pm)\b/);return null!==o&&o[1]&&(n=n.ampm(o[1])),n}if(null!==(t=e.match(/([0-9]+) ?(am|pm)/))&&t[1]){var i=Number(t[1]);return i>12||i<1?n.startOf("day"):n=(n=(n=n.hour(t[1]||0)).ampm(t[2])).startOf("hour")}return n=n.startOf("day")},N=[31,28,31,30,31,30,31,31,30,31,30,31],$=function(n,e){return n(e={exports:{}},e.exports),e.exports}((function(n,e){e.isLeapYear=function(n){return n%4==0&&n%100!=0||n%400==0},e.isDate=function(n){return"[object Date]"===Object.prototype.toString.call(n)&&!isNaN(n.valueOf())},e.isArray=function(n){return"[object Array]"===Object.prototype.toString.call(n)},e.isObject=function(n){return"[object Object]"===Object.prototype.toString.call(n)},e.isBoolean=function(n){return"[object Boolean]"===Object.prototype.toString.call(n)},e.zeroPad=function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,t="0";return(n+="").length>=e?n:new Array(e-n.length+1).join(t)+n},e.titleCase=function(n){return n?n[0].toUpperCase()+n.substr(1):""},e.ordinal=function(n){var e=n%10,t=n%100;return 1===e&&11!==t?n+"st":2===e&&12!==t?n+"nd":3===e&&13!==t?n+"rd":n+"th"},e.toCardinal=function(n){return n=(n=String(n)).replace(/([0-9])(st|nd|rd|th)$/i,"$1"),parseInt(n,10)},e.normalize=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return"day"===(n=(n=(n=(n=n.toLowerCase().trim()).replace(/ies$/,"y")).replace(/s$/,"")).replace(/-/g,""))||"days"===n?"date":"min"===n||"mins"===n?"minute":n},e.getEpoch=function(n){return"number"==typeof n?n:e.isDate(n)?n.getTime():n.epoch?n.epoch:null},e.beADate=function(n,t){return!1===e.isObject(n)?t.clone().set(n):n},e.formatTimezone=function(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=n>0?"+":"-",a=Math.abs(n),o=e.zeroPad(parseInt(""+a,10)),i=e.zeroPad(a%1*60);return"".concat(r).concat(o).concat(t).concat(i)}}));$.isLeapYear,$.isDate,$.isArray,$.isObject,$.isBoolean,$.zeroPad,$.titleCase,$.ordinal,$.toCardinal,$.normalize,$.getEpoch,$.beADate,$.formatTimezone;var x=$.isLeapYear,L=function(n){if(!0!==N.hasOwnProperty(n.month))return!1;if(1===n.month)return!!(x(n.year)&&n.date<=29)||n.date<=28;var e=N[n.month]||0;return n.date<=e},Y=E(),F=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1?arguments[1]:void 0,t=parseInt(n.trim(),10);return!t&&e&&(t=e.year),t=t||(new Date).getFullYear()},B=[{reg:/^(\-?0?0?[0-9]{3,4})-([0-9]{1,2})-([0-9]{1,2})[T| ]([0-9.:]+)(Z|[0-9\-\+:]+)?$/i,parse:function(n,e,t,r){var a=parseInt(e[2],10)-1,o={year:e[1],month:a,date:e[3]};return!1===L(o)?(n.epoch=null,n):(T(n,e[5]),S(n,o),n=A(n,e[4]))}},{reg:/^([0-9]{4})[\-\/.]([0-9]{1,2})[\-\/.]([0-9]{1,2}),?( [0-9]{1,2}:[0-9]{2}:?[0-9]{0,2}? ?(am|pm|gmt))?$/i,parse:function(n,e){var t={year:e[1],month:parseInt(e[2],10)-1,date:parseInt(e[3],10)};return t.month>=12&&(t.date=parseInt(e[2],10),t.month=parseInt(e[3],10)-1),!1===L(t)?(n.epoch=null,n):(S(n,t),n=A(n,e[4]))}},{reg:/^([0-9]{1,2})[\-\/.]([0-9]{1,2})[\-\/.]?([0-9]{4})?,?( [0-9]{1,2}:[0-9]{2}:?[0-9]{0,2}? ?(am|pm|gmt))?$/i,parse:function(n,e){var t=parseInt(e[1],10)-1,r=parseInt(e[2],10);(n.british||t>=12)&&(r=parseInt(e[1],10),t=parseInt(e[2],10)-1);var a={year:F(e[3],n._today)||(new Date).getFullYear(),month:t,date:r};return!1===L(a)?(n.epoch=null,n):(S(n,a),n=A(n,e[4]))}},{reg:/^([0-9]{4})[\-\/]([0-9]{2})$/i,parse:function(n,e,t,r){var a=parseInt(e[2],10)-1,o={year:e[1],month:a,date:1};return!1===L(o)?(n.epoch=null,n):(T(n,e[5]),S(n,o),n=A(n,e[4]))}},{reg:/^([0-9]{1,2})[\-\/]([a-z]+)[\-\/]?([0-9]{4})?$/i,parse:function(n,e){var t=Y[e[2].toLowerCase()],r={year:F(e[3],n._today),month:t,date:$.toCardinal(e[1]||"")};return!1===L(r)?(n.epoch=null,n):(S(n,r),n=A(n,e[4]))}},{reg:/^([a-z]+)[\-\/]([0-9]{1,2})[\-\/]?([0-9]{4})?$/i,parse:function(n,e){var t=Y[e[1].toLowerCase()],r={year:F(e[3],n._today),month:t,date:$.toCardinal(e[2]||"")};return!1===L(r)?(n.epoch=null,n):(S(n,r),n=A(n,e[4]))}},{reg:/^([a-z]+) ([0-9]{1,2}(?:st|nd|rd|th)?),?( [0-9]{4})?( ([0-9:]+( ?am| ?pm| ?gmt)?))?$/i,parse:function(n,e){var t=Y[e[1].toLowerCase()],r={year:F(e[3],n._today),month:t,date:$.toCardinal(e[2]||"")};return!1===L(r)?(n.epoch=null,n):(S(n,r),n=A(n,e[4]))}},{reg:/^([a-z]+) ([0-9]{1,2})( [0-9:]+)?( \+[0-9]{4})?( [0-9]{4})?$/i,parse:function(n,e){var t={year:F(e[5],n._today),month:Y[e[1].toLowerCase()],date:$.toCardinal(e[2]||"")};return!1===L(t)?(n.epoch=null,n):(S(n,t),n=A(n,e[3]))}},{reg:/^([a-z]+) ([0-9]{4})$/i,parse:function(n,e){var t=Y[e[1].toLowerCase()],r={year:F(e[2],n._today),month:t,date:n._today.date||1};return!1===L(r)?(n.epoch=null,n):(S(n,r),n=A(n,e[4]))}},{reg:/^([0-9]{1,2}(?:st|nd|rd|th)?) ([a-z]+),?( [0-9]{4})?,? ?([0-9]{1,2}:[0-9]{2}:?[0-9]{0,2}? ?(am|pm|gmt))?$/i,parse:function(n,e){var t=Y[e[2].toLowerCase()];if(!t)return null;var r={year:F(e[3],n._today),month:t,date:$.toCardinal(e[1])};return!1===L(r)?(n.epoch=null,n):(S(n,r),n=A(n,e[4]))}},{reg:/^(q[0-9])( of)?( [0-9]{4})?/i,parse:function(n,e){var t=e[1]||"";n=n.quarter(t);var r=e[3]||"";return r&&(r=r.trim(),n=n.year(r)),n}},{reg:/^(spring|summer|winter|fall|autumn)( of)?( [0-9]{4})?/i,parse:function(n,e){var t=e[1]||"";n=n.season(t);var r=e[3]||"";return r&&(r=r.trim(),n=n.year(r)),n}},{reg:/^[0-9,]+ ?b\.?c\.?$/i,parse:function(n,e){var t=e[0]||"";t=(t=t.replace(/^([0-9,]+) ?b\.?c\.?$/i,"-$1")).replace(/,/g,"");var r=parseInt(t.trim(),10),a=new Date,o={year:r,month:a.getMonth(),date:a.getDate()};return!1===L(o)?(n.epoch=null,n):(S(n,o),n=A(n))}},{reg:/^[0-9,]+ ?(a\.?d\.?|c\.?e\.?)$/i,parse:function(n,e){var t=e[0]||"";t=t.replace(/,/g,"");var r=parseInt(t.trim(),10),a=new Date,o={year:r,month:a.getMonth(),date:a.getDate()};return!1===L(o)?(n.epoch=null,n):(S(n,o),n=A(n))}},{reg:/^[0-9]{4}( ?a\.?d\.?)?$/i,parse:function(n,e){var t=n._today,r=F(e[0],t),a=new Date;t.month&&!t.date&&(t.date=1);var o={year:r,month:t.month||a.getMonth(),date:t.date||a.getDate()};return!1===L(o)?(n.epoch=null,n):(S(n,o),n=A(n))}}],Z=function(n){return n.epoch=Date.now(),Object.keys(n._today||{}).forEach((function(e){"function"==typeof n[e]&&(n=n[e](n._today[e]))})),n},H={now:function(n){return Z(n)},today:function(n){return Z(n)},tonight:function(n){return n=(n=Z(n)).hour(18)},tomorrow:function(n){return n=(n=(n=Z(n)).add(1,"day")).startOf("day")},yesterday:function(n){return n=(n=(n=Z(n)).subtract(1,"day")).startOf("day")},christmas:function(n){var e=Z(n).year();return n=n.set([e,11,25,18,0,0])},"new years":function(n){var e=Z(n).year();return n=n.set([e,11,31,18,0,0])}};H["new years eve"]=H["new years"];var Q=H,G={year:(new Date).getFullYear(),month:0,date:1},U=function(n,e,t){if(0===Object.keys(e).length)return n;e=Object.assign({},G,t,e);for(var r=Object.keys(e),a=0;a<r.length;a++){var o=r[a];if(void 0!==n[o]&&"function"==typeof n[o]&&(null!==e[o]&&void 0!==e[o]&&""!==e[o])){var i=e[o]||t[o]||G[o]||0;n=n[o](i)}}return n},V=function(n,e,t){var r=n._today||G;if("number"==typeof e)return e>0&&e<25e8&&!1===n.silent&&(console.warn(" - Warning: You are setting the date to January 1970."),console.warn(" - did input seconds instead of milliseconds?")),n.epoch=e,n;if(n.epoch=Date.now(),n._today&&$.isObject(n._today)&&Object.keys(n._today).length>0){var a=U(n,r,G);a.isValid()&&(n.epoch=a.epoch)}if(null==e||""===e)return n;if(!0===$.isDate(e))return n.epoch=e.getTime(),n;if(!0===$.isArray(e))return n=function(n,e,t){if(0===e.length)return n;for(var r=["year","month","date","hour","minute","second","millisecond"],a=0;a<r.length;a++){var o=e[a]||t[r[a]]||G[r[a]]||0;n=n[r[a]](o)}return n}(n,e,r);if(!0===$.isObject(e))return e.epoch?(n.epoch=e.epoch,n.tz=e.tz,n):n=U(n,e,r);if("string"!=typeof e)return n;if(e=(e=(e=e.replace(/\b(mon|tues?|wed|wednes|thur?s?|fri|sat|satur|sun)(day)?\b/i,"")).replace(/,/g,"")).replace(/ +/g," ").trim(),!0===Q.hasOwnProperty(e))return n=Q[e](n);for(var o=0;o<B.length;o++){var i=e.match(B[o].reg);if(i){var u=B[o].parse(n,i,t);if(null!==u&&u.isValid())return u}}return!1===n.silent&&console.warn("Warning: couldn't parse date-string: '"+e+"'"),n.epoch=null,n},W=["sun","mon","tue","wed","thu","fri","sat"],J=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"],K={short:function(){return W},long:function(){return J},set:function(n){W=n.short||W,J=n.long||J},aliases:{mo:1,tu:2,we:3,th:4,fr:5,sa:6,su:7,tues:2,weds:3,wedn:3,thur:4,thurs:4}},R=!0,X=function(){return R},nn=function(n){R=n},en=function(n){var e=n.timezone().current.offset;return e?$.formatTimezone(e,":"):"Z"},tn=function(n){return X()?$.titleCase(n):n},rn={day:function(n){return tn(n.dayName())},"day-short":function(n){return tn(K.short()[n.day()])},"day-number":function(n){return n.day()},"day-ordinal":function(n){return $.ordinal(n.day())},"day-pad":function(n){return $.zeroPad(n.day())},date:function(n){return n.date()},"date-ordinal":function(n){return $.ordinal(n.date())},"date-pad":function(n){return $.zeroPad(n.date())},month:function(n){return tn(n.monthName())},"month-short":function(n){return tn(q()[n.month()])},"month-number":function(n){return n.month()},"month-ordinal":function(n){return $.ordinal(n.month())},"month-pad":function(n){return $.zeroPad(n.month())},"iso-month":function(n){return $.zeroPad(n.month()+1)},year:function(n){var e=n.year();return e>0?e:(e=Math.abs(e),e+" BC")},"year-short":function(n){var e=n.year();return e>0?"'".concat(String(n.year()).substr(2,4)):(e=Math.abs(e))+" BC"},"iso-year":function(n){var e=n.year(),t=e<0,r=$.zeroPad(Math.abs(e),4);return t&&(r="-"+(r=$.zeroPad(r,6))),r},time:function(n){return n.time()},"time-24":function(n){return"".concat(n.hour24(),":").concat($.zeroPad(n.minute()))},hour:function(n){return n.hour12()},"hour-pad":function(n){return $.zeroPad(n.hour12())},"hour-24":function(n){return n.hour24()},"hour-24-pad":function(n){return $.zeroPad(n.hour24())},minute:function(n){return n.minute()},"minute-pad":function(n){return $.zeroPad(n.minute())},second:function(n){return n.second()},"second-pad":function(n){return $.zeroPad(n.second())},ampm:function(n){return n.ampm()},quarter:function(n){return"Q"+n.quarter()},season:function(n){return n.season()},era:function(n){return n.era()},json:function(n){return n.json()},timezone:function(n){return n.timezone().name},offset:function(n){return en(n)},numeric:function(n){return"".concat(n.year(),"/").concat($.zeroPad(n.month()+1),"/").concat($.zeroPad(n.date()))},"numeric-us":function(n){return"".concat($.zeroPad(n.month()+1),"/").concat($.zeroPad(n.date()),"/").concat(n.year())},"numeric-uk":function(n){return"".concat($.zeroPad(n.date()),"/").concat($.zeroPad(n.month()+1),"/").concat(n.year())},"mm/dd":function(n){return"".concat($.zeroPad(n.month()+1),"/").concat($.zeroPad(n.date()))},iso:function(n){var e=n.format("iso-year"),t=$.zeroPad(n.month()+1),r=$.zeroPad(n.date()),a=$.zeroPad(n.h24()),o=$.zeroPad(n.minute()),i=$.zeroPad(n.second()),u=$.zeroPad(n.millisecond(),3),s=en(n);return"".concat(e,"-").concat(t,"-").concat(r,"T").concat(a,":").concat(o,":").concat(i,".").concat(u).concat(s)},"iso-short":function(n){var e=$.zeroPad(n.month()+1),t=$.zeroPad(n.date());return"".concat(n.year(),"-").concat(e,"-").concat(t)},"iso-utc":function(n){return new Date(n.epoch).toISOString()},nice:function(n){return"".concat(q()[n.month()]," ").concat($.ordinal(n.date()),", ").concat(n.time())},"nice-24":function(n){return"".concat(q()[n.month()]," ").concat($.ordinal(n.date()),", ").concat(n.hour24(),":").concat($.zeroPad(n.minute()))},"nice-year":function(n){return"".concat(q()[n.month()]," ").concat($.ordinal(n.date()),", ").concat(n.year())},"nice-day":function(n){return"".concat(K.short()[n.day()]," ").concat(tn(q()[n.month()])," ").concat($.ordinal(n.date()))},"nice-full":function(n){return"".concat(n.dayName()," ").concat(tn(n.monthName())," ").concat($.ordinal(n.date()),", ").concat(n.time())},"nice-full-24":function(n){return"".concat(n.dayName()," ").concat(tn(n.monthName())," ").concat($.ordinal(n.date()),", ").concat(n.hour24(),":").concat($.zeroPad(n.minute()))}},an={"day-name":"day","month-name":"month","iso 8601":"iso","time-h24":"time-24","time-12":"time","time-h12":"time",tz:"timezone","day-num":"day-number","month-num":"month-number","month-iso":"iso-month","year-iso":"iso-year","nice-short":"nice","nice-short-24":"nice-24",mdy:"numeric-us",dmy:"numeric-uk",ymd:"numeric","yyyy/mm/dd":"numeric","mm/dd/yyyy":"numeric-us","dd/mm/yyyy":"numeric-us","little-endian":"numeric-uk","big-endian":"numeric","day-nice":"nice-day"};Object.keys(an).forEach((function(n){return rn[n]=rn[an[n]]}));var on=function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(!0!==n.isValid())return"";if(rn.hasOwnProperty(e)){var t=rn[e](n)||"";return"json"!==e&&(t=String(t),"ampm"!==e&&(t=tn(t))),t}if(-1!==e.indexOf("{")){var r=/\{(.+?)\}/g;return e=e.replace(r,(function(e,t){if(t=t.toLowerCase().trim(),rn.hasOwnProperty(t)){var r=String(rn[t](n));return"ampm"!==t?tn(r):r}return""}))}return n.format("iso-short")},un=$.zeroPad,sn=$.formatTimezone,cn={G:function(n){return n.era()},GG:function(n){return n.era()},GGG:function(n){return n.era()},GGGG:function(n){return"AD"===n.era()?"Anno Domini":"Before Christ"},y:function(n){return n.year()},yy:function(n){return parseInt(String(n.year()).substr(2,4),10)},yyy:function(n){return n.year()},yyyy:function(n){return n.year()},yyyyy:function(n){return"0"+n.year()},Q:function(n){return n.quarter()},QQ:function(n){return n.quarter()},QQQ:function(n){return n.quarter()},QQQQ:function(n){return n.quarter()},M:function(n){return n.month()+1},MM:function(n){return un(n.month()+1)},MMM:function(n){return n.format("month-short")},MMMM:function(n){return n.format("month")},w:function(n){return n.week()},ww:function(n){return un(n.week())},d:function(n){return n.date()},dd:function(n){return un(n.date())},D:function(n){return n.dayOfYear()},DD:function(n){return un(n.dayOfYear())},DDD:function(n){return un(n.dayOfYear(),3)},E:function(n){return n.format("day-short")},EE:function(n){return n.format("day-short")},EEE:function(n){return n.format("day-short")},EEEE:function(n){return n.format("day")},EEEEE:function(n){return n.format("day")[0]},e:function(n){return n.day()},ee:function(n){return n.day()},eee:function(n){return n.format("day-short")},eeee:function(n){return n.format("day")},eeeee:function(n){return n.format("day")[0]},a:function(n){return n.ampm().toUpperCase()},aa:function(n){return n.ampm().toUpperCase()},aaa:function(n){return n.ampm().toUpperCase()},aaaa:function(n){return n.ampm().toUpperCase()},h:function(n){return n.h12()},hh:function(n){return un(n.h12())},H:function(n){return n.hour()},HH:function(n){return un(n.hour())},m:function(n){return n.minute()},mm:function(n){return un(n.minute())},s:function(n){return n.second()},ss:function(n){return un(n.second())},A:function(n){return n.epoch-n.startOf("day").epoch},z:function(n){return n.timezone().name},zz:function(n){return n.timezone().name},zzz:function(n){return n.timezone().name},zzzz:function(n){return n.timezone().name},Z:function(n){return sn(n.timezone().current.offset)},ZZ:function(n){return sn(n.timezone().current.offset)},ZZZ:function(n){return sn(n.timezone().current.offset)},ZZZZ:function(n){return sn(n.timezone().current.offset,":")}},hn=function(n,e,t){for(var r=n,a=e,o=0;o<t;o+=1)cn[r]=cn[a],r+=n,a+=e};hn("q","Q",4),hn("L","M",4),hn("Y","y",4),hn("c","e",4),hn("k","H",2),hn("K","h",2),hn("S","s",2),hn("v","z",4),hn("V","Z",4);var fn=function(n,e){var t=e.split("");return(t=function(n){for(var e=0;e<n.length;e+=1)for(var t=n[e],r=e+1;r<n.length&&n[r]===t;r+=1)n[e]+=n[r],n[r]=null;return(n=n.filter((function(n){return n}))).map((function(n){return"''"===n&&(n="'"),n}))}(t=function(n){for(var e=0;e<n.length;e+=1)if("'"===n[e])for(var t=e+1;t<n.length;t+=1){if(n[t]&&(n[e]+=n[t]),"'"===n[t]){n[t]=null;break}n[t]=null}return n.filter((function(n){return n}))}(t))).reduce((function(e,t){return void 0!==cn[t]?e+=cn[t](n)||"":(/^'.{1,}'$/.test(t)&&(t=t.replace(/'/g,"")),e+=t),e}),"")},ln=["year","season","quarter","month","week","day","quarterHour","hour","minute"],dn=function(n,e){var t=n.clone().startOf(e),r=n.clone().endOf(e).epoch-t.epoch,a=(n.epoch-t.epoch)/r;return parseFloat(a.toFixed(2))},mn=function(n,e){if(e)return e=$.normalize(e),dn(n,e);var t={};return ln.forEach((function(e){t[e]=dn(n,e)})),t},pn=function(n,e){var t=n.progress();return"quarterhour"===(e=$.normalize(e))&&(e="quarterHour"),void 0!==t[e]?(t[e]>.5&&(n=n.add(1,e)),n=n.startOf(e)):!1===n.silent&&console.warn("no known unit '"+e+"'"),n},yn=function(n,e,t){var r=0;for(n=n.clone();n.isBefore(e);)n=n.add(1,t),r+=1;return n.isAfter(e,t)&&(r-=1),r},vn=function(n,e,t){return n.isBefore(e)?yn(n,e,t):-1*yn(e,n,t)},gn=function(n,e){var t=e.epoch-n.epoch,r={milliseconds:t,seconds:parseInt(t/1e3,10)};r.minutes=parseInt(r.seconds/60,10),r.hours=parseInt(r.minutes/60,10);var a=n.clone();return r.years=function(n,e){var t=e.year()-n.year();return(n=n.year(e.year())).isAfter(e)&&(t-=1),t}(a,e),a=n.add(r.years,"year"),r.months=12*r.years,a=n.add(r.months,"month"),r.months+=vn(a,e,"month"),r.weeks=52*r.years,a=n.add(r.weeks,"week"),r.weeks+=vn(a,e,"week"),r.days=7*r.weeks,a=n.add(r.days,"day"),r.days+=vn(a,e,"day"),r},bn=function(n,e,t){e=$.beADate(e,n);var r=!1;if(n.isAfter(e)){var a=n;n=e,e=a,r=!0}var o=gn(n,e);return r&&(o=function(n){return Object.keys(n).forEach((function(e){n[e]*=-1})),n}(o)),t?(t=$.normalize(t),!0!==/s$/.test(t)&&(t+="s"),"dates"===t&&(t="days"),o[t]):o},wn={months:{almost:10,over:4},days:{almost:25,over:10},hours:{almost:20,over:8},minutes:{almost:50,over:20},seconds:{almost:50,over:20}};function kn(n,e){return 1===n&&(e=e.slice(0,-1)),n+" "+e}var zn=function(n,e){var t,r,a,o=function(n,e){var t=n.isBefore(e),r=t?e:n,a=t?n:e;a=a.clone();var o={years:0,months:0,days:0,hours:0,minutes:0,seconds:0};return Object.keys(o).forEach((function(n){if(!a.isSame(r,n)){var e=a.diff(r,n);a=a.add(e,n),o[n]=e}})),t&&Object.keys(o).forEach((function(n){0!==o[n]&&(o[n]*=-1)})),o}(n,e=$.beADate(e,n));if(!0===Object.keys(o).every((function(n){return!o[n]})))return{diff:o,rounded:"now",qualified:"now",precise:"now"};var i=[];return Object.keys(o).forEach((function(n,e,a){var u=Math.abs(o[n]);if(0!==u){var s=kn(u,n);if(i.push(s),!t){if(t=r=s,e>4)return;var c=a[e+1],h=Math.abs(o[c]);h>wn[c].almost?(t=kn(u+1,n),r="almost "+t):h>wn[c].over&&(r="over "+s)}}})),a=i.splice(0,2).join(", "),!0===n.isAfter(e)?(t+=" ago",r+=" ago",a+=" ago"):(t="in "+t,r="in "+r,a="in "+a),{diff:o,rounded:t,qualified:r,precise:a}},_n={north:[["spring",2,1],["summer",5,1],["fall",8,1],["autumn",8,1],["winter",11,1]],south:[["fall",2,1],["autumn",2,1],["winter",5,1],["spring",8,1],["summer",11,1]]},jn=[null,[0,1],[3,1],[6,1],[9,1]],On={minute:function(n){return S(n,{second:0,millisecond:0}),n},quarterhour:function(n){var e=n.minutes();return n=e>=45?n.minutes(45):e>=30?n.minutes(30):e>=15?n.minutes(15):n.minutes(0),S(n,{second:0,millisecond:0}),n},hour:function(n){return S(n,{minute:0,second:0,millisecond:0}),n},day:function(n){return S(n,{hour:0,minute:0,second:0,millisecond:0}),n},week:function(n){var e=n.clone();return(n=n.day(n._weekStart)).isAfter(e)&&(n=n.subtract(1,"week")),S(n,{hour:0,minute:0,second:0,millisecond:0}),n},month:function(n){return S(n,{date:1,hour:0,minute:0,second:0,millisecond:0}),n},quarter:function(n){var e=n.quarter();return jn[e]&&S(n,{month:jn[e][0],date:jn[e][1],hour:0,minute:0,second:0,millisecond:0}),n},season:function(n){var e=n.season(),t="north";"South"===n.hemisphere()&&(t="south");for(var r=0;r<_n[t].length;r++)if(_n[t][r][0]===e){var a=n.year();return"winter"===e&&n.month()<3&&(a-=1),S(n,{year:a,month:_n[t][r][1],date:_n[t][r][2],hour:0,minute:0,second:0,millisecond:0}),n}return n},year:function(n){return S(n,{month:0,date:1,hour:0,minute:0,second:0,millisecond:0}),n},decade:function(n){var e=(n=n.startOf("year")).year(),t=10*parseInt(e/10,10);return n=n.year(t)},century:function(n){var e=(n=n.startOf("year")).year(),t=100*parseInt(e/100,10);return n=n.year(t)}};On.date=On.day;var Dn=function(n,e){var t=n.clone();return e=$.normalize(e),On[e]?On[e](t):"summer"===e||"winter"===e?(t=t.season(e),On.season(t)):t},Sn=function(n,e){var t=n.clone();return e=$.normalize(e),On[e]?t=(t=(t=On[e](t)).add(1,e)).subtract(1,"millisecond"):t},Mn=function(n){return!!K.short().find((function(e){return e===n}))||!!K.long().find((function(e){return e===n}))},Pn=function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",t=arguments.length>2?arguments[2]:void 0;if(!e||!t)return[];if(e=$.normalize(e),t=n.clone().set(t),n.isAfter(t)){var r=n;n=t,t=r}var a=n.clone();Mn(e)?(a=a.next(e),e="week"):a=a.next(e);for(var o=[];a.isBefore(t);)o.push(a),a=a.add(1,e);return o},qn=function(n){var e=n.timezones,t=n.tz;if(!1===e.hasOwnProperty(t)&&(t=z(n.tz,e)),null===t)return!1===n.silent&&console.warn("Warn: could not find given or local timezone - '"+n.tz+"'"),{current:{epochShift:0}};var r,o,i=e[t],u={name:(r=t,r=(r=(r=r[0].toUpperCase()+r.substr(1)).replace(/\/gmt/,"/GMT")).replace(/[\/_]([a-z])/gi,(function(n){return n.toUpperCase()}))),hasDst:Boolean(i.dst),default_offset:i.offset,hemisphere:"s"===i.hem?"South":"North",current:{}};if(u.hasDst){var s=(o=i.dst)?o.split("->"):[];u.change={start:s[0],back:s[1]}}var c=i.offset,h=c;return!0===u.hasDst&&(h="North"===u.hemisphere?c-1:i.offset+1),!1===u.hasDst?(u.current.offset=c,u.current.isDST=!1):!0===a(n.epoch,u.change.start,u.change.back,c,h)?(u.current.offset=c,u.current.isDST="North"===u.hemisphere):(u.current.offset=h,u.current.isDST="South"===u.hemisphere),u},Cn=["century","decade","year","month","date","day","hour","minute","second","millisecond"],En={set:function(n,e){var t=this.clone();return t=V(t,n,null),e&&(this.tz=z(e)),t},timezone:function(){return qn(this)},isDST:function(){return qn(this).current.isDST},hasDST:function(){return qn(this).hasDst},offset:function(){return 60*qn(this).current.offset},hemisphere:function(){return qn(this).hemisphere},format:function(n){return on(this,n)},unixFmt:function(n){return fn(this,n)},startOf:function(n){return Dn(this,n)},endOf:function(n){return Sn(this,n)},leapYear:function(){var n=this.year();return $.isLeapYear(n)},progress:function(n){return mn(this,n)},nearest:function(n){return pn(this,n)},diff:function(n,e){return bn(this,n,e)},since:function(n){return n||(n=this.clone().set()),zn(this,n)},next:function(n){return this.add(1,n).startOf(n)},last:function(n){return this.subtract(1,n).startOf(n)},isValid:function(){return!(!this.epoch&&0!==this.epoch)&&!isNaN(this.d.getTime())},goto:function(n){var e=this.clone();return e.tz=z(n,e.timezones),e},every:function(e,t){if("object"===n(e)&&"string"==typeof t){var r=t;t=e,e=r}return Pn(this,e,t)},isAwake:function(){var n=this.hour();return!(n<8||n>22)},isAsleep:function(){return!this.isAwake()},log:function(){return console.log(""),console.log(on(this,"nice-short")),this},logYear:function(){return console.log(""),console.log(on(this,"full-short")),this},json:function(){var n=this;return Cn.reduce((function(e,t){return e[t]=n[t](),e}),{})},debug:function(){var n=this.timezone(),e=this.format("MM")+" "+this.format("date-ordinal")+" "+this.year();return e+="\n - "+this.format("time"),console.log("\n\n",e+"\n - "+n.name+" ("+n.current.offset+")"),this},from:function(n){return(n=this.clone().set(n)).since(this)},fromNow:function(){return this.clone().set(Date.now()).since(this)},weekStart:function(n){if("number"==typeof n)return this._weekStart=n,this;if("string"==typeof n){n=n.toLowerCase().trim();var e=K.short().indexOf(n);-1===e&&(e=K.long().indexOf(n)),-1===e&&(e=1),this._weekStart=e}else console.warn("Spacetime Error: Cannot understand .weekStart() input:",n);return this}};En.inDST=En.isDST,En.round=En.nearest,En.each=En.every;var In=En,Tn=$.isLeapYear,An=function(n){return"string"==typeof n&&(n=parseInt(n,10)),n},Nn=["year","month","date","hour","minute","second","millisecond"],$n=function(n,e,t){for(var r=Nn.indexOf(t),a=Nn.slice(r,Nn.length),o=0;o<a.length;o++){var i=e[a[o]]();n[a[o]](i)}return n},xn=function(n,e,t,r){return!0===t&&n.isBefore(e)?n=n.add(1,r):!1===t&&n.isAfter(e)&&(n=n.minus(1,r)),n},Ln=function(n,e){e=An(e);var t=n.millisecond()-e;return n.epoch-t},Yn=function(n,e,t){e=An(e);var r=n.clone(),a=(n.second()-e)*j.second;return n.epoch=n.epoch-a,(n=xn(n,r,t,"minute")).epoch},Fn=function(n,e,t){e=An(e);var r=n.clone(),a=(n.minute()-e)*j.minute;return n.epoch-=a,$n(n,r,"second"),(n=xn(n,r,t,"hour")).epoch},Bn=function(n,e,t){(e=An(e))>=24?e=24:e<0&&(e=0);var r=n.clone(),a=n.hour()-e,o=a*j.hour;return n.epoch-=o,n.date()!==r.date()&&(n=r.clone(),a>1&&(a-=1),a<1&&(a+=1),o=a*j.hour,n.epoch-=o),S(n,{hour:e}),$n(n,r,"minute"),(n=xn(n,r,t,"day")).epoch},Zn=function(n,e,t){var r=e.match(/([0-9]{1,2})[:h]([0-9]{1,2})(:[0-9]{1,2})? ?(am|pm)?/);if(!r){if(!(r=e.match(/([0-9]{1,2}) ?(am|pm)/)))return n.epoch;r.splice(2,0,"0"),r.splice(3,0,"")}var a=!1,o=parseInt(r[1],10),i=parseInt(r[2],10);i>=60&&(i=59),o>12&&(a=!0),!1===a&&("am"===r[4]&&12===o&&(o=0),"pm"===r[4]&&o<12&&(o+=12)),r[3]=r[3]||"",r[3]=r[3].replace(/:/,"");var u=parseInt(r[3],10)||0,s=n.clone();return n=(n=(n=(n=n.hour(o)).minute(i)).second(u)).millisecond(0),(n=xn(n,s,t,"day")).epoch},Hn=function(n,e,t){if((e=An(e))>28){var r=n.month(),a=N[r];1===r&&29===e&&Tn(n.year())&&(a=29),e>a&&(e=a)}e<=0&&(e=1);var o=n.clone();return S(n,{date:e}),(n=xn(n,o,t,"month")).epoch},Qn=function(n,e,t){"string"==typeof e&&(e=E()[e.toLowerCase()]),(e=An(e))>=12&&(e=11),e<=0&&(e=0);var r=n.date();r>N[e]&&(r=N[e]);var a=n.clone();return S(n,{month:e,date:r}),(n=xn(n,a,t,"year")).epoch},Gn=function(n,e){return"string"==typeof e&&/^'[0-9]{2}$/.test(e)&&(e=e.replace(/'/,"").trim(),e=(e=Number(e))>30?1900+e:2e3+e),e=An(e),S(n,{year:e}),n.epoch},Un=function(n,e,t){var r=n.clone();return e=An(e),"december"===(n=(n=(n=n.month(0)).date(1)).day("monday")).monthName()&&n.date()>=28&&(n=n.add(1,"week")),e-=1,n=n.add(e,"weeks"),(n=xn(n,r,t,"year")).epoch},Vn=function(n,e,t){e=An(e);var r=n.clone();return(e-=1)<=0?e=0:e>=365&&(e=364),n=(n=n.startOf("year")).add(e,"day"),$n(n,r,"hour"),(n=xn(n,r,t,"year")).epoch},Wn={millisecond:function(n){if(void 0!==n){var e=this.clone();return e.epoch=Ln(e,n),e}return this.d.getMilliseconds()},second:function(n,e){if(void 0!==n){var t=this.clone();return t.epoch=Yn(t,n,e),t}return this.d.getSeconds()},minute:function(n,e){if(void 0!==n){var t=this.clone();return t.epoch=Fn(t,n,e),t}return this.d.getMinutes()},hour:function(n,e){var t=this.d;if(void 0!==n){var r=this.clone();return r.epoch=Bn(r,n,e),r}return t.getHours()},hourFloat:function(n,e){if(void 0!==n){var t=this.clone(),r=n%1;r*=60;var a=parseInt(n,10);return t.epoch=Bn(t,a,e),t.epoch=Fn(t,r,e),t}var o=this.d,i=o.getHours(),u=o.getMinutes();return i+(u/=60)},hour12:function(n,e){var t=this.d;if(void 0!==n){var r=this.clone(),a=(n=""+n).match(/^([0-9]+)(am|pm)$/);if(a){var o=parseInt(a[1],10);"pm"===a[2]&&(o+=12),r.epoch=Bn(r,o,e)}return r}var i=t.getHours();return i>12&&(i-=12),0===i&&(i=12),i},time:function(n,e){if(void 0!==n){var t=this.clone();return n=n.toLowerCase().trim(),t.epoch=Zn(t,n,e),t}return"".concat(this.h12(),":").concat($.zeroPad(this.minute())).concat(this.ampm())},ampm:function(n,e){var t="am",r=this.hour();if(r>=12&&(t="pm"),"string"!=typeof n)return t;var a=this.clone();return n=n.toLowerCase().trim(),r>=12&&"am"===n?(r-=12,a.hour(r,e)):r<12&&"pm"===n?(r+=12,a.hour(r,e)):a},dayTime:function(n,e){if(void 0!==n){var t={morning:"7:00am",breakfast:"7:00am",noon:"12:00am",lunch:"12:00pm",afternoon:"2:00pm",evening:"6:00pm",dinner:"6:00pm",night:"11:00pm",midnight:"23:59pm"},r=this.clone();return n=(n=n||"").toLowerCase(),!0===t.hasOwnProperty(n)&&(r=r.time(t[n],e)),r}var a=this.hour();return a<6?"night":a<12?"morning":a<17?"afternoon":a<22?"evening":"night"},iso:function(n){return void 0!==n?this.set(n):this.format("iso")}},Jn={date:function(n,e){if(void 0!==n){var t=this.clone();return(n=parseInt(n,10))&&(t.epoch=Hn(t,n,e)),t}return this.d.getDate()},day:function(n,e){if(void 0===n)return this.d.getDay();var t=this.clone(),r=n;"string"==typeof n&&(n=n.toLowerCase(),K.aliases.hasOwnProperty(n)?r=K.aliases[n]:-1===(r=K.short().indexOf(n))&&(r=K.long().indexOf(n)));var a=this.d.getDay(),o=a-r;!0===e&&o>0&&(o-=7),!1===e&&o<0&&(o+=7);var i=this.subtract(o,"days");return S(i,{hour:t.hour(),minute:t.minute(),second:t.second()}),i},dayName:function(n,e){if(void 0===n)return K.long()[this.day()];var t=this.clone();return t=t.day(n,e)}},Kn=function(n){return n=(n=(n=n.minute(0)).second(0)).millisecond(1)},Rn={dayOfYear:function(n,e){if(void 0!==n){var t=this.clone();return t.epoch=Vn(t,n,e),t}for(var r,a=0,o=this.d.getMonth(),i=1;i<=o;i++)(r=new Date).setDate(1),r.setFullYear(this.d.getFullYear()),r.setHours(1),r.setMinutes(1),r.setMonth(i),r.setHours(-2),a+=r.getDate();return a+this.d.getDate()},week:function(n,e){if(void 0!==n){var t=this.clone();return t.epoch=Un(this,n,e),t=Kn(t)}var r=this.clone();r=(r=r.month(0)).date(1),"december"===(r=(r=Kn(r)).day("monday")).monthName()&&r.date()>=28&&(r=r.add(1,"week"));var a=1;1===r.date()&&(a=0),r=r.minus(1,"second");var o=this.epoch;if(r.epoch>o)return 1;var i=0,u=4*this.month();for(r.epoch+=j.week*u,i+=u;i<=52;i++){if(r.epoch>o)return i+a;r=r.add(1,"week")}return 52},month:function(n,e){if(void 0!==n){var t=this.clone();return t.epoch=Qn(t,n,e),t}return this.d.getMonth()},monthName:function(n,e){if(void 0!==n){var t=this.clone();return t=t.month(n,e)}return C()[this.month()]},quarter:function(n,e){if(void 0!==n&&("string"==typeof n&&(n=n.replace(/^q/i,""),n=parseInt(n,10)),jn[n])){var t=this.clone(),r=jn[n][0];return t=(t=(t=t.month(r,e)).date(1,e)).startOf("day")}for(var a=this.d.getMonth(),o=1;o<jn.length;o++)if(a<jn[o][0])return o-1;return 4},season:function(n,e){var t="north";if("South"===this.hemisphere()&&(t="south"),void 0!==n){for(var r=this.clone(),a=0;a<_n[t].length;a++)n===_n[t][a][0]&&(r=(r=(r=r.month(_n[t][a][1],e)).date(1)).startOf("day"));return r}for(var o=this.d.getMonth(),i=0;i<_n[t].length-1;i++)if(o>=_n[t][i][1]&&o<_n[t][i+1][1])return _n[t][i][0];return"winter"},year:function(n){if(void 0!==n){var e=this.clone();return e.epoch=Gn(e,n),e}return this.d.getFullYear()},era:function(n){if(void 0!==n){var e=this.clone();n=n.toLowerCase();var t=e.d.getFullYear();return"bc"===n&&t>0&&(e.epoch=Gn(e,-1*t)),"ad"===n&&t<0&&(e.epoch=Gn(e,-1*t)),e}return this.d.getFullYear()<0?"BC":"AD"},decade:function(n){if(void 0!==n){if(!(n=(n=(n=String(n)).replace(/([0-9])'?s$/,"$1")).replace(/([0-9])(th|rd|st|nd)/,"$1")))return console.warn("Spacetime: Invalid decade input"),this;2===n.length&&/[0-9][0-9]/.test(n)&&(n="19"+n);var e=Number(n);return isNaN(e)?this:(e=10*Math.floor(e/10),this.year(e))}return this.startOf("decade").year()},century:function(n){if(void 0!==n){"string"==typeof n&&(n=(n=(n=n.replace(/([0-9])(th|rd|st|nd)/,"$1")).replace(/([0-9]+) ?(b\.?c\.?|a\.?d\.?)/i,(function(n,e,t){return t.match(/b\.?c\.?/i)&&(e="-"+e),e}))).replace(/c$/,""));var e=Number(n);return isNaN(n)?(console.warn("Spacetime: Invalid century input"),this):(0===e&&(e=1),e=e>=0?100*(e-1):100*(e+1),this.year(e))}var t=this.startOf("century").year();return(t=Math.floor(t/100))<0?t-1:t+1},millenium:function(n){if(void 0!==n){if("string"==typeof n&&(n=n.replace(/([0-9])(th|rd|st|nd)/,"$1"),n=Number(n),isNaN(n)))return console.warn("Spacetime: Invalid millenium input"),this;n>0&&(n-=1);var e=1e3*n;return 0===e&&(e=1),this.year(e)}var t=Math.floor(this.year()/1e3);return t>=0&&(t+=1),t}},Xn=Object.assign({},Wn,Jn,Rn);Xn.milliseconds=Xn.millisecond,Xn.seconds=Xn.second,Xn.minutes=Xn.minute,Xn.hours=Xn.hour,Xn.hour24=Xn.hour,Xn.h12=Xn.hour12,Xn.h24=Xn.hour24,Xn.days=Xn.day;var ne=function(n){Object.keys(Xn).forEach((function(e){n.prototype[e]=Xn[e]}))},ee=$.isLeapYear,te=function(n,e){return 1===n&&ee(e)?29:N[n]},re=function(n,e){if(n.month>0){var t=parseInt(n.month/12,10);n.year=e.year()+t,n.month=n.month%12}else if(n.month<0){var r=Math.floor(Math.abs(n.month)/13,10);r=Math.abs(r)+1,n.year=e.year()-r,n.month=n.month%12,n.month=n.month+12,12===n.month&&(n.month=0)}return n},ae=function(n,e,t){for(var r=e.year(),a=e.month(),o=te(a,r);t>o;)t-=o,(a+=1)>=12&&(a-=12,r+=1),o=te(a,r);return n.month=a,n.date=t,n},oe=function(n,e,t){n.year=e.year(),n.month=e.month();var r=e.date();for(n.date=r-Math.abs(t);n.date<1;){n.month-=1,n.month<0&&(n.month=11,n.year-=1);var a=te(n.month,n.year);n.date+=a}return n},ie=["millisecond","second","minute","hour","date","month"],ue={second:ie.slice(0,1),minute:ie.slice(0,2),quarterhour:ie.slice(0,2),hour:ie.slice(0,3),date:ie.slice(0,4),month:ie.slice(0,4),quarter:ie.slice(0,4),season:ie.slice(0,4),year:ie,decade:ie,century:ie};ue.week=ue.hour,ue.season=ue.date,ue.quarter=ue.date;var se={year:!0,quarter:!0,season:!0,month:!0,week:!0,day:!0},ce={month:!0,quarter:!0,season:!0,year:!0},he=function(n){n.prototype.add=function(n,e){var t=this.clone();if(!e||0===n)return t;var r=this.clone();if("millisecond"===(e=$.normalize(e)))return t.epoch+=n,t;"fortnight"===e&&(n*=2,e="week"),j[e]?t.epoch+=j[e]*n:"week"===e?t.epoch+=j.day*(7*n):"quarter"===e||"season"===e?t.epoch+=j.month*(3*n):"quarterhour"===e&&(t.epoch+=15*j.minute*n);var a={};if(ue[e]&&ue[e].forEach((function(n){a[n]=r[n]()})),se[e]){var o=r.timezone().current.offset-t.timezone().current.offset;t.epoch+=3600*o*1e3}if("month"===e&&(a.month=r.month()+n,a=re(a,r)),"week"===e){var i=r.date()+7*n;i<=28&&i>1&&(a.date=i)}else if("date"===e){if(n<0)a=oe(a,r,n);else{var u=r.date()+n;a=ae(a,r,u)}0!==n&&r.isSame(t,"day")&&(a.date=r.date()+n)}else if("quarter"===e){if(a.month=r.month()+3*n,a.year=r.year(),a.month<0){var s=Math.floor(a.month/12),c=a.month+12*Math.abs(s);a.month=c,a.year+=s}else if(a.month>=12){var h=Math.floor(a.month/12);a.month=a.month%12,a.year+=h}a.date=r.date()}else if("year"===e){var f=r.year()+n,l=t.year();(l<f||l>f)&&(t.epoch+=j.day)}else"decade"===e?a.year=t.year()+10:"century"===e&&(a.year=t.year()+100);if(ce[e]){var d=N[a.month];a.date=r.date(),a.date>d&&(a.date=d)}return Object.keys(a).length>1&&S(t,a),t},n.prototype.subtract=function(n,e){return this.clone().add(-1*n,e)},n.prototype.minus=n.prototype.subtract,n.prototype.plus=n.prototype.add},fe={millisecond:function(n){return n.epoch},second:function(n){return[n.year(),n.month(),n.date(),n.hour(),n.minute(),n.second()].join("-")},minute:function(n){return[n.year(),n.month(),n.date(),n.hour(),n.minute()].join("-")},hour:function(n){return[n.year(),n.month(),n.date(),n.hour()].join("-")},day:function(n){return[n.year(),n.month(),n.date()].join("-")},week:function(n){return[n.year(),n.week()].join("-")},month:function(n){return[n.year(),n.month()].join("-")},quarter:function(n){return[n.year(),n.quarter()].join("-")},year:function(n){return n.year()}};fe.date=fe.day;var le=function(e){e.prototype.isSame=function(t,r){var a=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],o=this;if(!r)return null;if("string"==typeof t&&"object"===n(r)){var i=t;t=r,r=i}return"string"!=typeof t&&"number"!=typeof t||(t=new e(t,this.timezone.name)),r=r.replace(/s$/,""),!0===a&&o.tz!==t.tz&&((t=t.clone()).tz=o.tz),fe[r]?fe[r](o)===fe[r](t):null}},de=function(n){var e={isAfter:function(n){n=$.beADate(n,this);var e=$.getEpoch(n);return null===e?null:this.epoch>e},isBefore:function(n){n=$.beADate(n,this);var e=$.getEpoch(n);return null===e?null:this.epoch<e},isEqual:function(n){n=$.beADate(n,this);var e=$.getEpoch(n);return null===e?null:this.epoch===e},isBetween:function(n,e){var t=arguments.length>2&&void 0!==arguments[2]&&arguments[2];n=$.beADate(n,this),e=$.beADate(e,this);var r=$.getEpoch(n);if(null===r)return null;var a=$.getEpoch(e);return null===a?null:t?this.isBetween(n,e)||this.isEqual(n)||this.isEqual(e):r<this.epoch&&this.epoch<a}};Object.keys(e).forEach((function(t){n.prototype[t]=e[t]}))},me=function(n){var e={i18n:function(n){$.isObject(n.days)&&K.set(n.days),$.isObject(n.months)&&I(n.months),$.isBoolean(n.useTitleCase)&&nn(n.useTitleCase)}};Object.keys(e).forEach((function(t){n.prototype[t]=e[t]}))},pe=d,ye=function(n,e){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.epoch=null,this.tz=z(e,pe),this.silent=t.silent||!0,this.british=t.dmy||t.british,this._weekStart=1,void 0!==t.weekStart&&(this._weekStart=t.weekStart),this._today={},void 0!==t.today&&(this._today=t.today),Object.defineProperty(this,"d",{get:function(){var n=o(this),e=(new Date(this.epoch).getTimezoneOffset()||0)+60*n;e=60*e*1e3;var t=this.epoch+e;return new Date(t)}}),Object.defineProperty(this,"timezones",{get:function(){return pe},set:function(n){return pe=n,n}});var r=V(this,n,e);this.epoch=r.epoch};Object.keys(In).forEach((function(n){ye.prototype[n]=In[n]})),ye.prototype.clone=function(){return new ye(this.epoch,this.tz,{silent:this.silent,weekStart:this._weekStart,today:this._today})},ye.prototype.toLocalDate=function(){return new Date(this.epoch)},ne(ye),he(ye),le(ye),de(ye),me(ye);var ve=ye,ge=function(n,e){var t=new ve(null),r=new ve(null);t=t.time(n),r=e?r.time(e):t.add(59,"minutes");var a=t.hour(),o=r.hour();return Object.keys(t.timezones).filter((function(n){if(-1===n.indexOf("/"))return!1;var e=new ve(null,n),i=e.hour();return i>=a&&i<=o&&(!(i===a&&e.minute()<t.minute())&&!(i===o&&e.minute()>r.minute()))}))},be=function(n,e,t){return new ve(n,e,t)},we=function(n){var e=n._today||{};return Object.keys(e).forEach((function(t){n=n[t](e[t])})),n};return be.now=function(n,e){var t=new ve((new Date).getTime(),n,e);return t=we(t)},be.today=function(n,e){var t=new ve((new Date).getTime(),n,e);return(t=we(t)).startOf("day")},be.tomorrow=function(n,e){var t=new ve((new Date).getTime(),n,e);return(t=we(t)).add(1,"day").startOf("day")},be.yesterday=function(n,e){var t=new ve((new Date).getTime(),n,e);return(t=we(t)).subtract(1,"day").startOf("day")},be.extend=function(n){return Object.keys(n).forEach((function(e){ve.prototype[e]=n[e]})),this},be.timezones=function(){return(new ve).timezones},be.max=function(n,e){var t=new ve(null,n,e);return t.epoch=864e13,t},be.min=function(n,e){var t=new ve(null,n,e);return t.epoch=-864e13,t},be.whereIts=ge,be.version="6.15.0",be.plugin=be.extend,be}));

@@ -7,8 +7,14 @@ This project follows semVer, where:

<!-- ### [unreleased]
<!-- ### [unreleased]
- **[fix]** - string parsing issue for tue/tues
- **[new]** - add direction param to .day() method
-->
### v6.15.0 [April 2021]
- **[fix]** - .time('4:88') now has ceiling of 59m
- **[new]** - add goFwd params to all (appropriate) setter methods
### v6.14.0 [March 2021]
- **[change]** - add missing timezones from indiana and argentina

@@ -19,6 +25,7 @@ - **[change]** - set old timezones as aliases of newer ones

- update deps, and documentation
### v6.13.0 [March 2021]
- **[change]** - support more alt day formats like `.day('mo')`
- **[change]** - allow `.week()` to return 53
- **[change]** - allow `.week()` to return 53
- **[change]** - support swapped-parameters for `.each()`

@@ -29,8 +36,11 @@ - **[change]** - support swapped-parameters for `.isSame()`

### v6.12.5 [Feb 2021]
- **[fix]** - add/minus by quarter issue
### v6.12.4 [Feb 2021]
- **[fix]** - typescript issue
### v6.12.3 [Feb 2021]
- **[fix]** - fix .every() >= issue

@@ -44,9 +54,10 @@ - **[fix]** - fix today-passthrough in some date formats

### v6.12.2 [Dec 2020]
- **[change]** - support i18n titlecase config (thanks Kayla)
- **[fix]** - endOf('season') issue
- **[fix]** - fix character escaping issue in unixFmt method #207
update deps
update deps
### v6.12.1 [Dec 2020]
### v6.12.1 [Dec 2020]
- **[new]** - support for '97 year format

@@ -58,2 +69,3 @@ - **[change]** - support `13h00` time format

### v6.12.0 [Dec 2020]
- **[new]** - support period-seperated short-iso format

@@ -65,2 +77,3 @@ - **[new]** - support fortnight in add/remove methods

### v6.11.0 [Nov 2020]
- **[change]** - support 6-digit millisecond, and lowercase iso

@@ -70,9 +83,11 @@ - **[change]** - first week of year must start > dec 29th

- update deps
### v6.10.1 [Nov 2020]
- **[fix]** - keep yukon dst changes (for now!) #243
- **[fix]** - support new-zealand time in '13h' format #242
- update deps
### v6.10.0 [Nov 2020]
- **[fix]** - support whitespace between time and am/pm (thanks Andy!)

@@ -83,4 +98,4 @@ - **[change]** - make empty array + obj equal to null inputs #240

### v6.9.0 [Nov 2020]
### v6.9.0 [Nov 2020]
- **[fix]** - dst-change issues like #236

@@ -92,7 +107,9 @@ - **[fix]** - inc/dec year issue on exact nye millisecond

### v6.8.0 [Oct 2020]
- **[fix]** major DST issue #182 (thanks Boris!)
### v6.7.0 [Oct 2020]
- **[fix]** add missing timezones `America/Fort_Nelson`, `Asia/Qostanay`, and `America/Nuuk`
- **[fix]** comparison issue #231 effecting `.isSame()` and `.since()` accross different timezones
- **[fix]** comparison issue #231 effecting `.isSame()` and `.since()` accross different timezones

@@ -99,0 +116,0 @@ ### v6.6.4

{
"name": "spacetime",
"version": "6.14.0",
"version": "6.15.0",
"description": "figure-out dates across timezones",

@@ -41,7 +41,7 @@ "main": "builds/spacetime.js",

"devDependencies": {
"@babel/core": "7.13.10",
"@babel/preset-env": "7.13.10",
"@babel/core": "7.13.14",
"@babel/preset-env": "7.13.12",
"codecov": "3.8.1",
"nyc": "^15.1.0",
"rollup": "2.41.4",
"rollup": "2.44.0",
"rollup-plugin-babel": "4.4.0",

@@ -48,0 +48,0 @@ "rollup-plugin-commonjs": "10.1.0",

@@ -20,12 +20,12 @@ <div align="center">

*Isn't it weird how we can do math in our head, but not **date math***?
\*Isn't it weird how we can do math in our head, but not **date math\***?
* *how many days until the end of the year?*
* *what time was it, 11 hours ago?*
* *is it lunchtime in france?*
and worse - there is no real ***date calculator***.
- _how many days until the end of the year?_
- _what time was it, 11 hours ago?_
- _is it lunchtime in france?_
*people end up asking google, and going to weird websites.*
and worse - there is no real **_date calculator_**.
_people end up asking google, and going to weird websites._
<img height="10px" src="https://user-images.githubusercontent.com/399657/68221862-17ceb980-ffb8-11e9-87d4-7b30b6488f16.png"/>

@@ -64,7 +64,7 @@

- support **daylight savings**, **leap years**, and **hemispheres**
- [Moment-like API](https://beta.observablehq.com/@spencermountain/spacetime-api) *(but immutable)*
- [Moment-like API](https://beta.observablehq.com/@spencermountain/spacetime-api) _(but immutable)_
- Orient time by quarter, season, month, week..
- _Zero Dependencies_ - (no *[Intl API](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl)*)
- _Zero Dependencies_ - (no _[Intl API](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl)_)
- weighs about 40kb.
- has a cool *[plugin thing](https://observablehq.com/@spencermountain/spacetime)*.
- has a cool _[plugin thing](https://observablehq.com/@spencermountain/spacetime)_.

@@ -86,7 +86,6 @@ <!-- spacer -->

```
<!-- spacer -->
<img height="30px" src="https://user-images.githubusercontent.com/399657/68221862-17ceb980-ffb8-11e9-87d4-7b30b6488f16.png"/>
`npm install spacetime`

@@ -104,2 +103,3 @@

<sub><i>typescript / babel / deno:</i></sub>
```ts

@@ -116,6 +116,4 @@ import spacetime from 'spacetime'

<img height="50px" src="https://user-images.githubusercontent.com/399657/68221862-17ceb980-ffb8-11e9-87d4-7b30b6488f16.png"/>
<div align="center">

@@ -141,8 +139,6 @@ <h3>

<img height="30px" src="https://user-images.githubusercontent.com/399657/68221862-17ceb980-ffb8-11e9-87d4-7b30b6488f16.png"/>
plugins:
plugins:
<div align="center">

@@ -157,9 +153,10 @@ <a href="https://github.com/spencermountain/spacetime/tree/master/plugins/geo">spacetime-geo</a>

• <a href="https://github.com/spencermountain/spacetime/tree/master/plugins/week-start">week-start</a>
</div>
</div>
<img height="50px" src="https://user-images.githubusercontent.com/399657/68221862-17ceb980-ffb8-11e9-87d4-7b30b6488f16.png"/>
### Date Inputs:
### Date Inputs:
we can parse *[all the normal stuff](https://github.com/spencermountain/spacetime/wiki/Input)*, and some fancy stuff:
we can parse _[all the normal stuff](https://github.com/spencermountain/spacetime/wiki/Input)_, and some fancy stuff:
```js

@@ -190,2 +187,3 @@ //epoch

```
for fancier natural-language inputs, use [compromise-dates](https://github.com/spencermountain/compromise/tree/master/plugins/dates).

@@ -196,3 +194,5 @@

### Get & Set dates:
you can whip things around, but stay intuitive
```js

@@ -204,3 +204,7 @@ s.date() // 14

s = s.date(15) // Change to the 15th
s = s.day('monday') // Change to (this week's) monday
s = s.day('monday', true) // go forward to monday
s = s.day('monday', false) // go backward to monday
s = s.month('march') // Change to (this year's) March 1st

@@ -241,5 +245,21 @@ s = s.quarter(2) // Change to April 1st

```
if it's ***9am on tuesday***, and you <i>add a week</i>, it will still be 9am on tuesday.
if it's **_9am on tuesday_**, and you <i>add a week</i>, it will still be 9am on tuesday.
... even if some crazy changes happen.
setter methods also support a handy 2nd param that controls whether it should be set forward, or backward.
```js
s = s.time('4:00pm') // 4pm today
s = s.time('4:00pm', true) // the next 4pm in the future
s = s.time('4:00pm', false) // the most-recent 4pm
s = s.set('march 5th 2020')
s = s.set('march 4th') // 2020 (same year)
s = s.set('march 4th', true) // 2021
s = s.set('march 6th', false) // 2019
```
it's actually a little surprising how helpful this is.
<img height="20px" src="https://user-images.githubusercontent.com/399657/68221862-17ceb980-ffb8-11e9-87d4-7b30b6488f16.png"/>

@@ -272,4 +292,5 @@

```
all comparisons are done with sensitivity of timezone - ***8am EST*** is < ***8am PST***.
all comparisons are done with sensitivity of timezone - **_8am EST_** is < **_8am PST_**.
<img height="20px" src="https://user-images.githubusercontent.com/399657/68221862-17ceb980-ffb8-11e9-87d4-7b30b6488f16.png"/>

@@ -280,2 +301,3 @@

the best way to describe a timezone is an [IANA code](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones):
```js

@@ -286,3 +308,2 @@ // Roll into a new timezone, at the same moment

if you want to support relaxed timezone names like `'EST'`, `Eastern time`, use [timezone-soft](https://github.com/spencermountain/timezone-soft/)

@@ -300,2 +321,3 @@

play-around with timezones, and their DST-changes:
```js

@@ -316,2 +338,3 @@ //list timezones by their current time

```
you can flip-around the world pretty quick.

@@ -321,3 +344,4 @@

`.goto(null)` will pluck your current tz safely from your browser or computer.
`.goto(null)` will pluck your current tz safely from your browser or computer.
```js

@@ -328,7 +352,8 @@ spacetime().time('4:30pm').goto('Europe/Paris').goto(null).time()

<img height="20px" src="https://user-images.githubusercontent.com/399657/68221862-17ceb980-ffb8-11e9-87d4-7b30b6488f16.png"/>
### Date Formatting:
it's *[a pretty-sensible process](https://github.com/spencermountain/spacetime/wiki/Formatting)* to create nice-looking dates:
it's _[a pretty-sensible process](https://github.com/spencermountain/spacetime/wiki/Formatting)_ to create nice-looking dates:
```js

@@ -358,3 +383,2 @@ // Date + time formatting

## Limitations & caveats

@@ -386,2 +410,3 @@

#### Daylight-savings gotchas
We've written in detail about how spacetime handles Daylight-savings changes [here](https://observablehq.com/@spencermountain/spacetime-daylight-savings-time?collection=@spencermountain/spacetime)

@@ -392,3 +417,3 @@

Springtime DST changes are generally smoother than Fall ones.
Springtime DST changes are generally smoother than Fall ones.

@@ -428,5 +453,6 @@ <!-- spacer -->

#### Configure 'today' context:
#### Configure 'today' context:
spacetime makes some assumptions about some string inputs:
```js

@@ -449,10 +475,11 @@ // assumes start of month

```js
let today= {
let today = {
month: 3,
date: 4,
year: 1996,
year: 1996
}
let s = spacetime('June 5th', null, {today:today})
let s = spacetime('June 5th', null, { today: today })
s.year() // 1996
```
it also works for `spacetime.now(tz, {today:today})` and others.

@@ -466,3 +493,3 @@

spacetime.extend({
isHappyHour: function() {
isHappyHour: function () {
return this.hour() === 16

@@ -549,8 +576,6 @@ }

- [sugarjs/dates](https://sugarjs.com/dates/) - well-made date fns + timezone math
- [Intl.DateTimeFormat](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat) - some *[sorta-green](https://caniuse.com/#feat=internationalization)* in-browser date utilities
- [Intl.DateTimeFormat](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat) - some _[sorta-green](https://caniuse.com/#feat=internationalization)_ in-browser date utilities
thank you to the amazing [timeanddate.com](https://www.timeanddate.com/)
Apache 2.0

@@ -24,3 +24,3 @@ import { TimeUnit, Format } from './constraints'

/** move to a new timezone, but at this same moment. Accepts an IANA code or abbreviation */
goto: (target: string) => Spacetime
goto: (target: string | null) => Spacetime

@@ -162,3 +162,3 @@ /** @returns a copy of this object, with no references to the original */

/** set the current number of seconds (0-59) */
second(value: number): Spacetime
second(value: number, goForward?: boolean): Spacetime

@@ -168,3 +168,3 @@ /** get the current number of minutes (0-59) */

/** set the current number of minutes (0-59) */
minute(value: number): Spacetime
minute(value: number, goForward?: boolean): Spacetime

@@ -174,3 +174,3 @@ /** get the current hour, in 24 time (0-23). */

/** set the current hour, in 24 time (0-23). also accepts/parses '3pm' */
hour(value: number | string): Spacetime
hour(value: number | string, goForward?: boolean): Spacetime

@@ -180,3 +180,3 @@ /** get the day-number of the month (1- max31) */

/** set the day-number of the month (1- max31) */
date(value: number): Spacetime
date(value: number, goForward?: boolean): Spacetime

@@ -186,3 +186,3 @@ /** get the zero-based month-number (0-11). */

/** set the zero-based month-number (0-11). Also accepts 'June', or 'oct'. */
month(value: string | number): Spacetime
month(value: string | number, goForward?: boolean): Spacetime

@@ -197,3 +197,3 @@ /** get the 4-digit year as an integer */

/** set a formatted, 12-hour time, like '11:30pm' */
time(value: string): Spacetime
time(value: string, goForward?: boolean): Spacetime

@@ -203,3 +203,3 @@ /** get the week-number of the year (1-52) */

/** set the week-number of the year (1-52) */
week(value: number): Spacetime
week(value: number, goForward?: boolean): Spacetime

@@ -209,3 +209,3 @@ /** get the fiscal-quarter (1-4) */

/** set the fiscal-quarter (1-4) */
quarter(value: number): Spacetime
quarter(value: number, goForward?: boolean): Spacetime

@@ -215,3 +215,3 @@ /** get the name of the season, spring/summer/fall/autumn/winter */

/** set the name of the season, spring/summer/fall/autumn/winter */
season(value: string): Spacetime
season(value: string, goForward?: boolean): Spacetime

@@ -221,3 +221,3 @@ /** get the hour + minute in decimal form, so '3:30am' is 3.5 */

/** set the hour + minute in decimal form, so '3:30am' is 3.5 */
hourFloat(value: number): Spacetime
hourFloat(value: number, goForward?: boolean): Spacetime

@@ -227,3 +227,3 @@ /** get the day of the week as an integer, starting on sunday (day-0) */

/** set the day of the week as an integer, starting on sunday (day-0). Also accepts names like 'wednesday', or 'thurs' */
day(value: number | string): Spacetime
day(value: number | string, goForward?: boolean): Spacetime

@@ -233,3 +233,3 @@ /** get the day of the week as lower-case string */

/** set the day of the week */
dayName(value: string): Spacetime
dayName(value: string, goForward?: boolean): Spacetime

@@ -239,3 +239,3 @@ /** get whether the time is am or pm */

/** set whether the time is am or pm */
ampm(value: string): Spacetime
ampm(value: string, goForward?: boolean): Spacetime

@@ -245,3 +245,3 @@ /** get the general time-of-day, like 'afternoon' */

/** set the general time-of-day, like 'afternoon' */
dayTime(value: string): Spacetime
dayTime(value: string, goForward?: boolean): Spacetime

@@ -251,3 +251,3 @@ /** get the current month as a string, like 'april' */

/** set the current month as a string, like 'april' */
monthName(value: string): Spacetime
monthName(value: string, goForward?: boolean): Spacetime

@@ -254,0 +254,0 @@ /** the day number, between 0-6, that the week starts on. (Sunday is 0). Also accepts 'sunday' */

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc