<!-- SOLID-PLAYTIME · part 140 -->
fM(t),r.push(o);else o=r[a];return o}function i(){e=new WeakMap}return{get:n,dispose:i}}var f3=`void main() {
	gl_Position = vec4( position, 1.0 );
}`,d3=`uniform sampler2D shadow_pass;
uniform vec2 resolution;
uniform float radius;
#include <packing>
void main() {
	const float samples = float( VSM_SAMPLES );
	float mean = 0.0;
	float squared_mean = 0.0;
	float uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 );
	float uvStart = samples <= 1.0 ? 0.0 : - 1.0;
	for ( float i = 0.0; i < samples; i ++ ) {
		float uvOffset = uvStart + i * uvStride;
		#ifdef HORIZONTAL_PASS
			vec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ) );
			mean += distribution.x;
			squared_mean += distribution.y * distribution.y + distribution.x * distribution.x;
		#else
			float depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ) );
			mean += depth;
			squared_mean += depth * depth;
		#endif
	}
	mean = mean / samples;
	squared_mean = squared_mean / samples;
	float std_dev = sqrt( squared_mean - mean * mean );
	gl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );
}`;function p3(t,e,n){let i=new Bc,s=new Nt,a=new Nt,r=new Le,o=new LU({depthPacking:TE}),l=new RU,c={},u=n.maxTextureSize,f={[zo]:fi,[fi]:zo,[hn]:hn},h=new Zi({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new Nt},radius:{value:4}},vertexShader:f3,fragmentShader:d3}),p=h.clone();p.defines.HORIZONTAL_PASS=1;let v=new me;v.setAttribute("position",new tn(new Float32Array([-1,-1,0.5,3,-1,0.5,-1,3,0.5]),3));let y=new At(v,h),U=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=Cm;let d=this.type;this.render=function(A,T,w){if(U.enabled===!1)return;if(U.autoUpdate===!1&&U.needsUpdate===!1)return;if(A.length===0)return;let b=t.getRenderTarget(),M=t.getActiveCubeFace(),R=t.getActiveMipmapLevel(),O=t.state;if(O.setBlending(ba),O.buffers.depth.getReversed()===!0)O.buffers.color.setClear(0,0,0,0);else O.buffers.color.setClear(1,1,1,1);O.buffers.depth.setTest(!0),O.setScissorTest(!1);let V=d!==Yi&&this.type===Yi,k=d===Yi&&this.type!==Yi;for(let et=0,Z=A.length;et<Z;et++){let at=A[et],W=at.shadow;if(W===void 0){console.warn("THREE.WebGLShadowMap:",at,"has no shadow.");continue}if(W.autoUpdate===!1&&W.needsUpdate===!1)continue;s.copy(W.mapSize);let ht=W.getFrameExtents();if(s.multiply(ht),a.copy(W.mapSize),s.x>u||s.y>u){if(s.x>u)a.x=Math.floor(u/ht.x),s.x=a.x*ht.x,W.mapSize.x=a.x;if(s.y>u)a.y=Math.floor(u/ht.y),s.y=a.y*ht.y,W.mapSize.y=a.y}if(W.map===null||V===!0||k===!0){let q=this.type!==Yi?{minFilter:Go,magFilter:Go}:{};if(W.map!==null)W.map.dispose();W.map=new Is(s.x,s.y,q),W.map.texture.name=at.name+".shadowMap",W.camera.updateProjectionMatrix()}t.setRenderTarget(W.map),t.clear();let mt=W.getViewportCount();for(let q=0;q<mt;q++){let dt=W.getViewport(q);r.set(a.x*dt.x,a.y*dt.y,a.x*dt.z,a.y*dt.w),O.viewport(r),W.updateMatrices(at,q),i=W.getFrustum(),x(T,w,W.camera,at,this.type)}if(W.isPointLightShadow!==!0&&this.type===Yi)g(W,w);W.needsUpdate=!1}d=this.type,U.needsUpdate=!1,t.setRenderTarget(b,M,R)};function g(A,T){let w=e.update(y);if(h.defines.VSM_SAMPLES!==A.blurSamples)h.defines.VSM_SAMPLES=A.blurSamples,p.defines.VSM_SAMPLES=A.blurSamples,h.needsUpdate=!0,p.needsUpdate=!0;if(A.mapPass===null)A.mapPass=new Is(s.x,s.y);h.uniforms.shadow_pass.value=A.map.texture,h.uniforms.resolution.value=A.mapSize,h.uniforms.radius.value=A.radius,t.setRenderTarget(A.mapPass),t.clear(),t.renderBufferDirect(T,null,w,h,y,null),p.uniforms.shadow_pass.value=A.mapPass.texture,p.uniforms.resolution.value=A.mapSize,p.uniforms.radius.value=A.radius,t.setRenderTarget(A.map),t.clear(),t.renderBufferDirect(T,null,w,p,y,null)}function m(A,T,w,b){let M=null,R=w.isPointLight===!0?A.customDistanceMaterial:A.customDepthMaterial;if(R!==void 0)M=R;else if(M=w.isPointLight===!0?l:o,t.localClippingEnabled&&T.clipShadows===!0&&Array.isArray(T.clippingPlanes)&&T.clippingPlanes.length!==0||T.displacementMap&&T.displacementScale!==0||T.alphaMap&&T.alphaTest>0||T.map&&T.alphaTest>0||T.alphaToCoverage===!0){let O=M.uuid,V=T.uuid,k=c[O];if(k===void 0)k={},c[O]=k;let et=k[V];if(et===void 0)et=M.clone(),k[V]=et,T.addEventListener("dispose",S);M=et}if(M.visible=T.visible,M.wireframe=T.wireframe,b===Yi)M.side=T.shadowSide!==null?T.shadowSide:T.side;else M.side=T.shadowSide!==null?T.shadowSide:f[T.side];if(M.alphaMap=T.alphaMap,M.alphaTest=T.alphaToCoverage===!0?0.5:T.alphaTest,M.map=T.map,M.clipShadows=T.clipShadows,M.clippingPlanes=T.clippingPlanes,M.clipIntersection=T.clipIntersection,M.displacementMap=T.displacementMap,M.displacementScale=T.displacementScale,M.displacementBias=T.displacementBias,M.wireframeLinewidth=T.wireframeLinewidth,M.linewidth=T.linewidth,w.isPointLight===!0&&M.isMeshDistanceMaterial===!0){let O=t.properties.get(M);O.light=w}return M}function x(A,T,w,b,M){if(A.visi