@loaders.gl/tiles 3.4.13 → 3.4.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dist.min.js +122 -338
- package/dist/es5/bundle.js +1 -1
- package/dist/es5/bundle.js.map +1 -1
- package/dist/es5/constants.js +6 -6
- package/dist/es5/constants.js.map +1 -1
- package/dist/es5/index.js +13 -13
- package/dist/es5/tileset/format-3d-tiles/tileset-3d-traverser.js +32 -53
- package/dist/es5/tileset/format-3d-tiles/tileset-3d-traverser.js.map +1 -1
- package/dist/es5/tileset/format-i3s/i3s-pending-tiles-register.js +21 -32
- package/dist/es5/tileset/format-i3s/i3s-pending-tiles-register.js.map +1 -1
- package/dist/es5/tileset/format-i3s/i3s-tile-manager.js +66 -63
- package/dist/es5/tileset/format-i3s/i3s-tile-manager.js.map +1 -1
- package/dist/es5/tileset/format-i3s/i3s-tileset-traverser.js +54 -121
- package/dist/es5/tileset/format-i3s/i3s-tileset-traverser.js.map +1 -1
- package/dist/es5/tileset/helpers/bounding-volume.js +48 -62
- package/dist/es5/tileset/helpers/bounding-volume.js.map +1 -1
- package/dist/es5/tileset/helpers/frame-state.js +67 -80
- package/dist/es5/tileset/helpers/frame-state.js.map +1 -1
- package/dist/es5/tileset/helpers/i3s-lod.js +27 -27
- package/dist/es5/tileset/helpers/i3s-lod.js.map +1 -1
- package/dist/es5/tileset/helpers/tiles-3d-lod.js +51 -45
- package/dist/es5/tileset/helpers/tiles-3d-lod.js.map +1 -1
- package/dist/es5/tileset/helpers/transform-utils.js +17 -11
- package/dist/es5/tileset/helpers/transform-utils.js.map +1 -1
- package/dist/es5/tileset/helpers/zoom.js +28 -28
- package/dist/es5/tileset/helpers/zoom.js.map +1 -1
- package/dist/es5/tileset/tile-3d.js +316 -430
- package/dist/es5/tileset/tile-3d.js.map +1 -1
- package/dist/es5/tileset/tileset-3d.js +460 -701
- package/dist/es5/tileset/tileset-3d.js.map +1 -1
- package/dist/es5/tileset/tileset-cache.js +41 -58
- package/dist/es5/tileset/tileset-cache.js.map +1 -1
- package/dist/es5/tileset/tileset-traverser.js +189 -264
- package/dist/es5/tileset/tileset-traverser.js.map +1 -1
- package/dist/es5/utils/doubly-linked-list-node.js +10 -11
- package/dist/es5/utils/doubly-linked-list-node.js.map +1 -1
- package/dist/es5/utils/doubly-linked-list.js +53 -68
- package/dist/es5/utils/doubly-linked-list.js.map +1 -1
- package/dist/es5/utils/managed-array.js +69 -100
- package/dist/es5/utils/managed-array.js.map +1 -1
- package/package.json +5 -5
|
@@ -10,11 +10,17 @@ var _loaderUtils = require("@loaders.gl/loader-utils");
|
|
|
10
10
|
function calculateTransformProps(tileHeader, tile) {
|
|
11
11
|
(0, _loaderUtils.assert)(tileHeader);
|
|
12
12
|
(0, _loaderUtils.assert)(tile);
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
const {
|
|
14
|
+
rtcCenter,
|
|
15
|
+
gltfUpAxis
|
|
16
|
+
} = tile;
|
|
17
|
+
const {
|
|
18
|
+
computedTransform,
|
|
19
|
+
boundingVolume: {
|
|
20
|
+
center
|
|
21
|
+
}
|
|
22
|
+
} = tileHeader;
|
|
23
|
+
let modelMatrix = new _core.Matrix4(computedTransform);
|
|
18
24
|
if (rtcCenter) {
|
|
19
25
|
modelMatrix.translate(rtcCenter);
|
|
20
26
|
}
|
|
@@ -22,11 +28,11 @@ function calculateTransformProps(tileHeader, tile) {
|
|
|
22
28
|
case 'Z':
|
|
23
29
|
break;
|
|
24
30
|
case 'Y':
|
|
25
|
-
|
|
31
|
+
const rotationY = new _core.Matrix4().rotateX(Math.PI / 2);
|
|
26
32
|
modelMatrix = modelMatrix.multiplyRight(rotationY);
|
|
27
33
|
break;
|
|
28
34
|
case 'X':
|
|
29
|
-
|
|
35
|
+
const rotationX = new _core.Matrix4().rotateY(-Math.PI / 2);
|
|
30
36
|
modelMatrix = modelMatrix.multiplyRight(rotationX);
|
|
31
37
|
break;
|
|
32
38
|
default:
|
|
@@ -35,12 +41,12 @@ function calculateTransformProps(tileHeader, tile) {
|
|
|
35
41
|
if (tile.isQuantized) {
|
|
36
42
|
modelMatrix.translate(tile.quantizedVolumeOffset).scale(tile.quantizedVolumeScale);
|
|
37
43
|
}
|
|
38
|
-
|
|
44
|
+
const cartesianOrigin = new _core.Vector3(center);
|
|
39
45
|
tile.cartesianModelMatrix = modelMatrix;
|
|
40
46
|
tile.cartesianOrigin = cartesianOrigin;
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
47
|
+
const cartographicOrigin = _geospatial.Ellipsoid.WGS84.cartesianToCartographic(cartesianOrigin, new _core.Vector3());
|
|
48
|
+
const fromFixedFrameMatrix = _geospatial.Ellipsoid.WGS84.eastNorthUpToFixedFrame(cartesianOrigin);
|
|
49
|
+
const toFixedFrameMatrix = fromFixedFrameMatrix.invert();
|
|
44
50
|
tile.cartographicModelMatrix = toFixedFrameMatrix.multiplyRight(modelMatrix);
|
|
45
51
|
tile.cartographicOrigin = cartographicOrigin;
|
|
46
52
|
if (!tile.coordinateSystem) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transform-utils.js","names":["_geospatial","require","_core","_loaderUtils","calculateTransformProps","tileHeader","tile","assert","rtcCenter","gltfUpAxis","computedTransform","
|
|
1
|
+
{"version":3,"file":"transform-utils.js","names":["_geospatial","require","_core","_loaderUtils","calculateTransformProps","tileHeader","tile","assert","rtcCenter","gltfUpAxis","computedTransform","boundingVolume","center","modelMatrix","Matrix4","translate","rotationY","rotateX","Math","PI","multiplyRight","rotationX","rotateY","isQuantized","quantizedVolumeOffset","scale","quantizedVolumeScale","cartesianOrigin","Vector3","cartesianModelMatrix","cartographicOrigin","Ellipsoid","WGS84","cartesianToCartographic","fromFixedFrameMatrix","eastNorthUpToFixedFrame","toFixedFrameMatrix","invert","cartographicModelMatrix","coordinateSystem"],"sources":["../../../../src/tileset/helpers/transform-utils.ts"],"sourcesContent":["// loaders.gl, MIT license\n\nimport {Ellipsoid} from '@math.gl/geospatial';\nimport {Matrix4, Vector3} from '@math.gl/core';\nimport {assert} from '@loaders.gl/loader-utils';\n\nexport function calculateTransformProps(tileHeader, tile) {\n assert(tileHeader);\n assert(tile);\n\n const {rtcCenter, gltfUpAxis} = tile;\n const {\n computedTransform,\n boundingVolume: {center}\n } = tileHeader;\n\n let modelMatrix = new Matrix4(computedTransform);\n\n // Translate if appropriate\n if (rtcCenter) {\n modelMatrix.translate(rtcCenter);\n }\n\n // glTF models need to be rotated from Y to Z up\n // https://github.com/AnalyticalGraphicsInc/3d-tiles/tree/master/specification#y-up-to-z-up\n switch (gltfUpAxis) {\n case 'Z':\n break;\n case 'Y':\n const rotationY = new Matrix4().rotateX(Math.PI / 2);\n modelMatrix = modelMatrix.multiplyRight(rotationY);\n break;\n case 'X':\n const rotationX = new Matrix4().rotateY(-Math.PI / 2);\n modelMatrix = modelMatrix.multiplyRight(rotationX);\n break;\n default:\n break;\n }\n\n // Scale/offset positions if normalized integers\n if (tile.isQuantized) {\n modelMatrix.translate(tile.quantizedVolumeOffset).scale(tile.quantizedVolumeScale);\n }\n\n // Option 1: Cartesian matrix and origin\n const cartesianOrigin = new Vector3(center);\n\n tile.cartesianModelMatrix = modelMatrix;\n tile.cartesianOrigin = cartesianOrigin;\n\n // Option 2: Cartographic matrix and origin\n const cartographicOrigin = Ellipsoid.WGS84.cartesianToCartographic(\n cartesianOrigin,\n new Vector3()\n );\n const fromFixedFrameMatrix = Ellipsoid.WGS84.eastNorthUpToFixedFrame(cartesianOrigin);\n const toFixedFrameMatrix = fromFixedFrameMatrix.invert();\n\n tile.cartographicModelMatrix = toFixedFrameMatrix.multiplyRight(modelMatrix);\n tile.cartographicOrigin = cartographicOrigin;\n\n // Deprecated, drop\n if (!tile.coordinateSystem) {\n tile.modelMatrix = tile.cartographicModelMatrix;\n }\n}\n"],"mappings":";;;;;;AAEA,IAAAA,WAAA,GAAAC,OAAA;AAC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ACC,KAAK,CAACC,uBAAuB,CAChEN,eAAe,EACf,IAAIC,aAAO,CAAC,CACd,CAAC;EACD,MAAMM,oBAAoB,GAAGH,qBAAS,CAACC,KAAK,CAACG,uBAAuB,CAACR,eAAe,CAAC;EACrF,MAAMS,kBAAkB,GAAGF,oBAAoB,CAACG,MAAM,CAAC,CAAC;EAExD/B,IAAI,CAACgC,uBAAuB,GAAGF,kBAAkB,CAAChB,aAAa,CAACP,WAAW,CAAC;EAC5EP,IAAI,CAACwB,kBAAkB,GAAGA,kBAAkB;EAG5C,IAAI,CAACxB,IAAI,CAACiC,gBAAgB,EAAE;IAC1BjC,IAAI,CAACO,WAAW,GAAGP,IAAI,CAACgC,uBAAuB;EACjD;AACF"}
|
|
@@ -1,63 +1,63 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
7
6
|
exports.getZoomFromBoundingVolume = getZoomFromBoundingVolume;
|
|
8
7
|
exports.getZoomFromExtent = getZoomFromExtent;
|
|
9
8
|
exports.getZoomFromFullExtent = getZoomFromFullExtent;
|
|
10
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
11
9
|
var _core = require("@math.gl/core");
|
|
12
10
|
var _culling = require("@math.gl/culling");
|
|
13
11
|
var _geospatial = require("@math.gl/geospatial");
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
12
|
+
const WGS84_RADIUS_X = 6378137.0;
|
|
13
|
+
const WGS84_RADIUS_Y = 6378137.0;
|
|
14
|
+
const WGS84_RADIUS_Z = 6356752.3142451793;
|
|
15
|
+
const scratchVector = new _core.Vector3();
|
|
18
16
|
function getZoomFromBoundingVolume(boundingVolume, cartorgraphicCenter) {
|
|
19
17
|
if (boundingVolume instanceof _culling.OrientedBoundingBox) {
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
const {
|
|
19
|
+
halfAxes
|
|
20
|
+
} = boundingVolume;
|
|
21
|
+
const obbSize = getObbSize(halfAxes);
|
|
22
22
|
return Math.log2(WGS84_RADIUS_Z / (obbSize + cartorgraphicCenter[2]));
|
|
23
23
|
} else if (boundingVolume instanceof _culling.BoundingSphere) {
|
|
24
|
-
|
|
24
|
+
const {
|
|
25
|
+
radius
|
|
26
|
+
} = boundingVolume;
|
|
25
27
|
return Math.log2(WGS84_RADIUS_Z / (radius + cartorgraphicCenter[2]));
|
|
26
28
|
} else if (boundingVolume.width && boundingVolume.height) {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
const {
|
|
30
|
+
width,
|
|
31
|
+
height
|
|
32
|
+
} = boundingVolume;
|
|
33
|
+
const zoomX = Math.log2(WGS84_RADIUS_X / width);
|
|
34
|
+
const zoomY = Math.log2(WGS84_RADIUS_Y / height);
|
|
31
35
|
return (zoomX + zoomY) / 2;
|
|
32
36
|
}
|
|
33
37
|
return 1;
|
|
34
38
|
}
|
|
35
39
|
function getZoomFromFullExtent(fullExtent, cartorgraphicCenter, cartesianCenter) {
|
|
36
|
-
|
|
37
|
-
|
|
40
|
+
const extentVertex = _geospatial.Ellipsoid.WGS84.cartographicToCartesian([fullExtent.xmax, fullExtent.ymax, fullExtent.zmax], new _core.Vector3());
|
|
41
|
+
const extentSize = Math.sqrt(Math.pow(extentVertex[0] - cartesianCenter[0], 2) + Math.pow(extentVertex[1] - cartesianCenter[1], 2) + Math.pow(extentVertex[2] - cartesianCenter[2], 2));
|
|
38
42
|
return Math.log2(WGS84_RADIUS_Z / (extentSize + cartorgraphicCenter[2]));
|
|
39
43
|
}
|
|
40
44
|
function getZoomFromExtent(extent, cartorgraphicCenter, cartesianCenter) {
|
|
41
|
-
|
|
42
|
-
xmin = _extent[0],
|
|
43
|
-
ymin = _extent[1],
|
|
44
|
-
xmax = _extent[2],
|
|
45
|
-
ymax = _extent[3];
|
|
45
|
+
const [xmin, ymin, xmax, ymax] = extent;
|
|
46
46
|
return getZoomFromFullExtent({
|
|
47
|
-
xmin
|
|
48
|
-
xmax
|
|
49
|
-
ymin
|
|
50
|
-
ymax
|
|
47
|
+
xmin,
|
|
48
|
+
xmax,
|
|
49
|
+
ymin,
|
|
50
|
+
ymax,
|
|
51
51
|
zmin: 0,
|
|
52
52
|
zmax: 0
|
|
53
53
|
}, cartorgraphicCenter, cartesianCenter);
|
|
54
54
|
}
|
|
55
55
|
function getObbSize(halfAxes) {
|
|
56
56
|
halfAxes.getColumn(0, scratchVector);
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
57
|
+
const axeY = halfAxes.getColumn(1);
|
|
58
|
+
const axeZ = halfAxes.getColumn(2);
|
|
59
|
+
const farthestVertex = scratchVector.add(axeY).add(axeZ);
|
|
60
|
+
const size = farthestVertex.len();
|
|
61
61
|
return size;
|
|
62
62
|
}
|
|
63
63
|
//# sourceMappingURL=zoom.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"zoom.js","names":["_core","require","_culling","_geospatial","WGS84_RADIUS_X","WGS84_RADIUS_Y","WGS84_RADIUS_Z","scratchVector","Vector3","getZoomFromBoundingVolume","boundingVolume","cartorgraphicCenter","OrientedBoundingBox","halfAxes","obbSize","getObbSize","Math","log2","BoundingSphere","radius","width","height","zoomX","zoomY","getZoomFromFullExtent","fullExtent","cartesianCenter","extentVertex","Ellipsoid","WGS84","cartographicToCartesian","xmax","ymax","zmax","extentSize","sqrt","pow","getZoomFromExtent","extent","
|
|
1
|
+
{"version":3,"file":"zoom.js","names":["_core","require","_culling","_geospatial","WGS84_RADIUS_X","WGS84_RADIUS_Y","WGS84_RADIUS_Z","scratchVector","Vector3","getZoomFromBoundingVolume","boundingVolume","cartorgraphicCenter","OrientedBoundingBox","halfAxes","obbSize","getObbSize","Math","log2","BoundingSphere","radius","width","height","zoomX","zoomY","getZoomFromFullExtent","fullExtent","cartesianCenter","extentVertex","Ellipsoid","WGS84","cartographicToCartesian","xmax","ymax","zmax","extentSize","sqrt","pow","getZoomFromExtent","extent","xmin","ymin","zmin","getColumn","axeY","axeZ","farthestVertex","add","size","len"],"sources":["../../../../src/tileset/helpers/zoom.ts"],"sourcesContent":["// loaders.gl, MIT license\n\nimport {Vector3} from '@math.gl/core';\nimport {BoundingSphere, OrientedBoundingBox} from '@math.gl/culling';\nimport {Ellipsoid} from '@math.gl/geospatial';\nimport {BoundingRectangle} from '../../types';\n\nconst WGS84_RADIUS_X = 6378137.0;\nconst WGS84_RADIUS_Y = 6378137.0;\nconst WGS84_RADIUS_Z = 6356752.3142451793;\n\nconst scratchVector = new Vector3();\n\n/**\n * Calculate appropriate zoom value for a particular boundingVolume\n * @param boundingVolume - the instance of bounding volume\n * @param cartorgraphicCenter - cartographic center of the bounding volume\n * @returns {number} - zoom value\n */\nexport function getZoomFromBoundingVolume(\n boundingVolume: BoundingSphere | OrientedBoundingBox | BoundingRectangle,\n cartorgraphicCenter: Vector3\n) {\n if (boundingVolume instanceof OrientedBoundingBox) {\n // OrientedBoundingBox\n const {halfAxes} = boundingVolume;\n const obbSize = getObbSize(halfAxes);\n // Use WGS84_RADIUS_Z to allign with BoundingSphere algorithm\n // Add the tile elevation value for correct zooming to elevated tiles\n return Math.log2(WGS84_RADIUS_Z / (obbSize + cartorgraphicCenter[2]));\n } else if (boundingVolume instanceof BoundingSphere) {\n // BoundingSphere\n const {radius} = boundingVolume;\n // Add the tile elevation value for correct zooming to elevated tiles\n return Math.log2(WGS84_RADIUS_Z / (radius + cartorgraphicCenter[2]));\n } else if (boundingVolume.width && boundingVolume.height) {\n // BoundingRectangle\n const {width, height} = boundingVolume;\n const zoomX = Math.log2(WGS84_RADIUS_X / width);\n const zoomY = Math.log2(WGS84_RADIUS_Y / height);\n\n return (zoomX + zoomY) / 2;\n }\n\n return 1;\n}\n\n/**\n * Calculate initial zoom for the tileset from 3D `fullExtent` defined in\n * the tileset metadata\n * @param fullExtent - 3D extent of the tileset\n * @param fullExtent.xmin - minimal longitude in decimal degrees\n * @param fullExtent.xmax - maximal longitude in decimal degrees\n * @param fullExtent.ymin - minimal latitude in decimal degrees\n * @param fullExtent.ymax - maximal latitude in decimal degrees\n * @param fullExtent.zmin - minimal elevation in meters\n * @param fullExtent.zmax - maximal elevation in meters\n * @param cartorgraphicCenter - tileset center in cartographic coordinate system\n * @param cartesianCenter - tileset center in cartesian coordinate system\n * @returns - initial zoom for the tileset\n */\nexport function getZoomFromFullExtent(\n fullExtent: {\n xmin: number;\n xmax: number;\n ymin: number;\n ymax: number;\n zmin: number;\n zmax: number;\n },\n cartorgraphicCenter: Vector3,\n cartesianCenter: Vector3\n) {\n const extentVertex = Ellipsoid.WGS84.cartographicToCartesian(\n [fullExtent.xmax, fullExtent.ymax, fullExtent.zmax],\n new Vector3()\n );\n const extentSize = Math.sqrt(\n Math.pow(extentVertex[0] - cartesianCenter[0], 2) +\n Math.pow(extentVertex[1] - cartesianCenter[1], 2) +\n Math.pow(extentVertex[2] - cartesianCenter[2], 2)\n );\n return Math.log2(WGS84_RADIUS_Z / (extentSize + cartorgraphicCenter[2]));\n}\n\n/**\n * Calculate initial zoom for the tileset from 2D `extent` defined in\n * the tileset metadata\n * @param extent - 2D extent of the tileset. It is array of 4 elements [xmin, ymin, xmax, ymax]\n * @param extent[0] - minimal longitude in decimal degrees\n * @param extent[1] - minimal latitude in decimal degrees\n * @param extent[2] - maximal longitude in decimal degrees\n * @param extent[3] - maximal latitude in decimal degrees\n * @param cartorgraphicCenter - tileset center in cartographic coordinate system\n * @param cartesianCenter - tileset center in cartesian coordinate system\n * @returns - initial zoom for the tileset\n */\nexport function getZoomFromExtent(\n extent: [number, number, number, number],\n cartorgraphicCenter: Vector3,\n cartesianCenter: Vector3\n) {\n const [xmin, ymin, xmax, ymax] = extent;\n return getZoomFromFullExtent(\n {xmin, xmax, ymin, ymax, zmin: 0, zmax: 0},\n cartorgraphicCenter,\n cartesianCenter\n );\n}\n\nfunction getObbSize(halfAxes) {\n halfAxes.getColumn(0, scratchVector);\n const axeY = halfAxes.getColumn(1);\n const axeZ = halfAxes.getColumn(2);\n const farthestVertex = scratchVector.add(axeY).add(axeZ);\n const size = farthestVertex.len();\n return size;\n}\n"],"mappings":";;;;;;;;AAEA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AAGA,MAAMG,cAAc,GAAG,SAAS;AAChC,MAAMC,cAAc,GAAG,SAAS;AAChC,MAAMC,cAAc,GAAG,kBAAkB;AAEzC,MAAMC,aAAa,GAAG,IAAIC,aAAO,CAAC,CAAC;AAQ5B,SAASC,yBAAyBA,CACvCC,cAAwE,EACxEC,mBAA4B,EAC5B;EACA,IAAID,cAAc,YAAYE,4BAAmB,EAAE;IAEjD,MAAM;MAACC;IAAQ,CAAC,GAAGH,cAAc;IACjC,MAAMI,OAAO,GAAGC,UAAU,CAACF,QAAQ,CAAC;IAGpC,OAAOG,IAAI,CAACC,IAAI,CAACX,cAAc,IAAIQ,OAAO,GAAGH,mBAAmB,CAAC,CAAC,CAAC,CAAC,CAAC;EACvE,CAAC,MAAM,IAAID,cAAc,YAAYQ,uBAAc,EAAE;IAEnD,MAAM;MAACC;IAAM,CAAC,GAAGT,cAAc;IAE/B,OAAOM,IAAI,CAACC,IAAI,CAACX,cAAc,IAAIa,MAAM,GAAGR,mBAAmB,CAAC,CAAC,CAAC,CAAC,CAAC;EACtE,CAAC,MAAM,IAAID,cAAc,CAACU,KAAK,IAAIV,cAAc,CAACW,MAAM,EAAE;IAExD,MAAM;MAACD,KAAK;MAAEC;IAAM,CAAC,GAAGX,cAAc;IACtC,MAAMY,KAAK,GAAGN,IAAI,CAACC,IAAI,CAACb,cAAc,GAAGgB,KAAK,CAAC;IAC/C,MAAMG,KAAK,GAAGP,IAAI,CAACC,IAAI,CAACZ,cAAc,GAAGgB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