@js-joda/core
Version:
a date and time library for javascript
5 lines • 195 kB
JavaScript
//! @version @js-joda/core - 6.1.0
//! @copyright (c) 2015-present, Philipp Thürwächter, Pattrick Hüper & js-joda contributors
//! @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
//! @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
var JSJoda=function(t){"use strict";function e(t,e,n){function i(t){Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=t,e&&e.apply(this,arguments),this.toString=function(){return this.name+": "+this.message}}return void 0===n&&(n=Error),i.prototype=Object.create(n.prototype),i.prototype.name=t,i.prototype.constructor=i,i}var n=e("DateTimeException",(function(t,e){void 0===e&&(e=null);var n=t||this.name;null!==e&&e instanceof Error&&(n+="\n-------\nCaused by: "+e.stack+"\n-------\n");this.message=n})),i=e("DateTimeParseException",(function(t,e,n,i){void 0===e&&(e="");void 0===n&&(n=0);void 0===i&&(i=null);var r=t||this.name;r+=": "+e+", at index: "+n,null!==i&&i instanceof Error&&(r+="\n-------\nCaused by: "+i.stack+"\n-------\n");this.message=r,this.parsedString=function(){return e},this.errorIndex=function(){return n}})),r=e("UnsupportedTemporalTypeException",null,n),s=e("ArithmeticException"),o=e("IllegalArgumentException"),a=e("IllegalStateException"),u=e("NullPointerException");function h(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function f(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,c(t,e)}function c(t,e){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},c(t,e)}function l(t,e,n){if(!t)throw n?new n(e):new Error(e)}function _(t,e){if(null==t)throw new u(e+" must not be null");return t}function d(t,e,n){if(!(t instanceof e))throw new o(n+" must be an instance of "+(e.name?e.name:e)+(t&&t.constructor&&t.constructor.name?", but is "+t.constructor.name:""));return t}function p(t){throw new TypeError('abstract method "'+t+'" is not implemented')}var O=Object.freeze({__proto__:null,abstractMethodFail:p,assert:l,requireInstance:d,requireNonNull:_}),E=9007199254740991,S=-9007199254740991,m=function(){function t(){}return t.intDiv=function(e,n){var i=e/n;return i=t.roundDown(i),t.safeZero(i)},t.intMod=function(e,n){var i=e-t.intDiv(e,n)*n;return i=t.roundDown(i),t.safeZero(i)},t.roundDown=function(t){return t<0?Math.ceil(t):Math.floor(t)},t.floorDiv=function(e,n){var i=Math.floor(e/n);return t.safeZero(i)},t.floorMod=function(e,n){var i=e-t.floorDiv(e,n)*n;return t.safeZero(i)},t.safeAdd=function(e,n){if(t.verifyInt(e),t.verifyInt(n),0===e)return t.safeZero(n);if(0===n)return t.safeZero(e);var i=t.safeToInt(e+n);if(i===e||i===n)throw new s("Invalid addition beyond MAX_SAFE_INTEGER!");return i},t.safeSubtract=function(e,n){return t.verifyInt(e),t.verifyInt(n),0===e&&0===n?0:0===e?t.safeZero(-1*n):0===n?t.safeZero(e):t.safeToInt(e-n)},t.safeMultiply=function(e,n){if(t.verifyInt(e),t.verifyInt(n),1===e)return t.safeZero(n);if(1===n)return t.safeZero(e);if(0===e||0===n)return 0;var i=t.safeToInt(e*n);if(i/n!==e||e===S&&-1===n||n===S&&-1===e)throw new s("Multiplication overflows: "+e+" * "+n);return i},t.parseInt=function(e){var n=parseInt(e);return t.safeToInt(n)},t.safeToInt=function(e){return t.verifyInt(e),t.safeZero(e)},t.verifyInt=function(t){if(null==t)throw new s("Invalid value: '"+t+"', using null or undefined as argument");if(isNaN(t))throw new s("Invalid int value, using NaN as argument");if(!Number.isInteger(Number(t)))throw new s("Invalid value: '"+t+"' is a float");if(t>E||t<S)throw new s("Calculation overflows an int: "+t)},t.safeZero=function(t){return 0===t?0:+t},t.compareNumbers=function(t,e){return t<e?-1:t>e?1:0},t.smi=function(t){return t>>>1&1073741824|3221225471&t},t.hash=function(e){if(e!=e||e===1/0)return 0;for(var n=e;e>4294967295;)n^=e/=4294967295;return t.smi(n)},t.hashCode=function(){for(var e=17,n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];for(var s=0,o=i;s<o.length;s++){var a=o[s];e=(e<<5)-e+t.hash(a)}return t.hash(e)},t}();m.MAX_SAFE_INTEGER=E,m.MIN_SAFE_INTEGER=S;var N=function(){function t(t){this._name=t}var e=t.prototype;return e.equals=function(t){return this===t},e.toString=function(){return this._name},e.toJSON=function(){return this.toString()},t}(),D=function(){function t(){}var e=t.prototype;return e.get=function(t){p("get")},e.units=function(){p("units")},e.addTo=function(t){p("addTo")},e.subtractFrom=function(t){p("subtractFrom")},t}();"undefined"!=typeof Symbol&&Symbol.toPrimitive&&(D.prototype[Symbol.toPrimitive]=function(t){if("number"!==t)return this.toString();throw new TypeError("A conversion from TemporalAmount to a number is not allowed. To compare use the methods .equals(), .compareTo(), .isBefore() or one that is more suitable to your use case.")});var A=function(){function t(){}var e=t.prototype;return e.duration=function(){p("duration")},e.isDurationEstimated=function(){p("isDurationEstimated")},e.isDateBased=function(){p("isDateBased")},e.isTimeBased=function(){p("isTimeBased")},e.isSupportedBy=function(t){p("isSupportedBy")},e.addTo=function(t,e){p("addTo")},e.between=function(t,e){p("between")},t}(),T=function(t){function e(e,n){var i;return(i=t.call(this)||this)._seconds=m.safeToInt(e),i._nanos=m.safeToInt(n),i}f(e,t),e.ofDays=function(t){return e._create(m.safeMultiply(t,fe.SECONDS_PER_DAY),0)},e.ofHours=function(t){return e._create(m.safeMultiply(t,fe.SECONDS_PER_HOUR),0)},e.ofMinutes=function(t){return e._create(m.safeMultiply(t,fe.SECONDS_PER_MINUTE),0)},e.ofSeconds=function(t,n){void 0===n&&(n=0);var i=m.safeAdd(t,m.floorDiv(n,fe.NANOS_PER_SECOND)),r=m.floorMod(n,fe.NANOS_PER_SECOND);return e._create(i,r)},e.ofMillis=function(t){var n=m.intDiv(t,1e3),i=m.intMod(t,1e3);return i<0&&(i+=1e3,n--),e._create(n,1e6*i)},e.ofNanos=function(t){var e=m.intDiv(t,fe.NANOS_PER_SECOND),n=m.intMod(t,fe.NANOS_PER_SECOND);return n<0&&(n+=fe.NANOS_PER_SECOND,e--),this._create(e,n)},e.of=function(t,n){return e.ZERO.plus(t,n)},e.from=function(t){_(t,"amount"),d(t,D);var n=e.ZERO;return t.units().forEach((function(e){n=n.plus(t.get(e),e)})),n},e.between=function(t,e){_(t,"startInclusive"),_(e,"endExclusive");var n=t.until(e,w.SECONDS),i=0;if(t.isSupported(R.NANO_OF_SECOND)&&e.isSupported(R.NANO_OF_SECOND))try{var r=t.getLong(R.NANO_OF_SECOND);if(i=e.getLong(R.NANO_OF_SECOND)-r,n>0&&i<0)i+=fe.NANOS_PER_SECOND;else if(n<0&&i>0)i-=fe.NANOS_PER_SECOND;else if(0===n&&0!==i){var s=e.with(R.NANO_OF_SECOND,r);n=t.until(s,w.SECONDS)}}catch(t){}return this.ofSeconds(n,i)},e.parse=function(t){_(t,"text");var n=new RegExp("([-+]?)P(?:([-+]?[0-9]+)D)?(T(?:([-+]?[0-9]+)H)?(?:([-+]?[0-9]+)M)?(?:([-+]?[0-9]+)(?:[.,]([0-9]{0,9}))?S)?)?","i").exec(t);if(null!==n&&"T"===n[3]==!1){var r="-"===n[1],s=n[2],o=n[4],a=n[5],u=n[6],h=n[7];if(null!=s||null!=o||null!=a||null!=u){var f=e._parseNumber(t,s,fe.SECONDS_PER_DAY,"days"),c=e._parseNumber(t,o,fe.SECONDS_PER_HOUR,"hours"),l=e._parseNumber(t,a,fe.SECONDS_PER_MINUTE,"minutes"),d=e._parseNumber(t,u,1,"seconds"),p=null!=u&&"-"===u.charAt(0),O=e._parseFraction(t,h,p?-1:1);try{return e._create(r,f,c,l,d,O)}catch(e){throw new i("Text cannot be parsed to a Duration: overflow",t,0,e)}}}throw new i("Text cannot be parsed to a Duration",t,0)},e._parseNumber=function(t,e,n,r){if(null==e)return 0;try{return"+"===e[0]&&(e=e.substring(1)),m.safeMultiply(parseFloat(e),n)}catch(e){throw new i("Text cannot be parsed to a Duration: "+r,t,0,e)}},e._parseFraction=function(t,e,n){return null==e||0===e.length?0:(e=(e+"000000000").substring(0,9),parseFloat(e)*n)},e._create=function(){return arguments.length<=2?e._createSecondsNanos(arguments[0],arguments[1]):e._createNegateDaysHoursMinutesSecondsNanos(arguments[0],arguments[1],arguments[2],arguments[3],arguments[4],arguments[5])},e._createNegateDaysHoursMinutesSecondsNanos=function(t,n,i,r,s,o){var a=m.safeAdd(n,m.safeAdd(i,m.safeAdd(r,s)));return t?e.ofSeconds(a,o).negated():e.ofSeconds(a,o)},e._createSecondsNanos=function(t,n){return void 0===t&&(t=0),void 0===n&&(n=0),0===t&&0===n?e.ZERO:new e(t,n)};var n=e.prototype;return n.get=function(t){if(t===w.SECONDS)return this._seconds;if(t===w.NANOS)return this._nanos;throw new r("Unsupported unit: "+t)},n.units=function(){return[w.SECONDS,w.NANOS]},n.isZero=function(){return 0===this._seconds&&0===this._nanos},n.isNegative=function(){return this._seconds<0},n.seconds=function(){return this._seconds},n.nano=function(){return this._nanos},n.withSeconds=function(t){return e._create(t,this._nanos)},n.withNanos=function(t){return R.NANO_OF_SECOND.checkValidIntValue(t),e._create(this._seconds,t)},n.plusDuration=function(t){return _(t,"duration"),this.plus(t.seconds(),t.nano())},n.plus=function(t,e){return 1===arguments.length?this.plusDuration(t):2===arguments.length&&e instanceof A?this.plusAmountUnit(t,e):this.plusSecondsNanos(t,e)},n.plusAmountUnit=function(t,e){if(_(t,"amountToAdd"),_(e,"unit"),e===w.DAYS)return this.plusSecondsNanos(m.safeMultiply(t,fe.SECONDS_PER_DAY),0);if(e.isDurationEstimated())throw new r("Unit must not have an estimated duration");if(0===t)return this;if(e instanceof w){switch(e){case w.NANOS:return this.plusNanos(t);case w.MICROS:return this.plusSecondsNanos(1e3*m.intDiv(t,1e9),1e3*m.intMod(t,1e9));case w.MILLIS:return this.plusMillis(t);case w.SECONDS:return this.plusSeconds(t)}return this.plusSecondsNanos(m.safeMultiply(e.duration().seconds(),t),0)}var n=e.duration().multipliedBy(t);return this.plusSecondsNanos(n.seconds(),n.nano())},n.plusDays=function(t){return this.plusSecondsNanos(m.safeMultiply(t,fe.SECONDS_PER_DAY),0)},n.plusHours=function(t){return this.plusSecondsNanos(m.safeMultiply(t,fe.SECONDS_PER_HOUR),0)},n.plusMinutes=function(t){return this.plusSecondsNanos(m.safeMultiply(t,fe.SECONDS_PER_MINUTE),0)},n.plusSeconds=function(t){return this.plusSecondsNanos(t,0)},n.plusMillis=function(t){return this.plusSecondsNanos(m.intDiv(t,1e3),1e6*m.intMod(t,1e3))},n.plusNanos=function(t){return this.plusSecondsNanos(0,t)},n.plusSecondsNanos=function(t,n){if(_(t,"secondsToAdd"),_(n,"nanosToAdd"),0===t&&0===n)return this;var i=m.safeAdd(this._seconds,t);i=m.safeAdd(i,m.intDiv(n,fe.NANOS_PER_SECOND)),n=m.intMod(n,fe.NANOS_PER_SECOND);var r=m.safeAdd(this._nanos,n);return e.ofSeconds(i,r)},n.minus=function(t,e){return 1===arguments.length?this.minusDuration(t):this.minusAmountUnit(t,e)},n.minusDuration=function(t){_(t,"duration");var e=t.seconds(),n=t.nano();return e===S?this.plus(E,-n):this.plus(-e,-n)},n.minusAmountUnit=function(t,e){return _(t,"amountToSubtract"),_(e,"unit"),t===S?this.plusAmountUnit(E,e):this.plusAmountUnit(-t,e)},n.minusDays=function(t){return t===S?this.plusDays(E):this.plusDays(-t)},n.minusHours=function(t){return t===S?this.plusHours(E):this.plusHours(-t)},n.minusMinutes=function(t){return t===S?this.plusMinutes(E):this.plusMinutes(-t)},n.minusSeconds=function(t){return t===S?this.plusSeconds(E):this.plusSeconds(-t)},n.minusMillis=function(t){return t===S?this.plusMillis(E):this.plusMillis(-t)},n.minusNanos=function(t){return t===S?this.plusNanos(E):this.plusNanos(-t)},n.multipliedBy=function(t){if(0===t)return e.ZERO;if(1===t)return this;var n=m.safeMultiply(this._seconds,t),i=m.safeMultiply(this._nanos,t);return n+=m.intDiv(i,fe.NANOS_PER_SECOND),i=m.intMod(i,fe.NANOS_PER_SECOND),e.ofSeconds(n,i)},n.dividedBy=function(t){if(0===t)throw new s("Cannot divide by zero");if(1===t)return this;var n=m.intDiv(this._seconds,t),i=m.roundDown((this._seconds/t-n)*fe.NANOS_PER_SECOND),r=m.intDiv(this._nanos,t);return r=i+r,e.ofSeconds(n,r)},n.negated=function(){return this.multipliedBy(-1)},n.abs=function(){return this.isNegative()?this.negated():this},n.addTo=function(t){return _(t,"temporal"),0!==this._seconds&&(t=t.plus(this._seconds,w.SECONDS)),0!==this._nanos&&(t=t.plus(this._nanos,w.NANOS)),t},n.subtractFrom=function(t){return _(t,"temporal"),0!==this._seconds&&(t=t.minus(this._seconds,w.SECONDS)),0!==this._nanos&&(t=t.minus(this._nanos,w.NANOS)),t},n.toDays=function(){return m.intDiv(this._seconds,fe.SECONDS_PER_DAY)},n.toHours=function(){return m.intDiv(this._seconds,fe.SECONDS_PER_HOUR)},n.toMinutes=function(){return m.intDiv(this._seconds,fe.SECONDS_PER_MINUTE)},n.toMillis=function(){var t=Math.round(m.safeMultiply(this._seconds,1e3));return t=m.safeAdd(t,m.intDiv(this._nanos,1e6))},n.toNanos=function(){var t=m.safeMultiply(this._seconds,fe.NANOS_PER_SECOND);return t=m.safeAdd(t,this._nanos)},n.toHoursPart=function(){return m.intMod(this.toHours(),fe.HOURS_PER_DAY)},n.toMinutesPart=function(){return m.intMod(this.toMinutes(),fe.MINUTES_PER_HOUR)},n.toSecondsPart=function(){return m.intMod(this._seconds,fe.SECONDS_PER_MINUTE)},n.toMillisPart=function(){return m.intDiv(this._nanos,1e6)},n.compareTo=function(t){_(t,"otherDuration"),d(t,e,"otherDuration");var n=m.compareNumbers(this._seconds,t.seconds());return 0!==n?n:this._nanos-t.nano()},n.equals=function(t){return this===t||t instanceof e&&(this.seconds()===t.seconds()&&this.nano()===t.nano())},n.toString=function(){if(this===e.ZERO)return"PT0S";var t=this._seconds<0&&this._nanos>0,n=t?this._seconds+1:this._seconds,i=t?fe.NANOS_PER_SECOND-this._nanos:this._nanos,r=m.intDiv(n,fe.SECONDS_PER_HOUR),s=m.intDiv(m.intMod(n,fe.SECONDS_PER_HOUR),fe.SECONDS_PER_MINUTE),o=m.intMod(n,fe.SECONDS_PER_MINUTE),a="PT";if(0!==r&&(a+=r+"H"),0!==s&&(a+=s+"M"),0===o&&0===i&&a.length>2)return a;if(a+=0===o&&t?"-0":""+o,i>0){for(var u=""+i;u.length<9;)u="0"+u;for(;"0"===u.charAt(u.length-1);)u=u.slice(0,u.length-1);a+="."+u}return a+="S"},n.toJSON=function(){return this.toString()},e}(D);var v=function(){};var w=function(t){function e(e,n){var i;return(i=t.call(this)||this)._name=e,i._duration=n,i}f(e,t);var n=e.prototype;return n.duration=function(){return this._duration},n.isDurationEstimated=function(){return this.isDateBased()||this===e.FOREVER},n.isDateBased=function(){return this.compareTo(e.DAYS)>=0&&this!==e.FOREVER},n.isTimeBased=function(){return this.compareTo(e.DAYS)<0},n.isSupportedBy=function(t){if(this===e.FOREVER)return!1;try{return t.plus(1,this),!0}catch(e){try{return t.plus(-1,this),!0}catch(t){return!1}}},n.addTo=function(t,e){return t.plus(e,this)},n.between=function(t,e){return t.until(e,this)},n.toString=function(){return this._name},n.compareTo=function(t){return this.duration().compareTo(t.duration())},e}(A);var y=function(){function t(){}var e=t.prototype;return e.isDateBased=function(){p("isDateBased")},e.isTimeBased=function(){p("isTimeBased")},e.baseUnit=function(){p("baseUnit")},e.rangeUnit=function(){p("rangeUnit")},e.range=function(){p("range")},e.rangeRefinedBy=function(t){p("rangeRefinedBy")},e.getFrom=function(t){p("getFrom")},e.adjustInto=function(t,e){p("adjustInto")},e.isSupportedBy=function(t){p("isSupportedBy")},e.displayName=function(){p("displayName")},e.equals=function(t){p("equals")},e.name=function(){p("name")},t}(),M=function(){function t(t,e,n,i){l(!(t>e),"Smallest minimum value '"+t+"' must be less than largest minimum value '"+e+"'",o),l(!(n>i),"Smallest maximum value '"+n+"' must be less than largest maximum value '"+i+"'",o),l(!(e>i),"Minimum value '"+e+"' must be less than maximum value '"+i+"'",o),this._minSmallest=t,this._minLargest=e,this._maxLargest=i,this._maxSmallest=n}var e=t.prototype;return e.isFixed=function(){return this._minSmallest===this._minLargest&&this._maxSmallest===this._maxLargest},e.minimum=function(){return this._minSmallest},e.largestMinimum=function(){return this._minLargest},e.maximum=function(){return this._maxLargest},e.smallestMaximum=function(){return this._maxSmallest},e.isValidValue=function(t){return this.minimum()<=t&&t<=this.maximum()},e.checkValidValue=function(t,e){return this.isValidValue(t)?t:l(!1,null!=e?"Invalid value for "+e+" (valid values "+this.toString()+"): "+t:"Invalid value (valid values "+this.toString()+"): "+t,n)},e.checkValidIntValue=function(t,e){if(!1===this.isValidIntValue(t))throw new n("Invalid int value for "+e+": "+t);return t},e.isValidIntValue=function(t){return this.isIntValue()&&this.isValidValue(t)},e.isIntValue=function(){return this.minimum()>=m.MIN_SAFE_INTEGER&&this.maximum()<=m.MAX_SAFE_INTEGER},e.equals=function(e){return e===this||e instanceof t&&(this._minSmallest===e._minSmallest&&this._minLargest===e._minLargest&&this._maxSmallest===e._maxSmallest&&this._maxLargest===e._maxLargest)},e.hashCode=function(){return m.hashCode(this._minSmallest,this._minLargest,this._maxSmallest,this._maxLargest)},e.toString=function(){var t=this.minimum()+(this.minimum()!==this.largestMinimum()?"/"+this.largestMinimum():"");return t+=" - ",t+=this.smallestMaximum()+(this.smallestMaximum()!==this.maximum()?"/"+this.maximum():"")},t.of=function(){return 2===arguments.length?new t(arguments[0],arguments[0],arguments[1],arguments[1]):3===arguments.length?new t(arguments[0],arguments[0],arguments[1],arguments[2]):4===arguments.length?new t(arguments[0],arguments[1],arguments[2],arguments[3]):l(!1,"Invalid number of arguments "+arguments.length,o)},t}(),R=function(t){function e(e,n,i,r){var s;return(s=t.call(this)||this)._name=e,s._baseUnit=n,s._rangeUnit=i,s._range=r,s}f(e,t),e.byName=function(t){for(var n in e)if(e[n]&&e[n]instanceof e&&e[n].name()===t)return e[n]};var n=e.prototype;return n.name=function(){return this._name},n.baseUnit=function(){return this._baseUnit},n.rangeUnit=function(){return this._rangeUnit},n.range=function(){return this._range},n.displayName=function(){return this.toString()},n.checkValidValue=function(t){return this.range().checkValidValue(t,this)},n.checkValidIntValue=function(t){return this.range().checkValidIntValue(t,this)},n.isDateBased=function(){return this===e.DAY_OF_WEEK||this===e.ALIGNED_DAY_OF_WEEK_IN_MONTH||this===e.ALIGNED_DAY_OF_WEEK_IN_YEAR||this===e.DAY_OF_MONTH||this===e.DAY_OF_YEAR||this===e.EPOCH_DAY||this===e.ALIGNED_WEEK_OF_MONTH||this===e.ALIGNED_WEEK_OF_YEAR||this===e.MONTH_OF_YEAR||this===e.PROLEPTIC_MONTH||this===e.YEAR_OF_ERA||this===e.YEAR||this===e.ERA},n.isTimeBased=function(){return this===e.NANO_OF_SECOND||this===e.NANO_OF_DAY||this===e.MICRO_OF_SECOND||this===e.MICRO_OF_DAY||this===e.MILLI_OF_SECOND||this===e.MILLI_OF_DAY||this===e.SECOND_OF_MINUTE||this===e.SECOND_OF_DAY||this===e.MINUTE_OF_HOUR||this===e.MINUTE_OF_DAY||this===e.HOUR_OF_AMPM||this===e.CLOCK_HOUR_OF_AMPM||this===e.HOUR_OF_DAY||this===e.CLOCK_HOUR_OF_DAY||this===e.AMPM_OF_DAY},n.rangeRefinedBy=function(t){return t.range(this)},n.getFrom=function(t){return t.getLong(this)},n.toString=function(){return this.name()},n.equals=function(t){return this===t},n.adjustInto=function(t,e){return t.with(this,e)},n.isSupportedBy=function(t){return t.isSupported(this)},e}(y);var g=function(){function t(){}return t.zoneId=function(){return t.ZONE_ID},t.chronology=function(){return t.CHRONO},t.precision=function(){return t.PRECISION},t.zone=function(){return t.ZONE},t.offset=function(){return t.OFFSET},t.localDate=function(){return t.LOCAL_DATE},t.localTime=function(){return t.LOCAL_TIME},t}(),I=function(){function t(){}var e=t.prototype;return e.query=function(t){return t===g.zoneId()||t===g.chronology()||t===g.precision()?null:t.queryFrom(this)},e.get=function(t){return this.range(t).checkValidIntValue(this.getLong(t),t)},e.getLong=function(t){p("getLong")},e.range=function(t){if(t instanceof R){if(this.isSupported(t))return t.range();throw new r("Unsupported field: "+t)}return t.rangeRefinedBy(this)},e.isSupported=function(t){p("isSupported")},t}(),F=function(t){function e(){return t.apply(this,arguments)||this}return f(e,t),e.prototype.queryFrom=function(t){p("queryFrom")},e}(N);function Y(t,e){var n=function(t){function e(){return t.apply(this,arguments)||this}return f(e,t),e}(F);return n.prototype.queryFrom=e,new n(t)}var C,L=function(t){function e(e,n){var i;return(i=t.call(this)||this)._ordinal=e,i._name=n,i}f(e,t);var i=e.prototype;return i.ordinal=function(){return this._ordinal},i.name=function(){return this._name},e.values=function(){return C.slice()},e.valueOf=function(t){for(var n=0;n<C.length&&C[n].name()!==t;n++);return e.of(n+1)},e.of=function(t){if(t<1||t>7)throw new n("Invalid value for DayOfWeek: "+t);return C[t-1]},e.from=function(t){if(l(null!=t,"temporal",u),t instanceof e)return t;try{return e.of(t.get(R.DAY_OF_WEEK))}catch(e){throw e instanceof n?new n("Unable to obtain DayOfWeek from TemporalAccessor: "+t+", type "+(null!=t.constructor?t.constructor.name:""),e):e}},i.value=function(){return this._ordinal+1},i.displayName=function(t,e){throw new o("Pattern using (localized) text not implemented yet!")},i.isSupported=function(t){return t instanceof R?t===R.DAY_OF_WEEK:null!=t&&t.isSupportedBy(this)},i.range=function(t){if(t===R.DAY_OF_WEEK)return t.range();if(t instanceof R)throw new r("Unsupported field: "+t);return t.rangeRefinedBy(this)},i.get=function(t){return t===R.DAY_OF_WEEK?this.value():this.range(t).checkValidIntValue(this.getLong(t),t)},i.getLong=function(t){if(t===R.DAY_OF_WEEK)return this.value();if(t instanceof R)throw new r("Unsupported field: "+t);return t.getFrom(this)},i.plus=function(t){var e=m.floorMod(t,7);return C[m.floorMod(this._ordinal+(e+7),7)]},i.minus=function(t){return this.plus(-1*m.floorMod(t,7))},i.query=function(t){return t===g.precision()?w.DAYS:t===g.localDate()||t===g.localTime()||t===g.chronology()||t===g.zone()||t===g.zoneId()||t===g.offset()?null:(l(null!=t,"query",u),t.queryFrom(this))},i.adjustInto=function(t){return _(t,"temporal"),t.with(R.DAY_OF_WEEK,this.value())},i.equals=function(t){return this===t},i.toString=function(){return this._name},i.compareTo=function(t){return _(t,"other"),d(t,e,"other"),this._ordinal-t._ordinal},i.toJSON=function(){return this.toString()},e}(I);var P,U=function(t){function e(e,n){var i;return(i=t.call(this)||this)._value=m.safeToInt(e),i._name=n,i}f(e,t);var i=e.prototype;return i.value=function(){return this._value},i.ordinal=function(){return this._value-1},i.name=function(){return this._name},i.displayName=function(t,e){throw new o("Pattern using (localized) text not implemented yet!")},i.isSupported=function(t){return null!==t&&(t instanceof R?t===R.MONTH_OF_YEAR:null!=t&&t.isSupportedBy(this))},i.get=function(t){return t===R.MONTH_OF_YEAR?this.value():this.range(t).checkValidIntValue(this.getLong(t),t)},i.getLong=function(t){if(t===R.MONTH_OF_YEAR)return this.value();if(t instanceof R)throw new r("Unsupported field: "+t);return t.getFrom(this)},i.plus=function(t){var n=m.intMod(t,12)+12,i=m.intMod(this.value()+n,12);return i=0===i?12:i,e.of(i)},i.minus=function(t){return this.plus(-1*m.intMod(t,12))},i.length=function(t){switch(this){case e.FEBRUARY:return t?29:28;case e.APRIL:case e.JUNE:case e.SEPTEMBER:case e.NOVEMBER:return 30;default:return 31}},i.minLength=function(){switch(this){case e.FEBRUARY:return 28;case e.APRIL:case e.JUNE:case e.SEPTEMBER:case e.NOVEMBER:return 30;default:return 31}},i.maxLength=function(){switch(this){case e.FEBRUARY:return 29;case e.APRIL:case e.JUNE:case e.SEPTEMBER:case e.NOVEMBER:return 30;default:return 31}},i.firstDayOfYear=function(t){var n=t?1:0;switch(this){case e.JANUARY:return 1;case e.FEBRUARY:return 32;case e.MARCH:return 60+n;case e.APRIL:return 91+n;case e.MAY:return 121+n;case e.JUNE:return 152+n;case e.JULY:return 182+n;case e.AUGUST:return 213+n;case e.SEPTEMBER:return 244+n;case e.OCTOBER:return 274+n;case e.NOVEMBER:return 305+n;case e.DECEMBER:default:return 335+n}},i.firstMonthOfQuarter=function(){switch(this){case e.JANUARY:case e.FEBRUARY:case e.MARCH:return e.JANUARY;case e.APRIL:case e.MAY:case e.JUNE:return e.APRIL;case e.JULY:case e.AUGUST:case e.SEPTEMBER:return e.JULY;case e.OCTOBER:case e.NOVEMBER:case e.DECEMBER:default:return e.OCTOBER}},i.query=function(e){return l(null!=e,"query() parameter must not be null",n),e===g.chronology()?te.INSTANCE:e===g.precision()?w.MONTHS:t.prototype.query.call(this,e)},i.toString=function(){switch(this){case e.JANUARY:return"JANUARY";case e.FEBRUARY:return"FEBRUARY";case e.MARCH:return"MARCH";case e.APRIL:return"APRIL";case e.MAY:return"MAY";case e.JUNE:return"JUNE";case e.JULY:return"JULY";case e.AUGUST:return"AUGUST";case e.SEPTEMBER:return"SEPTEMBER";case e.OCTOBER:return"OCTOBER";case e.NOVEMBER:return"NOVEMBER";case e.DECEMBER:return"DECEMBER";default:return"unknown Month, value: "+this.value()}},i.toJSON=function(){return this.toString()},i.adjustInto=function(t){return t.with(R.MONTH_OF_YEAR,this.value())},i.compareTo=function(t){return _(t,"other"),d(t,e,"other"),this._value-t._value},i.equals=function(t){return this===t},e.valueOf=function(t){for(var n=0;n<P.length&&P[n].name()!==t;n++);return e.of(n+1)},e.values=function(){return P.slice()},e.of=function(t){return(t<1||t>12)&&l(!1,"Invalid value for MonthOfYear: "+t,n),P[t-1]},e.from=function(t){if(t instanceof e)return t;try{return e.of(t.get(R.MONTH_OF_YEAR))}catch(e){throw new n("Unable to obtain Month from TemporalAccessor: "+t+" of type "+(t&&null!=t.constructor?t.constructor.name:""),e)}},e}(I);var V=/([-+]?)P(?:([-+]?[0-9]+)Y)?(?:([-+]?[0-9]+)M)?(?:([-+]?[0-9]+)W)?(?:([-+]?[0-9]+)D)?/,b=function(t){function e(n,i,r){var s;s=t.call(this)||this;var o=m.safeToInt(n),a=m.safeToInt(i),u=m.safeToInt(r);return 0===o&&0===a&&0===u?(e.ZERO||(s._years=o,s._months=a,s._days=u,e.ZERO=s),e.ZERO||h(s)):(s._years=o,s._months=a,s._days=u,s)}f(e,t),e.ofYears=function(t){return e.create(t,0,0)},e.ofMonths=function(t){return e.create(0,t,0)},e.ofWeeks=function(t){return e.create(0,0,m.safeMultiply(t,7))},e.ofDays=function(t){return e.create(0,0,t)},e.of=function(t,n,i){return e.create(t,n,i)},e.from=function(t){if(t instanceof e)return t;_(t,"amount");for(var i=0,r=0,s=0,o=t.units(),a=0;a<o.length;a++){var u=o[a],h=t.get(u);if(u===w.YEARS)i=m.safeToInt(h);else if(u===w.MONTHS)r=m.safeToInt(h);else{if(u!==w.DAYS)throw new n("Unit must be Years, Months or Days, but was "+u);s=m.safeToInt(h)}}return e.create(i,r,s)},e.between=function(t,e){return _(t,"startDate"),_(e,"endDate"),d(t,ae,"startDate"),d(e,ae,"endDate"),t.until(e)},e.parse=function(t){_(t,"text");try{return e._parse(t)}catch(e){throw e instanceof s?new i("Text cannot be parsed to a Period",t,0,e):e}},e._parse=function(t){var n=V.exec(t);if(null!=n){var r="-"===n[1]?-1:1,s=n[2],o=n[3],a=n[4],u=n[5];if(null!=s||null!=o||null!=a||null!=u){var h=e._parseNumber(t,s,r),f=e._parseNumber(t,o,r),c=e._parseNumber(t,a,r),l=e._parseNumber(t,u,r);return l=m.safeAdd(l,m.safeMultiply(c,7)),e.create(h,f,l)}}throw new i("Text cannot be parsed to a Period",t,0)},e._parseNumber=function(t,e,n){if(null==e)return 0;var i=m.parseInt(e);return m.safeMultiply(i,n)},e.create=function(t,n,i){return new e(t,n,i)};var o=e.prototype;return o.units=function(){return[w.YEARS,w.MONTHS,w.DAYS]},o.chronology=function(){return te.INSTANCE},o.get=function(t){if(t===w.YEARS)return this._years;if(t===w.MONTHS)return this._months;if(t===w.DAYS)return this._days;throw new r("Unsupported unit: "+t)},o.isZero=function(){return this===e.ZERO},o.isNegative=function(){return this._years<0||this._months<0||this._days<0},o.years=function(){return this._years},o.months=function(){return this._months},o.days=function(){return this._days},o.withYears=function(t){return t===this._years?this:e.create(t,this._months,this._days)},o.withMonths=function(t){return t===this._months?this:e.create(this._years,t,this._days)},o.withDays=function(t){return t===this._days?this:e.create(this._years,this._months,t)},o.plus=function(t){var n=e.from(t);return e.create(m.safeAdd(this._years,n._years),m.safeAdd(this._months,n._months),m.safeAdd(this._days,n._days))},o.plusYears=function(t){return 0===t?this:e.create(m.safeToInt(m.safeAdd(this._years,t)),this._months,this._days)},o.plusMonths=function(t){return 0===t?this:e.create(this._years,m.safeToInt(m.safeAdd(this._months,t)),this._days)},o.plusDays=function(t){return 0===t?this:e.create(this._years,this._months,m.safeToInt(m.safeAdd(this._days,t)))},o.minus=function(t){var n=e.from(t);return e.create(m.safeSubtract(this._years,n._years),m.safeSubtract(this._months,n._months),m.safeSubtract(this._days,n._days))},o.minusYears=function(t){return this.plusYears(-1*t)},o.minusMonths=function(t){return this.plusMonths(-1*t)},o.minusDays=function(t){return this.plusDays(-1*t)},o.multipliedBy=function(t){return this===e.ZERO||1===t?this:e.create(m.safeMultiply(this._years,t),m.safeMultiply(this._months,t),m.safeMultiply(this._days,t))},o.negated=function(){return this.multipliedBy(-1)},o.normalized=function(){var t=this.toTotalMonths(),n=m.intDiv(t,12),i=m.intMod(t,12);return n===this._years&&i===this._months?this:e.create(m.safeToInt(n),i,this._days)},o.toTotalMonths=function(){return 12*this._years+this._months},o.addTo=function(t){return _(t,"temporal"),0!==this._years?t=0!==this._months?t.plus(this.toTotalMonths(),w.MONTHS):t.plus(this._years,w.YEARS):0!==this._months&&(t=t.plus(this._months,w.MONTHS)),0!==this._days&&(t=t.plus(this._days,w.DAYS)),t},o.subtractFrom=function(t){return _(t,"temporal"),0!==this._years?t=0!==this._months?t.minus(this.toTotalMonths(),w.MONTHS):t.minus(this._years,w.YEARS):0!==this._months&&(t=t.minus(this._months,w.MONTHS)),0!==this._days&&(t=t.minus(this._days,w.DAYS)),t},o.equals=function(t){if(this===t)return!0;if(t instanceof e){var n=t;return this._years===n._years&&this._months===n._months&&this._days===n._days}return!1},o.hashCode=function(){return m.hashCode(this._years,this._months,this._days)},o.toString=function(){if(this===e.ZERO)return"P0D";var t="P";return 0!==this._years&&(t+=this._years+"Y"),0!==this._months&&(t+=this._months+"M"),0!==this._days&&(t+=this._days+"D"),t},o.toJSON=function(){return this.toString()},e}(D);var H=function(){function t(t){this._index=t,this._errorIndex=-1}var e=t.prototype;return e.getIndex=function(){return this._index},e.setIndex=function(t){this._index=t},e.getErrorIndex=function(){return this._errorIndex},e.setErrorIndex=function(t){this._errorIndex=t},t}(),W=function(){function t(){this._map={}}var e=t.prototype;return e.putAll=function(t){for(var e in t._map)this._map[e]=t._map[e];return this},e.containsKey=function(t){return this._map.hasOwnProperty(t.name())&&void 0!==this.get(t)},e.get=function(t){return this._map[t.name()]},e.put=function(t,e){return this.set(t,e)},e.set=function(t,e){return this._map[t.name()]=e,this},e.retainAll=function(t){for(var e={},n=0;n<t.length;n++){var i=t[n].name();e[i]=this._map[i]}return this._map=e,this},e.remove=function(t){var e=t.name(),n=this._map[e];return this._map[e]=void 0,n},e.keySet=function(){return this._map},e.clear=function(){this._map={}},t}(),x=function(t){function e(){return t.apply(this,arguments)||this}return f(e,t),e}(N);x.STRICT=new x("STRICT"),x.SMART=new x("SMART"),x.LENIENT=new x("LENIENT");var k=function(t){function e(){return t.apply(this,arguments)||this}f(e,t);var n=e.prototype;return n.isSupported=function(t){p("isSupported")},n.minus=function(t,e){return arguments.length<2?this._minusAmount(t):this._minusUnit(t,e)},n._minusAmount=function(t){return _(t,"amount"),d(t,D,"amount"),t.subtractFrom(this)},n._minusUnit=function(t,e){return _(t,"amountToSubtract"),_(e,"unit"),d(e,A,"unit"),this._plusUnit(-t,e)},n.plus=function(t,e){return arguments.length<2?this._plusAmount(t):this._plusUnit(t,e)},n._plusAmount=function(t){return _(t,"amount"),d(t,D,"amount"),t.addTo(this)},n._plusUnit=function(t,e){p("_plusUnit")},n.until=function(t,e){p("until")},n.with=function(t,e){return arguments.length<2?this._withAdjuster(t):this._withField(t,e)},n._withAdjuster=function(t){return _(t,"adjuster"),l("function"==typeof t.adjustInto,"adjuster must be a TemporalAdjuster",o),t.adjustInto(this)},n._withField=function(t,e){p("_withField")},e}(I);"undefined"!=typeof Symbol&&Symbol.toPrimitive&&(k.prototype[Symbol.toPrimitive]=function(t){if("number"!==t)return this.toString();throw new TypeError("A conversion from Temporal to a number is not allowed. To compare use the methods .equals(), .compareTo(), .isBefore() or one that is more suitable to your use case.")});var B=function(t){function e(){return t.apply(this,arguments)||this}f(e,t);var n=e.prototype;return n.isSupported=function(t){return t instanceof R||t instanceof w?t.isDateBased():null!=t&&t.isSupportedBy(this)},n.query=function(e){return e===g.chronology()?this.chronology():e===g.precision()?w.DAYS:e===g.localDate()?ae.ofEpochDay(this.toEpochDay()):e===g.localTime()||e===g.zone()||e===g.zoneId()||e===g.offset()?null:t.prototype.query.call(this,e)},n.adjustInto=function(t){return t.with(R.EPOCH_DAY,this.toEpochDay())},n.format=function(t){return _(t,"formatter"),d(t,kt,"formatter"),t.format(this)},e}(k),q=function(){function t(){}return t.startsWith=function(t,e){return 0===t.indexOf(e)},t.hashCode=function(t){var e=t.length;if(0===e)return 0;for(var n=0,i=0;i<e;i++){n=(n<<5)-n+t.charCodeAt(i),n|=0}return m.smi(n)},t}(),Z=function(){function t(){}t.systemDefault=function(){throw new n("not supported operation")},t.getAvailableZoneIds=function(){throw new n("not supported operation")},t.of=function(t){throw new n("not supported operation"+t)},t.ofOffset=function(t,e){throw new n("not supported operation"+t+e)},t.from=function(t){throw new n("not supported operation"+t)};var e=t.prototype;return e.id=function(){p("ZoneId.id")},e.rules=function(){p("ZoneId.rules")},e.normalized=function(){var t=this.rules();return t.isFixedOffset()?t.offset(le.EPOCH):this},e.equals=function(e){return this===e||e instanceof t&&this.id()===e.id()},e.hashCode=function(){return q.hashCode(this.id())},e.toString=function(){return this.id()},e.toJSON=function(){return this.toString()},t}(),z=function(){function t(){}t.of=function(t){return _(t,"offset"),new K(t)};var e=t.prototype;return e.isFixedOffset=function(){p("ZoneRules.isFixedOffset")},e.offset=function(t){return t instanceof le?this.offsetOfInstant(t):this.offsetOfLocalDateTime(t)},e.offsetOfInstant=function(t){p("ZoneRules.offsetInstant")},e.offsetOfEpochMilli=function(t){p("ZoneRules.offsetOfEpochMilli")},e.offsetOfLocalDateTime=function(t){p("ZoneRules.offsetLocalDateTime")},e.validOffsets=function(t){p("ZoneRules.validOffsets")},e.transition=function(t){p("ZoneRules.transition")},e.standardOffset=function(t){p("ZoneRules.standardOffset")},e.daylightSavings=function(t){p("ZoneRules.daylightSavings")},e.isDaylightSavings=function(t){p("ZoneRules.isDaylightSavings")},e.isValidOffset=function(t,e){p("ZoneRules.isValidOffset")},e.nextTransition=function(t){p("ZoneRules.nextTransition")},e.previousTransition=function(t){p("ZoneRules.previousTransition")},e.transitions=function(){p("ZoneRules.transitions")},e.transitionRules=function(){p("ZoneRules.transitionRules")},e.toString=function(){p("ZoneRules.toString")},e.toJSON=function(){return this.toString()},t}(),K=function(t){function e(e){var n;return(n=t.call(this)||this)._offset=e,n}f(e,t);var n=e.prototype;return n.isFixedOffset=function(){return!0},n.offsetOfInstant=function(){return this._offset},n.offsetOfEpochMilli=function(){return this._offset},n.offsetOfLocalDateTime=function(){return this._offset},n.validOffsets=function(){return[this._offset]},n.transition=function(){return null},n.standardOffset=function(){return this._offset},n.daylightSavings=function(){return T.ZERO},n.isDaylightSavings=function(){return!1},n.isValidOffset=function(t,e){return this._offset.equals(e)},n.nextTransition=function(){return null},n.previousTransition=function(){return null},n.transitions=function(){return[]},n.transitionRules=function(){return[]},n.equals=function(t){return this===t||t instanceof e&&this._offset.equals(t._offset)},n.toString=function(){return"FixedRules:"+this._offset.toString()},e}(z),j={},G={},X=function(t){function e(n){var i;return i=t.call(this)||this,e._validateTotalSeconds(n),i._totalSeconds=m.safeToInt(n),i._rules=z.of(i),i._id=e._buildId(n),i}f(e,t);var i=e.prototype;return i.totalSeconds=function(){return this._totalSeconds},i.id=function(){return this._id},e._buildId=function(t){if(0===t)return"Z";var e=Math.abs(t),n=m.intDiv(e,fe.SECONDS_PER_HOUR),i=m.intMod(m.intDiv(e,fe.SECONDS_PER_MINUTE),fe.MINUTES_PER_HOUR),r=(t<0?"-":"+")+(n<10?"0":"")+n+(i<10?":0":":")+i,s=m.intMod(e,fe.SECONDS_PER_MINUTE);return 0!==s&&(r+=(s<10?":0":":")+s),r},e._validateTotalSeconds=function(t){if(Math.abs(t)>e.MAX_SECONDS)throw new n("Zone offset not in valid range: -18:00 to +18:00")},e._validate=function(t,e,i){if(t<-18||t>18)throw new n("Zone offset hours not in valid range: value "+t+" is not in the range -18 to 18");if(t>0){if(e<0||i<0)throw new n("Zone offset minutes and seconds must be positive because hours is positive")}else if(t<0){if(e>0||i>0)throw new n("Zone offset minutes and seconds must be negative because hours is negative")}else if(e>0&&i<0||e<0&&i>0)throw new n("Zone offset minutes and seconds must have the same sign");if(Math.abs(e)>59)throw new n("Zone offset minutes not in valid range: abs(value) "+Math.abs(e)+" is not in the range 0 to 59");if(Math.abs(i)>59)throw new n("Zone offset seconds not in valid range: abs(value) "+Math.abs(i)+" is not in the range 0 to 59");if(18===Math.abs(t)&&(Math.abs(e)>0||Math.abs(i)>0))throw new n("Zone offset not in valid range: -18:00 to +18:00")},e.of=function(t){_(t,"offsetId");var i,r,s,o=G[t];if(null!=o)return o;switch(t.length){case 2:t=t[0]+"0"+t[1];case 3:i=e._parseNumber(t,1,!1),r=0,s=0;break;case 5:i=e._parseNumber(t,1,!1),r=e._parseNumber(t,3,!1),s=0;break;case 6:i=e._parseNumber(t,1,!1),r=e._parseNumber(t,4,!0),s=0;break;case 7:i=e._parseNumber(t,1,!1),r=e._parseNumber(t,3,!1),s=e._parseNumber(t,5,!1);break;case 9:i=e._parseNumber(t,1,!1),r=e._parseNumber(t,4,!0),s=e._parseNumber(t,7,!0);break;default:throw new n("Invalid ID for ZoneOffset, invalid format: "+t)}var a=t[0];if("+"!==a&&"-"!==a)throw new n("Invalid ID for ZoneOffset, plus/minus not found when expected: "+t);return"-"===a?e.ofHoursMinutesSeconds(-i,-r,-s):e.ofHoursMinutesSeconds(i,r,s)},e._parseNumber=function(t,e,i){if(i&&":"!==t[e-1])throw new n("Invalid ID for ZoneOffset, colon not found when expected: "+t);var r=t[e],s=t[e+1];if(r<"0"||r>"9"||s<"0"||s>"9")throw new n("Invalid ID for ZoneOffset, non numeric characters found: "+t);return 10*(r.charCodeAt(0)-48)+(s.charCodeAt(0)-48)},e.ofHours=function(t){return e.ofHoursMinutesSeconds(t,0,0)},e.ofHoursMinutes=function(t,n){return e.ofHoursMinutesSeconds(t,n,0)},e.ofHoursMinutesSeconds=function(t,n,i){e._validate(t,n,i);var r=t*fe.SECONDS_PER_HOUR+n*fe.SECONDS_PER_MINUTE+i;return e.ofTotalSeconds(r)},e.ofTotalMinutes=function(t){var n=t*fe.SECONDS_PER_MINUTE;return e.ofTotalSeconds(n)},e.ofTotalSeconds=function(t){if(t%(15*fe.SECONDS_PER_MINUTE)==0){var n=t,i=j[n];return null==i&&(i=new e(t),j[n]=i,G[i.id()]=i),i}return new e(t)},i.rules=function(){return this._rules},i.get=function(t){return this.getLong(t)},i.getLong=function(t){if(t===R.OFFSET_SECONDS)return this._totalSeconds;if(t instanceof R)throw new n("Unsupported field: "+t);return t.getFrom(this)},i.query=function(t){return _(t,"query"),t===g.offset()||t===g.zone()?this:t===g.localDate()||t===g.localTime()||t===g.precision()||t===g.chronology()||t===g.zoneId()?null:t.queryFrom(this)},i.adjustInto=function(t){return t.with(R.OFFSET_SECONDS,this._totalSeconds)},i.compareTo=function(t){return _(t,"other"),t._totalSeconds-this._totalSeconds},i.equals=function(t){return this===t||t instanceof e&&this._totalSeconds===t._totalSeconds},i.hashCode=function(){return this._totalSeconds},i.toString=function(){return this._id},e}(Z);var J=function(t){function e(){var e;return(e=t.call(this)||this).fieldValues=new W,e.chrono=null,e.zone=null,e.date=null,e.time=null,e.leapSecond=!1,e.excessDays=null,e}f(e,t),e.create=function(t,n){var i=new e;return i._addFieldValue(t,n),i};var i=e.prototype;return i.getFieldValue0=function(t){return this.fieldValues.get(t)},i._addFieldValue=function(t,e){_(t,"field");var i=this.getFieldValue0(t);if(null!=i&&i!==e)throw new n("Conflict found: "+t+" "+i+" differs from "+t+" "+e+": "+this);return this._putFieldValue0(t,e)},i._putFieldValue0=function(t,e){return this.fieldValues.put(t,e),this},i.resolve=function(t,e){return null!=e&&this.fieldValues.retainAll(e),this._mergeDate(t),this._mergeTime(t),this._resolveTimeInferZeroes(t),null!=this.excessDays&&!1===this.excessDays.isZero()&&null!=this.date&&null!=this.time&&(this.date=this.date.plus(this.excessDays),this.excessDays=b.ZERO),this._resolveInstant(),this},i._mergeDate=function(t){this._checkDate(te.INSTANCE.resolveDate(this.fieldValues,t))},i._checkDate=function(t){if(null!=t)for(var e in this._addObject(t),this.fieldValues.keySet()){var i=R.byName(e);if(i&&void 0!==this.fieldValues.get(i)&&i.isDateBased()){var r=void 0;try{r=t.getLong(i)}catch(t){if(t instanceof n)continue;throw t}var s=this.fieldValues.get(i);if(r!==s)throw new n("Conflict found: Field "+i+" "+r+" differs from "+i+" "+s+" derived from "+t)}}},i._mergeTime=function(t){if(this.fieldValues.containsKey(R.CLOCK_HOUR_OF_DAY)){var e=this.fieldValues.remove(R.CLOCK_HOUR_OF_DAY);t!==x.LENIENT&&(t===x.SMART&&0===e||R.CLOCK_HOUR_OF_DAY.checkValidValue(e)),this._addFieldValue(R.HOUR_OF_DAY,24===e?0:e)}if(this.fieldValues.containsKey(R.CLOCK_HOUR_OF_AMPM)){var n=this.fieldValues.remove(R.CLOCK_HOUR_OF_AMPM);t!==x.LENIENT&&(t===x.SMART&&0===n||R.CLOCK_HOUR_OF_AMPM.checkValidValue(n)),this._addFieldValue(R.HOUR_OF_AMPM,12===n?0:n)}if(t!==x.LENIENT&&(this.fieldValues.containsKey(R.AMPM_OF_DAY)&&R.AMPM_OF_DAY.checkValidValue(this.fieldValues.get(R.AMPM_OF_DAY)),this.fieldValues.containsKey(R.HOUR_OF_AMPM)&&R.HOUR_OF_AMPM.checkValidValue(this.fieldValues.get(R.HOUR_OF_AMPM))),this.fieldValues.containsKey(R.AMPM_OF_DAY)&&this.fieldValues.containsKey(R.HOUR_OF_AMPM)){var i=this.fieldValues.remove(R.AMPM_OF_DAY),r=this.fieldValues.remove(R.HOUR_OF_AMPM);this._addFieldValue(R.HOUR_OF_DAY,12*i+r)}if(this.fieldValues.containsKey(R.NANO_OF_DAY)){var s=this.fieldValues.remove(R.NANO_OF_DAY);t!==x.LENIENT&&R.NANO_OF_DAY.checkValidValue(s),this._addFieldValue(R.SECOND_OF_DAY,m.intDiv(s,1e9)),this._addFieldValue(R.NANO_OF_SECOND,m.intMod(s,1e9))}if(this.fieldValues.containsKey(R.MICRO_OF_DAY)){var o=this.fieldValues.remove(R.MICRO_OF_DAY);t!==x.LENIENT&&R.MICRO_OF_DAY.checkValidValue(o),this._addFieldValue(R.SECOND_OF_DAY,m.intDiv(o,1e6)),this._addFieldValue(R.MICRO_OF_SECOND,m.intMod(o,1e6))}if(this.fieldValues.containsKey(R.MILLI_OF_DAY)){var a=this.fieldValues.remove(R.MILLI_OF_DAY);t!==x.LENIENT&&R.MILLI_OF_DAY.checkValidValue(a),this._addFieldValue(R.SECOND_OF_DAY,m.intDiv(a,1e3)),this._addFieldValue(R.MILLI_OF_SECOND,m.intMod(a,1e3))}if(this.fieldValues.containsKey(R.SECOND_OF_DAY)){var u=this.fieldValues.remove(R.SECOND_OF_DAY);t!==x.LENIENT&&R.SECOND_OF_DAY.checkValidValue(u),this._addFieldValue(R.HOUR_OF_DAY,m.intDiv(u,3600)),this._addFieldValue(R.MINUTE_OF_HOUR,m.intMod(m.intDiv(u,60),60)),this._addFieldValue(R.SECOND_OF_MINUTE,m.intMod(u,60))}if(this.fieldValues.containsKey(R.MINUTE_OF_DAY)){var h=this.fieldValues.remove(R.MINUTE_OF_DAY);t!==x.LENIENT&&R.MINUTE_OF_DAY.checkValidValue(h),this._addFieldValue(R.HOUR_OF_DAY,m.intDiv(h,60)),this._addFieldValue(R.MINUTE_OF_HOUR,m.intMod(h,60))}if(t!==x.LENIENT&&(this.fieldValues.containsKey(R.MILLI_OF_SECOND)&&R.MILLI_OF_SECOND.checkValidValue(this.fieldValues.get(R.MILLI_OF_SECOND)),this.fieldValues.containsKey(R.MICRO_OF_SECOND)&&R.MICRO_OF_SECOND.checkValidValue(this.fieldValues.get(R.MICRO_OF_SECOND))),this.fieldValues.containsKey(R.MILLI_OF_SECOND)&&this.fieldValues.containsKey(R.MICRO_OF_SECOND)){var f=this.fieldValues.remove(R.MILLI_OF_SECOND),c=this.fieldValues.get(R.MICRO_OF_SECOND);this._putFieldValue0(R.MICRO_OF_SECOND,1e3*f+m.intMod(c,1e3))}if(this.fieldValues.containsKey(R.MICRO_OF_SECOND)&&this.fieldValues.containsKey(R.NANO_OF_SECOND)){var l=this.fieldValues.get(R.NANO_OF_SECOND);this._putFieldValue0(R.MICRO_OF_SECOND,m.intDiv(l,1e3)),this.fieldValues.remove(R.MICRO_OF_SECOND)}if(this.fieldValues.containsKey(R.MILLI_OF_SECOND)&&this.fieldValues.containsKey(R.NANO_OF_SECOND)){var _=this.fieldValues.get(R.NANO_OF_SECOND);this._putFieldValue0(R.MILLI_OF_SECOND,m.intDiv(_,1e6)),this.fieldValues.remove(R.MILLI_OF_SECOND)}if(this.fieldValues.containsKey(R.MICRO_OF_SECOND)){var d=this.fieldValues.remove(R.MICRO_OF_SECOND);this._putFieldValue0(R.NANO_OF_SECOND,1e3*d)}else if(this.fieldValues.containsKey(R.MILLI_OF_SECOND)){var p=this.fieldValues.remove(R.MILLI_OF_SECOND);this._putFieldValue0(R.NANO_OF_SECOND,1e6*p)}},i._resolveTimeInferZeroes=function(t){var e=this.fieldValues.get(R.HOUR_OF_DAY),n=this.fieldValues.get(R.MINUTE_OF_HOUR),i=this.fieldValues.get(R.SECOND_OF_MINUTE),r=this.fieldValues.get(R.NANO_OF_SECOND);if(null!=e&&(null!=n||null==i&&null==r)&&(null==n||null!=i||null==r)){if(t!==x.LENIENT){if(null!=e){t!==x.SMART||24!==e||null!=n&&0!==n||null!=i&&0!==i||null!=r&&0!==r||(e=0,this.excessDays=b.ofDays(1));var s=R.HOUR_OF_DAY.checkValidIntValue(e);if(null!=n){var o=R.MINUTE_OF_HOUR.checkValidIntValue(n);if(null!=i){var a=R.SECOND_OF_MINUTE.checkValidIntValue(i);if(null!=r){var u=R.NANO_OF_SECOND.checkValidIntValue(r);this._addObject(fe.of(s,o,a,u))}else this._addObject(fe.of(s,o,a))}else null==r&&this._addObject(fe.of(s,o))}else null==i&&null==r&&this._addObject(fe.of(s,0))}}else if(null!=e){var h=e;if(null!=n)if(null!=i){null==r&&(r=0);var f=m.safeMultiply(h,36e11);f=m.safeAdd(f,m.safeMultiply(n,6e10)),f=m.safeAdd(f,m.safeMultiply(i,1e9)),f=m.safeAdd(f,r);var c=m.floorDiv(f,864e11),l=m.floorMod(f,864e11);this._addObject(fe.ofNanoOfDay(l)),this.excessDays=b.ofDays(c)}else{var _=m.safeMultiply(h,3600);_=m.safeAdd(_,m.safeMultiply(n,60));var d=m.floorDiv(_,86400),p=m.floorMod(_,86400);this._addObject(fe.ofSecondOfDay(p)),this.excessDays=b.ofDays(d)}else{var O=m.safeToInt(m.floorDiv(h,24));h=m.floorMod(h,24),this._addObject(fe.of(h,0)),this.excessDays=b.ofDays(O)}}this.fieldValues.remove(R.HOUR_OF_DAY),this.fieldValues.remove(R.MINUTE_OF_HOUR),this.fieldValues.remove(R.SECOND_OF_MINUTE),this.fieldValues.remove(R.NANO_OF_SECOND)}},i._addObject=function(t){t instanceof B?this.date=t:t instanceof fe&&(this.time=t)},i._resolveInstant=function(){if(null!=this.date&&null!=this.time){var t=this.fieldValues.get(R.OFFSET_SECONDS);if(null!=t){var e=X.ofTotalSeconds(t),n=this.date.atTime(this.time).atZone(e).getLong(R.INSTANT_SECONDS);this.fieldValues.put(R.INSTANT_SECONDS,n)}else if(null!=this.zone){var i=this.date.atTime(this.time).atZone(this.zone).getLong(R.INSTANT_SECONDS);this.fieldValues.put(R.INSTANT_SECONDS,i)}}},i.build=function(t){return t.queryFrom(this)},i.isSupported=function(t){return null!=t&&(this.fieldValues.containsKey(t)&&void 0!==this.fieldValues.get(t)||null!=this.date&&this.date.isSupported(t)||null!=this.time&&this.time.isSupported(t))},i.getLong=function(t){_(t,"field");var e=this.getFieldValue0(t);if(null==e){if(null!=this.date&&this.date.isSupported(t))return this.date.getLong(t);if(null!=this.time&&this.time.isSupported(t))return this.time.getLong(t);throw new n("Field not found: "+t)}return e},i.query=function(t){return t===g.zoneId()?this.zone:t===g.chronology()?this.chrono:t===g.localDate()?null!=this.date?ae.from(this.date):null:t===g.localTime()?this.time:t===g.zone()||t===g.offset()?t.queryFrom(this):t===g.precision()?null:t.queryFrom(this)},e}(I),Q=function(){function t(){if(1===arguments.length){if(arguments[0]instanceof t)return void this._constructorSelf.apply(this,arguments);this._constructorFormatter.apply(this,arguments)}else this._constructorParam.apply(this,arguments);this._caseSensitive=!0,this._strict=!0,this._parsed=[new $(this)]}var e=t.prototype;return e._constructorParam=function(t,e,n){this._locale=t,this._symbols=e,this._overrideChronology=n},e._constructorFormatter=function(t){this._locale=t.locale(),this._symbols=t.decimalStyle(),this._overrideChronology=t.chronology()},e._constructorSelf=function(t){this._locale=t._locale,this._symbols=t._symbols,this._overrideChronology=t._overrideChronology,this._overrideZone=t._overrideZone,this._caseSensitive=t._caseSensitive,this._strict=t._strict,this._parsed=[new $(this)]},e.copy=function(){return new t(this)},e.symbols=function(){return this._symbols},e.isStrict=function(){return this._strict},e.setStrict=function(t){this._strict=t},e.locale=function(){return this._locale},e.setLocale=function(t){this._locale=t},e.startOptional=function(){this._parsed.push(this.currentParsed().copy())},e.endOptional=function(t){t?this._parsed.splice(this._parsed.length-2,1):this._parsed.splice(this._parsed.length-1,1)},e.isCaseSensitive=function(){return this._caseSensitive},e.setCaseSensitive=function(t){this._caseSensitive=t},e.subSequenceEquals=function(t,e,n,i,r){if(e+r>t.length||i+r>n.length)return!1;this.isCaseSensitive()||(t=t.toLowerCase(),n=n.toLowerCase());for(var s=0;s<r;s++){if(t[e+s]!==n[i+s])return!1}return!0},e.charEquals=function(t,e){return this.isCaseSensitive()?t===e:this.charEqualsIgnoreCase(t,e)},e.charEqualsIgnoreCase=function(t,e){return t===e||t.toLowerCase()===e.toLowerCase()},e.setParsedField=function(t,e,n,i){var r=this.currentParsed().fieldValues,s=r.get(t);return r.set(t,e),null!=s&&s!==e?~n:i},e.setParsedZone=function(t){_(t,"zone"),this.currentParsed().zone=t},e.getParsed=function(t){return this.currentParsed().fieldValues.get(t)},e.toParsed=function(){return this.currentParsed()},e.currentParsed=function(){return this._parsed[this._parsed.length-1]},e.setParsedLeapSecond=function(){this.currentParsed().leapSecond=!0},e.getEffectiveChronology=function(){var t=this.currentParsed().chrono;return null==t&&null==(t=this._overrideChronology)&&(t=te.INSTANCE),t},t}(),$=function(t){function e(e){var n;return(n=t.call(this)||this).chrono=null,n.zone=null,n.fieldValues=new W,n.leapSecond=!1,n.excessDays=b.ZERO,n.dateTimeParseContext=e,n}f(e,t);var n=e.prototype;return n.copy=function(){var t=new e;return t.chrono=this.chrono,t.zone=this.zone,t.fieldValu