1(window.webpackJsonp=window.webpackJsonp||[]).push([[133],{125:function(e,t,r){"use strict";r.d(t,"a",function(){return C}),r.d(t,"b",function(){return x});var n=r(4),o=r(20),h=(r(12),r(3)),l=r(148),d=r(8),c=r(72),f=r(178);function _(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function m(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?_(Object(r),!0).forEach(function(t){Object(o.a)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var v={positions:[1,1,-1,1,-1,-1,1,-1],indices:[0,1,2,0,2,3]};class C{constructor(e){var t,r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:v;this._fullscreenViewport=new l.a(0,0,1,1);var o=null!==(t=n.positions)&&void 0!==t?t:v.positions,d=null!==(r=n.indices)&&void 0!==r?r:v.indices;this.engine=e,this._vertexBuffers={[h.c.PositionKind]:new h.c(e,o,h.
1c.PositionKind,!1,!1,2)},this._indexBuffer=e.createIndexBuffer(d),this._indexBufferLength=d.length,this._onContextRestoredObserver=e.onContextRestoredObservable.add(()=>{for(var t in this._indexBuffer=e.createIndexBuffer(d),this._vertexBuffers){this._vertexBuffers[t]._rebuild()}})}setViewport(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._fullscreenViewport;this.engine.setViewport(e)}bindBuffers(e){this.engine.bindBuffers(this._vertexBuffers,this._indexBuffer,e)}applyEffectWrapper(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.engine.setState(!0),this.engine.depthCullingState.depthTest=t,this.engine.stencilState.stencilTest=r,this.engine.enableEffect(e.drawWrapper),this.bindBuffers(e.effect),e.onApplyObservable.notifyObservers({})}saveStates(){this._savedStateDepthTest=this.engine.depthCullingState.depthTest,this._savedStateStencilTest=this.engine.stencilState.stencilTest}restoreStates(){this.engine.depthCullingState.depthTest=this._savedStateDepthTest,this.engine.stencilState.stencilTest=this._savedStateStencilTest}draw(){this.engine.drawElementsType(0,0,this._indexBufferLength)}_isRenderTargetTexture(e){return void 0!==e.renderTarget}render(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(e.effect.isReady()){this.saveStates(),this.setViewport();var r=null===t?null:this._isRenderTargetTexture(t)?t.renderTarget:t;
1r&&this.engine.bindFramebuffer(r),this.applyEffectWrapper(e),this.draw(),r&&this.engine.unBindFramebuffer(r),this.restoreStates()}}dispose(){var e=this._vertexBuffers[h.c.PositionKind];e&&(e.dispose(),delete this._vertexBuffers[h.c.PositionKind]),this._indexBuffer&&this.engine._releaseBuffer(this._indexBuffer),this._onContextRestoredObserver&&(this.engine.onContextRestoredObservable.remove(this._onContextRestoredObserver),this._onContextRestoredObserver=null)}}class x{static RegisterShaderCodeProcessing(e,t){t?x._CustomShaderCodeProcessing[null!=e?e:""]=t:delete x._CustomShaderCodeProcessing[null!=e?e:""]}static _GetShaderCodeProcessing(e){var t;return null!==(t=x._CustomShaderCodeProcessing[e])&&void 0!==t?t:x._CustomShaderCodeProcessing[""]}get name(){return this.options.name}set name(e){this.options.name=e}isReady(){var e,t;return null!==(e=null===(t=this._drawWrapper.effect)||void 0===t?void 0:t.isReady())&&void 0!==e&&e}get drawWrapper(){return this._drawWrapper}get effect(){return this._drawWrapper.effect}set effect(e){this._drawWrapper.effect=e}constructor(e){var t,r;this.alphaMode=0,this.onEffectCreatedObservable=new d.a(void 0,!0),this.onApplyObservable=new d.a,this._shadersLoaded=!1,this._webGPUReady=!1,this._importPromises=[],this.options=m(m({},e),{},{name:e.name||"effectWrapper",engine:e.engine,uniforms:e.uniforms||e.uniformNames||[],uniformNames:void 0,samplers:e.samplers||e.samplerNames||[],samplerNames:void 0,attributeNames:e.attributeNames||["position"],uniformBuffers:e.uniformBuffers||[],defines:e.defines||"",useShaderStore:e.useShaderStore||!1,vertexUrl:e.vertexUrl||e.vertexShader||"postprocess",vertexShader:void 0,fragmentShader:e.fragmentShader||"pass",indexParameters:e.indexParameters,blockCompilation:e.blockCompilation||!1,shaderLanguage:e.shaderLanguage||0,onCompiled:e.onCompiled||void 0,extraInitializations:e.extraInitializations||void 0,extraInitializationsAsync:e.extraInitializationsAsync||void 0,useAsPostProcess:null!==(t=e.useAsPostProcess)&&void 0!==t&&t,allowEmptySourceTexture:null!==(r=e.allowEmptySourceTexture)&&void 0!==r&&r}),this.options.uniformNames=this.options.uniforms,this.options.samplerNames=this.options.samplers,this.options.vertexShader=this.options.vertexUrl,this.options.useAsPostProcess&&(this.options.allowEmptySourceTexture||-1!==this.options.samplers.indexOf("textureSampler")||this.options.samplers.push("textureSampler"),-1===this.options.uniforms.indexOf("scale")&&this.options.uniforms.push("scale")),e.vertexUrl||e.vertexShader?this._shaderPath={vertexSource:this.options.vertexShader}:(this.options.useAsPostProcess||(this.options.uniforms.push("scale"),this.onApplyObservable.add(()=>{this.effect.setFloat2("scale",1,1)})),this._shaderPath={vertex:this.options.vertexShader}),this._shaderPath.fragmentSource=this.options.fragmentShader,this._shaderPath.spectorName=this.options.name,this.options.useShaderStore&&(this._shaderPath.fragment=this._shaderPath.fragmentSource,this._shaderPath.vertex||(this._shaderPath.vertex=this._shaderPath.vertexSource),delete this._shaderPath.fragmentSource,delete this._shaderPath.vertexSource),this.onApplyObservable.add(()=>{this.bind()}),this.options.useShaderStore||(this._onContextRestoredObserver=this.options.engine.onContextRestoredObservable.add(()=>{this.effect._pipelineContext=null,this.effect._prepareEffect()})),this._drawWrapper=new f.a(this.options.engine),this._webGPUReady=1===this.options.shaderLanguage;var n=Array.isArray(this.options.defines)?this.options.defines.join("\n"):this.options.defines;this._postConstructor(this.options.blockCompilation,n,this.options.extraInitializations)}_gatherImports(){}_postConstructor(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2?arguments[2]:void 0,o=arguments.length>3?arguments[3]:void 0;this._importPromises.length=0,o&&this._importPromises.push(...o);var h=this.options.engine.isWebGPU&&!x.ForceGLSL;this._gatherImports(h,this._importPromises),this.options.useShaderStore&&"postprocess"===this._shaderPath.vertex&&this._importPromises.push(h&&this._webGPUReady?r.e(49).then(r.bind(null,703)):r.e(44).then(r.bind(null,704))),void 0!==n&&n(h,this._importPromises),h&&this._webGPUReady&&(this.options.shaderLanguage=1),e||this.updateEffect(t)}updateEffect(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,h=arguments.length>3?arguments[3]:void 0,l=arguments.length>4?arguments[4]:void 0,d=arguments.length>5?arguments[5]:void 0,f=arguments.length>6?arguments[6]:void 0,_=arguments.length>7?arguments[7]:void 0,m=x._GetShaderCodeProcessing(this.name);if(null!=m&&m.defineCustomBindings){var v,C,S,y,O=null!==(v=null===(C=r)||void 0===C?void 0:C.slice())&&void 0!==v?v:[];O.push(...this.options.uniforms);var P=null!==(S=null===(y=o)||void 0===y?void 0:y.slice())&&void 0!==S?S:[];P.push(...this.options.samplers),t=m.defineCustomBindings(this.name,t,O,P),r=O,o=P}this.options.defines=t||"";var E,R=this._shadersLoaded||0===this._importPromises.length?void 0:Object(n.a)(function*(){yield Promise.all(e._importPromises),e._shadersLoaded=!0});E=this.options.extraInitializationsAsync?function(){var t=Object(n.a)(function*(){yield null==R?void 0:R(),yield e.options.extraInitializationsAsync()});return function(){return t.apply(this,arguments)}}():R,this.options.useShaderStore?this._drawWrapper.effect=this.options.engine.createEffe
1ct({vertex:null!=f?f:this._shaderPath.vertex,fragment:null!=_?_:this._shaderPath.fragment},{attributes:this.options.attributeNames,uniformsNames:r||this.options.uniforms,uniformBuffersNames:this.options.uniformBuffers,samplers:o||this.options.samplers,defines:null!==t?t:"",fallbacks:null,onCompiled:null!=l?l:this.options.onCompiled,onError:null!=d?d:null,indexParameters:h||this.options.indexParameters,processCodeAfterIncludes:null!=m&&m.processCodeAfterIncludes?(e,code)=>m.processCodeAfterIncludes(this.name,e,code):null,processFinalCode:null!=m&&m.processFinalCode?(e,code)=>m.processFinalCode(this.name,e,code):null,shaderLanguage:this.options.shaderLanguage,extraInitializationsAsync:E},this.options.engine):this._drawWrapper.effect=new c.a(this._shaderPath,this.options.attributeNames,r||this.options.uniforms,o||this.options.samplerNames,this.options.engine,t,void 0,l||this.options.onCompiled,void 0,void 0,void 0,this.options.shaderLanguage,E),this.onEffectCreatedObservable.notifyObservers(this._drawWrapper.effect)}bind(){var e,t,r=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.options.useAsPostProcess&&!r&&(this.options.engine.setAlphaMode(this.alphaMode),this.drawWrapper.effect.setFloat2("scale",1,1)),null===(e=x._GetShaderCodeProcessing(this.name))||void 0===e||null===(t=e.bindCustomBindings)||void 0===t||t.call(e,this.name,this._drawWrapper.effect)}dispose(){this._onContextRestoredObserver&&(this.effect.getEngine().onContextRestoredObservable.remove(this._onContextRestoredObserver),this._onContextRestoredObserver=null),this.onEffectCreatedObservable.clear(),this._drawWrapper.dispose(!0)}}x.ForceGLSL=!1,x._CustomShaderCodeProcessing={}},132:function(e,t,r){"use strict";r.d(t,"a",function(){return n});r(34),r(49),r(12);class n{constructor(){this._defines={},this._currentRank=32,this._maxRank=-1,this._mesh=null}unBindMesh(){this._mesh=null}addFallback(e,t){this._defines[e]||(e<this._currentRank&&(this._currentRank=e),e>this._maxRank&&(this._maxRank=e),this._defines[e]=new Array),this._defines[e].push(t)}addCPUSkinningFallback(e,t){this._mesh=t,e<this._currentRank&&(this._currentRank=e),e>this._maxRank&&(this._maxRank=e)}get hasMoreFallbacks(){return this._currentRank<=this._maxRank}reduce(e,t){if(this._mesh&&this._mesh.computeBonesUsingShaders&&this._mesh.numBoneInfluencers>0){this._mesh.computeBonesUsingShaders=!1,e=e.replace("#define NUM_BONE_INFLUENCERS "+this._mesh.numBoneInfluencers,"#define NUM_BONE_INFLUENCERS 0"),t._bonesComputationForcedToCPU=!0;for(var r=this._mesh.getScene(),n=0;n<r.meshes.length;n++){var o=r.meshes[n];if(o.material){if(o.computeBonesUsingShaders&&0!==o.numBoneInfluencers)if(o.material.getEffect()===t)o.computeBonesUsingShaders=!1;else if(o.subMeshes)for(var h of o.subMeshes){if(h.effect===t){o.computeBonesUsingShaders=!1;break}}}else!this._mesh.material&&o.computeBonesUsingShaders&&o.numBoneInfluencers>0&&(o.computeBonesUsingShaders=!1)}}else{var l=this._defines[this._currentRank];if(l)for(var d=0;d<l.length;d++)e=e.replace("#define "+l[d],"");this._currentRank++}return e}}},238:function(e,t,r){"use strict";r.d(t,"c",function(){return f}),r.d(t,"d",function(){return _}),r.d(t,"a",function(){return m}),r.d(t,"b",function(){return C});var n=r(43),o=r(87),h=r(99),l=r(7),d=r(174),c=r(98);function f(e,t){return Object(o.k)(t).cachedPipelines[e]}function _(e){var t=e._name,r=e.context;if(t&&r){var n=Object(o.k)(r),h=n.cachedPipelines[t];null==h||h.dispose(),delete n.cachedPipelines[t]}}function m(e,t,r,o,h,l,c){var f,_,m=Object(n.d)()?null==l?void 0:l.getHostDocument():null;f="string"==typeof t?t:"string"==typeof t.vertexSource?"source:"+t.vertexSource:"string"==typeof t.vertexElement?(null==m?void 0:m.getElementById(t.vertexElement))||t.vertexElement:t.vertex||t,_="string"==typeof t?t:"string"==typeof t.fragmentSource?"source:"+t.fragmentSource:"string"==typeof t.fragmentElement?(null==m?void 0:m.getElementById(t.fragmentElement))||t.fragmentElement:t.fragment||t;var C=[void 0,void 0],x=()=>{if(C[0]&&C[1]){var n=C[0],f=C[1];Object(d.b)(e),Object(d.c)(n,e,(n,_)=>{c&&(c._vertexSourceCodeBeforeMigration=_),r&&(n=r("vertex",n)),e.isFragment=!0,Object(d.c)(f,e,(l,f)=>{c&&(c._fragmentSourceCodeBeforeMigration=f),r&&(l=r("fragment",l));var _=Object(d.a)(n,l,e);e=null;var m=function(e,t,r,n){return r?{vertexSourceCode:(1===n?"//":"")+"#define SHADER_NAME vertex:"+(r.vertexElement||r.vertex||r.spectorName||r)+"\n"+e,fragmentSourceCode:(1===n?"//":"")+"#define SHADER_NAME fragment:"+(r.fragmentElement||r.fragment||r.spectorName||r)+"\n"+t}:{vertexSourceCode:e,fragmentSourceCode:t}}(_.vertexCode,_.fragmentCode,t,h);null==o||o(m.vertexSourceCode,m.fragmentSourceCode)},l)},l)}};v(f,"Vertex","",e=>{c&&(c._rawVertexSourceCode=e),C[0]=e,x()},h),v(_,"Fragment","Pixel",e=>{c&&(c._rawFragmentSourceCode=e),C[1]=e,x()},h)}function v(e,t,r,o,l,d){if("undefined"!=typeof HTMLElement&&e instanceof HTMLElement)return void o(Object(n.a)(e));if("source:"!==e.substring(0,7))if("base64:"!==e.substring(0,7)){var f=h.a.GetShadersStore(l);if(f[e+t+"Shader"])o(f[e+t+"Shader"]);else if(r&&f[e+r+"Shader"])o(f[e+r+"Shader"]);else{var _;if(_="."===e[0]||"/"===e[0]||e.indexOf("http")>-1?e:h.a.GetShadersRepository(l)+e,!(d=d||c.d))throw new Error("loadFileInjection is not defined");d(_+"."+t.toLowerCase()+".fx",o)}}else{o(window.atob(e.substring(7)))}else o(e.substring(7))}var C=(e,t,r,n)=>{try{var h=e.context?Object(o.k)(e.context):null;h&&(h.disableParallelShaderCompile=e.disableParallelCompilation);var d=e.existingPipelineContext||t(e.shaderProcessingContext);return d._name=e.name,e.name&&h&&(h.cachedPipelines[e.name]=d),r(d,e.vertex,e.fragment,!!e.createAsRaw,"","",e.rebuildRebind,e.defines,e.transformFeedbackVaryings,"",()=>{n(d,()=>{var t;null===(t=e.onRenderingStateCompiled)||void 0===t||t.call(e,d)})}),d}catch(e){throw l.a.Error("Error compiling effect"),e}}},241:function(e,t,r){"use strict";r.d(t,"a",function(){return _}),r.d(t,"c",function(){return A}),r.d(t,"b",function(){return w});r(111);var n=r(72),o=r(1),h=r(121),l=r(117),d=new o.a,c=new o.a,f=new o.a,_={getSce
1ne:()=>{},eyeAtCamera:!0};function m(e,t,r){for(var n=r.asArray(),o=t.asArray(),i=0;i<16;i++)n[i]=o[i];return n[12]-=e.x,n[13]-=e.y,n[14]-=e.z,r.markAsUpdated(),r}function v(e,t,r){return Object(h.c)(t,c),m(e,c,f),Object(h.c)(f,r),r}function C(e,view,t){if(!_.eyeAtCamera)return v(e,view,t);for(var r=t.asArray(),n=view.asArray(),i=0;i<16;i++)r[i]=n[i];return r[12]=0,r[13]=0,r[14]=0,t.markAsUpdated(),t}function x(e,view,t,r){return Object(h.f)(C(e,view,r),t,r),r}function S(e,t,view,r){return Object(h.c)(view,c),Object(h.f)(t,c,f),m(e,f,c),C(e,view,f),Object(h.f)(c,f,r),r}function y(e,t,r,view,n,o){return Object(h.c)(r,c),Object(h.f)(t,c,f),m(e,f,c),x(e,view,n,f),Object(h.f)(c,f,o),o}function O(e,t){var r=_.getScene();if(!r||d===t)return t;d.updateFlag=t.updateFlag;var n=r.floatingOriginOffset;switch(e){case"world":return m(n,t,d);case"view":return C(n,t,d);case"worldView":return S(n,t,r.getViewMatrix(),d);case"viewProjection":return x(n,r.getViewMatrix(),r.getProjectionMatrix(),d);case"worldViewProjection":return y(n,t,r.getTransformMatrix(),r.getViewMatrix(),r.getProjectionMatrix(),d);default:if(e.startsWith("u_")){var o=e.toLowerCase();if(o.startsWith("u_worldviewprojection"))return y(n,t,r.getTransformMatrix(),r.getViewMatrix(),r.getProjectionMatrix(),d);if(o.startsWith("u_viewprojection"))return x(n,r.getViewMatrix(),r.getProjectionMatrix(),d);if(o.startsWith("u_worldview"))return S(n,t,r.getViewMatrix(),d);if(o.startsWith("u_world"))return m(n,t,d);if(o.startsWith("u_view"))return C(n,t,d)}return t}}var P=l.a,E=n.a,R=P.prototype._updateMatrixForUniform,B=n.a.prototype.setMatr
1ix;function A(){n.a.prototype.setMatrix=B,E._setMatrixOverride=void 0,P.prototype._updateMatrixForUniform=R,P.prototype._updateMatrixForUniformOverride=void 0}function w(){E.prototype._setMatrixOverride=B,E.prototype.setMatrix=function(e,t){return this._setMatrixOverride(e,O(e,t)),this},P.prototype._updateMatrixForUniformOverride=R,P.prototype._updateMatrixForUniform=function(e,t){this._updateMatrixForUniformOverride(e,O(e,t))}}},72:function(e,t,r){"use strict";r.d(t,"a",function(){return _});var n=r(39),o=r(4),h=(r(186),r(152),r(34),r(70),r(176),r(49),r(12),r(8)),l=r(7),d=r(99),c=r(238),f=r(53);class _{static get ShadersRepository(){return d.a.ShadersRepository}static set ShadersRepository(e){d.a.ShadersRepository=e}get isDisposed(){return this._isDisposed}get onBindObservable(){return this._onBindObservable||(this._onBindObservable=new h.a),this._onBindObservable}get shaderLanguage(){return this._shaderLanguage}constructor(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,o=arguments.length>4?arguments[4]:void 0,l=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,d=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,f=arguments.length>7&&void 0!==arguments[7]?arguments[7]:null,m=arguments.length>8&&void 0!==arguments[8]?arguments[8]:null,v=arguments.length>9?arguments[9]:void 0,C=arguments.length>10&&void 0!==arguments[10]?arguments[10]:"",x=arguments.length>11&&void 0!==arguments[11]?arguments[11]:0,S=arguments.length>12?arguments[12]:void 0;this.defines="",this.onCompiled=null,this.onError=null,this.onBind=null,this.uniqueId=0,this.onCompileObservable=new h.a,this.onErrorObservable=new h.a,this._onBindObservable=null,this._isDisposed=!1,this._refCount=1,this._bonesComputationForcedToCPU=!1,this._uniformBuffersNames={},this._multiTarget=!1,this._samplers={},this._isReady=!1,this._compilationError="",this._allFallbacksProcessed=!1,this._uniforms={},this._key="",this._fallbacks=null,this._vertexSourceCodeOverride="",this._fragmentSourceCodeOverride="",this._transformFeedbackVaryings=null,this._disableParallelShaderCompilation=!1,this._pipelineContext=null,this._vertexSourceCode="",this._fragmentSourceCode="",this._vertexSourceCodeBeforeMigration="",this._fragmentSourceCodeBeforeMigration="",this._rawVertexSourceCode="",this._rawFragmentSourceCode="",this._processCodeAfterIncludes=void 0,this._processFinalCode=null,this._onReleaseEffectsObserver=null,this.name=e,this._key=C;var y,O=this._key.replace(/\r/g,"").replace(/\n/g,"|"),P=void 0;if(t.attributes){var E,R,B,A=t;if(this._engine=r,this._attributesNames=A.attributes,this._uniformsNames=A.uniformsNames.concat(A.samplers),this._samplerList=A.samplers.slice(),this.defines=A.defines,this.onError=A.onError,this.onCompiled=A.onCompiled,this._fallbacks=A.fallbacks,this._indexParameters=A.indexParameters,this._transformFeedbackVaryings=A.transformFeedbackVaryings||null,this._multiTarget=!!A.multiTarget,this._shaderLanguage=null!==(E=A.shaderLanguage)&&void 0!==E?E:0,this._disableParallelShaderCompilation=!!A.disableParallelShaderCompilation,A.uniformBuffersNames){this._uniformBuffersNamesList=A.uniformBuffersNames.slice();for(var i=0;i<A.uniformBuffersNames.length;i++)this._uniformBuffersNames[A.uniformBuffersNames[i]]=i}this._processFinalCode=null!==(R=A.processFinalCode)&&void 0!==R?R:null,this._processCodeAfterIncludes=null!==(B=A.processCodeAfterIncludes)&&void 0!==B?B:void 0,S=A.extraInitializationsAsync,P=A.existingPipelineContext}else this._engine=o,this.defines=null==l?"":l,this._uniformsNames=r.concat(n),this._samplerList=n?n.slice():[],this._attributesNames=t,this._uniformBuffersNamesList=[],this._shaderLanguage=x,this.onError=m,this.onCompiled=f,this._indexParameters=v,this._fallbacks=d;"WEBGL2"===this._engine.shaderPlatformName&&(P=null!==(y=Object(c.c)(O,this._engine._gl))&&void 0!==y?y:P);this._attributeLocationByName={},this.uniqueId=_._UniqueIdSeed++,P?(this._pipelineContext=P,this._pipelineContext.setEngine(this._engine),this._onRenderingStateCompiled(this._pipelineContext),this._pipelineContext.program&&(this._pipelineContext.program.__SPECTOR_rebuildProgram=this._rebuildProgram.bind(this))):this._processShaderCodeAsync(null,!1,null,S).catch(e=>{var t,r=null!==(t=null==e?void 0:e.message)&&void 0!==t?t:String(e),n=new Error('Effect async shader preparation failed for "'.concat(String(this.name),'": ').concat(r));e&&"string"==typeof e.stack&&(n.stack="".concat(n.message,"\nCaused by: ").concat(e.stack)),this._processCompilationErrors(n)}),this._onReleaseEffectsObserver=this._engine.onReleaseEffectsObservable.addOnce(()=>{this._onReleaseEffectsObserver=null,this.isDisposed||this.dispose(!0)})}_processShaderCodeAsync(){var e=arguments,t=this;return Object(o.a)(function*(){var r=e.length>0&&void 0!==e[0]?e[0]:null,n=e.length>1&&void 0!==e[1]&&e[1],o=e.length>2&&void 0!==e[2]?e[2]:null,h=e.length>3?e[3]:void 0;h&&(yield h()),t._processingContext=o||t._engine._getShaderProcessingContext(t._shaderLanguage,!1);var l={defines:t.defines.split("\n"),indexParameters:t._indexParameters,isFragment:!1,shouldUseHighPrecisionShader:t._engine._shouldUseHighPrecisionShader,processor:null!=r?r:t._engine._getShaderProcessor(t._shaderLanguage),supportsUniformBuffers:t._engine.supportsUniformBuffers,shadersRepository:d.a.GetShadersRepository(t._shaderLanguage),includesShadersStore:d.a.GetIncludesShadersStore(t._shaderLanguage),version:(100*t._engine.version).toString(),platformName:t._engine.shaderPlatformName,processingContext:t._processingContext,isNDCHalfZRange:t._engine.isNDCHalfZRange,useReverseDepthBuffer:t._engine.useReverseDepthBuffer,processCodeAfterIncludes:t._processCodeAfterIncludes};Object(c.a)(l,t.name,t._processFinalCode,(e,r)=>
1{t._vertexSourceCode=e,t._fragmentSourceCode=r,t._prepareEffect(n)},t._shaderLanguage,t._engine,t)})()}get key(){return this._key}isReady(){try{return this._isReadyInternal()}catch(e){return!1}}_isReadyInternal(){return!!this._engine.isDisposed||(!!this._isReady||!!this._pipelineContext&&this._pipelineContext.isReady)}getEngine(){return this._engine}getPipelineContext(){return this._pipelineContext}getAttributesNames(){return this._attributesNames}getAttributeLocation(e){return this._attributes[e]}getAttributeLocationByName(e){return this._attributeLocationByName[e]}getAttributesCount(){return this._attributes.length}getUniformIndex(e){return this._uniformsNames.indexOf(e)}getUniform(e){return this._uniforms[e]}getSamplers(){return this._samplerList}getUniformNames(){return this._uniformsNames}getUniformBuffersNames(){return this._uniformBuffersNamesList}getIndexParameters(){return this._indexParameters}getCompilationError(){return this._compilationError}allFallbacksProcessed(){return this._allFallbacksProcessed}whenCompiledAsync(){var e=this;return Object(o.a)(function*(){return yield new Promise(t=>{e.executeWhenCompiled(t)})})()}executeWhenCompiled(e){this.isReady()?e(this):(this.onCompileObservable.add(t=>{e(t)}),this._pipelineContext&&!this._pipelineContext.isAsync||this._checkIsReady(null))}_checkIsReady(e){Object(f.b)(()=>this._isReadyInternal()||this._isDisposed,()=>{},t=>{this._processCompilationErrors(t,e)},16,12e4,!0," - Effect: ".concat("string"==typeof this.name?this.name:this.key))}get vertexSourceCode(){var e,t;return this._vertexSourceCodeOverride&&this._fragmentSourceCodeOverride?this._vertexSourceCodeOverride:null!==(e=null===(t=this._pipelineContext)||void 0===t?void 0:t._getVertexShaderCode())&&void 0!==e?e:this._vertexSourceCode}get fragmentSourceCode(){var e,t;return this._vertexSourceCodeOverride&&this._fragmentSourceCodeOverride?this._fragmentSourceCodeOverride:null!==(e=null===(t=this._pipelineContext)||void 0===t?void 0:t._getFragmentShaderCode())&&void 0!==e?e:this._fragmentSourceCode}get vertexSourceCodeBeforeMigration(){return this._vertexSourceCodeBeforeMigration}get fragmentSourceCodeBeforeMigration(){return this._fragmentSourceCodeBeforeMigration}get rawVertexSourceCode(){return this._rawVertexSourceCode}get rawFragmentSourceCode(){return this._rawFragmentSourceCode}getPipelineGenerationOptions(){return{platformName:this._engine.shaderPlatformName,shaderLanguage:this._shaderLanguage,shaderNameOrContent:this.name,key:this._key,defines:this.defines.split("\n"),addGlobalDefines:!1,extendedProcessingOptions:{indexParameters:this._indexParameters,isNDCHalfZRange:this._engine.isNDCHalfZRange,useReverseDepthBuffer:this._engine.useReverseDepthBuffer,supportsUniformBuffers:this._engine.supportsUniformBuffers},extendedCreatePipelineOptions:{transformFeedbackVaryings:this._transformFeedbackVaryings,createAsRaw:!(!this._vertexSourceCodeOverride||!this._fragmentSourceCodeOverride)}}}_rebuildProgram(e,t,r,n){this._isReady=!1,this._vertexSourceCodeOverride=e,this._fragmentSourceCodeOverride=t,this.onError=(e,t)=>{n&&n(t)},this.onCompiled=()=>{var e,t,n=this.getEngine().scenes;if(n)for(var i=0;i<n.length;i++)n[i].markAllMaterialsAsDirty(127);null===(e=(t=this._pipelineContext)._handlesSpectorRebuildCallback)||void 0===e||e.call(t,r)},this._fallbacks=null,this._prepareEffect()}_onRenderingStateCompiled(e){if(this._pipelineContext=e,this._pipelineContext.setEngine(this._engine),this._attributes=[],this._pipelineContext._fillEffectInformation(this,this._uniformBuffersNames,this._uniformsNames,this._uniforms,this._samplerList,this._samplers,this._attributesNames,this._attributes),this._attributesNames)for(var i=0;i<this._attributesNames.length;i++){var t=this._attributesNames[i];this._attributeLocationByName[t]=this._attributes[i]}this._engine.bindSamplers(this),this._compilationError="",this._isReady=!0,this.onCompiled&&this.onCompiled(this),this.onCompileObservable.notifyObservers(this),this.onCompileObservable.clear(),this._fallbacks&&this._fallbacks.unBindMesh(),_.AutomaticallyClearCodeCache&&this.clearCodeCache()}
1_prepareEffect(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this._pipelineContext;this._isReady=!1;try{var r=!(!this._vertexSourceCodeOverride||!this._fragmentSourceCodeOverride),n=r?null:this.defines,o=r?this._vertexSourceCodeOverride:this._vertexSourceCode,h=r?this._fragmentSourceCodeOverride:this._fragmentSourceCode,l=this._engine;this._pipelineContext=Object(c.b)({existingPipelineContext:e?t:null,vertex:o,fragment:h,context:"WEBGL2"===l.shaderPlatformName||"WEBGL1"===l.shaderPlatformName?l._gl:void 0,rebuildRebind:(e,t,r,n)=>this._rebuildProgram(e,t,r,n),defines:n,transformFeedbackVaryings:this._transformFeedbackVaryings,name:this._key.replace(/\r/g,"").replace(/\n/g,"|"),createAsRaw:r,disableParallelCompilation:this._disableParallelShaderCompilation,shaderProcessingContext:this._processingContext,onRenderingStateCompiled:r=>{t&&!e&&this._engine._deletePipelineContext(t),r&&this._onRenderingStateCompiled(r)}},this._engine.createPipelineContext.bind(this._engine),this._engine._preparePipelineContextAsync.bind(this._engine),this._engine._executeWhenRenderingStateIsCompiled.bind(this._engine)),this._pipelineContext.isAsync&&this._checkIsReady(t)}catch(e){this._processCompilationErrors(e,t)}}_getShaderCodeAndErrorLine(code,e,t){var r=t?/FRAGMENT SHADER ERROR: 0:(\d+?):/:/VERTEX SHADER ERROR: 0:(\d+?):/,n=null;if(e&&code){var o=e.match(r);if(o&&2===o.length){var h=parseInt(o[1]),l=code.split("\n",-1);l.length>=h&&(n="Offending line [".concat(h,"] in ").concat(t?"fragment":"vertex"," code: ").concat(l[h-1]))}}return[code,n]}_processCompilationErrors(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this._compilationError="string"==typeof(null==e?void 0:e.stack)?e.stack:null!==(t=null==e?void 0:e.message)&&void 0!==t?t:String(e);var o=this._attributesNames,h=this._fallbacks;if(l.a.Error("Unable to compile effect:"),l.a.Error("Uniforms: ".concat(this._uniformsNames.join(" "))),l.a.Error("Attributes: ".concat(o.join(" "))),l.a.Error("Defines:\n"+this.defines),_.LogShaderCodeOnCompilationError){var d,c,code,f=null,m=null;if(null!==(d=this._pipelineContext)&&void 0!==d&&d._getVertexShaderCode()){var v=this._getShaderCodeAndErrorLine(this._pipelineContext._getVertexShaderCode(),this._compilationError,!1),C=Object(n.a)(v,2);code=C[0],f=C[1],code&&(l.a.Error("Vertex code:"),l.a.Error(code))}if(null!==(c=this._pipelineContext)&&void 0!==c&&c._getFragmentShaderCode()){var x,S=this._getShaderCodeAndErrorLine(null===(x=this._pipelineContext)||void 0===x?void 0:x._getFragmentShaderCode(),this._compilationError,!0),y=Object(n.a)(S,2);code=y[0],m=y[1],code&&(l.a.Error("Fragment code:"),l.a.Error(code))}f&&l.a.Error(f),m&&l.a.Error(m)}l.a.Error("Error: "+this._compilationError);var O=()=>{this.onError&&this.onError(this,this._compilationError),this.onErrorObservable.notifyObservers(this),this._engine.onEffectErrorObservable.notifyObservers({effect:this,errors:this._compilationError})};r&&(this._pipelineContext=r,this._isReady=!0,O()),h?(this._pipelineContext=null,h.hasMoreFallbacks?(this._allFallbacksProcessed=!1,l.a.Error("Trying next fallback."),this.defines=h.reduce(this.defines,this),this._prepareEffect()):(this._allFallbacksProcessed=!0,O(),this.onErrorObservable.clear(),this._fallbacks&&this._fallbacks.unBindMesh())):(this._allFallbacksProcessed=!0,r||O())}get isSupported(){return""===this._compilationError}_bindTexture(e,t){this._engine._bindTexture(this._samplers[e],t,e)}setTexture(e,t){this._engine.setTexture(this._samplers[e],this._uniforms[e],t,e)}setTextureArray(e,t){var r=e+"Ex";if(-1===this._samplerList.indexOf(r+"0")){for(var n=this._samplerList.indexOf(e),o=1;o<t.length;o++){var h=r+(o-1).toString();this._samplerList.splice(n+o,0,h)}var l=0;for(var d of this._samplerList)this._samplers[d]=l,l+=1}this._engine.setTextureArray(this._samplers[e],this._uniforms[e],t,e)}bindUniformBuffer(e,t){var r=this._uniformBuffersNames[t];void 0===r||_._BaseCache[r]===e&&this._engine._features.useUBOBindingCache||(_._BaseCache[r]=e,this._engine.bindUniformBufferBase(e,r,t))}
1bindUniformBlock(e,t){this._engine.bindUniformBlock(this._pipelineContext,e,t)}setInt(e,t){return this._pipelineContext.setInt(e,t),this}setInt2(e,t,r){return this._pipelineContext.setInt2(e,t,r),this}setInt3(e,t,r,n){return this._pipelineContext.setInt3(e,t,r,n),this}setInt4(e,t,r,n,o){return this._pipelineContext.setInt4(e,t,r,n,o),this}setIntArray(e,t){return this._pipelineContext.setIntArray(e,t),this}setIntArray2(e,t){return this._pipelineContext.setIntArray2(e,t),this}setIntArray3(e,t){return this._pipelineContext.setIntArray3(e,t),this}setIntArray4(e,t){return this._pipelineContext.setIntArray4(e,t),this}setUInt(e,t){return this._pipelineContext.setUInt(e,t),this}setUInt2(e,t,r){return this._pipelineContext.setUInt2(e,t,r),this}setUInt3(e,t,r,n){return this._pipelineContext.setUInt3(e,t,r,n),this}setUInt4(e,t,r,n,o){return this._pipelineContext.setUInt4(e,t,r,n,o),this}setUIntArray(e,t){return this._pipelineContext.setUIntArray(e,t),this}setUIntArray2(e,t){return this._pipelineContext.setUIntArray2(e,t),this}setUIntArray3(e,t){return this._pipelineContext.setUIntArray3(e,t),this}setUIntArray4(e,t){return this._pipelineContext.setUIntArray4(e,t),this}setFloatArray(e,t){return this._pipelineContext.setArray(e,t),this}setFloatArray2(e,t){return this._pipelineContext.setArray2(e,t),this}setFloatArray3(e,t){return this._pipelineContext.setArray3(e,t),this}setFloatArray4(e,t){return this._pipelineContext.setArray4(e,t),this}setArray(e,t){return this._pipelineContext.setArray(e,t),this}setArray2(e,t){return this._pipelineContext.setArray2(e,t),this}setArray3(e,t){return this._pipelineContext.setArray3(e,t),this}setArray4(e,t){return this._pipelineContext.setArray4(e,t),this}setMatrices(e,t){return this._pipelineContext.setMatrices(e,t),this}setMatrix(e,t){return this._pipelineContext.setMatrix(e,t),this}setMatrix3x3(e,t){return this._pipelineContext.setMatrix3x3(e,t),this}setMatrix2x2(e,t){return this._pipelineContext.setMatrix2x2(e,t),this}setFloat(e,t){return this._pipelineContext.setFloat(e,t),this}setBool(e,t){return this._pipelineContext.setInt(e,t?1:0),this}setVector2(e,t){return this._pipelineContext.setVector2(e,t),this}setFloat2(e,t,r){return this._pipelineContext.setFloat2(e,t,r),this}setVector3(e,t){return this._pipelineContext.setVector3(e,t),this}setFloat3(e,t,r,n){return this._pipelineContext.setFloat3(e,t,r,n),this}setVector4(e,t){return this._pipelineContext.setVector4(e,t),this}setQuaternion(e,t){return this._pipelineContext.setQuaternion(e,t),this}setFloat4(e,t,r,n,o){return this._pipelineContext.setFloat4(e,t,r,n,o),this}setColor3(e,t){return this._pipelineContext.setColor3(e,t),this}setColor4(e,t,r){return this._pipelineContext.setColor4(e,t,r),this}setDirectColor4(e,t){return this._pipelineContext.setDirectColor4(e,t),this}clearCodeCache(){this._vertexSourceCode="",this._fragmentSourceCode="",this._fragmentSourceCodeBeforeMigration="",this._vertexSourceCodeBeforeMigration=""}dispose(){if(arguments.length>0&&void 0!==arguments[0]&&arguments[0])this._refCount=0;else{if(_.PersistentMode)return;this._refCount--}this._refCount>0||this._isDisposed||(this._onReleaseEffectsObserver&&(this._engine.onReleaseEffectsObservable.remove(this._onReleaseEffectsObserver),this._onReleaseEffectsObserver=null),this._pipelineContext&&Object(c.d)(this._pipelineContext),this._engine._releaseEffect(this),this.clearCodeCache(),this._isDisposed=!0)}static RegisterShader(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;t&&(d.a.GetShadersStore(n)["".concat(e,"PixelShader")]=t),r&&(d.a.GetShadersStore(n)["".concat(e,"VertexShader")]=r)}static ResetCache(){_._BaseCache={}}}_.LogShaderCodeOnCompilationError=!0,_.PersistentMode=!1,_.AutomaticallyClearCodeCache=!1,_._UniqueIdSeed=0,_._BaseCache={},_.ShadersStore=d.a.ShadersStore,_.IncludesShadersStore=d.a.IncludesShadersStore}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.