Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4821.js (118.4 MB)
60 lines
1.8 KiB
JavaScript
60 lines
1.8 KiB
JavaScript
// Module ID: 10598
|
|
// Function ID: 10599
|
|
// Dependencies: [41, 42]
|
|
|
|
// Module 10598
|
|
import _classCallCheck_mod from "_classCallCheck" /* 41 */;
|
|
import _createClass from "_createClass" /* 42 */;
|
|
|
|
let _classCallCheck = _classCallCheck_mod;
|
|
const regExp = new RegExp("^\\s*(?:\\(?(?:GMT|UTC)\\s?)?([+-])(\\d{1,2})(?::?(\\d{2}))?\\)?", "i");
|
|
class ExtractTimezoneOffsetRefiner {
|
|
constructor() {
|
|
tmp = closure_0(this, ExtractTimezoneOffsetRefiner);
|
|
return;
|
|
}
|
|
}
|
|
_classCallCheck = ExtractTimezoneOffsetRefiner;
|
|
const entry = {
|
|
key: "refine",
|
|
value: function refine(arg0, arr) {
|
|
let text = arg0;
|
|
const item = arr.forEach((start) => {
|
|
text = start;
|
|
start = start.start;
|
|
if (!start.isCertain("timezoneOffset")) {
|
|
const match = regExp.exec(text.text.substring(start.index + start.text.length));
|
|
if (match) {
|
|
obj.debug(() => {
|
|
console.log("Extracting timezone: '" + match[0] + "' into : " + closure_0);
|
|
});
|
|
const _parseInt = parseInt;
|
|
let str2 = match[3];
|
|
const result = 60 * parseInt(match[2]);
|
|
if (!str2) {
|
|
str2 = "0";
|
|
}
|
|
const sum = result + parseInt(str2);
|
|
if (sum <= 840) {
|
|
let tmp7 = sum;
|
|
if ("-" === match[1]) {
|
|
tmp7 = -sum;
|
|
}
|
|
if (null != start.end) {
|
|
const end = start.end;
|
|
end.assign("timezoneOffset", tmp7);
|
|
}
|
|
const start2 = start.start;
|
|
start2.assign("timezoneOffset", tmp7);
|
|
start.text = start.text + match[0];
|
|
}
|
|
}
|
|
obj = text;
|
|
}
|
|
});
|
|
return arr;
|
|
}
|
|
};
|
|
const items = [entry];
|
|
|
|
export default _createClass(ExtractTimezoneOffsetRefiner, items);
|