iobroker.lovelace
Version:
With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI
3 lines • 43 kB
JavaScript
/*! For license information please see chunk.14774f78116e9bd23b60.js.LICENSE.txt */
(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([[439],{82918:function(t,e,i){var n,a,o;function r(t){return(r="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})(t)}o=function(){"use strict";function t(e){return(t="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})(e)}function e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function n(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function a(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function o(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?a(Object(i),!0).forEach((function(e){n(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):a(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function r(t){return function(t){if(Array.isArray(t))return h(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return h(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?h(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}var s="undefined"!=typeof window&&void 0!==window.document,c=s?window:{},p=!(!s||!c.document.documentElement)&&"ontouchstart"in c.document.documentElement,l=!!s&&"PointerEvent"in c,d="cropper",u="all",m="crop",g="move",f="zoom",v="e",w="w",b="s",x="n",y="ne",M="nw",C="se",D="sw",k="".concat(d,"-crop"),A="".concat(d,"-disabled"),B="".concat(d,"-hidden"),O="".concat(d,"-hide"),T="".concat(d,"-invisible"),E="".concat(d,"-modal"),z="".concat(d,"-move"),W="".concat(d,"Action"),H="".concat(d,"Preview"),N="crop",L="move",R="none",X="crop",S="cropend",Y="cropmove",j="cropstart",I="dblclick",P=l?"pointerdown":p?"touchstart":"mousedown",U=l?"pointermove":p?"touchmove":"mousemove",q=l?"pointerup pointercancel":p?"touchend touchcancel":"mouseup",Q="ready",Z="resize",F="wheel",$="zoom",G="image/jpeg",V=/^e|w|s|n|se|sw|ne|nw|all|crop|move|zoom$/,K=/^data:/,_=/^data:image\/jpeg;base64,/,J=/^img|canvas$/i,tt={viewMode:0,dragMode:N,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},et=Number.isNaN||c.isNaN;function it(t){return"number"==typeof t&&!et(t)}var nt=function(t){return t>0&&t<1/0};function at(t){return void 0===t}function ot(e){return"object"===t(e)&&null!==e}var rt=Object.prototype.hasOwnProperty;function ht(t){if(!ot(t))return!1;try{var e=t.constructor,i=e.prototype;return e&&i&&rt.call(i,"isPrototypeOf")}catch(n){return!1}}function st(t){return"function"==typeof t}var ct=Array.prototype.slice;function pt(t){return Array.from?Array.from(t):ct.call(t)}function lt(t,e){return t&&st(e)&&(Array.isArray(t)||it(t.length)?pt(t).forEach((function(i,n){e.call(t,i,n,t)})):ot(t)&&Object.keys(t).forEach((function(i){e.call(t,t[i],i,t)}))),t}var dt=Object.assign||function(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),n=1;n<e;n++)i[n-1]=arguments[n];return ot(t)&&i.length>0&&i.forEach((function(e){ot(e)&&Object.keys(e).forEach((function(i){t[i]=e[i]}))})),t},ut=/\.\d*(?:0|9){12}\d*$/;function mt(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e11;return ut.test(t)?Math.round(t*e)/e:t}var gt=/^width|height|left|top|marginLeft|marginTop$/;function ft(t,e){var i=t.style;lt(e,(function(t,e){gt.test(e)&&it(t)&&(t="".concat(t,"px")),i[e]=t}))}function vt(t,e){if(e)if(it(t.length))lt(t,(function(t){vt(t,e)}));else if(t.classList)t.classList.add(e);else{var i=t.className.trim();i?i.indexOf(e)<0&&(t.className="".concat(i," ").concat(e)):t.className=e}}function wt(t,e){e&&(it(t.length)?lt(t,(function(t){wt(t,e)})):t.classList?t.classList.remove(e):t.className.indexOf(e)>=0&&(t.className=t.className.replace(e,"")))}function bt(t,e,i){e&&(it(t.length)?lt(t,(function(t){bt(t,e,i)})):i?vt(t,e):wt(t,e))}var xt=/([a-z\d])([A-Z])/g;function yt(t){return t.replace(xt,"$1-$2").toLowerCase()}function Mt(t,e){return ot(t[e])?t[e]:t.dataset?t.dataset[e]:t.getAttribute("data-".concat(yt(e)))}function Ct(t,e,i){ot(i)?t[e]=i:t.dataset?t.dataset[e]=i:t.setAttribute("data-".concat(yt(e)),i)}var Dt=/\s\s*/,kt=function(){var t=!1;if(s){var e=!1,i=function(){},n=Object.defineProperty({},"once",{get:function(){return t=!0,e},set:function(t){e=t}});c.addEventListener("test",i,n),c.removeEventListener("test",i,n)}return t}();function At(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a=i;e.trim().split(Dt).forEach((function(e){if(!kt){var o=t.listeners;o&&o[e]&&o[e][i]&&(a=o[e][i],delete o[e][i],0===Object.keys(o[e]).length&&delete o[e],0===Object.keys(o).length&&delete t.listeners)}t.removeEventListener(e,a,n)}))}function Bt(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a=i;e.trim().split(Dt).forEach((function(e){if(n.once&&!kt){var o=t.listeners,r=void 0===o?{}:o;a=function(){delete r[e][i],t.removeEventListener(e,a,n);for(var o=arguments.length,h=new Array(o),s=0;s<o;s++)h[s]=arguments[s];i.apply(t,h)},r[e]||(r[e]={}),r[e][i]&&t.removeEventListener(e,r[e][i],n),r[e][i]=a,t.listeners=r}t.addEventListener(e,a,n)}))}function Ot(t,e,i){var n;return st(Event)&&st(CustomEvent)?n=new CustomEvent(e,{detail:i,bubbles:!0,cancelable:!0}):(n=document.createEvent("CustomEvent")).initCustomEvent(e,!0,!0,i),t.dispatchEvent(n)}function Tt(t){var e=t.getBoundingClientRect();return{left:e.left+(window.pageXOffset-document.documentElement.clientLeft),top:e.top+(window.pageYOffset-document.documentElement.clientTop)}}var Et=c.location,zt=/^(\w+:)\/\/([^:/?#]*):?(\d*)/i;function Wt(t){var e=t.match(zt);return null!==e&&(e[1]!==Et.protocol||e[2]!==Et.hostname||e[3]!==Et.port)}function Ht(t){var e="timestamp=".concat((new Date).getTime());return t+(-1===t.indexOf("?")?"?":"&")+e}function Nt(t){var e=t.rotate,i=t.scaleX,n=t.scaleY,a=t.translateX,o=t.translateY,r=[];it(a)&&0!==a&&r.push("translateX(".concat(a,"px)")),it(o)&&0!==o&&r.push("translateY(".concat(o,"px)")),it(e)&&0!==e&&r.push("rotate(".concat(e,"deg)")),it(i)&&1!==i&&r.push("scaleX(".concat(i,")")),it(n)&&1!==n&&r.push("scaleY(".concat(n,")"));var h=r.length?r.join(" "):"none";return{WebkitTransform:h,msTransform:h,transform:h}}function Lt(t,e){var i=t.pageX,n=t.pageY,a={endX:i,endY:n};return e?a:o({startX:i,startY:n},a)}function Rt(t){var e=t.aspectRatio,i=t.height,n=t.width,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"contain",o=nt(n),r=nt(i);if(o&&r){var h=i*e;"contain"===a&&h>n||"cover"===a&&h<n?i=n/e:n=i*e}else o?i=n/e:r&&(n=i*e);return{width:n,height:i}}function Xt(t,e,i,n){var a=e.aspectRatio,o=e.naturalWidth,h=e.naturalHeight,s=e.rotate,c=void 0===s?0:s,p=e.scaleX,l=void 0===p?1:p,d=e.scaleY,u=void 0===d?1:d,m=i.aspectRatio,g=i.naturalWidth,f=i.naturalHeight,v=n.fillColor,w=void 0===v?"transparent":v,b=n.imageSmoothingEnabled,x=void 0===b||b,y=n.imageSmoothingQuality,M=void 0===y?"low":y,C=n.maxWidth,D=void 0===C?1/0:C,k=n.maxHeight,A=void 0===k?1/0:k,B=n.minWidth,O=void 0===B?0:B,T=n.minHeight,E=void 0===T?0:T,z=document.createElement("canvas"),W=z.getContext("2d"),H=Rt({aspectRatio:m,width:D,height:A}),N=Rt({aspectRatio:m,width:O,height:E},"cover"),L=Math.min(H.width,Math.max(N.width,g)),R=Math.min(H.height,Math.max(N.height,f)),X=Rt({aspectRatio:a,width:D,height:A}),S=Rt({aspectRatio:a,width:O,height:E},"cover"),Y=Math.min(X.width,Math.max(S.width,o)),j=Math.min(X.height,Math.max(S.height,h)),I=[-Y/2,-j/2,Y,j];return z.width=mt(L),z.height=mt(R),W.fillStyle=w,W.fillRect(0,0,L,R),W.save(),W.translate(L/2,R/2),W.rotate(c*Math.PI/180),W.scale(l,u),W.imageSmoothingEnabled=x,W.imageSmoothingQuality=M,W.drawImage.apply(W,[t].concat(r(I.map((function(t){return Math.floor(mt(t))}))))),W.restore(),z}var St=String.fromCharCode,Yt=/^data:.*,/;function jt(t){var e,i=new DataView(t);try{var n,a,o;if(255===i.getUint8(0)&&216===i.getUint8(1))for(var r=i.byteLength,h=2;h+1<r;){if(255===i.getUint8(h)&&225===i.getUint8(h+1)){a=h;break}h+=1}if(a){var s=a+10;if("Exif"===function(t,e,i){var n="";i+=e;for(var a=e;a<i;a+=1)n+=St(t.getUint8(a));return n}(i,a+4,4)){var c=i.getUint16(s);if(((n=18761===c)||19789===c)&&42===i.getUint16(s+2,n)){var p=i.getUint32(s+4,n);p>=8&&(o=s+p)}}}if(o){var l,d,u=i.getUint16(o,n);for(d=0;d<u;d+=1)if(l=o+12*d+2,274===i.getUint16(l,n)){l+=8,e=i.getUint16(l,n),i.setUint16(l,1,n);break}}}catch(m){e=1}return e}var It={render:function(){this.initContainer(),this.initCanvas(),this.initCropBox(),this.renderCanvas(),this.cropped&&this.renderCropBox()},initContainer:function(){var t=this.element,e=this.options,i=this.container,n=this.cropper,a=Number(e.minContainerWidth),o=Number(e.minContainerHeight);vt(n,B),wt(t,B);var r={width:Math.max(i.offsetWidth,a>=0?a:200),height:Math.max(i.offsetHeight,o>=0?o:100)};this.containerData=r,ft(n,{width:r.width,height:r.height}),vt(t,B),wt(n,B)},initCanvas:function(){var t=this.containerData,e=this.imageData,i=this.options.viewMode,n=Math.abs(e.rotate)%180==90,a=n?e.naturalHeight:e.naturalWidth,o=n?e.naturalWidth:e.naturalHeight,r=a/o,h=t.width,s=t.height;t.height*r>t.width?3===i?h=t.height*r:s=t.width/r:3===i?s=t.width/r:h=t.height*r;var c={aspectRatio:r,naturalWidth:a,naturalHeight:o,width:h,height:s};this.canvasData=c,this.limited=1===i||2===i,this.limitCanvas(!0,!0),c.width=Math.min(Math.max(c.width,c.minWidth),c.maxWidth),c.height=Math.min(Math.max(c.height,c.minHeight),c.maxHeight),c.left=(t.width-c.width)/2,c.top=(t.height-c.height)/2,c.oldLeft=c.left,c.oldTop=c.top,this.initialCanvasData=dt({},c)},limitCanvas:function(t,e){var i=this.options,n=this.containerData,a=this.canvasData,o=this.cropBoxData,r=i.viewMode,h=a.aspectRatio,s=this.cropped&&o;if(t){var c=Number(i.minCanvasWidth)||0,p=Number(i.minCanvasHeight)||0;r>1?(c=Math.max(c,n.width),p=Math.max(p,n.height),3===r&&(p*h>c?c=p*h:p=c/h)):r>0&&(c?c=Math.max(c,s?o.width:0):p?p=Math.max(p,s?o.height:0):s&&(c=o.width,(p=o.height)*h>c?c=p*h:p=c/h));var l=Rt({aspectRatio:h,width:c,height:p});c=l.width,p=l.height,a.minWidth=c,a.minHeight=p,a.maxWidth=1/0,a.maxHeight=1/0}if(e)if(r>(s?0:1)){var d=n.width-a.width,u=n.height-a.height;a.minLeft=Math.min(0,d),a.minTop=Math.min(0,u),a.maxLeft=Math.max(0,d),a.maxTop=Math.max(0,u),s&&this.limited&&(a.minLeft=Math.min(o.left,o.left+(o.width-a.width)),a.minTop=Math.min(o.top,o.top+(o.height-a.height)),a.maxLeft=o.left,a.maxTop=o.top,2===r&&(a.width>=n.width&&(a.minLeft=Math.min(0,d),a.maxLeft=Math.max(0,d)),a.height>=n.height&&(a.minTop=Math.min(0,u),a.maxTop=Math.max(0,u))))}else a.minLeft=-a.width,a.minTop=-a.height,a.maxLeft=n.width,a.maxTop=n.height},renderCanvas:function(t,e){var i=this.canvasData,n=this.imageData;if(e){var a=function(t){var e=t.width,i=t.height,n=t.degree;if(90==(n=Math.abs(n)%180))return{width:i,height:e};var a=n%90*Math.PI/180,o=Math.sin(a),r=Math.cos(a),h=e*r+i*o,s=e*o+i*r;return n>90?{width:s,height:h}:{width:h,height:s}}({width:n.naturalWidth*Math.abs(n.scaleX||1),height:n.naturalHeight*Math.abs(n.scaleY||1),degree:n.rotate||0}),o=a.width,r=a.height,h=i.width*(o/i.naturalWidth),s=i.height*(r/i.naturalHeight);i.left-=(h-i.width)/2,i.top-=(s-i.height)/2,i.width=h,i.height=s,i.aspectRatio=o/r,i.naturalWidth=o,i.naturalHeight=r,this.limitCanvas(!0,!1)}(i.width>i.maxWidth||i.width<i.minWidth)&&(i.left=i.oldLeft),(i.height>i.maxHeight||i.height<i.minHeight)&&(i.top=i.oldTop),i.width=Math.min(Math.max(i.width,i.minWidth),i.maxWidth),i.height=Math.min(Math.max(i.height,i.minHeight),i.maxHeight),this.limitCanvas(!1,!0),i.left=Math.min(Math.max(i.left,i.minLeft),i.maxLeft),i.top=Math.min(Math.max(i.top,i.minTop),i.maxTop),i.oldLeft=i.left,i.oldTop=i.top,ft(this.canvas,dt({width:i.width,height:i.height},Nt({translateX:i.left,translateY:i.top}))),this.renderImage(t),this.cropped&&this.limited&&this.limitCropBox(!0,!0)},renderImage:function(t){var e=this.canvasData,i=this.imageData,n=i.naturalWidth*(e.width/e.naturalWidth),a=i.naturalHeight*(e.height/e.naturalHeight);dt(i,{width:n,height:a,left:(e.width-n)/2,top:(e.height-a)/2}),ft(this.image,dt({width:i.width,height:i.height},Nt(dt({translateX:i.left,translateY:i.top},i)))),t&&this.output()},initCropBox:function(){var t=this.options,e=this.canvasData,i=t.aspectRatio||t.initialAspectRatio,n=Number(t.autoCropArea)||.8,a={width:e.width,height:e.height};i&&(e.height*i>e.width?a.height=a.width/i:a.width=a.height*i),this.cropBoxData=a,this.limitCropBox(!0,!0),a.width=Math.min(Math.max(a.width,a.minWidth),a.maxWidth),a.height=Math.min(Math.max(a.height,a.minHeight),a.maxHeight),a.width=Math.max(a.minWidth,a.width*n),a.height=Math.max(a.minHeight,a.height*n),a.left=e.left+(e.width-a.width)/2,a.top=e.top+(e.height-a.height)/2,a.oldLeft=a.left,a.oldTop=a.top,this.initialCropBoxData=dt({},a)},limitCropBox:function(t,e){var i=this.options,n=this.containerData,a=this.canvasData,o=this.cropBoxData,r=this.limited,h=i.aspectRatio;if(t){var s=Number(i.minCropBoxWidth)||0,c=Number(i.minCropBoxHeight)||0,p=r?Math.min(n.width,a.width,a.width+a.left,n.width-a.left):n.width,l=r?Math.min(n.height,a.height,a.height+a.top,n.height-a.top):n.height;s=Math.min(s,n.width),c=Math.min(c,n.height),h&&(s&&c?c*h>s?c=s/h:s=c*h:s?c=s/h:c&&(s=c*h),l*h>p?l=p/h:p=l*h),o.minWidth=Math.min(s,p),o.minHeight=Math.min(c,l),o.maxWidth=p,o.maxHeight=l}e&&(r?(o.minLeft=Math.max(0,a.left),o.minTop=Math.max(0,a.top),o.maxLeft=Math.min(n.width,a.left+a.width)-o.width,o.maxTop=Math.min(n.height,a.top+a.height)-o.height):(o.minLeft=0,o.minTop=0,o.maxLeft=n.width-o.width,o.maxTop=n.height-o.height))},renderCropBox:function(){var t=this.options,e=this.containerData,i=this.cropBoxData;(i.width>i.maxWidth||i.width<i.minWidth)&&(i.left=i.oldLeft),(i.height>i.maxHeight||i.height<i.minHeight)&&(i.top=i.oldTop),i.width=Math.min(Math.max(i.width,i.minWidth),i.maxWidth),i.height=Math.min(Math.max(i.height,i.minHeight),i.maxHeight),this.limitCropBox(!1,!0),i.left=Math.min(Math.max(i.left,i.minLeft),i.maxLeft),i.top=Math.min(Math.max(i.top,i.minTop),i.maxTop),i.oldLeft=i.left,i.oldTop=i.top,t.movable&&t.cropBoxMovable&&Ct(this.face,W,i.width>=e.width&&i.height>=e.height?g:u),ft(this.cropBox,dt({width:i.width,height:i.height},Nt({translateX:i.left,translateY:i.top}))),this.cropped&&this.limited&&this.limitCanvas(!0,!0),this.disabled||this.output()},output:function(){this.preview(),Ot(this.element,X,this.getData())}},Pt={initPreview:function(){var t=this.element,e=this.crossOrigin,i=this.options.preview,n=e?this.crossOriginUrl:this.url,a=t.alt||"The image to preview",o=document.createElement("img");if(e&&(o.crossOrigin=e),o.src=n,o.alt=a,this.viewBox.appendChild(o),this.viewBoxImage=o,i){var r=i;"string"==typeof i?r=t.ownerDocument.querySelectorAll(i):i.querySelector&&(r=[i]),this.previews=r,lt(r,(function(t){var i=document.createElement("img");Ct(t,H,{width:t.offsetWidth,height:t.offsetHeight,html:t.innerHTML}),e&&(i.crossOrigin=e),i.src=n,i.alt=a,i.style.cssText='display:block;width:100%;height:auto;min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;image-orientation:0deg!important;"',t.innerHTML="",t.appendChild(i)}))}},resetPreview:function(){lt(this.previews,(function(t){var e=Mt(t,H);ft(t,{width:e.width,height:e.height}),t.innerHTML=e.html,function(t,e){if(ot(t[e]))try{delete t[e]}catch(i){t[e]=void 0}else if(t.dataset)try{delete t.dataset[e]}catch(i){t.dataset[e]=void 0}else t.removeAttribute("data-".concat(yt(e)))}(t,H)}))},preview:function(){var t=this.imageData,e=this.canvasData,i=this.cropBoxData,n=i.width,a=i.height,o=t.width,r=t.height,h=i.left-e.left-t.left,s=i.top-e.top-t.top;this.cropped&&!this.disabled&&(ft(this.viewBoxImage,dt({width:o,height:r},Nt(dt({translateX:-h,translateY:-s},t)))),lt(this.previews,(function(e){var i=Mt(e,H),c=i.width,p=i.height,l=c,d=p,u=1;n&&(d=a*(u=c/n)),a&&d>p&&(l=n*(u=p/a),d=p),ft(e,{width:l,height:d}),ft(e.getElementsByTagName("img")[0],dt({width:o*u,height:r*u},Nt(dt({translateX:-h*u,translateY:-s*u},t))))})))}},Ut={bind:function(){var t=this.element,e=this.options,i=this.cropper;st(e.cropstart)&&Bt(t,j,e.cropstart),st(e.cropmove)&&Bt(t,Y,e.cropmove),st(e.cropend)&&Bt(t,S,e.cropend),st(e.crop)&&Bt(t,X,e.crop),st(e.zoom)&&Bt(t,$,e.zoom),Bt(i,P,this.onCropStart=this.cropStart.bind(this)),e.zoomable&&e.zoomOnWheel&&Bt(i,F,this.onWheel=this.wheel.bind(this),{passive:!1,capture:!0}),e.toggleDragModeOnDblclick&&Bt(i,I,this.onDblclick=this.dblclick.bind(this)),Bt(t.ownerDocument,U,this.onCropMove=this.cropMove.bind(this)),Bt(t.ownerDocument,q,this.onCropEnd=this.cropEnd.bind(this)),e.responsive&&Bt(window,Z,this.onResize=this.resize.bind(this))},unbind:function(){var t=this.element,e=this.options,i=this.cropper;st(e.cropstart)&&At(t,j,e.cropstart),st(e.cropmove)&&At(t,Y,e.cropmove),st(e.cropend)&&At(t,S,e.cropend),st(e.crop)&&At(t,X,e.crop),st(e.zoom)&&At(t,$,e.zoom),At(i,P,this.onCropStart),e.zoomable&&e.zoomOnWheel&&At(i,F,this.onWheel,{passive:!1,capture:!0}),e.toggleDragModeOnDblclick&&At(i,I,this.onDblclick),At(t.ownerDocument,U,this.onCropMove),At(t.ownerDocument,q,this.onCropEnd),e.responsive&&At(window,Z,this.onResize)}},qt={resize:function(){if(!this.disabled){var t,e,i=this.options,n=this.container,a=this.containerData,o=n.offsetWidth/a.width;1===o&&n.offsetHeight===a.height||(i.restore&&(t=this.getCanvasData(),e=this.getCropBoxData()),this.render(),i.restore&&(this.setCanvasData(lt(t,(function(e,i){t[i]=e*o}))),this.setCropBoxData(lt(e,(function(t,i){e[i]=t*o})))))}},dblclick:function(){var t,e;this.disabled||this.options.dragMode===R||this.setDragMode((t=this.dragBox,e=k,(t.classList?t.classList.contains(e):t.className.indexOf(e)>-1)?L:N))},wheel:function(t){var e=this,i=Number(this.options.wheelZoomRatio)||.1,n=1;this.disabled||(t.preventDefault(),this.wheeling||(this.wheeling=!0,setTimeout((function(){e.wheeling=!1}),50),t.deltaY?n=t.deltaY>0?1:-1:t.wheelDelta?n=-t.wheelDelta/120:t.detail&&(n=t.detail>0?1:-1),this.zoom(-n*i,t)))},cropStart:function(t){var e=t.buttons,i=t.button;if(!(this.disabled||("mousedown"===t.type||"pointerdown"===t.type&&"mouse"===t.pointerType)&&(it(e)&&1!==e||it(i)&&0!==i||t.ctrlKey))){var n,a=this.options,o=this.pointers;t.changedTouches?lt(t.changedTouches,(function(t){o[t.identifier]=Lt(t)})):o[t.pointerId||0]=Lt(t),n=Object.keys(o).length>1&&a.zoomable&&a.zoomOnTouch?f:Mt(t.target,W),V.test(n)&&!1!==Ot(this.element,j,{originalEvent:t,action:n})&&(t.preventDefault(),this.action=n,this.cropping=!1,n===m&&(this.cropping=!0,vt(this.dragBox,E)))}},cropMove:function(t){var e=this.action;if(!this.disabled&&e){var i=this.pointers;t.preventDefault(),!1!==Ot(this.element,Y,{originalEvent:t,action:e})&&(t.changedTouches?lt(t.changedTouches,(function(t){dt(i[t.identifier]||{},Lt(t,!0))})):dt(i[t.pointerId||0]||{},Lt(t,!0)),this.change(t))}},cropEnd:function(t){if(!this.disabled){var e=this.action,i=this.pointers;t.changedTouches?lt(t.changedTouches,(function(t){delete i[t.identifier]})):delete i[t.pointerId||0],e&&(t.preventDefault(),Object.keys(i).length||(this.action=""),this.cropping&&(this.cropping=!1,bt(this.dragBox,E,this.cropped&&this.options.modal)),Ot(this.element,S,{originalEvent:t,action:e}))}}},Qt={change:function(t){var e,i=this.options,n=this.canvasData,a=this.containerData,r=this.cropBoxData,h=this.pointers,s=this.action,c=i.aspectRatio,p=r.left,l=r.top,d=r.width,k=r.height,A=p+d,O=l+k,T=0,E=0,z=a.width,W=a.height,H=!0;!c&&t.shiftKey&&(c=d&&k?d/k:1),this.limited&&(T=r.minLeft,E=r.minTop,z=T+Math.min(a.width,n.width,n.left+n.width),W=E+Math.min(a.height,n.height,n.top+n.height));var N=h[Object.keys(h)[0]],L={x:N.endX-N.startX,y:N.endY-N.startY},R=function(t){switch(t){case v:A+L.x>z&&(L.x=z-A);break;case w:p+L.x<T&&(L.x=T-p);break;case x:l+L.y<E&&(L.y=E-l);break;case b:O+L.y>W&&(L.y=W-O)}};switch(s){case u:p+=L.x,l+=L.y;break;case v:if(L.x>=0&&(A>=z||c&&(l<=E||O>=W))){H=!1;break}R(v),(d+=L.x)<0&&(s=w,p-=d=-d),c&&(k=d/c,l+=(r.height-k)/2);break;case x:if(L.y<=0&&(l<=E||c&&(p<=T||A>=z))){H=!1;break}R(x),k-=L.y,l+=L.y,k<0&&(s=b,l-=k=-k),c&&(d=k*c,p+=(r.width-d)/2);break;case w:if(L.x<=0&&(p<=T||c&&(l<=E||O>=W))){H=!1;break}R(w),d-=L.x,p+=L.x,d<0&&(s=v,p-=d=-d),c&&(k=d/c,l+=(r.height-k)/2);break;case b:if(L.y>=0&&(O>=W||c&&(p<=T||A>=z))){H=!1;break}R(b),(k+=L.y)<0&&(s=x,l-=k=-k),c&&(d=k*c,p+=(r.width-d)/2);break;case y:if(c){if(L.y<=0&&(l<=E||A>=z)){H=!1;break}R(x),k-=L.y,l+=L.y,d=k*c}else R(x),R(v),L.x>=0?A<z?d+=L.x:L.y<=0&&l<=E&&(H=!1):d+=L.x,L.y<=0?l>E&&(k-=L.y,l+=L.y):(k-=L.y,l+=L.y);d<0&&k<0?(s=D,l-=k=-k,p-=d=-d):d<0?(s=M,p-=d=-d):k<0&&(s=C,l-=k=-k);break;case M:if(c){if(L.y<=0&&(l<=E||p<=T)){H=!1;break}R(x),k-=L.y,l+=L.y,d=k*c,p+=r.width-d}else R(x),R(w),L.x<=0?p>T?(d-=L.x,p+=L.x):L.y<=0&&l<=E&&(H=!1):(d-=L.x,p+=L.x),L.y<=0?l>E&&(k-=L.y,l+=L.y):(k-=L.y,l+=L.y);d<0&&k<0?(s=C,l-=k=-k,p-=d=-d):d<0?(s=y,p-=d=-d):k<0&&(s=D,l-=k=-k);break;case D:if(c){if(L.x<=0&&(p<=T||O>=W)){H=!1;break}R(w),d-=L.x,p+=L.x,k=d/c}else R(b),R(w),L.x<=0?p>T?(d-=L.x,p+=L.x):L.y>=0&&O>=W&&(H=!1):(d-=L.x,p+=L.x),L.y>=0?O<W&&(k+=L.y):k+=L.y;d<0&&k<0?(s=y,l-=k=-k,p-=d=-d):d<0?(s=C,p-=d=-d):k<0&&(s=M,l-=k=-k);break;case C:if(c){if(L.x>=0&&(A>=z||O>=W)){H=!1;break}R(v),k=(d+=L.x)/c}else R(b),R(v),L.x>=0?A<z?d+=L.x:L.y>=0&&O>=W&&(H=!1):d+=L.x,L.y>=0?O<W&&(k+=L.y):k+=L.y;d<0&&k<0?(s=M,l-=k=-k,p-=d=-d):d<0?(s=D,p-=d=-d):k<0&&(s=y,l-=k=-k);break;case g:this.move(L.x,L.y),H=!1;break;case f:this.zoom(function(t){var e=o({},t),i=0;return lt(t,(function(t,n){delete e[n],lt(e,(function(e){var n=Math.abs(t.startX-e.startX),a=Math.abs(t.startY-e.startY),o=Math.abs(t.endX-e.endX),r=Math.abs(t.endY-e.endY),h=Math.sqrt(n*n+a*a),s=(Math.sqrt(o*o+r*r)-h)/h;Math.abs(s)>Math.abs(i)&&(i=s)}))})),i}(h),t),H=!1;break;case m:if(!L.x||!L.y){H=!1;break}e=Tt(this.cropper),p=N.startX-e.left,l=N.startY-e.top,d=r.minWidth,k=r.minHeight,L.x>0?s=L.y>0?C:y:L.x<0&&(p-=d,s=L.y>0?D:M),L.y<0&&(l-=k),this.cropped||(wt(this.cropBox,B),this.cropped=!0,this.limited&&this.limitCropBox(!0,!0))}H&&(r.width=d,r.height=k,r.left=p,r.top=l,this.action=s,this.renderCropBox()),lt(h,(function(t){t.startX=t.endX,t.startY=t.endY}))}},Zt={crop:function(){return!this.ready||this.cropped||this.disabled||(this.cropped=!0,this.limitCropBox(!0,!0),this.options.modal&&vt(this.dragBox,E),wt(this.cropBox,B),this.setCropBoxData(this.initialCropBoxData)),this},reset:function(){return this.ready&&!this.disabled&&(this.imageData=dt({},this.initialImageData),this.canvasData=dt({},this.initialCanvasData),this.cropBoxData=dt({},this.initialCropBoxData),this.renderCanvas(),this.cropped&&this.renderCropBox()),this},clear:function(){return this.cropped&&!this.disabled&&(dt(this.cropBoxData,{left:0,top:0,width:0,height:0}),this.cropped=!1,this.renderCropBox(),this.limitCanvas(!0,!0),this.renderCanvas(),wt(this.dragBox,E),vt(this.cropBox,B)),this},replace:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return!this.disabled&&t&&(this.isImg&&(this.element.src=t),e?(this.url=t,this.image.src=t,this.ready&&(this.viewBoxImage.src=t,lt(this.previews,(function(e){e.getElementsByTagName("img")[0].src=t})))):(this.isImg&&(this.replaced=!0),this.options.data=null,this.uncreate(),this.load(t))),this},enable:function(){return this.ready&&this.disabled&&(this.disabled=!1,wt(this.cropper,A)),this},disable:function(){return this.ready&&!this.disabled&&(this.disabled=!0,vt(this.cropper,A)),this},destroy:function(){var t=this.element;return t.cropper?(t.cropper=void 0,this.isImg&&this.replaced&&(t.src=this.originalUrl),this.uncreate(),this):this},move:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,i=this.canvasData,n=i.left,a=i.top;return this.moveTo(at(t)?t:n+Number(t),at(e)?e:a+Number(e))},moveTo:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,i=this.canvasData,n=!1;return t=Number(t),e=Number(e),this.ready&&!this.disabled&&this.options.movable&&(it(t)&&(i.left=t,n=!0),it(e)&&(i.top=e,n=!0),n&&this.renderCanvas(!0)),this},zoom:function(t,e){var i=this.canvasData;return t=(t=Number(t))<0?1/(1-t):1+t,this.zoomTo(i.width*t/i.naturalWidth,null,e)},zoomTo:function(t,e,i){var n=this.options,a=this.canvasData,o=a.width,r=a.height,h=a.naturalWidth,s=a.naturalHeight;if((t=Number(t))>=0&&this.ready&&!this.disabled&&n.zoomable){var c=h*t,p=s*t;if(!1===Ot(this.element,$,{ratio:t,oldRatio:o/h,originalEvent:i}))return this;if(i){var l=this.pointers,d=Tt(this.cropper),u=l&&Object.keys(l).length?function(t){var e=0,i=0,n=0;return lt(t,(function(t){var a=t.startX,o=t.startY;e+=a,i+=o,n+=1})),{pageX:e/=n,pageY:i/=n}}(l):{pageX:i.pageX,pageY:i.pageY};a.left-=(c-o)*((u.pageX-d.left-a.left)/o),a.top-=(p-r)*((u.pageY-d.top-a.top)/r)}else ht(e)&&it(e.x)&&it(e.y)?(a.left-=(c-o)*((e.x-a.left)/o),a.top-=(p-r)*((e.y-a.top)/r)):(a.left-=(c-o)/2,a.top-=(p-r)/2);a.width=c,a.height=p,this.renderCanvas(!0)}return this},rotate:function(t){return this.rotateTo((this.imageData.rotate||0)+Number(t))},rotateTo:function(t){return it(t=Number(t))&&this.ready&&!this.disabled&&this.options.rotatable&&(this.imageData.rotate=t%360,this.renderCanvas(!0,!0)),this},scaleX:function(t){var e=this.imageData.scaleY;return this.scale(t,it(e)?e:1)},scaleY:function(t){var e=this.imageData.scaleX;return this.scale(it(e)?e:1,t)},scale:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,i=this.imageData,n=!1;return t=Number(t),e=Number(e),this.ready&&!this.disabled&&this.options.scalable&&(it(t)&&(i.scaleX=t,n=!0),it(e)&&(i.scaleY=e,n=!0),n&&this.renderCanvas(!0,!0)),this},getData:function(){var t,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],i=this.options,n=this.imageData,a=this.canvasData,o=this.cropBoxData;if(this.ready&&this.cropped){t={x:o.left-a.left,y:o.top-a.top,width:o.width,height:o.height};var r=n.width/n.naturalWidth;if(lt(t,(function(e,i){t[i]=e/r})),e){var h=Math.round(t.y+t.height),s=Math.round(t.x+t.width);t.x=Math.round(t.x),t.y=Math.round(t.y),t.width=s-t.x,t.height=h-t.y}}else t={x:0,y:0,width:0,height:0};return i.rotatable&&(t.rotate=n.rotate||0),i.scalable&&(t.scaleX=n.scaleX||1,t.scaleY=n.scaleY||1),t},setData:function(t){var e=this.options,i=this.imageData,n=this.canvasData,a={};if(this.ready&&!this.disabled&&ht(t)){var o=!1;e.rotatable&&it(t.rotate)&&t.rotate!==i.rotate&&(i.rotate=t.rotate,o=!0),e.scalable&&(it(t.scaleX)&&t.scaleX!==i.scaleX&&(i.scaleX=t.scaleX,o=!0),it(t.scaleY)&&t.scaleY!==i.scaleY&&(i.scaleY=t.scaleY,o=!0)),o&&this.renderCanvas(!0,!0);var r=i.width/i.naturalWidth;it(t.x)&&(a.left=t.x*r+n.left),it(t.y)&&(a.top=t.y*r+n.top),it(t.width)&&(a.width=t.width*r),it(t.height)&&(a.height=t.height*r),this.setCropBoxData(a)}return this},getContainerData:function(){return this.ready?dt({},this.containerData):{}},getImageData:function(){return this.sized?dt({},this.imageData):{}},getCanvasData:function(){var t=this.canvasData,e={};return this.ready&<(["left","top","width","height","naturalWidth","naturalHeight"],(function(i){e[i]=t[i]})),e},setCanvasData:function(t){var e=this.canvasData,i=e.aspectRatio;return this.ready&&!this.disabled&&ht(t)&&(it(t.left)&&(e.left=t.left),it(t.top)&&(e.top=t.top),it(t.width)?(e.width=t.width,e.height=t.width/i):it(t.height)&&(e.height=t.height,e.width=t.height*i),this.renderCanvas(!0)),this},getCropBoxData:function(){var t,e=this.cropBoxData;return this.ready&&this.cropped&&(t={left:e.left,top:e.top,width:e.width,height:e.height}),t||{}},setCropBoxData:function(t){var e,i,n=this.cropBoxData,a=this.options.aspectRatio;return this.ready&&this.cropped&&!this.disabled&&ht(t)&&(it(t.left)&&(n.left=t.left),it(t.top)&&(n.top=t.top),it(t.width)&&t.width!==n.width&&(e=!0,n.width=t.width),it(t.height)&&t.height!==n.height&&(i=!0,n.height=t.height),a&&(e?n.height=n.width/a:i&&(n.width=n.height*a)),this.renderCropBox()),this},getCroppedCanvas:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!this.ready||!window.HTMLCanvasElement)return null;var e=this.canvasData,i=Xt(this.image,this.imageData,e,t);if(!this.cropped)return i;var n=this.getData(),a=n.x,o=n.y,h=n.width,s=n.height,c=i.width/Math.floor(e.naturalWidth);1!==c&&(a*=c,o*=c,h*=c,s*=c);var p=h/s,l=Rt({aspectRatio:p,width:t.maxWidth||1/0,height:t.maxHeight||1/0}),d=Rt({aspectRatio:p,width:t.minWidth||0,height:t.minHeight||0},"cover"),u=Rt({aspectRatio:p,width:t.width||(1!==c?i.width:h),height:t.height||(1!==c?i.height:s)}),m=u.width,g=u.height;m=Math.min(l.width,Math.max(d.width,m)),g=Math.min(l.height,Math.max(d.height,g));var f=document.createElement("canvas"),v=f.getContext("2d");f.width=mt(m),f.height=mt(g),v.fillStyle=t.fillColor||"transparent",v.fillRect(0,0,m,g);var w=t.imageSmoothingEnabled,b=void 0===w||w,x=t.imageSmoothingQuality;v.imageSmoothingEnabled=b,x&&(v.imageSmoothingQuality=x);var y,M,C,D,k,A,B=i.width,O=i.height,T=a,E=o;T<=-h||T>B?(T=0,y=0,C=0,k=0):T<=0?(C=-T,T=0,k=y=Math.min(B,h+T)):T<=B&&(C=0,k=y=Math.min(h,B-T)),y<=0||E<=-s||E>O?(E=0,M=0,D=0,A=0):E<=0?(D=-E,E=0,A=M=Math.min(O,s+E)):E<=O&&(D=0,A=M=Math.min(s,O-E));var z=[T,E,y,M];if(k>0&&A>0){var W=m/h;z.push(C*W,D*W,k*W,A*W)}return v.drawImage.apply(v,[i].concat(r(z.map((function(t){return Math.floor(mt(t))}))))),f},setAspectRatio:function(t){var e=this.options;return this.disabled||at(t)||(e.aspectRatio=Math.max(0,t)||NaN,this.ready&&(this.initCropBox(),this.cropped&&this.renderCropBox())),this},setDragMode:function(t){var e=this.options,i=this.dragBox,n=this.face;if(this.ready&&!this.disabled){var a=t===N,o=e.movable&&t===L;t=a||o?t:R,e.dragMode=t,Ct(i,W,t),bt(i,k,a),bt(i,z,o),e.cropBoxMovable||(Ct(n,W,t),bt(n,k,a),bt(n,z,o))}return this}},Ft=c.Cropper,$t=function(){function t(i){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e(this,t),!i||!J.test(i.tagName))throw new Error("The first argument is required and must be an <img> or <canvas> element.");this.element=i,this.options=dt({},tt,ht(n)&&n),this.cropped=!1,this.disabled=!1,this.pointers={},this.ready=!1,this.reloading=!1,this.replaced=!1,this.sized=!1,this.sizing=!1,this.init()}var n,a,o;return n=t,o=[{key:"noConflict",value:function(){return window.Cropper=Ft,t}},{key:"setDefaults",value:function(t){dt(tt,ht(t)&&t)}}],(a=[{key:"init",value:function(){var t,e=this.element,i=e.tagName.toLowerCase();if(!e.cropper){if(e.cropper=this,"img"===i){if(this.isImg=!0,t=e.getAttribute("src")||"",this.originalUrl=t,!t)return;t=e.src}else"canvas"===i&&window.HTMLCanvasElement&&(t=e.toDataURL());this.load(t)}}},{key:"load",value:function(t){var e=this;if(t){this.url=t,this.imageData={};var i=this.element,n=this.options;if(n.rotatable||n.scalable||(n.checkOrientation=!1),n.checkOrientation&&window.ArrayBuffer)if(K.test(t))_.test(t)?this.read((a=t.replace(Yt,""),o=atob(a),r=new ArrayBuffer(o.length),lt(h=new Uint8Array(r),(function(t,e){h[e]=o.charCodeAt(e)})),r)):this.clone();else{var a,o,r,h,s=new XMLHttpRequest,c=this.clone.bind(this);this.reloading=!0,this.xhr=s,s.onabort=c,s.onerror=c,s.ontimeout=c,s.onprogress=function(){s.getResponseHeader("content-type")!==G&&s.abort()},s.onload=function(){e.read(s.response)},s.onloadend=function(){e.reloading=!1,e.xhr=null},n.checkCrossOrigin&&Wt(t)&&i.crossOrigin&&(t=Ht(t)),s.open("GET",t,!0),s.responseType="arraybuffer",s.withCredentials="use-credentials"===i.crossOrigin,s.send()}else this.clone()}}},{key:"read",value:function(t){var e=this.options,i=this.imageData,n=jt(t),a=0,o=1,r=1;if(n>1){this.url=function(t,e){for(var i=[],n=new Uint8Array(t);n.length>0;)i.push(St.apply(null,pt(n.subarray(0,8192)))),n=n.subarray(8192);return"data:".concat(e,";base64,").concat(btoa(i.join("")))}(t,G);var h=function(t){var e=0,i=1,n=1;switch(t){case 2:i=-1;break;case 3:e=-180;break;case 4:n=-1;break;case 5:e=90,n=-1;break;case 6:e=90;break;case 7:e=90,i=-1;break;case 8:e=-90}return{rotate:e,scaleX:i,scaleY:n}}(n);a=h.rotate,o=h.scaleX,r=h.scaleY}e.rotatable&&(i.rotate=a),e.scalable&&(i.scaleX=o,i.scaleY=r),this.clone()}},{key:"clone",value:function(){var t=this.element,e=this.url,i=t.crossOrigin,n=e;this.options.checkCrossOrigin&&Wt(e)&&(i||(i="anonymous"),n=Ht(e)),this.crossOrigin=i,this.crossOriginUrl=n;var a=document.createElement("img");i&&(a.crossOrigin=i),a.src=n||e,a.alt=t.alt||"The image to crop",this.image=a,a.onload=this.start.bind(this),a.onerror=this.stop.bind(this),vt(a,O),t.parentNode.insertBefore(a,t.nextSibling)}},{key:"start",value:function(){var t=this,e=this.image;e.onload=null,e.onerror=null,this.sizing=!0;var i=c.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(c.navigator.userAgent),n=function(e,i){dt(t.imageData,{naturalWidth:e,naturalHeight:i,aspectRatio:e/i}),t.initialImageData=dt({},t.imageData),t.sizing=!1,t.sized=!0,t.build()};if(!e.naturalWidth||i){var a=document.createElement("img"),o=document.body||document.documentElement;this.sizingImage=a,a.onload=function(){n(a.width,a.height),i||o.removeChild(a)},a.src=e.src,i||(a.style.cssText="left:0;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;opacity:0;position:absolute;top:0;z-index:-1;",o.appendChild(a))}else n(e.naturalWidth,e.naturalHeight)}},{key:"stop",value:function(){var t=this.image;t.onload=null,t.onerror=null,t.parentNode.removeChild(t),this.image=null}},{key:"build",value:function(){if(this.sized&&!this.ready){var t=this.element,e=this.options,i=this.image,n=t.parentNode,a=document.createElement("div");a.innerHTML='<div class="cropper-container" touch-action="none"><div class="cropper-wrap-box"><div class="cropper-canvas"></div></div><div class="cropper-drag-box"></div><div class="cropper-crop-box"><span class="cropper-view-box"></span><span class="cropper-dashed dashed-h"></span><span class="cropper-dashed dashed-v"></span><span class="cropper-center"></span><span class="cropper-face"></span><span class="cropper-line line-e" data-cropper-action="e"></span><span class="cropper-line line-n" data-cropper-action="n"></span><span class="cropper-line line-w" data-cropper-action="w"></span><span class="cropper-line line-s" data-cropper-action="s"></span><span class="cropper-point point-e" data-cropper-action="e"></span><span class="cropper-point point-n" data-cropper-action="n"></span><span class="cropper-point point-w" data-cropper-action="w"></span><span class="cropper-point point-s" data-cropper-action="s"></span><span class="cropper-point point-ne" data-cropper-action="ne"></span><span class="cropper-point point-nw" data-cropper-action="nw"></span><span class="cropper-point point-sw" data-cropper-action="sw"></span><span class="cropper-point point-se" data-cropper-action="se"></span></div></div>';var o=a.querySelector(".".concat(d,"-container")),r=o.querySelector(".".concat(d,"-canvas")),h=o.querySelector(".".concat(d,"-drag-box")),s=o.querySelector(".".concat(d,"-crop-box")),c=s.querySelector(".".concat(d,"-face"));this.container=n,this.cropper=o,this.canvas=r,this.dragBox=h,this.cropBox=s,this.viewBox=o.querySelector(".".concat(d,"-view-box")),this.face=c,r.appendChild(i),vt(t,B),n.insertBefore(o,t.nextSibling),this.isImg||wt(i,O),this.initPreview(),this.bind(),e.initialAspectRatio=Math.max(0,e.initialAspectRatio)||NaN,e.aspectRatio=Math.max(0,e.aspectRatio)||NaN,e.viewMode=Math.max(0,Math.min(3,Math.round(e.viewMode)))||0,vt(s,B),e.guides||vt(s.getElementsByClassName("".concat(d,"-dashed")),B),e.center||vt(s.getElementsByClassName("".concat(d,"-center")),B),e.background&&vt(o,"".concat(d,"-bg")),e.highlight||vt(c,T),e.cropBoxMovable&&(vt(c,z),Ct(c,W,u)),e.cropBoxResizable||(vt(s.getElementsByClassName("".concat(d,"-line")),B),vt(s.getElementsByClassName("".concat(d,"-point")),B)),this.render(),this.ready=!0,this.setDragMode(e.dragMode),e.autoCrop&&this.crop(),this.setData(e.data),st(e.ready)&&Bt(t,Q,e.ready,{once:!0}),Ot(t,Q)}}},{key:"unbuild",value:function(){this.ready&&(this.ready=!1,this.unbind(),this.resetPreview(),this.cropper.parentNode.removeChild(this.cropper),wt(this.element,B))}},{key:"uncreate",value:function(){this.ready?(this.unbuild(),this.ready=!1,this.cropped=!1):this.sizing?(this.sizingImage.onload=null,this.sizing=!1,this.sized=!1):this.reloading?(this.xhr.onabort=null,this.xhr.abort()):this.image&&this.stop()}}])&&i(n.prototype,a),o&&i(n,o),t}();return dt($t.prototype,It,Pt,Ut,qt,Qt,Zt),$t},"object"===r(e)?t.exports=o():void 0===(a="function"==typeof(n=o)?n.call(e,i,e,t):n)||(t.exports=a)},17692:function(t,e){"use strict";e.Z="/*!\n * Cropper.js v1.5.11\n * https://fengyuanchen.github.io/cropperjs\n *\n * Copyright 2015-present Chen Fengyuan\n * Released under the MIT license\n *\n * Date: 2021-02-17T11:53:21.992Z\n */\n\n.cropper-container {\n direction: ltr;\n font-size: 0;\n line-height: 0;\n position: relative;\n -ms-touch-action: none;\n touch-action: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n\n.cropper-container img {\n display: block;\n height: 100%;\n image-orientation: 0deg;\n max-height: none !important;\n max-width: none !important;\n min-height: 0 !important;\n min-width: 0 !important;\n width: 100%;\n}\n\n.cropper-wrap-box,\n.cropper-canvas,\n.cropper-drag-box,\n.cropper-crop-box,\n.cropper-modal {\n bottom: 0;\n left: 0;\n position: absolute;\n right: 0;\n top: 0;\n}\n\n.cropper-wrap-box,\n.cropper-canvas {\n overflow: hidden;\n}\n\n.cropper-drag-box {\n background-color: #fff;\n opacity: 0;\n}\n\n.cropper-modal {\n background-color: #000;\n opacity: 0.5;\n}\n\n.cropper-view-box {\n display: block;\n height: 100%;\n outline: 1px solid #39f;\n outline-color: rgba(51, 153, 255, 0.75);\n overflow: hidden;\n width: 100%;\n}\n\n.cropper-dashed {\n border: 0 dashed #eee;\n display: block;\n opacity: 0.5;\n position: absolute;\n}\n\n.cropper-dashed.dashed-h {\n border-bottom-width: 1px;\n border-top-width: 1px;\n height: calc(100% / 3);\n left: 0;\n top: calc(100% / 3);\n width: 100%;\n}\n\n.cropper-dashed.dashed-v {\n border-left-width: 1px;\n border-right-width: 1px;\n height: 100%;\n left: calc(100% / 3);\n top: 0;\n width: calc(100% / 3);\n}\n\n.cropper-center {\n display: block;\n height: 0;\n left: 50%;\n opacity: 0.75;\n position: absolute;\n top: 50%;\n width: 0;\n}\n\n.cropper-center::before,\n.cropper-center::after {\n background-color: #eee;\n content: ' ';\n display: block;\n position: absolute;\n}\n\n.cropper-center::before {\n height: 1px;\n left: -3px;\n top: 0;\n width: 7px;\n}\n\n.cropper-center::after {\n height: 7px;\n left: 0;\n top: -3px;\n width: 1px;\n}\n\n.cropper-face,\n.cropper-line,\n.cropper-point {\n display: block;\n height: 100%;\n opacity: 0.1;\n position: absolute;\n width: 100%;\n}\n\n.cropper-face {\n background-color: #fff;\n left: 0;\n top: 0;\n}\n\n.cropper-line {\n background-color: #39f;\n}\n\n.cropper-line.line-e {\n cursor: ew-resize;\n right: -3px;\n top: 0;\n width: 5px;\n}\n\n.cropper-line.line-n {\n cursor: ns-resize;\n height: 5px;\n left: 0;\n top: -3px;\n}\n\n.cropper-line.line-w {\n cursor: ew-resize;\n left: -3px;\n top: 0;\n width: 5px;\n}\n\n.cropper-line.line-s {\n bottom: -3px;\n cursor: ns-resize;\n height: 5px;\n left: 0;\n}\n\n.cropper-point {\n background-color: #39f;\n height: 5px;\n opacity: 0.75;\n width: 5px;\n}\n\n.cropper-point.point-e {\n cursor: ew-resize;\n margin-top: -3px;\n right: -3px;\n top: 50%;\n}\n\n.cropper-point.point-n {\n cursor: ns-resize;\n left: 50%;\n margin-left: -3px;\n top: -3px;\n}\n\n.cropper-point.point-w {\n cursor: ew-resize;\n left: -3px;\n margin-top: -3px;\n top: 50%;\n}\n\n.cropper-point.point-s {\n bottom: -3px;\n cursor: s-resize;\n left: 50%;\n margin-left: -3px;\n}\n\n.cropper-point.point-ne {\n cursor: nesw-resize;\n right: -3px;\n top: -3px;\n}\n\n.cropper-point.point-nw {\n cursor: nwse-resize;\n left: -3px;\n top: -3px;\n}\n\n.cropper-point.point-sw {\n bottom: -3px;\n cursor: nesw-resize;\n left: -3px;\n}\n\n.cropper-point.point-se {\n bottom: -3px;\n cursor: nwse-resize;\n height: 20px;\n opacity: 1;\n right: -3px;\n width: 20px;\n}\n\n@media (min-width: 768px) {\n .cropper-point.point-se {\n height: 15px;\n width: 15px;\n }\n}\n\n@media (min-width: 992px) {\n .cropper-point.point-se {\n height: 10px;\n width: 10px;\n }\n}\n\n@media (min-width: 1200px) {\n .cropper-point.point-se {\n height: 5px;\n opacity: 0.75;\n width: 5px;\n }\n}\n\n.cropper-point.point-se::before {\n background-color: #39f;\n bottom: -50%;\n content: ' ';\n display: block;\n height: 200%;\n opacity: 0;\n position: absolute;\n right: -50%;\n width: 200%;\n}\n\n.cropper-invisible {\n opacity: 0;\n}\n\n.cropper-bg {\n background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAAA3NCSVQICAjb4U/gAAAABlBMVEXMzMz////TjRV2AAAACXBIWXMAAArrAAAK6wGCiw1aAAAAHHRFWHRTb2Z0d2FyZQBBZG9iZSBGaXJld29ya3MgQ1M26LyyjAAAABFJREFUCJlj+M/AgBVhF/0PAH6/D/HkDxOGAAAAAElFTkSuQmCC');\n}\n\n.cropper-hide {\n display: block;\n height: 0;\n position: absolute;\n width: 0;\n}\n\n.cropper-hidden {\n display: none !important;\n}\n\n.cropper-move {\n cursor: move;\n}\n\n.cropper-crop {\n cursor: crosshair;\n}\n\n.cropper-disabled .cropper-drag-box,\n.cropper-disabled .cropper-face,\n.cropper-disabled .cropper-line,\n.cropper-disabled .cropper-point {\n cursor: not-allowed;\n}\n"}}]);
//# sourceMappingURL=chunk.14774f78116e9bd23b60.js.map