| 1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-7a6b7e78"],{"0180":function(t,e,r){"use strict";var n=r("4ae2"),o=r("f4ec").left,i=n.aTypedArray,a=n.exportTypedArrayMethod;a("reduce",(function(t){return o(i(this),t,arguments.length,arguments.length>1?arguments[1]:void 0)}))},"0337":function(t,e){t.exports="undefined"!==typeof ArrayBuffer&&"undefined"!==typeof DataView},"0345":function(t,e,r){"use strict";var n=r("4ae2"),o=r("a3e7").map,i=r("7f45"),a=n.aTypedArray,s=n.aTypedArrayConstructor,c=n.exportTypedArrayMethod;c("map",(function(t){return o(a(this),t,arguments.length>1?arguments[1]:void 0,(function(t,e){return new(s(i(t,t.constructor)))(e)}))}))},"0358":function(t,e,r){(function(e){t.exports=e()})((function(t){"use strict";var e=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function r(t,e){var r=t[0],n=t[1],o=t[2],i=t[3];r+=(n&o|~n&i)+e[0]-680876936|0,r=(r<<7|r>>>25)+n|0,i+=(r&n|~r&o)+e[1]-389564586|0,i=(i<<12|i>>>20)+r|0,o+=(i&r|~i&n)+e[2]+606105819|0,o=(o<<17|o>>>15)+i|0,n+=(o&i|~o&r)+e[3]-1044525330|0,n=(n<<22|n>>>10)+o|0,r+=(n&o|~n&i)+e[4]-176418897|0,r=(r<<7|r>>>25)+n|0,i+=(r&n|~r&o)+e[5]+1200080426|0,i=(i<<12|i>>>20)+r|0,o+=(i&r|~i&n)+e[6]-1473231341|0,o=(o<<17|o>>>15)+i|0,n+=(o&i|~o&r)+e[7]-45705983|0,n=(n<<22|n>>>10)+o|0,r+=(n&o|~n&i)+e[8]+1770035416|0,r=(r<<7|r>>>25)+n|0,i+=(r&n|~r&o)+e[9]-1958414417|0,i=(i<<12|i>>>20)+r|0,o+=(i&r|~i&n)+e[10]-42063|0,o=(o<<17|o>>>15)+i|0,n+=(o&i|~o&r)+e[11]-1990404162|0,n=(n<<22|n>>>10)+o|0,r+=(n&o|~n&i)+e[12]+1804603682|0,r=(r<<7|r>>>25)+n|0,i+=(r&n|~r&o)+e[13]-40341101|0,i=(i<<12|i>>>20)+r|0,o+=(i&r|~i&n)+e[14]-1502002290|0,o=(o<<17|o>>>15)+i|0,n+=(o&i|~o&r)+e[15]+1236535329|0,n=(n<<22|n>>>10)+o|0,r+=(n&i|o&~i)+e[1]-165796510|0,r=(r<<5|r>>>27)+n|0,i+=(r&o|n&~o)+e[6]-1069501632|0,i=(i<<9|i>>>23)+r|0,o+=(i&n|r&~n)+e[11]+643717713|0,o=(o<<14|o>>>18)+i|0,n+=(o&r|i&~r)+e[0]-373897302|0,n=(n<<20|n>>>12)+o|0,r+=(n&i|o&~i)+e[5]-701558691|0,r=(r<<5|r>>>27)+n|0,i+=(r&o|n&~o)+e[10]+38016083|0,i=(i<<9|i>>>23)+r|0,o+=(i&n|r&~n)+e[15]-660478335|0,o=(o<<14|o>>>18)+i|0,n+=(o&r|i&~r)+e[4]-405537848|0,n=(n<<20|n>>>12)+o|0,r+=(n&i|o&~i)+e[9]+568446438|0,r=(r<<5|r>>>27)+n|0,i+=(r&o|n&~o)+e[14]-1019803690|0,i=(i<<9|i>>>23)+r|0,o+=(i&n|r&~n)+e[3]-187363961|0,o=(o<<14|o>>>18)+i|0,n+=(o&r|i&~r)+e[8]+1163531501|0,n=(n<<20|n>>>12)+o|0,r+=(n&i|o&~i)+e[13]-1444681467|0,r=(r<<5|r>>>27)+n|0,i+=(r&o|n&~o)+e[2]-51403784|0,i=(i<<9|i>>>23)+r|0,o+=(i&n|r&~n)+e[7]+1735328473|0,o=(o<<14|o>>>18)+i|0,n+=(o&r|i&~r)+e[12]-1926607734|0,n=(n<<20|n>>>12)+o|0,r+=(n^o^i)+e[5]-378558|0,r=(r<<4|r>>>28)+n|0,i+=(r^n^o)+e[8]-2022574463|0,i=(i<<11|i>>>21)+r|0,o+=(i^r^n)+e[11]+1839030562|0,o=(o<<16|o>>>16)+i|0,n+=(o^i^r)+e[14]-35309556|0,n=(n<<23|n>>>9)+o|0,r+=(n^o^i)+e[1]-1530992060|0,r=(r<<4|r>>>28)+n|0,i+=(r^n^o)+e[4]+1272893353|0,i=(i<<11|i>>>21)+r|0,o+=(i^r^n)+e[7]-155497632|0,o=(o<<16|o>>>16)+i|0,n+=(o^i^r)+e[10]-1094730640|0,n=(n<<23|n>>>9)+o|0,r+=(n^o^i)+e[13]+681279174|0,r=(r<<4|r>>>28)+n|0,i+=(r^n^o)+e[0]-358537222|0,i=(i<<11|i>>>21)+r|0,o+=(i^r^n)+e[3]-722521979|0,o=(o<<16|o>>>16)+i|0,n+=(o^i^r)+e[6]+76029189|0,n=(n<<23|n>>>9)+o|0,r+=(n^o^i)+e[9]-640364487|0,r=(r<<4|r>>>28)+n|0,i+=(r^n^o)+e[12]-421815835|0,i=(i<<11|i>>>21)+r|0,o+=(i^r^n)+e[15]+530742520|0,o=(o<<16|o>>>16)+i|0,n+=(o^i^r)+e[2]-995338651|0,n=(n<<23|n>>>9)+o|0,r+=(o^(n|~i))+e[0]-198630844|0,r=(r<<6|r>>>26)+n|0,i+=(n^(r|~o))+e[7]+1126891415|0,i=(i<<10|i>>>22)+r|0,o+=(r^(i|~n))+e[14]-1416354905|0,o=(o<<15|o>>>17)+i|0,n+=(i^(o|~r))+e[5]-57434055|0,n=(n<<21|n>>>11)+o|0,r+=(o^(n|~i))+e[12]+1700485571|0,r=(r<<6|r>>>26)+n|0,i+=(n^(r|~o))+e[3]-1894986606|0,i=(i<<10|i>>>22)+r|0,o+=(r^(i|~n))+e[10]-1051523|0,o=(o<<15|o>>>17)+i|0,n+=(i^(o|~r))+e[1]-2054922799|0,n=(n<<21|n>>>11)+o|0,r+=(o^(n|~i))+e[8]+1873313359|0,r=(r<<6|r>>>26)+n|0,i+=(n^(r|~o))+e[15]-30611744|0,i=(i<<10|i>>>22)+r|0,o+=(r^(i|~n))+e[6]-1560198380|0,o=(o<<15|o>>>17)+i|0,n+=(i^(o|~r))+e[13]+1309151649|0,n=(n<<21|n>>>11)+o|0,r+=(o^(n|~i))+e[4]-145523070|0,r=(r<<6|r>>>26)+n|0,i+=(n^(r|~o))+e[11]-1120210379|0,i=(i<<10|i>>>22)+r|0,o+=(r^(i|~n))+e[2]+718787259|0,o=(o<<15|o>>>17)+i|0,n+=(i^(o|~r))+e[9]-343485551|0,n=(n<<21|n>>>11)+o|0,t[0]=r+t[0]|0,t[1]=n+t[1]|0,t[2]=o+t[2]|0,t[3]=i+t[3]|0}function n(t){var e,r=[];for(e=0;e<64;e+=4)r[e>>2]=t.charCodeAt(e)+(t.charCodeAt(e+1)<<8)+(t.charCodeAt(e+2)<<16)+(t.charCodeAt(e+3)<<24);return r}function o(t){var e,r=[];for(e=0;e<64;e+=4)r[e>>2]=t[e]+(t[e+1]<<8)+(t[e+2]<<16)+(t[e+3]<<24);return r}function i(t){var e,o,i,a,s,c,u=t.length,l=[1732584193,-271733879,-1732584194,271733878];for(e=64;e<=u;e+=64)r(l,n(t.substring(e-64,e)));for(t=t.substring(e-64),o=t.length,i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],e=0;e<o;e+=1)i[e>>2]|=t.charCodeAt(e)<<(e%4<<3);if(i[e>>2]|=128<<(e%4<<3),e>55)for(r(l,i),e=0;e<16;e+=1)i[e]=0;return a=8*u,a=a.toString(16).match(/(.*?)(.{0,8})$/),s=parseInt(a[2],16),c=parseInt(a[1],16)||0,i[14]=s,i[15]=c,r(l,i),l}function a(t){var e,n,i,a,s,c,u=t.length,l=[1732584193,-271733879,-1732584194,271733878];for(e=64;e<=u;e+=64)r(l,o(t.subarray(e-64,e)));for(t=e-64<u?t.subarray(e-64):new Uint8Array(0),n=t.length,i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],e=0;e<n;e+=1)i[e>>2]|=t[e]<<(e%4<<3);if(i[e>>2]|=128<<(e%4<<3),e>55)for(r(l,i),e=0;e<16;e+=1)i[e]=0;return a=8*u,a=a.toString(16).match(/(.*?)(.{0,8})$/),s=parseInt(a[2],16),c=parseInt(a[1],16)||0,i[14]=s,i[15]=c,r(l,i),l}function s(t){var r,n="";for(r=0;r<4;r+=1)n+=e[t>>8*r+4&15]+e[t>>8*r&15];return n}function c(t){var e;for(e=0;e<t.length;e+=1)t[e]=s(t[e]);return t.join("")}function u(t){return/[\u0080-\uFFFF]/.test(t)&&(t=unescape(encodeURIComponent(t))),t}function l(t,e){var r,n=t.length,o=new ArrayBuffer(n),i=new Uint8Array(o);for(r=0;r<n;r+=1)i[r]=t.charCodeAt(r);return e?i:o}function h(t){return String.fromCharCode.apply(null,new Uint8Array(t))}function f(t,e,r){var n=new Uint8Array(t.byteLength+e.byteLength);return n.set(new Uint8Array(t)),n.set(new Uint8Array(e),t.byteLength),r?n:n.buffer}function p(t){var e,r=[],n=t.length;for(e=0;e<n-1;e+=2)r.push(parseInt(t.substr(e,2),16));return String.fromCharCode.apply(String,r)}function d(){this.reset()}return"5d41402abc4b2a76b9719d911017c592"!==c(i("hello"))&&function(t,e){var r=(65535&t)+(65535&e),n=(t>>16)+(e>>16)+(r>>16);return n<<16|65535&r},"undefined"===typeof ArrayBuffer||ArrayBuffer.prototype.slice||function(){function e(t,e){return t=0|t||0,t<0?Math.max(t+e,0):Math.min(t,e)}ArrayBuffer.prototype.slice=function(r,n){var o,i,a,s,c=this.byteLength,u=e(r,c),l=c;return n!==t&&(l=e(n,c)),u>l?new ArrayBuffer(0):(o=l-u,i=new ArrayBuffer(o),a=new Uint8Array(i),s=new Uint8Array(this,u,o),a.set(s),i)}}(),d.prototype.append=function(t){return this.appendBinary(u(t)),this},d.prototype.appendBinary=function(t){this._buff+=t,this._length+=t.length;var e,o=this._buff.length;for(e=64;e<=o;e+=64)r(this._hash,n(this._buff.substring(e-64,e)));return this._buff=this._buff.substring(e-64),this},d.prototype.end=function(t){var e,r,n=this._buff,o=n.length,i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(e=0;e<o;e+=1)i[e>>2]|=n.charCodeAt(e)<<(e%4<<3);return this._finish(i,o),r=c(this._hash),t&&(r=p(r)),this.reset(),r},d.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},d.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},d.prototype.setState=function(t){return this._buff=t.buff,this._length=t.length,this._hash=t.hash,this},d.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},d.prototype._finish=function(t,e){var n,o,i,a=e;if(t[a>>2]|=128<<(a%4<<3),a>55)for(r(this._hash,t),a=0;a<16;a+=1)t[a]=0;n=8*this._length,n=n.toString(16).match(/(.*?)(.{0,8})$/),o=parseInt(n[2],16),i=parseInt(n[1],16)||0,t[14]=o,t[15]=i,r(this._hash,t)},d.hash=function(t,e){return d.hashBinary(u(t),e)},d.hashBinary=function(t,e){var r=i(t),n=c(r);return e?p(n):n},d.ArrayBuffer=function(){this.reset()},d.ArrayBuffer.prototype.append=function(t){var e,n=f(this._buff.buffer,t,!0),i=n.length;for(this._length+=t.byteLength,e=64;e<=i;e+=64)r(this._hash,o(n.subarray(e-64,e)));return this._buff=e-64<i?new Uint8Array(n.buffer.slice(e-64)):new Uint8Array(0),this},d.ArrayBuffer.prototype.end=function(t){var e,r,n=this._buff,o=n.length,i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(e=0;e<o;e+=1)i[e>>2]|=n[e]<<(e%4<<3);return this._finish(i,o),r=c(this._hash),t&&(r=p(r)),this.reset(),r},d.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},d.ArrayBuffer.prototype.getState=function(){var t=d.prototype.getState.call(this);return t.buff=h(t.buff),t},d.ArrayBuffer.prototype.setState=function(t){return t.buff=l(t.buff,!0),d.prototype.setState.call(this,t)},d.ArrayBuffer.prototype.destroy=d.prototype.destroy,d.ArrayBuffer.prototype._finish=d.prototype._finish,d.ArrayBuffer.hash=function(t,e){var r=a(new Uint8Array(t)),n=c(r);return e?p(n):n},d}))},"06d7":function(t,e,r){"use strict";var n=r("eb35"),o=r("bfff"),i=r("a4fc");t.exports=function(t){var e=n(this),r=i(e.length),a=arguments.length,s=o(a>1?arguments[1]:void 0,r),c=a>2?arguments[2]:void 0,u=void 0===c?r:o(c,r);while(u>s)e[s++]=t;return e}},"090a":function(t,e,r){"use strict";var n=r("4ae2"),o=r("fe7c"),i=n.aTypedArray,a=n.exportTypedArrayMethod;a("copyWithin",(function(t,e){return o.call(i(this),t,e,arguments.length>2?arguments[2]:void 0)}))},"0a4f":function(t,e,r){var n=r("e450"),o=r("b32b"),i=r("5a47"),a=!i((function(t){Array.from(t)}));n({target:"Array",stat:!0,forced:a},{from:o})},"0bf3":function(t,e,r){var n=r("599d");t.exports=function(t){var e=n(t);if(e<0)throw RangeError("The argument can't be less than 0");return e}},"0c98":function(t,e,r){"use strict";var n=r("6c87"),o=r("9f69"),i=r("a4fc"),a=r("e08f"),s=r("952c"),c=r("1392");n("match",(function(t,e,r){return[function(e){var r=a(this),n=void 0==e?void 0:e[t];return void 0!==n?n.call(e,r):new RegExp(e)[t](String(r))},function(t){var n=r(e,this,t);if(n.done)return n.value;var a=o(this),u=String(t);if(!a.global)return c(a,u);var l=a.unicode;a.lastIndex=0;var h,f=[],p=0;while(null!==(h=c(a,u))){var d=String(h[0]);f[p]=d,""===d&&(a.lastIndex=s(u,i(a.lastIndex),l)),p++}return 0===p?null:f}]}))},"104f":function(t,e,r){"use strict";var n=r("d50e");t.exports=function(t,e){var r=[][t];return!!r&&n((function(){r.call(null,e||function(){throw 1},1)}))}},1857:function(t,e,r){var n=r("4b3a"),o=r("a5e4e").f,i={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],s=function(t){try{return o(t)}catch(e){return a.slice()}};t.exports.f=function(t){return a&&"[object Window]"==i.call(t)?s(t):o(n(t))}},"1ec5":function(t,e,r){var n=r("9d0d");n("iterator")},2070:function(t,e,r){var n=r("e450"),o=r("eb35"),i=r("a89e"),a=r("d50e"),s=a((function(){i(1)}));n({target:"Object",stat:!0,forced:s},{keys:function(t){return i(o(t))}})},"21d0":function(t,e,r){"use strict";var n=r("4ae2"),o=r("d082"),i=n.aTypedArray,a=n.exportTypedArrayMethod;a("lastIndexOf",(function(t){return o.apply(i(this),arguments)}))},"275e":function(t,e,r){"use strict";var n=r("4ae2"),o=r("b074"),i=r("d50e"),a=r("9c34"),s=r("a4fc"),c=r("9d77"),u=r("a6eb"),l=r("722c"),h=r("acb9"),f=r("7eeb"),p=n.aTypedArray,d=n.exportTypedArrayMethod,g=o.Uint16Array,v=g&&g.prototype.sort,m=!!v&&!i((function(){var t=new g(2);t.sort(null),t.sort({})})),y=!!v&&!i((function(){if(h)return h<74;if(u)return u<67;if(l)return!0;if(f)return f<602;var t,e,r=new g(516),n=Array(516);for(t=0;t<516;t++)e=t%4,r[t]=515-t,n[t]=t-2*e+3;for(r.sort((function(t,e){return(t/4|0)-(e/4|0)})),t=0;t<516;t++)if(r[t]!==n[t])return!0})),w=function(t){return function(e,r){return void 0!==t?+t(e,r)||0:r!==r?-1:e!==e?1:0===e&&0===r?1/e>0&&1/r<0?1:-1:e>r}};d("sort",(function(t){var e=this;if(void 0!==t&&a(t),y)return v.call(e,t);p(e);var r,n=s(e.length),o=Array(n);for(r=0;r<n;r++)o[r]=e[r];for(o=c(e,w(t)),r=0;r<n;r++)e[r]=o[r];return e}),!y||m)},2793:function(t,e,r){"use strict";var n=r("4ae2"),o=r("cb38").includes,i=n.aTypedArray,a=n.exportTypedArrayMethod;a("includes",(function(t){return o(i(this),t,arguments.length>1?arguments[1]:void 0)}))},"28ea":function(t,e,r){var n=r("b074"),o=r("d50e"),i=r("5a47"),a=r("4ae2").NATIVE_ARRAY_BUFFER_VIEWS,s=n.ArrayBuffer,c=n.Int8Array;t.exports=!a||!o((function(){c(1)}))||!o((function(){new c(-1)}))||!i((function(t){new c,new c(null),new c(1.5),new c(t)}),!0)||o((function(){return 1!==new c(new s(2),1,void 0).length}))},"2bb8":function(t,e,r){"use strict";var n=function(t){switch(typeof t){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}};t.exports=function(t,e,r,s){return e=e||"&",r=r||"=",null===t&&(t=void 0),"object"===typeof t?i(a(t),(function(a){var s=encodeURIComponent(n(a))+r;return o(t[a])?i(t[a],(function(t){return s+encodeURIComponent(n(t))})).join(e):s+encodeURIComponent(n(t[a]))})).join(e):s?encodeURIComponent(n(s))+r+encodeURIComponent(n(t)):""};var o=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function i(t,e){if(t.map)return t.map(e);for(var r=[],n=0;n<t.length;n++)r.push(e(t[n],n));return r}var a=Object.keys||function(t){var e=[];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.push(r);return e}},"2ca7":function(t,e,r){"use strict";var n=r("4ae2"),o=r("cb38").indexOf,i=n.aTypedArray,a=n.exportTypedArrayMethod;a("indexOf",(function(t){return o(i(this),t,arguments.length>1?arguments[1]:void 0)}))},"2d34":function(t,e,r){var n=r("e08f"),o=r("9326"),i="["+o+"]",a=RegExp("^"+i+i+"*"),s=RegExp(i+i+"*$"),c=function(t){return function(e){var r=String(n(e));return 1&t&&(r=r.replace(a,"")),2&t&&(r=r.replace(s,"")),r}};t.exports={start:c(1),end:c(2),trim:c(3)}},"309e":function(t,e,r){var n=r("4ae2").aTypedArrayConstructor,o=r("7f45");t.exports=function(t,e){var r=o(t,t.constructor),i=0,a=e.length,s=new(n(r))(a);while(a>i)s[i]=e[i++];return s}},"356d":function(t,e,r){"use strict";var n=r("4ae2"),o=r("a3e7").forEach,i=n.aTypedArray,a=n.exportTypedArrayMethod;a("forEach",(function(t){o(i(this),t,arguments.length>1?arguments[1]:void 0)}))},"361e":function(t,e,r){var n=r("eb35"),o=r("a4fc"),i=r("1637"),a=r("d41c"),s=r("14f4"),c=r("4ae2").aTypedArrayConstructor;t.exports=function(t){var e,r,u,l,h,f,p=n(t),d=arguments.length,g=d>1?arguments[1]:void 0,v=void 0!==g,m=i(p);if(void 0!=m&&!a(m)){h=m.call(p),f=h.next,p=[];while(!(l=f.call(h)).done)p.push(l.value)}for(v&&d>2&&(g=s(g,arguments[2],2)),r=o(p.length),u=new(c(this))(r),e=0;r>e;e++)u[e]=v?g(p[e],e):p[e];return u}},"365f":function(t,e,r){"use strict";var n=r("4ae2"),o=r("a3e7").filter,i=r("309e"),a=n.aTypedArray,s=n.exportTypedArrayMethod;s("filter",(function(t){var e=o(a(this),t,arguments.length>1?arguments[1]:void 0);return i(this,e)}))},3979:function(t,e,r){"use strict";var n=r("e450"),o=r("8f28"),i=r("e08f"),a=r("8846");n({target:"String",proto:!0,forced:!a("includes")},{includes:function(t){return!!~String(i(this)).indexOf(o(t),arguments.length>1?arguments[1]:void 0)}})},"3a91":function(t,e,r){"use strict";var n=r("4ae2"),o=r("a3e7").every,i=n.aTypedArray,a=n.exportTypedArrayMethod;a("every",(function(t){return o(i(this),t,arguments.length>1?arguments[1]:void 0)}))},"3f7e":function(t,e,r){"use strict";var n=r("e450"),o=r("a3e7").filter,i=r("529c"),a=i("filter");n({target:"Array",proto:!0,forced:!a},{filter:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},"45af":function(t,e,r){"use strict";var n=r("e450"),o=r("cdcb"),i=r("b074"),a=r("8801"),s=r("0f4e"),c=r("3d27").f,u=r("4deb"),l=i.Symbol;if(o&&"function"==typeof l&&(!("description"in l.prototype)||void 0!==l().description)){var h={},f=function(){var t=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),e=this instanceof f?new l(t):void 0===t?l():l(t);return""===t&&(h[e]=!0),e};u(f,l);var p=f.prototype=l.prototype;p.constructor=f;var d=p.toString,g="Symbol(test)"==String(l("test")),v=/^Symbol\((.*)\)[^)]+$/;c(p,"description",{configurable:!0,get:function(){var t=s(this)?this.valueOf():this,e=d.call(t);if(a(h,t))return"";var r=g?e.slice(7,-1):e.replace(v,"$1");return""===r?void 0:r}}),n({global:!0,forced:!0},{Symbol:f})}},"45ea":function(t,e,r){"use strict";var n=r("4ae2"),o=r("a3e7").find,i=n.aTypedArray,a=n.exportTypedArrayMethod;a("find",(function(t){return o(i(this),t,arguments.length>1?arguments[1]:void 0)}))},"45f5":function(t,e,r){var n=r("e450"),o=r("cdcb"),i=r("d9cc"),a=r("4b3a"),s=r("fc06"),c=r("f342");n({target:"Object",stat:!0,sham:!o},{getOwnPropertyDescriptors:function(t){var e,r,n=a(t),o=s.f,u=i(n),l={},h=0;while(u.length>h)r=o(n,e=u[h++]),void 0!==r&&c(l,e,r);return l}})},"46d3":function(t,e,r){"use strict";function n(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}r.d(e,"a",(function(){return n}))},"4ae2":function(t,e,r){"use strict";var n,o=r("0337"),i=r("cdcb"),a=r("b074"),s=r("0f4e"),c=r("8801"),u=r("1c79"),l=r("429f"),h=r("6c39"),f=r("3d27").f,p=r("6d27"),d=r("5ee6"),g=r("9bc6"),v=r("a67a"),m=a.Int8Array,y=m&&m.prototype,w=a.Uint8ClampedArray,b=w&&w.prototype,x=m&&p(m),C=y&&p(y),I=Object.prototype,B=I.isPrototypeOf,S=g("toStringTag"),A=v("TYPED_ARRAY_TAG"),O=o&&!!d&&"Opera"!==u(a.opera),T=!1,k={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},M={BigInt64Array:8,BigUint64Array:8},P=function(t){if(!s(t))return!1;var e=u(t);return"DataView"===e||c(k,e)||c(M,e)},E=function(t){if(!s(t))return!1;var e=u(t);return c(k,e)||c(M,e)},_=function(t){if(E(t))return t;throw TypeError("Target is not a typed array")},L=function(t){if(d){if(B.call(x,t))return t}else for(var e in k)if(c(k,n)){var r=a[e];if(r&&(t===r||B.call(r,t)))return t}throw TypeError("Target is not a typed array constructor")},U=function(t,e,r){if(i){if(r)for(var n in k){var o=a[n];if(o&&c(o.prototype,t))try{delete o.prototype[t]}catch(s){}}C[t]&&!r||h(C,t,r?e:O&&y[t]||e)}},F=function(t,e,r){var n,o;if(i){if(d){if(r)for(n in k)if(o=a[n],o&&c(o,t))try{delete o[t]}catch(s){}if(x[t]&&!r)return;try{return h(x,t,r?e:O&&x[t]||e)}catch(s){}}for(n in k)o=a[n],!o||o[t]&&!r||h(o,t,e)}};for(n in k)a[n]||(O=!1);if((!O||"function"!=typeof x||x===Function.prototype)&&(x=function(){throw TypeError("Incorrect invocation")},O))for(n in k)a[n]&&d(a[n],x);if((!O||!C||C===I)&&(C=x.prototype,O))for(n in k)a[n]&&d(a[n].prototype,C);if(O&&p(b)!==C&&d(b,C),i&&!c(C,S))for(n in T=!0,f(C,S,{get:function(){return s(this)?this[A]:void 0}}),k)a[n]&&l(a[n],A,n);t.exports={NATIVE_ARRAY_BUFFER_VIEWS:O,TYPED_ARRAY_TAG:T&&A,aTypedArray:_,aTypedArrayConstructor:L,exportTypedArrayMethod:U,exportTypedArrayStaticMethod:F,isView:P,isTypedArray:E,TypedArray:x,TypedArrayPrototype:C}},"52e0":function(t,e,r){"use strict";var n=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",[!0===t.showChooseBtn&&!0===t.isModal?r("div",{on:{click:t.handleOpen}},[t._t("openImgCutter"),t._t("open")],2):t._e(),t.$slots.openImgCutter||t.$slots.open||!0!==t.isModal?t._e():r("button",{staticClass:"btn btn-primary",attrs:{type:"button"},on:{click:t.handleOpen}},[t._v(t._s(t.label)+" ")]),r("transition",{attrs:{name:"fade"}},[t.visible?r("div",{ref:"mask",class:!0===t.isModal?"mask vue-img-cutter":""},[t.visible?r("div",{class:!0===t.isModal?"dialogBoxModal":"dialogBox"},[r("transition",{attrs:{name:"fade","enter-class":"fade-in-enter","enter-active-class":"fade-in-active","leave-class":"fade-out-enter","leave-active-class":"fade-out-active"}},[r("div",{ref:"dialogMainModalRef",class:!0===t.isModal?"dialogMainModal":"dialogMain",style:"width:"+(!0===t.isModal?t.boxWidth+32:t.boxWidth)+"px"},[r("div",{staticClass:"toolMain"},[!0===t.isModal?r("div",{staticClass:"tool-title"},[t._v(" 图片裁剪 "),r("span",{staticClass:"closeIcon",on:{click:t.handleClose}},[t._v("×")])]):t._e(),r("div",{ref:"toolBox",staticClass:"toolBox",style:"height:"+t.boxHeight+"px;width:"+t.boxWidth+"px",on:{mousemove:t.controlBtnMouseMove,mouseup:t.controlBtnMouseUp,mouseleave:t.controlBtnMouseUp}},[r("div",{directives:[{name:"show",rawName:"v-show",value:!t.drawImg.img&&!0===t.showChooseBtn,expression:"!drawImg.img && showChooseBtn===true"}],staticClass:"tips"},[r("div",{staticClass:"btn btn-warning btn-xs",on:{click:t.chooseImg}},[t._v(t._s(t.label))])]),1==t.tool?r("div",{directives:[{name:"show",rawName:"v-show",value:this.drawImg.img&&!0!==t.dropImg.active&&1==t.controlBox.disable&&1==t.toolBox.disable,expression:"this.drawImg.img && dropImg.active!==true && controlBox.disable==true && toolBox.disable==true"}],staticClass:"dockMain",style:"background:"+this.toolBgc,on:{mouseenter:t.dropImgOff}},[t.rate?r("div",{staticClass:"dockBtn"},[t._t("ratio",(function(){return[t._v(" Ratio: ")]})),t._v(" "+t._s(t.rate)+" ")],2):t._e(),r("div",{staticClass:"dockBtn",on:{click:t.scaleReset}},[t._t("scaleReset",(function(){return[t._v(" Scale: ")]})),t._v(" "+t._s(t.drawImg.swidth>0?(t.drawImg.width/t.drawImg.swidth).toFixed(2):"-")+" ")],2),!1===t.originalGraph?r("div",{staticClass:"dockBtn",on:{click:function(e){return t.turnImg(-90)}}},[t._t("turnLeft",(function(){return[t._v(" ↳ ")]}))],2):t._e(),!1===t.originalGraph?r("div",{staticClass:"dockBtn",on:{click:function(e){return t.turnImg(90)}}},[t._t("turnRight",(function(){return[t._v(" ↲ ")]}))],2):t._e(),!1===t.originalGraph?r("div",{staticClass:"dockBtn",on:{click:function(e){return t.turnReset()}}},[t._t("reset",(function(){return[t._v(" ↻ ")]}))],2):t._e(),!1===t.originalGraph?r("div",{staticClass:"dockBtnScrollBar"},[r("div",{ref:"dockBtnScrollControl",staticClass:"scrollBarControl",style:"left:"+t.rotateControl.position+"px",on:{mousemove:t.scrollBarControlMove,mousedown:t.scrollBarControlOn,mouseleave:t.scrollBarControlOff,mouseup:t.scrollBarControlOff}}),1==t.rotateControl.active?r("div",{staticClass:"scrollBarText",style:"left:"+t.rotateControl.position+"px"},[t._v(" "+t._s(t.rotateImg.angle.toFixed(0)+"°")+" ")]):t._e()]):t._e(),!1===t.originalGraph?r("div",{staticClass:"dockBtn",on:{click:t.flipHorizontal}},[t._t("flipHorizontal",(function(){return[t._v(" ⇆ ")]}))],2):t._e(),!1===t.originalGraph?r("div",{staticClass:"dockBtn",on:{click:t.flipVertically}},[t._t("turnRight",(function(){return[t._v(" ⇅ ")]}))],2):t._e()]):t._e(),r("div",{directives:[{name:"show",rawName:"v-show",value:null!=t.drawImg.img,expression:"drawImg.img!=null"}],ref:"toolBoxControl",staticClass:"toolBoxControl",on:{mousedown:t.toolBoxMouseDown,mouseup:t.toolBoxMouseUp,mousemove:t.toolBoxMouseMove,mouseleave:t.toolBoxMouseLeave}},[r("div",{staticClass:"toolBoxControlBox"},[r("div",{staticClass:"controlBox"},[r("div",{staticClass:"controlBoxInnerLine controlBoxInnerLineTop"}),r("div",{staticClass:"controlBoxInnerLine controlBoxInnerLineBottom"}),r("div",{staticClass:"controlBoxInnerLine controlBoxInnerLineLeft"}),r("div",{staticClass:"controlBoxInnerLine controlBoxInnerLineRight"}),!1===t.originalGraph?r("div",{staticClass:"selectArea"},[t._v(" 宽:"+t._s(t.toolBox.width)+" 高:"+t._s(t.toolBox.height)+" (x:"+t._s(t.toolBoxPosition.x)+",y:"+t._s(t.toolBoxPosition.y)+") ")]):t._e(),!0===t.originalGraph?r("div",{staticClass:"selectArea"},[t._v(" 宽:"+t._s((t.toolBox.width/(t.drawImg.width/t.drawImg.swidth)).toFixed(0))+" 高:"+t._s((t.toolBox.height/(t.drawImg.width/t.drawImg.swidth)).toFixed(0))+" (x:"+t._s(t.toolBoxPosition.x)+",y:"+t._s(t.toolBoxPosition.y)+") ")]):t._e(),!0===t.sizeChange?r("div",{staticClass:"leftUp controlBtn",attrs:{"data-name":"leftUp"},on:{mousedown:function(e){return t.controlBtnMouseDown(e,"leftUp")}}}):t._e(),!0===t.sizeChange?r("div",{staticClass:"leftDown controlBtn",attrs:{"data-name":"leftDown"},on:{mousedown:function(e){return t.controlBtnMouseDown(e,"leftDown")}}}):t._e(),!0===t.sizeChange?r("div",{staticClass:"rightUp controlBtn",attrs:{"data-name":"rightUp"},on:{mousedown:function(e){return t.controlBtnMouseDown(e,"rightUp")}}}):t._e(),!0===t.sizeChange?r("div",{staticClass:"rightDown controlBtn",attrs:{"data-name":"rightDown"},on:{mousedown:function(e){return t.controlBtnMouseDown(e,"rightDown")}}}):t._e(),!0===t.sizeChange&&!t.rate&&this.toolBox.width>20?r("div",{staticClass:"topCenter controlBtn",attrs:{"data-name":"topCenter"},on:{mousedown:function(e){return t.controlBtnMouseDown(e,"topCenter")}}}):t._e(),!0===t.sizeChange&&!t.rate&&this.toolBox.width>20?r("div",{staticClass:"downCenter controlBtn",attrs:{"data-name":"downCenter"},on:{mousedown:function(e){return t.controlBtnMouseDown(e,"downCenter")}}}):t._e(),!0===t.sizeChange&&!t.rate&&this.toolBox.height>20?r("div",{staticClass:"leftCenter controlBtn",attrs:{"data-name":"leftCenter"},on:{mousedown:function(e){return t.controlBtnMouseDown(e,"leftCenter")}}}):t._e(),!0===t.sizeChange&&!t.rate&&this.toolBox.height>20?r("div",{staticClass:"rightCenter controlBtn",attrs:{"data-name":"rightCenter"},on:{mousedown:function(e){return t.controlBtnMouseDown(e,"rightCenter")}}}):t._e()]),r("div",{staticClass:"toolBoxControlLine toolBoxControlLineItem-1"}),r("div",{staticClass:"toolBoxControlLine toolBoxControlLineItem-2"}),r("div",{staticClass:"toolBoxControlLine toolBoxControlLineItem-3"}),r("div",{staticClass:"toolBoxControlLine toolBoxControlLineItem-4"})])]),r("div",{staticClass:"copyright"},[t.DoNotDisplayCopyright?t._e():r("a",{attrs:{target:"_blank",href:"https://github.com/acccccccb/vue-img-cutter",rel:"nofollow"}},[t._v(" vue-img-cutter "+t._s(t.version)+" ")])]),r("canvas",{ref:"canvasSelectBox",staticClass:"canvasSelectBox",attrs:{width:t.boxWidth,height:t.boxHeight},on:{mousedown:t.dropImgOn,mouseup:t.dropImgOff,mousemove:t.dropImgMove}}),r("canvas",{ref:"canvas",staticClass:"canvas",attrs:{width:t.boxWidth,height:t.boxHeight}})])]),r("div",{staticClass:"i-dialog-footer"},[r("input",{ref:"inputFile",staticStyle:{width:"1px",height:"1px",border:"none",opacity:"0"},attrs:{type:"file",accept:"image/gif, image/jpeg ,image/png"},on:{change:t.putImgToCanv}}),r("span",{on:{click:t.chooseImg}},[t._t("choose",(function(){return[!0===t.showChooseBtn?r("div",{staticClass:"btn btn-primary btn-primary-plain"},[t._v(t._s(t.label))]):t._e()]}))],2),r("div",{staticClass:"btn-group fr"},[r("span",{on:{click:t.handleClose}},[t._t("cancel",(function(){return[r("button",{staticClass:"btn btn-default",attrs:{type:"button"}},[t._v("取消")])]}))],2),r("span",{on:{click:function(e){return t.cropPicture(!1)}}},[t._t("confirm",(function(){return[r("button",{staticClass:"btn btn-primary",staticStyle:{"margin-left":"15px"},attrs:{type:"button",disabled:!t.drawImg.img}},[t._v("确定")])]}))],2)])])])]),r("div",{staticStyle:{clear:"both"}})],1):t._e()]):t._e()])],1)},o=[],i=(r("2070"),r("79fd"),r("3f7e"),r("bd5e"),r("6afd"),r("45f5"),r("46d3"));function a(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function s(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?a(Object(r),!0).forEach((function(e){Object(i["a"])(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}r("45af"),r("b1fa"),r("1ec5"),r("2e6f"),r("af21");function c(t){return c="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},c(t)}r("e1d4"),r("f5bd"),r("2769"),r("8639"),r("0c98"),r("9315"),r("090a"),r("3a91"),r("ea11"),r("365f"),r("45ea"),r("5da5"),r("356d"),r("2793"),r("2ca7"),r("f2b4"),r("8dd4"),r("21d0"),r("0345"),r("0180"),r("bc72"),r("af4c"),r("d5d6"),r("7036"),r("78f5"),r("275e"),r("ae16"),r("86ca"),r("b1b2");var u=r("6f43"),l={name:"ImgCutter",props:{crossOrigin:{type:Boolean,default:!1,required:!1},crossOriginHeader:{type:String,default:"*",required:!1},label:{type:String,default:"选择图片",required:!1},isModal:{type:Boolean,default:!0,required:!1},lockScroll:{type:Boolean,default:!0,required:!1},showChooseBtn:{type:Boolean,default:!0,required:!1},boxWidth:{type:Number,default:800,required:!1},boxHeight:{type:Number,default:400,required:!1},cutWidth:{type:Number,default:200,required:!1},cutHeight:{type:Number,default:200,required:!1},rate:{type:String,default:null,required:!1},tool:{type:Boolean,default:!0,required:!1},toolBgc:{type:String,default:"#fff",required:!1},imgMove:{type:Boolean,default:!0,required:!1},sizeChange:{type:Boolean,default:!0,required:!1},originalGraph:{type:Boolean,default:!1,required:!1},moveAble:{type:Boolean,default:!0,required:!1},previewMode:{type:Boolean,default:!0,required:!1},CuttingOriginal:{type:Boolean,default:!1,required:!1},WatermarkText:{type:String,default:"",required:!1},WatermarkTextFont:{type:String,default:"12px Sans-serif",required:!1},WatermarkTextColor:{type:String,default:"#fff",required:!1},WatermarkTextX:{type:Number,default:.95,required:!1},WatermarkTextY:{type:Number,default:.95,required:!1},smallToUpload:{type:Boolean,default:!1,required:!1},saveCutPosition:{type:Boolean,default:!1,required:!1},scaleAble:{type:Boolean,default:!0,required:!1},index:{default:null,required:!1},fileType:{default:"png",required:!1,type:String},DoNotDisplayCopyright:{type:Boolean,default:!1,required:!1}},model:["label","boxWidth","boxHeight","rate","tool","DoNotDisplayCopyright"],data:function(){var t,e;return t=this.boxWidth/2,e=this.boxHeight/2,{version:"",visible:!1,fileName:"",cutImageObj:null,onPrintImgTimmer:null,toolBoxPosition:{x:0,y:0},drawImg:{img:null,sx:0,sy:0,swidth:0,sheight:0,x:0,y:0,width:0,height:0},toolBox:{disable:!0,width:t,height:e,x:0,y:0,boxMove:{start:{x:0,y:0},moveTo:{x:0,y:0}}},dropImg:{active:!1,pageX:0,pageY:0,params:{}},rotateImg:{angle:0},rotateControl:{active:!1,start:{x:0,y:0},position:100},scaleImg:{rate:0,params:{}},controlBox:{disable:!0,btnName:"",start:{x:0,y:0,width:0,height:0}},selectBox:!1,selectBoxColor:"rgba(0,0,0,0.6)",isFlipHorizontal:!1,isFlipVertically:!1}},mounted:function(){var t=this;this.version=u.version,!1===this.isModal&&(this.visible=!0,this.$nextTick((function(){t.$refs["toolBox"].onmousewheel=t.scaleImgWheel,t.$refs["toolBox"].addEventListener("DOMMouseScroll",t.scaleImgWheel)})))},methods:{handleOpen:function(t){var e=this,r=this,n=function(t){if(r.$refs["toolBox"].onmousewheel=e.scaleImgWheel,r.$refs["toolBox"].addEventListener("DOMMouseScroll",e.scaleImgWheel),!0===r.isModal){!0===r.lockScroll&&(document.body.style.overflowY="hidden");var n=r.$refs["dialogMainModalRef"].offsetHeight+200,o=window.innerHeight,i=r.$refs["mask"];i.style.overflowY=n>o?"scroll":"hidden"}t&&"function"===typeof t&&t()};if(t&&"object"==c(t)&&t.src){if(!t.name)throw new Error("传入参数必须包含:src,name");var o=new Image;!0===this.crossOrigin&&(o.crossOrigin=this.crossOriginHeader),o.name=t.name,o.style.position="fixed",o.style.top=-5e3,o.style.opacity=0,o.onerror=function(t){console.error("图片加载失败"),r.$emit("error",{index:r.index,event:t,msg:"图片加载失败"}),r.clearCutImageObj()},o.onload=function(){if(!0!==o.complete)throw new Error("图片加载失败");r.visible=!0,r.$nextTick((function(){n((function(){r.importImgToCanv(o)}))}))},o.src=t.src,this.cutImageObj=o,document.body.appendChild(o),this.$emit("onChooseImg",t,this.index)}else r.visible=!0,r.$nextTick((function(){n()}))},handleClose:function(){var t=this;this.clearAll(),!0===this.isModal&&(!0===this.lockScroll&&(document.body.style.overflowY="scroll"),this.$nextTick((function(){t.visible=!1})))},chooseImg:function(){this.$refs["inputFile"].click()},importImgToCanv:function(t){var e=this;e.fileName=t.name;var r,n=t.height,o=t.width,i=e.boxWidth,a=e.boxHeight,c=s({},e.drawImg);c.img=t,e.scaleImg.rate=o/n,n<a&&o<i?(r=1,c.x=(i-o)/2,c.y=(a-n)/2):o/n<=i/a?(r=a/n,c.x=(i-o*r)/2):(r=i/o,c.y=(a-n*r)/2),c.swidth=o,c.sheight=n,c.width=o*r,c.height=n*r,c.x=(i-c.width)/2,c.y=(a-c.height)/2,e.$set(e,"drawImg",c),e.printImg(),e.putToolBox()},putImgToCanv:function(t){var e,r=this;if(!t.target.files)return console.error("IE9及以下需要自己传入image对象"),!1;if(e=t.target.files[0]||null,e){this.fileName=e.name;var n=new FileReader;new Image,n.readAsDataURL(e),n.onload=function(t){var o=t.target.result,i=document.createElement("img");i.src=o;var a=setInterval((function(){if(2==n.readyState){if(clearInterval(a),!r.sizeChange&&r.smallToUpload&&i.width<=r.cutWidth&&i.height<=r.cutHeight)return r.handleClose(),e.name=r.changeFileName(e.name,r.fileType),void r.$emit("cutDown",{filename:r.changeFileName(e.name,r.fileType),file:e,index:r.index});var t,o=i.height,c=i.width,u=r.boxWidth,l=r.boxHeight,h=s({},r.drawImg);h.img=i,r.scaleImg.rate=c/o,o<l&&c<u?(t=1,h.x=(u-c)/2,h.y=(l-o)/2):c/o<=u/l?(t=l/o,h.x=(u-c*t)/2):(t=u/c,h.y=(l-o*t)/2),h.swidth=c,h.sheight=o,h.width=c*t,h.height=o*t,h.x=(u-h.width)/2,h.y=(l-h.height)/2,r.$set(r,"drawImg",h),r.printImg(),r.putToolBox()}}),200)},this.$emit("onChooseImg",e,this.index)}},putToolBox:function(){this.toolBox.width!==this.boxWidth/2&&this.toolBox.height!==this.boxHeight/2&&!1!==this.saveCutPosition||(this.toolBox.width=this.cutWidth>this.boxWidth?this.boxWidth:this.cutWidth,this.toolBox.height=this.cutHeight>this.boxHeight?this.boxHeight:this.cutHeight),(0===this.toolBox.x&&0===this.toolBox.y||!1===this.saveCutPosition)&&(this.toolBox.x=this.boxWidth/2-this.toolBox.width/2,this.toolBox.y=this.boxHeight/2-this.toolBox.height/2),this.drawControlBox(this.toolBox.width,this.toolBox.height,this.toolBox.x,this.toolBox.y)},isSupportFileApi:function(){return!!(window.File&&window.FileList&&window.FileReader&&window.Blob&&-1===navigator.userAgent.indexOf("Edge")&&-1===navigator.userAgent.indexOf("MSIE")&&-1===navigator.userAgent.indexOf("Trident"))},dataURLtoFile:function(t,e){var r=t.split(","),n=r[0].match(/:(.*?);/)[1],o=atob(r[1]),i=o.length,a=new Uint8Array(i);while(i--)a[i]=o.charCodeAt(i);if(this.isSupportFileApi()){var s=new File([a],e,{type:n});return s}return"不支持File对象"},clearAll:function(){var t=this,e=t.$refs["canvas"],r=e.getContext("2d");r.clearRect(0,0,e.width,e.height);var n=t.$refs["canvasSelectBox"],o=n.getContext("2d");o.clearRect(0,0,n.width,n.height);var i=t.drawImg.sx,a=t.drawImg.sy;this.drawImg={img:null,sx:i,sy:a,swidth:0,sheight:0,x:0,y:0,width:0,height:0},this.isFlipHorizontal=!1,this.isFlipVertically=!1,this.$refs["inputFile"].value="",this.rotateImg.angle=0,this.drawImg.img=null,this.turnReset(),this.clearCutImageObj(),this.$emit("onClearAll",this.index)},clearCutImageObj:function(){null!==this.cutImageObj&&void 0!==this.cutImageObj&&("function"===typeof this.cutImageObj.remove?this.cutImageObj.remove():this.cutImageObj.removeNode()),this.cutImageObj=null},drawControlBox:function(t,e,r,n){var o=this;t>this.boxWidth&&(t=this.boxWidth),e>this.boxHeight&&(e=this.boxHeight),r<0&&(r=0),n<0&&(n=0);var i,a,s=this.$refs["toolBoxControl"],c=this.$refs["canvasSelectBox"],u=c.getContext("2d");if(u.fillStyle=this.selectBoxColor,u.clearRect(0,0,c.width,c.height),u.fillRect(0,0,c.width,c.height),this.rate&&""!==this.rate){var l=this.rate.split(":")[0]/this.rate.split(":")[1];l>=1?(i=t,a=t/l):(i=e*l,a=e)}else i=t,a=e;this.toolBox.width=i,this.toolBox.height=a,s.style.width=Math.abs(i)+"px",s.style.height=Math.abs(a)+"px",this.toolBox.boxMove.moveTo.x=r,this.toolBox.boxMove.moveTo.y=n,i<0&&(r+=i),a<0&&(n+=a),r+this.toolBox.width>this.boxWidth&&(r=this.boxWidth-this.toolBox.width),r<0&&(r=0),n+this.toolBox.height>this.boxHeight&&(n=this.boxHeight-this.toolBox.height),n<0&&(n=0),this.toolBoxPosition.x=r,this.toolBoxPosition.y=n,s.style.left=r+"px",s.style.top=n+"px",u.clearRect(r,n,Math.abs(i),Math.abs(a)),this.onPrintImgTimmer&&clearTimeout(this.onPrintImgTimmer),this.onPrintImgTimmer=setTimeout((function(){o.cropPicture(!0)}),100)},resetToolBox:function(){this.toolBox.width<0&&(this.toolBox.boxMove.moveTo.x=this.toolBox.x-this.toolBox.width),this.toolBox.height<0&&(this.toolBox.boxMove.moveTo.y=this.toolBox.y-this.toolBox.height),this.toolBox.width=Math.abs(this.toolBox.width),this.toolBox.height=Math.abs(this.toolBox.height)},toolBoxMouseDown:function(t){var e=this.$refs["toolBoxControl"];this.toolBox.x=parseInt(e.style.left.split("px")[0]),this.toolBox.y=parseInt(e.style.top.split("px")[0]),this.toolBox.disable=!1,this.dropImg.active=!1,this.toolBox.boxMove.start={x:t.pageX,y:t.pageY}},toolBoxMouseMove:function(t){if(this.dropImg.active&&this.dropImgMove(t),!1===this.toolBox.disable&&!0===this.moveAble){var e=t.pageX-this.toolBox.boxMove.start.x,r=t.pageY-this.toolBox.boxMove.start.y,n=this.toolBox.x+e,o=this.toolBox.y+r;this.drawControlBox(this.toolBox.width,this.toolBox.height,n,o)}},toolBoxMouseLeave:function(){var t=this;this.toolBox.disable=!0,this.onPrintImgTimmer&&clearTimeout(this.onPrintImgTimmer),this.onPrintImgTimmer=setTimeout((function(){t.cropPicture(!0)}),100),this.resetToolBox()},toolBoxMouseUp:function(t){this.toolBox.x=parseInt(this.toolBoxPosition.x),this.toolBox.y=parseInt(this.toolBoxPosition.y),this.toolBox.disable=!0,this.dropImg.active=!1,this.resetToolBox()},printImg:function(){var t=this;if(this.drawImg.img){var e=this.$refs["canvas"],r=e.getContext("2d");r.font="18px bold 黑体",r.fillStyle="#ff0",r.textAlign="center",r.textBaseline="middle",r.save(),r.clearRect(0,0,e.width,e.height),r.translate(this.drawImg.x+this.drawImg.width/2,this.drawImg.y+this.drawImg.height/2),r.rotate(this.rotateImg.angle*Math.PI/180),r.translate(-(this.drawImg.x+this.drawImg.width/2),-(this.drawImg.y+this.drawImg.height/2)),r.translate(this.drawImg.x,this.drawImg.y),r.scale(this.isFlipHorizontal?-1:1,this.isFlipVertically?-1:1),r.drawImage(this.drawImg.img,this.drawImg.sx,this.drawImg.sy,this.drawImg.swidth,this.drawImg.sheight,this.isFlipHorizontal?-this.drawImg.width:0,this.isFlipVertically?-this.drawImg.height:0,this.drawImg.width,this.drawImg.height),r.translate(-this.drawImg.x,this.drawImg.y),r.restore(),this.onPrintImgTimmer&&clearTimeout(this.onPrintImgTimmer),this.onPrintImgTimmer=setTimeout((function(){t.cropPicture(!0)}),100)}},dropImgOn:function(t){!0===this.imgMove&&(this.dropImg.active=!0,this.dropImg.params=s({},this.drawImg),this.dropImg.pageX=t.pageX,this.dropImg.pageY=t.pageY)},dropImgOff:function(){var t=this;this.dropImg.active=!1,this.onPrintImgTimmer&&clearTimeout(this.onPrintImgTimmer),this.onPrintImgTimmer=setTimeout((function(){t.cropPicture(!0)}),100)},dropImgMove:function(t){var e=this;if(this.dropImg.active&&this.drawImg.img){var r=s({},e.drawImg);r.x=e.dropImg.params.x-(e.dropImg.pageX-t.pageX),r.y=e.dropImg.params.y-(e.dropImg.pageY-t.pageY),e.$set(e,"drawImg",r),e.printImg(),t.stopPropagation()}},scaleReset:function(){this.drawImg.width=this.drawImg.swidth,this.drawImg.height=this.drawImg.sheight,this.printImg()},scaleImgWheel:function(t){var e=this,r=this;if(r.drawImg.img&&!0===this.scaleAble){var n,o=t||window.event;o.wheelDelta?n=-o.wheelDelta/40:o.detail&&(n=o.detail);var i=50;r.drawImg.x=r.drawImg.width-9*n>i?r.drawImg.x+3*n:r.drawImg.x,r.drawImg.y=r.drawImg.width-9*n>i?r.drawImg.y+3*n:r.drawImg.y,r.drawImg.width=r.drawImg.width-9*n>i?r.drawImg.width-9*n:i,r.drawImg.height=r.drawImg.width/r.scaleImg.rate,r.printImg(),this.onPrintImgTimmer&&clearTimeout(this.onPrintImgTimmer),this.onPrintImgTimmer=setTimeout((function(){e.cropPicture(!0)}),100)}return t.preventDefault(),t.returnValue=!1,!1},flipHorizontal:function(){this.drawImg.img&&(0==this.isFlipHorizontal?this.isFlipHorizontal=!0:this.isFlipHorizontal=!1,this.printImg())},flipVertically:function(){this.drawImg.img&&(0==this.isFlipVertically?this.isFlipVertically=!0:this.isFlipVertically=!1,this.printImg())},turnImg:function(t){var e=this.rotateImg.angle,r=e+t;r>=-180&&r<=180&&(this.rotateImg.angle=r,this.rotateControl.position=r/180*100+100,this.printImg("rotate"))},turnReset:function(){this.rotateImg.angle=0,this.rotateControl.position=100,this.printImg("rotate")},controlBtnMouseDown:function(t,e){this.controlBox.disable=!1,this.controlBox.btnName=e,this.controlBox.start.x=t.clientX,this.controlBox.start.y=t.clientY,this.controlBox.start.width=this.toolBox.width,this.controlBox.start.height=this.toolBox.height,t.stopPropagation()},controlBtnMouseUp:function(t){this.controlBox.disable=!0,this.dropImgOff(),this.resetToolBox(),this.toolBoxMouseUp(),t.stopPropagation()},controlBtnMouseMove:function(t){if(!1===this.controlBox.disable){var e,r,n=t.clientX-this.controlBox.start.x,o=t.clientY-this.controlBox.start.y;if("leftUp"==this.controlBox.btnName){if(this.rate){var i=this.rate.split(":")[0]/this.rate.split(":")[1];i>=1?(e=this.toolBox.x+n,r=this.toolBox.y+n/i):(e=this.toolBox.x+o*i,r=this.toolBox.y+o)}else e=this.toolBox.x+n,r=this.toolBox.y+o;this.toolBox.width=this.controlBox.start.width-n,this.toolBox.height=this.controlBox.start.height-o}if("rightUp"==this.controlBox.btnName){if(this.rate){var a=this.rate.split(":")[0]/this.rate.split(":")[1];a>=1?(e=this.toolBox.x,r=this.toolBox.y-n/a):(e=this.toolBox.x,r=this.toolBox.y+o)}else e=this.toolBox.x,r=this.toolBox.y+o;this.toolBox.width=this.controlBox.start.width+n,this.toolBox.height=this.controlBox.start.height-o}if("rightDown"==this.controlBox.btnName&&(e=this.toolBox.x,r=this.toolBox.y,this.toolBox.width=this.controlBox.start.width+n,this.toolBox.height=this.controlBox.start.height+o),"leftDown"==this.controlBox.btnName){if(this.rate){var s=this.rate.split(":")[0]/this.rate.split(":")[1];s>=1?(e=this.toolBox.x+n,r=this.toolBox.y):(e=this.toolBox.x+-o*s,r=this.toolBox.y)}else e=this.toolBox.x+n,r=this.toolBox.y;this.toolBox.width=this.controlBox.start.width-n,this.toolBox.height=this.controlBox.start.height+o}"topCenter"==this.controlBox.btnName&&(e=this.toolBox.x,r=this.toolBox.y+o,this.toolBox.width=this.controlBox.start.width,this.toolBox.height=this.controlBox.start.height-o),"downCenter"==this.controlBox.btnName&&(e=this.toolBox.x,r=this.toolBox.y,this.toolBox.width=this.controlBox.start.width,this.toolBox.height=this.controlBox.start.height+o),"leftCenter"==this.controlBox.btnName&&(e=this.toolBox.x+n,r=this.toolBox.y,this.toolBox.width=this.controlBox.start.width-n,this.toolBox.height=this.controlBox.start.height),"rightCenter"==this.controlBox.btnName&&(e=this.toolBox.x,r=this.toolBox.y,this.toolBox.width=this.controlBox.start.width+n,this.toolBox.height=this.controlBox.start.height),this.drawControlBox(this.toolBox.width,this.toolBox.height,e,r)}t.stopPropagation()},changeFileName:function(t,e){var r=t.lastIndexOf(".");return t.substr(0,r+1)+("jpeg"===e?"jpg":e)},cropPicture:function(t){var e=this;if(this.drawImg.img){var r=this.$refs["canvas"];if(this.WatermarkText&&!t){var n=r.getContext("2d");n.font=this.WatermarkTextFont,n.fillStyle=this.WatermarkTextColor,n.textAlign="right",n.textBaseline="bottom",n.fillText(this.WatermarkText,this.toolBox.x+this.toolBox.width*this.WatermarkTextX,this.toolBox.y+this.toolBox.height*this.WatermarkTextY)}var o=new Image;!0===this.crossOrigin&&(o.crossOrigin=this.crossOriginHeader),o.src=r.toDataURL("image/".concat(this.fileType)),HTMLCanvasElement.prototype.toBlob||Object.defineProperty(HTMLCanvasElement.prototype,"toBlob",{value:function(t,n,o){window.atob?setTimeout((function(){for(var i=atob(r.toDataURL(n,o).split(",")[1]),a=i.length,s=new Uint8Array(a),c=0;c<a;c++)s[c]=i.charCodeAt(c);t(new Blob([s],{type:"image/".concat(e.fileType)}))}),200):t(!1,{type:"image/".concat(e.fileType)})}}),r.toBlob((function(r){if(r){var n=new FileReader;n.readAsDataURL(r),n.onload=function(){var r=setInterval((function(){if(2==n.readyState){clearInterval(r);var i=document.createElement("canvas"),a=i.getContext("2d");if(1==e.originalGraph){var s=e.drawImg.width/e.drawImg.swidth,c=e.toolBox.width/s,u=e.toolBox.height/s;i.width=c,i.height=u;var l=(e.toolBox.x-e.drawImg.x)/s,h=(e.toolBox.y-e.drawImg.y)/s,f=e.drawImg.swidth,p=e.drawImg.sheight;a.translate(-l,-h),a.drawImage(e.drawImg.img,0,0,f,p)}else{i.width=e.toolBox.width,i.height=e.toolBox.height;var d=e.toolBox;if(e.rate){var g=e.rate.split(":")[0]/e.rate.split(":")[1],v=e.rate.split(":")[0],m=e.rate.split(":")[1];v>=m?a.drawImage(o,d.x,d.y,d.width,d.width*g,0,0,d.width,d.width*g):a.drawImage(o,d.x,d.y,d.width,d.width/g,0,0,d.width,d.width/g)}else a.drawImage(o,d.x,d.y,d.width,d.height,0,0,d.width,d.height)}i.toBlob((function(r){var n=e.changeFileName(e.fileName,e.fileType);t?e.previewMode&&e.$emit("onPrintImg",{index:e.index,fileName:n,blob:r,file:e.dataURLtoFile(i.toDataURL("image/".concat(e.fileType)),n),dataURL:i.toDataURL("image/".concat(e.fileType))}):(e.handleClose(),e.$emit("cutDown",{index:e.index,fileName:n,blob:r,file:e.dataURLtoFile(i.toDataURL("image/".concat(e.fileType)),n),dataURL:i.toDataURL("image/".concat(e.fileType))}))}),"image/".concat(e.fileType),.95)}}),200)}}else{var i=document.createElement("canvas");i.width=e.toolBox.width,i.height=e.toolBox.height;var a=i.getContext("2d"),s=e.toolBox;if(e.rate){var c=e.rate.split(":")[0]/e.rate.split(":")[1];a.drawImage(o,s.x,s.y,s.width,s.width*c,0,0,s.width,s.width*c)}else a.drawImage(o,s.x,s.y,s.width,s.height,0,0,s.width,s.height);var u=e.changeFileName(e.fileName,e.fileType);t?e.$emit("onPrintImg",{fileName:u,dataURL:i.toDataURL("image/".concat(e.fileType))}):(e.handleClose(),e.$emit("cutDown",{fileName:u,dataURL:i.toDataURL("image/".concat(e.fileType))}))}})),"image/".concat(e.fileType)}else t||(console.warn("No picture selected"),e.$emit("error",{err:1,msg:"No picture selected"}))},scrollBarControlMove:function(t){if(this.rotateControl.active){var e=t.pageX-this.rotateControl.start.x,r=this.rotateControl.start.position+e;r<=0&&(r=0),r>=200&&(r=200),this.rotateControl.position=r,this.rotateImg.angle=(r-100)/100*180,this.printImg()}},scrollBarControlOn:function(t){this.rotateControl.active=!0,this.rotateControl.start.x=t.pageX,this.rotateControl.start.y=t.pageY,this.rotateControl.start.position=this.rotateControl.position},scrollBarControlOff:function(){this.rotateControl.active=!1}}},h=l,f=(r("d294"),r("4ac2")),p=Object(f["a"])(h,n,o,!1,null,"8e8f10b8",null),d=p.exports;e["a"]=d},5501:function(t,e,r){var o,i;(function(){var r=!1,a=function(t){return t instanceof a?t:this instanceof a?void(this.EXIFwrapped=t):new a(t)};t.exports&&(e=t.exports=a),e.EXIF=a;var s=a.Tags={36864:"ExifVersion",40960:"FlashpixVersion",40961:"ColorSpace",40962:"PixelXDimension",40963:"PixelYDimension",37121:"ComponentsConfiguration",37122:"CompressedBitsPerPixel",37500:"MakerNote",37510:"UserComment",40964:"RelatedSoundFile",36867:"DateTimeOriginal",36868:"DateTimeDigitized",37520:"SubsecTime",37521:"SubsecTimeOriginal",37522:"SubsecTimeDigitized",33434:"ExposureTime",33437:"FNumber",34850:"ExposureProgram",34852:"SpectralSensitivity",34855:"ISOSpeedRatings",34856:"OECF",37377:"ShutterSpeedValue",37378:"ApertureValue",37379:"BrightnessValue",37380:"ExposureBias",37381:"MaxApertureValue",37382:"SubjectDistance",37383:"MeteringMode",37384:"LightSource",37385:"Flash",37396:"SubjectArea",37386:"FocalLength",41483:"FlashEnergy",41484:"SpatialFrequencyResponse",41486:"FocalPlaneXResolution",41487:"FocalPlaneYResolution",41488:"FocalPlaneResolutionUnit",41492:"SubjectLocation",41493:"ExposureIndex",41495:"SensingMethod",41728:"FileSource",41729:"SceneType",41730:"CFAPattern",41985:"CustomRendered",41986:"ExposureMode",41987:"WhiteBalance",41988:"DigitalZoomRation",41989:"FocalLengthIn35mmFilm",41990:"SceneCaptureType",41991:"GainControl",41992:"Contrast",41993:"Saturation",41994:"Sharpness",41995:"DeviceSettingDescription",41996:"SubjectDistanceRange",40965:"InteroperabilityIFDPointer",42016:"ImageUniqueID"},c=a.TiffTags={256:"ImageWidth",257:"ImageHeight",34665:"ExifIFDPointer",34853:"GPSInfoIFDPointer",40965:"InteroperabilityIFDPointer",258:"BitsPerSample",259:"Compression",262:"PhotometricInterpretation",274:"Orientation",277:"SamplesPerPixel",284:"PlanarConfiguration",530:"YCbCrSubSampling",531:"YCbCrPositioning",282:"XResolution",283:"YResolution",296:"ResolutionUnit",273:"StripOffsets",278:"RowsPerStrip",279:"StripByteCounts",513:"JPEGInterchangeFormat",514:"JPEGInterchangeFormatLength",301:"TransferFunction",318:"WhitePoint",319:"PrimaryChromaticities",529:"YCbCrCoefficients",532:"ReferenceBlackWhite",306:"DateTime",270:"ImageDescription",271:"Make",272:"Model",305:"Software",315:"Artist",33432:"Copyright"},u=a.GPSTags={0:"GPSVersionID",1:"GPSLatitudeRef",2:"GPSLatitude",3:"GPSLongitudeRef",4:"GPSLongitude",5:"GPSAltitudeRef",6:"GPSAltitude",7:"GPSTimeStamp",8:"GPSSatellites",9:"GPSStatus",10:"GPSMeasureMode",11:"GPSDOP",12:"GPSSpeedRef",13:"GPSSpeed",14:"GPSTrackRef",15:"GPSTrack",16:"GPSImgDirectionRef",17:"GPSImgDirection",18:"GPSMapDatum",19:"GPSDestLatitudeRef",20:"GPSDestLatitude",21:"GPSDestLongitudeRef",22:"GPSDestLongitude",23:"GPSDestBearingRef",24:"GPSDestBearing",25:"GPSDestDistanceRef",26:"GPSDestDistance",27:"GPSProcessingMethod",28:"GPSAreaInformation",29:"GPSDateStamp",30:"GPSDifferential"},l=a.IFD1Tags={256:"ImageWidth",257:"ImageHeight",258:"BitsPerSample",259:"Compression",262:"PhotometricInterpretation",273:"StripOffsets",274:"Orientation",277:"SamplesPerPixel",278:"RowsPerStrip",279:"StripByteCounts",282:"XResolution",283:"YResolution",284:"PlanarConfiguration",296:"ResolutionUnit",513:"JpegIFOffset",514:"JpegIFByteCount",529:"YCbCrCoefficients",530:"YCbCrSubSampling",531:"YCbCrPositioning",532:"ReferenceBlackWhite"},h=a.StringValues={ExposureProgram:{0:"Not defined",1:"Manual",2:"Normal program",3:"Aperture priority",4:"Shutter priority",5:"Creative program",6:"Action program",7:"Portrait mode",8:"Landscape mode"},MeteringMode:{0:"Unknown",1:"Average",2:"CenterWeightedAverage",3:"Spot",4:"MultiSpot",5:"Pattern",6:"Partial",255:"Other"},LightSource:{0:"Unknown",1:"Daylight",2:"Fluorescent",3:"Tungsten (incandescent light)",4:"Flash",9:"Fine weather",10:"Cloudy weather",11:"Shade",12:"Daylight fluorescent (D 5700 - 7100K)",13:"Day white fluorescent (N 4600 - 5400K)",14:"Cool white fluorescent (W 3900 - 4500K)",15:"White fluorescent (WW 3200 - 3700K)",17:"Standard light A",18:"Standard light B",19:"Standard light C",20:"D55",21:"D65",22:"D75",23:"D50",24:"ISO studio tungsten",255:"Other"},Flash:{0:"Flash did not fire",1:"Flash fired",5:"Strobe return light not detected",7:"Strobe return light detected",9:"Flash fired, compulsory flash mode",13:"Flash fired, compulsory flash mode, return light not detected",15:"Flash fired, compulsory flash mode, return light detected",16:"Flash did not fire, compulsory flash mode",24:"Flash did not fire, auto mode",25:"Flash fired, auto mode",29:"Flash fired, auto mode, return light not detected",31:"Flash fired, auto mode, return light detected",32:"No flash function",65:"Flash fired, red-eye reduction mode",69:"Flash fired, red-eye reduction mode, return light not detected",71:"Flash fired, red-eye reduction mode, return light detected",73:"Flash fired, compulsory flash mode, red-eye reduction mode",77:"Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected",79:"Flash fired, compulsory flash mode, red-eye reduction mode, return light detected",89:"Flash fired, auto mode, red-eye reduction mode",93:"Flash fired, auto mode, return light not detected, red-eye reduction mode",95:"Flash fired, auto mode, return light detected, red-eye reduction mode"},SensingMethod:{1:"Not defined",2:"One-chip color area sensor",3:"Two-chip color area sensor",4:"Three-chip color area sensor",5:"Color sequential area sensor",7:"Trilinear sensor",8:"Color sequential linear sensor"},SceneCaptureType:{0:"Standard",1:"Landscape",2:"Portrait",3:"Night scene"},SceneType:{1:"Directly photographed"},CustomRendered:{0:"Normal process",1:"Custom process"},WhiteBalance:{0:"Auto white balance",1:"Manual white balance"},GainControl:{0:"None",1:"Low gain up",2:"High gain up",3:"Low gain down",4:"High gain down"},Contrast:{0:"Normal",1:"Soft",2:"Hard"},Saturation:{0:"Normal",1:"Low saturation",2:"High saturation"},Sharpness:{0:"Normal",1:"Soft",2:"Hard"},SubjectDistanceRange:{0:"Unknown",1:"Macro",2:"Close view",3:"Distant view"},FileSource:{3:"DSC"},Components:{0:"",1:"Y",2:"Cb",3:"Cr",4:"R",5:"G",6:"B"}};function f(t){return!!t.exifdata}function p(t,e){e=e||t.match(/^data\:([^\;]+)\;base64,/im)[1]||"",t=t.replace(/^data\:([^\;]+)\;base64,/gim,"");for(var r=atob(t),n=r.length,o=new ArrayBuffer(n),i=new Uint8Array(o),a=0;a<n;a++)i[a]=r.charCodeAt(a);return o}function d(t,e){var r=new XMLHttpRequest;r.open("GET",t,!0),r.responseType="blob",r.onload=function(t){200!=this.status&&0!==this.status||e(this.response)},r.send()}function g(t,e){function n(r){var n=v(r);t.exifdata=n||{};var o=m(r);if(t.iptcdata=o||{},a.isXmpEnabled){var i=A(r);t.xmpdata=i||{}}e&&e.call(t)}if(t.src)if(/^data\:/i.test(t.src)){var o=p(t.src);n(o)}else if(/^blob\:/i.test(t.src)){var i=new FileReader;i.onload=function(t){n(t.target.result)},d(t.src,(function(t){i.readAsArrayBuffer(t)}))}else{var s=new XMLHttpRequest;s.onload=function(){if(200!=this.status&&0!==this.status)throw"Could not load image";n(s.response),s=null},s.open("GET",t.src,!0),s.responseType="arraybuffer",s.send(null)}else if(self.FileReader&&(t instanceof self.Blob||t instanceof self.File)){i=new FileReader;i.onload=function(t){r&&console.log("Got file of length "+t.target.result.byteLength),n(t.target.result)},i.readAsArrayBuffer(t)}}function v(t){var e=new DataView(t);if(r&&console.log("Got file of length "+t.byteLength),255!=e.getUint8(0)||216!=e.getUint8(1))return r&&console.log("Not a valid JPEG"),!1;var n,o=2,i=t.byteLength;while(o<i){if(255!=e.getUint8(o))return r&&console.log("Not a valid marker at offset "+o+", found: "+e.getUint8(o)),!1;if(n=e.getUint8(o+1),r&&console.log(n),225==n)return r&&console.log("Found 0xFFE1 marker"),S(e,o+4,e.getUint16(o+2)-2);o+=2+e.getUint16(o+2)}}function m(t){var e=new DataView(t);if(r&&console.log("Got file of length "+t.byteLength),255!=e.getUint8(0)||216!=e.getUint8(1))return r&&console.log("Not a valid JPEG"),!1;var n=2,o=t.byteLength,i=function(t,e){return 56===t.getUint8(e)&&66===t.getUint8(e+1)&&73===t.getUint8(e+2)&&77===t.getUint8(e+3)&&4===t.getUint8(e+4)&&4===t.getUint8(e+5)};while(n<o){if(i(e,n)){var a=e.getUint8(n+7);a%2!==0&&(a+=1),0===a&&(a=4);var s=n+8+a,c=e.getUint16(n+6+a);return w(t,s,c)}n++}}var y={120:"caption",110:"credit",25:"keywords",55:"dateCreated",80:"byline",85:"bylineTitle",122:"captionWriter",105:"headline",116:"copyright",15:"category"};function w(t,e,r){var n,o,i,a,s=new DataView(t),c={},u=e;while(u<e+r)28===s.getUint8(u)&&2===s.getUint8(u+1)&&(a=s.getUint8(u+2),a in y&&(i=s.getInt16(u+3),i+5,o=y[a],n=B(s,u+5,i),c.hasOwnProperty(o)?c[o]instanceof Array?c[o].push(n):c[o]=[c[o],n]:c[o]=n)),u++;return c}function b(t,e,n,o,i){var a,s,c,u=t.getUint16(n,!i),l={};for(c=0;c<u;c++)a=n+12*c+2,s=o[t.getUint16(a,!i)],!s&&r&&console.log("Unknown tag: "+t.getUint16(a,!i)),l[s]=x(t,a,e,n,i);return l}function x(t,e,r,n,o){var i,a,s,c,u,l,h=t.getUint16(e+2,!o),f=t.getUint32(e+4,!o),p=t.getUint32(e+8,!o)+r;switch(h){case 1:case 7:if(1==f)return t.getUint8(e+8,!o);for(i=f>4?p:e+8,a=[],c=0;c<f;c++)a[c]=t.getUint8(i+c);return a;case 2:return i=f>4?p:e+8,B(t,i,f-1);case 3:if(1==f)return t.getUint16(e+8,!o);for(i=f>2?p:e+8,a=[],c=0;c<f;c++)a[c]=t.getUint16(i+2*c,!o);return a;case 4:if(1==f)return t.getUint32(e+8,!o);for(a=[],c=0;c<f;c++)a[c]=t.getUint32(p+4*c,!o);return a;case 5:if(1==f)return u=t.getUint32(p,!o),l=t.getUint32(p+4,!o),s=new Number(u/l),s.numerator=u,s.denominator=l,s;for(a=[],c=0;c<f;c++)u=t.getUint32(p+8*c,!o),l=t.getUint32(p+4+8*c,!o),a[c]=new Number(u/l),a[c].numerator=u,a[c].denominator=l;return a;case 9:if(1==f)return t.getInt32(e+8,!o);for(a=[],c=0;c<f;c++)a[c]=t.getInt32(p+4*c,!o);return a;case 10:if(1==f)return t.getInt32(p,!o)/t.getInt32(p+4,!o);for(a=[],c=0;c<f;c++)a[c]=t.getInt32(p+8*c,!o)/t.getInt32(p+4+8*c,!o);return a}}function C(t,e,r){var n=t.getUint16(e,!r);return t.getUint32(e+2+12*n,!r)}function I(t,e,r,n){var o=C(t,e+r,n);if(!o)return{};if(o>t.byteLength)return{};var i=b(t,e,e+o,l,n);if(i["Compression"])switch(i["Compression"]){case 6:if(i.JpegIFOffset&&i.JpegIFByteCount){var a=e+i.JpegIFOffset,s=i.JpegIFByteCount;i["blob"]=new Blob([new Uint8Array(t.buffer,a,s)],{type:"image/jpeg"})}break;case 1:console.log("Thumbnail image format is TIFF, which is not implemented.");break;default:console.log("Unknown thumbnail image format '%s'",i["Compression"])}else 2==i["PhotometricInterpretation"]&&console.log("Thumbnail image format is RGB, which is not implemented.");return i}function B(t,e,r){var o="";for(n=e;n<e+r;n++)o+=String.fromCharCode(t.getUint8(n));return o}function S(t,e){if("Exif"!=B(t,e,4))return r&&console.log("Not valid EXIF data! "+B(t,e,4)),!1;var n,o,i,a,l,f=e+6;if(18761==t.getUint16(f))n=!1;else{if(19789!=t.getUint16(f))return r&&console.log("Not valid TIFF data! (no 0x4949 or 0x4D4D)"),!1;n=!0}if(42!=t.getUint16(f+2,!n))return r&&console.log("Not valid TIFF data! (no 0x002A)"),!1;var p=t.getUint32(f+4,!n);if(p<8)return r&&console.log("Not valid TIFF data! (First offset less than 8)",t.getUint32(f+4,!n)),!1;if(o=b(t,f,f+p,c,n),o.ExifIFDPointer)for(i in a=b(t,f,f+o.ExifIFDPointer,s,n),a){switch(i){case"LightSource":case"Flash":case"MeteringMode":case"ExposureProgram":case"SensingMethod":case"SceneCaptureType":case"SceneType":case"CustomRendered":case"WhiteBalance":case"GainControl":case"Contrast":case"Saturation":case"Sharpness":case"SubjectDistanceRange":case"FileSource":a[i]=h[i][a[i]];break;case"ExifVersion":case"FlashpixVersion":a[i]=String.fromCharCode(a[i][0],a[i][1],a[i][2],a[i][3]);break;case"ComponentsConfiguration":a[i]=h.Components[a[i][0]]+h.Components[a[i][1]]+h.Components[a[i][2]]+h.Components[a[i][3]];break}o[i]=a[i]}if(o.GPSInfoIFDPointer)for(i in l=b(t,f,f+o.GPSInfoIFDPointer,u,n),l){switch(i){case"GPSVersionID":l[i]=l[i][0]+"."+l[i][1]+"."+l[i][2]+"."+l[i][3];break}o[i]=l[i]}return o["thumbnail"]=I(t,f,p,n),o}function A(t){if("DOMParser"in self){var e=new DataView(t);if(r&&console.log("Got file of length "+t.byteLength),255!=e.getUint8(0)||216!=e.getUint8(1))return r&&console.log("Not a valid JPEG"),!1;var n=2,o=t.byteLength,i=new DOMParser;while(n<o-4){if("http"==B(e,n,4)){var a=n-1,s=e.getUint16(n-2)-1,c=B(e,a,s),u=c.indexOf("xmpmeta>")+8;c=c.substring(c.indexOf("<x:xmpmeta"),u);var l=c.indexOf("x:xmpmeta")+10;c=c.slice(0,l)+'xmlns:Iptc4xmpCore="http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tiff="http://ns.adobe.com/tiff/1.0/" xmlns:plus="http://schemas.android.com/apk/lib/com.google.android.gms.plus" xmlns:ext="http://www.gettyimages.com/xsltExtension/1.0" xmlns:exif="http://ns.adobe.com/exif/1.0/" xmlns:stEvt="http://ns.adobe.com/xap/1.0/sType/ResourceEvent#" xmlns:stRef="http://ns.adobe.com/xap/1.0/sType/ResourceRef#" xmlns:crs="http://ns.adobe.com/camera-raw-settings/1.0/" xmlns:xapGImg="http://ns.adobe.com/xap/1.0/g/img/" xmlns:Iptc4xmpExt="http://iptc.org/std/Iptc4xmpExt/2008-02-29/" '+c.slice(l);var h=i.parseFromString(c,"text/xml");return T(h)}n++}}}function O(t){var e={};if(1==t.nodeType){if(t.attributes.length>0){e["@attributes"]={};for(var r=0;r<t.attributes.length;r++){var n=t.attributes.item(r);e["@attributes"][n.nodeName]=n.nodeValue}}}else if(3==t.nodeType)return t.nodeValue;if(t.hasChildNodes())for(var o=0;o<t.childNodes.length;o++){var i=t.childNodes.item(o),a=i.nodeName;if(null==e[a])e[a]=O(i);else{if(null==e[a].push){var s=e[a];e[a]=[],e[a].push(s)}e[a].push(O(i))}}return e}function T(t){try{var e={};if(t.children.length>0)for(var r=0;r<t.children.length;r++){var n=t.children.item(r),o=n.attributes;for(var i in o){var a=o[i],s=a.nodeName,c=a.nodeValue;void 0!==s&&(e[s]=c)}var u=n.nodeName;if("undefined"==typeof e[u])e[u]=O(n);else{if("undefined"==typeof e[u].push){var l=e[u];e[u]=[],e[u].push(l)}e[u].push(O(n))}}else e=t.textContent;return e}catch(h){console.log(h.message)}}a.enableXmp=function(){a.isXmpEnabled=!0},a.disableXmp=function(){a.isXmpEnabled=!1},a.getData=function(t,e){return!((self.Image&&t instanceof self.Image||self.HTMLImageElement&&t instanceof self.HTMLImageElement)&&!t.complete)&&(f(t)?e&&e.call(t):g(t,e),!0)},a.getTag=function(t,e){if(f(t))return t.exifdata[e]},a.getIptcTag=function(t,e){if(f(t))return t.iptcdata[e]},a.getAllTags=function(t){if(!f(t))return{};var e,r=t.exifdata,n={};for(e in r)r.hasOwnProperty(e)&&(n[e]=r[e]);return n},a.getAllIptcTags=function(t){if(!f(t))return{};var e,r=t.iptcdata,n={};for(e in r)r.hasOwnProperty(e)&&(n[e]=r[e]);return n},a.pretty=function(t){if(!f(t))return"";var e,r=t.exifdata,n="";for(e in r)r.hasOwnProperty(e)&&("object"==typeof r[e]?r[e]instanceof Number?n+=e+" : "+r[e]+" ["+r[e].numerator+"/"+r[e].denominator+"]\r\n":n+=e+" : ["+r[e].length+" values]\r\n":n+=e+" : "+r[e]+"\r\n");return n},a.readFromBinaryFile=function(t){return v(t)},o=[],i=function(){return a}.apply(e,o),void 0===i||(t.exports=i)}).call(this)},"57ad":function(t,e,r){var n=r("9bc6");e.f=n},"5da5":function(t,e,r){"use strict";var n=r("4ae2"),o=r("a3e7").findIndex,i=n.aTypedArray,a=n.exportTypedArrayMethod;a("findIndex",(function(t){return o(i(this),t,arguments.length>1?arguments[1]:void 0)}))},"5ee4":function(t,e,r){"use strict";e.decode=e.parse=r("a2d3"),e.encode=e.stringify=r("2bb8")},6784:function(t,e,r){},"6a61":function(t,e,r){var n=function(t){"use strict";var e,r=Object.prototype,n=r.hasOwnProperty,o="function"===typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(E){c=function(t,e,r){return t[e]=r}}function u(t,e,r,n){var o=e&&e.prototype instanceof v?e:v,i=Object.create(o.prototype),a=new k(n||[]);return i._invoke=S(t,r,a),i}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(E){return{type:"throw",arg:E}}}t.wrap=u;var h="suspendedStart",f="suspendedYield",p="executing",d="completed",g={};function v(){}function m(){}function y(){}var w={};w[i]=function(){return this};var b=Object.getPrototypeOf,x=b&&b(b(M([])));x&&x!==r&&n.call(x,i)&&(w=x);var C=y.prototype=v.prototype=Object.create(w);function I(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function B(t,e){function r(o,i,a,s){var c=l(t[o],t,i);if("throw"!==c.type){var u=c.arg,h=u.value;return h&&"object"===typeof h&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(h).then((function(t){u.value=t,a(u)}),(function(t){return r("throw",t,a,s)}))}s(c.arg)}var o;function i(t,n){function i(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(i,i):i()}this._invoke=i}function S(t,e,r){var n=h;return function(o,i){if(n===p)throw new Error("Generator is already running");if(n===d){if("throw"===o)throw i;return P()}r.method=o,r.arg=i;while(1){var a=r.delegate;if(a){var s=A(a,r);if(s){if(s===g)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===h)throw n=d,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=p;var c=l(t,e,r);if("normal"===c.type){if(n=r.done?d:f,c.arg===g)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n=d,r.method="throw",r.arg=c.arg)}}}function A(t,r){var n=t.iterator[r.method];if(n===e){if(r.delegate=null,"throw"===r.method){if(t.iterator["return"]&&(r.method="return",r.arg=e,A(t,r),"throw"===r.method))return g;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return g}var o=l(n,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function k(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function M(t){if(t){var r=t[i];if(r)return r.call(t);if("function"===typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){while(++o<t.length)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return a.next=a}}return{next:P}}function P(){return{value:e,done:!0}}return m.prototype=C.constructor=y,y.constructor=m,m.displayName=c(y,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"===typeof t&&t.constructor;return!!e&&(e===m||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,y):(t.__proto__=y,c(t,s,"GeneratorFunction")),t.prototype=Object.create(C),t},t.awrap=function(t){return{__await:t}},I(B.prototype),B.prototype[a]=function(){return this},t.AsyncIterator=B,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new B(u(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},I(C),c(C,s,"Generator"),C[i]=function(){return this},C.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){while(e.length){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=M,k.prototype={constructor:k,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(T),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0],e=t.completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(n,o){return s.type="throw",s.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),u=n.call(a,"finallyLoc");if(c&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),T(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:M(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),g}},t}(t.exports);try{regeneratorRuntime=n}catch(o){Function("r","regeneratorRuntime = r")(n)}},"6afd":function(t,e,r){var n=r("b074"),o=r("99f2"),i=r("d393"),a=r("429f");for(var s in o){var c=n[s],u=c&&c.prototype;if(u&&u.forEach!==i)try{a(u,"forEach",i)}catch(l){u.forEach=i}}},"6f43":function(t){t.exports=JSON.parse('{"name":"vue-img-cutter","version":"2.2.3","description":"A image crop plug-in for Vue,you can use it to rotate、zoom images and cut any size","author":"acccccccb <tabzhang@foxmail.com>","private":false,"scripts":{"dev":"webpack-dev-server --inline --progress --config build/webpack.dev.conf.js","start":"npm run dev","build":"node build/build.js"},"dependencies":{"vue":"^2.5.2"},"devDependencies":{"autoprefixer":"^7.1.2","babel-core":"^6.22.1","babel-helper-vue-jsx-merge-props":"^2.0.3","babel-loader":"^7.1.1","babel-plugin-syntax-jsx":"^6.18.0","babel-plugin-transform-runtime":"^6.22.0","babel-plugin-transform-vue-jsx":"^3.5.0","babel-preset-env":"^1.3.2","babel-preset-stage-2":"^6.22.0","chalk":"^2.0.1","copy-webpack-plugin":"^4.0.1","css-loader":"^0.28.0","extract-text-webpack-plugin":"^3.0.0","file-loader":"^1.1.4","friendly-errors-webpack-plugin":"^1.6.1","html-webpack-plugin":"^2.30.1","js-yaml":"^3.13.1","lodash":"^4.17.15","mem":"^6.0.0","mixin-deep":"^2.0.1","node-notifier":"^8.0.1","optimize-css-assets-webpack-plugin":"^3.2.0","ora":"^1.2.0","portfinder":"^1.0.13","postcss-import":"^11.0.0","postcss-loader":"^2.0.8","postcss-url":"^7.2.1","rimraf":"^2.6.0","semver":"^5.3.0","set-value":"^3.0.1","shelljs":"^0.7.6","uglifyjs-webpack-plugin":"^1.1.1","url-loader":"^0.5.8","vue-loader":"^13.3.0","vue-style-loader":"^3.0.1","vue-template-compiler":"^2.5.2","webpack":"^3.12.0","webpack-bundle-analyzer":"^3.3.2","webpack-dev-server":"^2.11.5","webpack-merge":"^4.1.0"},"engines":{"node":">= 6.0.0","npm":">= 3.0.0"},"browserslist":["> 1%","last 2 versions","not ie <= 8"],"main":"./src/index.js","repository":{"type":"git","url":"git+https://github.com/acccccccb/vue-img-cutter.git"},"keywords":["image","crop","cutter","vue","裁剪"],"license":"Apache2.0","bugs":{"url":"https://github.com/acccccccb/vue-img-cutter/issues"},"homepage":"https://ihtmlcss.com/demo/dist/#/croptool","__npminstall_done":"Thu Jul 15 2021 11:11:12 GMT+0800 (China Standard Time)","_from":"vue-img-cutter@2.2.3","_resolved":"https://registry.nlark.com/vue-img-cutter/download/vue-img-cutter-2.2.3.tgz"}')},7036:function(t,e,r){"use strict";var n=r("4ae2"),o=r("7f45"),i=r("d50e"),a=n.aTypedArray,s=n.aTypedArrayConstructor,c=n.exportTypedArrayMethod,u=[].slice,l=i((function(){new Int8Array(1).slice()}));c("slice",(function(t,e){var r=u.call(a(this),t,e),n=o(this,this.constructor),i=0,c=r.length,l=new(s(n))(c);while(c>i)l[i]=r[i++];return l}),l)},"722c":function(t,e,r){var n=r("8018");t.exports=/MSIE|Trident/.test(n)},"78f5":function(t,e,r){"use strict";var n=r("4ae2"),o=r("a3e7").some,i=n.aTypedArray,a=n.exportTypedArrayMethod;a("some",(function(t){return o(i(this),t,arguments.length>1?arguments[1]:void 0)}))},"79fd":function(t,e,r){"use strict";var n=r("e450"),o=r("b074"),i=r("9eb3"),a=r("1cd8"),s=r("cdcb"),c=r("624a"),u=r("7ac1"),l=r("d50e"),h=r("8801"),f=r("99f6"),p=r("0f4e"),d=r("9f69"),g=r("eb35"),v=r("4b3a"),m=r("62d1"),y=r("a136"),w=r("49a9"),b=r("a89e"),x=r("a5e4e"),C=r("1857"),I=r("df3c"),B=r("fc06"),S=r("3d27"),A=r("1682"),O=r("429f"),T=r("6c39"),k=r("7a81"),M=r("a42a"),P=r("c903"),E=r("a67a"),_=r("9bc6"),L=r("57ad"),U=r("9d0d"),F=r("bfc8"),R=r("817b"),N=r("a3e7").forEach,H=M("hidden"),j="Symbol",D="prototype",W=_("toPrimitive"),z=R.set,X=R.getterFor(j),Y=Object[D],G=o.Symbol,q=i("JSON","stringify"),$=B.f,V=S.f,J=C.f,K=A.f,Q=k("symbols"),Z=k("op-symbols"),tt=k("string-to-symbol-registry"),et=k("symbol-to-string-registry"),rt=k("wks"),nt=o.QObject,ot=!nt||!nt[D]||!nt[D].findChild,it=s&&l((function(){return 7!=w(V({},"a",{get:function(){return V(this,"a",{value:7}).a}})).a}))?function(t,e,r){var n=$(Y,e);n&&delete Y[e],V(t,e,r),n&&t!==Y&&V(Y,e,n)}:V,at=function(t,e){var r=Q[t]=w(G[D]);return z(r,{type:j,tag:t,description:e}),s||(r.description=e),r},st=u?function(t){return"symbol"==typeof t}:function(t){return Object(t)instanceof G},ct=function(t,e,r){t===Y&&ct(Z,e,r),d(t);var n=m(e,!0);return d(r),h(Q,n)?(r.enumerable?(h(t,H)&&t[H][n]&&(t[H][n]=!1),r=w(r,{enumerable:y(0,!1)})):(h(t,H)||V(t,H,y(1,{})),t[H][n]=!0),it(t,n,r)):V(t,n,r)},ut=function(t,e){d(t);var r=v(e),n=b(r).concat(dt(r));return N(n,(function(e){s&&!ht.call(r,e)||ct(t,e,r[e])})),t},lt=function(t,e){return void 0===e?w(t):ut(w(t),e)},ht=function(t){var e=m(t,!0),r=K.call(this,e);return!(this===Y&&h(Q,e)&&!h(Z,e))&&(!(r||!h(this,e)||!h(Q,e)||h(this,H)&&this[H][e])||r)},ft=function(t,e){var r=v(t),n=m(e,!0);if(r!==Y||!h(Q,n)||h(Z,n)){var o=$(r,n);return!o||!h(Q,n)||h(r,H)&&r[H][n]||(o.enumerable=!0),o}},pt=function(t){var e=J(v(t)),r=[];return N(e,(function(t){h(Q,t)||h(P,t)||r.push(t)})),r},dt=function(t){var e=t===Y,r=J(e?Z:v(t)),n=[];return N(r,(function(t){!h(Q,t)||e&&!h(Y,t)||n.push(Q[t])})),n};if(c||(G=function(){if(this instanceof G)throw TypeError("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?String(arguments[0]):void 0,e=E(t),r=function(t){this===Y&&r.call(Z,t),h(this,H)&&h(this[H],e)&&(this[H][e]=!1),it(this,e,y(1,t))};return s&&ot&&it(Y,e,{configurable:!0,set:r}),at(e,t)},T(G[D],"toString",(function(){return X(this).tag})),T(G,"withoutSetter",(function(t){return at(E(t),t)})),A.f=ht,S.f=ct,B.f=ft,x.f=C.f=pt,I.f=dt,L.f=function(t){return at(_(t),t)},s&&(V(G[D],"description",{configurable:!0,get:function(){return X(this).description}}),a||T(Y,"propertyIsEnumerable",ht,{unsafe:!0}))),n({global:!0,wrap:!0,forced:!c,sham:!c},{Symbol:G}),N(b(rt),(function(t){U(t)})),n({target:j,stat:!0,forced:!c},{for:function(t){var e=String(t);if(h(tt,e))return tt[e];var r=G(e);return tt[e]=r,et[r]=e,r},keyFor:function(t){if(!st(t))throw TypeError(t+" is not a symbol");if(h(et,t))return et[t]},useSetter:function(){ot=!0},useSimple:function(){ot=!1}}),n({target:"Object",stat:!0,forced:!c,sham:!s},{create:lt,defineProperty:ct,defineProperties:ut,getOwnPropertyDescriptor:ft}),n({target:"Object",stat:!0,forced:!c},{getOwnPropertyNames:pt,getOwnPropertySymbols:dt}),n({target:"Object",stat:!0,forced:l((function(){I.f(1)}))},{getOwnPropertySymbols:function(t){return I.f(g(t))}}),q){var gt=!c||l((function(){var t=G();return"[null]"!=q([t])||"{}"!=q({a:t})||"{}"!=q(Object(t))}));n({target:"JSON",stat:!0,forced:gt},{stringify:function(t,e,r){var n,o=[t],i=1;while(arguments.length>i)o.push(arguments[i++]);if(n=e,(p(e)||void 0!==t)&&!st(t))return f(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!st(e))return e}),o[1]=e,q.apply(null,o)}})}G[D][W]||O(G[D],W,G[D].valueOf),F(G,j),P[H]=!0},"7bec":function(t,e,r){},"7cd8":function(t,e,r){var n=r("0f4e"),o=r("fdfe"),i=r("9bc6"),a=i("match");t.exports=function(t){var e;return n(t)&&(void 0!==(e=t[a])?!!e:"RegExp"==o(t))}},"7eeb":function(t,e,r){var n=r("8018"),o=n.match(/AppleWebKit\/(\d+)\./);t.exports=!!o&&+o[1]},8250:function(t,e,r){var n=r("0bf3");t.exports=function(t,e){var r=n(t);if(r%e)throw RangeError("Wrong offset");return r}},8639:function(t,e,r){"use strict";var n=r("6c87"),o=r("7cd8"),i=r("9f69"),a=r("e08f"),s=r("7f45"),c=r("952c"),u=r("a4fc"),l=r("1392"),h=r("eb5b"),f=r("4cee"),p=r("d50e"),d=f.UNSUPPORTED_Y,g=[].push,v=Math.min,m=4294967295,y=!p((function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var r="ab".split(t);return 2!==r.length||"a"!==r[0]||"b"!==r[1]}));n("split",(function(t,e,r){var n;return n="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(t,r){var n=String(a(this)),i=void 0===r?m:r>>>0;if(0===i)return[];if(void 0===t)return[n];if(!o(t))return e.call(n,t,i);var s,c,u,l=[],f=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),p=0,d=new RegExp(t.source,f+"g");while(s=h.call(d,n)){if(c=d.lastIndex,c>p&&(l.push(n.slice(p,s.index)),s.length>1&&s.index<n.length&&g.apply(l,s.slice(1)),u=s[0].length,p=c,l.length>=i))break;d.lastIndex===s.index&&d.lastIndex++}return p===n.length?!u&&d.test("")||l.push(""):l.push(n.slice(p)),l.length>i?l.slice(0,i):l}:"0".split(void 0,0).length?function(t,r){return void 0===t&&0===r?[]:e.call(this,t,r)}:e,[function(e,r){var o=a(this),i=void 0==e?void 0:e[t];return void 0!==i?i.call(e,o,r):n.call(String(o),e,r)},function(t,o){var a=r(n,this,t,o,n!==e);if(a.done)return a.value;var h=i(this),f=String(t),p=s(h,RegExp),g=h.unicode,y=(h.ignoreCase?"i":"")+(h.multiline?"m":"")+(h.unicode?"u":"")+(d?"g":"y"),w=new p(d?"^(?:"+h.source+")":h,y),b=void 0===o?m:o>>>0;if(0===b)return[];if(0===f.length)return null===l(w,f)?[f]:[];var x=0,C=0,I=[];while(C<f.length){w.lastIndex=d?0:C;var B,S=l(w,d?f.slice(C):f);if(null===S||(B=v(u(w.lastIndex+(d?C:0)),f.length))===x)C=c(f,C,g);else{if(I.push(f.slice(x,C)),I.length===b)return I;for(var A=1;A<=S.length-1;A++)if(I.push(S[A]),I.length===b)return I;C=x=B}}return I.push(f.slice(x)),I}]}),!y,d)},"86ca":function(t,e,r){"use strict";var n=r("b074"),o=r("4ae2"),i=r("d50e"),a=n.Int8Array,s=o.aTypedArray,c=o.exportTypedArrayMethod,u=[].toLocaleString,l=[].slice,h=!!a&&i((function(){u.call(new a(1))})),f=i((function(){return[1,2].toLocaleString()!=new a([1,2]).toLocaleString()}))||!i((function(){a.prototype.toLocaleString.call([1,2])}));c("toLocaleString",(function(){return u.apply(h?l.call(s(this)):s(this),arguments)}),f)},8846:function(t,e,r){var n=r("9bc6"),o=n("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(r){try{return e[o]=!1,"/./"[t](e)}catch(n){}}return!1}},"8d6e":function(t,e,r){"use strict";var n=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"custom-upload"},[r("el-dialog",{staticClass:"cropper-dialog",attrs:{title:"图片裁剪",visible:t.showCropper,width:"50%",height:"600",center:"","append-to-body":""},on:{"update:visible":function(e){t.showCropper=e}}},[t.showCropper?r("vue-cropper",t._b({ref:"cropper",class:{"corpper-warp":t.showCropper},attrs:{id:"corpper"}},"vue-cropper",t.cropper,!1)):t._e(),t.showCropper?r("div",{staticClass:"cropper-button"},[r("el-button",{staticClass:"cancel-btn",attrs:{size:"small"},nativeOn:{click:function(e){t.showCropper=!1}}},[t._v("取消")]),r("el-button",{attrs:{size:"small",type:"primary",loading:t.loading},on:{click:t.uploadCover}},[t._v("完成")])],1):t._e()],1),r("input",{staticStyle:{display:"none"},attrs:{id:t.id,type:"file",name:"single",accept:"image/*"},on:{change:function(e){return t.onChange(e)}}}),r("el-button",{attrs:{size:"small",type:"primary",loading:t.loading},on:{click:function(e){return t.handleOpenFile()}}},[r("i",{staticClass:"fa fa-upload"}),t._v(" "+t._s(t.buttonName)+" ")]),t.tips?r("div",{staticClass:"tips clear-margin-top"},[t._v(t._s(t.tips))]):t._e()],1)},o=[];r("b1fa");function i(t,e,r,n,o,i,a){try{var s=t[i](a),c=s.value}catch(u){return void r(u)}s.done?e(c):Promise.resolve(c).then(n,o)}function a(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function s(t){i(a,n,o,s,c,"next",t)}function c(t){i(a,n,o,s,c,"throw",t)}s(void 0)}))}}var s=r("46d3"),c=(r("6a61"),r("e1d4"),r("e6d0"),r("b678"));r("79fd"),r("45af"),r("1ec5"),r("2e6f"),r("af21");r("aa00"),r("f5bd"),r("0a4f");r("bc44"),r("3979");var u=r("51c0"),l=function(t,e){var r=e||["image/png","image/gif","image/jpeg","image/jpg","image/bmp","image/x-icon"],n=r.includes(t.type);return!!n||(u["Message"].error("上传文件非图片格式!"),!1)},h=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,r=t.size/1024/1024<e;return!!r||(u["Message"].error("上传头像图片大小不能超过 "+e+"MB!"),!1)},f=function(t){return new Promise((function(e,r){var n=new FileReader;n.onload=function(t){var r=t.target.result;e(r)},n.onerror=function(){var t=new Error("读取图片失败");r(t.message)},n.readAsDataURL(t)}))},p=r("7c78"),d={components:{VueCropper:c["VueCropper"]},props:{maxFileSize:{type:Number,default:50},buttonName:{type:String,default:"添加图片"},tips:{type:String},fixedNumber:{type:Array,default:function(){return[]}},width:{type:Number,default:460},height:{type:Number,default:300}},data:function(){var t;return{imageUrl:"",token:{},domain:"https://up-z1.qiniup.com",qiniuaddr:"xhead.beswell.com",id:"cropper-input-"+ +new Date,loading:!1,showCropper:!1,cropper:(t={img:"",info:!0,size:.9,outputType:"png",canScale:!0,autoCrop:!0,full:!0,autoCropWidth:this.width,autoCropHeight:this.height,fixedBox:!1,fixed:!0,fixedNumber:this.fixedNumber,canMoveBox:!0,canMove:!0,outputSize:1},Object(s["a"])(t,"outputType","png"),Object(s["a"])(t,"full",!0),Object(s["a"])(t,"info",!0),Object(s["a"])(t,"canScale",!0),Object(s["a"])(t,"autoCrop",!0),Object(s["a"])(t,"autoCropWidth",200),Object(s["a"])(t,"autoCropHeight",200),Object(s["a"])(t,"canMove",!0),Object(s["a"])(t,"fixedBox",!0),Object(s["a"])(t,"fixed",!1),Object(s["a"])(t,"canMoveBox",!0),Object(s["a"])(t,"original",!1),Object(s["a"])(t,"centerBox",!1),Object(s["a"])(t,"height",!0),Object(s["a"])(t,"infoTrue",!1),Object(s["a"])(t,"enlarge",1),Object(s["a"])(t,"mode","container"),Object(s["a"])(t,"maxImgSize",375),t)}},methods:{handleOpenFile:function(){var t=document.getElementById(this.id);t.addEventListener("click",(function(){this.value=""}),!1),t.click()},onChange:function(t){var e=this;return a(regeneratorRuntime.mark((function r(){var n,o;return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:if(n=t.target.files[0],console.log(n),n){r.next=5;break}return console.log("选择图片失败"),r.abrupt("return",!1);case 5:if(l(n)){r.next=7;break}return r.abrupt("return");case 7:return r.prev=7,r.next=10,f(n);case 10:o=r.sent,e.showCropper=!0,e.cropper.img=o,r.next=18;break;case 15:r.prev=15,r.t0=r["catch"](7),console.log(r.t0);case 18:case"end":return r.stop()}}),r,null,[[7,15]])})))()},uploadCover:function(){var t=this;this.$refs.cropper.getCropBlob(function(){var e=a(regeneratorRuntime.mark((function e(r){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(e.prev=0,h(r,t.maxFileSize)){e.next=3;break}return e.abrupt("return");case 3:t.loading=!0,console.log(r),t.upqiniu(r),t.loading=!1,t.showCropper=!1,e.next=15;break;case 10:e.prev=10,e.t0=e["catch"](0),t.loading=!1,t.showCropper=!1,console.log(e.t0);case 15:case"end":return e.stop()}}),e,null,[[0,10]])})));return function(t){return e.apply(this,arguments)}}())},upqiniu:function(t){var e=this,r={headers:{"Content-Type":"multipart/form-data"}},n="jpg",o="GoAllOut"+(new Date).valueOf()+Math.floor(100*Math.random())+"."+n,i={token:localStorage.token},a=p.stringify(i);this.axios.post(headapi+"v1/QiNiu/GetSimpleQiNiuToken",a).then((function(n){var i=new FormData;console.log(t),i.append("file",t),i.append("token",n.data.QiNinToken),i.append("key",o),e.axios.post(e.domain,i,r).then((function(t){e.imageUrl="http://"+e.qiniuaddr+"/"+t.data.key,e.$emit("subUploadSucceed",e.imageUrl)}))}))}}},g=d,v=(r("d2ac"),r("4ac2")),m=Object(v["a"])(g,n,o,!1,null,"7fa6a5a8",null);e["a"]=m.exports},"8dd4":function(t,e,r){"use strict";var n=r("4ae2"),o=n.aTypedArray,i=n.exportTypedArrayMethod,a=[].join;i("join",(function(t){return a.apply(o(this),arguments)}))},"8f28":function(t,e,r){var n=r("7cd8");t.exports=function(t){if(n(t))throw TypeError("The method doesn't accept regular expressions");return t}},9315:function(t,e,r){var n=r("9672");n("Uint8",(function(t){return function(e,r,n){return t(this,e,r,n)}}))},9326:function(t,e){t.exports="\t\n\v\f\r \u2028\u2029\ufeff"},9672:function(t,e,r){"use strict";var n=r("e450"),o=r("b074"),i=r("cdcb"),a=r("28ea"),s=r("4ae2"),c=r("9824"),u=r("60f3"),l=r("a136"),h=r("429f"),f=r("a4fc"),p=r("bad9"),d=r("8250"),g=r("62d1"),v=r("8801"),m=r("1c79"),y=r("0f4e"),w=r("49a9"),b=r("5ee6"),x=r("a5e4e").f,C=r("361e"),I=r("a3e7").forEach,B=r("d4b8"),S=r("3d27"),A=r("fc06"),O=r("817b"),T=r("d362"),k=O.get,M=O.set,P=S.f,E=A.f,_=Math.round,L=o.RangeError,U=c.ArrayBuffer,F=c.DataView,R=s.NATIVE_ARRAY_BUFFER_VIEWS,N=s.TYPED_ARRAY_TAG,H=s.TypedArray,j=s.TypedArrayPrototype,D=s.aTypedArrayConstructor,W=s.isTypedArray,z="BYTES_PER_ELEMENT",X="Wrong length",Y=function(t,e){var r=0,n=e.length,o=new(D(t))(n);while(n>r)o[r]=e[r++];return o},G=function(t,e){P(t,e,{get:function(){return k(this)[e]}})},q=function(t){var e;return t instanceof U||"ArrayBuffer"==(e=m(t))||"SharedArrayBuffer"==e},$=function(t,e){return W(t)&&"symbol"!=typeof e&&e in t&&String(+e)==String(e)},V=function(t,e){return $(t,e=g(e,!0))?l(2,t[e]):E(t,e)},J=function(t,e,r){return!($(t,e=g(e,!0))&&y(r)&&v(r,"value"))||v(r,"get")||v(r,"set")||r.configurable||v(r,"writable")&&!r.writable||v(r,"enumerable")&&!r.enumerable?P(t,e,r):(t[e]=r.value,t)};i?(R||(A.f=V,S.f=J,G(j,"buffer"),G(j,"byteOffset"),G(j,"byteLength"),G(j,"length")),n({target:"Object",stat:!0,forced:!R},{getOwnPropertyDescriptor:V,defineProperty:J}),t.exports=function(t,e,r){var i=t.match(/\d+$/)[0]/8,s=t+(r?"Clamped":"")+"Array",c="get"+t,l="set"+t,g=o[s],v=g,m=v&&v.prototype,S={},A=function(t,e){var r=k(t);return r.view[c](e*i+r.byteOffset,!0)},O=function(t,e,n){var o=k(t);r&&(n=(n=_(n))<0?0:n>255?255:255&n),o.view[l](e*i+o.byteOffset,n,!0)},E=function(t,e){P(t,e,{get:function(){return A(this,e)},set:function(t){return O(this,e,t)},enumerable:!0})};R?a&&(v=e((function(t,e,r,n){return u(t,v,s),T(function(){return y(e)?q(e)?void 0!==n?new g(e,d(r,i),n):void 0!==r?new g(e,d(r,i)):new g(e):W(e)?Y(v,e):C.call(v,e):new g(p(e))}(),t,v)})),b&&b(v,H),I(x(g),(function(t){t in v||h(v,t,g[t])})),v.prototype=m):(v=e((function(t,e,r,n){u(t,v,s);var o,a,c,l=0,h=0;if(y(e)){if(!q(e))return W(e)?Y(v,e):C.call(v,e);o=e,h=d(r,i);var g=e.byteLength;if(void 0===n){if(g%i)throw L(X);if(a=g-h,a<0)throw L(X)}else if(a=f(n)*i,a+h>g)throw L(X);c=a/i}else c=p(e),a=c*i,o=new U(a);M(t,{buffer:o,byteOffset:h,byteLength:a,length:c,view:new F(o)});while(l<c)E(t,l++)})),b&&b(v,H),m=v.prototype=w(j)),m.constructor!==v&&h(m,"constructor",v),N&&h(m,N,s),S[s]=v,n({global:!0,forced:v!=g,sham:!R},S),z in v||h(v,z,i),z in m||h(m,z,i),B(s)}):t.exports=function(){}},9824:function(t,e,r){"use strict";var n=r("b074"),o=r("cdcb"),i=r("0337"),a=r("429f"),s=r("4cce"),c=r("d50e"),u=r("60f3"),l=r("599d"),h=r("a4fc"),f=r("bad9"),p=r("dc77"),d=r("6d27"),g=r("5ee6"),v=r("a5e4e").f,m=r("3d27").f,y=r("06d7"),w=r("bfc8"),b=r("817b"),x=b.get,C=b.set,I="ArrayBuffer",B="DataView",S="prototype",A="Wrong length",O="Wrong index",T=n[I],k=T,M=n[B],P=M&&M[S],E=Object.prototype,_=n.RangeError,L=p.pack,U=p.unpack,F=function(t){return[255&t]},R=function(t){return[255&t,t>>8&255]},N=function(t){return[255&t,t>>8&255,t>>16&255,t>>24&255]},H=function(t){return t[3]<<24|t[2]<<16|t[1]<<8|t[0]},j=function(t){return L(t,23,4)},D=function(t){return L(t,52,8)},W=function(t,e){m(t[S],e,{get:function(){return x(this)[e]}})},z=function(t,e,r,n){var o=f(r),i=x(t);if(o+e>i.byteLength)throw _(O);var a=x(i.buffer).bytes,s=o+i.byteOffset,c=a.slice(s,s+e);return n?c:c.reverse()},X=function(t,e,r,n,o,i){var a=f(r),s=x(t);if(a+e>s.byteLength)throw _(O);for(var c=x(s.buffer).bytes,u=a+s.byteOffset,l=n(+o),h=0;h<e;h++)c[u+h]=l[i?h:e-h-1]};if(i){if(!c((function(){T(1)}))||!c((function(){new T(-1)}))||c((function(){return new T,new T(1.5),new T(NaN),T.name!=I}))){k=function(t){return u(this,k),new T(f(t))};for(var Y,G=k[S]=T[S],q=v(T),$=0;q.length>$;)(Y=q[$++])in k||a(k,Y,T[Y]);G.constructor=k}g&&d(P)!==E&&g(P,E);var V=new M(new k(2)),J=P.setInt8;V.setInt8(0,2147483648),V.setInt8(1,2147483649),!V.getInt8(0)&&V.getInt8(1)||s(P,{setInt8:function(t,e){J.call(this,t,e<<24>>24)},setUint8:function(t,e){J.call(this,t,e<<24>>24)}},{unsafe:!0})}else k=function(t){u(this,k,I);var e=f(t);C(this,{bytes:y.call(new Array(e),0),byteLength:e}),o||(this.byteLength=e)},M=function(t,e,r){u(this,M,B),u(t,k,B);var n=x(t).byteLength,i=l(e);if(i<0||i>n)throw _("Wrong offset");if(r=void 0===r?n-i:h(r),i+r>n)throw _(A);C(this,{buffer:t,byteLength:r,byteOffset:i}),o||(this.buffer=t,this.byteLength=r,this.byteOffset=i)},o&&(W(k,"byteLength"),W(M,"buffer"),W(M,"byteLength"),W(M,"byteOffset")),s(M[S],{getInt8:function(t){return z(this,1,t)[0]<<24>>24},getUint8:function(t){return z(this,1,t)[0]},getInt16:function(t){var e=z(this,2,t,arguments.length>1?arguments[1]:void 0);return(e[1]<<8|e[0])<<16>>16},getUint16:function(t){var e=z(this,2,t,arguments.length>1?arguments[1]:void 0);return e[1]<<8|e[0]},getInt32:function(t){return H(z(this,4,t,arguments.length>1?arguments[1]:void 0))},getUint32:function(t){return H(z(this,4,t,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(t){return U(z(this,4,t,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(t){return U(z(this,8,t,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(t,e){X(this,1,t,F,e)},setUint8:function(t,e){X(this,1,t,F,e)},setInt16:function(t,e){X(this,2,t,R,e,arguments.length>2?arguments[2]:void 0)},setUint16:function(t,e){X(this,2,t,R,e,arguments.length>2?arguments[2]:void 0)},setInt32:function(t,e){X(this,4,t,N,e,arguments.length>2?arguments[2]:void 0)},setUint32:function(t,e){X(this,4,t,N,e,arguments.length>2?arguments[2]:void 0)},setFloat32:function(t,e){X(this,4,t,j,e,arguments.length>2?arguments[2]:void 0)},setFloat64:function(t,e){X(this,8,t,D,e,arguments.length>2?arguments[2]:void 0)}});w(k,I),w(M,B),t.exports={ArrayBuffer:k,DataView:M}},"9d0d":function(t,e,r){var n=r("c71d"),o=r("8801"),i=r("57ad"),a=r("3d27").f;t.exports=function(t){var e=n.Symbol||(n.Symbol={});o(e,t)||a(e,t,{value:i.f(t)})}},"9d77":function(t,e){var r=Math.floor,n=function(t,e){var a=t.length,s=r(a/2);return a<8?o(t,e):i(n(t.slice(0,s),e),n(t.slice(s),e),e)},o=function(t,e){var r,n,o=t.length,i=1;while(i<o){n=i,r=t[i];while(n&&e(t[n-1],r)>0)t[n]=t[--n];n!==i++&&(t[n]=r)}return t},i=function(t,e,r){var n=t.length,o=e.length,i=0,a=0,s=[];while(i<n||a<o)i<n&&a<o?s.push(r(t[i],e[a])<=0?t[i++]:e[a++]):s.push(i<n?t[i++]:e[a++]);return s};t.exports=n},a2d3:function(t,e,r){"use strict";function n(t,e){return Object.prototype.hasOwnProperty.call(t,e)}t.exports=function(t,e,r,i){e=e||"&",r=r||"=";var a={};if("string"!==typeof t||0===t.length)return a;var s=/\+/g;t=t.split(e);var c=1e3;i&&"number"===typeof i.maxKeys&&(c=i.maxKeys);var u=t.length;c>0&&u>c&&(u=c);for(var l=0;l<u;++l){var h,f,p,d,g=t[l].replace(s,"%20"),v=g.indexOf(r);v>=0?(h=g.substr(0,v),f=g.substr(v+1)):(h=g,f=""),p=decodeURIComponent(h),d=decodeURIComponent(f),n(a,p)?o(a[p])?a[p].push(d):a[p]=[a[p],d]:a[p]=d}return a};var o=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)}},a6eb:function(t,e,r){var n=r("8018"),o=n.match(/firefox\/(\d+)/i);t.exports=!!o&&+o[1]},aa00:function(t,e,r){"use strict";var n=r("e450"),o=r("0f4e"),i=r("99f6"),a=r("bfff"),s=r("a4fc"),c=r("4b3a"),u=r("f342"),l=r("9bc6"),h=r("529c"),f=h("slice"),p=l("species"),d=[].slice,g=Math.max;n({target:"Array",proto:!0,forced:!f},{slice:function(t,e){var r,n,l,h=c(this),f=s(h.length),v=a(t,f),m=a(void 0===e?f:e,f);if(i(h)&&(r=h.constructor,"function"!=typeof r||r!==Array&&!i(r.prototype)?o(r)&&(r=r[p],null===r&&(r=void 0)):r=void 0,r===Array||void 0===r))return d.call(h,v,m);for(n=new(void 0===r?Array:r)(g(m-v,0)),l=0;v<m;v++,l++)v in h&&u(n,l,h[v]);return n.length=l,n}})},ab27:function(t,e,r){var n=r("9f69"),o=r("251b");t.exports=function(t,e,r,i){try{return i?e(n(r)[0],r[1]):e(r)}catch(a){throw o(t),a}}},ae16:function(t,e,r){"use strict";var n=r("4ae2"),o=r("a4fc"),i=r("bfff"),a=r("7f45"),s=n.aTypedArray,c=n.exportTypedArrayMethod;c("subarray",(function(t,e){var r=s(this),n=r.length,c=i(t,n);return new(a(r,r.constructor))(r.buffer,r.byteOffset+c*r.BYTES_PER_ELEMENT,o((void 0===e?n:i(e,n))-c))}))},af4c:function(t,e,r){"use strict";var n=r("4ae2"),o=n.aTypedArray,i=n.exportTypedArrayMethod,a=Math.floor;i("reverse",(function(){var t,e=this,r=o(e).length,n=a(r/2),i=0;while(i<n)t=e[i],e[i++]=e[--r],e[r]=t;return e}))},b1b2:function(t,e,r){"use strict";var n=r("4ae2").exportTypedArrayMethod,o=r("d50e"),i=r("b074"),a=i.Uint8Array,s=a&&a.prototype||{},c=[].toString,u=[].join;o((function(){c.call({})}))&&(c=function(){return u.call(this)});var l=s.toString!=c;n("toString",c,l)},b32b:function(t,e,r){"use strict";var n=r("14f4"),o=r("eb35"),i=r("ab27"),a=r("d41c"),s=r("a4fc"),c=r("f342"),u=r("1637");t.exports=function(t){var e,r,l,h,f,p,d=o(t),g="function"==typeof this?this:Array,v=arguments.length,m=v>1?arguments[1]:void 0,y=void 0!==m,w=u(d),b=0;if(y&&(m=n(m,v>2?arguments[2]:void 0,2)),void 0==w||g==Array&&a(w))for(e=s(d.length),r=new g(e);e>b;b++)p=y?m(d[b],b):d[b],c(r,b,p);else for(h=w.call(d),f=h.next,r=new g;!(l=f.call(h)).done;b++)p=y?i(h,m,[l.value,b],!0):l.value,c(r,b,p);return r.length=b,r}},b678:function(t,e,r){!function(e,r){t.exports=r()}(window,(function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=6)}([function(t,e,r){var n=r(2);"string"==typeof n&&(n=[[t.i,n,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};r(4)(n,o),n.locals&&(t.exports=n.locals)},function(t,e,r){"use strict";var n=r(0);r.n(n).a},function(t,e,r){(t.exports=r(3)(!1)).push([t.i,'\n.vue-cropper[data-v-6dae58fd] {\n position: relative;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n user-select: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n direction: ltr;\n touch-action: none;\n text-align: left;\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAAA3NCSVQICAjb4U/gAAAABlBMVEXMzMz////TjRV2AAAACXBIWXMAAArrAAAK6wGCiw1aAAAAHHRFWHRTb2Z0d2FyZQBBZG9iZSBGaXJld29ya3MgQ1M26LyyjAAAABFJREFUCJlj+M/AgBVhF/0PAH6/D/HkDxOGAAAAAElFTkSuQmCC");\n}\n.cropper-box[data-v-6dae58fd],\n.cropper-box-canvas[data-v-6dae58fd],\n.cropper-drag-box[data-v-6dae58fd],\n.cropper-crop-box[data-v-6dae58fd],\n.cropper-face[data-v-6dae58fd] {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n user-select: none;\n}\n.cropper-box-canvas img[data-v-6dae58fd] {\n position: relative;\n text-align: left;\n user-select: none;\n transform: none;\n max-width: none;\n max-height: none;\n}\n.cropper-box[data-v-6dae58fd] {\n overflow: hidden;\n}\n.cropper-move[data-v-6dae58fd] {\n cursor: move;\n}\n.cropper-crop[data-v-6dae58fd] {\n cursor: crosshair;\n}\n.cropper-modal[data-v-6dae58fd] {\n background: rgba(0, 0, 0, 0.5);\n}\n.cropper-crop-box[data-v-6dae58fd] {\n /*border: 2px solid #39f;*/\n}\n.cropper-view-box[data-v-6dae58fd] {\n display: block;\n overflow: hidden;\n width: 100%;\n height: 100%;\n outline: 1px solid #39f;\n outline-color: rgba(51, 153, 255, 0.75);\n user-select: none;\n}\n.cropper-view-box img[data-v-6dae58fd] {\n user-select: none;\n text-align: left;\n max-width: none;\n max-height: none;\n}\n.cropper-face[data-v-6dae58fd] {\n top: 0;\n left: 0;\n background-color: #fff;\n opacity: 0.1;\n}\n.crop-info[data-v-6dae58fd] {\n position: absolute;\n left: 0px;\n min-width: 65px;\n text-align: center;\n color: white;\n line-height: 20px;\n background-color: rgba(0, 0, 0, 0.8);\n font-size: 12px;\n}\n.crop-line[data-v-6dae58fd] {\n position: absolute;\n display: block;\n width: 100%;\n height: 100%;\n opacity: 0.1;\n}\n.line-w[data-v-6dae58fd] {\n top: -3px;\n left: 0;\n height: 5px;\n cursor: n-resize;\n}\n.line-a[data-v-6dae58fd] {\n top: 0;\n left: -3px;\n width: 5px;\n cursor: w-resize;\n}\n.line-s[data-v-6dae58fd] {\n bottom: -3px;\n left: 0;\n height: 5px;\n cursor: s-resize;\n}\n.line-d[data-v-6dae58fd] {\n top: 0;\n right: -3px;\n width: 5px;\n cursor: e-resize;\n}\n.crop-point[data-v-6dae58fd] {\n position: absolute;\n width: 8px;\n height: 8px;\n opacity: 0.75;\n background-color: #39f;\n border-radius: 100%;\n}\n.point1[data-v-6dae58fd] {\n top: -4px;\n left: -4px;\n cursor: nw-resize;\n}\n.point2[data-v-6dae58fd] {\n top: -5px;\n left: 50%;\n margin-left: -3px;\n cursor: n-resize;\n}\n.point3[data-v-6dae58fd] {\n top: -4px;\n right: -4px;\n cursor: ne-resize;\n}\n.point4[data-v-6dae58fd] {\n top: 50%;\n left: -4px;\n margin-top: -3px;\n cursor: w-resize;\n}\n.point5[data-v-6dae58fd] {\n top: 50%;\n right: -4px;\n margin-top: -3px;\n cursor: e-resize;\n}\n.point6[data-v-6dae58fd] {\n bottom: -5px;\n left: -4px;\n cursor: sw-resize;\n}\n.point7[data-v-6dae58fd] {\n bottom: -5px;\n left: 50%;\n margin-left: -3px;\n cursor: s-resize;\n}\n.point8[data-v-6dae58fd] {\n bottom: -5px;\n right: -4px;\n cursor: se-resize;\n}\n@media screen and (max-width: 500px) {\n.crop-point[data-v-6dae58fd] {\n position: absolute;\n width: 20px;\n height: 20px;\n opacity: 0.45;\n background-color: #39f;\n border-radius: 100%;\n}\n.point1[data-v-6dae58fd] {\n top: -10px;\n left: -10px;\n}\n.point2[data-v-6dae58fd],\n .point4[data-v-6dae58fd],\n .point5[data-v-6dae58fd],\n .point7[data-v-6dae58fd] {\n display: none;\n}\n.point3[data-v-6dae58fd] {\n top: -10px;\n right: -10px;\n}\n.point4[data-v-6dae58fd] {\n top: 0;\n left: 0;\n}\n.point6[data-v-6dae58fd] {\n bottom: -10px;\n left: -10px;\n}\n.point8[data-v-6dae58fd] {\n bottom: -10px;\n right: -10px;\n}\n}\n',""])},function(t,e){t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var r=function(t,e){var r=t[1]||"",n=t[3];if(!n)return r;if(e&&"function"==typeof btoa){var o=function(t){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(t))))+" */"}(n),i=n.sources.map((function(t){return"/*# sourceURL="+n.sourceRoot+t+" */"}));return[r].concat(i).concat([o]).join("\n")}return[r].join("\n")}(e,t);return e[2]?"@media "+e[2]+"{"+r+"}":r})).join("")},e.i=function(t,r){"string"==typeof t&&(t=[[null,t,""]]);for(var n={},o=0;o<this.length;o++){var i=this[o][0];"number"==typeof i&&(n[i]=!0)}for(o=0;o<t.length;o++){var a=t[o];"number"==typeof a[0]&&n[a[0]]||(r&&!a[2]?a[2]=r:r&&(a[2]="("+a[2]+") and ("+r+")"),e.push(a))}},e}},function(t,e,r){var n={},o=function(t){var e;return function(){return void 0===e&&(e=t.apply(this,arguments)),e}}((function(){return window&&document&&document.all&&!window.atob})),i=function(t){var e={};return function(t,r){if("function"==typeof t)return t();if(void 0===e[t]){var n=function(t,e){return e?e.querySelector(t):document.querySelector(t)}.call(this,t,r);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}e[t]=n}return e[t]}}(),a=null,s=0,c=[],u=r(5);function l(t,e){for(var r=0;r<t.length;r++){var o=t[r],i=n[o.id];if(i){i.refs++;for(var a=0;a<i.parts.length;a++)i.parts[a](o.parts[a]);for(;a<o.parts.length;a++)i.parts.push(v(o.parts[a],e))}else{var s=[];for(a=0;a<o.parts.length;a++)s.push(v(o.parts[a],e));n[o.id]={id:o.id,refs:1,parts:s}}}}function h(t,e){for(var r=[],n={},o=0;o<t.length;o++){var i=t[o],a=e.base?i[0]+e.base:i[0],s={css:i[1],media:i[2],sourceMap:i[3]};n[a]?n[a].parts.push(s):r.push(n[a]={id:a,parts:[s]})}return r}function f(t,e){var r=i(t.insertInto);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var n=c[c.length-1];if("top"===t.insertAt)n?n.nextSibling?r.insertBefore(e,n.nextSibling):r.appendChild(e):r.insertBefore(e,r.firstChild),c.push(e);else if("bottom"===t.insertAt)r.appendChild(e);else{if("object"!=typeof t.insertAt||!t.insertAt.before)throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");var o=i(t.insertAt.before,r);r.insertBefore(e,o)}}function p(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t);var e=c.indexOf(t);e>=0&&c.splice(e,1)}function d(t){var e=document.createElement("style");if(void 0===t.attrs.type&&(t.attrs.type="text/css"),void 0===t.attrs.nonce){var n=function(){return r.nc}();n&&(t.attrs.nonce=n)}return g(e,t.attrs),f(t,e),e}function g(t,e){Object.keys(e).forEach((function(r){t.setAttribute(r,e[r])}))}function v(t,e){var r,n,o,i;if(e.transform&&t.css){if(!(i="function"==typeof e.transform?e.transform(t.css):e.transform.default(t.css)))return function(){};t.css=i}if(e.singleton){var c=s++;r=a||(a=d(e)),n=y.bind(null,r,c,!1),o=y.bind(null,r,c,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(r=function(t){var e=document.createElement("link");return void 0===t.attrs.type&&(t.attrs.type="text/css"),t.attrs.rel="stylesheet",g(e,t.attrs),f(t,e),e}(e),n=function(t,e,r){var n=r.css,o=r.sourceMap,i=void 0===e.convertToAbsoluteUrls&&o;(e.convertToAbsoluteUrls||i)&&(n=u(n)),o&&(n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */");var a=new Blob([n],{type:"text/css"}),s=t.href;t.href=URL.createObjectURL(a),s&&URL.revokeObjectURL(s)}.bind(null,r,e),o=function(){p(r),r.href&&URL.revokeObjectURL(r.href)}):(r=d(e),n=function(t,e){var r=e.css,n=e.media;if(n&&t.setAttribute("media",n),t.styleSheet)t.styleSheet.cssText=r;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(r))}}.bind(null,r),o=function(){p(r)});return n(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;n(t=e)}else o()}}t.exports=function(t,e){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(e=e||{}).attrs="object"==typeof e.attrs?e.attrs:{},e.singleton||"boolean"==typeof e.singleton||(e.singleton=o()),e.insertInto||(e.insertInto="head"),e.insertAt||(e.insertAt="bottom");var r=h(t,e);return l(r,e),function(t){for(var o=[],i=0;i<r.length;i++){var a=r[i];(s=n[a.id]).refs--,o.push(s)}for(t&&l(h(t,e),e),i=0;i<o.length;i++){var s;if(0===(s=o[i]).refs){for(var c=0;c<s.parts.length;c++)s.parts[c]();delete n[s.id]}}}};var m=function(){var t=[];return function(e,r){return t[e]=r,t.filter(Boolean).join("\n")}}();function y(t,e,r,n){var o=r?"":n.css;if(t.styleSheet)t.styleSheet.cssText=m(e,o);else{var i=document.createTextNode(o),a=t.childNodes;a[e]&&t.removeChild(a[e]),a.length?t.insertBefore(i,a[e]):t.appendChild(i)}}},function(t,e){t.exports=function(t){var e="undefined"!=typeof window&&window.location;if(!e)throw new Error("fixUrls requires window.location");if(!t||"string"!=typeof t)return t;var r=e.protocol+"//"+e.host,n=r+e.pathname.replace(/\/[^\/]*$/,"/");return t.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,(function(t,e){var o,i=e.trim().replace(/^"(.*)"$/,(function(t,e){return e})).replace(/^'(.*)'$/,(function(t,e){return e}));return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(i)?t:(o=0===i.indexOf("//")?i:0===i.indexOf("/")?r+i:n+i.replace(/^\.\//,""),"url("+JSON.stringify(o)+")")}))}},function(t,e,r){"use strict";r.r(e);var n=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{ref:"cropper",staticClass:"vue-cropper",on:{mouseover:t.scaleImg,mouseout:t.cancelScale}},[t.imgs?r("div",{staticClass:"cropper-box"},[r("div",{directives:[{name:"show",rawName:"v-show",value:!t.loading,expression:"!loading"}],staticClass:"cropper-box-canvas",style:{width:t.trueWidth+"px",height:t.trueHeight+"px",transform:"scale("+t.scale+","+t.scale+") translate3d("+t.x/t.scale+"px,"+t.y/t.scale+"px,0)rotateZ("+90*t.rotate+"deg)"}},[r("img",{ref:"cropperImg",attrs:{src:t.imgs,alt:"cropper-img"}})])]):t._e(),t._v(" "),r("div",{staticClass:"cropper-drag-box",class:{"cropper-move":t.move&&!t.crop,"cropper-crop":t.crop,"cropper-modal":t.cropping},on:{mousedown:t.startMove,touchstart:t.startMove}}),t._v(" "),r("div",{directives:[{name:"show",rawName:"v-show",value:t.cropping,expression:"cropping"}],staticClass:"cropper-crop-box",style:{width:t.cropW+"px",height:t.cropH+"px",transform:"translate3d("+t.cropOffsertX+"px,"+t.cropOffsertY+"px,0)"}},[r("span",{staticClass:"cropper-view-box"},[r("img",{style:{width:t.trueWidth+"px",height:t.trueHeight+"px",transform:"scale("+t.scale+","+t.scale+") translate3d("+(t.x-t.cropOffsertX)/t.scale+"px,"+(t.y-t.cropOffsertY)/t.scale+"px,0)rotateZ("+90*t.rotate+"deg)"},attrs:{src:t.imgs,alt:"cropper-img"}})]),t._v(" "),r("span",{staticClass:"cropper-face cropper-move",on:{mousedown:t.cropMove,touchstart:t.cropMove}}),t._v(" "),t.info?r("span",{staticClass:"crop-info",style:{top:t.cropInfo.top}},[t._v(t._s(this.cropInfo.width)+" × "+t._s(this.cropInfo.height))]):t._e(),t._v(" "),t.fixedBox?t._e():r("span",[r("span",{staticClass:"crop-line line-w",on:{mousedown:function(e){t.changeCropSize(e,!1,!0,0,1)},touchstart:function(e){t.changeCropSize(e,!1,!0,0,1)}}}),t._v(" "),r("span",{staticClass:"crop-line line-a",on:{mousedown:function(e){t.changeCropSize(e,!0,!1,1,0)},touchstart:function(e){t.changeCropSize(e,!0,!1,1,0)}}}),t._v(" "),r("span",{staticClass:"crop-line line-s",on:{mousedown:function(e){t.changeCropSize(e,!1,!0,0,2)},touchstart:function(e){t.changeCropSize(e,!1,!0,0,2)}}}),t._v(" "),r("span",{staticClass:"crop-line line-d",on:{mousedown:function(e){t.changeCropSize(e,!0,!1,2,0)},touchstart:function(e){t.changeCropSize(e,!0,!1,2,0)}}}),t._v(" "),r("span",{staticClass:"crop-point point1",on:{mousedown:function(e){t.changeCropSize(e,!0,!0,1,1)},touchstart:function(e){t.changeCropSize(e,!0,!0,1,1)}}}),t._v(" "),r("span",{staticClass:"crop-point point2",on:{mousedown:function(e){t.changeCropSize(e,!1,!0,0,1)},touchstart:function(e){t.changeCropSize(e,!1,!0,0,1)}}}),t._v(" "),r("span",{staticClass:"crop-point point3",on:{mousedown:function(e){t.changeCropSize(e,!0,!0,2,1)},touchstart:function(e){t.changeCropSize(e,!0,!0,2,1)}}}),t._v(" "),r("span",{staticClass:"crop-point point4",on:{mousedown:function(e){t.changeCropSize(e,!0,!1,1,0)},touchstart:function(e){t.changeCropSize(e,!0,!1,1,0)}}}),t._v(" "),r("span",{staticClass:"crop-point point5",on:{mousedown:function(e){t.changeCropSize(e,!0,!1,2,0)},touchstart:function(e){t.changeCropSize(e,!0,!1,2,0)}}}),t._v(" "),r("span",{staticClass:"crop-point point6",on:{mousedown:function(e){t.changeCropSize(e,!0,!0,1,2)},touchstart:function(e){t.changeCropSize(e,!0,!0,1,2)}}}),t._v(" "),r("span",{staticClass:"crop-point point7",on:{mousedown:function(e){t.changeCropSize(e,!1,!0,0,2)},touchstart:function(e){t.changeCropSize(e,!1,!0,0,2)}}}),t._v(" "),r("span",{staticClass:"crop-point point8",on:{mousedown:function(e){t.changeCropSize(e,!0,!0,2,2)},touchstart:function(e){t.changeCropSize(e,!0,!0,2,2)}}})])])])};n._withStripped=!0;var o={getData:function(t){return new Promise((function(e,r){var n={};(function(t){var e=null;return new Promise((function(r,n){if(t.src)if(/^data\:/i.test(t.src))e=function(t){t=t.replace(/^data\:([^\;]+)\;base64,/gim,"");for(var e=atob(t),r=e.length,n=new ArrayBuffer(r),o=new Uint8Array(n),i=0;i<r;i++)o[i]=e.charCodeAt(i);return n}(t.src),r(e);else if(/^blob\:/i.test(t.src)){var o=new FileReader;o.onload=function(t){e=t.target.result,r(e)},function(t,e){var r=new XMLHttpRequest;r.open("GET",t,!0),r.responseType="blob",r.onload=function(t){200!=this.status&&0!==this.status||e(this.response)},r.send()}(t.src,(function(t){o.readAsArrayBuffer(t)}))}else{var i=new XMLHttpRequest;i.onload=function(){if(200!=this.status&&0!==this.status)throw"Could not load image";e=i.response,r(e),i=null},i.open("GET",t.src,!0),i.responseType="arraybuffer",i.send(null)}else n("img error")}))})(t).then((function(t){n.arrayBuffer=t,n.orientation=function(t){var e,r,n,o,i,a,s,c,u,l=new DataView(t),h=l.byteLength;if(255===l.getUint8(0)&&216===l.getUint8(1))for(c=2;c<h;){if(255===l.getUint8(c)&&225===l.getUint8(c+1)){a=c;break}c++}if(a&&(r=a+10,"Exif"===function(t,e,r){var n,o="";for(n=e,r+=e;n<r;n++)o+=String.fromCharCode(t.getUint8(n));return o}(l,a+4,4)&&(i=l.getUint16(r),((o=18761===i)||19789===i)&&42===l.getUint16(r+2,o)&&(n=l.getUint32(r+4,o))>=8&&(s=r+n))),s)for(h=l.getUint16(s,o),u=0;u<h;u++)if(c=s+12*u+2,274===l.getUint16(c,o)){c+=8,e=l.getUint16(c,o);break}return e}(t),e(n)})).catch((function(t){r(t)}))}))}},i=o,a={data:function(){return{w:0,h:0,scale:1,x:0,y:0,loading:!0,trueWidth:0,trueHeight:0,move:!0,moveX:0,moveY:0,crop:!1,cropping:!1,cropW:0,cropH:0,cropOldW:0,cropOldH:0,canChangeX:!1,canChangeY:!1,changeCropTypeX:1,changeCropTypeY:1,cropX:0,cropY:0,cropChangeX:0,cropChangeY:0,cropOffsertX:0,cropOffsertY:0,support:"",touches:[],touchNow:!1,rotate:0,isIos:!1,orientation:0,imgs:"",coe:.2,scaling:!1,scalingSet:"",coeStatus:"",isCanShow:!0}},props:{img:{type:[String,Blob,null,File],default:""},outputSize:{type:Number,default:1},outputType:{type:String,default:"jpeg"},info:{type:Boolean,default:!0},canScale:{type:Boolean,default:!0},autoCrop:{type:Boolean,default:!1},autoCropWidth:{type:[Number,String],default:0},autoCropHeight:{type:[Number,String],default:0},fixed:{type:Boolean,default:!1},fixedNumber:{type:Array,default:function(){return[1,1]}},fixedBox:{type:Boolean,default:!1},full:{type:Boolean,default:!1},canMove:{type:Boolean,default:!0},canMoveBox:{type:Boolean,default:!0},original:{type:Boolean,default:!1},centerBox:{type:Boolean,default:!1},high:{type:Boolean,default:!0},infoTrue:{type:Boolean,default:!1},maxImgSize:{type:[Number,String],default:2e3},enlarge:{type:[Number,String],default:1},preW:{type:[Number,String],default:0},mode:{type:String,default:"contain"},limitMinSize:{type:[Number,Array,String],default:function(){return 10}}},computed:{cropInfo:function(){var t={};if(t.top=this.cropOffsertY>21?"-21px":"0px",t.width=this.cropW>0?this.cropW:0,t.height=this.cropH>0?this.cropH:0,this.infoTrue){var e=1;this.high&&!this.full&&(e=window.devicePixelRatio),1!==this.enlarge&!this.full&&(e=Math.abs(Number(this.enlarge))),t.width=t.width*e,t.height=t.height*e,this.full&&(t.width=t.width/this.scale,t.height=t.height/this.scale)}return t.width=t.width.toFixed(0),t.height=t.height.toFixed(0),t},isIE:function(){navigator.userAgent;var t=!!window.ActiveXObject||"ActiveXObject"in window;return t},passive:function(){return this.isIE?null:{passive:!1}}},watch:{img:function(){this.checkedImg()},imgs:function(t){""!==t&&this.reload()},cropW:function(){this.showPreview()},cropH:function(){this.showPreview()},cropOffsertX:function(){this.showPreview()},cropOffsertY:function(){this.showPreview()},scale:function(t,e){this.showPreview()},x:function(){this.showPreview()},y:function(){this.showPreview()},autoCrop:function(t){t&&this.goAutoCrop()},autoCropWidth:function(){this.autoCrop&&this.goAutoCrop()},autoCropHeight:function(){this.autoCrop&&this.goAutoCrop()},mode:function(){this.checkedImg()},rotate:function(){this.showPreview(),(this.autoCrop||this.cropW>0||this.cropH>0)&&this.goAutoCrop(this.cropW,this.cropH)}},methods:{getVersion:function(t){for(var e=navigator.userAgent.split(" "),r="",n=new RegExp(t,"i"),o=0;o<e.length;o++)n.test(e[o])&&(r=e[o]);return r?r.split("/")[1].split("."):["0","0","0"]},checkOrientationImage:function(t,e,r,n){var o=this;if(this.getVersion("chrome")[0]>=81)e=-1;else if(this.getVersion("safari")[0]>=605){var i=this.getVersion("version");i[0]>13&&i[1]>1&&(e=-1)}else{var a=navigator.userAgent.toLowerCase().match(/cpu iphone os (.*?) like mac os/);if(a){var s=a[1];((s=s.split("_"))[0]>13||s[0]>=13&&s[1]>=4)&&(e=-1)}}var c=document.createElement("canvas"),u=c.getContext("2d");switch(u.save(),e){case 2:c.width=r,c.height=n,u.translate(r,0),u.scale(-1,1);break;case 3:c.width=r,c.height=n,u.translate(r/2,n/2),u.rotate(180*Math.PI/180),u.translate(-r/2,-n/2);break;case 4:c.width=r,c.height=n,u.translate(0,n),u.scale(1,-1);break;case 5:c.height=r,c.width=n,u.rotate(.5*Math.PI),u.scale(1,-1);break;case 6:c.width=n,c.height=r,u.translate(n/2,r/2),u.rotate(90*Math.PI/180),u.translate(-r/2,-n/2);break;case 7:c.height=r,c.width=n,u.rotate(.5*Math.PI),u.translate(r,-n),u.scale(-1,1);break;case 8:c.height=r,c.width=n,u.translate(n/2,r/2),u.rotate(-90*Math.PI/180),u.translate(-r/2,-n/2);break;default:c.width=r,c.height=n}u.drawImage(t,0,0,r,n),u.restore(),c.toBlob((function(t){var e=URL.createObjectURL(t);URL.revokeObjectURL(o.imgs),o.imgs=e}),"image/"+this.outputType,1)},checkedImg:function(){var t=this;if(null===this.img||""===this.img)return this.imgs="",void this.clearCrop();this.loading=!0,this.scale=1,this.rotate=0,this.clearCrop();var e=new Image;if(e.onload=function(){if(""===t.img)return t.$emit("imgLoad","error"),t.$emit("img-load","error"),!1;var r=e.width,n=e.height;i.getData(e).then((function(o){t.orientation=o.orientation||1;var i=Number(t.maxImgSize);!t.orientation&&r<i&n<i?t.imgs=t.img:(r>i&&(n=n/r*i,r=i),n>i&&(r=r/n*i,n=i),t.checkOrientationImage(e,t.orientation,r,n))}))},e.onerror=function(){t.$emit("imgLoad","error"),t.$emit("img-load","error")},"data"!==this.img.substr(0,4)&&(e.crossOrigin=""),this.isIE){var r=new XMLHttpRequest;r.onload=function(){var t=URL.createObjectURL(this.response);e.src=t},r.open("GET",this.img,!0),r.responseType="blob",r.send()}else e.src=this.img},startMove:function(t){if(t.preventDefault(),this.move&&!this.crop){if(!this.canMove)return!1;this.moveX=("clientX"in t?t.clientX:t.touches[0].clientX)-this.x,this.moveY=("clientY"in t?t.clientY:t.touches[0].clientY)-this.y,t.touches?(window.addEventListener("touchmove",this.moveImg),window.addEventListener("touchend",this.leaveImg),2==t.touches.length&&(this.touches=t.touches,window.addEventListener("touchmove",this.touchScale),window.addEventListener("touchend",this.cancelTouchScale))):(window.addEventListener("mousemove",this.moveImg),window.addEventListener("mouseup",this.leaveImg)),this.$emit("imgMoving",{moving:!0,axis:this.getImgAxis()}),this.$emit("img-moving",{moving:!0,axis:this.getImgAxis()})}else this.cropping=!0,window.addEventListener("mousemove",this.createCrop),window.addEventListener("mouseup",this.endCrop),window.addEventListener("touchmove",this.createCrop),window.addEventListener("touchend",this.endCrop),this.cropOffsertX=t.offsetX?t.offsetX:t.touches[0].pageX-this.$refs.cropper.offsetLeft,this.cropOffsertY=t.offsetY?t.offsetY:t.touches[0].pageY-this.$refs.cropper.offsetTop,this.cropX="clientX"in t?t.clientX:t.touches[0].clientX,this.cropY="clientY"in t?t.clientY:t.touches[0].clientY,this.cropChangeX=this.cropOffsertX,this.cropChangeY=this.cropOffsertY,this.cropW=0,this.cropH=0},touchScale:function(t){var e=this;t.preventDefault();var r=this.scale,n=this.touches[0].clientX,o=this.touches[0].clientY,i=t.touches[0].clientX,a=t.touches[0].clientY,s=this.touches[1].clientX,c=this.touches[1].clientY,u=t.touches[1].clientX,l=t.touches[1].clientY,h=Math.sqrt(Math.pow(n-s,2)+Math.pow(o-c,2)),f=Math.sqrt(Math.pow(i-u,2)+Math.pow(a-l,2))-h,p=1,d=(p=(p=p/this.trueWidth>p/this.trueHeight?p/this.trueHeight:p/this.trueWidth)>.1?.1:p)*f;if(!this.touchNow){if(this.touchNow=!0,f>0?r+=Math.abs(d):f<0&&r>Math.abs(d)&&(r-=Math.abs(d)),this.touches=t.touches,setTimeout((function(){e.touchNow=!1}),8),!this.checkoutImgAxis(this.x,this.y,r))return!1;this.scale=r}},cancelTouchScale:function(t){window.removeEventListener("touchmove",this.touchScale)},moveImg:function(t){var e=this;if(t.preventDefault(),t.touches&&2===t.touches.length)return this.touches=t.touches,window.addEventListener("touchmove",this.touchScale),window.addEventListener("touchend",this.cancelTouchScale),window.removeEventListener("touchmove",this.moveImg),!1;var r,n,o="clientX"in t?t.clientX:t.touches[0].clientX,i="clientY"in t?t.clientY:t.touches[0].clientY;r=o-this.moveX,n=i-this.moveY,this.$nextTick((function(){if(e.centerBox){var t,o,i,a,s=e.getImgAxis(r,n,e.scale),c=e.getCropAxis(),u=e.trueHeight*e.scale,l=e.trueWidth*e.scale;switch(e.rotate){case 1:case-1:case 3:case-3:t=e.cropOffsertX-e.trueWidth*(1-e.scale)/2+(u-l)/2,o=e.cropOffsertY-e.trueHeight*(1-e.scale)/2+(l-u)/2,i=t-u+e.cropW,a=o-l+e.cropH;break;default:t=e.cropOffsertX-e.trueWidth*(1-e.scale)/2,o=e.cropOffsertY-e.trueHeight*(1-e.scale)/2,i=t-l+e.cropW,a=o-u+e.cropH}s.x1>=c.x1&&(r=t),s.y1>=c.y1&&(n=o),s.x2<=c.x2&&(r=i),s.y2<=c.y2&&(n=a)}e.x=r,e.y=n,e.$emit("imgMoving",{moving:!0,axis:e.getImgAxis()}),e.$emit("img-moving",{moving:!0,axis:e.getImgAxis()})}))},leaveImg:function(t){window.removeEventListener("mousemove",this.moveImg),window.removeEventListener("touchmove",this.moveImg),window.removeEventListener("mouseup",this.leaveImg),window.removeEventListener("touchend",this.leaveImg),this.$emit("imgMoving",{moving:!1,axis:this.getImgAxis()}),this.$emit("img-moving",{moving:!1,axis:this.getImgAxis()})},scaleImg:function(){this.canScale&&window.addEventListener(this.support,this.changeSize,this.passive)},cancelScale:function(){this.canScale&&window.removeEventListener(this.support,this.changeSize)},changeSize:function(t){var e=this;t.preventDefault();var r=this.scale,n=t.deltaY||t.wheelDelta;n=navigator.userAgent.indexOf("Firefox")>0?30*n:n,this.isIE&&(n=-n);var o=this.coe,i=(o=o/this.trueWidth>o/this.trueHeight?o/this.trueHeight:o/this.trueWidth)*n;i<0?r+=Math.abs(i):r>Math.abs(i)&&(r-=Math.abs(i));var a=i<0?"add":"reduce";if(a!==this.coeStatus&&(this.coeStatus=a,this.coe=.2),this.scaling||(this.scalingSet=setTimeout((function(){e.scaling=!1,e.coe=e.coe+=.01}),50)),this.scaling=!0,!this.checkoutImgAxis(this.x,this.y,r))return!1;this.scale=r},changeScale:function(t){var e=this.scale;t=t||1;var r=20;if((t*=r=r/this.trueWidth>r/this.trueHeight?r/this.trueHeight:r/this.trueWidth)>0?e+=Math.abs(t):e>Math.abs(t)&&(e-=Math.abs(t)),!this.checkoutImgAxis(this.x,this.y,e))return!1;this.scale=e},createCrop:function(t){var e=this;t.preventDefault();var r="clientX"in t?t.clientX:t.touches?t.touches[0].clientX:0,n="clientY"in t?t.clientY:t.touches?t.touches[0].clientY:0;this.$nextTick((function(){var t=r-e.cropX,o=n-e.cropY;if(t>0?(e.cropW=t+e.cropChangeX>e.w?e.w-e.cropChangeX:t,e.cropOffsertX=e.cropChangeX):(e.cropW=e.w-e.cropChangeX+Math.abs(t)>e.w?e.cropChangeX:Math.abs(t),e.cropOffsertX=e.cropChangeX+t>0?e.cropChangeX+t:0),e.fixed){var i=e.cropW/e.fixedNumber[0]*e.fixedNumber[1];i+e.cropOffsertY>e.h?(e.cropH=e.h-e.cropOffsertY,e.cropW=e.cropH/e.fixedNumber[1]*e.fixedNumber[0],e.cropOffsertX=t>0?e.cropChangeX:e.cropChangeX-e.cropW):e.cropH=i,e.cropOffsertY=e.cropOffsertY}else o>0?(e.cropH=o+e.cropChangeY>e.h?e.h-e.cropChangeY:o,e.cropOffsertY=e.cropChangeY):(e.cropH=e.h-e.cropChangeY+Math.abs(o)>e.h?e.cropChangeY:Math.abs(o),e.cropOffsertY=e.cropChangeY+o>0?e.cropChangeY+o:0)}))},changeCropSize:function(t,e,r,n,o){t.preventDefault(),window.addEventListener("mousemove",this.changeCropNow),window.addEventListener("mouseup",this.changeCropEnd),window.addEventListener("touchmove",this.changeCropNow),window.addEventListener("touchend",this.changeCropEnd),this.canChangeX=e,this.canChangeY=r,this.changeCropTypeX=n,this.changeCropTypeY=o,this.cropX="clientX"in t?t.clientX:t.touches[0].clientX,this.cropY="clientY"in t?t.clientY:t.touches[0].clientY,this.cropOldW=this.cropW,this.cropOldH=this.cropH,this.cropChangeX=this.cropOffsertX,this.cropChangeY=this.cropOffsertY,this.fixed&&this.canChangeX&&this.canChangeY&&(this.canChangeY=0),this.$emit("change-crop-size",{width:this.cropW,height:this.cropH})},changeCropNow:function(t){var e=this;t.preventDefault();var r="clientX"in t?t.clientX:t.touches?t.touches[0].clientX:0,n="clientY"in t?t.clientY:t.touches?t.touches[0].clientY:0,o=this.w,i=this.h,a=0,s=0;if(this.centerBox){var c=this.getImgAxis(),u=c.x2,l=c.y2;a=c.x1>0?c.x1:0,s=c.y1>0?c.y1:0,o>u&&(o=u),i>l&&(i=l)}this.$nextTick((function(){var t=r-e.cropX,c=n-e.cropY;if(e.canChangeX&&(1===e.changeCropTypeX?e.cropOldW-t>0?(e.cropW=o-e.cropChangeX-t<=o-a?e.cropOldW-t:e.cropOldW+e.cropChangeX-a,e.cropOffsertX=o-e.cropChangeX-t<=o-a?e.cropChangeX+t:a):(e.cropW=Math.abs(t)+e.cropChangeX<=o?Math.abs(t)-e.cropOldW:o-e.cropOldW-e.cropChangeX,e.cropOffsertX=e.cropChangeX+e.cropOldW):2===e.changeCropTypeX&&(e.cropOldW+t>0?(e.cropW=e.cropOldW+t+e.cropOffsertX<=o?e.cropOldW+t:o-e.cropOffsertX,e.cropOffsertX=e.cropChangeX):(e.cropW=o-e.cropChangeX+Math.abs(t+e.cropOldW)<=o-a?Math.abs(t+e.cropOldW):e.cropChangeX-a,e.cropOffsertX=o-e.cropChangeX+Math.abs(t+e.cropOldW)<=o-a?e.cropChangeX-Math.abs(t+e.cropOldW):a))),e.canChangeY&&(1===e.changeCropTypeY?e.cropOldH-c>0?(e.cropH=i-e.cropChangeY-c<=i-s?e.cropOldH-c:e.cropOldH+e.cropChangeY-s,e.cropOffsertY=i-e.cropChangeY-c<=i-s?e.cropChangeY+c:s):(e.cropH=Math.abs(c)+e.cropChangeY<=i?Math.abs(c)-e.cropOldH:i-e.cropOldH-e.cropChangeY,e.cropOffsertY=e.cropChangeY+e.cropOldH):2===e.changeCropTypeY&&(e.cropOldH+c>0?(e.cropH=e.cropOldH+c+e.cropOffsertY<=i?e.cropOldH+c:i-e.cropOffsertY,e.cropOffsertY=e.cropChangeY):(e.cropH=i-e.cropChangeY+Math.abs(c+e.cropOldH)<=i-s?Math.abs(c+e.cropOldH):e.cropChangeY-s,e.cropOffsertY=i-e.cropChangeY+Math.abs(c+e.cropOldH)<=i-s?e.cropChangeY-Math.abs(c+e.cropOldH):s))),e.canChangeX&&e.fixed){var u=e.cropW/e.fixedNumber[0]*e.fixedNumber[1];u+e.cropOffsertY>i?(e.cropH=i-e.cropOffsertY,e.cropW=e.cropH/e.fixedNumber[1]*e.fixedNumber[0]):e.cropH=u}if(e.canChangeY&&e.fixed){var l=e.cropH/e.fixedNumber[1]*e.fixedNumber[0];l+e.cropOffsertX>o?(e.cropW=o-e.cropOffsertX,e.cropH=e.cropW/e.fixedNumber[0]*e.fixedNumber[1]):e.cropW=l}}))},checkCropLimitSize:function(){this.cropW,this.cropH;var t=this.limitMinSize,e=new Array;return e=Array.isArray[t]?t:[t,t],[parseFloat(e[0]),parseFloat(e[1])]},changeCropEnd:function(t){window.removeEventListener("mousemove",this.changeCropNow),window.removeEventListener("mouseup",this.changeCropEnd),window.removeEventListener("touchmove",this.changeCropNow),window.removeEventListener("touchend",this.changeCropEnd)},endCrop:function(){0===this.cropW&&0===this.cropH&&(this.cropping=!1),window.removeEventListener("mousemove",this.createCrop),window.removeEventListener("mouseup",this.endCrop),window.removeEventListener("touchmove",this.createCrop),window.removeEventListener("touchend",this.endCrop)},startCrop:function(){this.crop=!0},stopCrop:function(){this.crop=!1},clearCrop:function(){this.cropping=!1,this.cropW=0,this.cropH=0},cropMove:function(t){if(t.preventDefault(),!this.canMoveBox)return this.crop=!1,this.startMove(t),!1;if(t.touches&&2===t.touches.length)return this.crop=!1,this.startMove(t),this.leaveCrop(),!1;window.addEventListener("mousemove",this.moveCrop),window.addEventListener("mouseup",this.leaveCrop),window.addEventListener("touchmove",this.moveCrop),window.addEventListener("touchend",this.leaveCrop);var e,r,n="clientX"in t?t.clientX:t.touches[0].clientX,o="clientY"in t?t.clientY:t.touches[0].clientY;e=n-this.cropOffsertX,r=o-this.cropOffsertY,this.cropX=e,this.cropY=r,this.$emit("cropMoving",{moving:!0,axis:this.getCropAxis()}),this.$emit("crop-moving",{moving:!0,axis:this.getCropAxis()})},moveCrop:function(t,e){var r=this,n=0,o=0;t&&(t.preventDefault(),n="clientX"in t?t.clientX:t.touches[0].clientX,o="clientY"in t?t.clientY:t.touches[0].clientY),this.$nextTick((function(){var t,i,a=n-r.cropX,s=o-r.cropY;if(e&&(a=r.cropOffsertX,s=r.cropOffsertY),t=a<=0?0:a+r.cropW>r.w?r.w-r.cropW:a,i=s<=0?0:s+r.cropH>r.h?r.h-r.cropH:s,r.centerBox){var c=r.getImgAxis();t<=c.x1&&(t=c.x1),t+r.cropW>c.x2&&(t=c.x2-r.cropW),i<=c.y1&&(i=c.y1),i+r.cropH>c.y2&&(i=c.y2-r.cropH)}r.cropOffsertX=t,r.cropOffsertY=i,r.$emit("cropMoving",{moving:!0,axis:r.getCropAxis()}),r.$emit("crop-moving",{moving:!0,axis:r.getCropAxis()})}))},getImgAxis:function(t,e,r){t=t||this.x,e=e||this.y,r=r||this.scale;var n={x1:0,x2:0,y1:0,y2:0},o=this.trueWidth*r,i=this.trueHeight*r;switch(this.rotate){case 0:n.x1=t+this.trueWidth*(1-r)/2,n.x2=n.x1+this.trueWidth*r,n.y1=e+this.trueHeight*(1-r)/2,n.y2=n.y1+this.trueHeight*r;break;case 1:case-1:case 3:case-3:n.x1=t+this.trueWidth*(1-r)/2+(o-i)/2,n.x2=n.x1+this.trueHeight*r,n.y1=e+this.trueHeight*(1-r)/2+(i-o)/2,n.y2=n.y1+this.trueWidth*r;break;default:n.x1=t+this.trueWidth*(1-r)/2,n.x2=n.x1+this.trueWidth*r,n.y1=e+this.trueHeight*(1-r)/2,n.y2=n.y1+this.trueHeight*r}return n},getCropAxis:function(){var t={x1:0,x2:0,y1:0,y2:0};return t.x1=this.cropOffsertX,t.x2=t.x1+this.cropW,t.y1=this.cropOffsertY,t.y2=t.y1+this.cropH,t},leaveCrop:function(t){window.removeEventListener("mousemove",this.moveCrop),window.removeEventListener("mouseup",this.leaveCrop),window.removeEventListener("touchmove",this.moveCrop),window.removeEventListener("touchend",this.leaveCrop),this.$emit("cropMoving",{moving:!1,axis:this.getCropAxis()}),this.$emit("crop-moving",{moving:!1,axis:this.getCropAxis()})},getCropChecked:function(t){var e=this,r=document.createElement("canvas"),n=new Image,o=this.rotate,i=this.trueWidth,a=this.trueHeight,s=this.cropOffsertX,c=this.cropOffsertY;function u(t,e){r.width=Math.round(t),r.height=Math.round(e)}n.onload=function(){if(0!==e.cropW){var l=r.getContext("2d"),h=1;e.high&!e.full&&(h=window.devicePixelRatio),1!==e.enlarge&!e.full&&(h=Math.abs(Number(e.enlarge)));var f=e.cropW*h,p=e.cropH*h,d=i*e.scale*h,g=a*e.scale*h,v=(e.x-s+e.trueWidth*(1-e.scale)/2)*h,m=(e.y-c+e.trueHeight*(1-e.scale)/2)*h;switch(u(f,p),l.save(),o){case 0:e.full?(u(f/e.scale,p/e.scale),l.drawImage(n,v/e.scale,m/e.scale,d/e.scale,g/e.scale)):l.drawImage(n,v,m,d,g);break;case 1:case-3:e.full?(u(f/e.scale,p/e.scale),v=v/e.scale+(d/e.scale-g/e.scale)/2,m=m/e.scale+(g/e.scale-d/e.scale)/2,l.rotate(90*o*Math.PI/180),l.drawImage(n,m,-v-g/e.scale,d/e.scale,g/e.scale)):(v+=(d-g)/2,m+=(g-d)/2,l.rotate(90*o*Math.PI/180),l.drawImage(n,m,-v-g,d,g));break;case 2:case-2:e.full?(u(f/e.scale,p/e.scale),l.rotate(90*o*Math.PI/180),v/=e.scale,m/=e.scale,l.drawImage(n,-v-d/e.scale,-m-g/e.scale,d/e.scale,g/e.scale)):(l.rotate(90*o*Math.PI/180),l.drawImage(n,-v-d,-m-g,d,g));break;case 3:case-1:e.full?(u(f/e.scale,p/e.scale),v=v/e.scale+(d/e.scale-g/e.scale)/2,m=m/e.scale+(g/e.scale-d/e.scale)/2,l.rotate(90*o*Math.PI/180),l.drawImage(n,-m-d/e.scale,v,d/e.scale,g/e.scale)):(v+=(d-g)/2,m+=(g-d)/2,l.rotate(90*o*Math.PI/180),l.drawImage(n,-m-d,v,d,g));break;default:e.full?(u(f/e.scale,p/e.scale),l.drawImage(n,v/e.scale,m/e.scale,d/e.scale,g/e.scale)):l.drawImage(n,v,m,d,g)}l.restore()}else{var y=i*e.scale,w=a*e.scale,b=r.getContext("2d");switch(b.save(),o){case 0:u(y,w),b.drawImage(n,0,0,y,w);break;case 1:case-3:u(w,y),b.rotate(90*o*Math.PI/180),b.drawImage(n,0,-w,y,w);break;case 2:case-2:u(y,w),b.rotate(90*o*Math.PI/180),b.drawImage(n,-y,-w,y,w);break;case 3:case-1:u(w,y),b.rotate(90*o*Math.PI/180),b.drawImage(n,-y,0,y,w);break;default:u(y,w),b.drawImage(n,0,0,y,w)}b.restore()}t(r)},"data"!==this.img.substr(0,4)&&(n.crossOrigin="Anonymous"),n.src=this.imgs},getCropData:function(t){var e=this;this.getCropChecked((function(r){t(r.toDataURL("image/"+e.outputType,e.outputSize))}))},getCropBlob:function(t){var e=this;this.getCropChecked((function(r){r.toBlob((function(e){return t(e)}),"image/"+e.outputType,e.outputSize)}))},showPreview:function(){var t=this;if(!this.isCanShow)return!1;this.isCanShow=!1,setTimeout((function(){t.isCanShow=!0}),16);var e=this.cropW,r=this.cropH,n=this.scale,o={};o.div={width:"".concat(e,"px"),height:"".concat(r,"px")};var i=(this.x-this.cropOffsertX)/n,a=(this.y-this.cropOffsertY)/n;o.w=e,o.h=r,o.url=this.imgs,o.img={width:"".concat(this.trueWidth,"px"),height:"".concat(this.trueHeight,"px"),transform:"scale(".concat(n,")translate3d(").concat(i,"px, ").concat(a,"px, ").concat(0,"px)rotateZ(").concat(90*this.rotate,"deg)")},o.html='\n <div class="show-preview" style="width: '.concat(o.w,"px; height: ").concat(o.h,'px,; overflow: hidden">\n <div style="width: ').concat(e,"px; height: ").concat(r,'px">\n <img src=').concat(o.url,' style="width: ').concat(this.trueWidth,"px; height: ").concat(this.trueHeight,"px; transform:\n scale(").concat(n,")translate3d(").concat(i,"px, ").concat(a,"px, ").concat(0,"px)rotateZ(").concat(90*this.rotate,'deg)">\n </div>\n </div>'),this.$emit("realTime",o),this.$emit("real-time",o)},reload:function(){var t=this,e=new Image;e.onload=function(){t.w=parseFloat(window.getComputedStyle(t.$refs.cropper).width),t.h=parseFloat(window.getComputedStyle(t.$refs.cropper).height),t.trueWidth=e.width,t.trueHeight=e.height,t.original?t.scale=1:t.scale=t.checkedMode(),t.$nextTick((function(){t.x=-(t.trueWidth-t.trueWidth*t.scale)/2+(t.w-t.trueWidth*t.scale)/2,t.y=-(t.trueHeight-t.trueHeight*t.scale)/2+(t.h-t.trueHeight*t.scale)/2,t.loading=!1,t.autoCrop&&t.goAutoCrop(),t.$emit("img-load","success"),t.$emit("imgLoad","success"),setTimeout((function(){t.showPreview()}),20)}))},e.onerror=function(){t.$emit("imgLoad","error"),t.$emit("img-load","error")},e.src=this.imgs},checkedMode:function(){var t=1,e=(this.trueWidth,this.trueHeight),r=this.mode.split(" ");switch(r[0]){case"contain":this.trueWidth>this.w&&(t=this.w/this.trueWidth),this.trueHeight*t>this.h&&(t=this.h/this.trueHeight);break;case"cover":(e*=t=this.w/this.trueWidth)<this.h&&(t=(e=this.h)/this.trueHeight);break;default:try{var n=r[0];if(-1!==n.search("px")){n=n.replace("px","");var o=parseFloat(n)/this.trueWidth,i=1,a=r[1];-1!==a.search("px")&&(a=a.replace("px",""),i=(e=parseFloat(a))/this.trueHeight),t=Math.min(o,i)}if(-1!==n.search("%")&&(n=n.replace("%",""),t=parseFloat(n)/100*this.w/this.trueWidth),2===r.length&&"auto"===n){var s=r[1];-1!==s.search("px")&&(s=s.replace("px",""),t=(e=parseFloat(s))/this.trueHeight),-1!==s.search("%")&&(s=s.replace("%",""),t=(e=parseFloat(s)/100*this.h)/this.trueHeight)}}catch(e){t=1}}return t},goAutoCrop:function(t,e){if(""!==this.imgs&&null!==this.imgs){this.clearCrop(),this.cropping=!0;var r=this.w,n=this.h;if(this.centerBox){var o=Math.abs(this.rotate)%2>0,i=(o?this.trueHeight:this.trueWidth)*this.scale,a=(o?this.trueWidth:this.trueHeight)*this.scale;r=i<r?i:r,n=a<n?a:n}var s=t||parseFloat(this.autoCropWidth),c=e||parseFloat(this.autoCropHeight);0!==s&&0!==c||(s=.8*r,c=.8*n),s=s>r?r:s,c=c>n?n:c,this.fixed&&(c=s/this.fixedNumber[0]*this.fixedNumber[1]),c>this.h&&(s=(c=this.h)/this.fixedNumber[1]*this.fixedNumber[0]),this.changeCrop(s,c)}},changeCrop:function(t,e){var r=this;if(this.centerBox){var n=this.getImgAxis();t>n.x2-n.x1&&(e=(t=n.x2-n.x1)/this.fixedNumber[0]*this.fixedNumber[1]),e>n.y2-n.y1&&(t=(e=n.y2-n.y1)/this.fixedNumber[1]*this.fixedNumber[0])}this.cropW=t,this.cropH=e,this.checkCropLimitSize(),this.$nextTick((function(){r.cropOffsertX=(r.w-r.cropW)/2,r.cropOffsertY=(r.h-r.cropH)/2,r.centerBox&&r.moveCrop(null,!0)}))},refresh:function(){var t=this;this.img,this.imgs="",this.scale=1,this.crop=!1,this.rotate=0,this.w=0,this.h=0,this.trueWidth=0,this.trueHeight=0,this.clearCrop(),this.$nextTick((function(){t.checkedImg()}))},rotateLeft:function(){this.rotate=this.rotate<=-3?0:this.rotate-1},rotateRight:function(){this.rotate=this.rotate>=3?0:this.rotate+1},rotateClear:function(){this.rotate=0},checkoutImgAxis:function(t,e,r){t=t||this.x,e=e||this.y,r=r||this.scale;var n=!0;if(this.centerBox){var o=this.getImgAxis(t,e,r),i=this.getCropAxis();o.x1>=i.x1&&(n=!1),o.x2<=i.x2&&(n=!1),o.y1>=i.y1&&(n=!1),o.y2<=i.y2&&(n=!1)}return n}},mounted:function(){this.support="onwheel"in document.createElement("div")?"wheel":void 0!==document.onmousewheel?"mousewheel":"DOMMouseScroll";var t=this,e=navigator.userAgent;this.isIOS=!!e.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),HTMLCanvasElement.prototype.toBlob||Object.defineProperty(HTMLCanvasElement.prototype,"toBlob",{value:function(e,r,n){for(var o=atob(this.toDataURL(r,n).split(",")[1]),i=o.length,a=new Uint8Array(i),s=0;s<i;s++)a[s]=o.charCodeAt(s);e(new Blob([a],{type:t.type||"image/png"}))}}),this.showPreview(),this.checkedImg()},destroyed:function(){window.removeEventListener("mousemove",this.moveCrop),window.removeEventListener("mouseup",this.leaveCrop),window.removeEventListener("touchmove",this.moveCrop),window.removeEventListener("touchend",this.leaveCrop),this.cancelScale()}};r(1);var s=function(t,e,r,n,o,i,a,s){var c,u="function"==typeof t?t.options:t;if(e&&(u.render=e,u.staticRenderFns=r,u._compiled=!0),n&&(u.functional=!0),i&&(u._scopeId="data-v-"+i),a?(c=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),o&&o.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(a)},u._ssrRegister=c):o&&(c=s?function(){o.call(this,this.$root.$options.shadowRoot)}:o),c)if(u.functional){u._injectStyles=c;var l=u.render;u.render=function(t,e){return c.call(e),l(t,e)}}else{var h=u.beforeCreate;u.beforeCreate=h?[].concat(h,c):[c]}return{exports:t,options:u}}(a,n,[],!1,null,"6dae58fd",null);s.options.__file="src/vue-cropper.vue";var c=s.exports;r.d(e,"VueCropper",(function(){return c}));var u=function(t){t.component("VueCropper",c)};"undefined"!=typeof window&&window.Vue&&u(window.Vue),e.default={version:"0.5.6",install:u,VueCropper:c,vueCropper:c}}])}))},bad9:function(t,e,r){var n=r("599d"),o=r("a4fc");t.exports=function(t){if(void 0===t)return 0;var e=n(t),r=o(e);if(e!==r)throw RangeError("Wrong length or index");return r}},bc44:function(t,e,r){"use strict";var n=r("e450"),o=r("cb38").includes,i=r("3286");n({target:"Array",proto:!0},{includes:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),i("includes")},bc72:function(t,e,r){"use strict";var n=r("4ae2"),o=r("f4ec").right,i=n.aTypedArray,a=n.exportTypedArrayMethod;a("reduceRight",(function(t){return o(i(this),t,arguments.length,arguments.length>1?arguments[1]:void 0)}))},bd5e:function(t,e,r){var n=r("e450"),o=r("d50e"),i=r("4b3a"),a=r("fc06").f,s=r("cdcb"),c=o((function(){a(1)})),u=!s||c;n({target:"Object",stat:!0,forced:u,sham:!s},{getOwnPropertyDescriptor:function(t,e){return a(i(t),e)}})},d082:function(t,e,r){"use strict";var n=r("4b3a"),o=r("599d"),i=r("a4fc"),a=r("104f"),s=Math.min,c=[].lastIndexOf,u=!!c&&1/[1].lastIndexOf(1,-0)<0,l=a("lastIndexOf"),h=u||!l;t.exports=h?function(t){if(u)return c.apply(this,arguments)||0;var e=n(this),r=i(e.length),a=r-1;for(arguments.length>1&&(a=s(a,o(arguments[1]))),a<0&&(a=r+a);a>=0;a--)if(a in e&&e[a]===t)return a||0;return-1}:c},d294:function(t,e,r){"use strict";r("6784")},d2ac:function(t,e,r){"use strict";r("7bec")},d362:function(t,e,r){var n=r("0f4e"),o=r("5ee6");t.exports=function(t,e,r){var i,a;return o&&"function"==typeof(i=e.constructor)&&i!==r&&n(a=i.prototype)&&a!==r.prototype&&o(t,a),t}},d393:function(t,e,r){"use strict";var n=r("a3e7").forEach,o=r("104f"),i=o("forEach");t.exports=i?[].forEach:function(t){return n(this,t,arguments.length>1?arguments[1]:void 0)}},d5d6:function(t,e,r){"use strict";var n=r("4ae2"),o=r("a4fc"),i=r("8250"),a=r("eb35"),s=r("d50e"),c=n.aTypedArray,u=n.exportTypedArrayMethod,l=s((function(){new Int8Array(1).set({})}));u("set",(function(t){c(this);var e=i(arguments.length>1?arguments[1]:void 0,1),r=this.length,n=a(t),s=o(n.length),u=0;if(s+e>r)throw RangeError("Wrong length");while(u<s)this[e+u]=n[u++]}),l)},dc77:function(t,e){var r=Math.abs,n=Math.pow,o=Math.floor,i=Math.log,a=Math.LN2,s=function(t,e,s){var c,u,l,h=new Array(s),f=8*s-e-1,p=(1<<f)-1,d=p>>1,g=23===e?n(2,-24)-n(2,-77):0,v=t<0||0===t&&1/t<0?1:0,m=0;for(t=r(t),t!=t||t===1/0?(u=t!=t?1:0,c=p):(c=o(i(t)/a),t*(l=n(2,-c))<1&&(c--,l*=2),t+=c+d>=1?g/l:g*n(2,1-d),t*l>=2&&(c++,l/=2),c+d>=p?(u=0,c=p):c+d>=1?(u=(t*l-1)*n(2,e),c+=d):(u=t*n(2,d-1)*n(2,e),c=0));e>=8;h[m++]=255&u,u/=256,e-=8);for(c=c<<e|u,f+=e;f>0;h[m++]=255&c,c/=256,f-=8);return h[--m]|=128*v,h},c=function(t,e){var r,o=t.length,i=8*o-e-1,a=(1<<i)-1,s=a>>1,c=i-7,u=o-1,l=t[u--],h=127&l;for(l>>=7;c>0;h=256*h+t[u],u--,c-=8);for(r=h&(1<<-c)-1,h>>=-c,c+=e;c>0;r=256*r+t[u],u--,c-=8);if(0===h)h=1-s;else{if(h===a)return r?NaN:l?-1/0:1/0;r+=n(2,e),h-=s}return(l?-1:1)*r*n(2,h-e)};t.exports={pack:s,unpack:c}},e1d4:function(t,e,r){"use strict";var n=r("cdcb"),o=r("b074"),i=r("7aeb"),a=r("6c39"),s=r("8801"),c=r("fdfe"),u=r("d362"),l=r("62d1"),h=r("d50e"),f=r("49a9"),p=r("a5e4e").f,d=r("fc06").f,g=r("3d27").f,v=r("2d34").trim,m="Number",y=o[m],w=y.prototype,b=c(f(w))==m,x=function(t){var e,r,n,o,i,a,s,c,u=l(t,!1);if("string"==typeof u&&u.length>2)if(u=v(u),e=u.charCodeAt(0),43===e||45===e){if(r=u.charCodeAt(2),88===r||120===r)return NaN}else if(48===e){switch(u.charCodeAt(1)){case 66:case 98:n=2,o=49;break;case 79:case 111:n=8,o=55;break;default:return+u}for(i=u.slice(2),a=i.length,s=0;s<a;s++)if(c=i.charCodeAt(s),c<48||c>o)return NaN;return parseInt(i,n)}return+u};if(i(m,!y(" 0o1")||!y("0b1")||y("+0x1"))){for(var C,I=function(t){var e=arguments.length<1?0:t,r=this;return r instanceof I&&(b?h((function(){w.valueOf.call(r)})):c(r)!=m)?u(new y(x(e)),r,I):x(e)},B=n?p(y):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger,fromString,range".split(","),S=0;B.length>S;S++)s(y,C=B[S])&&!s(I,C)&&g(I,C,d(y,C));I.prototype=w,w.constructor=I,a(o,m,I)}},e6d0:function(t,e,r){"use strict";var n,o=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();(function(t){t["InvalidFile"]="InvalidFile",t["InvalidToken"]="InvalidToken",t["InvalidMetadata"]="InvalidMetadata",t["InvalidChunkSize"]="InvalidChunkSize",t["InvalidCustomVars"]="InvalidCustomVars",t["NotAvailableUploadHost"]="NotAvailableUploadHost",t["ReadCacheFailed"]="ReadCacheFailed",t["InvalidCacheData"]="InvalidCacheData",t["WriteCacheFailed"]="WriteCacheFailed",t["RemoveCacheFailed"]="RemoveCacheFailed",t["InvalidTransformOrientation"]="InvalidTransformOrientation",t["GetCanvasContextFailed"]="GetCanvasContextFailed",t["UnsupportedFileType"]="UnsupportedFileType",t["FileReaderReadFailed"]="FileReaderReadFailed",t["NotAvailableXMLHttpRequest"]="NotAvailableXMLHttpRequest",t["InvalidProgressEventTarget"]="InvalidProgressEventTarget",t["RequestError"]="RequestError"})(n||(n={}));var i=function(){function t(t,e){this.name=t,this.message=e,this.stack=(new Error).stack}return t}(),a=function(t){function e(e,r,o,i){var a=t.call(this,n.RequestError,o)||this;return a.code=e,a.reqId=r,a.isRequestError=!0,a.data=i,a}return o(e,t),e}(i),s=function(t){function e(e,r){return void 0===r&&(r=""),t.call(this,0,r,e)||this}return o(e,t),e}(a),c=function(){function t(t,e){this.runTask=t,this.limit=e,this.queue=[],this.processing=[]}return t.prototype.enqueue=function(t){var e=this;return new Promise((function(r,n){e.queue.push({task:t,resolve:r,reject:n}),e.check()}))},t.prototype.run=function(t){var e=this;this.queue=this.queue.filter((function(e){return e!==t})),this.processing.push(t),this.runTask(t.task).then((function(){e.processing=e.processing.filter((function(e){return e!==t})),t.resolve(),e.check()}),(function(e){return t.reject(e)}))},t.prototype.check=function(){var t=this,e=this.processing.length,r=this.limit-e;this.queue.slice(0,r).forEach((function(e){t.run(e)}))},t}(),u=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),l=function(){return l=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r],e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},l.apply(this,arguments)},h=function(){function t(){this.closed=!1}return t.prototype.unsubscribe=function(){this.closed||(this.closed=!0,this._unsubscribe&&this._unsubscribe())},t.prototype.add=function(t){this._unsubscribe=t},t}(),f=function(t){function e(e,r,n){var o=t.call(this)||this;return o.isStopped=!1,o.destination=e&&"object"===typeof e?e:l(l(l({},e&&{next:e}),r&&{error:r}),n&&{complete:n}),o}return u(e,t),e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this))},e.prototype.next=function(t){!this.isStopped&&this.destination.next&&this.destination.next(t)},e.prototype.error=function(t){!this.isStopped&&this.destination.error&&(this.isStopped=!0,this.destination.error(t))},e.prototype.complete=function(t){!this.isStopped&&this.destination.complete&&(this.isStopped=!0,this.destination.complete(t))},e}(h);(function(){function t(t){this._subscribe=t}t.prototype.subscribe=function(t,e,r){var n=new f(t,e,r);return n.add(this._subscribe(n)),n}})();function p(t){if(null===t||"undefined"===typeof t)return"";var e,r,n=t+"",o="",i=0;e=r=0,i=n.length;for(var a=0;a<i;a++){var s=n.charCodeAt(a),c=null;if(s<128)r++;else if(s>127&&s<2048)c=String.fromCharCode(s>>6|192,63&s|128);else if((63488&s^55296)>0)c=String.fromCharCode(s>>12|224,s>>6&63|128,63&s|128);else{if((64512&s^55296)>0)throw new RangeError("Unmatched trail surrogate at "+a);var u=n.charCodeAt(++a);if((64512&u^56320)>0)throw new RangeError("Unmatched lead surrogate at "+(a-1));s=((1023&s)<<10)+(1023&u)+65536,c=String.fromCharCode(s>>18|240,s>>12&63|128,s>>6&63|128,63&s|128)}null!==c&&(r>e&&(o+=n.slice(e,r)),o+=c,e=r=a+1)}return r>e&&(o+=n.slice(e,i)),o}function d(t){var e=[],r=0,n=0,o=0;t+="";while(r<t.length){n=255&t.charCodeAt(r),o=0,n<=191?(n&=127,o=1):n<=223?(n&=31,o=2):n<=239?(n&=15,o=3):(n&=7,o=4);for(var i=1;i<o;++i)n=n<<6|63&t.charCodeAt(i+r);4===o?(n-=65536,e.push(String.fromCharCode(55296|n>>10&1023)),e.push(String.fromCharCode(56320|1023&n))):e.push(String.fromCharCode(n)),r+=o}return e.join("")}function g(t){var e,r,n,o,i,a,s,c,u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",l=0,h=0,f="",d=[];if(!t)return t;t=p(t+"");do{e=t.charCodeAt(l++),r=t.charCodeAt(l++),n=t.charCodeAt(l++),c=e<<16|r<<8|n,o=c>>18&63,i=c>>12&63,a=c>>6&63,s=63&c,d[h++]=u.charAt(o)+u.charAt(i)+u.charAt(a)+u.charAt(s)}while(l<t.length);switch(f=d.join(""),t.length%3){case 1:f=f.slice(0,-2)+"==";break;case 2:f=f.slice(0,-1)+"=";break}return f}function v(t){var e,r,n,o,i,a,s,c,u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",l=0,h=0,f="",p=[];if(!t)return t;t+="";do{o=u.indexOf(t.charAt(l++)),i=u.indexOf(t.charAt(l++)),a=u.indexOf(t.charAt(l++)),s=u.indexOf(t.charAt(l++)),c=o<<18|i<<12|a<<6|s,e=c>>16&255,r=c>>8&255,n=255&c,p[h++]=64===a?String.fromCharCode(e):64===s?String.fromCharCode(e,r):String.fromCharCode(e,r,n)}while(l<t.length);return f=p.join(""),d(f)}function m(t){return t=g(t),t.replace(/\//g,"_").replace(/\+/g,"-")}function y(t){return t=t.replace(/_/g,"/").replace(/-/g,"+"),v(t)}var w,b=r("0358"),x=r.n(b),C=function(){return C=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r],e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},C.apply(this,arguments)},I=function(t,e,r,n){function o(t){return t instanceof r?t:new r((function(e){e(t)}))}return new(r||(r=Promise))((function(r,i){function a(t){try{c(n.next(t))}catch(e){i(e)}}function s(t){try{c(n["throw"](t))}catch(e){i(e)}}function c(t){t.done?r(t.value):o(t.value).then(a,s)}c((n=n.apply(t,e||[])).next())}))},B=function(t,e){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(t){return function(e){return c([t,e])}}function c(i){if(r)throw new TypeError("Generator is already executing.");while(a)try{if(r=1,n&&(o=2&i[0]?n["return"]:i[0]?n["throw"]||((o=n["return"])&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(o=a.trys,!(o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(s){i=[6,s],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}},S=Math.pow(1024,2);function A(t,e){var r=e*S;if(r>t.size)r=t.size;else while(t.size>1e4*r)r*=2;for(var n=[],o=Math.ceil(t.size/r),i=0;i<o;i++){var a=t.slice(r*i,i===o-1?t.size:r*(i+1));n.push(a)}return n}function O(t){return Object.keys(t).every((function(t){return 0===t.indexOf("x-qn-meta-")}))}function T(t){return Object.keys(t).every((function(t){return 0===t.indexOf("x:")}))}function k(t){return t.reduce((function(t,e){return t+e}),0)}function M(t,e,r){try{localStorage.setItem(t,JSON.stringify(e))}catch(o){r.warn(new i(n.WriteCacheFailed,"setLocalFileInfo failed: "+t))}}function P(t,e,r){var n=null==e?"_":"_key_"+e+"_";return"qiniu_js_sdk_upload_file_name_"+t+n+"size_"+r}function E(t,e){try{localStorage.removeItem(t)}catch(r){e.warn(new i(n.RemoveCacheFailed,"removeLocalFileInfo failed. key: "+t))}}function _(t,e){var r=null;try{r=localStorage.getItem(t)}catch(a){e.warn(new i(n.ReadCacheFailed,"getLocalFileInfo failed. key: "+t))}if(null==r)return null;var o=null;try{o=JSON.parse(r)}catch(s){E(t,e),e.warn(new i(n.InvalidCacheData,"getLocalFileInfo failed to parse. key: "+t))}return o}function L(t){var e="UpToken "+t;return{Authorization:e}}function U(t){var e=L(t);return C({"content-type":"application/octet-stream"},e)}function F(t){var e=L(t);return C({"content-type":"application/json"},e)}function R(){if(window.XMLHttpRequest)return new XMLHttpRequest;if(window.ActiveXObject)return new window.ActiveXObject("Microsoft.XMLHTTP");throw new i(n.NotAvailableXMLHttpRequest,"the current environment does not support.")}function N(t){return I(this,void 0,void 0,(function(){var e,r;return B(this,(function(n){switch(n.label){case 0:return[4,H(t)];case 1:return e=n.sent(),r=new x.a.ArrayBuffer,r.append(e),[2,r.end()]}}))}))}function H(t){return new Promise((function(e,r){var o=new FileReader;o.onload=function(t){if(t.target){var o=t.target.result;e(o)}else r(new i(n.InvalidProgressEventTarget,"progress event target is undefined"))},o.onerror=function(){r(new i(n.FileReaderReadFailed,"fileReader read failed"))},o.readAsArrayBuffer(t)}))}function j(t,e){return new Promise((function(r,n){var o=R();if(o.open(e.method,t),e.onCreate&&e.onCreate(o),e.headers){var i=e.headers;Object.keys(i).forEach((function(t){o.setRequestHeader(t,i[t])}))}o.upload.addEventListener("progress",(function(t){t.lengthComputable&&e.onProgress&&e.onProgress({loaded:t.loaded,total:t.total})})),o.onreadystatechange=function(){var t=o.responseText;if(4===o.readyState){var e=o.getResponseHeader("x-reqId")||"";if(0!==o.status)if(200===o.status)try{r({data:JSON.parse(t),reqId:e})}catch(u){n(u)}else{var i="xhr request failed, code: "+o.status;t&&(i+=" response: "+t);var c=void 0;try{c=JSON.parse(t)}catch(l){}n(new a(o.status,e,i,c))}else n(new s("network error.",e))}},o.send(e.body)}))}function D(t){if(t&&t.match){var e=t.match(/(^https?)/);if(!e)return"";var r=e[1];return e=t.match(/^https?:\/\/([^:^/]*):(\d*)/),e?e[2]:"http"===r?"80":"443"}return""}function W(t){if(t&&t.match){var e=t.match(/^https?:\/\/([^:^/]*)/);return e?e[1]:""}return""}function z(t){if(!t)throw new i(n.InvalidToken,"invalid token.");var e=t.split(":");if(1===e.length)throw new i(n.InvalidToken,"invalid token segments.");var r=e.length>3?e[1]:e[0];if(!r)throw new i(n.InvalidToken,"missing assess key field.");var o=null;try{o=JSON.parse(y(e[e.length-1]))}catch(s){throw new i(n.InvalidToken,"token parse failed.")}if(null==o)throw new i(n.InvalidToken,"putPolicy is null.");if(null==o.scope)throw new i(n.InvalidToken,"scope field is null.");var a=o.scope.split(":")[0];if(!a)throw new i(n.InvalidToken,"resolve bucketName failed.");return{assessKey:r,bucketName:a,scope:o.scope}}function X(t){var e=window.URL||window.webkitURL||window.mozURL;return e.createObjectURL(t)}function Y(t,e){var r=t.width,o=t.height;switch(e){case 1:return{width:r,height:o,matrix:[1,0,0,1,0,0]};case 2:return{width:r,height:o,matrix:[-1,0,0,1,r,0]};case 3:return{width:r,height:o,matrix:[-1,0,0,-1,r,o]};case 4:return{width:r,height:o,matrix:[1,0,0,-1,0,o]};case 5:return{width:o,height:r,matrix:[0,1,1,0,0,0]};case 6:return{width:o,height:r,matrix:[0,1,-1,0,o,0]};case 7:return{width:o,height:r,matrix:[0,-1,-1,0,o,r]};case 8:return{width:o,height:r,matrix:[0,-1,1,0,0,r]};default:throw new i(n.InvalidTransformOrientation,"orientation "+e+" is unavailable")}}var G={z0:"z0",z1:"z1",z2:"z2",na0:"na0",as0:"as0",cnEast2:"cn-east-2"},q=(w={},w[G.z0]={srcUphost:["up.qiniup.com"],cdnUphost:["upload.qiniup.com"]},w[G.z1]={srcUphost:["up-z1.qiniup.com"],cdnUphost:["upload-z1.qiniup.com"]},w[G.z2]={srcUphost:["up-z2.qiniup.com"],cdnUphost:["upload-z2.qiniup.com"]},w[G.na0]={srcUphost:["up-na0.qiniup.com"],cdnUphost:["upload-na0.qiniup.com"]},w[G.as0]={srcUphost:["up-as0.qiniup.com"],cdnUphost:["upload-as0.qiniup.com"]},w[G.cnEast2]={srcUphost:["up-cn-east-2.qiniup.com"],cdnUphost:["upload-cn-east-2.qiniup.com"]},r("5ee4")),$=function(){return $=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r],e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},$.apply(this,arguments)},V=function(t,e,r,n){function o(t){return t instanceof r?t:new r((function(e){e(t)}))}return new(r||(r=Promise))((function(r,i){function a(t){try{c(n.next(t))}catch(e){i(e)}}function s(t){try{c(n["throw"](t))}catch(e){i(e)}}function c(t){t.done?r(t.value):o(t.value).then(a,s)}c((n=n.apply(t,e||[])).next())}))},J=function(t,e){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(t){return function(e){return c([t,e])}}function c(i){if(r)throw new TypeError("Generator is already executing.");while(a)try{if(r=1,n&&(o=2&i[0]?n["return"]:i[0]?n["throw"]||((o=n["return"])&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(o=a.trys,!(o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(s){i=[6,s],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}};function K(t,e,r){return V(this,void 0,void 0,(function(){var n,o;return J(this,(function(i){return n=Object(q["stringify"])({ak:t,bucket:e}),o=r+"://api.qiniu.com/v2/query?"+n,[2,j(o,{method:"GET"})]}))}))}function Q(t,e,r){var n=r.url,o=r.id;return n+"/buckets/"+t+"/objects/"+(null!=e?m(e):"~")+"/uploads/"+o}function Z(t,e,r,n){var o=n+"/buckets/"+e+"/objects/"+(null!=r?m(r):"~")+"/uploads";return j(o,{method:"POST",headers:L(t)})}function tt(t,e,r,n,o){var i=z(t).bucketName,a=Q(i,e,n)+"/"+r;return j(a,$($({},o),{method:"PUT",headers:U(t)}))}function et(t,e,r,n){var o=z(t).bucketName,i=Q(o,e,r);return j(i,$($({},n),{method:"POST",headers:F(t)}))}function rt(t,e,r){return j(t,$({method:"POST",body:e},r))}var nt=function(){return nt=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r],e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},nt.apply(this,arguments)},ot=function(t,e,r,n){function o(t){return t instanceof r?t:new r((function(e){e(t)}))}return new(r||(r=Promise))((function(r,i){function a(t){try{c(n.next(t))}catch(e){i(e)}}function s(t){try{c(n["throw"](t))}catch(e){i(e)}}function c(t){t.done?r(t.value):o(t.value).then(a,s)}c((n=n.apply(t,e||[])).next())}))},it=function(t,e){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(t){return function(e){return c([t,e])}}function c(i){if(r)throw new TypeError("Generator is already executing.");while(a)try{if(r=1,n&&(o=2&i[0]?n["return"]:i[0]?n["throw"]||((o=n["return"])&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(o=a.trys,!(o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(s){i=[6,s],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}},at=function(t,e){var r="function"===typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{while((void 0===e||e-- >0)&&!(n=i.next()).done)a.push(n.value)}catch(s){o={error:s}}finally{try{n&&!n.done&&(r=i["return"])&&r.call(i)}finally{if(o)throw o.error}}return a},st=function(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(at(arguments[e]));return t},ct=[0,502,503,504,599],ut=st(ct,[612]),lt=Math.pow(1024,3),ht=function(){function t(t,e,r,n){this.hostPool=r,this.logger=n,this.aborted=!1,this.retryCount=0,this.xhrList=[],this.config=t.config,n.info("config inited.",this.config),this.putExtra=nt({fname:""},t.putExtra),n.info("putExtra inited.",this.putExtra),this.key=t.key,this.file=t.file,this.token=t.token,this.onData=e.onData,this.onError=e.onError,this.onComplete=e.onComplete;try{var o=z(this.token);this.bucketName=o.bucketName,this.assessKey=o.assessKey}catch(i){n.error("get putPolicy from token failed.",i),this.onError(i)}}return t.prototype.checkAndUpdateUploadHost=function(){return ot(this,void 0,void 0,(function(){var t;return it(this,(function(e){switch(e.label){case 0:return this.logger.info("get available upload host."),[4,this.hostPool.getUp(this.assessKey,this.bucketName,this.config.upprotocol)];case 1:if(t=e.sent(),null==t)throw new i(n.NotAvailableUploadHost,"no available upload host.");return null!=this.uploadHost&&this.uploadHost.host!==t.host?this.logger.warn("host switches from "+this.uploadHost.host+" to "+t.host+"."):this.logger.info("use host "+t.host+"."),this.uploadHost=t,[2]}}))}))},t.prototype.checkAndUnfreezeHost=function(){this.logger.info("check unfreeze host."),null!=this.uploadHost&&this.uploadHost.isFrozen()&&(this.logger.warn(this.uploadHost.host+" will be unfrozen."),this.uploadHost.unfreeze())},t.prototype.checkAndFreezeHost=function(t){this.logger.info("check freeze host."),t instanceof a&&null!=this.uploadHost&&ct.includes(t.code)&&(this.logger.warn(this.uploadHost.host+" will be temporarily frozen."),this.uploadHost.freeze())},t.prototype.handleError=function(t){this.logger.error(t.message),this.onError(t)},t.prototype.putFile=function(){return ot(this,void 0,void 0,(function(){var t,e,r,o,s,c;return it(this,(function(u){switch(u.label){case 0:if(this.aborted=!1,this.putExtra.fname||(this.logger.info("use file.name as fname."),this.putExtra.fname=this.file.name),this.file.size>1e4*lt)return this.handleError(new i(n.InvalidFile,"file size exceed maximum value 10000G")),[2];if(this.putExtra.customVars&&!T(this.putExtra.customVars))return this.handleError(new i(n.InvalidCustomVars,"customVars key should start width x:")),[2];if(this.putExtra.metadata&&!O(this.putExtra.metadata))return this.handleError(new i(n.InvalidMetadata,"metadata key should start with x-qn-meta-")),[2];u.label=1;case 1:return u.trys.push([1,4,,5]),this.uploadAt=(new Date).getTime(),[4,this.checkAndUpdateUploadHost()];case 2:return u.sent(),[4,this.run()];case 3:return t=u.sent(),this.onComplete(t.data),this.checkAndUnfreezeHost(),this.sendLog(t.reqId,200),[2];case 4:return e=u.sent(),this.logger.error(e),this.clear(),e instanceof a&&(r=this.aborted?"":e.reqId,o=this.aborted?-2:e.code,this.sendLog(r,o),this.checkAndFreezeHost(e),s=++this.retryCount<=this.config.retryCount,c=!this.aborted&&ut.includes(e.code),c&&s)?(this.logger.warn("error auto retry: "+this.retryCount+"/"+this.config.retryCount+"."),this.putFile(),[2]):(this.onError(e),[3,5]);case 5:return[2]}}))}))},t.prototype.clear=function(){this.logger.info("start cleaning all xhr."),this.xhrList.forEach((function(t){t.onreadystatechange=null,t.abort()})),this.logger.info("cleanup completed."),this.xhrList=[]},t.prototype.stop=function(){this.logger.info("stop."),this.clear(),this.aborted=!0},t.prototype.addXhr=function(t){this.xhrList.push(t)},t.prototype.sendLog=function(t,e){var r,n;this.logger.report({code:e,reqId:t,remoteIp:"",upType:"jssdk-h5",size:this.file.size,time:Math.floor(this.uploadAt/1e3),port:D(null===(r=this.uploadHost)||void 0===r?void 0:r.getUrl()),host:W(null===(n=this.uploadHost)||void 0===n?void 0:n.getUrl()),bytesSent:this.progress?this.progress.total.loaded:0,duration:Math.floor(((new Date).getTime()-this.uploadAt)/1e3)})},t.prototype.getProgressInfoItem=function(t,e,r){return nt({size:e,loaded:t,percent:t/e*100},null==r?{}:{fromCache:r})},t}(),ft=ht,pt=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),dt=function(){return dt=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r],e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},dt.apply(this,arguments)},gt=function(t,e,r,n){function o(t){return t instanceof r?t:new r((function(e){e(t)}))}return new(r||(r=Promise))((function(r,i){function a(t){try{c(n.next(t))}catch(e){i(e)}}function s(t){try{c(n["throw"](t))}catch(e){i(e)}}function c(t){t.done?r(t.value):o(t.value).then(a,s)}c((n=n.apply(t,e||[])).next())}))},vt=function(t,e){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(t){return function(e){return c([t,e])}}function c(i){if(r)throw new TypeError("Generator is already executing.");while(a)try{if(r=1,n&&(o=2&i[0]?n["return"]:i[0]?n["throw"]||((o=n["return"])&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(o=a.trys,!(o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(s){i=[6,s],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}};function mt(t){var e=/^[1-9]\d*$/;return e.test(String(t))}(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}pt(e,t),e.prototype.run=function(){return gt(this,void 0,void 0,(function(){var t,e,r,o,s,u=this;return vt(this,(function(l){switch(l.label){case 0:if(this.logger.info("start run Resume."),!this.config.chunkSize||!mt(this.config.chunkSize))throw new i(n.InvalidChunkSize,"chunkSize must be a positive integer");if(this.config.chunkSize>1024)throw new i(n.InvalidChunkSize,"chunkSize maximum value is 1024");return[4,this.initBeforeUploadChunks()];case 1:l.sent(),t=new c((function(t){return u.uploadChunk(t)}),this.config.concurrentRequestLimit),e=null,r=this.getLocalKey(),o=this.chunks.map((function(e,r){return t.enqueue({chunk:e,index:r})})),l.label=2;case 2:return l.trys.push([2,5,,6]),[4,Promise.all(o)];case 3:return l.sent(),[4,this.mkFileReq()];case 4:return e=l.sent(),[3,6];case 5:throw s=l.sent(),s instanceof a&&(612===s.code||400===s.code)&&E(r,this.logger),s;case 6:return E(r,this.logger),[2,e]}}))}))},e.prototype.uploadChunk=function(t){return gt(this,void 0,void 0,(function(){var e,r,n,o,i,a,s,c,u,l=this;return vt(this,(function(h){switch(h.label){case 0:return e=t.index,r=t.chunk,n=this.cachedUploadedList[e],this.logger.info("upload part "+e+", cache:",n),o=this.config.checkByMD5,i=function(){l.usedCacheList[e]=!0,l.updateChunkProgress(r.size,e),l.uploadedList[e]=n,l.updateLocalCache()},n&&!o?(i(),[2]):[4,N(r)];case 1:return a=h.sent(),this.logger.info("computed part md5.",a),n&&a===n.md5?(i(),[2]):(this.usedCacheList[e]=!1,s=function(t){l.updateChunkProgress(t.loaded,e)},c={body:r,onProgress:s,onCreate:function(t){return l.addXhr(t)}},this.logger.info("part "+e+" start uploading."),[4,tt(this.token,this.key,t.index+1,this.getUploadInfo(),c)]);case 2:return u=h.sent(),this.logger.info("part "+e+" upload completed."),s({loaded:r.size,total:r.size}),this.uploadedList[e]={etag:u.data.etag,md5:u.data.md5,size:r.size},this.updateLocalCache(),[2]}}))}))},e.prototype.mkFileReq=function(){return gt(this,void 0,void 0,(function(){var t,e,r=this;return vt(this,(function(n){switch(n.label){case 0:return t=dt(dt(dt({parts:this.uploadedList.map((function(t,e){return{etag:t.etag,partNumber:e+1}})),fname:this.putExtra.fname},this.putExtra.mimeType&&{mimeType:this.putExtra.mimeType}),this.putExtra.customVars&&{customVars:this.putExtra.customVars}),this.putExtra.metadata&&{metadata:this.putExtra.metadata}),this.logger.info("parts upload completed, make file.",t),[4,et(this.token,this.key,this.getUploadInfo(),{onCreate:function(t){return r.addXhr(t)},body:JSON.stringify(t)})];case 1:return e=n.sent(),this.logger.info("finish Resume Progress."),this.updateMkFileProgress(1),[2,e]}}))}))},e.prototype.initBeforeUploadChunks=function(){return gt(this,void 0,void 0,(function(){var t,e,r;return vt(this,(function(n){switch(n.label){case 0:return this.uploadedList=[],this.usedCacheList=[],t=_(this.getLocalKey(),this.logger),t?[3,2]:(this.logger.info("init upload parts from api."),[4,Z(this.token,this.bucketName,this.key,this.uploadHost.getUrl())]);case 1:return e=n.sent(),this.logger.info("initd upload parts of id: "+e.data.uploadId+"."),this.uploadId=e.data.uploadId,this.cachedUploadedList=[],[3,3];case 2:r=["resume upload parts from local cache,","total "+t.data.length+" part,","id is "+t.id+"."],this.logger.info(r.join(" ")),this.cachedUploadedList=t.data,this.uploadId=t.id,n.label=3;case 3:return this.chunks=A(this.file,this.config.chunkSize),this.loaded={mkFileProgress:0,chunks:this.chunks.map((function(t){return 0}))},this.notifyResumeProgress(),[2]}}))}))},e.prototype.getUploadInfo=function(){return{id:this.uploadId,url:this.uploadHost.getUrl()}},e.prototype.getLocalKey=function(){return P(this.file.name,this.key,this.file.size)},e.prototype.updateLocalCache=function(){M(this.getLocalKey(),{id:this.uploadId,data:this.uploadedList},this.logger)},e.prototype.updateChunkProgress=function(t,e){this.loaded.chunks[e]=t,this.notifyResumeProgress()},e.prototype.updateMkFileProgress=function(t){this.loaded.mkFileProgress=t,this.notifyResumeProgress()},e.prototype.notifyResumeProgress=function(){var t=this;this.progress={total:this.getProgressInfoItem(k(this.loaded.chunks)+this.loaded.mkFileProgress,this.file.size+1),chunks:this.chunks.map((function(e,r){var n=t.usedCacheList[r];return t.getProgressInfoItem(t.loaded.chunks[r],e.size,n)})),uploadInfo:{id:this.uploadId,url:this.uploadHost.getUrl()}},this.onData(this.progress)}})(ft);var yt=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),wt=function(t,e,r,n){function o(t){return t instanceof r?t:new r((function(e){e(t)}))}return new(r||(r=Promise))((function(r,i){function a(t){try{c(n.next(t))}catch(e){i(e)}}function s(t){try{c(n["throw"](t))}catch(e){i(e)}}function c(t){t.done?r(t.value):o(t.value).then(a,s)}c((n=n.apply(t,e||[])).next())}))},bt=function(t,e){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(t){return function(e){return c([t,e])}}function c(i){if(r)throw new TypeError("Generator is already executing.");while(a)try{if(r=1,n&&(o=2&i[0]?n["return"]:i[0]?n["throw"]||((o=n["return"])&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(o=a.trys,!(o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(s){i=[6,s],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}};(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}yt(e,t),e.prototype.run=function(){return wt(this,void 0,void 0,(function(){var t,e,r,n=this;return bt(this,(function(o){switch(o.label){case 0:return this.logger.info("start run Direct."),t=new FormData,t.append("file",this.file),t.append("token",this.token),null!=this.key&&t.append("key",this.key),t.append("fname",this.putExtra.fname),this.putExtra.customVars&&(this.logger.info("init customVars."),e=this.putExtra.customVars,Object.keys(e).forEach((function(r){return t.append(r,e[r].toString())})),this.logger.info("customVars inited.")),this.logger.info("formData inited."),[4,rt(this.uploadHost.getUrl(),t,{onProgress:function(t){n.updateDirectProgress(t.loaded,t.total)},onCreate:function(t){return n.addXhr(t)}})];case 1:return r=o.sent(),this.logger.info("Direct progress finish."),this.finishDirectProgress(),[2,r]}}))}))},e.prototype.updateDirectProgress=function(t,e){this.progress={total:this.getProgressInfoItem(t,e+1)},this.onData(this.progress)},e.prototype.finishDirectProgress=function(){if(!this.progress)return this.logger.warn("progress is null."),this.progress={total:this.getProgressInfoItem(this.file.size,this.file.size)},void this.onData(this.progress);var t=this.progress.total;this.progress={total:this.getProgressInfoItem(t.loaded+1,t.size)},this.onData(this.progress)}})(ft);function xt(t,e,r){void 0===r&&(r=3);var n=R();n.open("POST","https://uplog.qbox.me/log/3"),n.setRequestHeader("Content-type","application/x-www-form-urlencoded"),n.setRequestHeader("Authorization",L(t).Authorization),n.onreadystatechange=function(){4===n.readyState&&200!==n.status&&r>0&&xt(t,e,r-1)};var o=[e.code||"",e.reqId||"",e.host||"",e.remoteIp||"",e.port||"",e.duration||"",e.time||"",e.bytesSent||"",e.upType||"",e.size||""].join(",");n.send(o)}var Ct=function(t,e){var r="function"===typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{while((void 0===e||e-- >0)&&!(n=i.next()).done)a.push(n.value)}catch(s){o={error:s}}finally{try{n&&!n.done&&(r=i["return"])&&r.call(i)}finally{if(o)throw o.error}}return a},It=function(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(Ct(arguments[e]));return t},Bt=(function(){function t(e,r,n,o){void 0===r&&(r=!0),void 0===n&&(n="OFF"),void 0===o&&(o="UPLOAD"),this.token=e,this.disableReport=r,this.level=n,this.prefix=o,this.id=++t.id}t.prototype.getPrintPrefix=function(t){return"Qiniu-JS-SDK ["+t+"]["+this.prefix+"#"+this.id+"]:"},t.prototype.report=function(t,e){if(!this.disableReport)try{xt(this.token,t,e)}catch(r){this.warn(r)}},t.prototype.info=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=["INFO"];r.includes(this.level)&&console.log.apply(console,It([this.getPrintPrefix("INFO")],t))},t.prototype.warn=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=["INFO","WARN"];r.includes(this.level)&&console.warn.apply(console,It([this.getPrintPrefix("WARN")],t))},t.prototype.error=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=["INFO","WARN","ERROR"];r.includes(this.level)&&console.error.apply(console,It([this.getPrintPrefix("ERROR")],t))},t.id=0}(),function(t,e,r,n){function o(t){return t instanceof r?t:new r((function(e){e(t)}))}return new(r||(r=Promise))((function(r,i){function a(t){try{c(n.next(t))}catch(e){i(e)}}function s(t){try{c(n["throw"](t))}catch(e){i(e)}}function c(t){t.done?r(t.value):o(t.value).then(a,s)}c((n=n.apply(t,e||[])).next())}))}),St=function(t,e){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(t){return function(e){return c([t,e])}}function c(i){if(r)throw new TypeError("Generator is already executing.");while(a)try{if(r=1,n&&(o=2&i[0]?n["return"]:i[0]?n["throw"]||((o=n["return"])&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(o=a.trys,!(o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(s){i=[6,s],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}},At=function(t,e){var r="function"===typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{while((void 0===e||e-- >0)&&!(n=i.next()).done)a.push(n.value)}catch(s){o={error:s}}finally{try{n&&!n.done&&(r=i["return"])&&r.call(i)}finally{if(o)throw o.error}}return a},Ot=function(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(At(arguments[e]));return t},Tt=new Map,kt=function(){function t(t,e){this.host=t,this.protocol=e}return t.prototype.isFrozen=function(){var t=(new Date).getTime(),e=Tt.get(this.host);return null!=e&&e>=t},t.prototype.freeze=function(t){void 0===t&&(t=20);var e=(new Date).getTime()+1e3*t;Tt.set(this.host,e)},t.prototype.unfreeze=function(){Tt["delete"](this.host)},t.prototype.getUrl=function(){return this.protocol+"://"+this.host},t.prototype.getUnfreezeTime=function(){return Tt.get(this.host)},t}();(function(){function t(t){void 0===t&&(t=[]),this.initHosts=t,this.cachedHostsMap=new Map}t.prototype.register=function(t,e,r,n){this.cachedHostsMap.set(t+"@"+e,r.map((function(t){return new kt(t,n)})))},t.prototype.refresh=function(t,e,r){var n,o,i,a;return Bt(this,void 0,void 0,(function(){var s,c,u;return St(this,(function(l){switch(l.label){case 0:return s=this.cachedHostsMap.get(t+"@"+e)||[],s.length>0?[2]:this.initHosts.length>0?(this.register(t,e,this.initHosts,r),[2]):[4,K(t,e,r)];case 1:return c=l.sent(),null!=(null===c||void 0===c?void 0:c.data)&&(u=Ot((null===(o=null===(n=c.data.up)||void 0===n?void 0:n.acc)||void 0===o?void 0:o.main)||[],(null===(a=null===(i=c.data.up)||void 0===i?void 0:i.acc)||void 0===a?void 0:a.backup)||[]),this.register(t,e,u,r)),[2]}}))}))},t.prototype.getUp=function(t,e,r){return Bt(this,void 0,void 0,(function(){var n,o,i;return St(this,(function(a){switch(a.label){case 0:return[4,this.refresh(t,e,r)];case 1:return a.sent(),n=this.cachedHostsMap.get(t+"@"+e)||[],0===n.length?[2,null]:(o=n.filter((function(t){return!t.isFrozen()})),o.length>0?[2,o[0]]:(i=n.slice().sort((function(t,e){return(t.getUnfreezeTime()||0)-(e.getUnfreezeTime()||0)})),[2,i[0]]))}}))}))}})();var Mt=r("5501"),Pt=function(){return Pt=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r],e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},Pt.apply(this,arguments)},Et=function(t,e,r,n){function o(t){return t instanceof r?t:new r((function(e){e(t)}))}return new(r||(r=Promise))((function(r,i){function a(t){try{c(n.next(t))}catch(e){i(e)}}function s(t){try{c(n["throw"](t))}catch(e){i(e)}}function c(t){t.done?r(t.value):o(t.value).then(a,s)}c((n=n.apply(t,e||[])).next())}))},_t=function(t,e){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(t){return function(e){return c([t,e])}}function c(i){if(r)throw new TypeError("Generator is already executing.");while(a)try{if(r=1,n&&(o=2&i[0]?n["return"]:i[0]?n["throw"]||((o=n["return"])&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(o=a.trys,!(o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(s){i=[6,s],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}},Lt=function(t,e){var r="function"===typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{while((void 0===e||e-- >0)&&!(n=i.next()).done)a.push(n.value)}catch(s){o={error:s}}finally{try{n&&!n.done&&(r=i["return"])&&r.call(i)}finally{if(o)throw o.error}}return a},Ut=function(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(Lt(arguments[e]));return t},Ft={PNG:"image/png",JPEG:"image/jpeg",WEBP:"image/webp",BMP:"image/bmp"},Rt=4,Nt=Math.log(2),Ht=Object.keys(Ft).map((function(t){return Ft[t]})),jt=Ft.JPEG;function Dt(t){return Ht.includes(t)}(function(){function t(t,e){this.file=t,this.config=e,this.config=Pt({quality:.92,noCompressIfLarger:!1},this.config)}t.prototype.process=function(){return Et(this,void 0,void 0,(function(){var t,e,r,o,a,s;return _t(this,(function(c){switch(c.label){case 0:if(this.outputType=this.file.type,t={},!Dt(this.file.type))throw new i(n.UnsupportedFileType,"unsupported file type: "+this.file.type);return[4,this.getOriginImage()];case 1:return e=c.sent(),[4,this.getCanvas(e)];case 2:return r=c.sent(),o=1,this.config.maxWidth&&(o=Math.min(1,this.config.maxWidth/r.width)),this.config.maxHeight&&(o=Math.min(1,o,this.config.maxHeight/r.height)),t.width=r.width,t.height=r.height,[4,this.doScale(r,o)];case 3:return a=c.sent(),s=this.toBlob(a),s.size>this.file.size&&this.config.noCompressIfLarger?[2,{dist:this.file,width:t.width,height:t.height}]:[2,{dist:s,width:a.width,height:a.height}]}}))}))},t.prototype.clear=function(t,e,r){this.outputType===jt?(t.fillStyle="#fff",t.fillRect(0,0,e,r)):t.clearRect(0,0,e,r)},t.prototype.getOriginImage=function(){var t=this;return new Promise((function(e,r){var n=X(t.file),o=new Image;o.onload=function(){e(o)},o.onerror=function(){r("image load error")},o.src=n}))},t.prototype.getCanvas=function(t){var e=this;return new Promise((function(r,o){Mt["EXIF"].getData(t,(function(){var a=Mt["EXIF"].getTag(t,"Orientation")||1,s=Y(t,a),c=s.width,u=s.height,l=s.matrix,h=document.createElement("canvas"),f=h.getContext("2d");f?(h.width=c,h.height=u,e.clear(f,c,u),f.transform.apply(f,Ut(l)),f.drawImage(t,0,0),r(h)):o(new i(n.GetCanvasContextFailed,"context is null"))}))}))},t.prototype.doScale=function(t,e){return Et(this,void 0,void 0,(function(){var r,o,a,s,c,u,l,h,f,p,d,g,v,m,y,w;return _t(this,(function(b){if(1===e)return[2,t];if(r=t.getContext("2d"),o=Math.min(Rt,Math.ceil(1/e/Nt)),a=Math.pow(e,1/o),s=document.createElement("canvas"),c=s.getContext("2d"),u=t.width,l=t.height,h=u,f=l,s.width=u,s.height=l,!c||!r)throw new i(n.GetCanvasContextFailed,"mctx or sctx can't be null");for(g=0;g<o;g++)v=u*a|0,m=l*a|0,g===o-1&&(v=h*e,m=f*e),g%2===0?(p=t,d=c):(p=s,d=r),this.clear(d,u,l),d.drawImage(p,0,0,u,l,0,0,v,m),u=v,l=m;return y=p===t?s:t,w=d.getImageData(0,0,u,l),y.width=u,y.height=l,d.putImageData(w,0,0),[2,y]}))}))},t.prototype.toBlob=function(t){var e=t.toDataURL(this.outputType,this.config.quality),r=atob(e.split(",")[1]).split("").map((function(t){return t.charCodeAt(0)})),n=new Blob([new Uint8Array(r)],{type:this.outputType});return n}})()},ea11:function(t,e,r){"use strict";var n=r("4ae2"),o=r("06d7"),i=n.aTypedArray,a=n.exportTypedArrayMethod;a("fill",(function(t){return o.apply(i(this),arguments)}))},f2b4:function(t,e,r){"use strict";var n=r("b074"),o=r("4ae2"),i=r("6ece"),a=r("9bc6"),s=a("iterator"),c=n.Uint8Array,u=i.values,l=i.keys,h=i.entries,f=o.aTypedArray,p=o.exportTypedArrayMethod,d=c&&c.prototype[s],g=!!d&&("values"==d.name||void 0==d.name),v=function(){return u.call(f(this))};p("entries",(function(){return h.call(f(this))})),p("keys",(function(){return l.call(f(this))})),p("values",v,!g),p(s,v,!g)},f342:function(t,e,r){"use strict";var n=r("62d1"),o=r("3d27"),i=r("a136");t.exports=function(t,e,r){var a=n(e);a in t?o.f(t,a,i(0,r)):t[a]=r}},f4ec:function(t,e,r){var n=r("9c34"),o=r("eb35"),i=r("4582"),a=r("a4fc"),s=function(t){return function(e,r,s,c){n(r);var u=o(e),l=i(u),h=a(u.length),f=t?h-1:0,p=t?-1:1;if(s<2)while(1){if(f in l){c=l[f],f+=p;break}if(f+=p,t?f<0:h<=f)throw TypeError("Reduce of empty array with no initial value")}for(;t?f>=0:h>f;f+=p)f in l&&(c=r(c,l[f],f,u));return c}};t.exports={left:s(!1),right:s(!0)}},f5bd:function(t,e,r){var n=r("cdcb"),o=r("3d27").f,i=Function.prototype,a=i.toString,s=/^\s*function ([^ (]*)/,c="name";n&&!(c in i)&&o(i,c,{configurable:!0,get:function(){try{return a.call(this).match(s)[1]}catch(t){return""}}})},fe7c:function(t,e,r){"use strict";var n=r("eb35"),o=r("bfff"),i=r("a4fc"),a=Math.min;t.exports=[].copyWithin||function(t,e){var r=n(this),s=i(r.length),c=o(t,s),u=o(e,s),l=arguments.length>2?arguments[2]:void 0,h=a((void 0===l?s:o(l,s))-u,s-c),f=1;u<c&&c<u+h&&(f=-1,u+=h-1,c+=h-1);while(h-- >0)u in r?r[c]=r[u]:delete r[c],c+=f,u+=f;return r}}}]);
|