jodit-pro
Version:
PRO Version of Jodit Editor
1 lines • 73.6 kB
JavaScript
!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var s=e();for(var r in s)("object"==typeof exports?exports:t)[r]=s[r]}}(self,(function(){return(self.webpackChunkjodit_pro=self.webpackChunkjodit_pro||[]).push([[881],{43746:function(t){"undefined"!=typeof self&&self,t.exports=function(t){var e={};function s(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,s),o.l=!0,o.exports}return s.m=t,s.c=e,s.d=function(t,e,r){s.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},s.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},s.t=function(t,e){if(1&e&&(t=s(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(s.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)s.d(r,o,function(e){return t[e]}.bind(null,o));return r},s.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return s.d(e,"a",e),e},s.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},s.p="",s(s.s=1)}([function(t,e,s){"use strict";var r=s(3);function o(t){return!0===r(t)&&"[object Object]"===Object.prototype.toString.call(t)}t.exports=function(t){var e,s;return!1!==o(t)&&"function"==typeof(e=t.constructor)&&!1!==o(s=e.prototype)&&!1!==s.hasOwnProperty("isPrototypeOf")}},function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.VERSION=e.PALETTE_MATERIAL_CHROME=e.PALETTE_MATERIAL_500=e.COLOR_NAMES=e.getLuminance=e.intToRgb=e.rgbToInt=e.rgbToHsv=e.rgbToHsl=e.hslToRgb=e.rgbToHex=e.parseColor=e.parseColorToHsla=e.parseColorToHsl=e.parseColorToRgba=e.parseColorToRgb=e.from=e.createPicker=void 0;var r=function(){function t(t,e){for(var s=0;e.length>s;s++){var r=e[s];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,s,r){return s&&t(e.prototype,s),r&&t(e,r),e}}(),o=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var s=[],r=!0,o=!1,i=void 0;try{for(var n,a=t[Symbol.iterator]();!(r=(n=a.next()).done)&&(s.push(n.value),!e||s.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{!r&&a.return&&a.return()}finally{if(o)throw i}}return s}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},i=s(2),n=l(s(0)),a=l(s(4));function l(t){return t&&t.__esModule?t:{default:t}}function c(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function p(t){if(Array.isArray(t)){for(var e=0,s=Array(t.length);t.length>e;e++)s[e]=t[e];return s}return Array.from(t)}var u="undefined"!=typeof window&&window.navigator.userAgent.indexOf("Edge")>-1,f="undefined"!=typeof window&&window.navigator.userAgent.indexOf("rv:")>-1,b={id:null,attachTo:"body",showHSL:!0,showRGB:!0,showHEX:!0,showAlpha:!1,color:"#ff0000",palette:null,paletteEditable:!1,useAlphaInPalette:"auto",slBarSize:[232,150],hueBarSize:[150,11],alphaBarSize:[150,11]},d="COLOR",h="RGBA_USER",x="HSLA_USER";function g(t,e,s){return t?t instanceof HTMLElement?t:t instanceof NodeList?t[0]:"string"==typeof t?document.querySelector(t):t.jquery?t.get(0):s?e:null:e}function v(t){var e=t.getContext("2d"),s=+t.width,r=+t.height,n=e.createLinearGradient(1,1,1,r-1);return n.addColorStop(0,"white"),n.addColorStop(1,"black"),{setHue:function(t){var o=e.createLinearGradient(1,0,s-1,0);o.addColorStop(0,"hsla("+t+", 100%, 50%, 0)"),o.addColorStop(1,"hsla("+t+", 100%, 50%, 1)"),e.fillStyle=n,e.fillRect(0,0,s,r),e.fillStyle=o,e.globalCompositeOperation="multiply",e.fillRect(0,0,s,r),e.globalCompositeOperation="source-over"},grabColor:function(t,s){return e.getImageData(t,s,1,1).data},findColor:function(t,e,n){var a=(0,i.rgbToHsv)(t,e,n),l=o(a,3);return[l[1]*s,r-l[2]*r]}}}function y(t,e,s){return null===t?e:/^\s*$/.test(t)?s:!!/true|yes|1/i.test(t)||!/false|no|0/i.test(t)&&e}function m(t,e,s){if(null===t)return e;if(/^\s*$/.test(t))return s;var r=t.split(",").map(Number);return 2===r.length&&r[0]&&r[1]?r:e}var w=function(){function t(e,s){if(c(this,t),s?(e=g(e),this.options=Object.assign({},b,s)):e&&(0,n.default)(e)?(this.options=Object.assign({},b,e),e=g(this.options.attachTo)):(this.options=Object.assign({},b),e=g((0,i.nvl)(e,this.options.attachTo))),!e)throw new Error("Container not found: "+this.options.attachTo);!function(t,e){var s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"acp-";if(e.hasAttribute(s+"show-hsl")&&(t.showHSL=y(e.getAttribute(s+"show-hsl"),b.showHSL,!0)),e.hasAttribute(s+"show-rgb")&&(t.showRGB=y(e.getAttribute(s+"show-rgb"),b.showRGB,!0)),e.hasAttribute(s+"show-hex")&&(t.showHEX=y(e.getAttribute(s+"show-hex"),b.showHEX,!0)),e.hasAttribute(s+"show-alpha")&&(t.showAlpha=y(e.getAttribute(s+"show-alpha"),b.showAlpha,!0)),e.hasAttribute(s+"palette-editable")&&(t.paletteEditable=y(e.getAttribute(s+"palette-editable"),b.paletteEditable,!0)),e.hasAttribute(s+"sl-bar-size")&&(t.slBarSize=m(e.getAttribute(s+"sl-bar-size"),b.slBarSize,[232,150])),e.hasAttribute(s+"hue-bar-size")&&(t.hueBarSize=m(e.getAttribute(s+"hue-bar-size"),b.hueBarSize,[150,11]),t.alphaBarSize=t.hueBarSize),e.hasAttribute(s+"palette")){var r=e.getAttribute(s+"palette");switch(r){case"PALETTE_MATERIAL_500":t.palette=i.PALETTE_MATERIAL_500;break;case"PALETTE_MATERIAL_CHROME":case"":t.palette=i.PALETTE_MATERIAL_CHROME;break;default:t.palette=r.split(/[;|]/)}}e.hasAttribute(s+"color")&&(t.color=e.getAttribute(s+"color"))}(this.options,e),this.H=0,this.S=0,this.L=0,this.R=0,this.G=0,this.B=0,this.A=1,this.palette={},this.element=document.createElement("div"),this.options.id&&(this.element.id=this.options.id),this.element.className="a-color-picker",this.element.innerHTML=a.default,e.appendChild(this.element);var r=this.element.querySelector(".a-color-picker-h");this.setupHueCanvas(r),this.hueBarHelper=v(r),this.huePointer=this.element.querySelector(".a-color-picker-h+.a-color-picker-dot");var o=this.element.querySelector(".a-color-picker-sl");this.setupSlCanvas(o),this.slBarHelper=v(o),this.slPointer=this.element.querySelector(".a-color-picker-sl+.a-color-picker-dot"),this.preview=this.element.querySelector(".a-color-picker-preview"),this.setupClipboard(this.preview.querySelector(".a-color-picker-clipbaord")),this.options.showHSL?(this.setupInput(this.inputH=this.element.querySelector(".a-color-picker-hsl>input[nameref=H]")),this.setupInput(this.inputS=this.element.querySelector(".a-color-picker-hsl>input[nameref=S]")),this.setupInput(this.inputL=this.element.querySelector(".a-color-picker-hsl>input[nameref=L]"))):this.element.querySelector(".a-color-picker-hsl").remove(),this.options.showRGB?(this.setupInput(this.inputR=this.element.querySelector(".a-color-picker-rgb>input[nameref=R]")),this.setupInput(this.inputG=this.element.querySelector(".a-color-picker-rgb>input[nameref=G]")),this.setupInput(this.inputB=this.element.querySelector(".a-color-picker-rgb>input[nameref=B]"))):this.element.querySelector(".a-color-picker-rgb").remove(),this.options.showHEX?this.setupInput(this.inputRGBHEX=this.element.querySelector("input[nameref=RGBHEX]")):this.element.querySelector(".a-color-picker-rgbhex").remove(),this.options.paletteEditable||this.options.palette&&this.options.palette.length>0?this.setPalette(this.paletteRow=this.element.querySelector(".a-color-picker-palette")):(this.paletteRow=this.element.querySelector(".a-color-picker-palette"),this.paletteRow.remove()),this.options.showAlpha?(this.setupAlphaCanvas(this.element.querySelector(".a-color-picker-a")),this.alphaPointer=this.element.querySelector(".a-color-picker-a+.a-color-picker-dot")):this.element.querySelector(".a-color-picker-alpha").remove(),this.element.style.width=this.options.slBarSize[0]+"px",this.onValueChanged(d,this.options.color)}return r(t,[{key:"setupHueCanvas",value:function(t){var e=this;t.width=this.options.hueBarSize[0],t.height=this.options.hueBarSize[1];for(var s=t.getContext("2d"),r=s.createLinearGradient(0,0,this.options.hueBarSize[0],0),o=0;1>=o;o+=1/360)r.addColorStop(o,"hsl("+360*o+", 100%, 50%)");s.fillStyle=r,s.fillRect(0,0,this.options.hueBarSize[0],this.options.hueBarSize[1]);var n=function(s){var r=(0,i.limit)(s.clientX-t.getBoundingClientRect().left,0,e.options.hueBarSize[0]),o=Math.round(360*r/e.options.hueBarSize[0]);e.huePointer.style.left=r-7+"px",e.onValueChanged("H",o)},a=function t(){document.removeEventListener("mousemove",n),document.removeEventListener("mouseup",t)};t.addEventListener("mousedown",(function(t){n(t),document.addEventListener("mousemove",n),document.addEventListener("mouseup",a)}))}},{key:"setupSlCanvas",value:function(t){var e=this;t.width=this.options.slBarSize[0],t.height=this.options.slBarSize[1];var s=function(s){var r=(0,i.limit)(s.clientX-t.getBoundingClientRect().left,0,e.options.slBarSize[0]-1),o=(0,i.limit)(s.clientY-t.getBoundingClientRect().top,0,e.options.slBarSize[1]-1),n=e.slBarHelper.grabColor(r,o);e.slPointer.style.left=r-7+"px",e.slPointer.style.top=o-7+"px",e.onValueChanged("RGB",n)},r=function t(){document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",t)};t.addEventListener("mousedown",(function(t){s(t),document.addEventListener("mousemove",s),document.addEventListener("mouseup",r)}))}},{key:"setupAlphaCanvas",value:function(t){var e=this;t.width=this.options.alphaBarSize[0],t.height=this.options.alphaBarSize[1];var s=t.getContext("2d"),r=s.createLinearGradient(0,0,t.width-1,0);r.addColorStop(0,"hsla(0, 0%, 50%, 0)"),r.addColorStop(1,"hsla(0, 0%, 50%, 1)"),s.fillStyle=r,s.fillRect(0,0,this.options.alphaBarSize[0],this.options.alphaBarSize[1]);var o=function(s){var r=(0,i.limit)(s.clientX-t.getBoundingClientRect().left,0,e.options.alphaBarSize[0]),o=+(r/e.options.alphaBarSize[0]).toFixed(2);e.alphaPointer.style.left=r-7+"px",e.onValueChanged("ALPHA",o)},n=function t(){document.removeEventListener("mousemove",o),document.removeEventListener("mouseup",t)};t.addEventListener("mousedown",(function(t){o(t),document.addEventListener("mousemove",o),document.addEventListener("mouseup",n)}))}},{key:"setupInput",value:function(t){var e=this,s=+t.min,r=+t.max,o=t.getAttribute("nameref");t.hasAttribute("select-on-focus")&&t.addEventListener("focus",(function(){t.select()})),"text"===t.type?t.addEventListener("change",(function(){e.onValueChanged(o,t.value)})):((u||f)&&t.addEventListener("keydown",(function(n){"Up"===n.key?(t.value=(0,i.limit)(+t.value+1,s,r),e.onValueChanged(o,t.value),n.returnValue=!1):"Down"===n.key&&(t.value=(0,i.limit)(+t.value-1,s,r),e.onValueChanged(o,t.value),n.returnValue=!1)})),t.addEventListener("change",(function(){e.onValueChanged(o,(0,i.limit)(+t.value,s,r))})))}},{key:"setupClipboard",value:function(t){var e=this;t.title="click to copy",t.addEventListener("click",(function(){t.value=(0,i.parseColor)([e.R,e.G,e.B,e.A],"hexcss4"),t.select(),document.execCommand("copy")}))}},{key:"setPalette",value:function(t){var e=this,s="auto"===this.options.useAlphaInPalette?this.options.showAlpha:this.options.useAlphaInPalette,r=null;switch(this.options.palette){case"PALETTE_MATERIAL_500":r=i.PALETTE_MATERIAL_500;break;case"PALETTE_MATERIAL_CHROME":r=i.PALETTE_MATERIAL_CHROME;break;default:r=(0,i.ensureArray)(this.options.palette)}if(this.options.paletteEditable||r.length>0){var o=function(s,r,o){var i=t.querySelector('.a-color-picker-palette-color[data-color="'+s+'"]')||document.createElement("div");i.className="a-color-picker-palette-color",i.style.backgroundColor=s,i.setAttribute("data-color",s),i.title=s,t.insertBefore(i,r),e.palette[s]=!0,o&&e.onPaletteColorAdd(s)},n=function(s,r){s?(t.removeChild(s),e.palette[s.getAttribute("data-color")]=!1,r&&e.onPaletteColorRemove(s.getAttribute("data-color"))):(t.querySelectorAll(".a-color-picker-palette-color[data-color]").forEach((function(e){t.removeChild(e)})),Object.keys(e.palette).forEach((function(t){e.palette[t]=!1})),r&&e.onPaletteColorRemove())};if(r.map((function(t){return(0,i.parseColor)(t,s?"rgbcss4":"hex")})).filter((function(t){return!!t})).forEach((function(t){return o(t)})),this.options.paletteEditable){var a=document.createElement("div");a.className="a-color-picker-palette-color a-color-picker-palette-add",a.innerHTML="+",t.appendChild(a),t.addEventListener("click",(function(t){/a-color-picker-palette-add/.test(t.target.className)?t.shiftKey?n(null,!0):o(s?(0,i.parseColor)([e.R,e.G,e.B,e.A],"rgbcss4"):(0,i.rgbToHex)(e.R,e.G,e.B),t.target,!0):/a-color-picker-palette-color/.test(t.target.className)&&(t.shiftKey?n(t.target,!0):e.onValueChanged(d,t.target.getAttribute("data-color")))}))}else t.addEventListener("click",(function(t){/a-color-picker-palette-color/.test(t.target.className)&&e.onValueChanged(d,t.target.getAttribute("data-color"))}))}else t.style.display="none"}},{key:"updatePalette",value:function(t){this.paletteRow.innerHTML="",this.palette={},this.paletteRow.parentElement||this.element.appendChild(this.paletteRow),this.options.palette=t,this.setPalette(this.paletteRow)}},{key:"onValueChanged",value:function(t,e){var s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{silent:!1};switch(t){case"H":this.H=e;var r=(0,i.hslToRgb)(this.H,this.S,this.L),n=o(r,3);this.R=n[0],this.G=n[1],this.B=n[2],this.slBarHelper.setHue(e),this.updatePointerH(this.H),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B);break;case"S":this.S=e;var a=(0,i.hslToRgb)(this.H,this.S,this.L),l=o(a,3);this.R=l[0],this.G=l[1],this.B=l[2],this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B);break;case"L":this.L=e;var c=(0,i.hslToRgb)(this.H,this.S,this.L),p=o(c,3);this.R=p[0],this.G=p[1],this.B=p[2],this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B);break;case"R":this.R=e;var u=(0,i.rgbToHsl)(this.R,this.G,this.B),f=o(u,3);this.H=f[0],this.S=f[1],this.L=f[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGBHEX(this.R,this.G,this.B);break;case"G":this.G=e;var b=(0,i.rgbToHsl)(this.R,this.G,this.B),g=o(b,3);this.H=g[0],this.S=g[1],this.L=g[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGBHEX(this.R,this.G,this.B);break;case"B":this.B=e;var v=(0,i.rgbToHsl)(this.R,this.G,this.B),y=o(v,3);this.H=y[0],this.S=y[1],this.L=y[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGBHEX(this.R,this.G,this.B);break;case"RGB":var m=o(e,3);this.R=m[0],this.G=m[1],this.B=m[2];var w=(0,i.rgbToHsl)(this.R,this.G,this.B),S=o(w,3);this.H=S[0],this.S=S[1],this.L=S[2],this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B);break;case h:var A=o(e,4);this.R=A[0],this.G=A[1],this.B=A[2],this.A=A[3];var k=(0,i.rgbToHsl)(this.R,this.G,this.B),C=o(k,3);this.H=C[0],this.S=C[1],this.L=C[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B),this.updatePointerA(this.A);break;case x:var E=o(e,4);this.H=E[0],this.S=E[1],this.L=E[2],this.A=E[3];var B=(0,i.hslToRgb)(this.H,this.S,this.L),F=o(B,3);this.R=F[0],this.G=F[1],this.B=F[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B),this.updatePointerA(this.A);break;case"RGBHEX":var _=(0,i.cssColorToRgb)(e)||[this.R,this.G,this.B],R=o(_,3);this.R=R[0],this.G=R[1],this.B=R[2];var H=(0,i.rgbToHsl)(this.R,this.G,this.B),L=o(H,3);this.H=L[0],this.S=L[1],this.L=L[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B);break;case d:var T=(0,i.parseColor)(e,"rgba")||[0,0,0,1],I=o(T,4);this.R=I[0],this.G=I[1],this.B=I[2],this.A=I[3];var G=(0,i.rgbToHsl)(this.R,this.G,this.B),P=o(G,3);this.H=P[0],this.S=P[1],this.L=P[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B),this.updatePointerA(this.A);break;case"ALPHA":this.A=e}this.preview.style.backgroundColor=1===this.A?"rgb("+this.R+","+this.G+","+this.B+")":"rgba("+this.R+","+this.G+","+this.B+","+this.A+")",s&&s.silent||this.onchange&&this.onchange(this.preview.style.backgroundColor)}},{key:"onPaletteColorAdd",value:function(t){this.oncoloradd&&this.oncoloradd(t)}},{key:"onPaletteColorRemove",value:function(t){this.oncolorremove&&this.oncolorremove(t)}},{key:"updateInputHSL",value:function(t,e,s){this.options.showHSL&&(this.inputH.value=t,this.inputS.value=e,this.inputL.value=s)}},{key:"updateInputRGB",value:function(t,e,s){this.options.showRGB&&(this.inputR.value=t,this.inputG.value=e,this.inputB.value=s)}},{key:"updateInputRGBHEX",value:function(t,e,s){this.options.showHEX&&(this.inputRGBHEX.value=(0,i.rgbToHex)(t,e,s))}},{key:"updatePointerH",value:function(t){this.huePointer.style.left=this.options.hueBarSize[0]*t/360-7+"px"}},{key:"updatePointerSL",value:function(t,e,s){var r=(0,i.hslToRgb)(t,e,s),n=o(r,3),a=this.slBarHelper.findColor(n[0],n[1],n[2]),l=o(a,2),c=l[0],p=l[1];c>=0&&(this.slPointer.style.left=c-7+"px",this.slPointer.style.top=p-7+"px")}},{key:"updatePointerA",value:function(t){this.options.showAlpha&&(this.alphaPointer.style.left=this.options.alphaBarSize[0]*t-7+"px")}}]),t}(),S=function(){function t(e){c(this,t),this.name=e,this.listeners=[]}return r(t,[{key:"on",value:function(t){t&&this.listeners.push(t)}},{key:"off",value:function(t){this.listeners=t?this.listeners.filter((function(e){return e!==t})):[]}},{key:"emit",value:function(t,e){for(var s=this.listeners.slice(0),r=0;s.length>r;r++)s[r].apply(e,t)}}]),t}();function A(t,e){var s=new w(t,e),r={change:new S("change"),coloradd:new S("coloradd"),colorremove:new S("colorremove")},n=!0,a={},l={get element(){return s.element},get rgb(){return[s.R,s.G,s.B]},set rgb(t){var e=o(t,3),r=e[0],n=e[1],a=e[2],l=[(0,i.limit)(r,0,255),(0,i.limit)(n,0,255),(0,i.limit)(a,0,255)];s.onValueChanged(h,[r=l[0],n=l[1],a=l[2],1])},get hsl(){return[s.H,s.S,s.L]},set hsl(t){var e=o(t,3),r=e[0],n=e[1],a=e[2],l=[(0,i.limit)(r,0,360),(0,i.limit)(n,0,100),(0,i.limit)(a,0,100)];s.onValueChanged(x,[r=l[0],n=l[1],a=l[2],1])},get rgbhex(){return this.all.hex},get rgba(){return[s.R,s.G,s.B,s.A]},set rgba(t){var e=o(t,4),r=e[0],n=e[1],a=e[2],l=e[3],c=[(0,i.limit)(r,0,255),(0,i.limit)(n,0,255),(0,i.limit)(a,0,255),(0,i.limit)(l,0,1)];s.onValueChanged(h,[r=c[0],n=c[1],a=c[2],l=c[3]])},get hsla(){return[s.H,s.S,s.L,s.A]},set hsla(t){var e=o(t,4),r=e[0],n=e[1],a=e[2],l=e[3],c=[(0,i.limit)(r,0,360),(0,i.limit)(n,0,100),(0,i.limit)(a,0,100),(0,i.limit)(l,0,1)];s.onValueChanged(x,[r=c[0],n=c[1],a=c[2],l=c[3]])},get color(){return this.all.toString()},set color(t){s.onValueChanged(d,t)},setColor:function(t){s.onValueChanged(d,t,{silent:arguments.length>1&&void 0!==arguments[1]&&arguments[1]})},get all(){if(n){var t=[s.R,s.G,s.B,s.A],e=1>s.A?"rgba("+s.R+","+s.G+","+s.B+","+s.A+")":i.rgbToHex.apply(void 0,t);(a=(0,i.parseColor)(t,a)).toString=function(){return e},n=!1}return Object.assign({},a)},get onchange(){return r.change&&r.change.listeners[0]},set onchange(t){this.off("change").on("change",t)},get oncoloradd(){return r.coloradd&&r.coloradd.listeners[0]},set oncoloradd(t){this.off("coloradd").on("coloradd",t)},get oncolorremove(){return r.colorremove&&r.colorremove.listeners[0]},set oncolorremove(t){this.off("colorremove").on("colorremove",t)},get palette(){return Object.keys(s.palette).filter((function(t){return s.palette[t]}))},set palette(t){s.updatePalette(t)},show:function(){s.element.classList.remove("hidden")},hide:function(){s.element.classList.add("hidden")},toggle:function(){s.element.classList.toggle("hidden")},on:function(t,e){return t&&r[t]&&r[t].on(e),this},off:function(t,e){return t&&r[t]&&r[t].off(e),this},destroy:function(){r.change.off(),r.coloradd.off(),r.colorremove.off(),s.element.remove(),r=null,s=null}};return s.onchange=function(){for(var t=arguments.length,e=Array(t),s=0;t>s;s++)e[s]=arguments[s];n=!0,r.change.emit([l].concat(e),l)},s.oncoloradd=function(){for(var t=arguments.length,e=Array(t),s=0;t>s;s++)e[s]=arguments[s];r.coloradd.emit([l].concat(e),l)},s.oncolorremove=function(){for(var t=arguments.length,e=Array(t),s=0;t>s;s++)e[s]=arguments[s];r.colorremove.emit([l].concat(e),l)},s.element.ctrl=l,l}if("undefined"!=typeof window&&!document.querySelector('head>style[data-source="a-color-picker"]')){var k=s(5).toString(),C=document.createElement("style");C.setAttribute("type","text/css"),C.setAttribute("data-source","a-color-picker"),C.innerHTML=k,document.querySelector("head").appendChild(C)}e.createPicker=A,e.from=function(t,e){var s=function(t){return t?Array.isArray(t)?t:t instanceof HTMLElement?[t]:t instanceof NodeList?[].concat(p(t)):"string"==typeof t?[].concat(p(document.querySelectorAll(t))):t.jquery?t.get():[]:[]}(t).map((function(t,s){var r=A(t,e);return r.index=s,r}));return s.on=function(t,e){return s.forEach((function(s){return s.on(t,e)})),this},s.off=function(t){return s.forEach((function(e){return e.off(t)})),this},s},e.parseColorToRgb=i.parseColorToRgb,e.parseColorToRgba=i.parseColorToRgba,e.parseColorToHsl=i.parseColorToHsl,e.parseColorToHsla=i.parseColorToHsla,e.parseColor=i.parseColor,e.rgbToHex=i.rgbToHex,e.hslToRgb=i.hslToRgb,e.rgbToHsl=i.rgbToHsl,e.rgbToHsv=i.rgbToHsv,e.rgbToInt=i.rgbToInt,e.intToRgb=i.intToRgb,e.getLuminance=i.getLuminance,e.COLOR_NAMES=i.COLOR_NAMES,e.PALETTE_MATERIAL_500=i.PALETTE_MATERIAL_500,e.PALETTE_MATERIAL_CHROME=i.PALETTE_MATERIAL_CHROME,e.VERSION="1.2.1"},function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.nvl=e.ensureArray=e.limit=e.getLuminance=e.parseColor=e.parseColorToHsla=e.parseColorToHsl=e.cssHslaToHsla=e.cssHslToHsl=e.parseColorToRgba=e.parseColorToRgb=e.cssRgbaToRgba=e.cssRgbToRgb=e.cssColorToRgba=e.cssColorToRgb=e.intToRgb=e.rgbToInt=e.rgbToHsv=e.rgbToHsl=e.hslToRgb=e.rgbToHex=e.PALETTE_MATERIAL_CHROME=e.PALETTE_MATERIAL_500=e.COLOR_NAMES=void 0;var r=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var s=[],r=!0,o=!1,i=void 0;try{for(var n,a=t[Symbol.iterator]();!(r=(n=a.next()).done)&&(s.push(n.value),!e||s.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{!r&&a.return&&a.return()}finally{if(o)throw i}}return s}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=function(t){return t&&t.__esModule?t:{default:t}}(s(0));function i(t){if(Array.isArray(t)){for(var e=0,s=Array(t.length);t.length>e;e++)s[e]=t[e];return s}return Array.from(t)}var n={aliceblue:"#F0F8FF",antiquewhite:"#FAEBD7",aqua:"#00FFFF",aquamarine:"#7FFFD4",azure:"#F0FFFF",beige:"#F5F5DC",bisque:"#FFE4C4",black:"#000000",blanchedalmond:"#FFEBCD",blue:"#0000FF",blueviolet:"#8A2BE2",brown:"#A52A2A",burlywood:"#DEB887",cadetblue:"#5F9EA0",chartreuse:"#7FFF00",chocolate:"#D2691E",coral:"#FF7F50",cornflowerblue:"#6495ED",cornsilk:"#FFF8DC",crimson:"#DC143C",cyan:"#00FFFF",darkblue:"#00008B",darkcyan:"#008B8B",darkgoldenrod:"#B8860B",darkgray:"#A9A9A9",darkgrey:"#A9A9A9",darkgreen:"#006400",darkkhaki:"#BDB76B",darkmagenta:"#8B008B",darkolivegreen:"#556B2F",darkorange:"#FF8C00",darkorchid:"#9932CC",darkred:"#8B0000",darksalmon:"#E9967A",darkseagreen:"#8FBC8F",darkslateblue:"#483D8B",darkslategray:"#2F4F4F",darkslategrey:"#2F4F4F",darkturquoise:"#00CED1",darkviolet:"#9400D3",deeppink:"#FF1493",deepskyblue:"#00BFFF",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1E90FF",firebrick:"#B22222",floralwhite:"#FFFAF0",forestgreen:"#228B22",fuchsia:"#FF00FF",gainsboro:"#DCDCDC",ghostwhite:"#F8F8FF",gold:"#FFD700",goldenrod:"#DAA520",gray:"#808080",grey:"#808080",green:"#008000",greenyellow:"#ADFF2F",honeydew:"#F0FFF0",hotpink:"#FF69B4","indianred ":"#CD5C5C","indigo ":"#4B0082",ivory:"#FFFFF0",khaki:"#F0E68C",lavender:"#E6E6FA",lavenderblush:"#FFF0F5",lawngreen:"#7CFC00",lemonchiffon:"#FFFACD",lightblue:"#ADD8E6",lightcoral:"#F08080",lightcyan:"#E0FFFF",lightgoldenrodyellow:"#FAFAD2",lightgray:"#D3D3D3",lightgrey:"#D3D3D3",lightgreen:"#90EE90",lightpink:"#FFB6C1",lightsalmon:"#FFA07A",lightseagreen:"#20B2AA",lightskyblue:"#87CEFA",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#B0C4DE",lightyellow:"#FFFFE0",lime:"#00FF00",limegreen:"#32CD32",linen:"#FAF0E6",magenta:"#FF00FF",maroon:"#800000",mediumaquamarine:"#66CDAA",mediumblue:"#0000CD",mediumorchid:"#BA55D3",mediumpurple:"#9370DB",mediumseagreen:"#3CB371",mediumslateblue:"#7B68EE",mediumspringgreen:"#00FA9A",mediumturquoise:"#48D1CC",mediumvioletred:"#C71585",midnightblue:"#191970",mintcream:"#F5FFFA",mistyrose:"#FFE4E1",moccasin:"#FFE4B5",navajowhite:"#FFDEAD",navy:"#000080",oldlace:"#FDF5E6",olive:"#808000",olivedrab:"#6B8E23",orange:"#FFA500",orangered:"#FF4500",orchid:"#DA70D6",palegoldenrod:"#EEE8AA",palegreen:"#98FB98",paleturquoise:"#AFEEEE",palevioletred:"#DB7093",papayawhip:"#FFEFD5",peachpuff:"#FFDAB9",peru:"#CD853F",pink:"#FFC0CB",plum:"#DDA0DD",powderblue:"#B0E0E6",purple:"#800080",rebeccapurple:"#663399",red:"#FF0000",rosybrown:"#BC8F8F",royalblue:"#4169E1",saddlebrown:"#8B4513",salmon:"#FA8072",sandybrown:"#F4A460",seagreen:"#2E8B57",seashell:"#FFF5EE",sienna:"#A0522D",silver:"#C0C0C0",skyblue:"#87CEEB",slateblue:"#6A5ACD",slategray:"#708090",slategrey:"#708090",snow:"#FFFAFA",springgreen:"#00FF7F",steelblue:"#4682B4",tan:"#D2B48C",teal:"#008080",thistle:"#D8BFD8",tomato:"#FF6347",turquoise:"#40E0D0",violet:"#EE82EE",wheat:"#F5DEB3",white:"#FFFFFF",whitesmoke:"#F5F5F5",yellow:"#FFFF00",yellowgreen:"#9ACD32"};function a(t,e,s){return t=+t,isNaN(t)||e>t?e:t>s?s:t}function l(t,e){return null==t?e:t}function c(t,e,s){var r=[a(t,0,255),a(e,0,255),a(s,0,255)];return"#"+("000000"+((t=r[0])<<16|(e=r[1])<<8|(s=r[2])).toString(16)).slice(-6)}function p(t,e,s){var r=void 0,o=void 0,i=void 0,n=[a(t,0,360)/360,a(e,0,100)/100,a(s,0,100)/100];if(t=n[0],s=n[2],0==(e=n[1]))r=o=i=s;else{var l=function(t,e,s){return 0>s&&(s+=1),s>1&&(s-=1),1/6>s?t+6*(e-t)*s:.5>s?e:2/3>s?t+(e-t)*(2/3-s)*6:t},c=.5>s?s*(1+e):s+e-s*e,p=2*s-c;r=l(p,c,t+1/3),o=l(p,c,t),i=l(p,c,t-1/3)}return[255*r,255*o,255*i].map(Math.round)}function u(t,e,s){var r=[a(t,0,255)/255,a(e,0,255)/255,a(s,0,255)/255];t=r[0],e=r[1],s=r[2];var o=Math.max(t,e,s),i=Math.min(t,e,s),n=void 0,l=void 0,c=(o+i)/2;if(o==i)n=l=0;else{var p=o-i;switch(l=c>.5?p/(2-o-i):p/(o+i),o){case t:n=(e-s)/p+(s>e?6:0);break;case e:n=(s-t)/p+2;break;case s:n=(t-e)/p+4}n/=6}return[360*n,100*l,100*c].map(Math.round)}function f(t,e,s){return t<<16|e<<8|s}function b(t){if(t){var e=n[t.toString().toLowerCase()],s=/^\s*#?((([0-9A-F])([0-9A-F])([0-9A-F]))|(([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})))\s*$/i.exec(e||t)||[],o=r(s,10),i=o[3],a=o[4],l=o[5],c=o[7],p=o[8],u=o[9];if(void 0!==i)return[parseInt(i+i,16),parseInt(a+a,16),parseInt(l+l,16)];if(void 0!==c)return[parseInt(c,16),parseInt(p,16),parseInt(u,16)]}}function d(t){if(t){var e=n[t.toString().toLowerCase()],s=/^\s*#?((([0-9A-F])([0-9A-F])([0-9A-F])([0-9A-F])?)|(([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})?))\s*$/i.exec(e||t)||[],o=r(s,12),i=o[3],a=o[4],l=o[5],c=o[6],p=o[8],u=o[9],f=o[10],b=o[11];if(void 0!==i)return[parseInt(i+i,16),parseInt(a+a,16),parseInt(l+l,16),c?+(parseInt(c+c,16)/255).toFixed(2):1];if(void 0!==p)return[parseInt(p,16),parseInt(u,16),parseInt(f,16),b?+(parseInt(b,16)/255).toFixed(2):1]}}function h(t){if(t){var e=/^rgb\((\d+)[\s,](\d+)[\s,](\d+)\)/i.exec(t)||[],s=r(e,4),o=s[2],i=s[3];return s[0]?[a(s[1],0,255),a(o,0,255),a(i,0,255)]:void 0}}function x(t){if(t){var e=/^rgba?\((\d+)\s*[\s,]\s*(\d+)\s*[\s,]\s*(\d+)(\s*[\s,]\s*(\d*(.\d+)?))?\)/i.exec(t)||[],s=r(e,6),o=s[2],i=s[3],n=s[5];return s[0]?[a(s[1],0,255),a(o,0,255),a(i,0,255),a(l(n,1),0,1)]:void 0}}function g(t){if(Array.isArray(t))return[a(t[0],0,255),a(t[1],0,255),a(t[2],0,255),a(l(t[3],1),0,1)];var e=d(t)||x(t);return e&&3===e.length&&e.push(1),e}function v(t){if(t){var e=/^hsl\((\d+)[\s,](\d+)[\s,](\d+)\)/i.exec(t)||[],s=r(e,4),o=s[2],i=s[3];return s[0]?[a(s[1],0,360),a(o,0,100),a(i,0,100)]:void 0}}function y(t){if(t){var e=/^hsla?\((\d+)\s*[\s,]\s*(\d+)\s*[\s,]\s*(\d+)(\s*[\s,]\s*(\d*(.\d+)?))?\)/i.exec(t)||[],s=r(e,6),o=s[2],i=s[3],n=s[5];return s[0]?[a(s[1],0,255),a(o,0,255),a(i,0,255),a(l(n,1),0,1)]:void 0}}function m(t){if(Array.isArray(t))return[a(t[0],0,360),a(t[1],0,100),a(t[2],0,100),a(l(t[3],1),0,1)];var e=y(t);return e&&3===e.length&&e.push(1),e}function w(t,e){switch(e){case"rgb":default:return t.slice(0,3);case"rgbcss":return"rgb("+t[0]+", "+t[1]+", "+t[2]+")";case"rgbcss4":return"rgb("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")";case"rgba":return t;case"rgbacss":return"rgba("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")";case"hsl":return u.apply(void 0,i(t));case"hslcss":return"hsl("+(t=u.apply(void 0,i(t)))[0]+", "+t[1]+", "+t[2]+")";case"hslcss4":var s=u.apply(void 0,i(t));return"hsl("+s[0]+", "+s[1]+", "+s[2]+", "+t[3]+")";case"hsla":return[].concat(i(u.apply(void 0,i(t))),[t[3]]);case"hslacss":var r=u.apply(void 0,i(t));return"hsla("+r[0]+", "+r[1]+", "+r[2]+", "+t[3]+")";case"hex":return c.apply(void 0,i(t));case"hexcss4":return c.apply(void 0,i(t))+("00"+parseInt(255*t[3]).toString(16)).slice(-2);case"int":return f.apply(void 0,i(t))}}e.COLOR_NAMES=n,e.PALETTE_MATERIAL_500=["#F44336","#E91E63","#E91E63","#9C27B0","#9C27B0","#673AB7","#673AB7","#3F51B5","#3F51B5","#2196F3","#2196F3","#03A9F4","#03A9F4","#00BCD4","#00BCD4","#009688","#009688","#4CAF50","#4CAF50","#8BC34A","#8BC34A","#CDDC39","#CDDC39","#FFEB3B","#FFEB3B","#FFC107","#FFC107","#FF9800","#FF9800","#FF5722","#FF5722","#795548","#795548","#9E9E9E","#9E9E9E","#607D8B","#607D8B"],e.PALETTE_MATERIAL_CHROME=["#f44336","#e91e63","#9c27b0","#673ab7","#3f51b5","#2196f3","#03a9f4","#00bcd4","#009688","#4caf50","#8bc34a","#cddc39","#ffeb3b","#ffc107","#ff9800","#ff5722","#795548","#9e9e9e","#607d8b"],e.rgbToHex=c,e.hslToRgb=p,e.rgbToHsl=u,e.rgbToHsv=function(t,e,s){var r=[a(t,0,255)/255,a(e,0,255)/255,a(s,0,255)/255];t=r[0],e=r[1],s=r[2];var o,i=Math.max(t,e,s),n=Math.min(t,e,s),l=void 0,c=i,p=i-n;if(o=0===i?0:p/i,i==n)l=0;else{switch(i){case t:l=(e-s)/p+(s>e?6:0);break;case e:l=(s-t)/p+2;break;case s:l=(t-e)/p+4}l/=6}return[l,o,c]},e.rgbToInt=f,e.intToRgb=function(t){return[t>>16&255,t>>8&255,255&t]},e.cssColorToRgb=b,e.cssColorToRgba=d,e.cssRgbToRgb=h,e.cssRgbaToRgba=x,e.parseColorToRgb=function(t){return Array.isArray(t)?t=[a(t[0],0,255),a(t[1],0,255),a(t[2],0,255)]:b(t)||h(t)},e.parseColorToRgba=g,e.cssHslToHsl=v,e.cssHslaToHsla=y,e.parseColorToHsl=function(t){return Array.isArray(t)?t=[a(t[0],0,360),a(t[1],0,100),a(t[2],0,100)]:v(t)},e.parseColorToHsla=m,e.parseColor=function(t,e){if(e=e||"rgb",null!=t){var s=void 0;if((s=g(t))||(s=m(t))&&(s=[].concat(i(p.apply(void 0,i(s))),[s[3]])))return(0,o.default)(e)?["rgb","rgbcss","rgbcss4","rgba","rgbacss","hsl","hslcss","hslcss4","hsla","hslacss","hex","hexcss4","int"].reduce((function(t,e){return t[e]=w(s,e),t}),e||{}):w(s,e.toString().toLowerCase())}},e.getLuminance=function(t,e,s){return.2126*(t=.03928>(t/=255)?t/12.92:Math.pow((t+.055)/1.055,2.4))+.7152*(e=.03928>(e/=255)?e/12.92:Math.pow((e+.055)/1.055,2.4))+.0722*(.03928>(s/=255)?s/12.92:Math.pow((s+.055)/1.055,2.4))},e.limit=a,e.ensureArray=function(t){return t?Array.from(t):[]},e.nvl=l},function(t,e,s){"use strict";t.exports=function(t){return null!=t&&"object"==typeof t&&!1===Array.isArray(t)}},function(t,e){t.exports='<div class="a-color-picker-row a-color-picker-stack a-color-picker-row-top"> <canvas class="a-color-picker-sl a-color-picker-transparent"></canvas> <div class=a-color-picker-dot></div> </div> <div class=a-color-picker-row> <div class="a-color-picker-stack a-color-picker-transparent a-color-picker-circle"> <div class=a-color-picker-preview> <input class=a-color-picker-clipbaord type=text> </div> </div> <div class=a-color-picker-column> <div class="a-color-picker-cell a-color-picker-stack"> <canvas class=a-color-picker-h></canvas> <div class=a-color-picker-dot></div> </div> <div class="a-color-picker-cell a-color-picker-alpha a-color-picker-stack" show-on-alpha> <canvas class="a-color-picker-a a-color-picker-transparent"></canvas> <div class=a-color-picker-dot></div> </div> </div> </div> <div class="a-color-picker-row a-color-picker-hsl" show-on-hsl> <label>H</label> <input nameref=H type=number maxlength=3 min=0 max=360 value=0> <label>S</label> <input nameref=S type=number maxlength=3 min=0 max=100 value=0> <label>L</label> <input nameref=L type=number maxlength=3 min=0 max=100 value=0> </div> <div class="a-color-picker-row a-color-picker-rgb" show-on-rgb> <label>R</label> <input nameref=R type=number maxlength=3 min=0 max=255 value=0> <label>G</label> <input nameref=G type=number maxlength=3 min=0 max=255 value=0> <label>B</label> <input nameref=B type=number maxlength=3 min=0 max=255 value=0> </div> <div class="a-color-picker-row a-color-picker-rgbhex a-color-picker-single-input" show-on-single-input> <label>HEX</label> <input nameref=RGBHEX type=text select-on-focus> </div> <div class="a-color-picker-row a-color-picker-palette"></div>'},function(t,e,s){var r=s(6);t.exports="string"==typeof r?r:r.toString()},function(t,e,s){(t.exports=s(7)(!1)).push([t.i,"/*!\n * a-color-picker\n * https://github.com/narsenico/a-color-picker\n *\n * Copyright (c) 2017-2018, Gianfranco Caldi.\n * Released under the MIT License.\n */.a-color-picker{background-color:#fff;padding:0;display:inline-flex;flex-direction:column;user-select:none;width:232px;font:400 10px Helvetica,Arial,sans-serif;border-radius:3px;box-shadow:0 0 0 1px rgba(0,0,0,.05),0 2px 4px rgba(0,0,0,.25)}.a-color-picker,.a-color-picker-row,.a-color-picker input{box-sizing:border-box}.a-color-picker-row{padding:15px;display:flex;flex-direction:row;align-items:center;justify-content:space-between;user-select:none}.a-color-picker-row-top{padding:0}.a-color-picker-row:not(:first-child){border-top:1px solid #f5f5f5}.a-color-picker-column{display:flex;flex-direction:column}.a-color-picker-cell{flex:1 1 auto;margin-bottom:4px}.a-color-picker-cell:last-child{margin-bottom:0}.a-color-picker-stack{position:relative}.a-color-picker-dot{position:absolute;width:14px;height:14px;top:0;left:0;background:#fff;pointer-events:none;border-radius:50px;z-index:1000;box-shadow:0 1px 2px rgba(0,0,0,.75)}.a-color-picker-a,.a-color-picker-h,.a-color-picker-sl{cursor:cell}.a-color-picker-a+.a-color-picker-dot,.a-color-picker-h+.a-color-picker-dot{top:-2px}.a-color-picker-a,.a-color-picker-h{border-radius:2px}.a-color-picker-preview{box-sizing:border-box;width:30px;height:30px;user-select:none;border-radius:15px}.a-color-picker-circle{border-radius:50px;border:1px solid #eee}.a-color-picker-hsl,.a-color-picker-rgb,.a-color-picker-single-input{justify-content:space-evenly}.a-color-picker-hsl>label,.a-color-picker-rgb>label,.a-color-picker-single-input>label{padding:0 8px;flex:0 0 auto;color:#969696}.a-color-picker-hsl>input,.a-color-picker-rgb>input,.a-color-picker-single-input>input{text-align:center;padding:2px 0;width:0;flex:1 1 auto;border:1px solid #e0e0e0;line-height:20px}.a-color-picker-hsl>input::-webkit-inner-spin-button,.a-color-picker-rgb>input::-webkit-inner-spin-button,.a-color-picker-single-input>input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.a-color-picker-hsl>input:focus,.a-color-picker-rgb>input:focus,.a-color-picker-single-input>input:focus{border-color:#04a9f4;outline:none}.a-color-picker-transparent{background-image:linear-gradient(-45deg,#cdcdcd 25%,transparent 0),linear-gradient(45deg,#cdcdcd 25%,transparent 0),linear-gradient(-45deg,transparent 75%,#cdcdcd 0),linear-gradient(45deg,transparent 75%,#cdcdcd 0);background-size:11px 11px;background-position:0 0,0 -5.5px,-5.5px 5.5px,5.5px 0}.a-color-picker-sl{border-radius:3px 3px 0 0}.a-color-picker.hide-alpha [show-on-alpha],.a-color-picker.hide-hsl [show-on-hsl],.a-color-picker.hide-rgb [show-on-rgb],.a-color-picker.hide-single-input [show-on-single-input]{display:none}.a-color-picker-clipbaord{width:100%;height:100%;opacity:0;cursor:pointer}.a-color-picker-palette{flex-flow:wrap;flex-direction:row;justify-content:flex-start;padding:10px}.a-color-picker-palette-color{width:15px;height:15px;flex:0 1 15px;margin:3px;box-sizing:border-box;cursor:pointer;border-radius:3px;box-shadow:inset 0 0 0 1px rgba(0,0,0,.1)}.a-color-picker-palette-add{text-align:center;line-height:13px;color:#607d8b}.a-color-picker.hidden{display:none}",""])},function(t,e){t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var s=function(t,e){var s=t[1]||"",r=t[3];if(!r)return s;if(e&&"function"==typeof btoa){var o=function(t){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(t))))+" */"}(r),i=r.sources.map((function(t){return"/*# sourceURL="+r.sourceRoot+t+" */"}));return[s].concat(i).concat([o]).join("\n")}return[s].join("\n")}(e,t);return e[2]?"@media "+e[2]+"{"+s+"}":s})).join("")},e.i=function(t,s){"string"==typeof t&&(t=[[null,t,""]]);for(var r={},o=0;this.length>o;o++){var i=this[o][0];"number"==typeof i&&(r[i]=!0)}for(o=0;t.length>o;o++){var n=t[o];"number"==typeof n[0]&&r[n[0]]||(s&&!n[2]?n[2]=s:s&&(n[2]="("+n[2]+") and ("+s+")"),e.push(n))}},e}}])},88572:function(t,e,s){"use strict";function r(t){return r="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},r(t)}function o(t,e,s){var o=s.value;if("function"!=typeof o)throw new TypeError("@boundMethod decorator can only be applied to methods not: ".concat(r(o)));var i=!1;return{configurable:!0,get:function(){if(i||this===t.prototype||this.hasOwnProperty(e)||"function"!=typeof o)return o;var s=o.bind(this);return i=!0,Object.defineProperty(this,e,{configurable:!0,get:function(){return s},set:function(t){o=t,delete this[e]}}),i=!1,s},set:function(t){o=t}}}function i(t){var e;return"undefined"!=typeof Reflect&&"function"==typeof Reflect.ownKeys?e=Reflect.ownKeys(t.prototype):(e=Object.getOwnPropertyNames(t.prototype),"function"==typeof Object.getOwnPropertySymbols&&(e=e.concat(Object.getOwnPropertySymbols(t.prototype)))),e.forEach((function(e){if("constructor"!==e){var s=Object.getOwnPropertyDescriptor(t.prototype,e);"function"==typeof s.value&&Object.defineProperty(t.prototype,e,o(t,e,s))}})),t}function n(){return 1===arguments.length?i.apply(void 0,arguments):o.apply(void 0,arguments)}s.r(e),s.d(e,{boundClass:function(){return i},boundMethod:function(){return o},default:function(){return n}})},27618:function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UIRange=void 0;var r=s(70655);s(74054);var o=s(98440),i=s(51923),n=s(16892),a=s(88572),l=function(t){function e(e,s){var i=t.call(this,e,r.__assign(r.__assign({},s),{type:"hidden"}))||this;return i.state=r.__assign(r.__assign({},o.UIInput.defaultState),{min:0,max:100}),i.startValue=0,i.startX=0,i.width=100,Object.assign(i.state,s),i.appendUIRange(),i.onChangeSelfValue(),i}return r.__extends(e,t),e.prototype.className=function(){return"UIRange"},e.prototype.appendUIRange=function(){var t=this.j.create.div(this.getFullElName("slider"));this.container.appendChild(t);var e=this.j.create.div(this.getFullElName("handle"));t.appendChild(e);var s=this.j.create.div(this.getFullElName("log")),r=this.getElm("label");(0,n.assert)(null!=r,"label element does not exists"),r.appendChild(s)},e.prototype.onDragStart=function(t){this.startValue=parseFloat(this.value)||0,this.startX=t.clientX;var e=this.getElm("slider");(0,n.assert)(null!=e,"slider element does not exists"),this.width=e.offsetWidth,this.j.e.on(this.j.ow,"mousemove",this.onDrag)},e.prototype.onDrag=function(t){var e=this.state,s=e.min,r=e.max,o=this.startValue+(t.clientX-this.startX)/this.width*(this.state.max-this.state.min);s>o&&(o=s),o>r&&(o=r),this.value=o.toString()},e.prototype.onDragEnd=function(){this.j.e.off(this.j.ow,"mousemove",this.onDrag)},e.prototype.onChangeSelfValue=function(){var t=this.getElm("handle"),e=parseFloat(this.value)||0;(0,n.assert)(null!=t,"Handle element does not exist"),(0,n.css)(t,{left:(e-this.state.min)/(this.state.max-this.state.min)*100+"%"});var s=this.getElm("log");(0,n.assert)(null!=s,"log element does not exist"),s.innerText=e.toString()},e.prototype.destruct=function(){return this.onDragEnd(),t.prototype.destruct.call(this)},r.__decorate([(0,i.watch)(["handle:mousedown","handle:touchstart"])],e.prototype,"onDragStart",null),r.__decorate([a.default],e.prototype,"onDrag",null),r.__decorate([(0,i.watch)(["j.ow:mouseup","j.ow:touchend"])],e.prototype,"onDragEnd",null),r.__decorate([(0,i.watch)(":change")],e.prototype,"onChangeSelfValue",null),r.__decorate([i.component],e)}(o.UIInput);e.UIRange=l},24074:function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.buttonGenerator=void 0;var r=s(70655),o=s(43464),i=s(97029),n=s(51923),a=s(48310),l=s(12815),c=s(24697),p=s(22739);s(44559);var u=s(38652),f=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.hasStyle=!i.Jodit.fatMode,e.requires=["license","color-picker"],e.buttons=[{group:"form",name:"buttonGenerator"}],e}return r.__extends(e,t),e.prototype.afterInit=function(t){var e=this;t.e.on("toggleButtonGenerator",this.toggleButtonGenerator).on("isButtonGeneratorOpened",(function(){var t;return null===(t=e.__dialog)||void 0===t?void 0:t.isOpened}))},e.prototype.toggleButtonGenerator=function(t){var e=this;this.__dialog||(this.__dialog=new a.Dialog({language:this.j.o.language,theme:this.j.o.theme}),this.__ui=new p.UIButtonGenerator(this.__dialog),this.__dialog.setHeader("Button Generator").setContent(this.__ui).setSize(730,700)),t&&!l.Dom.isTag(t,["button","a"])&&(t=void 0);var s=this.__ui,r=this.__dialog;r.isOpened?r.close():(t&&u.UIGButton.extractStyle(s.state,t),s.target=t,s.update(),r.setFooter([(0,c.Button)(r,"cancel","Cancel","default").onAction((function(){return r.close()})),(0,c.Button)(r,"ok",t?"Update":"Insert","primary").onAction((function(){t||(t=e.j.createInside.element(s.state.href?"a":"button"),e.j.s.insertNode(t,!0,!1)),u.UIGButton.applyStyle(s.state,t),t.className=s.state.className||"",e.jodit.e.fire("synchro"),r.close()}))]).open())},e.prototype.onDblClick=function(t){l.Dom.isTag(t.target,"button")&&this.toggleButtonGenerator(t.target)},e.prototype.beforeDestruct=function(t){var e;null===(e=this.__dialog)||void 0===e||e.destruct()},r.__decorate([n.autobind],e.prototype,"toggleButtonGenerator",null),r.__decorate([(0,n.watch)(":dblclick")],e.prototype,"onDblClick",null),e}(o.Plugin);e.buttonGenerator=f,i.Jodit.plugins.add("button-generator",f)},44559:function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=s(733),o=s(74699);r.Config.prototype.controls.buttonGenerator={tooltip:"Button generator",icon:s(273),isActive:function(t){return Boolean(t.e.fire("isButtonGeneratorOpened"))},exec:function(t,e){t.e.fire("toggleButtonGenerator",e)}},r.Config.prototype.popup.button=["buttonGenerator"],(0,o.isArray)(r.Config.prototype.popup.a)&&r.Config.prototype.popup.a.push("buttonGenerator")},38652:function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UIGButton=void 0;var r=s(70655);s(74852);var o=s(98440),i=s(16892),n=s(51923),a=s(74699),l=s(16892),c=function(t){function e(e,s){var r=t.call(this,e)||this;return r.style=s,r}var s;return r.__extends(e,t),s=e,e.prototype.className=function(){return"UIGButton"},e.prototype.updateStyles=function(){var t=this.style,e=this.getElm("button");(0,l.assert)(null!=e,"button element does not exist");var r=this.getElm("wrapper");(0,l.assert)(null!=r,"wrapper element does not exist"),r.style.backgroundColor=t.previewBgColor,s.applyStyle(t,e)},e.applyStyle=function(t,e){var s=function(t){return(0,a.isString)(t)?t:t+"px"};e.innerText=t.text||"css",e.setAttribute("href",t.href),(0,i.css)(e,{background:t.solid?null:"linear-gradient(to bottom, ".concat(t.bgStart," 5%, ").concat(t.bgEnd," 100%)"),backgroundColor:t.bgStart,borderRadius:s(t.borderRadius),border:"".concat(s(t.borderSize)," solid ").concat(t.borderColor),display:"inline-block",cursor:"pointer",color:t.fontColor,fontFamily:t.fontFamily,fontSize:s(t.fontSize),fontWeight:t.fontWeight?"bold":null,fontStyle:t.fontItalic?"italic":null,padding:"".concat(s(t.paddingY)," ").concat(s(t.paddingX)),textDecoration:"none"}),(0,i.css)(e,{textShadow:t.textShadow?[t.textShadowOffsetX,t.textShadowOffsetY,t.textShadowBlurRadius,t.textShadowColor].map(s).join(" "):null}),(0,i.css)(e,{boxShadow:t.boxShadow?[t.boxShadowInset?"inset":"",t.boxShadowOffsetX,t.boxShadowOffsetY,t.boxShadowBlurRadius,t.boxShadowSpreadRadius,t.boxShadowColor].map(s).join(" "):null})},e.prototype.update=function(){this.updateStyles()},e.prototype.render=function(){return"<div>\n\t\t\t<div class='&__wrapper'>\n\t\t\t\t<button class='&__button'>css</button>\n\t\t\t</div>\n\t\t</div>"},e.extractStyle=function(t,e){var s,o,i,n,a=(null===(s=e.ownerDocument.defaultView)||void 0===s?void 0:s.getComputedStyle(e))||{},l=function(t,e,s,r){var o,i=a[s];return!i||["none","inherit","initial","unset"].includes(i)?((o={})[s]=!1,o):(i.replace(/,\s/g,",").split(/\s+/).forEach((function(s){if(/[0-9.]+(px|pt|em|%)/.test(s)){var o=t.shift();o&&(e[o]=s)}else"inset"===s?e.boxShadowInset=!0:e[r]=s})),e[s]=!0,e)};Object.assign(t,r.__assign(r.__assign(r.__assign(r.__assign(r.__assign({text:e.innerText,className:e.className,href:e.getAttribute("href")||""},function(){var t,e,s={solid:!0,bgStart:null!==(t=a.backgroundColor)&&void 0!==t?t:"#44c767",bgEnd:null!==(e=a.backgroundColor)&&void 0!==e?e:"#44c767"},r=a.backgroundImage;if(r&&/linear-gradient/.test(r)){var o=/linear-gradient\((.+)\s+[0-9]+%,\s+(.+)\s+[0-9]+%\)/.exec(r);o&&(s.solid=!1,s.bgStart=o[1]||s.bgStart,s.bgEnd=o[2]||"#5cbf2a")}return s}()),{borderColor:null!==(o=null==a?void 0:a.borderColor)&&void 0!==o?o:"#18ab29",borderRadius:null!==(i=null==a?void 0:a.borderRadius)&&void 0!==i?i:0,borderSize:null!==(n=null==a?void 0:a.borderWidth)&&void 0!==n?n:1}),l(["boxShadowOffsetX","boxShadowOffsetY","boxShadowBlurRadius","boxShadowSpreadRadius"],{boxShadowBlurRadius:0,boxShadowColor:"#3dc21b",boxShadowInset:!1,boxShadowOffsetX:0,boxShadowOffsetY:0,boxShadowSpreadRadius:0},"boxShadow","boxShadowColor")),{fontColor:a.color,fontFamily:a.fontFamily,fontSize:a.fontSize,fontWeight:"bold"===a.fontWeight,fontItalic:"italic"===a.fontStyle,paddingX:a.paddingLeft,paddingY:a.paddingTop}),l(["textShadowOffsetX","textShadowOffsetY","textShadowBlurRadius"],{textShadowBlurRadius:0,textShadowColor:"#2f6627",textShadowOffsetX:0,textShadowOffsetY:1},"textShadow","textShadowColor")))},r.__decorate([(0,n.watch)("style")],e.prototype,"updateStyles",null),s=r.__decorate([n.component],e)}(o.UIElement);e.UIGButton=c},70610:function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UIFormButtonGenerator=void 0;var r=s(70655);s(66219);var o=s(98440),i=s(62507),n=s(12815),a=s(27618),l=s(52378),c=function(t){function e(e,s,r){var l=t.call(this,e)||this;l.state=s,l.updateState=r,l.onUpdates=[];var c=function(t,e){return function(){var s=l.state[e.name];/px/.test(s.toString())&&(s=s.toString().replace(/px/,"")),s.toString()!==t.value&&(t.value=s)}};return(0,i.toArray)(l.container.querySelectorAll("input,select")).forEach((function(t){if(n.Dom.isTag(t,"select")){var e=new o.UISelect(l.j,{options:(0,i.toArray)(t.options).map((function(t){return{text:t.innerText,value:t.value}})),onChange:function(e){l.updateState(t.name,e)}});return n.Dom.replace(t,e.container,l.j.create,!1,!0),void l.onUpdates.push(c(e,t))}if(n.Dom.isTag(t,"input"))switch(t.type){case"range":return e=new a.UIRange(l.j,{label:t.placeholder,name:t.name,min:parseInt(t.min,0)||0,max:parseInt(t.max,0)||100,onChange:function(e){l.updateState(t.name,parseInt(e,10))}}),n.Dom.replace(t,e.container,l.j.create),void l.onUpdates.push(c(e,t));case"text":return e=new o.UIInput(l.j,{placeholder:t.placeholder,name:t.name,onChange:function(e){l.updateState(t.name,e)}}),n.Dom.replace(t,e.container,l.j.create),void l.onUpdates.push(c(e,t));case"checkbox":return t.onchange=function(){return l.updateState(t.name,t.checked)},void l.onUpdates.push((function(){t.checked=l.state[t.name]}))}})),l.update(),l}return r.__extends(e,t),e.prototype.className=function(){return"UIFormButtonGenerator"},e.prototype.update=function(){this.onUpdates.forEach((function(t){return t()}));var t=this.getElm("box-shadow");(0,l.assert)(null!=t,"box-shadow does not exists");var e=this.getElm("text-shadow");(0,l.assert)(null!=e,"text-shadow does not exists"),t.style.display=this.state.boxShadow?"":"none",e.style.display=this.state.textShadow?"":"none"},e.prototype.render=function(){return"<div>\n\t\t\t<div class='&__group &__text'>\n\t\t\t\t<div class='&__title'>Text</div>\n\t\t\t\t<div class='&__row'>\n\t\t\t\t\t<div class='&__col'>\n\t\t\t\t\t\t<inpu