1 |
- {"ast":null,"code":"import { BuildArray } from \"../Misc/arrayTools.js\";\nimport { Matrix, Vector3 } from \"../Maths/math.vector.js\";\nimport { Epsilon } from \"../Maths/math.constants.js\";\n/**\n * Class used to store bounding box information\n */\nexport class BoundingBox {\n /**\n * Creates a new bounding box\n * @param min defines the minimum vector (in local space)\n * @param max defines the maximum vector (in local space)\n * @param worldMatrix defines the new world matrix\n */\n constructor(min, max, worldMatrix) {\n /**\n * Gets the 8 vectors representing the bounding box in local space\n */\n this.vectors = BuildArray(8, Vector3.Zero);\n /**\n * Gets the center of the bounding box in local space\n */\n this.center = Vector3.Zero();\n /**\n * Gets the center of the bounding box in world space\n */\n this.centerWorld = Vector3.Zero();\n /**\n * Gets half the size of the extent in local space. Multiply by 2 to obtain the full size of the box!\n */\n this.extendSize = Vector3.Zero();\n /**\n * Gets half the size of the extent in world space. Multiply by 2 to obtain the full size of the box!\n */\n this.extendSizeWorld = Vector3.Zero();\n /**\n * Gets the OBB (object bounding box) directions\n */\n this.directions = BuildArray(3, Vector3.Zero);\n /**\n * Gets the 8 vectors representing the bounding box in world space\n */\n this.vectorsWorld = BuildArray(8, Vector3.Zero);\n /**\n * Gets the minimum vector in world space\n */\n this.minimumWorld = Vector3.Zero();\n /**\n * Gets the maximum vector in world space\n */\n this.maximumWorld = Vector3.Zero();\n /**\n * Gets the minimum vector in local space\n */\n this.minimum = Vector3.Zero();\n /**\n * Gets the maximum vector in local space\n */\n this.maximum = Vector3.Zero();\n /** @internal */\n this._drawWrapperFront = null;\n /** @internal */\n this._drawWrapperBack = null;\n this.reConstruct(min, max, worldMatrix);\n }\n // Methods\n /**\n * Recreates the entire bounding box from scratch as if we call the constructor in place\n * @param min defines the new minimum vector (in local space)\n * @param max defines the new maximum vector (in local space)\n * @param worldMatrix defines the new world matrix\n */\n reConstruct(min, max, worldMatrix) {\n const minX = min.x,\n minY = min.y,\n minZ = min.z,\n maxX = max.x,\n maxY = max.y,\n maxZ = max.z;\n const vectors = this.vectors;\n this.minimum.copyFromFloats(minX, minY, minZ);\n this.maximum.copyFromFloats(maxX, maxY, maxZ);\n vectors[0].copyFromFloats(minX, minY, minZ);\n vectors[1].copyFromFloats(maxX, maxY, maxZ);\n vectors[2].copyFromFloats(maxX, minY, minZ);\n vectors[3].copyFromFloats(minX, maxY, minZ);\n vectors[4].copyFromFloats(minX, minY, maxZ);\n vectors[5].copyFromFloats(maxX, maxY, minZ);\n vectors[6].copyFromFloats(minX, maxY, maxZ);\n vectors[7].copyFromFloats(maxX, minY, maxZ);\n // OBB\n max.addToRef(min, this.center).scaleInPlace(0.5);\n max.subtractToRef(min, this.extendSize).scaleInPlace(0.5);\n this._worldMatrix = worldMatrix || Matrix.IdentityReadOnly;\n this._update(this._worldMatrix);\n }\n /**\n * Scale the current bounding box by applying a scale factor\n * @param factor defines the scale factor to apply\n * @returns the current bounding box\n */\n scale(factor) {\n const tmpVectors = BoundingBox._TmpVector3;\n const diff = this.maximum.subtractToRef(this.minimum, tmpVectors[0]);\n const len = diff.length();\n diff.normalizeFromLength(len);\n const distance = len * factor;\n const newRadius = diff.scaleInPlace(distance * 0.5);\n const min = this.center.subtractToRef(newRadius, tmpVectors[1]);\n const max = this.center.addToRef(newRadius, tmpVectors[2]);\n this.reConstruct(min, max, this._worldMatrix);\n return this;\n }\n /**\n * Gets the world matrix of the bounding box\n * @returns a matrix\n */\n getWorldMatrix() {\n return this._worldMatrix;\n }\n /**\n * @internal\n */\n _update(world) {\n const minWorld = this.minimumWorld;\n const maxWorld = this.maximumWorld;\n const directions = this.directions;\n const vectorsWorld = this.vectorsWorld;\n const vectors = this.vectors;\n if (!world.isIdentity()) {\n minWorld.setAll(Number.MAX_VALUE);\n maxWorld.setAll(-Number.MAX_VALUE);\n for (let index = 0; index < 8; ++index) {\n const v = vectorsWorld[index];\n Vector3.TransformCoordinatesToRef(vectors[index], world, v);\n minWorld.minimizeInPlace(v);\n maxWorld.maximizeInPlace(v);\n }\n // Extend\n maxWorld.subtractToRef(minWorld, this.extendSizeWorld).scaleInPlace(0.5);\n maxWorld.addToRef(minWorld, this.centerWorld).scaleInPlace(0.5);\n } else {\n minWorld.copyFrom(this.minimum);\n maxWorld.copyFrom(this.maximum);\n for (let index = 0; index < 8; ++index) {\n vectorsWorld[index].copyFrom(vectors[index]);\n }\n // Extend\n this.extendSizeWorld.copyFrom(this.extendSize);\n this.centerWorld.copyFrom(this.center);\n }\n Vector3.FromArrayToRef(world.m, 0, directions[0]);\n Vector3.FromArrayToRef(world.m, 4, directions[1]);\n Vector3.FromArrayToRef(world.m, 8, directions[2]);\n this._worldMatrix = world;\n }\n /**\n * Tests if the bounding box is intersecting the frustum planes\n * @param frustumPlanes defines the frustum planes to test\n * @returns true if there is an intersection\n */\n isInFrustum(frustumPlanes) {\n return BoundingBox.IsInFrustum(this.vectorsWorld, frustumPlanes);\n }\n /**\n * Tests if the bounding box is entirely inside the frustum planes\n * @param frustumPlanes defines the frustum planes to test\n * @returns true if there is an inclusion\n */\n isCompletelyInFrustum(frustumPlanes) {\n return BoundingBox.IsCompletelyInFrustum(this.vectorsWorld, frustumPlanes);\n }\n /**\n * Tests if a point is inside the bounding box\n * @param point defines the point to test\n * @returns true if the point is inside the bounding box\n */\n intersectsPoint(point) {\n const min = this.minimumWorld;\n const max = this.maximumWorld;\n const minX = min.x,\n minY = min.y,\n minZ = min.z,\n maxX = max.x,\n maxY = max.y,\n maxZ = max.z;\n const pointX = point.x,\n pointY = point.y,\n pointZ = point.z;\n const delta = -Epsilon;\n if (maxX - pointX < delta || delta > pointX - minX) {\n return false;\n }\n if (maxY - pointY < delta || delta > pointY - minY) {\n return false;\n }\n if (maxZ - pointZ < delta || delta > pointZ - minZ) {\n return false;\n }\n return true;\n }\n /**\n * Tests if the bounding box intersects with a bounding sphere\n * @param sphere defines the sphere to test\n * @returns true if there is an intersection\n */\n intersectsSphere(sphere) {\n return BoundingBox.IntersectsSphere(this.minimumWorld, this.maximumWorld, sphere.centerWorld, sphere.radiusWorld);\n }\n /**\n * Tests if the bounding box intersects with a box defined by a min and max vectors\n * @param min defines the min vector to use\n * @param max defines the max vector to use\n * @returns true if there is an intersection\n */\n intersectsMinMax(min, max) {\n const myMin = this.minimumWorld;\n const myMax = this.maximumWorld;\n const myMinX = myMin.x,\n myMinY = myMin.y,\n myMinZ = myMin.z,\n myMaxX = myMax.x,\n myMaxY = myMax.y,\n myMaxZ = myMax.z;\n const minX = min.x,\n minY = min.y,\n minZ = min.z,\n maxX = max.x,\n maxY = max.y,\n maxZ = max.z;\n if (myMaxX < minX || myMinX > maxX) {\n return false;\n }\n if (myMaxY < minY || myMinY > maxY) {\n return false;\n }\n if (myMaxZ < minZ || myMinZ > maxZ) {\n return false;\n }\n return true;\n }\n /**\n * Disposes the resources of the class\n */\n dispose() {\n var _this$_drawWrapperFro, _this$_drawWrapperBac;\n (_this$_drawWrapperFro = this._drawWrapperFront) === null || _this$_drawWrapperFro === void 0 || _this$_drawWrapperFro.dispose();\n (_this$_drawWrapperBac = this._drawWrapperBack) === null || _this$_drawWrapperBac === void 0 || _this$_drawWrapperBac.dispose();\n }\n // Statics\n /**\n * Tests if two bounding boxes are intersections\n * @param box0 defines the first box to test\n * @param box1 defines the second box to test\n * @returns true if there is an intersection\n */\n static Intersects(box0, box1) {\n return box0.intersectsMinMax(box1.minimumWorld, box1.maximumWorld);\n }\n /**\n * Tests if a bounding box defines by a min/max vectors intersects a sphere\n * @param minPoint defines the minimum vector of the bounding box\n * @param maxPoint defines the maximum vector of the bounding box\n * @param sphereCenter defines the sphere center\n * @param sphereRadius defines the sphere radius\n * @returns true if there is an intersection\n */\n static IntersectsSphere(minPoint, maxPoint, sphereCenter, sphereRadius) {\n const vector = BoundingBox._TmpVector3[0];\n Vector3.ClampToRef(sphereCenter, minPoint, maxPoint, vector);\n const num = Vector3.DistanceSquared(sphereCenter, vector);\n return num <= sphereRadius * sphereRadius;\n }\n /**\n * Tests if a bounding box defined with 8 vectors is entirely inside frustum planes\n * @param boundingVectors defines an array of 8 vectors representing a bounding box\n * @param frustumPlanes defines the frustum planes to test\n * @returns true if there is an inclusion\n */\n static IsCompletelyInFrustum(boundingVectors, frustumPlanes) {\n for (let p = 0; p < 6; ++p) {\n const frustumPlane = frustumPlanes[p];\n for (let i = 0; i < 8; ++i) {\n if (frustumPlane.dotCoordinate(boundingVectors[i]) < 0) {\n return false;\n }\n }\n }\n return true;\n }\n /**\n * Tests if a bounding box defined with 8 vectors intersects frustum planes\n * @param boundingVectors defines an array of 8 vectors representing a bounding box\n * @param frustumPlanes defines the frustum planes to test\n * @returns true if there is an intersection\n */\n static IsInFrustum(boundingVectors, frustumPlanes) {\n for (let p = 0; p < 6; ++p) {\n let canReturnFalse = true;\n const frustumPlane = frustumPlanes[p];\n for (let i = 0; i < 8; ++i) {\n if (frustumPlane.dotCoordinate(boundingVectors[i]) >= 0) {\n canReturnFalse = false;\n break;\n }\n }\n if (canReturnFalse) {\n return false;\n }\n }\n return true;\n }\n}\nBoundingBox._TmpVector3 = BuildArray(3, Vector3.Zero);","map":{"version":3,"names":["BuildArray","Matrix","Vector3","Epsilon","BoundingBox","constructor","min","max","worldMatrix","vectors","Zero","center","centerWorld","extendSize","extendSizeWorld","directions","vectorsWorld","minimumWorld","maximumWorld","minimum","maximum","_drawWrapperFront","_drawWrapperBack","reConstruct","minX","x","minY","y","minZ","z","maxX","maxY","maxZ","copyFromFloats","addToRef","scaleInPlace","subtractToRef","_worldMatrix","IdentityReadOnly","_update","scale","factor","tmpVectors","_TmpVector3","diff","len","length","normalizeFromLength","distance","newRadius","getWorldMatrix","world","minWorld","maxWorld","isIdentity","setAll","Number","MAX_VALUE","index","v","TransformCoordinatesToRef","minimizeInPlace","maximizeInPlace","copyFrom","FromArrayToRef","m","isInFrustum","frustumPlanes","IsInFrustum","isCompletelyInFrustum","IsCompletelyInFrustum","intersectsPoint","point","pointX","pointY","pointZ","delta","intersectsSphere","sphere","IntersectsSphere","radiusWorld","intersectsMinMax","myMin","myMax","myMinX","myMinY","myMinZ","myMaxX","myMaxY","myMaxZ","dispose","_this$_drawWrapperFro","_this$_drawWrapperBac","Intersects","box0","box1","minPoint","maxPoint","sphereCenter","sphereRadius","vector","ClampToRef","num","DistanceSquared","boundingVectors","p","frustumPlane","i","dotCoordinate","canReturnFalse"],"sources":["F:/workspace/202226701027/huinongbao-app/node_modules/@babylonjs/core/Culling/boundingBox.js"],"sourcesContent":["import { BuildArray } from \"../Misc/arrayTools.js\";\nimport { Matrix, Vector3 } from \"../Maths/math.vector.js\";\nimport { Epsilon } from \"../Maths/math.constants.js\";\n/**\n * Class used to store bounding box information\n */\nexport class BoundingBox {\n /**\n * Creates a new bounding box\n * @param min defines the minimum vector (in local space)\n * @param max defines the maximum vector (in local space)\n * @param worldMatrix defines the new world matrix\n */\n constructor(min, max, worldMatrix) {\n /**\n * Gets the 8 vectors representing the bounding box in local space\n */\n this.vectors = BuildArray(8, Vector3.Zero);\n /**\n * Gets the center of the bounding box in local space\n */\n this.center = Vector3.Zero();\n /**\n * Gets the center of the bounding box in world space\n */\n this.centerWorld = Vector3.Zero();\n /**\n * Gets half the size of the extent in local space. Multiply by 2 to obtain the full size of the box!\n */\n this.extendSize = Vector3.Zero();\n /**\n * Gets half the size of the extent in world space. Multiply by 2 to obtain the full size of the box!\n */\n this.extendSizeWorld = Vector3.Zero();\n /**\n * Gets the OBB (object bounding box) directions\n */\n this.directions = BuildArray(3, Vector3.Zero);\n /**\n * Gets the 8 vectors representing the bounding box in world space\n */\n this.vectorsWorld = BuildArray(8, Vector3.Zero);\n /**\n * Gets the minimum vector in world space\n */\n this.minimumWorld = Vector3.Zero();\n /**\n * Gets the maximum vector in world space\n */\n this.maximumWorld = Vector3.Zero();\n /**\n * Gets the minimum vector in local space\n */\n this.minimum = Vector3.Zero();\n /**\n * Gets the maximum vector in local space\n */\n this.maximum = Vector3.Zero();\n /** @internal */\n this._drawWrapperFront = null;\n /** @internal */\n this._drawWrapperBack = null;\n this.reConstruct(min, max, worldMatrix);\n }\n // Methods\n /**\n * Recreates the entire bounding box from scratch as if we call the constructor in place\n * @param min defines the new minimum vector (in local space)\n * @param max defines the new maximum vector (in local space)\n * @param worldMatrix defines the new world matrix\n */\n reConstruct(min, max, worldMatrix) {\n const minX = min.x, minY = min.y, minZ = min.z, maxX = max.x, maxY = max.y, maxZ = max.z;\n const vectors = this.vectors;\n this.minimum.copyFromFloats(minX, minY, minZ);\n this.maximum.copyFromFloats(maxX, maxY, maxZ);\n vectors[0].copyFromFloats(minX, minY, minZ);\n vectors[1].copyFromFloats(maxX, maxY, maxZ);\n vectors[2].copyFromFloats(maxX, minY, minZ);\n vectors[3].copyFromFloats(minX, maxY, minZ);\n vectors[4].copyFromFloats(minX, minY, maxZ);\n vectors[5].copyFromFloats(maxX, maxY, minZ);\n vectors[6].copyFromFloats(minX, maxY, maxZ);\n vectors[7].copyFromFloats(maxX, minY, maxZ);\n // OBB\n max.addToRef(min, this.center).scaleInPlace(0.5);\n max.subtractToRef(min, this.extendSize).scaleInPlace(0.5);\n this._worldMatrix = worldMatrix || Matrix.IdentityReadOnly;\n this._update(this._worldMatrix);\n }\n /**\n * Scale the current bounding box by applying a scale factor\n * @param factor defines the scale factor to apply\n * @returns the current bounding box\n */\n scale(factor) {\n const tmpVectors = BoundingBox._TmpVector3;\n const diff = this.maximum.subtractToRef(this.minimum, tmpVectors[0]);\n const len = diff.length();\n diff.normalizeFromLength(len);\n const distance = len * factor;\n const newRadius = diff.scaleInPlace(distance * 0.5);\n const min = this.center.subtractToRef(newRadius, tmpVectors[1]);\n const max = this.center.addToRef(newRadius, tmpVectors[2]);\n this.reConstruct(min, max, this._worldMatrix);\n return this;\n }\n /**\n * Gets the world matrix of the bounding box\n * @returns a matrix\n */\n getWorldMatrix() {\n return this._worldMatrix;\n }\n /**\n * @internal\n */\n _update(world) {\n const minWorld = this.minimumWorld;\n const maxWorld = this.maximumWorld;\n const directions = this.directions;\n const vectorsWorld = this.vectorsWorld;\n const vectors = this.vectors;\n if (!world.isIdentity()) {\n minWorld.setAll(Number.MAX_VALUE);\n maxWorld.setAll(-Number.MAX_VALUE);\n for (let index = 0; index < 8; ++index) {\n const v = vectorsWorld[index];\n Vector3.TransformCoordinatesToRef(vectors[index], world, v);\n minWorld.minimizeInPlace(v);\n maxWorld.maximizeInPlace(v);\n }\n // Extend\n maxWorld.subtractToRef(minWorld, this.extendSizeWorld).scaleInPlace(0.5);\n maxWorld.addToRef(minWorld, this.centerWorld).scaleInPlace(0.5);\n }\n else {\n minWorld.copyFrom(this.minimum);\n maxWorld.copyFrom(this.maximum);\n for (let index = 0; index < 8; ++index) {\n vectorsWorld[index].copyFrom(vectors[index]);\n }\n // Extend\n this.extendSizeWorld.copyFrom(this.extendSize);\n this.centerWorld.copyFrom(this.center);\n }\n Vector3.FromArrayToRef(world.m, 0, directions[0]);\n Vector3.FromArrayToRef(world.m, 4, directions[1]);\n Vector3.FromArrayToRef(world.m, 8, directions[2]);\n this._worldMatrix = world;\n }\n /**\n * Tests if the bounding box is intersecting the frustum planes\n * @param frustumPlanes defines the frustum planes to test\n * @returns true if there is an intersection\n */\n isInFrustum(frustumPlanes) {\n return BoundingBox.IsInFrustum(this.vectorsWorld, frustumPlanes);\n }\n /**\n * Tests if the bounding box is entirely inside the frustum planes\n * @param frustumPlanes defines the frustum planes to test\n * @returns true if there is an inclusion\n */\n isCompletelyInFrustum(frustumPlanes) {\n return BoundingBox.IsCompletelyInFrustum(this.vectorsWorld, frustumPlanes);\n }\n /**\n * Tests if a point is inside the bounding box\n * @param point defines the point to test\n * @returns true if the point is inside the bounding box\n */\n intersectsPoint(point) {\n const min = this.minimumWorld;\n const max = this.maximumWorld;\n const minX = min.x, minY = min.y, minZ = min.z, maxX = max.x, maxY = max.y, maxZ = max.z;\n const pointX = point.x, pointY = point.y, pointZ = point.z;\n const delta = -Epsilon;\n if (maxX - pointX < delta || delta > pointX - minX) {\n return false;\n }\n if (maxY - pointY < delta || delta > pointY - minY) {\n return false;\n }\n if (maxZ - pointZ < delta || delta > pointZ - minZ) {\n return false;\n }\n return true;\n }\n /**\n * Tests if the bounding box intersects with a bounding sphere\n * @param sphere defines the sphere to test\n * @returns true if there is an intersection\n */\n intersectsSphere(sphere) {\n return BoundingBox.IntersectsSphere(this.minimumWorld, this.maximumWorld, sphere.centerWorld, sphere.radiusWorld);\n }\n /**\n * Tests if the bounding box intersects with a box defined by a min and max vectors\n * @param min defines the min vector to use\n * @param max defines the max vector to use\n * @returns true if there is an intersection\n */\n intersectsMinMax(min, max) {\n const myMin = this.minimumWorld;\n const myMax = this.maximumWorld;\n const myMinX = myMin.x, myMinY = myMin.y, myMinZ = myMin.z, myMaxX = myMax.x, myMaxY = myMax.y, myMaxZ = myMax.z;\n const minX = min.x, minY = min.y, minZ = min.z, maxX = max.x, maxY = max.y, maxZ = max.z;\n if (myMaxX < minX || myMinX > maxX) {\n return false;\n }\n if (myMaxY < minY || myMinY > maxY) {\n return false;\n }\n if (myMaxZ < minZ || myMinZ > maxZ) {\n return false;\n }\n return true;\n }\n /**\n * Disposes the resources of the class\n */\n dispose() {\n this._drawWrapperFront?.dispose();\n this._drawWrapperBack?.dispose();\n }\n // Statics\n /**\n * Tests if two bounding boxes are intersections\n * @param box0 defines the first box to test\n * @param box1 defines the second box to test\n * @returns true if there is an intersection\n */\n static Intersects(box0, box1) {\n return box0.intersectsMinMax(box1.minimumWorld, box1.maximumWorld);\n }\n /**\n * Tests if a bounding box defines by a min/max vectors intersects a sphere\n * @param minPoint defines the minimum vector of the bounding box\n * @param maxPoint defines the maximum vector of the bounding box\n * @param sphereCenter defines the sphere center\n * @param sphereRadius defines the sphere radius\n * @returns true if there is an intersection\n */\n static IntersectsSphere(minPoint, maxPoint, sphereCenter, sphereRadius) {\n const vector = BoundingBox._TmpVector3[0];\n Vector3.ClampToRef(sphereCenter, minPoint, maxPoint, vector);\n const num = Vector3.DistanceSquared(sphereCenter, vector);\n return num <= sphereRadius * sphereRadius;\n }\n /**\n * Tests if a bounding box defined with 8 vectors is entirely inside frustum planes\n * @param boundingVectors defines an array of 8 vectors representing a bounding box\n * @param frustumPlanes defines the frustum planes to test\n * @returns true if there is an inclusion\n */\n static IsCompletelyInFrustum(boundingVectors, frustumPlanes) {\n for (let p = 0; p < 6; ++p) {\n const frustumPlane = frustumPlanes[p];\n for (let i = 0; i < 8; ++i) {\n if (frustumPlane.dotCoordinate(boundingVectors[i]) < 0) {\n return false;\n }\n }\n }\n return true;\n }\n /**\n * Tests if a bounding box defined with 8 vectors intersects frustum planes\n * @param boundingVectors defines an array of 8 vectors representing a bounding box\n * @param frustumPlanes defines the frustum planes to test\n * @returns true if there is an intersection\n */\n static IsInFrustum(boundingVectors, frustumPlanes) {\n for (let p = 0; p < 6; ++p) {\n let canReturnFalse = true;\n const frustumPlane = frustumPlanes[p];\n for (let i = 0; i < 8; ++i) {\n if (frustumPlane.dotCoordinate(boundingVectors[i]) >= 0) {\n canReturnFalse = false;\n break;\n }\n }\n if (canReturnFalse) {\n return false;\n }\n }\n return true;\n }\n}\nBoundingBox._TmpVector3 = BuildArray(3, Vector3.Zero);\n"],"mappings":"AAAA,SAASA,UAAU,QAAQ,uBAAuB;AAClD,SAASC,MAAM,EAAEC,OAAO,QAAQ,yBAAyB;AACzD,SAASC,OAAO,QAAQ,4BAA4B;AACpD;AACA;AACA;AACA,OAAO,MAAMC,WAAW,CAAC;EACrB;AACJ;AACA;AACA;AACA;AACA;EACIC,WAAWA,CAACC,GAAG,EAAEC,GAAG,EAAEC,WAAW,EAAE;IAC/B;AACR;AACA;IACQ,IAAI,CAACC,OAAO,GAAGT,UAAU,CAAC,CAAC,EAAEE,OAAO,CAACQ,IAAI,CAAC;IAC1C;AACR;AACA;IACQ,IAAI,CAACC,MAAM,GAAGT,OAAO,CAACQ,IAAI,CAAC,CAAC;IAC5B;AACR;AACA;IACQ,IAAI,CAACE,WAAW,GAAGV,OAAO,CAACQ,IAAI,CAAC,CAAC;IACjC;AACR;AACA;IACQ,IAAI,CAACG,UAAU,GAAGX,OAAO,CAACQ,I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