3e2a5497827796a05b4a068be395d2c4538b263b3e18228f4a2a63127dd4b65e.json 31 KB

1
  1. {"ast":null,"code":"import { WebGLPipelineContext } from \"./WebGL/webGLPipelineContext.js\";\nimport { _ConcatenateShader } from \"./abstractEngine.functions.js\";\n/**\n * @internal\n */\nconst _stateObject = new WeakMap();\n/**\n * This will be used in cases where the engine doesn't have a context (like the nullengine)\n */\nconst singleStateObject = {\n _webGLVersion: 2,\n cachedPipelines: {}\n};\n/**\n * get or create a state object for the given context\n * Note - Used in WebGL only at the moment.\n * @param context The context to get the state object from\n * @returns the state object\n * @internal\n */\nexport function getStateObject(context) {\n let state = _stateObject.get(context);\n if (!state) {\n if (!context) {\n return singleStateObject;\n }\n state = {\n // use feature detection. instanceof returns false. This only exists on WebGL2 context\n _webGLVersion: context.TEXTURE_BINDING_3D ? 2 : 1,\n _context: context,\n // when using the function without an engine we need to set it to enable parallel compilation\n parallelShaderCompile: context.getExtension(\"KHR_parallel_shader_compile\") || undefined,\n cachedPipelines: {}\n };\n _stateObject.set(context, state);\n }\n return state;\n}\n/**\n * Remove the state object that belongs to the specific context\n * @param context the context that is being\n */\nexport function deleteStateObject(context) {\n _stateObject.delete(context);\n}\n/**\n * Directly creates a webGL program\n * @param pipelineContext defines the pipeline context to attach to\n * @param vertexCode defines the vertex shader code to use\n * @param fragmentCode defines the fragment shader code to use\n * @param context defines the webGL context to use (if not set, the current one will be used)\n * @param transformFeedbackVaryings defines the list of transform feedback varyings to use\n * @param _createShaderProgramInjection defines an optional injection to use to create the shader program\n * @returns the new webGL program\n */\nexport function createRawShaderProgram(pipelineContext, vertexCode, fragmentCode, context, transformFeedbackVaryings, _createShaderProgramInjection) {\n const stateObject = getStateObject(context);\n if (!_createShaderProgramInjection) {\n var _stateObject$_createS;\n _createShaderProgramInjection = (_stateObject$_createS = stateObject._createShaderProgramInjection) !== null && _stateObject$_createS !== void 0 ? _stateObject$_createS : _createShaderProgram;\n }\n const vertexShader = _compileRawShader(vertexCode, \"vertex\", context, stateObject._contextWasLost);\n const fragmentShader = _compileRawShader(fragmentCode, \"fragment\", context, stateObject._contextWasLost);\n return _createShaderProgramInjection(pipelineContext, vertexShader, fragmentShader, context, transformFeedbackVaryings, stateObject.validateShaderPrograms);\n}\n/**\n * Creates a webGL program\n * @param pipelineContext defines the pipeline context to attach to\n * @param vertexCode defines the vertex shader code to use\n * @param fragmentCode defines the fragment shader code to use\n * @param defines defines the string containing the defines to use to compile the shaders\n * @param context defines the webGL context to use (if not set, the current one will be used)\n * @param transformFeedbackVaryings defines the list of transform feedback varyings to use\n * @param _createShaderProgramInjection defines an optional injection to use to create the shader program\n * @returns the new webGL program\n */\nexport function createShaderProgram(pipelineContext, vertexCode, fragmentCode, defines, context, transformFeedbackVaryings = null, _createShaderProgramInjection) {\n const stateObject = getStateObject(context);\n if (!_createShaderProgramInjection) {\n var _stateObject$_createS2;\n _createShaderProgramInjection = (_stateObject$_createS2 = stateObject._createShaderProgramInjection) !== null && _stateObject$_createS2 !== void 0 ? _stateObject$_createS2 : _createShaderProgram;\n }\n const shaderVersion = stateObject._webGLVersion > 1 ? \"#version 300 es\\n#define WEBGL2 \\n\" : \"\";\n const vertexShader = _compileShader(vertexCode, \"vertex\", defines, shaderVersion, context, stateObject._contextWasLost);\n const fragmentShader = _compileShader(fragmentCode, \"fragment\", defines, shaderVersion, context, stateObject._contextWasLost);\n return _createShaderProgramInjection(pipelineContext, vertexShader, fragmentShader, context, transformFeedbackVaryings, stateObject.validateShaderPrograms);\n}\n/**\n * Creates a new pipeline context. Note, make sure to attach an engine instance to the created context\n * @param context defines the webGL context to use (if not set, the current one will be used)\n * @param _shaderProcessingContext defines the shader processing context used during the processing if available\n * @returns the new pipeline\n */\nexport function createPipelineContext(context, _shaderProcessingContext) {\n const pipelineContext = new WebGLPipelineContext();\n const stateObject = getStateObject(context);\n if (stateObject.parallelShaderCompile) {\n pipelineContext.isParallelCompiled = true;\n }\n pipelineContext.context = stateObject._context;\n return pipelineContext;\n}\n/**\n * @internal\n */\nexport function _createShaderProgram(pipelineContext, vertexShader, fragmentShader, context, _transformFeedbackVaryings = null, validateShaderPrograms) {\n const shaderProgram = context.createProgram();\n pipelineContext.program = shaderProgram;\n if (!shaderProgram) {\n throw new Error(\"Unable to create program\");\n }\n context.attachShader(shaderProgram, vertexShader);\n context.attachShader(shaderProgram, fragmentShader);\n context.linkProgram(shaderProgram);\n pipelineContext.context = context;\n pipelineContext.vertexShader = vertexShader;\n pipelineContext.fragmentShader = fragmentShader;\n if (!pipelineContext.isParallelCompiled) {\n _finalizePipelineContext(pipelineContext, context, validateShaderPrograms);\n }\n return shaderProgram;\n}\n/**\n * @internal\n */\nexport function _isRenderingStateCompiled(pipelineContext, gl, validateShaderPrograms) {\n const webGLPipelineContext = pipelineContext;\n if (webGLPipelineContext._isDisposed) {\n return false;\n }\n const stateObject = getStateObject(gl);\n if (gl.getProgramParameter(webGLPipelineContext.program, stateObject.parallelShaderCompile.COMPLETION_STATUS_KHR)) {\n _finalizePipelineContext(webGLPipelineContext, gl, validateShaderPrograms);\n return true;\n }\n return false;\n}\n/**\n * @internal\n */\nexport function _finalizePipelineContext(pipelineContext, gl, validateShaderPrograms) {\n const context = pipelineContext.context;\n const vertexShader = pipelineContext.vertexShader;\n const fragmentShader = pipelineContext.fragmentShader;\n const program = pipelineContext.program;\n const linked = context.getProgramParameter(program, context.LINK_STATUS);\n if (!linked) {\n // Get more info\n // Vertex\n if (!gl.getShaderParameter(vertexShader, gl.COMPILE_STATUS)) {\n const log = gl.getShaderInfoLog(vertexShader);\n if (log) {\n pipelineContext.vertexCompilationError = log;\n throw new Error(\"VERTEX SHADER \" + log);\n }\n }\n // Fragment\n if (!gl.getShaderParameter(fragmentShader, gl.COMPILE_STATUS)) {\n const log = gl.getShaderInfoLog(fragmentShader);\n if (log) {\n pipelineContext.fragmentCompilationError = log;\n throw new Error(\"FRAGMENT SHADER \" + log);\n }\n }\n const error = context.getProgramInfoLog(program);\n if (error) {\n pipelineContext.programLinkError = error;\n throw new Error(error);\n }\n }\n if ( /*this.*/validateShaderPrograms) {\n context.validateProgram(program);\n const validated = context.getProgramParameter(program, context.VALIDATE_STATUS);\n if (!validated) {\n const error = context.getProgramInfoLog(program);\n if (error) {\n pipelineContext.programValidationError = error;\n throw new Error(error);\n }\n }\n }\n context.deleteShader(vertexShader);\n context.deleteShader(fragmentShader);\n pipelineContext.vertexShader = undefined;\n pipelineContext.fragmentShader = undefined;\n if (pipelineContext.onCompiled) {\n pipelineContext.onCompiled();\n pipelineContext.onCompiled = undefined;\n }\n}\n/**\n * @internal\n */\nexport function _preparePipelineContext(pipelineContext, vertexSourceCode, fragmentSourceCode, createAsRaw, _rawVertexSourceCode, _rawFragmentSourceCode, rebuildRebind, defines, transformFeedbackVaryings, _key = \"\", onReady, createRawShaderProgramInjection, createShaderProgramInjection) {\n const stateObject = getStateObject(pipelineContext.context);\n if (!createRawShaderProgramInjection) {\n var _stateObject$createRa;\n createRawShaderProgramInjection = (_stateObject$createRa = stateObject.createRawShaderProgramInjection) !== null && _stateObject$createRa !== void 0 ? _stateObject$createRa : createRawShaderProgram;\n }\n if (!createShaderProgramInjection) {\n var _stateObject$createSh;\n createShaderProgramInjection = (_stateObject$createSh = stateObject.createShaderProgramInjection) !== null && _stateObject$createSh !== void 0 ? _stateObject$createSh : createShaderProgram;\n }\n const webGLRenderingState = pipelineContext;\n if (createAsRaw) {\n webGLRenderingState.program = createRawShaderProgramInjection(webGLRenderingState, vertexSourceCode, fragmentSourceCode, webGLRenderingState.context, transformFeedbackVaryings);\n } else {\n webGLRenderingState.program = createShaderProgramInjection(webGLRenderingState, vertexSourceCode, fragmentSourceCode, defines, webGLRenderingState.context, transformFeedbackVaryings);\n }\n webGLRenderingState.program.__SPECTOR_rebuildProgram = rebuildRebind;\n onReady();\n}\nfunction _compileShader(source, type, defines, shaderVersion, gl, _contextWasLost) {\n return _compileRawShader(_ConcatenateShader(source, defines, shaderVersion), type, gl, _contextWasLost);\n}\nfunction _compileRawShader(source, type, gl, _contextWasLost) {\n const shader = gl.createShader(type === \"vertex\" ? gl.VERTEX_SHADER : gl.FRAGMENT_SHADER);\n if (!shader) {\n let error = gl.NO_ERROR;\n let tempError = gl.NO_ERROR;\n while ((tempError = gl.getError()) !== gl.NO_ERROR) {\n error = tempError;\n }\n throw new Error(`Something went wrong while creating a gl ${type} shader object. gl error=${error}, gl isContextLost=${gl.isContextLost()}, _contextWasLost=${_contextWasLost}`);\n }\n gl.shaderSource(shader, source);\n gl.compileShader(shader);\n return shader;\n}\n/**\n * @internal\n */\nexport function _setProgram(program, gl) {\n gl.useProgram(program);\n}\n/**\n * @internal\n */\nexport function _executeWhenRenderingStateIsCompiled(pipelineContext, action) {\n const webGLPipelineContext = pipelineContext;\n if (!webGLPipelineContext.isParallelCompiled) {\n action(pipelineContext);\n return;\n }\n const oldHandler = webGLPipelineContext.onCompiled;\n webGLPipelineContext.onCompiled = () => {\n oldHandler === null || oldHandler === void 0 || oldHandler();\n action(pipelineContext);\n };\n}","map":{"version":3,"names":["WebGLPipelineContext","_ConcatenateShader","_stateObject","WeakMap","singleStateObject","_webGLVersion","cachedPipelines","getStateObject","context","state","get","TEXTURE_BINDING_3D","_context","parallelShaderCompile","getExtension","undefined","set","deleteStateObject","delete","createRawShaderProgram","pipelineContext","vertexCode","fragmentCode","transformFeedbackVaryings","_createShaderProgramInjection","stateObject","_stateObject$_createS","_createShaderProgram","vertexShader","_compileRawShader","_contextWasLost","fragmentShader","validateShaderPrograms","createShaderProgram","defines","_stateObject$_createS2","shaderVersion","_compileShader","createPipelineContext","_shaderProcessingContext","isParallelCompiled","_transformFeedbackVaryings","shaderProgram","createProgram","program","Error","attachShader","linkProgram","_finalizePipelineContext","_isRenderingStateCompiled","gl","webGLPipelineContext","_isDisposed","getProgramParameter","COMPLETION_STATUS_KHR","linked","LINK_STATUS","getShaderParameter","COMPILE_STATUS","log","getShaderInfoLog","vertexCompilationError","fragmentCompilationError","error","getProgramInfoLog","programLinkError","validateProgram","validated","VALIDATE_STATUS","programValidationError","deleteShader","onCompiled","_preparePipelineContext","vertexSourceCode","fragmentSourceCode","createAsRaw","_rawVertexSourceCode","_rawFragmentSourceCode","rebuildRebind","_key","onReady","createRawShaderProgramInjection","createShaderProgramInjection","_stateObject$createRa","_stateObject$createSh","webGLRenderingState","__SPECTOR_rebuildProgram","source","type","shader","createShader","VERTEX_SHADER","FRAGMENT_SHADER","NO_ERROR","tempError","getError","isContextLost","shaderSource","compileShader","_setProgram","useProgram","_executeWhenRenderingStateIsCompiled","action","oldHandler"],"sources":["F:/workspace/202226701027/huinongbao-app/node_modules/@babylonjs/core/Engines/thinEngine.functions.js"],"sourcesContent":["import { WebGLPipelineContext } from \"./WebGL/webGLPipelineContext.js\";\nimport { _ConcatenateShader } from \"./abstractEngine.functions.js\";\n/**\n * @internal\n */\nconst _stateObject = new WeakMap();\n/**\n * This will be used in cases where the engine doesn't have a context (like the nullengine)\n */\nconst singleStateObject = {\n _webGLVersion: 2,\n cachedPipelines: {},\n};\n/**\n * get or create a state object for the given context\n * Note - Used in WebGL only at the moment.\n * @param context The context to get the state object from\n * @returns the state object\n * @internal\n */\nexport function getStateObject(context) {\n let state = _stateObject.get(context);\n if (!state) {\n if (!context) {\n return singleStateObject;\n }\n state = {\n // use feature detection. instanceof returns false. This only exists on WebGL2 context\n _webGLVersion: context.TEXTURE_BINDING_3D ? 2 : 1,\n _context: context,\n // when using the function without an engine we need to set it to enable parallel compilation\n parallelShaderCompile: context.getExtension(\"KHR_parallel_shader_compile\") || undefined,\n cachedPipelines: {},\n };\n _stateObject.set(context, state);\n }\n return state;\n}\n/**\n * Remove the state object that belongs to the specific context\n * @param context the context that is being\n */\nexport function deleteStateObject(context) {\n _stateObject.delete(context);\n}\n/**\n * Directly creates a webGL program\n * @param pipelineContext defines the pipeline context to attach to\n * @param vertexCode defines the vertex shader code to use\n * @param fragmentCode defines the fragment shader code to use\n * @param context defines the webGL context to use (if not set, the current one will be used)\n * @param transformFeedbackVaryings defines the list of transform feedback varyings to use\n * @param _createShaderProgramInjection defines an optional injection to use to create the shader program\n * @returns the new webGL program\n */\nexport function createRawShaderProgram(pipelineContext, vertexCode, fragmentCode, context, transformFeedbackVaryings, _createShaderProgramInjection) {\n const stateObject = getStateObject(context);\n if (!_createShaderProgramInjection) {\n _createShaderProgramInjection = stateObject._createShaderProgramInjection ?? _createShaderProgram;\n }\n const vertexShader = _compileRawShader(vertexCode, \"vertex\", context, stateObject._contextWasLost);\n const fragmentShader = _compileRawShader(fragmentCode, \"fragment\", context, stateObject._contextWasLost);\n return _createShaderProgramInjection(pipelineContext, vertexShader, fragmentShader, context, transformFeedbackVaryings, stateObject.validateShaderPrograms);\n}\n/**\n * Creates a webGL program\n * @param pipelineContext defines the pipeline context to attach to\n * @param vertexCode defines the vertex shader code to use\n * @param fragmentCode defines the fragment shader code to use\n * @param defines defines the string containing the defines to use to compile the shaders\n * @param context defines the webGL context to use (if not set, the current one will be used)\n * @param transformFeedbackVaryings defines the list of transform feedback varyings to use\n * @param _createShaderProgramInjection defines an optional injection to use to create the shader program\n * @returns the new webGL program\n */\nexport function createShaderProgram(pipelineContext, vertexCode, fragmentCode, defines, context, transformFeedbackVaryings = null, _createShaderProgramInjection) {\n const stateObject = getStateObject(context);\n if (!_createShaderProgramInjection) {\n _createShaderProgramInjection = stateObject._createShaderProgramInjection ?? _createShaderProgram;\n }\n const shaderVersion = stateObject._webGLVersion > 1 ? \"#version 300 es\\n#define WEBGL2 \\n\" : \"\";\n const vertexShader = _compileShader(vertexCode, \"vertex\", defines, shaderVersion, context, stateObject._contextWasLost);\n const fragmentShader = _compileShader(fragmentCode, \"fragment\", defines, shaderVersion, context, stateObject._contextWasLost);\n return _createShaderProgramInjection(pipelineContext, vertexShader, fragmentShader, context, transformFeedbackVaryings, stateObject.validateShaderPrograms);\n}\n/**\n * Creates a new pipeline context. Note, make sure to attach an engine instance to the created context\n * @param context defines the webGL context to use (if not set, the current one will be used)\n * @param _shaderProcessingContext defines the shader processing context used during the processing if available\n * @returns the new pipeline\n */\nexport function createPipelineContext(context, _shaderProcessingContext) {\n const pipelineContext = new WebGLPipelineContext();\n const stateObject = getStateObject(context);\n if (stateObject.parallelShaderCompile) {\n pipelineContext.isParallelCompiled = true;\n }\n pipelineContext.context = stateObject._context;\n return pipelineContext;\n}\n/**\n * @internal\n */\nexport function _createShaderProgram(pipelineContext, vertexShader, fragmentShader, context, _transformFeedbackVaryings = null, validateShaderPrograms) {\n const shaderProgram = context.createProgram();\n pipelineContext.program = shaderProgram;\n if (!shaderProgram) {\n throw new Error(\"Unable to create program\");\n }\n context.attachShader(shaderProgram, vertexShader);\n context.attachShader(shaderProgram, fragmentShader);\n context.linkProgram(shaderProgram);\n pipelineContext.context = context;\n pipelineContext.vertexShader = vertexShader;\n pipelineContext.fragmentShader = fragmentShader;\n if (!pipelineContext.isParallelCompiled) {\n _finalizePipelineContext(pipelineContext, context, validateShaderPrograms);\n }\n return shaderProgram;\n}\n/**\n * @internal\n */\nexport function _isRenderingStateCompiled(pipelineContext, gl, validateShaderPrograms) {\n const webGLPipelineContext = pipelineContext;\n if (webGLPipelineContext._isDisposed) {\n return false;\n }\n const stateObject = getStateObject(gl);\n if (gl.getProgramParameter(webGLPipelineContext.program, stateObject.parallelShaderCompile.COMPLETION_STATUS_KHR)) {\n _finalizePipelineContext(webGLPipelineContext, gl, validateShaderPrograms);\n return true;\n }\n return false;\n}\n/**\n * @internal\n */\nexport function _finalizePipelineContext(pipelineContext, gl, validateShaderPrograms) {\n const context = pipelineContext.context;\n const vertexShader = pipelineContext.vertexShader;\n const fragmentShader = pipelineContext.fragmentShader;\n const program = pipelineContext.program;\n const linked = context.getProgramParameter(program, context.LINK_STATUS);\n if (!linked) {\n // Get more info\n // Vertex\n if (!gl.getShaderParameter(vertexShader, gl.COMPILE_STATUS)) {\n const log = gl.getShaderInfoLog(vertexShader);\n if (log) {\n pipelineContext.vertexCompilationError = log;\n throw new Error(\"VERTEX SHADER \" + log);\n }\n }\n // Fragment\n if (!gl.getShaderParameter(fragmentShader, gl.COMPILE_STATUS)) {\n const log = gl.getShaderInfoLog(fragmentShader);\n if (log) {\n pipelineContext.fragmentCompilationError = log;\n throw new Error(\"FRAGMENT SHADER \" + log);\n }\n }\n const error = context.getProgramInfoLog(program);\n if (error) {\n pipelineContext.programLinkError = error;\n throw new Error(error);\n }\n }\n if ( /*this.*/validateShaderPrograms) {\n context.validateProgram(program);\n const validated = context.getProgramParameter(program, context.VALIDATE_STATUS);\n if (!validated) {\n const error = context.getProgramInfoLog(program);\n if (error) {\n pipelineContext.programValidationError = error;\n throw new Error(error);\n }\n }\n }\n context.deleteShader(vertexShader);\n context.deleteShader(fragmentShader);\n pipelineContext.vertexShader = undefined;\n pipelineContext.fragmentShader = undefined;\n if (pipelineContext.onCompiled) {\n pipelineContext.onCompiled();\n pipelineContext.onCompiled = undefined;\n }\n}\n/**\n * @internal\n */\nexport function _preparePipelineContext(pipelineContext, vertexSourceCode, fragmentSourceCode, createAsRaw, _rawVertexSourceCode, _rawFragmentSourceCode, rebuildRebind, defines, transformFeedbackVaryings, _key = \"\", onReady, createRawShaderProgramInjection, createShaderProgramInjection) {\n const stateObject = getStateObject(pipelineContext.context);\n if (!createRawShaderProgramInjection) {\n createRawShaderProgramInjection = stateObject.createRawShaderProgramInjection ?? createRawShaderProgram;\n }\n if (!createShaderProgramInjection) {\n createShaderProgramInjection = stateObject.createShaderProgramInjection ?? createShaderProgram;\n }\n const webGLRenderingState = pipelineContext;\n if (createAsRaw) {\n webGLRenderingState.program = createRawShaderProgramInjection(webGLRenderingState, vertexSourceCode, fragmentSourceCode, webGLRenderingState.context, transformFeedbackVaryings);\n }\n else {\n webGLRenderingState.program = createShaderProgramInjection(webGLRenderingState, vertexSourceCode, fragmentSourceCode, defines, webGLRenderingState.context, transformFeedbackVaryings);\n }\n webGLRenderingState.program.__SPECTOR_rebuildProgram = rebuildRebind;\n onReady();\n}\nfunction _compileShader(source, type, defines, shaderVersion, gl, _contextWasLost) {\n return _compileRawShader(_ConcatenateShader(source, defines, shaderVersion), type, gl, _contextWasLost);\n}\nfunction _compileRawShader(source, type, gl, _contextWasLost) {\n const shader = gl.createShader(type === \"vertex\" ? gl.VERTEX_SHADER : gl.FRAGMENT_SHADER);\n if (!shader) {\n let error = gl.NO_ERROR;\n let tempError = gl.NO_ERROR;\n while ((tempError = gl.getError()) !== gl.NO_ERROR) {\n error = tempError;\n }\n throw new Error(`Something went wrong while creating a gl ${type} shader object. gl error=${error}, gl isContextLost=${gl.isContextLost()}, _contextWasLost=${_contextWasLost}`);\n }\n gl.shaderSource(shader, source);\n gl.compileShader(shader);\n return shader;\n}\n/**\n * @internal\n */\nexport function _setProgram(program, gl) {\n gl.useProgram(program);\n}\n/**\n * @internal\n */\nexport function _executeWhenRenderingStateIsCompiled(pipelineContext, action) {\n const webGLPipelineContext = pipelineContext;\n if (!webGLPipelineContext.isParallelCompiled) {\n action(pipelineContext);\n return;\n }\n const oldHandler = webGLPipelineContext.onCompiled;\n webGLPipelineContext.onCompiled = () => {\n oldHandler?.();\n action(pipelineContext);\n };\n}\n"],"mappings":"AAAA,SAASA,oBAAoB,QAAQ,iCAAiC;AACtE,SAASC,kBAAkB,QAAQ,+BAA+B;AAClE;AACA;AACA;AACA,MAAMC,YAAY,GAAG,IAAIC,OAAO,CAAC,CAAC;AAClC;AACA;AACA;AACA,MAAMC,iBAAiB,GAAG;EACtBC,aAAa,EAAE,CAAC;EAChBC,eAAe,EAAE,CAAC;AACtB,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,cAAcA,CAACC,OAAO,EAAE;EACpC,IAAIC,KAAK,GAAGP,YAAY,CAACQ,GAAG,CAACF,OAAO,CAAC;EACrC,IAAI,CAACC,KAAK,EAAE;IACR,IAAI,CAACD,OAAO,EAAE;MACV,OAAOJ,iBAAiB;IAC5B;IACAK,KAAK,GAAG;MACJ;MACAJ,aAAa,EAAEG,OAAO,CAACG,kBAAkB,GAAG,CAAC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