100 lines
3.6 KiB
JavaScript
100 lines
3.6 KiB
JavaScript
// Module ID: 10585
|
|
// Function ID: 10586
|
|
// Name: _isNativeReflectConstruct
|
|
// Dependencies: [41, 42, 93, 95, 98, 10437, 10581, 10438, 10444]
|
|
|
|
// Module 10585 (_isNativeReflectConstruct)
|
|
import repeatedTimeunitPattern from "repeatedTimeunitPattern" /* 10437 */;
|
|
import AbstractParserWithWordBoundaryChecking from "AbstractParserWithWordBoundaryChecking" /* 10444 */;
|
|
import WEEKDAY_DICTIONARY from "WEEKDAY_DICTIONARY" /* 10581 */;
|
|
import closure_2 from "_classCallCheck" /* 41 */;
|
|
import _createClass from "_createClass" /* 42 */;
|
|
import closure_3 from "_possibleConstructorReturn" /* 93 */;
|
|
import closure_4 from "_getPrototypeOf" /* 95 */;
|
|
import _inherits from "_inherits" /* 98 */;
|
|
|
|
const ESMonthNameLittleEndianParser = 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) {
|
|
}
|
|
}
|
|
const regExp = new RegExp("([0-9]{1,2})(?:\u00BA|\u00AA|\u00B0)?(?:\\s*(?:desde|de|\\-|\\\u2013|ao?|\\s)\\s*([0-9]{1,2})(?:\u00BA|\u00AA|\u00B0)?)?\\s*(?:de)?\\s*(?:-|/|\\s*(?:de|,)?\\s*)(" + repeatedTimeunitPattern.matchAnyPattern(WEEKDAY_DICTIONARY.MONTH_DICTIONARY) + ")(?:\\s*(?:de|,)?\\s*(" + WEEKDAY_DICTIONARY.YEAR_PATTERN + "))?(?=\\W|$)", "i");
|
|
class ESMonthNameLittleEndianParser {
|
|
constructor() {
|
|
self = this;
|
|
tmp = closure_2(this, ESMonthNameLittleEndianParser);
|
|
tmp2 = closure_4;
|
|
obj = closure_4(ESMonthNameLittleEndianParser);
|
|
tmp3 = closure_3;
|
|
if (_isNativeReflectConstruct()) {
|
|
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(ESMonthNameLittleEndianParser, AbstractParserWithWordBoundaryChecking.AbstractParserWithWordBoundaryChecking);
|
|
const items = [
|
|
{
|
|
key: "innerPattern",
|
|
value: function innerPattern() {
|
|
return regExp;
|
|
}
|
|
},
|
|
{
|
|
key: "innerExtract",
|
|
value: function innerExtract(createParsingResult, index) {
|
|
const parsingResult = createParsingResult.createParsingResult(index.index, index[0]);
|
|
const tmp4 = ESMonthNameLittleEndianParser(10581).MONTH_DICTIONARY[index[3].toLowerCase(index[3])];
|
|
const parsed = parseInt(index[1]);
|
|
if (parsed > 31) {
|
|
index.index = index.index + index[1].length;
|
|
return null;
|
|
} else {
|
|
const start4 = parsingResult.start;
|
|
start4.assign("month", tmp4);
|
|
const start5 = parsingResult.start;
|
|
start5.assign("day", parsed);
|
|
if (index[4]) {
|
|
const start2 = parsingResult.start;
|
|
start2.assign("year", tmp2(10581).parseYear(index[4]));
|
|
} else {
|
|
const start = parsingResult.start;
|
|
start.imply("year", tmp2(10438).findYearClosestToRef(createParsingResult.refDate, parsed, tmp4));
|
|
}
|
|
if (index[2]) {
|
|
const _parseInt = parseInt;
|
|
const start3 = parsingResult.start;
|
|
const parsed1 = parseInt(index[2]);
|
|
parsingResult.end = start3.clone();
|
|
const end = parsingResult.end;
|
|
end.assign("day", parsed1);
|
|
}
|
|
return parsingResult;
|
|
}
|
|
}
|
|
}
|
|
];
|
|
|
|
export default _createClass(ESMonthNameLittleEndianParser, items);
|