aboutsummaryrefslogtreecommitdiffstats
path: root/library/cropperjs/dist/cropper.common.js
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2020-06-16 07:32:55 +0000
committerMario <mario@mariovavti.com>2020-06-16 07:32:55 +0000
commit70a104f24f3b3e3903d363081569be9af2052758 (patch)
treeb3d82880872255536e3ec8297e3ab6e419fac5d3 /library/cropperjs/dist/cropper.common.js
parent0f27db6271acb3e0e44bf870659f085c71c8f629 (diff)
downloadvolse-hubzilla-70a104f24f3b3e3903d363081569be9af2052758.tar.gz
volse-hubzilla-70a104f24f3b3e3903d363081569be9af2052758.tar.bz2
volse-hubzilla-70a104f24f3b3e3903d363081569be9af2052758.zip
upÃdate copperjs to version 1.5.7
Diffstat (limited to 'library/cropperjs/dist/cropper.common.js')
-rw-r--r--library/cropperjs/dist/cropper.common.js70
1 files changed, 35 insertions, 35 deletions
diff --git a/library/cropperjs/dist/cropper.common.js b/library/cropperjs/dist/cropper.common.js
index 84cd77cdd..ca35bcf08 100644
--- a/library/cropperjs/dist/cropper.common.js
+++ b/library/cropperjs/dist/cropper.common.js
@@ -1,16 +1,18 @@
/*!
- * 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
*/
'use strict';
function _typeof(obj) {
+ "@babel/helpers - typeof";
+
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
_typeof = function (obj) {
return typeof obj;
@@ -80,13 +82,13 @@ function _objectSpread2(target) {
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));
});
}
@@ -96,28 +98,41 @@ function _objectSpread2(target) {
}
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
@@ -171,10 +186,6 @@ var REGEXP_ACTIONS = /^e|w|s|n|se|sw|ne|nw|all|crop|move|zoom$/;
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
@@ -382,7 +393,7 @@ var assign = Object.assign || function assign(target) {
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.
@@ -1183,8 +1194,6 @@ function parseOrientation(orientation) {
case 8:
rotate = -90;
break;
-
- default:
}
return {
@@ -1789,16 +1798,13 @@ var events = {
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) {
@@ -2046,8 +2052,6 @@ var change = {
}
break;
-
- default:
}
};
@@ -2412,8 +2416,6 @@ var change = {
}
break;
-
- default:
}
if (renderable) {
@@ -3195,9 +3197,7 @@ var methods = {
var AnotherCropper = WINDOW.Cropper;
-var Cropper =
-/*#__PURE__*/
-function () {
+var Cropper = /*#__PURE__*/function () {
/**
* Create a new Cropper.
* @param {Element} element - The target element for cropping.
@@ -3246,7 +3246,7 @@ function () {
if (!url) {
return;
- } // e.g.: "http://example.com/img/picture.jpg"
+ } // e.g.: "https://example.com/img/picture.jpg"
url = element.src;