|
1 | 1 | /*!
|
2 |
| - * Cropper.js v1.5.13 |
| 2 | + * Cropper.js v1.6.0 |
3 | 3 | * https://fengyuanchen.github.io/cropperjs
|
4 | 4 | *
|
5 | 5 | * Copyright 2015-present Chen Fengyuan
|
6 | 6 | * Released under the MIT license
|
7 | 7 | *
|
8 |
| - * Date: 2022-11-20T05:30:46.114Z |
| 8 | + * Date: 2023-08-26T08:14:27.943Z |
9 | 9 | */
|
10 | 10 |
|
11 | 11 | (function (global, factory) {
|
|
14 | 14 | (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Cropper = factory());
|
15 | 15 | })(this, (function () { 'use strict';
|
16 | 16 |
|
17 |
| - function ownKeys(object, enumerableOnly) { |
18 |
| - var keys = Object.keys(object); |
| 17 | + function ownKeys(e, r) { |
| 18 | + var t = Object.keys(e); |
19 | 19 | if (Object.getOwnPropertySymbols) {
|
20 |
| - var symbols = Object.getOwnPropertySymbols(object); |
21 |
| - enumerableOnly && (symbols = symbols.filter(function (sym) { |
22 |
| - return Object.getOwnPropertyDescriptor(object, sym).enumerable; |
23 |
| - })), keys.push.apply(keys, symbols); |
| 20 | + var o = Object.getOwnPropertySymbols(e); |
| 21 | + r && (o = o.filter(function (r) { |
| 22 | + return Object.getOwnPropertyDescriptor(e, r).enumerable; |
| 23 | + })), t.push.apply(t, o); |
24 | 24 | }
|
25 |
| - return keys; |
| 25 | + return t; |
26 | 26 | }
|
27 |
| - function _objectSpread2(target) { |
28 |
| - for (var i = 1; i < arguments.length; i++) { |
29 |
| - var source = null != arguments[i] ? arguments[i] : {}; |
30 |
| - i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { |
31 |
| - _defineProperty(target, key, source[key]); |
32 |
| - }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { |
33 |
| - Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); |
| 27 | + function _objectSpread2(e) { |
| 28 | + for (var r = 1; r < arguments.length; r++) { |
| 29 | + var t = null != arguments[r] ? arguments[r] : {}; |
| 30 | + r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { |
| 31 | + _defineProperty(e, r, t[r]); |
| 32 | + }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { |
| 33 | + Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); |
34 | 34 | });
|
35 | 35 | }
|
36 |
| - return target; |
| 36 | + return e; |
37 | 37 | }
|
38 |
| - function _typeof(obj) { |
| 38 | + function _typeof(o) { |
39 | 39 | "@babel/helpers - typeof";
|
40 | 40 |
|
41 |
| - return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { |
42 |
| - return typeof obj; |
43 |
| - } : function (obj) { |
44 |
| - return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; |
45 |
| - }, _typeof(obj); |
| 41 | + return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { |
| 42 | + return typeof o; |
| 43 | + } : function (o) { |
| 44 | + return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; |
| 45 | + }, _typeof(o); |
46 | 46 | }
|
47 | 47 | function _classCallCheck(instance, Constructor) {
|
48 | 48 | if (!(instance instanceof Constructor)) {
|
|
55 | 55 | descriptor.enumerable = descriptor.enumerable || false;
|
56 | 56 | descriptor.configurable = true;
|
57 | 57 | if ("value" in descriptor) descriptor.writable = true;
|
58 |
| - Object.defineProperty(target, descriptor.key, descriptor); |
| 58 | + Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); |
59 | 59 | }
|
60 | 60 | }
|
61 | 61 | function _createClass(Constructor, protoProps, staticProps) {
|
|
67 | 67 | return Constructor;
|
68 | 68 | }
|
69 | 69 | function _defineProperty(obj, key, value) {
|
| 70 | + key = _toPropertyKey(key); |
70 | 71 | if (key in obj) {
|
71 | 72 | Object.defineProperty(obj, key, {
|
72 | 73 | value: value,
|
|
104 | 105 | function _nonIterableSpread() {
|
105 | 106 | throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
106 | 107 | }
|
| 108 | + function _toPrimitive(input, hint) { |
| 109 | + if (typeof input !== "object" || input === null) return input; |
| 110 | + var prim = input[Symbol.toPrimitive]; |
| 111 | + if (prim !== undefined) { |
| 112 | + var res = prim.call(input, hint || "default"); |
| 113 | + if (typeof res !== "object") return res; |
| 114 | + throw new TypeError("@@toPrimitive must return a primitive value."); |
| 115 | + } |
| 116 | + return (hint === "string" ? String : Number)(input); |
| 117 | + } |
| 118 | + function _toPropertyKey(arg) { |
| 119 | + var key = _toPrimitive(arg, "string"); |
| 120 | + return typeof key === "symbol" ? key : String(key); |
| 121 | + } |
107 | 122 |
|
108 | 123 | var IS_BROWSER = typeof window !== 'undefined' && typeof window.document !== 'undefined';
|
109 | 124 | var WINDOW = IS_BROWSER ? window : {};
|
|
2725 | 2740 | if (!this.cropped) {
|
2726 | 2741 | return source;
|
2727 | 2742 | }
|
2728 |
| - var _this$getData = this.getData(), |
| 2743 | + var _this$getData = this.getData(options.rounded), |
2729 | 2744 | initialX = _this$getData.x,
|
2730 | 2745 | initialY = _this$getData.y,
|
2731 | 2746 | initialWidth = _this$getData.width,
|
|
0 commit comments