-
Notifications
You must be signed in to change notification settings - Fork 6
/
timezonecomplete.min.js
1 lines (1 loc) · 166 KB
/
timezonecomplete.min.js
1
!function(f){"object"==typeof exports&&"undefined"!=typeof module?module.exports=f():"function"==typeof define&&define.amd?define([],f):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).tc=f()}(function(){return function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);throw(f=new Error("Cannot find module '"+i+"'")).code="MODULE_NOT_FOUND",f}c=n[i]={exports:{}},e[i][0].call(c.exports,function(r){return o(e[i][1][r]||r)},c,c.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}({1:[function(require,module,exports){var __spreadArray=this&&this.__spreadArray||function(to,from,pack){if(pack||2===arguments.length)for(var ar,i=0,l=from.length;i<l;i++)!ar&&i in from||((ar=ar||Array.prototype.slice.call(from,0,i))[i]=from[i]);return to.concat(ar||Array.prototype.slice.call(from))},error_1=(Object.defineProperty(exports,"__esModule",{value:!0}),require("./error"));exports.default=function(condition,name,format){for(var args=[],_i=3;_i<arguments.length;_i++)args[_i-3]=arguments[_i];condition||error_1.throwError.apply(void 0,__spreadArray([name,format],args,!1))}},{"./error":5}],2:[function(require,module,exports){Object.defineProperty(exports,"__esModule",{value:!0}),exports.binaryInsertionIndex=exports.TimeStruct=exports.secondOfDay=exports.weekDayNoLeapSecs=exports.timeToUnixNoLeapSecs=exports.unixToTimeNoLeapSecs=exports.weekNumber=exports.weekDayInstanceInMonth=exports.calendarWeekInMonth=exports.weekOfMonth=exports.weekDayOnOrBefore=exports.weekDayOnOrAfter=exports.nthWeekDayOfMonth=exports.firstWeekDayOfMonth=exports.lastWeekDayOfMonth=exports.dayOfYear=exports.daysInMonth=exports.daysInYear=exports.isLeapYear=exports.stringToTimeUnit=exports.timeUnitToString=exports.timeUnitToMilliseconds=exports.TimeUnit=exports.WeekDay=void 0;var WeekDay,TimeUnit,assert_1=require("./assert"),error_1=require("./error"),javascript_1=require("./javascript"),math=require("./math"),strings=require("./strings");function timeUnitToString(unit,amount){return void 0===amount&&(amount=1),!Number.isInteger(unit)||unit<0||unit>=TimeUnit.MAX?(0,error_1.throwError)("Argument.Unit","invalid time unit %d",unit):(unit=TimeUnit[unit].toLowerCase(),1===amount||-1===amount?unit:unit+"s")}function isLeapYear(year){return(0,assert_1.default)(Number.isInteger(year),"Argument.Year","Invalid year %d",year),year%4==0&&(year%100!=0||year%400==0)}function daysInYear(year){return isLeapYear(year)?366:365}function daysInMonth(year,month){switch(month){case 1:case 3:case 5:case 7:case 8:case 10:case 12:return 31;case 2:return isLeapYear(year)?29:28;case 4:case 6:case 9:case 11:return 30;default:return(0,error_1.throwError)("Argument.Month","Invalid month: %d",month)}}function dayOfYear(year,month,day){(0,assert_1.default)(Number.isInteger(year),"Argument.Year","Year out of range: %d",year),(0,assert_1.default)(Number.isInteger(month)&&1<=month&&month<=12,"Argument.Month","Month out of range: %d",month),(0,assert_1.default)(Number.isInteger(day)&&1<=day&&day<=daysInMonth(year,month),"Argument.Day","day out of range");for(var yearDay=0,i=1;i<month;i++)yearDay+=daysInMonth(year,i);return yearDay+=day-1}function lastWeekDayOfMonth(year,month,weekDay){(0,assert_1.default)(Number.isInteger(year),"Argument.Year","Year out of range: %d",year),(0,assert_1.default)(Number.isInteger(month)&&1<=month&&month<=12,"Argument.Month","Month out of range: %d",month),(0,assert_1.default)(Number.isInteger(weekDay)&&0<=weekDay&&weekDay<=6,"Argument.WeekDay","weekDay out of range: %d",weekDay);year=new TimeStruct({year:year,month:month,day:daysInMonth(year,month)}),month=weekDay-weekDayNoLeapSecs(year.unixMillis);return 0<month&&(month-=7),year.components.day+month}function firstWeekDayOfMonth(year,month,weekDay){(0,assert_1.default)(Number.isInteger(year),"Argument.Year","Year out of range: %d",year),(0,assert_1.default)(Number.isInteger(month)&&1<=month&&month<=12,"Argument.Month","Month out of range: %d",month),(0,assert_1.default)(Number.isInteger(weekDay)&&0<=weekDay&&weekDay<=6,"Argument.WeekDay","weekDay out of range: %d",weekDay);year=new TimeStruct({year:year,month:month,day:1}),month=weekDay-weekDayNoLeapSecs(year.unixMillis);return month<0&&(month+=7),year.components.day+month}function weekDayOnOrAfter(year,month,day,weekDay){(0,assert_1.default)(Number.isInteger(year),"Argument.Year","Year out of range: %d",year),(0,assert_1.default)(Number.isInteger(month)&&1<=month&&month<=12,"Argument.Month","Month out of range: %d",month),(0,assert_1.default)(Number.isInteger(day)&&1<=day&&day<=daysInMonth(year,month),"Argument.Day","day out of range"),(0,assert_1.default)(Number.isInteger(weekDay)&&0<=weekDay&&weekDay<=6,"Argument.WeekDay","weekDay out of range: %d",weekDay);day=new TimeStruct({year:year,month:month,day:day}),weekDay-=weekDayNoLeapSecs(day.unixMillis);return weekDay<0&&(weekDay+=7),(0,assert_1.default)(day.components.day+weekDay<=daysInMonth(year,month),"NotFound","The given month has no such weekday"),day.components.day+weekDay}function getWeekOneDayOfYear(year){var result=weekDayOnOrAfter(year,1,1,WeekDay.Monday)-1;return 3<result&&(result-=7)<0&&(result+=exports.daysInYear(year-1)),result}function unixToTimeNoLeapSecs(unixMillis){(0,assert_1.default)(Number.isInteger(unixMillis),"Argument.UnixMillis","unixMillis should be an integer number");var year,month,temp=unixMillis,result={year:0,month:0,day:0,hour:0,minute:0,second:0,milli:0};if(0<=unixMillis){for(result.milli=math.positiveModulo(temp,1e3),temp=Math.floor(temp/1e3),result.second=math.positiveModulo(temp,60),temp=Math.floor(temp/60),result.minute=math.positiveModulo(temp,60),temp=Math.floor(temp/60),result.hour=math.positiveModulo(temp,24),temp=Math.floor(temp/24),year=1970;temp>=daysInYear(year);)temp-=daysInYear(year),year++;for(result.year=year,month=1;temp>=daysInMonth(year,month);)temp-=daysInMonth(year,month),month++;result.month=month,result.day=temp+1}else{for(result.milli=math.positiveModulo(temp,1e3),temp=Math.floor(temp/1e3),result.second=math.positiveModulo(temp,60),temp=Math.floor(temp/60),result.minute=math.positiveModulo(temp,60),temp=Math.floor(temp/60),result.hour=math.positiveModulo(temp,24),temp=Math.floor(temp/24),year=1969;temp<-daysInYear(year);)temp+=daysInYear(year),year--;for(result.year=year,month=12;temp<-daysInMonth(year,month);)temp+=daysInMonth(year,month),month--;result.month=month,result.day=temp+1+daysInMonth(year,month)}return result}function normalizeTimeComponents(components){components={year:"number"==typeof components.year?components.year:1970,month:"number"==typeof components.month?components.month:1,day:"number"==typeof components.day?components.day:1,hour:"number"==typeof components.hour?components.hour:0,minute:"number"==typeof components.minute?components.minute:0,second:"number"==typeof components.second?components.second:0,milli:"number"==typeof components.milli?components.milli:0};return(0,assert_1.default)(Number.isInteger(components.year),"Argument.Year","invalid year %d",components.year),(0,assert_1.default)(Number.isInteger(components.month)&&1<=components.month&&components.month<=12,"Argument.Month","invalid month %d",components.month),(0,assert_1.default)(Number.isInteger(components.day)&&1<=components.day&&components.day<=daysInMonth(components.year,components.month),"Argument.Day","invalid day %d",components.day),(0,assert_1.default)(Number.isInteger(components.hour)&&0<=components.hour&&components.hour<=23,"Argument.Hour","invalid hour %d",components.hour),(0,assert_1.default)(Number.isInteger(components.minute)&&0<=components.minute&&components.minute<=59,"Argument.Minute","invalid minute %d",components.minute),(0,assert_1.default)(Number.isInteger(components.second)&&0<=components.second&&components.second<=59,"Argument.Second","invalid second %d",components.second),(0,assert_1.default)(Number.isInteger(components.milli)&&0<=components.milli&&components.milli<=999,"Argument.Milli","invalid milli %d",components.milli),components}function timeToUnixNoLeapSecs(a,month,day,hour,minute,second,milli){month=normalizeTimeComponents("number"==typeof a?{year:a,month:month,day:day,hour:hour,minute:minute,second:second,milli:milli}:a);return month.milli+1e3*(month.second+60*month.minute+3600*month.hour+86400*dayOfYear(month.year,month.month,month.day)+31536e3*(month.year-1970)+86400*Math.floor((month.year-1969)/4)-86400*Math.floor((month.year-1901)/100)+86400*Math.floor((month.year-1900+299)/400))}function weekDayNoLeapSecs(unixMillis){(0,assert_1.default)(Number.isInteger(unixMillis),"Argument.UnixMillis","unixMillis should be an integer number");var epochDay=WeekDay.Thursday,unixMillis=Math.floor(unixMillis/1e3/86400);return math.positiveModulo(epochDay+unixMillis,7)}!function(WeekDay){WeekDay[WeekDay.Sunday=0]="Sunday",WeekDay[WeekDay.Monday=1]="Monday",WeekDay[WeekDay.Tuesday=2]="Tuesday",WeekDay[WeekDay.Wednesday=3]="Wednesday",WeekDay[WeekDay.Thursday=4]="Thursday",WeekDay[WeekDay.Friday=5]="Friday",WeekDay[WeekDay.Saturday=6]="Saturday"}(WeekDay||(exports.WeekDay=WeekDay={})),function(TimeUnit){TimeUnit[TimeUnit.Millisecond=0]="Millisecond",TimeUnit[TimeUnit.Second=1]="Second",TimeUnit[TimeUnit.Minute=2]="Minute",TimeUnit[TimeUnit.Hour=3]="Hour",TimeUnit[TimeUnit.Day=4]="Day",TimeUnit[TimeUnit.Week=5]="Week",TimeUnit[TimeUnit.Month=6]="Month",TimeUnit[TimeUnit.Year=7]="Year",TimeUnit[TimeUnit.MAX=8]="MAX"}(TimeUnit||(exports.TimeUnit=TimeUnit={})),exports.timeUnitToMilliseconds=function(unit){switch(unit){case TimeUnit.Millisecond:return 1;case TimeUnit.Second:return 1e3;case TimeUnit.Minute:return 6e4;case TimeUnit.Hour:return 36e5;case TimeUnit.Day:return 864e5;case TimeUnit.Week:return 6048e5;case TimeUnit.Month:return 2592e6;case TimeUnit.Year:return 31104e6;default:return(0,error_1.throwError)("Argument.Unit","unknown time unit %d",unit)}},exports.timeUnitToString=timeUnitToString,exports.stringToTimeUnit=function(s){for(var trimmed=s.trim().toLowerCase(),i=0;i<TimeUnit.MAX;++i){var other=timeUnitToString(i,1);if(other===trimmed||other+"s"===trimmed)return i}return(0,error_1.throwError)("Argument.S","Unknown time unit string '%s'",s)},exports.isLeapYear=isLeapYear,exports.daysInYear=daysInYear,exports.daysInMonth=daysInMonth,exports.dayOfYear=dayOfYear,exports.lastWeekDayOfMonth=lastWeekDayOfMonth,exports.firstWeekDayOfMonth=firstWeekDayOfMonth,exports.nthWeekDayOfMonth=function(year,month,weekDay,dayInstance){(0,assert_1.default)(Number.isInteger(year),"Argument.Year","Year out of range: %d",year),(0,assert_1.default)(Number.isInteger(month)&&1<=month&&month<=12,"Argument.Month","Month out of range: %d",month),(0,assert_1.default)(Number.isInteger(weekDay)&&0<=weekDay&&weekDay<=6,"Argument.WeekDay","weekDay out of range: %d",weekDay),(0,assert_1.default)(Number.isInteger(dayInstance)&&1<=dayInstance&&dayInstance<=5,"Argument.DayInstance","dayInstance out of range: %d",dayInstance);var beginOfMonth=new TimeStruct({year:year,month:month,day:1});return(weekDay=weekDay-weekDayNoLeapSecs(beginOfMonth.unixMillis))<0&&(weekDay+=7),(0,assert_1.default)(beginOfMonth.components.day+(weekDay+=7*(dayInstance-1))<=daysInMonth(year,month),"NotFound","The given month has no such day"),beginOfMonth.components.day+weekDay},exports.weekDayOnOrAfter=weekDayOnOrAfter,exports.weekDayOnOrBefore=function(year,month,day,weekDay){return(0,assert_1.default)(Number.isInteger(year),"Argument.Year","Year out of range: %d",year),(0,assert_1.default)(Number.isInteger(month)&&1<=month&&month<=12,"Argument.Month","Month out of range: %d",month),(0,assert_1.default)(Number.isInteger(day)&&1<=day&&day<=daysInMonth(year,month),"Argument.Day","day out of range"),(0,assert_1.default)(Number.isInteger(weekDay)&&0<=weekDay&&weekDay<=6,"Argument.WeekDay","weekDay out of range: %d",weekDay),year=new TimeStruct({year:year,month:month,day:day}),0<(month=weekDay-weekDayNoLeapSecs(year.unixMillis))&&(month-=7),(0,assert_1.default)(1<=year.components.day+month,"NotFound","The given month has no such weekday"),year.components.day+month},exports.weekOfMonth=function weekOfMonth(year,month,day){(0,assert_1.default)(Number.isInteger(day)&&1<=day&&day<=daysInMonth(year,month),"Argument.Day","day out of range");var lastMonday,firstThursday=firstWeekDayOfMonth(year,month,WeekDay.Thursday),firstMonday=firstWeekDayOfMonth(year,month,WeekDay.Monday);return day<firstMonday?firstThursday<firstMonday?1:1<month?weekOfMonth(year,month-1,daysInMonth(year,month-1)):weekOfMonth(year-1,12,31):(lastMonday=lastWeekDayOfMonth(year,month,WeekDay.Monday),year=lastWeekDayOfMonth(year,month,WeekDay.Thursday),lastMonday<=day&&year<lastMonday?1:(month=Math.floor((day-firstMonday)/7)+1,firstThursday<4&&(month+=1),month))},exports.calendarWeekInMonth=function(year,month,day,weekStartDay){return void 0===weekStartDay&&(weekStartDay=WeekDay.Monday),(0,assert_1.default)(Number.isInteger(day)&&1<=day&&day<=daysInMonth(year,month),"Argument.Day","day out of range"),year=weekDayOnOrAfter(year,month,1,weekStartDay),month=Math.floor((day-year+7)/7),1<year&&month++,month},exports.weekDayInstanceInMonth=function(year,month,day){return(day-firstWeekDayOfMonth(year,month,weekDayNoLeapSecs(new TimeStruct({year:year,month:month,day:day}).unixMillis)))/7+1},exports.weekNumber=function weekNumber(year,month,day){month=dayOfYear(year,month,day);if(month>=dayOfYear(year,12,29)&&4<(day=getWeekOneDayOfYear(year+1))&&day<=month)return 1;var weekTwo,day=getWeekOneDayOfYear(year);return 4<day?month<(weekTwo=day+7-daysInYear(year-1))?1:Math.floor((month-weekTwo)/7)+2:month<day?weekNumber(year-1,12,31):Math.floor((month-day)/7)+1},exports.unixToTimeNoLeapSecs=unixToTimeNoLeapSecs,exports.timeToUnixNoLeapSecs=timeToUnixNoLeapSecs,exports.weekDayNoLeapSecs=weekDayNoLeapSecs,exports.secondOfDay=function(hour,minute,second){return(0,assert_1.default)(Number.isInteger(hour)&&0<=hour&&hour<=23,"Argument.Hour","invalid hour %d",hour),(0,assert_1.default)(Number.isInteger(minute)&&0<=minute&&minute<=59,"Argument.Minute","invalid minute %d",minute),(0,assert_1.default)(Number.isInteger(second)&&0<=second&&second<=61,"Argument.Second","invalid second %d",second),60*(60*hour+minute)+second};var TimeStruct=function(){function TimeStruct(a){"number"==typeof a?((0,assert_1.default)(Number.isInteger(a),"Argument.UnixMillis","invalid unix millis %d",a),this._unixMillis=a):((0,assert_1.default)("object"==typeof a&&null!==a,"Argument.Components","invalid components object"),this._components=normalizeTimeComponents(a))}return TimeStruct.fromComponents=function(year,month,day,hour,minute,second,milli){return new TimeStruct({year:year,month:month,day:day,hour:hour,minute:minute,second:second,milli:milli})},TimeStruct.fromUnix=function(unixMillis){return new TimeStruct(unixMillis)},TimeStruct.fromDate=function(d,df){return df===javascript_1.DateFunctions.Get?new TimeStruct({year:d.getFullYear(),month:d.getMonth()+1,day:d.getDate(),hour:d.getHours(),minute:d.getMinutes(),second:d.getSeconds(),milli:d.getMilliseconds()}):new TimeStruct({year:d.getUTCFullYear(),month:d.getUTCMonth()+1,day:d.getUTCDate(),hour:d.getUTCHours(),minute:d.getUTCMinutes(),second:d.getUTCSeconds(),milli:d.getUTCMilliseconds()})},TimeStruct.fromString=function(s){try{var dateAndTime,year=1970,month=1,day=1,hour=0,minute=0,second=0,fractionMillis=0,lastUnit=TimeUnit.Year,split=s.trim().split(".");if((0,assert_1.default)(1<=split.length&&split.length<=2,"Argument.S","Empty string or multiple dots."),-1===s.indexOf("-")?((0,assert_1.default)(split[0].match(/^((\d)+)|(\d\d\d\d\d\d\d\dT(\d)+)$/),"Argument.S","ISO string in basic notation may only contain numbers before the fractional part"),split[0]=split[0].replace("T",""),(0,assert_1.default)(-1!==[4,8,10,12,14].indexOf(split[0].length),"Argument.S","Padding or required components are missing. Note that YYYYMM is not valid per ISO 8601"),4<=split[0].length&&(year=parseInt(split[0].substr(0,4),10),lastUnit=TimeUnit.Year),8<=split[0].length&&(month=parseInt(split[0].substr(4,2),10),day=parseInt(split[0].substr(6,2),10),lastUnit=TimeUnit.Day),10<=split[0].length&&(hour=parseInt(split[0].substr(8,2),10),lastUnit=TimeUnit.Hour),12<=split[0].length&&(minute=parseInt(split[0].substr(10,2),10),lastUnit=TimeUnit.Minute),14<=split[0].length&&(second=parseInt(split[0].substr(12,2),10),lastUnit=TimeUnit.Second)):((0,assert_1.default)(split[0].match(/^\d\d\d\d(-\d\d-\d\d((T)?\d\d(\:\d\d(:\d\d)?)?)?)?$/),"Argument.S","Invalid ISO string"),dateAndTime=[],dateAndTime=-1!==s.indexOf("T")?split[0].split("T"):10<s.length?[split[0].substr(0,10),split[0].substr(10)]:[split[0],""],(0,assert_1.default)(-1!==[4,10].indexOf(dateAndTime[0].length),"Argument.S","Padding or required components are missing. Note that YYYYMM is not valid per ISO 8601"),4<=dateAndTime[0].length&&(year=parseInt(dateAndTime[0].substr(0,4),10),lastUnit=TimeUnit.Year),10<=dateAndTime[0].length&&(month=parseInt(dateAndTime[0].substr(5,2),10),day=parseInt(dateAndTime[0].substr(8,2),10),lastUnit=TimeUnit.Day),2<=dateAndTime[1].length&&(hour=parseInt(dateAndTime[1].substr(0,2),10),lastUnit=TimeUnit.Hour),5<=dateAndTime[1].length&&(minute=parseInt(dateAndTime[1].substr(3,2),10),lastUnit=TimeUnit.Minute),8<=dateAndTime[1].length&&(second=parseInt(dateAndTime[1].substr(6,2),10),lastUnit=TimeUnit.Second)),1<split.length&&0<split[1].length){var fraction=parseFloat("0."+split[1]);switch(lastUnit){case TimeUnit.Year:fractionMillis=864e5*daysInYear(year)*fraction;break;case TimeUnit.Day:fractionMillis=864e5*fraction;break;case TimeUnit.Hour:fractionMillis=36e5*fraction;break;case TimeUnit.Minute:fractionMillis=6e4*fraction;break;case TimeUnit.Second:fractionMillis=1e3*fraction}}var unixMillis=timeToUnixNoLeapSecs({year:year=math.roundSym(year),month:month=math.roundSym(month),day:day=math.roundSym(day),hour:hour=math.roundSym(hour),minute:minute=math.roundSym(minute),second:second=math.roundSym(second)});return new TimeStruct(math.roundSym(unixMillis+fractionMillis))}catch(e){if((0,error_1.errorIs)(e,["Argument.S","Argument.Year","Argument.Month","Argument.Day","Argument.Hour","Argument.Minute","Argument.Second","Argument.Milli"]))return(0,error_1.throwError)("Argument.S",'Invalid ISO 8601 string: "%s": %s',s,e.message);throw e}},Object.defineProperty(TimeStruct.prototype,"unixMillis",{get:function(){return void 0===this._unixMillis&&(this._unixMillis=timeToUnixNoLeapSecs(this._components)),this._unixMillis},enumerable:!1,configurable:!0}),Object.defineProperty(TimeStruct.prototype,"components",{get:function(){return this._components||(this._components=unixToTimeNoLeapSecs(this._unixMillis)),this._components},enumerable:!1,configurable:!0}),Object.defineProperty(TimeStruct.prototype,"year",{get:function(){return this.components.year},enumerable:!1,configurable:!0}),Object.defineProperty(TimeStruct.prototype,"month",{get:function(){return this.components.month},enumerable:!1,configurable:!0}),Object.defineProperty(TimeStruct.prototype,"day",{get:function(){return this.components.day},enumerable:!1,configurable:!0}),Object.defineProperty(TimeStruct.prototype,"hour",{get:function(){return this.components.hour},enumerable:!1,configurable:!0}),Object.defineProperty(TimeStruct.prototype,"minute",{get:function(){return this.components.minute},enumerable:!1,configurable:!0}),Object.defineProperty(TimeStruct.prototype,"second",{get:function(){return this.components.second},enumerable:!1,configurable:!0}),Object.defineProperty(TimeStruct.prototype,"milli",{get:function(){return this.components.milli},enumerable:!1,configurable:!0}),TimeStruct.prototype.yearDay=function(){return dayOfYear(this.components.year,this.components.month,this.components.day)},TimeStruct.prototype.equals=function(other){return this.valueOf()===other.valueOf()},TimeStruct.prototype.valueOf=function(){return this.unixMillis},TimeStruct.prototype.clone=function(){return this._components?new TimeStruct(this._components):new TimeStruct(this._unixMillis)},TimeStruct.prototype.validate=function(){return!this._components||1<=this.components.month&&this.components.month<=12&&1<=this.components.day&&this.components.day<=daysInMonth(this.components.year,this.components.month)&&0<=this.components.hour&&this.components.hour<=23&&0<=this.components.minute&&this.components.minute<=59&&0<=this.components.second&&this.components.second<=59&&0<=this.components.milli&&this.components.milli<=999},TimeStruct.prototype.toString=function(){return strings.padLeft(this.components.year.toString(10),4,"0")+"-"+strings.padLeft(this.components.month.toString(10),2,"0")+"-"+strings.padLeft(this.components.day.toString(10),2,"0")+"T"+strings.padLeft(this.components.hour.toString(10),2,"0")+":"+strings.padLeft(this.components.minute.toString(10),2,"0")+":"+strings.padLeft(this.components.second.toString(10),2,"0")+"."+strings.padLeft(this.components.milli.toString(10),3,"0")},TimeStruct}();exports.TimeStruct=TimeStruct,exports.binaryInsertionIndex=function(arr,compare){var currentIndex,currentElement,minIndex=0,maxIndex=arr.length-1;if(!arr)return 0;if(0===arr.length)return 0;if(0<compare(arr[0]))return 0;if(compare(arr[maxIndex])<0)return maxIndex+1;for(;minIndex<=maxIndex;)if(compare(currentElement=arr[currentIndex=Math.floor((minIndex+maxIndex)/2)])<0)minIndex=currentIndex+1;else{if(!(0<compare(currentElement)))return currentIndex;maxIndex=currentIndex-1}return maxIndex}},{"./assert":1,"./error":5,"./javascript":8,"./math":10,"./strings":13}],3:[function(require,module,exports){Object.defineProperty(exports,"__esModule",{value:!0}),exports.isDateTime=exports.DateTime=exports.now=exports.nowUtc=exports.nowLocal=void 0;var assert_1=require("./assert"),basics=require("./basics"),basics_1=require("./basics"),duration_1=require("./duration"),error_1=require("./error"),format=require("./format"),javascript_1=require("./javascript"),math=require("./math"),parseFuncs=require("./parse"),timesource_1=require("./timesource"),timezone_1=require("./timezone"),tz_database_1=require("./tz-database");function convertToUtc(localTime,fromZone){return fromZone?(fromZone=fromZone.offsetForZone(localTime),new basics_1.TimeStruct(localTime.unixMillis-6e4*fromZone)):localTime.clone()}function convertFromUtc(utcTime,toZone){var offset;return toZone?(offset=toZone.offsetForUtc(utcTime),toZone.normalizeZoneTime(new basics_1.TimeStruct(utcTime.unixMillis+6e4*offset))):utcTime.clone()}exports.nowLocal=function(){return DateTime.nowLocal()},exports.nowUtc=function(){return DateTime.nowUtc()},exports.now=function(timeZone){return void 0===timeZone&&(timeZone=timezone_1.TimeZone.utc()),DateTime.now(timeZone)};var DateTime=function(){function DateTime(a1,a2,a3,h,m,s,ms,timeZone){switch(this.kind="DateTime",typeof a1){case"number":var year_1,month_1,day_1,hour_1,minute_1,second_1,milli_1;"number"!=typeof a2?((0,assert_1.default)(void 0===a3&&void 0===h&&void 0===m&&void 0===s&&void 0===ms&&void 0===timeZone,"Argument.A3","for unix timestamp datetime constructor, third through 8th argument must be undefined"),(0,assert_1.default)(null==a2||isTimeZone(a2),"Argument.TimeZone","DateTime.DateTime(): second arg should be a TimeZone object."),this._zone="object"==typeof a2&&isTimeZone(a2)?a2:void 0,unixMillis=(0,error_1.convertError)("Argument.UnixMillis",function(){return math.roundSym(a1)}),this._zone?this._zoneDate=this._zone.normalizeZoneTime(new basics_1.TimeStruct(unixMillis)):this._zoneDate=new basics_1.TimeStruct(unixMillis)):((0,assert_1.default)("number"==typeof a2,"Argument.Year","DateTime.DateTime(): Expect month to be a number."),(0,assert_1.default)("number"==typeof a3,"Argument.Month","DateTime.DateTime(): Expect day to be a number."),(0,assert_1.default)(null==timeZone||isTimeZone(timeZone),"Argument.TimeZone","DateTime.DateTime(): eighth arg should be a TimeZone object."),year_1=a1,month_1=a2,day_1=a3,hour_1="number"==typeof h?h:0,minute_1="number"==typeof m?m:0,second_1="number"==typeof s?s:0,milli_1="number"==typeof ms?ms:0,year_1=(0,error_1.convertError)("Argument.Year",function(){return math.roundSym(year_1)}),month_1=(0,error_1.convertError)("Argument.Month",function(){return math.roundSym(month_1)}),day_1=(0,error_1.convertError)("Argument.Day",function(){return math.roundSym(day_1)}),hour_1=(0,error_1.convertError)("Argument.Hour",function(){return math.roundSym(hour_1)}),minute_1=(0,error_1.convertError)("Argument.Minute",function(){return math.roundSym(minute_1)}),second_1=(0,error_1.convertError)("Argument.Second",function(){return math.roundSym(second_1)}),milli_1=(0,error_1.convertError)("Argument.Milli",function(){return math.roundSym(milli_1)}),unixMillis=new basics_1.TimeStruct({year:year_1,month:month_1,day:day_1,hour:hour_1,minute:minute_1,second:second_1,milli:milli_1}),this._zone="object"==typeof timeZone&&isTimeZone(timeZone)?timeZone:void 0,this._zone?this._zoneDate=this._zone.normalizeZoneTime(unixMillis):this._zoneDate=unixMillis);break;case"string":"string"==typeof a2?((0,assert_1.default)(void 0===h&&void 0===m&&void 0===s&&void 0===ms&&void 0===timeZone,"Argument.A4","first two arguments are a string, therefore the fourth through 8th argument must be undefined"),(0,assert_1.default)(null==a3||isTimeZone(a3),"Argument.TimeZone","DateTime.DateTime(): third arg should be a TimeZone object."),unixMillis=void 0,"object"==typeof a3&&isTimeZone(a3)&&(unixMillis=a3),unixMillis=parseFuncs.parse(a1,a2,unixMillis),this._zoneDate=unixMillis.time,this._zone=unixMillis.zone):((0,assert_1.default)(void 0===a3&&void 0===h&&void 0===m&&void 0===s&&void 0===ms&&void 0===timeZone,"Argument.A3","first arguments is a string and the second is not, therefore the third through 8th argument must be undefined"),(0,assert_1.default)(null==a2||isTimeZone(a2),"Argument.TimeZone","DateTime.DateTime(): second arg should be a TimeZone object."),unixMillis=a1.trim(),unixMillis=DateTime._splitDateFromTimeZone(unixMillis),(0,assert_1.default)(2===unixMillis.length,"Argument.S",'Invalid date string given: "'+a1+'"'),isTimeZone(a2)?this._zone=a2:this._zone=unixMillis[1].trim()?timezone_1.TimeZone.zone(unixMillis[1]):void 0,this._zoneDate=basics_1.TimeStruct.fromString(unixMillis[0]),this._zone&&(this._zoneDate=this._zone.normalizeZoneTime(this._zoneDate)));break;case"object":var unixMillis,dk;a1 instanceof Date?((0,assert_1.default)(void 0===h&&void 0===m&&void 0===s&&void 0===ms&&void 0===timeZone,"Argument.A4","first argument is a Date, therefore the fourth through 8th argument must be undefined"),(0,assert_1.default)("number"==typeof a2&&(a2===javascript_1.DateFunctions.Get||a2===javascript_1.DateFunctions.GetUTC),"Argument.GetFuncs","DateTime.DateTime(): for a Date object a DateFunctions must be passed as second argument"),(0,assert_1.default)(null==a3||isTimeZone(a3),"Argument.TimeZone","DateTime.DateTime(): third arg should be a TimeZone object."),unixMillis=a1,dk=a2,this._zone=a3||void 0,this._zoneDate=basics_1.TimeStruct.fromDate(unixMillis,dk),this._zone&&(this._zoneDate=this._zone.normalizeZoneTime(this._zoneDate))):((0,assert_1.default)(void 0===a3&&void 0===h&&void 0===m&&void 0===s&&void 0===ms&&void 0===timeZone,"Argument.A3","first argument is a TimeStruct, therefore the third through 8th argument must be undefined"),(0,assert_1.default)(null==a2||isTimeZone(a2),"Argument.TimeZone","expect a TimeZone as second argument"),this._zoneDate=a1.clone(),this._zone=a2||void 0);break;case"undefined":(0,assert_1.default)(void 0===a2&&void 0===a3&&void 0===h&&void 0===m&&void 0===s&&void 0===ms&&void 0===timeZone,"Argument.A2","first argument is undefined, therefore the rest must also be undefined"),this._zone=timezone_1.TimeZone.local(),this._utcDate=basics_1.TimeStruct.fromDate(DateTime.timeSource.now(),javascript_1.DateFunctions.GetUTC);break;default:throw(0,error_1.error)("Argument.A1","DateTime.DateTime(): unexpected first argument type.")}}return Object.defineProperty(DateTime.prototype,"utcDate",{get:function(){return this._utcDate||(this._utcDate=convertToUtc(this._zoneDate,this._zone)),this._utcDate},set:function(value){this._utcDate=value,this._zoneDate=void 0},enumerable:!1,configurable:!0}),Object.defineProperty(DateTime.prototype,"zoneDate",{get:function(){return this._zoneDate||(this._zoneDate=convertFromUtc(this._utcDate,this._zone)),this._zoneDate},set:function(value){this._zoneDate=value,this._utcDate=void 0},enumerable:!1,configurable:!0}),DateTime.nowLocal=function(){var n=DateTime.timeSource.now();return new DateTime(n,javascript_1.DateFunctions.Get,timezone_1.TimeZone.local())},DateTime.nowUtc=function(){return new DateTime(DateTime.timeSource.now(),javascript_1.DateFunctions.GetUTC,timezone_1.TimeZone.utc())},DateTime.now=function(timeZone){return void 0===timeZone&&(timeZone=timezone_1.TimeZone.utc()),new DateTime(DateTime.timeSource.now(),javascript_1.DateFunctions.GetUTC,timezone_1.TimeZone.utc()).toZone(timeZone)},DateTime.fromExcel=function(n,timeZone){return(0,assert_1.default)(Number.isFinite(n),"Argument.N","invalid number"),new DateTime(Math.round(24*(n-25569)*60*60*1e3),timeZone)},DateTime.exists=function(year,month,day,hour,minute,second,millisecond,zone,allowPre1970){if(void 0===month&&(month=1),void 0===day&&(day=1),void 0===hour&&(hour=0),void 0===minute&&(minute=0),void 0===second&&(second=0),void 0===millisecond&&(millisecond=0),void 0===allowPre1970&&(allowPre1970=!1),!(isFinite(year)&&isFinite(month)&&isFinite(day)&&isFinite(hour)&&isFinite(minute)&&isFinite(second)&&isFinite(millisecond)))return!1;if(!allowPre1970&&year<1970)return!1;try{var dt=new DateTime(year,month,day,hour,minute,second,millisecond,zone);return year===dt.year()&&month===dt.month()&&day===dt.day()&&hour===dt.hour()&&minute===dt.minute()&&second===dt.second()&&millisecond===dt.millisecond()}catch(e){return!1}},DateTime.prototype.clone=function(){return new DateTime(this.zoneDate,this._zone)},DateTime.prototype.zone=function(){return this._zone},DateTime.prototype.zoneAbbreviation=function(dstDependent){return void 0===dstDependent&&(dstDependent=!0),this._zone?this._zone.abbreviationForUtc(this.utcDate,dstDependent):""},DateTime.prototype.offset=function(){return Math.round((this.zoneDate.unixMillis-this.utcDate.unixMillis)/6e4)},DateTime.prototype.offsetDuration=function(){return duration_1.Duration.milliseconds(Math.round(this.zoneDate.unixMillis-this.utcDate.unixMillis))},DateTime.prototype.standardOffsetDuration=function(){return this._zone?duration_1.Duration.minutes(this._zone.standardOffsetForUtc(this.utcDate)):duration_1.Duration.minutes(0)},DateTime.prototype.year=function(){return this.zoneDate.components.year},DateTime.prototype.month=function(){return this.zoneDate.components.month},DateTime.prototype.day=function(){return this.zoneDate.components.day},DateTime.prototype.hour=function(){return this.zoneDate.components.hour},DateTime.prototype.minute=function(){return this.zoneDate.components.minute},DateTime.prototype.second=function(){return this.zoneDate.components.second},DateTime.prototype.millisecond=function(){return this.zoneDate.components.milli},DateTime.prototype.weekDay=function(){return basics.weekDayNoLeapSecs(this.zoneDate.unixMillis)},DateTime.prototype.dayOfYear=function(){return this.zoneDate.yearDay()},DateTime.prototype.weekNumber=function(){return basics.weekNumber(this.year(),this.month(),this.day())},DateTime.prototype.weekOfMonth=function(){return basics.weekOfMonth(this.year(),this.month(),this.day())},DateTime.prototype.secondOfDay=function(){return basics.secondOfDay(this.hour(),this.minute(),this.second())},DateTime.prototype.unixUtcMillis=function(){return this.utcDate.unixMillis},DateTime.prototype.utcYear=function(){return this.utcDate.components.year},DateTime.prototype.utcMonth=function(){return this.utcDate.components.month},DateTime.prototype.utcDay=function(){return this.utcDate.components.day},DateTime.prototype.utcHour=function(){return this.utcDate.components.hour},DateTime.prototype.utcMinute=function(){return this.utcDate.components.minute},DateTime.prototype.utcSecond=function(){return this.utcDate.components.second},DateTime.prototype.utcDayOfYear=function(){return basics.dayOfYear(this.utcYear(),this.utcMonth(),this.utcDay())},DateTime.prototype.utcMillisecond=function(){return this.utcDate.components.milli},DateTime.prototype.utcWeekDay=function(){return basics.weekDayNoLeapSecs(this.utcDate.unixMillis)},DateTime.prototype.utcWeekNumber=function(){return basics.weekNumber(this.utcYear(),this.utcMonth(),this.utcDay())},DateTime.prototype.utcWeekOfMonth=function(){return basics.weekOfMonth(this.utcYear(),this.utcMonth(),this.utcDay())},DateTime.prototype.utcSecondOfDay=function(){return basics.secondOfDay(this.utcHour(),this.utcMinute(),this.utcSecond())},DateTime.prototype.withZone=function(zone){return new DateTime(this.year(),this.month(),this.day(),this.hour(),this.minute(),this.second(),this.millisecond(),zone)},DateTime.prototype.convert=function(zone){if(zone){if(!this._zone)return(0,error_1.throwError)("UnawareToAwareConversion","DateTime.toZone(): Cannot convert unaware date to an aware date");this._zone.equals(zone)?this._zone=zone:(this._utcDate||(this._utcDate=convertToUtc(this._zoneDate,this._zone)),this._zone=zone,this._zoneDate=void 0)}else{if(!this._zone)return this;this._zoneDate||(this._zoneDate=convertFromUtc(this._utcDate,this._zone)),this._zone=void 0,this._utcDate=void 0}return this},DateTime.prototype.toZone=function(zone){var result;return zone?((0,assert_1.default)(this._zone,"UnawareToAwareConversion","DateTime.toZone(): Cannot convert unaware date to an aware date"),(result=new DateTime).utcDate=this.utcDate,result._zone=zone,result):new DateTime(this.zoneDate,void 0)},DateTime.prototype.toDate=function(){return new Date(this.year(),this.month()-1,this.day(),this.hour(),this.minute(),this.second(),this.millisecond())},DateTime.prototype.toExcel=function(timeZone){var dt=this,timeZone=60*(dt=!timeZone||this._zone&&timeZone.equals(this._zone)?dt:this.toZone(timeZone)).offset()*1e3,dt=dt.unixUtcMillis();return this._unixTimeStampToExcel(dt+timeZone)},DateTime.prototype.toUtcExcel=function(){var unixTimestamp=this.unixUtcMillis();return this._unixTimeStampToExcel(unixTimestamp)},DateTime.prototype._unixTimeStampToExcel=function(n){return Math.round((n/864e5+25569)/(1/864e5))*(1/864e5)},DateTime.prototype.add=function(a1,unit){var amount,duration;return duration="object"==typeof a1?(amount=(duration=a1).amount(),duration.unit()):(amount=a1,unit),new DateTime(this._addToTimeStruct(this.utcDate,amount,duration),timezone_1.TimeZone.utc()).toZone(this._zone)},DateTime.prototype.addLocal=function(a1,unit){duration="object"==typeof a1?(amount=(duration=a1).amount(),duration.unit()):(amount=a1,unit);var amount,duration,a1=this._addToTimeStruct(this.zoneDate,amount,duration);return this._zone?(unit=0<=amount?tz_database_1.NormalizeOption.Up:tz_database_1.NormalizeOption.Down,new DateTime(this._zone.normalizeZoneTime(a1,unit),this._zone)):new DateTime(a1,void 0)},DateTime.prototype._addToTimeStruct=function(tm,amount,unit){var year,month,day,hour,minute,second,milli;switch((0,assert_1.default)(Number.isFinite(amount),"Argument.Amount","amount must be a finite number"),unit){case basics_1.TimeUnit.Millisecond:return new basics_1.TimeStruct(math.roundSym(tm.unixMillis+amount));case basics_1.TimeUnit.Second:return new basics_1.TimeStruct(math.roundSym(tm.unixMillis+1e3*amount));case basics_1.TimeUnit.Minute:return new basics_1.TimeStruct(math.roundSym(tm.unixMillis+6e4*amount));case basics_1.TimeUnit.Hour:return new basics_1.TimeStruct(math.roundSym(tm.unixMillis+36e5*amount));case basics_1.TimeUnit.Day:return new basics_1.TimeStruct(math.roundSym(tm.unixMillis+864e5*amount));case basics_1.TimeUnit.Week:return new basics_1.TimeStruct(math.roundSym(tm.unixMillis+7*amount*864e5));case basics_1.TimeUnit.Month:return(0,assert_1.default)(math.isInt(amount),"Argument.Amount","Cannot add/sub a non-integer amount of months"),month=0<=amount?(year=tm.components.year+Math.ceil((amount-(12-tm.components.month))/12),1+math.positiveModulo(tm.components.month-1+Math.floor(amount),12)):(year=tm.components.year+Math.floor((amount+(tm.components.month-1))/12),1+math.positiveModulo(tm.components.month-1+Math.ceil(amount),12)),day=Math.min(tm.components.day,basics.daysInMonth(year,month)),hour=tm.components.hour,minute=tm.components.minute,second=tm.components.second,milli=tm.components.milli,new basics_1.TimeStruct({year:year,month:month,day:day,hour:hour,minute:minute,second:second,milli:milli});case basics_1.TimeUnit.Year:return(0,assert_1.default)(math.isInt(amount),"Argument.Amount","Cannot add/sub a non-integer amount of years"),year=tm.components.year+amount,month=tm.components.month,day=Math.min(tm.components.day,basics.daysInMonth(year,month)),hour=tm.components.hour,minute=tm.components.minute,second=tm.components.second,milli=tm.components.milli,new basics_1.TimeStruct({year:year,month:month,day:day,hour:hour,minute:minute,second:second,milli:milli});default:return(0,error_1.throwError)("Argument.Unit","invalid time unit")}},DateTime.prototype.sub=function(a1,unit){return"number"==typeof a1?this.add(-1*a1,unit):this.add(a1.multiply(-1))},DateTime.prototype.subLocal=function(a1,unit){return"number"==typeof a1?this.addLocal(-1*a1,unit):this.addLocal(a1.multiply(-1))},DateTime.prototype.diff=function(other){return new duration_1.Duration(this.utcDate.unixMillis-other.utcDate.unixMillis)},DateTime.prototype.startOfDay=function(){return new DateTime(this.year(),this.month(),this.day(),0,0,0,0,this.zone())},DateTime.prototype.startOfMonth=function(){return new DateTime(this.year(),this.month(),1,0,0,0,0,this.zone())},DateTime.prototype.startOfYear=function(){return new DateTime(this.year(),1,1,0,0,0,0,this.zone())},DateTime.prototype.lessThan=function(other){return this.utcDate.unixMillis<other.utcDate.unixMillis},DateTime.prototype.lessEqual=function(other){return this.utcDate.unixMillis<=other.utcDate.unixMillis},DateTime.prototype.equals=function(other){return this.utcDate.equals(other.utcDate)},DateTime.prototype.identical=function(other){return!(!this.zoneDate.equals(other.zoneDate)||!this._zone!=!other._zone||!(!this._zone&&!other._zone||this._zone&&other._zone&&this._zone.identical(other._zone)))},DateTime.prototype.greaterThan=function(other){return this.utcDate.unixMillis>other.utcDate.unixMillis},DateTime.prototype.greaterEqual=function(other){return this.utcDate.unixMillis>=other.utcDate.unixMillis},DateTime.prototype.min=function(other){return(this.lessThan(other)?this:other).clone()},DateTime.prototype.max=function(other){return(this.greaterThan(other)?this:other).clone()},DateTime.prototype.toIsoString=function(){var s=this.zoneDate.toString();return this._zone?s+timezone_1.TimeZone.offsetToString(this.offset()):s},DateTime.prototype.toUtcIsoString=function(){return(this._zone?this.toZone(timezone_1.TimeZone.utc()):this.withZone(timezone_1.TimeZone.utc())).format("yyyy-MM-ddTHH:mm:ss.SSSZZZZZ")},DateTime.prototype.format=function(formatString,locale){return format.format(this.zoneDate,this.utcDate,this._zone,formatString,locale)},DateTime.parse=function(s,format,zone,locale,allowTrailing){s=parseFuncs.parse(s,format,zone,allowTrailing||!1,locale);try{return new DateTime(s.time,s.zone)}catch(e){throw e=(0,error_1.errorIs)(e,"InvalidTimeZoneData")?e:(0,error_1.error)("ParseError",e.message)}},DateTime.prototype.toString=function(){var s=this.zoneDate.toString();return this._zone?this._zone.kind()!==timezone_1.TimeZoneKind.Offset?s+" "+this._zone.toString():s+this._zone.toString():s},DateTime.prototype.valueOf=function(){return this.unixUtcMillis()},DateTime.prototype.toUtcString=function(){return this.utcDate.toString()},DateTime._splitDateFromTimeZone=function(s){var trimmed=s.trim(),result=["",""],index=trimmed.lastIndexOf("without DST");return-1<index?((s=DateTime._splitDateFromTimeZone(s.slice(0,index-1)))[1]+=" without DST",s):(-1<(index=trimmed.lastIndexOf(" "))?(result[0]=trimmed.substr(0,index),result[1]=trimmed.substr(index+1)):-1<(index=trimmed.lastIndexOf("Z"))?(result[0]=trimmed.substr(0,index),result[1]=trimmed.substr(index,1)):-1<(index=trimmed.lastIndexOf("+"))||-1<(index=(index=trimmed.lastIndexOf("-"))<8?-1:index)?(result[0]=trimmed.substr(0,index),result[1]=trimmed.substr(index)):result[0]=trimmed,result)},DateTime.timeSource=new timesource_1.RealTimeSource,DateTime}();function isTimeZone(a){return!(!a||"object"!=typeof a||"function"!=typeof a.normalizeZoneTime||"function"!=typeof a.abbreviationForUtc||"function"!=typeof a.standardOffsetForUtc||"function"!=typeof a.identical||"function"!=typeof a.equals||"function"!=typeof a.kind||"function"!=typeof a.clone)}exports.DateTime=DateTime,exports.isDateTime=function(value){return"object"==typeof value&&null!==value&&"DateTime"===value.kind}},{"./assert":1,"./basics":2,"./duration":4,"./error":5,"./format":6,"./javascript":8,"./math":10,"./parse":11,"./timesource":14,"./timezone":15,"./tz-database":17}],4:[function(require,module,exports){Object.defineProperty(exports,"__esModule",{value:!0}),exports.isDuration=exports.Duration=exports.milliseconds=exports.seconds=exports.minutes=exports.hours=exports.days=exports.months=exports.years=void 0;var assert_1=require("./assert"),basics_1=require("./basics"),basics=require("./basics"),strings=require("./strings");exports.years=function(n){return Duration.years(n)},exports.months=function(n){return Duration.months(n)},exports.days=function(n){return Duration.days(n)},exports.hours=function(n){return Duration.hours(n)},exports.minutes=function(n){return Duration.minutes(n)},exports.seconds=function(n){return Duration.seconds(n)},exports.milliseconds=function(n){return Duration.milliseconds(n)};var Duration=function(){function Duration(i1,unit){var s,trimmed,hours_1,minutes_1,milliseconds_1,seconds_1,parts,sign,amount;this.kind="Duration","number"==typeof i1?(amount=i1,(0,assert_1.default)(Number.isFinite(amount),"Argument.Amount","amount should be finite: %d",amount),this._amount=amount,this._unit="number"==typeof unit?unit:basics_1.TimeUnit.Millisecond,(0,assert_1.default)(Number.isInteger(this._unit)&&0<=this._unit&&this._unit<basics_1.TimeUnit.MAX,"Argument.Unit","Invalid time unit %d",this._unit)):"string"==typeof i1?(trimmed=(s=i1).trim()).match(/^-?\d\d?(:\d\d?(:\d\d?(.\d\d?\d?)?)?)?$/)?(sign=1,milliseconds_1=seconds_1=minutes_1=hours_1=0,parts=trimmed.split(":"),(0,assert_1.default)(0<parts.length&&parts.length<4,"Argument.S",'Not a proper time duration string: "'+trimmed+'"'),"-"===trimmed.charAt(0)&&(sign=-1,parts[0]=parts[0].substr(1)),0<parts.length&&(hours_1=+parts[0]),1<parts.length&&(minutes_1=+parts[1]),2<parts.length&&(seconds_1=+(parts=parts[2].split("."))[0],1<parts.length)&&(milliseconds_1=+strings.padRight(parts[1],3,"0")),parts=sign*Math.round(milliseconds_1+1e3*seconds_1+6e4*minutes_1+36e5*hours_1),this._unit=0!==milliseconds_1?basics_1.TimeUnit.Millisecond:0!==seconds_1?basics_1.TimeUnit.Second:0!==minutes_1?basics_1.TimeUnit.Minute:0!==hours_1?basics_1.TimeUnit.Hour:basics_1.TimeUnit.Millisecond,this._amount=parts/basics.timeUnitToMilliseconds(this._unit)):(sign=trimmed.toLowerCase().split(" "),(0,assert_1.default)(2===sign.length,"Argument.S","Invalid time string '%s'",s),amount=parseFloat(sign[0]),(0,assert_1.default)(Number.isFinite(amount),"Argument.S","Invalid time string '%s', cannot parse amount",s),this._amount=amount,this._unit=basics.stringToTimeUnit(sign[1])):void 0===i1&&void 0===unit?(this._amount=0,this._unit=basics_1.TimeUnit.Millisecond):(0,assert_1.default)(!1,"Argument.Amount","invalid constructor arguments")}return Duration.years=function(amount){return new Duration(amount,basics_1.TimeUnit.Year)},Duration.months=function(amount){return new Duration(amount,basics_1.TimeUnit.Month)},Duration.days=function(amount){return new Duration(amount,basics_1.TimeUnit.Day)},Duration.hours=function(amount){return new Duration(amount,basics_1.TimeUnit.Hour)},Duration.minutes=function(amount){return new Duration(amount,basics_1.TimeUnit.Minute)},Duration.seconds=function(amount){return new Duration(amount,basics_1.TimeUnit.Second)},Duration.milliseconds=function(amount){return new Duration(amount,basics_1.TimeUnit.Millisecond)},Duration.prototype.clone=function(){return new Duration(this._amount,this._unit)},Duration.prototype.as=function(unit){var thisMonths,reqMonths;return this._unit===unit?this._amount:this._unit>=basics_1.TimeUnit.Month&&unit>=basics_1.TimeUnit.Month?(thisMonths=this._unit===basics_1.TimeUnit.Year?12:1,reqMonths=unit===basics_1.TimeUnit.Year?12:1,this._amount*thisMonths/reqMonths):(thisMonths=basics.timeUnitToMilliseconds(this._unit),reqMonths=basics.timeUnitToMilliseconds(unit),this._amount*thisMonths/reqMonths)},Duration.prototype.convert=function(unit){return new Duration(this.as(unit),unit)},Duration.prototype.milliseconds=function(){return this.as(basics_1.TimeUnit.Millisecond)},Duration.prototype.millisecond=function(){return this._part(basics_1.TimeUnit.Millisecond)},Duration.prototype.seconds=function(){return this.as(basics_1.TimeUnit.Second)},Duration.prototype.second=function(){return this._part(basics_1.TimeUnit.Second)},Duration.prototype.minutes=function(){return this.as(basics_1.TimeUnit.Minute)},Duration.prototype.minute=function(){return this._part(basics_1.TimeUnit.Minute)},Duration.prototype.hours=function(){return this.as(basics_1.TimeUnit.Hour)},Duration.prototype.hour=function(){return this._part(basics_1.TimeUnit.Hour)},Duration.prototype.wholeHours=function(){return Math.floor(basics.timeUnitToMilliseconds(this._unit)*Math.abs(this._amount)/36e5)},Duration.prototype.days=function(){return this.as(basics_1.TimeUnit.Day)},Duration.prototype.day=function(){return this._part(basics_1.TimeUnit.Day)},Duration.prototype.months=function(){return this.as(basics_1.TimeUnit.Month)},Duration.prototype.month=function(){return this._part(basics_1.TimeUnit.Month)},Duration.prototype.years=function(){return this.as(basics_1.TimeUnit.Year)},Duration.prototype.wholeYears=function(){return this._unit===basics_1.TimeUnit.Year?Math.floor(Math.abs(this._amount)):this._unit===basics_1.TimeUnit.Month?Math.floor(Math.abs(this._amount)/12):Math.floor(basics.timeUnitToMilliseconds(this._unit)*Math.abs(this._amount)/basics.timeUnitToMilliseconds(basics_1.TimeUnit.Year))},Duration.prototype.amount=function(){return this._amount},Duration.prototype.unit=function(){return this._unit},Duration.prototype.sign=function(){return this._amount<0?"-":""},Duration.prototype.lessThan=function(other){return this.milliseconds()<other.milliseconds()},Duration.prototype.lessEqual=function(other){return this.milliseconds()<=other.milliseconds()},Duration.prototype.equals=function(other){other=other.convert(this._unit);return this._amount===other.amount()&&this._unit===other.unit()},Duration.prototype.equalsExact=function(other){return this._unit===other._unit?this._amount===other._amount:(this._unit>=basics_1.TimeUnit.Month&&other.unit()>=basics_1.TimeUnit.Month||this._unit<basics_1.TimeUnit.Day&&other.unit()<basics_1.TimeUnit.Day)&&this.equals(other)},Duration.prototype.identical=function(other){return this._amount===other.amount()&&this._unit===other.unit()},Duration.prototype.nonZero=function(){return 0!==this._amount},Duration.prototype.zero=function(){return 0===this._amount},Duration.prototype.greaterThan=function(other){return this.milliseconds()>other.milliseconds()},Duration.prototype.greaterEqual=function(other){return this.milliseconds()>=other.milliseconds()},Duration.prototype.min=function(other){return(this.lessThan(other)?this:other).clone()},Duration.prototype.max=function(other){return(this.greaterThan(other)?this:other).clone()},Duration.prototype.multiply=function(value){return new Duration(this._amount*value,this._unit)},Duration.prototype.divide=function(value){return"number"==typeof value?((0,assert_1.default)(Number.isFinite(value)&&0!==value,"Argument.Value","cannot divide by %d",value),new Duration(this._amount/value,this._unit)):((0,assert_1.default)(0!==value.amount(),"Argument.Value","cannot divide by 0"),this.milliseconds()/value.milliseconds())},Duration.prototype.add=function(value){return new Duration(this._amount+value.as(this._unit),this._unit)},Duration.prototype.sub=function(value){return new Duration(this._amount-value.as(this._unit),this._unit)},Duration.prototype.abs=function(){return 0<=this._amount?this.clone():this.multiply(-1)},Duration.prototype.toFullString=function(){return this.toHmsString(!0)},Duration.prototype.toHmsString=function(full){var result="";return((full=void 0===full?!1:full)||0<this.millisecond())&&(result="."+strings.padLeft(this.millisecond().toString(10),3,"0")),(full||0<result.length||0<this.second())&&(result=":"+strings.padLeft(this.second().toString(10),2,"0")+result),(full||0<result.length||0<this.minute())&&(result=":"+strings.padLeft(this.minute().toString(10),2,"0")+result),this.sign()+strings.padLeft(this.wholeHours().toString(10),2,"0")+result},Duration.prototype.toIsoString=function(){switch(this._unit){case basics_1.TimeUnit.Millisecond:return"P"+(this._amount/1e3).toFixed(3)+"S";case basics_1.TimeUnit.Second:return"P"+this._amount.toString(10)+"S";case basics_1.TimeUnit.Minute:return"PT"+this._amount.toString(10)+"M";case basics_1.TimeUnit.Hour:return"P"+this._amount.toString(10)+"H";case basics_1.TimeUnit.Day:return"P"+this._amount.toString(10)+"D";case basics_1.TimeUnit.Week:return"P"+this._amount.toString(10)+"W";case basics_1.TimeUnit.Month:return"P"+this._amount.toString(10)+"M";case basics_1.TimeUnit.Year:return"P"+this._amount.toString(10)+"Y";default:throw new Error("Unknown time unit.")}},Duration.prototype.toString=function(){return this._amount.toString(10)+" "+basics.timeUnitToString(this._unit,this._amount)},Duration.prototype.valueOf=function(){return this.milliseconds()},Duration.prototype._part=function(unit){var nextUnit;switch(unit){case basics_1.TimeUnit.Millisecond:nextUnit=basics_1.TimeUnit.Second;break;case basics_1.TimeUnit.Second:nextUnit=basics_1.TimeUnit.Minute;break;case basics_1.TimeUnit.Minute:nextUnit=basics_1.TimeUnit.Hour;break;case basics_1.TimeUnit.Hour:nextUnit=basics_1.TimeUnit.Day;break;case basics_1.TimeUnit.Day:nextUnit=basics_1.TimeUnit.Month;break;case basics_1.TimeUnit.Month:nextUnit=basics_1.TimeUnit.Year;break;default:return Math.floor(Math.abs(this.as(basics_1.TimeUnit.Year)))}var msecs=basics.timeUnitToMilliseconds(this._unit)*Math.abs(this._amount)%basics.timeUnitToMilliseconds(nextUnit);return Math.floor(msecs/basics.timeUnitToMilliseconds(unit))},Duration}();exports.Duration=Duration,exports.isDuration=function(value){return"object"==typeof value&&null!==value&&"Duration"===value.kind}},{"./assert":1,"./basics":2,"./strings":13}],5:[function(require,module,exports){Object.defineProperty(exports,"__esModule",{value:!0}),exports.convertError=exports.errorIs=exports.error=exports.throwError=void 0;var util=require("util");function throwError(name,format){for(var args=[],_i=2;_i<arguments.length;_i++)args[_i-2]=arguments[_i];format=new Error(util.format(format,args));throw format.name="timezonecomplete."+name,format}exports.throwError=throwError,exports.error=function(name,format){for(var args=[],_i=2;_i<arguments.length;_i++)args[_i-2]=arguments[_i];return(format=new Error(util.format(format,args))).name="timezonecomplete."+name,format},exports.errorIs=function(error,name){return"string"==typeof name?error.name==="timezonecomplete."+name:error.name.startsWith("timezonecomplete.")&&name.includes(error.name.substr("timezonecomplete.".length))},exports.convertError=function(errorName,cb){try{return cb()}catch(e){return throwError(errorName,e.message)}}},{util:21}],6:[function(require,module,exports){var __assign=this&&this.__assign||function(){return(__assign=Object.assign||function(t){for(var s,i=1,n=arguments.length;i<n;i++)for(var p in s=arguments[i])Object.prototype.hasOwnProperty.call(s,p)&&(t[p]=s[p]);return t}).apply(this,arguments)},basics=(Object.defineProperty(exports,"__esModule",{value:!0}),exports.format=void 0,require("./basics")),error_1=require("./error"),locale_1=require("./locale"),strings=require("./strings"),token_1=require("./token");exports.format=function(dateTime,utcTime,localZone,formatString,locale){void 0===locale&&(locale={});for(var mergedLocale=__assign(__assign({},locale_1.DEFAULT_LOCALE),locale),result="",_i=0,tokens_1=(0,token_1.tokenize)(formatString);_i<tokens_1.length;_i++){var token=tokens_1[_i],tokenResult=void 0;switch(token.type){case token_1.TokenType.ERA:tokenResult=function(dateTime,token,locale){var AD=0<dateTime.year;switch(token.length){case 1:case 2:case 3:return AD?locale.eraAbbreviated[0]:locale.eraAbbreviated[1];case 4:return AD?locale.eraWide[0]:locale.eraWide[1];case 5:return AD?locale.eraNarrow[0]:locale.eraNarrow[1];default:return token.raw}}(dateTime,token,mergedLocale);break;case token_1.TokenType.YEAR:tokenResult=function(dateTime,token){switch(token.symbol){case"y":case"Y":case"r":var yearValue=strings.padLeft(dateTime.year.toString(),token.length,"0");return yearValue=2===token.length?yearValue.slice(-2):yearValue;default:return token.raw}}(dateTime,token);break;case token_1.TokenType.QUARTER:tokenResult=function(dateTime,token,locale){var quarter=Math.ceil(dateTime.month/3);switch(token.symbol){case"Q":switch(token.length){case 1:case 2:return strings.padLeft(quarter.toString(),2,"0");case 3:return locale.quarterLetter+quarter;case 4:return locale.quarterAbbreviations[quarter-1]+" "+locale.quarterWord;case 5:return quarter.toString();default:return token.raw}case"q":switch(token.length){case 1:case 2:return strings.padLeft(quarter.toString(),2,"0");case 3:return locale.standAloneQuarterLetter+quarter;case 4:return locale.standAloneQuarterAbbreviations[quarter-1]+" "+locale.standAloneQuarterWord;case 5:return quarter.toString();default:return token.raw}default:return(0,error_1.throwError)("Argument.FormatString","invalid quarter pattern")}}(dateTime,token,mergedLocale);break;case token_1.TokenType.MONTH:tokenResult=function(dateTime,token,locale){switch(token.symbol){case"M":switch(token.length){case 1:case 2:return strings.padLeft(dateTime.month.toString(),token.length,"0");case 3:return locale.shortMonthNames[dateTime.month-1];case 4:return locale.longMonthNames[dateTime.month-1];case 5:return locale.monthLetters[dateTime.month-1];default:return token.raw}case"L":switch(token.length){case 1:case 2:return strings.padLeft(dateTime.month.toString(),token.length,"0");case 3:return locale.standAloneShortMonthNames[dateTime.month-1];case 4:return locale.standAloneLongMonthNames[dateTime.month-1];case 5:return locale.standAloneMonthLetters[dateTime.month-1];default:return token.raw}default:return(0,error_1.throwError)("Argument.FormatString","invalid month pattern")}}(dateTime,token,mergedLocale);break;case token_1.TokenType.DAY:tokenResult=function(dateTime,token){switch(token.symbol){case"d":return strings.padLeft(dateTime.day.toString(),token.length,"0");case"D":var dayOfYear=basics.dayOfYear(dateTime.year,dateTime.month,dateTime.day)+1;return strings.padLeft(dayOfYear.toString(),token.length,"0");default:return token.raw}}(dateTime,token);break;case token_1.TokenType.WEEKDAY:tokenResult=function(dateTime,token,locale){var weekDayNumber=basics.weekDayNoLeapSecs(dateTime.unixMillis);switch(token.length){case 1:case 2:return"e"===token.symbol?strings.padLeft(basics.weekDayNoLeapSecs(dateTime.unixMillis).toString(),token.length,"0"):locale.shortWeekdayNames[weekDayNumber];case 3:return locale.shortWeekdayNames[weekDayNumber];case 4:return locale.longWeekdayNames[weekDayNumber];case 5:return locale.weekdayLetters[weekDayNumber];case 6:return locale.weekdayTwoLetters[weekDayNumber];default:return token.raw}}(dateTime,token,mergedLocale);break;case token_1.TokenType.DAYPERIOD:tokenResult=function(dateTime,token,locale){switch(token.symbol){case"a":return token.length<=3?dateTime.hour<12?locale.dayPeriodAbbreviated.am:locale.dayPeriodAbbreviated.pm:4===token.length?dateTime.hour<12?locale.dayPeriodWide.am:locale.dayPeriodWide.pm:dateTime.hour<12?locale.dayPeriodNarrow.am:locale.dayPeriodNarrow.pm;case"b":case"B":return token.length<=3?0===dateTime.hour&&0===dateTime.minute&&0===dateTime.second&&0===dateTime.milli?locale.dayPeriodAbbreviated.midnight:12===dateTime.hour&&0===dateTime.minute&&0===dateTime.second&&0===dateTime.milli?locale.dayPeriodAbbreviated.noon:dateTime.hour<12?locale.dayPeriodAbbreviated.am:locale.dayPeriodAbbreviated.pm:4===token.length?0===dateTime.hour&&0===dateTime.minute&&0===dateTime.second&&0===dateTime.milli?locale.dayPeriodWide.midnight:12===dateTime.hour&&0===dateTime.minute&&0===dateTime.second&&0===dateTime.milli?locale.dayPeriodWide.noon:dateTime.hour<12?locale.dayPeriodWide.am:locale.dayPeriodWide.pm:0===dateTime.hour&&0===dateTime.minute&&0===dateTime.second&&0===dateTime.milli?locale.dayPeriodNarrow.midnight:12===dateTime.hour&&0===dateTime.minute&&0===dateTime.second&&0===dateTime.milli?locale.dayPeriodNarrow.noon:dateTime.hour<12?locale.dayPeriodNarrow.am:locale.dayPeriodNarrow.pm;default:return token.raw}}(dateTime,token,mergedLocale);break;case token_1.TokenType.HOUR:tokenResult=function(dateTime,token){var hour=dateTime.hour;switch(token.symbol){case"h":return 0===(hour%=12)&&(hour=12),strings.padLeft(hour.toString(),token.length,"0");case"H":return strings.padLeft(hour.toString(),token.length,"0");case"K":return hour%=12,strings.padLeft(hour.toString(),token.length,"0");case"k":return 0===hour&&(hour=24),strings.padLeft(hour.toString(),token.length,"0");default:return token.raw}}(dateTime,token);break;case token_1.TokenType.MINUTE:tokenResult=function(dateTime,token){return strings.padLeft(dateTime.minute.toString(),token.length,"0")}(dateTime,token);break;case token_1.TokenType.SECOND:tokenResult=function(dateTime,token){switch(token.symbol){case"s":return strings.padLeft(dateTime.second.toString(),token.length,"0");case"S":var fraction=dateTime.milli,fraction=strings.padLeft(fraction.toString(),3,"0");return(fraction=strings.padRight(fraction,token.length,"0")).slice(0,token.length);case"A":return strings.padLeft(basics.secondOfDay(dateTime.hour,dateTime.minute,dateTime.second).toString(),token.length,"0");default:return token.raw}}(dateTime,token);break;case token_1.TokenType.ZONE:tokenResult=function _formatZone(currentTime,utcTime,zone,token){if(!zone)return"";var offset=Math.round((currentTime.unixMillis-utcTime.unixMillis)/6e4);var offsetHours=Math.floor(Math.abs(offset)/60);var offsetHoursString=strings.padLeft(offsetHours.toString(),2,"0");offsetHoursString=0<=offset?"+"+offsetHoursString:"-"+offsetHoursString;var offsetMinutes=Math.abs(offset%60);var offsetMinutesString=strings.padLeft(offsetMinutes.toString(),2,"0");var result;switch(token.symbol){case"O":return result="GMT",result=(result+=0<=offset?"+":"-")+offsetHours.toString(),(4<=token.length||0!==offsetMinutes)&&(result+=":"+offsetMinutesString),4<token.length&&(result+=token.raw.slice(4)),result;case"Z":switch(token.length){case 1:case 2:case 3:return offsetHoursString+offsetMinutesString;case 4:var newToken={length:4,raw:"OOOO",symbol:"O",type:token_1.TokenType.ZONE};return _formatZone(currentTime,utcTime,zone,newToken);case 5:return 0===offset?"Z":offsetHoursString+":"+offsetMinutesString;default:return token.raw}case"z":switch(token.length){case 1:case 2:case 3:return zone.abbreviationForUtc(currentTime,!0);case 4:return zone.toString();default:return token.raw}case"v":return 1===token.length?zone.abbreviationForUtc(currentTime,!1):zone.toString();case"V":switch(token.length){case 1:return"unk";case 2:return zone.name();case 3:case 4:return"Unknown";default:return token.raw}case"X":case"x":if("X"===token.symbol&&0===offset)return"Z";switch(token.length){case 1:return result=offsetHoursString,0!==offsetMinutes&&(result+=offsetMinutesString),result;case 2:case 4:return offsetHoursString+offsetMinutesString;case 3:case 5:return offsetHoursString+":"+offsetMinutesString;default:return token.raw}default:return token.raw}}(dateTime,utcTime,localZone||void 0,token);break;case token_1.TokenType.WEEK:tokenResult=function(dateTime,token){return"w"===token.symbol?strings.padLeft(basics.weekNumber(dateTime.year,dateTime.month,dateTime.day).toString(),token.length,"0"):strings.padLeft(basics.weekOfMonth(dateTime.year,dateTime.month,dateTime.day).toString(),token.length,"0")}(dateTime,token);break;default:token_1.TokenType.IDENTITY;tokenResult=token.raw}result+=tokenResult}return result.trim()}},{"./basics":2,"./error":5,"./locale":9,"./strings":13,"./token":16}],7:[function(require,module,exports){Object.defineProperty(exports,"__esModule",{value:!0}),exports.abs=exports.max=exports.min=void 0;var assert_1=require("./assert");exports.min=function(d1,d2){return(0,assert_1.default)(d1,"Argument.D1","first argument is falsy"),(0,assert_1.default)(d2,"Argument.D2","second argument is falsy"),(0,assert_1.default)(d1.kind===d2.kind,"Argument.D2","expected either two datetimes or two durations"),d1.min(d2)},exports.max=function(d1,d2){return(0,assert_1.default)(d1,"Argument.D1","first argument is falsy"),(0,assert_1.default)(d2,"Argument.D2","second argument is falsy"),(0,assert_1.default)(d1.kind===d2.kind,"Argument.D2","expected either two datetimes or two durations"),d1.max(d2)},exports.abs=function(d){return(0,assert_1.default)(d,"Argument.D","first argument is falsy"),d.abs()}},{"./assert":1}],8:[function(require,module,exports){Object.defineProperty(exports,"__esModule",{value:!0}),exports.DateFunctions=void 0,function(DateFunctions){DateFunctions[DateFunctions.Get=0]="Get",DateFunctions[DateFunctions.GetUTC=1]="GetUTC"}(exports.DateFunctions={})},{}],9:[function(require,module,exports){Object.defineProperty(exports,"__esModule",{value:!0}),exports.DEFAULT_LOCALE=exports.DAY_PERIODS_NARROW=exports.DAY_PERIODS_WIDE=exports.DAY_PERIODS_ABBREVIATED=exports.WEEKDAY_LETTERS=exports.WEEKDAY_TWO_LETTERS=exports.SHORT_WEEKDAY_NAMES=exports.LONG_WEEKDAY_NAMES=exports.STAND_ALONE_MONTH_LETTERS=exports.STAND_ALONE_SHORT_MONTH_NAMES=exports.STAND_ALONE_LONG_MONTH_NAMES=exports.MONTH_LETTERS=exports.SHORT_MONTH_NAMES=exports.LONG_MONTH_NAMES=exports.STAND_ALONE_QUARTER_ABBREVIATIONS=exports.STAND_ALONE_QUARTER_WORD=exports.STAND_ALONE_QUARTER_LETTER=exports.QUARTER_ABBREVIATIONS=exports.QUARTER_WORD=exports.QUARTER_LETTER=exports.ERA_NAMES_ABBREVIATED=exports.ERA_NAMES_WIDE=exports.ERA_NAMES_NARROW=void 0,exports.ERA_NAMES_NARROW=["A","B"],exports.ERA_NAMES_WIDE=["Anno Domini","Before Christ"],exports.ERA_NAMES_ABBREVIATED=["AD","BC"],exports.QUARTER_LETTER="Q",exports.QUARTER_WORD="quarter",exports.QUARTER_ABBREVIATIONS=["1st","2nd","3rd","4th"],exports.STAND_ALONE_QUARTER_LETTER=exports.QUARTER_LETTER,exports.STAND_ALONE_QUARTER_WORD=exports.QUARTER_WORD,exports.STAND_ALONE_QUARTER_ABBREVIATIONS=exports.QUARTER_ABBREVIATIONS.slice(),exports.LONG_MONTH_NAMES=["January","February","March","April","May","June","July","August","September","October","November","December"],exports.SHORT_MONTH_NAMES=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],exports.MONTH_LETTERS=["J","F","M","A","M","J","J","A","S","O","N","D"],exports.STAND_ALONE_LONG_MONTH_NAMES=exports.LONG_MONTH_NAMES.slice(),exports.STAND_ALONE_SHORT_MONTH_NAMES=exports.SHORT_MONTH_NAMES.slice(),exports.STAND_ALONE_MONTH_LETTERS=exports.MONTH_LETTERS.slice(),exports.LONG_WEEKDAY_NAMES=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],exports.SHORT_WEEKDAY_NAMES=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],exports.WEEKDAY_TWO_LETTERS=["Su","Mo","Tu","We","Th","Fr","Sa"],exports.WEEKDAY_LETTERS=["S","M","T","W","T","F","S"],exports.DAY_PERIODS_ABBREVIATED={am:"AM",pm:"PM",noon:"noon",midnight:"mid."},exports.DAY_PERIODS_WIDE={am:"AM",pm:"PM",noon:"noon",midnight:"midnight"},exports.DAY_PERIODS_NARROW={am:"A",pm:"P",noon:"noon",midnight:"md"},exports.DEFAULT_LOCALE={eraNarrow:exports.ERA_NAMES_NARROW,eraWide:exports.ERA_NAMES_WIDE,eraAbbreviated:exports.ERA_NAMES_ABBREVIATED,quarterLetter:exports.QUARTER_LETTER,quarterWord:exports.QUARTER_WORD,quarterAbbreviations:exports.QUARTER_ABBREVIATIONS,standAloneQuarterLetter:exports.STAND_ALONE_QUARTER_LETTER,standAloneQuarterWord:exports.STAND_ALONE_QUARTER_WORD,standAloneQuarterAbbreviations:exports.STAND_ALONE_QUARTER_ABBREVIATIONS,longMonthNames:exports.LONG_MONTH_NAMES,shortMonthNames:exports.SHORT_MONTH_NAMES,monthLetters:exports.MONTH_LETTERS,standAloneLongMonthNames:exports.STAND_ALONE_LONG_MONTH_NAMES,standAloneShortMonthNames:exports.STAND_ALONE_SHORT_MONTH_NAMES,standAloneMonthLetters:exports.STAND_ALONE_MONTH_LETTERS,longWeekdayNames:exports.LONG_WEEKDAY_NAMES,shortWeekdayNames:exports.SHORT_WEEKDAY_NAMES,weekdayTwoLetters:exports.WEEKDAY_TWO_LETTERS,weekdayLetters:exports.WEEKDAY_LETTERS,dayPeriodAbbreviated:exports.DAY_PERIODS_ABBREVIATED,dayPeriodWide:exports.DAY_PERIODS_WIDE,dayPeriodNarrow:exports.DAY_PERIODS_NARROW}},{}],10:[function(require,module,exports){Object.defineProperty(exports,"__esModule",{value:!0}),exports.positiveModulo=exports.filterFloat=exports.roundSym=exports.isInt=void 0;var assert_1=require("./assert");exports.isInt=function(n){return!(null===n||!isFinite(n))&&Math.floor(n)===n},exports.roundSym=function(n){return(0,assert_1.default)(Number.isFinite(n),"Argument.N","n must be a finite number but is: %d",n),n<0?-1*Math.round(-1*n):Math.round(n)},exports.filterFloat=function(value){return/^(\-|\+)?([0-9]+(\.[0-9]+)?|Infinity)$/.test(value)?Number(value):NaN},exports.positiveModulo=function(value,modulo){return(0,assert_1.default)(Number.isFinite(value),"Argument.Value","value should be finite"),(0,assert_1.default)(Number.isFinite(modulo)&&1<=modulo,"Argument.Modulo","modulo should be >= 1"),value<0?(value%modulo+modulo)%modulo:value%modulo}},{"./assert":1}],11:[function(require,module,exports){var __assign=this&&this.__assign||function(){return(__assign=Object.assign||function(t){for(var s,i=1,n=arguments.length;i<n;i++)for(var p in s=arguments[i])Object.prototype.hasOwnProperty.call(s,p)&&(t[p]=s[p]);return t}).apply(this,arguments)},basics_1=(Object.defineProperty(exports,"__esModule",{value:!0}),exports.parse=exports.parseable=void 0,require("./basics")),error_1=require("./error"),locale_1=require("./locale"),math_1=require("./math"),timezone_1=require("./timezone"),token_1=require("./token");function parse(dateTimeString,formatString,overrideZone,allowTrailing,locale){var _a;if(void 0===allowTrailing&&(allowTrailing=!0),void 0===locale&&(locale={}),!dateTimeString)return(0,error_1.throwError)("ParseError","no date given");if(!formatString)return(0,error_1.throwError)("Argument.FormatString","no format given");var mergedLocale=__assign(__assign({},locale_1.DEFAULT_LOCALE),locale),yearCutoff=(0,math_1.positiveModulo)((new Date).getFullYear()+50,100);try{for(var pzr,tokens=(0,token_1.tokenize)(formatString),time={year:void 0},zone=void 0,pnr=void 0,dpr=void 0,era=1,quarter=void 0,remaining=dateTimeString,_i=0,tokens_1=tokens;_i<tokens_1.length;_i++){var token=tokens_1[_i];switch(token.type){case token_1.TokenType.ERA:era=(_a=function(token,remaining,locale){var allowed;switch(token.length){case 4:allowed=locale.eraWide;break;case 5:allowed=locale.eraNarrow;break;default:allowed=locale.eraAbbreviated}token=stripStrings(token,remaining,allowed);return[0===allowed.indexOf(token.chosen)?1:-1,token.remaining]}(token,remaining,mergedLocale))[0],remaining=_a[1];break;case token_1.TokenType.QUARTER:var r=function(token,remaining,locale){var quarterLetter,quarterWord,quarterAbbreviations,allowed;switch(token.symbol){case"Q":quarterLetter=locale.quarterLetter,quarterWord=locale.quarterWord,quarterAbbreviations=locale.quarterAbbreviations;break;case"q":quarterLetter=locale.standAloneQuarterLetter,quarterWord=locale.standAloneQuarterWord,quarterAbbreviations=locale.standAloneQuarterAbbreviations;break;default:return(0,error_1.throwError)("Argument.FormatString","invalid quarter pattern")}switch(token.length){case 1:case 5:return stripNumber(remaining,1);case 2:return stripNumber(remaining,2);case 3:allowed=[1,2,3,4].map(function(n){return quarterLetter+n.toString(10)});break;case 4:allowed=quarterAbbreviations.map(function(a){return a+" "+quarterWord});break;default:return(0,error_1.throwError)("Argument.FormatString","invalid quarter pattern")}token=stripStrings(token,remaining,allowed);return{n:allowed.indexOf(token.chosen)+1,remaining:token.remaining}}(token,remaining,mergedLocale),quarter=r.n,remaining=r.remaining;break;case token_1.TokenType.WEEKDAY:remaining=function(token,remaining,locale){var allowed;switch(token.length){case 1:if("e"===token.symbol)return stripNumber(remaining,1).remaining;allowed=locale.shortWeekdayNames;break;case 2:if("e"===token.symbol)return stripNumber(remaining,2).remaining;allowed=locale.shortWeekdayNames;break;case 3:allowed=locale.shortWeekdayNames;break;case 4:allowed=locale.longWeekdayNames;break;case 5:allowed=locale.weekdayLetters;break;case 6:allowed=locale.weekdayTwoLetters;break;default:return(0,error_1.throwError)("Argument.FormatString","invalid quarter pattern")}return stripStrings(token,remaining,allowed).remaining}(token,remaining,mergedLocale);break;case token_1.TokenType.WEEK:remaining=stripNumber(remaining,2).remaining;break;case token_1.TokenType.DAYPERIOD:remaining=(dpr=function(token,remaining,locale){var _a,_d,offsets;if("a"===token.symbol)switch(token.length){case 4:(_a={})[locale.dayPeriodWide.am]="am",_a[locale.dayPeriodWide.pm]="pm",offsets=_a;break;case 5:(_a={})[locale.dayPeriodNarrow.am]="am",_a[locale.dayPeriodNarrow.pm]="pm",offsets=_a;break;default:(_a={})[locale.dayPeriodAbbreviated.am]="am",_a[locale.dayPeriodAbbreviated.pm]="pm",offsets=_a}else switch(token.length){case 4:(_d={})[locale.dayPeriodWide.am]="am",_d[locale.dayPeriodWide.midnight]="midnight",_d[locale.dayPeriodWide.pm]="pm",_d[locale.dayPeriodWide.noon]="noon",offsets=_d;break;case 5:(_d={})[locale.dayPeriodNarrow.am]="am",_d[locale.dayPeriodNarrow.midnight]="midnight",_d[locale.dayPeriodNarrow.pm]="pm",_d[locale.dayPeriodNarrow.noon]="noon",offsets=_d;break;default:(_d={})[locale.dayPeriodAbbreviated.am]="am",_d[locale.dayPeriodAbbreviated.midnight]="midnight",_d[locale.dayPeriodAbbreviated.pm]="pm",_d[locale.dayPeriodAbbreviated.noon]="noon",offsets=_d}for(var token=Object.keys(offsets).sort(function(a,b){return a.length<b.length?1:a.length>b.length?-1:0}),upper=remaining.toUpperCase(),_i=0,sortedKeys_1=token;_i<sortedKeys_1.length;_i++){var key=sortedKeys_1[_i];if(upper.startsWith(key.toUpperCase()))return{type:offsets[key],remaining:remaining.slice(key.length)}}return(0,error_1.throwError)("ParseError","missing day period i.e. "+Object.keys(offsets).join(", "))}(token,remaining,mergedLocale)).remaining;break;case token_1.TokenType.YEAR:remaining=(pnr=stripNumber(remaining,1/0)).remaining,2===token.length?pnr.n>yearCutoff?time.year=1900+pnr.n:time.year=2e3+pnr.n:time.year=pnr.n;break;case token_1.TokenType.MONTH:remaining=(pnr=function(token,remaining,locale){var shortMonthNames,longMonthNames,monthLetters,allowed;switch(token.symbol){case"M":shortMonthNames=locale.shortMonthNames,longMonthNames=locale.longMonthNames,monthLetters=locale.monthLetters;break;case"L":shortMonthNames=locale.standAloneShortMonthNames,longMonthNames=locale.standAloneLongMonthNames,monthLetters=locale.standAloneMonthLetters;break;default:return(0,error_1.throwError)("Argument.FormatString","invalid month pattern")}switch(token.length){case 1:case 2:return stripNumber(remaining,2);case 3:allowed=shortMonthNames;break;case 4:allowed=longMonthNames;break;case 5:allowed=monthLetters;break;default:return(0,error_1.throwError)("Argument.FormatString","invalid month pattern")}token=stripStrings(token,remaining,allowed);return{n:allowed.indexOf(token.chosen)+1,remaining:token.remaining}}(token,remaining,mergedLocale)).remaining,time.month=pnr.n;break;case token_1.TokenType.DAY:remaining=(pnr=stripNumber(remaining,2)).remaining,time.day=pnr.n;break;case token_1.TokenType.HOUR:remaining=(pnr=function(token,remaining){var result=stripNumber(remaining,2);switch(token.symbol){case"h":12===result.n&&(result.n=0);break;case"H":case"K":break;case"k":--result.n}return result}(token,remaining)).remaining,time.hour=pnr.n;break;case token_1.TokenType.MINUTE:remaining=(pnr=stripNumber(remaining,2)).remaining,time.minute=pnr.n;break;case token_1.TokenType.SECOND:switch(remaining=(pnr=function(token,remaining){switch(token.symbol){case"s":return stripNumber(remaining,2);case"S":return stripNumber(remaining,token.length);case"A":return stripNumber(remaining,8);default:return(0,error_1.throwError)("Argument.FormatString","invalid seconds pattern")}}(token,remaining)).remaining,token.symbol){case"s":time.second=pnr.n;break;case"S":time.milli=1e3*parseFloat("0."+Math.floor(pnr.n).toString(10).slice(0,3));break;case"A":time.hour=Math.floor(pnr.n/36e5),time.minute=Math.floor((0,math_1.positiveModulo)(pnr.n/6e4,60)),time.second=Math.floor((0,math_1.positiveModulo)(pnr.n/1e3,60)),time.milli=(0,math_1.positiveModulo)(pnr.n,1e3);break;default:return(0,error_1.throwError)("ParseError","unsupported second format '".concat(token.raw,"'"))}break;case token_1.TokenType.ZONE:remaining=(pzr=function(token,s){if("z"===token.symbol||"Z"===token.symbol&&5===token.length||"v"===token.symbol||"V"===token.symbol&&2!==token.length||"x"===token.symbol&&4<=token.length||"X"===token.symbol&&4<=token.length)return(0,error_1.throwError)("NotImplemented","time zone pattern '"+token.raw+"' is not implemented");var result={remaining:s},s=!1;("Z"===token.symbol&&4===token.length||"O"===token.symbol)&&result.remaining.toUpperCase().startsWith("GMT")&&(result.remaining=result.remaining.slice(3),s=!0);var zoneString="";for(;0<result.remaining.length&&-1===WHITESPACE.indexOf(result.remaining.charAt(0));)zoneString+=result.remaining.charAt(0),result.remaining=result.remaining.substr(1);{if(!(zoneString=zoneString.trim()))return(0,error_1.throwError)("ParseError","no time zone given");if(s&&!zoneString.match(/[\+\-]?[\d\:]+/i))return(0,error_1.throwError)("ParseError","invalid time zone 'GMT"+zoneString+"'");try{result.zone=timezone_1.TimeZone.zone(zoneString)}catch(e){throw e=(0,error_1.errorIs)(e,["Argument.S","NotFound.Zone"])?(0,error_1.error)("ParseError",e.message):e}}return result}(token,remaining)).remaining,zone=pzr.zone;break;default:case token_1.TokenType.IDENTITY:remaining=function(s,expected){var remaining=s,eremaining=expected;for(;0<remaining.length&&0<eremaining.length&&remaining.charAt(0)===eremaining.charAt(0);)remaining=remaining.substr(1),eremaining=eremaining.substr(1);if(0<eremaining.length)return(0,error_1.throwError)("ParseError","expected '".concat(expected,"'"));return remaining}(remaining,token.raw)}}if(dpr)switch(dpr.type){case"am":void 0!==time.hour&&12<=time.hour&&(time.hour-=12);break;case"pm":void 0!==time.hour&&time.hour<12&&(time.hour+=12);break;case"noon":if(void 0!==time.hour&&0!==time.hour||(time.hour=12),void 0===time.minute&&(time.minute=0),void 0===time.second&&(time.second=0),void 0===time.milli&&(time.milli=0),12!==time.hour||0!==time.minute||0!==time.second||0!==time.milli)return(0,error_1.throwError)("ParseError","invalid time, contains 'noon' specifier but time differs from noon");break;case"midnight":if(void 0!==time.hour&&12!==time.hour||(time.hour=0),12===time.hour&&(time.hour=0),void 0===time.minute&&(time.minute=0),void 0===time.second&&(time.second=0),void 0===time.milli&&(time.milli=0),0!==time.hour||0!==time.minute||0!==time.second||0!==time.milli)return(0,error_1.throwError)("ParseError","invalid time, contains 'midnight' specifier but time differs from midnight")}if(void 0!==time.year&&(time.year*=era),void 0!==quarter)if(void 0===time.month)switch(quarter){case 1:time.month=1;break;case 2:time.month=4;break;case 3:time.month=7;break;case 4:time.month=10}else{var error_2=!1;switch(quarter){case 1:error_2=!(1<=time.month&&time.month<=3);break;case 2:error_2=!(4<=time.month&&time.month<=6);break;case 3:error_2=!(7<=time.month&&time.month<=9);break;case 4:error_2=!(10<=time.month&&time.month<=12)}if(error_2)return(0,error_1.throwError)("ParseError","the quarter does not match the month")}void 0===time.year&&(time.year=1970);var result={time:new basics_1.TimeStruct(time),zone:zone};return result.time.validate()?(overrideZone&&(result.zone=overrideZone),remaining&&!allowTrailing?(0,error_1.throwError)("ParseError","invalid date '".concat(dateTimeString,"' not according to format '").concat(formatString,"': trailing characters: '").concat(remaining,"'")):result):(0,error_1.throwError)("ParseError","invalid resulting date")}catch(e){return(0,error_1.throwError)("ParseError","invalid date '".concat(dateTimeString,"' not according to format '").concat(formatString,"': ").concat(e.message))}}exports.parseable=function(dateTimeString,formatString,allowTrailing,locale){void 0===allowTrailing&&(allowTrailing=!0),void 0===locale&&(locale={});try{return parse(dateTimeString,formatString,void 0,allowTrailing,locale),!0}catch(e){return!1}},exports.parse=parse;var WHITESPACE=[" ","\t","\r","\v","\n"];function stripNumber(s,maxLength){for(var result={n:NaN,remaining:s},numberString="";numberString.length<maxLength&&0<result.remaining.length&&result.remaining.charAt(0).match(/\d/);)numberString+=result.remaining.charAt(0),result.remaining=result.remaining.substr(1);for(;"0"===numberString.charAt(0)&&1<numberString.length;)numberString=numberString.substr(1);return result.n=parseInt(numberString,10),""!==numberString&&Number.isFinite(result.n)?result:(0,error_1.throwError)("ParseError","expected a number but got '".concat(numberString,"'"))}function stripStrings(token,remaining,allowed){for(var sortedKeys=allowed.slice().sort(function(a,b){return a.length<b.length?1:a.length>b.length?-1:0}),upper=remaining.toUpperCase(),_i=0,sortedKeys_2=sortedKeys;_i<sortedKeys_2.length;_i++){var key=sortedKeys_2[_i];if(upper.startsWith(key.toUpperCase()))return{chosen:key,remaining:remaining.slice(key.length)}}return(0,error_1.throwError)("ParseError","invalid "+token_1.TokenType[token.type].toLowerCase()+", expected one of "+allowed.join(", "))}},{"./basics":2,"./error":5,"./locale":9,"./math":10,"./timezone":15,"./token":16}],12:[function(require,module,exports){Object.defineProperty(exports,"__esModule",{value:!0}),exports.timestampOnWeekTimeLessThan=exports.timestampOnWeekTimeGreaterThanOrEqualTo=exports.isPeriod=exports.isValidPeriodJson=exports.Period=exports.periodDstToString=exports.PeriodDst=void 0;var PeriodDst,assert_1=require("./assert"),basics_1=require("./basics"),basics=require("./basics"),datetime_1=require("./datetime"),duration_1=require("./duration"),error_1=require("./error"),timezone_1=require("./timezone");function periodDstToString(p){switch(p){case PeriodDst.RegularIntervals:return"regular intervals";case PeriodDst.RegularLocalTime:return"regular local time";default:return(0,error_1.throwError)("Argument.P","invalid PerioDst value %d",p)}}!function(PeriodDst){PeriodDst[PeriodDst.RegularIntervals=0]="RegularIntervals",PeriodDst[PeriodDst.RegularLocalTime=1]="RegularLocalTime",PeriodDst[PeriodDst.MAX=2]="MAX"}(PeriodDst||(exports.PeriodDst=PeriodDst={})),exports.periodDstToString=periodDstToString;var Period=function(){function Period(a,amountOrInterval,unitOrDst,givenDst){this.kind="Period";var reference,interval,dst=PeriodDst.RegularLocalTime;if((0,datetime_1.isDateTime)(a))reference=a,"number"!=typeof(dst="object"==typeof amountOrInterval?(interval=amountOrInterval,unitOrDst):((0,assert_1.default)("number"==typeof unitOrDst&&0<=unitOrDst&&unitOrDst<basics_1.TimeUnit.MAX,"Argument.Unit","Invalid unit"),interval=new duration_1.Duration(amountOrInterval,unitOrDst),givenDst))&&(dst=PeriodDst.RegularLocalTime);else try{reference=new datetime_1.DateTime(a.reference),interval=new duration_1.Duration(a.duration),dst="regular"===a.periodDst?PeriodDst.RegularIntervals:PeriodDst.RegularLocalTime}catch(e){return(0,error_1.throwError)("Argument.Json",e)}if((0,assert_1.default)(0<=dst&&dst<PeriodDst.MAX,"Argument.Dst","Invalid PeriodDst setting"),(0,assert_1.default)(0<interval.amount(),"Argument.Interval","Amount must be positive non-zero."),(0,assert_1.default)(Number.isInteger(interval.amount()),"Argument.Interval","Amount must be a whole number"),this._reference=reference,this._interval=interval,this._dst=dst,this._calcInternalValues(),this._dstRelevant()&&dst===PeriodDst.RegularLocalTime)switch(this._intInterval.unit()){case basics_1.TimeUnit.Millisecond:(0,assert_1.default)(this._intInterval.amount()<864e5,"Argument.Interval.NotImplemented","When using Hour, Minute or (Milli)Second units, with Regular Local Times, then the amount must be either less than a day or a multiple of the next unit.");break;case basics_1.TimeUnit.Second:(0,assert_1.default)(this._intInterval.amount()<86400,"Argument.Interval.NotImplemented","When using Hour, Minute or (Milli)Second units, with Regular Local Times, then the amount must be either less than a day or a multiple of the next unit.");break;case basics_1.TimeUnit.Minute:(0,assert_1.default)(this._intInterval.amount()<1440,"Argument.Interval.NotImplemented","When using Hour, Minute or (Milli)Second units, with Regular Local Times, then the amount must be either less than a day or a multiple of the next unit.");break;case basics_1.TimeUnit.Hour:(0,assert_1.default)(this._intInterval.amount()<24,"Argument.Interval.NotImplemented","When using Hour, Minute or (Milli)Second units, with Regular Local Times, then the amount must be either less than a day or a multiple of the next unit.")}}return Period.prototype.clone=function(){return new Period(this._reference,this._interval,this._dst)},Period.prototype.reference=function(){return this._reference},Period.prototype.start=function(){return this._reference},Period.prototype.interval=function(){return this._interval.clone()},Period.prototype.amount=function(){return this._interval.amount()},Period.prototype.unit=function(){return this._interval.unit()},Period.prototype.dst=function(){return this._dst},Period.prototype.findFirst=function(fromDate){(0,assert_1.default)(!!this._intReference.zone()==!!fromDate.zone(),"UnawareToAwareConversion","The fromDate and reference date must both be aware or unaware");var approx,approx2,approxMin,periods,diff,remainder,imax,imin,imid,normalFrom=this._normalizeDay(fromDate.toZone(this._intReference.zone()));if(1===this._intInterval.amount())if(this._intDst===PeriodDst.RegularIntervals){switch(this._intInterval.unit()){case basics_1.TimeUnit.Millisecond:approx=new datetime_1.DateTime(normalFrom.utcYear(),normalFrom.utcMonth(),normalFrom.utcDay(),normalFrom.utcHour(),normalFrom.utcMinute(),normalFrom.utcSecond(),normalFrom.utcMillisecond(),timezone_1.TimeZone.utc());break;case basics_1.TimeUnit.Second:approx=new datetime_1.DateTime(normalFrom.utcYear(),normalFrom.utcMonth(),normalFrom.utcDay(),normalFrom.utcHour(),normalFrom.utcMinute(),normalFrom.utcSecond(),this._intReference.utcMillisecond(),timezone_1.TimeZone.utc());break;case basics_1.TimeUnit.Minute:approx=new datetime_1.DateTime(normalFrom.utcYear(),normalFrom.utcMonth(),normalFrom.utcDay(),normalFrom.utcHour(),normalFrom.utcMinute(),this._intReference.utcSecond(),this._intReference.utcMillisecond(),timezone_1.TimeZone.utc());break;case basics_1.TimeUnit.Hour:approx=new datetime_1.DateTime(normalFrom.utcYear(),normalFrom.utcMonth(),normalFrom.utcDay(),normalFrom.utcHour(),this._intReference.utcMinute(),this._intReference.utcSecond(),this._intReference.utcMillisecond(),timezone_1.TimeZone.utc());break;case basics_1.TimeUnit.Day:approx=new datetime_1.DateTime(normalFrom.utcYear(),normalFrom.utcMonth(),normalFrom.utcDay(),this._intReference.utcHour(),this._intReference.utcMinute(),this._intReference.utcSecond(),this._intReference.utcMillisecond(),timezone_1.TimeZone.utc());break;case basics_1.TimeUnit.Month:approx=new datetime_1.DateTime(normalFrom.utcYear(),normalFrom.utcMonth(),this._intReference.utcDay(),this._intReference.utcHour(),this._intReference.utcMinute(),this._intReference.utcSecond(),this._intReference.utcMillisecond(),timezone_1.TimeZone.utc());break;case basics_1.TimeUnit.Year:approx=new datetime_1.DateTime(normalFrom.utcYear(),this._intReference.utcMonth(),this._intReference.utcDay(),this._intReference.utcHour(),this._intReference.utcMinute(),this._intReference.utcSecond(),this._intReference.utcMillisecond(),timezone_1.TimeZone.utc());break;default:return(0,error_1.throwError)("Assertion","Unknown TimeUnit")}for(;!approx.greaterThan(fromDate);)approx=approx.add(this._intInterval.amount(),this._intInterval.unit())}else{switch(this._intInterval.unit()){case basics_1.TimeUnit.Millisecond:approx=new datetime_1.DateTime(normalFrom.year(),normalFrom.month(),normalFrom.day(),normalFrom.hour(),normalFrom.minute(),normalFrom.second(),normalFrom.millisecond(),this._intReference.zone());break;case basics_1.TimeUnit.Second:approx=new datetime_1.DateTime(normalFrom.year(),normalFrom.month(),normalFrom.day(),normalFrom.hour(),normalFrom.minute(),normalFrom.second(),this._intReference.millisecond(),this._intReference.zone());break;case basics_1.TimeUnit.Minute:approx=new datetime_1.DateTime(normalFrom.year(),normalFrom.month(),normalFrom.day(),normalFrom.hour(),normalFrom.minute(),this._intReference.second(),this._intReference.millisecond(),this._intReference.zone());break;case basics_1.TimeUnit.Hour:approx=new datetime_1.DateTime(normalFrom.year(),normalFrom.month(),normalFrom.day(),normalFrom.hour(),this._intReference.minute(),this._intReference.second(),this._intReference.millisecond(),this._intReference.zone());break;case basics_1.TimeUnit.Day:approx=new datetime_1.DateTime(normalFrom.year(),normalFrom.month(),normalFrom.day(),this._intReference.hour(),this._intReference.minute(),this._intReference.second(),this._intReference.millisecond(),this._intReference.zone());break;case basics_1.TimeUnit.Month:approx=new datetime_1.DateTime(normalFrom.year(),normalFrom.month(),this._intReference.day(),this._intReference.hour(),this._intReference.minute(),this._intReference.second(),this._intReference.millisecond(),this._intReference.zone());break;case basics_1.TimeUnit.Year:approx=new datetime_1.DateTime(normalFrom.year(),this._intReference.month(),this._intReference.day(),this._intReference.hour(),this._intReference.minute(),this._intReference.second(),this._intReference.millisecond(),this._intReference.zone());break;default:return(0,error_1.throwError)("Assertion","Unknown TimeUnit")}for(;!approx.greaterThan(normalFrom);)approx=approx.addLocal(this._intInterval.amount(),this._intInterval.unit())}else if(this._intDst===PeriodDst.RegularIntervals){switch(this._intInterval.unit()){case basics_1.TimeUnit.Millisecond:diff=normalFrom.diff(this._intReference).milliseconds(),periods=Math.floor(diff/this._intInterval.amount()),approx=this._intReference.add(periods*this._intInterval.amount(),this._intInterval.unit());break;case basics_1.TimeUnit.Second:diff=normalFrom.diff(this._intReference).seconds(),periods=Math.floor(diff/this._intInterval.amount()),approx=this._intReference.add(periods*this._intInterval.amount(),this._intInterval.unit());break;case basics_1.TimeUnit.Minute:diff=normalFrom.diff(this._intReference).minutes(),periods=Math.floor(diff/this._intInterval.amount()),approx=this._intReference.add(periods*this._intInterval.amount(),this._intInterval.unit());break;case basics_1.TimeUnit.Hour:diff=normalFrom.diff(this._intReference).hours(),periods=Math.floor(diff/this._intInterval.amount()),approx=this._intReference.add(periods*this._intInterval.amount(),this._intInterval.unit());break;case basics_1.TimeUnit.Day:diff=normalFrom.diff(this._intReference).hours()/24,periods=Math.floor(diff/this._intInterval.amount()),approx=this._intReference.add(periods*this._intInterval.amount(),this._intInterval.unit());break;case basics_1.TimeUnit.Month:diff=12*(normalFrom.utcYear()-this._intReference.utcYear())+(normalFrom.utcMonth()-this._intReference.utcMonth())-1,periods=Math.floor(diff/this._intInterval.amount()),approx=this._intReference.add(periods*this._intInterval.amount(),this._intInterval.unit());break;case basics_1.TimeUnit.Year:diff=normalFrom.year()-this._intReference.year()-1,periods=Math.floor(diff/this._intInterval.amount()),approx=this._intReference.add(periods*this._intInterval.amount(),basics_1.TimeUnit.Year);break;default:return(0,error_1.throwError)("Assertion","Unknown TimeUnit")}for(;!approx.greaterThan(fromDate);)approx=approx.add(this._intInterval.amount(),this._intInterval.unit())}else{switch(this._intInterval.unit()){case basics_1.TimeUnit.Millisecond:if(this._intInterval.amount()<1e3&&1e3%this._intInterval.amount()==0)approx=new datetime_1.DateTime(normalFrom.year(),normalFrom.month(),normalFrom.day(),normalFrom.hour(),normalFrom.minute(),normalFrom.second(),this._intReference.millisecond(),this._intReference.zone()).subLocal(1,basics_1.TimeUnit.Second);else for(approx=new datetime_1.DateTime(normalFrom.year(),normalFrom.month(),normalFrom.day(),this._intReference.hour(),this._intReference.minute(),this._intReference.second(),this._intReference.millisecond(),this._intReference.zone()),remainder=Math.floor(864e5%this._intInterval.amount()),approx.greaterThan(normalFrom)?approx.subLocal(remainder,basics_1.TimeUnit.Millisecond).greaterThan(normalFrom)&&(approx=approx.subLocal(1,basics_1.TimeUnit.Day)):approx.addLocal(1,basics_1.TimeUnit.Day).subLocal(remainder,basics_1.TimeUnit.Millisecond).lessEqual(normalFrom)&&(approx=approx.addLocal(1,basics_1.TimeUnit.Day)),imax=Math.floor(864e5/this._intInterval.amount()),imin=0;imin<=imax;){if(imid=Math.floor((imin+imax)/2),approxMin=(approx2=approx.addLocal(imid*this._intInterval.amount(),basics_1.TimeUnit.Millisecond)).subLocal(this._intInterval.amount(),basics_1.TimeUnit.Millisecond),approx2.greaterThan(normalFrom)&&approxMin.lessEqual(normalFrom)){approx=approx2;break}approx2.lessEqual(normalFrom)?imin=imid+1:imax=imid-1}break;case basics_1.TimeUnit.Second:if(this._intInterval.amount()<60&&60%this._intInterval.amount()==0)approx=new datetime_1.DateTime(normalFrom.year(),normalFrom.month(),normalFrom.day(),normalFrom.hour(),normalFrom.minute(),this._intReference.second(),this._intReference.millisecond(),this._intReference.zone()).subLocal(1,basics_1.TimeUnit.Minute);else for(approx=new datetime_1.DateTime(normalFrom.year(),normalFrom.month(),normalFrom.day(),this._intReference.hour(),this._intReference.minute(),this._intReference.second(),this._intReference.millisecond(),this._intReference.zone()),remainder=Math.floor(86400%this._intInterval.amount()),approx.greaterThan(normalFrom)?approx.subLocal(remainder,basics_1.TimeUnit.Second).greaterThan(normalFrom)&&(approx=approx.subLocal(1,basics_1.TimeUnit.Day)):approx.addLocal(1,basics_1.TimeUnit.Day).subLocal(remainder,basics_1.TimeUnit.Second).lessEqual(normalFrom)&&(approx=approx.addLocal(1,basics_1.TimeUnit.Day)),imax=Math.floor(86400/this._intInterval.amount()),imin=0;imin<=imax;){if(imid=Math.floor((imin+imax)/2),approxMin=(approx2=approx.addLocal(imid*this._intInterval.amount(),basics_1.TimeUnit.Second)).subLocal(this._intInterval.amount(),basics_1.TimeUnit.Second),approx2.greaterThan(normalFrom)&&approxMin.lessEqual(normalFrom)){approx=approx2;break}approx2.lessEqual(normalFrom)?imin=imid+1:imax=imid-1}break;case basics_1.TimeUnit.Minute:this._intInterval.amount()<60&&60%this._intInterval.amount()==0?approx=new datetime_1.DateTime(normalFrom.year(),normalFrom.month(),normalFrom.day(),normalFrom.hour(),this._intReference.minute(),this._intReference.second(),this._intReference.millisecond(),this._intReference.zone()).subLocal(1,basics_1.TimeUnit.Hour):(approx=new datetime_1.DateTime(normalFrom.year(),normalFrom.month(),normalFrom.day(),this._intReference.hour(),this._intReference.minute(),this._intReference.second(),this._intReference.millisecond(),this._intReference.zone()),remainder=Math.floor(1440%this._intInterval.amount()),approx.greaterThan(normalFrom)?approx.subLocal(remainder,basics_1.TimeUnit.Minute).greaterThan(normalFrom)&&(approx=approx.subLocal(1,basics_1.TimeUnit.Day)):approx.addLocal(1,basics_1.TimeUnit.Day).subLocal(remainder,basics_1.TimeUnit.Minute).lessEqual(normalFrom)&&(approx=approx.addLocal(1,basics_1.TimeUnit.Day)));break;case basics_1.TimeUnit.Hour:approx=new datetime_1.DateTime(normalFrom.year(),normalFrom.month(),normalFrom.day(),this._intReference.hour(),this._intReference.minute(),this._intReference.second(),this._intReference.millisecond(),this._intReference.zone()),remainder=Math.floor(24%this._intInterval.amount()),approx.greaterThan(normalFrom)?approx.subLocal(remainder,basics_1.TimeUnit.Hour).greaterThan(normalFrom)&&(approx=approx.subLocal(1,basics_1.TimeUnit.Day)):approx.addLocal(1,basics_1.TimeUnit.Day).subLocal(remainder,basics_1.TimeUnit.Hour).lessEqual(normalFrom)&&(approx=approx.addLocal(1,basics_1.TimeUnit.Day));break;case basics_1.TimeUnit.Day:diff=normalFrom.diff(this._intReference).hours()/24,periods=Math.floor(diff/this._intInterval.amount()),approx=this._intReference.addLocal(periods*this._intInterval.amount(),this._intInterval.unit());break;case basics_1.TimeUnit.Month:diff=12*(normalFrom.year()-this._intReference.year())+(normalFrom.month()-this._intReference.month()),periods=Math.floor(diff/this._intInterval.amount()),approx=this._intReference.addLocal(this._interval.multiply(periods));break;case basics_1.TimeUnit.Year:diff=normalFrom.year()-this._intReference.year()-1,periods=Math.floor(diff/this._intInterval.amount()),remainder=this._intReference.year()+periods*this._intInterval.amount(),approx=new datetime_1.DateTime(remainder,this._intReference.month(),this._intReference.day(),this._intReference.hour(),this._intReference.minute(),this._intReference.second(),this._intReference.millisecond(),this._intReference.zone());break;default:return(0,error_1.throwError)("Assertion","Unknown TimeUnit")}for(;!approx.greaterThan(normalFrom);)approx=approx.addLocal(this._intInterval.amount(),this._intInterval.unit())}return this._correctDay(approx).convert(fromDate.zone())},Period.prototype.findNext=function(prev,count){void 0===count&&(count=1),(0,assert_1.default)(!!prev,"Argument.Prev","Prev must be given"),(0,assert_1.default)(!!this._intReference.zone()==!!prev.zone(),"UnawareToAwareConversion","The fromDate and referenceDate must both be aware or unaware"),(0,assert_1.default)(Number.isInteger(count),"Argument.Count","Count must be an integer number");var normalizedPrev=this._normalizeDay(prev.toZone(this._reference.zone()));return(this._intDst===PeriodDst.RegularIntervals?this._correctDay(normalizedPrev.add(this._intInterval.amount()*count,this._intInterval.unit())):this._correctDay(normalizedPrev.addLocal(this._intInterval.amount()*count,this._intInterval.unit()))).convert(prev.zone())},Period.prototype.findLast=function(from){var result=this.findPrev(this.findFirst(from));return result=result.equals(from)?this.findPrev(result):result},Period.prototype.findPrev=function(next,count){void 0===count&&(count=1);try{return this.findNext(next,-1*count)}catch(e){throw e=(0,error_1.errorIs)(e,"Argument.Prev")?(0,error_1.error)("Argument.Next",e.message):e}},Period.prototype.isBoundary=function(occurrence){return!!occurrence&&((0,assert_1.default)(!!this._intReference.zone()==!!occurrence.zone(),"UnawareToAwareConversion","The occurrence and referenceDate must both be aware or unaware"),this.findFirst(occurrence.sub(duration_1.Duration.milliseconds(1))).equals(occurrence))},Period.prototype.equals=function(other){var refZone,otherZone,thisIsRegular,otherIsRegular;return!!(this.isBoundary(other._reference)&&this._intInterval.equals(other._intInterval)&&(refZone=this._reference.zone(),otherZone=other._reference.zone(),thisIsRegular=this._intDst===PeriodDst.RegularIntervals||!refZone||refZone.isUtc(),otherIsRegular=other._intDst===PeriodDst.RegularIntervals||!otherZone||otherZone.isUtc(),thisIsRegular&&otherIsRegular||this._intDst===other._intDst&&refZone&&otherZone&&refZone.equals(otherZone)))},Period.prototype.identical=function(other){return this._reference.identical(other._reference)&&this._interval.identical(other._interval)&&this._dst===other._dst},Period.prototype.toIsoString=function(){return this._reference.toIsoString()+"/"+this._interval.toIsoString()},Period.prototype.toString=function(){var result=this._interval.toString()+", referenceing at "+this._reference.toString();return this._dstRelevant()&&(result+=", keeping "+periodDstToString(this._dst)),result},Period.prototype.toJson=function(){return{reference:this.reference().toString(),duration:this.interval().toString(),periodDst:this.dst()===PeriodDst.RegularIntervals?"regular":"local"}},Period.prototype._correctDay=function(d){return this._reference!==this._intReference?new datetime_1.DateTime(d.year(),d.month(),Math.min(basics.daysInMonth(d.year(),d.month()),this._reference.day()),d.hour(),d.minute(),d.second(),d.millisecond(),d.zone()):d},Period.prototype._normalizeDay=function(d,anymonth){return void 0===anymonth&&(anymonth=!0),this._intInterval.unit()===basics_1.TimeUnit.Month&&28<d.day()||this._intInterval.unit()===basics_1.TimeUnit.Year&&(2===d.month()||anymonth)&&28<d.day()?new datetime_1.DateTime(d.year(),d.month(),28,d.hour(),d.minute(),d.second(),d.millisecond(),d.zone()):d},Period.prototype._dstRelevant=function(){var zone=this._reference.zone();return!(!zone||zone.kind()!==timezone_1.TimeZoneKind.Proper||!zone.hasDst())},Period.prototype._calcInternalValues=function(){var intAmount=this._interval.amount(),intUnit=this._interval.unit();intUnit===basics_1.TimeUnit.Millisecond&&1e3<=intAmount&&intAmount%1e3==0&&(intAmount/=1e3,intUnit=basics_1.TimeUnit.Second),intUnit===basics_1.TimeUnit.Second&&60<=intAmount&&intAmount%60==0&&(intAmount/=60,intUnit=basics_1.TimeUnit.Minute),intUnit===basics_1.TimeUnit.Minute&&60<=intAmount&&intAmount%60==0&&(intAmount/=60,intUnit=basics_1.TimeUnit.Hour),intUnit===basics_1.TimeUnit.Hour&&24<=intAmount&&intAmount%24==0&&(intAmount/=24,intUnit=basics_1.TimeUnit.Day),intUnit===basics_1.TimeUnit.Week&&(intAmount*=7,intUnit=basics_1.TimeUnit.Day),intUnit===basics_1.TimeUnit.Month&&12<=intAmount&&intAmount%12==0&&(intAmount/=12,intUnit=basics_1.TimeUnit.Year),this._intInterval=new duration_1.Duration(intAmount,intUnit),this._dstRelevant()?this._intDst=this._dst:this._intDst=PeriodDst.RegularIntervals,this._intReference=this._normalizeDay(this._reference,!1)},Period}();exports.Period=Period,exports.isValidPeriodJson=function(json){if("object"!=typeof json)return!1;if(null===json)return!1;if("string"!=typeof json.duration)return!1;if("string"!=typeof json.periodDst)return!1;if("string"!=typeof json.reference)return!1;if(!["regular","local"].includes(json.periodDst))return!1;try{new Period(json)}catch(_a){return!1}return!0},exports.isPeriod=function(value){return"object"==typeof value&&null!==value&&"Period"===value.kind},exports.timestampOnWeekTimeGreaterThanOrEqualTo=function(opts){(0,assert_1.default)(0<=opts.hour&&opts.hour<24,"Argument.Hour","opts.hour should be within [0..23]"),(0,assert_1.default)(void 0===opts.minute||0<=opts.minute&&opts.minute<60&&Number.isInteger(opts.minute),"Argument.Minute","opts.minute should be within [0..59]"),(0,assert_1.default)(void 0===opts.second||0<=opts.second&&opts.second<60&&Number.isInteger(opts.second),"Argument.Second","opts.second should be within [0..59]"),(0,assert_1.default)(void 0===opts.millisecond||0<=opts.millisecond&&opts.millisecond<1e3&&Number.isInteger(opts.millisecond),"Argument.Millisecond","opts.millisecond should be within [0.999]"),(0,assert_1.default)(0<=opts.weekday&&opts.weekday<7,"Argument.Weekday","opts.weekday should be within [0..6]");for(var midnight=opts.reference.startOfDay();midnight.weekDay()!==opts.weekday;)midnight=midnight.addLocal((0,duration_1.days)(1));var _a=new datetime_1.DateTime(midnight.year(),midnight.month(),midnight.day(),opts.hour,null!=(_a=opts.minute)?_a:0,null!=(_a=opts.second)?_a:0,null!=(_a=opts.millisecond)?_a:0,opts.reference.zone());return _a<opts.reference?_a.addLocal((0,duration_1.days)(7)):_a},exports.timestampOnWeekTimeLessThan=function(opts){(0,assert_1.default)(0<=opts.hour&&opts.hour<24,"Argument.Hour","opts.hour should be within [0..23]"),(0,assert_1.default)(void 0===opts.minute||0<=opts.minute&&opts.minute<60&&Number.isInteger(opts.minute),"Argument.Minute","opts.minute should be within [0..59]"),(0,assert_1.default)(void 0===opts.second||0<=opts.second&&opts.second<60&&Number.isInteger(opts.second),"Argument.Second","opts.second should be within [0..59]"),(0,assert_1.default)(void 0===opts.millisecond||0<=opts.millisecond&&opts.millisecond<1e3&&Number.isInteger(opts.millisecond),"Argument.Millisecond","opts.millisecond should be within [0.999]"),(0,assert_1.default)(0<=opts.weekday&&opts.weekday<7,"Argument.Weekday","opts.weekday should be within [0..6]");for(var midnight=opts.reference.startOfDay().addLocal((0,duration_1.days)(1));midnight.weekDay()!==opts.weekday;)midnight=midnight.subLocal((0,duration_1.days)(1));var _a=new datetime_1.DateTime(midnight.year(),midnight.month(),midnight.day(),opts.hour,null!=(_a=opts.minute)?_a:0,null!=(_a=opts.second)?_a:0,null!=(_a=opts.millisecond)?_a:0,opts.reference.zone());return _a>=opts.reference?_a.subLocal((0,duration_1.days)(7)):_a}},{"./assert":1,"./basics":2,"./datetime":3,"./duration":4,"./error":5,"./timezone":15}],13:[function(require,module,exports){Object.defineProperty(exports,"__esModule",{value:!0}),exports.padRight=exports.padLeft=void 0;var assert_1=require("./assert");exports.padLeft=function(s,width,char){(0,assert_1.default)(Number.isInteger(width)&&0<=width,"Argument.Width","width should be an integer number >= 0 but is: %d",width);for(var padding="",i=0;i<width-s.length;i++)padding+=char;return padding+s},exports.padRight=function(s,width,char){(0,assert_1.default)(Number.isInteger(width)&&0<=width,"Argument.Width","width should be an integer number >= 0 but is: %d",width);for(var padding="",i=0;i<width-s.length;i++)padding+=char;return s+padding}},{"./assert":1}],14:[function(require,module,exports){Object.defineProperty(exports,"__esModule",{value:!0}),exports.RealTimeSource=void 0;var RealTimeSource=function(){function RealTimeSource(){}return RealTimeSource.prototype.now=function(){return new Date},RealTimeSource}();exports.RealTimeSource=RealTimeSource},{}],15:[function(require,module,exports){Object.defineProperty(exports,"__esModule",{value:!0}),exports.isTimeZone=exports.TimeZone=exports.TimeZoneKind=exports.zone=exports.utc=exports.local=void 0;var TimeZoneKind,assert_1=require("./assert"),basics_1=require("./basics"),error_1=require("./error"),strings=require("./strings"),tz_database_1=require("./tz-database");exports.local=function(){return TimeZone.local()},exports.utc=function(){return TimeZone.utc()},exports.zone=function(a,dst){return TimeZone.zone(a,dst)},function(TimeZoneKind){TimeZoneKind[TimeZoneKind.Local=0]="Local",TimeZoneKind[TimeZoneKind.Offset=1]="Offset",TimeZoneKind[TimeZoneKind.Proper=2]="Proper"}(TimeZoneKind||(exports.TimeZoneKind=TimeZoneKind={}));var TimeZone=function(){function TimeZone(name,dst){void 0===dst&&(dst=!0),this.classKind="TimeZone",this._name=name,this._dst=dst,"localtime"===name?this._kind=TimeZoneKind.Local:"+"===name.charAt(0)||"-"===name.charAt(0)||name.charAt(0).match(/\d/)||"Z"===name?(this._kind=TimeZoneKind.Offset,this._offset=TimeZone.stringToOffset(name)):(this._kind=TimeZoneKind.Proper,(0,assert_1.default)(tz_database_1.TzDatabase.instance().exists(name),"NotFound.Zone","non-existing time zone name '%s'",name))}return TimeZone.local=function(){return TimeZone._findOrCreate("localtime",!0)},TimeZone.utc=function(){return TimeZone._findOrCreate("UTC",!0)},TimeZone.zone=function(a,dst){void 0===dst&&(dst=!0);var name="";switch(typeof a){case"string":var s=a;0<=s.indexOf("without DST")&&(dst=!1,s=s.slice(0,s.indexOf("without DST")-1)),name=TimeZone._normalizeString(s);break;case"number":s=a;(0,assert_1.default)(-1440<s&&s<1440,"Argument.Offset","TimeZone.zone(): offset out of range"),name=TimeZone.offsetToString(s);break;default:(0,error_1.throwError)("Argument.A","unexpected type for first argument: %s",typeof a)}return TimeZone._findOrCreate(name,dst)},TimeZone.prototype.clone=function(){return this},TimeZone.prototype.name=function(){return this._name},TimeZone.prototype.dst=function(){return this._dst},TimeZone.prototype.kind=function(){return this._kind},TimeZone.prototype.equals=function(other){if(this.isUtc()&&other.isUtc())return!0;switch(this._kind){case TimeZoneKind.Local:return other.kind()===TimeZoneKind.Local;case TimeZoneKind.Offset:return other.kind()===TimeZoneKind.Offset&&this._offset===other._offset;case TimeZoneKind.Proper:return other.kind()===TimeZoneKind.Proper&&this._name===other._name&&(this._dst===other._dst||!this.hasDst());default:return(0,error_1.throwError)("Assertion","unknown time zone kind")}},TimeZone.prototype.identical=function(other){switch(this._kind){case TimeZoneKind.Local:return other.kind()===TimeZoneKind.Local;case TimeZoneKind.Offset:return other.kind()===TimeZoneKind.Offset&&this._offset===other._offset;case TimeZoneKind.Proper:return other.kind()===TimeZoneKind.Proper&&this._name===other._name&&this._dst===other._dst;default:return(0,error_1.throwError)("Assertion","unknown time zone kind")}},TimeZone.prototype.isUtc=function(){switch(this._kind){case TimeZoneKind.Local:return!1;case TimeZoneKind.Offset:return 0===this._offset;case TimeZoneKind.Proper:return tz_database_1.TzDatabase.instance().zoneIsUtc(this._name);default:return(0,error_1.throwError)("Assertion","unknown time zone kind")}},TimeZone.prototype.hasDst=function(){switch(this._kind){case TimeZoneKind.Local:case TimeZoneKind.Offset:return!1;case TimeZoneKind.Proper:return tz_database_1.TzDatabase.instance().hasDst(this._name);default:return(0,error_1.throwError)("Assertion","unknown time zone kind")}},TimeZone.prototype.offsetForUtc=function(a,month,day,hour,minute,second,milli){var utcTime="number"==typeof a?new basics_1.TimeStruct({year:a,month:month,day:day,hour:hour,minute:minute,second:second,milli:milli}):void 0===a?new basics_1.TimeStruct({}):a;switch(this._kind){case TimeZoneKind.Local:return-1*new Date(Date.UTC(utcTime.components.year,utcTime.components.month-1,utcTime.components.day,utcTime.components.hour,utcTime.components.minute,utcTime.components.second,utcTime.components.milli)).getTimezoneOffset();case TimeZoneKind.Offset:return this._offset;case TimeZoneKind.Proper:return(this._dst?tz_database_1.TzDatabase.instance().totalOffset(this._name,utcTime):tz_database_1.TzDatabase.instance().standardOffset(this._name,utcTime)).minutes();default:return(0,error_1.throwError)("Assertion","unknown time zone kind")}},TimeZone.prototype.standardOffsetForUtc=function(a,month,day,hour,minute,second,milli){var utcTime="number"==typeof a?new basics_1.TimeStruct({year:a,month:month,day:day,hour:hour,minute:minute,second:second,milli:milli}):void 0===a?new basics_1.TimeStruct({}):a;switch(this._kind){case TimeZoneKind.Local:return-1*new Date(Date.UTC(utcTime.components.year,0,1,0)).getTimezoneOffset();case TimeZoneKind.Offset:return this._offset;case TimeZoneKind.Proper:return tz_database_1.TzDatabase.instance().standardOffset(this._name,utcTime).minutes();default:return(0,error_1.throwError)("Assertion","unknown time zone kind")}},TimeZone.prototype.offsetForZone=function(a,month,day,hour,minute,second,milli){var localTime="number"==typeof a?new basics_1.TimeStruct({year:a,month:month,day:day,hour:hour,minute:minute,second:second,milli:milli}):void 0===a?new basics_1.TimeStruct({}):a;switch(this._kind){case TimeZoneKind.Local:return-1*new Date(localTime.components.year,localTime.components.month-1,localTime.components.day,localTime.components.hour,localTime.components.minute,localTime.components.second,localTime.components.milli).getTimezoneOffset();case TimeZoneKind.Offset:return this._offset;case TimeZoneKind.Proper:return(this._dst?tz_database_1.TzDatabase.instance().totalOffsetLocal(this._name,localTime):tz_database_1.TzDatabase.instance().standardOffset(this._name,localTime)).minutes();default:return(0,error_1.throwError)("Assertion","unknown time zone kind")}},TimeZone.prototype.offsetForUtcDate=function(date,funcs){return this.offsetForUtc(basics_1.TimeStruct.fromDate(date,funcs))},TimeZone.prototype.offsetForZoneDate=function(date,funcs){return this.offsetForZone(basics_1.TimeStruct.fromDate(date,funcs))},TimeZone.prototype.abbreviationForUtc=function(a,b,day,hour,minute,second,milli,c){var utcTime,dstDependent=!0,dstDependent="number"!=typeof a&&a?(utcTime=a,!1!==b):(utcTime=new basics_1.TimeStruct({year:a,month:b,day:day,hour:hour,minute:minute,second:second,milli:milli}),!1!==c);switch(this._kind){case TimeZoneKind.Local:return"local";case TimeZoneKind.Offset:return this.toString();case TimeZoneKind.Proper:return tz_database_1.TzDatabase.instance().abbreviation(this._name,utcTime,dstDependent);default:return(0,error_1.throwError)("Assertion","unknown time zone kind")}},TimeZone.prototype.normalizeZoneTime=function(localTime,opt){opt=(opt=void 0===opt?tz_database_1.NormalizeOption.Up:opt)===tz_database_1.NormalizeOption.Down?tz_database_1.NormalizeOption.Down:tz_database_1.NormalizeOption.Up;return this.kind()===TimeZoneKind.Proper?"number"==typeof localTime?tz_database_1.TzDatabase.instance().normalizeLocal(this._name,new basics_1.TimeStruct(localTime),opt).unixMillis:tz_database_1.TzDatabase.instance().normalizeLocal(this._name,localTime,opt):localTime},TimeZone.prototype.toString=function(){var result=this.name();return this.kind()===TimeZoneKind.Proper&&this.hasDst()&&!this.dst()&&(result+=" without DST"),result},TimeZone.offsetToString=function(offset){(0,assert_1.default)(Number.isFinite(offset)&&-1440<=offset&&offset<=1440,"Argument.Offset","invalid offset %d",offset);var sign=offset<0?"-":"+",hours=Math.floor(Math.abs(offset)/60),offset=Math.floor(Math.abs(offset)%60);return sign+strings.padLeft(hours.toString(10),2,"0")+":"+strings.padLeft(offset.toString(10),2,"0")},TimeZone.stringToOffset=function(s){var t=s.trim();if("Z"===t)return 0;(0,assert_1.default)(t.match(/^[+-]\d$/)||t.match(/^[+-]\d\d$/)||t.match(/^[+-]\d\d(:?)\d\d$/),"Argument.S",'Wrong time zone format: "'+t+'"');var s="+"===t.charAt(0)?1:-1,hours=0,minutes=0;switch(t.length){case 2:hours=parseInt(t.slice(1,2),10);break;case 3:hours=parseInt(t.slice(1,3),10);break;case 5:hours=parseInt(t.slice(1,3),10),minutes=parseInt(t.slice(3,5),10);break;case 6:hours=parseInt(t.slice(1,3),10),minutes=parseInt(t.slice(4,6),10)}return(0,assert_1.default)(0<=hours&&hours<24,"Argument.S","Invalid time zone (hours out of range): '".concat(t,"'")),(0,assert_1.default)(0<=minutes&&minutes<60,"Argument.S","Invalid time zone (minutes out of range): '".concat(t,"'")),s*(60*hours+minutes)},TimeZone._findOrCreate=function(name,dst){var key=name+(dst?"_DST":"_NO-DST");return key in TimeZone._cache?TimeZone._cache[key]:(name=new TimeZone(name,dst),TimeZone._cache[key]=name)},TimeZone._normalizeString=function(s){s=s.trim();if((0,assert_1.default)(0<s.length,"Argument.S","Empty time zone string given"),"localtime"===s)return s;if("Z"===s)return"+00:00";if(!TimeZone._isOffsetString(s))return s;try{return TimeZone.offsetToString(TimeZone.stringToOffset(s))}catch(e){throw e=(0,error_1.errorIs)(e,"Argument.Offset")?(0,error_1.error)("Argument.S",e.message):e}},TimeZone._isOffsetString=function(s){s=s.trim();return"+"===s.charAt(0)||"-"===s.charAt(0)||"Z"===s},TimeZone._cache={},TimeZone}();exports.TimeZone=TimeZone,exports.isTimeZone=function(value){return"object"==typeof value&&null!==value&&"TimeZone"===value.classKind}},{"./assert":1,"./basics":2,"./error":5,"./strings":13,"./tz-database":17}],16:[function(require,module,exports){var TokenType;Object.defineProperty(exports,"__esModule",{value:!0}),exports.tokenize=exports.TokenType=void 0,function(TokenType){TokenType[TokenType.IDENTITY=0]="IDENTITY",TokenType[TokenType.ERA=1]="ERA",TokenType[TokenType.YEAR=2]="YEAR",TokenType[TokenType.QUARTER=3]="QUARTER",TokenType[TokenType.MONTH=4]="MONTH",TokenType[TokenType.WEEK=5]="WEEK",TokenType[TokenType.DAY=6]="DAY",TokenType[TokenType.WEEKDAY=7]="WEEKDAY",TokenType[TokenType.DAYPERIOD=8]="DAYPERIOD",TokenType[TokenType.HOUR=9]="HOUR",TokenType[TokenType.MINUTE=10]="MINUTE",TokenType[TokenType.SECOND=11]="SECOND",TokenType[TokenType.ZONE=12]="ZONE"}(TokenType||(exports.TokenType=TokenType={})),exports.tokenize=function(formatString){if(!formatString)return[];for(var result=[],appendToken=function(tokenString,raw){for(;""!==tokenString;)if(raw||!SYMBOL_MAPPING.hasOwnProperty(tokenString[0])){var token={length:tokenString.length,raw:tokenString,symbol:tokenString[0],type:TokenType.IDENTITY};result.push(token),tokenString=""}else{var info=SYMBOL_MAPPING[tokenString[0]],length_1=void 0;if(void 0!==info.maxLength||Array.isArray(info.lengths)&&0!==info.lengths.length){if(void 0!==info.maxLength)length_1=Math.min(tokenString.length,info.maxLength);else if(Array.isArray(info.lengths)&&0<info.lengths.length)for(var _i=0,_a=info.lengths;_i<_a.length;_i++){var l=_a[_i];l<=tokenString.length&&(void 0===length_1||length_1<l)&&(length_1=l)}}else length_1=tokenString.length;tokenString=void 0===length_1?(token={length:tokenString.length,raw:tokenString,symbol:tokenString[0],type:TokenType.IDENTITY},result.push(token),""):(token={length:length_1,raw:tokenString.slice(0,length_1),symbol:tokenString[0],type:info.type},result.push(token),tokenString.slice(length_1))}},currentToken="",previousChar="",quoting=!1,possibleEscaping=!1,_i=0,formatString_1=formatString;_i<formatString_1.length;_i++){var currentChar=formatString_1[_i];"'"===currentChar?(possibleEscaping=quoting?!possibleEscaping||(currentToken+=currentChar,!1):!possibleEscaping||(currentChar!==previousChar&&(appendToken(currentToken),currentToken=""),currentToken+="'",!1))||(previousChar=currentChar):(possibleEscaping&&(possibleEscaping=!1,appendToken(currentToken,!(quoting=!quoting)),currentToken=""),previousChar=(!quoting&¤tChar!==previousChar?(appendToken(currentToken),currentToken=currentChar):currentToken+=currentChar,currentChar))}return appendToken(currentToken,quoting),result};var SYMBOL_MAPPING={G:{type:TokenType.ERA,maxLength:5},y:{type:TokenType.YEAR},Y:{type:TokenType.YEAR},u:{type:TokenType.YEAR},U:{type:TokenType.YEAR,maxLength:5},r:{type:TokenType.YEAR},Q:{type:TokenType.QUARTER,maxLength:5},q:{type:TokenType.QUARTER,maxLength:5},M:{type:TokenType.MONTH,maxLength:5},L:{type:TokenType.MONTH,maxLength:5},l:{type:TokenType.MONTH,maxLength:1},w:{type:TokenType.WEEK,maxLength:2},W:{type:TokenType.WEEK,maxLength:1},d:{type:TokenType.DAY,maxLength:2},D:{type:TokenType.DAY,maxLength:3},F:{type:TokenType.DAY,maxLength:1},g:{type:TokenType.DAY},E:{type:TokenType.WEEKDAY,maxLength:6},e:{type:TokenType.WEEKDAY,maxLength:6},c:{type:TokenType.WEEKDAY,maxLength:6},a:{type:TokenType.DAYPERIOD,maxLength:5},b:{type:TokenType.DAYPERIOD,maxLength:5},B:{type:TokenType.DAYPERIOD,maxLength:5},h:{type:TokenType.HOUR,maxLength:2},H:{type:TokenType.HOUR,maxLength:2},k:{type:TokenType.HOUR,maxLength:2},K:{type:TokenType.HOUR,maxLength:2},j:{type:TokenType.HOUR,maxLength:6},J:{type:TokenType.HOUR,maxLength:2},m:{type:TokenType.MINUTE,maxLength:2},s:{type:TokenType.SECOND,maxLength:2},S:{type:TokenType.SECOND},A:{type:TokenType.SECOND},z:{type:TokenType.ZONE,maxLength:4},Z:{type:TokenType.ZONE,maxLength:5},O:{type:TokenType.ZONE,lengths:[1,4]},v:{type:TokenType.ZONE,lengths:[1,4]},V:{type:TokenType.ZONE,maxLength:4},X:{type:TokenType.ZONE,maxLength:5},x:{type:TokenType.ZONE,maxLength:5}}},{}],17:[function(require,module,exports){!function(global){!function(){var ToType,OnType,AtType,RuleType,TzMonthNames,TzDayNames,__spreadArray=this&&this.__spreadArray||function(to,from,pack){if(pack||2===arguments.length)for(var ar,i=0,l=from.length;i<l;i++)!ar&&i in from||((ar=ar||Array.prototype.slice.call(from,0,i))[i]=from[i]);return to.concat(ar||Array.prototype.slice.call(from))},assert_1=(Object.defineProperty(exports,"__esModule",{value:!0}),exports.TzDatabase=exports.NormalizeOption=exports.Transition=exports.isValidOffsetString=exports.ZoneInfo=exports.RuleType=exports.RuleInfo=exports.AtType=exports.OnType=exports.ToType=void 0,require("./assert")),basics_1=require("./basics"),basics=require("./basics"),duration_1=require("./duration"),error_1=require("./error"),math=require("./math"),RuleInfo=(!function(ToType){ToType[ToType.Year=0]="Year",ToType[ToType.Max=1]="Max"}(ToType||(exports.ToType=ToType={})),!function(OnType){OnType[OnType.DayNum=0]="DayNum",OnType[OnType.LastX=1]="LastX",OnType[OnType.GreqX=2]="GreqX",OnType[OnType.LeqX=3]="LeqX"}(OnType||(exports.OnType=OnType={})),!function(AtType){AtType[AtType.Standard=0]="Standard",AtType[AtType.Wall=1]="Wall",AtType[AtType.Utc=2]="Utc"}(AtType||(exports.AtType=AtType={})),function(){function RuleInfo(from,toType,toYear,type,inMonth,onType,onDay,onWeekDay,atHour,atMinute,atSecond,atType,save,letter){this.from=from,this.toType=toType,this.toYear=toYear,this.type=type,this.inMonth=inMonth,this.onType=onType,this.onDay=onDay,this.onWeekDay=onWeekDay,this.atHour=atHour,this.atMinute=atMinute,this.atSecond=atSecond,this.atType=atType,this.save=save,this.letter=letter,this.save&&(this.save=this.save.convert(basics_1.TimeUnit.Hour))}return RuleInfo.prototype.applicable=function(year){if(year<this.from)return!1;switch(this.toType){case ToType.Max:return!0;case ToType.Year:return year<=this.toYear}},RuleInfo.prototype.effectiveLess=function(other){return this.from<other.from||!(this.from>other.from)&&(this.inMonth<other.inMonth||!(this.inMonth>other.inMonth)&&this.effectiveDate(this.from)<other.effectiveDate(this.from))},RuleInfo.prototype.effectiveEqual=function(other){return this.from===other.from&&this.inMonth===other.inMonth&&!!this.effectiveDate(this.from).equals(other.effectiveDate(this.from))},RuleInfo.prototype.effectiveDate=function(year){(0,assert_1.default)(this.applicable(year),"timezonecomplete.NotApplicable","Rule is not applicable in %d",year);var y=year,m=this.inMonth,d=0;switch(this.onType){case OnType.DayNum:d=this.onDay;break;case OnType.GreqX:try{d=basics.weekDayOnOrAfter(y,m,this.onDay,this.onWeekDay)}catch(e){(0,error_1.errorIs)(e,"NotFound")&&(m+1<=12?m+=1:y+=m=1,d=basics.firstWeekDayOfMonth(y,m,this.onWeekDay))}break;case OnType.LeqX:try{d=basics.weekDayOnOrBefore(y,m,this.onDay,this.onWeekDay)}catch(e){(0,error_1.errorIs)(e,"NotFound")&&(1<m?m-=1:(m=12,y-=1),d=basics.lastWeekDayOfMonth(y,m,this.onWeekDay))}break;case OnType.LastX:d=basics.lastWeekDayOfMonth(y,m,this.onWeekDay)}return basics_1.TimeStruct.fromComponents(y,m,d,this.atHour,this.atMinute,this.atSecond)},RuleInfo.prototype.effectiveDateUtc=function(year,standardOffset,dstOffset){var d=this.effectiveDate(year);switch(this.atType){case AtType.Utc:return d;case AtType.Standard:var millis=d.unixMillis;return millis-=standardOffset.milliseconds(),new basics_1.TimeStruct(millis);case AtType.Wall:millis=d.unixMillis;return millis-=standardOffset.milliseconds(),dstOffset&&(millis-=dstOffset.milliseconds()),new basics_1.TimeStruct(millis)}},RuleInfo}()),ZoneInfo=(exports.RuleInfo=RuleInfo,!function(RuleType){RuleType[RuleType.None=0]="None",RuleType[RuleType.Offset=1]="Offset",RuleType[RuleType.RuleName=2]="RuleName"}(RuleType||(exports.RuleType=RuleType={})),function(gmtoff,ruleType,ruleOffset,ruleName,format,until){this.gmtoff=gmtoff,this.ruleType=ruleType,this.ruleOffset=ruleOffset,this.ruleName=ruleName,this.format=format,this.until=until,this.ruleOffset&&(this.ruleOffset=this.ruleOffset.convert(basics.TimeUnit.Hour))});function isValidOffsetString(s){return/^(\-|\+)?([0-9]+((\:[0-9]+)?(\:[0-9]+(\.[0-9]+)?)?))$/.test(s)}exports.ZoneInfo=ZoneInfo,function(TzMonthNames){TzMonthNames[TzMonthNames.Jan=1]="Jan",TzMonthNames[TzMonthNames.Feb=2]="Feb",TzMonthNames[TzMonthNames.Mar=3]="Mar",TzMonthNames[TzMonthNames.Apr=4]="Apr",TzMonthNames[TzMonthNames.May=5]="May",TzMonthNames[TzMonthNames.Jun=6]="Jun",TzMonthNames[TzMonthNames.Jul=7]="Jul",TzMonthNames[TzMonthNames.Aug=8]="Aug",TzMonthNames[TzMonthNames.Sep=9]="Sep",TzMonthNames[TzMonthNames.Oct=10]="Oct",TzMonthNames[TzMonthNames.Nov=11]="Nov",TzMonthNames[TzMonthNames.Dec=12]="Dec"}(TzMonthNames=TzMonthNames||{}),function(TzDayNames){TzDayNames[TzDayNames.Sun=0]="Sun",TzDayNames[TzDayNames.Mon=1]="Mon",TzDayNames[TzDayNames.Tue=2]="Tue",TzDayNames[TzDayNames.Wed=3]="Wed",TzDayNames[TzDayNames.Thu=4]="Thu",TzDayNames[TzDayNames.Fri=5]="Fri",TzDayNames[TzDayNames.Sat=6]="Sat"}(TzDayNames=TzDayNames||{}),exports.isValidOffsetString=isValidOffsetString;exports.Transition=function(at,offset,letter){this.at=at,this.offset=offset,this.letter=letter,this.offset&&(this.offset=this.offset.convert(basics.TimeUnit.Hour))},function(NormalizeOption){NormalizeOption[NormalizeOption.Up=0]="Up",NormalizeOption[NormalizeOption.Down=1]="Down"}(NormalizeOption||(exports.NormalizeOption=NormalizeOption={}));var NormalizeOption,TzDatabase=function(){function TzDatabase(data){var _this=this;this._zoneInfoCache={},this._ruleInfoCache={},this._zoneTransitionsCache=new Map,this._ruleTransitionsCache=new Map,(0,assert_1.default)(!TzDatabase._instance,"AlreadyCreated","You should not create an instance of the TzDatabase class yourself. Use TzDatabase.instance()"),(0,assert_1.default)(0<data.length,"InvalidTimeZoneData","Timezonecomplete needs time zone data. You need to install one of the tzdata NPM modules before using timezonecomplete."),1===data.length?this._data=data[0]:(this._data={zones:{},rules:{}},data.forEach(function(d){if(d&&d.rules&&d.zones){for(var _i=0,_a=Object.keys(d.rules);_i<_a.length;_i++){var key=_a[_i];_this._data.rules[key]=d.rules[key]}for(var _b=0,_c=Object.keys(d.zones);_b<_c.length;_b++){key=_c[_b];_this._data.zones[key]=d.zones[key]}}})),this._minmax=function(data){var zoneName,ruleName,result={};for(zoneName in(0,assert_1.default)("object"==typeof data,"InvalidTimeZoneData","time zone data should be an object"),(0,assert_1.default)(data.hasOwnProperty("rules"),"InvalidTimeZoneData","time zone data should be an object with a 'rules' property"),(0,assert_1.default)(data.hasOwnProperty("zones"),"InvalidTimeZoneData","time zone data should be an object with a 'zones' property"),data.zones)if(data.zones.hasOwnProperty(zoneName)){var zoneArr=data.zones[zoneName];if("string"==typeof zoneArr)(0,assert_1.default)(data.zones.hasOwnProperty(zoneArr),"InvalidTimeZoneData",'Entry for zone "%s" links to "%s" but that doesn\'t exist',zoneName,zoneArr);else{if(!Array.isArray(zoneArr))return(0,error_1.throwError)("InvalidTimeZoneData",'Entry for zone "%s" is neither a string nor an array',zoneName);for(var i=0;i<zoneArr.length;i++){var entry=zoneArr[i];if(!Array.isArray(entry))return(0,error_1.throwError)("InvalidTimeZoneData","Entry "+i.toString(10)+' for zone "'+zoneName+'" is not an array');if(4!==entry.length)return(0,error_1.throwError)("InvalidTimeZoneData","Entry "+i.toString(10)+' for zone "'+zoneName+'" has length != 4');if("string"!=typeof entry[0])return(0,error_1.throwError)("InvalidTimeZoneData","Entry "+i.toString(10)+' for zone "'+zoneName+'" first column is not a string');var gmtoff=math.filterFloat(entry[0]);if(isNaN(gmtoff))return(0,error_1.throwError)("InvalidTimeZoneData","Entry "+i.toString(10)+' for zone "'+zoneName+'" first column does not contain a number');if("string"!=typeof entry[1])return(0,error_1.throwError)("InvalidTimeZoneData","Entry "+i.toString(10)+' for zone "'+zoneName+'" second column is not a string');if("string"!=typeof entry[2])return(0,error_1.throwError)("InvalidTimeZoneData","Entry "+i.toString(10)+' for zone "'+zoneName+'" third column is not a string');if("string"!=typeof entry[3]&&null!==entry[3])return(0,error_1.throwError)("InvalidTimeZoneData","Entry "+i.toString(10)+' for zone "'+zoneName+'" fourth column is not a string nor null');if("string"==typeof entry[3]&&isNaN(math.filterFloat(entry[3])))return(0,error_1.throwError)("InvalidTimeZoneData","Entry "+i.toString(10)+' for zone "'+zoneName+'" fourth column does not contain a number');(void 0===result.maxGmtOff||result.maxGmtOff<gmtoff)&&(result.maxGmtOff=gmtoff),(void 0===result.minGmtOff||gmtoff<result.minGmtOff)&&(result.minGmtOff=gmtoff)}}}for(ruleName in data.rules)if(data.rules.hasOwnProperty(ruleName)){var ruleArr=data.rules[ruleName];if(!Array.isArray(ruleArr))return(0,error_1.throwError)("InvalidTimeZoneData",'Entry for rule "'+ruleName+'" is not an array');for(i=0;i<ruleArr.length;i++){var rule=ruleArr[i];if(!Array.isArray(rule))return(0,error_1.throwError)("InvalidTimeZoneData","Rule "+ruleName+"["+i.toString(10)+"] is not an array");if(rule.length<8)return(0,error_1.throwError)("InvalidTimeZoneData","Rule "+ruleName+"["+i.toString(10)+"] is not of length 8");for(var j=0;j<rule.length;j++)if(5!==j&&"string"!=typeof rule[j])return(0,error_1.throwError)("InvalidTimeZoneData","Rule "+ruleName+"["+i.toString(10)+"]["+j.toString(10)+"] is not a string");if("NaN"!==rule[0]&&isNaN(parseInt(rule[0],10)))return(0,error_1.throwError)("InvalidTimeZoneData","Rule "+ruleName+"["+i.toString(10)+"][0] is not a number");if("only"!==rule[1]&&"max"!==rule[1]&&isNaN(parseInt(rule[1],10)))return(0,error_1.throwError)("InvalidTimeZoneData","Rule "+ruleName+"["+i.toString(10)+"][1] is not a number, only or max");if(!TzMonthNames.hasOwnProperty(rule[3]))return(0,error_1.throwError)("InvalidTimeZoneData","Rule "+ruleName+"["+i.toString(10)+"][3] is not a month name");if("last"!==rule[4].substr(0,4)&&-1===rule[4].indexOf(">=")&&-1===rule[4].indexOf("<=")&&isNaN(parseInt(rule[4],10)))return(0,error_1.throwError)("InvalidTimeZoneData","Rule "+ruleName+"["+i.toString(10)+"][4] is not a known type of expression");if(!Array.isArray(rule[5]))return(0,error_1.throwError)("InvalidTimeZoneData","Rule "+ruleName+"["+i.toString(10)+"][5] is not an array");if(4!==rule[5].length)return(0,error_1.throwError)("InvalidTimeZoneData","Rule "+ruleName+"["+i.toString(10)+"][5] is not of length 4");if(isNaN(parseInt(rule[5][0],10)))return(0,error_1.throwError)("InvalidTimeZoneData","Rule "+ruleName+"["+i.toString(10)+"][5][0] is not a number");if(isNaN(parseInt(rule[5][1],10)))return(0,error_1.throwError)("InvalidTimeZoneData","Rule "+ruleName+"["+i.toString(10)+"][5][1] is not a number");if(isNaN(parseInt(rule[5][2],10)))return(0,error_1.throwError)("InvalidTimeZoneData","Rule "+ruleName+"["+i.toString(10)+"][5][2] is not a number");if(""!==rule[5][3]&&"s"!==rule[5][3]&&"w"!==rule[5][3]&&"g"!==rule[5][3]&&"u"!==rule[5][3]&&"z"!==rule[5][3]&&null!==rule[5][3])return(0,error_1.throwError)("InvalidTimeZoneData","Rule "+ruleName+"["+i.toString(10)+"][5][3] is not empty, g, z, s, w, u or null");var save=parseInt(rule[6],10);if(isNaN(save))return(0,error_1.throwError)("InvalidTimeZoneData","Rule "+ruleName+"["+i.toString(10)+"][6] does not contain a valid number");0!==save&&((void 0===result.maxDstSave||result.maxDstSave<save)&&(result.maxDstSave=save),void 0===result.minDstSave||save<result.minDstSave)&&(result.minDstSave=save)}}return result}(this._data)}return TzDatabase.init=function(data){if(TzDatabase._instance=void 0,data)TzDatabase._instance=new TzDatabase(Array.isArray(data)?data:[data]);else{var data_1=[],g=void 0;if(g="undefined"!=typeof window?window:void 0!==global?global:"undefined"!=typeof self?self:{})for(var _i=0,_a=Object.keys(g);_i<_a.length;_i++){var key=_a[_i];key.startsWith("tzdata")&&"object"==typeof g[key]&&g[key].rules&&g[key].zones&&data_1.push(g[key])}0===data_1.length&&"object"==typeof module&&"object"==typeof module.exports&&!function(require){try{var d=require("tzdata");data_1.push(d)}catch(e){["tzdata-africa","tzdata-antarctica","tzdata-asia","tzdata-australasia","tzdata-backward","tzdata-backward-utc","tzdata-etcetera","tzdata-europe","tzdata-northamerica","tzdata-pacificnew","tzdata-southamerica","tzdata-systemv"].forEach(function(moduleName){try{var d=require(moduleName);data_1.push(d)}catch(e){}})}}(require),TzDatabase._instance=new TzDatabase(data_1)}},TzDatabase.instance=function(){return TzDatabase._instance||TzDatabase.init(),TzDatabase._instance},TzDatabase.prototype.zoneNames=function(){return this._zoneNames||(this._zoneNames=Object.keys(this._data.zones),this._zoneNames.sort()),this._zoneNames},TzDatabase.prototype.exists=function(zoneName){return this._data.zones.hasOwnProperty(zoneName)},TzDatabase.prototype.minDstSave=function(zoneName){try{if(zoneName){for(var zoneInfos=this.getZoneInfos(zoneName),result=void 0,ruleNames=[],_i=0,zoneInfos_1=zoneInfos;_i<zoneInfos_1.length;_i++){var zoneInfo=zoneInfos_1[_i];if(zoneInfo.ruleType!==RuleType.Offset||result&&!result.greaterThan(zoneInfo.ruleOffset)||0!==zoneInfo.ruleOffset.milliseconds()&&(result=zoneInfo.ruleOffset),zoneInfo.ruleType===RuleType.RuleName&&-1===ruleNames.indexOf(zoneInfo.ruleName)){ruleNames.push(zoneInfo.ruleName);for(var temp=this.getRuleInfos(zoneInfo.ruleName),_a=0,temp_1=temp;_a<temp_1.length;_a++){var ruleInfo=temp_1[_a];result&&!result.greaterThan(ruleInfo.save)||0!==ruleInfo.save.milliseconds()&&(result=ruleInfo.save)}}}return(result=result||duration_1.Duration.hours(0)).clone()}return duration_1.Duration.minutes(this._minmax.minDstSave)}catch(e){throw e=(0,error_1.errorIs)(e,["NotFound.Rule","Argument.N"])?(0,error_1.error)("InvalidTimeZoneData",e.message):e}},TzDatabase.prototype.maxDstSave=function(zoneName){try{if(zoneName){for(var zoneInfos=this.getZoneInfos(zoneName),result=void 0,ruleNames=[],_i=0,zoneInfos_2=zoneInfos;_i<zoneInfos_2.length;_i++){var zoneInfo=zoneInfos_2[_i];if(zoneInfo.ruleType!==RuleType.Offset||result&&!result.lessThan(zoneInfo.ruleOffset)||(result=zoneInfo.ruleOffset),zoneInfo.ruleType===RuleType.RuleName&&-1===ruleNames.indexOf(zoneInfo.ruleName)){ruleNames.push(zoneInfo.ruleName);for(var temp=this.getRuleInfos(zoneInfo.ruleName),_a=0,temp_2=temp;_a<temp_2.length;_a++){var ruleInfo=temp_2[_a];result&&!result.lessThan(ruleInfo.save)||(result=ruleInfo.save)}}}return(result=result||duration_1.Duration.hours(0)).clone()}return duration_1.Duration.minutes(this._minmax.maxDstSave)}catch(e){throw e=(0,error_1.errorIs)(e,["NotFound.Rule","Argument.N"])?(0,error_1.error)("InvalidTimeZoneData",e.message):e}},TzDatabase.prototype.hasDst=function(zoneName){return 0!==this.maxDstSave(zoneName).milliseconds()},TzDatabase.prototype.nextDstChange=function(zoneName,a){var utcTime="number"==typeof a?new basics_1.TimeStruct(a):a,zone=this._getZoneTransitions(zoneName),iterator=zone.findFirst();if(iterator&&iterator.transition.atUtc>utcTime)return iterator.transition.atUtc.unixMillis;for(;iterator;)if((iterator=zone.findNext(iterator))&&iterator.transition.atUtc>utcTime)return iterator.transition.atUtc.unixMillis},TzDatabase.prototype.zoneIsUtc=function(zoneName){for(var actualZoneName=zoneName,zoneEntries=this._data.zones[zoneName];"string"==typeof zoneEntries;){if(!this._data.zones.hasOwnProperty(zoneEntries))throw new Error('Zone "'+zoneEntries+'" not found (referred to in link from "'+zoneName+'" via "'+actualZoneName+'"');actualZoneName=zoneEntries,zoneEntries=this._data.zones[actualZoneName]}return"Etc/UTC"===actualZoneName||"Etc/GMT"===actualZoneName||"Etc/UCT"===actualZoneName},TzDatabase.prototype.normalizeLocal=function(zoneName,a,opt){if(void 0===opt&&(opt=NormalizeOption.Up),this.hasDst(zoneName))for(var localTime="number"==typeof a?new basics_1.TimeStruct(a):a,zoneName=this._getZoneTransitions(zoneName).transitionsInYears(localTime.components.year-1,localTime.components.year+1),prev=duration_1.Duration.hours(0),_i=0,transitions_1=zoneName;_i<transitions_1.length;_i++){var transition=transitions_1[_i],offset=transition.newState.dstOffset.add(transition.newState.standardOffset);if(offset.greaterThan(prev)){var localBefore=transition.atUtc.unixMillis+prev.milliseconds(),transition=transition.atUtc.unixMillis+offset.milliseconds();if(localTime.unixMillis>=localBefore&&localTime.unixMillis<transition)return localBefore=offset.sub(prev),transition=opt===NormalizeOption.Up?1:-1,transition=localTime.unixMillis+transition*localBefore.milliseconds(),"number"==typeof a?transition:new basics_1.TimeStruct(transition)}prev=offset}return"number"==typeof a?a:a.clone()},TzDatabase.prototype.standardOffset=function(zoneName,utcTime){return this.getZoneInfo(zoneName,utcTime).gmtoff.clone()},TzDatabase.prototype.totalOffset=function(zoneName,utcTime){utcTime="number"==typeof utcTime?new basics_1.TimeStruct(utcTime):utcTime,zoneName=this._getZoneTransitions(zoneName).stateAt(utcTime);return zoneName.dstOffset.add(zoneName.standardOffset)},TzDatabase.prototype.abbreviation=function(zoneName,utcTime,dstDependent){void 0===dstDependent&&(dstDependent=!0);var u="number"==typeof utcTime?new basics_1.TimeStruct(utcTime):utcTime,zone=this._getZoneTransitions(zoneName);if(dstDependent)return zone.stateAt(u).abbreviation;var lastNonDst=0===zone.initialState.dstOffset.milliseconds()?zone.initialState.abbreviation:"",iterator=zone.findFirst();for(0===(null==iterator?void 0:iterator.transition.newState.dstOffset.milliseconds())&&(lastNonDst=iterator.transition.newState.abbreviation);iterator&&iterator.transition.atUtc<=u;)0===(null==(iterator=zone.findNext(iterator))?void 0:iterator.transition.newState.dstOffset.milliseconds())&&(lastNonDst=iterator.transition.newState.abbreviation);return lastNonDst},TzDatabase.prototype.standardOffsetLocal=function(zoneName,localTime){for(var unixMillis="number"==typeof localTime?localTime:localTime.unixMillis,_i=0,zoneInfos_3=this.getZoneInfos(zoneName);_i<zoneInfos_3.length;_i++){var zoneInfo=zoneInfos_3[_i];if(void 0===zoneInfo.until||zoneInfo.until+zoneInfo.gmtoff.milliseconds()>unixMillis)return zoneInfo.gmtoff.clone()}return(0,error_1.throwError)("InvalidTimeZoneData","No zone info found")},TzDatabase.prototype.totalOffsetLocal=function(zoneName,localTime){for(var prev,prevPrev,prevPrevOffset,diff,localTime="number"==typeof localTime?new basics_1.TimeStruct(localTime):localTime,normalizedTm=this.normalizeLocal(zoneName,localTime),localTime=this._getZoneTransitions(zoneName),_i=0,transitions_2=localTime.transitionsInYears(normalizedTm.components.year-1,normalizedTm.components.year+2);_i<transitions_2.length;_i++){var transition=transitions_2[_i],offset=transition.newState.dstOffset.add(transition.newState.standardOffset);if(transition.atUtc.unixMillis+offset.milliseconds()>normalizedTm.unixMillis)break;prevPrev=prev,prev=transition}return prev?(zoneName=prev.newState.dstOffset.add(prev.newState.standardOffset),prevPrevOffset=prevPrev?prevPrev.newState.dstOffset.add(prevPrev.newState.standardOffset):void 0,(prevPrev&&void 0!==prevPrevOffset&&prevPrevOffset.greaterThan(zoneName)&&(diff=prevPrevOffset.sub(zoneName),normalizedTm.unixMillis>=prev.atUtc.unixMillis+zoneName.milliseconds())&&normalizedTm.unixMillis<prev.atUtc.unixMillis+zoneName.milliseconds()+diff.milliseconds()?prevPrevOffset:zoneName).clone()):(diff=localTime.stateAt(normalizedTm)).dstOffset.add(diff.standardOffset)},TzDatabase.prototype.dstOffsetForRule=function(ruleName,utcTime,standardOffset){for(var offset,ts="number"==typeof utcTime?new basics_1.TimeStruct(utcTime):utcTime,transitions=this.getTransitionsDstOffsets(ruleName,ts.components.year-1,ts.components.year,standardOffset),i=transitions.length-1;0<=i;i--){var transition=transitions[i];if(transition.at<=ts.unixMillis){offset=transition.offset.clone();break}}return offset=offset||duration_1.Duration.minutes(0)},TzDatabase.prototype.letterForRule=function(ruleName,utcTime,standardOffset){for(var letter,ts="number"==typeof utcTime?new basics_1.TimeStruct(utcTime):utcTime,transitions=this.getTransitionsDstOffsets(ruleName,ts.components.year-1,ts.components.year,standardOffset),i=transitions.length-1;0<=i;i--){var transition=transitions[i];if(transition.at<=ts.unixMillis){letter=transition.letter;break}}return letter=letter||""},TzDatabase.prototype.getTransitionsDstOffsets=function(ruleName,fromYear,toYear,standardOffset){(0,assert_1.default)(fromYear<=toYear,"Argument.FromYear","fromYear must be <= toYear");for(var rules=this._getRuleTransitions(ruleName),result=[],prevDst=(0,duration_1.hours)(0),iterator=rules.findFirst();iterator&&iterator.transition.at.year<=toYear;)iterator.transition.at.year>=fromYear&&iterator.transition.at.year<=toYear&&result.push({at:ruleTransitionUtc(iterator.transition,standardOffset,prevDst).unixMillis,letter:iterator.transition.newState.letter||"",offset:iterator.transition.newState.dstOffset}),prevDst=iterator.transition.newState.dstOffset,iterator=rules.findNext(iterator);return result.sort(function(a,b){return a.at-b.at}),result},TzDatabase.prototype.getTransitionsTotalOffsets=function(zoneName,fromYear,toYear){(0,assert_1.default)(fromYear<=toYear,"Argument.FromYear","fromYear must be <= toYear");for(var zone=this._getZoneTransitions(zoneName),result=[],zoneName=zone.stateAt(new basics_1.TimeStruct({year:fromYear,month:1,day:1})),iterator=(result.push({at:new basics_1.TimeStruct({year:fromYear}).unixMillis,letter:zoneName.letter,offset:zoneName.dstOffset.add(zoneName.standardOffset)}),zone.findFirst());iterator&&iterator.transition.atUtc.year<=toYear;)iterator.transition.atUtc.year>=fromYear&&result.push({at:iterator.transition.atUtc.unixMillis,letter:iterator.transition.newState.letter||"",offset:iterator.transition.newState.dstOffset.add(iterator.transition.newState.standardOffset)}),iterator=zone.findNext(iterator);return result.sort(function(a,b){return a.at-b.at}),result},TzDatabase.prototype.getZoneInfo=function(zoneName,utcTime){for(var unixMillis="number"==typeof utcTime?utcTime:utcTime.unixMillis,_i=0,zoneInfos_4=this.getZoneInfos(zoneName);_i<zoneInfos_4.length;_i++){var zoneInfo=zoneInfos_4[_i];if(void 0===zoneInfo.until||zoneInfo.until>unixMillis)return zoneInfo}return(0,error_1.throwError)("NotFound.Zone","no zone info found for zone '%s'",zoneName)},TzDatabase.prototype.getZoneInfos=function(zoneName){if((0,assert_1.default)(this._data.zones.hasOwnProperty(zoneName),"NotFound.Zone","zone not found: '%s'",zoneName),this._zoneInfoCache.hasOwnProperty(zoneName))return this._zoneInfoCache[zoneName];for(var result=[],actualZoneName=zoneName,zoneEntries=this._data.zones[zoneName];"string"==typeof zoneEntries;){if(!this._data.zones.hasOwnProperty(zoneEntries))return(0,error_1.throwError)("NotFound.Zone",'Zone "'+zoneEntries+'" not found (referred to in link from "'+zoneName+'" via "'+actualZoneName+'"');actualZoneName=zoneEntries,zoneEntries=this._data.zones[actualZoneName]}for(var _i=0,zoneEntries_1=zoneEntries;_i<zoneEntries_1.length;_i++){var zoneEntry=zoneEntries_1[_i],ruleType=this.parseRuleType(zoneEntry[1]),until=math.filterFloat(zoneEntry[3]);isNaN(until)&&(until=void 0),result.push(new ZoneInfo(duration_1.Duration.minutes(-1*math.filterFloat(zoneEntry[0])),ruleType,ruleType===RuleType.Offset?new duration_1.Duration(zoneEntry[1]):new duration_1.Duration,ruleType===RuleType.RuleName?zoneEntry[1]:"",zoneEntry[2],until))}return result.sort(function(a,b){return void 0===a.until&&void 0===b.until?0:void 0!==a.until&&void 0===b.until?-1:void 0===a.until&&void 0!==b.until?1:a.until-b.until}),this._zoneInfoCache[zoneName]=result},TzDatabase.prototype.getRuleInfos=function(ruleName){if((0,assert_1.default)(this._data.rules.hasOwnProperty(ruleName),"NotFound.Rule",'Rule set "'+ruleName+'" not found.'),this._ruleInfoCache.hasOwnProperty(ruleName))return this._ruleInfoCache[ruleName];try{for(var result=[],ruleSet=this._data.rules[ruleName],_i=0,ruleSet_1=ruleSet;_i<ruleSet_1.length;_i++){var rule=ruleSet_1[_i],fromYear="NaN"===rule[0]?-1e4:parseInt(rule[0],10),toType=this.parseToType(rule[1]),toYear=toType===ToType.Max?0:"only"===rule[1]?fromYear:parseInt(rule[1],10),onType=this.parseOnType(rule[4]),onDay=this.parseOnDay(rule[4],onType),onWeekDay=this.parseOnWeekDay(rule[4]),monthNumber=function(name){for(var i=1;i<=12;++i)if(TzMonthNames[i]===name)return i;return(0,error_1.throwError)("InvalidTimeZoneData","Invalid month name '%s'",name)}(rule[3]);result.push(new RuleInfo(fromYear,toType,toYear,rule[2],monthNumber,onType,onDay,onWeekDay,math.positiveModulo(parseInt(rule[5][0],10),24),math.positiveModulo(parseInt(rule[5][1],10),60),math.positiveModulo(parseInt(rule[5][2],10),60),this.parseAtType(rule[5][3]),duration_1.Duration.minutes(parseInt(rule[6],10)),"-"===rule[7]?"":rule[7]))}return result.sort(function(a,b){return a.effectiveEqual(b)?0:a.effectiveLess(b)?-1:1}),this._ruleInfoCache[ruleName]=result}catch(e){throw e=(0,error_1.errorIs)(e,["Argument.To","Argument.N","Argument.Value","Argument.Amount"])?(0,error_1.error)("InvalidTimeZoneData",e.message):e}},TzDatabase.prototype.parseRuleType=function(rule){return"-"===rule?RuleType.None:isValidOffsetString(rule)?RuleType.Offset:RuleType.RuleName},TzDatabase.prototype.parseToType=function(to){return"max"===to?ToType.Max:"only"!==to&&isNaN(parseInt(to,10))?(0,error_1.throwError)("Argument.To","TO column incorrect: %s",to):ToType.Year},TzDatabase.prototype.parseOnType=function(on){return 4<on.length&&"last"===on.substr(0,4)?OnType.LastX:-1!==on.indexOf("<=")?OnType.LeqX:-1!==on.indexOf(">=")?OnType.GreqX:OnType.DayNum},TzDatabase.prototype.parseOnDay=function(on,onType){switch(onType){case OnType.DayNum:return parseInt(on,10);case OnType.LeqX:return parseInt(on.substr(on.indexOf("<=")+2),10);case OnType.GreqX:return parseInt(on.substr(on.indexOf(">=")+2),10);default:return 0}},TzDatabase.prototype.parseOnWeekDay=function(on){for(var i=0;i<7;i++)if(-1!==on.indexOf(TzDayNames[i]))return i;return basics_1.WeekDay.Sunday},TzDatabase.prototype.parseAtType=function(at){switch(at){case"s":return AtType.Standard;case"u":case"g":case"z":return AtType.Utc;default:return AtType.Wall}},TzDatabase.prototype._getZoneTransitions=function(zoneName){var result=this._zoneTransitionsCache.get(zoneName);return result||(result=new CachedZoneTransitions(zoneName,this.getZoneInfos(zoneName),this._getRuleTransitionsForZone(zoneName)),this._zoneTransitionsCache.set(zoneName,result)),result},TzDatabase.prototype._getRuleTransitions=function(ruleName){var result=this._ruleTransitionsCache.get(ruleName);return result||(result=new CachedRuleTransitions(this.getRuleInfos(ruleName)),this._ruleTransitionsCache.set(ruleName,result)),result},TzDatabase.prototype._getRuleTransitionsForZone=function(zoneName){for(var result=new Map,_i=0,zoneInfos_5=this.getZoneInfos(zoneName);_i<zoneInfos_5.length;_i++){var zoneInfo=zoneInfos_5[_i];zoneInfo.ruleType!==RuleType.RuleName||result.has(zoneInfo.ruleName)||result.set(zoneInfo.ruleName,this._getRuleTransitions(zoneInfo.ruleName))}return result},TzDatabase}();exports.TzDatabase=TzDatabase;var CachedRuleTransitions=function(){function CachedRuleTransitions(ruleInfos){for(var maxYear,_i=0,ruleInfos_1=ruleInfos;_i<ruleInfos_1.length;_i++)(ruleInfo=ruleInfos_1[_i]).toType===ToType.Year&&(void 0===(maxYear=void 0===maxYear||ruleInfo.toYear>maxYear?ruleInfo.toYear:maxYear)||ruleInfo.from>maxYear)&&(maxYear=ruleInfo.from);this._transitions=[];for(var _a=0,ruleInfos_2=ruleInfos;_a<ruleInfos_2.length;_a++){var ruleInfo,min=(ruleInfo=ruleInfos_2[_a]).from,max=ruleInfo.toType===ToType.Year?ruleInfo.toYear:maxYear;if(void 0!==max)for(var year=min;year<=max;++year)this._transitions.push({at:ruleInfo.effectiveDate(year),atType:ruleInfo.atType,newState:{dstOffset:ruleInfo.save,letter:ruleInfo.letter}})}this._transitions=this._transitions.sort(function(a,b){return a.at<b.at?-1:a.at>b.at?1:0}),this._finalRulesByFromEffective=ruleInfos.filter(function(info){return info.toType===ToType.Max}),this._finalRulesByEffective=__spreadArray([],this._finalRulesByFromEffective,!0),this._finalRulesByFromEffective=this._finalRulesByFromEffective.sort(function(a,b){return a.from<b.from?-1:a.from>b.from?1:(a=a.effectiveDate(a.from))<(b=b.effectiveDate(b.from))?-1:b<a?1:0}),this._finalRulesByEffective=this._finalRulesByFromEffective.sort(function(a,b){a=a.effectiveDate(a.from),b=b.effectiveDate(b.from);return a<b?-1:b<a?1:0})}return Object.defineProperty(CachedRuleTransitions.prototype,"final",{get:function(){return this._finalRulesByEffective},enumerable:!1,configurable:!0}),CachedRuleTransitions.prototype.findFirst=function(){var rule;return 0<this._transitions.length?{transition:this._transitions[0],index:0}:0<this._finalRulesByFromEffective.length?{transition:{at:(rule=this._finalRulesByFromEffective[0]).effectiveDate(rule.from),atType:rule.atType,newState:{dstOffset:rule.save,letter:rule.letter}},final:!0}:void 0},CachedRuleTransitions.prototype.findNext=function(prev){var found,foundEffective;if(!prev.final&&void 0!==prev.index&&prev.index<this._transitions.length-1)return{transition:this._transitions[prev.index+1],index:prev.index+1};for(var year=prev.transition.at.year;year<prev.transition.at.year+2;++year)for(var _i=0,_a=this._finalRulesByEffective;_i<_a.length;_i++){var effective,rule=_a[_i];rule.applicable(year)&&(effective=rule.effectiveDate(year))>prev.transition.at&&(!foundEffective||effective<foundEffective)&&(found=rule,foundEffective=effective)}if(found&&foundEffective)return{transition:{at:foundEffective,atType:found.atType,newState:{dstOffset:found.save,letter:found.letter}},final:!0}},CachedRuleTransitions.prototype.findLastLessEqual=function(beforeUtc,standardOffset){for(var prevTransition,iterator=this.findFirst(),effectiveUtc=null!=iterator&&iterator.transition?ruleTransitionUtc(iterator.transition,standardOffset,void 0):void 0;iterator&&effectiveUtc&&effectiveUtc<=beforeUtc;)prevTransition=iterator.transition,effectiveUtc=null!=(iterator=this.findNext(iterator))&&iterator.transition?ruleTransitionUtc(iterator.transition,standardOffset,void 0):void 0;return prevTransition},CachedRuleTransitions.prototype.firstTransitionWithoutDstAfter=function(afterUtc,standardOffset,dstOffset){for(var _a,iterator=this.findFirst(),effectiveUtc=null!=iterator&&iterator.transition?ruleTransitionUtc(null==iterator?void 0:iterator.transition,standardOffset,dstOffset):void 0;iterator&&effectiveUtc&&(null==(_a=null==iterator?void 0:iterator.transition)||!_a.newState.dstOffset.zero()||effectiveUtc<=afterUtc);)effectiveUtc=null!=(iterator=this.findNext(iterator))&&iterator.transition?ruleTransitionUtc(null==iterator?void 0:iterator.transition,standardOffset,dstOffset):void 0;return null==iterator?void 0:iterator.transition},CachedRuleTransitions}(),CachedZoneTransitions=function(){function CachedZoneTransitions(zoneName,zoneInfos,rules){(0,assert_1.default)(0<zoneInfos.length,"timezonecomplete.Argument.ZoneInfos","zone '%s' without information",zoneName),this._finalZoneInfo=zoneInfos[zoneInfos.length-1],this._initialState=this._calcInitialState(zoneName,zoneInfos,rules),zoneName=this._calcTransitions(zoneName,this._initialState,zoneInfos,rules),this._transitions=zoneName[0],this._finalRules=zoneName[1]}return Object.defineProperty(CachedZoneTransitions.prototype,"initialState",{get:function(){return this._initialState},enumerable:!1,configurable:!0}),CachedZoneTransitions.prototype.findFirst=function(){if(0<this._transitions.length)return{transition:this._transitions[0],index:0}},CachedZoneTransitions.prototype.findNext=function(iterator){if(!iterator.final&&iterator.index<this._transitions.length-1)return{transition:this._transitions[iterator.index+1],index:iterator.index+1};for(var found,y=iterator.transition.atUtc.year;y<iterator.transition.atUtc.year+2;++y)for(var _i=0,_a=this._finalRules;_i<_a.length;_i++){var ruleInfo=_a[_i];ruleInfo.applicable(y)&&(ruleInfo={atUtc:ruleInfo.effectiveDateUtc(y,iterator.transition.newState.standardOffset,iterator.transition.newState.dstOffset),newState:{abbreviation:zoneAbbreviation(this._finalZoneInfo.format,ruleInfo.save.nonZero(),ruleInfo.letter),letter:ruleInfo.letter,dstOffset:ruleInfo.save,standardOffset:iterator.transition.newState.standardOffset}}).atUtc>iterator.transition.atUtc&&(!found||found.atUtc>ruleInfo.atUtc)&&(found=ruleInfo)}return found?{transition:found,index:0,final:!0}:void 0},CachedZoneTransitions.prototype.stateAt=function(utc){for(var prevState=this._initialState,iterator=this.findFirst();iterator&&iterator.transition.atUtc<=utc;)prevState=iterator.transition.newState,iterator=this.findNext(iterator);return prevState},CachedZoneTransitions.prototype.transitionsInYears=function(start,end){var result=[];if(0===this._transitions.length||this._transitions[this._transitions.length-1].atUtc.year<start-1){for(var transitionsWithRules=[],year=start-1;year<end;++year)for(var _i=0,_a=this._finalRules;_i<_a.length;_i++){var transition,ruleInfo=_a[_i];ruleInfo.applicable(year)&&(transition={atUtc:ruleInfo.effectiveDateUtc(year,this._finalZoneInfo.gmtoff,(0,duration_1.hours)(0)),newState:{abbreviation:zoneAbbreviation(this._finalZoneInfo.format,ruleInfo.save.nonZero(),ruleInfo.letter),letter:ruleInfo.letter,dstOffset:ruleInfo.save,standardOffset:this._finalZoneInfo.gmtoff}},transitionsWithRules.push({transition:transition,ruleInfo:ruleInfo}))}transitionsWithRules.sort(function(a,b){return a.transition.atUtc.unixMillis-b.transition.atUtc.unixMillis});for(var prevDst=(0,duration_1.hours)(0),_b=0,transitionsWithRules_1=transitionsWithRules;_b<transitionsWithRules_1.length;_b++){var tr=transitionsWithRules_1[_b];tr.ruleInfo.atType===AtType.Wall&&(tr.transition.atUtc=new basics_1.TimeStruct(tr.transition.atUtc.unixMillis-prevDst.milliseconds())),prevDst=tr.transition.newState.dstOffset,tr.transition.atUtc.year>=start&&result.push(tr.transition)}}else for(var iterator=this.findFirst();iterator&&iterator.transition.atUtc.year<end;)iterator.transition.atUtc.year>=start&&result.push(iterator.transition),iterator=this.findNext(iterator);return result},CachedZoneTransitions.prototype._calcInitialState=function(zoneName,infos,rules){if(0===infos.length)return{abbreviation:"",letter:"",dstOffset:(0,duration_1.hours)(0),standardOffset:(0,duration_1.hours)(0)};var info=infos[0];switch(info.ruleType){case RuleType.None:return{abbreviation:zoneAbbreviation(info.format,!1,void 0),letter:"",dstOffset:(0,duration_1.hours)(0),standardOffset:info.gmtoff};case RuleType.Offset:return{abbreviation:zoneAbbreviation(info.format,info.ruleOffset.nonZero(),void 0),letter:"",dstOffset:info.ruleOffset,standardOffset:info.gmtoff};case RuleType.RuleName:for(var rule=rules.get(info.ruleName),iterator=(rule||(0,error_1.throwError)("InvalidTimeZoneData","zone '%s' refers to non-existing rule '%s'",zoneName,info.ruleName),rule.findFirst());iterator&&iterator.transition.newState.dstOffset.nonZero();)iterator=rule.findNext(iterator);var _a=null!=(_a=null==iterator?void 0:iterator.transition.newState.letter)?_a:"";return{abbreviation:zoneAbbreviation(info.format,!1,_a),dstOffset:(0,duration_1.hours)(0),letter:_a,standardOffset:info.gmtoff};default:(0,assert_1.default)(!1,"timezonecomplete.Assertion","Unknown RuleType")}},CachedZoneTransitions.prototype._calcTransitions=function(zoneName,initialState,zoneInfos,rules){if(0===zoneInfos.length)return[[],[]];for(var prevUntil,transitions=[],prevState=initialState,_i=0,zoneInfos_6=zoneInfos;_i<zoneInfos_6.length;_i++){var zoneInfo=zoneInfos_6[_i];switch(zoneInfo.ruleType){case RuleType.None:case RuleType.Offset:prevUntil&&(transitions.push({atUtc:prevUntil,newState:{abbreviation:zoneAbbreviation(zoneInfo.format,!1,void 0),letter:"",dstOffset:zoneInfo.ruleType===RuleType.None?(0,duration_1.hours)(0):zoneInfo.ruleOffset,standardOffset:zoneInfo.gmtoff}}),prevRules=void 0);break;case RuleType.RuleName:var rule=rules.get(zoneInfo.ruleName);if(rule){var t=this._zoneTransitions(prevUntil,zoneInfo,rule),transitions=transitions.concat(t),prevRules=rule;break}return(0,error_1.throwError)("InvalidTimeZoneData","Zone '%s' refers to non-existing rule '%s'",zoneName,zoneInfo.ruleName);default:(0,assert_1.default)(!1,"timezonecomplete.Assertion","Unknown RuleType")}prevUntil=void 0!==zoneInfo.until?new basics_1.TimeStruct(zoneInfo.until):void 0,prevState=0<transitions.length?transitions[transitions.length-1].newState:prevState}return[transitions,null!=(initialState=null==prevRules?void 0:prevRules.final)?initialState:[]]},CachedZoneTransitions.prototype._zoneTransitions=function(fromUtc,zoneInfo,rule){for(var _a,_d,initialRuleTransition,result=[],prevDst=(void 0!==fromUtc&&(initialRuleTransition=(initialRuleTransition=rule.findLastLessEqual(fromUtc,zoneInfo.gmtoff))?{atUtc:fromUtc,newState:{abbreviation:zoneAbbreviation(zoneInfo.format,!1,initialRuleTransition.newState.letter),letter:null!=(_a=initialRuleTransition.newState.letter)?_a:"",dstOffset:(0,duration_1.hours)(0),standardOffset:zoneInfo.gmtoff}}:(initialRuleTransition=rule.firstTransitionWithoutDstAfter(fromUtc,zoneInfo.gmtoff,void 0),{atUtc:fromUtc,newState:{abbreviation:zoneAbbreviation(zoneInfo.format,!1,null==initialRuleTransition?void 0:initialRuleTransition.newState.letter),letter:null!=(_a=null==initialRuleTransition?void 0:initialRuleTransition.newState.letter)?_a:"",dstOffset:(0,duration_1.hours)(0),standardOffset:zoneInfo.gmtoff}}),result.push(initialRuleTransition)),null!=(fromUtc=null==initialRuleTransition?void 0:initialRuleTransition.newState.dstOffset)?fromUtc:(0,duration_1.hours)(0)),iterator=rule.findFirst(),effective=(null==iterator?void 0:iterator.transition)&&ruleTransitionUtc(iterator.transition,zoneInfo.gmtoff,prevDst);iterator&&effective&&(zoneInfo.until&&effective.unixMillis<zoneInfo.until||!zoneInfo.until&&!iterator.final);)prevDst=iterator.transition.newState.dstOffset,result.push({atUtc:effective,newState:{abbreviation:zoneAbbreviation(zoneInfo.format,prevDst.nonZero(),iterator.transition.newState.letter),letter:null!=(_d=iterator.transition.newState.letter)?_d:"",dstOffset:prevDst,standardOffset:zoneInfo.gmtoff}}),effective=(iterator=rule.findNext(iterator))&&ruleTransitionUtc(iterator.transition,zoneInfo.gmtoff,prevDst);return result},CachedZoneTransitions}();function zoneAbbreviation(format,dst,letter){return"zzz,"===format?"":format.includes("/")?dst?format.split("/")[1]:format.split("/")[0]:letter?format.replace("%s",letter):format.replace("%s","")}function ruleTransitionUtc(transition,standardOffset,dstOffset){switch(transition.atType){case AtType.Utc:return transition.at;case AtType.Standard:var millis=transition.at.unixMillis;return millis-=standardOffset.milliseconds(),new basics_1.TimeStruct(millis);case AtType.Wall:millis=transition.at.unixMillis;return millis-=standardOffset.milliseconds(),dstOffset&&(millis-=dstOffset.milliseconds()),new basics_1.TimeStruct(millis)}}}.call(this)}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./assert":1,"./basics":2,"./duration":4,"./error":5,"./math":10}],18:[function(require,module,exports){var cachedSetTimeout,cachedClearTimeout,module=module.exports={};function defaultSetTimout(){throw new Error("setTimeout has not been defined")}function defaultClearTimeout(){throw new Error("clearTimeout has not been defined")}try{cachedSetTimeout="function"==typeof setTimeout?setTimeout:defaultSetTimout}catch(e){cachedSetTimeout=defaultSetTimout}try{cachedClearTimeout="function"==typeof clearTimeout?clearTimeout:defaultClearTimeout}catch(e){cachedClearTimeout=defaultClearTimeout}function runTimeout(fun){if(cachedSetTimeout===setTimeout)return setTimeout(fun,0);if((cachedSetTimeout===defaultSetTimout||!cachedSetTimeout)&&setTimeout)return(cachedSetTimeout=setTimeout)(fun,0);try{return cachedSetTimeout(fun,0)}catch(e){try{return cachedSetTimeout.call(null,fun,0)}catch(e){return cachedSetTimeout.call(this,fun,0)}}}var currentQueue,queue=[],draining=!1,queueIndex=-1;function cleanUpNextTick(){draining&¤tQueue&&(draining=!1,currentQueue.length?queue=currentQueue.concat(queue):queueIndex=-1,queue.length)&&drainQueue()}function drainQueue(){if(!draining){for(var timeout=runTimeout(cleanUpNextTick),len=(draining=!0,queue.length);len;){for(currentQueue=queue,queue=[];++queueIndex<len;)currentQueue&¤tQueue[queueIndex].run();queueIndex=-1,len=queue.length}currentQueue=null,draining=!1,!function(marker){if(cachedClearTimeout===clearTimeout)return clearTimeout(marker);if((cachedClearTimeout===defaultClearTimeout||!cachedClearTimeout)&&clearTimeout)return(cachedClearTimeout=clearTimeout)(marker);try{cachedClearTimeout(marker)}catch(e){try{return cachedClearTimeout.call(null,marker)}catch(e){return cachedClearTimeout.call(this,marker)}}}(timeout)}}function Item(fun,array){this.fun=fun,this.array=array}function noop(){}module.nextTick=function(fun){var args=new Array(arguments.length-1);if(1<arguments.length)for(var i=1;i<arguments.length;i++)args[i-1]=arguments[i];queue.push(new Item(fun,args)),1!==queue.length||draining||runTimeout(drainQueue)},Item.prototype.run=function(){this.fun.apply(null,this.array)},module.title="browser",module.browser=!0,module.env={},module.argv=[],module.version="",module.versions={},module.on=noop,module.addListener=noop,module.once=noop,module.off=noop,module.removeListener=noop,module.removeAllListeners=noop,module.emit=noop,module.prependListener=noop,module.prependOnceListener=noop,module.listeners=function(name){return[]},module.binding=function(name){throw new Error("process.binding is not supported")},module.cwd=function(){return"/"},module.chdir=function(dir){throw new Error("process.chdir is not supported")},module.umask=function(){return 0}},{}],19:[function(require,module,exports){"function"==typeof Object.create?module.exports=function(ctor,superCtor){ctor.super_=superCtor,ctor.prototype=Object.create(superCtor.prototype,{constructor:{value:ctor,enumerable:!1,writable:!0,configurable:!0}})}:module.exports=function(ctor,superCtor){ctor.super_=superCtor;function TempCtor(){}TempCtor.prototype=superCtor.prototype,ctor.prototype=new TempCtor,ctor.prototype.constructor=ctor}},{}],20:[function(require,module,exports){module.exports=function(arg){return arg&&"object"==typeof arg&&"function"==typeof arg.copy&&"function"==typeof arg.fill&&"function"==typeof arg.readUInt8}},{}],21:[function(require,module,exports){!function(process,global){!function(){var debugEnviron,formatRegExp=/%[sdj%]/g,debugs=(exports.format=function(f){if(!isString(f)){for(var objects=[],i=0;i<arguments.length;i++)objects.push(inspect(arguments[i]));return objects.join(" ")}for(var i=1,args=arguments,len=args.length,str=String(f).replace(formatRegExp,function(x){if("%%"===x)return"%";if(len<=i)return x;switch(x){case"%s":return String(args[i++]);case"%d":return Number(args[i++]);case"%j":try{return JSON.stringify(args[i++])}catch(_){return"[Circular]"}default:return x}}),x=args[i];i<len;x=args[++i])null!==x&&isObject(x)?str+=" "+inspect(x):str+=" "+x;return str},exports.deprecate=function(fn,msg){var warned;return void 0===global.process?function(){return exports.deprecate(fn,msg).apply(this,arguments)}:!0===process.noDeprecation?fn:(warned=!1,function(){if(!warned){if(process.throwDeprecation)throw new Error(msg);process.traceDeprecation?console.trace(msg):console.error(msg),warned=!0}return fn.apply(this,arguments)})},{});function inspect(obj,opts){var ctx={seen:[],stylize:stylizeNoColor};return 3<=arguments.length&&(ctx.depth=arguments[2]),4<=arguments.length&&(ctx.colors=arguments[3]),isBoolean(opts)?ctx.showHidden=opts:opts&&exports._extend(ctx,opts),void 0===ctx.showHidden&&(ctx.showHidden=!1),void 0===ctx.depth&&(ctx.depth=2),void 0===ctx.colors&&(ctx.colors=!1),void 0===ctx.customInspect&&(ctx.customInspect=!0),ctx.colors&&(ctx.stylize=stylizeWithColor),formatValue(ctx,obj,ctx.depth)}function stylizeWithColor(str,styleType){styleType=inspect.styles[styleType];return styleType?"["+inspect.colors[styleType][0]+"m"+str+"["+inspect.colors[styleType][1]+"m":str}function stylizeNoColor(str,styleType){return str}function formatValue(ctx,value,recurseTimes){if(ctx.customInspect&&value&&isFunction(value.inspect)&&value.inspect!==exports.inspect&&(!value.constructor||value.constructor.prototype!==value))return isString(ret=value.inspect(recurseTimes,ctx))?ret:formatValue(ctx,ret,recurseTimes);var ret=function(ctx,value){if(void 0===value)return ctx.stylize("undefined","undefined");{var simple;if(isString(value))return simple="'"+JSON.stringify(value).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'",ctx.stylize(simple,"string")}return isNumber(value)?ctx.stylize(""+value,"number"):isBoolean(value)?ctx.stylize(""+value,"boolean"):null===value?ctx.stylize("null","null"):void 0}(ctx,value);if(ret)return ret;var ret=Object.keys(value),visibleKeys=function(array){var hash={};return array.forEach(function(val,idx){hash[val]=!0}),hash}(ret);if(ctx.showHidden&&(ret=Object.getOwnPropertyNames(value)),isError(value)&&(0<=ret.indexOf("message")||0<=ret.indexOf("description")))return formatError(value);if(0===ret.length){if(isFunction(value))return name=value.name?": "+value.name:"",ctx.stylize("[Function"+name+"]","special");if(isRegExp(value))return ctx.stylize(RegExp.prototype.toString.call(value),"regexp");if(isDate(value))return ctx.stylize(Date.prototype.toString.call(value),"date");if(isError(value))return formatError(value)}var name="",array=!1,braces=["{","}"];return isArray(value)&&(array=!0,braces=["[","]"]),isFunction(value)&&(name=" [Function"+(value.name?": "+value.name:"")+"]"),isRegExp(value)&&(name=" "+RegExp.prototype.toString.call(value)),isDate(value)&&(name=" "+Date.prototype.toUTCString.call(value)),isError(value)&&(name=" "+formatError(value)),0!==ret.length||array&&0!=value.length?recurseTimes<0?isRegExp(value)?ctx.stylize(RegExp.prototype.toString.call(value),"regexp"):ctx.stylize("[Object]","special"):(ctx.seen.push(value),ret=array?function(ctx,value,recurseTimes,visibleKeys,keys){for(var output=[],i=0,l=value.length;i<l;++i)hasOwnProperty(value,String(i))?output.push(formatProperty(ctx,value,recurseTimes,visibleKeys,String(i),!0)):output.push("");return keys.forEach(function(key){key.match(/^\d+$/)||output.push(formatProperty(ctx,value,recurseTimes,visibleKeys,key,!0))}),output}(ctx,value,recurseTimes,visibleKeys,ret):ret.map(function(key){return formatProperty(ctx,value,recurseTimes,visibleKeys,key,array)}),ctx.seen.pop(),function(output,base,braces){if(60<output.reduce(function(prev,cur){return 0<=cur.indexOf("\n")&&0,prev+cur.replace(/\u001b\[\d\d?m/g,"").length+1},0))return braces[0]+(""===base?"":base+"\n ")+" "+output.join(",\n ")+" "+braces[1];return braces[0]+base+" "+output.join(", ")+" "+braces[1]}(ret,name,braces)):braces[0]+name+braces[1]}function formatError(value){return"["+Error.prototype.toString.call(value)+"]"}function formatProperty(ctx,value,recurseTimes,visibleKeys,key,array){var name,str,value=Object.getOwnPropertyDescriptor(value,key)||{value:value[key]};if(value.get?str=value.set?ctx.stylize("[Getter/Setter]","special"):ctx.stylize("[Getter]","special"):value.set&&(str=ctx.stylize("[Setter]","special")),hasOwnProperty(visibleKeys,key)||(name="["+key+"]"),str||(ctx.seen.indexOf(value.value)<0?-1<(str=formatValue(ctx,value.value,null===recurseTimes?null:recurseTimes-1)).indexOf("\n")&&(str=array?str.split("\n").map(function(line){return" "+line}).join("\n").substr(2):"\n"+str.split("\n").map(function(line){return" "+line}).join("\n")):str=ctx.stylize("[Circular]","special")),void 0===name){if(array&&key.match(/^\d+$/))return str;name=(name=JSON.stringify(""+key)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(name=name.substr(1,name.length-2),ctx.stylize(name,"name")):(name=name.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),ctx.stylize(name,"string"))}return name+": "+str}function isArray(ar){return Array.isArray(ar)}function isBoolean(arg){return"boolean"==typeof arg}function isNull(arg){return null===arg}function isNumber(arg){return"number"==typeof arg}function isString(arg){return"string"==typeof arg}function isUndefined(arg){return void 0===arg}function isRegExp(re){return isObject(re)&&"[object RegExp]"===objectToString(re)}function isObject(arg){return"object"==typeof arg&&null!==arg}function isDate(d){return isObject(d)&&"[object Date]"===objectToString(d)}function isError(e){return isObject(e)&&("[object Error]"===objectToString(e)||e instanceof Error)}function isFunction(arg){return"function"==typeof arg}function objectToString(o){return Object.prototype.toString.call(o)}function pad(n){return n<10?"0"+n.toString(10):n.toString(10)}exports.debuglog=function(set){var pid;return void 0===debugEnviron&&(debugEnviron=process.env.NODE_DEBUG||""),set=set.toUpperCase(),debugs[set]||(new RegExp("\\b"+set+"\\b","i").test(debugEnviron)?(pid=process.pid,debugs[set]=function(){var msg=exports.format.apply(exports,arguments);console.error("%s %d: %s",set,pid,msg)}):debugs[set]=function(){}),debugs[set]},(exports.inspect=inspect).colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},inspect.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},exports.isArray=isArray,exports.isBoolean=isBoolean,exports.isNull=isNull,exports.isNullOrUndefined=function(arg){return null==arg},exports.isNumber=isNumber,exports.isString=isString,exports.isSymbol=function(arg){return"symbol"==typeof arg},exports.isUndefined=isUndefined,exports.isRegExp=isRegExp,exports.isObject=isObject,exports.isDate=isDate,exports.isError=isError,exports.isFunction=isFunction,exports.isPrimitive=function(arg){return null===arg||"boolean"==typeof arg||"number"==typeof arg||"string"==typeof arg||"symbol"==typeof arg||void 0===arg},exports.isBuffer=require("./support/isBuffer");var months=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function hasOwnProperty(obj,prop){return Object.prototype.hasOwnProperty.call(obj,prop)}exports.log=function(){var d,time;console.log("%s - %s",(d=new Date,time=[pad(d.getHours()),pad(d.getMinutes()),pad(d.getSeconds())].join(":"),[d.getDate(),months[d.getMonth()],time].join(" ")),exports.format.apply(exports,arguments))},exports.inherits=require("inherits"),exports._extend=function(origin,add){if(add&&isObject(add))for(var keys=Object.keys(add),i=keys.length;i--;)origin[keys[i]]=add[keys[i]];return origin}}.call(this)}.call(this,require("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./support/isBuffer":20,_process:18,inherits:19}],timezonecomplete:[function(require,module,exports){var __createBinding=this&&this.__createBinding||(Object.create?function(o,m,k,k2){void 0===k2&&(k2=k);var desc=Object.getOwnPropertyDescriptor(m,k);desc&&("get"in desc?m.__esModule:!desc.writable&&!desc.configurable)||(desc={enumerable:!0,get:function(){return m[k]}}),Object.defineProperty(o,k2,desc)}:function(o,m,k,k2){o[k2=void 0===k2?k:k2]=m[k]}),__exportStar=this&&this.__exportStar||function(m,exports){for(var p in m)"default"===p||Object.prototype.hasOwnProperty.call(exports,p)||__createBinding(exports,m,p)},tz_database_1=(Object.defineProperty(exports,"__esModule",{value:!0}),exports.ZoneInfo=exports.TzDatabase=exports.Transition=exports.ToType=exports.OnType=exports.RuleType=exports.RuleInfo=exports.NormalizeOption=exports.isValidOffsetString=exports.AtType=void 0,__exportStar(require("./basics"),exports),__exportStar(require("./datetime"),exports),__exportStar(require("./duration"),exports),__exportStar(require("./format"),exports),__exportStar(require("./globals"),exports),__exportStar(require("./javascript"),exports),__exportStar(require("./locale"),exports),__exportStar(require("./parse"),exports),__exportStar(require("./period"),exports),__exportStar(require("./basics"),exports),__exportStar(require("./timesource"),exports),__exportStar(require("./timezone"),exports),require("./tz-database"));Object.defineProperty(exports,"AtType",{enumerable:!0,get:function(){return tz_database_1.AtType}}),Object.defineProperty(exports,"isValidOffsetString",{enumerable:!0,get:function(){return tz_database_1.isValidOffsetString}}),Object.defineProperty(exports,"NormalizeOption",{enumerable:!0,get:function(){return tz_database_1.NormalizeOption}}),Object.defineProperty(exports,"RuleInfo",{enumerable:!0,get:function(){return tz_database_1.RuleInfo}}),Object.defineProperty(exports,"RuleType",{enumerable:!0,get:function(){return tz_database_1.RuleType}}),Object.defineProperty(exports,"OnType",{enumerable:!0,get:function(){return tz_database_1.OnType}}),Object.defineProperty(exports,"ToType",{enumerable:!0,get:function(){return tz_database_1.ToType}}),Object.defineProperty(exports,"Transition",{enumerable:!0,get:function(){return tz_database_1.Transition}}),Object.defineProperty(exports,"TzDatabase",{enumerable:!0,get:function(){return tz_database_1.TzDatabase}}),Object.defineProperty(exports,"ZoneInfo",{enumerable:!0,get:function(){return tz_database_1.ZoneInfo}})},{"./basics":2,"./datetime":3,"./duration":4,"./format":6,"./globals":7,"./javascript":8,"./locale":9,"./parse":11,"./period":12,"./timesource":14,"./timezone":15,"./tz-database":17}]},{},[])("timezonecomplete")});