fastman2 2.8.2 → 2.8.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fileuploadman.js +1 -1
- package/package.json +1 -1
package/fileuploadman.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.fastman=t():e.fastman=t()}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=16)}([function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(n=window)}e.exports=n},,,function(e,t,n){"use strict";var r=function(){try{return new Blob,!0}catch(e){return!1}}()?window.Blob:function(e,t){var n=new(window.BlobBuilder||window.WebKitBlobBuilder||window.MSBlobBuilder||window.MozBlobBuilder);return e.forEach(function(e){n.append(e)}),n.getBlob(t?t.type:void 0)},i=function(){function e(){var e=this,n=[],i=Array(21).join("-")+(+new Date*(1e16*Math.random())).toString(36),o=XMLHttpRequest.prototype.send;this.getParts=function(){return n.toString()},this.append=function(e,t,r){n.push("--"+i+'\r\nContent-Disposition: form-data; name="'+e+'"'),t instanceof Blob?(n.push('; filename="'+(r||"blob")+'"\r\nContent-Type: '+t.type+"\r\n\r\n"),n.push(t)):n.push("\r\n\r\n"+t),n.push("\r\n")},t++,XMLHttpRequest.prototype.send=function(a){var s,u,c=this;a===e?(n.push("--"+i+"--\r\n"),u=new r(n),s=new FileReader,s.onload=function(){o.call(c,s.result)},s.onerror=function(e){throw e},s.readAsArrayBuffer(u),this.setRequestHeader("Content-Type","multipart/form-data; boundary="+i),0==--t&&(XMLHttpRequest.prototype.send=o)):o.call(this,a)}}var t=0;return e.prototype=Object.create(FormData.prototype),e}();e.exports={Blob:r,FormData:function(){return~navigator.userAgent.indexOf("Android")&&~navigator.vendor.indexOf("Google")&&!~navigator.userAgent.indexOf("Chrome")&&navigator.userAgent.match(/AppleWebKit\/(\d+)/).pop()<=534||/MQQBrowser/g.test(navigator.userAgent)}()?i:FormData}},function(e,t,n){"use strict";(function(t){var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};!function(r){function i(e,t){return function(){e.apply(t,arguments)}}function o(e){if("object"!==n(this))throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=null,this._value=null,this._deferreds=[],l(e,i(s,this),i(u,this))}function a(e){var t=this;if(null===this._state)return void this._deferreds.push(e);d(function(){var n=t._state?e.onFulfilled:e.onRejected;if(null===n)return void(t._state?e.resolve:e.reject)(t._value);var r;try{r=n(t._value)}catch(t){return void e.reject(t)}e.resolve(r)})}function s(e){try{if(e===this)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"===(void 0===e?"undefined":n(e))||"function"==typeof e)){var t=e.then;if("function"==typeof t)return void l(i(t,e),i(s,this),i(u,this))}this._state=!0,this._value=e,c.call(this)}catch(e){u.call(this,e)}}function u(e){this._state=!1,this._value=e,c.call(this)}function c(){for(var e=0,t=this._deferreds.length;e<t;e++)a.call(this,this._deferreds[e]);this._deferreds=null}function f(e,t,n,r){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.resolve=n,this.reject=r}function l(e,t,n){var r=!1;try{e(function(e){r||(r=!0,t(e))},function(e){r||(r=!0,n(e))})}catch(e){if(r)return;r=!0,n(e)}}var d="function"==typeof t&&t||function(e){setTimeout(e,1)},h=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};o.prototype.catch=function(e){return this.then(null,e)},o.prototype.then=function(e,t){var n=this;return new o(function(r,i){a.call(n,new f(e,t,r,i))})},o.all=function(){var e=Array.prototype.slice.call(1===arguments.length&&h(arguments[0])?arguments[0]:arguments);return new o(function(t,r){function i(a,s){try{if(s&&("object"===(void 0===s?"undefined":n(s))||"function"==typeof s)){var u=s.then;if("function"==typeof u)return void u.call(s,function(e){i(a,e)},r)}e[a]=s,0==--o&&t(e)}catch(e){r(e)}}if(0===e.length)return t([]);for(var o=e.length,a=0;a<e.length;a++)i(a,e[a])})},o.resolve=function(e){return e&&"object"===(void 0===e?"undefined":n(e))&&e.constructor===o?e:new o(function(t){t(e)})},o.reject=function(e){return new o(function(t,n){n(e)})},o.race=function(e){return new o(function(t,n){for(var r=0,i=e.length;r<i;r++)e[r].then(t,n)})},o._setImmediateFn=function(e){d=e},o.prototype.always=function(e){var t=this.constructor;return this.then(function(n){return t.resolve(e()).then(function(){return n})},function(n){return t.resolve(e()).then(function(){throw n})})},void 0!==e&&e.exports?e.exports=o:r.Promise||(r.Promise=o)}(void 0)}).call(t,n(27).setImmediate)},function(e,t,n){"use strict";var r,i,o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};(function(){function n(e){return!!e.exifdata}function a(e,t){t=t||e.match(/^data\:([^\;]+)\;base64,/im)[1]||"",e=e.replace(/^data\:([^\;]+)\;base64,/gim,"");for(var n=atob(e),r=n.length,i=new ArrayBuffer(r),o=new Uint8Array(i),a=0;a<r;a++)o[a]=n.charCodeAt(a);return i}function s(e,t){var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="blob",n.onload=function(e){200!=this.status&&0!==this.status||t(this.response)},n.send()}function u(e,t){function n(n){var r=c(n),i=f(n);e.exifdata=r||{},e.iptcdata=i||{},t&&t.call(e)}if(e.src)if(/^data\:/i.test(e.src)){var r=a(e.src);n(r)}else if(/^blob\:/i.test(e.src)){var i=new FileReader;i.onload=function(e){n(e.target.result)},s(e.src,function(e){i.readAsArrayBuffer(e)})}else{var o=new XMLHttpRequest;o.onload=function(){200==this.status||0===this.status?n(o.response):t(new Error("Could not load image")),o=null},o.open("GET",e.src,!0),o.responseType="arraybuffer",o.send(null)}else if(window.FileReader&&(e instanceof window.Blob||e instanceof window.File)){var i=new FileReader;i.onload=function(e){n(e.target.result)},i.readAsArrayBuffer(e)}}function c(e){var t=new DataView(e);if(255!=t.getUint8(0)||216!=t.getUint8(1))return!1;for(var n=2,r=e.byteLength;n<r;){if(255!=t.getUint8(n))return!1;if(225==t.getUint8(n+1))return p(t,n+4,t.getUint16(n+2));n+=2+t.getUint16(n+2)}}function f(e){var t=new DataView(e);if(255!=t.getUint8(0)||216!=t.getUint8(1))return!1;for(var n=2,r=e.byteLength;n<r;){if(function(e,t){return 56===e.getUint8(t)&&66===e.getUint8(t+1)&&73===e.getUint8(t+2)&&77===e.getUint8(t+3)&&4===e.getUint8(t+4)&&4===e.getUint8(t+5)}(t,n)){var i=t.getUint8(n+7);i%2!=0&&(i+=1),0===i&&(i=4);return l(e,n+8+i,t.getUint16(n+6+i))}n++}}function l(e,t,n){for(var r,i,o,a,s=new DataView(e),u={},c=t;c<t+n;)28===s.getUint8(c)&&2===s.getUint8(c+1)&&(a=s.getUint8(c+2))in S&&(o=s.getInt16(c+3),o+5,i=S[a],r=g(s,c+5,o),u.hasOwnProperty(i)?u[i]instanceof Array?u[i].push(r):u[i]=[u[i],r]:u[i]=r),c++;return u}function d(e,t,n,r,i){var o,a,s,u=e.getUint16(n,!i),c={};for(s=0;s<u;s++)o=n+12*s+2,a=r[e.getUint16(o,!i)],c[a]=h(e,o,t,n,i);return c}function h(e,t,n,r,i){var o,a,s,u,c,f,l=e.getUint16(t+2,!i),d=e.getUint32(t+4,!i),h=e.getUint32(t+8,!i)+n;switch(l){case 1:case 7:if(1==d)return e.getUint8(t+8,!i);for(o=d>4?h:t+8,a=[],u=0;u<d;u++)a[u]=e.getUint8(o+u);return a;case 2:return o=d>4?h:t+8,g(e,o,d-1);case 3:if(1==d)return e.getUint16(t+8,!i);for(o=d>2?h:t+8,a=[],u=0;u<d;u++)a[u]=e.getUint16(o+2*u,!i);return a;case 4:if(1==d)return e.getUint32(t+8,!i);for(a=[],u=0;u<d;u++)a[u]=e.getUint32(h+4*u,!i);return a;case 5:if(1==d)return c=e.getUint32(h,!i),f=e.getUint32(h+4,!i),s=new Number(c/f),s.numerator=c,s.denominator=f,s;for(a=[],u=0;u<d;u++)c=e.getUint32(h+8*u,!i),f=e.getUint32(h+4+8*u,!i),a[u]=new Number(c/f),a[u].numerator=c,a[u].denominator=f;return a;case 9:if(1==d)return e.getInt32(t+8,!i);for(a=[],u=0;u<d;u++)a[u]=e.getInt32(h+4*u,!i);return a;case 10:if(1==d)return e.getInt32(h,!i)/e.getInt32(h+4,!i);for(a=[],u=0;u<d;u++)a[u]=e.getInt32(h+8*u,!i)/e.getInt32(h+4+8*u,!i);return a}}function g(e,t,n){var r,i="";for(r=t;r<t+n;r++)i+=String.fromCharCode(e.getUint8(r));return i}function p(e,t){if("Exif"!=g(e,t,4))return!1;var n,r,i,o,a,s=t+6;if(18761==e.getUint16(s))n=!1;else{if(19789!=e.getUint16(s))return!1;n=!0}if(42!=e.getUint16(s+2,!n))return!1;var u=e.getUint32(s+4,!n);if(u<8)return!1;if(r=d(e,s,s+u,v,n),r.ExifIFDPointer){o=d(e,s,s+r.ExifIFDPointer,w,n);for(i in o){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":o[i]=b[i][o[i]];break;case"ExifVersion":case"FlashpixVersion":o[i]=String.fromCharCode(o[i][0],o[i][1],o[i][2],o[i][3]);break;case"ComponentsConfiguration":o[i]=b.Components[o[i][0]]+b.Components[o[i][1]]+b.Components[o[i][2]]+b.Components[o[i][3]]}r[i]=o[i]}}if(r.GPSInfoIFDPointer){a=d(e,s,s+r.GPSInfoIFDPointer,y,n);for(i in a){switch(i){case"GPSVersionID":a[i]=a[i][0]+"."+a[i][1]+"."+a[i][2]+"."+a[i][3]}r[i]=a[i]}}return r}var m=function e(t){return t instanceof e?t:this instanceof e?void(this.EXIFwrapped=t):new e(t)};void 0!==e&&e.exports&&(t=e.exports=m),t.EXIF=m;var w=m.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"},v=m.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"},y=m.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"},b=m.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"}},S={120:"caption",110:"credit",25:"keywords",55:"dateCreated",80:"byline",85:"bylineTitle",122:"captionWriter",105:"headline",116:"copyright",15:"category"};m.getData=function(e,t){return!((e instanceof Image||e instanceof HTMLImageElement)&&!e.complete)&&(n(e)?t&&t.call(e):u(e,t),!0)},m.getTag=function(e,t){if(n(e))return e.exifdata[t]},m.getAllTags=function(e){if(!n(e))return{};var t,r=e.exifdata,i={};for(t in r)r.hasOwnProperty(t)&&(i[t]=r[t]);return i},m.pretty=function(e){if(!n(e))return"";var t,r=e.exifdata,i="";for(t in r)r.hasOwnProperty(t)&&("object"==o(r[t])?r[t]instanceof Number?i+=t+" : "+r[t]+" ["+r[t].numerator+"/"+r[t].denominator+"]\r\n":i+=t+" : ["+r[t].length+" values]\r\n":i+=t+" : "+r[t]+"\r\n");return i},m.readFromBinaryFile=function(e){return c(e)},r=[],void 0!==(i=function(){return m}.apply(t,r))&&(e.exports=i)}).call(void 0)},function(e,t,n){"use strict";function r(e){function t(e){for(var t=[16,11,10,16,24,40,51,61,12,12,14,19,26,58,60,55,14,13,16,24,40,57,69,56,14,17,22,29,51,87,80,62,18,22,37,56,68,109,103,77,24,35,55,64,81,104,113,92,49,64,78,87,103,121,120,101,72,92,95,98,112,100,103,99],n=0;n<64;n++){var r=P((t[n]*e+50)/100);r<1?r=1:r>255&&(r=255),T[k[n]]=r}for(var i=[17,18,24,47,99,99,99,99,18,21,26,66,99,99,99,99,24,26,56,99,99,99,99,99,47,66,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99],o=0;o<64;o++){var a=P((i[o]*e+50)/100);a<1?a=1:a>255&&(a=255),C[k[o]]=a}for(var s=[1,1.387039845,1.306562965,1.175875602,1,.785694958,.5411961,.275899379],u=0,c=0;c<8;c++)for(var f=0;f<8;f++)D[u]=1/(T[k[u]]*s[c]*s[f]*8),F[u]=1/(C[k[u]]*s[c]*s[f]*8),u++}function n(e,t){for(var n=0,r=0,i=new Array,o=1;o<=16;o++){for(var a=1;a<=e[o];a++)i[t[r]]=[],i[t[r]][0]=n,i[t[r]][1]=o,r++,n++;n*=2}return i}function r(){v=n(N,W),y=n(V,X),b=n(H,q),S=n(z,Q)}function i(){for(var e=1,t=2,n=1;n<=15;n++){for(var r=e;r<t;r++)U[32767+r]=n,x[32767+r]=[],x[32767+r][1]=n,x[32767+r][0]=r;for(var i=-(t-1);i<=-e;i++)U[32767+i]=n,x[32767+i]=[],x[32767+i][1]=n,x[32767+i][0]=t-1+i;e<<=1,t<<=1}}function o(){for(var e=0;e<256;e++)G[e]=19595*e,G[e+256>>0]=38470*e,G[e+512>>0]=7471*e+32768,G[e+768>>0]=-11059*e,G[e+1024>>0]=-21709*e,G[e+1280>>0]=32768*e+8421375,G[e+1536>>0]=-27439*e,G[e+1792>>0]=-5329*e}function a(e){for(var t=e[0],n=e[1]-1;n>=0;)t&1<<n&&(R|=1<<O),n--,--O<0&&(255==R?(s(255),s(0)):s(R),O=7,R=0)}function s(e){M.push(B[e])}function u(e){s(e>>8&255),s(255&e)}function c(e,t){var n,r,i,o,a,s,u,c,f,l=0;for(f=0;f<8;++f){n=e[l],r=e[l+1],i=e[l+2],o=e[l+3],a=e[l+4],s=e[l+5],u=e[l+6],c=e[l+7];var d=n+c,h=n-c,g=r+u,p=r-u,m=i+s,w=i-s,v=o+a,y=o-a,b=d+v,S=d-v,I=g+m,P=g-m;e[l]=b+I,e[l+4]=b-I;var T=.707106781*(P+S);e[l+2]=S+T,e[l+6]=S-T,b=y+w,I=w+p,P=p+h;var C=.382683433*(b-P),D=.5411961*b+C,F=1.306562965*P+C,x=.707106781*I,U=h+x,A=h-x;e[l+5]=A+D,e[l+3]=A-D,e[l+1]=U+F,e[l+7]=U-F,l+=8}for(l=0,f=0;f<8;++f){n=e[l],r=e[l+8],i=e[l+16],o=e[l+24],a=e[l+32],s=e[l+40],u=e[l+48],c=e[l+56];var M=n+c,R=n-c,O=r+u,j=r-u,E=i+s,_=i-s,B=o+a,G=o-a,k=M+B,N=M-B,W=O+E,H=O-E;e[l]=k+W,e[l+32]=k-W;var q=.707106781*(H+N);e[l+16]=N+q,e[l+48]=N-q,k=G+_,W=_+j,H=j+R;var V=.382683433*(k-H),X=.5411961*k+V,z=1.306562965*H+V,Q=.707106781*W,Y=R+Q,K=R-Q;e[l+40]=K+X,e[l+24]=K-X,e[l+8]=Y+z,e[l+56]=Y-z,l++}var J;for(f=0;f<64;++f)J=e[f]*t[f],L[f]=J>0?J+.5|0:J-.5|0;return L}function f(){u(65504),u(16),s(74),s(70),s(73),s(70),s(0),s(1),s(1),s(0),u(1),u(1),s(0),s(0)}function l(e,t){u(65472),u(17),s(8),u(t),u(e),s(3),s(1),s(17),s(0),s(2),s(17),s(1),s(3),s(17),s(1)}function d(){u(65499),u(132),s(0);for(var e=0;e<64;e++)s(T[e]);s(1);for(var t=0;t<64;t++)s(C[t])}function h(){u(65476),u(418),s(0);for(var e=0;e<16;e++)s(N[e+1]);for(var t=0;t<=11;t++)s(W[t]);s(16);for(var n=0;n<16;n++)s(H[n+1]);for(var r=0;r<=161;r++)s(q[r]);s(1);for(var i=0;i<16;i++)s(V[i+1]);for(var o=0;o<=11;o++)s(X[o]);s(17);for(var a=0;a<16;a++)s(z[a+1]);for(var c=0;c<=161;c++)s(Q[c])}function g(){u(65498),u(12),s(3),s(1),s(0),s(2),s(17),s(3),s(17),s(0),s(63),s(0)}function p(e,t,n,r,i){for(var o,s=i[0],u=i[240],f=c(e,t),l=0;l<64;++l)A[k[l]]=f[l];var d=A[0]-n;n=A[0],0==d?a(r[0]):(o=32767+d,a(r[U[o]]),a(x[o]));for(var h=63;h>0&&0==A[h];h--);if(0==h)return a(s),n;for(var g,p=1;p<=h;){for(var m=p;0==A[p]&&p<=h;++p);var w=p-m;if(w>=16){g=w>>4;for(var v=1;v<=g;++v)a(u);w&=15}o=32767+A[p],a(i[(w<<4)+U[o]]),a(x[o]),p++}return 63!=h&&a(s),n}function m(){for(var e=String.fromCharCode,t=0;t<256;t++)B[t]=e(t)}function w(e){if(e<=0&&(e=1),e>100&&(e=100),I!=e){var n=0;n=e<50?Math.floor(5e3/e):Math.floor(200-2*e),t(n),I=e}}var v,y,b,S,I,P=(Math.round,Math.floor),T=new Array(64),C=new Array(64),D=new Array(64),F=new Array(64),x=new Array(65535),U=new Array(65535),L=new Array(64),A=new Array(64),M=[],R=0,O=7,j=new Array(64),E=new Array(64),_=new Array(64),B=new Array(256),G=new Array(2048),k=[0,1,5,6,14,15,27,28,2,4,7,13,16,26,29,42,3,8,12,17,25,30,41,43,9,11,18,24,31,40,44,53,10,19,23,32,39,45,52,54,20,22,33,38,46,51,55,60,21,34,37,47,50,56,59,61,35,36,48,49,57,58,62,63],N=[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],W=[0,1,2,3,4,5,6,7,8,9,10,11],H=[0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],q=[1,2,3,0,4,17,5,18,33,49,65,6,19,81,97,7,34,113,20,50,129,145,161,8,35,66,177,193,21,82,209,240,36,51,98,114,130,9,10,22,23,24,25,26,37,38,39,40,41,42,52,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,225,226,227,228,229,230,231,232,233,234,241,242,243,244,245,246,247,248,249,250],V=[0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0],X=[0,1,2,3,4,5,6,7,8,9,10,11],z=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],Q=[0,1,2,3,17,4,5,33,49,6,18,65,81,7,97,113,19,34,50,129,8,20,66,145,161,177,193,9,35,51,82,240,21,98,114,209,10,22,36,52,225,37,241,23,24,25,26,38,39,40,41,42,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,130,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,226,227,228,229,230,231,232,233,234,242,243,244,245,246,247,248,249,250];this.encode=function(e,t,n){var r=(new Date).getTime();t&&w(t),M=new Array,R=0,O=7,u(65496),f(),d(),l(e.width,e.height),h(),g();var i=0,o=0,s=0;R=0,O=7,this.encode.displayName="_encode_";for(var c,m,I,P,T,C,x,U,L,A=e.data,B=e.width,k=e.height,N=4*B,W=0;W<k;){for(c=0;c<N;){for(T=N*W+c,C=T,x=-1,U=0,L=0;L<64;L++)U=L>>3,x=4*(7&L),C=T+U*N+x,W+U>=k&&(C-=N*(W+1+U-k)),c+x>=N&&(C-=c+x-N+4),m=A[C++],I=A[C++],P=A[C++],j[L]=(G[m]+G[I+256>>0]+G[P+512>>0]>>16)-128,E[L]=(G[m+768>>0]+G[I+1024>>0]+G[P+1280>>0]>>16)-128,_[L]=(G[m+1280>>0]+G[I+1536>>0]+G[P+1792>>0]>>16)-128;i=p(j,D,i,v,b),o=p(E,F,o,y,S),s=p(_,F,s,y,S),c+=32}W+=8}if(O>=0){var H=[];H[1]=O+1,H[0]=(1<<O+1)-1,a(H)}if(u(65497),n){for(var q=M.length,V=new Uint8Array(q),X=0;X<q;X++)V[X]=M[X].charCodeAt();M=[];(new Date).getTime();return V}var z="data:image/jpeg;base64,"+btoa(M.join(""));M=[];(new Date).getTime();return z},function(){(new Date).getTime();e||(e=50),m(),r(),i(),o(),w(e),(new Date).getTime()}()}e.exports=r},function(e,t,n){"use strict";var r,i;!function(){function n(e){var t=e.naturalWidth;if(t*e.naturalHeight>1048576){var n=document.createElement("canvas");n.width=n.height=1;var r=n.getContext("2d");return r.drawImage(e,1-t,0),0===r.getImageData(0,0,1,1).data[3]}return!1}function o(e,t,n){var r=document.createElement("canvas");r.width=1,r.height=n;var i=r.getContext("2d");i.drawImage(e,0,0);for(var o=i.getImageData(0,0,1,n).data,a=0,s=n,u=n;u>a;){0===o[4*(u-1)+3]?s=u:a=u,u=s+a>>1}var c=u/n;return 0===c?1:c}function a(e,t,n){var r=document.createElement("canvas");return s(e,r,t,n),r.toDataURL("image/jpeg",t.quality||.8)}function s(e,t,r,i){var a=e.naturalWidth,s=e.naturalHeight,c=r.width,f=r.height,l=t.getContext("2d");l.save(),u(t,l,c,f,r.orientation),n(e)&&(a/=2,s/=2);var d=1024,h=document.createElement("canvas");h.width=h.height=d;for(var g=h.getContext("2d"),p=i?o(e,a,s):1,m=Math.ceil(d*c/a),w=Math.ceil(d*f/s/p),v=0,y=0;v<s;){for(var b=0,S=0;b<a;)g.clearRect(0,0,d,d),g.drawImage(e,-b,-v),l.drawImage(h,0,0,d,d,S,y,m,w),b+=d,S+=m;v+=d,y+=w}l.restore(),h=g=null}function u(e,t,n,r,i){switch(i){case 5:case 6:case 7:case 8:e.width=r,e.height=n;break;default:e.width=n,e.height=r}switch(i){case 2:t.translate(n,0),t.scale(-1,1);break;case 3:t.translate(n,r),t.rotate(Math.PI);break;case 4:t.translate(0,r),t.scale(1,-1);break;case 5:t.rotate(.5*Math.PI),t.scale(1,-1);break;case 6:t.rotate(.5*Math.PI),t.translate(0,-r);break;case 7:t.rotate(.5*Math.PI),t.translate(n,-r),t.scale(-1,1);break;case 8:t.rotate(-.5*Math.PI),t.translate(-n,0)}}function c(e){if(window.Blob&&e instanceof Blob){var t=new Image,n=window.URL&&window.URL.createObjectURL?window.URL:window.webkitURL&&window.webkitURL.createObjectURL?window.webkitURL:null;if(!n)throw Error("No createObjectURL function found to create blob url");t.src=n.createObjectURL(e),this.blob=e,e=t}if(!e.naturalWidth&&!e.naturalHeight){var r=this;e.onload=function(){var e=r.imageLoadListeners;if(e){r.imageLoadListeners=null;for(var t=0,n=e.length;t<n;t++)e[t]()}},this.imageLoadListeners=[]}this.srcImage=e}c.prototype.render=function(e,t,n){if(this.imageLoadListeners){var r=this;return void this.imageLoadListeners.push(function(){r.render(e,t,n)})}t=t||{};var i=this.srcImage,o=i.src,u=o.length,c=i.naturalWidth,f=i.naturalHeight,l=t.width,d=t.height,h=t.maxWidth,g=t.maxHeight,p=this.blob&&"image/jpeg"===this.blob.type||0===o.indexOf("data:image/jpeg")||o.indexOf(".jpg")===u-4||o.indexOf(".jpeg")===u-5;l&&!d?d=f*l/c<<0:d&&!l?l=c*d/f<<0:(l=c,d=f),h&&l>h&&(l=h,d=f*l/c<<0),g&&d>g&&(d=g,l=c*d/f<<0);var m={width:l,height:d};for(var w in t)m[w]=t[w];var v=e.tagName.toLowerCase();"img"===v?e.src=a(this.srcImage,m,p):"canvas"===v&&s(this.srcImage,e,m,p),"function"==typeof this.onrender&&this.onrender(e),n&&n()},r=[],void 0!==(i=function(){return c}.apply(t,r))&&(e.exports=i)}()},,,,,,,,,function(e,t,n){"use strict";function r(e,t){var n=this;if(!e)throw new Error("没有接受到图片");t=t||{},n.defaults={width:null,height:null,fieldName:"file",quality:.7},n.file=e;for(var r in t)t.hasOwnProperty(r)&&(n.defaults[r]=t[r]);return this.init()}function i(e){var t;t=e.split(",")[0].indexOf("base64")>=0?atob(e.split(",")[1]):unescape(e.split(",")[1]);for(var n=e.split(",")[0].split(":")[1].split(";")[0],r=new Uint8Array(t.length),i=0;i<t.length;i++)r[i]=t.charCodeAt(i);return new s.Blob([r.buffer],{type:n})}Object.defineProperty(t,"__esModule",{value:!0});var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};window.URL=window.URL||window.webkitURL;var a=n(4),s=n(3),u=n(5),c=n(7),f=n(6),l=function(e){var t=/OS (\d)_.* like Mac OS X/g.exec(e),n=/Android (\d.*?);/g.exec(e)||/Android\/(\d.*?) /g.exec(e);return{oldIOS:!!t&&+t.pop()<8,oldAndroid:!!n&&+n.pop().substr(0,3)<4.5,iOS:/\(i[^;]+;( U;)? CPU.+Mac OS X/.test(e),android:/Android/g.test(e),mQQBrowser:/MQQBrowser/g.test(e)}}(navigator.userAgent);r.prototype.init=function(){var e=this,t=e.file,n="string"==typeof t,r=/^data:/.test(t),u=new Image,c=document.createElement("canvas"),f=n?t:URL.createObjectURL(t);if(e.img=u,e.blob=f,e.canvas=c,e.fileName=n?r?"base64.jpg":t.split("/").pop():t.name,!document.createElement("canvas").getContext)throw new Error("浏览器不支持canvas");return new a(function(n,a){u.onerror=function(){var e=new Error("加载图片文件失败");throw a(e),e},u.onload=function(){e._getBase64().then(function(e){if(e.length<10){var t=new Error("生成base64失败");throw a(t),t}return e}).then(function(r){var a=null;"object"===o(e.file)&&r.length>e.file.size?(a=new FormData,t=e.file):(a=new s.FormData,t=i(r)),a.append(e.defaults.fieldName,t,e.fileName.replace(/\..+/g,".jpg")),n({formData:a,fileLen:+t.size,base64:r,base64Len:r.length,origin:e.file,file:t});for(var u in e)e.hasOwnProperty(u)&&(e[u]=null);URL.revokeObjectURL(e.blob)})},!r&&(u.crossOrigin="*"),u.src=f})},r.prototype._getBase64=function(){var e=this,t=e.img,n=e.file,r=e.canvas;return new a(function(i){try{u.getData("object"===(void 0===n?"undefined":o(n))?n:t,function(){e.orientation=u.getTag(this,"Orientation"),e.resize=e._getResize(),e.ctx=r.getContext("2d"),r.width=e.resize.width,r.height=e.resize.height,e.ctx.fillStyle="#fff",e.ctx.fillRect(0,0,r.width,r.height),l.oldIOS?e._createBase64ForOldIOS().then(i):e._createBase64().then(i)})}catch(e){throw new Error(e)}})},r.prototype._createBase64ForOldIOS=function(){var e=this,t=e.img,n=e.canvas,r=e.defaults,i=e.orientation;return new a(function(e){var o=new c(t);"5678".indexOf(i)>-1?o.render(n,{width:n.height,height:n.width,orientation:i}):o.render(n,{width:n.width,height:n.height,orientation:i}),e(n.toDataURL("image/jpeg",r.quality))})},r.prototype._createBase64=function(){var e=this,t=e.resize,n=e.img,r=e.canvas,i=e.ctx,o=e.defaults,s=e.orientation;switch(l.iOS&&(s=2),s){case 3:i.rotate(180*Math.PI/180),i.drawImage(n,-t.width,-t.height,t.width,t.height);break;case 6:i.rotate(90*Math.PI/180),i.drawImage(n,0,-t.width,t.height,t.width);break;case 8:i.rotate(270*Math.PI/180),i.drawImage(n,-t.height,0,t.height,t.width);break;case 2:i.translate(t.width,0),i.scale(-1,1),i.drawImage(n,0,0,t.width,t.height);break;case 4:i.translate(t.width,0),i.scale(-1,1),i.rotate(180*Math.PI/180),i.drawImage(n,-t.width,-t.height,t.width,t.height);break;case 5:i.translate(t.width,0),i.scale(-1,1),i.rotate(90*Math.PI/180),i.drawImage(n,0,-t.width,t.height,t.width);break;case 7:i.translate(t.width,0),i.scale(-1,1),i.rotate(270*Math.PI/180),i.drawImage(n,-t.height,0,t.height,t.width);break;default:i.drawImage(n,0,0,t.width,t.height)}return new a(function(e){if(l.oldAndroid||l.mQQBrowser||!navigator.userAgent){var t=new f,n=i.getImageData(0,0,r.width,r.height);e(t.encode(n,100*o.quality))}else e(r.toDataURL("image/jpeg",o.quality))})},r.prototype._getResize=function(){var e=this,t=e.img,n=e.defaults,r=n.width,i=n.height,o=e.orientation,a={width:t.width,height:t.height};if("5678".indexOf(o)>-1&&(a.width=t.height,a.height=t.width),a.width<r||a.height<i)return a;var s=a.width/a.height;for(r&&i?s>=r/i?a.width>r&&(a.width=r,a.height=Math.ceil(r/s)):a.height>i&&(a.height=i,a.width=Math.ceil(i*s)):r?r<a.width&&(a.width=r,a.height=Math.ceil(r/s)):i&&i<a.height&&(a.width=Math.ceil(i*s),a.height=i);a.width>=3264||a.height>=2448;)a.width*=.8,a.height*=.8;return a};var d=function(e,t){return new r(e,t)};t.upload=d},,,,,,,function(e,t){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function i(e){if(f===setTimeout)return setTimeout(e,0);if((f===n||!f)&&setTimeout)return f=setTimeout,setTimeout(e,0);try{return f(e,0)}catch(t){try{return f.call(null,e,0)}catch(t){return f.call(this,e,0)}}}function o(e){if(l===clearTimeout)return clearTimeout(e);if((l===r||!l)&&clearTimeout)return l=clearTimeout,clearTimeout(e);try{return l(e)}catch(t){try{return l.call(null,e)}catch(t){return l.call(this,e)}}}function a(){p&&h&&(p=!1,h.length?g=h.concat(g):m=-1,g.length&&s())}function s(){if(!p){var e=i(a);p=!0;for(var t=g.length;t;){for(h=g,g=[];++m<t;)h&&h[m].run();m=-1,t=g.length}h=null,p=!1,o(e)}}function u(e,t){this.fun=e,this.array=t}function c(){}var f,l,d=e.exports={};!function(){try{f="function"==typeof setTimeout?setTimeout:n}catch(e){f=n}try{l="function"==typeof clearTimeout?clearTimeout:r}catch(e){l=r}}();var h,g=[],p=!1,m=-1;d.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];g.push(new u(e,t)),1!==g.length||p||i(s)},u.prototype.run=function(){this.fun.apply(null,this.array)},d.title="browser",d.browser=!0,d.env={},d.argv=[],d.version="",d.versions={},d.on=c,d.addListener=c,d.once=c,d.off=c,d.removeListener=c,d.removeAllListeners=c,d.emit=c,d.prependListener=c,d.prependOnceListener=c,d.listeners=function(e){return[]},d.binding=function(e){throw new Error("process.binding is not supported")},d.cwd=function(){return"/"},d.chdir=function(e){throw new Error("process.chdir is not supported")},d.umask=function(){return 0}},function(e,t,n){(function(e,t){!function(e,n){"use strict";function r(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n<t.length;n++)t[n]=arguments[n+1];var r={callback:e,args:t};return c[u]=r,s(u),u++}function i(e){delete c[e]}function o(e){var t=e.callback,r=e.args;switch(r.length){case 0:t();break;case 1:t(r[0]);break;case 2:t(r[0],r[1]);break;case 3:t(r[0],r[1],r[2]);break;default:t.apply(n,r)}}function a(e){if(f)setTimeout(a,0,e);else{var t=c[e];if(t){f=!0;try{o(t)}finally{i(e),f=!1}}}}if(!e.setImmediate){var s,u=1,c={},f=!1,l=e.document,d=Object.getPrototypeOf&&Object.getPrototypeOf(e);d=d&&d.setTimeout?d:e,"[object process]"==={}.toString.call(e.process)?function(){s=function(e){t.nextTick(function(){a(e)})}}():function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?function(){var t="setImmediate$"+Math.random()+"$",n=function(n){n.source===e&&"string"==typeof n.data&&0===n.data.indexOf(t)&&a(+n.data.slice(t.length))};e.addEventListener?e.addEventListener("message",n,!1):e.attachEvent("onmessage",n),s=function(n){e.postMessage(t+n,"*")}}():e.MessageChannel?function(){var e=new MessageChannel;e.port1.onmessage=function(e){a(e.data)},s=function(t){e.port2.postMessage(t)}}():l&&"onreadystatechange"in l.createElement("script")?function(){var e=l.documentElement;s=function(t){var n=l.createElement("script");n.onreadystatechange=function(){a(t),n.onreadystatechange=null,e.removeChild(n),n=null},e.appendChild(n)}}():function(){s=function(e){setTimeout(a,0,e)}}(),d.setImmediate=r,d.clearImmediate=i}}("undefined"==typeof self?void 0===e?this:e:self)}).call(t,n(0),n(23))},,,function(e,t,n){(function(e){function r(e,t){this._id=e,this._clearFn=t}var i=void 0!==e&&e||"undefined"!=typeof self&&self||window,o=Function.prototype.apply;t.setTimeout=function(){return new r(o.call(setTimeout,i,arguments),clearTimeout)},t.setInterval=function(){return new r(o.call(setInterval,i,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},r.prototype.unref=r.prototype.ref=function(){},r.prototype.close=function(){this._clearFn.call(i,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},n(24),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(t,n(0))}])});
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.fastman=t():e.fastman=t()}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=16)}([function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(n=window)}e.exports=n},,,function(e,t,n){"use strict";var r=function(){try{return new Blob,!0}catch(e){return!1}}()?window.Blob:function(e,t){var n=new(window.BlobBuilder||window.WebKitBlobBuilder||window.MSBlobBuilder||window.MozBlobBuilder);return e.forEach(function(e){n.append(e)}),n.getBlob(t?t.type:void 0)},i=function(){function e(){var e=this,n=[],i=Array(21).join("-")+(+new Date*(1e16*Math.random())).toString(36),o=XMLHttpRequest.prototype.send;this.getParts=function(){return n.toString()},this.append=function(e,t,r){n.push("--"+i+'\r\nContent-Disposition: form-data; name="'+e+'"'),t instanceof Blob?(n.push('; filename="'+(r||"blob")+'"\r\nContent-Type: '+t.type+"\r\n\r\n"),n.push(t)):n.push("\r\n\r\n"+t),n.push("\r\n")},t++,XMLHttpRequest.prototype.send=function(a){var s,u,c=this;a===e?(n.push("--"+i+"--\r\n"),u=new r(n),s=new FileReader,s.onload=function(){o.call(c,s.result)},s.onerror=function(e){throw e},s.readAsArrayBuffer(u),this.setRequestHeader("Content-Type","multipart/form-data; boundary="+i),0==--t&&(XMLHttpRequest.prototype.send=o)):o.call(this,a)}}var t=0;return e.prototype=Object.create(FormData.prototype),e}();e.exports={Blob:r,FormData:function(){return~navigator.userAgent.indexOf("Android")&&~navigator.vendor.indexOf("Google")&&!~navigator.userAgent.indexOf("Chrome")&&navigator.userAgent.match(/AppleWebKit\/(\d+)/).pop()<=534||/MQQBrowser/g.test(navigator.userAgent)}()?i:FormData}},function(e,t,n){"use strict";(function(t){var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};!function(r){function i(e,t){return function(){e.apply(t,arguments)}}function o(e){if("object"!==n(this))throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=null,this._value=null,this._deferreds=[],l(e,i(s,this),i(u,this))}function a(e){var t=this;if(null===this._state)return void this._deferreds.push(e);d(function(){var n=t._state?e.onFulfilled:e.onRejected;if(null===n)return void(t._state?e.resolve:e.reject)(t._value);var r;try{r=n(t._value)}catch(t){return void e.reject(t)}e.resolve(r)})}function s(e){try{if(e===this)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"===(void 0===e?"undefined":n(e))||"function"==typeof e)){var t=e.then;if("function"==typeof t)return void l(i(t,e),i(s,this),i(u,this))}this._state=!0,this._value=e,c.call(this)}catch(e){u.call(this,e)}}function u(e){this._state=!1,this._value=e,c.call(this)}function c(){for(var e=0,t=this._deferreds.length;e<t;e++)a.call(this,this._deferreds[e]);this._deferreds=null}function f(e,t,n,r){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.resolve=n,this.reject=r}function l(e,t,n){var r=!1;try{e(function(e){r||(r=!0,t(e))},function(e){r||(r=!0,n(e))})}catch(e){if(r)return;r=!0,n(e)}}var d="function"==typeof t&&t||function(e){setTimeout(e,1)},h=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};o.prototype.catch=function(e){return this.then(null,e)},o.prototype.then=function(e,t){var n=this;return new o(function(r,i){a.call(n,new f(e,t,r,i))})},o.all=function(){var e=Array.prototype.slice.call(1===arguments.length&&h(arguments[0])?arguments[0]:arguments);return new o(function(t,r){function i(a,s){try{if(s&&("object"===(void 0===s?"undefined":n(s))||"function"==typeof s)){var u=s.then;if("function"==typeof u)return void u.call(s,function(e){i(a,e)},r)}e[a]=s,0==--o&&t(e)}catch(e){r(e)}}if(0===e.length)return t([]);for(var o=e.length,a=0;a<e.length;a++)i(a,e[a])})},o.resolve=function(e){return e&&"object"===(void 0===e?"undefined":n(e))&&e.constructor===o?e:new o(function(t){t(e)})},o.reject=function(e){return new o(function(t,n){n(e)})},o.race=function(e){return new o(function(t,n){for(var r=0,i=e.length;r<i;r++)e[r].then(t,n)})},o._setImmediateFn=function(e){d=e},o.prototype.always=function(e){var t=this.constructor;return this.then(function(n){return t.resolve(e()).then(function(){return n})},function(n){return t.resolve(e()).then(function(){throw n})})},void 0!==e&&e.exports?e.exports=o:r.Promise||(r.Promise=o)}(void 0)}).call(t,n(27).setImmediate)},function(e,t,n){"use strict";var r,i,o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};(function(){function n(e){return!!e.exifdata}function a(e,t){t=t||e.match(/^data\:([^\;]+)\;base64,/im)[1]||"",e=e.replace(/^data\:([^\;]+)\;base64,/gim,"");for(var n=atob(e),r=n.length,i=new ArrayBuffer(r),o=new Uint8Array(i),a=0;a<r;a++)o[a]=n.charCodeAt(a);return i}function s(e,t){var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="blob",n.onload=function(e){200!=this.status&&0!==this.status||t(this.response)},n.send()}function u(e,t){function n(n){var r=c(n),i=f(n);e.exifdata=r||{},e.iptcdata=i||{},t&&t.call(e)}if(e.src)if(/^data\:/i.test(e.src)){var r=a(e.src);n(r)}else if(/^blob\:/i.test(e.src)){var i=new FileReader;i.onload=function(e){n(e.target.result)},s(e.src,function(e){i.readAsArrayBuffer(e)})}else{var o=new XMLHttpRequest;o.onload=function(){200==this.status||0===this.status?n(o.response):t(new Error("Could not load image")),o=null},o.open("GET",e.src,!0),o.responseType="arraybuffer",o.send(null)}else if(window.FileReader&&(e instanceof window.Blob||e instanceof window.File)){var i=new FileReader;i.onload=function(e){n(e.target.result)},i.readAsArrayBuffer(e)}}function c(e){var t=new DataView(e);if(255!=t.getUint8(0)||216!=t.getUint8(1))return!1;for(var n=2,r=e.byteLength;n<r;){if(255!=t.getUint8(n))return!1;if(225==t.getUint8(n+1))return p(t,n+4,t.getUint16(n+2));n+=2+t.getUint16(n+2)}}function f(e){var t=new DataView(e);if(255!=t.getUint8(0)||216!=t.getUint8(1))return!1;for(var n=2,r=e.byteLength;n<r;){if(function(e,t){return 56===e.getUint8(t)&&66===e.getUint8(t+1)&&73===e.getUint8(t+2)&&77===e.getUint8(t+3)&&4===e.getUint8(t+4)&&4===e.getUint8(t+5)}(t,n)){var i=t.getUint8(n+7);i%2!=0&&(i+=1),0===i&&(i=4);return l(e,n+8+i,t.getUint16(n+6+i))}n++}}function l(e,t,n){for(var r,i,o,a,s=new DataView(e),u={},c=t;c<t+n;)28===s.getUint8(c)&&2===s.getUint8(c+1)&&(a=s.getUint8(c+2))in S&&(o=s.getInt16(c+3),o+5,i=S[a],r=g(s,c+5,o),u.hasOwnProperty(i)?u[i]instanceof Array?u[i].push(r):u[i]=[u[i],r]:u[i]=r),c++;return u}function d(e,t,n,r,i){var o,a,s,u=e.getUint16(n,!i),c={};for(s=0;s<u;s++)o=n+12*s+2,a=r[e.getUint16(o,!i)],c[a]=h(e,o,t,n,i);return c}function h(e,t,n,r,i){var o,a,s,u,c,f,l=e.getUint16(t+2,!i),d=e.getUint32(t+4,!i),h=e.getUint32(t+8,!i)+n;switch(l){case 1:case 7:if(1==d)return e.getUint8(t+8,!i);for(o=d>4?h:t+8,a=[],u=0;u<d;u++)a[u]=e.getUint8(o+u);return a;case 2:return o=d>4?h:t+8,g(e,o,d-1);case 3:if(1==d)return e.getUint16(t+8,!i);for(o=d>2?h:t+8,a=[],u=0;u<d;u++)a[u]=e.getUint16(o+2*u,!i);return a;case 4:if(1==d)return e.getUint32(t+8,!i);for(a=[],u=0;u<d;u++)a[u]=e.getUint32(h+4*u,!i);return a;case 5:if(1==d)return c=e.getUint32(h,!i),f=e.getUint32(h+4,!i),s=new Number(c/f),s.numerator=c,s.denominator=f,s;for(a=[],u=0;u<d;u++)c=e.getUint32(h+8*u,!i),f=e.getUint32(h+4+8*u,!i),a[u]=new Number(c/f),a[u].numerator=c,a[u].denominator=f;return a;case 9:if(1==d)return e.getInt32(t+8,!i);for(a=[],u=0;u<d;u++)a[u]=e.getInt32(h+4*u,!i);return a;case 10:if(1==d)return e.getInt32(h,!i)/e.getInt32(h+4,!i);for(a=[],u=0;u<d;u++)a[u]=e.getInt32(h+8*u,!i)/e.getInt32(h+4+8*u,!i);return a}}function g(e,t,n){var r,i="";for(r=t;r<t+n;r++)i+=String.fromCharCode(e.getUint8(r));return i}function p(e,t){if("Exif"!=g(e,t,4))return!1;var n,r,i,o,a,s=t+6;if(18761==e.getUint16(s))n=!1;else{if(19789!=e.getUint16(s))return!1;n=!0}if(42!=e.getUint16(s+2,!n))return!1;var u=e.getUint32(s+4,!n);if(u<8)return!1;if(r=d(e,s,s+u,v,n),r.ExifIFDPointer){o=d(e,s,s+r.ExifIFDPointer,w,n);for(i in o){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":o[i]=b[i][o[i]];break;case"ExifVersion":case"FlashpixVersion":o[i]=String.fromCharCode(o[i][0],o[i][1],o[i][2],o[i][3]);break;case"ComponentsConfiguration":o[i]=b.Components[o[i][0]]+b.Components[o[i][1]]+b.Components[o[i][2]]+b.Components[o[i][3]]}r[i]=o[i]}}if(r.GPSInfoIFDPointer){a=d(e,s,s+r.GPSInfoIFDPointer,y,n);for(i in a){switch(i){case"GPSVersionID":a[i]=a[i][0]+"."+a[i][1]+"."+a[i][2]+"."+a[i][3]}r[i]=a[i]}}return r}var m=function e(t){return t instanceof e?t:this instanceof e?void(this.EXIFwrapped=t):new e(t)};void 0!==e&&e.exports&&(t=e.exports=m),t.EXIF=m;var w=m.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"},v=m.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"},y=m.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"},b=m.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"}},S={120:"caption",110:"credit",25:"keywords",55:"dateCreated",80:"byline",85:"bylineTitle",122:"captionWriter",105:"headline",116:"copyright",15:"category"};m.getData=function(e,t){return!((e instanceof Image||e instanceof HTMLImageElement)&&!e.complete)&&(n(e)?t&&t.call(e):u(e,t),!0)},m.getTag=function(e,t){if(n(e))return e.exifdata[t]},m.getAllTags=function(e){if(!n(e))return{};var t,r=e.exifdata,i={};for(t in r)r.hasOwnProperty(t)&&(i[t]=r[t]);return i},m.pretty=function(e){if(!n(e))return"";var t,r=e.exifdata,i="";for(t in r)r.hasOwnProperty(t)&&("object"==o(r[t])?r[t]instanceof Number?i+=t+" : "+r[t]+" ["+r[t].numerator+"/"+r[t].denominator+"]\r\n":i+=t+" : ["+r[t].length+" values]\r\n":i+=t+" : "+r[t]+"\r\n");return i},m.readFromBinaryFile=function(e){return c(e)},r=[],void 0!==(i=function(){return m}.apply(t,r))&&(e.exports=i)}).call(void 0)},function(e,t,n){"use strict";function r(e){function t(e){for(var t=[16,11,10,16,24,40,51,61,12,12,14,19,26,58,60,55,14,13,16,24,40,57,69,56,14,17,22,29,51,87,80,62,18,22,37,56,68,109,103,77,24,35,55,64,81,104,113,92,49,64,78,87,103,121,120,101,72,92,95,98,112,100,103,99],n=0;n<64;n++){var r=P((t[n]*e+50)/100);r<1?r=1:r>255&&(r=255),T[k[n]]=r}for(var i=[17,18,24,47,99,99,99,99,18,21,26,66,99,99,99,99,24,26,56,99,99,99,99,99,47,66,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99],o=0;o<64;o++){var a=P((i[o]*e+50)/100);a<1?a=1:a>255&&(a=255),C[k[o]]=a}for(var s=[1,1.387039845,1.306562965,1.175875602,1,.785694958,.5411961,.275899379],u=0,c=0;c<8;c++)for(var f=0;f<8;f++)D[u]=1/(T[k[u]]*s[c]*s[f]*8),F[u]=1/(C[k[u]]*s[c]*s[f]*8),u++}function n(e,t){for(var n=0,r=0,i=new Array,o=1;o<=16;o++){for(var a=1;a<=e[o];a++)i[t[r]]=[],i[t[r]][0]=n,i[t[r]][1]=o,r++,n++;n*=2}return i}function r(){v=n(N,W),y=n(V,X),b=n(H,q),S=n(z,Q)}function i(){for(var e=1,t=2,n=1;n<=15;n++){for(var r=e;r<t;r++)U[32767+r]=n,x[32767+r]=[],x[32767+r][1]=n,x[32767+r][0]=r;for(var i=-(t-1);i<=-e;i++)U[32767+i]=n,x[32767+i]=[],x[32767+i][1]=n,x[32767+i][0]=t-1+i;e<<=1,t<<=1}}function o(){for(var e=0;e<256;e++)G[e]=19595*e,G[e+256>>0]=38470*e,G[e+512>>0]=7471*e+32768,G[e+768>>0]=-11059*e,G[e+1024>>0]=-21709*e,G[e+1280>>0]=32768*e+8421375,G[e+1536>>0]=-27439*e,G[e+1792>>0]=-5329*e}function a(e){for(var t=e[0],n=e[1]-1;n>=0;)t&1<<n&&(R|=1<<O),n--,--O<0&&(255==R?(s(255),s(0)):s(R),O=7,R=0)}function s(e){M.push(B[e])}function u(e){s(e>>8&255),s(255&e)}function c(e,t){var n,r,i,o,a,s,u,c,f,l=0;for(f=0;f<8;++f){n=e[l],r=e[l+1],i=e[l+2],o=e[l+3],a=e[l+4],s=e[l+5],u=e[l+6],c=e[l+7];var d=n+c,h=n-c,g=r+u,p=r-u,m=i+s,w=i-s,v=o+a,y=o-a,b=d+v,S=d-v,I=g+m,P=g-m;e[l]=b+I,e[l+4]=b-I;var T=.707106781*(P+S);e[l+2]=S+T,e[l+6]=S-T,b=y+w,I=w+p,P=p+h;var C=.382683433*(b-P),D=.5411961*b+C,F=1.306562965*P+C,x=.707106781*I,U=h+x,A=h-x;e[l+5]=A+D,e[l+3]=A-D,e[l+1]=U+F,e[l+7]=U-F,l+=8}for(l=0,f=0;f<8;++f){n=e[l],r=e[l+8],i=e[l+16],o=e[l+24],a=e[l+32],s=e[l+40],u=e[l+48],c=e[l+56];var M=n+c,R=n-c,O=r+u,j=r-u,E=i+s,_=i-s,B=o+a,G=o-a,k=M+B,N=M-B,W=O+E,H=O-E;e[l]=k+W,e[l+32]=k-W;var q=.707106781*(H+N);e[l+16]=N+q,e[l+48]=N-q,k=G+_,W=_+j,H=j+R;var V=.382683433*(k-H),X=.5411961*k+V,z=1.306562965*H+V,Q=.707106781*W,Y=R+Q,K=R-Q;e[l+40]=K+X,e[l+24]=K-X,e[l+8]=Y+z,e[l+56]=Y-z,l++}var J;for(f=0;f<64;++f)J=e[f]*t[f],L[f]=J>0?J+.5|0:J-.5|0;return L}function f(){u(65504),u(16),s(74),s(70),s(73),s(70),s(0),s(1),s(1),s(0),u(1),u(1),s(0),s(0)}function l(e,t){u(65472),u(17),s(8),u(t),u(e),s(3),s(1),s(17),s(0),s(2),s(17),s(1),s(3),s(17),s(1)}function d(){u(65499),u(132),s(0);for(var e=0;e<64;e++)s(T[e]);s(1);for(var t=0;t<64;t++)s(C[t])}function h(){u(65476),u(418),s(0);for(var e=0;e<16;e++)s(N[e+1]);for(var t=0;t<=11;t++)s(W[t]);s(16);for(var n=0;n<16;n++)s(H[n+1]);for(var r=0;r<=161;r++)s(q[r]);s(1);for(var i=0;i<16;i++)s(V[i+1]);for(var o=0;o<=11;o++)s(X[o]);s(17);for(var a=0;a<16;a++)s(z[a+1]);for(var c=0;c<=161;c++)s(Q[c])}function g(){u(65498),u(12),s(3),s(1),s(0),s(2),s(17),s(3),s(17),s(0),s(63),s(0)}function p(e,t,n,r,i){for(var o,s=i[0],u=i[240],f=c(e,t),l=0;l<64;++l)A[k[l]]=f[l];var d=A[0]-n;n=A[0],0==d?a(r[0]):(o=32767+d,a(r[U[o]]),a(x[o]));for(var h=63;h>0&&0==A[h];h--);if(0==h)return a(s),n;for(var g,p=1;p<=h;){for(var m=p;0==A[p]&&p<=h;++p);var w=p-m;if(w>=16){g=w>>4;for(var v=1;v<=g;++v)a(u);w&=15}o=32767+A[p],a(i[(w<<4)+U[o]]),a(x[o]),p++}return 63!=h&&a(s),n}function m(){for(var e=String.fromCharCode,t=0;t<256;t++)B[t]=e(t)}function w(e){if(e<=0&&(e=1),e>100&&(e=100),I!=e){var n=0;n=e<50?Math.floor(5e3/e):Math.floor(200-2*e),t(n),I=e}}var v,y,b,S,I,P=(Math.round,Math.floor),T=new Array(64),C=new Array(64),D=new Array(64),F=new Array(64),x=new Array(65535),U=new Array(65535),L=new Array(64),A=new Array(64),M=[],R=0,O=7,j=new Array(64),E=new Array(64),_=new Array(64),B=new Array(256),G=new Array(2048),k=[0,1,5,6,14,15,27,28,2,4,7,13,16,26,29,42,3,8,12,17,25,30,41,43,9,11,18,24,31,40,44,53,10,19,23,32,39,45,52,54,20,22,33,38,46,51,55,60,21,34,37,47,50,56,59,61,35,36,48,49,57,58,62,63],N=[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],W=[0,1,2,3,4,5,6,7,8,9,10,11],H=[0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],q=[1,2,3,0,4,17,5,18,33,49,65,6,19,81,97,7,34,113,20,50,129,145,161,8,35,66,177,193,21,82,209,240,36,51,98,114,130,9,10,22,23,24,25,26,37,38,39,40,41,42,52,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,225,226,227,228,229,230,231,232,233,234,241,242,243,244,245,246,247,248,249,250],V=[0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0],X=[0,1,2,3,4,5,6,7,8,9,10,11],z=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],Q=[0,1,2,3,17,4,5,33,49,6,18,65,81,7,97,113,19,34,50,129,8,20,66,145,161,177,193,9,35,51,82,240,21,98,114,209,10,22,36,52,225,37,241,23,24,25,26,38,39,40,41,42,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,130,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,226,227,228,229,230,231,232,233,234,242,243,244,245,246,247,248,249,250];this.encode=function(e,t,n){var r=(new Date).getTime();t&&w(t),M=new Array,R=0,O=7,u(65496),f(),d(),l(e.width,e.height),h(),g();var i=0,o=0,s=0;R=0,O=7,this.encode.displayName="_encode_";for(var c,m,I,P,T,C,x,U,L,A=e.data,B=e.width,k=e.height,N=4*B,W=0;W<k;){for(c=0;c<N;){for(T=N*W+c,C=T,x=-1,U=0,L=0;L<64;L++)U=L>>3,x=4*(7&L),C=T+U*N+x,W+U>=k&&(C-=N*(W+1+U-k)),c+x>=N&&(C-=c+x-N+4),m=A[C++],I=A[C++],P=A[C++],j[L]=(G[m]+G[I+256>>0]+G[P+512>>0]>>16)-128,E[L]=(G[m+768>>0]+G[I+1024>>0]+G[P+1280>>0]>>16)-128,_[L]=(G[m+1280>>0]+G[I+1536>>0]+G[P+1792>>0]>>16)-128;i=p(j,D,i,v,b),o=p(E,F,o,y,S),s=p(_,F,s,y,S),c+=32}W+=8}if(O>=0){var H=[];H[1]=O+1,H[0]=(1<<O+1)-1,a(H)}if(u(65497),n){for(var q=M.length,V=new Uint8Array(q),X=0;X<q;X++)V[X]=M[X].charCodeAt();M=[];(new Date).getTime();return V}var z="data:image/jpeg;base64,"+btoa(M.join(""));M=[];(new Date).getTime();return z},function(){(new Date).getTime();e||(e=50),m(),r(),i(),o(),w(e),(new Date).getTime()}()}e.exports=r},function(e,t,n){"use strict";var r,i;!function(){function n(e){var t=e.naturalWidth;if(t*e.naturalHeight>1048576){var n=document.createElement("canvas");n.width=n.height=1;var r=n.getContext("2d");return r.drawImage(e,1-t,0),0===r.getImageData(0,0,1,1).data[3]}return!1}function o(e,t,n){var r=document.createElement("canvas");r.width=1,r.height=n;var i=r.getContext("2d");i.drawImage(e,0,0);for(var o=i.getImageData(0,0,1,n).data,a=0,s=n,u=n;u>a;){0===o[4*(u-1)+3]?s=u:a=u,u=s+a>>1}var c=u/n;return 0===c?1:c}function a(e,t,n){var r=document.createElement("canvas");return s(e,r,t,n),r.toDataURL("image/jpeg",t.quality||.8)}function s(e,t,r,i){var a=e.naturalWidth,s=e.naturalHeight,c=r.width,f=r.height,l=t.getContext("2d");l.save(),u(t,l,c,f,r.orientation),n(e)&&(a/=2,s/=2);var d=1024,h=document.createElement("canvas");h.width=h.height=d;for(var g=h.getContext("2d"),p=i?o(e,a,s):1,m=Math.ceil(d*c/a),w=Math.ceil(d*f/s/p),v=0,y=0;v<s;){for(var b=0,S=0;b<a;)g.clearRect(0,0,d,d),g.drawImage(e,-b,-v),l.drawImage(h,0,0,d,d,S,y,m,w),b+=d,S+=m;v+=d,y+=w}l.restore(),h=g=null}function u(e,t,n,r,i){switch(i){case 5:case 6:case 7:case 8:e.width=r,e.height=n;break;default:e.width=n,e.height=r}switch(i){case 2:t.translate(n,0),t.scale(-1,1);break;case 3:t.translate(n,r),t.rotate(Math.PI);break;case 4:t.translate(0,r),t.scale(1,-1);break;case 5:t.rotate(.5*Math.PI),t.scale(1,-1);break;case 6:t.rotate(.5*Math.PI),t.translate(0,-r);break;case 7:t.rotate(.5*Math.PI),t.translate(n,-r),t.scale(-1,1);break;case 8:t.rotate(-.5*Math.PI),t.translate(-n,0)}}function c(e){if(window.Blob&&e instanceof Blob){var t=new Image,n=window.URL&&window.URL.createObjectURL?window.URL:window.webkitURL&&window.webkitURL.createObjectURL?window.webkitURL:null;if(!n)throw Error("No createObjectURL function found to create blob url");t.src=n.createObjectURL(e),this.blob=e,e=t}if(!e.naturalWidth&&!e.naturalHeight){var r=this;e.onload=function(){var e=r.imageLoadListeners;if(e){r.imageLoadListeners=null;for(var t=0,n=e.length;t<n;t++)e[t]()}},this.imageLoadListeners=[]}this.srcImage=e}c.prototype.render=function(e,t,n){if(this.imageLoadListeners){var r=this;return void this.imageLoadListeners.push(function(){r.render(e,t,n)})}t=t||{};var i=this.srcImage,o=i.src,u=o.length,c=i.naturalWidth,f=i.naturalHeight,l=t.width,d=t.height,h=t.maxWidth,g=t.maxHeight,p=this.blob&&"image/jpeg"===this.blob.type||0===o.indexOf("data:image/jpeg")||o.indexOf(".jpg")===u-4||o.indexOf(".jpeg")===u-5;l&&!d?d=f*l/c<<0:d&&!l?l=c*d/f<<0:(l=c,d=f),h&&l>h&&(l=h,d=f*l/c<<0),g&&d>g&&(d=g,l=c*d/f<<0);var m={width:l,height:d};for(var w in t)m[w]=t[w];var v=e.tagName.toLowerCase();"img"===v?e.src=a(this.srcImage,m,p):"canvas"===v&&s(this.srcImage,e,m,p),"function"==typeof this.onrender&&this.onrender(e),n&&n()},r=[],void 0!==(i=function(){return c}.apply(t,r))&&(e.exports=i)}()},,,,,,,,,function(e,t,n){"use strict";function r(e,t){var n=this;if(!e)throw new Error("没有接受到图片");t=t||{},n.defaults={width:null,height:null,fieldName:"file",quality:.7},n.file=e;for(var r in t)t.hasOwnProperty(r)&&(n.defaults[r]=t[r]);return this.init()}function i(e){var t;t=e.split(",")[0].indexOf("base64")>=0?atob(e.split(",")[1]):unescape(e.split(",")[1]);for(var n=e.split(",")[0].split(":")[1].split(";")[0],r=new Uint8Array(t.length),i=0;i<t.length;i++)r[i]=t.charCodeAt(i);return new s.Blob([r.buffer],{type:n})}Object.defineProperty(t,"__esModule",{value:!0});var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};window.URL=window.URL||window.webkitURL;var a=n(4),s=n(3),u=n(5),c=n(7),f=n(6),l=function(e){var t=/OS (\d)_.* like Mac OS X/g.exec(e),n=/Android (\d.*?);/g.exec(e)||/Android\/(\d.*?) /g.exec(e);return{oldIOS:!!t&&+t.pop()<8,oldAndroid:!!n&&+n.pop().substr(0,3)<4.5,iOS:/\(i[^;]+;( U;)? CPU.+Mac OS X/.test(e),android:/Android/g.test(e),mQQBrowser:/MQQBrowser/g.test(e)}}(navigator.userAgent);r.prototype.init=function(){var e=this,t=e.file,n="string"==typeof t,r=/^data:/.test(t),u=new Image,c=document.createElement("canvas"),f=n?t:URL.createObjectURL(t);if(e.img=u,e.blob=f,e.canvas=c,e.fileName=n?r?"base64.jpg":t.split("/").pop():t.name,!document.createElement("canvas").getContext)throw new Error("浏览器不支持canvas");return new a(function(n,a){u.onerror=function(){var e=new Error("加载图片文件失败");throw a(e),e},u.onload=function(){e._getBase64().then(function(e){if(e.length<10){var t=new Error("生成base64失败");throw a(t),t}return e}).then(function(r){var a=null;"object"===o(e.file)&&r.length>e.file.size?(a=new FormData,t=e.file):(a=new s.FormData,t=i(r)),a.append(e.defaults.fieldName,t,e.fileName.replace(/\..+/g,".jpg")),n({formData:a,fileLen:+t.size,base64:r,base64Len:r.length,origin:e.file,file:t});for(var u in e)e.hasOwnProperty(u)&&(e[u]=null);URL.revokeObjectURL(e.blob)})},!r&&(u.crossOrigin="*"),u.src=f})},r.prototype._getBase64=function(){var e=this,t=e.img,n=e.file,r=e.canvas;return new a(function(i){try{u.getData("object"===(void 0===n?"undefined":o(n))?n:t,function(){e.orientation=u.getTag(this,"Orientation"),e.resize=e._getResize(),e.ctx=r.getContext("2d"),r.width=e.resize.width,r.height=e.resize.height,e.ctx.fillStyle="#fff",e.ctx.fillRect(0,0,r.width,r.height),l.oldIOS?e._createBase64ForOldIOS().then(i):e._createBase64().then(i)})}catch(e){throw new Error(e)}})},r.prototype._createBase64ForOldIOS=function(){var e=this,t=e.img,n=e.canvas,r=e.defaults,i=e.orientation;return new a(function(e){var o=new c(t);"5678".indexOf(i)>-1?o.render(n,{width:n.height,height:n.width,orientation:i}):o.render(n,{width:n.width,height:n.height,orientation:i}),e(n.toDataURL("image/jpeg",r.quality))})},r.prototype._createBase64=function(){var e=this,t=e.resize,n=e.img,r=e.canvas,i=e.ctx,o=e.defaults,s=e.orientation;switch(l.iOS&&(s=2),s){case 3:i.rotate(180*Math.PI/180),i.drawImage(n,-t.width,-t.height,t.width,t.height);break;case 6:i.rotate(90*Math.PI/180),i.drawImage(n,0,-t.width,t.height,t.width);break;case 8:i.rotate(270*Math.PI/180),i.drawImage(n,-t.height,0,t.height,t.width);break;case 2:i.drawImage(n,0,0,t.width,t.height);break;case 4:i.translate(t.width,0),i.scale(-1,1),i.rotate(180*Math.PI/180),i.drawImage(n,-t.width,-t.height,t.width,t.height);break;case 5:i.translate(t.width,0),i.scale(-1,1),i.rotate(90*Math.PI/180),i.drawImage(n,0,-t.width,t.height,t.width);break;case 7:i.translate(t.width,0),i.scale(-1,1),i.rotate(270*Math.PI/180),i.drawImage(n,-t.height,0,t.height,t.width);break;default:i.drawImage(n,0,0,t.width,t.height)}return new a(function(e){if(l.oldAndroid||l.mQQBrowser||!navigator.userAgent){var t=new f,n=i.getImageData(0,0,r.width,r.height);e(t.encode(n,100*o.quality))}else e(r.toDataURL("image/jpeg",o.quality))})},r.prototype._getResize=function(){var e=this,t=e.img,n=e.defaults,r=n.width,i=n.height,o=e.orientation,a={width:t.width,height:t.height};if("5678".indexOf(o)>-1&&(l.iOS?(a.width=t.width,a.height=t.height):(a.width=t.height,a.height=t.width)),a.width<r||a.height<i)return a;var s=a.width/a.height;for(r&&i?s>=r/i?a.width>r&&(a.width=r,a.height=Math.ceil(r/s)):a.height>i&&(a.height=i,a.width=Math.ceil(i*s)):r?r<a.width&&(a.width=r,a.height=Math.ceil(r/s)):i&&i<a.height&&(a.width=Math.ceil(i*s),a.height=i);a.width>=3264||a.height>=2448;)a.width*=.8,a.height*=.8;return a};var d=function(e,t){return new r(e,t)};t.upload=d},,,,,,,function(e,t){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function i(e){if(f===setTimeout)return setTimeout(e,0);if((f===n||!f)&&setTimeout)return f=setTimeout,setTimeout(e,0);try{return f(e,0)}catch(t){try{return f.call(null,e,0)}catch(t){return f.call(this,e,0)}}}function o(e){if(l===clearTimeout)return clearTimeout(e);if((l===r||!l)&&clearTimeout)return l=clearTimeout,clearTimeout(e);try{return l(e)}catch(t){try{return l.call(null,e)}catch(t){return l.call(this,e)}}}function a(){p&&h&&(p=!1,h.length?g=h.concat(g):m=-1,g.length&&s())}function s(){if(!p){var e=i(a);p=!0;for(var t=g.length;t;){for(h=g,g=[];++m<t;)h&&h[m].run();m=-1,t=g.length}h=null,p=!1,o(e)}}function u(e,t){this.fun=e,this.array=t}function c(){}var f,l,d=e.exports={};!function(){try{f="function"==typeof setTimeout?setTimeout:n}catch(e){f=n}try{l="function"==typeof clearTimeout?clearTimeout:r}catch(e){l=r}}();var h,g=[],p=!1,m=-1;d.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];g.push(new u(e,t)),1!==g.length||p||i(s)},u.prototype.run=function(){this.fun.apply(null,this.array)},d.title="browser",d.browser=!0,d.env={},d.argv=[],d.version="",d.versions={},d.on=c,d.addListener=c,d.once=c,d.off=c,d.removeListener=c,d.removeAllListeners=c,d.emit=c,d.prependListener=c,d.prependOnceListener=c,d.listeners=function(e){return[]},d.binding=function(e){throw new Error("process.binding is not supported")},d.cwd=function(){return"/"},d.chdir=function(e){throw new Error("process.chdir is not supported")},d.umask=function(){return 0}},function(e,t,n){(function(e,t){!function(e,n){"use strict";function r(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n<t.length;n++)t[n]=arguments[n+1];var r={callback:e,args:t};return c[u]=r,s(u),u++}function i(e){delete c[e]}function o(e){var t=e.callback,r=e.args;switch(r.length){case 0:t();break;case 1:t(r[0]);break;case 2:t(r[0],r[1]);break;case 3:t(r[0],r[1],r[2]);break;default:t.apply(n,r)}}function a(e){if(f)setTimeout(a,0,e);else{var t=c[e];if(t){f=!0;try{o(t)}finally{i(e),f=!1}}}}if(!e.setImmediate){var s,u=1,c={},f=!1,l=e.document,d=Object.getPrototypeOf&&Object.getPrototypeOf(e);d=d&&d.setTimeout?d:e,"[object process]"==={}.toString.call(e.process)?function(){s=function(e){t.nextTick(function(){a(e)})}}():function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?function(){var t="setImmediate$"+Math.random()+"$",n=function(n){n.source===e&&"string"==typeof n.data&&0===n.data.indexOf(t)&&a(+n.data.slice(t.length))};e.addEventListener?e.addEventListener("message",n,!1):e.attachEvent("onmessage",n),s=function(n){e.postMessage(t+n,"*")}}():e.MessageChannel?function(){var e=new MessageChannel;e.port1.onmessage=function(e){a(e.data)},s=function(t){e.port2.postMessage(t)}}():l&&"onreadystatechange"in l.createElement("script")?function(){var e=l.documentElement;s=function(t){var n=l.createElement("script");n.onreadystatechange=function(){a(t),n.onreadystatechange=null,e.removeChild(n),n=null},e.appendChild(n)}}():function(){s=function(e){setTimeout(a,0,e)}}(),d.setImmediate=r,d.clearImmediate=i}}("undefined"==typeof self?void 0===e?this:e:self)}).call(t,n(0),n(23))},,,function(e,t,n){(function(e){function r(e,t){this._id=e,this._clearFn=t}var i=void 0!==e&&e||"undefined"!=typeof self&&self||window,o=Function.prototype.apply;t.setTimeout=function(){return new r(o.call(setTimeout,i,arguments),clearTimeout)},t.setInterval=function(){return new r(o.call(setInterval,i,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},r.prototype.unref=r.prototype.ref=function(){},r.prototype.close=function(){this._clearFn.call(i,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},n(24),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(t,n(0))}])});
|