decord/source/__polyfill/10xxx/module_10717.js
github-actions da5b5e5efe chore: update source for alpha 346.6
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4821.js (118.4 MB)
2026-09-12 13:45:10 +00:00

89 lines
2.9 KiB
JavaScript

// Module ID: 10717
// Function ID: 10718
// Dependencies: [41, 42, 93, 95, 98, 10560, 10714, 10561, 10716]
// Module 10717
import _mod10716 from "module_10716" /* 10716 */;
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 UkMonthNameParser = 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 UkMonthNameParser {
constructor() {
self = this;
tmp = c2(this, UkMonthNameParser);
tmp2 = closure_4;
obj = closure_4(UkMonthNameParser);
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(UkMonthNameParser, _mod10716.AbstractParserWithLeftBoundaryChecking);
const entry = {
key: "innerPatternString",
value: function innerPatternString(arg0) {
return "((?:\u0432|\u0443)\\s*)?(" + UkMonthNameParser(10560).matchAnyPattern(UkMonthNameParser(10714).MONTH_DICTIONARY) + ")\\s*(?:[,-]?\\s*(" + UkMonthNameParser(10714).YEAR_PATTERN + ")?)?(?=[^\\s\\w]|\\s+[^0-9]|\\s+$|$)";
}
};
const items = [
entry,
{
key: "innerExtract",
value: function innerExtract(createParsingResult, index) {
const formatted = index[2].toLowerCase();
if (index[0].length <= 3) {
if (!UkMonthNameParser(10714).FULL_MONTH_NAME_DICTIONARY[formatted]) {
return null;
}
}
const parsingResult = createParsingResult.createParsingResult(index.index, index.index + index[0].length);
const start = parsingResult.start;
start.imply("day", 1);
const tmp9 = UkMonthNameParser(10714).MONTH_DICTIONARY[formatted];
const start2 = parsingResult.start;
start2.assign("month", tmp9);
if (index[3]) {
const start4 = parsingResult.start;
start4.assign("year", tmp7(10714).parseYearPattern(index[3]));
} else {
const start3 = parsingResult.start;
start3.imply("year", tmp7(10561).findYearClosestToRef(createParsingResult.reference.instant, 1, tmp9));
}
return parsingResult;
}
}
];
export default _createClass(UkMonthNameParser, items);