Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4821.js (118.4 MB)
109 lines
3.4 KiB
JavaScript
109 lines
3.4 KiB
JavaScript
// Module ID: 10592
|
|
// Function ID: 10593
|
|
// Dependencies: [41, 42, 93, 95, 98, 10559, 10562, 10563, 10579]
|
|
|
|
// Module 10592
|
|
import Filter from "Filter" /* 10579 */;
|
|
import _classCallCheck from "_classCallCheck" /* 41 */;
|
|
import _createClass from "_createClass" /* 42 */;
|
|
import c3 from "_possibleConstructorReturn" /* 93 */;
|
|
import _getPrototypeOf from "_getPrototypeOf" /* 95 */;
|
|
import _inherits from "_inherits" /* 98 */;
|
|
|
|
const ENMergeRelativeFollowByDateRefiner = require;
|
|
function _isNativeReflectConstruct() {
|
|
try {
|
|
const _Boolean = Boolean;
|
|
const call = valueOf.call;
|
|
const _Reflect = Reflect;
|
|
const _Boolean2 = Boolean;
|
|
if (typeof call === "unknown") {
|
|
let callResult = valueOf();
|
|
} else {
|
|
callResult = call(constructResult);
|
|
}
|
|
closure_0 = !callResult;
|
|
_isNativeReflectConstruct = function _isNativeReflectConstruct() {
|
|
return closure_0;
|
|
};
|
|
return _isNativeReflectConstruct();
|
|
} catch (err) {
|
|
}
|
|
}
|
|
class ENMergeRelativeFollowByDateRefiner {
|
|
constructor() {
|
|
self = this;
|
|
tmp = c2(this, ENMergeRelativeFollowByDateRefiner);
|
|
tmp2 = closure_4;
|
|
obj = closure_4(ENMergeRelativeFollowByDateRefiner);
|
|
tmp3 = closure_3;
|
|
if (hasOwnProperty()) {
|
|
tmp7 = globalThis;
|
|
_Reflect = Reflect;
|
|
tmp8 = arguments;
|
|
constructResult = Reflect.construct(obj, arguments, tmp2(self).constructor);
|
|
} else {
|
|
tmp4 = arguments;
|
|
tmp5 = arguments;
|
|
constructResult = obj(...arguments);
|
|
}
|
|
return tmp3(self, constructResult);
|
|
}
|
|
}
|
|
_inherits(ENMergeRelativeFollowByDateRefiner, Filter.MergingRefiner);
|
|
const entry = {
|
|
key: "patternBetween",
|
|
value: function patternBetween() {
|
|
return /^\s*$/i;
|
|
}
|
|
};
|
|
const items = [
|
|
entry,
|
|
{
|
|
key: "shouldMergeResults",
|
|
value: function shouldMergeResults(str, text, start) {
|
|
let match = str.match(this.patternBetween());
|
|
if (match) {
|
|
const tmp4 = null != text.text.match(/\s+(before|from)$/i);
|
|
let tmp5 = !tmp4;
|
|
if (!tmp4) {
|
|
tmp5 = null == text.text.match(/\s+(after|since)$/i);
|
|
}
|
|
let tmp6 = !tmp5;
|
|
if (!tmp5) {
|
|
start = start.start;
|
|
value = start.get("day");
|
|
if (value) {
|
|
const start2 = start.start;
|
|
value = start2.get("month");
|
|
}
|
|
if (value) {
|
|
const start3 = start.start;
|
|
value = start3.get("year");
|
|
}
|
|
tmp6 = value;
|
|
}
|
|
match = tmp6;
|
|
str = text.text;
|
|
}
|
|
return match;
|
|
}
|
|
},
|
|
{
|
|
key: "mergeResults",
|
|
value: function mergeResults(arg0, text, start) {
|
|
const parseDurationResult = ENMergeRelativeFollowByDateRefiner(10559).parseDuration(text.text);
|
|
let reverseDurationResult = parseDurationResult;
|
|
if (null != str.match(/\s+(before|from)$/i)) {
|
|
reverseDurationResult = tmp(10562).reverseDuration(parseDurationResult);
|
|
}
|
|
const ParsingComponents = tmp(10563).ParsingComponents;
|
|
const ReferenceWithTimezone = tmp(10563).ReferenceWithTimezone;
|
|
start = start.start;
|
|
const relativeFromReference = ParsingComponents.createRelativeFromReference(ReferenceWithTimezone.fromDate(start.date()), reverseDurationResult);
|
|
return new ENMergeRelativeFollowByDateRefiner(10563).ParsingResult(start.reference, text.index, "" + text.text + arg0 + start.text, relativeFromReference);
|
|
}
|
|
}
|
|
];
|
|
|
|
export default _createClass(ENMergeRelativeFollowByDateRefiner, items);
|