(function(){"use strict";var __webpack_modules__={665:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){var _layout_htmlLayout__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(883),Menu=function(){function Menu(t){var e=t.id,n=t.config,i=t.toggleKey,o=t.appendNode;this.id=e,this.config=n,this.toggleKey=i,this.appendNode=o,this.appendNode||console.warn(this.config.warns.appendNode.replace(/\[m_id\]/g,this.id)),this.holder=document.createElement("div"),this.showDisplay=this.config.showDisplay,this.columns=new Map,this.isMenu=!0,this.modelsActionEvents=new Map,this.append(),this.hide(),console.log("Menu created.")}return Object.defineProperty(Menu.prototype,"isVisible",{get:function(){return this.holder.style.display===this.showDisplay},enumerable:!1,configurable:!0}),Object.defineProperty(Menu.prototype,"visibleStatus",{get:function(){return this.isVisible?"show":"hide"},enumerable:!1,configurable:!0}),Object.defineProperty(Menu.prototype,"wrapper",{get:function(){return this.holder.querySelector(".menu-wrapper")},enumerable:!1,configurable:!0}),Menu.prototype.getModel=function(t){var e=null;return this.columns.forEach((function(n){n.container.models.forEach((function(n){n.options.size&&n.options.get(t)&&(e=n.options.get(t))})),n.container.models.get(t)&&(e=n.container.models.get(t))})),e},Menu.prototype.getModelActive=function(t){var e;return null===(e=this.getModel(t))||void 0===e?void 0:e.isActive},Menu.prototype.getModelValue=function(t){var e;return null===(e=this.getModel(t))||void 0===e?void 0:e.value},Menu.prototype.setModelActive=function(t,e){var n=this.getModel(t);void 0!==(null==n?void 0:n.isActive)&&n.setActive(e)},Menu.prototype.setModelValue=function(t,e){var n=this.getModel(t);void 0!==(null==n?void 0:n.value)&&n.setValue(e)},Menu.prototype.onModelsAction=function(t){this.modelsActionEvents.set(this.modelsActionEvents.size+1,t)},Menu.prototype.add=function(){for(var t=this,e=[],n=0;n";\n transform: rotate(0deg) scaleY(1.35);\n cursor: pointer;\n}\n\n.ui-model.has-options.show-options::before {\n transform: rotate(90deg) scaleY(1.35);\n}\n\n.ui-model.disabled {\n cursor: default;\n filter: invert(.15);\n}\n\n.ui-model.active, \n.ui-model.active > .ui-model-text,\n.ui-model.active > .ui-option-text,\n.ui-model.active > .ui-model.has-options::before {\n filter: invert(0);\n}\n\n.ui-model.inactive {\n filter: invert(.075);\n}\n\n.ui-model.inactive > .ui-model-text,\n.ui-model.inactive > .ui-option-text,\n.ui-model.inactive.has-options::before {\n filter: invert(.3);\n}\n\n.column-container {\n border: 1.5px solid;\n border-top: none;\n box-sizing: border-box;\n padding: 2.5px;\n gap: 2.5px;\n overflow-y: auto;\n}\n\n.column-container::-webkit-scrollbar {\n width: 6px;\n}\n\n.column-container::-webkit-scrollbar-thumb {\n box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.5);\n}\n\n.column-header {\n cursor: pointer;\n border: 1px solid;\n box-sizing: border-box;\n transition: .1s filter;\n}\n\n.column-header:hover {\n filter: grayscale(0.15);\n}\n\n.header-text {\n font-size: 16px;\n font-weight: 1000;\n}\n\n.no-pointer {\n pointer-events: none;\n}\n\n.all-pointer {\n pointer-events: all;\n}\n\n.wh-inherit {\n width: inherit;\n height: inherit;\n}\n\n.absolute {\n position: absolute;\n top: 0;\n left: 0;\n}\n\n.wh-100 {\n width: 100%;\n height: 100%;\n}\n\n.flex {\n display: flex;\n}\n\n.flex.fcolumn {\n flex-direction: column\n}\n\n.flex.fcenter {\n align-items: center;\n justify-content: center;\n}\n'.toString(),'\n\n\n')}},__webpack_module_cache__={};function __webpack_require__(t){var e=__webpack_module_cache__[t];if(void 0!==e)return e.exports;var n=__webpack_module_cache__[t]={exports:{}};return __webpack_modules__[t](n,n.exports,__webpack_require__),n.exports}__webpack_require__.d=function(t,e){for(var n in e)__webpack_require__.o(e,n)&&!__webpack_require__.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},__webpack_require__.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)};var __webpack_exports__={};!function(){var t,e={showDisplay:"block",warns:{appendNode:"menu.appendNode is undefined. Without this, the menu will not be added to HTML. MenuID: [m_id]"},column:{defaultX:20,defaultY:20,defaultWidth:200,defaultHeight:400,defaultMaxHeight:400,dragMouseKey:0,header:{defaultWidth:200,defaultHeight:30,openMouseKey:2,colors:{main:"rgba(26, 26, 26, 1)",text:"rgba(255, 255, 255, 1)"}},container:{showDisplay:"flex",colors:{main:"rgba(26, 26, 26, 1)",text:"rgba(255, 255, 255, 1)"}},optionsContainer:{showDisplay:"flex",colors:{main:"rgba(26, 26, 26, 1)",text:"rgba(255, 255, 255, 1)"}},checkbox:{toggleKey:0,openOptionsKey:2}}},n=__webpack_require__(665),i=function(){function t(t,e){this.node=t,this.colors=e,this.node=t,this.colors=e,this.bgColor=this.colors.main,this.textColor=this.colors.text,this.isShadowActive=!1}return Object.defineProperty(t.prototype,"alphaReg",{get:function(){return/\,\s?\d(\.\d+)?\)/gm},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onlyRGBReg",{get:function(){return/(?!\d+\)$)\d+/gi},enumerable:!1,configurable:!0}),t.prototype.getBorderColor=function(){return this.bgColor.replace(this.alphaReg,",1)").replace(this.onlyRGBReg,(function(t){return t>>1<=255&&t>>1>=0?t>>1:t}))},t.prototype.getBackgroundColor=function(){return this.bgColor.replace(this.alphaReg,",0.7)")},t.prototype._updateStyles=function(t,e){var n=this.getBackgroundColor(),i=this.getBorderColor();this.node.style.width="number"==typeof t?"".concat(t,"px"):t,this.node.style.height="number"==typeof e?"".concat(e,"px"):e,this.node.style.backgroundColor=n,this.node.style.borderColor=i,this.node.style.boxShadow=this.isShadowActive?"inset 0px 0px 6px 2px ".concat(i):"",this.node.style.color=this.textColor},t}(),o=(t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)},function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}),s=function(t){function n(n,i,o,s,r){var a=this,l=document.createElement("container"),u=e.column;return(a=t.call(this,l,u.container.colors)||this).parent=n,a.x=i,a.y=o,a.width=s,a.height=r,a.parent=n,a.x=i,a.y=o,a.width=s,a.height=r,a.element=l,a.config=u,a.maxHeight=0,a.models=new Map,a}return o(n,t),Object.defineProperty(n.prototype,"isVisible",{get:function(){return this.element.style.display===this.config.container.showDisplay},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"visibleStatus",{get:function(){return this.isVisible?"show":"hide"},enumerable:!1,configurable:!0}),n.prototype.show=function(){this.element.style.display=this.config.container.showDisplay},n.prototype.hide=function(){this.element.style.display="none"},n.prototype.toggle=function(){if(this.isVisible)return this.hide();this.show()},n.prototype.add=function(t){if(t.key)return t.setParent(this.element),this.models.set(t.key,t).get(t.key)},n.prototype.updateStyles=function(){var t=this;this._updateStyles(this.width,this.height),this.element.style.maxHeight="".concat(this.maxHeight,"px"),this.models.forEach((function(e){e.bgColor=t.bgColor,e.textColor=t.textColor,e._updateStyles("intial","auto"),e.options.size&&(e.optionsContainer.bgColor=t.bgColor,e.optionsContainer.textColor=t.textColor,e.optionsContainer.updateStyles())}))},n.prototype.build=function(){this.element.classList.add("column-container","flex","fcolumn","all-pointer"),this.parent.appendChild(this.element),this.models.forEach((function(t){t.build()})),this.hide(),this.updateStyles()},n}(i),r=function(){function t(t,n,i,o,s,r,a,l){this.targetNode=t,this.node=n,this.x=i,this.y=o,this.width=s,this.height=r,this.collisionWidth=a,this.collisionHeight=l,this.targetNode=t,this.node=n,this.x=i,this.y=o,this.width=s,this.height=r,this.collisionWidth=a,this.collisionHeight=l,this._config=e.column,this.isDragging=!1,this.setTo(this.x,this.y)}return t.prototype.fixXY=function(){this.x<=0&&(this.x=0),this.y<=0&&(this.y=0),this.x+this.collisionWidth>=window.innerWidth&&(this.x=window.innerWidth-this.collisionWidth),this.y+this.collisionHeight>=window.innerHeight&&(this.y=window.innerHeight-this.collisionHeight)},t.prototype.setTo=function(t,e,n){void 0===n&&(n=!0),this.x=t,this.y=e,n&&this.fixXY(),this.node.style.left="".concat(this.x,"px"),this.node.style.top="".concat(this.y,"px")},t.prototype._initEvents=function(){var t=this,e=!1;this.targetNode.addEventListener("mousedown",(function(n){e||n.button!==t._config.dragMouseKey||(t.isDragging=!0,e=!0)})),window.addEventListener("mouseup",(function(n){n.button===t._config.dragMouseKey&&(t.isDragging=!1,e=!1)})),window.addEventListener("mousemove",(function(e){if(t.isDragging){var n=e.clientX-parseInt(t.targetNode.style.width)/2,i=e.clientY-parseInt(t.targetNode.style.height)/2;t.setTo(n,i)}})),window.addEventListener("resize",(function(){t.setTo(t.x,t.y)}))},t}(),a=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),l=function(t){function n(n,i,o,s,r,a){var l=this,u=document.createElement("header"),c=e.column;return(l=t.call(this,u,c.header.colors)||this).parent=n,l.x=i,l.y=o,l.width=s,l.height=r,l.targetContainer=a,l.parent=n,l.x=i,l.y=o,l.width=s,l.height=r,l.targetContainer=a,l.element=u,l.config=c,l.text="ColumnMenu",l.iconURL="",l}return a(n,t),Object.defineProperty(n.prototype,"textElement",{get:function(){return this.element.querySelector(".header-text")},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"iconElement",{get:function(){return this.element.querySelector(".header-icon")},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"html",{get:function(){return"\n ".concat(/^https?\:\/{2}/.test(this.iconURL)?''):"",'\n ').concat(this.text,"\n ")},enumerable:!1,configurable:!0}),n.prototype.updateStyles=function(){this._updateStyles(this.width,this.height),this.iconElement instanceof HTMLImageElement&&this.iconElement.src!==this.iconURL&&(this.iconElement.src=this.iconURL),this.textElement instanceof HTMLSpanElement&&(this.textElement.innerText=this.text)},n.prototype.initEvents=function(){var t=this,e=!1;this.element.addEventListener("mousedown",(function(n){e||n.button!==t.config.header.openMouseKey||(t.targetContainer.toggle(),e=!0)})),window.addEventListener("mouseup",(function(n){n.button===t.config.header.openMouseKey&&(e=!1)}))},n.prototype.build=function(){this.element.classList.add("column-header","flex","fcenter","all-pointer"),this.parent.appendChild(this.element),this.element.insertAdjacentHTML("beforeend",this.html),this.updateStyles(),this.initEvents()},n}(i),u=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();function c(t,e){var n=parseInt(t.slice(1,3),16),i=parseInt(t.slice(3,5),16),o=parseInt(t.slice(5,7),16);return"rgba(".concat(n,", ").concat(i,", ").concat(o,", ").concat(e,")")}var p=function(t){function n(){var n=this,i=document.createElement("div"),o=e.column,r=new s(i,o.defaultX,o.defaultY,o.header.defaultWidth,"auto"),a=new l(i,o.defaultX,o.defaultY,o.header.defaultWidth,o.header.defaultHeight,r);return(n=t.call(this,a.element,i,o.defaultX,o.defaultY,o.defaultWidth,o.defaultHeight,a.width,a.height)||this).id=NaN,n.element=i,n.config=o,n.header=a,n.container=r,n}return u(n,t),n.prototype.setMaxHeight=function(t){return this.container.maxHeight=Math.abs(t-this.header.height),this.container.updateStyles(),this.updateStyles(),this},n.prototype.setSize=function(t,e){return this.width=t,this.height=e,this.updateStyles(),this},n.prototype.setHeaderShadowActive=function(t){return this.header.isShadowActive=t,this},n.prototype.setHeaderIconURL=function(t){return this.header.iconURL=t,this},n.prototype.setHeaderSize=function(t,e){return this.header.width=t,this.header.height=e,this.header.updateStyles(),this},n.prototype.setHeaderText=function(t){return this.header.text=null==t?void 0:t.toString(),this.header.updateStyles(),this},n.prototype.setHeaderBgColor=function(t){return this.header.bgColor=c(null==t?void 0:t.toString(),1),this.header.updateStyles(),this},n.prototype.setHeaderTextColor=function(t){return this.header.textColor=c(null==t?void 0:t.toString(),1),this.header.updateStyles(),this},n.prototype.setContainerBgColor=function(t){return this.container.bgColor=c(null==t?void 0:t.toString(),1),this.container.updateStyles(),this},n.prototype.setContainerTextColor=function(t){return this.container.textColor=c(null==t?void 0:t.toString(),1),this.container.updateStyles(),this},n.prototype.updateStyles=function(){this.element.style.width="".concat(this.width,"px"),this.element.style.height="".concat(this.height,"px"),this.element.style.maxHeight="".concat(this.maxHeight,"px")},n.prototype.add=function(t){return this.container.add(t)},n.prototype.build=function(){this.element.classList.add("menu-column","absolute","flex","fcolumn"),this.element.oncontextmenu=function(){return!1},this.updateStyles(),this.header.build(),this.container.build(),this.setMaxHeight(this.height),this._initEvents()},n}(r),h=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),d=function(t){function n(n,i){var o=this,s=document.createElement("container"),r=e.column;return(o=t.call(this,s,r.container.colors)||this).parent=n,o.parentKey=i,o.element=s,o.config=r,o.models=new Map,o}return h(n,t),Object.defineProperty(n.prototype,"isVisible",{get:function(){return this.element.style.display===this.config.optionsContainer.showDisplay},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"visibleStatus",{get:function(){return this.isVisible?"show":"hide"},enumerable:!1,configurable:!0}),n.prototype.show=function(){this.element.style.display=this.config.container.showDisplay},n.prototype.hide=function(){this.element.style.display="none"},n.prototype.toggle=function(){if(this.isVisible)return this.hide();this.show()},n.prototype.add=function(t){return this.models.set(t.key,t).get(t.key)},n.prototype.updateStyles=function(){var t=this;this._updateStyles("100%","auto"),this.models.forEach((function(e){e.bgColor=t.bgColor,e.textColor=t.textColor,e._updateStyles("intial","auto")}))},n.prototype.build=function(){var t=this;this.element.classList.add("options-container","flex","fcolumn"),this.element.id="".concat(this.parentKey,"_container"),this.parent.insertAdjacentHTML("afterend",this.element.outerHTML),this.element=this.parent.nextElementSibling,this.node=this.element,this.models.forEach((function(e){e.setParent(t.element),e.build()})),this.hide(),this.updateStyles()},n}(i),f=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),y=function(t){function n(n){var i=n.key,o=n.name,s=n.description,r=n.options,a=n.node,l=this,u=e.column;return(l=t.call(this,a,u.container.colors)||this).key=i,l.name=o,l.description=s,l.options=new Map(r.map((function(t){return[t.key,t]}))),l.config=u,l.parent=null,l}return f(n,t),n.prototype.setParent=function(t){this.parent=t},n.prototype.showOptions=function(){this.optionsContainer.show()},n.prototype.hideOptions=function(){this.optionsContainer.hide()},n.prototype.toggleOptions=function(){if(this.node.classList.contains("has-options")){if(this.node.classList.contains("show-options"))return this.node.classList.remove("show-options"),this.hideOptions();this.node.classList.add("show-options"),this.showOptions()}},n.prototype.initOptions=function(){var t=this;this._updateStyles("initial","auto"),this.options.size&&(this.optionsContainer=new d(this.node,this.key)),this.options.forEach((function(e){t.optionsContainer.add(e)})),this.options.size&&this.optionsContainer.build()},n}(i),m=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),g=function(t){function e(e){var n=e.key,i=e.name,o=e.description,s=e.options,r=void 0===s?[]:s,a=e.isActive,l=void 0!==a&&a,u=e.isDisabled,c=void 0!==u&&u,p=this,h=document.createElement("box");return(p=t.call(this,{key:n,name:i,description:o,options:r,node:h})||this).isActive=l,p.isDisabled=c,p.element=h,p.events=new Map([["click",new Map]]),p}return m(e,t),Object.defineProperty(e.prototype,"html",{get:function(){return'\n '.concat(this.name,"\n ")},enumerable:!1,configurable:!0}),e.prototype.on=function(t,e){var n=this.events.get(t);n.set(n.size+1,e)},e.prototype.setActive=function(t){this.isActive=t,this.updateClasses()},e.prototype.setDisabled=function(t){this.isDisabled=t,this.updateClasses()},e.prototype.toggle=function(){var t=this;return this.setActive(!this.isActive),this.events.get("click").forEach((function(e){e(t.isActive,t.element)})),this.isActive},e.prototype.initEvents=function(){var t=this,e=!1;this.element.addEventListener("mousedown",(function(n){e||(n.button!==t.config.checkbox.toggleKey||t.isDisabled||t.toggle(),n.button===t.config.checkbox.openOptionsKey&&t.toggleOptions(),e=!0)})),window.addEventListener("mouseup",(function(n){n.button!==t.config.checkbox.toggleKey&&n.button!==t.config.checkbox.openOptionsKey||(e=!1)}))},e.prototype.updateClasses=function(){var t=function(t){return t?"active":"inactive"};this.element.classList.remove(t(!this.isActive)),this.element.classList.add(t(this.isActive)),this.isDisabled?this.element.classList.add("disabled"):this.element.classList.remove("disabled"),this.options.size&&this.element.classList.add("has-options")},e.prototype.build=function(){this.element.classList.add("ui-model","checkbox-model"),this.updateClasses(),this.parent.appendChild(this.element),this.element.insertAdjacentHTML("beforeend",this.html),this.initOptions(),this.initEvents(),this.element.title="".concat(this.description)},e}(y),b=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),v=function(t){function n(n){var i=n.key,o=n.name,s=n.description,r=n.node,a=this,l=e.column;return(a=t.call(this,r,l.container.colors)||this).key=i,a.name=o,a.description=s,a.config=l,a.parent=null,a}return b(n,t),n.prototype.setParent=function(t){this.parent=t},n}(i),_=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),w=function(t){function e(e){var n=e.key,i=e.name,o=e.description,s=e.isActive,r=void 0!==s&&s,a=e.isDisabled,l=void 0!==a&&a,u=this,c=document.createElement("box");return(u=t.call(this,{key:n,name:i,description:o,node:c})||this).isActive=r,u.isDisabled=l,u.element=c,u.events=new Map([["click",new Map]]),u}return _(e,t),Object.defineProperty(e.prototype,"html",{get:function(){return'\n '.concat(this.name,"\n ")},enumerable:!1,configurable:!0}),e.prototype.on=function(t,e){var n=this.events.get(t);n.set(n.size+1,e)},e.prototype.setActive=function(t){this.isActive=t,this.updateClasses()},e.prototype.setDisabled=function(t){this.isDisabled=t,this.updateClasses()},e.prototype.toggle=function(){var t=this;return this.setActive(!this.isActive),this.events.get("click").forEach((function(e){e(t.isActive,t.element)})),this.isActive},e.prototype.initEvents=function(){var t=this,e=!1;this.element.addEventListener("mousedown",(function(n){e||(n.button!==t.config.checkbox.toggleKey||t.isDisabled||t.toggle(),e=!0)})),window.addEventListener("mouseup",(function(n){n.button!==t.config.checkbox.toggleKey&&n.button!==t.config.checkbox.openOptionsKey||(e=!1)}))},e.prototype.updateClasses=function(){var t=function(t){return t?"active":"inactive"};this.element.classList.remove(t(!this.isActive)),this.element.classList.add(t(this.isActive)),this.isDisabled?this.element.classList.add("disabled"):this.element.classList.remove("disabled")},e.prototype.build=function(){this.element.classList.add("ui-model","checkbox-model"),this.updateClasses(),this.parent.appendChild(this.element),this.element.insertAdjacentHTML("beforeend",this.html),this.initEvents(),this.element.title="".concat(this.description)},e}(v),x=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),E=function(t){function e(e){var n=e.key,i=e.name,o=e.description,s=e.value,r=void 0===s?"":s,a=e.isDisabled,l=void 0!==a&&a,u=this,c=document.createElement("box");return c.setAttribute("data-name",i),(u=t.call(this,{key:n,name:i,description:o,node:c})||this).value=r,u.isDisabled=l,u.element=c,u.inputElement=null,u.events=new Map([["change",new Map],["input",new Map]]),u}return x(e,t),Object.defineProperty(e.prototype,"html",{get:function(){return'\n \n '},enumerable:!1,configurable:!0}),e.prototype.on=function(t,e){var n=this.events.get(t);n.set(n.size+1,e)},e.prototype.setValue=function(t){this.value=t,this.inputElement.value=this.value},e.prototype.setDisabled=function(t){this.isDisabled=t,this.updateClasses()},e.prototype.onChange=function(t){var e=this;return this.setValue(this.inputElement.value),this.events.get("change").forEach((function(n){n(e.value,t,e.inputElement)})),this.value},e.prototype.onInput=function(t){this.onChange(t)},e.prototype.initEvents=function(){this.inputElement.addEventListener("change",this.onInput.bind(this)),this.inputElement.addEventListener("focus",this.onInput.bind(this)),this.inputElement.addEventListener("input",this.onInput.bind(this))},e.prototype.updateClasses=function(){this.isDisabled?(this.element.classList.add("disabled"),this.inputElement.disabled=!0):(this.element.classList.remove("disabled"),this.inputElement.disabled=!1)},e.prototype.build=function(){this.element.classList.add("ui-model","input-color-model","inactive"),this.parent.appendChild(this.element),this.element.insertAdjacentHTML("beforeend",this.html),this.inputElement=this.element.querySelector("input"),this.setValue(this.value),this.updateClasses(),this.initEvents(),this.element.title="".concat(this.description)},e}(v),C=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),O=function(t){function e(e){var n=e.key,i=e.name,o=e.description,s=e.min,r=void 0===s?0:s,a=e.max,l=void 0===a?100:a,u=e.value,c=void 0===u?"":u,p=e.fixValue,h=void 0===p?0:p,d=e.isDisabled,f=void 0!==d&&d,y=this,m=document.createElement("box");return m.setAttribute("data-name",i),(y=t.call(this,{key:n,name:i,description:o,node:m})||this).min=r,y.max=l,y.value=c,y.fixValue=h,y.isDisabled=f,y.element=m,y.inputElement=null,y.events=new Map([["input",new Map]]),y}return C(e,t),Object.defineProperty(e.prototype,"html",{get:function(){return'\n
\n
\n '.concat(this.name,'\n ').concat(this.value,'\n
\n \n \n
\n ')},enumerable:!1,configurable:!0}),e.prototype.on=function(t,e){var n=this.events.get(t);n.set(n.size+1,e)},e.prototype.setValue=function(t){var e=document.getElementById("".concat(this.key,"_value"));this.value=t,this.inputElement.value=this.value,e&&(e.innerText=this.value)},e.prototype.setDisabled=function(t){this.isDisabled=t,this.updateClasses()},e.prototype.onInput=function(){var t=this;return this.events.get("input").forEach((function(e){e(t.value,t.inputElement)})),this.value},e.prototype.updateBackgroundSize=function(){var t=+this.value,e=+this.min,n=+this.max;this.inputElement.style.backgroundSize=100*(t-e)/(n-e)+"% 100%"},e.prototype.getValueByMouseX=function(t){var e=this.element.getBoundingClientRect(),n=+this.min,i=+this.max,o=(t/e.width*i).toFixed(this.fixValue);return Math.min(Math.max(+o,n),i)},e.prototype.updateInputValue=function(t){var e=this.getValueByMouseX(t.offsetX);this.setValue(e),this.onInput(),this.inputElement.dispatchEvent(new InputEvent("input"))},e.prototype.initEvents=function(){var t=this,e=document.querySelector(".menu-holder"),n=!1;this.updateBackgroundSize(),this.element.addEventListener("mousedown",(function(t){n=!0})),window.addEventListener("mouseup",(function(t){n&&(n=!1)})),e.addEventListener("mousemove",(function(e){n&&t.updateInputValue(e)})),this.inputElement.addEventListener("input",(function(){t.updateBackgroundSize()}))},e.prototype.updateClasses=function(){this.isDisabled?(this.element.classList.add("disabled"),this.inputElement.disabled=!0):(this.element.classList.remove("disabled"),this.inputElement.disabled=!1)},e.prototype.build=function(){this.element.classList.add("ui-model","input-range-model","inactive"),this.parent.appendChild(this.element),this.element.insertAdjacentHTML("beforeend",this.html),this.inputElement=this.element.querySelector("input"),this.setValue(this.value),this.updateClasses(),this.initEvents(),this.element.title="".concat(this.description)},e}(v),M=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),k=function(t){function e(e){var n=e.key,i=e.name,o=e.description,s=e.value,r=void 0===s?"":s,a=e.isDisabled,l=void 0!==a&&a,u=this,c=document.createElement("box");return(u=t.call(this,{key:n,name:i,description:o,node:c})||this).value=r,u.isDisabled=l,u.element=c,u.inputElement=null,u.events=new Map([["input",new Map]]),u}return M(e,t),Object.defineProperty(e.prototype,"html",{get:function(){return'\n \n ')},enumerable:!1,configurable:!0}),e.prototype.on=function(t,e){var n=this.events.get(t);n.set(n.size+1,e)},e.prototype.setValue=function(t){this.value=t,this.inputElement.value=this.value},e.prototype.setDisabled=function(t){this.isDisabled=t,this.updateClasses()},e.prototype.onInput=function(t){var e=this;return this.setValue(this.inputElement.value),this.events.get("input").forEach((function(n){n(e.value,t,e.inputElement)})),this.value},e.prototype.initEvents=function(){this.inputElement.addEventListener("input",this.onInput.bind(this))},e.prototype.updateClasses=function(){this.isDisabled?(this.element.classList.add("disabled"),this.inputElement.disabled=!0):(this.element.classList.remove("disabled"),this.inputElement.disabled=!1)},e.prototype.build=function(){this.element.classList.add("ui-model","input-text-model","inactive"),this.parent.appendChild(this.element),this.element.insertAdjacentHTML("beforeend",this.html),this.inputElement=this.element.querySelector("input"),this.setValue(this.value),this.updateClasses(),this.initEvents(),this.element.title="".concat(this.description)},e}(v),L=function(){return this.list=new Map,this.Column=p,this.Checkbox=g,this.OptionCheckbox=w,this.OptionIText=k,this.OptionIColor=E,this.OptionIRange=O,this.createMenu=function(t){var i=this,o=t.toggleKey,s=t.appendNode,r=this.list.size+1,a=new n.Z({id:r,config:e,toggleKey:o,appendNode:s});return a.destroy=function(){a.holder.remove(),i.list.delete(a.id)},this.list.set(r,a).get(r)},this.eachAllMenu=function(t,e){void 0===e&&(e=function(){return!0}),Array.from(this.list.values()).filter((function(t){return t.isMenu&&e(t)})).forEach((function(e){return t(e)}))},this.toggleAllMenu=function(t){this.eachAllMenu((function(e){e[t]()}),(function(e){return"show"===t?!e.isVisible:e.isVisible}))},this.showAllMenu=function(){this.toggleAllMenu("show")},this.hideAllMenu=function(){this.toggleAllMenu("hide")},console.log("MooUI.js v1.0.0"),this}.call(Object.create({}));window.MooUI=L}()})();