@deck.gl/jupyter-widget 9.2.0-beta.4 → 9.2.0

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/dist/index.js CHANGED
@@ -549,7 +549,7 @@ __p+='`),u}),o+=`';
549
549
  } catch (error) {
550
550
  console.error(error);
551
551
  throw error;
552
- }`}function bB(t,e=!0,r){let n=r||new Set;if(t){if(tH(t))n.add(t);else if(tH(t.buffer))n.add(t.buffer);else if(!ArrayBuffer.isView(t)){if(e&&typeof t=="object")for(let i in t)bB(t[i],e,n)}}return r===void 0?Array.from(n):[]}function tH(t){return t?t instanceof ArrayBuffer||typeof MessagePort<"u"&&t instanceof MessagePort||typeof ImageBitmap<"u"&&t instanceof ImageBitmap||typeof OffscreenCanvas<"u"&&t instanceof OffscreenCanvas:!1}var wB=()=>{},Fm=class{name;source;url;terminated=!1;worker;onMessage;onError;_loadableURL="";static isSupported(){return typeof Worker<"u"&&bc||typeof k_<"u"&&!bc}constructor(e){let{name:r,source:n,url:i}=e;Gc(n||i),this.name=r,this.source=n,this.url=i,this.onMessage=wB,this.onError=o=>console.log(o),this.worker=bc?this._createBrowserWorker():this._createNodeWorker()}destroy(){this.onMessage=wB,this.onError=wB,this.worker.terminate(),this.terminated=!0}get isRunning(){return Boolean(this.onMessage)}postMessage(e,r){r=r||bB(e),this.worker.postMessage(e,r)}_getErrorFromErrorEvent(e){let r="Failed to load ";return r+=`worker ${this.name} from ${this.url}. `,e.message&&(r+=`${e.message} in `),e.lineno&&(r+=`:${e.lineno}:${e.colno}`),new Error(r)}_createBrowserWorker(){this._loadableURL=Jj({source:this.source,url:this.url});let e=new Worker(this._loadableURL,{name:this.name});return e.onmessage=r=>{r.data?this.onMessage(r.data):this.onError(new Error("No data received"))},e.onerror=r=>{this.onError(this._getErrorFromErrorEvent(r)),this.terminated=!0},e.onmessageerror=r=>console.error(r),e}_createNodeWorker(){let e;if(this.url){let n=this.url.includes(":/")||this.url.startsWith("/")?this.url:`./${this.url}`;e=new k_(n,{eval:!1})}else if(this.source)e=new k_(this.source,{eval:!0});else throw new Error("no worker");return e.on("message",r=>{this.onMessage(r)}),e.on("error",r=>{this.onError(r)}),e.on("exit",r=>{}),e}};var N2=class{name="unnamed";source;url;maxConcurrency=1;maxMobileConcurrency=1;onDebug=()=>{};reuseWorkers=!0;props={};jobQueue=[];idleQueue=[];count=0;isDestroyed=!1;static isSupported(){return Fm.isSupported()}constructor(e){this.source=e.source,this.url=e.url,this.setProps(e)}destroy(){this.idleQueue.forEach(e=>e.destroy()),this.isDestroyed=!0}setProps(e){this.props={...this.props,...e},e.name!==void 0&&(this.name=e.name),e.maxConcurrency!==void 0&&(this.maxConcurrency=e.maxConcurrency),e.maxMobileConcurrency!==void 0&&(this.maxMobileConcurrency=e.maxMobileConcurrency),e.reuseWorkers!==void 0&&(this.reuseWorkers=e.reuseWorkers),e.onDebug!==void 0&&(this.onDebug=e.onDebug)}async startJob(e,r=(i,o,s)=>i.done(s),n=(i,o)=>i.error(o)){let i=new Promise(o=>(this.jobQueue.push({name:e,onMessage:r,onError:n,onStart:o}),this));return this._startQueuedJob(),await i}async _startQueuedJob(){if(!this.jobQueue.length)return;let e=this._getAvailableWorker();if(!e)return;let r=this.jobQueue.shift();if(r){this.onDebug({message:"Starting job",name:r.name,workerThread:e,backlog:this.jobQueue.length});let n=new D2(r.name,e);e.onMessage=i=>r.onMessage(n,i.type,i.payload),e.onError=i=>r.onError(n,i),r.onStart(n);try{await n.result}catch(i){console.error(`Worker exception: ${i}`)}finally{this.returnWorkerToQueue(e)}}}returnWorkerToQueue(e){!bc||this.isDestroyed||!this.reuseWorkers||this.count>this._getMaxConcurrency()?(e.destroy(),this.count--):this.idleQueue.push(e),this.isDestroyed||this._startQueuedJob()}_getAvailableWorker(){if(this.idleQueue.length>0)return this.idleQueue.shift()||null;if(this.count<this._getMaxConcurrency()){this.count++;let e=`${this.name.toLowerCase()} (#${this.count} of ${this.maxConcurrency})`;return new Fm({name:e,source:this.source,url:this.url})}return null}_getMaxConcurrency(){return Qj?this.maxMobileConcurrency:this.maxConcurrency}};var sye={maxConcurrency:3,maxMobileConcurrency:1,reuseWorkers:!0,onDebug:()=>{}},EA=class{props;workerPools=new Map;static isSupported(){return Fm.isSupported()}static getWorkerFarm(e={}){return EA._workerFarm=EA._workerFarm||new EA({}),EA._workerFarm.setProps(e),EA._workerFarm}constructor(e){this.props={...sye},this.setProps(e),this.workerPools=new Map}destroy(){for(let e of this.workerPools.values())e.destroy();this.workerPools=new Map}setProps(e){this.props={...this.props,...e};for(let r of this.workerPools.values())r.setProps(this._getWorkerPoolProps())}getWorkerPool(e){let{name:r,source:n,url:i}=e,o=this.workerPools.get(r);return o||(o=new N2({name:r,source:n,url:i}),o.setProps(this._getWorkerPoolProps()),this.workerPools.set(r,o)),o}_getWorkerPoolProps(){return{maxConcurrency:this.props.maxConcurrency,maxMobileConcurrency:this.props.maxMobileConcurrency,reuseWorkers:this.props.reuseWorkers,onDebug:this.props.onDebug}}},zm=EA;Dr(zm,"_workerFarm");function TB(t,e={}){let r=e[t.id]||{},n=bc?`${t.id}-worker.js`:`${t.id}-worker-node.js`,i=r.workerUrl;if(!i&&t.id==="compression"&&(i=e.workerUrl),e._workerType==="test"&&(bc?i=`modules/${t.module}/dist/${n}`:i=`modules/${t.module}/src/workers/${t.id}-worker-node.ts`),!i){let o=t.version;o==="latest"&&(o=Kj);let s=o?`@${o}`:"";i=`https://unpkg.com/@loaders.gl/${t.module}${s}/dist/${n}`}return Gc(i),i}function EB(t,e=B2){Gc(t,"no worker provided");let r=t.version;return!(!e||!r)}var MB={};async function fp(t,e=null,r={},n=null){return e&&(t=rH(t,e,r,n)),MB[t]=MB[t]||aye(t),await MB[t]}function rH(t,e,r={},n=null){if(!r.useLocalLibraries&&t.startsWith("http"))return t;n=n||t;let i=r.modules||{};return i[n]?i[n]:bc?r.CDN?(Gc(r.CDN.startsWith("http")),`${r.CDN}/${e}@${B2}/dist/libs/${n}`):k2?`../src/libs/${n}`:`modules/${e}/src/libs/${n}`:`modules/${e}/dist/libs/${n}`}async function aye(t){if(t.endsWith("wasm"))return await lye(t);if(!bc)try{let{requireFromFile:r}=globalThis.loaders||{};return await r?.(t)}catch(r){return console.error(r),null}if(k2)return importScripts(t);let e=await uye(t);return cye(e,t)}function cye(t,e){if(!bc){let{requireFromString:n}=globalThis.loaders||{};return n?.(t,e)}if(k2)return eval.call(globalThis,t),null;let r=document.createElement("script");r.id=e;try{r.appendChild(document.createTextNode(t))}catch{r.text=t}return document.body.appendChild(r),null}async function lye(t){let{readFileAsArrayBuffer:e}=globalThis.loaders||{};return bc||!e||t.startsWith("http")?await(await fetch(t)).arrayBuffer():await e(t)}async function uye(t){let{readFileAsText:e}=globalThis.loaders||{};return bc||!e||t.startsWith("http")?await(await fetch(t)).text():await e(t)}function SB(t,e){return!zm.isSupported()||!bc&&!e?._nodeWorkers?!1:t.worker&&e?.worker}async function CB(t,e,r,n,i){let o=t.id,s=TB(t,r),l=zm.getWorkerFarm(r).getWorkerPool({name:o,url:s});r=JSON.parse(JSON.stringify(r)),n=JSON.parse(JSON.stringify(n||{}));let u=await l.startJob("process-on-worker",hye.bind(null,i));return u.postMessage("process",{input:e,options:r,context:n}),await(await u.result).result}async function hye(t,e,r,n){switch(r){case"done":e.done(n);break;case"error":e.error(new Error(n.error));break;case"process":let{id:i,input:o,options:s}=n;try{let a=await t(o,s);e.postMessage("done",{id:i,result:a})}catch(a){let l=a instanceof Error?a.message:"unknown error";e.postMessage("error",{id:i,error:l})}break;default:console.warn(`parse-with-worker unknown message ${r}`)}}function iH(t,e=5){return typeof t=="string"?t.slice(0,e):ArrayBuffer.isView(t)?nH(t.buffer,t.byteOffset,e):t instanceof ArrayBuffer?nH(t,0,e):""}function nH(t,e,r){if(t.byteLength<=e+r)return"";let n=new DataView(t),i="";for(let o=0;o<r;o++)i+=String.fromCharCode(n.getUint8(e+o));return i}function IB(t){try{return JSON.parse(t)}catch{throw new Error(`Failed to parse JSON from data starting with "${iH(t)}"`)}}function PB(t,e,r){if(r=r||t.byteLength,t.byteLength<r||e.byteLength<r)return!1;let n=new Uint8Array(t),i=new Uint8Array(e);for(let o=0;o<n.length;++o)if(n[o]!==i[o])return!1;return!0}function RB(...t){return oH(t)}function oH(t){let e=t.map(o=>o instanceof ArrayBuffer?new Uint8Array(o):o),r=e.reduce((o,s)=>o+s.byteLength,0),n=new Uint8Array(r),i=0;for(let o of e)n.set(o,i),i+=o.byteLength;return n.buffer}function F2(...t){let e=t,r=e&&e.length>1&&e[0].constructor||null;if(!r)throw new Error('"concatenateTypedArrays" - incorrect quantity of arguments or arguments have incompatible data types');let n=e.reduce((s,a)=>s+a.length,0),i=new r(n),o=0;for(let s of e)i.set(s,o),o+=s.length;return i}function MA(t,e,r){let n=r!==void 0?new Uint8Array(t).subarray(e,e+r):new Uint8Array(t).subarray(e);return new Uint8Array(n).buffer}function Um(t,e){return Bi(t>=0),Bi(e>0),t+(e-1)&~(e-1)}function LB(t,e,r){let n;if(t instanceof ArrayBuffer)n=new Uint8Array(t);else{let i=t.byteOffset,o=t.byteLength;n=new Uint8Array(t.buffer||t.arrayBuffer,i,o)}return e.set(n,r),r+Um(n.byteLength,4)}async function OB(t){let e=[];for await(let r of t)e.push(r);return RB(...e)}CA();var fye="Queued Requests",pye="Active Requests",dye="Cancelled Requests",mye="Queued Requests Ever",Aye="Active Requests Ever",gye={id:"request-scheduler",throttleRequests:!0,maxRequests:6,debounceTime:0},Vm=class{props;stats;activeRequestCount=0;requestQueue=[];requestMap=new Map;updateTimer=null;constructor(e={}){this.props={...gye,...e},this.stats=new ol({id:this.props.id}),this.stats.get(fye),this.stats.get(pye),this.stats.get(dye),this.stats.get(mye),this.stats.get(Aye)}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},i=new Promise(o=>(n.resolve=o,n));return this.requestQueue.push(n),this.requestMap.set(e,i),this._issueNewRequests(),i}_issueRequest(e){let{handle:r,resolve:n}=e,i=!1,o=()=>{i||(i=!0,this.requestMap.delete(r),this.activeRequestCount--,this._issueNewRequests())};return this.activeRequestCount++,n?n({done:o}):Promise.resolve({done:o})}_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}};var yye="",aH={};function DB(t){for(let e in aH)if(t.startsWith(e)){let r=aH[e];t=t.replace(e,r)}return!t.startsWith("http://")&&!t.startsWith("https://")&&(t=`${yye}${t}`),t}function cH(t){return t&&typeof t=="object"&&t.isBuffer}function dM(t){if(cH(t))return t;if(t instanceof ArrayBuffer)return t;if(ArrayBuffer.isView(t))return t.byteOffset===0&&t.byteLength===t.buffer.byteLength?t.buffer:t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength);if(typeof t=="string"){let e=t;return new TextEncoder().encode(e).buffer}if(t&&typeof t=="object"&&t._toArrayBuffer)return t._toArrayBuffer();throw new Error("toArrayBuffer")}var ku={};Uo(ku,{dirname:()=>xye,filename:()=>_ye,join:()=>vye,resolve:()=>bye});function lH(){if(typeof process<"u"&&typeof process.cwd<"u")return process.cwd();let t=window.location?.pathname;return t?.slice(0,t.lastIndexOf("/")+1)||""}function _ye(t){let e=t?t.lastIndexOf("/"):-1;return e>=0?t.substr(e+1):""}function xye(t){let e=t?t.lastIndexOf("/"):-1;return e>=0?t.substr(0,e):""}function vye(...t){let e="/";return t=t.map((r,n)=>(n&&(r=r.replace(new RegExp(`^${e}`),"")),n!==t.length-1&&(r=r.replace(new RegExp(`${e}$`),"")),r)),t.join(e)}function bye(...t){let e=[];for(let o=0;o<t.length;o++)e[o]=t[o];let r="",n=!1,i;for(let o=e.length-1;o>=-1&&!n;o--){let s;o>=0?s=e[o]:(i===void 0&&(i=lH()),s=i),s.length!==0&&(r=`${s}/${r}`,n=s.charCodeAt(0)===U2)}return r=wye(r,!n),n?`/${r}`:r.length>0?r:"."}var U2=47,NB=46;function wye(t,e){let r="",n=-1,i=0,o,s=!1;for(let a=0;a<=t.length;++a){if(a<t.length)o=t.charCodeAt(a);else{if(o===U2)break;o=U2}if(o===U2){if(!(n===a-1||i===1))if(n!==a-1&&i===2){if(r.length<2||!s||r.charCodeAt(r.length-1)!==NB||r.charCodeAt(r.length-2)!==NB){if(r.length>2){let l=r.length-1,u=l;for(;u>=0&&r.charCodeAt(u)!==U2;--u);if(u!==l){r=u===-1?"":r.slice(0,u),n=a,i=0,s=!1;continue}}else if(r.length===2||r.length===1){r="",n=a,i=0,s=!1;continue}}e&&(r.length>0?r+="/..":r="..",s=!0)}else{let l=t.slice(n+1,a);r.length>0?r+=`/${l}`:r=l,s=!1}n=a,i=0}else o===NB&&i!==-1?++i:i=-1}return r}var mM=class{fetch;loadOptions;_needsRefresh=!0;props;constructor(e){this.props={...e},this.loadOptions={...e.loadOptions},this.fetch=Tye(this.loadOptions)}setProps(e){this.props=Object.assign(this.props,e),this.setNeedsRefresh()}setNeedsRefresh(){this._needsRefresh=!0}getNeedsRefresh(e=!0){let r=this._needsRefresh;return e&&(this._needsRefresh=!1),r}};function Tye(t){let e=t?.fetch;if(e&&typeof e=="function")return(n,i)=>e(n,i);let r=t?.fetch;return r&&typeof r!="function"?n=>fetch(n,r):n=>fetch(n)}var gh=class extends mM{};Dr(gh,"type","template"),Dr(gh,"testURL",e=>!1);var Eye=t=>typeof t=="boolean",V2=t=>typeof t=="function",IA=t=>t!==null&&typeof t=="object",FB=t=>IA(t)&&t.constructor==={}.constructor;var uH=t=>Boolean(t)&&typeof t[Symbol.iterator]=="function",hH=t=>t&&typeof t[Symbol.asyncIterator]=="function";var yh=t=>typeof Response<"u"&&t instanceof Response||t&&t.arrayBuffer&&t.text&&t.json;var _h=t=>typeof Blob<"u"&&t instanceof Blob,fH=t=>t&&typeof t=="object"&&t.isBuffer;var Mye=t=>typeof ReadableStream<"u"&&t instanceof ReadableStream||IA(t)&&V2(t.tee)&&V2(t.cancel)&&V2(t.getReader);var Sye=t=>IA(t)&&V2(t.read)&&V2(t.pipe)&&Eye(t.readable),AM=t=>Mye(t)||Sye(t);var gM=class extends Error{constructor(e,r){super(e),this.reason=r.reason,this.url=r.url,this.response=r.response}reason;url;response};var Cye=/^data:([-\w.]+\/[-\w.+]+)(;|,)/,Iye=/^([-\w.]+\/[-\w.+]+)/;function zB(t,e){return t.toLowerCase()===e.toLowerCase()}function pH(t){let e=Iye.exec(t);return e?e[1]:t}function UB(t){let e=Cye.exec(t);return e?e[1]:""}var dH=/\?.*/;function mH(t){let e=t.match(dH);return e&&e[0]}function D_(t){return t.replace(dH,"")}function AH(t){if(t.length<50)return t;let e=t.slice(t.length-15);return`${t.substr(0,32)}...${e}`}function PA(t){return yh(t)?t.url:_h(t)?t.name||"":typeof t=="string"?t:""}function j2(t){if(yh(t)){let e=t,r=e.headers.get("content-type")||"",n=D_(e.url);return pH(r)||UB(n)}return _h(t)?t.type||"":typeof t=="string"?UB(t):""}function gH(t){return yh(t)?t.headers["content-length"]||-1:_h(t)?t.size:typeof t=="string"?t.length:t instanceof ArrayBuffer||ArrayBuffer.isView(t)?t.byteLength:-1}async function yM(t){if(yh(t))return t;let e={},r=gH(t);r>=0&&(e["content-length"]=String(r));let n=PA(t),i=j2(t);i&&(e["content-type"]=i);let o=await Rye(t);o&&(e["x-first-bytes"]=o),typeof t=="string"&&(t=new TextEncoder().encode(t));let s=new Response(t,{headers:e});return Object.defineProperty(s,"url",{value:n}),s}async function yH(t){if(!t.ok)throw await Pye(t)}async function Pye(t){let e=AH(t.url),r=`Failed to fetch resource (${t.status}) ${t.statusText}: ${e}`;r=r.length>100?`${r.slice(0,100)}...`:r;let n={reason:t.statusText,url:t.url,response:t};try{let i=t.headers.get("Content-Type");n.reason=i?.includes("application/json")?await t.json():t.text()}catch{}return new gM(r,n)}async function Rye(t){if(typeof t=="string")return`data:,${t.slice(0,5)}`;if(t instanceof Blob){let r=t.slice(0,5);return await new Promise(n=>{let i=new FileReader;i.onload=o=>n(o?.target?.result),i.readAsDataURL(r)})}if(t instanceof ArrayBuffer){let r=t.slice(0,5);return`data:base64,${Lye(r)}`}return null}function Lye(t){let e="",r=new Uint8Array(t);for(let n=0;n<r.byteLength;n++)e+=String.fromCharCode(r[n]);return btoa(e)}function Oye(t){return!Bye(t)&&!kye(t)}function Bye(t){return t.startsWith("http:")||t.startsWith("https:")}function kye(t){return t.startsWith("data:")}async function N_(t,e){if(typeof t=="string"){let r=DB(t);return Oye(r)&&globalThis.loaders?.fetchNode?globalThis.loaders?.fetchNode(r,e):await fetch(r,e)}return await yM(t)}B_();var VB=new au({id:"loaders.gl"}),_M=class{log(){return()=>{}}info(){return()=>{}}warn(){return()=>{}}error(){return()=>{}}},xM=class{console;constructor(){this.console=console}log(...e){return this.console.log.bind(this.console,...e)}info(...e){return this.console.info.bind(this.console,...e)}warn(...e){return this.console.warn.bind(this.console,...e)}error(...e){return this.console.error.bind(this.console,...e)}};var jB={fetch:null,mimeType:void 0,nothrow:!1,log:new xM,useLocalLibraries:!1,CDN:"https://unpkg.com/@loaders.gl",worker:!0,maxConcurrency:3,maxMobileConcurrency:1,reuseWorkers:vd,_nodeWorkers:!1,_workerType:"",limit:0,_limitMB:0,batchSize:"auto",batchDebounceMs:0,metadata:!1,transforms:[]},_H={throws:"nothrow",dataType:"(no longer used)",uri:"baseUri",method:"fetch.method",headers:"fetch.headers",body:"fetch.body",mode:"fetch.mode",credentials:"fetch.credentials",cache:"fetch.cache",redirect:"fetch.redirect",referrer:"fetch.referrer",referrerPolicy:"fetch.referrerPolicy",integrity:"fetch.integrity",keepalive:"fetch.keepalive",signal:"fetch.signal"};function HB(){globalThis.loaders=globalThis.loaders||{};let{loaders:t}=globalThis;return t._state||(t._state={}),t._state}function WB(){let t=HB();return t.globalOptions=t.globalOptions||{...jB},t.globalOptions}function bH(t,e,r,n){return r=r||[],r=Array.isArray(r)?r:[r],Dye(t,r),Fye(e,t,n)}function Dye(t,e){xH(t,null,jB,_H,e);for(let r of e){let n=t&&t[r.id]||{},i=r.options&&r.options[r.id]||{},o=r.deprecatedOptions&&r.deprecatedOptions[r.id]||{};xH(n,r.id,i,o,e)}}function xH(t,e,r,n,i){let o=e||"Top level",s=e?`${e}.`:"";for(let a in t){let l=!e&&IA(t[a]),u=a==="baseUri"&&!e,f=a==="workerUrl"&&e;if(!(a in r)&&!u&&!f){if(a in n)VB.warn(`${o} loader option '${s}${a}' no longer supported, use '${n[a]}'`)();else if(!l){let m=Nye(a,i);VB.warn(`${o} loader option '${s}${a}' not recognized. ${m}`)()}}}}function Nye(t,e){let r=t.toLowerCase(),n="";for(let i of e)for(let o in i.options){if(t===o)return`Did you mean '${i.id}.${o}'?`;let s=o.toLowerCase();(r.startsWith(s)||s.startsWith(r))&&(n=n||`Did you mean '${i.id}.${o}'?`)}return n}function Fye(t,e,r){let i={...t.options||{}};return zye(i,r),i.log===null&&(i.log=new _M),vH(i,WB()),vH(i,e),i}function vH(t,e){for(let r in e)if(r in e){let n=e[r];FB(n)&&FB(t[r])?t[r]={...t[r],...e[r]}:t[r]=e[r]}}function zye(t,e){e&&!("baseUri"in t)&&(t.baseUri=e)}function H2(t){return t?(Array.isArray(t)&&(t=t[0]),Array.isArray(t?.extensions)):!1}function W2(t){Bi(t,"null loader"),Bi(H2(t),"invalid loader");let e;return Array.isArray(t)&&(e=t[1],t=t[0],t={...t,options:{...t.options,...e}}),(t?.parseTextSync||t?.parseText)&&(t.text=!0),t.text||(t.binary=!0),t}var wH=()=>{let t=HB();return t.loaderRegistry=t.loaderRegistry||[],t.loaderRegistry};function RA(t){let e=wH();t=Array.isArray(t)?t:[t];for(let r of t){let n=W2(r);e.find(i=>n===i)||e.unshift(n)}}function TH(){return wH()}B_();var EH=new au({id:"loaders.gl"});var Uye=/\.([^.]+)$/;async function CH(t,e=[],r,n){if(!IH(t))return null;let i=MH(t,e,{...r,nothrow:!0},n);if(i)return i;if(_h(t)&&(t=await t.slice(0,10).arrayBuffer(),i=MH(t,e,r,n)),!i&&!r?.nothrow)throw new Error(PH(t));return i}function MH(t,e=[],r,n){if(!IH(t))return null;if(e&&!Array.isArray(e))return W2(e);let i=[];e&&(i=i.concat(e)),r?.ignoreRegisteredLoaders||i.push(...TH()),jye(i);let o=Vye(t,i,r,n);if(!o&&!r?.nothrow)throw new Error(PH(t));return o}function Vye(t,e,r,n){let i=PA(t),o=j2(t),s=D_(i)||n?.url,a=null,l="";return r?.mimeType&&(a=qB(e,r?.mimeType),l=`match forced by supplied MIME type ${r?.mimeType}`),a=a||Hye(e,s),l=l||(a?`matched url ${s}`:""),a=a||qB(e,o),l=l||(a?`matched MIME type ${o}`:""),a=a||qye(e,t),l=l||(a?`matched initial data ${RH(t)}`:""),r?.fallbackMimeType&&(a=a||qB(e,r?.fallbackMimeType),l=l||(a?`matched fallback MIME type ${o}`:"")),l&&EH.log(1,`selectLoader selected ${a?.name}: ${l}.`),a}function IH(t){return!(t instanceof Response&&t.status===204)}function PH(t){let e=PA(t),r=j2(t),n="No valid loader found (";n+=e?`${ku.filename(e)}, `:"no url provided, ",n+=`MIME type: ${r?`"${r}"`:"not provided"}, `;let i=t?RH(t):"";return n+=i?` first bytes: "${i}"`:"first bytes: not available",n+=")",n}function jye(t){for(let e of t)W2(e)}function Hye(t,e){let r=e&&Uye.exec(e),n=r&&r[1];return n?Wye(t,n):null}function Wye(t,e){e=e.toLowerCase();for(let r of t)for(let n of r.extensions)if(n.toLowerCase()===e)return r;return null}function qB(t,e){for(let r of t)if(r.mimeTypes?.some(n=>zB(e,n))||zB(e,`application/x.${r.id}`))return r;return null}function qye(t,e){if(!e)return null;for(let r of t)if(typeof e=="string"){if(Gye(e,r))return r}else if(ArrayBuffer.isView(e)){if(SH(e.buffer,e.byteOffset,r))return r}else if(e instanceof ArrayBuffer&&SH(e,0,r))return r;return null}function Gye(t,e){return e.testText?e.testText(t):(Array.isArray(e.tests)?e.tests:[e.tests]).some(n=>t.startsWith(n))}function SH(t,e,r){return(Array.isArray(r.tests)?r.tests:[r.tests]).some(i=>Xye(t,e,r,i))}function Xye(t,e,r,n){if(n instanceof ArrayBuffer)return PB(n,t,n.byteLength);switch(typeof n){case"function":return n(t);case"string":let i=GB(t,e,n.length);return n===i;default:return!1}}function RH(t,e=5){return typeof t=="string"?t.slice(0,e):ArrayBuffer.isView(t)?GB(t.buffer,t.byteOffset,e):t instanceof ArrayBuffer?GB(t,0,e):""}function GB(t,e,r){if(t.byteLength<e+r)return"";let n=new DataView(t),i="";for(let o=0;o<r;o++)i+=String.fromCharCode(n.getUint8(e+o));return i}function*LH(t,e){let r=e?.chunkSize||262144,n=0,i=new TextEncoder;for(;n<t.length;){let o=Math.min(t.length-n,r),s=t.slice(n,n+o);n+=o,yield i.encode(s)}}function*OH(t,e={}){let{chunkSize:r=262144}=e,n=0;for(;n<t.byteLength;){let i=Math.min(t.byteLength-n,r),o=new ArrayBuffer(i),s=new Uint8Array(t,n,i);new Uint8Array(o).set(s),n+=i,yield o}}async function*BH(t,e){let r=e?.chunkSize||1048576,n=0;for(;n<t.size;){let i=n+r,o=await t.slice(n,i).arrayBuffer();n=i,yield o}}function XB(t,e){return vd?Yye(t,e):$ye(t,e)}async function*Yye(t,e){let r=t.getReader(),n;try{for(;;){let i=n||r.read();e?._streamReadAhead&&(n=r.read());let{done:o,value:s}=await i;if(o)return;yield dM(s)}}catch{r.releaseLock()}}async function*$ye(t,e){for await(let r of t)yield dM(r)}function kH(t,e){if(typeof t=="string")return LH(t,e);if(t instanceof ArrayBuffer)return OH(t,e);if(_h(t))return BH(t,e);if(AM(t))return XB(t,e);if(yh(t))return XB(t.body,e);throw new Error("makeIterator")}var DH="Cannot convert supplied data type";function Kye(t,e,r){if(e.text&&typeof t=="string")return t;if(fH(t)&&(t=t.buffer),t instanceof ArrayBuffer){let n=t;return e.text&&!e.binary?new TextDecoder("utf8").decode(n):n}if(ArrayBuffer.isView(t)){if(e.text&&!e.binary)return new TextDecoder("utf8").decode(t);let n=t.buffer,i=t.byteLength||t.length;return(t.byteOffset!==0||i!==n.byteLength)&&(n=n.slice(t.byteOffset,t.byteOffset+i)),n}throw new Error(DH)}async function NH(t,e,r){let n=t instanceof ArrayBuffer||ArrayBuffer.isView(t);if(typeof t=="string"||n)return Kye(t,e,r);if(_h(t)&&(t=await yM(t)),yh(t)){let i=t;return await yH(i),e.binary?await i.arrayBuffer():await i.text()}if(AM(t)&&(t=kH(t,r)),uH(t)||hH(t))return OB(t);throw new Error(DH)}function vM(t,e){let r=WB(),n=t||r;return typeof n.fetch=="function"?n.fetch:IA(n.fetch)?i=>N_(i,n.fetch):e?.fetch?e?.fetch:N_}function FH(t,e,r){if(r)return r;let n={fetch:vM(e,t),...t};if(n.url){let i=D_(n.url);n.baseUrl=i,n.queryString=mH(n.url),n.filename=ku.filename(i),n.baseUrl=ku.dirname(i)}return Array.isArray(n.loaders)||(n.loaders=null),n}function zH(t,e){if(t&&!Array.isArray(t))return t;let r;if(t&&(r=Array.isArray(t)?t:[t]),e&&e.loaders){let n=Array.isArray(e.loaders)?e.loaders:[e.loaders];r=r?[...r,...n]:n}return r&&r.length?r:void 0}async function jm(t,e,r,n){e&&!Array.isArray(e)&&!H2(e)&&(n=void 0,r=e,e=void 0),t=await t,r=r||{};let i=PA(t),s=zH(e,n),a=await CH(t,s,r);return a?(r=bH(r,a,s,i),n=FH({url:i,_parse:jm,loaders:s},r,n||null),await Zye(a,t,r,n)):null}async function Zye(t,e,r,n){if(EB(t),r=O2(t.options,r),yh(e)){let o=e,{ok:s,redirected:a,status:l,statusText:u,type:f,url:m}=o,v=Object.fromEntries(o.headers.entries());n.response={headers:v,ok:s,redirected:a,status:l,statusText:u,type:f,url:m}}e=await NH(e,t,r);let i=t;if(i.parseTextSync&&typeof e=="string")return i.parseTextSync(e,r,n);if(SB(t,r))return await CB(t,e,r,n,jm);if(i.parseText&&typeof e=="string")return await i.parseText(e,r,n);if(i.parse)return await i.parse(e,r,n);throw Gc(!i.parseSync),new Error(`${t.id} loader - no parser found and worker is disabled`)}async function za(t,e,r,n){let i,o;!Array.isArray(e)&&!H2(e)?(i=[],o=e,n=void 0):(i=e,o=r);let s=vM(o),a=t;return typeof t=="string"&&(a=await s(t)),_h(t)&&(a=await s(t)),Array.isArray(i)?await jm(a,i,o):await jm(a,i,o)}YB();var VH,jH,WH={fontFamily:'"Helvetica Neue", Helvetica, Arial, sans-serif',display:"flex",flex:"wrap",maxWidth:"500px",flexDirection:"column",zIndex:2};function bM(){return document.createElement("div")}function Qye(t){if(!t.picked)return null;if(t.object===VH)return jH;let e={html:e_e(t.object),style:WH};return jH=e,VH=t.object,e}var Jye=new Set(["position","index"]);function e_e(t){let e=bM();for(let r in t){if(Jye.has(r))continue;let n=bM();n.className="header",n.textContent=r;let i=bM();i.className="value",i.textContent=r_e(t[r]);let o=bM();t_e(o,n,i),o.appendChild(n),o.appendChild(i),e.appendChild(o)}return e.innerHTML}function t_e(t,e,r){Object.assign(e.style,{fontWeight:700,marginRight:"10px",flex:"1 1 0%"}),Object.assign(r.style,{flex:"none",maxWidth:"250px",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}),Object.assign(t.style,{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"stretch"})}function r_e(t){let e;if(Array.isArray(t)&&t.length>4)e=`Array<${t.length}>`;else if(typeof t=="string")e=t;else if(typeof t=="number")e=String(t);else try{e=JSON.stringify(t)}catch{e="<Non-Serializable Object>"}let r=50;return e.length>r&&(e=e.slice(0,r)),e}function HH(t,e){let r,n=t,i="properties",o=/{[^}]*}/g,s=l=>l.replace(/[{}]/g,""),a=[...new Set(t.match(o).map(s))];for(let l of a){if(l.includes(".")){r=e;let u=l.split(".");for(let f of u)if(r.hasOwnProperty(f))r=r[f];else{r=void 0;break}}else e.hasOwnProperty(l)?r=e[l]:e[i]&&e[i].hasOwnProperty(l)?r=e[i][l]:r=void 0;n=n.replaceAll(`{${l}}`,r)}return n}function $B(t){return t?t.html||t.text?e=>{if(!e.picked)return null;let r={style:t.style||WH};return t.html?r.html=HH(t.html,e.object):r.text=HH(t.text,e.object),r}:Qye:null}function qH(t){let e=document.createElement("link");e.type="text/css",e.rel="stylesheet",e.href=t,document.getElementsByTagName("head")[0].appendChild(e)}function GH(t,e){let r=document.createElement("div");return r.style.width=Number.isFinite(t)?`${t}px`:t,r.style.height=`${e}px`,r.style.position="relative",r}var YH=vc(XH()),n_e="https://api.tiles.mapbox.com/mapbox-gl-js/v1.13.2/mapbox-gl.css",QB=YH.default;function $H(t=n_e){qH(t)}function KH(){let t=["mapboxgl-missing-css"];for(let e of t){let r=document.getElementsByClassName(e)[0];r&&r.style&&(r.style.display="none")}}var JB={};function ZH(t){if(!JB[t]){let e=document.createElement("script");e.type="text/javascript",e.src=t,document.querySelector("head").appendChild(e),JB[t]=new Promise(n=>{e.onload=n})}return JB[t]}var QH="4.2.1";var i_e=globalThis.loaders?.parseImageNode,ek=typeof Image<"u",tk=typeof ImageBitmap<"u",o_e=Boolean(i_e),rk=vd?!0:o_e;function JH(t){switch(t){case"auto":return tk||ek||rk;case"imagebitmap":return tk;case"image":return ek;case"data":return rk;default:throw new Error(`@loaders.gl/images: image ${t} not supported in this environment`)}}function eW(){if(tk)return"imagebitmap";if(ek)return"image";if(rk)return"data";throw new Error("Install '@loaders.gl/polyfills' to parse images under Node.js")}function tW(t){let e=s_e(t);if(!e)throw new Error("Not an image");return e}function q2(t){switch(tW(t)){case"data":return t;case"image":case"imagebitmap":let e=document.createElement("canvas"),r=e.getContext("2d");if(!r)throw new Error("getImageData");return e.width=t.width,e.height=t.height,r.drawImage(t,0,0),r.getImageData(0,0,t.width,t.height);default:throw new Error("getImageData")}}function s_e(t){return typeof ImageBitmap<"u"&&t instanceof ImageBitmap?"imagebitmap":typeof Image<"u"&&t instanceof Image?"image":t&&typeof t=="object"&&t.data&&t.width&&t.height?"data":null}var a_e=/^data:image\/svg\+xml/,c_e=/\.svg((\?|#).*)?$/;function wM(t){return t&&(a_e.test(t)||c_e.test(t))}function rW(t,e){if(wM(e)){let n=new TextDecoder().decode(t);try{typeof unescape=="function"&&typeof encodeURIComponent=="function"&&(n=unescape(encodeURIComponent(n)))}catch(o){throw new Error(o.message)}return`data:image/svg+xml;base64,${btoa(n)}`}return nk(t,e)}function nk(t,e){if(wM(e))throw new Error("SVG cannot be parsed directly to imagebitmap");return new Blob([new Uint8Array(t)])}async function TM(t,e,r){let n=rW(t,r),i=self.URL||self.webkitURL,o=typeof n!="string"&&i.createObjectURL(n);try{return await l_e(o||n,e)}finally{o&&i.revokeObjectURL(o)}}async function l_e(t,e){let r=new Image;return r.src=t,e.image&&e.image.decode&&r.decode?(await r.decode(),r):await new Promise((n,i)=>{try{r.onload=()=>n(r),r.onerror=o=>{let s=o instanceof Error?o.message:"error";i(new Error(s))}}catch(o){i(o)}})}var u_e={},nW=!0;async function iW(t,e,r){let n;wM(r)?n=await TM(t,e,r):n=nk(t,r);let i=e&&e.imagebitmap;return await h_e(n,i)}async function h_e(t,e=null){if((f_e(e)||!nW)&&(e=null),e)try{return await createImageBitmap(t,e)}catch(r){console.warn(r),nW=!1}return await createImageBitmap(t)}function f_e(t){for(let e in t||u_e)return!1;return!0}function oW(t){return!A_e(t,"ftyp",4)||!(t[8]&96)?null:p_e(t)}function p_e(t){switch(d_e(t,8,12).replace("\0"," ").trim()){case"avif":case"avis":return{extension:"avif",mimeType:"image/avif"};default:return null}}function d_e(t,e,r){return String.fromCharCode(...t.slice(e,r))}function m_e(t){return[...t].map(e=>e.charCodeAt(0))}function A_e(t,e,r=0){let n=m_e(e);for(let i=0;i<n.length;++i)if(n[i]!==t[i+r])return!1;return!0}var dp=!1,G2=!0;function LA(t){let e=X2(t);return y_e(e)||v_e(e)||__e(e)||x_e(e)||g_e(e)}function g_e(t){let e=new Uint8Array(t instanceof DataView?t.buffer:t),r=oW(e);return r?{mimeType:r.mimeType,width:0,height:0}:null}function y_e(t){let e=X2(t);return e.byteLength>=24&&e.getUint32(0,dp)===2303741511?{mimeType:"image/png",width:e.getUint32(16,dp),height:e.getUint32(20,dp)}:null}function __e(t){let e=X2(t);return e.byteLength>=10&&e.getUint32(0,dp)===1195984440?{mimeType:"image/gif",width:e.getUint16(6,G2),height:e.getUint16(8,G2)}:null}function x_e(t){let e=X2(t);return e.byteLength>=14&&e.getUint16(0,dp)===16973&&e.getUint32(2,G2)===e.byteLength?{mimeType:"image/bmp",width:e.getUint32(18,G2),height:e.getUint32(22,G2)}:null}function v_e(t){let e=X2(t);if(!(e.byteLength>=3&&e.getUint16(0,dp)===65496&&e.getUint8(2)===255))return null;let{tableMarkers:n,sofMarkers:i}=b_e(),o=2;for(;o+9<e.byteLength;){let s=e.getUint16(o,dp);if(i.has(s))return{mimeType:"image/jpeg",height:e.getUint16(o+5,dp),width:e.getUint16(o+7,dp)};if(!n.has(s))return null;o+=2,o+=e.getUint16(o,dp)}return null}function b_e(){let t=new Set([65499,65476,65484,65501,65534]);for(let r=65504;r<65520;++r)t.add(r);return{tableMarkers:t,sofMarkers:new Set([65472,65473,65474,65475,65477,65478,65479,65481,65482,65483,65485,65486,65487,65502])}}function X2(t){if(t instanceof DataView)return t;if(ArrayBuffer.isView(t))return new DataView(t.buffer);if(t instanceof ArrayBuffer)return new DataView(t);throw new Error("toDataView")}async function sW(t,e){let{mimeType:r}=LA(t)||{},n=globalThis.loaders?.parseImageNode;return Bi(n),await n(t,r)}async function aW(t,e,r){e=e||{};let i=(e.image||{}).type||"auto",{url:o}=r||{},s=w_e(i),a;switch(s){case"imagebitmap":a=await iW(t,e,o);break;case"image":a=await TM(t,e,o);break;case"data":a=await sW(t,e);break;default:Bi(!1)}return i==="data"&&(a=q2(a)),a}function w_e(t){switch(t){case"auto":case"data":return eW();default:return JH(t),t}}var T_e=["png","jpg","jpeg","gif","webp","bmp","ico","svg","avif"],E_e=["image/png","image/jpeg","image/gif","image/webp","image/avif","image/bmp","image/vnd.microsoft.icon","image/svg+xml"],M_e={image:{type:"auto",decode:!0}},mp={dataType:null,batchType:null,id:"image",module:"images",name:"Images",version:QH,mimeTypes:E_e,extensions:T_e,parse:aW,tests:[t=>Boolean(LA(new DataView(t)))],options:M_e};var ik={};function ok(t){if(ik[t]===void 0){let e=vd?C_e(t):S_e(t);ik[t]=e}return ik[t]}function S_e(t){let e=["image/png","image/jpeg","image/gif"],r=globalThis.loaders?.imageFormatsNode||e,n=globalThis.loaders?.parseImageNode;return Boolean(n)&&r.includes(t)}function C_e(t){switch(t){case"image/avif":case"image/webp":return I_e(t);default:return!0}}function I_e(t){try{return document.createElement("canvas").toDataURL(t).indexOf(`data:${t}`)===0}catch{return!1}}B_();var P_e=new au({id:"deck"}),Ar=P_e;var sk={};function cW(t){sk=t}function sa(t,e,r,n){Ar.level>0&&sk[t]&&sk[t].call(null,e,r,n)}function R_e(t){let e=t[0],r=t[t.length-1];return e==="{"&&r==="}"||e==="["&&r==="]"}var lW={dataType:null,batchType:null,id:"JSON",name:"JSON",module:"",version:"",options:{},extensions:["json","geojson"],mimeTypes:["application/json","application/geo+json"],testText:R_e,parseTextSync:JSON.parse};function L_e(){let t="9.2.0-beta.4",e=globalThis.deck&&globalThis.deck.VERSION;if(e&&e!==t)throw new Error(`deck.gl - multiple versions detected: ${e} vs ${t}`);return e||(Ar.log(1,`deck.gl ${t}`)(),globalThis.deck={...globalThis.deck,VERSION:t,version:t,log:Ar,_registerLoggers:cW},RA([lW,[mp,{imagebitmap:{premultiplyAlpha:"none"}}]])),t}var EM=L_e();function MM(t,e){if(!t)throw new Error(e||"shadertools: assertion failed.")}var ak={number:{type:"number",validate(t,e){return Number.isFinite(t)&&typeof e=="object"&&(e.max===void 0||t<=e.max)&&(e.min===void 0||t>=e.min)}},array:{type:"array",validate(t,e){return Array.isArray(t)||ArrayBuffer.isView(t)}}};function hW(t){let e={};for(let[r,n]of Object.entries(t))e[r]=O_e(n);return e}function O_e(t){let e=uW(t);if(e!=="object")return{value:t,...ak[e],type:e};if(typeof t=="object")return t?t.type!==void 0?{...t,...ak[t.type],type:t.type}:t.value===void 0?{type:"object",value:t}:(e=uW(t.value),{...t,...ak[e],type:e}):{type:"object",value:null};throw new Error("props")}function uW(t){return Array.isArray(t)||ArrayBuffer.isView(t)?"array":typeof t}var fW=`#ifdef MODULE_LOGDEPTH
552
+ }`}function bB(t,e=!0,r){let n=r||new Set;if(t){if(tH(t))n.add(t);else if(tH(t.buffer))n.add(t.buffer);else if(!ArrayBuffer.isView(t)){if(e&&typeof t=="object")for(let i in t)bB(t[i],e,n)}}return r===void 0?Array.from(n):[]}function tH(t){return t?t instanceof ArrayBuffer||typeof MessagePort<"u"&&t instanceof MessagePort||typeof ImageBitmap<"u"&&t instanceof ImageBitmap||typeof OffscreenCanvas<"u"&&t instanceof OffscreenCanvas:!1}var wB=()=>{},Fm=class{name;source;url;terminated=!1;worker;onMessage;onError;_loadableURL="";static isSupported(){return typeof Worker<"u"&&bc||typeof k_<"u"&&!bc}constructor(e){let{name:r,source:n,url:i}=e;Gc(n||i),this.name=r,this.source=n,this.url=i,this.onMessage=wB,this.onError=o=>console.log(o),this.worker=bc?this._createBrowserWorker():this._createNodeWorker()}destroy(){this.onMessage=wB,this.onError=wB,this.worker.terminate(),this.terminated=!0}get isRunning(){return Boolean(this.onMessage)}postMessage(e,r){r=r||bB(e),this.worker.postMessage(e,r)}_getErrorFromErrorEvent(e){let r="Failed to load ";return r+=`worker ${this.name} from ${this.url}. `,e.message&&(r+=`${e.message} in `),e.lineno&&(r+=`:${e.lineno}:${e.colno}`),new Error(r)}_createBrowserWorker(){this._loadableURL=Jj({source:this.source,url:this.url});let e=new Worker(this._loadableURL,{name:this.name});return e.onmessage=r=>{r.data?this.onMessage(r.data):this.onError(new Error("No data received"))},e.onerror=r=>{this.onError(this._getErrorFromErrorEvent(r)),this.terminated=!0},e.onmessageerror=r=>console.error(r),e}_createNodeWorker(){let e;if(this.url){let n=this.url.includes(":/")||this.url.startsWith("/")?this.url:`./${this.url}`;e=new k_(n,{eval:!1})}else if(this.source)e=new k_(this.source,{eval:!0});else throw new Error("no worker");return e.on("message",r=>{this.onMessage(r)}),e.on("error",r=>{this.onError(r)}),e.on("exit",r=>{}),e}};var N2=class{name="unnamed";source;url;maxConcurrency=1;maxMobileConcurrency=1;onDebug=()=>{};reuseWorkers=!0;props={};jobQueue=[];idleQueue=[];count=0;isDestroyed=!1;static isSupported(){return Fm.isSupported()}constructor(e){this.source=e.source,this.url=e.url,this.setProps(e)}destroy(){this.idleQueue.forEach(e=>e.destroy()),this.isDestroyed=!0}setProps(e){this.props={...this.props,...e},e.name!==void 0&&(this.name=e.name),e.maxConcurrency!==void 0&&(this.maxConcurrency=e.maxConcurrency),e.maxMobileConcurrency!==void 0&&(this.maxMobileConcurrency=e.maxMobileConcurrency),e.reuseWorkers!==void 0&&(this.reuseWorkers=e.reuseWorkers),e.onDebug!==void 0&&(this.onDebug=e.onDebug)}async startJob(e,r=(i,o,s)=>i.done(s),n=(i,o)=>i.error(o)){let i=new Promise(o=>(this.jobQueue.push({name:e,onMessage:r,onError:n,onStart:o}),this));return this._startQueuedJob(),await i}async _startQueuedJob(){if(!this.jobQueue.length)return;let e=this._getAvailableWorker();if(!e)return;let r=this.jobQueue.shift();if(r){this.onDebug({message:"Starting job",name:r.name,workerThread:e,backlog:this.jobQueue.length});let n=new D2(r.name,e);e.onMessage=i=>r.onMessage(n,i.type,i.payload),e.onError=i=>r.onError(n,i),r.onStart(n);try{await n.result}catch(i){console.error(`Worker exception: ${i}`)}finally{this.returnWorkerToQueue(e)}}}returnWorkerToQueue(e){!bc||this.isDestroyed||!this.reuseWorkers||this.count>this._getMaxConcurrency()?(e.destroy(),this.count--):this.idleQueue.push(e),this.isDestroyed||this._startQueuedJob()}_getAvailableWorker(){if(this.idleQueue.length>0)return this.idleQueue.shift()||null;if(this.count<this._getMaxConcurrency()){this.count++;let e=`${this.name.toLowerCase()} (#${this.count} of ${this.maxConcurrency})`;return new Fm({name:e,source:this.source,url:this.url})}return null}_getMaxConcurrency(){return Qj?this.maxMobileConcurrency:this.maxConcurrency}};var sye={maxConcurrency:3,maxMobileConcurrency:1,reuseWorkers:!0,onDebug:()=>{}},EA=class{props;workerPools=new Map;static isSupported(){return Fm.isSupported()}static getWorkerFarm(e={}){return EA._workerFarm=EA._workerFarm||new EA({}),EA._workerFarm.setProps(e),EA._workerFarm}constructor(e){this.props={...sye},this.setProps(e),this.workerPools=new Map}destroy(){for(let e of this.workerPools.values())e.destroy();this.workerPools=new Map}setProps(e){this.props={...this.props,...e};for(let r of this.workerPools.values())r.setProps(this._getWorkerPoolProps())}getWorkerPool(e){let{name:r,source:n,url:i}=e,o=this.workerPools.get(r);return o||(o=new N2({name:r,source:n,url:i}),o.setProps(this._getWorkerPoolProps()),this.workerPools.set(r,o)),o}_getWorkerPoolProps(){return{maxConcurrency:this.props.maxConcurrency,maxMobileConcurrency:this.props.maxMobileConcurrency,reuseWorkers:this.props.reuseWorkers,onDebug:this.props.onDebug}}},zm=EA;Dr(zm,"_workerFarm");function TB(t,e={}){let r=e[t.id]||{},n=bc?`${t.id}-worker.js`:`${t.id}-worker-node.js`,i=r.workerUrl;if(!i&&t.id==="compression"&&(i=e.workerUrl),e._workerType==="test"&&(bc?i=`modules/${t.module}/dist/${n}`:i=`modules/${t.module}/src/workers/${t.id}-worker-node.ts`),!i){let o=t.version;o==="latest"&&(o=Kj);let s=o?`@${o}`:"";i=`https://unpkg.com/@loaders.gl/${t.module}${s}/dist/${n}`}return Gc(i),i}function EB(t,e=B2){Gc(t,"no worker provided");let r=t.version;return!(!e||!r)}var MB={};async function fp(t,e=null,r={},n=null){return e&&(t=rH(t,e,r,n)),MB[t]=MB[t]||aye(t),await MB[t]}function rH(t,e,r={},n=null){if(!r.useLocalLibraries&&t.startsWith("http"))return t;n=n||t;let i=r.modules||{};return i[n]?i[n]:bc?r.CDN?(Gc(r.CDN.startsWith("http")),`${r.CDN}/${e}@${B2}/dist/libs/${n}`):k2?`../src/libs/${n}`:`modules/${e}/src/libs/${n}`:`modules/${e}/dist/libs/${n}`}async function aye(t){if(t.endsWith("wasm"))return await lye(t);if(!bc)try{let{requireFromFile:r}=globalThis.loaders||{};return await r?.(t)}catch(r){return console.error(r),null}if(k2)return importScripts(t);let e=await uye(t);return cye(e,t)}function cye(t,e){if(!bc){let{requireFromString:n}=globalThis.loaders||{};return n?.(t,e)}if(k2)return eval.call(globalThis,t),null;let r=document.createElement("script");r.id=e;try{r.appendChild(document.createTextNode(t))}catch{r.text=t}return document.body.appendChild(r),null}async function lye(t){let{readFileAsArrayBuffer:e}=globalThis.loaders||{};return bc||!e||t.startsWith("http")?await(await fetch(t)).arrayBuffer():await e(t)}async function uye(t){let{readFileAsText:e}=globalThis.loaders||{};return bc||!e||t.startsWith("http")?await(await fetch(t)).text():await e(t)}function SB(t,e){return!zm.isSupported()||!bc&&!e?._nodeWorkers?!1:t.worker&&e?.worker}async function CB(t,e,r,n,i){let o=t.id,s=TB(t,r),l=zm.getWorkerFarm(r).getWorkerPool({name:o,url:s});r=JSON.parse(JSON.stringify(r)),n=JSON.parse(JSON.stringify(n||{}));let u=await l.startJob("process-on-worker",hye.bind(null,i));return u.postMessage("process",{input:e,options:r,context:n}),await(await u.result).result}async function hye(t,e,r,n){switch(r){case"done":e.done(n);break;case"error":e.error(new Error(n.error));break;case"process":let{id:i,input:o,options:s}=n;try{let a=await t(o,s);e.postMessage("done",{id:i,result:a})}catch(a){let l=a instanceof Error?a.message:"unknown error";e.postMessage("error",{id:i,error:l})}break;default:console.warn(`parse-with-worker unknown message ${r}`)}}function iH(t,e=5){return typeof t=="string"?t.slice(0,e):ArrayBuffer.isView(t)?nH(t.buffer,t.byteOffset,e):t instanceof ArrayBuffer?nH(t,0,e):""}function nH(t,e,r){if(t.byteLength<=e+r)return"";let n=new DataView(t),i="";for(let o=0;o<r;o++)i+=String.fromCharCode(n.getUint8(e+o));return i}function IB(t){try{return JSON.parse(t)}catch{throw new Error(`Failed to parse JSON from data starting with "${iH(t)}"`)}}function PB(t,e,r){if(r=r||t.byteLength,t.byteLength<r||e.byteLength<r)return!1;let n=new Uint8Array(t),i=new Uint8Array(e);for(let o=0;o<n.length;++o)if(n[o]!==i[o])return!1;return!0}function RB(...t){return oH(t)}function oH(t){let e=t.map(o=>o instanceof ArrayBuffer?new Uint8Array(o):o),r=e.reduce((o,s)=>o+s.byteLength,0),n=new Uint8Array(r),i=0;for(let o of e)n.set(o,i),i+=o.byteLength;return n.buffer}function F2(...t){let e=t,r=e&&e.length>1&&e[0].constructor||null;if(!r)throw new Error('"concatenateTypedArrays" - incorrect quantity of arguments or arguments have incompatible data types');let n=e.reduce((s,a)=>s+a.length,0),i=new r(n),o=0;for(let s of e)i.set(s,o),o+=s.length;return i}function MA(t,e,r){let n=r!==void 0?new Uint8Array(t).subarray(e,e+r):new Uint8Array(t).subarray(e);return new Uint8Array(n).buffer}function Um(t,e){return Bi(t>=0),Bi(e>0),t+(e-1)&~(e-1)}function LB(t,e,r){let n;if(t instanceof ArrayBuffer)n=new Uint8Array(t);else{let i=t.byteOffset,o=t.byteLength;n=new Uint8Array(t.buffer||t.arrayBuffer,i,o)}return e.set(n,r),r+Um(n.byteLength,4)}async function OB(t){let e=[];for await(let r of t)e.push(r);return RB(...e)}CA();var fye="Queued Requests",pye="Active Requests",dye="Cancelled Requests",mye="Queued Requests Ever",Aye="Active Requests Ever",gye={id:"request-scheduler",throttleRequests:!0,maxRequests:6,debounceTime:0},Vm=class{props;stats;activeRequestCount=0;requestQueue=[];requestMap=new Map;updateTimer=null;constructor(e={}){this.props={...gye,...e},this.stats=new ol({id:this.props.id}),this.stats.get(fye),this.stats.get(pye),this.stats.get(dye),this.stats.get(mye),this.stats.get(Aye)}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},i=new Promise(o=>(n.resolve=o,n));return this.requestQueue.push(n),this.requestMap.set(e,i),this._issueNewRequests(),i}_issueRequest(e){let{handle:r,resolve:n}=e,i=!1,o=()=>{i||(i=!0,this.requestMap.delete(r),this.activeRequestCount--,this._issueNewRequests())};return this.activeRequestCount++,n?n({done:o}):Promise.resolve({done:o})}_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}};var yye="",aH={};function DB(t){for(let e in aH)if(t.startsWith(e)){let r=aH[e];t=t.replace(e,r)}return!t.startsWith("http://")&&!t.startsWith("https://")&&(t=`${yye}${t}`),t}function cH(t){return t&&typeof t=="object"&&t.isBuffer}function dM(t){if(cH(t))return t;if(t instanceof ArrayBuffer)return t;if(ArrayBuffer.isView(t))return t.byteOffset===0&&t.byteLength===t.buffer.byteLength?t.buffer:t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength);if(typeof t=="string"){let e=t;return new TextEncoder().encode(e).buffer}if(t&&typeof t=="object"&&t._toArrayBuffer)return t._toArrayBuffer();throw new Error("toArrayBuffer")}var ku={};Uo(ku,{dirname:()=>xye,filename:()=>_ye,join:()=>vye,resolve:()=>bye});function lH(){if(typeof process<"u"&&typeof process.cwd<"u")return process.cwd();let t=window.location?.pathname;return t?.slice(0,t.lastIndexOf("/")+1)||""}function _ye(t){let e=t?t.lastIndexOf("/"):-1;return e>=0?t.substr(e+1):""}function xye(t){let e=t?t.lastIndexOf("/"):-1;return e>=0?t.substr(0,e):""}function vye(...t){let e="/";return t=t.map((r,n)=>(n&&(r=r.replace(new RegExp(`^${e}`),"")),n!==t.length-1&&(r=r.replace(new RegExp(`${e}$`),"")),r)),t.join(e)}function bye(...t){let e=[];for(let o=0;o<t.length;o++)e[o]=t[o];let r="",n=!1,i;for(let o=e.length-1;o>=-1&&!n;o--){let s;o>=0?s=e[o]:(i===void 0&&(i=lH()),s=i),s.length!==0&&(r=`${s}/${r}`,n=s.charCodeAt(0)===U2)}return r=wye(r,!n),n?`/${r}`:r.length>0?r:"."}var U2=47,NB=46;function wye(t,e){let r="",n=-1,i=0,o,s=!1;for(let a=0;a<=t.length;++a){if(a<t.length)o=t.charCodeAt(a);else{if(o===U2)break;o=U2}if(o===U2){if(!(n===a-1||i===1))if(n!==a-1&&i===2){if(r.length<2||!s||r.charCodeAt(r.length-1)!==NB||r.charCodeAt(r.length-2)!==NB){if(r.length>2){let l=r.length-1,u=l;for(;u>=0&&r.charCodeAt(u)!==U2;--u);if(u!==l){r=u===-1?"":r.slice(0,u),n=a,i=0,s=!1;continue}}else if(r.length===2||r.length===1){r="",n=a,i=0,s=!1;continue}}e&&(r.length>0?r+="/..":r="..",s=!0)}else{let l=t.slice(n+1,a);r.length>0?r+=`/${l}`:r=l,s=!1}n=a,i=0}else o===NB&&i!==-1?++i:i=-1}return r}var mM=class{fetch;loadOptions;_needsRefresh=!0;props;constructor(e){this.props={...e},this.loadOptions={...e.loadOptions},this.fetch=Tye(this.loadOptions)}setProps(e){this.props=Object.assign(this.props,e),this.setNeedsRefresh()}setNeedsRefresh(){this._needsRefresh=!0}getNeedsRefresh(e=!0){let r=this._needsRefresh;return e&&(this._needsRefresh=!1),r}};function Tye(t){let e=t?.fetch;if(e&&typeof e=="function")return(n,i)=>e(n,i);let r=t?.fetch;return r&&typeof r!="function"?n=>fetch(n,r):n=>fetch(n)}var gh=class extends mM{};Dr(gh,"type","template"),Dr(gh,"testURL",e=>!1);var Eye=t=>typeof t=="boolean",V2=t=>typeof t=="function",IA=t=>t!==null&&typeof t=="object",FB=t=>IA(t)&&t.constructor==={}.constructor;var uH=t=>Boolean(t)&&typeof t[Symbol.iterator]=="function",hH=t=>t&&typeof t[Symbol.asyncIterator]=="function";var yh=t=>typeof Response<"u"&&t instanceof Response||t&&t.arrayBuffer&&t.text&&t.json;var _h=t=>typeof Blob<"u"&&t instanceof Blob,fH=t=>t&&typeof t=="object"&&t.isBuffer;var Mye=t=>typeof ReadableStream<"u"&&t instanceof ReadableStream||IA(t)&&V2(t.tee)&&V2(t.cancel)&&V2(t.getReader);var Sye=t=>IA(t)&&V2(t.read)&&V2(t.pipe)&&Eye(t.readable),AM=t=>Mye(t)||Sye(t);var gM=class extends Error{constructor(e,r){super(e),this.reason=r.reason,this.url=r.url,this.response=r.response}reason;url;response};var Cye=/^data:([-\w.]+\/[-\w.+]+)(;|,)/,Iye=/^([-\w.]+\/[-\w.+]+)/;function zB(t,e){return t.toLowerCase()===e.toLowerCase()}function pH(t){let e=Iye.exec(t);return e?e[1]:t}function UB(t){let e=Cye.exec(t);return e?e[1]:""}var dH=/\?.*/;function mH(t){let e=t.match(dH);return e&&e[0]}function D_(t){return t.replace(dH,"")}function AH(t){if(t.length<50)return t;let e=t.slice(t.length-15);return`${t.substr(0,32)}...${e}`}function PA(t){return yh(t)?t.url:_h(t)?t.name||"":typeof t=="string"?t:""}function j2(t){if(yh(t)){let e=t,r=e.headers.get("content-type")||"",n=D_(e.url);return pH(r)||UB(n)}return _h(t)?t.type||"":typeof t=="string"?UB(t):""}function gH(t){return yh(t)?t.headers["content-length"]||-1:_h(t)?t.size:typeof t=="string"?t.length:t instanceof ArrayBuffer||ArrayBuffer.isView(t)?t.byteLength:-1}async function yM(t){if(yh(t))return t;let e={},r=gH(t);r>=0&&(e["content-length"]=String(r));let n=PA(t),i=j2(t);i&&(e["content-type"]=i);let o=await Rye(t);o&&(e["x-first-bytes"]=o),typeof t=="string"&&(t=new TextEncoder().encode(t));let s=new Response(t,{headers:e});return Object.defineProperty(s,"url",{value:n}),s}async function yH(t){if(!t.ok)throw await Pye(t)}async function Pye(t){let e=AH(t.url),r=`Failed to fetch resource (${t.status}) ${t.statusText}: ${e}`;r=r.length>100?`${r.slice(0,100)}...`:r;let n={reason:t.statusText,url:t.url,response:t};try{let i=t.headers.get("Content-Type");n.reason=i?.includes("application/json")?await t.json():t.text()}catch{}return new gM(r,n)}async function Rye(t){if(typeof t=="string")return`data:,${t.slice(0,5)}`;if(t instanceof Blob){let r=t.slice(0,5);return await new Promise(n=>{let i=new FileReader;i.onload=o=>n(o?.target?.result),i.readAsDataURL(r)})}if(t instanceof ArrayBuffer){let r=t.slice(0,5);return`data:base64,${Lye(r)}`}return null}function Lye(t){let e="",r=new Uint8Array(t);for(let n=0;n<r.byteLength;n++)e+=String.fromCharCode(r[n]);return btoa(e)}function Oye(t){return!Bye(t)&&!kye(t)}function Bye(t){return t.startsWith("http:")||t.startsWith("https:")}function kye(t){return t.startsWith("data:")}async function N_(t,e){if(typeof t=="string"){let r=DB(t);return Oye(r)&&globalThis.loaders?.fetchNode?globalThis.loaders?.fetchNode(r,e):await fetch(r,e)}return await yM(t)}B_();var VB=new au({id:"loaders.gl"}),_M=class{log(){return()=>{}}info(){return()=>{}}warn(){return()=>{}}error(){return()=>{}}},xM=class{console;constructor(){this.console=console}log(...e){return this.console.log.bind(this.console,...e)}info(...e){return this.console.info.bind(this.console,...e)}warn(...e){return this.console.warn.bind(this.console,...e)}error(...e){return this.console.error.bind(this.console,...e)}};var jB={fetch:null,mimeType:void 0,nothrow:!1,log:new xM,useLocalLibraries:!1,CDN:"https://unpkg.com/@loaders.gl",worker:!0,maxConcurrency:3,maxMobileConcurrency:1,reuseWorkers:vd,_nodeWorkers:!1,_workerType:"",limit:0,_limitMB:0,batchSize:"auto",batchDebounceMs:0,metadata:!1,transforms:[]},_H={throws:"nothrow",dataType:"(no longer used)",uri:"baseUri",method:"fetch.method",headers:"fetch.headers",body:"fetch.body",mode:"fetch.mode",credentials:"fetch.credentials",cache:"fetch.cache",redirect:"fetch.redirect",referrer:"fetch.referrer",referrerPolicy:"fetch.referrerPolicy",integrity:"fetch.integrity",keepalive:"fetch.keepalive",signal:"fetch.signal"};function HB(){globalThis.loaders=globalThis.loaders||{};let{loaders:t}=globalThis;return t._state||(t._state={}),t._state}function WB(){let t=HB();return t.globalOptions=t.globalOptions||{...jB},t.globalOptions}function bH(t,e,r,n){return r=r||[],r=Array.isArray(r)?r:[r],Dye(t,r),Fye(e,t,n)}function Dye(t,e){xH(t,null,jB,_H,e);for(let r of e){let n=t&&t[r.id]||{},i=r.options&&r.options[r.id]||{},o=r.deprecatedOptions&&r.deprecatedOptions[r.id]||{};xH(n,r.id,i,o,e)}}function xH(t,e,r,n,i){let o=e||"Top level",s=e?`${e}.`:"";for(let a in t){let l=!e&&IA(t[a]),u=a==="baseUri"&&!e,f=a==="workerUrl"&&e;if(!(a in r)&&!u&&!f){if(a in n)VB.warn(`${o} loader option '${s}${a}' no longer supported, use '${n[a]}'`)();else if(!l){let m=Nye(a,i);VB.warn(`${o} loader option '${s}${a}' not recognized. ${m}`)()}}}}function Nye(t,e){let r=t.toLowerCase(),n="";for(let i of e)for(let o in i.options){if(t===o)return`Did you mean '${i.id}.${o}'?`;let s=o.toLowerCase();(r.startsWith(s)||s.startsWith(r))&&(n=n||`Did you mean '${i.id}.${o}'?`)}return n}function Fye(t,e,r){let i={...t.options||{}};return zye(i,r),i.log===null&&(i.log=new _M),vH(i,WB()),vH(i,e),i}function vH(t,e){for(let r in e)if(r in e){let n=e[r];FB(n)&&FB(t[r])?t[r]={...t[r],...e[r]}:t[r]=e[r]}}function zye(t,e){e&&!("baseUri"in t)&&(t.baseUri=e)}function H2(t){return t?(Array.isArray(t)&&(t=t[0]),Array.isArray(t?.extensions)):!1}function W2(t){Bi(t,"null loader"),Bi(H2(t),"invalid loader");let e;return Array.isArray(t)&&(e=t[1],t=t[0],t={...t,options:{...t.options,...e}}),(t?.parseTextSync||t?.parseText)&&(t.text=!0),t.text||(t.binary=!0),t}var wH=()=>{let t=HB();return t.loaderRegistry=t.loaderRegistry||[],t.loaderRegistry};function RA(t){let e=wH();t=Array.isArray(t)?t:[t];for(let r of t){let n=W2(r);e.find(i=>n===i)||e.unshift(n)}}function TH(){return wH()}B_();var EH=new au({id:"loaders.gl"});var Uye=/\.([^.]+)$/;async function CH(t,e=[],r,n){if(!IH(t))return null;let i=MH(t,e,{...r,nothrow:!0},n);if(i)return i;if(_h(t)&&(t=await t.slice(0,10).arrayBuffer(),i=MH(t,e,r,n)),!i&&!r?.nothrow)throw new Error(PH(t));return i}function MH(t,e=[],r,n){if(!IH(t))return null;if(e&&!Array.isArray(e))return W2(e);let i=[];e&&(i=i.concat(e)),r?.ignoreRegisteredLoaders||i.push(...TH()),jye(i);let o=Vye(t,i,r,n);if(!o&&!r?.nothrow)throw new Error(PH(t));return o}function Vye(t,e,r,n){let i=PA(t),o=j2(t),s=D_(i)||n?.url,a=null,l="";return r?.mimeType&&(a=qB(e,r?.mimeType),l=`match forced by supplied MIME type ${r?.mimeType}`),a=a||Hye(e,s),l=l||(a?`matched url ${s}`:""),a=a||qB(e,o),l=l||(a?`matched MIME type ${o}`:""),a=a||qye(e,t),l=l||(a?`matched initial data ${RH(t)}`:""),r?.fallbackMimeType&&(a=a||qB(e,r?.fallbackMimeType),l=l||(a?`matched fallback MIME type ${o}`:"")),l&&EH.log(1,`selectLoader selected ${a?.name}: ${l}.`),a}function IH(t){return!(t instanceof Response&&t.status===204)}function PH(t){let e=PA(t),r=j2(t),n="No valid loader found (";n+=e?`${ku.filename(e)}, `:"no url provided, ",n+=`MIME type: ${r?`"${r}"`:"not provided"}, `;let i=t?RH(t):"";return n+=i?` first bytes: "${i}"`:"first bytes: not available",n+=")",n}function jye(t){for(let e of t)W2(e)}function Hye(t,e){let r=e&&Uye.exec(e),n=r&&r[1];return n?Wye(t,n):null}function Wye(t,e){e=e.toLowerCase();for(let r of t)for(let n of r.extensions)if(n.toLowerCase()===e)return r;return null}function qB(t,e){for(let r of t)if(r.mimeTypes?.some(n=>zB(e,n))||zB(e,`application/x.${r.id}`))return r;return null}function qye(t,e){if(!e)return null;for(let r of t)if(typeof e=="string"){if(Gye(e,r))return r}else if(ArrayBuffer.isView(e)){if(SH(e.buffer,e.byteOffset,r))return r}else if(e instanceof ArrayBuffer&&SH(e,0,r))return r;return null}function Gye(t,e){return e.testText?e.testText(t):(Array.isArray(e.tests)?e.tests:[e.tests]).some(n=>t.startsWith(n))}function SH(t,e,r){return(Array.isArray(r.tests)?r.tests:[r.tests]).some(i=>Xye(t,e,r,i))}function Xye(t,e,r,n){if(n instanceof ArrayBuffer)return PB(n,t,n.byteLength);switch(typeof n){case"function":return n(t);case"string":let i=GB(t,e,n.length);return n===i;default:return!1}}function RH(t,e=5){return typeof t=="string"?t.slice(0,e):ArrayBuffer.isView(t)?GB(t.buffer,t.byteOffset,e):t instanceof ArrayBuffer?GB(t,0,e):""}function GB(t,e,r){if(t.byteLength<e+r)return"";let n=new DataView(t),i="";for(let o=0;o<r;o++)i+=String.fromCharCode(n.getUint8(e+o));return i}function*LH(t,e){let r=e?.chunkSize||262144,n=0,i=new TextEncoder;for(;n<t.length;){let o=Math.min(t.length-n,r),s=t.slice(n,n+o);n+=o,yield i.encode(s)}}function*OH(t,e={}){let{chunkSize:r=262144}=e,n=0;for(;n<t.byteLength;){let i=Math.min(t.byteLength-n,r),o=new ArrayBuffer(i),s=new Uint8Array(t,n,i);new Uint8Array(o).set(s),n+=i,yield o}}async function*BH(t,e){let r=e?.chunkSize||1048576,n=0;for(;n<t.size;){let i=n+r,o=await t.slice(n,i).arrayBuffer();n=i,yield o}}function XB(t,e){return vd?Yye(t,e):$ye(t,e)}async function*Yye(t,e){let r=t.getReader(),n;try{for(;;){let i=n||r.read();e?._streamReadAhead&&(n=r.read());let{done:o,value:s}=await i;if(o)return;yield dM(s)}}catch{r.releaseLock()}}async function*$ye(t,e){for await(let r of t)yield dM(r)}function kH(t,e){if(typeof t=="string")return LH(t,e);if(t instanceof ArrayBuffer)return OH(t,e);if(_h(t))return BH(t,e);if(AM(t))return XB(t,e);if(yh(t))return XB(t.body,e);throw new Error("makeIterator")}var DH="Cannot convert supplied data type";function Kye(t,e,r){if(e.text&&typeof t=="string")return t;if(fH(t)&&(t=t.buffer),t instanceof ArrayBuffer){let n=t;return e.text&&!e.binary?new TextDecoder("utf8").decode(n):n}if(ArrayBuffer.isView(t)){if(e.text&&!e.binary)return new TextDecoder("utf8").decode(t);let n=t.buffer,i=t.byteLength||t.length;return(t.byteOffset!==0||i!==n.byteLength)&&(n=n.slice(t.byteOffset,t.byteOffset+i)),n}throw new Error(DH)}async function NH(t,e,r){let n=t instanceof ArrayBuffer||ArrayBuffer.isView(t);if(typeof t=="string"||n)return Kye(t,e,r);if(_h(t)&&(t=await yM(t)),yh(t)){let i=t;return await yH(i),e.binary?await i.arrayBuffer():await i.text()}if(AM(t)&&(t=kH(t,r)),uH(t)||hH(t))return OB(t);throw new Error(DH)}function vM(t,e){let r=WB(),n=t||r;return typeof n.fetch=="function"?n.fetch:IA(n.fetch)?i=>N_(i,n.fetch):e?.fetch?e?.fetch:N_}function FH(t,e,r){if(r)return r;let n={fetch:vM(e,t),...t};if(n.url){let i=D_(n.url);n.baseUrl=i,n.queryString=mH(n.url),n.filename=ku.filename(i),n.baseUrl=ku.dirname(i)}return Array.isArray(n.loaders)||(n.loaders=null),n}function zH(t,e){if(t&&!Array.isArray(t))return t;let r;if(t&&(r=Array.isArray(t)?t:[t]),e&&e.loaders){let n=Array.isArray(e.loaders)?e.loaders:[e.loaders];r=r?[...r,...n]:n}return r&&r.length?r:void 0}async function jm(t,e,r,n){e&&!Array.isArray(e)&&!H2(e)&&(n=void 0,r=e,e=void 0),t=await t,r=r||{};let i=PA(t),s=zH(e,n),a=await CH(t,s,r);return a?(r=bH(r,a,s,i),n=FH({url:i,_parse:jm,loaders:s},r,n||null),await Zye(a,t,r,n)):null}async function Zye(t,e,r,n){if(EB(t),r=O2(t.options,r),yh(e)){let o=e,{ok:s,redirected:a,status:l,statusText:u,type:f,url:m}=o,v=Object.fromEntries(o.headers.entries());n.response={headers:v,ok:s,redirected:a,status:l,statusText:u,type:f,url:m}}e=await NH(e,t,r);let i=t;if(i.parseTextSync&&typeof e=="string")return i.parseTextSync(e,r,n);if(SB(t,r))return await CB(t,e,r,n,jm);if(i.parseText&&typeof e=="string")return await i.parseText(e,r,n);if(i.parse)return await i.parse(e,r,n);throw Gc(!i.parseSync),new Error(`${t.id} loader - no parser found and worker is disabled`)}async function za(t,e,r,n){let i,o;!Array.isArray(e)&&!H2(e)?(i=[],o=e,n=void 0):(i=e,o=r);let s=vM(o),a=t;return typeof t=="string"&&(a=await s(t)),_h(t)&&(a=await s(t)),Array.isArray(i)?await jm(a,i,o):await jm(a,i,o)}YB();var VH,jH,WH={fontFamily:'"Helvetica Neue", Helvetica, Arial, sans-serif',display:"flex",flex:"wrap",maxWidth:"500px",flexDirection:"column",zIndex:2};function bM(){return document.createElement("div")}function Qye(t){if(!t.picked)return null;if(t.object===VH)return jH;let e={html:e_e(t.object),style:WH};return jH=e,VH=t.object,e}var Jye=new Set(["position","index"]);function e_e(t){let e=bM();for(let r in t){if(Jye.has(r))continue;let n=bM();n.className="header",n.textContent=r;let i=bM();i.className="value",i.textContent=r_e(t[r]);let o=bM();t_e(o,n,i),o.appendChild(n),o.appendChild(i),e.appendChild(o)}return e.innerHTML}function t_e(t,e,r){Object.assign(e.style,{fontWeight:700,marginRight:"10px",flex:"1 1 0%"}),Object.assign(r.style,{flex:"none",maxWidth:"250px",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}),Object.assign(t.style,{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"stretch"})}function r_e(t){let e;if(Array.isArray(t)&&t.length>4)e=`Array<${t.length}>`;else if(typeof t=="string")e=t;else if(typeof t=="number")e=String(t);else try{e=JSON.stringify(t)}catch{e="<Non-Serializable Object>"}let r=50;return e.length>r&&(e=e.slice(0,r)),e}function HH(t,e){let r,n=t,i="properties",o=/{[^}]*}/g,s=l=>l.replace(/[{}]/g,""),a=[...new Set(t.match(o).map(s))];for(let l of a){if(l.includes(".")){r=e;let u=l.split(".");for(let f of u)if(r.hasOwnProperty(f))r=r[f];else{r=void 0;break}}else e.hasOwnProperty(l)?r=e[l]:e[i]&&e[i].hasOwnProperty(l)?r=e[i][l]:r=void 0;n=n.replaceAll(`{${l}}`,r)}return n}function $B(t){return t?t.html||t.text?e=>{if(!e.picked)return null;let r={style:t.style||WH};return t.html?r.html=HH(t.html,e.object):r.text=HH(t.text,e.object),r}:Qye:null}function qH(t){let e=document.createElement("link");e.type="text/css",e.rel="stylesheet",e.href=t,document.getElementsByTagName("head")[0].appendChild(e)}function GH(t,e){let r=document.createElement("div");return r.style.width=Number.isFinite(t)?`${t}px`:t,r.style.height=`${e}px`,r.style.position="relative",r}var YH=vc(XH()),n_e="https://api.tiles.mapbox.com/mapbox-gl-js/v1.13.2/mapbox-gl.css",QB=YH.default;function $H(t=n_e){qH(t)}function KH(){let t=["mapboxgl-missing-css"];for(let e of t){let r=document.getElementsByClassName(e)[0];r&&r.style&&(r.style.display="none")}}var JB={};function ZH(t){if(!JB[t]){let e=document.createElement("script");e.type="text/javascript",e.src=t,document.querySelector("head").appendChild(e),JB[t]=new Promise(n=>{e.onload=n})}return JB[t]}var QH="4.2.1";var i_e=globalThis.loaders?.parseImageNode,ek=typeof Image<"u",tk=typeof ImageBitmap<"u",o_e=Boolean(i_e),rk=vd?!0:o_e;function JH(t){switch(t){case"auto":return tk||ek||rk;case"imagebitmap":return tk;case"image":return ek;case"data":return rk;default:throw new Error(`@loaders.gl/images: image ${t} not supported in this environment`)}}function eW(){if(tk)return"imagebitmap";if(ek)return"image";if(rk)return"data";throw new Error("Install '@loaders.gl/polyfills' to parse images under Node.js")}function tW(t){let e=s_e(t);if(!e)throw new Error("Not an image");return e}function q2(t){switch(tW(t)){case"data":return t;case"image":case"imagebitmap":let e=document.createElement("canvas"),r=e.getContext("2d");if(!r)throw new Error("getImageData");return e.width=t.width,e.height=t.height,r.drawImage(t,0,0),r.getImageData(0,0,t.width,t.height);default:throw new Error("getImageData")}}function s_e(t){return typeof ImageBitmap<"u"&&t instanceof ImageBitmap?"imagebitmap":typeof Image<"u"&&t instanceof Image?"image":t&&typeof t=="object"&&t.data&&t.width&&t.height?"data":null}var a_e=/^data:image\/svg\+xml/,c_e=/\.svg((\?|#).*)?$/;function wM(t){return t&&(a_e.test(t)||c_e.test(t))}function rW(t,e){if(wM(e)){let n=new TextDecoder().decode(t);try{typeof unescape=="function"&&typeof encodeURIComponent=="function"&&(n=unescape(encodeURIComponent(n)))}catch(o){throw new Error(o.message)}return`data:image/svg+xml;base64,${btoa(n)}`}return nk(t,e)}function nk(t,e){if(wM(e))throw new Error("SVG cannot be parsed directly to imagebitmap");return new Blob([new Uint8Array(t)])}async function TM(t,e,r){let n=rW(t,r),i=self.URL||self.webkitURL,o=typeof n!="string"&&i.createObjectURL(n);try{return await l_e(o||n,e)}finally{o&&i.revokeObjectURL(o)}}async function l_e(t,e){let r=new Image;return r.src=t,e.image&&e.image.decode&&r.decode?(await r.decode(),r):await new Promise((n,i)=>{try{r.onload=()=>n(r),r.onerror=o=>{let s=o instanceof Error?o.message:"error";i(new Error(s))}}catch(o){i(o)}})}var u_e={},nW=!0;async function iW(t,e,r){let n;wM(r)?n=await TM(t,e,r):n=nk(t,r);let i=e&&e.imagebitmap;return await h_e(n,i)}async function h_e(t,e=null){if((f_e(e)||!nW)&&(e=null),e)try{return await createImageBitmap(t,e)}catch(r){console.warn(r),nW=!1}return await createImageBitmap(t)}function f_e(t){for(let e in t||u_e)return!1;return!0}function oW(t){return!A_e(t,"ftyp",4)||!(t[8]&96)?null:p_e(t)}function p_e(t){switch(d_e(t,8,12).replace("\0"," ").trim()){case"avif":case"avis":return{extension:"avif",mimeType:"image/avif"};default:return null}}function d_e(t,e,r){return String.fromCharCode(...t.slice(e,r))}function m_e(t){return[...t].map(e=>e.charCodeAt(0))}function A_e(t,e,r=0){let n=m_e(e);for(let i=0;i<n.length;++i)if(n[i]!==t[i+r])return!1;return!0}var dp=!1,G2=!0;function LA(t){let e=X2(t);return y_e(e)||v_e(e)||__e(e)||x_e(e)||g_e(e)}function g_e(t){let e=new Uint8Array(t instanceof DataView?t.buffer:t),r=oW(e);return r?{mimeType:r.mimeType,width:0,height:0}:null}function y_e(t){let e=X2(t);return e.byteLength>=24&&e.getUint32(0,dp)===2303741511?{mimeType:"image/png",width:e.getUint32(16,dp),height:e.getUint32(20,dp)}:null}function __e(t){let e=X2(t);return e.byteLength>=10&&e.getUint32(0,dp)===1195984440?{mimeType:"image/gif",width:e.getUint16(6,G2),height:e.getUint16(8,G2)}:null}function x_e(t){let e=X2(t);return e.byteLength>=14&&e.getUint16(0,dp)===16973&&e.getUint32(2,G2)===e.byteLength?{mimeType:"image/bmp",width:e.getUint32(18,G2),height:e.getUint32(22,G2)}:null}function v_e(t){let e=X2(t);if(!(e.byteLength>=3&&e.getUint16(0,dp)===65496&&e.getUint8(2)===255))return null;let{tableMarkers:n,sofMarkers:i}=b_e(),o=2;for(;o+9<e.byteLength;){let s=e.getUint16(o,dp);if(i.has(s))return{mimeType:"image/jpeg",height:e.getUint16(o+5,dp),width:e.getUint16(o+7,dp)};if(!n.has(s))return null;o+=2,o+=e.getUint16(o,dp)}return null}function b_e(){let t=new Set([65499,65476,65484,65501,65534]);for(let r=65504;r<65520;++r)t.add(r);return{tableMarkers:t,sofMarkers:new Set([65472,65473,65474,65475,65477,65478,65479,65481,65482,65483,65485,65486,65487,65502])}}function X2(t){if(t instanceof DataView)return t;if(ArrayBuffer.isView(t))return new DataView(t.buffer);if(t instanceof ArrayBuffer)return new DataView(t);throw new Error("toDataView")}async function sW(t,e){let{mimeType:r}=LA(t)||{},n=globalThis.loaders?.parseImageNode;return Bi(n),await n(t,r)}async function aW(t,e,r){e=e||{};let i=(e.image||{}).type||"auto",{url:o}=r||{},s=w_e(i),a;switch(s){case"imagebitmap":a=await iW(t,e,o);break;case"image":a=await TM(t,e,o);break;case"data":a=await sW(t,e);break;default:Bi(!1)}return i==="data"&&(a=q2(a)),a}function w_e(t){switch(t){case"auto":case"data":return eW();default:return JH(t),t}}var T_e=["png","jpg","jpeg","gif","webp","bmp","ico","svg","avif"],E_e=["image/png","image/jpeg","image/gif","image/webp","image/avif","image/bmp","image/vnd.microsoft.icon","image/svg+xml"],M_e={image:{type:"auto",decode:!0}},mp={dataType:null,batchType:null,id:"image",module:"images",name:"Images",version:QH,mimeTypes:E_e,extensions:T_e,parse:aW,tests:[t=>Boolean(LA(new DataView(t)))],options:M_e};var ik={};function ok(t){if(ik[t]===void 0){let e=vd?C_e(t):S_e(t);ik[t]=e}return ik[t]}function S_e(t){let e=["image/png","image/jpeg","image/gif"],r=globalThis.loaders?.imageFormatsNode||e,n=globalThis.loaders?.parseImageNode;return Boolean(n)&&r.includes(t)}function C_e(t){switch(t){case"image/avif":case"image/webp":return I_e(t);default:return!0}}function I_e(t){try{return document.createElement("canvas").toDataURL(t).indexOf(`data:${t}`)===0}catch{return!1}}B_();var P_e=new au({id:"deck"}),Ar=P_e;var sk={};function cW(t){sk=t}function sa(t,e,r,n){Ar.level>0&&sk[t]&&sk[t].call(null,e,r,n)}function R_e(t){let e=t[0],r=t[t.length-1];return e==="{"&&r==="}"||e==="["&&r==="]"}var lW={dataType:null,batchType:null,id:"JSON",name:"JSON",module:"",version:"",options:{},extensions:["json","geojson"],mimeTypes:["application/json","application/geo+json"],testText:R_e,parseTextSync:JSON.parse};function L_e(){let t="9.2.0",e=globalThis.deck&&globalThis.deck.VERSION;if(e&&e!==t)throw new Error(`deck.gl - multiple versions detected: ${e} vs ${t}`);return e||(Ar.log(1,`deck.gl ${t}`)(),globalThis.deck={...globalThis.deck,VERSION:t,version:t,log:Ar,_registerLoggers:cW},RA([lW,[mp,{imagebitmap:{premultiplyAlpha:"none"}}]])),t}var EM=L_e();function MM(t,e){if(!t)throw new Error(e||"shadertools: assertion failed.")}var ak={number:{type:"number",validate(t,e){return Number.isFinite(t)&&typeof e=="object"&&(e.max===void 0||t<=e.max)&&(e.min===void 0||t>=e.min)}},array:{type:"array",validate(t,e){return Array.isArray(t)||ArrayBuffer.isView(t)}}};function hW(t){let e={};for(let[r,n]of Object.entries(t))e[r]=O_e(n);return e}function O_e(t){let e=uW(t);if(e!=="object")return{value:t,...ak[e],type:e};if(typeof t=="object")return t?t.type!==void 0?{...t,...ak[t.type],type:t.type}:t.value===void 0?{type:"object",value:t}:(e=uW(t.value),{...t,...ak[e],type:e}):{type:"object",value:null};throw new Error("props")}function uW(t){return Array.isArray(t)||ArrayBuffer.isView(t)?"array":typeof t}var fW=`#ifdef MODULE_LOGDEPTH
553
553
  logdepth_adjustPosition(gl_Position);
554
554
  #endif
555
555
  `,pW=`#ifdef MODULE_MATERIAL