diff options
Diffstat (limited to 'library/cropperjs/docs/js/cropper.js')
-rw-r--r-- | library/cropperjs/docs/js/cropper.js | 74 |
1 files changed, 37 insertions, 37 deletions
diff --git a/library/cropperjs/docs/js/cropper.js b/library/cropperjs/docs/js/cropper.js index 5c49d7bdf..9bed97a52 100644 --- a/library/cropperjs/docs/js/cropper.js +++ b/library/cropperjs/docs/js/cropper.js @@ -1,20 +1,22 @@ /*! - * Cropper.js v1.5.6 + * Cropper.js v1.5.7 * https://fengyuanchen.github.io/cropperjs * * Copyright 2015-present Chen Fengyuan * Released under the MIT license * - * Date: 2019-10-04T04:33:48.372Z + * Date: 2020-05-23T05:23:00.081Z */ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : typeof define === 'function' && define.amd ? define(factory) : (global = global || self, global.Cropper = factory()); -}(this, function () { 'use strict'; +}(this, (function () { 'use strict'; function _typeof(obj) { + "@babel/helpers - typeof"; + if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function (obj) { return typeof obj; @@ -84,13 +86,13 @@ var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { - ownKeys(source, true).forEach(function (key) { + ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { - ownKeys(source).forEach(function (key) { + ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } @@ -100,28 +102,41 @@ } function _toConsumableArray(arr) { - return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); + return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); } function _arrayWithoutHoles(arr) { - if (Array.isArray(arr)) { - for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) arr2[i] = arr[i]; - - return arr2; - } + if (Array.isArray(arr)) return _arrayLikeToArray(arr); } function _iterableToArray(iter) { - if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); + if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); + } + + function _unsupportedIterableToArray(o, minLen) { + if (!o) return; + if (typeof o === "string") return _arrayLikeToArray(o, minLen); + var n = Object.prototype.toString.call(o).slice(8, -1); + if (n === "Object" && o.constructor) n = o.constructor.name; + if (n === "Map" || n === "Set") return Array.from(o); + if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); + } + + function _arrayLikeToArray(arr, len) { + if (len == null || len > arr.length) len = arr.length; + + for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; + + return arr2; } function _nonIterableSpread() { - throw new TypeError("Invalid attempt to spread non-iterable instance"); + throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var IS_BROWSER = typeof window !== 'undefined' && typeof window.document !== 'undefined'; var WINDOW = IS_BROWSER ? window : {}; - var IS_TOUCH_DEVICE = IS_BROWSER ? 'ontouchstart' in WINDOW.document.documentElement : false; + var IS_TOUCH_DEVICE = IS_BROWSER && WINDOW.document.documentElement ? 'ontouchstart' in WINDOW.document.documentElement : false; var HAS_POINTER_EVENT = IS_BROWSER ? 'PointerEvent' in WINDOW : false; var NAMESPACE = 'cropper'; // Actions @@ -175,10 +190,6 @@ var REGEXP_DATA_URL = /^data:/; var REGEXP_DATA_URL_JPEG = /^data:image\/jpeg;base64,/; var REGEXP_TAG_NAME = /^img|canvas$/i; // Misc - // Inspired by the default width and height of a canvas element. - - var MIN_CONTAINER_WIDTH = 200; - var MIN_CONTAINER_HEIGHT = 100; var DEFAULTS = { // Define the view mode of the cropper @@ -386,7 +397,7 @@ var REGEXP_DECIMALS = /\.\d*(?:0|9){12}\d*$/; /** * Normalize decimal number. - * Check out {@link http://0.30000000000000004.com/} + * Check out {@link https://0.30000000000000004.com/} * @param {number} value - The value to normalize. * @param {number} [times=100000000000] - The times for normalizing. * @returns {number} Returns the normalized number. @@ -1187,8 +1198,6 @@ case 8: rotate = -90; break; - - default: } return { @@ -1793,16 +1802,13 @@ var handlers = { resize: function resize() { - var options = this.options, - container = this.container, - containerData = this.containerData; - var minContainerWidth = Number(options.minContainerWidth) || MIN_CONTAINER_WIDTH; - var minContainerHeight = Number(options.minContainerHeight) || MIN_CONTAINER_HEIGHT; - - if (this.disabled || containerData.width <= minContainerWidth || containerData.height <= minContainerHeight) { + if (this.disabled) { return; } + var options = this.options, + container = this.container, + containerData = this.containerData; var ratio = container.offsetWidth / containerData.width; // Resize when width changed or height changed if (ratio !== 1 || container.offsetHeight !== containerData.height) { @@ -2050,8 +2056,6 @@ } break; - - default: } }; @@ -2416,8 +2420,6 @@ } break; - - default: } if (renderable) { @@ -3199,9 +3201,7 @@ var AnotherCropper = WINDOW.Cropper; - var Cropper = - /*#__PURE__*/ - function () { + var Cropper = /*#__PURE__*/function () { /** * Create a new Cropper. * @param {Element} element - The target element for cropping. @@ -3250,7 +3250,7 @@ if (!url) { return; - } // e.g.: "http://example.com/img/picture.jpg" + } // e.g.: "https://example.com/img/picture.jpg" url = element.src; @@ -3613,4 +3613,4 @@ return Cropper; -})); +}))); |