From bdd74b323db5fdb402fc1f50c5bac42164f5386d Mon Sep 17 00:00:00 2001 From: easylogic Date: Mon, 10 Jun 2019 19:38:44 +0900 Subject: [PATCH] Refactoring... --- docs/bundle.css | 240 +---- docs/bundle.css.gz | Bin 0 -> 15072 bytes docs/index.html.gz | Bin 0 -> 595 bytes docs/main.js | 2 +- docs/main.js.gz | Bin 0 -> 85734 bytes package.json | 3 +- src/assets/app/manifest.json | 4 +- src/assets/extension/manifest.json | 4 +- src/colorpicker/BaseColorPicker.js | 10 +- src/colorpicker/BaseSlider.js | 4 +- src/csseditor/ui/control/Inspector.js | 133 ++- src/csseditor/ui/control/VerticalColorStep.js | 11 +- .../control/panel/items/element/UnitRange.js | 114 --- .../control/panel/property/OutlineProperty.js | 3 - .../control/popup/BackgroundPropertyPopup.js | 143 +-- .../property-editor/BackgroundImageEditor.js | 8 +- .../shape/property-editor/RangeEditor.js | 25 +- .../shape/property-editor/VarEditor.js | 2 +- src/csseditor/ui/icon/build.js | 1 + src/csseditor/ui/icon/code.js | 1 + src/csseditor/ui/icon/icon.js | 5 + .../ui/view/menu-items/ExportCodePen.js | 26 +- .../ui/view/menu-items/ExportJSFiddle.js | 27 +- src/editor/Document.js | 97 -- src/editor/css-property/BackdropFilter.js | 290 ------ src/editor/css-property/Filter.js | 32 +- src/editor/css-property/index.js | 2 - src/editor/items/DomItem.js | 8 +- src/editor/unit/Length.js | 4 +- src/scss/csseditor/layout.scss | 38 +- src/scss/csseditor/popup.scss | 44 +- src/scss/csseditor/property-view.scss | 70 -- src/scss/csseditor/range-editor.scss | 9 +- src/util/Blender.js | 29 - src/util/Canvas.js | 129 --- src/util/Color.js | 4 +- src/util/ImageFilter.js | 9 - src/util/Kmeans.js | 239 ----- src/util/Matrix.js | 196 ---- src/util/State.js | 51 - src/util/animation/Animation.js | 15 - src/util/animation/KeyFrames.js | 91 -- src/util/animation/Scale.js | 91 -- src/util/animation/Timers.js | 204 ---- src/util/animation/Timing.js | 73 -- src/util/animation/TimingTypes.js | 70 -- src/util/animation/ValueGenerator.js | 28 - src/util/blend/composite.js | 124 --- src/util/blend/non-separable.js | 118 --- src/util/blend/separable.js | 76 -- src/util/css/make.js | 912 +----------------- src/util/css/types.js | 338 ------- src/util/filter/StackBlur.js | 780 --------------- src/util/filter/functions.js | 898 ----------------- src/util/filter/image/crop.js | 16 - src/util/filter/image/flipH.js | 23 - src/util/filter/image/flipV.js | 25 - src/util/filter/image/histogram.js | 45 - src/util/filter/image/index.js | 18 - src/util/filter/image/resize.js | 18 - src/util/filter/image/rotate.js | 39 - src/util/filter/image/rotateDegree.js | 54 -- src/util/filter/index.js | 11 - src/util/filter/matrix/blur.js | 12 - src/util/filter/matrix/emboss.js | 17 - src/util/filter/matrix/gaussian-blur-5x.js | 17 - src/util/filter/matrix/gaussian-blur.js | 16 - src/util/filter/matrix/grayscale2.js | 16 - src/util/filter/matrix/index.js | 58 -- src/util/filter/matrix/kirsch-horizontal.js | 13 - src/util/filter/matrix/kirsch-vertical.js | 13 - src/util/filter/matrix/laplacian-5x.js | 16 - src/util/filter/matrix/laplacian.js | 14 - src/util/filter/matrix/motion-blur-2.js | 18 - src/util/filter/matrix/motion-blur-3.js | 19 - src/util/filter/matrix/motion-blur.js | 18 - src/util/filter/matrix/negative.js | 16 - src/util/filter/matrix/normal.js | 11 - src/util/filter/matrix/sepia2.js | 16 - src/util/filter/matrix/sharpen.js | 14 - src/util/filter/matrix/sobel-horizontal.js | 11 - src/util/filter/matrix/sobel-vertical.js | 11 - src/util/filter/matrix/stack-blur.js | 15 - src/util/filter/matrix/transparency.js | 16 - src/util/filter/matrix/unsharp-masking.js | 16 - src/util/filter/multi/index.js | 9 - src/util/filter/multi/kirsch.js | 7 - src/util/filter/multi/sobel.js | 7 - src/util/filter/multi/vintage.js | 7 - src/util/filter/pixel/bitonal.js | 24 - src/util/filter/pixel/brightness.js | 18 - src/util/filter/pixel/brownie.js | 22 - src/util/filter/pixel/clip.js | 21 - src/util/filter/pixel/contrast.js | 18 - src/util/filter/pixel/gamma.js | 13 - src/util/filter/pixel/gradient.js | 52 - src/util/filter/pixel/grayscale.js | 27 - src/util/filter/pixel/hue.js | 28 - src/util/filter/pixel/index.js | 52 - src/util/filter/pixel/invert.js | 16 - src/util/filter/pixel/kodachrome.js | 23 - src/util/filter/pixel/matrix.js | 28 - src/util/filter/pixel/noise.js | 24 - src/util/filter/pixel/opacity.js | 14 - src/util/filter/pixel/polaroid.js | 22 - src/util/filter/pixel/saturation.js | 30 - src/util/filter/pixel/sepia.js | 28 - src/util/filter/pixel/shade.js | 21 - src/util/filter/pixel/shift.js | 22 - src/util/filter/pixel/solarize.js | 23 - src/util/filter/pixel/technicolor.js | 22 - src/util/filter/pixel/threshold-color.js | 35 - src/util/filter/pixel/threshold.js | 7 - src/util/filter/pixel/tint.js | 20 - src/util/functions/func.js | 3 +- src/util/functions/image.js | 157 --- src/util/index.js | 14 +- webpack.config.js | 5 +- 118 files changed, 345 insertions(+), 6931 deletions(-) create mode 100644 docs/bundle.css.gz create mode 100644 docs/index.html.gz create mode 100644 docs/main.js.gz delete mode 100644 src/csseditor/ui/control/panel/items/element/UnitRange.js create mode 100644 src/csseditor/ui/icon/build.js create mode 100644 src/csseditor/ui/icon/code.js delete mode 100644 src/editor/Document.js delete mode 100644 src/editor/css-property/BackdropFilter.js delete mode 100644 src/util/Blender.js delete mode 100644 src/util/Canvas.js delete mode 100644 src/util/ImageFilter.js delete mode 100644 src/util/Kmeans.js delete mode 100644 src/util/Matrix.js delete mode 100644 src/util/State.js delete mode 100644 src/util/animation/Animation.js delete mode 100644 src/util/animation/KeyFrames.js delete mode 100644 src/util/animation/Scale.js delete mode 100644 src/util/animation/Timers.js delete mode 100644 src/util/animation/Timing.js delete mode 100644 src/util/animation/TimingTypes.js delete mode 100644 src/util/animation/ValueGenerator.js delete mode 100644 src/util/blend/composite.js delete mode 100644 src/util/blend/non-separable.js delete mode 100644 src/util/blend/separable.js delete mode 100644 src/util/filter/StackBlur.js delete mode 100644 src/util/filter/functions.js delete mode 100644 src/util/filter/image/crop.js delete mode 100644 src/util/filter/image/flipH.js delete mode 100644 src/util/filter/image/flipV.js delete mode 100644 src/util/filter/image/histogram.js delete mode 100644 src/util/filter/image/index.js delete mode 100644 src/util/filter/image/resize.js delete mode 100644 src/util/filter/image/rotate.js delete mode 100644 src/util/filter/image/rotateDegree.js delete mode 100644 src/util/filter/index.js delete mode 100644 src/util/filter/matrix/blur.js delete mode 100644 src/util/filter/matrix/emboss.js delete mode 100644 src/util/filter/matrix/gaussian-blur-5x.js delete mode 100644 src/util/filter/matrix/gaussian-blur.js delete mode 100644 src/util/filter/matrix/grayscale2.js delete mode 100644 src/util/filter/matrix/index.js delete mode 100644 src/util/filter/matrix/kirsch-horizontal.js delete mode 100644 src/util/filter/matrix/kirsch-vertical.js delete mode 100644 src/util/filter/matrix/laplacian-5x.js delete mode 100644 src/util/filter/matrix/laplacian.js delete mode 100644 src/util/filter/matrix/motion-blur-2.js delete mode 100644 src/util/filter/matrix/motion-blur-3.js delete mode 100644 src/util/filter/matrix/motion-blur.js delete mode 100644 src/util/filter/matrix/negative.js delete mode 100644 src/util/filter/matrix/normal.js delete mode 100644 src/util/filter/matrix/sepia2.js delete mode 100644 src/util/filter/matrix/sharpen.js delete mode 100644 src/util/filter/matrix/sobel-horizontal.js delete mode 100644 src/util/filter/matrix/sobel-vertical.js delete mode 100644 src/util/filter/matrix/stack-blur.js delete mode 100644 src/util/filter/matrix/transparency.js delete mode 100644 src/util/filter/matrix/unsharp-masking.js delete mode 100644 src/util/filter/multi/index.js delete mode 100644 src/util/filter/multi/kirsch.js delete mode 100644 src/util/filter/multi/sobel.js delete mode 100644 src/util/filter/multi/vintage.js delete mode 100644 src/util/filter/pixel/bitonal.js delete mode 100644 src/util/filter/pixel/brightness.js delete mode 100644 src/util/filter/pixel/brownie.js delete mode 100644 src/util/filter/pixel/clip.js delete mode 100644 src/util/filter/pixel/contrast.js delete mode 100644 src/util/filter/pixel/gamma.js delete mode 100644 src/util/filter/pixel/gradient.js delete mode 100644 src/util/filter/pixel/grayscale.js delete mode 100644 src/util/filter/pixel/hue.js delete mode 100644 src/util/filter/pixel/index.js delete mode 100644 src/util/filter/pixel/invert.js delete mode 100644 src/util/filter/pixel/kodachrome.js delete mode 100644 src/util/filter/pixel/matrix.js delete mode 100644 src/util/filter/pixel/noise.js delete mode 100644 src/util/filter/pixel/opacity.js delete mode 100644 src/util/filter/pixel/polaroid.js delete mode 100644 src/util/filter/pixel/saturation.js delete mode 100644 src/util/filter/pixel/sepia.js delete mode 100644 src/util/filter/pixel/shade.js delete mode 100644 src/util/filter/pixel/shift.js delete mode 100644 src/util/filter/pixel/solarize.js delete mode 100644 src/util/filter/pixel/technicolor.js delete mode 100644 src/util/filter/pixel/threshold-color.js delete mode 100644 src/util/filter/pixel/threshold.js delete mode 100644 src/util/filter/pixel/tint.js delete mode 100644 src/util/functions/image.js diff --git a/docs/bundle.css b/docs/bundle.css index 86287bff9..7250c3cca 100644 --- a/docs/bundle.css +++ b/docs/bundle.css @@ -1405,20 +1405,20 @@ html, body { left: 310px; position: absolute; } -.csseditor .flex-row { +.csseditor .feature-control { display: flex; flex-direction: column; height: 100%; } -.csseditor .flex-row > div { +.csseditor .feature-control > div { flex: 1 1 auto; + position: relative; } -.csseditor .flex-row .fixed { +.csseditor .feature-control > div:last-child { flex: none; - height: 240px; - overflow: auto; + height: 40%; + border-top: 1px solid #cccccc; box-sizing: border-box; - border-bottom: 1px solid #cccccc; } .csseditor .tab { position: absolute; @@ -3273,100 +3273,6 @@ html, body { font-size: 11px; margin-bottom: 2px; } -.csseditor .property > .property-body .property-item .property-item-label, -.csseditor .property > .property-body .property-item .property-item-input-field { - vertical-align: middle; -} -.csseditor .property > .property-body .property-item .property-item-label .tools, -.csseditor .property > .property-body .property-item .property-item-input-field .tools { - padding: 2px; - text-align: right; -} -.csseditor .property > .property-body .property-item .property-item-label button, -.csseditor .property > .property-body .property-item .property-item-input-field button { - -webkit-appearance: none; - -moz-appearance: none; - appearance: none; - background-color: transparent; - border: 0px; - cursor: pointer; - padding: 0px 3px; - outline: none; - vertical-align: middle; -} -.csseditor .property > .property-body .property-item .property-item-label button svg, -.csseditor .property > .property-body .property-item .property-item-input-field button svg { - width: 16px; - height: 16px; -} -.csseditor .property > .property-body .property-item .property-item-label.grid-1-3, -.csseditor .property > .property-body .property-item .property-item-input-field.grid-1-3 { - display: grid; - grid-template-columns: 1fr 3fr; -} -.csseditor .property > .property-body .property-item .property-item-label { - box-sizing: border-box; - padding: 5px; -} -.csseditor .property > .property-body .property-item.grid-0 { - grid-template-columns: 1fr; -} -.csseditor .property > .property-body .property-item.grid-2 { - grid-template-columns: 1fr 3fr; -} -.csseditor .property > .property-body .property-item.grid-4 { - grid-template-columns: 1fr 1fr 1fr 1fr; -} -.csseditor .property > .property-body .property-item.grid-4 .property-item-input-field input { - width: 40px; -} -.csseditor .property > .property-body .property-item.background-color, .csseditor .property > .property-body .property-item.font-color { - grid-template-columns: 1fr; -} -.csseditor .property > .property-body .property-item.background-color .fill-item, .csseditor .property > .property-body .property-item.font-color .fill-item { - display: grid; - height: 24px; - grid-template-columns: 24px auto; - grid-column-gap: 5px; - margin-bottom: 5px; - text-align: center; -} -.csseditor .property > .property-body .property-item.background-color .fill-item .preview, .csseditor .property > .property-body .property-item.font-color .fill-item .preview { - display: inline-block; - height: 100%; - box-sizing: border-box; - cursor: pointer; -} -.csseditor .property > .property-body .property-item.background-color .fill-item .preview .mini-view, .csseditor .property > .property-body .property-item.font-color .fill-item .preview .mini-view { - width: 100%; - height: 100%; - border: 1px solid #cccccc; - position: relative; - border-radius: 100%; - background-color: transparent; - background-image: linear-gradient(45deg, #ccc 25%, transparent 25%), linear-gradient(-45deg, #ccc 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #ccc 75%), linear-gradient(-45deg, transparent 75%, #ccc 75%); - background-size: 10px 10px; - background-position: 0 0, 0 5px, 5px -5px, -5px 0px; -} -.csseditor .property > .property-body .property-item.background-color .fill-item .preview .mini-view .color-view, .csseditor .property > .property-body .property-item.font-color .fill-item .preview .mini-view .color-view { - position: absolute; - left: 0px; - top: 0px; - right: 0px; - bottom: 0px; - border-radius: 100%; -} -.csseditor .property > .property-body .property-item.background-color .fill-item .color-code input, .csseditor .property > .property-body .property-item.font-color .fill-item .color-code input { - width: 100%; - height: 100%; -} -.csseditor .property > .property-body .property-item.background-color .fill-item .opacity-code, .csseditor .property > .property-body .property-item.font-color .fill-item .opacity-code { - display: grid; - grid-template-columns: 1fr 3fr; -} -.csseditor .property > .property-body .property-item.background-color .fill-item .opacity-code input, .csseditor .property > .property-body .property-item.font-color .fill-item .opacity-code input { - width: 100%; -} .csseditor .border-item { display: grid; grid-template-columns: 1fr 3fr; @@ -3658,54 +3564,6 @@ html, body { width: 100%; height: 100%; } -.csseditor .outline-item { - grid-template-columns: 1fr 3fr; - grid-column-gap: 10px; -} -.csseditor .outline-item .input-group { - display: grid; - grid-template-rows: repeat(3, 1fr); -} -.csseditor .outline-item .input-field { - display: grid; - grid-template-columns: 1fr 3fr; - grid-column-gap: 4px; - vertical-align: middle; -} -.csseditor .outline-item .input-field input { - width: 100%; - vertical-align: middle; -} -.csseditor .outline-item .input-field .input-ui { - vertical-align: middle; - display: grid; - grid-template-columns: repeat(2, 1fr); -} -.csseditor .outline-item .input-field .input-ui input { - width: 100%; -} -.csseditor .outline-item .input-field .input-ui .color { - background-color: white; - height: 20px; - width: 20px; - border-radius: 100%; - cursor: pointer; - border: 1px solid #cccccc; - box-sizing: border-box; - position: relative; - background-color: transparent; - background-image: linear-gradient(45deg, #ccc 25%, transparent 25%), linear-gradient(-45deg, #ccc 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #ccc 75%), linear-gradient(-45deg, transparent 75%, #ccc 75%); - background-size: 10px 10px; - background-position: 0 0, 0 5px, 5px -5px, -5px 0px; -} -.csseditor .outline-item .input-field .input-ui .color .color-view { - position: absolute; - left: 0px; - top: 0px; - right: 0px; - bottom: 0px; - border-radius: 100%; -} .csseditor .box-model-item { grid-template-columns: 1fr !important; } @@ -3892,49 +3750,6 @@ html, body { height: 140px; box-sizing: border-box; } -.csseditor .font-item { - margin-bottom: 2px; -} -.csseditor .font-item label { - text-align: right; - vertical-align: middle; - font-size: 13px; - padding-right: 4px; -} -.csseditor .font-item .input { - vertical-align: middle; - display: grid; - grid-template-columns: 1fr 40px 70px; - grid-column-gap: 4px; -} -.csseditor .font-item .input .input-field input, -.csseditor .font-item .input .input-field select { - width: 100%; - outline: none; -} -.csseditor .export-view { - position: absolute; - left: 50%; - bottom: 10px; - width: 50%; - height: 100px; - z-index: 100000; - -webkit-transform: translateX(-30%); - transform: translateX(-30%); -} -.csseditor .export-view .codeview { - position: relative; - width: 100%; - height: 100%; -} -.csseditor .export-view .codeview textarea { - width: 100%; - height: 100%; - display: block; - padding: 10px; - margin: 0px; - background-color: rgba(255, 255, 255, 0.1); -} .csseditor .animation-list { grid-template-columns: 1fr !important; } @@ -4319,12 +4134,18 @@ html, body { display: grid; grid-template-columns: 1fr 50px 50px; grid-column-gap: 2px; + font-size: 13px; +} +.csseditor .range-editor .range-editor-type .area span { + padding: 1px; + box-sizing: border-box; + vertical-align: middle; } .csseditor .range-editor .range-editor-type .area input, .csseditor .range-editor .range-editor-type .area select { width: 100%; } .csseditor .range-editor .range-editor-type[data-type=calc] .area { - grid-template-columns: 50px 1fr; + grid-template-columns: 60px 1fr; } .csseditor .range-editor[data-selected-type=calc] .range-editor-type[data-type=calc] { display: inline-block; @@ -5345,11 +5166,6 @@ html, body { padding: 10px 5px; font-weight: bold; } -.csseditor .popup .popup-content .popup-item { - display: grid; - grid-template-columns: 45px 1fr; - height: 24px; -} .csseditor .popup .popup-content .popup-item label { font-size: 11px; vertical-align: middle; @@ -5361,22 +5177,14 @@ html, body { .csseditor .popup .popup-content .popup-item label + div { vertical-align: middle; } -.csseditor .popup .popup-content .popup-item input[type=range] { - width: 80px; - flex: none; -} -.csseditor .popup .popup-content .popup-item input[type=number] { - width: 40px; - flex: none; - border: 1px solid #cccccc; +.csseditor .popup.background-property-popup { + width: 260px; } -.csseditor .popup .popup-content .popup-item select { - width: 40px; - flex: none; - outline: none; +.csseditor .popup.background-property-popup .popup-content { + padding: 5px; } -.csseditor .popup.background-property-popup { - width: 225px; +.csseditor .popup.background-property-popup .popup-content .popup-item { + margin-bottom: 2px; } .csseditor .popup.background-property-popup .size-list button { -webkit-appearance: none; @@ -5395,6 +5203,11 @@ html, body { background-color: #cccccc; font-weight: bold; } +.csseditor .popup.background-property-popup .popup-item.grid-2 { + display: grid; + grid-template-columns: 60px 1fr; + grid-column-gap: 2px; +} .csseditor .popup.background-property-popup .repeat-list button { width: 24px; height: 24px; @@ -5621,11 +5434,6 @@ html, body { text-align: left; vertical-align: middle; } -.csseditor .popup.animation-property-popup .box input, -.csseditor .popup.animation-property-popup .box select { - width: 100%; - vertical-align: middle; -} .csseditor .popup.animation-property-popup .box .input { vertical-align: middle; display: grid; diff --git a/docs/bundle.css.gz b/docs/bundle.css.gz new file mode 100644 index 0000000000000000000000000000000000000000..75a6d47ad65de22262d0e957c0efe94c452a6e56 GIT binary patch literal 15072 zcmV<6Iv>R!iwFP!000026YYI#a~nsJ;CKHDtR0FFHEamoK!X$&R)nk>d)Iq6d$!MW z<8|mm6KIfafdIAvh@=(s->)A1s7Kbbs{vA?Xp=xcsxq^xvhr1#FJBC1>v?`tl;yfa zAD8R$W0BtuUcCHj*xrcR8=t-!3@+E@JTET>@#b!@T`!CI;G0>Fe_o@ToAtKX73 zmt;dO-4^rRHR^Xnzh39X)%C9ZKHHbuHG*riE>^p|#Fswi<*t}z%P3nGSE#X@Vm@CI zh%U3)hpTeEU(G3Y7lU1yt+t!2%vU?%f#N2+$}a{O@~n)m%4}Yshn`Q;d46?@ke|&4 zN&4)RZ2@06Ih9_CJl?5ZVIMrhZ<037wB4xR5imqUkW)f7)MW0qV>%j)PSLM)b9ah= z4I=Uh{~nOn{-u~U;MJ(@g3PPg8V%bD4d~Zj^D`;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us1q??GOOJ1f%QAK52(fT;+UGjXQivo2yz*{xmd;kt( zX&zRb!Wuop;GYs4YOz#lzo(MkY3;@wdHX5tM{roN_zp)X>`%}zCm@hiK6{P>;06&k z#GP=b;_1z#y=gvC;ohFXC~eFYOi7)s(7eL5aZ(^trD&&YuhO;ZP$+X|NSpSw$yQk% z1P3>|YE=5J83v{fL$l7h&hk26Sg6T7He|%@+J2&If2_lS%?j*pt#E8n~>MR-+n73~-;i*xuwBHyY z2#57l^DRW2xXPMVP`IQsc5hZu3C6noi+hj9c8Z$SePiln7dgO#G#=H|G<{WyeJgOV z;o9n`0CQVyi_OfLIJMSZta*GBxp0%+MQt*U`b-F-`(lapDmT^xbkqbMxD<#m=JR(4 zf#Ecc70x~SB6dNx@_{U&h-Sd?i5NH#0_Vrc2g2eVG;zNgm|k@ps6(Y63wk(=^9me< zgDO~R2)d|MrdIuxsoApF;G~m5r9Pq2O6nt*BXYfdoKz2I`H-#DX59l(63|M|c!6`Q zx0Y!%IX*~_hUu9TiF!j#Kl17gq{bXJPoq(70^+}DDF?S)mbOGZyufY+g}cD+(rg%k z-KEDbOknpQjkmxK_0{W+4Rxs8v7v{7KQX;;aW&Gb{mgz6RpOY(u1U~F_yurVegs-ofKT9f(|mLaM&!RmMl?)E=NV_ zYS}un!=}%aY7@jyI0cRR`zp?~Un=Q4&&void 0!==arguments[4]?arguments[4]:{black:!0,red:!1,green:!1,blue:!1},i=this.create(t,e),a=i.getContext("2d");a.clearRect(0,0,t,e),a.fillStyle="white",a.fillRect(0,0,t,e),a.globalAlpha=.7;var u={black:!1};o.black?u.black=!1:u.black=!0,o.red?u.red=!1:u.red=!0,o.green?u.green=!1:u.green=!0,o.blue?u.blue=!1:u.blue=!0,Object.keys(n).forEach(function(r){if(!u[r]){var o=n[r],i=Math.max.apply(Math,o),c=t/o.length;a.fillStyle=r,o.forEach(function(t,n){var r=e*(t/i),o=n*c;a.fillRect(o,e-r,c,r)})}}),je(r)&&r(i)},getHistogram:function(t){for(var e=new Array(256),n=new Array(256),r=new Array(256),o=new Array(256),i=0;i<256;i++)e[i]=0,n[i]=0,r[i]=0,o[i]=0;return function(t,e){!function(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:1,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return[t=t||0===t?t:1,0,0,0,e=e||0===e?e:1,0,0,0,1]},scaleX:function(t){return this.scale(t)},scaleY:function(t){return this.scale(1,t)},translate:function(t,e){return[1,0,t,0,1,e,0,0,1]},rotate:function(t){var e=this.radian(t);return[Math.cos(e),-Math.sin(e),0,Math.sin(e),Math.cos(e),0,0,0,1]},rotate90:function(){return[0,-1,0,1,0,0,0,0,1]},rotate180:function(){return[-1,0,0,0,-1,0,0,0,1]},rotate270:function(){return[0,1,0,-1,0,0,0,0,1]},radian:function(t){return t*Math.PI/180},skew:function(t,e){var n=this.radian(t),r=this.radian(e);return[1,Math.tan(n),0,Math.tan(r),1,0,0,0,1]},skewX:function(t){var e=this.radian(t);return[1,Math.tan(e),0,0,1,0,0,0,1]},skewY:function(t){var e=this.radian(t);return[1,0,0,Math.tan(e),1,0,0,0,1]},shear1:function(t){return[1,-Math.tan(this.radian(t)/2),0,0,1,0,0,0,1]},shear2:function(t){return[1,0,0,Math.sin(this.radian(t)),1,0,0,0,1]}},m={CONSTANT:g,radian:function(t){return g.radian(t)},multiply:function(t,e){return[t[0]*e[0]+t[1]*e[1]+t[2]*e[2],t[3]*e[0]+t[4]*e[1]+t[5]*e[2],t[6]*e[0]+t[7]*e[1]+t[8]*e[2]]},identity:function(t){return this.multiply(g.identity(),t)},translate:function(t,e,n){return this.multiply(g.translate(t,e),n)},rotate:function(t,e){return this.multiply(g.rotate(t),e)},shear1:function(t,e){return this.multiply(g.shear1(t),e)},shear2:function(t,e){return this.multiply(g.shear2(t),e)},rotateShear:function(t,e){var n=e;return n=this.shear1(t,n),n=this.shear2(t,n),n=this.shear1(t,n)}};function w(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=[],r=!0,o=!1,i=void 0;try{for(var a,u=t[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}return n}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function k(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ie,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:ie;return function(r,o){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=ht(r.pixels.length,r.width,r.height),u=r.width,c=r.height;e==ie&&(e=Math.floor(u/2)),n==ie&&(n=Math.floor(c/2));var l=m.CONSTANT.translate(-e,-n),s=m.CONSTANT.translate(e,n),f=m.CONSTANT.shear1(t),p=m.CONSTANT.shear2(t);Tt(function(t,e,n,o){var i=m.multiply(l,[n,o,1]);i=m.multiply(f,i).map(Math.round),i=m.multiply(p,i).map(Math.round),i=m.multiply(f,i).map(Math.round);var a=w(i=m.multiply(s,i),2),h=a[0],y=a[1];h<0||(y<0||h>u-1||y>c-1||Bt(t,y*u+h<<2,r.pixels,e))})(a,function(){o(a)},i)}}function O(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:200,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100,n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=vt(t),o=(e=vt(e))/100,i=n;return xt(function(){var t=o*Math.ceil(.2126*$r+.7152*$g+.0722*$b)>=r?255:0;if(i)0==t&&($r=0,$g=0,$b=0);else{var e=Math.round(t);$r=e,$g=e,$b=e}},{$C:o,$scale:r,$hasColor:i})}function S(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100;return At(ct([1,2,1,2,4,2,1,2,1],1/16*((t=vt(t))/100)))}function j(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100;return At(ct([1,4,6,4,1,4,16,24,16,4,6,24,36,24,6,4,16,24,16,4,1,4,6,4,1],1/256*((t=vt(t))/100)))}function P(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return t=vt(t),At([5,5,5,-3,0,-3,-3,-3,-3])}function x(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return t=vt(t),At([5,-3,-3,5,0,-3,5,-3,-3])}function $(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100;return At(ct([-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,24,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],(t=vt(t))/100))}function C(){return At(ct([1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1],1/9))}function _(){return At(ct([1,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,1],1/9))}function E(){return At(ct([1,0,0,0,1,0,0,0,1,0,1,0,0,1,0,0,1,0,0,0,1,0,1,0,1,0,0,0,0,0,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,0,0,0,0,0,1,0,1,0,1,0,0,0,1,0,0,1,0,0,1,0,1,0,0,0,1,0,0,0,1],1/9))}function T(){return At([-1,-2,-1,0,0,0,1,2,1])}function R(){return At([-1,0,1,-2,0,2,-1,0,1])}var I=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],B=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24];function A(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}var M=function(t,e,n){return n?function(t,e,n,r){if(isNaN(r)||r<1)return t;r|=0;var o,i,a,u,c,l,s,f,p,h,y,d,v,b,g,m,w,k,O,S,j=t.pixels,P=t.width,x=t.height,$=r+r+1,C=P-1,_=x-1,E=r+1,T=E*(E+1)/2,R=new A,M=R;for(a=1;a<$;a++)if(M=M.next=new A,a==E)var D=M;M.next=R;var z=null,F=null;s=l=0;var V=I[r],L=B[r];for(i=0;i>L,j[l+1]=p*V>>L,j[l+2]=h*V>>L,f-=y,p-=d,h-=v,y-=z.r,d-=z.g,v-=z.b,u=s+((u=o+r+1)>L,j[u+1]=p*V>>L,j[u+2]=h*V>>L,f-=y,p-=d,h-=v,y-=z.r,d-=z.g,v-=z.b,u=o+((u=i+E)<_?u:_)*P<<2,f+=b+=z.r=j[u],p+=g+=z.g=j[u+1],h+=m+=z.b=j[u+2],z=z.next,y+=w=F.r,d+=k=F.g,v+=O=F.b,b-=w,g-=k,m-=O,F=F.next,l+=P}return t}(t,0,0,e):stackBlurCanvasRGB(t,0,0,e)},D=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10,e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return t=vt(t),function(n,r){arguments.length>2&&void 0!==arguments[2]&&arguments[2];r(M(n,t,e))}};function z(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:256;return At(ct([1,4,6,4,1,4,16,24,16,4,6,24,-476,24,6,4,16,24,16,4,1,4,6,4,1],-1/(t=vt(t))))}function F(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var V=function(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,o=ht(n*r*4,n,r);return function(i,a){arguments.length>2&&void 0!==arguments[2]&&arguments[2];for(var u=e,c=0;u2&&void 0!==arguments[2]&&arguments[2];var o=b.drawPixels(n),i=o.getContext("2d");o.width=t,o.height=e,r({pixels:new Uint8ClampedArray(i.getImageData(0,0,t,e).data),width:t,height:e})}},flipH:function(){return function(t,e){arguments.length>2&&void 0!==arguments[2]&&arguments[2];for(var n=t.width,r=t.height,o=n%2==1?Math.floor(n/2):n/2,i=0;i2&&void 0!==arguments[2]&&arguments[2];for(var n=t.width,r=t.height,o=r%2==1?Math.floor(r/2):r/2,i=0;i0&&void 0!==arguments[0]?arguments[0]:0;return t=vt(t),t%=360,function(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(0==t)return e;if(90==t||270==t)var o=ht(e.pixels.length,e.height,e.width);else{if(180!=t)return k(t)(e,n,r);o=ht(e.pixels.length,e.width,e.height)}Tt(function(n,r,i,a){if(90==t)var u=i*o.width+(o.width-1-a)<<2;else 270==t?u=(o.height-1-i)*o.width+a<<2:180==t&&(u=(o.height-1-a)*o.width+(o.width-1-i)<<2);Bt(o.pixels,u,e.pixels,r)})(e,function(){n(o)},r)}},rotateDegree:k,histogram:function(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"gray",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=[],r=0;r2&&void 0!==arguments[2]?arguments[2]:100,r=or.parse(t),o=or.parse(e),i=n;return xt(function(){var t=$r+$g+$b<=i?r:o;$r=t.r,$g=t.g,$b=t.b},{$threshold:i},{$darkColor:r,$lightColor:o})},brightness:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;t=vt(t);var e=Math.floor(t/100*255);return xt(function(){$r+=e,$g+=e,$b+=e},{$C:e})},brownie:function(){var t=[.5997023498159715,.34553243048391263,-.2708298674538042,0,-.037703249837783157,.8609577587992641,.15059552388459913,0,.24113635128153335,-.07441037908422492,.44972182064877153,0,0,0,0,1];return xt(function(){$r=t[0]*$r+t[1]*$g+t[2]*$b+t[3]*$a,$g=t[4]*$r+t[5]*$g+t[6]*$b+t[7]*$a,$b=t[8]*$r+t[9]*$g+t[10]*$b+t[11]*$a,$a=t[12]*$r+t[13]*$g+t[14]*$b+t[15]*$a},{$matrix:t})},clip:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;t=vt(t);var e=2.55*Math.abs(t);return xt(function(){$r=$r>255-e?255:0,$g=$g>255-e?255:0,$b=$b>255-e?255:0},{$C:e})},contrast:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;t=vt(t);var e=Math.max((128+t)/128,0);return xt(function(){$r*=e,$g*=e,$b*=e},{$C:e})},gamma:function(){var t=vt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:1);return xt(function(){$r=255*Math.pow($r/255,t),$g=255*Math.pow($g/255,t),$b=255*Math.pow($b/255,t)},{$C:t})},gradient:function(){var t=Array.prototype.slice.call(arguments);1===t.length&&ke(t[0])&&(t=or.convertMatchesArray(t[0]));var e=(t=t.map(function(t){return or.matches(t).length?{type:"param",value:t}:{type:"scale",value:t}})).filter(function(t){return"scale"==t.type})[0];e=e?+e.value:256,t=t.filter(function(t){return"param"==t.type}).map(function(t){return t.value}).join(",");var n=or.gradient(t,e).map(function(t){var e=or.parse(t);return{r:e.r,g:e.g,b:e.b,a:e.a}});return xt(function(){var t=clamp(Math.ceil(.2126*$r+.7152*$g+.0722*$b)),r=clamp(Math.floor(t*(e/256))),o=n[r];$r=o.r,$g=o.g,$b=o.b,$a=clamp(Math.floor(256*o.a))},{},{$colors:n,$scale:e})},grayscale:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100,e=(t=vt(t))/100;e>1&&(e=1);var n=[.2126+.7874*(1-e),.7152-.7152*(1-e),.0722-.0722*(1-e),0,.2126-.2126*(1-e),.7152+.2848*(1-e),.0722-.0722*(1-e),0,.2126-.2126*(1-e),.7152-.7152*(1-e),.0722+.9278*(1-e),0,0,0,0,1];return xt(function(){$r=n[0]*$r+n[1]*$g+n[2]*$b+n[3]*$a,$g=n[4]*$r+n[5]*$g+n[6]*$b+n[7]*$a,$b=n[8]*$r+n[9]*$g+n[10]*$b+n[11]*$a,$a=n[12]*$r+n[13]*$g+n[14]*$b+n[15]*$a},{$matrix:n})},hue:function(){return xt(function(){var t=Color.RGBtoHSV($r,$g,$b),e=t.h;e+=Math.abs($amount),e%=360,t.h=e;var n=Color.HSVtoRGB(t);$r=n.r,$g=n.g,$b=n.b},{$C:vt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:360)})},invert:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100,e=(t=vt(t))/100;return xt(function(){$r=(255-$r)*e,$g=(255-$g)*e,$b=(255-$b)*e},{$C:e})},kodachrome:function(){var t=[1.1285582396593525,-.3967382283601348,-.03992559172921793,0,-.16404339962244616,1.0835251566291304,-.05498805115633132,0,-.16786010706155763,-.5603416277695248,1.6014850761964943,0,0,0,0,1];return xt(function(){$r=t[0]*$r+t[1]*$g+t[2]*$b+t[3]*$a,$g=t[4]*$r+t[5]*$g+t[6]*$b+t[7]*$a,$b=t[8]*$r+t[9]*$g+t[10]*$b+t[11]*$a,$a=t[12]*$r+t[13]*$g+t[14]*$b+t[15]*$a},{$matrix:t})},matrix:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:0,u=arguments.length>7&&void 0!==arguments[7]?arguments[7]:0,c=arguments.length>8&&void 0!==arguments[8]?arguments[8]:0,l=arguments.length>9&&void 0!==arguments[9]?arguments[9]:0,s=arguments.length>10&&void 0!==arguments[10]?arguments[10]:0,f=arguments.length>11&&void 0!==arguments[11]?arguments[11]:0,p=arguments.length>12&&void 0!==arguments[12]?arguments[12]:0,h=arguments.length>13&&void 0!==arguments[13]?arguments[13]:0,y=arguments.length>14&&void 0!==arguments[14]?arguments[14]:0,d=arguments.length>15&&void 0!==arguments[15]?arguments[15]:0,v=[t,e,n,r,o,i,a,u,c,l,s,f,p,h,y,d];return xt(function(){$r=v[0]*$r+v[1]*a+v[2]*e+v[3]*t,a=v[4]*$r+v[5]*a+v[6]*e+v[7]*t,e=v[8]*$r+v[9]*a+v[10]*e+v[11]*t,t=v[12]*$r+v[13]*a+v[14]*e+v[15]*t},{$matrix:v})},noise:function(){var t=vt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:1);return xt(function(){var e=5*Math.abs(t),n=-e,r=e,o=Math.round(n+Math.random()*(r-n));$r+=o,$g+=o,$b+=o},{$C:t})},opacity:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100,e=(t=vt(t))/100;return xt(function(){$a*=e},{$C:e})},polaroid:function(){var t=[1.438,-.062,-.062,0,-.122,1.378,-.122,0,-.016,-.016,1.483,0,0,0,0,1];return xt(function(){$r=t[0]*$r+t[1]*$g+t[2]*$b+t[3]*$a,$g=t[4]*$r+t[5]*$g+t[6]*$b+t[7]*$a,$b=t[8]*$r+t[9]*$g+t[10]*$b+t[11]*$a,$a=t[12]*$r+t[13]*$g+t[14]*$b+t[15]*$a},{$matrix:t})},saturation:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100,e=(t=vt(t))/100,n=1-Math.abs(e),r=[n,0,0,0,0,n,0,0,0,0,n,0,0,0,0,n];return xt(function(){$r=r[0]*$r+r[1]*$g+r[2]*$b+r[3]*$a,$g=r[4]*$r+r[5]*$g+r[6]*$b+r[7]*$a,$b=r[8]*$r+r[9]*$g+r[10]*$b+r[11]*$a,$a=r[12]*$r+r[13]*$g+r[14]*$b+r[15]*$a},{$matrix:r})},sepia:function(){var t=vt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:1);t>1&&(t=1);var e=[.393+.607*(1-t),.769-.769*(1-t),.189-.189*(1-t),0,.349-.349*(1-t),.686+.314*(1-t),.168-.168*(1-t),0,.272-.272*(1-t),.534-.534*(1-t),.131+.869*(1-t),0,0,0,0,1];return xt(function(){$r=e[0]*$r+e[1]*$g+e[2]*$b+e[3]*$a,$g=e[4]*$r+e[5]*$g+e[6]*$b+e[7]*$a,$b=e[8]*$r+e[9]*$g+e[10]*$b+e[11]*$a,$a=e[12]*$r+e[13]*$g+e[14]*$b+e[15]*$a},{$matrix:e})},shade:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=vt(t),o=vt(e),i=vt(n);return xt(function(){$r*=r,$g*=o,$b*=i},{$redValue:r,$greenValue:o,$blueValue:i})},shift:function(){var t=[1.438,-.062,-.062,0,-.122,1.378,-.122,0,-.016,-.016,1.483,0,0,0,0,1];return xt(function(){$r=t[0]*$r+t[1]*$g+t[2]*$b+t[3]*$a,$g=t[4]*$r+t[5]*$g+t[6]*$b+t[7]*$a,$b=t[8]*$r+t[9]*$g+t[10]*$b+t[11]*$a,$a=t[12]*$r+t[13]*$g+t[14]*$b+t[15]*$a},{$matrix:t})},solarize:function(t,e,n){var r=vt(t),o=vt(e),i=vt(n);return xt(function(){$r=$r0&&void 0!==arguments[0]?arguments[0]:200,arguments.length>1&&void 0!==arguments[1]?arguments[1]:100,!1)},"threshold-color":O,tint:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=parseParamNumber(t),o=parseParamNumber(e),i=parseParamNumber(n);return xt(function(){$r+=(255-$r)*r,$g+=(255-$g)*o,$b+=(255-$b)*i},{$redTint:r,$greenTint:o,$blueTint:i})}},{blur:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3;!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return At(Rt(t=vt(t)))},emboss:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:4;return At([-2*(t=vt(t)),-t,0,-t,1,t,0,t,2*t])},gaussianBlur:S,"gaussian-blur":S,gaussianBlur5x:j,"gaussian-blur-5x":j,grayscale2:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100;return At(ct([.3,.3,.3,0,0,.59,.59,.59,0,0,.11,.11,.11,0,0,0,0,0,0,0,0,0,0,0,0],(t=vt(t))/100))},normal:function(){return At([0,0,0,0,1,0,0,0,0])},kirschHorizontal:P,"kirsch-horizontal":P,kirschVertical:x,"kirsch-vertical":x,laplacian:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100;return At(ct([-1,-1,-1,-1,8,-1,-1,-1,-1],(t=vt(t))/100))},laplacian5x:$,"laplacian-5x":$,motionBlur:C,"motion-blur":C,motionBlur2:_,"motion-blur-2":_,motionBlur3:E,"motion-blur-3":E,negative:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100;return At(ct([-1,0,0,0,0,0,-1,0,0,0,0,0,-1,0,0,0,0,0,1,0,1,1,1,1,1],(t=vt(t))/100))},sepia2:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100;return At(ct([.393,.349,.272,0,0,.769,.686,.534,0,0,.189,.168,.131,0,0,0,0,0,0,0,0,0,0,0,0],(t=vt(t))/100))},sharpen:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100;return At(ct([0,-1,0,-1,5,-1,0,-1,0],(t=vt(t))/100))},sobelHorizontal:T,"sobel-horizontal":T,sobelVertical:R,"sobel-vertical":R,stackBlur:D,"stack-blur":D,transparency:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100;return At(ct([1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,.3,0,0,0,0,0,1],(t=vt(t))/100))},unsharpMasking:z,"unsharp-masking":z},{kirsch:function(){return Ft("kirsch-horizontal kirsch-vertical")},sobel:function(){return Ft("sobel-horizontal sobel-vertical")},vintage:function(){return Ft("brightness(15) saturation(-20) gamma(1.8)")}});function L(t,e){return e=be(e)?1:e,Math.round(t*e)/e}function H(t){return t*Math.PI/180}function N(t){var e=180*t/Math.PI;return e<0&&(e=360+e),e}function X(t,e){return(arguments.length>2&&void 0!==arguments[2]?arguments[2]:0)+e*Math.cos(H(t))}function G(t,e){return(arguments.length>2&&void 0!==arguments[2]?arguments[2]:0)+e*Math.sin(H(t))}function Y(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return{x:X(t,e,n),y:G(t,e,r)}}function U(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return Math.sqrt(Math.pow(Math.abs(n-t),2)+Math.pow(Math.abs(r-e),2))}function K(t,e){return N(Math.atan2(e,t))}function W(){var t=(new Date).getTime();return"xxx12-xx-34xx".replace(/[xy]/g,function(e){var n=(t+16*Math.random())%16|0;return t=Math.floor(t/16),("x"==e?n:3&n|8).toString(16)})}function q(){var t=(new Date).getTime();return"xxxxxxx".replace(/[xy]/g,function(e){var n=(t+16*Math.random())%16|0;return t=Math.floor(t/16),("x"==e?n:3&n|8).toString(16)})}var J,Z={B1:function(t){return t*t*t},B2:function(t){return 3*t*t*(1-t)},B3:function(t){return 3*t*(1-t)*(1-t)},B4:function(t){return(1-t)*(1-t)*(1-t)}};function Q(t,e,n,r){var o=e,i=r;return function(t){return 1-(o*Z.B2(t)+i*Z.B3(t)+Z.B4(t))}}function tt(t,e){var n=Math.abs(e.width*Math.sin(t))+Math.abs(e.height*Math.cos(t)),r={x:e.x+e.width/2,y:e.y+e.height/2},o=Math.sin(t-Math.PI/2)*n/2,i=Math.cos(t-Math.PI/2)*n/2;return{length:n,center:r,start:{x:r.x-i,y:r.y-o},end:{x:r.x+i,y:r.y+o}}}function et(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e>1),c=r[u];return r[u]=r[0],r[0]=c,r},createBitmap:ht,createBlurMatrix:Rt,pack:function(t){return function(e,n){ft(e.pixels.length,function(n,r){t(e.pixels,n,r,e.pixels[n],e.pixels[n+1],e.pixels[n+2],e.pixels[n+3])},function(){n(e)})}},packXY:Tt,pixel:xt,getBitmap:yt,putBitmap:dt,radian:function(t){return m.CONSTANT.radian(t)},convolution:At,parseParamNumber:vt,px2em:gt,px2percent:bt,em2percent:wt,em2px:mt,percent2em:Ot,percent2px:kt,filter:Ft,clamp:zt,fillColor:It,fillPixelColor:Bt},"multi",Vt),nt(J,"merge",Lt),nt(J,"matches",Mt),nt(J,"parseFilter",Dt),nt(J,"partial",Ht),J),it=ot,at=ot,ut=1e3;function ct(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return t.map(function(t){return t*e})}function lt(t,e){for(var n=new Array(e),r=0;r1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0,i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:1e4,a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:"full",u=arguments.length>7&&void 0!==arguments[7]?arguments[7]:50,c=e,l=function(t){setTimeout(t,0)};function s(){for(var e=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:50,e=et(Array(t)).map(function(t){return"cri = ri + i * s; if (cri >= mx) return {currentRunIndex: cri, i: null}; c(cri); i++;"}).join("\n");return new Function("ri","i","s","mx","c","\n let cri = ri;\n \n ".concat(e,"\n \n return {currentRunIndex: cri, i: i} \n "))}(u),a=c,f={},p=0;p=t)return void o();l?l(s):s()}(a)}"requestAnimationFrame"==a&&(l=requestAnimationFrame,i=1e3),"full"==a&&(l=null,i=t),s()}function ft(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};st(t,0,4,function(t){e(t,t>>2)},function(){n()},r.functionDumpCount,r.frameTimer,r.loopCount)}function pt(t,e,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};st(t,0,4,function(t){var r=t>>2;n(t,r%e,Math.floor(r/e))},function(){r()},o.functionDumpCount,o.frameTimer,o.loopCount)}function ht(t,e,n){return{pixels:new Uint8ClampedArray(t),width:e,height:n}}function yt(t,e){return b.getBitmap(t,e)}function dt(t,e,n){return b.putBitmap(t,e,n)}function vt(t,e){return ke(t)&&(t=t.replace(/deg|px|\%|em/g,Xt)),je(e)?e(+t):+t}function bt(t,e){return L(t/e*100,ut)}function gt(t,e){return L(t/(arguments.length>2&&void 0!==arguments[2]?arguments[2]:16),ut)}function mt(t,e){return L(t*(arguments.length>2&&void 0!==arguments[2]?arguments[2]:16),ut)}function wt(t,e){return bt(mt(t),e)}function kt(t,e){return L(e*(t/100),ut)}function Ot(t,e){return gt(kt(t,e),e)}var St=/(([\w_\-]+)(\(([^\)]*)\))?)+/gi;function jt(t){var e=t.map(function(t){return" \n ".concat(t.userFunction.$preContext,"\n\n ").concat(t.userFunction.$preCallbackString,"\n\n $r = clamp($r); $g = clamp($g); $b = clamp($b); $a = clamp($a);\n ")}).join("\n\n"),n={clamp:zt,Color:or};t.forEach(function(t){n=function(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:{},c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return e={},n=[{callback:t,context:u,rootContext:c}].map(function(t){var n=[];he(t.context,function(t){n[t]="n$".concat(rt++).concat(t,"$")}),he(t.rootContext,function(t,r){n[t]="r$".concat(rt++).concat(t,"$"),e[n[t]]=r});var r=Object.keys(t.context).filter(function(e){return!(Pe(t.context[e])||ke(t.context[e])||me(t.context[e])&&(Pe(t.context[e][0])||ke(t.context[e][0])))}).map(function(e,r){return[n[e],JSON.stringify(t.context[e])].join(" = ")}),o=t.callback.toString().split("{");return o.shift(),(o=(o=o.join("{")).split("}")).pop(),o=o.join("}"),he(n,function(e,n){Pe(t.context[e])||ke(t.context[e])?o=o.replace(new RegExp("\\"+e,"g"),t.context[e]):me(t.context[e])&&(Pe(t.context[e][0])||ke(t.context[e][0]))?t.context[e].forEach(function(t,n){o=o.replace(new RegExp("\\"+e+"\\["+n+"\\]","g"),t)}):o=o.replace(new RegExp("\\"+e,"g"),n)}),{preCallbackString:o,preContext:r}}),r=n.map(function(t,e){return t.preContext.length?"const ".concat(t.preContext,";"):""}).join("\n\n"),o=n.map(function(t){return t.preCallbackString}).join("\n\n"),i=" \n let $r = $pixels[$pixelIndex], $g = $pixels[$pixelIndex+1], $b = $pixels[$pixelIndex+2], $a = $pixels[$pixelIndex+3];\n\n ".concat(r,"\n\n ").concat(o,"\n \n $pixels[$pixelIndex] = $r\n $pixels[$pixelIndex+1] = $g \n $pixels[$pixelIndex+2] = $b \n $pixels[$pixelIndex+3] = $a \n "),(a=new Function("$pixels","$pixelIndex","$clamp","$Color",i)).$preCallbackString=o,a.$preContext=r,a.rootContextObject=e,a}function xt(t){var e=Pt(t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}),n=function(t,e){};return n.userFunction=e,n}var $t,Ct,_t=[0,1,2,3];function Et(t,e,n){_t.forEach(function(r){var o=t[e+r];t[e+r]=t[n+r],t[n+r]=o})}function Tt(t){return function(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};pt(e.pixels.length,e.width,function(n,r,o){t(e.pixels,n,r,o)},function(){n(e)},r)}}function Rt(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3,e=Math.pow(t,2);return lt(1/e,e)}function It(t,e,n,r,o,i){if(3==arguments.length){var a=arguments[2];n=a.r,r=a.g,o=a.b,i=a.a}Pe(n)&&(t[e]=n),Pe(r)&&(t[e+1]=r),Pe(o)&&(t[e+2]=o),Pe(i)&&(t[e+3]=i)}function Bt(t,e,n,r){It(t,e,n[r],n[r+1],n[r+2],n[r+3])}function At(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=function(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:255;return e=t.map(function(t,e){return[]}),t.forEach(function(t,o){if(0!=t){var i=e[o];for(o=n;o<=r;o++)i[o]=t*o}}),e}(t);return function(r,o){arguments.length>2&&void 0!==arguments[2]&&arguments[2];var i=Math.round(Math.sqrt(t.length)),a=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=t.width+e,r=t.height+e;return{pixels:new Uint8ClampedArray(n*r*4),width:n,height:r}}(r,2*i);!function(t,e,n,r){for(var o=e.pixels.length/4,i=0,a=0,u=0,c=0,l=0,s=0,f=0;ft.width||a>t.height||(l=c*e.width+u<<2,s=a*t.width+i<<2,t.pixels[s]=e.pixels[l],t.pixels[s+1]=e.pixels[l+1],t.pixels[s+2]=e.pixels[l+2],t.pixels[s+3]=e.pixels[l+3])}(a,r,i,i);for(var u=ht(a.pixels.length,a.width,a.height),c=ht(r.pixels.length,r.width,r.height),l=function(t,e,n,r,o){var i=Math.round(Math.sqrt(t.length)),a=Math.floor(i/2),u=o?1:0,c="let r = 0, g = 0, b = 0, a = 0, scy = 0, scx =0, si = 0; ",l=[],s=[],f=[],p=[];t.forEach(function(t,e){var r=Math.floor(e/i)-a,o=e%i-a;0!=t&&(l.push("$t[".concat(e,"][$sp[(($sy + (").concat(r,")) * ").concat(n," + ($sx + (").concat(o,"))) * 4]]")),s.push("$t[".concat(e,"][$sp[(($sy + (").concat(r,")) * ").concat(n," + ($sx + (").concat(o,"))) * 4 + 1]]")),f.push("$t[".concat(e,"][$sp[(($sy + (").concat(r,")) * ").concat(n," + ($sx + (").concat(o,"))) * 4 + 2]]")),p.push("$t[".concat(e,"][$sp[(($sy + (").concat(r,")) * ").concat(n," + ($sx + (").concat(o,"))) * 4 + 3]]")))}),c+="r = ".concat(l.join(" + "),"; g = ").concat(s.join(" + "),"; b = ").concat(f.join(" + "),"; a = ").concat(p.join(" + "),";"),c+="$dp[$di] = r; $dp[$di+1] = g;$dp[$di+2] = b;$dp[$di+3] = a + (".concat(u,")*(255-a); ");var h=new Function("$dp","$sp","$di","$sx","$sy","$t",c);return function(t,n,r,o,i){h(t,n,r,o,i,e)}}(t,n,a.width,a.height,e),s=r.pixels.length/4,f=0;f>2,i=0,a=0,u=0,c=0,l=0,s=0,f=0;ft.width||a>t.height||(l=a*t.width+i<<2,s=c*e.width+u<<2,e.pixels[s]=t.pixels[l],e.pixels[s+1]=t.pixels[l+1],e.pixels[s+2]=t.pixels[l+2],e.pixels[s+3]=t.pixels[l+3])}(u,c,i,i),o(c)}}function Mt(t){var e=or.convertMatches(t),n=e.str.match(St),r=[];if(!n)return r;r=n.map(function(t){return{filter:t,origin:or.reverseMatches(t,e.matches)}});var o={next:0};return r=r.map(function(e){var n=t.indexOf(e.origin,o.next);return e.startIndex=n,e.endIndex=n+e.origin.length,e.arr=Dt(e.origin),o.next=e.endIndex,e}).filter(function(t){return!!t.arr.length})}function Dt(t){var e=or.convertMatches(t),n=e.str.match(St);if(!n[0])return[];var r=n[0].split("("),o=r.shift(),i=[];return r.length&&(i=r.shift().split(")")[0].split(",").map(function(t){return or.reverseMatches(t,e.matches)})),[o].concat(et(i)).map(or.trim)}function zt(t){return Math.min(255,t)}function Ft(t){return Lt(Mt(t).map(function(t){return t.arr}))}function Vt(){for(var t=arguments.length,e=new Array(t),n=0;n0&&void 0!==arguments[0]?arguments[0]:[],e=[],n=[],r=0,o=t.length;r2&&void 0!==arguments[2]?arguments[2]:{},i=t,a=0;function u(){e[a].call(null,i,function(t){i=t,function(){if(++a>=r)return void n(i);u()}()},o)}u()}}function Lt(t){return Vt.apply(void 0,et(t))}function Ht(t){for(var e=null,n=arguments.length,r=new Array(n>1?n-1:0),o=1;o2&&void 0!==arguments[2]?arguments[2]:{};e(yt(n,t),function(e){r(dt(n,e,t))},o)}}function Nt(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Xt="",Gt=" ",Yt="value",Ut="px",Kt="em",Wt="percent",qt="deg",Jt="color",Zt="px",Qt="em",te="%",ee=Xt;Nt($t={},Yt,Xt),Nt($t,Ut,Zt),Nt($t,Kt,Qt),Nt($t,Wt,te),Nt($t,qt,qt),Nt($t,Jt,ee);function ne(t){return t+Zt}var re="layer",oe="image",ie="center",ae=["angle","backgroundPositionX","backgroundPositionY","backgroundSizeWidth","backgroundSizeHeight"],ue=["angle","backgroundPositionX","backgroundPositionY","backgroundSizeWidth","backgroundSizeHeight"],ce=["backgroundPositionX","backgroundPositionY","backgroundSizeWidth","backgroundSizeHeight"];Nt(Ct={},re,[{key:"transform",title:"Transform",properties:["translateX","translateY","rotate","skewX","skewY","scale"]},{key:"transform3d",title:"Transform 3D",properties:["translateZ","perspective","rotateX","rotateY","rotateZ","scaleX","scaleY","scaleZ"]}]),Nt(Ct,oe+"_linear",[{key:"linear",title:"Linear Gradient",properties:ae}]),Nt(Ct,oe+"_radial",[{key:"linear",title:"Radial Gradient",properties:ce}]),Nt(Ct,oe+"_conic",[{key:"linear",title:"Conic Gradient",properties:ue}]),Nt(Ct,oe+"_repeating-linear",[{key:"linear",title:"Repeating Linear Gradient",properties:ae}]),Nt(Ct,oe+"_repeating-radial",[{key:"linear",title:"Repeating Radial Gradient",properties:ce}]),Nt(Ct,oe+"_repeating-conic",[{key:"linear",title:"Repeating Conic Gradient",properties:ue}]),Nt(Ct,oe+"_static",[{key:"linear",title:"Static Gradient",properties:["color","backgroundPositionX","backgroundPositionY","backgroundSizeWidth","backgroundSizeHeight"]}]);function le(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e1&&void 0!==arguments[1]?arguments[1]:Xt,n={};return Object.keys(t).forEach(function(r){var o=r;e!==Xt&&(o="".concat(e,".").concat(r)),Se(t[r])?n=function(t){for(var e=1;e]*)\/\>/gim,Re={image:!0,input:!0,br:!0},Ie=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r",">"))})};function Be(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"rgba(0, 0, 0, 0)";return Array.isArray(t)&&(t={r:t[0],g:t[1],b:t[2],a:t[3]}),"hex"==e?Ae(t):"rgb"==e?Me(t,n):"hsl"==e?De(t):t}function Ae(t){Array.isArray(t)&&(t={r:t[0],g:t[1],b:t[2],a:t[3]});var e=t.r.toString(16);t.r<16&&(e="0"+e);var n=t.g.toString(16);t.g<16&&(n="0"+n);var r=t.b.toString(16);return t.b<16&&(r="0"+r),"#".concat(e).concat(n).concat(r)}function Me(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"rgba(0, 0, 0, 0)";if(me(t)&&(t={r:t[0],g:t[1],b:t[2],a:t[3]}),!be(t))return 1==t.a||be(t.a)?isNaN(t.r)?e:"rgb(".concat(t.r,",").concat(t.g,",").concat(t.b,")"):"rgba(".concat(t.r,",").concat(t.g,",").concat(t.b,",").concat(t.a,")")}function De(t){return me(t)&&(t={r:t[0],g:t[1],b:t[2],a:t[3]}),1==t.a||be(t.a)?"hsl(".concat(t.h,",").concat(t.s,"%,").concat(t.l,"%)"):"hsla(".concat(t.h,",").concat(t.s,"%,").concat(t.l,"%,").concat(t.a,")")}function ze(t,e){return Math.floor(Math.random()*(e-t+1))+t}function Fe(){return Me({r:ze(0,255),g:ze(0,255),b:ze(0,255)})}function Ve(t){return Math.pow(t,3)>.008856?Math.pow(t,3):(t-16/116)/7.787}function Le(t){return t>.0031308?1.055*Math.pow(t,1/2.4)-.055:12.92*t}function He(t,e,n){if(1==arguments.length){var r=arguments[0];t=r.x,e=r.y,n=r.z}var o=t/100,i=e/100,a=n/100,u=3.2406*o+-1.5372*i+-.4986*a,c=-.9689*o+1.8758*i+.0415*a,l=.0557*o+-.204*i+1.057*a;return u=Le(u),c=Le(c),l=Le(l),{r:L(255*u),g:L(255*c),b:L(255*l)}}function Ne(t,e,n){if(1==arguments.length){var r=arguments[0];t=r.l,e=r.a,n=r.b}var o=(t+16)/116,i=e/500+o,a=o-n/200;return o=Ve(o),{x:95.047*(i=Ve(i)),y:100*o,z:108.883*(a=Ve(a))}}function Xe(t){return t>.008856?Math.pow(t,1/3):(7.787*t+16)/116}function Ge(t,e,n){if(1==arguments.length){var r=arguments[0];t=r.x,e=r.y,n=r.z}var o=t/95.047,i=e/100,a=n/108.883;return o=Xe(o),{l:116*(i=Xe(i))-16,a:500*(o-i),b:200*(i-(a=Xe(a)))}}function Ye(t,e,n){if(1==arguments.length){var r=arguments[0];t=r.l,e=r.a,n=r.b}return He(Ne(t,e,n))}function Ue(t,e,n){if(1==arguments.length){var r=arguments[0];t=r.r,e=r.g,n=r.b}var o=t/255,i=e/255,a=n/255,u=Math.max(o,i,a),c=u-Math.min(o,i,a),l=0;0==c?l=0:u==o?l=(i-a)/c%6*60:u==i?l=60*((a-o)/c+2):u==a&&(l=60*((o-i)/c+4)),l<0&&(l=360+l);return{h:l,s:0==u?0:c/u,v:u}}function Ke(t,e,n){if(1==arguments.length){var r=arguments[0];t=r.r,e=r.g,n=r.b}var o=t/255,i=e/255,a=n/255,u=1-Math.max(o,i,a);return{c:(1-o-u)/(1-u),m:(1-i-u)/(1-u),y:(1-a-u)/(1-u),k:u}}function We(t,e,n){if(1==arguments.length){var r=arguments[0];t=r.r,e=r.g,n=r.b}t/=255,e/=255,n/=255;var o,i,a=Math.max(t,e,n),u=Math.min(t,e,n),c=(a+u)/2;if(a==u)o=i=0;else{var l=a-u;switch(i=c>.5?l/(2-a-u):l/(a+u),a){case t:o=(e-n)/l+(e90?0:255)}function Je(t){return{r:t,g:t,b:t}}function Ze(t,e,n){if(1==arguments.length){var r=arguments[0];t=r.r,e=r.g,n=r.b}return Je(Math.ceil((t+e+n)/3))}function Qe(t,e,n){if(1==arguments.length){var r=arguments[0];t=r.r,e=r.g,n=r.b}return Je(en(t,e,n).y)}function tn(t,e,n){return Math.ceil(.2126*t+.7152*e+.0722*n)}function en(t,e,n){if(1==arguments.length){var r=arguments[0];t=r.r,e=r.g,n=r.b}var o=tn(t,e,n);return{y:o,cr:.713*(t-o),cb:.564*(n-o)}}function nn(t){return 100*(t>.04045?Math.pow((t+.055)/1.055,2.4):t/12.92)}function rn(t,e,n){if(1==arguments.length){var r=arguments[0];t=r.r,e=r.g,n=r.b}var o=t/255,i=e/255,a=n/255;return{x:.4124*(o=nn(o))+.3576*(i=nn(i))+.1805*(a=nn(a)),y:.2126*o+.7152*i+.0722*a,z:.0193*o+.1192*i+.9505*a}}function on(t,e,n){if(1==arguments.length){var r=arguments[0];t=r.r,e=r.g,n=r.b}return Ge(rn(t,e,n))}function an(t,e,n,r){if(1==arguments.length){var o=arguments[0];t=o.c,e=o.m,n=o.y,r=o.k}return{r:255*(1-t)*(1-r),g:255*(1-e)*(1-r),b:255*(1-n)*(1-r)}}function un(t,e,n){if(1==arguments.length){var r=arguments[0];t=r.h,e=r.s,n=r.v}var o=t,i=n;o>=360&&(o=0);var a=e*i,u=a*(1-Math.abs(o/60%2-1)),c=i-a,l=[];return 0<=o&&o<60?l=[a,u,0]:60<=o&&o<120?l=[u,a,0]:120<=o&&o<180?l=[0,a,u]:180<=o&&o<240?l=[0,u,a]:240<=o&&o<300?l=[u,0,a]:300<=o&&o<360&&(l=[a,0,u]),{r:L(255*(l[0]+c)),g:L(255*(l[1]+c)),b:L(255*(l[2]+c))}}function cn(t,e,n){if(1==arguments.length){var r=arguments[0];t=r.h,e=r.s,n=r.v}var o=un(t,e,n);return We(o.r,o.g,o.b)}function ln(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function sn(t,e,n){if(1==arguments.length){var r=arguments[0];t=r.h,e=r.s,n=r.l}var o=fn(t,e,n);return Ue(o.r,o.g,o.b)}function fn(t,e,n){if(1==arguments.length){var r=arguments[0];t=r.h,e=r.s,n=r.l}var o,i,a;if(t/=360,n/=100,0==(e/=100))o=i=a=n;else{var u=n<.5?n*(1+e):n+e-n*e,c=2*n-u;o=ln(c,u,t+1/3),i=ln(c,u,t),a=ln(c,u,t-1/3)}return{r:L(255*o),g:L(255*i),b:L(255*a)}}function pn(t,e,n,r){if(1==arguments.length){var o=arguments[0];t=o.y,e=o.cr,n=o.cb;r=(r=o.bit)||0}var i=t+1.402*(e-r),a=t-.344*(n-r)-.714*(e-r),u=t+1.772*(n-r);return{r:Math.ceil(i),g:Math.ceil(a),b:Math.ceil(u)}}var hn={aliceblue:"rgb(240, 248, 255)",antiquewhite:"rgb(250, 235, 215)",aqua:"rgb(0, 255, 255)",aquamarine:"rgb(127, 255, 212)",azure:"rgb(240, 255, 255)",beige:"rgb(245, 245, 220)",bisque:"rgb(255, 228, 196)",black:"rgb(0, 0, 0)",blanchedalmond:"rgb(255, 235, 205)",blue:"rgb(0, 0, 255)",blueviolet:"rgb(138, 43, 226)",brown:"rgb(165, 42, 42)",burlywood:"rgb(222, 184, 135)",cadetblue:"rgb(95, 158, 160)",chartreuse:"rgb(127, 255, 0)",chocolate:"rgb(210, 105, 30)",coral:"rgb(255, 127, 80)",cornflowerblue:"rgb(100, 149, 237)",cornsilk:"rgb(255, 248, 220)",crimson:"rgb(237, 20, 61)",cyan:"rgb(0, 255, 255)",darkblue:"rgb(0, 0, 139)",darkcyan:"rgb(0, 139, 139)",darkgoldenrod:"rgb(184, 134, 11)",darkgray:"rgb(169, 169, 169)",darkgrey:"rgb(169, 169, 169)",darkgreen:"rgb(0, 100, 0)",darkkhaki:"rgb(189, 183, 107)",darkmagenta:"rgb(139, 0, 139)",darkolivegreen:"rgb(85, 107, 47)",darkorange:"rgb(255, 140, 0)",darkorchid:"rgb(153, 50, 204)",darkred:"rgb(139, 0, 0)",darksalmon:"rgb(233, 150, 122)",darkseagreen:"rgb(143, 188, 143)",darkslateblue:"rgb(72, 61, 139)",darkslategray:"rgb(47, 79, 79)",darkslategrey:"rgb(47, 79, 79)",darkturquoise:"rgb(0, 206, 209)",darkviolet:"rgb(148, 0, 211)",deeppink:"rgb(255, 20, 147)",deepskyblue:"rgb(0, 191, 255)",dimgray:"rgb(105, 105, 105)",dimgrey:"rgb(105, 105, 105)",dodgerblue:"rgb(30, 144, 255)",firebrick:"rgb(178, 34, 34)",floralwhite:"rgb(255, 250, 240)",forestgreen:"rgb(34, 139, 34)",fuchsia:"rgb(255, 0, 255)",gainsboro:"rgb(220, 220, 220)",ghostwhite:"rgb(248, 248, 255)",gold:"rgb(255, 215, 0)",goldenrod:"rgb(218, 165, 32)",gray:"rgb(128, 128, 128)",grey:"rgb(128, 128, 128)",green:"rgb(0, 128, 0)",greenyellow:"rgb(173, 255, 47)",honeydew:"rgb(240, 255, 240)",hotpink:"rgb(255, 105, 180)",indianred:"rgb(205, 92, 92)",indigo:"rgb(75, 0, 130)",ivory:"rgb(255, 255, 240)",khaki:"rgb(240, 230, 140)",lavender:"rgb(230, 230, 250)",lavenderblush:"rgb(255, 240, 245)",lawngreen:"rgb(124, 252, 0)",lemonchiffon:"rgb(255, 250, 205)",lightblue:"rgb(173, 216, 230)",lightcoral:"rgb(240, 128, 128)",lightcyan:"rgb(224, 255, 255)",lightgoldenrodyellow:"rgb(250, 250, 210)",lightgreen:"rgb(144, 238, 144)",lightgray:"rgb(211, 211, 211)",lightgrey:"rgb(211, 211, 211)",lightpink:"rgb(255, 182, 193)",lightsalmon:"rgb(255, 160, 122)",lightseagreen:"rgb(32, 178, 170)",lightskyblue:"rgb(135, 206, 250)",lightslategray:"rgb(119, 136, 153)",lightslategrey:"rgb(119, 136, 153)",lightsteelblue:"rgb(176, 196, 222)",lightyellow:"rgb(255, 255, 224)",lime:"rgb(0, 255, 0)",limegreen:"rgb(50, 205, 50)",linen:"rgb(250, 240, 230)",magenta:"rgb(255, 0, 255)",maroon:"rgb(128, 0, 0)",mediumaquamarine:"rgb(102, 205, 170)",mediumblue:"rgb(0, 0, 205)",mediumorchid:"rgb(186, 85, 211)",mediumpurple:"rgb(147, 112, 219)",mediumseagreen:"rgb(60, 179, 113)",mediumslateblue:"rgb(123, 104, 238)",mediumspringgreen:"rgb(0, 250, 154)",mediumturquoise:"rgb(72, 209, 204)",mediumvioletred:"rgb(199, 21, 133)",midnightblue:"rgb(25, 25, 112)",mintcream:"rgb(245, 255, 250)",mistyrose:"rgb(255, 228, 225)",moccasin:"rgb(255, 228, 181)",navajowhite:"rgb(255, 222, 173)",navy:"rgb(0, 0, 128)",oldlace:"rgb(253, 245, 230)",olive:"rgb(128, 128, 0)",olivedrab:"rgb(107, 142, 35)",orange:"rgb(255, 165, 0)",orangered:"rgb(255, 69, 0)",orchid:"rgb(218, 112, 214)",palegoldenrod:"rgb(238, 232, 170)",palegreen:"rgb(152, 251, 152)",paleturquoise:"rgb(175, 238, 238)",palevioletred:"rgb(219, 112, 147)",papayawhip:"rgb(255, 239, 213)",peachpuff:"rgb(255, 218, 185)",peru:"rgb(205, 133, 63)",pink:"rgb(255, 192, 203)",plum:"rgb(221, 160, 221)",powderblue:"rgb(176, 224, 230)",purple:"rgb(128, 0, 128)",rebeccapurple:"rgb(102, 51, 153)",red:"rgb(255, 0, 0)",rosybrown:"rgb(188, 143, 143)",royalblue:"rgb(65, 105, 225)",saddlebrown:"rgb(139, 69, 19)",salmon:"rgb(250, 128, 114)",sandybrown:"rgb(244, 164, 96)",seagreen:"rgb(46, 139, 87)",seashell:"rgb(255, 245, 238)",sienna:"rgb(160, 82, 45)",silver:"rgb(192, 192, 192)",skyblue:"rgb(135, 206, 235)",slateblue:"rgb(106, 90, 205)",slategray:"rgb(112, 128, 144)",slategrey:"rgb(112, 128, 144)",snow:"rgb(255, 250, 250)",springgreen:"rgb(0, 255, 127)",steelblue:"rgb(70, 130, 180)",tan:"rgb(210, 180, 140)",teal:"rgb(0, 128, 128)",thistle:"rgb(216, 191, 216)",tomato:"rgb(255, 99, 71)",turquoise:"rgb(64, 224, 208)",violet:"rgb(238, 130, 238)",wheat:"rgb(245, 222, 179)",white:"rgb(255, 255, 255)",whitesmoke:"rgb(245, 245, 245)",yellow:"rgb(255, 255, 0)",yellowgreen:"rgb(154, 205, 50)",transparent:"rgba(0, 0, 0, 0)"};var yn={isColorName:function(t){return!!hn[t]},getColorByName:function(t){return hn[t]}};function dn(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e-1||e[r].indexOf("rgb")>-1||e[r].indexOf("hsl")>-1)n.push({color:e[r]});else{var i=yn.getColorByName(e[r]);i&&n.push({color:e[r],nameColor:i})}var a={next:0};return n.forEach(function(e){var n=t.indexOf(e.color,a.next);e.startIndex=n,e.endIndex=n+e.color.length,a.next=e.endIndex}),n}function wn(t){var e=mn(t);return e.forEach(function(e,n){t=t.replace(e.color,"@"+n)}),{str:t,matches:e}}function kn(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:",",n=wn(t);return n.str.split(e).map(function(t,e){return t=Sn(t),n.matches[e]&&(t=t.replace("@"+e,n.matches[e].color)),t})}function On(t,e){return e.forEach(function(e,n){t=t.replace("@"+n,e.color)}),t}function Sn(t){return t.replace(/^\s+|\s+$/g,"")}function jn(t){if(ke(t)){if(yn.isColorName(t)&&(t=yn.getColorByName(t)),t.indexOf("rgb(")>-1){for(var e=0,n=(r=t.replace("rgb(","").replace(")","").split(",")).length;e-1){for(e=0,n=(r=t.replace("rgba(","").replace(")","").split(",")).length;e-1){for(e=0,n=(r=t.replace("hsl(","").replace(")","").split(",")).length;e-1){for(e=0,n=(r=t.replace("hsla(","").replace(")","").split(",")).length;e>16,g:(65280&t)>>8,b:(255&t)>>0,a:1},We(i));if(0<=t&&t<=4294967295)return i=vn({},i={type:"hex",r:(4278190080&t)>>24,g:(16711680&t)>>16,b:(65280&t)>>8,a:(255&t)/255},We(i))}return t}function Pn(t){ke(t)&&(t=kn(t));var e=(t=t.map(function(t){if(ke(t)){var e=wn(t),n=Sn(e.str).split(Gt);return n[1]?n[1].includes("%")?n[1]=parseFloat(n[1].replace(/%/,""))/100:n[1]=parseFloat(n[1]):n[1]="*",n[0]=On(n[0],e.matches),n}if(Array.isArray(t))return t[1]?ke(t[1])&&(t[1].includes("%")?t[1]=parseFloat(t[1].replace(/%/,""))/100:t[1]=+t[1]):t[1]="*",dn(t)})).filter(function(t){return"*"===t[1]}).length;if(e>0){var n=(1-t.filter(function(t){return"*"!=t[1]&&1!=t[1]}).map(function(t){return t[1]}).reduce(function(t,e){return t+e},0))/e;t.forEach(function(e,r){"*"==e[1]&&r>0&&(t.length-1==r||(e[1]=n))})}return t}function xn(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:.5,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"hex",o=$n(t,e,n);return Be(o,o.a<1?"rgb":r)}function $n(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:.5;return{r:L(t.r+(e.r-t.r)*n),g:L(t.g+(e.g-t.g)*n),b:L(t.b+(e.b-t.b)*n),a:L(t.a+(e.a-t.a)*n,100)}}function Cn(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5;if(!t)return[];ke(t)&&(t=kn(t));for(var n=(t=t||[]).length,r=[],o=0;o2&&void 0!==arguments[2]?arguments[2]:.5,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"hex";return xn(jn(t),jn(e),n,r)}function En(t,e){return _n(t,e,arguments.length>2&&void 0!==arguments[2]?arguments[2]:.5,arguments.length>3&&void 0!==arguments[3]?arguments[3]:"hex")}function Tn(t){return t=jn(t),(Math.round(299*t.r)+Math.round(587*t.g)+Math.round(114*t.b))/1e3}function Rn(t){return Tn(t)>=128?"black":"white"}function In(t){for(var e=[],n=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:10)-((t=Pn(t)).length-1),r=n,o=1,i=t.length;o1&&void 0!==arguments[1]?arguments[1]:"h",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:9,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"rgb",o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:1,a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:100,u=Ue(jn(t)),c=(i-o)*a/n,l=[],s=1;s<=n;s++)u[e]=Math.abs((a-c*s)/a),l.push(Be(un(u),r));return l}function An(t){return Bn(t,"h",arguments.length>1&&void 0!==arguments[1]?arguments[1]:9,arguments.length>2&&void 0!==arguments[2]?arguments[2]:"rgb",arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,arguments.length>4&&void 0!==arguments[4]?arguments[4]:360,1)}function Mn(t){return Bn(t,"s",arguments.length>1&&void 0!==arguments[1]?arguments[1]:9,arguments.length>2&&void 0!==arguments[2]?arguments[2]:"rgb",arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,100)}function Dn(t){return Bn(t,"v",arguments.length>1&&void 0!==arguments[1]?arguments[1]:9,arguments.length>2&&void 0!==arguments[2]?arguments[2]:"rgb",arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,100)}function zn(t,e){if(t.length!==e.length)return!1;for(var n=0,r=t.length;n0)l=Hn(u);else l=e[Math.floor(i()*e.length)];o=!zn(l,c),r[a]=l}return o}var Gn=function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:10,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"linear";t=t,e=e||Math.max(2,Math.ceil(Math.sqrt(t.length/2)));var i=n||"euclidean";ke(i)&&(i=Fn[i]);for(var a=0,u=function(){return(a=(9301*a+49297)%233280)/233280},c=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"linear";return Vn[n](t.length,e).map(function(e){return t[e]})}(t,e,o),l=!0,s=0;l&&(l=Xn(e,t,Nn(e,t,c,i),c,!1,u),++s%r!=0););return c};function Yn(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.isLoaded=!1,this.imageUrl=e,this.opt=n,this.initialize()}var e,n,r;return e=t,(n=[{key:"initialize",value:function(){this.canvas=this.createCanvas(),this.context=this.canvas.getContext("2d")}},{key:"createCanvas",value:function(){return document.createElement("canvas")}},{key:"load",value:function(t){this.loadImage(t)}},{key:"loadImage",value:function(t){var e=this;this.getImage(function(n){var r=e.context,o=n.height/n.width;e.opt.canvasWidth&&e.opt.canvasHeight?(e.canvas.width=e.opt.canvasWidth,e.canvas.height=e.opt.canvasHeight):(e.canvas.width=e.opt.maxWidth?e.opt.maxWidth:n.width,e.canvas.height=e.canvas.width*o),r.drawImage(n,0,0,n.width,n.height,0,0,e.canvas.width,e.canvas.height),e.isLoaded=!0,t&&t()})}},{key:"getImage",value:function(t){this.newImage=new Image;var e=this.newImage;e.onload=function(){t&&t(e)},e.onerror=function(t){console.log(t,e.src)},this.getImageUrl(function(t){e.src=t})}},{key:"load",value:function(t){var e=this;this.newImage=new Image;var n=this.newImage;n.crossOrigin="Anonymous",n.onload=function(){e.isLoaded=!0,t&&t()},this.getImageUrl(function(t){n.src=t})}},{key:"getImageUrl",value:function(t){if(ke(this.imageUrl))return t(this.imageUrl);if(this.imageUrl instanceof Blob){var e=new FileReader;e.onload=function(e){t(e.target.result)},e.readAsDataURL(this.imageUrl)}}},{key:"getRGBA",value:function(t,e,n,r){return[t,e,n,r]}},{key:"toArray",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.context.getImageData(0,0,this.canvas.width,this.canvas.height),o=r.width,i=r.height;t||(t=function(t,e){e(t)}),t({pixels:new Uint8ClampedArray(r.data),width:o,height:i},function(t){var r=b.drawPixels(t);"canvas"==n.returnTo?e(r):e(r.toDataURL(n.outputFormat||"image/png"))},n)}},{key:"toHistogram",value:function(t){var e=this.context.getImageData(0,0,this.canvas.width,this.canvas.height),n=e.width,r=e.height,o={pixels:new Uint8ClampedArray(e.data),width:n,height:r};return b.getHistogram(o)}},{key:"toRGB",value:function(){for(var t=this.context.getImageData(0,0,this.canvas.width,this.canvas.height).data,e=[],n=0,r=t.length;n1&&void 0!==arguments[1]?arguments[1]:6,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"hex";return t.length>e&&(t=Gn(t,e)),t.map(function(t){return Be(t,n)})}function Jn(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;if(n){if(n){var r;(r=new Un(t,e)).loadImage(function(){je(n)&&n(r.toRGB())})}}else(r=new Un(t)).loadImage(function(){je(e)&&e(r.toRGB())})}function Zn(t,e,n){Qn(t,e,n,function(t){for(var e=1;e3&&void 0!==arguments[3]?arguments[3]:{frameTimer:"full"}))}function Qn(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{frameTimer:"full"},o=new Un(t);o.loadImage(function(){o.toArray(e,function(t){je(n)&&n(t)},r)})}function tr(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=new Un(t);r.loadImage(function(){je(e)&&e(r.toHistogram(n))})}function er(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.2,n=[],r=0;r2&&void 0!==arguments[2]?arguments[2]:{width:200,height:100},r=new Un(t);r.loadImage(function(){b.createHistogram(n.width||200,n.height||100,r.toHistogram(n),function(t){je(e)&&e(t.toDataURL("image/png"))},n)})}function rr(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var or=function(t){for(var e=1;e=t){e=ir[r-1],n=ir[r];break}return e&&n?or.interpolateRGB(e,n,(t-e.start)/(n.start-e.start)):ir[0].rgb}};function ur(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var cr=function(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=function(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";dr(this,t),this.value=e,this.unit=n}var e,n,r;return e=t,n=[{key:Symbol.toPrimitive,value:function(t){return"number"==t?this.value:this.toString()}},{key:"toString",value:function(){switch(this.unit){case"string":case"number":return this.value+"";case"var":return"var(--".concat(this.value,")");case"calc":return"calc(".concat(this.value,")");default:return this.value+this.unit}}},{key:"isUnitType",value:function(t){return this.unit===t}},{key:"isCalc",value:function(){return this.isUnitType("calc")}},{key:"isFr",value:function(){return this.isUnitType("fr")}},{key:"isPercent",value:function(){return this.isUnitType("%")}},{key:"isPx",value:function(){return this.isUnitType("px")}},{key:"isEm",value:function(){return this.isUnitType("em")}},{key:"isDeg",value:function(){return this.isUnitType("deg")}},{key:"isSecond",value:function(){return this.isUnitType("s")}},{key:"isMs",value:function(){return this.isUnitType("ms")}},{key:"isNumber",value:function(){return this.isUnitType("number")}},{key:"isString",value:function(){return this.isUnitType("")}},{key:"isVar",value:function(){return this.isUnitType("--")}},{key:"set",value:function(t){return this.value=t,this}},{key:"add",value:function(t){return this.value+=+t,this}},{key:"sub",value:function(t){return this.add(-1*t)}},{key:"mul",value:function(t){return this.value*=+t,this}},{key:"div",value:function(t){return this.value/=+t,this}},{key:"mod",value:function(t){return this.value%=+t,this}},{key:"clone",value:function(){return new t(this.value,this.unit)}},{key:"getUnitName",value:function(){return"%"===this.unit?"percent":this.unit}},{key:"toJSON",value:function(){return{value:this.value,unit:this.unit}}},{key:"rate",value:function(t){return t/this.value}},{key:"stringToPercent",value:function(){return ge(vr[this.value])?t.percent(vr[this.value]):t.percent(0)}},{key:"stringToEm",value:function(t){return this.stringToPercent().toEm(t)}},{key:"stringToPx",value:function(t){return this.stringToPercent().toPx(t)}},{key:"toPercent",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:16;return this.isPercent()?this:this.isPx()?t.percent(100*this.value/e):this.isEm()?t.percent(this.value*n*100/e):this.isString()?this.stringToPercent(e):this.isDeg()?t.percent(this.value/360*100):void 0}},{key:"toEm",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:16;return this.isPercent()?t.em(this.value/100*e/n):this.isPx()?t.em(this.value/n):this.isEm()?this:this.isString()?this.stringToEm(e):void 0}},{key:"toPx",value:function(e){arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.isPercent()?t.px(this.value/100*e):this.isPx()?this:this.isEm()?t.px(this.value/100*e/16):this.isString()?this.stringToPx(e):void 0}},{key:"toSecond",value:function(){return this.isSecond()?this:this.isMs()?t.second(this.value/1e3):void 0}},{key:"toMs",value:function(){return this.isSecond()?t.ms(1e3*this.value):this.isMs()?this:void 0}},{key:"to",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:16;return"px"===t?this.toPx(e,n):"%"===t||"percent"===t?this.toPercent(e,n):"em"===t?this.toEm(e,n):void 0}},{key:"toUnit",value:function(e){return new t(this.value,e)}},{key:"calculate",value:function(t,e){var n=this[t];return n?n.call(this,e):this}},{key:"includes",value:function(){for(var t=arguments.length,e=new Array(t),n=0;ne[o].value&&(r=e[o]);return r}},{key:"max",value:function(){for(var t=arguments.length,e=new Array(t),n=0;n-1)return new t(e.split("calc(")[1].split(")")[0],"calc");var n=e.replace(gr,"$1 $2").split(" ");return+n[0]==n[0]?new t(+n[0],n[1]):new t(n[0])}if(e instanceof t)return e;if(e.unit){if("%"==e.unit||"percent"==e.unit){var r=0;return ge(e.percent)?r=e.percent:ge(e.value)&&(r=e.value),t.percent(r)}if("px"==e.unit){r=0;return ge(e.px)?r=e.px:ge(e.value)&&(r=e.value),t.px(r)}if("em"==e.unit){r=0;return ge(e.em)?r=e.em:ge(e.value)&&(r=e.value),t.em(r)}if("deg"==e.unit){r=0;return ge(e.deg)?r=e.deg:ge(e.value)&&(r=e.value),t.deg(r)}if("s"==e.unit){r=0;return ge(e.second)?r=e.second:ge(e.value)&&(r=e.value),t.second(r)}if("ms"==e.unit){r=0;return ge(e.ms)?r=e.ms:ge(e.value)&&(r=e.value),t.ms(r)}if("number"==e.unit){r=0;return ge(e.value)&&(r=e.value),t.number(r)}if("--"==e.unit){r=0;return ge(e.value)&&(r=e.value),t.var(r)}if(""===e.unit||"string"===e.unit){r="";return ge(e.str)?r=e.str:ge(e.value)&&(r=e.value),t.string(r)}}return t.string(e)}}],n&&yr(e.prototype,n),r&&yr(e,r),t}();function wr(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e0&&void 0!==arguments[0]?arguments[0]:"block";return this.css("display","none"!=t?t:"block")}},{key:"hide",value:function(){return this.css("display","none")}},{key:"toggle",value:function(t){var e="none"==this.css("display");return 1==arguments.length?e&&t?this.show():this.hide():e?this.show():this.hide()}},{key:"setScrollTop",value:function(t){return this.el.scrollTop=t,this}},{key:"setScrollLeft",value:function(t){return this.el.scrollLeft=t,this}},{key:"scrollTop",value:function(){return this.el===document.body?t.getScrollTop():this.el.scrollTop}},{key:"scrollLeft",value:function(){return this.el===document.body?t.getScrollLeft():this.el.scrollLeft}},{key:"scrollHeight",value:function(){return this.el.scrollHeight}},{key:"on",value:function(t,e,n,r){return this.el.addEventListener(t,e,n,r),this}},{key:"off",value:function(t,e){return this.el.removeEventListener(t,e),this}},{key:"getElement",value:function(){return this.el}},{key:"createChild",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Xt,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=new t(e,n,r);return i.css(o),this.append(i),i}},{key:"firstChild",value:function(){return new t(this.el.firstElementChild)}},{key:"children",value:function(){var e=this.el.firstElementChild;if(!e)return[];var n=[];do{n.push(new t(e)),e=e.nextElementSibling}while(e);return n}},{key:"childLength",value:function(){return this.el.children.length}},{key:"replace",value:function(t){return this.el.parentNode.replaceChild(t.el||t,this.el),this}},{key:"checked",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return 0==arguments.length?!!this.el.checked:(this.el.checked=!!t,this)}},{key:"focus",value:function(){return this.el.focus(),this}},{key:"select",value:function(){return this.el.select(),this}},{key:"blur",value:function(){return this.el.blur(),this}},{key:"select",value:function(){return this.el.select(),this}},{key:"context",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"2d";return this._initContext||(this._initContext=this.el.getContext(t)),this._initContext}},{key:"resize",value:function(t){var e=t.width,n=t.height;this._initContext=null;var r=this.context(),o=window.devicePixelRatio||1;this.px("width",e),this.px("height",n),this.el.width=e*o,this.el.height=n*o,r.scale(o,o)}},{key:"clear",value:function(){this.context().clearRect(0,0,this.el.width,this.el.height)}},{key:"update",value:function(t){this.clear(),t.call(this,this)}},{key:"drawOption",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.context();Object.assign(e,t)}},{key:"drawLine",value:function(t,e,n,r){var o=this.context();o.beginPath(),o.moveTo(t,e),o.lineTo(n,r),o.stroke(),o.closePath()}},{key:"drawPath",value:function(){var t=this.context();t.beginPath();for(var e=arguments.length,n=new Array(e),r=0;r1&&void 0!==arguments[1]?arguments[1]:Ar;Pr(this,t),this.value=e,this.split=n}return Cr(t,[{key:"toString",value:function(){return" ".concat(this.split," ")+this.value}}]),t}(),Er=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ar;Pr(this,t),this.value=e,this.split=n}return Cr(t,[{key:"toString",value:function(){return" ".concat(this.split," after(").concat(this.value,")")}}]),t}(),Tr=/^load (.*)/gi,Rr=/^bind (.*)/gi,Ir=["click|dblclick","mouse(down|up|move|over|out|enter|leave)","pointer(start|move|end)","touch(start|move|end)","key(down|up|press)","drag|drop|drag(start|over|enter|leave|exit|end)","contextmenu","change|input|focus|blur|focus(in|out)","paste","resize|scroll|wheel|mousewheel|DOMMouseScroll","submit"].join("|"),Br=new RegExp("^(".concat(Ir,")"),"ig"),Ar="|",Mr=Gt,Dr={},zr=function(){for(var t=arguments.length,e=new Array(t),n=0;n1&&void 0!==arguments[1]?arguments[1]:Ar;return new _r(t,e)}),no=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ar;return new Er(t,e)},ro=eo,oo=eo("ArrowUp"),io=eo("ArrowDown"),ao=(eo("ArrowLeft"),eo("ArrowRight"),eo("Enter"),eo("Space"),eo("isAltKey"),eo("isShiftKey")),uo=(eo("isMetaKey"),eo("isCtrlKey"),eo("self")),co=(eo("fit"),eo("passive"),function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100;return eo("debounce(".concat(t,")"))}),lo=(eo("capture()"),function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"move";return no("bodyMouseMove ".concat(t))}),so=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"end";return no("bodyMouseUp ".concat(t))},fo=no("preventDefault"),po=no("stopPropagation"),ho=function(){return"load "+(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"$el")},yo=function(){return!0},vo=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"$el",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Xt;return"bind "+t+Ar+function(t){if(t===Xt)return Xt;var e=W();return Dr[e]=t,e}(e)},bo={addEvent:function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];t&&t.addEventListener(e,n,r)},removeEvent:function(t,e,n){t&&t.removeEventListener(e,n)},pos:function(t){return t.touches&&t.touches[0]?t.touches[0]:t},posXY:function(t){var e=this.pos(t);return{x:e.pageX,y:e.pageY}}},go="*/",mo="/";function wo(t){return go+t}function ko(t){return mo+t}function Oo(t,e){for(var n=0;n3&&void 0!==arguments[3]?arguments[3]:0,o=r>0?pe(e,r):e;this.callbacks.push({event:t,callback:o,context:n,originalCallback:e})}},{key:"off",value:function(t,e){0==arguments.length?(this.callbacks=[],this.cachedCallback={}):1==arguments.length?(this.callbacks=this.callbacks.filter(function(e){return e.event!=t}),this.cachedCallback={}):2==arguments.length&&(this.callbacks=this.callbacks.filter(function(n){return!(n.event==t&&n.originalCallback==e)}),this.cachedCallback={})}},{key:"sendMessage",value:function(t,e,n,r,o,i){var a=this;setTimeout(function(){var u=a.cachedCallback[e];u&&u.filter(function(e){return e.originalCallback.source!==t}).forEach(function(t){return t.callback(n,r,o,i)})},0)}},{key:"triggerMessage",value:function(t,e,n,r,o,i){var a=this;setTimeout(function(){var u=a.cachedCallback[e];u?u.filter(function(e){return e.originalCallback.source===t}).forEach(function(t){return t.callback(n,r,o,i)}):console.warn(e," is not valid event")},0)}},{key:"makeCachedCallback",value:function(t){this.cachedCallback[t]||(this.cachedCallback[t]=this.callbacks.filter(function(e){return e.event===t}))}},{key:"emit",value:function(t,e,n,r,o){var i=t;this.makeCachedCallback(i),this.sendMessage(this.source,t,e,n,r,o)}},{key:"trigger",value:function(t,e,n,r,o){var i=t;this.makeCachedCallback(i),this.triggerMessage(this.source,t,e,n,r,o)}}])&&Oo(e.prototype,n),r&&Oo(e,r),t}();function jo(){var t=function(t,e){e||(e=t.slice(0));return Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}(["\n ","\n "]);return jo=function(){return t},t}function Po(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function xo(t,e){for(var n=0;n-1}),r=n.map(function(t){var n=Eo(t.split("".concat(e,"("))[1].split(")")[0].trim().split(" "),2);return{target:n[0],param:n[1]}});return[n,r]},Lo=function(t,e,n){e.callback=function(t,e,n){return e.delegate?Do(t,e,n):Mo(t,e,n)}(t,e,n),t.addBinding(e),bo.addEvent(e.dom,e.eventName,e.callback,!!e.captures.length)},Ho=function(t,e,n,r){var o=$o(e),i=o[0],a=o[1],u=o.slice(2),c=function(t,e,n){var r=n,o=r.filter(function(e){return!!t[e]}),i=Eo(Vo(r,"after"),2),a=i[0],u=i[1],c=Eo(Vo(r,"before"),2),l=c[0],s=c[1],f=Eo(Vo(r,"debounce"),2),p=f[0],h=f[1],y=Eo(Vo(r,"capture"),1)[0],d=[].concat(Co(o),Co(a),Co(l),Co(p),Co(y));return{eventName:e,codes:r.filter(function(t){return!d.includes(t)}).map(function(t){return t.toLowerCase()}),captures:y,afterMethods:u,beforeMethods:s,debounceMethods:h,checkMethodList:o}}(t,i,n);(c.dom=function(t,e){var n;return(n=e?t.refs[e]||t[e]||window[e]:t.el||t.$el||t.$root)instanceof jr?n.getElement():n}(t,a),c.delegate=u.join(Mr),c.debounceMethods.length)&&(r=pe(r,+c.debounceMethods[0].target));Lo(t,c,r)},No=function(t,e){var n=e.split(Ar).map(function(t){return t.trim()}),r=$o(n.shift().split(Mr)),o=r[0],i=r.slice(1),a=function(t){var e=[];return t.split(":").forEach(function(t){var n=t.split(":");e.push.apply(e,Co(n))}),e}(o),u=t[e].bind(t);a.forEach(function(e){Ho(t,[e].concat(Co(i)),n,u)})},Xo=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.state={},this.prevState={},this.refs={},this.children={},this._bindings=[],this.id=W(),this.childComponents=this.components(),this.counters={}}var e,n,r;return e=t,(n=[{key:"initState",value:function(){return{}}},{key:"setState",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.prevState=this.state,this.state=function(t){for(var e=1;e")}},{key:"templateClass",value:function(){return null}},{key:"eachChildren",value:function(t){je(t)&&he(this.children,function(e,n){t(n)})}},{key:"initializeEvent",value:function(){this.initializeDomEvent(),this.eachChildren(function(t){t.initializeEvent()})}},{key:"destroy",value:function(){this.destroyDomEvent(),this.eachChildren(function(t){t.destroy()})}},{key:"destroyDomEvent",value:function(){this.removeEventAll()}},{key:"initializeDomEvent",value:function(){var t=this;this.destroyDomEvent(),this.filterProps(Br).forEach(function(e){return No(t,e)})}},{key:"collectProps",value:function(){var t=this,e=this.__proto__,n=[];do{if(!1===e instanceof Object)break;var r=Object.getOwnPropertyNames(e).filter(function(e){return je(t[e])});n.push.apply(n,Co(r)),e=e.__proto__}while(e);return n}},{key:"filterProps",value:function(t){return this.collectProps().filter(function(e){return e.match(t)})}},{key:"self",value:function(t){return t&&t.$delegateTarget&&t.$delegateTarget.is(t.target)}},{key:"isAltKey",value:function(t){return t.altKey}},{key:"isCtrlKey",value:function(t){return t.ctrlKey}},{key:"isShiftKey",value:function(t){return t.shiftKey}},{key:"isMetaKey",value:function(t){return t.metaKey}},{key:"preventDefault",value:function(t){return t.preventDefault(),!0}},{key:"stopPropagation",value:function(t){return t.stopPropagation(),!0}},{key:"bodyMouseMove",value:function(t,e){this[e]&&this.emit("add/body/mousemove",this[e],this,t.xy)}},{key:"bodyMouseUp",value:function(t,e){this[e]&&this.emit("add/body/mouseup",this[e],this,t.xy)}},{key:"getBindings",value:function(){return this._bindings||this.initBindings(),this._bindings}},{key:"addBinding",value:function(t){this.getBindings().push(t)}},{key:"initBindings",value:function(){this._bindings=[]}},{key:"removeEventAll",value:function(){var t=this;this.getBindings().forEach(function(e){t.removeEvent(e)}),this.initBindings()}},{key:"removeEvent",value:function(t){var e=t.eventName,n=t.dom,r=t.callback;bo.removeEvent(n,e,r)}}])&&xo(e.prototype,n),r&&xo(e,r),t}();function Go(t){return(Go="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 Yo(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=Uo(this,Wo(e).call(this,t))).initializeProperty(t,r),n.created(),n.initialize(),n.initializeStoreEvent(),n}var n,r,o;return 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&&qo(t,e)}(e,Xo),n=e,(r=[{key:"initializeProperty",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.opt=t||{},this.parent=this.opt,this.props=e,this.source=W(),this.sourceName=this.constructor.name,t&&t.$store&&(this.$store=t.$store)}},{key:"created",value:function(){}},{key:"getRealEventName",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"ME@",n=t.indexOf(e);return t.substr(n<0?0:n+e.length)}},{key:"initializeStoreEvent",value:function(){var t=this;this.storeEvents={},this.filterProps(Jo).forEach(function(e){t.getRealEventName(e,"ME@").split("|").forEach(function(n){n=t.getRealEventName(n);var r=t[e].bind(t);r.displayName=n,r.source=t.source,t.storeEvents[n]=r,t.$store.on(n,t.storeEvents[n],t)})})}},{key:"destoryStoreEvent",value:function(){var t=this;he(this.storeEvents,function(e,n){t.$store.off(e,n)})}},{key:"destroy",value:function(){Ko(Wo(e.prototype),"destroy",this).call(this),this.destoryStoreEvent()}},{key:"get",value:function(t){return this.$store.items[t]||{}}},{key:"read",value:function(t,e,n,r,o){return this.$store.read(t,e,n,r,o)}},{key:"mapGetters",value:function(){var t;return(t=this.$store).mapGetters.apply(t,arguments)}},{key:"mapActions",value:function(){var t;return(t=this.$store).mapActions.apply(t,arguments)}},{key:"mapDispatches",value:function(){var t;return(t=this.$store).mapDispatches.apply(t,arguments)}},{key:"config",value:function(t,e,n,r,o){if(1==arguments.length)return this.$store.tool[t];this.dispatch("tool/set",t,e,n,r,o)}},{key:"initConfig",value:function(t,e){this.$store.tool[t]=e}},{key:"run",value:function(t,e,n,r,o){return this.$store.run(t,e,n,r,o)}},{key:"dispatch",value:function(t,e,n,r,o){return this.$store.source=this.source,this.$store.dispatch(t,e,n,r,o)}},{key:"emit",value:function(t,e,n,r,o){this.$store.source=this.source,this.$store.emit(t,e,n,r,o)}},{key:"trigger",value:function(t,e,n,r,o){this.$store.source=this.source,this.$store.trigger(t,e,n,r,o)}},{key:"on",value:function(t,e){this.$store.on(t,e)}},{key:"off",value:function(t,e){this.$store.off(t,e)}}])&&Yo(n.prototype,r),o&&Yo(n,o),e}();function ti(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),n instanceof t&&(n=n.toJSON()),this.json=this.convert(ai({},this.getDefaultObject(),n)),new Proxy(this,{get:function(t,e){var n=t[e];return je(n)?function(){for(var e=arguments.length,r=new Array(e),o=0;o0&&void 0!==arguments[0]?arguments[0]:{};return Si.search(ai({parentId:this.id},t))}},{key:"one",value:function(t){return this.search(t)[0]}},{key:"clone",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=JSON.parse(JSON.stringify(this.json));return t&&delete e.id,new(0,this.constructor)(e)}},{key:"addItem",value:function(t,e,n){if(e.itemType!=t)throw new Error("Only ".concat(t," is able to add in ").concat(this.json.type));var r=Si.add(this.id,e);return be(n)?this.sort():this.sort(n),r}},{key:"add",value:function(t){return this.addItem(t.itemType,t,t.itemType)}},{key:"reset",value:function(e){e instanceof t&&(e=e.toJSON()),this.json=this.convert(ai({},this.json,e))}},{key:"getDefaultObject",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return ai({id:q(),index:Number.MAX_SAFE_INTEGER,visible:!0,lock:!1},t)}},{key:"toggle",value:function(t,e){be(e)?this.json[t]=!this.json[t]:this.json[t]=!!e}},{key:"toJSON",value:function(){return this.json}},{key:"is",value:function(t){return this.json.itemType==t}},{key:"remove",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];Si.remove(this.id,t)}},{key:"clear",value:function(t){ge(t)?this.search({itemType:t}).forEach(function(t){return t.remove()}):Si.removeChildren(this.id,this)}},{key:"parent",value:function(){return Si.get(this.parentId)}},{key:"sort",value:function(t){var e=this.children;t&&(e=e.filter(function(e){return e.itemType===t})),e.sort(function(t,e){return t.index===e.index?0:t.index>e.index?1:-1}),e.forEach(function(t,e){t.index=100*e})}},{key:"copy",value:function(){return Si.copy(this.id)}},{key:"insertLast",value:function(t){var e=this.parent(),n=t.parent();t.parentId=this.json.parentId,t.index=this.json.index+1,e.sort(),n.sort()}},{key:"path",value:function(t){var e=[],n=ge(t)?t:this.parentId;t||(e=[Si.get(this.json.id)]);do{var r=Si.get(n);r&&e.push(r),n=r?r.parentId:this.json.parentId}while(n);return e}},{key:"title",get:function(){return"".concat(this.json.name||this.getDefaultTitle())}},{key:"id",get:function(){return this.json.id}},{key:"parentId",get:function(){return this.json.parentId}},{key:"children",get:function(){var t=Si.children(this.id);return t.sort(function(t,e){return t.index===e.index?0:t.index>e.index?1:-1}),t}}])&&ci(e.prototype,n),r&&ci(e,r),t}();function si(t){for(var e=1;e0&&void 0!==arguments[0]&&arguments[0];return{x:mr.px(0),y:mr.px(0),width:mr.px(0),height:mr.px(0)}}},{key:"reset",value:function(t){t instanceof li&&(t=t.toJSON()),this.json=this.convert(si({},this.json,t))}},{key:"convert",value:function(t){return t.width=mr.parse(t.width),t.height=mr.parse(t.height),t.x=mr.parse(t.x),t.y=mr.parse(t.y),t}},{key:"checkInArea",value:function(t){return 0!==t.width.value&&(0!==t.height.value&&(!(t.screenX2.valuethis.screenX2.value)&&!(t.screenY.value>this.screenY2.value)))))}},{key:"checkInOffset",value:function(t){return 0!==t.width.value&&(0!==t.height.value&&(!(this.screenX.value>t.width+t.left)&&(!(this.screenX2.valuet.height+t.top)&&!(this.screenY2.value1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=this.currentLayer;r&&r.reset(e),(n||this.editor).emit(t,r)}},{key:"updateRect",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=this.currentRect;r&&r.reset(e),(n||this.editor).emit(t,r)}},{key:"updateArtBoard",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=this.currentArtBoard;r&&r.reset(e),(n||this.editor).emit(t,r)}},{key:"updateDirectory",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=this.currentDirectory;r&&r.reset(e),(n||this.editor).emit(t,r)}},{key:"updateProject",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=this.currentProject;r&&r.reset(e),(n||this.editor).emit(t,r)}},{key:"check",value:function(t){return!!this._idSet.has(t)||(!(!this._artboard||this._artboard.id!=t)||!(!this._project||this._project.id!=t))}},{key:"checkOne",value:function(t){return this._idSet.has(t)}},{key:"isEmpty",value:function(){return 0===this._ids.length}},{key:"isNotEmpty",value:function(){return this._ids.length>0}},{key:"count",value:function(){return this._ids.length}},{key:"unitValues",value:function(){return this.items.map(function(t){var e=t.x.value,n=t.y.value,r=t.width.value,o=t.height.value;return{id:t.id,x:e,y:n,width:r,height:o,x2:e+r,y2:n+o,centerX:e+r/2,centerY:n+o/2}})}},{key:"search",value:function(t){return this.items.filter(function(e){return e.itemType===t})}},{key:"is",value:function(t){return this._mode===t}},{key:"select",value:function(){for(var t=this,e=arguments.length,n=new Array(e),r=0;ri&&(t=i),e>a&&(e=a),n1&&void 0!==arguments[1])||arguments[1])&&this.removeChildren(t),mi.delete(t)}},{key:"copy",value:function(){for(var t=this,e=arguments.length,n=new Array(e),r=0;r0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1?arguments[1]:void 0,r=[];if(""==e)r=this.projects;else{var o=this.get(e);o?r=o.children:n&&(r=n.children)}r.length&&r.forEach(function(e){t.removeChildren(e.id),t.remove(e.id)})}},{key:"get",value:function(t){return mi.get(t)}},{key:"set",value:function(t,e){mi.set(t,e)}},{key:"has",value:function(t){return mi.has(t)}},{key:"search",value:function(t){var e=Object.keys(t),n=[],r=!0,o=!1,i=void 0;try{for(var a,u=function(){var r=bi(a.value,2),o=(r[0],r[1]);e.every(function(e){return t[e]===o[e]})&&(n[n.length]=o)},c=mi[Symbol.iterator]();!(r=(a=c.next()).done);r=!0){u()}}catch(t){o=!0,i=t}finally{try{r||null==c.return||c.return()}finally{if(o)throw i}}return n.sort(function(t,e){return t.index>e.index?1:-1}),n}},{key:"sort",value:function(t){var e=[];"project"===t&&(e=this.projects),e.sort(function(t,e){return t.index===e.index?0:t.index>e.index?1:-1}),e.forEach(function(t,e){t.index=100*e})}},{key:"children",value:function(t){var e=[],n=!0,r=!1,o=void 0;try{for(var i,a=mi[Symbol.iterator]();!(n=(i=a.next()).done);n=!0){var u=bi(i.value,2),c=(u[0],u[1]);c.parentId===t&&(e[e.length]=c)}}catch(t){r=!0,o=t}finally{try{n||null==a.return||a.return()}finally{if(r)throw o}}return e}},{key:"hasFile",value:function(t){return ki.has(t)}},{key:"getFile",value:function(t){return ki.get(t)||t}},{key:"createUrl",value:function(t){var e,n=URL.createObjectURL(t);return(e=t,new Promise(function(t){var n=new FileReader;n.onload=function(e){t(e.target.result)},n.readAsDataURL(e)})).then(function(t){ki.set(n,t)}),n}},{key:"revokeUrl",value:function(t){ki.delete(t)&&URL.revokeObjectURL(t)}},{key:"projects",get:function(){return this.filter("project")}},{key:"artboards",get:function(){return this.filter("artboard")}},{key:"layers",get:function(){return this.filter("layer")}},{key:"all",get:function(){return mi}}])&&gi(e.prototype,n),r&&gi(e,r),t}());function ji(t){return(ji="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 Pi(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e0&&void 0!==arguments[0]?arguments[0]:[];this.$store=new So({modules:[].concat(Pi(this.getModuleList()),Pi(t))}),Si.setStore(this.$store),this.$container=new jr(this.getContainer()),this.$container.addClass(this.getClassName()),this.render(this.$container),this.initializeEvent(),this.initBodyMoves()}},{key:"initBodyMoves",value:function(){this.moves=new Set,this.ends=new Set,this.modifyBodyMoveSecond(10)}},{key:"modifyBodyMoveSecond",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10;Si.config.set("body.move.ms",t),this.funcBodyMoves=pe(this.loopBodyMoves.bind(this),Si.config.get("body.move.ms"))}},{key:Zo("modifyBodyMoveSeconds"),value:function(t){this.modifyBodyMoveSecond(t)}},{key:"loopBodyMoves",value:function(){var t=Si.config.get("oldPos"),e=Si.config.get("pos");(t.x!=e.x||t.y!=e.y)&&this.moves.size&&this.moves.forEach(function(t){var n=e.x-t.xy.x,r=e.y-t.xy.y;0==n&&0==r||t.func.call(t.context,n,r)}),requestAnimationFrame(this.funcBodyMoves)}},{key:"removeBodyMoves",value:function(){var t=Si.config.get("pos");this.ends.forEach(function(e){e.func.call(e.context,t.x-e.xy.x,t.y-e.xy.y)}),this.moves.clear(),this.ends.clear()}},{key:Zo("add/body/mousemove"),value:function(t,e,n){this.moves.add({func:t,context:e,xy:n})}},{key:Zo("add/body/mouseup"),value:function(t,e,n){this.ends.add({func:t,context:e,xy:n})}},{key:"getModuleList",value:function(){return t.modules||[]}},{key:"getClassName",value:function(){return t.className||"csseditor"}},{key:"getContainer",value:function(){return t.container||document.body}},{key:"template",value:function(){return"
".concat(t.template,"
")}},{key:"components",value:function(){return t.components||{}}},{key:Qr("document"),value:function(t){var e=Si.config.get("pos")||Ei,n=t.xy||Ei;this.bodyMoved=!(e.x==n.x&&e.y==n.y),Si.config.set("bodyEvent",t),Si.config.set("pos",n),Si.config.set("oldPos",e),this.requestId||(this.requestId=requestAnimationFrame(this.funcBodyMoves))}},{key:to("document"),value:function(t){var e=t.xy||Ei;Si.config.set("bodyEvent",t),Si.config.set("pos",e),this.removeBodyMoves(),this.requestId=null}}])&&xi(r.prototype,o),i&&xi(r,i),n}())(t)},Ri={App:v,Color:or,HueColor:ar,ColorNames:yn,ImageFilter:cr,Canvas:b,ImageLoader:Un};function Ii(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:"/";return Object.getOwnPropertyNames(this.__proto__).filter(function(e){return e.startsWith(t)})}},{key:"get",value:function(t){return this.$store.items[t]||{}}},{key:"set",value:function(t,e){this.$store.items[t]=e}},{key:"config",value:function(t,e){return isUndefined(this.$store.tool[t])?e:this.$store.tool[t]}},{key:"initConfig",value:function(t,e){this.$store.tool[t]=e}}])&&Ii(e.prototype,n),r&&Ii(e,r),t}();function Ai(t){return(Ai="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 Mi(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Di(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:[];t.currentColorSets.colors=e,t.emit("changeCurrentColorSets")}},{key:ko("removeCurrentColor"),value:function(t,e){t.currentColorSets.colors[e]&&(t.currentColorSets.colors.splice(e,1),t.emit("changeCurrentColorSets"))}},{key:ko("removeCurrentColorToTheRight"),value:function(t,e){t.currentColorSets.colors[e]&&(t.currentColorSets.colors.splice(e,Number.MAX_VALUE),t.emit("changeCurrentColorSets"))}},{key:ko("clearPalette"),value:function(t){t.currentColorSets.colors&&(t.currentColorSets.colors=[],t.emit("changeCurrentColorSets"))}},{key:wo("list"),value:function(t){return Array.isArray(t.userList)&&t.userList.length?t.userList:t.colorSetsList}},{key:wo("getCurrentColors"),value:function(t){return t.read("getColors",t.currentColorSets)}},{key:wo("getColors"),value:function(t,e){return e.scale?or.scale(e.scale,e.count):e.colors||[]}},{key:wo("getColorSetsList"),value:function(t){return t.read("list").map(function(e){return{name:e.name,edit:e.edit,colors:t.read("getColors",e)}})}}])&&Di(n.prototype,r),o&&Di(n,o),e}();function Ni(t){return(Ni="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 Xi(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:[];this.$body=null,this.$root=null,this.$store=new So({modules:[Ji,Hi].concat(Qi(e))}),this.callbackChange=function(){t.callbackChangeValue()},this.colorpickerShowCallback=function(){},this.colorpickerHideCallback=function(){},this.$body=new jr(this.getContainer()),this.$root=new jr("div","codemirror-colorpicker"),"inline"==this.opt.position&&this.$body.append(this.$root),this.opt.type&&this.$root.addClass(this.opt.type),this.opt.hideInformation&&this.$root.addClass("hide-information"),this.opt.hideColorsets&&this.$root.addClass("hide-colorsets"),this.opt.width&&this.$root.css("width",this.opt.width),this.$arrow=new jr("div","arrow"),this.$root.append(this.$arrow),this.dispatch("setUserPalette",this.opt.colorSets),this.render(this.$root),this.initColorWithoutChangeEvent(this.opt.color),this.initializeEvent()}},{key:"initColorWithoutChangeEvent",value:function(t){this.dispatch("initColor",t)}},{key:"show",value:function(t,e,n,r){this.colorpickerShowCallback=n,this.colorpickerHideCallback=r,this.$root.css(this.getInitalizePosition()).show(),this.definePosition(t),this.isColorPickerShow=!0,this.isShortCut=t.isShortCut||!1,this.outputFormat=t.outputFormat,this.hideDelay=+ve(t.hideDelay,2e3),this.hideDelay>0&&this.setHideDelay(this.hideDelay),this.$root.appendTo(this.$body),this.initColorWithoutChangeEvent(e)}},{key:"initColor",value:function(t,e){this.dispatch("changeColor",t,e)}},{key:"hide",value:function(){this.isColorPickerShow&&(this.$root.hide(),this.$root.remove(),this.isColorPickerShow=!1,this.callbackHideValue())}},{key:"setColorsInPalette",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.dispatch("setCurrentColorAll",t)}},{key:"setUserPalette",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.dispatch("setUserPalette",t)}},{key:"getOption",value:function(t){return this.opt[t]}},{key:"setOption",value:function(t,e){this.opt[t]=e}},{key:"getContainer",value:function(){return this.opt.container||document.body}},{key:"getColor",value:function(t){return this.read("toColor",t)}},{key:"definePositionForArrow",value:function(t,e,n){}},{key:"definePosition",value:function(t){var e=this.$root.width(),n=this.$root.height(),r=t.left-this.$body.scrollLeft();e+r>window.innerWidth&&(r-=e+r-window.innerWidth),r<0&&(r=0);var o=t.top-this.$body.scrollTop();n+o>window.innerHeight&&(o-=n+o-window.innerHeight),o<0&&(o=0),this.$root.css({left:ne(r),top:ne(o)})}},{key:"getInitalizePosition",value:function(){return"inline"==this.opt.position?{position:"relative",left:"auto",top:"auto",display:"inline-block"}:{position:"absolute"==this.opt.position?"absolute":"fixed",left:"-10000px",top:"-10000px"}}},{key:"setHideDelay",value:function(t){var e=this;t=t||0;var n=this.hide.bind(this);this.$root.off("mouseenter"),this.$root.off("mouseleave"),this.$root.on("mouseenter",function(){clearTimeout(e.timerCloseColorPicker)}),this.$root.on("mouseleave",function(){clearTimeout(e.timerCloseColorPicker),e.timerCloseColorPicker=setTimeout(n,t)}),clearTimeout(this.timerCloseColorPicker)}},{key:"callbackChangeValue",value:function(t){t=t||this.getCurrentColor(),je(this.opt.onChange)&&this.opt.onChange.call(this,t),je(this.colorpickerShowCallback)&&this.colorpickerShowCallback(t)}},{key:"callbackHideValue",value:function(t){t=t||this.getCurrentColor(),je(this.opt.onHide)&&this.opt.onHide.call(this,t),je(this.colorpickerHideCallback)&&this.colorpickerHideCallback(t)}},{key:"getCurrentColor",value:function(){return this.read("toColor",this.outputFormat)}},{key:"checkColorPickerClass",value:function(t){var e=new jr(t),n=e.closest("codemirror-colorview"),r=e.closest("codemirror-colorpicker"),o=e.closest("CodeMirror");t.nodeName;return!!(r||n||o)}},{key:"checkInHtml",value:function(t){return"HTML"==t.nodeName}},{key:"initializeStoreEvent",value:function(){na(ra(e.prototype),"initializeStoreEvent",this).call(this),this.$store.on("changeColor",this.callbackChange,this),this.$store.on("changeFormat",this.callbackChange,this)}},{key:"destroy",value:function(){na(ra(e.prototype),"destroy",this).call(this),this.$store.off("changeColor",this.callbackChange),this.$store.off("changeFormat",this.callbackChange),this.callbackChange=void 0,this.colorpickerShowCallback=void 0,this.colorpickerHideCallback=void 0}},{key:Lr("document"),value:function(t){this.checkInHtml(t.target)||0==this.checkColorPickerClass(t.target)&&this.hide()}}])&&ta(n.prototype,r),o&&ta(n,o),e}();function aa(t){return(aa="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 ua(t,e){for(var n=0;nr?100:(t-n)/(r-n)*100}},{key:"getCalculatedDist",value:function(t){var e=t?this.getMousePosition(t):this.getCurrent(this.getDefaultValue()/this.maxValue);return this.getDist(e)}},{key:"getDefaultValue",value:function(){return 0}},{key:"setMousePosition",value:function(t){this.refs.$bar.css({left:ne(t)})}},{key:"getMousePosition",value:function(t){return bo.pos(t).pageX}},{key:"refresh",value:function(){this.setColorUI()}},{key:"setColorUI",value:function(t){(t=t||this.getDefaultValue())<=this.minValue?this.refs.$bar.addClass("first").removeClass("last"):t>=this.maxValue?this.refs.$bar.addClass("last").removeClass("first"):this.refs.$bar.removeClass("last").removeClass("first"),this.setMousePosition(this.getMaxDist()*((t||0)/this.maxValue))}}])&&ha(n.prototype,r),o&&ha(n,o),e}();function ma(t){return(ma="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 wa(t,e){for(var n=0;n\n
\n
\n
\n \n '}},{key:"setBackgroundColor",value:function(){this.refs.$container.css("background-color",this.read("toRGB"))}},{key:"refresh",value:function(){Oa(Sa(e.prototype),"refresh",this).call(this),this.setBackgroundColor()}},{key:"getDefaultValue",value:function(){return this.$store.hsv.v}},{key:"refreshColorUI",value:function(t){var e=this.getCalculatedDist(t);this.setColorUI(e/100*this.maxValue),this.changeColor({type:"hsv",v:e/100*this.maxValue})}}])&&wa(n.prototype,r),o&&wa(n,o),e}();function xa(t){return(xa="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 Ca(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function _a(t,e){for(var n=0;n\n
\n
\n
\n
\n \n '}},{key:"refresh",value:function(){Ta(Ra(e.prototype),"refresh",this).call(this),this.setOpacityColorBar()}},{key:"setOpacityColorBar",value:function(){var t=function(t){for(var e=1;e'}},{key:"setBackgroundColor",value:function(){this.refs.$el.css("background-color",this.read("toRGB"))}},{key:"refresh",value:function(){this.setBackgroundColor()}},{key:Zo("changeColor","initColor"),value:function(){this.refresh()}}])&&Ma(n.prototype,r),o&&Ma(n,o),e}();function La(t){return(La="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 Ha(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=[],r=!0,o=!1,i=void 0;try{for(var a,u=t[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}return n}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function Na(t,e){for(var n=0;n\n \n
\n
\n \n '}},{key:"refresh",value:function(t){this.setColorUI(t)}},{key:"setColorUI",value:function(t){this.renderCanvas(),this.renderValue(),this.setHueColor(null,t)}},{key:"renderValue",value:function(){var t=1-this.$store.hsv.v;this.refs.$valuewheel.css("background-color","rgba(0, 0, 0, ".concat(t,")"))}},{key:"renderWheel",value:function(t,e){this.width&&!t&&(t=this.width),this.height&&!e&&(e=this.height);var n=new jr("canvas"),r=n.el.getContext("2d");n.el.width=t,n.el.height=e,n.px("width",t),n.px("height",e);for(var o=r.getImageData(0,0,t,e),i=o.data,a=Math.floor(t/2),u=Math.floor(e/2),c=t>e?u:a,l=a,s=u,f=0;f0&&(r.globalCompositeOperation="destination-out",r.fillStyle="black",r.beginPath(),r.arc(l,s,c-this.thinkness,0,2*Math.PI),r.closePath(),r.fill()),n}},{key:"renderCanvas",value:function(){if(!this.$store.createdWheelCanvas){var t=this.refs.$colorwheel,e=t.el.getContext("2d"),n=Ha(t.size(),2),r=n[0],o=n[1];this.width&&!r&&(r=this.width),this.height&&!o&&(o=this.height),t.el.width=r,t.el.height=o,t.px("width",r),t.px("height",o);var i=this.renderWheel(r,o);e.drawImage(i.el,0,0),this.$store.createdWheelCanvas=!0}}},{key:"getDefaultValue",value:function(){return this.$store.hsv.h}},{key:"getDefaultSaturation",value:function(){return this.$store.hsv.s}},{key:"getCurrentXY",value:function(t,e,n,r,o){return t?t.xy:Y(e,n,r,o)}},{key:"getRectangle",value:function(){var t=this.$el.width(),e=this.$el.height(),n=this.refs.$colorwheel.width()/2,r=this.$el.offsetLeft(),o=r+t/2,i=this.$el.offsetTop();return{minX:r,minY:i,width:t,height:e,radius:n,centerX:o,centerY:i+e/2}}},{key:"setHueColor",value:function(t,e){var n=this.getRectangle(),r=n.minX,o=n.minY,i=n.radius,a=n.centerX,u=n.centerY,c=this.getCurrentXY(t,this.getDefaultValue(),this.getDefaultSaturation()*i,a,u),l=(y=c.x)-a,s=(d=c.y)-u,f=l*l+s*s,p=K(l,s);if(f>i*i)var h=this.getCurrentXY(null,p,i,a,u),y=h.x,d=h.y;var v=Math.min(Math.sqrt(f)/i,1);this.refs.$drag_pointer.px("left",y-r),this.refs.$drag_pointer.px("top",d-o),e||this.changeColor({type:"hsv",h:p,s:v})}},{key:"changeColor",value:function(t){this.dispatch("changeColor",t||{})}},{key:Zo("changeColor"),value:function(){this.refresh(!0)}},{key:Zo("initColor"),value:function(){this.refresh(!0)}},{key:to("document"),value:function(t){this.isDown=!1}},{key:Qr("document"),value:function(t){this.isDown&&this.setHueColor(t)}},{key:Zr("$drag_pointer"),value:function(t){t.preventDefault(),this.isDown=!0}},{key:Zr(),value:function(t){this.isDown=!0,this.setHueColor(t)}}])&&Na(n.prototype,r),o&&Na(n,o),e}();function Wa(t){return(Wa="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 qa(t,e){for(var n=0;n\n
\n \n
\n
\n
\n \n
HEX
\n
\n
\n
\n
\n \n
R
\n
\n
\n \n
G
\n
\n
\n \n
B
\n
\n
\n \n
A
\n
\n
\n
\n
\n \n
H
\n
\n
\n \n
%
\n
S
\n
\n
\n \n
%
\n
L
\n
\n
\n \n
A
\n
\n
\n \n '}},{key:"setCurrentFormat",value:function(t){this.format=t,this.initFormat()}},{key:"initFormat",value:function(){var t=this.format||"hex";this.$el.removeClass("hex"),this.$el.removeClass("rgb"),this.$el.removeClass("hsl"),this.$el.addClass(t)}},{key:"nextFormat",value:function(){var t=this.format||"hex",e="hex";"hex"==t?e="rgb":"rgb"==t?e="hsl":"hsl"==t&&(e=1==this.$store.alpha?"hex":"rgb"),this.$el.removeClass(t),this.$el.addClass(e),this.format=e,this.dispatch("changeFormat",this.format)}},{key:"getFormat",value:function(){return this.format||"hex"}},{key:"checkNumberKey",value:function(t){return bo.checkNumberKey(t)}},{key:"checkNotNumberKey",value:function(t){return!bo.checkNumberKey(t)}},{key:"changeRgbColor",value:function(){this.dispatch("changeColor",{type:"rgb",r:this.refs.$rgb_r.int(),g:this.refs.$rgb_g.int(),b:this.refs.$rgb_b.int(),a:this.refs.$rgb_a.float()})}},{key:"changeHslColor",value:function(){this.dispatch("changeColor",{type:"hsl",h:this.refs.$hsl_h.int(),s:this.refs.$hsl_s.int(),l:this.refs.$hsl_l.int(),a:this.refs.$hsl_a.float()})}},{key:Zo("changeColor","initColor"),value:function(){this.refresh()}},{key:Wr("$rgb_r"),value:function(t){this.changeRgbColor()}},{key:Wr("$rgb_g"),value:function(t){this.changeRgbColor()}},{key:Wr("$rgb_b"),value:function(t){this.changeRgbColor()}},{key:Wr("$rgb_a"),value:function(t){this.changeRgbColor()}},{key:Wr("$hsl_h"),value:function(t){this.changeHslColor()}},{key:Wr("$hsl_s"),value:function(t){this.changeHslColor()}},{key:Wr("$hsl_l"),value:function(t){this.changeHslColor()}},{key:Wr("$hsl_a"),value:function(t){this.changeHslColor()}},{key:Hr("$hexCode"),value:function(t){if(t.which<65||t.which>70)return this.checkNumberKey(t)}},{key:Nr("$hexCode"),value:function(t){var e=this.refs.$hexCode.val();"#"==e.charAt(0)&&7==e.length&&this.dispatch("changeColor",e)}},{key:Vr("$formatChangeButton"),value:function(t){this.nextFormat()}},{key:"setRGBInput",value:function(){this.refs.$rgb_r.val(this.$store.rgb.r),this.refs.$rgb_g.val(this.$store.rgb.g),this.refs.$rgb_b.val(this.$store.rgb.b),this.refs.$rgb_a.val(this.$store.alpha)}},{key:"setHSLInput",value:function(){this.refs.$hsl_h.val(this.$store.hsl.h),this.refs.$hsl_s.val(this.$store.hsl.s),this.refs.$hsl_l.val(this.$store.hsl.l),this.refs.$hsl_a.val(this.$store.alpha)}},{key:"setHexInput",value:function(){this.refs.$hexCode.val(this.read("toHEX"))}},{key:"refresh",value:function(){this.setCurrentFormat(this.$store.format),this.setRGBInput(),this.setHSLInput(),this.setHexInput()}}])&&qa(n.prototype,r),o&&qa(n,o),e}();function eu(t){return(eu="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 nu(){var t=ou(['\n
\n

','

\n
\n
\n ',"\n
\n
\n
"]);return nu=function(){return t},t}function ru(){var t=ou(["\n
\n ","\n
\n "]);return ru=function(){return t},t}function ou(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}function iu(t,e){for(var n=0;n\n
\n
\n

Color Palettes

\n ×\n
\n
\n
\n '}},{key:Zo("changeCurrentColorSets"),value:function(){this.refresh()}},{key:Zo("toggleColorChooser"),value:function(){this.toggle()}},{key:ho("$colorsetsList"),value:function(){var t=this.read("getColorSetsList");return Ie(ru(),t.map(function(t,e){return Ie(nu(),e,t.name,t.colors.filter(function(t,e){return e<5}).map(function(t){return'
\n
\n
')}))}))}},{key:"show",value:function(){this.$el.addClass("open")}},{key:"hide",value:function(){this.$el.removeClass("open")}},{key:"toggle",value:function(){this.$el.toggleClass("open")}},{key:Vr("$toggleButton"),value:function(t){this.toggle()}},{key:Vr("$colorsetsList .colorsets-item"),value:function(t,e){if(e){var n=parseInt(e.attr("data-colorsets-index"));this.dispatch("setCurrentColorSets",n),this.hide()}}},{key:"destroy",value:function(){uu(cu(e.prototype),"destroy",this).call(this),this.hide()}}])&&iu(n.prototype,r),o&&iu(n,o),e}();function fu(t){return(fu="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 pu(){var t=function(t,e){e||(e=t.slice(0));return Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}(['
\n '," \n "," \n
"]);return pu=function(){return t},t}function hu(t,e){for(var n=0;n\n \n
\n \n '}},{key:ho("$colorSetsColorList"),value:function(){var t=this.read("getCurrentColorSets"),e=this.read("getCurrentColors");return Ie(pu(),e.map(function(t,e){return'
\n
\n
\n
')}),t.edit?'
+
':Xt)}},{key:"addColor",value:function(t){this.dispatch("addCurrentColor",t),this.refresh()}},{key:Zo("changeCurrentColorSets"),value:function(){this.refresh()}},{key:Zo("initColor"),value:function(){this.refresh()}},{key:Vr("$colorSetsChooseButton"),value:function(t){this.emit("toggleColorChooser")}},{key:Ur("$colorSetsColorList"),value:function(t){if(t.preventDefault(),this.read("getCurrentColorSets").edit){var e=new jr(t.target).closest("color-item");if(e){var n=parseInt(e.attr("data-index"));this.emit("showContextMenu",t,n)}else this.emit("showContextMenu",t)}}},{key:Vr("$colorSetsColorList .add-color-item"),value:function(t){this.addColor(this.read("toColor"))}},{key:Vr("$colorSetsColorList .color-item"),value:function(t,e){this.dispatch("changeColor",e.attr("data-color"))}}])&&hu(n.prototype,r),o&&hu(n,o),e}();function gu(t){return(gu="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 mu(t,e){for(var n=0;n\n \n \n \n \n '}},{key:"show",value:function(t,e){var n=bo.pos(t);this.$el.px("top",n.clientY-10),this.$el.px("left",n.clientX),this.$el.addClass("show"),this.selectedColorIndex=e,be(this.selectedColorIndex)?this.$el.addClass("small"):this.$el.removeClass("small")}},{key:"hide",value:function(){this.$el.removeClass("show")}},{key:"runCommand",value:function(t){switch(t){case"remove-color":this.dispatch("removeCurrentColor",this.selectedColorIndex);break;case"remove-all-to-the-right":this.dispatch("removeCurrentColorToTheRight",this.selectedColorIndex);break;case"clear-palette":this.dispatch("clearPalette")}}},{key:Zo("showContextMenu"),value:function(t,e){this.show(t,e)}},{key:Vr("$el .menu-item"),value:function(t,e){t.preventDefault(),this.runCommand(e.attr("data-type")),this.hide()}}])&&mu(n.prototype,r),o&&mu(n,o),e}();function ju(t){return(ju="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 Pu(t,e){for(var n=0;n\n \n
\n \n \n
\n \n
\n \n \n \n \n \n '}},{key:"components",value:function(){return{Value:Pa,Opacity:Ba,ColorView:Va,ColorWheel:Ka,Information:tu,CurrentColorSets:bu,ColorSetsChooser:su,ContextMenu:Su}}}])&&Pu(n.prototype,r),o&&Pu(n,o),e}();function Eu(t){return(Eu="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 Tu(t,e){for(var n=0;n\n
\n
\n
\n \n '}},{key:"getDefaultValue",value:function(){return this.$store.hsv.h}},{key:"refreshColorUI",value:function(t){var e=this.getCalculatedDist(t);this.setColorUI(e/100*this.maxValue),this.changeColor({h:e/100*this.maxValue,type:"hsv"})}}])&&Tu(n.prototype,r),o&&Tu(n,o),e}();function Du(t){return(Du="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 zu(t,e){for(var n=0;n\n
\n
\n
\n
\n
\n \n '}},{key:"setBackgroundColor",value:function(t){this.$el.css("background-color",t)}},{key:"refresh",value:function(){this.setColorUI()}},{key:"calculateSV",value:function(){var t=this.drag_pointer_pos||{x:0,y:0},e=this.$el.width(),n=this.$el.height(),r=t.x/e,o=(n-t.y)/n;this.dispatch("changeColor",{type:"hsv",s:r,v:o})}},{key:"setColorUI",value:function(){var t=this.$el.width()*this.$store.hsv.s,e=this.$el.height()*(1-this.$store.hsv.v);this.refs.$drag_pointer.px("left",t),this.refs.$drag_pointer.px("top",e),this.drag_pointer_pos={x:t,y:e},this.setBackgroundColor(this.read("getHueColor"))}},{key:"setMainColor",value:function(t){var e=this.$el.offset(),n=this.$el.contentWidth(),r=this.$el.contentHeight(),o=bo.pos(t).pageX-e.left,i=bo.pos(t).pageY-e.top;o<0?o=0:o>n&&(o=n),i<0?i=0:i>r&&(i=r),this.refs.$drag_pointer.px("left",o),this.refs.$drag_pointer.px("top",i),this.drag_pointer_pos={x:o,y:i},this.calculateSV()}},{key:Zo("changeColor","initColor"),value:function(){this.refresh()}},{key:to("document"),value:function(t){this.isDown=!1}},{key:Qr("document"),value:function(t){this.isDown&&this.setMainColor(t)}},{key:Zr(),value:function(t){this.isDown=!0,this.setMainColor(t)}},{key:to(),value:function(t){this.isDown=!1}}])&&zu(n.prototype,r),o&&zu(n,o),e}();function Nu(t){return(Nu="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 Xu(t,e){for(var n=0;n\n \n
\n \n \n
\n \n
\n \n \n \n \n '}},{key:"components",value:function(){return{Hue:Mu,Opacity:Ba,ColorView:Va,Palette:Hu,Information:tu,CurrentColorSets:bu,ColorSetsChooser:su,ContextMenu:Su}}}])&&Xu(n.prototype,r),o&&Xu(n,o),e}();function Wu(t){return(Wu="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 qu(t,e){for(var n=0;n\n \n
\n \n \n
\n \n "}},{key:"components",value:function(){return{Hue:Mu,Opacity:Ba,Palette:Hu}}}])&&qu(n.prototype,r),o&&qu(n,o),e}();function ec(t){return(ec="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 nc(t,e){for(var n=0;n=this.maxValue?this.refs.$bar.addClass("last").removeClass("first"):this.refs.$bar.removeClass("last").removeClass("first");var e=1-(t||0)/this.maxValue;this.setMousePosition(this.getMaxDist()*e)}}])&&nc(n.prototype,r),o&&nc(n,o),e}();function uc(t){return(uc="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 cc(t,e){for(var n=0;n\n
\n
\n
\n \n '}},{key:"getDefaultValue",value:function(){return this.$store.hsv.h}},{key:"refreshColorUI",value:function(t){var e=this.getCalculatedDist(t);this.setColorUI(e/100*this.maxValue),this.changeColor({h:e/100*this.maxValue,type:"hsv"})}}])&&cc(n.prototype,r),o&&cc(n,o),e}();function yc(t){return(yc="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 dc(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function vc(t,e){for(var n=0;n\n
\n
\n
\n
\n \n '}},{key:"refresh",value:function(){gc(mc(e.prototype),"refresh",this).call(this),this.setOpacityColorBar()}},{key:"setOpacityColorBar",value:function(){var t=function(t){for(var e=1;e\n
\n \n "}},{key:"components",value:function(){return{Hue:hc,Opacity:kc,Palette:Hu}}}])&&Sc(n.prototype,r),o&&Sc(n,o),e}();function Cc(t){return(Cc="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 _c(t,e){for(var n=0;n\n \n
\n '}},{key:"setColorUI",value:function(t){this.renderCanvas(),this.setHueColor(null,t)}},{key:"getDefaultValue",value:function(){return this.$store.hsv.h}},{key:"setHueColor",value:function(t,e){var n=this.getRectangle(),r=n.minX,o=n.minY,i=n.radius,a=n.centerX,u=n.centerY,c=this.getCurrentXY(t,this.getDefaultValue(),i,a,u),l=K((f=c.x)-a,(p=c.y)-u),s=this.getCurrentXY(null,l,i-this.half_thinkness,a,u),f=s.x,p=s.y;this.refs.$drag_pointer.px("left",f-r),this.refs.$drag_pointer.px("top",p-o),e||this.changeColor({type:"hsv",h:l})}}])&&_c(n.prototype,r),o&&_c(n,o),e}();function Ac(t){return(Ac="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 Mc(t,e){for(var n=0;n\n \n \n
\n \n \n
\n \n
\n \n \n \n \n \n '}},{key:"components",value:function(){return{Value:Pa,Opacity:Ba,ColorView:Va,ColorRing:Bc,Palette:Hu,Information:tu,CurrentColorSets:bu,ColorSetsChooser:su,ContextMenu:Su}}}])&&Mc(n.prototype,r),o&&Mc(n,o),e}();function Lc(t){return(Lc="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 Hc(t,e){for(var n=0;n\n \n
\n \n \n
\n \n \n \n \n \n "}},{key:"components",value:function(){return{Hue:hc,Opacity:kc,Palette:Hu,Information:tu,CurrentColorSets:bu,ColorSetsChooser:su,ContextMenu:Su}}}])&&Hc(n.prototype,r),o&&Hc(n,o),e}();function Uc(t){return(Uc="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 Kc(t,e){for(var n=0;n\n
\n
\n
".concat(this.opt.tabTitle,' Color
\n
Swatch
\n
Color Set
\n
\n
\n
\n \n \n
\n \n \n
\n \n
\n \n
\n
\n \n \n
\n
\n \n
\n
\n
\n ')}},{key:Vr("$tabHeader .color-tab-item"),value:function(t,e){if(!e.hasClass("active")){var n;(n=this.refs.$tabHeader.$(".active"))&&n.removeClass("active"),e.addClass("active"),(n=this.refs.$tabBody.$(".active"))&&n.removeClass("active");var r=this.refs.$tabBody.$("[item-id='".concat(e.attr("item-id"),"']"));r&&r.addClass("active")}}},{key:"components",value:function(){return{Value:Pa,Opacity:Ba,ColorView:Va,ColorRing:Bc,Palette:Hu,Information:tu,CurrentColorSets:bu,ColorSetsChooser:su,ContextMenu:Su}}}])&&Kc(n.prototype,r),o&&Kc(n,o),e}();function Qc(t){return(Qc="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 tl(t,e){for(var n=0;n\n
\n
\n
".concat(this.opt.tabTitle,' Color
\n
Swatch
\n
Color Set
\n
\n
\n
\n \n
\n \n \n
\n \n
\n
\n \n \n
\n
\n \n
\n
\n\n
\n ')}},{key:Vr("$tabHeader .color-tab-item"),value:function(t,e){if(!e.hasClass("active")){var n;(n=this.refs.$tabHeader.$(".active"))&&n.removeClass("active"),e.addClass("active"),(n=this.refs.$tabBody.$(".active"))&&n.removeClass("active");var r=this.refs.$tabBody.$("[item-id='".concat(e.attr("item-id"),"']"));r&&r.addClass("active")}}},{key:"components",value:function(){return{Hue:hc,Opacity:kc,Palette:Hu,Information:tu,CurrentColorSets:bu,ColorSetsChooser:su,ContextMenu:Su}}}])&&tl(n.prototype,r),o&&tl(n,o),e}(),il={create:function(t){switch(t.type){case"macos":return new _u(t);case"xd":return new Yc(t);case"xd-tab":return new ol(t);case"ring":return new Vc(t);case"ring-tab":return new Zc(t);case"mini":return new tc(t);case"mini-vertical":return new $c(t);case"sketch":case"palette":default:return new Ku(t)}},ColorPicker:Ku,ChromeDevToolColorPicker:Ku,MacOSColorPicker:_u,RingColorPicker:Vc,MiniColorPicker:tc,MiniVerticalColorPicker:$c,XDColorPicker:Yc};function al(t){return(al="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 ul(t){for(var e=1;ee.index?1:-1:t.percent>e.percent?1:-1}),t.forEach(function(t,e){t.index=100*e})}},{key:"select",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;e&&t.forEach(function(t){t.selected=t.id===e}),t.filter(function(t){return t.selected}).length||t[0]&&(t[0].selected=!0)}},{key:"parse",value:function(t){var n=[],r=wn(t),o=r.str.split(Gt).filter(function(t){return t.trim()}),i=+o[0].replace("@",""),a=r.matches[i].color;if(1===o.length)n.push(new e({color:a,unit:"%",percent:0}));else if(2===o.length){var u=mr.parse(o[1]),c={unit:u.unit};u.isPercent()?c.percent=u.value:u.isPx()?c.px=u.value:u.isEm()&&(c.em=u.value),n.push(new e(ul({color:a},c)))}else 3===o.length&&[1,2].forEach(function(t){var r=mr.parse(o[t]),i={unit:r.unit};r.isPercent()?i.percent=r.value:r.isPx()?i.px=r.value:r.isEm()&&(i.em=r.value),n.push(new e(ul({color:a},i)))});return n}}],(r=[{key:"getDefaultObject",value:function(){return fl(pl(e.prototype),"getDefaultObject",this).call(this,{cut:!1,percent:0,unit:"%",px:0,em:0,color:"rgba(0, 0, 0, 0)",prevColorStep:null})}},{key:"on",value:function(){this.json.cut=!0}},{key:"off",value:function(){this.json.cut=!1}},{key:"toggle",value:function(){this.json.cut=!this.json.cut}},{key:"changeUnit",value:function(t,e,n){this.json.unit=t,this.json[t]=e,this.reset(this.getUnitValue(n))}},{key:"getUnit",value:function(){return"%"==this.json.unit?"percent":this.json.unit}},{key:"getUnitValue",value:function(t){return this.isPX?{px:this.json.px,percent:+mr.px(this.json.px).toPercent(t),em:+mr.px(this.json.px).toEm(t)}:this.isEm?{em:this.json.em,percent:+mr.em(this.json.em).toPercent(t),px:+mr.em(this.json.em).toPx(t)}:{percent:this.json.percent,px:+mr.percent(this.json.percent).toPx(t),em:+mr.percent(this.json.percent).toEm(t)}}},{key:"add",value:function(t){var e=this.getUnit();return this.json[e]+=+t,this}},{key:"sub",value:function(t){var e=this.getUnit();return this.json[e]-=+t,this}},{key:"mul",value:function(t){var e=this.getUnit();return this.json[e]*=+t,this}},{key:"div",value:function(t){var e=this.getUnit();return this.json[e]/=+t,this}},{key:"mod",value:function(t){var e=this.getUnit();return this.json[e]%=+t,this}},{key:"toLength",value:function(t){return mr.parse(this.json)}},{key:"getPrevLength",value:function(){return this.json.prevColorStep?this.json.prevColorStep.toLength():Xt}},{key:"toString",value:function(){return"".concat(this.json.color," ").concat(this.json.cut?this.getPrevLength():Xt," ").concat(this.toLength())}},{key:"reset",value:function(t){fl(pl(e.prototype),"reset",this).call(this,t),this.parent()&&this.parent().sortColorStep()}},{key:"isPx",get:function(){return"px"==this.json.unit}},{key:"isPercent",get:function(){return"%"==this.json.unit||"percent"===this.json.unit}},{key:"isEm",get:function(){return"em"==this.json.unit}}])&&ll(n.prototype,r),o&&ll(n,o),e}(),dl=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"end";return function(n){var r=1/t;return"start"==e?r*Math.ceil(n/r):"end"==e?r*Math.floor(n/r):void 0}},vl={"ease-out-elastic":function(t,e,n,r){return Math.pow(2,-10*t)*Math.sin(5*(t-.1)*Math.PI)+1},"cubic-bezier":function(t,e,n,r){return Q(0,e,0,r)},step:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"end";return dl(t,e)},"step-start":function(t){return dl(1,"start")(t)},"step-end":function(t){return dl(1,"end")(t)}};[[0,0,1,1,"linear"],[.25,.1,.25,1,"ease"],[.42,0,1,1,"ease-in"],[.47,0,.745,.715,"ease-in-sine"],[.55,.085,.68,.53,"ease-in-quad"],[.55,.055,.675,.19,"ease-in-cubic"],[.895,.03,.685,.22,"ease-in-quart"],[.755,.05,.855,.06,"ease-in-quint"],[.95,.05,.795,.035,"ease-in-expo"],[.6,.04,.98,.335,"ease-in-circ"],[.6,-.28,.735,.045,"ease-in-back"],[.42,0,.58,1,"ease-in-out"],[.445,.05,.55,.95,"ease-in-out-sine"],[.455,.03,.515,.955,"ease-in-out-quad"],[.645,.045,.355,1,"ease-in-out-cubic"],[.77,0,.175,1,"ease-in-out-quart"],[.86,0,.07,1,"ease-in-out-quint"],[1,0,0,1,"ease-in-out-expo"],[.785,.135,.15,.86,"ease-in-out-circ"],[.68,-.55,.265,1.55,"ease-in-out-back"],[0,0,.58,1,"ease-out"],[.39,.575,.565,1,"ease-out-sine"],[.25,.46,.45,.94,"ease-out-quad"],[.215,.61,.355,1,"ease-out-cubic"],[.165,.84,.44,1,"ease-out-quart"],[.23,1,.32,1,"ease-out-quint"],[.19,1,.22,1,"ease-out-expo"],[.075,.82,.165,1,"ease-out-circ"],[.175,.885,.32,1.275,"ease-out-back"]].forEach(function(t){vl[t[4]]=Q(t[0],t[1],t[2],t[3])});var bl;function gl(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function ml(t){var e=t;return"normal"==e["background-blend-mode"]&&delete e["background-blend-mode"],"normal"==e["mix-blend-mode"]&&delete e["mix-blend-mode"],"auto"==e["background-size"]&&delete e["background-size"],"center center"==e["background-position"]&&delete e["background-position"],1==vt(e.opacity)&&delete e.opacity,0==vt(e.left)&&delete e.left,0==vt(e.top)&&delete e.top,"none"==e.transform&&delete e.transform,"float"==e["transform-style"]&&delete e["transform-style"],"none"==e["clip-path"]&&delete e["clip-path"],e}var wl={position:1,left:2,top:2,right:2,bottom:2,width:3,height:3,"font-size":4,"font-family":4,opacity:10,"border-radius":10,"box-shadow":15,"text-shadow":15,filter:15,"background-clip":50,"-webkit-background-clip":50,"background-repeat":100,"background-blend-mode":100,"background-image":100,"background-size":100,"background-position":100,transform:1e3},kl=function(t,e){if(t.includes("--")&&!e.includes("--"))return-1;if(e.includes("--")&&!t.includes("--"))return 1;var n=wl[t]||Number.MAX_SAFE_INTEGER,r=wl[e]||Number.MAX_SAFE_INTEGER;return n==r?0:n0&&void 0!==arguments[0]?arguments[0]:{};return Bl(Al(e.prototype),"getDefaultObject",this).call(this,function(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{};return Hl(Nl(e.prototype),"getDefaultObject",this).call(this,function(t){for(var e=1;e1&&void 0!==arguments[1])||arguments[1];return this.json.colorsteps.push(t),e&&this.sortColorStep(),t}},{key:"insertColorStep",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"rgba(216,216,216,0)",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"rgba(216,216,216,1)",r=this.colorsteps;if(r.length){if(te.percent?1:t.percente.index?1:-1:void 0}),t.forEach(function(t,e){t.index=100*e})}},{key:"addColorStepList",value:function(){var t=this;(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).forEach(function(e){t.addColorStep(e,!1)}),this.sortColorStep()}},{key:"getColorStep",value:function(t){return this.json.colorsteps.filter(function(e){return e.id==t})[0]}},{key:"clear",value:function(){arguments.length?this.json.colorsteps.splice(+(arguments.length<=0?void 0:arguments[0]),1):this.json.colorsteps=[]}},{key:"getColorString",value:function(){var t=this.colorsteps;return t.length?t.map(function(e,n){return e.prevColorStep=e.cut&&n>0?t[n-1]:null,e}).map(function(t){return"".concat(t)}).join(","):Xt}},{key:"colorsteps",get:function(){return this.json.colorsteps}}])&&Vl(n.prototype,r),o&&Vl(n,o),e}();function Ul(t){return(Ul="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 Kl(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e360?e%360:e,"deg")),"".concat(this.json.type,"(").concat(e,", ").concat(t,")")}}])&&ql(n.prototype,r),o&&ql(n,o),e}();function os(t){return(os="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 is(t,e){for(var n=0;n\n \n \n \n \n \n \n \n \n \n '}},{key:Vr("$el button")+uo,value:function(t){this.emit("changeGradientAngle",ls[t.$delegateTarget.attr("data-value")])}},{key:Zo("showGradientAngle"),value:function(){this.$el.show()}},{key:Zo("hideGradientAngle"),value:function(){this.$el.hide()}}])&&is(n.prototype,r),o&&is(n,o),e}();function fs(t){return(fs="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 ps(t,e){for(var n=0;n\n
\n
\n °\n
\n
\n
\n \n '}},{key:"getCurrentXY",value:function(t,e,n,r,o){return t?Si.config.get("pos"):Y(e,n,r,o)}},{key:"getRectangle",value:function(){var t=this.refs.$dragAngle.width(),e=this.refs.$dragAngle.height(),n=Math.floor(t/2*.7),r=this.refs.$dragAngle.offset(),o=r.left,i=r.top;return{minX:o,minY:i,width:t,height:e,radius:n,centerX:o+t/2,centerY:i+e/2}}},{key:"getDefaultValue",value:function(){return this.angle-90}},{key:"refreshAngleText",value:function(t){this.refs.$angleText.text(t)}},{key:"refreshUI",value:function(t){var e=this.getRectangle(),n=e.minX,r=e.minY,o=e.radius,i=e.centerX,a=e.centerY,u=this.getCurrentXY(t,this.getDefaultValue(),o,i,a),c=K((s=u.x)-i,(f=u.y)-a),l=this.getCurrentXY(null,c,o,i,a),s=l.x,f=l.y;this.refs.$dragPointer.px("left",s-n),this.refs.$dragPointer.px("top",f-r);var p=Math.round(c+90)%360;this.refreshAngleText(p),t&&this.setAngle(p)}},{key:"getKeyTarget",value:function(t){switch(t){case"ArrowDown":return"sub";case"ArrowUp":return"add"}}},{key:"modifyAngle",value:function(t,e){var n=this.getKeyTarget(t.key||t.code),r=mr.deg(+e.text());return r.calculate(n,1),r}},{key:"updateAngle",value:function(t){this.angle=t,this.refreshUI(),this.setAngle(this.angle)}},{key:Hr("$angleText")+io+oo+fo+po,value:function(t){var e=this.modifyAngle(t,this.refs.$angleText);return this.updateAngle(e.value),!1}},{key:Wr("$angleText"),value:function(t){this.updateAngle(+this.refs.$angleText.text().trim())}},{key:"setAngle",value:function(t){this.emit("changeGradientAngle",t)}},{key:"move",value:function(){this.refreshUI(!0)}},{key:Zr("$dragAngle")+lo(),value:function(t){}},{key:Zo("showGradientAngle"),value:function(t){this.angle=t,this.refreshUI(),this.$el.show()}},{key:Zo("hideGradientAngle"),value:function(){this.$el.hide()}},{key:Zo("changeGradientAngle"),value:function(t){this.angle=t,this.refreshUI()}}])&&ps(n.prototype,r),o&&ps(n,o),e}();function gs(t){return(gs="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 ms(t,e){for(var n=0;n\n \n \n \n \n \n '}},{key:Vr("$el button"),value:function(t){var e=mr.string(t.$delegateTarget.attr("data-value"));this.emit("changeGradientPosition",{radialPosition:e})}},{key:Zo("showGradientPosition"),value:function(){this.$el.show()}},{key:Zo("hideGradientPosition"),value:function(){this.$el.hide()}}])&&ms(n.prototype,r),o&&ms(n,o),e}();function Ps(t){return(Ps="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 xs(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=[],r=!0,o=!1,i=void 0;try{for(var a,u=t[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}return n}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function $s(t,e){for(var n=0;n\n
\n \n '}},{key:"refresh",value:function(){this.refreshUI()}},{key:"getCurrentXY",value:function(t,e){if(t){var n=Si.config.get("pos");return[n.x,n.y]}var r=this.getRectangle(),o=r.minX,i=r.minY,a=r.maxX,u=r.maxY,c=r.width,l=r.height,s=e;return ke(s)&&Rs[s]?s=Rs[s]:ke(s)&&(s=s.split(Gt)),s=s.map(function(t,e){if(t==br.CENTER){if(0==e)return o+c/2;if(1==e)return i+l/2}else{if(t===br.LEFT)return o;if(t===br.RIGHT)return a;if(t===br.TOP)return i;if(t===br.BOTTOM)return u;if(0==e)return o+c*(+t/100);if(1==e)return i+l*(+t/100)}})}},{key:"getRectangle",value:function(){var t=this.$el.width(),e=this.$el.height(),n=this.$el.offsetLeft(),r=this.$el.offsetTop();return{minX:n,minY:r,maxX:n+t,maxY:r+e,width:t,height:e}}},{key:"getDefaultValue",value:function(){return this.radialPosition||br.CENTER}},{key:"refreshUI",value:function(t){var e=this.getRectangle(),n=e.minX,r=e.minY,o=e.maxX,i=e.maxY,a=e.width,u=e.height,c=xs(this.getCurrentXY(t,this.getDefaultValue()),2),l=c[0],s=c[1],f=(l=Math.max(Math.min(o,l),n))-n,p=(s=Math.max(Math.min(i,s),r))-r;this.refs.$dragPointer.px("left",f),this.refs.$dragPointer.px("top",p),t&&this.setRadialPosition([mr.percent(Math.floor(f/a*100)),mr.percent(Math.floor(p/u*100))])}},{key:"setRadialPosition",value:function(t){this.emit("changeGradientPosition",t)}},{key:"move",value:function(){this.refreshUI(!0)}},{key:Zr()+lo(),value:function(t){}},{key:Zo("showGradientPosition"),value:function(t){this.radialPosition=t,this.$el.show(),this.refresh()}},{key:Zo("hideGradientPosition"),value:function(){this.$el.hide()}}])&&$s(n.prototype,r),o&&$s(n,o),e}();function Bs(t){return(Bs="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 As(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Ms(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e\n
\n
\n
\n
\n
\n
\n
\n
\n
\n \n \n \n \n \n \n \n
\n
\n
\n \n \n
\n
\n \n \n
\n
\n \n '}},{key:"setColorSteps",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.colorsteps=t}},{key:"refresh",value:function(){this.refs.$verticalColorstep.px("width",Si.config.get("step.width")),this.setColorUI()}},{key:Zo(oi,ri),value:function(){this.refresh()}},{key:"updateRadialShape",value:function(t){var e=Ds(t.split(" "),2),n=e[0],r=e[1];"circle"===n?(this.refs.$circle.addClass("selected"),this.refs.$ellipse.removeClass("selected")):(this.refs.$circle.removeClass("selected"),this.refs.$ellipse.addClass("selected")),this.refs.$selectRadialExtent.val(r)}},{key:Zo("showGradientEditor"),value:function(t,e){switch(this.$el.show(),"static-gradient"===this.gradientType&&"static-gradient"!==t.type?this.setColorSteps([new yl({color:"yellow",percent:0,index:0,selected:!0}),new yl({color:"red",percent:100,index:1})]):"static-gradient"!==this.gradientType&&"static-gradient"==t.type&&this.setColorSteps([new yl({color:"red",percent:0,index:0,selected:!0})]),!this.colorsteps&&t.colorsteps&&this.setColorSteps(t.colorsteps),t.refresh&&(this.setColorSteps(t.colorsteps),this.refresh()),yl.select(this.colorsteps,t.selectColorStepId),this.currentColorStep=this.colorsteps.filter(function(t){return t.selected})[0],this.emit("selectColorStep",this.currentColorStep.color),this.gradientType=t.type,void 0!==t.angle&&(this.angle=t.angle),void 0!==t.radialPosition&&(this.radialPosition=t.radialPosition),this.gradientType){case"linear":case"linear-gradient":case"repeating-linear":case"repeating-linear-gradient":this.$el.show(),this.refs.$angleEditor.show("inline-block"),this.refs.$positionEditor.hide(),this.refs.$radialGradientTool.hide(),this.emit("showGradientAngle",this.angle);break;case"radial":case"radial-gradient":case"repeating-radial":case"repeating-radial-gradient":this.$el.show(),this.refs.$angleEditor.hide(),this.refs.$positionEditor.show("inline-block"),this.updateRadialShape(t.radialType||"ellipse"),this.refs.$radialGradientTool.show("inline-block"),this.emit("showGradientPosition",t.radialPosition||this.radialPosition||br.CENTER);break;case"conic":case"conic-gradient":case"repeating-conic":case"repeating-conic-gradient":this.$el.show(),this.refs.$angleEditor.show("inline-block"),this.refs.$positionEditor.show("inline-block"),this.refs.$radialGradientTool.hide(),this.emit("showGradientAngle",this.angle),this.emit("showGradientPosition",t.radialPosition||this.radialPosition||br.CENTER);break;default:this.$el.hide(),this.refs.$angleEditor.hide(),this.refs.$positionEditor.hide(),this.refs.$radialGradientTool.hide()}this.refresh(),e&&this.updateColorStep()}},{key:Zo("selectFillPickerTab"),value:function(t){this.updateColorStep()}},{key:Zo("hideGradientEditor",oi,ri),value:function(){this.$el.hide()}},{key:"getStepPosition",value:function(t){var e=this.getMinMax(),n=e.min,r=e.max,o=this.refs.$steps.offset().left;return n-=o,r-=o,t.isPx?t.px:n+(r-n)*(t.percent/100)}},{key:"getUnitName",value:function(t){var e=t.unit||Wt;return[Ut,Kt].includes(e)?e:Wt}},{key:"getUnitSelect",value:function(t){return"\n \n ")}},{key:"getMaxValue",value:function(){return Si.config.get("step.width")||400}},{key:ho("$stepList"),value:function(){var t=this;return this.colorsteps.map(function(e,n){var r=e.cut?"cut":Xt,o=e.getUnitValue(t.getMaxValue());return"\n
\n
\n
\n
\n
\n \n \n \n ').concat(t.getUnitSelect(e),"\n
\n
\n ")})}},{key:"refresh",value:function(){this.load(),this.setColorUI()}},{key:"setColorUI",value:function(){var t=Ms(this.colorsteps);yl.sort(t),this.refs.$stepList.css("background-image",rs.toLinearGradient(t))}},{key:"getMinMax",value:function(){var t=this.refs.$steps.offsetLeft(),e=this.refs.$steps.width();return{min:t,max:t+e,width:e}}},{key:"getCurrent",value:function(){var t=this.getMinMax(),e=t.min,n=t.max,r=Si.config.get("pos").x;return Math.min(Math.max(e,r),n)}},{key:"refreshColorUI",value:function(t){var e=this.getMinMax(),n=e.min,r=e.max,o=this.getCurrent();if(this.currentStep){var i=Math.max(n,o)-this.refs.$steps.offsetLeft();Si.config.get("bodyEvent").ctrlKey&&(i=Math.floor(i)),this.currentStepBox.px("left",i);var a=r-n,u=mr.px(i).toPercent(a).value,c=mr.px(i).toEm(a).value;this.currentColorStep.reset({px:i,percent:u,em:c}),this.currentUnitPercent.val(u),this.currentUnitPx.val(i),this.currentUnitEm.val(c),this.updateColorStep(),this.setColorUI()}}},{key:Vr("$back"),value:function(t){this.addStep(t)}},{key:"removeStep",value:function(t){var e=t.$delegateTarget.attr("id");this.colorsteps=this.colorsteps.filter(function(t){return t.id!=e}),this.refresh(),this.updateColorStep()}},{key:"addStep",value:function(t){var e=this.getMinMax(),n=e.min,r=e.max,o=this.getCurrent(t),i=Math.floor((o-n)/(r-n)*100);yl.createByPercent(this.colorsteps,i),this.refresh(),this.updateColorStep()}},{key:"getSortedStepList",value:function(){var t=this.refs.$stepList.$$(".drag-bar").map(function(t){return{id:t.attr("id"),x:t.cssFloat("left")}});return t.sort(function(t,e){return t.x==e.x?0:t.x>e.x?1:-1}),t.map(function(t){return t.id})}},{key:"selectStep",value:function(t){var e=this,n=t.$delegateTarget.parent();this.currentStepBox=this.currentStepBox||n;var r=this.refs.$stepList.$(".selected");r&&!r.is(this.currentStepBox)&&r.removeClass("selected"),this.colorsteps.forEach(function(t){t.selected=t.id===e.currentColorStep.id}),this.currentStepBox.addClass("selected"),this.setColorUI(),this.emit("selectColorStep",this.currentColorStep.color)}},{key:"getRadialType",value:function(){var t=this.refs.$circle.hasClass("selected")?"circle":"ellipse",e=this.refs.$selectRadialExtent.value;return"".concat(t," ").concat(e)}},{key:"updateColorStep",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=Ms(this.colorsteps);yl.sort(e),this.emit("changeColorStep",function(t){for(var e=1;ethis.screenX2.value)&&!(t.y.value>this.screenY2.value)))))}},{key:"toBoundCSS",value:function(){return{top:"".concat(this.json.y),left:"".concat(this.json.x),width:"".concat(this.json.width),height:"".concat(this.json.height)}}},{key:"screenX",get:function(){return this.json.x}},{key:"screenY",get:function(){return this.json.y}},{key:"screenX2",get:function(){return mr.px(this.screenX.value+this.json.width.value)}},{key:"screenY2",get:function(){return mr.px(this.screenY.value+this.json.height.value)}},{key:"screenWidth",get:function(){return this.json.width}},{key:"screenHeight",get:function(){return this.json.height}},{key:"screenRect",get:function(){return{left:this.screenX,top:this.screenY,width:this.screenWidth,height:this.screenHeight}}},{key:"centerX",get:function(){var t=0;return 0!=this.json.width.value&&(t=Math.floor(this.json.width.value/2)),mr.px(this.screenX.value+t)}},{key:"centerY",get:function(){var t=0;return 0!=this.json.height.value&&(t=Math.floor(this.json.height.value/2)),mr.px(this.screenY.value+t)}},{key:"selected",get:function(){return Si.selection.check(this.id)}},{key:"selectedOne",get:function(){return Si.selection.checkOne(this.id)}}])&&Gs(n.prototype,r),o&&Gs(n,o),e}();function qs(t){return(qs="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 Js(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e0&&void 0!==arguments[0]?arguments[0]:{};return ef(nf(e.prototype),"getDefaultObject",this).call(this,function(t){for(var e=1;e0&&void 0!==arguments[0]&&arguments[0];return lf(sf(e.prototype),"getDefaultObject",this).call(this,{itemType:"display",type:"block",direction:"row",alignItems:"normal",alignCentent:"normal",flexWrap:"nowrap",justifyContent:"flex-start",gap:mr.px(0),rowGap:mr.percent(1),columnGap:mr.percent(1),columns:[mr.fr(1)],rows:[mr.fr(1)],areas:[]})}},{key:"toCSS",value:function(){var t=this.json,e={display:t.type};return"flex"==e.display?("row"!=t.direction&&(e["flex-direction"]=t.direction),"normal"!=t.alignItems&&(e["align-items"]=t.alignItems),"normal"!=t.alignContent&&(e["align-content"]=t.alignContent),"nowrap"!=t.flexWrap&&(e["flex-wrap"]=t.flexWrap),"flex-start"!=t.justifyContent&&(e["justify-content"]=t.justifyContent)):"grid"==e.display&&(t.gap.value>0&&(e["grid-gap"]=t.gap),t.rowGap.value>0&&(e["grid-row-gap"]=t.rowGap),t.columnGap.value>0&&(e["grid-column-gap"]=t.columnGap),t.columns.length&&(e["grid-template-columns"]=t.columns.join(Gt)),t.rows.length&&(e["grid-template-rows"]=t.rows.join(Gt)),t.areas.length&&(e["grid-template-areas"]=t.areas.map(function(t){return'"'.concat(t.join(Gt),'"')}).join(Gt)),"normal"!=t.alignItems&&(e["align-items"]=t.alignItems),"normal"!=t.alignContent&&(e["align-content"]=t.alignContent),"flex-start"!=t.justifyContent&&(e["justify-content"]=t.justifyContent)),e}},{key:"isLayout",value:function(){return this.isGrid()||this.isFlex()}},{key:"isFlex",value:function(){return"flex"==this.json.type}},{key:"isGrid",value:function(){return"grid"==this.json.type}},{key:"isInline",value:function(){return"inline"==this.json.type}},{key:"isInlineBlock",value:function(){return"inline-block"==this.json.type}},{key:"isBlock",value:function(){return"block"==this.json.type}},{key:"changeColumn",value:function(t,e){var n=this.json.columns[t],r=this.json.columns[e];this.json.columns[e]=n,this.json.columns[t]=r}},{key:"removeColumn",value:function(t){this.json.columns.splice(t,1)}},{key:"updateColumn",value:function(t,e){this.json.columns[t]=e}},{key:"changeRow",value:function(t,e){var n=this.json.rows[t],r=this.json.rows[e];this.json.rows[e]=n,this.json.rows[t]=r}},{key:"removeRow",value:function(t){this.json.rows.splice(t,1)}},{key:"updateRow",value:function(t,e){this.json.rows[t]=e}}])&&uf(n.prototype,r),o&&uf(n,o),e}();function hf(t){return(hf="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 yf(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:"transparent";return new e({colorsteps:[new yl({color:t,percent:0,index:0})]})}}],(r=[{key:"getDefaultObject",value:function(){return Sf(jf(e.prototype),"getDefaultObject",this).call(this,{type:"static-gradient",static:!0,colorsteps:[new yl({color:"red",percent:0,index:0})]})}},{key:"toString",value:function(){var t=this.json.colorsteps[0].color;return"linear-gradient(to right, ".concat(t,", ").concat(t,")")}},{key:"isStatic",value:function(){return!0}}])&&kf(n.prototype,r),o&&kf(n,o),e}();function $f(t){return($f="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 Cf(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function _f(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ef(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{};return If(Bf(e.prototype),"getDefaultObject",this).call(this,function(t){for(var e=1;e0&&void 0!==arguments[0]&&arguments[0],e=this.json;return"url(".concat(t?Si.getFile(e.url):e.url,")")}}],[{key:"isImageFile",value:function(t){return Df.includes(t)}}]),e}();function Ff(t){return(Ff="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 Vf(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{};return Zf(Qf(e.prototype),"getDefaultObject",this).call(this,function(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{};return bp(gp(e.prototype),"getDefaultObject",this).call(this,function(t){for(var e=1;ee.index?1:(t.index,e.index,0):t.percent>e.percent?1:-1}),t.map(function(e,n){return e.prevColorStep=e.cut&&n>0?t[n-1]:null,e}).map(function(t){var e=Math.floor(3.6*t.percent),n=Xt;if(t.cut&&t.prevColorStep){var r=Math.floor(3.6*t.prevColorStep.percent);n="".concat(r,"deg")}return"".concat(t.color," ").concat(n," ").concat(e,"deg")}).join(",")):Xt}},{key:"toString",value:function(){var t=this.getColorString(),e=[],n=this.json,r=n.angle,o=n.radialPosition||br.CENTER;o=kp[o]?o:o.join(Gt),ge(r)&&(r=+(Op[r]||r),e.push("from ".concat(r,"deg"))),o&&e.push("at ".concat(o));var i=e.length?e.join(Gt)+",":Xt;return"".concat(n.type,"(").concat(i," ").concat(t,")")}}])&&dp(n.prototype,r),o&&dp(n,o),e}();function jp(t){return(jp="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 Pp(t,e){for(var n=0;n0&&void 0!==arguments[0]&&arguments[0];if(!this.json.image)return{};var e=this.json.image.toString(t);return{"border-image-source":"".concat(e)}}},{key:"toBorderImageRepeatCSS",value:function(){return this.json.repeat?{"border-image-repeat":"".concat(this.json.repeat)}:{}}},{key:"toBorderImageWidthCSS",value:function(){var t=this;if(!this.json.width)return{};if(0===Object.keys(this.json.width).filter(function(e){return t.json.width[e].value>0}).length)return{};var e=Object.keys(this.json.width).map(function(e){return t.json.width[e].toString()}).join(Gt);return{"border-image-width":"".concat(e)}}},{key:"toBorderImageSliceCSS",value:function(){var t=this;if(!this.json.slice)return{};var e=Object.keys(this.json.slice).map(function(e){var n=t.json.slice[e];return n.isPercent()?n.toString():n.value}).join(Gt);return{"border-image-slice":"".concat(e)}}},{key:"toCSS",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return Rp({},this.toBorderImageCSS(t),this.toBorderImageRepeatCSS(),this.toBorderImageSliceCSS(),this.toBorderImageWidthCSS())}},{key:"toString",value:function(){return ye(this.toCSS(),function(t,e){return"".concat(t,": ").concat(e)}).join(";")}},{key:"image",get:function(){return this.json.image},set:function(t){this.json.image=t}}])&&Bp(n.prototype,r),o&&Bp(n,o),e}();function Vp(t){return(Vp="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 Lp(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{};return this.addProperty(nh({checked:!0,value:mr.px(0)},t))}},{key:"addProperty",value:function(t){this.json.properties.push(t)}},{key:"removeProperty",value:function(t){this.json.properties.splice(t,1)}},{key:"sortItem",value:function(t,e,n){t.splice.apply(t,[n+(e1&&void 0!==arguments[1]?arguments[1]:{};Object.assign(this.json.properties[+t],nh({},e))}},{key:"updatePropertyByKey",value:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=-1,r=0,o=this.json.properties.length;r0&&void 0!==arguments[0]&&arguments[0];return this.json.image?{"background-image":this.json.image.toString(t)}:{}}},{key:"toBackgroundPositionCSS",value:function(){var t=this.json;return{"background-position":"".concat(t.x," ").concat(t.y)}}},{key:"toBackgroundSizeCSS",value:function(){var t=this.json,e="auto";return"contain"==t.size||"cover"==t.size?e=t.size:t.width.isPercent()&&t.width.isPercent()&&100==+t.width&&100==+t.height||(e="".concat(t.width," ").concat(t.height)),{"background-size":e}}},{key:"toBackgroundRepeatCSS",value:function(){return{"background-repeat":this.json.repeat}}},{key:"toBackgroundBlendCSS",value:function(){return{"background-blend-mode":this.json.blendMode}}},{key:"toCSS",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return ph({},this.toBackgroundImageCSS(t),this.toBackgroundPositionCSS(),this.toBackgroundSizeCSS(),this.toBackgroundRepeatCSS(),this.toBackgroundBlendCSS())}},{key:"toString",value:function(){return ye(this.toCSS(),function(t,e){return"".concat(t,": ").concat(e)}).join(";")}},{key:"toBackgroundCSS",value:function(){var t=this.toCSS();return{background:"".concat(t["background-image"]," ")}}},{key:"image",get:function(){return this.json.image},set:function(t){this.json.image=t}}])&&yh(n.prototype,r),o&&yh(n,o),e}();function kh(t){return(kh="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 Oh(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);ee.offset.value?1:-1}),Ie(Ph(),this.json.name,e.map(function(e){return 0===e.properties.length?Xt:Ie(jh(),e.offset.toString(),e.properties.map(function(e){if(t.isMultiStyle(e.key))return t.getMultiStyleString(e);var n=e.value.toString();return n?"".concat(e.key,": ").concat(n,";"):Xt}).join(Xt),"\n\n")}),"\n\n")}},{key:"createOffset",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.addOffset(new lh(function(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:{};this.json.offsets[+t].reset(e)}},{key:"toCSS",value:function(){return{}}},{key:"toString",value:function(){return this.toCSSText()}}])&&$h(n.prototype,r),o&&$h(n,o),e}();function Ih(t){return(Ih="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 Bh(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=[],r=!0,o=!1,i=void 0;try{for(var a,u=t[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}return n}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function Ah(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e0&&void 0!==arguments[0]?arguments[0]:{};return Vh(Lh(e.prototype),"getDefaultObject",this).call(this,Mh({width:mr.px(300),height:mr.px(400),rootVariable:"",variable:"",transform:"",filter:"","backdrop-filter":"","background-color":"white","background-image":"","border-radius":"","box-shadow":"","text-shadow":"","clip-path":"",color:"black","font-size":"","line-height":"","text-align":"","text-transform":"","text-decoration":"","letter-spacing":"","word-spacing":"","text-indent":"",x:mr.px(100),y:mr.px(100),border:{},outline:{color:"currentcolor",style:"none",width:mr.px(3)},borderRadius:{},borderImage:new Fp,applyBorderImage:!1,animations:[],transitions:[],keyframes:[],perspectiveOriginPositionX:mr.percent(0),perspectiveOriginPositionY:mr.percent(0),display:pf.parse({display:"block"}),marginTop:mr.px(0),marginBottom:mr.px(0),marginRight:mr.px(0),marginLeft:mr.px(0),paddingTop:mr.px(0),paddingBottom:mr.px(0),paddingRight:mr.px(0),paddingLeft:mr.px(0),content:""},t))}},{key:"convert",value:function(t){return(t=Vh(Lh(e.prototype),"convert",this).call(this,t)).width=mr.parse(t.width),t.height=mr.parse(t.height),t.x=mr.parse(t.x),t.y=mr.parse(t.y),t.perspectiveOriginPositionX=mr.parse(t.perspectiveOriginPositionX),t.perspectiveOriginPositionY=mr.parse(t.perspectiveOriginPositionY),t.display&&(t.display=pf.parse(t.display)),t}},{key:"addAnimation",value:function(t){return this.json.animations.push(t),t}},{key:"addTransition",value:function(t){return this.json.transitions.push(t),t}},{key:"addKeyframe",value:function(t){return this.json.keyframes.push(t),t}},{key:"createAnimation",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.addAnimation(new Yp(Mh({checked:!0},t)))}},{key:"createKeyframe",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.addKeyframe(new Rh(Mh({checked:!0},t)))}},{key:"createTransition",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.addTransition(new Qp(Mh({checked:!0},t)))}},{key:"removePropertyList",value:function(t,e){t.splice(e,1)}},{key:"removeAnimation",value:function(t){this.removePropertyList(this.json.animations,t)}},{key:"removeKeyframe",value:function(t){this.removePropertyList(this.json.keyframes,t)}},{key:"removeTransition",value:function(t){this.removePropertyList(this.json.transitions,t)}},{key:"sortItem",value:function(t,e,n){t.splice.apply(t,[n+(e1&&void 0!==arguments[1]?arguments[1]:{};this.json.animations[+t].reset(e)}},{key:"updateTransition",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.json.transitions[+t].reset(e)}},{key:"updateKeyframe",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.json.keyframes[+t].reset(e)}},{key:"setSize",value:function(t){this.reset(t)}},{key:"setBorder",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,r=this.json.border;if("all"===t)n?this.json.border={all:n}:["top","right","bottom","left"].forEach(function(t){delete e.json.border[t]});else{if(r.all&&be(n)){var o=Mh({},r.all);r.top=Mh({},o),r.bottom=Mh({},o),r.left=Mh({},o),r.right=Mh({},o)}r.all&&delete r.all,n&&(this.json.border[t]=n)}}},{key:"setOutline",value:function(t){this.json.outline=Mh({},this.json.outline,t)}},{key:"setBorderRadius",value:function(t,e){this.json.borderRadius=e}},{key:"setBorderImageOffset",value:function(t,e){this.json.borderImageOffset=e}},{key:"setBorderImage",value:function(t){this.json.borderImage=t}},{key:"traverse",value:function(t,e,n){var r=this;t.isAttribute()||(n||!t.isLayoutItem()||t.isRootItem())&&(e.push(t),t.children.forEach(function(t){r.traverse(t,e)}))}},{key:"tree",value:function(t){var e=this,n=[];return this.children.forEach(function(r){e.traverse(r,n,t)}),n}},{key:"toPropertyCSS",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n={};return t.forEach(function(t){he(t.toCSS(e),function(t,e){n[t]||(n[t]=[]),n[t].push(e)})}),Ce(n)}},{key:"toStringPropertyCSS",value:function(t){var e={};return this.json[t].split(";").forEach(function(t){var n=Bh(t.split(":").map(function(t){return t.trim()}),2),r=n[0],o=n[1];e[r]=o}),e}},{key:"toBackgroundImageCSS",value:function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.toStringPropertyCSS("background-image")}},{key:"getBorderString",value:function(t){return"".concat(t.width," ").concat(t.style," ").concat(t.color)}},{key:"toSizeCSS",value:function(){return{width:this.json.width,height:this.json.height}}},{key:"toBorderCSS",value:function(){var t=this,e={},n=this.json.border;return n.all?e={border:this.getBorderString(n.all)}:he(n,function(n,r){e["border-".concat(n)]=t.getBorderString(r)}),e}},{key:"toOutlineCSS",value:function(){var t=this.json.outline;return t?{outline:"".concat(t.width," ").concat(t.style," ").concat(t.color)}:{}}},{key:"toBorderRadiusCSS",value:function(){return this.toStringPropertyCSS("border-radius")}},{key:"toBorderImageCSS",value:function(){return this.json.borderImage&&this.json.applyBorderImage?this.json.borderImage.toCSS():{}}},{key:"toKeyCSS",value:function(t){return this.json[t]?Dh({},t,this.json[t]):{}}},{key:"toFilterCSS",value:function(){return this.toKeyCSS("filter")}},{key:"toClipPathCSS",value:function(){return this.toKeyCSS("clip-path")}},{key:"toTransformCSS",value:function(){return this.toKeyCSS("transform")}},{key:"toBackdropFilterCSS",value:function(){return this.toKeyCSS("backdrop-filter")}},{key:"toBoxShadowCSS",value:function(){return this.toKeyCSS("box-shadow")}},{key:"toTextShadowCSS",value:function(){return this.toKeyCSS("text-shadow")}},{key:"toAnimationCSS",value:function(){return this.toPropertyCSS(this.json.animations)}},{key:"toTransitionCSS",value:function(){return this.toPropertyCSS(this.json.transitions)}},{key:"toString",value:function(){return Sl(this.toCSS())}},{key:"toExport",value:function(){return Sl(this.toCSS(!0))}},{key:"toBoxModelCSS",value:function(){var t=this.json,e={};return t.marginTop.value===t.marginBottom.value&&t.marginLeft.value===t.marginRight.value&&t.marginTop.value===t.marginRight.value?e.margin=t.marginTop:(e["margin-top"]=t.marginTop,e["margin-bottom"]=t.marginBottom,e["margin-left"]=t.marginLeft,e["margin-right"]=t.marginRight),t.paddingTop.value===t.paddingBottom.value&&t.paddingLeft.value===t.paddingRight.value&&t.paddingTop.value===t.paddingRight.value?e.padding=t.paddingTop:(e["padding-top"]=t.paddingTop,e["padding-bottom"]=t.paddingBottom,e["padding-left"]=t.paddingLeft,e["padding-right"]=t.paddingRight),e}},{key:"toKeyListCSS",value:function(){for(var t=this.json,e={},n=arguments.length,r=new Array(n),o=0;o0&&void 0!==arguments[0]&&arguments[0],e=this.json,n={"background-color":e["background-color"],color:e.color};return t||(n.content=e.content),Ol(Mh({},this.toVariableCSS(),n,this.toFontCSS(),this.toBoxModelCSS(),this.toSizeCSS(),this.toBorderCSS(),this.toOutlineCSS(),this.toBorderRadiusCSS(),this.toBorderImageCSS(),this.toAnimationCSS(),this.toClipPathCSS(),this.toFilterCSS(),this.toTransformCSS(),this.toBackdropFilterCSS(),this.toBackgroundImageCSS(t),this.toBoxShadowCSS(),this.toTextShadowCSS(),this.toAnimationCSS()))}},{key:"toEmbedCSS",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this.json,n={"background-color":e["background-color"],color:e.color,content:e.content};return Ol(Mh({},this.toVariableCSS(),n,this.toFontCSS(),this.toBoxModelCSS(),this.toSizeCSS(),this.toBorderCSS(),this.toOutlineCSS(),this.toBorderRadiusCSS(),this.toBorderImageCSS(),this.toAnimationCSS(),this.toClipPathCSS(),this.toFilterCSS(),this.toTransformCSS(),this.toBackdropFilterCSS(),this.toBackgroundImageCSS(t),this.toBoxShadowCSS(),this.toTextShadowCSS()))}},{key:"toAnimationSnapCSS",value:function(){var t=this.json;return Ol(Mh({},{"background-color":t["background-color"],color:t.color},this.toBoxModelCSS(),this.toSizeCSS(),this.toBorderCSS(),this.toOutlineCSS(),this.toBorderRadiusCSS(),this.toBorderImageCSS(),this.toClipPathCSS(),this.toFilterCSS(),this.toTransformCSS(),this.toBackdropFilterCSS(),this.toBackgroundImageCSS(),this.toBoxShadowCSS(),this.toTextShadowCSS()))}},{key:"toKeyframeString",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.json.keyframes.map(function(e){return e.toString(t)}).join("\n\n")}},{key:"toGridString",value:function(){return""}}])&&zh(n.prototype,r),o&&zh(n,o),e}();function Xh(t){return(Xh="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 Gh(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Yh(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{};return Kh(Wh(e.prototype),"getDefaultObject",this).call(this,function(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{};return py(hy(e.prototype),"getDefaultObject",this).call(this,function(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{};return Hy(Ny(e.prototype),"getDefaultObject",this).call(this,function(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{};this.style=t}},{key:"parseSize",value:function(){var t=this.getStyle(),e={};return t.width&&(e.width=mr.parse(t.width)),t.height&&(e.height=mr.parse(t.height)),e}},{key:"parseColor",value:function(){var t=this.getStyle();return{color:t.color||"black",backgroundColor:t["background-color"]||"white"}}},{key:"parseBorder",value:function(){var t=this.getStyle(),e={};t.border?e={border:{width:mr.parse(t.borderWidth),style:t.borderStyle,color:t.borderColor},borderTop:null,borderLeft:null,borderRight:null,borderBottom:null}:(e.border=null,["border-top","border-right","border-left","border-bottom"].forEach(function(n){t[n]?e[n]={width:mr.parse(t["".concat(n,"-width")]),style:t["".concat(n,"-style")],color:t["".concat(n,"-color")]}:e[n]=null}));var n={};return he(e,function(t,e){e&&(n[t]=e)}),n}},{key:"parseOutline",value:function(){var t={};if((r=this.getStyle()).outline){var e=wn(r.outline),n=null,r="",o="";return e.str.split(Gt).forEach(function(t){t.indexOf("@")>-1?n=On(t,e.matches):Wy.test(t)?r=t:(o=mr.parse(t)).includes("thick","thin","medium")&&("thick"===o.value?o=mr.px(5):"thin"===o.value?o=mr.px(1):"medium"===o.value&&(o=mr.px(3)))}),o&&(t.width=o),r&&(t.style=r),n&&(t.color=n),t}e={};return he(t,function(t,n){n&&(e[t]=n)}),e}},{key:"filterStyle",value:function(){for(var t=arguments.length,e=new Array(t),n=0;n\n
\n
\n
\n \n \n "}},{key:Zo("setParser"),value:function(t){this.parser=t(this)}},{key:"parseEnd",value:function(t){var e=this.styleParser.parse(t);this.modifyArtBoard(e),this.emit(ri)}},{key:"modifyArtBoard",value:function(t){var e=Si.selection.current;e&&e.reset(t)}},{key:"generate",value:function(t,e,n){this.refs.$style.html("\n :root {\n ".concat(Sl(n),"\n }\n\n /* element */\n .csseditor .page-canvas { \n ").concat(Sl(t),"; \n } \n\n /* keyframe */\n ").concat(e,"\n ")),this.refs.$canvas.text()!=t.content&&this.refs.$canvas.text(t.content),this.refs.$lock.css({width:t.width,height:t.height})}},{key:Zo("refreshCanvas"),value:function(){var t=Si.selection.current;t&&(this.props.embed?this.parser.generate(t.toEmbedCSS(),t.toKeyframeString(),t.toRootVariableCSS()):this.generate(t.toCSS(),t.toKeyframeString(),t.toRootVariableCSS()))}},{key:Vr(),value:function(){this.emit(ri)}}])&&Zy(n.prototype,r),o&&Zy(n,o),e}();function od(t){return(od="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 id(t,e){for(var n=0;n\n
').concat(this.getIconString(),'
\n
').concat(this.getTitle(),"
\n \n ")}},{key:"clickButton",value:function(t){}},{key:"getChecked",value:function(){return!1}},{key:"getTitle",value:function(){return ld}},{key:"getIcon",value:function(){return sd}},{key:"getIconString",value:function(){return sd}},{key:Vr(),value:function(t){this.clickButton(t)}}])&&id(n.prototype,r),o&&id(n,o),e}();function pd(t){return(pd="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 hd(t,e){for(var n=0;n\n \n \n \n '}},{key:Jr(),value:function(){var t=Si.selection.current;return t&&this.refs.$codepen.val(JSON.stringify({html:'
',css:"#sample { width: 300px; height:300px; ".concat(t.toExport(),"; } ")})),!1}}])&&md(n.prototype,r),o&&md(n,o),e}();function jd(t){return(jd="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 Pd(t,e){for(var n=0;n\n \n \n \n \n \n \n \n '}},{key:Jr(),value:function(){var t=Si.selection.current;return t&&(this.refs.$title.val("Gradient - easylogic.studio"),this.refs.$description.val("https://gradient.easylogic.studio"),this.refs.$html.val('
'),this.refs.$css.val("#sample { width:300px;height:300px; ".concat(t.toExport(),"; } "))),!1}}])&&Pd(n.prototype,r),o&&Pd(n,o),e}(),ExportCodePen:Sd,Github:bd};function Ed(t){return(Ed="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 Td(t,e){for(var n=0;n\n
\n \n
\n
\n \n \n \n
\n \n "}}])&&Td(n.prototype,r),o&&Td(n,o),e}();function Md(t){return(Md="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 Dd(t,e){for(var n=0;n\n ").concat(this.isHideHeader()?Xt:"\n
\n \n ').concat(this.getTools(),"\n
"),"\n
").concat(this.getBody(),"
\n \n ")}},{key:"isHideHeader",value:function(){return!1}},{key:"isFirstShow",value:function(){return!0}},{key:"getClassName",value:function(){return Xt}},{key:"getTitle",value:function(){return Xt}},{key:"getTools",value:function(){return Xt}},{key:"getBody",value:function(){return Xt}},{key:Vr("$title label"),value:function(t){t.$delegateTarget.parent().hasClass("property-title")&&(this.$el.toggleClass("show"),this.onToggleShow())}},{key:Vr("$title .icon"),value:function(t){t.$delegateTarget.parent().hasClass("property-title")&&(this.$el.toggleClass("show"),this.onToggleShow())}},{key:"isPropertyShow",value:function(){return this.$el.hasClass("show")}},{key:"toggle",value:function(t){this.$el.toggle(t)}},{key:"hide",value:function(){this.$el.hide()}},{key:"show",value:function(){this.$el.show()}}])&&Dd(n.prototype,r),o&&Dd(n,o),e}();function Hd(t){return(Hd="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 Nd(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{};this.setState(t),this.modifyColor()}},{key:"modifyColor",value:function(){this.parent.trigger(this.props.onchange,this.state.color,this.state.params)}},{key:"changeColor",value:function(t){this.setState({color:t}),this.refs.$miniView.cssText("background-color: ".concat(t)),this.refs.$colorCode.val(t)}},{key:"template",value:function(){return"\n
\n
\n
\n
\n
\n
\n
\n \n
\n
\n ")}},{key:Vr("$preview"),value:function(){this.viewColorPicker()}},{key:"viewColorPicker",value:function(){var t=this.refs.$preview.rect();this.emit("showColorPicker",{changeEvent:"changeColorViewEditor",color:this.state.color,left:t.left+90,top:t.top},{id:this.id})}},{key:Wr("$el .color-code input"),value:function(t){var e=t.$delegateTarget.value;this.refs.$miniView.cssText("background-color: ".concat(e)),this.updateData({color:e})}},{key:Zo("changeColorViewEditor"),value:function(t,e){e.id===this.id&&(this.refs.$miniView.cssText("background-color: ".concat(t)),this.refs.$colorCode.val(t),this.updateData({color:t}))}}])&&Nd(n.prototype,r),o&&Nd(n,o),e}();function Kd(t){return(Kd="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 Wd(t,e){for(var n=0;n"}},{key:ho("$backgroundColor"),value:function(){var t=(Si.selection.current||{})["background-color"]||"rgba(0, 0, 0, 1)";return"')}},{key:Zo("changeColor"),value:function(t){var e=Si.selection.current;e&&(e.reset({"background-color":t}),this.emit("refreshCanvas"))}},{key:Zo(oi,"CHANGE_LAYER",ii,ri),value:function(){this.refresh()}}])&&Wd(n.prototype,r),o&&Wd(n,o),e}();function tv(t){return(tv="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 ev(){var t=function(t,e){e||(e=t.slice(0));return Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}(['\n
\n
\n
\n
\n
\n \n
\n
\n
\n \n
\n
\n
\n
\n
\n \n
\n
\n
\n \n
\n
\n \n
\n
\n
\n
\n
\n \n
\n
\n
\n \n
\n
\n
\n\n
\n
\n \n
\n
\n \n
\n
\n
\n
\n \n \n ']);return ev=function(){return t},t}function nv(t,e){for(var n=0;n")})}},{key:"getTemplateForBorderProperty",value:function(){return Ie(ev(),av.map(function(t){return'")}))}},{key:"getBody",value:function(){return"\n ".concat(this.getTemplateForBorderProperty(),"\n ")}},{key:Kr("$unit"),value:function(t){this.refreshBorderInfo()}},{key:Wr("$widthRange"),value:function(t){this.refs.$width.val(this.refs.$widthRange.value),this.refreshBorderInfo()}},{key:Wr("$width"),value:function(t){this.refs.$widthRange.val(this.refs.$width.value),this.refreshBorderInfo()}},{key:Kr("$style"),value:function(t){this.refreshBorderInfo()}},{key:"refreshBorderInfo",value:function(){var t=this.refs.$width.value,e=this.refs.$borderDirection.attr("data-selected-value"),n=this.refs.$unit.value,r=this.refs.$style.value,o=this.refs.$color.css("background-color"),i=Si.selection.current;i&&(i.setBorder(e,{width:new mr(t,n),style:r,color:o}),this.refresh(),this.emit("refreshCanvas"))}},{key:Vr("$borderDirection button"),value:function(t){var e=t.$delegateTarget.attr("data-value");this.refs.$borderDirection.attr("data-selected-value",e);var n=Si.selection.current;n&&n.setBorder(e),this.refresh()}},{key:Vr("$color"),value:function(t){this.emit("showColorPicker",{changeEvent:"changeBorderColor",color:this.refs.$color.css("background-color")}),this.emit("hidePropertyPopup"),this.emit("hideGradientEditor")}},{key:Zo("changeBorderColor"),value:function(t){this.refs.$color.css("background-color",t),this.refreshBorderInfo()}}])&&nv(n.prototype,r),o&&nv(n,o),e}(),lv='',sv='',fv='',pv='',hv='',yv='',dv='',vv='',bv='',gv='',mv='',wv='',kv='',Ov='',Sv='\n',jv='',Pv='\n \n',xv='';function $v(t){return($v="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 Cv(t,e){for(var n=0;n\n ").concat(t?""):Xt,"\n \n \n ")}},{key:"getValue",value:function(){return this.state.value}},{key:ho("$options"),value:function(){var t=this;return this.state.options.map(function(e){var n=e===t.state.value?"selected":"";return"")})}},{key:Kr("$options"),value:function(){this.updateData({value:this.refs.$options.value})}},{key:"updateData",value:function(t){this.setState(t),this.parent.trigger(this.props.onchange,this.props.key,this.state.value,this.props.params)}}])&&Cv(n.prototype,r),o&&Cv(n,o),e}();function Iv(t){return(Iv="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 Bv(t,e){for(var n=0;n"}},{key:ho("$body"),value:function(){var t=this.state,e=t.min,n=t.max,r=t.step,o=t.label,i=t.calc,a=t.type,u=+this.state.value.value.toString();isNaN(u)&&(u=0);var c=i?"has-calc":"";return"\n
\n ").concat(o?""):Xt,"\n \n
\n
\n \n \n \n \n \n
\n
\n
\n
\n calc\n \n
\n
\n
\n ")}},{key:"getValue",value:function(){return this.state.value}},{key:"setValue",value:function(t){this.setState({value:t})}},{key:Vr("$toggleType"),value:function(t){var e="calc"===this.state.type?"range":"calc";n="";if("calc"===e)n=mr.calc(this.refs.$calc.value);else{var n=this.getRef("$propertyNumber").value,r=this.children.$unit.getValue();n=new mr(n,r)}this.updateData({type:e,value:n}),this.refs.$range.attr("data-selected-type",e)}},{key:Wr("$calc"),value:function(){this.updateData({value:mr.calc(this.refs.$calc.value)})}},{key:"updateData",value:function(t){this.setState(t,!1),this.parent.trigger(this.props.onchange,this.props.key,this.state.value,this.props.params)}},{key:"updateCalc",value:function(){this.refs.$calc.val(this.state.value)}},{key:Wr("$propertyNumber"),value:function(t){var e=+this.getRef("$propertyNumber").value;this.getRef("$property").val(e),this.updateData({value:this.state.value.set(e)}),this.updateCalc()}},{key:Wr("$property"),value:function(t){var e=+this.getRef("$property").value;this.getRef("$propertyNumber").val(e),this.updateData({value:this.state.value.set(e)}),this.updateCalc()}},{key:Zo("changeUnit"),value:function(t,e){this.updateData({value:this.state.value.toUnit(e)}),this.updateCalc()}}])&&Bv(n.prototype,r),o&&Bv(n,o),e}();function Fv(t){return(Fv="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 Vv(){var t=function(t,e){e||(e=t.slice(0));return Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}(['\n
\n
\n \n \n
\n
\n \n
\n
\n