@luma.gl/engine 9.0.0-alpha.37 → 9.0.0-alpha.38

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/dist.dev.js CHANGED
@@ -1317,6 +1317,13 @@ var __exports__ = (() => {
1317
1317
  }
1318
1318
  // Canvas context
1319
1319
  /** Default / primary canvas context. Can be null as WebGPU devices can be created without a CanvasContext */
1320
+ /** Returns the default / primary canvas context. Throws an error if no canvas context is available (a WebGPU compute device) */
1321
+ getCanvasContext() {
1322
+ if (!this.canvasContext) {
1323
+ throw new Error("Device has no CanvasContext");
1324
+ }
1325
+ return this.canvasContext;
1326
+ }
1320
1327
  /** Creates a new CanvasContext (WebGPU only) */
1321
1328
  /** Call after rendering a frame (necessary e.g. on WebGL OffscreenCanvas) */
1322
1329
  // Resource creation
package/dist.min.js CHANGED
@@ -6,7 +6,7 @@
6
6
  else root['luma'] = factory();})(globalThis, function () {
7
7
  "use strict";var __exports__=(()=>{var jo=Object.create;var he=Object.defineProperty;var Fo=Object.getOwnPropertyDescriptor;var Uo=Object.getOwnPropertyNames;var Go=Object.getPrototypeOf,zo=Object.prototype.hasOwnProperty;var Ue=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Bo=(e,t)=>{for(var r in t)he(e,r,{get:t[r],enumerable:!0})},Mr=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Uo(t))!zo.call(e,i)&&i!==r&&he(e,i,{get:()=>t[i],enumerable:!(n=Fo(t,i))||n.enumerable});return e};var pe=(e,t,r)=>(r=e!=null?jo(Go(e)):{},Mr(t||!e||!e.__esModule?he(r,"default",{value:e,enumerable:!0}):r,e)),ko=e=>Mr(he({},"__esModule",{value:!0}),e);var Cr=Ue((Rc,gt)=>{function He(e){return gt.exports=He=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gt.exports.__esModule=!0,gt.exports.default=gt.exports,He(e)}gt.exports=He,gt.exports.__esModule=!0,gt.exports.default=gt.exports});var Ir=Ue((Cc,vt)=>{var Lr=Cr().default;function Dr(){"use strict";vt.exports=Dr=function(){return e},vt.exports.__esModule=!0,vt.exports.default=vt.exports;var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(g,p,d){g[p]=d.value},i=typeof Symbol=="function"?Symbol:{},o=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function a(g,p,d){return Object.defineProperty(g,p,{value:d,enumerable:!0,configurable:!0,writable:!0}),g[p]}try{a({},"")}catch{a=function(d,_,E){return d[_]=E}}function f(g,p,d,_){var E=p&&p.prototype instanceof h?p:h,P=Object.create(E.prototype),D=new U(_||[]);return n(P,"_invoke",{value:w(g,d,D)}),P}function u(g,p,d){try{return{type:"normal",arg:g.call(p,d)}}catch(_){return{type:"throw",arg:_}}}e.wrap=f;var l={};function h(){}function v(){}function m(){}var y={};a(y,o,function(){return this});var b=Object.getPrototypeOf,O=b&&b(b(C([])));O&&O!==t&&r.call(O,o)&&(y=O);var R=m.prototype=h.prototype=Object.create(y);function x(g){["next","throw","return"].forEach(function(p){a(g,p,function(d){return this._invoke(p,d)})})}function S(g,p){function d(E,P,D,z){var I=u(g[E],g,P);if(I.type!=="throw"){var G=I.arg,k=G.value;return k&&Lr(k)=="object"&&r.call(k,"__await")?p.resolve(k.__await).then(function(V){d("next",V,D,z)},function(V){d("throw",V,D,z)}):p.resolve(k).then(function(V){G.value=V,D(G)},function(V){return d("throw",V,D,z)})}z(I.arg)}var _;n(this,"_invoke",{value:function(P,D){function z(){return new p(function(I,G){d(P,D,I,G)})}return _=_?_.then(z,z):z()}})}function w(g,p,d){var _="suspendedStart";return function(E,P){if(_==="executing")throw new Error("Generator is already running");if(_==="completed"){if(E==="throw")throw P;return{value:void 0,done:!0}}for(d.method=E,d.arg=P;;){var D=d.delegate;if(D){var z=M(D,d);if(z){if(z===l)continue;return z}}if(d.method==="next")d.sent=d._sent=d.arg;else if(d.method==="throw"){if(_==="suspendedStart")throw _="completed",d.arg;d.dispatchException(d.arg)}else d.method==="return"&&d.abrupt("return",d.arg);_="executing";var I=u(g,p,d);if(I.type==="normal"){if(_=d.done?"completed":"suspendedYield",I.arg===l)continue;return{value:I.arg,done:d.done}}I.type==="throw"&&(_="completed",d.method="throw",d.arg=I.arg)}}}function M(g,p){var d=p.method,_=g.iterator[d];if(_===void 0)return p.delegate=null,d==="throw"&&g.iterator.return&&(p.method="return",p.arg=void 0,M(g,p),p.method==="throw")||d!=="return"&&(p.method="throw",p.arg=new TypeError("The iterator does not provide a '"+d+"' method")),l;var E=u(_,g.iterator,p.arg);if(E.type==="throw")return p.method="throw",p.arg=E.arg,p.delegate=null,l;var P=E.arg;return P?P.done?(p[g.resultName]=P.value,p.next=g.nextLoc,p.method!=="return"&&(p.method="next",p.arg=void 0),p.delegate=null,l):P:(p.method="throw",p.arg=new TypeError("iterator result is not an object"),p.delegate=null,l)}function j(g){var p={tryLoc:g[0]};1 in g&&(p.catchLoc=g[1]),2 in g&&(p.finallyLoc=g[2],p.afterLoc=g[3]),this.tryEntries.push(p)}function N(g){var p=g.completion||{};p.type="normal",delete p.arg,g.completion=p}function U(g){this.tryEntries=[{tryLoc:"root"}],g.forEach(j,this),this.reset(!0)}function C(g){if(g||g===""){var p=g[o];if(p)return p.call(g);if(typeof g.next=="function")return g;if(!isNaN(g.length)){var d=-1,_=function E(){for(;++d<g.length;)if(r.call(g,d))return E.value=g[d],E.done=!1,E;return E.value=void 0,E.done=!0,E};return _.next=_}}throw new TypeError(Lr(g)+" is not iterable")}return v.prototype=m,n(R,"constructor",{value:m,configurable:!0}),n(m,"constructor",{value:v,configurable:!0}),v.displayName=a(m,c,"GeneratorFunction"),e.isGeneratorFunction=function(g){var p=typeof g=="function"&&g.constructor;return!!p&&(p===v||(p.displayName||p.name)==="GeneratorFunction")},e.mark=function(g){return Object.setPrototypeOf?Object.setPrototypeOf(g,m):(g.__proto__=m,a(g,c,"GeneratorFunction")),g.prototype=Object.create(R),g},e.awrap=function(g){return{__await:g}},x(S.prototype),a(S.prototype,s,function(){return this}),e.AsyncIterator=S,e.async=function(g,p,d,_,E){E===void 0&&(E=Promise);var P=new S(f(g,p,d,_),E);return e.isGeneratorFunction(p)?P:P.next().then(function(D){return D.done?D.value:P.next()})},x(R),a(R,c,"Generator"),a(R,o,function(){return this}),a(R,"toString",function(){return"[object Generator]"}),e.keys=function(g){var p=Object(g),d=[];for(var _ in p)d.push(_);return d.reverse(),function E(){for(;d.length;){var P=d.pop();if(P in p)return E.value=P,E.done=!1,E}return E.done=!0,E}},e.values=C,U.prototype={constructor:U,reset:function(p){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(N),!p)for(var d in this)d.charAt(0)==="t"&&r.call(this,d)&&!isNaN(+d.slice(1))&&(this[d]=void 0)},stop:function(){this.done=!0;var p=this.tryEntries[0].completion;if(p.type==="throw")throw p.arg;return this.rval},dispatchException:function(p){if(this.done)throw p;var d=this;function _(G,k){return D.type="throw",D.arg=p,d.next=G,k&&(d.method="next",d.arg=void 0),!!k}for(var E=this.tryEntries.length-1;E>=0;--E){var P=this.tryEntries[E],D=P.completion;if(P.tryLoc==="root")return _("end");if(P.tryLoc<=this.prev){var z=r.call(P,"catchLoc"),I=r.call(P,"finallyLoc");if(z&&I){if(this.prev<P.catchLoc)return _(P.catchLoc,!0);if(this.prev<P.finallyLoc)return _(P.finallyLoc)}else if(z){if(this.prev<P.catchLoc)return _(P.catchLoc,!0)}else{if(!I)throw new Error("try statement without catch or finally");if(this.prev<P.finallyLoc)return _(P.finallyLoc)}}}},abrupt:function(p,d){for(var _=this.tryEntries.length-1;_>=0;--_){var E=this.tryEntries[_];if(E.tryLoc<=this.prev&&r.call(E,"finallyLoc")&&this.prev<E.finallyLoc){var P=E;break}}P&&(p==="break"||p==="continue")&&P.tryLoc<=d&&d<=P.finallyLoc&&(P=null);var D=P?P.completion:{};return D.type=p,D.arg=d,P?(this.method="next",this.next=P.finallyLoc,l):this.complete(D)},complete:function(p,d){if(p.type==="throw")throw p.arg;return p.type==="break"||p.type==="continue"?this.next=p.arg:p.type==="return"?(this.rval=this.arg=p.arg,this.method="return",this.next="end"):p.type==="normal"&&d&&(this.next=d),l},finish:function(p){for(var d=this.tryEntries.length-1;d>=0;--d){var _=this.tryEntries[d];if(_.finallyLoc===p)return this.complete(_.completion,_.afterLoc),N(_),l}},catch:function(p){for(var d=this.tryEntries.length-1;d>=0;--d){var _=this.tryEntries[d];if(_.tryLoc===p){var E=_.completion;if(E.type==="throw"){var P=E.arg;N(_)}return P}}throw new Error("illegal catch attempt")},delegateYield:function(p,d,_){return this.delegate={iterator:C(p),resultName:d,nextLoc:_},this.method==="next"&&(this.arg=void 0),l}},e}vt.exports=Dr,vt.exports.__esModule=!0,vt.exports.default=vt.exports});var Jt=Ue((Lc,Nr)=>{var de=Ir()();Nr.exports=de;try{regeneratorRuntime=de}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=de:Function("r","regeneratorRuntime = r")(de)}});var tc={};Bo(tc,{AnimationLoop:()=>be,AnimationLoopTemplate:()=>jr,ClipSpace:()=>oo,ConeGeometry:()=>ho,CubeGeometry:()=>mo,CylinderGeometry:()=>yo,Geometry:()=>st,GroupNode:()=>ao,IcoSphereGeometry:()=>xo,KeyFrames:()=>Tr,Model:()=>ae,ModelNode:()=>co,PipelineFactory:()=>se,PlaneGeometry:()=>wo,ScenegraphNode:()=>Dt,ShaderModuleUniforms:()=>Qi,SphereGeometry:()=>Mo,Timeline:()=>Ar,Transform:()=>Ji,TruncatedConeGeometry:()=>Yt,makeAnimationLoop:()=>_n});function Ge(e){if(Array.isArray(e))return e}function ze(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,o,s,c=[],a=!0,f=!1;try{if(o=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;a=!1}else for(;!(a=(n=o.call(r)).done)&&(c.push(n.value),c.length!==t);a=!0);}catch(u){f=!0,i=u}finally{try{if(!a&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(f)throw i}}return c}}function It(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function $t(e,t){if(e){if(typeof e=="string")return It(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return It(e,t)}}function Be(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
8
8
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function B(e,t){return Ge(e)||ze(e,t)||$t(e,t)||Be()}function tt(e){return tt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},tt(e)}function ke(e,t){if(tt(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(tt(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Zt(e){var t=ke(e,"string");return tt(t)==="symbol"?t:String(t)}function Sr(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Zt(n.key),n)}}function A(e,t,r){return t&&Sr(e.prototype,t),r&&Sr(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function T(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ve(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=Vo(e))||t&&e&&typeof e.length=="number"){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(f){throw f},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
9
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,s=!1,c;return{s:function(){r=r.call(e)},n:function(){var f=r.next();return o=f.done,f},e:function(f){s=!0,c=f},f:function(){try{!o&&r.return!=null&&r.return()}finally{if(s)throw c}}}}function Vo(e,t){if(e){if(typeof e=="string")return Pr(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Pr(e,t)}}function Pr(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var Ho=1,qo=1,Ar=function(){function e(){T(this,e),this.time=0,this.channels=new Map,this.animations=new Map,this.playing=!1,this.lastEngineTime=-1}var t=e.prototype;return t.addChannel=function(n){var i=n.delay,o=i===void 0?0:i,s=n.duration,c=s===void 0?Number.POSITIVE_INFINITY:s,a=n.rate,f=a===void 0?1:a,u=n.repeat,l=u===void 0?1:u,h=Ho++,v={time:0,delay:o,duration:c,rate:f,repeat:l};return this._setChannelTime(v,this.time),this.channels.set(h,v),h},t.removeChannel=function(n){this.channels.delete(n);var i=Ve(this.animations),o;try{for(i.s();!(o=i.n()).done;){var s=B(o.value,2),c=s[0],a=s[1];a.channel===n&&this.detachAnimation(c)}}catch(f){i.e(f)}finally{i.f()}},t.isFinished=function(n){var i=this.channels.get(n);return i===void 0?!1:this.time>=i.delay+i.duration*i.repeat},t.getTime=function(n){if(n===void 0)return this.time;var i=this.channels.get(n);return i===void 0?-1:i.time},t.setTime=function(n){this.time=Math.max(0,n);var i=this.channels.values(),o=Ve(i),s;try{for(o.s();!(s=o.n()).done;){var c=s.value;this._setChannelTime(c,this.time)}}catch(m){o.e(m)}finally{o.f()}var a=this.animations.values(),f=Ve(a),u;try{for(f.s();!(u=f.n()).done;){var l=u.value,h=l.animation,v=l.channel;h.setTime(this.getTime(v))}}catch(m){f.e(m)}finally{f.f()}},t.play=function(){this.playing=!0},t.pause=function(){this.playing=!1,this.lastEngineTime=-1},t.reset=function(){this.setTime(0)},t.attachAnimation=function(n,i){var o=qo++;return this.animations.set(o,{animation:n,channel:i}),n.setTime(this.getTime(i)),o},t.detachAnimation=function(n){this.animations.delete(n)},t.update=function(n){this.playing&&(this.lastEngineTime===-1&&(this.lastEngineTime=n),this.setTime(this.time+(n-this.lastEngineTime)),this.lastEngineTime=n)},t._setChannelTime=function(n,i){var o=i-n.delay,s=n.duration*n.repeat;o>=s?n.time=n.duration*n.rate:(n.time=Math.max(0,o)%n.duration,n.time*=n.rate)},A(e)}();var Tr=function(){function e(r){T(this,e),this.startIndex=-1,this.endIndex=-1,this.factor=0,this.times=[],this.values=[],this._lastTime=-1,this.setKeyFrames(r),this.setTime(0)}var t=e.prototype;return t.setKeyFrames=function(n){var i=n.length;this.times.length=i,this.values.length=i;for(var o=0;o<i;++o)this.times[o]=n[o][0],this.values[o]=n[o][1];this._calculateKeys(this._lastTime)},t.setTime=function(n){n=Math.max(0,n),n!==this._lastTime&&(this._calculateKeys(n),this._lastTime=n)},t.getStartTime=function(){return this.times[this.startIndex]},t.getEndTime=function(){return this.times[this.endIndex]},t.getStartData=function(){return this.values[this.startIndex]},t.getEndData=function(){return this.values[this.endIndex]},t._calculateKeys=function(n){var i=0,o=this.times.length;for(i=0;i<o-2&&!(this.times[i+1]>n);++i);this.startIndex=i,this.endIndex=i+1;var s=this.times[this.startIndex],c=this.times[this.endIndex];this.factor=Math.min(Math.max(0,(n-s)/(c-s)),1)},A(e)}();function Rr(e,t,r,n,i,o,s){try{var c=e[o](s),a=c.value}catch(f){r(f);return}c.done?t(a):Promise.resolve(a).then(n,i)}function lt(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var o=e.apply(t,r);function s(a){Rr(o,n,i,s,c,"next",a)}function c(a){Rr(o,n,i,s,c,"throw",a)}s(void 0)})}}var qe=pe(Jt(),1),jr=function(){function e(r){T(this,e)}var t=e.prototype;return t.onInitialize=function(){var r=lt(qe.default.mark(function i(o){return qe.default.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.abrupt("return",null);case 1:case"end":return c.stop()}},i)}));function n(i){return r.apply(this,arguments)}return n}(),A(e)}();function L(e,t,r){return t=Zt(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var yt=pe(Jt(),1);function We(e){if(typeof window<"u"&&typeof window.process=="object"&&window.process.type==="renderer"||typeof process<"u"&&typeof process.versions=="object"&&Boolean(process.versions.electron))return!0;let t=typeof navigator=="object"&&typeof navigator.userAgent=="string"&&navigator.userAgent,r=e||t;return!!(r&&r.indexOf("Electron")>=0)}function ct(){return!(typeof process=="object"&&String(process)==="[object process]"&&!process.browser)||We()}var Wo=globalThis.self||globalThis.window||globalThis.global,Nt=globalThis.window||globalThis.self||globalThis.global,Ko=globalThis.document||{},At=globalThis.process||{},Yo=globalThis.console,kc=globalThis.navigator||{};var me=typeof __VERSION__<"u"?__VERSION__:"untranspiled source",qc=ct();function Xo(e){try{let t=window[e],r="__storage_test__";return t.setItem(r,r),t.removeItem(r),t}catch{return null}}var ge=class{constructor(t,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"sessionStorage";this.storage=void 0,this.id=void 0,this.config=void 0,this.storage=Xo(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 Fr(e){let t;return e<10?t="".concat(e.toFixed(2),"ms"):e<100?t="".concat(e.toFixed(1),"ms"):e<1e3?t="".concat(e.toFixed(0),"ms"):t="".concat((e/1e3).toFixed(2),"s"),t}function Ur(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:8,r=Math.max(t-e.length,0);return"".concat(" ".repeat(r)).concat(e)}function ve(e,t,r){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:600,i=e.src.replace(/\(/g,"%28").replace(/\)/g,"%29");e.width>n&&(r=Math.min(r,n/e.width));let o=e.width*r,s=e.height*r,c=["font-size:1px;","padding:".concat(Math.floor(s/2),"px ").concat(Math.floor(o/2),"px;"),"line-height:".concat(s,"px;"),"background:url(".concat(i,");"),"background-size:".concat(o,"px ").concat(s,"px;"),"color:transparent;"].join("");return["".concat(t," %c+"),c]}var ye;(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"})(ye||(ye={}));var $o=10;function Gr(e){return typeof e!="string"?e:(e=e.toUpperCase(),ye[e]||ye.WHITE)}function zr(e,t,r){if(!ct&&typeof e=="string"){if(t){let n=Gr(t);e="\x1B[".concat(n,"m").concat(e,"\x1B[39m")}if(r){let n=Gr(r);e="\x1B[".concat(n+$o,"m").concat(e,"\x1B[49m")}}return e}function Br(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:["constructor"],r=Object.getPrototypeOf(e),n=Object.getOwnPropertyNames(r),i=e;for(let o of n){let s=i[o];typeof s=="function"&&(t.find(c=>o===c)||(i[o]=s.bind(e)))}}function jt(e,t){if(!e)throw new Error(t||"Assertion failed")}function Tt(){let e;if(ct()&&Nt.performance){var t,r;e=Nt===null||Nt===void 0||(t=Nt.performance)===null||t===void 0||(r=t.now)===null||r===void 0?void 0:r.call(t)}else if("hrtime"in At){var n;let i=At===null||At===void 0||(n=At.hrtime)===null||n===void 0?void 0:n.call(At);e=i[0]*1e3+i[1]/1e6}else e=Date.now();return e}var Ft={debug:ct()&&console.debug||console.log,log:console.log,info:console.info,warn:console.warn,error:console.error},Zo={enabled:!0,level:0};function ht(){}var kr={},Vr={once:!0},wt=class{constructor(){let{id:t}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{id:""};this.id=void 0,this.VERSION=me,this._startTs=Tt(),this._deltaTs=Tt(),this._storage=void 0,this.userData={},this.LOG_THROTTLE_TIMEOUT=0,this.id=t,this.userData={},this._storage=new ge("__probe-".concat(this.id,"__"),Zo),this.timeStamp("".concat(this.id," started")),Br(this),Object.seal(this)}set level(t){this.setLevel(t)}get level(){return this.getLevel()}isEnabled(){return this._storage.config.enabled}getLevel(){return this._storage.config.level}getTotal(){return Number((Tt()-this._startTs).toPrecision(10))}getDelta(){return Number((Tt()-this._deltaTs).toPrecision(10))}set priority(t){this.level=t}get priority(){return this.level}getPriority(){return this.level}enable(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return this._storage.setConfiguration({enabled:t}),this}setLevel(t){return this._storage.setConfiguration({level:t}),this}get(t){return this._storage.config[t]}set(t,r){this._storage.setConfiguration({[t]:r})}settings(){console.table?console.table(this._storage.config):console.log(this._storage.config)}assert(t,r){jt(t,r)}warn(t){return this._getLogFunction(0,t,Ft.warn,arguments,Vr)}error(t){return this._getLogFunction(0,t,Ft.error,arguments)}deprecated(t,r){return this.warn("`".concat(t,"` is deprecated and will be removed in a later version. Use `").concat(r,"` instead"))}removed(t,r){return this.error("`".concat(t,"` has been removed. Use `").concat(r,"` instead"))}probe(t,r){return this._getLogFunction(t,r,Ft.log,arguments,{time:!0,once:!0})}log(t,r){return this._getLogFunction(t,r,Ft.debug,arguments)}info(t,r){return this._getLogFunction(t,r,console.info,arguments)}once(t,r){return this._getLogFunction(t,r,Ft.debug||Ft.info,arguments,Vr)}table(t,r,n){return r?this._getLogFunction(t,r,console.table||ht,n&&[n],{tag:es(r)}):ht}image(t){let{logLevel:r,priority:n,image:i,message:o="",scale:s=1}=t;return this._shouldLog(r||n)?ct()?ts({image:i,message:o,scale:s}):Qo({image:i,message:o,scale:s}):ht}time(t,r){return this._getLogFunction(t,r,console.time?console.time:console.info)}timeEnd(t,r){return this._getLogFunction(t,r,console.timeEnd?console.timeEnd:console.info)}timeStamp(t,r){return this._getLogFunction(t,r,console.timeStamp||ht)}group(t,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{collapsed:!1},i=Hr({logLevel:t,message:r,opts:n}),{collapsed:o}=n;return i.method=(o?console.groupCollapsed:console.group)||console.info,this._getLogFunction(i)}groupCollapsed(t,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.group(t,r,Object.assign({},n,{collapsed:!0}))}groupEnd(t){return this._getLogFunction(t,"",console.groupEnd||ht)}withGroup(t,r,n){this.group(t,r)();try{n()}finally{this.groupEnd(t)()}}trace(){console.trace&&console.trace()}_shouldLog(t){return this.isEnabled()&&this.getLevel()>=qr(t)}_getLogFunction(t,r,n,i,o){if(this._shouldLog(t)){o=Hr({logLevel:t,message:r,args:i,opts:o}),n=n||o.method,jt(n),o.total=this.getTotal(),o.delta=this.getDelta(),this._deltaTs=Tt();let s=o.tag||o.message;if(o.once&&s)if(!kr[s])kr[s]=Tt();else return ht;return r=Jo(this.id,o.message,o),n.bind(console,r,...o.args)}return ht}};wt.VERSION=me;function qr(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 jt(Number.isFinite(t)&&t>=0),t}function Hr(e){let{logLevel:t,message:r}=e;e.logLevel=qr(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 i=typeof e.message;return jt(i==="string"||i==="object"),Object.assign(e,{args:n},e.opts)}function Jo(e,t,r){if(typeof t=="string"){let n=r.time?Ur(Fr(r.total)):"";t=r.time?"".concat(e,": ").concat(n," ").concat(t):"".concat(e,": ").concat(t),t=zr(t,r.color,r.background)}return t}function Qo(e){let{image:t,message:r="",scale:n=1}=e;return console.warn("removed"),ht}function ts(e){let{image:t,message:r="",scale:n=1}=e;if(typeof t=="string"){let o=new Image;return o.onload=()=>{let s=ve(o,r,n);console.log(...s)},o.src=t,ht}let i=t.nodeName||"";if(i.toLowerCase()==="img")return console.log(...ve(t,r,n)),ht;if(i.toLowerCase()==="canvas"){let o=new Image;return o.onload=()=>console.log(...ve(o,r,n)),o.src=t.toDataURL(),ht}return ht}function es(e){for(let t in e)for(let r in e[t])return r||"untitled";return"empty"}var vf=new wt({id:"@probe.gl/log"});var K=new wt({id:"luma.gl"});function Qt(){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 Rt=class{constructor(t,r){this.name=void 0,this.type=void 0,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=Qt(),this._timerPending=!0,this}timeEnd(){return this._timerPending?(this.addTime(Qt()-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 Et=class{constructor(t){this.id=void 0,this.stats={},this.id=t.id,this.stats={},this._initializeStats(t.stats),Object.seal(this)}get(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"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(){(arguments.length>0&&arguments[0]!==void 0?arguments[0]:[]).forEach(r=>this._getOrCreate(r))}_getOrCreate(t){let{name:r,type:n}=t,i=this.stats[r];return i||(t instanceof Rt?i=t:i=new Rt(r,n),this.stats[r]=i),i}};var rs=function(){function e(){T(this,e),this.stats=new Map}var t=e.prototype;return t.getStats=function(n){return this.get(n)},t.get=function(n){return this.stats.has(n)||this.stats.set(n,new Et({id:n})),this.stats.get(n)},A(e)}(),Ut=new rs;function ns(){var e=typeof __VERSION__<"u"?__VERSION__:"untranspiled source",t="set luma.log.level=1 (or higher) to trace rendering";if(globalThis.luma&&globalThis.luma.VERSION!==e)throw new Error("luma.gl - multiple VERSIONs detected: ".concat(globalThis.luma.VERSION," vs ").concat(e));return globalThis.luma||(ct()&&K.log(1,"luma.gl ".concat(e," - ").concat(t))(),globalThis.luma=globalThis.luma||{VERSION:e,version:e,log:K,stats:Ut}),e}var Wr=ns();function Kr(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)?e:null}function Gt(e){return Array.isArray(e)?e.length===0||typeof e[0]=="number"?e:null:Kr(e)}var Ze=pe(Jt(),1);var Ke={};function H(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"id";Ke[e]=Ke[e]||1;var t=Ke[e]++;return"".concat(e,"-").concat(t)}function te(e,t){return te=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},te(e,t)}function q(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&te(e,t)}function Ye(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function W(e,t){if(t&&(tt(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ye(e)}function F(e){return F=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},F(e)}function Yr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function is(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Yr(Object(r),!0).forEach(function(n){L(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Yr(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Ct=function(){function e(r,n,i){if(T(this,e),this.id=void 0,this.props=void 0,this.userData={},this.device=void 0,this._device=void 0,this.destroyed=!1,this.allocatedBytes=0,this._attachedResources=new Set,!r)throw new Error("no device");this._device=r,this.props=os(n,i);var o=this.props.id!=="undefined"?this.props.id:H(this[Symbol.toStringTag]);this.props.id=o,this.id=o,this.userData=this.props.userData||{},this.addStats()}var t=e.prototype;return t.destroy=function(){this.destroyResource()},t.delete=function(){return this.destroy(),this},t.toString=function(){return"".concat(this[Symbol.toStringTag]||this.constructor.name,"(").concat(this.id,")")},t.getProps=function(){return this.props},t.attachResource=function(n){this._attachedResources.add(n)},t.detachResource=function(n){this._attachedResources.delete(n)},t.destroyAttachedResource=function(n){this._attachedResources.delete(n)&&n.destroy()},t.destroyAttachedResources=function(){for(var n=0,i=Object.values(this._attachedResources);n<i.length;n++){var o=i[n];o.destroy()}this._attachedResources=new Set},t.destroyResource=function(){this.destroyAttachedResources(),this.removeStats(),this.destroyed=!0},t.removeStats=function(){var n=this._device.statsManager.getStats("Resource Counts"),i=this[Symbol.toStringTag];n.get("".concat(i,"s Active")).decrementCount()},t.trackAllocatedMemory=function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this[Symbol.toStringTag],o=this._device.statsManager.getStats("Resource Counts");o.get("GPU Memory").addCount(n),o.get("".concat(i," Memory")).addCount(n),this.allocatedBytes=n},t.trackDeallocatedMemory=function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this[Symbol.toStringTag],i=this._device.statsManager.getStats("Resource Counts");i.get("GPU Memory").subtractCount(this.allocatedBytes),i.get("".concat(n," Memory")).subtractCount(this.allocatedBytes),this.allocatedBytes=0},t.addStats=function(){var n=this._device.statsManager.getStats("Resource Counts"),i=this[Symbol.toStringTag];n.get("Resources Created").incrementCount(),n.get("".concat(i,"s Created")).incrementCount(),n.get("".concat(i,"s Active")).incrementCount()},A(e)}();Ct.defaultProps={id:"undefined",handle:void 0,userData:void 0};function os(e,t){var r=is({},t);for(var n in e)e[n]!==void 0&&(r[n]=e[n]);return r}var $r;function Xr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Xe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Xr(Object(r),!0).forEach(function(n){L(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Xr(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ss(e){var t=as();return function(){var n=F(e),i;if(t){var o=F(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return W(this,i)}}function as(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}$r=Symbol.toStringTag;var X=function(e){q(r,e);var t=ss(r);function r(i,o){var s;T(this,r);var c=Xe({},o);return(o.usage||0)&r.INDEX&&!o.indexType&&(o.data instanceof Uint32Array?c.indexType="uint32":o.data instanceof Uint16Array&&(c.indexType="uint16")),s=t.call(this,i,c,r.defaultProps),s.usage=void 0,s.indexType=void 0,s.byteLength=void 0,s.usage=o.usage||0,s.indexType=c.indexType,s}var n=r.prototype;return n.write=function(o,s){throw new Error("not implemented")},n.readAsync=function(o,s){throw new Error("not implemented")},n.getData=function(){throw new Error("not implemented")},A(r,[{key:$r,get:function(){return"Buffer"}}]),r}(Ct);X.defaultProps=Xe(Xe({},Ct.defaultProps),{},{usage:0,byteLength:0,byteOffset:0,data:null,indexType:"uint16",mappedAtCreation:!1});X.MAP_READ=1;X.MAP_WRITE=2;X.COPY_SRC=4;X.COPY_DST=8;X.INDEX=16;X.VERTEX=32;X.UNIFORM=64;X.STORAGE=128;X.INDIRECT=256;X.QUERY_RESOLVE=512;var Jr;function Zr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function $e(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Zr(Object(r),!0).forEach(function(n){L(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Zr(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var _e={id:null,type:"best-available",canvas:null,container:null,webgl2:!0,webgl1:!0,manageState:!0,width:800,height:600,debug:Boolean(K.get("debug")),break:[],gl:null};Jr=Symbol.toStringTag;var cs=function(){function e(r){T(this,e),this.id=void 0,this.statsManager=Ut,this.props=void 0,this.userData={},this._lumaData={},this.info=void 0,this.lost=void 0,this.canvasContext=void 0,this.props=$e($e({},_e),r),this.id=this.props.id||H(this[Symbol.toStringTag].toLowerCase())}var t=e.prototype;return t.loseDevice=function(){return!1},t.createTexture=function(n){return(n instanceof Promise||typeof n=="string")&&(n={data:n}),this._createTexture(n)},t.createCommandEncoder=function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};throw new Error("not implemented")},t._getBufferProps=function(n){(n instanceof ArrayBuffer||ArrayBuffer.isView(n))&&(n={data:n});var i=$e({},n);return(n.usage||0)&X.INDEX&&!n.indexType&&(n.data instanceof Uint32Array?i.indexType="uint32":n.data instanceof Uint16Array?i.indexType="uint16":K.warn("indices buffer content must be of integer type")()),i},A(e,[{key:Jr,get:function(){return"Device"}}]),e}();cs.VERSION=Wr;function Qr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function tn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Qr(Object(r),!0).forEach(function(n){L(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Qr(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function fs(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=us(e))||t&&e&&typeof e.length=="number"){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(f){throw f},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
9
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,s=!1,c;return{s:function(){r=r.call(e)},n:function(){var f=r.next();return o=f.done,f},e:function(f){s=!0,c=f},f:function(){try{!o&&r.return!=null&&r.return()}finally{if(s)throw c}}}}function Vo(e,t){if(e){if(typeof e=="string")return Pr(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Pr(e,t)}}function Pr(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var Ho=1,qo=1,Ar=function(){function e(){T(this,e),this.time=0,this.channels=new Map,this.animations=new Map,this.playing=!1,this.lastEngineTime=-1}var t=e.prototype;return t.addChannel=function(n){var i=n.delay,o=i===void 0?0:i,s=n.duration,c=s===void 0?Number.POSITIVE_INFINITY:s,a=n.rate,f=a===void 0?1:a,u=n.repeat,l=u===void 0?1:u,h=Ho++,v={time:0,delay:o,duration:c,rate:f,repeat:l};return this._setChannelTime(v,this.time),this.channels.set(h,v),h},t.removeChannel=function(n){this.channels.delete(n);var i=Ve(this.animations),o;try{for(i.s();!(o=i.n()).done;){var s=B(o.value,2),c=s[0],a=s[1];a.channel===n&&this.detachAnimation(c)}}catch(f){i.e(f)}finally{i.f()}},t.isFinished=function(n){var i=this.channels.get(n);return i===void 0?!1:this.time>=i.delay+i.duration*i.repeat},t.getTime=function(n){if(n===void 0)return this.time;var i=this.channels.get(n);return i===void 0?-1:i.time},t.setTime=function(n){this.time=Math.max(0,n);var i=this.channels.values(),o=Ve(i),s;try{for(o.s();!(s=o.n()).done;){var c=s.value;this._setChannelTime(c,this.time)}}catch(m){o.e(m)}finally{o.f()}var a=this.animations.values(),f=Ve(a),u;try{for(f.s();!(u=f.n()).done;){var l=u.value,h=l.animation,v=l.channel;h.setTime(this.getTime(v))}}catch(m){f.e(m)}finally{f.f()}},t.play=function(){this.playing=!0},t.pause=function(){this.playing=!1,this.lastEngineTime=-1},t.reset=function(){this.setTime(0)},t.attachAnimation=function(n,i){var o=qo++;return this.animations.set(o,{animation:n,channel:i}),n.setTime(this.getTime(i)),o},t.detachAnimation=function(n){this.animations.delete(n)},t.update=function(n){this.playing&&(this.lastEngineTime===-1&&(this.lastEngineTime=n),this.setTime(this.time+(n-this.lastEngineTime)),this.lastEngineTime=n)},t._setChannelTime=function(n,i){var o=i-n.delay,s=n.duration*n.repeat;o>=s?n.time=n.duration*n.rate:(n.time=Math.max(0,o)%n.duration,n.time*=n.rate)},A(e)}();var Tr=function(){function e(r){T(this,e),this.startIndex=-1,this.endIndex=-1,this.factor=0,this.times=[],this.values=[],this._lastTime=-1,this.setKeyFrames(r),this.setTime(0)}var t=e.prototype;return t.setKeyFrames=function(n){var i=n.length;this.times.length=i,this.values.length=i;for(var o=0;o<i;++o)this.times[o]=n[o][0],this.values[o]=n[o][1];this._calculateKeys(this._lastTime)},t.setTime=function(n){n=Math.max(0,n),n!==this._lastTime&&(this._calculateKeys(n),this._lastTime=n)},t.getStartTime=function(){return this.times[this.startIndex]},t.getEndTime=function(){return this.times[this.endIndex]},t.getStartData=function(){return this.values[this.startIndex]},t.getEndData=function(){return this.values[this.endIndex]},t._calculateKeys=function(n){var i=0,o=this.times.length;for(i=0;i<o-2&&!(this.times[i+1]>n);++i);this.startIndex=i,this.endIndex=i+1;var s=this.times[this.startIndex],c=this.times[this.endIndex];this.factor=Math.min(Math.max(0,(n-s)/(c-s)),1)},A(e)}();function Rr(e,t,r,n,i,o,s){try{var c=e[o](s),a=c.value}catch(f){r(f);return}c.done?t(a):Promise.resolve(a).then(n,i)}function lt(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var o=e.apply(t,r);function s(a){Rr(o,n,i,s,c,"next",a)}function c(a){Rr(o,n,i,s,c,"throw",a)}s(void 0)})}}var qe=pe(Jt(),1),jr=function(){function e(r){T(this,e)}var t=e.prototype;return t.onInitialize=function(){var r=lt(qe.default.mark(function i(o){return qe.default.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.abrupt("return",null);case 1:case"end":return c.stop()}},i)}));function n(i){return r.apply(this,arguments)}return n}(),A(e)}();function L(e,t,r){return t=Zt(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var yt=pe(Jt(),1);function We(e){if(typeof window<"u"&&typeof window.process=="object"&&window.process.type==="renderer"||typeof process<"u"&&typeof process.versions=="object"&&Boolean(process.versions.electron))return!0;let t=typeof navigator=="object"&&typeof navigator.userAgent=="string"&&navigator.userAgent,r=e||t;return!!(r&&r.indexOf("Electron")>=0)}function ct(){return!(typeof process=="object"&&String(process)==="[object process]"&&!process.browser)||We()}var Wo=globalThis.self||globalThis.window||globalThis.global,Nt=globalThis.window||globalThis.self||globalThis.global,Ko=globalThis.document||{},At=globalThis.process||{},Yo=globalThis.console,kc=globalThis.navigator||{};var me=typeof __VERSION__<"u"?__VERSION__:"untranspiled source",qc=ct();function Xo(e){try{let t=window[e],r="__storage_test__";return t.setItem(r,r),t.removeItem(r),t}catch{return null}}var ge=class{constructor(t,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"sessionStorage";this.storage=void 0,this.id=void 0,this.config=void 0,this.storage=Xo(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 Fr(e){let t;return e<10?t="".concat(e.toFixed(2),"ms"):e<100?t="".concat(e.toFixed(1),"ms"):e<1e3?t="".concat(e.toFixed(0),"ms"):t="".concat((e/1e3).toFixed(2),"s"),t}function Ur(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:8,r=Math.max(t-e.length,0);return"".concat(" ".repeat(r)).concat(e)}function ve(e,t,r){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:600,i=e.src.replace(/\(/g,"%28").replace(/\)/g,"%29");e.width>n&&(r=Math.min(r,n/e.width));let o=e.width*r,s=e.height*r,c=["font-size:1px;","padding:".concat(Math.floor(s/2),"px ").concat(Math.floor(o/2),"px;"),"line-height:".concat(s,"px;"),"background:url(".concat(i,");"),"background-size:".concat(o,"px ").concat(s,"px;"),"color:transparent;"].join("");return["".concat(t," %c+"),c]}var ye;(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"})(ye||(ye={}));var $o=10;function Gr(e){return typeof e!="string"?e:(e=e.toUpperCase(),ye[e]||ye.WHITE)}function zr(e,t,r){if(!ct&&typeof e=="string"){if(t){let n=Gr(t);e="\x1B[".concat(n,"m").concat(e,"\x1B[39m")}if(r){let n=Gr(r);e="\x1B[".concat(n+$o,"m").concat(e,"\x1B[49m")}}return e}function Br(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:["constructor"],r=Object.getPrototypeOf(e),n=Object.getOwnPropertyNames(r),i=e;for(let o of n){let s=i[o];typeof s=="function"&&(t.find(c=>o===c)||(i[o]=s.bind(e)))}}function jt(e,t){if(!e)throw new Error(t||"Assertion failed")}function Tt(){let e;if(ct()&&Nt.performance){var t,r;e=Nt===null||Nt===void 0||(t=Nt.performance)===null||t===void 0||(r=t.now)===null||r===void 0?void 0:r.call(t)}else if("hrtime"in At){var n;let i=At===null||At===void 0||(n=At.hrtime)===null||n===void 0?void 0:n.call(At);e=i[0]*1e3+i[1]/1e6}else e=Date.now();return e}var Ft={debug:ct()&&console.debug||console.log,log:console.log,info:console.info,warn:console.warn,error:console.error},Zo={enabled:!0,level:0};function ht(){}var kr={},Vr={once:!0},wt=class{constructor(){let{id:t}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{id:""};this.id=void 0,this.VERSION=me,this._startTs=Tt(),this._deltaTs=Tt(),this._storage=void 0,this.userData={},this.LOG_THROTTLE_TIMEOUT=0,this.id=t,this.userData={},this._storage=new ge("__probe-".concat(this.id,"__"),Zo),this.timeStamp("".concat(this.id," started")),Br(this),Object.seal(this)}set level(t){this.setLevel(t)}get level(){return this.getLevel()}isEnabled(){return this._storage.config.enabled}getLevel(){return this._storage.config.level}getTotal(){return Number((Tt()-this._startTs).toPrecision(10))}getDelta(){return Number((Tt()-this._deltaTs).toPrecision(10))}set priority(t){this.level=t}get priority(){return this.level}getPriority(){return this.level}enable(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return this._storage.setConfiguration({enabled:t}),this}setLevel(t){return this._storage.setConfiguration({level:t}),this}get(t){return this._storage.config[t]}set(t,r){this._storage.setConfiguration({[t]:r})}settings(){console.table?console.table(this._storage.config):console.log(this._storage.config)}assert(t,r){jt(t,r)}warn(t){return this._getLogFunction(0,t,Ft.warn,arguments,Vr)}error(t){return this._getLogFunction(0,t,Ft.error,arguments)}deprecated(t,r){return this.warn("`".concat(t,"` is deprecated and will be removed in a later version. Use `").concat(r,"` instead"))}removed(t,r){return this.error("`".concat(t,"` has been removed. Use `").concat(r,"` instead"))}probe(t,r){return this._getLogFunction(t,r,Ft.log,arguments,{time:!0,once:!0})}log(t,r){return this._getLogFunction(t,r,Ft.debug,arguments)}info(t,r){return this._getLogFunction(t,r,console.info,arguments)}once(t,r){return this._getLogFunction(t,r,Ft.debug||Ft.info,arguments,Vr)}table(t,r,n){return r?this._getLogFunction(t,r,console.table||ht,n&&[n],{tag:es(r)}):ht}image(t){let{logLevel:r,priority:n,image:i,message:o="",scale:s=1}=t;return this._shouldLog(r||n)?ct()?ts({image:i,message:o,scale:s}):Qo({image:i,message:o,scale:s}):ht}time(t,r){return this._getLogFunction(t,r,console.time?console.time:console.info)}timeEnd(t,r){return this._getLogFunction(t,r,console.timeEnd?console.timeEnd:console.info)}timeStamp(t,r){return this._getLogFunction(t,r,console.timeStamp||ht)}group(t,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{collapsed:!1},i=Hr({logLevel:t,message:r,opts:n}),{collapsed:o}=n;return i.method=(o?console.groupCollapsed:console.group)||console.info,this._getLogFunction(i)}groupCollapsed(t,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.group(t,r,Object.assign({},n,{collapsed:!0}))}groupEnd(t){return this._getLogFunction(t,"",console.groupEnd||ht)}withGroup(t,r,n){this.group(t,r)();try{n()}finally{this.groupEnd(t)()}}trace(){console.trace&&console.trace()}_shouldLog(t){return this.isEnabled()&&this.getLevel()>=qr(t)}_getLogFunction(t,r,n,i,o){if(this._shouldLog(t)){o=Hr({logLevel:t,message:r,args:i,opts:o}),n=n||o.method,jt(n),o.total=this.getTotal(),o.delta=this.getDelta(),this._deltaTs=Tt();let s=o.tag||o.message;if(o.once&&s)if(!kr[s])kr[s]=Tt();else return ht;return r=Jo(this.id,o.message,o),n.bind(console,r,...o.args)}return ht}};wt.VERSION=me;function qr(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 jt(Number.isFinite(t)&&t>=0),t}function Hr(e){let{logLevel:t,message:r}=e;e.logLevel=qr(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 i=typeof e.message;return jt(i==="string"||i==="object"),Object.assign(e,{args:n},e.opts)}function Jo(e,t,r){if(typeof t=="string"){let n=r.time?Ur(Fr(r.total)):"";t=r.time?"".concat(e,": ").concat(n," ").concat(t):"".concat(e,": ").concat(t),t=zr(t,r.color,r.background)}return t}function Qo(e){let{image:t,message:r="",scale:n=1}=e;return console.warn("removed"),ht}function ts(e){let{image:t,message:r="",scale:n=1}=e;if(typeof t=="string"){let o=new Image;return o.onload=()=>{let s=ve(o,r,n);console.log(...s)},o.src=t,ht}let i=t.nodeName||"";if(i.toLowerCase()==="img")return console.log(...ve(t,r,n)),ht;if(i.toLowerCase()==="canvas"){let o=new Image;return o.onload=()=>console.log(...ve(o,r,n)),o.src=t.toDataURL(),ht}return ht}function es(e){for(let t in e)for(let r in e[t])return r||"untitled";return"empty"}var vf=new wt({id:"@probe.gl/log"});var K=new wt({id:"luma.gl"});function Qt(){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 Rt=class{constructor(t,r){this.name=void 0,this.type=void 0,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=Qt(),this._timerPending=!0,this}timeEnd(){return this._timerPending?(this.addTime(Qt()-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 Et=class{constructor(t){this.id=void 0,this.stats={},this.id=t.id,this.stats={},this._initializeStats(t.stats),Object.seal(this)}get(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"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(){(arguments.length>0&&arguments[0]!==void 0?arguments[0]:[]).forEach(r=>this._getOrCreate(r))}_getOrCreate(t){let{name:r,type:n}=t,i=this.stats[r];return i||(t instanceof Rt?i=t:i=new Rt(r,n),this.stats[r]=i),i}};var rs=function(){function e(){T(this,e),this.stats=new Map}var t=e.prototype;return t.getStats=function(n){return this.get(n)},t.get=function(n){return this.stats.has(n)||this.stats.set(n,new Et({id:n})),this.stats.get(n)},A(e)}(),Ut=new rs;function ns(){var e=typeof __VERSION__<"u"?__VERSION__:"untranspiled source",t="set luma.log.level=1 (or higher) to trace rendering";if(globalThis.luma&&globalThis.luma.VERSION!==e)throw new Error("luma.gl - multiple VERSIONs detected: ".concat(globalThis.luma.VERSION," vs ").concat(e));return globalThis.luma||(ct()&&K.log(1,"luma.gl ".concat(e," - ").concat(t))(),globalThis.luma=globalThis.luma||{VERSION:e,version:e,log:K,stats:Ut}),e}var Wr=ns();function Kr(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)?e:null}function Gt(e){return Array.isArray(e)?e.length===0||typeof e[0]=="number"?e:null:Kr(e)}var Ze=pe(Jt(),1);var Ke={};function H(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"id";Ke[e]=Ke[e]||1;var t=Ke[e]++;return"".concat(e,"-").concat(t)}function te(e,t){return te=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},te(e,t)}function q(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&te(e,t)}function Ye(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function W(e,t){if(t&&(tt(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ye(e)}function F(e){return F=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},F(e)}function Yr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function is(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Yr(Object(r),!0).forEach(function(n){L(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Yr(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Ct=function(){function e(r,n,i){if(T(this,e),this.id=void 0,this.props=void 0,this.userData={},this.device=void 0,this._device=void 0,this.destroyed=!1,this.allocatedBytes=0,this._attachedResources=new Set,!r)throw new Error("no device");this._device=r,this.props=os(n,i);var o=this.props.id!=="undefined"?this.props.id:H(this[Symbol.toStringTag]);this.props.id=o,this.id=o,this.userData=this.props.userData||{},this.addStats()}var t=e.prototype;return t.destroy=function(){this.destroyResource()},t.delete=function(){return this.destroy(),this},t.toString=function(){return"".concat(this[Symbol.toStringTag]||this.constructor.name,"(").concat(this.id,")")},t.getProps=function(){return this.props},t.attachResource=function(n){this._attachedResources.add(n)},t.detachResource=function(n){this._attachedResources.delete(n)},t.destroyAttachedResource=function(n){this._attachedResources.delete(n)&&n.destroy()},t.destroyAttachedResources=function(){for(var n=0,i=Object.values(this._attachedResources);n<i.length;n++){var o=i[n];o.destroy()}this._attachedResources=new Set},t.destroyResource=function(){this.destroyAttachedResources(),this.removeStats(),this.destroyed=!0},t.removeStats=function(){var n=this._device.statsManager.getStats("Resource Counts"),i=this[Symbol.toStringTag];n.get("".concat(i,"s Active")).decrementCount()},t.trackAllocatedMemory=function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this[Symbol.toStringTag],o=this._device.statsManager.getStats("Resource Counts");o.get("GPU Memory").addCount(n),o.get("".concat(i," Memory")).addCount(n),this.allocatedBytes=n},t.trackDeallocatedMemory=function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this[Symbol.toStringTag],i=this._device.statsManager.getStats("Resource Counts");i.get("GPU Memory").subtractCount(this.allocatedBytes),i.get("".concat(n," Memory")).subtractCount(this.allocatedBytes),this.allocatedBytes=0},t.addStats=function(){var n=this._device.statsManager.getStats("Resource Counts"),i=this[Symbol.toStringTag];n.get("Resources Created").incrementCount(),n.get("".concat(i,"s Created")).incrementCount(),n.get("".concat(i,"s Active")).incrementCount()},A(e)}();Ct.defaultProps={id:"undefined",handle:void 0,userData:void 0};function os(e,t){var r=is({},t);for(var n in e)e[n]!==void 0&&(r[n]=e[n]);return r}var $r;function Xr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Xe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Xr(Object(r),!0).forEach(function(n){L(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Xr(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ss(e){var t=as();return function(){var n=F(e),i;if(t){var o=F(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return W(this,i)}}function as(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}$r=Symbol.toStringTag;var X=function(e){q(r,e);var t=ss(r);function r(i,o){var s;T(this,r);var c=Xe({},o);return(o.usage||0)&r.INDEX&&!o.indexType&&(o.data instanceof Uint32Array?c.indexType="uint32":o.data instanceof Uint16Array&&(c.indexType="uint16")),s=t.call(this,i,c,r.defaultProps),s.usage=void 0,s.indexType=void 0,s.byteLength=void 0,s.usage=o.usage||0,s.indexType=c.indexType,s}var n=r.prototype;return n.write=function(o,s){throw new Error("not implemented")},n.readAsync=function(o,s){throw new Error("not implemented")},n.getData=function(){throw new Error("not implemented")},A(r,[{key:$r,get:function(){return"Buffer"}}]),r}(Ct);X.defaultProps=Xe(Xe({},Ct.defaultProps),{},{usage:0,byteLength:0,byteOffset:0,data:null,indexType:"uint16",mappedAtCreation:!1});X.MAP_READ=1;X.MAP_WRITE=2;X.COPY_SRC=4;X.COPY_DST=8;X.INDEX=16;X.VERTEX=32;X.UNIFORM=64;X.STORAGE=128;X.INDIRECT=256;X.QUERY_RESOLVE=512;var Jr;function Zr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function $e(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Zr(Object(r),!0).forEach(function(n){L(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Zr(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var _e={id:null,type:"best-available",canvas:null,container:null,webgl2:!0,webgl1:!0,manageState:!0,width:800,height:600,debug:Boolean(K.get("debug")),break:[],gl:null};Jr=Symbol.toStringTag;var cs=function(){function e(r){T(this,e),this.id=void 0,this.statsManager=Ut,this.props=void 0,this.userData={},this._lumaData={},this.info=void 0,this.lost=void 0,this.canvasContext=void 0,this.props=$e($e({},_e),r),this.id=this.props.id||H(this[Symbol.toStringTag].toLowerCase())}var t=e.prototype;return t.loseDevice=function(){return!1},t.getCanvasContext=function(){if(!this.canvasContext)throw new Error("Device has no CanvasContext");return this.canvasContext},t.createTexture=function(n){return(n instanceof Promise||typeof n=="string")&&(n={data:n}),this._createTexture(n)},t.createCommandEncoder=function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};throw new Error("not implemented")},t._getBufferProps=function(n){(n instanceof ArrayBuffer||ArrayBuffer.isView(n))&&(n={data:n});var i=$e({},n);return(n.usage||0)&X.INDEX&&!n.indexType&&(n.data instanceof Uint32Array?i.indexType="uint32":n.data instanceof Uint16Array?i.indexType="uint16":K.warn("indices buffer content must be of integer type")()),i},A(e,[{key:Jr,get:function(){return"Device"}}]),e}();cs.VERSION=Wr;function Qr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function tn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Qr(Object(r),!0).forEach(function(n){L(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Qr(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function fs(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=us(e))||t&&e&&typeof e.length=="number"){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(f){throw f},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
10
10
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,s=!1,c;return{s:function(){r=r.call(e)},n:function(){var f=r.next();return o=f.done,f},e:function(f){s=!0,c=f},f:function(){try{!o&&r.return!=null&&r.return()}finally{if(s)throw c}}}}function us(e,t){if(e){if(typeof e=="string")return en(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return en(e,t)}}function en(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var zt=new Map,Lt=function(){function e(){T(this,e)}return e.registerDevices=function(r){var n=fs(r),i;try{for(n.s();!(i=n.n()).done;){var o=i.value;rt(o.type&&o.isSupported&&o.create),zt.set(o.type,o)}}catch(s){n.e(s)}finally{n.f()}},e.getAvailableDevices=function(){return Array.from(zt).map(function(r){return r.type})},e.getSupportedDevices=function(){return Array.from(zt).filter(function(r){return r.isSupported()}).map(function(r){return r.type})},e.setDefaultDeviceProps=function(r){Object.assign(_e,r)},e.createDevice=function(){var t=lt(Ze.default.mark(function n(){var i,o,s=arguments;return Ze.default.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:i=s.length>0&&s[0]!==void 0?s[0]:{},i=tn(tn({},_e),i),i.gl&&(i.type="webgl"),a.t0=i.type,a.next=a.t0==="webgpu"?6:a.t0==="webgl"||a.t0==="webgl1"||a.t0==="webgl2"?12:a.t0==="best-available"?18:24;break;case 6:if(o=zt.get("webgpu"),!o){a.next=11;break}return a.next=10,o.create(i);case 10:return a.abrupt("return",a.sent);case 11:return a.abrupt("break",24);case 12:if(o=zt.get("webgl"),!o){a.next=17;break}return a.next=16,o.create(i);case 16:return a.abrupt("return",a.sent);case 17:return a.abrupt("break",24);case 18:if(o=zt.get("webgl"),!(o&&o.isSupported())){a.next=23;break}return a.next=22,o.create(i);case 22:return a.abrupt("return",a.sent);case 23:return a.abrupt("break",24);case 24:throw new Error("No matching device found. Ensure `@luma.gl/webgl` and/or `@luma.gl/webgpu` modules are imported.");case 25:case"end":return a.stop()}},n)}));function r(){return t.apply(this,arguments)}return r}(),A(e)}();Lt.stats=Ut;Lt.log=K;var on;function rn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function nn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?rn(Object(r),!0).forEach(function(n){L(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):rn(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ls(e){var t=hs();return function(){var n=F(e),i;if(t){var o=F(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return W(this,i)}}function hs(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}on=Symbol.toStringTag;var Bt=function(e){q(r,e);var t=ls(r);function r(n,i){var o;return T(this,r),o=t.call(this,n,i,r.defaultProps),o.hash="",o.vs=void 0,o.fs=void 0,o.shaderLayout=void 0,o.bufferLayout=void 0,o.shaderLayout=o.props.shaderLayout,o.bufferLayout=o.props.bufferLayout||[],o}return A(r,[{key:on,get:function(){return"RenderPipeline"}}]),r}(Ct);Bt.defaultProps=nn(nn({},Ct.defaultProps),{},{vs:null,vsEntryPoint:"",vsConstants:{},fs:null,fsEntryPoint:"",fsConstants:{},shaderLayout:null,bufferLayout:[],topology:"triangle-list",parameters:{},vertexCount:0,instanceCount:0,bindings:{},uniforms:{}});function sn(e){var t=B(ds[e],2),r=t[0],n=t[1],i=r==="i32"||r==="u32",o=r!=="u32",s=ms[r]*n,c=ps(r,n);return{dataType:r,components:n,defaultVertexFormat:c,byteLength:s,integer:i,signed:o}}function ps(e,t){var r;switch(e){case"f32":r="float32";break;case"i32":r="sint32";break;case"u32":r="uint32";break;case"f16":return t<=2?"float16x2":"float16x4"}return t===1?r:"".concat(r,"x").concat(t)}var ds={f32:["f32",1],"vec2<f32>":["f32",2],"vec3<f32>":["f32",3],"vec4<f32>":["f32",4],f16:["f16",1],"vec2<f16>":["f16",2],"vec3<f16>":["f16",3],"vec4<f16>":["f16",4],i32:["i32",1],"vec2<i32>":["i32",2],"vec3<i32>":["i32",3],"vec4<i32>":["i32",4],u32:["u32",1],"vec2<u32>":["u32",2],"vec3<u32>":["u32",3],"vec4<u32>":["u32",4]},ms={f32:4,f16:2,i32:4,u32:4};function cn(e){var t=an[e],r=gs(t),n=e.includes("norm"),i=!n&&!e.startsWith("float"),o=e.startsWith("s");return{dataType:an[e],byteLength:r,integer:i,signed:o,normalized:n}}function gs(e){var t=vs[e];return t}var an={uint8:"uint8",sint8:"sint8",unorm8:"uint8",snorm8:"sint8",uint16:"uint16",sint16:"sint16",unorm16:"uint16",snorm16:"sint16",float16:"float16",float32:"float32",uint32:"uint32",sint32:"sint32"},vs={uint8:1,sint8:1,uint16:2,sint16:2,float16:2,float32:4,uint32:4,sint32:4};function Je(e){var t;e.endsWith("-webgl")&&(e.replace("-webgl",""),t=!0);var r=e.split("x"),n=B(r,2),i=n[0],o=n[1],s=i,c=o?parseInt(o):1,a=cn(s),f={type:s,components:c,byteLength:a.byteLength*c,integer:a.integer,signed:a.signed,normalized:a.normalized};return t&&(f.webglOnly=!0),f}function ee(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=ys(e))||t&&e&&typeof e.length=="number"){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(f){throw f},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
11
11
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,s=!1,c;return{s:function(){r=r.call(e)},n:function(){var f=r.next();return o=f.done,f},e:function(f){s=!0,c=f},f:function(){try{!o&&r.return!=null&&r.return()}finally{if(s)throw c}}}}function ys(e,t){if(e){if(typeof e=="string")return fn(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return fn(e,t)}}function fn(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Qe(e,t){var r={},n=ee(e.attributes),i;try{for(n.s();!(i=n.n()).done;){var o=i.value;r[o.name]=_s(e,t,o.name)}}catch(s){n.e(s)}finally{n.f()}return r}function _s(e,t,r){var n=xs(e,r),i=bs(t,r);if(!n)return null;var o=sn(n.type),s=i?.vertexFormat||o.defaultVertexFormat,c=Je(s);return{attributeName:i?.attributeName||n.name,bufferName:i?.bufferName||n.name,location:n.location,shaderType:n.type,shaderDataType:o.dataType,shaderComponents:o.components,vertexFormat:s,bufferDataType:c.type,bufferComponents:c.components,normalized:c.normalized,integer:o.integer,stepMode:i?.stepMode||n.stepMode,byteOffset:i?.byteOffset||0,byteStride:i?.byteStride||0}}function xs(e,t){var r=e.attributes.find(function(n){return n.name===t});return r||K.warn('shader layout attribute "'.concat(t,'" not present in shader')),r||null}function bs(e,t){Os(e);var r=ws(e,t);return r||(r=Es(e,t),r)?r:(K.warn('layout for attribute "'.concat(t,'" not present in buffer layout')),null)}function Os(e){var t=ee(e),r;try{for(t.s();!(r=t.n()).done;){var n=r.value;(n.attributes&&n.format||!n.attributes&&!n.format)&&K.warn("BufferLayout ".concat(name," must have either 'attributes' or 'format' field"))}}catch(i){t.e(i)}finally{t.f()}}function ws(e,t){var r=ee(e),n;try{for(r.s();!(n=r.n()).done;){var i=n.value;if(i.format&&i.name===t)return{attributeName:i.name,bufferName:t,stepMode:i.stepMode,vertexFormat:i.format,byteOffset:0,byteStride:i.byteStride||0}}}catch(o){r.e(o)}finally{r.f()}return null}function Es(e,t){var r=ee(e),n;try{for(r.s();!(n=r.n()).done;){var i,o=n.value,s=o.byteStride;if(typeof o.byteStride!="number"){var c=ee(o.attributes||[]),a;try{for(c.s();!(a=c.n()).done;){var f=a.value,u=Je(f.format);s+=u.byteLength}}catch(h){c.e(h)}finally{c.f()}}var l=(i=o.attributes)===null||i===void 0?void 0:i.find(function(h){return h.attribute===t});if(l)return{attributeName:l.attribute,bufferName:o.name,stepMode:o.stepMode,vertexFormat:l.format,byteOffset:l.byteOffset,byteStride:s}}}catch(h){r.e(h)}finally{r.f()}return null}function rt(e,t){if(!e)throw new Error(t||"luma.gl: assertion failed.")}var Ms={f32:{type:"f32",components:1},i32:{type:"i32",components:1},u32:{type:"u32",components:1},"vec2<f32>":{type:"f32",components:2},"vec3<f32>":{type:"f32",components:3},"vec4<f32>":{type:"f32",components:4},"vec2<i32>":{type:"i32",components:2},"vec3<i32>":{type:"i32",components:3},"vec4<i32>":{type:"i32",components:4},"vec2<u32>":{type:"u32",components:2},"vec3<u32>":{type:"u32",components:3},"vec4<u32>":{type:"u32",components:4},"mat2x2<f32>":{type:"f32",components:4},"mat2x3<f32>":{type:"f32",components:6},"mat2x4<f32>":{type:"f32",components:8},"mat3x2<f32>":{type:"f32",components:6},"mat3x3<f32>":{type:"f32",components:9},"mat3x4<f32>":{type:"f32",components:12},"mat4x2<f32>":{type:"f32",components:8},"mat4x3<f32>":{type:"f32",components:12},"mat4x4<f32>":{type:"f32",components:16}};function un(e){var t=Ms[e];return rt(e),t}function ln(e,t){switch(t){case 1:return e;case 2:return e+e%2;default:return e+(4-e%4)%4}}var xe;function hn(e){return(!xe||xe.byteLength<e)&&(xe=new ArrayBuffer(e)),xe}var pn=1024,tr=function(){function e(r){T(this,e),this.layout={},this.byteLength=void 0;for(var n=0,i=0,o=Object.entries(r);i<o.length;i++){var s=B(o[i],2),c=s[0],a=s[1],f=un(a),u=f.type,l=f.components;n=ln(n,l);var h=n;n+=l,this.layout[c]={type:u,size:l,offset:h}}n+=(4-n%4)%4;var v=n*4;this.byteLength=Math.max(v,pn)}var t=e.prototype;return t.getData=function(n){for(var i=Math.max(this.byteLength,pn),o=hn(i),s={i32:new Int32Array(o),u32:new Uint32Array(o),f32:new Float32Array(o),f16:new Uint16Array(o)},c=0,a=Object.entries(n);c<a.length;c++){var f=B(a[c],2),u=f[0],l=f[1],h=this.layout[u];if(!h){K.warn("Supplied uniform value ".concat(u," not present in uniform block layout"))();continue}var v=h.type,m=h.size,y=h.offset,b=s[v];if(m===1){if(typeof l!="number"&&typeof l!="boolean"){K.warn("Supplied value for single component uniform ".concat(u," is not a number: ").concat(l))();continue}b[y]=Number(l)}else{var O=Gt(l);if(!O){K.warn("Supplied value for multi component / array uniform ".concat(u," is not a numeric array: ").concat(l))();continue}b.set(O,y)}}return new Uint8Array(o)},t.has=function(n){return Boolean(this.layout[n])},t.get=function(n){var i=this.layout[n];return i},A(e)}();function re(e,t,r){if(e===t)return!0;if(!r||!e||!t)return!1;if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!re(e[n],t[n],r-1))return!1;return!0}if(Array.isArray(t))return!1;if(tt(e)==="object"&&tt(t)==="object"){var i=Object.keys(e),o=Object.keys(t);if(i.length!==o.length)return!1;for(var s=0,c=i;s<c.length;s++){var a=c[s];if(!t.hasOwnProperty(a)||!re(e[a],t[a],r-1))return!1}return!0}return!1}function er(e){return typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame(e):setTimeout(e,1e3/60)}function rr(e){return typeof window<"u"&&window.cancelAnimationFrame?window.cancelAnimationFrame(e):clearTimeout(e)}var dn=function(t){return"".concat(t)};function mn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function gn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?mn(Object(r),!0).forEach(function(n){L(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):mn(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Ss=0,Ps={device:null,onAddHTML:function(){return""},onInitialize:function(){var e=lt(yt.default.mark(function r(){return yt.default.wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return i.abrupt("return",null);case 1:case"end":return i.stop()}},r)}));function t(){return e.apply(this,arguments)}return t}(),onRender:function(){},onFinalize:function(){},onError:function(t){return console.error(t)},stats:Lt.stats.get("animation-loop-".concat(Ss++)),useDevicePixels:!0,autoResizeViewport:!1,autoResizeDrawingBuffer:!1},be=function(){function e(r){if(T(this,e),this.device=null,this.canvas=null,this.props=void 0,this.animationProps=null,this.timeline=null,this.stats=void 0,this.cpuTime=void 0,this.gpuTime=void 0,this.frameRate=void 0,this.display=void 0,this.needsRedraw="initialized",this._initialized=!1,this._running=!1,this._animationFrameId=null,this._nextFramePromise=null,this._resolveNextFrame=null,this._cpuStartTime=0,this.props=gn(gn({},Ps),r),r=this.props,!r.device)throw new Error("No device provided");var n=this.props.useDevicePixels,i=n===void 0?!0:n;this.stats=r.stats||new Et({id:"animation-loop-stats"}),this.cpuTime=this.stats.get("CPU Time"),this.gpuTime=this.stats.get("GPU Time"),this.frameRate=this.stats.get("Frame Rate"),this.setProps({autoResizeViewport:r.autoResizeViewport,autoResizeDrawingBuffer:r.autoResizeDrawingBuffer,useDevicePixels:i}),this.start=this.start.bind(this),this.stop=this.stop.bind(this),this._onMousemove=this._onMousemove.bind(this),this._onMouseleave=this._onMouseleave.bind(this)}var t=e.prototype;return t.destroy=function(){this.stop(),this._setDisplay(null)},t.delete=function(){this.destroy()},t.setNeedsRedraw=function(n){return this.needsRedraw=this.needsRedraw||n,this},t.setProps=function(n){return"autoResizeViewport"in n&&(this.props.autoResizeViewport=n.autoResizeViewport||!1),"autoResizeDrawingBuffer"in n&&(this.props.autoResizeDrawingBuffer=n.autoResizeDrawingBuffer||!1),"useDevicePixels"in n&&(this.props.useDevicePixels=n.useDevicePixels||!1),this},t.start=function(){var r=lt(yt.default.mark(function i(){var o,s;return yt.default.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:if(!this._running){a.next=2;break}return a.abrupt("return",this);case 2:if(this._running=!0,a.prev=3,this._running){a.next=6;break}return a.abrupt("return",null);case 6:if(this._initialized){a.next=13;break}return this._initialized=!0,a.next=10,this._initDevice();case 10:return this._initialize(),a.next=13,this.props.onInitialize(this._getAnimationProps());case 13:if(this._running){a.next=15;break}return a.abrupt("return",null);case 15:return o!==!1&&(this._cancelAnimationFrame(),this._requestAnimationFrame()),a.abrupt("return",this);case 19:throw a.prev=19,a.t0=a.catch(3),s=a.t0 instanceof Error?a.t0:new Error("Unknown error"),this.props.onError(s),s;case 24:case"end":return a.stop()}},i,this,[[3,19]])}));function n(){return r.apply(this,arguments)}return n}(),t.redraw=function(){var n;return(n=this.device)!==null&&n!==void 0&&n.isLost?this:(this._beginFrameTimers(),this._setupFrame(),this._updateAnimationProps(),this._renderFrame(this._getAnimationProps()),this._clearNeedsRedraw(),this._resolveNextFrame&&(this._resolveNextFrame(this),this._nextFramePromise=null,this._resolveNextFrame=null),this._endFrameTimers(),this)},t.stop=function(){return this._running&&(this.animationProps&&this.props.onFinalize(this.animationProps),this._cancelAnimationFrame(),this._nextFramePromise=null,this._resolveNextFrame=null,this._running=!1),this},t.attachTimeline=function(n){return this.timeline=n,this.timeline},t.detachTimeline=function(){this.timeline=null},t.waitForRender=function(){var n=this;return this.setNeedsRedraw("waitForRender"),this._nextFramePromise||(this._nextFramePromise=new Promise(function(i){n._resolveNextFrame=i})),this._nextFramePromise},t.toDataURL=function(){var r=lt(yt.default.mark(function i(){return yt.default.wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return this.setNeedsRedraw("toDataURL"),s.next=3,this.waitForRender();case 3:if(!(this.canvas instanceof HTMLCanvasElement)){s.next=5;break}return s.abrupt("return",this.canvas.toDataURL());case 5:throw new Error("OffscreenCanvas");case 6:case"end":return s.stop()}},i,this)}));function n(){return r.apply(this,arguments)}return n}(),t._initialize=function(){this._startEventHandling(),this._initializeAnimationProps(),this._updateAnimationProps(),this._resizeCanvasDrawingBuffer(),this._resizeViewport()},t._setDisplay=function(n){this.display&&(this.display.destroy(),this.display.animationLoop=null),n&&(n.animationLoop=this),this.display=n},t._requestAnimationFrame=function(){this._running&&(this._animationFrameId=er(this._animationFrame.bind(this)))},t._cancelAnimationFrame=function(){this._animationFrameId===null&&(rr(this._animationFrameId),this._animationFrameId=null)},t._animationFrame=function(){this._running&&(this.redraw(),this._requestAnimationFrame())},t._renderFrame=function(n){if(this.display){this.display._renderFrame(n);return}this.props.onRender(this._getAnimationProps())},t._clearNeedsRedraw=function(){this.needsRedraw=!1},t._setupFrame=function(){this._resizeCanvasDrawingBuffer(),this._resizeViewport()},t._initializeAnimationProps=function(){var n;if(!this.device)throw new Error("loop");this.animationProps={animationLoop:this,device:this.device,canvas:(n=this.device)===null||n===void 0||(n=n.canvasContext)===null||n===void 0?void 0:n.canvas,timeline:this.timeline,useDevicePixels:this.props.useDevicePixels,needsRedraw:!1,width:1,height:1,aspect:1,time:0,startTime:Date.now(),engineTime:0,tick:0,tock:0,_mousePosition:null}},t._getAnimationProps=function(){if(!this.animationProps)throw new Error("animationProps");return this.animationProps},t._updateAnimationProps=function(){if(this.animationProps){var n=this._getSizeAndAspect(),i=n.width,o=n.height,s=n.aspect;(i!==this.animationProps.width||o!==this.animationProps.height)&&this.setNeedsRedraw("drawing buffer resized"),s!==this.animationProps.aspect&&this.setNeedsRedraw("drawing buffer aspect changed"),this.animationProps.width=i,this.animationProps.height=o,this.animationProps.aspect=s,this.animationProps.needsRedraw=this.needsRedraw,this.animationProps.engineTime=Date.now()-this.animationProps.startTime,this.timeline&&this.timeline.update(this.animationProps.engineTime),this.animationProps.tick=Math.floor(this.animationProps.time/1e3*60),this.animationProps.tock++,this.animationProps.time=this.timeline?this.timeline.getTime():this.animationProps.engineTime}},t._initDevice=function(){var r=lt(yt.default.mark(function i(){var o;return yt.default.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,this.props.device;case 2:if(this.device=c.sent,this.device){c.next=5;break}throw new Error("No device provided");case 5:this.canvas=((o=this.device.canvasContext)===null||o===void 0?void 0:o.canvas)||null;case 6:case"end":return c.stop()}},i,this)}));function n(){return r.apply(this,arguments)}return n}(),t._createInfoDiv=function(){if(this.canvas&&this.props.onAddHTML){var n=document.createElement("div");document.body.appendChild(n),n.style.position="relative";var i=document.createElement("div");i.style.position="absolute",i.style.left="10px",i.style.bottom="10px",i.style.width="300px",i.style.background="white",this.canvas instanceof HTMLCanvasElement&&n.appendChild(this.canvas),n.appendChild(i);var o=this.props.onAddHTML(i);o&&(i.innerHTML=o)}},t._getSizeAndAspect=function(){var n,i;if(!this.device)return{width:1,height:1,aspect:1};var o=((n=this.device)===null||n===void 0||(n=n.canvasContext)===null||n===void 0?void 0:n.getPixelSize())||[1,1],s=B(o,2),c=s[0],a=s[1],f=1,u=(i=this.device)===null||i===void 0||(i=i.canvasContext)===null||i===void 0?void 0:i.canvas;return u&&u.clientHeight?f=u.clientWidth/u.clientHeight:c>0&&a>0&&(f=c/a),{width:c,height:a,aspect:f}},t._resizeViewport=function(){this.props.autoResizeViewport&&this.device.gl&&this.device.gl.viewport(0,0,this.device.gl.drawingBufferWidth,this.device.gl.drawingBufferHeight)},t._resizeCanvasDrawingBuffer=function(){if(this.props.autoResizeDrawingBuffer){var n;(n=this.device)===null||n===void 0||(n=n.canvasContext)===null||n===void 0||n.resize({useDevicePixels:this.props.useDevicePixels})}},t._beginFrameTimers=function(){this.frameRate.timeEnd(),this.frameRate.timeStart(),this.cpuTime.timeStart()},t._endFrameTimers=function(){this.cpuTime.timeEnd()},t._startEventHandling=function(){this.canvas&&(this.canvas.addEventListener("mousemove",this._onMousemove.bind(this)),this.canvas.addEventListener("mouseleave",this._onMouseleave.bind(this)))},t._onMousemove=function(n){n instanceof MouseEvent&&(this._getAnimationProps()._mousePosition=[n.offsetX,n.offsetY])},t._onMouseleave=function(n){this._getAnimationProps()._mousePosition=null},A(e)}();var nr=pe(Jt(),1);function vn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function yn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?vn(Object(r),!0).forEach(function(n){L(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):vn(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function _n(e,t){var r=this,n=null,i=t?.device||Lt.createDevice(),o=new be(yn(yn({},t),{},{device:i,onInitialize:function(c){return lt(nr.default.mark(function a(){var f;return nr.default.wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return n=new e(c),l.next=3,(f=n)===null||f===void 0?void 0:f.onInitialize(c);case 3:return l.abrupt("return",l.sent);case 4:case"end":return l.stop()}},a)}))()},onRender:function(c){var a;return(a=n)===null||a===void 0?void 0:a.onRender(c)},onFinalize:function(c){var a;return(a=n)===null||a===void 0?void 0:a.onFinalize(c)}}));return o.getInfo=function(){return r.AnimationLoopTemplateCtor.info},o}function ir(e){if(Array.isArray(e))return It(e)}function or(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function sr(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
12
12
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ne(e){return ir(e)||or(e)||$t(e)||sr()}var nt=function(t){return"".concat(t)};function dt(e,t){if(!e)throw new Error(t||"shadertools: assertion failed.")}function xn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Mt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?xn(Object(r),!0).forEach(function(n){L(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xn(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var ar={number:{type:"number",validate:function(t,r){return Number.isFinite(t)&&tt(r)==="object"&&(r.max===void 0||t<=r.max)&&(r.min===void 0||t>=r.min)}},array:{type:"array",validate:function(t,r){return Array.isArray(t)||ArrayBuffer.isView(t)}}};function On(e){for(var t={},r=0,n=Object.entries(e);r<n.length;r++){var i=B(n[r],2),o=i[0],s=i[1];t[o]=As(s)}return t}function wn(e,t,r){for(var n={},i=0,o=Object.entries(t);i<o.length;i++){var s=B(o[i],2),c=s[0],a=s[1];e&&c in e&&!a.private?(a.validate&&dt(a.validate(e[c],a),"".concat(r,": invalid ").concat(c)),n[c]=e[c]):n[c]=a.value}return n}function As(e){var t=bn(e);if(t!=="object")return Mt(Mt({value:e},ar[t]),{},{type:t});if(tt(e)==="object")return e?e.type!==void 0?Mt(Mt(Mt({},e),ar[e.type]),{},{type:e.type}):e.value===void 0?{type:"object",value:e}:(t=bn(e.value),Mt(Mt(Mt({},e),ar[t]),{},{type:t})):{type:"object",value:null};throw new Error("props")}function bn(e){return Array.isArray(e)||ArrayBuffer.isView(e)?"array":tt(e)}function $(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var En,Mn,Sn=nt(En||(En=$([`#ifdef MODULE_LOGDEPTH
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@luma.gl/engine",
3
- "version": "9.0.0-alpha.37",
3
+ "version": "9.0.0-alpha.38",
4
4
  "description": "WebGL2 Components for High Performance Rendering and Computation",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -40,12 +40,12 @@
40
40
  },
41
41
  "dependencies": {
42
42
  "@babel/runtime": "^7.0.0",
43
- "@luma.gl/constants": "9.0.0-alpha.37",
44
- "@luma.gl/core": "9.0.0-alpha.37",
45
- "@luma.gl/shadertools": "9.0.0-alpha.37",
43
+ "@luma.gl/constants": "9.0.0-alpha.38",
44
+ "@luma.gl/core": "9.0.0-alpha.38",
45
+ "@luma.gl/shadertools": "9.0.0-alpha.38",
46
46
  "@math.gl/core": "4.0.0-alpha.4",
47
47
  "@probe.gl/log": "^4.0.2",
48
48
  "@probe.gl/stats": "^4.0.2"
49
49
  },
50
- "gitHead": "705108c07db777553714bfdf5af77f75e5c54c35"
50
+ "gitHead": "2c3cdd9c85541a183057d16f422bbd75107f2ad2"
51
51
  }