// ==UserScript==
// @name switch520-auto-secret
// @description 让switch520变得丝滑无比:自动填写密码、下载按钮直达下载地址页、百度网盘自动填写密码 , 2.0版本连夜肝出了去Steam查看游戏评价功能
// @version 5.2.3
// @author Kane
// @match *://acgxj.com/*
// @match *://*.steamzg.com/*
// @match *://*.gamers520.com/*
// @match *://*.switch618.com/*
// @match *://*.gamer520.com/*
// @match *://download.gamer520.com/*
// @match *://download.espartasr.com/*
// @match *://download.freer.blog/*
// @match *://www.freer.blog/*
// @match *://*.xxxxx528.com/*
// @match *://www.efemovies.com/*
// @match *://www.espartasr.com/*
// @match *://www.piclabo.xyz/*
// @match *://like.gamer520.com/*
// @match *://pan.baidu.com/*
// @grant GM.registerMenuCommand
// @grant GM.getValue
// @grant GM.setValue
// @icon https://www.switch618.com/wp-content/uploads/2024/05/23154031569.webp
// @license MIT
// @namespace http://tampermonkey.net/
// @require https://unpkg.com/[email protected]/umd/react.production.min.js
// @require https://unpkg.com/[email protected]/umd/react-dom.production.min.js
// @require https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.21/lodash.min.js
// @require https://unpkg.com/[email protected]/dist/mobx.umd.production.min.js
// @require https://cdnjs.cloudflare.com/ajax/libs/dayjs/1.11.13/dayjs.min.js
// @require https://cdnjs.cloudflare.com/ajax/libs/antd/5.22.7/antd.min.js
// @resource antdCSS https://cdnjs.cloudflare.com/ajax/libs/antd/5.22.7/reset.min.css
// ==/UserScript==
/******/ (() => { // webpackBootstrap
/******/ var __webpack_modules__ = ({
/***/ "./node_modules/ansi-html-community/index.js":
/*!***************************************************!*\
!*** ./node_modules/ansi-html-community/index.js ***!
\***************************************************/
/***/ ((module) => {
"use strict";
module.exports = ansiHTML
// Reference to https://github.com/sindresorhus/ansi-regex
var _regANSI = /(?:(?:\u001b\[)|\u009b)(?:(?:[0-9]{1,3})?(?:(?:;[0-9]{0,3})*)?[A-M|f-m])|\u001b[A-M]/
var _defColors = {
reset: ['fff', '000'], // [FOREGROUD_COLOR, BACKGROUND_COLOR]
black: '000',
red: 'ff0000',
green: '209805',
yellow: 'e8bf03',
blue: '0000ff',
magenta: 'ff00ff',
cyan: '00ffee',
lightgrey: 'f0f0f0',
darkgrey: '888'
}
var _styles = {
30: 'black',
31: 'red',
32: 'green',
33: 'yellow',
34: 'blue',
35: 'magenta',
36: 'cyan',
37: 'lightgrey'
}
var _openTags = {
'1': 'font-weight:bold', // bold
'2': 'opacity:0.5', // dim
'3': '<i>', // italic
'4': '<u>', // underscore
'8': 'display:none', // hidden
'9': '<del>' // delete
}
var _closeTags = {
'23': '</i>', // reset italic
'24': '</u>', // reset underscore
'29': '</del>' // reset delete
}
;[0, 21, 22, 27, 28, 39, 49].forEach(function (n) {
_closeTags[n] = '</span>'
})
/**
* Converts text with ANSI color codes to HTML markup.
* @param {String} text
* @returns {*}
*/
function ansiHTML (text) {
// Returns the text if the string has no ANSI escape code.
if (!_regANSI.test(text)) {
return text
}
// Cache opened sequence.
var ansiCodes = []
// Replace with markup.
var ret = text.replace(/\033\[(\d+)m/g, function (match, seq) {
var ot = _openTags[seq]
if (ot) {
// If current sequence has been opened, close it.
if (!!~ansiCodes.indexOf(seq)) { // eslint-disable-line no-extra-boolean-cast
ansiCodes.pop()
return '</span>'
}
// Open tag.
ansiCodes.push(seq)
return ot[0] === '<' ? ot : '<span style="' + ot + ';">'
}
var ct = _closeTags[seq]
if (ct) {
// Pop sequence
ansiCodes.pop()
return ct
}
return ''
})
// Make sure tags are closed.
var l = ansiCodes.length
;(l > 0) && (ret += Array(l + 1).join('</span>'))
return ret
}
/**
* Customize colors.
* @param {Object} colors reference to _defColors
*/
ansiHTML.setColors = function (colors) {
if (typeof colors !== 'object') {
throw new Error('`colors` parameter must be an Object.')
}
var _finalColors = {}
for (var key in _defColors) {
var hex = colors.hasOwnProperty(key) ? colors[key] : null
if (!hex) {
_finalColors[key] = _defColors[key]
continue
}
if ('reset' === key) {
if (typeof hex === 'string') {
hex = [hex]
}
if (!Array.isArray(hex) || hex.length === 0 || hex.some(function (h) {
return typeof h !== 'string'
})) {
throw new Error('The value of `' + key + '` property must be an Array and each item could only be a hex string, e.g.: FF0000')
}
var defHexColor = _defColors[key]
if (!hex[0]) {
hex[0] = defHexColor[0]
}
if (hex.length === 1 || !hex[1]) {
hex = [hex[0]]
hex.push(defHexColor[1])
}
hex = hex.slice(0, 2)
} else if (typeof hex !== 'string') {
throw new Error('The value of `' + key + '` property must be a hex string, e.g.: FF0000')
}
_finalColors[key] = hex
}
_setTags(_finalColors)
}
/**
* Reset colors.
*/
ansiHTML.reset = function () {
_setTags(_defColors)
}
/**
* Expose tags, including open and close.
* @type {Object}
*/
ansiHTML.tags = {}
if (Object.defineProperty) {
Object.defineProperty(ansiHTML.tags, 'open', {
get: function () { return _openTags }
})
Object.defineProperty(ansiHTML.tags, 'close', {
get: function () { return _closeTags }
})
} else {
ansiHTML.tags.open = _openTags
ansiHTML.tags.close = _closeTags
}
function _setTags (colors) {
// reset all
_openTags['0'] = 'font-weight:normal;opacity:1;color:#' + colors.reset[0] + ';background:#' + colors.reset[1]
// inverse
_openTags['7'] = 'color:#' + colors.reset[1] + ';background:#' + colors.reset[0]
// dark grey
_openTags['90'] = 'color:#' + colors.darkgrey
for (var code in _styles) {
var color = _styles[code]
var oriColor = colors[color] || '000'
_openTags[code] = 'color:#' + oriColor
code = parseInt(code)
_openTags[(code + 10).toString()] = 'background:#' + oriColor
}
}
ansiHTML.reset()
/***/ }),
/***/ "./generic-services/utils/useMatchDomain/index.ts":
/*!********************************************************!*\
!*** ./generic-services/utils/useMatchDomain/index.ts ***!
\********************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ useMatchDomain: () => (/* binding */ useMatchDomain)
/* harmony export */ });
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ "lodash");
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__);
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, "catch": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
/**
* 如果匹配到域名则会执行回调
*/
var useMatchDomain = /*#__PURE__*/function () {
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(matcher, callback) {
var _matcher$regExp, _matcher$hosts, _matcher$includes;
var matchResult;
return _regeneratorRuntime().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
matchResult = false;
_context.t0 = true;
_context.next = _context.t0 === ((_matcher$regExp = matcher.regExp) === null || _matcher$regExp === void 0 ? void 0 : _matcher$regExp.test(location.href)) ? 4 : _context.t0 === ((_matcher$hosts = matcher.hosts) === null || _matcher$hosts === void 0 ? void 0 : _matcher$hosts.some(function (host) {
return location.host === host;
})) ? 4 : _context.t0 === ((_matcher$includes = matcher.includes) === null || _matcher$includes === void 0 ? void 0 : _matcher$includes.some(function (kw) {
if (lodash__WEBPACK_IMPORTED_MODULE_0___default().isString(kw)) {
return location.href.includes(kw);
} else {
return kw.every(function (txt) {
return location.href.includes(txt);
});
}
})) ? 4 : 6;
break;
case 4:
matchResult = true;
return _context.abrupt("break", 6);
case 6:
if (!matchResult) {
_context.next = 10;
break;
}
return _context.abrupt("return", callback());
case 10:
return _context.abrupt("return", null);
case 11:
case "end":
return _context.stop();
}
}, _callee);
}));
return function useMatchDomain(_x, _x2) {
return _ref.apply(this, arguments);
};
}();
/**
* regExp,hosts,includes取并集,protocol为约束性规则,与上述规则结果取交集
* 需要注意的是includes规则:第一层的所有规则取并集,如果第一层的某个成员是数组,则数组内的规则取交集,href必须包含该内层数组中的所有字符
* 比如includes:['switch520',['switch','618']]这个规则代表href要么包含'switch520',要么既包含'switch'也同时包含'618'
*/
/***/ }),
/***/ "./projects/switch520-auto-secret/Components/OpenInModal/index.tsx":
/*!*************************************************************************!*\
!*** ./projects/switch520-auto-secret/Components/OpenInModal/index.tsx ***!
\*************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ OpenInModal: () => (/* binding */ OpenInModal)
/* harmony export */ });
/* harmony import */ var reaxes_react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! reaxes-react */ "./node_modules/reaxes-react/esm/index.js");
/* harmony import */ var _reaxel__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./reaxel */ "./projects/switch520-auto-secret/Components/OpenInModal/reaxel.ts");
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! antd */ "antd");
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(antd__WEBPACK_IMPORTED_MODULE_2__);
/* provided dependency */ var React = __webpack_require__(/*! react */ "react");
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, "catch": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
var OpenInModal = (0,reaxes_react__WEBPACK_IMPORTED_MODULE_0__.reaxper)(function () {
var _reaxel_OpenInModal$s = _reaxel__WEBPACK_IMPORTED_MODULE_1__.reaxel_OpenInModal.store,
modalOpened = _reaxel_OpenInModal$s.modalOpened,
iframeURL = _reaxel_OpenInModal$s.iframeURL;
return /*#__PURE__*/React.createElement(antd__WEBPACK_IMPORTED_MODULE_2__.Modal, {
open: modalOpened,
onClose: function onClose() {
_reaxel__WEBPACK_IMPORTED_MODULE_1__.reaxel_OpenInModal.setState({
modalOpened: false,
iframeURL: null
});
},
onCancel: function onCancel() {
_reaxel__WEBPACK_IMPORTED_MODULE_1__.reaxel_OpenInModal.setState({
modalOpened: false,
iframeURL: null
});
},
bodyStyle: {
height: '85vh'
},
centered: true,
footer: null,
width: "85%",
destroyOnClose: true,
wrapStyle: {
display: 'flex',
justifyContent: 'center',
alignItems: 'center'
},
maskStyle: {
backgroundColor: 'rgba(0, 0, 0, 0.75)'
},
title: /*#__PURE__*/React.createElement("div", {
style: {
display: 'flex',
alignItems: 'center',
userSelect: 'none'
}
}, /*#__PURE__*/React.createElement("a", {
style: {
color: 'blueviolet',
marginRight: 8
},
onClick: function onClick() {
return window.open(iframeURL);
}
}, iframeURL), /*#__PURE__*/React.createElement("svg", {
onClick: /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
return _regeneratorRuntime().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
_context.next = 2;
return navigator.clipboard.writeText(iframeURL);
case 2:
antd__WEBPACK_IMPORTED_MODULE_2__.message.success('复制成功');
case 3:
case "end":
return _context.stop();
}
}, _callee);
})),
style: {
cursor: 'pointer'
},
className: "icon",
viewBox: "0 0 1024 1024",
version: "1.1",
xmlns: "http://www.w3.org/2000/svg",
"p-id": "9105",
width: "32",
height: "32"
}, /*#__PURE__*/React.createElement("path", {
d: "M589.3 260.9v30H371.4v-30H268.9v513h117.2v-304l109.7-99.1h202.1V260.9z",
fill: "#E1F0FF",
"p-id": "9106"
}), /*#__PURE__*/React.createElement("path", {
d: "M516.1 371.1l-122.9 99.8v346.8h370.4V371.1z",
fill: "#E1F0FF",
"p-id": "9107"
}), /*#__PURE__*/React.createElement("path", {
d: "M752.7 370.8h21.8v435.8h-21.8z",
fill: "#446EB1",
"p-id": "9108"
}), /*#__PURE__*/React.createElement("path", {
d: "M495.8 370.8h277.3v21.8H495.8z",
fill: "#446EB1",
"p-id": "9109"
}), /*#__PURE__*/React.createElement("path", {
d: "M495.8 370.8h21.8v124.3h-21.8z",
fill: "#446EB1",
"p-id": "9110"
}), /*#__PURE__*/React.createElement("path", {
d: "M397.7 488.7l-15.4-15.4 113.5-102.5 15.4 15.4z",
fill: "#446EB1",
"p-id": "9111"
}), /*#__PURE__*/React.createElement("path", {
d: "M382.3 473.3h135.3v21.8H382.3z",
fill: "#446EB1",
"p-id": "9112"
}), /*#__PURE__*/React.createElement("path", {
d: "M382.3 479.7h21.8v348.6h-21.8zM404.1 806.6h370.4v21.8H404.1z",
fill: "#446EB1",
"p-id": "9113"
}), /*#__PURE__*/React.createElement("path", {
d: "M447.7 545.1h261.5v21.8H447.7zM447.7 610.5h261.5v21.8H447.7zM447.7 675.8h261.5v21.8H447.7z",
fill: "#6D9EE8",
"p-id": "9114"
}), /*#__PURE__*/React.createElement("path", {
d: "M251.6 763h130.7v21.8H251.6z",
fill: "#446EB1",
"p-id": "9115"
}), /*#__PURE__*/React.createElement("path", {
d: "M251.6 240.1h21.8v544.7h-21.8zM687.3 240.1h21.8v130.7h-21.8zM273.4 240.1h108.9v21.8H273.4z",
fill: "#446EB1",
"p-id": "9116"
}), /*#__PURE__*/React.createElement("path", {
d: "M578.4 240.1h130.7v21.8H578.4zM360.5 196.5h21.8v108.9h-21.8zM382.3 283.7h196.1v21.8H382.3zM534.8 196.5h65.4v21.8h-65.4z",
fill: "#446EB1",
"p-id": "9117"
}), /*#__PURE__*/React.createElement("path", {
d: "M360.5 196.5h65.4v21.8h-65.4zM404.1 174.7h152.5v21.8H404.1zM578.4 196.5h21.8v108.9h-21.8z",
fill: "#446EB1",
"p-id": "9118"
}))),
closeIcon: /*#__PURE__*/React.createElement("span", {
style: {
transform: 'scale(1.5)'
}
}, /*#__PURE__*/React.createElement("svg", {
className: "icon",
viewBox: "0 0 1024 1024",
version: "1.1",
xmlns: "http://www.w3.org/2000/svg",
"p-id": "16863",
width: "32",
height: "32"
}, /*#__PURE__*/React.createElement("path", {
d: "M38.04 518.35a475.12 487.33 0 1 0 950.24 0 475.12 487.33 0 1 0-950.24 0Z",
fill: "#07AA74",
"p-id": "16864"
}), /*#__PURE__*/React.createElement("path", {
d: "M513.16 18.75C258.74 18.75 52.5 224.99 52.5 479.41c0 254.42 206.25 460.66 460.66 460.66s460.66-206.25 460.66-460.66c0.01-254.42-206.24-460.66-460.66-460.66z m0 769.72c-170.69 0-309.06-138.37-309.06-309.06s138.37-309.06 309.06-309.06 309.06 138.37 309.06 309.06c0.01 170.69-138.37 309.06-309.06 309.06z",
fill: "#56D8B0",
"p-id": "16865"
}), /*#__PURE__*/React.createElement("path", {
d: "M656.21 556.84c18.12 18.12 18.12 47.5 0 65.62-9.06 9.07-20.93 13.59-32.8 13.59-11.88 0-23.75-4.53-32.81-13.59l-77.43-77.43-77.44 77.43c-9.06 9.07-20.93 13.59-32.8 13.59-11.88 0-23.75-4.53-32.81-13.59-18.11-18.11-18.11-47.49 0-65.62l77.44-77.43-77.44-77.44c-18.11-18.11-18.11-47.49 0-65.62 18.12-18.11 47.5-18.11 65.62 0l77.44 77.44 77.43-77.44c18.12-18.11 47.5-18.11 65.62 0 18.12 18.12 18.12 47.5 0 65.62l-77.43 77.44 77.41 77.43z",
fill: "#FFFFFF",
"p-id": "16866"
})))
}, /*#__PURE__*/React.createElement("iframe", {
src: iframeURL,
width: "100%",
height: "100%"
}));
});
/***/ }),
/***/ "./projects/switch520-auto-secret/Components/OpenInModal/reaxel.ts":
/*!*************************************************************************!*\
!*** ./projects/switch520-auto-secret/Components/OpenInModal/reaxel.ts ***!
\*************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ reaxel_OpenInModal: () => (/* binding */ reaxel_OpenInModal)
/* harmony export */ });
/* harmony import */ var reaxes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! reaxes */ "./node_modules/reaxes/esm/index.js");
/* harmony import */ var _generic_svc_utils_useMatchDomain__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! #generic-svc/utils/useMatchDomain */ "./generic-services/utils/useMatchDomain/index.ts");
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, "catch": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
var reaxel_OpenInModal = (0,reaxes__WEBPACK_IMPORTED_MODULE_0__.reaxel)(function () {
var _createReaxable = (0,reaxes__WEBPACK_IMPORTED_MODULE_0__.createReaxable)({
modalOpened: false,
iframeURL: null
}),
store = _createReaxable.store,
setState = _createReaxable.setState;
(0,_generic_svc_utils_useMatchDomain__WEBPACK_IMPORTED_MODULE_1__.useMatchDomain)({
includes: ['gamer520']
}, function () {
if (!location.href.endsWith('.html')) {
var containerEl = document.querySelector('.posts-wrapper');
containerEl === null || containerEl === void 0 || containerEl.addEventListener('click', /*#__PURE__*/function () {
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(e) {
var cardEl, _cardEl$querySelector, href;
return _regeneratorRuntime().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
_context.next = 2;
return GM.getValue('options::modal-mode', true);
case 2:
if (_context.sent) {
_context.next = 4;
break;
}
return _context.abrupt("return");
case 4:
e.preventDefault();
e.stopPropagation();
console.log('bbbbbbbbbbbbb', e.composedPath());
cardEl = e.composedPath().find(function (p) {
return _toConsumableArray(containerEl.children).includes(p);
});
if (cardEl) {
_cardEl$querySelector = cardEl.querySelector('a'), href = _cardEl$querySelector.href;
setState({
iframeURL: href,
modalOpened: true
});
}
case 9:
case "end":
return _context.stop();
}
}, _callee);
}));
return function (_x) {
return _ref.apply(this, arguments);
};
}());
}
});
(0,_generic_svc_utils_useMatchDomain__WEBPACK_IMPORTED_MODULE_1__.useMatchDomain)({
includes: ['switch618']
}, function () {
if (!location.href.endsWith('.html')) {
var mainEl = document.querySelector('.main');
mainEl === null || mainEl === void 0 || mainEl.addEventListener('click', /*#__PURE__*/function () {
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(e) {
var cardEl, id;
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
_context2.next = 2;
return GM.getValue('options::modal-mode', true);
case 2:
if (_context2.sent) {
_context2.next = 4;
break;
}
return _context2.abrupt("return");
case 4:
cardEl = e.composedPath().find(function (p) {
var _p$dataset;
return !!((_p$dataset = p.dataset) !== null && _p$dataset !== void 0 && _p$dataset.id) && p.className === 'post grid';
});
if (cardEl) {
e.preventDefault();
e.stopPropagation();
}
if (cardEl) {
console.log(cardEl, '0000000000');
id = cardEl.dataset.id;
setState({
iframeURL: "https://www.switch618.com/".concat(id, ".html"),
modalOpened: true
});
}
case 7:
case "end":
return _context2.stop();
}
}, _callee2);
}));
return function (_x2) {
return _ref2.apply(this, arguments);
};
}());
} else {
document.querySelectorAll('a').forEach(function (el) {
if (el.innerText === ' 立即下载') {
el.addEventListener('click', function (e) {
e.preventDefault();
location.href = el.href;
});
}
});
}
});
(0,_generic_svc_utils_useMatchDomain__WEBPACK_IMPORTED_MODULE_1__.useMatchDomain)({
includes: ['steamzg']
}, function () {
if (/\d{5,8}\/?$/.test(location.href)) {
return;
}
var mainEl = document.querySelector('.poi-row.inn-archive__container');
mainEl === null || mainEl === void 0 || mainEl.addEventListener('click', /*#__PURE__*/function () {
var _ref3 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(e) {
var cardEl, href;
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
while (1) switch (_context3.prev = _context3.next) {
case 0:
_context3.next = 2;
return GM.getValue('options::modal-mode', true);
case 2:
if (_context3.sent) {
_context3.next = 4;
break;
}
return _context3.abrupt("return");
case 4:
cardEl = e.composedPath().find(function (el) {
return el.tagName === 'ARTICLE';
});
if (cardEl) {
e.preventDefault();
e.stopPropagation();
href = cardEl.querySelector("a[href^='https://steamzg.com/']").href;
console.log(cardEl, '0000000000');
setState({
iframeURL: href,
modalOpened: true
});
}
case 6:
case "end":
return _context3.stop();
}
}, _callee3);
}));
return function (_x3) {
return _ref3.apply(this, arguments);
};
}());
});
if (!document.body) {
console.table(location);
}
var rtn = {};
return Object.assign(function () {
return rtn;
}, {
store: store,
setState: setState
});
});
/***/ }),
/***/ "./projects/switch520-auto-secret/Components/SearchInSteamButton/index.tsx":
/*!*********************************************************************************!*\
!*** ./projects/switch520-auto-secret/Components/SearchInSteamButton/index.tsx ***!
\*********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ SearchInSteam: () => (/* binding */ SearchInSteam)
/* harmony export */ });
/* harmony import */ var _generic_svc_utils_useMatchDomain__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! #generic-svc/utils/useMatchDomain */ "./generic-services/utils/useMatchDomain/index.ts");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var reaxes_react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! reaxes-react */ "./node_modules/reaxes-react/esm/index.js");
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, "catch": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
var SearchInSteam = (0,reaxes_react__WEBPACK_IMPORTED_MODULE_0__.reaxper)(function () {
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement("div", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement("button", {
style: {
backgroundColor: '#20a0ff',
color: '#eee',
width: '100%',
padding: '12px 18px',
borderRadius: '4px',
border: 'none',
cursor: 'pointer',
fontSize: '16px',
letterSpacing: '2px',
margin: '0 0 24px 0'
},
onClick: /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
var searchResult;
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
while (1) switch (_context4.prev = _context4.next) {
case 0:
searchResult = null;
_context4.next = 3;
return (0,_generic_svc_utils_useMatchDomain__WEBPACK_IMPORTED_MODULE_2__.useMatchDomain)({
includes: ['gamer520.com']
}, /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
var _yield$import, getGameName;
return _regeneratorRuntime().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
_context.next = 2;
return Promise.resolve(/*! import() eager */).then(__webpack_require__.bind(__webpack_require__, /*! ../../DOM-finder/switch520.com */ "./projects/switch520-auto-secret/DOM-finder/switch520.com/index.ts"));
case 2:
_yield$import = _context.sent;
getGameName = _yield$import.getGameName;
searchResult = getGameName();
case 5:
case "end":
return _context.stop();
}
}, _callee);
})));
case 3:
_context4.next = 5;
return (0,_generic_svc_utils_useMatchDomain__WEBPACK_IMPORTED_MODULE_2__.useMatchDomain)({
includes: ['switch618']
}, /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
var _yield$import2, getGameName, _getGameName, english, chinese;
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
_context2.next = 2;
return Promise.resolve(/*! import() eager */).then(__webpack_require__.bind(__webpack_require__, /*! ../../DOM-finder/switch618.com */ "./projects/switch520-auto-secret/DOM-finder/switch618.com/index.ts"));
case 2:
_yield$import2 = _context2.sent;
getGameName = _yield$import2.getGameName;
_getGameName = getGameName(), english = _getGameName.english, chinese = _getGameName.chinese;
english ? searchResult = english : searchResult = chinese;
case 6:
case "end":
return _context2.stop();
}
}, _callee2);
})));
case 5:
_context4.next = 7;
return (0,_generic_svc_utils_useMatchDomain__WEBPACK_IMPORTED_MODULE_2__.useMatchDomain)({
includes: ['steamzg']
}, /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
var href;
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
while (1) switch (_context3.prev = _context3.next) {
case 0:
href = document.querySelectorAll('a').forEach(function (el) {
if (el.href && el.href.startsWith('https://store.steampowered.com/app')) {
window.open(el.href);
}
});
case 1:
case "end":
return _context3.stop();
}
}, _callee3);
})));
case 7:
if (searchResult) {
_context4.next = 9;
break;
}
return _context4.abrupt("return");
case 9:
window.open("https://store.steampowered.com/search/?term=".concat(encodeURIComponent(searchResult.trim()).replace(/%20/g, '+')));
case 10:
case "end":
return _context4.stop();
}
}, _callee4);
}))
}, "\u53BBSteam\u641C\u7D22\u6B64\u6E38\u620F"));
});
/***/ }),
/***/ "./projects/switch520-auto-secret/DOM-finder/switch520.com/index.ts":
/*!**************************************************************************!*\
!*** ./projects/switch520-auto-secret/DOM-finder/switch520.com/index.ts ***!
\**************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ analyzeGameNameInArticle: () => (/* binding */ analyzeGameNameInArticle),
/* harmony export */ analyzeGameNameInTitle: () => (/* binding */ analyzeGameNameInTitle),
/* harmony export */ articleContainer: () => (/* binding */ articleContainer),
/* harmony export */ getGameName: () => (/* binding */ getGameName),
/* harmony export */ nameInArticle: () => (/* binding */ nameInArticle),
/* harmony export */ nameInTitle: () => (/* binding */ nameInTitle),
/* harmony export */ titleElement: () => (/* binding */ titleElement)
/* harmony export */ });
var articleContainer = function articleContainer() {
return document.querySelector('div.entry-content.u-text-format.u-clearfix');
};
var titleElement = function titleElement() {
return document.querySelector('h1.entry-title');
};
/**
* 根据标题解析出中文名和英文名
*/
var analyzeGameNameInTitle = function analyzeGameNameInTitle() {
var _titleElement;
var title = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : (_titleElement = titleElement()) === null || _titleElement === void 0 ? void 0 : _titleElement.innerText;
var chineseGameName;
var englishGameName;
var _titleText = title.split(/\/|\|/)[0];
//<Liberated: Enhanced Edition>
if (/^[a-zA-Z0-9\s:]+/.test(_titleText)) {
chineseGameName = null;
englishGameName = _titleText.replaceAll(/[\u4e00-\u9fa5]/g, '').replaceAll(/^:|:$/g, '').trim();
}
//<商店模拟器 超市 Shop Simulator Supermarket>
if (/^\s*[\u4e00-\u9fa5™…?《][\w\W]*[\u4e00-\u9fa5\s™…?》-](?=(\s|$))/.test(_titleText)) {
var _titleText$match;
chineseGameName = (_titleText$match = _titleText.match(/^\s*[\u4e00-\u9fa5™…?《-]+[\w\W]*[\u4e00-\u9fa5™…?-]+(?=\s?)/)) === null || _titleText$match === void 0 ? void 0 : _titleText$match[0];
englishGameName = _titleText.replace(chineseGameName, '').replaceAll(/^:|:$/g, '').trim();
}
//<零号奴隶X Slave Zero X>
if (/^\s*[\u4e00-\u9fa5™…?《]+[a-zA-Z0-9](\s+|\b)/.test(_titleText)) {
var _titleText$match2;
chineseGameName = (_titleText$match2 = _titleText.match(/\s*[\u4e00-\u9fa5《]+[a-zA-Z0-9](?=\s*)/)) === null || _titleText$match2 === void 0 ? void 0 : _titleText$match2[0];
englishGameName = _titleText.replace(chineseGameName, '').replaceAll(/^:|:$/g, '').trim();
}
//<我的世界:传奇:minecraft:legends>
if (_titleText.split(':').length - 1 > 2 && /^[\u4e00-\u9fa5]+[\w\W]*:[\w\W]*$/i.test(_titleText)) {
var _titleText$match3;
chineseGameName = (_titleText$match3 = _titleText.match(/^[\u4e00-\u9fa5]+:[\u4e00-\u9fa5]+/g)) === null || _titleText$match3 === void 0 ? void 0 : _titleText$match3[0];
englishGameName = _titleText.replace(chineseGameName, '').replaceAll(/^:|:$/g, '').trim();
}
//<超级竞技场:Hyper Jam>
if (/^[\u4e00-\u9fa5]+:[a-zA-Z\s]+$/.test(_titleText)) {
var _titleText$match4;
chineseGameName = (_titleText$match4 = _titleText.match(/^\s*[\u4e00-\u9fa5]+:?[\u4e00-\u9fa5]*(?=:)/i)) === null || _titleText$match4 === void 0 ? void 0 : _titleText$match4[0];
englishGameName = _titleText.replace(chineseGameName, '').replaceAll(/^:|:$/g, '').trim();
}
var res = {
chinese: chineseGameName,
english: englishGameName
};
return res;
};
/**
* 根据文章内容解析出游戏名
*/
var analyzeGameNameInArticle = function analyzeGameNameInArticle(rowText, el) {
var _el$childNodes$;
if (/《[\w\W]+》/.test(rowText)) {
var _rowText$match;
true && console.log(111);
return analyzeGameNameInTitle((_rowText$match = rowText.match(/(?<=《)[\w\W]+(?=》)/)) === null || _rowText$match === void 0 ? void 0 : _rowText$match[0]);
} else if (/^《[\w\W]+》\s*[\u4e00-\u9fa5]+\s*[a-zA-Z]+\s*$/.test(rowText)) {
var _rowText$match2;
true && console.log(222, {
innerText: (_rowText$match2 = rowText.match(/(?<=《)[\w\W]+(?=》)/)) === null || _rowText$match2 === void 0 ? void 0 : _rowText$match2[0]
});
return analyzeGameNameInTitle(rowText.replaceAll(/[\u4e00-\u9fa5《》][a-zA-Z0-9]+/g, '').replaceAll(/[\u4e00-\u9fa5《》]/g, ''));
} else if (el !== null && el !== void 0 && (_el$childNodes$ = el.childNodes[0]) !== null && _el$childNodes$ !== void 0 && _el$childNodes$.textContent.startsWith('名称:')) {
var _el$childNodes$2, _el$childNodes$3;
true && console.log(333, {
innerText: (_el$childNodes$2 = el.childNodes[0]) === null || _el$childNodes$2 === void 0 ? void 0 : _el$childNodes$2.textContent.replace('名称:', '').trim()
});
return analyzeGameNameInTitle((_el$childNodes$3 = el.childNodes[0]) === null || _el$childNodes$3 === void 0 ? void 0 : _el$childNodes$3.textContent.replace('名称:', '').trim());
} else if ((el === null || el === void 0 ? void 0 : el.tagName.toLowerCase()) === 'p') {
true && console.log(444, JSON.stringify(rowText));
return analyzeGameNameInTitle(rowText);
}
return analyzeGameNameInTitle(rowText);
};
var nameInTitle = function nameInTitle() {
var el = titleElement();
return analyzeGameNameInTitle(el.innerText);
};
var nameInArticle = function nameInArticle() {
var container = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : articleContainer();
return Array.from(container.querySelectorAll('*')).reduce(function (accu, el) {
if (accu) return accu;
if (el.innerText.includes('解压密码') || el.innerText.includes('去Steam') || !el.innerText.trim()) return null;
return accu = analyzeGameNameInArticle(el.innerText, el);
}, null);
};
var getGameName = function getGameName() {
return titleElement().innerText.split('|')[0];
var articleName = nameInArticle();
var titleName = nameInTitle();
return articleName.english || articleName.chinese || titleName.english || titleName.chinese;
};
if (true) {
/*注释不得被移除!作用是命令webpack不分包而是内联打包*/
Promise.resolve(/*! import() eager */).then(__webpack_require__.bind(__webpack_require__, /*! ./tester */ "./projects/switch520-auto-secret/DOM-finder/switch520.com/tester.ts"));
}
/***/ }),
/***/ "./projects/switch520-auto-secret/DOM-finder/switch520.com/tester.ts":
/*!***************************************************************************!*\
!*** ./projects/switch520-auto-secret/DOM-finder/switch520.com/tester.ts ***!
\***************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _generic_svc_utils_useMatchDomain__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! #generic-svc/utils/useMatchDomain */ "./generic-services/utils/useMatchDomain/index.ts");
/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index */ "./projects/switch520-auto-secret/DOM-finder/switch520.com/index.ts");
/* harmony import */ var reaxes_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! reaxes-utils */ "./node_modules/reaxes-utils/esm/index.js");
var tester = function tester() {
var testCases = [{
type: 'title',
input: '地平线 零之曙光™ 重制版',
expectENG: null,
expectCHN: '地平线 零之曙光™ 重制版'
}, {
type: 'title',
input: '超级竞技场:Hyper Jam/官方中文/本体+1.1.0升补/[NSZ]',
expectENG: 'Hyper Jam',
expectCHN: '超级竞技场'
}, {
type: 'title',
input: '超级竞技场:弯道:Hyper Jam:Apex/官方中文/本体+1.1.0升补/[NSZ]',
expectENG: 'Hyper Jam:Apex',
expectCHN: '超级竞技场:弯道'
}, {
type: 'title',
input: '零号奴隶X Slave Zero X',
expectENG: 'Slave Zero X',
expectCHN: '零号奴隶X'
}, {
type: 'title',
input: '商店模拟器 超市 Shop Simulator Supermarket',
expectENG: 'Shop Simulator Supermarket',
expectCHN: '商店模拟器 超市'
}, {
type: 'title',
input: 'Liberated: Enhanced Edition',
expectENG: 'Liberated: Enhanced Edition',
expectCHN: undefined
}, {
type: 'title',
input: '蒸汽朋克塔2',
expectENG: null,
expectCHN: '蒸汽朋克塔2'
}, {
type: 'title',
input: '格兰蒂亚秘闻 Secrets of Grindea',
expectENG: 'Secrets of Grindea',
expectCHN: '格兰蒂亚秘闻'
}, {
type: 'title',
input: ' 英雄传说 黎之轨迹Ⅱ -绯红原罪-',
expectENG: null,
expectCHN: '英雄传说 黎之轨迹Ⅱ -绯红原罪-'
}, {
type: 'article',
input: '《地平线 零之曙光™》重制版 Horizon Zero Dawn Remastered',
expectENG: 'Horizon Zero Dawn Remastered',
expectCHN: '《地平线 零之曙光™》重制版'
}, {
type: 'title',
input: '双影奇境|豪华中文|Build.16999078+预购特典+全DLC-支持手柄|解压即撸|\n',
expectENG: null,
expectCHN: '双影奇境'
}];
testCases.forEach(function (_ref) {
var _analyzeGameNameInArt, _chinese, _english, _chinese2, _english2;
var type = _ref.type,
expectENG = _ref.expectENG,
expectCHN = _ref.expectCHN,
input = _ref.input;
var _ref2 = type === 'title' ? (0,_index__WEBPACK_IMPORTED_MODULE_0__.analyzeGameNameInTitle)(input) : (_analyzeGameNameInArt = (0,_index__WEBPACK_IMPORTED_MODULE_0__.analyzeGameNameInArticle)(input)) !== null && _analyzeGameNameInArt !== void 0 ? _analyzeGameNameInArt : {},
chinese = _ref2.chinese,
english = _ref2.english;
if (!chinese) chinese = null;
if (!english) english = null;
var chinesePass = ((_chinese = chinese) === null || _chinese === void 0 ? void 0 : _chinese.trim()) == (expectCHN === null || expectCHN === void 0 ? void 0 : expectCHN.trim());
var englishPass = ((_english = english) === null || _english === void 0 ? void 0 : _english.trim()) == (expectENG === null || expectENG === void 0 ? void 0 : expectENG.trim());
if (chinesePass && englishPass) {
reaxes_utils__WEBPACK_IMPORTED_MODULE_1__.crayon.group.lightGreen(input);
} else {
reaxes_utils__WEBPACK_IMPORTED_MODULE_1__.crayon.group.blue(input);
}
if (((_chinese2 = chinese) === null || _chinese2 === void 0 ? void 0 : _chinese2.trim()) != (expectCHN === null || expectCHN === void 0 ? void 0 : expectCHN.trim())) {
console.warn("\u6D4B\u8BD5\u4E0D\u901A\u8FC7Chinese | match:<".concat(chinese || null, "> | expect:<").concat(expectCHN || null, "> "));
}
if (((_english2 = english) === null || _english2 === void 0 ? void 0 : _english2.trim()) != (expectENG === null || expectENG === void 0 ? void 0 : expectENG.trim())) {
console.warn("\u6D4B\u8BD5\u4E0D\u901A\u8FC7English | match:<".concat(english || null, "> | expect:<").concat(expectENG || null, "> "));
}
console.groupEnd();
});
};
(0,_generic_svc_utils_useMatchDomain__WEBPACK_IMPORTED_MODULE_2__.useMatchDomain)({
includes: ['gamer520.com']
}, function () {
true && tester();
});
/***/ }),
/***/ "./projects/switch520-auto-secret/DOM-finder/switch618.com/index.ts":
/*!**************************************************************************!*\
!*** ./projects/switch520-auto-secret/DOM-finder/switch618.com/index.ts ***!
\**************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ getGameName: () => (/* binding */ getGameName)
/* harmony export */ });
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function _wrapRegExp() { _wrapRegExp = function _wrapRegExp(e, r) { return new BabelRegExp(e, void 0, r); }; var e = RegExp.prototype, r = new WeakMap(); function BabelRegExp(e, t, p) { var o = RegExp(e, t); return r.set(o, p || r.get(e)), _setPrototypeOf(o, BabelRegExp.prototype); } function buildGroups(e, t) { var p = r.get(t); return Object.keys(p).reduce(function (r, t) { var o = p[t]; if ("number" == typeof o) r[t] = e[o];else { for (var i = 0; void 0 === e[o[i]] && i + 1 < o.length;) i++; r[t] = e[o[i]]; } return r; }, Object.create(null)); } return _inherits(BabelRegExp, RegExp), BabelRegExp.prototype.exec = function (r) { var t = e.exec.call(this, r); if (t) { t.groups = buildGroups(t, this); var p = t.indices; p && (p.groups = buildGroups(p, this)); } return t; }, BabelRegExp.prototype[Symbol.replace] = function (t, p) { if ("string" == typeof p) { var o = r.get(this); return e[Symbol.replace].call(this, t, p.replace(/\$<([^>]+)>/g, function (e, r) { var t = o[r]; return "$" + (Array.isArray(t) ? t.join("$") : t); })); } if ("function" == typeof p) { var i = this; return e[Symbol.replace].call(this, t, function () { var e = arguments; return "object" != _typeof(e[e.length - 1]) && (e = [].slice.call(e)).push(buildGroups(e, i)), p.apply(this, e); }); } return e[Symbol.replace].call(this, t, p); }, _wrapRegExp.apply(this, arguments); }
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
var getGameName = function getGameName() {
var _titleText$match;
var titleText = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : document.querySelector('.article-title').innerText;
var _ref = ((_titleText$match = titleText.match(/*#__PURE__*/_wrapRegExp(/\u300A([\s\S]+?)\(([\s\S]+?)\)\u300B[\w\W]*/, {
chinese: 1,
english: 2
}))) === null || _titleText$match === void 0 ? void 0 : _titleText$match.groups) || {},
chinese = _ref.chinese,
english = _ref.english;
if (!chinese && !english) {
english = titleText.split('|')[0];
}
return {
chinese: chinese,
english: english
};
};
if (true) {
Promise.resolve(/*! import() eager */).then(__webpack_require__.bind(__webpack_require__, /*! ./tester */ "./projects/switch520-auto-secret/DOM-finder/switch618.com/tester.ts"));
}
/***/ }),
/***/ "./projects/switch520-auto-secret/DOM-finder/switch618.com/tester.ts":
/*!***************************************************************************!*\
!*** ./projects/switch520-auto-secret/DOM-finder/switch618.com/tester.ts ***!
\***************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ tester: () => (/* binding */ tester)
/* harmony export */ });
/* harmony import */ var _generic_svc_utils_useMatchDomain__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! #generic-svc/utils/useMatchDomain */ "./generic-services/utils/useMatchDomain/index.ts");
/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index */ "./projects/switch520-auto-secret/DOM-finder/switch618.com/index.ts");
/* harmony import */ var reaxes_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! reaxes-utils */ "./node_modules/reaxes-utils/esm/index.js");
var tester = function tester() {
var cases = [{
title: '《我即軍團:替身幸存者(Stand Survivors)》|v20250307|中文|免安裝硬盤版\n',
chinese: '我即軍團:替身幸存者',
english: 'Stand Survivors'
}, {
title: '《我的人生(My Life)》|v20250307|中文|免安裝硬盤版\n',
chinese: '我的人生',
english: 'My Life'
}, {
title: '《魔女與學生會:卡牌之戰(Witch and Council : The Card)》|V2.0.0|中文|免安裝硬盤版\n',
chinese: '魔女與學生會:卡牌之戰',
english: 'Witch and Council : The Card'
}];
cases.forEach(function (_ref) {
var title = _ref.title,
chinese = _ref.chinese,
english = _ref.english;
var result = (0,_index__WEBPACK_IMPORTED_MODULE_0__.getGameName)(title);
if (result && result.chinese === chinese && result.english === english) {
reaxes_utils__WEBPACK_IMPORTED_MODULE_1__.crayon.group.lightGreen(title);
} else {
reaxes_utils__WEBPACK_IMPORTED_MODULE_1__.crayon.group.orange(title);
}
if (!result || result.chinese !== chinese) {
console.warn("chinese\u6D4B\u8BD5\u7528\u4F8B\u4E0D\u901A\u8FC7");
}
if (!result || result.english !== english) {
console.warn("chinese\u6D4B\u8BD5\u7528\u4F8B\u4E0D\u901A\u8FC7");
}
reaxes_utils__WEBPACK_IMPORTED_MODULE_1__.crayon.groupEnd();
});
};
(0,_generic_svc_utils_useMatchDomain__WEBPACK_IMPORTED_MODULE_2__.useMatchDomain)({
includes: ['switch618.com']
}, function () {
true && tester();
});
/***/ }),
/***/ "./projects/switch520-auto-secret/SearchOnSelect/index.tsx":
/*!*****************************************************************!*\
!*** ./projects/switch520-auto-secret/SearchOnSelect/index.tsx ***!
\*****************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! antd */ "antd");
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(antd__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var reaxes_react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! reaxes-react */ "./node_modules/reaxes-react/esm/index.js");
/* harmony import */ var reaxes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! reaxes */ "./node_modules/reaxes/esm/index.js");
/* harmony import */ var react_dom_client__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react-dom/client */ "./node_modules/react-dom/client.js");
/* harmony import */ var _style_module_less__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./style.module.less */ "./projects/switch520-auto-secret/SearchOnSelect/style.module.less");
/* provided dependency */ var React = __webpack_require__(/*! react */ "react");
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
var notificationKey = 'search-on-steam';
var getSelection = function getSelection() {
return window.getSelection().toString();
};
document.addEventListener('mouseup', function (evt) {
var _className, _className$includes;
if ((_className = evt.target.className) !== null && _className !== void 0 && (_className$includes = _className.includes) !== null && _className$includes !== void 0 && _className$includes.call(_className, 'ant-notification')) {
return;
}
var selection = getSelection();
console.log(evt.target, getSelection());
setState({
selection: selection
});
});
var _createReaxable = (0,reaxes__WEBPACK_IMPORTED_MODULE_0__.createReaxable)({
open: false,
selection: ''
}),
store = _createReaxable.store,
setState = _createReaxable.setState,
mutate = _createReaxable.mutate;
(0,reaxes__WEBPACK_IMPORTED_MODULE_0__.obsReaction)(function (first) {
if (first) return;
var selection = store.selection;
if (selection) {
setState({
open: true
});
} else {
setState({
open: false
});
}
}, function () {
return [store.selection];
});
var App = (0,reaxes_react__WEBPACK_IMPORTED_MODULE_1__.reaxper)(function () {
var _notification$useNoti = antd__WEBPACK_IMPORTED_MODULE_2__.notification.useNotification(),
_notification$useNoti2 = _slicedToArray(_notification$useNoti, 2),
api = _notification$useNoti2[0],
contextHolder = _notification$useNoti2[1];
var open = store.open,
selection = store.selection;
if (open) {
api.open({
message: /*#__PURE__*/React.createElement("a", {
style: {
color: 'black',
fontSize: '20px',
display: "inline-block"
},
onClick: function onClick(e) {
e.preventDefault();
// window.open( `https://store.steampowered.com/search/?sort_by=_ASC&term=${ selection }&supportedlang=schinese%2Cenglish` );
window.open("https://store.steampowered.com/search/?term=".concat(encodeURIComponent(selection.trim()).replace(/%20/g, '+')));
}
}, "Steam\u641C\u7D22\uFF1A", /*#__PURE__*/React.createElement("span", {
style: {
color: '#7f7fff'
}
}, selection)),
placement: 'top',
key: notificationKey,
duration: null,
closable: false,
onClose: null,
closeIcon: null
});
} else {
api.destroy(notificationKey);
}
return contextHolder;
});
var container = document.createElement('div');
document.body.append(container);
var reactRoot = (0,react_dom_client__WEBPACK_IMPORTED_MODULE_3__.createRoot)(container);
reactRoot.render(/*#__PURE__*/React.createElement(App, null));
/***/ }),
/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/less-loader/dist/cjs.js??ruleSet[1].rules[2].use[2]!./projects/switch520-auto-secret/SearchOnSelect/style.module.less":
/*!**********************************************************************************************************************************************************************************!*\
!*** ./node_modules/css-loader/dist/cjs.js!./node_modules/less-loader/dist/cjs.js??ruleSet[1].rules[2].use[2]!./projects/switch520-auto-secret/SearchOnSelect/style.module.less ***!
\**********************************************************************************************************************************************************************************/
/***/ ((module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/noSourceMaps.js */ "./node_modules/css-loader/dist/runtime/noSourceMaps.js");
/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js");
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);
// Imports
var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
// Module
___CSS_LOADER_EXPORT___.push([module.id, `.ant-notification {
z-index: 99999;
}
`, ""]);
// Exports
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
/***/ }),
/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/less-loader/dist/cjs.js??ruleSet[1].rules[2].use[2]!./projects/switch520-auto-secret/style.less":
/*!************************************************************************************************************************************************************!*\
!*** ./node_modules/css-loader/dist/cjs.js!./node_modules/less-loader/dist/cjs.js??ruleSet[1].rules[2].use[2]!./projects/switch520-auto-secret/style.less ***!
\************************************************************************************************************************************************************/
/***/ ((module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../node_modules/css-loader/dist/runtime/noSourceMaps.js */ "./node_modules/css-loader/dist/runtime/noSourceMaps.js");
/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js");
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);
// Imports
var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
// Module
___CSS_LOADER_EXPORT___.push([module.id, `.app {
color: red;
}
header.header {
z-index: 500!important;
}
`, ""]);
// Exports
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
/***/ }),
/***/ "./node_modules/css-loader/dist/runtime/api.js":
/*!*****************************************************!*\
!*** ./node_modules/css-loader/dist/runtime/api.js ***!
\*****************************************************/
/***/ ((module) => {
"use strict";
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
module.exports = function (cssWithMappingToString) {
var list = [];
// return the list of modules as css string
list.toString = function toString() {
return this.map(function (item) {
var content = "";
var needLayer = typeof item[5] !== "undefined";
if (item[4]) {
content += "@supports (".concat(item[4], ") {");
}
if (item[2]) {
content += "@media ".concat(item[2], " {");
}
if (needLayer) {
content += "@layer".concat(item[5].length > 0 ? " ".concat(item[5]) : "", " {");
}
content += cssWithMappingToString(item);
if (needLayer) {
content += "}";
}
if (item[2]) {
content += "}";
}
if (item[4]) {
content += "}";
}
return content;
}).join("");
};
// import a list of modules into the list
list.i = function i(modules, media, dedupe, supports, layer) {
if (typeof modules === "string") {
modules = [[null, modules, undefined]];
}
var alreadyImportedModules = {};
if (dedupe) {
for (var k = 0; k < this.length; k++) {
var id = this[k][0];
if (id != null) {
alreadyImportedModules[id] = true;
}
}
}
for (var _k = 0; _k < modules.length; _k++) {
var item = [].concat(modules[_k]);
if (dedupe && alreadyImportedModules[item[0]]) {
continue;
}
if (typeof layer !== "undefined") {
if (typeof item[5] === "undefined") {
item[5] = layer;
} else {
item[1] = "@layer".concat(item[5].length > 0 ? " ".concat(item[5]) : "", " {").concat(item[1], "}");
item[5] = layer;
}
}
if (media) {
if (!item[2]) {
item[2] = media;
} else {
item[1] = "@media ".concat(item[2], " {").concat(item[1], "}");
item[2] = media;
}
}
if (supports) {
if (!item[4]) {
item[4] = "".concat(supports);
} else {
item[1] = "@supports (".concat(item[4], ") {").concat(item[1], "}");
item[4] = supports;
}
}
list.push(item);
}
};
return list;
};
/***/ }),
/***/ "./node_modules/css-loader/dist/runtime/noSourceMaps.js":
/*!**************************************************************!*\
!*** ./node_modules/css-loader/dist/runtime/noSourceMaps.js ***!
\**************************************************************/
/***/ ((module) => {
"use strict";
module.exports = function (i) {
return i[1];
};
/***/ }),
/***/ "./node_modules/events/events.js":
/*!***************************************!*\
!*** ./node_modules/events/events.js ***!
\***************************************/
/***/ ((module) => {
"use strict";
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.
var R = typeof Reflect === 'object' ? Reflect : null
var ReflectApply = R && typeof R.apply === 'function'
? R.apply
: function ReflectApply(target, receiver, args) {
return Function.prototype.apply.call(target, receiver, args);
}
var ReflectOwnKeys
if (R && typeof R.ownKeys === 'function') {
ReflectOwnKeys = R.ownKeys
} else if (Object.getOwnPropertySymbols) {
ReflectOwnKeys = function ReflectOwnKeys(target) {
return Object.getOwnPropertyNames(target)
.concat(Object.getOwnPropertySymbols(target));
};
} else {
ReflectOwnKeys = function ReflectOwnKeys(target) {
return Object.getOwnPropertyNames(target);
};
}
function ProcessEmitWarning(warning) {
if (console && console.warn) console.warn(warning);
}
var NumberIsNaN = Number.isNaN || function NumberIsNaN(value) {
return value !== value;
}
function EventEmitter() {
EventEmitter.init.call(this);
}
module.exports = EventEmitter;
module.exports.once = once;
// Backwards-compat with node 0.10.x
EventEmitter.EventEmitter = EventEmitter;
EventEmitter.prototype._events = undefined;
EventEmitter.prototype._eventsCount = 0;
EventEmitter.prototype._maxListeners = undefined;
// By default EventEmitters will print a warning if more than 10 listeners are
// added to it. This is a useful default which helps finding memory leaks.
var defaultMaxListeners = 10;
function checkListener(listener) {
if (typeof listener !== 'function') {
throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof listener);
}
}
Object.defineProperty(EventEmitter, 'defaultMaxListeners', {
enumerable: true,
get: function() {
return defaultMaxListeners;
},
set: function(arg) {
if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) {
throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + arg + '.');
}
defaultMaxListeners = arg;
}
});
EventEmitter.init = function() {
if (this._events === undefined ||
this._events === Object.getPrototypeOf(this)._events) {
this._events = Object.create(null);
this._eventsCount = 0;
}
this._maxListeners = this._maxListeners || undefined;
};
// Obviously not all Emitters should be limited to 10. This function allows
// that to be increased. Set to zero for unlimited.
EventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {
if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) {
throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + n + '.');
}
this._maxListeners = n;
return this;
};
function _getMaxListeners(that) {
if (that._maxListeners === undefined)
return EventEmitter.defaultMaxListeners;
return that._maxListeners;
}
EventEmitter.prototype.getMaxListeners = function getMaxListeners() {
return _getMaxListeners(this);
};
EventEmitter.prototype.emit = function emit(type) {
var args = [];
for (var i = 1; i < arguments.length; i++) args.push(arguments[i]);
var doError = (type === 'error');
var events = this._events;
if (events !== undefined)
doError = (doError && events.error === undefined);
else if (!doError)
return false;
// If there is no 'error' event listener then throw.
if (doError) {
var er;
if (args.length > 0)
er = args[0];
if (er instanceof Error) {
// Note: The comments on the `throw` lines are intentional, they show
// up in Node's output if this results in an unhandled exception.
throw er; // Unhandled 'error' event
}
// At least give some kind of context to the user
var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : ''));
err.context = er;
throw err; // Unhandled 'error' event
}
var handler = events[type];
if (handler === undefined)
return false;
if (typeof handler === 'function') {
ReflectApply(handler, this, args);
} else {
var len = handler.length;
var listeners = arrayClone(handler, len);
for (var i = 0; i < len; ++i)
ReflectApply(listeners[i], this, args);
}
return true;
};
function _addListener(target, type, listener, prepend) {
var m;
var events;
var existing;
checkListener(listener);
events = target._events;
if (events === undefined) {
events = target._events = Object.create(null);
target._eventsCount = 0;
} else {
// To avoid recursion in the case that type === "newListener"! Before
// adding it to the listeners, first emit "newListener".
if (events.newListener !== undefined) {
target.emit('newListener', type,
listener.listener ? listener.listener : listener);
// Re-assign `events` because a newListener handler could have caused the
// this._events to be assigned to a new object
events = target._events;
}
existing = events[type];
}
if (existing === undefined) {
// Optimize the case of one listener. Don't need the extra array object.
existing = events[type] = listener;
++target._eventsCount;
} else {
if (typeof existing === 'function') {
// Adding the second element, need to change to array.
existing = events[type] =
prepend ? [listener, existing] : [existing, listener];
// If we've already got an array, just append.
} else if (prepend) {
existing.unshift(listener);
} else {
existing.push(listener);
}
// Check for listener leak
m = _getMaxListeners(target);
if (m > 0 && existing.length > m && !existing.warned) {
existing.warned = true;
// No error code for this since it is a Warning
// eslint-disable-next-line no-restricted-syntax
var w = new Error('Possible EventEmitter memory leak detected. ' +
existing.length + ' ' + String(type) + ' listeners ' +
'added. Use emitter.setMaxListeners() to ' +
'increase limit');
w.name = 'MaxListenersExceededWarning';
w.emitter = target;
w.type = type;
w.count = existing.length;
ProcessEmitWarning(w);
}
}
return target;
}
EventEmitter.prototype.addListener = function addListener(type, listener) {
return _addListener(this, type, listener, false);
};
EventEmitter.prototype.on = EventEmitter.prototype.addListener;
EventEmitter.prototype.prependListener =
function prependListener(type, listener) {
return _addListener(this, type, listener, true);
};
function onceWrapper() {
if (!this.fired) {
this.target.removeListener(this.type, this.wrapFn);
this.fired = true;
if (arguments.length === 0)
return this.listener.call(this.target);
return this.listener.apply(this.target, arguments);
}
}
function _onceWrap(target, type, listener) {
var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener };
var wrapped = onceWrapper.bind(state);
wrapped.listener = listener;
state.wrapFn = wrapped;
return wrapped;
}
EventEmitter.prototype.once = function once(type, listener) {
checkListener(listener);
this.on(type, _onceWrap(this, type, listener));
return this;
};
EventEmitter.prototype.prependOnceListener =
function prependOnceListener(type, listener) {
checkListener(listener);
this.prependListener(type, _onceWrap(this, type, listener));
return this;
};
// Emits a 'removeListener' event if and only if the listener was removed.
EventEmitter.prototype.removeListener =
function removeListener(type, listener) {
var list, events, position, i, originalListener;
checkListener(listener);
events = this._events;
if (events === undefined)
return this;
list = events[type];
if (list === undefined)
return this;
if (list === listener || list.listener === listener) {
if (--this._eventsCount === 0)
this._events = Object.create(null);
else {
delete events[type];
if (events.removeListener)
this.emit('removeListener', type, list.listener || listener);
}
} else if (typeof list !== 'function') {
position = -1;
for (i = list.length - 1; i >= 0; i--) {
if (list[i] === listener || list[i].listener === listener) {
originalListener = list[i].listener;
position = i;
break;
}
}
if (position < 0)
return this;
if (position === 0)
list.shift();
else {
spliceOne(list, position);
}
if (list.length === 1)
events[type] = list[0];
if (events.removeListener !== undefined)
this.emit('removeListener', type, originalListener || listener);
}
return this;
};
EventEmitter.prototype.off = EventEmitter.prototype.removeListener;
EventEmitter.prototype.removeAllListeners =
function removeAllListeners(type) {
var listeners, events, i;
events = this._events;
if (events === undefined)
return this;
// not listening for removeListener, no need to emit
if (events.removeListener === undefined) {
if (arguments.length === 0) {
this._events = Object.create(null);
this._eventsCount = 0;
} else if (events[type] !== undefined) {
if (--this._eventsCount === 0)
this._events = Object.create(null);
else
delete events[type];
}
return this;
}
// emit removeListener for all listeners on all events
if (arguments.length === 0) {
var keys = Object.keys(events);
var key;
for (i = 0; i < keys.length; ++i) {
key = keys[i];
if (key === 'removeListener') continue;
this.removeAllListeners(key);
}
this.removeAllListeners('removeListener');
this._events = Object.create(null);
this._eventsCount = 0;
return this;
}
listeners = events[type];
if (typeof listeners === 'function') {
this.removeListener(type, listeners);
} else if (listeners !== undefined) {
// LIFO order
for (i = listeners.length - 1; i >= 0; i--) {
this.removeListener(type, listeners[i]);
}
}
return this;
};
function _listeners(target, type, unwrap) {
var events = target._events;
if (events === undefined)
return [];
var evlistener = events[type];
if (evlistener === undefined)
return [];
if (typeof evlistener === 'function')
return unwrap ? [evlistener.listener || evlistener] : [evlistener];
return unwrap ?
unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);
}
EventEmitter.prototype.listeners = function listeners(type) {
return _listeners(this, type, true);
};
EventEmitter.prototype.rawListeners = function rawListeners(type) {
return _listeners(this, type, false);
};
EventEmitter.listenerCount = function(emitter, type) {
if (typeof emitter.listenerCount === 'function') {
return emitter.listenerCount(type);
} else {
return listenerCount.call(emitter, type);
}
};
EventEmitter.prototype.listenerCount = listenerCount;
function listenerCount(type) {
var events = this._events;
if (events !== undefined) {
var evlistener = events[type];
if (typeof evlistener === 'function') {
return 1;
} else if (evlistener !== undefined) {
return evlistener.length;
}
}
return 0;
}
EventEmitter.prototype.eventNames = function eventNames() {
return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];
};
function arrayClone(arr, n) {
var copy = new Array(n);
for (var i = 0; i < n; ++i)
copy[i] = arr[i];
return copy;
}
function spliceOne(list, index) {
for (; index + 1 < list.length; index++)
list[index] = list[index + 1];
list.pop();
}
function unwrapListeners(arr) {
var ret = new Array(arr.length);
for (var i = 0; i < ret.length; ++i) {
ret[i] = arr[i].listener || arr[i];
}
return ret;
}
function once(emitter, name) {
return new Promise(function (resolve, reject) {
function errorListener(err) {
emitter.removeListener(name, resolver);
reject(err);
}
function resolver() {
if (typeof emitter.removeListener === 'function') {
emitter.removeListener('error', errorListener);
}
resolve([].slice.call(arguments));
};
eventTargetAgnosticAddListener(emitter, name, resolver, { once: true });
if (name !== 'error') {
addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true });
}
});
}
function addErrorHandlerIfEventEmitter(emitter, handler, flags) {
if (typeof emitter.on === 'function') {
eventTargetAgnosticAddListener(emitter, 'error', handler, flags);
}
}
function eventTargetAgnosticAddListener(emitter, name, listener, flags) {
if (typeof emitter.on === 'function') {
if (flags.once) {
emitter.once(name, listener);
} else {
emitter.on(name, listener);
}
} else if (typeof emitter.addEventListener === 'function') {
// EventTarget does not have `error` event semantics like Node
// EventEmitters, we do not listen for `error` events here.
emitter.addEventListener(name, function wrapListener(arg) {
// IE does not have builtin `{ once: true }` support so we
// have to do it manually.
if (flags.once) {
emitter.removeEventListener(name, wrapListener);
}
listener(arg);
});
} else {
throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof emitter);
}
}
/***/ }),
/***/ "./node_modules/react-dom/client.js":
/*!******************************************!*\
!*** ./node_modules/react-dom/client.js ***!
\******************************************/
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
"use strict";
var m = __webpack_require__(/*! react-dom */ "react-dom");
if (false) {} else {
var i = m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
exports.createRoot = function(c, o) {
i.usingClientEntryPoint = true;
try {
return m.createRoot(c, o);
} finally {
i.usingClientEntryPoint = false;
}
};
exports.hydrateRoot = function(c, h, o) {
i.usingClientEntryPoint = true;
try {
return m.hydrateRoot(c, h, o);
} finally {
i.usingClientEntryPoint = false;
}
};
}
/***/ }),
/***/ "./node_modules/reaxes-react/esm/index.js":
/*!************************************************!*\
!*** ./node_modules/reaxes-react/esm/index.js ***!
\************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ Reaxlass: () => (/* binding */ qe),
/* harmony export */ reaxper: () => (/* binding */ We)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var mobx__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! mobx */ "mobx");
/* harmony import */ var mobx__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(mobx__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react-dom */ "react-dom");
/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_2__);
var n={649:r=>{r.exports=react__WEBPACK_IMPORTED_MODULE_0__}},o={};function a(e){var r=o[e];if(void 0!==r)return r.exports;var t=o[e]={exports:{}};return n[e](t,t.exports,a),t.exports}a.d=(e,r)=>{for(var t in r)a.o(r,t)&&!a.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},a.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r);var i={};a.d(i,{W:()=>ze,i:()=>Ce});const u=(e=>{var r={};return a.d(r,e),r})({$mobx:()=>mobx__WEBPACK_IMPORTED_MODULE_1__.$mobx,Reaction:()=>mobx__WEBPACK_IMPORTED_MODULE_1__.Reaction,_allowStateChanges:()=>mobx__WEBPACK_IMPORTED_MODULE_1__._allowStateChanges,_allowStateReadsEnd:()=>mobx__WEBPACK_IMPORTED_MODULE_1__._allowStateReadsEnd,_allowStateReadsStart:()=>mobx__WEBPACK_IMPORTED_MODULE_1__._allowStateReadsStart,configure:()=>mobx__WEBPACK_IMPORTED_MODULE_1__.configure,createAtom:()=>mobx__WEBPACK_IMPORTED_MODULE_1__.createAtom,getDependencyTree:()=>mobx__WEBPACK_IMPORTED_MODULE_1__.getDependencyTree,isObservableArray:()=>mobx__WEBPACK_IMPORTED_MODULE_1__.isObservableArray,isObservableMap:()=>mobx__WEBPACK_IMPORTED_MODULE_1__.isObservableMap,isObservableObject:()=>mobx__WEBPACK_IMPORTED_MODULE_1__.isObservableObject,makeObservable:()=>mobx__WEBPACK_IMPORTED_MODULE_1__.makeObservable,untracked:()=>mobx__WEBPACK_IMPORTED_MODULE_1__.untracked});var c=a(649);if(!c.useState)throw new Error("mobx-react-lite requires React with Hooks support");if(!u.makeObservable)throw new Error("mobx-react-lite@3 requires mobx at least version 6 to be available");const f=(e=>{var r={};return a.d(r,e),r})({unstable_batchedUpdates:()=>react_dom__WEBPACK_IMPORTED_MODULE_2__.unstable_batchedUpdates});function l(e){e()}function s(e){return(0,u.getDependencyTree)(e)}var p="undefined"==typeof FinalizationRegistry?void 0:FinalizationRegistry;function y(e){return{reaction:e,mounted:!1,changedBeforeMount:!1,cleanAt:Date.now()+d}}var d=1e4;function b(e,r){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=function(e,r){if(!e)return;if("string"==typeof e)return m(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return m(e,r)}(e))||r&&e&&"number"==typeof e.length){t&&(e=t);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,u=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return i=e.done,e},e:function(e){u=!0,a=e},f:function(){try{i||null==t.return||t.return()}finally{if(u)throw a}}}}function m(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}var v=p?function(e){var r=new Map,t=1,n=new e((function(e){var t=r.get(e);t&&(t.reaction.dispose(),r.delete(e))}));return{addReactionToTrack:function(e,o,a){var i=t++;return n.register(a,i,e),e.current=y(o),e.current.finalizationRegistryCleanupToken=i,r.set(i,e.current),e.current},recordReactionAsCommitted:function(e){n.unregister(e),e.current&&e.current.finalizationRegistryCleanupToken&&r.delete(e.current.finalizationRegistryCleanupToken)},forceCleanupTimerToRunNowForTests:function(){},resetCleanupScheduleForTests:function(){}}}(p):function(){var e,r=new Set;function t(){void 0===e&&(e=setTimeout(n,1e4))}function n(){e=void 0;var n=Date.now();r.forEach((function(e){var t=e.current;t&&n>=t.cleanAt&&(t.reaction.dispose(),e.current=null,r.delete(e))})),r.size>0&&t()}return{addReactionToTrack:function(e,n,o){var a;return e.current=y(n),a=e,r.add(a),t(),e.current},recordReactionAsCommitted:function(e){r.delete(e)},forceCleanupTimerToRunNowForTests:function(){e&&(clearTimeout(e),n())},resetCleanupScheduleForTests:function(){if(r.size>0){var t,n=b(r);try{for(n.s();!(t=n.n()).done;){var o=t.value,a=o.current;a&&(a.reaction.dispose(),o.current=null)}}catch(e){n.e(e)}finally{n.f()}r.clear()}e&&(clearTimeout(e),e=void 0)}}}(),h=v.addReactionToTrack,w=v.recordReactionAsCommitted,g=(v.resetCleanupScheduleForTests,v.forceCleanupTimerToRunNowForTests,!1);function S(){return g}var O=a(649);function j(e){return j="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},j(e)}function R(e,r){return function(e){if(Array.isArray(e))return e}(e)||function(e,r){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,o,a,i,u=[],c=!0,f=!1;try{if(a=(t=t.call(e)).next,0===r){if(Object(t)!==t)return;c=!1}else for(;!(c=(n=a.call(t)).done)&&(u.push(n.value),u.length!==r);c=!0);}catch(e){f=!0,o=e}finally{try{if(!c&&null!=t.return&&(i=t.return(),Object(i)!==i))return}finally{if(f)throw o}}return u}}(e,r)||function(e,r){if(!e)return;if("string"==typeof e)return T(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return T(e,r)}(e,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function T(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function x(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,(o=n.key,a=void 0,a=function(e,r){if("object"!==j(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,r||"default");if("object"!==j(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}(o,"string"),"symbol"===j(a)?a:String(a)),n)}var o,a}function P(e,r,t){return r&&x(e.prototype,r),t&&x(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function k(e){return"observer".concat(e)}var A=P((function e(){!function(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}(this,e)}));function E(){return new A}function _(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"observed";if(S())return e();var t=R(O.useState(E),1)[0],n=R(O.useState(),2)[1],o=function(){return n([])},a=O.useRef(null);if(!a.current)var i=new u.Reaction(k(r),(function(){c.mounted?o():c.changedBeforeMount=!0})),c=h(a,i,t);var f,l,p=a.current.reaction;if(O.useDebugValue(p,s),O.useEffect((function(){return w(a),a.current?(a.current.mounted=!0,a.current.changedBeforeMount&&(a.current.changedBeforeMount=!1,o())):(a.current={reaction:new u.Reaction(k(r),(function(){o()})),mounted:!0,changedBeforeMount:!1,cleanAt:1/0},o()),function(){a.current.reaction.dispose(),a.current=null}}),[]),p.track((function(){try{f=e()}catch(e){l=e}})),l)throw l;return f}var C="function"==typeof Symbol&&Symbol.for,$=C?Symbol.for("react.forward_ref"):"function"==typeof c.forwardRef&&(0,c.forwardRef)((function(e){return null})).$$typeof,M=C?Symbol.for("react.memo"):"function"==typeof c.memo&&(0,c.memo)((function(e){return null})).$$typeof;function U(e,r){var t;if(M&&e.$$typeof===M)throw new Error("[mobx-react-lite] You are trying to use `observer` on a function component wrapped in either another `observer` or `React.memo`. The observer already applies 'React.memo' for you.");if(S())return e;var n=null!==(t=null==r?void 0:r.forwardRef)&&void 0!==t&&t,o=e,a=e.displayName||e.name;if($&&e.$$typeof===$&&(n=!0,"function"!=typeof(o=e.render)))throw new Error("[mobx-react-lite] `render` property of ForwardRef was not a function");var i,u,f=function(e,r){return _((function(){return o(e,r)}),a)};return""!==a&&(f.displayName=a),e.contextTypes&&(f.contextTypes=e.contextTypes),n&&(f=(0,c.forwardRef)(f)),i=e,u=f=(0,c.memo)(f),Object.keys(i).forEach((function(e){N[e]||Object.defineProperty(u,e,Object.getOwnPropertyDescriptor(i,e))})),f}var N={$$typeof:!0,render:!0,compare:!0,type:!0,displayName:!0};var I=a(649);function D(e){return D="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},D(e)}function B(e,r){return function(e){if(Array.isArray(e))return e}(e)||function(e,r){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,o,a,i,u=[],c=!0,f=!1;try{if(a=(t=t.call(e)).next,0===r){if(Object(t)!==t)return;c=!1}else for(;!(c=(n=a.call(t)).done)&&(u.push(n.value),u.length!==r);c=!0);}catch(e){f=!0,o=e}finally{try{if(!c&&null!=t.return&&(i=t.return(),Object(i)!==i))return}finally{if(f)throw o}}return u}}(e,r)||function(e,r){if(!e)return;if("string"==typeof e)return F(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return F(e,r)}(e,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function F(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function z(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,(o=n.key,a=void 0,a=function(e,r){if("object"!==D(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,r||"default");if("object"!==D(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}(o,"string"),"symbol"===D(a)?a:String(a)),n)}var o,a}function q(e,r,t){return r&&z(e.prototype,r),t&&z(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function W(e){return"observer".concat(e)}var H=q((function e(){!function(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}(this,e)}));function X(){return new H}function Y(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"observed",t=arguments.length>2?arguments[2]:void 0;if(S())return e();var n=B(I.useState(X),1)[0],o=B(I.useState(),2)[1],a=function(){return t.forceUpdate()},i=I.useRef(null);if(!i.current)var c=new u.Reaction(W(r),(function(){f.mounted?(a(),o([])):f.changedBeforeMount=!0})),f=h(i,c,n);var l,p,y=i.current.reaction;if(I.useDebugValue(y,s),I.useEffect((function(){return w(i),i.current?(i.current.mounted=!0,i.current.changedBeforeMount&&(i.current.changedBeforeMount=!1,a())):(i.current={reaction:new u.Reaction(W(r),(function(){a()})),mounted:!0,changedBeforeMount:!1,cleanAt:1/0},a()),function(){i.current.reaction.dispose(),i.current=null}}),[]),y.track((function(){try{l=e()}catch(e){p=e}})),p)throw p;return l}var L="function"==typeof Symbol&&Symbol.for,V=L?Symbol.for("react.forward_ref"):"function"==typeof c.forwardRef&&(0,c.forwardRef)((function(e){return null})).$$typeof,G=L?Symbol.for("react.memo"):"function"==typeof c.memo&&(0,c.memo)((function(e){return null})).$$typeof;function J(e,r){var t;if(G&&e.$$typeof===G)throw new Error("[mobx-react-lite] You are trying to use `observer` on a function component wrapped in either another `observer` or `React.memo`. The observer already applies 'React.memo' for you.");if(S())return e;var n=null!==(t=null==r?void 0:r.forwardRef)&&void 0!==t&&t,o=e,a=e.displayName||e.name;if(V&&e.$$typeof===V&&(n=!0,"function"!=typeof(o=e.render)))throw new Error("[mobx-react-lite] `render` property of ForwardRef was not a function");var i,u,f=function(e,r){return Y((function(){return o(e,r)}),a,e.instance)};return""!==a&&(f.displayName=a),e.contextTypes&&(f.contextTypes=e.contextTypes),n&&(f=(0,c.forwardRef)(f)),i=e,u=f,Object.keys(i).forEach((function(e){Q[e]||Object.defineProperty(u,e,Object.getOwnPropertyDescriptor(i,e))})),f}var K,Q={$$typeof:!0,render:!0,compare:!0,type:!0,displayName:!0};function Z(e,r,t){return(r=function(e){var r=function(e,r){if("object"!==ee(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,r||"default");if("object"!==ee(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}(e,"string");return"symbol"===ee(r)?r:String(r)}(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function ee(e){return ee="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ee(e)}(K=f.unstable_batchedUpdates)||(K=l),(0,u.configure)({reactionScheduler:K});var re=0;var te={};function ne(e){return te[e]||(te[e]=function(e){if("function"==typeof Symbol)return Symbol(e);var r="__$mobx-react ".concat(e," (").concat(re,")");return re++,r}(e)),te[e]}function oe(e,r){if(ae(e,r))return!0;if("object"!==ee(e)||null===e||"object"!==ee(r)||null===r)return!1;var t=Object.keys(e),n=Object.keys(r);if(t.length!==n.length)return!1;for(var o=0;o<t.length;o++)if(!Object.hasOwnProperty.call(r,t[o])||!ae(e[t[o]],r[t[o]]))return!1;return!0}function ae(e,r){return e===r?0!==e||1/e==1/r:e!=e&&r!=r}function ie(e,r,t){Object.hasOwnProperty.call(e,r)?e[r]=t:Object.defineProperty(e,r,{enumerable:!1,configurable:!0,writable:!0,value:t})}var ue=ne("patchMixins"),ce=ne("patchedDefinition");function fe(e,r){for(var t=this,n=arguments.length,o=new Array(n>2?n-2:0),a=2;a<n;a++)o[a-2]=arguments[a];r.locks++;try{var i;return null!=e&&(i=e.apply(this,o)),i}finally{r.locks--,0===r.locks&&r.methods.forEach((function(e){e.apply(t,o)}))}}function le(e,r){return function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];fe.call.apply(fe,[this,e,r].concat(n))}}function se(e,r,t){var n=function(e,r){var t=e[ue]=e[ue]||{},n=t[r]=t[r]||{};return n.locks=n.locks||0,n.methods=n.methods||[],n}(e,r);n.methods.indexOf(t)<0&&n.methods.push(t);var o=Object.getOwnPropertyDescriptor(e,r);if(!o||!o[ce]){var a=e[r],i=pe(e,r,o?o.enumerable:void 0,n,a);Object.defineProperty(e,r,i)}}function pe(e,r,t,n,o){var a,i=le(o,n);return Z(a={},ce,!0),Z(a,"get",(function(){return i})),Z(a,"set",(function(o){if(this===e)i=le(o,n);else{var a=pe(this,r,t,n,o);Object.defineProperty(this,r,a)}})),Z(a,"configurable",!0),Z(a,"enumerable",t),a}var ye=u.$mobx||"$mobx",de=ne("isMobXReactObserver"),be=ne("isUnmounted"),me=ne("skipRender"),ve=ne("isForcingUpdate");function he(e){var r=e.prototype;if(e[de]){var t=we(r);console.warn("The provided component class (".concat(t,")\n has already been declared as an observer component."))}else e[de]=!0;if(r.componentWillReact)throw new Error("The componentWillReact life-cycle event is no longer supported");if(e.__proto__!==c.PureComponent)if(r.shouldComponentUpdate){if(r.shouldComponentUpdate!==Se)throw new Error("It is not allowed to use shouldComponentUpdate in observer based components.")}else r.shouldComponentUpdate=Se;Oe(r,"props"),Oe(r,"state"),e.contextType&&Oe(r,"context");var n=r.render;if("function"!=typeof n){var o=we(r);throw new Error("[mobx-react] class component (".concat(o,") is missing `render` method.")+"\n`observer` requires `render` being a function defined on prototype.\n`render = () => {}` or `render = function() {}` is not supported.")}return r.render=function(){return ge.call(this,n)},se(r,"componentWillUnmount",(function(){var e;if(!0!==S()&&(null===(e=this.render[ye])||void 0===e||e.dispose(),this[be]=!0,!this.render[ye])){var r=we(this);console.warn("The reactive render of an observer class component (".concat(r,")\n was overriden after MobX attached. This may result in a memory leak if the\n overriden reactive render was not properly disposed."))}})),e}function we(e){return e.displayName||e.name||e.constructor&&(e.constructor.displayName||e.constructor.name)||"<component>"}function ge(e){var r=this;if(!0===S())return e.call(this);ie(this,me,!1),ie(this,ve,!1);var t=we(this),n=e.bind(this),o=!1,a=new u.Reaction("".concat(t,".render()"),(function(){if(!o&&(o=!0,!0!==r[be])){var e=!0;try{ie(r,ve,!0),r[me]||c.Component.prototype.forceUpdate.call(r),e=!1}finally{ie(r,ve,!1),e&&a.dispose()}}}));function i(){o=!1;var e=void 0,r=void 0;if(a.track((function(){try{r=(0,u._allowStateChanges)(!1,n)}catch(r){e=r}})),e)throw e;return r}return a.reactComponent=this,i[ye]=a,this.render=i,i.call(this)}function Se(e,r){return S()&&console.warn("[mobx-react] It seems that a re-rendering of a React component is triggered while in static (server-side) mode. Please make sure components are rendered only once server-side."),this.state!==r||!oe(this.props,e)}function Oe(e,r){var t=ne("reactProp_".concat(r,"_valueHolder")),n=ne("reactProp_".concat(r,"_atomHolder"));function o(){return this[n]||ie(this,n,(0,u.createAtom)("reactive "+r)),this[n]}Object.defineProperty(e,r,{configurable:!0,enumerable:!0,get:function(){var e=!1;return u._allowStateReadsStart&&u._allowStateReadsEnd&&(e=(0,u._allowStateReadsStart)(!0)),o.call(this).reportObserved(),u._allowStateReadsStart&&u._allowStateReadsEnd&&(0,u._allowStateReadsEnd)(e),this[t]},set:function(e){this[ve]||oe(this[t],e)?ie(this,t,e):(ie(this,t,e),ie(this,me,!0),o.call(this).reportChanged(),ie(this,me,!1))}})}var je=a(649);je.createContext({});ne("disposeOnUnmountProto"),ne("disposeOnUnmountInst");function Re(e){return Re="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Re(e)}function Te(e){function r(r,t,n,o,a,i){for(var c=arguments.length,f=new Array(c>6?c-6:0),l=6;l<c;l++)f[l-6]=arguments[l];return(0,u.untracked)((function(){if(o=o||"<<anonymous>>",i=i||n,null==t[n]){if(r){var u=null===t[n]?"null":"undefined";return new Error("The "+a+" `"+i+"` is marked as required in `"+o+"`, but its value is `"+u+"`.")}return null}return e.apply(void 0,[t,n,o,a,i].concat(f))}))}var t=r.bind(null,!1);return t.isRequired=r.bind(null,!0),t}function xe(e){var r=Re(e);return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,r){return"symbol"===e||"Symbol"===r["@@toStringTag"]||"function"==typeof Symbol&&r instanceof Symbol}(r,e)?"symbol":r}function Pe(e,r){return Te((function(t,n,o,a,i){return(0,u.untracked)((function(){if(e&&xe(t[n])===r.toLowerCase())return null;var a;switch(r){case"Array":a=u.isObservableArray;break;case"Object":a=u.isObservableObject;break;case"Map":a=u.isObservableMap;break;default:throw new Error("Unexpected mobxType: ".concat(r))}var c=t[n];if(!a(c)){var f=function(e){var r=xe(e);if("object"===r){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return r}(c),l=e?" or javascript `"+r.toLowerCase()+"`":"";return new Error("Invalid prop `"+i+"` of type `"+f+"` supplied to `"+o+"`, expected `mobx.Observable"+r+"`"+l+".")}return null}))}))}function ke(e,r){return Te((function(t,n,o,a,i){for(var c=arguments.length,f=new Array(c>5?c-5:0),l=5;l<c;l++)f[l-5]=arguments[l];return(0,u.untracked)((function(){if("function"!=typeof r)return new Error("Property `"+i+"` of component `"+o+"` has invalid PropType notation.");var u=Pe(e,"Array")(t,n,o,a,i);if(u instanceof Error)return u;for(var c=t[n],l=0;l<c.length;l++)if((u=r.apply(void 0,[c,l,o,a,i+"["+l+"]"].concat(f)))instanceof Error)return u;return null}))}))}Pe(!1,"Array"),ke.bind(null,!1),Pe(!1,"Map"),Pe(!1,"Object"),Pe(!0,"Array"),ke.bind(null,!0),Pe(!0,"Object");var Ae=a(649);function Ee(e){var r;if(null===(r=e.prototype)||void 0===r||!r.render)return U(e);if(Object.getOwnPropertySymbols(e).find((function(e){return"isMobXReactObserver"===e.description})))return e;var t=e.prototype.render;function n(e,r){var n=e.instance;return t.call(n)}var o=e.displayName||e.name||"Component";n.displayName=o+"Hooks";var a,i=J(n);return e.prototype.render=function(){return Ae.createElement(i,{instance:this})},!0===(a=e).isMobxInjector&&console.warn("Mobx observer: You are trying to use `observer` on a component that already has `inject`. Please apply `observer` before applying `inject`"),he(a)}var _e=Symbol(""),Ce=function(e){if(e.hasOwnProperty(_e))return e;var r,t=((r=[Ee]).length,1===r.length?r[0]:r.reduce((function(e,r){return function(){return e(r.apply(void 0,arguments))}})))(e);return t[_e]=!0,t};function $e(e){return $e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$e(e)}function Me(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Fe(n.key),n)}}function Ue(e,r){return Ue=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,r){return e.__proto__=r,e},Ue(e,r)}function Ne(e){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var t,n=De(e);if(r){var o=De(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return function(e,r){if(r&&("object"===$e(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return Ie(e)}(this,t)}}function Ie(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function De(e){return De=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},De(e)}function Be(e,r,t){return(r=Fe(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function Fe(e){var r=function(e,r){if("object"!==$e(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,r||"default");if("object"!==$e(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}(e,"string");return"symbol"===$e(r)?r:String(r)}var ze=function(){!function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),r&&Ue(e,r)}(o,c.Component);var e,r,t,n=Ne(o);function o(){var e;!function(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}(this,o);for(var r=arguments.length,t=new Array(r),a=0;a<r;a++)t[a]=arguments[a];return Be(Ie(e=n.call.apply(n,[this].concat(t))),"mountedStack",[]),Be(Ie(e),"unmountStack",[]),Be(Ie(e),"updatedStack",[]),Be(Ie(e),"renderedStack",[]),e}return e=o,r&&Me(e.prototype,r),t&&Me(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(),qe=i.W,We=i.i;
//# sourceMappingURL=index.js.map
/***/ }),
/***/ "./node_modules/reaxes-utils/esm/index.js":
/*!************************************************!*\
!*** ./node_modules/reaxes-utils/esm/index.js ***!
\************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ Timer: () => (/* binding */ B),
/* harmony export */ assert: () => (/* binding */ H),
/* harmony export */ assert1of: () => (/* binding */ J),
/* harmony export */ assert1ofFalse: () => (/* binding */ V),
/* harmony export */ assert1ofTrue: () => (/* binding */ X),
/* harmony export */ assertFalse: () => (/* binding */ _),
/* harmony export */ assertTrue: () => (/* binding */ tt),
/* harmony export */ asyncCall: () => (/* binding */ rt),
/* harmony export */ crayon: () => (/* binding */ et),
/* harmony export */ decodeQueryString: () => (/* binding */ nt),
/* harmony export */ encodeQueryString: () => (/* binding */ ot),
/* harmony export */ makePair: () => (/* binding */ it),
/* harmony export */ shallowEqual: () => (/* binding */ at),
/* harmony export */ xImport: () => (/* binding */ ct),
/* harmony export */ xPromise: () => (/* binding */ ut)
/* harmony export */ });
var t={d:(r,e)=>{for(var n in e)t.o(e,n)&&!t.o(r,n)&&Object.defineProperty(r,n,{enumerable:!0,get:e[n]})},o:(t,r)=>Object.prototype.hasOwnProperty.call(t,r)},r={};function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e(t)}function n(t,r){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),e.push.apply(e,n)}return e}function o(t,r,n){return(r=function(t){var r=function(t,r){if("object"!==e(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,r||"default");if("object"!==e(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"===e(r)?r:String(r)}(r))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}t.d(r,{M4:()=>L,vA:()=>F,fK:()=>Y,Yu:()=>R,hl:()=>z,cc:()=>K,De:()=>G,Zp:()=>l,hT:()=>b,mA:()=>Q,G4:()=>U,xP:()=>P,bN:()=>u,IW:()=>i,a6:()=>a});var i=function(t){var r=Object.keys(t),e=r.map((function(r){return t[r]}));return Promise.all(e).then((function(e){for(var i=function(t){for(var r=1;r<arguments.length;r++){var e=null!=arguments[r]?arguments[r]:{};r%2?n(Object(e),!0).forEach((function(r){o(t,r,e[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):n(Object(e)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))}))}return t}({},t),a=0,c=r;a<c.length;a++){var u=c[a];i[u]=e[u]}return i}))},a=function(t){var r,e,n=new Promise((function(n,o){r=n,e=o,"function"==typeof t&&t(n,o)}));return Object.assign(n,{resolve:r,reject:e})};function c(t){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c(t)}function u(t,r,e,n){var o=e?e.call(n,t,r):void 0;if(void 0!==o)return!!o;if(t===r)return!0;if("object"!==c(t)||!t||"object"!==c(r)||!r)return!1;var i=Object.keys(t),a=Object.keys(r);if(i.length!==a.length)return!1;for(var u=Object.prototype.hasOwnProperty.bind(r),l=0;l<i.length;l++){var f=i[l];if(!u(f))return!1;var s=t[f],y=r[f];if(!1===(o=e?e.call(n,s,y,f):void 0)||void 0===o&&s!==y)return!1}return!0}var l=function(t){var r;switch(!0){case"function"==typeof queueMicrotask:r=queueMicrotask;break;case!("function"!=typeof Promise||!Promise.resolve):r=function(t){return Promise.resolve().then(t)};break;default:r=setTimeout}r(t)};function f(t){return function(t){if(Array.isArray(t))return s(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,r){if(!t)return;if("string"==typeof t)return s(t,r);var e=Object.prototype.toString.call(t).slice(8,-1);"Object"===e&&t.constructor&&(e=t.constructor.name);if("Map"===e||"Set"===e)return Array.from(t);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return s(t,r)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(t,r){(null==r||r>t.length)&&(r=t.length);for(var e=0,n=new Array(r);e<r;e++)n[e]=t[e];return n}var y=function(t){return t.replace(/([A-Z])/g,"-$1").toLowerCase()},p=function(t){for(var r=arguments.length,e=new Array(r>1?r-1:0),n=1;n<r;n++)e[n-1]=arguments[n];return e.reduce((function(t,r,e){return t[0]+="string"==typeof r?r:(t.push(r),"%o"),t}),["%c",t])},b=new Proxy((function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(){var r,e=Object.keys(t).reduce((function(r,e){return"".concat(r).concat(String(y(e)),":").concat(t[e],";")}),"");e.includes("font-weight")||(e+="font-weight:normal;");for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];(r=console).groupCollapsed.apply(r,f(p.apply(void 0,[e].concat(o)))),console.trace("%c","font-weight:normal;"),console.groupEnd()}}),{get:function(t,r,e){if(["prototype","hasOwnProperty","toString","prototype","length","name","arguments","constructor","isPrototypeOf","apply","call","bind"].includes(r))return t[r];var n=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"trace";return new Proxy((function(){for(var e,n,o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return"trace"===t?((n=console).groupCollapsed.apply(n,f(p.apply(void 0,["color:".concat(r,";font-weight:normal;")].concat(i)))),console.trace("%c","font-weight:normal;"),void console.groupEnd()):(e=console)[t].apply(e,f(p.apply(void 0,["color:".concat(r)].concat(i))))}),{get:function(e,n,o){return function(){for(var e,o,i=arguments.length,a=new Array(i),c=0;c<i;c++)a[c]=arguments[c];if("trace"===t)return(o=console).groupCollapsed.apply(o,f(p.apply(void 0,["color:".concat(n,";font-weight:normal;")].concat(a)))),console.trace("%c","font-weight:normal;"),void console.groupEnd();if("apply"===n){var u,l,s=a[1];return"trace"===t?((l=console).groupCollapsed.apply(l,f(p.apply(void 0,["color:".concat(r)].concat(f(s))))),console.trace("%c","font-weight:normal;"),void console.groupEnd()):(u=console)[t].apply(u,f(p.apply(void 0,["color:".concat(r)].concat(f(s)))))}return(e=console)[t].apply(e,f(p.apply(void 0,["color:".concat(n.toString())].concat(a))))}}})};return["trace","warn","log","info","error","debug","assert","clear","count","countReset","dir","dirxml","table"].includes(r)?n(r):n("trace")}});function v(t){return function(t){if(Array.isArray(t))return h(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||m(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function m(t,r){if(t){if("string"==typeof t)return h(t,r);var e=Object.prototype.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?h(t,r):void 0}}function h(t,r){(null==r||r>t.length)&&(r=t.length);for(var e=0,n=new Array(r);e<r;e++)n[e]=t[e];return n}var d,g,w,S,j,O,A,P=function(t){for(var r=arguments.length,e=new Array(r>1?r-1:0),n=1;n<r;n++)e[n-1]=arguments[n];return[t].concat(v(e.map((function(r){if("function"==typeof r)return r(t)}))))},T=P({a:1,b:2},(function(t){return[t.a,"sdad"]})),k=(g=2,function(t){if(Array.isArray(t))return t}(d=T)||function(t,r){var e=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=e){var n,o,i,a,c=[],u=!0,l=!1;try{if(i=(e=e.call(t)).next,0===r){if(Object(e)!==e)return;u=!1}else for(;!(u=(n=i.call(e)).done)&&(c.push(n.value),c.length!==r);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=e.return&&(a=e.return(),Object(a)!==a))return}finally{if(l)throw o}}return c}}(d,g)||m(d,g)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}());k[0],k[1];function E(t){return E="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},E(t)}function x(t,r){for(var e=0;e<r.length;e++){var n=r[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,I(n.key),n)}}function I(t){var r=function(t,r){if("object"!==E(t)||null===t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,r||"default");if("object"!==E(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"===E(r)?r:String(r)}function M(t,r,e){!function(t,r){if(r.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t,r),r.set(t,e)}function C(t,r){return function(t,r){if(r.get)return r.get.call(t);return r.value}(t,D(t,r,"get"))}function W(t,r,e){return function(t,r,e){if(r.set)r.set.call(t,e);else{if(!r.writable)throw new TypeError("attempted to set read only private field");r.value=e}}(t,D(t,r,"set"),e),e}function D(t,r,e){if(!r.has(t))throw new TypeError("attempted to "+e+" private field on non-instance");return r.get(t)}var L=(w=new WeakMap,S=new WeakMap,j=new WeakMap,O=new WeakMap,A=new WeakMap,function(){function t(){var r=this;!function(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,t),M(this,w,{writable:!0,value:[]}),M(this,S,{writable:!0,value:0}),M(this,j,{writable:!0,value:void 0}),M(this,O,{writable:!0,value:void 0}),M(this,A,{writable:!0,value:!1}),function(t,r,e){(r=I(r))in t?Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[r]=e}(this,"start",(function(t){return t<=0?console.error("timer.start值是负数! :>",t):!0!==C(r,A)?(W(r,S,t),C(r,j).call(r),r):void 0}));W(this,j,(function t(){W(r,A,!0),C(r,S)>=1e3?W(r,O,setTimeout((function(){W(r,S,C(r,S)-1e3),t(),C(r,w).forEach((function(t){try{t(C(r,S))}catch(r){console.error(r,"Timer 订阅运行时错误: 当前执行函数名>".concat(t.name))}}))}),1e3)):(W(r,O,setTimeout((function(){W(r,S,0),C(r,w).forEach((function(t){try{t(C(r,S))}catch(r){console.error(r,"Timer 订阅运行时错误: 当前执行函数名>".concat(t.name))}}))}),C(r,S))),W(r,A,!1)),C(r,w).forEach((function(t){try{t(C(r,S))}catch(r){console.error(r,"Timer 订阅运行时错误: 当前执行函数名>".concat(t.name))}}))}))}var r,e,n;return r=t,(e=[{key:"subscribe",value:function(t){return!C(this,w).includes(t)&&C(this,w).push(t),this}},{key:"unsubscribe",value:function(t){return C(this,w).splice(C(this,w).indexOf(t),1),this}},{key:"destroy",value:function(){}},{key:"stop",value:function(){return clearTimeout(C(this,O)),W(this,S,0),W(this,A,!1),this}}])&&x(r.prototype,e),n&&x(r,n),Object.defineProperty(r,"prototype",{writable:!1}),t}());function N(t){return N="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},N(t)}function $(t,r){return function(t){if(Array.isArray(t))return t}(t)||function(t,r){var e=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=e){var n,o,i,a,c=[],u=!0,l=!1;try{if(i=(e=e.call(t)).next,0===r){if(Object(e)!==e)return;u=!1}else for(;!(u=(n=i.call(e)).done)&&(c.push(n.value),c.length!==r);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=e.return&&(a=e.return(),Object(a)!==a))return}finally{if(l)throw o}}return c}}(t,r)||function(t,r){if(!t)return;if("string"==typeof t)return q(t,r);var e=Object.prototype.toString.call(t).slice(8,-1);"Object"===e&&t.constructor&&(e=t.constructor.name);if("Map"===e||"Set"===e)return Array.from(t);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return q(t,r)}(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function q(t,r){(null==r||r>t.length)&&(r=t.length);for(var e=0,n=new Array(r);e<r;e++)n[e]=t[e];return n}var Q=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:location.href;try{if(t.includes("?")){var r=$(t.split("?"),2);t=r[1]}if(t.includes("/")){var e=$(t.split("/"),1);t=e[0]}if(!t.includes("="))return{};if(t.includes("&"))return t.split("&").reduce((function(t,r){var e=$(r.split("="),2),n=e[0],o=e[1];return t[n]=o,t}),{});var n={},o=$(t.split("="),2),i=o[0],a=o[1];return n[i]=a,n}catch(r){throw console.error("decodeQueryString -> 转换失败 , 原始字符串为 : ".concat(t)),console.error(r),""}},U=function(t){var r="";for(var e in t){var n=t[e];if("object"===N(n)&&null!==n)throw"暂不支持嵌套对象";if("symbol"===N(e))throw"不支持key为Symbol";r="".concat(r).concat(r&&"&").concat(e,"=").concat(n)}return r},Z=function(t){return"string"==typeof t?'"'.concat(t,'"'):t},F=function(t,r){for(var e=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=0;n<r.length;n++){var o=r[n];if(o!==t)return e&&b.coral("断言组第 ",n," 个表达式不符合预期为 ",Z(t)," 的结果, expressionList[",n,"]: ",Z(o)),!1}return!0},G=function(t){return F(!0,t,arguments.length>1&&void 0!==arguments[1]&&arguments[1])},K=function(t){return F(!1,t,arguments.length>1&&void 0!==arguments[1]&&arguments[1])},Y=function(t,r){for(var e=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=0;n<r.length;n++){var o=r[n];if(o===t)return e&&b["#81cc00"]("断言组第 ",n," 个表达式符合预期为 ",Z(t)," 的结果, expressionList[",n,"]: ",Z(o)),!0}return e&&b.coral("断言组每个值都不符合预期为 ",Z(t)," 的结果, expressionList: ",Z(r)),!1},z=function(t){return Y(!0,t,arguments.length>1&&void 0!==arguments[1]&&arguments[1])},R=function(t){return Y(!1,t,arguments.length>1&&void 0!==arguments[1]&&arguments[1])},B=r.M4,H=r.vA,J=r.fK,V=r.Yu,X=r.hl,_=r.cc,tt=r.De,rt=r.Zp,et=r.hT,nt=r.mA,ot=r.G4,it=r.xP,at=r.bN,ct=r.IW,ut=r.a6;
//# sourceMappingURL=index.js.map
/***/ }),
/***/ "./node_modules/reaxes/esm/index.js":
/*!******************************************!*\
!*** ./node_modules/reaxes/esm/index.js ***!
\******************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ collectDeps: () => (/* binding */ v),
/* harmony export */ createReaxable: () => (/* binding */ p),
/* harmony export */ distinctCallback: () => (/* binding */ b),
/* harmony export */ obsReaction: () => (/* binding */ m),
/* harmony export */ reaxel: () => (/* binding */ w)
/* harmony export */ });
/* harmony import */ var mobx__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! mobx */ "mobx");
/* harmony import */ var mobx__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(mobx__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash */ "lodash");
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var reaxes_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! reaxes-utils */ "./node_modules/reaxes-utils/esm/index.js");
var n={d:(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},o={};n.d(o,{pt:()=>d,Hp:()=>i,MM:()=>l,uh:()=>f,WW:()=>c});const a=(e=>{var t={};return n.d(t,e),t})({action:()=>mobx__WEBPACK_IMPORTED_MODULE_0__.action,observable:()=>mobx__WEBPACK_IMPORTED_MODULE_0__.observable,reaction:()=>mobx__WEBPACK_IMPORTED_MODULE_0__.reaction});const u=(e=>{var t={};return n.d(t,e),t})({default:()=>(lodash__WEBPACK_IMPORTED_MODULE_1___default())});var i=function(e){var t=(0,a.observable)(e),r=(0,a.action)((function(e,t){for(var r=0,n=Object.keys(t);r<n.length;r++){var o=n[r];e.hasOwnProperty(o)&&(e[o]=t[o])}return e})),n=(0,a.action)((function(e,t){return u.default.merge(e,t)}));return{store:t,mutate:function(e){return(0,a.action)((function(){return e(t)}))(),t},setState:function(e){return r(t,e)},mergeState:function(e){return n(t,e)}}},c=function(e){return e()};const s=(e=>{var t={};return n.d(t,e),t})({shallowEqual:()=>reaxes_utils__WEBPACK_IMPORTED_MODULE_2__.shallowEqual,xPromise:()=>reaxes_utils__WEBPACK_IMPORTED_MODULE_2__.xPromise});function f(e,t){var r=s.xPromise(),n=function(){return r.then((function(e){return e()}))};return function(e){var t,r,n;t="undefined"!=typeof window?null!==(r=null!==(n=window.queueMicrotask)&&void 0!==n?n:window.Promise&&window.Promise.resolve().then)&&void 0!==r?r:function(e){return window.setTimeout(e,0)}:"undefined"!=typeof process&&process.nextTick?process.nextTick:function(e){return setTimeout(e,0)};t(e)}((function(){var o=t(),u=(0,a.reaction)(t,(function(t,r){!s.shallowEqual(t,o)&&(e(!1,n),o=t)}));e(!0,n),r.resolve(u)})),n}function l(e,t){var r=t();return Object.assign((function(t){var n=t();return function(){if(!s.shallowEqual(r,n))return e.apply(void 0,arguments)}}),{resetDeps:function(){r=t()}})}function d(e,t){if(!u.default.isObject(e))throw"the store argument must be a Mobx observed object";t&&u.default.isArray(t)&&t.length?t.forEach((function(t){return e[t]})):Object.getOwnPropertyNames(e).forEach((function(t){return e[t]}))}var v=o.pt,p=o.Hp,b=o.MM,m=o.uh,w=o.WW;
//# sourceMappingURL=index.js.map
/***/ }),
/***/ "./projects/switch520-auto-secret/SearchOnSelect/style.module.less":
/*!*************************************************************************!*\
!*** ./projects/switch520-auto-secret/SearchOnSelect/style.module.less ***!
\*************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js");
/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/styleDomAPI.js */ "./node_modules/style-loader/dist/runtime/styleDomAPI.js");
/* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/insertBySelector.js */ "./node_modules/style-loader/dist/runtime/insertBySelector.js");
/* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js */ "./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js");
/* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/insertStyleElement.js */ "./node_modules/style-loader/dist/runtime/insertStyleElement.js");
/* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/styleTagTransform.js */ "./node_modules/style-loader/dist/runtime/styleTagTransform.js");
/* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var _node_modules_css_loader_dist_cjs_js_node_modules_less_loader_dist_cjs_js_ruleSet_1_rules_2_use_2_style_module_less__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! !!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/less-loader/dist/cjs.js??ruleSet[1].rules[2].use[2]!./style.module.less */ "./node_modules/css-loader/dist/cjs.js!./node_modules/less-loader/dist/cjs.js??ruleSet[1].rules[2].use[2]!./projects/switch520-auto-secret/SearchOnSelect/style.module.less");
var options = {};
options.styleTagTransform = (_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default());
options.setAttributes = (_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default());
options.insert = _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default().bind(null, "head");
options.domAPI = (_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default());
options.insertStyleElement = (_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default());
var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_node_modules_less_loader_dist_cjs_js_ruleSet_1_rules_2_use_2_style_module_less__WEBPACK_IMPORTED_MODULE_6__["default"], options);
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_node_modules_less_loader_dist_cjs_js_ruleSet_1_rules_2_use_2_style_module_less__WEBPACK_IMPORTED_MODULE_6__["default"] && _node_modules_css_loader_dist_cjs_js_node_modules_less_loader_dist_cjs_js_ruleSet_1_rules_2_use_2_style_module_less__WEBPACK_IMPORTED_MODULE_6__["default"].locals ? _node_modules_css_loader_dist_cjs_js_node_modules_less_loader_dist_cjs_js_ruleSet_1_rules_2_use_2_style_module_less__WEBPACK_IMPORTED_MODULE_6__["default"].locals : undefined);
/***/ }),
/***/ "./projects/switch520-auto-secret/style.less":
/*!***************************************************!*\
!*** ./projects/switch520-auto-secret/style.less ***!
\***************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js");
/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../node_modules/style-loader/dist/runtime/styleDomAPI.js */ "./node_modules/style-loader/dist/runtime/styleDomAPI.js");
/* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! !../../node_modules/style-loader/dist/runtime/insertBySelector.js */ "./node_modules/style-loader/dist/runtime/insertBySelector.js");
/* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! !../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js */ "./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js");
/* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! !../../node_modules/style-loader/dist/runtime/insertStyleElement.js */ "./node_modules/style-loader/dist/runtime/insertStyleElement.js");
/* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! !../../node_modules/style-loader/dist/runtime/styleTagTransform.js */ "./node_modules/style-loader/dist/runtime/styleTagTransform.js");
/* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var _node_modules_css_loader_dist_cjs_js_node_modules_less_loader_dist_cjs_js_ruleSet_1_rules_2_use_2_style_less__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! !!../../node_modules/css-loader/dist/cjs.js!../../node_modules/less-loader/dist/cjs.js??ruleSet[1].rules[2].use[2]!./style.less */ "./node_modules/css-loader/dist/cjs.js!./node_modules/less-loader/dist/cjs.js??ruleSet[1].rules[2].use[2]!./projects/switch520-auto-secret/style.less");
var options = {};
options.styleTagTransform = (_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default());
options.setAttributes = (_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default());
options.insert = _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default().bind(null, "head");
options.domAPI = (_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default());
options.insertStyleElement = (_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default());
var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_node_modules_less_loader_dist_cjs_js_ruleSet_1_rules_2_use_2_style_less__WEBPACK_IMPORTED_MODULE_6__["default"], options);
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_node_modules_less_loader_dist_cjs_js_ruleSet_1_rules_2_use_2_style_less__WEBPACK_IMPORTED_MODULE_6__["default"] && _node_modules_css_loader_dist_cjs_js_node_modules_less_loader_dist_cjs_js_ruleSet_1_rules_2_use_2_style_less__WEBPACK_IMPORTED_MODULE_6__["default"].locals ? _node_modules_css_loader_dist_cjs_js_node_modules_less_loader_dist_cjs_js_ruleSet_1_rules_2_use_2_style_less__WEBPACK_IMPORTED_MODULE_6__["default"].locals : undefined);
/***/ }),
/***/ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js":
/*!****************************************************************************!*\
!*** ./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js ***!
\****************************************************************************/
/***/ ((module) => {
"use strict";
var stylesInDOM = [];
function getIndexByIdentifier(identifier) {
var result = -1;
for (var i = 0; i < stylesInDOM.length; i++) {
if (stylesInDOM[i].identifier === identifier) {
result = i;
break;
}
}
return result;
}
function modulesToDom(list, options) {
var idCountMap = {};
var identifiers = [];
for (var i = 0; i < list.length; i++) {
var item = list[i];
var id = options.base ? item[0] + options.base : item[0];
var count = idCountMap[id] || 0;
var identifier = "".concat(id, " ").concat(count);
idCountMap[id] = count + 1;
var indexByIdentifier = getIndexByIdentifier(identifier);
var obj = {
css: item[1],
media: item[2],
sourceMap: item[3],
supports: item[4],
layer: item[5]
};
if (indexByIdentifier !== -1) {
stylesInDOM[indexByIdentifier].references++;
stylesInDOM[indexByIdentifier].updater(obj);
} else {
var updater = addElementStyle(obj, options);
options.byIndex = i;
stylesInDOM.splice(i, 0, {
identifier: identifier,
updater: updater,
references: 1
});
}
identifiers.push(identifier);
}
return identifiers;
}
function addElementStyle(obj, options) {
var api = options.domAPI(options);
api.update(obj);
var updater = function updater(newObj) {
if (newObj) {
if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap && newObj.supports === obj.supports && newObj.layer === obj.layer) {
return;
}
api.update(obj = newObj);
} else {
api.remove();
}
};
return updater;
}
module.exports = function (list, options) {
options = options || {};
list = list || [];
var lastIdentifiers = modulesToDom(list, options);
return function update(newList) {
newList = newList || [];
for (var i = 0; i < lastIdentifiers.length; i++) {
var identifier = lastIdentifiers[i];
var index = getIndexByIdentifier(identifier);
stylesInDOM[index].references--;
}
var newLastIdentifiers = modulesToDom(newList, options);
for (var _i = 0; _i < lastIdentifiers.length; _i++) {
var _identifier = lastIdentifiers[_i];
var _index = getIndexByIdentifier(_identifier);
if (stylesInDOM[_index].references === 0) {
stylesInDOM[_index].updater();
stylesInDOM.splice(_index, 1);
}
}
lastIdentifiers = newLastIdentifiers;
};
};
/***/ }),
/***/ "./node_modules/style-loader/dist/runtime/insertBySelector.js":
/*!********************************************************************!*\
!*** ./node_modules/style-loader/dist/runtime/insertBySelector.js ***!
\********************************************************************/
/***/ ((module) => {
"use strict";
var memo = {};
/* istanbul ignore next */
function getTarget(target) {
if (typeof memo[target] === "undefined") {
var styleTarget = document.querySelector(target);
// Special case to return head of iframe instead of iframe itself
if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {
try {
// This will throw an exception if access to iframe is blocked
// due to cross-origin restrictions
styleTarget = styleTarget.contentDocument.head;
} catch (e) {
// istanbul ignore next
styleTarget = null;
}
}
memo[target] = styleTarget;
}
return memo[target];
}
/* istanbul ignore next */
function insertBySelector(insert, style) {
var target = getTarget(insert);
if (!target) {
throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");
}
target.appendChild(style);
}
module.exports = insertBySelector;
/***/ }),
/***/ "./node_modules/style-loader/dist/runtime/insertStyleElement.js":
/*!**********************************************************************!*\
!*** ./node_modules/style-loader/dist/runtime/insertStyleElement.js ***!
\**********************************************************************/
/***/ ((module) => {
"use strict";
/* istanbul ignore next */
function insertStyleElement(options) {
var element = document.createElement("style");
options.setAttributes(element, options.attributes);
options.insert(element, options.options);
return element;
}
module.exports = insertStyleElement;
/***/ }),
/***/ "./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js":
/*!**********************************************************************************!*\
!*** ./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js ***!
\**********************************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
/* istanbul ignore next */
function setAttributesWithoutAttributes(styleElement) {
var nonce = true ? __webpack_require__.nc : 0;
if (nonce) {
styleElement.setAttribute("nonce", nonce);
}
}
module.exports = setAttributesWithoutAttributes;
/***/ }),
/***/ "./node_modules/style-loader/dist/runtime/styleDomAPI.js":
/*!***************************************************************!*\
!*** ./node_modules/style-loader/dist/runtime/styleDomAPI.js ***!
\***************************************************************/
/***/ ((module) => {
"use strict";
/* istanbul ignore next */
function apply(styleElement, options, obj) {
var css = "";
if (obj.supports) {
css += "@supports (".concat(obj.supports, ") {");
}
if (obj.media) {
css += "@media ".concat(obj.media, " {");
}
var needLayer = typeof obj.layer !== "undefined";
if (needLayer) {
css += "@layer".concat(obj.layer.length > 0 ? " ".concat(obj.layer) : "", " {");
}
css += obj.css;
if (needLayer) {
css += "}";
}
if (obj.media) {
css += "}";
}
if (obj.supports) {
css += "}";
}
var sourceMap = obj.sourceMap;
if (sourceMap && typeof btoa !== "undefined") {
css += "\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))), " */");
}
// For old IE
/* istanbul ignore if */
options.styleTagTransform(css, styleElement, options.options);
}
function removeStyleElement(styleElement) {
// istanbul ignore if
if (styleElement.parentNode === null) {
return false;
}
styleElement.parentNode.removeChild(styleElement);
}
/* istanbul ignore next */
function domAPI(options) {
if (typeof document === "undefined") {
return {
update: function update() {},
remove: function remove() {}
};
}
var styleElement = options.insertStyleElement(options);
return {
update: function update(obj) {
apply(styleElement, options, obj);
},
remove: function remove() {
removeStyleElement(styleElement);
}
};
}
module.exports = domAPI;
/***/ }),
/***/ "./node_modules/style-loader/dist/runtime/styleTagTransform.js":
/*!*********************************************************************!*\
!*** ./node_modules/style-loader/dist/runtime/styleTagTransform.js ***!
\*********************************************************************/
/***/ ((module) => {
"use strict";
/* istanbul ignore next */
function styleTagTransform(css, styleElement) {
if (styleElement.styleSheet) {
styleElement.styleSheet.cssText = css;
} else {
while (styleElement.firstChild) {
styleElement.removeChild(styleElement.firstChild);
}
styleElement.appendChild(document.createTextNode(css));
}
}
module.exports = styleTagTransform;
/***/ }),
/***/ "./node_modules/webpack-dev-server/client/clients/WebSocketClient.js":
/*!***************************************************************************!*\
!*** ./node_modules/webpack-dev-server/client/clients/WebSocketClient.js ***!
\***************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": () => (/* binding */ WebSocketClient)
/* harmony export */ });
/* harmony import */ var _utils_log_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/log.js */ "./node_modules/webpack-dev-server/client/utils/log.js");
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
var WebSocketClient = /*#__PURE__*/function () {
/**
* @param {string} url
*/
function WebSocketClient(url) {
_classCallCheck(this, WebSocketClient);
this.client = new WebSocket(url);
this.client.onerror = function (error) {
_utils_log_js__WEBPACK_IMPORTED_MODULE_0__.log.error(error);
};
}
/**
* @param {(...args: any[]) => void} f
*/
return _createClass(WebSocketClient, [{
key: "onOpen",
value: function onOpen(f) {
this.client.onopen = f;
}
/**
* @param {(...args: any[]) => void} f
*/
}, {
key: "onClose",
value: function onClose(f) {
this.client.onclose = f;
}
// call f with the message string as the first argument
/**
* @param {(...args: any[]) => void} f
*/
}, {
key: "onMessage",
value: function onMessage(f) {
this.client.onmessage = function (e) {
f(e.data);
};
}
}]);
}();
/***/ }),
/***/ "./node_modules/webpack-dev-server/client/modules/logger/index.js":
/*!************************************************************************!*\
!*** ./node_modules/webpack-dev-server/client/modules/logger/index.js ***!
\************************************************************************/
/***/ ((__unused_webpack_module, exports) => {
/******/ (function() { // webpackBootstrap
/******/ "use strict";
/******/ var __webpack_modules__ = ({
/***/ "./client-src/modules/logger/tapable.js":
/*!**********************************************!*\
!*** ./client-src/modules/logger/tapable.js ***!
\**********************************************/
/***/ (function(__unused_webpack_module, __nested_webpack_exports__, __nested_webpack_require_372__) {
__nested_webpack_require_372__.r(__nested_webpack_exports__);
/* harmony export */ __nested_webpack_require_372__.d(__nested_webpack_exports__, {
/* harmony export */ SyncBailHook: function() { return /* binding */ SyncBailHook; }
/* harmony export */ });
function SyncBailHook() {
return {
call: function call() {}
};
}
/**
* Client stub for tapable SyncBailHook
*/
// eslint-disable-next-line import/prefer-default-export
/***/ }),
/***/ "./node_modules/webpack/lib/logging/Logger.js":
/*!****************************************************!*\
!*** ./node_modules/webpack/lib/logging/Logger.js ***!
\****************************************************/
/***/ (function(module) {
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
function _typeof(o) {
"@babel/helpers - typeof";
return _typeof = "function" == typeof (typeof Symbol !== "undefined" ? Symbol : function (i) { return i; }) && "symbol" == typeof (typeof Symbol !== "undefined" ? Symbol : function (i) { return i; }).iterator ? function (o) {
return typeof o;
} : function (o) {
return o && "function" == typeof (typeof Symbol !== "undefined" ? Symbol : function (i) { return i; }) && o.constructor === (typeof Symbol !== "undefined" ? Symbol : function (i) { return i; }) && o !== (typeof Symbol !== "undefined" ? Symbol : function (i) { return i; }).prototype ? "symbol" : typeof o;
}, _typeof(o);
}
function _toConsumableArray(r) {
return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread();
}
function _nonIterableSpread() {
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}
function _unsupportedIterableToArray(r, a) {
if (r) {
if ("string" == typeof r) return _arrayLikeToArray(r, a);
var t = {}.toString.call(r).slice(8, -1);
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
}
}
function _iterableToArray(r) {
if ("undefined" != typeof (typeof Symbol !== "undefined" ? Symbol : function (i) { return i; }) && null != r[(typeof Symbol !== "undefined" ? Symbol : function (i) { return i; }).iterator] || null != r["@@iterator"]) return Array.from(r);
}
function _arrayWithoutHoles(r) {
if (Array.isArray(r)) return _arrayLikeToArray(r);
}
function _arrayLikeToArray(r, a) {
(null == a || a > r.length) && (a = r.length);
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
return n;
}
function _classCallCheck(a, n) {
if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
}
function _defineProperties(e, r) {
for (var t = 0; t < r.length; t++) {
var o = r[t];
o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o);
}
}
function _createClass(e, r, t) {
return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", {
writable: !1
}), e;
}
function _toPropertyKey(t) {
var i = _toPrimitive(t, "string");
return "symbol" == _typeof(i) ? i : i + "";
}
function _toPrimitive(t, r) {
if ("object" != _typeof(t) || !t) return t;
var e = t[(typeof Symbol !== "undefined" ? Symbol : function (i) { return i; }).toPrimitive];
if (void 0 !== e) {
var i = e.call(t, r || "default");
if ("object" != _typeof(i)) return i;
throw new TypeError("@@toPrimitive must return a primitive value.");
}
return ("string" === r ? String : Number)(t);
}
var LogType = Object.freeze({
error: (/** @type {"error"} */"error"),
// message, c style arguments
warn: (/** @type {"warn"} */"warn"),
// message, c style arguments
info: (/** @type {"info"} */"info"),
// message, c style arguments
log: (/** @type {"log"} */"log"),
// message, c style arguments
debug: (/** @type {"debug"} */"debug"),
// message, c style arguments
trace: (/** @type {"trace"} */"trace"),
// no arguments
group: (/** @type {"group"} */"group"),
// [label]
groupCollapsed: (/** @type {"groupCollapsed"} */"groupCollapsed"),
// [label]
groupEnd: (/** @type {"groupEnd"} */"groupEnd"),
// [label]
profile: (/** @type {"profile"} */"profile"),
// [profileName]
profileEnd: (/** @type {"profileEnd"} */"profileEnd"),
// [profileName]
time: (/** @type {"time"} */"time"),
// name, time as [seconds, nanoseconds]
clear: (/** @type {"clear"} */"clear"),
// no arguments
status: (/** @type {"status"} */"status") // message, arguments
});
module.exports.LogType = LogType;
/** @typedef {typeof LogType[keyof typeof LogType]} LogTypeEnum */
var LOG_SYMBOL = (typeof Symbol !== "undefined" ? Symbol : function (i) { return i; })("webpack logger raw log method");
var TIMERS_SYMBOL = (typeof Symbol !== "undefined" ? Symbol : function (i) { return i; })("webpack logger times");
var TIMERS_AGGREGATES_SYMBOL = (typeof Symbol !== "undefined" ? Symbol : function (i) { return i; })("webpack logger aggregated times");
var WebpackLogger = /*#__PURE__*/function () {
/**
* @param {(type: LogTypeEnum, args?: EXPECTED_ANY[]) => void} log log function
* @param {(name: string | (() => string)) => WebpackLogger} getChildLogger function to create child logger
*/
function WebpackLogger(log, getChildLogger) {
_classCallCheck(this, WebpackLogger);
this[LOG_SYMBOL] = log;
this.getChildLogger = getChildLogger;
}
/**
* @param {...EXPECTED_ANY} args args
*/
return _createClass(WebpackLogger, [{
key: "error",
value: function error() {
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
this[LOG_SYMBOL](LogType.error, args);
}
/**
* @param {...EXPECTED_ANY} args args
*/
}, {
key: "warn",
value: function warn() {
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
args[_key2] = arguments[_key2];
}
this[LOG_SYMBOL](LogType.warn, args);
}
/**
* @param {...EXPECTED_ANY} args args
*/
}, {
key: "info",
value: function info() {
for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
args[_key3] = arguments[_key3];
}
this[LOG_SYMBOL](LogType.info, args);
}
/**
* @param {...EXPECTED_ANY} args args
*/
}, {
key: "log",
value: function log() {
for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
args[_key4] = arguments[_key4];
}
this[LOG_SYMBOL](LogType.log, args);
}
/**
* @param {...EXPECTED_ANY} args args
*/
}, {
key: "debug",
value: function debug() {
for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
args[_key5] = arguments[_key5];
}
this[LOG_SYMBOL](LogType.debug, args);
}
/**
* @param {EXPECTED_ANY} assertion assertion
* @param {...EXPECTED_ANY} args args
*/
}, {
key: "assert",
value: function assert(assertion) {
if (!assertion) {
for (var _len6 = arguments.length, args = new Array(_len6 > 1 ? _len6 - 1 : 0), _key6 = 1; _key6 < _len6; _key6++) {
args[_key6 - 1] = arguments[_key6];
}
this[LOG_SYMBOL](LogType.error, args);
}
}
}, {
key: "trace",
value: function trace() {
this[LOG_SYMBOL](LogType.trace, ["Trace"]);
}
}, {
key: "clear",
value: function clear() {
this[LOG_SYMBOL](LogType.clear);
}
/**
* @param {...EXPECTED_ANY} args args
*/
}, {
key: "status",
value: function status() {
for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {
args[_key7] = arguments[_key7];
}
this[LOG_SYMBOL](LogType.status, args);
}
/**
* @param {...EXPECTED_ANY} args args
*/
}, {
key: "group",
value: function group() {
for (var _len8 = arguments.length, args = new Array(_len8), _key8 = 0; _key8 < _len8; _key8++) {
args[_key8] = arguments[_key8];
}
this[LOG_SYMBOL](LogType.group, args);
}
/**
* @param {...EXPECTED_ANY} args args
*/
}, {
key: "groupCollapsed",
value: function groupCollapsed() {
for (var _len9 = arguments.length, args = new Array(_len9), _key9 = 0; _key9 < _len9; _key9++) {
args[_key9] = arguments[_key9];
}
this[LOG_SYMBOL](LogType.groupCollapsed, args);
}
}, {
key: "groupEnd",
value: function groupEnd() {
this[LOG_SYMBOL](LogType.groupEnd);
}
/**
* @param {string=} label label
*/
}, {
key: "profile",
value: function profile(label) {
this[LOG_SYMBOL](LogType.profile, [label]);
}
/**
* @param {string=} label label
*/
}, {
key: "profileEnd",
value: function profileEnd(label) {
this[LOG_SYMBOL](LogType.profileEnd, [label]);
}
/**
* @param {string} label label
*/
}, {
key: "time",
value: function time(label) {
/** @type {Map<string | undefined, [number, number]>} */
this[TIMERS_SYMBOL] = this[TIMERS_SYMBOL] || new Map();
this[TIMERS_SYMBOL].set(label, process.hrtime());
}
/**
* @param {string=} label label
*/
}, {
key: "timeLog",
value: function timeLog(label) {
var prev = this[TIMERS_SYMBOL] && this[TIMERS_SYMBOL].get(label);
if (!prev) {
throw new Error("No such label '".concat(label, "' for WebpackLogger.timeLog()"));
}
var time = process.hrtime(prev);
this[LOG_SYMBOL](LogType.time, [label].concat(_toConsumableArray(time)));
}
/**
* @param {string=} label label
*/
}, {
key: "timeEnd",
value: function timeEnd(label) {
var prev = this[TIMERS_SYMBOL] && this[TIMERS_SYMBOL].get(label);
if (!prev) {
throw new Error("No such label '".concat(label, "' for WebpackLogger.timeEnd()"));
}
var time = process.hrtime(prev);
/** @type {Map<string | undefined, [number, number]>} */
this[TIMERS_SYMBOL].delete(label);
this[LOG_SYMBOL](LogType.time, [label].concat(_toConsumableArray(time)));
}
/**
* @param {string=} label label
*/
}, {
key: "timeAggregate",
value: function timeAggregate(label) {
var prev = this[TIMERS_SYMBOL] && this[TIMERS_SYMBOL].get(label);
if (!prev) {
throw new Error("No such label '".concat(label, "' for WebpackLogger.timeAggregate()"));
}
var time = process.hrtime(prev);
/** @type {Map<string | undefined, [number, number]>} */
this[TIMERS_SYMBOL].delete(label);
/** @type {Map<string | undefined, [number, number]>} */
this[TIMERS_AGGREGATES_SYMBOL] = this[TIMERS_AGGREGATES_SYMBOL] || new Map();
var current = this[TIMERS_AGGREGATES_SYMBOL].get(label);
if (current !== undefined) {
if (time[1] + current[1] > 1e9) {
time[0] += current[0] + 1;
time[1] = time[1] - 1e9 + current[1];
} else {
time[0] += current[0];
time[1] += current[1];
}
}
this[TIMERS_AGGREGATES_SYMBOL].set(label, time);
}
/**
* @param {string=} label label
*/
}, {
key: "timeAggregateEnd",
value: function timeAggregateEnd(label) {
if (this[TIMERS_AGGREGATES_SYMBOL] === undefined) return;
var time = this[TIMERS_AGGREGATES_SYMBOL].get(label);
if (time === undefined) return;
this[TIMERS_AGGREGATES_SYMBOL].delete(label);
this[LOG_SYMBOL](LogType.time, [label].concat(_toConsumableArray(time)));
}
}]);
}();
module.exports.Logger = WebpackLogger;
/***/ }),
/***/ "./node_modules/webpack/lib/logging/createConsoleLogger.js":
/*!*****************************************************************!*\
!*** ./node_modules/webpack/lib/logging/createConsoleLogger.js ***!
\*****************************************************************/
/***/ (function(module, __unused_webpack_exports, __nested_webpack_require_12803__) {
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
function _slicedToArray(r, e) {
return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
}
function _nonIterableRest() {
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}
function _iterableToArrayLimit(r, l) {
var t = null == r ? null : "undefined" != typeof (typeof Symbol !== "undefined" ? Symbol : function (i) { return i; }) && r[(typeof Symbol !== "undefined" ? Symbol : function (i) { return i; }).iterator] || r["@@iterator"];
if (null != t) {
var e,
n,
i,
u,
a = [],
f = !0,
o = !1;
try {
if (i = (t = t.call(r)).next, 0 === l) {
if (Object(t) !== t) return;
f = !1;
} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
} catch (r) {
o = !0, n = r;
} finally {
try {
if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;
} finally {
if (o) throw n;
}
}
return a;
}
}
function _arrayWithHoles(r) {
if (Array.isArray(r)) return r;
}
function _toConsumableArray(r) {
return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread();
}
function _nonIterableSpread() {
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}
function _unsupportedIterableToArray(r, a) {
if (r) {
if ("string" == typeof r) return _arrayLikeToArray(r, a);
var t = {}.toString.call(r).slice(8, -1);
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
}
}
function _iterableToArray(r) {
if ("undefined" != typeof (typeof Symbol !== "undefined" ? Symbol : function (i) { return i; }) && null != r[(typeof Symbol !== "undefined" ? Symbol : function (i) { return i; }).iterator] || null != r["@@iterator"]) return Array.from(r);
}
function _arrayWithoutHoles(r) {
if (Array.isArray(r)) return _arrayLikeToArray(r);
}
function _arrayLikeToArray(r, a) {
(null == a || a > r.length) && (a = r.length);
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
return n;
}
function _typeof(o) {
"@babel/helpers - typeof";
return _typeof = "function" == typeof (typeof Symbol !== "undefined" ? Symbol : function (i) { return i; }) && "symbol" == typeof (typeof Symbol !== "undefined" ? Symbol : function (i) { return i; }).iterator ? function (o) {
return typeof o;
} : function (o) {
return o && "function" == typeof (typeof Symbol !== "undefined" ? Symbol : function (i) { return i; }) && o.constructor === (typeof Symbol !== "undefined" ? Symbol : function (i) { return i; }) && o !== (typeof Symbol !== "undefined" ? Symbol : function (i) { return i; }).prototype ? "symbol" : typeof o;
}, _typeof(o);
}
var _require = __nested_webpack_require_12803__(/*! ./Logger */ "./node_modules/webpack/lib/logging/Logger.js"),
LogType = _require.LogType;
/** @typedef {import("../../declarations/WebpackOptions").FilterItemTypes} FilterItemTypes */
/** @typedef {import("../../declarations/WebpackOptions").FilterTypes} FilterTypes */
/** @typedef {import("./Logger").LogTypeEnum} LogTypeEnum */
/** @typedef {(item: string) => boolean} FilterFunction */
/** @typedef {(value: string, type: LogTypeEnum, args?: EXPECTED_ANY[]) => void} LoggingFunction */
/**
* @typedef {object} LoggerConsole
* @property {() => void} clear
* @property {() => void} trace
* @property {(...args: EXPECTED_ANY[]) => void} info
* @property {(...args: EXPECTED_ANY[]) => void} log
* @property {(...args: EXPECTED_ANY[]) => void} warn
* @property {(...args: EXPECTED_ANY[]) => void} error
* @property {(...args: EXPECTED_ANY[]) => void=} debug
* @property {(...args: EXPECTED_ANY[]) => void=} group
* @property {(...args: EXPECTED_ANY[]) => void=} groupCollapsed
* @property {(...args: EXPECTED_ANY[]) => void=} groupEnd
* @property {(...args: EXPECTED_ANY[]) => void=} status
* @property {(...args: EXPECTED_ANY[]) => void=} profile
* @property {(...args: EXPECTED_ANY[]) => void=} profileEnd
* @property {(...args: EXPECTED_ANY[]) => void=} logTime
*/
/**
* @typedef {object} LoggerOptions
* @property {false|true|"none"|"error"|"warn"|"info"|"log"|"verbose"} level loglevel
* @property {FilterTypes|boolean} debug filter for debug logging
* @property {LoggerConsole} console the console to log to
*/
/**
* @param {FilterItemTypes} item an input item
* @returns {FilterFunction | undefined} filter function
*/
var filterToFunction = function filterToFunction(item) {
if (typeof item === "string") {
var regExp = new RegExp("[\\\\/]".concat(item.replace(/[-[\]{}()*+?.\\^$|]/g, "\\$&"), "([\\\\/]|$|!|\\?)"));
return function (ident) {
return regExp.test(ident);
};
}
if (item && _typeof(item) === "object" && typeof item.test === "function") {
return function (ident) {
return item.test(ident);
};
}
if (typeof item === "function") {
return item;
}
if (typeof item === "boolean") {
return function () {
return item;
};
}
};
/**
* @enum {number}
*/
var LogLevel = {
none: 6,
false: 6,
error: 5,
warn: 4,
info: 3,
log: 2,
true: 2,
verbose: 1
};
/**
* @param {LoggerOptions} options options object
* @returns {LoggingFunction} logging function
*/
module.exports = function (_ref) {
var _ref$level = _ref.level,
level = _ref$level === void 0 ? "info" : _ref$level,
_ref$debug = _ref.debug,
debug = _ref$debug === void 0 ? false : _ref$debug,
console = _ref.console;
var debugFilters = /** @type {FilterFunction[]} */
typeof debug === "boolean" ? [function () {
return debug;
}] : /** @type {FilterItemTypes[]} */[].concat(debug).map(filterToFunction);
var loglevel = LogLevel["".concat(level)] || 0;
/**
* @param {string} name name of the logger
* @param {LogTypeEnum} type type of the log entry
* @param {EXPECTED_ANY[]=} args arguments of the log entry
* @returns {void}
*/
var logger = function logger(name, type, args) {
var labeledArgs = function labeledArgs() {
if (Array.isArray(args)) {
if (args.length > 0 && typeof args[0] === "string") {
return ["[".concat(name, "] ").concat(args[0])].concat(_toConsumableArray(args.slice(1)));
}
return ["[".concat(name, "]")].concat(_toConsumableArray(args));
}
return [];
};
var debug = debugFilters.some(function (f) {
return f(name);
});
switch (type) {
case LogType.debug:
if (!debug) return;
if (typeof console.debug === "function") {
console.debug.apply(console, _toConsumableArray(labeledArgs()));
} else {
console.log.apply(console, _toConsumableArray(labeledArgs()));
}
break;
case LogType.log:
if (!debug && loglevel > LogLevel.log) return;
console.log.apply(console, _toConsumableArray(labeledArgs()));
break;
case LogType.info:
if (!debug && loglevel > LogLevel.info) return;
console.info.apply(console, _toConsumableArray(labeledArgs()));
break;
case LogType.warn:
if (!debug && loglevel > LogLevel.warn) return;
console.warn.apply(console, _toConsumableArray(labeledArgs()));
break;
case LogType.error:
if (!debug && loglevel > LogLevel.error) return;
console.error.apply(console, _toConsumableArray(labeledArgs()));
break;
case LogType.trace:
if (!debug) return;
console.trace();
break;
case LogType.groupCollapsed:
if (!debug && loglevel > LogLevel.log) return;
if (!debug && loglevel > LogLevel.verbose) {
if (typeof console.groupCollapsed === "function") {
console.groupCollapsed.apply(console, _toConsumableArray(labeledArgs()));
} else {
console.log.apply(console, _toConsumableArray(labeledArgs()));
}
break;
}
// falls through
case LogType.group:
if (!debug && loglevel > LogLevel.log) return;
if (typeof console.group === "function") {
console.group.apply(console, _toConsumableArray(labeledArgs()));
} else {
console.log.apply(console, _toConsumableArray(labeledArgs()));
}
break;
case LogType.groupEnd:
if (!debug && loglevel > LogLevel.log) return;
if (typeof console.groupEnd === "function") {
console.groupEnd();
}
break;
case LogType.time:
{
if (!debug && loglevel > LogLevel.log) return;
var _args = _slicedToArray(/** @type {[string, number, number]} */
args, 3),
label = _args[0],
start = _args[1],
end = _args[2];
var ms = start * 1000 + end / 1000000;
var msg = "[".concat(name, "] ").concat(label, ": ").concat(ms, " ms");
if (typeof console.logTime === "function") {
console.logTime(msg);
} else {
console.log(msg);
}
break;
}
case LogType.profile:
if (typeof console.profile === "function") {
console.profile.apply(console, _toConsumableArray(labeledArgs()));
}
break;
case LogType.profileEnd:
if (typeof console.profileEnd === "function") {
console.profileEnd.apply(console, _toConsumableArray(labeledArgs()));
}
break;
case LogType.clear:
if (!debug && loglevel > LogLevel.log) return;
if (typeof console.clear === "function") {
console.clear();
}
break;
case LogType.status:
if (!debug && loglevel > LogLevel.info) return;
if (typeof console.status === "function") {
if (!args || args.length === 0) {
console.status();
} else {
console.status.apply(console, _toConsumableArray(labeledArgs()));
}
} else if (args && args.length !== 0) {
console.info.apply(console, _toConsumableArray(labeledArgs()));
}
break;
default:
throw new Error("Unexpected LogType ".concat(type));
}
};
return logger;
};
/***/ }),
/***/ "./node_modules/webpack/lib/logging/runtime.js":
/*!*****************************************************!*\
!*** ./node_modules/webpack/lib/logging/runtime.js ***!
\*****************************************************/
/***/ (function(module, __unused_webpack_exports, __nested_webpack_require_23778__) {
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
function _extends() {
return _extends = Object.assign ? Object.assign.bind() : function (n) {
for (var e = 1; e < arguments.length; e++) {
var t = arguments[e];
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
}
return n;
}, _extends.apply(null, arguments);
}
var _require = __nested_webpack_require_23778__(/*! tapable */ "./client-src/modules/logger/tapable.js"),
SyncBailHook = _require.SyncBailHook;
var _require2 = __nested_webpack_require_23778__(/*! ./Logger */ "./node_modules/webpack/lib/logging/Logger.js"),
Logger = _require2.Logger;
var createConsoleLogger = __nested_webpack_require_23778__(/*! ./createConsoleLogger */ "./node_modules/webpack/lib/logging/createConsoleLogger.js");
/** @type {createConsoleLogger.LoggerOptions} */
var currentDefaultLoggerOptions = {
level: "info",
debug: false,
console: console
};
var currentDefaultLogger = createConsoleLogger(currentDefaultLoggerOptions);
/**
* @param {string} name name of the logger
* @returns {Logger} a logger
*/
module.exports.getLogger = function (name) {
return new Logger(function (type, args) {
if (module.exports.hooks.log.call(name, type, args) === undefined) {
currentDefaultLogger(name, type, args);
}
}, function (childName) {
return module.exports.getLogger("".concat(name, "/").concat(childName));
});
};
/**
* @param {createConsoleLogger.LoggerOptions} options new options, merge with old options
* @returns {void}
*/
module.exports.configureDefaultLogger = function (options) {
_extends(currentDefaultLoggerOptions, options);
currentDefaultLogger = createConsoleLogger(currentDefaultLoggerOptions);
};
module.exports.hooks = {
log: new SyncBailHook(["origin", "type", "args"])
};
/***/ })
/******/ });
/************************************************************************/
/******/ // The module cache
/******/ var __webpack_module_cache__ = {};
/******/
/******/ // The require function
/******/ function __nested_webpack_require_25855__(moduleId) {
/******/ // Check if module is in cache
/******/ var cachedModule = __webpack_module_cache__[moduleId];
/******/ if (cachedModule !== undefined) {
/******/ return cachedModule.exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = __webpack_module_cache__[moduleId] = {
/******/ // no module.id needed
/******/ // no module.loaded needed
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ __webpack_modules__[moduleId](module, module.exports, __nested_webpack_require_25855__);
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/************************************************************************/
/******/ /* webpack/runtime/define property getters */
/******/ !function() {
/******/ // define getter functions for harmony exports
/******/ __nested_webpack_require_25855__.d = function(exports, definition) {
/******/ for(var key in definition) {
/******/ if(__nested_webpack_require_25855__.o(definition, key) && !__nested_webpack_require_25855__.o(exports, key)) {
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ }
/******/ }
/******/ };
/******/ }();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ !function() {
/******/ __nested_webpack_require_25855__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
/******/ }();
/******/
/******/ /* webpack/runtime/make namespace object */
/******/ !function() {
/******/ // define __esModule on exports
/******/ __nested_webpack_require_25855__.r = function(exports) {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/ }();
/******/
/************************************************************************/
var __nested_webpack_exports__ = {};
// This entry needs to be wrapped in an IIFE because it needs to be isolated against other modules in the chunk.
!function() {
/*!********************************************!*\
!*** ./client-src/modules/logger/index.js ***!
\********************************************/
__nested_webpack_require_25855__.r(__nested_webpack_exports__);
/* harmony export */ __nested_webpack_require_25855__.d(__nested_webpack_exports__, {
/* harmony export */ "default": function() { return /* reexport default export from named module */ webpack_lib_logging_runtime_js__WEBPACK_IMPORTED_MODULE_0__; }
/* harmony export */ });
/* harmony import */ var webpack_lib_logging_runtime_js__WEBPACK_IMPORTED_MODULE_0__ = __nested_webpack_require_25855__(/*! webpack/lib/logging/runtime.js */ "./node_modules/webpack/lib/logging/runtime.js");
}();
var __webpack_export_target__ = exports;
for(var __webpack_i__ in __nested_webpack_exports__) __webpack_export_target__[__webpack_i__] = __nested_webpack_exports__[__webpack_i__];
if(__nested_webpack_exports__.__esModule) Object.defineProperty(__webpack_export_target__, "__esModule", { value: true });
/******/ })()
;
/***/ }),
/***/ "./node_modules/webpack-dev-server/client/overlay.js":
/*!***********************************************************!*\
!*** ./node_modules/webpack-dev-server/client/overlay.js ***!
\***********************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ createOverlay: () => (/* binding */ createOverlay),
/* harmony export */ formatProblem: () => (/* binding */ formatProblem)
/* harmony export */ });
/* harmony import */ var ansi_html_community__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ansi-html-community */ "./node_modules/ansi-html-community/index.js");
/* harmony import */ var ansi_html_community__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(ansi_html_community__WEBPACK_IMPORTED_MODULE_0__);
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
// The error overlay is inspired (and mostly copied) from Create React App (https://github.com/facebookincubator/create-react-app)
// They, in turn, got inspired by webpack-hot-middleware (https://github.com/glenjamin/webpack-hot-middleware).
/**
* @type {(input: string, position: number) => string}
*/
var getCodePoint = String.prototype.codePointAt ? function (input, position) {
return input.codePointAt(position);
} : function (input, position) {
return (input.charCodeAt(position) - 0xd800) * 0x400 + input.charCodeAt(position + 1) - 0xdc00 + 0x10000;
};
/**
* @param {string} macroText
* @param {RegExp} macroRegExp
* @param {(input: string) => string} macroReplacer
* @returns {string}
*/
var replaceUsingRegExp = function replaceUsingRegExp(macroText, macroRegExp, macroReplacer) {
macroRegExp.lastIndex = 0;
var replaceMatch = macroRegExp.exec(macroText);
var replaceResult;
if (replaceMatch) {
replaceResult = "";
var replaceLastIndex = 0;
do {
if (replaceLastIndex !== replaceMatch.index) {
replaceResult += macroText.substring(replaceLastIndex, replaceMatch.index);
}
var replaceInput = replaceMatch[0];
replaceResult += macroReplacer(replaceInput);
replaceLastIndex = replaceMatch.index + replaceInput.length;
// eslint-disable-next-line no-cond-assign
} while (replaceMatch = macroRegExp.exec(macroText));
if (replaceLastIndex !== macroText.length) {
replaceResult += macroText.substring(replaceLastIndex);
}
} else {
replaceResult = macroText;
}
return replaceResult;
};
var references = {
"<": "<",
">": ">",
'"': """,
"'": "'",
"&": "&"
};
/**
* @param {string} text text
* @returns {string}
*/
function encode(text) {
if (!text) {
return "";
}
return replaceUsingRegExp(text, /[<>'"&]/g, function (input) {
var result = references[input];
if (!result) {
var code = input.length > 1 ? getCodePoint(input, 0) : input.charCodeAt(0);
result = "&#".concat(code, ";");
}
return result;
});
}
/**
* @typedef {Object} StateDefinitions
* @property {{[event: string]: { target: string; actions?: Array<string> }}} [on]
*/
/**
* @typedef {Object} Options
* @property {{[state: string]: StateDefinitions}} states
* @property {object} context;
* @property {string} initial
*/
/**
* @typedef {Object} Implementation
* @property {{[actionName: string]: (ctx: object, event: any) => object}} actions
*/
/**
* A simplified `createMachine` from `@xstate/fsm` with the following differences:
*
* - the returned machine is technically a "service". No `interpret(machine).start()` is needed.
* - the state definition only support `on` and target must be declared with { target: 'nextState', actions: [] } explicitly.
* - event passed to `send` must be an object with `type` property.
* - actions implementation will be [assign action](https://xstate.js.org/docs/guides/context.html#assign-action) if you return any value.
* Do not return anything if you just want to invoke side effect.
*
* The goal of this custom function is to avoid installing the entire `'xstate/fsm'` package, while enabling modeling using
* state machine. You can copy the first parameter into the editor at https://stately.ai/viz to visualize the state machine.
*
* @param {Options} options
* @param {Implementation} implementation
*/
function createMachine(_ref, _ref2) {
var states = _ref.states,
context = _ref.context,
initial = _ref.initial;
var actions = _ref2.actions;
var currentState = initial;
var currentContext = context;
return {
send: function send(event) {
var currentStateOn = states[currentState].on;
var transitionConfig = currentStateOn && currentStateOn[event.type];
if (transitionConfig) {
currentState = transitionConfig.target;
if (transitionConfig.actions) {
transitionConfig.actions.forEach(function (actName) {
var actionImpl = actions[actName];
var nextContextValue = actionImpl && actionImpl(currentContext, event);
if (nextContextValue) {
currentContext = _objectSpread(_objectSpread({}, currentContext), nextContextValue);
}
});
}
}
}
};
}
/**
* @typedef {Object} ShowOverlayData
* @property {'warning' | 'error'} level
* @property {Array<string | { moduleIdentifier?: string, moduleName?: string, loc?: string, message?: string }>} messages
* @property {'build' | 'runtime'} messageSource
*/
/**
* @typedef {Object} CreateOverlayMachineOptions
* @property {(data: ShowOverlayData) => void} showOverlay
* @property {() => void} hideOverlay
*/
/**
* @param {CreateOverlayMachineOptions} options
*/
var createOverlayMachine = function createOverlayMachine(options) {
var hideOverlay = options.hideOverlay,
showOverlay = options.showOverlay;
return createMachine({
initial: "hidden",
context: {
level: "error",
messages: [],
messageSource: "build"
},
states: {
hidden: {
on: {
BUILD_ERROR: {
target: "displayBuildError",
actions: ["setMessages", "showOverlay"]
},
RUNTIME_ERROR: {
target: "displayRuntimeError",
actions: ["setMessages", "showOverlay"]
}
}
},
displayBuildError: {
on: {
DISMISS: {
target: "hidden",
actions: ["dismissMessages", "hideOverlay"]
},
BUILD_ERROR: {
target: "displayBuildError",
actions: ["appendMessages", "showOverlay"]
}
}
},
displayRuntimeError: {
on: {
DISMISS: {
target: "hidden",
actions: ["dismissMessages", "hideOverlay"]
},
RUNTIME_ERROR: {
target: "displayRuntimeError",
actions: ["appendMessages", "showOverlay"]
},
BUILD_ERROR: {
target: "displayBuildError",
actions: ["setMessages", "showOverlay"]
}
}
}
}
}, {
actions: {
dismissMessages: function dismissMessages() {
return {
messages: [],
level: "error",
messageSource: "build"
};
},
appendMessages: function appendMessages(context, event) {
return {
messages: context.messages.concat(event.messages),
level: event.level || context.level,
messageSource: event.type === "RUNTIME_ERROR" ? "runtime" : "build"
};
},
setMessages: function setMessages(context, event) {
return {
messages: event.messages,
level: event.level || context.level,
messageSource: event.type === "RUNTIME_ERROR" ? "runtime" : "build"
};
},
hideOverlay: hideOverlay,
showOverlay: showOverlay
}
});
};
/**
*
* @param {Error} error
*/
var parseErrorToStacks = function parseErrorToStacks(error) {
if (!error || !(error instanceof Error)) {
throw new Error("parseErrorToStacks expects Error object");
}
if (typeof error.stack === "string") {
return error.stack.split("\n").filter(function (stack) {
return stack !== "Error: ".concat(error.message);
});
}
};
/**
* @callback ErrorCallback
* @param {ErrorEvent} error
* @returns {void}
*/
/**
* @param {ErrorCallback} callback
*/
var listenToRuntimeError = function listenToRuntimeError(callback) {
window.addEventListener("error", callback);
return function cleanup() {
window.removeEventListener("error", callback);
};
};
/**
* @callback UnhandledRejectionCallback
* @param {PromiseRejectionEvent} rejectionEvent
* @returns {void}
*/
/**
* @param {UnhandledRejectionCallback} callback
*/
var listenToUnhandledRejection = function listenToUnhandledRejection(callback) {
window.addEventListener("unhandledrejection", callback);
return function cleanup() {
window.removeEventListener("unhandledrejection", callback);
};
};
// Styles are inspired by `react-error-overlay`
var msgStyles = {
error: {
backgroundColor: "rgba(206, 17, 38, 0.1)",
color: "#fccfcf"
},
warning: {
backgroundColor: "rgba(251, 245, 180, 0.1)",
color: "#fbf5b4"
}
};
var iframeStyle = {
position: "fixed",
top: 0,
left: 0,
right: 0,
bottom: 0,
width: "100vw",
height: "100vh",
border: "none",
"z-index": 9999999999
};
var containerStyle = {
position: "fixed",
boxSizing: "border-box",
left: 0,
top: 0,
right: 0,
bottom: 0,
width: "100vw",
height: "100vh",
fontSize: "large",
padding: "2rem 2rem 4rem 2rem",
lineHeight: "1.2",
whiteSpace: "pre-wrap",
overflow: "auto",
backgroundColor: "rgba(0, 0, 0, 0.9)",
color: "white"
};
var headerStyle = {
color: "#e83b46",
fontSize: "2em",
whiteSpace: "pre-wrap",
fontFamily: "sans-serif",
margin: "0 2rem 2rem 0",
flex: "0 0 auto",
maxHeight: "50%",
overflow: "auto"
};
var dismissButtonStyle = {
color: "#ffffff",
lineHeight: "1rem",
fontSize: "1.5rem",
padding: "1rem",
cursor: "pointer",
position: "absolute",
right: 0,
top: 0,
backgroundColor: "transparent",
border: "none"
};
var msgTypeStyle = {
color: "#e83b46",
fontSize: "1.2em",
marginBottom: "1rem",
fontFamily: "sans-serif"
};
var msgTextStyle = {
lineHeight: "1.5",
fontSize: "1rem",
fontFamily: "Menlo, Consolas, monospace"
};
// ANSI HTML
var colors = {
reset: ["transparent", "transparent"],
black: "181818",
red: "E36049",
green: "B3CB74",
yellow: "FFD080",
blue: "7CAFC2",
magenta: "7FACCA",
cyan: "C3C2EF",
lightgrey: "EBE7E3",
darkgrey: "6D7891"
};
ansi_html_community__WEBPACK_IMPORTED_MODULE_0___default().setColors(colors);
/**
* @param {string} type
* @param {string | { file?: string, moduleName?: string, loc?: string, message?: string; stack?: string[] }} item
* @returns {{ header: string, body: string }}
*/
var formatProblem = function formatProblem(type, item) {
var header = type === "warning" ? "WARNING" : "ERROR";
var body = "";
if (typeof item === "string") {
body += item;
} else {
var file = item.file || "";
// eslint-disable-next-line no-nested-ternary
var moduleName = item.moduleName ? item.moduleName.indexOf("!") !== -1 ? "".concat(item.moduleName.replace(/^(\s|\S)*!/, ""), " (").concat(item.moduleName, ")") : "".concat(item.moduleName) : "";
var loc = item.loc;
header += "".concat(moduleName || file ? " in ".concat(moduleName ? "".concat(moduleName).concat(file ? " (".concat(file, ")") : "") : file).concat(loc ? " ".concat(loc) : "") : "");
body += item.message || "";
}
if (Array.isArray(item.stack)) {
item.stack.forEach(function (stack) {
if (typeof stack === "string") {
body += "\r\n".concat(stack);
}
});
}
return {
header: header,
body: body
};
};
/**
* @typedef {Object} CreateOverlayOptions
* @property {string | null} trustedTypesPolicyName
* @property {boolean | (error: Error) => void} [catchRuntimeError]
*/
/**
*
* @param {CreateOverlayOptions} options
*/
var createOverlay = function createOverlay(options) {
/** @type {HTMLIFrameElement | null | undefined} */
var iframeContainerElement;
/** @type {HTMLDivElement | null | undefined} */
var containerElement;
/** @type {HTMLDivElement | null | undefined} */
var headerElement;
/** @type {Array<(element: HTMLDivElement) => void>} */
var onLoadQueue = [];
/** @type {TrustedTypePolicy | undefined} */
var overlayTrustedTypesPolicy;
/**
*
* @param {HTMLElement} element
* @param {CSSStyleDeclaration} style
*/
function applyStyle(element, style) {
Object.keys(style).forEach(function (prop) {
element.style[prop] = style[prop];
});
}
/**
* @param {string | null} trustedTypesPolicyName
*/
function createContainer(trustedTypesPolicyName) {
// Enable Trusted Types if they are available in the current browser.
if (window.trustedTypes) {
overlayTrustedTypesPolicy = window.trustedTypes.createPolicy(trustedTypesPolicyName || "webpack-dev-server#overlay", {
createHTML: function createHTML(value) {
return value;
}
});
}
iframeContainerElement = document.createElement("iframe");
iframeContainerElement.id = "webpack-dev-server-client-overlay";
iframeContainerElement.src = "about:blank";
applyStyle(iframeContainerElement, iframeStyle);
iframeContainerElement.onload = function () {
var contentElement = /** @type {Document} */
(/** @type {HTMLIFrameElement} */
iframeContainerElement.contentDocument).createElement("div");
containerElement = /** @type {Document} */
(/** @type {HTMLIFrameElement} */
iframeContainerElement.contentDocument).createElement("div");
contentElement.id = "webpack-dev-server-client-overlay-div";
applyStyle(contentElement, containerStyle);
headerElement = document.createElement("div");
headerElement.innerText = "Compiled with problems:";
applyStyle(headerElement, headerStyle);
var closeButtonElement = document.createElement("button");
applyStyle(closeButtonElement, dismissButtonStyle);
closeButtonElement.innerText = "×";
closeButtonElement.ariaLabel = "Dismiss";
closeButtonElement.addEventListener("click", function () {
// eslint-disable-next-line no-use-before-define
overlayService.send({
type: "DISMISS"
});
});
contentElement.appendChild(headerElement);
contentElement.appendChild(closeButtonElement);
contentElement.appendChild(containerElement);
/** @type {Document} */
(/** @type {HTMLIFrameElement} */
iframeContainerElement.contentDocument).body.appendChild(contentElement);
onLoadQueue.forEach(function (onLoad) {
onLoad(/** @type {HTMLDivElement} */contentElement);
});
onLoadQueue = [];
/** @type {HTMLIFrameElement} */
iframeContainerElement.onload = null;
};
document.body.appendChild(iframeContainerElement);
}
/**
* @param {(element: HTMLDivElement) => void} callback
* @param {string | null} trustedTypesPolicyName
*/
function ensureOverlayExists(callback, trustedTypesPolicyName) {
if (containerElement) {
containerElement.innerHTML = overlayTrustedTypesPolicy ? overlayTrustedTypesPolicy.createHTML("") : "";
// Everything is ready, call the callback right away.
callback(containerElement);
return;
}
onLoadQueue.push(callback);
if (iframeContainerElement) {
return;
}
createContainer(trustedTypesPolicyName);
}
// Successful compilation.
function hide() {
if (!iframeContainerElement) {
return;
}
// Clean up and reset internal state.
document.body.removeChild(iframeContainerElement);
iframeContainerElement = null;
containerElement = null;
}
// Compilation with errors (e.g. syntax error or missing modules).
/**
* @param {string} type
* @param {Array<string | { moduleIdentifier?: string, moduleName?: string, loc?: string, message?: string }>} messages
* @param {string | null} trustedTypesPolicyName
* @param {'build' | 'runtime'} messageSource
*/
function show(type, messages, trustedTypesPolicyName, messageSource) {
ensureOverlayExists(function () {
headerElement.innerText = messageSource === "runtime" ? "Uncaught runtime errors:" : "Compiled with problems:";
messages.forEach(function (message) {
var entryElement = document.createElement("div");
var msgStyle = type === "warning" ? msgStyles.warning : msgStyles.error;
applyStyle(entryElement, _objectSpread(_objectSpread({}, msgStyle), {}, {
padding: "1rem 1rem 1.5rem 1rem"
}));
var typeElement = document.createElement("div");
var _formatProblem = formatProblem(type, message),
header = _formatProblem.header,
body = _formatProblem.body;
typeElement.innerText = header;
applyStyle(typeElement, msgTypeStyle);
if (message.moduleIdentifier) {
applyStyle(typeElement, {
cursor: "pointer"
});
// element.dataset not supported in IE
typeElement.setAttribute("data-can-open", true);
typeElement.addEventListener("click", function () {
fetch("/webpack-dev-server/open-editor?fileName=".concat(message.moduleIdentifier));
});
}
// Make it look similar to our terminal.
var text = ansi_html_community__WEBPACK_IMPORTED_MODULE_0___default()(encode(body));
var messageTextNode = document.createElement("div");
applyStyle(messageTextNode, msgTextStyle);
messageTextNode.innerHTML = overlayTrustedTypesPolicy ? overlayTrustedTypesPolicy.createHTML(text) : text;
entryElement.appendChild(typeElement);
entryElement.appendChild(messageTextNode);
/** @type {HTMLDivElement} */
containerElement.appendChild(entryElement);
});
}, trustedTypesPolicyName);
}
var overlayService = createOverlayMachine({
showOverlay: function showOverlay(_ref3) {
var _ref3$level = _ref3.level,
level = _ref3$level === void 0 ? "error" : _ref3$level,
messages = _ref3.messages,
messageSource = _ref3.messageSource;
return show(level, messages, options.trustedTypesPolicyName, messageSource);
},
hideOverlay: hide
});
if (options.catchRuntimeError) {
/**
* @param {Error | undefined} error
* @param {string} fallbackMessage
*/
var handleError = function handleError(error, fallbackMessage) {
var errorObject = error instanceof Error ? error : new Error(error || fallbackMessage);
var shouldDisplay = typeof options.catchRuntimeError === "function" ? options.catchRuntimeError(errorObject) : true;
if (shouldDisplay) {
overlayService.send({
type: "RUNTIME_ERROR",
messages: [{
message: errorObject.message,
stack: parseErrorToStacks(errorObject)
}]
});
}
};
listenToRuntimeError(function (errorEvent) {
// error property may be empty in older browser like IE
var error = errorEvent.error,
message = errorEvent.message;
if (!error && !message) {
return;
}
// if error stack indicates a React error boundary caught the error, do not show overlay.
if (error && error.stack && error.stack.includes("invokeGuardedCallbackDev")) {
return;
}
handleError(error, message);
});
listenToUnhandledRejection(function (promiseRejectionEvent) {
var reason = promiseRejectionEvent.reason;
handleError(reason, "Unknown promise rejection reason");
});
}
return overlayService;
};
/***/ }),
/***/ "./node_modules/webpack-dev-server/client/progress.js":
/*!************************************************************!*\
!*** ./node_modules/webpack-dev-server/client/progress.js ***!
\************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ defineProgressElement: () => (/* binding */ defineProgressElement),
/* harmony export */ isProgressSupported: () => (/* binding */ isProgressSupported)
/* harmony export */ });
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
function _wrapNativeSuper(t) { var r = "function" == typeof Map ? new Map() : void 0; return _wrapNativeSuper = function _wrapNativeSuper(t) { if (null === t || !_isNativeFunction(t)) return t; if ("function" != typeof t) throw new TypeError("Super expression must either be null or a function"); if (void 0 !== r) { if (r.has(t)) return r.get(t); r.set(t, Wrapper); } function Wrapper() { return _construct(t, arguments, _getPrototypeOf(this).constructor); } return Wrapper.prototype = Object.create(t.prototype, { constructor: { value: Wrapper, enumerable: !1, writable: !0, configurable: !0 } }), _setPrototypeOf(Wrapper, t); }, _wrapNativeSuper(t); }
function _construct(t, e, r) { if (_isNativeReflectConstruct()) return Reflect.construct.apply(null, arguments); var o = [null]; o.push.apply(o, e); var p = new (t.bind.apply(t, o))(); return r && _setPrototypeOf(p, r.prototype), p; }
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
function _isNativeFunction(t) { try { return -1 !== Function.toString.call(t).indexOf("[native code]"); } catch (n) { return "function" == typeof t; } }
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
function _classPrivateMethodInitSpec(e, a) { _checkPrivateRedeclaration(e, a), a.add(e); }
function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); }
function isProgressSupported() {
return "customElements" in self && !!HTMLElement.prototype.attachShadow;
}
function defineProgressElement() {
var _WebpackDevServerProgress;
if (customElements.get("wds-progress")) {
return;
}
var _WebpackDevServerProgress_brand = /*#__PURE__*/new WeakSet();
var WebpackDevServerProgress = /*#__PURE__*/function (_HTMLElement) {
function WebpackDevServerProgress() {
var _this;
_classCallCheck(this, WebpackDevServerProgress);
_this = _callSuper(this, WebpackDevServerProgress);
_classPrivateMethodInitSpec(_this, _WebpackDevServerProgress_brand);
_this.attachShadow({
mode: "open"
});
_this.maxDashOffset = -219.99078369140625;
_this.animationTimer = null;
return _this;
}
_inherits(WebpackDevServerProgress, _HTMLElement);
return _createClass(WebpackDevServerProgress, [{
key: "connectedCallback",
value: function connectedCallback() {
_assertClassBrand(_WebpackDevServerProgress_brand, this, _reset).call(this);
}
}, {
key: "attributeChangedCallback",
value: function attributeChangedCallback(name, oldValue, newValue) {
if (name === "progress") {
_assertClassBrand(_WebpackDevServerProgress_brand, this, _update).call(this, Number(newValue));
} else if (name === "type") {
_assertClassBrand(_WebpackDevServerProgress_brand, this, _reset).call(this);
}
}
}], [{
key: "observedAttributes",
get: function get() {
return ["progress", "type"];
}
}]);
}(/*#__PURE__*/_wrapNativeSuper(HTMLElement));
_WebpackDevServerProgress = WebpackDevServerProgress;
function _reset() {
var _this$getAttribute, _Number;
clearTimeout(this.animationTimer);
this.animationTimer = null;
var typeAttr = (_this$getAttribute = this.getAttribute("type")) === null || _this$getAttribute === void 0 ? void 0 : _this$getAttribute.toLowerCase();
this.type = typeAttr === "circular" ? "circular" : "linear";
var innerHTML = this.type === "circular" ? _circularTemplate.call(_WebpackDevServerProgress) : _linearTemplate.call(_WebpackDevServerProgress);
this.shadowRoot.innerHTML = innerHTML;
this.initialProgress = (_Number = Number(this.getAttribute("progress"))) !== null && _Number !== void 0 ? _Number : 0;
_assertClassBrand(_WebpackDevServerProgress_brand, this, _update).call(this, this.initialProgress);
}
function _circularTemplate() {
return "\n <style>\n :host {\n width: 200px;\n height: 200px;\n position: fixed;\n right: 5%;\n top: 5%;\n transition: opacity .25s ease-in-out;\n z-index: 2147483645;\n }\n\n circle {\n fill: #282d35;\n }\n\n path {\n fill: rgba(0, 0, 0, 0);\n stroke: rgb(186, 223, 172);\n stroke-dasharray: 219.99078369140625;\n stroke-dashoffset: -219.99078369140625;\n stroke-width: 10;\n transform: rotate(90deg) translate(0px, -80px);\n }\n\n text {\n font-family: 'Open Sans', sans-serif;\n font-size: 18px;\n fill: #ffffff;\n dominant-baseline: middle;\n text-anchor: middle;\n }\n\n tspan#percent-super {\n fill: #bdc3c7;\n font-size: 0.45em;\n baseline-shift: 10%;\n }\n\n @keyframes fade {\n 0% { opacity: 1; transform: scale(1); }\n 100% { opacity: 0; transform: scale(0); }\n }\n\n .disappear {\n animation: fade 0.3s;\n animation-fill-mode: forwards;\n animation-delay: 0.5s;\n }\n\n .hidden {\n display: none;\n }\n </style>\n <svg id=\"progress\" class=\"hidden noselect\" viewBox=\"0 0 80 80\">\n <circle cx=\"50%\" cy=\"50%\" r=\"35\"></circle>\n <path d=\"M5,40a35,35 0 1,0 70,0a35,35 0 1,0 -70,0\"></path>\n <text x=\"50%\" y=\"51%\">\n <tspan id=\"percent-value\">0</tspan>\n <tspan id=\"percent-super\">%</tspan>\n </text>\n </svg>\n ";
}
function _linearTemplate() {
return "\n <style>\n :host {\n position: fixed;\n top: 0;\n left: 0;\n height: 4px;\n width: 100vw;\n z-index: 2147483645;\n }\n\n #bar {\n width: 0%;\n height: 4px;\n background-color: rgb(186, 223, 172);\n }\n\n @keyframes fade {\n 0% { opacity: 1; }\n 100% { opacity: 0; }\n }\n\n .disappear {\n animation: fade 0.3s;\n animation-fill-mode: forwards;\n animation-delay: 0.5s;\n }\n\n .hidden {\n display: none;\n }\n </style>\n <div id=\"progress\"></div>\n ";
}
function _update(percent) {
var element = this.shadowRoot.querySelector("#progress");
if (this.type === "circular") {
var path = this.shadowRoot.querySelector("path");
var value = this.shadowRoot.querySelector("#percent-value");
var offset = (100 - percent) / 100 * this.maxDashOffset;
path.style.strokeDashoffset = offset;
value.textContent = percent;
} else {
element.style.width = "".concat(percent, "%");
}
if (percent >= 100) {
_assertClassBrand(_WebpackDevServerProgress_brand, this, _hide).call(this);
} else if (percent > 0) {
_assertClassBrand(_WebpackDevServerProgress_brand, this, _show).call(this);
}
}
function _show() {
var element = this.shadowRoot.querySelector("#progress");
element.classList.remove("hidden");
}
function _hide() {
var _this2 = this;
var element = this.shadowRoot.querySelector("#progress");
if (this.type === "circular") {
element.classList.add("disappear");
element.addEventListener("animationend", function () {
element.classList.add("hidden");
_assertClassBrand(_WebpackDevServerProgress_brand, _this2, _update).call(_this2, 0);
}, {
once: true
});
} else if (this.type === "linear") {
element.classList.add("disappear");
this.animationTimer = setTimeout(function () {
element.classList.remove("disappear");
element.classList.add("hidden");
element.style.width = "0%";
_this2.animationTimer = null;
}, 800);
}
}
customElements.define("wds-progress", WebpackDevServerProgress);
}
/***/ }),
/***/ "./node_modules/webpack-dev-server/client/socket.js":
/*!**********************************************************!*\
!*** ./node_modules/webpack-dev-server/client/socket.js ***!
\**********************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ client: () => (/* binding */ client),
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _clients_WebSocketClient_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./clients/WebSocketClient.js */ "./node_modules/webpack-dev-server/client/clients/WebSocketClient.js");
/* harmony import */ var _utils_log_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils/log.js */ "./node_modules/webpack-dev-server/client/utils/log.js");
/* provided dependency */ var __webpack_dev_server_client__ = __webpack_require__(/*! ./node_modules/webpack-dev-server/client/clients/WebSocketClient.js */ "./node_modules/webpack-dev-server/client/clients/WebSocketClient.js");
/* global __webpack_dev_server_client__ */
// this WebsocketClient is here as a default fallback, in case the client is not injected
/* eslint-disable camelcase */
var Client =
// eslint-disable-next-line no-nested-ternary
typeof __webpack_dev_server_client__ !== "undefined" ? typeof __webpack_dev_server_client__.default !== "undefined" ? __webpack_dev_server_client__.default : __webpack_dev_server_client__ : _clients_WebSocketClient_js__WEBPACK_IMPORTED_MODULE_0__["default"];
/* eslint-enable camelcase */
var retries = 0;
var maxRetries = 10;
// Initialized client is exported so external consumers can utilize the same instance
// It is mutable to enforce singleton
// eslint-disable-next-line import/no-mutable-exports
var client = null;
var timeout;
/**
* @param {string} url
* @param {{ [handler: string]: (data?: any, params?: any) => any }} handlers
* @param {number} [reconnect]
*/
var socket = function initSocket(url, handlers, reconnect) {
client = new Client(url);
client.onOpen(function () {
retries = 0;
if (timeout) {
clearTimeout(timeout);
}
if (typeof reconnect !== "undefined") {
maxRetries = reconnect;
}
});
client.onClose(function () {
if (retries === 0) {
handlers.close();
}
// Try to reconnect.
client = null;
// After 10 retries stop trying, to prevent logspam.
if (retries < maxRetries) {
// Exponentially increase timeout to reconnect.
// Respectfully copied from the package `got`.
// eslint-disable-next-line no-restricted-properties
var retryInMs = 1000 * Math.pow(2, retries) + Math.random() * 100;
retries += 1;
_utils_log_js__WEBPACK_IMPORTED_MODULE_1__.log.info("Trying to reconnect...");
timeout = setTimeout(function () {
socket(url, handlers, reconnect);
}, retryInMs);
}
});
client.onMessage(
/**
* @param {any} data
*/
function (data) {
var message = JSON.parse(data);
if (handlers[message.type]) {
handlers[message.type](message.data, message.params);
}
});
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (socket);
/***/ }),
/***/ "./node_modules/webpack-dev-server/client/utils/log.js":
/*!*************************************************************!*\
!*** ./node_modules/webpack-dev-server/client/utils/log.js ***!
\*************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ log: () => (/* binding */ log),
/* harmony export */ setLogLevel: () => (/* binding */ setLogLevel)
/* harmony export */ });
/* harmony import */ var _modules_logger_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../modules/logger/index.js */ "./node_modules/webpack-dev-server/client/modules/logger/index.js");
/* harmony import */ var _modules_logger_index_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_modules_logger_index_js__WEBPACK_IMPORTED_MODULE_0__);
var name = "webpack-dev-server";
// default level is set on the client side, so it does not need
// to be set by the CLI or API
var defaultLevel = "info";
// options new options, merge with old options
/**
* @param {false | true | "none" | "error" | "warn" | "info" | "log" | "verbose"} level
* @returns {void}
*/
function setLogLevel(level) {
_modules_logger_index_js__WEBPACK_IMPORTED_MODULE_0___default().configureDefaultLogger({
level: level
});
}
setLogLevel(defaultLevel);
var log = _modules_logger_index_js__WEBPACK_IMPORTED_MODULE_0___default().getLogger(name);
/***/ }),
/***/ "./node_modules/webpack-dev-server/client/utils/sendMessage.js":
/*!*********************************************************************!*\
!*** ./node_modules/webpack-dev-server/client/utils/sendMessage.js ***!
\*********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* global __resourceQuery WorkerGlobalScope */
// Send messages to the outside, so plugins can consume it.
/**
* @param {string} type
* @param {any} [data]
*/
function sendMsg(type, data) {
if (typeof self !== "undefined" && (typeof WorkerGlobalScope === "undefined" || !(self instanceof WorkerGlobalScope))) {
self.postMessage({
type: "webpack".concat(type),
data: data
}, "*");
}
}
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (sendMsg);
/***/ }),
/***/ "./node_modules/webpack/hot/emitter.js":
/*!*********************************************!*\
!*** ./node_modules/webpack/hot/emitter.js ***!
\*********************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var EventEmitter = __webpack_require__(/*! events */ "./node_modules/events/events.js");
module.exports = new EventEmitter();
/***/ }),
/***/ "./node_modules/webpack/hot/log.js":
/*!*****************************************!*\
!*** ./node_modules/webpack/hot/log.js ***!
\*****************************************/
/***/ ((module) => {
/** @typedef {"info" | "warning" | "error"} LogLevel */
/** @type {LogLevel} */
var logLevel = "info";
function dummy() {}
/**
* @param {LogLevel} level log level
* @returns {boolean} true, if should log
*/
function shouldLog(level) {
var shouldLog =
(logLevel === "info" && level === "info") ||
(["info", "warning"].indexOf(logLevel) >= 0 && level === "warning") ||
(["info", "warning", "error"].indexOf(logLevel) >= 0 && level === "error");
return shouldLog;
}
/**
* @param {(msg?: string) => void} logFn log function
* @returns {(level: LogLevel, msg?: string) => void} function that logs when log level is sufficient
*/
function logGroup(logFn) {
return function (level, msg) {
if (shouldLog(level)) {
logFn(msg);
}
};
}
/**
* @param {LogLevel} level log level
* @param {string|Error} msg message
*/
module.exports = function (level, msg) {
if (shouldLog(level)) {
if (level === "info") {
console.log(msg);
} else if (level === "warning") {
console.warn(msg);
} else if (level === "error") {
console.error(msg);
}
}
};
var group = console.group || dummy;
var groupCollapsed = console.groupCollapsed || dummy;
var groupEnd = console.groupEnd || dummy;
module.exports.group = logGroup(group);
module.exports.groupCollapsed = logGroup(groupCollapsed);
module.exports.groupEnd = logGroup(groupEnd);
/**
* @param {LogLevel} level log level
*/
module.exports.setLogLevel = function (level) {
logLevel = level;
};
/**
* @param {Error} err error
* @returns {string} formatted error
*/
module.exports.formatError = function (err) {
var message = err.message;
var stack = err.stack;
if (!stack) {
return message;
} else if (stack.indexOf(message) < 0) {
return message + "\n" + stack;
}
return stack;
};
/***/ }),
/***/ "react":
/*!************************!*\
!*** external "React" ***!
\************************/
/***/ ((module) => {
"use strict";
module.exports = React;
/***/ }),
/***/ "react-dom":
/*!***************************!*\
!*** external "ReactDOM" ***!
\***************************/
/***/ ((module) => {
"use strict";
module.exports = ReactDOM;
/***/ }),
/***/ "lodash":
/*!********************!*\
!*** external "_" ***!
\********************/
/***/ ((module) => {
"use strict";
module.exports = _;
/***/ }),
/***/ "antd":
/*!***********************!*\
!*** external "antd" ***!
\***********************/
/***/ ((module) => {
"use strict";
module.exports = antd;
/***/ }),
/***/ "mobx":
/*!***********************!*\
!*** external "mobx" ***!
\***********************/
/***/ ((module) => {
"use strict";
module.exports = mobx;
/***/ })
/******/ });
/************************************************************************/
/******/ // The module cache
/******/ var __webpack_module_cache__ = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ var cachedModule = __webpack_module_cache__[moduleId];
/******/ if (cachedModule !== undefined) {
/******/ return cachedModule.exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = __webpack_module_cache__[moduleId] = {
/******/ id: moduleId,
/******/ // no module.loaded needed
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/************************************************************************/
/******/ /* webpack/runtime/compat get default export */
/******/ (() => {
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = (module) => {
/******/ var getter = module && module.__esModule ?
/******/ () => (module['default']) :
/******/ () => (module);
/******/ __webpack_require__.d(getter, { a: getter });
/******/ return getter;
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/define property getters */
/******/ (() => {
/******/ // define getter functions for harmony exports
/******/ __webpack_require__.d = (exports, definition) => {
/******/ for(var key in definition) {
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ }
/******/ }
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/getFullHash */
/******/ (() => {
/******/ __webpack_require__.h = () => ("7abf3fde30fc9dc45535")
/******/ })();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ (() => {
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ })();
/******/
/******/ /* webpack/runtime/make namespace object */
/******/ (() => {
/******/ // define __esModule on exports
/******/ __webpack_require__.r = (exports) => {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/nonce */
/******/ (() => {
/******/ __webpack_require__.nc = undefined;
/******/ })();
/******/
/************************************************************************/
var __webpack_exports__ = {};
// This entry need to be wrapped in an IIFE because it need to be in strict mode.
(() => {
"use strict";
var __webpack_exports__ = {};
/*!*******************************************************************************************************************************************************************************************!*\
!*** ./node_modules/webpack-dev-server/client/index.js?protocol=ws%3A&hostname=0.0.0.0&port=12300&pathname=%2Fws&logging=info&overlay=true&reconnect=Infinity&hot=false&live-reload=true ***!
\*******************************************************************************************************************************************************************************************/
var __resourceQuery = "?protocol=ws%3A&hostname=0.0.0.0&port=12300&pathname=%2Fws&logging=info&overlay=true&reconnect=Infinity&hot=false&live-reload=true";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ createSocketURL: () => (/* binding */ createSocketURL),
/* harmony export */ getCurrentScriptSource: () => (/* binding */ getCurrentScriptSource),
/* harmony export */ parseURL: () => (/* binding */ parseURL)
/* harmony export */ });
/* harmony import */ var webpack_hot_log_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! webpack/hot/log.js */ "./node_modules/webpack/hot/log.js");
/* harmony import */ var webpack_hot_log_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(webpack_hot_log_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var webpack_hot_emitter_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! webpack/hot/emitter.js */ "./node_modules/webpack/hot/emitter.js");
/* harmony import */ var webpack_hot_emitter_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(webpack_hot_emitter_js__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _socket_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./socket.js */ "./node_modules/webpack-dev-server/client/socket.js");
/* harmony import */ var _overlay_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./overlay.js */ "./node_modules/webpack-dev-server/client/overlay.js");
/* harmony import */ var _utils_log_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./utils/log.js */ "./node_modules/webpack-dev-server/client/utils/log.js");
/* harmony import */ var _utils_sendMessage_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./utils/sendMessage.js */ "./node_modules/webpack-dev-server/client/utils/sendMessage.js");
/* harmony import */ var _progress_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./progress.js */ "./node_modules/webpack-dev-server/client/progress.js");
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
/* global __resourceQuery, __webpack_hash__ */
/// <reference types="webpack/module" />
/**
* @typedef {Object} OverlayOptions
* @property {boolean | (error: Error) => boolean} [warnings]
* @property {boolean | (error: Error) => boolean} [errors]
* @property {boolean | (error: Error) => boolean} [runtimeErrors]
* @property {string} [trustedTypesPolicyName]
*/
/**
* @typedef {Object} Options
* @property {boolean} hot
* @property {boolean} liveReload
* @property {boolean} progress
* @property {boolean | OverlayOptions} overlay
* @property {string} [logging]
* @property {number} [reconnect]
*/
/**
* @typedef {Object} Status
* @property {boolean} isUnloading
* @property {string} currentHash
* @property {string} [previousHash]
*/
/**
* @param {boolean | { warnings?: boolean | string; errors?: boolean | string; runtimeErrors?: boolean | string; }} overlayOptions
*/
var decodeOverlayOptions = function decodeOverlayOptions(overlayOptions) {
if (_typeof(overlayOptions) === "object") {
["warnings", "errors", "runtimeErrors"].forEach(function (property) {
if (typeof overlayOptions[property] === "string") {
var overlayFilterFunctionString = decodeURIComponent(overlayOptions[property]);
// eslint-disable-next-line no-new-func
overlayOptions[property] = new Function("message", "var callback = ".concat(overlayFilterFunctionString, "\n return callback(message)"));
}
});
}
};
/**
* @type {Status}
*/
var status = {
isUnloading: false,
// eslint-disable-next-line camelcase
currentHash: __webpack_require__.h()
};
/**
* @returns {string}
*/
var getCurrentScriptSource = function getCurrentScriptSource() {
// `document.currentScript` is the most accurate way to find the current script,
// but is not supported in all browsers.
if (document.currentScript) {
return document.currentScript.getAttribute("src");
}
// Fallback to getting all scripts running in the document.
var scriptElements = document.scripts || [];
var scriptElementsWithSrc = Array.prototype.filter.call(scriptElements, function (element) {
return element.getAttribute("src");
});
if (scriptElementsWithSrc.length > 0) {
var currentScript = scriptElementsWithSrc[scriptElementsWithSrc.length - 1];
return currentScript.getAttribute("src");
}
// Fail as there was no script to use.
throw new Error("[webpack-dev-server] Failed to get current script source.");
};
/**
* @param {string} resourceQuery
* @returns {{ [key: string]: string | boolean }}
*/
var parseURL = function parseURL(resourceQuery) {
/** @type {{ [key: string]: string }} */
var result = {};
if (typeof resourceQuery === "string" && resourceQuery !== "") {
var searchParams = resourceQuery.slice(1).split("&");
for (var i = 0; i < searchParams.length; i++) {
var pair = searchParams[i].split("=");
result[pair[0]] = decodeURIComponent(pair[1]);
}
} else {
// Else, get the url from the <script> this file was called with.
var scriptSource = getCurrentScriptSource();
var scriptSourceURL;
try {
// The placeholder `baseURL` with `window.location.href`,
// is to allow parsing of path-relative or protocol-relative URLs,
// and will have no effect if `scriptSource` is a fully valid URL.
scriptSourceURL = new URL(scriptSource, self.location.href);
} catch (error) {
// URL parsing failed, do nothing.
// We will still proceed to see if we can recover using `resourceQuery`
}
if (scriptSourceURL) {
result = scriptSourceURL;
result.fromCurrentScript = true;
}
}
return result;
};
var parsedResourceQuery = parseURL(__resourceQuery);
var enabledFeatures = {
"Hot Module Replacement": false,
"Live Reloading": false,
Progress: false,
Overlay: false
};
/** @type {Options} */
var options = {
hot: false,
liveReload: false,
progress: false,
overlay: false
};
if (parsedResourceQuery.hot === "true") {
options.hot = true;
enabledFeatures["Hot Module Replacement"] = true;
}
if (parsedResourceQuery["live-reload"] === "true") {
options.liveReload = true;
enabledFeatures["Live Reloading"] = true;
}
if (parsedResourceQuery.progress === "true") {
options.progress = true;
enabledFeatures.Progress = true;
}
if (parsedResourceQuery.overlay) {
try {
options.overlay = JSON.parse(parsedResourceQuery.overlay);
} catch (e) {
_utils_log_js__WEBPACK_IMPORTED_MODULE_4__.log.error("Error parsing overlay options from resource query:", e);
}
// Fill in default "true" params for partially-specified objects.
if (_typeof(options.overlay) === "object") {
options.overlay = _objectSpread({
errors: true,
warnings: true,
runtimeErrors: true
}, options.overlay);
decodeOverlayOptions(options.overlay);
}
enabledFeatures.Overlay = options.overlay !== false;
}
if (parsedResourceQuery.logging) {
options.logging = parsedResourceQuery.logging;
}
if (typeof parsedResourceQuery.reconnect !== "undefined") {
options.reconnect = Number(parsedResourceQuery.reconnect);
}
/**
* @param {string} level
*/
var setAllLogLevel = function setAllLogLevel(level) {
// This is needed because the HMR logger operate separately from dev server logger
webpack_hot_log_js__WEBPACK_IMPORTED_MODULE_0___default().setLogLevel(level === "verbose" || level === "log" ? "info" : level);
(0,_utils_log_js__WEBPACK_IMPORTED_MODULE_4__.setLogLevel)(level);
};
if (options.logging) {
setAllLogLevel(options.logging);
}
var logEnabledFeatures = function logEnabledFeatures(features) {
var listEnabledFeatures = Object.keys(features);
if (!features || listEnabledFeatures.length === 0) {
return;
}
var logString = "Server started:";
// Server started: Hot Module Replacement enabled, Live Reloading enabled, Overlay disabled.
for (var i = 0; i < listEnabledFeatures.length; i++) {
var key = listEnabledFeatures[i];
logString += " ".concat(key, " ").concat(features[key] ? "enabled" : "disabled", ",");
}
// replace last comma with a period
logString = logString.slice(0, -1).concat(".");
_utils_log_js__WEBPACK_IMPORTED_MODULE_4__.log.info(logString);
};
logEnabledFeatures(enabledFeatures);
self.addEventListener("beforeunload", function () {
status.isUnloading = true;
});
var overlay = typeof window !== "undefined" ? (0,_overlay_js__WEBPACK_IMPORTED_MODULE_3__.createOverlay)(_typeof(options.overlay) === "object" ? {
trustedTypesPolicyName: options.overlay.trustedTypesPolicyName,
catchRuntimeError: options.overlay.runtimeErrors
} : {
trustedTypesPolicyName: false,
catchRuntimeError: options.overlay
}) : {
send: function send() {}
};
/**
* @param {Options} options
* @param {Status} currentStatus
*/
var reloadApp = function reloadApp(_ref, currentStatus) {
var hot = _ref.hot,
liveReload = _ref.liveReload;
if (currentStatus.isUnloading) {
return;
}
var currentHash = currentStatus.currentHash,
previousHash = currentStatus.previousHash;
var isInitial = currentHash.indexOf(/** @type {string} */previousHash) >= 0;
if (isInitial) {
return;
}
/**
* @param {Window} rootWindow
* @param {number} intervalId
*/
function applyReload(rootWindow, intervalId) {
clearInterval(intervalId);
_utils_log_js__WEBPACK_IMPORTED_MODULE_4__.log.info("App updated. Reloading...");
rootWindow.location.reload();
}
var search = self.location.search.toLowerCase();
var allowToHot = search.indexOf("webpack-dev-server-hot=false") === -1;
var allowToLiveReload = search.indexOf("webpack-dev-server-live-reload=false") === -1;
if (hot && allowToHot) {
_utils_log_js__WEBPACK_IMPORTED_MODULE_4__.log.info("App hot update...");
webpack_hot_emitter_js__WEBPACK_IMPORTED_MODULE_1___default().emit("webpackHotUpdate", currentStatus.currentHash);
if (typeof self !== "undefined" && self.window) {
// broadcast update to window
self.postMessage("webpackHotUpdate".concat(currentStatus.currentHash), "*");
}
}
// allow refreshing the page only if liveReload isn't disabled
else if (liveReload && allowToLiveReload) {
var rootWindow = self;
// use parent window for reload (in case we're in an iframe with no valid src)
var intervalId = self.setInterval(function () {
if (rootWindow.location.protocol !== "about:") {
// reload immediately if protocol is valid
applyReload(rootWindow, intervalId);
} else {
rootWindow = rootWindow.parent;
if (rootWindow.parent === rootWindow) {
// if parent equals current window we've reached the root which would continue forever, so trigger a reload anyways
applyReload(rootWindow, intervalId);
}
}
});
}
};
var ansiRegex = new RegExp(["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)", "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|"), "g");
/**
*
* Strip [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) from a string.
* Adapted from code originally released by Sindre Sorhus
* Licensed the MIT License
*
* @param {string} string
* @return {string}
*/
var stripAnsi = function stripAnsi(string) {
if (typeof string !== "string") {
throw new TypeError("Expected a `string`, got `".concat(_typeof(string), "`"));
}
return string.replace(ansiRegex, "");
};
var onSocketMessage = {
hot: function hot() {
if (parsedResourceQuery.hot === "false") {
return;
}
options.hot = true;
},
liveReload: function liveReload() {
if (parsedResourceQuery["live-reload"] === "false") {
return;
}
options.liveReload = true;
},
invalid: function invalid() {
_utils_log_js__WEBPACK_IMPORTED_MODULE_4__.log.info("App updated. Recompiling...");
// Fixes #1042. overlay doesn't clear if errors are fixed but warnings remain.
if (options.overlay) {
overlay.send({
type: "DISMISS"
});
}
(0,_utils_sendMessage_js__WEBPACK_IMPORTED_MODULE_5__["default"])("Invalid");
},
/**
* @param {string} hash
*/
hash: function hash(_hash) {
status.previousHash = status.currentHash;
status.currentHash = _hash;
},
logging: setAllLogLevel,
/**
* @param {boolean} value
*/
overlay: function overlay(value) {
if (typeof document === "undefined") {
return;
}
options.overlay = value;
decodeOverlayOptions(options.overlay);
},
/**
* @param {number} value
*/
reconnect: function reconnect(value) {
if (parsedResourceQuery.reconnect === "false") {
return;
}
options.reconnect = value;
},
/**
* @param {boolean} value
*/
progress: function progress(value) {
options.progress = value;
},
/**
* @param {{ pluginName?: string, percent: number, msg: string }} data
*/
"progress-update": function progressUpdate(data) {
if (options.progress) {
_utils_log_js__WEBPACK_IMPORTED_MODULE_4__.log.info("".concat(data.pluginName ? "[".concat(data.pluginName, "] ") : "").concat(data.percent, "% - ").concat(data.msg, "."));
}
if ((0,_progress_js__WEBPACK_IMPORTED_MODULE_6__.isProgressSupported)()) {
if (typeof options.progress === "string") {
var progress = document.querySelector("wds-progress");
if (!progress) {
(0,_progress_js__WEBPACK_IMPORTED_MODULE_6__.defineProgressElement)();
progress = document.createElement("wds-progress");
document.body.appendChild(progress);
}
progress.setAttribute("progress", data.percent);
progress.setAttribute("type", options.progress);
}
}
(0,_utils_sendMessage_js__WEBPACK_IMPORTED_MODULE_5__["default"])("Progress", data);
},
"still-ok": function stillOk() {
_utils_log_js__WEBPACK_IMPORTED_MODULE_4__.log.info("Nothing changed.");
if (options.overlay) {
overlay.send({
type: "DISMISS"
});
}
(0,_utils_sendMessage_js__WEBPACK_IMPORTED_MODULE_5__["default"])("StillOk");
},
ok: function ok() {
(0,_utils_sendMessage_js__WEBPACK_IMPORTED_MODULE_5__["default"])("Ok");
if (options.overlay) {
overlay.send({
type: "DISMISS"
});
}
reloadApp(options, status);
},
/**
* @param {string} file
*/
"static-changed": function staticChanged(file) {
_utils_log_js__WEBPACK_IMPORTED_MODULE_4__.log.info("".concat(file ? "\"".concat(file, "\"") : "Content", " from static directory was changed. Reloading..."));
self.location.reload();
},
/**
* @param {Error[]} warnings
* @param {any} params
*/
warnings: function warnings(_warnings, params) {
_utils_log_js__WEBPACK_IMPORTED_MODULE_4__.log.warn("Warnings while compiling.");
var printableWarnings = _warnings.map(function (error) {
var _formatProblem = (0,_overlay_js__WEBPACK_IMPORTED_MODULE_3__.formatProblem)("warning", error),
header = _formatProblem.header,
body = _formatProblem.body;
return "".concat(header, "\n").concat(stripAnsi(body));
});
(0,_utils_sendMessage_js__WEBPACK_IMPORTED_MODULE_5__["default"])("Warnings", printableWarnings);
for (var i = 0; i < printableWarnings.length; i++) {
_utils_log_js__WEBPACK_IMPORTED_MODULE_4__.log.warn(printableWarnings[i]);
}
var overlayWarningsSetting = typeof options.overlay === "boolean" ? options.overlay : options.overlay && options.overlay.warnings;
if (overlayWarningsSetting) {
var warningsToDisplay = typeof overlayWarningsSetting === "function" ? _warnings.filter(overlayWarningsSetting) : _warnings;
if (warningsToDisplay.length) {
overlay.send({
type: "BUILD_ERROR",
level: "warning",
messages: _warnings
});
}
}
if (params && params.preventReloading) {
return;
}
reloadApp(options, status);
},
/**
* @param {Error[]} errors
*/
errors: function errors(_errors) {
_utils_log_js__WEBPACK_IMPORTED_MODULE_4__.log.error("Errors while compiling. Reload prevented.");
var printableErrors = _errors.map(function (error) {
var _formatProblem2 = (0,_overlay_js__WEBPACK_IMPORTED_MODULE_3__.formatProblem)("error", error),
header = _formatProblem2.header,
body = _formatProblem2.body;
return "".concat(header, "\n").concat(stripAnsi(body));
});
(0,_utils_sendMessage_js__WEBPACK_IMPORTED_MODULE_5__["default"])("Errors", printableErrors);
for (var i = 0; i < printableErrors.length; i++) {
_utils_log_js__WEBPACK_IMPORTED_MODULE_4__.log.error(printableErrors[i]);
}
var overlayErrorsSettings = typeof options.overlay === "boolean" ? options.overlay : options.overlay && options.overlay.errors;
if (overlayErrorsSettings) {
var errorsToDisplay = typeof overlayErrorsSettings === "function" ? _errors.filter(overlayErrorsSettings) : _errors;
if (errorsToDisplay.length) {
overlay.send({
type: "BUILD_ERROR",
level: "error",
messages: _errors
});
}
}
},
/**
* @param {Error} error
*/
error: function error(_error) {
_utils_log_js__WEBPACK_IMPORTED_MODULE_4__.log.error(_error);
},
close: function close() {
_utils_log_js__WEBPACK_IMPORTED_MODULE_4__.log.info("Disconnected!");
if (options.overlay) {
overlay.send({
type: "DISMISS"
});
}
(0,_utils_sendMessage_js__WEBPACK_IMPORTED_MODULE_5__["default"])("Close");
}
};
/**
* @param {{ protocol?: string, auth?: string, hostname?: string, port?: string, pathname?: string, search?: string, hash?: string, slashes?: boolean }} objURL
* @returns {string}
*/
var formatURL = function formatURL(objURL) {
var protocol = objURL.protocol || "";
if (protocol && protocol.substr(-1) !== ":") {
protocol += ":";
}
var auth = objURL.auth || "";
if (auth) {
auth = encodeURIComponent(auth);
auth = auth.replace(/%3A/i, ":");
auth += "@";
}
var host = "";
if (objURL.hostname) {
host = auth + (objURL.hostname.indexOf(":") === -1 ? objURL.hostname : "[".concat(objURL.hostname, "]"));
if (objURL.port) {
host += ":".concat(objURL.port);
}
}
var pathname = objURL.pathname || "";
if (objURL.slashes) {
host = "//".concat(host || "");
if (pathname && pathname.charAt(0) !== "/") {
pathname = "/".concat(pathname);
}
} else if (!host) {
host = "";
}
var search = objURL.search || "";
if (search && search.charAt(0) !== "?") {
search = "?".concat(search);
}
var hash = objURL.hash || "";
if (hash && hash.charAt(0) !== "#") {
hash = "#".concat(hash);
}
pathname = pathname.replace(/[?#]/g,
/**
* @param {string} match
* @returns {string}
*/
function (match) {
return encodeURIComponent(match);
});
search = search.replace("#", "%23");
return "".concat(protocol).concat(host).concat(pathname).concat(search).concat(hash);
};
/**
* @param {URL & { fromCurrentScript?: boolean }} parsedURL
* @returns {string}
*/
var createSocketURL = function createSocketURL(parsedURL) {
var hostname = parsedURL.hostname;
// Node.js module parses it as `::`
// `new URL(urlString, [baseURLString])` parses it as '[::]'
var isInAddrAny = hostname === "0.0.0.0" || hostname === "::" || hostname === "[::]";
// why do we need this check?
// hostname n/a for file protocol (example, when using electron, ionic)
// see: https://github.com/webpack/webpack-dev-server/pull/384
if (isInAddrAny && self.location.hostname && self.location.protocol.indexOf("http") === 0) {
hostname = self.location.hostname;
}
var socketURLProtocol = parsedURL.protocol || self.location.protocol;
// When https is used in the app, secure web sockets are always necessary because the browser doesn't accept non-secure web sockets.
if (socketURLProtocol === "auto:" || hostname && isInAddrAny && self.location.protocol === "https:") {
socketURLProtocol = self.location.protocol;
}
socketURLProtocol = socketURLProtocol.replace(/^(?:http|.+-extension|file)/i, "ws");
var socketURLAuth = "";
// `new URL(urlString, [baseURLstring])` doesn't have `auth` property
// Parse authentication credentials in case we need them
if (parsedURL.username) {
socketURLAuth = parsedURL.username;
// Since HTTP basic authentication does not allow empty username,
// we only include password if the username is not empty.
if (parsedURL.password) {
// Result: <username>:<password>
socketURLAuth = socketURLAuth.concat(":", parsedURL.password);
}
}
// In case the host is a raw IPv6 address, it can be enclosed in
// the brackets as the brackets are needed in the final URL string.
// Need to remove those as url.format blindly adds its own set of brackets
// if the host string contains colons. That would lead to non-working
// double brackets (e.g. [[::]]) host
//
// All of these web socket url params are optionally passed in through resourceQuery,
// so we need to fall back to the default if they are not provided
var socketURLHostname = (hostname || self.location.hostname || "localhost").replace(/^\[(.*)\]$/, "$1");
var socketURLPort = parsedURL.port;
if (!socketURLPort || socketURLPort === "0") {
socketURLPort = self.location.port;
}
// If path is provided it'll be passed in via the resourceQuery as a
// query param so it has to be parsed out of the querystring in order for the
// client to open the socket to the correct location.
var socketURLPathname = "/ws";
if (parsedURL.pathname && !parsedURL.fromCurrentScript) {
socketURLPathname = parsedURL.pathname;
}
return formatURL({
protocol: socketURLProtocol,
auth: socketURLAuth,
hostname: socketURLHostname,
port: socketURLPort,
pathname: socketURLPathname,
slashes: true
});
};
var socketURL = createSocketURL(parsedResourceQuery);
(0,_socket_js__WEBPACK_IMPORTED_MODULE_2__["default"])(socketURL, onSocketMessage, options.reconnect);
})();
// This entry need to be wrapped in an IIFE because it need to be in strict mode.
(() => {
"use strict";
/*!**************************************************!*\
!*** ./projects/switch520-auto-secret/index.tsx ***!
\**************************************************/
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _Components_OpenInModal__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Components/OpenInModal */ "./projects/switch520-auto-secret/Components/OpenInModal/index.tsx");
/* harmony import */ var _Components_SearchInSteamButton__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Components/SearchInSteamButton */ "./projects/switch520-auto-secret/Components/SearchInSteamButton/index.tsx");
/* harmony import */ var _generic_svc_utils_useMatchDomain__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! #generic-svc/utils/useMatchDomain */ "./generic-services/utils/useMatchDomain/index.ts");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var react_dom_client__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-dom/client */ "./node_modules/react-dom/client.js");
/* harmony import */ var _style_less__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./style.less */ "./projects/switch520-auto-secret/style.less");
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, "catch": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
(function () {
'use strict';
if (!document.body) return;
if (window.parent !== window.self) {
document.querySelectorAll('a').forEach(function (a) {
return a.target = '_blank';
});
}
//自动输入密码并提交
;
(function () {
(0,_generic_svc_utils_useMatchDomain__WEBPACK_IMPORTED_MODULE_0__.useMatchDomain)({
includes: ['gamer520.com']
}, function () {
var el_input = function () {
return document.querySelector('input#password') || document.querySelector("input[type='password']") || document.querySelector("input[name='post_password']");
}();
var el_submit = function () {
return document.querySelector("input[type='submit']") || document.querySelector("input[name='Submit']") || document.querySelector("input[value='\u63D0\u4EA4']");
}();
document.querySelectorAll('*').forEach(function (node) {
var innerText = node.innerText;
if (innerText !== null && innerText !== void 0 && innerText.startsWith('密码保护:') && !(innerText !== null && innerText !== void 0 && innerText.includes('上一篇')) && !(innerText !== null && innerText !== void 0 && innerText.includes('牛夫人')) && !(innerText !== null && innerText !== void 0 && innerText.includes('当前位置')) && !(innerText !== null && innerText !== void 0 && innerText.includes('此内容受密码保护')) && !(innerText !== null && innerText !== void 0 && innerText.includes('永久防迷路'))) {
// const [result] = innerText.match(/[0-9]{3,6}/) ?? [null];
var secret = innerText.replace('密码保护:', '');
if (secret && el_input) {
el_input.value = secret;
el_submit.click();
}
}
});
});
(0,_generic_svc_utils_useMatchDomain__WEBPACK_IMPORTED_MODULE_0__.useMatchDomain)({
includes: ['acgxj.com']
}, /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
return _regeneratorRuntime().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
document.querySelectorAll('span').forEach(function (el) {
if (el.innerText.startsWith('访问密码:') && /\d{6}$/.test(el.innerText)) {
var pwd = el.innerText.replace('访问密码:', '');
var input_pwd = document.querySelector('input[type=password][name=e_secret_key]');
if (!input_pwd) return;
input_pwd.value = pwd;
var input_confirm = document.querySelector('input[type=submit][value=确定]');
input_confirm.click();
}
});
case 1:
case "end":
return _context.stop();
}
}, _callee);
})));
})();
//以下代码将百度网盘的链接+提取码融合为一个按钮,点击之后直接跳转并填充密码
;
(function () {
(0,_generic_svc_utils_useMatchDomain__WEBPACK_IMPORTED_MODULE_0__.useMatchDomain)({
includes: ['gamer520.com']
}, function () {
/**
* 拿到链接文本所在的P标签
*/
var containerDiv = function () {
return Array.from(document.querySelectorAll('div.entry-content.u-text-format.u-clearfix')).find(function (el) {
var _el$innerText, _el$innerText$include, _el$innerText2, _el$innerText2$includ, _el$innerText3, _el$innerText3$includ;
return ((_el$innerText = el.innerText) === null || _el$innerText === void 0 || (_el$innerText$include = _el$innerText.includes) === null || _el$innerText$include === void 0 ? void 0 : _el$innerText$include.call(_el$innerText, '提取码')) && ((_el$innerText2 = el.innerText) === null || _el$innerText2 === void 0 || (_el$innerText2$includ = _el$innerText2.includes) === null || _el$innerText2$includ === void 0 ? void 0 : _el$innerText2$includ.call(_el$innerText2, '链接:')) && ((_el$innerText3 = el.innerText) === null || _el$innerText3 === void 0 || (_el$innerText3$includ = _el$innerText3.includes) === null || _el$innerText3$includ === void 0 ? void 0 : _el$innerText3$includ.call(_el$innerText3, 'https://pan.baidu.com'));
});
}();
if (containerDiv) {
var _ref2 = function () {
//兼容不是<a/>标签的情况,将其转换为a标签
var aElement = Array.from(containerDiv.querySelectorAll('*')).reduce(function (accu, el) {
var _el$href, _el$href$startsWith;
if (accu) return accu;
if (el.tagName.toLowerCase() === 'a' && (_el$href = el.href) !== null && _el$href !== void 0 && (_el$href$startsWith = _el$href.startsWith) !== null && _el$href$startsWith !== void 0 && _el$href$startsWith.call(_el$href, 'https://pan.baidu.com')) {
return accu = el;
} else {
//如果网盘链接是个普通text,则将其转换为a标签
if ([el.innerText.includes('链接'), el.innerText.includes('https://pan.baidu.com'), el.children.length === 0 || Array.from(el.childNodes).find(function (e) {
return e.nodeName === '#text' && e.nodeValue.includes('https://pan.baidu.com');
})].every(function (bool) {
return bool;
})) {
var url = el.innerText.match(/https?:\/\/pan\.baidu\.com\/[\/a-zA-Z0-9?=&]+/)[0];
el.innerHTML = el.innerText.replace(url, "<a href=\"".concat(url, "\">").concat(url, "</a>"));
return accu = el.querySelector('a');
}
}
}, null);
return [aElement.href, aElement];
}(),
_ref3 = _slicedToArray(_ref2, 2),
baiduLink = _ref3[0],
baiduLinkAElement = _ref3[1];
var _ref4 = function () {
var pwdElement = Array.from(containerDiv.querySelectorAll('*')).find(function (el) {
var _el$innerText4, _el$innerText4$starts;
return el === null || el === void 0 || (_el$innerText4 = el.innerText) === null || _el$innerText4 === void 0 || (_el$innerText4$starts = _el$innerText4.startsWith) === null || _el$innerText4$starts === void 0 ? void 0 : _el$innerText4$starts.call(_el$innerText4, '提取码:');
});
return [pwdElement === null || pwdElement === void 0 ? void 0 : pwdElement.innerText.replace('提取码: ', '').replaceAll(' ', ''), pwdElement];
}(),
_ref5 = _slicedToArray(_ref4, 2),
pwdText = _ref5[0],
pwdElement = _ref5[1];
if (!baiduLink.includes('pwd=') && pwdText) {
var href = baiduLink + (baiduLink.includes('?') ? "&pwd=".concat(pwdText) : "?pwd=".concat(pwdText));
baiduLinkAElement.href = href;
baiduLinkAElement.innerText = baiduLinkAElement.innerText.replace(baiduLink, href);
baiduLinkAElement.target = '_blank';
}
containerDiv.removeChild(pwdElement);
}
});
})();
//以下代码跳过获取下载地址的过程 , 不需要点两次立即下载
;
_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
while (1) switch (_context4.prev = _context4.next) {
case 0:
(0,_generic_svc_utils_useMatchDomain__WEBPACK_IMPORTED_MODULE_0__.useMatchDomain)({
includes: ['gamer520.com']
}, /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
var downloadBtn, srcId;
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
while (1) switch (_context3.prev = _context3.next) {
case 0:
if (location.href.endsWith('.html')) {
_context3.next = 2;
break;
}
return _context3.abrupt("return");
case 2:
downloadBtn = document.querySelector('a.go-down');
if (downloadBtn) {
_context3.next = 5;
break;
}
return _context3.abrupt("return");
case 5:
srcId = downloadBtn.dataset.id;
downloadBtn === null || downloadBtn === void 0 || downloadBtn.addEventListener('click', /*#__PURE__*/function () {
var _ref8 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(e) {
var form, url;
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
e.preventDefault();
e.stopPropagation();
form = new URLSearchParams();
form.set('action', 'user_down_ajax');
form.set('post_id', srcId);
0 && 0;
url = "https://".concat(location.host, "/go?post_id=").concat(srcId);
if (!location.host.includes('like.gamer520')) {
_context2.next = 10;
break;
}
window.open(url);
return _context2.abrupt("return");
case 10:
location.href = url;
case 11:
case "end":
return _context2.stop();
}
}, _callee2);
}));
return function (_x) {
return _ref8.apply(this, arguments);
};
}(), false);
case 7:
case "end":
return _context3.stop();
}
}, _callee3);
})));
case 1:
case "end":
return _context4.stop();
}
}, _callee4);
}))();
//如果有密码,则自动点击网盘按钮
;
(function () {
(0,_generic_svc_utils_useMatchDomain__WEBPACK_IMPORTED_MODULE_0__.useMatchDomain)({
hosts: ['pan.baidu.com']
}, function () {
if (location.href.startsWith('https://pan.baidu.com') && location.href.includes('pwd=')) {
var submitBtn = document.getElementById('submitBtn');
if ((submitBtn === null || submitBtn === void 0 ? void 0 : submitBtn.innerText) === '提取文件') {
submitBtn.click();
}
}
});
})();
//在游戏网站中划词搜索
;
(function () {
(0,_generic_svc_utils_useMatchDomain__WEBPACK_IMPORTED_MODULE_0__.useMatchDomain)({
includes: ['gamer520', 'switch618', 'steamzg']
}, function () {
Promise.resolve(/*! import() eager */).then(__webpack_require__.bind(__webpack_require__, /*! ./SearchOnSelect */ "./projects/switch520-auto-secret/SearchOnSelect/index.tsx"));
});
})();
//允许switch618.com的右键菜单
;
(function () {
(0,_generic_svc_utils_useMatchDomain__WEBPACK_IMPORTED_MODULE_0__.useMatchDomain)({
includes: ['switch618']
}, function () {
document.oncontextmenu = null;
});
})();
//模态框模式浏览游戏
;
_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee7() {
var _registerMenu, div, reactRoot;
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
while (1) switch (_context7.prev = _context7.next) {
case 0:
if (!location.href.includes('wp-content/plugins/erphpdown/download.php')) {
_context7.next = 2;
break;
}
return _context7.abrupt("return");
case 2:
_registerMenu = /*#__PURE__*/function () {
var _ref11 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
var modalMode;
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
while (1) switch (_context6.prev = _context6.next) {
case 0:
_context6.next = 2;
return GM.getValue('options::modal-mode', true);
case 2:
modalMode = _context6.sent;
GM.registerMenuCommand("\u7A97\u53E3\u6A21\u5F0F\u6253\u5F00\u4E0B\u8F7D\u9875\u9762:".concat(modalMode ? '✅已开启' : '❌已关闭'), /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
while (1) switch (_context5.prev = _context5.next) {
case 0:
_context5.t0 = GM;
_context5.next = 3;
return GM.getValue('options::modal-mode');
case 3:
_context5.t1 = !_context5.sent;
_context5.next = 6;
return _context5.t0.setValue.call(_context5.t0, 'options::modal-mode', _context5.t1);
case 6:
_context5.next = 8;
return _registerMenu();
case 8:
location.reload();
case 9:
case "end":
return _context5.stop();
}
}, _callee5);
})));
case 4:
case "end":
return _context6.stop();
}
}, _callee6);
}));
return function registerMenu() {
return _ref11.apply(this, arguments);
};
}();
_registerMenu();
_context7.next = 6;
return GM.getValue('options::modal-mode', true);
case 6:
if (!_context7.sent) {
_context7.next = 10;
break;
}
div = document.createElement('div');
reactRoot = (0,react_dom_client__WEBPACK_IMPORTED_MODULE_1__.createRoot)(div);
reactRoot.render(/*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(_Components_OpenInModal__WEBPACK_IMPORTED_MODULE_3__.OpenInModal, null));
case 10:
case "end":
return _context7.stop();
}
}, _callee7);
}))();
//将去steam搜索框插入进页面正文
;
_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee9() {
var container, div, reactRoot;
return _regeneratorRuntime().wrap(function _callee9$(_context9) {
while (1) switch (_context9.prev = _context9.next) {
case 0:
if (!location.href.includes('wp-content/plugins/erphpdown/download.php')) {
_context9.next = 2;
break;
}
return _context9.abrupt("return");
case 2:
div = document.createElement('div');
reactRoot = (0,react_dom_client__WEBPACK_IMPORTED_MODULE_1__.createRoot)(div);
(0,_generic_svc_utils_useMatchDomain__WEBPACK_IMPORTED_MODULE_0__.useMatchDomain)({
includes: ['gamer520.com']
}, /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee8() {
var _yield$import, articleContainer;
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
while (1) switch (_context8.prev = _context8.next) {
case 0:
_context8.next = 2;
return Promise.resolve(/*! import() eager */).then(__webpack_require__.bind(__webpack_require__, /*! ./DOM-finder/switch520.com */ "./projects/switch520-auto-secret/DOM-finder/switch520.com/index.ts"));
case 2:
_yield$import = _context8.sent;
articleContainer = _yield$import.articleContainer;
container = articleContainer();
if (!document.body.innerText.includes('牛夫人') && location.pathname !== '/' && container) {
container.prepend(div);
reactRoot.render(/*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(_Components_SearchInSteamButton__WEBPACK_IMPORTED_MODULE_4__.SearchInSteam, null));
}
case 6:
case "end":
return _context8.stop();
}
}, _callee8);
})));
(0,_generic_svc_utils_useMatchDomain__WEBPACK_IMPORTED_MODULE_0__.useMatchDomain)({
regExp: /switch618\.com\/[\d+]+.html/g
}, function () {
container = document.querySelector(".erphpdown-box");
if (!container) {
return;
}
container.insertAdjacentElement('afterend', div);
reactRoot.render(/*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(_Components_SearchInSteamButton__WEBPACK_IMPORTED_MODULE_4__.SearchInSteam, null));
});
(0,_generic_svc_utils_useMatchDomain__WEBPACK_IMPORTED_MODULE_0__.useMatchDomain)({
includes: ['steamzg']
}, function () {
if (!/\d{5,8}\/?$/.test(location.pathname)) {
return;
}
var siblingEl = document.querySelector('.su-row');
if (!siblingEl) {
throw new Error('无法找到挂载<SearchInSteam />的节点');
}
var parent = siblingEl.parentElement;
parent.insertBefore(div, siblingEl);
reactRoot.render(/*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(_Components_SearchInSteamButton__WEBPACK_IMPORTED_MODULE_4__.SearchInSteam, null));
});
case 7:
case "end":
return _context9.stop();
}
}, _callee9);
}))();
})();
})();
/******/ })()
;
//# sourceMappingURL=main.js.map