hexo-theme-redefine
Version:
Redefine your writing with Hexo Theme Redefine.
1 lines • 112 kB
JavaScript
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.ExifReader=t():e.ExifReader=t()}(Object("undefined"!=typeof self?self:this),(function(){return function(){"use strict";var e={d:function(t,n){for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:1,get:n[r]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r:function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:1})}},t={};function n(e){return 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},n(e)}function r(e){var t=function(e){if("object"!=n(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return e+""}(e);return"symbol"==n(t)?t:t+""}e.r(t),e.d(t,{default:function(){return ao},errors:function(){return uo},load:function(){return fo},loadView:function(){return so}});var i=function(){return e=function e(t){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),function(e){return"object"!==n(e)||void 0===e.length||void 0===e.readUInt8||void 0===e.readUInt16LE||void 0===e.readUInt16BE||void 0===e.readUInt32LE||void 0===e.readUInt32BE||void 0===e.readInt32LE||void 0===e.readInt32BE}(t))throw Error("DataView: Passed buffer type is unsupported.");this.buffer=t,this.byteLength=this.buffer.length},(t=[{key:"getUint8",value:function(e){return this.buffer.readUInt8(e)}},{key:"getUint16",value:function(e,t){return t?this.buffer.readUInt16LE(e):this.buffer.readUInt16BE(e)}},{key:"getUint32",value:function(e,t){return t?this.buffer.readUInt32LE(e):this.buffer.readUInt32BE(e)}},{key:"getInt32",value:function(e,t){return t?this.buffer.readInt32LE(e):this.buffer.readInt32BE(e)}}])&&function(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||0,i.configurable=1,"value"in i&&(i.writable=1),Object.defineProperty(e,r(i.key),i)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:0}),e;var e,t}();function o(e,t,n){try{return new DataView(e,t,n)}catch(r){return new i(e,t,n)}}function a(e,t,n){for(var r=[],i=0;i<n&&t+i<e.byteLength;i++)r.push(e.getUint8(t+i));return s(r)}function u(e,t){for(var n=[],r=0;t+r<e.byteLength;){var i=e.getUint8(t+r);if(0===i)break;n.push(i),r++}return s(n)}function f(e,t,n){for(var r=[],i=0;i<n&&t+i<e.byteLength;i+=2)r.push(e.getUint16(t+i));return 0===r[r.length-1]&&r.pop(),s(r)}function c(e,t){var n=e.getUint8(t);return[n,a(e,t+1,n)]}function s(e){return e.map((function(e){return String.fromCharCode(e)})).join("")}function l(){for(var e=1;e<arguments.length;e++)for(var t in arguments[e])arguments[0][t]=arguments[e][t];return arguments[0]}function d(e,t,n){var r=0;Object.defineProperty(e,t,{get:function(){return r||(r=1,Object.defineProperty(e,t,{configurable:1,enumerable:1,value:n.apply(e),writable:1})),e[t]},configurable:1,enumerable:1})}function p(e){return"undefined"!=typeof btoa?"string"==typeof e?btoa(e):btoa(Array.prototype.reduce.call(new Uint8Array(e),(function(e,t){return e+String.fromCharCode(t)}),"")):"undefined"!=typeof Buffer?"undefined"!=typeof Buffer.from?Buffer.from(e).toString("base64"):new Buffer(e).toString("base64"):void 0}function g(e,t){return Array(t+1).join(e)}var m=void 0;function h(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"string";if(0===t&&"function"==typeof DecompressionStream){var i=new DecompressionStream("deflate"),o=new Blob([e]).stream().pipeThrough(i);return"dataview"===r?new Response(o).arrayBuffer().then((function(e){return new DataView(e)})):new Response(o).arrayBuffer().then((function(e){return new TextDecoder(n).decode(e)}))}if(void 0!==t)return Promise.reject("Unknown compression method ".concat(t,"."));if("string"===r)try{return new TextDecoder(n).decode(e)}catch(t){var a=new Uint8Array(e.buffer,e.byteOffset,e.byteLength);return Array.from(a,(function(e){return String.fromCharCode(e)})).join("")}return e}var v={USE_FILE:1,USE_JFIF:1,USE_PNG_FILE:1,USE_EXIF:1,USE_IPTC:1,USE_XMP:1,USE_ICC:1,USE_MPF:1,USE_PHOTOSHOP:1,USE_THUMBNAIL:1,USE_TIFF:1,USE_JPEG:1,USE_PNG:1,USE_HEIC:1,USE_AVIF:1,USE_WEBP:1,USE_GIF:1,USE_MAKER_NOTES:1};function y(e){return e.map((function(e){return String.fromCharCode(e)})).join("")}function b(e){if(e.length>=8){var t=y(e.slice(0,8));if("ASCII\0\0\0"===t)return y(e.slice(8));if("JIS\0\0\0\0\0"===t)return"[JIS encoded text]";if("UNICODE\0"===t)return"[Unicode encoded text]";if("\0\0\0\0\0\0\0\0"===t)return"[Undefined encoding]"}return"Undefined"}function S(e){return e[0][0]/e[0][1]+e[1][0]/e[1][1]/60+e[2][0]/e[2][1]/3600}var I=18761,P=19789,A=I,C=function(e,t){if(e.getUint16(t)===I)return I;if(e.getUint16(t)===P)return P;throw Error("Illegal byte order value. Faulty image.")},T=2,x=65496,U=2,E=4,w=2,F=2,O=10,R=18,M=33,N=79,G=18,k=8,L="ICC_PROFILE\0",D=E+L.length,_=D+1,j="MPF\0",B=65472,z=65474,V=65476,H=65499,W=65501,X=65498,K=65504,J=65505,Y=65506,q=65517,$=65519,Z=65534,Q=65535,ee="JFIF",te="Exif",ne="http://ns.adobe.com/xap/1.0/\0",re="http://ns.adobe.com/xmp/extension/\0",ie="Photoshop 3.0";function oe(e,t){return e.getUint16(t)===B}function ae(e,t){return e.getUint16(t)===z}function ue(e,t){var n=L.length;return e.getUint16(t)===Y&&a(e,t+E,n)===L}function fe(e,t){var n=j.length;return e.getUint16(t)===Y&&a(e,t+E,n)===j}function ce(e,t){var n=ee.length;return e.getUint16(t)===K&&a(e,t+E,n)===ee&&0===e.getUint8(t+E+n)}function se(e,t){var n=te.length;return e.getUint16(t)===J&&a(e,t+E,n)===te&&0===e.getUint8(t+E+n)}function le(e,t){return e.getUint16(t)===J&&function(e,t){var n=ne.length;return a(e,t+E,n)===ne}(e,t)}function de(e,t){return e.getUint16(t)===J&&function(e,t){var n=re.length;return a(e,t+E,n)===re}(e,t)}function pe(e,t){return{dataOffset:e+M,length:t-(M-w)}}function ge(e,t){return{dataOffset:e+N,length:t-(N-w)}}function me(e,t){var n=ie.length;return e.getUint16(t)===q&&a(e,t+E,n)===ie&&0===e.getUint8(t+E+n)}function he(e,t){var n=e.getUint16(t);return n>=K&&n<=$||n===Z||n===B||n===z||n===V||n===H||n===W||n===X}function ve(e,t){return e.getUint16(t)===Q}function ye(e,t,n,r){var i=function(e,t,n){try{if(t+8>n)return;var r=e.getUint16(t+0),i=r===A;if(!i&&19789!==r)return;if(42!==e.getUint16(t+2,i))return;var o=t+e.getUint32(t+4,i);if(o+2>n)return;var a=e.getUint16(o,i);return{ifdEntries:a,isValid:o+(2+12*a+4)<=n&&a>0}}catch(e){return}}(e,r,t+w+n);if(!i)return 0;var o=Number.isInteger(i.ifdEntries)?i.ifdEntries:0;return(i.isValid?1e9:0)+1e6*o+n}var be="PNG\r\n\n",Se=4,Ie=4,Pe=0,Ae=Se,Ce=Se+Ie,Te="XML:com.adobe.xmp\0",xe="tEXt",Ue="iTXt",Ee="zTXt",we="pHYs",Fe="tIME",Oe="eXIf",Re="iCCP";function Me(e,t){return"IHDR"===a(e,t+Ae,Ie)}function Ne(e,t){return a(e,t+Ae,Ie)===Ue&&a(e,t+Ce,Te.length)===Te}function Ge(e,t,n){var r=a(e,t+Ae,Ie);return r===xe||r===Ue||r===Ee&&n}function ke(e,t){return a(e,t+Ae,Ie)===Oe}function Le(e,t){return a(e,t+Ae,Ie)===Re}function De(e,t){var n=[we,Fe],r=a(e,t+Ae,Ie);return n.includes(r)}function _e(e,t){t+=Ce+Te.length+1+1;for(var n=0;n<2&&t<e.byteLength;)0===e.getUint8(t)&&n++,t++;if(!(n<2))return t}function je(e,t){var n=u(e,t);return t+=n.length+1,{profileName:n,compressionMethod:e.getUint8(t),compressedProfileOffset:t+=1}}function Be(e,t,n,r,i,o,a,u){if(void 0===u)return[];for(var f=[],c=n.items,s=0;s<u;s++){var l={extents:[]};l.itemId=ze(e,c,t),c+=r.item.itemId,l.constructionMethod=1===t||2===t?15&e.getUint16(c):void 0,c+=r.item.constructionMethod,l.dataReferenceIndex=e.getUint16(c),c+=r.item.dataReferenceIndex,l.baseOffset=He(e,c,r.item.baseOffset),c+=r.item.baseOffset,l.extentCount=e.getUint16(c),c+=r.item.extentCount;for(var d=0;d<l.extentCount;d++){var p={};p.extentIndex=Ve(e,t,c,a),c+=r.item.extent.extentIndex,p.extentOffset=He(e,c,i),c+=r.item.extent.extentOffset,p.extentLength=He(e,c,o),c+=r.item.extent.extentLength,l.extents.push(p)}f.push(l)}return f}function ze(e,t,n){return n<2?e.getUint16(t):2===n?e.getUint32(t):void 0}function Ve(e,t,n,r){if((1===t||2===t)&&r>0)return He(e,n,r)}function He(e,t,n){return 4===n?e.getUint32(t):8===n?(console.warn("This file uses an 8-bit offset which is currently not supported by ExifReader. Contact the maintainer to get it fixed."),function(e,t){return e.getUint32(t+4)}(e,t)):0}var We=1165519206,Xe=1835625829;function Ke(e,t){var n=function(e,t){var n=e.getUint32(t);return function(e){return 0===e}(n)?{length:e.byteLength-t,contentOffset:t+4+4}:function(e){return 1===e}(n)&&function(e,t){return 0===e.getUint32(t+8)}(e,t)?{length:e.getUint32(t+12),contentOffset:t+4+4+8}:{length:n,contentOffset:t+4+4}}(e,t),r=n.length,i=n.contentOffset;if(!(r<8)){var o=e.getUint32(t+4);if(1718909296===o)return function(e,t,n){return{type:"ftyp",majorBrand:a(e,t,4),length:n}}(e,i,r);if(1768977008===o)return function(e,t,n,r){return{type:"iprp",subBoxes:$e(e,n,r-(n-t)),length:r}}(e,t,i,r);if(1768973167===o)return function(e,t,n,r){return{type:"ipco",properties:$e(e,n,r-(n-t)),length:r}}(e,t,i,r);if(1668246642===o)return function(e,t,n){return{type:"colr",icc:qe(e,t),length:n}}(e,i,r);var f=e.getUint8(i);return 1835365473===o?function(e,t,n,r){return{type:"meta",subBoxes:$e(e,n+3,r-(n+3-t)),length:r}}(e,t,i+1,r):1768714083===o?function(e,t,n,r){var i=function(e,t){var n={item:{dataReferenceIndex:2,extentCount:2,extent:{}}};e<2?(n.itemCount=2,n.item.itemId=2):2===e&&(n.itemCount=4,n.item.itemId=4),n.item.constructionMethod=1===e||2===e?2:0;var r={offsetSize:t,lengthSize:t,baseOffsetSize:t+1,indexSize:t+1};return r.itemCount=t+2,r.items=r.itemCount+n.itemCount,r.item={itemId:0},r.item.constructionMethod=r.item.itemId+n.item.itemId,r.item.dataReferenceIndex=r.item.constructionMethod+n.item.constructionMethod,{offsets:r,sizes:n}}(t,n+3),o=i.offsets,a=i.sizes,u=e.getUint8(o.offsetSize)>>4;a.item.extent.extentOffset=u;var f=15&e.getUint8(o.lengthSize);a.item.extent.extentLength=f;var c=e.getUint8(o.baseOffsetSize)>>4;a.item.baseOffset=c;var s=function(e,t,n){if(1===n||2===n)return 15&e.getUint8(t)}(e,o.indexSize,t);a.item.extent.extentIndex=void 0!==s?s:0;var l=function(e,t,n){return n<2?e.getUint16(t):2===n?e.getUint32(t):void 0}(e,o.itemCount,t);return{type:"iloc",items:Be(e,t,o,a,u,f,s,l),length:r}}(e,f,i+1,r):1768517222===o?function(e,t,n,r,i){var o=function(e,t){var n={entryCount:t+3},r={};return r.entryCount=0===e?2:4,n.itemInfos=n.entryCount+r.entryCount,{offsets:n}}(n,r),a=o.offsets;return{type:"iinf",itemInfos:$e(e,a.itemInfos,i-(a.itemInfos-t)),length:i}}(e,t,f,i+1,r):1768842853===o?function(e,t,n,r,i){r+=3;var o={type:"infe",length:i};return 0!==n&&1!==n||(o.itemId=e.getUint16(r),r+=2,o.itemProtectionIndex=e.getUint16(r),r+=2,o.itemName=u(e,r),r+=o.itemName.length+1),n>=2&&(2===n?(o.itemId=e.getUint16(r),r+=2):3===n&&(o.itemId=e.getUint32(r),r+=4),o.itemProtectionIndex=e.getUint16(r),r+=2,o.itemType=e.getUint32(r),r+=4,o.itemName=u(e,r),r+=o.itemName.length+1,o.itemType===Xe?(o.contentType=u(e,r),t+i>(r+=o.contentType.length+1)&&(o.contentEncoding=u(e,r),r+=o.contentEncoding.length+1)):1970432288===o.itemType&&(o.itemUri=u(e,r),r+=o.itemUri.length+1)),o}(e,t,f,i+1,r):{type:void 0,length:r}}}function Je(e){if(v.USE_EXIF||v.USE_XMP||v.USE_ICC){var t={},n=function(e){for(var t=0;t+4+4<=e.byteLength;){var n=Ke(e,t);if(void 0===n)break;if("meta"===n.type)return n;t+=n.length}}(e);return n?(v.USE_EXIF&&(t.tiffHeaderOffset=function(e,t){try{var n=function(e){return e.subBoxes.find((function(e){return"iinf"===e.type})).itemInfos.find((function(e){return e.itemType===We}))}(t).itemId,r=Ye(t,n);return function(e,t){return t+4+e.getUint32(t)}(e,r.baseOffset+r.extents[0].extentOffset)}catch(e){return}}(e,n)),v.USE_XMP&&(t.xmpChunks=function(e){try{var t=function(e){return e.subBoxes.find((function(e){return"iinf"===e.type})).itemInfos.find((function(e){return e.itemType===Xe&&"application/rdf+xml"===e.contentType}))}(e).itemId,n=Ye(e,t),r=Ye(e,t).extents[0];return[{dataOffset:n.baseOffset+r.extentOffset,length:r.extentLength}]}catch(e){return}}(n)),v.USE_ICC&&(t.iccChunks=function(e){try{var t=e.subBoxes.find((function(e){return"iprp"===e.type})).subBoxes.find((function(e){return"ipco"===e.type})).properties.find((function(e){return"colr"===e.type})).icc;if(t)return[t]}catch(e){}}(n)),t.hasAppMarkers=void 0!==t.tiffHeaderOffset||void 0!==t.xmpChunks||void 0!==t.iccChunks,t):{hasAppMarkers:0}}return{}}function Ye(e,t){return e.subBoxes.find((function(e){return"iloc"===e.type})).items.find((function(e){return e.itemId===t}))}function qe(e,t){var n=a(e,t,4);if("prof"===n||"rICC"===n)return{offset:t+4,length:e.getUint32(t+4),chunkNumber:1,chunksTotal:1}}function $e(e,t,n){for(var r=[We,Xe],i=[],o=t;o<t+n;){var a=Ke(e,o);if(void 0===a)break;void 0===a.type||void 0!==a.itemType&&-1===r.indexOf(a.itemType)||i.push(a),o+=a.length}return i}var Ze=6,Qe=["GIF87a","GIF89a"],et=0,tt="<?xpacket begin",nt={parseAppMarkers:function(e,t){if(v.USE_TIFF&&function(e){return!!e&&e.byteLength>=4&&function(e){var t=e.getUint16(0)===A;return 42===e.getUint16(2,t)}(e)}(e))return rt(v.USE_EXIF?{hasAppMarkers:1,tiffHeaderOffset:0}:{},"tiff","TIFF");if(v.USE_JPEG&&function(e){return!!e&&e.byteLength>=T&&e.getUint16(0)===x}(e))return rt(function(e){for(var t,n,r,i,o,a,u,f,c,s,l,d,p,g=U,m=0;g+E+5<=e.byteLength;){if(v.USE_FILE&&oe(e,g))t=e.getUint16(g+w),n=g+w;else if(v.USE_FILE&&ae(e,g))t=e.getUint16(g+w),r=g+w;else if(v.USE_JFIF&&ce(e,g))t=e.getUint16(g+w),i=g+F;else if(v.USE_EXIF&&se(e,g)){t=e.getUint16(g+w),m++;var h=g+O;if(1===m)l=h,d=g,p=t;else if(2===m){s=ye(e,d,p,l);var y=ye(e,g,t,h);y>s&&(s=y,l=h,d=g,p=t)}else{var b=ye(e,g,t,h);b>s&&(s=b,l=h,d=g,p=t)}o=l}else if(v.USE_XMP&&le(e,g))u||(u=[]),t=e.getUint16(g+w),u.push(pe(g,t));else if(v.USE_XMP&&de(e,g))u||(u=[]),t=e.getUint16(g+w),u.push(ge(g,t));else if(v.USE_IPTC&&me(e,g))t=e.getUint16(g+w),a=g+R;else if(v.USE_ICC&&ue(e,g)){t=e.getUint16(g+w);var S=g+G,I=t-(G-w),P=e.getUint8(g+D),A=e.getUint8(g+_);f||(f=[]),f.push({offset:S,length:I,chunkNumber:P,chunksTotal:A})}else if(v.USE_MPF&&fe(e,g))t=e.getUint16(g+w),c=g+k;else{if(!he(e,g)){if(ve(e,g)){g++;continue}break}t=e.getUint16(g+w)}g+=w+t}return m>1&&function(e){"undefined"!=typeof console&&"function"==typeof console.warn&&console.warn("ExifReader: Found ".concat(e," Exif segments (APP1). ")+"Will pick the best candidate segment.")}(m),{hasAppMarkers:g>U,fileDataOffset:n||r,jfifDataOffset:i,tiffHeaderOffset:o,iptcDataOffset:a,xmpChunks:u,iccChunks:f,mpfDataOffset:c}}(e),"jpeg","JPEG");if(v.USE_PNG&&function(e){return!!e&&a(e,0,be.length)===be}(e))return rt(function(e,t){for(var n={hasAppMarkers:0},r=be.length;r+Se+Ie<=e.byteLength;){if(v.USE_PNG_FILE&&Me(e,r))n.hasAppMarkers=1,n.pngHeaderOffset=r+Ce;else if(v.USE_XMP&&Ne(e,r)){var i=_e(e,r);void 0!==i&&(n.hasAppMarkers=1,n.xmpChunks=[{dataOffset:i,length:e.getUint32(r+Pe)-(i-(r+Ce))}])}else if(Ge(e,r,t)){n.hasAppMarkers=1;var o=a(e,r+Ae,Ie);n.pngTextChunks||(n.pngTextChunks=[]),n.pngTextChunks.push({length:e.getUint32(r+Pe),type:o,offset:r+Ce})}else if(ke(e,r))n.hasAppMarkers=1,n.tiffHeaderOffset=r+Ce;else if(v.USE_ICC&&t&&Le(e,r)){n.hasAppMarkers=1;var u=e.getUint32(r+Pe),f=r+Ce,c=je(e,f),s=c.profileName,l=c.compressionMethod,d=c.compressedProfileOffset;n.iccChunks||(n.iccChunks=[]),n.iccChunks.push({offset:d,length:u-(d-f),chunkNumber:1,chunksTotal:1,profileName:s,compressionMethod:l})}else De(e,r)&&(n.hasAppMarkers=1,n.pngChunkOffsets||(n.pngChunkOffsets=[]),n.pngChunkOffsets.push(r+Pe));r+=e.getUint32(r+Pe)+Se+Ie+4}return n}(e,t),"png","PNG");if(v.USE_HEIC&&function(e){if(!e)return 0;try{var t=Ke(e,0);return t&&-1!==["heic","heix","hevc","hevx","heim","heis","hevm","hevs","mif1"].indexOf(t.majorBrand)}catch(e){return 0}}(e))return rt(function(e){return Je(e)}(e),"heic","HEIC");if(v.USE_AVIF&&function(e){if(!e)return 0;try{var t=Ke(e,0);return t&&"avif"===t.majorBrand}catch(e){return 0}}(e))return rt(function(e){return Je(e)}(e),"avif","AVIF");if(v.USE_WEBP&&function(e){return!!e&&"RIFF"===a(e,0,4)&&"WEBP"===a(e,8,4)}(e))return rt(function(e){for(var t,n,r,i,o=12,u=0;o+8<e.byteLength;){var f=a(e,o,4),c=e.getUint32(o+4,1);v.USE_EXIF&&"EXIF"===f?(u=1,t="Exif\0\0"===a(e,o+8,6)?o+8+6:o+8):v.USE_XMP&&"XMP "===f?(u=1,n=[{dataOffset:o+8,length:c}]):v.USE_ICC&&"ICCP"===f?(u=1,r=[{offset:o+8,length:c,chunkNumber:1,chunksTotal:1}]):"VP8X"===f&&(u=1,i=o+8),o+=8+(c%2==0?c:c+1)}return{hasAppMarkers:u,tiffHeaderOffset:t,xmpChunks:n,iccChunks:r,vp8xChunkOffset:i}}(e),"webp","WebP");if(v.USE_GIF&&function(e){return!!e&&Qe.includes(a(e,0,Ze))}(e))return rt({gifHeaderOffset:0},"gif","GIF");if(v.USE_XMP&&function(e){return!!e&&a(e,et,tt.length)===tt}(e))return rt(function(e){var t=[];return t.push({dataOffset:et,length:e.byteLength}),{xmpChunks:t}}(e),"xml","XML");throw Error("Invalid image format")}};function rt(e,t,n){return l({},e,{fileType:{value:t,description:n}})}var it={ApertureValue:function(e){return Math.pow(Math.sqrt(2),e[0]/e[1]).toFixed(2)},ColorSpace:function(e){return 1===e?"sRGB":65535===e?"Uncalibrated":"Unknown"},ComponentsConfiguration:function(e){return e.map((function(e){return 49===e?"Y":50===e?"Cb":51===e?"Cr":52===e?"R":53===e?"G":54===e?"B":void 0})).join("")},Contrast:function(e){return 0===e?"Normal":1===e?"Soft":2===e?"Hard":"Unknown"},CustomRendered:function(e){return 0===e?"Normal process":1===e?"Custom process":"Unknown"},ExposureMode:function(e){return 0===e?"Auto exposure":1===e?"Manual exposure":2===e?"Auto bracket":"Unknown"},ExposureProgram:function(e){return 0===e?"Undefined":1===e?"Manual":2===e?"Normal program":3===e?"Aperture priority":4===e?"Shutter priority":5===e?"Creative program":6===e?"Action program":7===e?"Portrait mode":8===e?"Landscape mode":9===e?"Bulb":"Unknown"},ExposureTime:function(e){if(e[0]/e[1]>.25){var t=e[0]/e[1];return Number.isInteger(t)?""+t:t.toFixed(1)}return 0!==e[0]?"1/".concat(Math.round(e[1]/e[0])):"0/".concat(e[1])},FNumber:function(e){return"f/".concat(Number(e[0]/e[1]).toFixed(1))},FocalLength:function(e){return e[0]/e[1]+" mm"},FocalPlaneResolutionUnit:function(e){return 2===e?"inches":3===e?"centimeters":4===e?"millimeters":"Unknown"},LightSource:function(e){return 1===e?"Daylight":2===e?"Fluorescent":3===e?"Tungsten (incandescent light)":4===e?"Flash":9===e?"Fine weather":10===e?"Cloudy weather":11===e?"Shade":12===e?"Daylight fluorescent (D 5700 – 7100K)":13===e?"Day white fluorescent (N 4600 – 5400K)":14===e?"Cool white fluorescent (W 3900 – 4500K)":15===e?"White fluorescent (WW 3200 – 3700K)":17===e?"Standard light A":18===e?"Standard light B":19===e?"Standard light C":20===e?"D55":21===e?"D65":22===e?"D75":23===e?"D50":24===e?"ISO studio tungsten":255===e?"Other light source":"Unknown"},MeteringMode:function(e){return 1===e?"Average":2===e?"CenterWeightedAverage":3===e?"Spot":4===e?"MultiSpot":5===e?"Pattern":6===e?"Partial":255===e?"Other":"Unknown"},ResolutionUnit:function(e){return 2===e?"inches":3===e?"centimeters":"Unknown"},Saturation:function(e){return 0===e?"Normal":1===e?"Low saturation":2===e?"High saturation":"Unknown"},FocalLengthIn35mmFilm:function(e){return 0===e?"Unknown":e+" mm"},SceneCaptureType:function(e){return 0===e?"Standard":1===e?"Landscape":2===e?"Portrait":3===e?"Night scene":"Unknown"},Sharpness:function(e){return 0===e?"Normal":1===e?"Soft":2===e?"Hard":"Unknown"},ShutterSpeedValue:function(e){var t=Math.pow(2,e[0]/e[1]);return t<=1?"".concat(Math.round(1/t)):"1/".concat(Math.round(t))},WhiteBalance:function(e){return 0===e?"Auto white balance":1===e?"Manual white balance":"Unknown"},XResolution:function(e){return""+Math.round(e[0]/e[1])},YResolution:function(e){return""+Math.round(e[0]/e[1])}},ot={11:"ProcessingSoftware",254:{name:"SubfileType",description:function(e){return{0:"Full-resolution image",1:"Reduced-resolution image",2:"Single page of multi-page image",3:"Single page of multi-page reduced-resolution image",4:"Transparency mask",5:"Transparency mask of reduced-resolution image",6:"Transparency mask of multi-page image",7:"Transparency mask of reduced-resolution multi-page image",65537:"Alternate reduced-resolution image",4294967295:"Invalid"}[e]||"Unknown"}},255:{name:"OldSubfileType",description:function(e){return{0:"Full-resolution image",1:"Reduced-resolution image",2:"Single page of multi-page image"}[e]||"Unknown"}},256:"ImageWidth",257:"ImageLength",258:"BitsPerSample",259:"Compression",262:"PhotometricInterpretation",263:{name:"Thresholding",description:function(e){return{1:"No dithering or halftoning",2:"Ordered dither or halfton",3:"Randomized dither"}[e]||"Unknown"}},264:"CellWidth",265:"CellLength",266:{name:"FillOrder",description:function(e){return{1:"Normal",2:"Reversed"}[e]||"Unknown"}},269:"DocumentName",270:"ImageDescription",271:"Make",272:"Model",273:"StripOffsets",274:{name:"Orientation",description:function(e){return 1===e?"top-left":2===e?"top-right":3===e?"bottom-right":4===e?"bottom-left":5===e?"left-top":6===e?"right-top":7===e?"right-bottom":8===e?"left-bottom":"Undefined"}},277:"SamplesPerPixel",278:"RowsPerStrip",279:"StripByteCounts",280:"MinSampleValue",281:"MaxSampleValue",282:{name:"XResolution",description:it.XResolution},283:{name:"YResolution",description:it.YResolution},284:"PlanarConfiguration",285:"PageName",286:{name:"XPosition",description:function(e){return""+Math.round(e[0]/e[1])}},287:{name:"YPosition",description:function(e){return""+Math.round(e[0]/e[1])}},290:{name:"GrayResponseUnit",description:function(e){return{1:"0.1",2:"0.001",3:"0.0001",4:"1e-05",5:"1e-06"}[e]||"Unknown"}},296:{name:"ResolutionUnit",description:it.ResolutionUnit},297:"PageNumber",301:"TransferFunction",305:"Software",306:"DateTime",315:"Artist",316:"HostComputer",317:"Predictor",318:{name:"WhitePoint",description:function(e){return e.map((function(e){return"".concat(e[0],"/").concat(e[1])})).join(", ")}},319:{name:"PrimaryChromaticities",description:function(e){return e.map((function(e){return"".concat(e[0],"/").concat(e[1])})).join(", ")}},321:"HalftoneHints",322:"TileWidth",323:"TileLength",330:"A100DataOffset",332:{name:"InkSet",description:function(e){return{1:"CMYK",2:"Not CMYK"}[e]||"Unknown"}},337:"TargetPrinter",338:{name:"ExtraSamples",description:function(e){return{0:"Unspecified",1:"Associated Alpha",2:"Unassociated Alpha"}[e]||"Unknown"}},339:{name:"SampleFormat",description:function(e){var t={1:"Unsigned",2:"Signed",3:"Float",4:"Undefined",5:"Complex int",6:"Complex float"};return Array.isArray(e)?e.map((function(e){return t[e]||"Unknown"})).join(", "):"Unknown"}},513:"JPEGInterchangeFormat",514:"JPEGInterchangeFormatLength",529:{name:"YCbCrCoefficients",description:function(e){return e.map((function(e){return""+e[0]/e[1]})).join("/")}},530:"YCbCrSubSampling",531:{name:"YCbCrPositioning",description:function(e){return 1===e?"centered":2===e?"co-sited":"undefined "+e}},532:{name:"ReferenceBlackWhite",description:function(e){return e.map((function(e){return""+e[0]/e[1]})).join(", ")}},700:"ApplicationNotes",18246:"Rating",18249:"RatingPercent",33432:{name:"Copyright",description:function(e){return e.join("; ")}},33550:"PixelScale",33723:"IPTC-NAA",33920:"IntergraphMatrix",33922:"ModelTiePoint",34118:"SEMInfo",34264:"ModelTransform",34377:"PhotoshopSettings",34665:"Exif IFD Pointer",34675:"ICC_Profile",34735:"GeoTiffDirectory",34736:"GeoTiffDoubleParams",34737:"GeoTiffAsciiParams",34853:"GPS Info IFD Pointer",40091:{name:"XPTitle",description:at},40092:{name:"XPComment",description:at},40093:{name:"XPAuthor",description:at},40094:{name:"XPKeywords",description:at},40095:{name:"XPSubject",description:at},42112:"GDALMetadata",42113:"GDALNoData",50341:"PrintIM",50707:"DNGBackwardVersion",50708:"UniqueCameraModel",50709:"LocalizedCameraModel",50721:"ColorMatrix1",50722:"ColorMatrix2",50723:"CameraCalibration1",50724:"CameraCalibration2",50725:"ReductionMatrix1",50726:"ReductionMatrix2",50727:"AnalogBalance",50728:"AsShotNeutral",50729:"AsShotWhiteXY",50730:"BaselineExposure",50731:"BaselineNoise",50732:"BaselineSharpness",50734:"LinearResponseLimit",50735:"CameraSerialNumber",50736:"DNGLensInfo",50739:"ShadowScale",50741:{name:"MakerNoteSafety",description:function(e){return{0:"Unsafe",1:"Safe"}[e]||"Unknown"}},50778:{name:"CalibrationIlluminant1",description:it.LightSource},50779:{name:"CalibrationIlluminant2",description:it.LightSource},50781:"RawDataUniqueID",50827:"OriginalRawFileName",50828:"OriginalRawFileData",50831:"AsShotICCProfile",50832:"AsShotPreProfileMatrix",50833:"CurrentICCProfile",50834:"CurrentPreProfileMatrix",50879:"ColorimetricReference",50885:"SRawType",50898:"PanasonicTitle",50899:"PanasonicTitle2",50931:"CameraCalibrationSig",50932:"ProfileCalibrationSig",50933:"ProfileIFD",50934:"AsShotProfileName",50936:"ProfileName",50937:"ProfileHueSatMapDims",50938:"ProfileHueSatMapData1",50939:"ProfileHueSatMapData2",50940:"ProfileToneCurve",50941:{name:"ProfileEmbedPolicy",description:function(e){return{0:"Allow Copying",1:"Embed if Used",2:"Never Embed",3:"No Restrictions"}[e]||"Unknown"}},50942:"ProfileCopyright",50964:"ForwardMatrix1",50965:"ForwardMatrix2",50966:"PreviewApplicationName",50967:"PreviewApplicationVersion",50968:"PreviewSettingsName",50969:"PreviewSettingsDigest",50970:{name:"PreviewColorSpace",description:function(e){return{1:"Gray Gamma 2.2",2:"sRGB",3:"Adobe RGB",4:"ProPhoto RGB"}[e]||"Unknown"}},50971:"PreviewDateTime",50972:"RawImageDigest",50973:"OriginalRawFileDigest",50981:"ProfileLookTableDims",50982:"ProfileLookTableData",51043:"TimeCodes",51044:"FrameRate",51058:"TStop",51081:"ReelName",51089:"OriginalDefaultFinalSize",51090:"OriginalBestQualitySize",51091:"OriginalDefaultCropSize",51105:"CameraLabel",51107:{name:"ProfileHueSatMapEncoding",description:function(e){return{0:"Linear",1:"sRGB"}[e]||"Unknown"}},51108:{name:"ProfileLookTableEncoding",description:function(e){return{0:"Linear",1:"sRGB"}[e]||"Unknown"}},51109:"BaselineExposureOffset",51110:{name:"DefaultBlackRender",description:function(e){return{0:"Auto",1:"None"}[e]||"Unknown"}},51111:"NewRawImageDigest",51112:"RawToPreviewGain"};function at(e){return new TextDecoder("utf-16").decode(new Uint8Array(e)).replace(/\u0000+$/,"")}function ut(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function ft(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var ct={0:{name:"GPSVersionID",description:function(e){return 2===e[0]&&2===e[1]&&0===e[2]&&0===e[3]?"Version 2.2":"Unknown"}},1:{name:"GPSLatitudeRef",description:function(e){var t=e.join("");return"N"===t?"North latitude":"S"===t?"South latitude":"Unknown"}},2:{name:"GPSLatitude",description:S},3:{name:"GPSLongitudeRef",description:function(e){var t=e.join("");return"E"===t?"East longitude":"W"===t?"West longitude":"Unknown"}},4:{name:"GPSLongitude",description:S},5:{name:"GPSAltitudeRef",description:function(e){return 0===e?"Sea level":1===e?"Sea level reference (negative value)":"Unknown"}},6:{name:"GPSAltitude",description:function(e){return e[0]/e[1]+" m"}},7:{name:"GPSTimeStamp",description:function(e){return e.map((function(e){var t,n=function(e){if(Array.isArray(e))return e}(t=e)||function(e){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,r,i,o,a=[],u=1,f=0;try{for(i=(t=t.call(e)).next,!2;!(u=(n=i.call(t)).done)&&(a.push(n.value),2!==a.length);u=1);}catch(e){f=1,r=e}finally{try{if(!u&&null!=t.return&&(o=t.return(),Object(o)!==o))return}finally{if(f)throw r}}return a}}(t)||function(e){if(e){if("string"==typeof e)return ft(e,2);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?ft(e,2):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),r=n[0]/n[1];return/^\d(\.|$)/.test("".concat(r))?"0".concat(r):r})).join(":")}},8:"GPSSatellites",9:{name:"GPSStatus",description:function(e){var t=e.join("");return"A"===t?"Measurement in progress":"V"===t?"Measurement Interoperability":"Unknown"}},10:{name:"GPSMeasureMode",description:function(e){var t=e.join("");return"2"===t?"2-dimensional measurement":"3"===t?"3-dimensional measurement":"Unknown"}},11:"GPSDOP",12:{name:"GPSSpeedRef",description:function(e){var t=e.join("");return"K"===t?"Kilometers per hour":"M"===t?"Miles per hour":"N"===t?"Knots":"Unknown"}},13:"GPSSpeed",14:{name:"GPSTrackRef",description:function(e){var t=e.join("");return"T"===t?"True direction":"M"===t?"Magnetic direction":"Unknown"}},15:"GPSTrack",16:{name:"GPSImgDirectionRef",description:function(e){var t=e.join("");return"T"===t?"True direction":"M"===t?"Magnetic direction":"Unknown"}},17:"GPSImgDirection",18:"GPSMapDatum",19:{name:"GPSDestLatitudeRef",description:function(e){var t=e.join("");return"N"===t?"North latitude":"S"===t?"South latitude":"Unknown"}},20:{name:"GPSDestLatitude",description:function(e){return e[0][0]/e[0][1]+e[1][0]/e[1][1]/60+e[2][0]/e[2][1]/3600}},21:{name:"GPSDestLongitudeRef",description:function(e){var t=e.join("");return"E"===t?"East longitude":"W"===t?"West longitude":"Unknown"}},22:{name:"GPSDestLongitude",description:function(e){return e[0][0]/e[0][1]+e[1][0]/e[1][1]/60+e[2][0]/e[2][1]/3600}},23:{name:"GPSDestBearingRef",description:function(e){var t=e.join("");return"T"===t?"True direction":"M"===t?"Magnetic direction":"Unknown"}},24:"GPSDestBearing",25:{name:"GPSDestDistanceRef",description:function(e){var t=e.join("");return"K"===t?"Kilometers":"M"===t?"Miles":"N"===t?"Knots":"Unknown"}},26:"GPSDestDistance",27:{name:"GPSProcessingMethod",description:b},28:{name:"GPSAreaInformation",description:b},29:"GPSDateStamp",30:{name:"GPSDifferential",description:function(e){return 0===e?"Measurement without differential correction":1===e?"Differential correction applied":"Unknown"}},31:"GPSHPositioningError"},st={1:"InteroperabilityIndex",2:{name:"InteroperabilityVersion",description:function(e){return y(e)}},4096:"RelatedImageFileFormat",4097:"RelatedImageWidth",4098:"RelatedImageHeight"},lt={45056:{name:"MPFVersion",description:function(e){return y(e)}},45057:"NumberOfImages",45058:"MPEntry",45059:"ImageUIDList",45060:"TotalFrames"};function dt(e){return dt="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},dt(e)}function pt(e,t,n){return(t=function(e){var t=function(e){if("object"!=dt(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=dt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return e+""}(e);return"symbol"==dt(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:1,configurable:1,writable:1}):e[t]=n,e}var gt=l({},ot,{33434:{name:"ExposureTime",description:it.ExposureTime},33437:{name:"FNumber",description:it.FNumber},34850:{name:"ExposureProgram",description:it.ExposureProgram},34852:"SpectralSensitivity",34855:"ISOSpeedRatings",34856:{name:"OECF",description:function(){return"[Raw OECF table data]"}},34858:"TimeZoneOffset",34859:"SelfTimerMode",34864:{name:"SensitivityType",description:function(e){return{1:"Standard Output Sensitivity",2:"Recommended Exposure Index",3:"ISO Speed",4:"Standard Output Sensitivity and Recommended Exposure Index",5:"Standard Output Sensitivity and ISO Speed",6:"Recommended Exposure Index and ISO Speed",7:"Standard Output Sensitivity, Recommended Exposure Index and ISO Speed"}[e]||"Unknown"}},34865:"StandardOutputSensitivity",34866:"RecommendedExposureIndex",34867:"ISOSpeed",34868:"ISOSpeedLatitudeyyy",34869:"ISOSpeedLatitudezzz",36864:{name:"ExifVersion",description:function(e){return y(e)}},36867:"DateTimeOriginal",36868:"DateTimeDigitized",36873:"GooglePlusUploadCode",36880:"OffsetTime",36881:"OffsetTimeOriginal",36882:"OffsetTimeDigitized",37121:{name:"ComponentsConfiguration",description:it.ComponentsConfiguration},37122:"CompressedBitsPerPixel",37377:{name:"ShutterSpeedValue",description:it.ShutterSpeedValue},37378:{name:"ApertureValue",description:it.ApertureValue},37379:"BrightnessValue",37380:"ExposureBiasValue",37381:{name:"MaxApertureValue",description:function(e){return Math.pow(Math.sqrt(2),e[0]/e[1]).toFixed(2)}},37382:{name:"SubjectDistance",description:function(e){return e[0]/e[1]+" m"}},37383:{name:"MeteringMode",description:it.MeteringMode},37384:{name:"LightSource",description:it.LightSource},37385:{name:"Flash",description:function(e){return 0===e?"Flash did not fire":1===e?"Flash fired":5===e?"Strobe return light not detected":7===e?"Strobe return light detected":9===e?"Flash fired, compulsory flash mode":13===e?"Flash fired, compulsory flash mode, return light not detected":15===e?"Flash fired, compulsory flash mode, return light detected":16===e?"Flash did not fire, compulsory flash mode":24===e?"Flash did not fire, auto mode":25===e?"Flash fired, auto mode":29===e?"Flash fired, auto mode, return light not detected":31===e?"Flash fired, auto mode, return light detected":32===e?"No flash function":65===e?"Flash fired, red-eye reduction mode":69===e?"Flash fired, red-eye reduction mode, return light not detected":71===e?"Flash fired, red-eye reduction mode, return light detected":73===e?"Flash fired, compulsory flash mode, red-eye reduction mode":77===e?"Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected":79===e?"Flash fired, compulsory flash mode, red-eye reduction mode, return light detected":89===e?"Flash fired, auto mode, red-eye reduction mode":93===e?"Flash fired, auto mode, return light not detected, red-eye reduction mode":95===e?"Flash fired, auto mode, return light detected, red-eye reduction mode":"Unknown"}},37386:{name:"FocalLength",description:it.FocalLength},37393:"ImageNumber",37394:{name:"SecurityClassification",description:function(e){return{C:"Confidential",R:"Restricted",S:"Secret",T:"Top Secret",U:"Unclassified"}[e]||"Unknown"}},37395:"ImageHistory",37396:{name:"SubjectArea",description:function(e){return 2===e.length?"Location; X: ".concat(e[0],", Y: ").concat(e[1]):3===e.length?"Circle; X: ".concat(e[0],", Y: ").concat(e[1],", diameter: ").concat(e[2]):4===e.length?"Rectangle; X: ".concat(e[0],", Y: ").concat(e[1],", width: ").concat(e[2],", height: ").concat(e[3]):"Unknown"}},37500:{name:"MakerNote",description:function(){return"[Raw maker note data]"}},37510:{name:"UserComment",description:b},37520:"SubSecTime",37521:"SubSecTimeOriginal",37522:"SubSecTimeDigitized",37724:"ImageSourceData",37888:{name:"AmbientTemperature",description:function(e){return e[0]/e[1]+" °C"}},37889:{name:"Humidity",description:function(e){return e[0]/e[1]+" %"}},37890:{name:"Pressure",description:function(e){return e[0]/e[1]+" hPa"}},37891:{name:"WaterDepth",description:function(e){return e[0]/e[1]+" m"}},37892:{name:"Acceleration",description:function(e){return e[0]/e[1]+" mGal"}},37893:{name:"CameraElevationAngle",description:function(e){return e[0]/e[1]+" °"}},40960:{name:"FlashpixVersion",description:function(e){return e.map((function(e){return String.fromCharCode(e)})).join("")}},40961:{name:"ColorSpace",description:it.ColorSpace},40962:"PixelXDimension",40963:"PixelYDimension",40964:"RelatedSoundFile",40965:"Interoperability IFD Pointer",41483:"FlashEnergy",41484:{name:"SpatialFrequencyResponse",description:function(){return"[Raw SFR table data]"}},41486:"FocalPlaneXResolution",41487:"FocalPlaneYResolution",41488:{name:"FocalPlaneResolutionUnit",description:it.FocalPlaneResolutionUnit},41492:{name:"SubjectLocation",description:function(e){var t,n=function(e){if(Array.isArray(e))return e}(t=e)||function(e){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,r,i,o,a=[],u=1,f=0;try{for(i=(t=t.call(e)).next,!2;!(u=(n=i.call(t)).done)&&(a.push(n.value),2!==a.length);u=1);}catch(e){f=1,r=e}finally{try{if(!u&&null!=t.return&&(o=t.return(),Object(o)!==o))return}finally{if(f)throw r}}return a}}(t)||function(e){if(e){if("string"==typeof e)return ut(e,2);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?ut(e,2):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),r=n[0],i=n[1];return"X: ".concat(r,", Y: ").concat(i)}},41493:"ExposureIndex",41495:{name:"SensingMethod",description:function(e){return 1===e?"Undefined":2===e?"One-chip color area sensor":3===e?"Two-chip color area sensor":4===e?"Three-chip color area sensor":5===e?"Color sequential area sensor":7===e?"Trilinear sensor":8===e?"Color sequential linear sensor":"Unknown"}},41728:{name:"FileSource",description:function(e){return 3===e?"DSC":"Unknown"}},41729:{name:"SceneType",description:function(e){return 1===e?"A directly photographed image":"Unknown"}},41730:{name:"CFAPattern",description:function(){return"[Raw CFA pattern table data]"}},41985:{name:"CustomRendered",description:it.CustomRendered},41986:{name:"ExposureMode",description:it.ExposureMode},41987:{name:"WhiteBalance",description:it.WhiteBalance},41988:{name:"DigitalZoomRatio",description:function(e){return 0===e[0]?"Digital zoom was not used":""+e[0]/e[1]}},41989:{name:"FocalLengthIn35mmFilm",description:it.FocalLengthIn35mmFilm},41990:{name:"SceneCaptureType",description:it.SceneCaptureType},41991:{name:"GainControl",description:function(e){return 0===e?"None":1===e?"Low gain up":2===e?"High gain up":3===e?"Low gain down":4===e?"High gain down":"Unknown"}},41992:{name:"Contrast",description:it.Contrast},41993:{name:"Saturation",description:it.Saturation},41994:{name:"Sharpness",description:it.Sharpness},41995:{name:"DeviceSettingDescription",description:function(){return"[Raw device settings table data]"}},41996:{name:"SubjectDistanceRange",description:function(e){return 1===e?"Macro":2===e?"Close view":3===e?"Distant view":"Unknown"}},42016:"ImageUniqueID",42032:"CameraOwnerName",42033:"BodySerialNumber",42034:{name:"LensSpecification",description:function(e){var t=parseFloat((e[0][0]/e[0][1]).toFixed(5)),n=parseFloat((e[1][0]/e[1][1]).toFixed(5)),r="".concat(t,"-").concat(n," mm");if(0===e[3][1])return"".concat(r," f/?");var i=1/(e[2][1]/e[2][1]/(e[3][0]/e[3][1]));return"".concat(r," f/").concat(parseFloat(i.toFixed(5)))}},42035:"LensMake",42036:"LensModel",42037:"LensSerialNumber",42080:{name:"CompositeImage",description:function(e){return{1:"Not a Composite Image",2:"General Composite Image",3:"Composite Image Captured While Shooting"}[e]||"Unknown"}},42081:"SourceImageNumberOfCompositeImage",42082:"SourceExposureTimesOfCompositeImage",42240:"Gamma",59932:"Padding",59933:"OffsetSchema",65e3:"OwnerName",65001:"SerialNumber",65002:"Lens",65100:"RawFile",65101:"Converter",65102:"WhiteBalance",65105:"Exposure",65106:"Shadows",65107:"Brightness",65108:"Contrast",65109:"Saturation",65110:"Sharpness",65111:"Smoothness",65112:"MoireFilter"}),mt="0th",ht="exif",vt="interoperability",yt="canon",bt="pentax",St=pt(pt(pt(pt(pt(pt(pt(pt({},mt,gt),"1st",ot),ht,gt),"gps",ct),vt,st),"mpf",v.USE_MPF?lt:{}),yt,v.USE_MAKER_NOTES?{4:{name:"ShotInfo",description:function(e){return e}}}:{}),bt,v.USE_MAKER_NOTES?{0:{name:"PentaxVersion",description:function(e){return e.join(".")}},5:"PentaxModelID",555:"LevelInfo"}:{}),It={1:1,2:1,3:2,4:4,5:8,7:1,9:4,10:8,13:4},Pt={BYTE:1,ASCII:2,SHORT:3,LONG:4,RATIONAL:5,UNDEFINED:7,SLONG:9,SRATIONAL:10,IFD:13},At={getAsciiValue:function(e){return e.map((function(e){return String.fromCharCode(e)}))},getByteAt:Ct,getAsciiAt:function(e,t){return e.getUint8(t)},getShortAt:function(e,t,n){return e.getUint16(t,n===A)},getLongAt:Tt,getRationalAt:function(e,t,n){return[Tt(e,t,n),Tt(e,t+4,n)]},getUndefinedAt:function(e,t){return Ct(e,t)},getSlongAt:xt,getSrationalAt:function(e,t,n){return[xt(e,t,n),xt(e,t+4,n)]},getIfdPointerAt:function(e,t,n){return Tt(e,t,n)},typeSizes:It,tagTypes:Pt,getTypeSize:function(e){if(void 0===Pt[e])throw Error("No such type found.");return It[Pt[e]]}};function Ct(e,t){return e.getUint8(t)}function Tt(e,t,n){return e.getUint32(t,n===A)}function xt(e,t,n){return e.getInt32(t,n===A)}var Ut={exif:1,iptc:1,photoshop:1,mpf:1,makerNotes:1},Et={exif:1,iptc:1,xmp:1,icc:1,photoshop:1,makerNotes:1,mpf:1,file:1,jfif:1,png:1,riff:1,gif:1,gps:1,composite:1,thumbnail:1},wt={exifIfdPointer:"Exif IFD Pointer",gpsInfoIfdPointer:"GPS Info IFD Pointer",interoperabilityIfdPointer:"Interoperability IFD Pointer"},Ft={thumbnail:["JPEGInterchangeFormat","JPEGInterchangeFormatLength"],iptc:["IPTC-NAA"],xmp:["ApplicationNotes"],icc:["ICC_Profile"],photoshop:["ImageSourceData","PhotoshopSettings"],makerNotes:["MakerNote","Make"],gps:["GPSLatitude","GPSLatitudeRef","GPSLongitude","GPSLongitudeRef","GPSAltitude","GPSAltitudeRef"]},Ot={file:["Image Width","Image Height"],exif:["FocalLength","FocalPlaneXResolution","FocalPlaneYResolution","FocalPlaneResolutionUnit","FocalLengthIn35mmFilm"]};function Rt(e){return 1==e?1:Array.isArray(e)&&e.length>0}function Mt(){return{isActive:0,shouldReturnGroup:e,shouldParseGroup:e,shouldReturnTag:e,shouldParseTag:e};function e(){return 1}}var Nt=Mt();function Gt(e){var t=e.groupKey,n=e.hasIncludeTags,r=e.hasIncludeEntry,i=e.includeTags,o=e.shouldParseExif,a=e.shouldParseFile;return n?r?"thumbnail"===t&&Array.isArray(i[t])?1:i[t]:"exif"===t&&o||"file"===t&&a?[]:void 0:1}function kt(e){var t=e.groupKey,n=e.hasIncludeTags,r=e.hasIncludeEntry,i=e.shouldParseExif,o=e.shouldParseFile,a=e.exifIncludeDependencies,u=e.fileIncludeDependencies;return n?"exif"===t&&(i||r&&Object.keys(a).length>0)?a:"file"===t&&o?u:Object.create(null):Object.create(null)}function Lt(e,t){if(!e||!Object.prototype.hasOwnProperty.call(e,t))return 0;var n=e[t];return 1==n?1:Array.isArray(n)&&n.length>0}function Dt(e){var t,n,r=e.groupKey,i=e.includeValue,o=e.excludeValue,a=e.extraIncludeNames,u=!!Ut[r],f={includeAll:0,includeNames:void 0,includeIds:void 0,excludeAll:0,excludeNames:void 0,excludeIds:void 0};if(1==i)f.includeAll=1;else if(Array.isArray(i)){f.includeNames=Object.create(null),u&&(f.includeIds=Object.create(null));for(var c=0;c<i.length;c++)t=f,"number"==typeof(n=i[c])&&t.includeIds?t.includeIds[n+""]=1:"string"==typeof n&&(t.includeNames[n.toLowerCase()]=1);for(var s in a)f.includeNames[s.toLowerCase()]=1}else if(a&&Object.keys(a).length>0)for(var l in f.includeNames=Object.create(null),a)f.includeNames[l.toLowerCase()]=1;if(1==o)return f.excludeAll=1,f;if(Array.isArray(o)){f.excludeNames=Object.create(null),u&&(f.excludeIds=Object.create(null));for(var d=0;d<o.length;d++)p(f,o[d])}return f;function p(e,t){"number"==typeof t&&e.excludeIds?e.excludeIds[t+""]=1:"string"==typeof t&&(e.excludeNames[t.toLowerCase()]=1)}}function _t(e,t,n){return e.excludeAll?0:e.includeAll?!jt(e,t,n):e.includeNames||e.includeIds?function(e,t,n){return void 0!==n&&e.includeIds&&e.includeIds[n+""]||t&&e.includeNames&&e.includeNames[(t+"").toLowerCase()]?1:0}(e,t,n)?!jt(e,t,n):0:!jt(e,t,n)}function jt(e,t,n){return void 0!==n&&e.excludeIds&&e.excludeIds[n+""]||t&&e.excludeNames&&e.excludeNames[(t+"").toLowerCase()]?1:0}var Bt={1:At.getByteAt,2:At.getAsciiAt,3:At.getShortAt,4:At.getLongAt,5:At.getRationalAt,7:At.getUndefinedAt,9:At.getSlongAt,10:At.getSrationalAt,13:At.getIfdPointerAt};function zt(e,t,n){return t+At.getLongAt(e,t+4,n)}function Vt(e,t,n,r,i,o){var a,u,f=arguments.length>6&&void 0!==arguments[6]?arguments[6]:0,c=arguments.length>7&&void 0!==arguments[7]?arguments[7]:Nt,s=arguments.length>8&&void 0!==arguments[8]?arguments[8]:"exif",l=At.getTypeSize("SHORT"),d={},p=function(e,t,n){return t+At.getTypeSize("SHORT")<=e.byteLength?At.getShortAt(e,t,n):0}(e,r,i);r+=l;for(var g=0;g<p&&!(r+12>e.byteLength);g++){var m=Ht(e,t,n,r,i,o,c,s);void 0!==m&&(d[m.name]={id:m.id,value:m.value,description:m.description},f&&(d[m.name].computed=(a=m.tagType,u=m.value,a===At.tagTypes.ASCII?Array.isArray(u)&&1===u.length?u[0]:u:a===At.tagTypes.RATIONAL||a===At.tagTypes.SRATIONAL?function(e){return Array.isArray(e)&&2===e.length?"number"==typeof e[0]&&"number"==typeof e[1]:0}(u)?Kt(u):Array.isArray(u)?u.map((function(e){return Kt(e)})):u:u)),("MakerNote"===m.name||t===bt&&"LevelInfo"===m.name)&&(d[m.name].__offset=m.__offset)),r+=12}if(v.USE_THUMBNAIL&&r<e.byteLength-At.getTypeSize("LONG")){var h=At.getLongAt(e,r,i);0!==h&&t===mt&&c.shouldParseGroup("thumbnail")&&(d.Thumbnail=Vt(e,"1st",n,n+h,i,o,f,c,"thumbnail"))}return d}function Ht(e,t,n,r,i){var o,a,u=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,f=arguments.length>6&&void 0!==arguments[6]?arguments[6]:Nt,c=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"exif",s=At.getTypeSize("SHORT"),l=s+At.getTypeSize("SHORT"),d=l+At.getTypeSize("LONG"),p=At.getShortAt(e,r,i),g=At.getShortAt(e,r+s,i),m=At.getLongAt(e,r+l,i);if(void 0!==At.typeSizes[g]&&(u||void 0!==St[t][p])){var h=function(e,t){if(void 0!==St[e][t]){if("string"==typeof St[e][t])return St[e][t];if(St[e][t].name)return St[e][t].name}return"undefined-".concat(t)}(t,p);if(f.shouldParseTag(c,h,p)){o=function(e,t){return At.typeSizes[e]*t<=At.getTypeSize("LONG")}(g,m)?Wt(e,a=r+d,g,m,i):function(e,t,n,r,i){return t+n+At.typeSizes[r]*i<=e.byteLength}(e,n,a=At.getLongAt(e,r+d,i),g,m)?Wt(e,n+a,g,m,i,33723===p):"<faulty value>",g===At.tagTypes.ASCII&&(o=function(e){try{return e.map((function(e){return decodeURIComponent(escape(e))}))}catch(t){return e}}(o=function(e){for(var t=[],n=0,r=0;r<e.length;r++)"\0"!==e[r]?(void 0===t[n]&&(t[n]=""),t[n]+=e[r]):n++;return t}(o)));var v=o;if(void 0!==St[t][p])if(void 0!==St[t][p].name&&void 0!==St[t][p].description)try{v=St[t][p].description(o)}catch(e){v=Xt(o)}else v=g===At.tagTypes.RATIONAL||g===At.tagTypes.SRATIONAL?""+o[0]/o[1]:Xt(o);return{id:p,name:h,value:o,description:v,tagType:g,__offset:a}}}}function Wt(e,t,n,r,i){var o=[];arguments.length>5&&void 0!==arguments[5]&&arguments[5]&&(r*=At.typeSizes[n],n=At.tagTypes.BYTE);for(var a=0;a<r;a++)o.push(Bt[n](e,t,i)),t+=At.typeSizes[n];return n===At.tagTypes.ASCII?o=At.getAsciiValue(o):1===o.length&&(o=o[0]),o}function Xt(e){return e instanceof Array?e.join(", "):e}function Kt(e){if(!Array.isArray(e)||2!==e.length)return e;var t=e[0],n=e[1];return Number.isFinite(t)&&Number.isFinite(n)?0===n?null:t/n:e}var Jt="Exif IFD Pointer",Yt="GPS Info IFD Pointer",qt="Interoperability IFD Pointer",$t={read:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0,o=C(e,t),a=function(e,t,n,r,i,o){return Vt(e,mt,t,zt(e,t,n),n,r,i,o,"exif")}(e,t,o,n,r,i);return{tags:a=en(a=Qt(a=Zt(a,e,t,o,n,r,i),e,t,o,n,r,i),e,t,o,n,r,i),byteOrder:o}}};function Zt(e,t,n,r,i,o,a){return void 0!==e[Jt]?l(e,Vt(t,ht,n,n+e[Jt].value,r,i,o,a,"exif")):e}function Qt(e,t,n,r,i,o,a){return void 0!==e[Yt]?l(e,Vt(t,"gps",n,n+e[Yt].value,r,i,o,a,"exif")):e}function en(e,t,n,r,i,o,a){return void 0!==e[qt]?l(e,Vt(t,vt,n,n+e[qt].value,r,i,o,a,"exif")):e}var tn={read:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0,o=C(e,t);return function(e,t,n,r){if(!n.MPEntry)return n;for(var i=[],o=0;o<Math.ceil(n.MPEntry.value.length/nn);o++){i[o]={};var a=rn(n.MPEntry.value,o*nn,At.getTypeSize("LONG"),r);i[o].ImageFlags=on(a),i[o].ImageFormat=an(a),i[o].ImageType=un(a);var u=rn(n.MPEntry.value,o*nn+4,At.getTypeSize("LONG"),r);i[o].ImageSize={value:u,description:""+u};var f=fn(o,n.MPEntry,r,t);i[o].ImageOffset={value:f,description:""+f};var c=rn(n.MPEntry.value,o*nn+12,At.getTypeSize("SHORT"),r);i[o].DependentImage1EntryNumber={value:c,description:""+c};var s=rn(n.MPEntry.value,o*nn+14,At.getTypeSize("SHORT"),r);i[o].DependentImage2EntryNumber={value:s,description:""+s},i[o].image=e.buffer.slice(f,f+u),d(i[o],"base64",(function(){return p(this.image)}))}return n.Images=i,n}(e,t,Vt(e,"mpf",t,zt(e,t,o),o,n,r,i,"mpf"),o)}},nn=16;function rn(e,t,n,r){if(r===A){for(var i=0,o=0;o<n;o++)i+=e[t+o]<<8*o;return i}for(var a=0,u=0;u<n;u++)a+=e[t+u]<<8*(n-1-u);return a}function on(e){var t=[e>>31&1,e>>30&1,e>>29&1],n=[];return t[0]&&n.push("Dependent Parent Image"),t[1]&&n.push("Dependent Child Image"),t[2]&&n.push("Representative Image"),{value:t,description:n.join(", ")||"None"}}function an(e){var t=e>>24&7;return{value:t,description:0===t?"JPEG":"Unknown"}}function un(e){var t=16777215&e;return{value:t,description:{196608:"Baseline MP Primary Image",65537:"Large Thumbnail (VGA equivalent)",65538:"Large Thumbnail (Full HD equivalent)",131073:"Multi-Frame Image (Panorama)",131074:"Multi-Frame Image (Disparity)",131075:"Multi-Frame Image (Multi-Angle)",0:"Undefined"}[t]||"Unknown"}}function fn(e,t,n,r){return function(e){return 0===e}(e)?0:rn(t.value,e*nn+8,At.getTypeSize("LONG"),n)+r}var cn={read:function(e,t){var n=function(e,t){return At.getShortAt(e,t)}(e,t),r=function(e,t,n){if(!(8>n)){var r=At.getByteAt(e,t+7);return{value:r,description:""+r}}}(e,t,n);return{"Bits Per Sample":sn(e,t,n),"Image Height":ln(e,t,n),"Image Width":dn(e,t,n),"Color Components":r,Subsampling:r&&pn(e,t,r.value,n)}}};function sn(e,t,n){if(!(3>n)){var r=At.getByteAt(e,t+2);return{value:r,description:""+r}}}function ln(e,t,n){if(!(5>n)){var r=At.getShortAt(e,t+3);return{value:r,description:"".concat(r,"px")}}}function dn(e,t,n){if(!(7>n)){var r=At.getShortAt(e,t+5);return{value:r,description:"".concat(r,"