geotiff.js
Version:
GeoTIFF image decoding in JavaScript
1 lines • 222 kB
JavaScript
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.GeoTIFF=t():e.GeoTIFF=t()}("undefined"!=typeof self?self:this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=66)}([function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t){var n=e.exports={version:"2.5.7"};"number"==typeof __e&&(__e=n)},function(e,t,n){var r=n(39)("wks"),i=n(24),o=n(0).Symbol,a="function"==typeof o;(e.exports=function(e){return r[e]||(r[e]=a&&o[e]||(a?o:i)("Symbol."+e))}).store=r},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t,n){"use strict";t.__esModule=!0;var r=n(120),i=function(e){return e&&e.__esModule?e:{default:e}}(r);t.default=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),(0,i.default)(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}()},function(e,t,n){var r=n(8);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},function(e,t,n){var r=n(0),i=n(1),o=n(17),a=n(10),s=n(11),u=function(e,t,n){var f,c,l,h=e&u.F,d=e&u.G,p=e&u.S,v=e&u.P,m=e&u.B,y=e&u.W,b=d?i:i[t]||(i[t]={}),g=b.prototype,w=d?r:p?r[t]:(r[t]||{}).prototype;d&&(n=t);for(f in n)(c=!h&&w&&void 0!==w[f])&&s(b,f)||(l=c?w[f]:n[f],b[f]=d&&"function"!=typeof w[f]?n[f]:m&&c?o(l,r):y&&w[f]==l?function(e){var t=function(t,n,r){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,r)}return e.apply(this,arguments)};return t.prototype=e.prototype,t}(l):v&&"function"==typeof l?o(Function.call,l):l,v&&((b.virtual||(b.virtual={}))[f]=l,e&u.R&&g&&!g[f]&&a(g,f,l)))};u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,e.exports=u},function(e,t,n){var r=n(5),i=n(49),o=n(35),a=Object.defineProperty;t.f=n(9)?Object.defineProperty:function(e,t,n){if(r(e),t=o(t,!0),r(n),i)try{return a(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){e.exports=!n(22)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(e,t,n){var r=n(7),i=n(23);e.exports=n(9)?function(e,t,n){return r.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){"use strict";t.__esModule=!0;var r=n(31),i=function(e){return e&&e.__esModule?e:{default:e}}(r);t.default=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==(void 0===t?"undefined":(0,i.default)(t))&&"function"!=typeof t?e:t}},function(e,t){e.exports={}},function(e,t,n){var r=n(73),i=n(33);e.exports=function(e){return r(i(e))}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=n(90),o=r(i),a=n(94),s=r(a),u=n(31),f=r(u);t.default=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(void 0===t?"undefined":(0,f.default)(t)));e.prototype=(0,s.default)(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(o.default?(0,o.default)(e,t):e.__proto__=t)}},function(e,t){e.exports=!0},function(e,t,n){var r=n(21);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),o=r(i),a=n(4),s=r(a),u=n(128),f=function(){function e(){(0,o.default)(this,e)}return(0,s.default)(e,[{key:"decode",value:function(e,t){var n=this.decodeBlock(t),r=e.Predictor||1;if(1!==r){var i=!e.StripOffsets,o=i?e.TileWidth:e.ImageWidth,a=i?e.TileLength:e.RowsPerStrip||e.ImageLength;return(0,u.applyPredictor)(n,r,o,a,e.BitsPerSample)}return n}}]),e}();t.default=f},function(e,t,n){"use strict";var r=n(70)(!0);n(48)(String,"String",function(e){this._t=String(e),this._i=0},function(){var e,t=this._t,n=this._i;return n>=t.length?{value:void 0,done:!0}:(e=r(t,n),this._i+=e.length,{value:e,done:!1})})},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).toString(36))}},function(e,t,n){var r=n(7).f,i=n(11),o=n(2)("toStringTag");e.exports=function(e,t,n){e&&!i(e=n?e:e.prototype,o)&&r(e,o,{configurable:!0,value:t})}},function(e,t,n){n(78);for(var r=n(0),i=n(10),o=n(13),a=n(2)("toStringTag"),s="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),u=0;u<s.length;u++){var f=s[u],c=r[f],l=c&&c.prototype;l&&!l[a]&&i(l,a,f),o[f]=o.Array}},function(e,t,n){e.exports=n(97)},function(e,t,n){"use strict";t.__esModule=!0;var r=n(105),i=function(e){return e&&e.__esModule?e:{default:e}}(r);t.default=function(e){return function(){var t=e.apply(this,arguments);return new i.default(function(e,n){function r(o,a){try{var s=t[o](a),u=s.value}catch(e){return void n(e)}if(!s.done)return i.default.resolve(u).then(function(e){r("next",e)},function(e){r("throw",e)});e(u)}return r("next")})}}},function(e,t,n){"use strict";function r(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var i="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;t.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var n=t.shift();if(n){if("object"!=typeof n)throw new TypeError(n+"must be non-object");for(var i in n)r(n,i)&&(e[i]=n[i])}}return e},t.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var o={arraySet:function(e,t,n,r,i){if(t.subarray&&e.subarray)return void e.set(t.subarray(n,n+r),i);for(var o=0;o<r;o++)e[i+o]=t[n+o]},flattenChunks:function(e){var t,n,r,i,o,a;for(r=0,t=0,n=e.length;t<n;t++)r+=e[t].length;for(a=new Uint8Array(r),i=0,t=0,n=e.length;t<n;t++)o=e[t],a.set(o,i),i+=o.length;return a}},a={arraySet:function(e,t,n,r,i){for(var o=0;o<r;o++)e[i+o]=t[n+o]},flattenChunks:function(e){return[].concat.apply([],e)}};t.setTyped=function(e){e?(t.Buf8=Uint8Array,t.Buf16=Uint16Array,t.Buf32=Int32Array,t.assign(t,o)):(t.Buf8=Array,t.Buf16=Array,t.Buf32=Array,t.assign(t,a))},t.setTyped(i)},function(e,t){},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=n(68),o=r(i),a=n(81),s=r(a),u="function"==typeof s.default&&"symbol"==typeof o.default?function(e){return typeof e}:function(e){return e&&"function"==typeof s.default&&e.constructor===s.default&&e!==s.default.prototype?"symbol":typeof e};t.default="function"==typeof s.default&&"symbol"===u(o.default)?function(e){return void 0===e?"undefined":u(e)}:function(e){return e&&"function"==typeof s.default&&e.constructor===s.default&&e!==s.default.prototype?"symbol":void 0===e?"undefined":u(e)}},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},function(e,t){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,n){var r=n(8),i=n(0).document,o=r(i)&&r(i.createElement);e.exports=function(e){return o?i.createElement(e):{}}},function(e,t,n){var r=n(8);e.exports=function(e,t){if(!r(e))return e;var n,i;if(t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;if("function"==typeof(n=e.valueOf)&&!r(i=n.call(e)))return i;if(!t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},function(e,t,n){var r=n(5),i=n(72),o=n(40),a=n(38)("IE_PROTO"),s=function(){},u=function(){var e,t=n(34)("iframe"),r=o.length;for(t.style.display="none",n(53).appendChild(t),t.src="javascript:",e=t.contentWindow.document,e.open(),e.write("<script>document.F=Object<\/script>"),e.close(),u=e.F;r--;)delete u.prototype[o[r]];return u()};e.exports=Object.create||function(e,t){var n;return null!==e?(s.prototype=r(e),n=new s,s.prototype=null,n[a]=e):n=u(),void 0===t?n:i(n,t)}},function(e,t,n){var r=n(51),i=n(40);e.exports=Object.keys||function(e){return r(e,i)}},function(e,t,n){var r=n(39)("keys"),i=n(24);e.exports=function(e){return r[e]||(r[e]=i(e))}},function(e,t,n){var r=n(1),i=n(0),o=i["__core-js_shared__"]||(i["__core-js_shared__"]={});(e.exports=function(e,t){return o[e]||(o[e]=void 0!==t?t:{})})("versions",[]).push({version:r.version,mode:n(16)?"pure":"global",copyright:"© 2018 Denis Pushkarev (zloirock.ru)"})},function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,t,n){t.f=n(2)},function(e,t,n){var r=n(0),i=n(1),o=n(16),a=n(41),s=n(7).f;e.exports=function(e){var t=i.Symbol||(i.Symbol=o?{}:r.Symbol||{});"_"==e.charAt(0)||e in t||s(t,e,{value:a.f(e)})}},function(e,t){t.f={}.propertyIsEnumerable},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=n(99),o=r(i),a=n(102),s=r(a);t.default=function(){function e(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,u=(0,s.default)(e);!(r=(a=u.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&u.return&&u.return()}finally{if(i)throw o}}return n}return function(t,n){if(Array.isArray(t))return t;if((0,o.default)(Object(t)))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}()},function(e,t,n){var r=n(18),i=n(2)("toStringTag"),o="Arguments"==r(function(){return arguments}()),a=function(e,t){try{return e[t]}catch(e){}};e.exports=function(e){var t,n,s;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=a(t=Object(e),i))?n:o?r(t):"Object"==(s=r(t))&&"function"==typeof t.callee?"Arguments":s}},function(e,t,n){"use strict";function r(e){var t,n;this.promise=new e(function(e,r){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=r}),this.resolve=i(t),this.reject=i(n)}var i=n(21);e.exports.f=function(e){return new r(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=t.fieldTagNames={315:"Artist",258:"BitsPerSample",265:"CellLength",264:"CellWidth",320:"ColorMap",259:"Compression",33432:"Copyright",306:"DateTime",338:"ExtraSamples",266:"FillOrder",289:"FreeByteCounts",288:"FreeOffsets",291:"GrayResponseCurve",290:"GrayResponseUnit",316:"HostComputer",270:"ImageDescription",257:"ImageLength",256:"ImageWidth",271:"Make",281:"MaxSampleValue",280:"MinSampleValue",272:"Model",254:"NewSubfileType",274:"Orientation",262:"PhotometricInterpretation",284:"PlanarConfiguration",296:"ResolutionUnit",278:"RowsPerStrip",277:"SamplesPerPixel",305:"Software",279:"StripByteCounts",273:"StripOffsets",255:"SubfileType",263:"Threshholding",282:"XResolution",283:"YResolution",326:"BadFaxLines",327:"CleanFaxData",343:"ClipPath",328:"ConsecutiveBadFaxLines",433:"Decode",434:"DefaultImageColor",269:"DocumentName",336:"DotRange",321:"HalftoneHints",346:"Indexed",347:"JPEGTables",285:"PageName",297:"PageNumber",317:"Predictor",319:"PrimaryChromaticities",532:"ReferenceBlackWhite",339:"SampleFormat",340:"SMinSampleValue",341:"SMaxSampleValue",559:"StripRowCounts",330:"SubIFDs",292:"T4Options",293:"T6Options",325:"TileByteCounts",323:"TileLength",324:"TileOffsets",322:"TileWidth",301:"TransferFunction",318:"WhitePoint",344:"XClipPathUnits",286:"XPosition",529:"YCbCrCoefficients",531:"YCbCrPositioning",530:"YCbCrSubSampling",345:"YClipPathUnits",287:"YPosition",37378:"ApertureValue",40961:"ColorSpace",36868:"DateTimeDigitized",36867:"DateTimeOriginal",34665:"Exif IFD",36864:"ExifVersion",33434:"ExposureTime",41728:"FileSource",37385:"Flash",40960:"FlashpixVersion",33437:"FNumber",42016:"ImageUniqueID",37384:"LightSource",37500:"MakerNote",37377:"ShutterSpeedValue",37510:"UserComment",33723:"IPTC",34675:"ICC Profile",700:"XMP",42112:"GDAL_METADATA",42113:"GDAL_NODATA",34377:"Photoshop",33550:"ModelPixelScale",33922:"ModelTiepoint",34264:"ModelTransformation",34735:"GeoKeyDirectory",34736:"GeoDoubleParams",34737:"GeoAsciiParams"},i=t.fieldTags={};for(var o in r)r.hasOwnProperty(o)&&(i[r[o]]=parseInt(o,10));var a=(t.fieldTagTypes={256:"SHORT",257:"SHORT",258:"SHORT",259:"SHORT",262:"SHORT",273:"LONG",274:"SHORT",277:"SHORT",278:"LONG",279:"LONG",282:"RATIONAL",283:"RATIONAL",284:"SHORT",286:"SHORT",287:"RATIONAL",296:"SHORT",305:"ASCII",306:"ASCII",338:"SHORT",339:"SHORT",513:"LONG",514:"LONG",1024:"SHORT",1025:"SHORT",2048:"SHORT",2049:"ASCII",33550:"DOUBLE",33922:"DOUBLE",34665:"LONG",34735:"SHORT",34737:"ASCII",42113:"ASCII"},t.arrayFields=[i.BitsPerSample,i.ExtraSamples,i.SampleFormat,i.StripByteCounts,i.StripOffsets,i.StripRowCounts,i.TileByteCounts,i.TileOffsets],t.fieldTypeNames={1:"BYTE",2:"ASCII",3:"SHORT",4:"LONG",5:"RATIONAL",6:"SBYTE",7:"UNDEFINED",8:"SSHORT",9:"SLONG",10:"SRATIONAL",11:"FLOAT",12:"DOUBLE",16:"LONG8",17:"SLONG8",18:"IFD8"}),s=t.fieldTypes={};for(var u in a)a.hasOwnProperty(u)&&(s[a[u]]=parseInt(u,10));var f=(t.photometricInterpretations={WhiteIsZero:0,BlackIsZero:1,RGB:2,Palette:3,TransparencyMask:4,CMYK:5,YCbCr:6,CIELab:8,ICCLab:9},t.geoKeyNames={1024:"GTModelTypeGeoKey",1025:"GTRasterTypeGeoKey",1026:"GTCitationGeoKey",2048:"GeographicTypeGeoKey",2049:"GeogCitationGeoKey",2050:"GeogGeodeticDatumGeoKey",2051:"GeogPrimeMeridianGeoKey",2052:"GeogLinearUnitsGeoKey",2053:"GeogLinearUnitSizeGeoKey",2054:"GeogAngularUnitsGeoKey",2055:"GeogAngularUnitSizeGeoKey",2056:"GeogEllipsoidGeoKey",2057:"GeogSemiMajorAxisGeoKey",2058:"GeogSemiMinorAxisGeoKey",2059:"GeogInvFlatteningGeoKey",2060:"GeogAzimuthUnitsGeoKey",2061:"GeogPrimeMeridianLongGeoKey",2062:"GeogTOWGS84GeoKey",3072:"ProjectedCSTypeGeoKey",3073:"PCSCitationGeoKey",3074:"ProjectionGeoKey",3075:"ProjCoordTransGeoKey",3076:"ProjLinearUnitsGeoKey",3077:"ProjLinearUnitSizeGeoKey",3078:"ProjStdParallel1GeoKey",3079:"ProjStdParallel2GeoKey",3080:"ProjNatOriginLongGeoKey",3081:"ProjNatOriginLatGeoKey",3082:"ProjFalseEastingGeoKey",3083:"ProjFalseNorthingGeoKey",3084:"ProjFalseOriginLongGeoKey",3085:"ProjFalseOriginLatGeoKey",3086:"ProjFalseOriginEastingGeoKey",3087:"ProjFalseOriginNorthingGeoKey",3088:"ProjCenterLongGeoKey",3089:"ProjCenterLatGeoKey",3090:"ProjCenterEastingGeoKey",3091:"ProjCenterNorthingGeoKey",3092:"ProjScaleAtNatOriginGeoKey",3093:"ProjScaleAtCenterGeoKey",3094:"ProjAzimuthAngleGeoKey",3095:"ProjStraightVertPoleLongGeoKey",3096:"ProjRectifiedGridAngleGeoKey",4096:"VerticalCSTypeGeoKey",4097:"VerticalCitationGeoKey",4098:"VerticalDatumGeoKey",4099:"VerticalUnitsGeoKey"}),c=t.geoKeys={};for(var l in f)f.hasOwnProperty(l)&&(c[f[l]]=parseInt(l,10));t.parseXml=void 0;"undefined"==typeof window?t.parseXml=function(e){return(new(0,n(123).DOMParser)).parseFromString(e,"text/xml")}:void 0!==window.DOMParser?t.parseXml=function(e){return(new window.DOMParser).parseFromString(e,"text/xml")}:void 0!==window.ActiveXObject&&new window.ActiveXObject("Microsoft.XMLDOM")&&(t.parseXml=function(e){var t=new window.ActiveXObject("Microsoft.XMLDOM");return t.async="false",t.loadXML(e),t})},function(e,t,n){"use strict";var r=n(16),i=n(6),o=n(50),a=n(10),s=n(13),u=n(71),f=n(25),c=n(76),l=n(2)("iterator"),h=!([].keys&&"next"in[].keys()),d=function(){return this};e.exports=function(e,t,n,p,v,m,y){u(n,t,p);var b,g,w,_=function(e){if(!h&&e in O)return O[e];switch(e){case"keys":case"values":return function(){return new n(this,e)}}return function(){return new n(this,e)}},x=t+" Iterator",k="values"==v,S=!1,O=e.prototype,E=O[l]||O["@@iterator"]||v&&O[v],T=E||_(v),A=v?k?_("entries"):T:void 0,P="Array"==t?O.entries||E:E;if(P&&(w=c(P.call(new e)))!==Object.prototype&&w.next&&(f(w,x,!0),r||"function"==typeof w[l]||a(w,l,d)),k&&E&&"values"!==E.name&&(S=!0,T=function(){return E.call(this)}),r&&!y||!h&&!S&&O[l]||a(O,l,T),s[t]=T,s[x]=d,v)if(b={values:k?T:_("values"),keys:m?T:_("keys"),entries:A},y)for(g in b)g in O||o(O,g,b[g]);else i(i.P+i.F*(h||S),t,b);return b}},function(e,t,n){e.exports=!n(9)&&!n(22)(function(){return 7!=Object.defineProperty(n(34)("div"),"a",{get:function(){return 7}}).a})},function(e,t,n){e.exports=n(10)},function(e,t,n){var r=n(11),i=n(14),o=n(74)(!1),a=n(38)("IE_PROTO");e.exports=function(e,t){var n,s=i(e),u=0,f=[];for(n in s)n!=a&&r(s,n)&&f.push(n);for(;t.length>u;)r(s,n=t[u++])&&(~o(f,n)||f.push(n));return f}},function(e,t,n){var r=n(32),i=Math.min;e.exports=function(e){return e>0?i(r(e),9007199254740991):0}},function(e,t,n){var r=n(0).document;e.exports=r&&r.documentElement},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,n){var r=n(51),i=n(40).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,i)}},function(e,t,n){var r=n(43),i=n(23),o=n(14),a=n(35),s=n(11),u=n(49),f=Object.getOwnPropertyDescriptor;t.f=n(9)?f:function(e,t){if(e=o(e),t=a(t,!0),u)try{return f(e,t)}catch(e){}if(s(e,t))return i(!r.f.call(e,t),e[t])}},function(e,t){},function(e,t,n){var r=n(45),i=n(2)("iterator"),o=n(13);e.exports=n(1).getIteratorMethod=function(e){if(void 0!=e)return e[i]||e["@@iterator"]||o[r(e)]}},function(e,t,n){var r=n(5),i=n(21),o=n(2)("species");e.exports=function(e,t){var n,a=r(e).constructor;return void 0===a||void 0==(n=r(a)[o])?t:i(n)}},function(e,t,n){var r,i,o,a=n(17),s=n(112),u=n(53),f=n(34),c=n(0),l=c.process,h=c.setImmediate,d=c.clearImmediate,p=c.MessageChannel,v=c.Dispatch,m=0,y={},b=function(){var e=+this;if(y.hasOwnProperty(e)){var t=y[e];delete y[e],t()}},g=function(e){b.call(e.data)};h&&d||(h=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return y[++m]=function(){s("function"==typeof e?e:Function(e),t)},r(m),m},d=function(e){delete y[e]},"process"==n(18)(l)?r=function(e){l.nextTick(a(b,e,1))}:v&&v.now?r=function(e){v.now(a(b,e,1))}:p?(i=new p,o=i.port2,i.port1.onmessage=g,r=a(o.postMessage,o,1)):c.addEventListener&&"function"==typeof postMessage&&!c.importScripts?(r=function(e){c.postMessage(e+"","*")},c.addEventListener("message",g,!1)):r="onreadystatechange"in f("script")?function(e){u.appendChild(f("script")).onreadystatechange=function(){u.removeChild(this),b.call(e)}}:function(e){setTimeout(a(b,e,1),0)}),e.exports={set:h,clear:d}},function(e,t){e.exports=function(e){try{return{e:!1,v:e()}}catch(e){return{e:!0,v:e}}}},function(e,t,n){var r=n(5),i=n(8),o=n(46);e.exports=function(e,t){if(r(e),i(t)&&t.constructor===e)return t;var n=o.f(e);return(0,n.resolve)(t),n.promise}},function(e,t){function n(e,t){for(var n in e)t[n]=e[n]}function r(e,t){function r(){}var i=e.prototype;if(Object.create){var o=Object.create(t.prototype);i.__proto__=o}i instanceof t||(r.prototype=t.prototype,r=new r,n(i,r),e.prototype=i=r),i.constructor!=e&&("function"!=typeof e&&console.error("unknow Class:"+e),i.constructor=e)}function i(e,t){if(t instanceof Error)var n=t;else n=this,Error.call(this,ie[e]),this.message=ie[e],Error.captureStackTrace&&Error.captureStackTrace(this,i);return n.code=e,t&&(this.message=this.message+": "+t),n}function o(){}function a(e,t){this._node=e,this._refresh=t,s(this)}function s(e){var t=e._node._inc||e._node.ownerDocument._inc;if(e._inc!=t){var r=e._refresh(e._node);G(e,"length",r.length),n(r,e),e._inc=t}}function u(){}function f(e,t){for(var n=e.length;n--;)if(e[n]===t)return n}function c(e,t,n,r){if(r?t[f(t,r)]=n:t[t.length++]=n,e){n.ownerElement=e;var i=e.ownerDocument;i&&(r&&b(i,e,r),y(i,e,n))}}function l(e,t,n){var r=f(t,n);if(!(r>=0))throw i(ae,new Error(e.tagName+"@"+n));for(var o=t.length-1;r<o;)t[r]=t[++r];if(t.length=o,e){var a=e.ownerDocument;a&&(b(a,e,n),n.ownerElement=null)}}function h(e){if(this._features={},e)for(var t in e)this._features=e[t]}function d(){}function p(e){return"<"==e&&"<"||">"==e&&">"||"&"==e&&"&"||'"'==e&&"""||"&#"+e.charCodeAt()+";"}function v(e,t){if(t(e))return!0;if(e=e.firstChild)do{if(v(e,t))return!0}while(e=e.nextSibling)}function m(){}function y(e,t,n){e&&e._inc++,"http://www.w3.org/2000/xmlns/"==n.namespaceURI&&(t._nsMap[n.prefix?n.localName:""]=n.value)}function b(e,t,n,r){e&&e._inc++,"http://www.w3.org/2000/xmlns/"==n.namespaceURI&&delete t._nsMap[n.prefix?n.localName:""]}function g(e,t,n){if(e&&e._inc){e._inc++;var r=t.childNodes;if(n)r[r.length++]=n;else{for(var i=t.firstChild,o=0;i;)r[o++]=i,i=i.nextSibling;r.length=o}}}function w(e,t){var n=t.previousSibling,r=t.nextSibling;return n?n.nextSibling=r:e.firstChild=r,r?r.previousSibling=n:e.lastChild=n,g(e.ownerDocument,e),t}function _(e,t,n){var r=t.parentNode;if(r&&r.removeChild(t),t.nodeType===te){var i=t.firstChild;if(null==i)return t;var o=t.lastChild}else i=o=t;var a=n?n.previousSibling:e.lastChild;i.previousSibling=a,o.nextSibling=n,a?a.nextSibling=i:e.firstChild=i,null==n?e.lastChild=o:n.previousSibling=o;do{i.parentNode=e}while(i!==o&&(i=i.nextSibling));return g(e.ownerDocument||e,e),t.nodeType==te&&(t.firstChild=t.lastChild=null),t}function x(e,t){var n=t.parentNode;if(n){var r=e.lastChild;n.removeChild(t);var r=e.lastChild}var r=e.lastChild;return t.parentNode=e,t.previousSibling=r,t.nextSibling=null,r?r.nextSibling=t:e.firstChild=t,e.lastChild=t,g(e.ownerDocument,e,t),t}function k(){this._nsMap={}}function S(){}function O(){}function E(){}function T(){}function A(){}function P(){}function I(){}function N(){}function C(){}function M(){}function D(){}function j(){}function R(e,t){var n=[],r=9==this.nodeType?this.documentElement:this,i=r.prefix,o=r.namespaceURI;if(o&&null==i){var i=r.lookupPrefix(o);if(null==i)var a=[{namespace:o,prefix:null}]}return F(this,n,e,t,a),n.join("")}function L(e,t,n){var r=e.prefix||"",i=e.namespaceURI;if(!r&&!i)return!1;if("xml"===r&&"http://www.w3.org/XML/1998/namespace"===i||"http://www.w3.org/2000/xmlns/"==i)return!1;for(var o=n.length;o--;){var a=n[o];if(a.prefix==r)return a.namespace!=i}return!0}function F(e,t,n,r,i){if(r){if(!(e=r(e)))return;if("string"==typeof e)return void t.push(e)}switch(e.nodeType){case K:i||(i=[]);var o=(i.length,e.attributes),a=o.length,s=e.firstChild,u=e.tagName;n=H===e.namespaceURI||n,t.push("<",u);for(var f=0;f<a;f++){var c=o.item(f);"xmlns"==c.prefix?i.push({prefix:c.localName,namespace:c.value}):"xmlns"==c.nodeName&&i.push({prefix:"",namespace:c.value})}for(var f=0;f<a;f++){var c=o.item(f);if(L(c,n,i)){var l=c.prefix||"",h=c.namespaceURI,d=l?" xmlns:"+l:" xmlns";t.push(d,'="',h,'"'),i.push({prefix:l,namespace:h})}F(c,t,n,r,i)}if(L(e,n,i)){var l=e.prefix||"",h=e.namespaceURI,d=l?" xmlns:"+l:" xmlns";t.push(d,'="',h,'"'),i.push({prefix:l,namespace:h})}if(s||n&&!/^(?:meta|link|img|br|hr|input)$/i.test(u)){if(t.push(">"),n&&/^script$/i.test(u))for(;s;)s.data?t.push(s.data):F(s,t,n,r,i),s=s.nextSibling;else for(;s;)F(s,t,n,r,i),s=s.nextSibling;t.push("</",u,">")}else t.push("/>");return;case Q:case te:for(var s=e.firstChild;s;)F(s,t,n,r,i),s=s.nextSibling;return;case V:return t.push(" ",e.name,'="',e.value.replace(/[<&"]/g,p),'"');case W:return t.push(e.data.replace(/[<&]/g,p));case q:return t.push("<![CDATA[",e.data,"]]>");case J:return t.push("\x3c!--",e.data,"--\x3e");case ee:var v=e.publicId,m=e.systemId;if(t.push("<!DOCTYPE ",e.name),v)t.push(' PUBLIC "',v),m&&"."!=m&&t.push('" "',m),t.push('">');else if(m&&"."!=m)t.push(' SYSTEM "',m,'">');else{var y=e.internalSubset;y&&t.push(" [",y,"]"),t.push(">")}return;case $:return t.push("<?",e.target," ",e.data,"?>");case Y:return t.push("&",e.nodeName,";");default:t.push("??",e.nodeName)}}function U(e,t,n){var r;switch(t.nodeType){case K:r=t.cloneNode(!1),r.ownerDocument=e;case te:break;case V:n=!0}if(r||(r=t.cloneNode(!1)),r.ownerDocument=e,r.parentNode=null,n)for(var i=t.firstChild;i;)r.appendChild(U(e,i,n)),i=i.nextSibling;return r}function B(e,t,n){var r=new t.constructor;for(var i in t){var a=t[i];"object"!=typeof a&&a!=r[i]&&(r[i]=a)}switch(t.childNodes&&(r.childNodes=new o),r.ownerDocument=e,r.nodeType){case K:var s=t.attributes,f=r.attributes=new u,c=s.length;f._ownerElement=r;for(var l=0;l<c;l++)r.setAttributeNode(B(e,s.item(l),!0));break;case V:n=!0}if(n)for(var h=t.firstChild;h;)r.appendChild(B(e,h,n)),h=h.nextSibling;return r}function G(e,t,n){e[t]=n}function Z(e){switch(e.nodeType){case K:case te:var t=[];for(e=e.firstChild;e;)7!==e.nodeType&&8!==e.nodeType&&t.push(Z(e)),e=e.nextSibling;return t.join("");default:return e.nodeValue}}var H="http://www.w3.org/1999/xhtml",z={},K=z.ELEMENT_NODE=1,V=z.ATTRIBUTE_NODE=2,W=z.TEXT_NODE=3,q=z.CDATA_SECTION_NODE=4,Y=z.ENTITY_REFERENCE_NODE=5,X=z.ENTITY_NODE=6,$=z.PROCESSING_INSTRUCTION_NODE=7,J=z.COMMENT_NODE=8,Q=z.DOCUMENT_NODE=9,ee=z.DOCUMENT_TYPE_NODE=10,te=z.DOCUMENT_FRAGMENT_NODE=11,ne=z.NOTATION_NODE=12,re={},ie={},oe=(re.INDEX_SIZE_ERR=(ie[1]="Index size error",1),re.DOMSTRING_SIZE_ERR=(ie[2]="DOMString size error",2),re.HIERARCHY_REQUEST_ERR=(ie[3]="Hierarchy request error",3)),ae=(re.WRONG_DOCUMENT_ERR=(ie[4]="Wrong document",4),re.INVALID_CHARACTER_ERR=(ie[5]="Invalid character",5),re.NO_DATA_ALLOWED_ERR=(ie[6]="No data allowed",6),re.NO_MODIFICATION_ALLOWED_ERR=(ie[7]="No modification allowed",7),re.NOT_FOUND_ERR=(ie[8]="Not found",8)),se=(re.NOT_SUPPORTED_ERR=(ie[9]="Not supported",9),re.INUSE_ATTRIBUTE_ERR=(ie[10]="Attribute in use",10));re.INVALID_STATE_ERR=(ie[11]="Invalid state",11),re.SYNTAX_ERR=(ie[12]="Syntax error",12),re.INVALID_MODIFICATION_ERR=(ie[13]="Invalid modification",13),re.NAMESPACE_ERR=(ie[14]="Invalid namespace",14),re.INVALID_ACCESS_ERR=(ie[15]="Invalid access",15);i.prototype=Error.prototype,n(re,i),o.prototype={length:0,item:function(e){return this[e]||null},toString:function(e,t){for(var n=[],r=0;r<this.length;r++)F(this[r],n,e,t);return n.join("")}},a.prototype.item=function(e){return s(this),this[e]},r(a,o),u.prototype={length:0,item:o.prototype.item,getNamedItem:function(e){for(var t=this.length;t--;){var n=this[t];if(n.nodeName==e)return n}},setNamedItem:function(e){var t=e.ownerElement;if(t&&t!=this._ownerElement)throw new i(se);var n=this.getNamedItem(e.nodeName);return c(this._ownerElement,this,e,n),n},setNamedItemNS:function(e){var t,n=e.ownerElement;if(n&&n!=this._ownerElement)throw new i(se);return t=this.getNamedItemNS(e.namespaceURI,e.localName),c(this._ownerElement,this,e,t),t},removeNamedItem:function(e){var t=this.getNamedItem(e);return l(this._ownerElement,this,t),t},removeNamedItemNS:function(e,t){var n=this.getNamedItemNS(e,t);return l(this._ownerElement,this,n),n},getNamedItemNS:function(e,t){for(var n=this.length;n--;){var r=this[n];if(r.localName==t&&r.namespaceURI==e)return r}return null}},h.prototype={hasFeature:function(e,t){var n=this._features[e.toLowerCase()];return!(!n||t&&!(t in n))},createDocument:function(e,t,n){var r=new m;if(r.implementation=this,r.childNodes=new o,r.doctype=n,n&&r.appendChild(n),t){var i=r.createElementNS(e,t);r.appendChild(i)}return r},createDocumentType:function(e,t,n){var r=new P;return r.name=e,r.nodeName=e,r.publicId=t,r.systemId=n,r}},d.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(e,t){return _(this,e,t)},replaceChild:function(e,t){this.insertBefore(e,t),t&&this.removeChild(t)},removeChild:function(e){return w(this,e)},appendChild:function(e){return this.insertBefore(e,null)},hasChildNodes:function(){return null!=this.firstChild},cloneNode:function(e){return B(this.ownerDocument||this,this,e)},normalize:function(){for(var e=this.firstChild;e;){var t=e.nextSibling;t&&t.nodeType==W&&e.nodeType==W?(this.removeChild(t),e.appendData(t.data)):(e.normalize(),e=t)}},isSupported:function(e,t){return this.ownerDocument.implementation.hasFeature(e,t)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(e){for(var t=this;t;){var n=t._nsMap;if(n)for(var r in n)if(n[r]==e)return r;t=t.nodeType==V?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(e){for(var t=this;t;){var n=t._nsMap;if(n&&e in n)return n[e];t=t.nodeType==V?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(e){return null==this.lookupPrefix(e)}},n(z,d),n(z,d.prototype),m.prototype={nodeName:"#document",nodeType:Q,doctype:null,documentElement:null,_inc:1,insertBefore:function(e,t){if(e.nodeType==te){for(var n=e.firstChild;n;){var r=n.nextSibling;this.insertBefore(n,t),n=r}return e}return null==this.documentElement&&e.nodeType==K&&(this.documentElement=e),_(this,e,t),e.ownerDocument=this,e},removeChild:function(e){return this.documentElement==e&&(this.documentElement=null),w(this,e)},importNode:function(e,t){return U(this,e,t)},getElementById:function(e){var t=null;return v(this.documentElement,function(n){if(n.nodeType==K&&n.getAttribute("id")==e)return t=n,!0}),t},createElement:function(e){var t=new k;return t.ownerDocument=this,t.nodeName=e,t.tagName=e,t.childNodes=new o,(t.attributes=new u)._ownerElement=t,t},createDocumentFragment:function(){var e=new M;return e.ownerDocument=this,e.childNodes=new o,e},createTextNode:function(e){var t=new E;return t.ownerDocument=this,t.appendData(e),t},createComment:function(e){var t=new T;return t.ownerDocument=this,t.appendData(e),t},createCDATASection:function(e){var t=new A;return t.ownerDocument=this,t.appendData(e),t},createProcessingInstruction:function(e,t){var n=new D;return n.ownerDocument=this,n.tagName=n.target=e,n.nodeValue=n.data=t,n},createAttribute:function(e){var t=new S;return t.ownerDocument=this,t.name=e,t.nodeName=e,t.localName=e,t.specified=!0,t},createEntityReference:function(e){var t=new C;return t.ownerDocument=this,t.nodeName=e,t},createElementNS:function(e,t){var n=new k,r=t.split(":"),i=n.attributes=new u;return n.childNodes=new o,n.ownerDocument=this,n.nodeName=t,n.tagName=t,n.namespaceURI=e,2==r.length?(n.prefix=r[0],n.localName=r[1]):n.localName=t,i._ownerElement=n,n},createAttributeNS:function(e,t){var n=new S,r=t.split(":");return n.ownerDocument=this,n.nodeName=t,n.name=t,n.namespaceURI=e,n.specified=!0,2==r.length?(n.prefix=r[0],n.localName=r[1]):n.localName=t,n}},r(m,d),k.prototype={nodeType:K,hasAttribute:function(e){return null!=this.getAttributeNode(e)},getAttribute:function(e){var t=this.getAttributeNode(e);return t&&t.value||""},getAttributeNode:function(e){return this.attributes.getNamedItem(e)},setAttribute:function(e,t){var n=this.ownerDocument.createAttribute(e);n.value=n.nodeValue=""+t,this.setAttributeNode(n)},removeAttribute:function(e){var t=this.getAttributeNode(e);t&&this.removeAttributeNode(t)},appendChild:function(e){return e.nodeType===te?this.insertBefore(e,null):x(this,e)},setAttributeNode:function(e){return this.attributes.setNamedItem(e)},setAttributeNodeNS:function(e){return this.attributes.setNamedItemNS(e)},removeAttributeNode:function(e){return this.attributes.removeNamedItem(e.nodeName)},removeAttributeNS:function(e,t){var n=this.getAttributeNodeNS(e,t);n&&this.removeAttributeNode(n)},hasAttributeNS:function(e,t){return null!=this.getAttributeNodeNS(e,t)},getAttributeNS:function(e,t){var n=this.getAttributeNodeNS(e,t);return n&&n.value||""},setAttributeNS:function(e,t,n){var r=this.ownerDocument.createAttributeNS(e,t);r.value=r.nodeValue=""+n,this.setAttributeNode(r)},getAttributeNodeNS:function(e,t){return this.attributes.getNamedItemNS(e,t)},getElementsByTagName:function(e){return new a(this,function(t){var n=[];return v(t,function(r){r===t||r.nodeType!=K||"*"!==e&&r.tagName!=e||n.push(r)}),n})},getElementsByTagNameNS:function(e,t){return new a(this,function(n){var r=[];return v(n,function(i){i===n||i.nodeType!==K||"*"!==e&&i.namespaceURI!==e||"*"!==t&&i.localName!=t||r.push(i)}),r})}},m.prototype.getElementsByTagName=k.prototype.getElementsByTagName,m.prototype.getElementsByTagNameNS=k.prototype.getElementsByTagNameNS,r(k,d),S.prototype.nodeType=V,r(S,d),O.prototype={data:"",substringData:function(e,t){return this.data.substring(e,e+t)},appendData:function(e){e=this.data+e,this.nodeValue=this.data=e,this.length=e.length},insertData:function(e,t){this.replaceData(e,0,t)},appendChild:function(e){throw new Error(ie[oe])},deleteData:function(e,t){this.replaceData(e,t,"")},replaceData:function(e,t,n){n=this.data.substring(0,e)+n+this.data.substring(e+t),this.nodeValue=this.data=n,this.length=n.length}},r(O,d),E.prototype={nodeName:"#text",nodeType:W,splitText:function(e){var t=this.data,n=t.substring(e);t=t.substring(0,e),this.data=this.nodeValue=t,this.length=t.length;var r=this.ownerDocument.createTextNode(n);return this.parentNode&&this.parentNode.insertBefore(r,this.nextSibling),r}},r(E,O),T.prototype={nodeName:"#comment",nodeType:J},r(T,O),A.prototype={nodeName:"#cdata-section",nodeType:q},r(A,O),P.prototype.nodeType=ee,r(P,d),I.prototype.nodeType=ne,r(I,d),N.prototype.nodeType=X,r(N,d),C.prototype.nodeType=Y,r(C,d),M.prototype.nodeName="#document-fragment",M.prototype.nodeType=te,r(M,d),D.prototype.nodeType=$,r(D,d),j.prototype.serializeToString=function(e,t,n){return R.call(e,t,n)},d.prototype.toString=R;try{Object.defineProperty&&(Object.defineProperty(a.prototype,"length",{get:function(){return s(this),this.$$length}}),Object.defineProperty(d.prototype,"textContent",{get:function(){return Z(this)},set:function(e){switch(this.nodeType){case K:case te:for(;this.firstChild;)this.removeChild(this.firstChild);(e||String(e))&&this.appendChild(this.ownerDocument.createTextNode(e));break;default:this.data=e,this.value=e,this.nodeValue=e}}}),G=function(e,t,n){e["$$"+t]=n})}catch(e){}t.DOMImplementation=h,t.XMLSerializer=j},function(e,t,n){"use strict";function r(e,t){for(var n=e.width,r=e.height,i=new Uint8Array(n*r*3),o=void 0,a=0,s=0;a<e.length;++a,s+=3)o=256-e[a]/t*256,i[s]=o,i[s+1]=o,i[s+2]=o;return i}function i(e,t){for(var n=e.width,r=e.height,i=new Uint8Array(n*r*3),o=void 0,a=0,s=0;a<e.length;++a,s+=3)o=e[a]/t*256,i[s]=o,i[s+1]=o,i[s+2]=o;return i}function o(e,t){for(var n=e.width,r=e.height,i=new Uint8Array(n*r*3),o=t.length/3,a=t.length/3*2,s=0,u=0;s<e.length;++s,u+=3){var f=e[s];i[u]=t[f]/65536*256,i[u+1]=t[f+o]/65536*256,i[u+2]=t[f+a]/65536*256}return i}function a(e){for(var t=e.width,n=e.height,r=new Uint8Array(t*n*3),i=0,o=0;i<e.length;i+=4,o+=3){var a=e[i],s=e[i+1],u=e[i+2],f=e[i+3];r[o]=(255-a)/256*255*((255-f)/256),r[o+1]=(255-s)/256*255*((255-f)/256),r[o+2]=(255-u)/256*255*((255-f)/256)}return r}function s(e){for(var t=e.width,n=e.height,r=new Uint8ClampedArray(t*n*3),i=0,o=0;i<e.length;i+=3,o+=3){var a=e[i],s=e[i+1],u=e[i+2];r[o]=a+1.402*(u-128),r[o+1]=a-.34414*(s-128)-.71414*(u-128),r[o+2]=a+1.772*(s-128)}return r}function u(e){for(var t=e.width,n=e.height,r=new Uint8Array(t*n*3),i=0,o=0;i<e.length;i+=3,o+=3){var a=e[i+0],s=e[i+1]<<24>>24,u=e[i+2]<<24>>24,h=(a+16)/116,d=s/500+h,p=h-u/200,v=void 0,m=void 0,y=void 0;d=f*(d*d*d>.008856?d*d*d:(d-16/116)/7.787),h=c*(h*h*h>.008856?h*h*h:(h-16/116)/7.787),p=l*(p*p*p>.008856?p*p*p:(p-16/116)/7.787),v=3.2406*d+-1.5372*h+-.4986*p,m=-.9689*d+1.8758*h+.0415*p,y=.0557*d+-.204*h+1.057*p,v=v>.0031308?1.055*Math.pow(v,1/2.4)-.055:12.92*v,m=m>.0031308?1.055*Math.pow(m,1/2.4)-.055:12.92*m,y=y>.0031308?1.055*Math.pow(y,1/2.4)-.055:12.92*y,r[o]=255*Math.max(0,Math.min(1,v)),r[o+1]=255*Math.max(0,Math.min(1,m)),r[o+2]=255*Math.max(0,Math.min(1,y))}return r}Object.defineProperty(t,"__esModule",{value:!0}),t.fromWhiteIsZero=r,t.fromBlackIsZero=i,t.fromPalette=o,t.fromCMYK=a,t.fromYCbCr=s,t.fromCIELab=u;var f=.95047,c=1,l=1.08883},function(e,t,n){"use strict";function r(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}function i(e,t,n){if(e&&f.isObject(e)&&e instanceof r)return e;var i=new r;return i.parse(e,t,n),i}function o(e){return f.isString(e)&&(e=i(e)),e instanceof r?e.format():r.prototype.format.call(e)}function a(e,t){return i(e,!1,!0).resolve(t)}function s(e,t){return e?i(e,!1,!0).resolveObject(t):t}var u=n(149),f=n(152);t.parse=i,t.resolve=a,t.resolveObject=s,t.format=o,t.Url=r;var c=/^([a-z0-9.+-]+:)/i,l=/:[0-9]*$/,h=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,d=["<",">",'"',"`"," ","\r","\n","\t"],p=["{","}","|","\\","^","`"].concat(d),v=["'"].concat(p),m=["%","/","?",";","#"].concat(v),y=["/","?","#"],b=/^[+a-z0-9A-Z_-]{0,63}$/,g=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,w={javascript:!0,"javascript:":!0},_={javascript:!0,"javascript:":!0},x={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},k=n(153);r.prototype.parse=function(e,t,n){if(!f.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var r=e.indexOf("?"),i=-1!==r&&r<e.indexOf("#")?"?":"#",o=e.split(i),a=/\\/g;o[0]=o[0].replace(a,"/"),e=o.join(i);var s=e;if(s=s.trim(),!n&&1===e.split("#").length){var l=h.exec(s);if(l)return this.path=s,this.href=s,this.pathname=l[1],l[2]?(this.search=l[2],this.query=t?k.parse(this.search.substr(1)):this.search.substr(1)):t&&(this.search="",this.query={}),this}var d=c.exec(s);if(d){d=d[0];var p=d.toLowerCase();this.protocol=p,s=s.substr(d.length)}if(n||d||s.match(/^\/\/[^@\/]+@[^@\/]+/)){var S="//"===s.substr(0,2);!S||d&&_[d]||(s=s.substr(2),this.slashes=!0)}if(!_[d]&&(S||d&&!x[d])){for(var O=-1,E=0;E<y.length;E++){var T=s.indexOf(y[E]);-1!==T&&(-1===O||T<O)&&(O=T)}var A,P;P=-1===O?s.lastIndexOf("@"):s.lastIndexOf("@",O),-1!==P&&(A=s.slice(0,P),s=s.slice(P+1),this.auth=decodeURIComponent(A)),O=-1;for(var E=0;E<m.length;E++){var T=s.indexOf(m[E]);-1!==T&&(-1===O||T<O)&&(O=T)}-1===O&&(O=s.length),this.host=s.slice(0,O),s=s.slice(O),this.parseHost(),this.hostname=this.hostname||"";var I="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!I)for(var N=this.hostname.split(/\./),E=0,C=N.length;E<C;E++){var M=N[E];if(M&&!M.match(b)){for(var D="",j=0,R=M.length;j<R;j++)M.charCodeAt(j)>127?D+="x":D+=M[j];if(!D.match(b)){var L=N.slice(0,E),F=N.slice(E+1),U=M.match(g);U&&(L.push(U[1]),F.unshift(U[2])),F.length&&(s="/"+F.join(".")+s),this.hostname=L.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),I||(this.hostname=u.toASCII(this.hostname));var B=this.port?":"+this.port:"",G=this.hostname||"";this.host=G+B,this.href+=this.host,I&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==s[0]&&(s="/"+s))}if(!w[p])for(var E=0,C=v.length;E<C;E++){var Z=v[E];if(-1!==s.indexOf(Z)){var H=encodeURIComponent(Z);H===Z&&(H=escape(Z)),s=s.split(Z).join(H)}}var z=s.indexOf("#");-1!==z&&(this.hash=s.substr(z),s=s.slice(0,z));var K=s.indexOf("?");if(-1!==K?(this.search=s.substr(K),this.query=s.substr(K+1),t&&(this.query=k.parse(this.query)),s=s.slice(0,K)):t&&(this.search="",this.query={}),s&&(this.pathname=s),x[p]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var B=this.pathname||"",V=this.search||"";this.path=B+V}return this.href=this.format(),this},r.prototype.format=function(){var e=this.auth||"";e&&(e=encodeURIComponent(e),e=e.replace(/%3A/i,":"),e+="@");var t=this.protocol||"",n=this.pathname||"",r=this.hash||"",i=!1,o="";this.host?i=e+this.host:this.hostname&&(i=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(i+=":"+this.port)),this.query&&f.isObject(this.query)&&Object.keys(this.query).length&&(o=k.stringify(this.query));var a=this.search||o&&"?"+o||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||x[t])&&!1!==i?(i="//"+(i||""),n&&"/"!==n.charAt(0)&&(n="/"+n)):i||(i=""),r&&"#"!==r.charAt(0)&&(r="#"+r),a&&"?"!==a.charAt(0)&&(a="?"+a),n=n.replace(/[?#]/g,function(e){return encodeURIComponent(e)}),a=a.replace("#","%23"),t+i+n+a+r},r.prototype.resolve=function(e){return this.resolveObject(i(e,!1,!0)).format()},r.prototype.resolveObject=function(e){if(f.isString(e)){var t=new r;t.parse(e,!1,!0),e=t}for(var n=new r,i=Object.keys(this),o=0;o<i.length;o++){var a=i[o];n[a]=this[a]}if(n.hash=e.hash,""===e.href)return n.href=n.format(),n;if(e.slashes&&!e.protocol){for(var s=Object.keys(e),u=0;u<s.length;u++){var c=s[u];"protocol"!==c&&(n[c]=e[c])}return x[n.protocol]&&n.hostname&&!n.pathname&&(n.path=n.pathname="/"),n.href=n.format(),n}if(e.protocol&&e.protocol!==n.protocol){if(!x[e.protocol]){for(var l=Object.keys(e),h=0;h<l.length;h++){var d=l[h];n[d]=e[d]}return n.href=n.format(),n}if(n.protocol=e.protocol,e.host||_[e.protocol])n.pathname=e.pathname;else{for(var p=(e.pathname||"").split("/");p.length&&!(e.host=p.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==p[0]&&p.unshift(""),p.length<2&&p.unshift(""),n.pathname=p.join("/")}if(n.search=e.search,n.query=e.query,n.host=e.host||"",n.auth=e.auth,n.hostname=e.hostname||e.host,n.port=e.port,n.pathname||n.search){var v=n.pathname||"",m=n.search||"";n.path=v+m}return n.slashes=n.slashes||e.slashes,n.href=n.format(),n}var y=n.pathname&&"/"===n.pathname.charAt(0),b=e.host||e.pathname&&"/"===e.pathname.charAt(0),g=b||y||n.host&&e.pathname,w=g,k=n.pathname&&n.pathname.split("/")||[],p=e.pathname&&e.pathname.split("/")||[],S=n.protocol&&!x[n.protocol];if(S&&(n.hostname="",n.port=null,n.host&&(""===k[0]?k[0]=n.host:k.unshift(n.host)),n.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===p[0]?p[0]=e.host:p.unshift(e.host)),e.host=null),g=g&&(""===p[0]||""===k[0])),b)n.host=e.host||""===e.host?e.host:n.host,n.hostname=e.hostname||""===e.hostname?e.hostname:n.hostname,n.search=e.search,n.query=e.query,k=p;else if(p.length)k||(k=[]),k.pop(),k=k.concat(p),n.search=e.search,n.query=e.query;else if(!f.isNullOrUndefined(e.search)){if(S){n.hostname=n.host=k.shift();var O=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@");O&&(n.auth=O.shift(),n.host=n.hostname=O.shift())}return n.search=e.search,n.query=e.query,f.isNull(n.pathname)&&f.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!k.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var E=k.slice(-1)[0],T=(n.host||e.host||k.length>1)&&("."===E||".."===E)||""===E,A=0,P=k.length;P>=0;P--)E=k[P],"."===E?k.splice(P,1):".."===E?(k.splice(P,1),A++):A&&(k.splice(P,1),A--);if(!g&&!w)for(;A--;A)k.unshift("..");!g||""===k[0]||k[0]&&"/"===k[0].charAt(0)||k.unshift(""),T&&"/"!==k.join("/").substr(-1)&&k.push("");var I=""===k[0]||k[0]&&"/"===k[0].charAt(0);if(S){n.hostname=n.host=I?"":k.length?k.shift():"";var O=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@");O&&(n.auth=O.shift(),n.host=n.hostname=O.shift())}return g=g||n.host&&k.length,g&&!I&&k.unshift(""),k.length?n.pathname=k.join("/"):(n.pathname=null,n.path=null),f.isNull(n.pathname)&&f.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=e.auth||n.auth,n.slashes=n.slashes||e.slashes,n.href=n.format(),n},r.prototype.parseHost=function(){var e=this.host,t=l.exec(e);t&&(t=t[0],":"!==t&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(67);Object.keys(r).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return r[e]}})})},function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function o(e){switch(e){case x.fieldTypes.BYTE:case x.fieldTypes.ASCII:case x.fieldTypes.SBYTE:case x.fieldTypes.UNDEFINED:return 1;case x.fieldTypes.SHORT:case x.fieldTypes.SSHORT:return 2;case x.fieldTypes.LONG:case x.fieldTypes.SLONG:case x.fieldTypes.FLOAT:return 4;case x.fieldTypes.RATIONAL:case x.fieldTypes.SRATIONAL:case x.fieldTypes.DOUBLE:case x.fieldTypes.LONG8:case x.fieldTypes.SLONG8:case x.fieldTypes.IFD8:return 8;default:throw new RangeError("Invalid field type: "+e)}}function a(e){var t=e.GeoKeyDirectory;if(!t)return null;for(var n={},r=4;r<=4*t[3];r+=4){var i=x.geoKeyNames[t[r]],o=t[r+1]?x.fieldTagNames[t[r+1]]:null,a=t[r+2],s=t[r+3],u=null;if(o){if(void 0===(u=e[o])||null===u)throw new Error("Could not get value of geoKey '"+i+"'.");"string"==typeof u?u=u.substring(s,s+a-1):u.subarray&&(u=u.subarray(s,s+a-1))}else u=s;n[i]=u}return n}function s(e,t,n,r){var i=null,a=null,s=o(t);switch(t){case x.fieldTypes.BYTE:case x.fieldTypes.ASCII:case x.fieldTypes.UNDEFINED:i=new Uint8Array(n),a=e.readUint8;break;case x.fieldTypes.SBYTE:i=new Int8Array(n),a=e.readInt8;break;case x.fieldTypes.SHORT:i=new Uint16Array(n),a=e.readUint16;break;case x.fieldTypes.SSHORT:i=new Int16Array(n),a=e.readInt16;break;case x.fieldTypes.LONG:i=new Uint32Array(n),a=e.readUint32;break;case x.fieldTypes.SLONG:i=new Int32Array(n),a=e.readInt32;break;case x.fieldTypes.LONG8:case x.fieldTypes.IFD8:i=new Array(n),a=e.readUint64;break;case x.fieldTypes.SLONG8:i=new Array(n),a=e.readInt64;break;case x.fieldTypes.RATIONAL:i=new Uint32Array(2*n),a=e.readUint32;break;case x.fieldTypes.SRATIONAL:i=new Int32Array(2*n),a=e.readInt32;break;case x.fieldTypes.FLOAT:i=new Float32Array(n),a=e.readFloat32;break;case x.fieldTypes.DOUBLE:i=new Float64Array(n),a=e.readFloat64;break;default:throw new RangeError("Invalid field type: "+t)}if(t!==x.fieldTypes.RATIONAL&&t!==x.fieldTypes.SRATIONAL)for(var u=0;u<n;++u)i[u]=a.call(e,r+u*s);else for(var f=0;f<n;f+=2)i[f]=a.call(e,r+f*s),i[f+1]=a.call(e,r+(f*s+4));return t===x.fieldTypes.ASCII?String.fromCharCode.apply(null,i):i}Object.defineProperty(t,"__esModule",{value:!0}),t.Pool=t.writeArrayBuffer=t.fromUrls=t.fromBlob=t.fromFile=t.fromArrayBuffer=t.fromUrl=t.MultiGeoTIFF=t.GeoTIFF=t.rgb=t.globals=void 0;var u=n(12),f=i(u),c=n(15),l=i(c),h=n(27),d=i(h),p=n(44),v=i(p),m=n(28),y=i(m),b=n(3),g=i(b),w=n(4),_=i(w),x=(t.fromUrl=function(){var e=(0,y.default)(d.default.mark(function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return d.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",L.fromSource((0,I.makeRemoteSource)(t,n)));case 1:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}(),t.fromArrayBuffer=function(){var e=(0,y.default)(d.default.mark(function e(t){return d.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",L.fromSource((0,I.makeBufferSource)(t)));case 1:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}(),t.fromFile=function(){var e=(0,y.default)(d.default.mark(function e(t){return d.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",L.fromSource((0,I.makeFileSource)(t)));case 1:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}(),t.fromBlob=function(){var e=(0,y.default)(d.default.mark(function e(t){return d.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",L.fromSource((0,I.makeFileReaderSource)(t)));case 1:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}(),t.fromUrls=function(){var e=(0,y.default)(d.default.mark(function e(t){var n,r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return d.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,L.fromSource((0,I.makeRemoteSource)(t,o));case 2:return n=e.sent,e.next=5,Promise.all(i.map(function(e){return L.fromSource((0,I.makeRemoteSource)(e,o))}));case 5:return r=e.sent,e.abrupt("return",new F(n,r));case 7:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}(),t.writeArrayBuffer=function(){var e=(0,y.default)(d.default.mark(function e(t,n){return d.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,M.writeGeotiff)(t,n));case 1:case"end":return e.stop()}},e,this)}));return function(t,n){return e.apply(this,arguments)}}(),n(47)),k=r(x),S=n(125),O=i(S),E=n(145),T=i(E),A=n(146),P=i(A),I=n(147),N=n(156),C=i(N),M=n(159),D=n(64),j=r(D);t.globals=k,t.rgb=j;var R=function(){function e(){(0,g.default)(this,e)}return(0,_.default)(e,[{key:"readRasters",value:function(){function e(){return t.apply(this,arguments)}var t=(0,y.default)(d.default.mark(function e(){var t,n,r,i,o,a,s,u,f,c,l,h,p,m,y,b,g,w,_,x,k,S,O,E,T,A,P,I,N,C,M,D,j,R,L,F,U,B,G=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return d.