2ac94d59276c5c4ff43159caf597694f9edbf02ba5265d1d213fb32dcb1fe836.json 33 KB

1
  1. {"ast":null,"code":"import { EffectRenderer } from \"../Materials/effectRenderer.js\";\nimport { CopyTextureToTexture } from \"../Misc/copyTextureToTexture.js\";\nimport { FrameGraphContext } from \"./frameGraphContext.js\";\n/**\n * Frame graph context used render passes.\n * @experimental\n */\nexport class FrameGraphRenderContext extends FrameGraphContext {\n static _IsObjectRenderer(value) {\n return value.initRender !== undefined;\n }\n /** @internal */\n constructor(_engine, _textureManager, _scene) {\n super();\n this._engine = _engine;\n this._textureManager = _textureManager;\n this._scene = _scene;\n this._debugMessageHasBeenPushed = false;\n this._renderTargetIsBound = true;\n this._effectRenderer = new EffectRenderer(this._engine);\n this._copyTexture = new CopyTextureToTexture(this._engine);\n }\n /**\n * Checks whether a texture handle points to the backbuffer's color or depth texture\n * @param handle The handle to check\n * @returns True if the handle points to the backbuffer's color or depth texture, otherwise false\n */\n isBackbuffer(handle) {\n return this._textureManager.isBackbuffer(handle);\n }\n /**\n * Checks whether a texture handle points to the backbuffer's color texture\n * @param handle The handle to check\n * @returns True if the handle points to the backbuffer's color texture, otherwise false\n */\n isBackbufferColor(handle) {\n return this._textureManager.isBackbufferColor(handle);\n }\n /**\n * Checks whether a texture handle points to the backbuffer's depth texture\n * @param handle The handle to check\n * @returns True if the handle points to the backbuffer's depth texture, otherwise false\n */\n isBackbufferDepthStencil(handle) {\n return this._textureManager.isBackbufferDepthStencil(handle);\n }\n /**\n * Creates a (frame graph) render target wrapper\n * Note that renderTargets or renderTargetDepth can be undefined, but not both at the same time!\n * @param name Name of the render target wrapper\n * @param renderTargets Render target handles (textures) to use\n * @param renderTargetDepth Render target depth handle (texture) to use\n * @returns The created render target wrapper\n */\n createRenderTarget(name, renderTargets, renderTargetDepth) {\n return this._textureManager.createRenderTarget(name, renderTargets, renderTargetDepth);\n }\n /**\n * Clears the current render buffer or the current render target (if any is set up)\n * @param color Defines the color to use\n * @param backBuffer Defines if the back buffer must be cleared\n * @param depth Defines if the depth buffer must be cleared\n * @param stencil Defines if the stencil buffer must be cleared\n */\n clear(color, backBuffer, depth, stencil) {\n this._applyRenderTarget();\n this._engine.clear(color, backBuffer, depth, stencil);\n }\n /**\n * Clears the color attachments of the current render target\n * @param color Defines the color to use\n * @param attachments The attachments to clear\n */\n clearColorAttachments(color, attachments) {\n this._applyRenderTarget();\n this._engine.bindAttachments(attachments);\n this._engine.clear(color, true, false, false);\n }\n /**\n * Binds the attachments to the current render target\n * @param attachments The attachments to bind\n */\n bindAttachments(attachments) {\n this._applyRenderTarget();\n this._engine.bindAttachments(attachments);\n }\n /**\n * Generates mipmaps for the current render target\n */\n generateMipMaps() {\n var _this$_currentRenderT;\n if (((_this$_currentRenderT = this._currentRenderTarget) === null || _this$_currentRenderT === void 0 ? void 0 : _this$_currentRenderT.renderTargetWrapper) === undefined) {\n return;\n }\n if (this._renderTargetIsBound && this._engine._currentRenderTarget) {\n // we can't generate the mipmaps if the render target is bound\n this._flushDebugMessages();\n this._engine.unBindFramebuffer(this._engine._currentRenderTarget);\n this._renderTargetIsBound = false;\n }\n const textures = this._currentRenderTarget.renderTargetWrapper.textures;\n if (textures) {\n for (const texture of textures) {\n this._engine.generateMipmaps(texture);\n }\n }\n }\n /**\n * Sets the texture sampling mode for a given texture handle\n * @param handle Handle of the texture to set the sampling mode for\n * @param samplingMode Sampling mode to set\n */\n setTextureSamplingMode(handle, samplingMode) {\n const internalTexture = this._textureManager.getTextureFromHandle(handle);\n if (internalTexture && internalTexture.samplingMode !== samplingMode) {\n this._engine.updateTextureSamplingMode(samplingMode, internalTexture);\n }\n }\n /**\n * Binds a texture handle to a given effect (resolves the handle to a texture and binds it to the effect)\n * @param effect The effect to bind the texture to\n * @param name The name of the texture in the effect\n * @param handle The handle of the texture to bind\n */\n bindTextureHandle(effect, name, handle) {\n let texture;\n const historyEntry = this._textureManager._historyTextures.get(handle);\n if (historyEntry) {\n texture = historyEntry.textures[historyEntry.index]; // texture we write to in this frame\n if (this._currentRenderTarget !== undefined && this._currentRenderTarget.renderTargetWrapper !== undefined && this._currentRenderTarget.renderTargetWrapper.textures.includes(texture)) {\n // If the current render target renders to the history write texture, we bind the read texture instead\n texture = historyEntry.textures[historyEntry.index ^ 1];\n }\n } else {\n texture = this._textureManager._textures.get(handle).texture;\n }\n effect._bindTexture(name, texture);\n }\n /**\n * Sets the depth states for the current render target\n * @param depthTest If true, depth testing is enabled\n * @param depthWrite If true, depth writing is enabled\n */\n setDepthStates(depthTest, depthWrite) {\n this._engine.setDepthBuffer(depthTest);\n this._engine.setDepthWrite(depthWrite);\n }\n /**\n * Applies a full-screen effect to the current render target\n * @param drawWrapper The draw wrapper containing the effect to apply\n * @param customBindings The custom bindings to use when applying the effect (optional)\n * @returns True if the effect was applied, otherwise false (effect not ready)\n */\n applyFullScreenEffect(drawWrapper, customBindings) {\n var _drawWrapper$effect;\n if (!((_drawWrapper$effect = drawWrapper.effect) !== null && _drawWrapper$effect !== void 0 && _drawWrapper$effect.isReady())) {\n return false;\n }\n this._applyRenderTarget();\n const engineDepthMask = this._engine.getDepthWrite(); // for some reasons, depthWrite is not restored by EffectRenderer.restoreStates\n this._effectRenderer.saveStates();\n this._effectRenderer.setViewport();\n this._engine.enableEffect(drawWrapper);\n this._engine.setState(false);\n this._engine.setDepthBuffer(false);\n this._engine.setDepthWrite(false);\n this._effectRenderer.bindBuffers(drawWrapper.effect);\n customBindings === null || customBindings === void 0 || customBindings();\n this._effectRenderer.draw();\n this._effectRenderer.restoreStates();\n this._engine.setDepthWrite(engineDepthMask);\n this._engine.setAlphaMode(0);\n return true;\n }\n /**\n * Copies a texture to the current render target\n * @param sourceTexture The source texture to copy from\n * @param forceCopyToBackbuffer If true, the copy will be done to the back buffer regardless of the current render target\n */\n copyTexture(sourceTexture, forceCopyToBackbuffer = false) {\n if (forceCopyToBackbuffer) {\n this.bindRenderTarget();\n }\n this._applyRenderTarget();\n this._copyTexture.copy(this._textureManager.getTextureFromHandle(sourceTexture));\n }\n /**\n * Renders a RenderTargetTexture or a layer\n * @param object The RenderTargetTexture/Layer to render\n * @param viewportWidth The width of the viewport (optional for Layer, but mandatory for ObjectRenderer)\n * @param viewportHeight The height of the viewport (optional for Layer, but mandatory for ObjectRenderer)\n */\n render(object, viewportWidth, viewportHeight) {\n if (FrameGraphRenderContext._IsObjectRenderer(object)) {\n if (object.shouldRender()) {\n this._scene.incrementRenderId();\n this._scene.resetCachedMaterial();\n object.prepareRenderList();\n object.initRender(viewportWidth, viewportHeight);\n this._applyRenderTarget();\n object.render();\n object.finishRender();\n }\n } else {\n this._applyRenderTarget();\n object.render();\n }\n }\n /**\n * Binds a render target texture so that upcoming draw calls will render to it\n * Note: it is a lazy operation, so the render target will only be bound when needed. This way, it is possible to call\n * this method several times with different render targets without incurring the cost of binding if no draw calls are made\n * @param renderTarget The handle of the render target texture to bind (default: undefined, meaning \"back buffer\"). Pass an array for MRT rendering.\n * @param debugMessage Optional debug message to display when the render target is bound (visible in PIX, for example)\n */\n bindRenderTarget(renderTarget, debugMessage) {\n if ((renderTarget === null || renderTarget === void 0 ? void 0 : renderTarget.renderTargetWrapper) === undefined && this._currentRenderTarget === undefined || renderTarget && this._currentRenderTarget && renderTarget.equals(this._currentRenderTarget)) {\n this._flushDebugMessages();\n if (debugMessage !== undefined) {\n var _this$_engine$_debugP, _this$_engine;\n (_this$_engine$_debugP = (_this$_engine = this._engine)._debugPushGroup) === null || _this$_engine$_debugP === void 0 || _this$_engine$_debugP.call(_this$_engine, debugMessage, 2);\n this._debugMessageWhenTargetBound = undefined;\n this._debugMessageHasBeenPushed = true;\n }\n return;\n }\n this._currentRenderTarget = (renderTarget === null || renderTarget === void 0 ? void 0 : renderTarget.renderTargetWrapper) === undefined ? undefined : renderTarget;\n this._debugMessageWhenTargetBound = debugMessage;\n this._renderTargetIsBound = false;\n }\n /** @internal */\n _flushDebugMessages() {\n if (this._debugMessageHasBeenPushed) {\n var _this$_engine$_debugP2, _this$_engine2;\n (_this$_engine$_debugP2 = (_this$_engine2 = this._engine)._debugPopGroup) === null || _this$_engine$_debugP2 === void 0 || _this$_engine$_debugP2.call(_this$_engine2, 2);\n this._debugMessageHasBeenPushed = false;\n }\n }\n _applyRenderTarget() {\n var _this$_currentRenderT2;\n if (this._renderTargetIsBound) {\n return;\n }\n this._flushDebugMessages();\n const renderTargetWrapper = (_this$_currentRenderT2 = this._currentRenderTarget) === null || _this$_currentRenderT2 === void 0 ? void 0 : _this$_currentRenderT2.renderTargetWrapper;\n if (renderTargetWrapper === undefined) {\n this._engine.restoreDefaultFramebuffer();\n } else {\n if (this._engine._currentRenderTarget) {\n this._engine.unBindFramebuffer(this._engine._currentRenderTarget);\n }\n this._engine.bindFramebuffer(renderTargetWrapper);\n }\n if (this._debugMessageWhenTargetBound !== undefined) {\n var _this$_engine$_debugP3, _this$_engine3;\n (_this$_engine$_debugP3 = (_this$_engine3 = this._engine)._debugPushGroup) === null || _this$_engine$_debugP3 === void 0 || _this$_engine$_debugP3.call(_this$_engine3, this._debugMessageWhenTargetBound, 2);\n this._debugMessageWhenTargetBound = undefined;\n this._debugMessageHasBeenPushed = true;\n }\n this._renderTargetIsBound = true;\n }\n /** @internal */\n _isReady() {\n return this._copyTexture.isReady();\n }\n /** @internal */\n _dispose() {\n this._effectRenderer.dispose();\n this._copyTexture.dispose();\n }\n}","map":{"version":3,"names":["EffectRenderer","CopyTextureToTexture","FrameGraphContext","FrameGraphRenderContext","_IsObjectRenderer","value","initRender","undefined","constructor","_engine","_textureManager","_scene","_debugMessageHasBeenPushed","_renderTargetIsBound","_effectRenderer","_copyTexture","isBackbuffer","handle","isBackbufferColor","isBackbufferDepthStencil","createRenderTarget","name","renderTargets","renderTargetDepth","clear","color","backBuffer","depth","stencil","_applyRenderTarget","clearColorAttachments","attachments","bindAttachments","generateMipMaps","_this$_currentRenderT","_currentRenderTarget","renderTargetWrapper","_flushDebugMessages","unBindFramebuffer","textures","texture","generateMipmaps","setTextureSamplingMode","samplingMode","internalTexture","getTextureFromHandle","updateTextureSamplingMode","bindTextureHandle","effect","historyEntry","_historyTextures","get","index","includes","_textures","_bindTexture","setDepthStates","depthTest","depthWrite","setDepthBuffer","setDepthWrite","applyFullScreenEffect","drawWrapper","customBindings","_drawWrapper$effect","isReady","engineDepthMask","getDepthWrite","saveStates","setViewport","enableEffect","setState","bindBuffers","draw","restoreStates","setAlphaMode","copyTexture","sourceTexture","forceCopyToBackbuffer","bindRenderTarget","copy","render","object","viewportWidth","viewportHeight","shouldRender","incrementRenderId","resetCachedMaterial","prepareRenderList","finishRender","renderTarget","debugMessage","equals","_this$_engine$_debugP","_this$_engine","_debugPushGroup","call","_debugMessageWhenTargetBound","_this$_engine$_debugP2","_this$_engine2","_debugPopGroup","_this$_currentRenderT2","restoreDefaultFramebuffer","bindFramebuffer","_this$_engine$_debugP3","_this$_engine3","_isReady","_dispose","dispose"],"sources":["F:/workspace/202226701027/huinongbao-app/node_modules/@babylonjs/core/FrameGraph/frameGraphRenderContext.js"],"sourcesContent":["\nimport { EffectRenderer } from \"../Materials/effectRenderer.js\";\nimport { CopyTextureToTexture } from \"../Misc/copyTextureToTexture.js\";\nimport { FrameGraphContext } from \"./frameGraphContext.js\";\n/**\n * Frame graph context used render passes.\n * @experimental\n */\nexport class FrameGraphRenderContext extends FrameGraphContext {\n static _IsObjectRenderer(value) {\n return value.initRender !== undefined;\n }\n /** @internal */\n constructor(_engine, _textureManager, _scene) {\n super();\n this._engine = _engine;\n this._textureManager = _textureManager;\n this._scene = _scene;\n this._debugMessageHasBeenPushed = false;\n this._renderTargetIsBound = true;\n this._effectRenderer = new EffectRenderer(this._engine);\n this._copyTexture = new CopyTextureToTexture(this._engine);\n }\n /**\n * Checks whether a texture handle points to the backbuffer's color or depth texture\n * @param handle The handle to check\n * @returns True if the handle points to the backbuffer's color or depth texture, otherwise false\n */\n isBackbuffer(handle) {\n return this._textureManager.isBackbuffer(handle);\n }\n /**\n * Checks whether a texture handle points to the backbuffer's color texture\n * @param handle The handle to check\n * @returns True if the handle points to the backbuffer's color texture, otherwise false\n */\n isBackbufferColor(handle) {\n return this._textureManager.isBackbufferColor(handle);\n }\n /**\n * Checks whether a texture handle points to the backbuffer's depth texture\n * @param handle The handle to check\n * @returns True if the handle points to the backbuffer's depth texture, otherwise false\n */\n isBackbufferDepthStencil(handle) {\n return this._textureManager.isBackbufferDepthStencil(handle);\n }\n /**\n * Creates a (frame graph) render target wrapper\n * Note that renderTargets or renderTargetDepth can be undefined, but not both at the same time!\n * @param name Name of the render target wrapper\n * @param renderTargets Render target handles (textures) to use\n * @param renderTargetDepth Render target depth handle (texture) to use\n * @returns The created render target wrapper\n */\n createRenderTarget(name, renderTargets, renderTargetDepth) {\n return this._textureManager.createRenderTarget(name, renderTargets, renderTargetDepth);\n }\n /**\n * Clears the current render buffer or the current render target (if any is set up)\n * @param color Defines the color to use\n * @param backBuffer Defines if the back buffer must be cleared\n * @param depth Defines if the depth buffer must be cleared\n * @param stencil Defines if the stencil buffer must be cleared\n */\n clear(color, backBuffer, depth, stencil) {\n this._applyRenderTarget();\n this._engine.clear(color, backBuffer, depth, stencil);\n }\n /**\n * Clears the color attachments of the current render target\n * @param color Defines the color to use\n * @param attachments The attachments to clear\n */\n clearColorAttachments(color, attachments) {\n this._applyRenderTarget();\n this._engine.bindAttachments(attachments);\n this._engine.clear(color, true, false, false);\n }\n /**\n * Binds the attachments to the current render target\n * @param attachments The attachments to bind\n */\n bindAttachments(attachments) {\n this._applyRenderTarget();\n this._engine.bindAttachments(attachments);\n }\n /**\n * Generates mipmaps for the current render target\n */\n generateMipMaps() {\n if (this._currentRenderTarget?.renderTargetWrapper === undefined) {\n return;\n }\n if (this._renderTargetIsBound && this._engine._currentRenderTarget) {\n // we can't generate the mipmaps if the render target is bound\n this._flushDebugMessages();\n this._engine.unBindFramebuffer(this._engine._currentRenderTarget);\n this._renderTargetIsBound = false;\n }\n const textures = this._currentRenderTarget.renderTargetWrapper.textures;\n if (textures) {\n for (const texture of textures) {\n this._engine.generateMipmaps(texture);\n }\n }\n }\n /**\n * Sets the texture sampling mode for a given texture handle\n * @param handle Handle of the texture to set the sampling mode for\n * @param samplingMode Sampling mode to set\n */\n setTextureSamplingMode(handle, samplingMode) {\n const internalTexture = this._textureManager.getTextureFromHandle(handle);\n if (internalTexture && internalTexture.samplingMode !== samplingMode) {\n this._engine.updateTextureSamplingMode(samplingMode, internalTexture);\n }\n }\n /**\n * Binds a texture handle to a given effect (resolves the handle to a texture and binds it to the effect)\n * @param effect The effect to bind the texture to\n * @param name The name of the texture in the effect\n * @param handle The handle of the texture to bind\n */\n bindTextureHandle(effect, name, handle) {\n let texture;\n const historyEntry = this._textureManager._historyTextures.get(handle);\n if (historyEntry) {\n texture = historyEntry.textures[historyEntry.index]; // texture we write to in this frame\n if (this._currentRenderTarget !== undefined &&\n this._currentRenderTarget.renderTargetWrapper !== undefined &&\n this._currentRenderTarget.renderTargetWrapper.textures.includes(texture)) {\n // If the current render target renders to the history write texture, we bind the read texture instead\n texture = historyEntry.textures[historyEntry.index ^ 1];\n }\n }\n else {\n texture = this._textureManager._textures.get(handle).texture;\n }\n effect._bindTexture(name, texture);\n }\n /**\n * Sets the depth states for the current render target\n * @param depthTest If true, depth testing is enabled\n * @param depthWrite If true, depth writing is enabled\n */\n setDepthStates(depthTest, depthWrite) {\n this._engine.setDepthBuffer(depthTest);\n this._engine.setDepthWrite(depthWrite);\n }\n /**\n * Applies a full-screen effect to the current render target\n * @param drawWrapper The draw wrapper containing the effect to apply\n * @param customBindings The custom bindings to use when applying the effect (optional)\n * @returns True if the effect was applied, otherwise false (effect not ready)\n */\n applyFullScreenEffect(drawWrapper, customBindings) {\n if (!drawWrapper.effect?.isReady()) {\n return false;\n }\n this._applyRenderTarget();\n const engineDepthMask = this._engine.getDepthWrite(); // for some reasons, depthWrite is not restored by EffectRenderer.restoreStates\n this._effectRenderer.saveStates();\n this._effectRenderer.setViewport();\n this._engine.enableEffect(drawWrapper);\n this._engine.setState(false);\n this._engine.setDepthBuffer(false);\n this._engine.setDepthWrite(false);\n this._effectRenderer.bindBuffers(drawWrapper.effect);\n customBindings?.();\n this._effectRenderer.draw();\n this._effectRenderer.restoreStates();\n this._engine.setDepthWrite(engineDepthMask);\n this._engine.setAlphaMode(0);\n return true;\n }\n /**\n * Copies a texture to the current render target\n * @param sourceTexture The source texture to copy from\n * @param forceCopyToBackbuffer If true, the copy will be done to the back buffer regardless of the current render target\n */\n copyTexture(sourceTexture, forceCopyToBackbuffer = false) {\n if (forceCopyToBackbuffer) {\n this.bindRenderTarget();\n }\n this._applyRenderTarget();\n this._copyTexture.copy(this._textureManager.getTextureFromHandle(sourceTexture));\n }\n /**\n * Renders a RenderTargetTexture or a layer\n * @param object The RenderTargetTexture/Layer to render\n * @param viewportWidth The width of the viewport (optional for Layer, but mandatory for ObjectRenderer)\n * @param viewportHeight The height of the viewport (optional for Layer, but mandatory for ObjectRenderer)\n */\n render(object, viewportWidth, viewportHeight) {\n if (FrameGraphRenderContext._IsObjectRenderer(object)) {\n if (object.shouldRender()) {\n this._scene.incrementRenderId();\n this._scene.resetCachedMaterial();\n object.prepareRenderList();\n object.initRender(viewportWidth, viewportHeight);\n this._applyRenderTarget();\n object.render();\n object.finishRender();\n }\n }\n else {\n this._applyRenderTarget();\n object.render();\n }\n }\n /**\n * Binds a render target texture so that upcoming draw calls will render to it\n * Note: it is a lazy operation, so the render target will only be bound when needed. This way, it is possible to call\n * this method several times with different render targets without incurring the cost of binding if no draw calls are made\n * @param renderTarget The handle of the render target texture to bind (default: undefined, meaning \"back buffer\"). Pass an array for MRT rendering.\n * @param debugMessage Optional debug message to display when the render target is bound (visible in PIX, for example)\n */\n bindRenderTarget(renderTarget, debugMessage) {\n if ((renderTarget?.renderTargetWrapper === undefined && this._currentRenderTarget === undefined) ||\n (renderTarget && this._currentRenderTarget && renderTarget.equals(this._currentRenderTarget))) {\n this._flushDebugMessages();\n if (debugMessage !== undefined) {\n this._engine._debugPushGroup?.(debugMessage, 2);\n this._debugMessageWhenTargetBound = undefined;\n this._debugMessageHasBeenPushed = true;\n }\n return;\n }\n this._currentRenderTarget = renderTarget?.renderTargetWrapper === undefined ? undefined : renderTarget;\n this._debugMessageWhenTargetBound = debugMessage;\n this._renderTargetIsBound = false;\n }\n /** @internal */\n _flushDebugMessages() {\n if (this._debugMessageHasBeenPushed) {\n this._engine._debugPopGroup?.(2);\n this._debugMessageHasBeenPushed = false;\n }\n }\n _applyRenderTarget() {\n if (this._renderTargetIsBound) {\n return;\n }\n this._flushDebugMessages();\n const renderTargetWrapper = this._currentRenderTarget?.renderTargetWrapper;\n if (renderTargetWrapper === undefined) {\n this._engine.restoreDefaultFramebuffer();\n }\n else {\n if (this._engine._currentRenderTarget) {\n this._engine.unBindFramebuffer(this._engine._currentRenderTarget);\n }\n this._engine.bindFramebuffer(renderTargetWrapper);\n }\n if (this._debugMessageWhenTargetBound !== undefined) {\n this._engine._debugPushGroup?.(this._debugMessageWhenTargetBound, 2);\n this._debugMessageWhenTargetBound = undefined;\n this._debugMessageHasBeenPushed = true;\n }\n this._renderTargetIsBound = true;\n }\n /** @internal */\n _isReady() {\n return this._copyTexture.isReady();\n }\n /** @internal */\n _dispose() {\n this._effectRenderer.dispose();\n this._copyTexture.dispose();\n }\n}\n"],"mappings":"AACA,SAASA,cAAc,QAAQ,gCAAgC;AAC/D,SAASC,oBAAoB,QAAQ,iCAAiC;AACtE,SAASC,iBAAiB,QAAQ,wBAAwB;AAC1D;AACA;AACA;AACA;AACA,OAAO,MAAMC,uBAAuB,SAASD,iBAAiB,CAAC;EAC3D,OAAOE,iBAAiBA,CAACC,KAAK,EAAE;IAC5B,OAAOA,KAAK,CAACC,UAAU,KAAKC,SAAS;EACzC;EACA;EACAC,WAAWA,CAACC,OAAO,EAAEC,eAAe,EAAEC,MAAM,EAAE;IAC1C,KAAK,CAAC,CAAC;IACP,IAAI,CAACF,OAAO,GAAGA,OAAO;IACtB,IAAI,CAACC,eAAe,GAAGA,eAAe;IACtC,IAAI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