From 516f647ea1d2a98c08751dd9a654ba7e56ff9548 Mon Sep 17 00:00:00 2001 From: junghwan-park Date: Fri, 15 Feb 2019 17:23:02 +0900 Subject: [PATCH] chore: v3.5.0 Bundle --- dist/tui-image-editor.css | 6 +- dist/tui-image-editor.js | 168 +++++++++++++++++++++++----------- dist/tui-image-editor.min.css | 4 +- dist/tui-image-editor.min.js | 20 ++-- index.d.ts | 2 +- 5 files changed, 133 insertions(+), 67 deletions(-) diff --git a/dist/tui-image-editor.css b/dist/tui-image-editor.css index 51b7b8f44..c6fba2978 100644 --- a/dist/tui-image-editor.css +++ b/dist/tui-image-editor.css @@ -1,6 +1,6 @@ /*! * tui-image-editor.js - * @version 3.4.0 + * @version 3.5.0 * @author NHNEnt FE Development Lab * @license MIT */ @@ -58,7 +58,9 @@ body > textarea { display: none; } .tui-image-editor-container .tui-image-editor-header-buttons button, +.tui-image-editor-container .tui-image-editor-header-buttons div, .tui-image-editor-container .tui-image-editor-controls-buttons button { + display: inline-block; position: relative; width: 120px; height: 40px; @@ -73,6 +75,7 @@ body > textarea { cursor: pointer; vertical-align: middle; letter-spacing: 0.3px; + text-align: center; } .tui-image-editor-container .tui-image-editor-download-btn { background-color: #fdba3b; @@ -858,6 +861,7 @@ body > textarea { #tie-icon-add-button.icon-location .tui-image-editor-button[data-icontype="icon-location"] svg > use.active, #tie-icon-add-button.icon-polygon .tui-image-editor-button[data-icontype="icon-polygon"] svg > use.active, #tie-icon-add-button.icon-star .tui-image-editor-button[data-icontype="icon-star"] svg > use.active, +#tie-icon-add-button.icon-star-2 .tui-image-editor-button[data-icontype="icon-star-2"] svg > use.active, #tie-icon-add-button.icon-arrow-3 .tui-image-editor-button[data-icontype="icon-arrow-3"] svg > use.active, #tie-icon-add-button.icon-arrow-2 .tui-image-editor-button[data-icontype="icon-arrow-2"] svg > use.active, #tie-icon-add-button.icon-arrow .tui-image-editor-button[data-icontype="icon-arrow"] svg > use.active { diff --git a/dist/tui-image-editor.js b/dist/tui-image-editor.js index 7e97ac2a6..ad9586d84 100644 --- a/dist/tui-image-editor.js +++ b/dist/tui-image-editor.js @@ -1,6 +1,6 @@ /*! * tui-image-editor.js - * @version 3.4.0 + * @version 3.5.0 * @author NHNEnt FE Development Lab * @license MIT */ @@ -642,7 +642,7 @@ return /******/ (function(modules) { // webpackBootstrap /** * Image editor * @class - * @param {string|jQuery|HTMLElement} wrapper - Wrapper's element or selector + * @param {string|HTMLElement} wrapper - Wrapper's element or selector * @param {Object} [options] - Canvas max width & height of css * @param {number} [options.includeUI] - Use the provided UI * @param {Object} [options.includeUI.loadImage] - Basic editing image @@ -4773,18 +4773,20 @@ return /******/ (function(modules) { // webpackBootstrap * @type {Object.} */ rejectMessages: { + addedObject: 'The object is already added.', flip: 'The flipX and flipY setting values are not changed.', - rotation: 'The current angle is same the old angle.', - loadImage: 'The background image is empty.', + invalidDrawingMode: 'This operation is not supported in the drawing mode.', + invalidParameters: 'Invalid parameters.', isLock: 'The executing command state is locked.', - undo: 'The promise of undo command is reject.', - redo: 'The promise of redo command is reject.', - invalidDrawingMode: 'This operation is not supported in the drawing mode', - invalidParameters: 'Invalid parameters', + loadImage: 'The background image is empty.', + loadingImageFailed: 'Invalid image loaded.', noActiveObject: 'There is no active object.', - unsupportedType: 'Unsupported object type', noObject: 'The object is not in canvas.', - addedObject: 'The object is already added.' + redo: 'The promise of redo command is reject.', + rotation: 'The current angle is same the old angle.', + undo: 'The promise of undo command is reject.', + unsupportedOperation: 'Unsupported operation.', + unsupportedType: 'Unsupported object type.' }, /** @@ -4970,7 +4972,7 @@ return /******/ (function(modules) { // webpackBootstrap /** * Ui class * @class - * @param {string|jQuery|HTMLElement} element - Wrapper's element or selector + * @param {string|HTMLElement} element - Wrapper's element or selector * @param {Object} [options] - Ui setting options * @param {number} option.loadImage - Init default load image * @param {number} option.initMenu - Init start menu @@ -5191,10 +5193,10 @@ return /******/ (function(modules) { // webpackBootstrap /** * Change delete button status * @param {Object} [options] - Ui setting options - * @param {number} option.loadImage - Init default load image - * @param {number} option.initMenu - Init start menu - * @param {Boolean} [option.menuBarPosition=bottom] - Let - * @param {Boolean} [option.applyCropSelectionStyle=false] - Let + * @param {object} [option.loadImage] - Init default load image + * @param {string} [option.initMenu] - Init start menu + * @param {string} [option.menuBarPosition=bottom] - Let + * @param {boolean} [option.applyCropSelectionStyle=false] - Let * @returns {Object} initialize option * @private */ @@ -5210,7 +5212,7 @@ return /******/ (function(modules) { // webpackBootstrap locale: {}, menuIconPath: '', menu: ['crop', 'flip', 'rotate', 'draw', 'shape', 'icon', 'text', 'mask', 'filter'], - initMenu: false, + initMenu: '', uiSize: { width: '100%', height: '100%' @@ -5269,7 +5271,7 @@ return /******/ (function(modules) { // webpackBootstrap /** * Make primary ui dom element - * @param {string|jQuery|HTMLElement} element - Wrapper's element or selector + * @param {string|HTMLElement} element - Wrapper's element or selector * @private */ @@ -5280,9 +5282,7 @@ return /******/ (function(modules) { // webpackBootstrap window.snippet = _tuiCodeSnippet2.default; - if (element.jquery) { - selectedElement = element[0]; - } else if (element.nodeType) { + if (element.nodeType) { selectedElement = element; } else { selectedElement = document.querySelector(element); @@ -5569,9 +5569,10 @@ return /******/ (function(modules) { // webpackBootstrap var evt = document.createEvent('MouseEvents'); evt.initEvent('click', true, false); this._els[this.options.initMenu].dispatchEvent(evt); - if (this.icon) { - this.icon.registDefaultIcon(); - } + } + + if (this.icon) { + this.icon.registDefaultIcon(); } } @@ -5668,7 +5669,7 @@ return /******/ (function(modules) { // webpackBootstrap loadButtonStyle = _ref.loadButtonStyle, downloadButtonStyle = _ref.downloadButtonStyle, submenuStyle = _ref.submenuStyle; - return '\n
\n
\n \n
\n \n \n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n'; + return '\n
\n
\n \n
\n
\n ' + locale.localize('Load') + '\n \n
\n \n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n'; }; /***/ }), @@ -5690,7 +5691,7 @@ return /******/ (function(modules) { // webpackBootstrap disabled = _ref$iconStyle.disabled, loadButtonStyle = _ref.loadButtonStyle, downloadButtonStyle = _ref.downloadButtonStyle; - return '\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
\n
\n'; + return '\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 ' + locale.localize('Load') + '\n \n
\n \n
\n
\n'; }; /***/ }), @@ -5929,7 +5930,7 @@ return /******/ (function(modules) { // webpackBootstrap submenuIconSize = _ref.submenuIconSize, menuIconSize = _ref.menuIconSize, biSize = _ref.biSize; - return "\n #tie-icon-add-button.icon-bubble .tui-image-editor-button[data-icontype=\"icon-bubble\"] label,\n #tie-icon-add-button.icon-heart .tui-image-editor-button[data-icontype=\"icon-heart\"] label,\n #tie-icon-add-button.icon-location .tui-image-editor-button[data-icontype=\"icon-location\"] label,\n #tie-icon-add-button.icon-polygon .tui-image-editor-button[data-icontype=\"icon-polygon\"] label,\n #tie-icon-add-button.icon-star .tui-image-editor-button[data-icontype=\"icon-star\"] label,\n #tie-icon-add-button.icon-arrow-3 .tui-image-editor-button[data-icontype=\"icon-arrow-3\"] label,\n #tie-icon-add-button.icon-arrow-2 .tui-image-editor-button[data-icontype=\"icon-arrow-2\"] label,\n #tie-icon-add-button.icon-arrow .tui-image-editor-button[data-icontype=\"icon-arrow\"] label,\n #tie-icon-add-button.icon-bubble .tui-image-editor-button[data-icontype=\"icon-bubble\"] label,\n #tie-draw-line-select-button.line .tui-image-editor-button.line label,\n #tie-draw-line-select-button.free .tui-image-editor-button.free label,\n #tie-flip-button.flipX .tui-image-editor-button.flipX label,\n #tie-flip-button.flipY .tui-image-editor-button.flipY label,\n #tie-flip-button.resetFlip .tui-image-editor-button.resetFlip label,\n #tie-crop-button .tui-image-editor-button.apply.active label,\n #tie-crop-preset-button .tui-image-editor-button.preset.active label,\n #tie-shape-button.rect .tui-image-editor-button.rect label,\n #tie-shape-button.circle .tui-image-editor-button.circle label,\n #tie-shape-button.triangle .tui-image-editor-button.triangle label,\n #tie-text-effect-button .tui-image-editor-button.active label,\n #tie-text-align-button.left .tui-image-editor-button.left label,\n #tie-text-align-button.center .tui-image-editor-button.center label,\n #tie-text-align-button.right .tui-image-editor-button.right label,\n #tie-mask-apply.apply.active .tui-image-editor-button.apply label,\n .tui-image-editor-container .tui-image-editor-submenu .tui-image-editor-button:hover > label,\n .tui-image-editor-container .tui-image-editor-checkbox input + label {\n " + subMenuLabelActive + "\n }\n .tui-image-editor-container .tui-image-editor-submenu .tui-image-editor-button > label,\n .tui-image-editor-container .tui-image-editor-range-wrap.tui-image-editor-newline.short label {\n " + subMenuLabelNormal + "\n }\n .tui-image-editor-container .tui-image-editor-range-wrap label {\n " + subMenuRangeTitle + "\n }\n .tui-image-editor-container .tui-image-editor-partition > div {\n " + submenuPartitionVertical + "\n }\n .tui-image-editor-container.left .tui-image-editor-submenu .tui-image-editor-partition > div,\n .tui-image-editor-container.right .tui-image-editor-submenu .tui-image-editor-partition > div {\n " + submenuPartitionHorizontal + "\n }\n .tui-image-editor-container .tui-image-editor-checkbox input + label:before {\n " + submenuCheckbox + "\n }\n .tui-image-editor-container .tui-image-editor-checkbox input:checked + label:before {\n border: 0;\n }\n .tui-image-editor-container .tui-image-editor-virtual-range-pointer {\n " + submenuRangePointer + "\n }\n .tui-image-editor-container .tui-image-editor-virtual-range-bar {\n " + submenuRangeBar + "\n }\n .tui-image-editor-container .tui-image-editor-virtual-range-subbar {\n " + submenuRangeSubbar + "\n }\n .tui-image-editor-container .tui-image-editor-disabled .tui-image-editor-virtual-range-pointer {\n " + submenuDisabledRangePointer + "\n }\n .tui-image-editor-container .tui-image-editor-disabled .tui-image-editor-virtual-range-subbar {\n " + submenuDisabledRangeSubbar + "\n }\n .tui-image-editor-container .tui-image-editor-disabled .tui-image-editor-virtual-range-bar {\n " + submenuDisabledRangeBar + "\n }\n .tui-image-editor-container .tui-image-editor-range-value {\n " + submenuRangeValue + "\n }\n .tui-image-editor-container .tui-image-editor-submenu .tui-image-editor-button .color-picker-value + label {\n " + submenuColorpickerTitle + "\n }\n .tui-image-editor-container .tui-image-editor-submenu .tui-image-editor-button .color-picker-value {\n " + submenuColorpickerButton + "\n }\n .tui-image-editor-container .svg_ic-menu {\n " + menuIconSize + "\n }\n .tui-image-editor-container .svg_ic-submenu {\n " + submenuIconSize + "\n }\n .tui-image-editor-container .tui-image-editor-controls-logo > img,\n .tui-image-editor-container .tui-image-editor-header-logo > img {\n " + biSize + "\n }\n\n"; + return "\n #tie-icon-add-button.icon-bubble .tui-image-editor-button[data-icontype=\"icon-bubble\"] label,\n #tie-icon-add-button.icon-heart .tui-image-editor-button[data-icontype=\"icon-heart\"] label,\n #tie-icon-add-button.icon-location .tui-image-editor-button[data-icontype=\"icon-location\"] label,\n #tie-icon-add-button.icon-polygon .tui-image-editor-button[data-icontype=\"icon-polygon\"] label,\n #tie-icon-add-button.icon-star .tui-image-editor-button[data-icontype=\"icon-star\"] label,\n #tie-icon-add-button.icon-star-2 .tui-image-editor-button[data-icontype=\"icon-star-2\"] label,\n #tie-icon-add-button.icon-arrow-3 .tui-image-editor-button[data-icontype=\"icon-arrow-3\"] label,\n #tie-icon-add-button.icon-arrow-2 .tui-image-editor-button[data-icontype=\"icon-arrow-2\"] label,\n #tie-icon-add-button.icon-arrow .tui-image-editor-button[data-icontype=\"icon-arrow\"] label,\n #tie-icon-add-button.icon-bubble .tui-image-editor-button[data-icontype=\"icon-bubble\"] label,\n #tie-draw-line-select-button.line .tui-image-editor-button.line label,\n #tie-draw-line-select-button.free .tui-image-editor-button.free label,\n #tie-flip-button.flipX .tui-image-editor-button.flipX label,\n #tie-flip-button.flipY .tui-image-editor-button.flipY label,\n #tie-flip-button.resetFlip .tui-image-editor-button.resetFlip label,\n #tie-crop-button .tui-image-editor-button.apply.active label,\n #tie-crop-preset-button .tui-image-editor-button.preset.active label,\n #tie-shape-button.rect .tui-image-editor-button.rect label,\n #tie-shape-button.circle .tui-image-editor-button.circle label,\n #tie-shape-button.triangle .tui-image-editor-button.triangle label,\n #tie-text-effect-button .tui-image-editor-button.active label,\n #tie-text-align-button.left .tui-image-editor-button.left label,\n #tie-text-align-button.center .tui-image-editor-button.center label,\n #tie-text-align-button.right .tui-image-editor-button.right label,\n #tie-mask-apply.apply.active .tui-image-editor-button.apply label,\n .tui-image-editor-container .tui-image-editor-submenu .tui-image-editor-button:hover > label,\n .tui-image-editor-container .tui-image-editor-checkbox input + label {\n " + subMenuLabelActive + "\n }\n .tui-image-editor-container .tui-image-editor-submenu .tui-image-editor-button > label,\n .tui-image-editor-container .tui-image-editor-range-wrap.tui-image-editor-newline.short label {\n " + subMenuLabelNormal + "\n }\n .tui-image-editor-container .tui-image-editor-range-wrap label {\n " + subMenuRangeTitle + "\n }\n .tui-image-editor-container .tui-image-editor-partition > div {\n " + submenuPartitionVertical + "\n }\n .tui-image-editor-container.left .tui-image-editor-submenu .tui-image-editor-partition > div,\n .tui-image-editor-container.right .tui-image-editor-submenu .tui-image-editor-partition > div {\n " + submenuPartitionHorizontal + "\n }\n .tui-image-editor-container .tui-image-editor-checkbox input + label:before {\n " + submenuCheckbox + "\n }\n .tui-image-editor-container .tui-image-editor-checkbox input:checked + label:before {\n border: 0;\n }\n .tui-image-editor-container .tui-image-editor-virtual-range-pointer {\n " + submenuRangePointer + "\n }\n .tui-image-editor-container .tui-image-editor-virtual-range-bar {\n " + submenuRangeBar + "\n }\n .tui-image-editor-container .tui-image-editor-virtual-range-subbar {\n " + submenuRangeSubbar + "\n }\n .tui-image-editor-container .tui-image-editor-disabled .tui-image-editor-virtual-range-pointer {\n " + submenuDisabledRangePointer + "\n }\n .tui-image-editor-container .tui-image-editor-disabled .tui-image-editor-virtual-range-subbar {\n " + submenuDisabledRangeSubbar + "\n }\n .tui-image-editor-container .tui-image-editor-disabled .tui-image-editor-virtual-range-bar {\n " + submenuDisabledRangeBar + "\n }\n .tui-image-editor-container .tui-image-editor-range-value {\n " + submenuRangeValue + "\n }\n .tui-image-editor-container .tui-image-editor-submenu .tui-image-editor-button .color-picker-value + label {\n " + submenuColorpickerTitle + "\n }\n .tui-image-editor-container .tui-image-editor-submenu .tui-image-editor-button .color-picker-value {\n " + submenuColorpickerButton + "\n }\n .tui-image-editor-container .svg_ic-menu {\n " + menuIconSize + "\n }\n .tui-image-editor-container .svg_ic-submenu {\n " + submenuIconSize + "\n }\n .tui-image-editor-container .tui-image-editor-controls-logo > img,\n .tui-image-editor-container .tui-image-editor-header-logo > img {\n " + biSize + "\n }\n\n"; }; /***/ }), @@ -6591,16 +6592,62 @@ return /******/ (function(modules) { // webpackBootstrap _this.fire('change', value.color); }); colorpickerElement.addEventListener('click', function (event) { - _this._show = !_this._show; - _this.pickerControl.style.display = _this._show ? 'block' : 'none'; - _this._setPickerControlPosition(); - _this.fire('changeShow', _this); + var target = event.target; + + var isInPickerControl = target && _this._isElementInColorPickerControl(target); + + if (!isInPickerControl || isInPickerControl && _this._isPaletteButton(target)) { + _this._show = !_this._show; + _this.pickerControl.style.display = _this._show ? 'block' : 'none'; + _this._setPickerControlPosition(); + _this.fire('changeShow', _this); + } event.stopPropagation(); }); document.body.addEventListener('click', function () { _this.hide(); }); } + + /** + * Check hex input or not + * @param {Element} target - Event target element + * @returns {boolean} + * @private + */ + + }, { + key: '_isPaletteButton', + value: function _isPaletteButton(target) { + return target.className === 'tui-colorpicker-palette-button'; + } + + /** + * Check given element is in pickerControl element + * @param {Element} element - element to check + * @returns {boolean} + * @private + */ + + }, { + key: '_isElementInColorPickerControl', + value: function _isElementInColorPickerControl(element) { + var parentNode = element; + + while (parentNode !== document.body) { + if (!parentNode) { + break; + } + + if (parentNode === this.pickerControl) { + return true; + } + + parentNode = parentNode.parentNode; + } + + return false; + } }, { key: 'hide', value: function hide() { @@ -12023,7 +12070,7 @@ return /******/ (function(modules) { // webpackBootstrap */ exports.default = function (_ref) { var locale = _ref.locale; - return '\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 \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
    \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 '\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 \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
    \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'; }; /***/ }), @@ -13933,7 +13980,7 @@ return /******/ (function(modules) { // webpackBootstrap /** * Graphics class * @class - * @param {string|jQuery|HTMLElement} wrapper - Wrapper's element or selector + * @param {string|HTMLElement} wrapper - Wrapper's element or selector * @param {Object} [option] - Canvas max width & height of css * @param {number} option.cssMaxWidth - Canvas css-max-width * @param {number} option.cssMaxHeight - Canvas css-max-height @@ -14820,7 +14867,7 @@ return /******/ (function(modules) { // webpackBootstrap /** * Set canvas element to fabric.Canvas - * @param {jQuery|Element|string} element - Wrapper or canvas element or selector + * @param {Element|string} element - Wrapper or canvas element or selector * @private */ @@ -14830,9 +14877,7 @@ return /******/ (function(modules) { // webpackBootstrap var selectedElement = void 0; var canvasElement = void 0; - if (element.jquery) { - selectedElement = element[0]; - } else if (element.nodeType) { + if (element.nodeType) { selectedElement = element; } else { selectedElement = document.querySelector(element); @@ -15282,7 +15327,7 @@ return /******/ (function(modules) { // webpackBootstrap * Load image from url * @param {?string} imageName - File name * @param {?(fabric.Image|string)} img - fabric.Image instance or URL of an image - * @returns {jQuery.Deferred} deferred + * @returns {Promise} */ @@ -15319,7 +15364,7 @@ return /******/ (function(modules) { // webpackBootstrap /** * Set background image * @param {?(fabric.Image|String)} img fabric.Image instance or URL of an image to set background to - * @returns {$.Deferred} deferred + * @returns {Promise} * @private */ @@ -15338,7 +15383,7 @@ return /******/ (function(modules) { // webpackBootstrap canvas.setBackgroundImage(img, function () { var oImage = canvas.backgroundImage; - if (oImage.getElement()) { + if (oImage && oImage.getElement()) { resolve(oImage); } else { reject(rejectMessages.loadingImageFailed); @@ -15394,7 +15439,6 @@ return /******/ (function(modules) { // webpackBootstrap /** * Fire Graphics event - * @param {Array} args - arguments * @returns {Object} return value */ @@ -16539,7 +16583,7 @@ return /******/ (function(modules) { // webpackBootstrap /** * Set flipX, flipY * @param {{flipX: Boolean, flipY: Boolean}} newSetting - Flip setting - * @returns {jQuery.Deferred} + * @returns {Promise} */ }, { @@ -16622,7 +16666,7 @@ return /******/ (function(modules) { // webpackBootstrap /** * Reset flip settings - * @returns {jQuery.Deferred} + * @returns {Promise} */ }, { @@ -16636,7 +16680,7 @@ return /******/ (function(modules) { // webpackBootstrap /** * Flip x - * @returns {jQuery.Deferred} + * @returns {Promise} */ }, { @@ -16652,7 +16696,7 @@ return /******/ (function(modules) { // webpackBootstrap /** * Flip y - * @returns {jQuery.Deferred} + * @returns {Promise} */ }, { @@ -16747,7 +16791,7 @@ return /******/ (function(modules) { // webpackBootstrap * See "http://fabricjs.com/docs/fabric.Object.html#setAngle" * * @param {number} angle - Angle value - * @returns {jQuery.Deferred} + * @returns {Promise} */ }, { @@ -16802,7 +16846,7 @@ return /******/ (function(modules) { // webpackBootstrap /** * Rotate the image * @param {number} additionalAngle - Additional angle - * @returns {jQuery.Deferred} + * @returns {Promise} */ }, { @@ -18889,6 +18933,9 @@ return /******/ (function(modules) { // webpackBootstrap var KEY_CODES = _consts2.default.keyCodes; var DEFAULT_TYPE = 'rect'; + var DEFAULT_WIDTH = 20; + var DEFAULT_HEIGHT = 20; + var DEFAULT_OPTIONS = { strokeWidth: 1, stroke: '#000000', @@ -19074,13 +19121,16 @@ return /******/ (function(modules) { // webpackBootstrap return new _promise2.default(function (resolve) { var canvas = _this2.getCanvas(); - options = _this2._createOptions(options); + options = _this2._extendOptions(options); var shapeObj = _this2._createInstance(type, options); _this2._bindEventOnShape(shapeObj); canvas.add(shapeObj).setActiveObject(shapeObj); - resolve(_this2.graphics.createObjectProperties(shapeObj)); + + var objectProperties = _this2.graphics.createObjectProperties(shapeObj); + + resolve(objectProperties); }); } @@ -19156,8 +19206,8 @@ return /******/ (function(modules) { // webpackBootstrap */ }, { - key: '_createOptions', - value: function _createOptions(options) { + key: '_extendOptions', + value: function _extendOptions(options) { var selectionStyles = _consts2.default.fObjectOptions.SELECTION_STYLE; options = (0, _tuiCodeSnippet.extend)({}, DEFAULT_OPTIONS, this._options, selectionStyles, options); @@ -19285,15 +19335,27 @@ return /******/ (function(modules) { // webpackBootstrap }, { key: '_onFabricMouseUp', value: function _onFabricMouseUp() { + var _this5 = this; + var canvas = this.getCanvas(); + var startPointX = this._startPoint.x; + var startPointY = this._startPoint.y; var shape = this._shapeObj; - if (shape) { + if (!shape) { + this.add(this._type, { + left: startPointX, + top: startPointY, + width: DEFAULT_WIDTH, + height: DEFAULT_HEIGHT + }).then(function (objectProps) { + _this5.fire(eventNames.ADD_OBJECT, objectProps); + }); + } else if (shape) { _shapeResizeHelper2.default.adjustOriginToCenter(shape); + this.fire(eventNames.ADD_OBJECT_AFTER, this.graphics.createObjectProperties(shape)); } - this.fire(eventNames.ADD_OBJECT_AFTER, this.graphics.createObjectProperties(shape)); - canvas.off({ 'mouse:move': this._handlers.mousemove, 'mouse:up': this._handlers.mouseup diff --git a/dist/tui-image-editor.min.css b/dist/tui-image-editor.min.css index a3ccffce8..ad704fecc 100644 --- a/dist/tui-image-editor.min.css +++ b/dist/tui-image-editor.min.css @@ -1,7 +1,7 @@ /*! * tui-image-editor.min.js - * @version 3.4.0 + * @version 3.5.0 * @author NHNEnt FE Development Lab * @license MIT */ -body>textarea{position:fixed!important}.tui-image-editor-container{marign:0;padding:0;box-sizing:border-box;min-height:300px;height:100%;position:relative;background-color:#282828;overflow:hidden;letter-spacing:.3px}.tui-image-editor-container div,.tui-image-editor-container input,.tui-image-editor-container label,.tui-image-editor-container li,.tui-image-editor-container ul{box-sizing:border-box;margin:0;padding:0;-ms-user-select:none;-moz-user-select:-moz-none;-khtml-user-select:none;-webkit-user-select:none;user-select:none}.tui-image-editor-container .tui-image-editor-header{min-width:533px;position:absolute;background-color:#151515;top:0;width:100%}.tui-image-editor-container .tui-image-editor-controls-buttons,.tui-image-editor-container .tui-image-editor-header-buttons{float:right;margin:8px}.tui-image-editor-container .tui-image-editor-controls-logo,.tui-image-editor-container .tui-image-editor-header-logo{float:left;width:30%;padding:17px}.tui-image-editor-container .tui-image-editor-controls-buttons,.tui-image-editor-container .tui-image-editor-controls-logo{width:270px;height:100%;display:none}.tui-image-editor-container .tui-image-editor-controls-buttons button,.tui-image-editor-container .tui-image-editor-header-buttons button{position:relative;width:120px;height:40px;padding:0;line-height:40px;outline:none;border-radius:20px;border:1px solid #ddd;font-family:Noto Sans,sans-serif;font-size:12px;font-weight:700;cursor:pointer;vertical-align:middle;letter-spacing:.3px}.tui-image-editor-container .tui-image-editor-download-btn{background-color:#fdba3b;border-color:#fdba3b;color:#fff}.tui-image-editor-container .tui-image-editor-load-btn{position:absolute;left:0;right:0;display:inline-block;top:0;bottom:0;width:100%;cursor:pointer;opacity:0}.tui-image-editor-container .tui-image-editor-main-container{position:absolute;width:100%;top:0;bottom:64px}.tui-image-editor-container .tui-image-editor-main{position:absolute;text-align:center;top:64px;bottom:0;right:0;left:0}.tui-image-editor-container .tui-image-editor-wrap{bottom:0;width:100%;overflow:auto}.tui-image-editor-container .tui-image-editor-wrap .tui-image-editor-size-wrap{display:table;width:100%;height:100%}.tui-image-editor-container .tui-image-editor-wrap .tui-image-editor-size-wrap .tui-image-editor-align-wrap{display:table-cell;vertical-align:middle}.tui-image-editor-container .tui-image-editor{position:relative;display:inline-block}.tui-image-editor-container .tui-image-editor-menu{width:auto;list-style:none;padding:0;margin:0 auto;display:table-cell;text-align:center;vertical-align:middle;white-space:nowrap}.tui-image-editor-container .tui-image-editor-menu>.tui-image-editor-item{position:relative;display:inline-block;border-radius:2px;padding:7px 8px 3px;cursor:pointer;margin:0 4px}.tui-image-editor-container .tui-image-editor-menu>.tui-image-editor-item[title]:hover:before{content:"";display:inline-block;margin:0 auto;width:0;height:0;border-right:7px solid transparent;border-top:7px solid #2f2f2f;border-left:7px solid transparent;position:absolute;left:13px;top:-2px}.tui-image-editor-container .tui-image-editor-menu>.tui-image-editor-item[title]:hover:after{content:attr(title);position:absolute;display:inline-block;background-color:#2f2f2f;color:#fff;padding:5px 8px;font-size:11px;font-weight:lighter;border-radius:3px;max-height:23px;top:-22px;left:0;min-width:24px}.tui-image-editor-container .tui-image-editor-menu>.tui-image-editor-item.active{background-color:#fff;transition:all .3s ease}.tui-image-editor-container .tui-image-editor-wrap{position:absolute}.tui-image-editor-container .tui-image-editor-grid-visual{display:none;position:absolute;width:100%;height:100%;border:1px solid hsla(0,0%,100%,.7)}.tui-image-editor-container .tui-image-editor-main.tui-image-editor-menu-flip .tui-image-editor,.tui-image-editor-container .tui-image-editor-main.tui-image-editor-menu-rotate .tui-image-editor{transition:none}.tui-image-editor-container .tui-image-editor-main.tui-image-editor-menu-flip .tui-image-editor-grid-visual,.tui-image-editor-container .tui-image-editor-main.tui-image-editor-menu-rotate .tui-image-editor-grid-visual{display:block}.tui-image-editor-container .tui-image-editor-grid-visual table{width:100%;height:100%;border-collapse:collapse}.tui-image-editor-container .tui-image-editor-grid-visual table td{border:1px solid hsla(0,0%,100%,.3)}.tui-image-editor-container .tui-image-editor-grid-visual table td.dot:before{content:"";position:absolute;box-sizing:border-box;width:10px;height:10px;border:0;box-shadow:0 0 1px 0 rgba(0,0,0,.3);border-radius:100%;background-color:#fff}.tui-image-editor-container .tui-image-editor-grid-visual table td.dot.left-top:before{top:-5px;left:-5px}.tui-image-editor-container .tui-image-editor-grid-visual table td.dot.right-top:before{top:-5px;right:-5px}.tui-image-editor-container .tui-image-editor-grid-visual table td.dot.left-bottom:before{bottom:-5px;left:-5px}.tui-image-editor-container .tui-image-editor-grid-visual table td.dot.right-bottom:before{bottom:-5px;right:-5px}.tui-image-editor-container .tui-image-editor-submenu{display:none;position:absolute;bottom:0;width:100%;height:150px;white-space:nowrap;z-index:2}.tui-image-editor-container .tui-image-editor-submenu .tui-image-editor-button:hover svg>use.active{display:block}.tui-image-editor-container .tui-image-editor-submenu .tui-image-editor-submenu-item li{display:inline-block;vertical-align:top}.tui-image-editor-container .tui-image-editor-submenu .tui-image-editor-submenu-item .tui-image-editor-newline{display:block;margin-top:0}.tui-image-editor-container .tui-image-editor-submenu .tui-image-editor-submenu-item .tui-image-editor-button{position:relative;cursor:pointer;display:inline-block;font-weight:400;font-size:11px;margin:0 9px}.tui-image-editor-container .tui-image-editor-submenu .tui-image-editor-submenu-item .tui-image-editor-button.preset{margin:0 9px 20px 5px}.tui-image-editor-container .tui-image-editor-submenu .tui-image-editor-submenu-item label{display:inline-block;cursor:pointer;padding-top:5px;font-family:Noto Sans,sans-serif;font-size:11px}.tui-image-editor-container .tui-image-editor-submenu .tui-image-editor-submenu-item .tui-image-editor-button.apply label,.tui-image-editor-container .tui-image-editor-submenu .tui-image-editor-submenu-item .tui-image-editor-button.cancel label{vertical-align:7px}.tui-image-editor-container .tui-image-editor-submenu>div{display:none;vertical-align:bottom}.tui-image-editor-container .tui-image-editor-submenu .tui-image-editor-submenu-style{opacity:.95;z-index:-1;position:absolute;top:0;bottom:0;left:0;right:0;display:block}.tui-image-editor-container .tui-image-editor-partition>div{width:1px;height:52px;border-left:1px solid #3c3c3c;margin:0 8px}.tui-image-editor-container .tui-image-editor-main.tui-image-editor-menu-filter .tui-image-editor-partition>div{height:108px;margin:0 29px 0 0}.tui-image-editor-container .tui-image-editor-submenu-align{text-align:left;margin-right:30px}.tui-image-editor-container .tui-image-editor-submenu-align label{width:55px;white-space:nowrap}.tui-image-editor-container .tui-image-editor-submenu-align:first-child{margin-right:0}.tui-image-editor-container .tui-image-editor-submenu-align:first-child label{width:70px}.tui-image-editor-container .tui-image-editor-main.tui-image-editor-menu-crop .tui-image-editor-submenu>div.tui-image-editor-menu-crop,.tui-image-editor-container .tui-image-editor-main.tui-image-editor-menu-draw .tui-image-editor-submenu>div.tui-image-editor-menu-draw,.tui-image-editor-container .tui-image-editor-main.tui-image-editor-menu-filter .tui-image-editor-submenu>div.tui-image-editor-menu-filter,.tui-image-editor-container .tui-image-editor-main.tui-image-editor-menu-flip .tui-image-editor-submenu>div.tui-image-editor-menu-flip,.tui-image-editor-container .tui-image-editor-main.tui-image-editor-menu-icon .tui-image-editor-submenu>div.tui-image-editor-menu-icon,.tui-image-editor-container .tui-image-editor-main.tui-image-editor-menu-mask .tui-image-editor-submenu>div.tui-image-editor-menu-mask,.tui-image-editor-container .tui-image-editor-main.tui-image-editor-menu-rotate .tui-image-editor-submenu>div.tui-image-editor-menu-rotate,.tui-image-editor-container .tui-image-editor-main.tui-image-editor-menu-shape .tui-image-editor-submenu>div.tui-image-editor-menu-shape,.tui-image-editor-container .tui-image-editor-main.tui-image-editor-menu-text .tui-image-editor-submenu>div.tui-image-editor-menu-text{display:table-cell}.tui-image-editor-container .tui-image-editor-main.tui-image-editor-menu-crop .tui-image-editor-submenu,.tui-image-editor-container .tui-image-editor-main.tui-image-editor-menu-draw .tui-image-editor-submenu,.tui-image-editor-container .tui-image-editor-main.tui-image-editor-menu-filter .tui-image-editor-submenu,.tui-image-editor-container .tui-image-editor-main.tui-image-editor-menu-flip .tui-image-editor-submenu,.tui-image-editor-container .tui-image-editor-main.tui-image-editor-menu-icon .tui-image-editor-submenu,.tui-image-editor-container .tui-image-editor-main.tui-image-editor-menu-mask .tui-image-editor-submenu,.tui-image-editor-container .tui-image-editor-main.tui-image-editor-menu-rotate .tui-image-editor-submenu,.tui-image-editor-container .tui-image-editor-main.tui-image-editor-menu-shape .tui-image-editor-submenu,.tui-image-editor-container .tui-image-editor-main.tui-image-editor-menu-text .tui-image-editor-submenu{display:table}.tui-image-editor-container .filter-color-item{display:inline-block}.tui-image-editor-container .filter-color-item .tui-image-editor-checkbox{display:block}.tui-image-editor-container .tui-image-editor-checkbox-wrap{display:inline-block!important;text-align:left}.tui-image-editor-container .tui-image-editor-checkbox-wrap.fixed-width{width:187px;white-space:normal}.tui-image-editor-container .tui-image-editor-checkbox{display:inline-block;margin:1px 0}.tui-image-editor-container .tui-image-editor-checkbox input{width:14px;height:14px;opacity:0}.tui-image-editor-container .tui-image-editor-checkbox input+label{color:#fff;height:14px;position:relative}.tui-image-editor-container .tui-image-editor-checkbox input+label:before{content:"";position:absolute;width:14px;height:14px;background-color:#fff;top:6px;left:-19px;display:inline-block;margin:0;text-align:center;font-size:11px;border:0;border-radius:2px;padding-top:1px;box-sizing:border-box}.tui-image-editor-container .tui-image-editor-checkbox input[type=checkbox]:checked+label:before{background-size:cover;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAAfSC3RAAAAAXNSR0IArs4c6QAAAMBJREFUKBWVkjEOwjAMRe2WgZW7IIHEDdhghhuwcQ42rlJugAQS54Cxa5cq1QM5TUpByZfS2j9+dlJVt/tX5ZxbS4ZU9VLkQvSHKTIGRaVJYFmKrBbTCJxE2UgCdDzMZDkHrOV6b95V0US6UmgKodujEZbJg0B0ZgEModO5lrY1TMQf1TpyJGBEjD+E2NPN7ukIUDiF/BfEXgRiGEw8NgkffYGYwCi808fpn/6OvfUfsDr/Vc1IfRf8sKnFVqeiVQfDu0tf/nWH9gAAAABJRU5ErkJggg==")}.tui-image-editor-container .tui-image-editor-selectlist-wrap{position:relative}.tui-image-editor-container .tui-image-editor-selectlist-wrap select{width:100%;height:28px;margin-top:4px;border:0;outline:0;border-radius:0;border:1px solid #cbdbdb;background-color:#fff;-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0 7px 0 10px}.tui-image-editor-container .tui-image-editor-selectlist-wrap .tui-image-editor-selectlist{display:none;position:relative;top:-1px;border:1px solid #ccc;background-color:#fff;border-top:0;padding:4px 0}.tui-image-editor-container .tui-image-editor-selectlist-wrap .tui-image-editor-selectlist li{display:block;text-align:left;padding:7px 10px;font-family:Noto Sans,sans-serif}.tui-image-editor-container .tui-image-editor-selectlist-wrap .tui-image-editor-selectlist li:hover{background-color:rgba(81,92,230,.05)}.tui-image-editor-container .tui-image-editor-selectlist-wrap:before{content:"";position:absolute;display:inline-block;width:14px;height:14px;right:5px;top:10px;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAAfSC3RAAAAAXNSR0IArs4c6QAAAHlJREFUKBVjYBgFOEOAEVkmPDxc89+/f6eAYjzI4kD2FyYmJrOVK1deh4kzwRggGiQBVJCELAZig8SQNYHEmEEEMrh69eo1HR0dfqCYJUickZGxf9WqVf3IakBsFBthklpaWmVA9mEQhrJhUoTp0NBQCRAmrHL4qgAAuu4cWZOZIGsAAAAASUVORK5CYII=");background-size:cover}.tui-image-editor-container .tui-image-editor-selectlist-wrap select::-ms-expand{display:none}.tui-image-editor-container .tui-image-editor-virtual-range-bar .tui-image-editor-disabled,.tui-image-editor-container .tui-image-editor-virtual-range-pointer .tui-image-editor-disabled,.tui-image-editor-container .tui-image-editor-virtual-range-subbar .tui-image-editor-disabled{backbround-color:red}.tui-image-editor-container .tui-image-editor-range{position:relative;top:5px;width:166px;height:17px;display:inline-block}.tui-image-editor-container .tui-image-editor-virtual-range-bar{top:7px;position:absolute;width:100%;height:2px;background-color:#666}.tui-image-editor-container .tui-image-editor-virtual-range-subbar{position:absolute;height:100%;left:0;right:0;background-color:#d1d1d1}.tui-image-editor-container .tui-image-editor-virtual-range-pointer{position:absolute;cursor:pointer;top:-5px;left:0;width:12px;height:12px;background-color:#fff;border-radius:100%}.tui-image-editor-container .tui-image-editor-range-wrap{display:inline-block;margin-left:4px}.tui-image-editor-container .tui-image-editor-range-wrap.short .tui-image-editor-range{width:100px}.tui-image-editor-container .color-picker-control .tui-image-editor-range{width:108px;margin-left:10px}.tui-image-editor-container .color-picker-control .tui-image-editor-virtual-range-pointer{background-color:#333}.tui-image-editor-container .color-picker-control .tui-image-editor-virtual-range-bar{background-color:#ccc}.tui-image-editor-container .color-picker-control .tui-image-editor-virtual-range-subbar{background-color:#606060}.tui-image-editor-container .tui-image-editor-range-wrap.tui-image-editor-newline.short{margin-top:-2px;margin-left:19px}.tui-image-editor-container .tui-image-editor-range-wrap.tui-image-editor-newline.short label{color:#8e8e8e;font-weight:400}.tui-image-editor-container .tui-image-editor-range-wrap label{vertical-align:baseline;font-size:11px;margin-right:7px;color:#fff}.tui-image-editor-container .tui-image-editor-range-value{cursor:default;width:40px;height:24px;outline:none;border-radius:2px;box-shadow:none;border:1px solid #d5d5d5;text-align:center;background-color:#1c1c1c;color:#fff;font-weight:lighter;vertical-align:baseline;font-family:Noto Sans,sans-serif;margin-top:21px;margin-left:4px}.tui-image-editor-container .tui-image-editor-controls{position:absolute;background-color:#151515;width:100%;height:64px;display:table;bottom:0;z-index:2}.tui-image-editor-container .tui-image-editor-icpartition{display:inline-block;background-color:#282828;width:1px;height:24px}.tui-image-editor-container.left .tui-image-editor-menu>.tui-image-editor-item[title]:before{left:28px;top:11px;border-right:7px solid #2f2f2f;border-top:7px solid transparent;border-bottom:7px solid transparent}.tui-image-editor-container.left .tui-image-editor-menu>.tui-image-editor-item[title]:after{top:7px;left:39px;white-space:nowrap}.tui-image-editor-container.left .tui-image-editor-submenu{left:0;height:100%;width:248px}.tui-image-editor-container.left .tui-image-editor-main-container{left:64px;width:calc(100% - 64px);height:100%}.tui-image-editor-container.left .tui-image-editor-controls{width:64px;height:100%;display:table}.tui-image-editor-container.left .tui-image-editor-menu,.tui-image-editor-container.right .tui-image-editor-menu{white-space:inherit}.tui-image-editor-container.left .tui-image-editor-submenu,.tui-image-editor-container.right .tui-image-editor-submenu{white-space:normal}.tui-image-editor-container.left .tui-image-editor-submenu>div,.tui-image-editor-container.right .tui-image-editor-submenu>div{vertical-align:middle}.tui-image-editor-container.left .tui-image-editor-controls li,.tui-image-editor-container.right .tui-image-editor-controls li{display:inline-block;margin:4px auto}.tui-image-editor-container.left .tui-image-editor-icpartition,.tui-image-editor-container.right .tui-image-editor-icpartition{position:relative;top:-7px;width:24px;height:1px}.tui-image-editor-container.left .tui-image-editor-submenu .tui-image-editor-partition,.tui-image-editor-container.right .tui-image-editor-submenu .tui-image-editor-partition{display:block;width:75%;margin:auto}.tui-image-editor-container.left .tui-image-editor-submenu .tui-image-editor-partition>div,.tui-image-editor-container.right .tui-image-editor-submenu .tui-image-editor-partition>div{border-left:0;height:10px;border-bottom:1px solid #3c3c3c;width:100%;margin:0}.tui-image-editor-container.left .tui-image-editor-submenu .tui-image-editor-submenu-align,.tui-image-editor-container.right .tui-image-editor-submenu .tui-image-editor-submenu-align{margin-right:0}.tui-image-editor-container.left .tui-image-editor-submenu .tui-image-editor-submenu-item li,.tui-image-editor-container.right .tui-image-editor-submenu .tui-image-editor-submenu-item li{margin-top:15px}.tui-image-editor-container.left .tui-image-editor-submenu .tui-image-editor-submenu-item .tui-colorpicker-clearfix li,.tui-image-editor-container.right .tui-image-editor-submenu .tui-image-editor-submenu-item .tui-colorpicker-clearfix li{margin-top:0}.tui-image-editor-container.left .tui-image-editor-checkbox-wrap.fixed-width,.tui-image-editor-container.right .tui-image-editor-checkbox-wrap.fixed-width{width:182px;white-space:normal}.tui-image-editor-container.left .tui-image-editor-range-wrap.tui-image-editor-newline label.range,.tui-image-editor-container.right .tui-image-editor-range-wrap.tui-image-editor-newline label.range{display:block;text-align:left;width:75%;margin:auto}.tui-image-editor-container.left .tui-image-editor-range,.tui-image-editor-container.right .tui-image-editor-range{width:136px}.tui-image-editor-container.right .tui-image-editor-menu>.tui-image-editor-item[title]:before{left:-3px;top:11px;border-left:7px solid #2f2f2f;border-top:7px solid transparent;border-bottom:7px solid transparent}.tui-image-editor-container.right .tui-image-editor-menu>.tui-image-editor-item[title]:after{top:7px;left:-44px;white-space:nowrap}.tui-image-editor-container.right .tui-image-editor-submenu{right:0;height:100%;width:248px}.tui-image-editor-container.right .tui-image-editor-main-container{right:64px;width:calc(100% - 64px);height:100%}.tui-image-editor-container.right .tui-image-editor-controls{right:0;width:64px;height:100%;display:table}.tui-image-editor-container.bottom .tui-image-editor-submenu .tui-image-editor-partition.only-left-right,.tui-image-editor-container.top .tui-image-editor-submenu .tui-image-editor-partition.only-left-right{display:none}.tui-image-editor-container.bottom .tui-image-editor-submenu>div{padding-bottom:24px}.tui-image-editor-container.top .color-picker-control .triangle{top:-8px;border-right:7px solid transparent;border-top:0;border-left:7px solid transparent;border-bottom:8px solid #fff}.tui-image-editor-container.top .tui-image-editor-size-wrap{height:100%}.tui-image-editor-container.top .tui-image-editor-main-container{bottom:0}.tui-image-editor-container.top .tui-image-editor-menu>.tui-image-editor-item[title]:before{left:13px;border-top:0;border-bottom:7px solid #2f2f2f;top:33px}.tui-image-editor-container.top .tui-image-editor-menu>.tui-image-editor-item[title]:after{top:38px}.tui-image-editor-container.top .tui-image-editor-submenu{top:0;bottom:inherit}.tui-image-editor-container.top .tui-image-editor-submenu>div{padding-top:24px;vertical-align:top}.tui-image-editor-container.top .tui-image-editor-controls-buttons,.tui-image-editor-container.top .tui-image-editor-controls-logo{display:table-cell}.tui-image-editor-container.top .tui-image-editor-main{top:64px;height:calc(100% - 64px)}.tui-image-editor-container.top .tui-image-editor-controls{top:0;bottom:inherit}.tui-image-editor-container #tie-icon-add-button .tui-image-editor-button{min-width:42px}.tui-image-editor-container .svg_ic-menu{width:24px;height:24px}.tui-image-editor-container .svg_ic-submenu{width:32px;height:32px}.tui-image-editor-container .svg_img-bi{width:257px;height:26px}.tui-image-editor-container .tui-image-editor-controls svg>use{display:none}.tui-image-editor-container .tui-image-editor-controls .enabled svg:hover>use.hover,.tui-image-editor-container .tui-image-editor-controls .normal svg:hover>use.hover{display:block}.tui-image-editor-container .tui-image-editor-controls .active svg:hover>use.hover{display:none}.tui-image-editor-container .tui-image-editor-controls .active svg>use.active,.tui-image-editor-container .tui-image-editor-controls .enabled svg>use.enabled,.tui-image-editor-container .tui-image-editor-controls svg>use.normal{display:block}.tui-image-editor-container .tui-image-editor-controls .active svg>use.normal,.tui-image-editor-container .tui-image-editor-controls .enabled svg>use.normal{display:none}.tui-image-editor-container .tui-image-editor-controls:hover{z-index:3}.tui-image-editor-container div.tui-colorpicker-clearfix{width:159px;height:28px;border:1px solid #d5d5d5;border-radius:2px;background-color:#f5f5f5;margin-top:6px;padding:4px 7px}.tui-image-editor-container .tui-colorpicker-palette-hex{width:114px;background-color:#f5f5f5;border:0;font-size:11px;margin-top:2px;font-family:Noto Sans,sans-serif}.tui-image-editor-container .tui-colorpicker-palette-hex[value=""]+.tui-colorpicker-palette-preview,.tui-image-editor-container .tui-colorpicker-palette-hex[value="#ffffff"]+.tui-colorpicker-palette-preview{border:1px solid #ccc}.tui-image-editor-container .tui-colorpicker-palette-hex[value=""]+.tui-colorpicker-palette-preview{background-size:cover;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAdBJREFUWAnFl0FuwjAQRZ0ukiugHqFSOQNdseuKW3ALzkA4BateICvUGyCxrtRFd4WuunH/TzykaYJrnLEYaTJJsP2+x8GZZCbQrLU5mj7Bn+EP8HvnCObd+R7xBV5lWfaNON4AnsA38E94qLEt+0yiFaBzAV/Bv+Cxxr4co7hKCDpw1q9wLeNYYdlAwyn8TYt8Hme3+8D5ozcTaMCZ68PXa2tnM2sbEcOZAJhrrpl2DAcTOGNjZPSfCdzkw6JrfbiMv+osBe4y9WOedhm4jZfhbENWuxS44H9Wz/xw4WzqLOAqh1+zycgAwzEMzr5k5gaHOa9ULBwuuDkFlHI1Kl4PJ66kgIpnoywOTmRFAYcbwYk9UMApWkD8zAV5ihcwHk4Rx7gl0IFTQL0EFc+CTQ9OZHWH3YhlVJiVpTHbrTGLhTHLZVgff6s9lyBsI9KduSS83oj+34rTwJutmBmCnMsvozRwZqB5GTkBw6/jdPDu69iJ6BYk6eCcfbcgcQIK/MByaaiMqm8rHcjol2TnpWDhyAKSGdA3FrxtJUToX0ODqatetfGE+8tyEUOV8GY5dGRwLP/MBS4RHQr4bT7NRAQjlcOTfZxmv2G+c4hI8nn+Ax5PG/zhI393AAAAAElFTkSuQmCC")}.tui-image-editor-container .tui-colorpicker-palette-preview{border-radius:100%;float:left;width:17px;height:17px;border:0}.tui-image-editor-container .color-picker-control{position:absolute;display:none;z-index:99;width:192px;background-color:#fff;box-shadow:0 3px 22px 6px rgba(0,0,0,.15);padding:16px;border-radius:2px}.tui-image-editor-container .color-picker-control .tui-colorpicker-palette-toggle-slider{display:none}.tui-image-editor-container .color-picker-control .tui-colorpicker-palette-button{border:0;border-radius:100%;margin:2px;background-size:cover;font-size:1px}.tui-image-editor-container .color-picker-control .tui-colorpicker-palette-button[title=""],.tui-image-editor-container .color-picker-control .tui-colorpicker-palette-button[title="#ffffff"]{border:1px solid #ccc}.tui-image-editor-container .color-picker-control .triangle{width:0;height:0;border-right:7px solid transparent;border-top:8px solid #fff;border-left:7px solid transparent;position:absolute;bottom:-8px;left:84px}.tui-image-editor-container .color-picker-control .tui-colorpicker-container,.tui-image-editor-container .color-picker-control .tui-colorpicker-palette-container,.tui-image-editor-container .color-picker-control .tui-colorpicker-palette-container ul{width:100%;height:auto}.tui-image-editor-container .filter-color-item .color-picker-control label{font-color:#333;font-weight:400;margin-right:7pxleft}.tui-image-editor-container .filter-color-item .tui-image-editor-checkbox{margin-top:0}.tui-image-editor-container .filter-color-item .tui-image-editor-checkbox input+label:before{left:-16px}.tui-image-editor-container .color-picker{width:100%;height:auto}.tui-image-editor-container .color-picker-value{width:32px;height:32px;border:0;border-radius:100%;margin:auto;margin-bottom:1px}.tui-image-editor-container .color-picker-value.transparent{border:1px solid #cbcbcb;background-size:cover;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAdBJREFUWAnFl0FuwjAQRZ0ukiugHqFSOQNdseuKW3ALzkA4BateICvUGyCxrtRFd4WuunH/TzykaYJrnLEYaTJJsP2+x8GZZCbQrLU5mj7Bn+EP8HvnCObd+R7xBV5lWfaNON4AnsA38E94qLEt+0yiFaBzAV/Bv+Cxxr4co7hKCDpw1q9wLeNYYdlAwyn8TYt8Hme3+8D5ozcTaMCZ68PXa2tnM2sbEcOZAJhrrpl2DAcTOGNjZPSfCdzkw6JrfbiMv+osBe4y9WOedhm4jZfhbENWuxS44H9Wz/xw4WzqLOAqh1+zycgAwzEMzr5k5gaHOa9ULBwuuDkFlHI1Kl4PJ66kgIpnoywOTmRFAYcbwYk9UMApWkD8zAV5ihcwHk4Rx7gl0IFTQL0EFc+CTQ9OZHWH3YhlVJiVpTHbrTGLhTHLZVgff6s9lyBsI9KduSS83oj+34rTwJutmBmCnMsvozRwZqB5GTkBw6/jdPDu69iJ6BYk6eCcfbcgcQIK/MByaaiMqm8rHcjol2TnpWDhyAKSGdA3FrxtJUToX0ODqatetfGE+8tyEUOV8GY5dGRwLP/MBS4RHQr4bT7NRAQjlcOTfZxmv2G+c4hI8nn+Ax5PG/zhI393AAAAAElFTkSuQmCC")}.tui-image-editor-container .color-picker-value+label{color:#fff}.tui-image-editor-container .tui-image-editor-submenu svg>use{display:none}#tie-icon-add-button.icon-arrow-2 .tui-image-editor-button[data-icontype=icon-arrow-2] svg>use.active,#tie-icon-add-button.icon-arrow-3 .tui-image-editor-button[data-icontype=icon-arrow-3] svg>use.active,#tie-icon-add-button.icon-arrow .tui-image-editor-button[data-icontype=icon-arrow] svg>use.active,#tie-icon-add-button.icon-bubble .tui-image-editor-button[data-icontype=icon-bubble] svg>use.active,#tie-icon-add-button.icon-heart .tui-image-editor-button[data-icontype=icon-heart] svg>use.active,#tie-icon-add-button.icon-location .tui-image-editor-button[data-icontype=icon-location] svg>use.active,#tie-icon-add-button.icon-polygon .tui-image-editor-button[data-icontype=icon-polygon] svg>use.active,#tie-icon-add-button.icon-star .tui-image-editor-button[data-icontype=icon-star] svg>use.active,.tui-image-editor-container .tui-image-editor-submenu svg>use.normal{display:block}#tie-draw-line-select-button.free .tui-image-editor-button.free svg>use.normal,#tie-draw-line-select-button.line .tui-image-editor-button.line svg>use.normal{display:none}#tie-draw-line-select-button.free .tui-image-editor-button.free svg>use.active,#tie-draw-line-select-button.line .tui-image-editor-button.line svg>use.active{display:block}#tie-flip-button.flipX .tui-image-editor-button.flipX svg>use.normal,#tie-flip-button.flipY .tui-image-editor-button.flipY svg>use.normal,#tie-flip-button.resetFlip .tui-image-editor-button.resetFlip svg>use.normal{display:none}#tie-flip-button.flipX .tui-image-editor-button.flipX svg>use.active,#tie-flip-button.flipY .tui-image-editor-button.flipY svg>use.active,#tie-flip-button.resetFlip .tui-image-editor-button.resetFlip svg>use.active{display:block}#tie-mask-apply.apply.active .tui-image-editor-button.apply label{color:#fff}#tie-mask-apply.apply.active .tui-image-editor-button.apply svg>use.active{display:block}#tie-crop-button .tui-image-editor-button.apply,#tie-crop-preset-button .tui-image-editor-button.apply{margin-right:24px}#tie-crop-button .tui-image-editor-button.apply.active svg>use.active,#tie-crop-button .tui-image-editor-button.preset.active svg>use.active,#tie-crop-preset-button .tui-image-editor-button.apply.active svg>use.active,#tie-crop-preset-button .tui-image-editor-button.preset.active svg>use.active{display:block}#tie-shape-button.circle .tui-image-editor-button.circle svg>use.normal,#tie-shape-button.rect .tui-image-editor-button.rect svg>use.normal,#tie-shape-button.triangle .tui-image-editor-button.triangle svg>use.normal{display:none}#tie-shape-button.circle .tui-image-editor-button.circle svg>use.active,#tie-shape-button.rect .tui-image-editor-button.rect svg>use.active,#tie-shape-button.triangle .tui-image-editor-button.triangle svg>use.active,#tie-text-align-button.center .tui-image-editor-button.center svg>use.active,#tie-text-align-button.left .tui-image-editor-button.left svg>use.active,#tie-text-align-button.right .tui-image-editor-button.right svg>use.active,#tie-text-effect-button .tui-image-editor-button.active svg>use.active{display:block}#tie-icon-image-file,#tie-mask-image-file{opacity:0;position:absolute;width:100%;height:100%;border:1px solid green;cursor:inherit;left:0;top:0}.tui-image-editor-container.top.tui-image-editor-top-optimization .tui-image-editor-controls ul{text-align:right}.tui-image-editor-container.top.tui-image-editor-top-optimization .tui-image-editor-controls-logo{display:none} \ No newline at end of file +body>textarea{position:fixed!important}.tui-image-editor-container{marign:0;padding:0;box-sizing:border-box;min-height:300px;height:100%;position:relative;background-color:#282828;overflow:hidden;letter-spacing:.3px}.tui-image-editor-container div,.tui-image-editor-container input,.tui-image-editor-container label,.tui-image-editor-container li,.tui-image-editor-container ul{box-sizing:border-box;margin:0;padding:0;-ms-user-select:none;-moz-user-select:-moz-none;-khtml-user-select:none;-webkit-user-select:none;user-select:none}.tui-image-editor-container .tui-image-editor-header{min-width:533px;position:absolute;background-color:#151515;top:0;width:100%}.tui-image-editor-container .tui-image-editor-controls-buttons,.tui-image-editor-container .tui-image-editor-header-buttons{float:right;margin:8px}.tui-image-editor-container .tui-image-editor-controls-logo,.tui-image-editor-container .tui-image-editor-header-logo{float:left;width:30%;padding:17px}.tui-image-editor-container .tui-image-editor-controls-buttons,.tui-image-editor-container .tui-image-editor-controls-logo{width:270px;height:100%;display:none}.tui-image-editor-container .tui-image-editor-controls-buttons button,.tui-image-editor-container .tui-image-editor-header-buttons button,.tui-image-editor-container .tui-image-editor-header-buttons div{display:inline-block;position:relative;width:120px;height:40px;padding:0;line-height:40px;outline:none;border-radius:20px;border:1px solid #ddd;font-family:Noto Sans,sans-serif;font-size:12px;font-weight:700;cursor:pointer;vertical-align:middle;letter-spacing:.3px;text-align:center}.tui-image-editor-container .tui-image-editor-download-btn{background-color:#fdba3b;border-color:#fdba3b;color:#fff}.tui-image-editor-container .tui-image-editor-load-btn{position:absolute;left:0;right:0;display:inline-block;top:0;bottom:0;width:100%;cursor:pointer;opacity:0}.tui-image-editor-container .tui-image-editor-main-container{position:absolute;width:100%;top:0;bottom:64px}.tui-image-editor-container .tui-image-editor-main{position:absolute;text-align:center;top:64px;bottom:0;right:0;left:0}.tui-image-editor-container .tui-image-editor-wrap{bottom:0;width:100%;overflow:auto}.tui-image-editor-container .tui-image-editor-wrap .tui-image-editor-size-wrap{display:table;width:100%;height:100%}.tui-image-editor-container .tui-image-editor-wrap .tui-image-editor-size-wrap .tui-image-editor-align-wrap{display:table-cell;vertical-align:middle}.tui-image-editor-container .tui-image-editor{position:relative;display:inline-block}.tui-image-editor-container .tui-image-editor-menu{width:auto;list-style:none;padding:0;margin:0 auto;display:table-cell;text-align:center;vertical-align:middle;white-space:nowrap}.tui-image-editor-container .tui-image-editor-menu>.tui-image-editor-item{position:relative;display:inline-block;border-radius:2px;padding:7px 8px 3px;cursor:pointer;margin:0 4px}.tui-image-editor-container .tui-image-editor-menu>.tui-image-editor-item[title]:hover:before{content:"";display:inline-block;margin:0 auto;width:0;height:0;border-right:7px solid transparent;border-top:7px solid #2f2f2f;border-left:7px solid transparent;position:absolute;left:13px;top:-2px}.tui-image-editor-container .tui-image-editor-menu>.tui-image-editor-item[title]:hover:after{content:attr(title);position:absolute;display:inline-block;background-color:#2f2f2f;color:#fff;padding:5px 8px;font-size:11px;font-weight:lighter;border-radius:3px;max-height:23px;top:-22px;left:0;min-width:24px}.tui-image-editor-container .tui-image-editor-menu>.tui-image-editor-item.active{background-color:#fff;transition:all .3s ease}.tui-image-editor-container .tui-image-editor-wrap{position:absolute}.tui-image-editor-container .tui-image-editor-grid-visual{display:none;position:absolute;width:100%;height:100%;border:1px solid hsla(0,0%,100%,.7)}.tui-image-editor-container .tui-image-editor-main.tui-image-editor-menu-flip .tui-image-editor,.tui-image-editor-container .tui-image-editor-main.tui-image-editor-menu-rotate .tui-image-editor{transition:none}.tui-image-editor-container .tui-image-editor-main.tui-image-editor-menu-flip .tui-image-editor-grid-visual,.tui-image-editor-container .tui-image-editor-main.tui-image-editor-menu-rotate .tui-image-editor-grid-visual{display:block}.tui-image-editor-container .tui-image-editor-grid-visual table{width:100%;height:100%;border-collapse:collapse}.tui-image-editor-container .tui-image-editor-grid-visual table td{border:1px solid hsla(0,0%,100%,.3)}.tui-image-editor-container .tui-image-editor-grid-visual table td.dot:before{content:"";position:absolute;box-sizing:border-box;width:10px;height:10px;border:0;box-shadow:0 0 1px 0 rgba(0,0,0,.3);border-radius:100%;background-color:#fff}.tui-image-editor-container .tui-image-editor-grid-visual table td.dot.left-top:before{top:-5px;left:-5px}.tui-image-editor-container .tui-image-editor-grid-visual table td.dot.right-top:before{top:-5px;right:-5px}.tui-image-editor-container .tui-image-editor-grid-visual table td.dot.left-bottom:before{bottom:-5px;left:-5px}.tui-image-editor-container .tui-image-editor-grid-visual table td.dot.right-bottom:before{bottom:-5px;right:-5px}.tui-image-editor-container .tui-image-editor-submenu{display:none;position:absolute;bottom:0;width:100%;height:150px;white-space:nowrap;z-index:2}.tui-image-editor-container .tui-image-editor-submenu .tui-image-editor-button:hover svg>use.active{display:block}.tui-image-editor-container .tui-image-editor-submenu .tui-image-editor-submenu-item li{display:inline-block;vertical-align:top}.tui-image-editor-container .tui-image-editor-submenu .tui-image-editor-submenu-item .tui-image-editor-newline{display:block;margin-top:0}.tui-image-editor-container .tui-image-editor-submenu .tui-image-editor-submenu-item .tui-image-editor-button{position:relative;cursor:pointer;display:inline-block;font-weight:400;font-size:11px;margin:0 9px}.tui-image-editor-container .tui-image-editor-submenu .tui-image-editor-submenu-item .tui-image-editor-button.preset{margin:0 9px 20px 5px}.tui-image-editor-container .tui-image-editor-submenu .tui-image-editor-submenu-item label{display:inline-block;cursor:pointer;padding-top:5px;font-family:Noto Sans,sans-serif;font-size:11px}.tui-image-editor-container .tui-image-editor-submenu .tui-image-editor-submenu-item .tui-image-editor-button.apply label,.tui-image-editor-container .tui-image-editor-submenu .tui-image-editor-submenu-item .tui-image-editor-button.cancel label{vertical-align:7px}.tui-image-editor-container .tui-image-editor-submenu>div{display:none;vertical-align:bottom}.tui-image-editor-container .tui-image-editor-submenu .tui-image-editor-submenu-style{opacity:.95;z-index:-1;position:absolute;top:0;bottom:0;left:0;right:0;display:block}.tui-image-editor-container .tui-image-editor-partition>div{width:1px;height:52px;border-left:1px solid #3c3c3c;margin:0 8px}.tui-image-editor-container .tui-image-editor-main.tui-image-editor-menu-filter .tui-image-editor-partition>div{height:108px;margin:0 29px 0 0}.tui-image-editor-container .tui-image-editor-submenu-align{text-align:left;margin-right:30px}.tui-image-editor-container .tui-image-editor-submenu-align label{width:55px;white-space:nowrap}.tui-image-editor-container .tui-image-editor-submenu-align:first-child{margin-right:0}.tui-image-editor-container .tui-image-editor-submenu-align:first-child label{width:70px}.tui-image-editor-container .tui-image-editor-main.tui-image-editor-menu-crop .tui-image-editor-submenu>div.tui-image-editor-menu-crop,.tui-image-editor-container .tui-image-editor-main.tui-image-editor-menu-draw .tui-image-editor-submenu>div.tui-image-editor-menu-draw,.tui-image-editor-container .tui-image-editor-main.tui-image-editor-menu-filter .tui-image-editor-submenu>div.tui-image-editor-menu-filter,.tui-image-editor-container .tui-image-editor-main.tui-image-editor-menu-flip .tui-image-editor-submenu>div.tui-image-editor-menu-flip,.tui-image-editor-container .tui-image-editor-main.tui-image-editor-menu-icon .tui-image-editor-submenu>div.tui-image-editor-menu-icon,.tui-image-editor-container .tui-image-editor-main.tui-image-editor-menu-mask .tui-image-editor-submenu>div.tui-image-editor-menu-mask,.tui-image-editor-container .tui-image-editor-main.tui-image-editor-menu-rotate .tui-image-editor-submenu>div.tui-image-editor-menu-rotate,.tui-image-editor-container .tui-image-editor-main.tui-image-editor-menu-shape .tui-image-editor-submenu>div.tui-image-editor-menu-shape,.tui-image-editor-container .tui-image-editor-main.tui-image-editor-menu-text .tui-image-editor-submenu>div.tui-image-editor-menu-text{display:table-cell}.tui-image-editor-container .tui-image-editor-main.tui-image-editor-menu-crop .tui-image-editor-submenu,.tui-image-editor-container .tui-image-editor-main.tui-image-editor-menu-draw .tui-image-editor-submenu,.tui-image-editor-container .tui-image-editor-main.tui-image-editor-menu-filter .tui-image-editor-submenu,.tui-image-editor-container .tui-image-editor-main.tui-image-editor-menu-flip .tui-image-editor-submenu,.tui-image-editor-container .tui-image-editor-main.tui-image-editor-menu-icon .tui-image-editor-submenu,.tui-image-editor-container .tui-image-editor-main.tui-image-editor-menu-mask .tui-image-editor-submenu,.tui-image-editor-container .tui-image-editor-main.tui-image-editor-menu-rotate .tui-image-editor-submenu,.tui-image-editor-container .tui-image-editor-main.tui-image-editor-menu-shape .tui-image-editor-submenu,.tui-image-editor-container .tui-image-editor-main.tui-image-editor-menu-text .tui-image-editor-submenu{display:table}.tui-image-editor-container .filter-color-item{display:inline-block}.tui-image-editor-container .filter-color-item .tui-image-editor-checkbox{display:block}.tui-image-editor-container .tui-image-editor-checkbox-wrap{display:inline-block!important;text-align:left}.tui-image-editor-container .tui-image-editor-checkbox-wrap.fixed-width{width:187px;white-space:normal}.tui-image-editor-container .tui-image-editor-checkbox{display:inline-block;margin:1px 0}.tui-image-editor-container .tui-image-editor-checkbox input{width:14px;height:14px;opacity:0}.tui-image-editor-container .tui-image-editor-checkbox input+label{color:#fff;height:14px;position:relative}.tui-image-editor-container .tui-image-editor-checkbox input+label:before{content:"";position:absolute;width:14px;height:14px;background-color:#fff;top:6px;left:-19px;display:inline-block;margin:0;text-align:center;font-size:11px;border:0;border-radius:2px;padding-top:1px;box-sizing:border-box}.tui-image-editor-container .tui-image-editor-checkbox input[type=checkbox]:checked+label:before{background-size:cover;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAAfSC3RAAAAAXNSR0IArs4c6QAAAMBJREFUKBWVkjEOwjAMRe2WgZW7IIHEDdhghhuwcQ42rlJugAQS54Cxa5cq1QM5TUpByZfS2j9+dlJVt/tX5ZxbS4ZU9VLkQvSHKTIGRaVJYFmKrBbTCJxE2UgCdDzMZDkHrOV6b95V0US6UmgKodujEZbJg0B0ZgEModO5lrY1TMQf1TpyJGBEjD+E2NPN7ukIUDiF/BfEXgRiGEw8NgkffYGYwCi808fpn/6OvfUfsDr/Vc1IfRf8sKnFVqeiVQfDu0tf/nWH9gAAAABJRU5ErkJggg==")}.tui-image-editor-container .tui-image-editor-selectlist-wrap{position:relative}.tui-image-editor-container .tui-image-editor-selectlist-wrap select{width:100%;height:28px;margin-top:4px;border:0;outline:0;border-radius:0;border:1px solid #cbdbdb;background-color:#fff;-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0 7px 0 10px}.tui-image-editor-container .tui-image-editor-selectlist-wrap .tui-image-editor-selectlist{display:none;position:relative;top:-1px;border:1px solid #ccc;background-color:#fff;border-top:0;padding:4px 0}.tui-image-editor-container .tui-image-editor-selectlist-wrap .tui-image-editor-selectlist li{display:block;text-align:left;padding:7px 10px;font-family:Noto Sans,sans-serif}.tui-image-editor-container .tui-image-editor-selectlist-wrap .tui-image-editor-selectlist li:hover{background-color:rgba(81,92,230,.05)}.tui-image-editor-container .tui-image-editor-selectlist-wrap:before{content:"";position:absolute;display:inline-block;width:14px;height:14px;right:5px;top:10px;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAAfSC3RAAAAAXNSR0IArs4c6QAAAHlJREFUKBVjYBgFOEOAEVkmPDxc89+/f6eAYjzI4kD2FyYmJrOVK1deh4kzwRggGiQBVJCELAZig8SQNYHEmEEEMrh69eo1HR0dfqCYJUickZGxf9WqVf3IakBsFBthklpaWmVA9mEQhrJhUoTp0NBQCRAmrHL4qgAAuu4cWZOZIGsAAAAASUVORK5CYII=");background-size:cover}.tui-image-editor-container .tui-image-editor-selectlist-wrap select::-ms-expand{display:none}.tui-image-editor-container .tui-image-editor-virtual-range-bar .tui-image-editor-disabled,.tui-image-editor-container .tui-image-editor-virtual-range-pointer .tui-image-editor-disabled,.tui-image-editor-container .tui-image-editor-virtual-range-subbar .tui-image-editor-disabled{backbround-color:red}.tui-image-editor-container .tui-image-editor-range{position:relative;top:5px;width:166px;height:17px;display:inline-block}.tui-image-editor-container .tui-image-editor-virtual-range-bar{top:7px;position:absolute;width:100%;height:2px;background-color:#666}.tui-image-editor-container .tui-image-editor-virtual-range-subbar{position:absolute;height:100%;left:0;right:0;background-color:#d1d1d1}.tui-image-editor-container .tui-image-editor-virtual-range-pointer{position:absolute;cursor:pointer;top:-5px;left:0;width:12px;height:12px;background-color:#fff;border-radius:100%}.tui-image-editor-container .tui-image-editor-range-wrap{display:inline-block;margin-left:4px}.tui-image-editor-container .tui-image-editor-range-wrap.short .tui-image-editor-range{width:100px}.tui-image-editor-container .color-picker-control .tui-image-editor-range{width:108px;margin-left:10px}.tui-image-editor-container .color-picker-control .tui-image-editor-virtual-range-pointer{background-color:#333}.tui-image-editor-container .color-picker-control .tui-image-editor-virtual-range-bar{background-color:#ccc}.tui-image-editor-container .color-picker-control .tui-image-editor-virtual-range-subbar{background-color:#606060}.tui-image-editor-container .tui-image-editor-range-wrap.tui-image-editor-newline.short{margin-top:-2px;margin-left:19px}.tui-image-editor-container .tui-image-editor-range-wrap.tui-image-editor-newline.short label{color:#8e8e8e;font-weight:400}.tui-image-editor-container .tui-image-editor-range-wrap label{vertical-align:baseline;font-size:11px;margin-right:7px;color:#fff}.tui-image-editor-container .tui-image-editor-range-value{cursor:default;width:40px;height:24px;outline:none;border-radius:2px;box-shadow:none;border:1px solid #d5d5d5;text-align:center;background-color:#1c1c1c;color:#fff;font-weight:lighter;vertical-align:baseline;font-family:Noto Sans,sans-serif;margin-top:21px;margin-left:4px}.tui-image-editor-container .tui-image-editor-controls{position:absolute;background-color:#151515;width:100%;height:64px;display:table;bottom:0;z-index:2}.tui-image-editor-container .tui-image-editor-icpartition{display:inline-block;background-color:#282828;width:1px;height:24px}.tui-image-editor-container.left .tui-image-editor-menu>.tui-image-editor-item[title]:before{left:28px;top:11px;border-right:7px solid #2f2f2f;border-top:7px solid transparent;border-bottom:7px solid transparent}.tui-image-editor-container.left .tui-image-editor-menu>.tui-image-editor-item[title]:after{top:7px;left:39px;white-space:nowrap}.tui-image-editor-container.left .tui-image-editor-submenu{left:0;height:100%;width:248px}.tui-image-editor-container.left .tui-image-editor-main-container{left:64px;width:calc(100% - 64px);height:100%}.tui-image-editor-container.left .tui-image-editor-controls{width:64px;height:100%;display:table}.tui-image-editor-container.left .tui-image-editor-menu,.tui-image-editor-container.right .tui-image-editor-menu{white-space:inherit}.tui-image-editor-container.left .tui-image-editor-submenu,.tui-image-editor-container.right .tui-image-editor-submenu{white-space:normal}.tui-image-editor-container.left .tui-image-editor-submenu>div,.tui-image-editor-container.right .tui-image-editor-submenu>div{vertical-align:middle}.tui-image-editor-container.left .tui-image-editor-controls li,.tui-image-editor-container.right .tui-image-editor-controls li{display:inline-block;margin:4px auto}.tui-image-editor-container.left .tui-image-editor-icpartition,.tui-image-editor-container.right .tui-image-editor-icpartition{position:relative;top:-7px;width:24px;height:1px}.tui-image-editor-container.left .tui-image-editor-submenu .tui-image-editor-partition,.tui-image-editor-container.right .tui-image-editor-submenu .tui-image-editor-partition{display:block;width:75%;margin:auto}.tui-image-editor-container.left .tui-image-editor-submenu .tui-image-editor-partition>div,.tui-image-editor-container.right .tui-image-editor-submenu .tui-image-editor-partition>div{border-left:0;height:10px;border-bottom:1px solid #3c3c3c;width:100%;margin:0}.tui-image-editor-container.left .tui-image-editor-submenu .tui-image-editor-submenu-align,.tui-image-editor-container.right .tui-image-editor-submenu .tui-image-editor-submenu-align{margin-right:0}.tui-image-editor-container.left .tui-image-editor-submenu .tui-image-editor-submenu-item li,.tui-image-editor-container.right .tui-image-editor-submenu .tui-image-editor-submenu-item li{margin-top:15px}.tui-image-editor-container.left .tui-image-editor-submenu .tui-image-editor-submenu-item .tui-colorpicker-clearfix li,.tui-image-editor-container.right .tui-image-editor-submenu .tui-image-editor-submenu-item .tui-colorpicker-clearfix li{margin-top:0}.tui-image-editor-container.left .tui-image-editor-checkbox-wrap.fixed-width,.tui-image-editor-container.right .tui-image-editor-checkbox-wrap.fixed-width{width:182px;white-space:normal}.tui-image-editor-container.left .tui-image-editor-range-wrap.tui-image-editor-newline label.range,.tui-image-editor-container.right .tui-image-editor-range-wrap.tui-image-editor-newline label.range{display:block;text-align:left;width:75%;margin:auto}.tui-image-editor-container.left .tui-image-editor-range,.tui-image-editor-container.right .tui-image-editor-range{width:136px}.tui-image-editor-container.right .tui-image-editor-menu>.tui-image-editor-item[title]:before{left:-3px;top:11px;border-left:7px solid #2f2f2f;border-top:7px solid transparent;border-bottom:7px solid transparent}.tui-image-editor-container.right .tui-image-editor-menu>.tui-image-editor-item[title]:after{top:7px;left:-44px;white-space:nowrap}.tui-image-editor-container.right .tui-image-editor-submenu{right:0;height:100%;width:248px}.tui-image-editor-container.right .tui-image-editor-main-container{right:64px;width:calc(100% - 64px);height:100%}.tui-image-editor-container.right .tui-image-editor-controls{right:0;width:64px;height:100%;display:table}.tui-image-editor-container.bottom .tui-image-editor-submenu .tui-image-editor-partition.only-left-right,.tui-image-editor-container.top .tui-image-editor-submenu .tui-image-editor-partition.only-left-right{display:none}.tui-image-editor-container.bottom .tui-image-editor-submenu>div{padding-bottom:24px}.tui-image-editor-container.top .color-picker-control .triangle{top:-8px;border-right:7px solid transparent;border-top:0;border-left:7px solid transparent;border-bottom:8px solid #fff}.tui-image-editor-container.top .tui-image-editor-size-wrap{height:100%}.tui-image-editor-container.top .tui-image-editor-main-container{bottom:0}.tui-image-editor-container.top .tui-image-editor-menu>.tui-image-editor-item[title]:before{left:13px;border-top:0;border-bottom:7px solid #2f2f2f;top:33px}.tui-image-editor-container.top .tui-image-editor-menu>.tui-image-editor-item[title]:after{top:38px}.tui-image-editor-container.top .tui-image-editor-submenu{top:0;bottom:inherit}.tui-image-editor-container.top .tui-image-editor-submenu>div{padding-top:24px;vertical-align:top}.tui-image-editor-container.top .tui-image-editor-controls-buttons,.tui-image-editor-container.top .tui-image-editor-controls-logo{display:table-cell}.tui-image-editor-container.top .tui-image-editor-main{top:64px;height:calc(100% - 64px)}.tui-image-editor-container.top .tui-image-editor-controls{top:0;bottom:inherit}.tui-image-editor-container #tie-icon-add-button .tui-image-editor-button{min-width:42px}.tui-image-editor-container .svg_ic-menu{width:24px;height:24px}.tui-image-editor-container .svg_ic-submenu{width:32px;height:32px}.tui-image-editor-container .svg_img-bi{width:257px;height:26px}.tui-image-editor-container .tui-image-editor-controls svg>use{display:none}.tui-image-editor-container .tui-image-editor-controls .enabled svg:hover>use.hover,.tui-image-editor-container .tui-image-editor-controls .normal svg:hover>use.hover{display:block}.tui-image-editor-container .tui-image-editor-controls .active svg:hover>use.hover{display:none}.tui-image-editor-container .tui-image-editor-controls .active svg>use.active,.tui-image-editor-container .tui-image-editor-controls .enabled svg>use.enabled,.tui-image-editor-container .tui-image-editor-controls svg>use.normal{display:block}.tui-image-editor-container .tui-image-editor-controls .active svg>use.normal,.tui-image-editor-container .tui-image-editor-controls .enabled svg>use.normal{display:none}.tui-image-editor-container .tui-image-editor-controls:hover{z-index:3}.tui-image-editor-container div.tui-colorpicker-clearfix{width:159px;height:28px;border:1px solid #d5d5d5;border-radius:2px;background-color:#f5f5f5;margin-top:6px;padding:4px 7px}.tui-image-editor-container .tui-colorpicker-palette-hex{width:114px;background-color:#f5f5f5;border:0;font-size:11px;margin-top:2px;font-family:Noto Sans,sans-serif}.tui-image-editor-container .tui-colorpicker-palette-hex[value=""]+.tui-colorpicker-palette-preview,.tui-image-editor-container .tui-colorpicker-palette-hex[value="#ffffff"]+.tui-colorpicker-palette-preview{border:1px solid #ccc}.tui-image-editor-container .tui-colorpicker-palette-hex[value=""]+.tui-colorpicker-palette-preview{background-size:cover;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAdBJREFUWAnFl0FuwjAQRZ0ukiugHqFSOQNdseuKW3ALzkA4BateICvUGyCxrtRFd4WuunH/TzykaYJrnLEYaTJJsP2+x8GZZCbQrLU5mj7Bn+EP8HvnCObd+R7xBV5lWfaNON4AnsA38E94qLEt+0yiFaBzAV/Bv+Cxxr4co7hKCDpw1q9wLeNYYdlAwyn8TYt8Hme3+8D5ozcTaMCZ68PXa2tnM2sbEcOZAJhrrpl2DAcTOGNjZPSfCdzkw6JrfbiMv+osBe4y9WOedhm4jZfhbENWuxS44H9Wz/xw4WzqLOAqh1+zycgAwzEMzr5k5gaHOa9ULBwuuDkFlHI1Kl4PJ66kgIpnoywOTmRFAYcbwYk9UMApWkD8zAV5ihcwHk4Rx7gl0IFTQL0EFc+CTQ9OZHWH3YhlVJiVpTHbrTGLhTHLZVgff6s9lyBsI9KduSS83oj+34rTwJutmBmCnMsvozRwZqB5GTkBw6/jdPDu69iJ6BYk6eCcfbcgcQIK/MByaaiMqm8rHcjol2TnpWDhyAKSGdA3FrxtJUToX0ODqatetfGE+8tyEUOV8GY5dGRwLP/MBS4RHQr4bT7NRAQjlcOTfZxmv2G+c4hI8nn+Ax5PG/zhI393AAAAAElFTkSuQmCC")}.tui-image-editor-container .tui-colorpicker-palette-preview{border-radius:100%;float:left;width:17px;height:17px;border:0}.tui-image-editor-container .color-picker-control{position:absolute;display:none;z-index:99;width:192px;background-color:#fff;box-shadow:0 3px 22px 6px rgba(0,0,0,.15);padding:16px;border-radius:2px}.tui-image-editor-container .color-picker-control .tui-colorpicker-palette-toggle-slider{display:none}.tui-image-editor-container .color-picker-control .tui-colorpicker-palette-button{border:0;border-radius:100%;margin:2px;background-size:cover;font-size:1px}.tui-image-editor-container .color-picker-control .tui-colorpicker-palette-button[title=""],.tui-image-editor-container .color-picker-control .tui-colorpicker-palette-button[title="#ffffff"]{border:1px solid #ccc}.tui-image-editor-container .color-picker-control .triangle{width:0;height:0;border-right:7px solid transparent;border-top:8px solid #fff;border-left:7px solid transparent;position:absolute;bottom:-8px;left:84px}.tui-image-editor-container .color-picker-control .tui-colorpicker-container,.tui-image-editor-container .color-picker-control .tui-colorpicker-palette-container,.tui-image-editor-container .color-picker-control .tui-colorpicker-palette-container ul{width:100%;height:auto}.tui-image-editor-container .filter-color-item .color-picker-control label{font-color:#333;font-weight:400;margin-right:7pxleft}.tui-image-editor-container .filter-color-item .tui-image-editor-checkbox{margin-top:0}.tui-image-editor-container .filter-color-item .tui-image-editor-checkbox input+label:before{left:-16px}.tui-image-editor-container .color-picker{width:100%;height:auto}.tui-image-editor-container .color-picker-value{width:32px;height:32px;border:0;border-radius:100%;margin:auto;margin-bottom:1px}.tui-image-editor-container .color-picker-value.transparent{border:1px solid #cbcbcb;background-size:cover;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAdBJREFUWAnFl0FuwjAQRZ0ukiugHqFSOQNdseuKW3ALzkA4BateICvUGyCxrtRFd4WuunH/TzykaYJrnLEYaTJJsP2+x8GZZCbQrLU5mj7Bn+EP8HvnCObd+R7xBV5lWfaNON4AnsA38E94qLEt+0yiFaBzAV/Bv+Cxxr4co7hKCDpw1q9wLeNYYdlAwyn8TYt8Hme3+8D5ozcTaMCZ68PXa2tnM2sbEcOZAJhrrpl2DAcTOGNjZPSfCdzkw6JrfbiMv+osBe4y9WOedhm4jZfhbENWuxS44H9Wz/xw4WzqLOAqh1+zycgAwzEMzr5k5gaHOa9ULBwuuDkFlHI1Kl4PJ66kgIpnoywOTmRFAYcbwYk9UMApWkD8zAV5ihcwHk4Rx7gl0IFTQL0EFc+CTQ9OZHWH3YhlVJiVpTHbrTGLhTHLZVgff6s9lyBsI9KduSS83oj+34rTwJutmBmCnMsvozRwZqB5GTkBw6/jdPDu69iJ6BYk6eCcfbcgcQIK/MByaaiMqm8rHcjol2TnpWDhyAKSGdA3FrxtJUToX0ODqatetfGE+8tyEUOV8GY5dGRwLP/MBS4RHQr4bT7NRAQjlcOTfZxmv2G+c4hI8nn+Ax5PG/zhI393AAAAAElFTkSuQmCC")}.tui-image-editor-container .color-picker-value+label{color:#fff}.tui-image-editor-container .tui-image-editor-submenu svg>use{display:none}#tie-icon-add-button.icon-arrow-2 .tui-image-editor-button[data-icontype=icon-arrow-2] svg>use.active,#tie-icon-add-button.icon-arrow-3 .tui-image-editor-button[data-icontype=icon-arrow-3] svg>use.active,#tie-icon-add-button.icon-arrow .tui-image-editor-button[data-icontype=icon-arrow] svg>use.active,#tie-icon-add-button.icon-bubble .tui-image-editor-button[data-icontype=icon-bubble] svg>use.active,#tie-icon-add-button.icon-heart .tui-image-editor-button[data-icontype=icon-heart] svg>use.active,#tie-icon-add-button.icon-location .tui-image-editor-button[data-icontype=icon-location] svg>use.active,#tie-icon-add-button.icon-polygon .tui-image-editor-button[data-icontype=icon-polygon] svg>use.active,#tie-icon-add-button.icon-star-2 .tui-image-editor-button[data-icontype=icon-star-2] svg>use.active,#tie-icon-add-button.icon-star .tui-image-editor-button[data-icontype=icon-star] svg>use.active,.tui-image-editor-container .tui-image-editor-submenu svg>use.normal{display:block}#tie-draw-line-select-button.free .tui-image-editor-button.free svg>use.normal,#tie-draw-line-select-button.line .tui-image-editor-button.line svg>use.normal{display:none}#tie-draw-line-select-button.free .tui-image-editor-button.free svg>use.active,#tie-draw-line-select-button.line .tui-image-editor-button.line svg>use.active{display:block}#tie-flip-button.flipX .tui-image-editor-button.flipX svg>use.normal,#tie-flip-button.flipY .tui-image-editor-button.flipY svg>use.normal,#tie-flip-button.resetFlip .tui-image-editor-button.resetFlip svg>use.normal{display:none}#tie-flip-button.flipX .tui-image-editor-button.flipX svg>use.active,#tie-flip-button.flipY .tui-image-editor-button.flipY svg>use.active,#tie-flip-button.resetFlip .tui-image-editor-button.resetFlip svg>use.active{display:block}#tie-mask-apply.apply.active .tui-image-editor-button.apply label{color:#fff}#tie-mask-apply.apply.active .tui-image-editor-button.apply svg>use.active{display:block}#tie-crop-button .tui-image-editor-button.apply,#tie-crop-preset-button .tui-image-editor-button.apply{margin-right:24px}#tie-crop-button .tui-image-editor-button.apply.active svg>use.active,#tie-crop-button .tui-image-editor-button.preset.active svg>use.active,#tie-crop-preset-button .tui-image-editor-button.apply.active svg>use.active,#tie-crop-preset-button .tui-image-editor-button.preset.active svg>use.active{display:block}#tie-shape-button.circle .tui-image-editor-button.circle svg>use.normal,#tie-shape-button.rect .tui-image-editor-button.rect svg>use.normal,#tie-shape-button.triangle .tui-image-editor-button.triangle svg>use.normal{display:none}#tie-shape-button.circle .tui-image-editor-button.circle svg>use.active,#tie-shape-button.rect .tui-image-editor-button.rect svg>use.active,#tie-shape-button.triangle .tui-image-editor-button.triangle svg>use.active,#tie-text-align-button.center .tui-image-editor-button.center svg>use.active,#tie-text-align-button.left .tui-image-editor-button.left svg>use.active,#tie-text-align-button.right .tui-image-editor-button.right svg>use.active,#tie-text-effect-button .tui-image-editor-button.active svg>use.active{display:block}#tie-icon-image-file,#tie-mask-image-file{opacity:0;position:absolute;width:100%;height:100%;border:1px solid green;cursor:inherit;left:0;top:0}.tui-image-editor-container.top.tui-image-editor-top-optimization .tui-image-editor-controls ul{text-align:right}.tui-image-editor-container.top.tui-image-editor-top-optimization .tui-image-editor-controls-logo{display:none} \ No newline at end of file diff --git a/dist/tui-image-editor.min.js b/dist/tui-image-editor.min.js index 0df70cbcf..679e9a3b9 100644 --- a/dist/tui-image-editor.min.js +++ b/dist/tui-image-editor.min.js @@ -1,24 +1,24 @@ /*! * tui-image-editor.min.js - * @version 3.4.0 + * @version 3.5.0 * @author NHNEnt FE Development Lab * @license MIT */ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("tui-code-snippet"),require("fabric/dist/fabric.require")):"function"==typeof define&&define.amd?define(["tui-code-snippet","fabric/dist/fabric.require"],t):"object"==typeof exports?exports.ImageEditor=t(require("tui-code-snippet"),require("fabric/dist/fabric.require")):(e.tui=e.tui||{},e.tui.ImageEditor=t(e.tui&&e.tui.util,e.fabric))}(this,function(e,t){return function(e){function t(i){if(n[i])return n[i].exports;var o=n[i]={exports:{},id:i,loaded:!1};return e[i].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="dist",t(0)}([function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}n(91);var o=n(88),r=i(o);n(149),n(45),n(46),n(47),n(48),n(49),n(50),n(51),n(52),n(53),n(54),n(55),n(56),n(57),n(58),n(59),n(60),n(61),n(63),n(62),e.exports=r.default},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}var o=n(5),r=i(o);e.exports={componentNames:r.default.keyMirror("IMAGE_LOADER","CROPPER","FLIP","ROTATION","FREE_DRAWING","LINE","TEXT","ICON","FILTER","SHAPE"),commandNames:{CLEAR_OBJECTS:"clearObjects",LOAD_IMAGE:"loadImage",FLIP_IMAGE:"flip",ROTATE_IMAGE:"rotate",ADD_OBJECT:"addObject",REMOVE_OBJECT:"removeObject",APPLY_FILTER:"applyFilter",REMOVE_FILTER:"removeFilter",ADD_ICON:"addIcon",CHANGE_ICON_COLOR:"changeIconColor",ADD_SHAPE:"addShape",CHANGE_SHAPE:"changeShape",ADD_TEXT:"addText",CHANGE_TEXT:"changeText",CHANGE_TEXT_STYLE:"changeTextStyle",ADD_IMAGE_OBJECT:"addImageObject",RESIZE_CANVAS_DIMENSION:"resizeCanvasDimension",SET_OBJECT_PROPERTIES:"setObjectProperties",SET_OBJECT_POSITION:"setObjectPosition"},eventNames:{OBJECT_ACTIVATED:"objectActivated",OBJECT_MOVED:"objectMoved",OBJECT_SCALED:"objectScaled",OBJECT_CREATED:"objectCreated",TEXT_EDITING:"textEditing",TEXT_CHANGED:"textChanged",ICON_CREATE_RESIZE:"iconCreateResize",ICON_CREATE_END:"iconCreateEnd",ADD_TEXT:"addText",ADD_OBJECT:"addObject",ADD_OBJECT_AFTER:"addObjectAfter",MOUSE_DOWN:"mousedown",MOUSE_UP:"mouseup",MOUSE_MOVE:"mousemove",REDO_STACK_CHANGED:"redoStackChanged",UNDO_STACK_CHANGED:"undoStackChanged",SELECTION_CLEARED:"selectionCleared",SELECTION_CREATED:"selectionCreated"},drawingModes:r.default.keyMirror("NORMAL","CROPPER","FREE_DRAWING","LINE_DRAWING","TEXT","SHAPE"),keyCodes:{Z:90,Y:89,SHIFT:16,BACKSPACE:8,DEL:46},fObjectOptions:{SELECTION_STYLE:{borderColor:"red",cornerColor:"green",cornerSize:10,originX:"center",originY:"center",transparentCorners:!1}},rejectMessages:{flip:"The flipX and flipY setting values are not changed.",rotation:"The current angle is same the old angle.",loadImage:"The background image is empty.",isLock:"The executing command state is locked.",undo:"The promise of undo command is reject.",redo:"The promise of redo command is reject.",invalidDrawingMode:"This operation is not supported in the drawing mode",invalidParameters:"Invalid parameters",noActiveObject:"There is no active object.",unsupportedType:"Unsupported object type",noObject:"The object is not in canvas.",addedObject:"The object is already added."},defaultIconPath:{"icon-arrow":"M40 12V0l24 24-24 24V36H0V12h40z","icon-arrow-2":"M49,32 H3 V22 h46 l-18,-18 h12 l23,23 L43,50 h-12 l18,-18 z ","icon-arrow-3":"M43.349998,27 L17.354,53 H1.949999 l25.996,-26 L1.949999,1 h15.404 L43.349998,27 z ","icon-star":"M35,54.557999 l-19.912001,10.468 l3.804,-22.172001 l-16.108,-15.7 l22.26,-3.236 L35,3.746 l9.956,20.172001 l22.26,3.236 l-16.108,15.7 l3.804,22.172001 z ","icon-star-2":"M17,31.212 l-7.194,4.08 l-4.728,-6.83 l-8.234,0.524 l-1.328,-8.226 l-7.644,-3.14 l2.338,-7.992 l-5.54,-6.18 l5.54,-6.176 l-2.338,-7.994 l7.644,-3.138 l1.328,-8.226 l8.234,0.522 l4.728,-6.83 L17,-24.312 l7.194,-4.08 l4.728,6.83 l8.234,-0.522 l1.328,8.226 l7.644,3.14 l-2.338,7.992 l5.54,6.178 l-5.54,6.178 l2.338,7.992 l-7.644,3.14 l-1.328,8.226 l-8.234,-0.524 l-4.728,6.83 z ","icon-polygon":"M3,31 L19,3 h32 l16,28 l-16,28 H19 z ","icon-location":"M24 62C8 45.503 0 32.837 0 24 0 10.745 10.745 0 24 0s24 10.745 24 24c0 8.837-8 21.503-24 38zm0-28c5.523 0 10-4.477 10-10s-4.477-10-10-10-10 4.477-10 10 4.477 10 10 10z","icon-heart":"M49.994999,91.349998 l-6.96,-6.333 C18.324001,62.606995 2.01,47.829002 2.01,29.690998 C2.01,14.912998 13.619999,3.299999 28.401001,3.299999 c8.349,0 16.362,5.859 21.594,12 c5.229,-6.141 13.242001,-12 21.591,-12 c14.778,0 26.390999,11.61 26.390999,26.390999 c0,18.138 -16.314001,32.916 -41.025002,55.374001 l-6.96,6.285 z ","icon-bubble":"M44 48L34 58V48H12C5.373 48 0 42.627 0 36V12C0 5.373 5.373 0 12 0h40c6.627 0 12 5.373 12 12v24c0 6.627-5.373 12-12 12h-8z"},defaultRotateRangeValus:{realTimeEvent:!0,min:-360,max:360,value:0},defaultDrawRangeValus:{min:5,max:30,value:12},defaultShapeStrokeValus:{realTimeEvent:!1,min:2,max:300,value:3},defaultTextRangeValus:{realTimeEvent:!0,min:10,max:100,value:50},defaultFilterRangeValus:{tintOpacityRange:{min:0,max:1,value:.7},removewhiteThresholdRange:{min:0,max:255,value:60},removewhiteDistanceRange:{min:0,max:255,value:10},gradientTransparencyRange:{min:0,max:255,value:100},brightnessRange:{min:-255,max:255,value:100},noiseRange:{min:0,max:1e3,value:100},pixelateRange:{min:2,max:20,value:4},colorfilterThresholeRange:{min:0,max:255,value:45}}}},function(t,n){t.exports=e},function(e,t,n){n(145),n(147),n(148),n(146),e.exports=n(16).Promise},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function o(e){var t=l[e];if(t){for(var n=arguments.length,i=Array(n>1?n-1:0),o=1;on&&(i=t,t=n,n=i),r(t,o(e,n))},keyMirror:function(){for(var e={},t=arguments.length,n=Array(t),o=0;o1&&void 0!==arguments[1]?arguments[1]:"#7e7e7e",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"up";o(this,e);var r=t.getAttribute("title");this._show=!1,this._colorpickerElement=t,this._toggleDirection=i,this._makePickerButtonElement(t,n),this._makePickerLayerElement(t,r),this._color=n,this.picker=c.default.create({container:this.pickerElement,preset:u,color:n}),this._addEvent(t)}return r(e,[{key:"_changeColorElement",value:function(e){e?(this.colorElement.classList.remove("transparent"),this.colorElement.style.backgroundColor=e):(this.colorElement.style.backgroundColor="#fff",this.colorElement.classList.add("transparent"))}},{key:"_makePickerButtonElement",value:function(e,t){e.classList.add("tui-image-editor-button"),this.colorElement=document.createElement("div"),this.colorElement.className="color-picker-value",t?this.colorElement.style.backgroundColor=t:this.colorElement.classList.add("transparent")}},{key:"_makePickerLayerElement",value:function(e,t){var n=document.createElement("label"),i=document.createElement("div");this.pickerControl=document.createElement("div"),this.pickerControl.className="color-picker-control",this.pickerElement=document.createElement("div"),this.pickerElement.className="color-picker",n.innerHTML=t,i.className="triangle",this.pickerControl.appendChild(this.pickerElement),this.pickerControl.appendChild(i),e.appendChild(this.pickerControl),e.appendChild(this.colorElement),e.appendChild(n)}},{key:"_addEvent",value:function(e){var t=this;this.picker.on("selectColor",function(e){t._changeColorElement(e.color),t._color=e.color,t.fire("change",e.color)}),e.addEventListener("click",function(e){t._show=!t._show,t.pickerControl.style.display=t._show?"block":"none",t._setPickerControlPosition(),t.fire("changeShow",t),e.stopPropagation()}),document.body.addEventListener("click",function(){t.hide()})}},{key:"hide",value:function(){this._show=!1,this.pickerControl.style.display="none"}},{key:"_setPickerControlPosition",value:function(){var e=this.pickerControl.style,t=this._colorpickerElement.clientWidth/2+2,n=this.pickerControl.offsetWidth/2-t,i=(this.pickerControl.offsetHeight+10)*-1;"down"===this._toggleDirection&&(i=30),e.top=i+"px",e.left="-"+n+"px"}},{key:"color",get:function(){return this._color},set:function(e){this._color=e,this._changeColorElement(e)}}]),e}();s.default.CustomEvents.mixin(d),t.default=d},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{};o(this,e),this._value=n.value||0,this.rangeElement=t,this._drawRangeElement(),this.rangeWidth=(0,l.toInteger)(window.getComputedStyle(t,null).width)-12,this._min=n.min||0,this._max=n.max||100,this._absMax=this._min*-1+this._max,this.realTimeEvent=n.realTimeEvent||!1,this._addClickEvent(),this._addDragEvent(),this.value=n.value,this.trigger("change")}return r(e,[{key:"trigger",value:function(e){this.fire(e,this._value)}},{key:"_drawRangeElement",value:function(){this.rangeElement.classList.add("tui-image-editor-range"),this.bar=document.createElement("div"),this.bar.className="tui-image-editor-virtual-range-bar",this.subbar=document.createElement("div"),this.subbar.className="tui-image-editor-virtual-range-subbar",this.pointer=document.createElement("div"),this.pointer.className="tui-image-editor-virtual-range-pointer",this.bar.appendChild(this.subbar),this.bar.appendChild(this.pointer),this.rangeElement.appendChild(this.bar)}},{key:"_addClickEvent",value:function(){var e=this;this.rangeElement.addEventListener("click",function(t){if(t.stopPropagation(),"tui-image-editor-range"===t.target.className){var n=t.offsetX,i=n/e.rangeWidth,o=e._absMax*i+e._min;e.pointer.style.left=i*e.rangeWidth+"px",e.subbar.style.right=(1-i)*e.rangeWidth+"px",e._value=o,e.fire("change",o)}})}},{key:"_addDragEvent",value:function(){var e=this;this.pointer.addEventListener("mousedown",function(t){e.firstPosition=t.screenX,e.firstLeft=(0,l.toInteger)(e.pointer.style.left)||0,e.dragEventHandler={changeAngle:e._changeAngle.bind(e),stopChangingAngle:e._stopChangingAngle.bind(e)},document.addEventListener("mousemove",e.dragEventHandler.changeAngle),document.addEventListener("mouseup",e.dragEventHandler.stopChangingAngle)})}},{key:"_changeAngle",value:function(e){var t=e.screenX,n=t-this.firstPosition,i=this.firstLeft+n;i=i>this.rangeWidth?this.rangeWidth:i,i=i<0?0:i,this.pointer.style.left=i+"px",this.subbar.style.right=this.rangeWidth-i+"px";var o=i/this.rangeWidth,r=this._absMax*o+this._min;this._value=r,this.realTimeEvent&&this.fire("change",r)}},{key:"_stopChangingAngle",value:function(){this.fire("change",this._value),document.removeEventListener("mousemove",this.dragEventHandler.changeAngle),document.removeEventListener("mouseup",this.dragEventHandler.stopChangingAngle)}},{key:"max",set:function(e){this._max=e,this._absMax=this._min*-1+this._max,this.value=this._value},get:function(){return this._max}},{key:"value",get:function(){return this._value},set:function(e){var t=e-this._min,n=t*this.rangeWidth/this._absMax;this.rangeWidth0?i:n)(e)}},function(e,t,n){var i=n(123),o=n(25);e.exports=function(e){return i(o(e))}},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}var o=n(2),r=i(o),a=n(5),s=(0,a.keyMirror)("UN_IMPLEMENTATION","NO_COMPONENT_NAME"),l={UN_IMPLEMENTATION:"Should implement a method: ",NO_COMPONENT_NAME:"Should set a component name"},c={UN_IMPLEMENTATION:function(e){return l.UN_IMPLEMENTATION+e},NO_COMPONENT_NAME:function(){return l.NO_COMPONENT_NAME}};e.exports={types:r.default.extend({},s),create:function(e){e=e.toLowerCase();for(var t=c[e],n=arguments.length,i=Array(n>1?n-1:0),o=1;on;)t.push(arguments[n++]);return v[++g]=function(){s("function"==typeof e?e:Function(e),t)},i(g),g},f=function(e){delete v[e]},"process"==n(19)(d)?i=function(e){d.nextTick(a(b,e,1))}:p?(o=new p,r=o.port2,o.port1.onmessage=y,i=a(r.postMessage,r,1)):u.addEventListener&&"function"==typeof postMessage&&!u.importScripts?(i=function(e){u.postMessage(e+"","*")},u.addEventListener("message",y,!1)):i=m in c("script")?function(e){l.appendChild(c("script"))[m]=function(){l.removeChild(this),b.call(e)}}:function(e){setTimeout(a(b,e,1),0)}),e.exports={set:h,clear:f}},function(e,t,n){var i=n(29),o=Math.min;e.exports=function(e){return e>0?o(i(e),9007199254740991):0}},function(e,t){var n=0,i=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+i).toString(36))}},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(2),r=n(5),a=i(r),s=n(86),l=i(s);t.default={getActions:function(){return{main:this._mainAction(),shape:this._shapeAction(),crop:this._cropAction(),flip:this._flipAction(),rotate:this._rotateAction(),text:this._textAction(),mask:this._maskAction(),draw:this._drawAction(),icon:this._iconAction(),filter:this._filterAction()}},_mainAction:function(){var e=this,t=function(){"crop"===e.ui.submenu&&(e.stopDrawingMode(),e.ui.changeMenu("crop"))};return(0,o.extend)({initLoadImage:function(n,i){return e.loadImageFromURL(n,i).then(function(i){t(),e.ui.initializeImgUrl=n,e.ui.resizeEditor({imageSize:i}),e.clearUndoStack()})},undo:function(){e.isEmptyUndoStack()||(t(),e.undo())},redo:function(){e.isEmptyRedoStack()||(t(),e.redo())},reset:function(){t(),e.loadImageFromURL(e.ui.initializeImgUrl,"resetImage").then(function(n){t(),e.ui.resizeEditor({imageSize:n}),e.clearUndoStack()})},delete:function(){e.ui.changeDeleteButtonEnabled(!1),t(),e.removeActiveObject(),e.activeObjectId=null},deleteAll:function(){t(),e.clearObjects(),e.ui.changeDeleteButtonEnabled(!1),e.ui.changeDeleteAllButtonEnabled(!1)},load:function(n){a.default.isSupportFileApi()||alert("This browser does not support file-api"),e.ui.initializeImgUrl=URL.createObjectURL(n),e.loadImageFromFile(n).then(function(n){t(),e.clearUndoStack(),e.ui.activeMenuEvent(),e.ui.resizeEditor({imageSize:n})}).catch(function(e){return Promise.reject(e)})},download:function(){var t=e.toDataURL(),n=e.getImageName(),i=void 0,o=void 0,r=void 0;a.default.isSupportFileApi()&&window.saveAs?(i=a.default.base64ToBlob(t),o=i.type.split("/")[1],n.split(".").pop()!==o&&(n+="."+o),saveAs(i,n)):(r=window.open(),r.document.body.innerHTML="")}},this._commonAction())},_iconAction:function(){var e=this,t=void 0,n=void 0,i=void 0,r=void 0,a=void 0,s=void 0,c=void 0;this.on({iconCreateResize:function(t){var n=t.moveOriginPointer,o=(n.x-i)/a,l=(n.y-r)/s;e.setObjectPropertiesQuietly(c,{scaleX:Math.abs(2*o),scaleY:Math.abs(2*l)})},iconCreateEnd:function(){e.ui.icon.clearIconType(),e.changeSelectableAll(!0)}});var u=function(o,l){i=l.x,r=l.y,e.addIcon(t,{left:l.x,top:l.y,fill:n}).then(function(e){c=e.id,a=e.width,s=e.height})};return(0,o.extend)({changeColor:function(t){e.activeObjectId&&e.changeIconColor(e.activeObjectId,t)},addIcon:function(i,o){t=i,n=o,e.changeCursor("crosshair"),e.off("mousedown"),e.once("mousedown",u.bind(e))},cancelAddIcon:function(){e.off("mousedown"),e.ui.icon.clearIconType(),e.changeSelectableAll(!0),e.changeCursor("default")},registDefalutIcons:function(t,n){var i={};i[t]=n,e.registerIcons(i)},registCustomIcon:function(t,n){var i=new l.default;i.imageToSVG(t,function(t){var i=t.match(/path[^>]*d="([^"]*)"/),o=i[1],r={};r[n.name]=o,e.registerIcons(r),e.addIcon(n.name,{left:100,top:100})},l.default.tracerDefaultOption())}},this._commonAction())},_drawAction:function(){var e=this;return(0,o.extend)({setDrawMode:function(t,n){e.stopDrawingMode(),"free"===t?e.startDrawingMode("FREE_DRAWING",n):e.startDrawingMode("LINE_DRAWING",n)},setColor:function(t){e.setBrush({color:t})}},this._commonAction())},_maskAction:function(){var e=this;return(0,o.extend)({loadImageFromURL:function(t,n){return e.loadImageFromURL(e.toDataURL(),"FilterImage").then(function(){e.addImageObject(t).then(function(){URL.revokeObjectURL(n)})})},applyFilter:function(){e.applyFilter("mask",{maskObjId:e.activeObjectId})}},this._commonAction())},_textAction:function(){var e=this;return(0,o.extend)({changeTextStyle:function(t){e.activeObjectId&&e.changeTextStyle(e.activeObjectId,t)}},this._commonAction())},_rotateAction:function(){var e=this;return(0,o.extend)({rotate:function(t){e.rotate(t),e.ui.resizeEditor()},setAngle:function(t){e.setAngle(t),e.ui.resizeEditor()}},this._commonAction())},_shapeAction:function(){var e=this;return(0,o.extend)({changeShape:function(t){e.activeObjectId&&e.changeShape(e.activeObjectId,t)},setDrawingShape:function(t){e.setDrawingShape(t)}},this._commonAction())},_cropAction:function(){var e=this;return(0,o.extend)({crop:function(){var t=e.getCropzoneRect();t&&e.crop(t).then(function(){e.stopDrawingMode(),e.ui.resizeEditor(),e.ui.changeMenu("crop")}).catch(function(e){return Promise.reject(e)})},cancel:function(){e.stopDrawingMode(),e.ui.changeMenu("crop")},preset:function(t){switch(t){case"preset-square":e.setCropzoneRect(1);break;case"preset-3-2":e.setCropzoneRect(1.5);break;case"preset-4-3":e.setCropzoneRect(4/3);break;case"preset-5-4":e.setCropzoneRect(5/4);break;case"preset-7-5":e.setCropzoneRect(1.4);break;case"preset-16-9":e.setCropzoneRect(16/9);break;default:e.setCropzoneRect(),e.ui.crop.changeApplyButtonStatus(!1)}}},this._commonAction())},_flipAction:function(){var e=this;return(0,o.extend)({flip:function(t){return e[t]()}},this._commonAction())},_filterAction:function(){var e=this;return(0,o.extend)({applyFilter:function(t,n,i){t?e.applyFilter(n,i):e.hasFilter(n)&&e.removeFilter(n)}},this._commonAction())},setReAction:function(){var e=this;this.on({undoStackChanged:function(t){t?(e.ui.changeUndoButtonStatus(!0),e.ui.changeResetButtonStatus(!0)):(e.ui.changeUndoButtonStatus(!1),e.ui.changeResetButtonStatus(!1)),e.ui.resizeEditor()},redoStackChanged:function(t){t?e.ui.changeRedoButtonStatus(!0):e.ui.changeRedoButtonStatus(!1),e.ui.resizeEditor()},objectActivated:function(t){e.activeObjectId=t.id,e.ui.changeDeleteButtonEnabled(!0),e.ui.changeDeleteAllButtonEnabled(!0),"cropzone"===t.type?e.ui.crop.changeApplyButtonStatus(!0):["rect","circle","triangle"].indexOf(t.type)>-1?(e.stopDrawingMode(),"shape"!==e.ui.submenu&&e.ui.changeMenu("shape",!1,!1),e.ui.shape.setShapeStatus({strokeColor:t.stroke,strokeWidth:t.strokeWidth,fillColor:t.fill}),e.ui.shape.setMaxStrokeValue(Math.min(t.width,t.height))):"path"===t.type||"line"===t.type?"draw"!==e.ui.submenu&&(e.ui.changeMenu("draw",!1,!1),e.ui.draw.changeStandbyMode()):["i-text","text"].indexOf(t.type)>-1?"text"!==e.ui.submenu&&e.ui.changeMenu("text",!1,!1):"icon"===t.type&&(e.stopDrawingMode(),"icon"!==e.ui.submenu&&e.ui.changeMenu("icon",!1,!1),e.ui.icon.setIconPickerColor(t.fill))},addText:function(t){e.addText("Double Click",{position:t.originPosition,styles:{fill:e.ui.text.textColor,fontSize:a.default.toInteger(e.ui.text.fontSize),fontFamily:"Noto Sans"}}).then(function(){e.changeCursor("default")})},addObjectAfter:function(t){["rect","circle","triangle"].indexOf(t.type)>-1&&(e.ui.shape.setMaxStrokeValue(Math.min(t.width,t.height)),e.ui.shape.changeStandbyMode())},objectScaled:function(t){if(["i-text","text"].indexOf(t.type)>-1)e.ui.text.fontSize=a.default.toInteger(t.fontSize);else if(["rect","circle","triangle"].indexOf(t.type)>=0){var n=t.width,i=t.height,o=e.ui.shape.getStrokeValue();nb&&(r.remove(),r.set(this._calcRectDimensionFromPoint(i,o)),t.add(r))}},{key:"_calcRectDimensionFromPoint",value:function(e,t){var n=this.getCanvas(),i=n.getWidth(),o=n.getHeight(),r=this._startX,a=this._startY,s=(0,m.clamp)(e,0,r),l=(0,m.clamp)(t,0,a),c=(0,m.clamp)(e,r,i)-s,u=(0,m.clamp)(t,a,o)-l;return this._withShiftKey&&(c>u?u=c:u>c&&(c=u),r>=e&&(s=r-c),a>=t&&(l=a-u)),{left:s,top:l,width:c,height:u}}},{key:"_onFabricMouseUp",value:function(){var e=this._cropzone,t=this._listeners,n=this.getCanvas();n.setActiveObject(e),n.off({"mouse:move":t.mousemove,"mouse:up":t.mouseup})}},{key:"getCroppedImageData",value:function(e){var t=this.getCanvas(),n=t.contains(this._cropzone);if(!e)return null;n&&this._cropzone.remove();var i={imageName:this.getImageName(),url:t.toDataURL(e)};return n&&t.add(this._cropzone),i}},{key:"getCropzoneRect",value:function(){var e=this._cropzone;return e.isValid()?{left:e.getLeft(),top:e.getTop(),width:e.getWidth(),height:e.getHeight()}:null}},{key:"setCropzoneRect",value:function(e){var t=this.getCanvas(),n=this._cropzone;t.deactivateAll(),t.selection=!1,n.remove(),n.set(e?this._getPresetCropSizePosition(e):y),t.add(n),t.selection=!0,e&&t.setActiveObject(n)}},{key:"_getPresetCropSizePosition",value:function(e){var t=this.getCanvas(),n=t.getWidth(),i=t.getHeight(),o=n>=i?n:i,r=function(e,t){return e>t?t/e:1},a=o*e,s=o,l=r(a,n),u=c.default.map([a,s],function(e){return e*l});a=u[0],s=u[1];var d=r(s,i),h=c.default.map([a,s],function(e){return e*d});return a=h[0],s=h[1],{top:(i-s)/2,left:(n-a)/2,width:a,height:s}}},{key:"_onKeyDown",value:function(e){e.keyCode===v.keyCodes.SHIFT&&(this._withShiftKey=!0)}},{key:"_onKeyUp",value:function(e){e.keyCode===v.keyCodes.SHIFT&&(this._withShiftKey=!1)}}]),t}(f.default);e.exports=_},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=function(){function e(e,t){for(var n=0;n=0,c=n.useDragAddIcon&&l,u=a?n._createIcon(a):null;u||o(y.invalidParameters),u.set(d.default.extend({type:"icon",fill:n._oColor},s,t,n.graphics.controlStyle)),r.add(u).setActiveObject(u),c&&n._addWithDragEvent(r),i(n.graphics.createObjectProperties(u))})}},{key:"_addWithDragEvent",value:function(e){var t=this;e.on({"mouse:move":function(n){e.selection=!1,t.fire(b.ICON_CREATE_RESIZE,{moveOriginPointer:e.getPointer(n.e)})},"mouse:up":function(n){t.fire(b.ICON_CREATE_END,{moveOriginPointer:e.getPointer(n.e)}),e.defaultCursor="default",e.off("mouse:up"),e.off("mouse:move"),e.selection=!0}})}},{key:"registerPaths",value:function(e){var t=this;d.default.forEach(e,function(e,n){t._pathMap[n]=e},this)}},{key:"setColor",value:function(e,t){this._oColor=e,t&&"icon"===t.get("type")&&(t.setFill(this._oColor),this.getCanvas().renderAll())}},{key:"getColor",value:function(e){return e.fill}},{key:"_createIcon",value:function(e){return new c.default.Path(e)}}]),t}(g.default);e.exports=k},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=function(){function e(e,t){for(var n=0;nn},_getColor:function(e,t,n){var i=[0,0,0,0],o=e.data,r=e.width,a=4,s=(r*n+t)*a;return i[0]=o[s],i[1]=o[s+1],i[2]=o[s+2],i[3]=o[s+3],i}});e.exports=a},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}var o=n(2),r=i(o),a=n(6),s=i(a),l=n(5),c="tl",u="tr",d="mt",h="ml",f="mr",p="mb",g="bl",v="br",m=s.default.util.createClass(s.default.Rect,{initialize:function(e,t){e=r.default.extend(e,t),e.type="cropzone",this.callSuper("initialize",e),this.options=e,this.on({moving:this._onMoving,scaling:this._onScaling})},_render:function(e){var t=7,n=7;this.callSuper("_render",e);var i=this.flipX?-1:1,o=this.flipY?-1:1,r=i/this.scaleX,a=o/this.scaleY;e.scale(r,a),this._fillOuterRect(e,"rgba(0, 0, 0, 0.55)"),this.options.lineWidth?(this._fillInnerRect(e),this._strokeBorder(e,"rgb(255, 255, 255)",{lineWidth:this.options.lineWidth})):(this._strokeBorder(e,"rgb(0, 0, 0)",{lineDashWidth:t}),this._strokeBorder(e,"rgb(255, 255, 255)",{lineDashWidth:t,lineDashOffset:n})),e.scale(1/r,1/a)},_fillOuterRect:function(e,t){var n=this._getCoordinates(e),i=n.x,o=n.y;e.save(),e.fillStyle=t,e.beginPath(),e.moveTo(i[0]-1,o[0]-1),e.lineTo(i[3]+1,o[0]-1),e.lineTo(i[3]+1,o[3]+1),e.lineTo(i[0]-1,o[3]+1),e.lineTo(i[0]-1,o[0]-1),e.closePath(),e.moveTo(i[1],o[1]),e.lineTo(i[1],o[2]),e.lineTo(i[2],o[2]),e.lineTo(i[2],o[1]),e.lineTo(i[1],o[1]),e.closePath(),e.fill(),e.restore()},_fillInnerRect:function(e){var t=this._getCoordinates(e),n=t.x,i=t.y,o=this._caculateInnerPosition(n,(n[2]-n[1])/3),r=this._caculateInnerPosition(i,(i[2]-i[1])/3);e.save(),e.strokeStyle="rgba(255, 255, 255, 0.7)",e.lineWidth=this.options.lineWidth,e.beginPath(),e.moveTo(o[0],r[1]),e.lineTo(o[3],r[1]),e.moveTo(o[0],r[2]),e.lineTo(o[3],r[2]),e.moveTo(o[1],r[0]),e.lineTo(o[1],r[3]),e.moveTo(o[2],r[0]),e.lineTo(o[2],r[3]),e.stroke(),e.closePath(),e.restore()},_caculateInnerPosition:function(e,t){var n=[];return n[0]=e[1],n[1]=e[1]+t,n[2]=e[1]+2*t,n[3]=e[2],n},_getCoordinates:function(e){var t=this.getWidth(),n=this.getHeight(),i=t/2,o=n/2,a=this.getLeft(),s=this.getTop(),l=e.canvas;return{x:r.default.map([-(i+a),-i,i,i+(l.width-a-t)],Math.ceil),y:r.default.map([-(o+s),-o,o,o+(l.height-s-n)],Math.ceil)}},_strokeBorder:function(e,t,n){var i=n.lineDashWidth,o=n.lineDashOffset,r=n.lineWidth,a=this.getWidth()/2,s=this.getHeight()/2;e.save(),e.strokeStyle=t,e.setLineDash&&e.setLineDash([i,i]),o&&(e.lineDashOffset=o),r&&(e.lineWidth=r),e.beginPath(),e.moveTo(-a,-s),e.lineTo(a,-s),e.lineTo(a,s),e.lineTo(-a,s),e.lineTo(-a,-s),e.stroke(),e.restore()},_onMoving:function(){var e=this.getLeft(),t=this.getTop(),n=this.getWidth(),i=this.getHeight(),o=this.canvas.getWidth()-n,r=this.canvas.getHeight()-i;this.setLeft((0,l.clamp)(e,0,o)),this.setTop((0,l.clamp)(t,0,r))},_onScaling:function(e){var t=this.canvas.getPointer(e.e),n=this._calcScalingSizeFromPointer(t);this.scale(1).set(n)},_calcScalingSizeFromPointer:function(e){var t=e.x,n=e.y,i=this._calcTopLeftScalingSizeFromPointer(t,n),o=this._calcBottomRightScalingSizeFromPointer(t,n);return this._makeScalingSettings(i,o)},_calcTopLeftScalingSizeFromPointer:function(e,t){var n=this.getHeight()+this.top,i=this.getWidth()+this.left,o=(0,l.clamp)(t,0,n-1),r=(0,l.clamp)(e,0,i-1);return{top:o,left:r,width:i-r,height:n-o}},_calcBottomRightScalingSizeFromPointer:function(e,t){var n=this.canvas,i=n.width,o=n.height,r=this.left,a=this.top;return{width:(0,l.clamp)(e,r+1,i)-r,height:(0,l.clamp)(t,a+1,o)-a}},_makeScalingSettings:function(e,t){var n=e.width,i=e.height,o=t.height,r=t.width,a=e.left,s=e.top,l=void 0;switch(this.__corner){case c:l=e;break;case u:l={width:r,height:i,top:s};break;case g:l={width:n,height:o,left:a};break;case v:l=t;break;case h:l={width:n,left:a};break;case d:l={height:i,top:s};break;case f:l={width:r};break;case p:l={height:o}}return l},isValid:function(){return this.left>=0&&this.top>=0&&this.width>0&&this.height>0}});e.exports=m},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}var o=n(6),r=i(o),a=r.default.util.createClass(r.default.Image.filters.Convolute,{type:"Emboss",initialize:function(){var e=[1,1,1,1,.7,-1,-1,-1,-1];this.matrix=e}});e.exports=a},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}var o=n(6),r=i(o),a=r.default.util.createClass(r.default.Image.filters.Mask,{applyTo:function(e){if(this.mask){var t=e.width,n=e.height,i=this._createCanvasOfMask(t,n),o=e.getContext("2d"),r=i.getContext("2d"),a=o.getImageData(0,0,t,n);this._drawMask(r,e,o),this._mapData(r,a,t,n),o.putImageData(a,0,0)}},_createCanvasOfMask:function(e,t){var n=r.default.util.createCanvasElement();return n.width=e,n.height=t,n},_drawMask:function(e){var t=this.mask,n=t.getElement(),i=t.getLeft(),o=t.getTop(),r=t.getAngle();e.save(),e.translate(i,o),e.rotate(r*Math.PI/180),e.scale(t.scaleX,t.scaleY),e.drawImage(n,-n.width/2,-n.height/2),e.restore()},_mapData:function(e,t,n,i){for(var o=t.data,r=e.getImageData(0,0,n,i).data,a=this.channel,s=t.width*t.height*4,l=0;l1&&void 0!==arguments[1]?arguments[1]:{},i=n.cssMaxWidth,r=n.cssMaxHeight,a=n.useItext,s=void 0!==a&&a,l=n.useDragAddIcon,c=void 0!==l&&l;o(this,e),this.canvasImage=null,this.cssMaxWidth=i||ie,this.cssMaxHeight=r||oe,this.useItext=s,this.useDragAddIcon=c,this.cropSelectionStyle={},this.imageName="",this._objects={},this._canvas=null,this._drawingMode=q.NORMAL,this._drawingModeMap={},this._componentMap={},this._handler={onMouseDown:this._onMouseDown.bind(this),onObjectAdded:this._onObjectAdded.bind(this),onObjectRemoved:this._onObjectRemoved.bind(this),onObjectMoved:this._onObjectMoved.bind(this),onObjectScaled:this._onObjectScaled.bind(this),onObjectSelected:this._onObjectSelected.bind(this),onPathCreated:this._onPathCreated.bind(this),onSelectionCleared:this._onSelectionCleared.bind(this),onSelectionCreated:this._onSelectionCreated.bind(this)},this._setCanvasElement(t),this._createDrawingModeInstances(),this._createComponents(),this._attachCanvasEvents()}return r(e,[{key:"destroy",value:function(){var e=this._canvas.wrapperEl;this._canvas.clear(),e.parentNode.removeChild(e)}},{key:"deactivateAll",value:function(){return this._canvas.deactivateAll(),this}},{key:"renderAll",value:function(){return this._canvas.renderAll(),this}},{key:"add",value:function(e){var t,n=[];$(e)?n=e:n.push(e),(t=this._canvas).add.apply(t,n)}},{key:"contains",value:function(e){return this._canvas.contains(e)}},{key:"getObjects",value:function(){return this._canvas.getObjects().slice()}},{key:"getObject",value:function(e){return this._objects[e]}},{key:"remove",value:function(e){this._canvas.remove(e)}},{key:"removeAll",value:function(e){var t=this._canvas,n=t.getObjects().slice();return t.remove.apply(t,this._canvas.getObjects()),e&&t.clear(),n}},{key:"removeObjectById",value:function(e){var t=[],n=this._canvas,i=this.getObject(e),o=i&&i.isType("group")&&!i.isEmpty();return o?(n.discardActiveGroup(),i.forEachObject(function(e){t.push(e),e.remove()})):n.contains(i)&&(t.push(i),i.remove()),t}},{key:"getObjectId",value:function(e){var t=null;for(t in this._objects)if(this._objects.hasOwnProperty(t)&&e===this._objects[t])return t;return null}},{key:"getActiveObject",value:function(){return this._canvas.getActiveObject()}},{key:"getActiveGroupObject",value:function(){return this._canvas.getActiveGroup()}},{key:"setActiveObject",value:function(e){this._canvas.setActiveObject(e)}},{key:"setCropSelectionStyle",value:function(e){this.cropSelectionStyle=e}},{key:"getComponent",value:function(e){return this._componentMap[e]}},{key:"getDrawingMode",value:function(){return this._drawingMode}},{key:"startDrawingMode",value:function(e,t){if(this._isSameDrawingMode(e))return!0;this.stopDrawingMode();var n=this._getDrawingModeInstance(e);return n&&n.start&&(n.start(this,t),this._drawingMode=e),!!n}},{key:"stopDrawingMode",value:function(){if(!this._isSameDrawingMode(q.NORMAL)){var e=this._getDrawingModeInstance(this.getDrawingMode());e&&e.end&&e.end(this),this._drawingMode=q.NORMAL}}},{key:"toDataURL",value:function(e){return this._canvas&&this._canvas.toDataURL(e)}},{key:"setCanvasImage",value:function(e,t){t&&Z(t),this.imageName=e,this.canvasImage=t}},{key:"setCssMaxDimension",value:function(e){this.cssMaxWidth=e.width||this.cssMaxWidth,this.cssMaxHeight=e.height||this.cssMaxHeight}},{key:"adjustCanvasDimension",value:function(){var e=this.canvasImage.scale(1),t=e.getBoundingRect(),n=t.width,i=t.height,o=this._calcMaxDimension(n,i);this.setCanvasCssDimension({width:"100%",height:"100%","max-width":o.width+"px","max-height":o.height+"px"}),this.setCanvasBackstoreDimension({width:n,height:i}),this._canvas.centerObject(e)}},{key:"setCanvasCssDimension",value:function(e){this._canvas.setDimensions(e,re)}},{key:"setCanvasBackstoreDimension",value:function(e){this._canvas.setDimensions(e,ae)}},{key:"setImageProperties",value:function(e,t){var n=this.canvasImage;n&&(n.set(e).setCoords(),t&&this._canvas.renderAll())}},{key:"getCanvasElement",value:function(){return this._canvas.getElement()}},{key:"getCanvas",value:function(){return this._canvas}},{key:"getCanvasImage",value:function(){return this.canvasImage}},{key:"getImageName",value:function(){return this.imageName}},{key:"addImageObject",value:function(e){var t=this,n=this._callbackAfterLoadingImageObject.bind(this);return new c.default(function(i){d.default.Image.fromURL(e,function(e){n(e),i(t.createObjectProperties(e))},{crossOrigin:"Anonymous"})})}},{key:"getCenter",value:function(){return this._canvas.getCenter()}},{key:"getCropzoneRect",value:function(){return this.getComponent(G.CROPPER).getCropzoneRect()}},{key:"setCropzoneRect",value:function(e){this.getComponent(G.CROPPER).setCropzoneRect(e)}},{key:"getCroppedImageData",value:function(e){return this.getComponent(G.CROPPER).getCroppedImageData(e)}},{key:"setBrush",value:function(e){var t=this._drawingMode,n=G.FREE_DRAWING;t===q.LINE&&(n=q.LINE),this.getComponent(n).setBrush(e)}},{key:"setDrawingShape",value:function(e,t){this.getComponent(G.SHAPE).setStates(e,t)}},{key:"registerPaths",value:function(e){this.getComponent(G.ICON).registerPaths(e)}},{key:"changeCursor",value:function(e){var t=this.getCanvas();t.defaultCursor=e,t.renderAll()}},{key:"hasFilter",value:function(e){return this.getComponent(G.FILTER).hasFilter(e)}},{key:"setSelectionStyle",value:function(e){J(K.SELECTION_STYLE,e)}},{key:"setObjectProperties",value:function(e,t){var n=this.getObject(e),i=J({},t);return n.set(i),n.setCoords(),this.getCanvas().renderAll(),i}},{key:"getObjectProperties",value:function(e,t){var n=this.getObject(e),i={};return Q(t)?i[t]=n[t]:$(t)?ee(t,function(e){i[e]=n[e]}):te(t,function(e,t){i[t]=n[t]}),i}},{key:"getObjectPosition",value:function(e,t,n){var i=this.getObject(e);return i?i.getPointByOrigin(t,n):null}},{key:"setObjectPosition",value:function(e,t){var n=this.getObject(e),i=t.x,o=t.y,r=t.originX,a=t.originY;if(!n)return!1;var s=n.getPointByOrigin(r,a),l=n.getPointByOrigin("center","center"),c=l.x-s.x,u=l.y-s.y;return n.set({left:i+c,top:o+u}),n.setCoords(),!0}},{key:"getCanvasSize",value:function(){var e=this.getCanvasImage();return{width:e?e.width:0,height:e?e.height:0}}},{key:"_getDrawingModeInstance",value:function(e){return this._drawingModeMap[e]}},{key:"_setCanvasElement",value:function(e){var t=void 0,n=void 0;t=e.jquery?e[0]:e.nodeType?e:document.querySelector(e),"CANVAS"!==t.nodeName.toUpperCase()&&(n=document.createElement("canvas"),t.appendChild(n)),this._canvas=new d.default.Canvas(n,{containerClass:"tui-image-editor-canvas-container", -enableRetinaScaling:!1})}},{key:"_createDrawingModeInstances",value:function(){this._register(this._drawingModeMap,new D.default),this._register(this._drawingModeMap,new R.default),this._register(this._drawingModeMap,new B.default),this._register(this._drawingModeMap,new z.default),this._register(this._drawingModeMap,new H.default)}},{key:"_createComponents",value:function(){this._register(this._componentMap,new f.default(this)),this._register(this._componentMap,new g.default(this)),this._register(this._componentMap,new m.default(this)),this._register(this._componentMap,new y.default(this)),this._register(this._componentMap,new k.default(this)),this._register(this._componentMap,new x.default(this)),this._register(this._componentMap,new C.default(this)),this._register(this._componentMap,new O.default(this)),this._register(this._componentMap,new j.default(this)),this._register(this._componentMap,new P.default(this))}},{key:"_register",value:function(e,t){e[t.getName()]=t}},{key:"_isSameDrawingMode",value:function(e){return this.getDrawingMode()===e}},{key:"_calcMaxDimension",value:function(e,t){var n=this.cssMaxWidth/e,i=this.cssMaxHeight/t,o=Math.min(e,this.cssMaxWidth),r=Math.min(t,this.cssMaxHeight);return n<1&&n-1&&J(n,this._createTextProperties(e,n)),n}},{key:"_createTextProperties",value:function(e){var t=["text","fontFamily","fontSize","fontStyle","textAlign","textDecoration"],n={};return J(n,X.default.getProperties(e,t)),n}},{key:"_addFabricObject",value:function(e){var t=Z(e);return this._objects[t]=e,t}},{key:"_removeFabricObject",value:function(e){delete this._objects[e]}}]),e}();ne.mixin(se),e.exports=se},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n0&&(e=this.blur(e,t.blurradius,t.blurdelta)),h=0;h0)for(d=0;d0&&(f[d]={r:Math.floor(s[d].r/s[d].n),g:Math.floor(s[d].g/s[d].n),b:Math.floor(s[d].b/s[d].n),a:Math.floor(s[d].a/s[d].n)}),s[d].n/ln[i].boundingbox[2]&&(n[i].boundingbox[2]=r-1),a-1n[i].boundingbox[3]&&(n[i].boundingbox[3]=a-1),h=this.pathscan_combined_lookup[e[a][r]][c],e[a][r]=h[0],c=h[1],r+=h[2],a+=h[3],r-1===n[i].points[0].x&&a-1===n[i].points[0].y)if(u=!0,n[i].points.lengtht[2]&&e[3]>t[3]}},{key:"batchpathscan",value:function(e,t){var n=[];for(var i in e)e.hasOwnProperty(i)&&(n[i]=this.pathscan(e[i],t));return n}},{key:"internodes",value:function(e,t){var n=[],i=0,o=0,r=0,a=0,s=0,l=void 0,c=void 0;for(l=0;l0&&(n[l].points[n[l].points.length-1].linesegment=this.getdirection(n[l].points[n[l].points.length-1].x,n[l].points[n[l].points.length-1].y,e[l].points[c].x,e[l].points[c].y)),n[l].points.push({x:e[l].points[c].x,y:e[l].points[c].y,linesegment:this.getdirection(e[l].points[c].x,e[l].points[c].y,(e[l].points[c].x+e[l].points[o].x)/2,(e[l].points[c].y+e[l].points[o].y)/2)})),n[l].points.push({x:(e[l].points[c].x+e[l].points[o].x)/2,y:(e[l].points[c].y+e[l].points[o].y)/2,linesegment:this.getdirection((e[l].points[c].x+e[l].points[o].x)/2,(e[l].points[c].y+e[l].points[o].y)/2,(e[l].points[o].x+e[l].points[r].x)/2,(e[l].points[o].y+e[l].points[r].y)/2)});return n}},{key:"testrightangle",value:function(e,t,n,i,o,r){return e.points[i].x===e.points[t].x&&e.points[i].x===e.points[n].x&&e.points[i].y===e.points[o].y&&e.points[i].y===e.points[r].y||e.points[i].y===e.points[t].y&&e.points[i].y===e.points[n].y&&e.points[i].x===e.points[o].x&&e.points[i].x===e.points[r].x}},{key:"getdirection",value:function(e,t,n,i){var o=8;return o=ei?7:0:e>n?ti?5:4:ti?6:8}},{key:"batchinternodes",value:function(e,t){var n=[];for(var i in e)e.hasOwnProperty(i)&&(n[i]=this.internodes(e[i],t));return n}},{key:"tracepath",value:function(e,t,n){var i=0,o=void 0,r=void 0,a=void 0,s={};for(s.segments=[],s.boundingbox=e.boundingbox,s.holechildren=e.holechildren,s.isholepath=e.isholepath;i0?a:e.points.length}return s}},{key:"fitseq",value:function(e,t,n,i,o){if(o>e.points.length||o<0)return[];var r=i,a=0,s=!0,l=void 0,c=void 0,u=void 0,d=o-i;d<0&&(d+=e.points.length);for(var h=(e.points[o].x-e.points[i].x)/d,f=(e.points[o].y-e.points[i].y)/d,p=(i+1)%e.points.length,g=void 0;p!=o;)g=p-i,g<0&&(g+=e.points.length),l=e.points[i].x+h*g,c=e.points[i].y+f*g,u=(e.points[p].x-l)*(e.points[p].x-l)+(e.points[p].y-c)*(e.points[p].y-c),u>t&&(s=!1),u>a&&(r=p,a=u),p=(p+1)%e.points.length;if(s)return[{type:"L",x1:e.points[i].x,y1:e.points[i].y,x2:e.points[o].x,y2:e.points[o].y}];var v=r;s=!0,a=0;var m=(v-i)/d,b=(1-m)*(1-m),y=2*(1-m)*m,_=m*m,k=(b*e.points[i].x+_*e.points[o].x-e.points[v].x)/-y,w=(b*e.points[i].y+_*e.points[o].y-e.points[v].y)/-y;for(p=i+1;p!=o;)m=(p-i)/d,b=(1-m)*(1-m),y=2*(1-m)*m,_=m*m,l=b*e.points[i].x+y*k+_*e.points[o].x,c=b*e.points[i].y+y*w+_*e.points[o].y,u=(e.points[p].x-l)*(e.points[p].x-l)+(e.points[p].y-c)*(e.points[p].y-c),u>n&&(s=!1),u>a&&(r=p,a=u),p=(p+1)%e.points.length;if(s)return[{type:"Q",x1:e.points[i].x,y1:e.points[i].y,x2:k,y2:w,x3:e.points[o].x,y3:e.points[o].y}];var x=v;return this.fitseq(e,t,n,i,x).concat(this.fitseq(e,t,n,x,o))}},{key:"batchtracepaths",value:function(e,t,n){var i=[];for(var o in e)e.hasOwnProperty(o)&&i.push(this.tracepath(e[o],t,n));return i}},{key:"batchtracelayers",value:function(e,t,n){var i=[];for(var o in e)e.hasOwnProperty(o)&&(i[o]=this.batchtracepaths(e[o],t,n));return i}},{key:"roundtodec",value:function(e,t){return Number(e.toFixed(t))}},{key:"svgpathstring",value:function(e,t,n,i){var o=e.layers[t],r=o[n],a="",s=void 0;if(i.linefilter&&r.segments.length<3)return a;if(a="=0;s--)a+=c.segments[s].type+" ",c.segments[s].hasOwnProperty("x3")&&(a+=c.segments[s].x2*i.scale+" "+c.segments[s].y2*i.scale+" "),a+=c.segments[s].x1*i.scale+" "+c.segments[s].y1*i.scale+" ";else for(a+=c.segments[c.segments.length-1].hasOwnProperty("x3")?"M "+this.roundtodec(c.segments[c.segments.length-1].x3*i.scale)+" "+this.roundtodec(c.segments[c.segments.length-1].y3*i.scale)+" ":"M "+this.roundtodec(c.segments[c.segments.length-1].x2*i.scale)+" "+this.roundtodec(c.segments[c.segments.length-1].y2*i.scale)+" ",s=c.segments.length-1;s>=0;s--)a+=c.segments[s].type+" ",c.segments[s].hasOwnProperty("x3")&&(a+=this.roundtodec(c.segments[s].x2*i.scale)+" "+this.roundtodec(c.segments[s].y2*i.scale)+" "),a+=this.roundtodec(c.segments[s].x1*i.scale)+" "+this.roundtodec(c.segments[s].y1*i.scale)+" ";a+="Z "}if(a+='" />',i.lcpr||i.qcpr){for(s=0;s',a+='',a+='',a+=''),!r.segments[s].hasOwnProperty("x3")&&i.lcpr&&(a+='');for(var l=0;l',a+='',a+='',a+=''),!c.segments[s].hasOwnProperty("x3")&&i.lcpr&&(a+='')}}return a}},{key:"getsvgstring",value:function(e,t){t=this.checkoptions(t);for(var n=e.width*t.scale,i=e.height*t.scale,o="',r=0;r5&&(t=5),n=Math.abs(n),n>1024&&(n=1024);var p=this.gks[t-1];for(o=0;o0&&i+r0&&o+rn&&(f.data[s]=e.data[s],f.data[s+1]=e.data[s+1],f.data[s+2]=e.data[s+2],f.data[s+3]=e.data[s+3]);return f}},{key:"loadImage",value:function(e,t,n){var i=new Image;n&&n.corsenabled&&(i.crossOrigin="Anonymous"),i.src=e,i.onload=function(){var e=document.createElement("canvas");e.width=i.width,e.height=i.height;var n=e.getContext("2d");n.drawImage(i,0,0),t(e)}}},{key:"getImgdata",value:function(e){var t=e.getContext("2d");return t.getImageData(0,0,e.width,e.height)}},{key:"drawLayers",value:function(e,t,n,i){n=n||1;var o=void 0,r=void 0,a=void 0,s=void 0,l=void 0,c=void 0;i?(c=document.getElementById(i),c||(c=document.createElement("div"),c.id=i,document.body.appendChild(c))):(c=document.createElement("div"),document.body.appendChild(c));for(l in e)if(e.hasOwnProperty(l)){o=e[l][0].length,r=e[l].length;var u=document.createElement("canvas");u.width=o*n,u.height=r*n;var d=u.getContext("2d");for(s=0;sl?"right":"left",originY:o>c?"bottom":"top"}}function o(e){return"center"===e.getOriginX()&&"center"===e.getOriginY()}function r(e,t){var n=t.getPointByOrigin("center","center"),o=-t.getAngle(),r=i(n,e,o),a=r.originX,s=r.originY,l=t.getPointByOrigin(a,s),c=t.getLeft()-(n.x-l.x),u=t.getTop()-(n.x-l.y);t.set({originX:a,originY:s,left:c,top:u}),t.setCoords()}function a(e,t){var n=t.startPoint,o=-t.getAngle(),r=i(n,e,o),a=r.originX,s=r.originY;t.setPositionByOrigin(n,a,s)}function s(e){var t=e.type,n=e.scaleX,i=e.scaleY,o=u[t],r=e[o.w]*n,a=e[o.h]*i;if(e.isRegular){var s=Math.max(n,i);r=e[o.w]*s,a=e[o.h]*s}var l={hasControls:!1,hasBorders:!1,scaleX:1,scaleY:1};l[o.w]=r,l[o.h]=a,e.set(l)}function l(e,t){var n=t.type,i=t.strokeWidth,o=t.startPoint,r=c[n],a=u[n],s=!("triangle"!==t.type),l={},d=Math.abs(o.x-e.x)/r,h=Math.abs(o.y-e.y)/r;d>i&&(d-=i/r),h>i&&(h-=i/r),t.isRegular&&(d=h=Math.max(d,h),s&&(h=Math.sqrt(3)/2*d)),l[a.w]=d,l[a.h]=h,t.set(l)}var c={rect:1,circle:2,triangle:1},u={rect:{w:"width",h:"height"},circle:{w:"rx",h:"ry"},triangle:{w:"width",h:"height"}};e.exports={setOrigins:function(e){var t=e.getPointByOrigin("left","top"),n=e.getPointByOrigin("right","top"),i=e.getPointByOrigin("right","bottom"),o=e.getPointByOrigin("left","bottom");e.origins={lt:t,rt:n,rb:i,lb:o}},resize:function(e,t,i){o(e)&&(r(t,e),n(e)),i?s(e,t):l(t,e),a(t,e)},adjustOriginToCenter:function(e){var t=e.getPointByOrigin("center","center"),n=e.getOriginX(),i=e.getOriginY(),o=e.getPointByOrigin(n,i),r=e.getLeft()+(t.x-o.x),a=e.getTop()+(t.y-o.y);e.set({hasControls:!0,hasBorders:!0,originX:"center",originY:"center",left:r,top:a}),e.setCoords()}}},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var r=function(){function e(e,t){for(var n=0;n1?n-1:0),o=1;o1?n-1:0),o=1;on&&(i=t,t=n,n=i),r(t,o(e,n))},keyMirror:function(){for(var e={},t=arguments.length,n=Array(t),o=0;o1&&void 0!==arguments[1]?arguments[1]:"#7e7e7e",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"up";o(this,e);var r=t.getAttribute("title");this._show=!1,this._colorpickerElement=t,this._toggleDirection=i,this._makePickerButtonElement(t,n),this._makePickerLayerElement(t,r),this._color=n,this.picker=c.default.create({container:this.pickerElement,preset:u,color:n}),this._addEvent(t)}return r(e,[{key:"_changeColorElement",value:function(e){e?(this.colorElement.classList.remove("transparent"),this.colorElement.style.backgroundColor=e):(this.colorElement.style.backgroundColor="#fff",this.colorElement.classList.add("transparent"))}},{key:"_makePickerButtonElement",value:function(e,t){e.classList.add("tui-image-editor-button"),this.colorElement=document.createElement("div"),this.colorElement.className="color-picker-value",t?this.colorElement.style.backgroundColor=t:this.colorElement.classList.add("transparent")}},{key:"_makePickerLayerElement",value:function(e,t){var n=document.createElement("label"),i=document.createElement("div");this.pickerControl=document.createElement("div"),this.pickerControl.className="color-picker-control",this.pickerElement=document.createElement("div"),this.pickerElement.className="color-picker",n.innerHTML=t,i.className="triangle",this.pickerControl.appendChild(this.pickerElement),this.pickerControl.appendChild(i),e.appendChild(this.pickerControl),e.appendChild(this.colorElement),e.appendChild(n)}},{key:"_addEvent",value:function(e){var t=this;this.picker.on("selectColor",function(e){t._changeColorElement(e.color),t._color=e.color,t.fire("change",e.color)}),e.addEventListener("click",function(e){var n=e.target,i=n&&t._isElementInColorPickerControl(n);(!i||i&&t._isPaletteButton(n))&&(t._show=!t._show,t.pickerControl.style.display=t._show?"block":"none",t._setPickerControlPosition(),t.fire("changeShow",t)),e.stopPropagation()}),document.body.addEventListener("click",function(){t.hide()})}},{key:"_isPaletteButton",value:function(e){return"tui-colorpicker-palette-button"===e.className}},{key:"_isElementInColorPickerControl",value:function(e){for(var t=e;t!==document.body&&t;){if(t===this.pickerControl)return!0;t=t.parentNode}return!1}},{key:"hide",value:function(){this._show=!1,this.pickerControl.style.display="none"}},{key:"_setPickerControlPosition",value:function(){var e=this.pickerControl.style,t=this._colorpickerElement.clientWidth/2+2,n=this.pickerControl.offsetWidth/2-t,i=(this.pickerControl.offsetHeight+10)*-1;"down"===this._toggleDirection&&(i=30),e.top=i+"px",e.left="-"+n+"px"}},{key:"color",get:function(){return this._color},set:function(e){this._color=e,this._changeColorElement(e)}}]),e}();s.default.CustomEvents.mixin(d),t.default=d},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{};o(this,e),this._value=n.value||0,this.rangeElement=t,this._drawRangeElement(),this.rangeWidth=(0,l.toInteger)(window.getComputedStyle(t,null).width)-12,this._min=n.min||0,this._max=n.max||100,this._absMax=this._min*-1+this._max,this.realTimeEvent=n.realTimeEvent||!1,this._addClickEvent(),this._addDragEvent(),this.value=n.value,this.trigger("change")}return r(e,[{key:"trigger",value:function(e){this.fire(e,this._value)}},{key:"_drawRangeElement",value:function(){this.rangeElement.classList.add("tui-image-editor-range"),this.bar=document.createElement("div"),this.bar.className="tui-image-editor-virtual-range-bar",this.subbar=document.createElement("div"),this.subbar.className="tui-image-editor-virtual-range-subbar",this.pointer=document.createElement("div"),this.pointer.className="tui-image-editor-virtual-range-pointer",this.bar.appendChild(this.subbar),this.bar.appendChild(this.pointer),this.rangeElement.appendChild(this.bar)}},{key:"_addClickEvent",value:function(){var e=this;this.rangeElement.addEventListener("click",function(t){if(t.stopPropagation(),"tui-image-editor-range"===t.target.className){var n=t.offsetX,i=n/e.rangeWidth,o=e._absMax*i+e._min;e.pointer.style.left=i*e.rangeWidth+"px",e.subbar.style.right=(1-i)*e.rangeWidth+"px",e._value=o,e.fire("change",o)}})}},{key:"_addDragEvent",value:function(){var e=this;this.pointer.addEventListener("mousedown",function(t){e.firstPosition=t.screenX,e.firstLeft=(0,l.toInteger)(e.pointer.style.left)||0,e.dragEventHandler={changeAngle:e._changeAngle.bind(e),stopChangingAngle:e._stopChangingAngle.bind(e)},document.addEventListener("mousemove",e.dragEventHandler.changeAngle),document.addEventListener("mouseup",e.dragEventHandler.stopChangingAngle)})}},{key:"_changeAngle",value:function(e){var t=e.screenX,n=t-this.firstPosition,i=this.firstLeft+n;i=i>this.rangeWidth?this.rangeWidth:i,i=i<0?0:i,this.pointer.style.left=i+"px",this.subbar.style.right=this.rangeWidth-i+"px";var o=i/this.rangeWidth,r=this._absMax*o+this._min;this._value=r,this.realTimeEvent&&this.fire("change",r)}},{key:"_stopChangingAngle",value:function(){this.fire("change",this._value),document.removeEventListener("mousemove",this.dragEventHandler.changeAngle),document.removeEventListener("mouseup",this.dragEventHandler.stopChangingAngle)}},{key:"max",set:function(e){this._max=e,this._absMax=this._min*-1+this._max,this.value=this._value},get:function(){return this._max}},{key:"value",get:function(){return this._value},set:function(e){var t=e-this._min,n=t*this.rangeWidth/this._absMax;this.rangeWidth0?i:n)(e)}},function(e,t,n){var i=n(123),o=n(25);e.exports=function(e){return i(o(e))}},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}var o=n(2),r=i(o),a=n(5),s=(0,a.keyMirror)("UN_IMPLEMENTATION","NO_COMPONENT_NAME"),l={UN_IMPLEMENTATION:"Should implement a method: ",NO_COMPONENT_NAME:"Should set a component name"},c={UN_IMPLEMENTATION:function(e){return l.UN_IMPLEMENTATION+e},NO_COMPONENT_NAME:function(){return l.NO_COMPONENT_NAME}};e.exports={types:r.default.extend({},s),create:function(e){e=e.toLowerCase();for(var t=c[e],n=arguments.length,i=Array(n>1?n-1:0),o=1;on;)t.push(arguments[n++]);return v[++g]=function(){s("function"==typeof e?e:Function(e),t)},i(g),g},f=function(e){delete v[e]},"process"==n(19)(d)?i=function(e){d.nextTick(a(b,e,1))}:p?(o=new p,r=o.port2,o.port1.onmessage=y,i=a(r.postMessage,r,1)):u.addEventListener&&"function"==typeof postMessage&&!u.importScripts?(i=function(e){u.postMessage(e+"","*")},u.addEventListener("message",y,!1)):i=m in c("script")?function(e){l.appendChild(c("script"))[m]=function(){l.removeChild(this),b.call(e)}}:function(e){setTimeout(a(b,e,1),0)}),e.exports={set:h,clear:f}},function(e,t,n){var i=n(29),o=Math.min;e.exports=function(e){return e>0?o(i(e),9007199254740991):0}},function(e,t){var n=0,i=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+i).toString(36))}},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(2),r=n(5),a=i(r),s=n(86),l=i(s);t.default={getActions:function(){return{main:this._mainAction(),shape:this._shapeAction(),crop:this._cropAction(),flip:this._flipAction(),rotate:this._rotateAction(),text:this._textAction(),mask:this._maskAction(),draw:this._drawAction(),icon:this._iconAction(),filter:this._filterAction()}},_mainAction:function(){var e=this,t=function(){"crop"===e.ui.submenu&&(e.stopDrawingMode(),e.ui.changeMenu("crop"))};return(0,o.extend)({initLoadImage:function(n,i){return e.loadImageFromURL(n,i).then(function(i){t(),e.ui.initializeImgUrl=n,e.ui.resizeEditor({imageSize:i}),e.clearUndoStack()})},undo:function(){e.isEmptyUndoStack()||(t(),e.undo())},redo:function(){e.isEmptyRedoStack()||(t(),e.redo())},reset:function(){t(),e.loadImageFromURL(e.ui.initializeImgUrl,"resetImage").then(function(n){t(),e.ui.resizeEditor({imageSize:n}),e.clearUndoStack()})},delete:function(){e.ui.changeDeleteButtonEnabled(!1),t(),e.removeActiveObject(),e.activeObjectId=null},deleteAll:function(){t(),e.clearObjects(),e.ui.changeDeleteButtonEnabled(!1),e.ui.changeDeleteAllButtonEnabled(!1)},load:function(n){a.default.isSupportFileApi()||alert("This browser does not support file-api"),e.ui.initializeImgUrl=URL.createObjectURL(n),e.loadImageFromFile(n).then(function(n){t(),e.clearUndoStack(),e.ui.activeMenuEvent(),e.ui.resizeEditor({imageSize:n})}).catch(function(e){return Promise.reject(e)})},download:function(){var t=e.toDataURL(),n=e.getImageName(),i=void 0,o=void 0,r=void 0;a.default.isSupportFileApi()&&window.saveAs?(i=a.default.base64ToBlob(t),o=i.type.split("/")[1],n.split(".").pop()!==o&&(n+="."+o),saveAs(i,n)):(r=window.open(),r.document.body.innerHTML="")}},this._commonAction())},_iconAction:function(){var e=this,t=void 0,n=void 0,i=void 0,r=void 0,a=void 0,s=void 0,c=void 0;this.on({iconCreateResize:function(t){var n=t.moveOriginPointer,o=(n.x-i)/a,l=(n.y-r)/s;e.setObjectPropertiesQuietly(c,{scaleX:Math.abs(2*o),scaleY:Math.abs(2*l)})},iconCreateEnd:function(){e.ui.icon.clearIconType(),e.changeSelectableAll(!0)}});var u=function(o,l){i=l.x,r=l.y,e.addIcon(t,{left:l.x,top:l.y,fill:n}).then(function(e){c=e.id,a=e.width,s=e.height})};return(0,o.extend)({changeColor:function(t){e.activeObjectId&&e.changeIconColor(e.activeObjectId,t)},addIcon:function(i,o){t=i,n=o,e.changeCursor("crosshair"),e.off("mousedown"),e.once("mousedown",u.bind(e))},cancelAddIcon:function(){e.off("mousedown"),e.ui.icon.clearIconType(),e.changeSelectableAll(!0),e.changeCursor("default")},registDefalutIcons:function(t,n){var i={};i[t]=n,e.registerIcons(i)},registCustomIcon:function(t,n){var i=new l.default;i.imageToSVG(t,function(t){var i=t.match(/path[^>]*d="([^"]*)"/),o=i[1],r={};r[n.name]=o,e.registerIcons(r),e.addIcon(n.name,{left:100,top:100})},l.default.tracerDefaultOption())}},this._commonAction())},_drawAction:function(){var e=this;return(0,o.extend)({setDrawMode:function(t,n){e.stopDrawingMode(),"free"===t?e.startDrawingMode("FREE_DRAWING",n):e.startDrawingMode("LINE_DRAWING",n)},setColor:function(t){e.setBrush({color:t})}},this._commonAction())},_maskAction:function(){var e=this;return(0,o.extend)({loadImageFromURL:function(t,n){return e.loadImageFromURL(e.toDataURL(),"FilterImage").then(function(){e.addImageObject(t).then(function(){URL.revokeObjectURL(n)})})},applyFilter:function(){e.applyFilter("mask",{maskObjId:e.activeObjectId})}},this._commonAction())},_textAction:function(){var e=this;return(0,o.extend)({changeTextStyle:function(t){e.activeObjectId&&e.changeTextStyle(e.activeObjectId,t)}},this._commonAction())},_rotateAction:function(){var e=this;return(0,o.extend)({rotate:function(t){e.rotate(t),e.ui.resizeEditor()},setAngle:function(t){e.setAngle(t),e.ui.resizeEditor()}},this._commonAction())},_shapeAction:function(){var e=this;return(0,o.extend)({changeShape:function(t){e.activeObjectId&&e.changeShape(e.activeObjectId,t)},setDrawingShape:function(t){e.setDrawingShape(t)}},this._commonAction())},_cropAction:function(){var e=this;return(0,o.extend)({crop:function(){var t=e.getCropzoneRect();t&&e.crop(t).then(function(){e.stopDrawingMode(),e.ui.resizeEditor(),e.ui.changeMenu("crop")}).catch(function(e){return Promise.reject(e)})},cancel:function(){e.stopDrawingMode(),e.ui.changeMenu("crop")},preset:function(t){switch(t){case"preset-square":e.setCropzoneRect(1);break;case"preset-3-2":e.setCropzoneRect(1.5);break;case"preset-4-3":e.setCropzoneRect(4/3);break;case"preset-5-4":e.setCropzoneRect(5/4);break;case"preset-7-5":e.setCropzoneRect(1.4);break;case"preset-16-9":e.setCropzoneRect(16/9);break;default:e.setCropzoneRect(),e.ui.crop.changeApplyButtonStatus(!1)}}},this._commonAction())},_flipAction:function(){var e=this;return(0,o.extend)({flip:function(t){return e[t]()}},this._commonAction())},_filterAction:function(){var e=this;return(0,o.extend)({applyFilter:function(t,n,i){t?e.applyFilter(n,i):e.hasFilter(n)&&e.removeFilter(n)}},this._commonAction())},setReAction:function(){var e=this;this.on({undoStackChanged:function(t){t?(e.ui.changeUndoButtonStatus(!0),e.ui.changeResetButtonStatus(!0)):(e.ui.changeUndoButtonStatus(!1),e.ui.changeResetButtonStatus(!1)),e.ui.resizeEditor()},redoStackChanged:function(t){t?e.ui.changeRedoButtonStatus(!0):e.ui.changeRedoButtonStatus(!1),e.ui.resizeEditor()},objectActivated:function(t){e.activeObjectId=t.id,e.ui.changeDeleteButtonEnabled(!0),e.ui.changeDeleteAllButtonEnabled(!0),"cropzone"===t.type?e.ui.crop.changeApplyButtonStatus(!0):["rect","circle","triangle"].indexOf(t.type)>-1?(e.stopDrawingMode(),"shape"!==e.ui.submenu&&e.ui.changeMenu("shape",!1,!1),e.ui.shape.setShapeStatus({strokeColor:t.stroke,strokeWidth:t.strokeWidth,fillColor:t.fill}),e.ui.shape.setMaxStrokeValue(Math.min(t.width,t.height))):"path"===t.type||"line"===t.type?"draw"!==e.ui.submenu&&(e.ui.changeMenu("draw",!1,!1),e.ui.draw.changeStandbyMode()):["i-text","text"].indexOf(t.type)>-1?"text"!==e.ui.submenu&&e.ui.changeMenu("text",!1,!1):"icon"===t.type&&(e.stopDrawingMode(),"icon"!==e.ui.submenu&&e.ui.changeMenu("icon",!1,!1),e.ui.icon.setIconPickerColor(t.fill))},addText:function(t){e.addText("Double Click",{position:t.originPosition,styles:{fill:e.ui.text.textColor,fontSize:a.default.toInteger(e.ui.text.fontSize),fontFamily:"Noto Sans"}}).then(function(){e.changeCursor("default")})},addObjectAfter:function(t){["rect","circle","triangle"].indexOf(t.type)>-1&&(e.ui.shape.setMaxStrokeValue(Math.min(t.width,t.height)),e.ui.shape.changeStandbyMode())},objectScaled:function(t){if(["i-text","text"].indexOf(t.type)>-1)e.ui.text.fontSize=a.default.toInteger(t.fontSize);else if(["rect","circle","triangle"].indexOf(t.type)>=0){var n=t.width,i=t.height,o=e.ui.shape.getStrokeValue();nb&&(r.remove(),r.set(this._calcRectDimensionFromPoint(i,o)),t.add(r))}},{key:"_calcRectDimensionFromPoint",value:function(e,t){var n=this.getCanvas(),i=n.getWidth(),o=n.getHeight(),r=this._startX,a=this._startY,s=(0,m.clamp)(e,0,r),l=(0,m.clamp)(t,0,a),c=(0,m.clamp)(e,r,i)-s,u=(0,m.clamp)(t,a,o)-l;return this._withShiftKey&&(c>u?u=c:u>c&&(c=u),r>=e&&(s=r-c),a>=t&&(l=a-u)),{left:s,top:l,width:c,height:u}}},{key:"_onFabricMouseUp",value:function(){var e=this._cropzone,t=this._listeners,n=this.getCanvas();n.setActiveObject(e),n.off({"mouse:move":t.mousemove,"mouse:up":t.mouseup})}},{key:"getCroppedImageData",value:function(e){var t=this.getCanvas(),n=t.contains(this._cropzone);if(!e)return null;n&&this._cropzone.remove();var i={imageName:this.getImageName(),url:t.toDataURL(e)};return n&&t.add(this._cropzone),i}},{key:"getCropzoneRect",value:function(){var e=this._cropzone;return e.isValid()?{left:e.getLeft(),top:e.getTop(),width:e.getWidth(),height:e.getHeight()}:null}},{key:"setCropzoneRect",value:function(e){var t=this.getCanvas(),n=this._cropzone;t.deactivateAll(),t.selection=!1,n.remove(),n.set(e?this._getPresetCropSizePosition(e):y),t.add(n),t.selection=!0,e&&t.setActiveObject(n)}},{key:"_getPresetCropSizePosition",value:function(e){var t=this.getCanvas(),n=t.getWidth(),i=t.getHeight(),o=n>=i?n:i,r=function(e,t){return e>t?t/e:1},a=o*e,s=o,l=r(a,n),u=c.default.map([a,s],function(e){return e*l});a=u[0],s=u[1];var d=r(s,i),h=c.default.map([a,s],function(e){return e*d});return a=h[0],s=h[1],{top:(i-s)/2,left:(n-a)/2,width:a,height:s}}},{key:"_onKeyDown",value:function(e){e.keyCode===v.keyCodes.SHIFT&&(this._withShiftKey=!0)}},{key:"_onKeyUp",value:function(e){e.keyCode===v.keyCodes.SHIFT&&(this._withShiftKey=!1)}}]),t}(f.default);e.exports=_},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=function(){function e(e,t){for(var n=0;n=0,c=n.useDragAddIcon&&l,u=a?n._createIcon(a):null;u||o(y.invalidParameters),u.set(d.default.extend({type:"icon",fill:n._oColor},s,t,n.graphics.controlStyle)),r.add(u).setActiveObject(u),c&&n._addWithDragEvent(r),i(n.graphics.createObjectProperties(u))})}},{key:"_addWithDragEvent",value:function(e){var t=this;e.on({"mouse:move":function(n){e.selection=!1,t.fire(b.ICON_CREATE_RESIZE,{moveOriginPointer:e.getPointer(n.e)})},"mouse:up":function(n){t.fire(b.ICON_CREATE_END,{moveOriginPointer:e.getPointer(n.e)}),e.defaultCursor="default",e.off("mouse:up"),e.off("mouse:move"),e.selection=!0}})}},{key:"registerPaths",value:function(e){var t=this;d.default.forEach(e,function(e,n){t._pathMap[n]=e},this)}},{key:"setColor",value:function(e,t){this._oColor=e,t&&"icon"===t.get("type")&&(t.setFill(this._oColor),this.getCanvas().renderAll())}},{key:"getColor",value:function(e){return e.fill}},{key:"_createIcon",value:function(e){return new c.default.Path(e)}}]),t}(g.default);e.exports=k},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=function(){function e(e,t){for(var n=0;nn},_getColor:function(e,t,n){var i=[0,0,0,0],o=e.data,r=e.width,a=4,s=(r*n+t)*a;return i[0]=o[s],i[1]=o[s+1],i[2]=o[s+2],i[3]=o[s+3],i}});e.exports=a},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}var o=n(2),r=i(o),a=n(6),s=i(a),l=n(5),c="tl",u="tr",d="mt",h="ml",f="mr",p="mb",g="bl",v="br",m=s.default.util.createClass(s.default.Rect,{initialize:function(e,t){e=r.default.extend(e,t),e.type="cropzone",this.callSuper("initialize",e),this.options=e,this.on({moving:this._onMoving,scaling:this._onScaling})},_render:function(e){var t=7,n=7;this.callSuper("_render",e);var i=this.flipX?-1:1,o=this.flipY?-1:1,r=i/this.scaleX,a=o/this.scaleY;e.scale(r,a),this._fillOuterRect(e,"rgba(0, 0, 0, 0.55)"),this.options.lineWidth?(this._fillInnerRect(e),this._strokeBorder(e,"rgb(255, 255, 255)",{lineWidth:this.options.lineWidth})):(this._strokeBorder(e,"rgb(0, 0, 0)",{lineDashWidth:t}),this._strokeBorder(e,"rgb(255, 255, 255)",{lineDashWidth:t,lineDashOffset:n})),e.scale(1/r,1/a)},_fillOuterRect:function(e,t){var n=this._getCoordinates(e),i=n.x,o=n.y;e.save(),e.fillStyle=t,e.beginPath(),e.moveTo(i[0]-1,o[0]-1),e.lineTo(i[3]+1,o[0]-1),e.lineTo(i[3]+1,o[3]+1),e.lineTo(i[0]-1,o[3]+1),e.lineTo(i[0]-1,o[0]-1),e.closePath(),e.moveTo(i[1],o[1]),e.lineTo(i[1],o[2]),e.lineTo(i[2],o[2]),e.lineTo(i[2],o[1]),e.lineTo(i[1],o[1]),e.closePath(),e.fill(),e.restore()},_fillInnerRect:function(e){var t=this._getCoordinates(e),n=t.x,i=t.y,o=this._caculateInnerPosition(n,(n[2]-n[1])/3),r=this._caculateInnerPosition(i,(i[2]-i[1])/3);e.save(),e.strokeStyle="rgba(255, 255, 255, 0.7)",e.lineWidth=this.options.lineWidth,e.beginPath(),e.moveTo(o[0],r[1]),e.lineTo(o[3],r[1]),e.moveTo(o[0],r[2]),e.lineTo(o[3],r[2]),e.moveTo(o[1],r[0]),e.lineTo(o[1],r[3]),e.moveTo(o[2],r[0]),e.lineTo(o[2],r[3]),e.stroke(),e.closePath(),e.restore()},_caculateInnerPosition:function(e,t){var n=[];return n[0]=e[1],n[1]=e[1]+t,n[2]=e[1]+2*t,n[3]=e[2],n},_getCoordinates:function(e){var t=this.getWidth(),n=this.getHeight(),i=t/2,o=n/2,a=this.getLeft(),s=this.getTop(),l=e.canvas;return{x:r.default.map([-(i+a),-i,i,i+(l.width-a-t)],Math.ceil),y:r.default.map([-(o+s),-o,o,o+(l.height-s-n)],Math.ceil)}},_strokeBorder:function(e,t,n){var i=n.lineDashWidth,o=n.lineDashOffset,r=n.lineWidth,a=this.getWidth()/2,s=this.getHeight()/2;e.save(),e.strokeStyle=t,e.setLineDash&&e.setLineDash([i,i]),o&&(e.lineDashOffset=o),r&&(e.lineWidth=r),e.beginPath(),e.moveTo(-a,-s),e.lineTo(a,-s),e.lineTo(a,s),e.lineTo(-a,s),e.lineTo(-a,-s),e.stroke(),e.restore()},_onMoving:function(){var e=this.getLeft(),t=this.getTop(),n=this.getWidth(),i=this.getHeight(),o=this.canvas.getWidth()-n,r=this.canvas.getHeight()-i;this.setLeft((0,l.clamp)(e,0,o)),this.setTop((0,l.clamp)(t,0,r))},_onScaling:function(e){var t=this.canvas.getPointer(e.e),n=this._calcScalingSizeFromPointer(t);this.scale(1).set(n)},_calcScalingSizeFromPointer:function(e){var t=e.x,n=e.y,i=this._calcTopLeftScalingSizeFromPointer(t,n),o=this._calcBottomRightScalingSizeFromPointer(t,n);return this._makeScalingSettings(i,o)},_calcTopLeftScalingSizeFromPointer:function(e,t){var n=this.getHeight()+this.top,i=this.getWidth()+this.left,o=(0,l.clamp)(t,0,n-1),r=(0,l.clamp)(e,0,i-1);return{top:o,left:r,width:i-r,height:n-o}},_calcBottomRightScalingSizeFromPointer:function(e,t){var n=this.canvas,i=n.width,o=n.height,r=this.left,a=this.top;return{width:(0,l.clamp)(e,r+1,i)-r,height:(0,l.clamp)(t,a+1,o)-a}},_makeScalingSettings:function(e,t){var n=e.width,i=e.height,o=t.height,r=t.width,a=e.left,s=e.top,l=void 0;switch(this.__corner){case c:l=e;break;case u:l={width:r,height:i,top:s};break;case g:l={width:n,height:o,left:a};break;case v:l=t;break;case h:l={width:n,left:a};break;case d:l={height:i,top:s};break;case f:l={width:r};break;case p:l={height:o}}return l},isValid:function(){return this.left>=0&&this.top>=0&&this.width>0&&this.height>0}});e.exports=m},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}var o=n(6),r=i(o),a=r.default.util.createClass(r.default.Image.filters.Convolute,{type:"Emboss",initialize:function(){var e=[1,1,1,1,.7,-1,-1,-1,-1];this.matrix=e}});e.exports=a},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}var o=n(6),r=i(o),a=r.default.util.createClass(r.default.Image.filters.Mask,{applyTo:function(e){if(this.mask){var t=e.width,n=e.height,i=this._createCanvasOfMask(t,n),o=e.getContext("2d"),r=i.getContext("2d"),a=o.getImageData(0,0,t,n);this._drawMask(r,e,o),this._mapData(r,a,t,n),o.putImageData(a,0,0)}},_createCanvasOfMask:function(e,t){var n=r.default.util.createCanvasElement();return n.width=e,n.height=t,n},_drawMask:function(e){var t=this.mask,n=t.getElement(),i=t.getLeft(),o=t.getTop(),r=t.getAngle();e.save(),e.translate(i,o),e.rotate(r*Math.PI/180),e.scale(t.scaleX,t.scaleY),e.drawImage(n,-n.width/2,-n.height/2),e.restore()},_mapData:function(e,t,n,i){for(var o=t.data,r=e.getImageData(0,0,n,i).data,a=this.channel,s=t.width*t.height*4,l=0;l1&&void 0!==arguments[1]?arguments[1]:{},i=n.cssMaxWidth,r=n.cssMaxHeight,a=n.useItext,s=void 0!==a&&a,l=n.useDragAddIcon,c=void 0!==l&&l;o(this,e),this.canvasImage=null,this.cssMaxWidth=i||ie,this.cssMaxHeight=r||oe,this.useItext=s,this.useDragAddIcon=c,this.cropSelectionStyle={},this.imageName="",this._objects={},this._canvas=null,this._drawingMode=q.NORMAL,this._drawingModeMap={},this._componentMap={},this._handler={onMouseDown:this._onMouseDown.bind(this),onObjectAdded:this._onObjectAdded.bind(this),onObjectRemoved:this._onObjectRemoved.bind(this),onObjectMoved:this._onObjectMoved.bind(this),onObjectScaled:this._onObjectScaled.bind(this),onObjectSelected:this._onObjectSelected.bind(this),onPathCreated:this._onPathCreated.bind(this),onSelectionCleared:this._onSelectionCleared.bind(this),onSelectionCreated:this._onSelectionCreated.bind(this)},this._setCanvasElement(t),this._createDrawingModeInstances(),this._createComponents(),this._attachCanvasEvents()}return r(e,[{key:"destroy",value:function(){var e=this._canvas.wrapperEl;this._canvas.clear(),e.parentNode.removeChild(e)}},{key:"deactivateAll",value:function(){return this._canvas.deactivateAll(),this}},{key:"renderAll",value:function(){return this._canvas.renderAll(),this}},{key:"add",value:function(e){var t,n=[];$(e)?n=e:n.push(e),(t=this._canvas).add.apply(t,n)}},{key:"contains",value:function(e){return this._canvas.contains(e)}},{key:"getObjects",value:function(){return this._canvas.getObjects().slice()}},{key:"getObject",value:function(e){return this._objects[e]}},{key:"remove",value:function(e){this._canvas.remove(e)}},{key:"removeAll",value:function(e){var t=this._canvas,n=t.getObjects().slice();return t.remove.apply(t,this._canvas.getObjects()),e&&t.clear(),n}},{key:"removeObjectById",value:function(e){var t=[],n=this._canvas,i=this.getObject(e),o=i&&i.isType("group")&&!i.isEmpty();return o?(n.discardActiveGroup(),i.forEachObject(function(e){t.push(e),e.remove()})):n.contains(i)&&(t.push(i),i.remove()),t}},{key:"getObjectId",value:function(e){var t=null;for(t in this._objects)if(this._objects.hasOwnProperty(t)&&e===this._objects[t])return t;return null}},{key:"getActiveObject",value:function(){return this._canvas.getActiveObject()}},{key:"getActiveGroupObject",value:function(){return this._canvas.getActiveGroup()}},{key:"setActiveObject",value:function(e){this._canvas.setActiveObject(e)}},{key:"setCropSelectionStyle",value:function(e){this.cropSelectionStyle=e}},{key:"getComponent",value:function(e){return this._componentMap[e]}},{key:"getDrawingMode",value:function(){return this._drawingMode}},{key:"startDrawingMode",value:function(e,t){if(this._isSameDrawingMode(e))return!0;this.stopDrawingMode();var n=this._getDrawingModeInstance(e);return n&&n.start&&(n.start(this,t),this._drawingMode=e),!!n}},{key:"stopDrawingMode",value:function(){if(!this._isSameDrawingMode(q.NORMAL)){var e=this._getDrawingModeInstance(this.getDrawingMode());e&&e.end&&e.end(this),this._drawingMode=q.NORMAL}}},{key:"toDataURL",value:function(e){return this._canvas&&this._canvas.toDataURL(e)}},{key:"setCanvasImage",value:function(e,t){t&&Z(t),this.imageName=e,this.canvasImage=t}},{key:"setCssMaxDimension",value:function(e){this.cssMaxWidth=e.width||this.cssMaxWidth,this.cssMaxHeight=e.height||this.cssMaxHeight}},{key:"adjustCanvasDimension",value:function(){var e=this.canvasImage.scale(1),t=e.getBoundingRect(),n=t.width,i=t.height,o=this._calcMaxDimension(n,i);this.setCanvasCssDimension({width:"100%",height:"100%","max-width":o.width+"px","max-height":o.height+"px"}),this.setCanvasBackstoreDimension({width:n,height:i}),this._canvas.centerObject(e)}},{key:"setCanvasCssDimension",value:function(e){this._canvas.setDimensions(e,re)}},{key:"setCanvasBackstoreDimension",value:function(e){this._canvas.setDimensions(e,ae)}},{key:"setImageProperties",value:function(e,t){var n=this.canvasImage;n&&(n.set(e).setCoords(),t&&this._canvas.renderAll())}},{key:"getCanvasElement",value:function(){return this._canvas.getElement()}},{key:"getCanvas",value:function(){return this._canvas}},{key:"getCanvasImage",value:function(){return this.canvasImage}},{key:"getImageName",value:function(){return this.imageName}},{key:"addImageObject",value:function(e){var t=this,n=this._callbackAfterLoadingImageObject.bind(this);return new c.default(function(i){d.default.Image.fromURL(e,function(e){n(e),i(t.createObjectProperties(e))},{crossOrigin:"Anonymous"})})}},{key:"getCenter",value:function(){return this._canvas.getCenter()}},{key:"getCropzoneRect",value:function(){return this.getComponent(G.CROPPER).getCropzoneRect()}},{key:"setCropzoneRect",value:function(e){this.getComponent(G.CROPPER).setCropzoneRect(e)}},{key:"getCroppedImageData",value:function(e){return this.getComponent(G.CROPPER).getCroppedImageData(e)}},{key:"setBrush",value:function(e){var t=this._drawingMode,n=G.FREE_DRAWING;t===q.LINE&&(n=q.LINE),this.getComponent(n).setBrush(e)}},{key:"setDrawingShape",value:function(e,t){this.getComponent(G.SHAPE).setStates(e,t)}},{key:"registerPaths",value:function(e){this.getComponent(G.ICON).registerPaths(e)}},{key:"changeCursor",value:function(e){var t=this.getCanvas();t.defaultCursor=e,t.renderAll()}},{key:"hasFilter",value:function(e){return this.getComponent(G.FILTER).hasFilter(e)}},{key:"setSelectionStyle",value:function(e){J(K.SELECTION_STYLE,e)}},{key:"setObjectProperties",value:function(e,t){var n=this.getObject(e),i=J({},t);return n.set(i),n.setCoords(),this.getCanvas().renderAll(),i}},{key:"getObjectProperties",value:function(e,t){var n=this.getObject(e),i={};return Q(t)?i[t]=n[t]:$(t)?ee(t,function(e){i[e]=n[e]}):te(t,function(e,t){i[t]=n[t]}),i}},{key:"getObjectPosition",value:function(e,t,n){var i=this.getObject(e);return i?i.getPointByOrigin(t,n):null}},{key:"setObjectPosition",value:function(e,t){var n=this.getObject(e),i=t.x,o=t.y,r=t.originX,a=t.originY;if(!n)return!1; +var s=n.getPointByOrigin(r,a),l=n.getPointByOrigin("center","center"),c=l.x-s.x,u=l.y-s.y;return n.set({left:i+c,top:o+u}),n.setCoords(),!0}},{key:"getCanvasSize",value:function(){var e=this.getCanvasImage();return{width:e?e.width:0,height:e?e.height:0}}},{key:"_getDrawingModeInstance",value:function(e){return this._drawingModeMap[e]}},{key:"_setCanvasElement",value:function(e){var t=void 0,n=void 0;t=e.nodeType?e:document.querySelector(e),"CANVAS"!==t.nodeName.toUpperCase()&&(n=document.createElement("canvas"),t.appendChild(n)),this._canvas=new d.default.Canvas(n,{containerClass:"tui-image-editor-canvas-container",enableRetinaScaling:!1})}},{key:"_createDrawingModeInstances",value:function(){this._register(this._drawingModeMap,new I.default),this._register(this._drawingModeMap,new R.default),this._register(this._drawingModeMap,new B.default),this._register(this._drawingModeMap,new F.default),this._register(this._drawingModeMap,new H.default)}},{key:"_createComponents",value:function(){this._register(this._componentMap,new f.default(this)),this._register(this._componentMap,new g.default(this)),this._register(this._componentMap,new m.default(this)),this._register(this._componentMap,new y.default(this)),this._register(this._componentMap,new k.default(this)),this._register(this._componentMap,new x.default(this)),this._register(this._componentMap,new C.default(this)),this._register(this._componentMap,new S.default(this)),this._register(this._componentMap,new j.default(this)),this._register(this._componentMap,new P.default(this))}},{key:"_register",value:function(e,t){e[t.getName()]=t}},{key:"_isSameDrawingMode",value:function(e){return this.getDrawingMode()===e}},{key:"_calcMaxDimension",value:function(e,t){var n=this.cssMaxWidth/e,i=this.cssMaxHeight/t,o=Math.min(e,this.cssMaxWidth),r=Math.min(t,this.cssMaxHeight);return n<1&&n-1&&J(n,this._createTextProperties(e,n)),n}},{key:"_createTextProperties",value:function(e){var t=["text","fontFamily","fontSize","fontStyle","textAlign","textDecoration"],n={};return J(n,X.default.getProperties(e,t)),n}},{key:"_addFabricObject",value:function(e){var t=Z(e);return this._objects[t]=e,t}},{key:"_removeFabricObject",value:function(e){delete this._objects[e]}}]),e}();ne.mixin(se),e.exports=se},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n0&&(e=this.blur(e,t.blurradius,t.blurdelta)),h=0;h0)for(d=0;d0&&(f[d]={r:Math.floor(s[d].r/s[d].n),g:Math.floor(s[d].g/s[d].n),b:Math.floor(s[d].b/s[d].n),a:Math.floor(s[d].a/s[d].n)}),s[d].n/ln[i].boundingbox[2]&&(n[i].boundingbox[2]=r-1),a-1n[i].boundingbox[3]&&(n[i].boundingbox[3]=a-1),h=this.pathscan_combined_lookup[e[a][r]][c],e[a][r]=h[0],c=h[1],r+=h[2],a+=h[3],r-1===n[i].points[0].x&&a-1===n[i].points[0].y)if(u=!0,n[i].points.lengtht[2]&&e[3]>t[3]}},{key:"batchpathscan",value:function(e,t){var n=[];for(var i in e)e.hasOwnProperty(i)&&(n[i]=this.pathscan(e[i],t));return n}},{key:"internodes",value:function(e,t){var n=[],i=0,o=0,r=0,a=0,s=0,l=void 0,c=void 0;for(l=0;l0&&(n[l].points[n[l].points.length-1].linesegment=this.getdirection(n[l].points[n[l].points.length-1].x,n[l].points[n[l].points.length-1].y,e[l].points[c].x,e[l].points[c].y)),n[l].points.push({x:e[l].points[c].x,y:e[l].points[c].y,linesegment:this.getdirection(e[l].points[c].x,e[l].points[c].y,(e[l].points[c].x+e[l].points[o].x)/2,(e[l].points[c].y+e[l].points[o].y)/2)})),n[l].points.push({x:(e[l].points[c].x+e[l].points[o].x)/2,y:(e[l].points[c].y+e[l].points[o].y)/2,linesegment:this.getdirection((e[l].points[c].x+e[l].points[o].x)/2,(e[l].points[c].y+e[l].points[o].y)/2,(e[l].points[o].x+e[l].points[r].x)/2,(e[l].points[o].y+e[l].points[r].y)/2)});return n}},{key:"testrightangle",value:function(e,t,n,i,o,r){return e.points[i].x===e.points[t].x&&e.points[i].x===e.points[n].x&&e.points[i].y===e.points[o].y&&e.points[i].y===e.points[r].y||e.points[i].y===e.points[t].y&&e.points[i].y===e.points[n].y&&e.points[i].x===e.points[o].x&&e.points[i].x===e.points[r].x}},{key:"getdirection",value:function(e,t,n,i){var o=8;return o=ei?7:0:e>n?ti?5:4:ti?6:8}},{key:"batchinternodes",value:function(e,t){var n=[];for(var i in e)e.hasOwnProperty(i)&&(n[i]=this.internodes(e[i],t));return n}},{key:"tracepath",value:function(e,t,n){var i=0,o=void 0,r=void 0,a=void 0,s={};for(s.segments=[],s.boundingbox=e.boundingbox,s.holechildren=e.holechildren,s.isholepath=e.isholepath;i0?a:e.points.length}return s}},{key:"fitseq",value:function(e,t,n,i,o){if(o>e.points.length||o<0)return[];var r=i,a=0,s=!0,l=void 0,c=void 0,u=void 0,d=o-i;d<0&&(d+=e.points.length);for(var h=(e.points[o].x-e.points[i].x)/d,f=(e.points[o].y-e.points[i].y)/d,p=(i+1)%e.points.length,g=void 0;p!=o;)g=p-i,g<0&&(g+=e.points.length),l=e.points[i].x+h*g,c=e.points[i].y+f*g,u=(e.points[p].x-l)*(e.points[p].x-l)+(e.points[p].y-c)*(e.points[p].y-c),u>t&&(s=!1),u>a&&(r=p,a=u),p=(p+1)%e.points.length;if(s)return[{type:"L",x1:e.points[i].x,y1:e.points[i].y,x2:e.points[o].x,y2:e.points[o].y}];var v=r;s=!0,a=0;var m=(v-i)/d,b=(1-m)*(1-m),y=2*(1-m)*m,_=m*m,k=(b*e.points[i].x+_*e.points[o].x-e.points[v].x)/-y,w=(b*e.points[i].y+_*e.points[o].y-e.points[v].y)/-y;for(p=i+1;p!=o;)m=(p-i)/d,b=(1-m)*(1-m),y=2*(1-m)*m,_=m*m,l=b*e.points[i].x+y*k+_*e.points[o].x,c=b*e.points[i].y+y*w+_*e.points[o].y,u=(e.points[p].x-l)*(e.points[p].x-l)+(e.points[p].y-c)*(e.points[p].y-c),u>n&&(s=!1),u>a&&(r=p,a=u),p=(p+1)%e.points.length;if(s)return[{type:"Q",x1:e.points[i].x,y1:e.points[i].y,x2:k,y2:w,x3:e.points[o].x,y3:e.points[o].y}];var x=v;return this.fitseq(e,t,n,i,x).concat(this.fitseq(e,t,n,x,o))}},{key:"batchtracepaths",value:function(e,t,n){var i=[];for(var o in e)e.hasOwnProperty(o)&&i.push(this.tracepath(e[o],t,n));return i}},{key:"batchtracelayers",value:function(e,t,n){var i=[];for(var o in e)e.hasOwnProperty(o)&&(i[o]=this.batchtracepaths(e[o],t,n));return i}},{key:"roundtodec",value:function(e,t){return Number(e.toFixed(t))}},{key:"svgpathstring",value:function(e,t,n,i){var o=e.layers[t],r=o[n],a="",s=void 0;if(i.linefilter&&r.segments.length<3)return a;if(a="=0;s--)a+=c.segments[s].type+" ",c.segments[s].hasOwnProperty("x3")&&(a+=c.segments[s].x2*i.scale+" "+c.segments[s].y2*i.scale+" "),a+=c.segments[s].x1*i.scale+" "+c.segments[s].y1*i.scale+" ";else for(a+=c.segments[c.segments.length-1].hasOwnProperty("x3")?"M "+this.roundtodec(c.segments[c.segments.length-1].x3*i.scale)+" "+this.roundtodec(c.segments[c.segments.length-1].y3*i.scale)+" ":"M "+this.roundtodec(c.segments[c.segments.length-1].x2*i.scale)+" "+this.roundtodec(c.segments[c.segments.length-1].y2*i.scale)+" ",s=c.segments.length-1;s>=0;s--)a+=c.segments[s].type+" ",c.segments[s].hasOwnProperty("x3")&&(a+=this.roundtodec(c.segments[s].x2*i.scale)+" "+this.roundtodec(c.segments[s].y2*i.scale)+" "),a+=this.roundtodec(c.segments[s].x1*i.scale)+" "+this.roundtodec(c.segments[s].y1*i.scale)+" ";a+="Z "}if(a+='" />',i.lcpr||i.qcpr){for(s=0;s',a+='',a+='',a+=''),!r.segments[s].hasOwnProperty("x3")&&i.lcpr&&(a+='');for(var l=0;l',a+='',a+='',a+=''),!c.segments[s].hasOwnProperty("x3")&&i.lcpr&&(a+='')}}return a}},{key:"getsvgstring",value:function(e,t){t=this.checkoptions(t);for(var n=e.width*t.scale,i=e.height*t.scale,o="',r=0;r5&&(t=5),n=Math.abs(n),n>1024&&(n=1024);var p=this.gks[t-1];for(o=0;o0&&i+r0&&o+rn&&(f.data[s]=e.data[s],f.data[s+1]=e.data[s+1],f.data[s+2]=e.data[s+2],f.data[s+3]=e.data[s+3]);return f}},{key:"loadImage",value:function(e,t,n){var i=new Image;n&&n.corsenabled&&(i.crossOrigin="Anonymous"),i.src=e,i.onload=function(){var e=document.createElement("canvas");e.width=i.width,e.height=i.height;var n=e.getContext("2d");n.drawImage(i,0,0),t(e)}}},{key:"getImgdata",value:function(e){var t=e.getContext("2d");return t.getImageData(0,0,e.width,e.height)}},{key:"drawLayers",value:function(e,t,n,i){n=n||1;var o=void 0,r=void 0,a=void 0,s=void 0,l=void 0,c=void 0;i?(c=document.getElementById(i),c||(c=document.createElement("div"),c.id=i,document.body.appendChild(c))):(c=document.createElement("div"),document.body.appendChild(c));for(l in e)if(e.hasOwnProperty(l)){o=e[l][0].length,r=e[l].length;var u=document.createElement("canvas");u.width=o*n,u.height=r*n;var d=u.getContext("2d");for(s=0;sl?"right":"left",originY:o>c?"bottom":"top"}}function o(e){return"center"===e.getOriginX()&&"center"===e.getOriginY()}function r(e,t){var n=t.getPointByOrigin("center","center"),o=-t.getAngle(),r=i(n,e,o),a=r.originX,s=r.originY,l=t.getPointByOrigin(a,s),c=t.getLeft()-(n.x-l.x),u=t.getTop()-(n.x-l.y);t.set({originX:a,originY:s,left:c,top:u}),t.setCoords()}function a(e,t){var n=t.startPoint,o=-t.getAngle(),r=i(n,e,o),a=r.originX,s=r.originY;t.setPositionByOrigin(n,a,s)}function s(e){var t=e.type,n=e.scaleX,i=e.scaleY,o=u[t],r=e[o.w]*n,a=e[o.h]*i;if(e.isRegular){var s=Math.max(n,i);r=e[o.w]*s,a=e[o.h]*s}var l={hasControls:!1,hasBorders:!1,scaleX:1,scaleY:1};l[o.w]=r,l[o.h]=a,e.set(l)}function l(e,t){var n=t.type,i=t.strokeWidth,o=t.startPoint,r=c[n],a=u[n],s=!("triangle"!==t.type),l={},d=Math.abs(o.x-e.x)/r,h=Math.abs(o.y-e.y)/r;d>i&&(d-=i/r),h>i&&(h-=i/r),t.isRegular&&(d=h=Math.max(d,h),s&&(h=Math.sqrt(3)/2*d)),l[a.w]=d,l[a.h]=h,t.set(l)}var c={rect:1,circle:2,triangle:1},u={rect:{w:"width",h:"height"},circle:{w:"rx",h:"ry"},triangle:{w:"width",h:"height"}};e.exports={setOrigins:function(e){var t=e.getPointByOrigin("left","top"),n=e.getPointByOrigin("right","top"),i=e.getPointByOrigin("right","bottom"),o=e.getPointByOrigin("left","bottom");e.origins={lt:t,rt:n,rb:i,lb:o}},resize:function(e,t,i){o(e)&&(r(t,e),n(e)),i?s(e,t):l(t,e),a(t,e)},adjustOriginToCenter:function(e){var t=e.getPointByOrigin("center","center"),n=e.getOriginX(),i=e.getOriginY(),o=e.getPointByOrigin(n,i),r=e.getLeft()+(t.x-o.x),a=e.getTop()+(t.y-o.y);e.set({hasControls:!0,hasBorders:!0,originX:"center",originY:"center",left:r,top:a}),e.setCoords()}}},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var r=function(){function e(e,t){for(var n=0;n1?n-1:0),o=1;o0&&void 0!==arguments[0]?arguments[0]:{},t=e.uiSize,n=e.imageSize,i=void 0===n?this.imageSize:n;i!==this.imageSize&&(this.imageSize=i),t&&this._setUiSize(t);var o=this._getEditorDimension(),r=o.width,a=o.height,s=this._editorElement.style,l=this.options.menuBarPosition;s.height=a+"px",s.width=r+"px",this._setEditorPosition(l),this._editorElementWrap.style.bottom="0px",this._editorElementWrap.style.top="0px",this._editorElementWrap.style.left="0px",this._editorElementWrap.style.width="100%";var c=this._selectedElement.classList;"top"===l&&this._selectedElement.offsetWidth0&&void 0!==arguments[0]?arguments[0]:this.options.uiSize,t=this._selectedElement.style;t.width=e.width,t.height=e.height}},{key:"_makeSubMenu",value:function(){var e=this;s.default.forEach(this.options.menu,function(t){var n=L[t.replace(/^[a-z]/,function(e){return e.toUpperCase()})];e._makeMenuElement(t),e._els[t]=e._menuElement.querySelector("#tie-btn-"+t),e[t]=new n(e._subMenuElement,{locale:e._locale,iconStyle:e.theme.getStyle("submenu.icon"),menuBarPosition:e.options.menuBarPosition})})}},{key:"_makeUiElement",value:function(e){var t=void 0;window.snippet=s.default,t=e.jquery?e[0]:e.nodeType?e:document.querySelector(e);var n=c.default.getSelector(t);t.classList.add("tui-image-editor-container"),t.innerHTML=(0,f.default)({locale:this._locale,biImage:this.theme.getStyle("common.bi"),iconStyle:this.theme.getStyle("menu.icon"),loadButtonStyle:this.theme.getStyle("loadButton"),downloadButtonStyle:this.theme.getStyle("downloadButton")})+(0,d.default)({locale:this._locale,biImage:this.theme.getStyle("common.bi"),commonStyle:this.theme.getStyle("common"),headerStyle:this.theme.getStyle("header"),loadButtonStyle:this.theme.getStyle("loadButton"),downloadButtonStyle:this.theme.getStyle("downloadButton"),submenuStyle:this.theme.getStyle("submenu")}),this._selectedElement=t,this._selectedElement.classList.add(this.options.menuBarPosition),this._mainElement=n(".tui-image-editor-main"),this._editorElementWrap=n(".tui-image-editor-wrap"),this._editorElement=n(".tui-image-editor"),this._menuElement=n(".tui-image-editor-menu"),this._subMenuElement=n(".tui-image-editor-submenu")}},{key:"_makeMenuElement",value:function(e){var t=document.createElement("li"),n=this.theme.getStyle("menu.icon"),i=n.normal,o=n.active,r=n.hover,a='\n \n \n \n \n \n ';t.id="tie-btn-"+e,t.className="tui-image-editor-item normal",t.title=this._locale.localize(e.replace(/^[a-z]/g,function(e){return e.toUpperCase()})),t.innerHTML=a,this._menuElement.appendChild(t)}},{key:"_addHelpActionEvent",value:function(e){var t=this;this._els[e].addEventListener("click",function(){t._actions.main[e]()})}},{key:"_addDownloadEvent",value:function(){var e=this;s.default.forEach(this._els.download,function(t){t.addEventListener("click",function(){e._actions.main.download()})})}},{key:"_addLoadEvent",value:function(){var e=this;s.default.forEach(this._els.load,function(t){t.addEventListener("change",function(t){e._actions.main.load(t.target.files[0])})})}},{key:"_addMenuEvent",value:function(e){var t=this;this._els[e].addEventListener("click",function(){t.changeMenu(e)})}},{key:"_addSubMenuEvent",value:function(e){this[e].addEvent(this._actions[e])}},{key:"getEditorArea",value:function(){return this._editorElement}},{key:"activeMenuEvent",value:function(){var e=this;this._initMenuEvent||(this._addHelpActionEvent("undo"),this._addHelpActionEvent("redo"),this._addHelpActionEvent("reset"),this._addHelpActionEvent("delete"),this._addHelpActionEvent("deleteAll"),this._addDownloadEvent(),s.default.forEach(this.options.menu,function(t){e._addMenuEvent(t),e._addSubMenuEvent(t)}),this._initMenu(),this._initMenuEvent=!0)}},{key:"initCanvas",value:function(){var e=this,t=this._getLoadImage();t.path&&this._actions.main.initLoadImage(t.path,t.name).then(function(){e.activeMenuEvent()}),this._addLoadEvent();var n=document.createElement("div");n.className="tui-image-editor-grid-visual";var i='\n \n \n \n
';n.innerHTML=i,this._editorContainerElement=this._editorElement.querySelector(".tui-image-editor-canvas-container"),this._editorContainerElement.appendChild(n)}},{key:"_getLoadImage",value:function(){return this.options.loadImage}},{key:"changeMenu",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];this._submenuChangeTransection||(this._submenuChangeTransection=!0,this._changeMenu(e,t,n),this._submenuChangeTransection=!1)}},{key:"_changeMenu",value:function(e,t,n){this.submenu&&(this._els[this.submenu].classList.remove("active"),this._mainElement.classList.remove("tui-image-editor-menu-"+this.submenu),n&&this._actions.main.discardSelection(),this._actions.main.changeSelectableAll(!0),this[this.submenu].changeStandbyMode()),this.submenu===e&&t?this.submenu=null:(this._els[e].classList.add("active"),this._mainElement.classList.add("tui-image-editor-menu-"+e),this.submenu=e,this[this.submenu].changeStartMode()),this.resizeEditor()}},{key:"_initMenu",value:function(){if(this.options.initMenu){var e=document.createEvent("MouseEvents");e.initEvent("click",!0,!1),this._els[this.options.initMenu].dispatchEvent(e),this.icon&&this.icon.registDefaultIcon()}}},{key:"_getEditorDimension",value:function(){var e=parseFloat(this._editorContainerElement.style.maxHeight),t=this.imageSize.newHeight>e?e:this.imageSize.newHeight,n=parseFloat(this._editorContainerElement.style.maxWidth),i=this.imageSize.newWidth>n?n:this.imageSize.newWidth;return{width:i,height:t}}},{key:"_setEditorPosition",value:function(e){var t=this._getEditorDimension(),n=t.width,i=t.height,o=this._editorElement.style,r=0,a=0;this.submenu&&("bottom"===e?r=i>this._editorElementWrap.scrollHeight-150?(i-this._editorElementWrap.scrollHeight)/2:-75:"top"===e?r=i>this._editorElementWrap.offsetHeight-150?75-(i-(this._editorElementWrap.offsetHeight-150))/2:75:"left"===e?a=n>this._editorElementWrap.offsetWidth-248?124-(n-(this._editorElementWrap.offsetWidth-248))/2:124:"right"===e&&(a=n>this._editorElementWrap.scrollWidth-248?(n-this._editorElementWrap.scrollWidth)/2:-124)),o.top=r+"px",o.left=a+"px"}}]),e}();t.default=N},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:this.defaultPresetButton;c.default.forEach([].slice.call(this._els.preset.querySelectorAll(".preset")),function(e){e.classList.remove("active")}),e&&e.classList.add("active")}}]),t}(d.default);t.default=p},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;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
\n \n"}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.locale,n=e.biImage,i=e.commonStyle,o=e.headerStyle,r=e.loadButtonStyle,a=e.downloadButtonStyle,s=e.submenuStyle;return'\n
\n
\n \n
\n \n \n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n'}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.subMenuLabelActive,n=e.subMenuLabelNormal,i=e.subMenuRangeTitle,o=e.submenuPartitionVertical,r=e.submenuPartitionHorizontal,a=e.submenuCheckbox,s=e.submenuRangePointer,l=e.submenuRangeValue,c=e.submenuColorpickerTitle,u=e.submenuColorpickerButton,d=e.submenuRangeBar,h=e.submenuRangeSubbar,f=e.submenuDisabledRangePointer,p=e.submenuDisabledRangeBar,g=e.submenuDisabledRangeSubbar,v=e.submenuIconSize,m=e.menuIconSize,b=e.biSize;return'\n #tie-icon-add-button.icon-bubble .tui-image-editor-button[data-icontype="icon-bubble"] label,\n #tie-icon-add-button.icon-heart .tui-image-editor-button[data-icontype="icon-heart"] label,\n #tie-icon-add-button.icon-location .tui-image-editor-button[data-icontype="icon-location"] label,\n #tie-icon-add-button.icon-polygon .tui-image-editor-button[data-icontype="icon-polygon"] label,\n #tie-icon-add-button.icon-star .tui-image-editor-button[data-icontype="icon-star"] label,\n #tie-icon-add-button.icon-arrow-3 .tui-image-editor-button[data-icontype="icon-arrow-3"] label,\n #tie-icon-add-button.icon-arrow-2 .tui-image-editor-button[data-icontype="icon-arrow-2"] label,\n #tie-icon-add-button.icon-arrow .tui-image-editor-button[data-icontype="icon-arrow"] label,\n #tie-icon-add-button.icon-bubble .tui-image-editor-button[data-icontype="icon-bubble"] label,\n #tie-draw-line-select-button.line .tui-image-editor-button.line label,\n #tie-draw-line-select-button.free .tui-image-editor-button.free label,\n #tie-flip-button.flipX .tui-image-editor-button.flipX label,\n #tie-flip-button.flipY .tui-image-editor-button.flipY label,\n #tie-flip-button.resetFlip .tui-image-editor-button.resetFlip label,\n #tie-crop-button .tui-image-editor-button.apply.active label,\n #tie-crop-preset-button .tui-image-editor-button.preset.active label,\n #tie-shape-button.rect .tui-image-editor-button.rect label,\n #tie-shape-button.circle .tui-image-editor-button.circle label,\n #tie-shape-button.triangle .tui-image-editor-button.triangle label,\n #tie-text-effect-button .tui-image-editor-button.active label,\n #tie-text-align-button.left .tui-image-editor-button.left label,\n #tie-text-align-button.center .tui-image-editor-button.center label,\n #tie-text-align-button.right .tui-image-editor-button.right label,\n #tie-mask-apply.apply.active .tui-image-editor-button.apply label,\n .tui-image-editor-container .tui-image-editor-submenu .tui-image-editor-button:hover > label,\n .tui-image-editor-container .tui-image-editor-checkbox input + label {\n '+t+"\n }\n .tui-image-editor-container .tui-image-editor-submenu .tui-image-editor-button > label,\n .tui-image-editor-container .tui-image-editor-range-wrap.tui-image-editor-newline.short label {\n "+n+"\n }\n .tui-image-editor-container .tui-image-editor-range-wrap label {\n "+i+"\n }\n .tui-image-editor-container .tui-image-editor-partition > div {\n "+o+"\n }\n .tui-image-editor-container.left .tui-image-editor-submenu .tui-image-editor-partition > div,\n .tui-image-editor-container.right .tui-image-editor-submenu .tui-image-editor-partition > div {\n "+r+"\n }\n .tui-image-editor-container .tui-image-editor-checkbox input + label:before {\n "+a+"\n }\n .tui-image-editor-container .tui-image-editor-checkbox input:checked + label:before {\n border: 0;\n }\n .tui-image-editor-container .tui-image-editor-virtual-range-pointer {\n "+s+"\n }\n .tui-image-editor-container .tui-image-editor-virtual-range-bar {\n "+d+"\n }\n .tui-image-editor-container .tui-image-editor-virtual-range-subbar {\n "+h+"\n }\n .tui-image-editor-container .tui-image-editor-disabled .tui-image-editor-virtual-range-pointer {\n "+f+"\n }\n .tui-image-editor-container .tui-image-editor-disabled .tui-image-editor-virtual-range-subbar {\n "+g+"\n }\n .tui-image-editor-container .tui-image-editor-disabled .tui-image-editor-virtual-range-bar {\n "+p+"\n }\n .tui-image-editor-container .tui-image-editor-range-value {\n "+l+"\n }\n .tui-image-editor-container .tui-image-editor-submenu .tui-image-editor-button .color-picker-value + label {\n "+c+"\n }\n .tui-image-editor-container .tui-image-editor-submenu .tui-image-editor-button .color-picker-value {\n "+u+"\n }\n .tui-image-editor-container .svg_ic-menu {\n "+m+"\n }\n .tui-image-editor-container .svg_ic-submenu {\n "+v+"\n }\n .tui-image-editor-container .tui-image-editor-controls-logo > img,\n .tui-image-editor-container .tui-image-editor-header-logo > img {\n "+b+"\n }\n\n"}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.locale,n=e.iconStyle,i=n.normal,o=n.active;return'\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 \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"}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.locale,n=e.iconStyle,i=n.normal,o=n.active;return'\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'}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.locale;return'\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 \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
    \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'}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{ -value:!0}),t.default=function(e){var t=e.locale,n=e.iconStyle,i=n.normal,o=n.active;return'\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"}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.locale,n=e.iconStyle,i=n.normal,o=n.active;return'\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
    \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
    \n \n
    \n
  • \n
  • \n
    \n
  • \n
  • \n
    \n
  • \n
\n'}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.locale,n=e.iconStyle,i=n.normal,o=n.active;return'\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"}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.locale,n=e.iconStyle,i=n.normal,o=n.active;return'\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'}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.locale,n=e.iconStyle,i=n.normal,o=n.active;return'\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'}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.locale,n=e.iconStyle,i=n.normal,o=n.active;return'\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
    \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'}},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n-1&&"none"!==e&&(e="url("+e+")"),n.push(t._toUnderScore(i)+": "+e)}),n.join(";")}},{key:"_toUnderScore",value:function(e){return e.replace(/([A-Z])/g,function(e,t){return"-"+t.toLowerCase()})}}]),e}();t.default=h},function(e,t){e.exports=function(){}},function(e,t){e.exports=function(e,t,n,i){if(!(e instanceof t)||void 0!==i&&i in e)throw TypeError(n+": incorrect invocation!");return e}},function(e,t,n){var i=n(30),o=n(42),r=n(140);e.exports=function(e){return function(t,n,a){var s,l=i(t),c=o(l.length),u=r(a,c);if(e&&n!=n){for(;c>u;)if(s=l[u++],s!=s)return!0}else for(;c>u;u++)if((e||u in l)&&l[u]===n)return e||u||0;return!e&&-1}}},function(e,t,n){var i=n(20),o=n(125),r=n(124),a=n(11),s=n(42),l=n(143),c={},u={},t=e.exports=function(e,t,n,d,h){var f,p,g,v,m=h?function(){return e}:l(e),b=i(n,d,t?2:1),y=0;if("function"!=typeof m)throw TypeError(e+" is not iterable!");if(r(m)){for(f=s(e.length);f>y;y++)if(v=t?b(a(p=e[y])[0],p[1]):b(e[y]),v===c||v===u)return v}else for(g=m.call(e);!(p=g.next()).done;)if(v=o(g,b,p.value,t),v===c||v===u)return v};t.BREAK=c,t.RETURN=u},function(e,t,n){e.exports=!n(17)&&!n(35)(function(){return 7!=Object.defineProperty(n(26)("div"),"a",{get:function(){return 7}}).a})},function(e,t){e.exports=function(e,t,n){var i=void 0===n;switch(t.length){case 0:return i?e():e.call(n);case 1:return i?e(t[0]):e.call(n,t[0]);case 2:return i?e(t[0],t[1]):e.call(n,t[0],t[1]);case 3:return i?e(t[0],t[1],t[2]):e.call(n,t[0],t[1],t[2]);case 4:return i?e(t[0],t[1],t[2],t[3]):e.call(n,t[0],t[1],t[2],t[3])}return e.apply(n,t)}},function(e,t,n){var i=n(19);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==i(e)?e.split(""):Object(e)}},function(e,t,n){var i=n(18),o=n(7)("iterator"),r=Array.prototype;e.exports=function(e){return void 0!==e&&(i.Array===e||r[o]===e)}},function(e,t,n){var i=n(11);e.exports=function(e,t,n,o){try{return o?t(i(n)[0],n[1]):t(n)}catch(t){var r=e.return;throw void 0!==r&&i(r.call(e)),t}}},function(e,t,n){"use strict";var i=n(130),o=n(39),r=n(27),a={};n(12)(a,n(7)("iterator"),function(){return this}),e.exports=function(e,t,n){e.prototype=i(a,{next:o(1,n)}),r(e,t+" Iterator")}},function(e,t,n){var i=n(7)("iterator"),o=!1;try{var r=[7][i]();r.return=function(){o=!0},Array.from(r,function(){throw 2})}catch(e){}e.exports=function(e,t){if(!t&&!o)return!1;var n=!1;try{var r=[7],a=r[i]();a.next=function(){return{done:n=!0}},r[i]=function(){return a},e(r)}catch(e){}return n}},function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},function(e,t,n){var i=n(9),o=n(41).set,r=i.MutationObserver||i.WebKitMutationObserver,a=i.process,s=i.Promise,l="process"==n(19)(a);e.exports=function(){var e,t,n,c=function(){var i,o;for(l&&(i=a.domain)&&i.exit();e;){o=e.fn,e=e.next;try{o()}catch(i){throw e?n():t=void 0,i}}t=void 0,i&&i.enter()};if(l)n=function(){a.nextTick(c)};else if(r){var u=!0,d=document.createTextNode("");new r(c).observe(d,{characterData:!0}),n=function(){d.data=u=!u}}else if(s&&s.resolve){var h=s.resolve();n=function(){h.then(c)}}else n=function(){o.call(i,c)};return function(i){var o={fn:i,next:void 0};t&&(t.next=o),e||(e=o,n()),t=o}}},function(e,t,n){var i=n(11),o=n(131),r=n(33),a=n(28)("IE_PROTO"),s=function(){},l="prototype",c=function(){var e,t=n(26)("iframe"),i=r.length,o="<",a=">";for(t.style.display="none",n(36).appendChild(t),t.src="javascript:",e=t.contentWindow.document,e.open(),e.write(o+"script"+a+"document.F=Object"+o+"/script"+a),e.close(),c=e.F;i--;)delete c[l][r[i]];return c()};e.exports=Object.create||function(e,t){var n;return null!==e?(s[l]=i(e),n=new s,s[l]=null,n[a]=e):n=c(),void 0===t?n:o(n,t)}},function(e,t,n){var i=n(23),o=n(11),r=n(134);e.exports=n(17)?Object.defineProperties:function(e,t){o(e);for(var n,a=r(t),s=a.length,l=0;s>l;)i.f(e,n=a[l++],t[n]);return e}},function(e,t,n){var i=n(21),o=n(141),r=n(28)("IE_PROTO"),a=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=o(e),i(e,r)?e[r]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?a:null}},function(e,t,n){var i=n(21),o=n(30),r=n(119)(!1),a=n(28)("IE_PROTO");e.exports=function(e,t){var n,s=o(e),l=0,c=[];for(n in s)n!=a&&i(s,n)&&c.push(n);for(;t.length>l;)i(s,n=t[l++])&&(~r(c,n)||c.push(n));return c}},function(e,t,n){var i=n(133),o=n(33);e.exports=Object.keys||function(e){return i(e,o)}},function(e,t,n){var i=n(12);e.exports=function(e,t,n){for(var o in t)n&&e[o]?e[o]=t[o]:i(e,o,t[o]);return e}},function(e,t,n){e.exports=n(12)},function(e,t,n){"use strict";var i=n(9),o=n(16),r=n(23),a=n(17),s=n(7)("species");e.exports=function(e){var t="function"==typeof o[e]?o[e]:i[e];a&&t&&!t[s]&&r.f(t,s,{configurable:!0,get:function(){return this}})}},function(e,t,n){var i=n(11),o=n(24),r=n(7)("species");e.exports=function(e,t){var n,a=i(e).constructor;return void 0===a||void 0==(n=i(a)[r])?t:o(n)}},function(e,t,n){var i=n(29),o=n(25);e.exports=function(e){return function(t,n){var r,a,s=String(o(t)),l=i(n),c=s.length;return l<0||l>=c?e?"":void 0:(r=s.charCodeAt(l),r<55296||r>56319||l+1===c||(a=s.charCodeAt(l+1))<56320||a>57343?e?s.charAt(l):r:e?s.slice(l,l+2):(r-55296<<10)+(a-56320)+65536)}}},function(e,t,n){var i=n(29),o=Math.max,r=Math.min;e.exports=function(e,t){return e=i(e),e<0?o(e+t,0):r(e,t)}},function(e,t,n){var i=n(25);e.exports=function(e){return Object(i(e))}},function(e,t,n){var i=n(22);e.exports=function(e,t){if(!i(e))return e;var n,o;if(t&&"function"==typeof(n=e.toString)&&!i(o=n.call(e)))return o;if("function"==typeof(n=e.valueOf)&&!i(o=n.call(e)))return o;if(!t&&"function"==typeof(n=e.toString)&&!i(o=n.call(e)))return o;throw TypeError("Can't convert object to primitive value"); -}},function(e,t,n){var i=n(32),o=n(7)("iterator"),r=n(18);e.exports=n(16).getIteratorMethod=function(e){if(void 0!=e)return e[o]||e["@@iterator"]||r[i(e)]}},function(e,t,n){"use strict";var i=n(117),o=n(128),r=n(18),a=n(30);e.exports=n(37)(Array,"Array",function(e,t){this._t=a(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,o(1)):"keys"==t?o(0,n):"values"==t?o(0,e[n]):o(0,[n,e[n]])},"values"),r.Arguments=r.Array,i("keys"),i("values"),i("entries")},function(e,t){},function(e,t,n){"use strict";var i,o,r,a=n(38),s=n(9),l=n(20),c=n(32),u=n(34),d=n(22),h=n(24),f=n(118),p=n(120),g=n(138),v=n(41).set,m=n(129)(),b="Promise",y=s.TypeError,_=s.process,k=s[b],_=s.process,w="process"==c(_),x=function(){},E=!!function(){try{var e=k.resolve(1),t=(e.constructor={})[n(7)("species")]=function(e){e(x,x)};return(w||"function"==typeof PromiseRejectionEvent)&&e.then(x)instanceof t}catch(e){}}(),C=function(e,t){return e===t||e===k&&t===r},S=function(e){var t;return!(!d(e)||"function"!=typeof(t=e.then))&&t},O=function(e){return C(k,e)?new M(e):new o(e)},M=o=function(e){var t,n;this.promise=new e(function(e,i){if(void 0!==t||void 0!==n)throw y("Bad Promise constructor");t=e,n=i}),this.resolve=h(t),this.reject=h(n)},j=function(e){try{e()}catch(e){return{error:e}}},T=function(e,t){if(!e._n){e._n=!0;var n=e._c;m(function(){for(var i=e._v,o=1==e._s,r=0,a=function(t){var n,r,a=o?t.ok:t.fail,s=t.resolve,l=t.reject,c=t.domain;try{a?(o||(2==e._h&&D(e),e._h=1),a===!0?n=i:(c&&c.enter(),n=a(i),c&&c.exit()),n===t.promise?l(y("Promise-chain cycle")):(r=S(n))?r.call(n,s,l):s(n)):l(i)}catch(e){l(e)}};n.length>r;)a(n[r++]);e._c=[],e._n=!1,t&&!e._h&&P(e)})}},P=function(e){v.call(s,function(){var t,n,i,o=e._v;if(A(e)&&(t=j(function(){w?_.emit("unhandledRejection",o,e):(n=s.onunhandledrejection)?n({promise:e,reason:o}):(i=s.console)&&i.error&&i.error("Unhandled promise rejection",o)}),e._h=w||A(e)?2:1),e._a=void 0,t)throw t.error})},A=function(e){if(1==e._h)return!1;for(var t,n=e._a||e._c,i=0;n.length>i;)if(t=n[i++],t.fail||!A(t.promise))return!1;return!0},D=function(e){v.call(s,function(){var t;w?_.emit("rejectionHandled",e):(t=s.onrejectionhandled)&&t({promise:e,reason:e._v})})},I=function(e){var t=this;t._d||(t._d=!0,t=t._w||t,t._v=e,t._s=2,t._a||(t._a=t._c.slice()),T(t,!0))},R=function(e){var t,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===e)throw y("Promise can't be resolved itself");(t=S(e))?m(function(){var i={_w:n,_d:!1};try{t.call(e,l(R,i,1),l(I,i,1))}catch(e){I.call(i,e)}}):(n._v=e,n._s=1,T(n,!1))}catch(e){I.call({_w:n,_d:!1},e)}}};E||(k=function(e){f(this,k,b,"_h"),h(e),i.call(this);try{e(l(R,this,1),l(I,this,1))}catch(e){I.call(this,e)}},i=function(e){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},i.prototype=n(135)(k.prototype,{then:function(e,t){var n=O(g(this,k));return n.ok="function"!=typeof e||e,n.fail="function"==typeof t&&t,n.domain=w?_.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&T(this,!1),n.promise},catch:function(e){return this.then(void 0,e)}}),M=function(){var e=new i;this.promise=e,this.resolve=l(R,e,1),this.reject=l(I,e,1)}),u(u.G+u.W+u.F*!E,{Promise:k}),n(27)(k,b),n(137)(b),r=n(16)[b],u(u.S+u.F*!E,b,{reject:function(e){var t=O(this),n=t.reject;return n(e),t.promise}}),u(u.S+u.F*(a||!E),b,{resolve:function(e){if(e instanceof k&&C(e.constructor,this))return e;var t=O(this),n=t.resolve;return n(e),t.promise}}),u(u.S+u.F*!(E&&n(127)(function(e){k.all(e).catch(x)})),b,{all:function(e){var t=this,n=O(t),i=n.resolve,o=n.reject,r=j(function(){var n=[],r=0,a=1;p(e,!1,function(e){var s=r++,l=!1;n.push(void 0),a++,t.resolve(e).then(function(e){l||(l=!0,n[s]=e,--a||i(n))},o)}),--a||i(n)});return r&&o(r.error),n.promise},race:function(e){var t=this,n=O(t),i=n.reject,o=j(function(){p(e,!1,function(e){t.resolve(e).then(n.resolve,i)})});return o&&i(o.error),n.promise}})},function(e,t,n){"use strict";var i=n(139)(!0);n(37)(String,"String",function(e){this._t=String(e),this._i=0},function(){var e,t=this._t,n=this._i;return n>=t.length?{value:void 0,done:!0}:(e=i(t,n),this._i+=e.length,{value:e,done:!1})})},function(e,t,n){n(144);for(var i=n(9),o=n(12),r=n(18),a=n(7)("toStringTag"),s=["NodeList","DOMTokenList","MediaList","StyleSheetList","CSSRuleList"],l=0;l<5;l++){var c=s[l],u=i[c],d=u&&u.prototype;d&&!d[a]&&o(d,a,c),r[c]=r.Array}},function(e,t){},function(e,t,n){/*! +function(){if("undefined"!=typeof window&&window.addEventListener){var e,t,n=Object.create(null),i=function(){clearTimeout(t),t=setTimeout(e,100)},o=function(){},r=function(){var e;window.addEventListener("resize",i,!1),window.addEventListener("orientationchange",i,!1),window.MutationObserver?(e=new MutationObserver(i),e.observe(document.documentElement,{childList:!0,subtree:!0,attributes:!0}),o=function(){try{e.disconnect(),window.removeEventListener("resize",i,!1),window.removeEventListener("orientationchange",i,!1)}catch(e){}}):(document.documentElement.addEventListener("DOMSubtreeModified",i,!1),o=function(){document.documentElement.removeEventListener("DOMSubtreeModified",i,!1),window.removeEventListener("resize",i,!1),window.removeEventListener("orientationchange",i,!1)})},a=function(e){function t(e){var t;return void 0!==e.protocol?t=e:(t=document.createElement("a"),t.href=e),t.protocol.replace(/:/g,"")+t.host}var n,i,o;return window.XMLHttpRequest&&(n=new XMLHttpRequest,i=t(location),o=t(e),n=void 0===n.withCredentials&&""!==o&&o!==i?XDomainRequest||void 0:XMLHttpRequest),n},s="http://www.w3.org/1999/xlink";e=function(){function e(){_-=1,0===_&&(o(),r())}function t(e){return function(){n[e.base]!==!0&&(e.useEl.setAttributeNS(s,"xlink:href","#"+e.hash),e.useEl.hasAttribute("href")&&e.useEl.setAttribute("href","#"+e.hash))}}function i(t){return function(){var n,i=document.body,o=document.createElement("x");t.onload=null,o.innerHTML=t.responseText,n=o.getElementsByTagName("svg")[0],n&&(n.setAttribute("aria-hidden","true"),n.style.position="absolute",n.style.width=0,n.style.height=0,n.style.overflow="hidden",i.insertBefore(n,i.firstChild)),e()}}function l(t){return function(){t.onerror=null,t.ontimeout=null,e()}}var c,u,d,h,f,p,g,v,m,b,y="",_=0;for(o(),m=document.getElementsByTagName("use"),f=0;f0&&void 0!==arguments[0]?arguments[0]:{},t=e.uiSize,n=e.imageSize,i=void 0===n?this.imageSize:n;i!==this.imageSize&&(this.imageSize=i),t&&this._setUiSize(t);var o=this._getEditorDimension(),r=o.width,a=o.height,s=this._editorElement.style,l=this.options.menuBarPosition;s.height=a+"px",s.width=r+"px",this._setEditorPosition(l),this._editorElementWrap.style.bottom="0px",this._editorElementWrap.style.top="0px",this._editorElementWrap.style.left="0px",this._editorElementWrap.style.width="100%";var c=this._selectedElement.classList;"top"===l&&this._selectedElement.offsetWidth0&&void 0!==arguments[0]?arguments[0]:this.options.uiSize,t=this._selectedElement.style;t.width=e.width,t.height=e.height}},{key:"_makeSubMenu",value:function(){var e=this;s.default.forEach(this.options.menu,function(t){var n=L[t.replace(/^[a-z]/,function(e){return e.toUpperCase()})];e._makeMenuElement(t),e._els[t]=e._menuElement.querySelector("#tie-btn-"+t),e[t]=new n(e._subMenuElement,{locale:e._locale,iconStyle:e.theme.getStyle("submenu.icon"),menuBarPosition:e.options.menuBarPosition})})}},{key:"_makeUiElement",value:function(e){var t=void 0;window.snippet=s.default,t=e.nodeType?e:document.querySelector(e);var n=c.default.getSelector(t);t.classList.add("tui-image-editor-container"),t.innerHTML=(0,f.default)({locale:this._locale,biImage:this.theme.getStyle("common.bi"),iconStyle:this.theme.getStyle("menu.icon"),loadButtonStyle:this.theme.getStyle("loadButton"),downloadButtonStyle:this.theme.getStyle("downloadButton")})+(0,d.default)({locale:this._locale,biImage:this.theme.getStyle("common.bi"),commonStyle:this.theme.getStyle("common"),headerStyle:this.theme.getStyle("header"),loadButtonStyle:this.theme.getStyle("loadButton"),downloadButtonStyle:this.theme.getStyle("downloadButton"),submenuStyle:this.theme.getStyle("submenu")}),this._selectedElement=t,this._selectedElement.classList.add(this.options.menuBarPosition),this._mainElement=n(".tui-image-editor-main"),this._editorElementWrap=n(".tui-image-editor-wrap"),this._editorElement=n(".tui-image-editor"),this._menuElement=n(".tui-image-editor-menu"),this._subMenuElement=n(".tui-image-editor-submenu")}},{key:"_makeMenuElement",value:function(e){var t=document.createElement("li"),n=this.theme.getStyle("menu.icon"),i=n.normal,o=n.active,r=n.hover,a='\n \n \n \n \n \n ';t.id="tie-btn-"+e,t.className="tui-image-editor-item normal",t.title=this._locale.localize(e.replace(/^[a-z]/g,function(e){return e.toUpperCase()})),t.innerHTML=a,this._menuElement.appendChild(t)}},{key:"_addHelpActionEvent",value:function(e){var t=this;this._els[e].addEventListener("click",function(){t._actions.main[e]()})}},{key:"_addDownloadEvent",value:function(){var e=this;s.default.forEach(this._els.download,function(t){t.addEventListener("click",function(){e._actions.main.download()})})}},{key:"_addLoadEvent",value:function(){var e=this;s.default.forEach(this._els.load,function(t){t.addEventListener("change",function(t){e._actions.main.load(t.target.files[0])})})}},{key:"_addMenuEvent",value:function(e){var t=this;this._els[e].addEventListener("click",function(){t.changeMenu(e)})}},{key:"_addSubMenuEvent",value:function(e){this[e].addEvent(this._actions[e])}},{key:"getEditorArea",value:function(){return this._editorElement}},{key:"activeMenuEvent",value:function(){var e=this;this._initMenuEvent||(this._addHelpActionEvent("undo"),this._addHelpActionEvent("redo"),this._addHelpActionEvent("reset"),this._addHelpActionEvent("delete"),this._addHelpActionEvent("deleteAll"),this._addDownloadEvent(),s.default.forEach(this.options.menu,function(t){e._addMenuEvent(t),e._addSubMenuEvent(t)}),this._initMenu(),this._initMenuEvent=!0)}},{key:"initCanvas",value:function(){var e=this,t=this._getLoadImage();t.path&&this._actions.main.initLoadImage(t.path,t.name).then(function(){e.activeMenuEvent()}),this._addLoadEvent();var n=document.createElement("div");n.className="tui-image-editor-grid-visual";var i='\n \n \n \n
';n.innerHTML=i,this._editorContainerElement=this._editorElement.querySelector(".tui-image-editor-canvas-container"),this._editorContainerElement.appendChild(n)}},{key:"_getLoadImage",value:function(){return this.options.loadImage}},{key:"changeMenu",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];this._submenuChangeTransection||(this._submenuChangeTransection=!0,this._changeMenu(e,t,n),this._submenuChangeTransection=!1)}},{key:"_changeMenu",value:function(e,t,n){this.submenu&&(this._els[this.submenu].classList.remove("active"),this._mainElement.classList.remove("tui-image-editor-menu-"+this.submenu),n&&this._actions.main.discardSelection(),this._actions.main.changeSelectableAll(!0),this[this.submenu].changeStandbyMode()),this.submenu===e&&t?this.submenu=null:(this._els[e].classList.add("active"),this._mainElement.classList.add("tui-image-editor-menu-"+e),this.submenu=e,this[this.submenu].changeStartMode()),this.resizeEditor()}},{key:"_initMenu",value:function(){if(this.options.initMenu){var e=document.createEvent("MouseEvents");e.initEvent("click",!0,!1),this._els[this.options.initMenu].dispatchEvent(e)}this.icon&&this.icon.registDefaultIcon()}},{key:"_getEditorDimension",value:function(){var e=parseFloat(this._editorContainerElement.style.maxHeight),t=this.imageSize.newHeight>e?e:this.imageSize.newHeight,n=parseFloat(this._editorContainerElement.style.maxWidth),i=this.imageSize.newWidth>n?n:this.imageSize.newWidth;return{width:i,height:t}}},{key:"_setEditorPosition",value:function(e){var t=this._getEditorDimension(),n=t.width,i=t.height,o=this._editorElement.style,r=0,a=0;this.submenu&&("bottom"===e?r=i>this._editorElementWrap.scrollHeight-150?(i-this._editorElementWrap.scrollHeight)/2:-75:"top"===e?r=i>this._editorElementWrap.offsetHeight-150?75-(i-(this._editorElementWrap.offsetHeight-150))/2:75:"left"===e?a=n>this._editorElementWrap.offsetWidth-248?124-(n-(this._editorElementWrap.offsetWidth-248))/2:124:"right"===e&&(a=n>this._editorElementWrap.scrollWidth-248?(n-this._editorElementWrap.scrollWidth)/2:-124)),o.top=r+"px",o.left=a+"px"}}]),e}();t.default=N},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:this.defaultPresetButton;c.default.forEach([].slice.call(this._els.preset.querySelectorAll(".preset")),function(e){e.classList.remove("active")}),e&&e.classList.add("active")}}]),t}(d.default);t.default=p},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;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 '+t.localize("Load")+'\n \n
\n \n
\n \n"}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.locale,n=e.biImage,i=e.commonStyle,o=e.headerStyle,r=e.loadButtonStyle,a=e.downloadButtonStyle,s=e.submenuStyle;return'\n
\n
\n \n
\n
\n '+t.localize("Load")+'\n \n
\n \n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n'}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.subMenuLabelActive,n=e.subMenuLabelNormal,i=e.subMenuRangeTitle,o=e.submenuPartitionVertical,r=e.submenuPartitionHorizontal,a=e.submenuCheckbox,s=e.submenuRangePointer,l=e.submenuRangeValue,c=e.submenuColorpickerTitle,u=e.submenuColorpickerButton,d=e.submenuRangeBar,h=e.submenuRangeSubbar,f=e.submenuDisabledRangePointer,p=e.submenuDisabledRangeBar,g=e.submenuDisabledRangeSubbar,v=e.submenuIconSize,m=e.menuIconSize,b=e.biSize;return'\n #tie-icon-add-button.icon-bubble .tui-image-editor-button[data-icontype="icon-bubble"] label,\n #tie-icon-add-button.icon-heart .tui-image-editor-button[data-icontype="icon-heart"] label,\n #tie-icon-add-button.icon-location .tui-image-editor-button[data-icontype="icon-location"] label,\n #tie-icon-add-button.icon-polygon .tui-image-editor-button[data-icontype="icon-polygon"] label,\n #tie-icon-add-button.icon-star .tui-image-editor-button[data-icontype="icon-star"] label,\n #tie-icon-add-button.icon-star-2 .tui-image-editor-button[data-icontype="icon-star-2"] label,\n #tie-icon-add-button.icon-arrow-3 .tui-image-editor-button[data-icontype="icon-arrow-3"] label,\n #tie-icon-add-button.icon-arrow-2 .tui-image-editor-button[data-icontype="icon-arrow-2"] label,\n #tie-icon-add-button.icon-arrow .tui-image-editor-button[data-icontype="icon-arrow"] label,\n #tie-icon-add-button.icon-bubble .tui-image-editor-button[data-icontype="icon-bubble"] label,\n #tie-draw-line-select-button.line .tui-image-editor-button.line label,\n #tie-draw-line-select-button.free .tui-image-editor-button.free label,\n #tie-flip-button.flipX .tui-image-editor-button.flipX label,\n #tie-flip-button.flipY .tui-image-editor-button.flipY label,\n #tie-flip-button.resetFlip .tui-image-editor-button.resetFlip label,\n #tie-crop-button .tui-image-editor-button.apply.active label,\n #tie-crop-preset-button .tui-image-editor-button.preset.active label,\n #tie-shape-button.rect .tui-image-editor-button.rect label,\n #tie-shape-button.circle .tui-image-editor-button.circle label,\n #tie-shape-button.triangle .tui-image-editor-button.triangle label,\n #tie-text-effect-button .tui-image-editor-button.active label,\n #tie-text-align-button.left .tui-image-editor-button.left label,\n #tie-text-align-button.center .tui-image-editor-button.center label,\n #tie-text-align-button.right .tui-image-editor-button.right label,\n #tie-mask-apply.apply.active .tui-image-editor-button.apply label,\n .tui-image-editor-container .tui-image-editor-submenu .tui-image-editor-button:hover > label,\n .tui-image-editor-container .tui-image-editor-checkbox input + label {\n '+t+"\n }\n .tui-image-editor-container .tui-image-editor-submenu .tui-image-editor-button > label,\n .tui-image-editor-container .tui-image-editor-range-wrap.tui-image-editor-newline.short label {\n "+n+"\n }\n .tui-image-editor-container .tui-image-editor-range-wrap label {\n "+i+"\n }\n .tui-image-editor-container .tui-image-editor-partition > div {\n "+o+"\n }\n .tui-image-editor-container.left .tui-image-editor-submenu .tui-image-editor-partition > div,\n .tui-image-editor-container.right .tui-image-editor-submenu .tui-image-editor-partition > div {\n "+r+"\n }\n .tui-image-editor-container .tui-image-editor-checkbox input + label:before {\n "+a+"\n }\n .tui-image-editor-container .tui-image-editor-checkbox input:checked + label:before {\n border: 0;\n }\n .tui-image-editor-container .tui-image-editor-virtual-range-pointer {\n "+s+"\n }\n .tui-image-editor-container .tui-image-editor-virtual-range-bar {\n "+d+"\n }\n .tui-image-editor-container .tui-image-editor-virtual-range-subbar {\n "+h+"\n }\n .tui-image-editor-container .tui-image-editor-disabled .tui-image-editor-virtual-range-pointer {\n "+f+"\n }\n .tui-image-editor-container .tui-image-editor-disabled .tui-image-editor-virtual-range-subbar {\n "+g+"\n }\n .tui-image-editor-container .tui-image-editor-disabled .tui-image-editor-virtual-range-bar {\n "+p+"\n }\n .tui-image-editor-container .tui-image-editor-range-value {\n "+l+"\n }\n .tui-image-editor-container .tui-image-editor-submenu .tui-image-editor-button .color-picker-value + label {\n "+c+"\n }\n .tui-image-editor-container .tui-image-editor-submenu .tui-image-editor-button .color-picker-value {\n "+u+"\n }\n .tui-image-editor-container .svg_ic-menu {\n "+m+"\n }\n .tui-image-editor-container .svg_ic-submenu {\n "+v+"\n }\n .tui-image-editor-container .tui-image-editor-controls-logo > img,\n .tui-image-editor-container .tui-image-editor-header-logo > img {\n "+b+"\n }\n\n"}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.locale,n=e.iconStyle,i=n.normal,o=n.active;return'\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 \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"}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.locale,n=e.iconStyle,i=n.normal,o=n.active;return'\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'}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.locale;return'\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 \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
    \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'; +}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.locale,n=e.iconStyle,i=n.normal,o=n.active;return'\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"}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.locale,n=e.iconStyle,i=n.normal,o=n.active;return'\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
    \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
    \n \n
    \n
  • \n
  • \n
    \n
  • \n
  • \n
    \n
  • \n
\n'}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.locale,n=e.iconStyle,i=n.normal,o=n.active;return'\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"}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.locale,n=e.iconStyle,i=n.normal,o=n.active;return'\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'}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.locale,n=e.iconStyle,i=n.normal,o=n.active;return'\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'}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.locale,n=e.iconStyle,i=n.normal,o=n.active;return'\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
    \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'}},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n-1&&"none"!==e&&(e="url("+e+")"),n.push(t._toUnderScore(i)+": "+e)}),n.join(";")}},{key:"_toUnderScore",value:function(e){return e.replace(/([A-Z])/g,function(e,t){return"-"+t.toLowerCase()})}}]),e}();t.default=h},function(e,t){e.exports=function(){}},function(e,t){e.exports=function(e,t,n,i){if(!(e instanceof t)||void 0!==i&&i in e)throw TypeError(n+": incorrect invocation!");return e}},function(e,t,n){var i=n(30),o=n(42),r=n(140);e.exports=function(e){return function(t,n,a){var s,l=i(t),c=o(l.length),u=r(a,c);if(e&&n!=n){for(;c>u;)if(s=l[u++],s!=s)return!0}else for(;c>u;u++)if((e||u in l)&&l[u]===n)return e||u||0;return!e&&-1}}},function(e,t,n){var i=n(20),o=n(125),r=n(124),a=n(11),s=n(42),l=n(143),c={},u={},t=e.exports=function(e,t,n,d,h){var f,p,g,v,m=h?function(){return e}:l(e),b=i(n,d,t?2:1),y=0;if("function"!=typeof m)throw TypeError(e+" is not iterable!");if(r(m)){for(f=s(e.length);f>y;y++)if(v=t?b(a(p=e[y])[0],p[1]):b(e[y]),v===c||v===u)return v}else for(g=m.call(e);!(p=g.next()).done;)if(v=o(g,b,p.value,t),v===c||v===u)return v};t.BREAK=c,t.RETURN=u},function(e,t,n){e.exports=!n(17)&&!n(35)(function(){return 7!=Object.defineProperty(n(26)("div"),"a",{get:function(){return 7}}).a})},function(e,t){e.exports=function(e,t,n){var i=void 0===n;switch(t.length){case 0:return i?e():e.call(n);case 1:return i?e(t[0]):e.call(n,t[0]);case 2:return i?e(t[0],t[1]):e.call(n,t[0],t[1]);case 3:return i?e(t[0],t[1],t[2]):e.call(n,t[0],t[1],t[2]);case 4:return i?e(t[0],t[1],t[2],t[3]):e.call(n,t[0],t[1],t[2],t[3])}return e.apply(n,t)}},function(e,t,n){var i=n(19);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==i(e)?e.split(""):Object(e)}},function(e,t,n){var i=n(18),o=n(7)("iterator"),r=Array.prototype;e.exports=function(e){return void 0!==e&&(i.Array===e||r[o]===e)}},function(e,t,n){var i=n(11);e.exports=function(e,t,n,o){try{return o?t(i(n)[0],n[1]):t(n)}catch(t){var r=e.return;throw void 0!==r&&i(r.call(e)),t}}},function(e,t,n){"use strict";var i=n(130),o=n(39),r=n(27),a={};n(12)(a,n(7)("iterator"),function(){return this}),e.exports=function(e,t,n){e.prototype=i(a,{next:o(1,n)}),r(e,t+" Iterator")}},function(e,t,n){var i=n(7)("iterator"),o=!1;try{var r=[7][i]();r.return=function(){o=!0},Array.from(r,function(){throw 2})}catch(e){}e.exports=function(e,t){if(!t&&!o)return!1;var n=!1;try{var r=[7],a=r[i]();a.next=function(){return{done:n=!0}},r[i]=function(){return a},e(r)}catch(e){}return n}},function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},function(e,t,n){var i=n(9),o=n(41).set,r=i.MutationObserver||i.WebKitMutationObserver,a=i.process,s=i.Promise,l="process"==n(19)(a);e.exports=function(){var e,t,n,c=function(){var i,o;for(l&&(i=a.domain)&&i.exit();e;){o=e.fn,e=e.next;try{o()}catch(i){throw e?n():t=void 0,i}}t=void 0,i&&i.enter()};if(l)n=function(){a.nextTick(c)};else if(r){var u=!0,d=document.createTextNode("");new r(c).observe(d,{characterData:!0}),n=function(){d.data=u=!u}}else if(s&&s.resolve){var h=s.resolve();n=function(){h.then(c)}}else n=function(){o.call(i,c)};return function(i){var o={fn:i,next:void 0};t&&(t.next=o),e||(e=o,n()),t=o}}},function(e,t,n){var i=n(11),o=n(131),r=n(33),a=n(28)("IE_PROTO"),s=function(){},l="prototype",c=function(){var e,t=n(26)("iframe"),i=r.length,o="<",a=">";for(t.style.display="none",n(36).appendChild(t),t.src="javascript:",e=t.contentWindow.document,e.open(),e.write(o+"script"+a+"document.F=Object"+o+"/script"+a),e.close(),c=e.F;i--;)delete c[l][r[i]];return c()};e.exports=Object.create||function(e,t){var n;return null!==e?(s[l]=i(e),n=new s,s[l]=null,n[a]=e):n=c(),void 0===t?n:o(n,t)}},function(e,t,n){var i=n(23),o=n(11),r=n(134);e.exports=n(17)?Object.defineProperties:function(e,t){o(e);for(var n,a=r(t),s=a.length,l=0;s>l;)i.f(e,n=a[l++],t[n]);return e}},function(e,t,n){var i=n(21),o=n(141),r=n(28)("IE_PROTO"),a=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=o(e),i(e,r)?e[r]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?a:null}},function(e,t,n){var i=n(21),o=n(30),r=n(119)(!1),a=n(28)("IE_PROTO");e.exports=function(e,t){var n,s=o(e),l=0,c=[];for(n in s)n!=a&&i(s,n)&&c.push(n);for(;t.length>l;)i(s,n=t[l++])&&(~r(c,n)||c.push(n));return c}},function(e,t,n){var i=n(133),o=n(33);e.exports=Object.keys||function(e){return i(e,o)}},function(e,t,n){var i=n(12);e.exports=function(e,t,n){for(var o in t)n&&e[o]?e[o]=t[o]:i(e,o,t[o]);return e}},function(e,t,n){e.exports=n(12)},function(e,t,n){"use strict";var i=n(9),o=n(16),r=n(23),a=n(17),s=n(7)("species");e.exports=function(e){var t="function"==typeof o[e]?o[e]:i[e];a&&t&&!t[s]&&r.f(t,s,{configurable:!0,get:function(){return this}})}},function(e,t,n){var i=n(11),o=n(24),r=n(7)("species");e.exports=function(e,t){var n,a=i(e).constructor;return void 0===a||void 0==(n=i(a)[r])?t:o(n)}},function(e,t,n){var i=n(29),o=n(25);e.exports=function(e){return function(t,n){var r,a,s=String(o(t)),l=i(n),c=s.length;return l<0||l>=c?e?"":void 0:(r=s.charCodeAt(l),r<55296||r>56319||l+1===c||(a=s.charCodeAt(l+1))<56320||a>57343?e?s.charAt(l):r:e?s.slice(l,l+2):(r-55296<<10)+(a-56320)+65536)}}},function(e,t,n){var i=n(29),o=Math.max,r=Math.min;e.exports=function(e,t){return e=i(e),e<0?o(e+t,0):r(e,t)}},function(e,t,n){var i=n(25);e.exports=function(e){return Object(i(e))}},function(e,t,n){var i=n(22);e.exports=function(e,t){if(!i(e))return e;var n,o;if(t&&"function"==typeof(n=e.toString)&&!i(o=n.call(e)))return o;if("function"==typeof(n=e.valueOf)&&!i(o=n.call(e)))return o;if(!t&&"function"==typeof(n=e.toString)&&!i(o=n.call(e)))return o; +throw TypeError("Can't convert object to primitive value")}},function(e,t,n){var i=n(32),o=n(7)("iterator"),r=n(18);e.exports=n(16).getIteratorMethod=function(e){if(void 0!=e)return e[o]||e["@@iterator"]||r[i(e)]}},function(e,t,n){"use strict";var i=n(117),o=n(128),r=n(18),a=n(30);e.exports=n(37)(Array,"Array",function(e,t){this._t=a(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,o(1)):"keys"==t?o(0,n):"values"==t?o(0,e[n]):o(0,[n,e[n]])},"values"),r.Arguments=r.Array,i("keys"),i("values"),i("entries")},function(e,t){},function(e,t,n){"use strict";var i,o,r,a=n(38),s=n(9),l=n(20),c=n(32),u=n(34),d=n(22),h=n(24),f=n(118),p=n(120),g=n(138),v=n(41).set,m=n(129)(),b="Promise",y=s.TypeError,_=s.process,k=s[b],_=s.process,w="process"==c(_),x=function(){},E=!!function(){try{var e=k.resolve(1),t=(e.constructor={})[n(7)("species")]=function(e){e(x,x)};return(w||"function"==typeof PromiseRejectionEvent)&&e.then(x)instanceof t}catch(e){}}(),C=function(e,t){return e===t||e===k&&t===r},O=function(e){var t;return!(!d(e)||"function"!=typeof(t=e.then))&&t},S=function(e){return C(k,e)?new M(e):new o(e)},M=o=function(e){var t,n;this.promise=new e(function(e,i){if(void 0!==t||void 0!==n)throw y("Bad Promise constructor");t=e,n=i}),this.resolve=h(t),this.reject=h(n)},j=function(e){try{e()}catch(e){return{error:e}}},T=function(e,t){if(!e._n){e._n=!0;var n=e._c;m(function(){for(var i=e._v,o=1==e._s,r=0,a=function(t){var n,r,a=o?t.ok:t.fail,s=t.resolve,l=t.reject,c=t.domain;try{a?(o||(2==e._h&&I(e),e._h=1),a===!0?n=i:(c&&c.enter(),n=a(i),c&&c.exit()),n===t.promise?l(y("Promise-chain cycle")):(r=O(n))?r.call(n,s,l):s(n)):l(i)}catch(e){l(e)}};n.length>r;)a(n[r++]);e._c=[],e._n=!1,t&&!e._h&&P(e)})}},P=function(e){v.call(s,function(){var t,n,i,o=e._v;if(A(e)&&(t=j(function(){w?_.emit("unhandledRejection",o,e):(n=s.onunhandledrejection)?n({promise:e,reason:o}):(i=s.console)&&i.error&&i.error("Unhandled promise rejection",o)}),e._h=w||A(e)?2:1),e._a=void 0,t)throw t.error})},A=function(e){if(1==e._h)return!1;for(var t,n=e._a||e._c,i=0;n.length>i;)if(t=n[i++],t.fail||!A(t.promise))return!1;return!0},I=function(e){v.call(s,function(){var t;w?_.emit("rejectionHandled",e):(t=s.onrejectionhandled)&&t({promise:e,reason:e._v})})},D=function(e){var t=this;t._d||(t._d=!0,t=t._w||t,t._v=e,t._s=2,t._a||(t._a=t._c.slice()),T(t,!0))},R=function(e){var t,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===e)throw y("Promise can't be resolved itself");(t=O(e))?m(function(){var i={_w:n,_d:!1};try{t.call(e,l(R,i,1),l(D,i,1))}catch(e){D.call(i,e)}}):(n._v=e,n._s=1,T(n,!1))}catch(e){D.call({_w:n,_d:!1},e)}}};E||(k=function(e){f(this,k,b,"_h"),h(e),i.call(this);try{e(l(R,this,1),l(D,this,1))}catch(e){D.call(this,e)}},i=function(e){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},i.prototype=n(135)(k.prototype,{then:function(e,t){var n=S(g(this,k));return n.ok="function"!=typeof e||e,n.fail="function"==typeof t&&t,n.domain=w?_.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&T(this,!1),n.promise},catch:function(e){return this.then(void 0,e)}}),M=function(){var e=new i;this.promise=e,this.resolve=l(R,e,1),this.reject=l(D,e,1)}),u(u.G+u.W+u.F*!E,{Promise:k}),n(27)(k,b),n(137)(b),r=n(16)[b],u(u.S+u.F*!E,b,{reject:function(e){var t=S(this),n=t.reject;return n(e),t.promise}}),u(u.S+u.F*(a||!E),b,{resolve:function(e){if(e instanceof k&&C(e.constructor,this))return e;var t=S(this),n=t.resolve;return n(e),t.promise}}),u(u.S+u.F*!(E&&n(127)(function(e){k.all(e).catch(x)})),b,{all:function(e){var t=this,n=S(t),i=n.resolve,o=n.reject,r=j(function(){var n=[],r=0,a=1;p(e,!1,function(e){var s=r++,l=!1;n.push(void 0),a++,t.resolve(e).then(function(e){l||(l=!0,n[s]=e,--a||i(n))},o)}),--a||i(n)});return r&&o(r.error),n.promise},race:function(e){var t=this,n=S(t),i=n.reject,o=j(function(){p(e,!1,function(e){t.resolve(e).then(n.resolve,i)})});return o&&i(o.error),n.promise}})},function(e,t,n){"use strict";var i=n(139)(!0);n(37)(String,"String",function(e){this._t=String(e),this._i=0},function(){var e,t=this._t,n=this._i;return n>=t.length?{value:void 0,done:!0}:(e=i(t,n),this._i+=e.length,{value:e,done:!1})})},function(e,t,n){n(144);for(var i=n(9),o=n(12),r=n(18),a=n(7)("toStringTag"),s=["NodeList","DOMTokenList","MediaList","StyleSheetList","CSSRuleList"],l=0;l<5;l++){var c=s[l],u=i[c],d=u&&u.prototype;d&&!d[a]&&o(d,a,c),r[c]=r.Array}},function(e,t){},function(e,t,n){/*! * Toast UI Colorpicker * @version 2.2.0 * @author NHNEnt FE Development Team diff --git a/index.d.ts b/index.d.ts index bb29020ad..820ea70cb 100644 --- a/index.d.ts +++ b/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for TOAST UI Image Editor v3.4.0 +// Type definitions for TOAST UI Image Editor v3.5.0 // TypeScript Version: 3.2.2 declare namespace tuiImageEditor {