@js-joda/extra 0.10.0 → 0.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
//! @version @js-joda/extra - 0.10.
|
|
1
|
+
//! @version @js-joda/extra - 0.10.1
|
|
2
2
|
//! @copyright (c) 2015-present, Philipp Thürwächter, Pattrick Hüper & js-joda contributors
|
|
3
3
|
//! @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
|
|
4
4
|
//! @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
|
|
5
|
-
var JSJodaExtra=function(t,e){"use strict";function n(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,r(t,e)}function r(t,e){return r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},r(t,e)}function o(t,n){if(null==t)throw new e.NullPointerException(n+" must not be null");return t}function i(t,n,r){if(!(t instanceof n))throw new e.IllegalArgumentException(r+" must be an instance of "+(n.name?n.name:n)+(t&&t.constructor&&t.constructor.name?", but is "+t.constructor.name:""));return t}var a=e._.MathUtil,s=function(t){function r(e){var n;return(n=t.call(this)||this)._day=a.safeToInt(e),n}n(r,t),r.now=function(t){switch(arguments.length){case 0:return r._now0();case 1:if(o(t,"clockOrZone"),t instanceof e.ZoneId)return r._nowZoneId(t);if(t instanceof e.Clock)return r._nowClock(t);throw new e.IllegalArgumentException("zoneIdOrClock must be an instance of ZoneId or Clock, but is "+t.constructor.name);default:throw new e.IllegalArgumentException("Invalid number of arguments: "+arguments.length)}},r._now0=function(){return this.now(e.Clock.systemDefaultZone())},r._nowZoneId=function(t){return this.now(e.Clock.system(t))},r._nowClock=function(t){var n=e.LocalDate.now(t);return r.of(n.dayOfMonth())},r.of=function(t){if(1<=t&&t<=31)return r.VALUES[t-1];throw new e.DateTimeException("Invalid value for DayOfMonth: "+t)},r.from=function(t){if(t instanceof r)return t;o(t,"temporal");try{return r.of(t.get(e.ChronoField.DAY_OF_MONTH))}catch(n){throw new e.DateTimeException("Unable to obtain DayOfMonth from TemporalAccessor: "+t+" of type "+t.constructor.name,n)}};var s=r.prototype;return s.value=function(){return this._day},s.isSupported=function(t){return t instanceof e.ChronoField?t===e.ChronoField.DAY_OF_MONTH:null!=t&&t.isSupportedBy(this)},s.range=function(n){return o(n,"field"),n===e.ChronoField.DAY_OF_MONTH?n.range():t.prototype.range.call(this,n)},s.get=function(t){return this.range(t).checkValidIntValue(this.getLong(t),t)},s.getLong=function(t){if(o(t,"field"),t===e.ChronoField.DAY_OF_MONTH)return this._day;if(t instanceof e.ChronoField)throw new e.UnsupportedTemporalTypeException("Unsupported field: "+t);return t.getFrom(this)},s.isValidYearMonth=function(t){return null!=t&&t.isValidDay(this._day)},s.query=function(n){return o(n,"query"),i(n,e.TemporalQuery,"query"),n===e.TemporalQueries.chronology()?e.IsoChronology.INSTANCE:t.prototype.query.call(this,n)},s.adjustInto=function(t){return o(t,"temporal"),t.with(e.ChronoField.DAY_OF_MONTH,this._day)},s.atMonth=function(t){return o(t,"month"),t instanceof e.Month?e.MonthDay.of(t,Math.min(this._day,t.maxLength())):e.MonthDay.of(t,Math.min(this._day,e.Month.of(t).maxLength()))},s.atYearMonth=function(t){return o(t,"yearMonth"),t.atDay(Math.min(this._day,t.lengthOfMonth()))},s.compareTo=function(t){return o(t,"other"),i(t,r,"other"),this._day-t._day},s.equals=function(t){return this===t||t instanceof r&&this._day===t._day},s.hashCode=function(){return this._day},s.toString=function(){return"DayOfMonth:"+this._day},r}(e.TemporalAccessor);var u=e._.MathUtil,c=function(t){function r(e){var n;return(n=t.call(this)||this)._day=u.safeToInt(e),n}n(r,t),r.now=function(t){switch(arguments.length){case 0:return r._now0();case 1:if(o(t,"clockOrZone"),t instanceof e.ZoneId)return r._nowZoneId(t);if(t instanceof e.Clock)return r._nowClock(t);throw new e.IllegalArgumentException("zoneIdOrClock must be an instance of ZoneId or Clock, but is "+t.constructor.name);default:throw new e.IllegalArgumentException("Invalid number of arguments: "+arguments.length)}},r._now0=function(){return r.now(e.Clock.systemDefaultZone())},r._nowZoneId=function(t){return r.now(e.Clock.system(t))},r._nowClock=function(t){var n=e.LocalDate.now(t);return r.of(n.dayOfYear())},r.of=function(t){if(1<=t&&t<=366)return r.VALUES[t-1];throw new e.DateTimeException("Invalid value for DayOfYear: "+t)},r.from=function(t){if(o(t,"temporal"),i(t,e.TemporalAccessor,"temporal"),t instanceof r)return t;try{return r.of(t.get(e.ChronoField.DAY_OF_YEAR))}catch(n){throw new e.DateTimeException("Unable to obtain DayOfYear from TemporalAccessor: "+t+" of type "+t.constructor.name,n)}};var a=r.prototype;return a.value=function(){return this._day},a.isSupported=function(t){return t instanceof e.ChronoField?t===e.ChronoField.DAY_OF_YEAR:null!=t&&t.isSupportedBy(this)},a.range=function(n){return o(n,"field"),n===e.ChronoField.DAY_OF_YEAR?n.range():t.prototype.range.call(this,n)},a.get=function(t){return this.range(t).checkValidIntValue(this.getLong(t),t)},a.getLong=function(t){if(o(t,"field"),t===e.ChronoField.DAY_OF_YEAR)return this._day;if(t instanceof e.ChronoField)throw new e.UnsupportedTemporalTypeException("Unsupported field: "+t);return t.getFrom(this)},a.isValidYear=function(t){return this._day<366||e.Year.isLeap(t)},a.query=function(n){return o(n,"query"),i(n,e.TemporalQuery,"query"),n===e.TemporalQueries.chronology()?e.IsoChronology.INSTANCE:t.prototype.query.call(this,n)},a.adjustInto=function(t){return o(t,"temporal"),t.with(e.ChronoField.DAY_OF_YEAR,this._day)},a.atYear=function(t){return o(t,"year"),t instanceof e.Year?t.atDay(this._day):e.LocalDate.ofYearDay(t,this._day)},a.compareTo=function(t){return o(t,"other"),i(t,r,"other"),this._day-t._day},a.equals=function(t){return this===t||t instanceof r&&this._day===t._day},a.hashCode=function(){return this._day},a.toString=function(){return"DayOfYear:"+this._day},r}(e.TemporalAccessor);var f=function(){function t(t,e){this._start=t,this._end=e}t.of=function(n,r){return r instanceof e.Duration?t.ofInstantDuration(n,r):t.ofInstantInstant(n,r)},t.ofInstantInstant=function(n,r){if(o(n,"startInclusive"),o(r,"endExclusive"),i(n,e.Instant,"startInclusive"),i(r,e.Instant,"endExclusive"),r.isBefore(n))throw new e.DateTimeException("End instant must on or after start instant");return new t(n,r)},t.ofInstantDuration=function(n,r){if(o(n,"startInclusive"),o(r,"duration"),i(n,e.Instant,"startInclusive"),i(r,e.Duration,"duration"),r.isNegative())throw new e.DateTimeException("Duration must not be zero or negative");return new t(n,n.plus(r))},t.parse=function(n){if(o(n,"text"),"string"!=typeof n)throw new e.IllegalArgumentException("text must be a string, but is "+n.constructor.name);for(var r=0;r<n.length;r+=1)if("/"===n.charAt(r)){var i=n.charAt(0);if("P"===i||"p"===i){var a=e.Duration.parse(n.substring(0,r)),s=e.ZonedDateTime.parse(n.substring(r+1,n.length)).toInstant();return t.of(s.minus(a),s)}var u=e.ZonedDateTime.parse(n.substring(0,r)).toInstant();if(r+1<n.length){var c=n.charAt(r+1);if("P"===c||"p"===c){var f=e.Duration.parse(n.substring(r+1,n.length));return t.of(u,u.plus(f))}}var h=e.ZonedDateTime.parse(n.substring(r+1,n.length)).toInstant();return t.of(u,h)}throw new e.DateTimeParseException("Interval cannot be parsed, no forward slash found",n,0)};var n=t.prototype;return n.start=function(){return this._start},n.end=function(){return this._end},n.isEmpty=function(){return this._start.equals(this._end)},n.isUnboundedStart=function(){return this._start.equals(e.Instant.MIN)},n.isUnboundedEnd=function(){return this._end.equals(e.Instant.MAX)},n.withStart=function(e){return t.of(e,this._end)},n.withEnd=function(e){return t.of(this._start,e)},n.contains=function(t){return o(t,"instant"),i(t,e.Instant,"instant"),this._start.compareTo(t)<=0&&(t.compareTo(this._end)<0||this.isUnboundedEnd())},n.encloses=function(e){return o(e,"other"),i(e,t,"other"),this._start.compareTo(e.start())<=0&&e.end().compareTo(this._end)<=0},n.abuts=function(e){return o(e,"other"),i(e,t,"other"),!this._end.equals(e.start())!=!this._start.equals(e.end())},n.isConnected=function(e){return o(e,"other"),i(e,t,"other"),this.equals(e)||this._start.compareTo(e.end())<=0&&e.start().compareTo(this._end)<=0},n.overlaps=function(e){return o(e,"other"),i(e,t,"other"),e.equals(this)||this._start.compareTo(e.end())<0&&e.start().compareTo(this._end)<0},n.intersection=function(n){if(o(n,"other"),i(n,t,"other"),!1===this.isConnected(n))throw new e.DateTimeException("Intervals do not connect: "+this+" and "+n);var r=this._start.compareTo(n.start()),a=this._end.compareTo(n.end());if(r>=0&&a<=0)return this;if(r<=0&&a>=0)return n;var s=r>=0?this._start:n.start(),u=a<=0?this._end:n.end();return t.of(s,u)},n.union=function(n){if(o(n,"other"),i(n,t,"other"),!1===this.isConnected(n))throw new e.DateTimeException("Intervals do not connect: "+this+" and "+n);var r=this._start.compareTo(n.start()),a=this._end.compareTo(n.end());if(r>=0&&a<=0)return n;if(r<=0&&a>=0)return this;var s=r>=0?n.start():this._start,u=a<=0?n.end():this._end;return t.of(s,u)},n.span=function(e){o(e,"other"),i(e,t,"other");var n=this._start.compareTo(e.start()),r=this._end.compareTo(e.end()),a=n>=0?e.start():this._start,s=r<=0?e.end():this._end;return t.of(a,s)},n.isAfter=function(t){return t instanceof e.Instant?this.isAfterInstant(t):this.isAfterInterval(t)},n.isBefore=function(t){return t instanceof e.Instant?this.isBeforeInstant(t):this.isBeforeInterval(t)},n.isAfterInstant=function(t){return this._start.compareTo(t)>0},n.isBeforeInstant=function(t){return this._end.compareTo(t)<=0&&this._start.compareTo(t)<0},n.isAfterInterval=function(t){return this._start.compareTo(t.end())>=0&&!t.equals(this)},n.isBeforeInterval=function(t){return this._end.compareTo(t.start())<=0&&!t.equals(this)},n.toDuration=function(){return e.Duration.between(this._start,this._end)},n.equals=function(e){return this===e||e instanceof t&&(this._start.equals(e.start())&&this._end.equals(e.end()))},n.hashCode=function(){return this._start.hashCode()^this._end.hashCode()},n.toString=function(){return this._start.toString()+"/"+this._end.toString()},t}();var h=e.LocalDate.MIN.plusDays(1),l=e.LocalDate.MAX.minusDays(1),d=function(){function t(t,n){if(o(t,"startInclusive"),o(n,"endExclusive"),i(t,e.LocalDate,"startInclusive"),i(n,e.LocalDate,"endExclusive"),n.isBefore(t))throw new e.DateTimeException("End date must be on or after start date");if(t.equals(l))throw new e.DateTimeException("Range must not start at LocalDate.MAX.minusDays(1)");if(n.equals(h))throw new e.DateTimeException("Range must not end at LocalDate.MIN.plusDays(1)");if(n.equals(e.LocalDate.MIN)||t.equals(e.LocalDate.MAX))throw new e.DateTimeException("Empty range must not be at LocalDate.MIN or LocalDate.MAX");this._start=t,this._end=n}t.of=function(n,r){if(n instanceof e.LocalDate&&r instanceof e.LocalDate)return t._ofLocalDateLocalDate(n,r);if(n instanceof e.LocalDate&&r instanceof e.Period)return t._ofLocalDatePeriod(n,r);var o=[];throw n instanceof e.LocalDate||o.push("startInclusive must be an instance of LocalDate but is "+n.constructor.name),r instanceof e.LocalDate||r instanceof e.Period||o.push("endExclusiveOrPeriod must be an instance of LocalDate or Period but is "+r.constructor.name),new e.IllegalArgumentException(o.join(" and "))},t._ofLocalDateLocalDate=function(n,r){return o(n,"startInclusive"),o(r,"endExclusive"),i(n,e.LocalDate,"startInclusive"),i(r,e.LocalDate,"endExclusive"),new t(n,r)},t._ofLocalDatePeriod=function(n,r){if(o(n,"startInclusive"),o(r,"period"),i(n,e.LocalDate,"startInclusive"),i(r,e.Period,"period"),r.isNegative())throw new e.DateTimeException("Period must not be zero or negative");return new t(n,n.plus(r))},t.ofClosed=function(n,r){if(o(n,"startInclusive"),o(r,"endInclusive"),i(n,e.LocalDate,"startInclusive"),i(r,e.LocalDate,"endInclusive"),r.isBefore(n))throw new e.DateTimeException("Start date must be on or before end date");return new t(n,r.equals(e.LocalDate.MAX)?e.LocalDate.MAX:r.plusDays(1))},t.ofEmpty=function(n){return o(n,"date"),i(n,e.LocalDate,"date"),new t(n,n)},t.ofUnbounded=function(){return t.ALL},t.ofUnboundedStart=function(n){return o(n,"endExclusive"),i(n,e.LocalDate,"endExclusive"),t.of(e.LocalDate.MIN,n)},t.ofUnboundedEnd=function(n){return t.of(n,e.LocalDate.MAX)},t.parse=function(n){o(n,"text");for(var r=0;r<n.length;r++)if("/"===n[r]){var i=n.charAt(0);if("P"===i||"p"===i){var a=e.Period.parse(n.slice(0,r)),s=e.LocalDate.parse(n.slice(r+1,n.length));return t.of(s.minus(a),s)}var u=e.LocalDate.parse(n.slice(0,r));if(r+1<n.length){var c=n[r+1];if("P"===c||"p"===c){var f=e.Period.parse(n.slice(r+1,n.length));return t.of(u,u.plus(f))}}var h=e.LocalDate.parse(n.slice(r+1,n.length));return t.of(u,h)}throw new e.DateTimeParseException("LocalDateRange cannot be parsed, no forward slash found",n,0)};var n=t.prototype;return n.start=function(){return this._start},n.end=function(){return this._end},n.endInclusive=function(){return this.isUnboundedEnd()?e.LocalDate.MAX:this._end.minusDays(1)},n.isEmpty=function(){return this._start.equals(this._end)},n.isUnboundedStart=function(){return this._start.equals(e.LocalDate.MIN)},n.isUnboundedEnd=function(){return this._end.equals(e.LocalDate.MAX)},n.withStart=function(e){return t.of(this._start.with(e),this._end)},n.withEnd=function(e){return t.of(this._start,this._end.with(e))},n.contains=function(t){return o(t,"date"),this._start.compareTo(t)<=0&&(t.compareTo(this._end)<0||this.isUnboundedEnd())},n.encloses=function(t){return o(t,"other"),this._start.compareTo(t._start)<=0&&t._end.compareTo(this._end)<=0},n.abuts=function(t){return o(t,"other"),this._end.equals(t._start)!==this._start.equals(t._end)},n.isConnected=function(t){return o(t,"other"),this.equals(t)||this._start.compareTo(t._end)<=0&&t._start.compareTo(this._end)<=0},n.overlaps=function(t){return o(t,"other"),t.equals(this)||this._start.compareTo(t._end)<0&&t._start.compareTo(this._end)<0},n.intersection=function(n){if(o(n,"other"),!1===this.isConnected(n))throw new e.DateTimeException("Ranges do not connect: "+this+" and "+n);var r=this._start.compareTo(n._start),i=this._end.compareTo(n._end);if(r>=0&&i<=0)return this;if(r<=0&&i>=0)return n;var a=r>=0?this._start:n._start,s=i<=0?this._end:n._end;return t.of(a,s)},n.union=function(n){if(o(n,"other"),!1===this.isConnected(n))throw new e.DateTimeException("Ranges do not connect: "+this+" and "+n);var r=this._start.compareTo(n._start),i=this._end.compareTo(n._end);if(r>=0&&i<=0)return n;if(r<=0&&i>=0)return this;var a=r>=0?n._start:this._start,s=i<=0?n._end:this._end;return t.of(a,s)},n.span=function(e){o(e,"other");var n=this._start.compareTo(e._start),r=this._end.compareTo(e._end),i=n>=0?e._start:this._start,a=r<=0?e._end:this._end;return t.of(i,a)},n.isAfter=function(n){if(n instanceof e.LocalDate)return this._isAfterLocalDate(n);if(n instanceof t)return this._isAfterLocalDateRange(n);throw new e.IllegalArgumentException("localDateOrLocalDateRange must be an instance of LocalDate or LocalDateRange but is "+n.constructor.name)},n.isBefore=function(n){if(n instanceof e.LocalDate)return this._isBeforeLocalDate(n);if(n instanceof t)return this._isBeforeLocalDateRange(n);throw new e.IllegalArgumentException("localDateOrLocalDateRange must be an instance of LocalDate or LocalDateRange but is "+n.constructor.name)},n._isAfterLocalDate=function(t){return this._start.compareTo(t)>0},n._isBeforeLocalDate=function(t){return this._end.compareTo(t)<=0&&this._start.compareTo(t)<0},n._isAfterLocalDateRange=function(t){return this._start.compareTo(t._end)>=0&&!t.equals(this)},n._isBeforeLocalDateRange=function(t){return this._end.compareTo(t._start)<=0&&!t.equals(this)},n.lengthInDays=function(){return this.isUnboundedStart()||this.isUnboundedEnd()?Number.NaN:this._end.toEpochDay()-this._start.toEpochDay()},n.toPeriod=function(){if(this.isUnboundedStart()||this.isUnboundedEnd())throw new e.ArithmeticException("Unbounded range cannot be converted to a Period");return e.Period.between(this._start,this._end)},n.equals=function(e){if(this===e)return!0;if(e instanceof t){var n=e;return this._start.equals(n._start)&&this._end.equals(n._end)}return!1},n.hashCode=function(){return this._start.hashCode()^this._end.hashCode()},n.toString=function(){return this._start.toString()+"/"+this._end.toString()},t}();var _=e._.MathUtil,p=86400,E=function(t){function r(e,n){var r;return(r=t.call(this)||this)._date=o(e,"date"),r._offset=o(n,"offset"),r}n(r,t),r.now=function(t){return 0===arguments.length?r._now0():1===arguments.length&&t instanceof e.ZoneId?r._nowZoneId(t):r._nowClock(t)},r._now0=function(){return r.now(e.Clock.systemDefaultZone())},r._nowZoneId=function(t){return r.now(e.Clock.system(t))},r._nowClock=function(t){o(t,"clock");var e=t.instant();return r.ofInstant(e,t.zone().rules().offset(e))},r.of=function(){switch(arguments.length){case 2:return r._ofLocalDateZoneOffset.apply(r,arguments);case 4:return r._ofIntIntIntZoneOffset.apply(r,arguments);default:throw new e.IllegalArgumentException("Illegal number of arguments")}},r._ofLocalDateZoneOffset=function(t,e){return new r(t,e)},r._ofIntIntIntZoneOffset=function(t,n,o,i){return new r(e.LocalDate.of(t,n,o),i)},r.ofInstant=function(t,n){o(t,"instant"),o(n,"zone");var i=n.rules().offset(t),a=t.epochSecond()+i.totalSeconds(),s=_.floorDiv(a,p);return new r(e.LocalDate.ofEpochDay(s),i)},r.from=function(t){if(t instanceof r)return t;o(t,"temporal");try{return new r(e.LocalDate.from(t),e.ZoneOffset.from(t))}catch(n){throw new e.DateTimeException("Unable to obtain OffsetDate from TemporalAccessor: "+t.constructor.name,n)}},r.parse=function(t,n){return void 0===n&&(n=e.DateTimeFormatter.ISO_OFFSET_DATE),o(n,"formatter"),n.parse(t,r.FROM)};var a=r.prototype;return a._with=function(t,e){return this._date===t&&this._offset.equals(e)?this:new r(t,e)},a.isSupported=function(t){if(t instanceof e.TemporalField)return this._isSupportedField(t);if(t instanceof e.TemporalUnit)return this._isSupportedUnit(t);if(null==t)return!1;throw new e.IllegalArgumentException("fieldOrUnit must be an instance of TemporalField or TemporalUnit, but is "+t.constructor.name)},a._isSupportedField=function(t){return t instanceof e.ChronoField?t.isDateBased()||t===e.ChronoField.OFFSET_SECONDS:null!=t&&t.isSupportedBy(this)},a._isSupportedUnit=function(t){return t instanceof e.ChronoUnit?t.isDateBased():null!=t&&t.isSupportedBy(this)},a.range=function(t){return o(t,"field"),i(t,e.TemporalField,"field"),t instanceof e.ChronoField?t===e.ChronoField.OFFSET_SECONDS?t.range():this._date.range(t):t.rangeRefinedBy(this)},a.get=function(t){return o(t,"field"),i(t,e.TemporalField,"field"),this.range(t).checkValidIntValue(this.getLong(t),t)},a.getLong=function(t){return o(t,"field"),i(t,e.TemporalField,"field"),t instanceof e.ChronoField?t===e.ChronoField.OFFSET_SECONDS?this.offset().totalSeconds():this._date.getLong(t):t.getFrom(this)},a.offset=function(){return this._offset},a.withOffsetSameLocal=function(t){return o(t,"offset"),this._with(this._date,t)},a.toLocalDate=function(){return this._date},a.year=function(){return this._date.year()},a.monthValue=function(){return this._date.monthValue()},a.month=function(){return this._date.month()},a.dayOfMonth=function(){return this._date.dayOfMonth()},a.dayOfYear=function(){return this._date.dayOfYear()},a.dayOfWeek=function(){return this._date.dayOfWeek()},a._withAdjuster=function(n){return n instanceof e.LocalDate?this._with(n,this._offset):n instanceof e.ZoneOffset?this._with(this._date,n):n instanceof r?n:t.prototype._withAdjuster.call(this,n)},a._withField=function(t,n){if(o(t,"field"),i(t,e.TemporalField,"field"),t instanceof e.ChronoField){if(t===e.ChronoField.OFFSET_SECONDS){var r=t;return this._with(this._date,e.ZoneOffset.ofTotalSeconds(r.checkValidIntValue(n)))}return this._with(this._date.with(t,n),this._offset)}return t.adjustInto(this,n)},a.withYear=function(t){return this._with(this._date.withYear(t),this._offset)},a.withMonth=function(t){return this._with(this._date.withMonth(t),this._offset)},a.withDayOfMonth=function(t){return this._with(this._date.withDayOfMonth(t),this._offset)},a.withDayOfYear=function(t){return this._with(this._date.withDayOfYear(t),this._offset)},a._plusUnit=function(t,n){return n instanceof e.ChronoUnit?this._with(this._date.plus(t,n),this._offset):n.addTo(this,t)},a.plusYears=function(t){return this._with(this._date.plusYears(t),this._offset)},a.plusMonths=function(t){return this._with(this._date.plusMonths(t),this._offset)},a.plusWeeks=function(t){return this._with(this._date.plusWeeks(t),this._offset)},a.plusDays=function(t){return this._with(this._date.plusDays(t),this._offset)},a.minusYears=function(t){return this._with(this._date.minusYears(t),this._offset)},a.minusMonths=function(t){return this._with(this._date.minusMonths(t),this._offset)},a.minusWeeks=function(t){return this._with(this._date.minusWeeks(t),this._offset)},a.minusDays=function(t){return this._with(this._date.minusDays(t),this._offset)},a.query=function(n){return o(n,"query"),i(n,e.TemporalQuery,"query"),n===e.TemporalQueries.chronology()?e.IsoChronology.INSTANCE:n===e.TemporalQueries.precision()?e.ChronoUnit.DAYS:n===e.TemporalQueries.offset()||n===e.TemporalQueries.zone()?this.offset():t.prototype.query.call(this,n)},a.adjustInto=function(t){return t.with(e.ChronoField.OFFSET_SECONDS,this.offset().totalSeconds()).with(e.ChronoField.EPOCH_DAY,this.toLocalDate().toEpochDay())},a.until=function(t,n){var o=r.from(t);if(n instanceof e.ChronoUnit){var i=o._offset.totalSeconds()-this._offset.totalSeconds(),a=o._date.plusDays(_.intDiv(-i,p));return this._date.until(a,n)}return n.between(this,o)},a.format=function(t){return o(t,"formatter"),t.format(this)},a.atTime=function(t){return e.OffsetDateTime.of(this._date,t,this._offset)},a._toEpochSecond=function(){return this._date.toEpochDay()*p-this._offset.totalSeconds()},a.toEpochSecond=function(t){return o(t,"time"),this._toEpochSecond()+t.toSecondOfDay()},a.compareTo=function(t){if(o(t,"other"),i(t,r,"other"),this._offset.equals(t._offset))return this._date.compareTo(t._date);var e=this._toEpochSecond()-t._toEpochSecond();return 0===e&&(e=this._date.compareTo(t._date)),e},a.isAfter=function(t){return o(t,"other"),i(t,r,"other"),this._toEpochSecond()>t._toEpochSecond()},a.isBefore=function(t){return o(t,"other"),i(t,r,"other"),this._toEpochSecond()<t._toEpochSecond()},a.isEqual=function(t){return o(t,"other"),i(t,r,"other"),this._toEpochSecond()===t._toEpochSecond()},a.equals=function(t){if(this===t)return!0;if(t instanceof r){var e=t;return this._date.equals(e._date)&&this._offset.equals(e._offset)}return!1},a.hashCode=function(){return this._date.hashCode()^this._offset.hashCode()},a.toString=function(){return this._date.toString()+this._offset.toString()},r}(e.Temporal);function m(){var t,r,o;E.MIN=E.of(e.LocalDate.MIN,e.ZoneOffset.MAX),E.MAX=E.of(e.LocalDate.MAX,e.ZoneOffset.MIN),E.FROM=(t="OffsetDate.FROM",r=function(t){return E.from(t)},o=function(t){function e(){return t.apply(this,arguments)||this}return n(e,t),e}(e.TemporalQuery),o.prototype.queryFrom=r,new o(t))}var w,y=e._.MathUtil,A=function(t){function r(e,n){var r;return(r=t.call(this)||this)._value=y.safeToInt(e),r._name=n,r}n(r,t),r.valueOf=function(t){switch(o(t,"name"),t){case"Q1":return r.Q1;case"Q2":return r.Q2;case"Q3":return r.Q3;case"Q4":return r.Q4}throw new e.IllegalArgumentException("No enum constant Quarter."+t)},r.values=function(){return w.slice()},r.of=function(t){switch(o(t,"quarterOfYear"),t){case 1:return r.Q1;case 2:return r.Q2;case 3:return r.Q3;case 4:return r.Q4;default:throw new e.DateTimeException("Invalid value for Quarter: "+t)}},r.ofMonth=function(t){return o(t,"monthOfYear"),e.ChronoField.MONTH_OF_YEAR.range().checkValidValue(t,e.ChronoField.MONTH_OF_YEAR),r.of(y.intDiv(t-1,3)+1)},r.from=function(t){if(t instanceof r)return t;if(t instanceof e.Month){var n=t;return r.of(y.intDiv(n.ordinal(),3)+1)}try{var o=y.safeToInt(t.getLong(e.IsoFields.QUARTER_OF_YEAR));return r.of(o)}catch(n){throw new e.DateTimeException("Unable to obtain Quarter from TemporalAccessor: "+t+" of type "+t.constructor.name,n)}};var a=r.prototype;return a.value=function(){return this._value},a.displayName=function(t,n){throw new e.IllegalArgumentException("Pattern using (localized) text not implemented yet!")},a.isSupported=function(t){return t===e.IsoFields.QUARTER_OF_YEAR||!(t instanceof e.ChronoField)&&(null!=t&&t.isSupportedBy(this))},a.range=function(n){if(o(n,"field"),n===e.IsoFields.QUARTER_OF_YEAR)return n.range();if(n instanceof e.ChronoField)throw new e.UnsupportedTemporalTypeException("Unsupported field: "+n);return t.prototype.range.call(this,n)},a.get=function(t){return o(t,"field"),i(t,e.TemporalField,"field"),this.range(t).checkValidIntValue(this.getLong(t),t)},a.getLong=function(t){if(o(t,"field"),t===e.IsoFields.QUARTER_OF_YEAR)return this.value();if(t instanceof e.ChronoField)throw new e.UnsupportedTemporalTypeException("Unsupported field: "+t);return t.getFrom(this)},a.plus=function(t){var e=y.intMod(t,4);return w[(this.ordinal()+e+4)%4]},a.minus=function(t){return this.plus(-y.intMod(t,4))},a.length=function(t){switch(this){case r.Q1:return t?91:90;case r.Q2:return 91;default:return 92}},a.firstMonth=function(){switch(this){case r.Q1:return e.Month.JANUARY;case r.Q2:return e.Month.APRIL;case r.Q3:return e.Month.JULY;case r.Q4:return e.Month.OCTOBER;default:throw new e.IllegalStateException("Unreachable")}},a.query=function(n){return o(n,"query"),i(n,e.TemporalQuery,"query"),n===e.TemporalQueries.chronology()?e.IsoChronology.INSTANCE:n===e.TemporalQueries.precision()?e.IsoFields.QUARTER_YEARS:t.prototype.query.call(this,n)},a.adjustInto=function(t){return o(t,"temporal"),t.with(e.IsoFields.QUARTER_OF_YEAR,this.value())},a.ordinal=function(){return this._value-1},a.name=function(){return this._name},a.compareTo=function(t){return o(t,"other"),i(t,r,"other"),this._value-t._value},a.toString=function(){return this.name()},a.equals=function(t){return this===t},a.hashCode=function(){return this._value},r}(e.TemporalAccessor);function D(){var t,r,o;A.Q1=new A(1,"Q1"),A.Q2=new A(2,"Q2"),A.Q3=new A(3,"Q3"),A.Q4=new A(4,"Q4"),A.FROM=(t="Quarter.FROM",r=function(t){return A.from(t)},o=function(t){function e(){return t.apply(this,arguments)||this}return n(e,t),e}(e.TemporalQuery),o.prototype.queryFrom=r,new o(t)),w=[A.Q1,A.Q2,A.Q3,A.Q4]}var I=e._.MathUtil,g=function(t){function r(e,n){var r;return(r=t.call(this)||this)._year=I.safeToInt(e),r._quarter=i(n,A,"Quarter"),r}n(r,t),r.now=function(t){return 0===arguments.length?r._now0():1===arguments.length&&t instanceof e.ZoneId?r._nowZoneId(t):r._nowClock(t)},r._now0=function(){return r.now(e.Clock.systemDefaultZone())},r._nowZoneId=function(t){return r.now(e.Clock.system(t))},r._nowClock=function(t){var n=e.LocalDate.now(t);return r.of(n.getYear(),A.from(n.getMonth()))},r.of=function(t,n){if(t instanceof e.Year&&n instanceof A)return r._ofYearQuarter(t,n);if(t instanceof e.Year&&"number"==typeof n)return r._ofYearInt(t,n);if("number"==typeof t&&n instanceof A)return r._ofIntQuarter(t,n);if("number"==typeof t&&"number"==typeof n)return r._ofIntInt(t,n);var o="year must be an instance of Year or number but is "+t.constructor.name,i="quarter must be an instance of Quarter or number but is "+n.constructor.name;throw new e.IllegalArgumentException(o+" and "+i)},r._ofYearQuarter=function(t,e){return r.of(t.value(),e)},r._ofYearInt=function(t,e){return r.of(t.value(),A.of(e))},r._ofIntQuarter=function(t,n){return e.ChronoField.YEAR.checkValidValue(t),o(n,"quarter"),new r(t,n)},r._ofIntInt=function(t,n){return e.ChronoField.YEAR.checkValidValue(t),new r(t,A.of(n))},r.from=function(t){if(t instanceof r)return t;o(t,"temporal");try{var n=I.safeToInt(t.getLong(e.ChronoField.YEAR)),i=I.safeToInt(t.getLong(e.IsoFields.QUARTER_OF_YEAR));return r.of(n,i)}catch(n){throw new e.DateTimeException("Unable to obtain YearQuarter from TemporalAccessor: "+t+" of type "+t.constructor.name,n)}},r.parse=function(t,n){return void 0===n&&(n=r.PARSER),o(n,"formatter"),i(n,e.DateTimeFormatter,"formatter"),n.parse(t,r.FROM)};var a=r.prototype;return a._with=function(t,e){return this._year===t&&this._quarter===e?this:new r(t,e)},a.isSupported=function(t){if(t instanceof e.TemporalField)return this._isSupportedField(t);if(t instanceof e.TemporalUnit)return this._isSupportedUnit(t);if(null==t)return!1;throw new e.IllegalArgumentException("fieldOrUnit must be an instance of TemporalField or TemporalUnit, but is "+t.constructor.name)},a._isSupportedField=function(t){return t===e.IsoFields.QUARTER_OF_YEAR||(t instanceof e.ChronoField?t===e.ChronoField.YEAR||t===e.ChronoField.YEAR_OF_ERA||t===e.ChronoField.ERA:null!=t&&t.isSupportedBy(this))},a._isSupportedUnit=function(t){return t===e.IsoFields.QUARTER_YEARS||(t instanceof e.ChronoUnit?t===e.ChronoUnit.YEARS||t===e.ChronoUnit.DECADES||t===e.ChronoUnit.CENTURIES||t===e.ChronoUnit.MILLENNIA||t===e.ChronoUnit.ERAS:null!=t&&t.isSupportedBy(this))},a.range=function(n){return o(n,"field"),i(n,e.TemporalField,"field"),n===e.IsoFields.QUARTER_OF_YEAR?e.IsoFields.QUARTER_OF_YEAR.range():n===e.ChronoField.YEAR_OF_ERA?this.year()<=0?e.ValueRange.of(1,e.Year.MAX_VALUE+1):e.ValueRange.of(1,e.Year.MAX_VALUE):t.prototype.range.call(this,n)},a.get=function(t){return o(t,"field"),i(t,e.TemporalField,"field"),this.range(t).checkValidIntValue(this.getLong(t),t)},a.getLong=function(n){if(o(n,"field"),i(n,e.TemporalField,"field"),n===e.IsoFields.QUARTER_OF_YEAR)return this._quarter.value();if(n instanceof e.ChronoField)switch(n){case e.ChronoField.YEAR_OF_ERA:return this._year<1?1-this._year:this._year;case e.ChronoField.YEAR:return this._year;case e.ChronoField.ERA:return this._year<1?0:1;default:throw new e.UnsupportedTemporalTypeException("Unsupported field: "+n)}return t.prototype.get.call(this,n)},a._prolepticQuarter=function(){return 4*this._year+(this._quarter.value()-1)},a.year=function(){return this._year},a.quarterValue=function(){return this._quarter.value()},a.quarter=function(){return this._quarter},a.isLeapYear=function(){return e.IsoChronology.isLeapYear(this._year)},a.isValidDay=function(t){return t>=1&&t<=this.lengthOfQuarter()},a.lengthOfQuarter=function(){return this._quarter.length(this.isLeapYear())},a.lengthOfYear=function(){return this.isLeapYear()?366:365},a._withAdjuster=function(e){return e instanceof r?e:t.prototype._withAdjuster.call(this,e)},a._withField=function(t,n){if(o(t,"field"),i(t,e.TemporalField,"field"),t===e.IsoFields.QUARTER_OF_YEAR)return this.withQuarter(e.IsoFields.QUARTER_OF_YEAR.range().checkValidIntValue(n,e.IsoFields.QUARTER_OF_YEAR));if(t instanceof e.ChronoField)switch(t.checkValidValue(n),t){case e.ChronoField.YEAR_OF_ERA:return this.withYear(this._year<1?1-n:n);case e.ChronoField.YEAR:return this.withYear(n);case e.ChronoField.ERA:return this.getLong(e.ChronoField.ERA)===n?this:this.withYear(1-this._year);default:throw new e.UnsupportedTemporalTypeException("Unsupported field: "+t)}return t.adjustInto(this,n)},a.withYear=function(t){return e.ChronoField.YEAR.checkValidValue(t),this._with(t,this._quarter)},a.withQuarter=function(t){return e.IsoFields.QUARTER_OF_YEAR.range().checkValidValue(t,e.IsoFields.QUARTER_OF_YEAR),this._with(this._year,A.of(t))},a._plusUnit=function(t,n){if(n===e.IsoFields.QUARTER_YEARS)return this.plusQuarters(t);if(n instanceof e.ChronoUnit)switch(n){case e.ChronoUnit.YEARS:return this.plusYears(t);case e.ChronoUnit.DECADES:return this.plusYears(I.safeMultiply(t,10));case e.ChronoUnit.CENTURIES:return this.plusYears(I.safeMultiply(t,100));case e.ChronoUnit.MILLENNIA:return this.plusYears(I.safeMultiply(t,1e3));case e.ChronoUnit.ERAS:return this.with(e.ChronoField.ERA,I.safeAdd(this.getLong(e.ChronoField.ERA),t));default:throw new e.UnsupportedTemporalTypeException("Unsupported unit: "+n)}return n.addTo(this,t)},a.plusYears=function(t){if(0===t)return this;var n=e.ChronoField.YEAR.checkValidIntValue(this._year+t);return this._with(n,this._quarter)},a.plusQuarters=function(t){if(0===t)return this;var n=4*this._year+(this._quarter.value()-1)+t,r=e.ChronoField.YEAR.checkValidIntValue(I.intDiv(n,4)),o=I.floorMod(n,4)+1;return this._with(r,A.of(o))},a.minusYears=function(t){return t===I.MIN_SAFE_INTEGER?this.plusYears(I.MIN_SAFE_INTEGER).plusYears(1):this.plusYears(-t)},a.minusQuarters=function(t){return t===I.MIN_SAFE_INTEGER?this.plusQuarters(I.MIN_SAFE_INTEGER).plusQuarters(1):this.plusQuarters(-t)},a.query=function(n){return n===e.TemporalQueries.chronology()?e.IsoChronology.INSTANCE:n===e.TemporalQueries.precision()?e.IsoFields.QUARTER_YEARS:t.prototype.query.call(this,n)},a.adjustInto=function(t){var n=this._prolepticQuarter(),r=4*t.get(e.ChronoField.YEAR)+(t.get(e.IsoFields.QUARTER_OF_YEAR)-1);return t.plus(n-r,e.IsoFields.QUARTER_YEARS)},a.until=function(t,n){o(t,"endExclusive"),o(n,"unit"),i(t,e.Temporal,"endExclusive"),i(n,e.TemporalUnit,"unit");var a=r.from(t),s=a._prolepticQuarter()-this._prolepticQuarter();if(n===e.IsoFields.QUARTER_YEARS)return s;if(n instanceof e.ChronoUnit)switch(n){case e.ChronoUnit.YEARS:return I.intDiv(s,4);case e.ChronoUnit.DECADES:return I.intDiv(s,40);case e.ChronoUnit.CENTURIES:return I.intDiv(s,400);case e.ChronoUnit.MILLENNIA:return I.intDiv(s,4e3);case e.ChronoUnit.ERAS:return a.getLong(e.ChronoField.ERA)-this.getLong(e.ChronoField.ERA);default:throw new e.UnsupportedTemporalTypeException("Unsupported unit: "+n)}return n.between(this,a)},a.format=function(t){return o(t,"formatter"),t.format(this)},a.atDay=function(t){e.ValueRange.of(1,this.lengthOfQuarter()).checkValidValue(t,e.IsoFields.DAY_OF_QUARTER);for(var n=e.Year.isLeap(this._year),r=this._quarter.firstMonth();t>r.length(n);)t-=r.length(n),r=r.plus(1);return e.LocalDate.of(this._year,r,t)},a.atEndOfQuarter=function(){var t=this._quarter.firstMonth().plus(2);return e.LocalDate.of(this._year,t,t.maxLength())},a.compareTo=function(t){o(t,"other"),i(t,r,"other");var e=this._year-t._year;return 0===e&&(e=this._quarter.compareTo(t._quarter)),e},a.isAfter=function(t){return this.compareTo(t)>0},a.isBefore=function(t){return this.compareTo(t)<0},a.equals=function(t){if(this===t)return!0;if(t instanceof r){var e=t;return this._year===e._year&&this._quarter===e._quarter}return!1},a.hashCode=function(){return this._year^this._quarter.value()<<27},a.toString=function(){var t=this._year;return(Math.abs(t)<1e3?t<0?"-"+(""+(t-1e4)).slice(-4):(""+(t+1e4)).slice(-4):t>9999?"+"+t:""+t).concat("-").concat(this._quarter)},r}(e.Temporal);function T(){var t,r,o;g.PARSER=(new e.DateTimeFormatterBuilder).parseCaseInsensitive().appendValue(e.ChronoField.YEAR,4,10,e.SignStyle.EXCEEDS_PAD).appendLiteral("-").appendLiteral("Q").appendValue(e.IsoFields.QUARTER_OF_YEAR,1).toFormatter(),g.FROM=(t="YearQuarter.FROM",r=function(t){return g.from(t)},o=function(t){function e(){return t.apply(this,arguments)||this}return n(e,t),e}(e.TemporalQuery),o.prototype.queryFrom=r,new o(t))}var F=e._.MathUtil,R=function(t){function r(e,n){var r;return(r=t.call(this)||this)._year=e,r._week=n,r}n(r,t),r.now=function(t){switch(arguments.length){case 0:return r._now0();case 1:if(o(t,"clockOrZone"),t instanceof e.ZoneId)return r._nowZoneId(t);if(t instanceof e.Clock)return r._nowClock(t);throw new e.IllegalArgumentException("zoneIdOrClock must be an instance of ZoneId or Clock, but is "+t.constructor.name);default:throw new e.IllegalArgumentException("Invalid number of arguments: "+arguments.length)}},r._now0=function(){return r.now(e.Clock.systemDefaultZone())},r._nowZoneId=function(t){return r.now(e.Clock.system(t))},r._nowClock=function(t){var n=e.LocalDate.now(t);return r.of(n.get(e.IsoFields.WEEK_BASED_YEAR),n.get(e.IsoFields.WEEK_OF_WEEK_BASED_YEAR))},r.of=function(t,n){return F.verifyInt(n),t instanceof e.Year?this._ofYearWeek(t,n):(F.verifyInt(t),this._ofWeekBasedYear(t,n))},r._ofYearWeek=function(t,e){var n=t.value();return this._ofWeekBasedYear(n,e)},r._ofWeekBasedYear=function(t,n){return e.IsoFields.WEEK_BASED_YEAR.range().checkValidValue(t,e.IsoFields.WEEK_BASED_YEAR),e.IsoFields.WEEK_OF_WEEK_BASED_YEAR.range().checkValidValue(n,e.IsoFields.WEEK_OF_WEEK_BASED_YEAR),53===n&&r._weekRange(t)<53&&(n=1,t++,e.IsoFields.WEEK_BASED_YEAR.range().checkValidValue(t,e.IsoFields.WEEK_BASED_YEAR)),new r(t,n)},r._weekRange=function(t){var n=e.LocalDate.of(t,1,1);return n.dayOfWeek()===e.DayOfWeek.THURSDAY||n.dayOfWeek()===e.DayOfWeek.WEDNESDAY&&n.isLeapYear()?53:52},r.from=function(t){if(t instanceof r)return t;o(t,"temporal");try{var n=F.safeToInt(t.getLong(e.IsoFields.WEEK_BASED_YEAR)),i=F.safeToInt(t.getLong(e.IsoFields.WEEK_OF_WEEK_BASED_YEAR));return r.of(n,i)}catch(n){throw new e.DateTimeException("Unable to obtain YearWeek from TemporalAccessor: "+t.constructor.name,n)}},r.parse=function(t,n){return void 0===n&&(n=r.PARSER),function(t,e,n){if(!t)throw n?new n(e):new Error(e)}(null!=n,"formatter",e.NullPointerException),n.parse(t,r.FROM)};var a=r.prototype;return a.isSupported=function(t){if(t instanceof e.TemporalField)return this._isSupportedField(t);if(t instanceof e.TemporalUnit)return this._isSupportedUnit(t);if(null==t)return!1;throw new e.IllegalArgumentException("fieldOrUnit must be an instance of TemporalField or TemporalUnit, but is "+t.constructor.name)},a._isSupportedField=function(t){return t===e.IsoFields.WEEK_OF_WEEK_BASED_YEAR||t===e.IsoFields.WEEK_BASED_YEAR||!(t instanceof e.ChronoField)&&(null!=t&&t.isSupportedBy(this))},a._isSupportedUnit=function(t){return t===e.ChronoUnit.WEEKS||t===e.IsoFields.WEEK_BASED_YEARS||!(t instanceof e.ChronoUnit)&&(null!=t&&t.isSupportedBy(this))},a.range=function(n){return o(n,"field"),n===e.IsoFields.WEEK_BASED_YEAR?e.IsoFields.WEEK_BASED_YEAR.range():n===e.IsoFields.WEEK_OF_WEEK_BASED_YEAR?e.ValueRange.of(1,r._weekRange(this._year)):t.prototype.range.call(this,n)},a.get=function(t){return this.range(t).checkValidIntValue(this.getLong(t),t)},a.getLong=function(t){if(o(t,"field"),t===e.IsoFields.WEEK_BASED_YEAR)return this._year;if(t===e.IsoFields.WEEK_OF_WEEK_BASED_YEAR)return this._week;if(t instanceof e.ChronoField)throw new e.UnsupportedTemporalTypeException("Unsupported field: "+t);return t.getFrom(this)},a.year=function(){return this._year},a.week=function(){return this._week},a.is53WeekYear=function(){return 53===r._weekRange(this._year)},a.lengthOfYear=function(){return this.is53WeekYear()?371:364},a._withAdjuster=function(e){return e instanceof r?e:t.prototype._withAdjuster.call(this,e)},a._withField=function(t,n){if(t===e.IsoFields.WEEK_OF_WEEK_BASED_YEAR)return this.withWeek(e.IsoFields.WEEK_OF_WEEK_BASED_YEAR.range().checkValidIntValue(n,e.IsoFields.WEEK_OF_WEEK_BASED_YEAR));if(t===e.IsoFields.WEEK_BASED_YEAR)return this.withYear(e.IsoFields.WEEK_BASED_YEAR.range().checkValidIntValue(n,e.IsoFields.WEEK_BASED_YEAR));if(t instanceof e.ChronoField)throw new e.UnsupportedTemporalTypeException("Unsupported field: "+t);return t.adjustInto(this,n)},a.withYear=function(t){return 53===this._week&&r._weekRange(t)<53?r.of(t,52):r.of(t,this._week)},a.withWeek=function(t){return r.of(this._year,t)},a._plusUnit=function(t,n){if(n===e.ChronoUnit.WEEKS)return this.plusWeeks(t);if(n===e.IsoFields.WEEK_BASED_YEARS)return this.plusYears(t);if(n instanceof e.ChronoUnit)throw new e.UnsupportedTemporalTypeException("Unsupported unit: "+n);return n.addTo(this,t)},a.plusYears=function(t){if(0===t)return this;var e=F.safeToInt(F.safeAdd(this._year,t));return this.withYear(e)},a.plusWeeks=function(t){if(0===t)return this;var n=this.atDay(e.DayOfWeek.MONDAY).plusWeeks(t);return r.from(n)},a._minusUnit=function(t,e){return o(t,"amountToSubtract"),o(e,"unit"),this._plusUnit(-t,e)},a.minusYears=function(t){if(0===t)return this;var e=F.safeToInt(F.safeSubtract(this._year,t));return this.withYear(e)},a.minusWeeks=function(t){if(0===t)return this;var n=this.atDay(e.DayOfWeek.MONDAY).minusWeeks(t);return r.from(n)},a.query=function(n){return o(n,"query"),i(n,e.TemporalQuery,"query"),n===e.TemporalQueries.chronology()?e.IsoChronology.INSTANCE:t.prototype.query.call(this,n)},a.adjustInto=function(t){return t.with(e.IsoFields.WEEK_BASED_YEAR,this._year).with(e.IsoFields.WEEK_OF_WEEK_BASED_YEAR,this._week)},a.until=function(t,n){var o=r.from(t);if(n===e.ChronoUnit.WEEKS)return this._daysUntil(o);if(n===e.IsoFields.WEEK_BASED_YEARS)return this._yearsUntil(o);if(n instanceof e.ChronoUnit)throw new e.UnsupportedTemporalTypeException("Unsupported unit: "+n);return n.between(this,o)},a._daysUntil=function(t){var n=this.atDay(e.DayOfWeek.MONDAY),r=t.atDay(e.DayOfWeek.MONDAY).toEpochDay()-n.toEpochDay();return F.intDiv(r,7)},a._yearsUntil=function(t){var e=t._year-this._year;return e>0&&t._week<this._week?e-1:e<0&&t._week>this._week?e+1:e},a.format=function(t){return o(t,"formatter"),t.format(this)},a.atDay=function(t){o(t,"dayOfWeek");var n=e.LocalDate.of(this._year,1,4).dayOfWeek().value()+3,r=7*this._week+t.value()-n,i=e.Year.isLeap(this._year)?366:365;if(r>i)return e.LocalDate.ofYearDay(this._year+1,r-i);if(r>0)return e.LocalDate.ofYearDay(this._year,r);var a=e.Year.isLeap(this._year-1)?366:365;return e.LocalDate.ofYearDay(this._year-1,a+r)},a.compareTo=function(t){o(t,"other"),i(t,r,"other");var e=this._year-t._year;return 0===e&&(e=this._week-t._week),e},a.isAfter=function(t){return this.compareTo(t)>0},a.isBefore=function(t){return this.compareTo(t)<0},a.equals=function(t){return this===t||t instanceof r&&(this._year===t._year&&this._week===t._week)},a.hashCode=function(){return this._year^this._week<<25},a.toString=function(){var t=this._year;return(Math.abs(t)<1e3?t<0?"-"+(""+(t-1e4)).slice(-4):(""+(t+1e4)).slice(-4):t>9999?"+"+t:""+t).concat(this._week<10?"-W0":"-W").concat(this._week)},r}(e.Temporal);function v(){var t,r,o;R.PARSER=(new e.DateTimeFormatterBuilder).parseCaseInsensitive().appendValue(e.IsoFields.WEEK_BASED_YEAR,4,10,e.SignStyle.EXCEEDS_PAD).appendLiteral("-W").appendValue(e.IsoFields.WEEK_OF_WEEK_BASED_YEAR,2).toFormatter(),R.FROM=(t="YearWeek.FROM",r=function(t){return R.from(t)},o=function(t){function e(){return t.apply(this,arguments)||this}return n(e,t),e}(e.TemporalQuery),o.prototype.queryFrom=r,new o(t))}var Y=!1;return Y||(Y=!0,function(){s.VALUES=new Array(31);for(var t=0;t<31;t++)s.VALUES[t]=new s(t+1)}(),function(){c.VALUES=new Array(366);for(var t=0;t<366;t++)c.VALUES[t]=new c(t+1)}(),f.ALL=f.of(e.Instant.MIN,e.Instant.MAX),d.ALL=new d(e.LocalDate.MIN,e.LocalDate.MAX),m(),D(),T(),v()),e.use((function(){})),t.DayOfMonth=s,t.DayOfYear=c,t.Interval=f,t.LocalDateRange=d,t.OffsetDate=E,t.Quarter=A,t.YearQuarter=g,t.YearWeek=R,Object.defineProperty(t,"__esModule",{value:!0}),t}({},JSJoda);
|
|
5
|
+
var JSJodaExtra=function(t,e){"use strict";function n(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,r(t,e)}function r(t,e){return r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},r(t,e)}function o(t,n){if(null==t)throw new e.NullPointerException(n+" must not be null");return t}function i(t,n,r){if(!(t instanceof n))throw new e.IllegalArgumentException(r+" must be an instance of "+(n.name?n.name:n)+(t&&t.constructor&&t.constructor.name?", but is "+t.constructor.name:""));return t}var a=e._.MathUtil,s=function(t){function r(e){var n;return(n=t.call(this)||this)._day=a.safeToInt(e),n}n(r,t),r.now=function(t){switch(arguments.length){case 0:return r._now0();case 1:if(o(t,"clockOrZone"),t instanceof e.ZoneId)return r._nowZoneId(t);if(t instanceof e.Clock)return r._nowClock(t);throw new e.IllegalArgumentException("zoneIdOrClock must be an instance of ZoneId or Clock, but is "+t.constructor.name);default:throw new e.IllegalArgumentException("Invalid number of arguments: "+arguments.length)}},r._now0=function(){return this.now(e.Clock.systemDefaultZone())},r._nowZoneId=function(t){return this.now(e.Clock.system(t))},r._nowClock=function(t){var n=e.LocalDate.now(t);return r.of(n.dayOfMonth())},r.of=function(t){if(1<=t&&t<=31)return r.VALUES[t-1];throw new e.DateTimeException("Invalid value for DayOfMonth: "+t)},r.from=function(t){if(t instanceof r)return t;o(t,"temporal");try{return r.of(t.get(e.ChronoField.DAY_OF_MONTH))}catch(n){throw new e.DateTimeException("Unable to obtain DayOfMonth from TemporalAccessor: "+t+" of type "+t.constructor.name,n)}};var s=r.prototype;return s.value=function(){return this._day},s.isSupported=function(t){return t instanceof e.ChronoField?t===e.ChronoField.DAY_OF_MONTH:null!=t&&t.isSupportedBy(this)},s.range=function(n){return o(n,"field"),n===e.ChronoField.DAY_OF_MONTH?n.range():t.prototype.range.call(this,n)},s.get=function(t){return this.range(t).checkValidIntValue(this.getLong(t),t)},s.getLong=function(t){if(o(t,"field"),t===e.ChronoField.DAY_OF_MONTH)return this._day;if(t instanceof e.ChronoField)throw new e.UnsupportedTemporalTypeException("Unsupported field: "+t);return t.getFrom(this)},s.isValidYearMonth=function(t){return null!=t&&t.isValidDay(this._day)},s.query=function(n){return o(n,"query"),i(n,e.TemporalQuery,"query"),n===e.TemporalQueries.chronology()?e.IsoChronology.INSTANCE:t.prototype.query.call(this,n)},s.adjustInto=function(t){return o(t,"temporal"),t.with(e.ChronoField.DAY_OF_MONTH,this._day)},s.atMonth=function(t){return o(t,"month"),t instanceof e.Month?e.MonthDay.of(t,Math.min(this._day,t.maxLength())):e.MonthDay.of(t,Math.min(this._day,e.Month.of(t).maxLength()))},s.atYearMonth=function(t){return o(t,"yearMonth"),t.atDay(Math.min(this._day,t.lengthOfMonth()))},s.compareTo=function(t){return o(t,"other"),i(t,r,"other"),this._day-t._day},s.equals=function(t){return this===t||t instanceof r&&this._day===t._day},s.hashCode=function(){return this._day},s.toString=function(){return"DayOfMonth:"+this._day},r}(e.TemporalAccessor);var u=e._.MathUtil,c=function(t){function r(e){var n;return(n=t.call(this)||this)._day=u.safeToInt(e),n}n(r,t),r.now=function(t){switch(arguments.length){case 0:return r._now0();case 1:if(o(t,"clockOrZone"),t instanceof e.ZoneId)return r._nowZoneId(t);if(t instanceof e.Clock)return r._nowClock(t);throw new e.IllegalArgumentException("zoneIdOrClock must be an instance of ZoneId or Clock, but is "+t.constructor.name);default:throw new e.IllegalArgumentException("Invalid number of arguments: "+arguments.length)}},r._now0=function(){return r.now(e.Clock.systemDefaultZone())},r._nowZoneId=function(t){return r.now(e.Clock.system(t))},r._nowClock=function(t){var n=e.LocalDate.now(t);return r.of(n.dayOfYear())},r.of=function(t){if(1<=t&&t<=366)return r.VALUES[t-1];throw new e.DateTimeException("Invalid value for DayOfYear: "+t)},r.from=function(t){if(o(t,"temporal"),i(t,e.TemporalAccessor,"temporal"),t instanceof r)return t;try{return r.of(t.get(e.ChronoField.DAY_OF_YEAR))}catch(n){throw new e.DateTimeException("Unable to obtain DayOfYear from TemporalAccessor: "+t+" of type "+t.constructor.name,n)}};var a=r.prototype;return a.value=function(){return this._day},a.isSupported=function(t){return t instanceof e.ChronoField?t===e.ChronoField.DAY_OF_YEAR:null!=t&&t.isSupportedBy(this)},a.range=function(n){return o(n,"field"),n===e.ChronoField.DAY_OF_YEAR?n.range():t.prototype.range.call(this,n)},a.get=function(t){return this.range(t).checkValidIntValue(this.getLong(t),t)},a.getLong=function(t){if(o(t,"field"),t===e.ChronoField.DAY_OF_YEAR)return this._day;if(t instanceof e.ChronoField)throw new e.UnsupportedTemporalTypeException("Unsupported field: "+t);return t.getFrom(this)},a.isValidYear=function(t){return this._day<366||e.Year.isLeap(t)},a.query=function(n){return o(n,"query"),i(n,e.TemporalQuery,"query"),n===e.TemporalQueries.chronology()?e.IsoChronology.INSTANCE:t.prototype.query.call(this,n)},a.adjustInto=function(t){return o(t,"temporal"),t.with(e.ChronoField.DAY_OF_YEAR,this._day)},a.atYear=function(t){return o(t,"year"),t instanceof e.Year?t.atDay(this._day):e.LocalDate.ofYearDay(t,this._day)},a.compareTo=function(t){return o(t,"other"),i(t,r,"other"),this._day-t._day},a.equals=function(t){return this===t||t instanceof r&&this._day===t._day},a.hashCode=function(){return this._day},a.toString=function(){return"DayOfYear:"+this._day},r}(e.TemporalAccessor);var f=function(){function t(t,e){this._start=t,this._end=e}t.of=function(n,r){return r instanceof e.Duration?t.ofInstantDuration(n,r):t.ofInstantInstant(n,r)},t.ofInstantInstant=function(n,r){if(o(n,"startInclusive"),o(r,"endExclusive"),i(n,e.Instant,"startInclusive"),i(r,e.Instant,"endExclusive"),r.isBefore(n))throw new e.DateTimeException("End instant must on or after start instant");return new t(n,r)},t.ofInstantDuration=function(n,r){if(o(n,"startInclusive"),o(r,"duration"),i(n,e.Instant,"startInclusive"),i(r,e.Duration,"duration"),r.isNegative())throw new e.DateTimeException("Duration must not be zero or negative");return new t(n,n.plus(r))},t.parse=function(n){if(o(n,"text"),"string"!=typeof n)throw new e.IllegalArgumentException("text must be a string, but is "+n.constructor.name);for(var r=0;r<n.length;r+=1)if("/"===n.charAt(r)){var i=n.charAt(0);if("P"===i||"p"===i){var a=e.Duration.parse(n.substring(0,r)),s=e.ZonedDateTime.parse(n.substring(r+1,n.length)).toInstant();return t.of(s.minus(a),s)}var u=e.ZonedDateTime.parse(n.substring(0,r)).toInstant();if(r+1<n.length){var c=n.charAt(r+1);if("P"===c||"p"===c){var f=e.Duration.parse(n.substring(r+1,n.length));return t.of(u,u.plus(f))}}var h=e.ZonedDateTime.parse(n.substring(r+1,n.length)).toInstant();return t.of(u,h)}throw new e.DateTimeParseException("Interval cannot be parsed, no forward slash found",n,0)};var n=t.prototype;return n.start=function(){return this._start},n.end=function(){return this._end},n.isEmpty=function(){return this._start.equals(this._end)},n.isUnboundedStart=function(){return this._start.equals(e.Instant.MIN)},n.isUnboundedEnd=function(){return this._end.equals(e.Instant.MAX)},n.withStart=function(e){return t.of(e,this._end)},n.withEnd=function(e){return t.of(this._start,e)},n.contains=function(t){return o(t,"instant"),i(t,e.Instant,"instant"),this._start.compareTo(t)<=0&&(t.compareTo(this._end)<0||this.isUnboundedEnd())},n.encloses=function(e){return o(e,"other"),i(e,t,"other"),this._start.compareTo(e.start())<=0&&e.end().compareTo(this._end)<=0},n.abuts=function(e){return o(e,"other"),i(e,t,"other"),!this._end.equals(e.start())!=!this._start.equals(e.end())},n.isConnected=function(e){return o(e,"other"),i(e,t,"other"),this.equals(e)||this._start.compareTo(e.end())<=0&&e.start().compareTo(this._end)<=0},n.overlaps=function(e){return o(e,"other"),i(e,t,"other"),e.equals(this)||this._start.compareTo(e.end())<0&&e.start().compareTo(this._end)<0},n.intersection=function(n){if(o(n,"other"),i(n,t,"other"),!1===this.isConnected(n))throw new e.DateTimeException("Intervals do not connect: "+this+" and "+n);var r=this._start.compareTo(n.start()),a=this._end.compareTo(n.end());if(r>=0&&a<=0)return this;if(r<=0&&a>=0)return n;var s=r>=0?this._start:n.start(),u=a<=0?this._end:n.end();return t.of(s,u)},n.union=function(n){if(o(n,"other"),i(n,t,"other"),!1===this.isConnected(n))throw new e.DateTimeException("Intervals do not connect: "+this+" and "+n);var r=this._start.compareTo(n.start()),a=this._end.compareTo(n.end());if(r>=0&&a<=0)return n;if(r<=0&&a>=0)return this;var s=r>=0?n.start():this._start,u=a<=0?n.end():this._end;return t.of(s,u)},n.span=function(e){o(e,"other"),i(e,t,"other");var n=this._start.compareTo(e.start()),r=this._end.compareTo(e.end()),a=n>=0?e.start():this._start,s=r<=0?e.end():this._end;return t.of(a,s)},n.isAfter=function(t){return t instanceof e.Instant?this.isAfterInstant(t):this.isAfterInterval(t)},n.isBefore=function(t){return t instanceof e.Instant?this.isBeforeInstant(t):this.isBeforeInterval(t)},n.isAfterInstant=function(t){return this._start.compareTo(t)>0},n.isBeforeInstant=function(t){return this._end.compareTo(t)<=0&&this._start.compareTo(t)<0},n.isAfterInterval=function(t){return this._start.compareTo(t.end())>=0&&!t.equals(this)},n.isBeforeInterval=function(t){return this._end.compareTo(t.start())<=0&&!t.equals(this)},n.toDuration=function(){return e.Duration.between(this._start,this._end)},n.equals=function(e){return this===e||e instanceof t&&(this._start.equals(e.start())&&this._end.equals(e.end()))},n.hashCode=function(){return this._start.hashCode()^this._end.hashCode()},n.toString=function(){return this._start.toString()+"/"+this._end.toString()},t}();var h=e.LocalDate.MIN.plusDays(1),l=e.LocalDate.MAX.minusDays(1),d=function(){function t(t,n){if(o(t,"startInclusive"),o(n,"endExclusive"),i(t,e.LocalDate,"startInclusive"),i(n,e.LocalDate,"endExclusive"),n.isBefore(t))throw new e.DateTimeException("End date must be on or after start date");if(t.equals(l))throw new e.DateTimeException("Range must not start at LocalDate.MAX.minusDays(1)");if(n.equals(h))throw new e.DateTimeException("Range must not end at LocalDate.MIN.plusDays(1)");if(n.equals(e.LocalDate.MIN)||t.equals(e.LocalDate.MAX))throw new e.DateTimeException("Empty range must not be at LocalDate.MIN or LocalDate.MAX");this._start=t,this._end=n}t.of=function(n,r){if(n instanceof e.LocalDate&&r instanceof e.LocalDate)return t._ofLocalDateLocalDate(n,r);if(n instanceof e.LocalDate&&r instanceof e.Period)return t._ofLocalDatePeriod(n,r);var o=[];throw n instanceof e.LocalDate||o.push("startInclusive must be an instance of LocalDate but is "+n.constructor.name),r instanceof e.LocalDate||r instanceof e.Period||o.push("endExclusiveOrPeriod must be an instance of LocalDate or Period but is "+r.constructor.name),new e.IllegalArgumentException(o.join(" and "))},t._ofLocalDateLocalDate=function(n,r){return o(n,"startInclusive"),o(r,"endExclusive"),i(n,e.LocalDate,"startInclusive"),i(r,e.LocalDate,"endExclusive"),new t(n,r)},t._ofLocalDatePeriod=function(n,r){if(o(n,"startInclusive"),o(r,"period"),i(n,e.LocalDate,"startInclusive"),i(r,e.Period,"period"),r.isNegative())throw new e.DateTimeException("Period must not be zero or negative");return new t(n,n.plus(r))},t.ofClosed=function(n,r){if(o(n,"startInclusive"),o(r,"endInclusive"),i(n,e.LocalDate,"startInclusive"),i(r,e.LocalDate,"endInclusive"),r.isBefore(n))throw new e.DateTimeException("Start date must be on or before end date");return new t(n,r.equals(e.LocalDate.MAX)?e.LocalDate.MAX:r.plusDays(1))},t.ofEmpty=function(n){return o(n,"date"),i(n,e.LocalDate,"date"),new t(n,n)},t.ofUnbounded=function(){return t.ALL},t.ofUnboundedStart=function(n){return o(n,"endExclusive"),i(n,e.LocalDate,"endExclusive"),t.of(e.LocalDate.MIN,n)},t.ofUnboundedEnd=function(n){return t.of(n,e.LocalDate.MAX)},t.parse=function(n){o(n,"text");for(var r=0;r<n.length;r++)if("/"===n[r]){var i=n.charAt(0);if("P"===i||"p"===i){var a=e.Period.parse(n.slice(0,r)),s=e.LocalDate.parse(n.slice(r+1,n.length));return t.of(s.minus(a),s)}var u=e.LocalDate.parse(n.slice(0,r));if(r+1<n.length){var c=n[r+1];if("P"===c||"p"===c){var f=e.Period.parse(n.slice(r+1,n.length));return t.of(u,u.plus(f))}}var h=e.LocalDate.parse(n.slice(r+1,n.length));return t.of(u,h)}throw new e.DateTimeParseException("LocalDateRange cannot be parsed, no forward slash found",n,0)};var n=t.prototype;return n.start=function(){return this._start},n.end=function(){return this._end},n.endInclusive=function(){return this.isUnboundedEnd()?e.LocalDate.MAX:this._end.minusDays(1)},n.isEmpty=function(){return this._start.equals(this._end)},n.isUnboundedStart=function(){return this._start.equals(e.LocalDate.MIN)},n.isUnboundedEnd=function(){return this._end.equals(e.LocalDate.MAX)},n.withStart=function(e){return t.of(this._start.with(e),this._end)},n.withEnd=function(e){return t.of(this._start,this._end.with(e))},n.contains=function(t){return o(t,"date"),this._start.compareTo(t)<=0&&(t.compareTo(this._end)<0||this.isUnboundedEnd())},n.encloses=function(t){return o(t,"other"),this._start.compareTo(t._start)<=0&&t._end.compareTo(this._end)<=0},n.abuts=function(t){return o(t,"other"),this._end.equals(t._start)!==this._start.equals(t._end)},n.isConnected=function(t){return o(t,"other"),this.equals(t)||this._start.compareTo(t._end)<=0&&t._start.compareTo(this._end)<=0},n.overlaps=function(t){return o(t,"other"),t.equals(this)||this._start.compareTo(t._end)<0&&t._start.compareTo(this._end)<0},n.intersection=function(n){if(o(n,"other"),!1===this.isConnected(n))throw new e.DateTimeException("Ranges do not connect: "+this+" and "+n);var r=this._start.compareTo(n._start),i=this._end.compareTo(n._end);if(r>=0&&i<=0)return this;if(r<=0&&i>=0)return n;var a=r>=0?this._start:n._start,s=i<=0?this._end:n._end;return t.of(a,s)},n.union=function(n){if(o(n,"other"),!1===this.isConnected(n))throw new e.DateTimeException("Ranges do not connect: "+this+" and "+n);var r=this._start.compareTo(n._start),i=this._end.compareTo(n._end);if(r>=0&&i<=0)return n;if(r<=0&&i>=0)return this;var a=r>=0?n._start:this._start,s=i<=0?n._end:this._end;return t.of(a,s)},n.span=function(e){o(e,"other");var n=this._start.compareTo(e._start),r=this._end.compareTo(e._end),i=n>=0?e._start:this._start,a=r<=0?e._end:this._end;return t.of(i,a)},n.isAfter=function(n){if(n instanceof e.LocalDate)return this._isAfterLocalDate(n);if(n instanceof t)return this._isAfterLocalDateRange(n);throw new e.IllegalArgumentException("localDateOrLocalDateRange must be an instance of LocalDate or LocalDateRange but is "+n.constructor.name)},n.isBefore=function(n){if(n instanceof e.LocalDate)return this._isBeforeLocalDate(n);if(n instanceof t)return this._isBeforeLocalDateRange(n);throw new e.IllegalArgumentException("localDateOrLocalDateRange must be an instance of LocalDate or LocalDateRange but is "+n.constructor.name)},n._isAfterLocalDate=function(t){return this._start.compareTo(t)>0},n._isBeforeLocalDate=function(t){return this._end.compareTo(t)<=0&&this._start.compareTo(t)<0},n._isAfterLocalDateRange=function(t){return this._start.compareTo(t._end)>=0&&!t.equals(this)},n._isBeforeLocalDateRange=function(t){return this._end.compareTo(t._start)<=0&&!t.equals(this)},n.lengthInDays=function(){return this.isUnboundedStart()||this.isUnboundedEnd()?Number.POSITIVE_INFINITY:this._end.toEpochDay()-this._start.toEpochDay()},n.toPeriod=function(){if(this.isUnboundedStart()||this.isUnboundedEnd())throw new e.ArithmeticException("Unbounded range cannot be converted to a Period");return e.Period.between(this._start,this._end)},n.equals=function(e){if(this===e)return!0;if(e instanceof t){var n=e;return this._start.equals(n._start)&&this._end.equals(n._end)}return!1},n.hashCode=function(){return this._start.hashCode()^this._end.hashCode()},n.toString=function(){return this._start.toString()+"/"+this._end.toString()},t}();var _=e._.MathUtil,p=86400,E=function(t){function r(e,n){var r;return(r=t.call(this)||this)._date=o(e,"date"),r._offset=o(n,"offset"),r}n(r,t),r.now=function(t){return 0===arguments.length?r._now0():1===arguments.length&&t instanceof e.ZoneId?r._nowZoneId(t):r._nowClock(t)},r._now0=function(){return r.now(e.Clock.systemDefaultZone())},r._nowZoneId=function(t){return r.now(e.Clock.system(t))},r._nowClock=function(t){o(t,"clock");var e=t.instant();return r.ofInstant(e,t.zone().rules().offset(e))},r.of=function(){switch(arguments.length){case 2:return r._ofLocalDateZoneOffset.apply(r,arguments);case 4:return r._ofIntIntIntZoneOffset.apply(r,arguments);default:throw new e.IllegalArgumentException("Illegal number of arguments")}},r._ofLocalDateZoneOffset=function(t,e){return new r(t,e)},r._ofIntIntIntZoneOffset=function(t,n,o,i){return new r(e.LocalDate.of(t,n,o),i)},r.ofInstant=function(t,n){o(t,"instant"),o(n,"zone");var i=n.rules().offset(t),a=t.epochSecond()+i.totalSeconds(),s=_.floorDiv(a,p);return new r(e.LocalDate.ofEpochDay(s),i)},r.from=function(t){if(t instanceof r)return t;o(t,"temporal");try{return new r(e.LocalDate.from(t),e.ZoneOffset.from(t))}catch(n){throw new e.DateTimeException("Unable to obtain OffsetDate from TemporalAccessor: "+t.constructor.name,n)}},r.parse=function(t,n){return void 0===n&&(n=e.DateTimeFormatter.ISO_OFFSET_DATE),o(n,"formatter"),n.parse(t,r.FROM)};var a=r.prototype;return a._with=function(t,e){return this._date===t&&this._offset.equals(e)?this:new r(t,e)},a.isSupported=function(t){if(t instanceof e.TemporalField)return this._isSupportedField(t);if(t instanceof e.TemporalUnit)return this._isSupportedUnit(t);if(null==t)return!1;throw new e.IllegalArgumentException("fieldOrUnit must be an instance of TemporalField or TemporalUnit, but is "+t.constructor.name)},a._isSupportedField=function(t){return t instanceof e.ChronoField?t.isDateBased()||t===e.ChronoField.OFFSET_SECONDS:null!=t&&t.isSupportedBy(this)},a._isSupportedUnit=function(t){return t instanceof e.ChronoUnit?t.isDateBased():null!=t&&t.isSupportedBy(this)},a.range=function(t){return o(t,"field"),i(t,e.TemporalField,"field"),t instanceof e.ChronoField?t===e.ChronoField.OFFSET_SECONDS?t.range():this._date.range(t):t.rangeRefinedBy(this)},a.get=function(t){return o(t,"field"),i(t,e.TemporalField,"field"),this.range(t).checkValidIntValue(this.getLong(t),t)},a.getLong=function(t){return o(t,"field"),i(t,e.TemporalField,"field"),t instanceof e.ChronoField?t===e.ChronoField.OFFSET_SECONDS?this.offset().totalSeconds():this._date.getLong(t):t.getFrom(this)},a.offset=function(){return this._offset},a.withOffsetSameLocal=function(t){return o(t,"offset"),this._with(this._date,t)},a.toLocalDate=function(){return this._date},a.year=function(){return this._date.year()},a.monthValue=function(){return this._date.monthValue()},a.month=function(){return this._date.month()},a.dayOfMonth=function(){return this._date.dayOfMonth()},a.dayOfYear=function(){return this._date.dayOfYear()},a.dayOfWeek=function(){return this._date.dayOfWeek()},a._withAdjuster=function(n){return n instanceof e.LocalDate?this._with(n,this._offset):n instanceof e.ZoneOffset?this._with(this._date,n):n instanceof r?n:t.prototype._withAdjuster.call(this,n)},a._withField=function(t,n){if(o(t,"field"),i(t,e.TemporalField,"field"),t instanceof e.ChronoField){if(t===e.ChronoField.OFFSET_SECONDS){var r=t;return this._with(this._date,e.ZoneOffset.ofTotalSeconds(r.checkValidIntValue(n)))}return this._with(this._date.with(t,n),this._offset)}return t.adjustInto(this,n)},a.withYear=function(t){return this._with(this._date.withYear(t),this._offset)},a.withMonth=function(t){return this._with(this._date.withMonth(t),this._offset)},a.withDayOfMonth=function(t){return this._with(this._date.withDayOfMonth(t),this._offset)},a.withDayOfYear=function(t){return this._with(this._date.withDayOfYear(t),this._offset)},a._plusUnit=function(t,n){return n instanceof e.ChronoUnit?this._with(this._date.plus(t,n),this._offset):n.addTo(this,t)},a.plusYears=function(t){return this._with(this._date.plusYears(t),this._offset)},a.plusMonths=function(t){return this._with(this._date.plusMonths(t),this._offset)},a.plusWeeks=function(t){return this._with(this._date.plusWeeks(t),this._offset)},a.plusDays=function(t){return this._with(this._date.plusDays(t),this._offset)},a.minusYears=function(t){return this._with(this._date.minusYears(t),this._offset)},a.minusMonths=function(t){return this._with(this._date.minusMonths(t),this._offset)},a.minusWeeks=function(t){return this._with(this._date.minusWeeks(t),this._offset)},a.minusDays=function(t){return this._with(this._date.minusDays(t),this._offset)},a.query=function(n){return o(n,"query"),i(n,e.TemporalQuery,"query"),n===e.TemporalQueries.chronology()?e.IsoChronology.INSTANCE:n===e.TemporalQueries.precision()?e.ChronoUnit.DAYS:n===e.TemporalQueries.offset()||n===e.TemporalQueries.zone()?this.offset():t.prototype.query.call(this,n)},a.adjustInto=function(t){return t.with(e.ChronoField.OFFSET_SECONDS,this.offset().totalSeconds()).with(e.ChronoField.EPOCH_DAY,this.toLocalDate().toEpochDay())},a.until=function(t,n){var o=r.from(t);if(n instanceof e.ChronoUnit){var i=o._offset.totalSeconds()-this._offset.totalSeconds(),a=o._date.plusDays(_.intDiv(-i,p));return this._date.until(a,n)}return n.between(this,o)},a.format=function(t){return o(t,"formatter"),t.format(this)},a.atTime=function(t){return e.OffsetDateTime.of(this._date,t,this._offset)},a._toEpochSecond=function(){return this._date.toEpochDay()*p-this._offset.totalSeconds()},a.toEpochSecond=function(t){return o(t,"time"),this._toEpochSecond()+t.toSecondOfDay()},a.compareTo=function(t){if(o(t,"other"),i(t,r,"other"),this._offset.equals(t._offset))return this._date.compareTo(t._date);var e=this._toEpochSecond()-t._toEpochSecond();return 0===e&&(e=this._date.compareTo(t._date)),e},a.isAfter=function(t){return o(t,"other"),i(t,r,"other"),this._toEpochSecond()>t._toEpochSecond()},a.isBefore=function(t){return o(t,"other"),i(t,r,"other"),this._toEpochSecond()<t._toEpochSecond()},a.isEqual=function(t){return o(t,"other"),i(t,r,"other"),this._toEpochSecond()===t._toEpochSecond()},a.equals=function(t){if(this===t)return!0;if(t instanceof r){var e=t;return this._date.equals(e._date)&&this._offset.equals(e._offset)}return!1},a.hashCode=function(){return this._date.hashCode()^this._offset.hashCode()},a.toString=function(){return this._date.toString()+this._offset.toString()},r}(e.Temporal);function m(){var t,r,o;E.MIN=E.of(e.LocalDate.MIN,e.ZoneOffset.MAX),E.MAX=E.of(e.LocalDate.MAX,e.ZoneOffset.MIN),E.FROM=(t="OffsetDate.FROM",r=function(t){return E.from(t)},o=function(t){function e(){return t.apply(this,arguments)||this}return n(e,t),e}(e.TemporalQuery),o.prototype.queryFrom=r,new o(t))}var w,y=e._.MathUtil,A=function(t){function r(e,n){var r;return(r=t.call(this)||this)._value=y.safeToInt(e),r._name=n,r}n(r,t),r.valueOf=function(t){switch(o(t,"name"),t){case"Q1":return r.Q1;case"Q2":return r.Q2;case"Q3":return r.Q3;case"Q4":return r.Q4}throw new e.IllegalArgumentException("No enum constant Quarter."+t)},r.values=function(){return w.slice()},r.of=function(t){switch(o(t,"quarterOfYear"),t){case 1:return r.Q1;case 2:return r.Q2;case 3:return r.Q3;case 4:return r.Q4;default:throw new e.DateTimeException("Invalid value for Quarter: "+t)}},r.ofMonth=function(t){return o(t,"monthOfYear"),e.ChronoField.MONTH_OF_YEAR.range().checkValidValue(t,e.ChronoField.MONTH_OF_YEAR),r.of(y.intDiv(t-1,3)+1)},r.from=function(t){if(t instanceof r)return t;if(t instanceof e.Month){var n=t;return r.of(y.intDiv(n.ordinal(),3)+1)}try{var o=y.safeToInt(t.getLong(e.IsoFields.QUARTER_OF_YEAR));return r.of(o)}catch(n){throw new e.DateTimeException("Unable to obtain Quarter from TemporalAccessor: "+t+" of type "+t.constructor.name,n)}};var a=r.prototype;return a.value=function(){return this._value},a.displayName=function(t,n){throw new e.IllegalArgumentException("Pattern using (localized) text not implemented yet!")},a.isSupported=function(t){return t===e.IsoFields.QUARTER_OF_YEAR||!(t instanceof e.ChronoField)&&(null!=t&&t.isSupportedBy(this))},a.range=function(n){if(o(n,"field"),n===e.IsoFields.QUARTER_OF_YEAR)return n.range();if(n instanceof e.ChronoField)throw new e.UnsupportedTemporalTypeException("Unsupported field: "+n);return t.prototype.range.call(this,n)},a.get=function(t){return o(t,"field"),i(t,e.TemporalField,"field"),this.range(t).checkValidIntValue(this.getLong(t),t)},a.getLong=function(t){if(o(t,"field"),t===e.IsoFields.QUARTER_OF_YEAR)return this.value();if(t instanceof e.ChronoField)throw new e.UnsupportedTemporalTypeException("Unsupported field: "+t);return t.getFrom(this)},a.plus=function(t){var e=y.intMod(t,4);return w[(this.ordinal()+e+4)%4]},a.minus=function(t){return this.plus(-y.intMod(t,4))},a.length=function(t){switch(this){case r.Q1:return t?91:90;case r.Q2:return 91;default:return 92}},a.firstMonth=function(){switch(this){case r.Q1:return e.Month.JANUARY;case r.Q2:return e.Month.APRIL;case r.Q3:return e.Month.JULY;case r.Q4:return e.Month.OCTOBER;default:throw new e.IllegalStateException("Unreachable")}},a.query=function(n){return o(n,"query"),i(n,e.TemporalQuery,"query"),n===e.TemporalQueries.chronology()?e.IsoChronology.INSTANCE:n===e.TemporalQueries.precision()?e.IsoFields.QUARTER_YEARS:t.prototype.query.call(this,n)},a.adjustInto=function(t){return o(t,"temporal"),t.with(e.IsoFields.QUARTER_OF_YEAR,this.value())},a.ordinal=function(){return this._value-1},a.name=function(){return this._name},a.compareTo=function(t){return o(t,"other"),i(t,r,"other"),this._value-t._value},a.toString=function(){return this.name()},a.equals=function(t){return this===t},a.hashCode=function(){return this._value},r}(e.TemporalAccessor);function D(){var t,r,o;A.Q1=new A(1,"Q1"),A.Q2=new A(2,"Q2"),A.Q3=new A(3,"Q3"),A.Q4=new A(4,"Q4"),A.FROM=(t="Quarter.FROM",r=function(t){return A.from(t)},o=function(t){function e(){return t.apply(this,arguments)||this}return n(e,t),e}(e.TemporalQuery),o.prototype.queryFrom=r,new o(t)),w=[A.Q1,A.Q2,A.Q3,A.Q4]}var I=e._.MathUtil,g=function(t){function r(e,n){var r;return(r=t.call(this)||this)._year=I.safeToInt(e),r._quarter=i(n,A,"Quarter"),r}n(r,t),r.now=function(t){return 0===arguments.length?r._now0():1===arguments.length&&t instanceof e.ZoneId?r._nowZoneId(t):r._nowClock(t)},r._now0=function(){return r.now(e.Clock.systemDefaultZone())},r._nowZoneId=function(t){return r.now(e.Clock.system(t))},r._nowClock=function(t){var n=e.LocalDate.now(t);return r.of(n.getYear(),A.from(n.getMonth()))},r.of=function(t,n){if(t instanceof e.Year&&n instanceof A)return r._ofYearQuarter(t,n);if(t instanceof e.Year&&"number"==typeof n)return r._ofYearInt(t,n);if("number"==typeof t&&n instanceof A)return r._ofIntQuarter(t,n);if("number"==typeof t&&"number"==typeof n)return r._ofIntInt(t,n);var o="year must be an instance of Year or number but is "+t.constructor.name,i="quarter must be an instance of Quarter or number but is "+n.constructor.name;throw new e.IllegalArgumentException(o+" and "+i)},r._ofYearQuarter=function(t,e){return r.of(t.value(),e)},r._ofYearInt=function(t,e){return r.of(t.value(),A.of(e))},r._ofIntQuarter=function(t,n){return e.ChronoField.YEAR.checkValidValue(t),o(n,"quarter"),new r(t,n)},r._ofIntInt=function(t,n){return e.ChronoField.YEAR.checkValidValue(t),new r(t,A.of(n))},r.from=function(t){if(t instanceof r)return t;o(t,"temporal");try{var n=I.safeToInt(t.getLong(e.ChronoField.YEAR)),i=I.safeToInt(t.getLong(e.IsoFields.QUARTER_OF_YEAR));return r.of(n,i)}catch(n){throw new e.DateTimeException("Unable to obtain YearQuarter from TemporalAccessor: "+t+" of type "+t.constructor.name,n)}},r.parse=function(t,n){return void 0===n&&(n=r.PARSER),o(n,"formatter"),i(n,e.DateTimeFormatter,"formatter"),n.parse(t,r.FROM)};var a=r.prototype;return a._with=function(t,e){return this._year===t&&this._quarter===e?this:new r(t,e)},a.isSupported=function(t){if(t instanceof e.TemporalField)return this._isSupportedField(t);if(t instanceof e.TemporalUnit)return this._isSupportedUnit(t);if(null==t)return!1;throw new e.IllegalArgumentException("fieldOrUnit must be an instance of TemporalField or TemporalUnit, but is "+t.constructor.name)},a._isSupportedField=function(t){return t===e.IsoFields.QUARTER_OF_YEAR||(t instanceof e.ChronoField?t===e.ChronoField.YEAR||t===e.ChronoField.YEAR_OF_ERA||t===e.ChronoField.ERA:null!=t&&t.isSupportedBy(this))},a._isSupportedUnit=function(t){return t===e.IsoFields.QUARTER_YEARS||(t instanceof e.ChronoUnit?t===e.ChronoUnit.YEARS||t===e.ChronoUnit.DECADES||t===e.ChronoUnit.CENTURIES||t===e.ChronoUnit.MILLENNIA||t===e.ChronoUnit.ERAS:null!=t&&t.isSupportedBy(this))},a.range=function(n){return o(n,"field"),i(n,e.TemporalField,"field"),n===e.IsoFields.QUARTER_OF_YEAR?e.IsoFields.QUARTER_OF_YEAR.range():n===e.ChronoField.YEAR_OF_ERA?this.year()<=0?e.ValueRange.of(1,e.Year.MAX_VALUE+1):e.ValueRange.of(1,e.Year.MAX_VALUE):t.prototype.range.call(this,n)},a.get=function(t){return o(t,"field"),i(t,e.TemporalField,"field"),this.range(t).checkValidIntValue(this.getLong(t),t)},a.getLong=function(n){if(o(n,"field"),i(n,e.TemporalField,"field"),n===e.IsoFields.QUARTER_OF_YEAR)return this._quarter.value();if(n instanceof e.ChronoField)switch(n){case e.ChronoField.YEAR_OF_ERA:return this._year<1?1-this._year:this._year;case e.ChronoField.YEAR:return this._year;case e.ChronoField.ERA:return this._year<1?0:1;default:throw new e.UnsupportedTemporalTypeException("Unsupported field: "+n)}return t.prototype.get.call(this,n)},a._prolepticQuarter=function(){return 4*this._year+(this._quarter.value()-1)},a.year=function(){return this._year},a.quarterValue=function(){return this._quarter.value()},a.quarter=function(){return this._quarter},a.isLeapYear=function(){return e.IsoChronology.isLeapYear(this._year)},a.isValidDay=function(t){return t>=1&&t<=this.lengthOfQuarter()},a.lengthOfQuarter=function(){return this._quarter.length(this.isLeapYear())},a.lengthOfYear=function(){return this.isLeapYear()?366:365},a._withAdjuster=function(e){return e instanceof r?e:t.prototype._withAdjuster.call(this,e)},a._withField=function(t,n){if(o(t,"field"),i(t,e.TemporalField,"field"),t===e.IsoFields.QUARTER_OF_YEAR)return this.withQuarter(e.IsoFields.QUARTER_OF_YEAR.range().checkValidIntValue(n,e.IsoFields.QUARTER_OF_YEAR));if(t instanceof e.ChronoField)switch(t.checkValidValue(n),t){case e.ChronoField.YEAR_OF_ERA:return this.withYear(this._year<1?1-n:n);case e.ChronoField.YEAR:return this.withYear(n);case e.ChronoField.ERA:return this.getLong(e.ChronoField.ERA)===n?this:this.withYear(1-this._year);default:throw new e.UnsupportedTemporalTypeException("Unsupported field: "+t)}return t.adjustInto(this,n)},a.withYear=function(t){return e.ChronoField.YEAR.checkValidValue(t),this._with(t,this._quarter)},a.withQuarter=function(t){return e.IsoFields.QUARTER_OF_YEAR.range().checkValidValue(t,e.IsoFields.QUARTER_OF_YEAR),this._with(this._year,A.of(t))},a._plusUnit=function(t,n){if(n===e.IsoFields.QUARTER_YEARS)return this.plusQuarters(t);if(n instanceof e.ChronoUnit)switch(n){case e.ChronoUnit.YEARS:return this.plusYears(t);case e.ChronoUnit.DECADES:return this.plusYears(I.safeMultiply(t,10));case e.ChronoUnit.CENTURIES:return this.plusYears(I.safeMultiply(t,100));case e.ChronoUnit.MILLENNIA:return this.plusYears(I.safeMultiply(t,1e3));case e.ChronoUnit.ERAS:return this.with(e.ChronoField.ERA,I.safeAdd(this.getLong(e.ChronoField.ERA),t));default:throw new e.UnsupportedTemporalTypeException("Unsupported unit: "+n)}return n.addTo(this,t)},a.plusYears=function(t){if(0===t)return this;var n=e.ChronoField.YEAR.checkValidIntValue(this._year+t);return this._with(n,this._quarter)},a.plusQuarters=function(t){if(0===t)return this;var n=4*this._year+(this._quarter.value()-1)+t,r=e.ChronoField.YEAR.checkValidIntValue(I.intDiv(n,4)),o=I.floorMod(n,4)+1;return this._with(r,A.of(o))},a.minusYears=function(t){return t===I.MIN_SAFE_INTEGER?this.plusYears(I.MIN_SAFE_INTEGER).plusYears(1):this.plusYears(-t)},a.minusQuarters=function(t){return t===I.MIN_SAFE_INTEGER?this.plusQuarters(I.MIN_SAFE_INTEGER).plusQuarters(1):this.plusQuarters(-t)},a.query=function(n){return n===e.TemporalQueries.chronology()?e.IsoChronology.INSTANCE:n===e.TemporalQueries.precision()?e.IsoFields.QUARTER_YEARS:t.prototype.query.call(this,n)},a.adjustInto=function(t){var n=this._prolepticQuarter(),r=4*t.get(e.ChronoField.YEAR)+(t.get(e.IsoFields.QUARTER_OF_YEAR)-1);return t.plus(n-r,e.IsoFields.QUARTER_YEARS)},a.until=function(t,n){o(t,"endExclusive"),o(n,"unit"),i(t,e.Temporal,"endExclusive"),i(n,e.TemporalUnit,"unit");var a=r.from(t),s=a._prolepticQuarter()-this._prolepticQuarter();if(n===e.IsoFields.QUARTER_YEARS)return s;if(n instanceof e.ChronoUnit)switch(n){case e.ChronoUnit.YEARS:return I.intDiv(s,4);case e.ChronoUnit.DECADES:return I.intDiv(s,40);case e.ChronoUnit.CENTURIES:return I.intDiv(s,400);case e.ChronoUnit.MILLENNIA:return I.intDiv(s,4e3);case e.ChronoUnit.ERAS:return a.getLong(e.ChronoField.ERA)-this.getLong(e.ChronoField.ERA);default:throw new e.UnsupportedTemporalTypeException("Unsupported unit: "+n)}return n.between(this,a)},a.format=function(t){return o(t,"formatter"),t.format(this)},a.atDay=function(t){e.ValueRange.of(1,this.lengthOfQuarter()).checkValidValue(t,e.IsoFields.DAY_OF_QUARTER);for(var n=e.Year.isLeap(this._year),r=this._quarter.firstMonth();t>r.length(n);)t-=r.length(n),r=r.plus(1);return e.LocalDate.of(this._year,r,t)},a.atEndOfQuarter=function(){var t=this._quarter.firstMonth().plus(2);return e.LocalDate.of(this._year,t,t.maxLength())},a.compareTo=function(t){o(t,"other"),i(t,r,"other");var e=this._year-t._year;return 0===e&&(e=this._quarter.compareTo(t._quarter)),e},a.isAfter=function(t){return this.compareTo(t)>0},a.isBefore=function(t){return this.compareTo(t)<0},a.equals=function(t){if(this===t)return!0;if(t instanceof r){var e=t;return this._year===e._year&&this._quarter===e._quarter}return!1},a.hashCode=function(){return this._year^this._quarter.value()<<27},a.toString=function(){var t=this._year;return(Math.abs(t)<1e3?t<0?"-"+(""+(t-1e4)).slice(-4):(""+(t+1e4)).slice(-4):t>9999?"+"+t:""+t).concat("-").concat(this._quarter)},r}(e.Temporal);function T(){var t,r,o;g.PARSER=(new e.DateTimeFormatterBuilder).parseCaseInsensitive().appendValue(e.ChronoField.YEAR,4,10,e.SignStyle.EXCEEDS_PAD).appendLiteral("-").appendLiteral("Q").appendValue(e.IsoFields.QUARTER_OF_YEAR,1).toFormatter(),g.FROM=(t="YearQuarter.FROM",r=function(t){return g.from(t)},o=function(t){function e(){return t.apply(this,arguments)||this}return n(e,t),e}(e.TemporalQuery),o.prototype.queryFrom=r,new o(t))}var F=e._.MathUtil,R=function(t){function r(e,n){var r;return(r=t.call(this)||this)._year=e,r._week=n,r}n(r,t),r.now=function(t){switch(arguments.length){case 0:return r._now0();case 1:if(o(t,"clockOrZone"),t instanceof e.ZoneId)return r._nowZoneId(t);if(t instanceof e.Clock)return r._nowClock(t);throw new e.IllegalArgumentException("zoneIdOrClock must be an instance of ZoneId or Clock, but is "+t.constructor.name);default:throw new e.IllegalArgumentException("Invalid number of arguments: "+arguments.length)}},r._now0=function(){return r.now(e.Clock.systemDefaultZone())},r._nowZoneId=function(t){return r.now(e.Clock.system(t))},r._nowClock=function(t){var n=e.LocalDate.now(t);return r.of(n.get(e.IsoFields.WEEK_BASED_YEAR),n.get(e.IsoFields.WEEK_OF_WEEK_BASED_YEAR))},r.of=function(t,n){return F.verifyInt(n),t instanceof e.Year?this._ofYearWeek(t,n):(F.verifyInt(t),this._ofWeekBasedYear(t,n))},r._ofYearWeek=function(t,e){var n=t.value();return this._ofWeekBasedYear(n,e)},r._ofWeekBasedYear=function(t,n){return e.IsoFields.WEEK_BASED_YEAR.range().checkValidValue(t,e.IsoFields.WEEK_BASED_YEAR),e.IsoFields.WEEK_OF_WEEK_BASED_YEAR.range().checkValidValue(n,e.IsoFields.WEEK_OF_WEEK_BASED_YEAR),53===n&&r._weekRange(t)<53&&(n=1,t++,e.IsoFields.WEEK_BASED_YEAR.range().checkValidValue(t,e.IsoFields.WEEK_BASED_YEAR)),new r(t,n)},r._weekRange=function(t){var n=e.LocalDate.of(t,1,1);return n.dayOfWeek()===e.DayOfWeek.THURSDAY||n.dayOfWeek()===e.DayOfWeek.WEDNESDAY&&n.isLeapYear()?53:52},r.from=function(t){if(t instanceof r)return t;o(t,"temporal");try{var n=F.safeToInt(t.getLong(e.IsoFields.WEEK_BASED_YEAR)),i=F.safeToInt(t.getLong(e.IsoFields.WEEK_OF_WEEK_BASED_YEAR));return r.of(n,i)}catch(n){throw new e.DateTimeException("Unable to obtain YearWeek from TemporalAccessor: "+t.constructor.name,n)}},r.parse=function(t,n){return void 0===n&&(n=r.PARSER),function(t,e,n){if(!t)throw n?new n(e):new Error(e)}(null!=n,"formatter",e.NullPointerException),n.parse(t,r.FROM)};var a=r.prototype;return a.isSupported=function(t){if(t instanceof e.TemporalField)return this._isSupportedField(t);if(t instanceof e.TemporalUnit)return this._isSupportedUnit(t);if(null==t)return!1;throw new e.IllegalArgumentException("fieldOrUnit must be an instance of TemporalField or TemporalUnit, but is "+t.constructor.name)},a._isSupportedField=function(t){return t===e.IsoFields.WEEK_OF_WEEK_BASED_YEAR||t===e.IsoFields.WEEK_BASED_YEAR||!(t instanceof e.ChronoField)&&(null!=t&&t.isSupportedBy(this))},a._isSupportedUnit=function(t){return t===e.ChronoUnit.WEEKS||t===e.IsoFields.WEEK_BASED_YEARS||!(t instanceof e.ChronoUnit)&&(null!=t&&t.isSupportedBy(this))},a.range=function(n){return o(n,"field"),n===e.IsoFields.WEEK_BASED_YEAR?e.IsoFields.WEEK_BASED_YEAR.range():n===e.IsoFields.WEEK_OF_WEEK_BASED_YEAR?e.ValueRange.of(1,r._weekRange(this._year)):t.prototype.range.call(this,n)},a.get=function(t){return this.range(t).checkValidIntValue(this.getLong(t),t)},a.getLong=function(t){if(o(t,"field"),t===e.IsoFields.WEEK_BASED_YEAR)return this._year;if(t===e.IsoFields.WEEK_OF_WEEK_BASED_YEAR)return this._week;if(t instanceof e.ChronoField)throw new e.UnsupportedTemporalTypeException("Unsupported field: "+t);return t.getFrom(this)},a.year=function(){return this._year},a.week=function(){return this._week},a.is53WeekYear=function(){return 53===r._weekRange(this._year)},a.lengthOfYear=function(){return this.is53WeekYear()?371:364},a._withAdjuster=function(e){return e instanceof r?e:t.prototype._withAdjuster.call(this,e)},a._withField=function(t,n){if(t===e.IsoFields.WEEK_OF_WEEK_BASED_YEAR)return this.withWeek(e.IsoFields.WEEK_OF_WEEK_BASED_YEAR.range().checkValidIntValue(n,e.IsoFields.WEEK_OF_WEEK_BASED_YEAR));if(t===e.IsoFields.WEEK_BASED_YEAR)return this.withYear(e.IsoFields.WEEK_BASED_YEAR.range().checkValidIntValue(n,e.IsoFields.WEEK_BASED_YEAR));if(t instanceof e.ChronoField)throw new e.UnsupportedTemporalTypeException("Unsupported field: "+t);return t.adjustInto(this,n)},a.withYear=function(t){return 53===this._week&&r._weekRange(t)<53?r.of(t,52):r.of(t,this._week)},a.withWeek=function(t){return r.of(this._year,t)},a._plusUnit=function(t,n){if(n===e.ChronoUnit.WEEKS)return this.plusWeeks(t);if(n===e.IsoFields.WEEK_BASED_YEARS)return this.plusYears(t);if(n instanceof e.ChronoUnit)throw new e.UnsupportedTemporalTypeException("Unsupported unit: "+n);return n.addTo(this,t)},a.plusYears=function(t){if(0===t)return this;var e=F.safeToInt(F.safeAdd(this._year,t));return this.withYear(e)},a.plusWeeks=function(t){if(0===t)return this;var n=this.atDay(e.DayOfWeek.MONDAY).plusWeeks(t);return r.from(n)},a._minusUnit=function(t,e){return o(t,"amountToSubtract"),o(e,"unit"),this._plusUnit(-t,e)},a.minusYears=function(t){if(0===t)return this;var e=F.safeToInt(F.safeSubtract(this._year,t));return this.withYear(e)},a.minusWeeks=function(t){if(0===t)return this;var n=this.atDay(e.DayOfWeek.MONDAY).minusWeeks(t);return r.from(n)},a.query=function(n){return o(n,"query"),i(n,e.TemporalQuery,"query"),n===e.TemporalQueries.chronology()?e.IsoChronology.INSTANCE:t.prototype.query.call(this,n)},a.adjustInto=function(t){return t.with(e.IsoFields.WEEK_BASED_YEAR,this._year).with(e.IsoFields.WEEK_OF_WEEK_BASED_YEAR,this._week)},a.until=function(t,n){var o=r.from(t);if(n===e.ChronoUnit.WEEKS)return this._daysUntil(o);if(n===e.IsoFields.WEEK_BASED_YEARS)return this._yearsUntil(o);if(n instanceof e.ChronoUnit)throw new e.UnsupportedTemporalTypeException("Unsupported unit: "+n);return n.between(this,o)},a._daysUntil=function(t){var n=this.atDay(e.DayOfWeek.MONDAY),r=t.atDay(e.DayOfWeek.MONDAY).toEpochDay()-n.toEpochDay();return F.intDiv(r,7)},a._yearsUntil=function(t){var e=t._year-this._year;return e>0&&t._week<this._week?e-1:e<0&&t._week>this._week?e+1:e},a.format=function(t){return o(t,"formatter"),t.format(this)},a.atDay=function(t){o(t,"dayOfWeek");var n=e.LocalDate.of(this._year,1,4).dayOfWeek().value()+3,r=7*this._week+t.value()-n,i=e.Year.isLeap(this._year)?366:365;if(r>i)return e.LocalDate.ofYearDay(this._year+1,r-i);if(r>0)return e.LocalDate.ofYearDay(this._year,r);var a=e.Year.isLeap(this._year-1)?366:365;return e.LocalDate.ofYearDay(this._year-1,a+r)},a.compareTo=function(t){o(t,"other"),i(t,r,"other");var e=this._year-t._year;return 0===e&&(e=this._week-t._week),e},a.isAfter=function(t){return this.compareTo(t)>0},a.isBefore=function(t){return this.compareTo(t)<0},a.equals=function(t){return this===t||t instanceof r&&(this._year===t._year&&this._week===t._week)},a.hashCode=function(){return this._year^this._week<<25},a.toString=function(){var t=this._year;return(Math.abs(t)<1e3?t<0?"-"+(""+(t-1e4)).slice(-4):(""+(t+1e4)).slice(-4):t>9999?"+"+t:""+t).concat(this._week<10?"-W0":"-W").concat(this._week)},r}(e.Temporal);function v(){var t,r,o;R.PARSER=(new e.DateTimeFormatterBuilder).parseCaseInsensitive().appendValue(e.IsoFields.WEEK_BASED_YEAR,4,10,e.SignStyle.EXCEEDS_PAD).appendLiteral("-W").appendValue(e.IsoFields.WEEK_OF_WEEK_BASED_YEAR,2).toFormatter(),R.FROM=(t="YearWeek.FROM",r=function(t){return R.from(t)},o=function(t){function e(){return t.apply(this,arguments)||this}return n(e,t),e}(e.TemporalQuery),o.prototype.queryFrom=r,new o(t))}var Y=!1;return Y||(Y=!0,function(){s.VALUES=new Array(31);for(var t=0;t<31;t++)s.VALUES[t]=new s(t+1)}(),function(){c.VALUES=new Array(366);for(var t=0;t<366;t++)c.VALUES[t]=new c(t+1)}(),f.ALL=f.of(e.Instant.MIN,e.Instant.MAX),d.ALL=new d(e.LocalDate.MIN,e.LocalDate.MAX),m(),D(),T(),v()),e.use((function(){})),t.DayOfMonth=s,t.DayOfYear=c,t.Interval=f,t.LocalDateRange=d,t.OffsetDate=E,t.Quarter=A,t.YearQuarter=g,t.YearWeek=R,Object.defineProperty(t,"__esModule",{value:!0}),t}({},JSJoda);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@js-joda/extra",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.1",
|
|
4
4
|
"description": "additional date-time classes that complement those in js-joda",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -49,7 +49,6 @@
|
|
|
49
49
|
"@js-joda/core": ">=1.11.0"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
|
-
"@js-joda/core": "^5.4.
|
|
53
|
-
}
|
|
54
|
-
"gitHead": "6c4e14fdb41e71dbb23adc929730033e4caa15a4"
|
|
52
|
+
"@js-joda/core": "^5.4.1"
|
|
53
|
+
}
|
|
55
54
|
}
|
package/src/LocalDateRange.js
CHANGED
|
@@ -670,13 +670,13 @@ export class LocalDateRange {
|
|
|
670
670
|
* Obtains the length of this range in days.
|
|
671
671
|
*
|
|
672
672
|
* This returns the number of days between the start and end dates.
|
|
673
|
-
* Unbounded ranges return `Number.
|
|
673
|
+
* Unbounded ranges return `Number.POSITIVE_INFINITY`.
|
|
674
674
|
*
|
|
675
|
-
* @return {number} the length in days, Number.
|
|
675
|
+
* @return {number} the length in days, `Number.POSITIVE_INFINITY` if unbounded
|
|
676
676
|
*/
|
|
677
677
|
lengthInDays() {
|
|
678
678
|
if (this.isUnboundedStart() || this.isUnboundedEnd()) {
|
|
679
|
-
return Number.
|
|
679
|
+
return Number.POSITIVE_INFINITY;
|
|
680
680
|
}
|
|
681
681
|
return this._end.toEpochDay() - this._start.toEpochDay();
|
|
682
682
|
}
|