import "./chunk-Q34L5KZA.js"; import { t as t2 } from "./chunk-54AOZV5X.js"; import "./chunk-PK35UGFJ.js"; import { me, ne } from "./chunk-FYNVVMWY.js"; import "./chunk-Q52DVFYK.js"; import "./chunk-HBMVUVZX.js"; import { o } from "./chunk-TNLRDNTC.js"; import "./chunk-WR32EHFC.js"; import { a } from "./chunk-WNCU6BFU.js"; import { y } from "./chunk-BJHM4JNS.js"; import "./chunk-F6A2QQ26.js"; import { n } from "./chunk-H2KDMZTR.js"; import "./chunk-7ZIDBK7B.js"; import { u } from "./chunk-N2663GRX.js"; import "./chunk-O4FY3ITT.js"; import "./chunk-ZOEK6QHJ.js"; import "./chunk-XNLG7T2T.js"; import "./chunk-IR4PV7VK.js"; import "./chunk-2Z6LERTI.js"; import "./chunk-OWVBLVP3.js"; import "./chunk-PDKDCAAD.js"; import "./chunk-ECW2QABR.js"; import "./chunk-GCDJLKH4.js"; import { k2 as k } from "./chunk-MRJEICT6.js"; import { e4 as e } from "./chunk-Y3WMVFTW.js"; import "./chunk-SAS7RONY.js"; import "./chunk-WSRBH7BF.js"; import "./chunk-IHXECKQQ.js"; import "./chunk-ULGDPLM2.js"; import "./chunk-EMJ4ZSM2.js"; import "./chunk-IKP3YN53.js"; import { t } from "./chunk-GZT4BVFP.js"; import "./chunk-A5ICIBVI.js"; // node_modules/@arcgis/core/layers/graphics/dehydratedFeatures.js var j = class { constructor(e3, t4, s3) { this.uid = e3, this.geometry = t4, this.attributes = s3, this.visible = true, this.objectId = null, this.centroid = null; } }; var N = class { constructor() { this.exceededTransferLimit = false, this.features = [], this.fields = [], this.hasM = false, this.hasZ = false, this.geometryType = null, this.objectIdFieldName = null, this.globalIdFieldName = null, this.geometryProperties = null, this.geohashFieldName = null, this.spatialReference = null, this.transform = null; } }; var P = a(); var U = u(); // node_modules/@arcgis/core/rest/query/operations/pbfDehydratedFeatureSet.js function u2(t4, e3) { return e3; } function p(t4, e3, r3, o3) { switch (r3) { case 0: return m2(t4, e3 + o3, 0); case 1: return t4.originPosition === "lowerLeft" ? m2(t4, e3 + o3, 1) : y2(t4, e3 + o3, 1); } } function d(t4, e3, r3, o3) { return r3 === 2 ? m2(t4, e3, 2) : p(t4, e3, r3, o3); } function c(t4, e3, r3, o3) { return r3 === 2 ? m2(t4, e3, 3) : p(t4, e3, r3, o3); } function f2(t4, e3, r3, o3) { return r3 === 3 ? m2(t4, e3, 3) : d(t4, e3, r3, o3); } function m2({ translate: t4, scale: e3 }, r3, o3) { return t4[o3] + r3 * e3[o3]; } function y2({ translate: t4, scale: e3 }, r3, o3) { return t4[o3] - r3 * e3[o3]; } var g = class { constructor(t4) { this.options = t4, this.geometryTypes = ["point", "multipoint", "polyline", "polygon"], this.previousCoordinate = [0, 0], this.transform = null, this.applyTransform = u2, this.lengths = [], this.currentLengthIndex = 0, this.toAddInCurrentPath = 0, this.vertexDimension = 0, this.coordinateBuffer = null, this.coordinateBufferPtr = 0, this._attributesConstructor = () => { }; } createFeatureResult() { return new N(); } finishFeatureResult(t4) { if (this.options.applyTransform && (t4.transform = null), this._attributesConstructor = () => { }, this.coordinateBuffer = null, this.lengths.length = 0, !t4.hasZ) return; const r3 = o(t4.geometryType, this.options.sourceSpatialReference, t4.spatialReference); if (!t(r3)) for (const e3 of t4.features) r3(e3.geometry); } createSpatialReference() { return new k(); } addField(t4, e3) { t4.fields.push(y.fromJSON(e3)); const r3 = t4.fields.map((t5) => t5.name); this._attributesConstructor = function() { for (const t5 of r3) this[t5] = null; }; } addFeature(t4, e3) { const r3 = this.options.maxStringAttributeLength ? this.options.maxStringAttributeLength : 0; if (r3 > 0) for (const o3 in e3.attributes) { const t5 = e3.attributes[o3]; typeof t5 == "string" && t5.length > r3 && (e3.attributes[o3] = ""); } t4.features.push(e3); } addQueryGeometry(t4, e3) { const { queryGeometry: r3, queryGeometryType: o3 } = e3, s3 = me(r3.clone(), r3, false, false, this.transform), i2 = ne(s3, o3, false, false); let n2 = null; switch (o3) { case "esriGeometryPoint": n2 = "point"; break; case "esriGeometryPolygon": n2 = "polygon"; break; case "esriGeometryPolyline": n2 = "polyline"; break; case "esriGeometryMultipoint": n2 = "multipoint"; } i2.type = n2, t4.queryGeometryType = o3, t4.queryGeometry = i2; } prepareFeatures(e3) { switch (this.transform = e3.transform, this.options.applyTransform && e3.transform && (this.applyTransform = this._deriveApplyTransform(e3)), this.vertexDimension = 2, e3.hasZ && this.vertexDimension++, e3.hasM && this.vertexDimension++, e3.geometryType) { case "point": this.addCoordinate = (t4, e4, r3) => this.addCoordinatePoint(t4, e4, r3), this.createGeometry = (t4) => this.createPointGeometry(t4); break; case "polygon": this.addCoordinate = (t4, e4, r3) => this._addCoordinatePolygon(t4, e4, r3), this.createGeometry = (t4) => this._createPolygonGeometry(t4); break; case "polyline": this.addCoordinate = (t4, e4, r3) => this._addCoordinatePolyline(t4, e4, r3), this.createGeometry = (t4) => this._createPolylineGeometry(t4); break; case "multipoint": this.addCoordinate = (t4, e4, r3) => this._addCoordinateMultipoint(t4, e4, r3), this.createGeometry = (t4) => this._createMultipointGeometry(t4); break; case "mesh": case "extent": break; default: n(e3.geometryType); } } createFeature() { return this.lengths.length = 0, this.currentLengthIndex = 0, this.previousCoordinate[0] = 0, this.previousCoordinate[1] = 0, new j(e(), null, new this._attributesConstructor()); } allocateCoordinates() { const t4 = this.lengths.reduce((t5, e3) => t5 + e3, 0); this.coordinateBuffer = new Float64Array(t4 * this.vertexDimension), this.coordinateBufferPtr = 0; } addLength(t4, e3, r3) { this.lengths.length === 0 && (this.toAddInCurrentPath = e3), this.lengths.push(e3); } createPointGeometry(t4) { const e3 = { type: "point", x: 0, y: 0, spatialReference: t4.spatialReference, hasZ: !!t4.hasZ, hasM: !!t4.hasM }; return e3.hasZ && (e3.z = 0), e3.hasM && (e3.m = 0), e3; } addCoordinatePoint(t4, e3, r3) { switch (e3 = this.applyTransform(this.transform, e3, r3, 0), r3) { case 0: t4.x = e3; break; case 1: t4.y = e3; break; case 2: t4.hasZ ? t4.z = e3 : t4.m = e3; break; case 3: t4.m = e3; } } _transformPathLikeValue(t4, e3) { let r3 = 0; return e3 <= 1 && (r3 = this.previousCoordinate[e3], this.previousCoordinate[e3] += t4), this.applyTransform(this.transform, t4, e3, r3); } _addCoordinatePolyline(t4, e3, r3) { this._dehydratedAddPointsCoordinate(t4.paths, e3, r3); } _addCoordinatePolygon(t4, e3, r3) { this._dehydratedAddPointsCoordinate(t4.rings, e3, r3); } _addCoordinateMultipoint(t4, e3, r3) { r3 === 0 && t4.points.push([]); const o3 = this._transformPathLikeValue(e3, r3); t4.points[t4.points.length - 1].push(o3); } _createPolygonGeometry(t4) { return { type: "polygon", rings: [[]], spatialReference: t4.spatialReference, hasZ: !!t4.hasZ, hasM: !!t4.hasM }; } _createPolylineGeometry(t4) { return { type: "polyline", paths: [[]], spatialReference: t4.spatialReference, hasZ: !!t4.hasZ, hasM: !!t4.hasM }; } _createMultipointGeometry(t4) { return { type: "multipoint", points: [], spatialReference: t4.spatialReference, hasZ: !!t4.hasZ, hasM: !!t4.hasM }; } _dehydratedAddPointsCoordinate(t4, e3, r3) { r3 === 0 && this.toAddInCurrentPath-- == 0 && (t4.push([]), this.toAddInCurrentPath = this.lengths[++this.currentLengthIndex] - 1, this.previousCoordinate[0] = 0, this.previousCoordinate[1] = 0); const o3 = this._transformPathLikeValue(e3, r3), s3 = t4[t4.length - 1]; r3 === 0 && s3.push(new Float64Array(this.coordinateBuffer.buffer, this.coordinateBufferPtr * Float64Array.BYTES_PER_ELEMENT, this.vertexDimension)), this.coordinateBuffer[this.coordinateBufferPtr++] = o3; } _deriveApplyTransform(t4) { const { hasZ: e3, hasM: r3 } = t4; return e3 && r3 ? f2 : e3 ? d : r3 ? c : p; } }; // node_modules/@arcgis/core/views/3d/support/PBFDecoderWorker.js var t3 = class { _parseFeatureQuery(t4) { const s3 = t2(t4.buffer, new g(t4.options)), o3 = { ...s3, spatialReference: s3.spatialReference.toJSON(), fields: s3.fields ? s3.fields.map((e3) => e3.toJSON()) : void 0 }; return Promise.resolve(o3); } }; function s2() { return new t3(); } export { s2 as default }; //# sourceMappingURL=PBFDecoderWorker-SIUZSYGK.js.map