123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581 |
- import {
- n as n3
- } from "./chunk-2L6YYKXA.js";
- import {
- oe
- } from "./chunk-DTSCAH2R.js";
- import "./chunk-B5WNDDCF.js";
- import {
- a as a2,
- s as s5
- } from "./chunk-CFZGXSAO.js";
- import "./chunk-DXEPL3XQ.js";
- import "./chunk-E5TKVDJT.js";
- import "./chunk-XYIYXU3I.js";
- import "./chunk-T6DJ6UAT.js";
- import "./chunk-WOGDHLUJ.js";
- import {
- v as v4
- } from "./chunk-NAWSWIYX.js";
- import {
- a as a3
- } from "./chunk-BFF4N4R7.js";
- import "./chunk-O6KMIRUU.js";
- import "./chunk-264YGWEE.js";
- import {
- i as i7
- } from "./chunk-YG7DNOY4.js";
- import {
- u,
- y as y3
- } from "./chunk-KUAEOLV3.js";
- import "./chunk-ZLQP3WDC.js";
- import "./chunk-JBMHQ5RK.js";
- import "./chunk-WBWQJQK4.js";
- import {
- d,
- s as s4
- } from "./chunk-TE2TRGVU.js";
- import "./chunk-A22ACVMF.js";
- import "./chunk-TDS6IBMU.js";
- import "./chunk-DBT4KOKX.js";
- import "./chunk-2GP5D74I.js";
- import "./chunk-ZELEU5PN.js";
- import "./chunk-O7E4VYJT.js";
- import "./chunk-AIG57VB7.js";
- import "./chunk-PHAKVYRM.js";
- import "./chunk-IDINBHDV.js";
- import "./chunk-6LE4RPMZ.js";
- import "./chunk-67RFR4NT.js";
- import "./chunk-WPDBODJM.js";
- import "./chunk-5IVP3KUS.js";
- import "./chunk-JXYBFGFY.js";
- import "./chunk-EPMXCACW.js";
- import "./chunk-UCPKJYXN.js";
- import "./chunk-KFLNKWNF.js";
- import "./chunk-R24MO4IV.js";
- import "./chunk-YQBYWPBD.js";
- import "./chunk-UWKVAZQ6.js";
- import "./chunk-XBFCIW4K.js";
- import "./chunk-T2SKWJGU.js";
- import "./chunk-UO3LS2M5.js";
- import "./chunk-H2VOWDMO.js";
- import "./chunk-QISOH77W.js";
- import "./chunk-4HL6BBWO.js";
- import "./chunk-KUO7OCMN.js";
- import "./chunk-XO5VJRK4.js";
- import "./chunk-ST53DRNI.js";
- import "./chunk-3WXSWAUV.js";
- import "./chunk-27YO3FKC.js";
- import "./chunk-EQNT4A7P.js";
- import "./chunk-4OM3EX6P.js";
- import "./chunk-3OFVLRSL.js";
- import "./chunk-DMVKVC5I.js";
- import "./chunk-VEJPYAE4.js";
- import "./chunk-UMUHMVL4.js";
- import "./chunk-FZSI6IGI.js";
- import "./chunk-YFDOPEEZ.js";
- import {
- i as i6
- } from "./chunk-BVA3U6FJ.js";
- import "./chunk-IQBIGNPU.js";
- import "./chunk-K7B6OWCU.js";
- import "./chunk-LXOC7SMQ.js";
- import "./chunk-QU433TMZ.js";
- import "./chunk-L5DZVCCW.js";
- import "./chunk-WNPL3C7R.js";
- import "./chunk-E7ZLMIQ7.js";
- import "./chunk-JEA4MMTV.js";
- import "./chunk-RG3AHHRL.js";
- import "./chunk-XHRNCFJT.js";
- import "./chunk-UDYHZLTE.js";
- import "./chunk-QC7NCR5N.js";
- import "./chunk-VQXMCZYH.js";
- import "./chunk-JQUWFKNU.js";
- import "./chunk-RWQH5X3O.js";
- import "./chunk-6334AFGG.js";
- import "./chunk-CC74Y7ET.js";
- import "./chunk-TFHLTN6F.js";
- import "./chunk-O3JQY77G.js";
- import "./chunk-E3G7BRZB.js";
- import "./chunk-JKFWEHNK.js";
- import "./chunk-IIAN3QNN.js";
- import "./chunk-P24XEEHY.js";
- import {
- v as v3
- } from "./chunk-WOXHUQGM.js";
- import {
- f,
- i as i2,
- s as s3
- } from "./chunk-FMPQIGFA.js";
- import "./chunk-EDHROVWI.js";
- import "./chunk-3IRT3YKJ.js";
- import "./chunk-SAJAEMIJ.js";
- import {
- c as c2
- } from "./chunk-PT5TF6KZ.js";
- import {
- n as n2
- } from "./chunk-OFTOCPN5.js";
- import {
- i as i4,
- r as r4
- } from "./chunk-3YTO5A3F.js";
- import {
- i as i5
- } from "./chunk-XO7O5UZJ.js";
- import {
- t as t3
- } from "./chunk-TU7WVKU4.js";
- import "./chunk-JAUFBT5U.js";
- import "./chunk-ZOO4I2U4.js";
- import "./chunk-HZ2WKB3G.js";
- import "./chunk-3HCJD762.js";
- import "./chunk-RVCE264D.js";
- import "./chunk-HKJ7X3BD.js";
- import "./chunk-Y74D3LKQ.js";
- import "./chunk-PK4W65H4.js";
- import {
- g
- } from "./chunk-7C23ILQ4.js";
- import "./chunk-P6VVVEX6.js";
- import {
- y as y2
- } from "./chunk-3Z755LKF.js";
- import "./chunk-LTZ5XXDV.js";
- import "./chunk-IEU3AM37.js";
- import "./chunk-DLMAGHHC.js";
- import "./chunk-JOYXMSKE.js";
- import "./chunk-YZVAB3DF.js";
- import "./chunk-JLYTER4T.js";
- import "./chunk-CRHRHOXH.js";
- import "./chunk-ZSW35JPD.js";
- import "./chunk-JLSNMUQJ.js";
- import "./chunk-ECY35CJI.js";
- import "./chunk-PT62335L.js";
- import "./chunk-PJNBFKPF.js";
- import "./chunk-C7742RNZ.js";
- import "./chunk-FNA5GLRW.js";
- import "./chunk-MCWCB5IY.js";
- import "./chunk-TV3CFJQR.js";
- import {
- a,
- l as l2
- } from "./chunk-TJV6ODRM.js";
- import "./chunk-YLEVJ6UV.js";
- import "./chunk-U2WD23Z5.js";
- import {
- g as g2
- } from "./chunk-GLSWDDR3.js";
- import "./chunk-DUEMJ5XS.js";
- import {
- T
- } from "./chunk-VRLXUHP2.js";
- import "./chunk-3LVSQLWJ.js";
- import "./chunk-4ONPMX2F.js";
- import "./chunk-CRGY2SDS.js";
- import {
- i as i3
- } from "./chunk-4T5ZGMEN.js";
- import "./chunk-3WQOA5CB.js";
- import "./chunk-FZQZIM7U.js";
- import "./chunk-CZBRZ6SU.js";
- import "./chunk-VGWC3IKZ.js";
- import "./chunk-2H5MD622.js";
- import {
- $
- } from "./chunk-3RSFVUKZ.js";
- import "./chunk-UVVU4UUO.js";
- import "./chunk-O6VYMEIX.js";
- import "./chunk-X4SA4ELJ.js";
- import "./chunk-5N7JLUJJ.js";
- import "./chunk-ZAY3CMAZ.js";
- import "./chunk-P3XKUGLS.js";
- import "./chunk-LU5IJZB4.js";
- import "./chunk-7IBV2TRE.js";
- import "./chunk-ZLNEXZAN.js";
- import "./chunk-5UVJ64RB.js";
- import "./chunk-SFEFRQCL.js";
- import "./chunk-3GZSQU56.js";
- import "./chunk-ZYRIJWLX.js";
- import "./chunk-RYY6632W.js";
- import "./chunk-DW42UVIT.js";
- import "./chunk-YAEIHDJH.js";
- import "./chunk-TJNOJH33.js";
- import "./chunk-OSHI574D.js";
- import {
- i
- } from "./chunk-ETGAZ7LF.js";
- import {
- t as t2
- } from "./chunk-75U5LM2V.js";
- import {
- c,
- v as v2
- } from "./chunk-RMDDCMKS.js";
- import "./chunk-VCH45Q2I.js";
- import {
- j as j2
- } from "./chunk-LBW34VZ2.js";
- import "./chunk-GSSTTHIT.js";
- import "./chunk-YFSLJIO4.js";
- import "./chunk-IM3LVQXV.js";
- import "./chunk-55RWC67C.js";
- import "./chunk-HZRKBTHJ.js";
- import {
- U
- } from "./chunk-DVUG3KID.js";
- import "./chunk-FWSQEIAR.js";
- import "./chunk-VEGAOVMY.js";
- import {
- o,
- w2 as w
- } from "./chunk-6T6G6LCQ.js";
- import "./chunk-YEJL5NEF.js";
- import {
- k2 as k,
- r as r3
- } from "./chunk-PQFTYGF5.js";
- import {
- e,
- l3 as l,
- n5 as n,
- y3 as y
- } from "./chunk-2Z2TG5CU.js";
- import "./chunk-6KZ2LTDA.js";
- import "./chunk-U2XHEJM7.js";
- import {
- r as r2,
- v
- } from "./chunk-SQOPWYIT.js";
- import {
- E,
- j,
- x
- } from "./chunk-V6P2MAQQ.js";
- import {
- s2 as s,
- s3 as s2
- } from "./chunk-E5O6P5I2.js";
- import {
- has
- } from "./chunk-SPWQ3AWG.js";
- import "./chunk-2TIUKVZN.js";
- import {
- r,
- t
- } from "./chunk-YXWMMD76.js";
- import "./chunk-S5KM4IGW.js";
- // node_modules/@arcgis/core/rest/operations/identify.js
- var o2 = (e2) => e2.spatialReference.wkid || JSON.stringify(e2.spatialReference);
- function l3(r5, i8) {
- const { dpi: n4, gdbVersion: s6, geometry: l4, geometryPrecision: f5, height: p2, layerOption: m4, mapExtent: y5, maxAllowableOffset: c3, returnFieldName: u3, returnGeometry: d2, returnUnformattedValues: g3, returnZ: x2, spatialReference: b, timeExtent: h, tolerance: E2, width: O } = r5.toJSON(), { dynamicLayers: S, layerDefs: j3, layerIds: N } = a4(r5), J = i8 && r(i8.geometry) ? i8.geometry : null, R = { geometryPrecision: f5, maxAllowableOffset: c3, returnFieldName: u3, returnGeometry: d2, returnUnformattedValues: g3, returnZ: x2, tolerance: E2 }, $2 = J && J.toJSON() || l4;
- if (R.imageDisplay = `${O},${p2},${n4}`, s6 && (R.gdbVersion = s6), $2 && (delete $2.spatialReference, R.geometry = JSON.stringify($2), R.geometryType = c($2)), b ? R.sr = b.wkid || JSON.stringify(b) : $2 && $2.spatialReference ? R.sr = o2($2) : y5 && y5.spatialReference && (R.sr = o2(y5)), R.time = h ? [h.start, h.end].join(",") : null, y5) {
- const { xmin: e2, ymin: r6, xmax: t4, ymax: i9 } = y5;
- R.mapExtent = `${e2},${r6},${t4},${i9}`;
- }
- return j3 && (R.layerDefs = j3), S && !j3 && (R.dynamicLayers = S), R.layers = "popup" === m4 ? "visible" : m4, N && !S && (R.layers += `:${N.join(",")}`), R;
- }
- function a4(r5) {
- var _a, _b;
- const { mapExtent: t4, floors: o3, width: l4, sublayers: a7, layerIds: p2, layerOption: m4, gdbVersion: y5 } = r5, c3 = (_b = (_a = a7 == null ? void 0 : a7.find((e2) => null != e2.layer)) == null ? void 0 : _a.layer) == null ? void 0 : _b.serviceSublayers, u3 = "popup" === m4, d2 = {}, g3 = i4({ extent: t4, width: l4, spatialReference: t4 == null ? void 0 : t4.spatialReference }), x2 = [], b = (e2) => {
- const r6 = 0 === g3, t5 = 0 === e2.minScale || g3 <= e2.minScale, i8 = 0 === e2.maxScale || g3 >= e2.maxScale;
- if (e2.visible && (r6 || t5 && i8))
- if (e2.sublayers)
- e2.sublayers.forEach(b);
- else {
- if (false === (p2 == null ? void 0 : p2.includes(e2.id)) || u3 && (!e2.popupTemplate || !e2.popupEnabled))
- return;
- x2.unshift(e2);
- }
- };
- if (a7 == null ? void 0 : a7.forEach(b), a7 && !x2.length)
- d2.layerIds = [];
- else {
- const r6 = i5(x2, c3, y5), t5 = x2.map((e2) => {
- const r7 = n2(o3, e2);
- return e2.toExportImageJSON(r7);
- });
- if (r6)
- d2.dynamicLayers = JSON.stringify(t5);
- else {
- if (a7) {
- let e2 = x2.map(({ id: e3 }) => e3);
- p2 && (e2 = e2.filter((e3) => p2.includes(e3))), d2.layerIds = e2;
- } else
- (p2 == null ? void 0 : p2.length) && (d2.layerIds = p2);
- const r7 = f2(o3, x2);
- if (r(r7) && r7.length) {
- const e2 = {};
- for (const t6 of r7)
- t6.definitionExpression && (e2[t6.id] = t6.definitionExpression);
- Object.keys(e2).length && (d2.layerDefs = JSON.stringify(e2));
- }
- }
- }
- return d2;
- }
- function f2(e2, t4) {
- const i8 = !!(e2 == null ? void 0 : e2.length), s6 = t4.filter((e3) => null != e3.definitionExpression || i8 && null != e3.floorInfo);
- return s6.length ? s6.map((t5) => {
- const i9 = n2(e2, t5), s7 = t3(i9, t5.definitionExpression);
- return { id: t5.id, definitionExpression: s7 };
- }) : null;
- }
- // node_modules/@arcgis/core/rest/support/IdentifyParameters.js
- var m;
- var a5 = m = class extends l {
- constructor(t4) {
- super(t4), this.dpi = 96, this.floors = null, this.gdbVersion = null, this.geometry = null, this.geometryPrecision = null, this.height = 400, this.layerIds = null, this.layerOption = "top", this.mapExtent = null, this.maxAllowableOffset = null, this.returnFieldName = true, this.returnGeometry = false, this.returnM = false, this.returnUnformattedValues = true, this.returnZ = false, this.spatialReference = null, this.sublayers = null, this.timeExtent = null, this.tolerance = null, this.width = 400;
- }
- static from(t4) {
- return v(m, t4);
- }
- };
- e([y({ type: Number, json: { write: true } })], a5.prototype, "dpi", void 0), e([y()], a5.prototype, "floors", void 0), e([y({ type: String, json: { write: true } })], a5.prototype, "gdbVersion", void 0), e([y({ types: i, json: { read: v2, write: true } })], a5.prototype, "geometry", void 0), e([y({ type: Number, json: { write: true } })], a5.prototype, "geometryPrecision", void 0), e([y({ type: Number, json: { write: true } })], a5.prototype, "height", void 0), e([y({ type: [Number], json: { write: true } })], a5.prototype, "layerIds", void 0), e([y({ type: ["top", "visible", "all", "popup"], json: { write: true } })], a5.prototype, "layerOption", void 0), e([y({ type: w, json: { write: true } })], a5.prototype, "mapExtent", void 0), e([y({ type: Number, json: { write: true } })], a5.prototype, "maxAllowableOffset", void 0), e([y({ type: Boolean, json: { write: true } })], a5.prototype, "returnFieldName", void 0), e([y({ type: Boolean, json: { write: true } })], a5.prototype, "returnGeometry", void 0), e([y({ type: Boolean, json: { write: true } })], a5.prototype, "returnM", void 0), e([y({ type: Boolean, json: { write: true } })], a5.prototype, "returnUnformattedValues", void 0), e([y({ type: Boolean, json: { write: true } })], a5.prototype, "returnZ", void 0), e([y({ type: k, json: { write: true } })], a5.prototype, "spatialReference", void 0), e([y()], a5.prototype, "sublayers", void 0), e([y({ type: T, json: { write: true } })], a5.prototype, "timeExtent", void 0), e([y({ type: Number, json: { write: true } })], a5.prototype, "tolerance", void 0), e([y({ type: Number, json: { write: true } })], a5.prototype, "width", void 0), a5 = m = e([n("esri.rest.support.IdentifyParameters")], a5);
- var u2 = a5;
- // node_modules/@arcgis/core/rest/support/IdentifyResult.js
- var m2 = class extends l {
- constructor(r5) {
- super(r5), this.displayFieldName = null, this.feature = null, this.layerId = null, this.layerName = null;
- }
- readFeature(r5, t4) {
- return g.fromJSON({ attributes: { ...t4.attributes }, geometry: { ...t4.geometry } });
- }
- writeFeature(r5, e2) {
- if (!r5)
- return;
- const { attributes: t4, geometry: s6 } = r5;
- t4 && (e2.attributes = { ...t4 }), r(s6) && (e2.geometry = s6.toJSON(), e2.geometryType = t2.toJSON(s6.type));
- }
- };
- e([y({ type: String, json: { write: true } })], m2.prototype, "displayFieldName", void 0), e([y({ type: g })], m2.prototype, "feature", void 0), e([o("feature", ["attributes", "geometry"])], m2.prototype, "readFeature", null), e([r3("feature")], m2.prototype, "writeFeature", null), e([y({ type: Number, json: { write: true } })], m2.prototype, "layerId", void 0), e([y({ type: String, json: { write: true } })], m2.prototype, "layerName", void 0), m2 = e([n("esri.rest.support.IdentifyResult")], m2);
- var y4 = m2;
- // node_modules/@arcgis/core/rest/identify.js
- async function f3(u3, i8, f5) {
- const c3 = (i8 = a6(i8)).geometry ? [i8.geometry] : [], l4 = f(u3);
- return l4.path += "/identify", v3(c3).then((e2) => {
- const t4 = l3(i8, { geometry: e2 && e2[0] }), u4 = s3({ ...l4.query, f: "json", ...t4 }), a7 = i2(u4, f5);
- return U(l4.path, a7).then(m3).then((r5) => p(r5, i8.sublayers));
- });
- }
- function m3(r5) {
- const e2 = r5.data;
- return e2.results = e2.results || [], e2.exceededTransferLimit = Boolean(e2.exceededTransferLimit), e2.results = e2.results.map((r6) => y4.fromJSON(r6)), e2;
- }
- function a6(r5) {
- return r5 = u2.from(r5);
- }
- function p(r5, e2) {
- if (!(e2 == null ? void 0 : e2.length))
- return r5;
- const t4 = /* @__PURE__ */ new Map();
- function o3(r6) {
- t4.set(r6.id, r6), r6.sublayers && r6.sublayers.forEach(o3);
- }
- e2.forEach(o3);
- for (const s6 of r5.results)
- s6.feature.sourceLayer = t4.get(s6.layerId);
- return r5;
- }
- // node_modules/@arcgis/core/views/layers/MapImageLayerView.js
- var _ = null;
- var F = (F2) => {
- let I = class extends F2 {
- constructor() {
- super(...arguments), this._featuresResolutions = /* @__PURE__ */ new WeakMap(), this.highlightGraphics = new i6(), this.updateHighlightedFeatures = x(async (e2) => {
- this.destroyed || this.updatingHandles.addPromise(this._updateHighlightedFeaturesGeometries(e2).catch(() => {
- }));
- });
- }
- initialize() {
- this.exportImageParameters = new c2({ layer: this.layer }), this.handles.add([a(() => this.highlightGraphics, "change", (e2) => {
- this.updatingHandles.addPromise(this._updateHighlightedFeaturesSymbols(e2.added).catch(() => {
- })), this.updateHighlightedFeatures(this._highlightGeometriesResolution);
- })]);
- }
- destroy() {
- this.exportImageParameters.destroy(), this.exportImageParameters = null;
- }
- get exportImageVersion() {
- var _a;
- return (_a = this.exportImageParameters) == null ? void 0 : _a.commitProperty("version"), this.commitProperty("timeExtent"), (this._get("exportImageVersion") || 0) + 1;
- }
- async fetchPopupFeatures(e2, r5) {
- var _a, _b, _c, _d, _e, _f;
- const { layer: s6 } = this;
- if (!e2)
- throw new s2("mapimagelayer:fetchPopupFeatures", "Nothing to fetch without area", { layer: s6 });
- const i8 = (_c = (_b = (_a = this.layer.capabilities) == null ? void 0 : _a.operations) == null ? void 0 : _b.supportsQuery) != null ? _c : true;
- if (!(((_f = (_e = (_d = this.layer.capabilities) == null ? void 0 : _d.operations) == null ? void 0 : _e.supportsIdentify) != null ? _f : true) && this.layer.version >= 10.5) && !i8)
- throw new s2("mapimagelayer:fetchPopupFeatures-not-supported", "query operation is disabled for this service", { layer: s6 });
- return i8 ? this._fetchPopupFeaturesUsingQueries(e2, r5) : this._fetchPopupFeaturesUsingIdentify(e2, r5);
- }
- canResume() {
- var _a;
- return !!super.canResume() && !((_a = this.timeExtent) == null ? void 0 : _a.isEmpty);
- }
- async _updateHighlightedFeaturesSymbols(e2) {
- for (const t4 of e2) {
- const e3 = "renderer" in t4.sourceLayer && t4.sourceLayer.renderer;
- "geometryType" in t4.sourceLayer && "point" === t4.sourceLayer.geometryType && e3 && "getSymbolAsync" in e3 && e3.getSymbolAsync(t4).then(async (r5) => {
- var _a;
- let s6 = "width" in r5 && "height" in r5 && null != r5.width && null != r5.height ? Math.max(r5.width, r5.height) : "size" in r5 ? r5.size : null;
- const i8 = "visualVariables" in e3 && ((_a = e3.visualVariables) == null ? void 0 : _a.find((e4) => "size" === e4.type));
- i8 && (_ || (_ = (await import("./visualVariableUtils-2VHWG6DH.js")).getSize), s6 = _(i8, t4, { view: this.view.type, scale: this.view.scale, shape: "simple-marker" === r5.type ? r5.style : null })), this.highlightGraphics.includes(t4) && (t4.symbol = new y2({ style: "square", size: s6, xoffset: "xoffset" in r5 ? r5.xoffset : 0, yoffset: "yoffset" in r5 ? r5.yoffset : 0 }), t4.visible = true, this.highlightGraphicUpdated(t4, "symbol"));
- });
- }
- }
- async _updateHighlightedFeaturesGeometries(e2) {
- this._highlightGeometriesResolution = e2;
- const t4 = this.highlightGraphics;
- if (!t4.length || !this.layer.capabilities.operations.supportsQuery)
- return;
- const s6 = this._getTargetResolution(e2), i8 = /* @__PURE__ */ new Map();
- for (const n4 of t4)
- if (!this._featuresResolutions.has(n4) || this._featuresResolutions.get(n4) > s6) {
- const e3 = n4.sourceLayer;
- r2(i8, e3, () => /* @__PURE__ */ new Map()).set(n4.getObjectId(), n4);
- }
- const o3 = Array.from(i8, ([e3, t5]) => {
- const r5 = e3.createQuery();
- return r5.objectIds = [...t5.keys()], r5.outFields = [e3.objectIdField], r5.returnGeometry = true, r5.maxAllowableOffset = s6, r5.outSpatialReference = this.view.spatialReference, e3.queryFeatures(r5);
- }), a7 = await Promise.all(o3);
- if (!this.destroyed)
- for (const { features: r5 } of a7)
- for (const e3 of r5) {
- const t5 = e3.sourceLayer, r6 = i8.get(t5).get(e3.getObjectId());
- r6 && this.highlightGraphics.includes(r6) && (r6.geometry = e3.geometry, this.highlightGraphicUpdated(r6, "geometry"), this._featuresResolutions.set(r6, s6));
- }
- }
- _getTargetResolution(e2) {
- const t4 = e2 * $(this.view.spatialReference), r5 = t4 / 16;
- return r5 <= 10 ? 0 : e2 / t4 * r5;
- }
- async _fetchPopupFeaturesUsingIdentify(e2, t4) {
- const r5 = await this._createIdentifyParameters(e2, t4);
- if (t(r5))
- return [];
- const { results: i8 } = await f3(this.layer.parsedUrl, r5);
- return i8.map((e3) => e3.feature);
- }
- async _createIdentifyParameters(e2, t4) {
- const { floors: r5, spatialReference: s6, scale: o3 } = this.view, a7 = r(t4) ? t4.event : null, n4 = await this._collectPopupProviders(this.layer.sublayers, o3, t4);
- if (!n4.length)
- return null;
- await Promise.all(n4.map(({ sublayer: e3 }) => e3.load().catch(() => {
- })));
- const l4 = Math.min(has("mapimagelayer-popup-identify-max-tolerance"), this.layer.allSublayers.reduce((e3, t5) => t5.renderer ? s5({ renderer: t5.renderer, event: a7 }) : e3, 2)), p2 = this.createFetchPopupFeaturesQueryGeometry(e2, l4), u3 = r4(o3, s6), m4 = Math.round(p2.width / u3), y5 = new w({ xmin: p2.center.x - u3 * m4, ymin: p2.center.y - u3 * m4, xmax: p2.center.x + u3 * m4, ymax: p2.center.y + u3 * m4, spatialReference: p2.spatialReference });
- return new u2({ floors: r5, gdbVersion: this.layer.gdbVersion, geometry: e2, height: m4, layerOption: "popup", mapExtent: y5, returnGeometry: true, spatialReference: s6, sublayers: this.layer.sublayers, timeExtent: this.timeExtent, tolerance: l4, width: m4 });
- }
- async _fetchPopupFeaturesUsingQueries(e2, t4) {
- const r5 = await this._collectPopupProviders(this.layer.sublayers, this.view.scale, t4), s6 = r(t4) ? t4.event : null, o3 = r5.map(async ({ sublayer: t5, popupTemplate: r6 }) => {
- var _a, _b;
- await t5.load().catch(() => {
- });
- const o4 = t5.createQuery(), a7 = s5({ renderer: t5.renderer, event: s6 }), n4 = this.createFetchPopupFeaturesQueryGeometry(e2, a7);
- if (o4.geometry = n4, o4.outFields = await d(t5, r6), o4.timeExtent = this.timeExtent, "floors" in this.view) {
- const e3 = (_b = (_a = this.view) == null ? void 0 : _a.floors) == null ? void 0 : _b.clone(), r7 = n2(e3, t5);
- r(r7) && (o4.where = o4.where ? `(${o4.where}) AND (${r7})` : r7);
- }
- const l4 = this._getTargetResolution(n4.width / a7), p2 = await this._loadArcadeModules(r6), u3 = "point" === t5.geometryType || p2 && p2.arcadeUtils.hasGeometryOperations(r6);
- u3 || (o4.maxAllowableOffset = l4);
- const { features: h } = await t5.queryFeatures(o4), c3 = u3 ? 0 : l4;
- for (const e3 of h)
- this._featuresResolutions.set(e3, c3);
- return h;
- });
- return (await E(o3)).reverse().reduce((e3, t5) => t5.value ? [...e3, ...t5.value] : e3, []).filter((e3) => null != e3);
- }
- async _collectPopupProviders(e2, t4, r5) {
- const s6 = [], o3 = async (e3) => {
- const a8 = 0 === e3.minScale || t4 <= e3.minScale, n4 = 0 === e3.maxScale || t4 >= e3.maxScale;
- if (e3.visible && a8 && n4) {
- if (e3.sublayers)
- e3.sublayers.forEach(o3);
- else if (e3.popupEnabled) {
- const t5 = s4(e3, { ...r5, defaultPopupTemplateEnabled: false });
- r(t5) && s6.unshift({ sublayer: e3, popupTemplate: t5 });
- }
- }
- }, a7 = e2.toArray().reverse().map(o3);
- return await Promise.all(a7), s6;
- }
- _loadArcadeModules(e2) {
- var _a;
- if (((_a = e2.expressionInfos) == null ? void 0 : _a.length) || Array.isArray(e2.content) && e2.content.some((e3) => "expression" === e3.type))
- return i3();
- }
- };
- return e([y()], I.prototype, "highlightGraphics", void 0), e([y()], I.prototype, "exportImageParameters", void 0), e([y({ readOnly: true })], I.prototype, "exportImageVersion", null), e([y()], I.prototype, "layer", void 0), e([y()], I.prototype, "suspended", void 0), e([y(g2)], I.prototype, "timeExtent", void 0), I = e([n("esri.views.layers.MapImageLayerView")], I), I;
- };
- // node_modules/@arcgis/core/views/2d/layers/MapImageLayerView2D.js
- var f4 = class extends F(i7(y3(u))) {
- update(e2) {
- this.strategy.update(e2).catch((e3) => {
- j(e3) || s.getLogger(this.declaredClass).error(e3);
- }), e2.stationary && this.updateHighlightedFeatures(e2.state.resolution), this._highlightView.processUpdate(e2);
- }
- attach() {
- const { imageMaxWidth: e2, imageMaxHeight: t4, version: i8 } = this.layer, r5 = i8 >= 10.3, s6 = i8 >= 10;
- this._bitmapContainer = new a3(), this.container.addChild(this._bitmapContainer), this._highlightView = new oe({ view: this.view, graphics: this.highlightGraphics, requestUpdateCallback: () => this.requestUpdate(), container: new n3(this.view.featuresTilingScheme) }), this.container.addChild(this._highlightView.container), this.strategy = new v4({ container: this._bitmapContainer, fetchSource: this.fetchImageBitmap.bind(this), requestUpdate: this.requestUpdate.bind(this), imageMaxWidth: e2, imageMaxHeight: t4, imageRotationSupported: r5, imageNormalizationSupported: s6, hidpi: true }), this.handles.add(l2(() => this.exportImageVersion, () => this.requestUpdate()), "exportImageVersion"), this.handles.add(l2(() => {
- var _a;
- return (_a = this.view) == null ? void 0 : _a.floors;
- }, () => this.requestUpdate()), "view.floors"), this.requestUpdate();
- }
- detach() {
- this.handles.remove("exportImageVersion"), this.handles.remove("view.floors"), this.strategy.destroy(), this.container.removeAllChildren(), this._bitmapContainer.removeAllChildren(), this._highlightView.destroy();
- }
- moveStart() {
- }
- viewChange() {
- }
- moveEnd() {
- this.requestUpdate();
- }
- highlight(e2) {
- let r5 = null;
- if (e2 instanceof g ? r5 = [e2] : j2.isCollection(e2) && e2.length > 0 ? r5 = e2.toArray() : Array.isArray(e2) && e2.length > 0 && (r5 = e2), r5 = r5 == null ? void 0 : r5.filter(Boolean), !r5 || !r5.length)
- return { remove: () => {
- } };
- for (const t4 of r5)
- "geometryType" in t4.sourceLayer && "point" === t4.sourceLayer.geometryType && (t4.visible = false);
- return this.highlightGraphics.addMany(r5), { remove: () => {
- this.highlightGraphics.removeMany(r5);
- } };
- }
- supportsSpatialReference(e2) {
- return this.layer.serviceSupportsSpatialReference(e2);
- }
- createFetchPopupFeaturesQueryGeometry(e2, t4) {
- return a2(e2, t4, this.view);
- }
- async doRefresh() {
- this.requestUpdate();
- }
- isUpdating() {
- return this.strategy.updating || this.updateRequested;
- }
- highlightGraphicUpdated(e2, t4) {
- this._highlightView.graphicUpdateHandler({ graphic: e2, property: t4 });
- }
- fetchImage(e2, t4, i8, r5) {
- return this.layer.fetchImage(e2, t4, i8, { timeExtent: this.timeExtent, floors: this.view.floors, ...r5 });
- }
- fetchImageBitmap(e2, t4, i8, r5) {
- return this.layer.fetchImageBitmap(e2, t4, i8, { timeExtent: this.timeExtent, floors: this.view.floors, ...r5 });
- }
- };
- e([y()], f4.prototype, "strategy", void 0), e([y()], f4.prototype, "updating", void 0), f4 = e([n("esri.views.2d.layers.MapImageLayerView2D")], f4);
- var v5 = f4;
- export {
- v5 as default
- };
- //# sourceMappingURL=MapImageLayerView2D-QXGPU7JK.js.map
|