import { a as a3, h, x } from "./chunk-H3QCF24A.js"; import { a as a2 } from "./chunk-YJKEIUMW.js"; import { I } from "./chunk-23ONSYIH.js"; import { e } from "./chunk-FIYKFRB2.js"; import { i, s } from "./chunk-CRGVDJI6.js"; import { a } from "./chunk-GZT4BVFP.js"; // node_modules/@arcgis/core/views/2d/engine/webgl/TiledDisplayObject.js var r = class extends a2 { constructor(t, s2, i3, r2, h2, o2 = r2, n = h2) { super(), this.triangleCountReportedInDebug = 0, this.triangleCount = 0, this.texture = null, this.key = new e(t), this.x = s2, this.y = i3, this.width = r2, this.height = h2, this.rangeX = o2, this.rangeY = n; } destroy() { this.texture && (this.texture.dispose(), this.texture = null); } setTransform(i3, e2) { const r2 = e2 / (i3.resolution * i3.pixelRatio), h2 = this.transforms.tileMat3, [o2, n] = i3.toScreenNoRotation([0, 0], [this.x, this.y]), a4 = this.width / this.rangeX * r2, l = this.height / this.rangeY * r2; s(h2, a4, 0, 0, 0, l, 0, o2, n, 1), i(this.transforms.dvs, i3.displayViewMat3, h2); } }; // node_modules/@arcgis/core/views/2d/engine/webgl/TileContainer.js var i2 = (e2, r2) => e2.key.level - r2.key.level != 0 ? e2.key.level - r2.key.level : e2.key.row - r2.key.row != 0 ? e2.key.row - r2.key.row : e2.key.col - r2.key.col; var o = class extends a3 { constructor(e2) { super(), this._tileInfoView = e2; } get requiresDedicatedFBO() { return false; } renderChildren(e2) { this.sortChildren(i2), this.setStencilReference(e2), super.renderChildren(e2); } createRenderParams(e2) { const { state: r2 } = e2, s2 = super.createRenderParams(e2); return s2.requiredLevel = this._tileInfoView.getClosestInfoForScale(r2.scale).level, s2.displayLevel = this._tileInfoView.tileInfo.scaleToZoom(r2.scale), s2; } prepareRenderPasses(s2) { const i3 = super.prepareRenderPasses(s2); return i3.push(s2.registerRenderPass({ name: "stencil", brushes: [h], drawPhase: I.DEBUG | I.MAP | I.HIGHLIGHT, target: () => this.getStencilTarget() })), a("esri-tiles-debug") && i3.push(s2.registerRenderPass({ name: "tileInfo", brushes: [x], drawPhase: I.DEBUG, target: () => this.children })), i3; } getStencilTarget() { return this.children; } updateTransforms(e2) { for (const r2 of this.children) { const s2 = this._tileInfoView.getTileResolution(r2.key); r2.setTransform(e2, s2); } } setStencilReference(e2) { let r2 = 1; for (const s2 of this.children) s2.stencilRef = r2++; } }; export { r, o }; //# sourceMappingURL=chunk-6G6XHVK2.js.map