@uptimizr/dashboard 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.md +76 -0
- package/out/404.html +1 -0
- package/out/__next.__PAGE__.txt +9 -0
- package/out/__next._full.txt +20 -0
- package/out/__next._head.txt +6 -0
- package/out/__next._index.txt +5 -0
- package/out/__next._tree.txt +4 -0
- package/out/_next/static/93W3szqylNKDg-afLRmVW/_buildManifest.js +11 -0
- package/out/_next/static/93W3szqylNKDg-afLRmVW/_clientMiddlewareManifest.js +1 -0
- package/out/_next/static/93W3szqylNKDg-afLRmVW/_ssgManifest.js +1 -0
- package/out/_next/static/chunks/0-2y-_oomza2l.js +87 -0
- package/out/_next/static/chunks/00k_j_r7bv_eb.js +266 -0
- package/out/_next/static/chunks/00zdau6mcqeae.js +1 -0
- package/out/_next/static/chunks/023axeoslq39i.js +1 -0
- package/out/_next/static/chunks/068j6934u8j16.js +1 -0
- package/out/_next/static/chunks/0_rf76jneiwal.js +176 -0
- package/out/_next/static/chunks/0aznt7717miff.js +1 -0
- package/out/_next/static/chunks/0cu-q5q3a7uf3.js +1 -0
- package/out/_next/static/chunks/0cz1d0mv5g_q7.js +1 -0
- package/out/_next/static/chunks/0dm32-jq30tg8.js +1 -0
- package/out/_next/static/chunks/0dn0yx0rn6mpf.js +1 -0
- package/out/_next/static/chunks/0flc7nppbmsl1.js +3 -0
- package/out/_next/static/chunks/0fskcfh9vbhtv.js +1 -0
- package/out/_next/static/chunks/0gv7mblzv3dl3.js +87 -0
- package/out/_next/static/chunks/0impkpmxx3ttp.js +1 -0
- package/out/_next/static/chunks/0jmn7u31w95ly.js +91 -0
- package/out/_next/static/chunks/0n8n481szj90g.js +1 -0
- package/out/_next/static/chunks/0o6ayai0s01js.js +1 -0
- package/out/_next/static/chunks/0rys92_73hdb0.js +22 -0
- package/out/_next/static/chunks/0tl_moiyi2txt.js +1 -0
- package/out/_next/static/chunks/0tx1j_ghpz7rc.css +3 -0
- package/out/_next/static/chunks/0ufbyo1x3qkmo.js +1 -0
- package/out/_next/static/chunks/0v82oqyoy9zol.js +1 -0
- package/out/_next/static/chunks/0wrm9jr-9bw0e.js +1893 -0
- package/out/_next/static/chunks/0wwcfw8i3j_zx.js +1 -0
- package/out/_next/static/chunks/0ys9-ozuluawt.js +1 -0
- package/out/_next/static/chunks/1-61zh4waha61.js +1 -0
- package/out/_next/static/chunks/10r_824wzt8hj.js +1 -0
- package/out/_next/static/chunks/112hws17nz665.js +7 -0
- package/out/_next/static/chunks/123xxske5c9na.js +1 -0
- package/out/_next/static/chunks/13isnf0--pmx1.js +1 -0
- package/out/_next/static/chunks/157d9euci08yu.js +1 -0
- package/out/_next/static/chunks/15s7425ffrec9.js +3 -0
- package/out/_next/static/chunks/163fa70v4mgxj.js +1 -0
- package/out/_next/static/chunks/17q0c2h5ui10r.js +4 -0
- package/out/_next/static/chunks/18u58lorfahxi.js +4 -0
- package/out/_next/static/chunks/1_aahautsz2v_.js +1 -0
- package/out/_next/static/chunks/1a9l89j7e6mqu.js +23 -0
- package/out/_next/static/chunks/1dsy2ngmfflis.js +123 -0
- package/out/_next/static/chunks/1flb8adpj6_2o.js +62 -0
- package/out/_next/static/chunks/1lsg-22yob8dx.js +1 -0
- package/out/_next/static/chunks/1nj82er7msdto.js +2 -0
- package/out/_next/static/chunks/1o1d0p-v1z8ty.js +1 -0
- package/out/_next/static/chunks/1pdep2_c530sg.js +1 -0
- package/out/_next/static/chunks/1thjncpj7u6pq.js +1 -0
- package/out/_next/static/chunks/1vdjn0pkoyypn.js +1 -0
- package/out/_next/static/chunks/1yehxf-fmeicg.js +1 -0
- package/out/_next/static/chunks/1zvc1tv--w8nn.js +1 -0
- package/out/_next/static/chunks/1zx2q-r32thv1.js +4 -0
- package/out/_next/static/chunks/2-sjjedfr0kfq.js +1 -0
- package/out/_next/static/chunks/21o42k82w4llc.js +1 -0
- package/out/_next/static/chunks/25b9x-li-tvk2.js +1 -0
- package/out/_next/static/chunks/2712627rfsmwn.js +1 -0
- package/out/_next/static/chunks/296w2ke-v5tbm.js +9 -0
- package/out/_next/static/chunks/29tfeb6amdkjb.js +23 -0
- package/out/_next/static/chunks/2a3spdq-m8drh.js +3 -0
- package/out/_next/static/chunks/2aelw3far6rii.js +1 -0
- package/out/_next/static/chunks/2aor7m-wbis85.js +1 -0
- package/out/_next/static/chunks/2cbmf9m7lqv6k.js +4 -0
- package/out/_next/static/chunks/2d09v5u7dfq0q.js +1 -0
- package/out/_next/static/chunks/2feca0xcipcyt.js +850 -0
- package/out/_next/static/chunks/2fh-_9b6tqhvb.js +1 -0
- package/out/_next/static/chunks/2g5gecypj0rqe.js +1 -0
- package/out/_next/static/chunks/2kazjq29jeamx.js +1109 -0
- package/out/_next/static/chunks/2p2vv6cc9i-3q.js +255 -0
- package/out/_next/static/chunks/2szdcpl41-kzv.js +1 -0
- package/out/_next/static/chunks/2tws5udjdcmh3.js +1 -0
- package/out/_next/static/chunks/2u6shh3oeycm-.js +1 -0
- package/out/_next/static/chunks/2unhhuv0arlcv.js +1 -0
- package/out/_next/static/chunks/2xwy0-qfho1iz.js +91 -0
- package/out/_next/static/chunks/2ycvtdd68gub7.js +1 -0
- package/out/_next/static/chunks/2yiy_l8bwiw2_.js +3 -0
- package/out/_next/static/chunks/2yph6f7khgqii.js +1 -0
- package/out/_next/static/chunks/3-shckrcpvbxu.js +1681 -0
- package/out/_next/static/chunks/30fq_t9e2_fv-.js +1 -0
- package/out/_next/static/chunks/30yzu213bqtq0.js +5 -0
- package/out/_next/static/chunks/310uz81hnnzsu.js +1 -0
- package/out/_next/static/chunks/3218lp8l0a5g_.js +1 -0
- package/out/_next/static/chunks/35h5n42wxwgzk.js +123 -0
- package/out/_next/static/chunks/37vzwr3ciejf1.js +1 -0
- package/out/_next/static/chunks/38fhw7fatsyvd.js +3 -0
- package/out/_next/static/chunks/3be6s4_kn9q-o.js +1 -0
- package/out/_next/static/chunks/3i3gbhccmhu7j.js +210 -0
- package/out/_next/static/chunks/3l1dr_qm_x5kp.js +1 -0
- package/out/_next/static/chunks/3mqy-84_ul3t2.js +1 -0
- package/out/_next/static/chunks/3nz-dh9d7cehk.js +1 -0
- package/out/_next/static/chunks/3pufs8g4ui943.js +1 -0
- package/out/_next/static/chunks/3sjq_xoi4rbyg.js +31 -0
- package/out/_next/static/chunks/3t06schbtqonl.js +1 -0
- package/out/_next/static/chunks/3v3-7fio3nw_t.js +1 -0
- package/out/_next/static/chunks/3v5ha25nxo43j.js +1 -0
- package/out/_next/static/chunks/3yfrsm8lfi6ls.js +22 -0
- package/out/_next/static/chunks/3zskk1hxu3-_o.js +1 -0
- package/out/_next/static/chunks/turbopack-2ropzf0axp1x9.js +1 -0
- package/out/_next/static/media/0c89a48fa5027cee-s.p.2cyn07wtgehh0.woff2 +0 -0
- package/out/_next/static/media/13bf9871fe164e7f-s.2f7nqdagzwx2-.woff2 +0 -0
- package/out/_next/static/media/28868e710e86be81-s.2eksvhm1z0jwa.woff2 +0 -0
- package/out/_next/static/media/32687112bd2dd8db-s.1gepa_7fcx9fm.woff2 +0 -0
- package/out/_next/static/media/3fe682a82f50d426-s.0vfdmo25voy_0.woff2 +0 -0
- package/out/_next/static/media/70bc3e132a0a741e-s.p.3t6q91iet4nsy.woff2 +0 -0
- package/out/_next/static/media/71b036adf157cdcf-s.0bp8oijd_gu96.woff2 +0 -0
- package/out/_next/static/media/89b21bb081cb7469-s.1fby2rem9ngyr.woff2 +0 -0
- package/out/_next/static/media/cc545e633e20c56d-s.176arc174-8zp.woff2 +0 -0
- package/out/_next/static/media/icon.08h29dad3pcxg.svg +4 -0
- package/out/_not-found/__next._full.txt +16 -0
- package/out/_not-found/__next._head.txt +6 -0
- package/out/_not-found/__next._index.txt +5 -0
- package/out/_not-found/__next._not-found.__PAGE__.txt +5 -0
- package/out/_not-found/__next._not-found.txt +5 -0
- package/out/_not-found/__next._tree.txt +2 -0
- package/out/_not-found.html +1 -0
- package/out/_not-found.txt +16 -0
- package/out/api/projects +1 -0
- package/out/icon.svg +4 -0
- package/out/index.html +1 -0
- package/out/index.txt +20 -0
- package/out/logo.svg +46 -0
- package/package.json +67 -0
- package/server/standalone.mjs +182 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,24574,e=>{"use strict";class t{get underlyingResource(){return null}constructor(){this.references=0,this.capacity=0,this.is32Bits=!1,this.uniqueId=t._Counter++}}t._Counter=0,e.s(["DataBuffer",0,t])},18064,30419,29485,e=>{"use strict";e.s(["IsWrapper",0,function(e){return void 0===e.getPipelineContext}],18064),e.s(["WebGLShaderProcessor",0,class{constructor(){this.shaderLanguage=0}postProcessor(e,t,r,i,s){return s.drawBuffersExtensionDisabled&&(e=e.replace(/#extension.+GL_EXT_draw_buffers.+(enable|require)/g,"")),e}}],30419);let t=/(flat\s)?\s*varying\s*.*/;e.s(["WebGL2ShaderProcessor",0,class{constructor(){this.shaderLanguage=0}attributeProcessor(e){return e.replace("attribute","in")}varyingCheck(e,r){return t.test(e)}varyingProcessor(e,t){return e.replace("varying",t?"in":"out")}postProcessor(e,t,r){let i=-1!==e.search(/#extension.+GL_EXT_draw_buffers.+require/);if(e=(e=e.replace(/#extension.+(GL_OVR_multiview2|GL_OES_standard_derivatives|GL_EXT_shader_texture_lod|GL_EXT_frag_depth|GL_EXT_draw_buffers).+(enable|require)/g,"")).replace(/texture2D\s*\(/g,"texture("),r){let r=-1!==e.search(/layout *\(location *= *0\) *out/g),s=-1!==t.indexOf("#define DUAL_SOURCE_BLENDING");s&&(e="#extension GL_EXT_blend_func_extended : require\n"+e),e=(e=(e=(e=(e=(e=(e=e.replace(/texture2DLodEXT\s*\(/g,"textureLod(")).replace(/textureCubeLodEXT\s*\(/g,"textureLod(")).replace(/textureCube\s*\(/g,"texture(")).replace(/gl_FragDepthEXT/g,"gl_FragDepth")).replace(/gl_FragColor/g,"glFragColor")).replace(/gl_FragData/g,"glFragData")).replace(/void\s+?main\s*\(/g,(i||r?"":s?"layout(location = 0, index = 0) out vec4 glFragColor;\nlayout(location = 0, index = 1) out vec4 glFragColor2;\n":"layout(location = 0) out vec4 glFragColor;\n")+"void main(")}else if(t.indexOf("#define VERTEXOUTPUT_INVARIANT")>=0&&(e="invariant gl_Position;\n"+e),-1!==t.indexOf("#define MULTIVIEW"))return"#extension GL_OVR_multiview2 : require\nlayout (num_views = 2) in;\n"+e;return e}}],29485)},20483,e=>{"use strict";var t=e.i(24574);class r extends t.DataBuffer{constructor(e){super(),this._buffer=e}get underlyingResource(){return this._buffer}}e.s(["WebGLDataBuffer",0,r])},68179,e=>{"use strict";function t(e){let t=r(e),s=i(e);return t-e>e-s?s:t}function r(e){return e--,e|=e>>1,e|=e>>2,e|=e>>4,e|=e>>8,e|=e>>16,++e}function i(e){return e|=e>>1,e|=e>>2,e|=e>>4,e|=e>>8,(e|=e>>16)-(e>>1)}e.s(["FloorPOT",0,i,"GetExponentOfTwo",0,function(e,s,a=2){let n;switch(a){case 1:n=i(e);break;case 2:n=t(e);break;default:n=r(e)}return Math.min(n,s)},"IsExponentOfTwo",0,function(e){let t=1;do t*=2;while(t<e)return t===e},"Mix",0,function(e,t,r){return e*(1-r)+t*r},"NearestPOT",0,t])},71379,40462,79814,e=>{"use strict";var t,r,i,s,a,n,_,l,h=e.i(99904),u=e.i(8881),o=e.i(76535),c=e.i(18064),g=e.i(13379),f=e.i(64545),d=e.i(30419),E=e.i(29485),T=e.i(20483),R=e.i(68179);class p{get underlyingResource(){return this._webGLTexture}constructor(e=null,t){if(this._MSAARenderBuffers=null,this._context=t,!e&&!(e=t.createTexture()))throw Error("Unable to create webGL texture");this.set(e)}setUsage(){}set(e){this._webGLTexture=e}reset(){this._webGLTexture=null,this._MSAARenderBuffers=null}addMSAARenderBuffer(e){this._MSAARenderBuffers||(this._MSAARenderBuffers=[]),this._MSAARenderBuffers.push(e)}releaseMSAARenderBuffers(){if(this._MSAARenderBuffers){for(let e of this._MSAARenderBuffers)this._context.deleteRenderbuffer(e);this._MSAARenderBuffers=null}}getMSAARenderBuffer(e=0){return this._MSAARenderBuffers?.[e]??null}release(){this.releaseMSAARenderBuffers(),this._webGLTexture&&this._context.deleteTexture(this._webGLTexture),this.reset()}}e.s(["WebGLHardwareTexture",0,p],40462);var A=e.i(84201),x=e.i(75017),S=e.i(28799);function b(e){return 13===e||14===e||15===e||16===e||17===e||18===e||19===e}function m(e){return 13===e||17===e||18===e||19===e}e.s(["HasStencilAspect",0,m,"IsDepthTexture",0,b],79814);var B=e.i(41520),C=e.i(75405);class P{}class L extends o.AbstractEngine{get name(){return this._name}set name(e){this._name=e}get version(){return this._webGLVersion}static get ShadersRepository(){return h.Effect.ShadersRepository}static set ShadersRepository(e){h.Effect.ShadersRepository=e}get supportsUniformBuffers(){return this.webGLVersion>1&&!this.disableUniformBuffers}get needPOTTextures(){return this._webGLVersion<2||this.forcePOTTextures}get _supportsHardwareTextureRescaling(){return!1}set framebufferDimensionsObject(e){this._framebufferDimensionsObject=e}snapshotRenderingReset(){this.snapshotRendering=!1}constructor(e,t,r,i){let s;if(r=r||{},super(t??r.antialias,r,i),this._name="WebGL",this.forcePOTTextures=!1,this.validateShaderPrograms=!1,this.disableUniformBuffers=!1,this._webGLVersion=1,this._vertexAttribArraysEnabled=[],this._uintIndicesCurrentlySet=!1,this._currentBoundBuffer=[],this._currentFramebuffer=null,this._dummyFramebuffer=null,this._currentBufferPointers=[],this._currentInstanceLocations=[],this._currentInstanceBuffers=[],this._vaoRecordInProgress=!1,this._mustWipeVertexAttributes=!1,this._nextFreeTextureSlots=[],this._maxSimultaneousTextures=0,this._maxMSAASamplesOverride=null,this._unpackFlipYCached=null,this.enableUnpackFlipYCached=!0,this._boundUniforms={},!e)return;if(e.getContext){if(s=e,void 0===r.preserveDrawingBuffer&&(r.preserveDrawingBuffer=!1),void 0===r.xrCompatible&&(r.xrCompatible=!1),navigator&&navigator.userAgent){this._setupMobileChecks();const e=navigator.userAgent;for(const t of L.ExceptionList){const i=t.key,s=t.targets;if(new RegExp(i).test(e)){if(t.capture&&t.captureConstraint){const r=t.capture,i=t.captureConstraint,s=new RegExp(r).exec(e);if(s&&s.length>0&&parseInt(s[s.length-1])>=i)continue}for(const e of s)switch(e){case"uniformBuffer":this.disableUniformBuffers=!0;break;case"vao":this.disableVertexArrayObjects=!0;break;case"antialias":r.antialias=!1;break;case"maxMSAASamples":this._maxMSAASamplesOverride=1}}}}if(this._doNotHandleContextLost?this._onContextLost=()=>{(0,u.deleteStateObject)(this._gl)}:(this._onContextLost=e=>{e.preventDefault(),this._contextWasLost=!0,(0,u.deleteStateObject)(this._gl),g.Logger.Warn("WebGL context lost."),this.onContextLostObservable.notifyObservers(this)},this._onContextRestored=()=>{this._restoreEngineAfterContextLost(()=>this._initGLContext())},s.addEventListener("webglcontextrestored",this._onContextRestored,!1),r.powerPreference=r.powerPreference||"high-performance"),s.addEventListener("webglcontextlost",this._onContextLost,!1),this._badDesktopOS&&(r.xrCompatible=!1),!r.disableWebGL2Support)try{this._gl=s.getContext("webgl2",r)||s.getContext("experimental-webgl2",r),this._gl&&(this._webGLVersion=2,this._shaderPlatformName="WEBGL2",this._gl.deleteQuery||(this._webGLVersion=1,this._shaderPlatformName="WEBGL1"))}catch(e){}if(!this._gl){if(!s)throw Error("The provided canvas is null or undefined.");try{this._gl=s.getContext("webgl",r)||s.getContext("experimental-webgl",r)}catch(e){throw Error("WebGL not supported",{cause:e})}}if(!this._gl)throw Error("WebGL not supported")}else{this._gl=e,s=this._gl.canvas,this._gl.renderbufferStorageMultisample?(this._webGLVersion=2,this._shaderPlatformName="WEBGL2"):this._shaderPlatformName="WEBGL1";const t=this._gl.getContextAttributes();t&&(r.stencil=t.stencil)}this._sharedInit(s),this._gl.pixelStorei(this._gl.UNPACK_COLORSPACE_CONVERSION_WEBGL,this._gl.NONE),void 0!==r.useHighPrecisionFloats&&(this._highPrecisionShadersAllowed=r.useHighPrecisionFloats),this.resize(),this._initGLContext(),this._initFeatures();for(let e=0;e<this._caps.maxVertexAttribs;e++)this._currentBufferPointers[e]=new P;this._shaderProcessor=this.webGLVersion>1?new E.WebGL2ShaderProcessor:new d.WebGLShaderProcessor;const a=`Babylon.js v${L.Version}`;g.Logger.Log(a+` - ${this.description}`),this._renderingCanvas&&this._renderingCanvas.setAttribute&&this._renderingCanvas.setAttribute("data-engine",a);const n=(0,u.getStateObject)(this._gl);n.validateShaderPrograms=this.validateShaderPrograms,n.parallelShaderCompile=this._caps.parallelShaderCompile}_clearEmptyResources(){this._dummyFramebuffer=null,super._clearEmptyResources()}_getShaderProcessingContext(e){return null}areAllEffectsReady(){for(let e in this._compiledEffects)if(!this._compiledEffects[e].isReady())return!1;return!0}_initGLContext(){this._caps={maxTexturesImageUnits:this._gl.getParameter(this._gl.MAX_TEXTURE_IMAGE_UNITS),maxCombinedTexturesImageUnits:this._gl.getParameter(this._gl.MAX_COMBINED_TEXTURE_IMAGE_UNITS),maxVertexTextureImageUnits:this._gl.getParameter(this._gl.MAX_VERTEX_TEXTURE_IMAGE_UNITS),maxTextureSize:this._gl.getParameter(this._gl.MAX_TEXTURE_SIZE),maxSamples:this._webGLVersion>1?this._gl.getParameter(this._gl.MAX_SAMPLES):1,maxCubemapTextureSize:this._gl.getParameter(this._gl.MAX_CUBE_MAP_TEXTURE_SIZE),maxRenderTextureSize:this._gl.getParameter(this._gl.MAX_RENDERBUFFER_SIZE),maxVertexAttribs:this._gl.getParameter(this._gl.MAX_VERTEX_ATTRIBS),maxVaryingVectors:this._gl.getParameter(this._gl.MAX_VARYING_VECTORS),maxFragmentUniformVectors:this._gl.getParameter(this._gl.MAX_FRAGMENT_UNIFORM_VECTORS),maxVertexUniformVectors:this._gl.getParameter(this._gl.MAX_VERTEX_UNIFORM_VECTORS),shaderFloatPrecision:0,parallelShaderCompile:this._gl.getExtension("KHR_parallel_shader_compile")||void 0,standardDerivatives:this._webGLVersion>1||null!==this._gl.getExtension("OES_standard_derivatives"),maxAnisotropy:1,astc:this._gl.getExtension("WEBGL_compressed_texture_astc")||this._gl.getExtension("WEBKIT_WEBGL_compressed_texture_astc"),bptc:this._gl.getExtension("EXT_texture_compression_bptc")||this._gl.getExtension("WEBKIT_EXT_texture_compression_bptc"),s3tc:this._gl.getExtension("WEBGL_compressed_texture_s3tc")||this._gl.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc"),s3tc_srgb:this._gl.getExtension("WEBGL_compressed_texture_s3tc_srgb")||this._gl.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc_srgb"),pvrtc:this._gl.getExtension("WEBGL_compressed_texture_pvrtc")||this._gl.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),etc1:this._gl.getExtension("WEBGL_compressed_texture_etc1")||this._gl.getExtension("WEBKIT_WEBGL_compressed_texture_etc1"),etc2:this._gl.getExtension("WEBGL_compressed_texture_etc")||this._gl.getExtension("WEBKIT_WEBGL_compressed_texture_etc")||this._gl.getExtension("WEBGL_compressed_texture_es3_0"),textureAnisotropicFilterExtension:this._gl.getExtension("EXT_texture_filter_anisotropic")||this._gl.getExtension("WEBKIT_EXT_texture_filter_anisotropic")||this._gl.getExtension("MOZ_EXT_texture_filter_anisotropic"),uintIndices:this._webGLVersion>1||null!==this._gl.getExtension("OES_element_index_uint"),fragmentDepthSupported:this._webGLVersion>1||null!==this._gl.getExtension("EXT_frag_depth"),highPrecisionShaderSupported:!1,timerQuery:this._gl.getExtension("EXT_disjoint_timer_query_webgl2")||this._gl.getExtension("EXT_disjoint_timer_query"),supportOcclusionQuery:this._webGLVersion>1,canUseTimestampForTimerQuery:!1,drawBuffersExtension:!1,maxMSAASamples:1,colorBufferFloat:!!(this._webGLVersion>1&&this._gl.getExtension("EXT_color_buffer_float")),blendFloat:null!==this._gl.getExtension("EXT_float_blend"),supportFloatTexturesResolve:!1,rg11b10ufColorRenderable:!1,colorBufferHalfFloat:!!(this._webGLVersion>1&&this._gl.getExtension("EXT_color_buffer_half_float")),textureFloat:!!(this._webGLVersion>1||this._gl.getExtension("OES_texture_float")),textureHalfFloat:!!(this._webGLVersion>1||this._gl.getExtension("OES_texture_half_float")),textureHalfFloatRender:!1,textureFloatLinearFiltering:!1,textureFloatRender:!1,textureHalfFloatLinearFiltering:!1,vertexArrayObject:!1,instancedArrays:!1,textureLOD:!!(this._webGLVersion>1||this._gl.getExtension("EXT_shader_texture_lod")),texelFetch:1!==this._webGLVersion,blendMinMax:!1,multiview:this._gl.getExtension("OVR_multiview2"),oculusMultiview:this._gl.getExtension("OCULUS_multiview"),depthTextureExtension:!1,canUseGLInstanceID:this._webGLVersion>1,canUseGLVertexID:this._webGLVersion>1,supportComputeShaders:!1,supportSRGBBuffers:!1,supportTransformFeedbacks:this._webGLVersion>1,textureMaxLevel:this._webGLVersion>1,texture2DArrayMaxLayerCount:this._webGLVersion>1?this._gl.getParameter(this._gl.MAX_ARRAY_TEXTURE_LAYERS):128,disableMorphTargetTexture:!1,textureNorm16:!!this._gl.getExtension("EXT_texture_norm16"),blendParametersPerTarget:!1,dualSourceBlending:!1,supportReadWriteStorageTextures:!1},this._caps.supportFloatTexturesResolve=this._caps.colorBufferFloat,this._caps.rg11b10ufColorRenderable=this._caps.colorBufferFloat,this._glVersion=this._gl.getParameter(this._gl.VERSION);let e=this._gl.getExtension("WEBGL_debug_renderer_info");null!=e&&(this._glRenderer=this._gl.getParameter(e.UNMASKED_RENDERER_WEBGL),this._glVendor=this._gl.getParameter(e.UNMASKED_VENDOR_WEBGL)),this._glVendor||(this._glVendor=this._gl.getParameter(this._gl.VENDOR)||"Unknown vendor"),this._glRenderer||(this._glRenderer=this._gl.getParameter(this._gl.RENDERER)||"Unknown renderer"),36193!==this._gl.HALF_FLOAT_OES&&(this._gl.HALF_FLOAT_OES=36193),34842!==this._gl.RGBA16F&&(this._gl.RGBA16F=34842),34836!==this._gl.RGBA32F&&(this._gl.RGBA32F=34836),35056!==this._gl.DEPTH24_STENCIL8&&(this._gl.DEPTH24_STENCIL8=35056),this._caps.timerQuery&&(1===this._webGLVersion&&(this._gl.getQuery=this._caps.timerQuery.getQueryEXT.bind(this._caps.timerQuery)),this._caps.canUseTimestampForTimerQuery=(this._gl.getQuery(this._caps.timerQuery.TIMESTAMP_EXT,this._caps.timerQuery.QUERY_COUNTER_BITS_EXT)??0)>0),this._caps.maxAnisotropy=this._caps.textureAnisotropicFilterExtension?this._gl.getParameter(this._caps.textureAnisotropicFilterExtension.MAX_TEXTURE_MAX_ANISOTROPY_EXT):0,this._caps.textureFloatLinearFiltering=!!(this._caps.textureFloat&&this._gl.getExtension("OES_texture_float_linear")),this._caps.textureFloatRender=!!(this._caps.textureFloat&&this._canRenderToFloatFramebuffer()),this._caps.textureHalfFloatLinearFiltering=!!(this._webGLVersion>1||this._caps.textureHalfFloat&&this._gl.getExtension("OES_texture_half_float_linear")),this._caps.textureNorm16&&(this._gl.R16_EXT=33322,this._gl.RG16_EXT=33324,this._gl.RGB16_EXT=32852,this._gl.RGBA16_EXT=32859,this._gl.R16_SNORM_EXT=36760,this._gl.RG16_SNORM_EXT=36761,this._gl.RGB16_SNORM_EXT=36762,this._gl.RGBA16_SNORM_EXT=36763);let t=this._gl.getExtension("OES_draw_buffers_indexed");if(this._caps.blendParametersPerTarget=!!t,this._alphaState=new B.AlphaState(this._caps.blendParametersPerTarget),t&&(this._gl.blendEquationSeparateIndexed=t.blendEquationSeparateiOES.bind(t),this._gl.blendEquationIndexed=t.blendEquationiOES.bind(t),this._gl.blendFuncSeparateIndexed=t.blendFuncSeparateiOES.bind(t),this._gl.blendFuncIndexed=t.blendFunciOES.bind(t),this._gl.colorMaskIndexed=t.colorMaskiOES.bind(t),this._gl.disableIndexed=t.disableiOES.bind(t),this._gl.enableIndexed=t.enableiOES.bind(t)),this._caps.dualSourceBlending=!!this._gl.getExtension("WEBGL_blend_func_extended"),this._caps.astc&&(this._gl.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR=this._caps.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR,this._gl.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR=this._caps.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR,this._gl.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR=this._caps.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR,this._gl.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR=this._caps.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR,this._gl.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR=this._caps.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR,this._gl.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR=this._caps.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR,this._gl.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR=this._caps.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR,this._gl.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR=this._caps.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR,this._gl.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR=this._caps.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR,this._gl.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR=this._caps.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR,this._gl.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR=this._caps.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR,this._gl.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR=this._caps.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR,this._gl.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR=this._caps.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR,this._gl.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR=this._caps.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR),this._caps.bptc&&(this._gl.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT=this._caps.bptc.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT),this._caps.s3tc_srgb&&(this._gl.COMPRESSED_SRGB_S3TC_DXT1_EXT=this._caps.s3tc_srgb.COMPRESSED_SRGB_S3TC_DXT1_EXT,this._gl.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT=this._caps.s3tc_srgb.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT,this._gl.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT=this._caps.s3tc_srgb.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT),this._caps.etc2&&(this._gl.COMPRESSED_SRGB8_ETC2=this._caps.etc2.COMPRESSED_SRGB8_ETC2,this._gl.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC=this._caps.etc2.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC),this._webGLVersion>1&&5131!==this._gl.HALF_FLOAT_OES&&(this._gl.HALF_FLOAT_OES=5131),this._caps.textureHalfFloatRender=this._caps.textureHalfFloat&&this._canRenderToHalfFloatFramebuffer(),this._webGLVersion>1)this._caps.drawBuffersExtension=!0,this._caps.maxMSAASamples=null!==this._maxMSAASamplesOverride?this._maxMSAASamplesOverride:this._gl.getParameter(this._gl.MAX_SAMPLES),this._caps.maxDrawBuffers=this._gl.getParameter(this._gl.MAX_DRAW_BUFFERS);else{let e=this._gl.getExtension("WEBGL_draw_buffers");if(null!==e){this._caps.drawBuffersExtension=!0,this._gl.drawBuffers=e.drawBuffersWEBGL.bind(e),this._caps.maxDrawBuffers=this._gl.getParameter(e.MAX_DRAW_BUFFERS_WEBGL),this._gl.DRAW_FRAMEBUFFER=this._gl.FRAMEBUFFER;for(let t=0;t<16;t++)this._gl["COLOR_ATTACHMENT"+t+"_WEBGL"]=e["COLOR_ATTACHMENT"+t+"_WEBGL"]}}if(this._webGLVersion>1)this._caps.depthTextureExtension=!0;else{let e=this._gl.getExtension("WEBGL_depth_texture");null!=e&&(this._caps.depthTextureExtension=!0,this._gl.UNSIGNED_INT_24_8=e.UNSIGNED_INT_24_8_WEBGL)}if(this.disableVertexArrayObjects)this._caps.vertexArrayObject=!1;else if(this._webGLVersion>1)this._caps.vertexArrayObject=!0;else{let e=this._gl.getExtension("OES_vertex_array_object");null!=e&&(this._caps.vertexArrayObject=!0,this._gl.createVertexArray=e.createVertexArrayOES.bind(e),this._gl.bindVertexArray=e.bindVertexArrayOES.bind(e),this._gl.deleteVertexArray=e.deleteVertexArrayOES.bind(e))}if(this._webGLVersion>1)this._caps.instancedArrays=!0;else{let e=this._gl.getExtension("ANGLE_instanced_arrays");null!=e?(this._caps.instancedArrays=!0,this._gl.drawArraysInstanced=e.drawArraysInstancedANGLE.bind(e),this._gl.drawElementsInstanced=e.drawElementsInstancedANGLE.bind(e),this._gl.vertexAttribDivisor=e.vertexAttribDivisorANGLE.bind(e)):this._caps.instancedArrays=!1}if(this._gl.getShaderPrecisionFormat){let e=this._gl.getShaderPrecisionFormat(this._gl.VERTEX_SHADER,this._gl.HIGH_FLOAT),t=this._gl.getShaderPrecisionFormat(this._gl.FRAGMENT_SHADER,this._gl.HIGH_FLOAT);if(e&&t&&(this._caps.highPrecisionShaderSupported=0!==e.precision&&0!==t.precision,this._caps.shaderFloatPrecision=Math.min(e.precision,t.precision)),!this._shouldUseHighPrecisionShader){let e=this._gl.getShaderPrecisionFormat(this._gl.VERTEX_SHADER,this._gl.MEDIUM_FLOAT),t=this._gl.getShaderPrecisionFormat(this._gl.FRAGMENT_SHADER,this._gl.MEDIUM_FLOAT);e&&t&&(this._caps.shaderFloatPrecision=Math.min(e.precision,t.precision))}this._caps.shaderFloatPrecision<10&&(this._caps.shaderFloatPrecision=10)}if(this._webGLVersion>1)this._caps.blendMinMax=!0;else{let e=this._gl.getExtension("EXT_blend_minmax");null!=e&&(this._caps.blendMinMax=!0,this._gl.MAX=e.MAX_EXT,this._gl.MIN=e.MIN_EXT)}if(!this._caps.supportSRGBBuffers){if(this._webGLVersion>1)this._caps.supportSRGBBuffers=!0,this._glSRGBExtensionValues={SRGB:WebGL2RenderingContext.SRGB,SRGB8:WebGL2RenderingContext.SRGB8,SRGB8_ALPHA8:WebGL2RenderingContext.SRGB8_ALPHA8};else{let e=this._gl.getExtension("EXT_sRGB");null!=e&&(this._caps.supportSRGBBuffers=!0,this._glSRGBExtensionValues={SRGB:e.SRGB_EXT,SRGB8:e.SRGB_ALPHA_EXT,SRGB8_ALPHA8:e.SRGB_ALPHA_EXT})}if(this._creationOptions){let e=this._creationOptions.forceSRGBBufferSupportState;void 0!==e&&(this._caps.supportSRGBBuffers=this._caps.supportSRGBBuffers&&e)}}this._depthCullingState.depthTest=!0,this._depthCullingState.depthFunc=this._gl.LEQUAL,this._depthCullingState.depthMask=!0,this._maxSimultaneousTextures=this._caps.maxCombinedTexturesImageUnits;for(let e=0;e<this._maxSimultaneousTextures;e++)this._nextFreeTextureSlots.push(e);"Mali-G72"===this._glRenderer&&(this._caps.disableMorphTargetTexture=!0)}_initFeatures(){this._features={forceBitmapOverHTMLImageElement:"u"<typeof HTMLImageElement,supportRenderAndCopyToLodForFloatTextures:1!==this._webGLVersion,supportDepthStencilTexture:1!==this._webGLVersion,supportShadowSamplers:1!==this._webGLVersion,uniformBufferHardCheckMatrix:!1,allowTexturePrefiltering:1!==this._webGLVersion,trackUbosInFrame:!1,checkUbosContentBeforeUpload:!1,supportCSM:1!==this._webGLVersion,basisNeedsPOT:1===this._webGLVersion,support3DTextures:1!==this._webGLVersion,needTypeSuffixInShaderConstants:1!==this._webGLVersion,supportMSAA:1!==this._webGLVersion,supportSSAO2:1!==this._webGLVersion,supportIBLShadows:1!==this._webGLVersion,supportExtendedTextureFormats:1!==this._webGLVersion,supportSwitchCaseInShader:1!==this._webGLVersion,supportSyncTextureRead:!0,needsInvertingBitmap:!0,useUBOBindingCache:!0,needShaderCodeInlining:!1,needToAlwaysBindUniformBuffers:!1,supportRenderPasses:!1,supportSpriteInstancing:!0,forceVertexBufferStrideAndOffsetMultiple4Bytes:!1,_checkNonFloatVertexBuffersDontRecreatePipelineContext:!1}}get webGLVersion(){return this._webGLVersion}getClassName(){return"ThinEngine"}_prepareWorkingCanvas(){if(this._workingCanvas)return;this._workingCanvas=this.createCanvas(1,1);let e=this._workingCanvas.getContext("2d");e&&(this._workingContext=e)}getInfo(){return this.getGlInfo()}getGlInfo(){return{vendor:this._glVendor,renderer:this._glRenderer,version:this._glVersion}}extractDriverInfo(){let e=this.getGlInfo();return e&&e.renderer?e.renderer:""}getRenderWidth(e=!1){return!e&&this._currentRenderTarget?this._currentRenderTarget.width:this._framebufferDimensionsObject?this._framebufferDimensionsObject.framebufferWidth:this._gl.drawingBufferWidth}getRenderHeight(e=!1){return!e&&this._currentRenderTarget?this._currentRenderTarget.height:this._framebufferDimensionsObject?this._framebufferDimensionsObject.framebufferHeight:this._gl.drawingBufferHeight}clear(e,t,r,i=!1,s=0){let a=this.stencilStateComposer.useStencilGlobalOnly;this.stencilStateComposer.useStencilGlobalOnly=!0,this.applyStates(),this.stencilStateComposer.useStencilGlobalOnly=a;let n=0;if(t&&e){let t=!0;if(this._currentRenderTarget){let r=this._currentRenderTarget.texture?.format;if(8===r||9===r||10===r||11===r){let r=this._currentRenderTarget.texture?.type;7===r||5===r?(L._TempClearColorUint32[0]=255*e.r,L._TempClearColorUint32[1]=255*e.g,L._TempClearColorUint32[2]=255*e.b,L._TempClearColorUint32[3]=255*e.a,this._gl.clearBufferuiv(this._gl.COLOR,0,L._TempClearColorUint32)):(L._TempClearColorInt32[0]=255*e.r,L._TempClearColorInt32[1]=255*e.g,L._TempClearColorInt32[2]=255*e.b,L._TempClearColorInt32[3]=255*e.a,this._gl.clearBufferiv(this._gl.COLOR,0,L._TempClearColorInt32)),t=!1}}t&&(this._gl.clearColor(e.r,e.g,e.b,void 0!==e.a?e.a:1),n|=this._gl.COLOR_BUFFER_BIT)}r&&(this.useReverseDepthBuffer?(this._depthCullingState.depthFunc=this._gl.GEQUAL,this._gl.clearDepth(0)):this._gl.clearDepth(1),n|=this._gl.DEPTH_BUFFER_BIT),i&&(this._gl.clearStencil(s),n|=this._gl.STENCIL_BUFFER_BIT),this._gl.clear(n)}_viewport(e,t,r,i){(e!==this._viewportCached.x||t!==this._viewportCached.y||r!==this._viewportCached.z||i!==this._viewportCached.w)&&(this._viewportCached.x=e,this._viewportCached.y=t,this._viewportCached.z=r,this._viewportCached.w=i,this._gl.viewport(e,t,r,i))}endFrame(){super.endFrame(),this._badOS&&this.flushFramebuffer()}get performanceMonitor(){throw Error("Not Supported by ThinEngine")}bindFramebuffer(e,t=0,r,i,s,a=0,n=0){this._currentRenderTarget&&this._resolveAndGenerateMipMapsFramebuffer(this._currentRenderTarget),this._currentRenderTarget=e,this._bindUnboundFramebuffer(e._framebuffer);let _=this._gl;e.isMulti||(e.is2DArray||e.is3D?(_.framebufferTextureLayer(_.FRAMEBUFFER,_.COLOR_ATTACHMENT0,e.texture._hardwareTexture?.underlyingResource,a,n),e._currentLOD=a):e.isCube?_.framebufferTexture2D(_.FRAMEBUFFER,_.COLOR_ATTACHMENT0,_.TEXTURE_CUBE_MAP_POSITIVE_X+t,e.texture._hardwareTexture?.underlyingResource,a):e._currentLOD!==a&&(_.framebufferTexture2D(_.FRAMEBUFFER,_.COLOR_ATTACHMENT0,_.TEXTURE_2D,e.texture._hardwareTexture?.underlyingResource,a),e._currentLOD=a));let l=e._depthStencilTexture;if(l){e.is3D&&(e.texture.width!==l.width||e.texture.height!==l.height||e.texture.depth!==l.depth)&&g.Logger.Warn("Depth/Stencil attachment for 3D target must have same dimensions as color attachment");let r=e._depthStencilTextureWithStencil?_.DEPTH_STENCIL_ATTACHMENT:_.DEPTH_ATTACHMENT;e.is2DArray||e.is3D?_.framebufferTextureLayer(_.FRAMEBUFFER,r,l._hardwareTexture?.underlyingResource,a,n):e.isCube?_.framebufferTexture2D(_.FRAMEBUFFER,r,_.TEXTURE_CUBE_MAP_POSITIVE_X+t,l._hardwareTexture?.underlyingResource,a):_.framebufferTexture2D(_.FRAMEBUFFER,r,_.TEXTURE_2D,l._hardwareTexture?.underlyingResource,a)}e._MSAAFramebuffer&&this._bindUnboundFramebuffer(e._MSAAFramebuffer),this._cachedViewport&&!s?this.setViewport(this._cachedViewport,r,i):(!r&&(r=e.width,a&&(r/=Math.pow(2,a))),!i&&(i=e.height,a&&(i/=Math.pow(2,a))),this._viewport(0,0,r,i)),this.wipeCaches()}setStateCullFaceType(e,t){let r=this.cullBackFaces??e??!0?this._gl.BACK:this._gl.FRONT;(this._depthCullingState.cullFace!==r||t)&&(this._depthCullingState.cullFace=r)}setState(e,t=0,r,i=!1,s,a,n=0){(this._depthCullingState.cull!==e||r)&&(this._depthCullingState.cull=e),this.setStateCullFaceType(s,r),this.setZOffset(t),this.setZOffsetUnits(n);let _=i?this._gl.CW:this._gl.CCW;(this._depthCullingState.frontFace!==_||r)&&(this._depthCullingState.frontFace=_),this._stencilStateComposer.stencilMaterial=a}_resolveAndGenerateMipMapsFramebuffer(e,t=!1){e.disableAutomaticMSAAResolve||(e.isMulti?this.resolveMultiFramebuffer(e):this.resolveFramebuffer(e)),t||(e.isMulti?this.generateMipMapsMultiFramebuffer(e):this.generateMipMapsFramebuffer(e))}_bindUnboundFramebuffer(e){this._currentFramebuffer!==e&&(this._gl.bindFramebuffer(this._gl.FRAMEBUFFER,e),this._currentFramebuffer=e)}_currentFrameBufferIsDefaultFrameBuffer(){return null===this._currentFramebuffer}generateMipmaps(e){let t=this._getTextureTarget(e);this._bindTextureDirectly(t,e,!0),this._gl.generateMipmap(t),this._bindTextureDirectly(t,null)}unBindFramebuffer(e,t,r){this._currentRenderTarget=null,this._resolveAndGenerateMipMapsFramebuffer(e,t),r&&(e._MSAAFramebuffer&&this._bindUnboundFramebuffer(e._framebuffer),r()),this._bindUnboundFramebuffer(null)}generateMipMapsFramebuffer(e){!e.isMulti&&e.texture?.generateMipMaps&&!e.isCube&&this.generateMipmaps(e.texture)}resolveFramebuffer(e){let t=this._gl;if(!e._MSAAFramebuffer||e.isMulti)return;let r=e.resolveMSAAColors?t.COLOR_BUFFER_BIT:0;r|=e._generateDepthBuffer&&e.resolveMSAADepth?t.DEPTH_BUFFER_BIT:0,r|=e._generateStencilBuffer&&e.resolveMSAAStencil?t.STENCIL_BUFFER_BIT:0,t.bindFramebuffer(t.READ_FRAMEBUFFER,e._MSAAFramebuffer),t.bindFramebuffer(t.DRAW_FRAMEBUFFER,e._framebuffer),t.blitFramebuffer(0,0,e.width,e.height,0,0,e.width,e.height,r,t.NEAREST)}flushFramebuffer(){this._gl.flush()}restoreDefaultFramebuffer(){this._currentRenderTarget?this.unBindFramebuffer(this._currentRenderTarget):this._bindUnboundFramebuffer(null),this._cachedViewport&&this.setViewport(this._cachedViewport),this.wipeCaches()}_resetVertexBufferBinding(){this.bindArrayBuffer(null),this._cachedVertexBuffers=null}createVertexBuffer(e,t,r){return this._createVertexBuffer(e,this._gl.STATIC_DRAW)}_createVertexBuffer(e,t){let r=this._gl.createBuffer();if(!r)throw Error("Unable to create vertex buffer");let i=new T.WebGLDataBuffer(r);return this.bindArrayBuffer(i),"number"!=typeof e?e instanceof Array?(this._gl.bufferData(this._gl.ARRAY_BUFFER,new Float32Array(e),t),i.capacity=4*e.length):(this._gl.bufferData(this._gl.ARRAY_BUFFER,e,t),i.capacity=e.byteLength):(this._gl.bufferData(this._gl.ARRAY_BUFFER,new Uint8Array(e),t),i.capacity=e),this._resetVertexBufferBinding(),i.references=1,i}createDynamicVertexBuffer(e,t){return this._createVertexBuffer(e,this._gl.DYNAMIC_DRAW)}_resetIndexBufferBinding(){this.bindIndexBuffer(null),this._cachedIndexBuffer=null}createIndexBuffer(e,t,r){let i=this._gl.createBuffer(),s=new T.WebGLDataBuffer(i);if(!i)throw Error("Unable to create index buffer");this.bindIndexBuffer(s);let a=this._normalizeIndexData(e);return this._gl.bufferData(this._gl.ELEMENT_ARRAY_BUFFER,a,t?this._gl.DYNAMIC_DRAW:this._gl.STATIC_DRAW),this._resetIndexBufferBinding(),s.references=1,s.is32Bits=4===a.BYTES_PER_ELEMENT,s}_normalizeIndexData(e){if(2===e.BYTES_PER_ELEMENT)return e;if(this._caps.uintIndices){if(e instanceof Uint32Array)return e;else for(let t=0;t<e.length;t++)if(e[t]>=65535)return new Uint32Array(e)}return new Uint16Array(e)}bindArrayBuffer(e){this._vaoRecordInProgress||this._unbindVertexArrayObject(),this._bindBuffer(e,this._gl.ARRAY_BUFFER)}bindUniformBlock(e,t,r){let i=e.program,s=this._gl.getUniformBlockIndex(i,t);this._gl.uniformBlockBinding(i,s,r)}bindIndexBuffer(e){this._vaoRecordInProgress||this._unbindVertexArrayObject(),this._bindBuffer(e,this._gl.ELEMENT_ARRAY_BUFFER)}_bindBuffer(e,t){(this._vaoRecordInProgress||this._currentBoundBuffer[t]!==e)&&(this._gl.bindBuffer(t,e?e.underlyingResource:null),this._currentBoundBuffer[t]=e)}updateArrayBuffer(e){this._gl.bufferSubData(this._gl.ARRAY_BUFFER,0,e)}_vertexAttribPointer(e,t,r,i,s,a,n){let _=this._currentBufferPointers[t];if(!_)return;let l=!1;_.active?(_.buffer!==e&&(_.buffer=e,l=!0),_.size!==r&&(_.size=r,l=!0),_.type!==i&&(_.type=i,l=!0),_.normalized!==s&&(_.normalized=s,l=!0),_.stride!==a&&(_.stride=a,l=!0),_.offset!==n&&(_.offset=n,l=!0)):(l=!0,_.active=!0,_.index=t,_.size=r,_.type=i,_.normalized=s,_.stride=a,_.offset=n,_.buffer=e),(l||this._vaoRecordInProgress)&&(this.bindArrayBuffer(e),i===this._gl.UNSIGNED_INT||i===this._gl.INT?this._gl.vertexAttribIPointer(t,r,i,a,n):this._gl.vertexAttribPointer(t,r,i,s,a,n))}_bindIndexBufferWithCache(e){null!=e&&this._cachedIndexBuffer!==e&&(this._cachedIndexBuffer=e,this.bindIndexBuffer(e),this._uintIndicesCurrentlySet=e.is32Bits)}_bindVertexBuffersAttributes(e,t,r){let i=t.getAttributesNames();this._vaoRecordInProgress||this._unbindVertexArrayObject(),this.unbindAllAttributes();for(let s=0;s<i.length;s++){let a=t.getAttributeLocation(s);if(a>=0){let t=i[s],n=null;if(r&&(n=r[t]),n||(n=e[t]),!n)continue;this._gl.enableVertexAttribArray(a),this._vaoRecordInProgress||(this._vertexAttribArraysEnabled[a]=!0);let _=n.getBuffer();_&&(this._vertexAttribPointer(_,a,n.getSize(),n.type,n.normalized,n.byteStride,n.byteOffset),n.getIsInstanced()&&(this._gl.vertexAttribDivisor(a,n.getInstanceDivisor()),this._vaoRecordInProgress||(this._currentInstanceLocations.push(a),this._currentInstanceBuffers.push(_))))}}}recordVertexArrayObject(e,t,r,i){let s=this._gl.createVertexArray();if(!s)throw Error("Unable to create VAO");return this._vaoRecordInProgress=!0,this._gl.bindVertexArray(s),this._mustWipeVertexAttributes=!0,this._bindVertexBuffersAttributes(e,r,i),this.bindIndexBuffer(t),this._vaoRecordInProgress=!1,this._gl.bindVertexArray(null),s}bindVertexArrayObject(e,t){this._cachedVertexArrayObject!==e&&(this._cachedVertexArrayObject=e,this._gl.bindVertexArray(e),this._cachedVertexBuffers=null,this._cachedIndexBuffer=null,this._uintIndicesCurrentlySet=null!=t&&t.is32Bits,this._mustWipeVertexAttributes=!0)}bindBuffersDirectly(e,t,r,i,s){if(this._cachedVertexBuffers!==e||this._cachedEffectForVertexBuffers!==s){this._cachedVertexBuffers=e,this._cachedEffectForVertexBuffers=s;let t=s.getAttributesCount();this._unbindVertexArrayObject(),this.unbindAllAttributes();let a=0;for(let n=0;n<t;n++)if(n<r.length){let t=s.getAttributeLocation(n);t>=0&&(this._gl.enableVertexAttribArray(t),this._vertexAttribArraysEnabled[t]=!0,this._vertexAttribPointer(e,t,r[n],this._gl.FLOAT,!1,i,a)),a+=4*r[n]}}this._bindIndexBufferWithCache(t)}_unbindVertexArrayObject(){this._cachedVertexArrayObject&&(this._cachedVertexArrayObject=null,this._gl.bindVertexArray(null))}bindBuffers(e,t,r,i){(this._cachedVertexBuffers!==e||this._cachedEffectForVertexBuffers!==r)&&(this._cachedVertexBuffers=e,this._cachedEffectForVertexBuffers=r,this._bindVertexBuffersAttributes(e,r,i)),this._bindIndexBufferWithCache(t)}unbindInstanceAttributes(){let e;for(let t=0,r=this._currentInstanceLocations.length;t<r;t++){let r=this._currentInstanceBuffers[t];e!=r&&r.references&&(e=r,this.bindArrayBuffer(r));let i=this._currentInstanceLocations[t];this._gl.vertexAttribDivisor(i,0)}this._currentInstanceBuffers.length=0,this._currentInstanceLocations.length=0}releaseVertexArrayObject(e){this._gl.deleteVertexArray(e)}_releaseBuffer(e){return e.references--,0===e.references&&(this._deleteBuffer(e),!0)}_deleteBuffer(e){this._gl.deleteBuffer(e.underlyingResource)}updateAndBindInstancesBuffer(e,t,r){if(this.bindArrayBuffer(e),t&&this._gl.bufferSubData(this._gl.ARRAY_BUFFER,0,t),void 0!==r[0].index)this.bindInstancesBuffer(e,r,!0);else for(let t=0;t<4;t++){let i=r[t];this._vertexAttribArraysEnabled[i]||(this._gl.enableVertexAttribArray(i),this._vertexAttribArraysEnabled[i]=!0),this._vertexAttribPointer(e,i,4,this._gl.FLOAT,!1,64,16*t),this._gl.vertexAttribDivisor(i,1),this._currentInstanceLocations.push(i),this._currentInstanceBuffers.push(e)}}bindInstancesBuffer(e,t,r=!0){this.bindArrayBuffer(e);let i=0;if(r)for(let e=0;e<t.length;e++)i+=4*t[e].attributeSize;for(let r=0;r<t.length;r++){let s=t[r];void 0===s.index&&(s.index=this._currentEffect.getAttributeLocationByName(s.attributeName)),s.index<0||(this._vertexAttribArraysEnabled[s.index]||(this._gl.enableVertexAttribArray(s.index),this._vertexAttribArraysEnabled[s.index]=!0),this._vertexAttribPointer(e,s.index,s.attributeSize,s.attributeType||this._gl.FLOAT,s.normalized||!1,i,s.offset),this._gl.vertexAttribDivisor(s.index,void 0===s.divisor?1:s.divisor),this._currentInstanceLocations.push(s.index),this._currentInstanceBuffers.push(e))}}disableInstanceAttributeByName(e){if(!this._currentEffect)return;let t=this._currentEffect.getAttributeLocationByName(e);this.disableInstanceAttribute(t)}disableInstanceAttribute(e){let t,r=!1;for(;-1!==(t=this._currentInstanceLocations.indexOf(e));)this._currentInstanceLocations.splice(t,1),this._currentInstanceBuffers.splice(t,1),r=!0;r&&(this._gl.vertexAttribDivisor(e,0),this.disableAttributeByIndex(e))}disableAttributeByIndex(e){this._gl.disableVertexAttribArray(e),this._vertexAttribArraysEnabled[e]=!1,this._currentBufferPointers[e].active=!1}draw(e,t,r,i){this.drawElementsType(+!e,t,r,i)}drawPointClouds(e,t,r){this.drawArraysType(2,e,t,r)}drawUnIndexed(e,t,r,i){this.drawArraysType(+!e,t,r,i)}drawElementsType(e,t,r,i){this.applyStates(),this._reportDrawCall();let s=this._drawMode(e),a=this._uintIndicesCurrentlySet?this._gl.UNSIGNED_INT:this._gl.UNSIGNED_SHORT,n=this._uintIndicesCurrentlySet?4:2;i?this._gl.drawElementsInstanced(s,r,a,t*n,i):this._gl.drawElements(s,r,a,t*n)}drawArraysType(e,t,r,i){this.applyStates(),this._reportDrawCall();let s=this._drawMode(e);i?this._gl.drawArraysInstanced(s,t,r,i):this._gl.drawArrays(s,t,r)}_drawMode(e){switch(e){case 0:default:return this._gl.TRIANGLES;case 2:case 3:return this._gl.POINTS;case 1:case 4:return this._gl.LINES;case 5:return this._gl.LINE_LOOP;case 6:return this._gl.LINE_STRIP;case 7:return this._gl.TRIANGLE_STRIP;case 8:return this._gl.TRIANGLE_FAN}}_releaseEffect(e){this._compiledEffects[e._key]&&delete this._compiledEffects[e._key];let t=e.getPipelineContext();t&&this._deletePipelineContext(t)}_deletePipelineContext(e){e&&e.program&&(e.program.__SPECTOR_rebuildProgram=null,(0,S.resetCachedPipeline)(e),this._gl&&(this._currentProgram===e.program&&this._setProgram(null),this._gl.deleteProgram(e.program)))}_getGlobalDefines(e){return(0,x._GetGlobalDefines)(e,this.isNDCHalfZRange,this.useReverseDepthBuffer,this.useExactSrgbConversions)}createEffect(e,t,r,i,s,a,n,_,l,o=0,c){let g="string"==typeof e?e:e.vertexToken||e.vertexSource||e.vertexElement||e.vertex,f="string"==typeof e?e:e.fragmentToken||e.fragmentSource||e.fragmentElement||e.fragment,d=this._getGlobalDefines(),E=void 0!==t.attributes,T=s??t.defines??"";d&&(T+=d);let R=g+"+"+f+"@"+T;if(this._compiledEffects[R]){let e=this._compiledEffects[R];return n&&e.isReady()&&n(e),e._refCount++,e}this._gl&&(0,u.getStateObject)(this._gl);let p=new h.Effect(e,t,E?this:r,i,this,s,a,n,_,l,R,t.shaderLanguage??o,t.extraInitializationsAsync??c);return this._compiledEffects[R]=p,p}_getShaderSource(e){return this._gl.getShaderSource(e)}createRawShaderProgram(e,t,r,i,s=null){let a=(0,u.getStateObject)(this._gl);return a._contextWasLost=this._contextWasLost,a.validateShaderPrograms=this.validateShaderPrograms,(0,u.createRawShaderProgram)(e,t,r,i||this._gl,s)}createShaderProgram(e,t,r,i,s,a=null){let n=(0,u.getStateObject)(this._gl);return n._contextWasLost=this._contextWasLost,n.validateShaderPrograms=this.validateShaderPrograms,(0,u.createShaderProgram)(e,t,r,i,s||this._gl,a)}inlineShaderCode(e){return e}createPipelineContext(e){this._gl&&((0,u.getStateObject)(this._gl).parallelShaderCompile=this._caps.parallelShaderCompile);let t=(0,u.createPipelineContext)(this._gl,e);return t.engine=this,t}createMaterialContext(){}createDrawContext(){}_finalizePipelineContext(e){return(0,u._finalizePipelineContext)(e,this._gl,this.validateShaderPrograms)}_preparePipelineContextAsync(e,t,r,i,s,a,n,_,l,h,o){let c=(0,u.getStateObject)(this._gl);return c._contextWasLost=this._contextWasLost,c.validateShaderPrograms=this.validateShaderPrograms,c._createShaderProgramInjection=this._createShaderProgram.bind(this),c.createRawShaderProgramInjection=this.createRawShaderProgram.bind(this),c.createShaderProgramInjection=this.createShaderProgram.bind(this),c.loadFileInjection=this._loadFile.bind(this),(0,u._preparePipelineContext)(e,t,r,i,s,a,n,_,l,h,o)}_createShaderProgram(e,t,r,i,s=null){return(0,u._createShaderProgram)(e,t,r,i,s)}_isRenderingStateCompiled(e){return!this._isDisposed&&(0,u._isRenderingStateCompiled)(e,this._gl,this.validateShaderPrograms)}_executeWhenRenderingStateIsCompiled(e,t){(0,u._executeWhenRenderingStateIsCompiled)(e,t)}getUniforms(e,t){let r=[];for(let i=0;i<t.length;i++)r.push(this._gl.getUniformLocation(e.program,t[i]));return r}getAttributes(e,t){let r=[];for(let i=0;i<t.length;i++)try{r.push(this._gl.getAttribLocation(e.program,t[i]))}catch(e){r.push(-1)}return r}enableEffect(e){(e=null!==e&&(0,c.IsWrapper)(e)?e.effect:e)&&e!==this._currentEffect&&(this._stencilStateComposer.stencilMaterial=void 0,this.bindSamplers(e),this._currentEffect=e,e.onBind&&e.onBind(e),e._onBindObservable&&e._onBindObservable.notifyObservers(e))}setInt(e,t){return!!e&&(this._gl.uniform1i(e,t),!0)}setInt2(e,t,r){return!!e&&(this._gl.uniform2i(e,t,r),!0)}setInt3(e,t,r,i){return!!e&&(this._gl.uniform3i(e,t,r,i),!0)}setInt4(e,t,r,i,s){return!!e&&(this._gl.uniform4i(e,t,r,i,s),!0)}setIntArray(e,t){return!!e&&(this._gl.uniform1iv(e,t),!0)}setIntArray2(e,t){return!!e&&t.length%2==0&&(this._gl.uniform2iv(e,t),!0)}setIntArray3(e,t){return!!e&&t.length%3==0&&(this._gl.uniform3iv(e,t),!0)}setIntArray4(e,t){return!!e&&t.length%4==0&&(this._gl.uniform4iv(e,t),!0)}setUInt(e,t){return!!e&&(this._gl.uniform1ui(e,t),!0)}setUInt2(e,t,r){return!!e&&(this._gl.uniform2ui(e,t,r),!0)}setUInt3(e,t,r,i){return!!e&&(this._gl.uniform3ui(e,t,r,i),!0)}setUInt4(e,t,r,i,s){return!!e&&(this._gl.uniform4ui(e,t,r,i,s),!0)}setUIntArray(e,t){return!!e&&(this._gl.uniform1uiv(e,t),!0)}setUIntArray2(e,t){return!!e&&t.length%2==0&&(this._gl.uniform2uiv(e,t),!0)}setUIntArray3(e,t){return!!e&&t.length%3==0&&(this._gl.uniform3uiv(e,t),!0)}setUIntArray4(e,t){return!!e&&t.length%4==0&&(this._gl.uniform4uiv(e,t),!0)}setArray(e,t){return!!e&&!(t.length<1)&&(this._gl.uniform1fv(e,t),!0)}setArray2(e,t){return!!e&&t.length%2==0&&(this._gl.uniform2fv(e,t),!0)}setArray3(e,t){return!!e&&t.length%3==0&&(this._gl.uniform3fv(e,t),!0)}setArray4(e,t){return!!e&&t.length%4==0&&(this._gl.uniform4fv(e,t),!0)}setMatrices(e,t){return!!e&&(this._gl.uniformMatrix4fv(e,!1,t),!0)}setMatrix3x3(e,t){return!!e&&(this._gl.uniformMatrix3fv(e,!1,t),!0)}setMatrix2x2(e,t){return!!e&&(this._gl.uniformMatrix2fv(e,!1,t),!0)}setFloat(e,t){return!!e&&(this._gl.uniform1f(e,t),!0)}setFloat2(e,t,r){return!!e&&(this._gl.uniform2f(e,t,r),!0)}setFloat3(e,t,r,i){return!!e&&(this._gl.uniform3f(e,t,r,i),!0)}setFloat4(e,t,r,i,s){return!!e&&(this._gl.uniform4f(e,t,r,i,s),!0)}applyStates(){if(this._depthCullingState.apply(this._gl),this._stencilStateComposer.apply(this._gl),this._alphaState.apply(this._gl,this._currentRenderTarget&&this._currentRenderTarget.textures?this._currentRenderTarget.textures.length:1),this._colorWriteChanged){this._colorWriteChanged=!1;let e=this._colorWrite;this._gl.colorMask(e,e,e,e)}}wipeCaches(e){(!this.preventCacheWipeBetweenFrames||e)&&(this._currentEffect=null,this._viewportCached.x=0,this._viewportCached.y=0,this._viewportCached.z=0,this._viewportCached.w=0,this._unbindVertexArrayObject(),e&&(this._currentProgram=null,this.resetTextureCache(),this._stencilStateComposer.reset(),this._depthCullingState.reset(),this._depthCullingState.depthFunc=this._gl.LEQUAL,this._alphaState.reset(),this._resetAlphaMode(),this._colorWrite=!0,this._colorWriteChanged=!0,this._unpackFlipYCached=null,this._gl.pixelStorei(this._gl.UNPACK_COLORSPACE_CONVERSION_WEBGL,this._gl.NONE),this._gl.pixelStorei(this._gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL,0),this._mustWipeVertexAttributes=!0,this.unbindAllAttributes()),this._resetVertexBufferBinding(),this._cachedIndexBuffer=null,this._cachedEffectForVertexBuffers=null,this.bindIndexBuffer(null))}_getSamplingParameters(e,t){let r=this._gl,i=r.NEAREST,s=r.NEAREST,a=!1;switch(e){case 11:i=r.LINEAR,s=t?r.LINEAR_MIPMAP_NEAREST:r.LINEAR;break;case 3:i=r.LINEAR,a=!0,s=t?r.LINEAR_MIPMAP_LINEAR:r.LINEAR;break;case 8:a=!0,i=r.NEAREST,s=t?r.NEAREST_MIPMAP_LINEAR:r.NEAREST;break;case 4:i=r.NEAREST,s=t?r.NEAREST_MIPMAP_NEAREST:r.NEAREST;break;case 5:i=r.NEAREST,s=t?r.LINEAR_MIPMAP_NEAREST:r.LINEAR;break;case 6:a=!0,i=r.NEAREST,s=t?r.LINEAR_MIPMAP_LINEAR:r.LINEAR;break;case 7:i=r.NEAREST,s=r.LINEAR;break;case 1:i=r.NEAREST,s=r.NEAREST;break;case 9:i=r.LINEAR,s=t?r.NEAREST_MIPMAP_NEAREST:r.NEAREST;break;case 10:a=!0,i=r.LINEAR,s=t?r.NEAREST_MIPMAP_LINEAR:r.NEAREST;break;case 2:i=r.LINEAR,s=r.LINEAR;break;case 12:i=r.LINEAR,s=r.NEAREST}return{min:s,mag:i,hasMipMaps:a}}_createTexture(){let e=this._gl.createTexture();if(!e)throw Error("Unable to create texture");return e}_createHardwareTexture(){return new p(this._createTexture(),this._gl)}_createInternalTexture(e,t,r=!0,i=0){let s,a,n=!1,_=0,l=3,h=5,u=!1,o=1,c=!1,f=0,d=!1;void 0!==t&&"object"==typeof t?(s=!!t.generateMipMaps,n=!!t.createMipMaps,_=void 0===t.type?0:t.type,l=void 0===t.samplingMode?3:t.samplingMode,h=void 0===t.format?5:t.format,u=void 0!==t.useSRGBBuffer&&t.useSRGBBuffer,o=t.samples??1,a=t.label,c=!!t.createMSAATexture,f=t.comparisonFunction||0,d=!!t.isCube):s=!!t,u&&(u=this._caps.supportSRGBBuffers&&(this.webGLVersion>1||this.isWebGPU)),(1!==_||this._caps.textureFloatLinearFiltering)&&(2!==_||this._caps.textureHalfFloatLinearFiltering)||(l=1),1!==_||this._caps.textureFloat||(_=0,g.Logger.Warn("Float textures are not supported. Type forced to TEXTURETYPE_UNSIGNED_BYTE"));let E=b(h),T=m(h),R=this._gl,p=new A.InternalTexture(this,i),x=e.width||e,S=e.height||e,B=e.depth||0,C=e.layers||0,P=this._getSamplingParameters(l,(s||n)&&!E),L=0!==C?R.TEXTURE_2D_ARRAY:0!==B?R.TEXTURE_3D:d?R.TEXTURE_CUBE_MAP:R.TEXTURE_2D,M=E?this._getInternalFormatFromDepthTextureFormat(h,!0,T):this._getRGBABufferInternalSizedFormat(_,h,u),G=E?T?R.DEPTH_STENCIL:R.DEPTH_COMPONENT:this._getInternalFormat(h),I=E?this._getWebGLTextureTypeFromDepthTextureFormat(h):this._getWebGLTextureType(_);if(this._bindTextureDirectly(L,p),0!==C)p.is2DArray=!0,R.texImage3D(L,0,M,x,S,C,0,G,I,null);else if(0!==B)p.is3D=!0,R.texImage3D(L,0,M,x,S,B,0,G,I,null);else if(d){p.isCube=!0;for(let e=0;e<6;e++)R.texImage2D(R.TEXTURE_CUBE_MAP_POSITIVE_X+e,0,M,x,S,0,G,I,null)}else R.texImage2D(L,0,M,x,S,0,G,I,null);if(R.texParameteri(L,R.TEXTURE_MAG_FILTER,P.mag),R.texParameteri(L,R.TEXTURE_MIN_FILTER,P.min),R.texParameteri(L,R.TEXTURE_WRAP_S,R.CLAMP_TO_EDGE),R.texParameteri(L,R.TEXTURE_WRAP_T,R.CLAMP_TO_EDGE),E&&this.webGLVersion>1&&(0===f?(R.texParameteri(L,R.TEXTURE_COMPARE_FUNC,515),R.texParameteri(L,R.TEXTURE_COMPARE_MODE,R.NONE)):(R.texParameteri(L,R.TEXTURE_COMPARE_FUNC,f),R.texParameteri(L,R.TEXTURE_COMPARE_MODE,R.COMPARE_REF_TO_TEXTURE))),(s||n)&&this._gl.generateMipmap(L),this._bindTextureDirectly(L,null),p._useSRGBBuffer=u,p.baseWidth=x,p.baseHeight=S,p.width=x,p.height=S,p.depth=C||B,p.isReady=!0,p.samples=o,p.generateMipMaps=s,p.samplingMode=l,p.type=_,p.format=h,p.label=a,p.comparisonFunction=f,this._internalTexturesCache.push(p),c){let e;if(!(e=b(p.format)?this._setupFramebufferDepthAttachments(m(p.format),19!==p.format,p.width,p.height,o,p.format,!0):this._createRenderBuffer(p.width,p.height,o,-1,this._getRGBABufferInternalSizedFormat(p.type,p.format,p._useSRGBBuffer),-1)))throw Error("Unable to create render buffer");p._autoMSAAManagement=!0;let t=p._hardwareTexture;t||(t=p._hardwareTexture=this._createHardwareTexture()),t.addMSAARenderBuffer(e)}return p}_getUseSRGBBuffer(e,t){return e&&this._caps.supportSRGBBuffers&&(this.webGLVersion>1||t)}createTexture(e,t,r,i,s=3,a=null,n=null,_=null,l=null,h=null,u=null,o,c,g,f){return this._createTextureBase(e,t,r,i,s,a,n,(...e)=>this._prepareWebGLTexture(...e,h),(e,t,r,s,a,n)=>{let _=this._gl,l=r.width===e&&r.height===t;a._creationFlags=g??0;let h=this._getTexImageParametersForCreateTexture(a.format,a._useSRGBBuffer);if(l)return _.texImage2D(_.TEXTURE_2D,0,h.internalFormat,h.format,h.type,r),!1;let u=this._caps.maxTextureSize;if(r.width>u||r.height>u||!this._supportsHardwareTextureRescaling)return this._prepareWorkingCanvas(),!!this._workingCanvas&&!!this._workingContext&&(this._workingCanvas.width=e,this._workingCanvas.height=t,this._workingContext.drawImage(r,0,0,r.width,r.height,0,0,e,t),_.texImage2D(_.TEXTURE_2D,0,h.internalFormat,h.format,h.type,this._workingCanvas),a.width=e,a.height=t,!1);{let e=new A.InternalTexture(this,2);this._bindTextureDirectly(_.TEXTURE_2D,e,!0),_.texImage2D(_.TEXTURE_2D,0,h.internalFormat,h.format,h.type,r),this._rescaleTexture(e,a,i,h.format,()=>{this._releaseTexture(e),this._bindTextureDirectly(_.TEXTURE_2D,a,!0),n()})}return!0},_,l,h,u,o,c,f)}_getTexImageParametersForCreateTexture(e,t){let r,i;return 1===this.webGLVersion?i=r=this._getInternalFormat(e,t):(r=this._getInternalFormat(e,!1),i=this._getRGBABufferInternalSizedFormat(0,e,t)),{internalFormat:i,format:r,type:this._gl.UNSIGNED_BYTE}}_rescaleTexture(e,t,r,i,s){}_unpackFlipY(e){this._unpackFlipYCached!==e&&(this._gl.pixelStorei(this._gl.UNPACK_FLIP_Y_WEBGL,+!!e),this.enableUnpackFlipYCached&&(this._unpackFlipYCached=e))}_getUnpackAlignement(){return this._gl.getParameter(this._gl.UNPACK_ALIGNMENT)}_getTextureTarget(e){return e.isCube?this._gl.TEXTURE_CUBE_MAP:e.is3D?this._gl.TEXTURE_3D:e.is2DArray||e.isMultiview?this._gl.TEXTURE_2D_ARRAY:this._gl.TEXTURE_2D}updateTextureSamplingMode(e,t,r=!1){let i=this._getTextureTarget(t),s=this._getSamplingParameters(e,t.useMipMaps||r);this._setTextureParameterInteger(i,this._gl.TEXTURE_MAG_FILTER,s.mag,t),this._setTextureParameterInteger(i,this._gl.TEXTURE_MIN_FILTER,s.min),r&&s.hasMipMaps&&(t.generateMipMaps=!0,this._gl.generateMipmap(i)),this._bindTextureDirectly(i,null),t.samplingMode=e}updateTextureDimensions(e,t,r,i=1){}updateTextureWrappingMode(e,t,r=null,i=null){let s=this._getTextureTarget(e);null!==t&&(this._setTextureParameterInteger(s,this._gl.TEXTURE_WRAP_S,this._getTextureWrapMode(t),e),e._cachedWrapU=t),null!==r&&(this._setTextureParameterInteger(s,this._gl.TEXTURE_WRAP_T,this._getTextureWrapMode(r),e),e._cachedWrapV=r),(e.is2DArray||e.is3D)&&null!==i&&(this._setTextureParameterInteger(s,this._gl.TEXTURE_WRAP_R,this._getTextureWrapMode(i),e),e._cachedWrapR=i),this._bindTextureDirectly(s,null)}_uploadCompressedDataToTextureDirectly(e,t,r,i,s,a=0,n=0){let _=this._gl,l=_.TEXTURE_2D;if(e.isCube&&(l=_.TEXTURE_CUBE_MAP_POSITIVE_X+a),e._useSRGBBuffer)switch(t){case 37492:case 36196:this._caps.etc2?t=_.COMPRESSED_SRGB8_ETC2:e._useSRGBBuffer=!1;break;case 37496:this._caps.etc2?t=_.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:e._useSRGBBuffer=!1;break;case 36492:t=_.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT;break;case 37808:t=_.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR;break;case 37809:t=_.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR;break;case 37810:t=_.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR;break;case 37811:t=_.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR;break;case 37812:t=_.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR;break;case 37813:t=_.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR;break;case 37814:t=_.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR;break;case 37815:t=_.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR;break;case 37816:t=_.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR;break;case 37817:t=_.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR;break;case 37818:t=_.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR;break;case 37819:t=_.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR;break;case 37820:t=_.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR;break;case 37821:t=_.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR;break;case 33776:this._caps.s3tc_srgb?t=_.COMPRESSED_SRGB_S3TC_DXT1_EXT:e._useSRGBBuffer=!1;break;case 33777:this._caps.s3tc_srgb?t=_.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT:e._useSRGBBuffer=!1;break;case 33779:this._caps.s3tc_srgb?t=_.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT:e._useSRGBBuffer=!1;break;default:e._useSRGBBuffer=!1}if(e.generateMipMaps){let a=e._hardwareTexture;a.memoryAllocated||(_.texStorage2D(e.isCube?_.TEXTURE_CUBE_MAP:_.TEXTURE_2D,Math.floor(Math.log2(Math.max(r,i)))+1,t,e.width,e.height),a.memoryAllocated=!0),this._gl.compressedTexSubImage2D(l,n,0,0,r,i,t,s)}else this._gl.compressedTexImage2D(l,n,t,r,i,0,s)}_uploadDataToTextureDirectly(e,t,r=0,i=0,s,a=!1){let n=this._gl,_=this._getWebGLTextureType(e.type),l=this._getInternalFormat(e.format),h=void 0===s?this._getRGBABufferInternalSizedFormat(e.type,e.format,e._useSRGBBuffer):this._getInternalFormat(s,e._useSRGBBuffer);this._unpackFlipY(e.invertY);let u=n.TEXTURE_2D;e.isCube&&(u=n.TEXTURE_CUBE_MAP_POSITIVE_X+r);let o=Math.round(Math.log(e.width)*Math.LOG2E),c=Math.round(Math.log(e.height)*Math.LOG2E),g=a?e.width:Math.pow(2,Math.max(o-i,0)),f=a?e.height:Math.pow(2,Math.max(c-i,0));n.texImage2D(u,i,h,g,f,0,l,_,t)}updateTextureData(e,t,r,i,s,a,n=0,_=0,l=!1){let h=this._gl,u=this._getWebGLTextureType(e.type),o=this._getInternalFormat(e.format);this._unpackFlipY(e.invertY);let c=h.TEXTURE_2D,g=h.TEXTURE_2D;e.isCube&&(g=h.TEXTURE_CUBE_MAP_POSITIVE_X+n,c=h.TEXTURE_CUBE_MAP),this._bindTextureDirectly(c,e,!0),h.texSubImage2D(g,_,r,i,s,a,o,u,t),l&&this._gl.generateMipmap(g),this._bindTextureDirectly(c,null)}_uploadArrayBufferViewToTexture(e,t,r=0,i=0){let s=this._gl,a=e.isCube?s.TEXTURE_CUBE_MAP:s.TEXTURE_2D;this._bindTextureDirectly(a,e,!0),this._uploadDataToTextureDirectly(e,t,r,i),this._bindTextureDirectly(a,null,!0)}_prepareWebGLTextureContinuation(e,t,r,i,s){let a=this._gl;if(!a)return;let n=this._getSamplingParameters(s,!r);a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MAG_FILTER,n.mag),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MIN_FILTER,n.min),r||i||a.generateMipmap(a.TEXTURE_2D),this._bindTextureDirectly(a.TEXTURE_2D,null),t&&t.removePendingData(e),e.onLoadedObservable.notifyObservers(e),e.onLoadedObservable.clear()}_prepareWebGLTexture(e,t,r,i,s,a,n,_,l,h){let u=this.getCaps().maxTextureSize,o=Math.min(u,this.needPOTTextures?(0,R.GetExponentOfTwo)(i.width,u):i.width),c=Math.min(u,this.needPOTTextures?(0,R.GetExponentOfTwo)(i.height,u):i.height),g=this._gl;if(g){if(!e._hardwareTexture){r&&r.removePendingData(e);return}this._bindTextureDirectly(g.TEXTURE_2D,e,!0),this._unpackFlipY(void 0===s||!!s),e.baseWidth=i.width,e.baseHeight=i.height,e.width=o,e.height=c,e.isReady=!0,e.type=-1!==e.type?e.type:0,e.format=-1!==e.format?e.format:h??(".jpg"!==t||e._useSRGBBuffer?5:4),_(o,c,i,t,e,()=>{this._prepareWebGLTextureContinuation(e,r,a,n,l)})||this._prepareWebGLTextureContinuation(e,r,a,n,l)}}_getInternalFormatFromDepthTextureFormat(e,t,r){let i=this._gl;if(!t)return i.STENCIL_INDEX8;let s=r?i.DEPTH_STENCIL:i.DEPTH_COMPONENT;return this.webGLVersion>1?15===e?s=i.DEPTH_COMPONENT16:16===e?s=i.DEPTH_COMPONENT24:17===e||13===e?s=r?i.DEPTH24_STENCIL8:i.DEPTH_COMPONENT24:14===e?s=i.DEPTH_COMPONENT32F:18===e&&(s=r?i.DEPTH32F_STENCIL8:i.DEPTH_COMPONENT32F):s=i.DEPTH_COMPONENT16,s}_getWebGLTextureTypeFromDepthTextureFormat(e){let t=this._gl,r=t.UNSIGNED_INT;return 15===e?r=t.UNSIGNED_SHORT:17===e||13===e?r=t.UNSIGNED_INT_24_8:14===e?r=t.FLOAT:18===e?r=t.FLOAT_32_UNSIGNED_INT_24_8_REV:19===e&&(r=t.UNSIGNED_BYTE),r}_setupFramebufferDepthAttachments(e,t,r,i,s=1,a,n=!1){let _=this._gl;a=a??(e?13:14);let l=this._getInternalFormatFromDepthTextureFormat(a,t,e);return e&&t?this._createRenderBuffer(r,i,s,_.DEPTH_STENCIL,l,n?-1:_.DEPTH_STENCIL_ATTACHMENT):t?this._createRenderBuffer(r,i,s,l,l,n?-1:_.DEPTH_ATTACHMENT):e?this._createRenderBuffer(r,i,s,l,l,n?-1:_.STENCIL_ATTACHMENT):null}_createRenderBuffer(e,t,r,i,s,a,n=!0){let _=this._gl.createRenderbuffer();return this._updateRenderBuffer(_,e,t,r,i,s,a,n)}_updateRenderBuffer(e,t,r,i,s,a,n,_=!0){let l=this._gl;return l.bindRenderbuffer(l.RENDERBUFFER,e),i>1&&l.renderbufferStorageMultisample?l.renderbufferStorageMultisample(l.RENDERBUFFER,i,a,t,r):l.renderbufferStorage(l.RENDERBUFFER,s,t,r),-1!==n&&l.framebufferRenderbuffer(l.FRAMEBUFFER,n,l.RENDERBUFFER,e),_&&l.bindRenderbuffer(l.RENDERBUFFER,null),e}_releaseTexture(e){this._deleteTexture(e._hardwareTexture),this.unbindAllTextures();let t=this._internalTexturesCache.indexOf(e);-1!==t&&this._internalTexturesCache.splice(t,1),e._lodTextureHigh&&e._lodTextureHigh.dispose(),e._lodTextureMid&&e._lodTextureMid.dispose(),e._lodTextureLow&&e._lodTextureLow.dispose(),e._irradianceTexture&&e._irradianceTexture.dispose()}_deleteTexture(e){e?.release()}_setProgram(e){this._currentProgram!==e&&((0,u._setProgram)(e,this._gl),this._currentProgram=e)}bindSamplers(e){let t=e.getPipelineContext();this._setProgram(t.program);let r=e.getSamplers();for(let t=0;t<r.length;t++){let i=e.getUniform(r[t]);i&&(this._boundUniforms[t]=i)}this._currentEffect=null}_activateCurrentTexture(){this._currentTextureChannel!==this._activeChannel&&(this._gl.activeTexture(this._gl.TEXTURE0+this._activeChannel),this._currentTextureChannel=this._activeChannel)}_bindTextureDirectly(e,t,r=!1,i=!1){let s=!1,a=t&&t._associatedChannel>-1;if(r&&a&&(this._activeChannel=t._associatedChannel),this._boundTexturesCache[this._activeChannel]!==t||i){if(this._activateCurrentTexture(),t&&t.isMultiview)throw g.Logger.Error(["_bindTextureDirectly called with a multiview texture!",e,t]),"_bindTextureDirectly called with a multiview texture!";this._gl.bindTexture(e,t?._hardwareTexture?.underlyingResource??null),this._boundTexturesCache[this._activeChannel]=t,t&&(t._associatedChannel=this._activeChannel)}else r&&(s=!0,this._activateCurrentTexture());return a&&!r&&this._bindSamplerUniformToChannel(t._associatedChannel,this._activeChannel),s}_bindTexture(e,t,r){if(void 0===e)return;t&&(t._associatedChannel=e),this._activeChannel=e;let i=t?this._getTextureTarget(t):this._gl.TEXTURE_2D;this._bindTextureDirectly(i,t)}unbindAllTextures(){for(let e=0;e<this._maxSimultaneousTextures;e++)this._activeChannel=e,this._bindTextureDirectly(this._gl.TEXTURE_2D,null),this._bindTextureDirectly(this._gl.TEXTURE_CUBE_MAP,null),this.webGLVersion>1&&(this._bindTextureDirectly(this._gl.TEXTURE_3D,null),this._bindTextureDirectly(this._gl.TEXTURE_2D_ARRAY,null))}setTexture(e,t,r,i){void 0!==e&&(t&&(this._boundUniforms[e]=t),this._setTexture(e,r))}_bindSamplerUniformToChannel(e,t){let r=this._boundUniforms[e];r&&r._currentState!==t&&(this._gl.uniform1i(r,t),r._currentState=t)}_getTextureWrapMode(e){switch(e){case 1:break;case 0:return this._gl.CLAMP_TO_EDGE;case 2:return this._gl.MIRRORED_REPEAT}return this._gl.REPEAT}_setTexture(e,t,r=!1,i=!1,s=""){let a;if(!t)return null!=this._boundTexturesCache[e]&&(this._activeChannel=e,this._bindTextureDirectly(this._gl.TEXTURE_2D,null),this._bindTextureDirectly(this._gl.TEXTURE_CUBE_MAP,null),this.webGLVersion>1&&(this._bindTextureDirectly(this._gl.TEXTURE_3D,null),this._bindTextureDirectly(this._gl.TEXTURE_2D_ARRAY,null))),!1;if(t.video){this._activeChannel=e;let r=t.getInternalTexture();r&&(r._associatedChannel=e),t.update()}else if(4===t.delayLoadState)return t.delayLoad(),!1;a=i?t.depthStencilTexture:t.isReady()?t.getInternalTexture():t.isCube?this.emptyCubeTexture:t.is3D?this.emptyTexture3D:t.is2DArray?this.emptyTexture2DArray:this.emptyTexture,!r&&a&&(a._associatedChannel=e);let n=!0;this._boundTexturesCache[e]===a&&(r||this._bindSamplerUniformToChannel(a._associatedChannel,e),n=!1),this._activeChannel=e;let _=this._getTextureTarget(a);if(n&&this._bindTextureDirectly(_,a,r),a&&!a.isMultiview){if(a.isCube&&a._cachedCoordinatesMode!==t.coordinatesMode){a._cachedCoordinatesMode=t.coordinatesMode;let e=+(3!==t.coordinatesMode&&5!==t.coordinatesMode);t.wrapU=e,t.wrapV=e}a._cachedWrapU!==t.wrapU&&(a._cachedWrapU=t.wrapU,this._setTextureParameterInteger(_,this._gl.TEXTURE_WRAP_S,this._getTextureWrapMode(t.wrapU),a)),a._cachedWrapV!==t.wrapV&&(a._cachedWrapV=t.wrapV,this._setTextureParameterInteger(_,this._gl.TEXTURE_WRAP_T,this._getTextureWrapMode(t.wrapV),a)),a.is3D&&a._cachedWrapR!==t.wrapR&&(a._cachedWrapR=t.wrapR,this._setTextureParameterInteger(_,this._gl.TEXTURE_WRAP_R,this._getTextureWrapMode(t.wrapR),a)),this._setAnisotropicLevel(_,a,t.anisotropicFilteringLevel)}return!0}setTextureArray(e,t,r,i){if(void 0!==e&&t){this._textureUnits&&this._textureUnits.length===r.length||(this._textureUnits=new Int32Array(r.length));for(let t=0;t<r.length;t++){let i=r[t].getInternalTexture();i?(this._textureUnits[t]=e+t,i._associatedChannel=e+t):this._textureUnits[t]=-1}this._gl.uniform1iv(t,this._textureUnits);for(let e=0;e<r.length;e++)this._setTexture(this._textureUnits[e],r[e],!0)}}_setAnisotropicLevel(e,t,r){let i=this._caps.textureAnisotropicFilterExtension;11!==t.samplingMode&&3!==t.samplingMode&&2!==t.samplingMode&&(r=1),i&&t._cachedAnisotropicFilteringLevel!==r&&(this._setTextureParameterFloat(e,i.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(r,this._caps.maxAnisotropy),t),t._cachedAnisotropicFilteringLevel=r)}_setTextureParameterFloat(e,t,r,i){this._bindTextureDirectly(e,i,!0,!0),this._gl.texParameterf(e,t,r)}_setTextureParameterInteger(e,t,r,i){i&&this._bindTextureDirectly(e,i,!0,!0),this._gl.texParameteri(e,t,r)}unbindAllAttributes(){if(this._mustWipeVertexAttributes){this._mustWipeVertexAttributes=!1;for(let e=0;e<this._caps.maxVertexAttribs;e++)this.disableAttributeByIndex(e);return}for(let e=0,t=this._vertexAttribArraysEnabled.length;e<t;e++)!(e>=this._caps.maxVertexAttribs)&&this._vertexAttribArraysEnabled[e]&&this.disableAttributeByIndex(e)}releaseEffects(){this._compiledEffects={},this.onReleaseEffectsObservable.notifyObservers(this)}dispose(){(0,f.IsWindowObjectExist)()&&this._renderingCanvas&&(this._renderingCanvas.removeEventListener("webglcontextlost",this._onContextLost),this._onContextRestored&&this._renderingCanvas.removeEventListener("webglcontextrestored",this._onContextRestored)),super.dispose(),this._dummyFramebuffer&&this._gl.deleteFramebuffer(this._dummyFramebuffer),this.unbindAllAttributes(),this._boundUniforms={},this._workingCanvas=null,this._workingContext=null,this._currentBufferPointers.length=0,this._currentProgram=null,this._creationOptions.loseContextOnDispose&&this._gl.getExtension("WEBGL_lose_context")?.loseContext(),(0,u.deleteStateObject)(this._gl)}attachContextLostEvent(e){this._renderingCanvas&&this._renderingCanvas.addEventListener("webglcontextlost",e,!1)}attachContextRestoredEvent(e){this._renderingCanvas&&this._renderingCanvas.addEventListener("webglcontextrestored",e,!1)}getError(){return this._gl.getError()}_canRenderToFloatFramebuffer(){return this._webGLVersion>1?this._caps.colorBufferFloat:this._canRenderToFramebuffer(1)}_canRenderToHalfFloatFramebuffer(){return this._webGLVersion>1?this._caps.colorBufferFloat:this._canRenderToFramebuffer(2)}_canRenderToFramebuffer(e){let t=this._gl;for(;t.getError()!==t.NO_ERROR;);let r=!0,i=t.createTexture();t.bindTexture(t.TEXTURE_2D,i),t.texImage2D(t.TEXTURE_2D,0,this._getRGBABufferInternalSizedFormat(e),1,1,0,t.RGBA,this._getWebGLTextureType(e),null),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.NEAREST);let s=t.createFramebuffer();t.bindFramebuffer(t.FRAMEBUFFER,s),t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,i,0);let a=t.checkFramebufferStatus(t.FRAMEBUFFER);if((r=(r=r&&a===t.FRAMEBUFFER_COMPLETE)&&t.getError()===t.NO_ERROR)&&(t.clear(t.COLOR_BUFFER_BIT),r=r&&t.getError()===t.NO_ERROR),r){t.bindFramebuffer(t.FRAMEBUFFER,null);let e=t.RGBA,i=t.UNSIGNED_BYTE,s=new Uint8Array(4);t.readPixels(0,0,1,1,e,i,s),r=r&&t.getError()===t.NO_ERROR}for(t.deleteTexture(i),t.deleteFramebuffer(s),t.bindFramebuffer(t.FRAMEBUFFER,null);!r&&t.getError()!==t.NO_ERROR;);return r}_getWebGLTextureType(e){if(1===this._webGLVersion){switch(e){case 1:return this._gl.FLOAT;case 2:return this._gl.HALF_FLOAT_OES;case 0:break;case 8:return this._gl.UNSIGNED_SHORT_4_4_4_4;case 9:return this._gl.UNSIGNED_SHORT_5_5_5_1;case 10:return this._gl.UNSIGNED_SHORT_5_6_5}return this._gl.UNSIGNED_BYTE}switch(e){case 3:return this._gl.BYTE;case 0:break;case 4:return this._gl.SHORT;case 5:return this._gl.UNSIGNED_SHORT;case 6:return this._gl.INT;case 7:return this._gl.UNSIGNED_INT;case 1:return this._gl.FLOAT;case 2:return this._gl.HALF_FLOAT;case 8:return this._gl.UNSIGNED_SHORT_4_4_4_4;case 9:return this._gl.UNSIGNED_SHORT_5_5_5_1;case 10:return this._gl.UNSIGNED_SHORT_5_6_5;case 11:return this._gl.UNSIGNED_INT_2_10_10_10_REV;case 12:return this._gl.UNSIGNED_INT_24_8;case 13:return this._gl.UNSIGNED_INT_10F_11F_11F_REV;case 14:return this._gl.UNSIGNED_INT_5_9_9_9_REV;case 15:return this._gl.FLOAT_32_UNSIGNED_INT_24_8_REV}return this._gl.UNSIGNED_BYTE}_getInternalFormat(e,t=!1){let r=t?this._glSRGBExtensionValues.SRGB8_ALPHA8:this._gl.RGBA;switch(e){case 0:r=this._gl.ALPHA;break;case 1:r=this._gl.LUMINANCE;break;case 2:r=this._gl.LUMINANCE_ALPHA;break;case 6:case 33322:case 36760:r=this._gl.RED;break;case 7:case 33324:case 36761:r=this._gl.RG;break;case 4:case 32852:case 36762:r=t?this._glSRGBExtensionValues.SRGB:this._gl.RGB;break;case 5:case 32859:case 36763:r=t?this._glSRGBExtensionValues.SRGB8_ALPHA8:this._gl.RGBA}if(this._webGLVersion>1)switch(e){case 8:r=this._gl.RED_INTEGER;break;case 9:r=this._gl.RG_INTEGER;break;case 10:r=this._gl.RGB_INTEGER;break;case 11:r=this._gl.RGBA_INTEGER}return r}_getRGBABufferInternalSizedFormat(e,t,r=!1){if(1===this._webGLVersion){if(void 0!==t)switch(t){case 0:return this._gl.ALPHA;case 1:return this._gl.LUMINANCE;case 2:return this._gl.LUMINANCE_ALPHA;case 4:return r?this._glSRGBExtensionValues.SRGB:this._gl.RGB}return this._gl.RGBA}switch(e){case 3:switch(t){case 6:return this._gl.R8_SNORM;case 7:return this._gl.RG8_SNORM;case 4:return this._gl.RGB8_SNORM;case 8:return this._gl.R8I;case 9:return this._gl.RG8I;case 10:return this._gl.RGB8I;case 11:return this._gl.RGBA8I;default:return this._gl.RGBA8_SNORM}case 0:switch(t){case 6:return this._gl.R8;case 7:return this._gl.RG8;case 4:return r?this._glSRGBExtensionValues.SRGB8:this._gl.RGB8;case 5:return r?this._glSRGBExtensionValues.SRGB8_ALPHA8:this._gl.RGBA8;case 8:return this._gl.R8UI;case 9:return this._gl.RG8UI;case 10:return this._gl.RGB8UI;case 11:return this._gl.RGBA8UI;case 0:return this._gl.ALPHA;case 1:return this._gl.LUMINANCE;case 2:return this._gl.LUMINANCE_ALPHA;default:return this._gl.RGBA8}case 4:switch(t){case 8:return this._gl.R16I;case 36760:return this._gl.R16_SNORM_EXT;case 36761:return this._gl.RG16_SNORM_EXT;case 36762:return this._gl.RGB16_SNORM_EXT;case 36763:return this._gl.RGBA16_SNORM_EXT;case 9:return this._gl.RG16I;case 10:return this._gl.RGB16I;default:return this._gl.RGBA16I}case 5:switch(t){case 8:return this._gl.R16UI;case 33322:return this._gl.R16_EXT;case 33324:return this._gl.RG16_EXT;case 32852:return this._gl.RGB16_EXT;case 32859:return this._gl.RGBA16_EXT;case 9:return this._gl.RG16UI;case 10:return this._gl.RGB16UI;default:return this._gl.RGBA16UI}case 6:switch(t){case 8:return this._gl.R32I;case 9:return this._gl.RG32I;case 10:return this._gl.RGB32I;default:return this._gl.RGBA32I}case 7:switch(t){case 8:return this._gl.R32UI;case 9:return this._gl.RG32UI;case 10:return this._gl.RGB32UI;default:return this._gl.RGBA32UI}case 1:switch(t){case 6:return this._gl.R32F;case 7:return this._gl.RG32F;case 4:return this._gl.RGB32F;default:return this._gl.RGBA32F}case 2:switch(t){case 6:return this._gl.R16F;case 7:return this._gl.RG16F;case 4:return this._gl.RGB16F;default:return this._gl.RGBA16F}case 10:return this._gl.RGB565;case 13:return this._gl.R11F_G11F_B10F;case 14:return this._gl.RGB9_E5;case 8:return this._gl.RGBA4;case 9:return this._gl.RGB5_A1;case 11:switch(t){case 5:default:return this._gl.RGB10_A2;case 11:return this._gl.RGB10_A2UI}}return r?this._glSRGBExtensionValues.SRGB8_ALPHA8:this._gl.RGBA8}readPixels(e,t,r,i,s=!0,a=!0,n=null){let _=s?this._gl.RGBA:this._gl.RGB,l=r*i*(s?4:3);if(n){if(n.length<l)return g.Logger.Error(`Data buffer is too small to store the read pixels (${n.length} should be more than ${l})`),Promise.resolve(n)}else n=new Uint8Array(l);return a&&this.flushFramebuffer(),this._gl.readPixels(e,t,r,i,_,this._gl.UNSIGNED_BYTE,n),Promise.resolve(n)}static get IsSupportedAsync(){return Promise.resolve(this.isSupported())}static get IsSupported(){return this.isSupported()}static isSupported(){if(null!==this._HasMajorPerformanceCaveat)return!this._HasMajorPerformanceCaveat;if(null===this._IsSupported)try{let e=o.AbstractEngine._CreateCanvas(1,1),t=e.getContext("webgl")||e.getContext("experimental-webgl");this._IsSupported=null!=t&&!!globalThis.WebGLRenderingContext}catch(e){this._IsSupported=!1}return this._IsSupported}static get HasMajorPerformanceCaveat(){if(null===this._HasMajorPerformanceCaveat)try{let e=o.AbstractEngine._CreateCanvas(1,1),t=e.getContext("webgl",{failIfMajorPerformanceCaveat:!0})||e.getContext("experimental-webgl",{failIfMajorPerformanceCaveat:!0});this._HasMajorPerformanceCaveat=!t}catch(e){this._HasMajorPerformanceCaveat=!1}return this._HasMajorPerformanceCaveat}}L._TempClearColorUint32=new Uint32Array(4),L._TempClearColorInt32=new Int32Array(4),L.ExceptionList=[{key:"Chrome/63.0",capture:"63\\.0\\.3239\\.(\\d+)",captureConstraint:108,targets:["uniformBuffer"]},{key:"Firefox/58",capture:null,captureConstraint:null,targets:["uniformBuffer"]},{key:"Firefox/59",capture:null,captureConstraint:null,targets:["uniformBuffer"]},{key:"Chrome/72.+?Mobile",capture:null,captureConstraint:null,targets:["vao"]},{key:"Chrome/73.+?Mobile",capture:null,captureConstraint:null,targets:["vao"]},{key:"Chrome/74.+?Mobile",capture:null,captureConstraint:null,targets:["vao"]},{key:"Mac OS.+Chrome/71",capture:null,captureConstraint:null,targets:["vao"]},{key:"Mac OS.+Chrome/72",capture:null,captureConstraint:null,targets:["vao"]},{key:"Mac OS.+Chrome",capture:null,captureConstraint:null,targets:["uniformBuffer"]},{key:"Chrome/12\\d\\..+?Mobile",capture:null,captureConstraint:null,targets:["uniformBuffer"]},{key:".*AppleWebKit.*(15.4).*Safari",capture:null,captureConstraint:null,targets:["antialias","maxMSAASamples"]},{key:".*(15.4).*AppleWebKit.*Safari",capture:null,captureConstraint:null,targets:["antialias","maxMSAASamples"]}],L._ConcatenateShader=x._ConcatenateShader,L._IsSupported=null,L._HasMajorPerformanceCaveat=null,(t=L.prototype).startTimeQuery??(t.startTimeQuery=(0,C._MissingSideEffect)("ThinEngine","startTimeQuery")),(r=L.prototype).endTimeQuery??(r.endTimeQuery=(0,C._MissingSideEffect)("ThinEngine","endTimeQuery")),(i=L.prototype).createUniformBuffer??(i.createUniformBuffer=(0,C._MissingSideEffect)("ThinEngine","createUniformBuffer")),(s=L.prototype).createDynamicUniformBuffer??(s.createDynamicUniformBuffer=(0,C._MissingSideEffect)("ThinEngine","createDynamicUniformBuffer")),(a=L.prototype).updateUniformBuffer??(a.updateUniformBuffer=(0,C._MissingSideEffect)("ThinEngine","updateUniformBuffer")),(n=L.prototype).bindUniformBuffer??(n.bindUniformBuffer=(0,C._MissingSideEffect)("ThinEngine","bindUniformBuffer")),(_=L.prototype).bindUniformBufferBase??(_.bindUniformBufferBase=(0,C._MissingSideEffect)("ThinEngine","bindUniformBufferBase")),(l=L.prototype).bindUniformBlock??(l.bindUniformBlock=(0,C._MissingSideEffect)("ThinEngine","bindUniformBlock")),e.s(["ThinEngine",0,L],71379)}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,12423,t=>{"use strict";class e{static GetShadersRepository(t=0){return 0===t?e.ShadersRepository:e.ShadersRepositoryWGSL}static GetShadersStore(t=0){return 0===t?e.ShadersStore:e.ShadersStoreWGSL}static GetIncludesShadersStore(t=0){return 0===t?e.IncludesShadersStore:e.IncludesShadersStoreWGSL}}e.ShadersRepository="src/Shaders/",e.ShadersStore={},e.IncludesShadersStore={},e.ShadersRepositoryWGSL="src/ShadersWGSL/",e.ShadersStoreWGSL={},e.IncludesShadersStoreWGSL={},t.s(["ShaderStore",0,e])},21222,t=>{"use strict";var e=t.i(96265);class i{}i.POINTERDOWN=1,i.POINTERUP=2,i.POINTERMOVE=4,i.POINTERWHEEL=8,i.POINTERPICK=16,i.POINTERTAP=32,i.POINTERDOUBLETAP=64;class r{constructor(t,e){this.type=t,this.event=e}}t.s(["PointerEventTypes",0,i,"PointerInfo",0,class extends r{get pickInfo(){return this._pickInfo||this._generatePickInfo(),this._pickInfo}constructor(t,e,i,r=null){super(t,e),this._pickInfo=i,this._inputManager=r}_generatePickInfo(){this._inputManager&&(this._pickInfo=this._inputManager._pickMove(this.event),this._inputManager._setRayOnPointerInfo(this._pickInfo,this.event),this._inputManager=null)}},"PointerInfoPre",0,class extends r{constructor(t,i,r,s){super(t,i),this.ray=null,this.originalPickingInfo=null,this.skipOnPointerObservable=!1,this.localPosition=new e.Vector2(r,s)}}])},36365,t=>{"use strict";class e{}e.KEYDOWN=1,e.KEYUP=2;class i{constructor(t,e){this.type=t,this.event=e}}t.s(["KeyboardEventTypes",0,e,"KeyboardInfo",0,i,"KeyboardInfoPre",0,class extends i{get skipOnPointerObservable(){return this.skipOnKeyboardObservable}set skipOnPointerObservable(t){this.skipOnKeyboardObservable=t}constructor(t,e){super(t,e),this.type=t,this.event=e,this.skipOnKeyboardObservable=!1}}])},76696,t=>{"use strict";var e,i;(i=e||(e={}))[i.PointerMove=0]="PointerMove",i[i.PointerDown=1]="PointerDown",i[i.PointerUp=2]="PointerUp";class r{}r.DOM_DELTA_PIXEL=0,r.DOM_DELTA_LINE=1,r.DOM_DELTA_PAGE=2,t.s(["EventConstants",0,r])},1773,t=>{"use strict";t.s(["useOpenGLOrientationForUV",()=>!1])},54361,t=>{"use strict";class e{constructor(t,e){this.width=t,this.height=e}toString(){return`{W: ${this.width}, H: ${this.height}}`}getClassName(){return"Size"}getHashCode(){let t=0|this.width;return 397*t^this.height}copyFrom(t){this.width=t.width,this.height=t.height}copyFromFloats(t,e){return this.width=t,this.height=e,this}set(t,e){return this.copyFromFloats(t,e)}multiplyByFloats(t,i){return new e(this.width*t,this.height*i)}clone(){return new e(this.width,this.height)}equals(t){return!!t&&this.width===t.width&&this.height===t.height}get surface(){return this.width*this.height}static Zero(){return new e(0,0)}add(t){return new e(this.width+t.width,this.height+t.height)}subtract(t){return new e(this.width-t.width,this.height-t.height)}scale(t){return new e(this.width*t,this.height*t)}static Lerp(t,i,r){return new e(t.width+(i.width-t.width)*r,t.height+(i.height-t.height)*r)}}t.s(["Size",0,e])},25348,t=>{"use strict";class e{constructor(t,e,i,r){this.x=t,this.y=e,this.width=i,this.height=r}toGlobal(t,i){return new e(this.x*t,this.y*i,this.width*t,this.height*i)}toGlobalToRef(t,e,i){return i.x=this.x*t,i.y=this.y*e,i.width=this.width*t,i.height=this.height*e,this}clone(){return new e(this.x,this.y,this.width,this.height)}}t.s(["Viewport",0,e])},70247,t=>{"use strict";var e,i,r,s,o=t.i(96265);(e=r||(r={}))[e.LOCAL=0]="LOCAL",e[e.WORLD=1]="WORLD",e[e.BONE=2]="BONE";class a{}a.X=new o.Vector3(1,0,0),a.Y=new o.Vector3(0,1,0),a.Z=new o.Vector3(0,0,1),(i=s||(s={}))[i.X=0]="X",i[i.Y=1]="Y",i[i.Z=2]="Z",t.s(["Axis",0,a,"Coordinate",0,s,"Space",0,r])},44939,t=>{"use strict";var e=t.i(23240);t.s(["DrawWrapper",0,class{static GetEffect(t){return void 0===t.getPipelineContext?t.effect:t}constructor(t,e=!0){this._wasPreviouslyReady=!1,this._forceRebindOnNextCall=!0,this._wasPreviouslyUsingInstances=null,this.effect=null,this.defines=null,this.drawContext=t.createDrawContext(),e&&(this.materialContext=t.createMaterialContext())}setEffect(t,e,i=!0){this.effect=t,void 0!==e&&(this.defines=e),i&&this.drawContext?.reset()}dispose(t=!1){if(this.effect){let i=this.effect;t?i.dispose():e.TimingTools.SetImmediate(()=>{i.getEngine().onEndFrameObservable.addOnce(()=>{i.dispose()})}),this.effect=null}this.drawContext?.dispose()}}])},49007,t=>{"use strict";t.s(["IntersectionInfo",0,class{constructor(t,e,i){this.bu=t,this.bv=e,this.distance=i,this.faceId=0,this.subMeshId=0,this._internalSubMeshId=0}}])},75991,t=>{"use strict";var e,i,r=t.i(46703),s=t.i(96265),o=t.i(89030);(e=i||(i={}))[e.CW=0]="CW",e[e.CCW=1]="CCW";class a{constructor(t){this._radians=t,this._radians<0&&(this._radians+=2*Math.PI)}degrees(){return 180*this._radians/Math.PI}radians(){return this._radians}static BetweenTwoPoints(t,e){let i=e.subtract(t);return new a(Math.atan2(i.y,i.x))}static BetweenTwoVectors(t,e){let i=t.lengthSquared()*e.lengthSquared();if(0===i)return new a(Math.PI/2);i=Math.sqrt(i);let s=t.dot(e)/i;return new a(Math.acos(s=(0,r.Clamp)(s,-1,1)))}static FromRadians(t){return new a(t)}static FromDegrees(t){return new a(t*Math.PI/180)}}class n{constructor(t,e,i){this.startPoint=t,this.midPoint=e,this.endPoint=i;const r=Math.pow(e.x,2)+Math.pow(e.y,2),o=(Math.pow(t.x,2)+Math.pow(t.y,2)-r)/2,n=(r-Math.pow(i.x,2)-Math.pow(i.y,2))/2,h=(t.x-e.x)*(e.y-i.y)-(e.x-i.x)*(t.y-e.y);this.centerPoint=new s.Vector2((o*(e.y-i.y)-n*(t.y-e.y))/h,((t.x-e.x)*n-(e.x-i.x)*o)/h),this.radius=this.centerPoint.subtract(this.startPoint).length(),this.startAngle=a.BetweenTwoPoints(this.centerPoint,this.startPoint);const c=this.startAngle.degrees();let l=a.BetweenTwoPoints(this.centerPoint,this.midPoint).degrees(),u=a.BetweenTwoPoints(this.centerPoint,this.endPoint).degrees();l-c>180&&(l-=360),l-c<-180&&(l+=360),u-l>180&&(u-=360),u-l<-180&&(u+=360),this.orientation=l-c<0?0:1,this.angle=a.FromDegrees(0===this.orientation?c-u:u-c)}}class h{constructor(t,e){this._points=[],this._length=0,this.closed=!1,this._points.push(new s.Vector2(t,e))}addLineTo(t,e){if(this.closed)return this;let i=new s.Vector2(t,e),r=this._points[this._points.length-1];return this._points.push(i),this._length+=i.subtract(r).length(),this}addArcTo(t,e,i,r,o=36){if(this.closed)return this;let a=new n(this._points[this._points.length-1],new s.Vector2(t,e),new s.Vector2(i,r)),h=a.angle.radians()/o;0===a.orientation&&(h*=-1);let c=a.startAngle.radians()+h;for(let t=0;t<o;t++){let t=Math.cos(c)*a.radius+a.centerPoint.x,e=Math.sin(c)*a.radius+a.centerPoint.y;this.addLineTo(t,e),c+=h}return this}addQuadraticCurveTo(t,e,i,r,s=36){if(this.closed)return this;let o=(t,e,i,r)=>(1-t)*(1-t)*e+2*t*(1-t)*i+t*t*r,a=this._points[this._points.length-1];for(let n=0;n<=s;n++){let h=n/s,c=o(h,a.x,t,i),l=o(h,a.y,e,r);this.addLineTo(c,l)}return this}addBezierCurveTo(t,e,i,r,s,o,a=36){if(this.closed)return this;let n=(t,e,i,r,s)=>(1-t)*(1-t)*(1-t)*e+3*t*(1-t)*(1-t)*i+3*t*t*(1-t)*r+t*t*t*s,h=this._points[this._points.length-1];for(let c=0;c<=a;c++){let l=c/a,u=n(l,h.x,t,i,s),d=n(l,h.y,e,r,o);this.addLineTo(u,d)}return this}isPointInside(t){let e=!1,i=this._points.length;for(let r=i-1,s=0;s<i;r=s++){let i=this._points[r],o=this._points[s],a=o.x-i.x,n=o.y-i.y;if(Math.abs(n)>Number.EPSILON){if(n<0&&(i=this._points[s],a=-a,o=this._points[r],n=-n),t.y<i.y||t.y>o.y)continue;if(t.y===i.y&&t.x===i.x)return!0;{let r=n*(t.x-i.x)-a*(t.y-i.y);if(0===r)return!0;if(r<0)continue;e=!e}}else{if(t.y!==i.y)continue;if(o.x<=t.x&&t.x<=i.x||i.x<=t.x&&t.x<=o.x)return!0}}return e}close(){return this.closed=!0,this}length(){let t=this._length;if(this.closed){let e=this._points[this._points.length-1];t+=this._points[0].subtract(e).length()}return t}area(){let t=this._points.length,e=0;for(let i=t-1,r=0;r<t;i=r++)e+=this._points[i].x*this._points[r].y-this._points[r].x*this._points[i].y;return .5*e}getPoints(){return this._points}getPointAtLengthPosition(t){if(t<0||t>1)return s.Vector2.Zero();let e=t*this.length(),i=0;for(let t=0;t<this._points.length;t++){let r=(t+1)%this._points.length,o=this._points[t],a=this._points[r].subtract(o),n=a.length()+i;if(e>=i&&e<=n){let t=a.normalize(),r=e-i;return new s.Vector2(o.x+t.x*r,o.y+t.y*r)}i=n}return s.Vector2.Zero()}static StartingAt(t,e){return new h(t,e)}}class c{constructor(t,e=null,i,r=!1){this.path=t,this._curve=[],this._distances=[],this._tangents=[],this._normals=[],this._binormals=[],this._pointAtData={id:0,point:s.Vector3.Zero(),previousPointArrayIndex:0,position:0,subPosition:0,interpolateReady:!1,interpolationMatrix:s.Matrix.Identity()};for(let e=0;e<t.length;e++)this._curve[e]=t[e].clone();this._raw=i||!1,this._alignTangentsWithPath=r,this._compute(e,r)}getCurve(){return this._curve}getPoints(){return this._curve}length(){return this._distances[this._distances.length-1]}getTangents(){return this._tangents}getNormals(){return this._normals}getBinormals(){return this._binormals}getDistances(){return this._distances}getPointAt(t){return this._updatePointAtData(t).point}getTangentAt(t,e=!1){return this._updatePointAtData(t,e),e?s.Vector3.TransformCoordinates(s.Vector3.Forward(),this._pointAtData.interpolationMatrix):this._tangents[this._pointAtData.previousPointArrayIndex]}getNormalAt(t,e=!1){return this._updatePointAtData(t,e),e?s.Vector3.TransformCoordinates(s.Vector3.Right(),this._pointAtData.interpolationMatrix):this._normals[this._pointAtData.previousPointArrayIndex]}getBinormalAt(t,e=!1){return this._updatePointAtData(t,e),e?s.Vector3.TransformCoordinates(s.Vector3.UpReadOnly,this._pointAtData.interpolationMatrix):this._binormals[this._pointAtData.previousPointArrayIndex]}getDistanceAt(t){return this.length()*t}getPreviousPointIndexAt(t){return this._updatePointAtData(t),this._pointAtData.previousPointArrayIndex}getSubPositionAt(t){return this._updatePointAtData(t),this._pointAtData.subPosition}getClosestPositionTo(t){let e=Number.MAX_VALUE,i=0;for(let r=0;r<this._curve.length-1;r++){let o=this._curve[r+0],a=this._curve[r+1].subtract(o).normalize(),n=this._distances[r+1]-this._distances[r+0],h=Math.min(Math.max(s.Vector3.Dot(a,t.subtract(o).normalize()),0)*s.Vector3.Distance(o,t)/n,1),c=s.Vector3.Distance(o.add(a.scale(h*n)),t);c<e&&(e=c,i=(this._distances[r+0]+n*h)/this.length())}return i}slice(t=0,e=1){if(t<0&&(t=1- -1*t%1),e<0&&(e=1- -1*e%1),t>e){let i=t;t=e,e=i}let i=this.getCurve(),r=this.getPointAt(t),s=this.getPreviousPointIndexAt(t),o=this.getPointAt(e),a=this.getPreviousPointIndexAt(e)+1,n=[];return 0!==t&&(s++,n.push(r)),n.push(...i.slice(s,a)),(1!==e||1===t)&&n.push(o),new c(n,this.getNormalAt(t),this._raw,this._alignTangentsWithPath)}update(t,e=null,i=!1){for(let e=0;e<t.length;e++)this._curve[e].x=t[e].x,this._curve[e].y=t[e].y,this._curve[e].z=t[e].z;return this._compute(e,i),this}_compute(t,e=!1){let i,r,o,a,n,h=this._curve.length;if(h<2)return;this._tangents[0]=this._getFirstNonNullVector(0),this._raw||this._tangents[0].normalize(),this._tangents[h-1]=this._curve[h-1].subtract(this._curve[h-2]),this._raw||this._tangents[h-1].normalize();let c=this._tangents[0],l=this._normalVector(c,t);this._normals[0]=l,this._raw||this._normals[0].normalize(),this._binormals[0]=s.Vector3.Cross(c,this._normals[0]),this._raw||this._binormals[0].normalize(),this._distances[0]=0;for(let t=1;t<h;t++)i=this._getLastNonNullVector(t),t<h-1&&(r=this._getFirstNonNullVector(t),this._tangents[t]=e?r:i.add(r),this._tangents[t].normalize()),this._distances[t]=this._distances[t-1]+this._curve[t].subtract(this._curve[t-1]).length(),o=this._tangents[t],n=this._binormals[t-1],this._normals[t]=s.Vector3.Cross(n,o),this._raw||(0===this._normals[t].length()?(a=this._normals[t-1],this._normals[t]=a.clone()):this._normals[t].normalize()),this._binormals[t]=s.Vector3.Cross(o,this._normals[t]),this._raw||this._binormals[t].normalize();this._pointAtData.id=NaN}_getFirstNonNullVector(t){let e=1,i=this._curve[t+e].subtract(this._curve[t]);for(;0===i.length()&&t+e+1<this._curve.length;)e++,i=this._curve[t+e].subtract(this._curve[t]);return i}_getLastNonNullVector(t){let e=1,i=this._curve[t].subtract(this._curve[t-e]);for(;0===i.length()&&t>e+1;)e++,i=this._curve[t].subtract(this._curve[t-e]);return i}_normalVector(t,e){let i,a=t.length();if(0===a&&(a=1),null==e){let e;e=(0,r.WithinEpsilon)(Math.abs(t.y)/a,1,o.Epsilon)?(0,r.WithinEpsilon)(Math.abs(t.x)/a,1,o.Epsilon)?(0,r.WithinEpsilon)(Math.abs(t.z)/a,1,o.Epsilon)?s.Vector3.Zero():new s.Vector3(0,0,1):new s.Vector3(1,0,0):new s.Vector3(0,-1,0),i=s.Vector3.Cross(t,e)}else i=s.Vector3.Cross(t,e),s.Vector3.CrossToRef(i,t,i);return i.normalize(),i}_updatePointAtData(t,e=!1){let i;if(this._pointAtData.id===t)return this._pointAtData.interpolateReady||this._updateInterpolationMatrix(),this._pointAtData;this._pointAtData.id=t;let r=this.getPoints();if(t<=0)return this._setPointAtData(0,0,r[0],0,e);if(t>=1)return this._setPointAtData(1,1,r[r.length-1],r.length-1,e);let o=r[0],a=0,n=t*this.length();for(let h=1;h<r.length;h++){i=r[h];let c=s.Vector3.Distance(o,i);if((a+=c)===n)return this._setPointAtData(t,1,i,h,e);if(a>n){let r=(a-n)/c,s=o.subtract(i),l=i.add(s.scaleInPlace(r));return this._setPointAtData(t,1-r,l,h-1,e)}o=i}return this._pointAtData}_setPointAtData(t,e,i,r,s){return this._pointAtData.point=i,this._pointAtData.position=t,this._pointAtData.subPosition=e,this._pointAtData.previousPointArrayIndex=r,this._pointAtData.interpolateReady=s,s&&this._updateInterpolationMatrix(),this._pointAtData}_updateInterpolationMatrix(){this._pointAtData.interpolationMatrix=s.Matrix.Identity();let t=this._pointAtData.previousPointArrayIndex;if(t!==this._tangents.length-1){let e=t+1,i=this._tangents[t].clone(),r=this._normals[t].clone(),o=this._binormals[t].clone(),a=this._tangents[e].clone(),n=this._normals[e].clone(),h=this._binormals[e].clone(),c=s.Quaternion.RotationQuaternionFromAxis(r,o,i),l=s.Quaternion.RotationQuaternionFromAxis(n,h,a);s.Quaternion.Slerp(c,l,this._pointAtData.subPosition).toRotationMatrix(this._pointAtData.interpolationMatrix)}}}class l{static CreateQuadraticBezier(t,e,i,r){r=r>2?r:3;let o=[],a=(t,e,i,r)=>(1-t)*(1-t)*e+2*t*(1-t)*i+t*t*r;for(let n=0;n<=r;n++)o.push(new s.Vector3(a(n/r,t.x,e.x,i.x),a(n/r,t.y,e.y,i.y),a(n/r,t.z,e.z,i.z)));return new l(o)}static CreateCubicBezier(t,e,i,r,o){o=o>3?o:4;let a=[],n=(t,e,i,r,s)=>(1-t)*(1-t)*(1-t)*e+3*t*(1-t)*(1-t)*i+3*t*t*(1-t)*r+t*t*t*s;for(let h=0;h<=o;h++)a.push(new s.Vector3(n(h/o,t.x,e.x,i.x,r.x),n(h/o,t.y,e.y,i.y,r.y),n(h/o,t.z,e.z,i.z,r.z)));return new l(a)}static CreateHermiteSpline(t,e,i,r,o){let a=[],n=1/o;for(let h=0;h<=o;h++)a.push(s.Vector3.Hermite(t,e,i,r,h*n));return new l(a)}static CreateCatmullRomSpline(t,e,i){let r=[],o=1/e,a=0;if(i){let i=t.length;for(let n=0;n<i;n++){a=0;for(let h=0;h<e;h++)r.push(s.Vector3.CatmullRom(t[n%i],t[(n+1)%i],t[(n+2)%i],t[(n+3)%i],a)),a+=o}r.push(r[0])}else{let i=[];i.push(t[0].clone()),i.push(...t),i.push(t[t.length-1].clone());let n=0;for(;n<i.length-3;n++){a=0;for(let t=0;t<e;t++)r.push(s.Vector3.CatmullRom(i[n],i[n+1],i[n+2],i[n+3],a)),a+=o}n--,r.push(s.Vector3.CatmullRom(i[n],i[n+1],i[n+2],i[n+3],a))}return new l(r)}static ArcThru3Points(t,e,i,r=32,o=!1,a=!1){let n=[],h=e.subtract(t),c=i.subtract(e),u=t.subtract(i),d=s.Vector3.Cross(h,c),p=d.length();if(p<1e-8)return new l(n);let _=h.lengthSquared(),m=c.lengthSquared(),g=u.lengthSquared(),f=d.lengthSquared(),y=.5*h.length()*c.length()*u.length()/p,x=s.Vector3.Dot(h,u),P=s.Vector3.Dot(h,c),M=s.Vector3.Dot(c,u),R=t.scale(-.5*m*x/f).add(e.scale(-.5*g*P/f)).add(i.scale(-.5*_*M/f)),A=t.subtract(R).normalize(),C=s.Vector3.Cross(d,A).normalize();if(a){let e=2*Math.PI/r;for(let t=0;t<=2*Math.PI;t+=e)n.push(R.add(A.scale(y*Math.cos(t)).add(C.scale(y*Math.sin(t)))));n.push(t)}else{let e,s=1/r,a=0;do e=R.add(A.scale(y*Math.cos(a)).add(C.scale(y*Math.sin(a)))),n.push(e),a+=s;while(!e.equalsWithEpsilon(i,y*s*1.1))n.push(i),o&&n.push(t)}return new l(n)}constructor(t){this._length=0,this._points=t,this._length=this._computeLength(t)}getPoints(){return this._points}length(){return this._length}continue(t){let e=this._points[this._points.length-1],i=this._points.slice(),r=t.getPoints();for(let t=1;t<r.length;t++)i.push(r[t].subtract(r[0]).add(e));return new l(i)}_computeLength(t){let e=0;for(let i=1;i<t.length;i++)e+=t[i].subtract(t[i-1]).length();return e}}t.s(["Angle",0,a,"Arc2",0,n,"BezierCurve",0,class{static Interpolate(t,e,i,r,s){if(0===t)return 0;let o=1-3*r+3*e,a=3*r-6*e,n=3*e,h=t;for(let e=0;e<5;e++){let e=h*h,i=e*h*o+a*e+n*h,r=1/(3*o*e+2*a*h+n);h-=(i-t)*r,h=Math.min(1,Math.max(0,h))}return 3*Math.pow(1-h,2)*h*i+3*(1-h)*Math.pow(h,2)*s+Math.pow(h,3)}},"Curve3",0,l,"Orientation",0,i,"Path2",0,h,"Path3D",0,c])},58302,16074,63764,95190,t=>{"use strict";var e=t.i(10272),i=t.i(37143),r=t.i(59576),s=t.i(96265),o=t.i(89030),a=t.i(70247);class n{constructor(t,e,i){this._cameraPosition=e,this._behavior=i,this.activeInput=!1,this.speed=1,this.zoomSpeed=1,this.panSpeed=1,this.rotationXSpeed=1,this.rotationYSpeed=1,this._zoomSpeedMultiplier=1,this._panSpeedMultiplier=1,this.zoomInertia=.9,this.panInertia=.9,this.rotationInertia=.9,this.zoomAccumulatedPixels=0,this.panAccumulatedPixels=new s.Vector3,this.rotationAccumulatedPixels=new s.Vector3,this.zoomDeltaCurrentFrame=0,this.panDeltaCurrentFrame=s.Vector3.Zero(),this.rotationDeltaCurrentFrame=s.Vector3.Zero(),this._zoomVelocity=0,this._panVelocity=new s.Vector3,this.referenceFrameRate=60,this._rotationVelocity=new s.Vector3,this._prevFrameTimeMs=0,this._scene=t}computeCurrentFrameDeltas(){let t=this._scene.getEngine().getDeltaTime(),e=this._getEffectiveDeltaMs(t);if(0===this._zoomVelocity&&0===this.zoomAccumulatedPixels&&0===this._panVelocity.x&&0===this._panVelocity.y&&0===this._panVelocity.z&&0===this.panAccumulatedPixels.x&&0===this.panAccumulatedPixels.y&&0===this.panAccumulatedPixels.z&&0===this._rotationVelocity.x&&0===this._rotationVelocity.y&&0===this._rotationVelocity.z&&0===this.rotationAccumulatedPixels.x&&0===this.rotationAccumulatedPixels.y&&0===this.rotationAccumulatedPixels.z&&!this.activeInput){this.panDeltaCurrentFrame.setAll(0),this.rotationDeltaCurrentFrame.setAll(0),this.zoomDeltaCurrentFrame=0,t>0&&(this._prevFrameTimeMs=t);return}this.panDeltaCurrentFrame.setAll(0),this.rotationDeltaCurrentFrame.setAll(0),this.zoomDeltaCurrentFrame=0,(this.panAccumulatedPixels.lengthSquared()>0||this.rotationAccumulatedPixels.lengthSquared()>0||0!==this.zoomAccumulatedPixels)&&this._behavior?.isInterpolating&&this._behavior.stopAllAnimations(),this._panVelocity.copyFromFloats(this._calculateCurrentVelocity(this._panVelocity.x,this.panAccumulatedPixels.x,this.panInertia),this._calculateCurrentVelocity(this._panVelocity.y,this.panAccumulatedPixels.y,this.panInertia),this._calculateCurrentVelocity(this._panVelocity.z,this.panAccumulatedPixels.z,this.panInertia)),this._panVelocity.scaleToRef(this.speed*this.panSpeed*this._panSpeedMultiplier*e,this.panDeltaCurrentFrame),this._rotationVelocity.copyFromFloats(this._calculateCurrentVelocity(this._rotationVelocity.x,this.rotationAccumulatedPixels.x,this.rotationInertia),this._calculateCurrentVelocity(this._rotationVelocity.y,this.rotationAccumulatedPixels.y,this.rotationInertia),this._calculateCurrentVelocity(this._rotationVelocity.z,this.rotationAccumulatedPixels.z,this.rotationInertia)),this.rotationDeltaCurrentFrame.copyFromFloats(this._rotationVelocity.x*this.speed*this.rotationXSpeed*e,this._rotationVelocity.y*this.speed*this.rotationYSpeed*e,0),this._zoomVelocity=this._calculateCurrentVelocity(this._zoomVelocity,this.zoomAccumulatedPixels,this.zoomInertia),this.zoomDeltaCurrentFrame=this._zoomVelocity*(this.speed*this.zoomSpeed*this._zoomSpeedMultiplier)*e,t>0&&(this._prevFrameTimeMs=t),this.zoomAccumulatedPixels=0,this.panAccumulatedPixels.setAll(0),this.rotationAccumulatedPixels.setAll(0),this.activeInput=!1}resetRotationVelocity(){this._rotationVelocity.setAll(0),this.rotationAccumulatedPixels.setAll(0)}resetPanVelocity(){this._panVelocity.setAll(0),this.panAccumulatedPixels.setAll(0)}resetZoomVelocity(){this._zoomVelocity=0,this.zoomAccumulatedPixels=0}get isInterpolating(){return!!this._behavior?.isInterpolating}getFrameIndependentDecay(t){let e=this._scene.getEngine().getDeltaTime();return Math.pow(t,this._getEffectiveDeltaMs(e)/(1e3/this.referenceFrameRate))}getFrameIndependentInputScale(t){let e=1-t;return e<=0?1:(1-this.getFrameIndependentDecay(t))/e}_getEffectiveDeltaMs(t){return t>0?t:this._prevFrameTimeMs>0?this._prevFrameTimeMs:1e3/this.referenceFrameRate}_calculateCurrentVelocity(t,e,i){let r=t,s=this._scene.getEngine().getDeltaTime(),o=this._getEffectiveDeltaMs(s);if(0===o)return r;let a=this.getFrameIndependentDecay(i);if(r*=a,0!==e||this.activeInput){let t=1-i;r+=e/o*(t>0?(1-a)/t:1)}else 1e-6>Math.abs(r)&&(r=0);return r}}t.s(["CameraMovement",0,n],16074);class h{constructor(t,e){this.inputMap=[],this.handlers=t,this._createDefaultEntries=e,this.resetInputMap()}resolveInteraction(t,e){for(let i of this.inputMap)if(i.source===t&&this._entryMatches(i,e))return i;return null}resetInputMap(){this.inputMap=this._createDefaultEntries?.()??[]}getEntry(t,e,i){let r=this.inputMap;for(let s=0;s<r.length;s++){let o=r[s];if(o.source===t&&o.interaction===e&&this._entryConditionsMatch(o,i))return o}}getEntries(t,e,i){let r=[],s=this.inputMap;for(let o=0;o<s.length;o++){let a=s[o];a.source===t&&a.interaction===e&&this._entryConditionsMatch(a,i)&&r.push(a)}return r}addEntry(t){let e=this._entrySpecificity(t),i=this.inputMap.length;for(let t=0;t<this.inputMap.length;t++)if(this._entrySpecificity(this.inputMap[t])<e){i=t;break}this.inputMap.splice(i,0,t)}setInteraction(t,e,i){let r=this.resolveInteraction(t,e);return r&&this._entryCoversAllConditionsOf(r,e)?r.interaction=i:this.addEntry({source:t,...e??{},interaction:i}),!0}_entryCoversAllConditionsOf(t,e){if(!e)return!0;for(let i of Object.keys(e)){let r=e[i];if(void 0!==r){if("modifiers"===i){let e=t.modifiers??{};for(let t of Object.keys(r))if(void 0!==r[t]&&void 0===e[t])return!1}else if(void 0===t[i])return!1}}return!0}setInteractions(t,e,i){let r=0,s=this.inputMap;for(let o=0;o<s.length;o++){let a=s[o];a.source===t&&this._entryMatches(a,e)&&(a.interaction=i,r++)}return r}_entryMatches(t,e){switch(t.source){case"pointer":if(void 0!==t.button&&t.button!==e?.button)return!1;return this._matchModifiers(t.modifiers,e?.modifiers);case"wheel":return this._matchModifiers(t.modifiers,e?.modifiers);case"touch":if(void 0!==t.touchCount&&t.touchCount!==e?.touchCount)return!1;return!0;case"keyboard":if(void 0!==t.key&&(Array.isArray(t.key)?-1===t.key.indexOf(e?.key??-1):t.key!==e?.key))return!1;return this._matchModifiers(t.modifiers,e?.modifiers)}}_entryConditionsMatch(t,e){if(!e)return!0;switch(t.source){case"pointer":if("button"in e&&t.button!==e.button)return!1;return!("modifiers"in e)||this._entryModifiersMatch(t.modifiers,e.modifiers);case"wheel":return!("modifiers"in e)||this._entryModifiersMatch(t.modifiers,e.modifiers);case"touch":return!("touchCount"in e)||t.touchCount===e.touchCount;case"keyboard":if("key"in e){if(void 0===t.key)return void 0===e.key;if(void 0===e.key||(Array.isArray(t.key)?-1===t.key.indexOf(e.key):t.key!==e.key))return!1}return!("modifiers"in e)||this._entryModifiersMatch(t.modifiers,e.modifiers)}}_entrySpecificity(t){let e=0;return"button"in t&&void 0!==t.button&&e++,"key"in t&&void 0!==t.key&&e++,"touchCount"in t&&void 0!==t.touchCount&&e++,"modifiers"in t&&t.modifiers&&e++,e}_matchModifiers(t,e){return!t||(void 0===t.ctrl||t.ctrl===(e?.ctrl??!1))&&(void 0===t.shift||t.shift===(e?.shift??!1))&&(void 0===t.alt||t.alt===(e?.alt??!1))}_entryModifiersMatch(t,e){return e?void 0===e.ctrl&&void 0===e.shift&&void 0===e.alt?!t||void 0===t.ctrl&&void 0===t.shift&&void 0===t.alt:(void 0===e.ctrl||t?.ctrl===e.ctrl)&&(void 0===e.shift||t?.shift===e.shift)&&(void 0===e.alt||t?.alt===e.alt):!t}}t.s(["InputMapper",0,h],63764);class c extends n{constructor(t,e,i){super(t,e,i),this.input=new h({translate:(t,e,i)=>{this.panAccumulatedPixels.x+=t,this.panAccumulatedPixels.y+=e,this.panAccumulatedPixels.z+=i},rotate:(t,e)=>{this.rotationAccumulatedPixels.x+=t,this.rotationAccumulatedPixels.y+=e}},()=>this._createDefaultInputMap())}_createDefaultInputMap(){return[{source:"pointer",interaction:"rotate"},{source:"keyboard",interaction:"translate"},{source:"keyboard",interaction:"rotate"},{source:"touch",interaction:"rotate"},{source:"touch",interaction:"translate"}]}}let l=s.Matrix.Zero(),u=s.Quaternion.Identity();class d extends r.Camera{get inertia(){return this._targetInertia}set inertia(t){this._targetInertia=t,this.movement&&(this.movement.panInertia=t,this.movement.rotationInertia=t)}constructor(t,e,i,r=!0){super(t,e,i,r),this.cameraDirection=new s.Vector3(0,0,0),this.cameraRotation=new s.Vector2(0,0),this._targetInertia=.9,this.updateUpVectorFromRotation=!1,this.speed=2,this.noRotationConstraint=!1,this.invertRotation=!1,this.inverseRotationSpeed=.2,this._panningEpsilon=o.Epsilon,this._rotationEpsilon=o.Epsilon,this.lockedTarget=null,this._currentTarget=s.Vector3.Zero(),this._initialFocalDistance=1,this._viewMatrix=s.Matrix.Zero(),this._cameraTransformMatrix=s.Matrix.Zero(),this._cameraRotationMatrix=s.Matrix.Zero(),this._transformedReferencePoint=s.Vector3.Zero(),this._deferredPositionUpdate=new s.Vector3,this._deferredRotationQuaternionUpdate=new s.Quaternion,this._deferredRotationUpdate=new s.Vector3,this._deferredUpdated=!1,this._deferOnly=!1,this._cachedRotationZ=0,this._cachedQuaternionRotationZ=0,this._referencePoint=s.Vector3.Forward(this.getScene().useRightHandedSystem),this.rotation=new s.Vector3(0,this.getScene().useRightHandedSystem?Math.PI:0,0),this.movement=new c(this.getScene(),this.position),this.movement.panInertia=this.inertia,this.movement.rotationInertia=this.inertia}getFrontPosition(t){this.getWorldMatrix();let e=s.TmpVectors.Vector3[0],i=s.TmpVectors.Vector3[1];return i.set(0,0,this._scene.useRightHandedSystem?-1:1),this.getDirectionToRef(i,e),e.scaleInPlace(t),this.globalPosition.add(e)}_getLockedTargetPosition(){if(!this.lockedTarget)return null;if(this.lockedTarget.absolutePosition){let t=this.lockedTarget;t.computeWorldMatrix().getTranslationToRef(t.absolutePosition)}return this.lockedTarget.absolutePosition||this.lockedTarget}storeState(){return this._storedPosition=this.position.clone(),this._storedRotation=this.rotation.clone(),this.rotationQuaternion&&(this._storedRotationQuaternion=this.rotationQuaternion.clone()),super.storeState()}_restoreStateValues(){return!!super._restoreStateValues()&&(this.position=this._storedPosition.clone(),this.rotation=this._storedRotation.clone(),this.rotationQuaternion&&this._storedRotationQuaternion&&(this.rotationQuaternion=this._storedRotationQuaternion.clone()),this.cameraDirection.copyFromFloats(0,0,0),this.cameraRotation.copyFromFloats(0,0),!0)}_initCache(){super._initCache(),this._cache.lockedTarget=new s.Vector3(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),this._cache.rotation=new s.Vector3(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),this._cache.rotationQuaternion=new s.Quaternion(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE)}_updateCache(t){t||super._updateCache();let e=this._getLockedTargetPosition();e?this._cache.lockedTarget?this._cache.lockedTarget.copyFrom(e):this._cache.lockedTarget=e.clone():this._cache.lockedTarget=null,this._cache.rotation.copyFrom(this.rotation),this.rotationQuaternion&&this._cache.rotationQuaternion.copyFrom(this.rotationQuaternion)}_isSynchronizedViewMatrix(){if(!super._isSynchronizedViewMatrix())return!1;let t=this._getLockedTargetPosition();return(this._cache.lockedTarget?this._cache.lockedTarget.equals(t):!t)&&(this.rotationQuaternion?this.rotationQuaternion.equals(this._cache.rotationQuaternion):this._cache.rotation.equals(this.rotation))}_computeLocalCameraSpeed(){let t=this.getEngine();return this.speed*Math.sqrt(t.getDeltaTime()/(100*t.getFps()))}setTarget(t){this.upVector.normalize(),this._initialFocalDistance=t.subtract(this.position).length(),this.position.z===t.z&&(this.position.z+=o.Epsilon),this._referencePoint.normalize().scaleInPlace(this._initialFocalDistance),this.getScene().useRightHandedSystem?s.Matrix.LookAtRHToRef(this.position,t,s.Vector3.UpReadOnly,l):s.Matrix.LookAtLHToRef(this.position,t,s.Vector3.UpReadOnly,l),l.invert();let e=this.rotationQuaternion||u;s.Quaternion.FromRotationMatrixToRef(l,e),e.toEulerAnglesToRef(this.rotation),this.rotation.z=0}get target(){return this.getTarget()}set target(t){this.setTarget(t)}getTarget(){return this._currentTarget}_decideIfNeedsToMove(){return Math.abs(this.cameraDirection.x)>0||Math.abs(this.cameraDirection.y)>0||Math.abs(this.cameraDirection.z)>0}_updatePosition(){if(this.parent){this.parent.getWorldMatrix().invertToRef(s.TmpVectors.Matrix[0]),s.Vector3.TransformNormalToRef(this.cameraDirection,s.TmpVectors.Matrix[0],s.TmpVectors.Vector3[0]),this._deferredPositionUpdate.addInPlace(s.TmpVectors.Vector3[0]),this._deferOnly?this._deferredUpdated=!0:this.position.copyFrom(this._deferredPositionUpdate);return}this._deferredPositionUpdate.addInPlace(this.cameraDirection),this._deferOnly?this._deferredUpdated=!0:this.position.copyFrom(this._deferredPositionUpdate)}_checkInputs(){let t=this.movement,e=0!==this.cameraDirection.x||0!==this.cameraDirection.y||0!==this.cameraDirection.z,i=0!==this.cameraRotation.x||0!==this.cameraRotation.y;t.panAccumulatedPixels.addInPlace(this.cameraDirection),t.rotationAccumulatedPixels.x+=this.cameraRotation.x,t.rotationAccumulatedPixels.y+=this.cameraRotation.y,t.computeCurrentFrameDeltas(),this.cameraDirection.copyFrom(t.panDeltaCurrentFrame),this.cameraRotation.set(t.rotationDeltaCurrentFrame.x,t.rotationDeltaCurrentFrame.y);let r=this.speed*this._panningEpsilon;!e&&Math.abs(this.cameraDirection.x)<r&&Math.abs(this.cameraDirection.y)<r&&Math.abs(this.cameraDirection.z)<r&&(this.cameraDirection.setAll(0),t.resetPanVelocity());let o=this.speed*this._rotationEpsilon;!i&&Math.abs(this.cameraRotation.x)<o&&Math.abs(this.cameraRotation.y)<o&&(this.cameraRotation.set(0,0),t.resetRotationVelocity());let a=this.invertRotation?-this.inverseRotationSpeed:1,n=this._decideIfNeedsToMove(),h=!!(this.cameraRotation.x||this.cameraRotation.y);this._deferredUpdated=!1,this._deferredRotationUpdate.copyFrom(this.rotation),this._deferredPositionUpdate.copyFrom(this.position),this.rotationQuaternion&&this._deferredRotationQuaternionUpdate.copyFrom(this.rotationQuaternion),n&&this._updatePosition(),h&&(this.rotationQuaternion&&this.rotationQuaternion.toEulerAnglesToRef(this._deferredRotationUpdate),this._deferredRotationUpdate.x+=this.cameraRotation.x*a,this._deferredRotationUpdate.y+=this.cameraRotation.y*a,!this.noRotationConstraint&&(this._deferredRotationUpdate.x>1.570796&&(this._deferredRotationUpdate.x=1.570796),this._deferredRotationUpdate.x<-1.570796&&(this._deferredRotationUpdate.x=-1.570796)),this._deferOnly?this._deferredUpdated=!0:this.rotation.copyFrom(this._deferredRotationUpdate),this.rotationQuaternion&&this._deferredRotationUpdate.lengthSquared()&&(s.Quaternion.RotationYawPitchRollToRef(this._deferredRotationUpdate.y,this._deferredRotationUpdate.x,this._deferredRotationUpdate.z,this._deferredRotationQuaternionUpdate),this._deferOnly?this._deferredUpdated=!0:this.rotationQuaternion.copyFrom(this._deferredRotationQuaternionUpdate))),this.cameraDirection.setAll(0),this.cameraRotation.set(0,0),super._checkInputs()}_updateCameraRotationMatrix(){this.rotationQuaternion?this.rotationQuaternion.toRotationMatrix(this._cameraRotationMatrix):s.Matrix.RotationYawPitchRollToRef(this.rotation.y,this.rotation.x,this.rotation.z,this._cameraRotationMatrix)}_rotateUpVectorWithCameraRotationMatrix(){return s.Vector3.TransformNormalToRef(s.Vector3.UpReadOnly,this._cameraRotationMatrix,this.upVector),this}_getViewMatrix(){return this.lockedTarget&&this.setTarget(this._getLockedTargetPosition()),this._updateCameraRotationMatrix(),this.rotationQuaternion&&this._cachedQuaternionRotationZ!=this.rotationQuaternion.z?(this._rotateUpVectorWithCameraRotationMatrix(),this._cachedQuaternionRotationZ=this.rotationQuaternion.z):this._cachedRotationZ!==this.rotation.z&&(this._rotateUpVectorWithCameraRotationMatrix(),this._cachedRotationZ=this.rotation.z),s.Vector3.TransformCoordinatesToRef(this._referencePoint,this._cameraRotationMatrix,this._transformedReferencePoint),this.position.addToRef(this._transformedReferencePoint,this._currentTarget),this.updateUpVectorFromRotation&&(this.rotationQuaternion?a.Axis.Y.rotateByQuaternionToRef(this.rotationQuaternion,this.upVector):(s.Quaternion.FromEulerVectorToRef(this.rotation,u),a.Axis.Y.rotateByQuaternionToRef(u,this.upVector))),this._computeViewMatrix(this.position,this._currentTarget,this.upVector),this._viewMatrix}_computeViewMatrix(t,e,i){if(this.getScene().useRightHandedSystem?s.Matrix.LookAtRHToRef(t,e,i,this._viewMatrix):s.Matrix.LookAtLHToRef(t,e,i,this._viewMatrix),this.parent){let t=this.parent.getWorldMatrix();this._viewMatrix.invert(),this._viewMatrix.multiplyToRef(t,this._viewMatrix),this._viewMatrix.invert(),this._markSyncedWithParent()}}createRigCamera(t,e){if(this.cameraRigMode!==r.Camera.RIG_MODE_NONE){let e=new d(t,this.position.clone(),this.getScene());return e.isRigCamera=!0,e.rigParent=this,this.cameraRigMode===r.Camera.RIG_MODE_VR&&(this.rotationQuaternion||(this.rotationQuaternion=new s.Quaternion),e._cameraRigParams={},e.rotationQuaternion=new s.Quaternion),e.mode=this.mode,e.orthoLeft=this.orthoLeft,e.orthoRight=this.orthoRight,e.orthoTop=this.orthoTop,e.orthoBottom=this.orthoBottom,e}return null}_updateRigCameras(){let t=this._rigCameras[0],e=this._rigCameras[1];switch(this.computeWorldMatrix(),this.cameraRigMode){case r.Camera.RIG_MODE_STEREOSCOPIC_ANAGLYPH:case r.Camera.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_PARALLEL:case r.Camera.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_CROSSEYED:case r.Camera.RIG_MODE_STEREOSCOPIC_OVERUNDER:case r.Camera.RIG_MODE_STEREOSCOPIC_INTERLACED:{let i=this.cameraRigMode===r.Camera.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_CROSSEYED?1:-1,s=this.cameraRigMode===r.Camera.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_CROSSEYED?-1:1;this._getRigCamPositionAndTarget(this._cameraRigParams.stereoHalfAngle*i,t),this._getRigCamPositionAndTarget(this._cameraRigParams.stereoHalfAngle*s,e);break}case r.Camera.RIG_MODE_VR:t.rotationQuaternion&&e.rotationQuaternion&&this.rotationQuaternion?(t.rotationQuaternion.copyFrom(this.rotationQuaternion),e.rotationQuaternion.copyFrom(this.rotationQuaternion)):(t.rotation.copyFrom(this.rotation),e.rotation.copyFrom(this.rotation)),t.position.copyFrom(this.position),e.position.copyFrom(this.position)}super._updateRigCameras()}_getRigCamPositionAndTarget(t,e){this.getTarget().subtractToRef(this.position,d._TargetFocalPoint),d._TargetFocalPoint.normalize().scaleInPlace(this._initialFocalDistance);let i=d._TargetFocalPoint.addInPlace(this.position);s.Matrix.TranslationToRef(-i.x,-i.y,-i.z,d._TargetTransformMatrix),d._TargetTransformMatrix.multiplyToRef(s.Matrix.RotationAxis(e.upVector,t),d._RigCamTransformMatrix),s.Matrix.TranslationToRef(i.x,i.y,i.z,d._TargetTransformMatrix),d._RigCamTransformMatrix.multiplyToRef(d._TargetTransformMatrix,d._RigCamTransformMatrix),s.Vector3.TransformCoordinatesToRef(this.position,d._RigCamTransformMatrix,e.position),e.setTarget(i)}getClassName(){return"TargetCamera"}}d._RigCamTransformMatrix=new s.Matrix,d._TargetTransformMatrix=new s.Matrix,d._TargetFocalPoint=new s.Vector3,(0,e.__decorate)([(0,i.serialize)()],d.prototype,"updateUpVectorFromRotation",void 0),(0,e.__decorate)([(0,i.serializeAsVector3)()],d.prototype,"rotation",void 0),(0,e.__decorate)([(0,i.serialize)()],d.prototype,"speed",void 0),(0,e.__decorate)([(0,i.serializeAsMeshReference)("lockedTargetId")],d.prototype,"lockedTarget",void 0),t.s(["TargetCamera",0,d],58302);var p=t.i(13379),_=t.i(80871),m={};t.s(["CameraInputTypes",0,m,"CameraInputsManager",0,class{constructor(t){this.attachedToElement=!1,this.attached={},this.camera=t,this.checkInputs=()=>{}}add(t){let e=t.getSimpleName();this.attached[e]?p.Logger.Warn("camera input of type "+e+" already exists on camera"):(this.attached[e]=t,t.camera=this.camera,t.checkInputs&&(this.checkInputs=this._addCheckInputs(t.checkInputs.bind(t))),this.attachedToElement&&t.attachControl(this.noPreventDefault))}remove(t){for(let e in this.attached){let i=this.attached[e];if(i===t){i.detachControl(),i.camera=null,delete this.attached[e],this.rebuildInputCheck();return}}}removeByType(t){for(let e in this.attached){let i=this.attached[e];i.getClassName()===t&&(i.detachControl(),i.camera=null,delete this.attached[e],this.rebuildInputCheck())}}_addCheckInputs(t){let e=this.checkInputs;return()=>{e(),t()}}attachInput(t){this.attachedToElement&&t.attachControl(this.noPreventDefault)}attachElement(t=!1){if(!this.attachedToElement)for(let e in t=!r.Camera.ForceAttachControlToAlwaysPreventDefault&&t,this.attachedToElement=!0,this.noPreventDefault=t,this.attached)this.attached[e].attachControl(t)}detachElement(t=!1){for(let e in this.attached)this.attached[e].detachControl(),t&&(this.attached[e].camera=null);this.attachedToElement=!1}rebuildInputCheck(){for(let t in this.checkInputs=()=>{},this.attached){let e=this.attached[t];e.checkInputs&&(this.checkInputs=this._addCheckInputs(e.checkInputs.bind(e)))}}clear(){this.attachedToElement&&this.detachElement(!0),this.attached={},this.attachedToElement=!1,this.checkInputs=()=>{}}serialize(t){let e={};for(let t in this.attached){let i=this.attached[t],r=_.SerializationHelper.Serialize(i);e[i.getClassName()]=r}t.inputsmgr=e}parse(t){let e=t.inputsmgr;if(e)for(let t in this.clear(),e){let i=m[t];if(i){let r=e[t],s=_.SerializationHelper.Parse(()=>new i,r,null);this.add(s)}}else for(let e in this.attached){let i=m[this.attached[e].getClassName()];if(i){let r=_.SerializationHelper.Parse(()=>new i,t,null);this.remove(this.attached[e]),this.add(r)}}}}],95190)},42829,t=>{t.v(e=>Promise.all(["static/chunks/3l1dr_qm_x5kp.js"].map(e=>t.l(e))).then(()=>e(47786)))}]);
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,34637,e=>{"use strict";var r=e.i(12423);let t="passPixelShader",a=`varying vUV: vec2f;var textureSamplerSampler: sampler;var textureSampler: texture_2d<f32>;
|
|
2
|
+
#define CUSTOM_FRAGMENT_DEFINITIONS
|
|
3
|
+
@fragment
|
|
4
|
+
fn main(input: FragmentInputs)->FragmentOutputs {fragmentOutputs.color=textureSample(textureSampler,textureSamplerSampler,input.vUV);}`;r.ShaderStore.ShadersStoreWGSL[t]||(r.ShaderStore.ShadersStoreWGSL[t]=a),e.s(["passPixelShaderWGSL",0,{name:t,shader:a}])}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,62238,42279,t=>{"use strict";let e=1/1.2;t.s(["ZOOM_IN_FACTOR",0,e,"ZOOM_OUT_FACTOR",0,1.2,"disableWheelZoom",0,function(t){t.inputs.removeByType("ArcRotateCameraMouseWheelInput")},"stepZoom",0,function(t,e){let s=t.lowerRadiusLimit??.01,a=t.upperRadiusLimit??1/0;t.radius=Math.min(a,Math.max(s,t.radius*e))}],62238);var s=t.i(29212);t.s(["ZoomButtons",0,function({onZoom:t}){let a="grid h-8 w-8 place-items-center rounded-md border border-edge bg-ink/80 text-lg leading-none text-fg backdrop-blur transition hover:bg-ink hover:text-white";return(0,s.jsxs)("div",{className:"absolute right-3 top-3 flex flex-col gap-1",children:[(0,s.jsx)("button",{type:"button","aria-label":"Zoom in",className:a,onClick:()=>t(e),children:"+"}),(0,s.jsx)("button",{type:"button","aria-label":"Zoom out",className:a,onClick:()=>t(1.2),children:"−"})]})}],42279)},59683,37660,t=>{"use strict";t.s(["attachMeshHover",0,function(t,e,s){let a=0,n=null,i=e=>{let i=e.offsetX,o=e.offsetY;a||(a=requestAnimationFrame(()=>{var e,r;let c;a=0;let l=t.pick(i,o,t=>t.isPickable&&t.isEnabled()),h=l?.pickedMesh?(e=l.pickedMesh,r=l.thinInstanceIndex??-1,(c=e.metadata)?r>=0&&c.hoverLabels?c.hoverLabels[r]??null:c.hoverLabel??null:null):null;h?s({label:h,x:i,y:o}):null!==n&&s(null),n=h}))},o=()=>{a&&(cancelAnimationFrame(a),a=0),null!==n&&(n=null,s(null))};return e.addEventListener("pointermove",i),e.addEventListener("pointerleave",o),()=>{e.removeEventListener("pointermove",i),e.removeEventListener("pointerleave",o),a&&cancelAnimationFrame(a)}}],59683);var e=t.i(29212),s=t.i(56054);t.s(["HeatLegend",0,function({title:t,lowLabel:a="low",highLabel:n="high",note:i}){return(0,e.jsxs)("div",{className:"pointer-events-none absolute bottom-3 left-3 rounded-md border border-edge bg-ink/80 px-3 py-2 text-fg backdrop-blur-sm",children:[(0,e.jsx)("div",{className:"mb-1 text-xs font-medium text-fg",children:t}),(0,e.jsx)("div",{className:"h-2 w-36 rounded-sm",style:{background:s.HEAT_GRADIENT}}),(0,e.jsxs)("div",{className:"mt-1 flex w-36 justify-between text-[10px] text-fg-muted",children:[(0,e.jsx)("span",{children:a}),(0,e.jsx)("span",{children:n})]}),i?(0,e.jsx)("div",{className:"mt-1 max-w-44 text-[10px] leading-tight text-fg-muted",children:i}):null]})}],37660)},47273,t=>{"use strict";var e=t.i(29212),s=t.i(94179);function a(t){return Number.isNaN(t)||t<0?0:t>1?1:t}function n(t){let e=a(t),s=[[0,.1,.9],[0,.85,1],[.1,.9,.2],[1,.85,0],[1,.15,0],[1,1,1]],n=s.length-1,i=e*n,o=Math.min(Math.floor(i),n-1),r=i-o,c=s[o],l=s[o+1];return c&&l?[c[0]+(l[0]-c[0])*r,c[1]+(l[1]-c[1])*r,c[2]+(l[2]-c[2])*r]:[1,1,1]}var i=t.i(56054),o=t.i(62238),r=t.i(59683),c=t.i(37660),l=t.i(93425),h=t.i(42279);t.s(["CameraDome3D",0,function({bins:u,gridSize:d}){let m=(0,s.useRef)(null),j=(0,s.useRef)(null),[k,f]=(0,s.useState)("loading"),[v,b]=(0,s.useState)(null),[p,g]=(0,s.useState)("markers"),[w,x]=(0,s.useState)(null);return(0,s.useEffect)(()=>{let e=m.current;if(!e)return;if(0===u.length)return void f("empty");let s=!1,c=null;return f("loading"),b(null),(async()=>{try{let[{Engine:l},{Scene:h},{ArcRotateCamera:m},{HemisphericLight:k},{Vector3:v,Color3:b,Color4:g,Matrix:w},{MeshBuilder:y},{StandardMaterial:z},{Mesh:M},{DynamicTexture:P}]=await Promise.all([t.A(66022),t.A(48505),t.A(53976),t.A(42436),t.A(89370),t.A(67141),t.A(20693),t.A(8850),t.A(63836),t.A(9607),t.A(96664)]);if(s)return;let _=new l(e,!0,{preserveDrawingBuffer:!1}),q=new h(_);q.clearColor=new g(.04,.05,.07,1);let A=new m("dome-cam",Math.PI/3,Math.PI/2.4,3.6,v.Zero(),q);A.attachControl(e,!0),A.lowerRadiusLimit=1.6,A.upperRadiusLimit=8,(0,o.disableWheelZoom)(A),j.current=A,new k("dome-light",new v(.3,1,.2),q);let I=y.CreateSphere("dome",{diameter:2,segments:20},q),C=new z("dome-mat",q);C.wireframe=!0,C.disableLighting=!0,C.emissiveColor=new b(.16,.2,.28),C.alpha=.5,I.material=C,I.isPickable=!1;let L=[];for(let t=0;t<=64;t++){let e=t/64*Math.PI*2;L.push(new v(Math.cos(e),0,Math.sin(e)))}let N=y.CreateLines("dome-horizon",{points:L},q);N.color=new b(.3,.36,.46),N.isPickable=!1;let B=y.CreateLines("dome-forward",{points:[v.Zero(),new v(1.25,0,0)]},q);B.color=new b(.4,.7,.95),B.isPickable=!1;let R=u.reduce((t,e)=>Math.max(t,e.count),1),S=d>0?d:1;if("markers"===p){let t=y.CreateBox("dome-marker",{size:1},q),e=new z("dome-marker-mat",q);e.disableLighting=!0,e.emissiveColor=b.White(),e.specularColor=new b(0,0,0),t.material=e,t.isPickable=!0,t.thinInstanceEnablePicking=!0;let s=u.length,a=new Float32Array(16*s),n=new Float32Array(4*s),o=Array(s);for(let t=0;t<s;t++){let e=u[t],s=(e.azimuth_bin+.5)/S*Math.PI*2-Math.PI,r=(e.elevation_bin+.5)/S*Math.PI-Math.PI/2,c=Math.cos(r),l=c*Math.cos(s),h=Math.sin(r),d=c*Math.sin(s),m=e.count/R,j=.03+.12*m;w.Scaling(j,j,j).multiply(w.Translation(l,h,d)).copyToArray(a,16*t);let[k,f,v]=(0,i.heatRgb)(m);n[4*t]=k,n[4*t+1]=f,n[4*t+2]=v,n[4*t+3]=1,o[t]=`dir (${e.azimuth_bin}, ${e.elevation_bin}) \xb7 ${e.count}`}t.thinInstanceSetBuffer("matrix",a,16,!0),t.thinInstanceSetBuffer("color",n,4,!0),t.metadata={hoverLabels:o}}else{let t=function(t,e={}){let s=void 0!==e.width&&e.width>0?Math.floor(e.width):256,i=void 0!==e.height&&e.height>0?Math.floor(e.height):Math.max(1,Math.floor(s/2)),o=e.colorRamp??n,r=void 0!==e.blurBins&&e.blurBins>0?e.blurBins:1.5,c=a(e.alphaFloor??0),l=a(e.opacity??1),h=t.gridSize>0?t.gridSize:1,u=new Uint8ClampedArray(s*i*4),d=t.bins.filter(t=>t.count>0);if(0===d.length)return{width:s,height:i,rgba:u};let m=Math.max(1e-4,Math.PI/h*r),j=2*m*m,k=Math.cos(Math.min(Math.PI,3*m)),f=d.map(t=>{var e,s;let a,[n,i]=(e=t.azimuthBin,s=t.elevationBin,[(e+.5)/h*Math.PI*2-Math.PI,(s+.5)/h*Math.PI-Math.PI/2]);return[(a=Math.cos(i))*Math.cos(n),Math.sin(i),a*Math.sin(n)]}),v=new Float32Array(s*i),b=0;for(let t=0;t<i;t++){let e=Math.PI/2-(t+.5)/i*Math.PI,a=Math.cos(e),n=Math.sin(e);for(let e=0;e<s;e++){let i=(e+.5)/s*Math.PI*2-Math.PI,o=a*Math.cos(i),r=a*Math.sin(i),c=0;for(let t=0;t<d.length;t++){let e=f[t],s=o*e[0]+n*e[1]+r*e[2];if(s<k)continue;let a=Math.acos(s>1?1:s<-1?-1:s);c+=d[t].count*Math.exp(-(a*a)/j)}v[t*s+e]=c,c>b&&(b=c)}}if(b<=0)return{width:s,height:i,rgba:u};for(let t=0;t<v.length;t++){let e=a(v[t]/b),[s,n,i]=o(e),r=(c+(1-c)*e)*l,h=4*t;u[h]=Math.round(255*s),u[h+1]=Math.round(255*n),u[h+2]=Math.round(255*i),u[h+3]=Math.round(255*a(r))}return{width:s,height:i,rgba:u}}({bins:u.map(t=>({azimuthBin:t.azimuth_bin,elevationBin:t.elevation_bin,count:t.count})),gridSize:S},{width:256,blurBins:1.5,opacity:.95}),e=new P("dome-skytex",{width:t.width,height:t.height},q,!1);e.hasAlpha=!0;let s=e.getContext(),i=s.createImageData(t.width,t.height);i.data.set(t.rgba),s.putImageData(i,0,0),e.update();let o=y.CreateSphere("dome-sky",{diameter:2,segments:48,sideOrientation:M.DOUBLESIDE},q),r=new z("dome-sky-mat",q);r.disableLighting=!0,r.emissiveColor=b.White(),r.diffuseColor=new b(0,0,0),r.specularColor=new b(0,0,0),r.emissiveTexture=e,r.opacityTexture=e,r.backFaceCulling=!1,o.material=r,o.isPickable=!1}_.runRenderLoop(()=>q.render());let E=()=>_.resize();window.addEventListener("resize",E);let T=(0,r.attachMeshHover)(q,e,x);f("ready"),c=()=>{window.removeEventListener("resize",E),T(),x(null),j.current=null,q.dispose(),_.dispose()}}catch(t){if(s)return;f("error"),b(t instanceof Error?t.message:"Failed to render dome.")}})(),()=>{s=!0,c?.()}},[u,d,p]),(0,e.jsx)(l.Panel,{title:"View-direction dome (3D)",subtitle:"Where the audience looked, mapped onto a sphere — drag to orbit, +/- to zoom",children:(0,e.jsxs)("div",{className:"relative",children:[(0,e.jsx)("canvas",{ref:m,className:"aspect-video w-full rounded-lg border border-edge bg-ink"}),w?(0,e.jsx)("div",{className:"pointer-events-none absolute z-10 max-w-[16rem] truncate rounded border border-edge bg-ink/90 px-1.5 py-0.5 text-xs text-white shadow backdrop-blur",style:{left:w.x+12,top:w.y+12},children:w.label}):null,"ready"===k?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("div",{className:"absolute left-3 top-3 flex overflow-hidden rounded-md border border-edge bg-ink/80 text-xs backdrop-blur",children:["markers","skydome"].map(t=>(0,e.jsx)("button",{type:"button",onClick:()=>g(t),className:`px-2.5 py-1 ${p===t?"bg-fg/15 font-medium text-white":"text-fg-muted hover:text-fg"}`,children:"markers"===t?"Markers":"Skydome"},t))}),(0,e.jsx)(h.ZoomButtons,{onZoom:t=>j.current&&(0,o.stepZoom)(j.current,t)}),(0,e.jsx)(c.HeatLegend,{title:"Gaze density",lowLabel:"rarely",highLabel:"most-viewed",note:"markers"===p?"Each marker is a look-direction (camera forward). Blue line = forward, ring = horizon. Color & size scale with how often that direction was viewed.":"Continuous equirectangular heat field: the same gaze bins splatted into a smooth thermal texture wrapped on the dome. The in-scene SDK overlay (showGazeSkydome) renders this inward so you can stand inside it in WebXR."})]}):(0,e.jsx)("div",{className:"pointer-events-none absolute inset-0 grid place-items-center text-sm text-fg-muted",children:"loading"===k?"Rendering…":"empty"===k?"No camera samples in range.":"error"===k?v??"Dome unavailable.":null})]})})}],47273)},98568,t=>{t.n(t.i(47273))},66022,t=>{t.v(e=>Promise.all(["static/chunks/0ys9-ozuluawt.js","static/chunks/2ycvtdd68gub7.js","static/chunks/0v82oqyoy9zol.js","static/chunks/18u58lorfahxi.js","static/chunks/1nj82er7msdto.js","static/chunks/0ufbyo1x3qkmo.js","static/chunks/1yehxf-fmeicg.js"].map(e=>t.l(e))).then(()=>e(94080)))},48505,t=>{t.v(e=>Promise.all(["static/chunks/3v5ha25nxo43j.js","static/chunks/3v3-7fio3nw_t.js","static/chunks/0v82oqyoy9zol.js","static/chunks/3t06schbtqonl.js","static/chunks/1nj82er7msdto.js","static/chunks/3nz-dh9d7cehk.js","static/chunks/2-sjjedfr0kfq.js","static/chunks/18u58lorfahxi.js","static/chunks/2u6shh3oeycm-.js"].map(e=>t.l(e))).then(()=>e(73073)))},53976,t=>{t.v(e=>Promise.all(["static/chunks/3v3-7fio3nw_t.js","static/chunks/10r_824wzt8hj.js","static/chunks/2aor7m-wbis85.js","static/chunks/2-sjjedfr0kfq.js","static/chunks/0v82oqyoy9zol.js","static/chunks/25b9x-li-tvk2.js","static/chunks/2aelw3far6rii.js","static/chunks/0aznt7717miff.js","static/chunks/1_aahautsz2v_.js","static/chunks/1nj82er7msdto.js","static/chunks/3t06schbtqonl.js","static/chunks/18u58lorfahxi.js"].map(e=>t.l(e))).then(()=>e(18662)))},42436,t=>{t.v(e=>Promise.all(["static/chunks/37vzwr3ciejf1.js","static/chunks/157d9euci08yu.js","static/chunks/2-sjjedfr0kfq.js","static/chunks/18u58lorfahxi.js","static/chunks/0v82oqyoy9zol.js"].map(e=>t.l(e))).then(()=>e(12847)))},89370,t=>{t.v(e=>Promise.all(["static/chunks/0dm32-jq30tg8.js","static/chunks/18u58lorfahxi.js","static/chunks/0v82oqyoy9zol.js"].map(e=>t.l(e))).then(()=>e(62566)))},67141,t=>{t.v(e=>Promise.all(["static/chunks/3v3-7fio3nw_t.js","static/chunks/0v82oqyoy9zol.js","static/chunks/3mqy-84_ul3t2.js","static/chunks/1_aahautsz2v_.js","static/chunks/3t06schbtqonl.js","static/chunks/1thjncpj7u6pq.js","static/chunks/10r_824wzt8hj.js","static/chunks/1vdjn0pkoyypn.js","static/chunks/1nj82er7msdto.js","static/chunks/0aznt7717miff.js","static/chunks/2-sjjedfr0kfq.js","static/chunks/18u58lorfahxi.js","static/chunks/2aelw3far6rii.js","static/chunks/3nz-dh9d7cehk.js"].map(e=>t.l(e))).then(()=>e(97998)))},20693,t=>{t.v(e=>Promise.all(["static/chunks/1-61zh4waha61.js","static/chunks/3v3-7fio3nw_t.js","static/chunks/1zx2q-r32thv1.js","static/chunks/2-sjjedfr0kfq.js","static/chunks/0v82oqyoy9zol.js","static/chunks/3nz-dh9d7cehk.js","static/chunks/2u6shh3oeycm-.js","static/chunks/18u58lorfahxi.js","static/chunks/1_aahautsz2v_.js","static/chunks/1nj82er7msdto.js","static/chunks/3t06schbtqonl.js"].map(e=>t.l(e))).then(()=>e(32550)))},8850,t=>{t.v(e=>Promise.all(["static/chunks/068j6934u8j16.js","static/chunks/3v3-7fio3nw_t.js","static/chunks/2-sjjedfr0kfq.js","static/chunks/3t06schbtqonl.js","static/chunks/10r_824wzt8hj.js","static/chunks/18u58lorfahxi.js","static/chunks/1_aahautsz2v_.js","static/chunks/1nj82er7msdto.js","static/chunks/2aelw3far6rii.js","static/chunks/0aznt7717miff.js","static/chunks/0v82oqyoy9zol.js"].map(e=>t.l(e))).then(()=>e(35131)))},63836,t=>{t.v(e=>Promise.all(["static/chunks/2fh-_9b6tqhvb.js","static/chunks/0wwcfw8i3j_zx.js","static/chunks/0v82oqyoy9zol.js","static/chunks/1nj82er7msdto.js","static/chunks/310uz81hnnzsu.js","static/chunks/18u58lorfahxi.js","static/chunks/163fa70v4mgxj.js"].map(e=>t.l(e))).then(()=>e(14960)))},9607,t=>{t.v(e=>Promise.all(["static/chunks/2szdcpl41-kzv.js","static/chunks/3v3-7fio3nw_t.js","static/chunks/2-sjjedfr0kfq.js","static/chunks/3t06schbtqonl.js","static/chunks/10r_824wzt8hj.js","static/chunks/0aznt7717miff.js","static/chunks/1_aahautsz2v_.js","static/chunks/1nj82er7msdto.js","static/chunks/2aelw3far6rii.js","static/chunks/18u58lorfahxi.js","static/chunks/0v82oqyoy9zol.js"].map(e=>t.l(e))).then(()=>e(26831)))},96664,t=>{t.v(e=>Promise.all(["static/chunks/1o1d0p-v1z8ty.js","static/chunks/3v3-7fio3nw_t.js","static/chunks/0v82oqyoy9zol.js","static/chunks/3t06schbtqonl.js","static/chunks/3pufs8g4ui943.js","static/chunks/1nj82er7msdto.js","static/chunks/2-sjjedfr0kfq.js","static/chunks/18u58lorfahxi.js","static/chunks/2u6shh3oeycm-.js","static/chunks/3nz-dh9d7cehk.js"].map(e=>t.l(e))).then(()=>e(44981)))}]);
|