You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2 lines
5.5 KiB
JavaScript

"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[9137],{22243:function(r,e,t){function n(r,e){var t=r.length-e,n=0;do{for(var o=e;o>0;o--)r[n+e]+=r[n],n++;t-=e}while(t>0)}function o(r,e,t){for(var n=0,o=r.length,i=o/t;o>e;){for(var a=e;a>0;--a)r[n+e]+=r[n],++n;o-=e}for(var u=r.slice(),c=0;c<i;++c)for(var f=0;f<t;++f)r[t*c+f]=u[(t-f-1)*i+c]}function i(r,e,t,i,a,u){if(!e||1===e)return r;for(var c=0;c<a.length;++c){if(a[c]%8!=0)throw new Error("When decoding with predictor, only multiple of 8 bits are supported.");if(a[c]!==a[0])throw new Error("When decoding with predictor, all samples must have the same size.")}for(var f=a[0]/8,l=2===u?1:a.length,s=0;s<i&&!(s*l*t*f>=r.byteLength);++s){var p=void 0;if(2===e){switch(a[0]){case 8:p=new Uint8Array(r,s*l*t*f,l*t*f);break;case 16:p=new Uint16Array(r,s*l*t*f,l*t*f/2);break;case 32:p=new Uint32Array(r,s*l*t*f,l*t*f/4);break;default:throw new Error("Predictor 2 not allowed with ".concat(a[0]," bits per sample."))}n(p,l)}else 3===e&&o(p=new Uint8Array(r,s*l*t*f,l*t*f),l,f)}return r}function a(r,e,t,n,o,i,a){try{var u=r[i](a),c=u.value}catch(r){return void t(r)}u.done?e(c):Promise.resolve(c).then(n,o)}function u(r,e){for(var t=0;t<e.length;t++){var n=e[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(r,n.key,n)}}t.d(e,{Z:function(){return c}});var c=function(){function r(){!function(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}(this,r)}var e,t,n,o,c;return e=r,(t=[{key:"decode",value:(o=regeneratorRuntime.mark((function r(e,t){var n,o,a,u,c;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,this.decodeBlock(t);case 2:if(n=r.sent,1===(o=e.Predictor||1)){r.next=9;break}return a=!e.StripOffsets,u=a?e.TileWidth:e.ImageWidth,c=a?e.TileLength:e.RowsPerStrip||e.ImageLength,r.abrupt("return",i(n,o,u,c,e.BitsPerSample,e.PlanarConfiguration));case 9:return r.abrupt("return",n);case 10:case"end":return r.stop()}}),r,this)})),c=function(){var r=this,e=arguments;return new Promise((function(t,n){var i=o.apply(r,e);function u(r){a(i,t,n,u,c,"next",r)}function c(r){a(i,t,n,u,c,"throw",r)}u(void 0)}))},function(r,e){return c.apply(this,arguments)})}])&&u(e.prototype,t),n&&u(e,n),Object.defineProperty(e,"prototype",{writable:!1}),r}()},89137:function(r,e,t){t.r(e),t.d(e,{default:function(){return h}});var n=t(22243);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,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}function a(r,e){for(var t=0;t<e.length;t++){var n=e[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(r,n.key,n)}}function u(r,e){return(u=Object.setPrototypeOf||function(r,e){return r.__proto__=e,r})(r,e)}function c(r){var e=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,n=l(r);if(e){var o=l(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return f(this,t)}}function f(r,e){if(e&&("object"===o(e)||"function"==typeof e))return e;if(void 0!==e)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 l(r){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)})(r)}function s(r,e){for(var t=e.length-1;t>=0;t--)r.push(e[t]);return r}function p(r){for(var e=new Uint16Array(4093),t=new Uint8Array(4093),n=0;n<=257;n++)e[n]=4096,t[n]=n;var o=258,i=9,a=0;function u(){o=258,i=9}function c(r){var e=function
//# sourceMappingURL=9137.js.map