(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-aedf3bda"],{"280f":function(t,e,i){},"409c":function(t,e,i){"use strict";var n=i("4835"),r=i.n(n);r.a},4428:function(t,e,i){(function(e,i){t.exports=i()})(0,function(){return function(t){var e={};function i(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=t,i.c=e,i.i=function(t){return t},i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:n})},i.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=23)}({23:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={url:{type:String},text:{type:String,default:"Upload Image"},extensions:{type:String,default:"png,jpg,jpeg,gif,svg,webp"},inputOfFile:{type:String,default:"files"},crop:{type:[String,Boolean],default:""},cropBtn:{type:Object,default:function(){return{ok:"Ok",cancel:"Cancel"}}},cropRatio:{type:String,default:"1:1"},resize:{type:[String,Boolean],default:!1},rotate:{type:Boolean,default:!1},ResizeBtn:{type:Object,default:function(){return{ok:"Ok",cancel:"Cancel"}}},maxFileSize:{type:Number,default:104857600},maxWidth:{type:Number},maxHeight:{type:Number},fixedWidth:{type:Number},fixedHeight:{type:Number},inputAccept:{type:String,default:"image/jpg,image/jpeg,image/png,image/gif"},isXhr:{type:Boolean,default:!0},headers:{type:Object,default:function(){return{}}},data:{type:Object,default:function(){return{}}},multiple:{type:Boolean,default:!1},multipleSize:{type:Number,default:0},minWidth:{type:Number,default:50},compress:{type:[Number,String],default:0},credentials:{type:[String,Boolean],default:!0}}}})})},"479c":function(t,e,i){(function(e,i){t.exports=i()})(0,function(){return function(t){var e={};function i(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=t,i.c=e,i.i=function(t){return t},i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:n})},i.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=0)}([function(t,e,i){"use strict";t.exports={isMobile:/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),setCssText:function(t){var e=[];return Object.keys(t).forEach(function(i){var n=t[i];"number"===typeof n&&(n+="px"),e.push(i+": "+n+";")}),e.join("")},isFunction:function(t){return"function"===typeof t}}}])})},4835:function(t,e,i){},"5d585":function(t,e,i){(function(e,i){t.exports=i()})(0,function(){return function(t){var e={};function i(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=t,i.c=e,i.i=function(t){return t},i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:n})},i.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=14)}({14:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n="data:image/gif;base64,R0lGODlhGAAYAPQAAP///3FxcePj4/v7++3t7dLS0vHx8b+/v+Dg4MfHx+jo6M7Oztvb2/f397Kysru7u9fX16qqqgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh/hpDcmVhdGVkIHdpdGggYWpheGxvYWQuaW5mbwAh+QQJBwAAACwAAAAAGAAYAAAFriAgjiQAQWVaDgr5POSgkoTDjFE0NoQ8iw8HQZQTDQjDn4jhSABhAAOhoTqSDg7qSUQwxEaEwwFhXH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EJRggFDGgQEREPjjAMBQUKIwIRDhBDC2QNDDEKoEkDoiMHDigICGkJBS2dDA6TAAnAEAkCdQ8ORQcHTAkLcQQODLPMIgIJaCWxJMIkPIoAt3EhACH5BAkHAAAALAAAAAAYABgAAAWtICCOJNA0ZZoOpGGQrDoOBCoSxNgQsQzgMZyIlvOJdi+AS2SoyXrK4umWHM5wNiV0UN3xdLiqr+mENcWpM9TIbrsBkEck8oC0DQqBQGGIz+t3eXtob0ZTPgNrIwQJDgtGAgwCWSIMDg4HiiUIDAxFAAoODwxDBWINCEGdSTQkCQcoegADBaQ6MggHjwAFBZUFCm0HB0kJCUy9bAYHCCPGIwqmRq0jySMGmj6yRiEAIfkECQcAAAAsAAAAABgAGAAABbIgII4k0DRlmg6kYZCsOg4EKhLE2BCxDOAxnIiW84l2L4BLZKipBopW8XRLDkeCiAMyMvQAA+uON4JEIo+vqukkKQ6RhLHplVGN+LyKcXA4Dgx5DWwGDXx+gIKENnqNdzIDaiMECwcFRgQCCowiCAcHCZIlCgICVgSfCEMMnA0CXaU2YSQFoQAKUQMMqjoyAglcAAyBAAIMRUYLCUkFlybDeAYJryLNk6xGNCTQXY0juHghACH5BAkHAAAALAAAAAAYABgAAAWzICCOJNA0ZVoOAmkY5KCSSgSNBDE2hDyLjohClBMNij8RJHIQvZwEVOpIekRQJyJs5AMoHA+GMbE1lnm9EcPhOHRnhpwUl3AsknHDm5RN+v8qCAkHBwkIfw1xBAYNgoSGiIqMgJQifZUjBhAJYj95ewIJCQV7KYpzBAkLLQADCHOtOpY5PgNlAAykAEUsQ1wzCgWdCIdeArczBQVbDJ0NAqyeBb64nQAGArBTt8R8mLuyPyEAOwAAAAAAAAAAAA==";e.default=n}})})},6333:function(t,e,i){"use strict";var n=i("7c5d"),r=i.n(n);r.a},"7c5d":function(t,e,i){},8403:function(t,e,i){(function(e,i){t.exports=i()})(0,function(){return function(t){var e={};function i(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=t,i.c=e,i.i=function(t){return t},i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:n})},i.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=22)}({0:function(t,e,i){"use strict";t.exports={isMobile:/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),setCssText:function(t){var e=[];return Object.keys(t).forEach(function(i){var n=t[i];"number"===typeof n&&(n+="px"),e.push(i+": "+n+";")}),e.join("")},isFunction:function(t){return"function"===typeof t}}},22:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=h;var n=i(0),r=o(n);function o(t){return t&&t.__esModule?t:{default:t}}var a=r.default.isMobile,s=document.body.offsetWidth;function h(t,e,i,n,r){if(!e)return null;var o=document.body.offsetHeight,h=1/r,c=parseFloat(window.getComputedStyle(i).width),u=parseFloat(window.getComputedStyle(i).height),l=document.querySelector(".info-aside"),d=(s-c)/2,f=parseFloat(window.getComputedStyle(l).height),p=(o-u-f)/2,g=a?t.changedTouches[0]["clientX"]:t.clientX,A=a?t.changedTouches[0]["clientY"]:t.clientY,m=e.offsetWidth,v=e.offsetHeight,y={};return r>=1&&g<=d+c?(m>=c&&(y.width=c),y.width=n.w+g-n.x,y.height=m*h,c>u?m>u&&(y.height=u,y.width=u*r):cc&&(y.width=c,y.height=c*h):m>=c&&(y.width=c,y.height=c*h)):r<1&&Au?v>u&&(y.height=u,y.width=u*r):m>c&&(y.width=c,y.height=c*h)):"auto"===r&&A<=p+u+f&&g<=p+c?(y.height=n.h+A-n.y,y.width=n.w+g-n.x):g<=d+c&&(y.width=n.w+g-n.x,y.height=e.style.width,c>u?v>u&&(y.height=u,y.width=u):cc&&(y.width=c,y.height=c):m>c&&(y.width=c,e.style.height=c)),y}}})})},"8d87":function(t,e,i){(function(e,i){t.exports=i()})("undefined"!==typeof self&&self,function(){return function(t){var e={};function i(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:n})},i.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=0)}([function(t,e,i){"use strict";var n="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},r=Object.assign||function(t){for(var e=1;e1&&(r=n[0].replace("data:","")),o.onload=function(){var t=i._getCanvas(o.naturalWidth,o.naturalHeight),n=t.getContext("2d");n.drawImage(o,0,0);var a=t.toDataURL(r);e(a)}},base64:function(t,e){var i=this._getSrc(t),n=i.src,r=i.type;if("file"===r)return this._readFile(n,e);if("video"===r){var o=t,a=this._getCanvas(o.videoWidth,o.videoHeight),s=a.getContext("2d");s.drawImage(o,0,0);var h=a.toDataURL();e(h,a)}return this.init(n,e)},compress:function(t,e,i){var n=this,r=this._getSrc(t),o=r.src,a=r.type;if("file"===a)return this._readFile(o,function(r){n._compress(r,t,e,i)});this._compress(o,t,e,i)},_compress:function(t,e,i,n){var r=this;this._loadImage(t,function(t){var o=r._getImageType(e),a=r._getCanvas(t.naturalWidth,t.naturalHeight),s=a.getContext("2d");s.drawImage(t,0,0);var h=a.toDataURL(o,i/100);n(h)})},crop:function(t,e,i){var n=this,r=this._getSrc(t),o=r.src,a=r.type;if("file"===a)return this._readFile(o,function(r){n._crop(r,t,e,i)});this._crop(o,t,e,i)},_crop:function(t,e,i,n){var r=this;this._loadImage(t,function(t){if(!i.w&&i.width&&(i.w=i.width,i.h=i.height),o(i.x)&&o(i.y)&&i.w>0&&i.h>0){var a=i.w,s=i.h;i.maxWidth&&i.maxWidth0)s=Math.floor(a.naturalWidth*i.ratio),h=Math.floor(a.naturalHeight*i.ratio);else if("number"===typeof i.width&&"number"===typeof i.height)if(o(i.width,i.height,s,h)){if(s>i.width||h>i.height)return i.x=(s-i.width)/2,i.y=(h-i.height)/2,r._crop(t,e,i,n);if(s0},_isImageElement:function(t){return"object"===("undefined"===typeof t?"undefined":n(t))&&"IMG"===t.tagName},_isVideoElement:function(t){return"object"===("undefined"===typeof t?"undefined":n(t))&&"VIDEO"===t.tagName},_getImageType:function(t){var e=this._getSrc(t),i=e.src,n=e.type,r="image/jpeg";if("file"===n){var o=t.type,s=o.match(/(image\/[\w]+)\.*/)[0];"undefined"!==typeof s&&(r=s)}else{var h=a.exec(i);h&&h[1]&&(r="image/"+h[1])}return r}}}])})},"8f51":function(t,e,i){(function(e,i){t.exports=i()})(0,function(){return function(t){var e={};function i(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=t,i.c=e,i.i=function(t){return t},i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:n})},i.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=13)}({0:function(t,e,i){"use strict";t.exports={isMobile:/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),setCssText:function(t){var e=[];return Object.keys(t).forEach(function(i){var n=t[i];"number"===typeof n&&(n+="px"),e.push(i+": "+n+";")}),e.join("")},isFunction:function(t){return"function"===typeof t}}},13:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=s;var n=i(0),r=o(n);function o(t){return t&&t.__esModule?t:{default:t}}var a=r.default.isMobile;function s(t,e,i){if(e){var n=a?t.changedTouches[0]["clientX"]:t.clientX,r=a?t.changedTouches[0]["clientY"]:t.clientY,o=n-i.x,s=r-i.y;return o<=i.minLeft&&(o=i.minLeft),o>=i.maxLeft&&(o=i.maxLeft),s<=i.minTop&&(s=i.minTop),s>=i.maxTop&&(s=i.maxTop),{left:o,top:s}}}}})})},"903e":function(t,e,i){"use strict";var n="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};void 0===XMLHttpRequest.prototype.sendAsBinary&&(XMLHttpRequest.prototype.sendAsBinary=function(t){var e=Array.prototype.map.call(t,function(t){return 255&t.charCodeAt(0)});this.send(new Uint8Array(e).buffer)}),t.exports=function(t,e,i,r,o,a,s,h){var c=new XMLHttpRequest,u=a||function(){console.error("AJAX ERROR!")},l="webcodeimageupload",d=!1;"blob"===t&&(d=t,t="GET"),t=t.toUpperCase(),c.onload=function(){var e=c.response;try{e=JSON.parse(c.responseText)}catch(n){401===c.status&&(e=u("access_denied",c.statusText))}var i=b(c.getAllResponseHeaders());i.statusCode=c.status,o(e||("GET"===t?u("empty_response","Could not get resource"):{}),i)},c.onerror=function(){var t=c.responseText;try{t=JSON.parse(c.responseText)}catch(e){console.error(e)}o(t||u("access_denied","Could not get resource"))};var f=void 0;if("GET"===t||"DELETE"===t)r=null;else if(s){var p=r,g=r.base64Code.replace("data:"+r.type+";base64,","");r=["--"+l,'Content-Disposition: form-data; name="'+r.filed+'"; filename="'+r.filename+'"',"Content-Type: "+r.type,"",window.atob(g),""].join("\r\n");var A=Object.keys(p);if(A.length>4){var m=!0,v=!1,y=void 0;try{for(var C,x=A[Symbol.iterator]();!(m=(C=x.next()).done);m=!0){var w=C.value;-1==["filed","filename","type","base64Code"].indexOf(w)&&(r+=["--"+l,'Content-Disposition: form-data; name="'+w+'";',"",""].join("\r\n"),r+=["object"===n(p[w])?JSON.stringify(p[w]):encodeURI(p[w]),""].join("\r\n"))}}catch(a){v=!0,y=a}finally{try{!m&&x.return&&x.return()}finally{if(v)throw y}}}r+="--"+l+"--"}if(c.open(t,e,!0),d&&("responseType"in c?c.responseType=d:c.overrideMimeType("text/plain; charset=x-user-defined")),i)for(f in i)c.setRequestHeader(f,i[f]);return c.withCredentials="undefined"===typeof h||h,s?(c.setRequestHeader("Content-Type","multipart/form-data; boundary="+l),c.sendAsBinary(r)):(c.send(r),c);function b(t){var e={},i=/([a-z\-]+):\s?(.*);?/gi,n=void 0;while(n=i.exec(t))e[n[1]]=n[2];return e}}},d4fb:function(t,e,i){},e5b0:function(t,e,i){"use strict";var n=i("280f"),r=i.n(n);r.a},ed8c:function(t,e,i){"use strict";var n=i("d4fb"),r=i.n(n);r.a},f603:function(t,e,i){"use strict";var n=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"g-core-image-upload-btn"},[t._t("default",[t._v(t._s(t.text))]),i("form",{directives:[{name:"show",rawName:"v-show",value:!t.hasImage,expression:"!hasImage"}],staticClass:"g-core-image-upload-form",attrs:{method:"post",enctype:"multipart/form-data",action:""}},[i("input",{attrs:{disabled:t.uploading,name:t.name,multiple:t.multiple,type:"file",accept:t.inputAccept},on:{change:t.change,dragover:t.dragover,dragenter:t.dragover,dragleave:t.dragleave,dragend:t.dragleave,drop:t.dragleave}})]),i("div",{directives:[{name:"show",rawName:"v-show",value:t.hasImage,expression:"hasImage"}],staticClass:"g-core-image-corp-container"},[i("crop",{ref:"cropBox",attrs:{"is-resize":t.resize&&!t.crop,ratio:t.cropRatio,"is-rotate":t.rotate}}),i("div",{staticClass:"info-aside"},[i("p",{staticClass:"btn-groups rotate-groups",staticStyle:{display:"none"}},[i("button",{staticClass:"btn btn-rotate",attrs:{type:"button"},on:{click:t.doRotate}},[t._v("↺")]),i("button",{staticClass:"btn btn-reverserotate",attrs:{type:"button"},on:{click:t.doReverseRotate}},[t._v("↻")])]),t.crop?i("p",{staticClass:"btn-groups"},[i("button",{staticClass:"btn btn-upload",attrs:{type:"button"},on:{click:t.doCrop}},[t._v(t._s(t.cropBtn.ok))]),i("button",{staticClass:"btn btn-cancel",attrs:{type:"button"},on:{click:t.cancel}},[t._v(t._s(t.cropBtn.cancel))])]):t._e(),t.resize&&!t.crop?i("p",{staticClass:"btn-groups"},[i("button",{staticClass:"btn btn-upload",attrs:{type:"button"},on:{click:t.doResize}},[t._v(t._s(t.ResizeBtn.ok))]),i("button",{staticClass:"btn btn-cancel",attrs:{type:"button"},on:{click:t.cancel}},[t._v(t._s(t.ResizeBtn.cancel))])]):t._e()])],1)],2)},r=[],o=(i("7f7f"),i("ac6a"),i("456d"),i("7618")),a=(i("3b2b"),i("28a5"),i("a481"),i("903e")),s=i.n(a),h=i("8d87"),c=i.n(h),u=i("5d585"),l=i.n(u),d=i("4428"),f=i.n(d),p=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"image-aside"},[i("div",{staticClass:"g-crop-image-box"},[i("div",{staticClass:"g-crop-image-principal",on:{touchstart:t.drag,":mousedown":t.drag}},[i("div",{staticClass:"image-wrap",style:{width:t.width+"px",height:t.height+"px",left:t.left+"px",top:t.top+"px",backgroundImage:"url("+t.src+")",cursor:t.isResize?"default":"move"}},[i("img",{ref:"crop-image",staticStyle:{width:"0",height:"0"},attrs:{src:t.src}})]),t.isResize?t._e():i("div",{staticClass:"image-mask"},[i("div",{staticClass:"mask top",style:{top:0,height:t.cropCSS.top+"px",left:0,width:"100%"}}),i("div",{staticClass:"mask bottom",style:{bottom:0,top:t.cropCSS.top+t.cropCSS.height+"px",left:0,width:"100%"}}),i("div",{staticClass:"mask left",style:{top:t.cropCSS.top+"px",height:t.cropCSS.height+"px",left:0,width:t.cropCSS.left+"px"}}),i("div",{staticClass:"mask right",style:{top:t.cropCSS.top+"px",height:t.cropCSS.height+"px",left:t.cropCSS.left+t.cropCSS.width+"px",right:0}})]),t.isResize?t._e():i("div",{staticClass:"crop-box",style:{top:t.cropCSS.top+"px",left:t.cropCSS.left+"px",height:t.cropCSS.height+"px",width:t.cropCSS.width+"px"}},[i("div",{staticClass:"reference-line v"}),i("div",{staticClass:"reference-line h"}),i("a",{staticClass:"g-resize",on:{touchstart:function(e){return e.target!==e.currentTarget?null:t.resize(e)},mousedown:function(e){return e.target!==e.currentTarget?null:t.resize(e)}}})])]),t.resize?i("resize-bar",{ref:"resizeBar",on:{resize:t.resizeImage}}):t._e(),t.isRotate?i("rotate-bar",{on:{rotate:t.rotateImage}}):t._e()],1)])},g=[],A=(i("c5f6"),i("8f51")),m=i.n(A),v=i("8403"),y=i.n(v),C=i("479c"),x=i.n(C),w=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"g-resize-bar"},[i("div",{staticClass:"g-resize-highlight",style:{width:t.left+"%"}}),i("button",{staticClass:"circle-btn",style:{left:t.left+"%"},on:{touchstart:function(e){return e.target!==e.currentTarget?null:t.drag(e)},mousedown:function(e){return e.target!==e.currentTarget?null:t.drag(e)}}})])},b=[],S={props:{minProgress:{type:[Number,String],default:0}},data:function(){return{progress:100,left:100}},methods:{setProgress:function(t){this.left=t},drag:function(t){t.preventDefault(),t.stopPropagation();var e=t.target;this.el=e;var i=this.$el.parentElement,n=this,r=x.a.isMobile,o=200,a={x:(r?t.touches[0]["clientX"]:t.clientX)-e.offsetLeft,y:(r?t.touches[0]["clientY"]:t.clientY)-e.offsetTop,maxLeft:o,maxTop:parseInt(i.style.height)-parseInt(e.style.height),minLeft:0,minTop:0},s=function(t){var e=m()(t,n.el,a);if(e){if(e.left/o0?(this.ratioW=this.ratio.split(":")[0],this.ratioH=this.ratio.split(":")[1],this.ratioVal=this.ratioW/this.ratioH):(this.ratioW=1,this.ratioH=1,this.ratioVal=this.ratio),this.natrualWidth=e,this.natrualHeight=i,this.setLayout(e,i);var n=this.$refs.resizeBar;return this.isResize?n.setProgress(100):n.setProgress(50),this.imgChangeRatio},setOriginalSrc:function(t){this.originSrc=t},resizeImage:function(t){var e,i;this.isResize?(e=this.natrualWidth*this.imgChangeRatio*t,i=this.natrualHeight*this.imgChangeRatio*t):(e=this.initWidth+t*(this.natrualWidth-this.initWidth),i=this.initHeight+t*(this.natrualHeight-this.initHeight)),e<=this.minWidth||ic?(o=i,r=i*h,a=(n-i*h)/2):(r=i*h,o=i,a=(n-i*h)/2),this._setStyle(r,o,a,s,h,!0)},_setStyle:function(t,e,i,n,r,o){var a=this.$el.querySelector(".g-crop-image-principal");o||(this.marginLeft=this.marginLeft+(this.width-t)/2,this.marginTop=this.marginTop+(this.height-e)/2),a.style.cssText="width:"+t+"px;height:"+e+"px;margin-left:"+i+"px;margin-top:"+n+"px",this.setCropBox(t,e),this.isResize?(this.width=t,this.height=e):(r>=this.cropCSS.width/this.cropCSS.height?(this.height=this.cropCSS.height,this.width=this.height*r):(this.width=this.cropCSS.width,this.height=this.width/r),this.initWidth=this.width,this.initHeight=this.height,this.left=(t-this.width)/2,this.top=(e-this.height)/2),this.imgChangeRatio=this.width/this.natrualWidth},setCropBox:function(t,e,i){if(!this.isResize){var n=this.__find(".crop-box"),r=(this.$el,t),o=e,a=this.ratioW,s=this.ratioH,h=r;jo){var l=o/100*D;u.height=l,u.width=u.height*a/s,u.left=(r-u.width)/2,u.top=(o-u.height)/2,n.style.cssText=x.a.setCssText(u)}this.cropCSS=u}},getCropData:function(){return this.isResize?{imgChangeRatio:this.imgChangeRatio,x:0,y:0,w:this.natrualWidth,h:this.natrualHeight}:{x:(this.cropCSS.left-this.left)/this.imgChangeRatio,y:(this.cropCSS.top-this.top)/this.imgChangeRatio,w:this.cropCSS.width/this.imgChangeRatio,h:this.cropCSS.height/this.imgChangeRatio}},getCropImage:function(){return this.$refs["crop-image"]},__find:function(t){var e=this.$el;return e.querySelector(t)},resize:function(t){if(t.stopPropagation(),this.ratio.indexOf(":")){var e=t.target.parentElement,i=this.__find(".g-crop-image-principal");this._$container&&(this._$container=container);var n=this,r={x:x.a.isMobile?t.touches[0].clientX:t.clientX,y:x.a.isMobile?t.touches[0].clientY:t.clientY,w:e.offsetWidth,h:e.offsetHeight};this.el=e,this.container=i;var o=this._getMaxCropAreaWidth(),a=function(t){var e=y()(t,n.el,i,r,n.ratioVal);e&&(e.width<=o.maxWidth||e.height<=o.maxHeight)&&(n.cropCSS.width=e.width,n.cropCSS.height=e.height)},s=function t(e){this.el=null,x.a.isMobile&&(document.removeEventListener("touchmove",a,!1),document.removeEventListener("touchend",t,!1)),document.removeEventListener("mousemove",a,!1),document.removeEventListener("mouseup",t,!1)};x.a.isMobile&&(document.addEventListener("touchmove",a,!1),document.addEventListener("touchend",s,!1)),document.addEventListener("mousemove",a,!1),document.addEventListener("mouseup",s,!1)}},_getMaxCropAreaWidth:function(){this.__find(".crop-box");return this.width>this.height?{maxWidth:this.height*this.ratioW/this.ratioH,maxHeight:this.height}:{maxWidth:this.width,maxHeight:this.width*this.ratioH/this.ratioW}},drag:function(t){t.preventDefault();var e=this.__find(".image-wrap");this.el=e;var i=this.__find(".crop-box"),n=(t.currentTarget,this),r=x.a.isMobile,o={x:(r?t.touches[0]["clientX"]:t.clientX)-e.offsetLeft,y:(r?t.touches[0]["clientY"]:t.clientY)-e.offsetTop,maxLeft:i.offsetLeft,maxTop:i.offsetTop,minLeft:i.offsetWidth+i.offsetLeft-e.offsetWidth,minTop:i.offsetHeight+i.offsetTop-e.offsetHeight},a=function(t){var e=m()(t,n.el,o);e&&(n.left=e.left,n.top=e.top)},s=function t(e){if(n.el=null,r)return document.removeEventListener("touchmove",a,!1),void document.removeEventListener("touchend",t,!1);document.removeEventListener("mousemove",a,!1),document.removeEventListener("mouseup",t,!1)};if(r)return document.addEventListener("touchmove",a,!1),void document.addEventListener("touchend",s,!1);document.addEventListener("mousemove",a,!1),document.addEventListener("mouseup",s,!1)}}},z=W,T=(i("ed8c"),Object(I["a"])(z,p,g,!1,null,"3422c8a2",null)),G=T.exports,F="",N={components:{Crop:G,ResizeBar:E},props:f.a,data:function(){return{files:[],hasImage:!1,options:this.props,uploading:!1,image:{src:l.a,width:24,height:24,minProgress:.05}}},computed:{name:function(){return this.multiple?this.inputOfFile+"[]":this.inputOfFile}},methods:{__dispatch:function(t,e,i){this.$emit&&this.$emit(t,e,i)},__find:function(t){return this.$el.querySelector(t)},dragover:function(){this.$el.classList.add("is-dragover")},dragleave:function(){this.$refs.container;this.$el.classList.remove("is-dragover")},change:function(t){var e,i=this,n=t.target.value.replace(/C:\\fakepath\\/i,""),r=n.substring(n.lastIndexOf(".")+1),o=this.extensions.split(",");if(o.length>1){var a=new RegExp("^["+o.join("|")+"]+$","i");if(!a.test(r))return this.__dispatch("errorhandle","TYPE ERROR")}if(t.target.files[0].size>this.maxFileSize)return e=parseInt(this.maxFileSize/1024/1024)>0?(this.maxFileSize/1024/1024).toFixed(2)+"MB":parseInt(this.maxFileSize/1024)>0?(this.maxFileSize/1024).toFixed(2)+"kB":options.maxFileSize.toFixed(2)+"Byte",console.warn("FILE IS TOO LARGER MAX FILE IS "+e),this.__dispatch("errorhandle","FILE IS TOO LARGER MAX FILE IS "+e);if(this.multipleSize>0&&t.target.files.length>this.multipleSize)return console.warn("FILE NUM IS LARGER THAN "+this.multipleSize),this.__dispatch("errorhandle","FILE NUM OVERLOAD");if(this.files=t.target.files,this.crop||this.resize)this.__showImage();else{var s=this.files.length>1?this.files:this.files[0];this.__dispatch("imagechanged",s),this.compress&&"image/png"!==this.files[0]["type"]&&"image/gif"!==this.files[0]["type"]?c.a.compress(s,100-this.compress,function(t){i.tryAjaxUpload("",!0,t)}):this.tryAjaxUpload()}},__showImage:function(){this.hasImage=!0,this.__readFiles()},__readFiles:function(){var t=new FileReader,e=this;t.onload=function(t){var i=t.target.result;F=document.body.style.overflow,document.body.style.overflow="hidden",e.__initImage(i)},t.readAsDataURL(this.files[0])},__initImage:function(t){var e=new Image,i=this;e.src=t;var n=this.$refs.cropBox;e.onload=function(){i.image.minProgress=i.minWidth/e.naturalWidth,c.a.init(t,function(t){i.imgChangeRatio=n.setImage(t,e.naturalWidth,e.naturalHeight)})}},resizeImage:function(t){var e=this.$refs.cropBox;e.resizeImage(t)},doRotate:function(t){var e=this,i=this.$refs.cropBox,n=i.getCropImage();return this.data.compress=100-this.compress,c.a.rotate(n,1,function(t){e.__initImage(t)})},doReverseRotate:function(t){var e=this,i=this.$refs.cropBox,n=i.getCropImage();return this.data.compress=100-this.compress,c.a.rotate(n,-1,function(t){e.__initImage(t)})},doCrop:function(t){var e=this;this.__setData("crop");var i=this.$refs.cropBox,n=this.__setUpload(t.target);if("local"===this.crop){var r=i.getCropImage();return this.data.compress=100-this.compress,c.a.crop(r,this.data,function(t){n(t),e.__dispatch("imagechanged",t)})}n()},doResize:function(t){var e=this;this.__setData("resize");var i=this.$refs.cropBox,n=this.__setUpload(t.target);if("local"===this.resize){var r=i.getCropImage();return this.data.compress=100-this.compress,c.a.resize(r,this.data,function(t){n(t),e.__dispatch("imagechanged",t)})}n()},__setData:function(t){"object"!==Object(o["a"])(this.data)&&(this.data={}),this.data["request"]=t;for(var e=this.$refs.cropBox,i=e.getCropData(),n=0,r=Object.keys(i);n