Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@loaders.gl/core

Package Overview
Dependencies
Maintainers
10
Versions
338
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@loaders.gl/core - npm Package Compare versions

Comparing version 2.0.3 to 2.0.4

src/.DS_Store

2

dist/dist.min.js

@@ -1,1 +0,1 @@

!function(e,r){if("object"==typeof exports&&"object"==typeof module)module.exports=r();else if("function"==typeof define&&define.amd)define([],r);else{var n=r();for(var t in n)("object"==typeof exports?exports:e)[t]=n[t]}}(window,(function(){return function(e){var r={};function n(t){if(r[t])return r[t].exports;var o=r[t]={i:t,l:!1,exports:{}};return e[t].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=r,n.d=function(e,r,t){n.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,r){if(1&r&&(e=n(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(n.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var o in e)n.d(t,o,function(r){return e[r]}.bind(null,o));return t},n.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(r,"a",r),r},n.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},n.p="",n(n.s=5)}([,function(e,r){},function(e,r){},function(e,r){},function(e,r){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,r,n){(function(r){const t=n(7),o="undefined"==typeof window?r:window;o.loaders=o.loaders||{},e.exports=Object.assign(o.loaders,t)}).call(this,n(4))},function(e,r){var n,t,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function u(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(r){try{return n.call(null,e,0)}catch(r){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{t="function"==typeof clearTimeout?clearTimeout:s}catch(e){t=s}}();var a,c=[],f=!1,l=-1;function d(){f&&a&&(f=!1,a.length?c=a.concat(c):l=-1,c.length&&y())}function y(){if(!f){var e=u(d);f=!0;for(var r=c.length;r;){for(a=c,c=[];++l<r;)a&&a[l].run();l=-1,r=c.length}a=null,f=!1,function(e){if(t===clearTimeout)return clearTimeout(e);if((t===s||!t)&&clearTimeout)return t=clearTimeout,clearTimeout(e);try{t(e)}catch(r){try{return t.call(null,e)}catch(r){return t.call(this,e)}}}(e)}}function h(e,r){this.fun=e,this.array=r}function p(){}o.nextTick=function(e){var r=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)r[n-1]=arguments[n];c.push(new h(e,r)),1!==c.length||f||u(y)},h.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=p,o.addListener=p,o.once=p,o.off=p,o.removeListener=p,o.removeAllListeners=p,o.emit=p,o.prependListener=p,o.prependOnceListener=p,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,r,n){"use strict";n.r(r);var t={};function o(e){const r=e&&e.lastIndexOf("/");return r>=0?e.substr(0,r):""}n.r(t),n.d(t,"dirname",(function(){return o}));let i="";const s={};function u(e){i=e}function a(){return i}function c(e){for(const r in s)if(e.startsWith(r)){const n=s[r];return e.replace(r,n)}return e+=i}const f=e=>"boolean"==typeof e,l=e=>"function"==typeof e,d=e=>null!==e&&"object"==typeof e,y=e=>d(e)&&l(e.then),h=e=>e&&"function"==typeof e[Symbol.iterator],p=e=>e&&"function"==typeof e[Symbol.asyncIterator],w=e=>e&&l(e.next),g=e=>"undefined"!=typeof Response&&e instanceof Response||e.arrayBuffer&&e.text&&e.json,b=e=>(e=>"undefined"!=typeof File&&e instanceof File)(e)||(e=>"undefined"!=typeof Blob&&e instanceof Blob)(e),m=e=>(e=>d(e)&&l(e.tee)&&l(e.cancel)&&l(e.pipeTo)&&l(e.getReader))(e)||(e=>d(e)&&l(e.read)&&l(e.pipe)&&f(e.readable))(e),x=e=>(e=>d(e)&&l(e.abort)&&l(e.getWriter))(e)||(e=>d(e)&&l(e.end)&&l(e.write)&&f(e.writable))(e);function A(e,r){if(!e)throw new Error(r||"loader assertion failed.")}class v{constructor(e){this._fileOrBlob=e,this.bodyUsed=!1}get headers(){return new Headers({"Content-Length":this._fileOrBlob.size,"Content-Type":this._fileOrBlob.type})}get ok(){return!0}get status(){return 200}get url(){return this._fileOrBlob.name||""}async arrayBuffer(){const{reader:e,promise:r}=this._getFileReader();return e.readAsArrayBuffer(this._fileOrBlob),r}async text(){const{reader:e,promise:r}=this._getFileReader();return e.readAsText(this._fileOrBlob),r}async json(){const e=await this.text();return JSON.parse(e)}_getFileReader(){let e;A(!this.bodyUsed),this.bodyUsed=!0;const r=new Promise((r,n)=>{try{e=new FileReader,e.onerror=e=>n(new Error(e)),e.onabort=()=>n(new Error("Read aborted.")),e.onload=()=>r(e.result)}catch(e){n(e)}});return{reader:e,promise:r}}}function S(e,r){return Promise.resolve(new v(e,r))}async function k(e,r){return b(e)?S(e,r):(e=c(e),fetch(e,r))}var B=n(8),T=n(2);const j={dataType:"arraybuffer",nothrow:!0},_=e=>e.startsWith("data:");function O(e,r){return r=function(e={}){return(e=Object.assign({},j,e)).responseType=e.responseType||e.dataType,e}(r),_(e),r.nothrow||A(!1),null}function I(e,r={}){return e=c(e),!B.c&&T.readFileSync?T.readFileSync(e,r):O(e,r)}var W=n(1);function P(e,r,n){return e=c(e),!B.c&&W.writeFile?W.writeFile(e,r,n):A(!1)}function $(e,r,n){return e=c(e),!B.c&&W.writeFileSync?W.writeFileSync(e,r,n):A(!1)}function E(e){return`Failed to fetch resource ${e.url}(${e.status}): ${e.statusText} `}async function C(e){let r=`Failed to fetch resource ${e.url} (${e.status}): `;try{e.headers.get("Content-Type").includes("application/json")?r+=await e.text():r+=e.statusText}catch(e){return r}return r}class L{log(){return e=>{}}info(){return e=>{}}warn(){return e=>{}}error(){return e=>{}}}const M={CDN:"https://unpkg.com/@loaders.gl",worker:!0,log:new class{constructor(){this.console=console}log(...e){return this.console.log.bind(this.console,...e)}info(...e){return this.console.info.bind(this.console,...e)}warn(...e){return this.console.warn.bind(this.console,...e)}error(...e){return this.console.error.bind(this.console,...e)}},dataType:"arraybuffer"},D=e=>e&&"object"==typeof e&&e.constructor==={}.constructor;let F={...M};function R(e,r,n){const t={...e&&(e.DEFAULT_LOADER_OPTIONS||e.defaultOptions||e.options||{})};return function(e,r){!r||"baseUri"in e||(e.baseUri=r)}(t,n),null===t.log&&(t.log=new L),U(t,F),U(t,r),t}function U(e,r){for(const n in r)if(n in r){const t=r[n];D(t)&&D(e[n])?e[n]={...e[n],...r[n]}:e[n]=r[n]}}function Q(e){!function(e){F=R(F,e)}(e)}function N(e){if(!e)return!1;Array.isArray(e)&&(e=e[0]);let r=e.parseTextSync||e.parseSync||e.parse||e.parseStream||e.parseInBatches;const n=e.options&&e.options[e.id];return r=r||n&&n.workerUrl,r}function V(e){let r;return A(e,"null loader"),A(N(e),"invalid loader"),Array.isArray(e)&&(r=e[1],e=e[0],e={...e,options:{...e.options,...r}}),e.extension&&(e.extensions=e.extensions||e.extension,delete e.extension),Array.isArray(e.extensions)||(e.extensions=[e.extensions]),A(e.extensions&&e.extensions.length>0&&e.extensions[0]),e.parseTextSync&&(e.text=!0),e.text||(e.binary=!0),e}let J=[];function q(e){e=Array.isArray(e)?e:[e];for(const r of e){const e=V(r);J.find(r=>e===r)||J.unshift(e)}}function z(){J=[]}const H="2.0.3";function G(e){const r=e.split(".").map(Number);return{major:r[0],minor:r[1]}}function K(e){if(B.c||B.e>=10){if("function"==typeof e[Symbol.asyncIterator])return e;if("function"==typeof e.getIterator)return e.getIterator()}return B.c?async function*(e){const r=e.getReader();try{for(;;){const{done:e,value:n}=await r.read();if(e)return;yield n}}catch(e){r.releaseLock()}}(e):async function*(e){e=await e;for(;;){const r=e.read();if(null===r){if(e._readableState.ended)return;await X(e)}else yield r}}(e)}async function X(e){return new Promise(r=>{e.once("readable",r)})}const Y="Cannot convert supplied data type";function Z(e,r){if(r.text&&"string"==typeof e)return e;if(e instanceof ArrayBuffer||ArrayBuffer.isView(e)){const n=e.buffer||e;if(r.text&&!r.binary){return new TextDecoder("utf8").decode(n)}return n}throw new Error(Y)}async function ee(e,r){const n=(e=await e)instanceof ArrayBuffer||ArrayBuffer.isView(e);if("string"==typeof e||n)return Z(e,r);if(b(e)&&(e=await S(e)),g(e)){const n=e;return await async function(e){if(!e.ok){let r=`fetch failed ${e.status} `;try{r+=await e.text()}catch(e){}throw new Error(r)}}(n),r.binary?await n.arrayBuffer():await n.text()}throw new Error(Y)}function re(e){return w(e)?e:g(e)&&e.body?(function(e){if(!e.ok)throw new Error(`fetch failed ${e.status}`)}(e),K(e.body)):m(e)?K(e):p(e)?e[Symbol.asyncIterator]():ne(e)}function ne(e){if(e instanceof ArrayBuffer||ArrayBuffer.isView(e))return function*(){yield e.buffer||e}();if(w(e))return e;if(h(e))return e[Symbol.iterator]();throw new Error(Y)}function te(e,r,n){return n||(e={fetch:e.fetch||k,...e},Array.isArray(e.loaders)||(e.loaders=null),e)}function oe(e,r){if(!r&&!Array.isArray(e))return e;let n;if(e&&(n=Array.isArray(e)?e:[e]),r&&r.loaders){const e=Array.isArray(r.loaders)?r.loaders:[r.loaders];n=n?[...n,...e]:e}return n&&n.length?n:null}var ie=n(3);function se(e){if(ie.toArrayBuffer&&(e=Object(ie.toArrayBuffer)(e)),e instanceof ArrayBuffer)return e;if(ArrayBuffer.isView(e))return e.buffer;if("string"==typeof e){const r=e;return(new TextEncoder).encode(r).buffer}return A(!1)}const ue=new Map;function ae(e){return!!e&&(e instanceof ArrayBuffer||e.buffer instanceof ArrayBuffer||("undefined"!=typeof MessagePort&&e instanceof MessagePort||("undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap||"undefined"!=typeof OffscreenCanvas&&e instanceof OffscreenCanvas)))}function ce(e,r=!0,n=[]){if(e){if(ae(e))n.push(e);else if(ae(e.buffer))n.push(e.buffer);else if(r&&"object"==typeof e)for(const t in e)ce(e[t],r,n)}else;return n}let fe=0;function le({data:e,resolve:r}){r(e)}class de{constructor({source:e,name:r=`web-worker-${fe++}`,onMessage:n}){const t=function(e,r="Worker"){if(A("string"==typeof e,"worker source"),e.startsWith("url(")&&e.endsWith(")")){const r=e.match(/^url\((.*)\)$/)[1];if(r&&!r.startsWith("http"))return r;e=function(e){return`try {\n importScripts('${e}');\n} catch (error) {\n console.error(error);\n}`}(r)}let n=ue.get(e);if(!n){const r=new Blob([e],{type:"application/javascript"});n=URL.createObjectURL(r),ue.set(e,n)}return n}(e,r);this.worker=new Worker(t,{name:r}),this.name=r,this.onMessage=n||le}async process(e){return new Promise((r,n)=>{this.worker.onmessage=e=>this.onMessage({worker:this.worker,data:e.data,resolve:r,reject:n}),this.worker.onerror=e=>{let r=`${this.name}: WorkerThread.process() failed`;e.message&&(r+=` ${e.message} ${e.filename}:${e.lineno}:${e.colno}`);const t=new Error(r);console.error(e),n(t)};const t=ce(e);this.worker.postMessage(e,t)})}destroy(){this.worker.terminate(),this.worker=null}}class ye{constructor({source:e,name:r="unnamed",maxConcurrency:n=1,onMessage:t,onDebug:o=(()=>{})}){this.source=e,this.name=r,this.maxConcurrency=n,this.onMessage=t,this.onDebug=o,this.jobQueue=[],this.idleQueue=[],this.count=0,this.isDestroyed=!1}destroy(){this.idleQueue.forEach(e=>e.destroy()),this.isDestroyed=!0}async process(e,r){return new Promise((n,t)=>{this.jobQueue.push({data:e,jobName:r,resolve:n,reject:t}),this._startQueuedJob()})}_startQueuedJob(){if(!this.jobQueue.length)return;const e=this._getAvailableWorker();if(!e)return;const r=this.jobQueue.shift();this.onDebug({message:"processing",worker:e.name,job:r.jobName,backlog:this.jobQueue.length}),e.process(r.data).then(e=>r.resolve(e)).catch(e=>r.reject(e)).then(()=>this._onWorkerDone(e))}_onWorkerDone(e){this.isDestroyed?e.destroy():(this.idleQueue.push(e),this._startQueuedJob())}_getAvailableWorker(){if(this.idleQueue.length>0)return this.idleQueue.shift();if(this.count<this.maxConcurrency){this.count++;const e=`${this.name.toLowerCase()}-worker (#${this.count} of ${this.maxConcurrency})`;return new de({source:this.source,onMessage:this.onMessage,name:e})}return null}}const he=5;class pe{static isSupported(){return"undefined"!=typeof Worker}constructor({maxConcurrency:e=he,onMessage:r,onDebug:n=(()=>{})}){this.maxConcurrency=e,this.onMessage=r,this.onDebug=n,this.workerPools=new Map}setProps(e){"maxConcurrency"in e&&(this.maxConcurrency=e.maxConcurrency),"onDebug"in e&&(this.onDebug=e.onDebug)}destroy(){this.workerPools.forEach(e=>e.destroy())}async process(e,r,n){return this._getWorkerPool(e,r).process(n)}_getWorkerPool(e,r){let n=this.workerPools.get(r);return n||(n=new ye({source:e,name:r,onMessage:this.onMessage,maxConcurrency:this.maxConcurrency,onDebug:this.onDebug}),this.workerPools.set(r,n)),n}}const we="2.0.3";function ge(e,r,n,t){const{worker:o}=n||{},i=n&&n[e.id]||{},s=`url(${"local"===o?i.localWorkerUrl:i.workerUrl})`,u=e.name,a=function(e={}){const r={};e.maxConcurrency&&(r.maxConcurrency=e.maxConcurrency);e.onDebug&&(r.onDebug=e.onDebug);be||(be=new pe({onMessage:me}));return be.setProps(r),be}(n);n=JSON.parse(JSON.stringify(n));const c=e.version!==we?`(core version ${we})`:"";return a.process(s,`loaders.gl@${e.version}${c}:${u}`,{arraybuffer:se(r),options:n,source:`loaders.gl@${we}`,type:"parse"})}let be=null;async function me({worker:e,data:r,resolve:n,reject:t}){switch(r.type){case"done":n(r.result);break;case"parse":try{const n=await je(r.arraybuffer,r.options,r.url);e.postMessage({type:"parse-done",id:r.id,result:n},ce(n))}catch(n){e.postMessage({type:"parse-error",id:r.id,message:n.message})}break;case"error":t(r.message)}}const xe=/\.([^.]+)$/,Ae=/^data:(.*?)(;|,)/;function ve(e,r="",n=null,{nothrow:t=!1}={}){if(r=r||"",e&&!Array.isArray(e)){const r=e;return V(r),r}!function(e){for(const r of e)V(r)}(e=[...e||[],...J]);let o=function(e,r){let n=r.match(Ae);const t=n&&n[1];if(t)return Se(e,t);n=r.match(xe);const o=n&&n[1];return o&&function(e,r){r=r.toLowerCase();for(const n of e)for(const e of n.extensions)if(e.toLowerCase()===r)return n;return null}(e,o)}(e,r=r.replace(/\?.*/,""));if(o=o||function(e,r){if(!r||!g(r)||!r.headers)return null;const n=r.headers.get("content-type");return Se(e,n)}(e,n),o=o||function(e,r){if(!r)return null;for(const n of e)if("string"==typeof r){if(ke(r,n))return n}else if(ArrayBuffer.isView(r)){if(Be(r.buffer,r.byteOffset,n))return n}else if(r instanceof ArrayBuffer){if(Be(r,0,n))return n}return null}(e,n),!o){if(t)return null;let e="No valid loader found";throw n&&(e+=` for data starting with "${function(e,r=5){if("string"==typeof e)return e.slice(0,r);if(ArrayBuffer.isView(e))return Te(e.buffer,e.byteOffset,r);if(e instanceof ArrayBuffer){return Te(e,0,r)}return""}(n)}"`),r&&(e+=` for ${r}`),new Error(e)}return o}function Se(e,r){for(const n of e)if(n.mimeTypes&&n.mimeTypes.includes(r))return n;return null}function ke(e,r){return r.testText&&r.testText(e)}function Be(e,r,n){switch(Array.isArray(n.test)?"array":typeof n.test){case"function":return n.test(e,n);case"string":case"array":return(Array.isArray(n.test)?n.test:[n.test]).some(n=>{return n===Te(e,r,n.length)});default:return!1}}function Te(e,r,n){if(e.byteLength<=r+n)return"";const t=new DataView(e);let o="";for(let e=0;e<n;e++)o+=String.fromCharCode(t.getUint8(r+e));return o}async function je(e,r,n,t){!r||Array.isArray(r)||N(r)||(t=n,n=r,r=null);let o="";"string"==typeof t&&(o=t,t=null),n=n||{};const i=function(e,r){return g(e)?r=r||e.url:b(r)&&(r=r.name),"string"==typeof r?r.replace(/\?.*/,""):r}(e,o),s=oe(r,t),u=ve(s,i,e);return u?(n=R(u,n,i),t=te({url:i,parse:je,loaders:s},0,t),await async function(e,r,n,t){if(function(e,r=H){A(e,"no loader provided");let n=e.version;r&&n&&(r=G(r),n=G(n))}(e),r=await ee(r,e),e.parseTextSync&&"string"==typeof r)return n.dataType="text",e.parseTextSync(r,n,t,e);if(function(e,r,n,t){if(!pe.isSupported())return!1;const o=n&&n[e.id];return!!("local"===n.worker&&o&&o.localWorkerUrl||n.worker&&o&&o.workerUrl)&&(!e.useWorker||e.useWorker(n))}(e,0,n))return await ge(e,r,n);if(e.parse)return await e.parse(r,n,t,e);return A(!e.parseSync),A(!1)}(u,e,n,t)):null}function _e(e,r,n,t){Array.isArray(r)||N(r)||(t=n,n=r,r=null);let o="";"string"==typeof t&&(o=t,t=null),n=n||{};const i=ve(oe(r,t),o,e);return i?function(e,r,n,t){if(r=Z(r,e),e.parseTextSync&&"string"==typeof r)return e.parseTextSync(r,n,t,e);if(e.parseSync)return e.parseSync(r,n,t,e);throw new Error(`${e.name} loader: 'parseSync' not supported by this loader, use 'parse' instead. ${t.url||""}`)}(i,e,n=R(i,n,o),t=te({url:o,parseSync:_e,loaders:r})):null}function Oe(e,r){const n=e instanceof ArrayBuffer?new Uint8Array(e):e,t=r instanceof ArrayBuffer?new Uint8Array(r):r,o=new Uint8Array(n.byteLength+t.byteLength);return o.set(n,0),o.set(t,n.byteLength),o}async function Ie(e,r){for(;;){const{done:n,value:t}=await e.next();if(n)return void e.return();if(r(t))return}}async function We(e){let r=new ArrayBuffer,n="";for await(const t of e)"string"==typeof t?n+=t:r=Oe(r,t);return n||r}async function*Pe(e,r){const n=new TextDecoder(r);for await(const r of e)yield"string"==typeof r?r:n.decode(r,{stream:!0})}async function*$e(e){let r="";for await(const n of e){let e;for(r+=n;(e=r.indexOf("\n"))>=0;){const n=r.slice(0,e+1);r=r.slice(e+1),yield n}}r.length>0&&(yield r)}async function*Ee(e){let r=1;for await(const n of e)yield{counter:r,line:n},r++}async function Ce(e,r,n,t){Array.isArray(r)||N(r)||(t=n,n=r,r=null);const o=ve(r,t,null);return function(e,r,n,t){if(e.parseInBatches){let o=re(r);return e.text&&(o=Pe(o)),e.parseInBatches(o,n,t,e)}throw new Error("parseWithLoaderInBatchesSync not available")}(o,e,n=R(o,n,t),te({url:t,loaders:r}))}async function Le(e,r,n,t){Array.isArray(r)||N(r)||(t=n,n=r,r=null);const o=ve(r,t,null);return function(e,r,n,t){if(e.parseInBatchesSync){const o=ne(r);return e.parseInBatchesSync(o,n,t,e)}throw new Error("parseWithLoaderInBatchesSync not available")}(o,e,n=R(o,n),te({url:t,loaders:r}))}async function Me(e,r,n){Array.isArray(r)||N(r)||(n=r,r=null);let t=e;return"string"==typeof e&&(t=await k(e,n)),b(e)&&(t=await k(e,n),e=null),await je(t,r,n,e)}async function De(e,r,n){return Ce(await k(e,n),r,n,e)}async function Fe(e,r,n,t){if(r.encode)return await r.encode(e,n);if(r.encodeSync)return r.encodeSync(e,n);throw new Error("Writer could not encode data")}function Re(e,r,n,t){if(r.encodeSync)return r.encodeSync(e,n);throw new Error("Writer could not synchronously encode data")}function Ue(e,r,n,t){if(r.encodeInBatches)return r.encodeInBatches(e,n);throw new Error("Writer could not encode data in batches")}function Qe(e,r,n,t){return P(r,Fe(e,n,t))}function Ne(e,r,n,t){return $(r,Re(e,n,t))}async function Ve(e,r,n=(()=>{}),t=(()=>{})){if(!(e=await e).ok)return e;if(!e.body)return e;const o=e.headers.get("content-length"),i=o&&parseInt(o,10);if(!(o>0))return e;if("undefined"==typeof ReadableStream)return e;const s=new ReadableStream({start(o){!async function e(r,n,t,o,i,s,u){try{const{done:a,value:c}=await n.read();if(a)return s(),void r.close();t+=c.byteLength;const f=Math.round(t/o*100);i(f,{loadedBytes:t,totalBytes:o}),r.enqueue(c),await e(r,n,t,o,i,s,u)}catch(e){r.error(e),u(e)}}(o,e.body.getReader(),0,i,r,n,t)}});return new Response(s)}n.d(r,"path",(function(){return t})),n.d(r,"fetchFile",(function(){return k})),n.d(r,"readFileSync",(function(){return I})),n.d(r,"writeFile",(function(){return P})),n.d(r,"writeFileSync",(function(){return $})),n.d(r,"_getErrorMessageFromResponseSync",(function(){return E})),n.d(r,"_getErrorMessageFromResponse",(function(){return C})),n.d(r,"setLoaderOptions",(function(){return Q})),n.d(r,"registerLoaders",(function(){return q})),n.d(r,"parse",(function(){return je})),n.d(r,"parseSync",(function(){return _e})),n.d(r,"parseInBatches",(function(){return Ce})),n.d(r,"parseInBatchesSync",(function(){return Le})),n.d(r,"load",(function(){return Me})),n.d(r,"loadInBatches",(function(){return De})),n.d(r,"encode",(function(){return Fe})),n.d(r,"encodeSync",(function(){return Re})),n.d(r,"encodeInBatches",(function(){return Ue})),n.d(r,"save",(function(){return Qe})),n.d(r,"saveSync",(function(){return Ne})),n.d(r,"isPromise",(function(){return y})),n.d(r,"isIterable",(function(){return h})),n.d(r,"isAsyncIterable",(function(){return p})),n.d(r,"isIterator",(function(){return w})),n.d(r,"isFetchResponse",(function(){return g})),n.d(r,"isReadableStream",(function(){return m})),n.d(r,"isWritableStream",(function(){return x})),n.d(r,"toArrayBuffer",(function(){return se})),n.d(r,"getStreamIterator",(function(){return K})),n.d(r,"forEach",(function(){return Ie})),n.d(r,"concatenateAsyncIterator",(function(){return We})),n.d(r,"lineAsyncIterator",(function(){return $e})),n.d(r,"textDecoderAsyncIterator",(function(){return Pe})),n.d(r,"numberedLineAsyncIterator",(function(){return Ee})),n.d(r,"isBrowser",(function(){return B.c})),n.d(r,"isWorker",(function(){return B.d})),n.d(r,"self",(function(){return B.f})),n.d(r,"window",(function(){return B.g})),n.d(r,"global",(function(){return B.b})),n.d(r,"document",(function(){return B.a})),n.d(r,"assert",(function(){return A})),n.d(r,"setPathPrefix",(function(){return u})),n.d(r,"getPathPrefix",(function(){return a})),n.d(r,"resolvePath",(function(){return c})),n.d(r,"_selectLoader",(function(){return ve})),n.d(r,"_WorkerThread",(function(){return de})),n.d(r,"_WorkerFarm",(function(){return pe})),n.d(r,"_WorkerPool",(function(){return ye})),n.d(r,"_fetchProgress",(function(){return Ve})),n.d(r,"_unregisterLoaders",(function(){return z}))},function(e,r,n){"use strict";(function(e,t){n.d(r,"f",(function(){return i})),n.d(r,"g",(function(){return s})),n.d(r,"b",(function(){return u})),n.d(r,"a",(function(){return a})),n.d(r,"c",(function(){return c})),n.d(r,"d",(function(){return f})),n.d(r,"e",(function(){return d}));const o={self:"undefined"!=typeof self&&self,window:"undefined"!=typeof window&&window,global:void 0!==e&&e,document:"undefined"!=typeof document&&document},i=o.self||o.window||o.global,s=o.window||o.self||o.global,u=o.global||o.self||o.window,a=o.document||{},c="object"!=typeof t||"[object process]"!==String(t)||t.browser,f="function"==typeof importScripts,l=void 0!==t&&t.version&&t.version.match(/v([0-9]*)/),d=l&&parseFloat(l[1])||0}).call(this,n(4),n(6))}])}));
!function(e,r){if("object"==typeof exports&&"object"==typeof module)module.exports=r();else if("function"==typeof define&&define.amd)define([],r);else{var n=r();for(var t in n)("object"==typeof exports?exports:e)[t]=n[t]}}(window,(function(){return function(e){var r={};function n(t){if(r[t])return r[t].exports;var o=r[t]={i:t,l:!1,exports:{}};return e[t].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=r,n.d=function(e,r,t){n.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,r){if(1&r&&(e=n(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(n.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var o in e)n.d(t,o,function(r){return e[r]}.bind(null,o));return t},n.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(r,"a",r),r},n.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},n.p="",n(n.s=5)}([,function(e,r){},function(e,r){},function(e,r){},function(e,r){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,r,n){(function(r){const t=n(7),o="undefined"==typeof window?r:window;o.loaders=o.loaders||{},e.exports=Object.assign(o.loaders,t)}).call(this,n(4))},function(e,r){var n,t,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function u(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(r){try{return n.call(null,e,0)}catch(r){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{t="function"==typeof clearTimeout?clearTimeout:s}catch(e){t=s}}();var a,c=[],f=!1,l=-1;function d(){f&&a&&(f=!1,a.length?c=a.concat(c):l=-1,c.length&&y())}function y(){if(!f){var e=u(d);f=!0;for(var r=c.length;r;){for(a=c,c=[];++l<r;)a&&a[l].run();l=-1,r=c.length}a=null,f=!1,function(e){if(t===clearTimeout)return clearTimeout(e);if((t===s||!t)&&clearTimeout)return t=clearTimeout,clearTimeout(e);try{t(e)}catch(r){try{return t.call(null,e)}catch(r){return t.call(this,e)}}}(e)}}function h(e,r){this.fun=e,this.array=r}function p(){}o.nextTick=function(e){var r=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)r[n-1]=arguments[n];c.push(new h(e,r)),1!==c.length||f||u(y)},h.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=p,o.addListener=p,o.once=p,o.off=p,o.removeListener=p,o.removeAllListeners=p,o.emit=p,o.prependListener=p,o.prependOnceListener=p,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,r,n){"use strict";n.r(r);var t={};function o(e){const r=e&&e.lastIndexOf("/");return r>=0?e.substr(0,r):""}n.r(t),n.d(t,"dirname",(function(){return o}));let i="";const s={};function u(e){i=e}function a(){return i}function c(e){for(const r in s)if(e.startsWith(r)){const n=s[r];return e.replace(r,n)}return e+=i}const f=e=>"boolean"==typeof e,l=e=>"function"==typeof e,d=e=>null!==e&&"object"==typeof e,y=e=>d(e)&&l(e.then),h=e=>e&&"function"==typeof e[Symbol.iterator],p=e=>e&&"function"==typeof e[Symbol.asyncIterator],w=e=>e&&l(e.next),g=e=>"undefined"!=typeof Response&&e instanceof Response||e.arrayBuffer&&e.text&&e.json,b=e=>(e=>"undefined"!=typeof File&&e instanceof File)(e)||(e=>"undefined"!=typeof Blob&&e instanceof Blob)(e),m=e=>(e=>d(e)&&l(e.tee)&&l(e.cancel)&&l(e.pipeTo)&&l(e.getReader))(e)||(e=>d(e)&&l(e.read)&&l(e.pipe)&&f(e.readable))(e),x=e=>(e=>d(e)&&l(e.abort)&&l(e.getWriter))(e)||(e=>d(e)&&l(e.end)&&l(e.write)&&f(e.writable))(e);function A(e,r){if(!e)throw new Error(r||"loader assertion failed.")}class v{constructor(e){this._fileOrBlob=e,this.bodyUsed=!1}get headers(){return new Headers({"Content-Length":this._fileOrBlob.size,"Content-Type":this._fileOrBlob.type})}get ok(){return!0}get status(){return 200}get url(){return this._fileOrBlob.name||""}async arrayBuffer(){const{reader:e,promise:r}=this._getFileReader();return e.readAsArrayBuffer(this._fileOrBlob),r}async text(){const{reader:e,promise:r}=this._getFileReader();return e.readAsText(this._fileOrBlob),r}async json(){const e=await this.text();return JSON.parse(e)}_getFileReader(){let e;A(!this.bodyUsed),this.bodyUsed=!0;const r=new Promise((r,n)=>{try{e=new FileReader,e.onerror=e=>n(new Error(e)),e.onabort=()=>n(new Error("Read aborted.")),e.onload=()=>r(e.result)}catch(e){n(e)}});return{reader:e,promise:r}}}function S(e,r){return Promise.resolve(new v(e,r))}async function k(e,r){return b(e)?S(e,r):(e=c(e),fetch(e,r))}var B=n(8),T=n(2);const j={dataType:"arraybuffer",nothrow:!0},_=e=>e.startsWith("data:");function O(e,r){return r=function(e={}){return(e=Object.assign({},j,e)).responseType=e.responseType||e.dataType,e}(r),_(e),r.nothrow||A(!1),null}function I(e,r={}){return e=c(e),!B.c&&T.readFileSync?T.readFileSync(e,r):O(e,r)}var W=n(1);function P(e,r,n){return e=c(e),!B.c&&W.writeFile?W.writeFile(e,r,n):A(!1)}function $(e,r,n){return e=c(e),!B.c&&W.writeFileSync?W.writeFileSync(e,r,n):A(!1)}function E(e){return`Failed to fetch resource ${e.url}(${e.status}): ${e.statusText} `}async function C(e){let r=`Failed to fetch resource ${e.url} (${e.status}): `;try{e.headers.get("Content-Type").includes("application/json")?r+=await e.text():r+=e.statusText}catch(e){return r}return r}class L{log(){return e=>{}}info(){return e=>{}}warn(){return e=>{}}error(){return e=>{}}}const M={CDN:"https://unpkg.com/@loaders.gl",worker:!0,log:new class{constructor(){this.console=console}log(...e){return this.console.log.bind(this.console,...e)}info(...e){return this.console.info.bind(this.console,...e)}warn(...e){return this.console.warn.bind(this.console,...e)}error(...e){return this.console.error.bind(this.console,...e)}},dataType:"arraybuffer"},D=e=>e&&"object"==typeof e&&e.constructor==={}.constructor;let F={...M};function R(e,r,n){const t={...e&&(e.DEFAULT_LOADER_OPTIONS||e.defaultOptions||e.options||{})};return function(e,r){!r||"baseUri"in e||(e.baseUri=r)}(t,n),null===t.log&&(t.log=new L),U(t,F),U(t,r),t}function U(e,r){for(const n in r)if(n in r){const t=r[n];D(t)&&D(e[n])?e[n]={...e[n],...r[n]}:e[n]=r[n]}}function Q(e){!function(e){F=R(F,e)}(e)}function N(e){if(!e)return!1;Array.isArray(e)&&(e=e[0]);let r=e.parseTextSync||e.parseSync||e.parse||e.parseStream||e.parseInBatches;const n=e.options&&e.options[e.id];return r=r||n&&n.workerUrl,r}function V(e){let r;return A(e,"null loader"),A(N(e),"invalid loader"),Array.isArray(e)&&(r=e[1],e=e[0],e={...e,options:{...e.options,...r}}),e.extension&&(e.extensions=e.extensions||e.extension,delete e.extension),Array.isArray(e.extensions)||(e.extensions=[e.extensions]),A(e.extensions&&e.extensions.length>0&&e.extensions[0]),e.parseTextSync&&(e.text=!0),e.text||(e.binary=!0),e}let J=[];function q(e){e=Array.isArray(e)?e:[e];for(const r of e){const e=V(r);J.find(r=>e===r)||J.unshift(e)}}function z(){J=[]}const H="2.0.4";function G(e){const r=e.split(".").map(Number);return{major:r[0],minor:r[1]}}function K(e){if(B.c||B.e>=10){if("function"==typeof e[Symbol.asyncIterator])return e;if("function"==typeof e.getIterator)return e.getIterator()}return B.c?async function*(e){const r=e.getReader();try{for(;;){const{done:e,value:n}=await r.read();if(e)return;yield n}}catch(e){r.releaseLock()}}(e):async function*(e){e=await e;for(;;){const r=e.read();if(null===r){if(e._readableState.ended)return;await X(e)}else yield r}}(e)}async function X(e){return new Promise(r=>{e.once("readable",r)})}const Y="Cannot convert supplied data type";function Z(e,r){if(r.text&&"string"==typeof e)return e;if(e instanceof ArrayBuffer||ArrayBuffer.isView(e)){const n=e.buffer||e;if(r.text&&!r.binary){return new TextDecoder("utf8").decode(n)}return n}throw new Error(Y)}async function ee(e,r){const n=(e=await e)instanceof ArrayBuffer||ArrayBuffer.isView(e);if("string"==typeof e||n)return Z(e,r);if(b(e)&&(e=await S(e)),g(e)){const n=e;return await async function(e){if(!e.ok){let r=`fetch failed ${e.status} `;try{r+=await e.text()}catch(e){}throw new Error(r)}}(n),r.binary?await n.arrayBuffer():await n.text()}throw new Error(Y)}function re(e){return w(e)?e:g(e)&&e.body?(function(e){if(!e.ok)throw new Error(`fetch failed ${e.status}`)}(e),K(e.body)):m(e)?K(e):p(e)?e[Symbol.asyncIterator]():ne(e)}function ne(e){if(e instanceof ArrayBuffer||ArrayBuffer.isView(e))return function*(){yield e.buffer||e}();if(w(e))return e;if(h(e))return e[Symbol.iterator]();throw new Error(Y)}function te(e,r,n){return n||(e={fetch:e.fetch||k,...e},Array.isArray(e.loaders)||(e.loaders=null),e)}function oe(e,r){if(!r&&!Array.isArray(e))return e;let n;if(e&&(n=Array.isArray(e)?e:[e]),r&&r.loaders){const e=Array.isArray(r.loaders)?r.loaders:[r.loaders];n=n?[...n,...e]:e}return n&&n.length?n:null}var ie=n(3);function se(e){if(ie.toArrayBuffer&&(e=Object(ie.toArrayBuffer)(e)),e instanceof ArrayBuffer)return e;if(ArrayBuffer.isView(e))return e.buffer;if("string"==typeof e){const r=e;return(new TextEncoder).encode(r).buffer}return A(!1)}const ue=new Map;function ae(e){return!!e&&(e instanceof ArrayBuffer||e.buffer instanceof ArrayBuffer||("undefined"!=typeof MessagePort&&e instanceof MessagePort||("undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap||"undefined"!=typeof OffscreenCanvas&&e instanceof OffscreenCanvas)))}function ce(e,r=!0,n=[]){if(e){if(ae(e))n.push(e);else if(ae(e.buffer))n.push(e.buffer);else if(r&&"object"==typeof e)for(const t in e)ce(e[t],r,n)}else;return n}let fe=0;function le({data:e,resolve:r}){r(e)}class de{constructor({source:e,name:r=`web-worker-${fe++}`,onMessage:n}){const t=function(e,r="Worker"){if(A("string"==typeof e,"worker source"),e.startsWith("url(")&&e.endsWith(")")){const r=e.match(/^url\((.*)\)$/)[1];if(r&&!r.startsWith("http"))return r;e=function(e){return`try {\n importScripts('${e}');\n} catch (error) {\n console.error(error);\n}`}(r)}let n=ue.get(e);if(!n){const r=new Blob([e],{type:"application/javascript"});n=URL.createObjectURL(r),ue.set(e,n)}return n}(e,r);this.worker=new Worker(t,{name:r}),this.name=r,this.onMessage=n||le}async process(e){return new Promise((r,n)=>{this.worker.onmessage=e=>this.onMessage({worker:this.worker,data:e.data,resolve:r,reject:n}),this.worker.onerror=e=>{let r=`${this.name}: WorkerThread.process() failed`;e.message&&(r+=` ${e.message} ${e.filename}:${e.lineno}:${e.colno}`);const t=new Error(r);console.error(e),n(t)};const t=ce(e);this.worker.postMessage(e,t)})}destroy(){this.worker.terminate(),this.worker=null}}class ye{constructor({source:e,name:r="unnamed",maxConcurrency:n=1,onMessage:t,onDebug:o=(()=>{})}){this.source=e,this.name=r,this.maxConcurrency=n,this.onMessage=t,this.onDebug=o,this.jobQueue=[],this.idleQueue=[],this.count=0,this.isDestroyed=!1}destroy(){this.idleQueue.forEach(e=>e.destroy()),this.isDestroyed=!0}async process(e,r){return new Promise((n,t)=>{this.jobQueue.push({data:e,jobName:r,resolve:n,reject:t}),this._startQueuedJob()})}_startQueuedJob(){if(!this.jobQueue.length)return;const e=this._getAvailableWorker();if(!e)return;const r=this.jobQueue.shift();this.onDebug({message:"processing",worker:e.name,job:r.jobName,backlog:this.jobQueue.length}),e.process(r.data).then(e=>r.resolve(e)).catch(e=>r.reject(e)).then(()=>this._onWorkerDone(e))}_onWorkerDone(e){this.isDestroyed?e.destroy():(this.idleQueue.push(e),this._startQueuedJob())}_getAvailableWorker(){if(this.idleQueue.length>0)return this.idleQueue.shift();if(this.count<this.maxConcurrency){this.count++;const e=`${this.name.toLowerCase()}-worker (#${this.count} of ${this.maxConcurrency})`;return new de({source:this.source,onMessage:this.onMessage,name:e})}return null}}const he=5;class pe{static isSupported(){return"undefined"!=typeof Worker}constructor({maxConcurrency:e=he,onMessage:r,onDebug:n=(()=>{})}){this.maxConcurrency=e,this.onMessage=r,this.onDebug=n,this.workerPools=new Map}setProps(e){"maxConcurrency"in e&&(this.maxConcurrency=e.maxConcurrency),"onDebug"in e&&(this.onDebug=e.onDebug)}destroy(){this.workerPools.forEach(e=>e.destroy())}async process(e,r,n){return this._getWorkerPool(e,r).process(n)}_getWorkerPool(e,r){let n=this.workerPools.get(r);return n||(n=new ye({source:e,name:r,onMessage:this.onMessage,maxConcurrency:this.maxConcurrency,onDebug:this.onDebug}),this.workerPools.set(r,n)),n}}const we="2.0.4";function ge(e,r,n,t){const{worker:o}=n||{},i=n&&n[e.id]||{},s=`url(${"local"===o?i.localWorkerUrl:i.workerUrl})`,u=e.name,a=function(e={}){const r={};e.maxConcurrency&&(r.maxConcurrency=e.maxConcurrency);e.onDebug&&(r.onDebug=e.onDebug);be||(be=new pe({onMessage:me}));return be.setProps(r),be}(n);n=JSON.parse(JSON.stringify(n));const c=e.version!==we?`(core version ${we})`:"";return a.process(s,`loaders.gl@${e.version}${c}:${u}`,{arraybuffer:se(r),options:n,source:`loaders.gl@${we}`,type:"parse"})}let be=null;async function me({worker:e,data:r,resolve:n,reject:t}){switch(r.type){case"done":n(r.result);break;case"parse":try{const n=await je(r.arraybuffer,r.options,r.url);e.postMessage({type:"parse-done",id:r.id,result:n},ce(n))}catch(n){e.postMessage({type:"parse-error",id:r.id,message:n.message})}break;case"error":t(r.message)}}const xe=/\.([^.]+)$/,Ae=/^data:(.*?)(;|,)/;function ve(e,r="",n=null,{nothrow:t=!1}={}){if(r=r||"",e&&!Array.isArray(e)){const r=e;return V(r),r}!function(e){for(const r of e)V(r)}(e=[...e||[],...J]);let o=function(e,r){let n=r.match(Ae);const t=n&&n[1];if(t)return Se(e,t);n=r.match(xe);const o=n&&n[1];return o&&function(e,r){r=r.toLowerCase();for(const n of e)for(const e of n.extensions)if(e.toLowerCase()===r)return n;return null}(e,o)}(e,r=r.replace(/\?.*/,""));if(o=o||function(e,r){if(!r||!g(r)||!r.headers)return null;const n=r.headers.get("content-type");return Se(e,n)}(e,n),o=o||function(e,r){if(!r)return null;for(const n of e)if("string"==typeof r){if(ke(r,n))return n}else if(ArrayBuffer.isView(r)){if(Be(r.buffer,r.byteOffset,n))return n}else if(r instanceof ArrayBuffer){if(Be(r,0,n))return n}return null}(e,n),!o){if(t)return null;let e="No valid loader found";throw n&&(e+=` for data starting with "${function(e,r=5){if("string"==typeof e)return e.slice(0,r);if(ArrayBuffer.isView(e))return Te(e.buffer,e.byteOffset,r);if(e instanceof ArrayBuffer){return Te(e,0,r)}return""}(n)}"`),r&&(e+=` for ${r}`),new Error(e)}return o}function Se(e,r){for(const n of e)if(n.mimeTypes&&n.mimeTypes.includes(r))return n;return null}function ke(e,r){return r.testText&&r.testText(e)}function Be(e,r,n){switch(Array.isArray(n.test)?"array":typeof n.test){case"function":return n.test(e,n);case"string":case"array":return(Array.isArray(n.test)?n.test:[n.test]).some(n=>{return n===Te(e,r,n.length)});default:return!1}}function Te(e,r,n){if(e.byteLength<=r+n)return"";const t=new DataView(e);let o="";for(let e=0;e<n;e++)o+=String.fromCharCode(t.getUint8(r+e));return o}async function je(e,r,n,t){!r||Array.isArray(r)||N(r)||(t=n,n=r,r=null);let o="";"string"==typeof t&&(o=t,t=null),n=n||{};const i=function(e,r){return g(e)?r=r||e.url:b(r)&&(r=r.name),"string"==typeof r?r.replace(/\?.*/,""):r}(e,o),s=oe(r,t),u=ve(s,i,e);return u?(n=R(u,n,i),t=te({url:i,parse:je,loaders:s},0,t),await async function(e,r,n,t){if(function(e,r=H){A(e,"no loader provided");let n=e.version;r&&n&&(r=G(r),n=G(n))}(e),r=await ee(r,e),e.parseTextSync&&"string"==typeof r)return n.dataType="text",e.parseTextSync(r,n,t,e);if(function(e,r,n,t){if(!pe.isSupported())return!1;const o=n&&n[e.id];return!!("local"===n.worker&&o&&o.localWorkerUrl||n.worker&&o&&o.workerUrl)&&(!e.useWorker||e.useWorker(n))}(e,0,n))return await ge(e,r,n);if(e.parse)return await e.parse(r,n,t,e);return A(!e.parseSync),A(!1)}(u,e,n,t)):null}function _e(e,r,n,t){Array.isArray(r)||N(r)||(t=n,n=r,r=null);let o="";"string"==typeof t&&(o=t,t=null),n=n||{};const i=ve(oe(r,t),o,e);return i?function(e,r,n,t){if(r=Z(r,e),e.parseTextSync&&"string"==typeof r)return e.parseTextSync(r,n,t,e);if(e.parseSync)return e.parseSync(r,n,t,e);throw new Error(`${e.name} loader: 'parseSync' not supported by this loader, use 'parse' instead. ${t.url||""}`)}(i,e,n=R(i,n,o),t=te({url:o,parseSync:_e,loaders:r})):null}function Oe(e,r){const n=e instanceof ArrayBuffer?new Uint8Array(e):e,t=r instanceof ArrayBuffer?new Uint8Array(r):r,o=new Uint8Array(n.byteLength+t.byteLength);return o.set(n,0),o.set(t,n.byteLength),o}async function Ie(e,r){for(;;){const{done:n,value:t}=await e.next();if(n)return void e.return();if(r(t))return}}async function We(e){let r=new ArrayBuffer,n="";for await(const t of e)"string"==typeof t?n+=t:r=Oe(r,t);return n||r}async function*Pe(e,r){const n=new TextDecoder(r);for await(const r of e)yield"string"==typeof r?r:n.decode(r,{stream:!0})}async function*$e(e){let r="";for await(const n of e){let e;for(r+=n;(e=r.indexOf("\n"))>=0;){const n=r.slice(0,e+1);r=r.slice(e+1),yield n}}r.length>0&&(yield r)}async function*Ee(e){let r=1;for await(const n of e)yield{counter:r,line:n},r++}async function Ce(e,r,n,t){Array.isArray(r)||N(r)||(t=n,n=r,r=null);const o=ve(r,t,null);return function(e,r,n,t){if(e.parseInBatches){let o=re(r);return e.text&&(o=Pe(o)),e.parseInBatches(o,n,t,e)}throw new Error("parseWithLoaderInBatchesSync not available")}(o,e,n=R(o,n,t),te({url:t,loaders:r}))}async function Le(e,r,n,t){Array.isArray(r)||N(r)||(t=n,n=r,r=null);const o=ve(r,t,null);return function(e,r,n,t){if(e.parseInBatchesSync){const o=ne(r);return e.parseInBatchesSync(o,n,t,e)}throw new Error("parseWithLoaderInBatchesSync not available")}(o,e,n=R(o,n),te({url:t,loaders:r}))}async function Me(e,r,n){Array.isArray(r)||N(r)||(n=r,r=null);let t=e;return"string"==typeof e&&(t=await k(e,n)),b(e)&&(t=await k(e,n),e=null),await je(t,r,n,e)}async function De(e,r,n){return Ce(await k(e,n),r,n,e)}async function Fe(e,r,n,t){if(r.encode)return await r.encode(e,n);if(r.encodeSync)return r.encodeSync(e,n);throw new Error("Writer could not encode data")}function Re(e,r,n,t){if(r.encodeSync)return r.encodeSync(e,n);throw new Error("Writer could not synchronously encode data")}function Ue(e,r,n,t){if(r.encodeInBatches)return r.encodeInBatches(e,n);throw new Error("Writer could not encode data in batches")}function Qe(e,r,n,t){return P(r,Fe(e,n,t))}function Ne(e,r,n,t){return $(r,Re(e,n,t))}async function Ve(e,r,n=(()=>{}),t=(()=>{})){if(!(e=await e).ok)return e;if(!e.body)return e;const o=e.headers.get("content-length"),i=o&&parseInt(o,10);if(!(o>0))return e;if("undefined"==typeof ReadableStream)return e;const s=new ReadableStream({start(o){!async function e(r,n,t,o,i,s,u){try{const{done:a,value:c}=await n.read();if(a)return s(),void r.close();t+=c.byteLength;const f=Math.round(t/o*100);i(f,{loadedBytes:t,totalBytes:o}),r.enqueue(c),await e(r,n,t,o,i,s,u)}catch(e){r.error(e),u(e)}}(o,e.body.getReader(),0,i,r,n,t)}});return new Response(s)}n.d(r,"path",(function(){return t})),n.d(r,"fetchFile",(function(){return k})),n.d(r,"readFileSync",(function(){return I})),n.d(r,"writeFile",(function(){return P})),n.d(r,"writeFileSync",(function(){return $})),n.d(r,"_getErrorMessageFromResponseSync",(function(){return E})),n.d(r,"_getErrorMessageFromResponse",(function(){return C})),n.d(r,"setLoaderOptions",(function(){return Q})),n.d(r,"registerLoaders",(function(){return q})),n.d(r,"parse",(function(){return je})),n.d(r,"parseSync",(function(){return _e})),n.d(r,"parseInBatches",(function(){return Ce})),n.d(r,"parseInBatchesSync",(function(){return Le})),n.d(r,"load",(function(){return Me})),n.d(r,"loadInBatches",(function(){return De})),n.d(r,"encode",(function(){return Fe})),n.d(r,"encodeSync",(function(){return Re})),n.d(r,"encodeInBatches",(function(){return Ue})),n.d(r,"save",(function(){return Qe})),n.d(r,"saveSync",(function(){return Ne})),n.d(r,"isPromise",(function(){return y})),n.d(r,"isIterable",(function(){return h})),n.d(r,"isAsyncIterable",(function(){return p})),n.d(r,"isIterator",(function(){return w})),n.d(r,"isFetchResponse",(function(){return g})),n.d(r,"isReadableStream",(function(){return m})),n.d(r,"isWritableStream",(function(){return x})),n.d(r,"toArrayBuffer",(function(){return se})),n.d(r,"getStreamIterator",(function(){return K})),n.d(r,"forEach",(function(){return Ie})),n.d(r,"concatenateAsyncIterator",(function(){return We})),n.d(r,"lineAsyncIterator",(function(){return $e})),n.d(r,"textDecoderAsyncIterator",(function(){return Pe})),n.d(r,"numberedLineAsyncIterator",(function(){return Ee})),n.d(r,"isBrowser",(function(){return B.c})),n.d(r,"isWorker",(function(){return B.d})),n.d(r,"self",(function(){return B.f})),n.d(r,"window",(function(){return B.g})),n.d(r,"global",(function(){return B.b})),n.d(r,"document",(function(){return B.a})),n.d(r,"assert",(function(){return A})),n.d(r,"setPathPrefix",(function(){return u})),n.d(r,"getPathPrefix",(function(){return a})),n.d(r,"resolvePath",(function(){return c})),n.d(r,"_selectLoader",(function(){return ve})),n.d(r,"_WorkerThread",(function(){return de})),n.d(r,"_WorkerFarm",(function(){return pe})),n.d(r,"_WorkerPool",(function(){return ye})),n.d(r,"_fetchProgress",(function(){return Ve})),n.d(r,"_unregisterLoaders",(function(){return z}))},function(e,r,n){"use strict";(function(e,t){n.d(r,"f",(function(){return i})),n.d(r,"g",(function(){return s})),n.d(r,"b",(function(){return u})),n.d(r,"a",(function(){return a})),n.d(r,"c",(function(){return c})),n.d(r,"d",(function(){return f})),n.d(r,"e",(function(){return d}));const o={self:"undefined"!=typeof self&&self,window:"undefined"!=typeof window&&window,global:void 0!==e&&e,document:"undefined"!=typeof document&&document},i=o.self||o.window||o.global,s=o.window||o.self||o.global,u=o.global||o.self||o.window,a=o.document||{},c="object"!=typeof t||"[object process]"!==String(t)||t.browser,f="function"==typeof importScripts,l=void 0!==t&&t.version&&t.version.match(/v([0-9]*)/),d=l&&parseFloat(l[1])||0}).call(this,n(4),n(6))}])}));

@@ -23,3 +23,3 @@ "use strict";

var VERSION = typeof "2.0.3" !== 'undefined' ? "2.0.3" : 'latest';
var VERSION = typeof "2.0.4" !== 'undefined' ? "2.0.4" : 'latest';

@@ -26,0 +26,0 @@ function canParseWithWorker(loader, data, options, context) {

@@ -5,3 +5,3 @@ import { toArrayBuffer } from '../../javascript-utils/binary-utils';

import { parse } from '../parse';
const VERSION = typeof "2.0.3" !== 'undefined' ? "2.0.3" : 'latest';
const VERSION = typeof "2.0.4" !== 'undefined' ? "2.0.4" : 'latest';
export function canParseWithWorker(loader, data, options, context) {

@@ -8,0 +8,0 @@ if (!WorkerFarm.isSupported()) {

@@ -7,3 +7,3 @@ import _regeneratorRuntime from "@babel/runtime/regenerator";

import { parse } from '../parse';
var VERSION = typeof "2.0.3" !== 'undefined' ? "2.0.3" : 'latest';
var VERSION = typeof "2.0.4" !== 'undefined' ? "2.0.4" : 'latest';
export function canParseWithWorker(loader, data, options, context) {

@@ -10,0 +10,0 @@ if (!WorkerFarm.isSupported()) {

{
"name": "@loaders.gl/core",
"version": "2.0.3",
"version": "2.0.4",
"description": "Framework-independent loaders for 3D graphics formats",

@@ -54,5 +54,5 @@ "license": "MIT",

"@babel/runtime": "^7.3.1",
"@loaders.gl/loader-utils": "2.0.3"
"@loaders.gl/loader-utils": "2.0.4"
},
"gitHead": "baa25826f5d67f703a32b2edecc12a4a7d24f673"
"gitHead": "c631425f5a0c9b5a2d92c595bfc4c96334011362"
}

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc