@js-joda/timezone 2.9.0 → 2.12.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 +11 -1
- package/dist/js-joda-timezone-10-year-range.esm.js +1339 -0
- package/dist/js-joda-timezone-10-year-range.esm.js.map +1 -0
- package/dist/js-joda-timezone-10-year-range.js +1343 -785
- package/dist/js-joda-timezone-10-year-range.js.map +1 -1
- package/dist/js-joda-timezone-10-year-range.min.js +5 -1
- package/dist/js-joda-timezone-1970-2030.esm.js +1339 -0
- package/dist/js-joda-timezone-1970-2030.esm.js.map +1 -0
- package/dist/js-joda-timezone-1970-2030.js +1343 -785
- package/dist/js-joda-timezone-1970-2030.js.map +1 -1
- package/dist/js-joda-timezone-1970-2030.min.js +5 -1
- package/dist/js-joda-timezone-2012-2022.esm.js +1339 -0
- package/dist/js-joda-timezone-2012-2022.esm.js.map +1 -0
- package/dist/js-joda-timezone-2012-2022.js +1343 -785
- package/dist/js-joda-timezone-2012-2022.js.map +1 -1
- package/dist/js-joda-timezone-2012-2022.min.js +5 -1
- package/dist/js-joda-timezone-empty.esm.js +483 -0
- package/dist/js-joda-timezone-empty.esm.js.map +1 -0
- package/dist/js-joda-timezone-empty.js +344 -610
- package/dist/js-joda-timezone-empty.js.map +1 -1
- package/dist/js-joda-timezone-empty.min.js +5 -1
- package/dist/js-joda-timezone.esm.js +1339 -0
- package/dist/js-joda-timezone.esm.js.map +1 -0
- package/dist/js-joda-timezone.js +1343 -785
- package/dist/js-joda-timezone.js.map +1 -1
- package/dist/js-joda-timezone.min.js +5 -1
- package/package.json +5 -5
- package/src/license-preamble.js +0 -2
|
@@ -1,191 +1,107 @@
|
|
|
1
|
-
//! @version @js-joda/timezone-2.
|
|
1
|
+
//! @version @js-joda/timezone - 2.12.0
|
|
2
2
|
//! @copyright (c) 2015-present, Philipp Thürwächter, Pattrick Hüper & js-joda contributors
|
|
3
|
+
//! @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
|
|
3
4
|
//! @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
/******/ var installedModules = {};
|
|
17
|
-
/******/
|
|
18
|
-
/******/ // The require function
|
|
19
|
-
/******/ function __webpack_require__(moduleId) {
|
|
20
|
-
/******/
|
|
21
|
-
/******/ // Check if module is in cache
|
|
22
|
-
/******/ if(installedModules[moduleId]) {
|
|
23
|
-
/******/ return installedModules[moduleId].exports;
|
|
24
|
-
/******/ }
|
|
25
|
-
/******/ // Create a new module (and put it into the cache)
|
|
26
|
-
/******/ var module = installedModules[moduleId] = {
|
|
27
|
-
/******/ i: moduleId,
|
|
28
|
-
/******/ l: false,
|
|
29
|
-
/******/ exports: {}
|
|
30
|
-
/******/ };
|
|
31
|
-
/******/
|
|
32
|
-
/******/ // Execute the module function
|
|
33
|
-
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
|
34
|
-
/******/
|
|
35
|
-
/******/ // Flag the module as loaded
|
|
36
|
-
/******/ module.l = true;
|
|
37
|
-
/******/
|
|
38
|
-
/******/ // Return the exports of the module
|
|
39
|
-
/******/ return module.exports;
|
|
40
|
-
/******/ }
|
|
41
|
-
/******/
|
|
42
|
-
/******/
|
|
43
|
-
/******/ // expose the modules object (__webpack_modules__)
|
|
44
|
-
/******/ __webpack_require__.m = modules;
|
|
45
|
-
/******/
|
|
46
|
-
/******/ // expose the module cache
|
|
47
|
-
/******/ __webpack_require__.c = installedModules;
|
|
48
|
-
/******/
|
|
49
|
-
/******/ // define getter function for harmony exports
|
|
50
|
-
/******/ __webpack_require__.d = function(exports, name, getter) {
|
|
51
|
-
/******/ if(!__webpack_require__.o(exports, name)) {
|
|
52
|
-
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
|
53
|
-
/******/ }
|
|
54
|
-
/******/ };
|
|
55
|
-
/******/
|
|
56
|
-
/******/ // define __esModule on exports
|
|
57
|
-
/******/ __webpack_require__.r = function(exports) {
|
|
58
|
-
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
59
|
-
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
60
|
-
/******/ }
|
|
61
|
-
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
62
|
-
/******/ };
|
|
63
|
-
/******/
|
|
64
|
-
/******/ // create a fake namespace object
|
|
65
|
-
/******/ // mode & 1: value is a module id, require it
|
|
66
|
-
/******/ // mode & 2: merge all properties of value into the ns
|
|
67
|
-
/******/ // mode & 4: return value when already ns object
|
|
68
|
-
/******/ // mode & 8|1: behave like require
|
|
69
|
-
/******/ __webpack_require__.t = function(value, mode) {
|
|
70
|
-
/******/ if(mode & 1) value = __webpack_require__(value);
|
|
71
|
-
/******/ if(mode & 8) return value;
|
|
72
|
-
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
|
73
|
-
/******/ var ns = Object.create(null);
|
|
74
|
-
/******/ __webpack_require__.r(ns);
|
|
75
|
-
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
|
76
|
-
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
|
77
|
-
/******/ return ns;
|
|
78
|
-
/******/ };
|
|
79
|
-
/******/
|
|
80
|
-
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
81
|
-
/******/ __webpack_require__.n = function(module) {
|
|
82
|
-
/******/ var getter = module && module.__esModule ?
|
|
83
|
-
/******/ function getDefault() { return module['default']; } :
|
|
84
|
-
/******/ function getModuleExports() { return module; };
|
|
85
|
-
/******/ __webpack_require__.d(getter, 'a', getter);
|
|
86
|
-
/******/ return getter;
|
|
87
|
-
/******/ };
|
|
88
|
-
/******/
|
|
89
|
-
/******/ // Object.prototype.hasOwnProperty.call
|
|
90
|
-
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
|
91
|
-
/******/
|
|
92
|
-
/******/ // __webpack_public_path__
|
|
93
|
-
/******/ __webpack_require__.p = "";
|
|
94
|
-
/******/
|
|
95
|
-
/******/
|
|
96
|
-
/******/ // Load entry module and return exports
|
|
97
|
-
/******/ return __webpack_require__(__webpack_require__.s = "./src/js-joda-timezone-empty.js");
|
|
98
|
-
/******/ })
|
|
99
|
-
/************************************************************************/
|
|
100
|
-
/******/ ({
|
|
101
|
-
|
|
102
|
-
/***/ "./src/MomentZoneRules.js":
|
|
103
|
-
/*!********************************!*\
|
|
104
|
-
!*** ./src/MomentZoneRules.js ***!
|
|
105
|
-
\********************************/
|
|
106
|
-
/*! exports provided: MomentZoneRules */
|
|
107
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
108
|
-
|
|
109
|
-
"use strict";
|
|
110
|
-
__webpack_require__.r(__webpack_exports__);
|
|
111
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MomentZoneRules", function() { return MomentZoneRules; });
|
|
112
|
-
/* harmony import */ var _js_joda_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @js-joda/core */ "@js-joda/core");
|
|
113
|
-
/* harmony import */ var _js_joda_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__);
|
|
114
|
-
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
115
|
-
|
|
116
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
117
|
-
|
|
118
|
-
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); } }
|
|
119
|
-
|
|
120
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
121
|
-
|
|
122
|
-
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); }
|
|
123
|
-
|
|
124
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
125
|
-
|
|
126
|
-
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); }; }
|
|
127
|
-
|
|
128
|
-
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); }
|
|
129
|
-
|
|
130
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
131
|
-
|
|
132
|
-
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; } }
|
|
133
|
-
|
|
134
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
135
|
-
|
|
136
|
-
/*
|
|
137
|
-
* @copyright (c) 2016-present, Philipp Thürwächter, Pattrick Hüper
|
|
138
|
-
* @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
|
|
139
|
-
* @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
|
|
140
|
-
*/
|
|
141
|
-
|
|
142
|
-
var MomentZoneRules = function (_ZoneRules) {
|
|
143
|
-
_inherits(MomentZoneRules, _ZoneRules);
|
|
144
|
-
|
|
145
|
-
var _super = _createSuper(MomentZoneRules);
|
|
146
|
-
|
|
147
|
-
function MomentZoneRules(tzdbInfo) {
|
|
148
|
-
var _this;
|
|
149
|
-
|
|
150
|
-
_classCallCheck(this, MomentZoneRules);
|
|
151
|
-
|
|
152
|
-
_this = _super.call(this);
|
|
153
|
-
_this._tzdbInfo = tzdbInfo;
|
|
154
|
-
_this._ldtUntils = new LDTUntils(_this._tzdbInfo.untils, _this._tzdbInfo.offsets);
|
|
155
|
-
return _this;
|
|
5
|
+
|
|
6
|
+
(function (global, factory) {
|
|
7
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('@js-joda/core')) :
|
|
8
|
+
typeof define === 'function' && define.amd ? define(['@js-joda/core'], factory) :
|
|
9
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.JSJoda));
|
|
10
|
+
})(this, (function (core) { 'use strict';
|
|
11
|
+
|
|
12
|
+
function _inheritsLoose(subClass, superClass) {
|
|
13
|
+
subClass.prototype = Object.create(superClass.prototype);
|
|
14
|
+
subClass.prototype.constructor = subClass;
|
|
15
|
+
|
|
16
|
+
_setPrototypeOf(subClass, superClass);
|
|
156
17
|
}
|
|
157
18
|
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
return
|
|
19
|
+
function _setPrototypeOf(o, p) {
|
|
20
|
+
_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
|
|
21
|
+
o.__proto__ = p;
|
|
22
|
+
return o;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
return _setPrototypeOf(o, p);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
function _unsupportedIterableToArray(o, minLen) {
|
|
29
|
+
if (!o) return;
|
|
30
|
+
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
31
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
32
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
33
|
+
if (n === "Map" || n === "Set") return Array.from(o);
|
|
34
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
function _arrayLikeToArray(arr, len) {
|
|
38
|
+
if (len == null || len > arr.length) len = arr.length;
|
|
39
|
+
|
|
40
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
41
|
+
|
|
42
|
+
return arr2;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
function _createForOfIteratorHelperLoose(o, allowArrayLike) {
|
|
46
|
+
var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
|
|
47
|
+
if (it) return (it = it.call(o)).next.bind(it);
|
|
48
|
+
|
|
49
|
+
if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
|
|
50
|
+
if (it) o = it;
|
|
51
|
+
var i = 0;
|
|
52
|
+
return function () {
|
|
53
|
+
if (i >= o.length) return {
|
|
54
|
+
done: true
|
|
55
|
+
};
|
|
56
|
+
return {
|
|
57
|
+
done: false,
|
|
58
|
+
value: o[i++]
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
var MomentZoneRules = function (_ZoneRules) {
|
|
67
|
+
_inheritsLoose(MomentZoneRules, _ZoneRules);
|
|
68
|
+
|
|
69
|
+
function MomentZoneRules(tzdbInfo) {
|
|
70
|
+
var _this;
|
|
71
|
+
|
|
72
|
+
_this = _ZoneRules.call(this) || this;
|
|
73
|
+
_this._tzdbInfo = tzdbInfo;
|
|
74
|
+
_this._ldtUntils = new LDTUntils(_this._tzdbInfo.untils, _this._tzdbInfo.offsets);
|
|
75
|
+
return _this;
|
|
162
76
|
}
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
77
|
+
|
|
78
|
+
var _proto = MomentZoneRules.prototype;
|
|
79
|
+
|
|
80
|
+
_proto.isFixedOffset = function isFixedOffset() {
|
|
81
|
+
return this._tzdbInfo.offsets.length === 1;
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
_proto.offsetOfInstant = function offsetOfInstant(instant) {
|
|
166
85
|
var epochMilli = instant.toEpochMilli();
|
|
167
86
|
return this.offsetOfEpochMilli(epochMilli);
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
value: function offsetOfEpochMilli(epochMilli) {
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
_proto.offsetOfEpochMilli = function offsetOfEpochMilli(epochMilli) {
|
|
172
90
|
var index = binarySearch(this._tzdbInfo.untils, epochMilli);
|
|
173
|
-
return
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
value: function offsetOfLocalDateTime(localDateTime) {
|
|
91
|
+
return core.ZoneOffset.ofTotalSeconds(this._offsetByIndexInSeconds(index));
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
_proto.offsetOfLocalDateTime = function offsetOfLocalDateTime(localDateTime) {
|
|
178
95
|
var info = this._offsetInfo(localDateTime);
|
|
179
96
|
|
|
180
|
-
if (info instanceof
|
|
97
|
+
if (info instanceof core.ZoneOffsetTransition) {
|
|
181
98
|
return info.offsetBefore();
|
|
182
99
|
}
|
|
183
100
|
|
|
184
101
|
return info;
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
value: function _offsetInfo(localDateTime) {
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
_proto._offsetInfo = function _offsetInfo(localDateTime) {
|
|
189
105
|
var index = ldtBinarySearch(this._ldtUntils, localDateTime);
|
|
190
106
|
var offsetIndex = index >> 1;
|
|
191
107
|
|
|
@@ -194,90 +110,78 @@ var MomentZoneRules = function (_ZoneRules) {
|
|
|
194
110
|
|
|
195
111
|
var ldtAfter = this._ldtUntils.get(Math.min(index, this._ldtUntils.size - 1));
|
|
196
112
|
|
|
197
|
-
var offsetBefore =
|
|
198
|
-
var offsetAfter =
|
|
113
|
+
var offsetBefore = core.ZoneOffset.ofTotalSeconds(this._offsetByIndexInSeconds(offsetIndex));
|
|
114
|
+
var offsetAfter = core.ZoneOffset.ofTotalSeconds(this._offsetByIndexInSeconds(Math.min(offsetIndex + 1, this._tzdbInfo.offsets.length - 1)));
|
|
199
115
|
|
|
200
116
|
if (offsetBefore.compareTo(offsetAfter) > 0) {
|
|
201
|
-
return
|
|
117
|
+
return core.ZoneOffsetTransition.of(ldtBefore, offsetBefore, offsetAfter);
|
|
202
118
|
} else {
|
|
203
|
-
return
|
|
119
|
+
return core.ZoneOffsetTransition.of(ldtAfter, offsetBefore, offsetAfter);
|
|
204
120
|
}
|
|
205
121
|
}
|
|
206
122
|
|
|
207
|
-
return
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
value: function _offsetByIndexInSeconds(index) {
|
|
123
|
+
return core.ZoneOffset.ofTotalSeconds(this._offsetByIndexInSeconds(offsetIndex));
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
_proto._offsetByIndexInSeconds = function _offsetByIndexInSeconds(index) {
|
|
212
127
|
return -offsetInSeconds(this._tzdbInfo.offsets[index]);
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
value: function validOffsets(localDateTime) {
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
_proto.validOffsets = function validOffsets(localDateTime) {
|
|
217
131
|
var info = this._offsetInfo(localDateTime);
|
|
218
132
|
|
|
219
|
-
if (info instanceof
|
|
133
|
+
if (info instanceof core.ZoneOffsetTransition) {
|
|
220
134
|
return info.validOffsets();
|
|
221
135
|
}
|
|
222
136
|
|
|
223
137
|
return [info];
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
value: function transition(localDateTime) {
|
|
138
|
+
};
|
|
139
|
+
|
|
140
|
+
_proto.transition = function transition(localDateTime) {
|
|
228
141
|
var info = this._offsetInfo(localDateTime);
|
|
229
142
|
|
|
230
|
-
if (info instanceof
|
|
143
|
+
if (info instanceof core.ZoneOffsetTransition) {
|
|
231
144
|
return info;
|
|
232
145
|
}
|
|
233
146
|
|
|
234
147
|
return null;
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
value: function standardOffset(instant) {
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
_proto.standardOffset = function standardOffset(instant) {
|
|
239
151
|
notSupported('ZoneRules.standardOffset');
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
value: function daylightSavings(instant) {
|
|
152
|
+
};
|
|
153
|
+
|
|
154
|
+
_proto.daylightSavings = function daylightSavings(instant) {
|
|
244
155
|
notSupported('ZoneRules.daylightSavings');
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
value: function isDaylightSavings(instant) {
|
|
156
|
+
};
|
|
157
|
+
|
|
158
|
+
_proto.isDaylightSavings = function isDaylightSavings(instant) {
|
|
249
159
|
notSupported('ZoneRules.isDaylightSavings');
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
value: function isValidOffset(localDateTime, offset) {
|
|
160
|
+
};
|
|
161
|
+
|
|
162
|
+
_proto.isValidOffset = function isValidOffset(localDateTime, offset) {
|
|
254
163
|
return this.validOffsets(localDateTime).some(function (o) {
|
|
255
164
|
return o.equals(offset);
|
|
256
165
|
});
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
value: function nextTransition(instant) {
|
|
166
|
+
};
|
|
167
|
+
|
|
168
|
+
_proto.nextTransition = function nextTransition(instant) {
|
|
261
169
|
notSupported('ZoneRules.nextTransition');
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
value: function previousTransition(instant) {
|
|
170
|
+
};
|
|
171
|
+
|
|
172
|
+
_proto.previousTransition = function previousTransition(instant) {
|
|
266
173
|
notSupported('ZoneRules.previousTransition');
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
value: function transitions() {
|
|
174
|
+
};
|
|
175
|
+
|
|
176
|
+
_proto.transitions = function transitions() {
|
|
271
177
|
notSupported('ZoneRules.transitions');
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
value: function transitionRules() {
|
|
178
|
+
};
|
|
179
|
+
|
|
180
|
+
_proto.transitionRules = function transitionRules() {
|
|
276
181
|
notSupported('ZoneRules.transitionRules');
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
value: function equals(other) {
|
|
182
|
+
};
|
|
183
|
+
|
|
184
|
+
_proto.equals = function equals(other) {
|
|
281
185
|
if (this === other) {
|
|
282
186
|
return true;
|
|
283
187
|
}
|
|
@@ -287,469 +191,299 @@ var MomentZoneRules = function (_ZoneRules) {
|
|
|
287
191
|
}
|
|
288
192
|
|
|
289
193
|
return false;
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
value: function toString() {
|
|
194
|
+
};
|
|
195
|
+
|
|
196
|
+
_proto.toString = function toString() {
|
|
294
197
|
return this._tzdbInfo.name;
|
|
295
|
-
}
|
|
296
|
-
}]);
|
|
198
|
+
};
|
|
297
199
|
|
|
298
|
-
|
|
299
|
-
}(
|
|
200
|
+
return MomentZoneRules;
|
|
201
|
+
}(core.ZoneRules);
|
|
300
202
|
|
|
301
|
-
var LDTUntils = function () {
|
|
302
|
-
|
|
303
|
-
|
|
203
|
+
var LDTUntils = function () {
|
|
204
|
+
function LDTUntils(_tzdbUntils, tzdbOffsets) {
|
|
205
|
+
this._tzdbUntils = _tzdbUntils;
|
|
206
|
+
this._tzdbOffsets = tzdbOffsets;
|
|
207
|
+
this._ldtUntils = [];
|
|
208
|
+
this.size = this._tzdbUntils.length * 2;
|
|
209
|
+
}
|
|
304
210
|
|
|
305
|
-
|
|
306
|
-
this._tzdbOffsets = tzdbOffsets;
|
|
307
|
-
this._ldtUntils = [];
|
|
308
|
-
this.size = this._tzdbUntils.length * 2;
|
|
309
|
-
}
|
|
211
|
+
var _proto2 = LDTUntils.prototype;
|
|
310
212
|
|
|
311
|
-
|
|
312
|
-
key: "_generateTupple",
|
|
313
|
-
value: function _generateTupple(index) {
|
|
213
|
+
_proto2._generateTupple = function _generateTupple(index) {
|
|
314
214
|
var epochMillis = this._tzdbUntils[index];
|
|
315
215
|
|
|
316
216
|
if (epochMillis === Infinity) {
|
|
317
|
-
return [
|
|
217
|
+
return [core.LocalDateTime.MAX, core.LocalDateTime.MAX];
|
|
318
218
|
}
|
|
319
219
|
|
|
320
|
-
var instant =
|
|
220
|
+
var instant = core.Instant.ofEpochMilli(epochMillis);
|
|
321
221
|
var offset1 = offsetInSeconds(this._tzdbOffsets[index]);
|
|
322
|
-
var zone1 =
|
|
323
|
-
var ldt1 =
|
|
222
|
+
var zone1 = core.ZoneOffset.ofTotalSeconds(-offset1);
|
|
223
|
+
var ldt1 = core.LocalDateTime.ofInstant(instant, zone1);
|
|
324
224
|
var nextIndex = Math.min(index + 1, this._tzdbOffsets.length - 1);
|
|
325
225
|
var offset2 = offsetInSeconds(this._tzdbOffsets[nextIndex]);
|
|
326
|
-
var zone2 =
|
|
327
|
-
var ldt2 =
|
|
226
|
+
var zone2 = core.ZoneOffset.ofTotalSeconds(-offset2);
|
|
227
|
+
var ldt2 = core.LocalDateTime.ofInstant(instant, zone2);
|
|
328
228
|
|
|
329
229
|
if (offset1 > offset2) {
|
|
330
230
|
return [ldt1, ldt2];
|
|
331
231
|
} else {
|
|
332
232
|
return [ldt2, ldt1];
|
|
333
233
|
}
|
|
334
|
-
}
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
value: function _getTupple(index) {
|
|
234
|
+
};
|
|
235
|
+
|
|
236
|
+
_proto2._getTupple = function _getTupple(index) {
|
|
338
237
|
if (this._ldtUntils[index] == null) {
|
|
339
238
|
this._ldtUntils[index] = this._generateTupple(index);
|
|
340
239
|
}
|
|
341
240
|
|
|
342
241
|
return this._ldtUntils[index];
|
|
343
|
-
}
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
value: function get(index) {
|
|
242
|
+
};
|
|
243
|
+
|
|
244
|
+
_proto2.get = function get(index) {
|
|
347
245
|
var ldtTupple = this._getTupple(index >> 1);
|
|
348
246
|
|
|
349
247
|
return ldtTupple[index % 2];
|
|
350
|
-
}
|
|
351
|
-
}]);
|
|
248
|
+
};
|
|
352
249
|
|
|
353
|
-
|
|
354
|
-
}();
|
|
250
|
+
return LDTUntils;
|
|
251
|
+
}();
|
|
355
252
|
|
|
356
|
-
function ldtBinarySearch(array, value) {
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
253
|
+
function ldtBinarySearch(array, value) {
|
|
254
|
+
var hi = array.size - 1,
|
|
255
|
+
lo = -1,
|
|
256
|
+
mid;
|
|
360
257
|
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
258
|
+
while (hi - lo > 1) {
|
|
259
|
+
if (!value.isBefore(array.get(mid = hi + lo >> 1))) {
|
|
260
|
+
lo = mid;
|
|
261
|
+
} else {
|
|
262
|
+
hi = mid;
|
|
263
|
+
}
|
|
366
264
|
}
|
|
367
|
-
}
|
|
368
265
|
|
|
369
|
-
|
|
370
|
-
}
|
|
371
|
-
|
|
372
|
-
function offsetInSeconds(tzdbOffset) {
|
|
373
|
-
return roundDown(+tzdbOffset * 60);
|
|
374
|
-
}
|
|
375
|
-
|
|
376
|
-
function roundDown(r) {
|
|
377
|
-
if (r < 0) {
|
|
378
|
-
return Math.ceil(r);
|
|
379
|
-
} else {
|
|
380
|
-
return Math.floor(r);
|
|
266
|
+
return hi;
|
|
381
267
|
}
|
|
382
|
-
}
|
|
383
268
|
|
|
384
|
-
function
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
mid;
|
|
269
|
+
function offsetInSeconds(tzdbOffset) {
|
|
270
|
+
return roundDown(+tzdbOffset * 60);
|
|
271
|
+
}
|
|
388
272
|
|
|
389
|
-
|
|
390
|
-
if (
|
|
391
|
-
|
|
273
|
+
function roundDown(r) {
|
|
274
|
+
if (r < 0) {
|
|
275
|
+
return Math.ceil(r);
|
|
392
276
|
} else {
|
|
393
|
-
|
|
277
|
+
return Math.floor(r);
|
|
394
278
|
}
|
|
395
279
|
}
|
|
396
280
|
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
throw new Error("not supported: ".concat(msg));
|
|
402
|
-
}
|
|
403
|
-
|
|
404
|
-
/***/ }),
|
|
405
|
-
|
|
406
|
-
/***/ "./src/MomentZoneRulesProvider.js":
|
|
407
|
-
/*!****************************************!*\
|
|
408
|
-
!*** ./src/MomentZoneRulesProvider.js ***!
|
|
409
|
-
\****************************************/
|
|
410
|
-
/*! exports provided: MomentZoneRulesProvider */
|
|
411
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
412
|
-
|
|
413
|
-
"use strict";
|
|
414
|
-
__webpack_require__.r(__webpack_exports__);
|
|
415
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MomentZoneRulesProvider", function() { return MomentZoneRulesProvider; });
|
|
416
|
-
/* harmony import */ var _js_joda_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @js-joda/core */ "@js-joda/core");
|
|
417
|
-
/* harmony import */ var _js_joda_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__);
|
|
418
|
-
/* harmony import */ var _MomentZoneRules__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./MomentZoneRules */ "./src/MomentZoneRules.js");
|
|
419
|
-
/* harmony import */ var _unpack__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./unpack */ "./src/unpack.js");
|
|
420
|
-
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
281
|
+
function binarySearch(array, value) {
|
|
282
|
+
var hi = array.length - 1,
|
|
283
|
+
lo = -1,
|
|
284
|
+
mid;
|
|
421
285
|
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
286
|
+
while (hi - lo > 1) {
|
|
287
|
+
if (array[mid = hi + lo >> 1] <= value) {
|
|
288
|
+
lo = mid;
|
|
289
|
+
} else {
|
|
290
|
+
hi = mid;
|
|
291
|
+
}
|
|
292
|
+
}
|
|
427
293
|
|
|
428
|
-
|
|
294
|
+
return hi;
|
|
295
|
+
}
|
|
429
296
|
|
|
430
|
-
function
|
|
297
|
+
function notSupported(msg) {
|
|
298
|
+
throw new Error("not supported: " + msg);
|
|
299
|
+
}
|
|
431
300
|
|
|
432
|
-
function
|
|
301
|
+
function charCodeToInt(charCode) {
|
|
302
|
+
if (charCode > 96) {
|
|
303
|
+
return charCode - 87;
|
|
304
|
+
} else if (charCode > 64) {
|
|
305
|
+
return charCode - 29;
|
|
306
|
+
}
|
|
433
307
|
|
|
434
|
-
|
|
308
|
+
return charCode - 48;
|
|
309
|
+
}
|
|
435
310
|
|
|
436
|
-
function
|
|
311
|
+
function unpackBase60(string) {
|
|
312
|
+
var i = 0,
|
|
313
|
+
parts = string.split('.'),
|
|
314
|
+
whole = parts[0],
|
|
315
|
+
fractional = parts[1] || '',
|
|
316
|
+
multiplier = 1,
|
|
317
|
+
num,
|
|
318
|
+
out = 0,
|
|
319
|
+
sign = 1;
|
|
320
|
+
|
|
321
|
+
if (string.charCodeAt(0) === 45) {
|
|
322
|
+
i = 1;
|
|
323
|
+
sign = -1;
|
|
324
|
+
}
|
|
437
325
|
|
|
438
|
-
|
|
326
|
+
for (i; i < whole.length; i++) {
|
|
327
|
+
num = charCodeToInt(whole.charCodeAt(i));
|
|
328
|
+
out = 60 * out + num;
|
|
329
|
+
}
|
|
439
330
|
|
|
440
|
-
|
|
331
|
+
for (i = 0; i < fractional.length; i++) {
|
|
332
|
+
multiplier = multiplier / 60;
|
|
333
|
+
num = charCodeToInt(fractional.charCodeAt(i));
|
|
334
|
+
out += num * multiplier;
|
|
335
|
+
}
|
|
441
336
|
|
|
442
|
-
|
|
337
|
+
return out * sign;
|
|
338
|
+
}
|
|
443
339
|
|
|
444
|
-
function
|
|
340
|
+
function arrayToInt(array) {
|
|
341
|
+
for (var i = 0; i < array.length; i++) {
|
|
342
|
+
array[i] = unpackBase60(array[i]);
|
|
343
|
+
}
|
|
344
|
+
}
|
|
445
345
|
|
|
446
|
-
function
|
|
346
|
+
function intToUntil(array, length) {
|
|
347
|
+
for (var i = 0; i < length; i++) {
|
|
348
|
+
array[i] = Math.round((array[i - 1] || 0) + array[i] * 60000);
|
|
349
|
+
}
|
|
447
350
|
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
* @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
|
|
451
|
-
* @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
|
|
452
|
-
*/
|
|
351
|
+
array[length - 1] = Infinity;
|
|
352
|
+
}
|
|
453
353
|
|
|
354
|
+
function mapIndices(source, indices) {
|
|
355
|
+
var out = [],
|
|
356
|
+
i;
|
|
454
357
|
|
|
358
|
+
for (i = 0; i < indices.length; i++) {
|
|
359
|
+
out[i] = source[indices[i]];
|
|
360
|
+
}
|
|
455
361
|
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
var AVAILABLE_ZONE_IDS = [];
|
|
459
|
-
var zones = {};
|
|
460
|
-
var links = {};
|
|
461
|
-
var MomentZoneRulesProvider = function (_ZoneRulesProvider) {
|
|
462
|
-
_inherits(MomentZoneRulesProvider, _ZoneRulesProvider);
|
|
362
|
+
return out;
|
|
363
|
+
}
|
|
463
364
|
|
|
464
|
-
|
|
365
|
+
function unpack(string) {
|
|
366
|
+
var data = string.split('|'),
|
|
367
|
+
offsets = data[2].split(' '),
|
|
368
|
+
indices = data[3].split(''),
|
|
369
|
+
untils = data[4].split(' ');
|
|
370
|
+
arrayToInt(offsets);
|
|
371
|
+
arrayToInt(indices);
|
|
372
|
+
arrayToInt(untils);
|
|
373
|
+
intToUntil(untils, indices.length);
|
|
374
|
+
return {
|
|
375
|
+
name: data[0],
|
|
376
|
+
abbrs: mapIndices(data[1].split(' '), indices),
|
|
377
|
+
offsets: mapIndices(offsets, indices),
|
|
378
|
+
untils: untils,
|
|
379
|
+
population: data[5] | 0
|
|
380
|
+
};
|
|
381
|
+
}
|
|
465
382
|
|
|
466
|
-
|
|
467
|
-
|
|
383
|
+
var TZDB_DATA;
|
|
384
|
+
var TZDB_VERSION;
|
|
385
|
+
var AVAILABLE_ZONE_IDS = [];
|
|
386
|
+
var zones = {};
|
|
387
|
+
var links = {};
|
|
388
|
+
var MomentZoneRulesProvider = function (_ZoneRulesProvider) {
|
|
389
|
+
_inheritsLoose(MomentZoneRulesProvider, _ZoneRulesProvider);
|
|
468
390
|
|
|
469
|
-
|
|
470
|
-
|
|
391
|
+
function MomentZoneRulesProvider() {
|
|
392
|
+
return _ZoneRulesProvider.apply(this, arguments) || this;
|
|
393
|
+
}
|
|
471
394
|
|
|
472
|
-
|
|
473
|
-
key: "getRules",
|
|
474
|
-
value: function getRules(zoneId) {
|
|
395
|
+
MomentZoneRulesProvider.getRules = function getRules(zoneId) {
|
|
475
396
|
var tzdbZoneInfo = zones[links[zoneId]];
|
|
476
397
|
|
|
477
398
|
if (tzdbZoneInfo == null) {
|
|
478
|
-
throw new
|
|
399
|
+
throw new core.DateTimeException("Unknown time-zone ID: " + zoneId);
|
|
479
400
|
}
|
|
480
401
|
|
|
481
|
-
return new
|
|
482
|
-
}
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
value: function getAvailableZoneIds() {
|
|
402
|
+
return new MomentZoneRules(tzdbZoneInfo);
|
|
403
|
+
};
|
|
404
|
+
|
|
405
|
+
MomentZoneRulesProvider.getAvailableZoneIds = function getAvailableZoneIds() {
|
|
486
406
|
return AVAILABLE_ZONE_IDS;
|
|
487
|
-
}
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
value: function getVersion() {
|
|
407
|
+
};
|
|
408
|
+
|
|
409
|
+
MomentZoneRulesProvider.getVersion = function getVersion() {
|
|
491
410
|
return TZDB_VERSION;
|
|
492
|
-
}
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
value: function getTzdbData() {
|
|
411
|
+
};
|
|
412
|
+
|
|
413
|
+
MomentZoneRulesProvider.getTzdbData = function getTzdbData() {
|
|
496
414
|
return TZDB_DATA;
|
|
497
|
-
}
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
value: function loadTzdbData(packedJson) {
|
|
415
|
+
};
|
|
416
|
+
|
|
417
|
+
MomentZoneRulesProvider.loadTzdbData = function loadTzdbData(packedJson) {
|
|
501
418
|
TZDB_DATA = packedJson;
|
|
502
419
|
TZDB_VERSION = packedJson.version;
|
|
503
420
|
|
|
504
|
-
var _iterator =
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
var tzdbZoneInfo = Object(_unpack__WEBPACK_IMPORTED_MODULE_2__["unpack"])(packedZoneInfo);
|
|
511
|
-
AVAILABLE_ZONE_IDS.push(tzdbZoneInfo.name);
|
|
512
|
-
zones[tzdbZoneInfo.name] = tzdbZoneInfo;
|
|
513
|
-
links[tzdbZoneInfo.name] = tzdbZoneInfo.name;
|
|
514
|
-
}
|
|
515
|
-
} catch (err) {
|
|
516
|
-
_iterator.e(err);
|
|
517
|
-
} finally {
|
|
518
|
-
_iterator.f();
|
|
421
|
+
for (var _iterator = _createForOfIteratorHelperLoose(packedJson.zones), _step; !(_step = _iterator()).done;) {
|
|
422
|
+
var packedZoneInfo = _step.value;
|
|
423
|
+
var tzdbZoneInfo = unpack(packedZoneInfo);
|
|
424
|
+
AVAILABLE_ZONE_IDS.push(tzdbZoneInfo.name);
|
|
425
|
+
zones[tzdbZoneInfo.name] = tzdbZoneInfo;
|
|
426
|
+
links[tzdbZoneInfo.name] = tzdbZoneInfo.name;
|
|
519
427
|
}
|
|
520
428
|
|
|
521
|
-
var _iterator2 =
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
var packedLink = _step2.value;
|
|
527
|
-
var link = packedLink.split('|');
|
|
528
|
-
AVAILABLE_ZONE_IDS.push(link[1]);
|
|
529
|
-
links[link[1]] = link[0];
|
|
530
|
-
}
|
|
531
|
-
} catch (err) {
|
|
532
|
-
_iterator2.e(err);
|
|
533
|
-
} finally {
|
|
534
|
-
_iterator2.f();
|
|
429
|
+
for (var _iterator2 = _createForOfIteratorHelperLoose(packedJson.links), _step2; !(_step2 = _iterator2()).done;) {
|
|
430
|
+
var packedLink = _step2.value;
|
|
431
|
+
var link = packedLink.split('|');
|
|
432
|
+
AVAILABLE_ZONE_IDS.push(link[1]);
|
|
433
|
+
links[link[1]] = link[0];
|
|
535
434
|
}
|
|
536
|
-
}
|
|
537
|
-
}]);
|
|
538
|
-
|
|
539
|
-
return MomentZoneRulesProvider;
|
|
540
|
-
}(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ZoneRulesProvider"]);
|
|
541
|
-
|
|
542
|
-
/***/ }),
|
|
543
|
-
|
|
544
|
-
/***/ "./src/auto-plug.js":
|
|
545
|
-
/*!**************************!*\
|
|
546
|
-
!*** ./src/auto-plug.js ***!
|
|
547
|
-
\**************************/
|
|
548
|
-
/*! exports provided: default */
|
|
549
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
550
|
-
|
|
551
|
-
"use strict";
|
|
552
|
-
__webpack_require__.r(__webpack_exports__);
|
|
553
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return autoPlug; });
|
|
554
|
-
/* harmony import */ var _js_joda_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @js-joda/core */ "@js-joda/core");
|
|
555
|
-
/* harmony import */ var _js_joda_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__);
|
|
556
|
-
/* harmony import */ var _plug__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./plug */ "./src/plug.js");
|
|
557
|
-
/*
|
|
558
|
-
* @copyright (c) 2016-present, Philipp Thürwächter, Pattrick Hüper
|
|
559
|
-
* @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
|
|
560
|
-
*/
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
function autoPlug() {
|
|
564
|
-
Object(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["use"])(_plug__WEBPACK_IMPORTED_MODULE_1__["default"]);
|
|
565
|
-
}
|
|
566
|
-
|
|
567
|
-
/***/ }),
|
|
568
|
-
|
|
569
|
-
/***/ "./src/js-joda-timezone-empty.js":
|
|
570
|
-
/*!***************************************!*\
|
|
571
|
-
!*** ./src/js-joda-timezone-empty.js ***!
|
|
572
|
-
\***************************************/
|
|
573
|
-
/*! no exports provided */
|
|
574
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
575
|
-
|
|
576
|
-
"use strict";
|
|
577
|
-
__webpack_require__.r(__webpack_exports__);
|
|
578
|
-
/* harmony import */ var _auto_plug__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./auto-plug */ "./src/auto-plug.js");
|
|
579
|
-
/*
|
|
580
|
-
* @copyright (c) 2016-present, Philipp Thürwächter, Pattrick Hüper
|
|
581
|
-
* @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
|
|
582
|
-
*/
|
|
583
|
-
|
|
584
|
-
Object(_auto_plug__WEBPACK_IMPORTED_MODULE_0__["default"])();
|
|
585
|
-
|
|
586
|
-
/***/ }),
|
|
587
|
-
|
|
588
|
-
/***/ "./src/plug.js":
|
|
589
|
-
/*!*********************!*\
|
|
590
|
-
!*** ./src/plug.js ***!
|
|
591
|
-
\*********************/
|
|
592
|
-
/*! exports provided: default */
|
|
593
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
594
|
-
|
|
595
|
-
"use strict";
|
|
596
|
-
__webpack_require__.r(__webpack_exports__);
|
|
597
|
-
/* harmony import */ var _MomentZoneRulesProvider__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./MomentZoneRulesProvider */ "./src/MomentZoneRulesProvider.js");
|
|
598
|
-
/* harmony import */ var _system_default_zone__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./system-default-zone */ "./src/system-default-zone.js");
|
|
599
|
-
/*
|
|
600
|
-
* @copyright (c) 2016-present, Philipp Thürwächter, Pattrick Hüper
|
|
601
|
-
* @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
|
|
602
|
-
*/
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
/* harmony default export */ __webpack_exports__["default"] = (function (jsJoda) {
|
|
606
|
-
jsJoda.ZoneRulesProvider.getRules = _MomentZoneRulesProvider__WEBPACK_IMPORTED_MODULE_0__["MomentZoneRulesProvider"].getRules;
|
|
607
|
-
jsJoda.ZoneRulesProvider.getAvailableZoneIds = _MomentZoneRulesProvider__WEBPACK_IMPORTED_MODULE_0__["MomentZoneRulesProvider"].getAvailableZoneIds;
|
|
608
|
-
jsJoda.ZoneRulesProvider.getTzdbData = _MomentZoneRulesProvider__WEBPACK_IMPORTED_MODULE_0__["MomentZoneRulesProvider"].getTzdbData;
|
|
609
|
-
jsJoda.ZoneRulesProvider.loadTzdbData = _MomentZoneRulesProvider__WEBPACK_IMPORTED_MODULE_0__["MomentZoneRulesProvider"].loadTzdbData;
|
|
610
|
-
Object(_system_default_zone__WEBPACK_IMPORTED_MODULE_1__["default"])(jsJoda.ZoneId);
|
|
611
|
-
return jsJoda;
|
|
612
|
-
});
|
|
613
|
-
|
|
614
|
-
/***/ }),
|
|
615
|
-
|
|
616
|
-
/***/ "./src/system-default-zone.js":
|
|
617
|
-
/*!************************************!*\
|
|
618
|
-
!*** ./src/system-default-zone.js ***!
|
|
619
|
-
\************************************/
|
|
620
|
-
/*! exports provided: default */
|
|
621
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
622
|
-
|
|
623
|
-
"use strict";
|
|
624
|
-
__webpack_require__.r(__webpack_exports__);
|
|
625
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return extendSystemDefaultZoneId; });
|
|
626
|
-
function getResolvedZoneId(ZoneId) {
|
|
627
|
-
try {
|
|
628
|
-
var resolvedTimeZone = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
629
|
-
return ZoneId.of(resolvedTimeZone);
|
|
630
|
-
} catch (err) {}
|
|
631
|
-
|
|
632
|
-
return null;
|
|
633
|
-
}
|
|
634
|
-
|
|
635
|
-
function extendSystemDefaultZoneId(ZoneId) {
|
|
636
|
-
var resolvedZoneId = getResolvedZoneId(ZoneId);
|
|
637
|
-
|
|
638
|
-
if (resolvedZoneId == null) {
|
|
639
|
-
return;
|
|
640
|
-
}
|
|
435
|
+
};
|
|
641
436
|
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
};
|
|
645
|
-
}
|
|
646
|
-
|
|
647
|
-
/***/ }),
|
|
648
|
-
|
|
649
|
-
/***/ "./src/unpack.js":
|
|
650
|
-
/*!***********************!*\
|
|
651
|
-
!*** ./src/unpack.js ***!
|
|
652
|
-
\***********************/
|
|
653
|
-
/*! exports provided: unpack */
|
|
654
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
655
|
-
|
|
656
|
-
"use strict";
|
|
657
|
-
__webpack_require__.r(__webpack_exports__);
|
|
658
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "unpack", function() { return unpack; });
|
|
659
|
-
function charCodeToInt(charCode) {
|
|
660
|
-
if (charCode > 96) {
|
|
661
|
-
return charCode - 87;
|
|
662
|
-
} else if (charCode > 64) {
|
|
663
|
-
return charCode - 29;
|
|
664
|
-
}
|
|
437
|
+
return MomentZoneRulesProvider;
|
|
438
|
+
}(core.ZoneRulesProvider);
|
|
665
439
|
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
parts = string.split('.'),
|
|
672
|
-
whole = parts[0],
|
|
673
|
-
fractional = parts[1] || '',
|
|
674
|
-
multiplier = 1,
|
|
675
|
-
num,
|
|
676
|
-
out = 0,
|
|
677
|
-
sign = 1;
|
|
678
|
-
|
|
679
|
-
if (string.charCodeAt(0) === 45) {
|
|
680
|
-
i = 1;
|
|
681
|
-
sign = -1;
|
|
682
|
-
}
|
|
440
|
+
function getResolvedZoneId(ZoneId) {
|
|
441
|
+
try {
|
|
442
|
+
var resolvedTimeZone = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
443
|
+
return ZoneId.of(resolvedTimeZone);
|
|
444
|
+
} catch (err) {}
|
|
683
445
|
|
|
684
|
-
|
|
685
|
-
num = charCodeToInt(whole.charCodeAt(i));
|
|
686
|
-
out = 60 * out + num;
|
|
446
|
+
return null;
|
|
687
447
|
}
|
|
688
448
|
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
num = charCodeToInt(fractional.charCodeAt(i));
|
|
692
|
-
out += num * multiplier;
|
|
693
|
-
}
|
|
449
|
+
function extendSystemDefaultZoneId(ZoneId) {
|
|
450
|
+
var resolvedZoneId = getResolvedZoneId(ZoneId);
|
|
694
451
|
|
|
695
|
-
|
|
696
|
-
|
|
452
|
+
if (resolvedZoneId == null) {
|
|
453
|
+
return;
|
|
454
|
+
}
|
|
697
455
|
|
|
698
|
-
function
|
|
699
|
-
|
|
700
|
-
|
|
456
|
+
ZoneId.systemDefault = function () {
|
|
457
|
+
return resolvedZoneId;
|
|
458
|
+
};
|
|
701
459
|
}
|
|
702
|
-
}
|
|
703
460
|
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
461
|
+
/*
|
|
462
|
+
* @copyright (c) 2016-present, Philipp Thürwächter, Pattrick Hüper
|
|
463
|
+
* @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
|
|
464
|
+
*/
|
|
465
|
+
function plug (jsJoda) {
|
|
466
|
+
jsJoda.ZoneRulesProvider.getRules = MomentZoneRulesProvider.getRules;
|
|
467
|
+
jsJoda.ZoneRulesProvider.getAvailableZoneIds = MomentZoneRulesProvider.getAvailableZoneIds;
|
|
468
|
+
jsJoda.ZoneRulesProvider.getTzdbData = MomentZoneRulesProvider.getTzdbData;
|
|
469
|
+
jsJoda.ZoneRulesProvider.loadTzdbData = MomentZoneRulesProvider.loadTzdbData;
|
|
470
|
+
extendSystemDefaultZoneId(jsJoda.ZoneId);
|
|
471
|
+
return jsJoda;
|
|
707
472
|
}
|
|
708
473
|
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
for (i = 0; i < indices.length; i++) {
|
|
717
|
-
out[i] = source[indices[i]];
|
|
474
|
+
/*
|
|
475
|
+
* @copyright (c) 2016-present, Philipp Thürwächter, Pattrick Hüper
|
|
476
|
+
* @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
|
|
477
|
+
*/
|
|
478
|
+
function autoPlug() {
|
|
479
|
+
core.use(plug);
|
|
718
480
|
}
|
|
719
481
|
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
arrayToInt(offsets);
|
|
729
|
-
arrayToInt(indices);
|
|
730
|
-
arrayToInt(untils);
|
|
731
|
-
intToUntil(untils, indices.length);
|
|
732
|
-
return {
|
|
733
|
-
name: data[0],
|
|
734
|
-
abbrs: mapIndices(data[1].split(' '), indices),
|
|
735
|
-
offsets: mapIndices(offsets, indices),
|
|
736
|
-
untils: untils,
|
|
737
|
-
population: data[5] | 0
|
|
738
|
-
};
|
|
739
|
-
}
|
|
740
|
-
|
|
741
|
-
/***/ }),
|
|
742
|
-
|
|
743
|
-
/***/ "@js-joda/core":
|
|
744
|
-
/*!***************************************************************************************************************!*\
|
|
745
|
-
!*** external {"amd":"@js-joda/core","commonjs":"@js-joda/core","commonjs2":"@js-joda/core","root":"JSJoda"} ***!
|
|
746
|
-
\***************************************************************************************************************/
|
|
747
|
-
/*! no static exports found */
|
|
748
|
-
/***/ (function(module, exports) {
|
|
749
|
-
|
|
750
|
-
module.exports = __WEBPACK_EXTERNAL_MODULE__js_joda_core__;
|
|
751
|
-
|
|
752
|
-
/***/ })
|
|
753
|
-
|
|
754
|
-
/******/ });
|
|
755
|
-
});
|
|
482
|
+
/*
|
|
483
|
+
* @copyright (c) 2016-present, Philipp Thürwächter, Pattrick Hüper
|
|
484
|
+
* @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
|
|
485
|
+
*/
|
|
486
|
+
autoPlug();
|
|
487
|
+
|
|
488
|
+
}));
|
|
489
|
+
//# sourceMappingURL=js-joda-timezone-empty.js.map
|