-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathgleam_timer.js
17 lines (12 loc) · 45.5 KB
/
gleam_timer.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/*
Paste the total contents of this file (Ctrl + A and Ctrl + C) into your browser console (F12 or Ctrl + Shift + J)
when you are on an Gleam.io page.
This can be used to speed up the timer on Gleam.io tasks. You can instantly complete any task related to time without waiting.
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.
A pop-up message will appear. Here you can set how fast the time for the tasks should go.
The default setting is 1, which is the normal time. Recommended time multiplier: 1000 (1000 times faster)
This file has been minified to make it load faster, you can find the non-minified version here:
https://raw.githubusercontent.com/Saulios/gleam_timer/main/gleam_timer_beautified.js
Updated: November 14, 2021
*/
!function(t,e){"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()}(this,function(){"use strict";function t(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function e(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function n(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}function r(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function o(t,e){return(o=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function i(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}}),e&&o(t,e)}function a(t){return(a="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})(t)}function u(t,e){return!e||"object"!==a(e)&&"function"!=typeof e?r(t):e}function c(t){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function l(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function s(){return null==B&&(B="undefined"==typeof unsafeWindow?window:unsafeWindow),B}function f(){var t=s().parent!==s();try{t=t&&"FRAMESET"!==s().parent.document.body.tagName}catch(t){}return t}function h(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1/0,n=Array.prototype.flat||function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1/0;if(t<1)return this;var e=[],r=t-1;return this.forEach(function(t){t instanceof Array?e=e.concat(n.call(t,r)):e.push(t)}),e};return n.call(t,e)}function d(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function y(t,e){if(t){if("string"==typeof t)return d(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);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)?d(t,e):void 0}}function p(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=t&&("undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"]);if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(t,e)||y(t,e)||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 v(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return g(t,void 0);var n=Object.prototype.toString.call(t).slice(8,-1);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)?g(t,void 0):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},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 i,a=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function g(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function m(){return null==U&&(U="undefined"==typeof unsafeWindow?window:unsafeWindow),U}function b(){var t=m().parent!==m();try{t=t&&"FRAMESET"!==m().parent.document.body.tagName}catch(t){}return t}function w(t,e){return function(t,e){var n=function(t){var e,n=v(q);try{for(n.s();!(e=n.n()).done;){var r=p(e.value,2),o=r[0],i=r[1];if(t===o)return i}}catch(t){n.e(t)}finally{n.f()}return t}(arguments.length>2&&void 0!==arguments[2]&&!arguments[2]?t:F(t)),r=n[e];return"function"==typeof r?r.bind(t):n[e]}(e.conditions||[],"reduce")(function(e,n){return e||Object.entries(n).every(function(e){var n=p(e,2),r=n[0],o=n[1];return t[r]===o})},!1)}function k(t,e,n){return(k="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=c(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(n):o.value}})(t,e,n||t)}function O(t,e){return t(e={exports:{}},e.exports),e.exports}function x(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function R(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"initAssign",r=Object.getPrototypeOf(e);return Object.setPrototypeOf(t,r),"function"==typeof r[n]&&r[n].call(t,e),t}function M(t){return Number(Math.random().toString().substr(3,t)+Date.now()).toString(36)}function A(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}();return function(){var n,r=it(t);if(e){var o=it(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return ot(this,n)}}function I(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=t[e];if("function"==typeof o){var i=Object.assign({},vt,r),a=i.native,u=n(a?o:function(t,e){var n=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t||function(){}).apply(this,n)};return function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"initAssign",r=e.prototype;Object.setPrototypeOf(t,r),"function"==typeof r[n]&&r[n].call(t)}(n,(e=Object.assign({},pt,e)).instanceType),n}(o));t[e]=a?u:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];try{return u.apply(this,e)}catch(t){return console.warn("[Hook JS]","Hooks running lost once."),o.apply(this,e)}};var c=i.protect,l=i.syncDesc;c&&function(t,e){gt.call(Object,t,e,{writable:!1})}(t,e),l&&function(t,e){mt.call(Object,e,{toString:{enumerable:!1,writable:!0,value:function(){return t.toString()}},toLocaleString:{enumerable:!1,writable:!0,value:function(){return t.toLocaleString()}}})}(o,t[e])}}function S(t,e,n,r){return I(t,e,function(t){return t[n](r)},arguments.length>4&&void 0!==arguments[4]?arguments[4]:{})}function _(t,e,n){return S(t,e,"before",n,arguments.length>3&&void 0!==arguments[3]?arguments[3]:{})}function E(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return I(t,e,n,Object.assign({},r,{native:!0}))}function C(t){var e=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(t){return!1}}();return function(){var n,r=c(t);if(e){var o=c(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return u(this,n)}}function j(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function T(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return D(t,void 0);var n=Object.prototype.toString.call(t).slice(8,-1);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)?D(t,void 0):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},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 i,a=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function D(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function P(t){var e,n={},r=T(Object.entries(t).filter(function(t){var e=p(t,1)[0];return!["target","key"].includes(e)}));try{for(r.s();!(e=r.n()).done;){var o=p(e.value,2),i=o[0],a=o[1];n[i]=a}}catch(t){r.e(t)}finally{r.f()}return n}function N(t){return function(t){if(Array.isArray(t))return d(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||y(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.")}()}var B,L,U,W=1e3;!function(t){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"}(L||(L={}));var V="__hooks_load_module",H=Object.getOwnPropertyNames.bind(Object),F=Object.getPrototypeOf.bind(Object),q=[[Array.prototype],[Object,!1]].map(function(t){var e=p(t,1)[0];return[e,function(t){var e,n={},r=v(H(t));try{for(r.s();!(e=r.n()).done;){var o=e.value;n[o]=t[o]}}catch(t){r.e(t)}finally{r.f()}return n}(e)]}),G=window,z=new Proxy({},{get:function(t,e){var n=["GM",e].join("_");return G[n]?G[n]:G.GM&&G.GM[e]?G.GM[e]:void 0}}),$=function(){if(!b()){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r;e.unshift("[TimerHook]"),"function"==typeof z.log?z.log(e.join(" ")):(r=console).log.apply(r,e)}},K=function(){if(!b()){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];n.unshift("[TimerHook]"),(t=console).warn.apply(t,n)}},Y=function(){function e(){t(this,e),l(this,"host",void 0),l(this,"isActive",!1),l(this,"isMountHost",!1)}return n(e,[{key:"mountHost",value:function(t){this.host=t,this.isMountHost=!0,this.onMounted()}},{key:"activate",value:function(){this.isActive=!0,this.init()}},{key:"deactivate",value:function(){this.isActive=!1,this.onDestroy()}},{key:"moduleName",get:function(){}},{key:"priority",get:function(){return 50}},{key:"autoActivate",get:function(){return!0}},{key:"isCoreModule",get:function(){return!1}},{key:"isOnlyOuterIframe",get:function(){return!1}},{key:"getDependencyModule",value:function(t){if(null!=this.host){var e=this.host.getModule(t);return e&&e.moduleIdentityName?e:void 0}}},{key:"init",value:function(){}},{key:"onMounted",value:function(){}},{key:"onDestroy",value:function(){}},{key:"declareConfigs",value:function(){return[]}},{key:"setConfig",value:function(t,e){var n=this.getDependencyModule("configs");n&&n.available()||K("Config module not found, can't set configs values."),n.setValue(this.moduleIdentityName,t,e)}},{key:"getConfig",value:function(t){var e,n=this.getDependencyModule("configs"),r=(this.declareConfigs().find(function(e){return e.key===t})||{}).default;return n&&n.available()&&null!==(e=n.getValue(this.moduleIdentityName,t))&&void 0!==e?e:r}},{key:"window",get:function(){return this.host?this.host.getWindow():m()}},{key:"document",get:function(){return this.window.document}}]),e}(),J=function(e){function o(){var e;t(this,o);for(var n=arguments.length,i=new Array(n),u=0;u<n;u++)i[u]=arguments[u];return l(r(e=a.call.apply(a,[this].concat(i))),"rate",1),l(r(e),"host",void 0),e}i(o,Y);var a=function(t){var e=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(t){return!1}}();return function(){var n,r=c(t);if(e){var o=c(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return u(this,n)}}(o);return n(o,[{key:"onRateChange",value:function(t){this.rate=t}},{key:"mountHost",value:function(t){k(c(o.prototype),"mountHost",this).call(this,t),this.rate=t.rate}}]),o}(),Q=function(e){function o(){var e;t(this,o);for(var n=arguments.length,i=new Array(n),u=0;u<n;u++)i[u]=arguments[u];return l(r(e=a.call.apply(a,[this].concat(i))),"isDOMLoaded",!1),l(r(e),"waitDomLoadedCallback",void 0),e}i(o,J);var a=function(t){var e=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(t){return!1}}();return function(){var n,r=c(t);if(e){var o=c(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return u(this,n)}}(o);return n(o,[{key:"onMounted",value:function(){var t=this;k(c(o.prototype),"onMounted",this).call(this),this.document.addEventListener("readystatechange",function(){"interactive"!==t.document.readyState&&"complete"!==t.document.readyState||(t.isDOMLoaded=!0,"function"==typeof t.waitDomLoadedCallback&&t.waitDomLoadedCallback(void 0))})}},{key:"waitDomLoaded",value:function(){var t,e,n,r=this;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){r.waitDomLoadedCallback=t})}},{key:"applyStyle",value:function(t){var e=this.style(),n=this.document.createElement("style");if(n.setAttribute("type","text/css"),n.styleSheet)n.styleSheet.cssText=e;else{var r=this.document.createTextNode(e);n.appendChild(r)}t.appendChild(n)}},{key:"applyElement",value:function(){var t=this.element();return this.document.body.appendChild(t),t}},{key:"onUiRateChange",value:function(t){}},{key:"onRateChange",value:function(t){var e=this.rate!==t;k(c(o.prototype),"onRateChange",this).call(this,t),e&&this.onUiRateChange(t)}},{key:"init",value:function(){var t=this;$("Started to loading '".concat(this.moduleIdentityName,"' component...")),this.waitDomLoaded().then(function(){t.applyStyle(t.applyElement()),$("UI component '".concat(t.moduleIdentityName,"' loaded."))})}}]),o}(),X="hook_timer__change_rate",Z=function(e){function o(){var e;t(this,o);for(var n=arguments.length,i=new Array(n),u=0;u<n;u++)i[u]=arguments[u];return l(r(e=a.call.apply(a,[this].concat(i))),"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}i(o,e);var a=function(t){var e=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(t){return!1}}();return function(){var n,r=c(t);if(e){var o=c(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return u(this,n)}}(o);return n(o,[{key:"setSpeed",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(0===t&&(t=this.defaultRate),t&&(t!==this.rate||e)&&t>0&&(this.rate=t,this.onRateChanged(t)),null==t){var n=prompt("Enter the time multiplier you wish to change to (Current: "+this.rate+")");n&&this.setSpeed(parseFloat(n))}}},{key:"onRateChanged",value:function(t){$("Timer speed rate changed to:",t),this.sentChangesToIframe(),this.getAllActivateModules().filter(function(t){return t.onRateChange}).forEach(function(e){e.onRateChange(t)})}},{key:"beginInTimeCheck",value:function(){var t=this;this.keptInTime&&(this.inTimeCheckId=this.setIntervalOrigin.call(this.getWindow(),function(){t.rate&&1!==t.rate&&t.setSpeed(t.rate,!0)},this.keptInterval))}},{key:"catchOriginMethod",value:function(){this.setIntervalOrigin=this.getWindow().setInterval,this.clearIntervalOrigin=this.getWindow().clearInterval}},{key:"keptInTime",get:function(){return this.getConfig("keptInTime")}},{key:"keptInterval",get:function(){return this.getConfig("keptInterval")}},{key:"defaultRate",get:function(){return this.getConfig("defaultRate")}},{key:"bootstrap",value:function(){"preparing"===this.state&&(this.catchOriginMethod(),this.listenParentEvent(),this.launchModules(this.getAllModules()),this.setSpeed(this.defaultRate),this.beginInTimeCheck(),this.waitForModulesLoad(),this.state="started")}},{key:"launchModules",value:function(t){var e=this;t.filter(function(t){return t.autoActivate}).forEach(function(t){var n=t.moduleIdentityName;e.deactivateModules.includes(n)&&!t.isCoreModule||e.activateModule(n)})}},{key:"registerModules",value:function(t){var e=this;return t.filter(function(t){var n=t.moduleIdentityName;return n&&e.registerModule(t,t.isOnlyOuterIframe),n})}},{key:"waitForModulesLoad",value:function(){var t=this,e=this.getWindow().___hooks_preModules||[];e.length>0&&this.launchModules(this.registerModules(e)),this.getWindow()[V]=1,this.getWindow().addEventListener(V,function(e){e.detail&&e.detail.moduleIdentityName&&t.launchModules(t.registerModules([e.detail]))})}},{key:"exportOuter",value:function(){var t=this;this.getWindow()._OxA?(this.getWindow().$hookTimer=this,this.getWindow()._OxA=this):Object.defineProperty(this.getWindow(),"_OxA",{get:function(){return 1},set:function(e){"_OxA"===e&&(t.getWindow().$hookTimer=t)}})}},{key:"listenParentEvent",value:function(){var t=this;f()&&this.getWindow().addEventListener("message",function(e){var n=e.data;(n.type||"")===X&&t.setSpeed(n.rate||0)})}},{key:"deactivateModules",get:function(){return this.getConfig("deactivateModules")}},{key:"sentChangesToIframe",value:function(){var t=this.getWindow().document,e=t.querySelectorAll("iframe")||[],n=t.querySelectorAll("frame");if(e.length)for(var r=0;r<e.length;r++)e[r].contentWindow.postMessage({type:X,rate:this.rate},"*");if(n.length)for(var o=0;o<n.length;o++)n[o].contentWindow.postMessage({type:X,rate:this.rate},"*")}},{key:"declareConfigs",value:function(){return[{key:"multiplyRate",type:L.NUMBER,default:2},{key:"divideRate",type:L.NUMBER,default:2},{key:"decrementRate",type:L.NUMBER,default:2},{key:"incrementRate",type:L.NUMBER,default:2},{key:"defaultRate",type:L.NUMBER,default:1},{key:"keptInTime",type:L.BOOLEAN,default:!0},{key:"keptInterval",type:L.NUMBER,default:4e3},{key:"deactivateModules",type:L.ARRAY,values:this.getAllModules().map(function(t){return{key:t.moduleIdentityName}}),default:[]}]}},{key:"setConfig",value:function(t,e){var n=this.getModule("configs");n&&n.available()||K("Config module not found, can't set configs values."),n.setValue("host",t,e)}},{key:"getConfig",value:function(t){var e,n=this.getModule("configs"),r=(this.declareConfigs().find(function(e){return e.key===t})||{}).default;return n&&n.available()&&null!==(e=n.getValue("host",t))&&void 0!==e?e:r}}]),o}(function(){function e(){t(this,e),l(this,"modules",{})}return n(e,[{key:"activateModule",value:function(t){var e=this.getModule(t);e?(e.activate(),$("Module - '".concat(t,"' activated"))):K("Activate module failed, ".concat(t," is not found"))}},{key:"deactivateModule",value:function(t){var e=this.getModule(t);e||K("Deactivate module failed, '".concat(t,"' is not found")),e.deactivate()}},{key:"getModule",value:function(t){return this.modules[t]}},{key:"registerModule",value:function(t){arguments.length>1&&void 0!==arguments[1]&&arguments[1]&&f()||(this.modules[t.moduleIdentityName]=t,t.mountHost(this))}},{key:"getAllActivateModules",value:function(){return Object.values(this.modules).filter(function(t){return t.isActive})}},{key:"getAllModules",value:function(){return Object.values(this.modules)}},{key:"getWindow",value:function(){return s()}}]),e}()),tt=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},et=O(function(t){function e(n,r){return t.exports=e=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},e(n,r)}t.exports=e}),nt=function(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}}),e&&et(t,e)},rt=O(function(t){function e(n){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?t.exports=e=function(t){return typeof t}:t.exports=e=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e(n)}t.exports=e}),ot=function(t,e){return!e||"object"!==rt(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e},it=O(function(t){function e(n){return t.exports=e=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},e(n)}t.exports=e}),at=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},ut=function(t){return function(t){if(Array.isArray(t))return at(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return at(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);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)?at(t,e):void 0}}(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.")}()},ct=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=it(t)););return t},lt=O(function(t){function e(n,r,o){return"undefined"!=typeof Reflect&&Reflect.get?t.exports=e=Reflect.get:t.exports=e=function(t,e,n){var r=ct(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(n):o.value}},e(n,r,o||n)}t.exports=e}),st=function(t){return-1!==Function.toString.call(t).indexOf("[native code]")},ft=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}},ht=O(function(t){function e(n,r,o){return ft()?t.exports=e=Reflect.construct:t.exports=e=function(t,e,n){var r=[null];r.push.apply(r,e);var o=new(Function.bind.apply(t,r));return n&&et(o,n.prototype),o},e.apply(null,arguments)}t.exports=e}),dt=O(function(t){function e(n){var r="function"==typeof Map?new Map:void 0;return t.exports=e=function(t){function e(){return ht(t,arguments,it(this).constructor)}if(null===t||!st(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,e)}return e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),et(e,t)},e(n)}t.exports=e});!function(t){function e(n){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?t.exports=e=function(t){return typeof t}:t.exports=e=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e(n)}t.exports=e}({exports:{}});var yt,pt={instanceType:function(t){function e(){return tt(this,e),n.apply(this,arguments)}nt(e,t);var n=A(e);return function(t,e,n){e&&x(t.prototype,e),n&&x(t,n)}(e,[{key:"initAssign",value:function(t){this.id=M(7),function(t,e,n,r){e&&void 0!==e[n]?t[n]=e[n]:t[n]=r()}(this,t,"uniqueId",function(){return M(7)})}},{key:"bind",value:function(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return R((n=lt(it(e.prototype),"bind",this)).call.apply(n,[this,t].concat(ut(r))),this)}},{key:"before",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.surround({before:t,adaptAsync:e})}},{key:"after",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.surround({after:t,adaptAsync:e})}},{key:"surround",value:function(t){var e=t.before,n=void 0===e?void 0:e,r=t.after,o=void 0===r?void 0:r,i=t.onError,a=void 0===i?void 0:i,u=t.adaptAsync,c=void 0!==u&&u,l=this;return"function"!=typeof l?l:R(function(){for(var t=this,e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];var u={origin:l,args:r,trans:{}},s="function"==typeof a;try{var f,h,d=!1;return"function"==typeof n&&(f=n.call(this,Object.assign({},u,{preventDefault:function(){d=!0}})),d)?f:(h=f instanceof Promise&&c?f.then(function(){return l.apply(t,r)}):l.apply(this,r),"function"==typeof o&&(h=h instanceof Promise&&c?h.then(function(e){return o.call(t,Object.assign({},u,{lastValue:e}))}):o.call(this,Object.assign({},u,{lastValue:h}))),h instanceof Promise&&c&&s?h.catch(function(e){var n=!1,r="";return Promise.resolve(a.call(t,Object.assign({},u,{error:e,resolve:function(t){r=t,n=!0}}))).then(function(t){if(!n)throw e;return r||t})}):h)}catch(t){if(!s)throw t;var y=!1,p="",v=function(t){p=t,y=!0},g=a.call(this,Object.assign({},u,{error:t,resolve:v}));if(!y)throw t;return p||g}},this)}},{key:"then",value:function(t){var e=this;return R(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];var i=e.apply(this,r);return Promise.resolve(i).then(t)},this)}},{key:"catch",value:function(t){var e=this;return R(function(){var n;try{for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];if((n=e.apply(this,o))instanceof Promise)return n.catch(t)}catch(e){n=t.call(this,e)}return n},this)}},{key:"finally",value:function(t){var e=this;return R(function(){var n=function(){try{t.call(this)}catch(t){}};try{for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];var a=e.apply(this,o);return a instanceof Promise?"function"==typeof a.finally?a.finally(function(){return n()}):a.catch(function(t){return t}).then(function(t){if(n(),t instanceof Error)throw t}):(n(),a)}catch(t){throw n(),t}},this)}},{key:"register",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.registerClass(function(e){var n=function(t){function n(){return tt(this,n),r.apply(this,arguments)}nt(n,e);var r=A(n);return n}();return Object.assign(n.prototype,t),n})}},{key:"registerClass",value:function(t){var e=t(this.constructor),n=this.bind(this);if(Object.setPrototypeOf(n,e.prototype),"function"!=typeof e||!(n instanceof this.constructor))throw new Error("Registered class must extend FunctionInstance");return n}}]),e}(dt(Function))},vt={protect:!1,syncDesc:!0,native:!1},gt=Object.defineProperty,mt=Object.defineProperties;!function(t){t.TIMEOUT="timeout",t.INTERVAL="interval"}(yt||(yt={}));var bt,wt=function(e){function o(){var e;t(this,o);for(var n=arguments.length,i=new Array(n),u=0;u<n;u++)i[u]=arguments[u];return l(r(e=a.call.apply(a,[this].concat(i))),"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}i(o,J);var a=function(t){var e=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(t){return!1}}();return function(){var n,r=c(t);if(e){var o=c(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return u(this,n)}}(o);return n(o,[{key:"onMounted",value:function(){k(c(o.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}},{key:"init",value:function(){var t=this;this.percentage=1/this.rate,E(this.window,"setInterval",function(e){return t.getHookedTimerFunction(yt.INTERVAL,e)}),E(this.window,"setTimeout",function(e){return t.getHookedTimerFunction(yt.TIMEOUT,e)}),_(this.window,"clearInterval",function(e){var n=e.args;t.redirectNewestId(n)}),_(this.window,"clearTimeout",function(e){var n=e.args;t.redirectNewestId(n)})}},{key:"onRateChange",value:function(t){var e=this;k(c(o.prototype),"onRateChange",this).call(this,t),this.percentage=1/t,Object.values(this.interval).forEach(function(t){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)}),Object.values(this.timeout).forEach(function(t){var n=Date.now(),r=t.exceptNextFireTime,o=t.oldPercentage,i=r-n;i<0&&(i=0);var a=Math.floor(e.percentage/o*i);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)})}},{key:"notifyExec",value:function(t){var e=this;t&&Object.values(this.timeout).filter(function(e){return e.uniqueId===t}).forEach(function(t){e.clearTimeoutOrigin.call(e.window,t.nowId),delete e.timeout[t.originId]})}},{key:"redirectNewestId",value:function(t){var e=t[0];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])}},{key:"getHookedTimerFunction",value:function(t,e){var n=t,r=this;return function(){for(var t=arguments.length,o=new Array(t),i=0;i<t;i++)o[i]=arguments[i];var a=W++,u=o[0];"string"==typeof u&&(r.window.__timer={notifyExec:r.notifyExec.bind(r)},u+=";__timer.notifyExec("+a+")",o[0]=u),"function"==typeof u&&(o[0]=function(){var t=u.apply(this,arguments);return r.notifyExec(a),t});var c=o[1];o[1]*=r.percentage;var l=e.apply(r.window,o);return r[n][l]={args:o,originMS:c,originId:l,nowId:l,uniqueId:a,oldPercentage:r.percentage,exceptNextFireTime:Date.now()+c},l}}},{key:"moduleIdentityName",get:function(){return"timer"}}]),o}(),kt=function(e){function o(){var e;t(this,o);for(var n=arguments.length,i=new Array(n),u=0;u<n;u++)i[u]=arguments[u];return l(r(e=a.call.apply(a,[this].concat(i))),"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}i(o,J);var a=C(o);return n(o,[{key:"onMounted",value:function(){k(c(o.prototype),"onMounted",this).call(this),this.lastDatetime=Date.now(),this.lastMDatetime=Date.now(),this.DateOrigin=this.window.Date,this.DateModified=this.window.Date}},{key:"init",value:function(){this.hookedDate()}},{key:"onRateChange",value:function(t){this.DateModified&&(this.lastMDatetime=this.DateModified.now(),this.lastDatetime=this.DateOrigin.now()),k(c(o.prototype),"onRateChange",this).call(this,t)}},{key:"hookedDate",value:function(){var e=this,n=this;E(this.window,"Date",function(e){var r=function(r){function o(){t(this,o);for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];if(0===r.length){var u=(n.DateOrigin.now()-n.lastDatetime)*n.rate;r.push(n.lastMDatetime+u)}return a.call.apply(a,[this].concat(r))}i(o,e);var a=C(o);return o}();return r=r.bind(new r)}),this.DateModified=this.window.Date,E(this.DateModified,"now",function(){return function(){return(new e.DateModified).getTime()}})}},{key:"moduleIdentityName",get:function(){return"dateTimer"}}]),o}();!function(t){t.CTRL="ctrl",t.META="meta",t.CMD="meta",t.SHIFT="shift",t.ALT="alt"}(bt||(bt={}));var Ot=function(e){function r(){return t(this,r),o.apply(this,arguments)}i(r,J);var o=function(t){var e=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(t){return!1}}();return function(){var n,r=c(t);if(e){var o=c(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return u(this,n)}}(r);return n(r,[{key:"init",value:function(){var t=this,e=this.shortcutList;this.window.addEventListener("keydown",function(n){var r,o=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return j(t,void 0);var n=Object.prototype.toString.call(t).slice(8,-1);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)?j(t,void 0):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},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 i,a=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}(e);try{for(o.s();!(r=o.n()).done;){var i=r.value;w(n,i)&&(n.preventDefault(),n.stopPropagation(),i.operator(t.host))}}catch(t){o.e(t)}finally{o.f()}})}},{key:"shortcutList",get:function(){var t=this;return[["shortcutExpressions.+",function(t){return t.speedUp()}],["shortcutExpressions.-",function(t){return t.speedDown()}],["shortcutExpressions.*",function(t){return t.speedMultiply()}],["shortcutExpressions./",function(t){return t.speedDivide()}],["shortcutExpressions.reset",function(t){return t.setSpeed(1)}],["shortcutExpressions.custom",function(t){return t.setSpeed()}]].map(function(e){var n=p(e,2),r=n[0],o=n[1];return{expressions:t.getConfig(r),operator:o}}).map(function(t){return e=t,"string"==typeof(n=Object.assign({},e,{conditions:[]})).expressions&&(n.expressions=n.expressions.split(";")),n.expressions&&n.expressions instanceof Array&&(n.conditions=n.expressions.map(function(t){return function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"+",n=t.split(e).map(function(t){return t.trim()}).filter(function(t){return t}),r={code:n.pop()||"UNKNOWN_KEY"};return n.forEach(function(t){r[t+"Key"]=!0}),r}(t)})),n;var e,n})}},{key:"moduleIdentityName",get:function(){return"shortcutKey"}},{key:"declareConfigs",value:function(){return[{type:L.ARRAY,itemType:L.SHORTCUT,key:"shortcutExpressions.custom",default:["ctrl + Digit1"]}]}}]),r}(),xt=function(e){function o(){var e;t(this,o);for(var n=arguments.length,i=new Array(n),u=0;u<n;u++)i[u]=arguments[u];return l(r(e=a.call.apply(a,[this].concat(i))),"defines",[]),l(r(e),"definePropertiesOrigin",void 0),l(r(e),"definePropertyOrigin",void 0),e}i(o,Y);var a=function(t){var e=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(t){return!1}}();return function(){var n,r=c(t);if(e){var o=c(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return u(this,n)}}(o);return n(o,[{key:"onMounted",value:function(){k(c(o.prototype),"onMounted",this).call(this),this.definePropertiesOrigin=this.window.Object.defineProperties,this.definePropertyOrigin=this.window.Object.defineProperty}},{key:"isCoreModule",get:function(){return!0}},{key:"init",value:function(){var t=this;_(this.window.Object,"defineProperties",function(e){var n,r=e.args,o=p(r,2),i=o[0],a=o[1],u=Object.entries(a).map(function(e){var n=p(e,2),o=n[0],a=n[1],u=Object.assign({target:i,key:o},a);return t.hookDefine(u)?(r[0]=u.target,[u.key,P(u)]):[!1]}).filter(function(t){return p(t,1)[0]});r[1]=(n={},u.forEach(function(t){n[null==t[0]?"":t[0]]=t[1]}),n)}),_(this.window.Object,"defineProperty",function(e){var n=e.args,r=e.preventDefault,o=p(n,3),i=o[0],a=o[1],u=o[2],c=Object.assign({target:i,key:a},u);t.hookDefine(c)?(n[0]=c.target,n[1]=c.key,n[2]=P(c)):r()})}},{key:"hookDefine",value:function(t){var e,n=T(this.defines);try{for(n.s();!(e=n.n()).done;)if((0,e.value)(t))return!1}catch(t){n.e(t)}finally{n.f()}return!0}},{key:"applyDefineRole",value:function(t){this.defines.push(t)}},{key:"moduleIdentityName",get:function(){return"definition"}}]),o}(),Rt=(function(e){function o(){var e;t(this,o);for(var n=arguments.length,i=new Array(n),u=0;u<n;u++)i[u]=arguments[u];return l(r(e=a.call.apply(a,[this].concat(i))),"extraElements",[]),e}i(o,Y);var a=function(t){var e=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(t){return!1}}();return function(){var n,r=c(t);if(e){var o=c(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return u(this,n)}}(o);n(o,[{key:"init",value:function(){var t=this;!function(t,e,n){S(t,e,"after",n,arguments.length>3&&void 0!==arguments[3]?arguments[3]:{})}(this.window.Element.prototype,"attachShadow",function(e){var n=e.lastValue;return t.extraElements.push(n),n})}},{key:"querySelectorAll",value:function(t){return h(this.extraElements.map(function(e){return N(e.querySelectorAll(t))}))}},{key:"moduleIdentityName",get:function(){return"shadowDOM"}},{key:"isCoreModule",get:function(){return!0}}])}(),function(e){function r(e){var n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"__CM";return t(this,r),(n=o.call(this)).storage=e,n.prefix=i,n}i(r,Y);var o=function(t){var e=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(t){return!1}}();return function(){var n,r=c(t);if(e){var o=c(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return u(this,n)}}(r);return n(r,[{key:"isCoreModule",get:function(){return!0}},{key:"openPage",value:function(t){"function"==typeof z.openInTab?z.openInTab(t,{active:!0}):this.window.open(t)}},{key:"init",value:function(){k(c(r.prototype),"init",this).call(this),z.registerMenuCommand}},{key:"getAllConfigs",value:function(){var t=this;return this.getDeclaredConfigurations().map(function(e){var n=t.getValue(e.namespace,e.key);return Object.assign({},e,{value:null!=n?n:e.default})})}},{key:"getDeclaredConfigurations",value:function(){return h([this.host.declareConfigs().map(function(t){return Object.assign({},t,{namespace:"host"})})].concat(N(this.host.getAllActivateModules().map(function(t){return t.declareConfigs().map(function(e){return Object.assign({},e,{namespace:t.moduleIdentityName,modelName:t.moduleName})})}))))}},{key:"moduleIdentityName",get:function(){return"configs"}},{key:"saveAllConfigs",value:function(t){var e=this;t.forEach(function(t){var n;e.setValue(t.namespace,t.key,null!==(n=t.value)&&void 0!==n?n:t.default)})}},{key:"getValue",value:function(t,e){if(this.available())return this.storage.get([this.prefix,t,e].join("_"))}},{key:"setValue",value:function(t,e,n){this.available()&&this.storage.set([this.prefix,t,e].join("_"),n)}},{key:"available",value:function(){return!!this.storage&&this.storage.available()}},{key:"resetAll",value:function(){var t=this;this.storage.list().filter(function(e){return e.startsWith(t.prefix)}).forEach(function(e){t.storage.remove(e)})}}]),r}()),Mt=function(){function e(){t(this,e),l(this,"isAvailable",void 0)}return n(e,[{key:"get",value:function(t){return z.getValue(t)}},{key:"list",value:function(){return z.listValues()}},{key:"remove",value:function(t){z.deleteValue(t)}},{key:"set",value:function(t,e){z.setValue(t,e)}},{key:"available",value:function(){return null==this.isAvailable&&(this.isAvailable=[a(z.setValue),a(z.getValue),a(z.listValues),a(z.deleteValue)].every(function(t){return"function"===t})),this.isAvailable}}]),e}(),At=function(e){function o(){var e;t(this,o);for(var n=arguments.length,i=new Array(n),u=0;u<n;u++)i[u]=arguments[u];return l(r(e=a.call.apply(a,[this].concat(i))),"nodeElement",void 0),l(r(e),"clickMapper",{"_item-input":function(t){t.setSpeed()}}),l(r(e),"setTimeoutOrigin",setTimeout),e}i(o,Q);var a=function(t){var e=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(t){return!1}}();return function(){var n,r=c(t);if(e){var o=c(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return u(this,n)}}(o);return n(o,[{key:"moduleIdentityName",get:function(){return"legacyUi"}},{key:"displayNum",get:function(){return(this.rate.toString().split(".")[1]||"").length>2?this.rate.toFixed(2):this.rate.toString()}},{key:"showSuspendedBall",get:function(){return this.getConfig("showSuspendedBall")}},{key:"deeplyColor",get:function(){return this.getConfig("deeplyColor")}},{key:"genElement",value:function(){var t=this.document.createElement("div");t.innerHTML=this.showSuspendedBall?'<div class="_th-container" >\n <div class="_th-click-hover _item-input">\n x'+this.displayNum+"\n </div>\n":"";var e=this;return Object.keys(this.clickMapper).forEach(function(n){var r=e.clickMapper[n],o=t.getElementsByClassName(n)[0];o&&(o.onclick=function(){r(e.host,e.rate)})}),t}},{key:"element",value:function(){return this.nodeElement||(this.nodeElement=this.genElement()),this.nodeElement}},{key:"style",value:function(){var t=this.position,e=this.positionOffset,n="right"===t?"left":"right",r="left"===t;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}")}},{key:"onUiRateChange",value:function(t){if(k(c(o.prototype),"onUiRateChange",this).call(this,t),this.nodeElement){var e=this.nodeElement.querySelector("._th-click-hover")||{},n=this.nodeElement.querySelector("._th_times")||{},r=this.displayNum;e.innerHTML="x"+r,n.innerHTML="x"+r;var i=this.nodeElement.querySelector("._th_cover-all-show-times")||{};i.className="_th_cover-all-show-times",this.setTimeoutOrigin.bind(this.window)(function(){i.className="_th_cover-all-show-times _th_hidden"},100)}}},{key:"position",get:function(){return this.getConfig("position")}},{key:"positionOffset",get:function(){return this.getConfig("positionOffset")}},{key:"declareConfigs",value:function(){return[{key:"position",type:L.STRING,default:"left"},{key:"positionOffset",type:L.STRING,default:"0%"},{key:"showSuspendedBall",type:L.BOOLEAN,default:!0,title:"Show Suspended Ball"},{key:"deeplyColor",type:L.BOOLEAN,default:!1,title:"Deeply Color"}]}}]),o}(),It=new Z;return It.exportOuter(),It.registerModule(new Rt(new Mt)),It.registerModule(new xt),It.registerModule(new wt),It.registerModule(new kt),It.registerModule(new Ot,!0),It.registerModule(new At,!0),It.bootstrap(),It});