@js-joda/timezone 2.10.0 → 2.11.0
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.
- package/CHANGELOG.md +4 -0
- package/dist/js-joda-timezone-10-year-range.js +177 -269
- package/dist/js-joda-timezone-10-year-range.js.map +1 -1
- package/dist/js-joda-timezone-10-year-range.min.js +1 -1
- package/dist/js-joda-timezone-1970-2030.js +177 -269
- package/dist/js-joda-timezone-1970-2030.js.map +1 -1
- package/dist/js-joda-timezone-1970-2030.min.js +1 -1
- package/dist/js-joda-timezone-2012-2022.js +177 -269
- package/dist/js-joda-timezone-2012-2022.js.map +1 -1
- package/dist/js-joda-timezone-2012-2022.min.js +1 -1
- package/dist/js-joda-timezone-empty.js +177 -269
- package/dist/js-joda-timezone-empty.js.map +1 -1
- package/dist/js-joda-timezone-empty.min.js +1 -1
- package/dist/js-joda-timezone.js +177 -269
- package/dist/js-joda-timezone.js.map +1 -1
- package/dist/js-joda-timezone.min.js +1 -1
- package/package.json +4 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//! @version @js-joda/timezone-2.
|
|
1
|
+
//! @version @js-joda/timezone-2.11.0-2021e-1970-2030
|
|
2
2
|
//! @copyright (c) 2015-present, Philipp Thürwächter, Pattrick Hüper & js-joda contributors
|
|
3
3
|
//! @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
|
|
4
4
|
(function webpackUniversalModuleDefinition(root, factory) {
|
|
@@ -122,28 +122,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
122
122
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MomentZoneRules", function() { return MomentZoneRules; });
|
|
123
123
|
/* harmony import */ var _js_joda_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @js-joda/core */ "@js-joda/core");
|
|
124
124
|
/* harmony import */ var _js_joda_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__);
|
|
125
|
-
function
|
|
126
|
-
|
|
127
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
128
|
-
|
|
129
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
130
|
-
|
|
131
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
132
|
-
|
|
133
|
-
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
125
|
+
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
|
|
134
126
|
|
|
135
127
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
136
128
|
|
|
137
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
138
|
-
|
|
139
|
-
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
140
|
-
|
|
141
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
142
|
-
|
|
143
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
144
|
-
|
|
145
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
146
|
-
|
|
147
129
|
/*
|
|
148
130
|
* @copyright (c) 2016-present, Philipp Thürwächter, Pattrick Hüper
|
|
149
131
|
* @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
|
|
@@ -151,215 +133,188 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
151
133
|
*/
|
|
152
134
|
|
|
153
135
|
var MomentZoneRules = function (_ZoneRules) {
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
var _super = _createSuper(MomentZoneRules);
|
|
136
|
+
_inheritsLoose(MomentZoneRules, _ZoneRules);
|
|
157
137
|
|
|
158
138
|
function MomentZoneRules(tzdbInfo) {
|
|
159
139
|
var _this;
|
|
160
140
|
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
_this = _super.call(this);
|
|
141
|
+
_this = _ZoneRules.call(this) || this;
|
|
164
142
|
_this._tzdbInfo = tzdbInfo;
|
|
165
143
|
_this._ldtUntils = new LDTUntils(_this._tzdbInfo.untils, _this._tzdbInfo.offsets);
|
|
166
144
|
return _this;
|
|
167
145
|
}
|
|
168
146
|
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
147
|
+
var _proto = MomentZoneRules.prototype;
|
|
148
|
+
|
|
149
|
+
_proto.isFixedOffset = function isFixedOffset() {
|
|
150
|
+
return this._tzdbInfo.offsets.length === 1;
|
|
151
|
+
};
|
|
152
|
+
|
|
153
|
+
_proto.offsetOfInstant = function offsetOfInstant(instant) {
|
|
154
|
+
var epochMilli = instant.toEpochMilli();
|
|
155
|
+
return this.offsetOfEpochMilli(epochMilli);
|
|
156
|
+
};
|
|
157
|
+
|
|
158
|
+
_proto.offsetOfEpochMilli = function offsetOfEpochMilli(epochMilli) {
|
|
159
|
+
var index = binarySearch(this._tzdbInfo.untils, epochMilli);
|
|
160
|
+
return _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ZoneOffset"].ofTotalSeconds(this._offsetByIndexInSeconds(index));
|
|
161
|
+
};
|
|
162
|
+
|
|
163
|
+
_proto.offsetOfLocalDateTime = function offsetOfLocalDateTime(localDateTime) {
|
|
164
|
+
var info = this._offsetInfo(localDateTime);
|
|
165
|
+
|
|
166
|
+
if (info instanceof _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ZoneOffsetTransition"]) {
|
|
167
|
+
return info.offsetBefore();
|
|
173
168
|
}
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
169
|
+
|
|
170
|
+
return info;
|
|
171
|
+
};
|
|
172
|
+
|
|
173
|
+
_proto._offsetInfo = function _offsetInfo(localDateTime) {
|
|
174
|
+
var index = ldtBinarySearch(this._ldtUntils, localDateTime);
|
|
175
|
+
var offsetIndex = index >> 1;
|
|
176
|
+
|
|
177
|
+
if (index % 2 === 1) {
|
|
178
|
+
var ldtBefore = this._ldtUntils.get(Math.max(index - 1, 0));
|
|
179
|
+
|
|
180
|
+
var ldtAfter = this._ldtUntils.get(Math.min(index, this._ldtUntils.size - 1));
|
|
181
|
+
|
|
182
|
+
var offsetBefore = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ZoneOffset"].ofTotalSeconds(this._offsetByIndexInSeconds(offsetIndex));
|
|
183
|
+
var offsetAfter = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ZoneOffset"].ofTotalSeconds(this._offsetByIndexInSeconds(Math.min(offsetIndex + 1, this._tzdbInfo.offsets.length - 1)));
|
|
184
|
+
|
|
185
|
+
if (offsetBefore.compareTo(offsetAfter) > 0) {
|
|
186
|
+
return _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ZoneOffsetTransition"].of(ldtBefore, offsetBefore, offsetAfter);
|
|
187
|
+
} else {
|
|
188
|
+
return _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ZoneOffsetTransition"].of(ldtAfter, offsetBefore, offsetAfter);
|
|
189
|
+
}
|
|
179
190
|
}
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
191
|
+
|
|
192
|
+
return _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ZoneOffset"].ofTotalSeconds(this._offsetByIndexInSeconds(offsetIndex));
|
|
193
|
+
};
|
|
194
|
+
|
|
195
|
+
_proto._offsetByIndexInSeconds = function _offsetByIndexInSeconds(index) {
|
|
196
|
+
return -offsetInSeconds(this._tzdbInfo.offsets[index]);
|
|
197
|
+
};
|
|
198
|
+
|
|
199
|
+
_proto.validOffsets = function validOffsets(localDateTime) {
|
|
200
|
+
var info = this._offsetInfo(localDateTime);
|
|
201
|
+
|
|
202
|
+
if (info instanceof _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ZoneOffsetTransition"]) {
|
|
203
|
+
return info.validOffsets();
|
|
185
204
|
}
|
|
186
|
-
}, {
|
|
187
|
-
key: "offsetOfLocalDateTime",
|
|
188
|
-
value: function offsetOfLocalDateTime(localDateTime) {
|
|
189
|
-
var info = this._offsetInfo(localDateTime);
|
|
190
205
|
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
}
|
|
206
|
+
return [info];
|
|
207
|
+
};
|
|
194
208
|
|
|
209
|
+
_proto.transition = function transition(localDateTime) {
|
|
210
|
+
var info = this._offsetInfo(localDateTime);
|
|
211
|
+
|
|
212
|
+
if (info instanceof _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ZoneOffsetTransition"]) {
|
|
195
213
|
return info;
|
|
196
214
|
}
|
|
197
|
-
}, {
|
|
198
|
-
key: "_offsetInfo",
|
|
199
|
-
value: function _offsetInfo(localDateTime) {
|
|
200
|
-
var index = ldtBinarySearch(this._ldtUntils, localDateTime);
|
|
201
|
-
var offsetIndex = index >> 1;
|
|
202
215
|
|
|
203
|
-
|
|
204
|
-
|
|
216
|
+
return null;
|
|
217
|
+
};
|
|
205
218
|
|
|
206
|
-
|
|
219
|
+
_proto.standardOffset = function standardOffset(instant) {
|
|
220
|
+
notSupported('ZoneRules.standardOffset');
|
|
221
|
+
};
|
|
207
222
|
|
|
208
|
-
|
|
209
|
-
|
|
223
|
+
_proto.daylightSavings = function daylightSavings(instant) {
|
|
224
|
+
notSupported('ZoneRules.daylightSavings');
|
|
225
|
+
};
|
|
210
226
|
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
return _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ZoneOffsetTransition"].of(ldtAfter, offsetBefore, offsetAfter);
|
|
215
|
-
}
|
|
216
|
-
}
|
|
227
|
+
_proto.isDaylightSavings = function isDaylightSavings(instant) {
|
|
228
|
+
notSupported('ZoneRules.isDaylightSavings');
|
|
229
|
+
};
|
|
217
230
|
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
return -offsetInSeconds(this._tzdbInfo.offsets[index]);
|
|
224
|
-
}
|
|
225
|
-
}, {
|
|
226
|
-
key: "validOffsets",
|
|
227
|
-
value: function validOffsets(localDateTime) {
|
|
228
|
-
var info = this._offsetInfo(localDateTime);
|
|
231
|
+
_proto.isValidOffset = function isValidOffset(localDateTime, offset) {
|
|
232
|
+
return this.validOffsets(localDateTime).some(function (o) {
|
|
233
|
+
return o.equals(offset);
|
|
234
|
+
});
|
|
235
|
+
};
|
|
229
236
|
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
237
|
+
_proto.nextTransition = function nextTransition(instant) {
|
|
238
|
+
notSupported('ZoneRules.nextTransition');
|
|
239
|
+
};
|
|
233
240
|
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
}
|
|
237
|
-
key: "transition",
|
|
238
|
-
value: function transition(localDateTime) {
|
|
239
|
-
var info = this._offsetInfo(localDateTime);
|
|
241
|
+
_proto.previousTransition = function previousTransition(instant) {
|
|
242
|
+
notSupported('ZoneRules.previousTransition');
|
|
243
|
+
};
|
|
240
244
|
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
245
|
+
_proto.transitions = function transitions() {
|
|
246
|
+
notSupported('ZoneRules.transitions');
|
|
247
|
+
};
|
|
244
248
|
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
}, {
|
|
253
|
-
key: "daylightSavings",
|
|
254
|
-
value: function daylightSavings(instant) {
|
|
255
|
-
notSupported('ZoneRules.daylightSavings');
|
|
256
|
-
}
|
|
257
|
-
}, {
|
|
258
|
-
key: "isDaylightSavings",
|
|
259
|
-
value: function isDaylightSavings(instant) {
|
|
260
|
-
notSupported('ZoneRules.isDaylightSavings');
|
|
261
|
-
}
|
|
262
|
-
}, {
|
|
263
|
-
key: "isValidOffset",
|
|
264
|
-
value: function isValidOffset(localDateTime, offset) {
|
|
265
|
-
return this.validOffsets(localDateTime).some(function (o) {
|
|
266
|
-
return o.equals(offset);
|
|
267
|
-
});
|
|
268
|
-
}
|
|
269
|
-
}, {
|
|
270
|
-
key: "nextTransition",
|
|
271
|
-
value: function nextTransition(instant) {
|
|
272
|
-
notSupported('ZoneRules.nextTransition');
|
|
273
|
-
}
|
|
274
|
-
}, {
|
|
275
|
-
key: "previousTransition",
|
|
276
|
-
value: function previousTransition(instant) {
|
|
277
|
-
notSupported('ZoneRules.previousTransition');
|
|
278
|
-
}
|
|
279
|
-
}, {
|
|
280
|
-
key: "transitions",
|
|
281
|
-
value: function transitions() {
|
|
282
|
-
notSupported('ZoneRules.transitions');
|
|
249
|
+
_proto.transitionRules = function transitionRules() {
|
|
250
|
+
notSupported('ZoneRules.transitionRules');
|
|
251
|
+
};
|
|
252
|
+
|
|
253
|
+
_proto.equals = function equals(other) {
|
|
254
|
+
if (this === other) {
|
|
255
|
+
return true;
|
|
283
256
|
}
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
notSupported('ZoneRules.transitionRules');
|
|
257
|
+
|
|
258
|
+
if (other instanceof MomentZoneRules) {
|
|
259
|
+
return this._tzdbInfo === other._tzdbInfo;
|
|
288
260
|
}
|
|
289
|
-
}, {
|
|
290
|
-
key: "equals",
|
|
291
|
-
value: function equals(other) {
|
|
292
|
-
if (this === other) {
|
|
293
|
-
return true;
|
|
294
|
-
}
|
|
295
261
|
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
}
|
|
262
|
+
return false;
|
|
263
|
+
};
|
|
299
264
|
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
}
|
|
303
|
-
key: "toString",
|
|
304
|
-
value: function toString() {
|
|
305
|
-
return this._tzdbInfo.name;
|
|
306
|
-
}
|
|
307
|
-
}]);
|
|
265
|
+
_proto.toString = function toString() {
|
|
266
|
+
return this._tzdbInfo.name;
|
|
267
|
+
};
|
|
308
268
|
|
|
309
269
|
return MomentZoneRules;
|
|
310
270
|
}(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ZoneRules"]);
|
|
311
271
|
|
|
312
272
|
var LDTUntils = function () {
|
|
313
273
|
function LDTUntils(_tzdbUntils, tzdbOffsets) {
|
|
314
|
-
_classCallCheck(this, LDTUntils);
|
|
315
|
-
|
|
316
274
|
this._tzdbUntils = _tzdbUntils;
|
|
317
275
|
this._tzdbOffsets = tzdbOffsets;
|
|
318
276
|
this._ldtUntils = [];
|
|
319
277
|
this.size = this._tzdbUntils.length * 2;
|
|
320
278
|
}
|
|
321
279
|
|
|
322
|
-
|
|
323
|
-
key: "_generateTupple",
|
|
324
|
-
value: function _generateTupple(index) {
|
|
325
|
-
var epochMillis = this._tzdbUntils[index];
|
|
280
|
+
var _proto2 = LDTUntils.prototype;
|
|
326
281
|
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
}
|
|
282
|
+
_proto2._generateTupple = function _generateTupple(index) {
|
|
283
|
+
var epochMillis = this._tzdbUntils[index];
|
|
330
284
|
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
var zone1 = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ZoneOffset"].ofTotalSeconds(-offset1);
|
|
334
|
-
var ldt1 = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["LocalDateTime"].ofInstant(instant, zone1);
|
|
335
|
-
var nextIndex = Math.min(index + 1, this._tzdbOffsets.length - 1);
|
|
336
|
-
var offset2 = offsetInSeconds(this._tzdbOffsets[nextIndex]);
|
|
337
|
-
var zone2 = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ZoneOffset"].ofTotalSeconds(-offset2);
|
|
338
|
-
var ldt2 = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["LocalDateTime"].ofInstant(instant, zone2);
|
|
339
|
-
|
|
340
|
-
if (offset1 > offset2) {
|
|
341
|
-
return [ldt1, ldt2];
|
|
342
|
-
} else {
|
|
343
|
-
return [ldt2, ldt1];
|
|
344
|
-
}
|
|
285
|
+
if (epochMillis === Infinity) {
|
|
286
|
+
return [_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["LocalDateTime"].MAX, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["LocalDateTime"].MAX];
|
|
345
287
|
}
|
|
346
|
-
}, {
|
|
347
|
-
key: "_getTupple",
|
|
348
|
-
value: function _getTupple(index) {
|
|
349
|
-
if (this._ldtUntils[index] == null) {
|
|
350
|
-
this._ldtUntils[index] = this._generateTupple(index);
|
|
351
|
-
}
|
|
352
288
|
|
|
353
|
-
|
|
289
|
+
var instant = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["Instant"].ofEpochMilli(epochMillis);
|
|
290
|
+
var offset1 = offsetInSeconds(this._tzdbOffsets[index]);
|
|
291
|
+
var zone1 = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ZoneOffset"].ofTotalSeconds(-offset1);
|
|
292
|
+
var ldt1 = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["LocalDateTime"].ofInstant(instant, zone1);
|
|
293
|
+
var nextIndex = Math.min(index + 1, this._tzdbOffsets.length - 1);
|
|
294
|
+
var offset2 = offsetInSeconds(this._tzdbOffsets[nextIndex]);
|
|
295
|
+
var zone2 = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ZoneOffset"].ofTotalSeconds(-offset2);
|
|
296
|
+
var ldt2 = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["LocalDateTime"].ofInstant(instant, zone2);
|
|
297
|
+
|
|
298
|
+
if (offset1 > offset2) {
|
|
299
|
+
return [ldt1, ldt2];
|
|
300
|
+
} else {
|
|
301
|
+
return [ldt2, ldt1];
|
|
354
302
|
}
|
|
355
|
-
}
|
|
356
|
-
key: "get",
|
|
357
|
-
value: function get(index) {
|
|
358
|
-
var ldtTupple = this._getTupple(index >> 1);
|
|
303
|
+
};
|
|
359
304
|
|
|
360
|
-
|
|
305
|
+
_proto2._getTupple = function _getTupple(index) {
|
|
306
|
+
if (this._ldtUntils[index] == null) {
|
|
307
|
+
this._ldtUntils[index] = this._generateTupple(index);
|
|
361
308
|
}
|
|
362
|
-
|
|
309
|
+
|
|
310
|
+
return this._ldtUntils[index];
|
|
311
|
+
};
|
|
312
|
+
|
|
313
|
+
_proto2.get = function get(index) {
|
|
314
|
+
var ldtTupple = this._getTupple(index >> 1);
|
|
315
|
+
|
|
316
|
+
return ldtTupple[index % 2];
|
|
317
|
+
};
|
|
363
318
|
|
|
364
319
|
return LDTUntils;
|
|
365
320
|
}();
|
|
@@ -409,7 +364,7 @@ function binarySearch(array, value) {
|
|
|
409
364
|
}
|
|
410
365
|
|
|
411
366
|
function notSupported(msg) {
|
|
412
|
-
throw new Error("not supported: "
|
|
367
|
+
throw new Error("not supported: " + msg);
|
|
413
368
|
}
|
|
414
369
|
|
|
415
370
|
/***/ }),
|
|
@@ -428,34 +383,16 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
428
383
|
/* harmony import */ var _js_joda_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__);
|
|
429
384
|
/* harmony import */ var _MomentZoneRules__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./MomentZoneRules */ "./src/MomentZoneRules.js");
|
|
430
385
|
/* harmony import */ var _unpack__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./unpack */ "./src/unpack.js");
|
|
431
|
-
function
|
|
432
|
-
|
|
433
|
-
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
386
|
+
function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
434
387
|
|
|
435
388
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
436
389
|
|
|
437
390
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
438
391
|
|
|
439
|
-
function
|
|
440
|
-
|
|
441
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
442
|
-
|
|
443
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
444
|
-
|
|
445
|
-
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
392
|
+
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
|
|
446
393
|
|
|
447
394
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
448
395
|
|
|
449
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
450
|
-
|
|
451
|
-
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
452
|
-
|
|
453
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
454
|
-
|
|
455
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
456
|
-
|
|
457
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
458
|
-
|
|
459
396
|
/*
|
|
460
397
|
* @copyright (c) 2016-present, Philipp Thürwächter, Pattrick Hüper
|
|
461
398
|
* @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
|
|
@@ -470,82 +407,53 @@ var AVAILABLE_ZONE_IDS = [];
|
|
|
470
407
|
var zones = {};
|
|
471
408
|
var links = {};
|
|
472
409
|
var MomentZoneRulesProvider = function (_ZoneRulesProvider) {
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
var _super = _createSuper(MomentZoneRulesProvider);
|
|
410
|
+
_inheritsLoose(MomentZoneRulesProvider, _ZoneRulesProvider);
|
|
476
411
|
|
|
477
412
|
function MomentZoneRulesProvider() {
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
return _super.apply(this, arguments);
|
|
413
|
+
return _ZoneRulesProvider.apply(this, arguments) || this;
|
|
481
414
|
}
|
|
482
415
|
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
value: function getRules(zoneId) {
|
|
486
|
-
var tzdbZoneInfo = zones[links[zoneId]];
|
|
487
|
-
|
|
488
|
-
if (tzdbZoneInfo == null) {
|
|
489
|
-
throw new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeException"]("Unknown time-zone ID: ".concat(zoneId));
|
|
490
|
-
}
|
|
416
|
+
MomentZoneRulesProvider.getRules = function getRules(zoneId) {
|
|
417
|
+
var tzdbZoneInfo = zones[links[zoneId]];
|
|
491
418
|
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
}, {
|
|
495
|
-
key: "getAvailableZoneIds",
|
|
496
|
-
value: function getAvailableZoneIds() {
|
|
497
|
-
return AVAILABLE_ZONE_IDS;
|
|
498
|
-
}
|
|
499
|
-
}, {
|
|
500
|
-
key: "getVersion",
|
|
501
|
-
value: function getVersion() {
|
|
502
|
-
return TZDB_VERSION;
|
|
419
|
+
if (tzdbZoneInfo == null) {
|
|
420
|
+
throw new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeException"]("Unknown time-zone ID: " + zoneId);
|
|
503
421
|
}
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
422
|
+
|
|
423
|
+
return new _MomentZoneRules__WEBPACK_IMPORTED_MODULE_1__["MomentZoneRules"](tzdbZoneInfo);
|
|
424
|
+
};
|
|
425
|
+
|
|
426
|
+
MomentZoneRulesProvider.getAvailableZoneIds = function getAvailableZoneIds() {
|
|
427
|
+
return AVAILABLE_ZONE_IDS;
|
|
428
|
+
};
|
|
429
|
+
|
|
430
|
+
MomentZoneRulesProvider.getVersion = function getVersion() {
|
|
431
|
+
return TZDB_VERSION;
|
|
432
|
+
};
|
|
433
|
+
|
|
434
|
+
MomentZoneRulesProvider.getTzdbData = function getTzdbData() {
|
|
435
|
+
return TZDB_DATA;
|
|
436
|
+
};
|
|
437
|
+
|
|
438
|
+
MomentZoneRulesProvider.loadTzdbData = function loadTzdbData(packedJson) {
|
|
439
|
+
TZDB_DATA = packedJson;
|
|
440
|
+
TZDB_VERSION = packedJson.version;
|
|
441
|
+
|
|
442
|
+
for (var _iterator = _createForOfIteratorHelperLoose(packedJson.zones), _step; !(_step = _iterator()).done;) {
|
|
443
|
+
var packedZoneInfo = _step.value;
|
|
444
|
+
var tzdbZoneInfo = Object(_unpack__WEBPACK_IMPORTED_MODULE_2__["unpack"])(packedZoneInfo);
|
|
445
|
+
AVAILABLE_ZONE_IDS.push(tzdbZoneInfo.name);
|
|
446
|
+
zones[tzdbZoneInfo.name] = tzdbZoneInfo;
|
|
447
|
+
links[tzdbZoneInfo.name] = tzdbZoneInfo.name;
|
|
508
448
|
}
|
|
509
|
-
}, {
|
|
510
|
-
key: "loadTzdbData",
|
|
511
|
-
value: function loadTzdbData(packedJson) {
|
|
512
|
-
TZDB_DATA = packedJson;
|
|
513
|
-
TZDB_VERSION = packedJson.version;
|
|
514
|
-
|
|
515
|
-
var _iterator = _createForOfIteratorHelper(packedJson.zones),
|
|
516
|
-
_step;
|
|
517
|
-
|
|
518
|
-
try {
|
|
519
|
-
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
520
|
-
var packedZoneInfo = _step.value;
|
|
521
|
-
var tzdbZoneInfo = Object(_unpack__WEBPACK_IMPORTED_MODULE_2__["unpack"])(packedZoneInfo);
|
|
522
|
-
AVAILABLE_ZONE_IDS.push(tzdbZoneInfo.name);
|
|
523
|
-
zones[tzdbZoneInfo.name] = tzdbZoneInfo;
|
|
524
|
-
links[tzdbZoneInfo.name] = tzdbZoneInfo.name;
|
|
525
|
-
}
|
|
526
|
-
} catch (err) {
|
|
527
|
-
_iterator.e(err);
|
|
528
|
-
} finally {
|
|
529
|
-
_iterator.f();
|
|
530
|
-
}
|
|
531
449
|
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
var packedLink = _step2.value;
|
|
538
|
-
var link = packedLink.split('|');
|
|
539
|
-
AVAILABLE_ZONE_IDS.push(link[1]);
|
|
540
|
-
links[link[1]] = link[0];
|
|
541
|
-
}
|
|
542
|
-
} catch (err) {
|
|
543
|
-
_iterator2.e(err);
|
|
544
|
-
} finally {
|
|
545
|
-
_iterator2.f();
|
|
546
|
-
}
|
|
450
|
+
for (var _iterator2 = _createForOfIteratorHelperLoose(packedJson.links), _step2; !(_step2 = _iterator2()).done;) {
|
|
451
|
+
var packedLink = _step2.value;
|
|
452
|
+
var link = packedLink.split('|');
|
|
453
|
+
AVAILABLE_ZONE_IDS.push(link[1]);
|
|
454
|
+
links[link[1]] = link[0];
|
|
547
455
|
}
|
|
548
|
-
}
|
|
456
|
+
};
|
|
549
457
|
|
|
550
458
|
return MomentZoneRulesProvider;
|
|
551
459
|
}(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ZoneRulesProvider"]);
|