@loaders.gl/scientific 5.0.0-beta.1 → 5.0.0-beta.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -4
- package/dist/hdf5/http-range-reader.d.ts.map +1 -1
- package/dist/hdf5/http-range-reader.js +2 -12
- package/dist/hdf5/http-range-reader.js.map +1 -1
- package/dist/hdf5/index.cjs +2 -11
- package/dist/hdf5/index.cjs.map +2 -2
- package/dist/index.cjs +136 -4152
- package/dist/index.cjs.map +4 -3
- package/dist/index.d.ts +14 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -4
- package/dist/index.js.map +1 -1
- package/dist/lib/parsers/parse-npy.d.ts +15 -0
- package/dist/lib/parsers/parse-npy.d.ts.map +1 -0
- package/dist/lib/parsers/parse-npy.js +81 -0
- package/dist/lib/parsers/parse-npy.js.map +1 -0
- package/dist/netcdf/bundled.cjs +47 -46
- package/dist/netcdf/index.cjs +47 -46
- package/dist/netcdf/index.cjs.map +3 -3
- package/dist/netcdf/index.d.ts +2 -1
- package/dist/netcdf/index.d.ts.map +1 -1
- package/dist/netcdf/index.js +2 -1
- package/dist/netcdf/index.js.map +1 -1
- package/dist/netcdf/netcdf-loader-with-parser.cjs +396 -2
- package/dist/netcdf/netcdf-loader-with-parser.d.ts +10 -0
- package/dist/netcdf/netcdf-loader-with-parser.d.ts.map +1 -1
- package/dist/netcdf/netcdf-loader-with-parser.js +3 -1
- package/dist/netcdf/netcdf-loader-with-parser.js.map +1 -1
- package/dist/netcdf/netcdf-loader.cjs +12 -9
- package/dist/netcdf/netcdf-loader.cjs.map +7 -0
- package/dist/netcdf/netcdf-loader.d.ts +10 -21
- package/dist/netcdf/netcdf-loader.d.ts.map +1 -1
- package/dist/netcdf/netcdf-loader.js +6 -3
- package/dist/netcdf/netcdf-loader.js.map +1 -1
- package/dist/netcdf/netcdf-source-loader.cjs +17 -31
- package/dist/netcdf/netcdf-source-loader.d.ts +2 -20
- package/dist/netcdf/netcdf-source-loader.d.ts.map +1 -1
- package/dist/netcdf/netcdf-source-loader.js +22 -20
- package/dist/netcdf/netcdf-source-loader.js.map +1 -1
- package/dist/netcdf/unbundled.cjs +47 -46
- package/dist/netcdf.dev.js +3097 -2654
- package/dist/netcdf.min.js +4 -4
- package/dist/npy-format.d.ts +12 -0
- package/dist/npy-format.d.ts.map +1 -0
- package/dist/npy-format.js +15 -0
- package/dist/npy-format.js.map +1 -0
- package/dist/{netcdf/netcdf-source-loader-types.cjs → npy-loader-types.cjs} +34 -35
- package/dist/npy-loader-types.cjs.map +7 -0
- package/dist/npy-loader-types.d.ts +53 -0
- package/dist/npy-loader-types.d.ts.map +1 -0
- package/dist/npy-loader-types.js +32 -0
- package/dist/npy-loader-types.js.map +1 -0
- package/dist/npy-loader.cjs +273 -0
- package/dist/npy-loader.cjs.map +6 -0
- package/dist/npy-loader.d.ts +27 -0
- package/dist/npy-loader.d.ts.map +1 -0
- package/dist/npy-loader.js +15 -0
- package/dist/npy-loader.js.map +1 -0
- package/dist/npy-worker.d.ts +2 -0
- package/dist/npy-worker.d.ts.map +1 -0
- package/dist/npy-worker.js +1285 -0
- package/dist/npy-worker.js.map +1 -0
- package/dist/nrrd/parse-nrrd.d.ts +22 -0
- package/dist/nrrd/parse-nrrd.d.ts.map +1 -0
- package/dist/nrrd/parse-nrrd.js +228 -0
- package/dist/nrrd/parse-nrrd.js.map +1 -0
- package/dist/nrrd-loader-types.cjs +58 -0
- package/dist/nrrd-loader-types.cjs.map +7 -0
- package/dist/nrrd-loader-types.d.ts +31 -0
- package/dist/nrrd-loader-types.d.ts.map +1 -0
- package/dist/nrrd-loader-types.js +25 -0
- package/dist/nrrd-loader-types.js.map +1 -0
- package/dist/nrrd-loader.cjs +252 -0
- package/dist/nrrd-loader.cjs.map +6 -0
- package/dist/nrrd-loader.d.ts +16 -0
- package/dist/nrrd-loader.d.ts.map +1 -0
- package/dist/nrrd-loader.js +8 -0
- package/dist/nrrd-loader.js.map +1 -0
- package/dist/vtk/index.cjs +26 -4117
- package/dist/vtk/index.cjs.map +3 -3
- package/dist/vtk/vtk-xml.js +4 -4
- package/dist/vtk/vtk-xml.js.map +1 -1
- package/dist/vtk/vtk.d.ts.map +1 -1
- package/dist/vtk/vtk.js +19 -1
- package/dist/vtk/vtk.js.map +1 -1
- package/dist/vtk-loader-types.cjs +58 -0
- package/dist/vtk-loader-types.cjs.map +7 -0
- package/dist/vtk-loader-types.d.ts +34 -0
- package/dist/vtk-loader-types.d.ts.map +1 -0
- package/dist/vtk-loader-types.js +25 -0
- package/dist/vtk-loader-types.js.map +1 -0
- package/dist/vtk-loader.cjs +384 -0
- package/dist/vtk-loader.cjs.map +6 -0
- package/dist/vtk-loader.d.ts +21 -0
- package/dist/vtk-loader.d.ts.map +1 -0
- package/dist/vtk-loader.js +21 -0
- package/dist/vtk-loader.js.map +1 -0
- package/dist/workers/npy-worker.d.ts +2 -0
- package/dist/workers/npy-worker.d.ts.map +1 -0
- package/dist/workers/npy-worker.js +7 -0
- package/dist/workers/npy-worker.js.map +1 -0
- package/dist/zarr/{geo-zarr-source-loader.d.ts → geo-zarr-loader.d.ts} +9 -9
- package/dist/zarr/geo-zarr-loader.d.ts.map +1 -0
- package/dist/zarr/{geo-zarr-source-loader.js → geo-zarr-loader.js} +167 -48
- package/dist/zarr/geo-zarr-loader.js.map +1 -0
- package/dist/zarr/index.cjs +221 -70
- package/dist/zarr/index.cjs.map +3 -3
- package/dist/zarr/index.d.ts +8 -8
- package/dist/zarr/index.d.ts.map +1 -1
- package/dist/zarr/index.js +4 -4
- package/dist/zarr/index.js.map +1 -1
- package/dist/zarr/lib/spatial-multiscales.d.ts +13 -2
- package/dist/zarr/lib/spatial-multiscales.d.ts.map +1 -1
- package/dist/zarr/lib/spatial-multiscales.js +94 -8
- package/dist/zarr/lib/spatial-multiscales.js.map +1 -1
- package/dist/zarr/{ome-zarr-source-loader.d.ts → ome-zarr-loader.d.ts} +9 -9
- package/dist/zarr/ome-zarr-loader.d.ts.map +1 -0
- package/dist/zarr/{ome-zarr-source-loader.js → ome-zarr-loader.js} +5 -5
- package/dist/zarr/ome-zarr-loader.js.map +1 -0
- package/dist/zarr/{spatial-data-source.d.ts → spatial-data-loader.d.ts} +11 -11
- package/dist/zarr/spatial-data-loader.d.ts.map +1 -0
- package/dist/zarr/{spatial-data-source.js → spatial-data-loader.js} +7 -7
- package/dist/zarr/spatial-data-loader.js.map +1 -0
- package/dist/zarr/{zarr-array-source.d.ts → zarr-array-loader.d.ts} +9 -9
- package/dist/zarr/{zarr-array-source.d.ts.map → zarr-array-loader.d.ts.map} +1 -1
- package/dist/zarr/{zarr-array-source.js → zarr-array-loader.js} +5 -5
- package/dist/zarr/{zarr-array-source.js.map → zarr-array-loader.js.map} +1 -1
- package/dist/zarr/zarr-loader-types.cjs +161 -0
- package/dist/zarr/zarr-loader-types.cjs.map +7 -0
- package/dist/zarr/zarr-loader-types.d.ts +32 -32
- package/dist/zarr/zarr-loader-types.d.ts.map +1 -1
- package/dist/zarr/zarr-loader-types.js +24 -24
- package/dist/zarr/zarr-loader-types.js.map +1 -1
- package/dist/zarr.dev.js +296 -80
- package/dist/zarr.min.js +40 -40
- package/package.json +54 -7
- package/src/hdf5/http-range-reader.ts +3 -11
- package/src/index.ts +27 -16
- package/src/lib/parsers/parse-npy.ts +123 -0
- package/src/netcdf/index.ts +2 -5
- package/src/netcdf/netcdf-loader-with-parser.ts +3 -1
- package/src/netcdf/netcdf-loader.ts +5 -3
- package/src/netcdf/netcdf-source-loader.ts +32 -24
- package/src/npy-format.ts +17 -0
- package/src/npy-loader-types.ts +47 -0
- package/src/npy-loader.ts +21 -0
- package/src/npy-worker.ts +6 -0
- package/src/nrrd/parse-nrrd.ts +267 -0
- package/src/nrrd-loader-types.ts +25 -0
- package/src/nrrd-loader.ts +7 -0
- package/src/vtk/vtk-xml.ts +4 -4
- package/src/vtk/vtk.ts +28 -1
- package/src/vtk-loader-types.ts +25 -0
- package/src/vtk-loader.ts +19 -0
- package/src/workers/npy-worker.ts +8 -0
- package/src/zarr/{geo-zarr-source-loader.ts → geo-zarr-loader.ts} +206 -55
- package/src/zarr/index.ts +17 -17
- package/src/zarr/lib/spatial-multiscales.ts +104 -8
- package/src/zarr/{ome-zarr-source-loader.ts → ome-zarr-loader.ts} +11 -11
- package/src/zarr/{spatial-data-source.ts → spatial-data-loader.ts} +16 -16
- package/src/zarr/{zarr-array-source.ts → zarr-array-loader.ts} +10 -10
- package/src/zarr/zarr-loader-types.ts +35 -35
- package/dist/netcdf/netcdf-source-loader-types.d.ts +0 -28
- package/dist/netcdf/netcdf-source-loader-types.d.ts.map +0 -1
- package/dist/netcdf/netcdf-source-loader-types.js +0 -32
- package/dist/netcdf/netcdf-source-loader-types.js.map +0 -1
- package/dist/zarr/geo-zarr-source-loader.d.ts.map +0 -1
- package/dist/zarr/geo-zarr-source-loader.js.map +0 -1
- package/dist/zarr/ome-zarr-source-loader.d.ts.map +0 -1
- package/dist/zarr/ome-zarr-source-loader.js.map +0 -1
- package/dist/zarr/spatial-data-source.d.ts.map +0 -1
- package/dist/zarr/spatial-data-source.js.map +0 -1
- package/src/netcdf/netcdf-source-loader-types.ts +0 -45
package/dist/netcdf.min.js
CHANGED
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
else if (typeof define === 'function' && define.amd) define([], factory);
|
|
5
5
|
else if (typeof exports === 'object') exports['loaders'] = factory();
|
|
6
6
|
else root['loaders'] = factory();})(globalThis, function () {
|
|
7
|
-
"use strict";var __exports__=(()=>{var Wt=Object.create;var Q=Object.defineProperty;var zt=Object.getOwnPropertyDescriptor;var Vt=Object.getOwnPropertyNames;var Gt=Object.getPrototypeOf,Qt=Object.prototype.hasOwnProperty;var D=(t,e,r)=>()=>{if(r)throw r[0];try{return t&&(e=t(t=0)),e}catch(n){throw r=[n],n}};var Jt=(t,e)=>()=>{try{return e||t((e={exports:{}}).exports,e),e.exports}catch(r){throw e=0,r}},Zt=(t,e)=>{for(var r in e)Q(t,r,{get:e[r],enumerable:!0})},rt=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of Vt(e))!Qt.call(t,s)&&s!==r&&Q(t,s,{get:()=>e[s],enumerable:!(n=zt(e,s))||n.enumerable});return t};var Yt=(t,e,r)=>(r=t!=null?Wt(Gt(t)):{},rt(e||!t||!t.__esModule?Q(r,"default",{value:t,enumerable:!0}):r,t)),Kt=t=>rt(Q({},"__esModule",{value:!0}),t);var st=Jt((Zr,nt)=>{nt.exports=globalThis.loaders});var te,Dt=D(()=>{"use strict";te=class t{buffer;byteLength;byteOffset;length;offset;lastWrittenByte;littleEndian;_data;_mark;_marks;textDecoder=new TextDecoder;textEncoder=new TextEncoder;constructor(e=8192,r={}){let n=!1;typeof e=="number"?e=new ArrayBuffer(e):(n=!0,this.lastWrittenByte=e.byteLength);let s=r.offset?r.offset>>>0:0,o=e.byteLength-s,c=s;(ArrayBuffer.isView(e)||e instanceof t)&&(e.byteLength!==e.buffer.byteLength&&(c=e.byteOffset+s),e=e.buffer),n?this.lastWrittenByte=o:this.lastWrittenByte=0,this.buffer=e,this.length=o,this.byteLength=o,this.byteOffset=c,this.offset=0,this.littleEndian=!0,this._data=new DataView(this.buffer,c,o),this._mark=0,this._marks=[]}available(e=1){return this.offset+e<=this.length}isLittleEndian(){return this.littleEndian}setLittleEndian(){return this.littleEndian=!0,this}isBigEndian(){return!this.littleEndian}setBigEndian(){return this.littleEndian=!1,this}skip(e=1){return this.offset+=e,this}seek(e){return this.offset=e,this}mark(){return this._mark=this.offset,this}reset(){return this.offset=this._mark,this}pushMark(){return this._marks.push(this.offset),this}popMark(){let e=this._marks.pop();if(e===void 0)throw new Error("Mark stack empty");return this.seek(e),this}rewind(){return this.offset=0,this}ensureAvailable(e=1){if(!this.available(e)){let n=(this.offset+e)*2,s=new Uint8Array(n);s.set(new Uint8Array(this.buffer)),this.buffer=s.buffer,this.length=this.byteLength=n,this._data=new DataView(this.buffer)}return this}readBoolean(){return this.readUint8()!==0}readInt8(){return this._data.getInt8(this.offset++)}readUint8(){return this._data.getUint8(this.offset++)}readByte(){return this.readUint8()}readBytes(e=1){let r=new Uint8Array(e);for(let n=0;n<e;n++)r[n]=this.readByte();return r}readInt16(){let e=this._data.getInt16(this.offset,this.littleEndian);return this.offset+=2,e}readUint16(){let e=this._data.getUint16(this.offset,this.littleEndian);return this.offset+=2,e}readInt32(){let e=this._data.getInt32(this.offset,this.littleEndian);return this.offset+=4,e}readUint32(){let e=this._data.getUint32(this.offset,this.littleEndian);return this.offset+=4,e}readFloat32(){let e=this._data.getFloat32(this.offset,this.littleEndian);return this.offset+=4,e}readFloat64(){let e=this._data.getFloat64(this.offset,this.littleEndian);return this.offset+=8,e}readChar(){return String.fromCharCode(this.readInt8())}readChars(e=1){let r="";for(let n=0;n<e;n++)r+=this.readChar();return r}readUtf8(e=1){return this.textDecoder.decode(this.readBytes(e))}writeBoolean(e){return this.writeUint8(e?255:0),this}writeInt8(e){return this.ensureAvailable(1),this._data.setInt8(this.offset++,e),this._updateLastWrittenByte(),this}writeUint8(e){return this.ensureAvailable(1),this._data.setUint8(this.offset++,e),this._updateLastWrittenByte(),this}writeByte(e){return this.writeUint8(e)}writeBytes(e){this.ensureAvailable(e.length);for(let r=0;r<e.length;r++)this._data.setUint8(this.offset++,e[r]);return this._updateLastWrittenByte(),this}writeInt16(e){return this.ensureAvailable(2),this._data.setInt16(this.offset,e,this.littleEndian),this.offset+=2,this._updateLastWrittenByte(),this}writeUint16(e){return this.ensureAvailable(2),this._data.setUint16(this.offset,e,this.littleEndian),this.offset+=2,this._updateLastWrittenByte(),this}writeInt32(e){return this.ensureAvailable(4),this._data.setInt32(this.offset,e,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeUint32(e){return this.ensureAvailable(4),this._data.setUint32(this.offset,e,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeFloat32(e){return this.ensureAvailable(4),this._data.setFloat32(this.offset,e,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeFloat64(e){return this.ensureAvailable(8),this._data.setFloat64(this.offset,e,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeChar(e){return this.writeUint8(e.charCodeAt(0))}writeChars(e){for(let r=0;r<e.length;r++)this.writeUint8(e.charCodeAt(r));return this}writeUtf8(e){let r=this.textEncoder.encode(e);return this.writeBytes(r)}toArray(){return new Uint8Array(this.buffer,this.byteOffset,this.lastWrittenByte)}_updateLastWrittenByte(){this.offset>this.lastWrittenByte&&(this.lastWrittenByte=this.offset)}}});function V(t,e,r){switch(e){case m.BYTE:return t.readBytes(r);case m.CHAR:return Br(t.readChars(r));case m.SHORT:return re(r,t.readInt16.bind(t));case m.INT:return re(r,t.readInt32.bind(t));case m.FLOAT:return re(r,t.readFloat32.bind(t));case m.DOUBLE:return re(r,t.readFloat64.bind(t));default:throw new Error(`NetCDF: non valid type ${e}`)}}function Ve(t){switch(Number(t)){case m.BYTE:return"byte";case m.CHAR:return"char";case m.SHORT:return"short";case m.INT:return"int";case m.FLOAT:return"float";case m.DOUBLE:return"double";default:return"undefined"}}function It(t){switch(Number(t)){case m.BYTE:return 1;case m.CHAR:return 1;case m.SHORT:return 2;case m.INT:return 4;case m.FLOAT:return 4;case m.DOUBLE:return 8;default:return-1}}function Ge(t){switch(String(t)){case"byte":return m.BYTE;case"char":return m.CHAR;case"short":return m.SHORT;case"int":return m.INT;case"float":return m.FLOAT;case"double":return m.DOUBLE;default:return-1}}function re(t,e){if(t!==1){let r=new Array(t);for(let n=0;n<t;n++)r[n]=e();return r}return e()}function Br(t){return t.charCodeAt(t.length-1)===0?t.substring(0,t.length-1):t}var m,Qe=D(()=>{"use strict";m={BYTE:1,CHAR:2,SHORT:3,INT:4,FLOAT:5,DOUBLE:6}});function Ut(t,e){let r=t.readUint32(),n=Dr(t),s=Pt(t),o=Ir(t,n.recordId,e);return{version:e,recordDimension:{length:r,id:n.recordId,name:n.recordName,recordStep:o.recordStep},dimensions:n.dimensions,variables:o.variables,attributes:s}}function Dr(t){let e=t.readUint32();if(e===k){if(t.readUint32()!==k)throw new Error("NetCDF: wrong empty tag for list of dimensions");return{recordId:0,recordName:"",dimensions:[]}}if(e!==Nr)throw new Error("NetCDF: wrong tag for list of dimensions");let r=t.readUint32(),n=new Array(r),s,o;for(let c=0;c<r;c++){let d=Je(t),h=t.readUint32();h===Fr&&(s=c,o=d),n[c]={name:d,size:h}}return{dimensions:n,recordId:s,recordName:o}}function Pt(t){let e=t.readUint32();if(e===k){if(t.readUint32()!==k)throw new Error("NetCDF: wrong empty tag for list of attributes");return[]}if(e!==Lr)throw new Error("NetCDF: wrong tag for list of attributes");let r=t.readUint32(),n=new Array(r);for(let s=0;s<r;s++){let o=Je(t),c=t.readUint32();if(c<1||c>6)throw new Error(`NetCDF: non valid type ${c}`);let d=t.readUint32(),h=V(t,c,d);Ot(t),n[s]={name:o,type:Ve(c),value:h}}return n}function Ir(t,e,r){let n=t.readUint32(),s=0;if(n===k){if(t.readUint32()!==k)throw new Error("NetCDF: wrong empty tag for list of variables");return{recordStep:s,variables:[]}}if(n!==vr)throw new Error("NetCDF: wrong tag for list of variables");let o=t.readUint32(),c=new Array(o);for(let d=0;d<o;d++){let h=Je(t),a=t.readUint32(),l=new Array(a);for(let w=0;w<a;w++)l[w]=t.readUint32();let f=Pt(t),u=t.readUint32();if(u<1&&u>6)throw new Error(`NetCDF: non valid type ${u}`);let g=t.readUint32(),p=t.readUint32();if(r===2){if(p>0)throw new Error("NetCDF: offsets larger than 4GB not supported");p=t.readUint32()}let b=!1;typeof e<"u"&&l[0]===e&&(s+=g,b=!0),c[d]={name:h,dimensions:l,attributes:f,type:Ve(u),size:g,offset:p,record:b}}return{variables:c,recordStep:s}}function Je(t){let e=t.readUint32(),r=t.readChars(e);return Ot(t),r}function Ot(t){t.offset%4!==0&&t.skip(4-t.offset%4)}var k,Nr,vr,Lr,Fr,kt=D(()=>{"use strict";Qe();k=0,Nr=10,vr=11,Lr=12,Fr=0});function jt(t,e){let r=Ge(e.type),n=e.size/It(r),s=new Array(n);for(let o=0;o<n;o++)s[o]=V(t,r,1);return s}function $t(t,e,r,n){let s=Ge(e.type),o=e.dimensions.filter(a=>a!==r.id).reduce((a,l)=>a*n[l].size,1),c=r.length,d=new Array(c),h=r.recordStep;for(let a=0;a<c;a++){let l=t.offset;d[a]=V(t,s,o),t.seek(l+h)}return d}var Ht=D(()=>{"use strict";Qe()});var A,Ze=D(()=>{"use strict";Dt();kt();Ht();A=class{header;buffer;constructor(e){let r=new te(e);r.setBigEndian();let n=r.readChars(3);if(n!=="CDF")throw new Error(`NetCDF: file should start with 'CDF', found ${n}`);let s=r.readByte();if(s>2)throw new Error(`NetCDF: unsupported version ${s}`);this.header=Ut(r,s),this.buffer=r}get version(){return this.header.version===1?"classic format":"64-bit offset format"}get recordDimension(){return this.header.recordDimension}get dimensions(){return this.header.dimensions}get attributes(){return this.header.attributes}get variables(){return this.header.variables}attributeExists(e){return this.attributes.find(n=>n.name===e)!==void 0}getAttribute(e){let r=this.attributes.find(n=>n.name===e);return r?r.value:null}dataVariableExists(e){return this.header.variables.find(function(n){return n.name===e})!==void 0}getDataVariableAsString(e){let r=this.getDataVariable(e);return r?r.join(""):null}getDataVariable(e){let r;if(typeof e=="string"?r=this.header.variables.find(function(n){return n.name===e}):r=e,r===void 0){let n;throw typeof e=="string"?n=e:typeof e=="object"&&(n=JSON.stringify(e)),new Error(`NetCDF: variable not found: ${n}`)}return this.buffer.seek(r.offset),r.record?$t(this.buffer,r,this.header.recordDimension,this.header.dimensions):jt(this.buffer,r)}toString(){let e=[];e.push("DIMENSIONS");for(let n of this.dimensions)e.push(` ${n.name.padEnd(30)} = size: ${n.size}`);e.push(""),e.push("GLOBAL ATTRIBUTES");for(let n of this.attributes)e.push(` ${n.name.padEnd(30)} = ${n.value}`);let r=JSON.parse(JSON.stringify(this.variables));e.push(""),e.push("VARIABLES:");for(let n of r){n.value=this.getDataVariable(n);let s=JSON.stringify(n.value);s.length>50&&(s=s.substring(0,50)),Number.isNaN(n.value.length)||(s+=` (length: ${n.value.length})`),e.push(` ${n.name.padEnd(30)} = ${s}`)}return e.join(`
|
|
8
|
-
`)}}});var G,Ye=D(()=>{"use strict";G={name:"NetCDF",id:"netcdf",module:"netcdf",encoding:"binary",format:"netcdf",extensions:["cdf","nc"],mimeTypes:["application/x-netcdf"],binary:!0}});var Qr={};Zt(Qr,{FetchError:()=>i.FetchError,JSONLoader:()=>He,NetCDFFormat:()=>G,NetCDFReader:()=>A,NetCDFSourceLoader:()=>se,NullLoader:()=>i.NullLoader,NullWorkerLoader:()=>i.NullWorkerLoader,RequestScheduler:()=>O,_BrowserFileSystem:()=>i._BrowserFileSystem,_fetchProgress:()=>i._fetchProgress,_selectSource:()=>i._selectSource,_unregisterLoaders:()=>i._unregisterLoaders,assert:()=>ae,concatenateArrayBuffersAsync:()=>De,coreApi:()=>i.coreApi,createDataSource:()=>i.createDataSource,document:()=>le,encode:()=>i.encode,encodeInBatches:()=>i.encodeInBatches,encodeSync:()=>i.encodeSync,encodeTable:()=>i.encodeTable,encodeTableAsText:()=>i.encodeTableAsText,encodeTableInBatches:()=>i.encodeTableInBatches,encodeText:()=>i.encodeText,encodeTextSync:()=>i.encodeTextSync,encodeURLtoURL:()=>i.encodeURLtoURL,fetchFile:()=>i.fetchFile,forEach:()=>Fe,getLoaderOptions:()=>i.getLoaderOptions,getPathPrefix:()=>$e,global:()=>fe,isAsyncIterable:()=>Ae,isBrowser:()=>de,isIterable:()=>Ee,isIterator:()=>Se,isPromise:()=>Te,isPureObject:()=>q,isReadableStream:()=>Re,isResponse:()=>_e,isWorker:()=>he,isWritableStream:()=>Ce,load:()=>i.load,loadInBatches:()=>i.loadInBatches,makeIterator:()=>i.makeIterator,makeLineIterator:()=>ve,makeNumberedLineIterator:()=>Le,makeStream:()=>i.makeStream,makeTextDecoderIterator:()=>Be,makeTextEncoderIterator:()=>Ne,parse:()=>i.parse,parseFile:()=>i.parseFile,parseInBatches:()=>i.parseInBatches,parseSync:()=>i.parseSync,preload:()=>i.preload,preloadSync:()=>i.preloadSync,readArrayBuffer:()=>i.readArrayBuffer,registerLoaders:()=>i.registerLoaders,resolvePath:()=>W,selectLoader:()=>i.selectLoader,selectLoaderSync:()=>i.selectLoaderSync,self:()=>ce,setLoaderOptions:()=>i.setLoaderOptions,setPathPrefix:()=>je,window:()=>ue});var i=Yt(st(),1);function ae(t,e){if(!t)throw new Error(e||"loader assertion failed.")}var T={self:typeof self<"u"&&self,window:typeof window<"u"&&window,global:typeof global<"u"&&global,document:typeof document<"u"&&document},ce=T.self||T.window||T.global||{},ue=T.window||T.self||T.global||{},fe=T.global||T.self||T.window||{},le=T.document||{};var de=!!(typeof process!="object"||String(process)!=="[object process]"||process.browser),he=typeof importScripts=="function",ot=typeof process<"u"&&process.version&&/v([0-9]*)/.exec(process.version),Xt=ot&&parseFloat(ot[1])||0;var j=globalThis,er=globalThis.document||{},J=globalThis.process||{},tr=globalThis.console,rr=globalThis.navigator||{};function Z(t){if(typeof window<"u"&&window.process?.type==="renderer"||typeof process<"u"&&process.versions?.electron)return!0;let e=typeof navigator<"u"&&navigator.userAgent,r=t||e;return!!(r&&r.indexOf("Electron")>=0)}function R(){return!(typeof process=="object"&&String(process)==="[object process]"&&!process?.browser)||Z()}var me="5.0.0";function I(t,e){if(!t)throw new Error(e||"Assertion failed")}function Y(t){if(!t)return 0;let e;switch(typeof t){case"number":e=t;break;case"object":e=t.logLevel||t.priority||0;break;default:return 0}return I(Number.isFinite(e)&&e>=0),e}function pe(t){let{logLevel:e,message:r}=t;t.logLevel=Y(e);let n=t.args?Array.from(t.args):[];for(;n.length&&n.shift()!==r;);switch(typeof e){case"string":case"function":r!==void 0&&n.unshift(r),t.message=e;break;case"object":Object.assign(t,e);break;default:}typeof t.message=="function"&&(t.message=t.message());let s=typeof t.message;return I(s==="string"||s==="object"),Object.assign(t,{args:n},t.opts)}var C=()=>{},v=class{constructor({level:e=0}={}){this.userData={},this._onceCache=new Set,this._level=e}set level(e){this.setLevel(e)}get level(){return this.getLevel()}setLevel(e){return this._level=e,this}getLevel(){return this._level}warn(e,...r){return this._log("warn",0,e,r,{once:!0})}error(e,...r){return this._log("error",0,e,r)}log(e,r,...n){return this._log("log",e,r,n)}info(e,r,...n){return this._log("info",e,r,n)}once(e,r,...n){return this._log("once",e,r,n,{once:!0})}_log(e,r,n,s,o={}){let c=pe({logLevel:r,message:n,args:this._buildArgs(r,n,s),opts:o});return this._createLogFunction(e,c,o)}_buildArgs(e,r,n){return[e,r,...n]}_createLogFunction(e,r,n){if(!this._shouldLog(r.logLevel))return C;let s=this._getOnceTag(n.tag??r.tag??r.message);if((n.once||r.once)&&s!==void 0){if(this._onceCache.has(s))return C;this._onceCache.add(s)}return this._emit(e,r)}_shouldLog(e){return this.getLevel()>=Y(e)}_getOnceTag(e){if(e!==void 0)try{return typeof e=="string"?e:String(e)}catch{return}}};function sr(t){try{let e=window[t],r="__storage_test__";return e.setItem(r,r),e.removeItem(r),e}catch{return null}}var $=class{constructor(e,r,n="sessionStorage"){this.storage=sr(n),this.id=e,this.config=r,this._loadConfiguration()}getConfiguration(){return this.config}setConfiguration(e){if(Object.assign(this.config,e),this.storage){let r=JSON.stringify(this.config);this.storage.setItem(this.id,r)}}_loadConfiguration(){let e={};if(this.storage){let r=this.storage.getItem(this.id);e=r?JSON.parse(r):{}}return Object.assign(this.config,e),this}};function it(t){let e;return t<10?e=`${t.toFixed(2)}ms`:t<100?e=`${t.toFixed(1)}ms`:t<1e3?e=`${t.toFixed(0)}ms`:e=`${(t/1e3).toFixed(2)}s`,e}function ge(t,e=8){let r=Math.max(e-t.length,0);return`${" ".repeat(r)}${t}`}var H;(function(t){t[t.BLACK=30]="BLACK",t[t.RED=31]="RED",t[t.GREEN=32]="GREEN",t[t.YELLOW=33]="YELLOW",t[t.BLUE=34]="BLUE",t[t.MAGENTA=35]="MAGENTA",t[t.CYAN=36]="CYAN",t[t.WHITE=37]="WHITE",t[t.BRIGHT_BLACK=90]="BRIGHT_BLACK",t[t.BRIGHT_RED=91]="BRIGHT_RED",t[t.BRIGHT_GREEN=92]="BRIGHT_GREEN",t[t.BRIGHT_YELLOW=93]="BRIGHT_YELLOW",t[t.BRIGHT_BLUE=94]="BRIGHT_BLUE",t[t.BRIGHT_MAGENTA=95]="BRIGHT_MAGENTA",t[t.BRIGHT_CYAN=96]="BRIGHT_CYAN",t[t.BRIGHT_WHITE=97]="BRIGHT_WHITE"})(H||(H={}));var or=10;function at(t){return typeof t!="string"?t:(t=t.toUpperCase(),H[t]||H.WHITE)}function ye(t,e,r){return!R&&typeof t=="string"&&(e&&(t=`\x1B[${at(e)}m${t}\x1B[39m`),r&&(t=`\x1B[${at(r)+or}m${t}\x1B[49m`)),t}function be(t,e=["constructor"]){let r=Object.getPrototypeOf(t),n=Object.getOwnPropertyNames(r),s=t;for(let o of n){let c=s[o];typeof c=="function"&&(e.find(d=>o===d)||(s[o]=c.bind(t)))}}var K=class{getHighResolutionTimer(){let e;if(R()&&j.performance)e=j?.performance?.now?.();else if("hrtime"in J){let r=J?.hrtime?.();e=r[0]*1e3+r[1]/1e6}else e=Date.now();return e}getMemoryUsageMB(){let r=j?.performance?.memory?.usedJSHeapSize;return r==null?null:Math.trunc(r/1024/1024)}},x=new K;globalThis.Probe=K;globalThis.probe=x;var U={debug:R()&&console.debug||console.log,log:console.log,info:console.info,warn:console.warn,error:console.error},we={enabled:!0,level:0},E=class extends v{constructor({id:e}={id:""}){super({level:0}),this.VERSION=me,this._startTs=x.getHighResolutionTimer(),this._deltaTs=x.getHighResolutionTimer(),this.userData={},this.LOG_THROTTLE_TIMEOUT=0,this.id=e,this.userData={},this._storage=new $(`__probe-${this.id}__`,{[this.id]:we}),this.timeStamp(`${this.id} started`),be(this),Object.seal(this)}isEnabled(){return this._getConfiguration().enabled}getLevel(){return this._getConfiguration().level}getTotal(){return Number((x.getHighResolutionTimer()-this._startTs).toPrecision(10))}getDelta(){return Number((x.getHighResolutionTimer()-this._deltaTs).toPrecision(10))}set priority(e){this.level=e}get priority(){return this.level}getPriority(){return this.level}enable(e=!0){return this._updateConfiguration({enabled:e}),this}setLevel(e){return this._updateConfiguration({level:e}),this}get(e){return this._getConfiguration()[e]}set(e,r){this._updateConfiguration({[e]:r})}settings(){console.table?console.table(this._storage.config):console.log(this._storage.config)}assert(e,r){if(!e)throw new Error(r||"Assertion failed")}warn(e,...r){return this._log("warn",0,e,r,{method:U.warn,once:!0})}error(e,...r){return this._log("error",0,e,r,{method:U.error})}deprecated(e,r){return this.warn(`\`${e}\` is deprecated and will be removed in a later version. Use \`${r}\` instead`)}removed(e,r){return this.error(`\`${e}\` has been removed. Use \`${r}\` instead`)}probe(e,r,...n){let s=x.getMemoryUsageMB();if(s!==null){let o=`${s}MB `;typeof r=="function"?r=()=>`${o}${r()}`:typeof r=="string"&&(r=`${o}${r}`)}return this._log("log",e,r,n,{method:U.log,time:!0,once:!0})}log(e,r,...n){return this._log("log",e,r,n,{method:U.debug})}info(e,r,...n){return this._log("info",e,r,n,{method:console.info})}once(e,r,...n){return this._log("once",e,r,n,{method:U.debug||U.info,once:!0})}table(e,r,n){return r?this._log("table",e,r,n&&[n]||[],{method:console.table||C,tag:ar(r)}):C}time(e,r){return this._log("time",e,r,[],{method:console.time?console.time:console.info})}timeEnd(e,r){return this._log("time",e,r,[],{method:console.timeEnd?console.timeEnd:console.info})}timeStamp(e,r){return this._log("time",e,r,[],{method:console.timeStamp||C})}group(e,r,n={collapsed:!1}){let s=(n.collapsed?console.groupCollapsed:console.group)||console.info;return this._log("group",e,r,[],{method:s})}groupCollapsed(e,r,n={}){return this.group(e,r,Object.assign({},n,{collapsed:!0}))}groupEnd(e){return this._log("groupEnd",e,"",[],{method:console.groupEnd||C})}withGroup(e,r,n){this.group(e,r)();try{n()}finally{this.groupEnd(e)()}}trace(){console.trace&&console.trace()}_shouldLog(e){return this.isEnabled()&&super._shouldLog(e)}_emit(e,r){let n=r.method;I(n),r.total=this.getTotal(),r.delta=this.getDelta(),this._deltaTs=x.getHighResolutionTimer();let s=ir(this.id,r.message,r);return n.bind(console,s,...r.args)}_getConfiguration(){return this._storage.config[this.id]||this._updateConfiguration(we),this._storage.config[this.id]}_updateConfiguration(e){let r=this._storage.config[this.id]||{...we};this._storage.setConfiguration({[this.id]:{...r,...e}})}};E.VERSION=me;function ir(t,e,r){if(typeof e=="string"){let n=r.time?ge(it(r.total)):"";e=r.time?`${t}: ${n} ${e}`:`${t}: ${e}`,e=ye(e,r.color,r.background)}return e}function ar(t){for(let e in t)for(let r in t[e])return r||"untitled";return"empty"}globalThis.probe||(globalThis.probe=x);var Xn=new E({id:"@probe.gl/log"});var xe="5.0.0-beta.1",cr=xe[0]>="0"&&xe[0]<="9"?`v${xe}`:"";function ur(){let t=new E({id:"loaders.gl"});return globalThis.loaders||={},globalThis.loaders.log=t,globalThis.loaders.version=cr,globalThis.probe||={},globalThis.probe.loaders=t,t}var ct=ur();var ut=t=>typeof t=="boolean",y=t=>typeof t=="function",B=t=>t!==null&&typeof t=="object",q=t=>B(t)&&t.constructor==={}.constructor;var Te=t=>B(t)&&"then"in t&&y(t.then),Ee=t=>!!t&&y(t[Symbol.iterator]),Ae=t=>!!t&&y(t[Symbol.asyncIterator]),Se=t=>!!t&&y(t.next),_e=t=>typeof Response<"u"&&t instanceof Response||B(t)&&y(t.arrayBuffer)&&y(t.text)&&y(t.json);var ft=t=>B(t)&&y(t.abort)&&y(t.getWriter),lt=t=>typeof ReadableStream<"u"&&t instanceof ReadableStream||B(t)&&y(t.tee)&&y(t.cancel)&&y(t.getReader),dt=t=>B(t)&&y(t.end)&&y(t.write)&&ut(t.writable),ht=t=>B(t)&&y(t.read)&&y(t.pipe)&&ut(t.readable),Re=t=>lt(t)||ht(t),Ce=t=>ft(t)||dt(t);function X(t,e){return mt(t||{},e)}function mt(t,e,r=0){if(r>3)return e;let n={...t};for(let[s,o]of Object.entries(e))q(o)?n[s]=mt(n[s]||{},e[s],r+1):n[s]=e[s];return n}function pt(...t){return fr(t)}function fr(t){let e=t.map(o=>o instanceof ArrayBuffer?new Uint8Array(o):o),r=e.reduce((o,c)=>o+c.byteLength,0),n=new Uint8Array(r),s=0;for(let o of e)n.set(o,s),s+=o.byteLength;return n.buffer}async function*Be(t,e={}){let r=new TextDecoder(void 0,e);for await(let n of t)yield typeof n=="string"?n:r.decode(n,{stream:!0})}async function*Ne(t){let e=new TextEncoder;for await(let r of t)yield typeof r=="string"?e.encode(r).buffer:r}async function*ve(t){let e="";for await(let r of t){e+=r;let n;for(n=e.indexOf(`
|
|
9
|
-
`);n>=0;){let s=e.slice(0,n+1);e=e.slice(n+1),yield s,n=e.indexOf(`
|
|
10
|
-
`)}}e.length>0&&(yield e)}async function*Le(t){let e=1;for await(let r of t)yield{counter:e,line:r},e++}async function Fe(t,e){let r=dr(t);for(;;){let{done:n,value:s}=await r.next();if(n){r.return&&r.return();return}if(e(s))return}}async function De(t){let e=[];for await(let r of t)e.push(lr(r));return pt(...e)}function lr(t){if(t instanceof ArrayBuffer)return t;if(ArrayBuffer.isView(t)){let{buffer:e,byteOffset:r,byteLength:n}=t;return gt(e,r,n)}return gt(t)}function gt(t,e=0,r=t.byteLength-e){let n=new Uint8Array(t,e,r),s=new Uint8Array(n.length);return s.set(n),s.buffer}function dr(t){if(typeof t[Symbol.asyncIterator]=="function")return t[Symbol.asyncIterator]();if(typeof t[Symbol.iterator]=="function"){let e=t[Symbol.iterator]();return hr(e)}return t}function hr(t){return{next(e){return Promise.resolve(t.next(e))},return(e){return typeof t.return=="function"?Promise.resolve(t.return(e)):Promise.resolve({done:!0,value:e})},throw(e){return typeof t.throw=="function"?Promise.resolve(t.throw(e)):Promise.reject(e)}}}function M(){let t;if(typeof window<"u"&&window.performance)t=window.performance.now();else if(typeof process<"u"&&process.hrtime){let e=process.hrtime();t=e[0]*1e3+e[1]/1e6}else t=Date.now();return t}var L=class{constructor(e,r){this.sampleSize=1,this.time=0,this.count=0,this.samples=0,this.lastTiming=0,this.lastSampleTime=0,this.lastSampleCount=0,this._count=0,this._time=0,this._samples=0,this._startTime=0,this._timerPending=!1,this.name=e,this.type=r,this.reset()}reset(){return this.time=0,this.count=0,this.samples=0,this.lastTiming=0,this.lastSampleTime=0,this.lastSampleCount=0,this._count=0,this._time=0,this._samples=0,this._startTime=0,this._timerPending=!1,this}setSampleSize(e){return this.sampleSize=e,this}incrementCount(){return this.addCount(1),this}decrementCount(){return this.subtractCount(1),this}addCount(e){return this._count+=e,this._samples++,this._checkSampling(),this}subtractCount(e){return this._count-=e,this._samples++,this._checkSampling(),this}addTime(e){return this._time+=e,this.lastTiming=e,this._samples++,this._checkSampling(),this}timeStart(){return this._startTime=M(),this._timerPending=!0,this}timeEnd(){return this._timerPending?(this.addTime(M()-this._startTime),this._timerPending=!1,this._checkSampling(),this):this}getSampleAverageCount(){return this.sampleSize>0?this.lastSampleCount/this.sampleSize:0}getSampleAverageTime(){return this.sampleSize>0?this.lastSampleTime/this.sampleSize:0}getSampleHz(){return this.lastSampleTime>0?this.sampleSize/(this.lastSampleTime/1e3):0}getAverageCount(){return this.samples>0?this.count/this.samples:0}getAverageTime(){return this.samples>0?this.time/this.samples:0}getHz(){return this.time>0?this.samples/(this.time/1e3):0}_checkSampling(){this._samples===this.sampleSize&&(this.lastSampleTime=this._time,this.lastSampleCount=this._count,this.count+=this._count,this.time+=this._time,this.samples+=this._samples,this._time=0,this._count=0,this._samples=0)}};var P=class{constructor(e){this.stats={},this.id=e.id,this.stats={},this._initializeStats(e.stats),Object.seal(this)}get(e,r="count"){return this._getOrCreate({name:e,type:r})}get size(){return Object.keys(this.stats).length}reset(){for(let e of Object.values(this.stats))e.reset();return this}forEach(e){for(let r of Object.values(this.stats))e(r)}getTable(){let e={};return this.forEach(r=>{e[r.name]={time:r.time||0,count:r.count||0,average:r.getAverageTime()||0,hz:r.getHz()||0}}),e}_initializeStats(e=[]){e.forEach(r=>this._getOrCreate(r))}_getOrCreate(e){let{name:r,type:n}=e,s=this.stats[r];return s||(e instanceof L?s=e:s=new L(r,n),this.stats[r]=s),s}};var mr="Queued Requests",pr="Active Requests",gr="Cancelled Requests",yr="Queued Requests Ever",br="Active Requests Ever",wr={id:"request-scheduler",throttleRequests:!0,maxRequests:6,debounceTime:0},O=class{props;stats;activeRequestCount=0;requestQueue=[];requestMap=new Map;updateTimer=null;constructor(e={}){this.props={...wr,...e},this.stats=new P({id:this.props.id}),this.stats.get(mr),this.stats.get(pr),this.stats.get(gr),this.stats.get(yr),this.stats.get(br)}setProps(e){e.throttleRequests!==void 0&&(this.props.throttleRequests=e.throttleRequests),e.maxRequests!==void 0&&(this.props.maxRequests=e.maxRequests),e.debounceTime!==void 0&&(this.props.debounceTime=e.debounceTime)}scheduleRequest(e,r=()=>0){if(!this.props.throttleRequests)return Promise.resolve({done:()=>{}});if(this.requestMap.has(e))return this.requestMap.get(e);let n={handle:e,priority:0,getPriority:r},s=new Promise(o=>(n.resolve=o,n));return this.requestQueue.push(n),this.requestMap.set(e,s),this._issueNewRequests(),s}_issueRequest(e){let{handle:r,resolve:n}=e,s=!1,o=()=>{s||(s=!0,this.requestMap.delete(r),this.activeRequestCount--,this.scheduleRefill())};return this.activeRequestCount++,n?n({done:o}):Promise.resolve({done:o})}scheduleRefill(){this.updateTimer===null&&(this.updateTimer=setTimeout(()=>this._issueNewRequestsAsync(),0))}_issueNewRequests(){this.updateTimer!==null&&clearTimeout(this.updateTimer),this.updateTimer=setTimeout(()=>this._issueNewRequestsAsync(),this.props.debounceTime)}_issueNewRequestsAsync(){this.updateTimer!==null&&clearTimeout(this.updateTimer),this.updateTimer=null;let e=Math.max(this.props.maxRequests-this.activeRequestCount,0);if(e!==0){this._updateAllRequests();for(let r=0;r<e;++r){let n=this.requestQueue.shift();n&&this._issueRequest(n)}}}_updateAllRequests(){let e=this.requestQueue;for(let r=0;r<e.length;++r){let n=e[r];this._updateRequest(n)||(e.splice(r,1),this.requestMap.delete(n.handle),r--)}e.sort((r,n)=>r.priority-n.priority)}_updateRequest(e){return e.priority=e.getPriority(e.handle),e.priority<0?(e.resolve(null),!1):!0}};function Ue(t,e=[]){return t.every(Ie)?t:t.map((r,n)=>{if(Ie(r))return r;let s=e.find(c=>c.type===r?.type);if(!s)throw new Error(`No authentication class registered for credential at index ${n}.`);let o;try{o=new s(r)}catch{throw new Error(`Invalid authentication configuration at index ${n}.`)}if(!Ie(o))throw new Error(`Authentication class returned an invalid credential at index ${n}.`);return o})}function Pe(t){if(!t.core?.credentials?.length)return t;let e=Ue(t.core.credentials,t.core.authentications);return e===t.core.credentials?t:{...t,core:{...t.core,credentials:e}}}function Ie(t){return!t||typeof t!="object"||typeof t.id!="string"||!Array.isArray(t.origins)?!1:t.type==="request"?typeof t.authenticate=="function":(t.type==="header"||t.type==="query-parameter")&&typeof t.name=="string"&&(typeof t.token=="string"||typeof t.token=="function")&&Array.isArray(t.refreshStatusCodes)}var yt=Symbol("loaders.gl.authenticated-fetch"),Oe=new WeakMap;function xr(t){let e=t.fetch||((f,u)=>fetch(f,u)),r=e[yt],n=new Map(r?.credentialResolutions),s=Ue(t.credentials.map(f=>n.get(f)||f),t.authentications);if(t.credentials.forEach((f,u)=>{n.set(f,s[u])}),!t.fetchOptions&&(!s.length||r?.credentials.length===s.length&&s.every((f,u)=>f===r.credentials[u])))return e;let o=r?.fetch||e,c=r?[...new Set([...s,...r.credentials])]:s,d=bt(r?.fetchOptions||{},t.fetchOptions),h=c.filter(f=>f.type!=="request"),a=c.filter(f=>f.type==="request");for(let f of a)At(f.origins);let l=async(f,u={})=>{if(u=bt(d,u),u.signal?.throwIfAborted(),!c.length)return o(f,u);let g=Ar(f),p=g?await xt(g,u,h):{url:f,options:u,credentials:[]},b=await wt(p,a,"request"),w=await o(b.url,b.options),oe=[];for(let N of p.credentials){let{credential:_}=N;typeof _.token=="function"&&(ee(u)||_.canReplayRequest?.(f,u))&&(ee(b.options)||_.canReplayRequest?.(b.url,b.options))&&(_.refreshStatusCodes.includes(w.status)||await _.shouldRefresh?.(w))&&oe.push(N)}let et=ee(u)&&ee(b.options)&&b.credentials.some(N=>N.refreshStatusCodes?.includes(w.status));if(!oe.length&&!et)return w;u.signal?.throwIfAborted();let ie=new Map;if(await Promise.all(oe.map(async({credential:N})=>{let _=await Tr(N,f,w);_&&ie.set(N,_)})),!ie.size&&!et)return w;await w.body?.cancel().catch(()=>{}),u.signal?.throwIfAborted();let Mt=g?await xt(g,u,h,ie,p.credentials):{url:f,options:u},tt=await wt(Mt,a,"retry",w);return o(tt.url,tt.options)};return Object.defineProperty(l,yt,{value:{fetch:o,credentials:c,credentialResolutions:n,fetchOptions:d}}),l}function Tt(t={}){let e=t.fetch??t.core?.fetch,r;typeof e=="function"?r=e:r=(s,o)=>fetch(s,o);let n=typeof e=="object"&&e?e:void 0;return xr({fetch:r,fetchOptions:t.signal?{...n,signal:t.signal}:n,credentials:t.core?.credentials||[],authentications:t.core?.authentications})}function bt(t,e){let r={...t,...e};if(t.headers||e?.headers){let n=new Headers(t.headers);new Headers(e?.headers).forEach((s,o)=>n.set(o,s)),r.headers=n}return r}async function wt(t,e,r,n){let s=[],o=t.options.signal;for(let c of e){let d=Et(t.url);if(!d||!At(c.origins).includes(d))continue;o?.throwIfAborted();let h=await c.authenticate({url:t.url,options:{...t.options,headers:new Headers(t.options.headers)},reason:r,response:n?{status:n.status,headers:new Headers(n.headers)}:void 0});if(!h||typeof h.url!="string"||!h.options||typeof h.options!="object")throw new Error("Authentication callback returned an invalid request.");t={url:h.url,options:{...h.options,...o?{signal:o}:{}}},s.push(c)}return o?.throwIfAborted(),{...t,credentials:s}}function Et(t){try{let e=new URL(t);return!e.host||e.username||e.password?null:e.origin!=="null"?e.origin:`${e.protocol}//${e.host}`}catch{return null}}function At(t){if(!t.length)throw new Error("Request authentication requires at least one exact origin.");return t.map(e=>{let r=Et(e),n;try{n=new URL(e)}catch{throw new Error("Invalid request authentication origin.")}if(!r||n.pathname&&n.pathname!=="/"||n.search||n.hash)throw new Error("Invalid request authentication origin.");return r})}async function xt(t,e,r,n=new Map,s=[]){let o=new URL(t),c=new Headers(e.headers),d=[],h=new Map(s.map(({credential:a,token:l})=>[a,l]));for(let a of r){if(!a.origins.includes(o.origin))continue;let l=n.get(a),f=h.get(a),u=a.type==="query-parameter"&&f!==void 0,g=a.type==="header"&&f!==void 0;if(a.type==="query-parameter"&&o.searchParams.has(a.name)&&!u||a.type==="header"&&c.has(a.name)&&!g)continue;let p=l??f??await Er(a.token,{url:t.toString(),reason:"request"});p&&(a.type==="query-parameter"?o.searchParams.set(a.name,p):c.set(a.name,`${a.prefix||""}${p}`),d.push({credential:a,token:p}))}return{url:o.toString(),options:{...e,headers:c},credentials:d}}async function Tr(t,e,r){let n=Oe.get(t);if(n)return n;let s=t.token,o=Promise.resolve(s({url:e,reason:"refresh",response:{status:r.status,headers:r.headers}})).finally(()=>Oe.delete(t));return Oe.set(t,o),o}async function Er(t,e){return typeof t=="function"?t(e):t}function Ar(t){try{let e=new URL(t);return["http:","https:"].includes(e.protocol)?e:null}catch{return null}}function ee(t){let e=(t.method||"GET").toUpperCase();return["GET","HEAD","OPTIONS","PUT","DELETE"].includes(e)?!(t.body&&typeof ReadableStream<"u"&&t.body instanceof ReadableStream):!1}var ke="",St={};function je(t){ke=t}function $e(){return ke}function W(t){for(let e in St)if(t.startsWith(e)){let r=St[e];t=t.replace(e,r)}return!t.startsWith("http://")&&!t.startsWith("https://")&&(t=`${ke}${t}`),t}var Sr="5.0.0-beta.1",He={dataType:null,batchType:null,name:"JSON",id:"json",module:"json",version:Sr,encoding:"json",format:"json",extensions:["json","geojson"],mimeTypes:["application/json"],category:"json",text:!0,parseTextSync:_t,parse:async t=>_t(new TextDecoder().decode(t)),options:{}};function _t(t){return JSON.parse(t)}var _r={fetchFile:F("fetchFile"),parse:F("parse"),parseFile:F("parseFile"),parseSync:F("parseSync"),parseInBatches:F("parseInBatches"),load:F("load"),loadInBatches:F("loadInBatches")},z=class t{static defaultOptions={core:{type:"auto",attributions:[],loaders:[],onError:void 0}};optionsType;options;data;url;loadOptions;fetch;coreApi;hasCoreApi;_needsRefresh=!0;constructor(e,r,n,s){this.options=X(X(t.defaultOptions,n||{}),r),this.data=e,this.url=typeof e=="string"?W(e):"";let o=Pe(Ct(this.options));this.loadOptions=o;let c=Rt(o);this.coreApi=s||_r,this.hasCoreApi=!!s,this.fetch=c}setProps(e){let r=X(this.options,e),n=Pe(Ct(r));this.options=r,this.loadOptions=n,this.fetch=Rt(n),this.setNeedsRefresh()}setNeedsRefresh(){this._needsRefresh=!0}getNeedsRefresh(e=!0){let r=this._needsRefresh;return e&&(this._needsRefresh=!1),r}reportError(e,r){let n=Rr(e,r),s=this.options.core?.onError;return s?s(n,this):ct.warn(`${this.constructor.name}: ${n.message}`)(),n}};function Rt(t){return Tt(t)}function Ct(t){if(t.loadOptions!==void 0||t.core?.loadOptions!==void 0)throw new Error("Source loadOptions and core.loadOptions were removed. Use core and root loader namespaces directly.");let e={...t};if(t?.core){e.core={...t.core};let s=e.core;for(let o of["type","attributions","loaders","onError","loadOptions"])delete s[o];Object.keys(s).length===0&&delete e.core}let r=typeof e.baseUri=="string"?e.baseUri:void 0,n=typeof e.baseUrl=="string"?e.baseUrl:void 0;return(r!==void 0||n!==void 0)&&(e.core||={},e.core.baseUrl===void 0&&(e.core.baseUrl=n??r),delete e.baseUri,delete e.baseUrl),e}function Rr(t,e){return t instanceof Error?t:typeof t=="string"?new Error(t):new Error(e)}function F(t){return()=>{throw new Error(`CoreAPI.${t} is unavailable. Use @loaders.gl/core.createDataSource().`)}}function Me(t={}){if(t.coordinateEpoch!==void 0&&!Number.isFinite(t.coordinateEpoch))throw new Error("Spatial reference coordinate epoch must be a finite decimal year");return Object.freeze({crs:Bt(t.crs||{state:"absent",provenance:"unknown"}),vertical:t.vertical?Bt(t.vertical):void 0,coordinateEpoch:t.coordinateEpoch,coordinateFrame:t.coordinateFrame||"unknown",coordinateOrder:Object.freeze([...t.coordinateOrder||[]]),units:t.units?Object.freeze([...t.units]):void 0})}function Bt(t){return t.state==="explicit"||t.state==="default"?Object.freeze({...t,definition:Nt(t.definition),alternatives:t.alternatives?Object.freeze(t.alternatives.map(e=>Object.freeze({...e,definition:Nt(e.definition)}))):void 0}):Object.freeze({...t})}function Nt(t){return typeof t=="string"?t:qe(t)}function qe(t){return Array.isArray(t)?Object.freeze(t.map(e=>qe(e))):t&&typeof t=="object"?Object.freeze(Object.fromEntries(Object.entries(t).map(([e,r])=>[e,qe(r)]))):t}function We(t){Cr(t.queryType,t.execution);let e=Object.freeze({fields:Object.freeze(t.schema.fields.map(n=>Object.freeze({...n,metadata:Object.freeze({...n.metadata})}))),metadata:Object.freeze({...t.schema.metadata})}),r=e.fields.map(n=>Object.freeze({name:n.name,type:n.type,nullable:n.nullable!==!1,role:t.columnRoles?.[n.name]||"attribute",title:vt(n.metadata,"title"),description:vt(n.metadata,"description"),metadata:n.metadata||Object.freeze({})}));return Object.freeze({sourceType:t.sourceType,queryType:t.queryType,execution:Object.freeze({...t.execution}),name:t.name,description:t.description,schema:e,columns:Object.freeze(r),capabilities:Object.freeze({...t.capabilities}),spatial:t.spatial?Object.freeze({...t.spatial,bounds:t.spatial.bounds?Object.freeze({minimum:Object.freeze([...t.spatial.bounds.minimum]),maximum:Object.freeze([...t.spatial.bounds.maximum])}):void 0,coordinateReferenceSystems:t.spatial.coordinateReferenceSystems?Object.freeze([...t.spatial.coordinateReferenceSystems]):void 0,spatialReference:t.spatial.spatialReference?Me(t.spatial.spatialReference):void 0}):void 0,statistics:t.statistics?Object.freeze({...t.statistics}):void 0,levels:t.levels?Object.freeze(t.levels.map(n=>Object.freeze({...n,scale:n.scale?Object.freeze([...n.scale]):void 0}))):void 0})}function Cr(t,e){if(e.status==="metadata-only"){if(!e.reason.trim())throw new Error("Metadata-only scan support requires a concrete reason");return}if(!{table:["read","query"],raster:["getRaster"],"point-cloud":["scan"]}[t].includes(e.method))throw new Error(`Scan execution method "${e.method}" is not valid for ${t} queries`)}function vt(t,e){return t?.[e]||void 0}function ze(t){if(t.width!==void 0&&Lt(t.width,"width"),t.height!==void 0&&Lt(t.height,"height"),t.level!==void 0&&Ft(t.level,"level"),t.bounds)for(let e=0;e<2;e++){let r=t.bounds[0][e],n=t.bounds[1][e];if(!Number.isFinite(r)||!Number.isFinite(n)||r>n)throw new Error("Raster query bounds must contain finite, ordered coordinates.")}for(let e of t.channels||[])Ft(e,"channel");for(let[e,r]of Object.entries(t.slices||{})){if(!e)throw new Error("Raster query slice names must be non-empty.");if(Array.isArray(r)){if(r.length!==2||!r.every(Number.isFinite)||r[0]>r[1])throw new Error(`Raster query slice ${e} must be an ordered finite range.`)}else if(!Number.isFinite(r))throw new Error(`Raster query slice ${e} must be finite.`)}}function Lt(t,e){if(!Number.isSafeInteger(t)||t<1)throw new Error(`Raster query ${e} must be a positive safe integer.`)}function Ft(t,e){if(!Number.isSafeInteger(t)||t<0)throw new Error(`Raster query ${e} must be a non-negative safe integer.`)}Ze();Ye();Ye();Ze();var Ur="5.0.0-beta.1",ne=class t extends z{static HEADER_RANGE_SIZE=64*1024;static MAX_HEADER_RANGE_SIZE=4*1024*1024;headerPromise=null;rasterQueryCapabilities=Object.freeze({bounds:"unsupported",level:"unsupported",variables:"pushdown",slices:"residual",streaming:!1,cancellation:!0});constructor(e,r={}){super(e,r)}async getQueryMetadata(e={}){S(e.signal);let{header:r,byteLength:n}=await this.getHeader(e.signal);S(e.signal);let o={fields:r.variables.map(c=>zr(c,r)),metadata:Vr(r)};return We({sourceType:"netcdf",queryType:"raster",execution:{status:"supported",method:"getRaster"},name:typeof this.data=="string"?this.data.split("/").pop():void 0,schema:o,capabilities:{bounds:"unsupported",levelOfDetail:"unsupported",raster:this.rasterQueryCapabilities},statistics:{byteLength:n,rowCount:r.recordDimension.length||void 0}})}async getRaster(e={}){ze(e),Or(e),S(e.signal);let r=await this.loadReader(e.signal);S(e.signal),jr(r.header,e.slices);let s=kr(r.header,e.variables).map(a=>{S(e.signal);let l=a.dimensions.map(b=>r.header.dimensions[b]?.name||`dimension_${b}`),f=a.dimensions.map(b=>Xe(r.header,b)),u=qt(r.getDataVariable(a)),g=$r(u,l,f,e.slices||{},e.signal),p=Ke(a.type);return{variable:a,dimensionNames:g.dimensionNames,shape:g.shape,data:qr(g.values,p),dtype:p}}),o=s[0];for(let a of s.slice(1))if(a.dtype!==o.dtype||!Wr(a.shape,o.shape))throw new Error("NetCDF raster variables must retain the same shape and numeric type after slicing.");let c=o.shape.at(-1)??1,d=o.shape.length<2?1:o.shape.slice(0,-1).reduce((a,l)=>a*l,1),h=Mr(o.variable);return{data:s.length===1?o.data:s.map(a=>a.data),width:c,height:d,bandCount:s.length,dtype:o.dtype,interleaved:!1,noData:h,metadata:{variables:s.map(a=>a.variable.name),dimensions:o.dimensionNames,shape:o.shape,slices:{...e.slices}}}}async loadReader(e){let r;if(typeof this.data=="string"){let n=await this.fetch(this.url,{signal:e});if(!n.ok)throw new Error(`NetCDF request failed with status ${n.status}.`);r=await n.arrayBuffer()}else r=await this.data.arrayBuffer();return S(e),new A(r)}async getHeader(e){S(e),this.headerPromise||(this.headerPromise=this.loadHeader().catch(n=>{throw this.headerPromise=null,n}));let r=await this.headerPromise;return S(e),r}async loadHeader(){if(typeof this.data!="string"){let o=await this.data.arrayBuffer();return{header:new A(o).header,byteLength:o.byteLength}}let e=t.HEADER_RANGE_SIZE,r=null,n=null,s;for(;e<=t.MAX_HEADER_RANGE_SIZE;){if(r=await this.fetch(this.url,{headers:{Range:`bytes=0-${e-1}`}}),!r.ok)throw new Error(`NetCDF request failed with status ${r.status}.`);n=await r.arrayBuffer();let o=Gr(r,n.byteLength);try{return{header:new A(n).header,byteLength:o}}catch(c){if(s=c,r.status!==206||n.byteLength<e)throw c;e*=2}}throw s||new Error("NetCDF header exceeds the maximum metadata range.")}},se={dataType:null,batchType:null,...G,module:"scientific",name:"NetCDFSourceLoader",version:Ur,type:"netcdf-source",fromUrl:!0,fromBlob:!0,options:{},defaultOptions:{},testURL:t=>/\.(?:cdf|nc)(?:$|[?#])/i.test(t),createDataSource:(t,e)=>new ne(t,e)};function Pr(t){switch(t.toLowerCase()){case"byte":return"int8";case"ubyte":return"uint8";case"short":return"int16";case"ushort":return"uint16";case"int":return"int32";case"uint":return"uint32";case"int64":return"int64";case"uint64":return"uint64";case"float":return"float32";case"double":return"float64";case"char":case"string":return"utf8";default:return"binary"}}function Or(t){if(t.bounds)throw new Error("NetCDF raster bounds are not supported.");if(t.level!==void 0)throw new Error("NetCDF raster levels are not supported.");if(t.width!==void 0||t.height!==void 0)throw new Error("NetCDF raster resampling is not supported.");if(t.channels?.length)throw new Error("NetCDF uses named variables instead of numeric channels.")}function kr(t,e){let r=t.variables.find(s=>s.dimensions.length>0&&Hr(s.type)),n=e?.length?[...e]:r?[r.name]:[];if(n.length===0)throw new Error("NetCDF contains no numeric variables that can be read as raster data.");if(new Set(n).size!==n.length)throw new Error("NetCDF raster variables must not contain duplicates.");return n.map(s=>{let o=t.variables.find(c=>c.name===s);if(!o)throw new Error(`NetCDF variable not found: ${s}`);return Ke(o.type),o})}function jr(t,e){let r=new Set(t.dimensions.map(n=>n.name));for(let n of Object.keys(e||{}))if(!r.has(n))throw new Error(`NetCDF dimension not found: ${n}`)}function $r(t,e,r,n,s){let o=e.map((a,l)=>{let f=r[l],u=n[a];if(u===void 0)return{start:0,stop:f,remove:!1};if(typeof u!="number"){let[g,p]=u;if(!Number.isSafeInteger(g)||!Number.isSafeInteger(p)||g<0||p<g||p>f)throw new Error(`NetCDF slice ${a} must be a valid half-open range within 0..${f}.`);return{start:g,stop:p,remove:!1}}if(!Number.isSafeInteger(u)||u<0||u>=f)throw new Error(`NetCDF slice ${a} must be an index within 0..${f-1}.`);return{start:u,stop:u+1,remove:!0}}),c=r.map((a,l)=>r.slice(l+1).reduce((f,u)=>f*u,1)),d=[],h=(a,l)=>{if(S(s),a===o.length){let u=t[l];if(typeof u!="number")throw new Error("NetCDF raster variables must contain numeric values.");d.push(u);return}let f=o[a];for(let u=f.start;u<f.stop;u++)h(a+1,l+u*c[a])};return h(0,0),{values:d,dimensionNames:e.filter((a,l)=>!o[l].remove),shape:o.map(a=>a.stop-a.start).filter((a,l)=>!o[l].remove)}}function qt(t){return Array.isArray(t)?t.flatMap(qt):ArrayBuffer.isView(t)?Array.from(t):[t]}function Hr(t){try{return Ke(t),!0}catch{return!1}}function Ke(t){switch(t.toLowerCase()){case"byte":return"int8";case"ubyte":return"uint8";case"short":return"int16";case"ushort":return"uint16";case"int":return"int32";case"uint":return"uint32";case"float":return"float32";case"double":return"float64";default:throw new Error(`NetCDF variable type is not supported as raster data: ${t}`)}}function qr(t,e){switch(e){case"int8":return Int8Array.from(t);case"uint8":return Uint8Array.from(t);case"int16":return Int16Array.from(t);case"uint16":return Uint16Array.from(t);case"int32":return Int32Array.from(t);case"uint32":return Uint32Array.from(t);case"float32":return Float32Array.from(t);case"float64":return Float64Array.from(t)}}function Mr(t){let e=t.attributes.find(n=>n.name==="_FillValue"||n.name==="missing_value"),r=Number(e?.value);return e&&Number.isFinite(r)?r:null}function Wr(t,e){return t.length===e.length&&t.every((r,n)=>r===e[n])}function zr(t,e){let n={dimensions:t.dimensions.map(s=>e.dimensions[s]).filter(Boolean).map((s,o)=>`${s.name}[${Xe(e,t.dimensions[o])}]`).join(",")};for(let s of t.attributes)n[s.name]=String(s.value);return{name:t.name,type:Pr(t.type),nullable:!0,metadata:n}}function Vr(t){let e={};for(let[r,n]of t.dimensions.entries())e[`dimension:${n.name}`]=String(Xe(t,r));return e}function Xe(t,e){let r=t.dimensions[e];return e===t.recordDimension.id?t.recordDimension.length:r?.size||0}function Gr(t,e){let n=t.headers.get("content-range")?.match(/\/([0-9]+)$/)?.[1];return Number(n||t.headers.get("content-length")||e)}function S(t){if(t?.aborted)throw new DOMException("The operation was aborted","AbortError")}return Kt(Qr);})();
|
|
7
|
+
"use strict";var __exports__=(()=>{var qr=Object.create;var K=Object.defineProperty;var zr=Object.getOwnPropertyDescriptor;var Vr=Object.getOwnPropertyNames;var Gr=Object.getPrototypeOf,Qr=Object.prototype.hasOwnProperty;var u=(e,t,r)=>()=>{if(r)throw r[0];try{return e&&(t=e(e=0)),t}catch(n){throw r=[n],n}};var Jr=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(r){throw t=0,r}},Ct=(e,t)=>{for(var r in t)K(e,r,{get:t[r],enumerable:!0})},_t=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Vr(t))!Qr.call(e,o)&&o!==r&&K(e,o,{get:()=>t[o],enumerable:!(n=zr(t,o))||n.enumerable});return e};var Zr=(e,t,r)=>(r=e!=null?qr(Gr(e)):{},_t(t||!e||!e.__esModule?K(r,"default",{value:e,enumerable:!0}):r,e)),Yr=e=>_t(K({},"__esModule",{value:!0}),e);var Bt=Jr((no,Nt)=>{Nt.exports=globalThis.loaders});function ge(e,t){if(!e)throw new Error(t||"loader assertion failed.")}var Dt=u(()=>{"use strict"});var A,ye,be,we,xe,Ee,Te,Lt,Kr,Ft=u(()=>{"use strict";A={self:typeof self<"u"&&self,window:typeof window<"u"&&window,global:typeof global<"u"&&global,document:typeof document<"u"&&document},ye=A.self||A.window||A.global||{},be=A.window||A.self||A.global||{},we=A.global||A.self||A.window||{},xe=A.document||{},Ee=!!(typeof process!="object"||String(process)!=="[object process]"||process.browser),Te=typeof importScripts=="function",Lt=typeof process<"u"&&process.version&&/v([0-9]*)/.exec(process.version),Kr=Lt&&parseFloat(Lt[1])||0});var M,Xr,X,en,tn,Ae=u(()=>{M=globalThis,Xr=globalThis.document||{},X=globalThis.process||{},en=globalThis.console,tn=globalThis.navigator||{}});function ee(e){if(typeof window<"u"&&window.process?.type==="renderer"||typeof process<"u"&&process.versions?.electron)return!0;let t=typeof navigator<"u"&&navigator.userAgent,r=e||t;return!!(r&&r.indexOf("Electron")>=0)}var te=u(()=>{});function _(){return!(typeof process=="object"&&String(process)==="[object process]"&&!process?.browser)||ee()}var Se=u(()=>{te()});var vt=u(()=>{Se();te();Ae()});var It=u(()=>{});var Re,re=u(()=>{Ae();Se();vt();te();It();Re="5.0.0"});function P(e,t){if(!e)throw new Error(t||"Assertion failed")}var Ce=u(()=>{});function ne(e){if(!e)return 0;let t;switch(typeof e){case"number":t=e;break;case"object":t=e.logLevel||e.priority||0;break;default:return 0}return P(Number.isFinite(t)&&t>=0),t}function _e(e){let{logLevel:t,message:r}=e;e.logLevel=ne(t);let n=e.args?Array.from(e.args):[];for(;n.length&&n.shift()!==r;);switch(typeof t){case"string":case"function":r!==void 0&&n.unshift(r),e.message=t;break;case"object":Object.assign(e,t);break;default:}typeof e.message=="function"&&(e.message=e.message());let o=typeof e.message;return P(o==="string"||o==="object"),Object.assign(e,{args:n},e.opts)}var oe=u(()=>{Ce()});var N,L,W=u(()=>{oe();N=()=>{},L=class{constructor({level:t=0}={}){this.userData={},this._onceCache=new Set,this._level=t}set level(t){this.setLevel(t)}get level(){return this.getLevel()}setLevel(t){return this._level=t,this}getLevel(){return this._level}warn(t,...r){return this._log("warn",0,t,r,{once:!0})}error(t,...r){return this._log("error",0,t,r)}log(t,r,...n){return this._log("log",t,r,n)}info(t,r,...n){return this._log("info",t,r,n)}once(t,r,...n){return this._log("once",t,r,n,{once:!0})}_log(t,r,n,o,s={}){let c=_e({logLevel:r,message:n,args:this._buildArgs(r,n,o),opts:s});return this._createLogFunction(t,c,s)}_buildArgs(t,r,n){return[t,r,...n]}_createLogFunction(t,r,n){if(!this._shouldLog(r.logLevel))return N;let o=this._getOnceTag(n.tag??r.tag??r.message);if((n.once||r.once)&&o!==void 0){if(this._onceCache.has(o))return N;this._onceCache.add(o)}return this._emit(t,r)}_shouldLog(t){return this.getLevel()>=ne(t)}_getOnceTag(t){if(t!==void 0)try{return typeof t=="string"?t:String(t)}catch{return}}}});function nn(e){try{let t=window[e],r="__storage_test__";return t.setItem(r,r),t.removeItem(r),t}catch{return null}}var $,Ne=u(()=>{$=class{constructor(t,r,n="sessionStorage"){this.storage=nn(n),this.id=t,this.config=r,this._loadConfiguration()}getConfiguration(){return this.config}setConfiguration(t){if(Object.assign(this.config,t),this.storage){let r=JSON.stringify(this.config);this.storage.setItem(this.id,r)}}_loadConfiguration(){let t={};if(this.storage){let r=this.storage.getItem(this.id);t=r?JSON.parse(r):{}}return Object.assign(this.config,t),this}}});function Pt(e){let t;return e<10?t=`${e.toFixed(2)}ms`:e<100?t=`${e.toFixed(1)}ms`:e<1e3?t=`${e.toFixed(0)}ms`:t=`${(e/1e3).toFixed(2)}s`,t}function Be(e,t=8){let r=Math.max(t-e.length,0);return`${" ".repeat(r)}${e}`}var De=u(()=>{});function Ot(e){return typeof e!="string"?e:(e=e.toUpperCase(),H[e]||H.WHITE)}function Le(e,t,r){return!_&&typeof e=="string"&&(t&&(e=`\x1B[${Ot(t)}m${e}\x1B[39m`),r&&(e=`\x1B[${Ot(r)+on}m${e}\x1B[49m`)),e}var H,on,se=u(()=>{re();(function(e){e[e.BLACK=30]="BLACK",e[e.RED=31]="RED",e[e.GREEN=32]="GREEN",e[e.YELLOW=33]="YELLOW",e[e.BLUE=34]="BLUE",e[e.MAGENTA=35]="MAGENTA",e[e.CYAN=36]="CYAN",e[e.WHITE=37]="WHITE",e[e.BRIGHT_BLACK=90]="BRIGHT_BLACK",e[e.BRIGHT_RED=91]="BRIGHT_RED",e[e.BRIGHT_GREEN=92]="BRIGHT_GREEN",e[e.BRIGHT_YELLOW=93]="BRIGHT_YELLOW",e[e.BRIGHT_BLUE=94]="BRIGHT_BLUE",e[e.BRIGHT_MAGENTA=95]="BRIGHT_MAGENTA",e[e.BRIGHT_CYAN=96]="BRIGHT_CYAN",e[e.BRIGHT_WHITE=97]="BRIGHT_WHITE"})(H||(H={}));on=10});function Fe(e,t=["constructor"]){let r=Object.getPrototypeOf(e),n=Object.getOwnPropertyNames(r),o=e;for(let s of n){let c=o[s];typeof c=="function"&&(t.find(d=>s===d)||(o[s]=c.bind(e)))}}var ve=u(()=>{});var ie,E,q=u(()=>{re();ie=class{getHighResolutionTimer(){let t;if(_()&&M.performance)t=M?.performance?.now?.();else if("hrtime"in X){let r=X?.hrtime?.();t=r[0]*1e3+r[1]/1e6}else t=Date.now();return t}getMemoryUsageMB(){let r=M?.performance?.memory?.usedJSHeapSize;return r==null?null:Math.trunc(r/1024/1024)}},E=new ie;globalThis.Probe=ie;globalThis.probe=E});function sn(e,t,r){if(typeof t=="string"){let n=r.time?Be(Pt(r.total)):"";t=r.time?`${e}: ${n} ${t}`:`${e}: ${t}`,t=Le(t,r.color,r.background)}return t}function an(e){for(let t in e)for(let r in e[t])return r||"untitled";return"empty"}var O,Ie,S,Pe=u(()=>{re();W();Ne();De();se();ve();Ce();q();oe();oe();O={debug:_()&&console.debug||console.log,log:console.log,info:console.info,warn:console.warn,error:console.error},Ie={enabled:!0,level:0},S=class extends L{constructor({id:t}={id:""}){super({level:0}),this.VERSION=Re,this._startTs=E.getHighResolutionTimer(),this._deltaTs=E.getHighResolutionTimer(),this.userData={},this.LOG_THROTTLE_TIMEOUT=0,this.id=t,this.userData={},this._storage=new $(`__probe-${this.id}__`,{[this.id]:Ie}),this.timeStamp(`${this.id} started`),Fe(this),Object.seal(this)}isEnabled(){return this._getConfiguration().enabled}getLevel(){return this._getConfiguration().level}getTotal(){return Number((E.getHighResolutionTimer()-this._startTs).toPrecision(10))}getDelta(){return Number((E.getHighResolutionTimer()-this._deltaTs).toPrecision(10))}set priority(t){this.level=t}get priority(){return this.level}getPriority(){return this.level}enable(t=!0){return this._updateConfiguration({enabled:t}),this}setLevel(t){return this._updateConfiguration({level:t}),this}get(t){return this._getConfiguration()[t]}set(t,r){this._updateConfiguration({[t]:r})}settings(){console.table?console.table(this._storage.config):console.log(this._storage.config)}assert(t,r){if(!t)throw new Error(r||"Assertion failed")}warn(t,...r){return this._log("warn",0,t,r,{method:O.warn,once:!0})}error(t,...r){return this._log("error",0,t,r,{method:O.error})}deprecated(t,r){return this.warn(`\`${t}\` is deprecated and will be removed in a later version. Use \`${r}\` instead`)}removed(t,r){return this.error(`\`${t}\` has been removed. Use \`${r}\` instead`)}probe(t,r,...n){let o=E.getMemoryUsageMB();if(o!==null){let s=`${o}MB `;typeof r=="function"?r=()=>`${s}${r()}`:typeof r=="string"&&(r=`${s}${r}`)}return this._log("log",t,r,n,{method:O.log,time:!0,once:!0})}log(t,r,...n){return this._log("log",t,r,n,{method:O.debug})}info(t,r,...n){return this._log("info",t,r,n,{method:console.info})}once(t,r,...n){return this._log("once",t,r,n,{method:O.debug||O.info,once:!0})}table(t,r,n){return r?this._log("table",t,r,n&&[n]||[],{method:console.table||N,tag:an(r)}):N}time(t,r){return this._log("time",t,r,[],{method:console.time?console.time:console.info})}timeEnd(t,r){return this._log("time",t,r,[],{method:console.timeEnd?console.timeEnd:console.info})}timeStamp(t,r){return this._log("time",t,r,[],{method:console.timeStamp||N})}group(t,r,n={collapsed:!1}){let o=(n.collapsed?console.groupCollapsed:console.group)||console.info;return this._log("group",t,r,[],{method:o})}groupCollapsed(t,r,n={}){return this.group(t,r,Object.assign({},n,{collapsed:!0}))}groupEnd(t){return this._log("groupEnd",t,"",[],{method:console.groupEnd||N})}withGroup(t,r,n){this.group(t,r)();try{n()}finally{this.groupEnd(t)()}}trace(){console.trace&&console.trace()}_shouldLog(t){return this.isEnabled()&&super._shouldLog(t)}_emit(t,r){let n=r.method;P(n),r.total=this.getTotal(),r.delta=this.getDelta(),this._deltaTs=E.getHighResolutionTimer();let o=sn(this.id,r.message,r);return n.bind(console,o,...r.args)}_getConfiguration(){return this._storage.config[this.id]||this._updateConfiguration(Ie),this._storage.config[this.id]}_updateConfiguration(t){let r=this._storage.config[this.id]||{...Ie};this._storage.setConfiguration({[this.id]:{...r,...t}})}};S.VERSION=Re});var Ut=u(()=>{W()});var kt=u(()=>{W()});var jt=u(()=>{q()});var Mt=u(()=>{q();globalThis.probe||(globalThis.probe=E)});var is,Wt=u(()=>{Pe();q();Pe();Ut();W();kt();se();se();De();ve();Ne();jt();Mt();is=new S({id:"@probe.gl/log"})});function un(){let e=new S({id:"loaders.gl"});return globalThis.loaders||={},globalThis.loaders.log=e,globalThis.loaders.version=cn,globalThis.probe||={},globalThis.probe.loaders=e,e}function z(){}function $t(e){let t=e?.core?.log;return t===null?ln:t||fn}var Oe,cn,fn,Ue,ln,Ht=u(()=>{"use strict";Wt();Oe="5.0.0-beta.11",cn=Oe[0]>="0"&&Oe[0]<="9"?`v${Oe}`:"";fn=un(),Ue=class{log(){return z}info(){return z}once(){return z}warn(){return z}error(){return z}};ln=new Ue});var qt,b,B,V,ke,je,Me,We,$e,zt,Vt,Gt,Qt,He,qe,ze=u(()=>{"use strict";qt=e=>typeof e=="boolean",b=e=>typeof e=="function",B=e=>e!==null&&typeof e=="object",V=e=>B(e)&&e.constructor==={}.constructor,ke=e=>B(e)&&"then"in e&&b(e.then),je=e=>!!e&&b(e[Symbol.iterator]),Me=e=>!!e&&b(e[Symbol.asyncIterator]),We=e=>!!e&&b(e.next),$e=e=>typeof Response<"u"&&e instanceof Response||B(e)&&b(e.arrayBuffer)&&b(e.text)&&b(e.json),zt=e=>B(e)&&b(e.abort)&&b(e.getWriter),Vt=e=>typeof ReadableStream<"u"&&e instanceof ReadableStream||B(e)&&b(e.tee)&&b(e.cancel)&&b(e.getReader),Gt=e=>B(e)&&b(e.end)&&b(e.write)&&qt(e.writable),Qt=e=>B(e)&&b(e.read)&&b(e.pipe)&&qt(e.readable),He=e=>Vt(e)||Qt(e),qe=e=>zt(e)||Gt(e)});function ae(e,t){return Jt(e||{},t)}function Jt(e,t,r=0){if(r>3)return t;let n={...e};for(let[o,s]of Object.entries(t))V(s)?n[o]=Jt(n[o]||{},t[o],r+1):n[o]=t[o];return n}var Zt=u(()=>{"use strict";ze()});function Yt(...e){return dn(e)}function dn(e){let t=e.map(s=>s instanceof ArrayBuffer?new Uint8Array(s):s),r=t.reduce((s,c)=>s+c.byteLength,0),n=new Uint8Array(r),o=0;for(let s of t)n.set(s,o),o+=s.byteLength;return n.buffer}var Kt=u(()=>{"use strict"});async function*Ve(e,t={}){let r=new TextDecoder(void 0,t);for await(let n of e)yield typeof n=="string"?n:r.decode(n,{stream:!0})}async function*Ge(e){let t=new TextEncoder;for await(let r of e)yield typeof r=="string"?t.encode(r).buffer:r}async function*Qe(e){let t="";for await(let r of e){t+=r;let n;for(n=t.indexOf(`
|
|
8
|
+
`);n>=0;){let o=t.slice(0,n+1);t=t.slice(n+1),yield o,n=t.indexOf(`
|
|
9
|
+
`)}}t.length>0&&(yield t)}async function*Je(e){let t=1;for await(let r of e)yield{counter:t,line:r},t++}var Xt=u(()=>{"use strict"});async function Ze(e,t){let r=mn(e);for(;;){let{done:n,value:o}=await r.next();if(n){r.return&&r.return();return}if(t(o))return}}async function Ye(e){let t=[];for await(let r of e)t.push(hn(r));return Yt(...t)}function hn(e){if(e instanceof ArrayBuffer)return e;if(ArrayBuffer.isView(e)){let{buffer:t,byteOffset:r,byteLength:n}=e;return er(t,r,n)}return er(e)}function er(e,t=0,r=e.byteLength-t){let n=new Uint8Array(e,t,r),o=new Uint8Array(n.length);return o.set(n),o.buffer}function mn(e){if(typeof e[Symbol.asyncIterator]=="function")return e[Symbol.asyncIterator]();if(typeof e[Symbol.iterator]=="function"){let t=e[Symbol.iterator]();return pn(t)}return e}function pn(e){return{next(t){return Promise.resolve(e.next(t))},return(t){return typeof e.return=="function"?Promise.resolve(e.return(t)):Promise.resolve({done:!0,value:t})},throw(t){return typeof e.throw=="function"?Promise.resolve(e.throw(t)):Promise.reject(t)}}}var tr=u(()=>{"use strict";Kt()});function G(){let e;if(typeof window<"u"&&window.performance)e=window.performance.now();else if(typeof process<"u"&&process.hrtime){let t=process.hrtime();e=t[0]*1e3+t[1]/1e6}else e=Date.now();return e}var Ke=u(()=>{});var F,Xe=u(()=>{Ke();F=class{constructor(t,r){this.sampleSize=1,this.time=0,this.count=0,this.samples=0,this.lastTiming=0,this.lastSampleTime=0,this.lastSampleCount=0,this._count=0,this._time=0,this._samples=0,this._startTime=0,this._timerPending=!1,this.name=t,this.type=r,this.reset()}reset(){return this.time=0,this.count=0,this.samples=0,this.lastTiming=0,this.lastSampleTime=0,this.lastSampleCount=0,this._count=0,this._time=0,this._samples=0,this._startTime=0,this._timerPending=!1,this}setSampleSize(t){return this.sampleSize=t,this}incrementCount(){return this.addCount(1),this}decrementCount(){return this.subtractCount(1),this}addCount(t){return this._count+=t,this._samples++,this._checkSampling(),this}subtractCount(t){return this._count-=t,this._samples++,this._checkSampling(),this}addTime(t){return this._time+=t,this.lastTiming=t,this._samples++,this._checkSampling(),this}timeStart(){return this._startTime=G(),this._timerPending=!0,this}timeEnd(){return this._timerPending?(this.addTime(G()-this._startTime),this._timerPending=!1,this._checkSampling(),this):this}getSampleAverageCount(){return this.sampleSize>0?this.lastSampleCount/this.sampleSize:0}getSampleAverageTime(){return this.sampleSize>0?this.lastSampleTime/this.sampleSize:0}getSampleHz(){return this.lastSampleTime>0?this.sampleSize/(this.lastSampleTime/1e3):0}getAverageCount(){return this.samples>0?this.count/this.samples:0}getAverageTime(){return this.samples>0?this.time/this.samples:0}getHz(){return this.time>0?this.samples/(this.time/1e3):0}_checkSampling(){this._samples===this.sampleSize&&(this.lastSampleTime=this._time,this.lastSampleCount=this._count,this.count+=this._count,this.time+=this._time,this.samples+=this._samples,this._time=0,this._count=0,this._samples=0)}}});var U,rr=u(()=>{Xe();U=class{constructor(t){this.stats={},this.id=t.id,this.stats={},this._initializeStats(t.stats),Object.seal(this)}get(t,r="count"){return this._getOrCreate({name:t,type:r})}get size(){return Object.keys(this.stats).length}reset(){for(let t of Object.values(this.stats))t.reset();return this}forEach(t){for(let r of Object.values(this.stats))t(r)}getTable(){let t={};return this.forEach(r=>{t[r.name]={time:r.time||0,count:r.count||0,average:r.getAverageTime()||0,hz:r.getHz()||0}}),t}_initializeStats(t=[]){t.forEach(r=>this._getOrCreate(r))}_getOrCreate(t){let{name:r,type:n}=t,o=this.stats[r];return o||(t instanceof F?o=t:o=new F(r,n),this.stats[r]=o),o}}});var nr=u(()=>{rr();Xe();Ke()});var gn,yn,bn,wn,xn,En,k,or=u(()=>{"use strict";nr();gn="Queued Requests",yn="Active Requests",bn="Cancelled Requests",wn="Queued Requests Ever",xn="Active Requests Ever",En={id:"request-scheduler",throttleRequests:!0,maxRequests:6,debounceTime:0},k=class{props;stats;activeRequestCount=0;requestQueue=[];requestMap=new Map;updateTimer=null;constructor(t={}){this.props={...En,...t},this.stats=new U({id:this.props.id}),this.stats.get(gn),this.stats.get(yn),this.stats.get(bn),this.stats.get(wn),this.stats.get(xn)}setProps(t){t.throttleRequests!==void 0&&(this.props.throttleRequests=t.throttleRequests),t.maxRequests!==void 0&&(this.props.maxRequests=t.maxRequests),t.debounceTime!==void 0&&(this.props.debounceTime=t.debounceTime)}scheduleRequest(t,r=()=>0){if(!this.props.throttleRequests)return Promise.resolve({done:()=>{}});if(this.requestMap.has(t))return this.requestMap.get(t);let n={handle:t,priority:0,getPriority:r},o=new Promise(s=>(n.resolve=s,n));return this.requestQueue.push(n),this.requestMap.set(t,o),this._issueNewRequests(),o}_issueRequest(t){let{handle:r,resolve:n}=t,o=!1,s=()=>{o||(o=!0,this.requestMap.delete(r),this.activeRequestCount--,this.scheduleRefill())};return this.activeRequestCount++,n?n({done:s}):Promise.resolve({done:s})}scheduleRefill(){this.updateTimer===null&&(this.updateTimer=setTimeout(()=>this._issueNewRequestsAsync(),0))}_issueNewRequests(){this.updateTimer!==null&&clearTimeout(this.updateTimer),this.updateTimer=setTimeout(()=>this._issueNewRequestsAsync(),this.props.debounceTime)}_issueNewRequestsAsync(){this.updateTimer!==null&&clearTimeout(this.updateTimer),this.updateTimer=null;let t=Math.max(this.props.maxRequests-this.activeRequestCount,0);if(t!==0){this._updateAllRequests();for(let r=0;r<t;++r){let n=this.requestQueue.shift();n&&this._issueRequest(n)}}}_updateAllRequests(){let t=this.requestQueue;for(let r=0;r<t.length;++r){let n=t[r];this._updateRequest(n)||(t.splice(r,1),this.requestMap.delete(n.handle),r--)}t.sort((r,n)=>r.priority-n.priority)}_updateRequest(t){return t.priority=t.getPriority(t.handle),t.priority<0?(t.resolve(null),!1):!0}}});function tt(e,t=[]){return e.every(et)?e:e.map((r,n)=>{if(et(r))return r;let o=t.find(c=>c.type===r?.type);if(!o)throw new Error(`No authentication class registered for credential at index ${n}.`);let s;try{s=new o(r)}catch{throw new Error(`Invalid authentication configuration at index ${n}.`)}if(!et(s))throw new Error(`Authentication class returned an invalid credential at index ${n}.`);return s})}function rt(e){if(!e.core?.credentials?.length)return e;let t=tt(e.core.credentials,e.core.authentications);return t===e.core.credentials?e:{...e,core:{...e.core,credentials:t}}}function et(e){return!e||typeof e!="object"||typeof e.id!="string"||!Array.isArray(e.origins)?!1:e.type==="request"?typeof e.authenticate=="function":(e.type==="header"||e.type==="query-parameter")&&typeof e.name=="string"&&(typeof e.token=="string"||typeof e.token=="function")&&Array.isArray(e.refreshStatusCodes)}var nt=u(()=>{"use strict"});function Tn(e){let t=e.fetch||((l,f)=>fetch(l,f)),r=t[sr],n=new Map(r?.credentialResolutions),o=tt(e.credentials.map(l=>n.get(l)||l),e.authentications);if(e.credentials.forEach((l,f)=>{n.set(l,o[f])}),!e.fetchOptions&&(!o.length||r?.credentials.length===o.length&&o.every((l,f)=>l===r.credentials[f])))return t;let s=r?.fetch||t,c=r?[...new Set([...o,...r.credentials])]:o,d=ir(r?.fetchOptions||{},e.fetchOptions),m=c.filter(l=>l.type!=="request"),a=c.filter(l=>l.type==="request");for(let l of a)lr(l.origins);let h=async(l,f={})=>{if(f=ir(d,f),f.signal?.throwIfAborted(),!c.length)return s(l,f);let y=Rn(l),g=y?await cr(y,f,m):{url:l,options:f,credentials:[]},w=await ar(g,a,"request"),x=await s(w.url,w.options),me=[];for(let D of g.credentials){let{credential:C}=D;typeof C.token=="function"&&(ce(f)||C.canReplayRequest?.(l,f))&&(ce(w.options)||C.canReplayRequest?.(w.url,w.options))&&(C.refreshStatusCodes.includes(x.status)||await C.shouldRefresh?.(x))&&me.push(D)}let St=ce(f)&&ce(w.options)&&w.credentials.some(D=>D.refreshStatusCodes?.includes(x.status));if(!me.length&&!St)return x;f.signal?.throwIfAborted();let pe=new Map;if(await Promise.all(me.map(async({credential:D})=>{let C=await An(D,l,x);C&&pe.set(D,C)})),!pe.size&&!St)return x;await x.body?.cancel().catch(()=>{}),f.signal?.throwIfAborted();let Hr=y?await cr(y,f,m,pe,g.credentials):{url:l,options:f},Rt=await ar(Hr,a,"retry",x);return s(Rt.url,Rt.options)};return Object.defineProperty(h,sr,{value:{fetch:s,credentials:c,credentialResolutions:n,fetchOptions:d}}),h}function ur(e={}){let t=e.core?.fetch,r;typeof t=="function"?r=t:r=(o,s)=>fetch(o,s);let n=typeof t=="object"&&t?t:void 0;return Tn({fetch:r,fetchOptions:e.signal?{...n,signal:e.signal}:n,credentials:e.core?.credentials||[],authentications:e.core?.authentications})}function ir(e,t){let r={...e,...t};if(e.headers||t?.headers){let n=new Headers(e.headers);new Headers(t?.headers).forEach((o,s)=>n.set(s,o)),r.headers=n}return r}async function ar(e,t,r,n){let o=[],s=e.options.signal;for(let c of t){let d=fr(e.url);if(!d||!lr(c.origins).includes(d))continue;s?.throwIfAborted();let m=await c.authenticate({url:e.url,options:{...e.options,headers:new Headers(e.options.headers)},reason:r,response:n?{status:n.status,headers:new Headers(n.headers)}:void 0});if(!m||typeof m.url!="string"||!m.options||typeof m.options!="object")throw new Error("Authentication callback returned an invalid request.");e={url:m.url,options:{...m.options,...s?{signal:s}:{}}},o.push(c)}return s?.throwIfAborted(),{...e,credentials:o}}function fr(e){try{let t=new URL(e);return!t.host||t.username||t.password?null:t.origin!=="null"?t.origin:`${t.protocol}//${t.host}`}catch{return null}}function lr(e){if(!e.length)throw new Error("Request authentication requires at least one exact origin.");return e.map(t=>{let r=fr(t),n;try{n=new URL(t)}catch{throw new Error("Invalid request authentication origin.")}if(!r||n.pathname&&n.pathname!=="/"||n.search||n.hash)throw new Error("Invalid request authentication origin.");return r})}async function cr(e,t,r,n=new Map,o=[]){let s=new URL(e),c=new Headers(t.headers),d=[],m=new Map(o.map(({credential:a,token:h})=>[a,h]));for(let a of r){if(!a.origins.includes(s.origin))continue;let h=n.get(a),l=m.get(a),f=a.type==="query-parameter"&&l!==void 0,y=a.type==="header"&&l!==void 0;if(a.type==="query-parameter"&&s.searchParams.has(a.name)&&!f||a.type==="header"&&c.has(a.name)&&!y)continue;let g=h??l??await Sn(a.token,{url:e.toString(),reason:"request"});g&&(a.type==="query-parameter"?s.searchParams.set(a.name,g):c.set(a.name,`${a.prefix||""}${g}`),d.push({credential:a,token:g}))}return{url:s.toString(),options:{...t,headers:c},credentials:d}}async function An(e,t,r){let n=ot.get(e);if(n)return n;let o=e.token,s=Promise.resolve(o({url:t,reason:"refresh",response:{status:r.status,headers:r.headers}})).finally(()=>ot.delete(e));return ot.set(e,s),s}async function Sn(e,t){return typeof e=="function"?e(t):e}function Rn(e){try{let t=new URL(e);return["http:","https:"].includes(t.protocol)?t:null}catch{return null}}function ce(e){let t=(e.method||"GET").toUpperCase();return["GET","HEAD","OPTIONS","PUT","DELETE"].includes(t)?!(e.body&&typeof ReadableStream<"u"&&e.body instanceof ReadableStream):!1}var sr,ot,dr=u(()=>{"use strict";nt();sr=Symbol("loaders.gl.authenticated-fetch"),ot=new WeakMap});function it(e){st=e}function at(){return st}function Q(e){for(let t in hr)if(e.startsWith(t)){let r=hr[t];e=e.replace(t,r)}return!e.startsWith("http://")&&!e.startsWith("https://")&&(e=`${st}${e}`),e}var st,hr,ct=u(()=>{"use strict";st="",hr={}});function mr(e){return JSON.parse(e)}var Cn,ut,pr=u(()=>{"use strict";Cn="5.0.0-beta.11",ut={dataType:null,batchType:null,name:"JSON",id:"json",module:"json",version:Cn,encoding:"json",format:"json",extensions:["json","geojson"],mimeTypes:["application/json"],category:"json",text:!0,parseTextSync:mr,parse:async e=>mr(new TextDecoder().decode(e)),options:{}}});function gr(e){return ur(e)}function yr(e){if(e.loadOptions!==void 0||e.core?.loadOptions!==void 0)throw new Error("Source loadOptions and core.loadOptions were removed. Use core and root loader namespaces directly.");let t={...e};if(e?.core){t.core={...e.core};let r=t.core;for(let n of["type","name","attributions","loaders","onError","loadOptions"])delete r[n];Object.keys(r).length===0&&delete t.core}return t}function Nn(e,t){return e instanceof Error?e:typeof e=="string"?new Error(e):new Error(t)}function v(e){return()=>{throw new Error(`CoreAPI.${e} is unavailable. Use @loaders.gl/core.createDataSourceSync().`)}}function Bn(e,t){let r=t.core?.name;if(r!==void 0){if(typeof r!="string"||!r.trim())throw new Error("Data source name must be a non-empty string.");return r}if(e&&typeof e=="object"){let n=e;if(typeof n.name=="string"&&n.name.trim())return e instanceof Blob?br(n.name):n.name;let o=n.schema?.metadata,s=o instanceof Map?o.get("name"):o?.name;if(typeof s=="string"&&s.trim())return s}if(typeof e=="string")try{let n=new URL(e.replace(/\\/g,"/"),"https://source.invalid/");if(!["data:","blob:"].includes(n.protocol)){let o=n.pathname.split("/").filter(Boolean).pop();if(o){try{o=decodeURIComponent(o)}catch{}return br(o)}}}catch{}return t.core?.type&&t.core.type!=="auto"?t.core.type:"source"}function br(e){let t=e.lastIndexOf(".");return t>0?e.slice(0,t):e}var _n,J,wr=u(()=>{"use strict";Zt();ct();Ht();dr();nt();_n={fetchFile:v("fetchFile"),parse:v("parse"),parseFile:v("parseFile"),parseSync:v("parseSync"),parseInBatches:v("parseInBatches"),load:v("load"),loadInBatches:v("loadInBatches")},J=class e{static defaultOptions={core:{type:"auto",attributions:[],loaders:[],onError:void 0}};optionsType;options;data;url;name;loadOptions;fetch;coreApi;hasCoreApi;_needsRefresh=!0;constructor(t,r,n,o){this.options=ae(ae(e.defaultOptions,n||{}),r),this.data=t,this.url=typeof t=="string"?Q(t):"",this.name=Bn(t,this.options);let s=rt(yr(this.options));this.loadOptions=s;let c=gr(s);this.coreApi=o||_n,this.hasCoreApi=!!o,this.fetch=c}setProps(t){if(t.core?.name!==void 0&&t.core.name!==this.name)throw new Error("Data source names are fixed at creation.");let r=ae(this.options,t),n=rt(yr(r));this.options=r,this.loadOptions=n,this.fetch=gr(n),this.setNeedsRefresh()}setNeedsRefresh(){this._needsRefresh=!0}getNeedsRefresh(t=!0){let r=this._needsRefresh;return t&&(this._needsRefresh=!1),r}reportError(t,r){let n=Nn(t,r),o=this.options.core?.onError;return o?o(n,this):$t(this.options).warn(`${this.constructor.name}: ${n.message}`)(),n}}});function lt(e={}){if(e.coordinateEpoch!==void 0&&!Number.isFinite(e.coordinateEpoch))throw new Error("Spatial reference coordinate epoch must be a finite decimal year");return Object.freeze({crs:xr(e.crs||{state:"absent",provenance:"unknown"}),vertical:e.vertical?xr(e.vertical):void 0,coordinateEpoch:e.coordinateEpoch,coordinateFrame:e.coordinateFrame||"unknown",coordinateOrder:Object.freeze([...e.coordinateOrder||[]]),units:e.units?Object.freeze([...e.units]):void 0})}function xr(e){return e.state==="explicit"||e.state==="default"?Object.freeze({...e,definition:Er(e.definition),alternatives:e.alternatives?Object.freeze(e.alternatives.map(t=>Object.freeze({...t,definition:Er(t.definition)}))):void 0}):Object.freeze({...e})}function Er(e){return typeof e=="string"?e:ft(e)}function ft(e){return Array.isArray(e)?Object.freeze(e.map(t=>ft(t))):e&&typeof e=="object"?Object.freeze(Object.fromEntries(Object.entries(e).map(([t,r])=>[t,ft(r)]))):e}var Tr=u(()=>{});var Ar=u(()=>{Tr()});function dt(e){Dn(e.queryType,e.execution);let t=Object.freeze({fields:Object.freeze(e.schema.fields.map(o=>Object.freeze({...o,metadata:Object.freeze({...o.metadata})}))),metadata:Object.freeze({...e.schema.metadata})}),r=t.fields.map(o=>Object.freeze({name:o.name,type:o.type,nullable:o.nullable!==!1,role:e.columnRoles?.[o.name]||"attribute",title:Sr(o.metadata,"title"),description:Sr(o.metadata,"description"),metadata:o.metadata||Object.freeze({})})),n=Object.freeze({...e.capabilities});return Object.freeze({sourceType:e.sourceType,queryType:e.queryType,execution:Object.freeze({...e.execution}),name:e.name,description:e.description,schema:t,columns:Object.freeze(r),capabilities:n,queryCapabilities:n,...e.hasDefaultRowWindow?{hasDefaultRowWindow:!0}:{},spatial:e.spatial?Object.freeze({...e.spatial,bounds:e.spatial.bounds?Object.freeze({minimum:Object.freeze([...e.spatial.bounds.minimum]),maximum:Object.freeze([...e.spatial.bounds.maximum])}):void 0,coordinateReferenceSystems:e.spatial.coordinateReferenceSystems?Object.freeze([...e.spatial.coordinateReferenceSystems]):void 0,spatialReference:e.spatial.spatialReference?lt(e.spatial.spatialReference):void 0}):void 0,statistics:e.statistics?Object.freeze({...e.statistics}):void 0,levels:e.levels?Object.freeze(e.levels.map(o=>Object.freeze({...o,scale:o.scale?Object.freeze([...o.scale]):void 0}))):void 0})}function Dn(e,t){if(t.status==="metadata-only"){if(!t.reason.trim())throw new Error("Metadata-only scan support requires a concrete reason");return}if(!{table:["read","query"],raster:["getRaster"],"point-cloud":["scan"]}[e].includes(t.method))throw new Error(`Scan execution method "${t.method}" is not valid for ${e} queries`)}function Sr(e,t){return e?.[t]||void 0}var Rr=u(()=>{"use strict";Ar()});function ht(e){if(e.width!==void 0&&Cr(e.width,"width"),e.height!==void 0&&Cr(e.height,"height"),e.level!==void 0&&_r(e.level,"level"),e.bounds)for(let t=0;t<2;t++){let r=e.bounds[0][t],n=e.bounds[1][t];if(!Number.isFinite(r)||!Number.isFinite(n)||r>n)throw new Error("Raster query bounds must contain finite, ordered coordinates.")}for(let t of e.channels||[])_r(t,"channel");for(let[t,r]of Object.entries(e.slices||{})){if(!t)throw new Error("Raster query slice names must be non-empty.");if(Array.isArray(r)){if(r.length!==2||!r.every(Number.isFinite)||r[0]>r[1])throw new Error(`Raster query slice ${t} must be an ordered finite range.`)}else if(!Number.isFinite(r))throw new Error(`Raster query slice ${t} must be finite.`)}}function Cr(e,t){if(!Number.isSafeInteger(e)||e<1)throw new Error(`Raster query ${t} must be a positive safe integer.`)}function _r(e,t){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Raster query ${t} must be a non-negative safe integer.`)}var Nr=u(()=>{"use strict"});var mt=u(()=>{"use strict";Dt();Ft();ze();Xt();tr();or();ct();pr();wr();Nr();Rr()});var ue,Br=u(()=>{"use strict";ue=class e{buffer;byteLength;byteOffset;length;offset;lastWrittenByte;littleEndian;_data;_mark;_marks;textDecoder=new TextDecoder;textEncoder=new TextEncoder;constructor(t=8192,r={}){let n=!1;typeof t=="number"?t=new ArrayBuffer(t):(n=!0,this.lastWrittenByte=t.byteLength);let o=r.offset?r.offset>>>0:0,s=t.byteLength-o,c=o;(ArrayBuffer.isView(t)||t instanceof e)&&(t.byteLength!==t.buffer.byteLength&&(c=t.byteOffset+o),t=t.buffer),n?this.lastWrittenByte=s:this.lastWrittenByte=0,this.buffer=t,this.length=s,this.byteLength=s,this.byteOffset=c,this.offset=0,this.littleEndian=!0,this._data=new DataView(this.buffer,c,s),this._mark=0,this._marks=[]}available(t=1){return this.offset+t<=this.length}isLittleEndian(){return this.littleEndian}setLittleEndian(){return this.littleEndian=!0,this}isBigEndian(){return!this.littleEndian}setBigEndian(){return this.littleEndian=!1,this}skip(t=1){return this.offset+=t,this}seek(t){return this.offset=t,this}mark(){return this._mark=this.offset,this}reset(){return this.offset=this._mark,this}pushMark(){return this._marks.push(this.offset),this}popMark(){let t=this._marks.pop();if(t===void 0)throw new Error("Mark stack empty");return this.seek(t),this}rewind(){return this.offset=0,this}ensureAvailable(t=1){if(!this.available(t)){let n=(this.offset+t)*2,o=new Uint8Array(n);o.set(new Uint8Array(this.buffer)),this.buffer=o.buffer,this.length=this.byteLength=n,this._data=new DataView(this.buffer)}return this}readBoolean(){return this.readUint8()!==0}readInt8(){return this._data.getInt8(this.offset++)}readUint8(){return this._data.getUint8(this.offset++)}readByte(){return this.readUint8()}readBytes(t=1){let r=new Uint8Array(t);for(let n=0;n<t;n++)r[n]=this.readByte();return r}readInt16(){let t=this._data.getInt16(this.offset,this.littleEndian);return this.offset+=2,t}readUint16(){let t=this._data.getUint16(this.offset,this.littleEndian);return this.offset+=2,t}readInt32(){let t=this._data.getInt32(this.offset,this.littleEndian);return this.offset+=4,t}readUint32(){let t=this._data.getUint32(this.offset,this.littleEndian);return this.offset+=4,t}readFloat32(){let t=this._data.getFloat32(this.offset,this.littleEndian);return this.offset+=4,t}readFloat64(){let t=this._data.getFloat64(this.offset,this.littleEndian);return this.offset+=8,t}readChar(){return String.fromCharCode(this.readInt8())}readChars(t=1){let r="";for(let n=0;n<t;n++)r+=this.readChar();return r}readUtf8(t=1){return this.textDecoder.decode(this.readBytes(t))}writeBoolean(t){return this.writeUint8(t?255:0),this}writeInt8(t){return this.ensureAvailable(1),this._data.setInt8(this.offset++,t),this._updateLastWrittenByte(),this}writeUint8(t){return this.ensureAvailable(1),this._data.setUint8(this.offset++,t),this._updateLastWrittenByte(),this}writeByte(t){return this.writeUint8(t)}writeBytes(t){this.ensureAvailable(t.length);for(let r=0;r<t.length;r++)this._data.setUint8(this.offset++,t[r]);return this._updateLastWrittenByte(),this}writeInt16(t){return this.ensureAvailable(2),this._data.setInt16(this.offset,t,this.littleEndian),this.offset+=2,this._updateLastWrittenByte(),this}writeUint16(t){return this.ensureAvailable(2),this._data.setUint16(this.offset,t,this.littleEndian),this.offset+=2,this._updateLastWrittenByte(),this}writeInt32(t){return this.ensureAvailable(4),this._data.setInt32(this.offset,t,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeUint32(t){return this.ensureAvailable(4),this._data.setUint32(this.offset,t,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeFloat32(t){return this.ensureAvailable(4),this._data.setFloat32(this.offset,t,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeFloat64(t){return this.ensureAvailable(8),this._data.setFloat64(this.offset,t,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeChar(t){return this.writeUint8(t.charCodeAt(0))}writeChars(t){for(let r=0;r<t.length;r++)this.writeUint8(t.charCodeAt(r));return this}writeUtf8(t){let r=this.textEncoder.encode(t);return this.writeBytes(r)}toArray(){return new Uint8Array(this.buffer,this.byteOffset,this.lastWrittenByte)}_updateLastWrittenByte(){this.offset>this.lastWrittenByte&&(this.lastWrittenByte=this.offset)}}});function Z(e,t,r){switch(t){case p.BYTE:return e.readBytes(r);case p.CHAR:return Ln(e.readChars(r));case p.SHORT:return fe(r,e.readInt16.bind(e));case p.INT:return fe(r,e.readInt32.bind(e));case p.FLOAT:return fe(r,e.readFloat32.bind(e));case p.DOUBLE:return fe(r,e.readFloat64.bind(e));default:throw new Error(`NetCDF: non valid type ${t}`)}}function pt(e){switch(Number(e)){case p.BYTE:return"byte";case p.CHAR:return"char";case p.SHORT:return"short";case p.INT:return"int";case p.FLOAT:return"float";case p.DOUBLE:return"double";default:return"undefined"}}function Dr(e){switch(Number(e)){case p.BYTE:return 1;case p.CHAR:return 1;case p.SHORT:return 2;case p.INT:return 4;case p.FLOAT:return 4;case p.DOUBLE:return 8;default:return-1}}function gt(e){switch(String(e)){case"byte":return p.BYTE;case"char":return p.CHAR;case"short":return p.SHORT;case"int":return p.INT;case"float":return p.FLOAT;case"double":return p.DOUBLE;default:return-1}}function fe(e,t){if(e!==1){let r=new Array(e);for(let n=0;n<e;n++)r[n]=t();return r}return t()}function Ln(e){return e.charCodeAt(e.length-1)===0?e.substring(0,e.length-1):e}var p,yt=u(()=>{"use strict";p={BYTE:1,CHAR:2,SHORT:3,INT:4,FLOAT:5,DOUBLE:6}});function Lr(e,t){let r=e.readUint32(),n=On(e),o=Fr(e),s=Un(e,n.recordId,t);return{version:t,recordDimension:{length:r,id:n.recordId,name:n.recordName,recordStep:s.recordStep},dimensions:n.dimensions,variables:s.variables,attributes:o}}function On(e){let t=e.readUint32();if(t===j){if(e.readUint32()!==j)throw new Error("NetCDF: wrong empty tag for list of dimensions");return{recordId:0,recordName:"",dimensions:[]}}if(t!==Fn)throw new Error("NetCDF: wrong tag for list of dimensions");let r=e.readUint32(),n=new Array(r),o,s;for(let c=0;c<r;c++){let d=bt(e),m=e.readUint32();m===Pn&&(o=c,s=d),n[c]={name:d,size:m}}return{dimensions:n,recordId:o,recordName:s}}function Fr(e){let t=e.readUint32();if(t===j){if(e.readUint32()!==j)throw new Error("NetCDF: wrong empty tag for list of attributes");return[]}if(t!==In)throw new Error("NetCDF: wrong tag for list of attributes");let r=e.readUint32(),n=new Array(r);for(let o=0;o<r;o++){let s=bt(e),c=e.readUint32();if(c<1||c>6)throw new Error(`NetCDF: non valid type ${c}`);let d=e.readUint32(),m=Z(e,c,d);vr(e),n[o]={name:s,type:pt(c),value:m}}return n}function Un(e,t,r){let n=e.readUint32(),o=0;if(n===j){if(e.readUint32()!==j)throw new Error("NetCDF: wrong empty tag for list of variables");return{recordStep:o,variables:[]}}if(n!==vn)throw new Error("NetCDF: wrong tag for list of variables");let s=e.readUint32(),c=new Array(s);for(let d=0;d<s;d++){let m=bt(e),a=e.readUint32(),h=new Array(a);for(let x=0;x<a;x++)h[x]=e.readUint32();let l=Fr(e),f=e.readUint32();if(f<1&&f>6)throw new Error(`NetCDF: non valid type ${f}`);let y=e.readUint32(),g=e.readUint32();if(r===2){if(g>0)throw new Error("NetCDF: offsets larger than 4GB not supported");g=e.readUint32()}let w=!1;typeof t<"u"&&h[0]===t&&(o+=y,w=!0),c[d]={name:m,dimensions:h,attributes:l,type:pt(f),size:y,offset:g,record:w}}return{variables:c,recordStep:o}}function bt(e){let t=e.readUint32(),r=e.readChars(t);return vr(e),r}function vr(e){e.offset%4!==0&&e.skip(4-e.offset%4)}var j,Fn,vn,In,Pn,Ir=u(()=>{"use strict";yt();j=0,Fn=10,vn=11,In=12,Pn=0});function Pr(e,t){let r=gt(t.type),n=t.size/Dr(r),o=new Array(n);for(let s=0;s<n;s++)o[s]=Z(e,r,1);return o}function Or(e,t,r,n){let o=gt(t.type),s=t.dimensions.filter(a=>a!==r.id).reduce((a,h)=>a*n[h].size,1),c=r.length,d=new Array(c),m=r.recordStep;for(let a=0;a<c;a++){let h=e.offset;d[a]=Z(e,o,s),e.seek(h+m)}return d}var Ur=u(()=>{"use strict";yt()});var T,le=u(()=>{"use strict";Br();Ir();Ur();T=class{header;buffer;constructor(t){let r=new ue(t);r.setBigEndian();let n=r.readChars(3);if(n!=="CDF")throw new Error(`NetCDF: file should start with 'CDF', found ${n}`);let o=r.readByte();if(o>2)throw new Error(`NetCDF: unsupported version ${o}`);this.header=Lr(r,o),this.buffer=r}get version(){return this.header.version===1?"classic format":"64-bit offset format"}get recordDimension(){return this.header.recordDimension}get dimensions(){return this.header.dimensions}get attributes(){return this.header.attributes}get variables(){return this.header.variables}attributeExists(t){return this.attributes.find(n=>n.name===t)!==void 0}getAttribute(t){let r=this.attributes.find(n=>n.name===t);return r?r.value:null}dataVariableExists(t){return this.header.variables.find(function(n){return n.name===t})!==void 0}getDataVariableAsString(t){let r=this.getDataVariable(t);return r?r.join(""):null}getDataVariable(t){let r;if(typeof t=="string"?r=this.header.variables.find(function(n){return n.name===t}):r=t,r===void 0){let n;throw typeof t=="string"?n=t:typeof t=="object"&&(n=JSON.stringify(t)),new Error(`NetCDF: variable not found: ${n}`)}return this.buffer.seek(r.offset),r.record?Or(this.buffer,r,this.header.recordDimension,this.header.dimensions):Pr(this.buffer,r)}toString(){let t=[];t.push("DIMENSIONS");for(let n of this.dimensions)t.push(` ${n.name.padEnd(30)} = size: ${n.size}`);t.push(""),t.push("GLOBAL ATTRIBUTES");for(let n of this.attributes)t.push(` ${n.name.padEnd(30)} = ${n.value}`);let r=JSON.parse(JSON.stringify(this.variables));t.push(""),t.push("VARIABLES:");for(let n of r){n.value=this.getDataVariable(n);let o=JSON.stringify(n.value);o.length>50&&(o=o.substring(0,50)),Number.isNaN(n.value.length)||(o+=` (length: ${n.value.length})`),t.push(` ${n.name.padEnd(30)} = ${o}`)}return t.join(`
|
|
10
|
+
`)}}});var Y,wt=u(()=>{"use strict";Y={name:"NetCDF",id:"netcdf",module:"netcdf",encoding:"binary",format:"netcdf",extensions:["cdf","nc"],mimeTypes:["application/x-netcdf"],binary:!0}});function kr(e,t){return new xt(e,t)}function kn(e){switch(e.toLowerCase()){case"byte":return"int8";case"ubyte":return"uint8";case"short":return"int16";case"ushort":return"uint16";case"int":return"int32";case"uint":return"uint32";case"int64":return"int64";case"uint64":return"uint64";case"float":return"float32";case"double":return"float64";case"char":case"string":return"utf8";default:return"binary"}}function jn(e){if(e.bounds)throw new Error("NetCDF raster bounds are not supported.");if(e.level!==void 0)throw new Error("NetCDF raster levels are not supported.");if(e.width!==void 0||e.height!==void 0)throw new Error("NetCDF raster resampling is not supported.");if(e.channels?.length)throw new Error("NetCDF uses named variables instead of numeric channels.")}function Mn(e,t){let r=e.variables.find(o=>o.dimensions.length>0&&Hn(o.type)),n=t?.length?[...t]:r?[r.name]:[];if(n.length===0)throw new Error("NetCDF contains no numeric variables that can be read as raster data.");if(new Set(n).size!==n.length)throw new Error("NetCDF raster variables must not contain duplicates.");return n.map(o=>{let s=e.variables.find(c=>c.name===o);if(!s)throw new Error(`NetCDF variable not found: ${o}`);return Et(s.type),s})}function Wn(e,t){let r=new Set(e.dimensions.map(n=>n.name));for(let n of Object.keys(t||{}))if(!r.has(n))throw new Error(`NetCDF dimension not found: ${n}`)}function $n(e,t,r,n,o){let s=t.map((a,h)=>{let l=r[h],f=n[a];if(f===void 0)return{start:0,stop:l,remove:!1};if(typeof f!="number"){let[y,g]=f;if(!Number.isSafeInteger(y)||!Number.isSafeInteger(g)||y<0||g<y||g>l)throw new Error(`NetCDF slice ${a} must be a valid half-open range within 0..${l}.`);return{start:y,stop:g,remove:!1}}if(!Number.isSafeInteger(f)||f<0||f>=l)throw new Error(`NetCDF slice ${a} must be an index within 0..${l-1}.`);return{start:f,stop:f+1,remove:!0}}),c=r.map((a,h)=>r.slice(h+1).reduce((l,f)=>l*f,1)),d=[],m=(a,h)=>{if(R(o),a===s.length){let f=e[h];if(typeof f!="number")throw new Error("NetCDF raster variables must contain numeric values.");d.push(f);return}let l=s[a];for(let f=l.start;f<l.stop;f++)m(a+1,h+f*c[a])};return m(0,0),{values:d,dimensionNames:t.filter((a,h)=>!s[h].remove),shape:s.map(a=>a.stop-a.start).filter((a,h)=>!s[h].remove)}}function jr(e){return Array.isArray(e)?e.flatMap(jr):ArrayBuffer.isView(e)?Array.from(e):[e]}function Hn(e){try{return Et(e),!0}catch{return!1}}function Et(e){switch(e.toLowerCase()){case"byte":return"int8";case"ubyte":return"uint8";case"short":return"int16";case"ushort":return"uint16";case"int":return"int32";case"uint":return"uint32";case"float":return"float32";case"double":return"float64";default:throw new Error(`NetCDF variable type is not supported as raster data: ${e}`)}}function qn(e,t){switch(t){case"int8":return Int8Array.from(e);case"uint8":return Uint8Array.from(e);case"int16":return Int16Array.from(e);case"uint16":return Uint16Array.from(e);case"int32":return Int32Array.from(e);case"uint32":return Uint32Array.from(e);case"float32":return Float32Array.from(e);case"float64":return Float64Array.from(e)}}function zn(e){let t=e.attributes.find(n=>n.name==="_FillValue"||n.name==="missing_value"),r=Number(t?.value);return t&&Number.isFinite(r)?r:null}function Vn(e,t){return e.length===t.length&&e.every((r,n)=>r===t[n])}function Gn(e,t){let n={dimensions:e.dimensions.map(o=>t.dimensions[o]).filter(Boolean).map((o,s)=>`${o.name}[${Tt(t,e.dimensions[s])}]`).join(",")};for(let o of e.attributes)n[o.name]=String(o.value);return{name:e.name,type:kn(e.type),nullable:!0,metadata:n}}function Qn(e){let t={};for(let[r,n]of e.dimensions.entries())t[`dimension:${n.name}`]=String(Tt(e,r));return t}function Tt(e,t){let r=e.dimensions[t];return t===e.recordDimension.id?e.recordDimension.length:r?.size||0}function Jn(e,t){let n=e.headers.get("content-range")?.match(/\/([0-9]+)$/)?.[1];return Number(n||e.headers.get("content-length")||t)}function R(e){if(e?.aborted)throw new DOMException("The operation was aborted","AbortError")}var xt,Mr=u(()=>{"use strict";mt();le();xt=class e extends J{static HEADER_RANGE_SIZE=64*1024;static MAX_HEADER_RANGE_SIZE=4*1024*1024;headerPromise=null;rasterQueryCapabilities=Object.freeze({bounds:"unsupported",level:"unsupported",variables:"pushdown",slices:"residual",streaming:!1,cancellation:!0});constructor(t,r={}){super(t,r)}async getQueryMetadata(t={}){R(t.signal);let{header:r,byteLength:n}=await this.getHeader(t.signal);R(t.signal);let s={fields:r.variables.map(c=>Gn(c,r)),metadata:Qn(r)};return dt({sourceType:"netcdf",queryType:"raster",execution:{status:"supported",method:"getRaster"},name:typeof this.data=="string"?this.data.split("/").pop():void 0,schema:s,capabilities:{bounds:"unsupported",levelOfDetail:"unsupported",raster:this.rasterQueryCapabilities},statistics:{byteLength:n,rowCount:r.recordDimension.length||void 0}})}async getRaster(t={}){ht(t),jn(t),R(t.signal);let r=await this.loadReader(t.signal);R(t.signal),Wn(r.header,t.slices);let o=Mn(r.header,t.variables).map(a=>{R(t.signal);let h=a.dimensions.map(w=>r.header.dimensions[w]?.name||`dimension_${w}`),l=a.dimensions.map(w=>Tt(r.header,w)),f=jr(r.getDataVariable(a)),y=$n(f,h,l,t.slices||{},t.signal),g=Et(a.type);return{variable:a,dimensionNames:y.dimensionNames,shape:y.shape,data:qn(y.values,g),dtype:g}}),s=o[0];for(let a of o.slice(1))if(a.dtype!==s.dtype||!Vn(a.shape,s.shape))throw new Error("NetCDF raster variables must retain the same shape and numeric type after slicing.");let c=s.shape.at(-1)??1,d=s.shape.length<2?1:s.shape.slice(0,-1).reduce((a,h)=>a*h,1),m=zn(s.variable);return{data:o.length===1?s.data:o.map(a=>a.data),width:c,height:d,bandCount:o.length,dtype:s.dtype,interleaved:!1,noData:m,metadata:{variables:o.map(a=>a.variable.name),dimensions:s.dimensionNames,shape:s.shape,slices:{...t.slices}}}}async loadReader(t){let r;if(typeof this.data=="string"){let n=await this.fetch(this.url,{signal:t});if(!n.ok)throw new Error(`NetCDF request failed with status ${n.status}.`);r=await n.arrayBuffer()}else r=await this.data.arrayBuffer();return R(t),new T(r)}async getHeader(t){R(t),this.headerPromise||(this.headerPromise=this.loadHeader().catch(n=>{throw this.headerPromise=null,n}));let r=await this.headerPromise;return R(t),r}async loadHeader(){if(typeof this.data!="string"){let s=await this.data.arrayBuffer();return{header:new T(s).header,byteLength:s.byteLength}}let t=e.HEADER_RANGE_SIZE,r=null,n=null,o;for(;t<=e.MAX_HEADER_RANGE_SIZE;){if(r=await this.fetch(this.url,{headers:{Range:`bytes=0-${t-1}`}}),!r.ok)throw new Error(`NetCDF request failed with status ${r.status}.`);n=await r.arrayBuffer();let s=Jn(r,n.byteLength);if(r.status===206&&!r.headers.has("Content-Range")&&n.byteLength===t){let c=await this.fetch(this.url,{method:"HEAD"}),d=c.headers.get("Content-Length");if(await c.body?.cancel(),c.status!==200||!d||!/^\d+$/.test(d)||!Number.isSafeInteger(Number(d))||Number(d)<n.byteLength)throw new Error("NetCDF file size unavailable: expose Content-Range or provide HEAD Content-Length");s=Number(d)}try{return{header:new T(n).header,byteLength:s}}catch(c){if(o=c,r.status!==206||n.byteLength<t)throw c;t*=2}}throw o||new Error("NetCDF header exceeds the maximum metadata range.")}}});var $r={};Ct($r,{NetCDFLoaderWithParser:()=>de,NetCDFWorkerLoaderWithParser:()=>Wr});function Kn(e,t){let r=new T(e),n={};if(t?.netcdf?.loadData)for(let o of r.variables)n[o.name]=r.getDataVariable(o);return{loaderData:r.header,data:n}}var Mi,Zn,Wi,Yn,Wr,de,At=u(()=>{"use strict";Mr();le();he();he();({preload:Mi,...Zn}=I),{preload:Wi,...Yn}=I,Wr={...Zn},de={createDataSourceSync:kr,...Yn,parse:async(e,t)=>Kn(e,t)}});async function eo(){let{NetCDFLoaderWithParser:e}=await Promise.resolve().then(()=>(At(),$r));return e}var Xn,I,he=u(()=>{"use strict";wt();Xn="5.0.0-beta.11";I={testURL:e=>/\.(?:cdf|nc)(?:$|[?#])/i.test(e),fromUrl:!0,fromBlob:!0,type:"netcdf",...Y,dataType:null,batchType:null,name:"NetCDF",id:"mvt",module:"scientific",version:Xn,extensions:["cdf","nc"],mimeTypes:["application/netcdf","application/x-netcdf"],category:"image",binary:!0,options:{netcdf:{loadVariables:!1}},preload:eo}});var to={};Ct(to,{FetchError:()=>i.FetchError,JSONLoader:()=>ut,NetCDFFormat:()=>Y,NetCDFLoader:()=>I,NetCDFLoaderWithParser:()=>de,NetCDFReader:()=>T,NullLoader:()=>i.NullLoader,RequestScheduler:()=>k,_BrowserFileSystem:()=>i._BrowserFileSystem,_fetchProgress:()=>i._fetchProgress,_selectSource:()=>i._selectSource,_unregisterLoaders:()=>i._unregisterLoaders,assert:()=>ge,compareLoaderOptions:()=>i.compareLoaderOptions,concatenateArrayBuffersAsync:()=>Ye,coreApi:()=>i.coreApi,createDataSource:()=>i.createDataSource,createDataSourceSync:()=>i.createDataSourceSync,document:()=>xe,encode:()=>i.encode,encodeInBatches:()=>i.encodeInBatches,encodeSync:()=>i.encodeSync,encodeTable:()=>i.encodeTable,encodeTableAsText:()=>i.encodeTableAsText,encodeTableInBatches:()=>i.encodeTableInBatches,encodeText:()=>i.encodeText,encodeTextSync:()=>i.encodeTextSync,encodeURLtoURL:()=>i.encodeURLtoURL,fetchFile:()=>i.fetchFile,forEach:()=>Ze,getLoaderOptions:()=>i.getLoaderOptions,getPathPrefix:()=>at,global:()=>we,isAsyncIterable:()=>Me,isBrowser:()=>Ee,isIterable:()=>je,isIterator:()=>We,isPromise:()=>ke,isPureObject:()=>V,isReadableStream:()=>He,isResponse:()=>$e,isWorker:()=>Te,isWritableStream:()=>qe,load:()=>i.load,loadInBatches:()=>i.loadInBatches,makeIterator:()=>i.makeIterator,makeLineIterator:()=>Qe,makeNumberedLineIterator:()=>Je,makeStream:()=>i.makeStream,makeTextDecoderIterator:()=>Ve,makeTextEncoderIterator:()=>Ge,parse:()=>i.parse,parseFile:()=>i.parseFile,parseInBatches:()=>i.parseInBatches,parseSync:()=>i.parseSync,preload:()=>i.preload,preloadSync:()=>i.preloadSync,readArrayBuffer:()=>i.readArrayBuffer,registerLoaders:()=>i.registerLoaders,resolvePath:()=>Q,selectLoader:()=>i.selectLoader,selectLoaderSync:()=>i.selectLoaderSync,self:()=>ye,setLoaderOptions:()=>i.setLoaderOptions,setPathPrefix:()=>it,window:()=>be});var i=Zr(Bt(),1);mt();le();wt();he();At();return Yr(to);})();
|
|
11
11
|
return __exports__;
|
|
12
12
|
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** NumPy binary array format. */
|
|
2
|
+
export declare const NPYFormat: {
|
|
3
|
+
readonly name: "NPY";
|
|
4
|
+
readonly id: "npy";
|
|
5
|
+
readonly module: "scientific";
|
|
6
|
+
readonly encoding: "binary";
|
|
7
|
+
readonly format: "npy";
|
|
8
|
+
readonly extensions: ["npy"];
|
|
9
|
+
readonly mimeTypes: [];
|
|
10
|
+
readonly binary: true;
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=npy-format.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"npy-format.d.ts","sourceRoot":"","sources":["../src/npy-format.ts"],"names":[],"mappings":"AAMA,iCAAiC;AACjC,eAAO,MAAM,SAAS;;;;;;;;;CASK,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// loaders.gl
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
// Copyright (c) vis.gl contributors
|
|
4
|
+
/** NumPy binary array format. */
|
|
5
|
+
export const NPYFormat = {
|
|
6
|
+
name: 'NPY',
|
|
7
|
+
id: 'npy',
|
|
8
|
+
module: 'scientific',
|
|
9
|
+
encoding: 'binary',
|
|
10
|
+
format: 'npy',
|
|
11
|
+
extensions: ['npy'],
|
|
12
|
+
mimeTypes: [],
|
|
13
|
+
binary: true
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=npy-format.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"npy-format.js","sourceRoot":"","sources":["../src/npy-format.ts"],"names":[],"mappings":"AAAA,aAAa;AACb,+BAA+B;AAC/B,oCAAoC;AAIpC,iCAAiC;AACjC,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,IAAI,EAAE,KAAK;IACX,EAAE,EAAE,KAAK;IACT,MAAM,EAAE,YAAY;IACpB,QAAQ,EAAE,QAAQ;IAClB,MAAM,EAAE,KAAK;IACb,UAAU,EAAE,CAAC,KAAK,CAAC;IACnB,SAAS,EAAE,EAAE;IACb,MAAM,EAAE,IAAI;CACa,CAAC"}
|
|
@@ -27,52 +27,51 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
29
|
|
|
30
|
-
//
|
|
31
|
-
var
|
|
32
|
-
__export(
|
|
33
|
-
|
|
30
|
+
// dist/npy-loader-types.js
|
|
31
|
+
var npy_loader_types_exports = {};
|
|
32
|
+
__export(npy_loader_types_exports, {
|
|
33
|
+
NPYLoader: () => NPYLoader
|
|
34
34
|
});
|
|
35
|
-
module.exports = __toCommonJS(
|
|
35
|
+
module.exports = __toCommonJS(npy_loader_types_exports);
|
|
36
36
|
|
|
37
|
-
//
|
|
38
|
-
var
|
|
39
|
-
name: "
|
|
40
|
-
id: "
|
|
41
|
-
module: "
|
|
37
|
+
// dist/npy-format.js
|
|
38
|
+
var NPYFormat = {
|
|
39
|
+
name: "NPY",
|
|
40
|
+
id: "npy",
|
|
41
|
+
module: "scientific",
|
|
42
42
|
encoding: "binary",
|
|
43
|
-
format: "
|
|
44
|
-
extensions: ["
|
|
45
|
-
mimeTypes: [
|
|
43
|
+
format: "npy",
|
|
44
|
+
extensions: ["npy"],
|
|
45
|
+
mimeTypes: [],
|
|
46
46
|
binary: true
|
|
47
47
|
};
|
|
48
48
|
|
|
49
|
-
//
|
|
50
|
-
var VERSION =
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
49
|
+
// dist/npy-loader-types.js
|
|
50
|
+
var VERSION = true ? "5.0.0-beta.11" : "latest";
|
|
51
|
+
var NPY_MAGIC_NUMBER = new Uint8Array([147, 78, 85, 77, 80, 89]);
|
|
52
|
+
async function preload() {
|
|
53
|
+
const { NPYLoaderWithParser } = await import("@loaders.gl/scientific/npy-loader");
|
|
54
|
+
return NPYLoaderWithParser;
|
|
54
55
|
}
|
|
55
|
-
var
|
|
56
|
-
...
|
|
57
|
-
module: "scientific",
|
|
56
|
+
var NPYLoader = {
|
|
57
|
+
...NPYFormat,
|
|
58
58
|
dataType: null,
|
|
59
59
|
batchType: null,
|
|
60
|
-
name: "
|
|
60
|
+
name: "NPY",
|
|
61
|
+
id: "npy",
|
|
62
|
+
module: "scientific",
|
|
61
63
|
version: VERSION,
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
throw new Error(
|
|
71
|
-
"NetCDFSourceLoader requires async load() or an explicit @loaders.gl/scientific/netcdf/netcdf-source-loader import"
|
|
72
|
-
);
|
|
73
|
-
}
|
|
64
|
+
worker: true,
|
|
65
|
+
extensions: ["npy"],
|
|
66
|
+
mimeTypes: [],
|
|
67
|
+
tests: [NPY_MAGIC_NUMBER.buffer],
|
|
68
|
+
options: {
|
|
69
|
+
npy: {}
|
|
70
|
+
},
|
|
71
|
+
preload
|
|
74
72
|
};
|
|
75
73
|
// Annotate the CommonJS export names for ESM import in node:
|
|
76
74
|
0 && (module.exports = {
|
|
77
|
-
|
|
75
|
+
NPYLoader
|
|
78
76
|
});
|
|
77
|
+
//# sourceMappingURL=npy-loader-types.cjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/npy-loader-types.ts", "../src/npy-format.ts"],
|
|
4
|
+
"sourcesContent": ["// loaders.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nimport type {Loader, LoaderOptions} from '@loaders.gl/core/loader-utils';\nimport {NPYFormat} from './npy-format';\n// @ts-ignore __VERSION__ is injected by the package build.\nconst VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'latest';\nimport type {NPYTile} from './lib/parsers/parse-npy';\n\n// \\x93NUMPY\nconst NPY_MAGIC_NUMBER = new Uint8Array([147, 78, 85, 77, 80, 89]);\n\n/** NPYLoader for numpy tiles */\nexport type NPYLoaderOptions = LoaderOptions & {\n /** NPYLoader for numpy tiles */\n npy?: {\n /** Override the URL to the worker bundle (by default loads from unpkg.com) */\n workerUrl?: string;\n };\n};\n\n/** Preloads the parser-bearing NPY loader implementation. */\nasync function preload() {\n const {NPYLoaderWithParser} = await import('@loaders.gl/scientific/npy-loader');\n return NPYLoaderWithParser;\n}\n\n/** Metadata-only worker loader for numpy \"tiles\". */\nexport const NPYLoader = {\n ...NPYFormat,\n dataType: null as any as NPYTile,\n batchType: null as never,\n\n name: 'NPY',\n id: 'npy',\n module: 'scientific',\n version: VERSION,\n worker: true,\n extensions: ['npy'],\n mimeTypes: [],\n tests: [NPY_MAGIC_NUMBER.buffer],\n options: {\n npy: {}\n },\n preload\n} as const satisfies Loader<NPYTile, never, NPYLoaderOptions>;\n", "// loaders.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nimport type {Format} from '@loaders.gl/core/loader-utils';\n\n/** NumPy binary array format. */\nexport const NPYFormat = {\n name: 'NPY',\n id: 'npy',\n module: 'scientific',\n encoding: 'binary',\n format: 'npy',\n extensions: ['npy'],\n mimeTypes: [],\n binary: true\n} as const satisfies Format;\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;ACOO,IAAM,YAAY;EACvB,MAAM;EACN,IAAI;EACJ,QAAQ;EACR,UAAU;EACV,QAAQ;EACR,YAAY,CAAC,KAAK;EAClB,WAAW,CAAA;EACX,QAAQ;;;;ADRV,IAAM,UAAU,OAAoC,kBAAe;AAInE,IAAM,mBAAmB,IAAI,WAAW,CAAC,KAAK,IAAI,IAAI,IAAI,IAAI,EAAE,CAAC;AAYjE,eAAe,UAAO;AACpB,QAAM,EAAC,oBAAmB,IAAI,MAAM,OAAO,mCAAmC;AAC9E,SAAO;AACT;AAGO,IAAM,YAAY;EACvB,GAAG;EACH,UAAU;EACV,WAAW;EAEX,MAAM;EACN,IAAI;EACJ,QAAQ;EACR,SAAS;EACT,QAAQ;EACR,YAAY,CAAC,KAAK;EAClB,WAAW,CAAA;EACX,OAAO,CAAC,iBAAiB,MAAM;EAC/B,SAAS;IACP,KAAK,CAAA;;EAEP;;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type { LoaderOptions } from '@loaders.gl/core/loader-utils';
|
|
2
|
+
import type { NPYTile } from "./lib/parsers/parse-npy.js";
|
|
3
|
+
/** NPYLoader for numpy tiles */
|
|
4
|
+
export type NPYLoaderOptions = LoaderOptions & {
|
|
5
|
+
/** NPYLoader for numpy tiles */
|
|
6
|
+
npy?: {
|
|
7
|
+
/** Override the URL to the worker bundle (by default loads from unpkg.com) */
|
|
8
|
+
workerUrl?: string;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
/** Preloads the parser-bearing NPY loader implementation. */
|
|
12
|
+
declare function preload(): Promise<{
|
|
13
|
+
readonly parseSync: typeof import("./lib/parsers/parse-npy").parseNPY;
|
|
14
|
+
readonly parse: (arrayBuffer: ArrayBuffer, options?: LoaderOptions) => Promise<NPYTile>;
|
|
15
|
+
readonly dataType: NPYTile;
|
|
16
|
+
readonly batchType: never;
|
|
17
|
+
readonly name: "NPY";
|
|
18
|
+
readonly id: "npy";
|
|
19
|
+
readonly module: "scientific";
|
|
20
|
+
readonly version: any;
|
|
21
|
+
readonly worker: true;
|
|
22
|
+
readonly extensions: ["npy"];
|
|
23
|
+
readonly mimeTypes: [];
|
|
24
|
+
readonly tests: [ArrayBuffer];
|
|
25
|
+
readonly options: {
|
|
26
|
+
readonly npy: {};
|
|
27
|
+
};
|
|
28
|
+
readonly encoding: "binary";
|
|
29
|
+
readonly format: "npy";
|
|
30
|
+
readonly binary: true;
|
|
31
|
+
}>;
|
|
32
|
+
/** Metadata-only worker loader for numpy "tiles". */
|
|
33
|
+
export declare const NPYLoader: {
|
|
34
|
+
readonly dataType: NPYTile;
|
|
35
|
+
readonly batchType: never;
|
|
36
|
+
readonly name: "NPY";
|
|
37
|
+
readonly id: "npy";
|
|
38
|
+
readonly module: "scientific";
|
|
39
|
+
readonly version: any;
|
|
40
|
+
readonly worker: true;
|
|
41
|
+
readonly extensions: ["npy"];
|
|
42
|
+
readonly mimeTypes: [];
|
|
43
|
+
readonly tests: [ArrayBuffer];
|
|
44
|
+
readonly options: {
|
|
45
|
+
readonly npy: {};
|
|
46
|
+
};
|
|
47
|
+
readonly preload: typeof preload;
|
|
48
|
+
readonly encoding: "binary";
|
|
49
|
+
readonly format: "npy";
|
|
50
|
+
readonly binary: true;
|
|
51
|
+
};
|
|
52
|
+
export {};
|
|
53
|
+
//# sourceMappingURL=npy-loader-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"npy-loader-types.d.ts","sourceRoot":"","sources":["../src/npy-loader-types.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAS,aAAa,EAAC,MAAM,+BAA+B,CAAC;AAIzE,OAAO,KAAK,EAAC,OAAO,EAAC,mCAAgC;AAKrD,gCAAgC;AAChC,MAAM,MAAM,gBAAgB,GAAG,aAAa,GAAG;IAC7C,gCAAgC;IAChC,GAAG,CAAC,EAAE;QACJ,8EAA8E;QAC9E,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,CAAC;CACH,CAAC;AAEF,6DAA6D;AAC7D,iBAAe,OAAO;;;uBAQK,OAAO;wBACb,KAAK;;;;;;;;;;;;;;;GANzB;AAED,qDAAqD;AACrD,eAAO,MAAM,SAAS;uBAEK,OAAO;wBACb,KAAK;;;;;;;;;;;;;;;;CAcmC,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
// loaders.gl
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
// Copyright (c) vis.gl contributors
|
|
4
|
+
import { NPYFormat } from "./npy-format.js";
|
|
5
|
+
// @ts-ignore __VERSION__ is injected by the package build.
|
|
6
|
+
const VERSION = typeof "5.0.0-beta.11" !== 'undefined' ? "5.0.0-beta.11" : 'latest';
|
|
7
|
+
// \x93NUMPY
|
|
8
|
+
const NPY_MAGIC_NUMBER = new Uint8Array([147, 78, 85, 77, 80, 89]);
|
|
9
|
+
/** Preloads the parser-bearing NPY loader implementation. */
|
|
10
|
+
async function preload() {
|
|
11
|
+
const { NPYLoaderWithParser } = await import('@loaders.gl/scientific/npy-loader');
|
|
12
|
+
return NPYLoaderWithParser;
|
|
13
|
+
}
|
|
14
|
+
/** Metadata-only worker loader for numpy "tiles". */
|
|
15
|
+
export const NPYLoader = {
|
|
16
|
+
...NPYFormat,
|
|
17
|
+
dataType: null,
|
|
18
|
+
batchType: null,
|
|
19
|
+
name: 'NPY',
|
|
20
|
+
id: 'npy',
|
|
21
|
+
module: 'scientific',
|
|
22
|
+
version: VERSION,
|
|
23
|
+
worker: true,
|
|
24
|
+
extensions: ['npy'],
|
|
25
|
+
mimeTypes: [],
|
|
26
|
+
tests: [NPY_MAGIC_NUMBER.buffer],
|
|
27
|
+
options: {
|
|
28
|
+
npy: {}
|
|
29
|
+
},
|
|
30
|
+
preload
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=npy-loader-types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"npy-loader-types.js","sourceRoot":"","sources":["../src/npy-loader-types.ts"],"names":[],"mappings":"AAAA,aAAa;AACb,+BAA+B;AAC/B,oCAAoC;AAGpC,OAAO,EAAC,SAAS,EAAC,wBAAqB;AACvC,2DAA2D;AAC3D,MAAM,OAAO,GAAG,sBAAkB,KAAK,WAAW,CAAC,CAAC,iBAAa,CAAC,CAAC,QAAQ,CAAC;AAG5E,YAAY;AACZ,MAAM,gBAAgB,GAAG,IAAI,UAAU,CAAC,CAAC,GAAG,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC;AAWnE,6DAA6D;AAC7D,KAAK,UAAU,OAAO;IACpB,MAAM,EAAC,mBAAmB,EAAC,GAAG,MAAM,MAAM,CAAC,mCAAmC,CAAC,CAAC;IAChF,OAAO,mBAAmB,CAAC;AAC7B,CAAC;AAED,qDAAqD;AACrD,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,GAAG,SAAS;IACZ,QAAQ,EAAE,IAAsB;IAChC,SAAS,EAAE,IAAa;IAExB,IAAI,EAAE,KAAK;IACX,EAAE,EAAE,KAAK;IACT,MAAM,EAAE,YAAY;IACpB,OAAO,EAAE,OAAO;IAChB,MAAM,EAAE,IAAI;IACZ,UAAU,EAAE,CAAC,KAAK,CAAC;IACnB,SAAS,EAAE,EAAE;IACb,KAAK,EAAE,CAAC,gBAAgB,CAAC,MAAM,CAAC;IAChC,OAAO,EAAE;QACP,GAAG,EAAE,EAAE;KACR;IACD,OAAO;CACoD,CAAC"}
|