Gleam Timer

No more waiting for the timer

  1. // ==UserScript==
  2. // @name Gleam Timer
  3. // @version 1.2
  4. // @author Saulios
  5. // @description No more waiting for the timer
  6. // @icon https://i.imgur.com/jsHPY7E.png
  7. // @homepage https://github.com/ColinLabDev/gleam_timer/
  8. // @supportURL https://github.com/ColinLabDev/gleam_timer/issues
  9. // @match https://gleam.io/*
  10. // @grant none
  11. // @namespace https://gf.qytechs.cn/users/843279
  12. // ==/UserScript==
  13.  
  14. // This can be used to speed up the timer on Gleam.io tasks. You can instantly complete any task related to time without waiting.
  15. // There will be a circle in the top left corner of the page with the text x1. You can click on it or press Control + 1 on your keyboard.
  16. // A pop-up message will appear. Here you can set how fast the time for the tasks should go.
  17. // The default setting is 1, which is the normal time. Recommended time multiplier: 1000 (1000 times faster)
  18.  
  19. // Updated: November 14, 2021
  20.  
  21.  
  22. ! function (t, e) {
  23. "object" == typeof exports && "undefined" != typeof module ? module.exports = e() : "function" == typeof define && define.amd ? define(e) : (t = "undefined" != typeof globalThis ? globalThis : t || self).$hookTimer = e()
  24. }(this, (function () {
  25. "use strict";
  26.  
  27. function t(t, e) {
  28. if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
  29. }
  30.  
  31. function e(t, e) {
  32. for (var n = 0; n < e.length; n++) {
  33. var r = e[n];
  34. r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(t, r.key, r)
  35. }
  36. }
  37.  
  38. function n(t, n, r) {
  39. return n && e(t.prototype, n), r && e(t, r), t
  40. }
  41.  
  42. function r(t) {
  43. if (void 0 === t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  44. return t
  45. }
  46.  
  47. function i(t, e) {
  48. return (i = Object.setPrototypeOf || function (t, e) {
  49. return t.__proto__ = e, t
  50. })(t, e)
  51. }
  52.  
  53. function o(t, e) {
  54. if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function");
  55. t.prototype = Object.create(e && e.prototype, {
  56. constructor: {
  57. value: t,
  58. writable: !0,
  59. configurable: !0
  60. }
  61. }), e && i(t, e)
  62. }
  63.  
  64. function a(t) {
  65. return (a = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (t) {
  66. return typeof t
  67. } : function (t) {
  68. return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t
  69. })(t)
  70. }
  71.  
  72. function u(t, e) {
  73. return !e || "object" !== a(e) && "function" != typeof e ? r(t) : e
  74. }
  75.  
  76. function c(t) {
  77. return (c = Object.setPrototypeOf ? Object.getPrototypeOf : function (t) {
  78. return t.__proto__ || Object.getPrototypeOf(t)
  79. })(t)
  80. }
  81.  
  82. function l(t, e, n) {
  83. return e in t ? Object.defineProperty(t, e, {
  84. value: n,
  85. enumerable: !0,
  86. configurable: !0,
  87. writable: !0
  88. }) : t[e] = n, t
  89. }
  90. var s, f, h, d = 1e3;
  91.  
  92. function p() {
  93. return d++
  94. }
  95.  
  96. function y() {
  97. return null == s && (s = "undefined" == typeof unsafeWindow ? window : unsafeWindow), s
  98. }
  99.  
  100. function v() {
  101. var t = y().parent !== y();
  102. try {
  103. t = t && "FRAMESET" !== y().parent.document.body.tagName
  104. } catch (t) {}
  105. return t
  106. }
  107.  
  108. function g(t) {
  109. var e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 1 / 0,
  110. n = Array.prototype.flat || function () {
  111. var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 1 / 0;
  112. if (t < 1) return this;
  113. var e = [],
  114. r = t - 1;
  115. return this.forEach((function (t) {
  116. t instanceof Array ? e = e.concat(n.call(t, r)) : e.push(t)
  117. })), e
  118. };
  119. return n.call(t, e)
  120. }
  121.  
  122. function m(t, e) {
  123. (null == e || e > t.length) && (e = t.length);
  124. for (var n = 0, r = new Array(e); n < e; n++) r[n] = t[n];
  125. return r
  126. }
  127.  
  128. function b(t, e) {
  129. if (t) {
  130. if ("string" == typeof t) return m(t, e);
  131. var n = Object.prototype.toString.call(t).slice(8, -1);
  132. return "Object" === n && t.constructor && (n = t.constructor.name), "Map" === n || "Set" === n ? Array.from(t) : "Arguments" === n || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? m(t, e) : void 0
  133. }
  134. }
  135.  
  136. function w(t, e) {
  137. return function (t) {
  138. if (Array.isArray(t)) return t
  139. }(t) || function (t, e) {
  140. var n = t && ("undefined" != typeof Symbol && t[Symbol.iterator] || t["@@iterator"]);
  141. if (null != n) {
  142. var r, i, o = [],
  143. a = !0,
  144. u = !1;
  145. try {
  146. for (n = n.call(t); !(a = (r = n.next()).done) && (o.push(r.value), !e || o.length !== e); a = !0);
  147. } catch (t) {
  148. u = !0, i = t
  149. } finally {
  150. try {
  151. a || null == n.return || n.return()
  152. } finally {
  153. if (u) throw i
  154. }
  155. }
  156. return o
  157. }
  158. }(t, e) || b(t, e) || function () {
  159. throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")
  160. }()
  161. }
  162.  
  163. function k(t, e) {
  164. var n = "undefined" != typeof Symbol && t[Symbol.iterator] || t["@@iterator"];
  165. if (!n) {
  166. if (Array.isArray(t) || (n = function (t, e) {
  167. if (!t) return;
  168. if ("string" == typeof t) return x(t, e);
  169. var n = Object.prototype.toString.call(t).slice(8, -1);
  170. "Object" === n && t.constructor && (n = t.constructor.name);
  171. if ("Map" === n || "Set" === n) return Array.from(t);
  172. if ("Arguments" === n || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return x(t, e)
  173. }(t)) || e && t && "number" == typeof t.length) {
  174. n && (t = n);
  175. var r = 0,
  176. i = function () {};
  177. return {
  178. s: i,
  179. n: function () {
  180. return r >= t.length ? {
  181. done: !0
  182. } : {
  183. done: !1,
  184. value: t[r++]
  185. }
  186. },
  187. e: function (t) {
  188. throw t
  189. },
  190. f: i
  191. }
  192. }
  193. throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")
  194. }
  195. var o, a = !0,
  196. u = !1;
  197. return {
  198. s: function () {
  199. n = n.call(t)
  200. },
  201. n: function () {
  202. var t = n.next();
  203. return a = t.done, t
  204. },
  205. e: function (t) {
  206. u = !0, o = t
  207. },
  208. f: function () {
  209. try {
  210. a || null == n.return || n.return()
  211. } finally {
  212. if (u) throw o
  213. }
  214. }
  215. }
  216. }
  217.  
  218. function x(t, e) {
  219. (null == e || e > t.length) && (e = t.length);
  220. for (var n = 0, r = new Array(e); n < e; n++) r[n] = t[n];
  221. return r
  222. }
  223.  
  224. function O() {
  225. return null == h && (h = "undefined" == typeof unsafeWindow ? window : unsafeWindow), h
  226. }
  227.  
  228. function R() {
  229. var t = O().parent !== O();
  230. try {
  231. t = t && "FRAMESET" !== O().parent.document.body.tagName
  232. } catch (t) {}
  233. return t
  234. }! function (t) {
  235. t.BOOLEAN = "boolean", t.STRING = "string", t.NUMBER = "number", t.SHORTCUT = "shortcut", t.LONG_STRING = "long_string", t.DATE = "date", t.COLOR = "color", t.ARRAY = "array", t.PICKLIST = "picklist", t.DUELING_PICKLIST = "dueling_picklist"
  236. }(f || (f = {}));
  237. var M = "__hooks_load_module",
  238. _ = Object.getOwnPropertyNames.bind(Object),
  239. A = Object.getPrototypeOf.bind(Object);
  240.  
  241. function S(t) {
  242. var e, n = {},
  243. r = k(_(t));
  244. try {
  245. for (r.s(); !(e = r.n()).done;) {
  246. var i = e.value;
  247. n[i] = t[i]
  248. }
  249. } catch (t) {
  250. r.e(t)
  251. } finally {
  252. r.f()
  253. }
  254. return n
  255. }
  256. var I = [[Array.prototype], [Object, !1]].map((function (t) {
  257. var e = w(t, 1)[0];
  258. return [e, S(e)]
  259. }));
  260.  
  261. function C(t) {
  262. var e, n = k(I);
  263. try {
  264. for (n.s(); !(e = n.n()).done;) {
  265. var r = w(e.value, 2),
  266. i = r[0],
  267. o = r[1];
  268. if (t === i) return o
  269. }
  270. } catch (t) {
  271. n.e(t)
  272. } finally {
  273. n.f()
  274. }
  275. return t
  276. }
  277.  
  278. function T(t, e) {
  279. return function (t, e) {
  280. var n = C(arguments.length > 2 && void 0 !== arguments[2] && !arguments[2] ? t : A(t)),
  281. r = n[e];
  282. return "function" == typeof r ? r.bind(t) : n[e]
  283. }(e.conditions || [], "reduce")((function (e, n) {
  284. return e || Object.entries(n).every((function (e) {
  285. var n = w(e, 2),
  286. r = n[0],
  287. i = n[1];
  288. return t[r] === i
  289. }))
  290. }), !1)
  291. }
  292. var E = window,
  293. j = new Proxy({}, {
  294. get: function (t, e) {
  295. var n = ["GM", e].join("_");
  296. return E[n] ? E[n] : E.GM && E.GM[e] ? E.GM[e] : void 0
  297. }
  298. }),
  299. D = function () {
  300. if (!R()) {
  301. for (var t = arguments.length, e = new Array(t), n = 0; n < t; n++) e[n] = arguments[n];
  302. var r;
  303. if (e.unshift("[TimerHook]"), "function" == typeof j.log) j.log(e.join(" "));
  304. else(r = console).log.apply(r, e)
  305. }
  306. },
  307. P = function () {
  308. if (!R()) {
  309. for (var t, e = arguments.length, n = new Array(e), r = 0; r < e; r++) n[r] = arguments[r];
  310. n.unshift("[TimerHook]"), (t = console).warn.apply(t, n)
  311. }
  312. },
  313. N = function () {
  314. function e() {
  315. t(this, e), l(this, "host", void 0), l(this, "isActive", !1), l(this, "isMountHost", !1)
  316. }
  317. return n(e, [{
  318. key: "mountHost",
  319. value: function (t) {
  320. this.host = t, this.isMountHost = !0, this.onMounted()
  321. }
  322. }, {
  323. key: "activate",
  324. value: function () {
  325. this.isActive = !0, this.init()
  326. }
  327. }, {
  328. key: "deactivate",
  329. value: function () {
  330. this.isActive = !1, this.onDestroy()
  331. }
  332. }, {
  333. key: "moduleName",
  334. get: function () {}
  335. }, {
  336. key: "priority",
  337. get: function () {
  338. return 50
  339. }
  340. }, {
  341. key: "autoActivate",
  342. get: function () {
  343. return !0
  344. }
  345. }, {
  346. key: "isCoreModule",
  347. get: function () {
  348. return !1
  349. }
  350. }, {
  351. key: "isOnlyOuterIframe",
  352. get: function () {
  353. return !1
  354. }
  355. }, {
  356. key: "getDependencyModule",
  357. value: function (t) {
  358. if (null != this.host) {
  359. var e = this.host.getModule(t);
  360. return e && e.moduleIdentityName ? e : void 0
  361. }
  362. }
  363. }, {
  364. key: "init",
  365. value: function () {}
  366. }, {
  367. key: "onMounted",
  368. value: function () {}
  369. }, {
  370. key: "onDestroy",
  371. value: function () {}
  372. }, {
  373. key: "declareConfigs",
  374. value: function () {
  375. return []
  376. }
  377. }, {
  378. key: "setConfig",
  379. value: function (t, e) {
  380. var n = this.getDependencyModule("configs");
  381. n && n.available() || P("Config module not found, can't set configs values."), n.setValue(this.moduleIdentityName, t, e)
  382. }
  383. }, {
  384. key: "getConfig",
  385. value: function (t) {
  386. var e, n = this.getDependencyModule("configs"),
  387. r = (this.declareConfigs().find((function (e) {
  388. return e.key === t
  389. })) || {}).default;
  390. return n && n.available() && null !== (e = n.getValue(this.moduleIdentityName, t)) && void 0 !== e ? e : r
  391. }
  392. }, {
  393. key: "window",
  394. get: function () {
  395. return this.host ? this.host.getWindow() : O()
  396. }
  397. }, {
  398. key: "document",
  399. get: function () {
  400. return this.window.document
  401. }
  402. }]), e
  403. }();
  404.  
  405. function B(t, e, n) {
  406. return (B = "undefined" != typeof Reflect && Reflect.get ? Reflect.get : function (t, e, n) {
  407. var r = function (t, e) {
  408. for (; !Object.prototype.hasOwnProperty.call(t, e) && null !== (t = c(t)););
  409. return t
  410. }(t, e);
  411. if (r) {
  412. var i = Object.getOwnPropertyDescriptor(r, e);
  413. return i.get ? i.get.call(n) : i.value
  414. }
  415. })(t, e, n || t)
  416. }
  417.  
  418. function L(t) {
  419. var e = function () {
  420. if ("undefined" == typeof Reflect || !Reflect.construct) return !1;
  421. if (Reflect.construct.sham) return !1;
  422. if ("function" == typeof Proxy) return !0;
  423. try {
  424. return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], (function () {}))), !0
  425. } catch (t) {
  426. return !1
  427. }
  428. }();
  429. return function () {
  430. var n, r = c(t);
  431. if (e) {
  432. var i = c(this).constructor;
  433. n = Reflect.construct(r, arguments, i)
  434. } else n = r.apply(this, arguments);
  435. return u(this, n)
  436. }
  437. }
  438. var U = function (e) {
  439. o(a, e);
  440. var i = L(a);
  441.  
  442. function a() {
  443. var e;
  444. t(this, a);
  445. for (var n = arguments.length, o = new Array(n), u = 0; u < n; u++) o[u] = arguments[u];
  446. return l(r(e = i.call.apply(i, [this].concat(o))), "rate", 1), l(r(e), "host", void 0), e
  447. }
  448. return n(a, [{
  449. key: "onRateChange",
  450. value: function (t) {
  451. this.rate = t
  452. }
  453. }, {
  454. key: "mountHost",
  455. value: function (t) {
  456. B(c(a.prototype), "mountHost", this).call(this, t), this.rate = t.rate
  457. }
  458. }]), a
  459. }(N);
  460.  
  461. function V(t) {
  462. var e = function () {
  463. if ("undefined" == typeof Reflect || !Reflect.construct) return !1;
  464. if (Reflect.construct.sham) return !1;
  465. if ("function" == typeof Proxy) return !0;
  466. try {
  467. return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], (function () {}))), !0
  468. } catch (t) {
  469. return !1
  470. }
  471. }();
  472. return function () {
  473. var n, r = c(t);
  474. if (e) {
  475. var i = c(this).constructor;
  476. n = Reflect.construct(r, arguments, i)
  477. } else n = r.apply(this, arguments);
  478. return u(this, n)
  479. }
  480. }
  481. var H = function (e) {
  482. o(a, e);
  483. var i = V(a);
  484.  
  485. function a() {
  486. var e;
  487. t(this, a);
  488. for (var n = arguments.length, o = new Array(n), u = 0; u < n; u++) o[u] = arguments[u];
  489. return l(r(e = i.call.apply(i, [this].concat(o))), "isDOMLoaded", !1), l(r(e), "waitDomLoadedCallback", void 0), e
  490. }
  491. return n(a, [{
  492. key: "onMounted",
  493. value: function () {
  494. var t = this;
  495. B(c(a.prototype), "onMounted", this).call(this), this.document.addEventListener("readystatechange", (function () {
  496. "interactive" !== t.document.readyState && "complete" !== t.document.readyState || (t.isDOMLoaded = !0, "function" == typeof t.waitDomLoadedCallback && t.waitDomLoadedCallback(void 0))
  497. }))
  498. }
  499. }, {
  500. key: "waitDomLoaded",
  501. value: function () {
  502. var t, e, n, r = this;
  503. return this.isDOMLoaded || null !== (t = this.document) && void 0 !== t && null !== (e = t.body) && void 0 !== e && null !== (n = e.childNodes) && void 0 !== n && n.length ? Promise.resolve() : new Promise((function (t) {
  504. r.waitDomLoadedCallback = t
  505. }))
  506. }
  507. }, {
  508. key: "applyStyle",
  509. value: function (t) {
  510. var e = this.style(),
  511. n = this.document.createElement("style");
  512. if (n.setAttribute("type", "text/css"), n.styleSheet) n.styleSheet.cssText = e;
  513. else {
  514. var r = this.document.createTextNode(e);
  515. n.appendChild(r)
  516. }
  517. t.appendChild(n)
  518. }
  519. }, {
  520. key: "applyElement",
  521. value: function () {
  522. var t = this.element();
  523. return this.document.body.appendChild(t), t
  524. }
  525. }, {
  526. key: "onUiRateChange",
  527. value: function (t) {}
  528. }, {
  529. key: "onRateChange",
  530. value: function (t) {
  531. var e = this.rate !== t;
  532. B(c(a.prototype), "onRateChange", this).call(this, t), e && this.onUiRateChange(t)
  533. }
  534. }, {
  535. key: "init",
  536. value: function () {
  537. var t = this;
  538. D("Started to loading '".concat(this.moduleIdentityName, "' component...")), this.waitDomLoaded().then((function () {
  539. t.applyStyle(t.applyElement()), D("UI component '".concat(t.moduleIdentityName, "' loaded."))
  540. }))
  541. }
  542. }]), a
  543. }(U);
  544.  
  545. function W(t) {
  546. var e = function () {
  547. if ("undefined" == typeof Reflect || !Reflect.construct) return !1;
  548. if (Reflect.construct.sham) return !1;
  549. if ("function" == typeof Proxy) return !0;
  550. try {
  551. return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], (function () {}))), !0
  552. } catch (t) {
  553. return !1
  554. }
  555. }();
  556. return function () {
  557. var n, r = c(t);
  558. if (e) {
  559. var i = c(this).constructor;
  560. n = Reflect.construct(r, arguments, i)
  561. } else n = r.apply(this, arguments);
  562. return u(this, n)
  563. }
  564. }
  565. var q = "hook_timer__change_rate",
  566. F = function (e) {
  567. o(a, e);
  568. var i = W(a);
  569.  
  570. function a() {
  571. var e;
  572. t(this, a);
  573. for (var n = arguments.length, o = new Array(n), u = 0; u < n; u++) o[u] = arguments[u];
  574. return l(r(e = i.call.apply(i, [this].concat(o))), "rate", 1), l(r(e), "state", "preparing"), l(r(e), "setIntervalOrigin", void 0), l(r(e), "clearIntervalOrigin", void 0), l(r(e), "inTimeCheckId", void 0), e
  575. }
  576. return n(a, [{
  577. key: "setSpeed",
  578. value: function (t) {
  579. var e = arguments.length > 1 && void 0 !== arguments[1] && arguments[1];
  580. if (0 === t && (t = this.defaultRate), t && (t !== this.rate || e) && t > 0 && (this.rate = t, this.onRateChanged(t)), null == t) {
  581. var n = prompt("Enter the time multiplier you wish to change to (Current: " + this.rate + ")");
  582. n && this.setSpeed(parseFloat(n))
  583. }
  584. }
  585. }, {
  586. key: "onRateChanged",
  587. value: function (t) {
  588. D("Timer speed rate changed to:", t), this.sentChangesToIframe(), this.getAllActivateModules().filter((function (t) {
  589. return t.onRateChange
  590. })).forEach((function (e) {
  591. e.onRateChange(t)
  592. }))
  593. }
  594. }, {
  595. key: "beginInTimeCheck",
  596. value: function () {
  597. var t = this;
  598. this.keptInTime && (this.inTimeCheckId = this.setIntervalOrigin.call(this.getWindow(), (function () {
  599. t.rate && 1 !== t.rate && t.setSpeed(t.rate, !0)
  600. }), this.keptInterval))
  601. }
  602. }, {
  603. key: "catchOriginMethod",
  604. value: function () {
  605. this.setIntervalOrigin = this.getWindow().setInterval, this.clearIntervalOrigin = this.getWindow().clearInterval
  606. }
  607. }, {
  608. key: "keptInTime",
  609. get: function () {
  610. return this.getConfig("keptInTime")
  611. }
  612. }, {
  613. key: "keptInterval",
  614. get: function () {
  615. return this.getConfig("keptInterval")
  616. }
  617. }, {
  618. key: "defaultRate",
  619. get: function () {
  620. return this.getConfig("defaultRate")
  621. }
  622. }, {
  623. key: "bootstrap",
  624. value: function () {
  625. "preparing" === this.state && (this.catchOriginMethod(), this.listenParentEvent(), this.launchModules(this.getAllModules()), this.setSpeed(this.defaultRate), this.beginInTimeCheck(), this.waitForModulesLoad(), this.state = "started")
  626. }
  627. }, {
  628. key: "launchModules",
  629. value: function (t) {
  630. var e = this;
  631. t.filter((function (t) {
  632. return t.autoActivate
  633. })).forEach((function (t) {
  634. var n = t.moduleIdentityName;
  635. e.deactivateModules.includes(n) && !t.isCoreModule || e.activateModule(n)
  636. }))
  637. }
  638. }, {
  639. key: "registerModules",
  640. value: function (t) {
  641. var e = this;
  642. return t.filter((function (t) {
  643. var n = t.moduleIdentityName;
  644. return n && e.registerModule(t, t.isOnlyOuterIframe), n
  645. }))
  646. }
  647. }, {
  648. key: "waitForModulesLoad",
  649. value: function () {
  650. var t = this,
  651. e = this.getWindow().___hooks_preModules || [];
  652. e.length > 0 && this.launchModules(this.registerModules(e)), this.getWindow()[M] = 1, this.getWindow().addEventListener(M, (function (e) {
  653. e.detail && e.detail.moduleIdentityName && t.launchModules(t.registerModules([e.detail]))
  654. }))
  655. }
  656. }, {
  657. key: "exportOuter",
  658. value: function () {
  659. var t = this;
  660. this.getWindow()._OxA ? (this.getWindow().$hookTimer = this, this.getWindow()._OxA = this) : Object.defineProperty(this.getWindow(), "_OxA", {
  661. get: function () {
  662. return 1
  663. },
  664. set: function (e) {
  665. "_OxA" === e && (t.getWindow().$hookTimer = t)
  666. }
  667. })
  668. }
  669. }, {
  670. key: "listenParentEvent",
  671. value: function () {
  672. var t = this;
  673. v() && this.getWindow().addEventListener("message", (function (e) {
  674. var n = e.data;
  675. (n.type || "") === q && t.setSpeed(n.rate || 0)
  676. }))
  677. }
  678. }, {
  679. key: "deactivateModules",
  680. get: function () {
  681. return this.getConfig("deactivateModules")
  682. }
  683. }, {
  684. key: "sentChangesToIframe",
  685. value: function () {
  686. var t = this.getWindow().document,
  687. e = t.querySelectorAll("iframe") || [],
  688. n = t.querySelectorAll("frame");
  689. if (e.length)
  690. for (var r = 0; r < e.length; r++) e[r].contentWindow.postMessage({
  691. type: q,
  692. rate: this.rate
  693. }, "*");
  694. if (n.length)
  695. for (var i = 0; i < n.length; i++) n[i].contentWindow.postMessage({
  696. type: q,
  697. rate: this.rate
  698. }, "*")
  699. }
  700. }, {
  701. key: "declareConfigs",
  702. value: function () {
  703. return [{
  704. key: "multiplyRate",
  705. type: f.NUMBER,
  706. default: 2
  707. }, {
  708. key: "divideRate",
  709. type: f.NUMBER,
  710. default: 2
  711. }, {
  712. key: "decrementRate",
  713. type: f.NUMBER,
  714. default: 2
  715. }, {
  716. key: "incrementRate",
  717. type: f.NUMBER,
  718. default: 2
  719. }, {
  720. key: "defaultRate",
  721. type: f.NUMBER,
  722. default: 1
  723. }, {
  724. key: "keptInTime",
  725. type: f.BOOLEAN,
  726. default: !0
  727. }, {
  728. key: "keptInterval",
  729. type: f.NUMBER,
  730. default: 4e3
  731. }, {
  732. key: "deactivateModules",
  733. type: f.ARRAY,
  734. values: this.getAllModules().map((function (t) {
  735. return {
  736. key: t.moduleIdentityName
  737. }
  738. })),
  739. default: []
  740. }]
  741. }
  742. }, {
  743. key: "setConfig",
  744. value: function (t, e) {
  745. var n = this.getModule("configs");
  746. n && n.available() || P("Config module not found, can't set configs values."), n.setValue("host", t, e)
  747. }
  748. }, {
  749. key: "getConfig",
  750. value: function (t) {
  751. var e, n = this.getModule("configs"),
  752. r = (this.declareConfigs().find((function (e) {
  753. return e.key === t
  754. })) || {}).default;
  755. return n && n.available() && null !== (e = n.getValue("host", t)) && void 0 !== e ? e : r
  756. }
  757. }]), a
  758. }(function () {
  759. function e() {
  760. t(this, e), l(this, "modules", {})
  761. }
  762. return n(e, [{
  763. key: "activateModule",
  764. value: function (t) {
  765. var e = this.getModule(t);
  766. e ? (e.activate(), D("Module - '".concat(t, "' activated"))) : P("Activate module failed, ".concat(t, " is not found"))
  767. }
  768. }, {
  769. key: "deactivateModule",
  770. value: function (t) {
  771. var e = this.getModule(t);
  772. e || P("Deactivate module failed, '".concat(t, "' is not found")), e.deactivate()
  773. }
  774. }, {
  775. key: "getModule",
  776. value: function (t) {
  777. return this.modules[t]
  778. }
  779. }, {
  780. key: "registerModule",
  781. value: function (t) {
  782. var e = arguments.length > 1 && void 0 !== arguments[1] && arguments[1];
  783. e && v() || (this.modules[t.moduleIdentityName] = t, t.mountHost(this))
  784. }
  785. }, {
  786. key: "getAllActivateModules",
  787. value: function () {
  788. return Object.values(this.modules).filter((function (t) {
  789. return t.isActive
  790. }))
  791. }
  792. }, {
  793. key: "getAllModules",
  794. value: function () {
  795. return Object.values(this.modules)
  796. }
  797. }, {
  798. key: "getWindow",
  799. value: function () {
  800. return y()
  801. }
  802. }]), e
  803. }());
  804. var G = function (t, e) {
  805. if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
  806. };
  807.  
  808. function z(t, e) {
  809. return t(e = {
  810. exports: {}
  811. }, e.exports), e.exports
  812. }
  813. var Y = z((function (t) {
  814. function e(n, r) {
  815. return t.exports = e = Object.setPrototypeOf || function (t, e) {
  816. return t.__proto__ = e, t
  817. }, e(n, r)
  818. }
  819. t.exports = e
  820. }));
  821. var $ = function (t, e) {
  822. if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function");
  823. t.prototype = Object.create(e && e.prototype, {
  824. constructor: {
  825. value: t,
  826. writable: !0,
  827. configurable: !0
  828. }
  829. }), e && Y(t, e)
  830. },
  831. K = z((function (t) {
  832. function e(n) {
  833. return "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? t.exports = e = function (t) {
  834. return typeof t
  835. } : t.exports = e = function (t) {
  836. return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t
  837. }, e(n)
  838. }
  839. t.exports = e
  840. }));
  841. var J = function (t) {
  842. if (void 0 === t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  843. return t
  844. };
  845. var Q = function (t, e) {
  846. return !e || "object" !== K(e) && "function" != typeof e ? J(t) : e
  847. },
  848. X = z((function (t) {
  849. function e(n) {
  850. return t.exports = e = Object.setPrototypeOf ? Object.getPrototypeOf : function (t) {
  851. return t.__proto__ || Object.getPrototypeOf(t)
  852. }, e(n)
  853. }
  854. t.exports = e
  855. }));
  856. var Z = function (t, e) {
  857. (null == e || e > t.length) && (e = t.length);
  858. for (var n = 0, r = new Array(e); n < e; n++) r[n] = t[n];
  859. return r
  860. };
  861. var tt = function (t) {
  862. if (Array.isArray(t)) return Z(t)
  863. };
  864. var et = function (t) {
  865. if ("undefined" != typeof Symbol && Symbol.iterator in Object(t)) return Array.from(t)
  866. };
  867. var nt = function (t, e) {
  868. if (t) {
  869. if ("string" == typeof t) return Z(t, e);
  870. var n = Object.prototype.toString.call(t).slice(8, -1);
  871. return "Object" === n && t.constructor && (n = t.constructor.name), "Map" === n || "Set" === n ? Array.from(t) : "Arguments" === n || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? Z(t, e) : void 0
  872. }
  873. };
  874. var rt = function () {
  875. throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")
  876. };
  877. var it = function (t) {
  878. return tt(t) || et(t) || nt(t) || rt()
  879. };
  880.  
  881. function ot(t, e) {
  882. for (var n = 0; n < e.length; n++) {
  883. var r = e[n];
  884. r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(t, r.key, r)
  885. }
  886. }
  887. var at = function (t, e, n) {
  888. return e && ot(t.prototype, e), n && ot(t, n), t
  889. };
  890. var ut = function (t, e) {
  891. for (; !Object.prototype.hasOwnProperty.call(t, e) && null !== (t = X(t)););
  892. return t
  893. },
  894. ct = z((function (t) {
  895. function e(n, r, i) {
  896. return "undefined" != typeof Reflect && Reflect.get ? t.exports = e = Reflect.get : t.exports = e = function (t, e, n) {
  897. var r = ut(t, e);
  898. if (r) {
  899. var i = Object.getOwnPropertyDescriptor(r, e);
  900. return i.get ? i.get.call(n) : i.value
  901. }
  902. }, e(n, r, i || n)
  903. }
  904. t.exports = e
  905. }));
  906. var lt = function (t) {
  907. return -1 !== Function.toString.call(t).indexOf("[native code]")
  908. };
  909. var st = function () {
  910. if ("undefined" == typeof Reflect || !Reflect.construct) return !1;
  911. if (Reflect.construct.sham) return !1;
  912. if ("function" == typeof Proxy) return !0;
  913. try {
  914. return Date.prototype.toString.call(Reflect.construct(Date, [], (function () {}))), !0
  915. } catch (t) {
  916. return !1
  917. }
  918. },
  919. ft = z((function (t) {
  920. function e(n, r, i) {
  921. return st() ? t.exports = e = Reflect.construct : t.exports = e = function (t, e, n) {
  922. var r = [null];
  923. r.push.apply(r, e);
  924. var i = new(Function.bind.apply(t, r));
  925. return n && Y(i, n.prototype), i
  926. }, e.apply(null, arguments)
  927. }
  928. t.exports = e
  929. })),
  930. ht = z((function (t) {
  931. function e(n) {
  932. var r = "function" == typeof Map ? new Map : void 0;
  933. return t.exports = e = function (t) {
  934. if (null === t || !lt(t)) return t;
  935. if ("function" != typeof t) throw new TypeError("Super expression must either be null or a function");
  936. if (void 0 !== r) {
  937. if (r.has(t)) return r.get(t);
  938. r.set(t, e)
  939. }
  940.  
  941. function e() {
  942. return ft(t, arguments, X(this).constructor)
  943. }
  944. return e.prototype = Object.create(t.prototype, {
  945. constructor: {
  946. value: e,
  947. enumerable: !1,
  948. writable: !0,
  949. configurable: !0
  950. }
  951. }), Y(e, t)
  952. }, e(n)
  953. }
  954. t.exports = e
  955. }));
  956.  
  957. function dt(t, e) {
  958. var n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : "initAssign",
  959. r = Object.getPrototypeOf(e);
  960. return Object.setPrototypeOf(t, r), "function" == typeof r[n] && r[n].call(t, e), t
  961. }
  962.  
  963. function pt(t) {
  964. return Number(Math.random().toString().substr(3, t) + Date.now()).toString(36)
  965. }
  966.  
  967. function yt(t) {
  968. var e = function () {
  969. if ("undefined" == typeof Reflect || !Reflect.construct) return !1;
  970. if (Reflect.construct.sham) return !1;
  971. if ("function" == typeof Proxy) return !0;
  972. try {
  973. return Date.prototype.toString.call(Reflect.construct(Date, [], (function () {}))), !0
  974. } catch (t) {
  975. return !1
  976. }
  977. }();
  978. return function () {
  979. var n, r = X(t);
  980. if (e) {
  981. var i = X(this).constructor;
  982. n = Reflect.construct(r, arguments, i)
  983. } else n = r.apply(this, arguments);
  984. return Q(this, n)
  985. }
  986. }! function (t, e) {
  987. t(e = {
  988. exports: {}
  989. }, e.exports)
  990. }((function (t) {
  991. function e(n) {
  992. return "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? t.exports = e = function (t) {
  993. return typeof t
  994. } : t.exports = e = function (t) {
  995. return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t
  996. }, e(n)
  997. }
  998. t.exports = e
  999. }));
  1000. var vt = {
  1001. instanceType: function (t) {
  1002. $(n, t);
  1003. var e = yt(n);
  1004.  
  1005. function n() {
  1006. return G(this, n), e.apply(this, arguments)
  1007. }
  1008. return at(n, [{
  1009. key: "initAssign",
  1010. value: function (t) {
  1011. this.id = pt(7),
  1012. function (t, e, n, r) {
  1013. e && void 0 !== e[n] ? t[n] = e[n] : "function" == typeof r && (t[n] = r())
  1014. }(this, t, "uniqueId", (function () {
  1015. return pt(7)
  1016. }))
  1017. }
  1018. }, {
  1019. key: "bind",
  1020. value: function (t) {
  1021. var e, r = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : [];
  1022. return dt((e = ct(X(n.prototype), "bind", this)).call.apply(e, [this, t].concat(it(r))), this)
  1023. }
  1024. }, {
  1025. key: "before",
  1026. value: function (t) {
  1027. var e = arguments.length > 1 && void 0 !== arguments[1] && arguments[1];
  1028. return this.surround({
  1029. before: t,
  1030. adaptAsync: e
  1031. })
  1032. }
  1033. }, {
  1034. key: "after",
  1035. value: function (t) {
  1036. var e = arguments.length > 1 && void 0 !== arguments[1] && arguments[1];
  1037. return this.surround({
  1038. after: t,
  1039. adaptAsync: e
  1040. })
  1041. }
  1042. }, {
  1043. key: "surround",
  1044. value: function (t) {
  1045. var e = t.before,
  1046. n = void 0 === e ? void 0 : e,
  1047. r = t.after,
  1048. i = void 0 === r ? void 0 : r,
  1049. o = t.onError,
  1050. a = void 0 === o ? void 0 : o,
  1051. u = t.adaptAsync,
  1052. c = void 0 !== u && u,
  1053. l = this;
  1054. return "function" != typeof l ? l : dt((function () {
  1055. for (var t = this, e = arguments.length, r = new Array(e), o = 0; o < e; o++) r[o] = arguments[o];
  1056. var u = {},
  1057. s = {
  1058. origin: l,
  1059. args: r,
  1060. trans: u
  1061. },
  1062. f = "function" == typeof a;
  1063. try {
  1064. var h, d, p = !1;
  1065. return "function" == typeof n && (h = n.call(this, Object.assign({}, s, {
  1066. preventDefault: function () {
  1067. p = !0
  1068. }
  1069. })), p) ? h : (d = h instanceof Promise && c ? h.then((function () {
  1070. return l.apply(t, r)
  1071. })) : l.apply(this, r), "function" == typeof i && (d = d instanceof Promise && c ? d.then((function (e) {
  1072. return i.call(t, Object.assign({}, s, {
  1073. lastValue: e
  1074. }))
  1075. })) : i.call(this, Object.assign({}, s, {
  1076. lastValue: d
  1077. }))), d instanceof Promise && c && f ? d.catch((function (e) {
  1078. var n = !1,
  1079. r = "";
  1080. return Promise.resolve(a.call(t, Object.assign({}, s, {
  1081. error: e,
  1082. resolve: function (t) {
  1083. r = t, n = !0
  1084. }
  1085. }))).then((function (t) {
  1086. if (!n) throw e;
  1087. return r || t
  1088. }))
  1089. })) : d)
  1090. } catch (t) {
  1091. if (!f) throw t;
  1092. var y = !1,
  1093. v = "",
  1094. g = function (t) {
  1095. v = t, y = !0
  1096. },
  1097. m = a.call(this, Object.assign({}, s, {
  1098. error: t,
  1099. resolve: g
  1100. }));
  1101. if (!y) throw t;
  1102. return v || m
  1103. }
  1104. }), this)
  1105. }
  1106. }, {
  1107. key: "then",
  1108. value: function (t) {
  1109. var e = this;
  1110. return dt((function () {
  1111. for (var n = arguments.length, r = new Array(n), i = 0; i < n; i++) r[i] = arguments[i];
  1112. var o = e.apply(this, r);
  1113. return Promise.resolve(o).then(t)
  1114. }), this)
  1115. }
  1116. }, {
  1117. key: "catch",
  1118. value: function (t) {
  1119. var e = this;
  1120. return dt((function () {
  1121. var n;
  1122. try {
  1123. for (var r = arguments.length, i = new Array(r), o = 0; o < r; o++) i[o] = arguments[o];
  1124. if ((n = e.apply(this, i)) instanceof Promise) return n.catch(t)
  1125. } catch (e) {
  1126. n = t.call(this, e)
  1127. }
  1128. return n
  1129. }), this)
  1130. }
  1131. }, {
  1132. key: "finally",
  1133. value: function (t) {
  1134. var e = this;
  1135. return dt((function () {
  1136. var n = function () {
  1137. try {
  1138. t.call(this)
  1139. } catch (t) {}
  1140. };
  1141. try {
  1142. for (var r = arguments.length, i = new Array(r), o = 0; o < r; o++) i[o] = arguments[o];
  1143. var a = e.apply(this, i);
  1144. return a instanceof Promise ? "function" == typeof a.finally ? a.finally((function () {
  1145. return n()
  1146. })) : a.catch((function (t) {
  1147. return t
  1148. })).then((function (t) {
  1149. if (n(), t instanceof Error) throw t
  1150. })) : (n(), a)
  1151. } catch (t) {
  1152. throw n(), t
  1153. }
  1154. }), this)
  1155. }
  1156. }, {
  1157. key: "register",
  1158. value: function () {
  1159. var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};
  1160. return this.registerClass((function (e) {
  1161. var n = function (t) {
  1162. $(n, t);
  1163. var e = yt(n);
  1164.  
  1165. function n() {
  1166. return G(this, n), e.apply(this, arguments)
  1167. }
  1168. return n
  1169. }(e);
  1170. return Object.assign(n.prototype, t), n
  1171. }))
  1172. }
  1173. }, {
  1174. key: "registerClass",
  1175. value: function (t) {
  1176. var e = t(this.constructor),
  1177. n = this.bind(this);
  1178. if (Object.setPrototypeOf(n, e.prototype), "function" != typeof e || !(n instanceof this.constructor)) throw new Error("Registered class must extend FunctionInstance");
  1179. return n
  1180. }
  1181. }]), n
  1182. }(ht(Function))
  1183. };
  1184.  
  1185. function gt(t, e) {
  1186. var n = function () {
  1187. for (var e = arguments.length, n = new Array(e), r = 0; r < e; r++) n[r] = arguments[r];
  1188. return (t || function () {}).apply(this, n)
  1189. };
  1190. return function (t, e) {
  1191. var n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : "initAssign",
  1192. r = e.prototype;
  1193. Object.setPrototypeOf(t, r), "function" == typeof r[n] && r[n].call(t)
  1194. }(n, (e = Object.assign({}, vt, e)).instanceType), n
  1195. }
  1196. var mt, bt = {
  1197. protect: !1,
  1198. syncDesc: !0,
  1199. native: !1
  1200. },
  1201. wt = Object.defineProperty,
  1202. kt = Object.defineProperties;
  1203.  
  1204. function xt(t, e, n) {
  1205. var r = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : {},
  1206. i = t[e];
  1207. if ("function" == typeof i) {
  1208. var o = Object.assign({}, bt, r),
  1209. a = o.native,
  1210. u = n(a ? i : gt(i));
  1211. t[e] = a ? u : function () {
  1212. for (var t = arguments.length, e = new Array(t), n = 0; n < t; n++) e[n] = arguments[n];
  1213. try {
  1214. return u.apply(this, e)
  1215. } catch (t) {
  1216. return console.warn("[Hook JS]", "Hooks running lost once."), i.apply(this, e)
  1217. }
  1218. };
  1219. var c = o.protect,
  1220. l = o.syncDesc;
  1221. c && _t(t, e), l && At(i, t[e])
  1222. }
  1223. }
  1224.  
  1225. function Ot(t, e, n, r) {
  1226. var i = arguments.length > 4 && void 0 !== arguments[4] ? arguments[4] : {};
  1227. return xt(t, e, (function (t) {
  1228. return t[n](r)
  1229. }), i)
  1230. }
  1231.  
  1232. function Rt(t, e, n) {
  1233. var r = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : {};
  1234. return Ot(t, e, "before", n, r)
  1235. }
  1236.  
  1237. function Mt(t, e, n) {
  1238. var r = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : {};
  1239. return xt(t, e, n, Object.assign({}, r, {
  1240. native: !0
  1241. }))
  1242. }
  1243.  
  1244. function _t(t, e) {
  1245. wt.call(Object, t, e, {
  1246. writable: !1
  1247. })
  1248. }
  1249.  
  1250. function At(t, e) {
  1251. kt.call(Object, e, {
  1252. toString: {
  1253. enumerable: !1,
  1254. writable: !0,
  1255. value: function () {
  1256. return t.toString()
  1257. }
  1258. },
  1259. toLocaleString: {
  1260. enumerable: !1,
  1261. writable: !0,
  1262. value: function () {
  1263. return t.toLocaleString()
  1264. }
  1265. }
  1266. })
  1267. }
  1268.  
  1269. function St(t) {
  1270. var e = function () {
  1271. if ("undefined" == typeof Reflect || !Reflect.construct) return !1;
  1272. if (Reflect.construct.sham) return !1;
  1273. if ("function" == typeof Proxy) return !0;
  1274. try {
  1275. return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], (function () {}))), !0
  1276. } catch (t) {
  1277. return !1
  1278. }
  1279. }();
  1280. return function () {
  1281. var n, r = c(t);
  1282. if (e) {
  1283. var i = c(this).constructor;
  1284. n = Reflect.construct(r, arguments, i)
  1285. } else n = r.apply(this, arguments);
  1286. return u(this, n)
  1287. }
  1288. }! function (t) {
  1289. t.TIMEOUT = "timeout", t.INTERVAL = "interval"
  1290. }(mt || (mt = {}));
  1291. var It = function (e) {
  1292. o(a, e);
  1293. var i = St(a);
  1294.  
  1295. function a() {
  1296. var e;
  1297. t(this, a);
  1298. for (var n = arguments.length, o = new Array(n), u = 0; u < n; u++) o[u] = arguments[u];
  1299. return l(r(e = i.call.apply(i, [this].concat(o))), "percentage", void 0), l(r(e), "interval", {}), l(r(e), "timeout", {}), l(r(e), "setIntervalOrigin", void 0), l(r(e), "setTimeoutOrigin", void 0), l(r(e), "clearIntervalOrigin", void 0), l(r(e), "clearTimeoutOrigin", void 0), e
  1300. }
  1301. return n(a, [{
  1302. key: "onMounted",
  1303. value: function () {
  1304. B(c(a.prototype), "onMounted", this).call(this), this.setIntervalOrigin = this.window.setInterval, this.setTimeoutOrigin = this.window.setTimeout, this.clearIntervalOrigin = this.window.clearInterval, this.clearTimeoutOrigin = this.window.clearTimeout
  1305. }
  1306. }, {
  1307. key: "init",
  1308. value: function () {
  1309. var t = this;
  1310. this.percentage = 1 / this.rate, Mt(this.window, "setInterval", (function (e) {
  1311. return t.getHookedTimerFunction(mt.INTERVAL, e)
  1312. })), Mt(this.window, "setTimeout", (function (e) {
  1313. return t.getHookedTimerFunction(mt.TIMEOUT, e)
  1314. })), Rt(this.window, "clearInterval", (function (e) {
  1315. var n = e.args;
  1316. t.redirectNewestId(n)
  1317. })), Rt(this.window, "clearTimeout", (function (e) {
  1318. var n = e.args;
  1319. t.redirectNewestId(n)
  1320. }))
  1321. }
  1322. }, {
  1323. key: "onRateChange",
  1324. value: function (t) {
  1325. var e = this;
  1326. B(c(a.prototype), "onRateChange", this).call(this, t), this.percentage = 1 / t, Object.values(this.interval).forEach((function (t) {
  1327. t.args[1] = Math.floor((t.originMS || 1) * e.percentage), e.clearIntervalOrigin.call(e.window, t.nowId), t.nowId = e.setIntervalOrigin.apply(e.window, t.args)
  1328. })), Object.values(this.timeout).forEach((function (t) {
  1329. var n = Date.now(),
  1330. r = t.exceptNextFireTime,
  1331. i = t.oldPercentage,
  1332. o = r - n;
  1333. o < 0 && (o = 0);
  1334. var a = Math.floor(e.percentage / i * o);
  1335. t.args[1] = a, t.exceptNextFireTime = n + a, t.oldPercentage = e.percentage, e.clearTimeoutOrigin.call(e.window, t.nowId), t.nowId = e.setTimeoutOrigin.apply(e.window, t.args)
  1336. }))
  1337. }
  1338. }, {
  1339. key: "notifyExec",
  1340. value: function (t) {
  1341. var e = this;
  1342. t && Object.values(this.timeout).filter((function (e) {
  1343. return e.uniqueId === t
  1344. })).forEach((function (t) {
  1345. e.clearTimeoutOrigin.call(e.window, t.nowId), delete e.timeout[t.originId]
  1346. }))
  1347. }
  1348. }, {
  1349. key: "redirectNewestId",
  1350. value: function (t) {
  1351. var e = t[0];
  1352. this.interval[e] && (t[0] = this.interval[e].nowId, delete this.interval[e]), this.timeout[e] && (t[0] = this.timeout[e].nowId, delete this.timeout[e])
  1353. }
  1354. }, {
  1355. key: "getHookedTimerFunction",
  1356. value: function (t, e) {
  1357. var n = t,
  1358. r = this;
  1359. return function () {
  1360. for (var t = arguments.length, i = new Array(t), o = 0; o < t; o++) i[o] = arguments[o];
  1361. var a = p(),
  1362. u = i[0];
  1363. "string" == typeof u && (r.window.__timer = {
  1364. notifyExec: r.notifyExec.bind(r)
  1365. }, u += ";__timer.notifyExec(" + a + ")", i[0] = u), "function" == typeof u && (i[0] = function () {
  1366. var t = u.apply(this, arguments);
  1367. return r.notifyExec(a), t
  1368. });
  1369. var c = i[1];
  1370. i[1] *= r.percentage;
  1371. var l = e.apply(r.window, i);
  1372. return r[n][l] = {
  1373. args: i,
  1374. originMS: c,
  1375. originId: l,
  1376. nowId: l,
  1377. uniqueId: a,
  1378. oldPercentage: r.percentage,
  1379. exceptNextFireTime: Date.now() + c
  1380. }, l
  1381. }
  1382. }
  1383. }, {
  1384. key: "moduleIdentityName",
  1385. get: function () {
  1386. return "timer"
  1387. }
  1388. }]), a
  1389. }(U);
  1390.  
  1391. function Ct(t) {
  1392. var e = function () {
  1393. if ("undefined" == typeof Reflect || !Reflect.construct) return !1;
  1394. if (Reflect.construct.sham) return !1;
  1395. if ("function" == typeof Proxy) return !0;
  1396. try {
  1397. return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], (function () {}))), !0
  1398. } catch (t) {
  1399. return !1
  1400. }
  1401. }();
  1402. return function () {
  1403. var n, r = c(t);
  1404. if (e) {
  1405. var i = c(this).constructor;
  1406. n = Reflect.construct(r, arguments, i)
  1407. } else n = r.apply(this, arguments);
  1408. return u(this, n)
  1409. }
  1410. }
  1411. var Tt, Et = function (e) {
  1412. o(a, e);
  1413. var i = Ct(a);
  1414.  
  1415. function a() {
  1416. var e;
  1417. t(this, a);
  1418. for (var n = arguments.length, o = new Array(n), u = 0; u < n; u++) o[u] = arguments[u];
  1419. return l(r(e = i.call.apply(i, [this].concat(o))), "DateOrigin", void 0), l(r(e), "DateModified", void 0), l(r(e), "rate", 1), l(r(e), "lastDatetime", void 0), l(r(e), "lastMDatetime", void 0), e
  1420. }
  1421. return n(a, [{
  1422. key: "onMounted",
  1423. value: function () {
  1424. B(c(a.prototype), "onMounted", this).call(this), this.lastDatetime = Date.now(), this.lastMDatetime = Date.now(), this.DateOrigin = this.window.Date, this.DateModified = this.window.Date
  1425. }
  1426. }, {
  1427. key: "init",
  1428. value: function () {
  1429. this.hookedDate()
  1430. }
  1431. }, {
  1432. key: "onRateChange",
  1433. value: function (t) {
  1434. this.DateModified && (this.lastMDatetime = this.DateModified.now(), this.lastDatetime = this.DateOrigin.now()), B(c(a.prototype), "onRateChange", this).call(this, t)
  1435. }
  1436. }, {
  1437. key: "hookedDate",
  1438. value: function () {
  1439. var e = this,
  1440. n = this;
  1441. Mt(this.window, "Date", (function (e) {
  1442. var r = function (e) {
  1443. o(i, e);
  1444. var r = Ct(i);
  1445.  
  1446. function i() {
  1447. t(this, i);
  1448. for (var e = arguments.length, o = new Array(e), a = 0; a < e; a++) o[a] = arguments[a];
  1449. if (0 === o.length) {
  1450. var u = n.DateOrigin.now(),
  1451. c = u - n.lastDatetime,
  1452. l = c * n.rate;
  1453. o.push(n.lastMDatetime + l)
  1454. }
  1455. return r.call.apply(r, [this].concat(o))
  1456. }
  1457. return i
  1458. }(e);
  1459. return r = r.bind(new r)
  1460. })), this.DateModified = this.window.Date, Mt(this.DateModified, "now", (function () {
  1461. return function () {
  1462. return (new e.DateModified).getTime()
  1463. }
  1464. }))
  1465. }
  1466. }, {
  1467. key: "moduleIdentityName",
  1468. get: function () {
  1469. return "dateTimer"
  1470. }
  1471. }]), a
  1472. }(U);
  1473.  
  1474. function jt(t, e) {
  1475. var n = "undefined" != typeof Symbol && t[Symbol.iterator] || t["@@iterator"];
  1476. if (!n) {
  1477. if (Array.isArray(t) || (n = function (t, e) {
  1478. if (!t) return;
  1479. if ("string" == typeof t) return Dt(t, e);
  1480. var n = Object.prototype.toString.call(t).slice(8, -1);
  1481. "Object" === n && t.constructor && (n = t.constructor.name);
  1482. if ("Map" === n || "Set" === n) return Array.from(t);
  1483. if ("Arguments" === n || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return Dt(t, e)
  1484. }(t)) || e && t && "number" == typeof t.length) {
  1485. n && (t = n);
  1486. var r = 0,
  1487. i = function () {};
  1488. return {
  1489. s: i,
  1490. n: function () {
  1491. return r >= t.length ? {
  1492. done: !0
  1493. } : {
  1494. done: !1,
  1495. value: t[r++]
  1496. }
  1497. },
  1498. e: function (t) {
  1499. throw t
  1500. },
  1501. f: i
  1502. }
  1503. }
  1504. throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")
  1505. }
  1506. var o, a = !0,
  1507. u = !1;
  1508. return {
  1509. s: function () {
  1510. n = n.call(t)
  1511. },
  1512. n: function () {
  1513. var t = n.next();
  1514. return a = t.done, t
  1515. },
  1516. e: function (t) {
  1517. u = !0, o = t
  1518. },
  1519. f: function () {
  1520. try {
  1521. a || null == n.return || n.return()
  1522. } finally {
  1523. if (u) throw o
  1524. }
  1525. }
  1526. }
  1527. }
  1528.  
  1529. function Dt(t, e) {
  1530. (null == e || e > t.length) && (e = t.length);
  1531. for (var n = 0, r = new Array(e); n < e; n++) r[n] = t[n];
  1532. return r
  1533. }
  1534.  
  1535. function Pt(t) {
  1536. var e = function () {
  1537. if ("undefined" == typeof Reflect || !Reflect.construct) return !1;
  1538. if (Reflect.construct.sham) return !1;
  1539. if ("function" == typeof Proxy) return !0;
  1540. try {
  1541. return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], (function () {}))), !0
  1542. } catch (t) {
  1543. return !1
  1544. }
  1545. }();
  1546. return function () {
  1547. var n, r = c(t);
  1548. if (e) {
  1549. var i = c(this).constructor;
  1550. n = Reflect.construct(r, arguments, i)
  1551. } else n = r.apply(this, arguments);
  1552. return u(this, n)
  1553. }
  1554. }! function (t) {
  1555. t.CTRL = "ctrl", t.META = "meta", t.CMD = "meta", t.SHIFT = "shift", t.ALT = "alt"
  1556. }(Tt || (Tt = {}));
  1557. var Nt = function (e) {
  1558. o(i, e);
  1559. var r = Pt(i);
  1560.  
  1561. function i() {
  1562. return t(this, i), r.apply(this, arguments)
  1563. }
  1564. return n(i, [{
  1565. key: "init",
  1566. value: function () {
  1567. var t = this,
  1568. e = this.shortcutList;
  1569. this.window.addEventListener("keydown", (function (n) {
  1570. var r, i = jt(e);
  1571. try {
  1572. for (i.s(); !(r = i.n()).done;) {
  1573. var o = r.value;
  1574. T(n, o) && (n.preventDefault(), n.stopPropagation(), o.operator(t.host))
  1575. }
  1576. } catch (t) {
  1577. i.e(t)
  1578. } finally {
  1579. i.f()
  1580. }
  1581. }))
  1582. }
  1583. }, {
  1584. key: "shortcutList",
  1585. get: function () {
  1586. var t = this;
  1587. return [["shortcutExpressions.+", function (t) {
  1588. return t.speedUp()
  1589. }], ["shortcutExpressions.-", function (t) {
  1590. return t.speedDown()
  1591. }], ["shortcutExpressions.*", function (t) {
  1592. return t.speedMultiply()
  1593. }], ["shortcutExpressions./", function (t) {
  1594. return t.speedDivide()
  1595. }], ["shortcutExpressions.reset", function (t) {
  1596. return t.setSpeed(1)
  1597. }], ["shortcutExpressions.custom", function (t) {
  1598. return t.setSpeed()
  1599. }]].map((function (e) {
  1600. var n = w(e, 2),
  1601. r = n[0],
  1602. i = n[1];
  1603. return {
  1604. expressions: t.getConfig(r),
  1605. operator: i
  1606. }
  1607. })).map((function (t) {
  1608. return e = t, "string" == typeof (n = Object.assign({}, e, {
  1609. conditions: []
  1610. })).expressions && (n.expressions = n.expressions.split(";")), n.expressions && n.expressions instanceof Array && (n.conditions = n.expressions.map((function (t) {
  1611. return function (t) {
  1612. var e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : "+",
  1613. n = t.split(e).map((function (t) {
  1614. return t.trim()
  1615. })).filter((function (t) {
  1616. return t
  1617. })),
  1618. r = {
  1619. code: n.pop() || "UNKNOWN_KEY"
  1620. };
  1621. return n.forEach((function (t) {
  1622. r[t + "Key"] = !0
  1623. })), r
  1624. }(t)
  1625. }))), n;
  1626. var e, n
  1627. }))
  1628. }
  1629. }, {
  1630. key: "moduleIdentityName",
  1631. get: function () {
  1632. return "shortcutKey"
  1633. }
  1634. }, {
  1635. key: "declareConfigs",
  1636. value: function () {
  1637. return [{
  1638. type: f.ARRAY,
  1639. itemType: f.SHORTCUT,
  1640. key: "shortcutExpressions.custom",
  1641. default: ["ctrl + Digit1"]
  1642. }]
  1643. }
  1644. }]), i
  1645. }(U);
  1646.  
  1647. function Bt(t) {
  1648. var e = function () {
  1649. if ("undefined" == typeof Reflect || !Reflect.construct) return !1;
  1650. if (Reflect.construct.sham) return !1;
  1651. if ("function" == typeof Proxy) return !0;
  1652. try {
  1653. return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], (function () {}))), !0
  1654. } catch (t) {
  1655. return !1
  1656. }
  1657. }();
  1658. return function () {
  1659. var n, r = c(t);
  1660. if (e) {
  1661. var i = c(this).constructor;
  1662. n = Reflect.construct(r, arguments, i)
  1663. } else n = r.apply(this, arguments);
  1664. return u(this, n)
  1665. }
  1666. }
  1667.  
  1668. function Lt(t, e) {
  1669. var n = "undefined" != typeof Symbol && t[Symbol.iterator] || t["@@iterator"];
  1670. if (!n) {
  1671. if (Array.isArray(t) || (n = function (t, e) {
  1672. if (!t) return;
  1673. if ("string" == typeof t) return Ut(t, e);
  1674. var n = Object.prototype.toString.call(t).slice(8, -1);
  1675. "Object" === n && t.constructor && (n = t.constructor.name);
  1676. if ("Map" === n || "Set" === n) return Array.from(t);
  1677. if ("Arguments" === n || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return Ut(t, e)
  1678. }(t)) || e && t && "number" == typeof t.length) {
  1679. n && (t = n);
  1680. var r = 0,
  1681. i = function () {};
  1682. return {
  1683. s: i,
  1684. n: function () {
  1685. return r >= t.length ? {
  1686. done: !0
  1687. } : {
  1688. done: !1,
  1689. value: t[r++]
  1690. }
  1691. },
  1692. e: function (t) {
  1693. throw t
  1694. },
  1695. f: i
  1696. }
  1697. }
  1698. throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")
  1699. }
  1700. var o, a = !0,
  1701. u = !1;
  1702. return {
  1703. s: function () {
  1704. n = n.call(t)
  1705. },
  1706. n: function () {
  1707. var t = n.next();
  1708. return a = t.done, t
  1709. },
  1710. e: function (t) {
  1711. u = !0, o = t
  1712. },
  1713. f: function () {
  1714. try {
  1715. a || null == n.return || n.return()
  1716. } finally {
  1717. if (u) throw o
  1718. }
  1719. }
  1720. }
  1721. }
  1722.  
  1723. function Ut(t, e) {
  1724. (null == e || e > t.length) && (e = t.length);
  1725. for (var n = 0, r = new Array(e); n < e; n++) r[n] = t[n];
  1726. return r
  1727. }
  1728.  
  1729. function Vt(t) {
  1730. var e, n = {},
  1731. r = Lt(Object.entries(t).filter((function (t) {
  1732. var e = w(t, 1)[0];
  1733. return !["target", "key"].includes(e)
  1734. })));
  1735. try {
  1736. for (r.s(); !(e = r.n()).done;) {
  1737. var i = w(e.value, 2),
  1738. o = i[0],
  1739. a = i[1];
  1740. n[o] = a
  1741. }
  1742. } catch (t) {
  1743. r.e(t)
  1744. } finally {
  1745. r.f()
  1746. }
  1747. return n
  1748. }
  1749. var Ht = function (e) {
  1750. o(a, e);
  1751. var i = Bt(a);
  1752.  
  1753. function a() {
  1754. var e;
  1755. t(this, a);
  1756. for (var n = arguments.length, o = new Array(n), u = 0; u < n; u++) o[u] = arguments[u];
  1757. return l(r(e = i.call.apply(i, [this].concat(o))), "defines", []), l(r(e), "definePropertiesOrigin", void 0), l(r(e), "definePropertyOrigin", void 0), e
  1758. }
  1759. return n(a, [{
  1760. key: "onMounted",
  1761. value: function () {
  1762. B(c(a.prototype), "onMounted", this).call(this), this.definePropertiesOrigin = this.window.Object.defineProperties, this.definePropertyOrigin = this.window.Object.defineProperty
  1763. }
  1764. }, {
  1765. key: "isCoreModule",
  1766. get: function () {
  1767. return !0
  1768. }
  1769. }, {
  1770. key: "init",
  1771. value: function () {
  1772. var t = this;
  1773. Rt(this.window.Object, "defineProperties", (function (e) {
  1774. var n, r = e.args,
  1775. i = w(r, 2),
  1776. o = i[0],
  1777. a = i[1],
  1778. u = Object.entries(a).map((function (e) {
  1779. var n = w(e, 2),
  1780. i = n[0],
  1781. a = n[1],
  1782. u = Object.assign({
  1783. target: o,
  1784. key: i
  1785. }, a);
  1786. return t.hookDefine(u) ? (r[0] = u.target, [u.key, Vt(u)]) : [!1]
  1787. })).filter((function (t) {
  1788. return w(t, 1)[0]
  1789. }));
  1790. r[1] = (n = {}, u.forEach((function (t) {
  1791. n[null == t[0] ? "" : t[0]] = t[1]
  1792. })), n)
  1793. })), Rt(this.window.Object, "defineProperty", (function (e) {
  1794. var n = e.args,
  1795. r = e.preventDefault,
  1796. i = w(n, 3),
  1797. o = i[0],
  1798. a = i[1],
  1799. u = i[2],
  1800. c = Object.assign({
  1801. target: o,
  1802. key: a
  1803. }, u);
  1804. t.hookDefine(c) ? (n[0] = c.target, n[1] = c.key, n[2] = Vt(c)) : r()
  1805. }))
  1806. }
  1807. }, {
  1808. key: "hookDefine",
  1809. value: function (t) {
  1810. var e, n = Lt(this.defines);
  1811. try {
  1812. for (n.s(); !(e = n.n()).done;) {
  1813. if ((0, e.value)(t)) return !1
  1814. }
  1815. } catch (t) {
  1816. n.e(t)
  1817. } finally {
  1818. n.f()
  1819. }
  1820. return !0
  1821. }
  1822. }, {
  1823. key: "applyDefineRole",
  1824. value: function (t) {
  1825. this.defines.push(t)
  1826. }
  1827. }, {
  1828. key: "moduleIdentityName",
  1829. get: function () {
  1830. return "definition"
  1831. }
  1832. }]), a
  1833. }(N);
  1834.  
  1835. function Wt(t) {
  1836. return function (t) {
  1837. if (Array.isArray(t)) return m(t)
  1838. }(t) || function (t) {
  1839. if ("undefined" != typeof Symbol && null != t[Symbol.iterator] || null != t["@@iterator"]) return Array.from(t)
  1840. }(t) || b(t) || function () {
  1841. throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")
  1842. }()
  1843. }
  1844.  
  1845. function qt(t) {
  1846. var e = function () {
  1847. if ("undefined" == typeof Reflect || !Reflect.construct) return !1;
  1848. if (Reflect.construct.sham) return !1;
  1849. if ("function" == typeof Proxy) return !0;
  1850. try {
  1851. return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], (function () {}))), !0
  1852. } catch (t) {
  1853. return !1
  1854. }
  1855. }();
  1856. return function () {
  1857. var n, r = c(t);
  1858. if (e) {
  1859. var i = c(this).constructor;
  1860. n = Reflect.construct(r, arguments, i)
  1861. } else n = r.apply(this, arguments);
  1862. return u(this, n)
  1863. }
  1864. }
  1865. var Ft = function (e) {
  1866. o(a, e);
  1867. var i = qt(a);
  1868.  
  1869. function a() {
  1870. var e;
  1871. t(this, a);
  1872. for (var n = arguments.length, o = new Array(n), u = 0; u < n; u++) o[u] = arguments[u];
  1873. return l(r(e = i.call.apply(i, [this].concat(o))), "extraElements", []), e
  1874. }
  1875. return n(a, [{
  1876. key: "init",
  1877. value: function () {
  1878. var t = this;
  1879. ! function (t, e, n) {
  1880. Ot(t, e, "after", n, arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : {})
  1881. }(this.window.Element.prototype, "attachShadow", (function (e) {
  1882. var n = e.lastValue;
  1883. return t.extraElements.push(n), n
  1884. }))
  1885. }
  1886. }, {
  1887. key: "querySelectorAll",
  1888. value: function (t) {
  1889. return g(this.extraElements.map((function (e) {
  1890. return Wt(e.querySelectorAll(t))
  1891. })))
  1892. }
  1893. }, {
  1894. key: "moduleIdentityName",
  1895. get: function () {
  1896. return "shadowDOM"
  1897. }
  1898. }, {
  1899. key: "isCoreModule",
  1900. get: function () {
  1901. return !0
  1902. }
  1903. }]), a
  1904. }(N);
  1905.  
  1906. function Gt(t, e) {
  1907. var n = "undefined" != typeof Symbol && t[Symbol.iterator] || t["@@iterator"];
  1908. if (!n) {
  1909. if (Array.isArray(t) || (n = function (t, e) {
  1910. if (!t) return;
  1911. if ("string" == typeof t) return zt(t, e);
  1912. var n = Object.prototype.toString.call(t).slice(8, -1);
  1913. "Object" === n && t.constructor && (n = t.constructor.name);
  1914. if ("Map" === n || "Set" === n) return Array.from(t);
  1915. if ("Arguments" === n || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return zt(t, e)
  1916. }(t)) || e && t && "number" == typeof t.length) {
  1917. n && (t = n);
  1918. var r = 0,
  1919. i = function () {};
  1920. return {
  1921. s: i,
  1922. n: function () {
  1923. return r >= t.length ? {
  1924. done: !0
  1925. } : {
  1926. done: !1,
  1927. value: t[r++]
  1928. }
  1929. },
  1930. e: function (t) {
  1931. throw t
  1932. },
  1933. f: i
  1934. }
  1935. }
  1936. throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")
  1937. }
  1938. var o, a = !0,
  1939. u = !1;
  1940. return {
  1941. s: function () {
  1942. n = n.call(t)
  1943. },
  1944. n: function () {
  1945. var t = n.next();
  1946. return a = t.done, t
  1947. },
  1948. e: function (t) {
  1949. u = !0, o = t
  1950. },
  1951. f: function () {
  1952. try {
  1953. a || null == n.return || n.return()
  1954. } finally {
  1955. if (u) throw o
  1956. }
  1957. }
  1958. }
  1959. }
  1960.  
  1961. function zt(t, e) {
  1962. (null == e || e > t.length) && (e = t.length);
  1963. for (var n = 0, r = new Array(e); n < e; n++) r[n] = t[n];
  1964. return r
  1965. }
  1966.  
  1967. function Yt(t) {
  1968. var e = function () {
  1969. if ("undefined" == typeof Reflect || !Reflect.construct) return !1;
  1970. if (Reflect.construct.sham) return !1;
  1971. if ("function" == typeof Proxy) return !0;
  1972. try {
  1973. return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], (function () {}))), !0
  1974. } catch (t) {
  1975. return !1
  1976. }
  1977. }();
  1978. return function () {
  1979. var n, r = c(t);
  1980. if (e) {
  1981. var i = c(this).constructor;
  1982. n = Reflect.construct(r, arguments, i)
  1983. } else n = r.apply(this, arguments);
  1984. return u(this, n)
  1985. }
  1986. }
  1987.  
  1988. function Kt(t) {
  1989. var e = function () {
  1990. if ("undefined" == typeof Reflect || !Reflect.construct) return !1;
  1991. if (Reflect.construct.sham) return !1;
  1992. if ("function" == typeof Proxy) return !0;
  1993. try {
  1994. return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], (function () {}))), !0
  1995. } catch (t) {
  1996. return !1
  1997. }
  1998. }();
  1999. return function () {
  2000. var n, r = c(t);
  2001. if (e) {
  2002. var i = c(this).constructor;
  2003. n = Reflect.construct(r, arguments, i)
  2004. } else n = r.apply(this, arguments);
  2005. return u(this, n)
  2006. }
  2007. }
  2008. var Jt = function (e) {
  2009. o(i, e);
  2010. var r = Kt(i);
  2011.  
  2012. function i(e) {
  2013. var n, o = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : "__CM";
  2014. return t(this, i), (n = r.call(this)).storage = e, n.prefix = o, n
  2015. }
  2016. return n(i, [{
  2017. key: "isCoreModule",
  2018. get: function () {
  2019. return !0
  2020. }
  2021. }, {
  2022. key: "openPage",
  2023. value: function (t) {
  2024. "function" == typeof j.openInTab ? j.openInTab(t, {
  2025. active: !0
  2026. }) : this.window.open(t)
  2027. }
  2028. }, {
  2029. key: "init",
  2030. value: function () {
  2031. var t = this;
  2032. B(c(i.prototype), "init", this).call(this), "function" == typeof j.registerMenuCommand
  2033. }
  2034. }, {
  2035. key: "getAllConfigs",
  2036. value: function () {
  2037. var t = this;
  2038. return this.getDeclaredConfigurations().map((function (e) {
  2039. var n = t.getValue(e.namespace, e.key);
  2040. return Object.assign({}, e, {
  2041. value: null != n ? n : e.default
  2042. })
  2043. }))
  2044. }
  2045. }, {
  2046. key: "getDeclaredConfigurations",
  2047. value: function () {
  2048. return g([this.host.declareConfigs().map((function (t) {
  2049. return Object.assign({}, t, {
  2050. namespace: "host"
  2051. })
  2052. }))].concat(Wt(this.host.getAllActivateModules().map((function (t) {
  2053. return t.declareConfigs().map((function (e) {
  2054. return Object.assign({}, e, {
  2055. namespace: t.moduleIdentityName,
  2056. modelName: t.moduleName
  2057. })
  2058. }))
  2059. })))))
  2060. }
  2061. }, {
  2062. key: "moduleIdentityName",
  2063. get: function () {
  2064. return "configs"
  2065. }
  2066. }, {
  2067. key: "saveAllConfigs",
  2068. value: function (t) {
  2069. var e = this;
  2070. t.forEach((function (t) {
  2071. var n;
  2072. e.setValue(t.namespace, t.key, null !== (n = t.value) && void 0 !== n ? n : t.default)
  2073. }))
  2074. }
  2075. }, {
  2076. key: "getValue",
  2077. value: function (t, e) {
  2078. if (this.available()) return this.storage.get([this.prefix, t, e].join("_"))
  2079. }
  2080. }, {
  2081. key: "setValue",
  2082. value: function (t, e, n) {
  2083. this.available() && this.storage.set([this.prefix, t, e].join("_"), n)
  2084. }
  2085. }, {
  2086. key: "available",
  2087. value: function () {
  2088. return !!this.storage && this.storage.available()
  2089. }
  2090. }, {
  2091. key: "resetAll",
  2092. value: function () {
  2093. var t = this;
  2094. this.storage.list().filter((function (e) {
  2095. return e.startsWith(t.prefix)
  2096. })).forEach((function (e) {
  2097. t.storage.remove(e)
  2098. }))
  2099. }
  2100. }]), i
  2101. }(N),
  2102. Qt = function () {
  2103. function e() {
  2104. t(this, e), l(this, "isAvailable", void 0)
  2105. }
  2106. return n(e, [{
  2107. key: "get",
  2108. value: function (t) {
  2109. return j.getValue(t)
  2110. }
  2111. }, {
  2112. key: "list",
  2113. value: function () {
  2114. return j.listValues()
  2115. }
  2116. }, {
  2117. key: "remove",
  2118. value: function (t) {
  2119. j.deleteValue(t)
  2120. }
  2121. }, {
  2122. key: "set",
  2123. value: function (t, e) {
  2124. j.setValue(t, e)
  2125. }
  2126. }, {
  2127. key: "available",
  2128. value: function () {
  2129. return null == this.isAvailable && (this.isAvailable = [a(j.setValue), a(j.getValue), a(j.listValues), a(j.deleteValue)].every((function (t) {
  2130. return "function" === t
  2131. }))), this.isAvailable
  2132. }
  2133. }]), e
  2134. }();
  2135.  
  2136. function Xt(t) {
  2137. var e = function () {
  2138. if ("undefined" == typeof Reflect || !Reflect.construct) return !1;
  2139. if (Reflect.construct.sham) return !1;
  2140. if ("function" == typeof Proxy) return !0;
  2141. try {
  2142. return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], (function () {}))), !0
  2143. } catch (t) {
  2144. return !1
  2145. }
  2146. }();
  2147. return function () {
  2148. var n, r = c(t);
  2149. if (e) {
  2150. var i = c(this).constructor;
  2151. n = Reflect.construct(r, arguments, i)
  2152. } else n = r.apply(this, arguments);
  2153. return u(this, n)
  2154. }
  2155. }
  2156. var Zt = function (e) {
  2157. o(a, e);
  2158. var i = Xt(a);
  2159.  
  2160. function a() {
  2161. var e;
  2162. t(this, a);
  2163. for (var n = arguments.length, o = new Array(n), u = 0; u < n; u++) o[u] = arguments[u];
  2164. return l(r(e = i.call.apply(i, [this].concat(o))), "nodeElement", void 0), l(r(e), "clickMapper", {
  2165. "_item-input": function (t) {
  2166. t.setSpeed()
  2167. }
  2168. }), l(r(e), "setTimeoutOrigin", setTimeout), e
  2169. }
  2170. return n(a, [{
  2171. key: "moduleIdentityName",
  2172. get: function () {
  2173. return "legacyUi"
  2174. }
  2175. }, {
  2176. key: "displayNum",
  2177. get: function () {
  2178. return (this.rate.toString().split(".")[1] || "").length > 2 ? this.rate.toFixed(2) : this.rate.toString()
  2179. }
  2180. }, {
  2181. key: "showSuspendedBall",
  2182. get: function () {
  2183. return this.getConfig("showSuspendedBall")
  2184. }
  2185. }, {
  2186. key: "deeplyColor",
  2187. get: function () {
  2188. return this.getConfig("deeplyColor")
  2189. }
  2190. }, {
  2191. key: "genElement",
  2192. value: function () {
  2193. var t = this.document.createElement("div");
  2194. t.innerHTML = (this.showSuspendedBall ? '<div class="_th-container" >\n <div class="_th-click-hover _item-input">\n x' + this.displayNum + '\n </div>\n' : "");
  2195. var e = this;
  2196. return Object.keys(this.clickMapper).forEach((function (n) {
  2197. var r = e.clickMapper[n],
  2198. i = t.getElementsByClassName(n)[0];
  2199. i && (i.onclick = function () {
  2200. r(e.host, e.rate)
  2201. })
  2202. })), t
  2203. }
  2204. }, {
  2205. key: "element",
  2206. value: function () {
  2207. return this.nodeElement || (this.nodeElement = this.genElement()), this.nodeElement
  2208. }
  2209. }, {
  2210. key: "style",
  2211. value: function () {
  2212. var t = this.position,
  2213. e = this.positionOffset,
  2214. n = "right" === t ? "left" : "right",
  2215. r = "left" === t;
  2216. return "._th-container ._th-item {margin-bottom: 3px;position: relative;width: 0;height: 0;cursor: pointer;opacity: .3;background-color: aquamarine;border-radius: 100%;text-align: center;line-height: 30px;-webkit-transition: all .35s;-o-transition: all .35s;transition: all .35s;".concat(n, ": 30px;}._th-container ._th-item, ._th-container ._th-click-hover, ._th_cover-all-show-times ._th_times {-webkit-box-shadow: ").concat(this.deeplyColor ? "4px 5px 10px 6px #b2b2b2" : "-3px 4px 12px -5px black", ";box-shadow: ").concat(this.deeplyColor ? "4px 5px 10px 6px #b2b2b2" : "-3px 4px 12px -5px black", ";}._th-click-hover {position: relative;-webkit-transition: all .5s;-o-transition: all .5s;transition: all .5s;height: 45px;width: 45px;cursor: pointer;opacity: .6;border-radius: 100%;background-color: aquamarine;text-align: center;line-height: 45px;").concat(n, ": 0}._th-container:hover {").concat(t, ": 0}._th-container {font-size: 12px;-webkit-transition: all .5s;-o-transition: all .5s;transition: all .5s;").concat(t, ": 0;top: ").concat(e, ";position: fixed;-webkit-box-sizing: border-box;box-sizing: border-box;z-index: 100000;-webkit-user-select: none;-moz-user-select: none;-ms-user-select: none;user-select: none;display: flex;width: 58px;-ms-flex-wrap: wrap;flex-wrap: wrap;-webkit-box-orient: horizontal;-webkit-box-direction: ").concat(r ? "normal" : "reverse", ";-ms-flex-direction: ").concat(r ? "row" : "row-reverse", ";flex-direction: ").concat(r ? "row" : "row-reverse", ";}._th-container ._th-item:hover {opacity: .8;background-color: #5fb492;color: aliceblue}._th-container ._th-item:active {opacity: .9;background-color: #1b3a26;color: aliceblue}._th-container:hover ._th-click-hover {opacity: .8}._th-container:hover ._th-item {opacity: .6;").concat(n, ": 0}._th-container ._th-click-hover:hover {opacity: .8;background-color: #5fb492;color: aliceblue}._th_cover-all-show-times {position: fixed;top: 0;").concat(n, ": 0;width: 100%;height: 100%;z-index: 99999;opacity: 1;font-weight: 900;font-size: 30px;color: #4f4f4f;background-color: rgba(0, 0, 0, 0.1)}._th_cover-all-show-times._th_hidden {z-index: -99999;opacity: 0;-webkit-transition: 1s all;-o-transition: 1s all;transition: 1s all}._th_cover-all-show-times ._th_times {width: 300px;height: 300px;border-radius: 50%;background-color: rgba(127, 255, 212, 0.51);text-align: center;line-height: 300px;position: absolute;top: 50%;").concat(n, ": 50%;margin-top: -150px;margin-").concat(n, ": -150px}")
  2217. }
  2218. }, {
  2219. key: "onUiRateChange",
  2220. value: function (t) {
  2221. if (B(c(a.prototype), "onUiRateChange", this).call(this, t), this.nodeElement) {
  2222. var e = this.nodeElement.querySelector("._th-click-hover") || {},
  2223. n = this.nodeElement.querySelector("._th_times") || {},
  2224. r = this.displayNum;
  2225. e.innerHTML = "x" + r, n.innerHTML = "x" + r;
  2226. var i = this.nodeElement.querySelector("._th_cover-all-show-times") || {};
  2227. i.className = "_th_cover-all-show-times", this.setTimeoutOrigin.bind(this.window)((function () {
  2228. i.className = "_th_cover-all-show-times _th_hidden"
  2229. }), 100)
  2230. }
  2231. }
  2232. }, {
  2233. key: "position",
  2234. get: function () {
  2235. return this.getConfig("position")
  2236. }
  2237. }, {
  2238. key: "positionOffset",
  2239. get: function () {
  2240. return this.getConfig("positionOffset")
  2241. }
  2242. }, {
  2243. key: "declareConfigs",
  2244. value: function () {
  2245. return [{
  2246. key: "position",
  2247. type: f.STRING,
  2248. default: "left"
  2249. }, {
  2250. key: "positionOffset",
  2251. type: f.STRING,
  2252. default: "0%"
  2253. }, {
  2254. key: "showSuspendedBall",
  2255. type: f.BOOLEAN,
  2256. default: true,
  2257. title: "Show Suspended Ball"
  2258. }, {
  2259. key: "deeplyColor",
  2260. type: f.BOOLEAN,
  2261. default: false,
  2262. title: "Deeply Color"
  2263. }]
  2264. }
  2265. }]), a
  2266. }(H),
  2267. te = new F;
  2268. return te.exportOuter(), te.registerModule(new Jt(new Qt)), te.registerModule(new Ht), te.registerModule(new It), te.registerModule(new Et), te.registerModule(new Nt, !0), te.registerModule(new Zt, !0), te.bootstrap(), te
  2269. }));

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址