Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4821.js (118.4 MB)
124 lines
4.3 KiB
JavaScript
124 lines
4.3 KiB
JavaScript
// Module ID: 10611
|
|
// Function ID: 10612
|
|
// Dependencies: [41, 42, 93, 95, 98, 10566, 10565, 10567]
|
|
|
|
// Module 10611
|
|
import AbstractParserWithWordBoundaryChecking from "AbstractParserWithWordBoundaryChecking" /* 10567 */;
|
|
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 DECasualTimeParser = 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 DECasualTimeParser {
|
|
constructor() {
|
|
self = this;
|
|
tmp = c2(this, DECasualTimeParser);
|
|
tmp2 = closure_4;
|
|
obj = closure_4(DECasualTimeParser);
|
|
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(DECasualTimeParser, AbstractParserWithWordBoundaryChecking.AbstractParserWithWordBoundaryChecking);
|
|
const entry = {
|
|
key: "innerPattern",
|
|
value: function innerPattern(arg0) {
|
|
return /(diesen)?\s*(morgen|vormittag|mittags?|nachmittag|abend|nacht|mitternacht)(?=\W|$)/i;
|
|
}
|
|
};
|
|
const items = [
|
|
entry,
|
|
{
|
|
key: "innerExtract",
|
|
value: function innerExtract(createParsingComponents, arg1) {
|
|
const formatted = arg1[2].toLowerCase();
|
|
const parsingComponents = createParsingComponents.createParsingComponents();
|
|
DECasualTimeParser(10566).implySimilarTime(parsingComponents, createParsingComponents.refDate);
|
|
return DECasualTimeParser.extractTimeComponents(parsingComponents, formatted);
|
|
}
|
|
}
|
|
];
|
|
const entry1 = {
|
|
key: "extractTimeComponents",
|
|
value: function extractTimeComponents(nowResult, formatted) {
|
|
if ("morgen" === formatted) {
|
|
nowResult.imply("hour", 6);
|
|
nowResult.imply("minute", 0);
|
|
nowResult.imply("second", 0);
|
|
nowResult.imply("meridiem", DECasualTimeParser(10565).Meridiem.AM);
|
|
} else if ("vormittag" === formatted) {
|
|
nowResult.imply("hour", 9);
|
|
nowResult.imply("minute", 0);
|
|
nowResult.imply("second", 0);
|
|
nowResult.imply("meridiem", DECasualTimeParser(10565).Meridiem.AM);
|
|
} else {
|
|
if ("mittag" !== formatted) {
|
|
if ("mittags" !== formatted) {
|
|
if ("nachmittag" === formatted) {
|
|
nowResult.imply("hour", 15);
|
|
nowResult.imply("minute", 0);
|
|
nowResult.imply("second", 0);
|
|
nowResult.imply("meridiem", DECasualTimeParser(10565).Meridiem.PM);
|
|
} else if ("abend" === formatted) {
|
|
nowResult.imply("hour", 18);
|
|
nowResult.imply("minute", 0);
|
|
nowResult.imply("second", 0);
|
|
nowResult.imply("meridiem", DECasualTimeParser(10565).Meridiem.PM);
|
|
} else if ("nacht" === formatted) {
|
|
nowResult.imply("hour", 22);
|
|
nowResult.imply("minute", 0);
|
|
nowResult.imply("second", 0);
|
|
nowResult.imply("meridiem", DECasualTimeParser(10565).Meridiem.PM);
|
|
} else if ("mitternacht" === formatted) {
|
|
if (nowResult.get("hour") > 1) {
|
|
nowResult.addDurationAsImplied({ day: 1 });
|
|
}
|
|
nowResult.imply("hour", 0);
|
|
nowResult.imply("minute", 0);
|
|
nowResult.imply("second", 0);
|
|
nowResult.imply("meridiem", DECasualTimeParser(10565).Meridiem.AM);
|
|
}
|
|
}
|
|
}
|
|
nowResult.imply("hour", 12);
|
|
nowResult.imply("minute", 0);
|
|
nowResult.imply("second", 0);
|
|
nowResult.imply("meridiem", DECasualTimeParser(10565).Meridiem.AM);
|
|
}
|
|
return nowResult;
|
|
}
|
|
};
|
|
const items1 = [entry1];
|
|
|
|
export default _createClass(DECasualTimeParser, items, items1);
|