exifreader 4.53.0 → 4.54.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
- !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 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(){"use strict";function n(e,t,n){return new DataView(e,t,n)}function r(e){return!!e&&!!e.buffer&&"number"==typeof e.byteOffset&&"number"==typeof e.byteLength}function i(e,t,n){for(var r=[],i=0;i<n&&t+i<e.byteLength;i++)r.push(e.getUint8(t+i));return f(r)}function o(e,t,n){for(var r=[],i=0;i+2<=n&&t+i+2<=e.byteLength;i+=2)r.push(e.getUint16(t+i));return 0===r[r.length-1]&&r.pop(),f(r)}function a(e,t){var n=e.getUint8(t);return[n,i(e,t+1,n)]}e.r(t),e.d(t,{default:function(){return ss},errors:function(){return cs},load:function(){return ds},loadView:function(){return ps}});var u=8192;function f(e){if(!Array.isArray(e))throw new TypeError("Expected an array.");for(var t=[],n=[],r=0,i=0;i<e.length;i++)i in e&&(n[r++]=e[i],r===u&&(t.push(String.fromCharCode.apply(null,n)),r=0));return n.length=r,t.push(String.fromCharCode.apply(null,n)),t.join("")}function s(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];if(n-t<=u)return c(e,t,n,r);for(var i=[],o=t;o<n;o+=u)i.push(c(e,o,Math.min(o+u,n),r));return i.join("")}function c(e,t,n,r){for(var i=t;i<n;i++)r[i-t]=e[i];return r.length=n-t,String.fromCharCode.apply(null,r)}function d(e,t,n){if(!Array.isArray(e))throw new TypeError("Expected an array.");for(var r=[],i=[],o=0;o<e.length;o+=65536)i.push(l(e,o,Math.min(o+65536,e.length),t,n,r));return i.join(n)}function l(e,t,n,r,i,o){for(var a=t;a<n;a++)o[a-t]=r(e[a]);return o.length=n-t,o.join(i)}function p(e){var t=g(e);return void 0===t?e:t}function g(e){for(var t=1,n=0;n<e.length;){var r=h(e,n);if(0===r)return;r>1&&(t=0),n+=r}return t?e:decodeURIComponent(escape(e))}function h(e,t){var n,r=e.charCodeAt(t);if(r<128)return 1;var i=128,o=191;if(r>=194&&r<=223)n=2;else if(r>=224&&r<=239)n=3,224===r?i=160:237===r&&(o=159);else{if(!(r>=240&&r<=244))return 0;n=4,240===r?i=144:244===r&&(o=143)}if(t+n>e.length)return 0;var a=e.charCodeAt(t+1);if(!(a>=i&&a<=o))return 0;for(var u=2;u<n;u++){var f=e.charCodeAt(t+u);if(!(f>=128&&f<=191))return 0}return n}var m=4096;function v(e,t,n,r){if(e&&t)if(e.length<m)e.push({type:t,start:n,end:r});else{var i=e[e.length-1];i.start=Math.min(i.start,n),i.end=Math.max(i.end,r)}}function y(){if("undefined"==typeof Promise)throw Error("Promise is required when async mode is enabled.")}function b(){for(var e=1;e<arguments.length;e++)for(var t in arguments[e])S(arguments[0],t,arguments[e][t]);return arguments[0]}function S(e,t,n){"__proto__"!==t?e[t]=n:Object.defineProperty(e,t,{value:n,enumerable:1,writable:1,configurable:1})}function x(e){return"__proto__"!==e&&Object.prototype.hasOwnProperty.call(Object.prototype,e)?e+"_":e}function A(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 I(e){return"string"==typeof e&&"undefined"!=typeof btoa?btoa(e):"undefined"!=typeof Buffer&&"undefined"!=typeof Buffer.from&&Buffer.from!==Uint8Array.from?Buffer.from(e).toString("base64"):"undefined"!=typeof btoa?btoa(s(new Uint8Array(e))):"undefined"!=typeof Buffer?new Buffer(e).toString("base64"):void 0}function P(e){var t=e.indexOf(","),n=e.substring(0,t),r=e.substring(t+1);if(-1!==n.indexOf(";base64")){var i=function(e){return-1===e.indexOf("%")||/[\u0080-\uffff]/.test(e)?e:s(T(e))}(r);if("undefined"!=typeof atob)return function(e){for(var t=new Uint8Array(e.length),n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t.buffer}(atob(i));if("undefined"==typeof Buffer)return;return"undefined"!=typeof Buffer.from?Buffer.from(i,"base64"):new Buffer(i,"base64")}return T(r).buffer}function T(e){for(var t=/[\u0080-\uffff]/.test(e)?unescape(encodeURIComponent(e)):e,n=new Uint8Array(t.length-2*function(e){for(var t=0,n=0;n<e.length;n++)C(e,n)&&(t++,n+=2);return t}(t)),r=0,i=0;i<t.length;i++)C(t,i)?(n[r++]=16*E(t.charCodeAt(i+1))+E(t.charCodeAt(i+2)),i+=2):n[r++]=t.charCodeAt(i);return n}function C(e,t){return 37===e.charCodeAt(t)&&t+2<e.length&&-1!==E(e.charCodeAt(t+1))&&-1!==E(e.charCodeAt(t+2))}function E(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-65+10:e>=97&&e<=102?e-97+10:-1}function O(e,t,n){return U(n,Math.max(0,t-e.length))+e}function U(e,t){return Array(t+1).join(e)}var w=void 0,L=0,M="brotli",F=134217728,R=1073741823;function D(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"string",i=arguments.length>4?arguments[4]:void 0,o=N(i),a=function(e,t){return e&&e.budget?e.budget:{remaining:t,warned:0,failed:0,pending:void 0}}(i,o);if(t!==w&&a.remaining<0)return X(a,o);var u=function(e){return e===L?"deflate":e===M?"brotli":void 0}(t);if(i&&u){var f=i[u];if("function"==typeof f)return function(e,t,n,r,i,o){return new Promise(function(a){i.pending?a(function(e,t,n,r,i,o){var a=i.pending,u=new DataView(t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength));return G(i,a.then(function(){return i.remaining<0?X(i,o):k(e,u,n,r,i,o)}))}(e,t,n,r,i,o)):a(k(e,t,n,r,i,o))})}(f,e,r,n,a,o)}if(t===L&&"function"==typeof DecompressionStream)return V(e,"deflate",a,o).then(function(e){return H(e,r,n)});if(t===M){if("function"==typeof DecompressionStream)try{return V(e,"brotli",a,o).then(function(e){return H(e,r,n)})}catch(e){}return Promise.reject("Brotli decompression is not supported in this environment. Pass in a brotli decompression function via the decompress option.")}if(void 0!==t)return Promise.reject("Unknown compression method ".concat(t,"."));if("string"===r)try{return new TextDecoder(n).decode(e)}catch(t){return e?s(z(e)):""}return e}function N(e){return e&&"number"==typeof e.maxDecompressedSize?e.maxDecompressedSize:F}function G(e,t){var n=t.then(function(){},function(){});return e.pending=n,n.then(function(){e.pending===n&&(e.pending=void 0)}),t}function k(e,t,n,r,i,o){var a,u=Math.min(i.remaining+1,R);try{a=e(z(t),{maxOutputLength:u})}catch(e){return _(e,i,o,u)}if(B(a)){var f=Promise.resolve(a).then(function(e){return j(e,n,r,i,o)},function(e){return _(e,i,o,u)});return i.pending?f:G(i,f)}return j(a,n,r,i,o)}function _(e,t,n,r){return e&&"ERR_BUFFER_TOO_LARGE"===e.code?(t.remaining=-1,X(t,n)):(function(e,t){e.failed?e.remaining-=t:e.failed=1}(t,r),Promise.reject(e))}function B(e){return!!e&&"function"==typeof e.then}function j(e,t,n,r,i){return r.remaining-=function(e){return e&&"number"==typeof e.byteLength?e.byteLength:0}(e),r.remaining<0?X(r,i):function(e,t,n){return"dataview"===t?e instanceof ArrayBuffer?new DataView(e):0===e.byteOffset&&e.byteLength===e.buffer.byteLength?new DataView(e.buffer):new DataView(e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength)):new TextDecoder(n).decode(e)}(e,t,n)}function z(e){return new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}function V(e,t,n,r){var i=new DecompressionStream(t),o=new Blob([e]).stream().pipeThrough(i).getReader(),a=[],u=0;return function e(){return o.read().then(function(t){var i=t.done,f=t.value;return i?function(e,t){for(var n=new Uint8Array(t),r=0,i=0;i<e.length;i++)n.set(e[i],r),r+=e[i].byteLength;return n.buffer}(a,u):(u+=f.byteLength,n.remaining-=f.byteLength,n.remaining<0?o.cancel().then(function(){return X(n,r)}):(a.push(f),e()))})}()}function H(e,t,n){return"dataview"===t?new DataView(e):new TextDecoder(n).decode(e)}function X(e,t){return e.warned||"undefined"==typeof console||"function"!=typeof console.warn||(e.warned=1,console.warn("ExifReader: the total decompressed metadata size for this call would exceed the maximum of ".concat(t," bytes, so this and any later compressed metadata blocks are skipped."))),Promise.reject("Decompressed metadata exceeded the maximum allowed total size of ".concat(t," bytes."))}var W={builtin:function(e){return K(e,[J,q,Y])},optionalPackage:function(e){return K(e,[J])}};function K(e,t){for(var n=0;n<t.length;n++)try{return t[n](e)}catch(e){}}function J(e){switch(e){case"fs":try{return require("fs")}catch(e){throw e}case"http":return require("http");case"https":return require("https");case"@xmldom/xmldom":try{return require("@xmldom/xmldom")}catch(e){throw e}case"@xmldom/xmldom/package.json":try{return require("@xmldom/xmldom/package.json")}catch(e){throw e}default:throw Error("No webpack require for ".concat(e,"."))}}function q(e){return globalThis.process.getBuiltinModule(e)}function Y(e){return globalThis.process.mainModule.require(e)}var $=200,Z=299,Q=416;function ee(e){return"string"==typeof e}function te(e){return"undefined"!=typeof File&&e instanceof File}function ne(e){return/^data:[^;,]*(;base64)?,/.test(e)}function re(e,t){var n=oe(t);return n?/^\w+:\/\//.test(e)?"undefined"!=typeof fetch?ue(e,n).then(function(e){return e.buffer}):pe(e,n).then(function(e){return e.buffer}):ne(e)?Promise.resolve().then(function(){return P(e)}):me(e,n).then(function(e){return e.buffer}):ae()}function ie(e,t){var n=oe(t);return n?ye(e,n).then(function(e){return e.buffer}):ae()}function oe(e){var t=e?e.length:void 0;if(null==t)return{start:0};if(Number.isFinite(t)&&t>=0){var n=Math.floor(t);return{start:0,end:n,maxBytes:n}}}function ae(){return Promise.reject(Error('The length option must be a finite non-negative number or "auto".'))}function ue(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.start,r=void 0===n?0:n,i=t.end,o=t.maxBytes;if(de(r,i))return Promise.resolve({buffer:new ArrayBuffer(0),totalSize:void 0,status:void 0});var a={method:"GET"};return(r>0||void 0!==i&&i!==1/0)&&(a.headers={range:le(r,i)}),fetch(e,a).then(function(e){var t=e&&"number"==typeof e.status?e.status:void 0;if(void 0!==t&&!function(e){return e>=$&&e<=Z?1:e===Q}(t)){se(e.body);var n=e.statusText||"";return Promise.reject(Error("Could not fetch file: ".concat(t," ").concat(n).trim()))}var r=function(e){if(e&&e.headers&&"function"==typeof e.headers.get)return he(e.headers.get("Content-Range"),e.headers.get("Content-Length"))}(e);return t===Q?(se(e.body),{buffer:new ArrayBuffer(0),totalSize:r,status:t}):function(e,t){return fe(t)?e.body&&"function"==typeof e.body.getReader?function(e,t){return new Promise(function(n,r){var i=ce(t);function o(){if(i.isFull())return n(i.toArrayBuffer()),void se(e);e.read().then(a).then(void 0,u)}function a(e){e.done?n(i.toArrayBuffer()):(i.add(e.value),o())}function u(t){r(t),se(e)}o()})}(e.body.getReader(),t):Promise.resolve(e.arrayBuffer()).then(function(e){return e.slice(0,t)}):Promise.resolve(e.arrayBuffer())}(e,o).then(function(e){return{buffer:e,totalSize:r,status:t}})})}function fe(e){return Number.isInteger(e)&&e>=0}function se(e){Promise.resolve().then(function(){return e.cancel()}).then(void 0,function(){})}function ce(e){var t=new Uint8Array(0),n=0;return{add:function(r){var i,o=Math.min(r.byteLength,e-n);n+o>t.length&&((i=new Uint8Array(Math.min(e,Math.max(n+o,2*t.length)))).set(t.subarray(0,n)),t=i),t.set(r.subarray(0,o),n),n+=o},isFull:function(){return n>=e},toArrayBuffer:function(){if(t.length===n)return t.buffer;var e=new Uint8Array(n);return e.set(t.subarray(0,n)),e.buffer}}}function de(e,t){return void 0!==t&&t!==1/0&&t<=e}function le(e,t){return void 0===t||t===1/0?"bytes=".concat(e,"-"):"bytes=".concat(e,"-").concat(t-1)}function pe(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.start,r=void 0===n?0:n,i=t.end,o=t.maxBytes;return de(r,i)?Promise.resolve({buffer:Buffer.alloc(0),totalSize:void 0,status:void 0}):new Promise(function(t,n){var a={};(r>0||void 0!==i&&i!==1/0)&&(a.headers={range:le(r,i)});var u=function(e){var t=W.builtin(/^https:\/\//.test(e)?"https":"http");return t&&t.get}(e);if(!u)return n(Error("Node http support is not available."));u(e,a,function(e){if(e.statusCode>=$&&e.statusCode<=Z){var r=ge(e);if(fe(o))!function(e,t,n,r){var i=ce(t),o=0;function a(){o=1,n(Buffer.from(i.toArrayBuffer()))}e.on("error",r),i.isFull()?(a(),e.destroy()):(e.on("data",function(t){o||(i.add(t),i.isFull()&&(a(),e.destroy()))}),e.on("end",a))}(e,o,function(n){return t({buffer:n,totalSize:r,status:e.statusCode})},n);else{var i=[];e.on("data",function(e){return i.push(Buffer.from(e))}),e.on("error",function(e){return n(e)}),e.on("end",function(){return t({buffer:Buffer.concat(i),totalSize:r,status:e.statusCode})})}}else if(e.statusCode===Q){var a=ge(e);e.destroy(),t({buffer:Buffer.alloc(0),totalSize:a,status:e.statusCode})}else n(Error("Could not fetch file: ".concat(e.statusCode," ").concat(e.statusMessage))),e.destroy()}).on("error",function(e){return n(e)})})}function ge(e){if(e&&e.headers)return he(e.headers["content-range"],e.headers["content-length"])}function he(e,t){if(e){var n=/\/(\d+|\*)$/.exec(e);if(n&&"*"!==n[1])return parseInt(n[1],10)}if(t){var r=parseInt(t,10);if(Number.isFinite(r))return r}}function me(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.start,r=void 0===n?0:n,i=t.end,o=t.totalSize;return new Promise(function(t,n){var a=W.builtin("fs");if(!a)return n(Error("Node file system support is not available."));a.open(e,function(u,f){if(u)return n(u);!function(e,t,n,r){if(void 0!==n)return r(null,n);e.stat(t,function(e,t){return r(e,e?void 0:t.size)})}(a,e,o,function(o,u){if(o)return a.close(f,function(){return n(o)});var s=void 0===i||i===1/0||i>u?u:i,c=Math.min(Math.max(0,r),s),d=s-c,l=Buffer.alloc(d);if(0===d)return a.close(f,function(n){return ve(e,n,l,u,t)});a.read(f,{buffer:l,length:d,position:c},function(r){if(r)return a.close(f,function(){return n(r)});a.close(f,function(n){return ve(e,n,l,u,t)})})})})})}function ve(e,t,n,r,i){t&&console.warn("Could not close file ".concat(e,":"),t),i({buffer:n,totalSize:r})}function ye(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.start,r=void 0===n?0:n,i=t.end;return new Promise(function(t){var n="number"==typeof e.size?e.size:void 0,o=function(e,t,n,r){if(e&&"function"==typeof e.slice&&(t>0||void 0!==n&&n!==1/0)){var i=void 0===n||n===1/0?r:n;return e.slice(t,i)}return e}(e,r,i,n);t(function(e){return"function"==typeof e.arrayBuffer?Promise.resolve(e.arrayBuffer()):new Promise(function(t,n){var r=new FileReader;r.onload=function(e){return t(e.target.result)},r.onerror=function(){return n(r.error)},r.readAsArrayBuffer(e)})}(o).then(function(e){return{buffer:e,totalSize:n}}))})}function be(e){return e instanceof ArrayBuffer?new Uint8Array(e):"undefined"!=typeof Buffer&&Buffer.isBuffer(e)||r(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e)}var Se=131072,xe=4,Ae='length: "auto" could not locate metadata in this file (no metadata blocks found after reading the file — e.g. plain TIFF, bare JPEG XL codestream, or a file with no recognizable metadata).',Ie='length: "auto" is not supported for this file type (no leading metadata container — e.g. plain TIFF or bare JPEG XL codestream).';function Pe(e){return function(e,r){y();var i=b({},r,{async:1});return ee(e)?function(e,r){return/^\w+:\/\//.test(e)?"undefined"!=typeof fetch?n({readRange:function(t,n){return ue(e,{start:t,end:n,maxBytes:n})},options:r}):n({readRange:function(t,n){return pe(e,{start:t,end:n,maxBytes:n})},options:r}):ne(e)?Promise.resolve().then(function(){return P(e)}).then(function(e){return t(e,r)}):n({readRange:function(t,n,r){return me(e,{start:t,end:n,totalSize:r?r.totalSize:void 0})},options:r})}(e,i):te(e)?function(e,t){return n({readRange:function(t,n){return ye(e,{start:t,end:n})},options:t})}(e,i):t(e,i)};function t(t,n){return Promise.resolve().then(function(){return e(t,n)}).then(function(e){if(!e||!e.metadataRange)throw Error(Ie);var n=e.metadataRange.end;return e.metadataRange.buffer=function(e,t){if("undefined"!=typeof Buffer&&Buffer.isBuffer(e))return Buffer.from(e.subarray(0,t));if(e instanceof ArrayBuffer)return e.slice(0,t);if("undefined"!=typeof SharedArrayBuffer&&e instanceof SharedArrayBuffer)return e.slice(0,t);if(r(e)){var n=Math.max(0,Math.min(t,e.byteLength));return e.buffer.slice(e.byteOffset,e.byteOffset+n)}return function(e){return!!e&&!e.buffer&&"function"==typeof e.slice&&"number"==typeof e.byteLength}(e)?e.slice(0,t):e}(t,n),e.metadataRange.fetched=Ee(e.metadataRange.buffer),e.metadataRange.requests=0,e})}function n(e){return i({readRange:e.readRange,options:e.options,buffer:null,fetched:0,requests:0,totalSize:void 0,need:Se,iter:0})}function i(t){return t.iter>=xe?o(t):(void 0!==t.totalSize&&(t.need=Math.min(t.need,t.totalSize)),t.need<=t.fetched?o(t):t.readRange(t.fetched,t.need,{totalSize:t.totalSize}).then(function(n){return t.requests++,n.status===Q?function(t){return t.readRange(0,1/0,{totalSize:void 0}).then(function(n){return t.requests++,t.buffer=n.buffer,t.fetched=Ee(t.buffer),void 0!==n.totalSize&&(t.totalSize=n.totalSize),Promise.resolve(e(t.buffer,t.options))}).then(function(e){if(!e||!e.metadataRange)throw Error(Ae);return Ce(e,t.buffer,t.fetched,t.requests)})}(t):(Te(t,n),Promise.resolve(e(t.buffer,t.options)).then(function(e){return function(e,t){var n=t&&t.metadataRange;if(n&&n.complete)return Ce(t,e.buffer,e.fetched,e.requests);var r=void 0!==e.totalSize&&e.fetched>=e.totalSize;if(!n&&r)throw Error(Ae);var o=function(e){var t=e.range,n=e.totalSize,r=e.fetched;return t?Math.min(Math.max(t.end,2*r),void 0!==n?n:1/0):void 0!==n?n:2*r}({range:n,totalSize:e.totalSize,fetched:e.fetched});if(o<=e.fetched){if(n)return Ce(t,e.buffer,e.fetched,e.requests);throw Error(Ae)}return e.need=o,e.iter++,i(e)}(t,e)}))}))}function o(t){return console.warn('ExifReader: length:"auto" did not converge in '.concat(xe," iterations; falling back to full read.")),(void 0!==t.totalSize&&t.fetched<t.totalSize?t.readRange(t.fetched,t.totalSize,{totalSize:t.totalSize}).then(function(e){t.requests++,Te(t,e)}):void 0===t.totalSize?t.readRange(t.fetched,1/0,{totalSize:t.totalSize}).then(function(e){t.requests++,Te(t,e)}):Promise.resolve()).then(function(){return Promise.resolve(e(t.buffer,t.options))}).then(function(e){if(!e||!e.metadataRange)throw Error(Ae);return Ce(e,t.buffer,t.fetched,t.requests)})}}function Te(e,t){if(t.status===$&&e.fetched>0)return e.buffer=t.buffer,e.fetched=Ee(e.buffer),void(void 0!==t.totalSize&&(e.totalSize=t.totalSize));void 0!==t.totalSize&&void 0===e.totalSize&&(e.totalSize=t.totalSize),e.buffer=function(e,t){if(!e)return t;if(!t)return e;if("undefined"!=typeof Buffer&&Buffer.isBuffer(e)&&Buffer.isBuffer(t))return Buffer.concat([e,t]);var n=be(e),r=be(t),i=new Uint8Array(n.byteLength+r.byteLength);return i.set(n,0),i.set(r,n.byteLength),i.buffer}(e.buffer,t.buffer),e.fetched=Ee(e.buffer)}function Ce(e,t,n,r){var i=e.metadataRange.end;return e.metadataRange.buffer=function(e,t){return!e||"number"!=typeof t||t<0?e:"undefined"!=typeof Buffer&&Buffer.isBuffer(e)?Buffer.from(e.subarray(0,Math.min(t,e.length))):e instanceof ArrayBuffer||"undefined"!=typeof SharedArrayBuffer&&e instanceof SharedArrayBuffer?e.slice(0,Math.min(t,e.byteLength)):e}(t,i),e.metadataRange.fetched=n,e.metadataRange.requests=r,e}function Ee(e){return e?"number"==typeof e.byteLength?e.byteLength:"number"==typeof e.length?e.length:0:0}var Oe={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_JXL:1,USE_WEBP:1,USE_GIF:1,USE_MAKER_NOTES:1};function Ue(e){if(Le(e))return Me(e)||"Undefined";if(e.length>=8){var t=f(e.slice(0,8));if("ASCII\0\0\0"===t)return s(e,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){var n=s(e,8);return/[\x20-\x7e]/.test(n)?n:"[Undefined encoding]"}}return"Undefined"}function we(e){return Array.isArray(e)?Le(e)?Me(e):s(e):e}function Le(e){return Array.isArray(e)&&"number"!=typeof e[0]}function Me(e){return e.filter(Fe).join(", ")}function Fe(e){return"string"==typeof e}function Re(e,t){var n=t+"";return Object.prototype.hasOwnProperty.call(e,n)?e[n]:"Unknown"}function De(e){return e[0][0]/e[0][1]+e[1][0]/e[1][1]/60+e[2][0]/e[2][1]/3600}var Ne=18761,Ge=19789,ke={BIG_ENDIAN:Ge,LITTLE_ENDIAN:Ne,getByteOrder:function(e,t){if(e.getUint16(t)===Ne)return Ne;if(e.getUint16(t)===Ge)return Ge;throw Error("Illegal byte order value. Faulty image.")}};function _e(e,t,n){return t+n<=e.byteLength}function Be(e,t,n,r,i,o,a,u,f){if(void 0===f)return[];for(var s=[],c=r.items,d=i.item.extent.extentIndex+i.item.extent.extentOffset+i.item.extent.extentLength,l=i.item.itemId+i.item.constructionMethod+i.item.dataReferenceIndex+i.item.baseOffset+i.item.extentCount,p=0,g=0;g<f&&!(c+l>t);g++){var h={extents:[]};h.itemId=ze(e,c,n),c+=i.item.itemId,h.constructionMethod=1===n||2===n?15&e.getUint16(c):void 0,c+=i.item.constructionMethod,h.dataReferenceIndex=e.getUint16(c),c+=i.item.dataReferenceIndex,h.baseOffset=He(e,c,i.item.baseOffset),c+=i.item.baseOffset,h.extentCount=e.getUint16(c),c+=i.item.extentCount;for(var m=je(h.extentCount,d,c,t,1048576-p),v=0;v<m;v++){var y={};y.extentIndex=Ve(e,n,c,u),c+=i.item.extent.extentIndex,y.extentOffset=He(e,c,o),c+=i.item.extent.extentOffset,y.extentLength=He(e,c,a),c+=i.item.extent.extentLength,h.extents.push(y)}if(p+=m,s.push(h),(h.extentCount-m)*d>0)break}return s}function je(e,t,n,r,i){return 0===t?0:Math.max(0,Math.min(e,Math.floor((r-n)/t),i))}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?function(e,t){return e.getUint32(t+4)}(e,t):0}function Xe(e,t,n,r){return 8===e||8===t||8===n||8===r}var We=1165519206,Ke=1835625829,Je={type:void 0};function qe(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.byteLength;if(_e(e,t,8))try{var r=$e(e,t),o=r.length,a=r.contentOffset;if(o<a-t||a>n)return;var u=e.getUint32(t+4);if(1718909296===u)return function(e,t,n){return{type:"ftyp",majorBrand:i(e,t,4),length:n}}(e,a,o);if(1768977008===u)return function(e,t,n,r,i){return{type:"iprp",subBoxes:pt(e,n,r-(n-t),i),length:r}}(e,t,a,o,n);if(1768973167===u)return function(e,t,n,r,i){return{type:"ipco",properties:st(e,n,r-(n-t),i),length:r}}(e,t,a,o,n);if(1668246642===u)return function(e,t,n){return{type:"colr",icc:ct(e,t),length:n}}(e,a,o);if(1768186228===u)return function(e,t){return{type:"idat",contentOffset:e,length:t}}(a,o);if(!_e(e,a,1))return;var f=e.getUint8(a);return 1835365473===u?function(e,t,n,r,i){return{type:"meta",subBoxes:pt(e,n+3,r-(n+3-t),i),length:r}}(e,t,a+1,o,n):1768714083===u?function(e,t,n,r,i,o){var a=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}}(n,r+3),u=a.offsets,f=a.sizes,s=e.getUint8(u.offsetSize)>>4;f.item.extent.extentOffset=s;var c=15&e.getUint8(u.lengthSize);f.item.extent.extentLength=c;var d=e.getUint8(u.baseOffsetSize)>>4;f.item.baseOffset=d;var l=function(e,t,n){if(1===n||2===n)return 15&e.getUint8(t)}(e,u.indexSize,n);f.item.extent.extentIndex=void 0!==l?l:0;var p=function(e,t,n){return n<2?e.getUint16(t):2===n?e.getUint32(t):void 0}(e,u.itemCount,n);return{type:"iloc",items:Be(e,Math.min(t+i,o),n,u,f,s,c,l,p),uses64BitFields:Xe(s,c,d,l),length:i}}(e,t,f,a+1,o,n):1768517222===u?function(e,t,n,r,i,o){var a=r+3+(0===n?2:4);return{type:"iinf",itemInfos:pt(e,a,i-(a-t),o),length:i}}(e,t,f,a+1,o,n):1768842853===u?function(e,t,n,r,i,o){r+=3;var a={type:"infe",length:i},u=Math.min(t+i,o);if(0!==n&&1!==n||(a.itemId=e.getUint16(r),r+=2,a.itemProtectionIndex=e.getUint16(r),r+=2,a.itemName=ht(e,r,u).value,r+=a.itemName.length+1),n>=2){2===n?(a.itemId=e.getUint16(r),r+=2):3===n&&(a.itemId=e.getUint32(r),r+=4),a.itemProtectionIndex=e.getUint16(r),r+=2,a.itemType=e.getUint32(r);var f=ht(e,r+=4,u);if(a.itemName=f.value,!f.isTerminated)return a;if(r+=a.itemName.length+1,a.itemType===Ke){var s=ht(e,r,u);if(a.contentType=s.value,!s.isTerminated)return a;u>(r+=a.contentType.length+1)&&(a.contentEncoding=ht(e,r,u).value)}else 1970432288===a.itemType&&(a.itemUri=ht(e,r,u).value)}return a}(e,t,f,a+1,o,n):1885959277===u?function(e,t,n,r,i,o){var a=r+4;return a+(0===n?2:4)>dt(e,t,i,o)?lt(i):{type:"pitm",itemId:0===n?e.getUint16(a):e.getUint32(a),length:i}}(e,t,f,a,o,n):1768975713===u?function(e,t,n,r,i,o){var a=r+4,u=dt(e,t,i,o);return a+4>u?lt(i):{type:"ipma",version:n,flags:16777215&e.getUint32(r),entryCountOffset:a,end:u,length:i}}(e,t,f,a,o,n):1769173093===u?function(e,t,n,r,i){var o=n+4;return o+8>dt(e,t,r,i)?lt(r):{type:"ispe",dimensionsOffset:o,length:r}}(e,t,a,o,n):1885960297===u?function(e,t,n,r,i,o){var a=r+4,u=dt(e,t,i,o);return 0!==n||a+1>u||a+1+e.getUint8(a)>u?lt(i):{type:"pixi",channelCountOffset:a,length:i}}(e,t,f,a,o,n):lt(o)}catch(e){return}}function Ye(e,t){if(!e)return 0;try{var n=qe(e,0);return void 0!==n&&-1!==t.indexOf(n.majorBrand)}catch(e){return 0}}function $e(e,t){var n=e.getUint32(t);if(function(e){return 0===e}(n))return{length:e.byteLength-t,contentOffset:t+4+4};if(function(e){return 1===e}(n)){if(!_e(e,t,16))return{length:0,contentOffset:t+4+4};if(function(e,t){return 0===e.getUint32(t+8)}(e,t))return{length:e.getUint32(t+12),contentOffset:t+4+4+8}}return{length:n,contentOffset:t+4+4}}function Ze(e,t){var n=function(e){for(var t=0;t+4+4<=e.byteLength;){var n=qe(e,t);if(void 0===n)break;if("meta"===n.type)return n;t+=n.length}}(e),r=function(e,t,n){var r={};if(!t)return{hasAppMarkers:0};!function(e){var t=e.subBoxes.find(function(e){return"iloc"===e.type});t&&t.uses64BitFields&&console.warn("This file uses 8-byte iloc offset, length or index fields which are currently not fully supported by ExifReader. Contact the maintainer to get it fixed.")}(t);var i=function(e,t,n){try{var r=function(e){return e.subBoxes.find(function(e){return"iinf"===e.type}).itemInfos.find(function(e){return e.itemType===We})}(t).itemId,i=it(t,r);nt(i);var o=tt(t);if(Qe(n,i,"exif",o),i.extents.length>1){var a=rt(e,i,o);if(void 0===a)return;return{tiffHeaderOffset:ot(a,0),dataView:a}}var u=et(i,i.extents[0],o);if(void 0===u)return;return{tiffHeaderOffset:ot(e,u)}}catch(e){return}}(e,t,n);void 0!==i&&(r.tiffHeaderOffset=i.tiffHeaderOffset,void 0!==i.dataView&&(r.exifDataView=i.dataView));var o=function(e,t,n){try{var r=function(e){return e.subBoxes.find(function(e){return"iinf"===e.type}).itemInfos.find(function(e){return e.itemType===Ke&&"application/rdf+xml"===e.contentType})}(t).itemId,i=it(t,r);nt(i);var o=tt(t);if(Qe(n,i,"xmp",o),i.extents.length>1){var a=rt(e,i,o);if(void 0===a)return;return{chunks:[{dataOffset:0,length:a.byteLength}],dataView:a}}var u=i.extents[0],f=et(i,u,o);if(void 0===f)return;return{chunks:[{dataOffset:f,length:u.extentLength}]}}catch(e){return}}(e,t,n);return void 0!==o&&(r.xmpChunks=o.chunks,void 0!==o.dataView&&(r.xmpDataView=o.dataView)),r.iccChunks=function(e,t){try{var n=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(n)return v(t,"icc",n.offset,n.offset+n.length),[n]}catch(e){}}(t,n),r.hasAppMarkers=void 0!==r.tiffHeaderOffset||void 0!==r.xmpChunks||void 0!==r.iccChunks,r}(e,n,t),i=function(e,t){try{if(!t)return{};var n=t.subBoxes.find(function(e){return"pitm"===e.type}),r=t.subBoxes.find(function(e){return"iprp"===e.type});if(!n||!r)return{};var i=r.subBoxes.find(function(e){return"ipco"===e.type});if(!i)return{};var o=function(e,t,n){for(var r=0;r<t.length;r++)if("ipma"===t[r].type){var i=at(e,t[r],n);if(i)return i}}(e,r.subBoxes,n.itemId);if(!o)return{};var a=ft(o,i.properties,"ispe"),u=ft(o,i.properties,"pixi");return{imageDimensionsOffset:a&&a.dimensionsOffset,pixelInformationOffset:u&&u.channelCountOffset}}catch(e){return{}}}(e,n),o=i.imageDimensionsOffset,a=i.pixelInformationOffset;return void 0!==o&&(r.imageDimensionsOffset=o),void 0!==a&&(r.pixelInformationOffset=a),r}function Qe(e,t,n,r){if(e)for(var i=0;i<t.extents.length;i++){var o=t.extents[i],a=et(t,o,r);void 0!==a&&v(e,n,a,a+o.extentLength)}}function et(e,t,n){var r=e.constructionMethod;return void 0===r||0===r?e.baseOffset+t.extentOffset:1===r&&void 0!==n?n+e.baseOffset+t.extentOffset:void 0}function tt(e){var t=e.subBoxes.find(function(e){return"idat"===e.type});return t?t.contentOffset:void 0}function nt(e){2===e.constructionMethod&&console.warn("This file uses iloc constructionMethod 2 (item_offset) which is currently not supported by ExifReader. Contact the maintainer to get it fixed.")}function rt(e,t,n){for(var r=[],i=0,o=0;o<t.extents.length;o++){var a=t.extents[o],u=et(t,a,n);if(void 0===u||u+a.extentLength>e.byteLength)return;if(r.push({start:u,length:a.extentLength}),(i+=a.extentLength)>e.byteLength)return}for(var f=new Uint8Array(i),s=0,c=0;c<r.length;c++){for(var d=r[c],l=d.start,p=d.length,g=0;g<p;g++)f[s+g]=e.getUint8(l+g);s+=p}return new DataView(f.buffer)}function it(e,t){return e.subBoxes.find(function(e){return"iloc"===e.type}).items.find(function(e){return e.itemId===t})}function ot(e,t){return t+4+e.getUint32(t)}function at(e,t,n){for(var r=0===t.version?2:4,i=1&~t.flags?1:2,o=e.getUint32(t.entryCountOffset),a=t.entryCountOffset+4,u=0;u<o&&a+r+1<=t.end;u++){var f=2===r?e.getUint16(a):e.getUint32(a),s=e.getUint8(a+r);if(a+=r+1,f===n)return ut(e,a,Math.min(s,Math.floor((t.end-a)/i)),i);a+=s*i}}function ut(e,t,n,r){for(var i=2===r?32767:127,o=[],a=0;a<n;a++){var u=t+a*r,f=2===r?e.getUint16(u):e.getUint8(u);o.push(f&i)}return o}function ft(e,t,n){for(var r=0;r<e.length;r++){var i=t[e[r]-1];if(void 0!==i&&i.type===n)return i}}function st(e,t,n,r){var i=[];return gt(e,t,n,r,function(e){i.push(void 0!==e.type?e:Je)}),i}function ct(e,t){var n=i(e,t,4);if("prof"===n||"rICC"===n)return{offset:t+4,length:e.getUint32(t+4),chunkNumber:1,chunksTotal:1}}function dt(e,t,n,r){return Math.min(t+n,r,e.byteLength)}function lt(e){return{type:void 0,length:e}}function pt(e,t,n,r){var i=[We,Ke],o=[];return gt(e,t,n,r,function(e){void 0===e.type||void 0!==e.itemType&&-1===i.indexOf(e.itemType)||o.push(e)}),o}function gt(e,t,n,r,i){for(var o=Math.min(t+n,r),a=t;a+8<=o;){var u=qe(e,a,o);if(void 0===u)break;i(u),a+=u.length}}function ht(e,t,n){var r=Math.min(n,t+65536),i=function(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.byteLength,r=Math.min(n,e.byteLength),i=[],o=0;t+o<r;){var a=e.getUint8(t+o);if(0===a)break;i.push(a),o++}return f(i)}(e,t,r);return{value:i,isTerminated:t+i.length<r}}var mt=12,vt=2,yt=65496,bt=2,St=4,xt=2,At=2,It=10,Pt=18,Tt=33,Ct=79,Et=18,Ot=8,Ut="ICC_PROFILE\0",wt=St+Ut.length,Lt=wt+1,Mt=255,Ft=1024,Rt="MPF\0",Dt=65472,Nt=65474,Gt=65476,kt=65499,_t=65501,Bt=65498,jt=65504,zt=65505,Vt=65506,Ht=65517,Xt=65519,Wt=65534,Kt=65535,Jt="JFIF",qt="Exif",Yt="http://ns.adobe.com/xap/1.0/\0",$t="http://ns.adobe.com/xmp/extension/\0",Zt="Photoshop 3.0",Qt="8BIM";function en(e,t){return e.getUint16(t)===Dt}function tn(e,t){return e.getUint16(t)===Nt}function nn(e,t){var n=Ut.length;return e.getUint16(t)===Vt&&t+Lt<e.byteLength&&i(e,t+St,n)===Ut}function rn(e,t){var n=Rt.length;return e.getUint16(t)===Vt&&i(e,t+St,n)===Rt}function on(e,t){var n=Jt.length;return e.getUint16(t)===jt&&i(e,t+St,n)===Jt&&0===e.getUint8(t+St+n)}function an(e,t){var n=qt.length;return e.getUint16(t)===zt&&i(e,t+St,n)===qt&&0===e.getUint8(t+St+n)}function un(e,t){return e.getUint16(t)===zt&&function(e,t){var n=Yt.length;return i(e,t+St,n)===Yt}(e,t)}function fn(e,t){return e.getUint16(t)===zt&&function(e,t){var n=$t.length;return i(e,t+St,n)===$t}(e,t)}function sn(e,t){return{dataOffset:e+Tt,length:t-(Tt-xt)}}function cn(e,t){return{dataOffset:e+Ct,length:t-(Ct-xt)}}function dn(e,t){var n=Zt.length,r=Qt.length,o=t+St+n+1;return o+r<=e.byteLength&&e.getUint16(t)===Ht&&i(e,t+St,n)===Zt&&0===e.getUint8(t+St+n)&&i(e,o,r)===Qt}function ln(e,t){var n=e.getUint16(t);return n>=jt&&n<=Xt||n===Wt||n===Dt||n===Nt||n===Gt||n===kt||n===_t||n===Bt}function pn(e,t){return e.getUint16(t)===Kt}function gn(e,t,n,r){var i=function(e,t,n){try{if(t+8>n)return;var r=e.getUint16(t+0),i=r===ke.LITTLE_ENDIAN;if(!i&&r!==ke.BIG_ENDIAN)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+a*mt+4)<=n&&a>0}}catch(e){return}}(e,r,t+xt+n);if(!i)return 0;var o=Number.isInteger(i.ifdEntries)?i.ifdEntries:0;return(i.isValid?1e9:0)+1e6*o+n}var hn="‰PNG\r\n\n",mn=4,vn=4,yn=0,bn=mn,Sn=mn+vn,xn="XML:com.adobe.xmp\0",An="tEXt",In="iTXt",Pn="zTXt",Tn="pHYs",Cn="tIME",En="eXIf",On="iCCP",Un=79;function wn(e,t){return"IHDR"===i(e,t+bn,vn)}function Ln(e,t){return i(e,t+bn,vn)===In&&i(e,t+Sn,xn.length)===xn}function Mn(e,t,n){var r=i(e,t+bn,vn);return r===An||r===In||r===Pn&&n}function Fn(e,t){return i(e,t+bn,vn)===En}function Rn(e,t){return i(e,t+bn,vn)===On}function Dn(e,t){var n=[Tn,Cn],r=i(e,t+bn,vn);return n.includes(r)}function Nn(e,t){t+=Sn+xn.length+1+1;for(var n=0;n<2&&t<e.byteLength;)0===e.getUint8(t)&&n++,t++;if(!(n<2))return t}function Gn(e,t,n){var r=Math.min(t+n,e.byteLength),o=function(e,t,n){for(var r=0;r<=Un&&t+r<n;r++)if(0===e.getUint8(t+r))return r}(e,t,r);if(void 0!==o){var a=t+o+1;if(!(a+1>r))return{profileName:i(e,t,o),compressionMethod:e.getUint8(a),compressedProfileOffset:a+1}}}var kn=["heic","heix","hevc","hevx","heim","heis","hevm","hevs","mif1"],_n=["avif"],Bn=[0,0,0,12,74,88,76,32,13,10,135,10],jn=[255,10],zn=1165519206,Vn=2020437024,Hn=1651666786,Xn=1786276963,Wn=1786276976,Kn=4,Jn=4,qn=4;function Yn(e){return!e||e.byteLength<jn.length?0:e.getUint8(0)===jn[0]&&e.getUint8(1)===jn[1]}var $n=6,Zn=["GIF87a","GIF89a"],Qn=13,er=0,tr="<?xpacket begin",nr=["<?xpacket end=","</x:xmpmeta>"];function rr(e,t){for(var n=0;n+t.length<=e.byteLength;n++)if(ir(e,n,t))return 1;return 0}function ir(e,t,n){for(var r=0;r<n.length;r++)if(e.getUint8(t+r)!==n.charCodeAt(r))return 0;return 1}var or={parseAppMarkers:function(e,t,n){var r=n?[]:void 0;if(Oe.USE_TIFF&&function(e){return!!e&&e.byteLength>=4&&function(e){var t=e.getUint16(0)===ke.LITTLE_ENDIAN;return 42===e.getUint16(2,t)}(e)}(e))return ar({hasAppMarkers:1,tiffHeaderOffset:0},"tiff","TIFF",r);if(Oe.USE_JPEG&&function(e){return!!e&&e.byteLength>=vt&&e.getUint16(0)===yt}(e))return ar(function(e,t){for(var n,r,i,o,a,u,f,s,c,d,l=bt,p=0,g=0;l+St+5<=e.byteLength;){var h=void 0;if(e.getUint16(l)===Bt&&(g=1),en(e,l))n=e.getUint16(l+xt),r=l+xt,h="file";else if(tn(e,l))n=e.getUint16(l+xt),i=l+xt,h="file";else if(on(e,l))n=e.getUint16(l+xt),o=l+At,h="jfif";else if(an(e,l)){n=e.getUint16(l+xt),p++;var m=l+It;if(1===p)d={appMarkerPosition:l,fieldLength:n,tiffHeaderOffset:m,score:void 0};else{void 0===d.score&&(d.score=gn(e,d.appMarkerPosition,d.fieldLength,d.tiffHeaderOffset));var y=gn(e,l,n,m);y>d.score&&(d={appMarkerPosition:l,fieldLength:n,tiffHeaderOffset:m,score:y})}a=d.tiffHeaderOffset,h="exif"}else if(un(e,l))f||(f=[]),n=e.getUint16(l+xt),f.length<Ft&&f.push(sn(l,n)),h="xmp";else if(fn(e,l))f||(f=[]),n=e.getUint16(l+xt),f.length<Ft&&f.push(cn(l,n)),h="xmp";else if(dn(e,l))n=e.getUint16(l+xt),u=l+Pt,h="iptc";else if(nn(e,l)){if(n=e.getUint16(l+xt),s||(s=[]),s.length<Mt){var b=l+Et,S=n-(Et-xt),x=e.getUint8(l+wt),A=e.getUint8(l+Lt);s.push({offset:b,length:S,chunkNumber:x,chunksTotal:A})}h="icc"}else if(rn(e,l))n=e.getUint16(l+xt),c=l+Ot,h="mpf";else{if(!ln(e,l)){if(pn(e,l)){l++;continue}break}n=e.getUint16(l+xt)}v(t,h,l,l+xt+n),l+=xt+n}return p>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.")}(p),t&&(!g&&l+xt<=e.byteLength&&e.getUint16(l)===Bt&&(g=1),t.truncated=!g),{hasAppMarkers:l>bt,fileDataOffset:r||i,jfifDataOffset:o,tiffHeaderOffset:a,iptcDataOffset:u,xmpChunks:f,iccChunks:s,mpfDataOffset:c}}(e,r),"jpeg","JPEG",r);if(Oe.USE_PNG&&function(e){return!!e&&i(e,0,hn.length)===hn}(e))return ar(function(e,t,n){for(var r={hasAppMarkers:0},o=hn.length,a=0;o+mn+vn<=e.byteLength;){var u=void 0,f=e.getUint32(o+yn);if(n&&"IEND"===i(e,o+bn,vn)&&(a=1),wn(e,o))r.hasAppMarkers=1,r.pngHeaderOffset=o+Sn,u="file";else if(Ln(e,o)){var s=Nn(e,o);void 0!==s&&(r.hasAppMarkers=1,r.xmpChunks=[{dataOffset:s,length:f-(s-(o+Sn))}],u="xmp")}else if(Mn(e,o,t))r.hasAppMarkers=1,r.pngTextChunks||(r.pngTextChunks=[]),r.pngTextChunks.push(o+yn),u="png";else if(Fn(e,o))r.hasAppMarkers=1,r.tiffHeaderOffset=o+Sn,u="exif";else if(t&&Rn(e,o)){var c=o+Sn,d=Gn(e,c,f);void 0!==d&&(r.hasAppMarkers=1,r.iccChunks||(r.iccChunks=[{offset:d.compressedProfileOffset,length:f-(d.compressedProfileOffset-c),chunkNumber:1,chunksTotal:1,profileName:d.profileName,compressionMethod:d.compressionMethod}]),u="icc")}else Dn(e,o)&&(r.hasAppMarkers=1,r.pngChunkOffsets||(r.pngChunkOffsets=[]),r.pngChunkOffsets.push(o+yn),u="png");var l=f+mn+vn+4;v(n,u,o,o+l),o+=l}return n&&(n.truncated=!a),r}(e,t,r),"png","PNG",r);if(Oe.USE_HEIC&&function(e){return Ye(e,kn)}(e))return ar(function(e,t){return Ze(e,t)}(e,r),"heic","HEIC",r);if(Oe.USE_AVIF&&function(e){return Ye(e,_n)}(e))return ar(function(e,t){return Ze(e,t)}(e,r),"avif","AVIF",r);if(Oe.USE_JXL&&function(e){try{return function(e){if(!e||e.byteLength<Bn.length)return 0;for(var t=0;t<Bn.length;t++)if(e.getUint8(t)!==Bn[t])return 0;return 1}(e)||Yn(e)}catch(e){return 0}}(e))return ar(function(e,t){var n,r,i,o,a,u=0;if(Yn(e))return{hasAppMarkers:1,tiffHeaderOffset:void 0,xmpChunks:void 0,brobExifChunk:void 0,brobXmpChunk:void 0,jxlCodestreamOffset:0};for(;u+8<=e.byteLength;){var f=$e(e,u),s=f.length,c=f.contentOffset;if(s<c-u)break;var d=Math.min(u+s,e.byteLength),l=e.getUint32(u+4),p=void 0;if(l===zn&&(c+qn<=d&&(n=ot(e,c)),p="exif"),l===Vn&&(r=[{dataOffset:c,length:s-(c-u)}],p="xmp"),l===Xn&&void 0===a&&(a=c),l===Wn&&void 0===a&&c+Kn<=d&&!(2147483647&e.getUint32(c))&&(a=c+Kn),l===Hn&&c+Jn<=d){var g=e.getUint32(c),h=c+Jn,m=s-(h-u);g===zn&&(p="exif",void 0!==n||i||(i={dataOffset:h,length:m})),g===Vn&&(p="xmp",r||o||(o={dataOffset:h,length:m}))}v(t,p,u,u+s),u+=s}return{hasAppMarkers:void 0!==n||void 0!==r||void 0!==i||void 0!==o||void 0!==a,tiffHeaderOffset:n,xmpChunks:r,brobExifChunk:i,brobXmpChunk:o,jxlCodestreamOffset:a}}(e,r),"jxl","JPEG XL",r);if(Oe.USE_WEBP&&function(e){return!!e&&"RIFF"===i(e,0,4)&&"WEBP"===i(e,8,4)}(e))return ar(function(e,t){for(var n,r,o,a,u=12,f=0;u+8<e.byteLength;){var s=i(e,u,4),c=e.getUint32(u+4,1),d=void 0;"EXIF"===s?(f=1,n="Exif\0\0"===i(e,u+8,6)?u+8+6:u+8,d="exif"):"XMP "===s?(f=1,r=[{dataOffset:u+8,length:c}],d="xmp"):"ICCP"===s?(f=1,o=[{offset:u+8,length:c,chunkNumber:1,chunksTotal:1}],d="icc"):"VP8X"===s&&(f=1,a=u+8,d="riff");var l=8+(c%2==0?c:c+1);v(t,d,u,u+l),u+=l}return{hasAppMarkers:f,tiffHeaderOffset:n,xmpChunks:r,iccChunks:o,vp8xChunkOffset:a}}(e,r),"webp","WebP",r);if(Oe.USE_GIF&&function(e){return!!e&&Zn.includes(i(e,0,$n))}(e))return ar(function(e,t){return v(t,"gif",0,Qn),{gifHeaderOffset:0}}(0,r),"gif","GIF",r);if(Oe.USE_XMP&&function(e){return!!e&&i(e,er,tr.length)===tr}(e))return ar(function(e,t){var n=[];return n.push({dataOffset:er,length:e.byteLength}),v(t,"xmp",0,e.byteLength),t&&(t.truncated=!function(e){for(var t=0;t<nr.length;t++)if(rr(e,nr[t]))return 1;return 0}(e)),{xmpChunks:n}}(e,r),"xml","XML",r);throw Error("Invalid image format")}};function ar(e,t,n,r){var i=b({},e,{fileType:{value:t,description:n}});return void 0!==r&&(i.metadataBlocks=r,i.metadataTruncated=!!r.truncated),i}var ur="0th",fr="1st",sr="exif",cr="gps",dr="interoperability",lr="canon",pr="pentax",gr={1:1,2:1,3:2,4:4,5:8,6:1,7:1,8:2,9:4,10:8,11:4,12:8,13:4,129:1},hr={BYTE:1,ASCII:2,SHORT:3,LONG:4,RATIONAL:5,SBYTE:6,UNDEFINED:7,SSHORT:8,SLONG:9,SRATIONAL:10,FLOAT:11,DOUBLE:12,IFD:13,UTF8:129},mr={getByteAt:vr,getAsciiAt:function(e,t){return e.getUint8(t)},getShortAt:function(e,t,n){return e.getUint16(t,n===ke.LITTLE_ENDIAN)},getLongAt:yr,getRationalAt:function(e,t,n){return[yr(e,t,n),yr(e,t+4,n)]},getSbyteAt:function(e,t){return e.getInt8(t)},getUndefinedAt:function(e,t){return vr(e,t)},getSshortAt:function(e,t,n){return e.getInt16(t,n===ke.LITTLE_ENDIAN)},getSlongAt:br,getSrationalAt:function(e,t,n){return[br(e,t,n),br(e,t+4,n)]},getFloatAt:function(e,t,n){return e.getFloat32(t,n===ke.LITTLE_ENDIAN)},getDoubleAt:function(e,t,n){return e.getFloat64(t,n===ke.LITTLE_ENDIAN)},getIfdPointerAt:function(e,t,n){return yr(e,t,n)},typeSizes:gr,tagTypes:hr,getTypeSize:function(e){if(void 0===hr[e])throw Error("No such type found.");return gr[hr[e]]}};function vr(e,t){return e.getUint8(t)}function yr(e,t,n){return e.getUint32(t,n===ke.LITTLE_ENDIAN)}function br(e,t,n){return e.getInt32(t,n===ke.LITTLE_ENDIAN)}var Sr={exif:1,iptc:1,photoshop:1,mpf:1,makerNotes:1},xr={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},Ar={exifIfdPointer:"Exif IFD Pointer",gpsInfoIfdPointer:"GPS Info IFD Pointer",interoperabilityIfdPointer:"Interoperability IFD Pointer"},Ir=Tr([[0,31]]),Pr=Tr([[1,2],[4096,4098]]);function Tr(e){for(var t=Object.create(null),n=0;n<e.length;n++)for(var r=e[n][0];r<=e[n][1];r++)t[r]=1;return t}var Cr={thumbnail:["JPEGInterchangeFormat","JPEGInterchangeFormatLength"],iptc:["IPTC-NAA"],xmp:["ApplicationNotes"],icc:["ICC_Profile"],photoshop:["ImageSourceData","PhotoshopSettings"],makerNotes:["MakerNote","Make"],gps:["GPSLatitude","GPSLatitudeRef","GPSLongitude","GPSLongitudeRef","GPSAltitude","GPSAltitudeRef"]},Er={file:["Image Width","Image Height"],exif:["FocalLength","FocalPlaneXResolution","FocalPlaneYResolution","FocalPlaneResolutionUnit","FocalLengthIn35mmFilm","PixelXDimension","PixelYDimension"]};function Or(e){return 1==e?1:Array.isArray(e)&&e.length>0}function Ur(){return{isActive:0,shouldReturnGroup:e,shouldParseGroup:e,shouldReturnTag:e,shouldParseTag:e};function e(){return 1}}var wr=Ur();function Lr(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 Mr(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 Fr(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 Rr(e){return Array.isArray(e)&&0===e.length}function Dr(e){var t=e.groupKey,n=e.includeValue,r=e.excludeValue,i=e.extraIncludeNames,o=!!Sr[t],a={includeAll:0,includeNames:void 0,includeIds:void 0,excludeAll:0,excludeNames:void 0,excludeIds:void 0};if(1==n)a.includeAll=1;else if(Array.isArray(n)){a.includeNames=Object.create(null),o&&(a.includeIds=Object.create(null));for(var u=0;u<n.length;u++)d(a,n[u]);for(var f in i)a.includeNames[f.toLowerCase()]=1}else if(i&&Object.keys(i).length>0)for(var s in a.includeNames=Object.create(null),i)a.includeNames[s.toLowerCase()]=1;if(1==r)return a.excludeAll=1,a;if(Array.isArray(r)){a.excludeNames=Object.create(null),o&&(a.excludeIds=Object.create(null));for(var c=0;c<r.length;c++)l(a,r[c])}return a;function d(e,t){"number"==typeof t&&e.includeIds?e.includeIds[t+""]=1:"string"==typeof t&&(e.includeNames[t.toLowerCase()]=1)}function l(e,t){"number"==typeof t&&e.excludeIds?e.excludeIds[t+""]=1:"string"==typeof t&&(e.excludeNames[t.toLowerCase()]=1)}}function Nr(e,t,n){return e.excludeAll?0:e.includeAll?!Gr(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)?!Gr(e,t,n):0:!Gr(e,t,n)}function Gr(e,t,n){return void 0!==n&&e.excludeIds&&e.excludeIds[n+""]||t&&e.excludeNames&&e.excludeNames[(t+"").toLowerCase()]?1:0}var kr=4,_r=1048576,Br=4,jr=48,zr=1024,Vr=8192,Hr={1:mr.getByteAt,3:mr.getShortAt,4:mr.getLongAt,5:mr.getRationalAt,6:mr.getSbyteAt,7:mr.getUndefinedAt,8:mr.getSshortAt,9:mr.getSlongAt,10:mr.getSrationalAt,11:mr.getFloatAt,12:mr.getDoubleAt,13:mr.getIfdPointerAt};function Xr(e,t,n){var r=t+4;if(!(r+mr.getTypeSize("LONG")>e.byteLength)){var i=mr.getLongAt(e,r,n);if(!(i<8))return t+i}}function Wr(e,t,n,r,i,o){var a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:0,u=arguments.length>7&&void 0!==arguments[7]?arguments[7]:wr,f=arguments.length>8&&void 0!==arguments[8]?arguments[8]:"exif",s=arguments.length>9&&void 0!==arguments[9]?arguments[9]:Jr(e),c=arguments.length>10?arguments[10]:void 0,d=arguments.length>11&&void 0!==arguments[11]?arguments[11]:void 0!==c[fr]&&u.shouldParseGroup("thumbnail"),l=mr.getTypeSize("SHORT"),p=mt,g={},h=function(e,t,n){return t+mr.getTypeSize("SHORT")<=e.byteLength?mr.getShortAt(e,t,n):0}(e,r,i),m=0;r+=l;for(var v=0;v<h;v++){if(r+p>e.byteLength){m=1;break}if(!Kr(s)){m=1;break}var y=Yr(e,t,n,r,i,o,u,f,s,c);void 0!==y&&(g[y.name]={id:y.id,value:y.value,description:y.description},a&&(g[y.name].computed=ti(y.tagType,y.value)),("MakerNote"===y.name||t===pr&&"LevelInfo"===y.name)&&(g[y.name].__offset=y.__offset)),r+=p}if(d&&!m&&r+mr.getTypeSize("LONG")<=e.byteLength){var b=mr.getLongAt(e,r,i);b>=8&&t===ur&&(g.Thumbnail=Wr(e,fr,n,n+b,i,o,a,u,"thumbnail",s,c))}return g}function Kr(e){return e.ifdEntriesRemaining>0?(e.ifdEntriesRemaining--,1):0}function Jr(e){return{remaining:e.byteLength*kr,ifdEntriesRemaining:Math.floor(e.byteLength/mt)*Br,decompressedAllowanceRemaining:_r,iptcDatasetsRemaining:zr+Math.floor(e.byteLength/jr),decompressedIptcAllowanceRemaining:Vr}}function qr(e,t){if(void 0!==e){var n=Math.min(t*kr,e.decompressedAllowanceRemaining);e.remaining+=n,e.decompressedAllowanceRemaining-=n}}function Yr(e,t,n,r,i){var o,a,u,f=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,c=arguments.length>6&&void 0!==arguments[6]?arguments[6]:wr,d=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"exif",l=arguments.length>8?arguments[8]:void 0,g=arguments.length>9?arguments[9]:void 0,h=mr.getTypeSize("SHORT"),m=h+mr.getTypeSize("SHORT"),v=m+mr.getTypeSize("LONG"),y=mr.getShortAt(e,r,i),b=mr.getShortAt(e,r+h,i),S=mr.getLongAt(e,r+m,i);if(void 0!==mr.typeSizes[b]&&(f||void 0!==g[t][y])){var x=function(e,t,n){if(void 0!==n[e][t]){if("string"==typeof n[e][t])return n[e][t];if(n[e][t].name)return n[e][t].name}return"undefined-".concat(t)}(t,y,g);if(c.shouldParseTag(d,x,y)){if(function(e,t){return mr.typeSizes[e]*t<=mr.getTypeSize("LONG")}(b,S))o=$r(e,n+(a=r+v-n),b,S,i);else if(function(e,t,n,r,i){return t+n+mr.typeSizes[r]*i<=e.byteLength}(e,n,a=mr.getLongAt(e,r+v,i),b,S)){var A=33723===y,I=function(e,t,n){var r=Math.min(n,Math.floor(e/mr.typeSizes[t]));return 1===r&&n>1?0:r}(l.remaining,b,S);l.remaining-=I*mr.typeSizes[b],u=l,o=$r(e,n+a,b,I,i,A)}else o="<faulty value>";Zr(b)&&(o=function(e,t){return e instanceof Uint8Array?function(e,t){for(var n=[],r=[],i=0,o=0,a=0,u=0;u<=e.length;u++)if(u===e.length||0===e[u]){if(u>a){if(i&&!Qr(t))break;n[o]=p(s(e,a,u,r)),i=1}o++,a=u+1}return n}(e,t):"string"==typeof e?[e]:e.length>0?[p(e.join(""))]:[]}(o,u));var P=o;if(void 0!==g[t][y])if(void 0!==g[t][y].name&&void 0!==g[t][y].description)try{P=g[t][y].description(o)}catch(e){P=ei(o)}else P=b===mr.tagTypes.RATIONAL||b===mr.tagTypes.SRATIONAL?""+o[0]/o[1]:ei(o);return{id:y,name:x,value:o,description:P,tagType:b,__offset:a}}}}function $r(e,t,n,r,i){var o=[];if((arguments.length>5&&void 0!==arguments[5]?arguments[5]:0)&&(r*=mr.typeSizes[n],n=mr.tagTypes.BYTE),Zr(n))return function(e,t,n){for(var r=new Uint8Array(n),i=0;i<n;i++)r[i]=mr.getAsciiAt(e,t+i);return r}(e,t,r);for(var a=0;a<r;a++)o.push(Hr[n](e,t,i)),t+=mr.typeSizes[n];return 1===o.length?o[0]:o}function Zr(e){return e===mr.tagTypes.ASCII||e===mr.tagTypes.UTF8}function Qr(e){return void 0===e?1:e.remaining<2?0:(e.remaining-=2,1)}function ei(e){return e instanceof Array?e.join(", "):e}function ti(e,t){return Zr(e)?Array.isArray(t)&&1===t.length?t[0]:t:e===mr.tagTypes.RATIONAL||e===mr.tagTypes.SRATIONAL?function(e){return Array.isArray(e)&&2===e.length?"number"==typeof e[0]&&"number"==typeof e[1]:0}(t)?ni(t):Array.isArray(t)?t.map(function(e){return ni(e)}):t:t}function ni(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}function ri(e,t,n,r){var i=e.Thumbnail;if(i&&(delete e.Thumbnail,r)){var o=r(t,i,n);return o.image?o:void 0}}var ii=[{pointerKey:"Exif IFD Pointer",ifdType:sr},{pointerKey:"GPS Info IFD Pointer",ifdType:cr},{pointerKey:"Interoperability IFD Pointer",ifdType:dr}],oi={read:function(e,t,n){for(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=arguments.length>5&&void 0!==arguments[5]?arguments[5]:Jr(e),a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:void 0,u=arguments.length>7&&void 0!==arguments[7]?arguments[7]:void 0,f=ke.getByteOrder(e,t),s=function(e,t,n,r,i,o,a,u,f){var s=Xr(e,t,n);return void 0===s?{}:Wr(e,ur,t,s,n,r,i,o,"exif",a,u,f)}(e,t,f,n,r,i,o,a,u),c=0;c<ii.length;c++)s=ai(ii[c],s,e,t,f,n,r,i,o,a);return{tags:s,byteOrder:f}}};function ai(e,t,n,r,i,o,a,u,f,s){var c,d=t[e.pointerKey];return void 0===d?t:"number"==typeof(c=d.value)&&c>=8&&c%1==0?b(t,Wr(n,e.ifdType,r,r+d.value,i,o,a,u,"exif",f,s)):t}var ui={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 d(e,fi,"")},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:si,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])}};function fi(e){return 1===e?"Y":2===e?"Cb":3===e?"Cr":4===e?"R":5===e?"G":6===e?"B":void 0}function si(e){return 0===e?"Unknown":e+" mm"}var ci={11:"ProcessingSoftware",254:{name:"SubfileType",description:function(e){return Re({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)}},255:{name:"OldSubfileType",description:function(e){return Re({0:"Full-resolution image",1:"Reduced-resolution image",2:"Single page of multi-page image"},e)}},256:"ImageWidth",257:"ImageLength",258:"BitsPerSample",259:"Compression",262:"PhotometricInterpretation",263:{name:"Thresholding",description:function(e){return Re({1:"No dithering or halftoning",2:"Ordered dither or halfton",3:"Randomized dither"},e)}},264:"CellWidth",265:"CellLength",266:{name:"FillOrder",description:function(e){return Re({1:"Normal",2:"Reversed"},e)}},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:ui.XResolution},283:{name:"YResolution",description:ui.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 Re({1:"0.1",2:"0.001",3:"0.0001",4:"1e-05",5:"1e-06"},e)}},296:{name:"ResolutionUnit",description:ui.ResolutionUnit},297:"PageNumber",301:"TransferFunction",305:"Software",306:"DateTime",315:"Artist",316:"HostComputer",317:"Predictor",318:{name:"WhitePoint",description:function(e){return d(e,di,", ")}},319:{name:"PrimaryChromaticities",description:function(e){return d(e,di,", ")}},321:"HalftoneHints",322:"TileWidth",323:"TileLength",330:"A100DataOffset",332:{name:"InkSet",description:function(e){return Re({1:"CMYK",2:"Not CMYK"},e)}},337:"TargetPrinter",338:{name:"ExtraSamples",description:function(e){return Re({0:"Unspecified",1:"Associated Alpha",2:"Unassociated Alpha"},e)}},339:{name:"SampleFormat",description:function(e){return Array.isArray(e)?e.map(li).join(", "):li(e)}},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:pi},40092:{name:"XPComment",description:pi},40093:{name:"XPAuthor",description:pi},40094:{name:"XPKeywords",description:pi},40095:{name:"XPSubject",description:pi},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 Re({0:"Unsafe",1:"Safe"},e)}},50778:{name:"CalibrationIlluminant1",description:ui.LightSource},50779:{name:"CalibrationIlluminant2",description:ui.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 Re({0:"Allow Copying",1:"Embed if Used",2:"Never Embed",3:"No Restrictions"},e)}},50942:"ProfileCopyright",50964:"ForwardMatrix1",50965:"ForwardMatrix2",50966:"PreviewApplicationName",50967:"PreviewApplicationVersion",50968:"PreviewSettingsName",50969:"PreviewSettingsDigest",50970:{name:"PreviewColorSpace",description:function(e){return Re({1:"Gray Gamma 2.2",2:"sRGB",3:"Adobe RGB",4:"ProPhoto RGB"},e)}},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 Re({0:"Linear",1:"sRGB"},e)}},51108:{name:"ProfileLookTableEncoding",description:function(e){return Re({0:"Linear",1:"sRGB"},e)}},51109:"BaselineExposureOffset",51110:{name:"DefaultBlackRender",description:function(e){return Re({0:"Auto",1:"None"},e)}},51111:"NewRawImageDigest",51112:"RawToPreviewGain"};function di(e){if(!Array.isArray(e))throw new TypeError("Expected a rational.");return"".concat(e[0],"/").concat(e[1])}function li(e){return Re({1:"Unsigned",2:"Signed",3:"Float",4:"Undefined",5:"Complex int",6:"Complex float"},e)}function pi(e){return Array.isArray(e)?Le(e)?Me(e):function(e){for(var t=e.length;t>0&&0===e.charCodeAt(t-1);)t--;return e.slice(0,t)}(new TextDecoder("utf-16").decode(new Uint8Array(e))):""}function gi(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 hi={33434:{name:"ExposureTime",description:ui.ExposureTime},33437:{name:"FNumber",description:ui.FNumber},34850:{name:"ExposureProgram",description:ui.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 Re({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)}},34865:"StandardOutputSensitivity",34866:"RecommendedExposureIndex",34867:"ISOSpeed",34868:"ISOSpeedLatitudeyyy",34869:"ISOSpeedLatitudezzz",36864:{name:"ExifVersion",description:we},36867:"DateTimeOriginal",36868:"DateTimeDigitized",36873:"GooglePlusUploadCode",36880:"OffsetTime",36881:"OffsetTimeOriginal",36882:"OffsetTimeDigitized",37121:{name:"ComponentsConfiguration",description:ui.ComponentsConfiguration},37122:"CompressedBitsPerPixel",37377:{name:"ShutterSpeedValue",description:ui.ShutterSpeedValue},37378:{name:"ApertureValue",description:ui.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:ui.MeteringMode},37384:{name:"LightSource",description:ui.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:ui.FocalLength},37393:"ImageNumber",37394:{name:"SecurityClassification",description:function(e){return Re({C:"Confidential",R:"Restricted",S:"Secret",T:"Top Secret",U:"Unclassified"},e)}},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:Ue},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:we},40961:{name:"ColorSpace",description:ui.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:ui.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 gi(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)?gi(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:ui.CustomRendered},41986:{name:"ExposureMode",description:ui.ExposureMode},41987:{name:"WhiteBalance",description:ui.WhiteBalance},41988:{name:"DigitalZoomRatio",description:function(e){return 0===e[0]?"Digital zoom was not used":""+e[0]/e[1]}},41989:{name:"FocalLengthIn35mmFilm",description:ui.FocalLengthIn35mmFilm},41990:{name:"SceneCaptureType",description:ui.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:ui.Contrast},41993:{name:"Saturation",description:ui.Saturation},41994:{name:"Sharpness",description:ui.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){return"".concat((n=e[0],r=e[1],i=mi(n),o=mi(r),0===o||o===i?"".concat(i):"".concat(i,"-").concat(o))," mm f/").concat(0===(t=[e[2],e[3]].filter(vi).map(mi)).length?"?":1===t.length||0===t[1]||t[1]===t[0]?"".concat(t[0]):"".concat(t[0],"-").concat(t[1]));var t,n,r,i,o}},42035:"LensMake",42036:"LensModel",42037:"LensSerialNumber",42080:{name:"CompositeImage",description:function(e){return Re({1:"Not a Composite Image",2:"General Composite Image",3:"Composite Image Captured While Shooting"},e)}},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"};function mi(e){return parseFloat((e[0]/e[1]).toFixed(5))}function vi(e){return 0!==e[1]}function yi(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 bi={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:De},3:{name:"GPSLongitudeRef",description:function(e){var t=e.join("");return"E"===t?"East longitude":"W"===t?"West longitude":"Unknown"}},4:{name:"GPSLongitude",description:De},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 yi(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)?yi(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:Ue},28:{name:"GPSAreaInformation",description:Ue},29:"GPSDateStamp",30:{name:"GPSDifferential",description:function(e){return 0===e?"Measurement without differential correction":1===e?"Differential correction applied":"Unknown"}},31:"GPSHPositioningError"},Si={1:"InteroperabilityIndex",2:{name:"InteroperabilityVersion",description:we},4096:"RelatedImageFileFormat",4097:"RelatedImageWidth",4098:"RelatedImageHeight"},xi={45056:{name:"MPFVersion",description:we},45057:"NumberOfImages",45058:"MPEntry",45059:"ImageUIDList",45060:"TotalFrames"},Ai={read:function(e,t,n){var r,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:void 0;try{var u=ke.getByteOrder(e,t),f=Xr(e,t,u);return void 0===f?{}:function(e,t,n,r){if(!n.MPEntry)return n;for(var i=e.byteLength,o=e.byteOffset,a=i*Pi,u=[],f=Math.min(Math.ceil(n.MPEntry.value.length/Ii),Ti),s=0;s<f;s++){u[s]={};var c=Ci(n.MPEntry.value,s*Ii,mr.getTypeSize("LONG"),r);u[s].ImageFlags=Ei(c),u[s].ImageFormat=Oi(c),u[s].ImageType=Ui(c);var d=Ci(n.MPEntry.value,s*Ii+4,mr.getTypeSize("LONG"),r);u[s].ImageSize={value:d,description:""+d};var l=wi(s,n.MPEntry,r,t);u[s].ImageOffset={value:l,description:""+l};var p=Ci(n.MPEntry.value,s*Ii+12,mr.getTypeSize("SHORT"),r);u[s].DependentImage1EntryNumber={value:p,description:""+p};var g=Ci(n.MPEntry.value,s*Ii+14,mr.getTypeSize("SHORT"),r);u[s].DependentImage2EntryNumber={value:g,description:""+g};var h=Math.min(Math.max(l,0),i),m=Math.min(h+Math.max(d,0),i,h+a);u[s].image=e.buffer.slice(o+h,o+m),a-=m-h,A(u[s],"base64",function(){return I(this.image)})}return n.Images=u,n}(e,t,Wr(e,"mpf",t,f,u,n,i,o,"mpf",a,((r={}).mpf=xi,r)),u)}catch(e){return{}}}},Ii=16,Pi=8,Ti=256;function Ci(e,t,n,r){if(r===ke.LITTLE_ENDIAN){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 Ei(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 Oi(e){var t=e>>24&7;return{value:t,description:0===t?"JPEG":"Unknown"}}function Ui(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 wi(e,t,n,r){return function(e){return 0===e}(e)?0:Ci(t.value,e*Ii+8,mr.getTypeSize("LONG"),n)+r}var Li={read:function(e,t){var n=function(e,t){return Math.min(mr.getShortAt(e,t),e.byteLength-t)}(e,t),r=function(e,t,n){if(!(8>n)){var r=mr.getByteAt(e,t+7);return{value:r,description:""+r}}}(e,t,n);return{"Bits Per Sample":Mi(e,t,n),"Image Height":Fi(e,t,n),"Image Width":Ri(e,t,n),"Color Components":r,Subsampling:r&&Di(e,t,r.value,n)}}};function Mi(e,t,n){if(!(3>n)){var r=mr.getByteAt(e,t+2);return{value:r,description:""+r}}}function Fi(e,t,n){if(!(5>n)){var r=mr.getShortAt(e,t+3);return{value:r,description:"".concat(r,"px")}}}function Ri(e,t,n){if(!(7>n)){var r=mr.getShortAt(e,t+5);return{value:r,description:"".concat(r,"px")}}}function Di(e,t,n,r){if(!(8+3*n>r)){for(var i=[],o=0;o<n;o++){var a=t+8+3*o;i.push([mr.getByteAt(e,a),mr.getByteAt(e,a+1),mr.getByteAt(e,a+2)])}return{value:i,description:i.length>1?Ni(i)+Gi(i):""}}}function Ni(e){var t={1:"Y",2:"Cb",3:"Cr",4:"I",5:"Q"};return e.map(function(e){return t[e[0]]}).join("")}function Gi(e){var t={17:"4:4:4 (1 1)",18:"4:4:0 (1 2)",20:"4:4:1 (1 4)",33:"4:2:2 (2 1)",34:"4:2:0 (2 2)",36:"4:2:1 (2 4)",65:"4:1:1 (4 1)",66:"4:1:0 (4 2)"};return 0===e.length||void 0===e[0][1]||void 0===t[e[0][1]]?"":t[e[0][1]]}var ki={read:function(e,t){var n={};try{var r=function(e,t){var n=t,r=0;return{readBits:function(t){for(var i=0,o=0;o<t;o++){if(n>=e.byteLength)throw Error("Unexpected end of data");i|=(e.getUint8(n)>>r&1)<<o,++r>=8&&(r=0,n++)}return i}}}(e,t+_i),i=function(e){var t,n;if(e.readBits(1)){t=8*(e.readBits(5)+1);var r=e.readBits(3);n=0===r?8*(e.readBits(5)+1):Math.ceil(t*ji[r])}else{t=zi(e);var i=e.readBits(3);n=0===i?zi(e):Math.ceil(t*ji[i])}return{height:t,width:n}}(r),o=i.height,a=i.width;n["Image Height"]={value:o,description:"".concat(o,"px")},n["Image Width"]={value:a,description:"".concat(a,"px")}}catch(e){}return n}},_i=2,Bi=[9,13,18,30],ji=[0,1,1.2,4/3,1.5,16/9,5/4,2];function zi(e){var t=e.readBits(2);return 1+e.readBits(Bi[t])}var Vi={read:function(e,t,n){var r={};return void 0!==t&&b(r,function(e,t){if(!_e(e,t,Hi))return{};var n=e.getUint32(t),r=e.getUint32(t+Xi);return{"Image Width":{value:n,description:"".concat(n,"px")},"Image Height":{value:r,description:"".concat(r,"px")}}}(e,t)),void 0!==n&&b(r,function(e,t){if(!_e(e,t,Wi))return{};var n=e.getUint8(t),r=t+Wi;if(!_e(e,r,n))return{};var i={"Color Components":{value:n,description:"".concat(n)}},o=function(e,t,n){if(0!==n){for(var r=e.getUint8(t),i=1;i<n;i++)if(e.getUint8(t+i)!==r)return;return r}}(e,r,n);return void 0!==o&&(i["Bits Per Sample"]={value:o,description:"".concat(o)}),i}(e,n)),r}},Hi=8,Xi=4,Wi=1,Ki={read:function(e,t){var n=function(e,t){return Math.min(mr.getShortAt(e,t),e.byteLength-t)}(e,t),r=function(e,t,n){if(!(15>n)){var r=mr.getByteAt(e,t+14);return{value:r,description:"".concat(r,"px")}}}(e,t,n),i=function(e,t,n){if(!(16>n)){var r=mr.getByteAt(e,t+15);return{value:r,description:"".concat(r,"px")}}}(e,t,n),o={"JFIF Version":Ji(e,t,n),"Resolution Unit":qi(e,t,n),XResolution:$i(e,t,n),YResolution:Zi(e,t,n),"JFIF Thumbnail Width":r,"JFIF Thumbnail Height":i};if(void 0!==r&&void 0!==i){var a=function(e,t,n,r){if(!(0===n||16+n>r)){var i=e.byteOffset;return{value:e.buffer.slice(i+t+16,i+t+16+n),description:"<24-bit RGB pixel data>"}}}(e,t,3*r.value*i.value,n);a&&(o["JFIF Thumbnail"]=a)}for(var u in o)void 0===o[u]&&delete o[u];return o}};function Ji(e,t,n){if(!(9>n)){var r=mr.getByteAt(e,t+7),i=mr.getByteAt(e,t+7+1);return{value:256*r+i,description:r+"."+i}}}function qi(e,t,n){if(!(10>n)){var r=mr.getByteAt(e,t+9);return{value:r,description:Yi(r)}}}function Yi(e){return 0===e?"None":1===e?"inches":2===e?"cm":"Unknown"}function $i(e,t,n){if(!(12>n)){var r=mr.getShortAt(e,t+10);return{value:r,description:""+r}}}function Zi(e,t,n){if(!(14>n)){var r=mr.getShortAt(e,t+12);return{value:r,description:""+r}}}var Qi={iptc:{256:{name:"Model Version",description:function(e){return""+((e[0]<<8)+e[1])}},261:{name:"Destination",repeatable:1},276:{name:"File Format",description:function(e){return""+((e[0]<<8)+e[1])}},278:{name:"File Format Version",description:function(e){return""+((e[0]<<8)+e[1])}},286:"Service Identifier",296:"Envelope Number",306:"Product ID",316:"Envelope Priority",326:{name:"Date Sent",description:eo},336:{name:"Time Sent",description:to},346:{name:"Coded Character Set",description:no,encoding_name:no},356:"UNO",376:{name:"ARM Identifier",description:function(e){return""+((e[0]<<8)+e[1])}},378:{name:"ARM Version",description:function(e){return""+((e[0]<<8)+e[1])}},512:{name:"Record Version",description:function(e){return""+((e[0]<<8)+e[1])}},515:"Object Type Reference",516:"Object Attribute Reference",517:"Object Name",519:"Edit Status",520:{name:"Editorial Update",description:function(e){return"01"===f(e)?"Additional Language":"Unknown"}},522:"Urgency",524:{name:"Subject Reference",repeatable:1,description:function(e){var t=f(e).split(":");return t[2]+(t[3]?"/"+t[3]:"")+(t[4]?"/"+t[4]:"")}},527:"Category",532:{name:"Supplemental Category",repeatable:1},534:"Fixture Identifier",537:{name:"Keywords",repeatable:1},538:{name:"Content Location Code",repeatable:1},539:{name:"Content Location Name",repeatable:1},542:"Release Date",547:"Release Time",549:"Expiration Date",550:"Expiration Time",552:"Special Instructions",554:{name:"Action Advised",description:function(e){var t=f(e);return"01"===t?"Object Kill":"02"===t?"Object Replace":"03"===t?"Object Append":"04"===t?"Object Reference":"Unknown"}},557:{name:"Reference Service",repeatable:1},559:{name:"Reference Date",repeatable:1},562:{name:"Reference Number",repeatable:1},567:{name:"Date Created",description:eo},572:{name:"Time Created",description:to},574:{name:"Digital Creation Date",description:eo},575:{name:"Digital Creation Time",description:to},577:"Originating Program",582:"Program Version",587:{name:"Object Cycle",description:function(e){var t=f(e);return"a"===t?"morning":"p"===t?"evening":"b"===t?"both":"Unknown"}},592:{name:"By-line",repeatable:1},597:{name:"By-line Title",repeatable:1},602:"City",604:"Sub-location",607:"Province/State",612:"Country/Primary Location Code",613:"Country/Primary Location Name",615:"Original Transmission Reference",617:"Headline",622:"Credit",627:"Source",628:"Copyright Notice",630:{name:"Contact",repeatable:1},632:"Caption/Abstract",634:{name:"Writer/Editor",repeatable:1},637:{name:"Rasterized Caption",description:function(e){return e}},642:"Image Type",643:{name:"Image Orientation",description:function(e){var t=f(e);return"P"===t?"Portrait":"L"===t?"Landscape":"S"===t?"Square":"Unknown"}},647:"Language Identifier",662:{name:"Audio Type",description:function(e){var t=f(e),n=t.charAt(0),r=t.charAt(1),i="";return"1"===n?i+="Mono":"2"===n&&(i+="Stereo"),"A"===r?i+=", actuality":"C"===r?i+=", question and answer session":"M"===r?i+=", music, transmitted by itself":"Q"===r?i+=", response to a question":"R"===r?i+=", raw sound":"S"===r?i+=", scener":"V"===r?i+=", voicer":"W"===r&&(i+=", wrap"),""!==i?i:t}},663:{name:"Audio Sampling Rate",description:function(e){return parseInt(f(e),10)+" Hz"}},664:{name:"Audio Sampling Resolution",description:function(e){var t=parseInt(f(e),10);return t+(1===t?" bit":" bits")}},665:{name:"Audio Duration",description:function(e){var t=f(e);return t.length>=6?t.substr(0,2)+":"+t.substr(2,2)+":"+t.substr(4,2):t}},666:"Audio Outcue",698:"Short Document ID",699:"Unique Document ID",700:"Owner ID",712:{name:function(e){return 2===e.length?"ObjectData Preview File Format":"Record 2 destination"},description:function(e){if(2===e.length){var t=ro(e);return 0===t?"No ObjectData":1===t?"IPTC-NAA Digital Newsphoto Parameter Record":2===t?"IPTC7901 Recommended Message Format":3===t?"Tagged Image File Format (Adobe/Aldus Image data)":4===t?"Illustrator (Adobe Graphics data)":5===t?"AppleSingle (Apple Computer Inc)":6===t?"NAA 89-3 (ANPA 1312)":7===t?"MacBinary II":8===t?"IPTC Unstructured Character Oriented File Format (UCOFF)":9===t?"United Press International ANPA 1312 variant":10===t?"United Press International Down-Load Message":11===t?"JPEG File Interchange (JFIF)":12===t?"Photo-CD Image-Pac (Eastman Kodak)":13===t?"Microsoft Bit Mapped Graphics File [*.BMP]":14===t?"Digital Audio File [*.WAV] (Microsoft & Creative Labs)":15===t?"Audio plus Moving Video [*.AVI] (Microsoft)":16===t?"PC DOS/Windows Executable Files [*.COM][*.EXE]":17===t?"Compressed Binary File [*.ZIP] (PKWare Inc)":18===t?"Audio Interchange File Format AIFF (Apple Computer Inc)":19===t?"RIFF Wave (Microsoft Corporation)":20===t?"Freehand (Macromedia/Aldus)":21===t?'Hypertext Markup Language "HTML" (The Internet Society)':22===t?"MPEG 2 Audio Layer 2 (Musicom), ISO/IEC":23===t?"MPEG 2 Audio Layer 3, ISO/IEC":24===t?"Portable Document File (*.PDF) Adobe":25===t?"News Industry Text Format (NITF)":26===t?"Tape Archive (*.TAR)":27===t?"Tidningarnas Telegrambyrå NITF version (TTNITF DTD)":28===t?"Ritzaus Bureau NITF version (RBNITF DTD)":29===t?"Corel Draw [*.CDR]":"Unknown format ".concat(t)}return f(e)}},713:{name:"ObjectData Preview File Format Version",description:function(e,t){var n={0:{0:"1"},1:{1:"1",2:"2",3:"3",4:"4"},2:{4:"4"},3:{1:"5.0",2:"6.0"},4:{1:"1.40"},5:{1:"2"},6:{1:"1"},11:{1:"1.02"},20:{1:"3.1",2:"4.0",3:"5.0",4:"5.5"},21:{2:"2.0"}},r=ro(e);if(t["ObjectData Preview File Format"]){var i=ro(t["ObjectData Preview File Format"].value);if(Object.prototype.hasOwnProperty.call(n,i)&&Object.prototype.hasOwnProperty.call(n[i],r))return n[i][r]}var o=io(e);return null===o?f(e):o+""}},714:"ObjectData Preview Data",1802:{name:"Size Mode",description:function(e){return e[0].toString()}},1812:{name:"Max Subfile Size",description:function(e){for(var t=0,n=0;n<e.length;n++)t=(t<<8)+e[n];return t.toString()}},1882:{name:"ObjectData Size Announced",description:function(e){for(var t=0,n=0;n<e.length;n++)t=(t<<8)+e[n];return t.toString()}},1887:{name:"Maximum ObjectData Size",description:function(e){for(var t=0,n=0;n<e.length;n++)t=(t<<8)+e[n];return t.toString()}}}};function eo(e){var t=f(e);return t.length>=8?t.substr(0,4)+"-"+t.substr(4,2)+"-"+t.substr(6,2):t}function to(e){var t=f(e),n=t;return t.length>=6&&(n=t.substr(0,2)+":"+t.substr(2,2)+":"+t.substr(4,2),11===t.length&&(n+=t.substr(6,1)+t.substr(7,2)+":"+t.substr(9,2))),n}function no(e){var t=f(e);return"%G"===t?"UTF-8":"%5"===t?"Windows-1252":"%/G"===t?"UTF-8 Level 1":"%/H"===t?"UTF-8 Level 2":"%/I"===t?"UTF-8 Level 3":"/A"===t?"ISO-8859-1":"/B"===t?"ISO-8859-2":"/C"===t?"ISO-8859-3":"/D"===t?"ISO-8859-4":"/@"===t?"ISO-8859-5":"/G"===t?"ISO-8859-6":"/F"===t?"ISO-8859-7":"/H"===t?"ISO-8859-8":"Unknown"}function ro(e){var t=io(e);return null===t?parseInt(f(e),10):t}function io(e){return 2!==e.length||oo(e[0])&&oo(e[1])?null:(e[0]<<8)+e[1]}function oo(e){return e>=48&&e<=57}var ao=function(){if("undefined"!=typeof TextDecoder)return TextDecoder},uo={128:8364,130:8218,131:402,132:8222,133:8230,134:8224,135:8225,136:710,137:8240,138:352,139:8249,140:338,142:381,145:8216,146:8217,147:8220,148:8221,149:8226,150:8211,151:8212,152:732,153:8482,154:353,155:8250,156:339,158:382,159:376},fo=function(e,t){if("string"==typeof t)return p(t);var n=ao();if("undefined"!=typeof n&&void 0!==e)try{return new n(e).decode(t instanceof DataView?t.buffer:Uint8Array.from(t))}catch(e){}var r=g(s(t));return void 0!==r?r:function(e){for(var t=e instanceof DataView,n=t?e.byteLength:e.length,r=t?function(t){return e.getUint8(t)}:function(t){return e[t]},i=Array(n),o=0;o<n;o++){var a=r(o),u=uo[a];i[o]=void 0!==u?u:a}return s(i)}(t)},so={read:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:wr,i=arguments.length>4?arguments[4]:void 0;try{if(Array.isArray(e)){var o=new DataView(Uint8Array.from(e).buffer);return go(o,{size:e.length},0,n,r,i||Jr(o))}var a=function(e,t){for(;t+12<=e.byteLength;){var n=co(e,t);if(lo(n))return{naaBlock:n,dataOffset:t+n.headerSize};t+=n.headerSize+n.size+po(n)}throw Error("No IPTC NAA resource block.")}(e,t);return go(e,a.naaBlock,a.dataOffset,n,r,i||Jr(e))}catch(e){return{}}}};function co(e,t){if(943868237!==e.getUint32(t,0))throw Error("Not an IPTC resource block.");var n=e.getUint8(t+4+2),r=(n%2==0?n+1:n)+1;return{headerSize:6+r+4,type:e.getUint16(t+4),size:e.getUint32(t+4+2+r)}}function lo(e){return 1028===e.type}function po(e){return e.size%2!=0?1:0}function go(e,t,n,r,i,o){for(var a={},u=void 0,f=n+t.size;n<f&&n<e.byteLength;){var s=ho(e,n,a,u,r,i,o),c=s.tag,d=s.tagSize;if(null===c)break;c&&("encoding"in c&&(u=c.encoding),void 0===a[c.name]||void 0===c.repeatable?a[c.name]={id:c.id,value:c.value,description:c.description}:(a[c.name]instanceof Array||(a[c.name]=[{id:a[c.name].id,value:a[c.name].value,description:a[c.name].description}]),a[c.name].push({id:c.id,value:c.value,description:c.description}))),n+=5+d}return a}function ho(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:void 0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:wr,a=arguments.length>6?arguments[6]:void 0;if(function(e,t){return 28!==e.getUint8(t)}(e,t)||function(e,t){return t+5>e.byteLength}(e,t))return{tag:null,tagSize:0};var u=e.getUint16(t+1),f=e.getUint16(t+3);if(function(e,t,n){return t+5+n>e.byteLength}(e,t,f)||!function(e,t){var n=Math.ceil((5+t)/jr);return e.iptcDatasetsRemaining>=n?(e.iptcDatasetsRemaining-=n,1):0}(a,f))return{tag:null,tagSize:0};if(!i&&!Qi.iptc[u])return{tag:void 0,tagSize:f};if(!o.shouldParseTag("iptc",function(e,t){var n=Qi.iptc[e];return n?"string"==typeof n?n:n&&"string"==typeof n.name?n.name:void 0:t?"undefined-".concat(e):void 0}(u,i),u))return{tag:void 0,tagSize:f};var s=function(e,t,n){for(var r=[],i=0;i<n;i++)r.push(e.getUint8(t+i));return r}(e,t+5,f),c={id:u,name:mo(Qi.iptc[u],u,s),value:s,description:vo(Qi.iptc[u],s,n,r)};return function(e){return Qi.iptc[e]&&Qi.iptc[e].repeatable}(u)&&(c.repeatable=1),function(e){return Qi.iptc[e]&&void 0!==Qi.iptc[e].encoding_name}(u)&&(c.encoding=Qi.iptc[u].encoding_name(s)),{tag:c,tagSize:f}}function mo(e,t,n){return e?function(e){return"string"==typeof e}(e)?e:function(e){return"function"==typeof e.name}(e)?e.name(n):e.name:"undefined-".concat(t)}function vo(e,t,n,r){if(function(e){return e&&void 0!==e.description}(e))try{return e.description(t,n)}catch(e){}return function(e,t){return e&&t instanceof Array}(e,t)?fo(r,t):t}function yo(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 bo={"tiff:Orientation":function(e){return"1"===e?"Horizontal (normal)":"2"===e?"Mirror horizontal":"3"===e?"Rotate 180":"4"===e?"Mirror vertical":"5"===e?"Mirror horizontal and rotate 270 CW":"6"===e?"Rotate 90 CW":"7"===e?"Mirror horizontal and rotate 90 CW":"8"===e?"Rotate 270 CW":e},"tiff:ResolutionUnit":function(e){return ui.ResolutionUnit(parseInt(e,10))},"tiff:XResolution":function(e){return So(ui.XResolution,e)},"tiff:YResolution":function(e){return So(ui.YResolution,e)},"exif:ApertureValue":function(e){return So(ui.ApertureValue,e)},"exif:GPSLatitude":Ao,"exif:GPSLongitude":Ao,"exif:FNumber":function(e){return So(ui.FNumber,e)},"exif:FocalLength":function(e){return So(ui.FocalLength,e)},"exif:FocalPlaneResolutionUnit":function(e){return ui.FocalPlaneResolutionUnit(parseInt(e,10))},"exif:ColorSpace":function(e){return ui.ColorSpace(function(e){return"0x"===e.substring(0,2)?parseInt(e.substring(2),16):parseInt(e,10)}(e))},"exif:ComponentsConfiguration":function(e,t){if(/^\d, \d, \d, \d$/.test(t)){var n=t.split(", ").map(function(e){return parseInt(e,10)});return ui.ComponentsConfiguration(n)}return t},"exif:Contrast":function(e){return ui.Contrast(parseInt(e,10))},"exif:CustomRendered":function(e){return ui.CustomRendered(parseInt(e,10))},"exif:ExposureMode":function(e){return ui.ExposureMode(parseInt(e,10))},"exif:ExposureProgram":function(e){return ui.ExposureProgram(parseInt(e,10))},"exif:ExposureTime":function(e){return xo(e)?ui.ExposureTime(e.split("/").map(function(e){return parseInt(e,10)})):e},"exif:MeteringMode":function(e){return ui.MeteringMode(parseInt(e,10))},"exif:Saturation":function(e){return ui.Saturation(parseInt(e,10))},"exif:SceneCaptureType":function(e){return ui.SceneCaptureType(parseInt(e,10))},"exif:Sharpness":function(e){return ui.Sharpness(parseInt(e,10))},"exif:ShutterSpeedValue":function(e){return So(ui.ShutterSpeedValue,e)},"exif:WhiteBalance":function(e){return ui.WhiteBalance(parseInt(e,10))}};function So(e,t){return xo(t)?e(t.split("/")):t}function xo(e){return/^-?\d+\/-?\d+$/.test(e)}function Ao(e){var t,n=function(e){if(Array.isArray(e))return e}(t=e.split(","))||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 yo(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)?yo(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];if(void 0!==r&&void 0!==i){var o=parseFloat(r),a=parseFloat(i),u=i.charAt(i.length-1);if(!Number.isNaN(o)&&!Number.isNaN(a))return""+(o+a/60)+u}return e}var Io=[0,9,12],Po="ExifReader needs 0.9.12 or later, or a parser passed in the domParser option.",To="Warning: XMP tags are skipped because the version of the @xmldom/xmldom that was found could not be read. "+Po;function Co(e,t,n){return e.slice(n,n+t.length)===t}function Eo(e,t,n){var r=e.indexOf(n,t);return-1===r?e.length:r+n.length}function Oo(e,t,n){return e>t&&e<n}var Uo={xmp:"http://ns.adobe.com/xap/1.0/",tiff:"http://ns.adobe.com/tiff/1.0/",exif:"http://ns.adobe.com/exif/1.0/",dc:"http://purl.org/dc/elements/1.1/",xmpMM:"http://ns.adobe.com/xap/1.0/mm/",stEvt:"http://ns.adobe.com/xap/1.0/sType/ResourceEvent#",stRef:"http://ns.adobe.com/xap/1.0/sType/ResourceRef#",photoshop:"http://ns.adobe.com/photoshop/1.0/"};function wo(e){return Object.prototype.hasOwnProperty.call(Uo,e)?Uo[e]:"http://fallback.namespace/"+e}function Lo(e,t,n){var r=Mo(e,t,n);if(r===t)return 0;for(;;){var i=Fo(e,r,n);if(Co(e,"/>",i))return 1;if(i===r)return 0;if(-1===(r=Ro(e,i,n)))return 0}}function Mo(e,t,n){for(var r=t;r<n&&-1===" \t\r\n/><=\"'".indexOf(e.charAt(r));)r++;return r}function Fo(e,t,n){for(var r=t;r<n&&-1!==" \t\r\n".indexOf(e.charAt(r));)r++;return r}function Ro(e,t,n){var r=Mo(e,t,n);if(r===t)return-1;var i=Fo(e,r,n);if("="!==e.charAt(i))return-1;var o=Fo(e,i+1,n),a=e.charAt(o);if('"'!==a&&"'"!==a)return-1;for(var u=o+1;u<n;u++)if(e.charAt(u)===a)return u+1;return-1}function Do(e,t,n){for(var r=0,i=0,o=t;o<n;o++){var a=e.charAt(o);if("="===a){if(1!==r&&2!==r)return i;r=3}else if('"'===a||"'"===a){if(3===r||1===r){var u=e.indexOf(a,o+1);if(-1===u||u>=n)return i;o=u}else if(4!==r)return i;i++,r=5}else if("/"===a){if(3===r)return i;0!==r&&5!==r&&6!==r||(r=7)}else{if(">"===a)return No(r)?i+1:i;if(Go(a))4===r&&i++,0===r||4===r||5===r?r=6:1===r&&(r=2);else{if(7===r)return i;2===r&&i++,2===r||5===r||6===r?r=1:3===r&&(r=4)}}}return No(r)?i+1:i}function No(e){return 1===e||2===e||4===e}function Go(e){return e<=" "||"€"===e||"…"===e||"\u2028"===e||"\u2029"===e}function ko(e){return ko="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},ko(e)}function _o(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 Bo(e){var t="function"==typeof Map?new Map:void 0;return Bo=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return function(e,t,n){if(jo())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var i=new(e.bind.apply(e,r));return n&&zo(i,n.prototype),i}(e,arguments,Vo(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:0,writable:1,configurable:1}}),zo(n,e)},Bo(e)}function jo(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(jo=function(){return!!e})()}function zo(e,t){return zo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},zo(e,t)}function Vo(e){return Vo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Vo(e)}var Ho={read:function(e,t,n){var r={};if("string"==typeof e)return ia(r,e,n),r;var i,o=(i=function(e,t){if(0===t.length)return[];var n=[ra(e,t.slice(0,1))];return t.length>1&&n.push(ra(e,t.slice(1))),n}(e,t),function(e){if(Array.isArray(e))return e}(i)||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}}(i)||function(e){if(e){if("string"==typeof e)return _o(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)?_o(e,2):void 0}}(i)||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.")}()),a=o[0],u=o[1],f=ia(r,a,n);if(u){var s=ia(r,u,n);f||s||(delete r._raw,ia(r,ra(e,t),n))}return r}},Xo=1,Wo=3,Ko=4,Jo=7,qo=8,Yo='<?xpacket end="',$o='"?>',Zo=16,Qo=256,ea=25e4,ta=0,na=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t,n){return t=Vo(t),function(e,t){if(t&&("object"==ko(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,jo()?Reflect.construct(t,n||[],Vo(e).constructor):t.apply(e,n))}(this,t,[e])).name="ParseError",n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:1,configurable:1}}),Object.defineProperty(e,"prototype",{writable:0}),t&&zo(e,t)}(t,e),Object.defineProperty(n=t,"prototype",{writable:0}),n;var n}(Bo(Error));function ra(e,t){for(var n=t.map(function(t){return function(e,t){var n=e.byteLength,r=e.byteOffset,i=Math.min(Math.max(t.dataOffset,0),n),o=Math.min(i+Math.max(t.length,0),n);return new Uint8Array(e.buffer,r+i,o-i)}(e,t)}),r=n.reduce(function(e,t){return e+t.length},0),i=new Uint8Array(r),o=0,a=0;a<n.length;a++)i.set(n[a],o),o+=n[a].length;return new DataView(i.buffer)}function ia(e,t,n){try{var r=function(e,t){var n=function(e){return e?{parser:e}:"undefined"!=typeof DOMParser?{parser:new DOMParser}:function(){try{var e=W.optionalPackage("@xmldom/xmldom"),t=e.DOMParser,n=e.onErrorStopParsing,r=(o="string"==typeof(i=(a=W.optionalPackage("@xmldom/xmldom/package.json"))?a.version:void 0)?/^(\d+)\.(\d+)\.(\d+)(-?)/.exec(i):null)?function(e){for(var t=0;t<3;t++){var n=Number(e[t+1]);if(n!==Io[t])return n<Io[t]}return"-"===e[4]}(o)?"Warning: XMP tags are skipped because the @xmldom/xmldom that was found is version ".concat(i,". ").concat(Po):void 0:To;return r?{parser:void 0,warning:r}:{parser:new t({onError:n})}}catch(e){return{parser:void 0,warning:"Warning: DOMParser is not available. It is needed to be able to parse XMP tags."}}var i,o,a}()}(t),r=n.parser,i=n.warning;if(!r)throw console.warn(i),Error();var o=function(e){if("string"==typeof e)return oa(e);var t=ao();if(void 0!==t)try{return{xmlString:new t("utf-8",{fatal:1}).decode(e),decodeValue:aa}}catch(e){}return oa(s(new Uint8Array(e.buffer,e.byteOffset,e.byteLength)))}(e),a=o.xmlString,u=o.decodeValue;return{doc:ua(r,function(e){var t=Math.max(e.lastIndexOf("\n"),e.lastIndexOf("\r"),e.lastIndexOf("\u2028"),e.lastIndexOf("\u2029"))+1,n=e.indexOf(Yo,t);if(-1===n)return e;var r=e.lastIndexOf($o,e.length-$o.length-1);return r<n+Yo.length?e:e.slice(0,r+$o.length)}(a.replace(/^.+(<\?xpacket begin)/,"$1"))),raw:a,decodeValue:u}}(t,n),i=r.doc,o=r.raw,a=r.decodeValue;e._raw=(e._raw||"")+o;var u=fa(i),f={};pa(sa(u,1,a),f,Object.create(null)),delete f._raw;for(var c=Object.keys(f),d=0;d<c.length;d++)S(e,c[d],f[c[d]]);return 1}catch(e){return 0}}function oa(e){var t=g(e);return void 0!==t?{xmlString:t,decodeValue:aa}:{xmlString:e,decodeValue:p}}function aa(e){return e}function ua(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(function(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1/0,r=0,i=0,o=e.indexOf("<");-1!==o;){if(Co(e,"\x3c!--",o))i++,o=Eo(e,o+4,"--\x3e");else if(Co(e,"<![CDATA[",o))i++,o=Eo(e,o+9,"]]>");else if(Co(e,"<?",o)){var a=Eo(e,o+2,"?>");if(-1!==e.slice(o+2,a).indexOf("<!"))return 1;i++,o=a}else{if(Co(e,"<!",o))return 1;if(Co(e,"</",o))r=Math.max(r-1,0),o=Eo(e,o+2,">");else{if(r+1>t)return 1;var u=e.indexOf("<",o+1),f=-1===u?e.length:u;Lo(e,o+1,f)||r++,i+=1+Do(e,o+1,f),o++}}if(i>n)return 1;o=e.indexOf("<",o)}return 0}(t,Qo,ea))throw new na("XMP has elements nested deeper than ".concat(Qo," levels, more than ").concat(ea," markup nodes, or a markup declaration."));try{var r=e.parseFromString(t,"application/xml"),i=r.getElementsByTagName("parsererror");if(i.length>0)throw new na(i[0].textContent);return r}catch(r){if("ParseError"===r.name&&function(e){for(var t=e.message+"",n=["prefix is non-null and namespace is null","prefix not bound to a namespace","prefix inte bundet till en namnrymd"],r=0;r<n.length;r++)if(-1!==t.indexOf(n[r]))return 1;return function(e){for(var t=e.split(/[\n\r\u2028\u2029]/),n=0;n<t.length;n++){var r=t[n].indexOf("Namespace prefix ");if(-1!==r&&t[n].lastIndexOf(" is not defined")>r+17)return 1}return 0}(t)}(r)&&!n)return ua(e,function(e){var t=function(e){for(var t=0;t<e.length;){if(-1===(t=e.indexOf("<",t)))return-1;if(/[A-Za-z_]/.test(e.charAt(t+1)))return t;Co(e,"\x3c!--",t)?t=Eo(e,t+4,"--\x3e"):Co(e,"<![CDATA[",t)?t=Eo(e,t+9,"]]>"):"?"===e.charAt(t+1)?t=Eo(e,t+2,"?>"):t++}return-1}(e);if(-1===t)return e;var n=function(e,t){for(var n,r,i=[],o=t;o<e.length;o++){var a=e.charAt(o);if(void 0!==n)a===n&&(i.push({start:r,end:o}),n=void 0);else if('"'===a||"'"===a)n=a,r=o+1;else if(">"===a)return"/"===e.charAt(o-1)?{insertionIndex:o-1,attributeValueSpans:i}:{insertionIndex:o,attributeValueSpans:i}}return{insertionIndex:-1,attributeValueSpans:i}}(e,t+1),r=n.insertionIndex,i=n.attributeValueSpans;if(-1===r)return e;var o=function(e,t,n,r){for(var i,o=Object.create(null),a=/xmlns:([A-Za-z_][A-Za-z0-9._-]*)\s*=\s*["']([^"']*)["']/g,u=0;null!==(i=a.exec(e));){for(;u<r.length&&r[u].end<=i.index;)u++;u<r.length&&r[u].start<=i.index?a.lastIndex=r[u].end:(""!==i[2]||Oo(i.index,t,n))&&(o[i[1]]=1)}return o}(e,t,r,i),a=function(e){for(var t,n=[],r=Object.create(null),i=/(?:^|[^A-Za-z0-9._-])([A-Za-z_][A-Za-z0-9._-]*):[A-Za-z_][A-Za-z0-9._-]*/g;null!==(t=i.exec(e));){var o=t[1];"xmlns"!==o&&"xml"!==o&&void 0===r[o]&&(r[o]=1,n.push(o))}return n}(e).filter(function(e){return void 0===o[e]});if(0===a.length)return e;var u=function(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];t.push(" xmlns:"+r+'="'+wo(r)+'"')}return t.join("")}(a);return e.slice(0,r)+u+e.slice(r)}(t),1);throw r}}function fa(e){for(var t=e.childNodes,n=0;n<t.length;n++){if("x:xmpmeta"===t[n].tagName)return fa(t[n]);if("rdf:RDF"===t[n].tagName)return t[n]}throw Error()}function sa(e,t,n){var r,i=function(e){for(var t=e.childNodes,n=[],r=0;r<t.length;r++)ca(t[r])||n.push(t[r]);return n}(e);return(r=i).length>0&&r.every(da)?t?{}:n(function(e){return e.map(function(e){return e.nodeValue}).join("")}(i)):function(e,t){var n=Object.create(null);return e.forEach(function(e){if(function(e){return e.nodeType===Xo}(e)){var r=function(e,t){return{attributes:la(e,t),value:sa(e,0,t)}}(e,t);void 0!==n[e.nodeName]?(Array.isArray(n[e.nodeName])||(n[e.nodeName]=[n[e.nodeName]]),n[e.nodeName].push(r)):n[e.nodeName]=r}}),n}(i,n)}function ca(e){return e.nodeType===qo||e.nodeType===Jo}function da(e){return e.nodeType===Wo||e.nodeType===Ko}function la(e,t){for(var n=e.attributes,r=Object.create(null),i=0;i<n.length;i++)S(r,n[i].nodeName,t(n[i].value));return r}function pa(e,t,n){for(var r in e){var i=e[r];Array.isArray(i)||(i=[i]),i.forEach(function(e){ga(e.attributes,t,n),"object"===ko(e.value)&&xa(e.value,t,n)})}}function ga(e,t,n){for(var r in e)try{ha(r)&&va(t,n,ya(r),ba(e[r],e[r],{},r))}catch(e){}}function ha(e){return"rdf:parseType"!==e&&!ma(e)}function ma(e){return"xmlns"===e.split(":")[0]}function va(e,t,n,r){var i=x(n);S(e,i,r.tag),S(t,i,r.plainDescription)}function ya(e){return/^MicrosoftPhoto(_\d+_)?:Rating$/i.test(e)?"RatingPercent":e.split(":")[1]||e}function ba(e,t,n,r){return{tag:{value:e,attributes:n,description:Sa(e,t,r)},plainDescription:t}}function Sa(e,t,n){if(!function(e){return Object.prototype.hasOwnProperty.call(bo,e)&&"function"==typeof bo[e]}(n)||function(e){return"object"===ko(e)&&!Array.isArray(e)}(e))return t;if(Array.isArray(e)){try{var r=bo[n](e,t);if("string"==typeof r)return r}catch(e){}return t}try{return bo[n](e)}catch(t){return e}}function xa(e,t,n){Aa(function(){for(var r in e)try{ma(r)||va(t,n,ya(r),Ia(e[r],r))}catch(e){}})}function Aa(e){ta++;try{if(ta>Zo)throw new na("XMP value nested deeper than ".concat(Zo," levels."));return e()}finally{ta--}}function Ia(e,t){return Pa(e)?function(e,t){return Ba(e[e.length-1],t)}(e,t):function(e){return"Resource"===e.attributes["rdf:parseType"]&&"string"==typeof e.value&&""===e.value.trim()}(e)?{tag:{value:"",attributes:{},description:""},plainDescription:""}:Ta(e)?Ca(e,t):La(e)?Ma(e,t):Fa(e)?Ra(e,t):Da(e)?function(e,t){var n=Ea(e),r=Ga(e);return ba(r.value,r.plainDescription,n,t)}(e,t):Ba(e,t)}function Pa(e){return Array.isArray(e)}function Ta(e){return"Resource"===e.attributes["rdf:parseType"]&&void 0!==e.value["rdf:value"]||void 0!==e.value["rdf:Description"]&&void 0!==e.value["rdf:Description"].value["rdf:value"]}function Ca(e,t){var n=Ea(e);void 0!==e.value["rdf:Description"]&&(e=e.value["rdf:Description"]),b(n,Ea(e),function(e){var t={};if("object"!==ko(e.value))return t;for(var n in e.value)"rdf:value"===n||ma(n)||S(t,x(ya(n)),e.value[n].value);return t}(e));var r=function(e){var t=Oa(e.value["rdf:value"]),n=ja(t);return n?{value:n,plainDescription:n}:function(e){if(Da(e))return Aa(function(){return Ga(e)});if("object"===ko(e.value)){var t=Object.create(null),n=Object.create(null);return xa(e.value,t,n),{value:t,plainDescription:Ua(t,n)}}return{value:e.value,plainDescription:e.value}}(t)}(e);return ba(r.value,r.plainDescription,n,t)}function Ea(e){var t={};for(var n in e.attributes)"rdf:parseType"===n||"rdf:resource"===n||ma(n)||S(t,x(ya(n)),e.attributes[n]);return t}function Oa(e){return Pa(e)?e[e.length-1]:e}function Ua(e,t){var n=[];for(var r in e)n.push("".concat(wa(r),": ").concat(t[r]));return n.join("; ")}function wa(e){return"CiAdrCity"===e?"CreatorCity":"CiAdrCtry"===e?"CreatorCountry":"CiAdrExtadr"===e?"CreatorAddress":"CiAdrPcode"===e?"CreatorPostalCode":"CiAdrRegion"===e?"CreatorRegion":"CiEmailWork"===e?"CreatorWorkEmail":"CiTelWork"===e?"CreatorWorkPhone":"CiUrlWork"===e?"CreatorWorkUrl":e}function La(e){return"Resource"===e.attributes["rdf:parseType"]||void 0!==e.value["rdf:Description"]&&void 0===e.value["rdf:Description"].value["rdf:value"]}function Ma(e,t){var n={},r=Object.create(null),i={};return void 0!==e.value["rdf:Description"]&&(ga(e.value["rdf:Description"].attributes,n,r),b(i,Ea(e)),e=e.value["rdf:Description"]),"object"===ko(e.value)&&xa(e.value,n,r),ba(n,Ua(n,r),i,t)}function Fa(e){return("string"==typeof(t=e.value)?""===t:0===Object.keys(t).length)&&void 0===e.attributes["xml:lang"]&&void 0===e.attributes["rdf:resource"];var t}function Ra(e,t){var n={},r=Object.create(null);return ga(e.attributes,n,r),ba(n,Ua(n,r),{},t)}function Da(e){return void 0!==Na(e.value)}function Na(e){return Oa(e["rdf:Bag"]||e["rdf:Seq"]||e["rdf:Alt"])}function Ga(e){var t=Na(e.value).value["rdf:li"],n=[],r=[];return void 0===t?t=[]:Array.isArray(t)||(t=[t]),t.forEach(function(e){var t=function(e){return Ta(e)?ka(Ca(e)):La(e)?_a(Ma(e)):Fa(e)?_a(Ra(e)):ka(Ba(e))}(e);n.push(t.value),r.push(t.plainDescription)}),{value:n,plainDescription:r.join(", ")}}function ka(e){return{value:e.tag,plainDescription:e.plainDescription}}function _a(e){return{value:e.tag.value,plainDescription:e.plainDescription}}function Ba(e,t){var n=function(e){var t=ja(e);if(t)return{value:t,plainDescription:t};if("string"==typeof e.value)return{value:e.value,plainDescription:e.value};var n={},r=Object.create(null);return pa(e.value,n,r),{value:n,plainDescription:Ua(n,r)}}(e);return ba(n.value,n.plainDescription,Ea(e),t)}function ja(e){return e.attributes&&e.attributes["rdf:resource"]}function za(e){return za="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},za(e)}function Va(e,t,n){return(t=function(e){var t=function(e){if("object"!=za(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=za(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return e+""}(e);return"symbol"==za(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:1,configurable:1,writable:1}):e[t]=n,e}function Ha(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 Xa={2e3:{name:"PathInformation",description:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{remaining:32768},n={},r=[],i=0;i<e.byteLength&&t.remaining>0;i+=26){var o=mr.getShortAt(e,i);Wa[o]&&(n[o]||(n[o]=Wa[o].description),r.push({type:o,path:Wa[o].path(e,i+2)}),t.remaining--)}return JSON.stringify({types:n,paths:r})}},2999:{name:"ClippingPathName",description:function(e){return(t=a(e,0),function(e){if(Array.isArray(e))return e}(t)||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 Ha(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)?Ha(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.")}())[1];var t}}},Wa=Va(Va(Va(Va(Va(Va(Va(Va(Va({},0,{description:"Closed subpath length",path:function(e,t){return[mr.getShortAt(e,t)]}}),1,{description:"Closed subpath Bezier knot, linked",path:Ka}),2,{description:"Closed subpath Bezier knot, unlinked",path:Ka}),3,{description:"Open subpath length",path:function(e,t){return[mr.getShortAt(e,t)]}}),4,{description:"Open subpath Bezier knot, linked",path:Ka}),5,{description:"Open subpath Bezier knot, unlinked",path:Ka}),6,{description:"Path fill rule",path:function(){return[]}}),8,{description:"Initial fill rule",path:function(e,t){return[mr.getShortAt(e,t)]}}),7,{description:"Clipboard",path:function(e,t){return[[qa(e,t,8),qa(e,t+4,8),qa(e,t+8,8),qa(e,t+12,8)],qa(e,t+16,8)]}});function Ka(e,t){for(var n=[],r=0;r<24;r+=8)n.push(Ja(e,t+r));return n}function Ja(e,t){var n=qa(e,t,8);return[qa(e,t+4,8),n]}function qa(e,t,n){var r,i=mr.getLongAt(e,t),o=i>>>31==0?1:-1,a=(2130706432&i)>>>32-n,u=i&parseInt(U("1",32-n),2);return o*(r=a.toString(2)+"."+O(u.toString(2),32-n,"0"),parseInt(r.replace(".",""),2)/Math.pow(2,(r.split(".")[1]||"").length))}function Ya(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 $a={read:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:wr;if(!Array.isArray(e))return{};for(var o=new Uint8Array(e),a=n(o.buffer),u={remaining:32768},f={},c=0,d=0;d<ru&&c+nu<=a.byteLength;d++){var l=i(a,c,tu);c+=tu;var p=mr.getShortAt(a,c),g=ou(a,c+=Qa),h=g.tagName;if((c+=g.tagNameSize)+eu>a.byteLength)break;var m=mr.getLongAt(a,c);c+=eu;var v=Math.min(m,a.byteLength-c);if(l===Za){var y=iu(p,h);if(!r.shouldParseTag("photoshop",y,p)){c+=v+v%2;continue}var b=n(a.buffer,c,v),x={id:p,value:s(o,c,c+v)};if(Xa[p]){try{x.description=Xa[p].description(b,u)}catch(e){x.description="<no description formatter>"}S(f,y,x)}else t&&(f[y]=x)}c+=v+v%2}return f}},Za="8BIM",Qa=2,eu=4,tu=Za.length,nu=tu+Qa+2+eu,ru=4096;function iu(e,t){return Xa[e]?x(t||Xa[e].name):"undefined-".concat(e)}function ou(e,t){var n,r=function(e){if(Array.isArray(e))return e}(n=a(e,t))||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}}(n)||function(e){if(e){if("string"==typeof e)return Ya(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)?Ya(e,2):void 0}}(n)||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.")}(),i=r[0];return{tagName:r[1],tagNameSize:1+i+(i%2==0?1:0)}}var au={desc:{name:"ICC Description"},cprt:{name:"ICC Copyright"},dmdd:{name:"ICC Device Model Description"},vued:{name:"ICC Viewing Conditions Description"},dmnd:{name:"ICC Device Manufacturer for Display"},tech:{name:"Technology"}},uu={4:{name:"Preferred CMM type",value:function(e,t){return i(e,t,4)},description:function(e){return null!==e?su(e):""}},8:{name:"Profile Version",value:function(e,t){return e.getUint8(t).toString(10)+"."+(e.getUint8(t+1)>>4).toString(10)+"."+(e.getUint8(t+1)%16).toString(10)}},12:{name:"Profile/Device class",value:function(e,t){return i(e,t,4)},description:function(e){switch(e.toLowerCase()){case"scnr":return"Input Device profile";case"mntr":return"Display Device profile";case"prtr":return"Output Device profile";case"link":return"DeviceLink profile";case"abst":return"Abstract profile";case"spac":return"ColorSpace profile";case"nmcl":return"NamedColor profile";case"cenc":return"ColorEncodingSpace profile";case"mid ":return"MultiplexIdentification profile";case"mlnk":return"MultiplexLink profile";case"mvis":return"MultiplexVisualization profile";default:return e}}},16:{name:"Color Space",value:function(e,t){return i(e,t,4)}},20:{name:"Connection Space",value:function(e,t){return i(e,t,4)}},24:{name:"ICC Profile Date",value:function(e,t){return function(e,t){var n=e.getUint16(t),r=e.getUint16(t+2)-1,i=e.getUint16(t+4),o=e.getUint16(t+6),a=e.getUint16(t+8),u=e.getUint16(t+10);return new Date(Date.UTC(n,r,i,o,a,u))}(e,t).toISOString()}},36:{name:"ICC Signature",value:function(e,t){return fu(e.buffer.slice(t,t+4))}},40:{name:"Primary Platform",value:function(e,t){return i(e,t,4)},description:function(e){return su(e)}},48:{name:"Device Manufacturer",value:function(e,t){return i(e,t,4)},description:function(e){return su(e)}},52:{name:"Device Model Number",value:function(e,t){return i(e,t,4)}},64:{name:"Rendering Intent",value:function(e,t){return e.getUint32(t)},description:function(e){switch(e){case 0:return"Perceptual";case 1:return"Relative Colorimetric";case 2:return"Saturation";case 3:return"Absolute Colorimetric";default:return e}}},80:{name:"Profile Creator",value:function(e,t){return i(e,t,4)}}};function fu(e){return s(new Uint8Array(e))}function su(e){switch(e.toLowerCase()){case"appl":return"Apple";case"adbe":return"Adobe";case"msft":return"Microsoft";case"sunw":return"Sun Microsystems";case"sgi":return"Silicon Graphics";case"tgnt":return"Taligent";default:return e}}var cu={read:function(e,t,n,r){return n&&t[0].compressionMethod!==w?function(e,t,n){if(t[0].compressionMethod!==L)return{};var r=e.byteOffset||0,i=e.buffer.slice(r+t[0].offset,r+t[0].offset+t[0].length);return D(new DataView(i),t[0].compressionMethod,"utf-8","dataview",n).then(Cu).catch(function(){return{}})}(e,t,r):function(e,t){try{for(var n=function(e){return Array.isArray(e)?new DataView(Uint8Array.from(e).buffer).buffer:e.buffer}(e),r=e.byteOffset||0,i=t.reduce(function(e,t){return e+t.length},0),o=Math.min(i,n.byteLength),a=new Uint8Array(o),u=0,f=function(e){for(var t=Object.create(null),n=0;n<e.length;n++)void 0===t[e[n].chunkNumber]&&(t[e[n].chunkNumber]=e[n]);return t}(t),s=1;s<=t.length;s++){var c=f[s];if(!c)throw Error("ICC chunk ".concat(s," not found"));var d=n.slice(r+c.offset,r+c.offset+c.length),l=new Uint8Array(d);a.set(l,u),u+=l.length}return Cu(new DataView(a.buffer))}catch(e){return{}}}(e,t)}},du=84,lu=128,pu="acsp",gu="desc",hu="mluc",mu="text",vu="sig ",yu=12,bu=12,Su=12,xu=16,Au=1e3,Iu=1e3,Pu=1048576;function Tu(e,t){return e.byteLength<t+yu}function Cu(e){var t=e.buffer,n=e.getUint32();if(e.byteLength!==n)throw Error("ICC profile length not matching");if(e.byteLength<du)throw Error("ICC profile too short");for(var r={},a=Object.keys(uu),u=0;u<a.length;u++){var f=a[u],s=uu[f],c=s.value(e,parseInt(f,10)),d=c;s.description&&(d=s.description(c)),r[s.name]={value:c,description:d}}if(fu(t.slice(36,40))!==pu)throw Error("ICC profile: missing signature");if(function(e){return e.byteLength<lu+4}(e))return r;for(var l=Math.min(e.getUint32(lu),Iu),p=132,g={remaining:Math.min(e.byteLength,Pu)},h=0;h<l;h++){if(Tu(e,p))return r;var m=i(e,p,4),v=e.getUint32(p+4),y=e.getUint32(p+8);if(v>e.byteLength)return r;var b=i(e,v,4);if(b===gu){if(v+bu>e.byteLength)return r;var S=e.getUint32(v+8);if(S>y)return r;Ou(r,m,Eu(e,v+12,S-1,g))}else if(b===hu){if(v+xu>e.byteLength)return r;var x=e.getUint32(v+8),A=e.getUint32(v+12);if(A<Su)return r;if(x>Au)return r;var I=x*A;if(I>e.byteLength-v-xu)return r;if(I>g.remaining)return r;g.remaining-=I;for(var P=Math.min(y,e.byteLength-v),T=v+xu,C=[],E=0;E<x;E++){var O=i(e,T+0,2),U=i(e,T+2,2),w=e.getUint32(T+4),L=e.getUint32(T+8),M=Math.min(w,Math.max(0,P-L),g.remaining);g.remaining-=M;var F=o(e,v+L,M);C.push({languageCode:O,countryCode:U,text:F}),T+=A}if(1===x)Ou(r,m,C[0].text);else{for(var R={},D=0;D<C.length;D++)R["".concat(C[D].languageCode,"-").concat(C[D].countryCode)]=C[D].text;Ou(r,m,R)}}else if(b===mu){var N=Eu(e,v+8,y-8,g),G=N.indexOf("\0");Ou(r,m,-1===G?N:N.slice(0,G))}else b===vu&&Ou(r,m,fu(t.slice(v+8,v+12)));p+=12}return r}function Eu(e,t,n,r){var i=Math.max(0,Math.min(n,e.byteLength-t,r.remaining));return r.remaining-=i,fu(e.buffer.slice(t,t+i))}function Ou(e,t,n){au[t]?e[au[t].name]={value:n,description:n}:e[t]={value:n,description:n}}var Uu={1:{name:"CameraSettings",description:function(e){return e}},4:{name:"ShotInfo",description:function(e){return e}},149:"LensModel"},wu={read:function(e,t,n,r,i){var o,a=Wr(e,lr,t,t+n,r,i,arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,arguments.length>6&&void 0!==arguments[6]?arguments[6]:void 0,"makerNotes",arguments.length>7&&void 0!==arguments[7]?arguments[7]:void 0,((o={})[lr]=Uu,o));return a.ShotInfo&&delete(a=b({},a,function(e){var t={},n=e[27];return Number.isFinite(n)&&(t.AutoRotate={value:n,description:Lu(n)}),t}(a.ShotInfo.value))).ShotInfo,a.CameraSettings&&delete(a=b({},a,function(e){var t={};if(!Array.isArray(e))return t;var n=e[22];return Number.isFinite(n)&&(t.LensType={value:n,description:"".concat(n)}),t}(a.CameraSettings.value))).CameraSettings,a},SHOT_INFO_AUTO_ROTATE:27,CAMERA_SETTINGS_LENS_TYPE:22};function Lu(e){return 0===e?"None":1===e?"Rotate 90 CW":2===e?"Rotate 180":3===e?"Rotate 270 CW":"Unknown"}var Mu={0:{name:"PentaxVersion",description:function(e){return e.join(".")}},5:"PentaxModelID",555:"LevelInfo"},Fu={K3_III:78420},Ru={CAMERA_ORIENTATION:1,ROLL_ANGLE:3,PITCH_ANGLE:5},Du={read:function(e,t,n,r){var i,o,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,u=arguments.length>5&&void 0!==arguments[5]?arguments[5]:void 0,f=arguments.length>6&&void 0!==arguments[6]?arguments[6]:void 0;try{var s=ke.getByteOrder(e,t+n+8),c=t+n,d=Wr(e,pr,c,c+10,s,r,a,u,"makerNotes",f,((o={})[pr]=Mu,o));return function(e){return e.PentaxModelID&&e.PentaxModelID.value===Fu.K3_III&&e.LevelInfo}(d)?(d=b({},d,function(e,t,n,r){var i,o={},a=r===ke.LITTLE_ENDIAN;if(Nu(Ru.CAMERA_ORIENTATION,1,n)){var u=e.getInt8(t+Ru.CAMERA_ORIENTATION);o.CameraOrientation={value:u,description:(i=u,0===i?"Horizontal (normal)":1===i?"Rotate 270 CW":2===i?"Rotate 180":3===i?"Rotate 90 CW":4===i?"Upwards":5===i?"Downwards":"Unknown")}}if(Nu(Ru.ROLL_ANGLE,2,n)){var f=e.getInt16(t+Ru.ROLL_ANGLE,a);o.RollAngle={value:f,description:Gu(f)}}if(Nu(Ru.PITCH_ANGLE,2,n)){var s=e.getInt16(t+Ru.PITCH_ANGLE,a);o.PitchAngle={value:s,description:ku(s)}}return o}(e,c+d.LevelInfo.__offset,(i=d.LevelInfo.value,Array.isArray(i)&&"number"==typeof i[0]?i.length:0),s)),delete d.LevelInfo):d.LevelInfo&&delete d.LevelInfo.__offset,d}catch(e){return{}}},PENTAX_IFD_OFFSET:10,MODEL_ID:Fu,LIK3III:Ru};function Nu(e,t,n){return e+t<=n}function Gu(e){return""+-.5*e}function ku(e){return""+-.5*e}var _u={read:function(e,t){for(var n={},r=0;r<zu.length;r++)n[zu[r].name]=Vu(e,t,zu[r]);return n}},Bu={0:"Grayscale",2:"RGB",3:"Palette",4:"Grayscale with Alpha",6:"RGB with Alpha"},ju={0:"Noninterlaced",1:"Adam7 Interlace"},zu=[{name:"Image Width",offset:0,size:4,read:mr.getLongAt,description:function(e){return"".concat(e,"px")}},{name:"Image Height",offset:4,size:4,read:mr.getLongAt,description:function(e){return"".concat(e,"px")}},{name:"Bit Depth",offset:8,size:1,read:mr.getByteAt,description:function(e){return"".concat(e)}},{name:"Color Type",offset:9,size:1,read:mr.getByteAt,description:function(e){return Bu[e]||"Unknown"}},{name:"Compression",offset:10,size:1,read:mr.getByteAt,description:function(e){return 0===e?"Deflate/Inflate":"Unknown"}},{name:"Filter",offset:11,size:1,read:mr.getByteAt,description:function(e){return 0===e?"Adaptive":"Unknown"}},{name:"Interlace",offset:12,size:1,read:mr.getByteAt,description:function(e){return ju[e]||"Unknown"}}];function Vu(e,t,n){if(!(t+n.offset+n.size>e.byteLength)){var r=n.read(e,t+n.offset);return{value:r,description:n.description(r)}}}var Hu={read:function(e,t,n,r){for(var o,a,u,f,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,c=arguments.length>5&&void 0!==arguments[5]?arguments[5]:wr,d=arguments.length>6?arguments[6]:void 0,l=arguments.length>7?arguments[7]:void 0,p=arguments.length>8?arguments[8]:void 0,g=arguments.length>9?arguments[9]:void 0,h=arguments.length>10&&void 0!==arguments[10]?arguments[10]:{},m={},v=[],y=[],A=0;A<t.length;A++){var I=t[A],P=e.getUint32(I+yn),T=i(e,I+bn,vn),C=uf(e,I+Sn,P,T);if(C)if(C.compressionMethod===w){var E=ff(C);sf(E)?v.push(E):E.name&&c.shouldParseGroup("png")&&S(m,x(E.name),{value:E.value,description:E.description})}else n&&y.length<Qu&&y.push(C)}for(var O=v.some(function(e){return Sf(e.name,e.value)})||y.some(of),U=0;U<v.length;U++){var L=cf(v[U],r,s,c,l,u?void 0:p,g,0,O,h);L.embeddedExifTags&&(o=b(o||{},L.embeddedExifTags)),L.exifCarriedGroups&&(f=af(f||{},L.exifCarriedGroups)),L.embeddedExifThumbnail&&(u=L.embeddedExifThumbnail),L.embeddedIptcTags&&(a=b(a||{},L.embeddedIptcTags))}var M=u?void 0:p,F=y.map(function(e){return function(){return function(e,t){var n=e.type,r=e.keywordChars,i=e.langChars,o=e.compressionMethod,a=e.valueChars;return void 0===a?Promise.resolve(df(n,i,r)):D(a,o,hf(n),"string",t).then(function(e){return mf(e,n,i,r)}).catch(function(){return df(n,i,r)})}(e,d).then(function(e){return cf(e,r,s,c,l,M,g,1,O,h)})}});return{readTags:m,embeddedExifTags:o,embeddedIptcTags:a,embeddedExifThumbnail:u,exifCarriedGroups:f,readTagsPromise:F.length>0?lf(F,ef):void 0}}},Xu="STATE_KEYWORD",Wu="STATE_COMPRESSION",Ku="STATE_LANG",Ju="STATE_TRANSLATED_KEYWORD",qu="STATE_TEXT",Yu=1,$u=1,Zu=6,Qu=255,ef=4,tf=79,nf="raw profile type iptc",rf=79;function of(e){return vf(e.type,e.langChars,e.keywordChars).toLowerCase()===nf}function af(e,t){for(var n=Object.keys(t),r=0;r<n.length;r++)e[n[r]]=b(e[n[r]]||{},t[n[r]]);return e}function uf(e,t,n,r){for(var i,o=[],a=[],u=Xu,f=w,s=e.byteOffset,c=Math.min(t+n,e.byteLength),d=0;d<n&&t+d<e.byteLength;d++)if(u!==Wu){if(u===qu){var l=e.buffer.slice(s+t+d,s+t+n);i=new DataView(l);break}var p=e.getUint8(t+d);if(0===p)u=gf(r,u);else if(u===Xu){if(o.length>=tf)return;o.push(p)}else if(u===Ku){if(a.length>=rf)return;a.push(p)}}else f=pf({type:r,dataView:e,offset:t+d,chunkEnd:c}),r===In&&(d+=Yu),u=gf(r,u);return{type:r,keywordChars:o,langChars:a,compressionMethod:f,valueChars:i}}function ff(e){var t=e.type,n=e.keywordChars,r=e.langChars;return mf(D(e.valueChars,w,hf(t),"string"),t,r,n)}function sf(e){var t=e.name,n=e.value;return bf(t,n)||Sf(t,n)}function cf(e,t,n,r,i,o,a,u,f,s){var c=e.name,d=e.value,l=e.description;try{if(bf(c,d)){if(!s.exif||!r.shouldParseGroup("exif"))return{};var p=xf(d);u&&qr(i,p.byteLength);var g=s.exif(p,Zu,t,n,r,i),h=g.tags,m=g.byteOrder,v={embeddedExifTags:h};a&&(v.exifCarriedGroups=a(p,h,Zu,m,i,{decompressed:u,hasIptcBlock:f})),h.MakerNote&&delete h.MakerNote.__offset;var y=ri(h,p,Zu,o);return y&&(v.embeddedExifThumbnail=y),v}if(Sf(c,d)){if(!s.iptc||!r.shouldParseGroup("iptc"))return{};var b=xf(d);return u&&function(e,t){if(void 0!==e){var n=Math.min(Math.floor(t/5),e.decompressedIptcAllowanceRemaining);e.iptcDatasetsRemaining+=n,e.decompressedIptcAllowanceRemaining-=n}}(i,b.byteLength),{embeddedIptcTags:s.iptc(b,0,t,r,i)}}if(c){if(!r.shouldParseGroup("png"))return{};var A={};return S(A,x(c),{value:d,description:l}),{readTags:A}}}catch(e){}return{}}function df(e,t,n){return mf("<text using unknown compression>",e,t,n)}function lf(e,t){for(var n=[],r=[],i=0,o=0;o<Math.min(t,e.length);o++)r.push(a());return Promise.all(r).then(function(){return n});function a(){if(i>=e.length)return Promise.resolve();var t=i++;return new Promise(function(n){return n(e[t]())}).then(function(e){return n[t]=e,a()})}}function pf(e){var t=e.type,n=e.dataView,r=e.offset,i=e.chunkEnd;if(t===In){if(r+1<i&&n.getUint8(r)===$u)return n.getUint8(r+1)}else if(t===Pn)return n.getUint8(r);return w}function gf(e,t){return t===Xu&&[In,Pn].includes(e)?Wu:t===Wu?e===In?Ku:qu:t===Ku?Ju:qu}function hf(e){return e===An||e===Pn?"latin1":"utf-8"}function mf(e,t,n,r){var o=function(e){return e instanceof DataView?i(e,0,e.byteLength):e}(e);return{name:vf(t,n,r),value:o,description:t===In?yf(e):o}}function vf(e,t,n){var r=f(n);if(e===An||0===t.length)return r;var i=f(t);return"".concat(r," (").concat(i,")")}function yf(e){return fo("UTF-8",e)}function bf(e,t){return"raw profile type exif"===e.toLowerCase()&&"exif"===t.substring(1,5)}function Sf(e,t){return e.toLowerCase()===nf&&"iptc"===t.substring(1,5)}function xf(e){var t=/\n(exif|iptc)\n\s*\d+\n/.exec(e);if(!t)throw Error("Invalid raw profile header.");var n=t.index+t[0].length,r=function(e,t){for(var n=0,r=t;r<e.length;r++)E(e.charCodeAt(r))>=0&&n++;return n}(e,n);if(r%2!=0)throw Error("Odd number of hex digits in raw profile.");for(var i=new Uint8Array(r/2),o=0,a=-1,u=n;u<e.length;u++){var f=E(e.charCodeAt(u));f<0||(a<0?a=f:(i[o++]=a<<4|f,a=-1))}return new DataView(i.buffer)}var Af={read:function(e,t){for(var n={},r=0;r<t.length;r++){var o=mr.getLongAt(e,t[r]+yn),a=i(e,t[r]+bn,vn);a===Tn?(n["Pixels Per Unit X"]=If(e,t[r],o),n["Pixels Per Unit Y"]=Pf(e,t[r],o),n["Pixel Units"]=Tf(e,t[r],o)):a===Cn&&(n["Modify Date"]=Cf(e,t[r],o))}return n}};function If(e,t,n){if(Ef(e,t,n,0,4)){var r=mr.getLongAt(e,t+Sn+0);return{value:r,description:""+r}}}function Pf(e,t,n){if(Ef(e,t,n,4,4)){var r=mr.getLongAt(e,t+Sn+4);return{value:r,description:""+r}}}function Tf(e,t,n){if(Ef(e,t,n,8,1)){var r=mr.getByteAt(e,t+Sn+8);return{value:r,description:1===r?"meters":"Unknown"}}}function Cf(e,t,n){if(Ef(e,t,n,0,7)){var r=mr.getShortAt(e,t+Sn),i=mr.getByteAt(e,t+Sn+2),o=mr.getByteAt(e,t+Sn+3),a=mr.getByteAt(e,t+Sn+4),u=mr.getByteAt(e,t+Sn+5),f=mr.getByteAt(e,t+Sn+6);return{value:[r,i,o,a,u,f],description:"".concat(Of(r,4),"-").concat(Of(i,2),"-").concat(Of(o,2)," ").concat(Of(a,2),":").concat(Of(u,2),":").concat(Of(f,2))}}}function Ef(e,t,n,r,i){return r+i<=n&&t+Sn+r+i<=e.byteLength}function Of(e,t){return O(""+e,t,"0")}var Uf={read:function(e,t){var n={};if(t+Mf>e.byteLength)return n;var r=mr.getByteAt(e,t);return n.Alpha=function(e){var t=16&e;return{value:t?1:0,description:t?"Yes":"No"}}(r),n.Animation=function(e){var t=2&e;return{value:t?1:0,description:t?"Yes":"No"}}(r),n.ImageWidth=Ff(e,t+wf),n.ImageHeight=Ff(e,t+Lf),n}},wf=4,Lf=7,Mf=10;function Ff(e,t){var n=mr.getByteAt(e,t)+256*mr.getByteAt(e,t+1)+65536*mr.getByteAt(e,t+2)+1;return{value:n,description:n+"px"}}var Rf={read:function(e){for(var t={},n=0;n<Nf.length;n++)t[Nf[n].name]=Gf(e,Nf[n]);return t}},Df=function(e){return"".concat(e," ").concat(1===e?"bit":"bits")},Nf=[{name:"GIF Version",offset:3,size:3,getValue:function(e,t){return i(e,t,3)},description:function(e){return e}},{name:"Image Width",offset:6,size:2,getValue:function(e,t){return e.getUint16(t,1)},description:function(e){return"".concat(e,"px")}},{name:"Image Height",offset:8,size:2,getValue:function(e,t){return e.getUint16(t,1)},description:function(e){return"".concat(e,"px")}},{name:"Global Color Map",offset:10,size:1,getValue:function(e,t){return(128&e.getUint8(t))>>>7},description:function(e){return 1===e?"Yes":"No"}},{name:"Bits Per Pixel",offset:10,size:1,getValue:function(e,t){return 1+(7&e.getUint8(t))},description:Df},{name:"Color Resolution Depth",offset:10,size:1,getValue:function(e,t){return((112&e.getUint8(t))>>>4)+1},description:Df}];function Gf(e,t){if(!(t.offset+t.size>e.byteLength)){var n=t.getValue(e,t.offset);return{value:n,description:t.description(n)}}}var kf=[6,7,99],_f={get:function(e,t,n){if(function(e){return e&&(void 0===e.Compression||kf.includes(e.Compression.value))&&e.JPEGInterchangeFormat&&e.JPEGInterchangeFormat.value&&e.JPEGInterchangeFormatLength&&e.JPEGInterchangeFormatLength.value}(t)){var r=n+t.JPEGInterchangeFormat.value,i=t.JPEGInterchangeFormatLength.value;if(function(e,t,n){return Bf(t)&&Bf(n)&&t+n<=e.byteLength}(e,r,i)){t.type="image/jpeg";var o=e.byteOffset;t.image=e.buffer.slice(o+r,o+r+i),A(t,"base64",function(){return I(this.image)})}}return t}};function Bf(e){return"number"==typeof e&&e>=0&&e%1==0}var jf={get:function(e,t){var n={},r=0,i=Vf(zf(e,"exif","FocalLength",t)),o=Vf(zf(e,"exif","FocalPlaneXResolution",t)),a=Vf(zf(e,"exif","FocalPlaneYResolution",t)),u=Hf(zf(e,"exif","FocalPlaneResolutionUnit",t)),f=function(e,t){var n=Hf(zf(e,"exif","PixelXDimension",t)),r=Hf(zf(e,"exif","PixelYDimension",t));return n&&r?{width:n,height:r}:{width:Hf(zf(e,"file","Image Width",t)),height:Hf(zf(e,"file","Image Height",t))}}(e,t),s=Hf(zf(e,"exif","FocalLengthIn35mmFilm",t))||function(e,t,n,r,i,o){if(e&&t&&n&&r&&i&&o){var a;switch(n){case 2:a=25.4;break;case 3:a=10;break;case 4:a=1;break;default:return}var u=i/(t/a);return Hf(o*(43.27/Math.sqrt(Math.pow(r/(e/a),2)+Math.pow(u,2))))}}(o,a,u,f.width,f.height,i);s&&(n.FocalLength35efl={value:s,description:si(s)},r=1);var c=function(e,t){if(e&&t){var n=Hf(t/e);if(n)return{value:n,description:n.toFixed(1)}}}(i,s);c&&(n.ScaleFactorTo35mmEquivalent=c,r=1);var d=function(e){if(e){var t=Hf(2*Math.atan(36/(2*e))*(180/Math.PI));if(t)return{value:t,description:t.toFixed(1)+" deg"}}}(s);if(d&&(n.FieldOfView=d,r=1),r)return n}};function zf(e,t,n,r){return r&&e[t]&&e[t][n]?e[t][n].value:!r&&e[n]?e[n].value:void 0}function Vf(e){if("string"==typeof e){var t=e.split("/",3);return 1===t.length?Hf(e):Xf(t)}return Array.isArray(e)?Xf(e):Hf(e)}function Hf(e){var t;return"number"==typeof e?t=e:"string"==typeof e&&(t=Number(e)),t>0&&t<1/0?t:void 0}function Xf(e){if(2===e.length)return Hf(Hf(e[0])/Hf(e[1]))}var Wf=["iptc","xmp","photoshop","icc","makerNotes"];function Kf(e){for(var t=e.mergeSteps,n=e.deferredResults,r=e.parsedGroups,i=e.expanded,o=e.tagFilter,a=e.dataView,u=e.tiffHeaderOffset,f=e.exifDataView,s=e.fileType,c=e.pngTextChunks,d=e.pngTextIsAsync,l=e.thumbnailIfdTags,p=e.deps,g={},h=[],m=0;m<t.length;m++)g=Jf({step:t[m],deferredResults:n,parsedGroups:r,expanded:i,tagFilter:o,dataView:a,tiffHeaderOffset:u,exifDataView:f,fileType:s,thumbnailIfdTags:l,embeddedExifThumbnails:h,tags:g,deps:p});return Oe.USE_PNG&&i&&d&&o.shouldReturnGroup("png")&&g.png&&(g.pngText=p.objectAssign({},g.png)),Oe.USE_PNG&&i&&o.shouldReturnGroup("png")&&p.hasPngTextData(c)&&g.png&&!g.pngText&&(g.pngText=p.objectAssign({},g.png)),g}function Jf(e){var t=e.step,n=e.deferredResults,r=e.parsedGroups,i=e.expanded,o=e.tagFilter,a=e.dataView,u=e.tiffHeaderOffset,f=e.exifDataView,s=e.fileType,c=e.thumbnailIfdTags,d=e.embeddedExifThumbnails,l=void 0===d?[]:d,p=e.tags,g=e.deps;if("mergeGroupAssign"===t.type){var h=g.filterTagsForReturn(t.groupKey,t.parsedTags,o);return $f(p,t.groupKey,h,i,g)}if("mergeGroupMerge"===t.type){var m=g.filterTagsForReturn(t.groupKey,t.parsedTags,o);return function(e,t,n,r,i){return r?(e[t]?e[t]=i.objectAssign({},e[t],n):e[t]=n,e):i.objectAssign({},e,n)}(p,t.groupKey,m,i,g)}if(Oe.USE_XMP&&"mergeXmpGroupAssign"===t.type)return Zf(p,g.filterTagsForReturn("xmp",t.parsedTags,o),i,g);if(Oe.USE_ICC&&"mergeIccDeferred"===t.type){var v=n[t.deferredKey],y=g.filterTagsForParse("icc",v,o);return r.icc=y,o.shouldReturnGroup("icc")?$f(p,"icc",g.filterTagsForReturn("icc",y,o),i,g):p}if(Oe.USE_JXL&&"mergeBrobExifDeferred"===t.type){var b=n[t.deferredKey];return b?(qf(l,b.thumbnail),0===Object.keys(b.exifTags).length?p:es({exifTags:b.exifTags,carriedGroups:b.carriedGroups,parsedGroups:r,expanded:i,tagFilter:o,tags:p,deps:g,merge:ts(g)})):p}if(Oe.USE_JXL&&"mergeBrobXmpDeferred"===t.type){var S=n[t.deferredKey];if(!S||0===Object.keys(S).length)return p;var x=g.filterTagsForParse("xmp",S,o);return r.xmp=x,o.shouldReturnGroup("xmp")?Zf(p,g.filterTagsForReturn("xmp",x,o),i,g):p}if(Oe.USE_PNG&&"mergePngFile"===t.type){var A=g.filterTagsForReturn("png",t.parsedTags,o);return o.shouldReturnGroup("png")?i?(p.png=p.png?g.objectAssign({},p.png,A):A,p.pngFile=A,p):g.objectAssign({},p,A):p}if(Oe.USE_PNG&&"mergePngChunk"===t.type){var I=g.filterTagsForReturn("png",t.parsedTags,o);return o.shouldReturnGroup("png")?i?(p.png=p.png?g.objectAssign({},p.png,I):I,p):g.objectAssign({},p,I):p}if(Oe.USE_PNG&&"processPngTextReadTags"===t.type)return qf(l,t.embeddedExifThumbnail),Qf({readTags:t.readTags,embeddedExifTags:t.embeddedExifTags,exifCarriedGroups:t.exifCarriedGroups,embeddedIptcTags:t.embeddedIptcTags,parsedGroups:r,expanded:i,tagFilter:o,tags:p,deps:g});if(Oe.USE_PNG&&"processPngTextReadTagsDeferredList"===t.type){for(var P=n[t.deferredKey]||[],T=function(e){var t=[];return{group:function(t,r,i){t[r]=n(t[r]),e.objectAssign(t[r],i)},topLevel:function(t,r){return e.objectAssign(n(t),r)}};function n(n){if(-1!==t.indexOf(n))return n;var r=e.objectAssign({},n);return t.push(r),r}}(g),C=0;C<P.length;C++){var E=P[C];qf(l,E.embeddedExifThumbnail),p=Qf({readTags:E.readTags||{},embeddedExifTags:E.embeddedExifTags,exifCarriedGroups:E.exifCarriedGroups,embeddedIptcTags:E.embeddedIptcTags,parsedGroups:r,expanded:i,tagFilter:o,tags:p,deps:g,merge:T})}return p}if(Oe.USE_EXIF&&"gps"===t.type){if(i&&o.shouldReturnGroup("gps")&&r.exif){var O=g.getGpsGroupFromExifTags(r.exif);if(O){var U=g.filterTagsForReturn("gps",O,o);p.gps=U}}return p}if((Oe.USE_EXIF||Oe.USE_XMP)&&"composite"===t.type){if(!o.shouldReturnGroup("composite"))return p;var w=p,L=i;o.isActive&&(w={exif:r.exif,file:r.file},L=1);var M=g.Composite.get(w,L);return M?$f(p,"composite",g.filterTagsForReturn("composite",M,o),i,g):p}if("thumbnail"===t.type){if(delete p.Thumbnail,!o.shouldReturnGroup("thumbnail")||!o.shouldReturnTag("thumbnail","Thumbnail"))return p;var F=function(e){var t=e.thumbnailIfdTags,n=e.tagFilter,r=e.dataView,i=e.exifDataView,o=e.tiffHeaderOffset,a=e.deps;if(t){var u=a.filterTagsForParse("thumbnail",t,n);return Oe.USE_EXIF&&Oe.USE_THUMBNAIL&&a.Thumbnail.get(i||r,u,o)}}({thumbnailIfdTags:c,tagFilter:o,dataView:a,exifDataView:f,tiffHeaderOffset:u,deps:g}),R=F;return Yf(F)||(R=function(e){if((Oe.USE_PNG||Oe.USE_JXL)&&Oe.USE_EXIF&&Oe.USE_THUMBNAIL)return e.filter(Yf)[0]}(l)||F),R&&(p.Thumbnail=R),p}if("metadataRange"===t.type){if(!i)return p;var D=function(e,t,n,r){var i=(e||[]).slice(),o=!!t;if(r&&r.mpf&&Array.isArray(r.mpf.Images))for(var a=0;a<r.mpf.Images.length;a++){var u=r.mpf.Images[a];if(u&&u.ImageOffset&&u.ImageSize){var f=u.ImageOffset.value,s=u.ImageSize.value;"number"!=typeof f||f<=0||"number"!=typeof s||s<=0||i.push({type:"mpfImage",start:f,end:f+s})}}if(0!==i.length){i.sort(function(e,t){return e.start-t.start});for(var c=i[0].start,d=i[0].end,l=1;l<i.length;l++)i[l].end>d&&(d=i[l].end);var p=n&&"number"==typeof n.byteLength?n.byteLength:0;return{start:c,end:d,complete:!o&&d<=p,blocks:i}}}(t.metadataBlocks,t.metadataTruncated,a,r);return D&&(p.metadataRange=D),p}return"fileType"===t.type?(delete p.FileType,s&&o.shouldReturnGroup("file")&&o.shouldReturnTag("file","FileType")&&(i?(p.file||(p.file={}),p.file.FileType=s):p.FileType=s),p):p}function qf(e,t){t&&e.push(t)}function Yf(e){return!!e&&!!e.image}function $f(e,t,n,r,i){return r?(e[t]=n,e):i.objectAssign({},e,n)}function Zf(e,t,n,r){if(n)return e.xmp=t,e;var i=r.objectAssign({},t);return delete i._raw,r.objectAssign({},e,i)}function Qf(e){var t=e.readTags,n=e.embeddedExifTags,r=e.exifCarriedGroups,i=e.embeddedIptcTags,o=e.parsedGroups,a=e.expanded,u=e.tagFilter,f=e.tags,s=e.deps,c=e.merge,d=void 0===c?ts(s):c;if(n&&(f=es({exifTags:n,carriedGroups:r||{},parsedGroups:o,expanded:a,tagFilter:u,tags:f,deps:s,merge:d})),i){var l=s.filterTagsForParse("iptc",i,u);if(d.group(o,"iptc",l),u.shouldReturnGroup("iptc")){var p=s.filterTagsForReturn("iptc",l,u);a?d.group(f,"iptc",p):f=d.topLevel(f,p)}}if(u.shouldReturnGroup("png")){var g=s.filterTagsForParse("png",t,u),h=s.filterTagsForReturn("png",g,u);o.pngText=g,a?(d.group(f,"png",h),h&&Object.keys(h).length>0&&d.group(f,"pngText",h)):f=d.topLevel(f,h)}return f}function es(e){for(var t=e.exifTags,n=e.carriedGroups,r=e.parsedGroups,i=e.expanded,o=e.tagFilter,a=e.tags,u=e.deps,f=e.merge,s=void 0,c=0;c<Wf.length;c++){var d=Wf[c],l=n[d];void 0!==l&&("xmp"!==d||i?a=h(d,l):s=l)}if(t){var p=u.filterTagsForParse("exif",t,o);if(f.group(r,"exif",p),o.shouldReturnGroup("exif")){var g=u.filterTagsForReturn("exif",p,o);i?f.group(a,"exif",g):a=f.topLevel(a,g)}}return void 0!==s&&(a=h("xmp",s,1)),a;function h(e,t,n){if(f.group(r,e,t),!o.shouldReturnGroup(e))return a;var s,c,d=u.filterTagsForReturn(e,t,o);return i?(f.group(a,e,d),a):f.topLevel(a,n?(s=d,delete(c=u.objectAssign({},s))._raw,c):d)}}function ts(e){return{group:function(t,n,r){t[n]=t[n]?e.objectAssign({},t[n],r):r},topLevel:function(t,n){return e.objectAssign({},t,n)}}}function ns(e){this.name="MetadataMissingError",this.message=e||"No Exif data",this.stack=Error().stack}ns.prototype=Error();var rs={MetadataMissingError:ns},is=4,os=65536,as=2,us=65536,fs=Oe.USE_EXIF?b({},ci,hi):{},ss={load:ds,loadView:ps,errors:rs},cs=rs;function ds(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("auto"===t.length)return function(e){if(1!=e.expanded||1!=e.includeOffsets)throw Error('length: "auto" requires both expanded: true and includeOffsets: true.')}(t),Pe(ls)(e,t);if(ee(e)||te(e)){y();var n=ee(e)?re:ie,r=b({},t,{async:1});return n(e,r).then(function(e){return ls(e,r)})}return ls(e,t)}function ls(e,t){return ps(function(e){if(r(e))return new DataView(e.buffer,e.byteOffset,e.byteLength);try{return new DataView(e)}catch(e){throw new TypeError("Passed data type is unsupported. Pass an ArrayBuffer, SharedArrayBuffer, DataView, a typed array such as a Uint8Array or Node Buffer, or a File.")}}(e),t)}function ps(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.expanded,i=void 0===r?0:r,o=t.async,a=void 0===o?0:o,u=t.computed,c=void 0===u?0:u,d=t.includeUnknown,l=void 0===d?0:d,p=t.includeOffsets,g=void 0===p?0:p,h=t.domParser,m=void 0===h?void 0:h,v=t.includeTags,S=void 0===v?void 0:v,x=t.excludeTags,A=void 0===x?void 0:x,I=t.decompress,P=void 0===I?void 0:I;e=function(e){return function(e){return function(e){return!!e&&"function"==typeof e.getUint8&&"number"==typeof e.byteOffset&&"number"==typeof e.byteLength&&!!e.buffer&&"function"==typeof e.buffer.slice}(e)&&(e.byteOffset>0||e.byteLength<e.buffer.byteLength)}(e)?n(e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength)):e}(e),P=function(e){return{brotli:e?e.brotli:void 0,deflate:e?e.deflate:void 0,maxDecompressedSize:e?e.maxDecompressedSize:void 0,budget:{remaining:N(e),warned:0,failed:0,pending:void 0}}}(P);var T=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.includeTags,n=e.excludeTags,r=!!t,i=!!n,o=r||i,a=Object.create(null),u=Object.create(null),f=Object.create(null);if(!o)return Ur();var s=r&&(Fr(t,"iptc")||Fr(t,"xmp")||Fr(t,"icc")||Fr(t,"photoshop")||Fr(t,"makerNotes")||Fr(t,"thumbnail")||Fr(t,"gps")||Fr(t,"composite")),c=r&&Fr(t,"composite"),d=Object.create(null);r&&(d=function(e){var t=function(e){var t=Object.create(null);if(!e)return t;for(var n in Array.isArray(e.exif)&&e.exif.length>0&&(t[Ar.exifIfdPointer]=1,function(e,t){for(var n=0;n<t.length;n++){var r=t[n];if("number"==typeof r&&(Ir[r]&&(e[Ar.gpsInfoIfdPointer]=1),Pr[r]&&(e[Ar.interoperabilityIfdPointer]=1)),"string"==typeof r){var i=r.toLowerCase();0===i.indexOf("gps")&&(e[Ar.gpsInfoIfdPointer]=1),0!==i.indexOf("interoperability")&&0!==i.indexOf("relatedimage")||(e[Ar.interoperabilityIfdPointer]=1)}}}(t,e.exif)),Cr)if(Or(e[n])){for(var r=Cr[n],i=0;i<r.length;i++)t[r[i]]=1;t[Ar.exifIfdPointer]=1}return Or(e.gps)&&(t[Ar.gpsInfoIfdPointer]=1,t[Ar.exifIfdPointer]=1),t}(e);return Fr(e,"composite")&&(function(e,t){for(var n=0;n<t.length;n++)e[t[n]]=1}(t,Er.exif),t[Ar.exifIfdPointer]=1),t}(t));var l=Object.create(null);for(var p in r&&c&&(l=function(e){for(var t=Object.create(null),n=0;n<e.length;n++)t[e[n].toLowerCase()]=1;return t}(Er.file)),xr){var g=r&&Object.prototype.hasOwnProperty.call(t,p),h=void 0;i&&Object.prototype.hasOwnProperty.call(n,p)&&!g&&(h=n[p]);var m=Dr({groupKey:p,includeValue:g?t[p]:void 0,excludeValue:h,extraIncludeNames:Object.create(null)});a[p]=r?g:1,g&&Rr(t[p])&&(a[p]=0),m.excludeAll&&(a[p]=0),u[p]=m;var v=Dr({groupKey:p,includeValue:Lr({groupKey:p,hasIncludeTags:r,hasIncludeEntry:g,includeTags:t,shouldParseExif:s,shouldParseFile:c}),excludeValue:h,extraIncludeNames:Mr({groupKey:p,hasIncludeTags:r,hasIncludeEntry:g,shouldParseExif:s,shouldParseFile:c,exifIncludeDependencies:d,fileIncludeDependencies:l})});f[p]=v}return{isActive:o,shouldReturnGroup:y,shouldParseGroup:b,shouldReturnTag:function(e,t,n){return xr[e]?y(e)?Nr(u[e],t,n):0:1},shouldParseTag:function(e,t,n){return xr[e]?b(e)?Nr(f[e],t,n):0:1}};function y(e){return xr[e]?!!a[e]:1}function b(e){return xr[e]?y(e)?1:"exif"===e?s:"file"===e?c:0:1}}({includeTags:S,excludeTags:A}),C=Object.create(null),E=[],O=Object.create(null),U=[],w=0,L=void 0,F=void 0,R=void 0,G=0,k=or.parseAppMarkers(e,a,i&&g),_=k.fileType,j=k.fileDataOffset,z=k.jfifDataOffset,V=k.tiffHeaderOffset,H=k.iptcDataOffset,X=k.xmpChunks,W=k.iccChunks,K=k.mpfDataOffset,J=k.pngHeaderOffset,q=k.pngTextChunks,Y=k.pngChunkOffsets,$=k.vp8xChunkOffset,Z=k.gifHeaderOffset,Q=k.brobExifChunk,ee=k.brobXmpChunk,te=k.jxlCodestreamOffset,ne=k.imageDimensionsOffset,re=k.pixelInformationOffset,ie=k.metadataBlocks,oe=k.metadataTruncated,ae=k.exifDataView,ue=k.xmpDataView,fe=function(e){var t=e.fileDataOffset,n=e.jfifDataOffset,r=e.tiffHeaderOffset,i=e.iptcDataOffset,o=e.xmpChunks,a=e.iccChunks,u=e.mpfDataOffset,f=e.pngHeaderOffset,s=e.pngTextChunks,c=e.pngChunkOffsets,d=e.vp8xChunkOffset,l=e.gifHeaderOffset,p=e.jxlCodestreamOffset,g=e.imageDimensionsOffset,h=e.pixelInformationOffset;return!!e.fileType||Oe.USE_JPEG&&Oe.USE_FILE&&void 0!==t||Oe.USE_JPEG&&Oe.USE_JFIF&&void 0!==n||Oe.USE_EXIF&&void 0!==r||Oe.USE_JPEG&&Oe.USE_IPTC&&void 0!==i||Oe.USE_XMP&&As(o)||Oe.USE_ICC&&Is(a)||Oe.USE_MPF&&void 0!==u||Oe.USE_PNG&&Oe.USE_PNG_FILE&&void 0!==f||Oe.USE_PNG&&Ps(s)||Oe.USE_PNG&&void 0!==c||Oe.USE_WEBP&&void 0!==d||Oe.USE_GIF&&void 0!==l||Oe.USE_JXL&&void 0!==p||(Oe.USE_HEIC||Oe.USE_AVIF)&&(void 0!==g||void 0!==h)}({fileType:_,fileDataOffset:j,jfifDataOffset:z,tiffHeaderOffset:V,iptcDataOffset:H,xmpChunks:X,iccChunks:W,mpfDataOffset:K,pngHeaderOffset:J,pngTextChunks:q,pngChunkOffsets:Y,vp8xChunkOffset:$,gifHeaderOffset:Z,jxlCodestreamOffset:te});if(Oe.USE_JPEG&&Oe.USE_FILE&&void 0!==j&&T.shouldParseGroup("file")&&function(e){if(!e)return 1;var t=e.composite,n=e.file;return 1==t||Array.isArray(t)&&t.length>0?1:!(Array.isArray(n)&&1===n.length&&"FileType"===n[0])}(S)){var se=ys("file",Li.read(e,j),T);C.file=se,T.shouldReturnGroup("file")&&E.push({type:"mergeGroupAssign",groupKey:"file",parsedTags:se})}if(Oe.USE_JPEG&&Oe.USE_JFIF&&void 0!==z&&T.shouldParseGroup("jfif")){var ce=ys("jfif",Ki.read(e,z),T);C.jfif=ce,T.shouldReturnGroup("jfif")&&E.push({type:"mergeGroupAssign",groupKey:"jfif",parsedTags:ce})}if(Oe.USE_EXIF&&void 0!==V&&T.shouldParseGroup("exif")){var de=function(e,t,n,r,i){var o=void 0===e?void 0:Jr(e);try{var a=ms(e,t,n,r,i,o);return{tags:a.tags,byteOrder:a.byteOrder,valueBudget:o}}catch(e){return{tags:{},byteOrder:ke.BIG_ENDIAN,valueBudget:o}}}(ae||e,V,l,c,T),le=de.tags,pe=de.byteOrder,ge=de.valueBudget;F=ge,le.Thumbnail&&(L=le.Thumbnail,delete le.Thumbnail);var he=ys("exif",le,T);C.exif=he;for(var me=He(he,ae||e,V,pe,F,{decompressed:0,hasIptcBlock:void 0!==H}),ve=0;ve<Wf.length;ve++){var ye=Wf[ve];if(void 0!==me[ye]&&(C[ye]=me[ye],T.shouldReturnGroup(ye)))if("xmp"===ye){var be={type:"mergeXmpGroupAssign",parsedTags:me.xmp};i?E.push(be):R=be}else E.push({type:"mergeGroupAssign",groupKey:ye,parsedTags:me[ye]})}T.shouldReturnGroup("exif")&&E.push({type:"mergeGroupAssign",groupKey:"exif",parsedTags:he}),!i&&R&&(E.push(R),R=void 0)}if(void 0===F&&void 0!==e&&(F=Jr(e)),Oe.USE_JPEG&&Oe.USE_IPTC&&void 0!==H&&T.shouldParseGroup("iptc")){var Se=ys("iptc",so.read(e,H,l,T,F),T);C.iptc=Se,T.shouldReturnGroup("iptc")&&E.push({type:"mergeGroupAssign",groupKey:"iptc",parsedTags:Se})}if(Oe.USE_XMP&&As(X)&&T.shouldParseGroup("xmp")){var xe=ys("xmp",Ho.read(ue||e,X,m),T);C.xmp=xe,T.shouldReturnGroup("xmp")&&E.push({type:"mergeXmpGroupAssign",parsedTags:xe})}var Ae=function(e,t){if(Oe.USE_EXIF&&Oe.USE_THUMBNAIL&&e.shouldReturnTag("thumbnail","Thumbnail")){var n=0;return function(r,i,o){var a=ys("thumbnail",i,e),u=a.JPEGInterchangeFormatLength;if(!function(e,t){return!!e&&"number"==typeof e.value&&e.value<=t}(u,as*t.byteLength+us-n))return a;var f=_f.get(r,a,o);return f.image&&(n+=u.value),f}}}(T,e);if(Oe.USE_JXL&&Oe.USE_EXIF&&Q&&void 0===V&&T.shouldParseGroup("exif")&&a){var Ie=gs(e,Q);U.push(D(Ie,M,void 0,"dataview",P).then(function(e){var t=ot(e,0);qr(F,e.byteLength);var n=ms(e,t,l,c,T,F),r=n.tags,i=n.byteOrder,o=ri(r,e,t,Ae),a=Xe(e,r,t,i,F,{decompressed:1,hasIptcBlock:0});O.brobExif={exifTags:r,carriedGroups:a,thumbnail:o}}).catch(function(){O.brobExif=void 0})),E.push({type:"mergeBrobExifDeferred",deferredKey:"brobExif"})}if(Oe.USE_JXL&&Oe.USE_XMP&&ee&&!As(X)&&T.shouldParseGroup("xmp")&&a){var Pe=gs(e,ee);U.push(D(Pe,M,void 0,"dataview",P).then(function(t){hs(t.byteLength,e)?O.brobXmp={}:O.brobXmp=Ho.read(t,[{dataOffset:0,length:t.byteLength}],m)}).catch(function(){O.brobXmp={}})),E.push({type:"mergeBrobXmpDeferred",deferredKey:"brobXmp"})}if(Oe.USE_ICC&&Is(W)&&T.shouldParseGroup("icc")){var Te=cu.read(e,W,a,P);if(B(Te)){if(!a)throw Error("Promise is required when async mode is enabled.");U.push(Te.then(function(e){O.iccApp=e})),E.push({type:"mergeIccDeferred",deferredKey:"iccApp"})}else{var Ce=ys("icc",Te,T);C.icc=Ce,T.shouldReturnGroup("icc")&&E.push({type:"mergeGroupAssign",groupKey:"icc",parsedTags:Ce})}}if(Oe.USE_MPF&&void 0!==K&&T.shouldParseGroup("mpf")){var Ee=ys("mpf",Ai.read(e,K,l,c,T,F),T);C.mpf=Ee,T.shouldReturnGroup("mpf")&&E.push({type:"mergeGroupAssign",groupKey:"mpf",parsedTags:Ee})}if(Oe.USE_PNG&&Oe.USE_PNG_FILE&&void 0!==J&&T.shouldParseGroup("png")){var Ue=ys("png",_u.read(e,J),T);C.pngFile=Ue,T.shouldReturnGroup("png")&&E.push({type:"mergePngFile",parsedTags:Ue})}if(Oe.USE_PNG&&Ps(q)&&(T.shouldParseGroup("png")||T.shouldParseGroup("exif")||T.shouldParseGroup("iptc"))){var we=Hu.read(e,q,a,l,c,T,P,F,Ae,Xe,{exif:Oe.USE_EXIF?ms:void 0,iptc:Oe.USE_IPTC?so.read:void 0}),Le=we.readTags,Me=we.embeddedExifTags,Fe=we.embeddedIptcTags,Re=we.embeddedExifThumbnail,De=we.exifCarriedGroups,Ne=we.readTagsPromise;w=!!Ne,E.push({type:"processPngTextReadTags",readTags:Le,embeddedExifTags:Me,embeddedIptcTags:Fe,embeddedExifThumbnail:Re,exifCarriedGroups:De}),Ne&&(U.push(Ne.then(function(e){O.pngTextTagList=e})),E.push({type:"processPngTextReadTagsDeferredList",deferredKey:"pngTextTagList"}))}if(Oe.USE_PNG&&void 0!==Y&&T.shouldParseGroup("png")){var Ge=ys("png",Af.read(e,Y),T);C.pngChunk=Ge,T.shouldReturnGroup("png")&&E.push({type:"mergePngChunk",parsedTags:Ge})}if(Oe.USE_WEBP&&void 0!==$&&T.shouldParseGroup("riff")){var _e=ys("riff",Uf.read(e,$),T);C.riff=_e,T.shouldReturnGroup("riff")&&E.push({type:"mergeGroupMerge",groupKey:"riff",parsedTags:_e})}if(Oe.USE_GIF&&void 0!==Z&&T.shouldParseGroup("gif")){var Be=ys("gif",Rf.read(e,Z),T);C.gif=Be,T.shouldReturnGroup("gif")&&E.push({type:"mergeGroupMerge",groupKey:"gif",parsedTags:Be})}if(Oe.USE_JXL&&void 0!==te&&T.shouldParseGroup("file")){var je=ys("file",ki.read(e,te),T);C.file=je,T.shouldReturnGroup("file")&&E.push({type:"mergeGroupAssign",groupKey:"file",parsedTags:je})}if((Oe.USE_HEIC||Oe.USE_AVIF)&&(void 0!==ne||void 0!==re)&&T.shouldParseGroup("file")){var ze=ys("file",Vi.read(e,ne,re),T);C.file=ze,T.shouldReturnGroup("file")&&E.push({type:"mergeGroupAssign",groupKey:"file",parsedTags:ze})}if(Oe.USE_EXIF&&E.push({type:"gps"}),(Oe.USE_EXIF||Oe.USE_XMP)&&E.push({type:"composite"}),E.push({type:"thumbnail"}),E.push({type:"fileType"}),i&&g&&E.push({type:"metadataRange",metadataBlocks:vs(ie,_),metadataTruncated:!!oe}),!fe)throw new rs.MetadataMissingError;var Ve={objectAssign:b,hasPngTextData:Ps,filterTagsForParse:ys,filterTagsForReturn:bs,getGpsGroupFromExifTags:Oe.USE_EXIF?xs:void 0,Composite:Oe.USE_EXIF||Oe.USE_XMP?jf:void 0,Thumbnail:Oe.USE_EXIF&&Oe.USE_THUMBNAIL?_f:void 0};return a?(y(),Promise.all(U).then(function(){return Kf({mergeSteps:E,deferredResults:O,parsedGroups:C,expanded:i,tagFilter:T,dataView:e,tiffHeaderOffset:V,exifDataView:ae,fileType:_,pngTextChunks:q,pngTextIsAsync:w,thumbnailIfdTags:L,deps:Ve})})):Kf({mergeSteps:E,deferredResults:O,parsedGroups:C,expanded:i,tagFilter:T,dataView:e,tiffHeaderOffset:V,exifDataView:ae,fileType:_,pngTextChunks:q,pngTextIsAsync:w,thumbnailIfdTags:L,deps:Ve});function He(t,n,r,i,o,a){var u,d,p={};try{if(Oe.USE_IPTC&&t["IPTC-NAA"]&&!a.hasIptcBlock&&T.shouldParseGroup("iptc")){var g=so.read(t["IPTC-NAA"].value,0,l,T,o);p.iptc=ys("iptc",g,T)}if(Oe.USE_XMP&&t.ApplicationNotes&&(u=t.ApplicationNotes.value,Array.isArray(u)&&"number"==typeof u[0])&&!As(X)&&T.shouldParseGroup("xmp")&&(!a.decompressed||(d=t.ApplicationNotes.value.length,!hs(G+d,e)&&(G+=d,1)))){var h=Ho.read(s(t.ApplicationNotes.value),void 0,m);p.xmp=ys("xmp",h,T)}if(Oe.USE_PHOTOSHOP&&t.ImageSourceData&&t.PhotoshopSettings&&Array.isArray(t.PhotoshopSettings.value)&&T.shouldParseGroup("photoshop")){var v=$a.read(t.PhotoshopSettings.value,l,T);p.photoshop=ys("photoshop",v,T)}if(Oe.USE_ICC&&t.ICC_Profile&&!Is(W)&&T.shouldParseGroup("icc")){var y=cu.read(t.ICC_Profile.value,[{offset:0,length:t.ICC_Profile.value.length,chunkNumber:1,chunksTotal:1}]);p.icc=ys("icc",y,T)}Oe.USE_MAKER_NOTES&&t.MakerNote&&T.shouldParseGroup("makerNotes")&&(function(e){return e.Make&&e.Make.value&&Array.isArray(e.Make.value)&&"Canon"===e.Make.value[0]&&e.MakerNote&&e.MakerNote.__offset}(t)?p.makerNotes=wu.read(n,r,t.MakerNote.__offset,i,l,c,T,o):function(e){return Array.isArray(e.MakerNote.value)&&e.MakerNote.value.length>7&&"PENTAX "===f(e.MakerNote.value.slice(0,7))&&e.MakerNote.__offset}(t)&&(p.makerNotes=Du.read(n,r,t.MakerNote.__offset,l,c,T,o)))}finally{t.MakerNote&&delete t.MakerNote.__offset}return p}function Xe(e,t,n,r,i,o){try{return He(ys("exif",t,T),e,n,r,i,o)}catch(e){return{}}}}function gs(e,t){var n=Math.max(0,Math.min(t.length,e.byteLength-t.dataOffset));return new DataView(e.buffer,e.byteOffset+t.dataOffset,n)}function hs(e,t){return e>is*t.byteLength+os}function ms(e,t,n,r,i,o){return oi.read(e,t,n,r,i,o,((a={})[ur]=fs,a[sr]=fs,a[cr]=bi,a[dr]=Si,Oe.USE_THUMBNAIL&&(a[fr]=ci),a),function(e){return Oe.USE_THUMBNAIL&&e.shouldParseGroup("thumbnail")}(i));var a}function vs(e,t){if(!e)return e;var n=t&&t.value,r=e.length>=m,i=e.length-1;return e.filter(function(e,t){return function(e,t){switch(t){case"file":return"png"===e?Oe.USE_PNG_FILE:Oe.USE_FILE;case"exif":return Oe.USE_EXIF;case"jfif":return Oe.USE_JFIF;case"xmp":return Oe.USE_XMP;case"iptc":return Oe.USE_IPTC;case"icc":return Oe.USE_ICC;case"mpf":return Oe.USE_MPF;default:return 1}}(n,e.type)||r&&t===i})}function ys(e,t,n){return n.isActive?Ss(e,t,n.shouldParseTag):t}function bs(e,t,n){return n.isActive?Ss(e,t,n.shouldReturnTag):t}function Ss(e,t,n){if(!t)return t;var r={};for(var i in t){var o=t[i];n(e,i,a(o))&&S(r,i,o)}return r;function a(e){if(e){if(Array.isArray(e)){if(0===e.length)return;return e[0].id}return e.id}}}function xs(e){var t=void 0;if(e.GPSLatitude&&e.GPSLatitudeRef){t=t||{};try{t.Latitude=De(e.GPSLatitude.value),"S"===e.GPSLatitudeRef.value.join("")&&(t.Latitude=-t.Latitude)}catch(e){}}if(e.GPSLongitude&&e.GPSLongitudeRef){t=t||{};try{t.Longitude=De(e.GPSLongitude.value),"W"===e.GPSLongitudeRef.value.join("")&&(t.Longitude=-t.Longitude)}catch(e){}}if(e.GPSAltitude&&e.GPSAltitudeRef){t=t||{};try{t.Altitude=e.GPSAltitude.value[0]/e.GPSAltitude.value[1],1===e.GPSAltitudeRef.value&&(t.Altitude=-t.Altitude)}catch(e){}}if(t)return t}function As(e){return Array.isArray(e)&&e.length>0}function Is(e){return Array.isArray(e)&&e.length>0}function Ps(e){return Array.isArray(e)&&e.length>0}}(),t;var e,t});
1
+ !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 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(){"use strict";function n(e,t,n){return new DataView(e,t,n)}function r(e){return!!e&&!!e.buffer&&"number"==typeof e.byteOffset&&"number"==typeof e.byteLength}function i(e,t,n){for(var r=[],i=0;i<n&&t+i<e.byteLength;i++)r.push(e.getUint8(t+i));return f(r)}function o(e,t,n){for(var r=[],i=0;i+2<=n&&t+i+2<=e.byteLength;i+=2)r.push(e.getUint16(t+i));return 0===r[r.length-1]&&r.pop(),f(r)}function a(e,t){var n=e.getUint8(t);return[n,i(e,t+1,n)]}e.r(t),e.d(t,{default:function(){return Cc},errors:function(){return kc},load:function(){return Ec},loadView:function(){return Lc}});var u=8192;function f(e){if(!Array.isArray(e))throw new TypeError("Expected an array.");for(var t=[],n=[],r=0,i=0;i<e.length;i++)i in e&&(n[r++]=e[i],r===u&&(t.push(String.fromCharCode.apply(null,n)),r=0));return n.length=r,t.push(String.fromCharCode.apply(null,n)),t.join("")}function c(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];if(n-t<=u)return s(e,t,n,r);for(var i=[],o=t;o<n;o+=u)i.push(s(e,o,Math.min(o+u,n),r));return i.join("")}function s(e,t,n,r){for(var i=t;i<n;i++)r[i-t]=e[i];return r.length=n-t,String.fromCharCode.apply(null,r)}function d(e,t,n){if(!Array.isArray(e))throw new TypeError("Expected an array.");for(var r=[],i=[],o=0;o<e.length;o+=65536)i.push(l(e,o,Math.min(o+65536,e.length),t,n,r));return i.join(n)}function l(e,t,n,r,i,o){for(var a=t;a<n;a++)o[a-t]=r(e[a]);return o.length=n-t,o.join(i)}function p(e){var t=g(e);return void 0===t?e:t}function g(e){for(var t=1,n=0;n<e.length;){var r=m(e,n);if(0===r)return;r>1&&(t=0),n+=r}return t?e:decodeURIComponent(escape(e))}function m(e,t){var n,r=e.charCodeAt(t);if(r<128)return 1;var i=128,o=191;if(r>=194&&r<=223)n=2;else if(r>=224&&r<=239)n=3,224===r?i=160:237===r&&(o=159);else{if(!(r>=240&&r<=244))return 0;n=4,240===r?i=144:244===r&&(o=143)}if(t+n>e.length)return 0;var a=e.charCodeAt(t+1);if(!(a>=i&&a<=o))return 0;for(var u=2;u<n;u++){var f=e.charCodeAt(t+u);if(!(f>=128&&f<=191))return 0}return n}var h=4096;function v(e,t){return e.push(t),t}function y(e,t,n,r){if(e&&t)if(e.length<h)e.push({block:t,start:n,end:r});else{var i=e[e.length-1];i.start=Math.min(i.start,n),i.end=Math.max(i.end,r)}}function b(){if("undefined"==typeof Promise)throw Error("Promise is required when async mode is enabled.")}function S(){for(var e=1;e<arguments.length;e++)for(var t in arguments[e])x(arguments[0],t,arguments[e][t]);return arguments[0]}function x(e,t,n){"__proto__"!==t?e[t]=n:Object.defineProperty(e,t,{value:n,enumerable:1,writable:1,configurable:1})}function I(e){return"__proto__"!==e&&Object.prototype.hasOwnProperty.call(Object.prototype,e)?e+"_":e}function A(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){var t=e.indexOf(","),n=e.substring(0,t),r=e.substring(t+1);if(-1!==n.indexOf(";base64")){var i=function(e){return-1===e.indexOf("%")||/[\u0080-\uffff]/.test(e)?e:c(w(e))}(r);if("undefined"!=typeof atob)return function(e){for(var t=new Uint8Array(e.length),n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t.buffer}(atob(i));if("undefined"==typeof Buffer)return;return"undefined"!=typeof Buffer.from?Buffer.from(i,"base64"):new Buffer(i,"base64")}return w(r).buffer}function w(e){for(var t=/[\u0080-\uffff]/.test(e)?unescape(encodeURIComponent(e)):e,n=new Uint8Array(t.length-2*function(e){for(var t=0,n=0;n<e.length;n++)O(e,n)&&(t++,n+=2);return t}(t)),r=0,i=0;i<t.length;i++)O(t,i)?(n[r++]=16*T(t.charCodeAt(i+1))+T(t.charCodeAt(i+2)),i+=2):n[r++]=t.charCodeAt(i);return n}function O(e,t){return 37===e.charCodeAt(t)&&t+2<e.length&&-1!==T(e.charCodeAt(t+1))&&-1!==T(e.charCodeAt(t+2))}function T(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-65+10:e>=97&&e<=102?e-97+10:-1}function U(e,t,n){return C(n,Math.max(0,t-e.length))+e}function C(e,t){return Array(t+1).join(e)}var k=void 0,E=0,F="brotli",L=134217728,M=1073741823;function R(e){return{brotli:e?e.brotli:void 0,deflate:e?e.deflate:void 0,maxDecompressedSize:e?e.maxDecompressedSize:void 0,budget:{remaining:B(e),warned:0,failed:0,pending:void 0}}}function N(e){return"deflate"===e?E:"brotli"===e?F:e}function D(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"string",i=arguments.length>4?arguments[4]:void 0,o=B(i),a=function(e,t){return e&&e.budget?e.budget:{remaining:t,warned:0,failed:0,pending:void 0}}(i,o);if(t!==k&&a.remaining<0)return K(a,o);var u=function(e){return e===E?"deflate":e===F?"brotli":void 0}(t);if(i&&u){var f=i[u];if("function"==typeof f)return function(e,t,n,r,i,o){return new Promise(function(a){i.pending?a(function(e,t,n,r,i,o){var a=i.pending,u=new DataView(t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength));return G(i,a.then(function(){return i.remaining<0?K(i,o):j(e,u,n,r,i,o)}))}(e,t,n,r,i,o)):a(j(e,t,n,r,i,o))})}(f,e,r,n,a,o)}if(t===E&&"function"==typeof DecompressionStream)return X(e,"deflate",a,o).then(function(e){return W(e,r,n)});if(t===F){if("function"==typeof DecompressionStream)try{return X(e,"brotli",a,o).then(function(e){return W(e,r,n)})}catch(e){}return Promise.reject("Brotli decompression is not supported in this environment. Pass in a brotli decompression function via the decompress option.")}if(void 0!==t)return Promise.reject("Unknown compression method ".concat(t,"."));if("string"===r)try{return new TextDecoder(n).decode(e)}catch(t){return e?c(H(e)):""}return e}function B(e){return e&&"number"==typeof e.maxDecompressedSize?e.maxDecompressedSize:L}function G(e,t){var n=t.then(function(){},function(){});return e.pending=n,n.then(function(){e.pending===n&&(e.pending=void 0)}),t}function j(e,t,n,r,i,o){var a,u=Math.min(i.remaining+1,M);try{a=e(H(t),{maxOutputLength:u})}catch(e){return _(e,i,o,u)}if(z(a)){var f=Promise.resolve(a).then(function(e){return V(e,n,r,i,o)},function(e){return _(e,i,o,u)});return i.pending?f:G(i,f)}return V(a,n,r,i,o)}function _(e,t,n,r){return e&&"ERR_BUFFER_TOO_LARGE"===e.code?(t.remaining=-1,K(t,n)):(function(e,t){e.failed?e.remaining-=t:e.failed=1}(t,r),Promise.reject(e))}function z(e){return!!e&&"function"==typeof e.then}function V(e,t,n,r,i){return r.remaining-=function(e){return e&&"number"==typeof e.byteLength?e.byteLength:0}(e),r.remaining<0?K(r,i):function(e,t,n){return"dataview"===t?e instanceof ArrayBuffer?new DataView(e):0===e.byteOffset&&e.byteLength===e.buffer.byteLength?new DataView(e.buffer):new DataView(e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength)):new TextDecoder(n).decode(e)}(e,t,n)}function H(e){return new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}function X(e,t,n,r){var i=new DecompressionStream(t),o=new Blob([e]).stream().pipeThrough(i).getReader(),a=[],u=0;return function e(){return o.read().then(function(t){var i=t.done,f=t.value;return i?function(e,t){for(var n=new Uint8Array(t),r=0,i=0;i<e.length;i++)n.set(e[i],r),r+=e[i].byteLength;return n.buffer}(a,u):(u+=f.byteLength,n.remaining-=f.byteLength,n.remaining<0?o.cancel().then(function(){return K(n,r)}):(a.push(f),e()))})}()}function W(e,t,n){return"dataview"===t?new DataView(e):new TextDecoder(n).decode(e)}function K(e,t){return e.warned||"undefined"==typeof console||"function"!=typeof console.warn||(e.warned=1,console.warn("ExifReader: the total decompressed metadata size for this call would exceed the maximum of ".concat(t," bytes, so this and any later compressed metadata blocks are skipped."))),Promise.reject("Decompressed metadata exceeded the maximum allowed total size of ".concat(t," bytes."))}var J={builtin:function(e){return q(e,[Y,Z,$])},optionalPackage:function(e){return q(e,[Y])}};function q(e,t){for(var n=0;n<t.length;n++)try{return t[n](e)}catch(e){}}function Y(e){switch(e){case"fs":try{return require("fs")}catch(e){throw e}case"http":return require("http");case"https":return require("https");case"@xmldom/xmldom":try{return require("@xmldom/xmldom")}catch(e){throw e}case"@xmldom/xmldom/package.json":try{return require("@xmldom/xmldom/package.json")}catch(e){throw e}default:throw Error("No webpack require for ".concat(e,"."))}}function Z(e){return globalThis.process.getBuiltinModule(e)}function $(e){return globalThis.process.mainModule.require(e)}var Q=200,ee=299,te=416;function ne(e){return"string"==typeof e}function re(e){return"undefined"!=typeof File&&e instanceof File}function ie(e){return/^data:[^;,]*(;base64)?,/.test(e)}function oe(e,t){var n=ue(t);return n?/^\w+:\/\//.test(e)?"undefined"!=typeof fetch?ce(e,n).then(function(e){return e.buffer}):me(e,n).then(function(e){return e.buffer}):ie(e)?Promise.resolve().then(function(){return P(e)}):ye(e,n).then(function(e){return e.buffer}):fe()}function ae(e,t){var n=ue(t);return n?Se(e,n).then(function(e){return e.buffer}):fe()}function ue(e){var t=e?e.length:void 0;if(null==t)return{start:0};if(Number.isFinite(t)&&t>=0){var n=Math.floor(t);return{start:0,end:n,maxBytes:n}}}function fe(){return Promise.reject(Error('The length option must be a finite non-negative number or "auto".'))}function ce(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.start,r=void 0===n?0:n,i=t.end,o=t.maxBytes;if(pe(r,i))return Promise.resolve({buffer:new ArrayBuffer(0),totalSize:void 0,status:void 0});var a={method:"GET"};return(r>0||void 0!==i&&i!==1/0)&&(a.headers={range:ge(r,i)}),fetch(e,a).then(function(e){var t=e&&"number"==typeof e.status?e.status:void 0;if(void 0!==t&&!function(e){return e>=Q&&e<=ee?1:e===te}(t)){de(e.body);var n=e.statusText||"";return Promise.reject(Error("Could not fetch file: ".concat(t," ").concat(n).trim()))}var r=function(e){if(e&&e.headers&&"function"==typeof e.headers.get)return ve(e.headers.get("Content-Range"),e.headers.get("Content-Length"))}(e);return t===te?(de(e.body),{buffer:new ArrayBuffer(0),totalSize:r,status:t}):function(e,t){return se(t)?e.body&&"function"==typeof e.body.getReader?function(e,t){return new Promise(function(n,r){var i=le(t);function o(){if(i.isFull())return n(i.toArrayBuffer()),void de(e);e.read().then(a).then(void 0,u)}function a(e){e.done?n(i.toArrayBuffer()):(i.add(e.value),o())}function u(t){r(t),de(e)}o()})}(e.body.getReader(),t):Promise.resolve(e.arrayBuffer()).then(function(e){return e.slice(0,t)}):Promise.resolve(e.arrayBuffer())}(e,o).then(function(e){return{buffer:e,totalSize:r,status:t}})})}function se(e){return Number.isInteger(e)&&e>=0}function de(e){Promise.resolve().then(function(){return e.cancel()}).then(void 0,function(){})}function le(e){var t=new Uint8Array(0),n=0;return{add:function(r){var i,o=Math.min(r.byteLength,e-n);n+o>t.length&&((i=new Uint8Array(Math.min(e,Math.max(n+o,2*t.length)))).set(t.subarray(0,n)),t=i),t.set(r.subarray(0,o),n),n+=o},isFull:function(){return n>=e},toArrayBuffer:function(){if(t.length===n)return t.buffer;var e=new Uint8Array(n);return e.set(t.subarray(0,n)),e.buffer}}}function pe(e,t){return void 0!==t&&t!==1/0&&t<=e}function ge(e,t){return void 0===t||t===1/0?"bytes=".concat(e,"-"):"bytes=".concat(e,"-").concat(t-1)}function me(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.start,r=void 0===n?0:n,i=t.end,o=t.maxBytes;return pe(r,i)?Promise.resolve({buffer:Buffer.alloc(0),totalSize:void 0,status:void 0}):new Promise(function(t,n){var a={};(r>0||void 0!==i&&i!==1/0)&&(a.headers={range:ge(r,i)});var u=function(e){var t=J.builtin(/^https:\/\//.test(e)?"https":"http");return t&&t.get}(e);if(!u)return n(Error("Node http support is not available."));u(e,a,function(e){if(e.statusCode>=Q&&e.statusCode<=ee){var r=he(e);if(se(o))!function(e,t,n,r){var i=le(t),o=0;function a(){o=1,n(Buffer.from(i.toArrayBuffer()))}e.on("error",r),i.isFull()?(a(),e.destroy()):(e.on("data",function(t){o||(i.add(t),i.isFull()&&(a(),e.destroy()))}),e.on("end",a))}(e,o,function(n){return t({buffer:n,totalSize:r,status:e.statusCode})},n);else{var i=[];e.on("data",function(e){return i.push(Buffer.from(e))}),e.on("error",function(e){return n(e)}),e.on("end",function(){return t({buffer:Buffer.concat(i),totalSize:r,status:e.statusCode})})}}else if(e.statusCode===te){var a=he(e);e.destroy(),t({buffer:Buffer.alloc(0),totalSize:a,status:e.statusCode})}else n(Error("Could not fetch file: ".concat(e.statusCode," ").concat(e.statusMessage))),e.destroy()}).on("error",function(e){return n(e)})})}function he(e){if(e&&e.headers)return ve(e.headers["content-range"],e.headers["content-length"])}function ve(e,t){if(e){var n=/\/(\d+|\*)$/.exec(e);if(n&&"*"!==n[1])return parseInt(n[1],10)}if(t){var r=parseInt(t,10);if(Number.isFinite(r))return r}}function ye(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.start,r=void 0===n?0:n,i=t.end,o=t.totalSize;return new Promise(function(t,n){var a=J.builtin("fs");if(!a)return n(Error("Node file system support is not available."));a.open(e,function(u,f){if(u)return n(u);!function(e,t,n,r){if(void 0!==n)return r(null,n);e.stat(t,function(e,t){return r(e,e?void 0:t.size)})}(a,e,o,function(o,u){if(o)return a.close(f,function(){return n(o)});var c=void 0===i||i===1/0||i>u?u:i,s=Math.min(Math.max(0,r),c),d=c-s,l=Buffer.alloc(d);if(0===d)return a.close(f,function(n){return be(e,n,l,u,t)});a.read(f,{buffer:l,length:d,position:s},function(r){if(r)return a.close(f,function(){return n(r)});a.close(f,function(n){return be(e,n,l,u,t)})})})})})}function be(e,t,n,r,i){t&&console.warn("Could not close file ".concat(e,":"),t),i({buffer:n,totalSize:r})}function Se(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.start,r=void 0===n?0:n,i=t.end;return new Promise(function(t){var n="number"==typeof e.size?e.size:void 0,o=function(e,t,n,r){if(e&&"function"==typeof e.slice&&(t>0||void 0!==n&&n!==1/0)){var i=void 0===n||n===1/0?r:n;return e.slice(t,i)}return e}(e,r,i,n);t(function(e){return"function"==typeof e.arrayBuffer?Promise.resolve(e.arrayBuffer()):new Promise(function(t,n){var r=new FileReader;r.onload=function(e){return t(e.target.result)},r.onerror=function(){return n(r.error)},r.readAsArrayBuffer(e)})}(o).then(function(e){return{buffer:e,totalSize:n}}))})}function xe(e){return e instanceof ArrayBuffer?new Uint8Array(e):"undefined"!=typeof Buffer&&Buffer.isBuffer(e)||r(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e)}var Ie=131072,Ae=4,Pe='length: "auto" could not locate metadata in this file (no metadata blocks found after reading the file — e.g. plain TIFF, bare JPEG XL codestream, or a file with no recognizable metadata).',we='length: "auto" is not supported for this file type (no leading metadata container — e.g. plain TIFF or bare JPEG XL codestream).';function Oe(e){return function(e,r){b();var i=S({},r,{async:1});return ne(e)?function(e,r){return/^\w+:\/\//.test(e)?"undefined"!=typeof fetch?n({readRange:function(t,n){return ce(e,{start:t,end:n,maxBytes:n})},options:r}):n({readRange:function(t,n){return me(e,{start:t,end:n,maxBytes:n})},options:r}):ie(e)?Promise.resolve().then(function(){return P(e)}).then(function(e){return t(e,r)}):n({readRange:function(t,n,r){return ye(e,{start:t,end:n,totalSize:r?r.totalSize:void 0})},options:r})}(e,i):re(e)?function(e,t){return n({readRange:function(t,n){return Se(e,{start:t,end:n})},options:t})}(e,i):t(e,i)};function t(t,n){return Promise.resolve().then(function(){return e(t,n)}).then(function(e){if(!e||!e.metadataRange)throw Error(we);var n=e.metadataRange.end;return e.metadataRange.buffer=function(e,t){if("undefined"!=typeof Buffer&&Buffer.isBuffer(e))return Buffer.from(e.subarray(0,t));if(e instanceof ArrayBuffer)return e.slice(0,t);if("undefined"!=typeof SharedArrayBuffer&&e instanceof SharedArrayBuffer)return e.slice(0,t);if(r(e)){var n=Math.max(0,Math.min(t,e.byteLength));return e.buffer.slice(e.byteOffset,e.byteOffset+n)}return function(e){return!!e&&!e.buffer&&"function"==typeof e.slice&&"number"==typeof e.byteLength}(e)?e.slice(0,t):e}(t,n),e.metadataRange.fetched=Ce(e.metadataRange.buffer),e.metadataRange.requests=0,e})}function n(e){return i({readRange:e.readRange,options:e.options,buffer:null,fetched:0,requests:0,totalSize:void 0,need:Ie,iter:0})}function i(t){return t.iter>=Ae?o(t):(void 0!==t.totalSize&&(t.need=Math.min(t.need,t.totalSize)),t.need<=t.fetched?o(t):t.readRange(t.fetched,t.need,{totalSize:t.totalSize}).then(function(n){return t.requests++,n.status===te?function(t){return t.readRange(0,1/0,{totalSize:void 0}).then(function(n){return t.requests++,t.buffer=n.buffer,t.fetched=Ce(t.buffer),void 0!==n.totalSize&&(t.totalSize=n.totalSize),Promise.resolve(e(t.buffer,t.options))}).then(function(e){if(!e||!e.metadataRange)throw Error(Pe);return Ue(e,t.buffer,t.fetched,t.requests)})}(t):(Te(t,n),Promise.resolve(e(t.buffer,t.options)).then(function(e){return function(e,t){var n=t&&t.metadataRange;if(n&&n.complete)return Ue(t,e.buffer,e.fetched,e.requests);var r=void 0!==e.totalSize&&e.fetched>=e.totalSize;if(!n&&r)throw Error(Pe);var o=function(e){var t=e.range,n=e.totalSize,r=e.fetched;return t?Math.min(Math.max(t.end,2*r),void 0!==n?n:1/0):void 0!==n?n:2*r}({range:n,totalSize:e.totalSize,fetched:e.fetched});if(o<=e.fetched){if(n)return Ue(t,e.buffer,e.fetched,e.requests);throw Error(Pe)}return e.need=o,e.iter++,i(e)}(t,e)}))}))}function o(t){return console.warn('ExifReader: length:"auto" did not converge in '.concat(Ae," iterations; falling back to full read.")),(void 0!==t.totalSize&&t.fetched<t.totalSize?t.readRange(t.fetched,t.totalSize,{totalSize:t.totalSize}).then(function(e){t.requests++,Te(t,e)}):void 0===t.totalSize?t.readRange(t.fetched,1/0,{totalSize:t.totalSize}).then(function(e){t.requests++,Te(t,e)}):Promise.resolve()).then(function(){return Promise.resolve(e(t.buffer,t.options))}).then(function(e){if(!e||!e.metadataRange)throw Error(Pe);return Ue(e,t.buffer,t.fetched,t.requests)})}}function Te(e,t){if(t.status===Q&&e.fetched>0)return e.buffer=t.buffer,e.fetched=Ce(e.buffer),void(void 0!==t.totalSize&&(e.totalSize=t.totalSize));void 0!==t.totalSize&&void 0===e.totalSize&&(e.totalSize=t.totalSize),e.buffer=function(e,t){if(!e)return t;if(!t)return e;if("undefined"!=typeof Buffer&&Buffer.isBuffer(e)&&Buffer.isBuffer(t))return Buffer.concat([e,t]);var n=xe(e),r=xe(t),i=new Uint8Array(n.byteLength+r.byteLength);return i.set(n,0),i.set(r,n.byteLength),i.buffer}(e.buffer,t.buffer),e.fetched=Ce(e.buffer)}function Ue(e,t,n,r){var i=e.metadataRange.end;return e.metadataRange.buffer=function(e,t){return!e||"number"!=typeof t||t<0?e:"undefined"!=typeof Buffer&&Buffer.isBuffer(e)?Buffer.from(e.subarray(0,Math.min(t,e.length))):e instanceof ArrayBuffer||"undefined"!=typeof SharedArrayBuffer&&e instanceof SharedArrayBuffer?e.slice(0,Math.min(t,e.byteLength)):e}(t,i),e.metadataRange.fetched=n,e.metadataRange.requests=r,e}function Ce(e){return e?"number"==typeof e.byteLength?e.byteLength:"number"==typeof e.length?e.length:0:0}var ke={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_JXL:1,USE_WEBP:1,USE_GIF:1,USE_MAKER_NOTES:1};function Ee(e){if(Le(e))return Me(e)||"Undefined";if(e.length>=8){var t=f(e.slice(0,8));if("ASCII\0\0\0"===t)return c(e,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){var n=c(e,8);return/[\x20-\x7e]/.test(n)?n:"[Undefined encoding]"}}return"Undefined"}function Fe(e){return Array.isArray(e)?Le(e)?Me(e):c(e):e}function Le(e){return Array.isArray(e)&&"number"!=typeof e[0]}function Me(e){return e.filter(Re).join(", ")}function Re(e){return"string"==typeof e}function Ne(e,t){var n=t+"";return Object.prototype.hasOwnProperty.call(e,n)?e[n]:"Unknown"}function De(e){return e[0][0]/e[0][1]+e[1][0]/e[1][1]/60+e[2][0]/e[2][1]/3600}var Be=18761,Ge=19789,je={BIG_ENDIAN:Ge,LITTLE_ENDIAN:Be,getByteOrder:function(e,t){if(e.getUint16(t)===Be)return Be;if(e.getUint16(t)===Ge)return Ge;throw Error("Illegal byte order value. Faulty image.")}};function _e(e,t,n){return t+n<=e.byteLength}function ze(e,t,n,r,i,o,a,u,f){if(void 0===f)return[];for(var c=[],s=r.items,d=i.item.extent.extentIndex+i.item.extent.extentOffset+i.item.extent.extentLength,l=i.item.itemId+i.item.constructionMethod+i.item.dataReferenceIndex+i.item.baseOffset+i.item.extentCount,p=0,g=0;g<f&&!(s+l>t);g++){var m={extents:[]};m.itemId=He(e,s,n),s+=i.item.itemId,m.constructionMethod=1===n||2===n?15&e.getUint16(s):void 0,s+=i.item.constructionMethod,m.dataReferenceIndex=e.getUint16(s),s+=i.item.dataReferenceIndex,m.baseOffset=We(e,s,i.item.baseOffset),s+=i.item.baseOffset,m.extentCount=e.getUint16(s),s+=i.item.extentCount;for(var h=Ve(m.extentCount,d,s,t,1048576-p),v=0;v<h;v++){var y={};y.extentIndex=Xe(e,n,s,u),s+=i.item.extent.extentIndex,y.extentOffset=We(e,s,o),s+=i.item.extent.extentOffset,y.extentLength=We(e,s,a),s+=i.item.extent.extentLength,m.extents.push(y)}if(p+=h,c.push(m),(m.extentCount-h)*d>0)break}return c}function Ve(e,t,n,r,i){return 0===t?0:Math.max(0,Math.min(e,Math.floor((r-n)/t),i))}function He(e,t,n){return n<2?e.getUint16(t):2===n?e.getUint32(t):void 0}function Xe(e,t,n,r){if((1===t||2===t)&&r>0)return We(e,n,r)}function We(e,t,n){return 4===n?e.getUint32(t):8===n?function(e,t){return e.getUint32(t+4)}(e,t):0}function Ke(e,t,n,r){return 8===e||8===t||8===n||8===r}var Je=1165519206,qe=1835625829,Ye={type:void 0};function Ze(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.byteLength;if(_e(e,t,8))try{var r=Qe(e,t),o=r.length,a=r.contentOffset;if(o<a-t||a>n)return;var u=e.getUint32(t+4);if(1718909296===u)return function(e,t,n){return{type:"ftyp",majorBrand:i(e,t,4),length:n}}(e,a,o);if(1768977008===u)return function(e,t,n,r,i){return{type:"iprp",subBoxes:ht(e,n,r-(n-t),i),length:r}}(e,t,a,o,n);if(1768973167===u)return function(e,t,n,r,i){return{type:"ipco",properties:lt(e,n,r-(n-t),i),length:r}}(e,t,a,o,n);if(1668246642===u)return function(e,t,n){return{type:"colr",icc:pt(e,t),length:n}}(e,a,o);if(1768186228===u)return function(e,t){return{type:"idat",contentOffset:e,length:t}}(a,o);if(!_e(e,a,1))return;var f=e.getUint8(a);return 1835365473===u?function(e,t,n,r,i){return{type:"meta",subBoxes:ht(e,n+3,r-(n+3-t),i),length:r}}(e,t,a+1,o,n):1768714083===u?function(e,t,n,r,i,o){var a=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}}(n,r+3),u=a.offsets,f=a.sizes,c=e.getUint8(u.offsetSize)>>4;f.item.extent.extentOffset=c;var s=15&e.getUint8(u.lengthSize);f.item.extent.extentLength=s;var d=e.getUint8(u.baseOffsetSize)>>4;f.item.baseOffset=d;var l=function(e,t,n){if(1===n||2===n)return 15&e.getUint8(t)}(e,u.indexSize,n);f.item.extent.extentIndex=void 0!==l?l:0;var p=function(e,t,n){return n<2?e.getUint16(t):2===n?e.getUint32(t):void 0}(e,u.itemCount,n);return{type:"iloc",items:ze(e,Math.min(t+i,o),n,u,f,c,s,l,p),uses64BitFields:Ke(c,s,d,l),length:i}}(e,t,f,a+1,o,n):1768517222===u?function(e,t,n,r,i,o){var a=r+3+(0===n?2:4);return{type:"iinf",itemInfos:ht(e,a,i-(a-t),o),length:i}}(e,t,f,a+1,o,n):1768842853===u?function(e,t,n,r,i,o){r+=3;var a={type:"infe",length:i},u=Math.min(t+i,o);if(0!==n&&1!==n||(a.itemId=e.getUint16(r),r+=2,a.itemProtectionIndex=e.getUint16(r),r+=2,a.itemName=yt(e,r,u).value,r+=a.itemName.length+1),n>=2){2===n?(a.itemId=e.getUint16(r),r+=2):3===n&&(a.itemId=e.getUint32(r),r+=4),a.itemProtectionIndex=e.getUint16(r),r+=2,a.itemType=e.getUint32(r);var f=yt(e,r+=4,u);if(a.itemName=f.value,!f.isTerminated)return a;if(r+=a.itemName.length+1,a.itemType===qe){var c=yt(e,r,u);if(a.contentType=c.value,!c.isTerminated)return a;u>(r+=a.contentType.length+1)&&(a.contentEncoding=yt(e,r,u).value)}else 1970432288===a.itemType&&(a.itemUri=yt(e,r,u).value)}return a}(e,t,f,a+1,o,n):1885959277===u?function(e,t,n,r,i,o){var a=r+4;return a+(0===n?2:4)>gt(e,t,i,o)?mt(i):{type:"pitm",itemId:0===n?e.getUint16(a):e.getUint32(a),length:i}}(e,t,f,a,o,n):1768975713===u?function(e,t,n,r,i,o){var a=r+4,u=gt(e,t,i,o);return a+4>u?mt(i):{type:"ipma",version:n,flags:16777215&e.getUint32(r),entryCountOffset:a,end:u,length:i}}(e,t,f,a,o,n):1769173093===u?function(e,t,n,r,i){var o=n+4;return o+8>gt(e,t,r,i)?mt(r):{type:"ispe",dimensionsOffset:o,length:r}}(e,t,a,o,n):1885960297===u?function(e,t,n,r,i,o){var a=r+4,u=gt(e,t,i,o);return 0!==n||a+1>u||a+1+e.getUint8(a)>u?mt(i):{type:"pixi",channelCountOffset:a,length:i}}(e,t,f,a,o,n):mt(o)}catch(e){return}}function $e(e,t){if(!e)return 0;try{var n=Ze(e,0);return void 0!==n&&-1!==t.indexOf(n.majorBrand)}catch(e){return 0}}function Qe(e,t){var n=e.getUint32(t);if(function(e){return 0===e}(n))return{length:e.byteLength-t,contentOffset:t+4+4};if(function(e){return 1===e}(n)){if(!_e(e,t,16))return{length:0,contentOffset:t+4+4};if(function(e,t){return 0===e.getUint32(t+8)}(e,t))return{length:e.getUint32(t+12),contentOffset:t+4+4+8}}return{length:n,contentOffset:t+4+4}}function et(e,t){var n=[],r=function(e){for(var t=0;t+4+4<=e.byteLength;){var n=Ze(e,t);if(void 0===n)break;if("meta"===n.type)return n;t+=n.length}}(e);return r&&(function(e){var t=e.subBoxes.find(function(e){return"iloc"===e.type});t&&t.uses64BitFields&&console.warn("This file uses 8-byte iloc offset, length or index fields which are currently not fully supported by ExifReader. Contact the maintainer to get it fixed.")}(r),tt(n,function(e,t,n){try{var r=function(e){return e.subBoxes.find(function(e){return"iinf"===e.type}).itemInfos.find(function(e){return e.itemType===Je})}(t).itemId,i=ut(t,r);ot(i);var o=it(t),a={kind:"exif"};if(nt(n,i,a,o),i.extents.length>1){var u=at(e,i,o);if(void 0===u)return;return a.tiffHeaderOffset=ft(u,0),a.dataView=u,a}var f=rt(i,i.extents[0],o);if(void 0===f)return;return a.tiffHeaderOffset=ft(e,f),a}catch(e){return}}(e,r,t)),tt(n,function(e,t,n){try{var r=function(e){return e.subBoxes.find(function(e){return"iinf"===e.type}).itemInfos.find(function(e){return e.itemType===qe&&"application/rdf+xml"===e.contentType})}(t).itemId,i=ut(t,r);ot(i);var o=it(t),a={kind:"xmp"};if(nt(n,i,a,o),i.extents.length>1){var u=at(e,i,o);if(void 0===u)return;return a.chunks=[{dataOffset:0,length:u.byteLength}],a.dataView=u,a}var f=i.extents[0],c=rt(i,f,o);if(void 0===c)return;return a.chunks=[{dataOffset:c,length:f.extentLength}],a}catch(e){return}}(e,r,t)),tt(n,function(e,t){try{var n=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(n){var r={kind:"icc",chunks:[n]};return y(t,r,n.offset,n.offset+n.length),r}}catch(e){}}(r,t))),tt(n,function(e,t){var n=function(e,t){try{if(!t)return{};var n=t.subBoxes.find(function(e){return"pitm"===e.type}),r=t.subBoxes.find(function(e){return"iprp"===e.type});if(!n||!r)return{};var i=r.subBoxes.find(function(e){return"ipco"===e.type});if(!i)return{};var o=function(e,t,n){for(var r=0;r<t.length;r++)if("ipma"===t[r].type){var i=ct(e,t[r],n);if(i)return i}}(e,r.subBoxes,n.itemId);if(!o)return{};var a=dt(o,i.properties,"ispe"),u=dt(o,i.properties,"pixi");return{imageDimensionsOffset:a&&a.dimensionsOffset,pixelInformationOffset:u&&u.channelCountOffset}}catch(e){return{}}}(e,t),r=n.imageDimensionsOffset,i=n.pixelInformationOffset;if(void 0!==r||void 0!==i){var o={kind:"isoBmffFile"};return void 0!==r&&(o.imageDimensionsOffset=r),void 0!==i&&(o.pixelInformationOffset=i),o}}(e,r)),n}function tt(e,t){void 0!==t&&e.push(t)}function nt(e,t,n,r){if(e)for(var i=0;i<t.extents.length;i++){var o=t.extents[i],a=rt(t,o,r);void 0!==a&&y(e,n,a,a+o.extentLength)}}function rt(e,t,n){var r=e.constructionMethod;return void 0===r||0===r?e.baseOffset+t.extentOffset:1===r&&void 0!==n?n+e.baseOffset+t.extentOffset:void 0}function it(e){var t=e.subBoxes.find(function(e){return"idat"===e.type});return t?t.contentOffset:void 0}function ot(e){2===e.constructionMethod&&console.warn("This file uses iloc constructionMethod 2 (item_offset) which is currently not supported by ExifReader. Contact the maintainer to get it fixed.")}function at(e,t,n){for(var r=[],i=0,o=0;o<t.extents.length;o++){var a=t.extents[o],u=rt(t,a,n);if(void 0===u||u+a.extentLength>e.byteLength)return;if(r.push({start:u,length:a.extentLength}),(i+=a.extentLength)>e.byteLength)return}for(var f=new Uint8Array(i),c=0,s=0;s<r.length;s++){for(var d=r[s],l=d.start,p=d.length,g=0;g<p;g++)f[c+g]=e.getUint8(l+g);c+=p}return new DataView(f.buffer)}function ut(e,t){return e.subBoxes.find(function(e){return"iloc"===e.type}).items.find(function(e){return e.itemId===t})}function ft(e,t){return t+4+e.getUint32(t)}function ct(e,t,n){for(var r=0===t.version?2:4,i=1&~t.flags?1:2,o=e.getUint32(t.entryCountOffset),a=t.entryCountOffset+4,u=0;u<o&&a+r+1<=t.end;u++){var f=2===r?e.getUint16(a):e.getUint32(a),c=e.getUint8(a+r);if(a+=r+1,f===n)return st(e,a,Math.min(c,Math.floor((t.end-a)/i)),i);a+=c*i}}function st(e,t,n,r){for(var i=2===r?32767:127,o=[],a=0;a<n;a++){var u=t+a*r,f=2===r?e.getUint16(u):e.getUint8(u);o.push(f&i)}return o}function dt(e,t,n){for(var r=0;r<e.length;r++){var i=t[e[r]-1];if(void 0!==i&&i.type===n)return i}}function lt(e,t,n,r){var i=[];return vt(e,t,n,r,function(e){i.push(void 0!==e.type?e:Ye)}),i}function pt(e,t){var n=i(e,t,4);if("prof"===n||"rICC"===n)return{offset:t+4,length:e.getUint32(t+4),chunkNumber:1,chunksTotal:1}}function gt(e,t,n,r){return Math.min(t+n,r,e.byteLength)}function mt(e){return{type:void 0,length:e}}function ht(e,t,n,r){var i=[Je,qe],o=[];return vt(e,t,n,r,function(e){void 0===e.type||void 0!==e.itemType&&-1===i.indexOf(e.itemType)||o.push(e)}),o}function vt(e,t,n,r,i){for(var o=Math.min(t+n,r),a=t;a+8<=o;){var u=Ze(e,a,o);if(void 0===u)break;i(u),a+=u.length}}function yt(e,t,n){var r=Math.min(n,t+65536),i=function(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.byteLength,r=Math.min(n,e.byteLength),i=[],o=0;t+o<r;){var a=e.getUint8(t+o);if(0===a)break;i.push(a),o++}return f(i)}(e,t,r);return{value:i,isTerminated:t+i.length<r}}var bt=12,St=2,xt=65496,It=2,At=4,Pt=2,wt=2,Ot=10,Tt=18,Ut=33,Ct=79,kt=18,Et=8,Ft="ICC_PROFILE\0",Lt=At+Ft.length,Mt=Lt+1,Rt=255,Nt=1024,Dt="MPF\0",Bt=65472,Gt=65474,jt=65476,_t=65499,zt=65501,Vt=65498,Ht=65504,Xt=65505,Wt=65506,Kt=65517,Jt=65519,qt=65534,Yt=65535,Zt="JFIF",$t="Exif",Qt="http://ns.adobe.com/xap/1.0/\0",en="http://ns.adobe.com/xmp/extension/\0",tn="Photoshop 3.0",nn="8BIM";function rn(e,t){return e.getUint16(t)===Bt}function on(e,t){return e.getUint16(t)===Gt}function an(e,t){var n=Ft.length;return e.getUint16(t)===Wt&&t+Mt<e.byteLength&&i(e,t+At,n)===Ft}function un(e,t){var n=Dt.length;return e.getUint16(t)===Wt&&i(e,t+At,n)===Dt}function fn(e,t){var n=Zt.length;return e.getUint16(t)===Ht&&i(e,t+At,n)===Zt&&0===e.getUint8(t+At+n)}function cn(e,t){var n=$t.length;return e.getUint16(t)===Xt&&i(e,t+At,n)===$t&&0===e.getUint8(t+At+n)}function sn(e,t){return e.getUint16(t)===Xt&&function(e,t){var n=Qt.length;return i(e,t+At,n)===Qt}(e,t)}function dn(e,t){return e.getUint16(t)===Xt&&function(e,t){var n=en.length;return i(e,t+At,n)===en}(e,t)}function ln(e,t){return{dataOffset:e+Ut,length:t-(Ut-Pt)}}function pn(e,t){return{dataOffset:e+Ct,length:t-(Ct-Pt)}}function gn(e,t){var n=tn.length,r=nn.length,o=t+At+n+1;return o+r<=e.byteLength&&e.getUint16(t)===Kt&&i(e,t+At,n)===tn&&0===e.getUint8(t+At+n)&&i(e,o,r)===nn}function mn(e,t){var n=e.getUint16(t);return n>=Ht&&n<=Jt||n===qt||n===Bt||n===Gt||n===jt||n===_t||n===zt||n===Vt}function hn(e,t){return e.getUint16(t)===Yt}function vn(e,t,n,r){var i=function(e,t,n){try{if(t+8>n)return;var r=e.getUint16(t+0),i=r===je.LITTLE_ENDIAN;if(!i&&r!==je.BIG_ENDIAN)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+a*bt+4)<=n&&a>0}}catch(e){return}}(e,r,t+Pt+n);if(!i)return 0;var o=Number.isInteger(i.ifdEntries)?i.ifdEntries:0;return(i.isValid?1e9:0)+1e6*o+n}var yn="‰PNG\r\n\n",bn=4,Sn=4,xn=0,In=bn,An=bn+Sn,Pn="XML:com.adobe.xmp\0",wn="tEXt",On="iTXt",Tn="zTXt",Un="pHYs",Cn="tIME",kn="eXIf",En="iCCP",Fn=79,Ln="raw profile type exif",Mn="raw profile type iptc",Rn="STATE_KEYWORD",Nn="STATE_COMPRESSION",Dn="STATE_LANG",Bn="STATE_TRANSLATED_KEYWORD",Gn="STATE_TEXT",jn=1,_n=1,zn=0,Vn=79,Hn=79,Xn=h,Wn={};function Kn(e){return{kind:"pngText",text:{chunkType:e,name:void 0,valueOffset:void 0,valueLength:void 0}}}function Jn(e,t,n){return t===On&&i(e,n+An,Pn.length)===Pn}function qn(e){return e===wn||e===On||e===Tn}function Yn(e){return[Un,Cn].includes(e)}function Zn(e,t,n,r){var i=function(e,t,n,r){for(var i,o,a=[],u=[],f=Rn,c=k,s=Math.min(t+n,e.byteLength),d=0;d<n&&t+d<e.byteLength;d++)if(f!==Nn){if(f===Gn){i=t+d,o=n-d;break}var l=e.getUint8(t+d);if(0===l)f=Qn(r,f);else if(f===Rn){if(a.length>=Vn)return;a.push(l)}else if(f===Dn){if(u.length>=Hn)return;u.push(l)}}else c=$n({type:r,dataView:e,offset:t+d,chunkEnd:s}),r===On&&(d+=jn),f=Qn(r,f);return{keywordChars:a,langChars:u,compressionMethod:c,valueOffset:i,valueLength:o}}(e,t,n,r);if(void 0===i)return Kn(r);var o=function(e,t,n){var r=f(n);if(e===wn||0===t.length)return r;var i=f(t);return"".concat(r," (").concat(i,")")}(r,i.langChars,i.keywordChars),a={kind:er(o)};return i.compressionMethod!==k&&(a.compression=i.compressionMethod===zn?"deflate":"unknown"),a.text={chunkType:r,name:o,valueOffset:i.valueOffset,valueLength:i.valueLength},a}function $n(e){var t=e.type,n=e.dataView,r=e.offset,i=e.chunkEnd;if(t===On){if(r+1<i&&n.getUint8(r)===_n)return n.getUint8(r+1)}else if(t===Tn)return n.getUint8(r);return k}function Qn(e,t){return t===Rn&&[On,Tn].includes(e)?Nn:t===Nn?e===On?Dn:Gn:t===Dn?Bn:Gn}function er(e){var t=e.toLowerCase();return t===Ln?"exif":t===Mn?"iptc":"pngText"}function tr(e,t){t+=An+Pn.length+1+1;for(var n=0;n<2&&t<e.byteLength;)0===e.getUint8(t)&&n++,t++;if(!(n<2))return t}function nr(e,t,n){var r=Math.min(t+n,e.byteLength),o=function(e,t,n){for(var r=0;r<=Fn&&t+r<n;r++)if(0===e.getUint8(t+r))return r}(e,t,r);if(void 0!==o){var a=t+o+1;if(!(a+1>r))return{profileName:i(e,t,o),compressionMethod:e.getUint8(a),compressedProfileOffset:a+1}}}Wn[wn]=Kn(wn),Wn[On]=Kn(On),Wn[Tn]=Kn(Tn);var rr=["heic","heix","hevc","hevx","heim","heis","hevm","hevs","mif1"],ir=["avif"],or=[0,0,0,12,74,88,76,32,13,10,135,10],ar=[255,10],ur=1165519206,fr=2020437024,cr=1651666786,sr=1786276963,dr=1786276976,lr=4,pr=4,gr=4;function mr(e){return!e||e.byteLength<ar.length?0:e.getUint8(0)===ar[0]&&e.getUint8(1)===ar[1]}function hr(e,t){void 0!==t&&e.push(t)}var vr=6,yr=["GIF87a","GIF89a"],br=13,Sr=0,xr="<?xpacket begin",Ir=["<?xpacket end=","</x:xmpmeta>"];function Ar(e,t){for(var n=0;n+t.length<=e.byteLength;n++)if(Pr(e,n,t))return 1;return 0}function Pr(e,t,n){for(var r=0;r<n.length;r++)if(e.getUint8(t+r)!==n.charCodeAt(r))return 0;return 1}var wr={parseAppMarkers:function(e,t){var n=t?[]:void 0;if(ke.USE_TIFF&&function(e){return!!e&&e.byteLength>=4&&function(e){var t=e.getUint16(0)===je.LITTLE_ENDIAN;return 42===e.getUint16(2,t)}(e)}(e))return Or([{kind:"exif",tiffHeaderOffset:0}],"tiff","TIFF",n);if(ke.USE_JPEG&&function(e){return!!e&&e.byteLength>=St&&e.getUint16(0)===xt}(e))return Or(function(e,t){for(var n,r,i,o,a,u,f,c,s,d,l=[],p=It,g=0,m=0;p+At+5<=e.byteLength;){var h=void 0;if(e.getUint16(p)===Vt&&(m=1),rn(e,p))n=e.getUint16(p+Pt),r=p+Pt,(i=i||v(l,{kind:"file"})).dataOffset=r,h=i;else if(on(e,p))n=e.getUint16(p+Pt),i=i||v(l,{kind:"file"}),void 0===r&&(i.dataOffset=p+Pt),h=i;else if(fn(e,p))n=e.getUint16(p+Pt),(o=o||v(l,{kind:"jfif"})).dataOffset=p+wt,h=o;else if(cn(e,p)){n=e.getUint16(p+Pt),g++;var b=p+Ot;if(1===g)d={appMarkerPosition:p,fieldLength:n,tiffHeaderOffset:b,score:void 0};else{void 0===d.score&&(d.score=vn(e,d.appMarkerPosition,d.fieldLength,d.tiffHeaderOffset));var S=vn(e,p,n,b);S>d.score&&(d={appMarkerPosition:p,fieldLength:n,tiffHeaderOffset:b,score:S})}(a=a||v(l,{kind:"exif"})).tiffHeaderOffset=d.tiffHeaderOffset,h=a}else if(sn(e,p))f=f||v(l,{kind:"xmp",chunks:[]}),n=e.getUint16(p+Pt),f.chunks.length<Nt&&f.chunks.push(ln(p,n)),h=f;else if(dn(e,p))f=f||v(l,{kind:"xmp",chunks:[]}),n=e.getUint16(p+Pt),f.chunks.length<Nt&&f.chunks.push(pn(p,n)),h=f;else if(gn(e,p))n=e.getUint16(p+Pt),(u=u||v(l,{kind:"iptc"})).dataOffset=p+Tt,h=u;else if(an(e,p)){if(n=e.getUint16(p+Pt),(c=c||v(l,{kind:"icc",chunks:[]})).chunks.length<Rt){var x=p+kt,I=n-(kt-Pt),A=e.getUint8(p+Lt),P=e.getUint8(p+Mt);c.chunks.push({offset:x,length:I,chunkNumber:A,chunksTotal:P})}h=c}else if(un(e,p))n=e.getUint16(p+Pt),(s=s||v(l,{kind:"mpf"})).dataOffset=p+Et,h=s;else{if(!mn(e,p)){if(hn(e,p)){p++;continue}break}n=e.getUint16(p+Pt)}y(t,h,p,p+Pt+n),p+=Pt+n}return g>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.")}(g),t&&(!m&&p+Pt<=e.byteLength&&e.getUint16(p)===Vt&&(m=1),t.truncated=!m),l}(e,n),"jpeg","JPEG",n);if(ke.USE_PNG&&function(e){return!!e&&i(e,0,yn.length)===yn}(e))return Or(function(e,t){for(var n,r,o,a,u=[],f=0,c=yn.length,s=0;c+bn+Sn<=e.byteLength;){var d=void 0,l=e.getUint32(c+xn),p=i(e,c+In,Sn);if("IEND"===p)s=1;else if("IHDR"===p)(n=n||v(u,{kind:"pngFile"})).dataOffset=c+An,d=n;else if(Jn(e,p,c)){var g=tr(e,c);void 0!==g&&((r=r||v(u,{kind:"xmp"})).chunks=[{dataOffset:g,length:l-(g-(c+An))}],d=r)}else if(qn(p))d=f<Xn?v(u,Zn(e,c+An,l,p)):Wn[p],f++;else if(p===kn)(o=o||v(u,{kind:"exif"})).tiffHeaderOffset=c+An,d=o;else if(p===En){var m=c+An,h=nr(e,m,l);void 0!==h&&(a||(a=v(u,{kind:"icc",compression:h.compressionMethod===zn?"deflate":"unknown",chunks:[{offset:h.compressedProfileOffset,length:l-(h.compressedProfileOffset-m),chunkNumber:1,chunksTotal:1,profileName:h.profileName,compressionMethod:h.compressionMethod}]})),d=a)}else Yn(p)&&(d=v(u,{kind:"pngChunk",dataOffset:c+xn}));var b=l+bn+Sn+4;y(t,d,c,c+b),c+=b}return t&&(t.truncated=!s),u}(e,n),"png","PNG",n);if(ke.USE_HEIC&&function(e){return $e(e,rr)}(e))return Or(function(e,t){return et(e,t)}(e,n),"heic","HEIC",n);if(ke.USE_AVIF&&function(e){return $e(e,ir)}(e))return Or(function(e,t){return et(e,t)}(e,n),"avif","AVIF",n);if(ke.USE_JXL&&function(e){try{return function(e){if(!e||e.byteLength<or.length)return 0;for(var t=0;t<or.length;t++)if(e.getUint8(t)!==or[t])return 0;return 1}(e)||mr(e)}catch(e){return 0}}(e))return Or(function(e,t){var n,r,i,o,a,u=[],f=0;if(mr(e))return[{kind:"jxlFile",codestreamOffset:0}];for(;f+8<=e.byteLength;){var c=Qe(e,f),s=c.length,d=c.contentOffset;if(s<d-f)break;var l=Math.min(f+s,e.byteLength),p=e.getUint32(f+4),g=void 0;if(p===ur&&(d+gr<=l?((n=n||{kind:"exif"}).tiffHeaderOffset=ft(e,d),g=n):g={kind:"exif"}),p===fr&&((i=i||{kind:"xmp"}).chunks=[{dataOffset:d,length:s-(d-f)}],g=i),p===sr&&void 0===a&&(a={kind:"jxlFile",codestreamOffset:d}),p===dr&&void 0===a&&d+lr<=l&&!(2147483647&e.getUint32(d))&&(a={kind:"jxlFile",codestreamOffset:d+lr}),p===cr&&d+pr<=l){var m=e.getUint32(d),h=d+pr,v=s-(h-f);m===ur&&(g={kind:"exif",compression:"brotli",dataOffset:h,length:v},r=r||g),m===fr&&(g={kind:"xmp",compression:"brotli",dataOffset:h,length:v},o=o||g)}y(t,g,f,f+s),f+=s}return hr(u,n||r),hr(u,i||o),hr(u,a),u}(e,n),"jxl","JPEG XL",n);if(ke.USE_WEBP&&function(e){return!!e&&"RIFF"===i(e,0,4)&&"WEBP"===i(e,8,4)}(e))return Or(function(e,t){for(var n,r,o,a,u=[],f=12;f+8<e.byteLength;){var c=i(e,f,4),s=e.getUint32(f+4,1),d=void 0;"EXIF"===c?(n=n||v(u,{kind:"exif"}),"Exif\0\0"===i(e,f+8,6)?n.tiffHeaderOffset=f+8+6:n.tiffHeaderOffset=f+8,d=n):"XMP "===c?((r=r||v(u,{kind:"xmp"})).chunks=[{dataOffset:f+8,length:s}],d=r):"ICCP"===c?((o=o||v(u,{kind:"icc"})).chunks=[{offset:f+8,length:s,chunkNumber:1,chunksTotal:1}],d=o):"VP8X"===c&&((a=a||v(u,{kind:"riff"})).dataOffset=f+8,d=a);var l=8+(s%2==0?s:s+1);y(t,d,f,f+l),f+=l}return u}(e,n),"webp","WebP",n);if(ke.USE_GIF&&function(e){return!!e&&yr.includes(i(e,0,vr))}(e))return Or(function(e,t){var n={kind:"gif",dataOffset:0};return y(t,n,0,br),[n]}(0,n),"gif","GIF",n);if(ke.USE_XMP&&function(e){return!!e&&i(e,Sr,xr.length)===xr}(e))return Or(function(e,t){var n={kind:"xmp",chunks:[{dataOffset:Sr,length:e.byteLength}]};return y(t,n,0,e.byteLength),t&&(t.truncated=!function(e){for(var t=0;t<Ir.length;t++)if(Ar(e,Ir[t]))return 1;return 0}(e)),[n]}(e,n),"xml","XML",n);throw Error("Invalid image format")}};function Or(e,t,n,r){var i={fileType:{value:t,description:n},blocks:e};return void 0!==r&&(i.ranges=r,i.truncated=!!r.truncated),i}var Tr="0th",Ur="1st",Cr="exif",kr="gps",Er="interoperability",Fr="canon",Lr="pentax",Mr={1:1,2:1,3:2,4:4,5:8,6:1,7:1,8:2,9:4,10:8,11:4,12:8,13:4,129:1},Rr={BYTE:1,ASCII:2,SHORT:3,LONG:4,RATIONAL:5,SBYTE:6,UNDEFINED:7,SSHORT:8,SLONG:9,SRATIONAL:10,FLOAT:11,DOUBLE:12,IFD:13,UTF8:129},Nr={getByteAt:Dr,getAsciiAt:function(e,t){return e.getUint8(t)},getShortAt:function(e,t,n){return e.getUint16(t,n===je.LITTLE_ENDIAN)},getLongAt:Br,getRationalAt:function(e,t,n){return[Br(e,t,n),Br(e,t+4,n)]},getSbyteAt:function(e,t){return e.getInt8(t)},getUndefinedAt:function(e,t){return Dr(e,t)},getSshortAt:function(e,t,n){return e.getInt16(t,n===je.LITTLE_ENDIAN)},getSlongAt:Gr,getSrationalAt:function(e,t,n){return[Gr(e,t,n),Gr(e,t+4,n)]},getFloatAt:function(e,t,n){return e.getFloat32(t,n===je.LITTLE_ENDIAN)},getDoubleAt:function(e,t,n){return e.getFloat64(t,n===je.LITTLE_ENDIAN)},getIfdPointerAt:function(e,t,n){return Br(e,t,n)},typeSizes:Mr,tagTypes:Rr,getTypeSize:function(e){if(void 0===Rr[e])throw Error("No such type found.");return Mr[Rr[e]]}};function Dr(e,t){return e.getUint8(t)}function Br(e,t,n){return e.getUint32(t,n===je.LITTLE_ENDIAN)}function Gr(e,t,n){return e.getInt32(t,n===je.LITTLE_ENDIAN)}var jr={exif:1,iptc:1,photoshop:1,mpf:1,makerNotes:1},_r={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},zr={exifIfdPointer:"Exif IFD Pointer",gpsInfoIfdPointer:"GPS Info IFD Pointer",interoperabilityIfdPointer:"Interoperability IFD Pointer"},Vr=Xr([[0,31]]),Hr=Xr([[1,2],[4096,4098]]);function Xr(e){for(var t=Object.create(null),n=0;n<e.length;n++)for(var r=e[n][0];r<=e[n][1];r++)t[r]=1;return t}var Wr={thumbnail:["JPEGInterchangeFormat","JPEGInterchangeFormatLength"],iptc:["IPTC-NAA"],xmp:["ApplicationNotes"],icc:["ICC_Profile"],photoshop:["ImageSourceData","PhotoshopSettings"],makerNotes:["MakerNote","Make"],gps:["GPSLatitude","GPSLatitudeRef","GPSLongitude","GPSLongitudeRef","GPSAltitude","GPSAltitudeRef"]},Kr={file:["Image Width","Image Height"],exif:["FocalLength","FocalPlaneXResolution","FocalPlaneYResolution","FocalPlaneResolutionUnit","FocalLengthIn35mmFilm","PixelXDimension","PixelYDimension"]};function Jr(e){return 1==e?1:Array.isArray(e)&&e.length>0}function qr(){return{isActive:0,shouldReturnGroup:e,shouldParseGroup:e,shouldReturnTag:e,shouldParseTag:e};function e(){return 1}}var Yr=qr();function Zr(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 $r(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 Qr(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 ei(e){return Array.isArray(e)&&0===e.length}function ti(e){var t=e.groupKey,n=e.includeValue,r=e.excludeValue,i=e.extraIncludeNames,o=!!jr[t],a={includeAll:0,includeNames:void 0,includeIds:void 0,excludeAll:0,excludeNames:void 0,excludeIds:void 0};if(1==n)a.includeAll=1;else if(Array.isArray(n)){a.includeNames=Object.create(null),o&&(a.includeIds=Object.create(null));for(var u=0;u<n.length;u++)d(a,n[u]);for(var f in i)a.includeNames[f.toLowerCase()]=1}else if(i&&Object.keys(i).length>0)for(var c in a.includeNames=Object.create(null),i)a.includeNames[c.toLowerCase()]=1;if(1==r)return a.excludeAll=1,a;if(Array.isArray(r)){a.excludeNames=Object.create(null),o&&(a.excludeIds=Object.create(null));for(var s=0;s<r.length;s++)l(a,r[s])}return a;function d(e,t){"number"==typeof t&&e.includeIds?e.includeIds[t+""]=1:"string"==typeof t&&(e.includeNames[t.toLowerCase()]=1)}function l(e,t){"number"==typeof t&&e.excludeIds?e.excludeIds[t+""]=1:"string"==typeof t&&(e.excludeNames[t.toLowerCase()]=1)}}function ni(e,t,n){return e.excludeAll?0:e.includeAll?!ri(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)?!ri(e,t,n):0:!ri(e,t,n)}function ri(e,t,n){return void 0!==n&&e.excludeIds&&e.excludeIds[n+""]||t&&e.excludeNames&&e.excludeNames[(t+"").toLowerCase()]?1:0}function ii(e,t,n){return n.isActive?ai(e,t,n.shouldParseTag):t}function oi(e,t,n){return n.isActive?ai(e,t,n.shouldReturnTag):t}function ai(e,t,n){if(!t)return t;var r={};for(var i in t){var o=t[i];n(e,i,a(o))&&x(r,i,o)}return r;function a(e){if(e){if(Array.isArray(e)){if(0===e.length)return;return e[0].id}return e.id}}}var ui=4,fi=1048576,ci=4,si=48,di=1024,li=5,pi=8192,gi={1:Nr.getByteAt,3:Nr.getShortAt,4:Nr.getLongAt,5:Nr.getRationalAt,6:Nr.getSbyteAt,7:Nr.getUndefinedAt,8:Nr.getSshortAt,9:Nr.getSlongAt,10:Nr.getSrationalAt,11:Nr.getFloatAt,12:Nr.getDoubleAt,13:Nr.getIfdPointerAt};function mi(e,t,n){var r=t+4;if(!(r+Nr.getTypeSize("LONG")>e.byteLength)){var i=Nr.getLongAt(e,r,n);if(!(i<8))return t+i}}function hi(e,t,n,r,i,o){var a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:0,u=arguments.length>7&&void 0!==arguments[7]?arguments[7]:Yr,f=arguments.length>8&&void 0!==arguments[8]?arguments[8]:"exif",c=arguments.length>9&&void 0!==arguments[9]?arguments[9]:yi(e),s=arguments.length>10?arguments[10]:void 0,d=arguments.length>11&&void 0!==arguments[11]?arguments[11]:void 0!==s[Ur]&&u.shouldParseGroup("thumbnail"),l=arguments.length>12&&void 0!==arguments[12]?arguments[12]:void 0,p=Nr.getTypeSize("SHORT"),g=bt,m={},h=function(e,t,n){return t+Nr.getTypeSize("SHORT")<=e.byteLength?Nr.getShortAt(e,t,n):0}(e,r,i),v=0;r+=p;for(var y=0;y<h;y++){if(r+g>e.byteLength){v=1;break}if(!vi(c)){v=1;break}var b=bi(e,t,n,r,i,o,u,f,c,s);void 0!==b&&(m[b.name]={id:b.id,value:b.value,description:b.description},a&&(m[b.name].computed=Pi(b.tagType,b.value)),t===Lr&&"LevelInfo"===b.name&&(m[b.name].__offset=b.__offset),void 0!==l&&"MakerNote"===b.name&&(l.MakerNote=b.__offset)),r+=g}if(d&&!v&&r+Nr.getTypeSize("LONG")<=e.byteLength){var S=Nr.getLongAt(e,r,i);S>=8&&t===Tr&&(m.Thumbnail=hi(e,Ur,n,n+S,i,o,a,u,"thumbnail",c,s))}return m}function vi(e){return e.ifdEntriesRemaining>0?(e.ifdEntriesRemaining--,1):0}function yi(e){return{remaining:e.byteLength*ui,ifdEntriesRemaining:Math.floor(e.byteLength/bt)*ci,decompressedAllowanceRemaining:fi,iptcDatasetsRemaining:di+Math.floor(e.byteLength/si),decompressedIptcAllowanceRemaining:pi}}function bi(e,t,n,r,i){var o,a,u,f=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:Yr,d=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"exif",l=arguments.length>8?arguments[8]:void 0,g=arguments.length>9?arguments[9]:void 0,m=Nr.getTypeSize("SHORT"),h=m+Nr.getTypeSize("SHORT"),v=h+Nr.getTypeSize("LONG"),y=Nr.getShortAt(e,r,i),b=Nr.getShortAt(e,r+m,i),S=Nr.getLongAt(e,r+h,i);if(void 0!==Nr.typeSizes[b]&&(f||void 0!==g[t][y])){var x=function(e,t,n){if(void 0!==n[e][t]){if("string"==typeof n[e][t])return n[e][t];if(n[e][t].name)return n[e][t].name}return"undefined-".concat(t)}(t,y,g);if(s.shouldParseTag(d,x,y)){if(function(e,t){return Nr.typeSizes[e]*t<=Nr.getTypeSize("LONG")}(b,S))o=Si(e,n+(a=r+v-n),b,S,i);else if(function(e,t,n,r,i){return t+n+Nr.typeSizes[r]*i<=e.byteLength}(e,n,a=Nr.getLongAt(e,r+v,i),b,S)){var I=33723===y,A=function(e,t,n){var r=Math.min(n,Math.floor(e/Nr.typeSizes[t]));return 1===r&&n>1?0:r}(l.remaining,b,S);l.remaining-=A*Nr.typeSizes[b],u=l,o=Si(e,n+a,b,A,i,I)}else o="<faulty value>";xi(b)&&(o=function(e,t){return e instanceof Uint8Array?function(e,t){for(var n=[],r=[],i=0,o=0,a=0,u=0;u<=e.length;u++)if(u===e.length||0===e[u]){if(u>a){if(i&&!Ii(t))break;n[o]=p(c(e,a,u,r)),i=1}o++,a=u+1}return n}(e,t):"string"==typeof e?[e]:e.length>0?[p(e.join(""))]:[]}(o,u));var P=o;if(void 0!==g[t][y])if(void 0!==g[t][y].name&&void 0!==g[t][y].description)try{P=g[t][y].description(o)}catch(e){P=Ai(o)}else P=b===Nr.tagTypes.RATIONAL||b===Nr.tagTypes.SRATIONAL?""+o[0]/o[1]:Ai(o);return{id:y,name:x,value:o,description:P,tagType:b,__offset:a}}}}function Si(e,t,n,r,i){var o=[];if((arguments.length>5&&void 0!==arguments[5]?arguments[5]:0)&&(r*=Nr.typeSizes[n],n=Nr.tagTypes.BYTE),xi(n))return function(e,t,n){for(var r=new Uint8Array(n),i=0;i<n;i++)r[i]=Nr.getAsciiAt(e,t+i);return r}(e,t,r);for(var a=0;a<r;a++)o.push(gi[n](e,t,i)),t+=Nr.typeSizes[n];return 1===o.length?o[0]:o}function xi(e){return e===Nr.tagTypes.ASCII||e===Nr.tagTypes.UTF8}function Ii(e){return void 0===e?1:e.remaining<2?0:(e.remaining-=2,1)}function Ai(e){return e instanceof Array?e.join(", "):e}function Pi(e,t){return xi(e)?Array.isArray(t)&&1===t.length?t[0]:t:e===Nr.tagTypes.RATIONAL||e===Nr.tagTypes.SRATIONAL?function(e){return Array.isArray(e)&&2===e.length?"number"==typeof e[0]&&"number"==typeof e[1]:0}(t)?wi(t):Array.isArray(t)?t.map(function(e){return wi(e)}):t:t}function wi(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 Oi=[{pointerKey:"Exif IFD Pointer",ifdType:Cr},{pointerKey:"GPS Info IFD Pointer",ifdType:kr},{pointerKey:"Interoperability IFD Pointer",ifdType:Er}],Ti={read:function(e,t,n){for(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=arguments.length>5&&void 0!==arguments[5]?arguments[5]:yi(e),a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:void 0,u=arguments.length>7&&void 0!==arguments[7]?arguments[7]:void 0,f=je.getByteOrder(e,t),c={},s=function(e,t,n,r,i,o,a,u,f,c){var s=mi(e,t,n);return void 0===s?{}:hi(e,Tr,t,s,n,r,i,o,"exif",a,u,f,c)}(e,t,f,n,r,i,o,a,u,c),d=0;d<Oi.length;d++)s=Ui(Oi[d],s,e,t,f,n,r,i,o,a,c);return{tags:s,byteOrder:f,makerNoteOffset:c.MakerNote}}};function Ui(e,t,n,r,i,o,a,u,f,c,s){var d,l=t[e.pointerKey];return void 0===l?t:"number"==typeof(d=l.value)&&d>=8&&d%1==0?S(t,hi(n,e.ifdType,r,r+l.value,i,o,a,u,"exif",f,c,void 0,s)):t}var Ci={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 d(e,ki,"")},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:Ei,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])}};function ki(e){return 1===e?"Y":2===e?"Cb":3===e?"Cr":4===e?"R":5===e?"G":6===e?"B":void 0}function Ei(e){return 0===e?"Unknown":e+" mm"}var Fi={11:"ProcessingSoftware",254:{name:"SubfileType",description:function(e){return Ne({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)}},255:{name:"OldSubfileType",description:function(e){return Ne({0:"Full-resolution image",1:"Reduced-resolution image",2:"Single page of multi-page image"},e)}},256:"ImageWidth",257:"ImageLength",258:"BitsPerSample",259:"Compression",262:"PhotometricInterpretation",263:{name:"Thresholding",description:function(e){return Ne({1:"No dithering or halftoning",2:"Ordered dither or halfton",3:"Randomized dither"},e)}},264:"CellWidth",265:"CellLength",266:{name:"FillOrder",description:function(e){return Ne({1:"Normal",2:"Reversed"},e)}},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:Ci.XResolution},283:{name:"YResolution",description:Ci.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 Ne({1:"0.1",2:"0.001",3:"0.0001",4:"1e-05",5:"1e-06"},e)}},296:{name:"ResolutionUnit",description:Ci.ResolutionUnit},297:"PageNumber",301:"TransferFunction",305:"Software",306:"DateTime",315:"Artist",316:"HostComputer",317:"Predictor",318:{name:"WhitePoint",description:function(e){return d(e,Li,", ")}},319:{name:"PrimaryChromaticities",description:function(e){return d(e,Li,", ")}},321:"HalftoneHints",322:"TileWidth",323:"TileLength",330:"A100DataOffset",332:{name:"InkSet",description:function(e){return Ne({1:"CMYK",2:"Not CMYK"},e)}},337:"TargetPrinter",338:{name:"ExtraSamples",description:function(e){return Ne({0:"Unspecified",1:"Associated Alpha",2:"Unassociated Alpha"},e)}},339:{name:"SampleFormat",description:function(e){return Array.isArray(e)?e.map(Mi).join(", "):Mi(e)}},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:Ri},40092:{name:"XPComment",description:Ri},40093:{name:"XPAuthor",description:Ri},40094:{name:"XPKeywords",description:Ri},40095:{name:"XPSubject",description:Ri},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 Ne({0:"Unsafe",1:"Safe"},e)}},50778:{name:"CalibrationIlluminant1",description:Ci.LightSource},50779:{name:"CalibrationIlluminant2",description:Ci.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 Ne({0:"Allow Copying",1:"Embed if Used",2:"Never Embed",3:"No Restrictions"},e)}},50942:"ProfileCopyright",50964:"ForwardMatrix1",50965:"ForwardMatrix2",50966:"PreviewApplicationName",50967:"PreviewApplicationVersion",50968:"PreviewSettingsName",50969:"PreviewSettingsDigest",50970:{name:"PreviewColorSpace",description:function(e){return Ne({1:"Gray Gamma 2.2",2:"sRGB",3:"Adobe RGB",4:"ProPhoto RGB"},e)}},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 Ne({0:"Linear",1:"sRGB"},e)}},51108:{name:"ProfileLookTableEncoding",description:function(e){return Ne({0:"Linear",1:"sRGB"},e)}},51109:"BaselineExposureOffset",51110:{name:"DefaultBlackRender",description:function(e){return Ne({0:"Auto",1:"None"},e)}},51111:"NewRawImageDigest",51112:"RawToPreviewGain"};function Li(e){if(!Array.isArray(e))throw new TypeError("Expected a rational.");return"".concat(e[0],"/").concat(e[1])}function Mi(e){return Ne({1:"Unsigned",2:"Signed",3:"Float",4:"Undefined",5:"Complex int",6:"Complex float"},e)}function Ri(e){return Array.isArray(e)?Le(e)?Me(e):function(e){for(var t=e.length;t>0&&0===e.charCodeAt(t-1);)t--;return e.slice(0,t)}(new TextDecoder("utf-16").decode(new Uint8Array(e))):""}function Ni(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 Di={33434:{name:"ExposureTime",description:Ci.ExposureTime},33437:{name:"FNumber",description:Ci.FNumber},34850:{name:"ExposureProgram",description:Ci.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 Ne({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)}},34865:"StandardOutputSensitivity",34866:"RecommendedExposureIndex",34867:"ISOSpeed",34868:"ISOSpeedLatitudeyyy",34869:"ISOSpeedLatitudezzz",36864:{name:"ExifVersion",description:Fe},36867:"DateTimeOriginal",36868:"DateTimeDigitized",36873:"GooglePlusUploadCode",36880:"OffsetTime",36881:"OffsetTimeOriginal",36882:"OffsetTimeDigitized",37121:{name:"ComponentsConfiguration",description:Ci.ComponentsConfiguration},37122:"CompressedBitsPerPixel",37377:{name:"ShutterSpeedValue",description:Ci.ShutterSpeedValue},37378:{name:"ApertureValue",description:Ci.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:Ci.MeteringMode},37384:{name:"LightSource",description:Ci.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:Ci.FocalLength},37393:"ImageNumber",37394:{name:"SecurityClassification",description:function(e){return Ne({C:"Confidential",R:"Restricted",S:"Secret",T:"Top Secret",U:"Unclassified"},e)}},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:Ee},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:Fe},40961:{name:"ColorSpace",description:Ci.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:Ci.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 Ni(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)?Ni(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:Ci.CustomRendered},41986:{name:"ExposureMode",description:Ci.ExposureMode},41987:{name:"WhiteBalance",description:Ci.WhiteBalance},41988:{name:"DigitalZoomRatio",description:function(e){return 0===e[0]?"Digital zoom was not used":""+e[0]/e[1]}},41989:{name:"FocalLengthIn35mmFilm",description:Ci.FocalLengthIn35mmFilm},41990:{name:"SceneCaptureType",description:Ci.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:Ci.Contrast},41993:{name:"Saturation",description:Ci.Saturation},41994:{name:"Sharpness",description:Ci.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){return"".concat((n=e[0],r=e[1],i=Bi(n),o=Bi(r),0===o||o===i?"".concat(i):"".concat(i,"-").concat(o))," mm f/").concat(0===(t=[e[2],e[3]].filter(Gi).map(Bi)).length?"?":1===t.length||0===t[1]||t[1]===t[0]?"".concat(t[0]):"".concat(t[0],"-").concat(t[1]));var t,n,r,i,o}},42035:"LensMake",42036:"LensModel",42037:"LensSerialNumber",42080:{name:"CompositeImage",description:function(e){return Ne({1:"Not a Composite Image",2:"General Composite Image",3:"Composite Image Captured While Shooting"},e)}},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"};function Bi(e){return parseFloat((e[0]/e[1]).toFixed(5))}function Gi(e){return 0!==e[1]}function ji(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 _i={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:De},3:{name:"GPSLongitudeRef",description:function(e){var t=e.join("");return"E"===t?"East longitude":"W"===t?"West longitude":"Unknown"}},4:{name:"GPSLongitude",description:De},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 ji(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)?ji(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:Ee},28:{name:"GPSAreaInformation",description:Ee},29:"GPSDateStamp",30:{name:"GPSDifferential",description:function(e){return 0===e?"Measurement without differential correction":1===e?"Differential correction applied":"Unknown"}},31:"GPSHPositioningError"},zi={1:"InteroperabilityIndex",2:{name:"InteroperabilityVersion",description:Fe},4096:"RelatedImageFileFormat",4097:"RelatedImageWidth",4098:"RelatedImageHeight"},Vi={45056:{name:"MPFVersion",description:Fe},45057:"NumberOfImages",45058:"MPEntry",45059:"ImageUIDList",45060:"TotalFrames"},Hi={read:function(e,t,n){var r,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:void 0,u=arguments.length>6&&void 0!==arguments[6]?arguments[6]:void 0;try{var f=je.getByteOrder(e,t),c=mi(e,t,f);return void 0===c?{}:function(e,t,n,r,i){if(!n.MPEntry)return n;for(var o=e.byteLength,a=e.byteOffset,u=o*Wi,f=[],c=Math.min(Math.ceil(n.MPEntry.value.length/Xi),Ki),s=0;s<c;s++){f[s]={};var d=Ji(n.MPEntry.value,s*Xi,Nr.getTypeSize("LONG"),r);f[s].ImageFlags=qi(d),f[s].ImageFormat=Yi(d),f[s].ImageType=Zi(d);var l=Ji(n.MPEntry.value,s*Xi+4,Nr.getTypeSize("LONG"),r);f[s].ImageSize={value:l,description:""+l};var p=$i(s,n.MPEntry,r,t);f[s].ImageOffset={value:p,description:""+p};var g=Ji(n.MPEntry.value,s*Xi+12,Nr.getTypeSize("SHORT"),r);f[s].DependentImage1EntryNumber={value:g,description:""+g};var m=Ji(n.MPEntry.value,s*Xi+14,Nr.getTypeSize("SHORT"),r);f[s].DependentImage2EntryNumber={value:m,description:""+m};var h=Math.min(Math.max(p,0),o),v=Math.min(h+Math.max(l,0),o,h+u);f[s].image=e.buffer.slice(a+h,a+v),u-=v-h,i&&A(f[s],"base64",function(){return i(this.image)})}return n.Images=f,n}(e,t,hi(e,"mpf",t,c,f,n,i,o,"mpf",a,((r={}).mpf=Vi,r)),f,u)}catch(e){return{}}}},Xi=16,Wi=8,Ki=256;function Ji(e,t,n,r){if(r===je.LITTLE_ENDIAN){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 qi(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 Yi(e){var t=e>>24&7;return{value:t,description:0===t?"JPEG":"Unknown"}}function Zi(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 $i(e,t,n,r){return function(e){return 0===e}(e)?0:Ji(t.value,e*Xi+8,Nr.getTypeSize("LONG"),n)+r}var Qi={read:function(e,t){var n=function(e,t){return Math.min(Nr.getShortAt(e,t),e.byteLength-t)}(e,t),r=function(e,t,n){if(!(8>n)){var r=Nr.getByteAt(e,t+7);return{value:r,description:""+r}}}(e,t,n);return{"Bits Per Sample":eo(e,t,n),"Image Height":to(e,t,n),"Image Width":no(e,t,n),"Color Components":r,Subsampling:r&&ro(e,t,r.value,n)}}};function eo(e,t,n){if(!(3>n)){var r=Nr.getByteAt(e,t+2);return{value:r,description:""+r}}}function to(e,t,n){if(!(5>n)){var r=Nr.getShortAt(e,t+3);return{value:r,description:"".concat(r,"px")}}}function no(e,t,n){if(!(7>n)){var r=Nr.getShortAt(e,t+5);return{value:r,description:"".concat(r,"px")}}}function ro(e,t,n,r){if(!(8+3*n>r)){for(var i=[],o=0;o<n;o++){var a=t+8+3*o;i.push([Nr.getByteAt(e,a),Nr.getByteAt(e,a+1),Nr.getByteAt(e,a+2)])}return{value:i,description:i.length>1?io(i)+oo(i):""}}}function io(e){var t={1:"Y",2:"Cb",3:"Cr",4:"I",5:"Q"};return e.map(function(e){return t[e[0]]}).join("")}function oo(e){var t={17:"4:4:4 (1 1)",18:"4:4:0 (1 2)",20:"4:4:1 (1 4)",33:"4:2:2 (2 1)",34:"4:2:0 (2 2)",36:"4:2:1 (2 4)",65:"4:1:1 (4 1)",66:"4:1:0 (4 2)"};return 0===e.length||void 0===e[0][1]||void 0===t[e[0][1]]?"":t[e[0][1]]}var ao={read:function(e,t){var n={};try{var r=function(e,t){var n=t,r=0;return{readBits:function(t){for(var i=0,o=0;o<t;o++){if(n>=e.byteLength)throw Error("Unexpected end of data");i|=(e.getUint8(n)>>r&1)<<o,++r>=8&&(r=0,n++)}return i}}}(e,t+uo),i=function(e){var t,n;if(e.readBits(1)){t=8*(e.readBits(5)+1);var r=e.readBits(3);n=0===r?8*(e.readBits(5)+1):Math.ceil(t*co[r])}else{t=so(e);var i=e.readBits(3);n=0===i?so(e):Math.ceil(t*co[i])}return{height:t,width:n}}(r),o=i.height,a=i.width;n["Image Height"]={value:o,description:"".concat(o,"px")},n["Image Width"]={value:a,description:"".concat(a,"px")}}catch(e){}return n}},uo=2,fo=[9,13,18,30],co=[0,1,1.2,4/3,1.5,16/9,5/4,2];function so(e){var t=e.readBits(2);return 1+e.readBits(fo[t])}var lo={read:function(e,t,n){var r={};return void 0!==t&&S(r,function(e,t){if(!_e(e,t,po))return{};var n=e.getUint32(t),r=e.getUint32(t+go);return{"Image Width":{value:n,description:"".concat(n,"px")},"Image Height":{value:r,description:"".concat(r,"px")}}}(e,t)),void 0!==n&&S(r,function(e,t){if(!_e(e,t,mo))return{};var n=e.getUint8(t),r=t+mo;if(!_e(e,r,n))return{};var i={"Color Components":{value:n,description:"".concat(n)}},o=function(e,t,n){if(0!==n){for(var r=e.getUint8(t),i=1;i<n;i++)if(e.getUint8(t+i)!==r)return;return r}}(e,r,n);return void 0!==o&&(i["Bits Per Sample"]={value:o,description:"".concat(o)}),i}(e,n)),r}},po=8,go=4,mo=1,ho={read:function(e,t){var n=function(e,t){return Math.min(Nr.getShortAt(e,t),e.byteLength-t)}(e,t),r=function(e,t,n){if(!(15>n)){var r=Nr.getByteAt(e,t+14);return{value:r,description:"".concat(r,"px")}}}(e,t,n),i=function(e,t,n){if(!(16>n)){var r=Nr.getByteAt(e,t+15);return{value:r,description:"".concat(r,"px")}}}(e,t,n),o={"JFIF Version":vo(e,t,n),"Resolution Unit":yo(e,t,n),XResolution:So(e,t,n),YResolution:xo(e,t,n),"JFIF Thumbnail Width":r,"JFIF Thumbnail Height":i};if(void 0!==r&&void 0!==i){var a=function(e,t,n,r){if(!(0===n||16+n>r)){var i=e.byteOffset;return{value:e.buffer.slice(i+t+16,i+t+16+n),description:"<24-bit RGB pixel data>"}}}(e,t,3*r.value*i.value,n);a&&(o["JFIF Thumbnail"]=a)}for(var u in o)void 0===o[u]&&delete o[u];return o}};function vo(e,t,n){if(!(9>n)){var r=Nr.getByteAt(e,t+7),i=Nr.getByteAt(e,t+7+1);return{value:256*r+i,description:r+"."+i}}}function yo(e,t,n){if(!(10>n)){var r=Nr.getByteAt(e,t+9);return{value:r,description:bo(r)}}}function bo(e){return 0===e?"None":1===e?"inches":2===e?"cm":"Unknown"}function So(e,t,n){if(!(12>n)){var r=Nr.getShortAt(e,t+10);return{value:r,description:""+r}}}function xo(e,t,n){if(!(14>n)){var r=Nr.getShortAt(e,t+12);return{value:r,description:""+r}}}var Io={iptc:{256:{name:"Model Version",description:function(e){return""+((e[0]<<8)+e[1])}},261:{name:"Destination",repeatable:1},276:{name:"File Format",description:function(e){return""+((e[0]<<8)+e[1])}},278:{name:"File Format Version",description:function(e){return""+((e[0]<<8)+e[1])}},286:"Service Identifier",296:"Envelope Number",306:"Product ID",316:"Envelope Priority",326:{name:"Date Sent",description:Ao},336:{name:"Time Sent",description:Po},346:{name:"Coded Character Set",description:wo,encoding_name:wo},356:"UNO",376:{name:"ARM Identifier",description:function(e){return""+((e[0]<<8)+e[1])}},378:{name:"ARM Version",description:function(e){return""+((e[0]<<8)+e[1])}},512:{name:"Record Version",description:function(e){return""+((e[0]<<8)+e[1])}},515:"Object Type Reference",516:"Object Attribute Reference",517:"Object Name",519:"Edit Status",520:{name:"Editorial Update",description:function(e){return"01"===f(e)?"Additional Language":"Unknown"}},522:"Urgency",524:{name:"Subject Reference",repeatable:1,description:function(e){var t=f(e).split(":");return t[2]+(t[3]?"/"+t[3]:"")+(t[4]?"/"+t[4]:"")}},527:"Category",532:{name:"Supplemental Category",repeatable:1},534:"Fixture Identifier",537:{name:"Keywords",repeatable:1},538:{name:"Content Location Code",repeatable:1},539:{name:"Content Location Name",repeatable:1},542:"Release Date",547:"Release Time",549:"Expiration Date",550:"Expiration Time",552:"Special Instructions",554:{name:"Action Advised",description:function(e){var t=f(e);return"01"===t?"Object Kill":"02"===t?"Object Replace":"03"===t?"Object Append":"04"===t?"Object Reference":"Unknown"}},557:{name:"Reference Service",repeatable:1},559:{name:"Reference Date",repeatable:1},562:{name:"Reference Number",repeatable:1},567:{name:"Date Created",description:Ao},572:{name:"Time Created",description:Po},574:{name:"Digital Creation Date",description:Ao},575:{name:"Digital Creation Time",description:Po},577:"Originating Program",582:"Program Version",587:{name:"Object Cycle",description:function(e){var t=f(e);return"a"===t?"morning":"p"===t?"evening":"b"===t?"both":"Unknown"}},592:{name:"By-line",repeatable:1},597:{name:"By-line Title",repeatable:1},602:"City",604:"Sub-location",607:"Province/State",612:"Country/Primary Location Code",613:"Country/Primary Location Name",615:"Original Transmission Reference",617:"Headline",622:"Credit",627:"Source",628:"Copyright Notice",630:{name:"Contact",repeatable:1},632:"Caption/Abstract",634:{name:"Writer/Editor",repeatable:1},637:{name:"Rasterized Caption",description:function(e){return e}},642:"Image Type",643:{name:"Image Orientation",description:function(e){var t=f(e);return"P"===t?"Portrait":"L"===t?"Landscape":"S"===t?"Square":"Unknown"}},647:"Language Identifier",662:{name:"Audio Type",description:function(e){var t=f(e),n=t.charAt(0),r=t.charAt(1),i="";return"1"===n?i+="Mono":"2"===n&&(i+="Stereo"),"A"===r?i+=", actuality":"C"===r?i+=", question and answer session":"M"===r?i+=", music, transmitted by itself":"Q"===r?i+=", response to a question":"R"===r?i+=", raw sound":"S"===r?i+=", scener":"V"===r?i+=", voicer":"W"===r&&(i+=", wrap"),""!==i?i:t}},663:{name:"Audio Sampling Rate",description:function(e){return parseInt(f(e),10)+" Hz"}},664:{name:"Audio Sampling Resolution",description:function(e){var t=parseInt(f(e),10);return t+(1===t?" bit":" bits")}},665:{name:"Audio Duration",description:function(e){var t=f(e);return t.length>=6?t.substr(0,2)+":"+t.substr(2,2)+":"+t.substr(4,2):t}},666:"Audio Outcue",698:"Short Document ID",699:"Unique Document ID",700:"Owner ID",712:{name:function(e){return 2===e.length?"ObjectData Preview File Format":"Record 2 destination"},description:function(e){if(2===e.length){var t=Oo(e);return 0===t?"No ObjectData":1===t?"IPTC-NAA Digital Newsphoto Parameter Record":2===t?"IPTC7901 Recommended Message Format":3===t?"Tagged Image File Format (Adobe/Aldus Image data)":4===t?"Illustrator (Adobe Graphics data)":5===t?"AppleSingle (Apple Computer Inc)":6===t?"NAA 89-3 (ANPA 1312)":7===t?"MacBinary II":8===t?"IPTC Unstructured Character Oriented File Format (UCOFF)":9===t?"United Press International ANPA 1312 variant":10===t?"United Press International Down-Load Message":11===t?"JPEG File Interchange (JFIF)":12===t?"Photo-CD Image-Pac (Eastman Kodak)":13===t?"Microsoft Bit Mapped Graphics File [*.BMP]":14===t?"Digital Audio File [*.WAV] (Microsoft & Creative Labs)":15===t?"Audio plus Moving Video [*.AVI] (Microsoft)":16===t?"PC DOS/Windows Executable Files [*.COM][*.EXE]":17===t?"Compressed Binary File [*.ZIP] (PKWare Inc)":18===t?"Audio Interchange File Format AIFF (Apple Computer Inc)":19===t?"RIFF Wave (Microsoft Corporation)":20===t?"Freehand (Macromedia/Aldus)":21===t?'Hypertext Markup Language "HTML" (The Internet Society)':22===t?"MPEG 2 Audio Layer 2 (Musicom), ISO/IEC":23===t?"MPEG 2 Audio Layer 3, ISO/IEC":24===t?"Portable Document File (*.PDF) Adobe":25===t?"News Industry Text Format (NITF)":26===t?"Tape Archive (*.TAR)":27===t?"Tidningarnas Telegrambyrå NITF version (TTNITF DTD)":28===t?"Ritzaus Bureau NITF version (RBNITF DTD)":29===t?"Corel Draw [*.CDR]":"Unknown format ".concat(t)}return f(e)}},713:{name:"ObjectData Preview File Format Version",description:function(e,t){var n={0:{0:"1"},1:{1:"1",2:"2",3:"3",4:"4"},2:{4:"4"},3:{1:"5.0",2:"6.0"},4:{1:"1.40"},5:{1:"2"},6:{1:"1"},11:{1:"1.02"},20:{1:"3.1",2:"4.0",3:"5.0",4:"5.5"},21:{2:"2.0"}},r=Oo(e);if(t["ObjectData Preview File Format"]){var i=Oo(t["ObjectData Preview File Format"].value);if(Object.prototype.hasOwnProperty.call(n,i)&&Object.prototype.hasOwnProperty.call(n[i],r))return n[i][r]}var o=To(e);return null===o?f(e):o+""}},714:"ObjectData Preview Data",1802:{name:"Size Mode",description:function(e){return e[0].toString()}},1812:{name:"Max Subfile Size",description:function(e){for(var t=0,n=0;n<e.length;n++)t=(t<<8)+e[n];return t.toString()}},1882:{name:"ObjectData Size Announced",description:function(e){for(var t=0,n=0;n<e.length;n++)t=(t<<8)+e[n];return t.toString()}},1887:{name:"Maximum ObjectData Size",description:function(e){for(var t=0,n=0;n<e.length;n++)t=(t<<8)+e[n];return t.toString()}}}};function Ao(e){var t=f(e);return t.length>=8?t.substr(0,4)+"-"+t.substr(4,2)+"-"+t.substr(6,2):t}function Po(e){var t=f(e),n=t;return t.length>=6&&(n=t.substr(0,2)+":"+t.substr(2,2)+":"+t.substr(4,2),11===t.length&&(n+=t.substr(6,1)+t.substr(7,2)+":"+t.substr(9,2))),n}function wo(e){var t=f(e);return"%G"===t?"UTF-8":"%5"===t?"Windows-1252":"%/G"===t?"UTF-8 Level 1":"%/H"===t?"UTF-8 Level 2":"%/I"===t?"UTF-8 Level 3":"/A"===t?"ISO-8859-1":"/B"===t?"ISO-8859-2":"/C"===t?"ISO-8859-3":"/D"===t?"ISO-8859-4":"/@"===t?"ISO-8859-5":"/G"===t?"ISO-8859-6":"/F"===t?"ISO-8859-7":"/H"===t?"ISO-8859-8":"Unknown"}function Oo(e){var t=To(e);return null===t?parseInt(f(e),10):t}function To(e){return 2!==e.length||Uo(e[0])&&Uo(e[1])?null:(e[0]<<8)+e[1]}function Uo(e){return e>=48&&e<=57}var Co=function(){if("undefined"!=typeof TextDecoder)return TextDecoder},ko={128:8364,130:8218,131:402,132:8222,133:8230,134:8224,135:8225,136:710,137:8240,138:352,139:8249,140:338,142:381,145:8216,146:8217,147:8220,148:8221,149:8226,150:8211,151:8212,152:732,153:8482,154:353,155:8250,156:339,158:382,159:376},Eo={decode:function(e,t){if("string"==typeof t)return p(t);var n=Co();if("undefined"!=typeof n&&void 0!==e)try{return new n(e).decode(t instanceof DataView?t.buffer:Uint8Array.from(t))}catch(e){}var r=g(c(t));return void 0!==r?r:function(e){for(var t=e instanceof DataView,n=t?e.byteLength:e.length,r=t?function(t){return e.getUint8(t)}:function(t){return e[t]},i=Array(n),o=0;o<n;o++){var a=r(o),u=ko[a];i[o]=void 0!==u?u:a}return c(i)}(t)},TAG_HEADER_SIZE:5},Fo={read:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Yr,i=arguments.length>4?arguments[4]:void 0;try{if(Array.isArray(e)){var o=new DataView(Uint8Array.from(e).buffer);return No(o,{size:e.length},0,n,r,i||yi(o))}var a=function(e,t){for(;t+12<=e.byteLength;){var n=Lo(e,t);if(Mo(n))return{naaBlock:n,dataOffset:t+n.headerSize};t+=n.headerSize+n.size+Ro(n)}throw Error("No IPTC NAA resource block.")}(e,t);return No(e,a.naaBlock,a.dataOffset,n,r,i||yi(e))}catch(e){return{}}}};function Lo(e,t){if(943868237!==e.getUint32(t,0))throw Error("Not an IPTC resource block.");var n=e.getUint8(t+4+2),r=(n%2==0?n+1:n)+1;return{headerSize:6+r+4,type:e.getUint16(t+4),size:e.getUint32(t+4+2+r)}}function Mo(e){return 1028===e.type}function Ro(e){return e.size%2!=0?1:0}function No(e,t,n,r,i,o){for(var a={},u=void 0,f=n+t.size;n<f&&n<e.byteLength;){var c=Do(e,n,a,u,r,i,o),s=c.tag,d=c.tagSize;if(null===s)break;s&&("encoding"in s&&(u=s.encoding),void 0===a[s.name]||void 0===s.repeatable?a[s.name]={id:s.id,value:s.value,description:s.description}:(a[s.name]instanceof Array||(a[s.name]=[{id:a[s.name].id,value:a[s.name].value,description:a[s.name].description}]),a[s.name].push({id:s.id,value:s.value,description:s.description}))),n+=li+d}return a}function Do(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:void 0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:Yr,a=arguments.length>6?arguments[6]:void 0;if(function(e,t){return 28!==e.getUint8(t)}(e,t)||function(e,t){return t+li>e.byteLength}(e,t))return{tag:null,tagSize:0};var u=e.getUint16(t+1),f=e.getUint16(t+3);if(function(e,t,n){return t+li+n>e.byteLength}(e,t,f)||!function(e,t){var n=Math.ceil((li+t)/si);return e.iptcDatasetsRemaining>=n?(e.iptcDatasetsRemaining-=n,1):0}(a,f))return{tag:null,tagSize:0};if(!i&&!Io.iptc[u])return{tag:void 0,tagSize:f};if(!o.shouldParseTag("iptc",function(e,t){var n=Io.iptc[e];return n?"string"==typeof n?n:n&&"string"==typeof n.name?n.name:void 0:t?"undefined-".concat(e):void 0}(u,i),u))return{tag:void 0,tagSize:f};var c=function(e,t,n){for(var r=[],i=0;i<n;i++)r.push(e.getUint8(t+i));return r}(e,t+li,f),s={id:u,name:Bo(Io.iptc[u],u,c),value:c,description:Go(Io.iptc[u],c,n,r)};return function(e){return Io.iptc[e]&&Io.iptc[e].repeatable}(u)&&(s.repeatable=1),function(e){return Io.iptc[e]&&void 0!==Io.iptc[e].encoding_name}(u)&&(s.encoding=Io.iptc[u].encoding_name(c)),{tag:s,tagSize:f}}function Bo(e,t,n){return e?function(e){return"string"==typeof e}(e)?e:function(e){return"function"==typeof e.name}(e)?e.name(n):e.name:"undefined-".concat(t)}function Go(e,t,n,r){if(function(e){return e&&void 0!==e.description}(e))try{return e.description(t,n)}catch(e){}return function(e,t){return e&&t instanceof Array}(e,t)?Eo.decode(r,t):t}function jo(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 _o={"tiff:Orientation":function(e){return"1"===e?"Horizontal (normal)":"2"===e?"Mirror horizontal":"3"===e?"Rotate 180":"4"===e?"Mirror vertical":"5"===e?"Mirror horizontal and rotate 270 CW":"6"===e?"Rotate 90 CW":"7"===e?"Mirror horizontal and rotate 90 CW":"8"===e?"Rotate 270 CW":e},"tiff:ResolutionUnit":function(e){return Ci.ResolutionUnit(parseInt(e,10))},"tiff:XResolution":function(e){return zo(Ci.XResolution,e)},"tiff:YResolution":function(e){return zo(Ci.YResolution,e)},"exif:ApertureValue":function(e){return zo(Ci.ApertureValue,e)},"exif:GPSLatitude":Ho,"exif:GPSLongitude":Ho,"exif:FNumber":function(e){return zo(Ci.FNumber,e)},"exif:FocalLength":function(e){return zo(Ci.FocalLength,e)},"exif:FocalPlaneResolutionUnit":function(e){return Ci.FocalPlaneResolutionUnit(parseInt(e,10))},"exif:ColorSpace":function(e){return Ci.ColorSpace(function(e){return"0x"===e.substring(0,2)?parseInt(e.substring(2),16):parseInt(e,10)}(e))},"exif:ComponentsConfiguration":function(e,t){if(/^\d, \d, \d, \d$/.test(t)){var n=t.split(", ").map(function(e){return parseInt(e,10)});return Ci.ComponentsConfiguration(n)}return t},"exif:Contrast":function(e){return Ci.Contrast(parseInt(e,10))},"exif:CustomRendered":function(e){return Ci.CustomRendered(parseInt(e,10))},"exif:ExposureMode":function(e){return Ci.ExposureMode(parseInt(e,10))},"exif:ExposureProgram":function(e){return Ci.ExposureProgram(parseInt(e,10))},"exif:ExposureTime":function(e){return Vo(e)?Ci.ExposureTime(e.split("/").map(function(e){return parseInt(e,10)})):e},"exif:MeteringMode":function(e){return Ci.MeteringMode(parseInt(e,10))},"exif:Saturation":function(e){return Ci.Saturation(parseInt(e,10))},"exif:SceneCaptureType":function(e){return Ci.SceneCaptureType(parseInt(e,10))},"exif:Sharpness":function(e){return Ci.Sharpness(parseInt(e,10))},"exif:ShutterSpeedValue":function(e){return zo(Ci.ShutterSpeedValue,e)},"exif:WhiteBalance":function(e){return Ci.WhiteBalance(parseInt(e,10))}};function zo(e,t){return Vo(t)?e(t.split("/")):t}function Vo(e){return/^-?\d+\/-?\d+$/.test(e)}function Ho(e){var t,n=function(e){if(Array.isArray(e))return e}(t=e.split(","))||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 jo(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)?jo(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];if(void 0!==r&&void 0!==i){var o=parseFloat(r),a=parseFloat(i),u=i.charAt(i.length-1);if(!Number.isNaN(o)&&!Number.isNaN(a))return""+(o+a/60)+u}return e}function Xo(e,t,n){return e.slice(n,n+t.length)===t}function Wo(e,t,n){var r=e.indexOf(n,t);return-1===r?e.length:r+n.length}function Ko(e,t,n){return e>t&&e<n}var Jo={xmp:"http://ns.adobe.com/xap/1.0/",tiff:"http://ns.adobe.com/tiff/1.0/",exif:"http://ns.adobe.com/exif/1.0/",dc:"http://purl.org/dc/elements/1.1/",xmpMM:"http://ns.adobe.com/xap/1.0/mm/",stEvt:"http://ns.adobe.com/xap/1.0/sType/ResourceEvent#",stRef:"http://ns.adobe.com/xap/1.0/sType/ResourceRef#",photoshop:"http://ns.adobe.com/photoshop/1.0/"};function qo(e){return Object.prototype.hasOwnProperty.call(Jo,e)?Jo[e]:"http://fallback.namespace/"+e}function Yo(e,t,n){var r=Zo(e,t,n);if(r===t)return 0;for(;;){var i=$o(e,r,n);if(Xo(e,"/>",i))return 1;if(i===r)return 0;if(-1===(r=Qo(e,i,n)))return 0}}function Zo(e,t,n){for(var r=t;r<n&&-1===" \t\r\n/><=\"'".indexOf(e.charAt(r));)r++;return r}function $o(e,t,n){for(var r=t;r<n&&-1!==" \t\r\n".indexOf(e.charAt(r));)r++;return r}function Qo(e,t,n){var r=Zo(e,t,n);if(r===t)return-1;var i=$o(e,r,n);if("="!==e.charAt(i))return-1;var o=$o(e,i+1,n),a=e.charAt(o);if('"'!==a&&"'"!==a)return-1;for(var u=o+1;u<n;u++)if(e.charAt(u)===a)return u+1;return-1}function ea(e,t,n){for(var r=0,i=0,o=t;o<n;o++){var a=e.charAt(o);if("="===a){if(1!==r&&2!==r)return i;r=3}else if('"'===a||"'"===a){if(3===r||1===r){var u=e.indexOf(a,o+1);if(-1===u||u>=n)return i;o=u}else if(4!==r)return i;i++,r=5}else if("/"===a){if(3===r)return i;0!==r&&5!==r&&6!==r||(r=7)}else{if(">"===a)return ta(r)?i+1:i;if(na(a))4===r&&i++,0===r||4===r||5===r?r=6:1===r&&(r=2);else{if(7===r)return i;2===r&&i++,2===r||5===r||6===r?r=1:3===r&&(r=4)}}}return ta(r)?i+1:i}function ta(e){return 1===e||2===e||4===e}function na(e){return e<=" "||"€"===e||"…"===e||"\u2028"===e||"\u2029"===e}function ra(e){return ra="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},ra(e)}function ia(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 oa(e){var t="function"==typeof Map?new Map:void 0;return oa=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return function(e,t,n){if(aa())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var i=new(e.bind.apply(e,r));return n&&ua(i,n.prototype),i}(e,arguments,fa(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:0,writable:1,configurable:1}}),ua(n,e)},oa(e)}function aa(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(aa=function(){return!!e})()}function ua(e,t){return ua=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ua(e,t)}function fa(e){return fa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},fa(e)}var ca={read:function(e,t,n,r){var i={};if("string"==typeof e)return Aa(i,e,n,r),i;var o,a=(o=function(e,t){if(0===t.length)return[];var n=[Ia(e,t.slice(0,1))];return t.length>1&&n.push(Ia(e,t.slice(1))),n}(e,t),function(e){if(Array.isArray(e))return e}(o)||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}}(o)||function(e){if(e){if("string"==typeof e)return ia(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)?ia(e,2):void 0}}(o)||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.")}()),u=a[0],f=a[1],c=Aa(i,u,n,r);if(f){var s=Aa(i,f,n,r);c||s||(delete i._raw,Aa(i,Ia(e,t),n,r))}return i}},sa=1,da=3,la=4,pa=7,ga=8,ma='<?xpacket end="',ha='"?>',va=16,ya=256,ba=25e4,Sa=0,xa=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t,n){return t=fa(t),function(e,t){if(t&&("object"==ra(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,aa()?Reflect.construct(t,n||[],fa(e).constructor):t.apply(e,n))}(this,t,[e])).name="ParseError",n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:1,configurable:1}}),Object.defineProperty(e,"prototype",{writable:0}),t&&ua(e,t)}(t,e),Object.defineProperty(n=t,"prototype",{writable:0}),n;var n}(oa(Error));function Ia(e,t){for(var n=t.map(function(t){return function(e,t){var n=e.byteLength,r=e.byteOffset,i=Math.min(Math.max(t.dataOffset,0),n),o=Math.min(i+Math.max(t.length,0),n);return new Uint8Array(e.buffer,r+i,o-i)}(e,t)}),r=n.reduce(function(e,t){return e+t.length},0),i=new Uint8Array(r),o=0,a=0;a<n.length;a++)i.set(n[a],o),o+=n[a].length;return new DataView(i.buffer)}function Aa(e,t,n,r){try{var i=function(e,t,n){var r=n(t),i=r.parser,o=r.warning;if(!i)throw console.warn(o),Error();var a=function(e){if("string"==typeof e)return Pa(e);var t=Co();if(void 0!==t)try{return{xmlString:new t("utf-8",{fatal:1}).decode(e),decodeValue:wa}}catch(e){}return Pa(c(new Uint8Array(e.buffer,e.byteOffset,e.byteLength)))}(e),u=a.xmlString,f=a.decodeValue;return{doc:Oa(i,function(e){var t=Math.max(e.lastIndexOf("\n"),e.lastIndexOf("\r"),e.lastIndexOf("\u2028"),e.lastIndexOf("\u2029"))+1,n=e.indexOf(ma,t);if(-1===n)return e;var r=e.lastIndexOf(ha,e.length-ha.length-1);return r<n+ma.length?e:e.slice(0,r+ha.length)}(u.replace(/^.+(<\?xpacket begin)/,"$1"))),raw:u,decodeValue:f}}(t,n,r),o=i.doc,a=i.raw,u=i.decodeValue;e._raw=(e._raw||"")+a;var f=Ta(o),s={};Fa(Ua(f,1,u),s,Object.create(null)),delete s._raw;for(var d=Object.keys(s),l=0;l<d.length;l++)x(e,d[l],s[d[l]]);return 1}catch(e){return 0}}function Pa(e){var t=g(e);return void 0!==t?{xmlString:t,decodeValue:wa}:{xmlString:e,decodeValue:p}}function wa(e){return e}function Oa(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(function(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1/0,r=0,i=0,o=e.indexOf("<");-1!==o;){if(Xo(e,"\x3c!--",o))i++,o=Wo(e,o+4,"--\x3e");else if(Xo(e,"<![CDATA[",o))i++,o=Wo(e,o+9,"]]>");else if(Xo(e,"<?",o)){var a=Wo(e,o+2,"?>");if(-1!==e.slice(o+2,a).indexOf("<!"))return 1;i++,o=a}else{if(Xo(e,"<!",o))return 1;if(Xo(e,"</",o))r=Math.max(r-1,0),o=Wo(e,o+2,">");else{if(r+1>t)return 1;var u=e.indexOf("<",o+1),f=-1===u?e.length:u;Yo(e,o+1,f)||r++,i+=1+ea(e,o+1,f),o++}}if(i>n)return 1;o=e.indexOf("<",o)}return 0}(t,ya,ba))throw new xa("XMP has elements nested deeper than ".concat(ya," levels, more than ").concat(ba," markup nodes, or a markup declaration."));try{var r=e.parseFromString(t,"application/xml"),i=r.getElementsByTagName("parsererror");if(i.length>0)throw new xa(i[0].textContent);return r}catch(r){if("ParseError"===r.name&&function(e){for(var t=e.message+"",n=["prefix is non-null and namespace is null","prefix not bound to a namespace","prefix inte bundet till en namnrymd"],r=0;r<n.length;r++)if(-1!==t.indexOf(n[r]))return 1;return function(e){for(var t=e.split(/[\n\r\u2028\u2029]/),n=0;n<t.length;n++){var r=t[n].indexOf("Namespace prefix ");if(-1!==r&&t[n].lastIndexOf(" is not defined")>r+17)return 1}return 0}(t)}(r)&&!n)return Oa(e,function(e){var t=function(e){for(var t=0;t<e.length;){if(-1===(t=e.indexOf("<",t)))return-1;if(/[A-Za-z_]/.test(e.charAt(t+1)))return t;Xo(e,"\x3c!--",t)?t=Wo(e,t+4,"--\x3e"):Xo(e,"<![CDATA[",t)?t=Wo(e,t+9,"]]>"):"?"===e.charAt(t+1)?t=Wo(e,t+2,"?>"):t++}return-1}(e);if(-1===t)return e;var n=function(e,t){for(var n,r,i=[],o=t;o<e.length;o++){var a=e.charAt(o);if(void 0!==n)a===n&&(i.push({start:r,end:o}),n=void 0);else if('"'===a||"'"===a)n=a,r=o+1;else if(">"===a)return"/"===e.charAt(o-1)?{insertionIndex:o-1,attributeValueSpans:i}:{insertionIndex:o,attributeValueSpans:i}}return{insertionIndex:-1,attributeValueSpans:i}}(e,t+1),r=n.insertionIndex,i=n.attributeValueSpans;if(-1===r)return e;var o=function(e,t,n,r){for(var i,o=Object.create(null),a=/xmlns:([A-Za-z_][A-Za-z0-9._-]*)\s*=\s*["']([^"']*)["']/g,u=0;null!==(i=a.exec(e));){for(;u<r.length&&r[u].end<=i.index;)u++;u<r.length&&r[u].start<=i.index?a.lastIndex=r[u].end:(""!==i[2]||Ko(i.index,t,n))&&(o[i[1]]=1)}return o}(e,t,r,i),a=function(e){for(var t,n=[],r=Object.create(null),i=/(?:^|[^A-Za-z0-9._-])([A-Za-z_][A-Za-z0-9._-]*):[A-Za-z_][A-Za-z0-9._-]*/g;null!==(t=i.exec(e));){var o=t[1];"xmlns"!==o&&"xml"!==o&&void 0===r[o]&&(r[o]=1,n.push(o))}return n}(e).filter(function(e){return void 0===o[e]});if(0===a.length)return e;var u=function(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];t.push(" xmlns:"+r+'="'+qo(r)+'"')}return t.join("")}(a);return e.slice(0,r)+u+e.slice(r)}(t),1);throw r}}function Ta(e){for(var t=e.childNodes,n=0;n<t.length;n++){if("x:xmpmeta"===t[n].tagName)return Ta(t[n]);if("rdf:RDF"===t[n].tagName)return t[n]}throw Error()}function Ua(e,t,n){var r,i=function(e){for(var t=e.childNodes,n=[],r=0;r<t.length;r++)Ca(t[r])||n.push(t[r]);return n}(e);return(r=i).length>0&&r.every(ka)?t?{}:n(function(e){return e.map(function(e){return e.nodeValue}).join("")}(i)):function(e,t){var n=Object.create(null);return e.forEach(function(e){if(function(e){return e.nodeType===sa}(e)){var r=function(e,t){return{attributes:Ea(e,t),value:Ua(e,0,t)}}(e,t);void 0!==n[e.nodeName]?(Array.isArray(n[e.nodeName])||(n[e.nodeName]=[n[e.nodeName]]),n[e.nodeName].push(r)):n[e.nodeName]=r}}),n}(i,n)}function Ca(e){return e.nodeType===ga||e.nodeType===pa}function ka(e){return e.nodeType===da||e.nodeType===la}function Ea(e,t){for(var n=e.attributes,r=Object.create(null),i=0;i<n.length;i++)x(r,n[i].nodeName,t(n[i].value));return r}function Fa(e,t,n){for(var r in e){var i=e[r];Array.isArray(i)||(i=[i]),i.forEach(function(e){La(e.attributes,t,n),"object"===ra(e.value)&&ja(e.value,t,n)})}}function La(e,t,n){for(var r in e)try{Ma(r)&&Na(t,n,Da(r),Ba(e[r],e[r],{},r))}catch(e){}}function Ma(e){return"rdf:parseType"!==e&&!Ra(e)}function Ra(e){return"xmlns"===e.split(":")[0]}function Na(e,t,n,r){var i=I(n);x(e,i,r.tag),x(t,i,r.plainDescription)}function Da(e){return/^MicrosoftPhoto(_\d+_)?:Rating$/i.test(e)?"RatingPercent":e.split(":")[1]||e}function Ba(e,t,n,r){return{tag:{value:e,attributes:n,description:Ga(e,t,r)},plainDescription:t}}function Ga(e,t,n){if(!function(e){return Object.prototype.hasOwnProperty.call(_o,e)&&"function"==typeof _o[e]}(n)||function(e){return"object"===ra(e)&&!Array.isArray(e)}(e))return t;if(Array.isArray(e)){try{var r=_o[n](e,t);if("string"==typeof r)return r}catch(e){}return t}try{return _o[n](e)}catch(t){return e}}function ja(e,t,n){_a(function(){for(var r in e)try{Ra(r)||Na(t,n,Da(r),za(e[r],r))}catch(e){}})}function _a(e){Sa++;try{if(Sa>va)throw new xa("XMP value nested deeper than ".concat(va," levels."));return e()}finally{Sa--}}function za(e,t){return Va(e)?function(e,t){return ou(e[e.length-1],t)}(e,t):function(e){return"Resource"===e.attributes["rdf:parseType"]&&"string"==typeof e.value&&""===e.value.trim()}(e)?{tag:{value:"",attributes:{},description:""},plainDescription:""}:Ha(e)?Xa(e,t):Ya(e)?Za(e,t):$a(e)?Qa(e,t):eu(e)?function(e,t){var n=Wa(e),r=nu(e);return Ba(r.value,r.plainDescription,n,t)}(e,t):ou(e,t)}function Va(e){return Array.isArray(e)}function Ha(e){return"Resource"===e.attributes["rdf:parseType"]&&void 0!==e.value["rdf:value"]||void 0!==e.value["rdf:Description"]&&void 0!==e.value["rdf:Description"].value["rdf:value"]}function Xa(e,t){var n=Wa(e);void 0!==e.value["rdf:Description"]&&(e=e.value["rdf:Description"]),S(n,Wa(e),function(e){var t={};if("object"!==ra(e.value))return t;for(var n in e.value)"rdf:value"===n||Ra(n)||x(t,I(Da(n)),e.value[n].value);return t}(e));var r=function(e){var t=Ka(e.value["rdf:value"]),n=au(t);return n?{value:n,plainDescription:n}:function(e){if(eu(e))return _a(function(){return nu(e)});if("object"===ra(e.value)){var t=Object.create(null),n=Object.create(null);return ja(e.value,t,n),{value:t,plainDescription:Ja(t,n)}}return{value:e.value,plainDescription:e.value}}(t)}(e);return Ba(r.value,r.plainDescription,n,t)}function Wa(e){var t={};for(var n in e.attributes)"rdf:parseType"===n||"rdf:resource"===n||Ra(n)||x(t,I(Da(n)),e.attributes[n]);return t}function Ka(e){return Va(e)?e[e.length-1]:e}function Ja(e,t){var n=[];for(var r in e)n.push("".concat(qa(r),": ").concat(t[r]));return n.join("; ")}function qa(e){return"CiAdrCity"===e?"CreatorCity":"CiAdrCtry"===e?"CreatorCountry":"CiAdrExtadr"===e?"CreatorAddress":"CiAdrPcode"===e?"CreatorPostalCode":"CiAdrRegion"===e?"CreatorRegion":"CiEmailWork"===e?"CreatorWorkEmail":"CiTelWork"===e?"CreatorWorkPhone":"CiUrlWork"===e?"CreatorWorkUrl":e}function Ya(e){return"Resource"===e.attributes["rdf:parseType"]||void 0!==e.value["rdf:Description"]&&void 0===e.value["rdf:Description"].value["rdf:value"]}function Za(e,t){var n={},r=Object.create(null),i={};return void 0!==e.value["rdf:Description"]&&(La(e.value["rdf:Description"].attributes,n,r),S(i,Wa(e)),e=e.value["rdf:Description"]),"object"===ra(e.value)&&ja(e.value,n,r),Ba(n,Ja(n,r),i,t)}function $a(e){return("string"==typeof(t=e.value)?""===t:0===Object.keys(t).length)&&void 0===e.attributes["xml:lang"]&&void 0===e.attributes["rdf:resource"];var t}function Qa(e,t){var n={},r=Object.create(null);return La(e.attributes,n,r),Ba(n,Ja(n,r),{},t)}function eu(e){return void 0!==tu(e.value)}function tu(e){return Ka(e["rdf:Bag"]||e["rdf:Seq"]||e["rdf:Alt"])}function nu(e){var t=tu(e.value).value["rdf:li"],n=[],r=[];return void 0===t?t=[]:Array.isArray(t)||(t=[t]),t.forEach(function(e){var t=function(e){return Ha(e)?ru(Xa(e)):Ya(e)?iu(Za(e)):$a(e)?iu(Qa(e)):ru(ou(e))}(e);n.push(t.value),r.push(t.plainDescription)}),{value:n,plainDescription:r.join(", ")}}function ru(e){return{value:e.tag,plainDescription:e.plainDescription}}function iu(e){return{value:e.tag.value,plainDescription:e.plainDescription}}function ou(e,t){var n=function(e){var t=au(e);if(t)return{value:t,plainDescription:t};if("string"==typeof e.value)return{value:e.value,plainDescription:e.value};var n={},r=Object.create(null);return Fa(e.value,n,r),{value:n,plainDescription:Ja(n,r)}}(e);return Ba(n.value,n.plainDescription,Wa(e),t)}function au(e){return e.attributes&&e.attributes["rdf:resource"]}function uu(e){return uu="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},uu(e)}function fu(e,t,n){return(t=function(e){var t=function(e){if("object"!=uu(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=uu(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return e+""}(e);return"symbol"==uu(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:1,configurable:1,writable:1}):e[t]=n,e}function cu(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 su={2e3:{name:"PathInformation",description:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{remaining:32768},n={},r=[],i=0;i<e.byteLength&&t.remaining>0;i+=26){var o=Nr.getShortAt(e,i);du[o]&&(n[o]||(n[o]=du[o].description),r.push({type:o,path:du[o].path(e,i+2)}),t.remaining--)}return JSON.stringify({types:n,paths:r})}},2999:{name:"ClippingPathName",description:function(e){return(t=a(e,0),function(e){if(Array.isArray(e))return e}(t)||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 cu(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)?cu(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.")}())[1];var t}}},du=fu(fu(fu(fu(fu(fu(fu(fu(fu({},0,{description:"Closed subpath length",path:function(e,t){return[Nr.getShortAt(e,t)]}}),1,{description:"Closed subpath Bezier knot, linked",path:lu}),2,{description:"Closed subpath Bezier knot, unlinked",path:lu}),3,{description:"Open subpath length",path:function(e,t){return[Nr.getShortAt(e,t)]}}),4,{description:"Open subpath Bezier knot, linked",path:lu}),5,{description:"Open subpath Bezier knot, unlinked",path:lu}),6,{description:"Path fill rule",path:function(){return[]}}),8,{description:"Initial fill rule",path:function(e,t){return[Nr.getShortAt(e,t)]}}),7,{description:"Clipboard",path:function(e,t){return[[gu(e,t,8),gu(e,t+4,8),gu(e,t+8,8),gu(e,t+12,8)],gu(e,t+16,8)]}});function lu(e,t){for(var n=[],r=0;r<24;r+=8)n.push(pu(e,t+r));return n}function pu(e,t){var n=gu(e,t,8);return[gu(e,t+4,8),n]}function gu(e,t,n){var r,i=Nr.getLongAt(e,t),o=i>>>31==0?1:-1,a=(2130706432&i)>>>32-n,u=i&parseInt(C("1",32-n),2);return o*(r=a.toString(2)+"."+U(u.toString(2),32-n,"0"),parseInt(r.replace(".",""),2)/Math.pow(2,(r.split(".")[1]||"").length))}function mu(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 hu={read:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Yr;if(!Array.isArray(e))return{};for(var o=new Uint8Array(e),a=n(o.buffer),u={remaining:32768},f={},s=0,d=0;d<Iu&&s+xu<=a.byteLength;d++){var l=i(a,s,Su);s+=Su;var p=Nr.getShortAt(a,s),g=Pu(a,s+=yu),m=g.tagName;if((s+=g.tagNameSize)+bu>a.byteLength)break;var h=Nr.getLongAt(a,s);s+=bu;var v=Math.min(h,a.byteLength-s);if(l===vu){var y=Au(p,m);if(!r.shouldParseTag("photoshop",y,p)){s+=v+v%2;continue}var b=n(a.buffer,s,v),S={id:p,value:c(o,s,s+v)};if(su[p]){try{S.description=su[p].description(b,u)}catch(e){S.description="<no description formatter>"}x(f,y,S)}else t&&(f[y]=S)}s+=v+v%2}return f}},vu="8BIM",yu=2,bu=4,Su=vu.length,xu=Su+yu+2+bu,Iu=4096;function Au(e,t){return su[e]?I(t||su[e].name):"undefined-".concat(e)}function Pu(e,t){var n,r=function(e){if(Array.isArray(e))return e}(n=a(e,t))||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}}(n)||function(e){if(e){if("string"==typeof e)return mu(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)?mu(e,2):void 0}}(n)||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.")}(),i=r[0];return{tagName:r[1],tagNameSize:1+i+(i%2==0?1:0)}}var wu={desc:{name:"ICC Description"},cprt:{name:"ICC Copyright"},dmdd:{name:"ICC Device Model Description"},vued:{name:"ICC Viewing Conditions Description"},dmnd:{name:"ICC Device Manufacturer for Display"},tech:{name:"Technology"}},Ou={4:{name:"Preferred CMM type",value:function(e,t){return i(e,t,4)},description:function(e){return null!==e?Uu(e):""}},8:{name:"Profile Version",value:function(e,t){return e.getUint8(t).toString(10)+"."+(e.getUint8(t+1)>>4).toString(10)+"."+(e.getUint8(t+1)%16).toString(10)}},12:{name:"Profile/Device class",value:function(e,t){return i(e,t,4)},description:function(e){switch(e.toLowerCase()){case"scnr":return"Input Device profile";case"mntr":return"Display Device profile";case"prtr":return"Output Device profile";case"link":return"DeviceLink profile";case"abst":return"Abstract profile";case"spac":return"ColorSpace profile";case"nmcl":return"NamedColor profile";case"cenc":return"ColorEncodingSpace profile";case"mid ":return"MultiplexIdentification profile";case"mlnk":return"MultiplexLink profile";case"mvis":return"MultiplexVisualization profile";default:return e}}},16:{name:"Color Space",value:function(e,t){return i(e,t,4)}},20:{name:"Connection Space",value:function(e,t){return i(e,t,4)}},24:{name:"ICC Profile Date",value:function(e,t){return function(e,t){var n=e.getUint16(t),r=e.getUint16(t+2)-1,i=e.getUint16(t+4),o=e.getUint16(t+6),a=e.getUint16(t+8),u=e.getUint16(t+10);return new Date(Date.UTC(n,r,i,o,a,u))}(e,t).toISOString()}},36:{name:"ICC Signature",value:function(e,t){return Tu(e.buffer.slice(t,t+4))}},40:{name:"Primary Platform",value:function(e,t){return i(e,t,4)},description:function(e){return Uu(e)}},48:{name:"Device Manufacturer",value:function(e,t){return i(e,t,4)},description:function(e){return Uu(e)}},52:{name:"Device Model Number",value:function(e,t){return i(e,t,4)}},64:{name:"Rendering Intent",value:function(e,t){return e.getUint32(t)},description:function(e){switch(e){case 0:return"Perceptual";case 1:return"Relative Colorimetric";case 2:return"Saturation";case 3:return"Absolute Colorimetric";default:return e}}},80:{name:"Profile Creator",value:function(e,t){return i(e,t,4)}}};function Tu(e){return c(new Uint8Array(e))}function Uu(e){switch(e.toLowerCase()){case"appl":return"Apple";case"adbe":return"Adobe";case"msft":return"Microsoft";case"sunw":return"Sun Microsystems";case"sgi":return"Silicon Graphics";case"tgnt":return"Taligent";default:return e}}var Cu={read:function(e,t,n,r){return n&&t[0].compressionMethod!==k?function(e,t,n){if(t[0].compressionMethod!==E)return{};var r=e.byteOffset||0,i=e.buffer.slice(r+t[0].offset,r+t[0].offset+t[0].length);return D(new DataView(i),t[0].compressionMethod,"utf-8","dataview",n).then(Xu).catch(function(){return{}})}(e,t,r):function(e,t){try{for(var n=function(e){return Array.isArray(e)?new DataView(Uint8Array.from(e).buffer).buffer:e.buffer}(e),r=e.byteOffset||0,i=t.reduce(function(e,t){return e+t.length},0),o=Math.min(i,n.byteLength),a=new Uint8Array(o),u=0,f=function(e){for(var t=Object.create(null),n=0;n<e.length;n++)void 0===t[e[n].chunkNumber]&&(t[e[n].chunkNumber]=e[n]);return t}(t),c=1;c<=t.length;c++){var s=f[c];if(!s)throw Error("ICC chunk ".concat(c," not found"));var d=n.slice(r+s.offset,r+s.offset+s.length),l=new Uint8Array(d);a.set(l,u),u+=l.length}return Xu(new DataView(a.buffer))}catch(e){return{}}}(e,t)}},ku=84,Eu=128,Fu="acsp",Lu="desc",Mu="mluc",Ru="text",Nu="sig ",Du=12,Bu=12,Gu=12,ju=16,_u=1e3,zu=1e3,Vu=1048576;function Hu(e,t){return e.byteLength<t+Du}function Xu(e){var t=e.buffer,n=e.getUint32();if(e.byteLength!==n)throw Error("ICC profile length not matching");if(e.byteLength<ku)throw Error("ICC profile too short");for(var r={},a=Object.keys(Ou),u=0;u<a.length;u++){var f=a[u],c=Ou[f],s=c.value(e,parseInt(f,10)),d=s;c.description&&(d=c.description(s)),r[c.name]={value:s,description:d}}if(Tu(t.slice(36,40))!==Fu)throw Error("ICC profile: missing signature");if(function(e){return e.byteLength<Eu+4}(e))return r;for(var l=Math.min(e.getUint32(Eu),zu),p=132,g={remaining:Math.min(e.byteLength,Vu)},m=0;m<l;m++){if(Hu(e,p))return r;var h=i(e,p,4),v=e.getUint32(p+4),y=e.getUint32(p+8);if(v>e.byteLength)return r;var b=i(e,v,4);if(b===Lu){if(v+Bu>e.byteLength)return r;var S=e.getUint32(v+8);if(S>y)return r;Ku(r,h,Wu(e,v+12,S-1,g))}else if(b===Mu){if(v+ju>e.byteLength)return r;var x=e.getUint32(v+8),I=e.getUint32(v+12);if(I<Gu)return r;if(x>_u)return r;var A=x*I;if(A>e.byteLength-v-ju)return r;if(A>g.remaining)return r;g.remaining-=A;for(var P=Math.min(y,e.byteLength-v),w=v+ju,O=[],T=0;T<x;T++){var U=i(e,w+0,2),C=i(e,w+2,2),k=e.getUint32(w+4),E=e.getUint32(w+8),F=Math.min(k,Math.max(0,P-E),g.remaining);g.remaining-=F;var L=o(e,v+E,F);O.push({languageCode:U,countryCode:C,text:L}),w+=I}if(1===x)Ku(r,h,O[0].text);else{for(var M={},R=0;R<O.length;R++)M["".concat(O[R].languageCode,"-").concat(O[R].countryCode)]=O[R].text;Ku(r,h,M)}}else if(b===Ru){var N=Wu(e,v+8,y-8,g),D=N.indexOf("\0");Ku(r,h,-1===D?N:N.slice(0,D))}else b===Nu&&Ku(r,h,Tu(t.slice(v+8,v+12)));p+=12}return r}function Wu(e,t,n,r){var i=Math.max(0,Math.min(n,e.byteLength-t,r.remaining));return r.remaining-=i,Tu(e.buffer.slice(t,t+i))}function Ku(e,t,n){wu[t]?e[wu[t].name]={value:n,description:n}:e[t]={value:n,description:n}}var Ju={1:{name:"CameraSettings",description:function(e){return e}},4:{name:"ShotInfo",description:function(e){return e}},149:"LensModel"},qu={read:function(e,t,n,r,i){var o,a=hi(e,Fr,t,t+n,r,i,arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,arguments.length>6&&void 0!==arguments[6]?arguments[6]:void 0,"makerNotes",arguments.length>7&&void 0!==arguments[7]?arguments[7]:void 0,((o={})[Fr]=Ju,o));return a.ShotInfo&&delete(a=S({},a,function(e){var t={},n=e[27];return Number.isFinite(n)&&(t.AutoRotate={value:n,description:Yu(n)}),t}(a.ShotInfo.value))).ShotInfo,a.CameraSettings&&delete(a=S({},a,function(e){var t={};if(!Array.isArray(e))return t;var n=e[22];return Number.isFinite(n)&&(t.LensType={value:n,description:"".concat(n)}),t}(a.CameraSettings.value))).CameraSettings,a},SHOT_INFO_AUTO_ROTATE:27,CAMERA_SETTINGS_LENS_TYPE:22};function Yu(e){return 0===e?"None":1===e?"Rotate 90 CW":2===e?"Rotate 180":3===e?"Rotate 270 CW":"Unknown"}var Zu={0:{name:"PentaxVersion",description:function(e){return e.join(".")}},5:"PentaxModelID",555:"LevelInfo"},$u={K3_III:78420},Qu={CAMERA_ORIENTATION:1,ROLL_ANGLE:3,PITCH_ANGLE:5},ef={read:function(e,t,n,r){var i,o,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,u=arguments.length>5&&void 0!==arguments[5]?arguments[5]:void 0,f=arguments.length>6&&void 0!==arguments[6]?arguments[6]:void 0;try{var c=je.getByteOrder(e,t+n+8),s=t+n,d=hi(e,Lr,s,s+10,c,r,a,u,"makerNotes",f,((o={})[Lr]=Zu,o));return function(e){return e.PentaxModelID&&e.PentaxModelID.value===$u.K3_III&&e.LevelInfo}(d)?(d=S({},d,function(e,t,n,r){var i,o={},a=r===je.LITTLE_ENDIAN;if(tf(Qu.CAMERA_ORIENTATION,1,n)){var u=e.getInt8(t+Qu.CAMERA_ORIENTATION);o.CameraOrientation={value:u,description:(i=u,0===i?"Horizontal (normal)":1===i?"Rotate 270 CW":2===i?"Rotate 180":3===i?"Rotate 90 CW":4===i?"Upwards":5===i?"Downwards":"Unknown")}}if(tf(Qu.ROLL_ANGLE,2,n)){var f=e.getInt16(t+Qu.ROLL_ANGLE,a);o.RollAngle={value:f,description:nf(f)}}if(tf(Qu.PITCH_ANGLE,2,n)){var c=e.getInt16(t+Qu.PITCH_ANGLE,a);o.PitchAngle={value:c,description:rf(c)}}return o}(e,s+d.LevelInfo.__offset,(i=d.LevelInfo.value,Array.isArray(i)&&"number"==typeof i[0]?i.length:0),c)),delete d.LevelInfo):d.LevelInfo&&delete d.LevelInfo.__offset,d}catch(e){return{}}},PENTAX_IFD_OFFSET:10,MODEL_ID:$u,LIK3III:Qu};function tf(e,t,n){return e+t<=n}function nf(e){return""+-.5*e}function rf(e){return""+-.5*e}var of={read:function(e,t){for(var n={},r=0;r<ff.length;r++)n[ff[r].name]=cf(e,t,ff[r]);return n}},af={0:"Grayscale",2:"RGB",3:"Palette",4:"Grayscale with Alpha",6:"RGB with Alpha"},uf={0:"Noninterlaced",1:"Adam7 Interlace"},ff=[{name:"Image Width",offset:0,size:4,read:Nr.getLongAt,description:function(e){return"".concat(e,"px")}},{name:"Image Height",offset:4,size:4,read:Nr.getLongAt,description:function(e){return"".concat(e,"px")}},{name:"Bit Depth",offset:8,size:1,read:Nr.getByteAt,description:function(e){return"".concat(e)}},{name:"Color Type",offset:9,size:1,read:Nr.getByteAt,description:function(e){return af[e]||"Unknown"}},{name:"Compression",offset:10,size:1,read:Nr.getByteAt,description:function(e){return 0===e?"Deflate/Inflate":"Unknown"}},{name:"Filter",offset:11,size:1,read:Nr.getByteAt,description:function(e){return 0===e?"Adaptive":"Unknown"}},{name:"Interlace",offset:12,size:1,read:Nr.getByteAt,description:function(e){return uf[e]||"Unknown"}}];function cf(e,t,n){if(!(t+n.offset+n.size>e.byteLength)){var r=n.read(e,t+n.offset);return{value:r,description:n.description(r)}}}var sf={read:function(e,t){if(void 0!==e.text.name){if(void 0===e.compression)return pf(mf(t.dataView,e.text),t,0);if(!(t.compressedPngTextChunks>=lf))return t.compressedPngTextChunks++,function(e,t){var n=t.compression,r=t.text,i=hf(e.dataView,r);return void 0===i?Promise.resolve(vf(r)):e.decompress(i,N(n),yf(r.chunkType),"string").then(function(e){return bf(e,r.chunkType,r.name)}).catch(function(){return vf(r)})}(t,e).then(function(e){return pf(e,t,1)})}}},df=6,lf=255;function pf(e,t,n){var r=e.name,i=e.value,o=e.description;if(function(e,t){return e.toLowerCase()===Ln&&"exif"===t.substring(1,5)}(r,i))return{tags:{},blocks:[{kind:"exif",tiffHeaderOffset:df,origin:"rawProfile",decompressed:n,getDataView:function(){return If(i)}}]};if(xf(r,i))return{tags:{},blocks:[{kind:"iptc",dataOffset:0,origin:"rawProfile",decompressed:n,getDataView:function(){return If(i)}}]};if(r&&t.tagFilter.shouldParseGroup("png")){var a={};return x(a,I(r),{value:i,description:o}),{tags:ii("png",a,t.tagFilter)}}}function gf(e,t){var n=mf(t,e.text);return xf(n.name,n.value)}function mf(e,t){return bf(D(hf(e,t),k,yf(t.chunkType),"string"),t.chunkType,t.name)}function hf(e,t){var n=t.valueOffset,r=t.valueLength;if(void 0!==n){var i=e.byteOffset;return new DataView(e.buffer.slice(i+n,i+n+r))}}function vf(e){return bf("<text using unknown compression>",e.chunkType,e.name)}function yf(e){return e===wn||e===Tn?"latin1":"utf-8"}function bf(e,t,n){var r=function(e){return e instanceof DataView?i(e,0,e.byteLength):e}(e);return{name:n,value:r,description:t===On?Sf(e):r}}function Sf(e){return Eo.decode("UTF-8",e)}function xf(e,t){return e.toLowerCase()===Mn&&"iptc"===t.substring(1,5)}function If(e){var t=/\n(exif|iptc)\n\s*\d+\n/.exec(e);if(!t)throw Error("Invalid raw profile header.");var n=t.index+t[0].length,r=function(e,t){for(var n=0,r=t;r<e.length;r++)T(e.charCodeAt(r))>=0&&n++;return n}(e,n);if(r%2!=0)throw Error("Odd number of hex digits in raw profile.");for(var i=new Uint8Array(r/2),o=0,a=-1,u=n;u<e.length;u++){var f=T(e.charCodeAt(u));f<0||(a<0?a=f:(i[o++]=a<<4|f,a=-1))}return new DataView(i.buffer)}var Af={read:function(e,t){for(var n={},r=0;r<t.length;r++){var o=Nr.getLongAt(e,t[r]+xn),a=i(e,t[r]+In,Sn);a===Un?(n["Pixels Per Unit X"]=Pf(e,t[r],o),n["Pixels Per Unit Y"]=wf(e,t[r],o),n["Pixel Units"]=Of(e,t[r],o)):a===Cn&&(n["Modify Date"]=Tf(e,t[r],o))}return n}};function Pf(e,t,n){if(Uf(e,t,n,0,4)){var r=Nr.getLongAt(e,t+An+0);return{value:r,description:""+r}}}function wf(e,t,n){if(Uf(e,t,n,4,4)){var r=Nr.getLongAt(e,t+An+4);return{value:r,description:""+r}}}function Of(e,t,n){if(Uf(e,t,n,8,1)){var r=Nr.getByteAt(e,t+An+8);return{value:r,description:1===r?"meters":"Unknown"}}}function Tf(e,t,n){if(Uf(e,t,n,0,7)){var r=Nr.getShortAt(e,t+An),i=Nr.getByteAt(e,t+An+2),o=Nr.getByteAt(e,t+An+3),a=Nr.getByteAt(e,t+An+4),u=Nr.getByteAt(e,t+An+5),f=Nr.getByteAt(e,t+An+6);return{value:[r,i,o,a,u,f],description:"".concat(Cf(r,4),"-").concat(Cf(i,2),"-").concat(Cf(o,2)," ").concat(Cf(a,2),":").concat(Cf(u,2),":").concat(Cf(f,2))}}}function Uf(e,t,n,r,i){return r+i<=n&&t+An+r+i<=e.byteLength}function Cf(e,t){return U(""+e,t,"0")}var kf={read:function(e,t){var n={};if(t+Lf>e.byteLength)return n;var r=Nr.getByteAt(e,t);return n.Alpha=function(e){var t=16&e;return{value:t?1:0,description:t?"Yes":"No"}}(r),n.Animation=function(e){var t=2&e;return{value:t?1:0,description:t?"Yes":"No"}}(r),n.ImageWidth=Mf(e,t+Ef),n.ImageHeight=Mf(e,t+Ff),n}},Ef=4,Ff=7,Lf=10;function Mf(e,t){var n=Nr.getByteAt(e,t)+256*Nr.getByteAt(e,t+1)+65536*Nr.getByteAt(e,t+2)+1;return{value:n,description:n+"px"}}var Rf={read:function(e){for(var t={},n=0;n<Df.length;n++)t[Df[n].name]=Bf(e,Df[n]);return t}},Nf=function(e){return"".concat(e," ").concat(1===e?"bit":"bits")},Df=[{name:"GIF Version",offset:3,size:3,getValue:function(e,t){return i(e,t,3)},description:function(e){return e}},{name:"Image Width",offset:6,size:2,getValue:function(e,t){return e.getUint16(t,1)},description:function(e){return"".concat(e,"px")}},{name:"Image Height",offset:8,size:2,getValue:function(e,t){return e.getUint16(t,1)},description:function(e){return"".concat(e,"px")}},{name:"Global Color Map",offset:10,size:1,getValue:function(e,t){return(128&e.getUint8(t))>>>7},description:function(e){return 1===e?"Yes":"No"}},{name:"Bits Per Pixel",offset:10,size:1,getValue:function(e,t){return 1+(7&e.getUint8(t))},description:Nf},{name:"Color Resolution Depth",offset:10,size:1,getValue:function(e,t){return((112&e.getUint8(t))>>>4)+1},description:Nf}];function Bf(e,t){if(!(t.offset+t.size>e.byteLength)){var n=t.getValue(e,t.offset);return{value:n,description:t.description(n)}}}var Gf=[6,7,99],jf={get:function(e,t,n,r){if(function(e){return e&&(void 0===e.Compression||Gf.includes(e.Compression.value))&&e.JPEGInterchangeFormat&&e.JPEGInterchangeFormat.value&&e.JPEGInterchangeFormatLength&&e.JPEGInterchangeFormatLength.value}(t)){var i=n+t.JPEGInterchangeFormat.value,o=t.JPEGInterchangeFormatLength.value;if(function(e,t,n){return _f(t)&&_f(n)&&t+n<=e.byteLength}(e,i,o)){t.type="image/jpeg";var a=e.byteOffset;t.image=e.buffer.slice(a+i,a+i+o),r&&A(t,"base64",function(){return r(this.image)})}}return t}};function _f(e){return"number"==typeof e&&e>=0&&e%1==0}var zf={get:function(e,t){var n={},r=0,i=Hf(Vf(e,"exif","FocalLength",t)),o=Hf(Vf(e,"exif","FocalPlaneXResolution",t)),a=Hf(Vf(e,"exif","FocalPlaneYResolution",t)),u=Xf(Vf(e,"exif","FocalPlaneResolutionUnit",t)),f=function(e,t){var n=Xf(Vf(e,"exif","PixelXDimension",t)),r=Xf(Vf(e,"exif","PixelYDimension",t));return n&&r?{width:n,height:r}:{width:Xf(Vf(e,"file","Image Width",t)),height:Xf(Vf(e,"file","Image Height",t))}}(e,t),c=Xf(Vf(e,"exif","FocalLengthIn35mmFilm",t))||function(e,t,n,r,i,o){if(e&&t&&n&&r&&i&&o){var a;switch(n){case 2:a=25.4;break;case 3:a=10;break;case 4:a=1;break;default:return}var u=i/(t/a);return Xf(o*(43.27/Math.sqrt(Math.pow(r/(e/a),2)+Math.pow(u,2))))}}(o,a,u,f.width,f.height,i);c&&(n.FocalLength35efl={value:c,description:Ei(c)},r=1);var s=function(e,t){if(e&&t){var n=Xf(t/e);if(n)return{value:n,description:n.toFixed(1)}}}(i,c);s&&(n.ScaleFactorTo35mmEquivalent=s,r=1);var d=function(e){if(e){var t=Xf(2*Math.atan(36/(2*e))*(180/Math.PI));if(t)return{value:t,description:t.toFixed(1)+" deg"}}}(c);if(d&&(n.FieldOfView=d,r=1),r)return n}};function Vf(e,t,n,r){return r&&e[t]&&e[t][n]?e[t][n].value:!r&&e[n]?e[n].value:void 0}function Hf(e){if("string"==typeof e){var t=e.split("/",3);return 1===t.length?Xf(e):Wf(t)}return Array.isArray(e)?Wf(e):Xf(e)}function Xf(e){var t;return"number"==typeof e?t=e:"string"==typeof e&&(t=Number(e)),t>0&&t<1/0?t:void 0}function Wf(e){if(2===e.length)return Xf(Xf(e[0])/Xf(e[1]))}function Kf(e){return"string"==typeof e&&"undefined"!=typeof btoa?btoa(e):"undefined"!=typeof Buffer&&"undefined"!=typeof Buffer.from&&Buffer.from!==Uint8Array.from?Buffer.from(e).toString("base64"):"undefined"!=typeof btoa?btoa(c(new Uint8Array(e))):"undefined"!=typeof Buffer?new Buffer(e).toString("base64"):void 0}var Jf=[0,9,12],qf="ExifReader needs 0.9.12 or later, or a parser passed in the domParser option.",Yf="Warning: XMP tags are skipped because the version of the @xmldom/xmldom that was found could not be read. "+qf,Zf={get:function(e){return e?{parser:e}:"undefined"!=typeof DOMParser?{parser:new DOMParser}:function(){try{var e=J.optionalPackage("@xmldom/xmldom"),t=e.DOMParser,n=e.onErrorStopParsing,r=(o="string"==typeof(i=(a=J.optionalPackage("@xmldom/xmldom/package.json"))?a.version:void 0)?/^(\d+)\.(\d+)\.(\d+)(-?)/.exec(i):null)?function(e,t){for(var n=0;n<3;n++)if(e[n]!==Jf[n])return e[n]<Jf[n];return t}(o.slice(1,4).map(Number),"-"===o[4])?"Warning: XMP tags are skipped because the @xmldom/xmldom that was found is version ".concat(i,". ").concat(qf):void 0:Yf;return r?{parser:void 0,warning:r}:{parser:new t({onError:n})}}catch(e){return{parser:void 0,warning:"Warning: DOMParser is not available. It is needed to be able to parse XMP tags."}}var i,o,a}()}},$f={expanded:["file","jfif","carriedIptc","carriedXmp","carriedPhotoshop","carriedIcc","carriedMakerNotes","exif","iptc","xmp","brobExif","brobXmp","icc","mpf","pngFile","pngText","deferredPngText","pngChunk","riff","gif","jxlFile","isoBmffFile","gps","composite","thumbnail","fileType","metadataRange"],flat:["file","jfif","carriedIptc","carriedPhotoshop","carriedIcc","carriedMakerNotes","exif","carriedXmp","iptc","xmp","brobExif","brobXmp","icc","mpf","pngFile","pngText","deferredPngText","pngChunk","riff","gif","jxlFile","isoBmffFile","gps","composite","thumbnail","fileType","metadataRange"]},Qf={assign:nc,merge:function(e,t,n){if(n.merge.group(n.parsedGroups,t.group,t.tags),!n.tagFilter.shouldReturnGroup(t.group))return e;var r=n.deps.filterTagsForReturn(t.group,t.tags,n.tagFilter);return n.expanded?(n.merge.group(e,t.group,r),e):n.merge.topLevel(e,ic(t.group,r,n.deps))},brobXmp:function(e,t,n){return ke.USE_JXL&&t.tags&&0!==Object.keys(t.tags).length?nc(e,t,n):e},pngFile:function(e,t,n){if(!ke.USE_PNG)return e;if(n.parsedGroups.pngFile=t.tags,!n.tagFilter.shouldReturnGroup("png"))return e;var r=n.deps.filterTagsForReturn("png",t.tags,n.tagFilter);return n.expanded?(n.merge.group(e,"png",r),e.pngFile=r,e):n.merge.topLevel(e,r)},pngTextTags:function(e,t,n){if(!ke.USE_PNG||!n.tagFilter.shouldReturnGroup("png"))return e;var r=n.deps.filterTagsForReturn("png",t.tags,n.tagFilter);return n.expanded?(n.merge.group(e,"png",r),Object.keys(r).length>0&&n.merge.group(e,"pngText",r),e):n.merge.topLevel(e,r)},nested:function(e,t,n){return function(e,t,n){for(var r=ec(t,n.expanded),i=0;i<r.length;i++)e=tc(e,r[i],n);return e}(e,t.blocks,n)},thumbnailCandidate:function(e,t,n){return n.thumbnails.push({rank:t.rank,thumbnail:t.tags}),e},gps:function(e,t,n){if(ke.USE_EXIF&&n.expanded&&n.tagFilter.shouldReturnGroup("gps")&&n.parsedGroups.exif){var r=n.deps.getGpsGroupFromExifTags(n.parsedGroups.exif);r&&(e.gps=n.deps.filterTagsForReturn("gps",r,n.tagFilter))}return e},composite:function(e,t,n){if(!ke.USE_EXIF&&!ke.USE_XMP||!n.tagFilter.shouldReturnGroup("composite"))return e;var r=e,i=n.expanded;n.tagFilter.isActive&&(r={exif:n.parsedGroups.exif,file:n.parsedGroups.file},i=1);var o=n.deps.Composite.get(r,i);return o?rc(e,"composite",n.deps.filterTagsForReturn("composite",o,n.tagFilter),n.expanded,n.deps):e},thumbnail:function(e,t,n){if(delete e.Thumbnail,!n.tagFilter.shouldReturnGroup("thumbnail")||!n.tagFilter.shouldReturnTag("thumbnail","Thumbnail"))return e;var r=function(e){if(ke.USE_EXIF&&ke.USE_THUMBNAIL){var t=e.filter(function(e){return"main"===e.rank})[0];if(t&&oc(t.thumbnail))return t.thumbnail;var n=e.filter(function(e){return"embedded"===e.rank&&oc(e.thumbnail)})[0];return n?n.thumbnail:t?t.thumbnail:void 0}}(n.thumbnails);return r&&(e.Thumbnail=r),e},fileType:function(e,t,n){return delete e.FileType,n.fileType&&n.tagFilter.shouldReturnGroup("file")&&n.tagFilter.shouldReturnTag("file","FileType")&&(n.expanded?(e.file||(e.file={}),e.file.FileType=n.fileType):e.FileType=n.fileType),e},metadataRange:function(e,t,n){if(!n.expanded)return e;var r=function(e,t,n,r){var i=(e||[]).slice(),o=!!t;if(r&&r.mpf&&Array.isArray(r.mpf.Images))for(var a=0;a<r.mpf.Images.length;a++){var u=r.mpf.Images[a];if(u&&u.ImageOffset&&u.ImageSize){var f=u.ImageOffset.value,c=u.ImageSize.value;"number"!=typeof f||f<=0||"number"!=typeof c||c<=0||i.push({type:"mpfImage",start:f,end:f+c})}}if(0!==i.length){i.sort(function(e,t){return e.start-t.start});for(var s=i[0].start,d=i[0].end,l=1;l<i.length;l++)i[l].end>d&&(d=i[l].end);var p=n&&"number"==typeof n.byteLength?n.byteLength:0;return{start:s,end:d,complete:!o&&d<=p,blocks:i}}}(t.metadataBlocks,t.metadataTruncated,n.dataView,n.parsedGroups);return r&&(e.metadataRange=r),e}};function ec(e,t){var n=t?$f.expanded:$f.flat;return e.map(function(e,t){return{block:e,index:t,position:n.indexOf(e.slot)}}).sort(function(e,t){return e.position-t.position||e.index-t.index}).map(function(e){return e.block})}function tc(e,t,n){return Qf[t.mode](e,t,n)}function nc(e,t,n){if(n.parsedGroups[t.group]=t.tags,!n.tagFilter.shouldReturnGroup(t.group))return e;var r=n.deps.filterTagsForReturn(t.group,t.tags,n.tagFilter);return rc(e,t.group,r,n.expanded,n.deps)}function rc(e,t,n,r,i){return r?(e[t]=n,e):i.objectAssign({},e,ic(t,n,i))}function ic(e,t,n){if(!ke.USE_XMP||"xmp"!==e)return t;var r=n.objectAssign({},t);return delete r._raw,r}function oc(e){return!!e&&!!e.image}function ac(e){var t=[];return{group:function(t,r,i){t[r]=n(t[r]),e.objectAssign(t[r],i)},topLevel:function(t,r){return e.objectAssign(n(t),r)}};function n(n){if(-1!==t.indexOf(n))return n;var r=e.objectAssign({},n);return t.push(r),r}}var uc=3,fc=4,cc=4,sc=65536,dc=2,lc=65536;function pc(e,t,n){for(var r=function(e,t,n){for(var r=Object.create(null),i=e.groups,o=0;o<i.length;o++)for(var a=0;a<i[o].consumes.length;a++)r[i[o].consumes[a]]=1;var u={composition:e,context:n,consumedKinds:r,consumersOf:f,shouldDispatch:gc(i,f,n.tagFilter),finderBlocks:void 0};return u.finderBlocks=function(e,t){for(var n=Object.create(null),r=0;r<t.length;r++){var i=t[r].block.kind;t[r].rank=e(t[r].block),(void 0===n[i]||t[r].rank>n[i])&&(n[i]=t[r].rank)}return t.filter(function(e){return e.rank===n[e.block.kind]}).sort(function(e,t){return e.position-t.position||e.index-t.index}).map(function(e){return e.block})}(e.rank,function(e,t,n){for(var r=[],i=0;i<t.length;i++){var o=mc(e.groups,e.dispatchKind(t[i]));-1===o||hc(t[i],n.context)||r.push({block:t[i],index:i,position:o})}return r}(e,t,u)),u;function f(e){return i.filter(function(t){return-1!==t.consumes.indexOf(e)})}}(e,t,n),i=[],o=[],a=0;a<r.finderBlocks.length;a++)vc(r.finderBlocks[a],1,i,o,r);return n.options.async?Ic(o,r).then(function(){return{mergeBlocks:Ac(i)}}):{mergeBlocks:Ac(i)}}function gc(e,t,n){var r=[];return function i(o){var a=e.indexOf(o);return void 0===r[a]&&(r[a]="visiting",r[a]=n.shouldParseGroup(o.key)||o.emits.some(function(e){return t(e).some(i)})),1==r[a]}}function mc(e,t){for(var n=0;n<e.length;n++)if(-1!==e[n].consumes.indexOf(t))return n;return-1}function hc(e,t){return!t.options.async&&void 0!==e.compression}function vc(e,t,n,r,i){for(var o=i.consumersOf(i.composition.dispatchKind(e)),a=0;a<o.length;a++){var u=o[a];if(i.shouldDispatch(u)){var f={group:u,block:e,tags:void 0,children:[]},c=void 0;try{c=u.read(e,i.context)}catch(e){continue}if(z(c)){if(!i.context.options.async)throw Error("Promise is required when async mode is enabled.");n.push(f),r.push({node:f,depth:t,promise:Promise.resolve(c).then(yc,bc)})}else void 0!==c&&(n.push(f),f.tags=c.tags,Sc(c.blocks,t+1,f.children,r,i))}}}function yc(e){return e}function bc(){}function Sc(e,t,n,r,i){if(e)for(var o=0;o<e.length;o++){var a=e[o];t>uc||!i.consumedKinds[i.composition.dispatchKind(a)]||hc(a,i.context)||xc(a,i)||vc(a,t,n,r,i)}}function xc(e,t){for(var n=t.composition.suppressions,r=0;r<n.length;r++)if(n[r].kind===e.kind&&n[r].isSuppressed(e,t.finderBlocks,t.context))return 1;return 0}function Ic(e,t){return 0===e.length?Promise.resolve():Promise.all(e.map(function(e){return e.promise})).then(function(n){for(var r=[],i=0;i<e.length;i++){var o=e[i],a=o.node,u=o.depth;void 0!==n[i]&&(a.tags=n[i].tags,Sc(n[i].blocks,u+1,a.children,r,t))}return Ic(r,t)})}function Ac(e){for(var t=[],n=0;n<e.length;n++)t.push.apply(t,Pc(e[n]));return t}function Pc(e){var t=e.group.merge(e.block),n=void 0===e.tags?[]:[S({group:e.group.key,tags:e.tags},t)],r=Ac(e.children);return 0===r.length&&void 0===t.outerSlot?n:[{slot:t.outerSlot||t.slot,mode:"nested",blocks:n.concat(r)}]}function wc(e){var t=e.dataView,n=e.options,r=e.tagFilter,i=e.decompressConfig,o=e.getBase64Image,a=e.getDomParser,u=function(e){var t=[],n=0;return{run:function(e){return new Promise(function(n,i){t.push({task:e,resolve:n,reject:i}),r()})}};function r(){if(!(n>=e||0===t.length)){var i=t.shift(),o=i.task,a=i.resolve,u=i.reject;n++,new Promise(function(e){return e(o())}).then(function(e){n--,r(),a(e)},function(e){n--,r(),u(e)})}}}(fc),f=function(e){return void 0!==e&&"number"==typeof e.byteLength?e.byteLength:0}(t),c={dataView:t,options:n,tagFilter:r,decompressConfig:i,getBase64Image:o,getDomParser:a,valueBudget:void 0,decompressedApplicationNotesSize:0,copiedThumbnailSize:0,hasEmbeddedThumbnailImage:0,compressedPngTextChunks:0,hasRawIptcProfile:void 0,embeddedThumbnailSizeBound:dc*f+lc,decompress:function(e,t,n,r){return u.run(function(){return D(e,t,n,r,i)})},getValueBudget:function(e){if(void 0===c.valueBudget){var n=e||t;void 0!==n&&(c.valueBudget=yi(n))}return c.valueBudget},takeDecompressedApplicationNotesAllowance:function(e){return c.exceedsBrobXmpSizeBound(c.decompressedApplicationNotesSize+e)?0:(c.decompressedApplicationNotesSize+=e,1)},exceedsBrobXmpSizeBound:function(e){return e>cc*f+sc}};return c}function Oc(e){this.name="MetadataMissingError",this.message=e||"No Exif data",this.stack=Error().stack}Oc.prototype=Error();var Tc={MetadataMissingError:Oc},Uc=ke.USE_EXIF?S({},Fi,Di):{},Cc={load:Ec,loadView:Lc,errors:Tc};!function(e){for(var t=Object.create(null),n=e.groups,r=0;r<n.length;r++)for(var i=0;i<n[r].consumes.length;i++){var o=n[r].consumes[i];t[o]=(t[o]||[]).concat(n[r].emits)}var a=Object.create(null);for(var u in t)f(u);function f(e){if("done"!==a[e]){if("visiting"===a[e])throw Error("The group emission graph has a cycle through "+e);a[e]="visiting";for(var n=t[e]||[],r=0;r<n.length;r++)f(n[r]);a[e]="done"}}}(Rc());var kc=Tc;function Ec(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("auto"===t.length)return function(e){if(1!=e.expanded||1!=e.includeOffsets)throw Error('length: "auto" requires both expanded: true and includeOffsets: true.')}(t),Oe(Fc)(e,t);if(ne(e)||re(e)){b();var n=ne(e)?oe:ae,r=S({},t,{async:1});return n(e,r).then(function(e){return Fc(e,r)})}return Fc(e,t)}function Fc(e,t){return Lc(function(e){if(r(e))return new DataView(e.buffer,e.byteOffset,e.byteLength);try{return new DataView(e)}catch(e){throw new TypeError("Passed data type is unsupported. Pass an ArrayBuffer, SharedArrayBuffer, DataView, a typed array such as a Uint8Array or Node Buffer, or a File.")}}(e),t)}function Lc(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.expanded,i=void 0===r?0:r,o=t.async,a=void 0===o?0:o,u=t.computed,f=void 0===u?0:u,c=t.includeUnknown,s=void 0===c?0:c,d=t.includeOffsets,l=void 0===d?0:d,p=t.domParser,g=void 0===p?void 0:p,m=t.includeTags,h=void 0===m?void 0:m,v=t.excludeTags,y=void 0===v?void 0:v,x=t.decompress,I=void 0===x?void 0:x;e=function(e){return function(e){return function(e){return!!e&&"function"==typeof e.getUint8&&"number"==typeof e.byteOffset&&"number"==typeof e.byteLength&&!!e.buffer&&"function"==typeof e.buffer.slice}(e)&&(e.byteOffset>0||e.byteLength<e.buffer.byteLength)}(e)?n(e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength)):e}(e);var A=wr.parseAppMarkers(e,i&&l),P=A.fileType,w=A.blocks,O=A.ranges,T=A.truncated;a&&b();var U=a?w:w.filter(function(e){return!gs(e)}),C=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.includeTags,n=e.excludeTags,r=!!t,i=!!n,o=r||i,a=Object.create(null),u=Object.create(null),f=Object.create(null);if(!o)return qr();var c=r&&(Qr(t,"iptc")||Qr(t,"xmp")||Qr(t,"icc")||Qr(t,"photoshop")||Qr(t,"makerNotes")||Qr(t,"thumbnail")||Qr(t,"gps")||Qr(t,"composite")),s=r&&Qr(t,"composite"),d=Object.create(null);r&&(d=function(e){var t=function(e){var t=Object.create(null);if(!e)return t;for(var n in Array.isArray(e.exif)&&e.exif.length>0&&(t[zr.exifIfdPointer]=1,function(e,t){for(var n=0;n<t.length;n++){var r=t[n];if("number"==typeof r&&(Vr[r]&&(e[zr.gpsInfoIfdPointer]=1),Hr[r]&&(e[zr.interoperabilityIfdPointer]=1)),"string"==typeof r){var i=r.toLowerCase();0===i.indexOf("gps")&&(e[zr.gpsInfoIfdPointer]=1),0!==i.indexOf("interoperability")&&0!==i.indexOf("relatedimage")||(e[zr.interoperabilityIfdPointer]=1)}}}(t,e.exif)),Wr)if(Jr(e[n])){for(var r=Wr[n],i=0;i<r.length;i++)t[r[i]]=1;t[zr.exifIfdPointer]=1}return Jr(e.gps)&&(t[zr.gpsInfoIfdPointer]=1,t[zr.exifIfdPointer]=1),t}(e);return Qr(e,"composite")&&(function(e,t){for(var n=0;n<t.length;n++)e[t[n]]=1}(t,Kr.exif),t[zr.exifIfdPointer]=1),t}(t));var l=Object.create(null);for(var p in r&&s&&(l=function(e){for(var t=Object.create(null),n=0;n<e.length;n++)t[e[n].toLowerCase()]=1;return t}(Kr.file)),_r){var g=r&&Object.prototype.hasOwnProperty.call(t,p),m=void 0;i&&Object.prototype.hasOwnProperty.call(n,p)&&!g&&(m=n[p]);var h=ti({groupKey:p,includeValue:g?t[p]:void 0,excludeValue:m,extraIncludeNames:Object.create(null)});a[p]=r?g:1,g&&ei(t[p])&&(a[p]=0),h.excludeAll&&(a[p]=0),u[p]=h;var v=ti({groupKey:p,includeValue:Zr({groupKey:p,hasIncludeTags:r,hasIncludeEntry:g,includeTags:t,shouldParseExif:c,shouldParseFile:s}),excludeValue:m,extraIncludeNames:$r({groupKey:p,hasIncludeTags:r,hasIncludeEntry:g,shouldParseExif:c,shouldParseFile:s,exifIncludeDependencies:d,fileIncludeDependencies:l})});f[p]=v}return{isActive:o,shouldReturnGroup:y,shouldParseGroup:b,shouldReturnTag:function(e,t,n){return _r[e]?y(e)?ni(u[e],t,n):0:1},shouldParseTag:function(e,t,n){return _r[e]?b(e)?ni(f[e],t,n):0:1}};function y(e){return _r[e]?!!a[e]:1}function b(e){return _r[e]?y(e)?1:"exif"===e?c:"file"===e?s:0:1}}({includeTags:h,excludeTags:y}),k=wc({dataView:e,options:{expanded:i,async:a,computed:f,includeUnknown:s,includeOffsets:l,domParser:g,includeTags:h,excludeTags:y},tagFilter:C,decompressConfig:R(I),getBase64Image:Kf,getDomParser:Zf.get}),E=U.filter(ps),F=a&&ke.USE_PNG&&E.some(Mc),L=pc(Rc(),U,k);return a?L.then(M):M(L);function M(t){return function(e){for(var t=e.mergeBlocks,n=e.expanded,r=e.tagFilter,i=e.pngTextBlocks,o=e.pngTextIsAsync,a=e.deps,u={parsedGroups:e.parsedGroups,expanded:n,tagFilter:r,dataView:e.dataView,fileType:e.fileType,thumbnails:[],deps:a,merge:ac(a)},f=ec(t,n),c={},s=0;s<f.length;s++)c=tc(c,f[s],u);return function(e,t){var n=t.expanded,r=t.tagFilter,i=t.pngTextBlocks,o=t.pngTextIsAsync,a=t.deps;return ke.USE_PNG&&n&&o&&r.shouldReturnGroup("png")&&e.png&&(e.pngText=a.objectAssign({},e.png)),ke.USE_PNG&&n&&r.shouldReturnGroup("png")&&a.hasPngTextData(i)&&e.png&&!e.pngText&&(e.pngText=a.objectAssign({},e.png)),e}(c,{expanded:n,tagFilter:r,pngTextBlocks:i,pngTextIsAsync:o,deps:a})}({mergeBlocks:es(t.mergeBlocks).concat(ns({expanded:i,includeOffsets:l,async:a,ranges:O,truncated:T})),parsedGroups:Object.create(null),expanded:i,tagFilter:C,dataView:e,fileType:P,pngTextBlocks:E,pngTextIsAsync:F,deps:{objectAssign:S,hasPngTextData:ls,filterTagsForReturn:oi,getGpsGroupFromExifTags:ke.USE_EXIF?cs:void 0,Composite:ke.USE_EXIF||ke.USE_XMP?zf:void 0}})}}function Mc(e){return void 0!==e.compression&&void 0!==e.text.name}function Rc(){return{groups:[ke.USE_JPEG&&ke.USE_FILE?{key:"file",consumes:["file"],emits:[],read:Dc,merge:function(){return{slot:"file",mode:"assign"}}}:void 0,ke.USE_JPEG&&ke.USE_JFIF?{key:"jfif",consumes:["jfif"],emits:[],read:function(e,t){return Nc("jfif",ho.read(t.dataView,e.dataOffset),t)},merge:function(){return{slot:"jfif",mode:"assign"}}}:void 0,ke.USE_EXIF?{key:"exif",consumes:["exif"],emits:["iptc","xmp","photoshop","icc","makerNote","thumbnail"],read:Kc,merge:Xc}:void 0,ke.USE_IPTC?{key:"iptc",consumes:["iptc"],emits:[],read:qc,merge:function(e){return Vc(e,"iptc","carriedIptc")}}:void 0,ke.USE_XMP?{key:"xmp",consumes:["xmp"],emits:[],read:Yc,merge:Hc}:void 0,ke.USE_ICC?{key:"icc",consumes:["icc"],emits:[],read:Zc,merge:function(e){return Vc(e,"icc","carriedIcc")}}:void 0,ke.USE_MPF?{key:"mpf",consumes:["mpf"],emits:[],read:function(e,t){return Nc("mpf",Hi.read(t.dataView,e.dataOffset,t.options.includeUnknown,t.options.computed,t.tagFilter,t.getValueBudget(),t.getBase64Image),t)},merge:function(){return{slot:"mpf",mode:"assign"}}}:void 0,ke.USE_PNG&&ke.USE_PNG_FILE?{key:"png",consumes:["pngFile"],emits:[],read:function(e,t){return Nc("png",of.read(t.dataView,e.dataOffset),t)},merge:function(){return{slot:"pngFile",mode:"pngFile"}}}:void 0,ke.USE_PNG?{key:"png",consumes:["pngText"],emits:["exif","iptc"],read:function(e,t){return sf.read(e,t)},merge:function(e){return{slot:void 0!==e.compression?"deferredPngText":"pngText",mode:"pngTextTags"}}}:void 0,ke.USE_PNG?{key:"png",consumes:["pngChunk"],emits:[],read:function(e,t){return Nc("png",Af.read(t.dataView,[e.dataOffset]),t)},merge:function(){return{slot:"pngChunk",mode:"merge"}}}:void 0,ke.USE_WEBP?{key:"riff",consumes:["riff"],emits:[],read:function(e,t){return Nc("riff",kf.read(t.dataView,e.dataOffset),t)},merge:function(){return{slot:"riff",mode:"merge"}}}:void 0,ke.USE_GIF?{key:"gif",consumes:["gif"],emits:[],read:function(e,t){return Nc("gif",Rf.read(t.dataView,e.dataOffset),t)},merge:function(){return{slot:"gif",mode:"merge"}}}:void 0,ke.USE_JXL?{key:"file",consumes:["jxlFile"],emits:[],read:function(e,t){return Nc("file",ao.read(t.dataView,e.codestreamOffset),t)},merge:function(){return{slot:"jxlFile",mode:"assign"}}}:void 0,ke.USE_HEIC||ke.USE_AVIF?{key:"file",consumes:["isoBmffFile"],emits:[],read:function(e,t){return Nc("file",lo.read(t.dataView,e.imageDimensionsOffset,e.pixelInformationOffset),t)},merge:function(){return{slot:"isoBmffFile",mode:"assign"}}}:void 0,ke.USE_PHOTOSHOP?{key:"photoshop",consumes:["photoshop"],emits:[],read:function(e,t){return Nc("photoshop",hu.read(e.value,t.options.includeUnknown,t.tagFilter),t)},merge:function(e){return Vc(e,"photoshop","carriedPhotoshop")}}:void 0,ke.USE_MAKER_NOTES?{key:"makerNotes",consumes:["makerNote"],emits:[],read:$c,merge:function(e){return Vc(e,"makerNotes","carriedMakerNotes")}}:void 0,ke.USE_EXIF&&ke.USE_THUMBNAIL?{key:"thumbnail",consumes:["thumbnail"],emits:[],read:Qc,merge:function(e){return{slot:"thumbnail",mode:"thumbnailCandidate",rank:e.rank}}}:void 0].filter(Boolean),dispatchKind:Bc,rank:Gc,suppressions:[{kind:"iptc",isSuppressed:jc},{kind:"xmp",isSuppressed:_c},{kind:"icc",isSuppressed:zc}]}}function Nc(e,t,n){return{tags:ii(e,t,n.tagFilter)}}function Dc(e,t){if(function(e){if(!e)return 1;var t=e.composite,n=e.file;return 1==t||Array.isArray(t)&&t.length>0?1:!(Array.isArray(n)&&1===n.length&&"FileType"===n[0])}(t.options.includeTags))return Nc("file",Qi.read(t.dataView,e.dataOffset),t)}function Bc(e){return ps(e)?"pngText":e.kind}function Gc(e){return"exif"!==e.kind||void 0===e.compression||ps(e)?1:0}function jc(e,t,n){return"main"===e.carried?t.some(function(e){return"iptc"===e.kind&&!ps(e)}):ke.USE_PNG&&"rawProfile"===e.carried?(void 0===n.hasRawIptcProfile&&(n.hasRawIptcProfile=function(e,t){for(var n=0,r=0;r<e.length;r++){var i=e[r];if(void 0!==i.text&&void 0!==i.text.name)if(void 0!==i.compression){if(n++,"iptc"===i.kind&&n<=lf)return 1}else if("iptc"===i.kind&&gf(i,t))return 1}return 0}(t,n.dataView)),n.hasRawIptcProfile):0}function _c(e,t){return void 0!==e.carried&&t.some(function(e){return"xmp"===e.kind&&ss(e)})}function zc(e,t){return void 0!==e.carried&&t.some(function(e){return"icc"===e.kind&&ds(e)})}function Vc(e,t,n){return void 0!==e.carried?{slot:n,mode:"main"===e.carried?"assign":"merge"}:{slot:t,mode:void 0!==e.origin?"merge":"assign"}}function Hc(e){return void 0!==e.compression?{slot:"brobXmp",mode:"brobXmp"}:Vc(e,"xmp","carriedXmp")}function Xc(e){return void 0!==e.compression?{slot:"exif",mode:"merge",outerSlot:"brobExif"}:{slot:"exif",mode:void 0!==e.origin?"merge":"assign"}}function Wc(e,t){return e.getDataView?e.getDataView():e.dataView||t.dataView}function Kc(e,t){if(void 0!==e.compression){if(!ke.USE_JXL)return;return t.decompress(rs(t.dataView,e),N(e.compression),void 0,"dataview").then(function(e){return Jc(e,ft(e,0),t,{carried:"brob",decompressed:1})})}if(void 0!==e.tiffHeaderOffset)return Jc(Wc(e,t),e.tiffHeaderOffset,t,{carried:e.origin||"main",decompressed:1==e.decompressed})}function Jc(e,t,n,r){var i=r.carried,o=r.decompressed,a="main"===i,u=a?n.getValueBudget(e):n.getValueBudget();o&&function(e,t){if(void 0!==e){var n=Math.min(t*ui,e.decompressedAllowanceRemaining);e.remaining+=n,e.decompressedAllowanceRemaining-=n}}(u,e.byteLength);var f=(a?is:os)(e,t,n,u),s=f.tags,d=f.byteOrder,l=f.makerNoteOffset,p=s.Thumbnail;delete s.Thumbnail;var g=ii("exif",s,n.tagFilter),m=function(e,t){var n,r=t.view,i=t.tiffHeaderOffset,o=t.byteOrder,a=t.makerNoteOffset,u=t.thumbnailIfdTags,f=t.carried,s=t.decompressed,d=[];if(e["IPTC-NAA"]&&d.push({kind:"iptc",dataView:e["IPTC-NAA"].value,dataOffset:0,carried:f}),e.ApplicationNotes&&(n=e.ApplicationNotes.value,Array.isArray(n)&&"number"==typeof n[0])){var l=e.ApplicationNotes.value;d.push({kind:"xmp",carried:f,decompressed:s,byteLength:l.length,getDataView:function(){return c(l)}})}if(e.ImageSourceData&&e.PhotoshopSettings&&Array.isArray(e.PhotoshopSettings.value)&&d.push({kind:"photoshop",value:e.PhotoshopSettings.value,carried:f}),e.ICC_Profile){var p=e.ICC_Profile.value;d.push({kind:"icc",dataView:p,chunks:[{offset:0,length:p.length,chunkNumber:1,chunksTotal:1}],carried:f})}return e.MakerNote&&void 0!==a&&d.push({kind:"makerNote",tiffView:r,tiffHeaderOffset:i,makerNoteOffset:a,byteOrder:o,make:e.Make&&e.Make.value,bytes:e.MakerNote.value,carried:f}),u&&d.push({kind:"thumbnail",dataView:r,tiffHeaderOffset:i,ifd1Tags:u,decompressed:s,rank:"main"===f?"main":"embedded"}),d}(g,{view:e,tiffHeaderOffset:t,byteOrder:d,makerNoteOffset:l,thumbnailIfdTags:p,carried:i,decompressed:o});return"brob"===i&&0===Object.keys(g).length?{tags:void 0,blocks:m}:{tags:g,blocks:m}}function qc(e,t){var n=Wc(e,t),r=t.getValueBudget();return"rawProfile"===e.origin&&e.decompressed&&function(e,t){if(void 0!==e){var n=Math.min(Math.floor(t/li),e.decompressedIptcAllowanceRemaining);e.iptcDatasetsRemaining+=n,e.decompressedIptcAllowanceRemaining-=n}}(r,n.byteLength),Nc("iptc",Fo.read(n,e.dataOffset,t.options.includeUnknown,t.tagFilter,r),t)}function Yc(e,t){var n=t.options.domParser;if(void 0!==e.compression){if(!ke.USE_JXL)return;return t.decompress(rs(t.dataView,e),N(e.compression),void 0,"dataview").then(function(e){return function(e,t){return t.exceedsBrobXmpSizeBound(e.byteLength)?Nc("xmp",{},t):Nc("xmp",ca.read(e,[{dataOffset:0,length:e.byteLength}],t.options.domParser,t.getDomParser),t)}(e,t)})}if(void 0!==e.carried){if(e.decompressed&&!t.takeDecompressedApplicationNotesAllowance(e.byteLength))return;return Nc("xmp",ca.read(Wc(e,t),void 0,n,t.getDomParser),t)}if(ss(e))return Nc("xmp",ca.read(e.dataView||t.dataView,e.chunks,n,t.getDomParser),t)}function Zc(e,t){if(ds(e)){var n=Cu.read(e.dataView||t.dataView,e.chunks,t.options.async,t.decompressConfig);return z(n)?n.then(function(e){return Nc("icc",e,t)}):Nc("icc",n,t)}}function $c(e,t){var n,r=t.options,i=r.includeUnknown,o=r.computed;return Array.isArray(e.make)&&"Canon"===e.make[0]?{tags:qu.read(e.tiffView,e.tiffHeaderOffset,e.makerNoteOffset,e.byteOrder,i,o,t.tagFilter,t.getValueBudget())}:(n=e.bytes,Array.isArray(n)&&n.length>7&&"PENTAX "===f(n.slice(0,7))?{tags:ef.read(e.tiffView,e.tiffHeaderOffset,e.makerNoteOffset,i,o,t.tagFilter,t.getValueBudget())}:void 0)}function Qc(e,t){if(t.tagFilter.shouldReturnTag("thumbnail","Thumbnail")){var n=ii("thumbnail",e.ifd1Tags,t.tagFilter);if("main"===e.rank)return{tags:jf.get(e.dataView,n,e.tiffHeaderOffset,t.getBase64Image)};if(!t.hasEmbeddedThumbnailImage){var r=n.JPEGInterchangeFormatLength;if(r&&"number"==typeof r.value&&!(r.value>t.embeddedThumbnailSizeBound-t.copiedThumbnailSize)){var i=jf.get(e.dataView,n,e.tiffHeaderOffset,t.getBase64Image);if(i.image)return t.copiedThumbnailSize+=r.value,e.decompressed||(t.hasEmbeddedThumbnailImage=1),{tags:i}}}}}function es(e){for(var t=[],n=[],r=-1,i=0;i<e.length;i++)"pngText"===e[i].slot?(-1===r&&(r=t.length,t.push(void 0)),ts(e[i],n)):t.push(e[i]);return-1!==r&&(t[r]={slot:"pngText",mode:"nested",blocks:n}),t}function ts(e,t){if("nested"===e.mode)for(var n=0;n<e.blocks.length;n++)ts(e.blocks[n],t);else t.push(e)}function ns(e){var t=e.expanded,n=e.includeOffsets,r=e.async,i=e.ranges,o=e.truncated,a=[];return ke.USE_EXIF&&a.push({slot:"gps",mode:"gps"}),(ke.USE_EXIF||ke.USE_XMP)&&a.push({slot:"composite",mode:"composite"}),a.push({slot:"thumbnail",mode:"thumbnail"}),a.push({slot:"fileType",mode:"fileType"}),t&&n&&a.push({slot:"metadataRange",mode:"metadataRange",metadataBlocks:as(i,r),metadataTruncated:!!o}),a}function rs(e,t){var n=Math.max(0,Math.min(t.length,e.byteLength-t.dataOffset));return new DataView(e.buffer,e.byteOffset+t.dataOffset,n)}function is(e,t,n,r){try{return os(e,t,n,r)}catch(e){return{tags:{},byteOrder:je.BIG_ENDIAN,makerNoteOffset:void 0}}}function os(e,t,n,r){return Ti.read(e,t,n.options.includeUnknown,n.options.computed,n.tagFilter,r,((i={})[Tr]=Uc,i[Cr]=Uc,i[kr]=_i,i[Er]=zi,ke.USE_THUMBNAIL&&(i[Ur]=Fi),i),(o=n.tagFilter,ke.USE_THUMBNAIL&&o.shouldParseGroup("thumbnail")));var i,o}function as(e,t){for(var n=e||[],r=n.length>=h,i=n.length-1,o=[],a=0;a<n.length;a++){var u=n[a],f=u.block,c=u.start,s=u.end;(r&&a===i||(t||!gs(f))&&fs(f))&&o.push({type:us(f),start:c,end:s})}return o}function us(e){return ps(e)||"pngChunk"===e.kind?"png":"pngFile"===e.kind?"file":e.kind}function fs(e){if(ps(e))return 1;switch(e.kind){case"file":return ke.USE_FILE;case"pngFile":return ke.USE_PNG_FILE;case"exif":return ke.USE_EXIF;case"jfif":return ke.USE_JFIF;case"xmp":return ke.USE_XMP;case"iptc":return ke.USE_IPTC;case"icc":return ke.USE_ICC;case"mpf":return ke.USE_MPF;default:return 1}}function cs(e){var t=void 0;if(e.GPSLatitude&&e.GPSLatitudeRef){t=t||{};try{t.Latitude=De(e.GPSLatitude.value),"S"===e.GPSLatitudeRef.value.join("")&&(t.Latitude=-t.Latitude)}catch(e){}}if(e.GPSLongitude&&e.GPSLongitudeRef){t=t||{};try{t.Longitude=De(e.GPSLongitude.value),"W"===e.GPSLongitudeRef.value.join("")&&(t.Longitude=-t.Longitude)}catch(e){}}if(e.GPSAltitude&&e.GPSAltitudeRef){t=t||{};try{t.Altitude=e.GPSAltitude.value[0]/e.GPSAltitude.value[1],1===e.GPSAltitudeRef.value&&(t.Altitude=-t.Altitude)}catch(e){}}if(t)return t}function ss(e){return void 0!==e&&void 0===e.compression&&e.chunks.length>0}function ds(e){return void 0!==e&&e.chunks.length>0}function ls(e){return Array.isArray(e)&&e.length>0}function ps(e){return void 0!==e.text}function gs(e){return ke.USE_PNG&&ps(e)&&e.text.chunkType===Tn||"icc"===e.kind&&void 0!==e.compression}}(),t;var e,t});
2
2
  //# sourceMappingURL=exif-reader.js.map