build/vendors~p__Competitions__Up...

11 lines
50 KiB
JavaScript

(window.webpackJsonp=window.webpackJsonp||[]).push([[18],{AOa7:function(he,z,w){},HQEm:function(he,z,w){"use strict";Object.defineProperty(z,"__esModule",{value:!0}),z.default=void 0;var Y=f(w("Sj0X"));function f(F){return F&&F.__esModule?F:{default:F}}var G=Y;z.default=G,he.exports=G},Sj0X:function(he,z,w){"use strict";var Y=w("284h"),f=w("TqRt");Object.defineProperty(z,"__esModule",{value:!0}),z.default=void 0;var G=f(w("3tO9")),F=Y(w("q1tI")),me=f(w("XuBP")),ie=f(w("KQxl")),B=function(Ee,Ae){return F.createElement(ie.default,(0,G.default)((0,G.default)({},Ee),{},{ref:Ae,icon:me.default}))};B.displayName="DownOutlined";var ce=F.forwardRef(B);z.default=ce},XuBP:function(he,z,w){"use strict";Object.defineProperty(z,"__esModule",{value:!0});var Y={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"}}]},name:"down",theme:"outlined"};z.default=Y},YQfW:function(he,z,w){},bE4q:function(he,z,w){"use strict";var Y=w("pVnL"),f=w.n(Y),G=w("lSNA"),F=w.n(G),me=w("RIqP"),ie=w.n(me),B=w("q1tI"),ce=w("TSYQ"),je=w.n(ce),Ee=w("Zm9Q"),Ae=w("HQEm"),Ne=w.n(Ae),Ge=w("XBQK"),te=w("H84U"),Z=function(C,y){var T={};for(var E in C)Object.prototype.hasOwnProperty.call(C,E)&&y.indexOf(E)<0&&(T[E]=C[E]);if(C!=null&&typeof Object.getOwnPropertySymbols=="function")for(var R=0,E=Object.getOwnPropertySymbols(C);R<E.length;R++)y.indexOf(E[R])<0&&Object.prototype.propertyIsEnumerable.call(C,E[R])&&(T[E[R]]=C[E[R]]);return T},le=function(y){var T=y.prefixCls,E=y.separator,R=E===void 0?"/":E,I=y.children,De=y.overlay,q=y.dropdownProps,ne=Z(y,["prefixCls","separator","children","overlay","dropdownProps"]),xe=B.useContext(te.b),Be=xe.getPrefixCls,ue=Be("breadcrumb",T),de=function(Oe){return De?B.createElement(Ge.a,f()({overlay:De,placement:"bottomCenter"},q),B.createElement("span",{className:"".concat(ue,"-overlay-link")},Oe,B.createElement(Ne.a,null))):Oe},oe;return"href"in ne?oe=B.createElement("a",f()({className:"".concat(ue,"-link")},ne),I):oe=B.createElement("span",f()({className:"".concat(ue,"-link")},ne),I),oe=de(oe),I?B.createElement("span",null,oe,R&&R!==""&&B.createElement("span",{className:"".concat(ue,"-separator")},R)):null};le.__ANT_BREADCRUMB_ITEM=!0;var ge=le,N=function(y){var T=y.children,E=B.useContext(te.b),R=E.getPrefixCls,I=R("breadcrumb");return B.createElement("span",{className:"".concat(I,"-separator")},T||"/")};N.__ANT_BREADCRUMB_SEPARATOR=!0;var ve=N,Se=w("BvKs"),v=w("uaoM"),b=w("0n0R"),g=function(C,y){var T={};for(var E in C)Object.prototype.hasOwnProperty.call(C,E)&&y.indexOf(E)<0&&(T[E]=C[E]);if(C!=null&&typeof Object.getOwnPropertySymbols=="function")for(var R=0,E=Object.getOwnPropertySymbols(C);R<E.length;R++)y.indexOf(E[R])<0&&Object.prototype.propertyIsEnumerable.call(C,E[R])&&(T[E[R]]=C[E[R]]);return T};function u(C,y){if(!C.breadcrumbName)return null;var T=Object.keys(y).join("|"),E=C.breadcrumbName.replace(new RegExp(":(".concat(T,")"),"g"),function(R,I){return y[I]||R});return E}function M(C,y,T,E){var R=T.indexOf(C)===T.length-1,I=u(C,y);return R?B.createElement("span",null,I):B.createElement("a",{href:"#/".concat(E.join("/"))},I)}var S=function(y,T){return y=(y||"").replace(/^\//,""),Object.keys(T).forEach(function(E){y=y.replace(":".concat(E),T[E])}),y},V=function(y){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",E=arguments.length>2?arguments[2]:void 0,R=ie()(y),I=S(T,E);return I&&R.push(I),R},J=function(y){var T=y.prefixCls,E=y.separator,R=E===void 0?"/":E,I=y.style,De=y.className,q=y.routes,ne=y.children,xe=y.itemRender,Be=xe===void 0?M:xe,ue=y.params,de=ue===void 0?{}:ue,oe=g(y,["prefixCls","separator","style","className","routes","children","itemRender","params"]),Le=B.useContext(te.b),Oe=Le.getPrefixCls,Ke=Le.direction,Ve,Je=Oe("breadcrumb",T);if(q&&q.length>0){var $e=[];Ve=q.map(function($){var Ce=S($.path,de);Ce&&$e.push(Ce);var Fe;return $.children&&$.children.length&&(Fe=B.createElement(Se.a,null,$.children.map(function(Pe){return B.createElement(Se.a.Item,{key:Pe.path||Pe.breadcrumbName},Be(Pe,de,q,V($e,Pe.path,de)))}))),B.createElement(ge,{overlay:Fe,separator:R,key:Ce||$.breadcrumbName},Be($,de,q,$e))})}else ne&&(Ve=Object(Ee.a)(ne).map(function($,Ce){return $&&(Object(v.a)($.type&&($.type.__ANT_BREADCRUMB_ITEM===!0||$.type.__ANT_BREADCRUMB_SEPARATOR===!0),"Breadcrumb","Only accepts Breadcrumb.Item and Breadcrumb.Separator as it's children"),Object(b.a)($,{separator:R,key:Ce}))}));var qe=je()(De,Je,F()({},"".concat(Je,"-rtl"),Ke==="rtl"));return B.createElement("div",f()({className:qe,style:I},oe),Ve)};J.Item=ge,J.Separator=ve;var be=J,Te=z.a=be},sPJy:function(he,z,w){"use strict";var Y=w("cIOH"),f=w.n(Y),G=w("AOa7"),F=w.n(G),me=w("lUTK"),ie=w("qVdP")},urRO:function(he,z,w){/*!
* Cropper.js v1.5.12
* https://fengyuanchen.github.io/cropperjs
*
* Copyright 2015-present Chen Fengyuan
* Released under the MIT license
*
* Date: 2021-06-12T08:00:17.411Z
*/(function(Y,f){he.exports=f()})(this,function(){"use strict";function Y(r,e){var a=Object.keys(r);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(r);e&&(t=t.filter(function(o){return Object.getOwnPropertyDescriptor(r,o).enumerable})),a.push.apply(a,t)}return a}function f(r){for(var e=1;e<arguments.length;e++){var a=arguments[e]!=null?arguments[e]:{};e%2?Y(Object(a),!0).forEach(function(t){B(r,t,a[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(a)):Y(Object(a)).forEach(function(t){Object.defineProperty(r,t,Object.getOwnPropertyDescriptor(a,t))})}return r}function G(r){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?G=function(e){return typeof e}:G=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},G(r)}function F(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}function me(r,e){for(var a=0;a<e.length;a++){var t=e[a];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(r,t.key,t)}}function ie(r,e,a){return e&&me(r.prototype,e),a&&me(r,a),r}function B(r,e,a){return e in r?Object.defineProperty(r,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):r[e]=a,r}function ce(r){return je(r)||Ee(r)||Ae(r)||Ge()}function je(r){if(Array.isArray(r))return Ne(r)}function Ee(r){if(typeof Symbol!="undefined"&&r[Symbol.iterator]!=null||r["@@iterator"]!=null)return Array.from(r)}function Ae(r,e){if(!r)return;if(typeof r=="string")return Ne(r,e);var a=Object.prototype.toString.call(r).slice(8,-1);if(a==="Object"&&r.constructor&&(a=r.constructor.name),a==="Map"||a==="Set")return Array.from(r);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return Ne(r,e)}function Ne(r,e){(e==null||e>r.length)&&(e=r.length);for(var a=0,t=new Array(e);a<e;a++)t[a]=r[a];return t}function Ge(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var te=typeof window!="undefined"&&typeof window.document!="undefined",Z=te?window:{},le=te&&Z.document.documentElement?"ontouchstart"in Z.document.documentElement:!1,ge=te?"PointerEvent"in Z:!1,N="cropper",ve="all",Se="crop",v="move",b="zoom",g="e",u="w",M="s",S="n",V="ne",J="nw",be="se",Te="sw",C="".concat(N,"-crop"),y="".concat(N,"-disabled"),T="".concat(N,"-hidden"),E="".concat(N,"-hide"),R="".concat(N,"-invisible"),I="".concat(N,"-modal"),De="".concat(N,"-move"),q="".concat(N,"Action"),ne="".concat(N,"Preview"),xe="crop",Be="move",ue="none",de="crop",oe="cropend",Le="cropmove",Oe="cropstart",Ke="dblclick",Ve=le?"touchstart":"mousedown",Je=le?"touchmove":"mousemove",$e=le?"touchend touchcancel":"mouseup",qe=ge?"pointerdown":Ve,$=ge?"pointermove":Je,Ce=ge?"pointerup pointercancel":$e,Fe="ready",Pe="resize",ct="wheel",at="zoom",lt="image/jpeg",Rt=/^e|w|s|n|se|sw|ne|nw|all|crop|move|zoom$/,Mt=/^data:/,_t=/^data:image\/jpeg;base64,/,At=/^img|canvas$/i,ut=200,dt=100,pt={viewMode:0,dragMode:xe,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:ut,minContainerHeight:dt,ready:null,cropstart:null,cropmove:null,cropend:null,crop:null,zoom:null},Nt='<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>',St=Number.isNaN||Z.isNaN;function D(r){return typeof r=="number"&&!St(r)}var ft=function(e){return e>0&&e<Infinity};function rt(r){return typeof r=="undefined"}function ze(r){return G(r)==="object"&&r!==null}var Bt=Object.prototype.hasOwnProperty;function Xe(r){if(!ze(r))return!1;try{var e=r.constructor,a=e.prototype;return e&&a&&Bt.call(a,"isPrototypeOf")}catch(t){return!1}}function Q(r){return typeof r=="function"}var Lt=Array.prototype.slice;function mt(r){return Array.from?Array.from(r):Lt.call(r)}function k(r,e){return r&&Q(e)&&(Array.isArray(r)||D(r.length)?mt(r).forEach(function(a,t){e.call(r,a,t,r)}):ze(r)&&Object.keys(r).forEach(function(a){e.call(r,r[a],a,r)})),r}var L=Object.assign||function(e){for(var a=arguments.length,t=new Array(a>1?a-1:0),o=1;o<a;o++)t[o-1]=arguments[o];return ze(e)&&t.length>0&&t.forEach(function(i){ze(i)&&Object.keys(i).forEach(function(n){e[n]=i[n]})}),e},Pt=/\.\d*(?:0|9){12}\d*$/;function We(r){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1e11;return Pt.test(r)?Math.round(r*e)/e:r}var zt=/^width|height|left|top|marginLeft|marginTop$/;function Re(r,e){var a=r.style;k(e,function(t,o){zt.test(o)&&D(t)&&(t="".concat(t,"px")),a[o]=t})}function It(r,e){return r.classList?r.classList.contains(e):r.className.indexOf(e)>-1}function W(r,e){if(!e)return;if(D(r.length)){k(r,function(t){W(t,e)});return}if(r.classList){r.classList.add(e);return}var a=r.className.trim();a?a.indexOf(e)<0&&(r.className="".concat(a," ").concat(e)):r.className=e}function pe(r,e){if(!e)return;if(D(r.length)){k(r,function(a){pe(a,e)});return}if(r.classList){r.classList.remove(e);return}r.className.indexOf(e)>=0&&(r.className=r.className.replace(e,""))}function He(r,e,a){if(!e)return;if(D(r.length)){k(r,function(t){He(t,e,a)});return}a?W(r,e):pe(r,e)}var kt=/([a-z\d])([A-Z])/g;function it(r){return r.replace(kt,"$1-$2").toLowerCase()}function nt(r,e){return ze(r[e])?r[e]:r.dataset?r.dataset[e]:r.getAttribute("data-".concat(it(e)))}function Ze(r,e,a){ze(a)?r[e]=a:r.dataset?r.dataset[e]=a:r.setAttribute("data-".concat(it(e)),a)}function Ut(r,e){if(ze(r[e]))try{delete r[e]}catch(a){r[e]=void 0}else if(r.dataset)try{delete r.dataset[e]}catch(a){r.dataset[e]=void 0}else r.removeAttribute("data-".concat(it(e)))}var gt=/\s\s*/,vt=function(){var r=!1;if(te){var e=!1,a=function(){},t=Object.defineProperty({},"once",{get:function(){return r=!0,e},set:function(i){e=i}});Z.addEventListener("test",a,t),Z.removeEventListener("test",a,t)}return r}();function se(r,e,a){var t=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},o=a;e.trim().split(gt).forEach(function(i){if(!vt){var n=r.listeners;n&&n[i]&&n[i][a]&&(o=n[i][a],delete n[i][a],Object.keys(n[i]).length===0&&delete n[i],Object.keys(n).length===0&&delete r.listeners)}r.removeEventListener(i,o,t)})}function ae(r,e,a){var t=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},o=a;e.trim().split(gt).forEach(function(i){if(t.once&&!vt){var n=r.listeners,s=n===void 0?{}:n;o=function(){delete s[i][a],r.removeEventListener(i,o,t);for(var l=arguments.length,h=new Array(l),c=0;c<l;c++)h[c]=arguments[c];a.apply(r,h)},s[i]||(s[i]={}),s[i][a]&&r.removeEventListener(i,s[i][a],t),s[i][a]=o,r.listeners=s}r.addEventListener(i,o,t)})}function Ye(r,e,a){var t;return Q(Event)&&Q(CustomEvent)?t=new CustomEvent(e,{detail:a,bubbles:!0,cancelable:!0}):(t=document.createEvent("CustomEvent"),t.initCustomEvent(e,!0,!0,a)),r.dispatchEvent(t)}function bt(r){var e=r.getBoundingClientRect();return{left:e.left+(window.pageXOffset-document.documentElement.clientLeft),top:e.top+(window.pageYOffset-document.documentElement.clientTop)}}var ot=Z.location,jt=/^(\w+:)\/\/([^:/?#]*):?(\d*)/i;function yt(r){var e=r.match(jt);return e!==null&&(e[1]!==ot.protocol||e[2]!==ot.hostname||e[3]!==ot.port)}function wt(r){var e="timestamp=".concat(new Date().getTime());return r+(r.indexOf("?")===-1?"?":"&")+e}function Qe(r){var e=r.rotate,a=r.scaleX,t=r.scaleY,o=r.translateX,i=r.translateY,n=[];D(o)&&o!==0&&n.push("translateX(".concat(o,"px)")),D(i)&&i!==0&&n.push("translateY(".concat(i,"px)")),D(e)&&e!==0&&n.push("rotate(".concat(e,"deg)")),D(a)&&a!==1&&n.push("scaleX(".concat(a,")")),D(t)&&t!==1&&n.push("scaleY(".concat(t,")"));var s=n.length?n.join(" "):"none";return{WebkitTransform:s,msTransform:s,transform:s}}function Xt(r){var e=f({},r),a=0;return k(r,function(t,o){delete e[o],k(e,function(i){var n=Math.abs(t.startX-i.startX),s=Math.abs(t.startY-i.startY),p=Math.abs(t.endX-i.endX),l=Math.abs(t.endY-i.endY),h=Math.sqrt(n*n+s*s),c=Math.sqrt(p*p+l*l),d=(c-h)/h;Math.abs(d)>Math.abs(a)&&(a=d)})}),a}function et(r,e){var a=r.pageX,t=r.pageY,o={endX:a,endY:t};return e?o:f({startX:a,startY:t},o)}function Wt(r){var e=0,a=0,t=0;return k(r,function(o){var i=o.startX,n=o.startY;e+=i,a+=n,t+=1}),e/=t,a/=t,{pageX:e,pageY:a}}function Me(r){var e=r.aspectRatio,a=r.height,t=r.width,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"contain",i=ft(t),n=ft(a);if(i&&n){var s=a*e;o==="contain"&&s>t||o==="cover"&&s<t?a=t/e:t=a*e}else i?a=t/e:n&&(t=a*e);return{width:t,height:a}}function Ht(r){var e=r.width,a=r.height,t=r.degree;if(t=Math.abs(t)%180,t===90)return{width:a,height:e};var o=t%90*Math.PI/180,i=Math.sin(o),n=Math.cos(o),s=e*n+a*i,p=e*i+a*n;return t>90?{width:p,height:s}:{width:s,height:p}}function Yt(r,e,a,t){var o=e.aspectRatio,i=e.naturalWidth,n=e.naturalHeight,s=e.rotate,p=s===void 0?0:s,l=e.scaleX,h=l===void 0?1:l,c=e.scaleY,d=c===void 0?1:c,O=a.aspectRatio,x=a.naturalWidth,P=a.naturalHeight,_=t.fillColor,j=_===void 0?"transparent":_,H=t.imageSmoothingEnabled,U=H===void 0?!0:H,ye=t.imageSmoothingQuality,ee=ye===void 0?"low":ye,m=t.maxWidth,A=m===void 0?Infinity:m,X=t.maxHeight,re=X===void 0?Infinity:X,we=t.minWidth,Ie=we===void 0?0:we,ke=t.minHeight,_e=ke===void 0?0:ke,fe=document.createElement("canvas"),K=fe.getContext("2d"),Ue=Me({aspectRatio:O,width:A,height:re}),tt=Me({aspectRatio:O,width:Ie,height:_e},"cover"),st=Math.min(Ue.width,Math.max(tt.width,x)),ht=Math.min(Ue.height,Math.max(tt.height,P)),Dt=Me({aspectRatio:o,width:A,height:re}),xt=Me({aspectRatio:o,width:Ie,height:_e},"cover"),Ot=Math.min(Dt.width,Math.max(xt.width,i)),Ct=Math.min(Dt.height,Math.max(xt.height,n)),ia=[-Ot/2,-Ct/2,Ot,Ct];return fe.width=We(st),fe.height=We(ht),K.fillStyle=j,K.fillRect(0,0,st,ht),K.save(),K.translate(st/2,ht/2),K.rotate(p*Math.PI/180),K.scale(h,d),K.imageSmoothingEnabled=U,K.imageSmoothingQuality=ee,K.drawImage.apply(K,[r].concat(ce(ia.map(function(na){return Math.floor(We(na))})))),K.restore(),fe}var Et=String.fromCharCode;function Gt(r,e,a){var t="";a+=e;for(var o=e;o<a;o+=1)t+=Et(r.getUint8(o));return t}var Vt=/^data:.*,/;function $t(r){var e=r.replace(Vt,""),a=atob(e),t=new ArrayBuffer(a.length),o=new Uint8Array(t);return k(o,function(i,n){o[n]=a.charCodeAt(n)}),t}function Ft(r,e){for(var a=[],t=8192,o=new Uint8Array(r);o.length>0;)a.push(Et.apply(null,mt(o.subarray(0,t)))),o=o.subarray(t);return"data:".concat(e,";base64,").concat(btoa(a.join("")))}function Zt(r){var e=new DataView(r),a;try{var t,o,i;if(e.getUint8(0)===255&&e.getUint8(1)===216)for(var n=e.byteLength,s=2;s+1<n;){if(e.getUint8(s)===255&&e.getUint8(s+1)===225){o=s;break}s+=1}if(o){var p=o+4,l=o+10;if(Gt(e,p,4)==="Exif"){var h=e.getUint16(l);if(t=h===18761,(t||h===19789)&&e.getUint16(l+2,t)===42){var c=e.getUint32(l+4,t);c>=8&&(i=l+c)}}}if(i){var d=e.getUint16(i,t),O,x;for(x=0;x<d;x+=1)if(O=i+x*12+2,e.getUint16(O,t)===274){O+=8,a=e.getUint16(O,t),e.setUint16(O,1,t);break}}}catch(P){a=1}return a}function Qt(r){var e=0,a=1,t=1;switch(r){case 2:a=-1;break;case 3:e=-180;break;case 4:t=-1;break;case 5:e=90,t=-1;break;case 6:e=90;break;case 7:e=90,a=-1;break;case 8:e=-90;break}return{rotate:e,scaleX:a,scaleY:t}}var Kt={render:function(){this.initContainer(),this.initCanvas(),this.initCropBox(),this.renderCanvas(),this.cropped&&this.renderCropBox()},initContainer:function(){var e=this.element,a=this.options,t=this.container,o=this.cropper,i=Number(a.minContainerWidth),n=Number(a.minContainerHeight);W(o,T),pe(e,T);var s={width:Math.max(t.offsetWidth,i>=0?i:ut),height:Math.max(t.offsetHeight,n>=0?n:dt)};this.containerData=s,Re(o,{width:s.width,height:s.height}),W(e,T),pe(o,T)},initCanvas:function(){var e=this.containerData,a=this.imageData,t=this.options.viewMode,o=Math.abs(a.rotate)%180===90,i=o?a.naturalHeight:a.naturalWidth,n=o?a.naturalWidth:a.naturalHeight,s=i/n,p=e.width,l=e.height;e.height*s>e.width?t===3?p=e.height*s:l=e.width/s:t===3?l=e.width/s:p=e.height*s;var h={aspectRatio:s,naturalWidth:i,naturalHeight:n,width:p,height:l};this.canvasData=h,this.limited=t===1||t===2,this.limitCanvas(!0,!0),h.width=Math.min(Math.max(h.width,h.minWidth),h.maxWidth),h.height=Math.min(Math.max(h.height,h.minHeight),h.maxHeight),h.left=(e.width-h.width)/2,h.top=(e.height-h.height)/2,h.oldLeft=h.left,h.oldTop=h.top,this.initialCanvasData=L({},h)},limitCanvas:function(e,a){var t=this.options,o=this.containerData,i=this.canvasData,n=this.cropBoxData,s=t.viewMode,p=i.aspectRatio,l=this.cropped&&n;if(e){var h=Number(t.minCanvasWidth)||0,c=Number(t.minCanvasHeight)||0;s>1?(h=Math.max(h,o.width),c=Math.max(c,o.height),s===3&&(c*p>h?h=c*p:c=h/p)):s>0&&(h?h=Math.max(h,l?n.width:0):c?c=Math.max(c,l?n.height:0):l&&(h=n.width,c=n.height,c*p>h?h=c*p:c=h/p));var d=Me({aspectRatio:p,width:h,height:c});h=d.width,c=d.height,i.minWidth=h,i.minHeight=c,i.maxWidth=Infinity,i.maxHeight=Infinity}if(a)if(s>(l?0:1)){var O=o.width-i.width,x=o.height-i.height;i.minLeft=Math.min(0,O),i.minTop=Math.min(0,x),i.maxLeft=Math.max(0,O),i.maxTop=Math.max(0,x),l&&this.limited&&(i.minLeft=Math.min(n.left,n.left+(n.width-i.width)),i.minTop=Math.min(n.top,n.top+(n.height-i.height)),i.maxLeft=n.left,i.maxTop=n.top,s===2&&(i.width>=o.width&&(i.minLeft=Math.min(0,O),i.maxLeft=Math.max(0,O)),i.height>=o.height&&(i.minTop=Math.min(0,x),i.maxTop=Math.max(0,x))))}else i.minLeft=-i.width,i.minTop=-i.height,i.maxLeft=o.width,i.maxTop=o.height},renderCanvas:function(e,a){var t=this.canvasData,o=this.imageData;if(a){var i=Ht({width:o.naturalWidth*Math.abs(o.scaleX||1),height:o.naturalHeight*Math.abs(o.scaleY||1),degree:o.rotate||0}),n=i.width,s=i.height,p=t.width*(n/t.naturalWidth),l=t.height*(s/t.naturalHeight);t.left-=(p-t.width)/2,t.top-=(l-t.height)/2,t.width=p,t.height=l,t.aspectRatio=n/s,t.naturalWidth=n,t.naturalHeight=s,this.limitCanvas(!0,!1)}(t.width>t.maxWidth||t.width<t.minWidth)&&(t.left=t.oldLeft),(t.height>t.maxHeight||t.height<t.minHeight)&&(t.top=t.oldTop),t.width=Math.min(Math.max(t.width,t.minWidth),t.maxWidth),t.height=Math.min(Math.max(t.height,t.minHeight),t.maxHeight),this.limitCanvas(!1,!0),t.left=Math.min(Math.max(t.left,t.minLeft),t.maxLeft),t.top=Math.min(Math.max(t.top,t.minTop),t.maxTop),t.oldLeft=t.left,t.oldTop=t.top,Re(this.canvas,L({width:t.width,height:t.height},Qe({translateX:t.left,translateY:t.top}))),this.renderImage(e),this.cropped&&this.limited&&this.limitCropBox(!0,!0)},renderImage:function(e){var a=this.canvasData,t=this.imageData,o=t.naturalWidth*(a.width/a.naturalWidth),i=t.naturalHeight*(a.height/a.naturalHeight);L(t,{width:o,height:i,left:(a.width-o)/2,top:(a.height-i)/2}),Re(this.image,L({width:t.width,height:t.height},Qe(L({translateX:t.left,translateY:t.top},t)))),e&&this.output()},initCropBox:function(){var e=this.options,a=this.canvasData,t=e.aspectRatio||e.initialAspectRatio,o=Number(e.autoCropArea)||.8,i={width:a.width,height:a.height};t&&(a.height*t>a.width?i.height=i.width/t:i.width=i.height*t),this.cropBoxData=i,this.limitCropBox(!0,!0),i.width=Math.min(Math.max(i.width,i.minWidth),i.maxWidth),i.height=Math.min(Math.max(i.height,i.minHeight),i.maxHeight),i.width=Math.max(i.minWidth,i.width*o),i.height=Math.max(i.minHeight,i.height*o),i.left=a.left+(a.width-i.width)/2,i.top=a.top+(a.height-i.height)/2,i.oldLeft=i.left,i.oldTop=i.top,this.initialCropBoxData=L({},i)},limitCropBox:function(e,a){var t=this.options,o=this.containerData,i=this.canvasData,n=this.cropBoxData,s=this.limited,p=t.aspectRatio;if(e){var l=Number(t.minCropBoxWidth)||0,h=Number(t.minCropBoxHeight)||0,c=s?Math.min(o.width,i.width,i.width+i.left,o.width-i.left):o.width,d=s?Math.min(o.height,i.height,i.height+i.top,o.height-i.top):o.height;l=Math.min(l,o.width),h=Math.min(h,o.height),p&&(l&&h?h*p>l?h=l/p:l=h*p:l?h=l/p:h&&(l=h*p),d*p>c?d=c/p:c=d*p),n.minWidth=Math.min(l,c),n.minHeight=Math.min(h,d),n.maxWidth=c,n.maxHeight=d}a&&(s?(n.minLeft=Math.max(0,i.left),n.minTop=Math.max(0,i.top),n.maxLeft=Math.min(o.width,i.left+i.width)-n.width,n.maxTop=Math.min(o.height,i.top+i.height)-n.height):(n.minLeft=0,n.minTop=0,n.maxLeft=o.width-n.width,n.maxTop=o.height-n.height))},renderCropBox:function(){var e=this.options,a=this.containerData,t=this.cropBoxData;(t.width>t.maxWidth||t.width<t.minWidth)&&(t.left=t.oldLeft),(t.height>t.maxHeight||t.height<t.minHeight)&&(t.top=t.oldTop),t.width=Math.min(Math.max(t.width,t.minWidth),t.maxWidth),t.height=Math.min(Math.max(t.height,t.minHeight),t.maxHeight),this.limitCropBox(!1,!0),t.left=Math.min(Math.max(t.left,t.minLeft),t.maxLeft),t.top=Math.min(Math.max(t.top,t.minTop),t.maxTop),t.oldLeft=t.left,t.oldTop=t.top,e.movable&&e.cropBoxMovable&&Ze(this.face,q,t.width>=a.width&&t.height>=a.height?v:ve),Re(this.cropBox,L({width:t.width,height:t.height},Qe({translateX:t.left,translateY:t.top}))),this.cropped&&this.limited&&this.limitCanvas(!0,!0),this.disabled||this.output()},output:function(){this.preview(),Ye(this.element,de,this.getData())}},Jt={initPreview:function(){var e=this.element,a=this.crossOrigin,t=this.options.preview,o=a?this.crossOriginUrl:this.url,i=e.alt||"The image to preview",n=document.createElement("img");if(a&&(n.crossOrigin=a),n.src=o,n.alt=i,this.viewBox.appendChild(n),this.viewBoxImage=n,!t)return;var s=t;typeof t=="string"?s=e.ownerDocument.querySelectorAll(t):t.querySelector&&(s=[t]),this.previews=s,k(s,function(p){var l=document.createElement("img");Ze(p,ne,{width:p.offsetWidth,height:p.offsetHeight,html:p.innerHTML}),a&&(l.crossOrigin=a),l.src=o,l.alt=i,l.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;"',p.innerHTML="",p.appendChild(l)})},resetPreview:function(){k(this.previews,function(e){var a=nt(e,ne);Re(e,{width:a.width,height:a.height}),e.innerHTML=a.html,Ut(e,ne)})},preview:function(){var e=this.imageData,a=this.canvasData,t=this.cropBoxData,o=t.width,i=t.height,n=e.width,s=e.height,p=t.left-a.left-e.left,l=t.top-a.top-e.top;if(!this.cropped||this.disabled)return;Re(this.viewBoxImage,L({width:n,height:s},Qe(L({translateX:-p,translateY:-l},e)))),k(this.previews,function(h){var c=nt(h,ne),d=c.width,O=c.height,x=d,P=O,_=1;o&&(_=d/o,P=i*_),i&&P>O&&(_=O/i,x=o*_,P=O),Re(h,{width:x,height:P}),Re(h.getElementsByTagName("img")[0],L({width:n*_,height:s*_},Qe(L({translateX:-p*_,translateY:-l*_},e))))})}},qt={bind:function(){var e=this.element,a=this.options,t=this.cropper;Q(a.cropstart)&&ae(e,Oe,a.cropstart),Q(a.cropmove)&&ae(e,Le,a.cropmove),Q(a.cropend)&&ae(e,oe,a.cropend),Q(a.crop)&&ae(e,de,a.crop),Q(a.zoom)&&ae(e,at,a.zoom),ae(t,qe,this.onCropStart=this.cropStart.bind(this)),a.zoomable&&a.zoomOnWheel&&ae(t,ct,this.onWheel=this.wheel.bind(this),{passive:!1,capture:!0}),a.toggleDragModeOnDblclick&&ae(t,Ke,this.onDblclick=this.dblclick.bind(this)),ae(e.ownerDocument,$,this.onCropMove=this.cropMove.bind(this)),ae(e.ownerDocument,Ce,this.onCropEnd=this.cropEnd.bind(this)),a.responsive&&ae(window,Pe,this.onResize=this.resize.bind(this))},unbind:function(){var e=this.element,a=this.options,t=this.cropper;Q(a.cropstart)&&se(e,Oe,a.cropstart),Q(a.cropmove)&&se(e,Le,a.cropmove),Q(a.cropend)&&se(e,oe,a.cropend),Q(a.crop)&&se(e,de,a.crop),Q(a.zoom)&&se(e,at,a.zoom),se(t,qe,this.onCropStart),a.zoomable&&a.zoomOnWheel&&se(t,ct,this.onWheel,{passive:!1,capture:!0}),a.toggleDragModeOnDblclick&&se(t,Ke,this.onDblclick),se(e.ownerDocument,$,this.onCropMove),se(e.ownerDocument,Ce,this.onCropEnd),a.responsive&&se(window,Pe,this.onResize)}},ea={resize:function(){if(this.disabled)return;var e=this.options,a=this.container,t=this.containerData,o=a.offsetWidth/t.width,i=a.offsetHeight/t.height,n=Math.abs(o-1)>Math.abs(i-1)?o:i;if(n!==1){var s,p;e.restore&&(s=this.getCanvasData(),p=this.getCropBoxData()),this.render(),e.restore&&(this.setCanvasData(k(s,function(l,h){s[h]=l*n})),this.setCropBoxData(k(p,function(l,h){p[h]=l*n})))}},dblclick:function(){if(this.disabled||this.options.dragMode===ue)return;this.setDragMode(It(this.dragBox,C)?Be:xe)},wheel:function(e){var a=this,t=Number(this.options.wheelZoomRatio)||.1,o=1;if(this.disabled)return;if(e.preventDefault(),this.wheeling)return;this.wheeling=!0,setTimeout(function(){a.wheeling=!1},50),e.deltaY?o=e.deltaY>0?1:-1:e.wheelDelta?o=-e.wheelDelta/120:e.detail&&(o=e.detail>0?1:-1),this.zoom(-o*t,e)},cropStart:function(e){var a=e.buttons,t=e.button;if(this.disabled||(e.type==="mousedown"||e.type==="pointerdown"&&e.pointerType==="mouse")&&(D(a)&&a!==1||D(t)&&t!==0||e.ctrlKey))return;var o=this.options,i=this.pointers,n;if(e.changedTouches?k(e.changedTouches,function(s){i[s.identifier]=et(s)}):i[e.pointerId||0]=et(e),Object.keys(i).length>1&&o.zoomable&&o.zoomOnTouch?n=b:n=nt(e.target,q),!Rt.test(n))return;if(Ye(this.element,Oe,{originalEvent:e,action:n})===!1)return;e.preventDefault(),this.action=n,this.cropping=!1,n===Se&&(this.cropping=!0,W(this.dragBox,I))},cropMove:function(e){var a=this.action;if(this.disabled||!a)return;var t=this.pointers;if(e.preventDefault(),Ye(this.element,Le,{originalEvent:e,action:a})===!1)return;e.changedTouches?k(e.changedTouches,function(o){L(t[o.identifier]||{},et(o,!0))}):L(t[e.pointerId||0]||{},et(e,!0)),this.change(e)},cropEnd:function(e){if(this.disabled)return;var a=this.action,t=this.pointers;if(e.changedTouches?k(e.changedTouches,function(o){delete t[o.identifier]}):delete t[e.pointerId||0],!a)return;e.preventDefault(),Object.keys(t).length||(this.action=""),this.cropping&&(this.cropping=!1,He(this.dragBox,I,this.cropped&&this.options.modal)),Ye(this.element,oe,{originalEvent:e,action:a})}},ta={change:function(e){var a=this.options,t=this.canvasData,o=this.containerData,i=this.cropBoxData,n=this.pointers,s=this.action,p=a.aspectRatio,l=i.left,h=i.top,c=i.width,d=i.height,O=l+c,x=h+d,P=0,_=0,j=o.width,H=o.height,U=!0,ye;!p&&e.shiftKey&&(p=c&&d?c/d:1),this.limited&&(P=i.minLeft,_=i.minTop,j=P+Math.min(o.width,t.width,t.left+t.width),H=_+Math.min(o.height,t.height,t.top+t.height));var ee=n[Object.keys(n)[0]],m={x:ee.endX-ee.startX,y:ee.endY-ee.startY},A=function(re){switch(re){case g:O+m.x>j&&(m.x=j-O);break;case u:l+m.x<P&&(m.x=P-l);break;case S:h+m.y<_&&(m.y=_-h);break;case M:x+m.y>H&&(m.y=H-x);break}};switch(s){case ve:l+=m.x,h+=m.y;break;case g:if(m.x>=0&&(O>=j||p&&(h<=_||x>=H))){U=!1;break}A(g),c+=m.x,c<0&&(s=u,c=-c,l-=c),p&&(d=c/p,h+=(i.height-d)/2);break;case S:if(m.y<=0&&(h<=_||p&&(l<=P||O>=j))){U=!1;break}A(S),d-=m.y,h+=m.y,d<0&&(s=M,d=-d,h-=d),p&&(c=d*p,l+=(i.width-c)/2);break;case u:if(m.x<=0&&(l<=P||p&&(h<=_||x>=H))){U=!1;break}A(u),c-=m.x,l+=m.x,c<0&&(s=g,c=-c,l-=c),p&&(d=c/p,h+=(i.height-d)/2);break;case M:if(m.y>=0&&(x>=H||p&&(l<=P||O>=j))){U=!1;break}A(M),d+=m.y,d<0&&(s=S,d=-d,h-=d),p&&(c=d*p,l+=(i.width-c)/2);break;case V:if(p){if(m.y<=0&&(h<=_||O>=j)){U=!1;break}A(S),d-=m.y,h+=m.y,c=d*p}else A(S),A(g),m.x>=0?O<j?c+=m.x:m.y<=0&&h<=_&&(U=!1):c+=m.x,m.y<=0?h>_&&(d-=m.y,h+=m.y):(d-=m.y,h+=m.y);c<0&&d<0?(s=Te,d=-d,c=-c,h-=d,l-=c):c<0?(s=J,c=-c,l-=c):d<0&&(s=be,d=-d,h-=d);break;case J:if(p){if(m.y<=0&&(h<=_||l<=P)){U=!1;break}A(S),d-=m.y,h+=m.y,c=d*p,l+=i.width-c}else A(S),A(u),m.x<=0?l>P?(c-=m.x,l+=m.x):m.y<=0&&h<=_&&(U=!1):(c-=m.x,l+=m.x),m.y<=0?h>_&&(d-=m.y,h+=m.y):(d-=m.y,h+=m.y);c<0&&d<0?(s=be,d=-d,c=-c,h-=d,l-=c):c<0?(s=V,c=-c,l-=c):d<0&&(s=Te,d=-d,h-=d);break;case Te:if(p){if(m.x<=0&&(l<=P||x>=H)){U=!1;break}A(u),c-=m.x,l+=m.x,d=c/p}else A(M),A(u),m.x<=0?l>P?(c-=m.x,l+=m.x):m.y>=0&&x>=H&&(U=!1):(c-=m.x,l+=m.x),m.y>=0?x<H&&(d+=m.y):d+=m.y;c<0&&d<0?(s=V,d=-d,c=-c,h-=d,l-=c):c<0?(s=be,c=-c,l-=c):d<0&&(s=J,d=-d,h-=d);break;case be:if(p){if(m.x>=0&&(O>=j||x>=H)){U=!1;break}A(g),c+=m.x,d=c/p}else A(M),A(g),m.x>=0?O<j?c+=m.x:m.y>=0&&x>=H&&(U=!1):c+=m.x,m.y>=0?x<H&&(d+=m.y):d+=m.y;c<0&&d<0?(s=J,d=-d,c=-c,h-=d,l-=c):c<0?(s=Te,c=-c,l-=c):d<0&&(s=V,d=-d,h-=d);break;case v:this.move(m.x,m.y),U=!1;break;case b:this.zoom(Xt(n),e),U=!1;break;case Se:if(!m.x||!m.y){U=!1;break}ye=bt(this.cropper),l=ee.startX-ye.left,h=ee.startY-ye.top,c=i.minWidth,d=i.minHeight,m.x>0?s=m.y>0?be:V:m.x<0&&(l-=c,s=m.y>0?Te:J),m.y<0&&(h-=d),this.cropped||(pe(this.cropBox,T),this.cropped=!0,this.limited&&this.limitCropBox(!0,!0));break}U&&(i.width=c,i.height=d,i.left=l,i.top=h,this.action=s,this.renderCropBox()),k(n,function(X){X.startX=X.endX,X.startY=X.endY})}},aa={crop:function(){return this.ready&&!this.cropped&&!this.disabled&&(this.cropped=!0,this.limitCropBox(!0,!0),this.options.modal&&W(this.dragBox,I),pe(this.cropBox,T),this.setCropBoxData(this.initialCropBoxData)),this},reset:function(){return this.ready&&!this.disabled&&(this.imageData=L({},this.initialImageData),this.canvasData=L({},this.initialCanvasData),this.cropBoxData=L({},this.initialCropBoxData),this.renderCanvas(),this.cropped&&this.renderCropBox()),this},clear:function(){return this.cropped&&!this.disabled&&(L(this.cropBoxData,{left:0,top:0,width:0,height:0}),this.cropped=!1,this.renderCropBox(),this.limitCanvas(!0,!0),this.renderCanvas(),pe(this.dragBox,I),W(this.cropBox,T)),this},replace:function(e){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return!this.disabled&&e&&(this.isImg&&(this.element.src=e),a?(this.url=e,this.image.src=e,this.ready&&(this.viewBoxImage.src=e,k(this.previews,function(t){t.getElementsByTagName("img")[0].src=e}))):(this.isImg&&(this.replaced=!0),this.options.data=null,this.uncreate(),this.load(e))),this},enable:function(){return this.ready&&this.disabled&&(this.disabled=!1,pe(this.cropper,y)),this},disable:function(){return this.ready&&!this.disabled&&(this.disabled=!0,W(this.cropper,y)),this},destroy:function(){var e=this.element;return e[N]?(e[N]=void 0,this.isImg&&this.replaced&&(e.src=this.originalUrl),this.uncreate(),this):this},move:function(e){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e,t=this.canvasData,o=t.left,i=t.top;return this.moveTo(rt(e)?e:o+Number(e),rt(a)?a:i+Number(a))},moveTo:function(e){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e,t=this.canvasData,o=!1;return e=Number(e),a=Number(a),this.ready&&!this.disabled&&this.options.movable&&(D(e)&&(t.left=e,o=!0),D(a)&&(t.top=a,o=!0),o&&this.renderCanvas(!0)),this},zoom:function(e,a){var t=this.canvasData;return e=Number(e),e<0?e=1/(1-e):e=1+e,this.zoomTo(t.width*e/t.naturalWidth,null,a)},zoomTo:function(e,a,t){var o=this.options,i=this.canvasData,n=i.width,s=i.height,p=i.naturalWidth,l=i.naturalHeight;if(e=Number(e),e>=0&&this.ready&&!this.disabled&&o.zoomable){var h=p*e,c=l*e;if(Ye(this.element,at,{ratio:e,oldRatio:n/p,originalEvent:t})===!1)return this;if(t){var d=this.pointers,O=bt(this.cropper),x=d&&Object.keys(d).length?Wt(d):{pageX:t.pageX,pageY:t.pageY};i.left-=(h-n)*((x.pageX-O.left-i.left)/n),i.top-=(c-s)*((x.pageY-O.top-i.top)/s)}else Xe(a)&&D(a.x)&&D(a.y)?(i.left-=(h-n)*((a.x-i.left)/n),i.top-=(c-s)*((a.y-i.top)/s)):(i.left-=(h-n)/2,i.top-=(c-s)/2);i.width=h,i.height=c,this.renderCanvas(!0)}return this},rotate:function(e){return this.rotateTo((this.imageData.rotate||0)+Number(e))},rotateTo:function(e){return e=Number(e),D(e)&&this.ready&&!this.disabled&&this.options.rotatable&&(this.imageData.rotate=e%360,this.renderCanvas(!0,!0)),this},scaleX:function(e){var a=this.imageData.scaleY;return this.scale(e,D(a)?a:1)},scaleY:function(e){var a=this.imageData.scaleX;return this.scale(D(a)?a:1,e)},scale:function(e){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e,t=this.imageData,o=!1;return e=Number(e),a=Number(a),this.ready&&!this.disabled&&this.options.scalable&&(D(e)&&(t.scaleX=e,o=!0),D(a)&&(t.scaleY=a,o=!0),o&&this.renderCanvas(!0,!0)),this},getData:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,a=this.options,t=this.imageData,o=this.canvasData,i=this.cropBoxData,n;if(this.ready&&this.cropped){n={x:i.left-o.left,y:i.top-o.top,width:i.width,height:i.height};var s=t.width/t.naturalWidth;if(k(n,function(h,c){n[c]=h/s}),e){var p=Math.round(n.y+n.height),l=Math.round(n.x+n.width);n.x=Math.round(n.x),n.y=Math.round(n.y),n.width=l-n.x,n.height=p-n.y}}else n={x:0,y:0,width:0,height:0};return a.rotatable&&(n.rotate=t.rotate||0),a.scalable&&(n.scaleX=t.scaleX||1,n.scaleY=t.scaleY||1),n},setData:function(e){var a=this.options,t=this.imageData,o=this.canvasData,i={};if(this.ready&&!this.disabled&&Xe(e)){var n=!1;a.rotatable&&(D(e.rotate)&&e.rotate!==t.rotate&&(t.rotate=e.rotate,n=!0)),a.scalable&&(D(e.scaleX)&&e.scaleX!==t.scaleX&&(t.scaleX=e.scaleX,n=!0),D(e.scaleY)&&e.scaleY!==t.scaleY&&(t.scaleY=e.scaleY,n=!0)),n&&this.renderCanvas(!0,!0);var s=t.width/t.naturalWidth;D(e.x)&&(i.left=e.x*s+o.left),D(e.y)&&(i.top=e.y*s+o.top),D(e.width)&&(i.width=e.width*s),D(e.height)&&(i.height=e.height*s),this.setCropBoxData(i)}return this},getContainerData:function(){return this.ready?L({},this.containerData):{}},getImageData:function(){return this.sized?L({},this.imageData):{}},getCanvasData:function(){var e=this.canvasData,a={};return this.ready&&k(["left","top","width","height","naturalWidth","naturalHeight"],function(t){a[t]=e[t]}),a},setCanvasData:function(e){var a=this.canvasData,t=a.aspectRatio;return this.ready&&!this.disabled&&Xe(e)&&(D(e.left)&&(a.left=e.left),D(e.top)&&(a.top=e.top),D(e.width)?(a.width=e.width,a.height=e.width/t):D(e.height)&&(a.height=e.height,a.width=e.height*t),this.renderCanvas(!0)),this},getCropBoxData:function(){var e=this.cropBoxData,a;return this.ready&&this.cropped&&(a={left:e.left,top:e.top,width:e.width,height:e.height}),a||{}},setCropBoxData:function(e){var a=this.cropBoxData,t=this.options.aspectRatio,o,i;return this.ready&&this.cropped&&!this.disabled&&Xe(e)&&(D(e.left)&&(a.left=e.left),D(e.top)&&(a.top=e.top),D(e.width)&&e.width!==a.width&&(o=!0,a.width=e.width),D(e.height)&&e.height!==a.height&&(i=!0,a.height=e.height),t&&(o?a.height=a.width/t:i&&(a.width=a.height*t)),this.renderCropBox()),this},getCroppedCanvas:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!this.ready||!window.HTMLCanvasElement)return null;var a=this.canvasData,t=Yt(this.image,this.imageData,a,e);if(!this.cropped)return t;var o=this.getData(),i=o.x,n=o.y,s=o.width,p=o.height,l=t.width/Math.floor(a.naturalWidth);l!==1&&(i*=l,n*=l,s*=l,p*=l);var h=s/p,c=Me({aspectRatio:h,width:e.maxWidth||Infinity,height:e.maxHeight||Infinity}),d=Me({aspectRatio:h,width:e.minWidth||0,height:e.minHeight||0},"cover"),O=Me({aspectRatio:h,width:e.width||(l!==1?t.width:s),height:e.height||(l!==1?t.height:p)}),x=O.width,P=O.height;x=Math.min(c.width,Math.max(d.width,x)),P=Math.min(c.height,Math.max(d.height,P));var _=document.createElement("canvas"),j=_.getContext("2d");_.width=We(x),_.height=We(P),j.fillStyle=e.fillColor||"transparent",j.fillRect(0,0,x,P);var H=e.imageSmoothingEnabled,U=H===void 0?!0:H,ye=e.imageSmoothingQuality;j.imageSmoothingEnabled=U,ye&&(j.imageSmoothingQuality=ye);var ee=t.width,m=t.height,A=i,X=n,re,we,Ie,ke,_e,fe;A<=-s||A>ee?(A=0,re=0,Ie=0,_e=0):A<=0?(Ie=-A,A=0,re=Math.min(ee,s+A),_e=re):A<=ee&&(Ie=0,re=Math.min(s,ee-A),_e=re),re<=0||X<=-p||X>m?(X=0,we=0,ke=0,fe=0):X<=0?(ke=-X,X=0,we=Math.min(m,p+X),fe=we):X<=m&&(ke=0,we=Math.min(p,m-X),fe=we);var K=[A,X,re,we];if(_e>0&&fe>0){var Ue=x/s;K.push(Ie*Ue,ke*Ue,_e*Ue,fe*Ue)}return j.drawImage.apply(j,[t].concat(ce(K.map(function(tt){return Math.floor(We(tt))})))),_},setAspectRatio:function(e){var a=this.options;return!this.disabled&&!rt(e)&&(a.aspectRatio=Math.max(0,e)||NaN,this.ready&&(this.initCropBox(),this.cropped&&this.renderCropBox())),this},setDragMode:function(e){var a=this.options,t=this.dragBox,o=this.face;if(this.ready&&!this.disabled){var i=e===xe,n=a.movable&&e===Be;e=i||n?e:ue,a.dragMode=e,Ze(t,q,e),He(t,C,i),He(t,De,n),a.cropBoxMovable||(Ze(o,q,e),He(o,C,i),He(o,De,n))}return this}},ra=Z.Cropper,Tt=function(){function r(e){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(F(this,r),!e||!At.test(e.tagName))throw new Error("The first argument is required and must be an <img> or <canvas> element.");this.element=e,this.options=L({},pt,Xe(a)&&a),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()}return ie(r,[{key:"init",value:function(){var a=this.element,t=a.tagName.toLowerCase(),o;if(a[N])return;if(a[N]=this,t==="img"){if(this.isImg=!0,o=a.getAttribute("src")||"",this.originalUrl=o,!o)return;o=a.src}else t==="canvas"&&window.HTMLCanvasElement&&(o=a.toDataURL());this.load(o)}},{key:"load",value:function(a){var t=this;if(!a)return;this.url=a,this.imageData={};var o=this.element,i=this.options;if(!i.rotatable&&!i.scalable&&(i.checkOrientation=!1),!i.checkOrientation||!window.ArrayBuffer){this.clone();return}if(Mt.test(a)){_t.test(a)?this.read($t(a)):this.clone();return}var n=new XMLHttpRequest,s=this.clone.bind(this);this.reloading=!0,this.xhr=n,n.onabort=s,n.onerror=s,n.ontimeout=s,n.onprogress=function(){n.getResponseHeader("content-type")!==lt&&n.abort()},n.onload=function(){t.read(n.response)},n.onloadend=function(){t.reloading=!1,t.xhr=null},i.checkCrossOrigin&&yt(a)&&o.crossOrigin&&(a=wt(a)),n.open("GET",a,!0),n.responseType="arraybuffer",n.withCredentials=o.crossOrigin==="use-credentials",n.send()}},{key:"read",value:function(a){var t=this.options,o=this.imageData,i=Zt(a),n=0,s=1,p=1;if(i>1){this.url=Ft(a,lt);var l=Qt(i);n=l.rotate,s=l.scaleX,p=l.scaleY}t.rotatable&&(o.rotate=n),t.scalable&&(o.scaleX=s,o.scaleY=p),this.clone()}},{key:"clone",value:function(){var a=this.element,t=this.url,o=a.crossOrigin,i=t;this.options.checkCrossOrigin&&yt(t)&&(o||(o="anonymous"),i=wt(t)),this.crossOrigin=o,this.crossOriginUrl=i;var n=document.createElement("img");o&&(n.crossOrigin=o),n.src=i||t,n.alt=a.alt||"The image to crop",this.image=n,n.onload=this.start.bind(this),n.onerror=this.stop.bind(this),W(n,E),a.parentNode.insertBefore(n,a.nextSibling)}},{key:"start",value:function(){var a=this,t=this.image;t.onload=null,t.onerror=null,this.sizing=!0;var o=Z.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(Z.navigator.userAgent),i=function(l,h){L(a.imageData,{naturalWidth:l,naturalHeight:h,aspectRatio:l/h}),a.initialImageData=L({},a.imageData),a.sizing=!1,a.sized=!0,a.build()};if(t.naturalWidth&&!o){i(t.naturalWidth,t.naturalHeight);return}var n=document.createElement("img"),s=document.body||document.documentElement;this.sizingImage=n,n.onload=function(){i(n.width,n.height),o||s.removeChild(n)},n.src=t.src,o||(n.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;",s.appendChild(n))}},{key:"stop",value:function(){var a=this.image;a.onload=null,a.onerror=null,a.parentNode.removeChild(a),this.image=null}},{key:"build",value:function(){if(!this.sized||this.ready)return;var a=this.element,t=this.options,o=this.image,i=a.parentNode,n=document.createElement("div");n.innerHTML=Nt;var s=n.querySelector(".".concat(N,"-container")),p=s.querySelector(".".concat(N,"-canvas")),l=s.querySelector(".".concat(N,"-drag-box")),h=s.querySelector(".".concat(N,"-crop-box")),c=h.querySelector(".".concat(N,"-face"));this.container=i,this.cropper=s,this.canvas=p,this.dragBox=l,this.cropBox=h,this.viewBox=s.querySelector(".".concat(N,"-view-box")),this.face=c,p.appendChild(o),W(a,T),i.insertBefore(s,a.nextSibling),this.isImg||pe(o,E),this.initPreview(),this.bind(),t.initialAspectRatio=Math.max(0,t.initialAspectRatio)||NaN,t.aspectRatio=Math.max(0,t.aspectRatio)||NaN,t.viewMode=Math.max(0,Math.min(3,Math.round(t.viewMode)))||0,W(h,T),t.guides||W(h.getElementsByClassName("".concat(N,"-dashed")),T),t.center||W(h.getElementsByClassName("".concat(N,"-center")),T),t.background&&W(s,"".concat(N,"-bg")),t.highlight||W(c,R),t.cropBoxMovable&&(W(c,De),Ze(c,q,ve)),t.cropBoxResizable||(W(h.getElementsByClassName("".concat(N,"-line")),T),W(h.getElementsByClassName("".concat(N,"-point")),T)),this.render(),this.ready=!0,this.setDragMode(t.dragMode),t.autoCrop&&this.crop(),this.setData(t.data),Q(t.ready)&&ae(a,Fe,t.ready,{once:!0}),Ye(a,Fe)}},{key:"unbuild",value:function(){if(!this.ready)return;this.ready=!1,this.unbind(),this.resetPreview(),this.cropper.parentNode.removeChild(this.cropper),pe(this.element,T)}},{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()}}],[{key:"noConflict",value:function(){return window.Cropper=ra,r}},{key:"setDefaults",value:function(a){L(pt,Xe(a)&&a)}}]),r}();return L(Tt.prototype,Kt,Jt,qt,ea,ta,aa),Tt})},wyMu:function(he,z,w){"use strict";Object.defineProperty(z,"__esModule",{value:!0}),z.default=void 0;var Y=me(w("q1tI")),f=F(w("17x9")),G=F(w("urRO"));function F(v){return v&&v.__esModule?v:{default:v}}function me(v){if(v&&v.__esModule)return v;var b={};if(v!=null){for(var g in v)if(Object.prototype.hasOwnProperty.call(v,g)){var u=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(v,g):{};u.get||u.set?Object.defineProperty(b,g,u):b[g]=v[g]}}return b.default=v,b}function ie(v){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ie=function(g){return typeof g}:ie=function(g){return g&&typeof Symbol=="function"&&g.constructor===Symbol&&g!==Symbol.prototype?"symbol":typeof g},ie(v)}function B(v,b,g){return b in v?Object.defineProperty(v,b,{value:g,enumerable:!0,configurable:!0,writable:!0}):v[b]=g,v}function ce(){return ce=Object.assign||function(v){for(var b=1;b<arguments.length;b++){var g=arguments[b];for(var u in g)Object.prototype.hasOwnProperty.call(g,u)&&(v[u]=g[u])}return v},ce.apply(this,arguments)}function je(v,b){if(!(v instanceof b))throw new TypeError("Cannot call a class as a function")}function Ee(v,b){for(var g=0;g<b.length;g++){var u=b[g];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(v,u.key,u)}}function Ae(v,b,g){return b&&Ee(v.prototype,b),g&&Ee(v,g),v}function Ne(v,b){return b&&(ie(b)==="object"||typeof b=="function")?b:Ge(v)}function Ge(v){if(v===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v}function te(v){return te=Object.setPrototypeOf?Object.getPrototypeOf:function(g){return g.__proto__||Object.getPrototypeOf(g)},te(v)}function Z(v,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function");v.prototype=Object.create(b&&b.prototype,{constructor:{value:v,writable:!0,configurable:!0}}),b&&le(v,b)}function le(v,b){return le=Object.setPrototypeOf||function(u,M){return u.__proto__=M,u},le(v,b)}var ge=["dragMode","aspectRatio","data","crop","viewMode","preview","responsive","restore","checkCrossOrigin","checkOrientation","modal","guides","center","highlight","background","autoCrop","autoCropArea","movable","rotatable","scalable","zoomable","zoomOnTouch","zoomOnWheel","wheelZoomRatio","cropBoxMovable","cropBoxResizable","toggleDragModeOnDblclick","minContainerWidth","minContainerHeight","minCanvasWidth","minCanvasHeight","minCropBoxWidth","minCropBoxHeight","ready","cropstart","cropmove","cropend","zoom"],N=ge.slice(4),ve=function(v){Z(b,v);function b(){return je(this,b),Ne(this,te(b).apply(this,arguments))}return Ae(b,[{key:"componentDidMount",value:function(){var u=this,M=Object.keys(this.props).filter(function(S){return ge.indexOf(S)!==-1}).reduce(function(S,V){return ce({},S,B({},V,u.props[V]))},{});this.cropper=new G.default(this.img,M)}},{key:"UNSAFE_componentWillReceiveProps",value:function(u){var M=this;u.src!==this.props.src&&this.cropper.reset().clear().replace(u.src),u.aspectRatio!==this.props.aspectRatio&&this.setAspectRatio(u.aspectRatio),u.data!==this.props.data&&this.setData(u.data),u.dragMode!==this.props.dragMode&&this.setDragMode(u.dragMode),u.cropBoxData!==this.props.cropBoxData&&this.setCropBoxData(u.cropBoxData),u.canvasData!==this.props.canvasData&&this.setCanvasData(u.canvasData),u.moveTo!==this.props.moveTo&&(u.moveTo.length>1?this.moveTo(u.moveTo[0],u.moveTo[1]):this.moveTo(u.moveTo[0])),u.zoomTo!==this.props.zoomTo&&this.zoomTo(u.zoomTo),u.rotateTo!==this.props.rotateTo&&this.rotateTo(u.rotateTo),u.scaleX!==this.props.scaleX&&this.scaleX(u.scaleX),u.scaleY!==this.props.scaleY&&this.scaleY(u.scaleY),u.enable!==this.props.enable&&(u.enable?this.enable():this.disable()),Object.keys(u).forEach(function(S){var V=u[S]!==M.props[S],J=N.indexOf(S)!==-1;if(typeof u[S]=="function"&&typeof M.props[S]=="function"&&(V=u[S].toString()!==M.props[S].toString()),V&&J)throw new Error("prop: ".concat(S," can't be change after componentDidMount"))})}},{key:"componentWillUnmount",value:function(){this.img&&(this.cropper.destroy(),delete this.img,delete this.cropper)}},{key:"setDragMode",value:function(u){return this.cropper.setDragMode(u)}},{key:"setAspectRatio",value:function(u){return this.cropper.setAspectRatio(u)}},{key:"getCroppedCanvas",value:function(u){return this.cropper.getCroppedCanvas(u)}},{key:"setCropBoxData",value:function(u){return this.cropper.setCropBoxData(u)}},{key:"getCropBoxData",value:function(){return this.cropper.getCropBoxData()}},{key:"setCanvasData",value:function(u){return this.cropper.setCanvasData(u)}},{key:"getCanvasData",value:function(){return this.cropper.getCanvasData()}},{key:"getImageData",value:function(){return this.cropper.getImageData()}},{key:"getContainerData",value:function(){return this.cropper.getContainerData()}},{key:"setData",value:function(u){return this.cropper.setData(u)}},{key:"getData",value:function(u){return this.cropper.getData(u)}},{key:"crop",value:function(){return this.cropper.crop()}},{key:"move",value:function(u,M){return this.cropper.move(u,M)}},{key:"moveTo",value:function(u,M){return this.cropper.moveTo(u,M)}},{key:"zoom",value:function(u){return this.cropper.zoom(u)}},{key:"zoomTo",value:function(u){return this.cropper.zoomTo(u)}},{key:"rotate",value:function(u){return this.cropper.rotate(u)}},{key:"rotateTo",value:function(u){return this.cropper.rotateTo(u)}},{key:"enable",value:function(){return this.cropper.enable()}},{key:"disable",value:function(){return this.cropper.disable()}},{key:"reset",value:function(){return this.cropper.reset()}},{key:"clear",value:function(){return this.cropper.clear()}},{key:"replace",value:function(u,M){return this.cropper.replace(u,M)}},{key:"scale",value:function(u,M){return this.cropper.scale(u,M)}},{key:"scaleX",value:function(u){return this.cropper.scaleX(u)}},{key:"scaleY",value:function(u){return this.cropper.scaleY(u)}},{key:"render",value:function(){var u=this,M=this.props,S=M.src,V=M.alt,J=M.crossOrigin,be=M.style,Te=M.className;return Y.default.createElement("div",{style:be,className:Te},Y.default.createElement("img",{crossOrigin:J,ref:function(y){u.img=y},src:S,alt:V===void 0?"picture":V,style:{opacity:0}}))}}]),b}(Y.Component);ve.propTypes={style:f.default.object,className:f.default.string,crossOrigin:f.default.string,src:f.default.string,alt:f.default.string,aspectRatio:f.default.number,dragMode:f.default.oneOf(["crop","move","none"]),data:f.default.shape({x:f.default.number,y:f.default.number,width:f.default.number,height:f.default.number,rotate:f.default.number,scaleX:f.default.number,scaleY:f.default.number}),scaleX:f.default.number,scaleY:f.default.number,enable:f.default.bool,cropBoxData:f.default.shape({left:f.default.number,top:f.default.number,width:f.default.number,height:f.default.number}),canvasData:f.default.shape({left:f.default.number,top:f.default.number,width:f.default.number,height:f.default.number}),zoomTo:f.default.number,moveTo:f.default.arrayOf(f.default.number),rotateTo:f.default.number,viewMode:f.default.oneOf([0,1,2,3]),preview:f.default.string,responsive:f.default.bool,restore:f.default.bool,checkCrossOrigin:f.default.bool,checkOrientation:f.default.bool,modal:f.default.bool,guides:f.default.bool,center:f.default.bool,highlight:f.default.bool,background:f.default.bool,autoCrop:f.default.bool,autoCropArea:f.default.number,movable:f.default.bool,rotatable:f.default.bool,scalable:f.default.bool,zoomable:f.default.bool,zoomOnTouch:f.default.bool,zoomOnWheel:f.default.bool,wheelZoomRatio:f.default.number,cropBoxMovable:f.default.bool,cropBoxResizable:f.default.bool,toggleDragModeOnDblclick:f.default.bool,minContainerWidth:f.default.number,minContainerHeight:f.default.number,minCanvasWidth:f.default.number,minCanvasHeight:f.default.number,minCropBoxWidth:f.default.number,minCropBoxHeight:f.default.number,ready:f.default.func,cropstart:f.default.func,cropmove:f.default.func,cropend:f.default.func,crop:f.default.func,zoom:f.default.func},ve.defaultProps={src:null,dragMode:"crop",data:null,scaleX:1,scaleY:1,enable:!0,zoomTo:1,rotateTo:0};var Se=ve;z.default=Se}}]);