1 |
- {"ast":null,"code":"import { __decorate } from \"../../../tslib.es6.js\";\nimport { NodeGeometryBlock } from \"../nodeGeometryBlock.js\";\nimport { RegisterClass } from \"../../../Misc/typeStore.js\";\nimport { NodeGeometryBlockConnectionPointTypes } from \"../Enums/nodeGeometryConnectionPointTypes.js\";\nimport { Vector2, Vector3, Vector4 } from \"../../../Maths/math.vector.js\";\nimport { editableInPropertyPage } from \"../../../Decorators/nodeDecorator.js\";\n/**\n * Operations supported by the Math block\n */\nexport var MathBlockOperations;\n(function (MathBlockOperations) {\n /** Add */\n MathBlockOperations[MathBlockOperations[\"Add\"] = 0] = \"Add\";\n /** Subtract */\n MathBlockOperations[MathBlockOperations[\"Subtract\"] = 1] = \"Subtract\";\n /** Multiply */\n MathBlockOperations[MathBlockOperations[\"Multiply\"] = 2] = \"Multiply\";\n /** Divide */\n MathBlockOperations[MathBlockOperations[\"Divide\"] = 3] = \"Divide\";\n /** Max */\n MathBlockOperations[MathBlockOperations[\"Max\"] = 4] = \"Max\";\n /** Min */\n MathBlockOperations[MathBlockOperations[\"Min\"] = 5] = \"Min\";\n})(MathBlockOperations || (MathBlockOperations = {}));\n/**\n * Block used to apply math functions\n */\nexport class MathBlock extends NodeGeometryBlock {\n /**\n * Create a new MathBlock\n * @param name defines the block name\n */\n constructor(name) {\n super(name);\n /**\n * Gets or sets the operation applied by the block\n */\n this.operation = MathBlockOperations.Add;\n this.registerInput(\"left\", NodeGeometryBlockConnectionPointTypes.AutoDetect);\n this.registerInput(\"right\", NodeGeometryBlockConnectionPointTypes.AutoDetect);\n this.registerOutput(\"output\", NodeGeometryBlockConnectionPointTypes.BasedOnInput);\n this.output._typeConnectionSource = this.left;\n const excludedConnectionPointTypes = [NodeGeometryBlockConnectionPointTypes.Matrix, NodeGeometryBlockConnectionPointTypes.Geometry, NodeGeometryBlockConnectionPointTypes.Texture];\n this.left.excludedConnectionPointTypes.push(...excludedConnectionPointTypes);\n this.right.excludedConnectionPointTypes.push(...excludedConnectionPointTypes);\n this._linkConnectionTypes(0, 1);\n this._connectionObservers = [this.left.onConnectionObservable.add(() => this._updateInputOutputTypes()), this.left.onDisconnectionObservable.add(() => this._updateInputOutputTypes()), this.right.onConnectionObservable.add(() => this._updateInputOutputTypes()), this.right.onDisconnectionObservable.add(() => this._updateInputOutputTypes())];\n }\n /**\n * Gets the current class name\n * @returns the class name\n */\n getClassName() {\n return \"MathBlock\";\n }\n /**\n * Gets the left input component\n */\n get left() {\n return this._inputs[0];\n }\n /**\n * Gets the right input component\n */\n get right() {\n return this._inputs[1];\n }\n /**\n * Gets the geometry output component\n */\n get output() {\n return this._outputs[0];\n }\n _buildBlock() {\n let func;\n const left = this.left;\n const right = this.right;\n if (!left.isConnected || !right.isConnected) {\n this.output._storedFunction = null;\n this.output._storedValue = null;\n return;\n }\n const leftIsScalar = left.type === NodeGeometryBlockConnectionPointTypes.Float || left.type === NodeGeometryBlockConnectionPointTypes.Int;\n const rightIsScalar = right.type === NodeGeometryBlockConnectionPointTypes.Float || right.type === NodeGeometryBlockConnectionPointTypes.Int;\n // If both input types are scalars, then this is a scalar operation.\n const isScalar = leftIsScalar && rightIsScalar;\n switch (this.operation) {\n case MathBlockOperations.Add:\n {\n if (isScalar) {\n func = state => {\n return left.getConnectedValue(state) + right.getConnectedValue(state);\n };\n } else if (leftIsScalar) {\n func = state => {\n return state.adapt(left, right.type).add(right.getConnectedValue(state));\n };\n } else {\n func = state => {\n return left.getConnectedValue(state).add(state.adapt(right, left.type));\n };\n }\n break;\n }\n case MathBlockOperations.Subtract:\n {\n if (isScalar) {\n func = state => {\n return left.getConnectedValue(state) - right.getConnectedValue(state);\n };\n } else if (leftIsScalar) {\n func = state => {\n return state.adapt(left, right.type).subtract(right.getConnectedValue(state));\n };\n } else {\n func = state => {\n return left.getConnectedValue(state).subtract(state.adapt(right, left.type));\n };\n }\n break;\n }\n case MathBlockOperations.Multiply:\n {\n if (isScalar) {\n func = state => {\n return left.getConnectedValue(state) * right.getConnectedValue(state);\n };\n } else if (leftIsScalar) {\n func = state => {\n return state.adapt(left, right.type).multiply(right.getConnectedValue(state));\n };\n } else {\n func = state => {\n return left.getConnectedValue(state).multiply(state.adapt(right, left.type));\n };\n }\n break;\n }\n case MathBlockOperations.Divide:\n {\n if (isScalar) {\n func = state => {\n return left.getConnectedValue(state) / right.getConnectedValue(state);\n };\n } else if (leftIsScalar) {\n func = state => {\n return state.adapt(left, right.type).divide(right.getConnectedValue(state));\n };\n } else {\n func = state => {\n return left.getConnectedValue(state).divide(state.adapt(right, left.type));\n };\n }\n break;\n }\n case MathBlockOperations.Min:\n {\n if (isScalar) {\n func = state => {\n return Math.min(left.getConnectedValue(state), right.getConnectedValue(state));\n };\n } else {\n const [vector, scalar] = leftIsScalar ? [right, left] : [left, right];\n switch (vector.type) {\n case NodeGeometryBlockConnectionPointTypes.Vector2:\n {\n func = state => {\n return Vector2.Minimize(vector.getConnectedValue(state), state.adapt(scalar, vector.type));\n };\n break;\n }\n case NodeGeometryBlockConnectionPointTypes.Vector3:\n {\n func = state => {\n return Vector3.Minimize(vector.getConnectedValue(state), state.adapt(scalar, vector.type));\n };\n break;\n }\n case NodeGeometryBlockConnectionPointTypes.Vector4:\n {\n func = state => {\n return Vector4.Minimize(vector.getConnectedValue(state), state.adapt(scalar, vector.type));\n };\n break;\n }\n }\n }\n break;\n }\n case MathBlockOperations.Max:\n {\n if (isScalar) {\n func = state => {\n return Math.max(left.getConnectedValue(state), right.getConnectedValue(state));\n };\n } else {\n const [vector, scalar] = leftIsScalar ? [right, left] : [left, right];\n switch (vector.type) {\n case NodeGeometryBlockConnectionPointTypes.Vector2:\n {\n func = state => {\n return Vector2.Maximize(vector.getConnectedValue(state), state.adapt(scalar, vector.type));\n };\n break;\n }\n case NodeGeometryBlockConnectionPointTypes.Vector3:\n {\n func = state => {\n return Vector3.Maximize(vector.getConnectedValue(state), state.adapt(scalar, vector.type));\n };\n break;\n }\n case NodeGeometryBlockConnectionPointTypes.Vector4:\n {\n func = state => {\n return Vector4.Maximize(vector.getConnectedValue(state), state.adapt(scalar, vector.type));\n };\n break;\n }\n }\n break;\n }\n }\n }\n this.output._storedFunction = state => {\n if (left.type === NodeGeometryBlockConnectionPointTypes.Int) {\n return func(state) | 0;\n }\n return func(state);\n };\n }\n _dumpPropertiesCode() {\n const codeString = super._dumpPropertiesCode() + `${this._codeVariableName}.operation = BABYLON.MathBlockOperations.${MathBlockOperations[this.operation]};\\n`;\n return codeString;\n }\n _updateInputOutputTypes() {\n // First update the output type with the initial assumption that we'll base it on the left input.\n this.output._typeConnectionSource = this.left;\n if (this.left.isConnected && this.right.isConnected) {\n // Both inputs are connected, so we need to determine the output type based on the input types.\n if (this.left.type === NodeGeometryBlockConnectionPointTypes.Int || this.left.type === NodeGeometryBlockConnectionPointTypes.Float && this.right.type !== NodeGeometryBlockConnectionPointTypes.Int) {\n this.output._typeConnectionSource = this.right;\n }\n } else if (this.left.isConnected !== this.right.isConnected) {\n // Only one input is connected, so we need to determine the output type based on the connected input.\n this.output._typeConnectionSource = this.left.isConnected ? this.left : this.right;\n }\n // Next update the accepted connection point types for the inputs based on the current input connection state.\n if (this.left.isConnected || this.right.isConnected) {\n for (const [first, second] of [[this.left, this.right], [this.right, this.left]]) {\n // Always allow Ints and Floats.\n first.acceptedConnectionPointTypes = [NodeGeometryBlockConnectionPointTypes.Int, NodeGeometryBlockConnectionPointTypes.Float];\n if (second.isConnected) {\n // The same types as the connected input are always allowed.\n first.acceptedConnectionPointTypes.push(second.type);\n // If the other input is a scalar, then we also allow Vector types.\n if (second.type === NodeGeometryBlockConnectionPointTypes.Int || second.type === NodeGeometryBlockConnectionPointTypes.Float) {\n first.acceptedConnectionPointTypes.push(NodeGeometryBlockConnectionPointTypes.Vector2, NodeGeometryBlockConnectionPointTypes.Vector3, NodeGeometryBlockConnectionPointTypes.Vector4);\n }\n }\n }\n }\n }\n /**\n * Release resources\n */\n dispose() {\n super.dispose();\n this._connectionObservers.forEach(observer => observer.remove());\n this._connectionObservers.length = 0;\n }\n /**\n * Serializes this block in a JSON representation\n * @returns the serialized block object\n */\n serialize() {\n const serializationObject = super.serialize();\n serializationObject.operation = this.operation;\n return serializationObject;\n }\n _deserialize(serializationObject) {\n super._deserialize(serializationObject);\n this.operation = serializationObject.operation;\n }\n}\n__decorate([editableInPropertyPage(\"Operation\", 4 /* PropertyTypeForEdition.List */, \"ADVANCED\", {\n notifiers: {\n rebuild: true\n },\n embedded: true,\n options: [{\n label: \"Add\",\n value: MathBlockOperations.Add\n }, {\n label: \"Subtract\",\n value: MathBlockOperations.Subtract\n }, {\n label: \"Multiply\",\n value: MathBlockOperations.Multiply\n }, {\n label: \"Divide\",\n value: MathBlockOperations.Divide\n }, {\n label: \"Max\",\n value: MathBlockOperations.Max\n }, {\n label: \"Min\",\n value: MathBlockOperations.Min\n }]\n})], MathBlock.prototype, \"operation\", void 0);\nRegisterClass(\"BABYLON.MathBlock\", MathBlock);","map":{"version":3,"names":["__decorate","NodeGeometryBlock","RegisterClass","NodeGeometryBlockConnectionPointTypes","Vector2","Vector3","Vector4","editableInPropertyPage","MathBlockOperations","MathBlock","constructor","name","operation","Add","registerInput","AutoDetect","registerOutput","BasedOnInput","output","_typeConnectionSource","left","excludedConnectionPointTypes","Matrix","Geometry","Texture","push","right","_linkConnectionTypes","_connectionObservers","onConnectionObservable","add","_updateInputOutputTypes","onDisconnectionObservable","getClassName","_inputs","_outputs","_buildBlock","func","isConnected","_storedFunction","_storedValue","leftIsScalar","type","Float","Int","rightIsScalar","isScalar","state","getConnectedValue","adapt","Subtract","subtract","Multiply","multiply","Divide","divide","Min","Math","min","vector","scalar","Minimize","Max","max","Maximize","_dumpPropertiesCode","codeString","_codeVariableName","first","second","acceptedConnectionPointTypes","dispose","forEach","observer","remove","length","serialize","serializationObject","_deserialize","notifiers","rebuild","embedded","options","label","value","prototype"],"sources":["F:/workspace/202226701027/huinongbao-app/node_modules/@babylonjs/core/Meshes/Node/Blocks/mathBlock.js"],"sourcesContent":["import { __decorate } from \"../../../tslib.es6.js\";\nimport { NodeGeometryBlock } from \"../nodeGeometryBlock.js\";\nimport { RegisterClass } from \"../../../Misc/typeStore.js\";\nimport { NodeGeometryBlockConnectionPointTypes } from \"../Enums/nodeGeometryConnectionPointTypes.js\";\nimport { Vector2, Vector3, Vector4 } from \"../../../Maths/math.vector.js\";\nimport { editableInPropertyPage } from \"../../../Decorators/nodeDecorator.js\";\n/**\n * Operations supported by the Math block\n */\nexport var MathBlockOperations;\n(function (MathBlockOperations) {\n /** Add */\n MathBlockOperations[MathBlockOperations[\"Add\"] = 0] = \"Add\";\n /** Subtract */\n MathBlockOperations[MathBlockOperations[\"Subtract\"] = 1] = \"Subtract\";\n /** Multiply */\n MathBlockOperations[MathBlockOperations[\"Multiply\"] = 2] = \"Multiply\";\n /** Divide */\n MathBlockOperations[MathBlockOperations[\"Divide\"] = 3] = \"Divide\";\n /** Max */\n MathBlockOperations[MathBlockOperations[\"Max\"] = 4] = \"Max\";\n /** Min */\n MathBlockOperations[MathBlockOperations[\"Min\"] = 5] = \"Min\";\n})(MathBlockOperations || (MathBlockOperations = {}));\n/**\n * Block used to apply math functions\n */\nexport class MathBlock extends NodeGeometryBlock {\n /**\n * Create a new MathBlock\n * @param name defines the block name\n */\n constructor(name) {\n super(name);\n /**\n * Gets or sets the operation applied by the block\n */\n this.operation = MathBlockOperations.Add;\n this.registerInput(\"left\", NodeGeometryBlockConnectionPointTypes.AutoDetect);\n this.registerInput(\"right\", NodeGeometryBlockConnectionPointTypes.AutoDetect);\n this.registerOutput(\"output\", NodeGeometryBlockConnectionPointTypes.BasedOnInput);\n this.output._typeConnectionSource = this.left;\n const excludedConnectionPointTypes = [\n NodeGeometryBlockConnectionPointTypes.Matrix,\n NodeGeometryBlockConnectionPointTypes.Geometry,\n NodeGeometryBlockConnectionPointTypes.Texture,\n ];\n this.left.excludedConnectionPointTypes.push(...excludedConnectionPointTypes);\n this.right.excludedConnectionPointTypes.push(...excludedConnectionPointTypes);\n this._linkConnectionTypes(0, 1);\n this._connectionObservers = [\n this.left.onConnectionObservable.add(() => this._updateInputOutputTypes()),\n this.left.onDisconnectionObservable.add(() => this._updateInputOutputTypes()),\n this.right.onConnectionObservable.add(() => this._updateInputOutputTypes()),\n this.right.onDisconnectionObservable.add(() => this._updateInputOutputTypes()),\n ];\n }\n /**\n * Gets the current class name\n * @returns the class name\n */\n getClassName() {\n return \"MathBlock\";\n }\n /**\n * Gets the left input component\n */\n get left() {\n return this._inputs[0];\n }\n /**\n * Gets the right input component\n */\n get right() {\n return this._inputs[1];\n }\n /**\n * Gets the geometry output component\n */\n get output() {\n return this._outputs[0];\n }\n _buildBlock() {\n let func;\n const left = this.left;\n const right = this.right;\n if (!left.isConnected || !right.isConnected) {\n this.output._storedFunction = null;\n this.output._storedValue = null;\n return;\n }\n const leftIsScalar = left.type === NodeGeometryBlockConnectionPointTypes.Float || left.type === NodeGeometryBlockConnectionPointTypes.Int;\n const rightIsScalar = right.type === NodeGeometryBlockConnectionPointTypes.Float || right.type === NodeGeometryBlockConnectionPointTypes.Int;\n // If both input types are scalars, then this is a scalar operation.\n const isScalar = leftIsScalar && rightIsScalar;\n switch (this.operation) {\n case MathBlockOperations.Add: {\n if (isScalar) {\n func = (state) => {\n return left.getConnectedValue(state) + right.getConnectedValue(state);\n };\n }\n else if (leftIsScalar) {\n func = (state) => {\n return state.adapt(left, right.type).add(right.getConnectedValue(state));\n };\n }\n else {\n func = (state) => {\n return left.getConnectedValue(state).add(state.adapt(right, left.type));\n };\n }\n break;\n }\n case MathBlockOperations.Subtract: {\n if (isScalar) {\n func = (state) => {\n return left.getConnectedValue(state) - right.getConnectedValue(state);\n };\n }\n else if (leftIsScalar) {\n func = (state) => {\n return state.adapt(left, right.type).subtract(right.getConnectedValue(state));\n };\n }\n else {\n func = (state) => {\n return left.getConnectedValue(state).subtract(state.adapt(right, left.type));\n };\n }\n break;\n }\n case MathBlockOperations.Multiply: {\n if (isScalar) {\n func = (state) => {\n return left.getConnectedValue(state) * right.getConnectedValue(state);\n };\n }\n else if (leftIsScalar) {\n func = (state) => {\n return state.adapt(left, right.type).multiply(right.getConnectedValue(state));\n };\n }\n else {\n func = (state) => {\n return left.getConnectedValue(state).multiply(state.adapt(right, left.type));\n };\n }\n break;\n }\n case MathBlockOperations.Divide: {\n if (isScalar) {\n func = (state) => {\n return left.getConnectedValue(state) / right.getConnectedValue(state);\n };\n }\n else if (leftIsScalar) {\n func = (state) => {\n return state.adapt(left, right.type).divide(right.getConnectedValue(state));\n };\n }\n else {\n func = (state) => {\n return left.getConnectedValue(state).divide(state.adapt(right, left.type));\n };\n }\n break;\n }\n case MathBlockOperations.Min: {\n if (isScalar) {\n func = (state) => {\n return Math.min(left.getConnectedValue(state), right.getConnectedValue(state));\n };\n }\n else {\n const [vector, scalar] = leftIsScalar ? [right, left] : [left, right];\n switch (vector.type) {\n case NodeGeometryBlockConnectionPointTypes.Vector2: {\n func = (state) => {\n return Vector2.Minimize(vector.getConnectedValue(state), state.adapt(scalar, vector.type));\n };\n break;\n }\n case NodeGeometryBlockConnectionPointTypes.Vector3: {\n func = (state) => {\n return Vector3.Minimize(vector.getConnectedValue(state), state.adapt(scalar, vector.type));\n };\n break;\n }\n case NodeGeometryBlockConnectionPointTypes.Vector4: {\n func = (state) => {\n return Vector4.Minimize(vector.getConnectedValue(state), state.adapt(scalar, vector.type));\n };\n break;\n }\n }\n }\n break;\n }\n case MathBlockOperations.Max: {\n if (isScalar) {\n func = (state) => {\n return Math.max(left.getConnectedValue(state), right.getConnectedValue(state));\n };\n }\n else {\n const [vector, scalar] = leftIsScalar ? [right, left] : [left, right];\n switch (vector.type) {\n case NodeGeometryBlockConnectionPointTypes.Vector2: {\n func = (state) => {\n return Vector2.Maximize(vector.getConnectedValue(state), state.adapt(scalar, vector.type));\n };\n break;\n }\n case NodeGeometryBlockConnectionPointTypes.Vector3: {\n func = (state) => {\n return Vector3.Maximize(vector.getConnectedValue(state), state.adapt(scalar, vector.type));\n };\n break;\n }\n case NodeGeometryBlockConnectionPointTypes.Vector4: {\n func = (state) => {\n return Vector4.Maximize(vector.getConnectedValue(state), state.adapt(scalar, vector.type));\n };\n break;\n }\n }\n break;\n }\n }\n }\n this.output._storedFunction = (state) => {\n if (left.type === NodeGeometryBlockConnectionPointTypes.Int) {\n return func(state) | 0;\n }\n return func(state);\n };\n }\n _dumpPropertiesCode() {\n const codeString = super._dumpPropertiesCode() + `${this._codeVariableName}.operation = BABYLON.MathBlockOperations.${MathBlockOperations[this.operation]};\\n`;\n return codeString;\n }\n _updateInputOutputTypes() {\n // First update the output type with the initial assumption that we'll base it on the left input.\n this.output._typeConnectionSource = this.left;\n if (this.left.isConnected && this.right.isConnected) {\n // Both inputs are connected, so we need to determine the output type based on the input types.\n if (this.left.type === NodeGeometryBlockConnectionPointTypes.Int ||\n (this.left.type === NodeGeometryBlockConnectionPointTypes.Float && this.right.type !== NodeGeometryBlockConnectionPointTypes.Int)) {\n this.output._typeConnectionSource = this.right;\n }\n }\n else if (this.left.isConnected !== this.right.isConnected) {\n // Only one input is connected, so we need to determine the output type based on the connected input.\n this.output._typeConnectionSource = this.left.isConnected ? this.left : this.right;\n }\n // Next update the accepted connection point types for the inputs based on the current input connection state.\n if (this.left.isConnected || this.right.isConnected) {\n for (const [first, second] of [\n [this.left, this.right],\n [this.right, this.left],\n ]) {\n // Always allow Ints and Floats.\n first.acceptedConnectionPointTypes = [NodeGeometryBlockConnectionPointTypes.Int, NodeGeometryBlockConnectionPointTypes.Float];\n if (second.isConnected) {\n // The same types as the connected input are always allowed.\n first.acceptedConnectionPointTypes.push(second.type);\n // If the other input is a scalar, then we also allow Vector types.\n if (second.type === NodeGeometryBlockConnectionPointTypes.Int || second.type === NodeGeometryBlockConnectionPointTypes.Float) {\n first.acceptedConnectionPointTypes.push(NodeGeometryBlockConnectionPointTypes.Vector2, NodeGeometryBlockConnectionPointTypes.Vector3, NodeGeometryBlockConnectionPointTypes.Vector4);\n }\n }\n }\n }\n }\n /**\n * Release resources\n */\n dispose() {\n super.dispose();\n this._connectionObservers.forEach((observer) => observer.remove());\n this._connectionObservers.length = 0;\n }\n /**\n * Serializes this block in a JSON representation\n * @returns the serialized block object\n */\n serialize() {\n const serializationObject = super.serialize();\n serializationObject.operation = this.operation;\n return serializationObject;\n }\n _deserialize(serializationObject) {\n super._deserialize(serializationObject);\n this.operation = serializationObject.operation;\n }\n}\n__decorate([\n editableInPropertyPage(\"Operation\", 4 /* PropertyTypeForEdition.List */, \"ADVANCED\", {\n notifiers: { rebuild: true },\n embedded: true,\n options: [\n { label: \"Add\", value: MathBlockOperations.Add },\n { label: \"Subtract\", value: MathBlockOperations.Subtract },\n { label: \"Multiply\", value: MathBlockOperations.Multiply },\n { label: \"Divide\", value: MathBlockOperations.Divide },\n { label: \"Max\", value: MathBlockOperations.Max },\n { label: \"Min\", value: MathBlockOperations.Min },\n ],\n })\n], MathBlock.prototype, \"operation\", void 0);\nRegisterClass(\"BABYLON.MathBlock\", MathBlock);\n"],"mappings":"AAAA,SAASA,UAAU,QAAQ,uBAAuB;AAClD,SAASC,iBAAiB,QAAQ,yBAAyB;AAC3D,SAASC,aAAa,QAAQ,4BAA4B;AAC1D,SAASC,qCAAqC,QAAQ,8CAA8C;AACpG,SAASC,OAAO,EAAEC,OAAO,EAAEC,OAAO,QAAQ,+BAA+B;AACzE,SAASC,sBAAsB,QAAQ,sCAAsC;AAC7E;AACA;AACA;AACA,OAAO,IAAIC,mBAAmB;AAC9B,CAAC,UAAUA,mBAAmB,EAAE;EAC5B;EACAA,mBAAmB,CAACA,mBAAmB,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,KAAK;EAC3D;EACAA,mBAAmB,CAACA,mBAAmB,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,GAAG,UAAU;EACrE;EACAA,mBAAmB,CAACA,mBAAmB,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,GAAG,UAAU;EACrE;EACAA,mBAAmB,CAACA,mBAAmB,CAAC,QAAQ,CAAC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