@hscmap/fits
Advanced tools
Comparing version 2.0.3 to 2.1.1
@@ -1,1 +0,1 @@ | ||
!function(t,e){for(var r in e)t[r]=e[r]}(exports,function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=2)}([function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(1),o=function(){function t(t,e,r){this.header=t,this.data=e,this.dataType=r}return t.fromSource=function(e){return new t(e.header,e.data,e.dataType)},t.prototype.card=function(t,e){return n.card(this.header,t,e)},t.prototype.uint8array=function(){return this.typedArray(n.DataType.uint8,Uint8Array)},t.prototype.uint16array=function(){return this.typedArray(n.DataType.uint16,Uint16Array)},t.prototype.uint32array=function(){return this.typedArray(n.DataType.uint32,Uint32Array)},t.prototype.float32array=function(){return this.typedArray(n.DataType.float32,Float32Array)},t.prototype.float64array=function(){return this.typedArray(n.DataType.float64,Float64Array)},t.prototype.typedArray=function(t,e){if(this.dataType!=t)throw new Error("type mismatch: "+n.DataType[this.dataType]+" -> "+n.DataType[t]);return new e(this.data)},t}();e.Hdu=o},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),function(t){t[t.uint8=0]="uint8",t[t.uint16=1]="uint16",t[t.uint32=2]="uint32",t[t.float32=3]="float32",t[t.float64=4]="float64"}(e.DataType||(e.DataType={})),e.card=function(t,e,r,n){var o=t[e];if(void 0==o&&(o=n),typeof o!=r)throw new Error("Type mismatch: "+o+" for "+e);return o}},function(t,e,r){r(3),t.exports=r(4)},function(t,e){t.exports=require("es6-promise/auto")},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(5);e.Fits=n.Fits;var o=r(0);e.Hdu=o.Hdu},function(t,e,r){"use strict";var n=this&&this.__extends||function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),o=this&&this.__awaiter||function(t,e,r,n){return new(r||(r=Promise))(function(o,u){function i(t){try{c(n.next(t))}catch(t){u(t)}}function a(t){try{c(n.throw(t))}catch(t){u(t)}}function c(t){t.done?o(t.value):new r(function(e){e(t.value)}).then(i,a)}c((n=n.apply(t,e||[])).next())})},u=this&&this.__generator||function(t,e){var r,n,o,u,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return u={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(u[Symbol.iterator]=function(){return this}),u;function a(u){return function(a){return function(u){if(r)throw new TypeError("Generator is already executing.");for(;i;)try{if(r=1,n&&(o=2&u[0]?n.return:u[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,u[1])).done)return o;switch(n=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return i.label++,{value:u[1],done:!1};case 5:i.label++,n=u[1],u=[0];continue;case 7:u=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===u[0]||2===u[0])){i=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){i.label=u[1];break}if(6===u[0]&&i.label<o[1]){i.label=o[1],o=u;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(u);break}o[2]&&i.ops.pop(),i.trys.pop();continue}u=e.call(t,i)}catch(t){u=[6,t],n=0}finally{r=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,a])}}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(6),a=r(1),c=function(t){function e(){return t.call(this)||this}return n(e,t),e.decode=function(t,e){return o(this,void 0,void 0,function(){return u(this,function(r){switch(r.label){case 0:return this.decoder||(this.decoder=new i.Decoder),[4,this.decoder.decode(t,e)];case 1:return[2,r.sent()]}})})},e.fetch=function(t,e){return o(this,void 0,void 0,function(){var r;return u(this,function(n){switch(n.label){case 0:return r=this.decode,[4,function(t){return new Promise(function(e,r){var n=new XMLHttpRequest;n.open("GET",t),n.addEventListener("load",function(){200==n.status?e(n.response):r("status="+n.status)}),n.addEventListener("error",function(t){return r(t)}),n.responseType="arraybuffer",n.send()})}(t)];case 1:return[4,r.apply(this,[n.sent(),e])];case 2:return[2,n.sent()]}})})},e.DataType=a.DataType,e}(Array);e.Fits=c},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(7),o=r(0),u=function(){function t(){this.requestId=0,this.callbacks=new Map}return t.prototype.decode=function(t,e){var r=this;return new Promise(function(n,o){var u=r.setupWorker(),i=++r.requestId,a={requestId:i,fileContent:t,hduDecodeOptions:e};r.callbacks.set(i,{resolve:n,reject:o}),u.postMessage(a)})},t.prototype.setupWorker=function(){var t=this;return this.worker?this.worker:(this.worker=new n,this.worker.addEventListener("message",function(e){var r=e.data,n=t.callbacks.get(r.requestId),u=n.resolve,i=n.reject;r.error?i(r.error):u(r.hduSources.map(o.Hdu.fromSource)),t.callbacks.delete(r.requestId)}),this.worker)},t.prototype.close=function(){this.worker.terminate()},t}();e.Decoder=u},function(t,e,r){t.exports=function(){return new Worker(r.p+"4c4e5307b2b59654ca71.worker.js")}}])); | ||
!function(t,e){for(var r in e)t[r]=e[r]}(exports,function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=2)}([function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),function(t){t[t.uint8=8]="uint8",t[t.uint16=16]="uint16",t[t.uint32=32]="uint32",t[t.float32=-32]="float32",t[t.float64=-64]="float64"}(e.DataType||(e.DataType={})),e.card=function(t,e,r,n){var o=t[e];if(null==o&&(o=n),typeof o!=r)throw new Error("Type mismatch: "+o+" for "+e);return o}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(0),o=function(){function t(t,e,r){this.header=t,this.data=e,this.dataType=r}return t.fromSource=function(e){return new t(e.header,e.data,e.dataType)},t.prototype.card=function(t,e){return n.card(this.header,t,e)},t.prototype.uint8array=function(){return this.typedArray(n.DataType.uint8,Uint8Array)},t.prototype.uint16array=function(){return this.typedArray(n.DataType.uint16,Uint16Array)},t.prototype.uint32array=function(){return this.typedArray(n.DataType.uint32,Uint32Array)},t.prototype.float32array=function(){return this.typedArray(n.DataType.float32,Float32Array)},t.prototype.float64array=function(){return this.typedArray(n.DataType.float64,Float64Array)},t.prototype.typedArray=function(t,e){if(this.dataType!=t)throw new Error("type mismatch: "+n.DataType[this.dataType]+" -> "+n.DataType[t]);return new e(this.data)},t}();e.Hdu=o},function(t,e,r){r(3),t.exports=r(4)},function(t,e){t.exports=require("es6-promise/auto")},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(5);e.Fits=n.Fits;var o=r(1);e.Hdu=o.Hdu},function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),u=this&&this.__awaiter||function(t,e,r,n){return new(r||(r=Promise))(function(o,u){function a(t){try{c(n.next(t))}catch(t){u(t)}}function i(t){try{c(n.throw(t))}catch(t){u(t)}}function c(t){t.done?o(t.value):new r(function(e){e(t.value)}).then(a,i)}c((n=n.apply(t,e||[])).next())})},a=this&&this.__generator||function(t,e){var r,n,o,u,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return u={next:i(0),throw:i(1),return:i(2)},"function"==typeof Symbol&&(u[Symbol.iterator]=function(){return this}),u;function i(u){return function(i){return function(u){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&u[0]?n.return:u[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,u[1])).done)return o;switch(n=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,n=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===u[0]||2===u[0])){a=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){a.label=u[1];break}if(6===u[0]&&a.label<o[1]){a.label=o[1],o=u;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(u);break}o[2]&&a.ops.pop(),a.trys.pop();continue}u=e.call(t,a)}catch(t){u=[6,t],n=0}finally{r=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,i])}}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(6),c=r(0),s=r(7),f=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.decode=function(t,e){return u(this,void 0,void 0,function(){return a(this,function(r){switch(r.label){case 0:return[4,s.decode(t,e)];case 1:return[2,r.sent()]}})})},e.fetch=function(t,e){return u(this,void 0,void 0,function(){var r;return a(this,function(n){switch(n.label){case 0:return r=this.decode,[4,i.ajax(t)];case 1:return[4,r.apply(this,[n.sent(),e])];case 2:return[2,n.sent()]}})})},e.DataType=c.DataType,e}(Array);e.Fits=f},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ajax=function(t){return new Promise(function(e,r){var n=new XMLHttpRequest;n.open("GET",t),n.addEventListener("load",function(){200==n.status?e(n.response):r("status="+n.status)}),n.addEventListener("error",function(t){return r(t)}),n.responseType="arraybuffer",n.send()})}},function(t,e,r){"use strict";var n=this&&this.__awaiter||function(t,e,r,n){return new(r||(r=Promise))(function(o,u){function a(t){try{c(n.next(t))}catch(t){u(t)}}function i(t){try{c(n.throw(t))}catch(t){u(t)}}function c(t){t.done?o(t.value):new r(function(e){e(t.value)}).then(a,i)}c((n=n.apply(t,e||[])).next())})},o=this&&this.__generator||function(t,e){var r,n,o,u,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return u={next:i(0),throw:i(1),return:i(2)},"function"==typeof Symbol&&(u[Symbol.iterator]=function(){return this}),u;function i(u){return function(i){return function(u){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&u[0]?n.return:u[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,u[1])).done)return o;switch(n=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,n=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===u[0]||2===u[0])){a=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){a.label=u[1];break}if(6===u[0]&&a.label<o[1]){a.label=o[1],o=u;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(u);break}o[2]&&a.ops.pop(),a.trys.pop();continue}u=e.call(t,a)}catch(t){u=[6,t],n=0}finally{r=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,i])}}};Object.defineProperty(e,"__esModule",{value:!0});var u=r(1),a=r(8),i=function(){function t(){this.requestId=0,this.callbacks=new Map}return t.prototype.decode=function(t,e){var r=this;return new Promise(function(n,o){var u=r.setupWorker(),a=++r.requestId,i={requestId:a,fileContent:t,hduDecodeOptions:e};r.callbacks.set(a,{resolve:n,reject:o}),u.postMessage(i)})},t.prototype.setupWorker=function(){var t=this;return this.worker?this.worker:(this.worker=new a,this.worker.addEventListener("message",function(e){var r=e.data,n=t.callbacks.get(r.requestId),o=n.resolve,a=n.reject;r.error?a(r.error):o(r.hduSources.map(u.Hdu.fromSource)),t.callbacks.delete(r.requestId)}),this.worker)},t}();e.decode=function(t,e){return n(this,void 0,void 0,function(){var r,n,u;return o(this,function(o){switch(o.label){case 0:return r=i.singleton=i.singleton||new i,n=performance.now(),console.log("decode start"),[4,r.decode(t,e)];case 1:return u=o.sent(),console.log(performance.now()-n),[2,u]}})})}},function(t,e,r){t.exports=function(){return new Worker(r.p+"794069db94ece13b978c.worker.js")}}])); |
{ | ||
"name": "@hscmap/fits", | ||
"version": "2.0.3", | ||
"version": "2.1.1", | ||
"description": "fits (Flexible Image Transport System) reader module", | ||
@@ -23,14 +23,15 @@ "main": "build/dist/index.js", | ||
"dependencies": { | ||
"es6-promise": "^4.2.4", | ||
"es6-promise": "^4.2.5", | ||
"gzip-js": "^0.3.2" | ||
}, | ||
"devDependencies": { | ||
"file-loader": "^2.0.0", | ||
"gh-pages": "^1.2.0", | ||
"emcc-loader": "0.0.3", | ||
"file-loader": "^3.0.1", | ||
"gh-pages": "^2.0.1", | ||
"html-webpack-plugin": "^3.2.0", | ||
"ts-loader": "^4.5.0", | ||
"typescript": "^3.0.3", | ||
"webpack": "^4.17.1", | ||
"webpack-cli": "^3.1.0", | ||
"webpack-dev-server": "^3.1.7", | ||
"ts-loader": "^5.3.3", | ||
"typescript": "^3.2.2", | ||
"webpack": "^4.28.3", | ||
"webpack-cli": "^3.2.1", | ||
"webpack-dev-server": "^3.1.14", | ||
"webpack-node-externals": "^1.7.2", | ||
@@ -37,0 +38,0 @@ "worker-loader": "^2.0.0" |
# Introduction | ||
* [Working demo](https://michitaro.github.io/fits/) | ||
# Requisites | ||
* https://github.com/michitaro/assets-installer-plugin | ||
# Example (Source code of the working demo) | ||
@@ -8,0 +5,0 @@ ```typescript |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
166648
14
11
57
Updatedes6-promise@^4.2.5