物联网平台 +Web 组态
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

10 lines
35 KiB

2 years ago
/*!
* Cropper.js v1.4.1
* https://fengyuanchen.github.io/cropperjs
*
* Copyright 2015-present Chen Fengyuan
* Released under the MIT license
*
* Date: 2018-07-15T09:55:31.170Z
*/
!function(t,i){"object"==typeof exports&&"undefined"!=typeof module?module.exports=i():"function"==typeof define&&define.amd?define(i):t.Cropper=i()}(this,function(){"use strict";var n="undefined"!=typeof window,h=n?window:{},d="cropper",k="all",E="crop",T="move",W="zoom",N="e",H="w",L="s",O="n",z="ne",Y="nw",X="se",R="sw",r=d+"-crop",t=d+"-disabled",S=d+"-hidden",l=d+"-hide",o=d+"-modal",p=d+"-move",m=d+"Action",g=d+"Preview",s="crop",c="move",u="none",a="crop",f="cropend",v="cropmove",w="cropstart",x="dblclick",b=h.PointerEvent?"pointerdown":"touchstart mousedown",y=h.PointerEvent?"pointermove":"touchmove mousemove",M=h.PointerEvent?"pointerup pointercancel":"touchend touchcancel mouseup",C="ready",D="resize",B="wheel mousewheel DOMMouseScroll",A="zoom",I=/^(?:e|w|s|n|se|sw|ne|nw|all|crop|move|zoom)$/,U=/^data:/,j=/^data:image\/jpeg;base64,/,P=/^(?:img|canvas)$/i,q={viewMode:0,dragMode:s,initialAspectRatio:NaN,aspectRatio:NaN,data:null,preview:"",responsive:!0,restore:!0,checkCrossOrigin:!0,checkOrientation:!0,modal:!0,guides:!0,center:!0,highlight:!0,background:!0,autoCrop:!0,autoCropArea:.8,movable:!0,rotatable:!0,scalable:!0,zoomable:!0,zoomOnTouch:!0,zoomOnWheel:!0,wheelZoomRatio:.1,cropBoxMovable:!0,cropBoxResizable:!0,toggleDragModeOnDblclick:!0,minCanvasWidth:0,minCanvasHeight:0,minCropBoxWidth:0,minCropBoxHeight:0,minContainerWidth:200,minContainerHeight:100,ready:null,cropstart:null,cropmove:null,cropend:null,crop:null,zoom:null},i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$=function(){function a(t,i){for(var e=0;e<i.length;e++){var a=i[e];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}return function(t,i,e){return i&&a(t.prototype,i),e&&a(t,e),t}}(),xt=function(t){if(Array.isArray(t)){for(var i=0,e=Array(t.length);i<t.length;i++)e[i]=t[i];return e}return Array.from(t)},e=Number.isNaN||h.isNaN;function Q(t){return"number"==typeof t&&!e(t)}function Z(t){return void 0===t}function F(t){return"object"===(void 0===t?"undefined":i(t))&&null!==t}var K=Object.prototype.hasOwnProperty;function V(t){if(!F(t))return!1;try{var i=t.constructor,e=i.prototype;return i&&e&&K.call(e,"isPrototypeOf")}catch(t){return!1}}function G(t){return"function"==typeof t}function J(i,e){if(i&&G(e))if(Array.isArray(i)||Q(i.length)){var t=i.length,a=void 0;for(a=0;a<t&&!1!==e.call(i,i[a],a,i);a+=1);}else F(i)&&Object.keys(i).forEach(function(t){e.call(i,i[t],t,i)});return i}var _=Object.assign||function(e){for(var t=arguments.length,i=Array(1<t?t-1:0),a=1;a<t;a++)i[a-1]=arguments[a];return F(e)&&0<i.length&&i.forEach(function(i){F(i)&&Object.keys(i).forEach(function(t){e[t]=i[t]})}),e},tt=/\.\d*(?:0|9){12}\d*$/i;function bt(t){var i=1<arguments.length&&void 0!==arguments[1]?arguments[1]:1e11;return tt.test(t)?Math.round(t*i)/i:t}var it=/^(?:width|height|left|top|marginLeft|marginTop)$/;function et(t,i){var e=t.style;J(i,function(t,i){it.test(i)&&Q(t)&&(t+="px"),e[i]=t})}function at(t,i){if(i)if(Q(t.length))J(t,function(t){at(t,i)});else if(t.classList)t.classList.add(i);else{var e=t.className.trim();e?e.indexOf(i)<0&&(t.className=e+" "+i):t.className=i}}function nt(t,i){i&&(Q(t.length)?J(t,function(t){nt(t,i)}):t.classList?t.classList.remove(i):0<=t.className.indexOf(i)&&(t.className=t.className.replace(i,"")))}function ot(t,i,e){i&&(Q(t.length)?J(t,function(t){ot(t,i,e)}):e?at(t,i):nt(t,i))}var ht=/([a-z\d])([A-Z])/g;function rt(t){return t.replace(ht,"$1-$2").toLowerCase()}function st(t,i){return F(t[i])?t[i]:t.dataset?t.dataset[i]:t.getAttribute("data-"+rt(i))}function ct(t,i,e){F(e)?t[i]=e:t.dataset?t.dataset[i]=e:t.setAttribute("data-"+rt(i),e)}function dt(i,e){if(F(i[e]))try{delete i[e]}catch(t){i[e]=void 0}else if(i.dataset)try{delete i.dataset[e]}catch(t){i.dataset[e]=void 0}else i.removeAttribute("data-"+rt(e))}var lt=/\s\s*/,pt=function(){var t=!1;if(n){var i=!1,e=function(){},a=Object.defineProperty({},"once"