lrz.bundle.js.map 118 KB

1
  1. {"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///lrz.bundle.js","webpack:///webpack/bootstrap abd039b38ea6f53efda0","webpack:///./src/lrz.js","webpack:///src/lib/Promise.js","webpack:///./~/timers-browserify/main.js","webpack:///./~/process/browser.js","webpack:///src/lib/Blob.FormData.shim.js","webpack:///src/lib/exif.js"],"names":["root","factory","exports","module","define","amd","a","i","this","modules","__webpack_require__","moduleId","installedModules","id","loaded","call","parentJsonpFunction","window","chunkIds","moreModules","chunkId","callbacks","length","installedChunks","push","apply","shift",0,"e","callback","undefined","head","document","getElementsByTagName","script","createElement","type","charset","async","src","p","appendChild","m","c","Lrz","file","opts","that","Error","defaults","width","height","fieldName","quality","hasOwnProperty","init","getJsDir","filter","scripts","v","indexOf","substr","lastIndexOf","dataURItoBlob","dataURI","byteString","split","atob","unescape","mimeString","ia","Uint8Array","charCodeAt","BlobFormDataShim","Blob","buffer","URL","webkitURL","Promise","exif","UA","userAgent","ISOldIOS","exec","isOldAndroid","oldIOS","pop","oldAndroid","iOS","test","android","mQQBrowser","navigator","prototype","fileIsString","fileIsBase64","img","Image","canvas","blob","createObjectURL","fileName","name","getContext","resolve","reject","onerror","onload","_getBase64","then","base64","formData","size","FormData","append","replace","fileLen","base64Len","origin","revokeObjectURL","crossOrigin","getData","orientation","getTag","resize","_getResize","ctx","fillStyle","fillRect","_createBase64ForOldIOS","_createBase64","err","__WEBPACK_AMD_REQUIRE_ARRAY__","MegaPixImage","mpImg","render","toDataURL","rotate","Math","PI","drawImage","translate","scale","JPEGEncoder","encoder","getImageData","encode","ret","ceil","lrz","version","setImmediate","bind","fn","thisArg","arguments","TypeError","_state","_value","_deferreds","doResolve","handle","deferred","me","asap","cb","onFulfilled","onRejected","newValue","finale","len","Handler","done","value","reason","ex","setTimeout","isArray","Array","Object","toString","all","args","slice","res","val","remaining","constructor","race","values","_setImmediateFn","always","clearImmediate","Timeout","clearFn","_id","_clearFn","nextTick","Function","immediateIds","nextImmediateId","clearTimeout","setInterval","clearInterval","timeout","close","unref","ref","enroll","item","msecs","_idleTimeoutId","_idleTimeout","unenroll","_unrefActive","active","_onTimeout","cleanUpNextTick","draining","currentQueue","queue","concat","queueIndex","drainQueue","run","Item","fun","array","noop","process","title","browser","env","argv","versions","on","addListener","once","off","removeListener","removeAllListeners","emit","binding","cwd","chdir","dir","umask","hasFormDataBug","bCheck","vendor","match","FormDataShim","o","parts","boundary","join","Date","random","oldSend","XMLHttpRequest","send","getParts","filename","fr","data","oXHR","BlobConstructor","FileReader","result","readAsArrayBuffer","setRequestHeader","bb","BlobBuilder","WebKitBlobBuilder","MSBlobBuilder","MozBlobBuilder","forEach","getBlob","__WEBPACK_AMD_DEFINE_ARRAY__","__WEBPACK_AMD_DEFINE_RESULT__","imageHasData","base64ToArrayBuffer","contentType","binary","ArrayBuffer","view","objectURLToBlob","url","http","open","responseType","status","response","handleBinaryFile","binFile","findEXIFinJPEG","iptcdata","findIPTCinJPEG","exifdata","arrayBuffer","fileReader","target","File","debug","console","log","byteLength","dataView","DataView","getUint8","marker","offset","readEXIFData","getUint16","isFieldSegmentStart","nameHeaderLength","startOffset","sectionLength","readIPTCData","fieldValue","dataSize","segmentType","segmentSize","segmentStartPos","IptcFieldMap","getInt16","getStringFromDB","readTags","tiffStart","dirStart","strings","bigEnd","entryOffset","tag","entries","tags","readTagValue","vals","n","numerator","denominator","numValues","getUint32","valueOffset","Number","getInt32","start","outstr","String","fromCharCode","exifData","gpsData","tiffOffset","firstIFDOffset","TiffTags","ExifIFDPointer","ExifTags","StringValues","Components","GPSInfoIFDPointer","GPSTags","EXIF","obj","EXIFwrapped","Tags",36864,40960,40961,40962,40963,37121,37122,37500,37510,40964,36867,36868,37520,37521,37522,33434,33437,34850,34852,34855,34856,37377,37378,37379,37380,37381,37382,37383,37384,37385,37396,37386,41483,41484,41486,41487,41488,41492,41493,41495,41728,41729,41730,41985,41986,41987,41988,41989,41990,41991,41992,41993,41994,41995,41996,40965,42016,256,257,34665,34853,258,259,262,274,277,284,530,531,282,283,296,273,278,279,513,514,301,318,319,529,532,306,270,271,272,305,315,33432,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,"ExposureProgram","MeteringMode",255,"LightSource","Flash",31,32,65,69,71,73,77,79,89,93,95,"SensingMethod","SceneCaptureType","SceneType","CustomRendered","WhiteBalance","GainControl","Contrast","Saturation","Sharpness","SubjectDistanceRange","FileSource",120,110,55,80,85,122,105,116,"HTMLImageElement","complete","getAllTags","pretty","strPretty","readFromBinaryFile"],"mappings":"CAAA,SAAAA,EAAAC,GACA,mBAAAC,UAAA,gBAAAC,QACAA,OAAAD,QAAAD,QACA,sBAAAG,gBAAAC,IACAD,UAAAH,OACA,CACA,GAAAK,GAAAL,GACA,QAAAM,KAAAD,IAAA,gBAAAJ,iBAAAF,GAAAO,GAAAD,EAAAC,KAECC,KAAA,WACD,MCAgB,UAAUC,GCsB1B,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAT,OAGA,IAAAC,GAAAS,EAAAD,IACAT,WACAW,GAAAF,EACAG,QAAA,EAUA,OANAL,GAAAE,GAAAI,KAAAZ,EAAAD,QAAAC,IAAAD,QAAAQ,GAGAP,EAAAW,QAAA,EAGAX,EAAAD,QAnDA,GAAAc,GAAAC,OAAA,YACAA,QAAA,sBAAAC,EAAAC,GAIA,IADA,GAAAR,GAAAS,EAAAb,EAAA,EAAAc,KACQd,EAAAW,EAAAI,OAAoBf,IAC5Ba,EAAAF,EAAAX,GACAgB,EAAAH,IACAC,EAAAG,KAAAC,MAAAJ,EAAAE,EAAAH,IACAG,EAAAH,GAAA,CAEA,KAAAT,IAAAQ,GACAV,EAAAE,GAAAQ,EAAAR,EAGA,KADAK,KAAAE,EAAAC,GACAE,EAAAC,QACAD,EAAAK,QAAAX,KAAA,KAAAL,GAKA,IAAAE,MAKAW,GACAI,EAAA,EA6DA,OAh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,SACAiO,EAAA,EACA,KAAArgB,IAAAkQ,GACAA,EAAAlN,eAAAhD,KAGAqgB,GAFA,gBAAAnQ,GAAAlQ,GACAkQ,EAAAlQ,YAAAkV,QACAlV,EAAA,MAAAkQ,EAAAlQ,GAAA,KAAAkQ,EAAAlQ,GAAA6U,UAAA,IAAA3E,EAAAlQ,GAAA8U,YAAA,QAEA9U,EAAA,OAAAkQ,EAAAlQ,GAAAgB,OAAA,eAGAhB,EAAA,MAAAkQ,EAAAlQ,GAAA,OAIA,OAAAqgB,IAGAlK,EAAAmK,mBAAA,SAAA/d,GACA,MAAA0P,GAAA1P,IAIAyO,KAAAC,EAAA,WACA,MAAAkF,IACShV,MAAAvB,EAAAoR,KAAAxP,SAAAyP,IAAApR,EAAAD,QAAAqR,MAERxQ,KAAAP","file":"lrz.bundle.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse {\n\t\tvar a = factory();\n\t\tfor(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];\n\t}\n})(this, function() {\nreturn \n\n\n/** WEBPACK FOOTER **\n ** webpack/universalModuleDefinition\n **/","(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse {\n\t\tvar a = factory();\n\t\tfor(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];\n\t}\n})(this, function() {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// install a JSONP callback for chunk loading\n/******/ \tvar parentJsonpFunction = window[\"webpackJsonp\"];\n/******/ \twindow[\"webpackJsonp\"] = function webpackJsonpCallback(chunkIds, moreModules) {\n/******/ \t\t// add \"moreModules\" to the modules object,\n/******/ \t\t// then flag all \"chunkIds\" as loaded and fire callback\n/******/ \t\tvar moduleId, chunkId, i = 0, callbacks = [];\n/******/ \t\tfor(;i < chunkIds.length; i++) {\n/******/ \t\t\tchunkId = chunkIds[i];\n/******/ \t\t\tif(installedChunks[chunkId])\n/******/ \t\t\t\tcallbacks.push.apply(callbacks, installedChunks[chunkId]);\n/******/ \t\t\tinstalledChunks[chunkId] = 0;\n/******/ \t\t}\n/******/ \t\tfor(moduleId in moreModules) {\n/******/ \t\t\tmodules[moduleId] = moreModules[moduleId];\n/******/ \t\t}\n/******/ \t\tif(parentJsonpFunction) parentJsonpFunction(chunkIds, moreModules);\n/******/ \t\twhile(callbacks.length)\n/******/ \t\t\tcallbacks.shift().call(null, __webpack_require__);\n/******/\n/******/ \t};\n/******/\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// object to store loaded and loading chunks\n/******/ \t// \"0\" means \"already loaded\"\n/******/ \t// Array means \"loading\", array contains callbacks\n/******/ \tvar installedChunks = {\n/******/ \t\t0:0\n/******/ \t};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.loaded = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/ \t// This file contains only the entry chunk.\n/******/ \t// The chunk loading function for additional chunks\n/******/ \t__webpack_require__.e = function requireEnsure(chunkId, callback) {\n/******/ \t\t// \"0\" is the signal for \"already loaded\"\n/******/ \t\tif(installedChunks[chunkId] === 0)\n/******/ \t\t\treturn callback.call(null, __webpack_require__);\n/******/\n/******/ \t\t// an array means \"currently loading\".\n/******/ \t\tif(installedChunks[chunkId] !== undefined) {\n/******/ \t\t\tinstalledChunks[chunkId].push(callback);\n/******/ \t\t} else {\n/******/ \t\t\t// start chunk loading\n/******/ \t\t\tinstalledChunks[chunkId] = [callback];\n/******/ \t\t\tvar head = document.getElementsByTagName('head')[0];\n/******/ \t\t\tvar script = document.createElement('script');\n/******/ \t\t\tscript.type = 'text/javascript';\n/******/ \t\t\tscript.charset = 'utf-8';\n/******/ \t\t\tscript.async = true;\n/******/\n/******/ \t\t\tscript.src = __webpack_require__.p + \"\" + ({}[chunkId]||chunkId) + \".chunk.js\";\n/******/ \t\t\thead.appendChild(script);\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t// 保证按需加载的文件路径正确\n\t__webpack_require__.p = getJsDir('lrz') + '/';\n\twindow.URL = window.URL || window.webkitURL;\n\t\n\tvar Promise = __webpack_require__(1),\n\t BlobFormDataShim = __webpack_require__(4),\n\t exif = __webpack_require__(5);\n\t\n\t\n\tvar UA = (function (userAgent) {\n\t var ISOldIOS = /OS (\\d)_.* like Mac OS X/g.exec(userAgent),\n\t isOldAndroid = /Android (\\d.*?);/g.exec(userAgent) || /Android\\/(\\d.*?) /g.exec(userAgent);\n\t\n\t // 判断设备是否是IOS7以下\n\t // 判断设备是否是android4.5以下\n\t // 判断是否iOS\n\t // 判断是否android\n\t // 判断是否QQ浏览器\n\t return {\n\t oldIOS : ISOldIOS ? +ISOldIOS.pop() < 8 : false,\n\t oldAndroid: isOldAndroid ? +isOldAndroid.pop().substr(0, 3) < 4.5 : false,\n\t iOS : /\\(i[^;]+;( U;)? CPU.+Mac OS X/.test(userAgent),\n\t android : /Android/g.test(userAgent),\n\t mQQBrowser: /MQQBrowser/g.test(userAgent)\n\t }\n\t})(navigator.userAgent);\n\t\n\t\n\tfunction Lrz (file, opts) {\n\t var that = this;\n\t\n\t if (!file) throw new Error('没有收到图片,可能的解决方案:https://github.com/think2011/localResizeIMG/issues/7');\n\t\n\t opts = opts || {};\n\t\n\t that.defaults = {\n\t width : null,\n\t height : null,\n\t fieldName: 'file',\n\t quality : 0.7\n\t };\n\t\n\t that.file = file;\n\t\n\t for (var p in opts) {\n\t if (!opts.hasOwnProperty(p)) continue;\n\t that.defaults[p] = opts[p];\n\t }\n\t\n\t return this.init();\n\t}\n\t\n\tLrz.prototype.init = function () {\n\t var that = this,\n\t file = that.file,\n\t fileIsString = typeof file === 'string',\n\t fileIsBase64 = /^data:/.test(file),\n\t img = new Image(),\n\t canvas = document.createElement('canvas'),\n\t blob = fileIsString ? file : URL.createObjectURL(file);\n\t\n\t that.img = img;\n\t that.blob = blob;\n\t that.canvas = canvas;\n\t\n\t if (fileIsString) {\n\t that.fileName = fileIsBase64 ? 'base64.jpg' : (file.split('/').pop());\n\t } else {\n\t that.fileName = file.name;\n\t }\n\t\n\t if (!document.createElement('canvas').getContext) {\n\t throw new Error('浏览器不支持canvas');\n\t }\n\t\n\t return new Promise(function (resolve, reject) {\n\t img.onerror = function () {\n\t throw new Error('加载图片文件失败');\n\t };\n\t\n\t img.onload = function () {\n\t that._getBase64()\n\t .then(function (base64) {\n\t if (base64.length < 10) reject('生成base64失败');\n\t\n\t return base64;\n\t })\n\t .then(function (base64) {\n\t var formData = null;\n\t\n\t // 压缩文件太大就采用源文件,且使用原生的FormData() @source #55\n\t if (typeof that.file === 'object' && base64.length > that.file.size) {\n\t formData = new FormData();\n\t file = that.file;\n\t } else {\n\t formData = new BlobFormDataShim.FormData();\n\t file = dataURItoBlob(base64);\n\t }\n\t\n\t formData.append(that.defaults.fieldName, file, (that.fileName.replace(/\\..+/g, '.jpg')));\n\t\n\t resolve({\n\t formData : formData,\n\t fileLen : +file.size,\n\t base64 : base64,\n\t base64Len: base64.length,\n\t origin : that.file\n\t });\n\t\n\t // 释放内存\n\t for (var p in that) {\n\t if (!that.hasOwnProperty(p)) continue;\n\t\n\t that[p] = null;\n\t }\n\t URL.revokeObjectURL(that.blob);\n\t });\n\t };\n\t\n\t // 如果传入的是base64在移动端会报错\n\t !fileIsBase64 && (img.crossOrigin = \"*\");\n\t\n\t img.src = blob;\n\t });\n\t};\n\t\n\tLrz.prototype._getBase64 = function () {\n\t var that = this,\n\t img = that.img,\n\t file = that.file,\n\t canvas = that.canvas;\n\t\n\t return new Promise(function (resolve) {\n\t try {\n\t // 传入blob在android4.3以下有bug\n\t exif.getData(typeof file === 'object' ? file : img, function () {\n\t that.orientation = exif.getTag(this, \"Orientation\");\n\t\n\t that.resize = that._getResize();\n\t that.ctx = canvas.getContext('2d');\n\t\n\t canvas.width = that.resize.width;\n\t canvas.height = that.resize.height;\n\t\n\t // 设置为白色背景,jpg是不支持透明的,所以会被默认为canvas默认的黑色背景。\n\t that.ctx.fillStyle = '#fff';\n\t that.ctx.fillRect(0, 0, canvas.width, canvas.height);\n\t\n\t // 根据设备对应处理方式\n\t if (UA.oldIOS) {\n\t that._createBase64ForOldIOS().then(resolve);\n\t }\n\t else {\n\t that._createBase64().then(resolve);\n\t }\n\t });\n\t } catch (err) {\n\t // 这样能解决低内存设备闪退的问题吗?\n\t throw new Error(err);\n\t }\n\t });\n\t};\n\t\n\t\n\tLrz.prototype._createBase64ForOldIOS = function () {\n\t var that = this,\n\t img = that.img,\n\t canvas = that.canvas,\n\t defaults = that.defaults,\n\t orientation = that.orientation;\n\t\n\t return new Promise(function (resolve) {\n\t __webpack_require__.e/* require */(1, function(__webpack_require__) { var __WEBPACK_AMD_REQUIRE_ARRAY__ = [__webpack_require__(6)]; (function (MegaPixImage) {\n\t var mpImg = new MegaPixImage(img);\n\t\n\t if (\"5678\".indexOf(orientation) > -1) {\n\t mpImg.render(canvas, {\n\t width : canvas.height,\n\t height : canvas.width,\n\t orientation: orientation\n\t });\n\t } else {\n\t mpImg.render(canvas, {\n\t width : canvas.width,\n\t height : canvas.height,\n\t orientation: orientation\n\t });\n\t }\n\t\n\t resolve(canvas.toDataURL('image/jpeg', defaults.quality));\n\t }.apply(null, __WEBPACK_AMD_REQUIRE_ARRAY__));});\n\t });\n\t};\n\t\n\tLrz.prototype._createBase64 = function () {\n\t var that = this,\n\t resize = that.resize,\n\t img = that.img,\n\t canvas = that.canvas,\n\t ctx = that.ctx,\n\t defaults = that.defaults,\n\t orientation = that.orientation;\n\t\n\t // 调整为正确方向\n\t switch (orientation) {\n\t case 3:\n\t ctx.rotate(180 * Math.PI / 180);\n\t ctx.drawImage(img, -resize.width, -resize.height, resize.width, resize.height);\n\t break;\n\t case 6:\n\t ctx.rotate(90 * Math.PI / 180);\n\t ctx.drawImage(img, 0, -resize.width, resize.height, resize.width);\n\t break;\n\t case 8:\n\t ctx.rotate(270 * Math.PI / 180);\n\t ctx.drawImage(img, -resize.height, 0, resize.height, resize.width);\n\t break;\n\t\n\t case 2:\n\t ctx.translate(resize.width, 0);\n\t ctx.scale(-1, 1);\n\t ctx.drawImage(img, 0, 0, resize.width, resize.height);\n\t break;\n\t case 4:\n\t ctx.translate(resize.width, 0);\n\t ctx.scale(-1, 1);\n\t ctx.rotate(180 * Math.PI / 180);\n\t ctx.drawImage(img, -resize.width, -resize.height, resize.width, resize.height);\n\t break;\n\t case 5:\n\t ctx.translate(resize.width, 0);\n\t ctx.scale(-1, 1);\n\t ctx.rotate(90 * Math.PI / 180);\n\t ctx.drawImage(img, 0, -resize.width, resize.height, resize.width);\n\t break;\n\t case 7:\n\t ctx.translate(resize.width, 0);\n\t ctx.scale(-1, 1);\n\t ctx.rotate(270 * Math.PI / 180);\n\t ctx.drawImage(img, -resize.height, 0, resize.height, resize.width);\n\t break;\n\t\n\t default:\n\t ctx.drawImage(img, 0, 0, resize.width, resize.height);\n\t }\n\t\n\t return new Promise(function (resolve) {\n\t if (UA.oldAndroid || UA.mQQBrowser || !navigator.userAgent) {\n\t __webpack_require__.e/* require */(2, function(__webpack_require__) { var __WEBPACK_AMD_REQUIRE_ARRAY__ = [__webpack_require__(7)]; (function (JPEGEncoder) {\n\t var encoder = new JPEGEncoder(),\n\t img = ctx.getImageData(0, 0, canvas.width, canvas.height);\n\t\n\t resolve(encoder.encode(img, defaults.quality * 100));\n\t }.apply(null, __WEBPACK_AMD_REQUIRE_ARRAY__));})\n\t }\n\t else {\n\t resolve(canvas.toDataURL('image/jpeg', defaults.quality));\n\t }\n\t });\n\t};\n\t\n\tLrz.prototype._getResize = function () {\n\t var that = this,\n\t img = that.img,\n\t defaults = that.defaults,\n\t width = defaults.width,\n\t height = defaults.height,\n\t orientation = that.orientation;\n\t\n\t var ret = {\n\t width : img.width,\n\t height: img.height\n\t };\n\t\n\t if (\"5678\".indexOf(orientation) > -1) {\n\t ret.width = img.height;\n\t ret.height = img.width;\n\t }\n\t\n\t // 如果原图小于设定,采用原图\n\t if (ret.width < width || ret.height < height) {\n\t return ret;\n\t }\n\t\n\t var scale = ret.width / ret.height;\n\t\n\t if (width && height) {\n\t if (scale >= width / height) {\n\t if (ret.width > width) {\n\t ret.width = width;\n\t ret.height = Math.ceil(width / scale);\n\t }\n\t } else {\n\t if (ret.height > height) {\n\t ret.height = height;\n\t ret.width = Math.ceil(height * scale);\n\t }\n\t }\n\t }\n\t else if (width) {\n\t if (width < ret.width) {\n\t ret.width = width;\n\t ret.height = Math.ceil(width / scale);\n\t }\n\t }\n\t else if (height) {\n\t if (height < ret.height) {\n\t ret.width = Math.ceil(height * scale);\n\t ret.height = height;\n\t }\n\t }\n\t\n\t // 超过这个值base64无法生成,在IOS上\n\t while (ret.width >= 3264 || ret.height >= 2448) {\n\t ret.width *= 0.8;\n\t ret.height *= 0.8;\n\t }\n\t\n\t return ret;\n\t};\n\t\n\t/**\n\t * 获取当前js文件所在路径,必须得在代码顶部执行此函数\n\t * @returns {string}\n\t */\n\tfunction getJsDir (src) {\n\t var script = null;\n\t\n\t if (src) {\n\t script = [].filter.call(document.scripts, function (v) {\n\t return v.src.indexOf(src) !== -1;\n\t })[0];\n\t } else {\n\t script = document.scripts[document.scripts.length - 1];\n\t }\n\t\n\t if (!script) return null;\n\t\n\t return script.src.substr(0, script.src.lastIndexOf('/'));\n\t}\n\t\n\t\n\t/**\n\t * 转换成formdata\n\t * @param dataURI\n\t * @returns {*}\n\t *\n\t * @source http://stackoverflow.com/questions/4998908/convert-data-uri-to-file-then-append-to-formdata\n\t */\n\tfunction dataURItoBlob (dataURI) {\n\t // convert base64/URLEncoded data component to raw binary data held in a string\n\t var byteString;\n\t if (dataURI.split(',')[0].indexOf('base64') >= 0)\n\t byteString = atob(dataURI.split(',')[1]);\n\t else\n\t byteString = unescape(dataURI.split(',')[1]);\n\t\n\t // separate out the mime component\n\t var mimeString = dataURI.split(',')[0].split(':')[1].split(';')[0];\n\t\n\t // write the bytes of the string to a typed array\n\t var ia = new Uint8Array(byteString.length);\n\t for (var i = 0; i < byteString.length; i++) {\n\t ia[i] = byteString.charCodeAt(i);\n\t }\n\t\n\t return new BlobFormDataShim.Blob([ia.buffer], {type: mimeString});\n\t}\n\t\n\twindow.lrz = function (file, opts) {\n\t return new Lrz(file, opts);\n\t};\n\t\n\t// 版本号来自package.json,构建时自动填充\n\twindow.lrz.version = '4.8.35';\n\t\n\tmodule.exports = window.lrz;\n\t\n\t/**\n\t *\n\t *    ┏┓   ┏┓\n\t *   ┏┛┻━━━┛┻┓\n\t *   ┃       ┃\n\t *   ┃   ━   ┃\n\t *   ┃ ┳┛ ┗┳ ┃\n\t *   ┃       ┃\n\t *   ┃   ┻   ┃\n\t *   ┃       ┃\n\t *   ┗━┓   ┏━┛Code is far away from bug with the animal protecting\n\t *     ┃   ┃ 神兽保佑,代码无bug\n\t *     ┃   ┃\n\t *     ┃   ┗━━━┓\n\t *     ┃      ┣┓\n\t *     ┃     ┏┛\n\t *     ┗┓┓┏━┳┓┏┛\n\t *      ┃┫┫ ┃┫┫\n\t *      ┗┻┛ ┗┻┛\n\t *\n\t */\n\t\n\t\n\n\n/***/ },\n/* 1 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/* WEBPACK VAR INJECTION */(function(setImmediate) {(function (root) {\n\t\n\t // Use polyfill for setImmediate for performance gains\n\t var asap = (typeof setImmediate === 'function' && setImmediate) ||\n\t function (fn) {\n\t setTimeout(fn, 1);\n\t };\n\t\n\t // Polyfill for Function.prototype.bind\n\t function bind (fn, thisArg) {\n\t return function () {\n\t fn.apply(thisArg, arguments);\n\t }\n\t }\n\t\n\t var isArray = Array.isArray || function (value) {\n\t return Object.prototype.toString.call(value) === \"[object Array]\"\n\t };\n\t\n\t function Promise (fn) {\n\t if (typeof this !== 'object') throw new TypeError('Promises must be constructed via new');\n\t if (typeof fn !== 'function') throw new TypeError('not a function');\n\t this._state = null;\n\t this._value = null;\n\t this._deferreds = []\n\t\n\t doResolve(fn, bind(resolve, this), bind(reject, this))\n\t }\n\t\n\t function handle (deferred) {\n\t var me = this;\n\t if (this._state === null) {\n\t this._deferreds.push(deferred);\n\t return\n\t }\n\t asap(function () {\n\t var cb = me._state ? deferred.onFulfilled : deferred.onRejected\n\t if (cb === null) {\n\t (me._state ? deferred.resolve : deferred.reject)(me._value);\n\t return;\n\t }\n\t var ret;\n\t try {\n\t ret = cb(me._value);\n\t }\n\t catch (e) {\n\t deferred.reject(e);\n\t return;\n\t }\n\t deferred.resolve(ret);\n\t })\n\t }\n\t\n\t function resolve (newValue) {\n\t try { //Promise Resolution Procedure: https://github.com/promises-aplus/promises-spec#the-promise-resolution-procedure\n\t if (newValue === this) throw new TypeError('A promise cannot be resolved with itself.');\n\t if (newValue && (typeof newValue === 'object' || typeof newValue === 'function')) {\n\t var then = newValue.then;\n\t if (typeof then === 'function') {\n\t doResolve(bind(then, newValue), bind(resolve, this), bind(reject, this));\n\t return;\n\t }\n\t }\n\t this._state = true;\n\t this._value = newValue;\n\t finale.call(this);\n\t } catch (e) {\n\t reject.call(this, e);\n\t }\n\t }\n\t\n\t function reject (newValue) {\n\t this._state = false;\n\t this._value = newValue;\n\t finale.call(this);\n\t }\n\t\n\t function finale () {\n\t for (var i = 0, len = this._deferreds.length; i < len; i++) {\n\t handle.call(this, this._deferreds[i]);\n\t }\n\t this._deferreds = null;\n\t }\n\t\n\t function Handler (onFulfilled, onRejected, resolve, reject) {\n\t this.onFulfilled = typeof onFulfilled === 'function' ? onFulfilled : null;\n\t this.onRejected = typeof onRejected === 'function' ? onRejected : null;\n\t this.resolve = resolve;\n\t this.reject = reject;\n\t }\n\t\n\t /**\n\t * Take a potentially misbehaving resolver function and make sure\n\t * onFulfilled and onRejected are only called once.\n\t *\n\t * Makes no guarantees about asynchrony.\n\t */\n\t function doResolve (fn, onFulfilled, onRejected) {\n\t var done = false;\n\t try {\n\t fn(function (value) {\n\t if (done) return;\n\t done = true;\n\t onFulfilled(value);\n\t }, function (reason) {\n\t if (done) return;\n\t done = true;\n\t onRejected(reason);\n\t })\n\t } catch (ex) {\n\t if (done) return;\n\t done = true;\n\t onRejected(ex);\n\t }\n\t }\n\t\n\t Promise.prototype['catch'] = function (onRejected) {\n\t return this.then(null, onRejected);\n\t };\n\t\n\t Promise.prototype.then = function (onFulfilled, onRejected) {\n\t var me = this;\n\t return new Promise(function (resolve, reject) {\n\t handle.call(me, new Handler(onFulfilled, onRejected, resolve, reject));\n\t })\n\t };\n\t\n\t Promise.all = function () {\n\t var args = Array.prototype.slice.call(arguments.length === 1 && isArray(arguments[0]) ? arguments[0] : arguments);\n\t\n\t return new Promise(function (resolve, reject) {\n\t if (args.length === 0) return resolve([]);\n\t var remaining = args.length;\n\t\n\t function res (i, val) {\n\t try {\n\t if (val && (typeof val === 'object' || typeof val === 'function')) {\n\t var then = val.then;\n\t if (typeof then === 'function') {\n\t then.call(val, function (val) {\n\t res(i, val)\n\t }, reject);\n\t return;\n\t }\n\t }\n\t args[i] = val;\n\t if (--remaining === 0) {\n\t resolve(args);\n\t }\n\t } catch (ex) {\n\t reject(ex);\n\t }\n\t }\n\t\n\t for (var i = 0; i < args.length; i++) {\n\t res(i, args[i]);\n\t }\n\t });\n\t };\n\t\n\t Promise.resolve = function (value) {\n\t if (value && typeof value === 'object' && value.constructor === Promise) {\n\t return value;\n\t }\n\t\n\t return new Promise(function (resolve) {\n\t resolve(value);\n\t });\n\t };\n\t\n\t Promise.reject = function (value) {\n\t return new Promise(function (resolve, reject) {\n\t reject(value);\n\t });\n\t };\n\t\n\t Promise.race = function (values) {\n\t return new Promise(function (resolve, reject) {\n\t for (var i = 0, len = values.length; i < len; i++) {\n\t values[i].then(resolve, reject);\n\t }\n\t });\n\t };\n\t\n\t /**\n\t * Set the immediate function to execute callbacks\n\t * @param fn {function} Function to execute\n\t * @private\n\t */\n\t Promise._setImmediateFn = function _setImmediateFn (fn) {\n\t asap = fn;\n\t };\n\t\n\t\n\t Promise.prototype.always = function (callback) {\n\t var constructor = this.constructor;\n\t\n\t return this.then(function (value) {\n\t return constructor.resolve(callback()).then(function () {\n\t return value;\n\t });\n\t }, function (reason) {\n\t return constructor.resolve(callback()).then(function () {\n\t throw reason;\n\t });\n\t });\n\t };\n\t\n\t if (typeof module !== 'undefined' && module.exports) {\n\t module.exports = Promise;\n\t } else if (!root.Promise) {\n\t root.Promise = Promise;\n\t }\n\t\n\t})(this);\n\t/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(2).setImmediate))\n\n/***/ },\n/* 2 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/* WEBPACK VAR INJECTION */(function(setImmediate, clearImmediate) {var nextTick = __webpack_require__(3).nextTick;\n\tvar apply = Function.prototype.apply;\n\tvar slice = Array.prototype.slice;\n\tvar immediateIds = {};\n\tvar nextImmediateId = 0;\n\t\n\t// DOM APIs, for completeness\n\t\n\texports.setTimeout = function() {\n\t return new Timeout(apply.call(setTimeout, window, arguments), clearTimeout);\n\t};\n\texports.setInterval = function() {\n\t return new Timeout(apply.call(setInterval, window, arguments), clearInterval);\n\t};\n\texports.clearTimeout =\n\texports.clearInterval = function(timeout) { timeout.close(); };\n\t\n\tfunction Timeout(id, clearFn) {\n\t this._id = id;\n\t this._clearFn = clearFn;\n\t}\n\tTimeout.prototype.unref = Timeout.prototype.ref = function() {};\n\tTimeout.prototype.close = function() {\n\t this._clearFn.call(window, this._id);\n\t};\n\t\n\t// Does not start the time, just sets up the members needed.\n\texports.enroll = function(item, msecs) {\n\t clearTimeout(item._idleTimeoutId);\n\t item._idleTimeout = msecs;\n\t};\n\t\n\texports.unenroll = function(item) {\n\t clearTimeout(item._idleTimeoutId);\n\t item._idleTimeout = -1;\n\t};\n\t\n\texports._unrefActive = exports.active = function(item) {\n\t clearTimeout(item._idleTimeoutId);\n\t\n\t var msecs = item._idleTimeout;\n\t if (msecs >= 0) {\n\t item._idleTimeoutId = setTimeout(function onTimeout() {\n\t if (item._onTimeout)\n\t item._onTimeout();\n\t }, msecs);\n\t }\n\t};\n\t\n\t// That's not how node.js implements it but the exposed api is the same.\n\texports.setImmediate = typeof setImmediate === \"function\" ? setImmediate : function(fn) {\n\t var id = nextImmediateId++;\n\t var args = arguments.length < 2 ? false : slice.call(arguments, 1);\n\t\n\t immediateIds[id] = true;\n\t\n\t nextTick(function onNextTick() {\n\t if (immediateIds[id]) {\n\t // fn.call() is faster so we optimize for the common use-case\n\t // @see http://jsperf.com/call-apply-segu\n\t if (args) {\n\t fn.apply(null, args);\n\t } else {\n\t fn.call(null);\n\t }\n\t // Prevent ids from leaking\n\t exports.clearImmediate(id);\n\t }\n\t });\n\t\n\t return id;\n\t};\n\t\n\texports.clearImmediate = typeof clearImmediate === \"function\" ? clearImmediate : function(id) {\n\t delete immediateIds[id];\n\t};\n\t/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(2).setImmediate, __webpack_require__(2).clearImmediate))\n\n/***/ },\n/* 3 */\n/***/ function(module, exports) {\n\n\t// shim for using process in browser\n\t\n\tvar process = module.exports = {};\n\tvar queue = [];\n\tvar draining = false;\n\tvar currentQueue;\n\tvar queueIndex = -1;\n\t\n\tfunction cleanUpNextTick() {\n\t draining = false;\n\t if (currentQueue.length) {\n\t queue = currentQueue.concat(queue);\n\t } else {\n\t queueIndex = -1;\n\t }\n\t if (queue.length) {\n\t drainQueue();\n\t }\n\t}\n\t\n\tfunction drainQueue() {\n\t if (draining) {\n\t return;\n\t }\n\t var timeout = setTimeout(cleanUpNextTick);\n\t draining = true;\n\t\n\t var len = queue.length;\n\t while(len) {\n\t currentQueue = queue;\n\t queue = [];\n\t while (++queueIndex < len) {\n\t if (currentQueue) {\n\t currentQueue[queueIndex].run();\n\t }\n\t }\n\t queueIndex = -1;\n\t len = queue.length;\n\t }\n\t currentQueue = null;\n\t draining = false;\n\t clearTimeout(timeout);\n\t}\n\t\n\tprocess.nextTick = function (fun) {\n\t var args = new Array(arguments.length - 1);\n\t if (arguments.length > 1) {\n\t for (var i = 1; i < arguments.length; i++) {\n\t args[i - 1] = arguments[i];\n\t }\n\t }\n\t queue.push(new Item(fun, args));\n\t if (queue.length === 1 && !draining) {\n\t setTimeout(drainQueue, 0);\n\t }\n\t};\n\t\n\t// v8 likes predictible objects\n\tfunction Item(fun, array) {\n\t this.fun = fun;\n\t this.array = array;\n\t}\n\tItem.prototype.run = function () {\n\t this.fun.apply(null, this.array);\n\t};\n\tprocess.title = 'browser';\n\tprocess.browser = true;\n\tprocess.env = {};\n\tprocess.argv = [];\n\tprocess.version = ''; // empty string to avoid regexp issues\n\tprocess.versions = {};\n\t\n\tfunction noop() {}\n\t\n\tprocess.on = noop;\n\tprocess.addListener = noop;\n\tprocess.once = noop;\n\tprocess.off = noop;\n\tprocess.removeListener = noop;\n\tprocess.removeAllListeners = noop;\n\tprocess.emit = noop;\n\t\n\tprocess.binding = function (name) {\n\t throw new Error('process.binding is not supported');\n\t};\n\t\n\tprocess.cwd = function () { return '/' };\n\tprocess.chdir = function (dir) {\n\t throw new Error('process.chdir is not supported');\n\t};\n\tprocess.umask = function() { return 0; };\n\n\n/***/ },\n/* 4 */\n/***/ function(module, exports) {\n\n\t//@source https://xts.so/demo/compress/index.html\n\t\n\t// 早期版本的浏览器需要用BlobBuilder来构造Blob,创建一个通用构造器来兼容早期版本\n\tvar BlobConstructor = ((function () {\n\t try {\n\t new Blob();\n\t return true;\n\t } catch (e) {\n\t return false;\n\t }\n\t})()) ? window.Blob : function (parts, opts) {\n\t var bb = new (\n\t window.BlobBuilder\n\t || window.WebKitBlobBuilder\n\t || window.MSBlobBuilder\n\t || window.MozBlobBuilder\n\t );\n\t parts.forEach(function (p) {\n\t bb.append(p);\n\t });\n\t\n\t return bb.getBlob(opts ? opts.type : undefined);\n\t};\n\t\n\t// Android上的AppleWebKit 534以前的内核存在一个Bug,\n\t// 导致FormData加入一个Blob对象后,上传的文件是0字节\n\tfunction hasFormDataBug () {\n\t var bCheck = ~navigator.userAgent.indexOf('Android')\n\t && ~navigator.vendor.indexOf('Google')\n\t && !~navigator.userAgent.indexOf('Chrome');\n\t\n\t // QQ X5浏览器也有这个BUG\n\t return bCheck && navigator.userAgent.match(/AppleWebKit\\/(\\d+)/).pop() <= 534 || /MQQBrowser/g.test(navigator.userAgent);\n\t}\n\tfunction FormDataShim () {\n\t var\n\t // Store a reference to this\n\t o = this,\n\t\n\t // Data to be sent\n\t parts = [],\n\t\n\t // Boundary parameter for separating the multipart values\n\t boundary = Array(21).join('-') + (+new Date() * (1e16 * Math.random())).toString(36),\n\t\n\t // Store the current XHR send method so we can safely override it\n\t oldSend = XMLHttpRequest.prototype.send;\n\t this.getParts = function () {\n\t return parts.toString();\n\t };\n\t this.append = function (name, value, filename) {\n\t parts.push('--' + boundary + '\\r\\nContent-Disposition: form-data; name=\"' + name + '\"');\n\t\n\t if (value instanceof Blob) {\n\t parts.push('; filename=\"' + (filename || 'blob') + '\"\\r\\nContent-Type: ' + value.type + '\\r\\n\\r\\n');\n\t parts.push(value);\n\t }\n\t else {\n\t parts.push('\\r\\n\\r\\n' + value);\n\t }\n\t parts.push('\\r\\n');\n\t };\n\t\n\t XMLHttpRequest.prototype.send = function (val) {\n\t var fr,\n\t data,\n\t oXHR = this;\n\t\n\t if (val === o) {\n\t // Append the final boundary string\n\t parts.push('--' + boundary + '--\\r\\n');\n\t // Create the blob\n\t data = new BlobConstructor(parts);\n\t\n\t // Set up and read the blob into an array to be sent\n\t fr = new FileReader();\n\t fr.onload = function () {\n\t oldSend.call(oXHR, fr.result);\n\t };\n\t fr.onerror = function (err) {\n\t throw err;\n\t };\n\t fr.readAsArrayBuffer(data);\n\t\n\t // Set the multipart content type and boudary\n\t this.setRequestHeader('Content-Type', 'multipart/form-data; boundary=' + boundary);\n\t XMLHttpRequest.prototype.send = oldSend;\n\t }\n\t else {\n\t oldSend.call(this, val);\n\t }\n\t };\n\t}\n\t\n\t\n\tmodule.exports = {\n\t Blob : BlobConstructor,\n\t FormData: hasFormDataBug() ? FormDataShim : FormData\n\t};\n\n\n/***/ },\n/* 5 */\n/***/ function(module, exports, __webpack_require__) {\n\n\tvar __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/* exif */\n\t(function () {\n\t\n\t var debug = false;\n\t\n\t var root = this;\n\t\n\t var EXIF = function (obj) {\n\t if (obj instanceof EXIF) return obj;\n\t if (!(this instanceof EXIF)) return new EXIF(obj);\n\t this.EXIFwrapped = obj;\n\t };\n\t\n\t if (true) {\n\t if (typeof module !== 'undefined' && module.exports) {\n\t exports = module.exports = EXIF;\n\t }\n\t exports.EXIF = EXIF;\n\t } else {\n\t root.EXIF = EXIF;\n\t }\n\t\n\t var ExifTags = EXIF.Tags = {\n\t\n\t // version tags\n\t 0x9000: \"ExifVersion\", // EXIF version\n\t 0xA000: \"FlashpixVersion\", // Flashpix format version\n\t\n\t // colorspace tags\n\t 0xA001: \"ColorSpace\", // Color space information tag\n\t\n\t // image configuration\n\t 0xA002: \"PixelXDimension\", // Valid width of meaningful image\n\t 0xA003: \"PixelYDimension\", // Valid height of meaningful image\n\t 0x9101: \"ComponentsConfiguration\", // Information about channels\n\t 0x9102: \"CompressedBitsPerPixel\", // Compressed bits per pixel\n\t\n\t // user information\n\t 0x927C: \"MakerNote\", // Any desired information written by the manufacturer\n\t 0x9286: \"UserComment\", // Comments by user\n\t\n\t // related file\n\t 0xA004: \"RelatedSoundFile\", // Name of related sound file\n\t\n\t // date and time\n\t 0x9003: \"DateTimeOriginal\", // Date and time when the original image was generated\n\t 0x9004: \"DateTimeDigitized\", // Date and time when the image was stored digitally\n\t 0x9290: \"SubsecTime\", // Fractions of seconds for DateTime\n\t 0x9291: \"SubsecTimeOriginal\", // Fractions of seconds for DateTimeOriginal\n\t 0x9292: \"SubsecTimeDigitized\", // Fractions of seconds for DateTimeDigitized\n\t\n\t // picture-taking conditions\n\t 0x829A: \"ExposureTime\", // Exposure time (in seconds)\n\t 0x829D: \"FNumber\", // F number\n\t 0x8822: \"ExposureProgram\", // Exposure program\n\t 0x8824: \"SpectralSensitivity\", // Spectral sensitivity\n\t 0x8827: \"ISOSpeedRatings\", // ISO speed rating\n\t 0x8828: \"OECF\", // Optoelectric conversion factor\n\t 0x9201: \"ShutterSpeedValue\", // Shutter speed\n\t 0x9202: \"ApertureValue\", // Lens aperture\n\t 0x9203: \"BrightnessValue\", // Value of brightness\n\t 0x9204: \"ExposureBias\", // Exposure bias\n\t 0x9205: \"MaxApertureValue\", // Smallest F number of lens\n\t 0x9206: \"SubjectDistance\", // Distance to subject in meters\n\t 0x9207: \"MeteringMode\", // Metering mode\n\t 0x9208: \"LightSource\", // Kind of light source\n\t 0x9209: \"Flash\", // Flash status\n\t 0x9214: \"SubjectArea\", // Location and area of main subject\n\t 0x920A: \"FocalLength\", // Focal length of the lens in mm\n\t 0xA20B: \"FlashEnergy\", // Strobe energy in BCPS\n\t 0xA20C: \"SpatialFrequencyResponse\", //\n\t 0xA20E: \"FocalPlaneXResolution\", // Number of pixels in width direction per FocalPlaneResolutionUnit\n\t 0xA20F: \"FocalPlaneYResolution\", // Number of pixels in height direction per FocalPlaneResolutionUnit\n\t 0xA210: \"FocalPlaneResolutionUnit\", // Unit for measuring FocalPlaneXResolution and FocalPlaneYResolution\n\t 0xA214: \"SubjectLocation\", // Location of subject in image\n\t 0xA215: \"ExposureIndex\", // Exposure index selected on camera\n\t 0xA217: \"SensingMethod\", // Image sensor type\n\t 0xA300: \"FileSource\", // Image source (3 == DSC)\n\t 0xA301: \"SceneType\", // Scene type (1 == directly photographed)\n\t 0xA302: \"CFAPattern\", // Color filter array geometric pattern\n\t 0xA401: \"CustomRendered\", // Special processing\n\t 0xA402: \"ExposureMode\", // Exposure mode\n\t 0xA403: \"WhiteBalance\", // 1 = auto white balance, 2 = manual\n\t 0xA404: \"DigitalZoomRation\", // Digital zoom ratio\n\t 0xA405: \"FocalLengthIn35mmFilm\", // Equivalent foacl length assuming 35mm film camera (in mm)\n\t 0xA406: \"SceneCaptureType\", // Type of scene\n\t 0xA407: \"GainControl\", // Degree of overall image gain adjustment\n\t 0xA408: \"Contrast\", // Direction of contrast processing applied by camera\n\t 0xA409: \"Saturation\", // Direction of saturation processing applied by camera\n\t 0xA40A: \"Sharpness\", // Direction of sharpness processing applied by camera\n\t 0xA40B: \"DeviceSettingDescription\", //\n\t 0xA40C: \"SubjectDistanceRange\", // Distance to subject\n\t\n\t // other tags\n\t 0xA005: \"InteroperabilityIFDPointer\",\n\t 0xA420: \"ImageUniqueID\" // Identifier assigned uniquely to each image\n\t };\n\t\n\t var TiffTags = EXIF.TiffTags = {\n\t 0x0100: \"ImageWidth\",\n\t 0x0101: \"ImageHeight\",\n\t 0x8769: \"ExifIFDPointer\",\n\t 0x8825: \"GPSInfoIFDPointer\",\n\t 0xA005: \"InteroperabilityIFDPointer\",\n\t 0x0102: \"BitsPerSample\",\n\t 0x0103: \"Compression\",\n\t 0x0106: \"PhotometricInterpretation\",\n\t 0x0112: \"Orientation\",\n\t 0x0115: \"SamplesPerPixel\",\n\t 0x011C: \"PlanarConfiguration\",\n\t 0x0212: \"YCbCrSubSampling\",\n\t 0x0213: \"YCbCrPositioning\",\n\t 0x011A: \"XResolution\",\n\t 0x011B: \"YResolution\",\n\t 0x0128: \"ResolutionUnit\",\n\t 0x0111: \"StripOffsets\",\n\t 0x0116: \"RowsPerStrip\",\n\t 0x0117: \"StripByteCounts\",\n\t 0x0201: \"JPEGInterchangeFormat\",\n\t 0x0202: \"JPEGInterchangeFormatLength\",\n\t 0x012D: \"TransferFunction\",\n\t 0x013E: \"WhitePoint\",\n\t 0x013F: \"PrimaryChromaticities\",\n\t 0x0211: \"YCbCrCoefficients\",\n\t 0x0214: \"ReferenceBlackWhite\",\n\t 0x0132: \"DateTime\",\n\t 0x010E: \"ImageDescription\",\n\t 0x010F: \"Make\",\n\t 0x0110: \"Model\",\n\t 0x0131: \"Software\",\n\t 0x013B: \"Artist\",\n\t 0x8298: \"Copyright\"\n\t };\n\t\n\t var GPSTags = EXIF.GPSTags = {\n\t 0x0000: \"GPSVersionID\",\n\t 0x0001: \"GPSLatitudeRef\",\n\t 0x0002: \"GPSLatitude\",\n\t 0x0003: \"GPSLongitudeRef\",\n\t 0x0004: \"GPSLongitude\",\n\t 0x0005: \"GPSAltitudeRef\",\n\t 0x0006: \"GPSAltitude\",\n\t 0x0007: \"GPSTimeStamp\",\n\t 0x0008: \"GPSSatellites\",\n\t 0x0009: \"GPSStatus\",\n\t 0x000A: \"GPSMeasureMode\",\n\t 0x000B: \"GPSDOP\",\n\t 0x000C: \"GPSSpeedRef\",\n\t 0x000D: \"GPSSpeed\",\n\t 0x000E: \"GPSTrackRef\",\n\t 0x000F: \"GPSTrack\",\n\t 0x0010: \"GPSImgDirectionRef\",\n\t 0x0011: \"GPSImgDirection\",\n\t 0x0012: \"GPSMapDatum\",\n\t 0x0013: \"GPSDestLatitudeRef\",\n\t 0x0014: \"GPSDestLatitude\",\n\t 0x0015: \"GPSDestLongitudeRef\",\n\t 0x0016: \"GPSDestLongitude\",\n\t 0x0017: \"GPSDestBearingRef\",\n\t 0x0018: \"GPSDestBearing\",\n\t 0x0019: \"GPSDestDistanceRef\",\n\t 0x001A: \"GPSDestDistance\",\n\t 0x001B: \"GPSProcessingMethod\",\n\t 0x001C: \"GPSAreaInformation\",\n\t 0x001D: \"GPSDateStamp\",\n\t 0x001E: \"GPSDifferential\"\n\t };\n\t\n\t var StringValues = EXIF.StringValues = {\n\t ExposureProgram : {\n\t 0: \"Not defined\",\n\t 1: \"Manual\",\n\t 2: \"Normal program\",\n\t 3: \"Aperture priority\",\n\t 4: \"Shutter priority\",\n\t 5: \"Creative program\",\n\t 6: \"Action program\",\n\t 7: \"Portrait mode\",\n\t 8: \"Landscape mode\"\n\t },\n\t MeteringMode : {\n\t 0 : \"Unknown\",\n\t 1 : \"Average\",\n\t 2 : \"CenterWeightedAverage\",\n\t 3 : \"Spot\",\n\t 4 : \"MultiSpot\",\n\t 5 : \"Pattern\",\n\t 6 : \"Partial\",\n\t 255: \"Other\"\n\t },\n\t LightSource : {\n\t 0 : \"Unknown\",\n\t 1 : \"Daylight\",\n\t 2 : \"Fluorescent\",\n\t 3 : \"Tungsten (incandescent light)\",\n\t 4 : \"Flash\",\n\t 9 : \"Fine weather\",\n\t 10 : \"Cloudy weather\",\n\t 11 : \"Shade\",\n\t 12 : \"Daylight fluorescent (D 5700 - 7100K)\",\n\t 13 : \"Day white fluorescent (N 4600 - 5400K)\",\n\t 14 : \"Cool white fluorescent (W 3900 - 4500K)\",\n\t 15 : \"White fluorescent (WW 3200 - 3700K)\",\n\t 17 : \"Standard light A\",\n\t 18 : \"Standard light B\",\n\t 19 : \"Standard light C\",\n\t 20 : \"D55\",\n\t 21 : \"D65\",\n\t 22 : \"D75\",\n\t 23 : \"D50\",\n\t 24 : \"ISO studio tungsten\",\n\t 255: \"Other\"\n\t },\n\t Flash : {\n\t 0x0000: \"Flash did not fire\",\n\t 0x0001: \"Flash fired\",\n\t 0x0005: \"Strobe return light not detected\",\n\t 0x0007: \"Strobe return light detected\",\n\t 0x0009: \"Flash fired, compulsory flash mode\",\n\t 0x000D: \"Flash fired, compulsory flash mode, return light not detected\",\n\t 0x000F: \"Flash fired, compulsory flash mode, return light detected\",\n\t 0x0010: \"Flash did not fire, compulsory flash mode\",\n\t 0x0018: \"Flash did not fire, auto mode\",\n\t 0x0019: \"Flash fired, auto mode\",\n\t 0x001D: \"Flash fired, auto mode, return light not detected\",\n\t 0x001F: \"Flash fired, auto mode, return light detected\",\n\t 0x0020: \"No flash function\",\n\t 0x0041: \"Flash fired, red-eye reduction mode\",\n\t 0x0045: \"Flash fired, red-eye reduction mode, return light not detected\",\n\t 0x0047: \"Flash fired, red-eye reduction mode, return light detected\",\n\t 0x0049: \"Flash fired, compulsory flash mode, red-eye reduction mode\",\n\t 0x004D: \"Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected\",\n\t 0x004F: \"Flash fired, compulsory flash mode, red-eye reduction mode, return light detected\",\n\t 0x0059: \"Flash fired, auto mode, red-eye reduction mode\",\n\t 0x005D: \"Flash fired, auto mode, return light not detected, red-eye reduction mode\",\n\t 0x005F: \"Flash fired, auto mode, return light detected, red-eye reduction mode\"\n\t },\n\t SensingMethod : {\n\t 1: \"Not defined\",\n\t 2: \"One-chip color area sensor\",\n\t 3: \"Two-chip color area sensor\",\n\t 4: \"Three-chip color area sensor\",\n\t 5: \"Color sequential area sensor\",\n\t 7: \"Trilinear sensor\",\n\t 8: \"Color sequential linear sensor\"\n\t },\n\t SceneCaptureType : {\n\t 0: \"Standard\",\n\t 1: \"Landscape\",\n\t 2: \"Portrait\",\n\t 3: \"Night scene\"\n\t },\n\t SceneType : {\n\t 1: \"Directly photographed\"\n\t },\n\t CustomRendered : {\n\t 0: \"Normal process\",\n\t 1: \"Custom process\"\n\t },\n\t WhiteBalance : {\n\t 0: \"Auto white balance\",\n\t 1: \"Manual white balance\"\n\t },\n\t GainControl : {\n\t 0: \"None\",\n\t 1: \"Low gain up\",\n\t 2: \"High gain up\",\n\t 3: \"Low gain down\",\n\t 4: \"High gain down\"\n\t },\n\t Contrast : {\n\t 0: \"Normal\",\n\t 1: \"Soft\",\n\t 2: \"Hard\"\n\t },\n\t Saturation : {\n\t 0: \"Normal\",\n\t 1: \"Low saturation\",\n\t 2: \"High saturation\"\n\t },\n\t Sharpness : {\n\t 0: \"Normal\",\n\t 1: \"Soft\",\n\t 2: \"Hard\"\n\t },\n\t SubjectDistanceRange: {\n\t 0: \"Unknown\",\n\t 1: \"Macro\",\n\t 2: \"Close view\",\n\t 3: \"Distant view\"\n\t },\n\t FileSource : {\n\t 3: \"DSC\"\n\t },\n\t\n\t Components: {\n\t 0: \"\",\n\t 1: \"Y\",\n\t 2: \"Cb\",\n\t 3: \"Cr\",\n\t 4: \"R\",\n\t 5: \"G\",\n\t 6: \"B\"\n\t }\n\t };\n\t\n\t function addEvent (element, event, handler) {\n\t if (element.addEventListener) {\n\t element.addEventListener(event, handler, false);\n\t } else if (element.attachEvent) {\n\t element.attachEvent(\"on\" + event, handler);\n\t }\n\t }\n\t\n\t function imageHasData (img) {\n\t return !!(img.exifdata);\n\t }\n\t\n\t\n\t function base64ToArrayBuffer (base64, contentType) {\n\t contentType = contentType || base64.match(/^data\\:([^\\;]+)\\;base64,/mi)[1] || ''; // e.g. 'data:image/jpeg;base64,...' => 'image/jpeg'\n\t base64 = base64.replace(/^data\\:([^\\;]+)\\;base64,/gmi, '');\n\t var binary = atob(base64);\n\t var len = binary.length;\n\t var buffer = new ArrayBuffer(len);\n\t var view = new Uint8Array(buffer);\n\t for (var i = 0; i < len; i++) {\n\t view[i] = binary.charCodeAt(i);\n\t }\n\t return buffer;\n\t }\n\t\n\t function objectURLToBlob (url, callback) {\n\t var http = new XMLHttpRequest();\n\t http.open(\"GET\", url, true);\n\t http.responseType = \"blob\";\n\t http.onload = function (e) {\n\t if (this.status == 200 || this.status === 0) {\n\t callback(this.response);\n\t }\n\t };\n\t http.send();\n\t }\n\t\n\t function getImageData (img, callback) {\n\t function handleBinaryFile (binFile) {\n\t var data = findEXIFinJPEG(binFile);\n\t var iptcdata = findIPTCinJPEG(binFile);\n\t img.exifdata = data || {};\n\t img.iptcdata = iptcdata || {};\n\t if (callback) {\n\t callback.call(img);\n\t }\n\t }\n\t\n\t if (img.src) {\n\t if (/^data\\:/i.test(img.src)) { // Data URI\n\t var arrayBuffer = base64ToArrayBuffer(img.src);\n\t handleBinaryFile(arrayBuffer);\n\t\n\t } else if (/^blob\\:/i.test(img.src)) { // Object URL\n\t var fileReader = new FileReader();\n\t fileReader.onload = function (e) {\n\t handleBinaryFile(e.target.result);\n\t };\n\t objectURLToBlob(img.src, function (blob) {\n\t fileReader.readAsArrayBuffer(blob);\n\t });\n\t } else {\n\t var http = new XMLHttpRequest();\n\t http.onload = function () {\n\t if (this.status == 200 || this.status === 0) {\n\t handleBinaryFile(http.response);\n\t } else {\n\t callback(new Error(\"Could not load image\"));\n\t }\n\t http = null;\n\t };\n\t http.open(\"GET\", img.src, true);\n\t http.responseType = \"arraybuffer\";\n\t http.send(null);\n\t }\n\t } else if (window.FileReader && (img instanceof window.Blob || img instanceof window.File)) {\n\t var fileReader = new FileReader();\n\t fileReader.onload = function (e) {\n\t if (debug) console.log(\"Got file of length \" + e.target.result.byteLength);\n\t handleBinaryFile(e.target.result);\n\t };\n\t\n\t fileReader.readAsArrayBuffer(img);\n\t }\n\t }\n\t\n\t function findEXIFinJPEG (file) {\n\t var dataView = new DataView(file);\n\t\n\t if (debug) console.log(\"Got file of length \" + file.byteLength);\n\t if ((dataView.getUint8(0) != 0xFF) || (dataView.getUint8(1) != 0xD8)) {\n\t if (debug) console.log(\"Not a valid JPEG\");\n\t return false; // not a valid jpeg\n\t }\n\t\n\t var offset = 2,\n\t length = file.byteLength,\n\t marker;\n\t\n\t while (offset < length) {\n\t if (dataView.getUint8(offset) != 0xFF) {\n\t if (debug) console.log(\"Not a valid marker at offset \" + offset + \", found: \" + dataView.getUint8(offset));\n\t return false; // not a valid marker, something is wrong\n\t }\n\t\n\t marker = dataView.getUint8(offset + 1);\n\t if (debug) console.log(marker);\n\t\n\t // we could implement handling for other markers here,\n\t // but we're only looking for 0xFFE1 for EXIF data\n\t\n\t if (marker == 225) {\n\t if (debug) console.log(\"Found 0xFFE1 marker\");\n\t\n\t return readEXIFData(dataView, offset + 4, dataView.getUint16(offset + 2) - 2);\n\t\n\t // offset += 2 + file.getShortAt(offset+2, true);\n\t\n\t } else {\n\t offset += 2 + dataView.getUint16(offset + 2);\n\t }\n\t\n\t }\n\t\n\t }\n\t\n\t function findIPTCinJPEG (file) {\n\t var dataView = new DataView(file);\n\t\n\t if (debug) console.log(\"Got file of length \" + file.byteLength);\n\t if ((dataView.getUint8(0) != 0xFF) || (dataView.getUint8(1) != 0xD8)) {\n\t if (debug) console.log(\"Not a valid JPEG\");\n\t return false; // not a valid jpeg\n\t }\n\t\n\t var offset = 2,\n\t length = file.byteLength;\n\t\n\t\n\t var isFieldSegmentStart = function (dataView, offset) {\n\t return (\n\t dataView.getUint8(offset) === 0x38 &&\n\t dataView.getUint8(offset + 1) === 0x42 &&\n\t dataView.getUint8(offset + 2) === 0x49 &&\n\t dataView.getUint8(offset + 3) === 0x4D &&\n\t dataView.getUint8(offset + 4) === 0x04 &&\n\t dataView.getUint8(offset + 5) === 0x04\n\t );\n\t };\n\t\n\t while (offset < length) {\n\t\n\t if (isFieldSegmentStart(dataView, offset)) {\n\t\n\t // Get the length of the name header (which is padded to an even number of bytes)\n\t var nameHeaderLength = dataView.getUint8(offset + 7);\n\t if (nameHeaderLength % 2 !== 0) nameHeaderLength += 1;\n\t // Check for pre photoshop 6 format\n\t if (nameHeaderLength === 0) {\n\t // Always 4\n\t nameHeaderLength = 4;\n\t }\n\t\n\t var startOffset = offset + 8 + nameHeaderLength;\n\t var sectionLength = dataView.getUint16(offset + 6 + nameHeaderLength);\n\t\n\t return readIPTCData(file, startOffset, sectionLength);\n\t\n\t break;\n\t\n\t }\n\t\n\t\n\t // Not the marker, continue searching\n\t offset++;\n\t\n\t }\n\t\n\t }\n\t\n\t var IptcFieldMap = {\n\t 0x78: 'caption',\n\t 0x6E: 'credit',\n\t 0x19: 'keywords',\n\t 0x37: 'dateCreated',\n\t 0x50: 'byline',\n\t 0x55: 'bylineTitle',\n\t 0x7A: 'captionWriter',\n\t 0x69: 'headline',\n\t 0x74: 'copyright',\n\t 0x0F: 'category'\n\t };\n\t\n\t function readIPTCData (file, startOffset, sectionLength) {\n\t var dataView = new DataView(file);\n\t var data = {};\n\t var fieldValue, fieldName, dataSize, segmentType, segmentSize;\n\t var segmentStartPos = startOffset;\n\t while (segmentStartPos < startOffset + sectionLength) {\n\t if (dataView.getUint8(segmentStartPos) === 0x1C && dataView.getUint8(segmentStartPos + 1) === 0x02) {\n\t segmentType = dataView.getUint8(segmentStartPos + 2);\n\t if (segmentType in IptcFieldMap) {\n\t dataSize = dataView.getInt16(segmentStartPos + 3);\n\t segmentSize = dataSize + 5;\n\t fieldName = IptcFieldMap[segmentType];\n\t fieldValue = getStringFromDB(dataView, segmentStartPos + 5, dataSize);\n\t // Check if we already stored a value with this name\n\t if (data.hasOwnProperty(fieldName)) {\n\t // Value already stored with this name, create multivalue field\n\t if (data[fieldName] instanceof Array) {\n\t data[fieldName].push(fieldValue);\n\t }\n\t else {\n\t data[fieldName] = [data[fieldName], fieldValue];\n\t }\n\t }\n\t else {\n\t data[fieldName] = fieldValue;\n\t }\n\t }\n\t\n\t }\n\t segmentStartPos++;\n\t }\n\t return data;\n\t }\n\t\n\t\n\t function readTags (file, tiffStart, dirStart, strings, bigEnd) {\n\t var entries = file.getUint16(dirStart, !bigEnd),\n\t tags = {},\n\t entryOffset, tag,\n\t i;\n\t\n\t for (i = 0; i < entries; i++) {\n\t entryOffset = dirStart + i * 12 + 2;\n\t tag = strings[file.getUint16(entryOffset, !bigEnd)];\n\t if (!tag && debug) console.log(\"Unknown tag: \" + file.getUint16(entryOffset, !bigEnd));\n\t tags[tag] = readTagValue(file, entryOffset, tiffStart, dirStart, bigEnd);\n\t }\n\t return tags;\n\t }\n\t\n\t\n\t function readTagValue (file, entryOffset, tiffStart, dirStart, bigEnd) {\n\t var type = file.getUint16(entryOffset + 2, !bigEnd),\n\t numValues = file.getUint32(entryOffset + 4, !bigEnd),\n\t valueOffset = file.getUint32(entryOffset + 8, !bigEnd) + tiffStart,\n\t offset,\n\t vals, val, n,\n\t numerator, denominator;\n\t\n\t switch (type) {\n\t case 1: // byte, 8-bit unsigned int\n\t case 7: // undefined, 8-bit byte, value depending on field\n\t if (numValues == 1) {\n\t return file.getUint8(entryOffset + 8, !bigEnd);\n\t } else {\n\t offset = numValues > 4 ? valueOffset : (entryOffset + 8);\n\t vals = [];\n\t for (n = 0; n < numValues; n++) {\n\t vals[n] = file.getUint8(offset + n);\n\t }\n\t return vals;\n\t }\n\t\n\t case 2: // ascii, 8-bit byte\n\t offset = numValues > 4 ? valueOffset : (entryOffset + 8);\n\t return getStringFromDB(file, offset, numValues - 1);\n\t\n\t case 3: // short, 16 bit int\n\t if (numValues == 1) {\n\t return file.getUint16(entryOffset + 8, !bigEnd);\n\t } else {\n\t offset = numValues > 2 ? valueOffset : (entryOffset + 8);\n\t vals = [];\n\t for (n = 0; n < numValues; n++) {\n\t vals[n] = file.getUint16(offset + 2 * n, !bigEnd);\n\t }\n\t return vals;\n\t }\n\t\n\t case 4: // long, 32 bit int\n\t if (numValues == 1) {\n\t return file.getUint32(entryOffset + 8, !bigEnd);\n\t } else {\n\t vals = [];\n\t for (n = 0; n < numValues; n++) {\n\t vals[n] = file.getUint32(valueOffset + 4 * n, !bigEnd);\n\t }\n\t return vals;\n\t }\n\t\n\t case 5: // rational = two long values, first is numerator, second is denominator\n\t if (numValues == 1) {\n\t numerator = file.getUint32(valueOffset, !bigEnd);\n\t denominator = file.getUint32(valueOffset + 4, !bigEnd);\n\t val = new Number(numerator / denominator);\n\t val.numerator = numerator;\n\t val.denominator = denominator;\n\t return val;\n\t } else {\n\t vals = [];\n\t for (n = 0; n < numValues; n++) {\n\t numerator = file.getUint32(valueOffset + 8 * n, !bigEnd);\n\t denominator = file.getUint32(valueOffset + 4 + 8 * n, !bigEnd);\n\t vals[n] = new Number(numerator / denominator);\n\t vals[n].numerator = numerator;\n\t vals[n].denominator = denominator;\n\t }\n\t return vals;\n\t }\n\t\n\t case 9: // slong, 32 bit signed int\n\t if (numValues == 1) {\n\t return file.getInt32(entryOffset + 8, !bigEnd);\n\t } else {\n\t vals = [];\n\t for (n = 0; n < numValues; n++) {\n\t vals[n] = file.getInt32(valueOffset + 4 * n, !bigEnd);\n\t }\n\t return vals;\n\t }\n\t\n\t case 10: // signed rational, two slongs, first is numerator, second is denominator\n\t if (numValues == 1) {\n\t return file.getInt32(valueOffset, !bigEnd) / file.getInt32(valueOffset + 4, !bigEnd);\n\t } else {\n\t vals = [];\n\t for (n = 0; n < numValues; n++) {\n\t vals[n] = file.getInt32(valueOffset + 8 * n, !bigEnd) / file.getInt32(valueOffset + 4 + 8 * n, !bigEnd);\n\t }\n\t return vals;\n\t }\n\t }\n\t }\n\t\n\t function getStringFromDB (buffer, start, length) {\n\t var outstr = \"\", n;\n\t for (n = start; n < start + length; n++) {\n\t outstr += String.fromCharCode(buffer.getUint8(n));\n\t }\n\t return outstr;\n\t }\n\t\n\t function readEXIFData (file, start) {\n\t if (getStringFromDB(file, start, 4) != \"Exif\") {\n\t if (debug) console.log(\"Not valid EXIF data! \" + getStringFromDB(file, start, 4));\n\t return false;\n\t }\n\t\n\t var bigEnd,\n\t tags, tag,\n\t exifData, gpsData,\n\t tiffOffset = start + 6;\n\t\n\t // test for TIFF validity and endianness\n\t if (file.getUint16(tiffOffset) == 0x4949) {\n\t bigEnd = false;\n\t } else if (file.getUint16(tiffOffset) == 0x4D4D) {\n\t bigEnd = true;\n\t } else {\n\t if (debug) console.log(\"Not valid TIFF data! (no 0x4949 or 0x4D4D)\");\n\t return false;\n\t }\n\t\n\t if (file.getUint16(tiffOffset + 2, !bigEnd) != 0x002A) {\n\t if (debug) console.log(\"Not valid TIFF data! (no 0x002A)\");\n\t return false;\n\t }\n\t\n\t var firstIFDOffset = file.getUint32(tiffOffset + 4, !bigEnd);\n\t\n\t if (firstIFDOffset < 0x00000008) {\n\t if (debug) console.log(\"Not valid TIFF data! (First offset less than 8)\", file.getUint32(tiffOffset + 4, !bigEnd));\n\t return false;\n\t }\n\t\n\t tags = readTags(file, tiffOffset, tiffOffset + firstIFDOffset, TiffTags, bigEnd);\n\t\n\t if (tags.ExifIFDPointer) {\n\t exifData = readTags(file, tiffOffset, tiffOffset + tags.ExifIFDPointer, ExifTags, bigEnd);\n\t for (tag in exifData) {\n\t switch (tag) {\n\t case \"LightSource\" :\n\t case \"Flash\" :\n\t case \"MeteringMode\" :\n\t case \"ExposureProgram\" :\n\t case \"SensingMethod\" :\n\t case \"SceneCaptureType\" :\n\t case \"SceneType\" :\n\t case \"CustomRendered\" :\n\t case \"WhiteBalance\" :\n\t case \"GainControl\" :\n\t case \"Contrast\" :\n\t case \"Saturation\" :\n\t case \"Sharpness\" :\n\t case \"SubjectDistanceRange\" :\n\t case \"FileSource\" :\n\t exifData[tag] = StringValues[tag][exifData[tag]];\n\t break;\n\t\n\t case \"ExifVersion\" :\n\t case \"FlashpixVersion\" :\n\t exifData[tag] = String.fromCharCode(exifData[tag][0], exifData[tag][1], exifData[tag][2], exifData[tag][3]);\n\t break;\n\t\n\t case \"ComponentsConfiguration\" :\n\t exifData[tag] =\n\t StringValues.Components[exifData[tag][0]] +\n\t StringValues.Components[exifData[tag][1]] +\n\t StringValues.Components[exifData[tag][2]] +\n\t StringValues.Components[exifData[tag][3]];\n\t break;\n\t }\n\t tags[tag] = exifData[tag];\n\t }\n\t }\n\t\n\t if (tags.GPSInfoIFDPointer) {\n\t gpsData = readTags(file, tiffOffset, tiffOffset + tags.GPSInfoIFDPointer, GPSTags, bigEnd);\n\t for (tag in gpsData) {\n\t switch (tag) {\n\t case \"GPSVersionID\" :\n\t gpsData[tag] = gpsData[tag][0] +\n\t \".\" + gpsData[tag][1] +\n\t \".\" + gpsData[tag][2] +\n\t \".\" + gpsData[tag][3];\n\t break;\n\t }\n\t tags[tag] = gpsData[tag];\n\t }\n\t }\n\t\n\t return tags;\n\t }\n\t\n\t EXIF.getData = function (img, callback) {\n\t if ((img instanceof Image || img instanceof HTMLImageElement) && !img.complete) return false;\n\t\n\t if (!imageHasData(img)) {\n\t getImageData(img, callback);\n\t } else {\n\t if (callback) {\n\t callback.call(img);\n\t }\n\t }\n\t return true;\n\t }\n\t\n\t EXIF.getTag = function (img, tag) {\n\t if (!imageHasData(img)) return;\n\t return img.exifdata[tag];\n\t }\n\t\n\t EXIF.getAllTags = function (img) {\n\t if (!imageHasData(img)) return {};\n\t var a,\n\t data = img.exifdata,\n\t tags = {};\n\t for (a in data) {\n\t if (data.hasOwnProperty(a)) {\n\t tags[a] = data[a];\n\t }\n\t }\n\t return tags;\n\t }\n\t\n\t EXIF.pretty = function (img) {\n\t if (!imageHasData(img)) return \"\";\n\t var a,\n\t data = img.exifdata,\n\t strPretty = \"\";\n\t for (a in data) {\n\t if (data.hasOwnProperty(a)) {\n\t if (typeof data[a] == \"object\") {\n\t if (data[a] instanceof Number) {\n\t strPretty += a + \" : \" + data[a] + \" [\" + data[a].numerator + \"/\" + data[a].denominator + \"]\\r\\n\";\n\t } else {\n\t strPretty += a + \" : [\" + data[a].length + \" values]\\r\\n\";\n\t }\n\t } else {\n\t strPretty += a + \" : \" + data[a] + \"\\r\\n\";\n\t }\n\t }\n\t }\n\t return strPretty;\n\t }\n\t\n\t EXIF.readFromBinaryFile = function (file) {\n\t return findEXIFinJPEG(file);\n\t }\n\t\n\t if (true) {\n\t !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = function () {\n\t return EXIF;\n\t }.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n\t }\n\t}.call(this));\n\n/***/ }\n/******/ ])\n});\n;\n\n\n/** WEBPACK FOOTER **\n ** lrz.bundle.js\n **/"," \t// install a JSONP callback for chunk loading\n \tvar parentJsonpFunction = window[\"webpackJsonp\"];\n \twindow[\"webpackJsonp\"] = function webpackJsonpCallback(chunkIds, moreModules) {\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, callbacks = [];\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(installedChunks[chunkId])\n \t\t\t\tcallbacks.push.apply(callbacks, installedChunks[chunkId]);\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(chunkIds, moreModules);\n \t\twhile(callbacks.length)\n \t\t\tcallbacks.shift().call(null, __webpack_require__);\n\n \t};\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// object to store loaded and loading chunks\n \t// \"0\" means \"already loaded\"\n \t// Array means \"loading\", array contains callbacks\n \tvar installedChunks = {\n \t\t0:0\n \t};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n \t// This file contains only the entry chunk.\n \t// The chunk loading function for additional chunks\n \t__webpack_require__.e = function requireEnsure(chunkId, callback) {\n \t\t// \"0\" is the signal for \"already loaded\"\n \t\tif(installedChunks[chunkId] === 0)\n \t\t\treturn callback.call(null, __webpack_require__);\n\n \t\t// an array means \"currently loading\".\n \t\tif(installedChunks[chunkId] !== undefined) {\n \t\t\tinstalledChunks[chunkId].push(callback);\n \t\t} else {\n \t\t\t// start chunk loading\n \t\t\tinstalledChunks[chunkId] = [callback];\n \t\t\tvar head = document.getElementsByTagName('head')[0];\n \t\t\tvar script = document.createElement('script');\n \t\t\tscript.type = 'text/javascript';\n \t\t\tscript.charset = 'utf-8';\n \t\t\tscript.async = true;\n\n \t\t\tscript.src = __webpack_require__.p + \"\" + ({}[chunkId]||chunkId) + \".chunk.js\";\n \t\t\thead.appendChild(script);\n \t\t}\n \t};\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n/** WEBPACK FOOTER **\n ** webpack/bootstrap abd039b38ea6f53efda0\n **/","// 保证按需加载的文件路径正确\n__webpack_public_path__ = getJsDir('lrz') + '/';\nwindow.URL = window.URL || window.webkitURL;\n\nvar Promise = require('Promise'),\n BlobFormDataShim = require('Blob.FormData.shim'),\n exif = require('exif');\n\n\nvar UA = (function (userAgent) {\n var ISOldIOS = /OS (\\d)_.* like Mac OS X/g.exec(userAgent),\n isOldAndroid = /Android (\\d.*?);/g.exec(userAgent) || /Android\\/(\\d.*?) /g.exec(userAgent);\n\n // 判断设备是否是IOS7以下\n // 判断设备是否是android4.5以下\n // 判断是否iOS\n // 判断是否android\n // 判断是否QQ浏览器\n return {\n oldIOS : ISOldIOS ? +ISOldIOS.pop() < 8 : false,\n oldAndroid: isOldAndroid ? +isOldAndroid.pop().substr(0, 3) < 4.5 : false,\n iOS : /\\(i[^;]+;( U;)? CPU.+Mac OS X/.test(userAgent),\n android : /Android/g.test(userAgent),\n mQQBrowser: /MQQBrowser/g.test(userAgent)\n }\n})(navigator.userAgent);\n\n\nfunction Lrz (file, opts) {\n var that = this;\n\n if (!file) throw new Error('没有收到图片,可能的解决方案:https://github.com/think2011/localResizeIMG/issues/7');\n\n opts = opts || {};\n\n that.defaults = {\n width : null,\n height : null,\n fieldName: 'file',\n quality : 0.7\n };\n\n that.file = file;\n\n for (var p in opts) {\n if (!opts.hasOwnProperty(p)) continue;\n that.defaults[p] = opts[p];\n }\n\n return this.init();\n}\n\nLrz.prototype.init = function () {\n var that = this,\n file = that.file,\n fileIsString = typeof file === 'string',\n fileIsBase64 = /^data:/.test(file),\n img = new Image(),\n canvas = document.createElement('canvas'),\n blob = fileIsString ? file : URL.createObjectURL(file);\n\n that.img = img;\n that.blob = blob;\n that.canvas = canvas;\n\n if (fileIsString) {\n that.fileName = fileIsBase64 ? 'base64.jpg' : (file.split('/').pop());\n } else {\n that.fileName = file.name;\n }\n\n if (!document.createElement('canvas').getContext) {\n throw new Error('浏览器不支持canvas');\n }\n\n return new Promise(function (resolve, reject) {\n img.onerror = function () {\n throw new Error('加载图片文件失败');\n };\n\n img.onload = function () {\n that._getBase64()\n .then(function (base64) {\n if (base64.length < 10) reject('生成base64失败');\n\n return base64;\n })\n .then(function (base64) {\n var formData = null;\n\n // 压缩文件太大就采用源文件,且使用原生的FormData() @source #55\n if (typeof that.file === 'object' && base64.length > that.file.size) {\n formData = new FormData();\n file = that.file;\n } else {\n formData = new BlobFormDataShim.FormData();\n file = dataURItoBlob(base64);\n }\n\n formData.append(that.defaults.fieldName, file, (that.fileName.replace(/\\..+/g, '.jpg')));\n\n resolve({\n formData : formData,\n fileLen : +file.size,\n base64 : base64,\n base64Len: base64.length,\n origin : that.file\n });\n\n // 释放内存\n for (var p in that) {\n if (!that.hasOwnProperty(p)) continue;\n\n that[p] = null;\n }\n URL.revokeObjectURL(that.blob);\n });\n };\n\n // 如果传入的是base64在移动端会报错\n !fileIsBase64 && (img.crossOrigin = \"*\");\n\n img.src = blob;\n });\n};\n\nLrz.prototype._getBase64 = function () {\n var that = this,\n img = that.img,\n file = that.file,\n canvas = that.canvas;\n\n return new Promise(function (resolve) {\n try {\n // 传入blob在android4.3以下有bug\n exif.getData(typeof file === 'object' ? file : img, function () {\n that.orientation = exif.getTag(this, \"Orientation\");\n\n that.resize = that._getResize();\n that.ctx = canvas.getContext('2d');\n\n canvas.width = that.resize.width;\n canvas.height = that.resize.height;\n\n // 设置为白色背景,jpg是不支持透明的,所以会被默认为canvas默认的黑色背景。\n that.ctx.fillStyle = '#fff';\n that.ctx.fillRect(0, 0, canvas.width, canvas.height);\n\n // 根据设备对应处理方式\n if (UA.oldIOS) {\n that._createBase64ForOldIOS().then(resolve);\n }\n else {\n that._createBase64().then(resolve);\n }\n });\n } catch (err) {\n // 这样能解决低内存设备闪退的问题吗?\n throw new Error(err);\n }\n });\n};\n\n\nLrz.prototype._createBase64ForOldIOS = function () {\n var that = this,\n img = that.img,\n canvas = that.canvas,\n defaults = that.defaults,\n orientation = that.orientation;\n\n return new Promise(function (resolve) {\n require(['megapix-image'], function (MegaPixImage) {\n var mpImg = new MegaPixImage(img);\n\n if (\"5678\".indexOf(orientation) > -1) {\n mpImg.render(canvas, {\n width : canvas.height,\n height : canvas.width,\n orientation: orientation\n });\n } else {\n mpImg.render(canvas, {\n width : canvas.width,\n height : canvas.height,\n orientation: orientation\n });\n }\n\n resolve(canvas.toDataURL('image/jpeg', defaults.quality));\n });\n });\n};\n\nLrz.prototype._createBase64 = function () {\n var that = this,\n resize = that.resize,\n img = that.img,\n canvas = that.canvas,\n ctx = that.ctx,\n defaults = that.defaults,\n orientation = that.orientation;\n\n // 调整为正确方向\n switch (orientation) {\n case 3:\n ctx.rotate(180 * Math.PI / 180);\n ctx.drawImage(img, -resize.width, -resize.height, resize.width, resize.height);\n break;\n case 6:\n ctx.rotate(90 * Math.PI / 180);\n ctx.drawImage(img, 0, -resize.width, resize.height, resize.width);\n break;\n case 8:\n ctx.rotate(270 * Math.PI / 180);\n ctx.drawImage(img, -resize.height, 0, resize.height, resize.width);\n break;\n\n case 2:\n ctx.translate(resize.width, 0);\n ctx.scale(-1, 1);\n ctx.drawImage(img, 0, 0, resize.width, resize.height);\n break;\n case 4:\n ctx.translate(resize.width, 0);\n ctx.scale(-1, 1);\n ctx.rotate(180 * Math.PI / 180);\n ctx.drawImage(img, -resize.width, -resize.height, resize.width, resize.height);\n break;\n case 5:\n ctx.translate(resize.width, 0);\n ctx.scale(-1, 1);\n ctx.rotate(90 * Math.PI / 180);\n ctx.drawImage(img, 0, -resize.width, resize.height, resize.width);\n break;\n case 7:\n ctx.translate(resize.width, 0);\n ctx.scale(-1, 1);\n ctx.rotate(270 * Math.PI / 180);\n ctx.drawImage(img, -resize.height, 0, resize.height, resize.width);\n break;\n\n default:\n ctx.drawImage(img, 0, 0, resize.width, resize.height);\n }\n\n return new Promise(function (resolve) {\n if (UA.oldAndroid || UA.mQQBrowser || !navigator.userAgent) {\n require(['jpeg_encoder_basic'], function (JPEGEncoder) {\n var encoder = new JPEGEncoder(),\n img = ctx.getImageData(0, 0, canvas.width, canvas.height);\n\n resolve(encoder.encode(img, defaults.quality * 100));\n })\n }\n else {\n resolve(canvas.toDataURL('image/jpeg', defaults.quality));\n }\n });\n};\n\nLrz.prototype._getResize = function () {\n var that = this,\n img = that.img,\n defaults = that.defaults,\n width = defaults.width,\n height = defaults.height,\n orientation = that.orientation;\n\n var ret = {\n width : img.width,\n height: img.height\n };\n\n if (\"5678\".indexOf(orientation) > -1) {\n ret.width = img.height;\n ret.height = img.width;\n }\n\n // 如果原图小于设定,采用原图\n if (ret.width < width || ret.height < height) {\n return ret;\n }\n\n var scale = ret.width / ret.height;\n\n if (width && height) {\n if (scale >= width / height) {\n if (ret.width > width) {\n ret.width = width;\n ret.height = Math.ceil(width / scale);\n }\n } else {\n if (ret.height > height) {\n ret.height = height;\n ret.width = Math.ceil(height * scale);\n }\n }\n }\n else if (width) {\n if (width < ret.width) {\n ret.width = width;\n ret.height = Math.ceil(width / scale);\n }\n }\n else if (height) {\n if (height < ret.height) {\n ret.width = Math.ceil(height * scale);\n ret.height = height;\n }\n }\n\n // 超过这个值base64无法生成,在IOS上\n while (ret.width >= 3264 || ret.height >= 2448) {\n ret.width *= 0.8;\n ret.height *= 0.8;\n }\n\n return ret;\n};\n\n/**\n * 获取当前js文件所在路径,必须得在代码顶部执行此函数\n * @returns {string}\n */\nfunction getJsDir (src) {\n var script = null;\n\n if (src) {\n script = [].filter.call(document.scripts, function (v) {\n return v.src.indexOf(src) !== -1;\n })[0];\n } else {\n script = document.scripts[document.scripts.length - 1];\n }\n\n if (!script) return null;\n\n return script.src.substr(0, script.src.lastIndexOf('/'));\n}\n\n\n/**\n * 转换成formdata\n * @param dataURI\n * @returns {*}\n *\n * @source http://stackoverflow.com/questions/4998908/convert-data-uri-to-file-then-append-to-formdata\n */\nfunction dataURItoBlob (dataURI) {\n // convert base64/URLEncoded data component to raw binary data held in a string\n var byteString;\n if (dataURI.split(',')[0].indexOf('base64') >= 0)\n byteString = atob(dataURI.split(',')[1]);\n else\n byteString = unescape(dataURI.split(',')[1]);\n\n // separate out the mime component\n var mimeString = dataURI.split(',')[0].split(':')[1].split(';')[0];\n\n // write the bytes of the string to a typed array\n var ia = new Uint8Array(byteString.length);\n for (var i = 0; i < byteString.length; i++) {\n ia[i] = byteString.charCodeAt(i);\n }\n\n return new BlobFormDataShim.Blob([ia.buffer], {type: mimeString});\n}\n\nwindow.lrz = function (file, opts) {\n return new Lrz(file, opts);\n};\n\n// 版本号来自package.json,构建时自动填充\nwindow.lrz.version = '4.8.35';\n\nmodule.exports = window.lrz;\n\n/**\n *\n *    ┏┓   ┏┓\n *   ┏┛┻━━━┛┻┓\n *   ┃       ┃\n *   ┃   ━   ┃\n *   ┃ ┳┛ ┗┳ ┃\n *   ┃       ┃\n *   ┃   ┻   ┃\n *   ┃       ┃\n *   ┗━┓   ┏━┛Code is far away from bug with the animal protecting\n *     ┃   ┃ 神兽保佑,代码无bug\n *     ┃   ┃\n *     ┃   ┗━━━┓\n *     ┃      ┣┓\n *     ┃     ┏┛\n *     ┗┓┓┏━┳┓┏┛\n *      ┃┫┫ ┃┫┫\n *      ┗┻┛ ┗┻┛\n *\n */\n\n\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./src/lrz.js\n ** module id = 0\n ** module chunks = 0\n **/","null\n\n\n/** WEBPACK FOOTER **\n ** src/lib/Promise.js\n **/","var nextTick = require('process/browser.js').nextTick;\nvar apply = Function.prototype.apply;\nvar slice = Array.prototype.slice;\nvar immediateIds = {};\nvar nextImmediateId = 0;\n\n// DOM APIs, for completeness\n\nexports.setTimeout = function() {\n return new Timeout(apply.call(setTimeout, window, arguments), clearTimeout);\n};\nexports.setInterval = function() {\n return new Timeout(apply.call(setInterval, window, arguments), clearInterval);\n};\nexports.clearTimeout =\nexports.clearInterval = function(timeout) { timeout.close(); };\n\nfunction Timeout(id, clearFn) {\n this._id = id;\n this._clearFn = clearFn;\n}\nTimeout.prototype.unref = Timeout.prototype.ref = function() {};\nTimeout.prototype.close = function() {\n this._clearFn.call(window, this._id);\n};\n\n// Does not start the time, just sets up the members needed.\nexports.enroll = function(item, msecs) {\n clearTimeout(item._idleTimeoutId);\n item._idleTimeout = msecs;\n};\n\nexports.unenroll = function(item) {\n clearTimeout(item._idleTimeoutId);\n item._idleTimeout = -1;\n};\n\nexports._unrefActive = exports.active = function(item) {\n clearTimeout(item._idleTimeoutId);\n\n var msecs = item._idleTimeout;\n if (msecs >= 0) {\n item._idleTimeoutId = setTimeout(function onTimeout() {\n if (item._onTimeout)\n item._onTimeout();\n }, msecs);\n }\n};\n\n// That's not how node.js implements it but the exposed api is the same.\nexports.setImmediate = typeof setImmediate === \"function\" ? setImmediate : function(fn) {\n var id = nextImmediateId++;\n var args = arguments.length < 2 ? false : slice.call(arguments, 1);\n\n immediateIds[id] = true;\n\n nextTick(function onNextTick() {\n if (immediateIds[id]) {\n // fn.call() is faster so we optimize for the common use-case\n // @see http://jsperf.com/call-apply-segu\n if (args) {\n fn.apply(null, args);\n } else {\n fn.call(null);\n }\n // Prevent ids from leaking\n exports.clearImmediate(id);\n }\n });\n\n return id;\n};\n\nexports.clearImmediate = typeof clearImmediate === \"function\" ? clearImmediate : function(id) {\n delete immediateIds[id];\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/timers-browserify/main.js\n ** module id = 2\n ** module chunks = 0 3\n **/","// shim for using process in browser\n\nvar process = module.exports = {};\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = setTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n clearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n setTimeout(drainQueue, 0);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/process/browser.js\n ** module id = 3\n ** module chunks = 0 3\n **/","//@source https://xts.so/demo/compress/index.html\n\n// 早期版本的浏览器需要用BlobBuilder来构造Blob,创建一个通用构造器来兼容早期版本\nvar BlobConstructor = ((function () {\n try {\n new Blob();\n return true;\n } catch (e) {\n return false;\n }\n})()) ? window.Blob : function (parts, opts) {\n var bb = new (\n window.BlobBuilder\n || window.WebKitBlobBuilder\n || window.MSBlobBuilder\n || window.MozBlobBuilder\n );\n parts.forEach(function (p) {\n bb.append(p);\n });\n\n return bb.getBlob(opts ? opts.type : undefined);\n};\n\n// Android上的AppleWebKit 534以前的内核存在一个Bug,\n// 导致FormData加入一个Blob对象后,上传的文件是0字节\nfunction hasFormDataBug () {\n var bCheck = ~navigator.userAgent.indexOf('Android')\n && ~navigator.vendor.indexOf('Google')\n && !~navigator.userAgent.indexOf('Chrome');\n\n // QQ X5浏览器也有这个BUG\n return bCheck && navigator.userAgent.match(/AppleWebKit\\/(\\d+)/).pop() <= 534 || /MQQBrowser/g.test(navigator.userAgent);\n}\nfunction FormDataShim () {\n var\n // Store a reference to this\n o = this,\n\n // Data to be sent\n parts = [],\n\n // Boundary parameter for separating the multipart values\n boundary = Array(21).join('-') + (+new Date() * (1e16 * Math.random())).toString(36),\n\n // Store the current XHR send method so we can safely override it\n oldSend = XMLHttpRequest.prototype.send;\n this.getParts = function () {\n return parts.toString();\n };\n this.append = function (name, value, filename) {\n parts.push('--' + boundary + '\\r\\nContent-Disposition: form-data; name=\"' + name + '\"');\n\n if (value instanceof Blob) {\n parts.push('; filename=\"' + (filename || 'blob') + '\"\\r\\nContent-Type: ' + value.type + '\\r\\n\\r\\n');\n parts.push(value);\n }\n else {\n parts.push('\\r\\n\\r\\n' + value);\n }\n parts.push('\\r\\n');\n };\n\n XMLHttpRequest.prototype.send = function (val) {\n var fr,\n data,\n oXHR = this;\n\n if (val === o) {\n // Append the final boundary string\n parts.push('--' + boundary + '--\\r\\n');\n // Create the blob\n data = new BlobConstructor(parts);\n\n // Set up and read the blob into an array to be sent\n fr = new FileReader();\n fr.onload = function () {\n oldSend.call(oXHR, fr.result);\n };\n fr.onerror = function (err) {\n throw err;\n };\n fr.readAsArrayBuffer(data);\n\n // Set the multipart content type and boudary\n this.setRequestHeader('Content-Type', 'multipart/form-data; boundary=' + boundary);\n XMLHttpRequest.prototype.send = oldSend;\n }\n else {\n oldSend.call(this, val);\n }\n };\n}\n\n\nmodule.exports = {\n Blob : BlobConstructor,\n FormData: hasFormDataBug() ? FormDataShim : FormData\n};\n\n\n\n/** WEBPACK FOOTER **\n ** src/lib/Blob.FormData.shim.js\n **/","null\n\n\n/** WEBPACK FOOTER **\n ** src/lib/exif.js\n **/"],"sourceRoot":""}