Newer
Older
osm-data / lib / ol6.14.1-dist / 611.ol.js
"use strict";(self.webpackChunkol=self.webpackChunkol||[]).push([[611],{165:function(r,n,t){function e(r,n){var t=r.length-n,e=0;do{for(var o=n;o>0;o--)r[e+n]+=r[e],e++;t-=n}while(t>0)}function o(r,n,t){for(var e=0,o=r.length,i=o/t;o>n;){for(var f=n;f>0;--f)r[e+n]+=r[e],++e;o-=n}for(var u=r.slice(),a=0;a<i;++a)for(var c=0;c<t;++c)r[t*a+c]=u[(t-c-1)*i+a]}function i(r,n,t,i,f,u){if(!n||1===n)return r;for(var a=0;a<f.length;++a){if(f[a]%8!=0)throw new Error("When decoding with predictor, only multiple of 8 bits are supported.");if(f[a]!==f[0])throw new Error("When decoding with predictor, all samples must have the same size.")}for(var c=f[0]/8,s=2===u?1:f.length,l=0;l<i&&!(l*s*t*c>=r.byteLength);++l){var v=void 0;if(2===n){switch(f[0]){case 8:v=new Uint8Array(r,l*s*t*c,s*t*c);break;case 16:v=new Uint16Array(r,l*s*t*c,s*t*c/2);break;case 32:v=new Uint32Array(r,l*s*t*c,s*t*c/4);break;default:throw new Error("Predictor 2 not allowed with ".concat(f[0]," bits per sample."))}e(v,s)}else 3===n&&o(v=new Uint8Array(r,l*s*t*c,s*t*c),s,c)}return r}function f(r,n,t,e,o,i,f){try{var u=r[i](f),a=u.value}catch(r){return void t(r)}u.done?n(a):Promise.resolve(a).then(e,o)}function u(r,n){for(var t=0;t<n.length;t++){var e=n[t];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(r,e.key,e)}}t.d(n,{Z:function(){return a}});var a=function(){function r(){!function(r,n){if(!(r instanceof n))throw new TypeError("Cannot call a class as a function")}(this,r)}var n,t,e,o,a;return n=r,(t=[{key:"decode",value:(o=regeneratorRuntime.mark((function r(n,t){var e,o,f,u,a;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,this.decodeBlock(t);case 2:if(e=r.sent,1===(o=n.Predictor||1)){r.next=9;break}return f=!n.StripOffsets,u=f?n.TileWidth:n.ImageWidth,a=f?n.TileLength:n.RowsPerStrip||n.ImageLength,r.abrupt("return",i(e,o,u,a,n.BitsPerSample,n.PlanarConfiguration));case 9:return r.abrupt("return",e);case 10:case"end":return r.stop()}}),r,this)})),a=function(){var r=this,n=arguments;return new Promise((function(t,e){var i=o.apply(r,n);function u(r){f(i,t,e,u,a,"next",r)}function a(r){f(i,t,e,u,a,"throw",r)}u(void 0)}))},function(r,n){return a.apply(this,arguments)})}])&&u(n.prototype,t),e&&u(n,e),Object.defineProperty(n,"prototype",{writable:!1}),r}()},611:function(r,n,t){t.r(n),t.d(n,{default:function(){return h}});var e=t(165);function o(r){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(r){return typeof r}:function(r){return r&&"function"==typeof Symbol&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r})(r)}function i(r,n){if(!(r instanceof n))throw new TypeError("Cannot call a class as a function")}function f(r,n){for(var t=0;t<n.length;t++){var e=n[t];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(r,e.key,e)}}function u(r,n){return(u=Object.setPrototypeOf||function(r,n){return r.__proto__=n,r})(r,n)}function a(r){var n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(r){return!1}}();return function(){var t,e=s(r);if(n){var o=s(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return c(this,t)}}function c(r,n){if(n&&("object"===o(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(r){if(void 0===r)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(r)}function s(r){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)})(r)}function l(r,n){for(var t=n.length-1;t>=0;t--)r.push(n[t]);return r}function v(r){for(var n=new Uint16Array(4093),t=new Uint8Array(4093),e=0;e<=257;e++)n[e]=4096,t[e]=e;var o=258,i=9,f=0;function u(){o=258,i=9}function a(r){var n=function(r,n,t){var e=n%8,o=Math.floor(n/8),i=8-e,f=n+t-8*(o+1),u=8*(o+2)-(n+t),a=8*(o+2)-n;if(u=Math.max(0,u),o>=r.length)return console.warn("ran off the end of the buffer before finding EOI_CODE (end on input code)"),257;var c=r[o]&Math.pow(2,8-e)-1,s=c<<=t-i;if(o+1<r.length){var l=r[o+1]>>>u;s+=l<<=Math.max(0,t-a)}if(f>8&&o+2<r.length){var v=8*(o+3)-(n+t);s+=r[o+2]>>>v}return s}(r,f,i);return f+=i,n}function c(r,e){return t[o]=e,n[o]=r,++o-1}function s(r){for(var e=[],o=r;4096!==o;o=n[o])e.push(t[o]);return e}var v=[];u();for(var h,w=new Uint8Array(r),y=a(w);257!==y;){if(256===y){for(u(),y=a(w);256===y;)y=a(w);if(257===y)break;if(y>256)throw new Error("corrupted code at scanline ".concat(y));l(v,s(y)),h=y}else if(y<o){var d=s(y);l(v,d),c(h,d[d.length-1]),h=y}else{var b=s(h);if(!b)throw new Error("Bogus entry. Not in dictionary, ".concat(h," / ").concat(o,", position: ").concat(f));l(v,b),v.push(b[b.length-1]),c(h,b[b.length-1]),h=y}o+1>=Math.pow(2,i)&&(12===i?h=void 0:i++),y=a(w)}return new Uint8Array(v)}var h=function(r){!function(r,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(n&&n.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),n&&u(r,n)}(c,r);var n,t,e,o=a(c);function c(){return i(this,c),o.apply(this,arguments)}return n=c,(t=[{key:"decodeBlock",value:function(r){return v(r).buffer}}])&&f(n.prototype,t),e&&f(n,e),Object.defineProperty(n,"prototype",{writable:!1}),c}(e.Z)}}]);
//# sourceMappingURL=611.ol.js.map