!function(){var e,t,n,s={"../../../node_modules/css-loader/dist/cjs.js!./src/index.module.css":function(e,t,n){"use strict";var s=n("../../../node_modules/css-loader/dist/runtime/noSourceMaps.js"),i=n.n(s),o=n("../../../node_modules/css-loader/dist/runtime/api.js"),r=n.n(o)()(i());r.push([e.id,"html,\nbody {\n margin: 0;\n height: 100%;\n min-height: 100%;\n}\n\nbody {\n background-color: black;\n}\n\n#scene-explorer-host, #inspector-host {\n height: 100%;\n}\n\n/*\n * New way, scales canvas while preserving its aspect ratio.\n * https://stackoverflow.com/a/67758567/8107589\n *\n * N.B. The inspector wraps canvas in a div between it and parent. A partial work around is having\n * the css selector skip levels (not '>').\n * TODO!!!: In practice, we need to change out the inspector hooks itself.\n */\n.GfMzfXcr_KfeLZtvm_5X {\n position: fixed;\n inset: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.GfMzfXcr_KfeLZtvm_5X .nUaqqKDtQM1DSOMV9yZm {\n object-fit: contain;\n max-height: 100%;\n max-width: 100%;\n width: 100%;\n height: 100%;\n}\n\n/*\n * Old way, fills entire parent.\n */\n/* .parent .canvas {\n width: 100%;\n height: 100%;\n display: flex;\n flex-direction: column;\n align-items: stretch;\n justify-content: flex-start;\n} */\n",""]),r.locals={parent:"GfMzfXcr_KfeLZtvm_5X",canvas:"nUaqqKDtQM1DSOMV9yZm"},t.Z=r},"./src/index.ts":function(e,t,n){"use strict";var s=n("../../babs/lib/common/debug_flags.js"),i=n("../../babs/lib/game/game_engine.js"),o=n("../../common/lib/core.js"),r=n("../../common/lib/identity.js"),a=JSON.parse('{"vc":{"QB":"ld52","iU":"grubgrab-entry"}}'),c=n("../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),u=n.n(c),l=n("../../../node_modules/style-loader/dist/runtime/styleDomAPI.js"),d=n.n(l),x=n("../../../node_modules/style-loader/dist/runtime/insertBySelector.js"),f=n.n(x),h=n("../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js"),_=n.n(h),b=n("../../../node_modules/style-loader/dist/runtime/insertStyleElement.js"),p=n.n(b),m=n("../../../node_modules/style-loader/dist/runtime/styleTagTransform.js"),g=n.n(m),v=n("../../../node_modules/css-loader/dist/cjs.js!./src/index.module.css"),y={};y.styleTagTransform=g(),y.setAttributes=_(),y.insert=f().bind(null,"head"),y.domAPI=d(),y.insertStyleElement=p(),u()(v.Z,y);var w=v.Z&&v.Z.locals?v.Z.locals:void 0,j=(n("../../babs/lib/audio/audio_manager.js"),n("../../babs/lib/input/toggle_input.js")),E=n("../../babs/lib/common/asset_manager.js");class S extends E.me{constructor(){super(s.ND,!0)}onProcess(e,t){void 0!==t.options.key&&(0,j.Qw)(e.scope,t.name,t.options.key,{...t.options,toggle:t.toggle})}}new S;var T=n("../../../node_modules/@babylonjs/core/index.js"),O=n("../../common/lib/units.js"),P=n("../../babs/lib/common/scopes.js"),k=n("../../babs/lib/gui/gui.js"),C=n("../../babs/lib/input/input.js"),M=n("../../babs/lib/input/input_code.js"),A=n("../../common/lib/containers.js");const I=Object.freeze(["ShiftLeft","ShiftRight"]),$=Object.freeze(["ControlLeft","ControlRight"]),R=Object.freeze(["MetaLeft","MetaRight"]),N=Object.freeze(["AltLeft","AltRight"]);class D{constructor(){this.onKeysChanged=new T.y$z,this.onStateChanged=new T.y$z,this.bindings=new Map}track(e){const t=(0,A.tj)(this.bindings,e.config.code,(()=>[]));(0,A.gC)(t,e,((e,t)=>e.priority>=t.priority)),e.connected.onChanged(e,(({current:n})=>{n?t.forEach((t=>{e.priority>t.priority&&t.config.matchesRequirements(e.config,!0)&&t.cancel()})):e.cancel(),this.signalStateChange(e)})),this.onKeysChanged.notifyObservers()}untrack(e){const t=this.bindings.get(e.config.code);t&&this.bindings.set(e.config.code,t.filter((t=>t!==e))),e.disposeResources(),this.onKeysChanged.notifyObservers()}*enumerateKeys(){for(const[e,t]of this.bindings.entries())for(const e of t)yield{name:e.name,connected:e.connected.value,active:e.active,value:e.value,config:e.config}}signalStateChange(e){this.onStateChanged.notifyObservers({name:e.name,connected:e.connected.value,active:e.active,value:e.value,config:e.config})}onEvent(e,t,n,s,i,o){let r=!1;for(const a of this.bindings.get(e)??[])if(a.connected.value&&a.config.matchesRequirements(t,n)){if(n&&a.priority{const t=e;return n?!!t.signal.activate()&&(this.cancelModifiers(t.config),!0):t.signal.deactivate()}))}onAxisEvent(e,t,n,s){return this.onEvent(e,t,!0,n,!1,(e=>(e.onEvent(s()),!0)))}cancelModifiers(e){const t=[];e.wantShift&&!I.includes(e.code)&&t.push(...I),e.wantCtrl&&!$.includes(e.code)&&t.push(...$),e.wantMeta&&!R.includes(e.code)&&t.push(...R),e.wantAlt&&!N.includes(e.code)&&t.push(...N),t.forEach((e=>(this.bindings.get(e)??[]).forEach((e=>{e.cancel()&&this.signalStateChange(e)}))))}cancelKeySignals(){this.bindings.forEach((e=>e.forEach((e=>{e.cancel()&&this.signalStateChange(e)}))))}}var L,F=n("../../common/lib/disposable.js"),z=function(e,t,n,s,i){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?i.call(e,n):i?i.value=n:t.set(e,n),n},B=function(e,t,n,s){if("a"===n&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?s:"a"===n?s.call(e):s?s.value:t.get(e)};class V extends F.v{constructor(e){super(),L.set(this,void 0);const t=()=>{z(this,L,void 0,"f"),e()};this.scheduler=()=>{void 0===B(this,L,"f")&&z(this,L,setTimeout(t,0),"f")}}dispose(){return void 0!==B(this,L,"f")&&(clearTimeout(B(this,L,"f")),z(this,L,void 0,"f")),super.dispose()}}L=new WeakMap;var G=n("../../babs/lib/gui/table.js"),H=n("../../babs/lib/gui/window.js");function K(e,t,n){t[1].style=e.active?n.styles.bold:n.styles.normal,t[1].color=e.connected?G.I.content:G.I.disabled,t[2].style=!0===e.value?n.styles.bold:n.styles.normal,t[2].color=G.I.highlight}function W(e){return`${e.name}.${e.config.code}`}var U,q,Q=n("../../babs/lib/input/keys.js"),Z=n("../../babs/lib/input/pointer_lock.js"),J=n("../../babs/lib/input/user_activation.js");function X(e){return-.10&&this.manager.onAxisChanged("M.Wheel.Y",k.$2,e.deltaY*t,n);break}case T.kD3.POINTERTAP:case T.kD3.POINTERDOUBLETAP:break;default:(0,o.cM)("Unexpected pointer event type",{type:r,event:i})}a&&(e.skipOnPointerObservable=!0,t.skipNextObservers=!0)}constructor(){super(C.II),this.tracker=new D,this.axisEventLogOptions={logId:Symbol("axisLogId"),rate:(0,O.Lm)(4),omitDuplicates:!0}}initKeyboard(e){e.display.onNotify(e.scene.onKeyboardObservable,(e=>{const t=e.event;t.isTrusted&&"keydown"===t.type&&J.T.notifyObservers("keyboard"),this.onKeyEvent(t)&&(t.stopPropagation(),t.preventDefault())})),e.canvas.addEventListener("focusout",(e=>this.onFocus(e))),e.canvas.addEventListener("focusin",(e=>this.onFocus(e)));const t=function(e,t){const n=(0,G.W)(e,"table",{columnRatios:[.6,.2,.2]}),s=new H.Rz(e,"Key Map",n.root,{widthRatio:.8,zIndex:100}),i=new V((()=>{const s=Array.from(t.enumerateKeys());!function(e,t,n){t.sort(((e,t)=>{const n=e.name.startsWith("debug."),s=t.name.startsWith("debug.");return n&&!s?1:s&&!n?-1:e.name.localeCompare(t.name)})),e.layout((e=>{for(const s of t){if(s.name.startsWith("_"))continue;const[t,i,o]=e(W(s));s.name.startsWith("debug.")?t.text=s.name.slice(6):t.text=s.name,i.text=s.config.toString(),o.text=`${s.value}`,K(s,[t,i,o],n)}}))}(n,s,e)}));return n.root.onDisposeObservable.addOnce((()=>i.dispose())),e.onNotify(t.onKeysChanged,i.scheduler),i.scheduler(),s}(e.display,this.tracker);s.Mz.showKeymap.onChanged(e.display,(({current:e})=>t.show(e)),{immediate:!0})}initMouse(e){window.oncontextmenu=e=>!1,e.scene.preventDefaultOnPointerDown=!0,e.scene.preventDefaultOnPointerUp=!0,e.scene.skipPointerMovePicking=!0;const t=te.pointerHandler,n=T.kD3.POINTERUP|T.kD3.POINTERDOWN|T.kD3.POINTERMOVE|T.kD3.POINTERWHEEL,s=Object.freeze({scene:e.scene,manager:this,minPriority:C.KE.PreGui}),i=Object.freeze({scene:e.scene,manager:this,minPriority:C.KE.Low});e.display.onNotify(e.scene.onPrePointerObservable,t,{insertPosition:"first",scope:s}),e.display.onNotify(e.scene.onPrePointerObservable,t,{mask:n,insertPosition:"last",scope:i}),(0,Z.Uh)(e.engine)}initGamepad(e){const t=new T.v$X,n=new Map;e.display.onNotify(t.onGamepadConnectedObservable,(t=>{if((0,o.cM)("onGamepadConnected",{gp:t}),(0,r.$O)(t,T.FI8)){const s=new P._z(e.display);n.set(t.index,s),s.onNotify(t.onButtonDownObservable,(e=>{const n=`G.${T.nRn[e]}`;this.onGamepadEvent(n,!0,t.index)})),s.onNotify(t.onButtonUpObservable,(e=>{const n=`G.${T.nRn[e]}`;this.onGamepadEvent(n,!1,t.index)})),s.onNotify(t.onPadDownObservable,(e=>{const n=`G.Dpad${T._Q$[e]}`;this.onGamepadEvent(n,!0,t.index)})),s.onNotify(t.onPadUpObservable,(e=>{const n=`G.Dpad${T._Q$[e]}`;this.onGamepadEvent(n,!1,t.index)}));const i=C.KE.Low;t.onleftstickchanged((e=>this.onAxesChanged("G.LeftStick",O.iA,Y(e),i,t.index))),t.onrightstickchanged((e=>this.onAxesChanged("G.RightStick",O.iA,Y(e),i,t.index))),t.onlefttriggerchanged((e=>this.onAxisChanged("G.LeftTrigger",O.iA,X(e),i,t.index))),t.onrighttriggerchanged((e=>this.onAxisChanged("G.RightTrigger",O.iA,X(e),i,t.index)))}})),e.display.onNotify(t.onGamepadDisconnectedObservable,(e=>{(0,o.cM)("onGamepadDisconnected",{gp:e});const t=n.get(e.index);t&&(n.delete(e.index),t.dispose())}))}onInit(e){this.initKeyboard(e),this.initMouse(e),this.initGamepad(e)}onScopeInit(e){e.scene.onDisposeObservable.addOnce((()=>{e.scope.forEachSubsidiary(this.guard,(e=>{e.bindings.forEach((e=>this.tracker.untrack(e)))}))}))}onProcess(e,t){t.bindings.forEach((e=>this.tracker.track(e)))}onKeyEvent(e){if(void 0===e.code)return console.warn(`Missing code for ${e.type} ${e.key}`),!1;const t="keydown"===e.type,n=new Q.xw(e.code,e);return s.cG.showKeyEvents&&!e.repeat&&(0,o.cM)("onKeyEvent",{config:n,isDown:t,event:e}),this.tracker.onToggleEvent(n.code,n,t,C.KE.Low,e.repeat)}onGamepadEvent(e,t,n){const i={modifierMask:0,deviceId:n};return s.cG.showKeyEvents&&(0,o.cM)("onGamepadEvent",{button:e,context:i,isDown:t,deviceId:n}),this.tracker.onToggleEvent(e,i,t,C.KE.Low)}onAxesChanged(e,t,n,i,r){const a={modifierMask:0,deviceId:r};s.cG.showAxisEvents&&(0,o.cM)("onAxis",{baseCode:e,context:a,values:n,minPriority:i},this.axisEventLogOptions);const c=t,u=`${e}.XY`;let l=this.tracker.onAxisEvent(u,a,i,(()=>O.OW.from([n.x,n.y],c)));const d=`${e}.X`;l||(l=this.tracker.onToggleEvent(`${d}.NZ`,a,0!==n.x,i)),l||(l=this.tracker.onAxisEvent(d,a,i,(()=>O.Ru.from(c,n.x))));const x=`${e}.Y`;return l||(l=this.tracker.onToggleEvent(`${x}.NZ`,a,0!==n.y,i)),l||(l=this.tracker.onAxisEvent(x,a,i,(()=>O.Ru.from(c,n.y)))),l}onAxisChanged(e,t,n,i,r){const a={modifierMask:0,deviceId:r};s.cG.showAxisEvents&&(0,o.cM)("onAxis",{code:e,context:a,value:n,minPriority:i},this.axisEventLogOptions);const c=t;let u=this.tracker.onToggleEvent(`${e}.NZ`,a,0!==n,i);return u||(u=this.tracker.onAxisEvent(e,a,i,(()=>O.Ru.from(c,n)))),u}onFocus(e){s.cG.showKeyEvents&&(0,o.cM)("onFocus",{type:e.type,event:e}),this.tracker.cancelKeySignals()}}new te;var ne=n("../../babs/lib/render/image_asset.js");class se extends E.me{constructor(){super(ne.s)}onProcess(e,t){e.fetchImage(t,(e=>{t.setImage(e)}))}}new se,n("../../../node_modules/@babylonjs/loaders/glTF/index.d.ts"),n("../../../node_modules/@babylonjs/loaders/OBJ/index.d.ts");var ie=n("../../babs/lib/common/nodes.js"),oe=n("../../babs/lib/render/constants.js"),re=n("../../babs/lib/render/scene_asset.js");class ae extends E.me{constructor(){super(re.A)}onProcess(e,t){const n=t.options?.enablePhysicalLighting??!1;e.fetchScene(t,(e=>{const s=t.options?.scale;for(const t of(0,ie.go)(T.Kj0,...e.meshes))t.renderingGroupId=oe.Yt.meshDefault,s&&(t.scaling=s);const i=new Map(e.animationGroups.map((e=>[e.name,e])));if(t.options?.animations)for(const[e,n]of Object.entries(t.options.animations)){const s=(0,E.bk)(t.name,n),r=(0,o.jK)(i.get(s),`Missing animation ${n} of ${t.name}`);r.stop(),r.name=(0,E.bk)(t.name,e),i.delete(s)}if(!n)for(const t of e.materials)(0,r.$O)(t,T.YVB)&&(t.usePhysicalLightFalloff=!1);i.forEach((e=>e.dispose())),t.setScene(e)}),t.options)}}new ae;var ce=n("../../babs/lib/render/texture_asset.js");class ue extends E.me{constructor(){super(ce.X)}onProcess(e,t){e.fetchTexture(t,(e=>{t.setTexture(e)}),t.options)}}new ue;const le=a.vc.QB,de=a.vc.iU;function xe(){const e=new Proxy(new URLSearchParams(window.location.search),{get:(e,t)=>e.get((0,o.$1)(t,r.HD))}),t=window.location.hash?window.location.hash.slice(1):void 0;return e.game??t??le}async function fe(e){return console.log(`Loading game: ${e}`),(await n("../../games/src lazy recursive ^\\.\\/.*\\/index\\.ts$ include: index\\.ts$")(`./${e}/index.ts`)).default}(async()=>{const e=document.createElement("canvas");e.classList.add(w.canvas),document.body.classList.add(w.parent),document.body.appendChild(e);let t="";o.Pc||(t=`${de}/`);const n=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);await async function(e){(0,o.cM)("version",{build:s.qg,isProd:o.Pc});const t=new i.dA(e,fe,le);await t.start(),window.addEventListener("hashchange",(()=>{t.loadApp(xe())})),await t.loadApp(xe())}({canvas:e,urlBase:t,isMobile:n})})().catch((0,o.H)("main"))},"../../games/src lazy recursive ^\\.\\/.*\\/index\\.ts$ include: index\\.ts$":function(e,t,n){var s={"./demolition/index.ts":["../../games/src/demolition/index.ts",782],"./infra/index.ts":["../../games/src/infra/index.ts",381],"./jukebox/index.ts":["../../games/src/jukebox/index.ts",947],"./ld51/index.ts":["../../games/src/ld51/index.ts",46],"./ld52/index.ts":["../../games/src/ld52/index.ts",285],"./roguerally/index.ts":["../../games/src/roguerally/index.ts",893],"./template/index.ts":["../../games/src/template/index.ts",338],"./unladen/index.ts":["../../games/src/unladen/index.ts",868]};function i(e){if(!n.o(s,e))return Promise.resolve().then((function(){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=s[e],i=t[0];return n.e(t[1]).then((function(){return n(i)}))}i.keys=function(){return Object.keys(s)},i.id="../../games/src lazy recursive ^\\.\\/.*\\/index\\.ts$ include: index\\.ts$",e.exports=i},"?51d3":function(){},"?eb2f":function(){},"../../babs/lib/audio/audio_asset.js":function(e,t,n){"use strict";n.d(t,{W:function(){return b}});var s=n("../../../node_modules/@babylonjs/core/index.js"),i=n("../../common/lib/containers.js"),o=n("../../common/lib/core.js"),r=n("../../common/lib/identity.js"),a=n("../../common/lib/math.js"),c=n("../../common/lib/random.js"),u=n("../../babs/lib/common/asset.js"),l=n("../../babs/lib/common/scopes.js"),d=n("../../babs/lib/common/types.js"),x=n("../../babs/lib/game/game_engine.js"),f=n("../../babs/lib/audio/audio_manager.js");const h=(0,r.SC)().withDefaults({loop:!1,volumeFactor:1,pauseExempt:!1,generations:1,autoPlay:!1});class _ extends l._z{constructor(e,t,n){(0,o.BF)(t.length>0,"Empty SoundGroup"),(0,o.BF)(t.length%n==0),super(e),this.numGenerations=n,this.gIndex_=n-1,this.numSounds=t.length/n,this.sounds_=t,t.length>1?(this.track_=new s.tbg,t.forEach((e=>this.track_?.addSound(e))),e.acquire(this.track_)):t.forEach((t=>e.acquire(t)))}setVolume(e){this.track_?this.track_.setVolume(e):this.sounds_[0].setVolume(e)}setLooping(e){this.sounds_.forEach((t=>t.loop=e))}setSpatial(e){this.sounds_.forEach((t=>{e?.distanceModel&&(t.distanceModel=e.distanceModel),e?.refDistance&&(t.refDistance=e.refDistance.raw),e?.maxDistance&&(t.maxDistance=e.maxDistance.raw),void 0!==e?.rolloffFactor&&(t.rolloffFactor=e.rolloffFactor),e.mesh?((0,o.BF)(void 0===e.position,"Spatial sounds must EITHER have a location OR be attached to a mesh."),t.attachToMesh(e.mesh)):e.position?t.setPosition((0,d.g)(e.position)):(0,o.Xr)("Spatial sounds must EITHER have a location OR be attached to a mesh.")}))}play(e){if((0,o.BF)(!0!==e?.asap||void 0===e?.duration,"Sound options asap and duration are incompatible."),void 0!==e?.index)this.sIndex_=(0,o.J5)(e.index,0,this.numSounds);else if(1===this.numSounds)this.sIndex_=0;else if(void 0===this.sIndex_)this.sIndex_=(0,c.Iy)(this.numSounds);else{let e=(0,c.Iy)(this.numSounds-1);e>=this.sIndex_&&(e+=1),this.sIndex_=e}this.gIndex_=(this.gIndex_+1)%this.numGenerations;const t=this.sIndex_+this.gIndex_*this.numSounds,n=this.sounds_[t];if(!x.dA.Paused.value||n.metadata.asset.settings.pauseExempt){if(!0===e?.restart||!n.isPlaying){const t=e?.duration?.raw;if(!f.TC.value)return;n.isReady()?n.play(0,0,t):!0===e?.asap&&(n.autoplay=!0)}void 0!==e?.rate&&this.setPlaybackRate(e.rate)}}stop(){const e=this.currentSound();e?.isPlaying&&e?.stop()}setPlaybackRate(e){const t=this.currentSound();t&&t.isPlaying&&t.setPlaybackRate((0,a.uZ)(e,.5,4))}currentSound(){return void 0!==this.sIndex_?this.sounds_[this.sIndex_+this.gIndex_*this.numSounds]:void 0}}class b extends u.ML{static clone(e){const t=(0,o.jK)(e.clone());return t.name=`${e.name}.${(0,u.Y5)()}`,t.metadata=e.metadata,t}createGroup(e,t){let n=this.sounds_;t&&(n=this.sounds_.map(b.clone));const s=new _(e,n,this.settings.generations);return s.setVolume(this.settings.volumeFactor),s.setLooping(this.settings.loop),s}ambient(e){return e?this.createGroup(e,!0):(this.ambient_??(this.ambient_=this.createGroup(this,!1)),this.ambient_)}spatial(e,t){const n=this.createGroup(e,!0);return n.setSpatial(t),n}addSound(e){this.sounds_.push(e);for(let t=1;tthis.sounds_.length=0))}}},"../../babs/lib/audio/audio_manager.js":function(e,t,n){"use strict";n.d(t,{LN:function(){return v},TC:function(){return _}});var s=n("../../../node_modules/@babylonjs/core/index.js"),i=n("../../common/lib/identity.js"),o=n("../../common/lib/units.js"),r=n("../../babs/lib/common/asset_manager.js"),a=n("../../babs/lib/common/scopes.js"),c=n("../../babs/lib/common/values.js"),u=n("../../babs/lib/game/game_engine.js"),l=n("../../babs/lib/input/pointer_lock.js"),d=n("../../babs/lib/input/toggle_input.js"),x=n("../../babs/lib/input/user_activation.js"),f=n("../../babs/lib/audio/audio_asset.js");const h=(0,d.Qw)(a.fi,"muted","KeyM",{persist:!0}),_=new c.ZD(a.fi,"audio unlocked"),b=(0,o.gG)(70),p=new c.aC(a.fi,"volume",o.Ru.of(o.gG),{defaultValue:b,minimum:(0,o.gG)(0),maximum:(0,o.gG)(100),persist:!0}),m=(0,o.gG)(10);d.sM.register(a.fi,"volume: increase","Equal",{valued:p}).onCycle(a.fi,(()=>{h.value?(p.value=m,h.value=!1):p.increment(m)})),d.sM.register(a.fi,"volume: decrease","Minus",{valued:p}).onCycle(a.fi,(()=>{h.value||(p.value.isLessThanOrEqualTo(m)?(h.value=!0,p.value=b):p.decrement(m))}));const g=()=>s.Pa4.Zero();new f.W(a.fi,"Silence","audio/silence.mp3",{autoPlay:!0});class v extends r.me{constructor(){super(f.W)}setSpatialAudioListener(e,t,n){e.audioListenerPositionProvider=n,t.onDispose((()=>{e.audioListenerPositionProvider===n&&(e.audioListenerPositionProvider=g)}))}onInit(e){const t=s.D4V.audioEngine;t&&e.scene.audioEnabled?(t.useCustomUnlockedButton=!0,this.onNotify(t.onAudioLockedObservable,(()=>{_.value=!1})),this.onNotify(t.onAudioUnlockedObservable,(()=>{_.value=!0})),_.value=t.unlocked,!_.value&&(0,l.fb)()&&t.unlock(),p.onChanged(this,(({current:e})=>{h.value||console.log(`Volume level is ${String(e)}`),this.syncGlobalVolume()})),h.onChanged(this,(({current:e})=>{console.log(e?"Muted.":`Unmuted. Volume level is ${String(p.value)}`),this.syncGlobalVolume()}),{immediate:!0}),_.onChanged(this,(e=>{const n=e.current;console.log(`Audio ${n?"enabled":"blocked"}.`),n?this.syncGlobalVolume():(this.stopAllSounds(),e.scope.onNotify(x.T,(()=>t.unlock())))}),{immediate:!0}),this.syncGlobalVolume()):console.error(t?"No audio engine.":"Audio is disabled.")}onProcess(e,t){u.dA.Paused.onEnabled(e.scope,(()=>{for(const t of e.scene.soundTracks??[])for(const e of t.soundCollection)e.metadata.asset.settings.pauseExempt||(e.isPlaying?e.stop():e.autoplay&&(e.autoplay=!1))})),e.fetchAll(t,((n,i)=>{for(const[o,a]of Object.entries(n)){const{basename:n}=(0,r.pf)(o),c=new s.$uU((0,r.bk)(t.name,t.urlPaths.length>1?n:void 0),a,e.scene,i());(t.settings.inspectProtoSounds??r.L8)||e.soundPrototypes.addSound(c),c.metadata={asset:t},t.addSound(c)}t.ready()}))}stopAllSounds(){s.D4V.Instances.forEach((e=>{e.scenes.forEach((e=>{e.sounds?.forEach((e=>{e.isPlaying&&(console.log(`Stopping ${e.name}`),e.stop(),e.isPlaying=!1)})),e.soundTracks?.forEach((e=>{e.soundCollection.forEach((e=>{e.isPlaying&&(console.log(`Stopping ${e.name}`),e.stop(),e.isPlaying=!1)}))}))}))}))}syncGlobalVolume(){(0,i.qX)(s.D4V.audioEngine?.audioContext)?console.warn("Audio context is not initialized."):s.D4V.audioEngine?.setGlobalVolume(h.value?0:p.value.raw)}}v.I=new v},"../../babs/lib/common/asset.js":function(e,t,n){"use strict";n.d(t,{ML:function(){return o},XM:function(){return c},Y5:function(){return a},xR:function(){return i}});var s=n("../../babs/lib/common/scopes.js");class i extends s.$9{constructor(e,t,n){super(e,t),this.urlPath=n}}class o extends s.$9{constructor(e,t,n){super(e,t),this.urlPaths=n}}let r=0;function a(){return r++}class c extends o{constructor(){super(...arguments),this.json_=[]}get json(){return this.json_}add(e){this.json_.push(e)}}},"../../babs/lib/common/asset_manager.js":function(e,t,n){"use strict";n.d(t,{L8:function(){return h},NS:function(){return x},ZH:function(){return j},bk:function(){return d},jO:function(){return p},me:function(){return v},pf:function(){return f},ve:function(){return m},wV:function(){return w}});var s=n("../../../node_modules/@babylonjs/core/index.js"),i=n("../../common/lib/core.js"),o=n("../../common/lib/identity.js"),r=n("../../common/lib/units.js"),a=n("../../babs/lib/common/asset.js"),c=n("../../babs/lib/common/scopes.js");const u=Symbol("assetLoadingLogId"),l=(0,r.Lm)(1).scale(.25);function d(e,t){return"__root__"===t||void 0===t?`α.${e}`:`α.${e}.${t}`}function x(e,t,n){if(!e.startsWith("α."))return e;let s=e.indexOf(".","α.".length);return s<0&&(s=void 0),t??(t=e.slice("α.".length,s)),`${t}.${n}${void 0!==s?e.slice(s):""}`}function f(e){const t=e.lastIndexOf("/")+1,n=e.slice(0,t),s=e.slice(t),i=s.lastIndexOf("."),o=i>=0?s.slice(0,i):s,r=i>=0?s.slice(i):"";return{path:n,filename:s,basename:o,extension:r}}const h=!1,_=(0,o.SC)().withDefaults({inspectProtoTransformNodes:!1,inspectProtoMeshes:!1,inspectProtoParticleSystems:!1,inspectProtoSkeletons:!1,inspectProtoAnimationGroups:!1}),b=(0,o.SC)().withDefaults({samplingMode:"trilinear"});class p{constructor(e){this.unreadyAssets=0,[this.scope,this.scene,this.display,this.gameEngine,this.urlBase,this.engine]=[e.scope,e.scene,e.display,e.gameEngine,e.urlBase,e.engine],this.prototypes=new s.TJ4(e.scene),this.soundPrototypes=new s.tbg(e.scene),this.assetManager=new s.SpM(e.scene),this.scope.onNotify(this.assetManager.onProgressObservable,(e=>{const t=e.totalCount-e.remainingCount;(0,i.cM)("Asset Loading",{total:e.totalCount,numCompleted:t,lastCompleted:e.task.name},{logId:u,rate:l})}))}fetch(e,t){const n=this.assetManager.addBinaryFileTask(e.name,`${this.urlBase}${e.urlPath}`);n.onSuccess=()=>t(n.data,(()=>this.onReadyToUse())),n.onError=(t,n)=>console.warn(`Failed to load asset ${this.urlBase} - ${e.urlPath}: ${n}`)}fetchAll(e,t){const n={};let s=1;const i=()=>{0==--s&&t(n,(()=>this.onReadyToUse()))};for(const t of e.urlPaths){s+=1;const o=this.assetManager.addBinaryFileTask(e.name,`${this.urlBase}${t}`);o.onSuccess=()=>{n[t]=o.data,i()},o.onError=(e,n)=>{console.warn(`Failed to load asset ${this.urlBase} - ${t}: ${n}`),i()}}i()}fetchText(e,t){const n=this.assetManager.addTextFileTask(e.name,`${this.urlBase}${e.urlPath}`);n.onSuccess=()=>t(n.text),n.onError=(t,n)=>console.warn(`Failed to load asset ${this.urlBase}${e.urlPath}: ${n}`)}fetchAllText(e,t){const n={};let s=1;const i=()=>{0==--s&&t(n)};for(const t of e.urlPaths){s+=1;const o=this.assetManager.addTextFileTask(e.name,`${this.urlBase}${t}`);o.onSuccess=()=>{n[t]=o.text,i()},o.onError=(e,n)=>{console.warn(`Failed to load asset ${t}: ${n}`),i()}}i()}fetchScene(e,t,n){const s=_.apply(n??{}),{path:i,filename:o}=f(e.urlPath),r=this.assetManager.addContainerTask(e.name,void 0,`${this.urlBase}${i}`,o);r.onSuccess=()=>{r.loadedTransformNodes.forEach((t=>{null===t.parent&&(t.name=d(e.name,t.name),s.inspectProtoTransformNodes&&this.scene.addTransformNode(t))})),r.loadedMeshes.forEach((t=>{null===t.parent&&(t.name=d(e.name,t.name),s.inspectProtoMeshes&&this.scene.addMesh(t))})),r.loadedParticleSystems.forEach((t=>{t.name=d(e.name,t.name),s.inspectProtoParticleSystems&&this.scene.addParticleSystem(t)})),r.loadedSkeletons.forEach((t=>{t.name=d(e.name,t.name),s.inspectProtoSkeletons&&this.scene.addSkeleton(t)})),r.loadedAnimationGroups.forEach((t=>{t.name=d(e.name,t.name),s.inspectProtoAnimationGroups&&this.scene.addAnimationGroup(t)})),t(r.loadedContainer)},r.onError=(t,n,s)=>console.warn(`Failed to load scene ${this.urlBase}${e.urlPath}: ${n}`,s)}fetchTexture(e,t,n){const i="trilinear"===b.apply(n??{}).samplingMode?s.xEZ.TRILINEAR_SAMPLINGMODE:s.xEZ.NEAREST_NEAREST,o=this.assetManager.addTextureTask(e.name,`${this.urlBase}${e.urlPath}`,!1,!1,i);o.onSuccess=()=>{o.texture.name=d(e.name),this.prototypes.textures.push(o.texture),this.scene.removeTexture(o.texture),t(o.texture)},o.onError=(t,n)=>console.warn(`Failed to load asset ${this.urlBase}${e.urlPath}: ${n}`)}fetchImage(e,t){const n=this.assetManager.addImageTask(e.name,`${this.urlBase}${e.urlPath}`);n.onSuccess=()=>t(n.image),n.onError=(t,n)=>console.warn(`Failed to load asset ${this.urlBase}${e.urlPath}: ${n}`)}onReadyToUse(){return this.unreadyAssets+=1,this.scope.name,this.unreadyAssets,()=>{0==--this.unreadyAssets&&(this.scope.name,this.allAssetsReady?.())}}async load(){this.scope.name,this.assetManager.autoHideLoadingUI=!1,await this.assetManager.loadAsync(),this.scope.name,this.unreadyAssets&&await new Promise((e=>this.allAssetsReady=e)),this.scope.name,this.engine.hideLoadingUI()}}class m extends p{constructor(e,t){super(t),this.canvas=e}}const g=new c.f$("pre-global");class v extends c.$9{constructor(e,t=!1){super(t?g:c.fi,`AssetManager of ${e.name}`),this.guard=(0,o.V9)(e)}onInit(e){}onScopeInit(e){}}const y=(0,o.V9)(v);function w(e){for(const t of[g,c.fi])t.name,c.$9.setScopeInititialized(t),t.forEachSubsidiary(y,(n=>{t.name,n.name,n.onInit(e),c.fi.forEachSubsidiary(n.guard,(s=>{t.name,n.name,n.onProcess(e,s)}))}))}function j(e){c.$9.setScopeInititialized(e.scope),(0,i.Yg)(e.scope,c.fi,"globalScope is processed in initializeManagers"),e.scope.name,c.fi.forEachSubsidiary(y,(t=>{e.scope.name,t.name,t.onScopeInit(e),e.scope.forEachSubsidiary(t.guard,(n=>{e.scope.name,t.name,t.onProcess(e,n)}))}))}new class extends v{constructor(){super(a.XM)}onProcess(e,t){e.fetchAllText(t,(e=>{for(const[n,s]of Object.entries(e))try{const e=JSON.parse(s);t.add(e)}catch(e){if(!(0,o.$O)(e,SyntaxError))throw e;console.warn(`Failed to parse json @ ${n}`)}}))}}},"../../babs/lib/common/color.js":function(e,t,n){"use strict";n.d(t,{DG:function(){return r},H_:function(){return i},NC:function(){return o},Pf:function(){return a},nV:function(){return u}});var s=n("../../../node_modules/@babylonjs/core/index.js");function i(e){return 7===e.length?s.Wot.FromHexString(e):s.HEv.FromHexString(e)}function o(e){return e.toHexString()}function r(e,t){const n=t?.(e)??{},s={...e,...n};return Object.freeze(s)}const a=r({turquoise:"#1abc9c",emerald:"#2ecc71",peterRiver:"#3498db",amethyst:"#9b59b6",wetAsphalt:"#34495e",greenSea:"#16a085",nephritis:"#27ae60",belizeHole:"#2980b9",wisteria:"#8e44ad",midnightBlue:"#2c3e50",sunFlower:"#f1c40f",carrot:"#e67e22",alizarin:"#e74c3c",clouds:"#ecf0f1",concrete:"#95a5a6",orange:"#f39c12",pumpkin:"#d35400",pomegranate:"#c0392b",silver:"#bdc3c7",asbestos:"#7f8c8d"});const c=Object.freeze(new s.Wot(1,1,1));function u(e,t,n){return function(e,t,n,i){return i??(i=new s.Wot),n??(n=t.a??1),i.r=e.r+(t.r-e.r)*n,i.g=e.g+(t.g-e.g)*n,i.b=e.b+(t.b-e.b)*n,i}(e,c,t,n)}},"../../babs/lib/common/debug_flags.js":function(e,t,n){"use strict";n.d(t,{Mz:function(){return l},ND:function(){return c},cG:function(){return x},qg:function(){return a}});var s=n("../../common/lib/core.js"),i=n("../../common/lib/identity.js"),o=n("../../babs/lib/common/scopes.js"),r=n("../../babs/lib/common/values.js");const a="1.9";class c extends o.$9{constructor(e,t,n){super(e,t);const i=s.Pc?void 0:n?.key,o=n?.mode??"stateful",a=!s.Pc&&(n?.persist??"stateful"===o);this.options={key:i,mode:o,persist:a,...n,validate:e=>!s.Pc&&e},this.toggle=new r.ZD(e,`debug.${t}`,this.options)}}const u=(0,i.Pn)()({enableHighlightLayer:{key:"Alt+H"},showAnimationChange:{key:"Alt+A"},showAxes:{key:"Alt+X"},showColliders:{key:"Alt+C"},showRays:{key:"Shift+R"},showInspector:{key:"Alt+I"},showSpector:{key:"Shift+Alt+I"},showKeyEvents:{key:"Alt+K"},showAxisEvents:{key:"Shift+Alt+K"},showToggleEvents:{key:"Ctrl+K"},showPerfMetrics:{key:"Alt+P"},showKeymap:{key:"AltLeft"},logNextFrame:{key:"Alt+F",mode:"ephemeral"},freeLook:{key:"ScrollLock",persist:!1}}),l=(0,i.Yl)(u,((e,t)=>new c(o.fi,t,e).toggle)),d=(0,i.QK)(l,(e=>()=>e.value)),x=Object.freeze(Object.assign(d,{true:!0,false:!1}))},"../../babs/lib/common/logging.js":function(e,t,n){"use strict";n.d(t,{Q:function(){return o},t:function(){return r}});var s=n("../../../node_modules/@babylonjs/core/index.js"),i=n("../../common/lib/core.js");function o(){(0,i.nL)(s.Ms4,s.y$z),(0,i.AM)(s.FM8,(e=>[`%c(%c${(0,i.OS)(e.x,2)}%c, %c${(0,i.OS)(e.y,2)}%c)`,i.B$.default,i.B$.number,i.B$.default,i.B$.number,i.B$.default])),(0,i.AM)(s.Pa4,(e=>[`%c(%c${(0,i.OS)(e.x,2)}%c, %c${(0,i.OS)(e.y,2)}%c, %c${(0,i.OS)(e.z,2)}%c)`,i.B$.default,i.B$.number,i.B$.default,i.B$.number,i.B$.default,i.B$.number,i.B$.default])),(0,i.AM)(s.Wot,(e=>{let t=e.toHexString();return t=t.charAt(1)===t.charAt(2)&&t.charAt(3)===t.charAt(4)&&t.charAt(5)===t.charAt(6)?t.charAt(1)+t.charAt(3)+t.charAt(5):t.substring(1),[`%c#%c${t}`,`color: #${t}`,i.B$.subtle]})),(0,i.AM)(s.HEv,(e=>{let t=e.toHexString();return t=t.charAt(1)===t.charAt(2)&&t.charAt(3)===t.charAt(4)&&t.charAt(5)===t.charAt(6)&&t.charAt(7)===t.charAt(8)?t.charAt(1)+t.charAt(3)+t.charAt(5)+t.charAt(7):t.substring(1),[`%c#%c${t}`,`color: #${t}`,i.B$.subtle]}))}function r(e,t=2){return void 0===e?String(e):"z"in e?`(${(0,i.OS)(e.x,t)}, ${(0,i.OS)(e.y,t)}, ${(0,i.OS)(e.z,t)})`:`(${(0,i.OS)(e.x,t)}, ${(0,i.OS)(e.y,t)})`}},"../../babs/lib/common/math.js":function(e,t,n){"use strict";n.d(t,{M5:function(){return i},P4:function(){return r},Tm:function(){return u},je:function(){return c},jl:function(){return x},pI:function(){return a},wi:function(){return l}});var s=n("../../../node_modules/@babylonjs/core/index.js");const i=2*Math.PI,o=new s.Pa4;function r(e,t){return function(e){const t=e%i;return t>Math.PI?t-i:t<=-Math.PI?t+i:t}(e-t)}function a(e,t){const n=-Math.atan2(e.z,e.x)+Math.PI/2,s=Math.sqrt(e.x*e.x+e.z*e.z);return t.z=-Math.atan2(e.y,s),t.y=n,t.x=0,t}function c(e,t,n,i,r){s._fP.RotationYawPitchRollToRef(t.raw,n.raw,0,r.rotationQuaternion),o.copyFromFloats(0,0,-i.raw),o.rotateByQuaternionToRef(r.rotationQuaternion,r.position),r.position.addInPlaceFromFloats(e.x,e.y,e.z)}function u(e,t){return e.lengthSquared()n.ease(e)}},"../../babs/lib/common/membership.js":function(e,t,n){"use strict";n.d(t,{O5:function(){return r},V9:function(){return a},Vp:function(){return o},ai:function(){return c}});var s=n("../../common/lib/core.js"),i=n("../../common/lib/identity.js");class o{static addTo(e,...t){e._tags??(e._tags={});for(const n of t)e._tags[n.name]=!0;return e}constructor(e){this.name=e,(0,s.BF)(!0!==o.allTags[e],`The tag '${e}' already exists.`),o.allTags[e]=!0,(0,s.cM)("Tag",{name:e}),Object.freeze(this)}addTo(...e){e.forEach((e=>{e._tags??(e._tags={}),e._tags[this.name]=!0}))}removeFrom(...e){e.forEach((e=>{e._tags??(e._tags={}),delete e._tags[this.name]}))}in(e){return(e._tags&&this.name in e._tags)??!1}toString(){return this.name}}o.allTags={};class r{constructor(...e){this.tags=Object.freeze(e),this._tags=Object.freeze((0,i.I2)(e.map(((e,t)=>[e.name,1<e|(this._tags[t.name]??0)),0);const t=e._tags;return t?this.tags.reduce(((e,n,s)=>e|(n.name in t?1<(0,s.cW)(e)))}}function a(e){return`[${function(e){return(0,i.kJ)(e)?e.map((e=>e.name)):e._tags?Object.keys(e._tags):[]}(e).join(",")}]`}function c(e,...t){e._tags??(e._tags={});const n=e._tags;for(const e of t)e._tags=n}},"../../babs/lib/common/nodes.js":function(e,t,n){"use strict";n.d(t,{$U:function(){return c},G:function(){return x},Ky:function(){return r},Ol:function(){return d},go:function(){return l},pf:function(){return u}});var s=n("../../../node_modules/@babylonjs/core/index.js"),i=n("../../common/lib/containers.js"),o=n("../../common/lib/identity.js");function r(e,t){const n=new s.YOI(e,t);return n.freezeWorldMatrix(),n}function a(e,t,n,s){for(const i of e){n&&s(i)&&t(i);const e=i._children;e&&a(e,t,!0,s)}}function c(e,t,n){const s=n?.applyToRoot??!1,r=n?.type,c=n?.predicate;let u=()=>!0;r&&c?u=e=>(0,o.$O)(e,r)&&c(e):r?u=(0,o.V9)(r):c&&(u=c),a((0,i._2)(e),t,s,u)}function u(e,...t){return t.flatMap((t=>[...e(t)?[t]:[],...t.getDescendants(!1,e)]))}function l(e,...t){return u((0,o.V9)(e),...t)}function d(e,...t){return t.flatMap((t=>t.getDescendants(!0,e)))}function x(e,...t){return d((0,o.V9)(e),...t)}},"../../babs/lib/common/scopes.js":function(e,t,n){"use strict";n.d(t,{$9:function(){return E},fi:function(){return M},_z:function(){return S},oc:function(){return T},eG:function(){return C},f$:function(){return j},V2:function(){return l},jw:function(){return k}});var s=n("../../common/lib/core.js");class i{constructor(){this.callbacks=[]}add(e){this.callbacks.push(e)}runOnce(...e){return this.doRun(e,!1)}run(...e){return this.doRun(e,!0)}doRun(e,t){const n=this.callbacks;t||(this.callbacks=[]),(0,s.f_)(n,(t=>t(...e)))}}var o=n("../../common/lib/containers.js"),r=n("../../common/lib/iterators.js"),a=n("../../common/lib/units.js"),c=n("../../../node_modules/@babylonjs/core/index.js"),u=n("../../common/lib/identity.js");function l(e){const t=(0,u.$O)(e,c.xsS)?e:e.getScene();return t.babsScene??(t.babsScene={sceneScopes:new Set}),t.babsScene}" ".repeat(10);var d,x,f,h,_=function(e,t,n,s){if("a"===n&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?s:"a"===n?s.call(e):s?s.value:t.get(e)},b=function(e,t,n,s,i){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?i.call(e,n):i?i.value=n:t.set(e,n),n};const p=Symbol("This tag is for private use by the implementations in this file."),m=new Map;class g{get name(){return _(this,x,"f")?.startsWith(".")&&b(this,x,`${this.constructor.name}${_(this,x,"f")}`,"f"),_(this,x,"f")??this.constructor.name}typedName(){return void 0!==_(this,x,"f")?`${this.constructor.name}(${_(this,x,"f")})`:this.constructor.name}constructor(e){x.set(this,void 0),this[h]={},void 0!==e&&b(this,x,e,"f"),s.Pc||(this._debugName=this.name),this.name}acquire(e){const t=m.get(e);return t===this?(0,s.BF)(this[p].disposables?.has(e)??!1):(t?.doRemoveInternal(p,e),this.doAddInternal(p,e)),e}onDispose(e){var t;this[p].disposalState?e():((t=this[p]).callbacks??(t.callbacks=new i),this[p].callbacks.add(e))}forEach(e,t){this[p].disposables&&!this[p].disposalState&&(0,r.Ed)((0,r.NT)(this[p].disposables.values(),e),t)}get(e){if(!this[p].disposalState&&this[p].disposables)for(const t of this[p].disposables.values())if(e(t))return t}onUpdate(e,t){if("full"===this[p].disposalState||"disposed"===this[p].disposalState);else if(e){(0,s.BF)(!_(g,d,"f",f).has(this));const n=t?.pauseExempt??!1;_(g,d,"f",f).set(this,{cb:e,pauseExempt:n})}else _(g,d,"f",f).delete(this)}onNotify(e,t,n){if(this[p].disposalState)return null;const s="first"===(n?.insertPosition??"first"),i=e.add(t,n?.mask,s,n?.scope);return i&&this.onDispose((()=>{e.remove(i)})),i}onTimeout(e,t){var n;if(this[p].disposalState)return;const s=(n=this[p]).timeouts??(n.timeouts=[]);let i;i=setTimeout((()=>{(0,o.Od)(s,i),t()}),e.valueInUnits(a.HA)),this[p].timeouts.push(i)}disposeResources(){this.doDisposeInternal(p,"partial")}doAddInternal(e,t){var n;return this[p].disposalState?(t.dispose(),!1):((n=this[p]).disposables??(n.disposables=new Set),(0,s.BF)(!this[p].disposables.has(t),(()=>`Disposable is already managed by ${this.name}.`)),this[p].disposables.add(t),m.set(t,this),!0)}doRemoveInternal(e,t){this[p].disposalState||((0,s.BF)(this[p].disposables?.delete(t)??!1),(0,s.BF)(m.delete(t)))}doDisposeInternal(e,t){if(this[p].disposalState)"partial"!==t&&"partial"===this[p].disposalState&&(this[p].disposalState="full");else{if(this.name,s.Pc||(this._debugIsDisposed=!0),"full"===t){const e=this,t=m.get(e);(0,s.OR)(t,"Only hosted scopes can be fully disposed."),t.doRemoveInternal(p,e)}this[p].disposalState="partial"===t?"partial":"full",_(g,d,"f",f).delete(this),this[p].timeouts&&(this[p].timeouts.forEach((e=>clearTimeout(e))),delete this[p].timeouts),this[p].callbacks&&(this[p].callbacks.runOnce(),delete this[p].callbacks),this[p].disposables&&((0,s.f_)(this[p].disposables.values(),(e=>{e.dispose(),(0,s.BF)(m.delete(e))})),delete this[p].disposables),"full"===this[p].disposalState?(this[p].disposalState="disposed",Object.freeze(this)):delete this[p].disposalState,this.name}}static update(e,t=!1){_(g,d,"f",f).forEach((n=>!t||n.pauseExempt?n.cb(e):void 0))}}d=g,x=new WeakMap,h=p,f={value:new Map};var v,y,w=function(e,t,n,s){if("a"===n&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?s:"a"===n?s.call(e):s?s.value:t.get(e)};class j extends g{constructor(e,t){super(e),v.set(this,void 0),t?.registerSubsidiary(this)}forEachSubsidiary(e,t){w(this,v,"f")&&w(this,v,"f").forEach((n=>e(n)?t(n):void 0))}disposeResources(){w(this,v,"f")&&(0,s.f_)(w(this,v,"f"),(e=>e.disposeResources())),super.disposeResources()}registerSubsidiary(e){(function(e,t,n,s,i){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");"a"===s?i.call(e,n):i?i.value=n:t.set(e,n)})(this,v,w(this,v,"f")??[],"f"),w(this,v,"f").push(e)}}v=new WeakMap;class E extends j{static setScopeInititialized(e){(0,s.BF)(!E.isScopeInitialized.has(e)),E.isScopeInitialized.set(e,!0)}constructor(e,t){(0,s.BF)(!E.isScopeInitialized.has(e),"Registration of new Descriptors in this scope is closed."),super(t,e)}}E.isScopeInitialized=new Map;class S extends g{constructor(e,t){super(t),y.set(this,void 0),e.doAddInternal(p,this)}dispose(){return this.doDisposeInternal(p,"full"),"You must call super.dispose() when overriding Resource.dispose.\nPrefer to do cleanup using onDispose() instead."}}y=new WeakMap;class T{constructor(...e){this.roots=e,[this.initialStaticScopes,this.initialDisposables]=this.computeReachable()}computeDiff(){const[e,t]=this.computeReachable();return this.initialStaticScopes.forEach((t=>e.delete(t))),this.initialDisposables.forEach((e=>t.delete(e))),[e,t]}reportEntry(e,t,n){const i=`ResourceDiff(${this.roots.map((e=>e.scope.name)).join(", ")})`;(0,s.cM)(`${i} ${e} (${n.size} ${t})`,[...n],{density:n.size?"collapsed":"inline"})}report(){const[e,t]=this.computeDiff();e.size&&(this.reportEntry("static scopes","initial",this.initialStaticScopes),this.reportEntry("static scopes","unexpected",e)),t.size&&(this.reportEntry("disposables","initial",this.initialDisposables),this.reportEntry("disposables","undisposed",t))}computeReachable(){const e=new Set;for(const t of this.roots){e.add(t.scope);const n=(0,u.Bv)((()=>!0));t.scope.forEachSubsidiary(n,(t=>{e.add(t)}))}const t=new Set,n=[...e];for(const e of this.roots)e.scene&&l(e.scene).sceneScopes.forEach((e=>{(0,s.BF)(!t.has(e)),t.add(e),n.push(e)}));const i=(0,u.Bv)((()=>!0));for(;n.length;)n.pop()?.forEach(i,(e=>{(0,s.BF)(!t.has(e)),t.add(e),e instanceof g&&n.push(e)}));return[e,t]}}class O extends g{constructor(e,t){super(e),!0===t&&this.doDisposeInternal(p,"host")}}function P(e){s.Pc||(0,s.BF)(l(e).sceneScopes.delete(this)),this.doDisposeInternal(p,"host")}function k(e,t){const n=function(e){return e.babsHost??(e.babsHost={}),e.babsHost}(e);if(n.sceneScope)return n.sceneScope;const i=function(e){return"boolean"==typeof e.isDisposed?e.isDisposed:e.isDisposed()}(e);t??(t=(0,u.$O)(e,c.NBX)?e.name:void 0);const o=n.sceneScope=new O(t,i);return i||(s.Pc||l(e).sceneScopes.add(o),e.onDisposeObservable.add(P,void 0,void 0,o,!0)),o}class C extends S{static get(e,t,n){let s=e.get((0,u.V9)(C,(e=>(0,u.fS)(e.context,t,!0))));return s??(s=new C(e,t,n)),s.value}constructor(e,t,n){super(e),this.context=t,this.value=this.acquire(n(this))}}const M=new j("global")},"../../babs/lib/common/types.js":function(e,t,n){"use strict";n.d(t,{g:function(){return i},v:function(){return o}});var s=n("../../../node_modules/@babylonjs/core/index.js");function i(e){return new s.Pa4(e.x,e.y,e.z)}function o(){[s.Wot.BlackReadOnly,s.y3G.IdentityReadOnly,s.Pa4.LeftHandedForwardReadOnly,s.Pa4.LeftReadOnly,s.Pa4.RightHandedForwardReadOnly,s.Pa4.RightReadOnly,s.Pa4.UpReadOnly,s.Pa4.ZeroReadOnly,s.RDh.X,s.RDh.Y,s.RDh.Z].forEach(Object.freeze)}},"../../babs/lib/common/units.js":function(e,t,n){"use strict";n.d(t,{f:function(){return r},w:function(){return o}});var s=n("../../../node_modules/@babylonjs/core/index.js"),i=n("../../common/lib/units.js");class o{static of(e,t){t??(t=i.J4);const n=i.Ru.from(t,e.x??0),s=i.Ru.from(t,e.y??0),r=i.Ru.from(t,e.z??0);return new o(n,s,r)}constructor(e,t,n){this.x=e,this.y=t,this.z=n}scale(e){return o.of({x:this.x.scale(e.x??e.factor??1),y:this.y.scale(e.y??e.factor??1),z:this.z.scale(e.z??e.factor??1)})}plus(e){return o.of({x:this.x.add(e.x),y:this.y.add(e.y),z:this.z.add(e.z)})}value(){return new s.Pa4(this.x.raw,this.y.raw,this.z.raw)}toString(){return`(${this.x.toString()}, ${this.y.toString()}, ${this.z.toString()})`}}o.zero=o.of({},i.J4);class r{static of(e,t){t??(t=i.J4);const n=i.Ru.from(t,e.x??1),s=i.Ru.from(t,e.y??1),o=i.Ru.from(t,e.z??1);return new r(n,s,o)}constructor(e,t,n){this.x=e,this.y=t,this.z=n}scale(e){return r.of({x:this.x.scale(e.x??e.factor??1),y:this.y.scale(e.y??e.factor??1),z:this.z.scale(e.z??e.factor??1)})}scaledOffset(e){return o.of({x:this.x.scale(e.x??e.factor??1),y:this.y.scale(e.y??e.factor??1),z:this.z.scale(e.z??e.factor??1)})}value(){return new s.Pa4(this.x.raw,this.y.raw,this.z.raw)}toString(){return`[${this.x.toString()}x${this.y.toString()}x${this.z.toString()}]`}}r.one=r.of({},i.J4)},"../../babs/lib/common/values.js":function(e,t,n){"use strict";n.d(t,{aC:function(){return T},_Y:function(){return O},Wx:function(){return P},ZD:function(){return C},_w:function(){return E}});var s=n("../../common/lib/core.js"),i=n("../../common/lib/units.js"),o=n("../../../node_modules/@babylonjs/core/index.js"),r=n("../../common/lib/identity.js"),a=n("../../babs/lib/common/scopes.js"),c=n("../../common/lib/iterators.js");class u extends s.sH{}function l(...e){return e.join("/")}class d{constructor(e,t){this.bucket_=e,this.prefix_=void 0!==t?t+"/":""}folder(...e){return new d(this.bucket_,this.prefix_+l(...e))}list(){const e=(0,c.NT)(this.bucket_.list(),(e=>e.startsWith(this.prefix_))),t=(0,c.lT)(e,(e=>e.slice(this.prefix_.length)));return(0,c.NT)(t,(e=>!e.includes("/")))}get(e,t){const n=this.bucket_.get(this.prefix_+e);if(void 0!==n){const e=JSON.parse(n);if(t){if(t(e))return e}else if("string"==typeof e)return e}}set(e,t){return this.bucket_.set(this.prefix_+e,JSON.stringify(t))}delete(e){return this.bucket_.delete(this.prefix_+e)}clear(){(0,c.Ed)(this.list(),(e=>this.delete(e)))}}class x{constructor(e){this.store_=e}list(){const e=(0,c.Hb)(this.store_.length),t=(0,c.lT)(e,(e=>this.store_.key(e)));return(0,c.NT)(t,r.EN)}get(e){return this.store_.getItem(e)??void 0}set(e,t){this.store_.setItem(e,t)}delete(e){this.store_.removeItem(e)}clear(){this.store_.clear()}}class f{constructor(){this.values_=new Map}list(){return this.values_.keys()}get(e){return this.values_.get(e)}set(e,t){this.values_.set(e,t)}delete(e){this.values_.delete(e)}clear(){this.values_.clear()}}function h(e){let t;try{t=window[e];const n="__storage_test__";return t.setItem(n,n),t.removeItem(n),!0}catch(e){return e instanceof DOMException&&"QuotaExceededError"===e.name&&void 0!==t&&0!==t.length}}const _=["localStorage","sessionStorage","memory"];let b;class p extends a._z{static get(e,t){return e.get(function(e){return t=>(0,r.$O)(t,p)&&t.path===e}(t))??new p(e,t)}constructor(e,t){const n=l(e.name,t);super(e,n),this.path=t,this.store=new d(function(e,t=!0){for(let n=(0,s.UL)(_.indexOf(e),-1);n<_.length;++n){if("memory"===e)return b??(b=new f),b;if(h(e))return new x(window[e]);if(!t)throw new u(`Storage medium ${e} is not available.`)}throw new u("No storage medium is available")}("localStorage"),n)}}var m,g,v,y=function(e,t,n,s){if("a"===n&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?s:"a"===n?s.call(e):s?s.value:t.get(e)},w=function(e,t,n,s,i){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?i.call(e,n):i?i.value=n:t.set(e,n),n};class j{get value(){return y(this,m,"f")}set value(e){(0,r.$K)(e)&&(e=y(this,v,"f").call(this,e)??y(this,m,"f")),e!==y(this,m,"f")&&(this.valueScopes_?.forEach((e=>e.dispose())),delete this.valueScopes_,w(this,m,e,"f"),y(this,g,"f").notifyObservers(e))}valueScope_(e){const t=new a._z(e,`${this.name}=${String(this.value)}`);return this.valueScopes_??(this.valueScopes_=[]),this.valueScopes_.push(t),t}constructor(e,t,n){if(this.flagScope_=e,this.name=t,m.set(this,void 0),g.set(this,new o.y$z),v.set(this,void 0),w(this,v,n.validate??r.yR,"f"),(0,r.$K)(n.defaultValue)?w(this,m,(0,s.jK)(y(this,v,"f").call(this,n.defaultValue),(()=>`Variable "${t}" has defaultValue ${String(n.defaultValue)} which does not pass validation.`)),"f"):w(this,m,n.defaultValue,"f"),n.persist){const s=n.persist,i=p.get(e,"flags"),o=i.store.get(t,s.guard),a=void 0!==o?s.deserialize(o):void 0,c=(0,r.$K)(a)?y(this,v,"f").call(this,a):void 0;void 0!==c&&w(this,m,c,"f"),this.onChanged(e,(e=>{const n=(0,r.$K)(e.current)?s.serialize(e.current):void 0;void 0===n?i.store.delete(t):i.store.set(t,n)}))}}onChanged(e,t,n){let s;const i=this,o=n?.predicate;s=o?n=>o(n)?t({current:n,get scope(){return i.valueScope_(e)}}):void 0:n=>t({current:n,get scope(){return i.valueScope_(e)}});const r=e.onNotify(y(this,g,"f"),s);r&&n?.immediate&&y(this,g,"f").notifyObserver(r,y(this,m,"f"))}}m=new WeakMap,g=new WeakMap,v=new WeakMap;class E extends j{}class S extends j{constructor(e,t,n){super(e,t,{defaultValue:void 0,...n})}}class T extends E{constructor(e,t,n,i){const o={defaultValue:i?.defaultValue??n.build(0)};i?.persist&&(o.persist={guard:n.guard,serialize:e=>n.serialize(e.value),deserialize:e=>{const t=n.deserialize(e);return void 0!==t?n.build(t):void 0}});const{minimum:r,maximum:a}=i??{};r&&a&&(0,s.BF)(r.isLessThan(a),`minimum (${String(r)}) must be less than or equal to maximum (${String(a)})`),o.validate=e=>r&&e.isLessThan(r)?r.inUnits(n.units):a&&a.isLessThan(e)?a.inUnits(n.units):e.inUnits(n.units),super(e,t,o)}increment(e){e??(e=new i.Ru(this.value.units,1)),this.value=this.value.add(e)}decrement(e){e??(e=new i.Ru(this.value.units,1)),this.value=this.value.subtract(e)}scale(e){this.value=this.value.scale(e)}}class O extends S{constructor(e,t,n){const s={defaultValue:n.defaultValue,validate:n.validate};n.persist&&(s.persist={guard:r.HD,serialize:r.yR,deserialize:r.yR}),super(e,t,s)}}class P extends E{constructor(e,t,n){const s=n.range,i={defaultValue:n.defaultValue??s[0]};n.persist&&(i.persist={guard:r.HD,serialize:e=>e,deserialize:e=>s.includes(e)?e:void 0}),super(e,t,i),this.range=s}next(){const e=(0,s.UL)(this.range.indexOf(this.value),-1);this.value=this.range[(e+1)%this.range.length]}previous(){const e=(0,s.UL)(this.range.indexOf(this.value),-1);this.value=this.range[(e+this.range.length-1)%this.range.length]}}const k=e=>e;class C extends E{constructor(e,t,n){const s={defaultValue:n?.defaultEnabled??!1,validate:n?.validate};n?.persist&&(s.persist={guard:r.jn,serialize:r.yR,deserialize:r.yR}),super(e,t,s)}toggle(){this.value=!this.value}onEnabled(e,t,n){this.onChanged(e,t,{predicate:k,immediate:n})}}},"../../babs/lib/game/game_engine.js":function(e,t,n){"use strict";n.d(t,{sm:function(){return Y},TO:function(){return X},XT:function(){return ie},dA:function(){return oe}});var s=n("../../../node_modules/@babylonjs/core/index.js"),i=n("../../common/lib/core.js"),o=n("../../common/lib/disposable.js"),r=n("../../common/lib/identity.js"),a=n("../../common/lib/math.js"),c=n("../../common/lib/units.js"),u=n("../../babs/lib/common/asset_manager.js"),l=n("../../babs/lib/common/color.js"),d=n("../../babs/lib/common/debug_flags.js"),x=n("../../babs/lib/common/logging.js"),f=n("../../babs/lib/common/membership.js"),h=n("../../babs/lib/common/scopes.js"),_=n("../../babs/lib/common/types.js"),b=n("../../babs/lib/common/values.js"),p=n("../../babs/lib/gui/debug.js"),m=n("../../babs/lib/gui/display.js"),g=n("../../babs/lib/input/toggle_input.js"),v=n("../../babs/lib/render/cameras.js"),y=n("../../babs/lib/render/constants.js"),w=n("../../babs/lib/render/meshes.js"),j=n("../../../node_modules/@babylonjs/core/Cameras/camera.js"),E=n("../../babs/lib/common/math.js"),S=n("../../babs/lib/gui/gui.js"),T=n("../../babs/lib/input/gauge_input.js"),O=n("../../babs/lib/input/input.js"),P=n("../../babs/lib/input/mouse.js"),k=n("../../babs/lib/input/pointer_lock.js"),C=n("../../babs/lib/render/image_asset.js");const M=new s.y$z,A=(0,g.Qw)(h.fi,"_FreeLookLeft",["A","ArrowLeft"],{enable:M,priority:O.KE.Framework}),I=(0,g.Qw)(h.fi,"_FreeLookRight",["D","ArrowRight"],{enable:M,priority:O.KE.Framework}),$=(0,g.Qw)(h.fi,"_FreeLookUp",["W","ArrowUp"],{enable:M,priority:O.KE.Framework}),R=(0,g.Qw)(h.fi,"_FreeLookDown",["S","ArrowDown"],{enable:M,priority:O.KE.Framework}),N=(0,c.TT)(20),D=(0,g.Qw)(h.fi,"_FreeLookClick","M.Primary",{enable:M,priority:O.KE.Framework}),L=T.EL.register(h.fi,"_FreeLookMouse","M.Relative.XY",{priority:O.KE.Framework}),F=T.EL.register(h.fi,"_FreeZoomMouse","M.Wheel.Y",{priority:O.KE.Framework}),z=new b.aC(h.fi,"mouse zoom sensitivity",c.Ru.of(c.J4.per(S.$2)),{defaultValue:(0,c.J4)(.1).per((0,S.$2)(1)),minimum:(0,c.J4)(.01).per((0,S.$2)(1)),maximum:(0,c.J4)(1).per((0,S.$2)(1)),persist:!1}),B=new b.aC(h.fi,"mouse ortho zoom sensitivity",c.Ru.of(c.J4.per(S.$2)),{defaultValue:(0,c.J4)(.005).per((0,S.$2)(1)),minimum:(0,c.J4)(.001).per((0,S.$2)(1)),maximum:(0,c.J4)(.01).per((0,S.$2)(1)),persist:!1}),V=new C.s(h.fi,"Reticle","ld51/textures/Crosshairs_Alpha.png");var G,H,K,W,U,q=function(e,t,n,s){if("a"===n&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?s:"a"===n?s.call(e):s?s.value:t.get(e)},Q=function(e,t,n,s,i){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?i.call(e,n):i?i.value=n:t.set(e,n),n};const Z=[y.K2],J=new b.Wx(h.fi,"FovMode",{range:["expand","crop","horizontal","vertical"],defaultValue:"expand",persist:!0});g.sM.register(h.fi,"next FovMode","Alt+KeyV",{valued:J}).onCycle(h.fi,(()=>J.next()));const X=new b._w(h.fi,"CanvasAR",{defaultValue:void 0}),Y=new b._w(h.fi,"CameraAR",{defaultValue:void 0}),ee=new b.Wx(h.fi,"CameraARMode",{range:["default","16:9","4:3","640x512"],defaultValue:"default",persist:!0});g.sM.register(h.fi,"next CameraARMode","Alt+KeyB",{valued:ee}).onCycle(h.fi,(()=>ee.next()));const te=(0,g.Qw)(h.fi,"Reset scene","Alt+Backspace");function ne(e,t){for(const n of e)t?void 0===n.unpausedUpdateSpeed&&(n.unpausedUpdateSpeed=n.updateSpeed,n.updateSpeed=0):void 0!==n.unpausedUpdateSpeed&&(n.updateSpeed=n.unpausedUpdateSpeed,delete n.unpausedUpdateSpeed)}function se(e,t){e.physicsEnabled=!t,ne(e.particleSystems,t)}const ie=new b._Y(h.fi,"CurrentApp",{defaultValue:void 0,persist:!0});class oe{constructor(e,t,n){this.params=e,this.loadScope=t,this.defaultApp=n,G.set(this,void 0),H.set(this,[]),K.set(this,!1),W.set(this,void 0),U.set(this,[]),(0,x.Q)(),(0,_.v)(),(0,i.cM)("GameEngine",{params:e,debug:d.cG,paused:oe.Paused.value},{density:"collapsed"}),this.engine=new s.D4V(this.params.canvas,!1,{adaptToDeviceRatio:!0,stencil:!0})}async loadApp(e){if(q(this,K,"f"))return re(),console.log(`Deferring load of ${e}`,"53cd685d_0"),void Q(this,W,e,"f");Q(this,K,!0,"f"),window.history.pushState(void 0,document.title,e===this.defaultApp?window.location.pathname+window.location.search:`#${e}`);const t=await this.loadScope(e);await this.addScope(t),Q(this,K,!1,"f"),void 0!==q(this,W,"f")&&(e=q(this,W,"f"),Q(this,W,void 0,"f"),setTimeout((()=>{re(),console.log(`Resuming load of ${e}`,"53cd685d_1"),this.loadApp(e)})))}async start(){i.Pc||(document.title=` ${document.title} `,document.body.style.backgroundColor="#252526"),window.addEventListener("resize",(()=>{this.maxWidth=this.maxHeight=void 0,this.updateFoV()})),J.onChanged(h.fi,(()=>this.updateFoV())),X.onChanged(h.fi,(()=>this.updateFoV())),Y.onChanged(h.fi,(()=>this.updateFoV())),ee.onChanged(h.fi,(()=>this.updateFoV())),window.addEventListener("deviceorientation",(()=>this.updateOrientation(window.screen.orientation))),this.updateOrientation(window.screen.orientation),oe.Paused.onChanged(h.fi,(({current:e})=>{re(),console.log(e?"Paused.":"Resumed.","53cd685d_2"),q(this,H,"f").forEach((t=>se(t.scene,e)))})),te.onEnabled(h.fi,(()=>{ie.value=void 0,this.loadApp(this.defaultApp)})),d.Mz.freeLook.onChanged(h.fi,(({current:e,scope:t})=>{if(e){const e=q(this,H,"f").at(-1)??q(this,G,"f");if(!e)return void console.warn("No active scope");!function(e,t,n){const o=(0,v.Q4)(t);if(!o)return void console.warn("No active camera");M.notifyObservers(e);const r=e.acquire(new v.vM("FreeLook",o.position,t));r.rotationQuaternion=o.absoluteRotation.clone(),r.mode=o.mode,r.mode===j.V.ORTHOGRAPHIC_CAMERA?(r.orthoTop=o.orthoTop,r.orthoLeft=o.orthoLeft,r.orthoRight=o.orthoRight,r.orthoBottom=o.orthoBottom):(r.fov=o.fov,r.fovMode=o.fovMode),t.activeCamera=r,e.onDispose((()=>{o.isDisposed()||(t.activeCamera=o)}));let a="free";const u=r.rotation.clone(),l=s.Pa4.Zero();let d=(0,c.J4)(0);k._B.onChanged(e,(({current:e,scope:o})=>{if(!e)return void D.onEnabled(o,(()=>(0,k.a5)(t.getEngine())));const x=m.$.of(n,V.share(),{scope:o,acquireRoot:!1});x.root.widthInPixels=x.root.heightInPixels=50,L.onValue(o,(e=>{const t=e.dot(P.Wz.value);u.addInPlaceFromFloats(t.rawAt(1),t.rawAt(0),0),"free"===a?r.rotation=u:(0,E.je)(l,(0,c.wI)(u.y),(0,c.wI)(u.x),d,r)})),F.onValue(o,(e=>{if(r.mode===j.V.ORTHOGRAPHIC_CAMERA){const t=e.dot(B.value);r.orthoTop=(0,i.jK)(r.orthoTop)+t.raw,r.orthoLeft=(0,i.jK)(r.orthoLeft)-t.raw,r.orthoRight=(0,i.jK)(r.orthoRight)+t.raw,r.orthoBottom=(0,i.jK)(r.orthoBottom)-t.raw}else{const t=e.dot(z.value),n=new s.Pa4(0,0,-t.raw);n.rotateByQuaternionToRef(r.rotationQuaternion,n),"free"===a?r.position.addInPlace(n):(l.addInPlace(n),(0,E.je)(l,(0,c.wI)(u.y),(0,c.wI)(u.x),t,r))}})),new h._z(o).onUpdate((e=>{const t=s.Pa4.Zero();A.value&&(t.x-=1),I.value&&(t.x+=1),$.value&&("free"===a?t.z+=1:t.y+=1),R.value&&("free"===a?t.z-=1:t.y-=1),t.scaleInPlace(N.dot(e).raw),t.rotateByQuaternionToRef(r.rotationQuaternion,t),"free"===a?r.position.addInPlace(t):(l.addInPlace(t),(0,E.je)(l,(0,c.wI)(u.y),(0,c.wI)(u.x),d,r))}),{pauseExempt:!0}),D.onChanged(o,(({current:e})=>{if(e){const e=t.pickWithRay(r.getForwardRay(r.maxZ),(e=>e.isEnabled()&&e.isVisible&&e.isPickable&&e.visibility>0));e?.pickedPoint&&(a="orbit",l.copyFrom(e.pickedPoint),d=(0,c.J4)(s.Pa4.Distance(l,r.position)))}else"orbit"===a&&(a="free")}))}),{immediate:!0})}(t,e.scene,e.display)}oe.Paused.value=e}));const{scene:e}=await this.initializeGlobalScope();this.engine.runRenderLoop((()=>{const t=oe.Paused.value,n=(0,c.HA)(this.engine.getDeltaTime());h._z.update(n,t),q(this,U,"f").splice(0).forEach((e=>e()));let s=0;for(let e=0;e0;if(this.clearScopes(),t){const e=o.v.snapshot();e.length&&(0,i.cM)(`Tracked(${o.v.label}) (${e.length} undisposed objects)`,e,{density:e.length?"collapsed":"inline"})}o.v.startTracking(`${e.scope.name}`)}const n=new s.xsS(this.engine);oe.Paused.value&&se(n,!0);const a=(0,r.pN)(n.particleSystems,"push",{onCall:e=>(ne(e,oe.Paused.value),e),onReturn:r.yR});n.onDisposeObservable.addOnce(a),n.onNewMeshAddedObservable.add((e=>{e.isAnInstance||(e.renderingGroupId=y.Yt.meshDefault,(0,w.yD)(e),f.Vp.addTo(e,...Z),(0,y.gt)(e))})),n.onNewCameraAddedObservable.add((e=>{f.Vp.addTo(e,...(0,y.SZ)());const t=e.getScene().activeCamera;t&&t!==e||this.onNextLoop((()=>this.updateFoV())),this.onNextLoop((()=>{(0,y.sQ)(e),(0,i.cM)("camera",{name:e.name,position:e.position,fov:(0,c.wI)(e.fov).inUnits(c.P1),fovMode:e.fovMode,aspectRatio:this.getCanvasAR()*(e.viewport.width/e.viewport.height),layerMask:(0,i.cW)(e.layerMask)})}))}));const u={scope:e.scope,scene:n,display:new m.s(n)};i.Pc||(u.diff=new h.oc(u)),(0,p.Lh)(u.display,n),p.iu.create(n,u.display),await this.processScope(e.scope,n,u.display);const l={scope:e.scope,scene:n,display:u.display,gameEngine:this,urlBase:this.params.urlBase};return await e.createScene(l),await new Promise((e=>setTimeout(e))),t&&this.clearScopes(),q(this,H,"f").push(u),this.updateFoV(),n}clearScopes(){const e=[...q(this,H,"f")];q(this,H,"f").length=0,e.forEach((e=>{e.scene.dispose(),e.scope.disposeResources(),i.Pc||(q(this,G,"f")?.diff?.report(),e.diff?.report())}))}getCanvasAR(){return this.engine.getRenderWidth()/this.engine.getRenderHeight()}get isMobile(){return this.params.isMobile}updateFoV(){let e=!1;void 0!==this.maxWidth&&void 0!==this.maxHeight||(this.engine.resize(),e=!0,this.maxWidth=this.engine.getRenderWidth(),this.maxHeight=this.engine.getRenderHeight());let t,n,o=this.getCanvasAR();switch(void 0===X.value?e=this.engine.setSize(this.maxWidth,this.maxHeight):(0,i.EQ)("There are serious problems currently with changing CanvasAR."),e&&(o=this.getCanvasAR(),(0,i.cM)("updateFoV - canvas resize",{width:`${this.engine.getRenderWidth()} [${this.maxWidth}]`,height:`${this.engine.getRenderHeight()} [${this.maxHeight}]`,aspectRatio:o})),ee.value){case"default":t=Y.value??o;break;case"16:9":t=16/9;break;case"4:3":t=4/3;break;case"640x512":t=1.25}switch(J.value){case"expand":n=t<1?s.V1s.FOVMODE_HORIZONTAL_FIXED:s.V1s.FOVMODE_VERTICAL_FIXED;break;case"crop":n=t<1?s.V1s.FOVMODE_VERTICAL_FIXED:s.V1s.FOVMODE_HORIZONTAL_FIXED;break;case"horizontal":n=s.V1s.FOVMODE_HORIZONTAL_FIXED;break;case"vertical":n=s.V1s.FOVMODE_VERTICAL_FIXED}for(let e=0;e{var _0xf9585f=_0x1d95d2;if(_0x4f55a2&&typeof _0x4f55a2==_0xf9585f(0x13a)||typeof _0x4f55a2==_0xf9585f(0xdb)){for(let _0x13a2d9 of ie(_0x4f55a2))!se[_0xf9585f(0x118)](_0x4fe6f1,_0x13a2d9)&&_0x13a2d9!==_0x441e87&&Y(_0x4fe6f1,_0x13a2d9,{'get':()=>_0x4f55a2[_0x13a2d9],'enumerable':!(_0x3a321f=ne(_0x4f55a2,_0x13a2d9))||_0x3a321f[_0xf9585f(0x8d)]});}return _0x4fe6f1;},Q=(_0x17300c,_0x113dba,_0x5e7a2c)=>(_0x5e7a2c=_0x17300c!=null?re(ae(_0x17300c)):{},oe(_0x113dba||!_0x17300c||!_0x17300c['__es'+'Module']?Y(_0x5e7a2c,_0x1d95d2(0x77),{'value':_0x17300c,'enumerable':!0x0}):_0x5e7a2c,_0x17300c)),$=class{constructor(_0x55bb4a,_0x5f450b,_0x11ce98,_0xe8cf43){var _0x554b81=_0x1d95d2;this[_0x554b81(0x79)]=_0x55bb4a,this[_0x554b81(0xc0)]=_0x5f450b,this['port']=_0x11ce98,this[_0x554b81(0x11e)]=_0xe8cf43,this[_0x554b81(0xf5)]=!0x0,this[_0x554b81(0xb3)]=!0x0,this[_0x554b81(0xfd)]=!0x1,this[_0x554b81(0x8e)]=!0x1,this[_0x554b81(0xe8)]=!!this[_0x554b81(0x79)][_0x554b81(0xb8)],this[_0x554b81(0xd8)]=null,this['_sendErrorMessage']=this[_0x554b81(0xe8)]?'failed\\x20to\\x20send\\x20logs,\\x20refreshing\\x20the\\x20page\\x20may\\x20help':_0x554b81(0x12c);}async[_0x1d95d2(0xdd)](){var _0x5201ce=_0x1d95d2;if(this[_0x5201ce(0xd8)])return this[_0x5201ce(0xd8)];let _0x2ea5b3;if(this['_inBrowser'])_0x2ea5b3=this[_0x5201ce(0x79)][_0x5201ce(0xb8)];else try{_0x2ea5b3=require(require(_0x5201ce(0x89))[_0x5201ce(0x70)](this['nodeModules'],'ws'));}catch{try{let _0x101acf=await import(_0x5201ce(0x89));_0x2ea5b3=(await import((await import(_0x5201ce(0x8f)))[_0x5201ce(0x80)](_0x101acf[_0x5201ce(0x70)](this[_0x5201ce(0x11e)],_0x5201ce(0x120)))[_0x5201ce(0xc2)]()))[_0x5201ce(0x77)];}catch{throw new Error(_0x5201ce(0x117));}}return this[_0x5201ce(0xd8)]=_0x2ea5b3,_0x2ea5b3;}[_0x1d95d2(0xc9)](){var _0x2a6063=_0x1d95d2;this['_connecting']||this[_0x2a6063(0xfd)]||(this[_0x2a6063(0xb3)]=!0x1,this[_0x2a6063(0x8e)]=!0x0,this[_0x2a6063(0xf2)]=new Promise((_0x20325b,_0x2d20d3)=>{var _0x59f46c=_0x2a6063;this[_0x59f46c(0xdd)]()[_0x59f46c(0x7d)](_0x39c02f=>{var _0x4a609d=_0x59f46c;let _0x414c31=new _0x39c02f(_0x4a609d(0xdc)+this[_0x4a609d(0xc0)]+':'+this[_0x4a609d(0xde)]);_0x414c31['onerror']=()=>{var _0x29c538=_0x4a609d;this[_0x29c538(0xfd)]=!0x1,this[_0x29c538(0x8e)]=!0x1,this[_0x29c538(0xf5)]=!0x1,this[_0x29c538(0x115)](),_0x2d20d3(new Error('logger\\x20websocket\\x20error'));},_0x414c31[_0x4a609d(0xa1)]=()=>{var _0x1b5cae=_0x4a609d;this['_inBrowser']||_0x414c31[_0x1b5cae(0x6f)]&&_0x414c31[_0x1b5cae(0x6f)][_0x1b5cae(0xc8)]&&_0x414c31[_0x1b5cae(0x6f)][_0x1b5cae(0xc8)](),_0x20325b(_0x414c31);},_0x414c31['onclose']=()=>{var _0x3997be=_0x4a609d;this[_0x3997be(0xfd)]=!0x1,this[_0x3997be(0x8e)]=!0x1,this[_0x3997be(0xb3)]=!0x0,this['_attemptToReconnect']();},_0x414c31[_0x4a609d(0x134)]=_0x3c00ca=>{var _0x420542=_0x4a609d;try{_0x3c00ca&&_0x3c00ca[_0x420542(0x102)]&&this[_0x420542(0xe8)]&&JSON['parse'](_0x3c00ca[_0x420542(0x102)])['method']===_0x420542(0xa6)&&this[_0x420542(0x79)][_0x420542(0x97)][_0x420542(0xa6)]();}catch{}};})[_0x59f46c(0x7d)](_0x4e5220=>(this[_0x59f46c(0xfd)]=!0x0,this[_0x59f46c(0x8e)]=!0x1,this[_0x59f46c(0xb3)]=!0x1,this['_allowedToSend']=!0x0,_0x4e5220))[_0x59f46c(0x76)](_0x4ff812=>(this[_0x59f46c(0xfd)]=!0x1,this[_0x59f46c(0x8e)]=!0x1,_0x2d20d3(new Error(_0x59f46c(0xce)+_0x4ff812&&_0x4ff812[_0x59f46c(0x131)]))));}));}[_0x1d95d2(0x115)](){var _0x891e06=_0x1d95d2;clearTimeout(this[_0x891e06(0x7b)]),this[_0x891e06(0x7b)]=setTimeout(()=>{var _0x25c834=_0x891e06;this[_0x25c834(0xfd)]||this['_connecting']||(this[_0x25c834(0xc9)](),this[_0x25c834(0xf2)]?.[_0x25c834(0x76)](()=>this[_0x25c834(0x115)]()));},0x1f4);}async[_0x1d95d2(0x103)](_0x4ded4c){var _0x479484=_0x1d95d2;try{if(!this['_allowedToSend'])return;this[_0x479484(0xb3)]&&this['_connectToHost'](),(await this[_0x479484(0xf2)])[_0x479484(0x103)](JSON[_0x479484(0xd5)](_0x4ded4c));}catch(_0x5a7aa1){console[_0x479484(0xb5)](this[_0x479484(0x133)]+':\\x20'+_0x5a7aa1&&_0x5a7aa1[_0x479484(0x131)]),this[_0x479484(0xf5)]=!0x1,this['_attemptToReconnect']();}}};function _0x3a9e(){var _0x5254a9=['cappedElements','_sendErrorMessage','onmessage','_regExpToString','nan','strLength','hostname','_undefined','object','push','now','10248FUKdXH','_quotedRegExp','...','getOwnPropertyNames','RegExp','_socket','join','_HTMLAllCollection','index','number','_setNodeId','_dateToString','catch','default','isArray','global','_Symbol','_reconnectTimeout','sortProps','then','funcName','replace','pathToFileURL','positiveInfinity','autoExpandPreviousObjects','string','_hasMapOnItsPath','Error','_sortProps','reduceLimits','defineProperty','path','rootExpression','_capIfString','toLowerCase','enumerable','_connecting','url','Boolean','String','isExpressionToEvaluate','forEach','_p_name','_setNodeExpressionPath','valueOf','location','argumentResolutionError','Map','level','_setNodePermissions','serialize','_consoleNinjaAllowedToStart','disabledLog','substr','_console_ninja_session','onopen','_treeNodePropertiesBeforeFullValue','25xxedWx','_replacedLog','_isNegativeZero','reload','date','_addProperty','_p_','split','value','versions','length','logger\\x20failed\\x20to\\x20connect\\x20to\\x20host','_isArray','_p_length','_setNodeQueryPath','_hasSetOnItsPath','_allowedToConnectOnSend','process','warn','count','test','WebSocket','allStrLength','_additionalMetadata','_propertyName','elements','_isSet','parent','props','host','[object\\x20Date]','toString','null','_hasSymbolPropertyOnItsPath','_objectToString','noFunctions','51159','unref','_connectToHost','unknown','totalStrLength','autoExpandLimit','_isUndefined','failed\\x20to\\x20connect\\x20to\\x20host:\\x20','getOwnPropertySymbols','116gvEisa','includes','45Thewqf','Set','_keyStrRegExp','stringify','getOwnPropertyDescriptor','array','_WebSocketClass','capped','Symbol','function','ws://','getWebSocketClass','port','setter','webpack','163786WOfxfN','node','slice','_isMap','143VZjGbw','expressionsToEvaluate','boolean','_inBrowser','Buffer','match','undefined','_getOwnPropertySymbols','error','\\x20server','perf_hooks','_type','time','_ws','symbol','negativeZero','_allowedToSend','27368BxNche','Number','_addFunctionsNode','type','autoExpandMaxDepth','_addLoadNode','_addObjectProperty','_connected','HTMLAllCollection','depth','cappedProps','_numberRegExp','data','send','_treeNodePropertiesAfterFullValue','hits','constructor','_setNodeLabel','concat','autoExpand','unshift','_isPrimitiveType','getter','autoExpandPropertyCount','NEGATIVE_INFINITY','24VROYqg','51010bCAscD','name','prototype','142549KUfNKc','performance','_attemptToReconnect','remix','failed\\x20to\\x20find\\x20WebSocket','call','POSITIVE_INFINITY','create','indexOf','_setNodeExpandableState','_processTreeNodeResult','nodeModules','current','ws/index.js','resolveGetters','660plKfIt','57836tXvrpI','root_exp','1.0.0','_isPrimitiveWrapperType','389748HFdCeS','pop','_cleanNode','console','next.js','failed\\x20to\\x20send\\x20logs,\\x20restarting\\x20the\\x20process\\x20may\\x20help','_blacklistedProperty','_getOwnPropertyDescriptor','_property','log','message'];_0x3a9e=function(){return _0x5254a9;};return _0x3a9e();}function b(_0x5736bd,_0x43d077,_0x456d64,_0x4fe065,_0x5a4695){var _0x16ce10=_0x1d95d2;let _0x256db8=_0x456d64[_0x16ce10(0xaa)](',')['map'](_0x32b033=>{var _0x40e4b2=_0x16ce10;try{_0x5736bd[_0x40e4b2(0xa0)]||((_0x5a4695===_0x40e4b2(0x12b)||_0x5a4695===_0x40e4b2(0x116))&&(_0x5a4695+=_0x5736bd[_0x40e4b2(0xb4)]?.[_0x40e4b2(0xac)]?.[_0x40e4b2(0xe2)]?_0x40e4b2(0xee):'\\x20browser'),_0x5736bd[_0x40e4b2(0xa0)]={'id':+new Date(),'tool':_0x5a4695});let _0x262cf3=new $(_0x5736bd,_0x43d077,_0x32b033,_0x4fe065);return _0x262cf3[_0x40e4b2(0x103)]['bind'](_0x262cf3);}catch(_0x45a829){return console[_0x40e4b2(0xb5)](_0x40e4b2(0xae),_0x45a829&&_0x45a829[_0x40e4b2(0x131)]),()=>{};}});return _0x4bf58f=>_0x256db8['forEach'](_0x56cbef=>_0x56cbef(_0x4bf58f));}function Z(_0xdc6629,_0x47500c,_0x2e2e26){var _0x52de1a=_0x1d95d2;if(_0xdc6629[_0x52de1a(0x9d)]!==void 0x0)return _0xdc6629[_0x52de1a(0x9d)];let _0xe48b80=_0xdc6629[_0x52de1a(0xb4)]?.[_0x52de1a(0xac)]?.[_0x52de1a(0xe2)];return _0xe48b80&&_0x2e2e26==='nuxt'?_0xdc6629[_0x52de1a(0x9d)]=!0x1:_0xdc6629[_0x52de1a(0x9d)]=_0xe48b80||!_0x47500c||_0xdc6629[_0x52de1a(0x97)]?.[_0x52de1a(0x138)]&&_0x47500c[_0x52de1a(0xd1)](_0xdc6629[_0x52de1a(0x97)][_0x52de1a(0x138)]),_0xdc6629['_consoleNinjaAllowedToStart'];}((_0x1b9a86,_0x9aa026,_0x5c84f7,_0x5c4bc8,_0x40d776,_0x9fcdb0,_0x202ed6,_0x5a310a)=>{var _0xab855=_0x1d95d2;if(!Z(_0x1b9a86,_0x5a310a,_0x40d776))return;if(_0x1b9a86[_0xab855(0xa4)]){_0x1b9a86[_0xab855(0x12a)][_0xab855(0x130)]=_0x1b9a86[_0xab855(0xa4)](_0x1b9a86[_0xab855(0x12a)][_0xab855(0x130)]);return;}let _0x399156={'props':0x64,'elements':0x64,'strLength':0x400*0x32,'totalStrLength':0x400*0x32,'autoExpandLimit':0x1388,'autoExpandMaxDepth':0xa},_0x34a16c={'props':0x5,'elements':0x5,'strLength':0x100,'totalStrLength':0x100*0x3,'autoExpandLimit':0x1e,'autoExpandMaxDepth':0x2},_0x46dc34={'hits':{}};_0x1b9a86[_0xab855(0xa4)]=_0x43ee32=>(..._0x405ba3)=>{var _0x4d395c=_0xab855;try{if(_0x43ee32[_0x4d395c(0x111)]===_0x4d395c(0x9e))return;let _0x38a264=Date[_0x4d395c(0x13c)](),_0x292842=_0x405ba3[_0x4d395c(0x128)](),_0x3c6ab1=_0x405ba3;return _0x43ee32(..._0x3c6ab1),_0x1f9d8f(_0xcafd71(_0x292842,_0x38a264,_0x3ce3b0,_0x3c6ab1)),_0x3c6ab1;}finally{_0x1b9a86['console']['log']=_0x43ee32;}},_0x1b9a86[_0xab855(0x12a)][_0xab855(0x130)]=_0x1b9a86[_0xab855(0xa4)](_0x1b9a86[_0xab855(0x12a)]['log']);let _0x1f9d8f=b(_0x1b9a86,_0x9aa026,_0x5c84f7,_0x5c4bc8,_0x40d776),_0x54b1e0=_0x51be72(),_0x3ce3b0=_0x1b9a86[_0xab855(0xa0)];class _0x51da22{constructor(){var _0x2d7f3e=_0xab855;this['_keyStrRegExp']=/^(?!(?:do|if|in|for|let|new|try|var|case|else|enum|eval|false|null|this|true|void|with|break|catch|class|const|super|throw|while|yield|delete|export|import|public|return|static|switch|typeof|default|extends|finally|package|private|continue|debugger|function|arguments|interface|protected|implements|instanceof)$)[_$a-zA-Z\\xA0-\\uFFFF][_$a-zA-Z0-9\\xA0-\\uFFFF]*$/,this[_0x2d7f3e(0x101)]=/^(0|[1-9][0-9]*)$/,this['_quotedRegExp']=/'([^\\\\']|\\\\')*'/,this[_0x2d7f3e(0x139)]=_0x1b9a86['undefined'],this[_0x2d7f3e(0x71)]=_0x1b9a86[_0x2d7f3e(0xfe)],this[_0x2d7f3e(0x12e)]=Object[_0x2d7f3e(0xd6)],this['_getOwnPropertyNames']=Object[_0x2d7f3e(0x6d)],this[_0x2d7f3e(0x7a)]=_0x1b9a86[_0x2d7f3e(0xda)],this[_0x2d7f3e(0x135)]=RegExp['prototype'][_0x2d7f3e(0xc2)],this[_0x2d7f3e(0x75)]=Date[_0x2d7f3e(0x112)][_0x2d7f3e(0xc2)];}['serialize'](_0x4b09a2,_0x14553c,_0x4176b8,_0x390402){var _0x4416a2=_0xab855,_0x5bef0f=this,_0x2eca2e=_0x4176b8[_0x4416a2(0x109)];function _0x345ab8(_0x22dbf8,_0x4bb72c,_0x431bf7){var _0x54ace8=_0x4416a2;_0x4bb72c[_0x54ace8(0xf9)]='unknown',_0x4bb72c[_0x54ace8(0xed)]=_0x22dbf8[_0x54ace8(0x131)],_0x16899d=_0x431bf7[_0x54ace8(0xe2)][_0x54ace8(0x11f)],_0x431bf7[_0x54ace8(0xe2)][_0x54ace8(0x11f)]=_0x4bb72c,_0x5bef0f[_0x54ace8(0xa2)](_0x4bb72c,_0x431bf7);}if(_0x14553c&&_0x14553c[_0x4416a2(0x98)])_0x345ab8(_0x14553c,_0x4b09a2,_0x4176b8);else try{_0x4176b8['level']++,_0x4176b8['autoExpand']&&_0x4176b8[_0x4416a2(0x82)][_0x4416a2(0x13b)](_0x14553c);var _0x593858,_0x5b7cc1,_0x8f54d7,_0x5e0182,_0xa667c3=[],_0x4c73cd=[],_0x4faebb,_0x1cb739=this[_0x4416a2(0xf0)](_0x14553c),_0x56a107=_0x1cb739===_0x4416a2(0xd7),_0x1724c3=!0x1,_0x51f58b=_0x1cb739===_0x4416a2(0xdb),_0x476191=this[_0x4416a2(0x10b)](_0x1cb739),_0x3df7da=this['_isPrimitiveWrapperType'](_0x1cb739),_0x3c435e=_0x476191||_0x3df7da,_0x257bd5={},_0x339e42=0x0,_0x137bf6=!0x1,_0x16899d,_0x55097b=/^(([1-9]{1}[0-9]*)|0)$/;if(_0x4176b8[_0x4416a2(0xff)]){if(_0x56a107){if(_0x5b7cc1=_0x14553c[_0x4416a2(0xad)],_0x5b7cc1>_0x4176b8[_0x4416a2(0xbc)]){for(_0x8f54d7=0x0,_0x5e0182=_0x4176b8[_0x4416a2(0xbc)],_0x593858=_0x8f54d7;_0x593858<_0x5e0182;_0x593858++)_0x4c73cd[_0x4416a2(0x13b)](_0x5bef0f[_0x4416a2(0xa8)](_0xa667c3,_0x14553c,_0x1cb739,_0x593858,_0x4176b8));_0x4b09a2[_0x4416a2(0x132)]=!0x0;}else{for(_0x8f54d7=0x0,_0x5e0182=_0x5b7cc1,_0x593858=_0x8f54d7;_0x593858<_0x5e0182;_0x593858++)_0x4c73cd['push'](_0x5bef0f['_addProperty'](_0xa667c3,_0x14553c,_0x1cb739,_0x593858,_0x4176b8));}_0x4176b8[_0x4416a2(0x10d)]+=_0x4c73cd[_0x4416a2(0xad)];}if(!(_0x1cb739===_0x4416a2(0xc3)||_0x1cb739===_0x4416a2(0xeb))&&!_0x476191&&_0x1cb739!==_0x4416a2(0x91)&&_0x1cb739!==_0x4416a2(0xe9)&&_0x1cb739!=='bigint'){var _0x3cf26d=_0x390402['props']||_0x4176b8[_0x4416a2(0xbf)];if(this[_0x4416a2(0xbd)](_0x14553c)?(_0x593858=0x0,_0x14553c['forEach'](function(_0x5ad145){var _0x515ee6=_0x4416a2;if(_0x339e42++,_0x4176b8[_0x515ee6(0x10d)]++,_0x339e42>_0x3cf26d){_0x137bf6=!0x0;return;}if(!_0x4176b8[_0x515ee6(0x92)]&&_0x4176b8['autoExpand']&&_0x4176b8['autoExpandPropertyCount']>_0x4176b8['autoExpandLimit']){_0x137bf6=!0x0;return;}_0x4c73cd[_0x515ee6(0x13b)](_0x5bef0f[_0x515ee6(0xa8)](_0xa667c3,_0x14553c,_0x515ee6(0xd3),_0x593858++,_0x4176b8,function(_0x581272){return function(){return _0x581272;};}(_0x5ad145)));})):this['_isMap'](_0x14553c)&&_0x14553c[_0x4416a2(0x93)](function(_0x1f9eb1,_0x1068d2){var _0x3bbb27=_0x4416a2;if(_0x339e42++,_0x4176b8['autoExpandPropertyCount']++,_0x339e42>_0x3cf26d){_0x137bf6=!0x0;return;}if(!_0x4176b8[_0x3bbb27(0x92)]&&_0x4176b8['autoExpand']&&_0x4176b8[_0x3bbb27(0x10d)]>_0x4176b8[_0x3bbb27(0xcc)]){_0x137bf6=!0x0;return;}var _0x5d9e53=_0x1068d2[_0x3bbb27(0xc2)]();_0x5d9e53['length']>0x64&&(_0x5d9e53=_0x5d9e53[_0x3bbb27(0xe3)](0x0,0x64)+_0x3bbb27(0x6c)),_0x4c73cd[_0x3bbb27(0x13b)](_0x5bef0f['_addProperty'](_0xa667c3,_0x14553c,'Map',_0x5d9e53,_0x4176b8,function(_0x46fef2){return function(){return _0x46fef2;};}(_0x1f9eb1)));}),!_0x1724c3){try{for(_0x4faebb in _0x14553c)if(!(_0x56a107&&_0x55097b[_0x4416a2(0xb7)](_0x4faebb))&&!this[_0x4416a2(0x12d)](_0x14553c,_0x4faebb,_0x4176b8)){if(_0x339e42++,_0x4176b8[_0x4416a2(0x10d)]++,_0x339e42>_0x3cf26d){_0x137bf6=!0x0;break;}if(!_0x4176b8[_0x4416a2(0x92)]&&_0x4176b8[_0x4416a2(0x109)]&&_0x4176b8[_0x4416a2(0x10d)]>_0x4176b8[_0x4416a2(0xcc)]){_0x137bf6=!0x0;break;}_0x4c73cd[_0x4416a2(0x13b)](_0x5bef0f[_0x4416a2(0xfc)](_0xa667c3,_0x257bd5,_0x14553c,_0x1cb739,_0x4faebb,_0x4176b8));}}catch{}if(_0x257bd5[_0x4416a2(0xb0)]=!0x0,_0x51f58b&&(_0x257bd5[_0x4416a2(0x94)]=!0x0),!_0x137bf6){var _0x391b67=[][_0x4416a2(0x108)](this['_getOwnPropertyNames'](_0x14553c))[_0x4416a2(0x108)](this[_0x4416a2(0xec)](_0x14553c));for(_0x593858=0x0,_0x5b7cc1=_0x391b67[_0x4416a2(0xad)];_0x593858<_0x5b7cc1;_0x593858++)if(_0x4faebb=_0x391b67[_0x593858],!(_0x56a107&&_0x55097b[_0x4416a2(0xb7)](_0x4faebb[_0x4416a2(0xc2)]()))&&!this['_blacklistedProperty'](_0x14553c,_0x4faebb,_0x4176b8)&&!_0x257bd5['_p_'+_0x4faebb[_0x4416a2(0xc2)]()]){if(_0x339e42++,_0x4176b8[_0x4416a2(0x10d)]++,_0x339e42>_0x3cf26d){_0x137bf6=!0x0;break;}if(!_0x4176b8[_0x4416a2(0x92)]&&_0x4176b8['autoExpand']&&_0x4176b8[_0x4416a2(0x10d)]>_0x4176b8[_0x4416a2(0xcc)]){_0x137bf6=!0x0;break;}_0x4c73cd[_0x4416a2(0x13b)](_0x5bef0f[_0x4416a2(0xfc)](_0xa667c3,_0x257bd5,_0x14553c,_0x1cb739,_0x4faebb,_0x4176b8));}}}}}if(_0x4b09a2[_0x4416a2(0xf9)]=_0x1cb739,_0x3c435e?(_0x4b09a2['value']=_0x14553c['valueOf'](),this[_0x4416a2(0x8b)](_0x1cb739,_0x4b09a2,_0x4176b8,_0x390402)):_0x1cb739===_0x4416a2(0xa7)?_0x4b09a2[_0x4416a2(0xab)]=this[_0x4416a2(0x75)][_0x4416a2(0x118)](_0x14553c):_0x1cb739===_0x4416a2(0x6e)?_0x4b09a2[_0x4416a2(0xab)]=this['_regExpToString'][_0x4416a2(0x118)](_0x14553c):_0x1cb739===_0x4416a2(0xf3)&&this[_0x4416a2(0x7a)]?_0x4b09a2[_0x4416a2(0xab)]=this[_0x4416a2(0x7a)][_0x4416a2(0x112)][_0x4416a2(0xc2)][_0x4416a2(0x118)](_0x14553c):!_0x4176b8[_0x4416a2(0xff)]&&!(_0x1cb739==='null'||_0x1cb739===_0x4416a2(0xeb))&&(delete _0x4b09a2[_0x4416a2(0xab)],_0x4b09a2[_0x4416a2(0xd9)]=!0x0),_0x137bf6&&(_0x4b09a2[_0x4416a2(0x100)]=!0x0),_0x16899d=_0x4176b8['node'][_0x4416a2(0x11f)],_0x4176b8['node']['current']=_0x4b09a2,this[_0x4416a2(0xa2)](_0x4b09a2,_0x4176b8),_0x4c73cd[_0x4416a2(0xad)]){for(_0x593858=0x0,_0x5b7cc1=_0x4c73cd['length'];_0x593858<_0x5b7cc1;_0x593858++)_0x4c73cd[_0x593858](_0x593858);}_0xa667c3[_0x4416a2(0xad)]&&(_0x4b09a2[_0x4416a2(0xbf)]=_0xa667c3);}catch(_0x1156ba){_0x345ab8(_0x1156ba,_0x4b09a2,_0x4176b8);}return this[_0x4416a2(0xba)](_0x14553c,_0x4b09a2),this[_0x4416a2(0x104)](_0x4b09a2,_0x4176b8),_0x4176b8[_0x4416a2(0xe2)]['current']=_0x16899d,_0x4176b8[_0x4416a2(0x9a)]--,_0x4176b8[_0x4416a2(0x109)]=_0x2eca2e,_0x4176b8[_0x4416a2(0x109)]&&_0x4176b8[_0x4416a2(0x82)][_0x4416a2(0x128)](),_0x4b09a2;}[_0xab855(0xec)](_0x54324f){var _0x2aee58=_0xab855;return Object[_0x2aee58(0xcf)]?Object['getOwnPropertySymbols'](_0x54324f):[];}[_0xab855(0xbd)](_0x483cb6){var _0x21a1b1=_0xab855;return!!(_0x483cb6&&_0x1b9a86[_0x21a1b1(0xd3)]&&this[_0x21a1b1(0xc5)](_0x483cb6)==='[object\\x20Set]'&&_0x483cb6[_0x21a1b1(0x93)]);}[_0xab855(0x12d)](_0x2724d7,_0x4c1a7a,_0x9e2061){var _0x1d5506=_0xab855;return _0x9e2061[_0x1d5506(0xc6)]?typeof _0x2724d7[_0x4c1a7a]==_0x1d5506(0xdb):!0x1;}[_0xab855(0xf0)](_0x2b0296){var _0x1a22f0=_0xab855,_0x4b1458='';return _0x4b1458=typeof _0x2b0296,_0x4b1458===_0x1a22f0(0x13a)?this['_objectToString'](_0x2b0296)==='[object\\x20Array]'?_0x4b1458=_0x1a22f0(0xd7):this['_objectToString'](_0x2b0296)===_0x1a22f0(0xc1)?_0x4b1458=_0x1a22f0(0xa7):_0x2b0296===null?_0x4b1458=_0x1a22f0(0xc3):_0x2b0296[_0x1a22f0(0x106)]&&(_0x4b1458=_0x2b0296[_0x1a22f0(0x106)][_0x1a22f0(0x111)]||_0x4b1458):_0x4b1458==='undefined'&&this['_HTMLAllCollection']&&_0x2b0296 instanceof this['_HTMLAllCollection']&&(_0x4b1458=_0x1a22f0(0xfe)),_0x4b1458;}['_objectToString'](_0x215115){var _0x44df36=_0xab855;return Object[_0x44df36(0x112)]['toString'][_0x44df36(0x118)](_0x215115);}[_0xab855(0x10b)](_0x16a86c){var _0x25f4b6=_0xab855;return _0x16a86c===_0x25f4b6(0xe7)||_0x16a86c==='string'||_0x16a86c===_0x25f4b6(0x73);}[_0xab855(0x126)](_0x151ad8){var _0x47e01b=_0xab855;return _0x151ad8===_0x47e01b(0x90)||_0x151ad8===_0x47e01b(0x91)||_0x151ad8===_0x47e01b(0xf7);}[_0xab855(0xa8)](_0x23db4f,_0xb3f7f7,_0x5bcd12,_0x13dfa9,_0xe58dac,_0x224829){var _0x3370da=this;return function(_0x2b380c){var _0x49f34c=_0x4c2b,_0x3091d8=_0xe58dac['node'][_0x49f34c(0x11f)],_0x8f6f1d=_0xe58dac[_0x49f34c(0xe2)]['index'],_0x32bf8d=_0xe58dac[_0x49f34c(0xe2)][_0x49f34c(0xbe)];_0xe58dac[_0x49f34c(0xe2)][_0x49f34c(0xbe)]=_0x3091d8,_0xe58dac[_0x49f34c(0xe2)][_0x49f34c(0x72)]=typeof _0x13dfa9==_0x49f34c(0x73)?_0x13dfa9:_0x2b380c,_0x23db4f['push'](_0x3370da[_0x49f34c(0x12f)](_0xb3f7f7,_0x5bcd12,_0x13dfa9,_0xe58dac,_0x224829)),_0xe58dac['node'][_0x49f34c(0xbe)]=_0x32bf8d,_0xe58dac[_0x49f34c(0xe2)][_0x49f34c(0x72)]=_0x8f6f1d;};}[_0xab855(0xfc)](_0x1fac75,_0x3aee03,_0x33891a,_0x17f6c6,_0x5a32c2,_0x43a2d0,_0x5805ee){var _0x3fe02d=_0xab855,_0x4efae8=this;return _0x3aee03['_p_'+_0x5a32c2[_0x3fe02d(0xc2)]()]=!0x0,function(_0x567679){var _0x36c2bc=_0x3fe02d,_0x422df6=_0x43a2d0[_0x36c2bc(0xe2)][_0x36c2bc(0x11f)],_0x440ab1=_0x43a2d0[_0x36c2bc(0xe2)][_0x36c2bc(0x72)],_0x541ff1=_0x43a2d0[_0x36c2bc(0xe2)]['parent'];_0x43a2d0[_0x36c2bc(0xe2)][_0x36c2bc(0xbe)]=_0x422df6,_0x43a2d0[_0x36c2bc(0xe2)][_0x36c2bc(0x72)]=_0x567679,_0x1fac75[_0x36c2bc(0x13b)](_0x4efae8[_0x36c2bc(0x12f)](_0x33891a,_0x17f6c6,_0x5a32c2,_0x43a2d0,_0x5805ee)),_0x43a2d0['node']['parent']=_0x541ff1,_0x43a2d0[_0x36c2bc(0xe2)][_0x36c2bc(0x72)]=_0x440ab1;};}[_0xab855(0x12f)](_0x2836ab,_0x1839f3,_0x4f1ddf,_0x15e4ce,_0x551305){var _0x436004=_0xab855,_0x4fcaa0=this;_0x551305||(_0x551305=function(_0x24ff7e,_0x1435e4){return _0x24ff7e[_0x1435e4];});var _0x502208=_0x4f1ddf['toString'](),_0x1ad359=_0x15e4ce[_0x436004(0xe6)]||{},_0x5c0174=_0x15e4ce[_0x436004(0xff)],_0x4c70e9=_0x15e4ce[_0x436004(0x92)];try{var _0x406dd4=this['_isMap'](_0x2836ab),_0x15876c=_0x502208;_0x406dd4&&_0x15876c[0x0]==='\\x27'&&(_0x15876c=_0x15876c['substr'](0x1,_0x15876c[_0x436004(0xad)]-0x2));var _0xce7ff8=_0x15e4ce[_0x436004(0xe6)]=_0x1ad359[_0x436004(0xa9)+_0x15876c];_0xce7ff8&&(_0x15e4ce['depth']=_0x15e4ce[_0x436004(0xff)]+0x1),_0x15e4ce[_0x436004(0x92)]=!!_0xce7ff8;var _0xc3e313=typeof _0x4f1ddf==_0x436004(0xf3),_0x4f2770={'name':_0xc3e313||_0x406dd4?_0x502208:this[_0x436004(0xbb)](_0x502208)};if(_0xc3e313&&(_0x4f2770[_0x436004(0xf3)]=!0x0),!(_0x1839f3==='array'||_0x1839f3===_0x436004(0x85))){var _0x35e872=this[_0x436004(0x12e)](_0x2836ab,_0x4f1ddf);if(_0x35e872&&(_0x35e872['set']&&(_0x4f2770[_0x436004(0xdf)]=!0x0),_0x35e872['get']&&!_0xce7ff8&&!_0x15e4ce[_0x436004(0x121)]))return _0x4f2770[_0x436004(0x10c)]=!0x0,this[_0x436004(0x11d)](_0x4f2770,_0x15e4ce),_0x4f2770;}var _0x2d3c74;try{_0x2d3c74=_0x551305(_0x2836ab,_0x4f1ddf);}catch(_0x4966e8){return _0x4f2770={'name':_0x502208,'type':_0x436004(0xca),'error':_0x4966e8[_0x436004(0x131)]},this[_0x436004(0x11d)](_0x4f2770,_0x15e4ce),_0x4f2770;}var _0x287569=this['_type'](_0x2d3c74),_0xd9c24=this[_0x436004(0x10b)](_0x287569);if(_0x4f2770['type']=_0x287569,_0xd9c24)this[_0x436004(0x11d)](_0x4f2770,_0x15e4ce,_0x2d3c74,function(){var _0x46cd99=_0x436004;_0x4f2770[_0x46cd99(0xab)]=_0x2d3c74[_0x46cd99(0x96)](),!_0xce7ff8&&_0x4fcaa0[_0x46cd99(0x8b)](_0x287569,_0x4f2770,_0x15e4ce,{});});else{var _0x2a069e=_0x15e4ce['autoExpand']&&_0x15e4ce[_0x436004(0x9a)]<_0x15e4ce[_0x436004(0xfa)]&&_0x15e4ce[_0x436004(0x82)][_0x436004(0x11b)](_0x2d3c74)<0x0&&_0x287569!==_0x436004(0xdb)&&_0x15e4ce[_0x436004(0x10d)]<_0x15e4ce[_0x436004(0xcc)];_0x2a069e||_0x15e4ce[_0x436004(0x9a)]<_0x5c0174||_0xce7ff8?(this[_0x436004(0x9c)](_0x4f2770,_0x2d3c74,_0x15e4ce,_0xce7ff8||{}),this[_0x436004(0xba)](_0x2d3c74,_0x4f2770)):this['_processTreeNodeResult'](_0x4f2770,_0x15e4ce,_0x2d3c74,function(){var _0x445380=_0x436004;_0x287569==='null'||_0x287569===_0x445380(0xeb)||(delete _0x4f2770[_0x445380(0xab)],_0x4f2770[_0x445380(0xd9)]=!0x0);});}return _0x4f2770;}finally{_0x15e4ce[_0x436004(0xe6)]=_0x1ad359,_0x15e4ce[_0x436004(0xff)]=_0x5c0174,_0x15e4ce[_0x436004(0x92)]=_0x4c70e9;}}[_0xab855(0x8b)](_0x5377de,_0x1d474a,_0x28168f,_0x20a2bb){var _0x5930d2=_0xab855,_0x3dcf7e=_0x20a2bb['strLength']||_0x28168f[_0x5930d2(0x137)];if((_0x5377de===_0x5930d2(0x83)||_0x5377de===_0x5930d2(0x91))&&_0x1d474a[_0x5930d2(0xab)]){let _0x526a6f=_0x1d474a[_0x5930d2(0xab)][_0x5930d2(0xad)];_0x28168f[_0x5930d2(0xb9)]+=_0x526a6f,_0x28168f[_0x5930d2(0xb9)]>_0x28168f[_0x5930d2(0xcb)]?(_0x1d474a[_0x5930d2(0xd9)]='',delete _0x1d474a[_0x5930d2(0xab)]):_0x526a6f>_0x3dcf7e&&(_0x1d474a[_0x5930d2(0xd9)]=_0x1d474a['value'][_0x5930d2(0x9f)](0x0,_0x3dcf7e),delete _0x1d474a[_0x5930d2(0xab)]);}}[_0xab855(0xe4)](_0x30dcec){var _0x35e4e9=_0xab855;return!!(_0x30dcec&&_0x1b9a86['Map']&&this[_0x35e4e9(0xc5)](_0x30dcec)==='[object\\x20Map]'&&_0x30dcec[_0x35e4e9(0x93)]);}[_0xab855(0xbb)](_0x24e3da){var _0x31a403=_0xab855;if(_0x24e3da['match'](/^\\d+$/))return _0x24e3da;var _0x165edf;try{_0x165edf=JSON[_0x31a403(0xd5)](''+_0x24e3da);}catch{_0x165edf='\\x22'+this['_objectToString'](_0x24e3da)+'\\x22';}return _0x165edf['match'](/^\"([a-zA-Z_][a-zA-Z_0-9]*)\"$/)?_0x165edf=_0x165edf[_0x31a403(0x9f)](0x1,_0x165edf[_0x31a403(0xad)]-0x2):_0x165edf=_0x165edf[_0x31a403(0x7f)](/'/g,'\\x5c\\x27')[_0x31a403(0x7f)](/\\\\\"/g,'\\x22')[_0x31a403(0x7f)](/(^\"|\"$)/g,'\\x27'),_0x165edf;}['_processTreeNodeResult'](_0x55e064,_0xdd504e,_0x3e47d6,_0x513ecc){var _0x237f5a=_0xab855;this[_0x237f5a(0xa2)](_0x55e064,_0xdd504e),_0x513ecc&&_0x513ecc(),this[_0x237f5a(0xba)](_0x3e47d6,_0x55e064),this[_0x237f5a(0x104)](_0x55e064,_0xdd504e);}['_treeNodePropertiesBeforeFullValue'](_0x3855ef,_0x2d1b4e){var _0x5b3cad=_0xab855;this[_0x5b3cad(0x74)](_0x3855ef,_0x2d1b4e),this['_setNodeQueryPath'](_0x3855ef,_0x2d1b4e),this[_0x5b3cad(0x95)](_0x3855ef,_0x2d1b4e),this[_0x5b3cad(0x9b)](_0x3855ef,_0x2d1b4e);}[_0xab855(0x74)](_0x41481e,_0x1f60af){}[_0xab855(0xb1)](_0x42a941,_0x2a2f08){}[_0xab855(0x107)](_0x1862d4,_0x436553){}[_0xab855(0xcd)](_0x48732d){var _0x3c7218=_0xab855;return _0x48732d===this[_0x3c7218(0x139)];}['_treeNodePropertiesAfterFullValue'](_0x3f8284,_0x5e339d){var _0x468ff=_0xab855;this[_0x468ff(0x107)](_0x3f8284,_0x5e339d),this[_0x468ff(0x11c)](_0x3f8284),_0x5e339d[_0x468ff(0x7c)]&&this[_0x468ff(0x86)](_0x3f8284),this[_0x468ff(0xf8)](_0x3f8284,_0x5e339d),this[_0x468ff(0xfb)](_0x3f8284,_0x5e339d),this[_0x468ff(0x129)](_0x3f8284);}['_additionalMetadata'](_0x1a4bc4,_0x24b9aa){var _0x5d40a6=_0xab855;try{_0x1a4bc4&&typeof _0x1a4bc4[_0x5d40a6(0xad)]==_0x5d40a6(0x73)&&(_0x24b9aa[_0x5d40a6(0xad)]=_0x1a4bc4[_0x5d40a6(0xad)]);}catch{}if(_0x24b9aa[_0x5d40a6(0xf9)]===_0x5d40a6(0x73)||_0x24b9aa[_0x5d40a6(0xf9)]===_0x5d40a6(0xf7)){if(isNaN(_0x24b9aa[_0x5d40a6(0xab)]))_0x24b9aa[_0x5d40a6(0x136)]=!0x0,delete _0x24b9aa[_0x5d40a6(0xab)];else switch(_0x24b9aa[_0x5d40a6(0xab)]){case Number[_0x5d40a6(0x119)]:_0x24b9aa[_0x5d40a6(0x81)]=!0x0,delete _0x24b9aa[_0x5d40a6(0xab)];break;case Number[_0x5d40a6(0x10e)]:_0x24b9aa['negativeInfinity']=!0x0,delete _0x24b9aa['value'];break;case 0x0:this[_0x5d40a6(0xa5)](_0x24b9aa[_0x5d40a6(0xab)])&&(_0x24b9aa[_0x5d40a6(0xf4)]=!0x0);break;}}else _0x24b9aa[_0x5d40a6(0xf9)]===_0x5d40a6(0xdb)&&typeof _0x1a4bc4[_0x5d40a6(0x111)]==_0x5d40a6(0x83)&&_0x1a4bc4[_0x5d40a6(0x111)]&&_0x24b9aa[_0x5d40a6(0x111)]&&_0x1a4bc4[_0x5d40a6(0x111)]!==_0x24b9aa[_0x5d40a6(0x111)]&&(_0x24b9aa[_0x5d40a6(0x7e)]=_0x1a4bc4[_0x5d40a6(0x111)]);}[_0xab855(0xa5)](_0xb701a0){var _0x3bffb0=_0xab855;return 0x1/_0xb701a0===Number[_0x3bffb0(0x10e)];}[_0xab855(0x86)](_0x3f02df){var _0x38e766=_0xab855;!_0x3f02df[_0x38e766(0xbf)]||!_0x3f02df[_0x38e766(0xbf)][_0x38e766(0xad)]||_0x3f02df[_0x38e766(0xf9)]==='array'||_0x3f02df[_0x38e766(0xf9)]===_0x38e766(0x99)||_0x3f02df[_0x38e766(0xf9)]===_0x38e766(0xd3)||_0x3f02df[_0x38e766(0xbf)]['sort'](function(_0x5cd4f1,_0x43bd7b){var _0x1c54ee=_0x38e766,_0x4376dd=_0x5cd4f1[_0x1c54ee(0x111)][_0x1c54ee(0x8c)](),_0x3b6b1c=_0x43bd7b[_0x1c54ee(0x111)][_0x1c54ee(0x8c)]();return _0x4376dd<_0x3b6b1c?-0x1:_0x4376dd>_0x3b6b1c?0x1:0x0;});}[_0xab855(0xf8)](_0x3eb5c2,_0x4998c3){var _0x229d9d=_0xab855;if(!(_0x4998c3[_0x229d9d(0xc6)]||!_0x3eb5c2['props']||!_0x3eb5c2[_0x229d9d(0xbf)][_0x229d9d(0xad)])){for(var _0xf4e3ab=[],_0x2243b7=[],_0x156093=0x0,_0x53534e=_0x3eb5c2[_0x229d9d(0xbf)][_0x229d9d(0xad)];_0x156093<_0x53534e;_0x156093++){var _0x4f7555=_0x3eb5c2[_0x229d9d(0xbf)][_0x156093];_0x4f7555[_0x229d9d(0xf9)]===_0x229d9d(0xdb)?_0xf4e3ab[_0x229d9d(0x13b)](_0x4f7555):_0x2243b7[_0x229d9d(0x13b)](_0x4f7555);}if(!_0x2243b7[_0x229d9d(0xad)]&&_0x4998c3[_0x229d9d(0x109)]&&(_0x3eb5c2[_0x229d9d(0xd9)]=!0x0),!(!_0x2243b7[_0x229d9d(0xad)]||_0xf4e3ab[_0x229d9d(0xad)]<=0x1)){_0x3eb5c2[_0x229d9d(0xbf)]=_0x2243b7;var _0x32023d={'functionsNode':!0x0,'props':_0xf4e3ab};_0x4998c3[_0x229d9d(0x109)]&&(_0x32023d[_0x229d9d(0xd9)]=!0x0),this[_0x229d9d(0x74)](_0x32023d,_0x4998c3),this[_0x229d9d(0x107)](_0x32023d,_0x4998c3),this[_0x229d9d(0x11c)](_0x32023d),this[_0x229d9d(0x9b)](_0x32023d,_0x4998c3),_0x32023d['id']+='\\x20f',_0x3eb5c2[_0x229d9d(0xbf)][_0x229d9d(0x10a)](_0x32023d);}}}['_addLoadNode'](_0x14e6a7,_0xda193f){}['_setNodeExpandableState'](_0x2c59e3){}[_0xab855(0xaf)](_0x53e192){var _0x243eec=_0xab855;return Array[_0x243eec(0x78)](_0x53e192)||typeof _0x53e192==_0x243eec(0x13a)&&this[_0x243eec(0xc5)](_0x53e192)==='[object\\x20Array]';}[_0xab855(0x9b)](_0xc27e44,_0x217547){}[_0xab855(0x129)](_0x5c8382){var _0x5079bf=_0xab855;delete _0x5c8382[_0x5079bf(0xc4)],delete _0x5c8382[_0x5079bf(0xb2)],delete _0x5c8382[_0x5079bf(0x84)];}['_setNodeExpressionPath'](_0x3bde6b,_0x5bd992){}['_propertyAccessor'](_0x3dd102){var _0x250b09=_0xab855;return _0x3dd102?_0x3dd102['match'](this[_0x250b09(0x101)])?'['+_0x3dd102+']':_0x3dd102[_0x250b09(0xea)](this[_0x250b09(0xd4)])?'.'+_0x3dd102:_0x3dd102[_0x250b09(0xea)](this[_0x250b09(0x13e)])?'['+_0x3dd102+']':'[\\x27'+_0x3dd102+'\\x27]':'';}}let _0x2d9a2f=new _0x51da22();function _0xcafd71(_0xd701c6,_0x366e88,_0x5d389c,_0x37af2c){var _0x497d48=_0xab855;let _0x2c4a6a,_0x34413e;try{_0x34413e=_0x54b1e0(),_0x2c4a6a=_0x46dc34[_0xd701c6],!_0x2c4a6a||_0x34413e-_0x2c4a6a['ts']>0x1f4&&_0x2c4a6a[_0x497d48(0xb6)]&&_0x2c4a6a[_0x497d48(0xf1)]/_0x2c4a6a[_0x497d48(0xb6)]<0x64?(_0x46dc34[_0xd701c6]=_0x2c4a6a={'count':0x0,'time':0x0,'ts':_0x34413e},_0x46dc34[_0x497d48(0x105)]={}):_0x34413e-_0x46dc34[_0x497d48(0x105)]['ts']>0x32&&_0x46dc34[_0x497d48(0x105)][_0x497d48(0xb6)]&&_0x46dc34[_0x497d48(0x105)][_0x497d48(0xf1)]/_0x46dc34[_0x497d48(0x105)][_0x497d48(0xb6)]<0x64&&(_0x46dc34['hits']={});let _0xf83e5=[],_0x55b730=_0x2c4a6a['reduceLimits']||_0x46dc34[_0x497d48(0x105)][_0x497d48(0x87)]?_0x34a16c:_0x399156;for(var _0x151118=0x0;_0x151118<_0x37af2c['length'];_0x151118++){let _0x30f969={};_0x30f969[_0x497d48(0xbf)]=_0x55b730[_0x497d48(0xbf)],_0x30f969[_0x497d48(0xbc)]=_0x55b730[_0x497d48(0xbc)],_0x30f969['strLength']=_0x55b730['strLength'],_0x30f969['totalStrLength']=_0x55b730[_0x497d48(0xcb)],_0x30f969[_0x497d48(0xcc)]=_0x55b730[_0x497d48(0xcc)],_0x30f969[_0x497d48(0xfa)]=_0x55b730[_0x497d48(0xfa)],_0x30f969[_0x497d48(0x7c)]=!0x1,_0x30f969[_0x497d48(0xc6)]=!0x0,_0x30f969['depth']=0x1,_0x30f969['level']=0x0,_0x30f969['expId']='root_exp_id',_0x30f969[_0x497d48(0x8a)]=_0x497d48(0x124),_0x30f969[_0x497d48(0x109)]=!0x0,_0x30f969['autoExpandPreviousObjects']=[],_0x30f969[_0x497d48(0x10d)]=0x0,_0x30f969[_0x497d48(0x121)]=!0x0,_0x30f969['allStrLength']=0x0,_0x30f969[_0x497d48(0xe2)]={'current':void 0x0,'parent':void 0x0,'index':0x0},_0xf83e5[_0x497d48(0x13b)](_0x2d9a2f['serialize']({},_0x37af2c[_0x151118],_0x30f969,{}));}return{'method':_0x497d48(0x130),'version':_0x9fcdb0,'args':[{'id':_0xd701c6,'ts':_0x366e88,'args':_0xf83e5,'session':_0x5d389c}]};}catch(_0x460999){return{'method':_0x497d48(0x130),'version':_0x9fcdb0,'args':[{'id':_0xd701c6,'ts':_0x366e88,'args':[{'type':_0x497d48(0xca),'error':_0x460999&&_0x460999['message'],'session':_0x5d389c}]}]};}finally{try{if(_0x2c4a6a&&_0x34413e){let _0x2b143c=_0x54b1e0();_0x2c4a6a['count']++,_0x2c4a6a[_0x497d48(0xf1)]+=_0x2b143c-_0x34413e,_0x2c4a6a['ts']=_0x2b143c,_0x46dc34['hits'][_0x497d48(0xb6)]++,_0x46dc34[_0x497d48(0x105)]['time']+=_0x2b143c-_0x34413e,_0x46dc34[_0x497d48(0x105)]['ts']=_0x2b143c,(_0x2c4a6a[_0x497d48(0xb6)]>0x32||_0x2c4a6a['time']>0x64)&&(_0x2c4a6a['reduceLimits']=!0x0),(_0x46dc34[_0x497d48(0x105)][_0x497d48(0xb6)]>0x3e8||_0x46dc34[_0x497d48(0x105)]['time']>0x12c)&&(_0x46dc34['hits'][_0x497d48(0x87)]=!0x0);}}catch{}}}function _0x51be72(){var _0x1231cd=_0xab855;if(_0x1b9a86['performance'])return()=>_0x1b9a86[_0x1231cd(0x114)]['now']();try{let {performance:_0x26cb4e}=require(_0x1231cd(0xef));return()=>_0x26cb4e['now']();}catch{return()=>Date['now']();}}})(globalThis,'127.0.0.1',_0x1d95d2(0xc7),\"c:\\\\Users\\\\brian\\\\.vscode\\\\extensions\\\\wallabyjs.console-ninja-0.0.54\\\\node_modules\",_0x1d95d2(0xe0),_0x1d95d2(0x125),'1673294053206',[\"localhost\",\"127.0.0.1\",\"example.cypress.io\",\"yellow\",\"192.168.86.80\"]);")}G=new WeakMap,H=new WeakMap,K=new WeakMap,W=new WeakMap,U=new WeakMap,oe.Paused=(0,g.Qw)(h.fi,"paused","Pause",{mode:"stateful"})},"../../babs/lib/gui/debug.js":function(e,t,n){"use strict";n.d(t,{z3:function(){return f},iu:function(){return g},Lh:function(){return h}});var s=n("../../../node_modules/@babylonjs/core/index.js"),i=n("../../../node_modules/@babylonjs/gui/index.js"),o=n("../../common/lib/core.js"),r=n("../../common/lib/identity.js"),a=n("../../common/lib/units.js"),c=n("../../babs/lib/common/debug_flags.js");function u(e){return`${e}Observable`}var l=n("../../babs/lib/common/scopes.js"),d=n("../../babs/lib/gui/display.js");class x extends d.${constructor(e){const t=new i.Ae("perf");t.fontFamily="Consolas",t.fontSize=12,t.alpha=.7,t.color="white",t.background="black",t.adaptHeightToChildren=!0,t.adaptWidthToChildren=!0,t.verticalAlignment=i.oT.VERTICAL_ALIGNMENT_TOP,t.horizontalAlignment=i.oT.HORIZONTAL_ALIGNMENT_RIGHT;const n=new i.eL;n.isVertical=!0,n.adaptWidthToChildren=!0,n.paddingLeftInPixels=n.paddingRightInPixels=4,t.addControl(n),super(e,t,{show:!0}),this.panel_=n}add(e){const t=new i.al(e);return t.resizeToFit=!0,t.horizontalAlignment=i.oT.HORIZONTAL_ALIGNMENT_RIGHT,this.panel_.addControl(t),t}}class f extends d.${constructor(e,t){const n=new i.Ae("debug");n.fontFamily="Consolas",n.fontSize=12,n.alpha=.7,n.color="white",n.background="black",n.adaptHeightToChildren=!0,n.adaptWidthToChildren=!0,n.verticalAlignment=i.oT.VERTICAL_ALIGNMENT_TOP,n.horizontalAlignment=i.oT.HORIZONTAL_ALIGNMENT_LEFT;const s=new i.eL;s.isVertical=!0,s.adaptWidthToChildren=!0,s.paddingLeftInPixels=s.paddingRightInPixels=4,n.addControl(s),super(t,n,{show:!0}),this.entries_=[],this.panel_=s,e.registerAfterRender((()=>this.update()))}add(e,t){const n=new i.al;n.resizeToFit=!0,n.horizontalAlignment=i.oT.HORIZONTAL_ALIGNMENT_RIGHT,this.panel_.addControl(n),this.entries_.push({text:n,label:e,value:t})}clear(){this.entries_.forEach((({text:e})=>{e.dispose()})),this.entries_.length=0}update(){this.entries_.forEach((({text:e,label:t,value:n})=>{e.text=`${t}: ${n()}`}))}}function h(e,t){c.Mz.showInspector.onChanged(e,(({current:e})=>{(0,o.OR)(window.INSPECTOR,"The Inspector code is not loaded."),e?t.debugLayer.show({embedMode:!1}):t.debugLayer.hide(),t.getEngine().getRenderingCanvas()?.focus({preventScroll:!0})}),{immediate:!o.Pc}),c.Mz.showSpector.onEnabled(e,(()=>{(0,o.OR)(window.spector,"The spectorjs code is not loaded."),window.spector.displayUI()}),!o.Pc),c.Mz.showAxes.onEnabled(e,(e=>e.scope.acquire(new s.wMC(t,5))),!o.Pc)}const _=["onBeforeAnimations","onAfterAnimations","onBeforePhysics","onAfterPhysics","onBeforeRender","onBeforeRenderTargetsRender","onAfterRenderTargetsRender","onBeforeCameraRender","onBeforeActiveMeshesEvaluation","onAfterActiveMeshesEvaluation","onBeforeParticlesRendering","onAfterParticlesRendering","onBeforeDrawPhase","onAfterDrawPhase","onAfterCameraRender","onAfterRender","onBeforeRenderingGroup","onAfterRenderingGroup"];class b{constructor(e){this.index=0,this.total=0,this.values=new Array(e).fill(0)}push(e){this.total-=this.values[this.index],this.values[this.index]=e,this.total+=e,this.index=(this.index+1)%this.values.length}get value(){return this.total/this.values.length}}const p=(0,r.Pn)()({fps:{label:"Frames per second",init:e=>{e.scene.captureFrameTime=!0,e.scene.captureInterFrameTime=!0},value:e=>1e3/(e.scene.frameTimeCounter.current+e.scene.interFrameTimeCounter.current),units:a.XF,precision:0},idle:{label:"Time between frames",init:e=>e.scene.captureInterFrameTime=!0,value:e=>e.scene.interFrameTimeCounter},process:{label:"Time for all frame processing",init:e=>e.scene.captureFrameTime=!0,value:e=>e.scene.frameTimeCounter},physics:{label:"Time for physics simulation",init:e=>e.scene.capturePhysicsTime=!0,value:e=>e.scene.physicsTimeCounter},activeMeshes:{label:"Active Meshes Evaluation",init:e=>e.scene.captureActiveMeshesEvaluationTime=!0,value:e=>e.scene.activeMeshesEvaluationTimeCounter},totalRender:{label:"Time for all frame rendering",init:e=>e.scene.captureRenderTime=!0,value:e=>e.scene.renderTimeCounter},renderTargets:{label:"Render Target Textures",init:e=>e.scene.captureRenderTargetsRenderTime=!0,value:e=>e.scene.renderTargetsRenderTimeCounter},particleRender:{label:"Time for particle rendering",init:e=>e.scene.captureParticlesRenderTime=!0,value:e=>e.scene.particlesRenderTimeCounter},spritesRender:{label:"Time for sprite rendering",init:e=>e.scene.captureSpritesRenderTime=!0,value:e=>e.scene.spritesRenderTimeCounter},cameraRender:{label:"Time for camera rendering",init:e=>e.scene.captureCameraRenderTime=!0,value:e=>e.scene.cameraRenderTimeCounter},gpuRender:{label:"GPU frame render time (parallel with CPU work)",init:e=>e.engine.captureGPUFrameTime=!0,value:e=>e.engine.gpuFrameTimeCounter,factor:1e-6},shaderCompilation:{label:"CPU shader compilation",init:e=>e.engine.captureShaderCompilationTime=!0,value:e=>e.engine.shaderCompilationTimeCounter},drawCalls:{label:"Draw calls per frame",value:e=>e.scene.drawCallsCounter,units:a.XF,precision:0}}),m=["fps","idle","process","physics","activeMeshes","totalRender","gpuRender","drawCalls"];class g extends l._z{static create(e,t){const n=new g(e,t);g.instance=n,n.onDispose((()=>{g.instance===n&&delete g.instance})),c.Mz.logNextFrame.onEnabled(t,(()=>{g.debugOneFrame()}))}static currentPhase(){return(0,o.jK)(g.instance?.phase)}static get isDebuggingFrame(){return"active"===g.instance?.trackingState}static logFrame(e,t){this.isDebuggingFrame&&g.instance?.logFrame(e,t)}static debugOneFrame(e=!1){const t=(0,o.jK)(g.instance);t.trackingState=e?"waitForNextFrame":"waitForNextPhase",delete t.trackingEndPhase}constructor(e,t){super((0,l.jw)(e)),this.scene=e,this.indent="",this.trackingState="inactive",this.showPerfMetrics(t),this.observePhases()}showPerfMetrics(e){let t=({current:n})=>{if(!n)return;const i=new x(e),o={engine:new s.Pj8(this.scene.getEngine()),scene:new s.Cye(this.scene)},c=m.map((e=>p[e])),u=m.map((e=>i.add(e))),l=m.map((()=>new b(20)));c.forEach((e=>e.init?.(o))),this.scene.registerAfterRender((()=>{for(let e=0;ei.show(e)};c.Mz.showPerfMetrics.onChanged(e,(e=>t(e)),{immediate:!0})}logFrame(e,t){(0,o.cM)("Frame",{label:`${this.indent}${e}`,...t})}observePhases(){let e=[..._];const t=e.filter((e=>e.endsWith("Physics")));this.scene.isPhysicsEnabled()||(e=e.filter((e=>!t.includes(e))));for(const t of e){const n=u(t),i=(0,o.jK)(this.scene[n],`Missing Scene.${n}()`);this.onNotify(i,(n=>{const i=this.phase;if(this.phase=t,"inactive"!==this.trackingState&&(this.trackingEndPhase===t?this.trackingState="inactive":("waitForNextPhase"===this.trackingState||"waitForNextFrame"===this.trackingState&&t===e[0])&&(this.trackingState="active",this.indent="",this.trackingEndPhase=t),"active"===this.trackingState)){t.startsWith("onBefore")&&i?.startsWith("onBefore")?this.indent+=" ":t.startsWith("onAfter")&&i?.startsWith("onAfter")&&(this.indent=this.indent.slice(0,this.indent.length-2));const e={};(0,r.$O)(n,s.xsS)||((0,r.$O)(n,s.V1s)?e.camera=n.name:(0,r.$O)(n,s.tYM)&&(e.camera=n.camera?.name,e.renderingGroupId=n.renderingGroupId)),this.logFrame(this.phase,e)}}))}}}},"../../babs/lib/gui/display.js":function(e,t,n){"use strict";n.d(t,{$:function(){return l},s:function(){return d}});var s=n("../../../node_modules/@babylonjs/gui/index.js"),i=n("../../common/lib/core.js"),o=n("../../common/lib/identity.js"),r=n("../../babs/lib/common/scopes.js"),a=n("../../babs/lib/input/pointer_lock.js"),c=n("../../babs/lib/render/constants.js"),u=n("../../babs/lib/gui/gui.js");class l extends r._z{static of(e,t,n){return new l(e,t,n)}constructor(e,t,n){const s=n?.scope??e,o=n?.acquireRoot??!0,r=n?.onResize,a=n?.show??!0,c=n?.interactable??!1;super(s),this.display=e,this.root=t,(0,i.BF)(null===t.metadata),t.metadata={widget:this,onResize:r},t.isPointerBlocker=c,o?(this.acquire(t),t.onDisposeObservable.addOnce((()=>this.dispose()))):this.onDispose((()=>{e.register(t,"remove"),t.metadata=null})),a&&this.show()}show(e=!0){e&&this.root.isPointerBlocker&&(a._B.value=!1),this.display.register(this.root,e?"add":"remove")}hide(){this.show(!1)}}class d extends r._z{static createDebug(){const e=new s.Ae("debug");e.fontFamily="Consolas",e.fontSize=12,e.alpha=.7,e.color="white",e.background="black",e.adaptHeightToChildren=!0,e.adaptWidthToChildren=!0,e.verticalAlignment=s.oT.VERTICAL_ALIGNMENT_TOP,e.horizontalAlignment=s.oT.HORIZONTAL_ALIGNMENT_LEFT;const t=new s.eL("panel");return t.isVertical=!0,t.adaptWidthToChildren=!0,t.paddingLeftInPixels=t.paddingRightInPixels=4,e.addControl(t),{root:e,addEntry:function(e){const n=new s.al(e);return n.resizeToFit=!0,n.horizontalAlignment=s.oT.HORIZONTAL_ALIGNMENT_LEFT,t.addControl(n),n}}}get todo(){return this.adt}constructor(e){if(super((0,r.jw)(e)),this.adt=this.acquire(s.in.CreateFullscreenUI("gui",!0,e)),this.adt.layer&&(0,c.sl)(this.adt.layer,c.V1),this.styles=function(e){const t=(t,n,s="normal")=>{const i=e.createStyle();return i.fontFamily=t,i.fontSize=(0,u.sq)(n),i.fontWeight=s,i},n="Segoe WPC,Segoe UI,sans-serif",s=(0,o.Pn)()({normal:t(n,(0,u.$2)(13),"400"),bold:t(n,(0,u.$2)(13),"800"),title:t(n,(0,u.$2)(11),"700")});return Object.freeze(s)}(this.adt),i.Pc)this.addDebugEntry=()=>{};else{const e=d.createDebug();this.adt.addControl(e.root),this.addDebugEntry=t=>e.addEntry(t)}this.onNotify(e.getEngine().onResizeObservable,(e=>{const t=(0,u.iZ)(e);this.adt.rootContainer.children.forEach((e=>{e.metadata?.onResize?.(t)}))}))}register(e,t){if("add"===t){const t=e.metadata,n=this.adt.getScene();if(t&&n){const e=(0,u.iZ)(n.getEngine());t.onResize?.(e)}this.adt.addControl(e)}else this.adt.removeControl(e)}}},"../../babs/lib/gui/gui.js":function(e,t,n){"use strict";n.d(t,{$2:function(){return u},HA:function(){return x},T:function(){return h},iZ:function(){return d},sq:function(){return f},zJ:function(){return l}});var s,i=n("../../common/lib/core.js"),o=n("../../common/lib/units.js");class r extends o.h0{constructor(){super("pixels"),s.set(this,void 0)}}s=new WeakMap,r.i=new r;const a=o.fb.create(1,"px",r.i,!0),c=window.devicePixelRatio,u=o.fb.of(c,a,"px",!0);function l(e){const t=(0,i.jK)(e.getEngine().getRenderingCanvasClientRect());return o.OW.from([t.right-t.left,t.bottom-t.top],u)}function d(e){return a(e.getRenderWidth(),e.getRenderHeight())}function x(e){return a(e._currentMeasure.left,e._currentMeasure.top)}function f(e){return e.inUnits(a).ceiling().value}function h(e){return a(e.x,e.y)}},"../../babs/lib/gui/table.js":function(e,t,n){"use strict";n.d(t,{I:function(){return d},W:function(){return _}});var s=n("../../../node_modules/@babylonjs/gui/index.js"),i=n("../../common/lib/core.js"),o=n("../../common/lib/identity.js"),r=n("../../babs/lib/common/color.js"),a=n("../../babs/lib/input/input_code.js"),c=n("../../babs/lib/gui/gui.js"),u=n("../../babs/lib/gui/vscode.js"),l=n("../../babs/lib/gui/window.js");const d=(0,r.DG)({text:u.z.text,transparent:"#0000"},(e=>({content:e.text,disabled:u.z.disabledText,highlight:u.z.highlightText,tableFill:u.z.tableFill,tableRow:u.z.tableRow,hoverRowFill:u.z.hoverRowFill}))),x=(0,r.NC)((0,r.nV)((0,r.H_)(d.hoverRowFill),.2));function f(e,t){let n;switch(t){case"hovering":n=d.hoverRowFill;break;case"selecting":n=x;break;default:n=e%2==0?d.tableRow:d.transparent}return n}const h=(0,o.SC)().withDefaults({rowHeight:(0,c.$2)(27),columnRatios:[1]});function _(e,t,n){const r=h.apply(n??{}),u=new s.rj(t);u.verticalAlignment=s.oT.VERTICAL_ALIGNMENT_TOP,u.horizontalAlignment=s.oT.HORIZONTAL_ALIGNMENT_RIGHT,u.paddingTopInPixels=u.paddingBottomInPixels=u.paddingLeftInPixels=u.paddingRightInPixels=(0,c.sq)(l.ld),u.style=e.styles.normal,u.background=d.tableFill,r.columnRatios.forEach((e=>{(0,i.BF)(e>0&&e<=1),u.addColumnDefinition(e)}));const x=new Map,_=e=>function(e,t,n,o){const r=n.size;for((0,i.M1)(n.get(o),void 0,(()=>`Row with duplicate label: ${o}`)),n.set(o,r);e.rowCount<=r;)e.addRowDefinition((0,c.sq)(t.rowHeight),!0);const a=[],u=f(r);for(let t=0;t{const n=[];for(let s=0;s{const t=f(e,e===p?m?"selecting":"hovering":void 0);b(e,g).forEach((e=>e.background=t))};u.onPointerMoveObservable.add((e=>{const t=p,n=(0,c.T)(e).subtract((0,c.HA)(u)),s=Math.floor(n.at(1).factor(r.rowHeight));p=s<0||s>=x.size?void 0:s,t!==p&&(void 0!==t&&v(t),void 0!==p&&v(p))})),u.onPointerOutObservable.add((()=>{if(m=!1,void 0!==p){const e=p;p=void 0,v(e)}})),u.onPointerDownObservable.add((e=>{r.onClick&&e.buttonIndex===a.b.forward["M.Primary"]&&(m=!0,void 0!==p&&v(p))}));const y=(0,o.V9)(s.al);return u.onPointerClickObservable.add((e=>{if(r.onClick&&e.buttonIndex===a.b.forward["M.Primary"]&&m&&(m=!1,void 0!==p)){v(p);const e=b(p,y).at(0)?.name;r.onClick((0,i.jK)(e))}})),{root:u,layout:e=>{for(u.clearControls(),x.clear(),e(_);u.rowCount>x.size;)u.removeRowDefinition(u.rowCount-1);u.heightInPixels=(0,c.sq)(r.rowHeight.scale(u.rowCount).add(l.ld.scale(2)))},get:e=>((e,t)=>{const n=(0,i.jK)(x.get(e));return b(n,t)})(e,y),list:()=>Array.from(x.keys())}}},"../../babs/lib/gui/vscode.js":function(e,t,n){"use strict";n.d(t,{z:function(){return s}});const s=(0,n("../../babs/lib/common/color.js").DG)({text:"#cccccc",panelFill:"#1e1e1e",headerFill:"#80808033",disabledText:"#808080",highlightText:"#d7ba7d",scrollBar:"#646464b3",tableRow:"#2a2d2e",tableFill:"#252526",hoverRowFill:"#094771"})},"../../babs/lib/gui/window.js":function(e,t,n){"use strict";n.d(t,{LW:function(){return l},Rz:function(){return _},ld:function(){return d}});var s=n("../../../node_modules/@babylonjs/gui/index.js"),i=n("../../common/lib/identity.js"),o=n("../../babs/lib/common/color.js"),r=n("../../babs/lib/gui/display.js"),a=n("../../babs/lib/gui/gui.js"),c=n("../../babs/lib/gui/vscode.js");const u=(0,o.DG)({text:c.z.text,transparent:"#0000"},(e=>({header:e.text,headerFill:c.z.headerFill,panelFill:c.z.panelFill,scrollBar:c.z.scrollBar}))),l=(0,a.$2)(6),d=(0,a.$2)(10),x=(0,a.$2)(24),f=(0,a.$2)(10),h=(0,i.SC)().withDefaults({zIndex:0,widthRatio:.5,heightRatio:.5});class _ extends r.${constructor(e,t,n,i){const o=h.apply(i??{}),r=new s.Ae(t);r.zIndex=o.zIndex,r.thickness=(0,a.sq)((0,a.$2)(1)),r.color=u.text,r.background=u.panelFill,r.width=`${Math.round(100*o.widthRatio)}%`;const c=new s.eL("panel");r.addControl(c);const d=new s.Ae("header");d.heightInPixels=(0,a.sq)(x),d.thickness=0,d.color=u.header,d.background=u.headerFill,c.addControl(d);const _=new s.al("title");_.textHorizontalAlignment=s.oT.HORIZONTAL_ALIGNMENT_LEFT,_.paddingLeftInPixels=_.paddingRightInPixels=(0,a.sq)(l),_.style=e.styles.title,_.text=t.toUpperCase(),d.addControl(_);const b=new s.am("scroll");b.forceVerticalBar=!0,b.thickness=0,b.barSize=(0,a.sq)(f),b.barColor=u.scrollBar,b.barBackground=u.transparent,b.color=u.transparent,b.background=u.transparent,c.addControl(b),b.addControl(n),super(e,r,{interactable:!0,...i,onResize:function(e){const t=e.at(1).scale(o.heightRatio);b.heightInPixels=(0,a.sq)(t);const n=t.add(x);c.heightInPixels=(0,a.sq)(n);const s=(0,a.$2)(2);r.heightInPixels=(0,a.sq)(n.add(s))}})}}},"../../babs/lib/input/gauge_input.js":function(e,t,n){"use strict";n.d(t,{EL:function(){return d}});var s=n("../../../node_modules/@babylonjs/core/index.js"),i=n("../../common/lib/containers.js"),o=n("../../common/lib/math.js"),r=n("../../babs/lib/common/values.js"),a=n("../../babs/lib/input/input.js"),c=n("../../babs/lib/input/keys.js");class u extends c.Uh{static fromString(e){let t;const n=e.split("+");for(let e=0;e{const t=u.from(e);this.bindings.push(new l(this,this.connected,o,t,(e=>this.onEvent.notifyObservers(e)),a))}))}onValue(e,t,n=!0){const s=this.onEvent.add((e=>t(e)));this.updateConnected_(),n&&s&&e.onDispose((()=>{this.onEvent.remove(s),this.updateConnected_()}))}updateConnected_(){this.connected_.value=this.onEvent.observers.some((e=>!e._willBeUnregistered))}}},"../../babs/lib/input/input.js":function(e,t,n){"use strict";n.d(t,{II:function(){return a},KE:function(){return s},KX:function(){return r}});var s,i,o=n("../../babs/lib/common/scopes.js");(i=s=s||(s={}))[i.Low=0]="Low",i[i.Normal=1]="Normal",i[i.High=2]="High",i[i.PreGui=3]="PreGui",i[i.Framework=4]="Framework";class r extends o._z{}class a extends o.$9{constructor(){super(...arguments),this.bindings=[]}}},"../../babs/lib/input/input_code.js":function(e,t,n){"use strict";n.d(t,{b:function(){return a}});var s=n("../../common/lib/core.js"),i=n("../../common/lib/identity.js"),o=n("../../common/lib/units.js"),r=n("../../babs/lib/gui/gui.js");const a=(0,i.lG)({"M.Primary":0,"M.Secondary":2,"M.Tertiary":1});function c(e){return t=>o.OW.from((0,s.$1)(t,(0,i.CH)(i.hj,i.hj)),e)}function u(e){return t=>o.Ru.from(e,(0,s.$1)(t,i.hj))}c(r.$2),u(r.$2),c(o.iA),u(o.iA)},"../../babs/lib/input/keys.js":function(e,t,n){"use strict";n.d(t,{Uh:function(){return c},xw:function(){return u}});var s,i,o,r=n("../../common/lib/math.js"),a=n("../../common/lib/identity.js");!function(e){e.symbols=(0,a.lG)({"`":"Backquote","-":"Minus","=":"Equal","[":"BracketLeft","]":"BracketRight","\\":"Backslash",";":"Semicolon","'":"Quote",",":"Comma",".":"Period","/":"Slash"}),e.isSymbol=function(t){return t in e.symbols.forward};const t=/^\d$/;e.isDigit=function(e){return t.test(e)};const n=/^[A-Z]$/;e.isLetter=function(e){return n.test(e)}}(s=s||(s={})),(o=i=i||(i={})).modifiers={ShiftLeft:!0,ControlLeft:!0,MetaLeft:!0,AltLeft:!0,ShiftRight:!0,ControlRight:!0,MetaRight:!0,AltRight:!0},o.isModifier=function(e){return e in o.modifiers};class c{get wantShift(){return 1==(1&this.modifierMask)}get wantCtrl(){return 2==(2&this.modifierMask)}get wantMeta(){return 4==(4&this.modifierMask)}get wantAlt(){return 8==(8&this.modifierMask)}constructor(e,t){this.code=e,this.modifierMask=t?.modifierMask??0,this.deviceId=t?.deviceId}matchesRequirements(e,t){return!(t&&this.modifierMask!==e.modifierMask||void 0!==this.deviceId&&this.deviceId!==e.deviceId)}}class u extends c{static fromString(e){const t={},n=e.split("+");for(let e=0;ed.onValue(e.scope,t)),!0)}},"../../babs/lib/input/pointer_lock.js":function(e,t,n){"use strict";n.d(t,{JI:function(){return d},Uh:function(){return x},_B:function(){return u},a5:function(){return f},aF:function(){return _},fb:function(){return c},j:function(){return h}});var s=n("../../common/lib/core.js"),i=n("../../babs/lib/common/scopes.js"),o=n("../../babs/lib/common/values.js"),r=n("../../babs/lib/input/input.js"),a=n("../../babs/lib/input/toggle_input.js");function c(){return navigator.userActivation?.isActive??!1}const u=new o.ZD(i.fi,"mouse locked");let l=!1;function d(e){(0,s.BF)(l,e)}function x(e){l?console.warn("Extra call to initializePointerLocking(). This is typically handled by InputManager."):(u.value=e.isPointerLock,l=!0,document.addEventListener("pointerlockchange",(()=>{u.value=document.pointerLockElement===e.getRenderingCanvas()}),!1),u.onChanged(i.fi,(({current:t})=>{t||e.exitPointerlock()})))}function f(e){e.isPointerLock||e.enterPointerlock()}const h=a.sM.register(i.fi,"_pointerLockingInput",["M.Primary","M.Secondary","M.Tertiary","G.A","G.B","G.X","G.Y","G.Start"],{priority:r.KE.PreGui});function _(e,t){(0,s.BF)(l,"This function requires initializePointerLocking.");const n=t.getEngine();e.onDispose((()=>{!function(e){e.isPointerLock&&e.exitPointerlock()}(n)})),u.onChanged(e,(e=>h.onCycle(e.scope,(()=>f(n)))),{immediate:!0,predicate:e=>!e}),c()&&f(n)}},"../../babs/lib/input/toggle_input.js":function(e,t,n){"use strict";n.d(t,{sM:function(){return w},Qw:function(){return j}});var s,i,o=n("../../../node_modules/@babylonjs/core/index.js"),r=n("../../common/lib/containers.js"),a=n("../../common/lib/core.js"),c=function(e,t,n,s,i){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?i.call(e,n):i?i.value=n:t.set(e,n),n},u=function(e,t,n,s){if("a"===n&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?s:"a"===n?s.call(e):s?s.value:t.get(e)};class l{constructor(e){s.set(this,!1),i.set(this,void 0),c(this,i,e,"f")}activate(){return!u(this,s,"f")&&(c(this,s,!0,"f"),u(this,i,"f").call(this,"activate"),!0)}deactivate(){return!!u(this,s,"f")&&(c(this,s,!1,"f"),u(this,i,"f").call(this,"deactivate"),!0)}cancel(){return!!u(this,s,"f")&&(c(this,s,!1,"f"),u(this,i,"f").call(this,"cancel"),!0)}dispose(){this.cancel()}}s=new WeakMap,i=new WeakMap;var d,x,f,h=n("../../babs/lib/common/debug_flags.js"),_=n("../../babs/lib/common/scopes.js"),b=n("../../babs/lib/common/values.js"),p=n("../../babs/lib/input/input.js"),m=n("../../babs/lib/input/keys.js"),g=function(e,t,n,s){if("a"===n&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?s:"a"===n?s.call(e):s?s.value:t.get(e)},v=function(e,t,n,s,i){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?i.call(e,n):i?i.value=n:t.set(e,n),n};class y extends p.KX{get connected(){return this.input.connected}get active(){return this.input.active}get value(){return this.valued?.value}constructor(e,t,n,s,i=p.KE.Normal){super(e,e.name),this.input=e,this.valued=t,this.signal=n,this.config=s,this.priority=i}cancel(){return this.signal.cancel()}}class w extends p.II{static register(e,t,n,s){const i=s?.valued,o=s?.priority??p.KE.Normal;return new w(e,t,n??[],i,o)}get connected(){return this.connected_}get active(){return g(this,x,"f")>0}constructor(e,t,n,s,i){super(e,t),d.add(this),this.onEvent=new o.y$z,this.connected_=new b.ZD(this,"connected"),x.set(this,0),(0,r._2)(n).forEach((e=>this.bindings.push(new y(this,s,this.createSignal(),m.xw.from(e),i))))}attachControl(e,t){const n=new _._z(e,`${t.name}-${this.name}`),s=this.createSignal();n.onNotify(t.onPointerDownObservable,(()=>s.activate())),n.onNotify(t.onPointerUpObservable,(()=>s.deactivate())),n.onNotify(t.onDisposeObservable,(()=>n.dispose()))}onActive(e,t,n=!0){const s=this.onEvent.add((e=>{"activate"===e?t(!0):"deactivate"===e&&t(!1)}));this.updateConnected_(),n&&s&&(g(this,x,"f")&&t(!0),e.onDispose((()=>{g(this,x,"f")&&t(!1),this.onEvent.remove(s),this.updateConnected_()})))}onCycle(e,t,n=!0){const s=this.onEvent.add((e=>{"cycle"===e&&t()}));this.updateConnected_(),n&&s&&e.onDispose((()=>{this.onEvent.remove(s),this.updateConnected_()}))}createSignal(){return this.acquire(new l((e=>g(this,d,"m",f).call(this,e))))}updateConnected_(){this.connected_.value=this.onEvent.observers.some((e=>!e._willBeUnregistered))}}function j(e,t,n,s){const i=s?.toggle??new b.ZD(e,t,s);if(void 0===n&&!s?.wantInput)return i;!s?.mode&&s?.persist&&(s??(s={}),s.mode="stateful");const o=w.register(e,t,n,{valued:i,...s}),r=e=>{if("stateful"===s?.mode)o.onCycle(e,(()=>{i.toggle(),!a.Pc&&h.cG.showToggleEvents&&(0,a.cM)("toggle",{name:i.name,value:i.value})}),void 0!==s?.enable);else{(0,a.BF)(!0!==s?.persist,(()=>"'ephemeral' toggleInput does not support persistence"));const t=s?.defaultEnabled??!1;o.onActive(e,(e=>i.value=e!==t),void 0!==s?.enable)}};return s?.enable?s.enable.add(r):r(e),s?.wantInput?{toggle:i,input:o}:i}x=new WeakMap,d=new WeakSet,f=function(e){"activate"===e?(v(this,x,g(this,x,"f")+1,"f"),1===g(this,x,"f")&&this.onEvent.notifyObservers("activate")):(v(this,x,g(this,x,"f")-1,"f"),0===g(this,x,"f")&&this.onEvent.notifyObservers("deactivate"),"cancel"!==e&&this.onEvent.notifyObservers("cycle"))}},"../../babs/lib/input/user_activation.js":function(e,t,n){"use strict";n.d(t,{T:function(){return s}});const s=new(n("../../../node_modules/@babylonjs/core/index.js").y$z)},"../../babs/lib/physics/ammo.js":function(e,t,n){"use strict";n.d(t,{Pb:function(){return y},K$:function(){return h},xY:function(){return p},ur:function(){return m},KS:function(){return b}});var s,i,o=n("../../../node_modules/@babylonjs/core/index.js"),r=n("../../common/lib/core.js"),a=n("../../common/lib/identity.js"),c=n("../../common/lib/units.js"),u=n("../../babs/lib/common/debug_flags.js"),l=n("../../babs/lib/common/scopes.js"),d=n("../../../node_modules/ammojs-typed/ammo/ammo.js");let x;window.Ammo=d,(i=s=s||(s={}))[i.CF_DYNAMIC_OBJECT=0]="CF_DYNAMIC_OBJECT",i[i.CF_STATIC_OBJECT=1]="CF_STATIC_OBJECT",i[i.CF_KINEMATIC_OBJECT=2]="CF_KINEMATIC_OBJECT",i[i.CF_NO_CONTACT_RESPONSE=4]="CF_NO_CONTACT_RESPONSE",i[i.CF_CUSTOM_MATERIAL_CALLBACK=8]="CF_CUSTOM_MATERIAL_CALLBACK",i[i.CF_CHARACTER_OBJECT=16]="CF_CHARACTER_OBJECT",i[i.CF_DISABLE_VISUALIZE_OBJECT=32]="CF_DISABLE_VISUALIZE_OBJECT",i[i.CF_DISABLE_SPU_COLLISION_PROCESSING=64]="CF_DISABLE_SPU_COLLISION_PROCESSING",i[i.CF_HAS_CONTACT_STIFFNESS_DAMPING=128]="CF_HAS_CONTACT_STIFFNESS_DAMPING",i[i.CF_HAS_CUSTOM_DEBUG_RENDERING_COLOR=256]="CF_HAS_CUSTOM_DEBUG_RENDERING_COLOR",i[i.CF_HAS_FRICTION_ANCHOR=512]="CF_HAS_FRICTION_ANCHOR",i[i.CF_HAS_COLLISION_SOUND_TRIGGER=1024]="CF_HAS_COLLISION_SOUND_TRIGGER";class f extends l._z{constructor(e,t,n){if(super(e),this.plugin=t,this.reuse=n,!n){const e=t.bjsAMMO;this.onDispose((()=>{x===e&&(x=void 0)}))}}}async function h(e){x||(x=await Ammo());const t=new o.bei(void 0,x);return new f(e,t,!0)}function _(e,t,...n){const s=n.length?n:["The Ammo physics engine is not enabled."];(0,r.OR)(x,...s);const i=e.physicsImpostor,o=i.physicsBody;if((0,a.EN)(o))return t({ammo:x,imposter:i,body:o});console.warn(`${e.name} is missing physicsImpostor or physicsBody`)}function b(e,t){const n=e=>e?1:0;_(e,(({ammo:e,body:s})=>{s.setAngularFactor(new e.btVector3(n(t?.x),n(t?.y),n(t?.z)))}),"setRotationAxes is only supported by Ammo.")}function p(e,t,n,s){return _(e,(({ammo:e,body:i})=>{const o=e.castObject(i,e.btCollisionObject);if(o.data=t,void 0!==n||void 0!==s){const e=o.getBroadphaseHandle();void 0!==n&&e.set_m_collisionFilterGroup(n),void 0!==s&&e.set_m_collisionFilterMask(s)}return()=>{delete o.data}}))}function m(e,t){_(e,(({ammo:e,body:n})=>{const s=new e.btVector3(0,0,0);n.getCollisionShape().calculateLocalInertia(t,s),n.setMassProps(t,s)}))}const g=new class{constructor(){this.defaultRef="A"}from(e){return this.manifold=e,this.defaultRef="A",this}*getPoints(e){(0,r.OR)(this.manifold);const t=(0,r.UL)(this.manifold.getNumContacts(),0),n="A"===(e??this.defaultRef);for(let e=0;e{s+=1;const o={node:e,collider:i,onStart:t?.onCollisionStart,onEnd:t?.onCollisionEnd};i.physicsImpostor.data=o;const r=(0,d.xY)(i,o);r&&n.onDisposeObservable.addOnce(r)})),(0,o.UL)(s,0)}const j=(0,a.lf)(5*-9.81);function E(e,t,n){e.name=function(e){return`${e}.μ`}(e.name),e.material=g,e.isVisible=c.cG.showColliders;const s=n.isTangible??!0,a=s?{mass:n?.mass?.value??0,restitution:n?.restitution??0,friction:n?.friction??.5}:{mass:0},l=n.children??[],d=l.length?l[0]:n.parent;if(d&&(0,r.$O)(d,i.YOI)){const e=function(e,t){const n=v.maskOf(e);let s;return(0,o.BF)(0!==n,`${e.name}'s tags: ${(0,u.V9)(e)}\ndo not intersect with allCollisionTags: ${(0,u.V9)(v)}\nand therefore won't collide.`),t?.doesNotCollideWith?((0,o.BF)(void 0===t?.collidesWith),s=v.maskExcept(t.doesNotCollideWith)):s=v.maskOf(t?.collidesWith??m?.tags??v.tags),{group:n,mask:s}}(d,n);a.mask=e.mask,a.group=e.group}s||(t=i.Q03.NoImpostor),function(e,t){e.physicsImpostor=t}(e,new i.Q03(e,t,a,n.scene));for(const t of l)n.offset&&(t.position=n.offset.scale({factor:-1}).value().addInPlace(t.position)),t.setParent(e);n.offset&&(e.position=n.offset.value()),n.parent&&e.setParent(n.parent),d&&(0,u.ai)(d,e);const x=n.position;x&&(e.position=new i.Pa4(x.x,x.y,x.z));const f=n.rotation;return f&&e.addRotation(f.x,f.y,f.z),(x||f)&&e.computeWorldMatrix(),e}function S(e){return(0,a.ON)(e.physicsImpostor.mass)}function T(e,t){(0,d.ur)(e,t.value)}function O(e){return E(i.VO7.CreateBox(e.name??"box",{width:e.size.x.value,height:e.size.y.value,depth:e.size.z.value},e.scene),i.Q03.BoxImpostor,e)}function P(e){return E(i.VO7.CreateSphere(e.name??"sphere",{diameter:e.diameter.value},e.scene),i.Q03.SphereImpostor,e)}function k(e){const t=i.VO7.CreateCylinder(e.name??"cylinder",{height:e.height.value,diameter:e.diameter.value},e.scene);return"x"===e?.axis?t.rotationQuaternion=i._fP.FromLookDirectionLH(i.Pa4.Up(),i.Pa4.Right()):"z"===e?.axis&&(t.rotationQuaternion=i._fP.FromLookDirectionLH(i.Pa4.Up(),i.Pa4.Backward())),E(t,i.Q03.CylinderImpostor,e)}function C(e){return E(i.VO7.CreateCapsule(e.name??"capsule",{height:e.height.value,radius:e.diameter.value/2,...e.orientation?{orientation:e.orientation}:{}},e.scene),i.Q03.CapsuleImpostor,e)}function M(e,t){const n=e.physicsImpostor,s=t.physicsImpostor,i=n.friction*s.friction,o=n.mass*e.getScene().gravity.y;return(0,a.R2)(Math.abs(o*i))}function A(e,t,n,s){let r=n;r.units.label===a.lf.label&&(r=S(e).dot(r)),s?.asImpulseOverTime&&(r=r.dot(s.asImpulseOverTime));const c=t.normalizeToNew().scale(r.value),u=s?.offsetFromCenterOfMass?.value()??i.Pa4.ZeroReadOnly,l=e.getAbsolutePosition().add(u);void 0!==s?.debug&&(0,o.cM)("applyForce",{label:s?.debug,velocity:(0,x.J)(e),force:c}),r.units.label===a.ew.label?e.physicsImpostor.applyImpulse(c,l):e.physicsImpostor.applyForce(c,l)}class I extends l._z{constructor(e){super((0,l.jw)(e)),this.scene=e,this.collisions=new Map,this.cycle=0,this.onNotify(e.onAfterPhysicsObservable,(()=>this.checkCollisions())),this.onDispose((()=>this.collisions.clear()))}dispatch(e,t,n,s){const i=`${t.collider.uniqueId}.${n.collider.uniqueId}`,o=this.collisions.get(i);o?.lastSeen===e-1?o.lastSeen=e:(t.onStart?.({self:t,target:n,contact:s})??1)&&(o?o.lastSeen=e:this.collisions.set(i,{primary:t,secondary:n,lastSeen:e}))}checkCollisions(){const e=this.cycle,t=++this.cycle;(0,d.Pb)(this.scene,((e,n,s)=>{(e.onStart||e.onEnd)&&this.dispatch(t,e,n,s),(n.onStart||n.onEnd)&&(s.defaultRef="B",this.dispatch(t,n,e,s))}));for(const[n,s]of this.collisions.entries())s.lastSeen===e&&(s.primary.onEnd?.({self:s.primary,target:s.secondary}),s.lastSeen+60{for(const n of e.meshes)n.material===g&&(n.isVisible=t)})),new I(e),s}},"../../babs/lib/render/cameras.js":function(e,t,n){"use strict";n.d(t,{Pr:function(){return l},Q4:function(){return c},f8:function(){return d},vM:function(){return u}});var s=n("../../../node_modules/@babylonjs/core/index.js"),i=n("../../common/lib/core.js"),o=n("../../common/lib/identity.js");const r=Object.freeze(s._fP.RotationAxis(s.RDh.X,0)),a=Object.freeze(s.Pa4.One());function c(e){let t=e.activeCamera;return!t&&e.activeCameras&&e.activeCameras.length&&(t=e.activeCameras[0]),t??void 0}class u extends s.V1s{get rotationQuaternion(){return this.rotationQuaternion_}set rotationQuaternion(e){this.rotationQuaternion_.copyFrom(e),this.rotationDirty_=!0}set rotation(e){this.rotation_.copyFrom(e),s._fP.RotationYawPitchRollToRef(this.rotation_.y,this.rotation_.x,this.rotation_.z,this.rotationQuaternion_),this.rotationDirty_=!1}get rotation(){return this.rotationDirty_&&(this.rotationQuaternion_.toEulerAnglesToRef(this.rotation_),this.rotationDirty_=!1),this.rotation_}constructor(e,t,n,i){super(e,t.clone(),n,i),this.rotationQuaternion_=r.clone(),this.rotation_=this.rotationQuaternion_.toEulerAngles(),this.viewMatrix_=s.y3G.Zero(),this.rotationDirty_=!1}_initCache(){super._initCache(),this._cache.rotationQuaternion=new s._fP(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE)}_updateCache(e){e||super._updateCache(),this._cache.rotationQuaternion.copyFrom(this.rotationQuaternion_)}_isSynchronizedViewMatrix(){return!!super._isSynchronizedViewMatrix()&&this.rotationQuaternion_.equals(this._cache.rotationQuaternion)}_getViewMatrix(){if(s.RDh.Y.rotateByQuaternionToRef(this.rotationQuaternion_,this.upVector),s.y3G.ComposeToRef(a,this.rotationQuaternion_,this.position,this.viewMatrix_),this.parent){const e=this.parent.getWorldMatrix();this.viewMatrix_.multiplyToRef(e,this.viewMatrix_),this.viewMatrix_.getTranslationToRef(this._globalPosition),this.viewMatrix_.invert(),this._markSyncedWithParent()}else this._globalPosition.copyFrom(this.position),this.viewMatrix_.invert();return this.viewMatrix_}getClassName(){return"DirectionalCamera"}}const l=(0,o.Pn)()({full:4/3,wide:16/9,ultraWide:64/27,superUltraWide:32/9});function d(e,t){const n=t-e.position.z;if(n<=e.minZ||n>=e.maxZ)return;const o=s.zHn.CreateNew(e.viewport.x,e.viewport.y+e.viewport.height,e.viewport.width,e.viewport.height,s.y3G.IdentityReadOnly,e.getViewMatrix(),e.getProjectionMatrix()),r=(0,i.jK)(o.intersectsAxis("z",t)),a=s.zHn.CreateNew(e.viewport.x+e.viewport.width,e.viewport.y,e.viewport.width,e.viewport.height,s.y3G.IdentityReadOnly,e.getViewMatrix(),e.getProjectionMatrix()),c=(0,i.jK)(a.intersectsAxis("z",t));return{min:new s.FM8(r.x,r.y),max:new s.FM8(c.x,c.y)}}},"../../babs/lib/render/constants.js":function(e,t,n){"use strict";n.d(t,{G4:function(){return x},K2:function(){return c},SZ:function(){return d},V1:function(){return u},Yt:function(){return s},gt:function(){return _},sQ:function(){return h},sl:function(){return f}});var s,i,o=n("../../../node_modules/@babylonjs/core/index.js"),r=(n("../../common/lib/core.js"),n("../../babs/lib/common/membership.js")),a=n("../../babs/lib/common/nodes.js");(i=s=s||(s={})).prePass=0,i.opaque=1,i.other=2,i.meshDefault=i.opaque;const c=new r.Vp("Visible"),u=new r.Vp("Gui");let l=new r.O5(c,u);function d(){return l.tags}function x(e,...t){e.includeOnlyWithLayerMask=l.maskOf(t)}function f(e,...t){e.layerMask=l.maskOf(t)}function h(e){e.layerMask=l.maskOf(e)}function _(e){const t=l.maskOf(e);(0,a.$U)(e,(e=>e.layerMask=t),{applyToRoot:!0,type:o.x23})}},"../../babs/lib/render/image_asset.js":function(e,t,n){"use strict";n.d(t,{s:function(){return r}});var s=n("../../../node_modules/@babylonjs/gui/index.js"),i=n("../../common/lib/core.js"),o=n("../../babs/lib/common/asset.js");class r extends o.xR{constructor(e,t,n){super(e,t,n),this.onDispose((()=>{delete this.image_}))}share(){return(0,i.jK)(this.image_)}setImage(e){this.image_=new s.Ee(this.name),this.image_.domImage=e}}},"../../babs/lib/render/meshes.js":function(e,t,n){"use strict";n.d(t,{Dh:function(){return f},Tv:function(){return y},Yw:function(){return _},du:function(){return w},iK:function(){return p},yD:function(){return b},zS:function(){return h}});var s=n("../../../node_modules/@babylonjs/core/index.js"),i=(n("../../common/lib/core.js"),n("../../common/lib/identity.js")),o=n("../../common/lib/units.js"),r=(n("../../babs/lib/common/asset.js"),n("../../babs/lib/common/asset_manager.js"),n("../../babs/lib/common/debug_flags.js")),a=n("../../babs/lib/common/membership.js"),c=n("../../babs/lib/common/nodes.js"),u=n("../../babs/lib/common/scopes.js"),l=n("../../babs/lib/common/units.js"),d=n("../../babs/lib/physics/physics.js"),x=n("../../babs/lib/render/constants.js");function f(e,t){const n=(0,c.pf)((0,i.V9)(s.x23,t),e);return n.length?n[0]:void 0}function h(e,t,n){if(void 0!==n){const t=function(e,t){const n=(0,c.Ol)((0,i.V9)(s.x23,t),e);return n.length?n[0]:void 0}(e,n);if(!t)return;e=t}if(!e.skeleton)return;const o=e.skeleton.getBoneIndexByName(t);return 0!==o?{mesh:e,bone:e.skeleton.bones[o]}:void 0}function _(e,t){if(t??1){const t=e.getHierarchyBoundingVectors();return{size:l.f.of(t.max.subtract(t.min),o.J4),center:l.w.of(s.Pa4.Center(t.min,t.max),o.J4),minimum:l.w.of(t.min,o.J4),maximum:l.w.of(t.max,o.J4)}}{const t=e.getBoundingInfo();return{size:l.f.of(t.boundingBox.extendSizeWorld,o.J4),center:l.w.of(t.boundingBox.centerWorld,o.J4),minimum:l.w.of(t.boundingBox.minimumWorld,o.J4),maximum:l.w.of(t.boundingBox.maximumWorld,o.J4)}}}function b(e){(0,c.$U)(e,(t=>(0,a.ai)(e,t)))}function p(e,t){const n=e.createInstance(t);n.isVisible=e.isVisible,n.layerMask=e.layerMask;for(const t of(0,c.G)(s.Kj0,e)){const e=t.createInstance(t.name);e.isVisible=t.isVisible,e.layerMask=t.layerMask,e.parent=n}return n}let m,g,v=s.Wot.Green();function y(e,t){const n=m?.isEnabled??!1,i=t?.enable??!0,o=t?.color??v;if(n)for(const t of(0,c.go)(s.Kj0,e))r.cG.showColliders===(0,d.th)(t)&&(i?m?.addMesh(t,o):m?.removeMesh(t));else g&&(i?g.set(e,o.clone()):g.delete(e))}function w(e,t,n){g=new Map,r.Mz.enableHighlightLayer.onChanged((0,u.jw)(e),(({current:i})=>{m||(m=new s.H1p("highlights",e,{renderingGroupId:x.Yt.opaque,camera:t}),m.innerGlow=!1,n&&(v=n)),m.isEnabled=i,m.isEnabled&&(g?.forEach(((e,t)=>y(t,{enable:!0,color:e}))),g?.clear())}),{immediate:!0})}},"../../babs/lib/render/scene_asset.js":function(e,t,n){"use strict";n.d(t,{A:function(){return d}});var s=n("../../../node_modules/@babylonjs/core/index.js"),i=n("../../common/lib/core.js"),o=n("../../common/lib/identity.js"),r=n("../../babs/lib/common/asset.js"),a=n("../../babs/lib/common/asset_manager.js"),c=n("../../babs/lib/common/membership.js"),u=n("../../babs/lib/render/meshes.js"),l=n("../../babs/lib/render/shadows.js");class d extends r.xR{constructor(e,t,n,s){var i;super(e,t,n),this.options=s??{},(i=this.options).animations??(i.animations={}),this.onDispose((()=>{delete this.scene_}))}clone(e){(0,i.OR)(this.scene_);const t=(0,r.Y5)(),n=this.scene_.instantiateModelsToScene((n=>(0,a.NS)(n,e?.baseName,t))),d=(0,i.$1)(n.rootNodes[0],(0,o.V9)(s.x23)),x=(0,o.I2)(n.animationGroups.map((e=>[e.name,e]))),f=(0,o.Yl)((0,i.jK)(this.options.animations),((n,s)=>{const o=(0,a.NS)((0,a.bk)(this.name,s),e?.baseName,t);return(0,i.jK)(x[o])}));if(e?.animationScope)for(const t of n.animationGroups)e.animationScope.acquire(t);return(0,u.yD)(d),this.options.tags&&c.Vp.addTo(d,...this.options.tags),(0,l.nc)(d.getScene(),d),{mesh:d,animations:f}}share(){(0,i.OR)(this.scene_),this.scene_.addAllToScene();const e=this.scene_.meshes[0],t=(0,o.I2)(this.scene_.animationGroups.map((e=>[e.name,e])));return{mesh:e,animations:(0,o.Yl)((0,i.jK)(this.options.animations),((e,n)=>{const s=(0,a.bk)(this.name,n);return(0,i.jK)(t[s])}))}}setScene(e){this.scene_=e}}},"../../babs/lib/render/shadows.js":function(e,t,n){"use strict";n.d(t,{Gh:function(){return l},Rz:function(){return d},a$:function(){return x},nc:function(){return f},tM:function(){return u},u8:function(){return c}});var s=n("../../../node_modules/@babylonjs/core/index.js"),i=n("../../common/lib/identity.js"),o=n("../../babs/lib/common/membership.js"),r=n("../../babs/lib/common/nodes.js"),a=n("../../babs/lib/common/scopes.js");function c(e,t){const n=(0,a.V2)(e);n.shadows??(n.shadows=[]),n.shadows.push(t)}function u(e){return(0,a.V2)(e).shadows}function l(e,t){let n;if((0,i.$O)(t,s.Ox3)){const e=new s.RSz(1024,t);e.stabilizeCascades=!0,n=e}else n=new s.uXA(1024,t);n.forceBackFacesOnly=!0,n.transparencyShadow=!0,c(e,n)}const d=new o.Vp("ShadowCaster"),x=new o.Vp("ShadowReceiver");function f(e,...t){const n=u(e);if(n)for(const e of(0,r.go)(s.x23,...t))d.in(e)&&n.forEach((t=>t.addShadowCaster(e))),x.in(e)&&(e.receiveShadows=!0)}},"../../babs/lib/render/texture_asset.js":function(e,t,n){"use strict";n.d(t,{X:function(){return o}});var s=n("../../common/lib/core.js"),i=n("../../babs/lib/common/asset.js");class o extends i.xR{constructor(e,t,n,s){super(e,t,n),this.options=s??{},this.onDispose((()=>{delete this.texture_}))}share(){return(0,s.jK)(this.texture_)}clone(){return(0,s.jK)(this.texture_).clone()}setTexture(e){this.texture_=e}}},"../../common/lib/containers.js":function(e,t,n){"use strict";n.d(t,{CT:function(){return u},Od:function(){return r},WQ:function(){return c},_2:function(){return o},gC:function(){return a},tj:function(){return i}});var s=n("../../common/lib/identity.js");function i(e,t,n){let s=e.get(t);return void 0===s&&(s=n(),e.set(t,s)),s}function o(e,t){return(0,s.kJ)(e)?e:void 0!==e?[e]:t}function r(e,t){const n=e.indexOf(t);if(n<0)return!1;const s=e.pop();return n0;--s){if(n(e[s-1],t))return e[s]=t,e;e[s]=e[s-1]}return e[0]=t,e}function c(e,t=0){return Array.from({length:e},((e,n)=>n+t))}function u(e,t,n){const s=Array(e).fill(t);return"readonly"===n?Object.freeze(s):s}},"../../common/lib/core.js":function(e,t,n){"use strict";n.d(t,{$1:function(){return o.$1},AM:function(){return s.AM},B$:function(){return s.B$},BF:function(){return r.BF},EQ:function(){return o.EQ},H:function(){return s.H},J5:function(){return o.J5},M1:function(){return o.M1},OR:function(){return r.OR},OS:function(){return s.OS},Pc:function(){return a.P},QF:function(){return u},UL:function(){return o.UL},Xr:function(){return r.Xr},Yg:function(){return o.Yg},cM:function(){return s.cM},cW:function(){return s.cW},f_:function(){return c.f_},jK:function(){return r.jK},nL:function(){return s.hX},sH:function(){return c.sH},wh:function(){return o.wh}});var s=n("../../common/lib/core/logging.js"),i=n("../../common/lib/units.js"),o=n("../../common/lib/core/check.js"),r=n("../../common/lib/core/core.js"),a=n("../../common/lib/core/env.js"),c=n("../../common/lib/core/errors.js");function u(e,t){t??(t={});const{density:n,defaultStyle:o,calleeDepth:r,prettyDepth:a,logId:c,rate:u,omitDuplicates:l,emitSkips:d,...x}=t;t.logId??(t.logId=Symbol.for(e)),t.rate??(t.rate=(0,i._H)(3)),t.omitDuplicates??(t.omitDuplicates=!0),(0,s.cM)(e,x,t)}},"../../common/lib/core/check.js":function(e,t,n){"use strict";n.d(t,{$1:function(){return c},EQ:function(){return a},J5:function(){return f},M1:function(){return u},UL:function(){return d},Yg:function(){return l},wh:function(){return x}});var s=n("../../common/lib/core/core.js"),i=n("../../common/lib/core/errors.js"),o=(n("../../common/lib/identity.js"),n("../../common/lib/core/logging.js"));class r extends i.sH{constructor(){super("Not implemented")}}function a(e){throw console.error("Not implemented",e),new r}function c(e,t,...n){return(0,s.BF)(t(e),`checkType(value: ${(0,o.Qv)(e)})`,...n),e}function u(e,t,...n){return e!==t?(0,s.Xr)(`checkEqual ${(0,o.bn)(e)} !== ${(0,o.bn)(t)}`,...n):e}function l(e,t,...n){return e===t?(0,s.Xr)(`checkNotEqual ${e} === ${t}`,...n):e}function d(e,t,...n){return e<=t?(0,s.Xr)(`checkGreater ${e} <= ${t}`,...n):e}function x(e,t,...n){return e>t?(0,s.Xr)(`checkLessOrEqual ${e} > ${t}`,...n):e}function f(e,t,n,...i){return en?(0,s.Xr)(`checkRange ${t} <= ${e} <= ${n}`,...i):e}},"../../common/lib/core/core.js":function(e,t,n){"use strict";n.d(t,{BF:function(){return a},OR:function(){return u},Xr:function(){return r},jK:function(){return c}});var s=n("../../common/lib/core/errors.js"),i=n("../../common/lib/core/env.js");class o extends s.sH{}function r(e,...t){const n=[e,...t].map((e=>"string"==typeof e?e:e()));throw i.P||console.info("die with error:",...n),new o(n.join(" "))}function a(e,...t){e||r("check failed.",...t)}function c(e,...t){return null==e&&r("checkPresent failed.",...t),e}function u(e,...t){null==e&&r("assertIsPresent failed.",...t)}},"../../common/lib/core/env.js":function(e,t,n){"use strict";n.d(t,{P:function(){return s}});const s=!0},"../../common/lib/core/errors.js":function(e,t,n){"use strict";n.d(t,{f_:function(){return o},sH:function(){return s}});class s extends Error{constructor(e,t){super(e),this.args=t,this.name=this.constructor.name,Object.setPrototypeOf(this,new.target.prototype)}}const i=Symbol("Error.cohort");function o(e,t){const n=[];for(const s of e)try{t(s)}catch(e){if(!(e instanceof Error))throw e;n.push(e)}if(n.length){const e=n[0];throw n.length>1&&function(e,...t){e[i]??(e[i]=[]),e[i].push(...t)}(e,...n.slice(1)),e}}},"../../common/lib/core/logging.js":function(e,t,n){"use strict";n.d(t,{AM:function(){return A},B$:function(){return c},H:function(){return f},OS:function(){return S},Qv:function(){return h},bn:function(){return E},cM:function(){return F},cW:function(){return P},hX:function(){return j}});var s=n("../../common/lib/core/core.js"),i=n("../../common/lib/identity.js");function o(...e){return e.join("; ")}const r=["font-weight: normal","font-size: 12px","font-family: Calibri"],a=[...r,"display: inline-block","color: #ddd","background-color: #003366"],c={default:o(...r),inlineHeader:o(...a,"padding: 1px 5px 1px 5px","background-color: #000"),groupHeader:o(...a,"padding: 1px 300px 1px 5px","background-color: #000"),skipCount:o("font-size: 11px","font-family: Calibri","color: black","background-color: #5db0d7","border-radius: 8px","padding: 0px 3px 0px 3px","text-decoration: line-through"),keyword:o(...r,"color: #569cd6"),key:o(...r,"color: #9cdcfe"),method:o(...r,"color: #9cdcfe","font-style: italic"),value:o(...r),subtle:o(...r,"color: #777"),number:o(...r,"color: #b5cea8"),string:o(...r,"color: #ce9178"),type:o(...r,"color: #4ec9b0"),comment:o(...r,"color: #297"),highlight:o(...r,"color: #9cdcfe"),console:o(...r,"color: #297"),callSite:o(...r,"display: inline-block","color: #555","padding-left: 0.5em","margin-left: 0.5em","border-left: 1px solid #333")},u=console.log,l=console.warn,d=console.error;class x{constructor(e,t){this.value=e,this.options=t}format(){return this.options.format(this.value,this.options)}toString(){return this.options?.stringify?.(this.value)??this.format()[0].replace(/%c/g,"")}}function f(e){return t=>{(0,i.$O)(t,Error)?l(e??"Unexpected error.",t.message,t):d(e??"Unexpected object thrown as error.",t)}}function h(e){return(0,i.Kn)(e)?e.constructor.name:typeof e}var _,b;function p(e){let t=`${e.delims[0]} /*`;return void 0!==e.index&&(t+=` ${e.ref?"@":"#"}${e.index}`),void 0!==e.label&&(t+=` ${e.label}`),t+=" */",e.ref&&(t+=` ${e.delims[1]}`),t}(b=_=_||(_={}))[b.Stringify=0]="Stringify",b[b.Custom=1]="Custom";const m="undefined"!=typeof window&&void 0!==window.document,g="undefined"!=typeof process&&null!==process.versions&&null!==process.versions.node,v=[EventTarget],y=new Array;function w(e,t){y.push([e,p({delims:"{}",label:t,ref:!0})])}function j(...e){v.push(...e)}function E(e,t={},n){let s;if(t.impl===_.Stringify)s=JSON.stringify(e,void 0,2)??"undefined";else if(void 0===e)s="undefined";else if(null===e)s="null";else if("function"==typeof e)s="function";else if("object"==typeof e){const o=(0,i.kJ)(e),r=o?"[]":"{}";n??(n=new Map(y));const a=n.size-y.length,c=e.constructor?.name;s=p({delims:r,index:a,label:c,ref:!1}),n.set(e,p({delims:r,index:a,label:c,ref:!0}));const u=t.indent??"",l=u+" ";let d;d=o?e:v.some((t=>e instanceof t))?[]:(0,i.uc)(e,t);let x=0;for(const i of d){let r;if(!o&&"symbol"==typeof i&&!t.showSymbolKeys)continue;const a=o?i:e[i];if(r=n.get(a),void 0===r)if(r=E(a,{...t,indent:l},n),o);else if("undefined"===r&&!t.showUndefinedProperties)continue;if(++x>50){s+=`\n${l}…`;break}s+=o?`\n${l}${r}`:`\n${l}${String(i)}: ${r}`}s+=0===x?` ${r[1]}`:`\n${u}${r[1]}`}else s="string"==typeof e?`"${e}"`:"symbol"==typeof e?`${String(e)}`:`${e}`;const o=t.maxTotalLength??10024;return s.length<=o?s:"{"===s[0]?`${s.substring(0,o-2)}…}`:`${s.substring(0,o-1)}…`}function S(e,t=2){return Number(e.toFixed(t)).toString()}m?(w(window,"window"),w(document,"document")):g&&w(global,"global");const T={2:"0b",16:"0x"};function O(e,t){let n=(e>>>0).toString(t.base);return void 0!==t?.minDigits&&(n=n.padStart(t?.minDigits,"0")),[`%c${T[t.base]}%c${n}`,c.subtle,c.number]}function P(e,t){return new x(e,{base:2,minDigits:t,format:O})}var k;!function(e){e[e.Call=0]="Call",e[e.Return=1]="Return",e[e.Both=2]="Both"}(k||(k={}));const C=/\/([^/]+)\)/,M=new class{constructor(){this.map=new Map}set(e,t){return this.map.set(e,t),this}format(e){return(0,i.$O)(e,x)?e.format():this.map.get(e.constructor)?.(e)}};function A(e,t){M.set(e,t)}function I(e,t=0,n=5){if((0,i.kJ)(e)){if(t>0||0===e.length){const s=[],i=[];for(const o of e){if(n<=0){s.push("%c,…}"),i.push(c.subtle);break}const[e,...r]=I(o,t-1,n);s.push(e),i.push(c.subtle,...r),n-=1}return[`%c[${s.join("%c, ")}%c]`,...i,c.subtle]}return["%c[…]}",c.subtle]}if((0,i.Kn)(e)){const s=M.format(e);if(s)return s;if(e.toString!==Object.prototype.toString)return["%c%s",c.string,e.toString()];const o=[],r=[];if(e.constructor!==Object&&(o.push(`%c${e.constructor.name}`),r.push(c.type)),t>0){let s=!0;o.push("%c{"),r.push(c.subtle);for(const a of(0,i.uc)(e,{prioritizedKeys:["id","name"]})){const u=e[a];if(n<=0){o.push("%c, …}"),r.push(c.subtle);break}if(s?s=!1:(o.push(s?"%c{":"%c, "),r.push(c.subtle)),void 0===u)o.push(`%c${String(a)}%c?`),r.push(c.key,c.subtle);else if((0,i.mf)(u))o.push(`%c${String(a)}%c()`),r.push(c.method,c.subtle);else{const[e,...s]=I(u,t-1,n);o.push(`%c${String(a)}%c: ${e}`),r.push(c.key,c.subtle,...s)}n-=1}o.push("%c}"),r.push(c.subtle)}else o.push("%c{…}"),r.push(c.subtle);return[o.join(""),...r]}return(0,i.mf)(e)?[`%c${e.name}%c()`,c.method,c.subtle]:"number"==typeof e?[`%c${S(e,4)}`,c.number]:"string"==typeof e?e?[`%c${e}`,c.string]:["''"]:["boolean","null","undefined"].includes(typeof e)?[`%c${String(e)}`,c.keyword]:["%o",e]}const $=u,R={canSample:()=>!0,didSample:()=>{},skippedSamples:1,log:(e,t,n,...s)=>$(n,...s)};class N{static from(e){if(!e?.logId)return(0,s.BF)(void 0===e?.rate&&void 0===e?.omitDuplicates,"logging `rate` and `omitDuplicates` require `logId`"),R;let t=N.stateMap[e.logId];return t||(t=new N(e),N.stateMap[e.logId]=t),t}constructor(e){this.lastSample=0,this.lastLog="",this.skippedSamples=0,e.rate?"time"===e.rate.units.quantity.label?this.minDelay=1e3*e.rate.raw:this.minDelay=1e3/e.rate.raw:this.minDelay=0,this.omitDuplicates=e.omitDuplicates??!1}canSample(){return this.skippedSamples+=1,Date.now()-this.lastSample>=this.minDelay}didSample(){this.skippedSamples=0,this.lastSample=Date.now()}log(e,t,n,...s){if(this.omitDuplicates){const i=[n.slice(e),...s.slice(t)].join("");if(i===this.lastLog)return;this.lastLog=i}this.didSample(),$(n,...s)}}N.stateMap={};const D=(0,i.SC)().withDefaults({density:"inline",defaultStyle:c.default,calleeDepth:2,prettyDepth:2,prettyBreadth:5,emitSkips:!0,callSite:!0});function L(...e){return e.reduce(((e,t,n)=>{if(0===n)return t;let s=0;for(;s{if("string"==typeof e)return[`%c${e}`,[r]];{const[t,...n]=I(e,a,u);return[t,n]}}));else{const e=t;d=Object.keys(e).map((t=>{const[n,...s]=I(e[t],a,u);return[`%c${t}%c:${n}`,[c.highlight,c.subtle,...s]]}))}const x=o.callSite?function(e=1){const t=new Error;if(void 0===t.stack)return;const n=t.stack.split("\n");if(n.length<=e+1)return;const s=n[e+1].match(C);if(!s||s.length<2)return;let[i,o,r]=s[1].split(":");return"?"===i.charAt(i.length-1)&&(i=i.substring(0,i.length-1)),{file:i,line:o,column:r}}(o.calleeDepth):void 0;x&&d.push([`%c${x.file}:${x.line}:${x.column}`,[c.callSite]]);const f=[],h=[];let _=0,b=0;if(l>0&&o.emitSkips){const e=`%c${l}%c`;_=e.length+1,f.push(e),b=2,h.push(c.skipCount,r)}if(void 0!==e&&("inline"===o.density?(f.push(`%c${e}%c`),h.push(c.inlineHeader,r)):(f.push(`%c ${e} `.padEnd(80)),h.push(c.groupHeader))),"inline"===o.density)s.log(_,b,L(...f,...d.map((([e])=>e))),...h,...d.flatMap((([e,t])=>t)));else{s.didSample(),"expanded"===o.density?console.group(L(...f),...h):console.groupCollapsed(L(...f),...h);for(const[e,t]of d)$(e,...t);console.groupEnd()}}console.log=console.info=(e,...t)=>F(void 0,[e,...t],{defaultStyle:c.console,calleeDepth:3})},"../../common/lib/disposable.js":function(e,t,n){"use strict";n.d(t,{v:function(){return u}});var s,i,o,r=n("../../common/lib/core.js"),a=function(e,t,n,s,i){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?i.call(e,n):i?i.value=n:t.set(e,n),n},c=function(e,t,n,s){if("a"===n&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?s:"a"===n?s.call(e):s?s.value:t.get(e)};class u{static startTracking(e){a(this,s,e,"f",o),a(this,s,new Set,"f",i)}static stopTracking(){a(this,s,void 0,"f",i)}static snapshot(){return(0,r.OR)(c(this,s,"f",i),"You must call Tracked.startTracking() to begin tracking."),Array.from(c(this,s,"f",i).values())}static get label(){return c(this,s,"f",o)??""}constructor(){c(u,s,"f",i)?.add(this)}dispose(){return c(u,s,"f",i)?.delete(this),"You must call super.dispose() when overriding Tracked.dispose."}}s=u,i={value:void 0},o={value:void 0}},"../../common/lib/identity.js":function(e,t,n){"use strict";n.d(t,{fS:function(){return j},Vl:function(){return g},yR:function(){return p},lG:function(){return x},qX:function(){return r.qX},kJ:function(){return r.kJ},bf:function(){return r.bf},jn:function(){return r.jn},$K:function(){return r.$K},mf:function(){return r.mf},$O:function(){return r.$O},V9:function(){return r.V9},hj:function(){return r.hj},Kn:function(){return r.Kn},EN:function(){return r.EN},Bv:function(){return r.Bv},HD:function(){return r.HD},CH:function(){return r.CH},uc:function(){return w},Yl:function(){return f},QK:function(){return h},E0:function(){return _},x:function(){return o},I2:function(){return d},Pn:function(){return l},SC:function(){return u},pN:function(){return y},AL:function(){return v}});var s=n("../../common/lib/core/core.js"),i=n("../../common/lib/core/errors.js");function o(e,t=!1){return(t?Reflect.ownKeys:Object.keys)(e).map((t=>[t,e[t]]))}var r=n("../../common/lib/identity/type_guards.js");function a(...e){return e.reduce(((e,t)=>(Object.entries(t).forEach((([t,n])=>{if(void 0!==n){const s=e[t];(0,r.kJ)(n)?e[t]=n:(0,r.Kn)(n)&&(0,r.Kn)(s)?e[t]=a(s,n):e[t]=n}})),e)),{})}class c{constructor(e){this.defaults=e}apply(e){return Object.freeze(a(this.defaults,e??{}))}}function u(){return{withDefaults(e){return new c(e)}}}function l(){return e=>Object.freeze(e)}function d(e){return Object.fromEntries(e)}function x(e){return function(e){const t=d(o(e).map((([e,t])=>[t,e])));return Object.freeze({forward:Object.freeze(e),reverse:Object.freeze(t)})}(e)}function f(e,t){return Object.fromEntries(Object.entries(e).map((([e,n])=>[e,t(n,e)])))}function h(e,t){return function(e,t){return Object.defineProperties({},f(e,t))}(e,((e,n)=>({get:t(e,n)})))}function _(e){return Object.fromEntries(Object.entries(e).filter((([e,t])=>void 0!==t)))}class b extends i.sH{}function p(e){return e}function m(e){const t=[];for(;(0,r.Kn)(e)&&e!==Object.prototype;)t.push(e),e=Reflect.getPrototypeOf(e);return t}function g(e){return e}function v(e,t,n){let i=function(e,t){for(const n of m(e)){const e=Object.getOwnPropertyDescriptor(n,t);if(e)return{descriptor:e,prototype:n}}}(e,t);void 0===i&&((0,s.BF)(!0===n.allowUndefined,`The object does not have property ${String(t)}. If the property can be undefined, set allowUndefined.`),i={descriptor:{configurable:!0,value:void 0},prototype:e},Object.defineProperty(i.prototype,t,i.descriptor));const o=i.descriptor,r={get:()=>n.get(o.get?o.get.call(e):o.value),set:t=>(t=>o.set?o.set.call(e,t):o.value=t)(n.set(t))};Object.defineProperty(i.prototype,t,r);const a=i.prototype;return()=>{Object.defineProperty(a,t,o)}}function y(e,t,n){const s=n.onCall??p,i=n.onReturn??p,o=e[t];return e[t]=function(...t){t=s(t);const n=o.apply(e,t);return i(n)},()=>{e[t]=o}}function w(e,t){const n=t?.includePrototypes??!1,s=t?.includeInternal??!1,i=t?.prioritizedKeys??[],o=t?.filterTypes??["attribute"],a=[];s||a.push((e=>!e.startsWith("__"))),o.length&&a.push((t=>o.includes(function(e,t){let n=!0;for(const s of m(e)){const e=Object.getOwnPropertyDescriptor(s,t);if(e)return e.get||e.set?"accessor":n?"attribute":"method";n=!1}}(e,t)))),i.length&&a.push((e=>!i.includes(e)));const c=(n?m(e):[e]).map((e=>function(e){return Reflect.ownKeys(e)}(e).filter((e=>(0,r.HD)(e)&&a.every((t=>t(e)))))));return c.unshift(i.filter((0,r.wl)(e))),c.flat()}function j(e,t,n=!1){return e===t||((0,r.Kn)(e)&&(0,r.Kn)(t)&&e.constructor===t.constructor?e instanceof Date&&t instanceof Date?e.getTime()===t.getTime():Object.keys(e).every((s=>s in t&&(n?e[s]===t[s]:j(e[s],t[s]))))&&Object.keys(t).every((t=>t in e)):"number"==typeof e&&"number"==typeof t&&Number.isNaN(e)&&Number.isNaN(t))}Symbol("ReadOnlyProxy")},"../../common/lib/identity/type_guards.js":function(e,t,n){"use strict";function s(e){return void 0!==e}function i(e){return null==e}function o(e){return null!=e}function r(e){return"boolean"==typeof e}function a(e){return"number"==typeof e}function c(e){return"string"==typeof e}function u(e){return"function"==typeof e}n.d(t,{$K:function(){return s},$O:function(){return b},Bv:function(){return _},CH:function(){return x},EN:function(){return o},HD:function(){return c},Kn:function(){return f},V9:function(){return p},bf:function(){return d},hj:function(){return a},jn:function(){return r},kJ:function(){return l},mf:function(){return u},qX:function(){return i},wl:function(){return h}});const l=Array.isArray;function d(e){return t=>Array.isArray(t)&&t.every(e)}function x(...e){return t=>Array.isArray(t)&&t.every(((t,n)=>e[n](t)))}function f(e){return"object"==typeof e&&null!==e}function h(e){return t=>t in e}function _(e){return e}function b(e,t){return e instanceof t}function p(e,t){return n=>n instanceof e&&(t?.(n)??!0)}},"../../common/lib/iterators.js":function(e,t,n){"use strict";function s(e,t){let n=0;for(const s of e)t(s,n++)}function*i(e,t=0){for(let n=t;nn?n:e}function c(e,t,n,s=!0){return s&&(e=a(e,0,1)),t+(n-t)*e}function u(e,t,n,s=!0){let i=(e-t)/(n-t);return s&&(i=a(i,0,1)),i}function l(e,t,n){return Math.abs(t-e)=this.segments.length}constructor(e=0){this.defaultValue=e,this.segmentIndex=0,this.segmentTime=(0,i._H)(0),this.segments=[]}addSegment(e,t,n){const s=x.apply(n);if(s.start||1!==s.end||s.doClamp){const e=t;t=t=>c(e(t),s.start,s.end,s.doClamp)}this.segments.push({f:t,duration:e})}restart(){this.segmentIndex=0,this.segmentTime=(0,i._H)(0)}stop(){this.segmentIndex=this.segments.length,this.segmentTime=(0,i._H)(0)}update(e){for(;this.segmentIndex>>18,597399067),n=Math.imul(i^n>>>22,2869860233),s=Math.imul(t^s>>>17,951274213),i=Math.imul(n^i>>>19,2716044179),[(t^n^s^i)>>>0,(n^t)>>>0,(s^t)>>>0,(i^t)>>>0]}(e):"number"==typeof e&&(e=[e]),t??(t=e.length>3?"sfc":"mulberry"),t){case"mulberry":n=function(e){return()=>{let t=e+=1831565813;return t=Math.imul(t^t>>>15,1|t),t^=t+Math.imul(t^t>>>7,61|t),((t^t>>>14)>>>0)/4294967296}}(e[0]);break;case"sfc":n=function(e,t,n,s){return()=>{let i=(e>>>=0)+(t>>>=0)|0;return e=t^t>>>9,t=(n>>>=0)+(n<<3)|0,i=i+(s=1+(s>>>=0)|0)|0,n=(n=n<<21|n>>>11)+i|0,(i>>>0)/4294967296}}(e[0],e[1],e[2],e[3])}return{next:n}}let c=0;function u(e=r){const t=c++;return`${e.next().toString(36).substring(2)}_${t.toString(36)}_${Date.now().toString(36)}`}function l(e,t=r){return Math.floor(t.next()*e)}function d(e,t=r){return e[function(e,t=r){return(0,s.UL)(e.length,0),l(e.length,t)}(e,t)]}function x(e,t,n=r){return n.next()*(t-e)+e}function f(e,t,n=r){const s=Math.ceil(e),i=Math.floor(t);return Math.floor(n.next()*(i-s))+s}class h{constructor(...e){let t=0;this.thresholds=e.map((([e,n])=>(t+=e.valueInUnits(i.iA),[t,n]))),(0,s.wh)(t,1)}sample(e=r){const t=e.next(),n=this.thresholds.find((([e])=>te+t,N=(e,t)=>e-t,D=(e,t)=>e*t,L=(e,t)=>e/t,F=e=>-e,z=(e,t)=>e===t,B=(e,t)=>e!==t,V=(e,t)=>ee<=t,H=(e,t)=>e>t,K=(e,t)=>e>=t,W=(e,t,n)=>en?n:e;class U{constructor(e,t){this.units=e,this.value=t}get raw(){return this.map(D,this.units.engineRatio)}inUnits(e){if(e===this.units)return this;const t=this.units.engineRatio/e.engineRatio;return this.build(e,this.map(D,t))}valueInUnits(e){if(e===this.units)return this.value;const t=this.units.engineRatio/e.engineRatio;return this.map(D,t)}negate(){return this.build(this.units,this.map(F))}add(e){const t=e.valueInUnits(this.units);return this.build(this.units,this.map(R,t))}subtract(e){const t=e.valueInUnits(this.units);return this.build(this.units,this.map(N,t))}min(e){const t=e.valueInUnits(this.units);return this.build(this.units,this.map(Math.min,t))}max(e){const t=e.valueInUnits(this.units);return this.build(this.units,this.map(Math.max,t))}clamp(e,t){const n=e.valueInUnits(this.units),s=t.valueInUnits(this.units);return this.build(this.units,this.map(W,n,s))}floor(){return this.build(this.units,this.map(Math.floor))}ceiling(){return this.build(this.units,this.map(Math.ceil))}scale(e){return e instanceof U&&((0,v.M1)(e.units.quantity,P.i),e=e.valueInUnits(de)),this.build(this.units,this.map(D,e))}factor(e){const t=e.valueInUnits(this.units);return this.map(L,t)}distanceTo(e){return I.build(this.units,Math.sqrt(this.subtract(e).reduce(((e,t)=>e+t*t),0)))}minDimension(){return I.build(this.units,this.reduce(((e,t)=>Math.min(e,t)),Number.MAX_VALUE))}maxDimension(){return I.build(this.units,this.reduce(((e,t)=>Math.max(e,t)),-Number.MAX_VALUE))}dot(e){const t=this.units.dot(e.units),n=e.value;return this.build(t,this.map(D,n))}per(e){const t=this.units.per(e.units),n=e.value;return this.build(t,this.map(L,n))}isEqualTo(e){return this.compare(z,e)}isNotEqualTo(e){return this.compare(B,e)}isLessThan(e){return this.compare(V,e)}isLessThanOrEqualTo(e){return this.compare(G,e)}isGreaterThan(e){return this.compare(H,e)}isGreaterThanOrEqualTo(e){return this.compare(K,e)}isCloseTo(e,t){const n=e.subtract(t),s=e.add(t);return n.isLessThanOrEqualTo(this)&&this.isLessThanOrEqualTo(s)}valueOf(){throw new TypeError(`Quantity does not allow implicit conversion. Use 'this.raw' instead. Current value: ${this.toString()}`)}}class q extends U{static of(e){return{units:e,build:t=>new q(e,t),guard:g.hj,serialize:m.yR,deserialize:m.yR}}static from(e,t){return(0,g.hj)(t)?new q(e,t):t.inUnits(e)}toString(){return`${(0,p.OS)(this.value)}${this.units.label}`}build(e,t){return new q(e,t)}map(e,t,n){return e(this.value,t??NaN,n??NaN)}reduce(e,t){return e(t,this.raw)}compare(e,t){return e(this.raw,t.raw)}}(0,p.AM)(q,(e=>[`%c${(0,p.OS)(e.value,2)}%c${e.units.label}`,p.B$.number,p.B$.subtle]));var Q=n("../../common/lib/containers.js");class Z extends U{static of(e,t){return{units:t,build:n=>new Z(t,n,e),guard:(0,m.bf)(m.hj),serialize:m.yR,deserialize:t=>t.length===e?Object.freeze(t):void 0}}static from(e,t){let n;if(t)n=e;else{const s=e;n=s.map((e=>e.value)),t=s[0].units}return new Z(t,n)}constructor(e,t,n){(0,m.hj)(t)&&(t=(0,Q.CT)(n,t,"readonly")),super(e,t)}at(e){return q.from(this.units,this.value[e])}valueAt(e){return this.value[e]}rawAt(e){return this.raw[e]}toString(){return`(${this.value.map((e=>(0,p.OS)(e))).join(",")})${this.units.label}`}build(e,t){return new Z(e,t,this.value.length)}map(e,t,n){const s=new Array(this.value.length);for(let i=0;i[`%c(${e.value.map((e=>`${(0,p.OS)(e,2)}%c`)).join(",")})${e.units.label}`,p.B$.subtle,e.value.map((()=>[p.B$.number,p.B$.subtle]))])),I.build=function(e,...t){return 1===t.length?new q(e,t[0]):((0,b.wh)(t.length,4),Z.from(t,e))};const J=$.create(1,"m",w.i),X=($.of(1e3,J,"km"),$.of(.3048,J,"ft"),$.create(1,"kg",E.i)),Y=($.of(.001,X,"g"),$.of(.453592,X,"lb"),$.create(1,"s",j.i)),ee=$.of(60,Y,"min"),te=$.of(60,ee,"hr"),ne=($.of(24,te,"d"),$.of(.001,Y,"ms")),se=($.of(1e-6,Y,"μs"),$.of(1e-9,Y,"ns"),J.per(Y)),ie=se.per(Y),oe=X.dot(ie),re=oe.dot(Y),ae=$.create(1,"rad",S.i),ce=$.of(Math.PI/180,ae,"°"),ue=(ae.per(Y),ce.per(Y)),le=$.create(1,"",T.i),de=(le(1).per(Y(1)),$.create(1,"",P.i)),xe=$.create(.01,"%",P.i),fe=$.create(1,"cyc",O.i).per(Y)}},i={};function o(e){var t=i[e];if(void 0!==t)return t.exports;var n=i[e]={id:e,exports:{}};return s[e](n,n.exports,o),n.exports}o.m=s,e=[],o.O=function(t,n,s,i){if(!n){var r=1/0;for(l=0;l=i)&&Object.keys(o.O).every((function(e){return o.O[e](n[c])}))?n.splice(c--,1):(a=!1,i0&&e[l-1][2]>i;l--)e[l]=e[l-1];e[l]=[n,s,i]},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,{a:t}),t},o.d=function(e,t){for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.f={},o.e=function(e){return Promise.all(Object.keys(o.f).reduce((function(t,n){return o.f[n](e,t),t}),[]))},o.u=function(e){return{46:"scene.ld51-index-ts",285:"scene.ld52-index-ts",338:"scene.template-index-ts",381:"scene.infra-index-ts",782:"scene.demolition-index-ts",868:"scene.unladen-index-ts",893:"scene.roguerally-index-ts",947:"scene.jukebox-index-ts"}[e]+"."+{46:"609701b51a58fad73257",285:"49f65d759c7a8317de67",338:"ac09db258fb06812a84d",381:"ed1e1e5faa9cfa500c11",782:"f92087a74c014cd161e9",868:"fe70165ba20475424a5c",893:"f0d7dcf639c73ab0c7d1",947:"7cc80b0947904dad666d"}[e]+".js"},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t={},n="@ld/apps.ludathon:",o.l=function(e,s,i,r){if(t[e])t[e].push(s);else{var a,c;if(void 0!==i)for(var u=document.getElementsByTagName("script"),l=0;l